@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.
Files changed (265) hide show
  1. package/README.md +6 -3
  2. package/dist/cli.mjs +1 -1
  3. package/dist/{config-BKkdncJS.mjs → config-Cj9IzlRz.mjs} +105 -5
  4. package/dist/index.mjs +1 -1
  5. package/package.json +3 -3
  6. package/templates/admin/package.json +5 -1
  7. package/templates/admin/src/assets/svg-icon/logo.svg +1 -1
  8. package/templates/admin/uno.config.ts +1 -1
  9. package/templates/admin-root/.agents/skills/component-doc/SKILL.md +304 -0
  10. package/templates/admin-root/.agents/skills/component-refactoring/SKILL.md +483 -0
  11. package/templates/admin-root/.agents/skills/component-refactoring/references/complexity-patterns.md +493 -0
  12. package/templates/admin-root/.agents/skills/component-refactoring/references/component-splitting.md +477 -0
  13. package/templates/admin-root/.agents/skills/component-refactoring/references/hook-extraction.md +317 -0
  14. package/templates/admin-root/.agents/skills/doc-coauthoring/SKILL.md +375 -0
  15. package/templates/admin-root/.agents/skills/feature-dev/SKILL.md +78 -0
  16. package/templates/admin-root/.agents/skills/frontend-code-review/SKILL.md +73 -0
  17. package/templates/admin-root/.agents/skills/frontend-code-review/references/business-logic.md +15 -0
  18. package/templates/admin-root/.agents/skills/frontend-code-review/references/code-quality.md +44 -0
  19. package/templates/admin-root/.agents/skills/frontend-code-review/references/performance.md +45 -0
  20. package/templates/admin-root/.agents/skills/frontend-design/LICENSE.txt +177 -0
  21. package/templates/admin-root/.agents/skills/frontend-design/SKILL.md +42 -0
  22. package/templates/admin-root/.agents/skills/frontend-testing/SKILL.md +325 -0
  23. package/templates/admin-root/.agents/skills/frontend-testing/assets/component-test.template.tsx +293 -0
  24. package/templates/admin-root/.agents/skills/frontend-testing/assets/hook-test.template.ts +207 -0
  25. package/templates/admin-root/.agents/skills/frontend-testing/assets/utility-test.template.ts +154 -0
  26. package/templates/admin-root/.agents/skills/frontend-testing/references/async-testing.md +345 -0
  27. package/templates/admin-root/.agents/skills/frontend-testing/references/checklist.md +205 -0
  28. package/templates/admin-root/.agents/skills/frontend-testing/references/common-patterns.md +449 -0
  29. package/templates/admin-root/.agents/skills/frontend-testing/references/domain-components.md +523 -0
  30. package/templates/admin-root/.agents/skills/frontend-testing/references/mocking.md +512 -0
  31. package/templates/admin-root/.agents/skills/frontend-testing/references/workflow.md +269 -0
  32. package/templates/admin-root/.agents/skills/migrate-nativewind-to-uniwind/SKILL.md +734 -0
  33. package/templates/admin-root/.agents/skills/migrate-oxfmt/SKILL.md +202 -0
  34. package/templates/admin-root/.agents/skills/migrate-oxlint/SKILL.md +196 -0
  35. package/templates/admin-root/.agents/skills/native-component-doc/SKILL.md +245 -0
  36. package/templates/admin-root/.agents/skills/senior-frontend/SKILL.md +209 -0
  37. package/templates/admin-root/.agents/skills/senior-frontend/references/frontend_best_practices.md +103 -0
  38. package/templates/admin-root/.agents/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
  39. package/templates/admin-root/.agents/skills/senior-frontend/references/react_patterns.md +103 -0
  40. package/templates/admin-root/.agents/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
  41. package/templates/admin-root/.agents/skills/senior-frontend/scripts/component_generator.py +114 -0
  42. package/templates/admin-root/.agents/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
  43. package/templates/admin-root/.agents/skills/skill-creator/SKILL.md +355 -0
  44. package/templates/admin-root/.agents/skills/skill-creator/references/output-patterns.md +86 -0
  45. package/templates/admin-root/.agents/skills/skill-creator/references/workflows.md +28 -0
  46. package/templates/admin-root/.agents/skills/skill-creator/scripts/init_skill.py +300 -0
  47. package/templates/admin-root/.agents/skills/skill-creator/scripts/package_skill.py +110 -0
  48. package/templates/admin-root/.agents/skills/skill-creator/scripts/quick_validate.py +97 -0
  49. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/SKILL.md +163 -0
  50. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/acceptance-checklist.md +75 -0
  51. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/evidence-order.md +109 -0
  52. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/prd-rules.md +103 -0
  53. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/references/prototype-rules.md +85 -0
  54. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/scripts/verify-prototypes.mjs +144 -0
  55. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/templates/admin-page.html +771 -0
  56. package/templates/admin-root/.agents/skills/skyroc-admin-prd-prototype/templates/prd.md +182 -0
  57. package/templates/admin-root/.agents/skills/ui-ux-pro-max/SKILL.md +292 -0
  58. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
  59. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/colors.csv +97 -0
  60. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/icons.csv +101 -0
  61. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/landing.csv +31 -0
  62. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/products.csv +97 -0
  63. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  64. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  65. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  66. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  67. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  68. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  69. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  70. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  71. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  72. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  73. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  74. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  75. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  76. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  77. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/styles.csv +68 -0
  78. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/typography.csv +58 -0
  79. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  80. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  81. package/templates/admin-root/.agents/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  82. package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/core.py +253 -0
  83. package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  84. package/templates/admin-root/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
  85. package/templates/admin-root/.agents/skills/uniwind/SKILL.md +64 -0
  86. package/templates/admin-root/.agents/skills/uniwind/references/component-bindings.md +338 -0
  87. package/templates/admin-root/.agents/skills/uniwind/references/css-and-utilities.md +325 -0
  88. package/templates/admin-root/.agents/skills/uniwind/references/integrations.md +75 -0
  89. package/templates/admin-root/.agents/skills/uniwind/references/pro.md +354 -0
  90. package/templates/admin-root/.agents/skills/uniwind/references/setup.md +144 -0
  91. package/templates/admin-root/.agents/skills/uniwind/references/styling-patterns.md +237 -0
  92. package/templates/admin-root/.agents/skills/uniwind/references/theming.md +309 -0
  93. package/templates/admin-root/.agents/skills/uniwind/references/troubleshooting.md +179 -0
  94. package/templates/admin-root/.agents/skills/uniwind/references/variants-and-selectors.md +224 -0
  95. package/templates/admin-root/.agents/skills/vercel-react-best-practices/AGENTS.md +2934 -0
  96. package/templates/admin-root/.agents/skills/vercel-react-best-practices/SKILL.md +136 -0
  97. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  98. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  99. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  100. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  101. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  102. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  103. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  104. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  105. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  106. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  107. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  108. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  109. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  110. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  111. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  112. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  113. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  114. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  115. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  116. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  117. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  118. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  119. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  120. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  121. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  122. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  123. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  124. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  125. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  126. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  127. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  128. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  129. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  130. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  131. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  132. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  133. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  134. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  135. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  136. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  137. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  138. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  139. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  140. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  141. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  142. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  143. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  144. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  145. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  146. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  147. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  148. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  149. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  150. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  151. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  152. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  153. package/templates/admin-root/.agents/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  154. package/templates/admin-root/.claude/settings.json +5 -0
  155. package/templates/admin-root/.claude/skills/component-doc/SKILL.md +304 -0
  156. package/templates/admin-root/.claude/skills/component-refactoring/SKILL.md +483 -0
  157. package/templates/admin-root/.claude/skills/component-refactoring/references/complexity-patterns.md +493 -0
  158. package/templates/admin-root/.claude/skills/component-refactoring/references/component-splitting.md +477 -0
  159. package/templates/admin-root/.claude/skills/component-refactoring/references/hook-extraction.md +317 -0
  160. package/templates/admin-root/.claude/skills/doc-coauthoring/SKILL.md +375 -0
  161. package/templates/admin-root/.claude/skills/feature-dev/SKILL.md +78 -0
  162. package/templates/admin-root/.claude/skills/frontend-code-review/SKILL.md +73 -0
  163. package/templates/admin-root/.claude/skills/frontend-code-review/references/business-logic.md +15 -0
  164. package/templates/admin-root/.claude/skills/frontend-code-review/references/code-quality.md +44 -0
  165. package/templates/admin-root/.claude/skills/frontend-code-review/references/performance.md +45 -0
  166. package/templates/admin-root/.claude/skills/frontend-design/LICENSE.txt +177 -0
  167. package/templates/admin-root/.claude/skills/frontend-design/SKILL.md +42 -0
  168. package/templates/admin-root/.claude/skills/frontend-testing/SKILL.md +325 -0
  169. package/templates/admin-root/.claude/skills/frontend-testing/assets/component-test.template.tsx +293 -0
  170. package/templates/admin-root/.claude/skills/frontend-testing/assets/hook-test.template.ts +207 -0
  171. package/templates/admin-root/.claude/skills/frontend-testing/assets/utility-test.template.ts +154 -0
  172. package/templates/admin-root/.claude/skills/frontend-testing/references/async-testing.md +345 -0
  173. package/templates/admin-root/.claude/skills/frontend-testing/references/checklist.md +205 -0
  174. package/templates/admin-root/.claude/skills/frontend-testing/references/common-patterns.md +449 -0
  175. package/templates/admin-root/.claude/skills/frontend-testing/references/domain-components.md +523 -0
  176. package/templates/admin-root/.claude/skills/frontend-testing/references/mocking.md +512 -0
  177. package/templates/admin-root/.claude/skills/frontend-testing/references/workflow.md +269 -0
  178. package/templates/admin-root/.claude/skills/migrate-nativewind-to-uniwind +1 -0
  179. package/templates/admin-root/.claude/skills/native-component-doc/SKILL.md +245 -0
  180. package/templates/admin-root/.claude/skills/senior-frontend/SKILL.md +209 -0
  181. package/templates/admin-root/.claude/skills/senior-frontend/references/frontend_best_practices.md +103 -0
  182. package/templates/admin-root/.claude/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
  183. package/templates/admin-root/.claude/skills/senior-frontend/references/react_patterns.md +103 -0
  184. package/templates/admin-root/.claude/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
  185. package/templates/admin-root/.claude/skills/senior-frontend/scripts/component_generator.py +114 -0
  186. package/templates/admin-root/.claude/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
  187. package/templates/admin-root/.claude/skills/skill-creator/SKILL.md +355 -0
  188. package/templates/admin-root/.claude/skills/skill-creator/references/output-patterns.md +86 -0
  189. package/templates/admin-root/.claude/skills/skill-creator/references/workflows.md +28 -0
  190. package/templates/admin-root/.claude/skills/skill-creator/scripts/init_skill.py +300 -0
  191. package/templates/admin-root/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
  192. package/templates/admin-root/.claude/skills/skill-creator/scripts/quick_validate.py +97 -0
  193. package/templates/admin-root/.claude/skills/ui-ux-pro-max/SKILL.md +386 -0
  194. package/templates/admin-root/.claude/skills/ui-ux-pro-max/data +1 -0
  195. package/templates/admin-root/.claude/skills/ui-ux-pro-max/scripts +1 -0
  196. package/templates/admin-root/.claude/skills/uniwind +1 -0
  197. package/templates/admin-root/.claude/skills/vercel-react-best-practices/AGENTS.md +2934 -0
  198. package/templates/admin-root/.claude/skills/vercel-react-best-practices/SKILL.md +136 -0
  199. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  200. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  201. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  202. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  203. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  204. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  205. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  206. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  207. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  208. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  209. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  210. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  211. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  212. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  213. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  214. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  215. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  216. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  217. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  218. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  219. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  220. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  221. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  222. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  223. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  224. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  225. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  226. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  227. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  228. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  229. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  230. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  231. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  232. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  233. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  234. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  235. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  236. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  237. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  238. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  239. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  240. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  241. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  242. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  243. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  244. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  245. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  246. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  247. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  248. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  249. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  250. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  251. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  252. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  253. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  254. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  255. package/templates/admin-root/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  256. package/templates/admin-root/.cursor/settings.json +10 -0
  257. package/templates/admin-root/.editorconfig +19 -0
  258. package/templates/admin-root/.gitattributes +16 -0
  259. package/templates/admin-root/.oxfmtrc.json +35 -0
  260. package/templates/admin-root/AGENTS.md +297 -0
  261. package/templates/admin-root/CLAUDE.md +1 -0
  262. package/templates/admin-root/skills-lock.json +27 -0
  263. package/templates/admin-root.manifest.json +1317 -0
  264. package/templates/admin.meta.json +9 -4
  265. package/LICENSE +0 -21
@@ -0,0 +1,237 @@
1
+ ## Styling Third-Party Components
2
+
3
+ ### withUniwind (Recommended)
4
+
5
+ Wrap once at module level, use with `className` everywhere:
6
+
7
+ ```tsx
8
+ import { withUniwind } from 'uniwind';
9
+ import { Image as ExpoImage } from 'expo-image';
10
+ import { BlurView as RNBlurView } from 'expo-blur';
11
+ import { LinearGradient as RNLinearGradient } from 'expo-linear-gradient';
12
+
13
+ // Module-level wrapping (NEVER inside render functions)
14
+ export const Image = withUniwind(ExpoImage);
15
+ export const BlurView = withUniwind(RNBlurView);
16
+ export const LinearGradient = withUniwind(RNLinearGradient);
17
+ ```
18
+
19
+ `withUniwind` automatically maps:
20
+ - `style` → `className`
21
+ - `{name}Style` → `{name}ClassName`
22
+ - `{name}Color` → `{name}ColorClassName` (with accent- prefix)
23
+
24
+ For custom prop mappings:
25
+
26
+ ```tsx
27
+ const StyledProgressBar = withUniwind(ProgressBar, {
28
+ width: {
29
+ fromClassName: 'widthClassName',
30
+ styleProperty: 'width',
31
+ },
32
+ });
33
+ ```
34
+
35
+ **Usage patterns:**
36
+
37
+ - **Used in one file only** — define the wrapped component in that same file
38
+ - **Used across multiple files** — wrap once in a shared module (e.g., `components/styled.ts`) and re-export
39
+
40
+ ```tsx
41
+ // components/styled.ts
42
+ import { withUniwind } from 'uniwind';
43
+ import { Image as ExpoImage } from 'expo-image';
44
+ export const Image = withUniwind(ExpoImage);
45
+
46
+ // Then import everywhere:
47
+ import { Image } from '@/components/styled';
48
+ ```
49
+
50
+ **NEVER** call `withUniwind` on the same component in multiple files.
51
+
52
+ **CRITICAL**: Do NOT use `withUniwind` on components from `react-native` or `react-native-reanimated`. These already have built-in `className` support:
53
+
54
+ ```tsx
55
+ // WRONG — View already supports className natively
56
+ const StyledView = withUniwind(View); // DO NOT DO THIS
57
+ const StyledText = withUniwind(Text); // DO NOT DO THIS
58
+ const StyledAnimatedView = withUniwind(Animated.View); // DO NOT DO THIS
59
+
60
+ // CORRECT — only wrap third-party components
61
+ const StyledExpoImage = withUniwind(ExpoImage); // expo-image
62
+ const StyledBlurView = withUniwind(BlurView); // expo-blur
63
+ const StyledMotiView = withUniwind(MotiView); // moti
64
+ ```
65
+
66
+ ### useResolveClassNames
67
+
68
+ Converts Tailwind class strings to React Native style objects. Use for one-off cases or components that only accept `style`:
69
+
70
+ ```tsx
71
+ import { useResolveClassNames } from 'uniwind';
72
+
73
+ const headerStyle = useResolveClassNames('bg-primary p-4');
74
+ const cardStyle = useResolveClassNames('bg-card dark:bg-card rounded-lg shadow-sm');
75
+
76
+ // React Navigation screen options
77
+ <Stack.Navigator screenOptions={{ headerStyle, cardStyle }} />
78
+ ```
79
+
80
+ ### Comparison
81
+
82
+ | Feature | withUniwind | useResolveClassNames |
83
+ |---------|-------------|----------------------|
84
+ | Setup | Once per component | Per usage |
85
+ | Performance | Optimized | Slightly slower |
86
+ | Best for | Reusable components | One-off, navigation config |
87
+ | Syntax | `className="..."` | `style={...}` |
88
+
89
+ ## Dynamic ClassNames
90
+
91
+ ### NEVER do this (Tailwind scans at build time)
92
+
93
+ ```tsx
94
+ // BROKEN — template literal with variable
95
+ <View className={`bg-${color}-500`} />
96
+ <Text className={`text-${size}`} />
97
+ ```
98
+
99
+ ### Correct patterns
100
+
101
+ ```tsx
102
+ // Ternary with complete class names
103
+ <View className={isActive ? 'bg-primary' : 'bg-muted'} />
104
+
105
+ // Mapping object
106
+ const colorMap = {
107
+ primary: 'bg-blue-500 text-white',
108
+ danger: 'bg-red-500 text-white',
109
+ ghost: 'bg-transparent text-foreground',
110
+ };
111
+ <Pressable className={colorMap[variant]} />
112
+
113
+ // Array join for multiple conditions
114
+ <View className={[
115
+ 'p-4 rounded-lg',
116
+ isActive && 'bg-primary',
117
+ isDisabled && 'opacity-50',
118
+ ].filter(Boolean).join(' ')} />
119
+ ```
120
+
121
+ ## tailwind-variants (tv)
122
+
123
+ For complex component styling with variants and compound variants:
124
+
125
+ ```tsx
126
+ import { tv } from 'tailwind-variants';
127
+
128
+ const button = tv({
129
+ base: 'font-semibold rounded-lg px-4 py-2 items-center justify-center',
130
+ variants: {
131
+ color: {
132
+ primary: 'bg-blue-500 text-white',
133
+ secondary: 'bg-gray-500 text-white',
134
+ danger: 'bg-red-500 text-white',
135
+ ghost: 'bg-transparent text-foreground border border-border',
136
+ },
137
+ size: {
138
+ sm: 'text-sm px-3 py-1.5',
139
+ md: 'text-base px-4 py-2',
140
+ lg: 'text-lg px-6 py-3',
141
+ },
142
+ disabled: {
143
+ true: 'opacity-50',
144
+ },
145
+ },
146
+ compoundVariants: [
147
+ { color: 'primary', size: 'lg', class: 'bg-blue-600' },
148
+ ],
149
+ defaultVariants: { color: 'primary', size: 'md' },
150
+ });
151
+
152
+ <Pressable className={button({ color: 'primary', size: 'lg' })}>
153
+ <Text className="text-white font-semibold">Click</Text>
154
+ </Pressable>
155
+ ```
156
+
157
+ ## cn Utility — Class Deduplication
158
+
159
+ Uniwind does **NOT** auto-deduplicate conflicting classNames. This means if the same property appears in multiple classes, **both will be applied and the result is unpredictable**. This is especially critical when mixing custom CSS classes with Tailwind utilities.
160
+
161
+ ### Setup
162
+
163
+ ```bash
164
+ npm install tailwind-merge clsx
165
+ ```
166
+
167
+ ```ts
168
+ // lib/cn.ts
169
+ import { type ClassValue, clsx } from 'clsx';
170
+ import { twMerge } from 'tailwind-merge';
171
+
172
+ export function cn(...inputs: ClassValue[]) {
173
+ return twMerge(clsx(inputs));
174
+ }
175
+ ```
176
+
177
+ ### When cn Is Required
178
+
179
+ 1. **Merging className props** — component accepts external className that may conflict:
180
+
181
+ ```tsx
182
+ import { cn } from '@/lib/cn';
183
+
184
+ <View className={cn('p-4 bg-white', props.className)} />
185
+ <Text className={cn('text-base', isActive && 'text-primary', disabled && 'opacity-50')} />
186
+ ```
187
+
188
+ 2. **CRITICAL: Mixing custom CSS classes with Tailwind utilities** — if your custom CSS class sets a property that a Tailwind utility also sets, you MUST use `cn()` to deduplicate:
189
+
190
+ ```css
191
+ /* global.css */
192
+ .card {
193
+ background-color: white;
194
+ border-radius: 12px;
195
+ padding: 16px;
196
+ }
197
+ ```
198
+
199
+ ```tsx
200
+ // WRONG — both .card (padding: 16px) and p-6 (padding: 24px) apply, result is unpredictable
201
+ <View className="card p-6" />
202
+
203
+ // CORRECT — cn deduplicates, p-6 wins over .card's padding
204
+ <View className={cn('card', 'p-6')} />
205
+ ```
206
+
207
+ 3. **tv() output combined with extra classes** — tv already handles its own variants, but if you add more classes on top:
208
+
209
+ ```tsx
210
+ <Pressable className={cn(button({ color: 'primary' }), props.className)} />
211
+ ```
212
+
213
+ ### When cn Is NOT Needed
214
+
215
+ - Static className with no conflicts: `<View className="flex-1 p-4 bg-white" />`
216
+ - Single custom CSS class with no overlapping Tailwind: `<View className="card-shadow mt-4" />` (if card-shadow only sets box-shadow which no Tailwind class also sets)
217
+
218
+ ## Important Utilities and Style Specificity
219
+
220
+ Uniwind supports Tailwind's important modifier (`!`) for utilities that must override another utility for the same style property.
221
+
222
+ ```tsx
223
+ import { View, Pressable } from 'react-native';
224
+
225
+ // bg-red-500! has higher priority than bg-blue-500
226
+ <View className="bg-blue-500 bg-red-500!" />;
227
+
228
+ // Important utilities work with state and platform variants
229
+ <Pressable className="bg-blue-500 active:bg-red-500!" />;
230
+ <View className="pt-4 ios:pt-12! android:pt-8!" />;
231
+ ```
232
+
233
+ Priority rules:
234
+ - Important utility (`bg-red-500!`) overrides non-important utility (`bg-blue-500`) for the same property.
235
+ - Important variants work normally: `active:bg-red-500!`, `ios:pt-12!`, `dark:text-white!`.
236
+ - Inline `style` always wins, even over important className utilities: `<View className="bg-red-500!" style={{ backgroundColor: 'blue' }} />` renders blue.
237
+ - Use `!` sparingly. For reusable components and consumer overrides, prefer `cn()` with `tailwind-merge`.
@@ -0,0 +1,309 @@
1
+ ## Theming
2
+
3
+ ### Quick Setup (dark: prefix)
4
+
5
+ Works immediately — no configuration needed:
6
+
7
+ ```tsx
8
+ <View className="bg-white dark:bg-gray-900">
9
+ <Text className="text-black dark:text-white">Themed</Text>
10
+ </View>
11
+ ```
12
+
13
+ Best for small apps and prototyping. Does not scale to custom themes.
14
+
15
+ ### Scalable Setup (CSS Variables)
16
+
17
+ Define in `global.css`, use everywhere without `dark:` prefix:
18
+
19
+ ```css
20
+ @layer theme {
21
+ :root {
22
+ @variant light {
23
+ --color-background: #ffffff;
24
+ --color-foreground: #111827;
25
+ --color-foreground-secondary: #6b7280;
26
+ --color-card: #ffffff;
27
+ --color-border: #e5e7eb;
28
+ --color-muted: #9ca3af;
29
+ --color-primary: #3b82f6;
30
+ --color-danger: #ef4444;
31
+ --color-success: #10b981;
32
+ }
33
+ @variant dark {
34
+ --color-background: #000000;
35
+ --color-foreground: #ffffff;
36
+ --color-foreground-secondary: #9ca3af;
37
+ --color-card: #1f2937;
38
+ --color-border: #374151;
39
+ --color-muted: #6b7280;
40
+ --color-primary: #3b82f6;
41
+ --color-danger: #ef4444;
42
+ --color-success: #10b981;
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ```tsx
49
+ // Auto-adapts to current theme — no dark: prefix needed
50
+ <View className="bg-card border border-border p-4 rounded-lg">
51
+ <Text className="text-foreground text-lg font-bold">Title</Text>
52
+ <Text className="text-muted mt-2">Subtitle</Text>
53
+ </View>
54
+ ```
55
+
56
+ Variable naming: `--color-background` → `bg-background`, `text-background`.
57
+
58
+ **Prefer CSS variables over explicit `dark:` variants** — they're cleaner, maintain easier, and work with custom themes automatically.
59
+
60
+ ### Custom Themes
61
+
62
+ **Step 1** — Define in `global.css`:
63
+
64
+ ```css
65
+ @layer theme {
66
+ :root {
67
+ @variant light { /* ... */ }
68
+ @variant dark { /* ... */ }
69
+ @variant ocean {
70
+ --color-background: #0c4a6e;
71
+ --color-foreground: #e0f2fe;
72
+ --color-primary: #06b6d4;
73
+ --color-card: #0e7490;
74
+ --color-border: #155e75;
75
+ /* Must define ALL the same variables as light/dark */
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ **Step 2** — Register in `metro.config.js` (exclude `light`/`dark` — they're automatic):
82
+
83
+ ```js
84
+ module.exports = withUniwindConfig(config, {
85
+ cssEntryFile: './global.css',
86
+ extraThemes: ['ocean'],
87
+ });
88
+ ```
89
+
90
+ Restart Metro after adding themes.
91
+
92
+ **Step 3** — Use:
93
+
94
+ ```tsx
95
+ Uniwind.setTheme('ocean');
96
+ ```
97
+
98
+ ### Theme API
99
+
100
+ ```tsx
101
+ import { Uniwind, useUniwind } from 'uniwind';
102
+
103
+ // Imperative (no re-render)
104
+ Uniwind.setTheme('dark'); // Force dark
105
+ Uniwind.setTheme('light'); // Force light
106
+ Uniwind.setTheme('system'); // Follow device (re-enables adaptive themes)
107
+ Uniwind.setTheme('ocean'); // Custom theme (must be in extraThemes)
108
+ Uniwind.currentTheme; // Current theme name
109
+ Uniwind.hasAdaptiveThemes; // true if following system
110
+
111
+ // Reactive hook (re-renders on change)
112
+ const { theme, hasAdaptiveThemes } = useUniwind();
113
+ ```
114
+
115
+ `Uniwind.setTheme('light')` / `setTheme('dark')` also calls `Appearance.setColorScheme` to sync native components (Alert, Modal, system dialogs).
116
+
117
+ By default Uniwind uses "system" theme - follows device color scheme. If user wants to override it, just
118
+ call Uniwind.setTheme with desired theme. It can be done above the React component to avoid theme switching at runtime.
119
+
120
+ ### Theme Switcher Example
121
+
122
+ ```tsx
123
+ import { View, Pressable, Text, ScrollView } from 'react-native';
124
+ import { Uniwind, useUniwind } from 'uniwind';
125
+
126
+ export const ThemeSwitcher = () => {
127
+ const { theme, hasAdaptiveThemes } = useUniwind();
128
+ const activeTheme = hasAdaptiveThemes ? 'system' : theme;
129
+
130
+ const themes = [
131
+ { name: 'light', label: 'Light' },
132
+ { name: 'dark', label: 'Dark' },
133
+ { name: 'system', label: 'System' },
134
+ ];
135
+
136
+ return (
137
+ <ScrollView horizontal showsHorizontalScrollIndicator={false}>
138
+ <View className="flex-row gap-2 p-4">
139
+ {themes.map((t) => (
140
+ <Pressable
141
+ key={t.name}
142
+ onPress={() => Uniwind.setTheme(t.name)}
143
+ className={`px-4 py-3 rounded-lg items-center ${
144
+ activeTheme === t.name ? 'bg-primary' : 'bg-card border border-border'
145
+ }`}
146
+ >
147
+ <Text className={`text-sm ${
148
+ activeTheme === t.name ? 'text-white' : 'text-foreground'
149
+ }`}>
150
+ {t.label}
151
+ </Text>
152
+ </Pressable>
153
+ ))}
154
+ </View>
155
+ </ScrollView>
156
+ );
157
+ };
158
+ ```
159
+
160
+ ### ScopedTheme
161
+
162
+ Apply a different theme to a subtree without changing the global theme:
163
+
164
+ ```tsx
165
+ import { ScopedTheme } from 'uniwind';
166
+
167
+ <View className="gap-3">
168
+ <PreviewCard />
169
+
170
+ <ScopedTheme theme="dark">
171
+ <PreviewCard /> {/* Renders with dark theme */}
172
+ </ScopedTheme>
173
+
174
+ <ScopedTheme theme="ocean">
175
+ <PreviewCard /> {/* Renders with ocean theme */}
176
+ </ScopedTheme>
177
+ </View>
178
+ ```
179
+
180
+ - Nearest `ScopedTheme` wins (nested scopes supported)
181
+ - Hooks (`useUniwind`, `useResolveClassNames`, `useCSSVariable`) resolve against the nearest scoped theme
182
+ - `withUniwind`-wrapped components inside the scope also resolve scoped theme values
183
+ - Custom themes require registration in `extraThemes`
184
+
185
+ ### LayoutDirection (v1.8.0+)
186
+
187
+ Scope RTL/LTR variants to a subtree without changing global device RTL state:
188
+
189
+ ```tsx
190
+ import { LayoutDirection } from 'uniwind';
191
+
192
+ <View className="gap-3">
193
+ <Text className="ltr:text-left rtl:text-right">Uses global RTL state</Text>
194
+
195
+ <LayoutDirection rtl>
196
+ <Text className="ltr:text-left rtl:text-right">Forced RTL subtree</Text>
197
+ </LayoutDirection>
198
+
199
+ <LayoutDirection rtl={false}>
200
+ <Text className="ltr:text-left rtl:text-right">Forced LTR subtree</Text>
201
+ </LayoutDirection>
202
+ </View>
203
+ ```
204
+
205
+ - Available from `uniwind@1.8.0`.
206
+ - `rtl` prop: `true` forces RTL, `false` forces LTR.
207
+ - Omit `rtl` to inherit parent `LayoutDirection`; outside any parent it falls back to global RTL state.
208
+ - Nearest `LayoutDirection` wins (nested scopes supported).
209
+ - Prefer `LayoutDirection` over inline `style={{ direction: 'rtl' }}` for `rtl:`/`ltr:` variant scoping.
210
+ - Hooks (`useResolveClassNames`, `useCSSVariable`) and `withUniwind`-wrapped components inside the scope resolve against the nearest layout direction.
211
+
212
+ ### useCSSVariable
213
+
214
+ Access CSS variable values in JavaScript:
215
+
216
+ ```tsx
217
+ import { useCSSVariable } from 'uniwind';
218
+
219
+ const primaryColor = useCSSVariable('--color-primary');
220
+ const spacing = useCSSVariable('--spacing-4');
221
+
222
+ // Multiple variables at once
223
+ const [bg, fg] = useCSSVariable(['--color-background', '--color-foreground']) as [string, string]
224
+ ```
225
+
226
+ Use for: animations, chart libraries, third-party component configs, calculations with design tokens.
227
+
228
+ It's required to cast the result of `useCSSVariable` as it can return: string | number | undefined.
229
+ Uniwind doesn't know if given variable exist and what type it is, so it returns union type.
230
+
231
+ ### getCSSVariable
232
+
233
+ Read CSS variable values outside of React (event handlers, async callbacks, utility modules, worklets). Available in Uniwind 1.6.4+.
234
+
235
+ ```ts
236
+ import { Uniwind } from 'uniwind';
237
+
238
+ const primary = Uniwind.getCSSVariable('--color-primary');
239
+ const [bg, fg] = Uniwind.getCSSVariable(['--color-background', '--color-foreground']) as [string, string];
240
+ ```
241
+
242
+ Same value rules as `useCSSVariable` (variable must be used in a `className` or declared in `@theme static`). Same return type: `string | number | undefined`. Cast as needed.
243
+
244
+ Not reactive — value is read once. For reactive values inside components use `useCSSVariable`. Use `getCSSVariable` for one-shot reads (onPress handlers, utility functions, native module configs).
245
+
246
+ ### Runtime CSS Variable Updates
247
+
248
+ Update theme variables at runtime (e.g., user-selected brand colors or API-driven themes):
249
+
250
+ ```tsx
251
+ Uniwind.updateCSSVariables('light', {
252
+ '--color-primary': '#ff6600',
253
+ '--color-background': '#fafafa',
254
+ });
255
+ ```
256
+
257
+ Updates are theme-specific and take effect immediately.
258
+
259
+ ### @theme static
260
+
261
+ For JS-only values not used in classNames:
262
+
263
+ ```css
264
+ @theme static {
265
+ --chart-line-width: 2;
266
+ --chart-dot-radius: 4;
267
+ --animation-duration: 300;
268
+ }
269
+ ```
270
+
271
+ Access via `useCSSVariable('--chart-line-width')`. Use for: chart configs, animation durations, native module values.
272
+
273
+ ### OKLCH Colors support
274
+
275
+ Perceptually uniform color format — wider gamut, consistent lightness:
276
+
277
+ ```css
278
+ @layer theme {
279
+ :root {
280
+ @variant light {
281
+ --color-primary: oklch(0.5 0.2 240);
282
+ --color-background: oklch(1 0 0);
283
+ }
284
+ @variant dark {
285
+ --color-primary: oklch(0.6 0.2 240);
286
+ --color-background: oklch(0.13 0.004 17.69);
287
+ }
288
+ }
289
+ }
290
+ ```
291
+
292
+ ### Display P3 Colors support
293
+
294
+ Wide-gamut color format for devices that support the P3 color space (most modern iPhones and Macs). Uniwind parses `color(display-p3 ...)` values and converts them for native use:
295
+
296
+ ```css
297
+ @layer theme {
298
+ :root {
299
+ @variant light {
300
+ --color-primary: color(display-p3 0.2 0.4 1);
301
+ --color-accent: color(display-p3 1 0.3 0.3);
302
+ }
303
+ @variant dark {
304
+ --color-primary: color(display-p3 0.3 0.5 1);
305
+ --color-accent: color(display-p3 1 0.4 0.4);
306
+ }
307
+ }
308
+ }
309
+ ```