@donotdev/cli 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +48 -0
- package/README.md +291 -0
- package/dependencies-matrix.json +694 -0
- package/dist/bin/commands/build.d.ts +11 -0
- package/dist/bin/commands/build.d.ts.map +1 -0
- package/dist/bin/commands/build.js +8162 -0
- package/dist/bin/commands/build.js.map +1 -0
- package/dist/bin/commands/bump.d.ts +11 -0
- package/dist/bin/commands/bump.d.ts.map +1 -0
- package/dist/bin/commands/bump.js +8004 -0
- package/dist/bin/commands/bump.js.map +1 -0
- package/dist/bin/commands/cacheout.d.ts +11 -0
- package/dist/bin/commands/cacheout.d.ts.map +1 -0
- package/dist/bin/commands/cacheout.js +7630 -0
- package/dist/bin/commands/cacheout.js.map +1 -0
- package/dist/bin/commands/create-app.d.ts +11 -0
- package/dist/bin/commands/create-app.d.ts.map +1 -0
- package/dist/bin/commands/create-app.js +9032 -0
- package/dist/bin/commands/create-app.js.map +1 -0
- package/dist/bin/commands/create-project.d.ts +11 -0
- package/dist/bin/commands/create-project.d.ts.map +1 -0
- package/dist/bin/commands/create-project.js +9643 -0
- package/dist/bin/commands/create-project.js.map +1 -0
- package/dist/bin/commands/deploy.d.ts +11 -0
- package/dist/bin/commands/deploy.d.ts.map +1 -0
- package/dist/bin/commands/deploy.js +9007 -0
- package/dist/bin/commands/deploy.js.map +1 -0
- package/dist/bin/commands/dev.d.ts +11 -0
- package/dist/bin/commands/dev.d.ts.map +1 -0
- package/dist/bin/commands/dev.js +7892 -0
- package/dist/bin/commands/dev.js.map +1 -0
- package/dist/bin/commands/emu.d.ts +11 -0
- package/dist/bin/commands/emu.d.ts.map +1 -0
- package/dist/bin/commands/emu.js +8302 -0
- package/dist/bin/commands/emu.js.map +1 -0
- package/dist/bin/commands/format.d.ts +11 -0
- package/dist/bin/commands/format.d.ts.map +1 -0
- package/dist/bin/commands/format.js +8009 -0
- package/dist/bin/commands/format.js.map +1 -0
- package/dist/bin/commands/lint.d.ts +11 -0
- package/dist/bin/commands/lint.d.ts.map +1 -0
- package/dist/bin/commands/lint.js +7481 -0
- package/dist/bin/commands/lint.js.map +1 -0
- package/dist/bin/commands/preview.d.ts +11 -0
- package/dist/bin/commands/preview.d.ts.map +1 -0
- package/dist/bin/commands/preview.js +7909 -0
- package/dist/bin/commands/preview.js.map +1 -0
- package/dist/bin/commands/sync-secrets.d.ts +11 -0
- package/dist/bin/commands/sync-secrets.d.ts.map +1 -0
- package/dist/bin/commands/sync-secrets.js +8227 -0
- package/dist/bin/commands/sync-secrets.js.map +1 -0
- package/dist/bin/dndev.js +222 -0
- package/dist/bin/donotdev.js +222 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12820 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -0
- package/templates/app-demo/index.html.example +20 -0
- package/templates/app-demo/public/favicon.ico.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-400-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-cyrillic.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-greek.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin-ext.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-latin.woff2.example +0 -0
- package/templates/app-demo/public/fonts/Roboto-700-vietnamese.woff2.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +144 -0
- package/templates/app-demo/public/logo.png.example +0 -0
- package/templates/app-demo/public/logo.svg.example +1 -0
- package/templates/app-demo/public/manifest.json.example +10 -0
- package/templates/app-demo/src/App.tsx.example +17 -0
- package/templates/app-demo/src/Routes.tsx.example +20 -0
- package/templates/app-demo/src/components/ThemeToggle.tsx.example +48 -0
- package/templates/app-demo/src/globals.css.example +4 -0
- package/templates/app-demo/src/main.tsx.example +27 -0
- package/templates/app-demo/src/pages/DetailPage.tsx.example +103 -0
- package/templates/app-demo/src/pages/FullPage.tsx.example +142 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +79 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +511 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +152 -0
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +266 -0
- package/templates/app-demo/src/pages/components/LayoutRoute.tsx.example +20 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +921 -0
- package/templates/app-demo/src/themes.css.example +179 -0
- package/templates/app-demo/tsconfig.json.example +9 -0
- package/templates/app-demo/vite.config.ts.example +53 -0
- package/templates/app-next/.env.example +92 -0
- package/templates/app-next/next.config.ts.example +8 -0
- package/templates/app-next/postcss.config.js.example +58 -0
- package/templates/app-next/service-account-key.json.example +2 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +39 -0
- package/templates/app-next/src/app/layout.tsx.example +52 -0
- package/templates/app-next/src/app/not-found.tsx.example +21 -0
- package/templates/app-next/src/config/app.ts.example +75 -0
- package/templates/app-next/src/config/legal.ts.example +170 -0
- package/templates/app-next/src/globals.css.example +15 -0
- package/templates/app-next/src/locales/dndev_en.json.example +516 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +20 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-next/src/themes.css.example +179 -0
- package/templates/app-next/tsconfig.json.example +11 -0
- package/templates/app-payload/.env.example +28 -0
- package/templates/app-payload/README.md.example +233 -0
- package/templates/app-payload/collections/Company.ts.example +125 -0
- package/templates/app-payload/collections/Hero.ts.example +62 -0
- package/templates/app-payload/collections/Media.ts.example +41 -0
- package/templates/app-payload/collections/Products.ts.example +115 -0
- package/templates/app-payload/collections/Services.ts.example +104 -0
- package/templates/app-payload/collections/Testimonials.ts.example +92 -0
- package/templates/app-payload/collections/Users.ts.example +35 -0
- package/templates/app-payload/src/server.ts.example +79 -0
- package/templates/app-payload/tsconfig.json.example +24 -0
- package/templates/app-vite/.env.example +77 -0
- package/templates/app-vite/index.html.example +127 -0
- package/templates/app-vite/service-account-key.json.example +2 -0
- package/templates/app-vite/src/App.tsx.example +39 -0
- package/templates/app-vite/src/Routes.tsx.example +16 -0
- package/templates/app-vite/src/config/app.ts.example +75 -0
- package/templates/app-vite/src/config/legal.ts.example +170 -0
- package/templates/app-vite/src/globals.css.example +11 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +516 -0
- package/templates/app-vite/src/main.tsx.example +21 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +22 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-vite/src/pages/locales/README.md.example +1 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +5 -0
- package/templates/app-vite/src/themes.css.example +179 -0
- package/templates/app-vite/tsconfig.json.example +9 -0
- package/templates/app-vite/vite.config.ts.example +9 -0
- package/templates/functions-firebase/README.md.example +129 -0
- package/templates/functions-firebase/build.mjs.example +52 -0
- package/templates/functions-firebase/functions-firebase/.env.example.example +45 -0
- package/templates/functions-firebase/functions-firebase/README.md.example +123 -0
- package/templates/functions-firebase/functions-firebase/build.mjs.example +52 -0
- package/templates/functions-firebase/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
- package/templates/functions-firebase/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/auth/index.ts.example +11 -0
- package/templates/functions-firebase/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
- package/templates/functions-firebase/functions-firebase/src/billing/index.ts.example +10 -0
- package/templates/functions-firebase/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +19 -0
- package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +12 -0
- package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/index.ts.example +45 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/disconnect.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/getConnections.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/index.ts.example +17 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/functions-firebase/tsconfig.json.example +21 -0
- package/templates/functions-firebase/functions.yaml.example +14 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +19 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +21 -0
- package/templates/functions-firebase/src/auth/index.ts.example +11 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +21 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +24 -0
- package/templates/functions-firebase/src/billing/index.ts.example +10 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +14 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +14 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +19 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +14 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +14 -0
- package/templates/functions-firebase/src/crud/index.ts.example +12 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +14 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +14 -0
- package/templates/functions-firebase/src/index.ts.example +45 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +17 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +14 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +14 -0
- package/templates/functions-firebase/tsconfig.json.example +24 -0
- package/templates/functions-vercel/README.md.example +116 -0
- package/templates/functions-vercel/build.mjs.example +52 -0
- package/templates/functions-vercel/functions-vercel/.env.example.example +37 -0
- package/templates/functions-vercel/functions-vercel/README.md.example +116 -0
- package/templates/functions-vercel/functions-vercel/build.mjs.example +52 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/functions-vercel/tsconfig.json.example +21 -0
- package/templates/functions-vercel/functions-vercel/vercel.json.example +14 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +20 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +20 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +20 -0
- package/templates/functions-vercel/tsconfig.json.example +24 -0
- package/templates/functions-vercel/vercel.json.example +14 -0
- package/templates/github/github/workflows/firebase-deploy.yml.example +79 -0
- package/templates/github/workflows/firebase-deploy.yml.example +79 -0
- package/templates/root-consumer/.env.example +19 -0
- package/templates/root-consumer/.gitignore.example +82 -0
- package/templates/root-consumer/.prettierrc.cjs.example +12 -0
- package/templates/root-consumer/CLAUDE.md.example +73 -0
- package/templates/root-consumer/README.md.example +295 -0
- package/templates/root-consumer/bunfig.toml.example +68 -0
- package/templates/root-consumer/eslint.config.js.example +336 -0
- package/templates/root-consumer/firebase.json.example +348 -0
- package/templates/root-consumer/guides/AGENT_START_HERE.md.example +98 -0
- package/templates/root-consumer/guides/APP_CHECK_SETUP.md.example +111 -0
- package/templates/root-consumer/guides/AUTH_SETUP.md.example +92 -0
- package/templates/root-consumer/guides/BILLING_SETUP.md.example +120 -0
- package/templates/root-consumer/guides/CLI.md.example +293 -0
- package/templates/root-consumer/guides/COMPONENTS.md.example +875 -0
- package/templates/root-consumer/guides/CONFIG_SETUP.md.example +132 -0
- package/templates/root-consumer/guides/EMULATOR_SETUP.md.example +48 -0
- package/templates/root-consumer/guides/FEATURES.md.example +286 -0
- package/templates/root-consumer/guides/FRAMEWORK_OVERVIEW.md.example +97 -0
- package/templates/root-consumer/guides/FUNCTIONS.md.example +177 -0
- package/templates/root-consumer/guides/GETTING_STARTED.md.example +451 -0
- package/templates/root-consumer/guides/HOW_TO_USE.md.example +296 -0
- package/templates/root-consumer/guides/I18N_SETUP.md.example +204 -0
- package/templates/root-consumer/guides/IMPORT_PATTERNS.md.example +79 -0
- package/templates/root-consumer/guides/INDEX.md.example +50 -0
- package/templates/root-consumer/guides/INSTALLATION.md.example +296 -0
- package/templates/root-consumer/guides/LAYOUTS.md.example +310 -0
- package/templates/root-consumer/guides/PAGES_SETUP.md.example +123 -0
- package/templates/root-consumer/guides/STYLING.md.example +273 -0
- package/templates/root-consumer/guides/THEMING_SETUP.md.example +119 -0
- package/templates/root-consumer/guides/VERSION_CONTROL.md.example +181 -0
- package/templates/root-consumer/tsconfig.functions.json.example +15 -0
- package/templates/root-consumer/tsconfig.json.example +18 -0
- package/templates/root-consumer/turbo.json.example +46 -0
- package/templates/root-consumer/vercel.json.example +124 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAE5B;;;;;GAKG;AAEH,qFAAqF;AACrF,OAAO,EACL,SAAS,EACT,aAAa,EACb,MAAM,EACN,IAAI,EACJ,GAAG,EACH,KAAK,EACL,OAAO,EACP,GAAG,EACH,QAAQ,EACR,WAAW,EACX,MAAM,GACP,MAAM,mBAAmB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@donotdev/cli",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Command-line interface for DoNotDev Framework",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"bin": {
|
|
8
|
+
"dndev": "./dist/bin/dndev.js",
|
|
9
|
+
"donotdev": "./dist/bin/donotdev.js"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
"./dependencies-matrix.json": "./dependencies-matrix.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"templates",
|
|
24
|
+
"dependencies-matrix.json",
|
|
25
|
+
"README.md",
|
|
26
|
+
"LICENSE.md"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "dndev bundle --package @donotdev/cli",
|
|
31
|
+
"dev": "tsc --watch",
|
|
32
|
+
"clean": "rimraf dist tsconfig.tsbuildinfo",
|
|
33
|
+
"type-check": "tsc --noEmit"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@clack/prompts": "^0.11.0",
|
|
37
|
+
"commander": "^14.0.2",
|
|
38
|
+
"fast-glob": "^3.3.3"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@donotdev/core": "0.0.3"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"@donotdev/core": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/donotdev/cli.git"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"dndev",
|
|
54
|
+
"cli",
|
|
55
|
+
"framework",
|
|
56
|
+
"react",
|
|
57
|
+
"typescript",
|
|
58
|
+
"vite",
|
|
59
|
+
"nextjs",
|
|
60
|
+
"scaffolding"
|
|
61
|
+
],
|
|
62
|
+
"author": "AMBROISE PARK Consulting",
|
|
63
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20.0.0"
|
|
66
|
+
},
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"registry": "https://registry.npmjs.org",
|
|
69
|
+
"access": "public"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>DoNotDev Components Demo</title>
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
margin: 0;
|
|
10
|
+
font-family: var(--font-family, system-ui, sans-serif);
|
|
11
|
+
background: #000000;
|
|
12
|
+
color: #ffffff;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
<div id="root"></div>
|
|
18
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/* apps/demo/public/fonts/fonts.css */
|
|
2
|
+
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: Roboto;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-display: optional;
|
|
8
|
+
src: url('/fonts/Roboto-400-latin.woff2') format('woff2');
|
|
9
|
+
unicode-range: U+0000-00FF; /* Basic Latin - loads first for performance */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: Roboto;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
font-display: optional;
|
|
17
|
+
src: url('/fonts/Roboto-700-latin.woff2') format('woff2');
|
|
18
|
+
unicode-range: U+0000-00FF; /* Basic Latin - loads first for performance */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* ✅ CRITICAL: Extended character sets load on-demand when needed */
|
|
22
|
+
/* These load automatically when browser encounters characters in these ranges */
|
|
23
|
+
@font-face {
|
|
24
|
+
font-family: Roboto;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
font-display: swap;
|
|
28
|
+
src: url('/fonts/Roboto-400-latin-ext.woff2') format('woff2');
|
|
29
|
+
unicode-range:
|
|
30
|
+
U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
|
|
31
|
+
U+2C60-2C7F, U+A720-A7FF;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: Roboto;
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
font-display: swap;
|
|
39
|
+
src: url('/fonts/Roboto-700-latin-ext.woff2') format('woff2');
|
|
40
|
+
unicode-range:
|
|
41
|
+
U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
|
|
42
|
+
U+2C60-2C7F, U+A720-A7FF;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Cyrillic */
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: Roboto;
|
|
48
|
+
font-style: normal;
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
font-display: swap;
|
|
51
|
+
src: url('/fonts/Roboto-400-cyrillic.woff2') format('woff2');
|
|
52
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@font-face {
|
|
56
|
+
font-family: Roboto;
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-weight: 700;
|
|
59
|
+
font-display: swap;
|
|
60
|
+
src: url('/fonts/Roboto-700-cyrillic.woff2') format('woff2');
|
|
61
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Cyrillic Extended */
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: Roboto;
|
|
67
|
+
font-style: normal;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
font-display: swap;
|
|
70
|
+
src: url('/fonts/Roboto-400-cyrillic-ext.woff2') format('woff2');
|
|
71
|
+
unicode-range:
|
|
72
|
+
U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@font-face {
|
|
76
|
+
font-family: Roboto;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
font-display: swap;
|
|
80
|
+
src: url('/fonts/Roboto-700-cyrillic-ext.woff2') format('woff2');
|
|
81
|
+
unicode-range:
|
|
82
|
+
U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Greek */
|
|
86
|
+
@font-face {
|
|
87
|
+
font-family: Roboto;
|
|
88
|
+
font-style: normal;
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
font-display: swap;
|
|
91
|
+
src: url('/fonts/Roboto-400-greek.woff2') format('woff2');
|
|
92
|
+
unicode-range: U+0370-03FF;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: Roboto;
|
|
97
|
+
font-style: normal;
|
|
98
|
+
font-weight: 700;
|
|
99
|
+
font-display: swap;
|
|
100
|
+
src: url('/fonts/Roboto-700-greek.woff2') format('woff2');
|
|
101
|
+
unicode-range: U+0370-03FF;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Greek Extended */
|
|
105
|
+
@font-face {
|
|
106
|
+
font-family: Roboto;
|
|
107
|
+
font-style: normal;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
font-display: swap;
|
|
110
|
+
src: url('/fonts/Roboto-400-greek-ext.woff2') format('woff2');
|
|
111
|
+
unicode-range: U+1F00-1FFF;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@font-face {
|
|
115
|
+
font-family: Roboto;
|
|
116
|
+
font-style: normal;
|
|
117
|
+
font-weight: 700;
|
|
118
|
+
font-display: swap;
|
|
119
|
+
src: url('/fonts/Roboto-700-greek-ext.woff2') format('woff2');
|
|
120
|
+
unicode-range: U+1F00-1FFF;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Vietnamese */
|
|
124
|
+
@font-face {
|
|
125
|
+
font-family: Roboto;
|
|
126
|
+
font-style: normal;
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
font-display: swap;
|
|
129
|
+
src: url('/fonts/Roboto-400-vietnamese.woff2') format('woff2');
|
|
130
|
+
unicode-range:
|
|
131
|
+
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
|
|
132
|
+
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@font-face {
|
|
136
|
+
font-family: Roboto;
|
|
137
|
+
font-style: normal;
|
|
138
|
+
font-weight: 700;
|
|
139
|
+
font-display: swap;
|
|
140
|
+
src: url('/fonts/Roboto-700-vietnamese.woff2') format('woff2');
|
|
141
|
+
unicode-range:
|
|
142
|
+
U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
|
|
143
|
+
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
|
144
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500" xmlns:v="https://vecta.io/nano"><path d="M11.995 68.133c-.747.14-2.114 1.276-2.986 2.409l-1.557 2.199-.062 104.273.684 251.717c.935 2.835 3.423 4.749 6.347 4.89 2.366.142 3.61-.566 10.767-5.599l42.311-30.054L112.3 366.14l16.366-11.768c3.234-2.268 6.098-4.749 6.346-5.599 1.369-3.828 9.271-32.679 9.023-32.891-.124-.213-1.743.78-3.547 2.198-1.803 1.347-8.773 6.309-15.432 10.916L87.1 355.862l-24.891 17.65-23.831 16.729c-5.413 3.898-10.143 7.017-10.454 7.017-.685 0-.809-291.837-.063-292.334.249-.141 1.619.497 3.049 1.559l51.521 37.711 18.668 13.61 20.222 14.674 13.69 9.996 9.333 6.734 12.756 9.215c10.455 7.798 15.992 11.767 16.553 11.908.374.073 1.99-4.889 3.609-11.058l3.048-11.202-5.537-4.038-10.641-7.799c-2.863-1.984-10.391-7.584-16.8-12.405l-23.21-17.154-20.721-15.24L89.4 121.157c-2.613-1.986-7.653-5.671-11.2-8.223L23.506 73.096c-6.471-4.679-8.774-5.671-11.512-4.962l.001-.001zm235.829 4.466c-1.057.708-2.302 2.055-2.737 2.977-.622 1.276-.809 14.673-.746 62.733l.062 61.104 4.915 8.01 10.206 16.871 5.225 8.861.187-62.308 1.057-61.812c.56.212 6.098 4.111 12.321 8.648l43.806 31.97c1.307.991 1.431.708 5.973-9.641l4.667-10.705-1.618-1.346-14.747-10.845-20.844-15.313-36.65-26.864c-5.788-4.182-7.841-4.608-11.077-2.34zm-34.784 196.85l-7.279 15.807-11.511 25.166c.123.141 5.351-3.474 11.697-7.939l18.356-13.042 8.027-5.813c1.057-.922.685-1.701-6.347-13.469l-7.466-12.546-5.477 11.838v-.002z" fill="var(--primary,#dc143c)"/><path d="M376.752 57.145l-4.977 11.2c-1.432 2.907-4.792 10.066-7.468 15.95l-9.955 21.619-25.388 54.583-11.2 24.101-20.658 43.949-11.7 24.81-7.84 16.304c-.809 1.347-.621 1.631-15.679-23.747l-26.072-43.949-22.213-37.71c-8.587-14.815-10.267-16.73-12.322-14.319-.435.566-2.676 8.009-4.978 16.586l-22.711 82.228-13.378 47.494-8.153 29.064-18.232 64.86-12.133 43.382-4.355 16.162c.186 0 3.671-7.443 14.871-31.898l10.578-22.684 8.088-17.013 8.774-18.43 9.771-20.556 7.901-16.659 9.333-19.848 9.957-21.267 10.765-23.038c6.844-14.957 9.397-20.061 10.08-20.273.374-.142 3.485 4.606 6.968 10.562l24.828 41.255 31.981 52.809c5.289 8.932 6.846 11.06 8.153 11.2.87.142 1.929-.212 2.302-.779.685-.851 19.6-65.499 44.054-150.421l25.823-88.889 17.798-62.168c-.125-.141-1.308 2.34-2.615 5.53h.002z" fill="var(--accent,#ffd700)"/><path d="M359.081 153.904l-3.111 11.555c-1.369 4.89-2.302 9.074-2.053 9.287s5.041 3.757 10.703 7.869l33.289 24.314 37.645 27.505 19.601 14.318 6.409 4.536c2.489 1.49 5.538-.991-32.542 26.369l-38.269 27.432-31.236 22.402-33.913 24.456-28.187 20.273-12.134 8.648c-10.019 7.16-19.413 13.681-19.848 13.681-.188 0-.374-14.248-.374-31.757v-31.686l-4.419-7.088-10.019-16.518c-3.111-5.102-5.849-9.356-6.098-9.356s-.375 11.909-.249 26.37l.249 64.223v37.711l2.054 2.623c1.866 2.268 2.489 2.553 4.914 2.553 3.237 0 4.169-.568 18.855-11.202l76.535-55.291 21.78-15.807 120.403-86.411c3.67-2.552 5.102-4.748 5.475-8.434.188-2.409 0-3.971-.746-5.599-1.244-2.623-2.677-3.686-48.908-37.711l-51.023-37.642-14.624-10.774-12.88-9.427c-2.986-2.199-5.724-4.041-6.035-4.041-.374 0-.934 1.206-1.245 2.622l.001-.003z" fill="var(--primary,#dc143c)"/></svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// apps/demo/src/App.tsx
|
|
2
|
+
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import { TooltipProvider, Toaster } from '@donotdev/components';
|
|
5
|
+
|
|
6
|
+
import { Routes } from './Routes';
|
|
7
|
+
|
|
8
|
+
export function App() {
|
|
9
|
+
return (
|
|
10
|
+
<BrowserRouter>
|
|
11
|
+
<TooltipProvider>
|
|
12
|
+
<Routes />
|
|
13
|
+
<Toaster />
|
|
14
|
+
</TooltipProvider>
|
|
15
|
+
</BrowserRouter>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// apps/demo/src/Routes.tsx
|
|
2
|
+
|
|
3
|
+
import { Routes as RouterRoutes, Route } from 'react-router-dom';
|
|
4
|
+
|
|
5
|
+
import { LayoutRoute } from './pages/components/LayoutRoute';
|
|
6
|
+
import HomePage from './pages/HomePage';
|
|
7
|
+
import FullPage from './pages/FullPage';
|
|
8
|
+
import DetailPage from './pages/DetailPage';
|
|
9
|
+
|
|
10
|
+
export function Routes() {
|
|
11
|
+
return (
|
|
12
|
+
<RouterRoutes>
|
|
13
|
+
<Route element={<LayoutRoute />}>
|
|
14
|
+
<Route path="/" element={<HomePage />} />
|
|
15
|
+
<Route path="/component/:id" element={<DetailPage />} />
|
|
16
|
+
<Route path="/full" element={<FullPage />} />
|
|
17
|
+
</Route>
|
|
18
|
+
</RouterRoutes>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// apps/demo/src/components/ThemeToggle.tsx
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { Sun, Moon } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
import { Button } from '@donotdev/components';
|
|
7
|
+
|
|
8
|
+
export function ThemeToggle() {
|
|
9
|
+
const [isDark, setIsDark] = useState(false);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const root = document.documentElement;
|
|
13
|
+
const body = document.body;
|
|
14
|
+
const savedTheme = localStorage.getItem('theme');
|
|
15
|
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
16
|
+
|
|
17
|
+
const initialTheme = savedTheme || (prefersDark ? 'dark' : 'light');
|
|
18
|
+
root.classList.remove('light', 'dark');
|
|
19
|
+
body.classList.remove('light', 'dark');
|
|
20
|
+
root.classList.add(initialTheme);
|
|
21
|
+
body.classList.add(initialTheme);
|
|
22
|
+
setIsDark(initialTheme === 'dark');
|
|
23
|
+
}, []);
|
|
24
|
+
|
|
25
|
+
const toggleTheme = () => {
|
|
26
|
+
const root = document.documentElement;
|
|
27
|
+
const body = document.body;
|
|
28
|
+
const newTheme = isDark ? 'light' : 'dark';
|
|
29
|
+
|
|
30
|
+
root.classList.remove('light', 'dark');
|
|
31
|
+
body.classList.remove('light', 'dark');
|
|
32
|
+
root.classList.add(newTheme);
|
|
33
|
+
body.classList.add(newTheme);
|
|
34
|
+
localStorage.setItem('theme', newTheme);
|
|
35
|
+
setIsDark(!isDark);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Button
|
|
40
|
+
variant="ghost"
|
|
41
|
+
display="compact"
|
|
42
|
+
icon={isDark ? Sun : Moon}
|
|
43
|
+
onClick={toggleTheme}
|
|
44
|
+
aria-label={isDark ? 'Switch to light theme' : 'Switch to dark theme'}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// apps/demo/src/main.tsx
|
|
2
|
+
|
|
3
|
+
import './globals.css';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ReactDOM from 'react-dom/client';
|
|
6
|
+
|
|
7
|
+
import { App } from './App';
|
|
8
|
+
|
|
9
|
+
const rootElement = document.getElementById('root');
|
|
10
|
+
if (!rootElement) {
|
|
11
|
+
throw new Error(
|
|
12
|
+
'Root element not found. Did you remove the root div from index.html?'
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Remove shell loader (fade out then remove)
|
|
17
|
+
const shellLoader = document.getElementById('shell-loader');
|
|
18
|
+
if (shellLoader) {
|
|
19
|
+
shellLoader.classList.add('shell-loader--fading');
|
|
20
|
+
window.setTimeout(() => shellLoader.remove(), 300);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ReactDOM.createRoot(rootElement).render(
|
|
24
|
+
<React.StrictMode>
|
|
25
|
+
<App />
|
|
26
|
+
</React.StrictMode>
|
|
27
|
+
);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// apps/demo/src/pages/DetailPage.tsx
|
|
2
|
+
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { useParams, Navigate } from 'react-router-dom';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
Badge,
|
|
8
|
+
Grid,
|
|
9
|
+
Stack,
|
|
10
|
+
Text,
|
|
11
|
+
} from '@donotdev/components';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
COMPONENT_CONFIGS,
|
|
15
|
+
getCSSFamilies,
|
|
16
|
+
type ComponentConfig,
|
|
17
|
+
} from './components/componentConfig';
|
|
18
|
+
import { ComponentRenderer } from './components/ComponentRenderer';
|
|
19
|
+
|
|
20
|
+
export default function DetailPage() {
|
|
21
|
+
const { id } = useParams<{ id: string }>();
|
|
22
|
+
|
|
23
|
+
const config = useMemo(() => {
|
|
24
|
+
return COMPONENT_CONFIGS.find((c) => c.id === id);
|
|
25
|
+
}, [id]);
|
|
26
|
+
|
|
27
|
+
const cssFamilies = getCSSFamilies();
|
|
28
|
+
|
|
29
|
+
if (!config) {
|
|
30
|
+
return <Navigate to="/" replace />;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const generateVariants = (
|
|
34
|
+
config: ComponentConfig
|
|
35
|
+
): Array<Record<string, any>> => {
|
|
36
|
+
const variants: Array<Record<string, any>> = [{}];
|
|
37
|
+
|
|
38
|
+
const dimensions = ['variant', 'size', 'tone', 'type', 'side', 'mode'] as const;
|
|
39
|
+
|
|
40
|
+
dimensions.forEach((dim) => {
|
|
41
|
+
const values = config.variants[dim];
|
|
42
|
+
if (values?.length) {
|
|
43
|
+
const newVariants: Array<Record<string, any>> = [];
|
|
44
|
+
variants.forEach((base) => {
|
|
45
|
+
values.forEach((value) => {
|
|
46
|
+
newVariants.push({ ...base, [dim]: value });
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
variants.length = 0;
|
|
50
|
+
variants.push(...newVariants);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return variants.length > 0 ? variants : [{}];
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const allVariants = generateVariants(config);
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Stack gap="large" align="center">
|
|
61
|
+
<Stack gap="tight" align="center">
|
|
62
|
+
<Text level="h2">
|
|
63
|
+
{config.name}
|
|
64
|
+
</Text>
|
|
65
|
+
<Badge variant="outline">
|
|
66
|
+
{cssFamilies.find((f) => f.id === config.cssFamily)?.label || config.cssFamily}
|
|
67
|
+
</Badge>
|
|
68
|
+
</Stack>
|
|
69
|
+
|
|
70
|
+
<Grid
|
|
71
|
+
cols="auto-fit"
|
|
72
|
+
minColWidth="320px"
|
|
73
|
+
gap="large"
|
|
74
|
+
>
|
|
75
|
+
{allVariants.map((variantProps, idx) => {
|
|
76
|
+
const variantLabels = Object.entries(variantProps)
|
|
77
|
+
.filter(([_, v]) => v)
|
|
78
|
+
.map(([k, v]) => `${k}: ${v}`);
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Stack key={idx} gap="medium" align="center">
|
|
82
|
+
{variantLabels.length > 0 && (
|
|
83
|
+
<Stack direction="row" gap="tight" wrap="wrap" justify="center">
|
|
84
|
+
{variantLabels.map((label) => (
|
|
85
|
+
<Badge key={label} variant="secondary">
|
|
86
|
+
{label}
|
|
87
|
+
</Badge>
|
|
88
|
+
))}
|
|
89
|
+
</Stack>
|
|
90
|
+
)}
|
|
91
|
+
<Stack align="center" justify="center">
|
|
92
|
+
<ComponentRenderer
|
|
93
|
+
config={config}
|
|
94
|
+
variantProps={variantProps}
|
|
95
|
+
/>
|
|
96
|
+
</Stack>
|
|
97
|
+
</Stack>
|
|
98
|
+
);
|
|
99
|
+
})}
|
|
100
|
+
</Grid>
|
|
101
|
+
</Stack>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// apps/demo/src/pages/FullPage.tsx
|
|
2
|
+
|
|
3
|
+
import { Rocket, ExternalLink } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Button,
|
|
7
|
+
CallToAction,
|
|
8
|
+
Card,
|
|
9
|
+
Code,
|
|
10
|
+
Grid,
|
|
11
|
+
GridArea,
|
|
12
|
+
HeroSection,
|
|
13
|
+
Section,
|
|
14
|
+
Stack,
|
|
15
|
+
Text,
|
|
16
|
+
} from '@donotdev/components';
|
|
17
|
+
|
|
18
|
+
export default function FullPage() {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<HeroSection
|
|
22
|
+
title="Fullwidht hero section with gradient text"
|
|
23
|
+
subtitle="This page displays the Sections, Grid, GridArea, Stack and CallToAction layout components that are meant to wrap the other compoennts."
|
|
24
|
+
badge="This is HeroSection Component"
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
<Section
|
|
28
|
+
title="Grid + GridArea Components"
|
|
29
|
+
subtitle="CSS Grid layout with named areas. GridArea components map to grid template areas. Full-width container."
|
|
30
|
+
>
|
|
31
|
+
<Card variant="muted" title="Grid Layout Example">
|
|
32
|
+
<Code language="tsx" showLineNumbers={false}>
|
|
33
|
+
{`<Grid
|
|
34
|
+
areas={\`"header header header"
|
|
35
|
+
"main main sidebar"
|
|
36
|
+
"footer footer footer"\`}
|
|
37
|
+
templateColumns="1fr 3fr 1fr"
|
|
38
|
+
gap="none"
|
|
39
|
+
>
|
|
40
|
+
{/* Children */}
|
|
41
|
+
</Grid>`}
|
|
42
|
+
</Code>
|
|
43
|
+
</Card>
|
|
44
|
+
<Grid
|
|
45
|
+
areas={`"header header header"
|
|
46
|
+
"main main sidebar"
|
|
47
|
+
"footer footer footer"`}
|
|
48
|
+
templateColumns="1fr 3fr 1fr"
|
|
49
|
+
gap="none"
|
|
50
|
+
>
|
|
51
|
+
<GridArea as="header" name="header">
|
|
52
|
+
<Section tone="muted" title="Header Area">
|
|
53
|
+
<Text variant="muted">Header content (as="header")</Text>
|
|
54
|
+
</Section>
|
|
55
|
+
</GridArea>
|
|
56
|
+
<GridArea as="section" name="main">
|
|
57
|
+
<Section title="Main Content Area">
|
|
58
|
+
<Text variant="muted">Main content (as="section")</Text>
|
|
59
|
+
</Section>
|
|
60
|
+
</GridArea>
|
|
61
|
+
<GridArea as="aside" name="sidebar">
|
|
62
|
+
<Section tone="muted" title="Sidebar Area">
|
|
63
|
+
<Text variant="muted">Sidebar content (as="aside")</Text>
|
|
64
|
+
</Section>
|
|
65
|
+
</GridArea>
|
|
66
|
+
<GridArea as="footer" name="footer">
|
|
67
|
+
<Section tone="muted" title="Footer Area">
|
|
68
|
+
<Text variant="muted">Footer content (as="footer")</Text>
|
|
69
|
+
</Section>
|
|
70
|
+
</GridArea>
|
|
71
|
+
</Grid>
|
|
72
|
+
</Section>
|
|
73
|
+
|
|
74
|
+
<Section
|
|
75
|
+
title="Stack Component"
|
|
76
|
+
subtitle="Flexbox layout component. Full-width container."
|
|
77
|
+
>
|
|
78
|
+
<Card variant="muted" title="Stack Layout Example">
|
|
79
|
+
<Text variant="muted">
|
|
80
|
+
Stack creates flex containers. Use direction="row" for horizontal,
|
|
81
|
+
default is vertical. Gap controls spacing between items.
|
|
82
|
+
</Text>
|
|
83
|
+
</Card>
|
|
84
|
+
<Stack gap="medium">
|
|
85
|
+
<Card variant="muted" title="Stack Item 1">
|
|
86
|
+
<Text variant="muted">Vertical stack with gap="medium"</Text>
|
|
87
|
+
</Card>
|
|
88
|
+
<Card variant="muted" title="Stack Item 2">
|
|
89
|
+
<Text variant="muted">Items stack vertically by default</Text>
|
|
90
|
+
</Card>
|
|
91
|
+
<Stack direction="row" gap="medium">
|
|
92
|
+
<Card variant="muted" title="Row Item 1">
|
|
93
|
+
<Text variant="muted">Horizontal stack</Text>
|
|
94
|
+
</Card>
|
|
95
|
+
<Card variant="muted" title="Row Item 2">
|
|
96
|
+
<Text variant="muted">direction="row"</Text>
|
|
97
|
+
</Card>
|
|
98
|
+
</Stack>
|
|
99
|
+
</Stack>
|
|
100
|
+
</Section>
|
|
101
|
+
|
|
102
|
+
<CallToAction
|
|
103
|
+
title="CallToAction Component"
|
|
104
|
+
subtitle="Full-width CTA section with gradient background. Constrained by --content-width, centered. Use for conversion sections."
|
|
105
|
+
primaryAction={
|
|
106
|
+
<Button
|
|
107
|
+
variant="primary"
|
|
108
|
+
fullWidth
|
|
109
|
+
icon={ExternalLink}
|
|
110
|
+
iconEnd
|
|
111
|
+
tooltip="https://donotdev.com/purchase"
|
|
112
|
+
onClick={() =>
|
|
113
|
+
window.open(
|
|
114
|
+
'https://donotdev.com/purchase',
|
|
115
|
+
'_blank',
|
|
116
|
+
'noopener,noreferrer'
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
>
|
|
120
|
+
Get Full Framework
|
|
121
|
+
</Button>
|
|
122
|
+
}
|
|
123
|
+
secondaryAction={
|
|
124
|
+
|
|
125
|
+
<Button
|
|
126
|
+
variant="outline"
|
|
127
|
+
icon={ExternalLink}
|
|
128
|
+
iconEnd
|
|
129
|
+
fullWidth
|
|
130
|
+
onClick={() =>
|
|
131
|
+
window.open('https://donotdev.com', '_blank', 'noopener,noreferrer')
|
|
132
|
+
}
|
|
133
|
+
tooltip="https://donotdev.com"
|
|
134
|
+
>
|
|
135
|
+
Check it more online
|
|
136
|
+
</Button>
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
</>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|