create-huenei-template 0.2.16 → 0.2.18
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/frontend-senior.agent.md +49 -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/pre-sales-demo-runner.agent.md +36 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-refactor.agent.md +54 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-validator.agent.md +69 -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/agents/security-expert.agent.md +39 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/agents/ux-ui-expert.agent.md +45 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-calendar.md +151 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-chart.md +148 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-dashboard.md +135 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-form.md +128 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-login.md +160 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-map.md +172 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-route.md +211 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-screen.md +118 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-table.md +156 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/add-tests.md +269 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/mock-backend.md +139 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +192 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-form.md +268 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-page.md +203 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-query.md +287 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/new-table.md +299 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +48 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/refactor-ui.md +94 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +93 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/hooks/checkFileLength.ts +69 -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/mcp.json +17 -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 +190 -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/mock-data.mdc +61 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +47 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +40 -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 +175 -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 +304 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/distill/SKILL.md +122 -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 +37 -0
- package/dist/templates/frontend/hub-pre-sales/README.md +108 -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 +82 -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/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/agents/pre-sales-builder.agent.md +92 -77
- package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
- package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
- package/dist/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
- package/dist/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
- package/dist/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
- package/dist/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
- package/dist/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/dist/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
- package/dist/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
- package/dist/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
- package/dist/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
- package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
- package/dist/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
- 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 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
- package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
- package/dist/templates/frontend/pre-sales/.impeccable.md +26 -0
- package/dist/templates/frontend/pre-sales/index.html +11 -2
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
- package/dist/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
- 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 -58
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
- package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
- package/dist/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
- package/dist/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
- package/dist/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
- 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 -182
- package/dist/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
- package/dist/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
- package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
- package/dist/templates/frontend/pre-sales/src/index.css +282 -134
- package/dist/templates/frontend/pre-sales/src/main.tsx +3 -2
- package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
- package/dist/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
- package/dist/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
- package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
- package/dist/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
- package/dist/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
- package/dist/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
- package/package.json +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/agents/frontend-senior.agent.md +49 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-builder.agent.md +98 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-refactor.agent.md +54 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-validator.agent.md +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/security-expert.agent.md +39 -0
- package/templates/frontend/hub-pre-sales/.cursor/agents/ux-ui-expert.agent.md +45 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-calendar.md +151 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-chart.md +148 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-dashboard.md +135 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-form.md +128 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-login.md +160 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-map.md +172 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-route.md +211 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-screen.md +118 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-table.md +156 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-tests.md +269 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/mock-backend.md +139 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +192 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-form.md +268 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-page.md +203 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-query.md +287 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-table.md +299 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +48 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/refactor-ui.md +94 -0
- package/templates/frontend/hub-pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +93 -0
- package/templates/frontend/hub-pre-sales/.cursor/hooks/checkFileLength.ts +69 -0
- package/templates/frontend/hub-pre-sales/.cursor/hooks/injectPreSalesContext.ts +103 -0
- package/templates/frontend/hub-pre-sales/.cursor/hooks.json +23 -0
- package/templates/frontend/hub-pre-sales/.cursor/mcp.json +17 -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 +190 -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/mock-data.mdc +61 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +47 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +40 -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 +175 -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 +304 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/distill/SKILL.md +122 -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 +37 -0
- package/templates/frontend/hub-pre-sales/README.md +108 -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 +82 -0
- package/templates/frontend/hub-pre-sales/pnpm-lock.yaml +6575 -0
- package/templates/frontend/hub-pre-sales/pnpm-workspace.yaml +5 -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/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/agents/pre-sales-builder.agent.md +92 -77
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
- package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
- package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
- package/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
- package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
- package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
- package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
- package/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
- package/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
- package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
- package/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
- package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
- package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
- package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
- package/templates/frontend/pre-sales/.impeccable.md +26 -0
- package/templates/frontend/pre-sales/index.html +11 -2
- package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -0
- package/templates/frontend/pre-sales/skills-lock.json +10 -0
- package/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
- package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
- package/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
- 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 -58
- package/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
- package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
- package/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
- package/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
- package/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
- package/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
- package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -182
- package/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
- package/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
- package/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
- package/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
- package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
- package/templates/frontend/pre-sales/src/index.css +282 -134
- package/templates/frontend/pre-sales/src/main.tsx +3 -2
- package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
- package/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
- package/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
- package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
- package/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
- package/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
- package/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/error-boundary.tsx
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// src/components/ErrorBoundary.tsx
|
|
2
|
+
import { Component, type ReactNode } from 'react'
|
|
3
|
+
import { QueryErrorResetBoundary } from '@tanstack/react-query'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Props and State types
|
|
7
|
+
*/
|
|
8
|
+
type ErrorBoundaryProps = {
|
|
9
|
+
children: ReactNode
|
|
10
|
+
fallback?: (error: Error, reset: () => void) => ReactNode
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type ErrorBoundaryState = {
|
|
14
|
+
hasError: boolean
|
|
15
|
+
error: Error | null
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* React Error Boundary Class Component
|
|
20
|
+
*
|
|
21
|
+
* Required because error boundaries must be class components
|
|
22
|
+
*/
|
|
23
|
+
class ErrorBoundaryClass extends Component<
|
|
24
|
+
ErrorBoundaryProps & { onReset?: () => void },
|
|
25
|
+
ErrorBoundaryState
|
|
26
|
+
> {
|
|
27
|
+
constructor(props: ErrorBoundaryProps & { onReset?: () => void }) {
|
|
28
|
+
super(props)
|
|
29
|
+
this.state = { hasError: false, error: null }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getDerivedStateFromError(error: Error): ErrorBoundaryState {
|
|
33
|
+
return { hasError: true, error }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
|
37
|
+
// Log error to error reporting service
|
|
38
|
+
console.error('Error caught by boundary:', error, errorInfo)
|
|
39
|
+
|
|
40
|
+
// Example: Send to Sentry, LogRocket, etc.
|
|
41
|
+
// Sentry.captureException(error, { contexts: { react: errorInfo } })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
handleReset = () => {
|
|
45
|
+
// Call TanStack Query reset if provided
|
|
46
|
+
this.props.onReset?.()
|
|
47
|
+
|
|
48
|
+
// Reset error boundary state
|
|
49
|
+
this.setState({ hasError: false, error: null })
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
render() {
|
|
53
|
+
if (this.state.hasError && this.state.error) {
|
|
54
|
+
// Use custom fallback if provided
|
|
55
|
+
if (this.props.fallback) {
|
|
56
|
+
return this.props.fallback(this.state.error, this.handleReset)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Default error UI
|
|
60
|
+
return (
|
|
61
|
+
<div
|
|
62
|
+
style={{
|
|
63
|
+
padding: '2rem',
|
|
64
|
+
border: '2px solid #ef4444',
|
|
65
|
+
borderRadius: '8px',
|
|
66
|
+
backgroundColor: '#fee',
|
|
67
|
+
}}
|
|
68
|
+
>
|
|
69
|
+
<h2>Something went wrong</h2>
|
|
70
|
+
<details style={{ whiteSpace: 'pre-wrap', marginTop: '1rem' }}>
|
|
71
|
+
<summary>Error details</summary>
|
|
72
|
+
{this.state.error.message}
|
|
73
|
+
{this.state.error.stack && (
|
|
74
|
+
<pre style={{ marginTop: '1rem', fontSize: '0.875rem' }}>
|
|
75
|
+
{this.state.error.stack}
|
|
76
|
+
</pre>
|
|
77
|
+
)}
|
|
78
|
+
</details>
|
|
79
|
+
<button
|
|
80
|
+
onClick={this.handleReset}
|
|
81
|
+
style={{
|
|
82
|
+
marginTop: '1rem',
|
|
83
|
+
padding: '0.5rem 1rem',
|
|
84
|
+
backgroundColor: '#3b82f6',
|
|
85
|
+
color: 'white',
|
|
86
|
+
border: 'none',
|
|
87
|
+
borderRadius: '4px',
|
|
88
|
+
cursor: 'pointer',
|
|
89
|
+
}}
|
|
90
|
+
>
|
|
91
|
+
Try again
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return this.props.children
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Error Boundary with TanStack Query Reset
|
|
103
|
+
*
|
|
104
|
+
* Wraps components and catches errors thrown by queries
|
|
105
|
+
* with throwOnError: true
|
|
106
|
+
*/
|
|
107
|
+
export function ErrorBoundary({ children, fallback }: ErrorBoundaryProps) {
|
|
108
|
+
return (
|
|
109
|
+
<QueryErrorResetBoundary>
|
|
110
|
+
{({ reset }) => (
|
|
111
|
+
<ErrorBoundaryClass onReset={reset} fallback={fallback}>
|
|
112
|
+
{children}
|
|
113
|
+
</ErrorBoundaryClass>
|
|
114
|
+
)}
|
|
115
|
+
</QueryErrorResetBoundary>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Usage Examples
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
// Example 1: Wrap entire app
|
|
124
|
+
export function AppWithErrorBoundary() {
|
|
125
|
+
return (
|
|
126
|
+
<ErrorBoundary>
|
|
127
|
+
<App />
|
|
128
|
+
</ErrorBoundary>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Example 2: Wrap specific features
|
|
133
|
+
export function UserProfileWithErrorBoundary() {
|
|
134
|
+
return (
|
|
135
|
+
<ErrorBoundary>
|
|
136
|
+
<UserProfile />
|
|
137
|
+
</ErrorBoundary>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Example 3: Custom error UI
|
|
142
|
+
export function CustomErrorBoundary({ children }: { children: ReactNode }) {
|
|
143
|
+
return (
|
|
144
|
+
<ErrorBoundary
|
|
145
|
+
fallback={(error, reset) => (
|
|
146
|
+
<div className="error-container">
|
|
147
|
+
<h1>Oops!</h1>
|
|
148
|
+
<p>We encountered an error: {error.message}</p>
|
|
149
|
+
<button onClick={reset}>Retry</button>
|
|
150
|
+
<a href="/">Go Home</a>
|
|
151
|
+
</div>
|
|
152
|
+
)}
|
|
153
|
+
>
|
|
154
|
+
{children}
|
|
155
|
+
</ErrorBoundary>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Using throwOnError with Queries
|
|
161
|
+
*
|
|
162
|
+
* Queries can throw errors to error boundaries
|
|
163
|
+
*/
|
|
164
|
+
import { useQuery } from '@tanstack/react-query'
|
|
165
|
+
|
|
166
|
+
// Example 1: Always throw errors
|
|
167
|
+
function UserData({ id }: { id: number }) {
|
|
168
|
+
const { data } = useQuery({
|
|
169
|
+
queryKey: ['user', id],
|
|
170
|
+
queryFn: async () => {
|
|
171
|
+
const response = await fetch(`/api/users/${id}`)
|
|
172
|
+
if (!response.ok) throw new Error('User not found')
|
|
173
|
+
return response.json()
|
|
174
|
+
},
|
|
175
|
+
throwOnError: true, // Throw to error boundary
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
return <div>{data.name}</div>
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Example 2: Conditional throwing (only server errors)
|
|
182
|
+
function ConditionalErrorThrowing({ id }: { id: number }) {
|
|
183
|
+
const { data } = useQuery({
|
|
184
|
+
queryKey: ['user', id],
|
|
185
|
+
queryFn: async () => {
|
|
186
|
+
const response = await fetch(`/api/users/${id}`)
|
|
187
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`)
|
|
188
|
+
return response.json()
|
|
189
|
+
},
|
|
190
|
+
throwOnError: (error) => {
|
|
191
|
+
// Only throw 5xx server errors to boundary
|
|
192
|
+
// Handle 4xx client errors locally
|
|
193
|
+
return error.message.includes('5')
|
|
194
|
+
},
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
return <div>{data?.name ?? 'Not found'}</div>
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Multiple Error Boundaries (Layered)
|
|
202
|
+
*
|
|
203
|
+
* Place boundaries at different levels for granular error handling
|
|
204
|
+
*/
|
|
205
|
+
export function LayeredErrorBoundaries() {
|
|
206
|
+
return (
|
|
207
|
+
// App-level boundary
|
|
208
|
+
<ErrorBoundary fallback={(error) => <AppCrashScreen error={error} />}>
|
|
209
|
+
<Header />
|
|
210
|
+
|
|
211
|
+
{/* Feature-level boundary */}
|
|
212
|
+
<ErrorBoundary fallback={(error) => <FeatureError error={error} />}>
|
|
213
|
+
<UserProfile />
|
|
214
|
+
</ErrorBoundary>
|
|
215
|
+
|
|
216
|
+
{/* Another feature boundary */}
|
|
217
|
+
<ErrorBoundary>
|
|
218
|
+
<TodoList />
|
|
219
|
+
</ErrorBoundary>
|
|
220
|
+
|
|
221
|
+
<Footer />
|
|
222
|
+
</ErrorBoundary>
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Key concepts:
|
|
228
|
+
*
|
|
229
|
+
* 1. QueryErrorResetBoundary: Provides reset function for TanStack Query
|
|
230
|
+
* 2. throwOnError: Makes query throw errors to boundary
|
|
231
|
+
* 3. Layered boundaries: Isolate failures to specific features
|
|
232
|
+
* 4. Custom fallbacks: Control error UI per boundary
|
|
233
|
+
* 5. Error logging: componentDidCatch for monitoring
|
|
234
|
+
*
|
|
235
|
+
* Best practices:
|
|
236
|
+
* ✅ Always wrap app in error boundary
|
|
237
|
+
* ✅ Use throwOnError for critical errors only
|
|
238
|
+
* ✅ Provide helpful error messages to users
|
|
239
|
+
* ✅ Log errors to monitoring service
|
|
240
|
+
* ✅ Offer reset/retry functionality
|
|
241
|
+
* ❌ Don't catch all errors - use local error states when appropriate
|
|
242
|
+
* ❌ Don't throw for expected errors (404, validation)
|
|
243
|
+
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app-with-tanstack-query",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react": "^18.3.1",
|
|
14
|
+
"react-dom": "^18.3.1",
|
|
15
|
+
"@tanstack/react-query": "^5.90.5"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@tanstack/react-query-devtools": "^5.90.2",
|
|
19
|
+
"@tanstack/eslint-plugin-query": "^5.90.2",
|
|
20
|
+
"@types/react": "^18.3.12",
|
|
21
|
+
"@types/react-dom": "^18.3.1",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
23
|
+
"@typescript-eslint/parser": "^8.15.0",
|
|
24
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
25
|
+
"eslint": "^9.16.0",
|
|
26
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
27
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
28
|
+
"typescript": "^5.6.3",
|
|
29
|
+
"vite": "^6.0.1"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-query/templates/provider-setup.tsx
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/main.tsx
|
|
2
|
+
import { StrictMode } from 'react'
|
|
3
|
+
import { createRoot } from 'react-dom/client'
|
|
4
|
+
import { QueryClientProvider } from '@tanstack/react-query'
|
|
5
|
+
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
|
6
|
+
import { queryClient } from './lib/query-client'
|
|
7
|
+
import App from './App'
|
|
8
|
+
import './index.css'
|
|
9
|
+
|
|
10
|
+
createRoot(document.getElementById('root')!).render(
|
|
11
|
+
<StrictMode>
|
|
12
|
+
<QueryClientProvider client={queryClient}>
|
|
13
|
+
<App />
|
|
14
|
+
{/* DevTools are automatically removed in production builds */}
|
|
15
|
+
<ReactQueryDevtools
|
|
16
|
+
initialIsOpen={false}
|
|
17
|
+
buttonPosition="bottom-right"
|
|
18
|
+
position="bottom"
|
|
19
|
+
/>
|
|
20
|
+
</QueryClientProvider>
|
|
21
|
+
</StrictMode>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Important notes:
|
|
26
|
+
*
|
|
27
|
+
* 1. QueryClientProvider must wrap all components that use TanStack Query hooks
|
|
28
|
+
* 2. DevTools must be inside the provider
|
|
29
|
+
* 3. DevTools are tree-shaken in production (safe to leave in code)
|
|
30
|
+
* 4. Only create ONE QueryClient instance for entire app (imported from query-client.ts)
|
|
31
|
+
*
|
|
32
|
+
* DevTools configuration options:
|
|
33
|
+
* - initialIsOpen: true/false - Start open or closed
|
|
34
|
+
* - buttonPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right"
|
|
35
|
+
* - position: "top" | "bottom" | "left" | "right"
|
|
36
|
+
* - toggleButtonProps: Custom button styles
|
|
37
|
+
* - panelProps: Custom panel styles
|
|
38
|
+
*
|
|
39
|
+
* Example with custom styles:
|
|
40
|
+
* <ReactQueryDevtools
|
|
41
|
+
* initialIsOpen={false}
|
|
42
|
+
* buttonPosition="bottom-right"
|
|
43
|
+
* toggleButtonProps={{
|
|
44
|
+
* style: { marginBottom: '4rem' }
|
|
45
|
+
* }}
|
|
46
|
+
* panelProps={{
|
|
47
|
+
* style: { height: '500px' }
|
|
48
|
+
* }}
|
|
49
|
+
* />
|
|
50
|
+
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// src/lib/query-client.ts
|
|
2
|
+
import { QueryClient } from '@tanstack/react-query'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* QueryClient configuration for TanStack Query v5
|
|
6
|
+
*
|
|
7
|
+
* Key settings:
|
|
8
|
+
* - staleTime: How long data is fresh (won't refetch)
|
|
9
|
+
* - gcTime: How long inactive data stays in cache (garbage collection time)
|
|
10
|
+
* - retry: Number of retry attempts on failure
|
|
11
|
+
* - refetchOnWindowFocus: Refetch when window regains focus
|
|
12
|
+
*/
|
|
13
|
+
export const queryClient = new QueryClient({
|
|
14
|
+
defaultOptions: {
|
|
15
|
+
queries: {
|
|
16
|
+
// Data is fresh for 5 minutes (won't refetch during this time)
|
|
17
|
+
staleTime: 1000 * 60 * 5,
|
|
18
|
+
|
|
19
|
+
// Inactive data stays in cache for 1 hour before garbage collection
|
|
20
|
+
gcTime: 1000 * 60 * 60,
|
|
21
|
+
|
|
22
|
+
// Retry failed requests with smart logic
|
|
23
|
+
retry: (failureCount, error) => {
|
|
24
|
+
// Don't retry on 404s
|
|
25
|
+
if (error instanceof Response && error.status === 404) {
|
|
26
|
+
return false
|
|
27
|
+
}
|
|
28
|
+
// Retry up to 3 times for other errors
|
|
29
|
+
return failureCount < 3
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
// Don't refetch on window focus (can be annoying during dev)
|
|
33
|
+
// Set to true for real-time data (stock prices, notifications)
|
|
34
|
+
refetchOnWindowFocus: false,
|
|
35
|
+
|
|
36
|
+
// Refetch when network reconnects
|
|
37
|
+
refetchOnReconnect: true,
|
|
38
|
+
|
|
39
|
+
// Refetch on component mount if data is stale
|
|
40
|
+
refetchOnMount: true,
|
|
41
|
+
},
|
|
42
|
+
mutations: {
|
|
43
|
+
// Don't retry mutations by default (usually not wanted)
|
|
44
|
+
retry: 0,
|
|
45
|
+
|
|
46
|
+
// Global mutation error handler (optional)
|
|
47
|
+
onError: (error) => {
|
|
48
|
+
console.error('Mutation error:', error)
|
|
49
|
+
// Add global error handling here (toast, alert, etc.)
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Adjust these settings based on your needs:
|
|
57
|
+
*
|
|
58
|
+
* For real-time data (stock prices, notifications):
|
|
59
|
+
* - staleTime: 0 (always stale, refetch frequently)
|
|
60
|
+
* - refetchOnWindowFocus: true
|
|
61
|
+
* - refetchInterval: 1000 * 30 (refetch every 30s)
|
|
62
|
+
*
|
|
63
|
+
* For static data (user settings, app config):
|
|
64
|
+
* - staleTime: Infinity (never stale)
|
|
65
|
+
* - refetchOnWindowFocus: false
|
|
66
|
+
* - refetchOnMount: false
|
|
67
|
+
*
|
|
68
|
+
* For moderate data (todos, posts):
|
|
69
|
+
* - staleTime: 1000 * 60 * 5 (5 minutes)
|
|
70
|
+
* - refetchOnWindowFocus: false
|
|
71
|
+
* - refetchOnMount: true
|
|
72
|
+
*/
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// src/hooks/useInfiniteTodos.ts
|
|
2
|
+
import { useInfiniteQuery } from '@tanstack/react-query'
|
|
3
|
+
import { useEffect, useRef } from 'react'
|
|
4
|
+
import type { Todo } from './useTodos'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Paginated response type
|
|
8
|
+
*/
|
|
9
|
+
type TodosPage = {
|
|
10
|
+
data: Todo[]
|
|
11
|
+
nextCursor: number | null
|
|
12
|
+
previousCursor: number | null
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Fetch paginated todos
|
|
17
|
+
*
|
|
18
|
+
* In real API: cursor would be offset, page number, or last item ID
|
|
19
|
+
*/
|
|
20
|
+
async function fetchTodosPage({ pageParam }: { pageParam: number }): Promise<TodosPage> {
|
|
21
|
+
const limit = 20
|
|
22
|
+
const start = pageParam * limit
|
|
23
|
+
const end = start + limit
|
|
24
|
+
|
|
25
|
+
const response = await fetch(
|
|
26
|
+
`https://jsonplaceholder.typicode.com/todos?_start=${start}&_limit=${limit}`
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
if (!response.ok) {
|
|
30
|
+
throw new Error('Failed to fetch todos')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const data: Todo[] = await response.json()
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
data,
|
|
37
|
+
nextCursor: data.length === limit ? pageParam + 1 : null,
|
|
38
|
+
previousCursor: pageParam > 0 ? pageParam - 1 : null,
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Infinite query hook
|
|
44
|
+
*
|
|
45
|
+
* Usage:
|
|
46
|
+
* const { data, fetchNextPage, hasNextPage, isFetchingNextPage } = useInfiniteTodos()
|
|
47
|
+
*/
|
|
48
|
+
export function useInfiniteTodos() {
|
|
49
|
+
return useInfiniteQuery({
|
|
50
|
+
queryKey: ['todos', 'infinite'],
|
|
51
|
+
queryFn: fetchTodosPage,
|
|
52
|
+
|
|
53
|
+
// v5 REQUIRES initialPageParam (was optional in v4)
|
|
54
|
+
initialPageParam: 0,
|
|
55
|
+
|
|
56
|
+
// Determine if there are more pages
|
|
57
|
+
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
58
|
+
|
|
59
|
+
// Optional: Determine if there are previous pages (bidirectional)
|
|
60
|
+
getPreviousPageParam: (firstPage) => firstPage.previousCursor,
|
|
61
|
+
|
|
62
|
+
// How many pages to keep in memory (default: Infinity)
|
|
63
|
+
maxPages: undefined,
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Component with manual "Load More" button
|
|
69
|
+
*/
|
|
70
|
+
export function InfiniteTodosManual() {
|
|
71
|
+
const {
|
|
72
|
+
data,
|
|
73
|
+
fetchNextPage,
|
|
74
|
+
hasNextPage,
|
|
75
|
+
isFetchingNextPage,
|
|
76
|
+
isPending,
|
|
77
|
+
isError,
|
|
78
|
+
error,
|
|
79
|
+
} = useInfiniteTodos()
|
|
80
|
+
|
|
81
|
+
if (isPending) return <div>Loading...</div>
|
|
82
|
+
if (isError) return <div>Error: {error.message}</div>
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div>
|
|
86
|
+
<h1>Infinite Todos (Manual)</h1>
|
|
87
|
+
|
|
88
|
+
{/* Render all pages */}
|
|
89
|
+
{data.pages.map((page, i) => (
|
|
90
|
+
<div key={i}>
|
|
91
|
+
<h2>Page {i + 1}</h2>
|
|
92
|
+
<ul>
|
|
93
|
+
{page.data.map((todo) => (
|
|
94
|
+
<li key={todo.id}>
|
|
95
|
+
<input type="checkbox" checked={todo.completed} readOnly />
|
|
96
|
+
{todo.title}
|
|
97
|
+
</li>
|
|
98
|
+
))}
|
|
99
|
+
</ul>
|
|
100
|
+
</div>
|
|
101
|
+
))}
|
|
102
|
+
|
|
103
|
+
{/* Load more button */}
|
|
104
|
+
<button
|
|
105
|
+
onClick={() => fetchNextPage()}
|
|
106
|
+
disabled={!hasNextPage || isFetchingNextPage}
|
|
107
|
+
>
|
|
108
|
+
{isFetchingNextPage
|
|
109
|
+
? 'Loading more...'
|
|
110
|
+
: hasNextPage
|
|
111
|
+
? 'Load More'
|
|
112
|
+
: 'No more todos'}
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Component with automatic infinite scroll
|
|
120
|
+
* Uses Intersection Observer to detect when user scrolls to bottom
|
|
121
|
+
*/
|
|
122
|
+
export function InfiniteTodosAuto() {
|
|
123
|
+
const {
|
|
124
|
+
data,
|
|
125
|
+
fetchNextPage,
|
|
126
|
+
hasNextPage,
|
|
127
|
+
isFetchingNextPage,
|
|
128
|
+
isPending,
|
|
129
|
+
isError,
|
|
130
|
+
error,
|
|
131
|
+
} = useInfiniteTodos()
|
|
132
|
+
|
|
133
|
+
const loadMoreRef = useRef<HTMLDivElement>(null)
|
|
134
|
+
|
|
135
|
+
// Intersection Observer for automatic loading
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
const observer = new IntersectionObserver(
|
|
138
|
+
(entries) => {
|
|
139
|
+
// When sentinel element is visible and there are more pages
|
|
140
|
+
if (entries[0].isIntersecting && hasNextPage && !isFetchingNextPage) {
|
|
141
|
+
fetchNextPage()
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{ threshold: 0.1 } // Trigger when 10% of element is visible
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
if (loadMoreRef.current) {
|
|
148
|
+
observer.observe(loadMoreRef.current)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return () => {
|
|
152
|
+
observer.disconnect()
|
|
153
|
+
}
|
|
154
|
+
}, [fetchNextPage, hasNextPage, isFetchingNextPage])
|
|
155
|
+
|
|
156
|
+
if (isPending) return <div>Loading...</div>
|
|
157
|
+
if (isError) return <div>Error: {error.message}</div>
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<div>
|
|
161
|
+
<h1>Infinite Todos (Auto)</h1>
|
|
162
|
+
|
|
163
|
+
{/* Render all pages */}
|
|
164
|
+
{data.pages.map((page, i) => (
|
|
165
|
+
<div key={i}>
|
|
166
|
+
{page.data.map((todo) => (
|
|
167
|
+
<div key={todo.id}>
|
|
168
|
+
<input type="checkbox" checked={todo.completed} readOnly />
|
|
169
|
+
{todo.title}
|
|
170
|
+
</div>
|
|
171
|
+
))}
|
|
172
|
+
</div>
|
|
173
|
+
))}
|
|
174
|
+
|
|
175
|
+
{/* Sentinel element - triggers loading when scrolled into view */}
|
|
176
|
+
<div ref={loadMoreRef}>
|
|
177
|
+
{isFetchingNextPage ? (
|
|
178
|
+
<div>Loading more...</div>
|
|
179
|
+
) : hasNextPage ? (
|
|
180
|
+
<div>Scroll to load more</div>
|
|
181
|
+
) : (
|
|
182
|
+
<div>No more todos</div>
|
|
183
|
+
)}
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Key concepts:
|
|
191
|
+
*
|
|
192
|
+
* 1. data.pages: Array of all fetched pages
|
|
193
|
+
* 2. fetchNextPage(): Loads next page
|
|
194
|
+
* 3. hasNextPage: Boolean if more pages available
|
|
195
|
+
* 4. isFetchingNextPage: Loading state for next page
|
|
196
|
+
* 5. initialPageParam: Starting cursor (REQUIRED in v5)
|
|
197
|
+
* 6. getNextPageParam: Function returning next cursor or null
|
|
198
|
+
*
|
|
199
|
+
* Access all data:
|
|
200
|
+
* const allTodos = data.pages.flatMap(page => page.data)
|
|
201
|
+
*
|
|
202
|
+
* Bidirectional scrolling:
|
|
203
|
+
* - Add getPreviousPageParam
|
|
204
|
+
* - Use fetchPreviousPage() and hasPreviousPage
|
|
205
|
+
*
|
|
206
|
+
* Performance:
|
|
207
|
+
* - Use maxPages to limit memory (e.g., maxPages: 10)
|
|
208
|
+
* - Old pages are garbage collected automatically
|
|
209
|
+
*
|
|
210
|
+
* Common patterns:
|
|
211
|
+
* - Manual: Load More button
|
|
212
|
+
* - Auto: Intersection Observer
|
|
213
|
+
* - Virtualized: react-window or react-virtual for huge lists
|
|
214
|
+
*/
|