create-huenei-template 0.2.17 → 0.3.1
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/frontend/hub-pre-sales/.cursor/agents/pre-sales-builder.agent.md +98 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +192 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +94 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/hooks/injectPreSalesContext.ts +103 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/hooks.json +23 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/anti-generic-ui.mdc +39 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +202 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +87 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/form-patterns.mdc +74 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/mock-data.mdc +61 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +42 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/routing-patterns.mdc +81 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/settings.json +13 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/adapt/SKILL.md +199 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +188 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/audit/SKILL.md +148 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/bolder/SKILL.md +117 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/clarify/SKILL.md +183 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/colorize/SKILL.md +143 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/critique/SKILL.md +225 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/cognitive-load.md +106 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/heuristics-scoring.md +234 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/personas.md +178 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/daisyui/SKILL.md +1374 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +303 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/distill/SKILL.md +122 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/SKILL.md +365 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/craft.md +70 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/extract.md +70 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/interaction-design.md +195 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/motion-design.md +99 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/responsive-design.md +114 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/spatial-design.md +100 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/typography.md +142 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/ux-writing.md +107 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs +214 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/layout/SKILL.md +125 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/mock-data-patterns/SKILL.md +175 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/optimize/SKILL.md +266 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +142 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/polish/SKILL.md +224 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/quieter/SKILL.md +103 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/SKILL.md +412 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/accessibility.md +359 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/error-handling.md +255 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/links-to-official-docs.md +197 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/performance-optimization.md +355 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/rhf-api-reference.md +420 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/shadcn-integration.md +390 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/top-errors.md +381 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/zod-schemas-guide.md +396 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/rules/react-hook-form-zod.md +138 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/scripts/check-versions.sh +51 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/advanced-form.tsx +427 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/async-validation.tsx +402 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/basic-form.tsx +285 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/custom-error-display.tsx +303 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/dynamic-fields.tsx +308 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/multi-step-form.tsx +367 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/package.json +35 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/server-validation.ts +313 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/shadcn-form.tsx +351 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/SKILL.md +412 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/aspect-ratio.md +513 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/lazy-loading.md +397 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/modern-formats.md +526 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/picture-element.md +593 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/srcset-sizes.md +295 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/rules/responsive-images.md +418 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/templates/image-component.tsx +231 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/.claude-plugin/plugin.json +13 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/SKILL.md +487 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/agents/seo-generator.md +290 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/canonical-urls.md +429 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/json-ld.md +599 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/meta-description.md +426 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/open-graph.md +443 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/title-patterns.md +333 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/twitter-cards.md +423 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/rules/seo-meta.md +157 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/faq.json +46 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/local-business.json +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/service.json +41 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/meta-component.tsx +275 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/SKILL.md +1677 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/learn.md +145 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/official-ui-reference.md +1725 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/reference.md +586 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/ui-reference.md +1578 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/shape/SKILL.md +96 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/SKILL.md +508 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/button-patterns.md +234 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/card-patterns.md +533 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/dark-mode-patterns.md +309 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/form-patterns.md +403 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/layout-patterns.md +542 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/navigation-patterns.md +634 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/typography-patterns.md +338 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/rules/tailwind-patterns.md +371 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/contact-form.tsx +265 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/feature-grid.tsx +141 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/footer.tsx +258 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/hero-section.tsx +105 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/.claude-plugin/plugin.json +13 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/SKILL.md +665 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/commands/setup.md +200 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/architecture.md +206 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/common-gotchas.md +469 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/dark-mode.md +239 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/migration-guide.md +313 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/rules/tailwind-v4-shadcn.md +118 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/components.json +20 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/index.css +140 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/theme-provider.tsx +92 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/tsconfig.app.json +31 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/utils.ts +6 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/vite.config.ts +17 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-accessibility/SKILL.md +780 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-components/SKILL.md +718 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-design-systems/SKILL.md +612 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-layouts/SKILL.md +594 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-animations/SKILL.md +432 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-animations/references/animation-patterns.md +427 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-debugging/SKILL.md +354 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-debugging/references/troubleshooting-guide.md +306 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-framework-integration/SKILL.md +578 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-framework-integration/references/react-patterns.md +353 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/SKILL.md +608 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/references/advanced-theme-patterns.md +215 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/references/custom-utilities-guide.md +281 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-mobile-first/SKILL.md +768 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-performance/SKILL.md +374 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-performance/references/bundle-optimization.md +244 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-plugins/SKILL.md +505 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-responsive-darkmode/SKILL.md +601 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-responsive-darkmode/references/advanced-responsive-patterns.md +485 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/SKILL.md +1058 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/assets/example-template.txt +14 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/best-practices.md +304 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/common-patterns.md +271 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/example-reference.md +26 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/testing.md +282 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/top-errors.md +332 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/typescript-patterns.md +291 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/rules/tanstack-query.md +126 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/scripts/example-script.sh +15 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/error-boundary.tsx +243 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/package.json +31 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/provider-setup.tsx +50 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/query-client-config.ts +72 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/SKILL.md +663 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/references/common-errors.md +77 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/rules/tanstack-router.md +125 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/package.json +26 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/route-examples.tsx +126 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/vite.config.ts +16 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/REVIEW_REPORT.md +299 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/SKILL.md +781 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/planning/stability-tracker.md +49 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/SKILL.md +573 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/cloudflare-d1-examples.md +131 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/common-errors.md +208 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/performance-virtualization.md +106 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/query-integration.md +195 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/server-side-patterns.md +357 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/rules/tanstack-table.md +151 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/basic-client-table.tsx +101 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/column-configuration.tsx +177 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/d1-database-example.tsx +336 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/package.json +25 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/server-paginated-table.tsx +218 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/shadcn-styled-table.tsx +123 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/virtualized-large-dataset.tsx +164 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/SKILL.md +504 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/rules/testing-library-patterns.md +97 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/templates/msw-handlers.ts +117 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/templates/setup.ts +57 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/.claude-plugin/plugin.json +13 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/SKILL.md +400 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/coverage.md +458 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/create-tests.md +362 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/run-tests.md +336 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/references/validation-rules.md +222 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/templates/test-agent.md +132 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/templates/test-spec.yaml +69 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/typeset/SKILL.md +116 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/vitest/.claude-plugin/plugin.json +12 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/vitest/SKILL.md +493 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/vitest/rules/vitest-patterns.md +100 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/vitest/templates/test-utils.ts +86 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/vitest/templates/vitest.config.ts +39 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/web-design-guidelines/SKILL.md +39 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/AGENTS.md +97 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/SKILL.md +127 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-intersection.md +144 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-lazy-recursive.md +143 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-pipe.md +113 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-preprocess.md +142 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-shared-schemas.md +137 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-avoid-throwing-in-refine.md +127 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-custom-messages.md +118 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-i18n.md +145 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-path-for-nested.md +130 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-use-flatten.md +131 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-discriminated-unions.md +138 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-extend-for-composition.md +147 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-optional-vs-nullable.md +117 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-partial-for-updates.md +123 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-pick-omit.md +146 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-strict-vs-strip.md +109 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-async-for-async-refinements.md +118 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-avoid-double-validation.md +129 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-handle-all-issues.md +125 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-never-trust-json.md +113 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-use-safeparse.md +102 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-validate-early.md +120 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-arrays.md +153 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-avoid-dynamic-creation.md +139 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-cache-schemas.md +138 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-lazy-loading.md +135 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-zod-mini.md +117 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-add-path.md +141 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-catch.md +143 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-defaults.md +131 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-transform-coerce.md +105 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-vs-superrefine.md +152 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-avoid-optional-abuse.md +93 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-coercion-for-form-data.md +88 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-string-validations.md +90 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-enums.md +107 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-primitives-correctly.md +61 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-unknown-not-any.md +88 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-branded-types.md +102 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-enable-strict-mode.md +130 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-export-schemas-and-types.md +116 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-input-vs-output.md +116 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-use-z-infer.md +110 -0
- package/dist/templates/frontend/hub-pre-sales/.husky/pre-commit +1 -0
- package/dist/templates/frontend/hub-pre-sales/.impeccable.md +45 -0
- package/dist/templates/frontend/hub-pre-sales/.prettierrc +6 -0
- package/dist/templates/frontend/hub-pre-sales/.vscode/extensions.json +7 -0
- package/dist/templates/frontend/hub-pre-sales/.vscode/settings.json +31 -0
- package/dist/templates/frontend/hub-pre-sales/AGENTS.md +47 -0
- package/dist/templates/frontend/hub-pre-sales/README.md +109 -0
- package/dist/templates/frontend/hub-pre-sales/components.json +22 -0
- package/dist/templates/frontend/hub-pre-sales/eslint.config.js +41 -0
- package/dist/templates/frontend/hub-pre-sales/index.html +22 -0
- package/dist/templates/frontend/hub-pre-sales/package.json +84 -0
- package/dist/templates/frontend/hub-pre-sales/pnpm-workspace.yaml +5 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/layout/navbar.test.tsx +54 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/avatar.test.tsx +74 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/badge.test.tsx +55 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/breadcrumb.test.tsx +140 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/button.test.tsx +121 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/card.test.tsx +144 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/dialog.test.tsx +121 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/form.test.tsx +165 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/input.test.tsx +52 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/label.test.tsx +40 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/password-input.test.tsx +59 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/separator.test.tsx +40 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/table.test.tsx +254 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/tabs.test.tsx +82 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/components/ui/textarea.test.tsx +47 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/helpers/render.tsx +90 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/hooks/useLocalStorage.test.ts +95 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/lib/queryClient.test.ts +24 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/lib/utils.test.ts +43 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/routes/index.test.tsx +64 -0
- package/dist/templates/frontend/hub-pre-sales/src/__tests__/routes/root.test.tsx +78 -0
- package/dist/templates/frontend/hub-pre-sales/src/assets/react.svg +1 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/layout/navbar.tsx +25 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/avatar.tsx +42 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/badge.tsx +37 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/breadcrumb.tsx +106 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/card.tsx +72 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/dialog.tsx +122 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/form.tsx +165 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/label.tsx +24 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/password-input.tsx +41 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/separator.tsx +28 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/table.tsx +229 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/tabs.tsx +62 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/hub-pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/dist/templates/frontend/hub-pre-sales/src/hooks/useLocalStorage.ts +32 -0
- package/dist/templates/frontend/hub-pre-sales/src/hooks/useTheme.ts +73 -0
- package/dist/templates/frontend/hub-pre-sales/src/index.css +282 -0
- package/dist/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/dist/templates/frontend/hub-pre-sales/src/lib/queryClient.ts +11 -0
- package/dist/templates/frontend/hub-pre-sales/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/hub-pre-sales/src/main.tsx +33 -0
- package/dist/templates/frontend/hub-pre-sales/src/router.tsx +13 -0
- package/dist/templates/frontend/hub-pre-sales/src/routes/__root.tsx +48 -0
- package/dist/templates/frontend/hub-pre-sales/src/routes/index.tsx +31 -0
- package/dist/templates/frontend/hub-pre-sales/src/test/setup.ts +61 -0
- package/dist/templates/frontend/hub-pre-sales/tsconfig.app.json +34 -0
- package/dist/templates/frontend/hub-pre-sales/tsconfig.json +10 -0
- package/dist/templates/frontend/hub-pre-sales/tsconfig.node.json +26 -0
- package/dist/templates/frontend/hub-pre-sales/vite.config.ts +27 -0
- package/dist/templates/frontend/hub-pre-sales/vitest.config.ts +48 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/dist/templates/frontend/pre-sales/src/index.css +282 -282
- package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/dist/templates/frontend/react-vite/.npmrc.example +28 -0
- package/dist/templates/frontend/react-vite/README.md +17 -0
- package/dist/templates/frontend/react-vite/eslint.config.js +41 -31
- package/dist/templates/frontend/react-vite/package.json +2 -0
- package/dist/templates/frontend/react-vite/src/index.css +3 -15
- package/dist/templates/frontend/react-vite/src/main.tsx +36 -33
- package/dist/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/dist/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/dist/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/dist/templates/frontend/react-vite/vite.config.ts +7 -2
- package/dist/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/dist/templates/mobile/expo-base/package.json +3 -2
- package/dist/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/dist/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/dist/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/dist/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/package.json +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +94 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/anti-generic-ui.mdc +39 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +202 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +87 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/form-patterns.mdc +74 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/mock-data.mdc +61 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +42 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/routing-patterns.mdc +81 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -0
- package/templates/frontend/hub-pre-sales/.cursor/settings.json +13 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/adapt/SKILL.md +199 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +188 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/audit/SKILL.md +148 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/bolder/SKILL.md +117 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/clarify/SKILL.md +183 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/colorize/SKILL.md +143 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/critique/SKILL.md +225 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/cognitive-load.md +106 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/heuristics-scoring.md +234 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/critique/reference/personas.md +178 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/daisyui/SKILL.md +1374 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +303 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/distill/SKILL.md +122 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/SKILL.md +365 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/craft.md +70 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/extract.md +70 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/interaction-design.md +195 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/motion-design.md +99 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/responsive-design.md +114 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/spatial-design.md +100 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/typography.md +142 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/reference/ux-writing.md +107 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/impeccable/scripts/cleanup-deprecated.mjs +214 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/layout/SKILL.md +125 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/mock-data-patterns/SKILL.md +175 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/optimize/SKILL.md +266 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +142 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/polish/SKILL.md +224 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/quieter/SKILL.md +103 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/SKILL.md +412 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/accessibility.md +359 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/error-handling.md +255 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/links-to-official-docs.md +197 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/performance-optimization.md +355 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/rhf-api-reference.md +420 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/shadcn-integration.md +390 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/top-errors.md +381 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/references/zod-schemas-guide.md +396 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/rules/react-hook-form-zod.md +138 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/scripts/check-versions.sh +51 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/advanced-form.tsx +427 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/async-validation.tsx +402 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/basic-form.tsx +285 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/custom-error-display.tsx +303 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/dynamic-fields.tsx +308 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/multi-step-form.tsx +367 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/package.json +35 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/server-validation.ts +313 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/react-hook-form-zod/templates/shadcn-form.tsx +351 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/SKILL.md +412 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/aspect-ratio.md +513 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/lazy-loading.md +397 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/modern-formats.md +526 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/picture-element.md +593 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/references/srcset-sizes.md +295 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/rules/responsive-images.md +418 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/responsive-images/templates/image-component.tsx +231 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/.claude-plugin/plugin.json +13 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/SKILL.md +487 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/agents/seo-generator.md +290 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/canonical-urls.md +429 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/json-ld.md +599 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/meta-description.md +426 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/open-graph.md +443 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/title-patterns.md +333 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/references/twitter-cards.md +423 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/rules/seo-meta.md +157 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/faq.json +46 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/local-business.json +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/json-ld-schemas/service.json +41 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/seo-meta/templates/meta-component.tsx +275 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/SKILL.md +1677 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/learn.md +145 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/official-ui-reference.md +1725 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/reference.md +586 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shadcn-ui/references/ui-reference.md +1578 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/shape/SKILL.md +96 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/SKILL.md +508 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/button-patterns.md +234 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/card-patterns.md +533 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/dark-mode-patterns.md +309 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/form-patterns.md +403 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/layout-patterns.md +542 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/navigation-patterns.md +634 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/references/typography-patterns.md +338 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/rules/tailwind-patterns.md +371 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/contact-form.tsx +265 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/feature-grid.tsx +141 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/footer.tsx +258 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-patterns/templates/components/hero-section.tsx +105 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/.claude-plugin/plugin.json +13 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/SKILL.md +665 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/commands/setup.md +200 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/architecture.md +206 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/common-gotchas.md +469 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/dark-mode.md +239 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/references/migration-guide.md +313 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/rules/tailwind-v4-shadcn.md +118 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/components.json +20 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/index.css +140 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/theme-provider.tsx +92 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/tsconfig.app.json +31 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/utils.ts +6 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwind-v4-shadcn/templates/vite.config.ts +17 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-accessibility/SKILL.md +780 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-components/SKILL.md +718 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-design-systems/SKILL.md +612 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-advanced-layouts/SKILL.md +594 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-animations/SKILL.md +432 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-animations/references/animation-patterns.md +427 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-debugging/SKILL.md +354 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-debugging/references/troubleshooting-guide.md +306 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-framework-integration/SKILL.md +578 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-framework-integration/references/react-patterns.md +353 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/SKILL.md +608 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/references/advanced-theme-patterns.md +215 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-fundamentals-v4/references/custom-utilities-guide.md +281 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-mobile-first/SKILL.md +768 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-performance/SKILL.md +374 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-performance/references/bundle-optimization.md +244 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-plugins/SKILL.md +505 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-responsive-darkmode/SKILL.md +601 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tailwindcss-responsive-darkmode/references/advanced-responsive-patterns.md +485 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/SKILL.md +1058 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/assets/example-template.txt +14 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/best-practices.md +304 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/common-patterns.md +271 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/example-reference.md +26 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/testing.md +282 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/top-errors.md +332 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/typescript-patterns.md +291 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/references/v4-to-v5-migration.md +231 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/rules/tanstack-query.md +126 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/scripts/example-script.sh +15 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/custom-hooks-pattern.tsx +281 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/devtools-setup.tsx +248 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/error-boundary.tsx +243 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/package.json +31 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/provider-setup.tsx +50 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/query-client-config.ts +72 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-infinite-query.tsx +214 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-mutation-basic.tsx +201 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-mutation-optimistic.tsx +234 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/use-query-basic.tsx +119 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/SKILL.md +663 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/references/common-errors.md +77 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/rules/tanstack-router.md +125 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/package.json +26 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/route-examples.tsx +126 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-router/templates/vite.config.ts +16 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/REVIEW_REPORT.md +299 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/SKILL.md +781 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-start/planning/stability-tracker.md +49 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/SKILL.md +573 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/cloudflare-d1-examples.md +131 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/common-errors.md +208 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/performance-virtualization.md +106 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/query-integration.md +195 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/references/server-side-patterns.md +357 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/rules/tanstack-table.md +151 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/basic-client-table.tsx +101 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/column-configuration.tsx +177 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/d1-database-example.tsx +336 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/package.json +25 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/server-paginated-table.tsx +218 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/shadcn-styled-table.tsx +123 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/templates/virtualized-large-dataset.tsx +164 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/SKILL.md +504 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/rules/testing-library-patterns.md +97 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/templates/msw-handlers.ts +117 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-library/templates/setup.ts +57 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/.claude-plugin/plugin.json +13 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/SKILL.md +400 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/coverage.md +458 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/create-tests.md +362 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/commands/run-tests.md +336 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/references/validation-rules.md +222 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/templates/test-agent.md +132 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/testing-patterns/templates/test-spec.yaml +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/typeset/SKILL.md +116 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/vitest/.claude-plugin/plugin.json +12 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/vitest/SKILL.md +493 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/vitest/rules/vitest-patterns.md +100 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/vitest/templates/test-utils.ts +86 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/vitest/templates/vitest.config.ts +39 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/web-design-guidelines/SKILL.md +39 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/AGENTS.md +97 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/SKILL.md +127 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-intersection.md +144 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-lazy-recursive.md +143 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-pipe.md +113 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-preprocess.md +142 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/compose-shared-schemas.md +137 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-avoid-throwing-in-refine.md +127 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-custom-messages.md +118 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-i18n.md +145 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-path-for-nested.md +130 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/error-use-flatten.md +131 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-discriminated-unions.md +138 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-extend-for-composition.md +147 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-optional-vs-nullable.md +117 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-partial-for-updates.md +123 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-pick-omit.md +146 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/object-strict-vs-strip.md +109 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-async-for-async-refinements.md +118 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-avoid-double-validation.md +129 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-handle-all-issues.md +125 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-never-trust-json.md +113 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-use-safeparse.md +102 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/parse-validate-early.md +120 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-arrays.md +153 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-avoid-dynamic-creation.md +139 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-cache-schemas.md +138 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-lazy-loading.md +135 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/perf-zod-mini.md +117 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-add-path.md +141 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-catch.md +143 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-defaults.md +131 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-transform-coerce.md +105 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/refine-vs-superrefine.md +152 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-avoid-optional-abuse.md +93 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-coercion-for-form-data.md +88 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-string-validations.md +90 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-enums.md +107 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-primitives-correctly.md +61 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/schema-use-unknown-not-any.md +88 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-branded-types.md +102 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-enable-strict-mode.md +130 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-export-schemas-and-types.md +116 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-input-vs-output.md +116 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/zod/references/type-use-z-infer.md +110 -0
- package/templates/frontend/hub-pre-sales/.husky/pre-commit +1 -0
- package/templates/frontend/hub-pre-sales/.impeccable.md +45 -0
- package/templates/frontend/hub-pre-sales/.prettierrc +6 -0
- package/templates/frontend/hub-pre-sales/.vscode/extensions.json +7 -0
- package/templates/frontend/hub-pre-sales/.vscode/settings.json +31 -0
- package/templates/frontend/hub-pre-sales/AGENTS.md +47 -0
- package/templates/frontend/hub-pre-sales/README.md +109 -0
- package/templates/frontend/hub-pre-sales/components.json +22 -0
- package/templates/frontend/hub-pre-sales/eslint.config.js +41 -0
- package/templates/frontend/hub-pre-sales/index.html +22 -0
- package/templates/frontend/hub-pre-sales/package.json +84 -0
- package/templates/frontend/hub-pre-sales/pnpm-lock.yaml +6597 -0
- package/templates/frontend/hub-pre-sales/pnpm-workspace.yaml +5 -0
- package/templates/frontend/hub-pre-sales/skills-lock.json +53 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/layout/navbar.test.tsx +54 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/avatar.test.tsx +74 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/badge.test.tsx +55 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/breadcrumb.test.tsx +140 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/button.test.tsx +121 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/card.test.tsx +144 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/dialog.test.tsx +121 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/form.test.tsx +165 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/input.test.tsx +52 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/label.test.tsx +40 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/password-input.test.tsx +59 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/separator.test.tsx +40 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/table.test.tsx +254 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/tabs.test.tsx +82 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/components/ui/textarea.test.tsx +47 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/helpers/render.tsx +90 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/hooks/useLocalStorage.test.ts +95 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/lib/queryClient.test.ts +24 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/lib/utils.test.ts +43 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/routes/index.test.tsx +64 -0
- package/templates/frontend/hub-pre-sales/src/__tests__/routes/root.test.tsx +78 -0
- package/templates/frontend/hub-pre-sales/src/assets/react.svg +1 -0
- package/templates/frontend/hub-pre-sales/src/components/layout/navbar.tsx +25 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/avatar.tsx +42 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/badge.tsx +37 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/breadcrumb.tsx +106 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/button.tsx +58 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/card.tsx +72 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/dialog.tsx +122 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/form.tsx +165 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/input.tsx +22 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/label.tsx +24 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/password-input.tsx +41 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/separator.tsx +28 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/table.tsx +229 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/tabs.tsx +62 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/hub-pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/templates/frontend/hub-pre-sales/src/hooks/useLocalStorage.ts +32 -0
- package/templates/frontend/hub-pre-sales/src/hooks/useTheme.ts +73 -0
- package/templates/frontend/hub-pre-sales/src/index.css +282 -0
- package/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/templates/frontend/hub-pre-sales/src/lib/queryClient.ts +11 -0
- package/templates/frontend/hub-pre-sales/src/lib/utils.ts +6 -0
- package/templates/frontend/hub-pre-sales/src/main.tsx +33 -0
- package/templates/frontend/hub-pre-sales/src/router.tsx +13 -0
- package/templates/frontend/hub-pre-sales/src/routes/__root.tsx +48 -0
- package/templates/frontend/hub-pre-sales/src/routes/index.tsx +31 -0
- package/templates/frontend/hub-pre-sales/src/test/setup.ts +61 -0
- package/templates/frontend/hub-pre-sales/tsconfig.app.json +34 -0
- package/templates/frontend/hub-pre-sales/tsconfig.json +10 -0
- package/templates/frontend/hub-pre-sales/tsconfig.node.json +26 -0
- package/templates/frontend/hub-pre-sales/vite.config.ts +27 -0
- package/templates/frontend/hub-pre-sales/vitest.config.ts +48 -0
- package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -6448
- package/templates/frontend/pre-sales/skills-lock.json +10 -10
- package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/templates/frontend/pre-sales/src/index.css +282 -282
- package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/templates/frontend/react-vite/.npmrc.example +28 -0
- package/templates/frontend/react-vite/README.md +17 -0
- package/templates/frontend/react-vite/eslint.config.js +41 -31
- package/templates/frontend/react-vite/package.json +2 -0
- package/templates/frontend/react-vite/pnpm-lock.yaml +535 -13
- package/templates/frontend/react-vite/src/index.css +3 -15
- package/templates/frontend/react-vite/src/main.tsx +36 -33
- package/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/templates/frontend/react-vite/vite.config.ts +7 -2
- package/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/templates/mobile/expo-base/package.json +3 -2
- package/templates/mobile/expo-base/pnpm-lock.yaml +10240 -11354
- package/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-postgres/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-postgres/.cursor/agents/prisma-guardian.md +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/agents/security-auditor.md +0 -71
- package/templates/backend/nestjs-api-postgres/.cursor/agents/test-runner.md +0 -58
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-seed.md +0 -160
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/auto-retry.ts +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/block-dangerous.ts +0 -202
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/format-and-validate.ts +0 -124
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/protect-secrets.ts +0 -105
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/session-context.ts +0 -130
- package/templates/backend/nestjs-api-postgres/.cursor/hooks.json +0 -36
- package/templates/backend/nestjs-api-postgres/.cursor/mcp.json +0 -21
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/code-reviewer.md +0 -153
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/nestjs-architect.md +0 -138
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/prisma-analyst.md +0 -164
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/security-auditor.md +0 -150
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/test-engineer.md +0 -290
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-seed.md +0 -172
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/auto-format.ts +0 -80
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/block-dangerous-commands.ts +0 -144
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/prisma-schema-watcher.ts +0 -64
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/protect-sensitive-files.ts +0 -122
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/session-context.ts +0 -105
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks.json +0 -18
- package/templates/backend/nestjs-api-sqlite/.cursor/mcp.json +0 -17
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks.json +0 -46
- package/templates/frontend/angular-base/.cursor/agents/accessibility-reviewer.md +0 -67
- package/templates/frontend/angular-base/.cursor/agents/angular-code-reviewer.md +0 -60
- package/templates/frontend/angular-base/.cursor/agents/qa-test-expert.md +0 -70
- package/templates/frontend/angular-base/.cursor/agents/security-auditor.md +0 -58
- package/templates/frontend/angular-base/.cursor/commands/add-e2e-test.md +0 -236
- package/templates/frontend/angular-base/.cursor/commands/new-component.md +0 -211
- package/templates/frontend/angular-base/.cursor/commands/new-form.md +0 -284
- package/templates/frontend/angular-base/.cursor/commands/new-interceptor.md +0 -257
- package/templates/frontend/angular-base/.cursor/commands/new-page.md +0 -215
- package/templates/frontend/angular-base/.cursor/commands/new-service.md +0 -203
- package/templates/frontend/angular-base/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-base/.cursor/hooks/auto-test-on-stop.ts +0 -113
- package/templates/frontend/angular-base/.cursor/hooks/block-dangerous-commands.ts +0 -160
- package/templates/frontend/angular-base/.cursor/hooks/ensure-tests-exist.ts +0 -363
- package/templates/frontend/angular-base/.cursor/hooks/protect-sensitive-files.ts +0 -118
- package/templates/frontend/angular-base/.cursor/hooks/session-context.ts +0 -110
- package/templates/frontend/angular-base/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-base/.cursor/mcp.json +0 -21
- package/templates/frontend/angular-nx/.cursor/agents/angular-code-reviewer.md +0 -64
- package/templates/frontend/angular-nx/.cursor/agents/ci-watcher.md +0 -480
- package/templates/frontend/angular-nx/.cursor/agents/nx-architecture-guardian.md +0 -69
- package/templates/frontend/angular-nx/.cursor/agents/qa-test-expert.md +0 -75
- package/templates/frontend/angular-nx/.cursor/agents/security-auditor.md +0 -61
- package/templates/frontend/angular-nx/.cursor/commands/ci-monitor.md +0 -428
- package/templates/frontend/angular-nx/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-nx/.cursor/hooks/auto-test-on-stop.ts +0 -115
- package/templates/frontend/angular-nx/.cursor/hooks/block-dangerous-commands.ts +0 -188
- package/templates/frontend/angular-nx/.cursor/hooks/ensure-tests-exist.ts +0 -399
- package/templates/frontend/angular-nx/.cursor/hooks/protect-sensitive-files.ts +0 -128
- package/templates/frontend/angular-nx/.cursor/hooks/session-context.ts +0 -121
- package/templates/frontend/angular-nx/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-nx/.cursor/mcp.json +0 -12
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -92
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +0 -87
- package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
- package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +0 -73
- package/templates/frontend/pre-sales/.cursor/commands/new-component.md +0 -192
- package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +0 -135
- package/templates/frontend/pre-sales/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -97
- package/templates/frontend/pre-sales/.cursor/hooks.json +0 -23
- package/templates/frontend/pre-sales/.cursor/mcp.json +0 -13
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +0 -22
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +0 -24
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +0 -32
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +0 -25
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +0 -97
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +0 -95
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +0 -66
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +0 -89
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +0 -64
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +0 -94
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +0 -120
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +0 -209
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +0 -101
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +0 -93
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +0 -10
- package/templates/frontend/react-ssr/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite/.cursor/agents/qa-test-expert.agent.md +0 -126
- package/templates/frontend/react-vite/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite/.cursor/hooks/autoTestOnStop.ts +0 -117
- package/templates/frontend/react-vite/.cursor/hooks/blockDangerous.ts +0 -75
- package/templates/frontend/react-vite/.cursor/hooks/ensureTestsExist.ts +0 -306
- package/templates/frontend/react-vite/.cursor/hooks/formatOnEdit.ts +0 -49
- package/templates/frontend/react-vite/.cursor/hooks/protectSecrets.ts +0 -88
- package/templates/frontend/react-vite/.cursor/hooks/sessionInit.ts +0 -77
- package/templates/frontend/react-vite/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite-help/.cursor/RECONSTRUCTION-PROMPT.md +0 -738
- package/templates/frontend/react-vite-help/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/qa-test-expert.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite-help/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite-help/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite-help/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite-help/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite-help/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite-help/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite-help/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite-help/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite-help/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/react-vite-help/.cursor/hooks.json +0 -10
- package/templates/frontend/react-vite-help/.cursor/mcp.json +0 -17
- package/templates/mobile/expo-base/.cursor/agents/api-integration.md +0 -139
- package/templates/mobile/expo-base/.cursor/agents/feature-architect.md +0 -131
- package/templates/mobile/expo-base/.cursor/agents/i18n-manager.md +0 -147
- package/templates/mobile/expo-base/.cursor/agents/quality-reviewer.md +0 -137
- package/templates/mobile/expo-base/.cursor/agents/testing-specialist.md +0 -123
- package/templates/mobile/expo-base/.cursor/agents/theme-engineer.md +0 -106
- package/templates/mobile/expo-base/.cursor/commands/add-translation.md +0 -184
- package/templates/mobile/expo-base/.cursor/commands/new-api-service.md +0 -280
- package/templates/mobile/expo-base/.cursor/commands/new-component.md +0 -298
- package/templates/mobile/expo-base/.cursor/commands/new-hook.md +0 -291
- package/templates/mobile/expo-base/.cursor/commands/new-modal.md +0 -345
- package/templates/mobile/expo-base/.cursor/commands/new-screen.md +0 -267
- package/templates/mobile/expo-base/.cursor/commands/new-tab.md +0 -238
- package/templates/mobile/expo-base/.cursor/mcp.json +0 -21
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/frontend-senior.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/pre-sales-demo-runner.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/pre-sales-refactor.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/pre-sales-validator.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/security-expert.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/agents/ux-ui-expert.agent.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-calendar.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-chart.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-dashboard.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-form.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-login.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-map.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-route.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-screen.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-table.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/add-tests.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/mock-backend.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/new-form.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/new-page.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/new-query.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/new-table.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/refactor-ui.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/commands/ver-demo.md +0 -0
- /package/{templates/frontend/pre-sales → dist/templates/frontend/hub-pre-sales}/.cursor/hooks/checkFileLength.ts +0 -0
- /package/{templates/frontend/react-vite → dist/templates/frontend/hub-pre-sales}/.cursor/mcp.json +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Destructure formState Properties Before Render
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: enables Proxy subscription optimization
|
|
5
|
+
tags: formstate, formState, destructure, proxy, subscription
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Destructure formState Properties Before Render
|
|
9
|
+
|
|
10
|
+
formState is wrapped in a Proxy that tracks which properties you access. Destructure the specific properties you need before render to enable the subscription optimization. Assigning the entire object disables it.
|
|
11
|
+
|
|
12
|
+
**Incorrect (entire object assignment disables Proxy):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function SubmitButton() {
|
|
16
|
+
const { handleSubmit, formState } = useForm()
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<button
|
|
20
|
+
disabled={!formState.isValid} // Proxy optimization disabled
|
|
21
|
+
onClick={handleSubmit(onSubmit)}
|
|
22
|
+
>
|
|
23
|
+
{formState.isSubmitting ? 'Saving...' : 'Save'}
|
|
24
|
+
</button>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Correct (destructure enables selective subscription):**
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
function SubmitButton() {
|
|
33
|
+
const { handleSubmit, formState: { isValid, isSubmitting } } = useForm()
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<button
|
|
37
|
+
disabled={!isValid} // Only subscribes to isValid changes
|
|
38
|
+
onClick={handleSubmit(onSubmit)}
|
|
39
|
+
>
|
|
40
|
+
{isSubmitting ? 'Saving...' : 'Save'}
|
|
41
|
+
</button>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Note:** This also applies to useFormState hook - always destructure the properties you need.
|
|
47
|
+
|
|
48
|
+
Reference: [useFormState](https://react-hook-form.com/docs/useformstate)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Use getFieldState for Single Field State Access
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: avoids subscription overhead for one-time state reads
|
|
5
|
+
tags: formstate, getFieldState, single-field, no-subscription
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Use getFieldState for Single Field State Access
|
|
9
|
+
|
|
10
|
+
When you need to check a single field's state (dirty, touched, error) without subscribing to updates, use `getFieldState()`. It returns current state without creating a subscription.
|
|
11
|
+
|
|
12
|
+
**Incorrect (useFormState creates subscription for one-time check):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function FieldHelpText({ control, name }: { control: Control; name: string }) {
|
|
16
|
+
const { touchedFields } = useFormState({ control }) // Subscribes to all touched changes
|
|
17
|
+
|
|
18
|
+
const wasTouched = touchedFields[name]
|
|
19
|
+
|
|
20
|
+
return wasTouched ? null : <span>Please fill out this field</span>
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Correct (getFieldState for non-reactive read):**
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
function FieldHelpText({ formState, name }: { formState: FormState; name: string }) {
|
|
28
|
+
const { isTouched } = getFieldState(name, formState) // No subscription created
|
|
29
|
+
|
|
30
|
+
return isTouched ? null : <span>Please fill out this field</span>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function MyForm() {
|
|
34
|
+
const { register, formState } = useForm()
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<form>
|
|
38
|
+
<input {...register('email')} />
|
|
39
|
+
<FieldHelpText formState={formState} name="email" />
|
|
40
|
+
</form>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**When to use each:**
|
|
46
|
+
- `useFormState`: Need to react to state changes (display updates)
|
|
47
|
+
- `getFieldState`: Need current state at a point in time (conditional logic)
|
|
48
|
+
|
|
49
|
+
Reference: [useForm - getFieldState](https://react-hook-form.com/docs/useform/getfieldstate)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Subscribe to Specific Field Names in useFormState
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: reduces re-renders to only relevant field changes
|
|
5
|
+
tags: formstate, useFormState, name, specific-fields
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Subscribe to Specific Field Names in useFormState
|
|
9
|
+
|
|
10
|
+
useFormState accepts a `name` option to subscribe only to specific field state changes. Without it, the component re-renders on any field's state change.
|
|
11
|
+
|
|
12
|
+
**Incorrect (subscribes to all field state changes):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function PasswordStrengthIndicator({ control }: { control: Control }) {
|
|
16
|
+
const { errors, dirtyFields } = useFormState({ control }) // All fields
|
|
17
|
+
|
|
18
|
+
const passwordError = errors.password
|
|
19
|
+
const isPasswordDirty = dirtyFields.password
|
|
20
|
+
|
|
21
|
+
return isPasswordDirty && !passwordError ? (
|
|
22
|
+
<span>Password looks good!</span>
|
|
23
|
+
) : null
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Correct (subscribes only to password field):**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function PasswordStrengthIndicator({ control }: { control: Control }) {
|
|
31
|
+
const { errors, dirtyFields } = useFormState({
|
|
32
|
+
control,
|
|
33
|
+
name: 'password', // Only re-renders on password state changes
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const passwordError = errors.password
|
|
37
|
+
const isPasswordDirty = dirtyFields.password
|
|
38
|
+
|
|
39
|
+
return isPasswordDirty && !passwordError ? (
|
|
40
|
+
<span>Password looks good!</span>
|
|
41
|
+
) : null
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Multiple fields:**
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const { errors } = useFormState({
|
|
49
|
+
control,
|
|
50
|
+
name: ['email', 'password'], // Subscribe to multiple specific fields
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Reference: [useFormState](https://react-hook-form.com/docs/useformstate)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Use useFormState for Isolated State Subscriptions
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: prevents parent re-renders from state access in children
|
|
5
|
+
tags: formstate, useFormState, isolation, re-renders
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Use useFormState for Isolated State Subscriptions
|
|
9
|
+
|
|
10
|
+
useFormState allows subscribing to form state in child components without causing parent re-renders. Each useFormState instance is isolated and doesn't affect other subscribers.
|
|
11
|
+
|
|
12
|
+
**Incorrect (formState at root re-renders entire form):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function ContactForm() {
|
|
16
|
+
const { register, handleSubmit, formState: { errors, isDirty } } = useForm()
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
20
|
+
<input {...register('email', { required: true })} />
|
|
21
|
+
{errors.email && <span>Email required</span>} {/* Re-renders all on any state change */}
|
|
22
|
+
<input {...register('message')} />
|
|
23
|
+
<SaveIndicator isDirty={isDirty} /> {/* Prop drilling */}
|
|
24
|
+
</form>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Correct (useFormState isolates subscriptions):**
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
function ContactForm() {
|
|
33
|
+
const { register, handleSubmit, control } = useForm()
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
37
|
+
<EmailField register={register} control={control} />
|
|
38
|
+
<input {...register('message')} />
|
|
39
|
+
<SaveIndicator control={control} /> {/* Isolated subscription */}
|
|
40
|
+
</form>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function EmailField({ register, control }: EmailFieldProps) {
|
|
45
|
+
const { errors } = useFormState({ control, name: 'email' })
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div>
|
|
49
|
+
<input {...register('email', { required: true })} />
|
|
50
|
+
{errors.email && <span>Email required</span>}
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function SaveIndicator({ control }: { control: Control }) {
|
|
56
|
+
const { isDirty } = useFormState({ control })
|
|
57
|
+
|
|
58
|
+
return isDirty ? <span>Unsaved changes</span> : null
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Reference: [useFormState](https://react-hook-form.com/docs/useformstate)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Use Controller for Material-UI Components
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: maintains controlled component behavior with proper event handling
|
|
5
|
+
tags: integ, mui, material-ui, Controller
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Use Controller for Material-UI Components
|
|
9
|
+
|
|
10
|
+
Material-UI components are controlled by design. Use Controller to wrap them, handling the onChange event object correctly (MUI passes the event, not the value directly).
|
|
11
|
+
|
|
12
|
+
**Incorrect (register doesn't work with MUI controlled components):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { TextField } from '@mui/material'
|
|
16
|
+
|
|
17
|
+
function MuiForm() {
|
|
18
|
+
const { register, handleSubmit } = useForm()
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
22
|
+
<TextField
|
|
23
|
+
{...register('email')} // MUI TextField is controlled, register won't work
|
|
24
|
+
label="Email"
|
|
25
|
+
/>
|
|
26
|
+
</form>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Correct (Controller handles MUI's event-based onChange):**
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { TextField } from '@mui/material'
|
|
35
|
+
import { Controller } from 'react-hook-form'
|
|
36
|
+
|
|
37
|
+
function MuiForm() {
|
|
38
|
+
const { control, handleSubmit } = useForm()
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
42
|
+
<Controller
|
|
43
|
+
name="email"
|
|
44
|
+
control={control}
|
|
45
|
+
render={({ field, fieldState }) => (
|
|
46
|
+
<TextField
|
|
47
|
+
{...field} // MUI TextField accepts onChange with event
|
|
48
|
+
label="Email"
|
|
49
|
+
error={!!fieldState.error}
|
|
50
|
+
helperText={fieldState.error?.message}
|
|
51
|
+
/>
|
|
52
|
+
)}
|
|
53
|
+
/>
|
|
54
|
+
</form>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Reference: [React Hook Form - UI Libraries](https://react-hook-form.com/get-started#IntegratingwithUIlibraries)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Verify shadcn Form Component Import Source
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: prevents silent component mismatch bugs
|
|
5
|
+
tags: integ, shadcn, imports, Form-component
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Verify shadcn Form Component Import Source
|
|
9
|
+
|
|
10
|
+
React Hook Form exports its own `<Form>` component. When using shadcn/ui, ensure you import the shadcn Form wrapper, not RHF's Form. Auto-imports often get this wrong.
|
|
11
|
+
|
|
12
|
+
**Incorrect (imports RHF Form instead of shadcn):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { useForm, Form } from 'react-hook-form' // Wrong Form!
|
|
16
|
+
import { FormField, FormItem, FormLabel } from '@/components/ui/form'
|
|
17
|
+
|
|
18
|
+
function LoginForm() {
|
|
19
|
+
const form = useForm()
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Form {...form}> {/* RHF Form doesn't work with shadcn FormField */}
|
|
23
|
+
<FormField
|
|
24
|
+
control={form.control}
|
|
25
|
+
name="email"
|
|
26
|
+
render={({ field }) => (
|
|
27
|
+
<FormItem>
|
|
28
|
+
<FormLabel>Email</FormLabel>
|
|
29
|
+
<Input {...field} />
|
|
30
|
+
</FormItem>
|
|
31
|
+
)}
|
|
32
|
+
/>
|
|
33
|
+
</Form>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Correct (separate imports for each library):**
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { useForm } from 'react-hook-form'
|
|
42
|
+
import { Form, FormField, FormItem, FormLabel } from '@/components/ui/form'
|
|
43
|
+
|
|
44
|
+
function LoginForm() {
|
|
45
|
+
const form = useForm()
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Form {...form}> {/* shadcn Form wraps FormProvider correctly */}
|
|
49
|
+
<FormField
|
|
50
|
+
control={form.control}
|
|
51
|
+
name="email"
|
|
52
|
+
render={({ field }) => (
|
|
53
|
+
<FormItem>
|
|
54
|
+
<FormLabel>Email</FormLabel>
|
|
55
|
+
<Input {...field} />
|
|
56
|
+
</FormItem>
|
|
57
|
+
)}
|
|
58
|
+
/>
|
|
59
|
+
</Form>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Reference: [shadcn Form](https://ui.shadcn.com/docs/components/form)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Wire shadcn Select with onValueChange Instead of Spread
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: prevents 100% of silent select binding failures with Radix-based components
|
|
5
|
+
tags: integ, shadcn, select, radix
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Wire shadcn Select with onValueChange Instead of Spread
|
|
9
|
+
|
|
10
|
+
shadcn's Select (built on Radix) uses `onValueChange` instead of `onChange`. Spreading field props directly doesn't work. Manually wire the value change handler.
|
|
11
|
+
|
|
12
|
+
**Incorrect (spread doesn't work with Radix Select):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function CountrySelect({ control }: { control: Control }) {
|
|
16
|
+
return (
|
|
17
|
+
<FormField
|
|
18
|
+
control={control}
|
|
19
|
+
name="country"
|
|
20
|
+
render={({ field }) => (
|
|
21
|
+
<Select {...field}> {/* field.onChange expects event, Radix passes value */}
|
|
22
|
+
<SelectTrigger>
|
|
23
|
+
<SelectValue placeholder="Select country" />
|
|
24
|
+
</SelectTrigger>
|
|
25
|
+
<SelectContent>
|
|
26
|
+
<SelectItem value="us">United States</SelectItem>
|
|
27
|
+
<SelectItem value="uk">United Kingdom</SelectItem>
|
|
28
|
+
</SelectContent>
|
|
29
|
+
</Select>
|
|
30
|
+
)}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Correct (wire props individually):**
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
function CountrySelect({ control }: { control: Control }) {
|
|
40
|
+
return (
|
|
41
|
+
<FormField
|
|
42
|
+
control={control}
|
|
43
|
+
name="country"
|
|
44
|
+
render={({ field }) => (
|
|
45
|
+
<Select
|
|
46
|
+
value={field.value}
|
|
47
|
+
onValueChange={field.onChange} // Radix passes value directly
|
|
48
|
+
onOpenChange={() => field.onBlur()} // Trigger blur on close
|
|
49
|
+
>
|
|
50
|
+
<SelectTrigger>
|
|
51
|
+
<SelectValue placeholder="Select country" />
|
|
52
|
+
</SelectTrigger>
|
|
53
|
+
<SelectContent>
|
|
54
|
+
<SelectItem value="us">United States</SelectItem>
|
|
55
|
+
<SelectItem value="uk">United Kingdom</SelectItem>
|
|
56
|
+
</SelectContent>
|
|
57
|
+
</Select>
|
|
58
|
+
)}
|
|
59
|
+
/>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Reference: [shadcn Select](https://ui.shadcn.com/docs/components/select)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Transform Values at Controller Level for Type Coercion
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: prevents type coercion bugs in 100% of numeric/date form fields
|
|
5
|
+
tags: integ, transform, value-coercion, Controller
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Transform Values at Controller Level for Type Coercion
|
|
9
|
+
|
|
10
|
+
Native inputs return strings. When your form needs numbers, dates, or other types, transform values in the Controller render function rather than relying solely on `valueAsNumber` or `valueAsDate`.
|
|
11
|
+
|
|
12
|
+
**Incorrect (valueAsNumber has edge cases):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function QuantityInput() {
|
|
16
|
+
const { register } = useForm()
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<input
|
|
20
|
+
{...register('quantity', { valueAsNumber: true })} // Returns NaN for empty string
|
|
21
|
+
type="number"
|
|
22
|
+
/>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Correct (explicit transformation in Controller):**
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function QuantityInput({ control }: { control: Control }) {
|
|
31
|
+
return (
|
|
32
|
+
<Controller
|
|
33
|
+
name="quantity"
|
|
34
|
+
control={control}
|
|
35
|
+
render={({ field }) => (
|
|
36
|
+
<input
|
|
37
|
+
type="number"
|
|
38
|
+
value={field.value ?? ''}
|
|
39
|
+
onChange={(e) => {
|
|
40
|
+
const value = e.target.value
|
|
41
|
+
field.onChange(value === '' ? null : parseInt(value, 10))
|
|
42
|
+
}}
|
|
43
|
+
onBlur={field.onBlur}
|
|
44
|
+
/>
|
|
45
|
+
)}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Alternative (Zod transform at schema level):**
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
const schema = z.object({
|
|
55
|
+
quantity: z.string().transform((val) => (val === '' ? null : parseInt(val, 10))),
|
|
56
|
+
})
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Reference: [React Hook Form - Advanced Usage](https://react-hook-form.com/advanced-usage)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Avoid Calling watch() in Render for One-Time Reads
|
|
3
|
+
impact: HIGH
|
|
4
|
+
impactDescription: prevents unnecessary subscriptions and re-renders
|
|
5
|
+
tags: sub, watch, getValues, render, one-time-read
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Avoid Calling watch() in Render for One-Time Reads
|
|
9
|
+
|
|
10
|
+
If you only need to read a value once (not subscribe to changes), use `getValues()` instead of `watch()`. Calling watch() creates a subscription that triggers re-renders on every change.
|
|
11
|
+
|
|
12
|
+
**Incorrect (watch creates subscription for one-time read):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function SubmitButton() {
|
|
16
|
+
const { watch, handleSubmit, formState: { isValid } } = useForm()
|
|
17
|
+
|
|
18
|
+
const handleClick = () => {
|
|
19
|
+
const email = watch('email') // Creates subscription, but we only need current value
|
|
20
|
+
analytics.track('form_submit_attempt', { email })
|
|
21
|
+
handleSubmit(onSubmit)()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return <button onClick={handleClick} disabled={!isValid}>Submit</button>
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Correct (getValues for one-time read):**
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
function SubmitButton() {
|
|
32
|
+
const { getValues, handleSubmit, formState: { isValid } } = useForm()
|
|
33
|
+
|
|
34
|
+
const handleClick = () => {
|
|
35
|
+
const email = getValues('email') // No subscription, just current value
|
|
36
|
+
analytics.track('form_submit_attempt', { email })
|
|
37
|
+
handleSubmit(onSubmit)()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return <button onClick={handleClick} disabled={!isValid}>Submit</button>
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**When to use each:**
|
|
45
|
+
- `watch()`: Need to react to value changes (display, conditional rendering)
|
|
46
|
+
- `getValues()`: Need current value at a point in time (event handlers, submit)
|
|
47
|
+
|
|
48
|
+
Reference: [useForm - getValues](https://react-hook-form.com/docs/useform/getvalues)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Subscribe Deep in Component Tree Where Data Is Needed
|
|
3
|
+
impact: CRITICAL
|
|
4
|
+
impactDescription: prevents parent re-renders from propagating to unrelated children
|
|
5
|
+
tags: sub, subscription, component-tree, re-renders
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Subscribe Deep in Component Tree Where Data Is Needed
|
|
9
|
+
|
|
10
|
+
Subscribe to form values as deep in the component tree as possible, where the data is actually used. This isolates re-renders to the specific component that needs the value.
|
|
11
|
+
|
|
12
|
+
**Incorrect (subscription at parent re-renders all children):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function CheckoutPage() {
|
|
16
|
+
const { control, register, handleSubmit } = useForm()
|
|
17
|
+
const paymentMethod = useWatch({ control, name: 'paymentMethod' }) // Parent subscribes
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
21
|
+
<ShippingSection register={register} /> {/* Re-renders on paymentMethod change */}
|
|
22
|
+
<BillingSection register={register} /> {/* Re-renders on paymentMethod change */}
|
|
23
|
+
<PaymentSection
|
|
24
|
+
register={register}
|
|
25
|
+
paymentMethod={paymentMethod} {/* Prop drilling */}
|
|
26
|
+
/>
|
|
27
|
+
</form>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Correct (subscription at leaf component isolates re-renders):**
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
function CheckoutPage() {
|
|
36
|
+
const { control, register, handleSubmit } = useForm()
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
40
|
+
<ShippingSection register={register} /> {/* Never re-renders for payment */}
|
|
41
|
+
<BillingSection register={register} /> {/* Never re-renders for payment */}
|
|
42
|
+
<PaymentSection register={register} control={control} />
|
|
43
|
+
</form>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function PaymentSection({ register, control }: PaymentSectionProps) {
|
|
48
|
+
const paymentMethod = useWatch({ control, name: 'paymentMethod' }) // Only this re-renders
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div>
|
|
52
|
+
<select {...register('paymentMethod')}>
|
|
53
|
+
<option value="card">Credit Card</option>
|
|
54
|
+
<option value="paypal">PayPal</option>
|
|
55
|
+
</select>
|
|
56
|
+
{paymentMethod === 'card' && <CardFields register={register} />}
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Reference: [useWatch](https://react-hook-form.com/docs/usewatch)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Use useFormContext Sparingly for Deep Nesting
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: reduces prop drilling but increases implicit dependencies
|
|
5
|
+
tags: sub, useFormContext, FormProvider, prop-drilling
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Use useFormContext Sparingly for Deep Nesting
|
|
9
|
+
|
|
10
|
+
useFormContext eliminates prop drilling by accessing form methods via context, but creates implicit dependencies that are harder to track. Use it for deeply nested components; prefer explicit props for shallow nesting.
|
|
11
|
+
|
|
12
|
+
**Incorrect (useFormContext for shallow nesting):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function ContactForm() {
|
|
16
|
+
const methods = useForm()
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<FormProvider {...methods}>
|
|
20
|
+
<form onSubmit={methods.handleSubmit(onSubmit)}>
|
|
21
|
+
<NameInput /> {/* One level deep, context overhead not needed */}
|
|
22
|
+
<EmailInput />
|
|
23
|
+
</form>
|
|
24
|
+
</FormProvider>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function NameInput() {
|
|
29
|
+
const { register } = useFormContext() // Implicit dependency
|
|
30
|
+
return <input {...register('name')} />
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Correct (explicit props for shallow nesting):**
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
function ContactForm() {
|
|
38
|
+
const { register, handleSubmit } = useForm()
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
42
|
+
<NameInput register={register} /> {/* Explicit dependency */}
|
|
43
|
+
<EmailInput register={register} />
|
|
44
|
+
</form>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function NameInput({ register }: { register: UseFormRegister<ContactFormData> }) {
|
|
49
|
+
return <input {...register('name')} />
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**When to use useFormContext:**
|
|
54
|
+
- Components nested 3+ levels deep
|
|
55
|
+
- Shared components used across multiple forms
|
|
56
|
+
- Complex form sections with many fields
|
|
57
|
+
|
|
58
|
+
Reference: [useFormContext](https://react-hook-form.com/docs/useformcontext)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Provide defaultValue to useWatch for Initial Render
|
|
3
|
+
impact: MEDIUM-HIGH
|
|
4
|
+
impactDescription: prevents undefined flash on initial render
|
|
5
|
+
tags: sub, useWatch, default-value, hydration
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Provide defaultValue to useWatch for Initial Render
|
|
9
|
+
|
|
10
|
+
useWatch returns undefined on the first render before the subscription is established. Provide a defaultValue to prevent undefined checks and potential UI flicker.
|
|
11
|
+
|
|
12
|
+
**Incorrect (undefined on first render):**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
function PriceDisplay({ control }: { control: Control<OrderForm> }) {
|
|
16
|
+
const quantity = useWatch({ control, name: 'quantity' })
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div>
|
|
20
|
+
{quantity !== undefined ? ( // Undefined check required
|
|
21
|
+
<span>Quantity: {quantity}</span>
|
|
22
|
+
) : (
|
|
23
|
+
<span>Loading...</span> // Flash of loading state
|
|
24
|
+
)}
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Correct (defaultValue prevents undefined):**
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
function PriceDisplay({ control }: { control: Control<OrderForm> }) {
|
|
34
|
+
const quantity = useWatch({
|
|
35
|
+
control,
|
|
36
|
+
name: 'quantity',
|
|
37
|
+
defaultValue: 1, // Immediate value, no undefined check needed
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div>
|
|
42
|
+
<span>Quantity: {quantity}</span>
|
|
43
|
+
</div>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Note:** defaultValue should match the type expected by your form schema to maintain type safety.
|
|
49
|
+
|
|
50
|
+
Reference: [useWatch](https://react-hook-form.com/docs/usewatch)
|