create-huenei-template 0.2.17 → 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/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
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# Server-Side Table Patterns
|
|
2
|
+
|
|
3
|
+
Complete guide to implementing server-side pagination, filtering, and sorting with TanStack Table.
|
|
4
|
+
|
|
5
|
+
## Why Server-Side?
|
|
6
|
+
|
|
7
|
+
**Use server-side when:**
|
|
8
|
+
- Dataset has 1000+ rows
|
|
9
|
+
- Data changes frequently
|
|
10
|
+
- Want to reduce client memory usage
|
|
11
|
+
- Need real-time filtering/sorting from database
|
|
12
|
+
|
|
13
|
+
**Use client-side when:**
|
|
14
|
+
- Dataset <1000 rows
|
|
15
|
+
- Data rarely changes
|
|
16
|
+
- No backend API available
|
|
17
|
+
- Need instant interactions (no network delay)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Pattern 1: Server-Side Pagination
|
|
22
|
+
|
|
23
|
+
### Backend (Cloudflare Workers API)
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
export async function onRequestGet({ request, env }: { request: Request; env: Env }) {
|
|
27
|
+
const url = new URL(request.url)
|
|
28
|
+
const page = Number(url.searchParams.get('page')) || 0
|
|
29
|
+
const pageSize = Number(url.searchParams.get('pageSize')) || 20
|
|
30
|
+
const offset = page * pageSize
|
|
31
|
+
|
|
32
|
+
const { results } = await env.DB.prepare(`
|
|
33
|
+
SELECT * FROM users
|
|
34
|
+
LIMIT ? OFFSET ?
|
|
35
|
+
`).bind(pageSize, offset).all()
|
|
36
|
+
|
|
37
|
+
const { total } = await env.DB.prepare(`
|
|
38
|
+
SELECT COUNT(*) as total FROM users
|
|
39
|
+
`).first<{ total: number }>()
|
|
40
|
+
|
|
41
|
+
return Response.json({
|
|
42
|
+
data: results,
|
|
43
|
+
pagination: {
|
|
44
|
+
page,
|
|
45
|
+
pageSize,
|
|
46
|
+
total: total ?? 0,
|
|
47
|
+
pageCount: Math.ceil((total ?? 0) / pageSize),
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Frontend
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const [pagination, setPagination] = useState<PaginationState>({
|
|
57
|
+
pageIndex: 0,
|
|
58
|
+
pageSize: 20,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
const { data } = useQuery({
|
|
62
|
+
queryKey: ['users', pagination.pageIndex, pagination.pageSize],
|
|
63
|
+
queryFn: async () => {
|
|
64
|
+
const response = await fetch(
|
|
65
|
+
`/api/users?page=${pagination.pageIndex}&pageSize=${pagination.pageSize}`
|
|
66
|
+
)
|
|
67
|
+
return response.json()
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const table = useReactTable({
|
|
72
|
+
data: data?.data ?? [],
|
|
73
|
+
columns,
|
|
74
|
+
getCoreRowModel: getCoreRowModel(),
|
|
75
|
+
manualPagination: true, // CRITICAL
|
|
76
|
+
pageCount: data?.pagination.pageCount ?? 0,
|
|
77
|
+
state: { pagination },
|
|
78
|
+
onPaginationChange: setPagination,
|
|
79
|
+
})
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Pattern 2: Server-Side Filtering
|
|
85
|
+
|
|
86
|
+
### Backend
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
export async function onRequestGet({ request, env }) {
|
|
90
|
+
const url = new URL(request.url)
|
|
91
|
+
const search = url.searchParams.get('search') || ''
|
|
92
|
+
|
|
93
|
+
let query = 'SELECT * FROM users'
|
|
94
|
+
const params = []
|
|
95
|
+
|
|
96
|
+
if (search) {
|
|
97
|
+
query += ' WHERE name LIKE ? OR email LIKE ?'
|
|
98
|
+
params.push(`%${search}%`, `%${search}%`)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const { results } = await env.DB.prepare(query).bind(...params).all()
|
|
102
|
+
|
|
103
|
+
return Response.json({ data: results })
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Frontend
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])
|
|
111
|
+
const search = columnFilters.find(f => f.id === 'search')?.value as string || ''
|
|
112
|
+
|
|
113
|
+
const { data } = useQuery({
|
|
114
|
+
queryKey: ['users', search], // Include filter in query key
|
|
115
|
+
queryFn: async () => {
|
|
116
|
+
const response = await fetch(`/api/users?search=${search}`)
|
|
117
|
+
return response.json()
|
|
118
|
+
},
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
const table = useReactTable({
|
|
122
|
+
data: data?.data ?? [],
|
|
123
|
+
columns,
|
|
124
|
+
getCoreRowModel: getCoreRowModel(),
|
|
125
|
+
manualFiltering: true, // CRITICAL
|
|
126
|
+
state: { columnFilters },
|
|
127
|
+
onColumnFiltersChange: setColumnFilters,
|
|
128
|
+
})
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Pattern 3: Server-Side Sorting
|
|
134
|
+
|
|
135
|
+
### Backend
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
export async function onRequestGet({ request, env }) {
|
|
139
|
+
const url = new URL(request.url)
|
|
140
|
+
const sortBy = url.searchParams.get('sortBy') || 'created_at'
|
|
141
|
+
const sortOrder = url.searchParams.get('sortOrder') || 'desc'
|
|
142
|
+
|
|
143
|
+
// SECURITY: Validate sort column to prevent SQL injection
|
|
144
|
+
const allowedColumns = ['id', 'name', 'email', 'created_at']
|
|
145
|
+
const allowedOrders = ['asc', 'desc']
|
|
146
|
+
|
|
147
|
+
if (!allowedColumns.includes(sortBy) || !allowedOrders.includes(sortOrder)) {
|
|
148
|
+
return Response.json({ error: 'Invalid sort parameters' }, { status: 400 })
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const { results } = await env.DB.prepare(`
|
|
152
|
+
SELECT * FROM users
|
|
153
|
+
ORDER BY ${sortBy} ${sortOrder.toUpperCase()}
|
|
154
|
+
`).all()
|
|
155
|
+
|
|
156
|
+
return Response.json({ data: results })
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Frontend
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
const [sorting, setSorting] = useState<SortingState>([])
|
|
164
|
+
|
|
165
|
+
const { data } = useQuery({
|
|
166
|
+
queryKey: ['users', sorting], // Include sorting in query key
|
|
167
|
+
queryFn: async () => {
|
|
168
|
+
const params = new URLSearchParams()
|
|
169
|
+
if (sorting.length > 0) {
|
|
170
|
+
params.append('sortBy', sorting[0].id)
|
|
171
|
+
params.append('sortOrder', sorting[0].desc ? 'desc' : 'asc')
|
|
172
|
+
}
|
|
173
|
+
const response = await fetch(`/api/users?${params}`)
|
|
174
|
+
return response.json()
|
|
175
|
+
},
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
const table = useReactTable({
|
|
179
|
+
data: data?.data ?? [],
|
|
180
|
+
columns,
|
|
181
|
+
getCoreRowModel: getCoreRowModel(),
|
|
182
|
+
manualSorting: true, // CRITICAL
|
|
183
|
+
state: { sorting },
|
|
184
|
+
onSortingChange: setSorting,
|
|
185
|
+
})
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Pattern 4: Combined (Pagination + Filtering + Sorting)
|
|
191
|
+
|
|
192
|
+
### Backend
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
export async function onRequestGet({ request, env }) {
|
|
196
|
+
const url = new URL(request.url)
|
|
197
|
+
|
|
198
|
+
// Parse all parameters
|
|
199
|
+
const page = Number(url.searchParams.get('page')) || 0
|
|
200
|
+
const pageSize = Number(url.searchParams.get('pageSize')) || 20
|
|
201
|
+
const search = url.searchParams.get('search') || ''
|
|
202
|
+
const sortBy = url.searchParams.get('sortBy') || 'created_at'
|
|
203
|
+
const sortOrder = url.searchParams.get('sortOrder') || 'desc'
|
|
204
|
+
|
|
205
|
+
const offset = page * pageSize
|
|
206
|
+
|
|
207
|
+
// Build dynamic query
|
|
208
|
+
let query = 'SELECT * FROM users'
|
|
209
|
+
let countQuery = 'SELECT COUNT(*) as total FROM users'
|
|
210
|
+
const params: (string | number)[] = []
|
|
211
|
+
const countParams: string[] = []
|
|
212
|
+
|
|
213
|
+
// Add WHERE clause
|
|
214
|
+
if (search) {
|
|
215
|
+
const whereClause = ' WHERE name LIKE ? OR email LIKE ?'
|
|
216
|
+
query += whereClause
|
|
217
|
+
countQuery += whereClause
|
|
218
|
+
params.push(`%${search}%`, `%${search}%`)
|
|
219
|
+
countParams.push(`%${search}%`, `%${search}%`)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Add ORDER BY (validate first!)
|
|
223
|
+
const allowedColumns = ['id', 'name', 'email', 'created_at']
|
|
224
|
+
if (allowedColumns.includes(sortBy)) {
|
|
225
|
+
query += ` ORDER BY ${sortBy} ${sortOrder.toUpperCase()}`
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Add LIMIT/OFFSET
|
|
229
|
+
query += ' LIMIT ? OFFSET ?'
|
|
230
|
+
params.push(pageSize, offset)
|
|
231
|
+
|
|
232
|
+
// Execute queries
|
|
233
|
+
const { results } = await env.DB.prepare(query).bind(...params).all()
|
|
234
|
+
const { total } = await env.DB.prepare(countQuery).bind(...countParams).first<{ total: number }>()
|
|
235
|
+
|
|
236
|
+
return Response.json({
|
|
237
|
+
data: results,
|
|
238
|
+
pagination: {
|
|
239
|
+
page,
|
|
240
|
+
pageSize,
|
|
241
|
+
total: total ?? 0,
|
|
242
|
+
pageCount: Math.ceil((total ?? 0) / pageSize),
|
|
243
|
+
},
|
|
244
|
+
})
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Frontend
|
|
249
|
+
|
|
250
|
+
```typescript
|
|
251
|
+
const [pagination, setPagination] = useState<PaginationState>({ pageIndex: 0, pageSize: 20 })
|
|
252
|
+
const [sorting, setSorting] = useState<SortingState>([])
|
|
253
|
+
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])
|
|
254
|
+
|
|
255
|
+
const search = columnFilters.find(f => f.id === 'search')?.value as string || ''
|
|
256
|
+
|
|
257
|
+
const { data } = useQuery({
|
|
258
|
+
queryKey: ['users', pagination, sorting, search], // Include ALL state
|
|
259
|
+
queryFn: async () => {
|
|
260
|
+
const params = new URLSearchParams({
|
|
261
|
+
page: pagination.pageIndex.toString(),
|
|
262
|
+
pageSize: pagination.pageSize.toString(),
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
if (sorting.length > 0) {
|
|
266
|
+
params.append('sortBy', sorting[0].id)
|
|
267
|
+
params.append('sortOrder', sorting[0].desc ? 'desc' : 'asc')
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (search) {
|
|
271
|
+
params.append('search', search)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const response = await fetch(`/api/users?${params}`)
|
|
275
|
+
return response.json()
|
|
276
|
+
},
|
|
277
|
+
placeholderData: (previousData) => previousData, // Keep old data while fetching
|
|
278
|
+
})
|
|
279
|
+
|
|
280
|
+
const table = useReactTable({
|
|
281
|
+
data: data?.data ?? [],
|
|
282
|
+
columns,
|
|
283
|
+
getCoreRowModel: getCoreRowModel(),
|
|
284
|
+
// Enable all server-side features
|
|
285
|
+
manualPagination: true,
|
|
286
|
+
manualSorting: true,
|
|
287
|
+
manualFiltering: true,
|
|
288
|
+
pageCount: data?.pagination.pageCount ?? 0,
|
|
289
|
+
state: {
|
|
290
|
+
pagination,
|
|
291
|
+
sorting,
|
|
292
|
+
columnFilters,
|
|
293
|
+
},
|
|
294
|
+
onPaginationChange: setPagination,
|
|
295
|
+
onSortingChange: setSorting,
|
|
296
|
+
onColumnFiltersChange: setColumnFilters,
|
|
297
|
+
})
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Common Mistakes
|
|
303
|
+
|
|
304
|
+
### ❌ Mistake 1: Forgetting `manual*` flags
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
// BAD: Table thinks pagination is client-side
|
|
308
|
+
const table = useReactTable({
|
|
309
|
+
data,
|
|
310
|
+
columns,
|
|
311
|
+
getCoreRowModel: getCoreRowModel(),
|
|
312
|
+
// Missing manualPagination: true
|
|
313
|
+
})
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### ❌ Mistake 2: Query key doesn't match state
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
// BAD: Changing page doesn't refetch
|
|
320
|
+
queryKey: ['users'], // Static key!
|
|
321
|
+
// Changing pagination.pageIndex won't trigger refetch
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### ❌ Mistake 3: SQL injection vulnerability
|
|
325
|
+
|
|
326
|
+
```typescript
|
|
327
|
+
// DANGEROUS: User input directly in SQL
|
|
328
|
+
const query = `SELECT * FROM users ORDER BY ${sortBy} ${sortOrder}`
|
|
329
|
+
// Attacker could set sortBy to "id; DROP TABLE users--"
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### ✅ Solution: Whitelist allowed values
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
const allowedColumns = ['id', 'name', 'email']
|
|
336
|
+
if (!allowedColumns.includes(sortBy)) {
|
|
337
|
+
return Response.json({ error: 'Invalid sort column' }, { status: 400 })
|
|
338
|
+
}
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Performance Tips
|
|
344
|
+
|
|
345
|
+
1. **Add database indexes** for sorted/filtered columns
|
|
346
|
+
2. **Use `placeholderData`** in TanStack Query to show old data while fetching
|
|
347
|
+
3. **Debounce search inputs** to reduce API calls
|
|
348
|
+
4. **Cache API responses** with TanStack Query's `staleTime`
|
|
349
|
+
5. **Use cursor-based pagination** for very large datasets (>100k rows)
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Further Reading
|
|
354
|
+
|
|
355
|
+
- [TanStack Table Pagination Docs](https://tanstack.com/table/latest/docs/guide/pagination)
|
|
356
|
+
- [TanStack Query Guide](~/.claude/skills/tanstack-query/SKILL.md)
|
|
357
|
+
- [Cloudflare D1 Guide](~/.claude/skills/cloudflare-d1/SKILL.md)
|
package/dist/templates/frontend/hub-pre-sales/.cursor/skills/tanstack-table/rules/tanstack-table.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
paths: "**/*.ts", "**/*.tsx", "**/table*.ts", "**/data-table*.ts"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# TanStack Table v8 Corrections
|
|
6
|
+
|
|
7
|
+
Claude's training may reference React Table v7. This project uses **TanStack Table v8**.
|
|
8
|
+
|
|
9
|
+
## Package Name Change
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# ❌ Old package (v7)
|
|
13
|
+
npm install react-table
|
|
14
|
+
|
|
15
|
+
# ✅ New package (v8)
|
|
16
|
+
npm install @tanstack/react-table
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Hook Changes
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
/* ❌ v7 useTable hook */
|
|
23
|
+
import { useTable, useSortBy, usePagination } from 'react-table'
|
|
24
|
+
const { getTableProps, getTableBodyProps, rows } = useTable(
|
|
25
|
+
{ columns, data },
|
|
26
|
+
useSortBy,
|
|
27
|
+
usePagination
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
/* ✅ v8 useReactTable */
|
|
31
|
+
import {
|
|
32
|
+
useReactTable,
|
|
33
|
+
getCoreRowModel,
|
|
34
|
+
getSortedRowModel,
|
|
35
|
+
getPaginationRowModel,
|
|
36
|
+
} from '@tanstack/react-table'
|
|
37
|
+
|
|
38
|
+
const table = useReactTable({
|
|
39
|
+
data,
|
|
40
|
+
columns,
|
|
41
|
+
getCoreRowModel: getCoreRowModel(),
|
|
42
|
+
getSortedRowModel: getSortedRowModel(),
|
|
43
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
44
|
+
})
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Column Definitions
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
/* ❌ v7 columns */
|
|
51
|
+
const columns = [
|
|
52
|
+
{ Header: 'Name', accessor: 'name' },
|
|
53
|
+
{ Header: 'Age', accessor: 'age' },
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
/* ✅ v8 columns with columnHelper */
|
|
57
|
+
import { createColumnHelper } from '@tanstack/react-table'
|
|
58
|
+
|
|
59
|
+
const columnHelper = createColumnHelper<Person>()
|
|
60
|
+
const columns = [
|
|
61
|
+
columnHelper.accessor('name', {
|
|
62
|
+
header: 'Name',
|
|
63
|
+
cell: (info) => info.getValue(),
|
|
64
|
+
}),
|
|
65
|
+
columnHelper.accessor('age', {
|
|
66
|
+
header: 'Age',
|
|
67
|
+
}),
|
|
68
|
+
]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Rendering Table
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
/* ❌ v7 rendering */
|
|
75
|
+
<table {...getTableProps()}>
|
|
76
|
+
<tbody {...getTableBodyProps()}>
|
|
77
|
+
{rows.map(row => (
|
|
78
|
+
<tr {...row.getRowProps()}>
|
|
79
|
+
{row.cells.map(cell => (
|
|
80
|
+
<td {...cell.getCellProps()}>{cell.render('Cell')}</td>
|
|
81
|
+
))}
|
|
82
|
+
</tr>
|
|
83
|
+
))}
|
|
84
|
+
</tbody>
|
|
85
|
+
</table>
|
|
86
|
+
|
|
87
|
+
/* ✅ v8 rendering */
|
|
88
|
+
<table>
|
|
89
|
+
<tbody>
|
|
90
|
+
{table.getRowModel().rows.map((row) => (
|
|
91
|
+
<tr key={row.id}>
|
|
92
|
+
{row.getVisibleCells().map((cell) => (
|
|
93
|
+
<td key={cell.id}>
|
|
94
|
+
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
95
|
+
</td>
|
|
96
|
+
))}
|
|
97
|
+
</tr>
|
|
98
|
+
))}
|
|
99
|
+
</tbody>
|
|
100
|
+
</table>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Sorting State
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
/* ❌ v7 sorting */
|
|
107
|
+
const { setSortBy } = useTable(...)
|
|
108
|
+
|
|
109
|
+
/* ✅ v8 sorting state */
|
|
110
|
+
const [sorting, setSorting] = useState<SortingState>([])
|
|
111
|
+
const table = useReactTable({
|
|
112
|
+
state: { sorting },
|
|
113
|
+
onSortingChange: setSorting,
|
|
114
|
+
getSortedRowModel: getSortedRowModel(),
|
|
115
|
+
})
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Pagination
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
/* ❌ v7 pagination */
|
|
122
|
+
const { pageIndex, pageSize, gotoPage } = useTable(...)
|
|
123
|
+
|
|
124
|
+
/* ✅ v8 pagination */
|
|
125
|
+
const [pagination, setPagination] = useState<PaginationState>({
|
|
126
|
+
pageIndex: 0,
|
|
127
|
+
pageSize: 10,
|
|
128
|
+
})
|
|
129
|
+
const table = useReactTable({
|
|
130
|
+
state: { pagination },
|
|
131
|
+
onPaginationChange: setPagination,
|
|
132
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
// Navigation
|
|
136
|
+
table.setPageIndex(0)
|
|
137
|
+
table.nextPage()
|
|
138
|
+
table.previousPage()
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Quick Fixes
|
|
142
|
+
|
|
143
|
+
| If Claude suggests... | Use instead... |
|
|
144
|
+
|----------------------|----------------|
|
|
145
|
+
| `npm install react-table` | `npm install @tanstack/react-table` |
|
|
146
|
+
| `useTable` | `useReactTable` |
|
|
147
|
+
| `Header: 'Name'` | `header: 'Name'` (lowercase) |
|
|
148
|
+
| `accessor: 'name'` | `columnHelper.accessor('name', {...})` |
|
|
149
|
+
| `getTableProps()` | Direct JSX (no spread props needed) |
|
|
150
|
+
| `row.cells` | `row.getVisibleCells()` |
|
|
151
|
+
| `cell.render('Cell')` | `flexRender(cell.column.columnDef.cell, cell.getContext())` |
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic Client-Side Table
|
|
3
|
+
*
|
|
4
|
+
* Simple TanStack Table example with local data.
|
|
5
|
+
* Use for: Small datasets (<1000 rows), all data available client-side
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { useReactTable, getCoreRowModel, ColumnDef, flexRender } from '@tanstack/react-table'
|
|
9
|
+
import { useMemo } from 'react'
|
|
10
|
+
|
|
11
|
+
interface User {
|
|
12
|
+
id: string
|
|
13
|
+
name: string
|
|
14
|
+
email: string
|
|
15
|
+
role: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Define columns outside component OR use useMemo to prevent infinite re-renders
|
|
19
|
+
const columns: ColumnDef<User>[] = [
|
|
20
|
+
{
|
|
21
|
+
accessorKey: 'id',
|
|
22
|
+
header: 'ID',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
accessorKey: 'name',
|
|
26
|
+
header: 'Name',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
accessorKey: 'email',
|
|
30
|
+
header: 'Email',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
accessorKey: 'role',
|
|
34
|
+
header: 'Role',
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
export function BasicClientTable() {
|
|
39
|
+
// CRITICAL: Memoize data to prevent infinite re-renders
|
|
40
|
+
const data = useMemo<User[]>(
|
|
41
|
+
() => [
|
|
42
|
+
{ id: '1', name: 'Alice Smith', email: 'alice@example.com', role: 'Admin' },
|
|
43
|
+
{ id: '2', name: 'Bob Johnson', email: 'bob@example.com', role: 'User' },
|
|
44
|
+
{ id: '3', name: 'Charlie Brown', email: 'charlie@example.com', role: 'User' },
|
|
45
|
+
{ id: '4', name: 'Diana Prince', email: 'diana@example.com', role: 'Editor' },
|
|
46
|
+
],
|
|
47
|
+
[]
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
const table = useReactTable({
|
|
51
|
+
data,
|
|
52
|
+
columns,
|
|
53
|
+
getCoreRowModel: getCoreRowModel(), // Required: Core functionality
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div className="p-4">
|
|
58
|
+
<h2 className="text-2xl font-bold mb-4">Users</h2>
|
|
59
|
+
|
|
60
|
+
<table className="w-full border-collapse border border-gray-300">
|
|
61
|
+
<thead>
|
|
62
|
+
{table.getHeaderGroups().map(headerGroup => (
|
|
63
|
+
<tr key={headerGroup.id} className="bg-gray-100">
|
|
64
|
+
{headerGroup.headers.map(header => (
|
|
65
|
+
<th
|
|
66
|
+
key={header.id}
|
|
67
|
+
className="border border-gray-300 px-4 py-2 text-left"
|
|
68
|
+
>
|
|
69
|
+
{header.isPlaceholder
|
|
70
|
+
? null
|
|
71
|
+
: flexRender(
|
|
72
|
+
header.column.columnDef.header,
|
|
73
|
+
header.getContext()
|
|
74
|
+
)}
|
|
75
|
+
</th>
|
|
76
|
+
))}
|
|
77
|
+
</tr>
|
|
78
|
+
))}
|
|
79
|
+
</thead>
|
|
80
|
+
<tbody>
|
|
81
|
+
{table.getRowModel().rows.map(row => (
|
|
82
|
+
<tr key={row.id} className="hover:bg-gray-50">
|
|
83
|
+
{row.getVisibleCells().map(cell => (
|
|
84
|
+
<td
|
|
85
|
+
key={cell.id}
|
|
86
|
+
className="border border-gray-300 px-4 py-2"
|
|
87
|
+
>
|
|
88
|
+
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
89
|
+
</td>
|
|
90
|
+
))}
|
|
91
|
+
</tr>
|
|
92
|
+
))}
|
|
93
|
+
</tbody>
|
|
94
|
+
</table>
|
|
95
|
+
|
|
96
|
+
<div className="mt-4 text-sm text-gray-600">
|
|
97
|
+
Showing {table.getRowModel().rows.length} rows
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
)
|
|
101
|
+
}
|