diff --git a/README.md b/README.md index f81d500..20d6461 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,23 @@ Framework-agnostic rendering engine for server-driven UI. Build dynamic forms an - ⚡ **Reactive System**: Handle declarative and imperative reactions - 🧩 **Type Safe**: Full TypeScript support -## Examples +## Showcases ### React (Vanilla) ```bash -pnpm --filter examples-react dev +pnpm --filter showcases-react dev # http://localhost:3000 ``` ### React with Material UI ```bash -pnpm --filter examples-react-material-ui dev +pnpm --filter showcases-react-material-ui dev # http://localhost:3001 ``` ### React with Chakra UI ```bash -pnpm --filter examples-react-chakra-ui dev +pnpm --filter showcases-react-chakra-ui dev # http://localhost:3002 ``` @@ -52,7 +52,7 @@ schepta/ │ ├── core/ # Framework-agnostic core logic │ ├── adapters/ # Framework adapters (react, vue, vanilla) │ └── factories/ # Framework factories (react, vue, vanilla) -├── examples/ # Example applications +├── showcases/ # Example applications │ ├── react/ # React vanilla example │ ├── react-material-ui/ # React with Material UI │ └── react-chakra-ui/ # React with Chakra UI diff --git a/docs/.vitepress/components.ts b/docs/.vitepress/components.ts index 3023b5a..5a31702 100644 --- a/docs/.vitepress/components.ts +++ b/docs/.vitepress/components.ts @@ -20,11 +20,11 @@ const ReactWrapper = (Component: any) => { }; export default { - SimpleFormReact: defineAsyncComponent(() => import('../components/examples/SimpleFormReact.vue')), - ComplexFormReact: defineAsyncComponent(() => import('../components/examples/ComplexFormReact.vue')), - SimpleFormVue: defineAsyncComponent(() => import('../components/examples/SimpleFormVue.vue')), - ComplexFormVue: defineAsyncComponent(() => import('../components/examples/ComplexFormVue.vue')), - SimpleFormVuetify: defineAsyncComponent(() => import('../components/examples/SimpleFormVuetify.vue')), - ComplexFormVuetify: defineAsyncComponent(() => import('../components/examples/ComplexFormVuetify.vue')), + SimpleFormReact: defineAsyncComponent(() => import('../components/showcases/SimpleFormReact.vue')), + ComplexFormReact: defineAsyncComponent(() => import('../components/showcases/ComplexFormReact.vue')), + SimpleFormVue: defineAsyncComponent(() => import('../components/showcases/SimpleFormVue.vue')), + ComplexFormVue: defineAsyncComponent(() => import('../components/showcases/ComplexFormVue.vue')), + SimpleFormVuetify: defineAsyncComponent(() => import('../components/showcases/SimpleFormVuetify.vue')), + ComplexFormVuetify: defineAsyncComponent(() => import('../components/showcases/ComplexFormVuetify.vue')), }; diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 402a71d..9ce3ac9 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -27,7 +27,7 @@ export default defineConfig({ { text: 'Home', link: '/en-US/' }, { text: 'Guide', link: '/en-US/guide/quick-start' }, { text: 'Concepts', link: '/en-US/concepts/01-factories' }, - { text: 'Examples', link: '/en-US/examples/react' }, + { text: 'Showcases', link: '/en-US/showcases/react' }, ], sidebar: { '/en-US/guide/': [ @@ -52,15 +52,15 @@ export default defineConfig({ ], }, ], - '/en-US/examples/': [ + '/en-US/showcases/': [ { - text: 'Examples', + text: 'Showcases', items: [ - { text: 'React', link: '/en-US/examples/react' }, - { text: 'React Material UI', link: '/en-US/examples/material-ui' }, - { text: 'React Chakra UI', link: '/en-US/examples/chakra-ui' }, - { text: 'Vue', link: '/en-US/examples/vue' }, - { text: 'Vue Vuetify', link: '/en-US/examples/vuetify' }, + { text: 'React', link: '/en-US/showcases/react' }, + { text: 'React Material UI', link: '/en-US/showcases/material-ui' }, + { text: 'React Chakra UI', link: '/en-US/showcases/chakra-ui' }, + { text: 'Vue', link: '/en-US/showcases/vue' }, + { text: 'Vue Vuetify', link: '/en-US/showcases/vuetify' }, ], }, ], @@ -81,7 +81,7 @@ export default defineConfig({ { text: 'Início', link: '/pt-BR/' }, { text: 'Guia', link: '/pt-BR/guide/quick-start' }, { text: 'Conceitos', link: '/pt-BR/concepts/01-factories' }, - { text: 'Exemplos', link: '/pt-BR/examples/react' }, + { text: 'Exemplos', link: '/pt-BR/showcases/react' }, ], sidebar: { '/pt-BR/guide/': [ @@ -106,15 +106,15 @@ export default defineConfig({ ], }, ], - '/pt-BR/examples/': [ + '/pt-BR/showcases/': [ { text: 'Exemplos', items: [ - { text: 'React', link: '/pt-BR/examples/react' }, - { text: 'React Material UI', link: '/pt-BR/examples/material-ui' }, - { text: 'React Chakra UI', link: '/pt-BR/examples/chakra-ui' }, - { text: 'Vue', link: '/pt-BR/examples/vue' }, - { text: 'Vue Vuetify', link: '/pt-BR/examples/vuetify' }, + { text: 'React', link: '/pt-BR/showcases/react' }, + { text: 'React Material UI', link: '/pt-BR/showcases/material-ui' }, + { text: 'React Chakra UI', link: '/pt-BR/showcases/chakra-ui' }, + { text: 'Vue', link: '/pt-BR/showcases/vue' }, + { text: 'Vue Vuetify', link: '/pt-BR/showcases/vuetify' }, ], }, ], @@ -135,7 +135,7 @@ export default defineConfig({ { text: 'Inicio', link: '/es-ES/' }, { text: 'Guía', link: '/es-ES/guide/quick-start' }, { text: 'Conceptos', link: '/es-ES/concepts/01-factories' }, - { text: 'Ejemplos', link: '/es-ES/examples/react' }, + { text: 'Ejemplos', link: '/es-ES/showcases/react' }, ], sidebar: { '/es-ES/guide/': [ @@ -160,15 +160,15 @@ export default defineConfig({ ], }, ], - '/es-ES/examples/': [ + '/es-ES/showcases/': [ { text: 'Ejemplos', items: [ - { text: 'React', link: '/es-ES/examples/react' }, - { text: 'React Material UI', link: '/es-ES/examples/material-ui' }, - { text: 'React Chakra UI', link: '/es-ES/examples/chakra-ui' }, - { text: 'Vue', link: '/es-ES/examples/vue' }, - { text: 'Vue Vuetify', link: '/es-ES/examples/vuetify' }, + { text: 'React', link: '/es-ES/showcases/react' }, + { text: 'React Material UI', link: '/es-ES/showcases/material-ui' }, + { text: 'React Chakra UI', link: '/es-ES/showcases/chakra-ui' }, + { text: 'Vue', link: '/es-ES/showcases/vue' }, + { text: 'Vue Vuetify', link: '/es-ES/showcases/vuetify' }, ], }, ], diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 2954151..c7ef144 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -7,7 +7,6 @@ import { MotionPlugin } from '@vueuse/motion' export default { ...DefaultTheme, enhanceApp({ app, router }) { - app.component('CodeSandboxEmbed', defineAsyncComponent(() => import('../../components/examples/CodeSandboxEmbed.vue'))); app.component('TerminalIcon', defineAsyncComponent(() => import('lucide-vue-next').then(m => m.Terminal))); app.component('CopyIcon', defineAsyncComponent(() => import('lucide-vue-next').then(m => m.Copy))); app.component('CheckIcon', defineAsyncComponent(() => import('lucide-vue-next').then(m => m.Check))); diff --git a/docs/components/home/ConceptsSection.vue b/docs/components/home/ConceptsSection.vue index 29218ea..6cd5303 100644 --- a/docs/components/home/ConceptsSection.vue +++ b/docs/components/home/ConceptsSection.vue @@ -11,10 +11,10 @@
-

{{ examples.title }}

-

{{ examples.description }}

+

{{ showcases.title }}

+

{{ showcases.description }}

@@ -30,7 +30,7 @@ const { frontmatter } = useData(); const locale = computed(() => frontmatter.value.locale || 'en-US'); const concepts = computed(() => frontmatter.value.concepts || {}); -const examples = computed(() => frontmatter.value.examples || {}); +const showcases = computed(() => frontmatter.value.showcases || {}); - diff --git a/examples/vue/src/pages/SimpleForm.vue b/examples/vue/src/pages/SimpleForm.vue deleted file mode 100644 index 14d60b9..0000000 --- a/examples/vue/src/pages/SimpleForm.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - diff --git a/examples/vue/tsconfig.json b/examples/vue/tsconfig.json deleted file mode 100644 index 39c69f6..0000000 --- a/examples/vue/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "jsx": "preserve" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] -} - diff --git a/examples/vue/vite.config.ts b/examples/vue/vite.config.ts deleted file mode 100644 index 7e4699e..0000000 --- a/examples/vue/vite.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from 'vite'; -import vue from '@vitejs/plugin-vue'; - -export default defineConfig({ - plugins: [vue()], - server: { - port: 3010, - }, -}); - diff --git a/packages/factories/react/README.md b/packages/factories/react/README.md index 61e7e76..1921cf6 100644 --- a/packages/factories/react/README.md +++ b/packages/factories/react/README.md @@ -46,7 +46,7 @@ function App() { ## Documentation -For complete documentation and examples, visit [https://schepta.dev](https://schepta.dev) +For complete documentation and showcases, visit [https://schepta.dev](https://schepta.dev) ## License diff --git a/packages/factories/react/src/index.ts b/packages/factories/react/src/index.ts index 99e6cc2..3513581 100644 --- a/packages/factories/react/src/index.ts +++ b/packages/factories/react/src/index.ts @@ -5,8 +5,8 @@ * No external form library dependencies (react-hook-form, formik, etc.) * * Users can integrate form libraries by creating custom components. - * See examples/react/src/basic-ui/components/rhf/ for RHF integration. - * See examples/react/src/basic-ui/components/formik/ for Formik integration. + * See showcases/react/src/basic-ui/components/rhf/ for RHF integration. + * See showcases/react/src/basic-ui/components/formik/ for Formik integration. */ // Main factory diff --git a/packages/factories/vanilla/README.md b/packages/factories/vanilla/README.md index 285dfad..a036042 100644 --- a/packages/factories/vanilla/README.md +++ b/packages/factories/vanilla/README.md @@ -43,7 +43,7 @@ factory.render(container); ## Documentation -For complete documentation and examples, visit [https://schepta.dev](https://schepta.dev) +For complete documentation and showcases, visit [https://schepta.dev](https://schepta.dev) ## License diff --git a/packages/factories/vue/README.md b/packages/factories/vue/README.md index 67b3fb4..739781d 100644 --- a/packages/factories/vue/README.md +++ b/packages/factories/vue/README.md @@ -39,7 +39,7 @@ const handleSubmit = (values: any) => { ## Documentation -For complete documentation and examples, visit [https://schepta.dev](https://schepta.dev) +For complete documentation and showcases, visit [https://schepta.dev](https://schepta.dev) ## License diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ebfc10..690aa8b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -94,135 +94,6 @@ importers: specifier: ^1.0.0 version: 1.6.4(@algolia/client-search@5.46.0)(@types/node@20.19.25)(react-dom@18.3.1)(react@18.3.1)(search-insights@2.17.3)(typescript@5.9.3) - examples/react: - dependencies: - '@chakra-ui/react': - specifier: ^2.8.2 - version: 2.10.9(@emotion/react@11.14.0)(@emotion/styled@11.14.1)(@types/react@18.3.27)(framer-motion@10.18.0)(react-dom@18.3.1)(react@18.3.1) - '@emotion/react': - specifier: ^11.11.1 - version: 11.14.0(@types/react@18.3.27)(react@18.3.1) - '@emotion/styled': - specifier: ^11.11.0 - version: 11.14.1(@emotion/react@11.14.0)(@types/react@18.3.27)(react@18.3.1) - '@hookform/resolvers': - specifier: ^3.9.0 - version: 3.10.0(react-hook-form@7.68.0) - '@mui/material': - specifier: ^5.15.0 - version: 5.18.0(@emotion/react@11.14.0)(@emotion/styled@11.14.1)(@types/react@18.3.27)(react-dom@18.3.1)(react@18.3.1) - '@schepta/adapter-react': - specifier: workspace:* - version: link:../../packages/adapters/react - '@schepta/core': - specifier: workspace:* - version: link:../../packages/core - '@schepta/factory-react': - specifier: workspace:* - version: link:../../packages/factories/react - formik: - specifier: ^2.4.6 - version: 2.4.9(@types/react@18.3.27)(react@18.3.1) - framer-motion: - specifier: ^10.16.16 - version: 10.18.0(react-dom@18.3.1)(react@18.3.1) - react: - specifier: ^18.2.0 - version: 18.3.1 - react-dom: - specifier: ^18.2.0 - version: 18.3.1(react@18.3.1) - react-hook-form: - specifier: ^7.52.2 - version: 7.68.0(react@18.3.1) - react-icons: - specifier: ^5.5.0 - version: 5.5.0(react@18.3.1) - react-router-dom: - specifier: ^6.21.0 - version: 6.30.2(react-dom@18.3.1)(react@18.3.1) - devDependencies: - '@types/react': - specifier: ^18.2.47 - version: 18.3.27 - '@types/react-dom': - specifier: ^18.2.18 - version: 18.3.7(@types/react@18.3.27) - '@vitejs/plugin-react': - specifier: ^4.2.1 - version: 4.7.0(vite@5.4.21) - typescript: - specifier: ^5.3.3 - version: 5.9.3 - vite: - specifier: ^5.0.8 - version: 5.4.21 - - examples/vue: - dependencies: - '@schepta/adapter-vue': - specifier: workspace:* - version: link:../../packages/adapters/vue - '@schepta/core': - specifier: workspace:* - version: link:../../packages/core - '@schepta/factory-vue': - specifier: workspace:* - version: link:../../packages/factories/vue - vue: - specifier: ^3.4.0 - version: 3.5.25(typescript@5.9.3) - vue-router: - specifier: ^4.2.5 - version: 4.6.3(vue@3.5.25) - devDependencies: - '@vitejs/plugin-vue': - specifier: ^5.0.0 - version: 5.2.4(vite@5.4.21)(vue@3.5.25) - typescript: - specifier: ^5.3.3 - version: 5.9.3 - vite: - specifier: ^5.0.8 - version: 5.4.21(@types/node@20.19.25) - - examples/vue-vuetify: - dependencies: - '@mdi/font': - specifier: ^7.4.47 - version: 7.4.47 - '@schepta/adapter-vue': - specifier: workspace:* - version: link:../../packages/adapters/vue - '@schepta/core': - specifier: workspace:* - version: link:../../packages/core - '@schepta/factory-vue': - specifier: workspace:* - version: link:../../packages/factories/vue - vue: - specifier: ^3.4.0 - version: 3.5.25(typescript@5.9.3) - vue-router: - specifier: ^4.2.5 - version: 4.6.3(vue@3.5.25) - vuetify: - specifier: ^3.5.0 - version: 3.11.2(typescript@5.9.3)(vite-plugin-vuetify@2.1.2)(vue@3.5.25) - devDependencies: - '@vitejs/plugin-vue': - specifier: ^5.0.0 - version: 5.2.4(vite@5.4.21)(vue@3.5.25) - typescript: - specifier: ^5.3.3 - version: 5.9.3 - vite: - specifier: ^5.0.8 - version: 5.4.21(@types/node@20.19.25) - vite-plugin-vuetify: - specifier: ^2.0.1 - version: 2.1.2(vite@5.4.21)(vue@3.5.25)(vuetify@3.11.2) - packages/adapters/react: dependencies: '@schepta/core': @@ -416,6 +287,70 @@ importers: specifier: ^3.4.0 version: 3.5.25(typescript@5.9.3) + showcases: + dependencies: + '@chakra-ui/react': + specifier: ^2.8.2 + version: 2.10.9(@emotion/react@11.14.0)(@emotion/styled@11.14.1)(@types/react@18.3.27)(framer-motion@10.18.0)(react-dom@18.3.1)(react@18.3.1) + '@emotion/react': + specifier: ^11.11.1 + version: 11.14.0(@types/react@18.3.27)(react@18.3.1) + '@emotion/styled': + specifier: ^11.11.0 + version: 11.14.1(@emotion/react@11.14.0)(@types/react@18.3.27)(react@18.3.1) + '@hookform/resolvers': + specifier: ^3.9.0 + version: 3.10.0(react-hook-form@7.68.0) + '@mui/material': + specifier: ^5.15.0 + version: 5.18.0(@emotion/react@11.14.0)(@emotion/styled@11.14.1)(@types/react@18.3.27)(react-dom@18.3.1)(react@18.3.1) + '@schepta/adapter-react': + specifier: workspace:* + version: link:../packages/adapters/react + '@schepta/core': + specifier: workspace:* + version: link:../packages/core + '@schepta/factory-react': + specifier: workspace:* + version: link:../packages/factories/react + formik: + specifier: ^2.4.6 + version: 2.4.9(@types/react@18.3.27)(react@18.3.1) + framer-motion: + specifier: ^10.16.16 + version: 10.18.0(react-dom@18.3.1)(react@18.3.1) + react: + specifier: ^18.2.0 + version: 18.3.1 + react-dom: + specifier: ^18.2.0 + version: 18.3.1(react@18.3.1) + react-hook-form: + specifier: ^7.52.2 + version: 7.68.0(react@18.3.1) + react-icons: + specifier: ^5.5.0 + version: 5.5.0(react@18.3.1) + react-router-dom: + specifier: ^6.21.0 + version: 6.30.2(react-dom@18.3.1)(react@18.3.1) + devDependencies: + '@types/react': + specifier: ^18.2.47 + version: 18.3.27 + '@types/react-dom': + specifier: ^18.2.18 + version: 18.3.7(@types/react@18.3.27) + '@vitejs/plugin-react': + specifier: ^4.2.1 + version: 4.7.0(vite@5.4.21) + typescript: + specifier: ^5.3.3 + version: 5.9.3 + vite: + specifier: ^5.0.8 + version: 5.4.21(@types/node@20.19.25) + tests: devDependencies: '@playwright/test': @@ -2208,7 +2143,7 @@ packages: '@rolldown/pluginutils': 1.0.0-beta.27 '@types/babel__core': 7.20.5 react-refresh: 0.17.0 - vite: 5.4.21 + vite: 5.4.21(@types/node@20.19.25) transitivePeerDependencies: - supports-color dev: true @@ -5500,44 +5435,6 @@ packages: transitivePeerDependencies: - supports-color - /vite@5.4.21: - resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.21.5 - postcss: 8.5.6 - rollup: 4.53.3 - optionalDependencies: - fsevents: 2.3.3 - dev: true - /vite@5.4.21(@types/node@20.19.25): resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} engines: {node: ^18.0.0 || >=20.0.0} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 31b1e76..e34b522 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,6 @@ packages: - 'packages/**' - - 'examples/**' + - 'showcases/**' - 'tests' - 'docs' diff --git a/scripts/publish.sh b/scripts/publish.sh index 9975d10..bf0ab06 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -65,7 +65,7 @@ publish_package() { check_ready() { echo "🔍 Verificando se está pronto para publicar..." - # Fazer build apenas dos packages @schepta/* (não docs/examples) + # Fazer build apenas dos packages @schepta/* (não docs/showcases) echo "🔨 Fazendo build dos packages @schepta/*..." pnpm --filter "@schepta/*" build diff --git a/scripts/start-all-servers.sh b/scripts/start-all-servers.sh index 814dd2b..d1d3e10 100755 --- a/scripts/start-all-servers.sh +++ b/scripts/start-all-servers.sh @@ -6,17 +6,17 @@ echo "🚀 Iniciando todos os servidores de exemplo..." # Iniciar React vanilla (porta 3000) echo "📦 Iniciando React vanilla na porta 3000..." -pnpm --filter examples-react dev & +pnpm --filter showcases-react dev & REACT_PID=$! # Iniciar Material UI (porta 3001) echo "📦 Iniciando Material UI na porta 3001..." -pnpm --filter examples-react-material-ui dev & +pnpm --filter showcases-react-material-ui dev & MATERIAL_PID=$! # Iniciar Chakra UI (porta 3002) echo "📦 Iniciando Chakra UI na porta 3002..." -pnpm --filter examples-react-chakra-ui dev & +pnpm --filter showcases-react-chakra-ui dev & CHAKRA_PID=$! # Aguardar servidores iniciarem diff --git a/examples/react/index.html b/showcases/index.html similarity index 100% rename from examples/react/index.html rename to showcases/index.html diff --git a/examples/react/package.json b/showcases/package.json similarity index 96% rename from examples/react/package.json rename to showcases/package.json index c48eff8..d4fdd6c 100644 --- a/examples/react/package.json +++ b/showcases/package.json @@ -1,5 +1,5 @@ { - "name": "examples-react", + "name": "showcases", "version": "0.1.0", "private": true, "scripts": { diff --git a/examples/react/src/App.tsx b/showcases/src/App.tsx similarity index 92% rename from examples/react/src/App.tsx rename to showcases/src/App.tsx index b5ba75a..f65a230 100644 --- a/examples/react/src/App.tsx +++ b/showcases/src/App.tsx @@ -24,9 +24,9 @@ import { ScheptaProvider } from "@schepta/adapter-react"; import { components } from "./basic-ui/components/ComponentRegistry"; const navigationItems = [ - { path: "/basic", label: "Basic Examples", icon: }, - { path: "/chakra-ui", label: "Chakra UI Examples", icon: }, - { path: "/material-ui", label: "Material UI Examples", icon: }, + { path: "/basic", label: "Basic UI", icon: }, + { path: "/chakra-ui", label: "Chakra UI", icon: }, + { path: "/material-ui", label: "Material UI", icon: }, ]; function Header() { @@ -49,7 +49,7 @@ function Header() { fontWeight: 700, }} > - Schepta React Examples + Schepta React Showcases diff --git a/examples/react/src/basic-ui/components/ComponentRegistry.tsx b/showcases/src/basic-ui/components/ComponentRegistry.tsx similarity index 100% rename from examples/react/src/basic-ui/components/ComponentRegistry.tsx rename to showcases/src/basic-ui/components/ComponentRegistry.tsx diff --git a/examples/react/src/basic-ui/components/Forms/FormWithFormik.tsx b/showcases/src/basic-ui/components/Forms/FormWithFormik.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Forms/FormWithFormik.tsx rename to showcases/src/basic-ui/components/Forms/FormWithFormik.tsx diff --git a/examples/react/src/basic-ui/components/Forms/FormWithRHF.tsx b/showcases/src/basic-ui/components/Forms/FormWithRHF.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Forms/FormWithRHF.tsx rename to showcases/src/basic-ui/components/Forms/FormWithRHF.tsx diff --git a/examples/react/src/basic-ui/components/Forms/ModalForm.tsx b/showcases/src/basic-ui/components/Forms/ModalForm.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Forms/ModalForm.tsx rename to showcases/src/basic-ui/components/Forms/ModalForm.tsx diff --git a/examples/react/src/basic-ui/components/Forms/NativeComplexForm.tsx b/showcases/src/basic-ui/components/Forms/NativeComplexForm.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Forms/NativeComplexForm.tsx rename to showcases/src/basic-ui/components/Forms/NativeComplexForm.tsx diff --git a/examples/react/src/basic-ui/components/Forms/NativeForm.tsx b/showcases/src/basic-ui/components/Forms/NativeForm.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Forms/NativeForm.tsx rename to showcases/src/basic-ui/components/Forms/NativeForm.tsx diff --git a/examples/react/src/basic-ui/components/Inputs/InputText.tsx b/showcases/src/basic-ui/components/Inputs/InputText.tsx similarity index 100% rename from examples/react/src/basic-ui/components/Inputs/InputText.tsx rename to showcases/src/basic-ui/components/Inputs/InputText.tsx diff --git a/examples/react/src/basic-ui/components/formik/FormikFieldWrapper.tsx b/showcases/src/basic-ui/components/formik/FormikFieldWrapper.tsx similarity index 100% rename from examples/react/src/basic-ui/components/formik/FormikFieldWrapper.tsx rename to showcases/src/basic-ui/components/formik/FormikFieldWrapper.tsx diff --git a/examples/react/src/basic-ui/components/formik/FormikFormContainer.tsx b/showcases/src/basic-ui/components/formik/FormikFormContainer.tsx similarity index 100% rename from examples/react/src/basic-ui/components/formik/FormikFormContainer.tsx rename to showcases/src/basic-ui/components/formik/FormikFormContainer.tsx diff --git a/examples/react/src/basic-ui/components/rhf/RHFFieldWrapper.tsx b/showcases/src/basic-ui/components/rhf/RHFFieldWrapper.tsx similarity index 100% rename from examples/react/src/basic-ui/components/rhf/RHFFieldWrapper.tsx rename to showcases/src/basic-ui/components/rhf/RHFFieldWrapper.tsx diff --git a/examples/react/src/basic-ui/components/rhf/RHFFormContainer.tsx b/showcases/src/basic-ui/components/rhf/RHFFormContainer.tsx similarity index 100% rename from examples/react/src/basic-ui/components/rhf/RHFFormContainer.tsx rename to showcases/src/basic-ui/components/rhf/RHFFormContainer.tsx diff --git a/examples/react/src/basic-ui/pages/BasicFormPage.tsx b/showcases/src/basic-ui/pages/BasicFormPage.tsx similarity index 91% rename from examples/react/src/basic-ui/pages/BasicFormPage.tsx rename to showcases/src/basic-ui/pages/BasicFormPage.tsx index a0d6ceb..fbe3412 100644 --- a/examples/react/src/basic-ui/pages/BasicFormPage.tsx +++ b/showcases/src/basic-ui/pages/BasicFormPage.tsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { Tab, Tabs, Paper } from "@mui/material"; -import simpleFormSchema from "../../../../../instances/form/simple-form.json"; -import complexFormSchema from "../../../../../instances/form/complex-form.json"; +import simpleFormSchema from "../../../../instances/form/simple-form.json"; +import complexFormSchema from "../../../../instances/form/complex-form.json"; import { NativeForm } from "../components/Forms/NativeForm"; import { TabPanel } from "../../material-ui/pages/MaterialFormPage"; import { ModalForm } from "../components/Forms/ModalForm"; @@ -24,8 +24,8 @@ export function BasicFormPage() { <> - - + + diff --git a/examples/react/src/chakra-ui/components/ComponentRegistry.tsx b/showcases/src/chakra-ui/components/ComponentRegistry.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/ComponentRegistry.tsx rename to showcases/src/chakra-ui/components/ComponentRegistry.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormContainer.tsx b/showcases/src/chakra-ui/components/Containers/FormContainer.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormContainer.tsx rename to showcases/src/chakra-ui/components/Containers/FormContainer.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormField.tsx b/showcases/src/chakra-ui/components/Containers/FormField.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormField.tsx rename to showcases/src/chakra-ui/components/Containers/FormField.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormSectionContainer.tsx b/showcases/src/chakra-ui/components/Containers/FormSectionContainer.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormSectionContainer.tsx rename to showcases/src/chakra-ui/components/Containers/FormSectionContainer.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormSectionGroup.tsx b/showcases/src/chakra-ui/components/Containers/FormSectionGroup.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormSectionGroup.tsx rename to showcases/src/chakra-ui/components/Containers/FormSectionGroup.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormSectionGroupContainer.tsx b/showcases/src/chakra-ui/components/Containers/FormSectionGroupContainer.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormSectionGroupContainer.tsx rename to showcases/src/chakra-ui/components/Containers/FormSectionGroupContainer.tsx diff --git a/examples/react/src/chakra-ui/components/Containers/FormSectionTitle.tsx b/showcases/src/chakra-ui/components/Containers/FormSectionTitle.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Containers/FormSectionTitle.tsx rename to showcases/src/chakra-ui/components/Containers/FormSectionTitle.tsx diff --git a/examples/react/src/chakra-ui/components/Form.tsx b/showcases/src/chakra-ui/components/Form.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Form.tsx rename to showcases/src/chakra-ui/components/Form.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputCheckbox.tsx b/showcases/src/chakra-ui/components/Inputs/InputCheckbox.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputCheckbox.tsx rename to showcases/src/chakra-ui/components/Inputs/InputCheckbox.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputDate.tsx b/showcases/src/chakra-ui/components/Inputs/InputDate.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputDate.tsx rename to showcases/src/chakra-ui/components/Inputs/InputDate.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputNumber.tsx b/showcases/src/chakra-ui/components/Inputs/InputNumber.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputNumber.tsx rename to showcases/src/chakra-ui/components/Inputs/InputNumber.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputPhone.tsx b/showcases/src/chakra-ui/components/Inputs/InputPhone.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputPhone.tsx rename to showcases/src/chakra-ui/components/Inputs/InputPhone.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputSelect.tsx b/showcases/src/chakra-ui/components/Inputs/InputSelect.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputSelect.tsx rename to showcases/src/chakra-ui/components/Inputs/InputSelect.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputText.tsx b/showcases/src/chakra-ui/components/Inputs/InputText.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputText.tsx rename to showcases/src/chakra-ui/components/Inputs/InputText.tsx diff --git a/examples/react/src/chakra-ui/components/Inputs/InputTextarea.tsx b/showcases/src/chakra-ui/components/Inputs/InputTextarea.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/Inputs/InputTextarea.tsx rename to showcases/src/chakra-ui/components/Inputs/InputTextarea.tsx diff --git a/examples/react/src/chakra-ui/components/SubmitButton.tsx b/showcases/src/chakra-ui/components/SubmitButton.tsx similarity index 100% rename from examples/react/src/chakra-ui/components/SubmitButton.tsx rename to showcases/src/chakra-ui/components/SubmitButton.tsx diff --git a/examples/react/src/chakra-ui/pages/ChakraFormPage.tsx b/showcases/src/chakra-ui/pages/ChakraFormPage.tsx similarity index 85% rename from examples/react/src/chakra-ui/pages/ChakraFormPage.tsx rename to showcases/src/chakra-ui/pages/ChakraFormPage.tsx index 3157027..1bbca62 100644 --- a/examples/react/src/chakra-ui/pages/ChakraFormPage.tsx +++ b/showcases/src/chakra-ui/pages/ChakraFormPage.tsx @@ -10,8 +10,8 @@ import { } from "@chakra-ui/react"; import { Form } from "../components/Form"; import { FormSchema } from "@schepta/core"; -import simpleFormSchema from "../../../../../instances/form/simple-form.json"; -import complexFormSchema from "../../../../../instances/form/complex-form.json"; +import simpleFormSchema from "../../../../instances/form/simple-form.json"; +import complexFormSchema from "../../../../instances/form/complex-form.json"; export function ChakraFormPage() { const simpleSchema = simpleFormSchema as FormSchema; diff --git a/examples/react/src/index.css b/showcases/src/index.css similarity index 100% rename from examples/react/src/index.css rename to showcases/src/index.css diff --git a/examples/react/src/main.tsx b/showcases/src/main.tsx similarity index 100% rename from examples/react/src/main.tsx rename to showcases/src/main.tsx diff --git a/examples/react/src/material-ui/components/ComponentRegistry.tsx b/showcases/src/material-ui/components/ComponentRegistry.tsx similarity index 100% rename from examples/react/src/material-ui/components/ComponentRegistry.tsx rename to showcases/src/material-ui/components/ComponentRegistry.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormContainer.tsx b/showcases/src/material-ui/components/Containers/FormContainer.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormContainer.tsx rename to showcases/src/material-ui/components/Containers/FormContainer.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormField.tsx b/showcases/src/material-ui/components/Containers/FormField.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormField.tsx rename to showcases/src/material-ui/components/Containers/FormField.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormSectionContainer.tsx b/showcases/src/material-ui/components/Containers/FormSectionContainer.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormSectionContainer.tsx rename to showcases/src/material-ui/components/Containers/FormSectionContainer.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormSectionGroup.tsx b/showcases/src/material-ui/components/Containers/FormSectionGroup.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormSectionGroup.tsx rename to showcases/src/material-ui/components/Containers/FormSectionGroup.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormSectionGroupContainer.tsx b/showcases/src/material-ui/components/Containers/FormSectionGroupContainer.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormSectionGroupContainer.tsx rename to showcases/src/material-ui/components/Containers/FormSectionGroupContainer.tsx diff --git a/examples/react/src/material-ui/components/Containers/FormSectionTitle.tsx b/showcases/src/material-ui/components/Containers/FormSectionTitle.tsx similarity index 100% rename from examples/react/src/material-ui/components/Containers/FormSectionTitle.tsx rename to showcases/src/material-ui/components/Containers/FormSectionTitle.tsx diff --git a/examples/react/src/material-ui/components/Form.tsx b/showcases/src/material-ui/components/Form.tsx similarity index 100% rename from examples/react/src/material-ui/components/Form.tsx rename to showcases/src/material-ui/components/Form.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputCheckbox.tsx b/showcases/src/material-ui/components/Inputs/InputCheckbox.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputCheckbox.tsx rename to showcases/src/material-ui/components/Inputs/InputCheckbox.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputDate.tsx b/showcases/src/material-ui/components/Inputs/InputDate.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputDate.tsx rename to showcases/src/material-ui/components/Inputs/InputDate.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputNumber.tsx b/showcases/src/material-ui/components/Inputs/InputNumber.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputNumber.tsx rename to showcases/src/material-ui/components/Inputs/InputNumber.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputPhone.tsx b/showcases/src/material-ui/components/Inputs/InputPhone.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputPhone.tsx rename to showcases/src/material-ui/components/Inputs/InputPhone.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputSelect.tsx b/showcases/src/material-ui/components/Inputs/InputSelect.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputSelect.tsx rename to showcases/src/material-ui/components/Inputs/InputSelect.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputText.tsx b/showcases/src/material-ui/components/Inputs/InputText.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputText.tsx rename to showcases/src/material-ui/components/Inputs/InputText.tsx diff --git a/examples/react/src/material-ui/components/Inputs/InputTextarea.tsx b/showcases/src/material-ui/components/Inputs/InputTextarea.tsx similarity index 100% rename from examples/react/src/material-ui/components/Inputs/InputTextarea.tsx rename to showcases/src/material-ui/components/Inputs/InputTextarea.tsx diff --git a/examples/react/src/material-ui/components/SubmitButton.tsx b/showcases/src/material-ui/components/SubmitButton.tsx similarity index 100% rename from examples/react/src/material-ui/components/SubmitButton.tsx rename to showcases/src/material-ui/components/SubmitButton.tsx diff --git a/examples/react/src/material-ui/pages/MaterialFormPage.tsx b/showcases/src/material-ui/pages/MaterialFormPage.tsx similarity index 90% rename from examples/react/src/material-ui/pages/MaterialFormPage.tsx rename to showcases/src/material-ui/pages/MaterialFormPage.tsx index 9770611..db3c9f3 100644 --- a/examples/react/src/material-ui/pages/MaterialFormPage.tsx +++ b/showcases/src/material-ui/pages/MaterialFormPage.tsx @@ -1,8 +1,8 @@ import { FormSchema } from "@schepta/core"; -import simpleFormSchema from "../../../../../instances/form/simple-form.json"; +import simpleFormSchema from "../../../../instances/form/simple-form.json"; +import complexFormSchema from "../../../../instances/form/complex-form.json"; import { Paper, Box, Tabs, Tab } from "@mui/material"; import React, { useState } from "react"; -import complexFormSchema from "../../../../../instances/form/complex-form.json"; import { Form } from "../components/Form"; interface TabPanelProps { diff --git a/examples/react/tsconfig.json b/showcases/tsconfig.json similarity index 81% rename from examples/react/tsconfig.json rename to showcases/tsconfig.json index 15a0a7f..87a21d8 100644 --- a/examples/react/tsconfig.json +++ b/showcases/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src", diff --git a/examples/react/vite.config.ts b/showcases/vite.config.ts similarity index 100% rename from examples/react/vite.config.ts rename to showcases/vite.config.ts diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts index 5f3e835..31cbc24 100644 --- a/tests/playwright.config.ts +++ b/tests/playwright.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ ], webServer: [ { - command: 'pnpm --filter examples-react dev', + command: 'pnpm --filter showcases-react dev', url: 'http://localhost:3000', reuseExistingServer: true, timeout: 120 * 1000,