@skyroc/scripts 2.5.1 → 2.5.2
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/README.md +6 -3
- package/dist/cli.mjs +1 -1
- package/dist/{config-BKkdncJS.mjs → config-Cj9IzlRz.mjs} +105 -5
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/templates/admin/package.json +5 -1
- package/templates/admin/src/assets/svg-icon/logo.svg +1 -1
- package/templates/admin/uno.config.ts +1 -1
- package/templates/admin-root/.agents/skills/component-doc/SKILL.md +304 -0
- package/templates/admin-root/.agents/skills/component-refactoring/SKILL.md +483 -0
- package/templates/admin-root/.agents/skills/component-refactoring/references/complexity-patterns.md +493 -0
- package/templates/admin-root/.agents/skills/component-refactoring/references/component-splitting.md +477 -0
- package/templates/admin-root/.agents/skills/component-refactoring/references/hook-extraction.md +317 -0
- package/templates/admin-root/.agents/skills/doc-coauthoring/SKILL.md +375 -0
- package/templates/admin-root/.agents/skills/feature-dev/SKILL.md +78 -0
- package/templates/admin-root/.agents/skills/frontend-code-review/SKILL.md +73 -0
- package/templates/admin-root/.agents/skills/frontend-code-review/references/business-logic.md +15 -0
- package/templates/admin-root/.agents/skills/frontend-code-review/references/code-quality.md +44 -0
- package/templates/admin-root/.agents/skills/frontend-code-review/references/performance.md +45 -0
- package/templates/admin-root/.agents/skills/frontend-design/LICENSE.txt +177 -0
- package/templates/admin-root/.agents/skills/frontend-design/SKILL.md +42 -0
- package/templates/admin-root/.agents/skills/frontend-testing/SKILL.md +325 -0
- package/templates/admin-root/.agents/skills/frontend-testing/assets/component-test.template.tsx +293 -0
- package/templates/admin-root/.agents/skills/frontend-testing/assets/hook-test.template.ts +207 -0
- package/templates/admin-root/.agents/skills/frontend-testing/assets/utility-test.template.ts +154 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/async-testing.md +345 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/checklist.md +205 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/common-patterns.md +449 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/domain-components.md +523 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/mocking.md +512 -0
- package/templates/admin-root/.agents/skills/frontend-testing/references/workflow.md +269 -0
- package/templates/admin-root/.agents/skills/migrate-nativewind-to-uniwind/SKILL.md +734 -0
- package/templates/admin-root/.agents/skills/migrate-oxfmt/SKILL.md +202 -0
- package/templates/admin-root/.agents/skills/migrate-oxlint/SKILL.md +196 -0
- package/templates/admin-root/.agents/skills/native-component-doc/SKILL.md +245 -0
- package/templates/admin-root/.agents/skills/senior-frontend/SKILL.md +209 -0
- package/templates/admin-root/.agents/skills/senior-frontend/references/frontend_best_practices.md +103 -0
- package/templates/admin-root/.agents/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
- package/templates/admin-root/.agents/skills/senior-frontend/references/react_patterns.md +103 -0
- package/templates/admin-root/.agents/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
- package/templates/admin-root/.agents/skills/senior-frontend/scripts/component_generator.py +114 -0
- package/templates/admin-root/.agents/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
- package/templates/admin-root/.agents/skills/skill-creator/SKILL.md +355 -0
- package/templates/admin-root/.agents/skills/skill-creator/references/output-patterns.md +86 -0
- package/templates/admin-root/.agents/skills/skill-creator/references/workflows.md +28 -0
- package/templates/admin-root/.agents/skills/skill-creator/scripts/init_skill.py +300 -0
- package/templates/admin-root/.agents/skills/skill-creator/scripts/package_skill.py +110 -0
- package/templates/admin-root/.agents/skills/skill-creator/scripts/quick_validate.py +97 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/SKILL.md +163 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/acceptance-checklist.md +75 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/evidence-order.md +109 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/prd-rules.md +103 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/prototype-rules.md +85 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/scripts/verify-prototypes.mjs +144 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/templates/admin-page.html +771 -0
- package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/templates/prd.md +182 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/SKILL.md +292 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/templates/admin-root/.agents/skills/uniwind/SKILL.md +64 -0
- package/templates/admin-root/.agents/skills/uniwind/references/component-bindings.md +338 -0
- package/templates/admin-root/.agents/skills/uniwind/references/css-and-utilities.md +325 -0
- package/templates/admin-root/.agents/skills/uniwind/references/integrations.md +75 -0
- package/templates/admin-root/.agents/skills/uniwind/references/pro.md +354 -0
- package/templates/admin-root/.agents/skills/uniwind/references/setup.md +144 -0
- package/templates/admin-root/.agents/skills/uniwind/references/styling-patterns.md +237 -0
- package/templates/admin-root/.agents/skills/uniwind/references/theming.md +309 -0
- package/templates/admin-root/.agents/skills/uniwind/references/troubleshooting.md +179 -0
- package/templates/admin-root/.agents/skills/uniwind/references/variants-and-selectors.md +224 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/AGENTS.md +2934 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/SKILL.md +136 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/templates/admin-root/.claude/settings.json +5 -0
- package/templates/admin-root/.claude/skills/component-doc/SKILL.md +304 -0
- package/templates/admin-root/.claude/skills/component-refactoring/SKILL.md +483 -0
- package/templates/admin-root/.claude/skills/component-refactoring/references/complexity-patterns.md +493 -0
- package/templates/admin-root/.claude/skills/component-refactoring/references/component-splitting.md +477 -0
- package/templates/admin-root/.claude/skills/component-refactoring/references/hook-extraction.md +317 -0
- package/templates/admin-root/.claude/skills/doc-coauthoring/SKILL.md +375 -0
- package/templates/admin-root/.claude/skills/feature-dev/SKILL.md +78 -0
- package/templates/admin-root/.claude/skills/frontend-code-review/SKILL.md +73 -0
- package/templates/admin-root/.claude/skills/frontend-code-review/references/business-logic.md +15 -0
- package/templates/admin-root/.claude/skills/frontend-code-review/references/code-quality.md +44 -0
- package/templates/admin-root/.claude/skills/frontend-code-review/references/performance.md +45 -0
- package/templates/admin-root/.claude/skills/frontend-design/LICENSE.txt +177 -0
- package/templates/admin-root/.claude/skills/frontend-design/SKILL.md +42 -0
- package/templates/admin-root/.claude/skills/frontend-testing/SKILL.md +325 -0
- package/templates/admin-root/.claude/skills/frontend-testing/assets/component-test.template.tsx +293 -0
- package/templates/admin-root/.claude/skills/frontend-testing/assets/hook-test.template.ts +207 -0
- package/templates/admin-root/.claude/skills/frontend-testing/assets/utility-test.template.ts +154 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/async-testing.md +345 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/checklist.md +205 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/common-patterns.md +449 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/domain-components.md +523 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/mocking.md +512 -0
- package/templates/admin-root/.claude/skills/frontend-testing/references/workflow.md +269 -0
- package/templates/admin-root/.claude/skills/migrate-nativewind-to-uniwind +1 -0
- package/templates/admin-root/.claude/skills/native-component-doc/SKILL.md +245 -0
- package/templates/admin-root/.claude/skills/senior-frontend/SKILL.md +209 -0
- package/templates/admin-root/.claude/skills/senior-frontend/references/frontend_best_practices.md +103 -0
- package/templates/admin-root/.claude/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
- package/templates/admin-root/.claude/skills/senior-frontend/references/react_patterns.md +103 -0
- package/templates/admin-root/.claude/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
- package/templates/admin-root/.claude/skills/senior-frontend/scripts/component_generator.py +114 -0
- package/templates/admin-root/.claude/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
- package/templates/admin-root/.claude/skills/skill-creator/SKILL.md +355 -0
- package/templates/admin-root/.claude/skills/skill-creator/references/output-patterns.md +86 -0
- package/templates/admin-root/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/templates/admin-root/.claude/skills/skill-creator/scripts/init_skill.py +300 -0
- package/templates/admin-root/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/templates/admin-root/.claude/skills/skill-creator/scripts/quick_validate.py +97 -0
- package/templates/admin-root/.claude/skills/ui-ux-pro-max/SKILL.md +386 -0
- package/templates/admin-root/.claude/skills/ui-ux-pro-max/data +1 -0
- package/templates/admin-root/.claude/skills/ui-ux-pro-max/scripts +1 -0
- package/templates/admin-root/.claude/skills/uniwind +1 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/AGENTS.md +2934 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/SKILL.md +136 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/templates/admin-root/.cursor/settings.json +10 -0
- package/templates/admin-root/.editorconfig +19 -0
- package/templates/admin-root/.gitattributes +16 -0
- package/templates/admin-root/.oxfmtrc.json +35 -0
- package/templates/admin-root/AGENTS.md +297 -0
- package/templates/admin-root/CLAUDE.md +1 -0
- package/templates/admin-root/skills-lock.json +27 -0
- package/templates/admin-root.manifest.json +1317 -0
- package/templates/admin.meta.json +9 -4
- package/LICENSE +0 -21
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
|
|
5
|
+
Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
|
8
|
+
|
|
9
|
+
Domains: style, prompt, color, chart, landing, product, ux, typography
|
|
10
|
+
Stacks: html-tailwind, react, nextjs
|
|
11
|
+
|
|
12
|
+
Persistence (Master + Overrides pattern):
|
|
13
|
+
--persist Save design system to design-system/MASTER.md
|
|
14
|
+
--page Also create a page-specific override file in design-system/pages/
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import sys
|
|
19
|
+
import io
|
|
20
|
+
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
|
21
|
+
from design_system import generate_design_system, persist_design_system
|
|
22
|
+
|
|
23
|
+
# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default)
|
|
24
|
+
if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8':
|
|
25
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
26
|
+
if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8':
|
|
27
|
+
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def format_output(result):
|
|
31
|
+
"""Format results for Claude consumption (token-optimized)"""
|
|
32
|
+
if "error" in result:
|
|
33
|
+
return f"Error: {result['error']}"
|
|
34
|
+
|
|
35
|
+
output = []
|
|
36
|
+
if result.get("stack"):
|
|
37
|
+
output.append(f"## UI Pro Max Stack Guidelines")
|
|
38
|
+
output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
|
|
39
|
+
else:
|
|
40
|
+
output.append(f"## UI Pro Max Search Results")
|
|
41
|
+
output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
|
|
42
|
+
output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
|
|
43
|
+
|
|
44
|
+
for i, row in enumerate(result['results'], 1):
|
|
45
|
+
output.append(f"### Result {i}")
|
|
46
|
+
for key, value in row.items():
|
|
47
|
+
value_str = str(value)
|
|
48
|
+
if len(value_str) > 300:
|
|
49
|
+
value_str = value_str[:300] + "..."
|
|
50
|
+
output.append(f"- **{key}:** {value_str}")
|
|
51
|
+
output.append("")
|
|
52
|
+
|
|
53
|
+
return "\n".join(output)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
parser = argparse.ArgumentParser(description="UI Pro Max Search")
|
|
58
|
+
parser.add_argument("query", help="Search query")
|
|
59
|
+
parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
|
|
60
|
+
parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
|
|
61
|
+
parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
|
|
62
|
+
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
|
63
|
+
# Design system generation
|
|
64
|
+
parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
|
|
65
|
+
parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
|
|
66
|
+
parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
|
|
67
|
+
# Persistence (Master + Overrides pattern)
|
|
68
|
+
parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
|
|
69
|
+
parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
|
|
70
|
+
parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
|
|
71
|
+
|
|
72
|
+
args = parser.parse_args()
|
|
73
|
+
|
|
74
|
+
# Design system takes priority
|
|
75
|
+
if args.design_system:
|
|
76
|
+
result = generate_design_system(
|
|
77
|
+
args.query,
|
|
78
|
+
args.project_name,
|
|
79
|
+
args.format,
|
|
80
|
+
persist=args.persist,
|
|
81
|
+
page=args.page,
|
|
82
|
+
output_dir=args.output_dir
|
|
83
|
+
)
|
|
84
|
+
print(result)
|
|
85
|
+
|
|
86
|
+
# Print persistence confirmation
|
|
87
|
+
if args.persist:
|
|
88
|
+
project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
|
|
89
|
+
print("\n" + "=" * 60)
|
|
90
|
+
print(f"✅ Design system persisted to design-system/{project_slug}/")
|
|
91
|
+
print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
|
|
92
|
+
if args.page:
|
|
93
|
+
page_filename = args.page.lower().replace(' ', '-')
|
|
94
|
+
print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
|
|
95
|
+
print("")
|
|
96
|
+
print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
|
|
97
|
+
print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
|
|
98
|
+
print("=" * 60)
|
|
99
|
+
# Stack search
|
|
100
|
+
elif args.stack:
|
|
101
|
+
result = search_stack(args.query, args.stack, args.max_results)
|
|
102
|
+
if args.json:
|
|
103
|
+
import json
|
|
104
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
105
|
+
else:
|
|
106
|
+
print(format_output(result))
|
|
107
|
+
# Domain search
|
|
108
|
+
else:
|
|
109
|
+
result = search(args.query, args.domain, args.max_results)
|
|
110
|
+
if args.json:
|
|
111
|
+
import json
|
|
112
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
113
|
+
else:
|
|
114
|
+
print(format_output(result))
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: uniwind
|
|
3
|
+
description: >
|
|
4
|
+
Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building,
|
|
5
|
+
or debugging components in a React Native project that uses Uniwind classNames.
|
|
6
|
+
Covers setup, Metro config, global.css, theming, className props, accent-* color
|
|
7
|
+
props, platform/data/state/responsive variants, CSS variables, custom utilities,
|
|
8
|
+
withUniwind for third-party components, cn/tailwind-merge, tailwind-variants,
|
|
9
|
+
safe area utilities, LayoutDirection, gradients, fonts, React Navigation,
|
|
10
|
+
UI kits, diagnostics, troubleshooting, and Uniwind Pro features. Does not
|
|
11
|
+
cover NativeWind migration.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Uniwind
|
|
15
|
+
|
|
16
|
+
> Uniwind 1.7.0+ / Uniwind Pro 1.2.1+ / Tailwind CSS v4 / React Native 0.81+ / Expo SDK 54+
|
|
17
|
+
|
|
18
|
+
If user has lower version, recommend updating to 1.7.0+ (free) / 1.2.1+ (Pro) for best experience.
|
|
19
|
+
|
|
20
|
+
`LayoutDirection` is available from Uniwind 1.8.0+.
|
|
21
|
+
|
|
22
|
+
Uniwind brings Tailwind CSS v4 to React Native. All core React Native components support the `className` prop out of the box. Styles are compiled at build time — no runtime overhead.
|
|
23
|
+
|
|
24
|
+
## Critical Rules
|
|
25
|
+
|
|
26
|
+
1. **Tailwind v4 only** — Use `@import 'tailwindcss'` not `@tailwind base`. Tailwind v3 is not supported.
|
|
27
|
+
2. **Never construct classNames dynamically** — Tailwind scans at build time. `bg-${color}-500` will NOT work. Use complete string literals, mapping objects, or ternaries.
|
|
28
|
+
3. **Never use `cssInterop` or `remapProps`** — Those are NativeWind APIs. Uniwind does not override global components.
|
|
29
|
+
4. **No `tailwind.config.js`** — All config goes in `global.css` via `@theme` and `@layer theme`.
|
|
30
|
+
5. **No ThemeProvider required** — Use `Uniwind.setTheme()` directly.
|
|
31
|
+
6. **`withUniwindConfig` must be the outermost** Metro config wrapper.
|
|
32
|
+
7. **NEVER wrap `react-native` or `react-native-reanimated` components with `withUniwind`** — `View`, `Text`, `Pressable`, `Image`, `TextInput`, `ScrollView`, `FlatList`, `Switch`, `Modal`, `Animated.View`, `Animated.Text`, etc. already have full `className` support built in. Wrapping them with `withUniwind` will break behavior. Only use `withUniwind` for **third-party** components (e.g., `expo-image`, `expo-blur`, `moti`).
|
|
33
|
+
8. **Font families: single font only** — React Native doesn't support fallbacks. Use `--font-sans: 'Roboto-Regular'` not `'Roboto', sans-serif`.
|
|
34
|
+
9. **All theme variants must define the same set of CSS variables** — If `light` defines `--color-primary`, then `dark` and every custom theme must too. Mismatched variables cause runtime errors.
|
|
35
|
+
10. **`accent-` prefix is REQUIRED for non-style color props** — This is crucial. Props like `color` (Button, ActivityIndicator), `tintColor` (Image), `thumbColor` (Switch), `placeholderTextColor` (TextInput) are NOT part of the `style` object. You MUST use the corresponding `{propName}ClassName` prop with `accent-` prefixed classes. Example: `<ActivityIndicator colorClassName="accent-blue-500" />` NOT `<ActivityIndicator className="text-blue-500" />`. Regular Tailwind color classes (like `text-blue-500`) only work on `className` (which maps to `style`). For non-style color props, always use `accent-`.
|
|
36
|
+
11. **rem default is 16px** — NativeWind used 14px. Set `polyfills: { rem: 14 }` in metro config if migrating.
|
|
37
|
+
12. **`cssEntryFile` must be a relative path string** — Use `'./global.css'` not `path.resolve(__dirname, 'global.css')`.
|
|
38
|
+
13. **Deduplicate with `cn()` when mixing custom CSS classes and Tailwind** — Uniwind does NOT auto-deduplicate. If a custom CSS class (`.card { padding: 16px }`) and a Tailwind utility (`p-6`) set the same property, both apply with unpredictable results. Always wrap with `cn('card', 'p-6')` when there's overlap.
|
|
39
|
+
14. **Important utilities are supported** — Tailwind important modifier works in classNames with `!` at the end: `bg-red-500!`, `active:bg-red-500!`, `ios:pt-12!`. Leading `!bg-red-500` syntax is deprecated. Important utilities override non-important utilities for the same style property, but inline `style` still overrides className.
|
|
40
|
+
|
|
41
|
+
## Reference Routing
|
|
42
|
+
|
|
43
|
+
Read only relevant bundled reference files under `references/` after identifying the user's task:
|
|
44
|
+
|
|
45
|
+
- Setup/config install issues: `references/setup.md`
|
|
46
|
+
- React Native component className props, accent color props, or component examples: `references/component-bindings.md`
|
|
47
|
+
- Third-party components, `withUniwind`, dynamic class names, `tailwind-variants`, `cn`, or important utilities: `references/styling-patterns.md`
|
|
48
|
+
- Themes, CSS variables, `ScopedTheme`, `LayoutDirection`, color spaces, or runtime variable APIs: `references/theming.md`
|
|
49
|
+
- Platform, data, state, responsive, or safe-area utilities: `references/variants-and-selectors.md`
|
|
50
|
+
- CSS functions, custom CSS, `@utility`, `@theme`, fonts, or gradients: `references/css-and-utilities.md`
|
|
51
|
+
- React Navigation, UI kits, support matrix, or unsupported classes: `references/integrations.md`
|
|
52
|
+
- Uniwind Pro installation, animations, diagnostics, group variants, default styles, native insets, or theme transitions: `references/pro.md`
|
|
53
|
+
- Broken styles, setup diagnostics, errors, cache issues, FAQ answers, MCP, or related skills: `references/troubleshooting.md`
|
|
54
|
+
|
|
55
|
+
## Workflow
|
|
56
|
+
|
|
57
|
+
1. Identify whether user needs setup, styling, theming, variants, integrations, Pro, or troubleshooting help.
|
|
58
|
+
2. Read the matching reference file before giving detailed guidance or editing code.
|
|
59
|
+
3. Apply the Critical Rules above even if the selected reference omits them.
|
|
60
|
+
4. Do not guess Uniwind APIs. If unsure, verify against official docs: https://docs.uniwind.dev/llms-full.txt
|
|
61
|
+
|
|
62
|
+
## Related Skills
|
|
63
|
+
|
|
64
|
+
NativeWind migration is intentionally separate. Use the `migrate-nativewind-to-uniwind` skill when the user wants to migrate from NativeWind.
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
## Component Bindings
|
|
2
|
+
|
|
3
|
+
All core React Native components support `className` out of the box. Some have additional className props for sub-styles (like `contentContainerClassName`) and non-style color props (requiring `accent-` prefix).
|
|
4
|
+
|
|
5
|
+
### Complete Reference
|
|
6
|
+
|
|
7
|
+
**Legend**: Props marked with ⚡ require the `accent-` prefix. Props in parentheses are platform-specific.
|
|
8
|
+
|
|
9
|
+
#### View
|
|
10
|
+
|
|
11
|
+
| Prop | Maps to | Prefix |
|
|
12
|
+
|------|---------|--------|
|
|
13
|
+
| `className` | `style` | — |
|
|
14
|
+
|
|
15
|
+
#### Text
|
|
16
|
+
|
|
17
|
+
| Prop | Maps to | Prefix |
|
|
18
|
+
|------|---------|--------|
|
|
19
|
+
| `className` | `style` | — |
|
|
20
|
+
| `selectionColorClassName` | `selectionColor` | ⚡ `accent-` |
|
|
21
|
+
|
|
22
|
+
#### Pressable
|
|
23
|
+
|
|
24
|
+
| Prop | Maps to | Prefix |
|
|
25
|
+
|------|---------|--------|
|
|
26
|
+
| `className` | `style` | — |
|
|
27
|
+
|
|
28
|
+
Supports `active:`, `disabled:`, `focus:` state selectors.
|
|
29
|
+
|
|
30
|
+
#### Image
|
|
31
|
+
|
|
32
|
+
| Prop | Maps to | Prefix |
|
|
33
|
+
|------|---------|--------|
|
|
34
|
+
| `className` | `style` | — |
|
|
35
|
+
| `tintColorClassName` | `tintColor` | ⚡ `accent-` |
|
|
36
|
+
|
|
37
|
+
#### TextInput
|
|
38
|
+
|
|
39
|
+
| Prop | Maps to | Prefix |
|
|
40
|
+
|------|---------|--------|
|
|
41
|
+
| `className` | `style` | — |
|
|
42
|
+
| `cursorColorClassName` | `cursorColor` | ⚡ `accent-` |
|
|
43
|
+
| `selectionColorClassName` | `selectionColor` | ⚡ `accent-` |
|
|
44
|
+
| `placeholderTextColorClassName` | `placeholderTextColor` | ⚡ `accent-` |
|
|
45
|
+
| `selectionHandleColorClassName` | `selectionHandleColor` | ⚡ `accent-` |
|
|
46
|
+
| `underlineColorAndroidClassName` | `underlineColorAndroid` (Android) | ⚡ `accent-` |
|
|
47
|
+
|
|
48
|
+
Supports `focus:`, `active:`, `disabled:` state selectors.
|
|
49
|
+
|
|
50
|
+
#### ScrollView
|
|
51
|
+
|
|
52
|
+
| Prop | Maps to | Prefix |
|
|
53
|
+
|------|---------|--------|
|
|
54
|
+
| `className` | `style` | — |
|
|
55
|
+
| `contentContainerClassName` | `contentContainerStyle` | — |
|
|
56
|
+
| `endFillColorClassName` | `endFillColor` | ⚡ `accent-` |
|
|
57
|
+
|
|
58
|
+
#### FlatList
|
|
59
|
+
|
|
60
|
+
| Prop | Maps to | Prefix |
|
|
61
|
+
|------|---------|--------|
|
|
62
|
+
| `className` | `style` | — |
|
|
63
|
+
| `contentContainerClassName` | `contentContainerStyle` | — |
|
|
64
|
+
| `columnWrapperClassName` | `columnWrapperStyle` | — |
|
|
65
|
+
| `ListHeaderComponentClassName` | `ListHeaderComponentStyle` | — |
|
|
66
|
+
| `ListFooterComponentClassName` | `ListFooterComponentStyle` | — |
|
|
67
|
+
| `endFillColorClassName` | `endFillColor` | ⚡ `accent-` |
|
|
68
|
+
|
|
69
|
+
#### SectionList
|
|
70
|
+
|
|
71
|
+
| Prop | Maps to | Prefix |
|
|
72
|
+
|------|---------|--------|
|
|
73
|
+
| `className` | `style` | — |
|
|
74
|
+
| `contentContainerClassName` | `contentContainerStyle` | — |
|
|
75
|
+
| `ListHeaderComponentClassName` | `ListHeaderComponentStyle` | — |
|
|
76
|
+
| `ListFooterComponentClassName` | `ListFooterComponentStyle` | — |
|
|
77
|
+
| `endFillColorClassName` | `endFillColor` | ⚡ `accent-` |
|
|
78
|
+
|
|
79
|
+
#### VirtualizedList
|
|
80
|
+
|
|
81
|
+
| Prop | Maps to | Prefix |
|
|
82
|
+
|------|---------|--------|
|
|
83
|
+
| `className` | `style` | — |
|
|
84
|
+
| `contentContainerClassName` | `contentContainerStyle` | — |
|
|
85
|
+
| `ListHeaderComponentClassName` | `ListHeaderComponentStyle` | — |
|
|
86
|
+
| `ListFooterComponentClassName` | `ListFooterComponentStyle` | — |
|
|
87
|
+
| `endFillColorClassName` | `endFillColor` | ⚡ `accent-` |
|
|
88
|
+
|
|
89
|
+
#### Switch
|
|
90
|
+
|
|
91
|
+
| Prop | Maps to | Prefix |
|
|
92
|
+
|------|---------|--------|
|
|
93
|
+
| `thumbColorClassName` | `thumbColor` | ⚡ `accent-` |
|
|
94
|
+
| `trackColorOnClassName` | `trackColor.true` (on) | ⚡ `accent-` |
|
|
95
|
+
| `trackColorOffClassName` | `trackColor.false` (off) | ⚡ `accent-` |
|
|
96
|
+
| `ios_backgroundColorClassName` | `ios_backgroundColor` (iOS) | ⚡ `accent-` |
|
|
97
|
+
|
|
98
|
+
Note: Switch does NOT support `className` (`className?: never` in types). Use only the color-specific className props above. Supports `disabled:` state selector.
|
|
99
|
+
|
|
100
|
+
#### ActivityIndicator
|
|
101
|
+
|
|
102
|
+
| Prop | Maps to | Prefix |
|
|
103
|
+
|------|---------|--------|
|
|
104
|
+
| `className` | `style` | — |
|
|
105
|
+
| `colorClassName` | `color` | ⚡ `accent-` |
|
|
106
|
+
|
|
107
|
+
#### Button
|
|
108
|
+
|
|
109
|
+
| Prop | Maps to | Prefix |
|
|
110
|
+
|------|---------|--------|
|
|
111
|
+
| `colorClassName` | `color` | ⚡ `accent-` |
|
|
112
|
+
|
|
113
|
+
Note: Button does not support `className` (no `style` prop on RN Button).
|
|
114
|
+
|
|
115
|
+
#### Modal
|
|
116
|
+
|
|
117
|
+
| Prop | Maps to | Prefix |
|
|
118
|
+
|------|---------|--------|
|
|
119
|
+
| `className` | `style` | — |
|
|
120
|
+
| `backdropColorClassName` | `backdropColor` | ⚡ `accent-` |
|
|
121
|
+
|
|
122
|
+
#### RefreshControl
|
|
123
|
+
|
|
124
|
+
| Prop | Maps to | Prefix |
|
|
125
|
+
|------|---------|--------|
|
|
126
|
+
| `className` | `style` | — |
|
|
127
|
+
| `colorsClassName` | `colors` (Android) | ⚡ `accent-` |
|
|
128
|
+
| `tintColorClassName` | `tintColor` (iOS) | ⚡ `accent-` |
|
|
129
|
+
| `titleColorClassName` | `titleColor` (iOS) | ⚡ `accent-` |
|
|
130
|
+
| `progressBackgroundColorClassName` | `progressBackgroundColor` (Android) | ⚡ `accent-` |
|
|
131
|
+
|
|
132
|
+
#### ImageBackground
|
|
133
|
+
|
|
134
|
+
| Prop | Maps to | Prefix |
|
|
135
|
+
|------|---------|--------|
|
|
136
|
+
| `className` | `style` | — |
|
|
137
|
+
| `imageClassName` | `imageStyle` | — |
|
|
138
|
+
| `tintColorClassName` | `tintColor` | ⚡ `accent-` |
|
|
139
|
+
|
|
140
|
+
#### SafeAreaView
|
|
141
|
+
|
|
142
|
+
| Prop | Maps to | Prefix |
|
|
143
|
+
|------|---------|--------|
|
|
144
|
+
| `className` | `style` | — |
|
|
145
|
+
|
|
146
|
+
#### KeyboardAvoidingView
|
|
147
|
+
|
|
148
|
+
| Prop | Maps to | Prefix |
|
|
149
|
+
|------|---------|--------|
|
|
150
|
+
| `className` | `style` | — |
|
|
151
|
+
| `contentContainerClassName` | `contentContainerStyle` | — |
|
|
152
|
+
|
|
153
|
+
#### InputAccessoryView
|
|
154
|
+
|
|
155
|
+
| Prop | Maps to | Prefix |
|
|
156
|
+
|------|---------|--------|
|
|
157
|
+
| `className` | `style` | — |
|
|
158
|
+
| `backgroundColorClassName` | `backgroundColor` | ⚡ `accent-` |
|
|
159
|
+
|
|
160
|
+
#### TouchableHighlight
|
|
161
|
+
|
|
162
|
+
| Prop | Maps to | Prefix |
|
|
163
|
+
|------|---------|--------|
|
|
164
|
+
| `className` | `style` | — |
|
|
165
|
+
| `underlayColorClassName` | `underlayColor` | ⚡ `accent-` |
|
|
166
|
+
|
|
167
|
+
Supports `active:`, `disabled:` state selectors.
|
|
168
|
+
|
|
169
|
+
#### TouchableOpacity
|
|
170
|
+
|
|
171
|
+
| Prop | Maps to | Prefix |
|
|
172
|
+
|------|---------|--------|
|
|
173
|
+
| `className` | `style` | — |
|
|
174
|
+
|
|
175
|
+
Supports `active:`, `disabled:` state selectors.
|
|
176
|
+
|
|
177
|
+
#### TouchableNativeFeedback
|
|
178
|
+
|
|
179
|
+
| Prop | Maps to | Prefix |
|
|
180
|
+
|------|---------|--------|
|
|
181
|
+
| `className` | `style` | — |
|
|
182
|
+
|
|
183
|
+
Supports `active:`, `disabled:` state selectors.
|
|
184
|
+
|
|
185
|
+
#### TouchableWithoutFeedback
|
|
186
|
+
|
|
187
|
+
| Prop | Maps to | Prefix |
|
|
188
|
+
|------|---------|--------|
|
|
189
|
+
| `className` | `style` | — |
|
|
190
|
+
|
|
191
|
+
Supports `active:`, `disabled:` state selectors.
|
|
192
|
+
|
|
193
|
+
### Usage Examples
|
|
194
|
+
|
|
195
|
+
```tsx
|
|
196
|
+
import { View, Text, Pressable, TextInput, ScrollView, FlatList, Switch, Image, ActivityIndicator, Modal, RefreshControl, Button } from 'react-native';
|
|
197
|
+
|
|
198
|
+
// View — basic layout
|
|
199
|
+
<View className="flex-1 bg-background p-4">
|
|
200
|
+
<Text className="text-foreground text-lg font-bold">Title</Text>
|
|
201
|
+
</View>
|
|
202
|
+
|
|
203
|
+
// Pressable — with press/focus states
|
|
204
|
+
<Pressable className="bg-primary px-6 py-3 rounded-lg active:opacity-80 active:bg-primary/90 focus:ring-2">
|
|
205
|
+
<Text className="text-white text-center font-semibold">Press Me</Text>
|
|
206
|
+
</Pressable>
|
|
207
|
+
|
|
208
|
+
// TextInput — with focus state and accent- color props
|
|
209
|
+
<TextInput
|
|
210
|
+
className="border border-border rounded-lg px-4 py-2 text-base text-foreground focus:border-primary"
|
|
211
|
+
placeholderTextColorClassName="accent-muted"
|
|
212
|
+
selectionColorClassName="accent-primary"
|
|
213
|
+
cursorColorClassName="accent-primary"
|
|
214
|
+
selectionHandleColorClassName="accent-primary"
|
|
215
|
+
underlineColorAndroidClassName="accent-transparent"
|
|
216
|
+
placeholder="Enter text..."
|
|
217
|
+
/>
|
|
218
|
+
|
|
219
|
+
// ScrollView — with content container
|
|
220
|
+
<ScrollView className="flex-1" contentContainerClassName="p-4 gap-4">
|
|
221
|
+
{/* content */}
|
|
222
|
+
</ScrollView>
|
|
223
|
+
|
|
224
|
+
// FlatList — with all sub-style props
|
|
225
|
+
<FlatList
|
|
226
|
+
className="flex-1"
|
|
227
|
+
contentContainerClassName="p-4 gap-3"
|
|
228
|
+
columnWrapperClassName="gap-3"
|
|
229
|
+
ListHeaderComponentClassName="pb-4"
|
|
230
|
+
ListFooterComponentClassName="pt-4"
|
|
231
|
+
endFillColorClassName="accent-gray-100"
|
|
232
|
+
numColumns={2}
|
|
233
|
+
data={items}
|
|
234
|
+
renderItem={({ item }) => <ItemCard item={item} />}
|
|
235
|
+
/>
|
|
236
|
+
|
|
237
|
+
// Switch — no className support, use color-specific props only
|
|
238
|
+
<Switch
|
|
239
|
+
thumbColorClassName="accent-white"
|
|
240
|
+
trackColorOnClassName="accent-primary"
|
|
241
|
+
trackColorOffClassName="accent-gray-300 dark:accent-gray-700"
|
|
242
|
+
ios_backgroundColorClassName="accent-gray-200"
|
|
243
|
+
/>
|
|
244
|
+
|
|
245
|
+
// Image — tint color
|
|
246
|
+
<Image className="w-6 h-6" tintColorClassName="accent-primary" source={icon} />
|
|
247
|
+
|
|
248
|
+
// ActivityIndicator
|
|
249
|
+
<ActivityIndicator className="m-4" colorClassName="accent-primary" size="large" />
|
|
250
|
+
|
|
251
|
+
// Button — only colorClassName (no className)
|
|
252
|
+
<Button colorClassName="accent-primary" title="Submit" onPress={handleSubmit} />
|
|
253
|
+
|
|
254
|
+
// Modal — backdrop color
|
|
255
|
+
<Modal className="flex-1" backdropColorClassName="accent-black/50">
|
|
256
|
+
{/* content */}
|
|
257
|
+
</Modal>
|
|
258
|
+
|
|
259
|
+
// RefreshControl — platform-specific color props
|
|
260
|
+
<RefreshControl
|
|
261
|
+
className="p-4"
|
|
262
|
+
tintColorClassName="accent-primary"
|
|
263
|
+
titleColorClassName="accent-gray-500"
|
|
264
|
+
colorsClassName="accent-primary"
|
|
265
|
+
progressBackgroundColorClassName="accent-white dark:accent-gray-800"
|
|
266
|
+
/>
|
|
267
|
+
|
|
268
|
+
// ImageBackground — separate image styling
|
|
269
|
+
<ImageBackground
|
|
270
|
+
className="flex-1 justify-center items-center"
|
|
271
|
+
imageClassName="opacity-50"
|
|
272
|
+
tintColorClassName="accent-blue-500"
|
|
273
|
+
source={bgImage}
|
|
274
|
+
>
|
|
275
|
+
<Text className="text-white text-2xl font-bold">Overlay</Text>
|
|
276
|
+
</ImageBackground>
|
|
277
|
+
|
|
278
|
+
// KeyboardAvoidingView
|
|
279
|
+
<KeyboardAvoidingView
|
|
280
|
+
behavior="padding"
|
|
281
|
+
className="flex-1 bg-white"
|
|
282
|
+
contentContainerClassName="p-4 justify-end"
|
|
283
|
+
>
|
|
284
|
+
<TextInput className="border border-gray-300 rounded-lg p-3" placeholder="Type..." />
|
|
285
|
+
</KeyboardAvoidingView>
|
|
286
|
+
|
|
287
|
+
// InputAccessoryView
|
|
288
|
+
<InputAccessoryView
|
|
289
|
+
className="p-4 border-t border-gray-300"
|
|
290
|
+
backgroundColorClassName="accent-white dark:accent-gray-800"
|
|
291
|
+
>
|
|
292
|
+
<Button title="Done" onPress={dismissKeyboard} />
|
|
293
|
+
</InputAccessoryView>
|
|
294
|
+
|
|
295
|
+
// TouchableHighlight — underlay color
|
|
296
|
+
<TouchableHighlight
|
|
297
|
+
className="bg-blue-500 px-6 py-3 rounded-lg"
|
|
298
|
+
underlayColorClassName="accent-blue-600 dark:accent-blue-700"
|
|
299
|
+
onPress={handlePress}
|
|
300
|
+
>
|
|
301
|
+
<Text className="text-white font-semibold">Press Me</Text>
|
|
302
|
+
</TouchableHighlight>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## The accent- Prefix Pattern
|
|
306
|
+
|
|
307
|
+
React Native components have props like `color`, `tintColor`, `thumbColor` that are NOT part of the `style` object. To set these via Tailwind classes, use the `accent-` prefix with the corresponding `{propName}ClassName` prop:
|
|
308
|
+
|
|
309
|
+
```tsx
|
|
310
|
+
// color prop → colorClassName with accent- prefix
|
|
311
|
+
<ActivityIndicator colorClassName="accent-blue-500 dark:accent-blue-400" />
|
|
312
|
+
<Button colorClassName="accent-primary" title="Submit" />
|
|
313
|
+
|
|
314
|
+
// tintColor prop → tintColorClassName
|
|
315
|
+
<Image className="w-6 h-6" tintColorClassName="accent-red-500" source={icon} />
|
|
316
|
+
|
|
317
|
+
// thumbColor → thumbColorClassName
|
|
318
|
+
<Switch thumbColorClassName="accent-white" trackColorOnClassName="accent-primary" />
|
|
319
|
+
|
|
320
|
+
// placeholderTextColor → placeholderTextColorClassName
|
|
321
|
+
<TextInput placeholderTextColorClassName="accent-gray-400 dark:accent-gray-600" />
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
**CRITICAL Rule**: `className` maps to the `style` prop — it handles layout, typography, backgrounds, borders, etc. But React Native has many color props that live OUTSIDE of `style` (like `color`, `tintColor`, `thumbColor`, `placeholderTextColor`). These require a separate `{propName}ClassName` prop with the `accent-` prefix. Without `accent-`, the class resolves to a style object — but these props expect a plain color string.
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
// WRONG — className sets style, but ActivityIndicator's color is NOT a style prop
|
|
328
|
+
<ActivityIndicator className="text-blue-500" /> // color will NOT be set
|
|
329
|
+
|
|
330
|
+
// CORRECT — use the dedicated colorClassName prop with accent- prefix
|
|
331
|
+
<ActivityIndicator colorClassName="accent-blue-500" /> // color IS set to #3b82f6
|
|
332
|
+
|
|
333
|
+
// WRONG — tintColor is not a style prop on Image
|
|
334
|
+
<Image className="tint-blue-500" source={icon} /> // won't work
|
|
335
|
+
|
|
336
|
+
// CORRECT
|
|
337
|
+
<Image tintColorClassName="accent-blue-500" source={icon} />
|
|
338
|
+
```
|