@donotdev/cli 0.1.0 → 0.1.42
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 +1 -1
- package/README.md +0 -0
- package/dependencies-matrix.json +175 -72
- package/dist/bin/commands/agent-setup.js +936 -428
- package/dist/bin/commands/build.js +4363 -883
- package/dist/bin/commands/bump.js +1296 -780
- package/dist/bin/commands/cacheout.js +494 -363
- package/dist/bin/commands/coach.js +632 -431
- package/dist/bin/commands/create-app.js +1316 -799
- package/dist/bin/commands/create-project.js +1355 -827
- package/dist/bin/commands/db.js +26158 -18868
- package/dist/bin/commands/deploy.js +5983 -1971
- package/dist/bin/commands/dev.js +1223 -657
- package/dist/bin/commands/doctor.js +1100 -528
- package/dist/bin/commands/emu.js +1380 -757
- package/dist/bin/commands/format.js +494 -363
- package/dist/bin/commands/get-demo.js +1210 -715
- package/dist/bin/commands/make-admin.js +16073 -8700
- package/dist/bin/commands/preview.js +1227 -658
- package/dist/bin/commands/seed.js +26171 -18881
- package/dist/bin/commands/setup-cicd.js +1475 -880
- package/dist/bin/commands/setup.js +1574 -956
- package/dist/bin/commands/staging.js +5984 -1972
- package/dist/bin/commands/sync-secrets.js +1423 -676
- package/dist/bin/commands/type-check.js +976 -469
- package/dist/bin/commands/wai.js +499 -368
- package/dist/bin/dndev.js +43 -19
- package/dist/bin/donotdev.js +43 -19
- package/dist/index.js +6166 -2133
- package/guidelines/DEPENDENCIES.md +155 -0
- package/{templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example → guidelines/VERSION_CONTROL.md} +7 -11
- package/package.json +2 -1
- package/templates/app-demo/.env.example +1 -1
- package/templates/app-demo/entities/Contact.ts.example +0 -0
- package/templates/app-demo/entities/ExampleEntity.ts.example +0 -0
- package/templates/app-demo/entities/demo.ts.example +0 -0
- package/templates/app-demo/index.html.example +0 -0
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/fonts/fonts.css.example +0 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +0 -0
- package/templates/app-demo/src/config/app.ts.example +0 -0
- package/templates/app-demo/src/entities/booking.ts.example +0 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +0 -0
- package/templates/app-demo/src/entities/product.ts.example +0 -0
- package/templates/app-demo/src/entities/quote.ts.example +0 -0
- package/templates/app-demo/src/globals.css.example +0 -0
- package/templates/app-demo/src/main.tsx.example +0 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +0 -0
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +0 -0
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-demo/src/themes.css.example +27 -0
- package/templates/app-demo/tsconfig.json.example +0 -0
- package/templates/app-demo/vite.config.ts.example +0 -0
- package/templates/app-dndev/index.html.example +0 -3
- package/templates/app-dndev/src/App.tsx.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +0 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +0 -0
- package/templates/app-dndev/src/components/Kanban.css.example +0 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +0 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +0 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +0 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +0 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +0 -0
- package/templates/app-dndev/src/config/app.ts.example +0 -0
- package/templates/app-dndev/src/config/commands.ts.example +0 -0
- package/templates/app-dndev/src/config/legal.ts.example +0 -0
- package/templates/app-dndev/src/config/providers.ts.example +1 -1
- package/templates/app-dndev/src/globals.css.example +0 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +0 -0
- package/templates/app-dndev/src/main.tsx.example +0 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +0 -0
- package/templates/app-dndev/src/themes.css.example +26 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +0 -0
- package/templates/app-dndev/vite.config.ts.example +0 -0
- package/templates/app-expo/.env.example +0 -32
- package/templates/app-expo/.expo/README.md.example +0 -0
- package/templates/app-expo/.gitignore.example +0 -0
- package/templates/app-expo/README.md.example +1 -1
- package/templates/app-expo/app/.gitkeep +0 -0
- package/templates/app-expo/app/_layout.tsx.example +0 -0
- package/templates/app-expo/app/form.tsx.example +0 -0
- package/templates/app-expo/app/index.tsx.example +0 -0
- package/templates/app-expo/app/list.tsx.example +0 -0
- package/templates/app-expo/app/profile.tsx.example +0 -0
- package/templates/app-expo/app/signin.tsx.example +0 -0
- package/templates/app-expo/app.json.example +0 -0
- package/templates/app-expo/assets/adaptive-icon.png +0 -0
- package/templates/app-expo/assets/favicon.png +0 -0
- package/templates/app-expo/assets/icon.png +0 -0
- package/templates/app-expo/assets/splash.png +0 -0
- package/templates/app-expo/babel.config.js.example +0 -0
- package/templates/app-expo/eas.json.example +0 -0
- package/templates/app-expo/expo-env.d.ts.example +0 -0
- package/templates/app-expo/metro.config.js.example +0 -0
- package/templates/app-expo/service-account-key.json.example +1 -1
- package/templates/app-expo/src/config/app.ts.example +0 -0
- package/templates/app-expo/src/config/providers.ts.example +1 -1
- package/templates/app-expo/tsconfig.json.example +0 -0
- package/templates/app-next/.env.example +0 -33
- package/templates/app-next/next.config.ts.example +0 -2
- package/templates/app-next/postcss.config.js.example +0 -0
- package/templates/app-next/service-account-key.json.example +0 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +0 -0
- package/templates/app-next/src/app/layout.tsx.example +13 -4
- package/templates/app-next/src/app/not-found.tsx.example +0 -0
- package/templates/app-next/src/config/app.ts.example +0 -0
- package/templates/app-next/src/config/legal.ts.example +0 -0
- package/templates/app-next/src/config/providers.ts.example +1 -1
- package/templates/app-next/src/globals.css.example +0 -0
- package/templates/app-next/src/locales/dndev_en.json.example +0 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-next/src/pages/HomePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-next/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-next/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-next/src/themes.css.example +28 -1
- package/templates/app-vite/.env.example +0 -33
- package/templates/app-vite/csp.example.json +44 -0
- package/templates/app-vite/index.html.example +0 -3
- package/templates/app-vite/service-account-key.json.example +0 -0
- package/templates/app-vite/src/App.tsx.example +0 -0
- package/templates/app-vite/src/config/app.ts.example +0 -0
- package/templates/app-vite/src/config/legal.ts.example +0 -0
- package/templates/app-vite/src/config/providers.ts.example +1 -1
- package/templates/app-vite/src/globals.css.example +0 -0
- package/templates/app-vite/src/locales/dndev_en.json.example +0 -0
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/main.tsx.example +0 -0
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +0 -0
- package/templates/app-vite/src/pages/NotFoundPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +0 -0
- package/templates/app-vite/src/pages/locales/example_en.json.example +0 -0
- package/templates/app-vite/src/themes.css.example +26 -0
- package/templates/deploy-config/.firebaserc.example +0 -0
- package/templates/deploy-config/firestore.indexes.json.example +0 -0
- package/templates/deploy-config/firestore.rules.example +0 -0
- package/templates/deploy-config/storage.rules.example +0 -0
- package/templates/deploy-config/tsconfig.functions.json.example +0 -0
- package/templates/deploy-config/vercel.json.example +2 -2
- package/templates/functions-firebase/.env.example +2 -2
- package/templates/functions-firebase/README.md.example +3 -3
- package/templates/functions-firebase/build.mjs.example +0 -0
- package/templates/functions-firebase/functions.config.js.example +0 -0
- package/templates/functions-firebase/functions.yaml.example +0 -0
- package/templates/functions-firebase/src/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-firebase/src/auth/index.ts.example +0 -0
- package/templates/functions-firebase/src/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-firebase/src/billing/index.ts.example +0 -0
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-firebase/src/crud/createEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/getEntity.ts.example +0 -0
- package/templates/functions-firebase/src/crud/index.ts.example +0 -0
- package/templates/functions-firebase/src/crud/listEntities.ts.example +0 -0
- package/templates/functions-firebase/src/crud/updateEntity.ts.example +0 -0
- package/templates/functions-firebase/src/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/disconnect.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/getConnections.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/index.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-firebase/src/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-firebase/tsconfig.json.example +0 -0
- package/templates/functions-supabase/supabase/config.toml.example +0 -0
- package/templates/functions-supabase/supabase/functions/.env.example +0 -0
- package/templates/functions-supabase/supabase/functions/cancel-subscription/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/create-customer-portal/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/crud/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/delete-account/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/deno.json.example +0 -0
- package/templates/functions-supabase/supabase/functions/disconnect-oauth/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/exchange-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-connections/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/get-user-auth-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-subscription-status/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/refresh-token/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/remove-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/functions/set-custom-claims/index.ts.example +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000000_idempotency.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000001_rate_limits.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000002_cleanup_jobs.sql +0 -0
- package/templates/functions-supabase/supabase/migrations/20250101000003_operation_metrics.sql +3 -0
- package/templates/functions-supabase/supabase/migrations/20250101000004_crud_bulk.sql +192 -0
- package/templates/functions-vercel/.env.example +3 -3
- package/templates/functions-vercel/README.md.example +2 -2
- package/templates/functions-vercel/build.mjs.example +0 -0
- package/templates/functions-vercel/src/api/auth/getCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/getUserAuthStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/removeCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/createEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/deleteEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/getEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/listEntities.ts.example +0 -0
- package/templates/functions-vercel/src/api/crud/updateEntity.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -0
- package/templates/functions-vercel/src/api/oauth/revokeGitHubAccess.ts.example +0 -0
- package/templates/functions-vercel/tsconfig.json.example +0 -0
- package/templates/functions-vercel/vercel.json.example +0 -0
- package/templates/github-consumer/.github/workflows/ci.yml.example +0 -0
- package/templates/overlay-firebase/env.fragment.example +0 -0
- package/templates/overlay-firebase/env.fragment.expo.example +0 -0
- package/templates/overlay-firebase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-firebase/src/config/providers.expo.ts.example +0 -0
- package/templates/overlay-firebase/src/config/providers.ts.example +0 -0
- package/templates/overlay-supabase/env.fragment.example +0 -0
- package/templates/overlay-supabase/env.fragment.expo.example +0 -0
- package/templates/overlay-supabase/env.fragment.nextjs.example +0 -0
- package/templates/overlay-supabase/src/config/providers.expo.ts.example +1 -1
- package/templates/overlay-supabase/src/config/providers.ts.example +1 -1
- package/templates/overlay-vercel/env.fragment.example +0 -0
- package/templates/overlay-vercel/env.fragment.nextjs.example +0 -0
- package/templates/overlay-vercel/src/config/providers.ts.example +0 -0
- package/templates/preset-admin/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/EntityPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/ReportsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/preset-admin/src/pages/UsersPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/AboutPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/ContactPage.tsx.example +0 -0
- package/templates/preset-landing/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/DashboardPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/HomePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/PricingPage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/ProfilePage.tsx.example +0 -0
- package/templates/preset-saas/src/pages/SettingsPage.tsx.example +0 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +0 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +0 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +0 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +0 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +0 -0
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +61 -0
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +56 -0
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +50 -0
- package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +18 -0
- package/templates/root-consumer/.claude/rules/consumer-ux.md.example +32 -0
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +32 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +39 -0
- package/templates/root-consumer/.claude/rules/git.md.example +14 -0
- package/templates/root-consumer/.claude/rules/security.md.example +13 -0
- package/templates/root-consumer/.claude/settings.json.example +100 -4
- package/templates/root-consumer/.claude/skills/brainstorm/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/build/SKILL.md.example +22 -27
- package/templates/root-consumer/.claude/skills/design/SKILL.md.example +0 -0
- package/templates/root-consumer/.claude/skills/design/output-template.md +0 -0
- package/templates/root-consumer/.claude/skills/grill/SKILL.md.example +26 -15
- package/templates/root-consumer/.claude/skills/polish/SKILL.md.example +50 -37
- package/templates/root-consumer/.claude/skills/techdebt/SKILL.md.example +0 -0
- package/templates/root-consumer/.cursor/mcp.json.example +0 -0
- package/templates/root-consumer/.cursor/rules/no-docs.mdc.example +5 -1
- package/templates/root-consumer/.dndev/args.json.example +0 -0
- package/templates/root-consumer/.dndev.secrets.example +0 -0
- package/templates/root-consumer/.env.example +0 -1
- package/templates/root-consumer/.gemini/settings.json.example +0 -0
- package/templates/root-consumer/.gitignore.example +1 -0
- package/templates/root-consumer/.mcp.json.example +0 -0
- package/templates/root-consumer/.prettierrc.cjs.example +0 -0
- package/templates/root-consumer/AGENTS.md.example +63 -0
- package/templates/root-consumer/CLAUDE.md.example +1 -1
- package/templates/root-consumer/README.md.example +11 -33
- package/templates/root-consumer/entities/index.ts.example +0 -0
- package/templates/root-consumer/eslint.config.js.example +0 -0
- package/templates/root-consumer/tsconfig.json.example +0 -0
- package/templates/app-demo/public/manifest.json.example +0 -10
- package/templates/app-dndev/public/manifest.json.example +0 -10
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +0 -175
- package/templates/root-consumer/.claude/commands/build.md.example +0 -131
- package/templates/root-consumer/.claude/commands/design.md.example +0 -184
- package/templates/root-consumer/.claude/commands/grill.md.example +0 -135
- package/templates/root-consumer/.claude/commands/polish.md.example +0 -146
- package/templates/root-consumer/.claude/commands/techdebt.md.example +0 -28
- package/templates/root-consumer/.claude/statusline.py.example +0 -79
- package/templates/root-consumer/.clinerules.example +0 -1
- package/templates/root-consumer/.cursorrules.example +0 -1
- package/templates/root-consumer/.github/copilot-instructions.md.example +0 -1
- package/templates/root-consumer/.windsurfrules.example +0 -1
- package/templates/root-consumer/AI.md.example +0 -108
- package/templates/root-consumer/CONVENTIONS.md.example +0 -1
- package/templates/root-consumer/GEMINI.md.example +0 -1
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +0 -135
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +0 -276
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +0 -180
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +0 -234
- package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +0 -136
- package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +0 -195
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +0 -219
- package/templates/root-consumer/guides/dndev/GOTCHAS.md.example +0 -197
- package/templates/root-consumer/guides/dndev/INDEX.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +0 -132
- package/templates/root-consumer/guides/dndev/SETUP_AUTH.md.example +0 -133
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +0 -114
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +0 -280
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +0 -115
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +0 -334
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +0 -231
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +0 -9
- package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +0 -233
- package/templates/root-consumer/guides/dndev/SETUP_LAYOUTS.md.example +0 -158
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH.md.example +0 -54
- package/templates/root-consumer/guides/dndev/SETUP_OAUTH_PROVIDERS.md.example +0 -60
- package/templates/root-consumer/guides/dndev/SETUP_PAGES.md.example +0 -205
- package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +0 -213
- package/templates/root-consumer/guides/dndev/SETUP_SOC2.md.example +0 -234
- package/templates/root-consumer/guides/dndev/SETUP_STRIPE.md.example +0 -62
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +0 -215
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +0 -184
- package/templates/root-consumer/guides/dndev/SETUP_THEMES.md.example +0 -111
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +0 -260
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +0 -499
- package/templates/root-consumer/guides/dndev/advanced/APP_CHECK.md.example +0 -111
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +0 -252
- package/templates/root-consumer/guides/dndev/advanced/EMULATORS.md.example +0 -48
- package/templates/root-consumer/guides/dndev/essences_reference.css.example +0 -288
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +0 -402
- package/templates/root-consumer/guides/wai-way/agents/architect.md.example +0 -78
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +0 -97
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +0 -363
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +0 -315
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +0 -133
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +0 -111
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +0 -150
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +0 -238
- package/templates/root-consumer/guides/wai-way/context_map.json.example +0 -127
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +0 -839
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +0 -138
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +0 -103
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +0 -722
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +0 -140
- package/templates/root-consumer/guides/wai-way/presets_guide.md.example +0 -217
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +0 -313
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
# Advanced Components (@donotdev/components)
|
|
2
|
-
|
|
3
|
-
High-level, opinionated, and marketing-focused UI components from `@donotdev/components`.
|
|
4
|
-
|
|
5
|
-
All advanced components are included in `@donotdev/components` — no additional package needed.
|
|
6
|
-
Styles are automatically included via `@donotdev/components/styles`.
|
|
7
|
-
|
|
8
|
-
## Components
|
|
9
|
-
|
|
10
|
-
### Crawl
|
|
11
|
-
|
|
12
|
-
Cinematic 3D text crawl component with lazy loading.
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
import { Crawl } from '@donotdev/components';
|
|
16
|
-
|
|
17
|
-
<Crawl
|
|
18
|
-
intro?: ReactNode | string
|
|
19
|
-
title?: ReactNode | string
|
|
20
|
-
content: ReactNode | string | string[]
|
|
21
|
-
duration?: number // @default 26
|
|
22
|
-
contentHeight?: string // @default "150vh"
|
|
23
|
-
tiltAngle?: number
|
|
24
|
-
className?: string
|
|
25
|
-
style?: CSSProperties
|
|
26
|
-
aria-label?: string
|
|
27
|
-
/>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Marquee
|
|
31
|
-
|
|
32
|
-
Production-grade marquee with accessibility, reduced motion support, and smart behavior detection.
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import { Marquee } from '@donotdev/components';
|
|
36
|
-
|
|
37
|
-
<Marquee<T>
|
|
38
|
-
items: T[]
|
|
39
|
-
renderItem: (item: T, index: number) => ReactNode
|
|
40
|
-
className?: string
|
|
41
|
-
itemClassName?: string
|
|
42
|
-
gap?: 'none' | 'tight' | 'medium' | 'large' // @default 'medium'
|
|
43
|
-
speed?: number // px per second
|
|
44
|
-
direction?: 'left' | 'right' | 'up' | 'down' | 'auto' // @default 'auto'
|
|
45
|
-
pauseOnHover?: boolean
|
|
46
|
-
ariaLabel?: string
|
|
47
|
-
reducedMotion?: 'respect' | 'ignore'
|
|
48
|
-
behavior?: 'bounce' | 'infinite' | 'auto'
|
|
49
|
-
pauseOnFocusWithin?: boolean
|
|
50
|
-
easing?: 'linear' | 'ease-in-out' | 'ease-out'
|
|
51
|
-
/>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Roadmap
|
|
55
|
-
|
|
56
|
-
Timeline component with horizontal (desktop) / vertical (mobile) layout. Features animated progress line, glowing nodes, and lift-on-hover cards.
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { Roadmap } from '@donotdev/components';
|
|
60
|
-
import type { RoadmapStep } from '@donotdev/components';
|
|
61
|
-
|
|
62
|
-
<Roadmap
|
|
63
|
-
steps: RoadmapStep[]
|
|
64
|
-
className?: string
|
|
65
|
-
variant?: CardVariant // @default 'default'
|
|
66
|
-
/>
|
|
67
|
-
|
|
68
|
-
// RoadmapStep interface:
|
|
69
|
-
interface RoadmapStep {
|
|
70
|
-
phase: string // e.g., "Week 1", "Days 1-2"
|
|
71
|
-
icon: LucideIcon
|
|
72
|
-
title: string
|
|
73
|
-
subtitle: string
|
|
74
|
-
description?: string
|
|
75
|
-
content?: CardContent // Optional content shown in popover on click
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### StackedCards
|
|
80
|
-
|
|
81
|
-
Simple scroll-reveal stacked cards. Active card shows full content, stacked cards show only bottom edge with number.
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { StackedCards } from '@donotdev/components';
|
|
85
|
-
import type { StackedCardData } from '@donotdev/components';
|
|
86
|
-
|
|
87
|
-
<StackedCards
|
|
88
|
-
items: StackedCardData[]
|
|
89
|
-
variant?: SurfaceVariantProps['variant']
|
|
90
|
-
ariaLabel?: string
|
|
91
|
-
threshold?: number // Intersection threshold (0.0 - 1.0) @default 0.3
|
|
92
|
-
className?: string
|
|
93
|
-
style?: CSSProperties
|
|
94
|
-
/>
|
|
95
|
-
|
|
96
|
-
// StackedCardData extends ComponentData with:
|
|
97
|
-
interface StackedCardData extends ComponentData {
|
|
98
|
-
number?: string | number // Custom number/label (e.g. "01", "Week 1"). Defaults to index.
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Reveal
|
|
103
|
-
|
|
104
|
-
Reveal component for staggered animations. Features viewport-based visibility detection, directional animations, and customizable stagger delays.
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import { Reveal } from '@donotdev/components';
|
|
108
|
-
|
|
109
|
-
<Reveal
|
|
110
|
-
items: string[] | ReactNode[]
|
|
111
|
-
direction?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' | 'alternate-h' | 'alternate-v'
|
|
112
|
-
stagger?: number // milliseconds between items
|
|
113
|
-
threshold?: number
|
|
114
|
-
distance?: number // animation distance in pixels
|
|
115
|
-
duration?: number // animation duration in milliseconds
|
|
116
|
-
once?: boolean // if true, only animate once
|
|
117
|
-
viewport?: boolean // if true, only animate items in viewport
|
|
118
|
-
overrides?: Array<{
|
|
119
|
-
index: number
|
|
120
|
-
direction: 'left' | 'right' | 'top' | 'bottom' | 'fade-in'
|
|
121
|
-
}>
|
|
122
|
-
className?: string
|
|
123
|
-
children?: ReactNode
|
|
124
|
-
/>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Carousel
|
|
128
|
-
|
|
129
|
-
Premium carousel component with lazy loading built-in. Features true infinite circular loop, hardware-accelerated animations, swipe/touch gestures, and autoplay with pause-on-hover.
|
|
130
|
-
|
|
131
|
-
```tsx
|
|
132
|
-
import { Carousel } from '@donotdev/components';
|
|
133
|
-
import type { CarouselProps, CarouselRef } from '@donotdev/components';
|
|
134
|
-
|
|
135
|
-
<Carousel<T>
|
|
136
|
-
items: T[]
|
|
137
|
-
renderItem: (item: T, index: number, isActive: boolean) => ReactNode
|
|
138
|
-
className?: string
|
|
139
|
-
slideClassName?: string
|
|
140
|
-
showArrows?: boolean
|
|
141
|
-
showDots?: boolean
|
|
142
|
-
showProgress?: boolean
|
|
143
|
-
autoplay?: boolean
|
|
144
|
-
autoplayInterval?: number // milliseconds
|
|
145
|
-
transitionDuration?: number // milliseconds
|
|
146
|
-
loop?: boolean
|
|
147
|
-
// ... and more props
|
|
148
|
-
/>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### SplitReveal
|
|
152
|
-
|
|
153
|
-
Split reveal component for displaying content in two columns. Features left column content and right column stat cards or custom content with reveal animations.
|
|
154
|
-
|
|
155
|
-
```tsx
|
|
156
|
-
import { SplitReveal } from '@donotdev/components';
|
|
157
|
-
import type { StatCardData } from '@donotdev/components';
|
|
158
|
-
|
|
159
|
-
<SplitReveal
|
|
160
|
-
left: ReactNode
|
|
161
|
-
right: ReactNode | StatCardData[]
|
|
162
|
-
leftDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'left'
|
|
163
|
-
rightDirection?: 'left' | 'right' | 'top' | 'bottom' | 'fade-in' // @default 'right'
|
|
164
|
-
threshold?: number // @default 0.3
|
|
165
|
-
className?: string
|
|
166
|
-
/>
|
|
167
|
-
|
|
168
|
-
// StatCardData interface:
|
|
169
|
-
interface StatCardData {
|
|
170
|
-
title: string
|
|
171
|
-
description: string
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
## Notes
|
|
176
|
-
|
|
177
|
-
- All components are lazy-loaded by default for optimal performance
|
|
178
|
-
- Components use framework theme variables for consistent styling
|
|
179
|
-
- Most components support reduced motion preferences
|
|
180
|
-
- All components are SSR-safe and work with both Vite and Next.js
|
|
181
|
-
|
|
182
|
-
## FAQSection (from @donotdev/core)
|
|
183
|
-
|
|
184
|
-
FAQ section component for displaying frequently asked questions using accordion. Reads FAQ items from i18n JSON files.
|
|
185
|
-
|
|
186
|
-
**Note:** This component is from `@donotdev/core`, not `@donotdev/components`. It requires i18n setup with translation files.
|
|
187
|
-
|
|
188
|
-
```tsx
|
|
189
|
-
import { FAQSection, useTranslation } from '@donotdev/core';
|
|
190
|
-
import { Section } from '@donotdev/components';
|
|
191
|
-
|
|
192
|
-
function FAQPage() {
|
|
193
|
-
const { t } = useTranslation(['faq']);
|
|
194
|
-
|
|
195
|
-
return (
|
|
196
|
-
<Section>
|
|
197
|
-
<FAQSection t={t} keyPrefix="faqs.items" maxIndex={50} />
|
|
198
|
-
</Section>
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Props:**
|
|
204
|
-
- `t: TFunction` - Translation function from `useTranslation` hook
|
|
205
|
-
- `keyPrefix: string` - Base key prefix for FAQ items (e.g., `'faqs.items'`)
|
|
206
|
-
- `maxIndex?: number` - Maximum number of FAQ items to check (default: 50)
|
|
207
|
-
- `className?: string` - CSS class for container
|
|
208
|
-
- `itemClassName?: string` - CSS class for each accordion item
|
|
209
|
-
- `aria-label?: string` - ARIA label for accessibility (default: 'Frequently Asked Questions')
|
|
210
|
-
|
|
211
|
-
**JSON Structure:**
|
|
212
|
-
|
|
213
|
-
FAQ items must be in your i18n JSON files with this structure:
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"faqs": {
|
|
218
|
-
"items": [
|
|
219
|
-
{
|
|
220
|
-
"q": "Question text",
|
|
221
|
-
"a": "Answer text"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"q": "Another question",
|
|
225
|
-
"a": "Another answer"
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
The component uses `translateObjectArray` to automatically load all items from `keyPrefix` (e.g., `faqs.items[0]`, `faqs.items[1]`, etc.) up to `maxIndex`.
|
|
233
|
-
|
|
234
|
-
**Example:**
|
|
235
|
-
|
|
236
|
-
```tsx
|
|
237
|
-
// src/pages/FAQPage.tsx
|
|
238
|
-
import { FAQSection, useTranslation } from '@donotdev/core';
|
|
239
|
-
import { HeroSection, Section } from '@donotdev/components';
|
|
240
|
-
import { PageContainer } from '@donotdev/ui';
|
|
241
|
-
|
|
242
|
-
export const NAMESPACE = 'faq';
|
|
243
|
-
|
|
244
|
-
function FAQPage() {
|
|
245
|
-
const { t } = useTranslation([NAMESPACE]);
|
|
246
|
-
|
|
247
|
-
return (
|
|
248
|
-
<PageContainer variant="docs">
|
|
249
|
-
<HeroSection title={t('title')} subtitle={t('subtitle')} />
|
|
250
|
-
<Section>
|
|
251
|
-
<FAQSection t={t} keyPrefix="faqs.items" maxIndex={50} />
|
|
252
|
-
</Section>
|
|
253
|
-
</PageContainer>
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
```json
|
|
259
|
-
// src/pages/locales/faq_en.json
|
|
260
|
-
{
|
|
261
|
-
"title": "Frequently Asked Questions",
|
|
262
|
-
"subtitle": "Everything you need to know.",
|
|
263
|
-
"faqs": {
|
|
264
|
-
"items": [
|
|
265
|
-
{
|
|
266
|
-
"q": "How long does the free trial last?",
|
|
267
|
-
"a": "There is no limit. You can use the framework packages indefinitely for development and local testing."
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"q": "What is the watermark?",
|
|
271
|
-
"a": "The watermark is a floating button that appears when running applications without a valid license."
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
```
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
# Component Reference
|
|
2
|
-
|
|
3
|
-
**Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
|
|
4
|
-
|
|
5
|
-
**Import from:** `@donotdev/components` (atomic UI)
|
|
6
|
-
|
|
7
|
-
**This is your GOTO Semantic React package**
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Layout Components
|
|
12
|
-
|
|
13
|
-
These are the only ways one should handle layout to get to quick results functionality wide.
|
|
14
|
-
- **Section** - Layout section with title, grid, tone system, and `bleed` prop for full-viewport-width content (images, maps, galleries).
|
|
15
|
-
- **Grid** - CSS Grid layout primitive with responsive column control.
|
|
16
|
-
- **Stack** - Flexbox layout for arranging items in rows or columns.
|
|
17
|
-
- **HeroSection** - Hero banner with title, subtitle, gradient backgrounds, `bleed` for full-width, and `backgroundImage` for cover images with overlay.
|
|
18
|
-
- **CallToAction** - Conversion-focused section with actions, `bleed` for full-width, and `backgroundImage` for cover images with overlay.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Content Components
|
|
23
|
-
|
|
24
|
-
- **Card** - Premium card component with title, content, footer, and elevation variants.
|
|
25
|
-
- **Navigation with middle-click support:** Wrap Card in Link component for navigation that supports middle-click (opens in new tab). See navigation section below.
|
|
26
|
-
- **DualCard** - Side-by-side card layout for comparison or feature showcases.
|
|
27
|
-
- **Text** - Typography component with semantic text variants.
|
|
28
|
-
- **Blockquote** - Styled blockquote for citations and testimonials.
|
|
29
|
-
- **List** - Bullet points, numbered lists, and feature lists with zero CSS. Use `icon` prop for custom icons, `icon={null}` for plain bullets.
|
|
30
|
-
- **DescriptionList** - Key-value pairs and metadata using semantic HTML (dl, dt, dd).
|
|
31
|
-
- **Separator** - Visual separator with semantic styling variants.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Action Components
|
|
36
|
-
|
|
37
|
-
- **Button** - Accessible button with variants, icons, tooltips, and render prop composition.
|
|
38
|
-
- **ActionButton** - Button with async action handling and loading states.
|
|
39
|
-
- **FileButton** - Button that triggers file input selection.
|
|
40
|
-
- **PortalButton** - Button that opens content in a portal overlay.
|
|
41
|
-
- **ButtonGroup** - Visual grouping of buttons with joined borders. Supports horizontal/vertical orientation, variant propagation, and items-based API.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Form Components
|
|
46
|
-
|
|
47
|
-
- **Input** - Accessible input with mobile-friendly touch targets and key state styling.
|
|
48
|
-
- **PasswordInput** - Password field with show/hide toggle functionality.
|
|
49
|
-
- **Textarea** - Multi-line text input component.
|
|
50
|
-
- **Label** - Accessible label with icon support and various positions.
|
|
51
|
-
- **Checkbox** - Accessible checkbox with custom styling.
|
|
52
|
-
- **RadioGroup** - Accessible radio group with multiple visual variants.
|
|
53
|
-
- **Select** - Accessible select dropdown with search and multi-select support.
|
|
54
|
-
- **Combobox** - Searchable combobox with autocomplete functionality.
|
|
55
|
-
- **Switch** - Toggle switch component.
|
|
56
|
-
- **Slider** - Range slider for numeric input.
|
|
57
|
-
- **ColorPicker** - Color selection with preset swatch grid, native color input, and ARIA radiogroup pattern. Built-in palettes: basic, material, pastel.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Feedback Components
|
|
62
|
-
|
|
63
|
-
- **Alert** - Attention-grabbing alert with semantic variants and icons.
|
|
64
|
-
- **AlertDialog** - Modal dialog that interrupts with important content expecting a response.
|
|
65
|
-
- **Dialog** - Accessible modal dialog with custom content sizes and actions.
|
|
66
|
-
- **Toast** - Toast notifications via Toaster component with ToastProvider.
|
|
67
|
-
- **Skeleton** - Loading state skeleton with multiple animation variants.
|
|
68
|
-
- **Spinner** - Loading spinner with multiple sizes and theme-aware colors.
|
|
69
|
-
- **Progress** - Progress bar component for task completion.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Navigation Components
|
|
74
|
-
|
|
75
|
-
- **Tabs** - Tabbed interface with props-based API and full keyboard navigation.
|
|
76
|
-
- **Accordion** - Vertically stacked headings that reveal content sections.
|
|
77
|
-
- **NavigationMenu** - Props-based navigation menu with nested menus and rich content.
|
|
78
|
-
- **Pagination** - Accessible pagination with page number generation and ellipsis.
|
|
79
|
-
- **Command** - Command palette component for keyboard navigation and search.
|
|
80
|
-
- **CommandDialog** - Command palette dialog optimized for Cmd+K navigation.
|
|
81
|
-
- **TreeView** - Hierarchical tree component with WAI-ARIA TreeView pattern. Supports expand/collapse, single/multi selection, keyboard navigation, type-ahead search, and connector lines.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Overlay Components
|
|
86
|
-
|
|
87
|
-
- **Popover** - Accessible popover displaying rich content in a portal.
|
|
88
|
-
- **Tooltip** - Tooltip component with positioning and delay controls.
|
|
89
|
-
- **HoverCard** - Card that appears on hover with rich content.
|
|
90
|
-
- **Sheet** - Slide-out panel for sidebars, mobile navigation, or editing panels.
|
|
91
|
-
- **ContextMenu** - Right-click context menu with nested submenus.
|
|
92
|
-
- **DropdownMenu** - Professional dropdown menu with props-based API.
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Data Display Components
|
|
97
|
-
|
|
98
|
-
- **Table** - Accessible table component with sorting and selection.
|
|
99
|
-
- **DataTable** - High-level table with built-in sorting, filtering, search, and pagination.
|
|
100
|
-
- **Avatar** - Accessible avatar with image and fallback support.
|
|
101
|
-
- **Badge** - Status indicator with semantic variants (polymorphic: div, span, mark).
|
|
102
|
-
- **Tag** - Tag component for labels and categories.
|
|
103
|
-
- **Calendar** - Accessible date picker built on react-day-picker.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Utility Components
|
|
108
|
-
|
|
109
|
-
- **Collapsible** - Collapsible content component.
|
|
110
|
-
- **Toggle** - Toggle button component.
|
|
111
|
-
- **ToggleGroup** - Group of toggle buttons.
|
|
112
|
-
- **ScrollArea** - Scrollable area with custom scrollbars.
|
|
113
|
-
- **Portal** - Portal component for rendering outside DOM hierarchy.
|
|
114
|
-
- **VisuallyHidden** - Screen reader-only content component.
|
|
115
|
-
- **Slot** - Slot component for composition patterns.
|
|
116
|
-
- **SkipLink** - Accessibility skip-to-content links, visible only on keyboard focus. Supports multiple targets with smooth scroll and focus management.
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## Advanced Components
|
|
121
|
-
|
|
122
|
-
- **InfiniteScroll** - Infinite scroll component with load more functionality.
|
|
123
|
-
- **Stepper** - Step-by-step workflow component with navigation controls.
|
|
124
|
-
- **CopyToClipboard** - Copy to clipboard with visual feedback.
|
|
125
|
-
- **VideoPlayer** - Video player component with controls.
|
|
126
|
-
- **FeatureFallback** - Fallback UI when features are unavailable.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Icons
|
|
131
|
-
|
|
132
|
-
- **Icons** - Icon components from lucide-react and custom partner icons.
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
**See also:** [COMPONENTS_UI.md](./COMPONENTS_UI.md) for layout/composition components | [COMPONENTS_CRUD.md](./COMPONENTS_CRUD.md) for CRUD operations and entity forms
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Navigation with Card Component
|
|
141
|
-
|
|
142
|
-
**For clickable cards with navigation support (including middle-click):**
|
|
143
|
-
|
|
144
|
-
Wrap Card in Link component from `@donotdev/ui`:
|
|
145
|
-
|
|
146
|
-
```tsx
|
|
147
|
-
import { Card } from '@donotdev/components';
|
|
148
|
-
import { Link } from '@donotdev/ui';
|
|
149
|
-
|
|
150
|
-
// Card with navigation (supports middle-click)
|
|
151
|
-
<Link
|
|
152
|
-
path="/about"
|
|
153
|
-
style={{ display: 'block', textDecoration: 'none', height: '100%' }}
|
|
154
|
-
aria-label="Learn more about About"
|
|
155
|
-
>
|
|
156
|
-
<Card
|
|
157
|
-
title="About"
|
|
158
|
-
subtitle="Learn more about us"
|
|
159
|
-
content="Click to navigate"
|
|
160
|
-
/>
|
|
161
|
-
</Link>
|
|
162
|
-
|
|
163
|
-
// Card with onClick only (no middle-click support)
|
|
164
|
-
<Card
|
|
165
|
-
title="Action Card"
|
|
166
|
-
onClick={() => handleAction()}
|
|
167
|
-
/>
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
**Why wrap in Link?**
|
|
171
|
-
- Card component is standalone and not routing-aware
|
|
172
|
-
- Link wrapper provides framework navigation (SPA routing, keeps outlet context)
|
|
173
|
-
- Native browser middle-click support (opens in new tab)
|
|
174
|
-
- CSR/SSR safe
|
|
175
|
-
|
|
176
|
-
**Alternative:** Use FeatureCard from `@donotdev/ui` which handles this automatically when `href` prop is provided.
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
**All props documented in JSDoc** - Hover in IDE for complete reference.
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# CRUD Package Reference
|
|
2
|
-
|
|
3
|
-
**Import:** `@donotdev/crud`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Hooks
|
|
8
|
-
|
|
9
|
-
### useCrud
|
|
10
|
-
Single document CRUD actions (add, update, delete, get, subscribe).
|
|
11
|
-
|
|
12
|
-
```tsx
|
|
13
|
-
const { add, update, delete: remove, get, data, loading, error } = useCrud(carEntity);
|
|
14
|
-
await add({ name: 'Tesla', year: 2024 });
|
|
15
|
-
await remove('doc-id');
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### useCrudList
|
|
19
|
-
Paginated list with automatic loading. For data tables.
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
const { items, loading, refresh } = useCrudList(productEntity);
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### useCrudCardList
|
|
26
|
-
Card-based list with infinite scroll.
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
const { items, loading, refresh } = useCrudCardList(articleEntity);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Form Components
|
|
35
|
-
|
|
36
|
-
### EntityFormRenderer
|
|
37
|
-
Auto-render full entity form from definition.
|
|
38
|
-
|
|
39
|
-
```tsx
|
|
40
|
-
<EntityFormRenderer
|
|
41
|
-
entity={productEntity}
|
|
42
|
-
operation="create"
|
|
43
|
-
onSubmit={handleSubmit}
|
|
44
|
-
/>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### FormFieldRenderer
|
|
48
|
-
Render single field. Used inside custom forms.
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
<FormFieldRenderer field={field} control={form.control} />
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### EntityList
|
|
55
|
-
Data table for entity collection.
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
<EntityList entity={userEntity} onRowClick={(user) => edit(user.id)} />
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### EntityCardList
|
|
62
|
-
Card grid for entity collection.
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
<EntityCardList entity={productEntity} renderCard={(item) => <ProductCard {...item} />} />
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
## Form Building Blocks
|
|
71
|
-
|
|
72
|
-
For custom forms, use these low-level utilities:
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
import { useEntityForm, getFieldsForOperation, validateEntity } from '@donotdev/crud';
|
|
76
|
-
|
|
77
|
-
const { register, handleSubmit, fields, formState } = useEntityForm(productEntity, {
|
|
78
|
-
operation: 'create'
|
|
79
|
-
});
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
| Export | Purpose |
|
|
83
|
-
|--------|---------|
|
|
84
|
-
| `useEntityForm` | React Hook Form wrapper for entities |
|
|
85
|
-
| `useEntityField` | Single field hook |
|
|
86
|
-
| `getFieldsForOperation` | Get editable fields for create/edit |
|
|
87
|
-
| `validateEntity` | Validate data against entity schema |
|
|
88
|
-
| `isFieldEditable` | Check if field is editable |
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Field Types (Built-in)
|
|
93
|
-
|
|
94
|
-
Field components are auto-rendered by `FormFieldRenderer`. You don't import them directly.
|
|
95
|
-
|
|
96
|
-
### Text Inputs
|
|
97
|
-
- `text` - Single-line text input
|
|
98
|
-
- `email` - Email input with validation
|
|
99
|
-
- `tel` - Phone number input
|
|
100
|
-
- `url` - URL input
|
|
101
|
-
- `color` - Color picker
|
|
102
|
-
- `password` - Password input (masked)
|
|
103
|
-
- `textarea` - Multi-line text input
|
|
104
|
-
- `richtext` - Rich text editor
|
|
105
|
-
|
|
106
|
-
### Numbers
|
|
107
|
-
- `number` - Numeric input
|
|
108
|
-
- `range` - Slider input
|
|
109
|
-
- `rating` - Star rating input (1–5, configurable max)
|
|
110
|
-
|
|
111
|
-
**Rating + comment (e.g. reviews):** Use two fields on the same entity — `rating` (type `rating`) for stars and `comment` (type `textarea`) for the text. The form renders them as separate rows; no composite field type needed.
|
|
112
|
-
|
|
113
|
-
### Boolean
|
|
114
|
-
- `checkbox` - Checkbox input
|
|
115
|
-
- `boolean` - Alias for checkbox
|
|
116
|
-
- `switch` - Toggle switch
|
|
117
|
-
|
|
118
|
-
### Dates & Time
|
|
119
|
-
- `date` - Date picker
|
|
120
|
-
- `datetime-local` - Date and time picker
|
|
121
|
-
- `time` - Time picker
|
|
122
|
-
- `week` - Week picker
|
|
123
|
-
- `month` - Month picker
|
|
124
|
-
- `timestamp` - Timestamp (Firestore Timestamp)
|
|
125
|
-
|
|
126
|
-
### Selection
|
|
127
|
-
- `select` - Dropdown select
|
|
128
|
-
- `combobox` - Searchable dropdown
|
|
129
|
-
- `multiselect` - Multiple selection dropdown
|
|
130
|
-
- `radio` - Radio button group
|
|
131
|
-
|
|
132
|
-
### Files & Media
|
|
133
|
-
- `file` - Single file upload
|
|
134
|
-
- `files` - Multiple file uploads
|
|
135
|
-
- `document` - Document upload (PDF, etc.)
|
|
136
|
-
- `documents` - Multiple document uploads
|
|
137
|
-
- `image` - Single image upload
|
|
138
|
-
- `images` - Multiple image uploads
|
|
139
|
-
|
|
140
|
-
### Complex Types
|
|
141
|
-
- `geopoint` - Geographic coordinates (lat/lng)
|
|
142
|
-
- `address` - Address input with autocomplete
|
|
143
|
-
- `map` - Map picker
|
|
144
|
-
- `array` - Array of text inputs
|
|
145
|
-
|
|
146
|
-
### Special
|
|
147
|
-
- `avatar` - Avatar image upload
|
|
148
|
-
- `badge` - Badge display
|
|
149
|
-
- `hidden` - Hidden field (not displayed)
|
|
150
|
-
- `submit` - Submit button (uncontrolled)
|
|
151
|
-
- `reset` - Reset button (uncontrolled)
|
|
152
|
-
|
|
153
|
-
To add custom field types:
|
|
154
|
-
```tsx
|
|
155
|
-
import { useController, registerFieldType } from '@donotdev/crud';
|
|
156
|
-
import type { ControlledFieldProps } from '@donotdev/crud';
|
|
157
|
-
|
|
158
|
-
// Custom controlled component MUST use framework's useController (not react-hook-form's)
|
|
159
|
-
function ScoreField({
|
|
160
|
-
fieldConfig,
|
|
161
|
-
control,
|
|
162
|
-
errors,
|
|
163
|
-
t,
|
|
164
|
-
onChange
|
|
165
|
-
}: ControlledFieldProps) {
|
|
166
|
-
// REQUIRED: Use framework's useController - ensures type compatibility
|
|
167
|
-
const { field, fieldState } = useController({
|
|
168
|
-
name: fieldConfig.name,
|
|
169
|
-
control: control,
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
return (
|
|
173
|
-
<div>
|
|
174
|
-
<label>{t(fieldConfig.label)}</label>
|
|
175
|
-
{/* Use field.value and field.onChange */}
|
|
176
|
-
<input
|
|
177
|
-
type="number"
|
|
178
|
-
value={field.value ?? 0}
|
|
179
|
-
onChange={(e) => {
|
|
180
|
-
const value = Number(e.target.value);
|
|
181
|
-
field.onChange(value);
|
|
182
|
-
onChange?.(value);
|
|
183
|
-
}}
|
|
184
|
-
min={0}
|
|
185
|
-
max={10}
|
|
186
|
-
/>
|
|
187
|
-
{fieldState?.error && (
|
|
188
|
-
<span className="error">{fieldState.error.message}</span>
|
|
189
|
-
)}
|
|
190
|
-
</div>
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
registerFieldType({
|
|
195
|
-
type: 'score',
|
|
196
|
-
controlledComponent: ScoreField,
|
|
197
|
-
});
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**Important:**
|
|
201
|
-
- Custom controlled components receive `control` prop, NOT `field` prop
|
|
202
|
-
- You must use **framework's `useController`** (from `@donotdev/crud`), NOT `react-hook-form`'s useController
|
|
203
|
-
- This ensures type compatibility - no type assertions needed
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Service & Store
|
|
208
|
-
|
|
209
|
-
Direct access (rarely needed):
|
|
210
|
-
|
|
211
|
-
```tsx
|
|
212
|
-
import { getCrudService, useCrudStore } from '@donotdev/crud';
|
|
213
|
-
|
|
214
|
-
const service = getCrudService();
|
|
215
|
-
await service.query('products', { where: [['active', '==', true]] });
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
---
|
|
219
|
-
|
|
220
|
-
## Collection Utilities
|
|
221
|
-
|
|
222
|
-
```tsx
|
|
223
|
-
import { loadDeterministicRange, upsertDeterministic, appendToCollection } from '@donotdev/crud';
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
| Utility | Purpose |
|
|
227
|
-
|---------|---------|
|
|
228
|
-
| `loadDeterministicRange` | Paginated loading with deterministic IDs |
|
|
229
|
-
| `upsertDeterministic` | Insert or update with deterministic ID |
|
|
230
|
-
| `appendToCollection` | Add to collection end |
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
**JSDoc in IDE** - Hover over any import for full props and examples.
|