create-huenei-template 0.2.13 → 0.2.15
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/dist/config/templates.js +7 -0
- package/dist/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/dist/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
- package/dist/templates/frontend/react-ssr/.env.example +9 -0
- package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
- package/dist/templates/frontend/react-ssr/README.md +121 -0
- package/dist/templates/frontend/react-ssr/components.json +22 -0
- package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
- package/dist/templates/frontend/react-ssr/package.json +86 -0
- package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
- package/package.json +1 -1
- package/templates/cursor/.cursor/agents/config-drift-analyzer.md +152 -0
- package/templates/cursor/.cursor/commands/actualizar-reglas.md +580 -0
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.dockerignore +14 -0
- package/templates/frontend/react-ssr/.env.example +9 -0
- package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/templates/frontend/react-ssr/Dockerfile +41 -0
- package/templates/frontend/react-ssr/README.md +121 -0
- package/templates/frontend/react-ssr/components.json +22 -0
- package/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/templates/frontend/react-ssr/next.config.ts +7 -0
- package/templates/frontend/react-ssr/package.json +86 -0
- package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/templates/frontend/react-ssr/vitest.config.ts +41 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# Navigation & Chrome Components
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
- [Accordion](#accordion)
|
|
5
|
+
- [Breadcrumbs](#breadcrumbs)
|
|
6
|
+
- [Collapse](#collapse)
|
|
7
|
+
- [Dropdown](#dropdown)
|
|
8
|
+
- [Kbd](#kbd)
|
|
9
|
+
- [Link](#link)
|
|
10
|
+
- [Mask](#mask)
|
|
11
|
+
- [Menu](#menu)
|
|
12
|
+
- [Mockup Browser](#mockup-browser)
|
|
13
|
+
- [Mockup Code](#mockup-code)
|
|
14
|
+
- [Mockup Phone](#mockup-phone)
|
|
15
|
+
- [Mockup Window](#mockup-window)
|
|
16
|
+
- [Pagination](#pagination)
|
|
17
|
+
- [Theme Controller](#theme-controller)
|
|
18
|
+
- [Tooltip](#tooltip)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Accordion
|
|
23
|
+
|
|
24
|
+
Shows/hides content with only one item open at a time.
|
|
25
|
+
|
|
26
|
+
**Classes:** `collapse` | part: `collapse-title`, `collapse-content` | modifier: `collapse-arrow`, `collapse-plus`, `collapse-open`, `collapse-close`
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<div class="collapse collapse-arrow bg-base-100">
|
|
30
|
+
<input type="radio" name="accordion-1" checked="checked" />
|
|
31
|
+
<div class="collapse-title font-semibold">Item 1</div>
|
|
32
|
+
<div class="collapse-content"><p>Content for item 1.</p></div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="collapse collapse-arrow bg-base-100">
|
|
35
|
+
<input type="radio" name="accordion-1" />
|
|
36
|
+
<div class="collapse-title font-semibold">Item 2</div>
|
|
37
|
+
<div class="collapse-content"><p>Content for item 2.</p></div>
|
|
38
|
+
</div>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
All radio inputs with the same `name` work as a group — only one open at a time. Use different names for separate accordion sets on the same page.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Breadcrumbs
|
|
46
|
+
|
|
47
|
+
Navigation trail.
|
|
48
|
+
|
|
49
|
+
**Classes:** `breadcrumbs`
|
|
50
|
+
|
|
51
|
+
```html
|
|
52
|
+
<div class="breadcrumbs text-sm">
|
|
53
|
+
<ul>
|
|
54
|
+
<li><a>Home</a></li>
|
|
55
|
+
<li><a>Documents</a></li>
|
|
56
|
+
<li>Current Page</li>
|
|
57
|
+
</ul>
|
|
58
|
+
</div>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Can contain icons inside links. Scrolls if content exceeds `max-width`.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Collapse
|
|
66
|
+
|
|
67
|
+
Shows/hides content (standalone, not grouped like accordion).
|
|
68
|
+
|
|
69
|
+
**Classes:** `collapse` | part: `collapse-title`, `collapse-content` | modifier: `collapse-arrow`, `collapse-plus`, `collapse-open`, `collapse-close`
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<!-- Using tabindex -->
|
|
73
|
+
<div tabindex="0" class="collapse collapse-plus bg-base-100">
|
|
74
|
+
<div class="collapse-title font-medium">Click to expand</div>
|
|
75
|
+
<div class="collapse-content"><p>Hidden content here.</p></div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<!-- Using checkbox -->
|
|
79
|
+
<div class="collapse collapse-arrow bg-base-100">
|
|
80
|
+
<input type="checkbox" />
|
|
81
|
+
<div class="collapse-title font-medium">Toggle me</div>
|
|
82
|
+
<div class="collapse-content"><p>Expandable content.</p></div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- Using details/summary -->
|
|
86
|
+
<details class="collapse collapse-arrow bg-base-100">
|
|
87
|
+
<summary class="collapse-title font-medium">Details</summary>
|
|
88
|
+
<div class="collapse-content"><p>Content here.</p></div>
|
|
89
|
+
</details>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Dropdown
|
|
95
|
+
|
|
96
|
+
Opens menu/content on click.
|
|
97
|
+
|
|
98
|
+
**Classes:** `dropdown` | part: `dropdown-content` | placement: `dropdown-start`, `dropdown-center`, `dropdown-end`, `dropdown-top`, `dropdown-bottom`, `dropdown-left`, `dropdown-right` | modifier: `dropdown-hover`, `dropdown-open`, `dropdown-close`
|
|
99
|
+
|
|
100
|
+
### Using details/summary (recommended)
|
|
101
|
+
```html
|
|
102
|
+
<details class="dropdown">
|
|
103
|
+
<summary class="btn m-1">Click me</summary>
|
|
104
|
+
<ul class="dropdown-content menu bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm">
|
|
105
|
+
<li><a>Item 1</a></li>
|
|
106
|
+
<li><a>Item 2</a></li>
|
|
107
|
+
</ul>
|
|
108
|
+
</details>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Using popover API
|
|
112
|
+
```html
|
|
113
|
+
<button popovertarget="my-pop" style="anchor-name:--my-pop">Open</button>
|
|
114
|
+
<ul class="dropdown-content menu bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm" popover id="my-pop" style="position-anchor:--my-pop">
|
|
115
|
+
<li><a>Item 1</a></li>
|
|
116
|
+
<li><a>Item 2</a></li>
|
|
117
|
+
</ul>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Using CSS focus
|
|
121
|
+
```html
|
|
122
|
+
<div class="dropdown">
|
|
123
|
+
<div tabindex="0" role="button" class="btn m-1">Click</div>
|
|
124
|
+
<ul tabindex="-1" class="dropdown-content menu bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm">
|
|
125
|
+
<li><a>Item 1</a></li>
|
|
126
|
+
<li><a>Item 2</a></li>
|
|
127
|
+
</ul>
|
|
128
|
+
</div>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Content can be any HTML element, not just `<ul>`. Use unique `id`/`anchor` for popover.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Kbd
|
|
136
|
+
|
|
137
|
+
Displays keyboard shortcuts.
|
|
138
|
+
|
|
139
|
+
**Classes:** `kbd` | size: `kbd-xs`..`kbd-xl`
|
|
140
|
+
|
|
141
|
+
```html
|
|
142
|
+
<kbd class="kbd kbd-sm">Ctrl</kbd> + <kbd class="kbd kbd-sm">C</kbd>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Link
|
|
148
|
+
|
|
149
|
+
Adds underline style to links.
|
|
150
|
+
|
|
151
|
+
**Classes:** `link` | style: `link-hover` | color: `link-neutral`, `link-primary`, `link-secondary`, `link-accent`, `link-success`, `link-info`, `link-warning`, `link-error`
|
|
152
|
+
|
|
153
|
+
```html
|
|
154
|
+
<a class="link link-primary">Visible link</a>
|
|
155
|
+
<a class="link link-hover">Underline on hover only</a>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Mask
|
|
161
|
+
|
|
162
|
+
Crops element to common shapes.
|
|
163
|
+
|
|
164
|
+
**Classes:** `mask` | style: `mask-squircle`, `mask-heart`, `mask-hexagon`, `mask-hexagon-2`, `mask-decagon`, `mask-pentagon`, `mask-diamond`, `mask-square`, `mask-circle`, `mask-star`, `mask-star-2`, `mask-triangle`, `mask-triangle-2`, `mask-triangle-3`, `mask-triangle-4` | modifier: `mask-half-1`, `mask-half-2`
|
|
165
|
+
|
|
166
|
+
```html
|
|
167
|
+
<img class="mask mask-squircle w-24" src="https://picsum.photos/200/200" />
|
|
168
|
+
<img class="mask mask-hexagon w-24" src="https://picsum.photos/200/200" />
|
|
169
|
+
<img class="mask mask-heart w-24" src="https://picsum.photos/200/200" />
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Works on any element. Set size with `w-*`/`h-*`.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Menu
|
|
177
|
+
|
|
178
|
+
Vertical or horizontal link list.
|
|
179
|
+
|
|
180
|
+
**Classes:** `menu` | part: `menu-title`, `menu-dropdown`, `menu-dropdown-toggle` | modifier: `menu-disabled`, `menu-active`, `menu-focus`, `menu-dropdown-show` | size: `menu-xs`..`menu-xl` | direction: `menu-vertical`, `menu-horizontal`
|
|
181
|
+
|
|
182
|
+
```html
|
|
183
|
+
<!-- Vertical menu with title and submenu -->
|
|
184
|
+
<ul class="menu bg-base-200 rounded-box w-56">
|
|
185
|
+
<li class="menu-title">Category</li>
|
|
186
|
+
<li><a>Item 1</a></li>
|
|
187
|
+
<li><a class="menu-active">Active Item</a></li>
|
|
188
|
+
<li>
|
|
189
|
+
<details>
|
|
190
|
+
<summary>Submenu</summary>
|
|
191
|
+
<ul>
|
|
192
|
+
<li><a>Sub item 1</a></li>
|
|
193
|
+
<li><a>Sub item 2</a></li>
|
|
194
|
+
</ul>
|
|
195
|
+
</details>
|
|
196
|
+
</li>
|
|
197
|
+
</ul>
|
|
198
|
+
|
|
199
|
+
<!-- Horizontal menu -->
|
|
200
|
+
<ul class="menu menu-horizontal bg-base-200 rounded-box">
|
|
201
|
+
<li><a>Link 1</a></li>
|
|
202
|
+
<li><a>Link 2</a></li>
|
|
203
|
+
</ul>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Use `lg:menu-horizontal` for responsive. Use `<details>` for collapsible submenus.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Mockup Browser
|
|
211
|
+
|
|
212
|
+
Browser window frame.
|
|
213
|
+
|
|
214
|
+
**Classes:** `mockup-browser` | part: `mockup-browser-toolbar`
|
|
215
|
+
|
|
216
|
+
```html
|
|
217
|
+
<div class="mockup-browser bg-base-300 border border-base-300">
|
|
218
|
+
<div class="mockup-browser-toolbar">
|
|
219
|
+
<div class="input">https://daisyui.com</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="bg-base-200 p-8">Content here</div>
|
|
222
|
+
</div>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Mockup Code
|
|
228
|
+
|
|
229
|
+
Code editor frame.
|
|
230
|
+
|
|
231
|
+
**Classes:** `mockup-code`
|
|
232
|
+
|
|
233
|
+
```html
|
|
234
|
+
<div class="mockup-code">
|
|
235
|
+
<pre data-prefix="$"><code>npm i daisyui</code></pre>
|
|
236
|
+
<pre data-prefix=">" class="text-warning"><code>installing...</code></pre>
|
|
237
|
+
<pre data-prefix=">" class="text-success"><code>Done!</code></pre>
|
|
238
|
+
</div>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Use `data-prefix` for line prefixes. Add color classes for highlighting.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Mockup Phone
|
|
246
|
+
|
|
247
|
+
iPhone-style frame.
|
|
248
|
+
|
|
249
|
+
**Classes:** `mockup-phone` | part: `mockup-phone-camera`, `mockup-phone-display`
|
|
250
|
+
|
|
251
|
+
```html
|
|
252
|
+
<div class="mockup-phone">
|
|
253
|
+
<div class="mockup-phone-camera"></div>
|
|
254
|
+
<div class="mockup-phone-display">
|
|
255
|
+
<div class="flex items-center justify-center h-full bg-base-200">
|
|
256
|
+
<p>App content</p>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Mockup Window
|
|
265
|
+
|
|
266
|
+
OS window frame.
|
|
267
|
+
|
|
268
|
+
**Classes:** `mockup-window`
|
|
269
|
+
|
|
270
|
+
```html
|
|
271
|
+
<div class="mockup-window bg-base-300 border border-base-300">
|
|
272
|
+
<div class="bg-base-200 p-8">Window content</div>
|
|
273
|
+
</div>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Pagination
|
|
279
|
+
|
|
280
|
+
Button group for page navigation (uses join component).
|
|
281
|
+
|
|
282
|
+
**Classes:** `join`, `join-item`
|
|
283
|
+
|
|
284
|
+
```html
|
|
285
|
+
<div class="join">
|
|
286
|
+
<button class="join-item btn">«</button>
|
|
287
|
+
<button class="join-item btn">1</button>
|
|
288
|
+
<button class="join-item btn btn-active">2</button>
|
|
289
|
+
<button class="join-item btn">3</button>
|
|
290
|
+
<button class="join-item btn">»</button>
|
|
291
|
+
</div>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Theme Controller
|
|
297
|
+
|
|
298
|
+
Controls page theme via checkbox/radio input value.
|
|
299
|
+
|
|
300
|
+
**Classes:** `theme-controller`
|
|
301
|
+
|
|
302
|
+
```html
|
|
303
|
+
<!-- Toggle between two themes -->
|
|
304
|
+
<input type="checkbox" value="dark" class="toggle theme-controller" />
|
|
305
|
+
|
|
306
|
+
<!-- Select from multiple themes -->
|
|
307
|
+
<select class="select theme-controller" data-choose-theme>
|
|
308
|
+
<option value="light">Light</option>
|
|
309
|
+
<option value="dark">Dark</option>
|
|
310
|
+
<option value="cupcake">Cupcake</option>
|
|
311
|
+
</select>
|
|
312
|
+
|
|
313
|
+
<!-- Radio buttons for theme -->
|
|
314
|
+
<input type="radio" name="theme" class="btn theme-controller" aria-label="Light" value="light" />
|
|
315
|
+
<input type="radio" name="theme" class="btn theme-controller" aria-label="Dark" value="dark" />
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
The `value` must be a valid daisyUI theme name.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Tooltip
|
|
323
|
+
|
|
324
|
+
Shows a text popup on hover.
|
|
325
|
+
|
|
326
|
+
**Classes:** `tooltip` | placement: `tooltip-top`, `tooltip-bottom`, `tooltip-left`, `tooltip-right` | color: `tooltip-primary`, `tooltip-secondary`, `tooltip-accent`, `tooltip-neutral`, `tooltip-info`, `tooltip-success`, `tooltip-warning`, `tooltip-error` | modifier: `tooltip-open`
|
|
327
|
+
|
|
328
|
+
```html
|
|
329
|
+
<div class="tooltip" data-tip="Hello">
|
|
330
|
+
<button class="btn">Hover me</button>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
<div class="tooltip tooltip-bottom tooltip-primary" data-tip="Bottom tooltip">
|
|
334
|
+
<button class="btn btn-primary">Bottom</button>
|
|
335
|
+
</div>
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Use `data-tip` attribute for tooltip text. Default placement is top.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file daisy-meta.ts
|
|
3
|
+
* @description Central DaisyUI design system metadata and configuration.
|
|
4
|
+
*
|
|
5
|
+
* LLM AGENT INSTRUCTIONS:
|
|
6
|
+
* This file serves as the source of truth for the DaisyUI implementation within the application.
|
|
7
|
+
* If you are tasked with adding new styling options or DaisyUI features, ensure you update
|
|
8
|
+
* the corresponding arrays and types here.
|
|
9
|
+
*
|
|
10
|
+
* 1. Maintain `as const` on all arrays to ensure strong literal typing across the app.
|
|
11
|
+
* 2. When adding new values to an array (e.g. a new custom color or a newly supported DaisyUI size),
|
|
12
|
+
* just add the string literal to the array. The associated TypeScript `type` will automatically update.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Standard semantic color names used by DaisyUI.
|
|
17
|
+
* Add custom colors here if extended in tailwind.config.ts / daisyui config.
|
|
18
|
+
*/
|
|
19
|
+
export const DAISY_COLORS = [
|
|
20
|
+
"primary",
|
|
21
|
+
"secondary",
|
|
22
|
+
"accent",
|
|
23
|
+
"info",
|
|
24
|
+
"success",
|
|
25
|
+
"warning",
|
|
26
|
+
"error",
|
|
27
|
+
"neutral",
|
|
28
|
+
] as const;
|
|
29
|
+
export type DaisyColor = (typeof DAISY_COLORS)[number];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Common positional placements relative to a component (e.g., tooltips, dropdowns, drawing).
|
|
33
|
+
* Used when a component can be attached to various sides in space.
|
|
34
|
+
*/
|
|
35
|
+
export const DAISY_PLACEMENTS = [
|
|
36
|
+
"top",
|
|
37
|
+
"bottom",
|
|
38
|
+
"left",
|
|
39
|
+
"right",
|
|
40
|
+
"start",
|
|
41
|
+
"end",
|
|
42
|
+
"middle",
|
|
43
|
+
] as const;
|
|
44
|
+
export type DaisyPlacement = (typeof DAISY_PLACEMENTS)[number];
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Common flex/grid alignment values.
|
|
48
|
+
*/
|
|
49
|
+
export const DAISY_ALIGNMENT = ["start", "center", "end"] as const;
|
|
50
|
+
export type DaisyAlignment = (typeof DAISY_ALIGNMENT)[number];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Structural orientations for linear components like dividers or menus.
|
|
54
|
+
*/
|
|
55
|
+
export const DAISY_ORIENTATION = ["horizontal", "vertical"] as const;
|
|
56
|
+
export type DaisyOrientation = (typeof DAISY_ORIENTATION)[number];
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Standard sizing scale for DaisyUI components from extra-small (xs) to extra-large (xl).
|
|
60
|
+
*/
|
|
61
|
+
export const DAISY_SIZES = ["xs", "sm", "md", "lg", "xl"] as const;
|
|
62
|
+
export type DaisySize = (typeof DAISY_SIZES)[number];
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Visual variant styles for components (e.g., button outlines vs ghost styles).
|
|
66
|
+
* Add any new custom variants defined in your theme here.
|
|
67
|
+
*/
|
|
68
|
+
export const DAISY_VARIANTS = [
|
|
69
|
+
"dash",
|
|
70
|
+
"outline",
|
|
71
|
+
"ghost",
|
|
72
|
+
"link",
|
|
73
|
+
"soft",
|
|
74
|
+
] as const;
|
|
75
|
+
export type DaisyVariant = (typeof DAISY_VARIANTS)[number];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Border-radius shaping modifiers.
|
|
79
|
+
*/
|
|
80
|
+
export const DAISY_SHAPES = ["square", "circle"] as const;
|
|
81
|
+
export type DaisyShape = (typeof DAISY_SHAPES)[number];
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Interactive state modifiers. Note that 'hover' or 'focus' are usually pseudo-classes,
|
|
85
|
+
* but 'active' and 'disabled' can often be explicitly applied as standard classes in DaisyUI.
|
|
86
|
+
*/
|
|
87
|
+
export const DAISY_ACTIVITY = ["active", "disabled"] as const;
|
|
88
|
+
export type DaisyActivity = (typeof DAISY_ACTIVITY)[number];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Defines the optional structural modifiers supported by any given DaisyUI component.
|
|
92
|
+
* Used primarily by the `COMPONENT_CAPABILITIES` registry below.
|
|
93
|
+
*/
|
|
94
|
+
export type ComponentCapability = {
|
|
95
|
+
colors?: boolean;
|
|
96
|
+
sizes?: boolean;
|
|
97
|
+
variants?: DaisyVariant[] | boolean;
|
|
98
|
+
shapes?: boolean;
|
|
99
|
+
activity?: boolean;
|
|
100
|
+
placement?: DaisyPlacement[];
|
|
101
|
+
alignment?: DaisyAlignment[];
|
|
102
|
+
orientation?: boolean;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* COMPONENT_CAPABILITIES
|
|
107
|
+
*
|
|
108
|
+
* LLM AGENT INSTRUCTIONS:
|
|
109
|
+
* This object defines the supported modifiers (colors, sizes, variants, etc.) for each DaisyUI component.
|
|
110
|
+
* When continuing the implementation and adding a new DaisyUI component, you MUST register its capabilities here.
|
|
111
|
+
*
|
|
112
|
+
* Guidelines for adding a new component:
|
|
113
|
+
* 1. Reference the official DaisyUI documentation for the given component.
|
|
114
|
+
* 2. Boolean flags (`true`): Set to `true` if the component broadly supports standard modifiers:
|
|
115
|
+
* - `colors: true` -> Supports standard colors (primary, secondary, error, success, etc.)
|
|
116
|
+
* - `sizes: true` -> Supports standard sizes (xs, sm, md, lg, xl)
|
|
117
|
+
* - `shapes: true` -> Supports shapes (circle, square)
|
|
118
|
+
* - `activity: true` -> Supports active/disabled states
|
|
119
|
+
* 3. Arrays / Specific values: If a component only supports specific variants or placements, provide an explicit array:
|
|
120
|
+
* - e.g., `variants: ["ghost", "outline"]` or `placement: ["top", "bottom"]`
|
|
121
|
+
* 4. If a component lacks a modifier altogether (e.g. `collapse` rarely uses sizes), omit it.
|
|
122
|
+
*
|
|
123
|
+
* This metadata is critical. It powers safelisting generators and dynamic class builders across the application.
|
|
124
|
+
*/
|
|
125
|
+
export const COMPONENT_CAPABILITIES: Partial<
|
|
126
|
+
Record<string, ComponentCapability>
|
|
127
|
+
> = {
|
|
128
|
+
// Buttons: highly versatile, support all standard Daisy modifiers
|
|
129
|
+
btn: {
|
|
130
|
+
colors: true,
|
|
131
|
+
sizes: true,
|
|
132
|
+
variants: true,
|
|
133
|
+
shapes: true,
|
|
134
|
+
activity: true,
|
|
135
|
+
},
|
|
136
|
+
// Badges: support colors and sizes, but "link" variant usually isn't applicable
|
|
137
|
+
badge: {
|
|
138
|
+
colors: true,
|
|
139
|
+
sizes: true,
|
|
140
|
+
variants: DAISY_VARIANTS.filter((v) => v !== "link"),
|
|
141
|
+
},
|
|
142
|
+
// Cards: primarily adjust via sizes
|
|
143
|
+
card: {
|
|
144
|
+
sizes: true,
|
|
145
|
+
},
|
|
146
|
+
// Tabs: defined by sizes and its placement in its container
|
|
147
|
+
tabs: {
|
|
148
|
+
sizes: true,
|
|
149
|
+
placement: ["top", "bottom"],
|
|
150
|
+
},
|
|
151
|
+
// Text Inputs: standard inputs support colors, sizes, and the "ghost" style
|
|
152
|
+
input: {
|
|
153
|
+
colors: true,
|
|
154
|
+
sizes: true,
|
|
155
|
+
variants: ["ghost"],
|
|
156
|
+
},
|
|
157
|
+
// Range Sliders: standard colors and sizes apply
|
|
158
|
+
range: {
|
|
159
|
+
colors: true,
|
|
160
|
+
sizes: true,
|
|
161
|
+
},
|
|
162
|
+
// Select dropdown inputs: standard colors and sizes
|
|
163
|
+
select: {
|
|
164
|
+
colors: true,
|
|
165
|
+
sizes: true,
|
|
166
|
+
},
|
|
167
|
+
// Textareas: standard colors, sizes, and the "ghost" style
|
|
168
|
+
textarea: {
|
|
169
|
+
colors: true,
|
|
170
|
+
sizes: true,
|
|
171
|
+
variants: ["ghost"],
|
|
172
|
+
},
|
|
173
|
+
// Radio buttons and Checkboxes: core form toggles that support colors and sizes
|
|
174
|
+
radio: {
|
|
175
|
+
colors: true,
|
|
176
|
+
sizes: true,
|
|
177
|
+
},
|
|
178
|
+
checkbox: {
|
|
179
|
+
colors: true,
|
|
180
|
+
sizes: true,
|
|
181
|
+
},
|
|
182
|
+
// Collapse: structure-driven. Core functionality is its open/close state.
|
|
183
|
+
// Standard style modifiers like colors or sizes usually don't apply to the base class.
|
|
184
|
+
collapse: {},
|
|
185
|
+
// Dropdown wrappers: requires placement relative to trigger, and internal alignment
|
|
186
|
+
dropdown: {
|
|
187
|
+
placement: ["top", "bottom", "left", "right"],
|
|
188
|
+
alignment: ["start", "center", "end"],
|
|
189
|
+
},
|
|
190
|
+
// Menus: can be sized, track active items, and layout horizontally or vertically
|
|
191
|
+
menu: {
|
|
192
|
+
sizes: true,
|
|
193
|
+
activity: true,
|
|
194
|
+
orientation: true,
|
|
195
|
+
},
|
|
196
|
+
// Modals: capabilities center on screen placement
|
|
197
|
+
modal: {
|
|
198
|
+
placement: ["top", "middle", "bottom", "start", "end"],
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Derived list of all component keys registered in the system.
|
|
204
|
+
*/
|
|
205
|
+
export const DAISY_COMPONENTS = Object.keys(COMPONENT_CAPABILITIES) as string[];
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The unified default metadata object.
|
|
209
|
+
* Used by dynamic generators, safelisting scripts, and UI builders to iterate
|
|
210
|
+
* over the entire authorized design space.
|
|
211
|
+
*/
|
|
212
|
+
export const DAISY_META = {
|
|
213
|
+
components: DAISY_COMPONENTS,
|
|
214
|
+
colors: DAISY_COLORS,
|
|
215
|
+
sizes: DAISY_SIZES,
|
|
216
|
+
variants: DAISY_VARIANTS,
|
|
217
|
+
shapes: DAISY_SHAPES,
|
|
218
|
+
activity: DAISY_ACTIVITY,
|
|
219
|
+
capabilities: COMPONENT_CAPABILITIES,
|
|
220
|
+
} as const;
|
package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import {
|
|
6
|
+
DAISY_COLORS,
|
|
7
|
+
DAISY_SIZES,
|
|
8
|
+
DAISY_VARIANTS,
|
|
9
|
+
DAISY_SHAPES,
|
|
10
|
+
COMPONENT_CAPABILITIES,
|
|
11
|
+
ComponentCapability,
|
|
12
|
+
DAISY_COMPONENTS,
|
|
13
|
+
} from "./daisy-meta.ts";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @file generate-daisy-safelist.ts
|
|
17
|
+
* @description Automatically generates a CSS safelist for DaisyUI components based on metadata.
|
|
18
|
+
*
|
|
19
|
+
* LLM AGENT INSTRUCTIONS:
|
|
20
|
+
* This script runs to generate `src/app/styles/daisy-safelist.css`.
|
|
21
|
+
* It prevents the Tailwind compiler from tree-shaking dynamic classes generated by your React components.
|
|
22
|
+
*
|
|
23
|
+
* IF YOU ADD A NEW CAPABILITY MODIFIER TO `daisy-meta.ts` (e.g. "shadow" or "border"),
|
|
24
|
+
* you MUST update `buildClassList()` in this script to iterate over the new capability and generate
|
|
25
|
+
* the respective CSS classes. Otherwise, dynamically constructed classes will be purged in production!
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Extracts normalized capabilities for a given DaisyUI component, defaulting missing properties to safe values.
|
|
30
|
+
*/
|
|
31
|
+
function resolvedCaps(component: string): ComponentCapability {
|
|
32
|
+
const caps =
|
|
33
|
+
COMPONENT_CAPABILITIES[component as keyof typeof COMPONENT_CAPABILITIES];
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
colors: caps?.colors === true,
|
|
37
|
+
sizes: caps?.sizes === true,
|
|
38
|
+
variants: caps?.variants ?? [],
|
|
39
|
+
shapes: caps?.shapes === true,
|
|
40
|
+
activity: caps?.activity === true,
|
|
41
|
+
orientation: caps?.orientation === true,
|
|
42
|
+
placement: caps?.placement ?? [],
|
|
43
|
+
alignment: caps?.alignment ?? [],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Iterates across all defined `COMPONENT_CAPABILITIES` and constructs an array of literally
|
|
49
|
+
* typed CSS classes that DaisyUI supports (e.g. `btn-primary`, `btn-sm`, `badge-outline`).
|
|
50
|
+
* Returns an alphabetically sorted array of unique class names.
|
|
51
|
+
*/
|
|
52
|
+
function buildClassList(): string[] {
|
|
53
|
+
const classes: string[] = [];
|
|
54
|
+
|
|
55
|
+
for (const comp of DAISY_COMPONENTS) {
|
|
56
|
+
const caps = resolvedCaps(comp);
|
|
57
|
+
|
|
58
|
+
if (caps.colors) {
|
|
59
|
+
for (const c of DAISY_COLORS) {
|
|
60
|
+
classes.push(`${comp}-${c}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (caps.sizes) {
|
|
65
|
+
for (const s of DAISY_SIZES) {
|
|
66
|
+
classes.push(`${comp}-${s}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (caps.variants) {
|
|
71
|
+
if (Array.isArray(caps.variants)) {
|
|
72
|
+
for (const v of caps.variants) {
|
|
73
|
+
classes.push(`${comp}-${v}`);
|
|
74
|
+
}
|
|
75
|
+
} else if (caps.variants === true) {
|
|
76
|
+
for (const v of DAISY_VARIANTS) {
|
|
77
|
+
classes.push(`${comp}-${v}`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (caps.shapes) {
|
|
83
|
+
for (const sh of DAISY_SHAPES) {
|
|
84
|
+
classes.push(`${comp}-${sh}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (caps.activity) {
|
|
89
|
+
classes.push(comp, `${comp}-active`, `${comp}-disabled`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (caps.orientation) {
|
|
93
|
+
classes.push(`${comp}-horizontal`, `${comp}-vertical`);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (caps.placement?.length) {
|
|
97
|
+
for (const p of caps.placement) {
|
|
98
|
+
classes.push(`${comp}-${p}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (caps.alignment?.length) {
|
|
103
|
+
for (const a of caps.alignment) {
|
|
104
|
+
classes.push(`${comp}-${a}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const unique = Array.from(new Set(classes));
|
|
110
|
+
unique.sort();
|
|
111
|
+
return unique;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Writes the dynamically generated class list to a CSS file using the Tailwind `@source` directive.
|
|
116
|
+
* The generated file serves as a global class registry that Tailwind force-includes into the bundle.
|
|
117
|
+
*/
|
|
118
|
+
function emitFile(list: string[]): void {
|
|
119
|
+
const outPath = "src/app/styles/daisy-safelist.css";
|
|
120
|
+
const fileContents = `/* AUTO-GENERATED. DO NOT EDIT MANUALLY. */
|
|
121
|
+
@source inline("${list.join(" ")}");
|
|
122
|
+
`;
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
fs.writeFileSync(outPath, fileContents);
|
|
126
|
+
console.log(
|
|
127
|
+
`${chalk.green("✔")} ${chalk.bold("Generated")} ` +
|
|
128
|
+
`${chalk.cyan(outPath)} ${chalk.grey("with")} ` +
|
|
129
|
+
`${chalk.yellow(list.length.toString())} ${chalk.grey("classes.")}`,
|
|
130
|
+
);
|
|
131
|
+
} catch (err: any) {
|
|
132
|
+
console.error(
|
|
133
|
+
`${chalk.red("✖")} ${chalk.bold.red("Failed to write")} ` +
|
|
134
|
+
`${chalk.cyan(outPath)}: ${chalk.red(err.message)}`,
|
|
135
|
+
);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function main(): void {
|
|
141
|
+
try {
|
|
142
|
+
const list = buildClassList();
|
|
143
|
+
emitFile(list);
|
|
144
|
+
} catch (err: any) {
|
|
145
|
+
console.error(
|
|
146
|
+
`${chalk.red("✖")} ${chalk.bold.red("Error:")} ${chalk.red(err.message)}`,
|
|
147
|
+
);
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
main();
|