@yahoo/uds 3.117.0 → 3.117.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 (377) hide show
  1. package/dist/automated-config/dist/utils/getConfigVariantComponentStatesMatrix.cjs +2 -3
  2. package/dist/automated-config/dist/utils/getConfigVariantProperties.cjs +2 -3
  3. package/dist/automated-config/dist/utils/getConfigVariants.cjs +2 -3
  4. package/dist/automated-config/dist/utils/index.cjs +3 -6
  5. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
  6. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
  7. package/dist/styles/styler.d.cts +53 -53
  8. package/dist/styles/styler.d.ts +53 -53
  9. package/dist/tailwind/dist/_virtual/_rolldown/runtime.cjs +27 -8
  10. package/dist/tailwind/dist/_virtual/_rolldown/runtime.js +3 -6
  11. package/dist/tailwind/dist/cli.cjs +11 -0
  12. package/dist/tailwind/dist/cli.d.cts +6 -0
  13. package/dist/tailwind/dist/cli.d.ts +6 -0
  14. package/dist/tailwind/dist/cli.js +7 -0
  15. package/dist/tailwind/dist/commands/css.cjs +36 -37
  16. package/dist/tailwind/dist/commands/css.d.cts +14 -0
  17. package/dist/tailwind/dist/commands/css.d.cts.map +1 -0
  18. package/dist/tailwind/dist/commands/css.d.ts +14 -0
  19. package/dist/tailwind/dist/commands/css.d.ts.map +1 -0
  20. package/dist/tailwind/dist/commands/css.helpers.cjs +2 -3
  21. package/dist/tailwind/dist/commands/css.helpers.js +3 -3
  22. package/dist/tailwind/dist/commands/css.helpers.js.map +1 -0
  23. package/dist/tailwind/dist/commands/css.js +5 -6
  24. package/dist/tailwind/dist/commands/css.js.map +1 -0
  25. package/dist/tailwind/dist/commands/generateComponentData.cjs +13 -14
  26. package/dist/tailwind/dist/commands/generateComponentData.d.cts +24 -0
  27. package/dist/tailwind/dist/commands/generateComponentData.d.cts.map +1 -0
  28. package/dist/tailwind/dist/commands/generateComponentData.d.ts +22 -1
  29. package/dist/tailwind/dist/commands/generateComponentData.d.ts.map +1 -0
  30. package/dist/tailwind/dist/commands/generateComponentData.js +6 -6
  31. package/dist/tailwind/dist/commands/generateComponentData.js.map +1 -0
  32. package/dist/tailwind/dist/commands/generatePurgeCSSData.cjs +5 -7
  33. package/dist/tailwind/dist/commands/generatePurgeCSSData.d.cts +15 -0
  34. package/dist/tailwind/dist/commands/generatePurgeCSSData.d.cts.map +1 -0
  35. package/dist/tailwind/dist/commands/generatePurgeCSSData.d.ts +15 -0
  36. package/dist/tailwind/dist/commands/generatePurgeCSSData.d.ts.map +1 -0
  37. package/dist/tailwind/dist/commands/generatePurgeCSSData.js +5 -6
  38. package/dist/tailwind/dist/commands/generatePurgeCSSData.js.map +1 -0
  39. package/dist/tailwind/dist/commands/purge.cjs +15 -16
  40. package/dist/tailwind/dist/commands/purge.d.cts +17 -0
  41. package/dist/tailwind/dist/commands/purge.d.cts.map +1 -0
  42. package/dist/tailwind/dist/commands/purge.d.ts +17 -0
  43. package/dist/tailwind/dist/commands/purge.d.ts.map +1 -0
  44. package/dist/tailwind/dist/commands/purge.js +5 -6
  45. package/dist/tailwind/dist/commands/purge.js.map +1 -0
  46. package/dist/tailwind/dist/css/generate.cjs +13 -16
  47. package/dist/tailwind/dist/css/generate.d.cts +3 -4
  48. package/dist/tailwind/dist/css/generate.d.cts.map +1 -0
  49. package/dist/tailwind/dist/css/generate.d.ts +3 -4
  50. package/dist/tailwind/dist/css/generate.d.ts.map +1 -0
  51. package/dist/tailwind/dist/css/generate.helpers.cjs +6 -6
  52. package/dist/tailwind/dist/css/generate.helpers.js +7 -6
  53. package/dist/tailwind/dist/css/generate.helpers.js.map +1 -0
  54. package/dist/tailwind/dist/css/generate.js +7 -9
  55. package/dist/tailwind/dist/css/generate.js.map +1 -0
  56. package/dist/tailwind/dist/css/nodeUtils.cjs +14 -16
  57. package/dist/tailwind/dist/css/nodeUtils.js +6 -7
  58. package/dist/tailwind/dist/css/nodeUtils.js.map +1 -0
  59. package/dist/tailwind/dist/css/postcss.cjs +2 -3
  60. package/dist/tailwind/dist/css/postcss.helpers.cjs +2 -3
  61. package/dist/tailwind/dist/css/postcss.helpers.js +3 -3
  62. package/dist/tailwind/dist/css/postcss.helpers.js.map +1 -0
  63. package/dist/tailwind/dist/css/postcss.js +4 -4
  64. package/dist/tailwind/dist/css/postcss.js.map +1 -0
  65. package/dist/tailwind/dist/css/runner.cjs +40 -35
  66. package/dist/tailwind/dist/css/runner.helpers.cjs +3 -4
  67. package/dist/tailwind/dist/css/runner.helpers.js +4 -4
  68. package/dist/tailwind/dist/css/runner.helpers.js.map +1 -0
  69. package/dist/tailwind/dist/css/runner.js +17 -11
  70. package/dist/tailwind/dist/css/runner.js.map +1 -0
  71. package/dist/tailwind/dist/css/theme.cjs +2 -3
  72. package/dist/tailwind/dist/css/theme.d.cts +13 -5
  73. package/dist/tailwind/dist/css/theme.d.cts.map +1 -0
  74. package/dist/tailwind/dist/css/theme.d.ts +13 -5
  75. package/dist/tailwind/dist/css/theme.d.ts.map +1 -0
  76. package/dist/tailwind/dist/css/theme.js +3 -3
  77. package/dist/tailwind/dist/css/theme.js.map +1 -0
  78. package/dist/tailwind/dist/css/utils.cjs +5 -5
  79. package/dist/tailwind/dist/css/utils.js +5 -5
  80. package/dist/tailwind/dist/css/utils.js.map +1 -0
  81. package/dist/tailwind/dist/index.cjs +9 -0
  82. package/dist/tailwind/dist/index.d.cts +3 -2
  83. package/dist/tailwind/dist/index.d.ts +3 -2
  84. package/dist/tailwind/dist/index.js +6 -0
  85. package/dist/tailwind/dist/plugin.cjs +7 -6
  86. package/dist/tailwind/dist/plugin.d.cts +3 -3
  87. package/dist/tailwind/dist/plugin.d.cts.map +1 -0
  88. package/dist/tailwind/dist/plugin.d.ts +3 -3
  89. package/dist/tailwind/dist/plugin.d.ts.map +1 -0
  90. package/dist/tailwind/dist/plugin.js +4 -4
  91. package/dist/tailwind/dist/plugin.js.map +1 -0
  92. package/dist/tailwind/dist/purger/legacy/index.d.ts +2 -0
  93. package/dist/tailwind/dist/purger/legacy/purgeCSS.cjs +25 -24
  94. package/dist/tailwind/dist/purger/legacy/purgeCSS.d.cts +24 -0
  95. package/dist/tailwind/dist/purger/legacy/purgeCSS.d.cts.map +1 -0
  96. package/dist/tailwind/dist/purger/legacy/purgeCSS.d.ts +24 -0
  97. package/dist/tailwind/dist/purger/legacy/purgeCSS.d.ts.map +1 -0
  98. package/dist/tailwind/dist/purger/legacy/purgeCSS.js +8 -9
  99. package/dist/tailwind/dist/purger/legacy/purgeCSS.js.map +1 -0
  100. package/dist/tailwind/dist/purger/legacy/purgeFromCode.cjs +59 -0
  101. package/dist/tailwind/dist/purger/legacy/purgeFromCode.d.cts +28 -0
  102. package/dist/tailwind/dist/purger/legacy/purgeFromCode.d.cts.map +1 -0
  103. package/dist/tailwind/dist/purger/legacy/purgeFromCode.d.ts +28 -0
  104. package/dist/tailwind/dist/purger/legacy/purgeFromCode.d.ts.map +1 -0
  105. package/dist/tailwind/dist/purger/legacy/purgeFromCode.js +59 -0
  106. package/dist/tailwind/dist/purger/legacy/purgeFromCode.js.map +1 -0
  107. package/dist/tailwind/dist/purger/optimized/ast/expressions.cjs +5 -6
  108. package/dist/tailwind/dist/purger/optimized/ast/expressions.d.ts +2 -0
  109. package/dist/tailwind/dist/purger/optimized/ast/expressions.js +5 -5
  110. package/dist/tailwind/dist/purger/optimized/ast/expressions.js.map +1 -0
  111. package/dist/tailwind/dist/purger/optimized/ast/index.d.ts +5 -0
  112. package/dist/tailwind/dist/purger/optimized/ast/jsx.cjs +3 -4
  113. package/dist/tailwind/dist/purger/optimized/ast/jsx.d.ts +3 -0
  114. package/dist/tailwind/dist/purger/optimized/ast/jsx.js +4 -4
  115. package/dist/tailwind/dist/purger/optimized/ast/jsx.js.map +1 -0
  116. package/dist/tailwind/dist/purger/optimized/ast/props.d.ts +2 -0
  117. package/dist/tailwind/dist/purger/optimized/ast/spread.d.ts +3 -0
  118. package/dist/tailwind/dist/purger/optimized/index.d.ts +6 -0
  119. package/dist/tailwind/dist/purger/optimized/purge.cjs +5 -6
  120. package/dist/tailwind/dist/purger/optimized/purge.d.ts +2 -0
  121. package/dist/tailwind/dist/purger/optimized/purge.js +5 -5
  122. package/dist/tailwind/dist/purger/optimized/purge.js.map +1 -0
  123. package/dist/tailwind/dist/purger/optimized/purgeFromCode.cjs +3 -4
  124. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.cts +58 -0
  125. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.cts.map +1 -0
  126. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.ts +58 -0
  127. package/dist/tailwind/dist/purger/optimized/purgeFromCode.d.ts.map +1 -0
  128. package/dist/tailwind/dist/purger/optimized/purgeFromCode.js +4 -4
  129. package/dist/tailwind/dist/purger/optimized/purgeFromCode.js.map +1 -0
  130. package/dist/tailwind/dist/purger/optimized/types.d.cts +22 -0
  131. package/dist/tailwind/dist/purger/optimized/types.d.cts.map +1 -0
  132. package/dist/tailwind/dist/purger/optimized/types.d.ts +23 -0
  133. package/dist/tailwind/dist/purger/optimized/types.d.ts.map +1 -0
  134. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.cjs +8 -9
  135. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js +7 -7
  136. package/dist/tailwind/dist/purger/optimized/utils/componentAnalyzer.js.map +1 -0
  137. package/dist/tailwind/dist/purger/optimized/utils/files.cjs +3 -4
  138. package/dist/tailwind/dist/purger/optimized/utils/files.d.ts +2 -0
  139. package/dist/tailwind/dist/purger/optimized/utils/files.js +4 -4
  140. package/dist/tailwind/dist/purger/optimized/utils/files.js.map +1 -0
  141. package/dist/tailwind/dist/purger/optimized/utils/safelist.cjs +7 -8
  142. package/dist/tailwind/dist/purger/optimized/utils/safelist.js +6 -6
  143. package/dist/tailwind/dist/purger/optimized/utils/safelist.js.map +1 -0
  144. package/dist/tailwind/dist/purger.cjs +7 -0
  145. package/dist/tailwind/dist/purger.d.cts +4 -0
  146. package/dist/tailwind/dist/purger.d.ts +6 -0
  147. package/dist/tailwind/dist/purger.js +5 -0
  148. package/dist/tailwind/dist/tailwind/base/addColorModeVars.cjs +10 -10
  149. package/dist/tailwind/dist/tailwind/base/addColorModeVars.js +6 -6
  150. package/dist/tailwind/dist/tailwind/base/addColorModeVars.js.map +1 -0
  151. package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.cjs +14 -14
  152. package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.js +6 -6
  153. package/dist/tailwind/dist/tailwind/base/addColorModeVarsV2.js.map +1 -0
  154. package/dist/tailwind/dist/tailwind/base/addFontFaceDeclarations.cjs +2 -3
  155. package/dist/tailwind/dist/tailwind/base/addFontFaceDeclarations.js +4 -4
  156. package/dist/tailwind/dist/tailwind/base/addFontFaceDeclarations.js.map +1 -0
  157. package/dist/tailwind/dist/tailwind/base/addFontVars.cjs +2 -3
  158. package/dist/tailwind/dist/tailwind/base/addFontVars.js +4 -4
  159. package/dist/tailwind/dist/tailwind/base/addFontVars.js.map +1 -0
  160. package/dist/tailwind/dist/tailwind/base/addMotionVars.cjs +2 -3
  161. package/dist/tailwind/dist/tailwind/base/addMotionVars.js +4 -4
  162. package/dist/tailwind/dist/tailwind/base/addMotionVars.js.map +1 -0
  163. package/dist/tailwind/dist/tailwind/base/addScaleModeVars.cjs +13 -13
  164. package/dist/tailwind/dist/tailwind/base/addScaleModeVars.js +6 -6
  165. package/dist/tailwind/dist/tailwind/base/addScaleModeVars.js.map +1 -0
  166. package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.cjs +6 -6
  167. package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.js +5 -5
  168. package/dist/tailwind/dist/tailwind/components/getFocusRingStyles.js.map +1 -0
  169. package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.cjs +12 -12
  170. package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.js +6 -6
  171. package/dist/tailwind/dist/tailwind/components/getGroupedTextStyles.js.map +1 -0
  172. package/dist/tailwind/dist/tailwind/components/getHitTargetStyles.cjs +2 -3
  173. package/dist/tailwind/dist/tailwind/components/getHitTargetStyles.js +3 -3
  174. package/dist/tailwind/dist/tailwind/components/getHitTargetStyles.js.map +1 -0
  175. package/dist/tailwind/dist/tailwind/components/getIconStyles.cjs +2 -3
  176. package/dist/tailwind/dist/tailwind/components/getIconStyles.js +3 -3
  177. package/dist/tailwind/dist/tailwind/components/getIconStyles.js.map +1 -0
  178. package/dist/tailwind/dist/tailwind/components/getInputStyles.cjs +2 -3
  179. package/dist/tailwind/dist/tailwind/components/getInputStyles.d.cts +3 -3
  180. package/dist/tailwind/dist/tailwind/components/getInputStyles.d.cts.map +1 -0
  181. package/dist/tailwind/dist/tailwind/components/getInputStyles.d.ts +3 -3
  182. package/dist/tailwind/dist/tailwind/components/getInputStyles.d.ts.map +1 -0
  183. package/dist/tailwind/dist/tailwind/components/getInputStyles.js +3 -3
  184. package/dist/tailwind/dist/tailwind/components/getInputStyles.js.map +1 -0
  185. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.cjs +29 -29
  186. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.cts +6 -4
  187. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.cts.map +1 -0
  188. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.ts +6 -4
  189. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.d.ts.map +1 -0
  190. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.js +8 -8
  191. package/dist/tailwind/dist/tailwind/components/getResponsiveTextStyles.js.map +1 -0
  192. package/dist/tailwind/dist/tailwind/components/types.d.cts +3 -3
  193. package/dist/tailwind/dist/tailwind/components/types.d.cts.map +1 -0
  194. package/dist/tailwind/dist/tailwind/components/types.d.ts +3 -3
  195. package/dist/tailwind/dist/tailwind/components/types.d.ts.map +1 -0
  196. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.cjs +2 -3
  197. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts +6 -6
  198. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts.map +1 -0
  199. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts +6 -6
  200. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts.map +1 -0
  201. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.js +3 -3
  202. package/dist/tailwind/dist/tailwind/defaultTailwindThemeAsUdsConfig.js.map +1 -0
  203. package/dist/tailwind/dist/tailwind/plugins/a11y.cjs +3 -4
  204. package/dist/tailwind/dist/tailwind/plugins/a11y.js +4 -4
  205. package/dist/tailwind/dist/tailwind/plugins/a11y.js.map +1 -0
  206. package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.cjs +7 -8
  207. package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js +5 -5
  208. package/dist/tailwind/dist/tailwind/plugins/blurBgFallback.js.map +1 -0
  209. package/dist/tailwind/dist/tailwind/plugins/borderRadius.cjs +8 -9
  210. package/dist/tailwind/dist/tailwind/plugins/borderRadius.js +7 -7
  211. package/dist/tailwind/dist/tailwind/plugins/borderRadius.js.map +1 -0
  212. package/dist/tailwind/dist/tailwind/plugins/borderWidth.cjs +8 -9
  213. package/dist/tailwind/dist/tailwind/plugins/borderWidth.js +7 -7
  214. package/dist/tailwind/dist/tailwind/plugins/borderWidth.js.map +1 -0
  215. package/dist/tailwind/dist/tailwind/plugins/breakpoints.cjs +3 -4
  216. package/dist/tailwind/dist/tailwind/plugins/breakpoints.js +4 -4
  217. package/dist/tailwind/dist/tailwind/plugins/breakpoints.js.map +1 -0
  218. package/dist/tailwind/dist/tailwind/plugins/colors.cjs +17 -17
  219. package/dist/tailwind/dist/tailwind/plugins/colors.js +9 -9
  220. package/dist/tailwind/dist/tailwind/plugins/colors.js.map +1 -0
  221. package/dist/tailwind/dist/tailwind/plugins/components.cjs +25 -26
  222. package/dist/tailwind/dist/tailwind/plugins/components.js +7 -7
  223. package/dist/tailwind/dist/tailwind/plugins/components.js.map +1 -0
  224. package/dist/tailwind/dist/tailwind/plugins/elevation.cjs +7 -8
  225. package/dist/tailwind/dist/tailwind/plugins/elevation.js +6 -6
  226. package/dist/tailwind/dist/tailwind/plugins/elevation.js.map +1 -0
  227. package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.cjs +5 -5
  228. package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js +5 -5
  229. package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js.map +1 -0
  230. package/dist/tailwind/dist/tailwind/plugins/icons.cjs +3 -4
  231. package/dist/tailwind/dist/tailwind/plugins/icons.js +4 -4
  232. package/dist/tailwind/dist/tailwind/plugins/icons.js.map +1 -0
  233. package/dist/tailwind/dist/tailwind/plugins/input.cjs +3 -4
  234. package/dist/tailwind/dist/tailwind/plugins/input.js +4 -4
  235. package/dist/tailwind/dist/tailwind/plugins/input.js.map +1 -0
  236. package/dist/tailwind/dist/tailwind/plugins/motion.cjs +3 -4
  237. package/dist/tailwind/dist/tailwind/plugins/motion.js +4 -4
  238. package/dist/tailwind/dist/tailwind/plugins/motion.js.map +1 -0
  239. package/dist/tailwind/dist/tailwind/plugins/nestedBorderRadius.cjs +3 -4
  240. package/dist/tailwind/dist/tailwind/plugins/nestedBorderRadius.js +4 -4
  241. package/dist/tailwind/dist/tailwind/plugins/nestedBorderRadius.js.map +1 -0
  242. package/dist/tailwind/dist/tailwind/plugins/scaleMode.cjs +3 -4
  243. package/dist/tailwind/dist/tailwind/plugins/scaleMode.js +4 -4
  244. package/dist/tailwind/dist/tailwind/plugins/scaleMode.js.map +1 -0
  245. package/dist/tailwind/dist/tailwind/plugins/shadows.cjs +8 -9
  246. package/dist/tailwind/dist/tailwind/plugins/shadows.js +5 -5
  247. package/dist/tailwind/dist/tailwind/plugins/shadows.js.map +1 -0
  248. package/dist/tailwind/dist/tailwind/plugins/sizing.cjs +5 -6
  249. package/dist/tailwind/dist/tailwind/plugins/sizing.js +5 -5
  250. package/dist/tailwind/dist/tailwind/plugins/sizing.js.map +1 -0
  251. package/dist/tailwind/dist/tailwind/plugins/spacing.cjs +3 -4
  252. package/dist/tailwind/dist/tailwind/plugins/spacing.js +4 -4
  253. package/dist/tailwind/dist/tailwind/plugins/spacing.js.map +1 -0
  254. package/dist/tailwind/dist/tailwind/plugins/typography.cjs +10 -11
  255. package/dist/tailwind/dist/tailwind/plugins/typography.js +7 -7
  256. package/dist/tailwind/dist/tailwind/plugins/typography.js.map +1 -0
  257. package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.cjs +9 -9
  258. package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.js +6 -6
  259. package/dist/tailwind/dist/tailwind/theme/getFontFamilyTheme.js.map +1 -0
  260. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.cjs +3 -4
  261. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.cts +4 -4
  262. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.cts.map +1 -0
  263. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.ts +4 -4
  264. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.d.ts.map +1 -0
  265. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.js +4 -4
  266. package/dist/tailwind/dist/tailwind/utils/addFontsPlugin.js.map +1 -0
  267. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.cjs +15 -9
  268. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.cts +4 -4
  269. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.cts.map +1 -0
  270. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.ts +5 -5
  271. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.d.ts.map +1 -0
  272. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.js +7 -7
  273. package/dist/tailwind/dist/tailwind/utils/composeTailwindPlugins.js.map +1 -0
  274. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.cjs +2 -3
  275. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.d.cts +3 -3
  276. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.d.cts.map +1 -0
  277. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.d.ts +3 -3
  278. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.d.ts.map +1 -0
  279. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.js +3 -3
  280. package/dist/tailwind/dist/tailwind/utils/getColorModeStyles.js.map +1 -0
  281. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.cjs +9 -9
  282. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.cts +4 -4
  283. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.cts.map +1 -0
  284. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.ts +4 -4
  285. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.d.ts.map +1 -0
  286. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.js +5 -5
  287. package/dist/tailwind/dist/tailwind/utils/getElevationStyles.js.map +1 -0
  288. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.cjs +5 -5
  289. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.cts +4 -4
  290. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.cts.map +1 -0
  291. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.ts +4 -4
  292. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.d.ts.map +1 -0
  293. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.js +5 -5
  294. package/dist/tailwind/dist/tailwind/utils/getFontFaceDeclarations.js.map +1 -0
  295. package/dist/tailwind/dist/tailwind/utils/getFontStyles.cjs +7 -7
  296. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +4 -4
  297. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts.map +1 -0
  298. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +4 -4
  299. package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts.map +1 -0
  300. package/dist/tailwind/dist/tailwind/utils/getFontStyles.js +6 -6
  301. package/dist/tailwind/dist/tailwind/utils/getFontStyles.js.map +1 -0
  302. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.cjs +7 -7
  303. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.cts +4 -4
  304. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.cts.map +1 -0
  305. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.ts +4 -4
  306. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.d.ts.map +1 -0
  307. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.js +6 -6
  308. package/dist/tailwind/dist/tailwind/utils/getMotionStyles.js.map +1 -0
  309. package/dist/tailwind/dist/tailwind/utils/getNestedBorderRadiusUtilities.cjs +2 -3
  310. package/dist/tailwind/dist/tailwind/utils/getNestedBorderRadiusUtilities.js +3 -3
  311. package/dist/tailwind/dist/tailwind/utils/getNestedBorderRadiusUtilities.js.map +1 -0
  312. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.cjs +2 -3
  313. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.d.cts +3 -3
  314. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.d.cts.map +1 -0
  315. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.d.ts +3 -3
  316. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.d.ts.map +1 -0
  317. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.js +3 -3
  318. package/dist/tailwind/dist/tailwind/utils/getScaleModeStyles.js.map +1 -0
  319. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.cjs +5 -5
  320. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.cts +5 -5
  321. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.cts.map +1 -0
  322. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.ts +5 -5
  323. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.d.ts.map +1 -0
  324. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.js +5 -5
  325. package/dist/tailwind/dist/tailwind/utils/getShadowPresetValues.js.map +1 -0
  326. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.cjs +6 -6
  327. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts +5 -5
  328. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.cts.map +1 -0
  329. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts +5 -5
  330. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.d.ts.map +1 -0
  331. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.js +5 -5
  332. package/dist/tailwind/dist/tailwind/utils/getShadowStyles.js.map +1 -0
  333. package/dist/tailwind/dist/utils/assertUnreachable.cjs +2 -3
  334. package/dist/tailwind/dist/utils/assertUnreachable.js +3 -3
  335. package/dist/tailwind/dist/utils/assertUnreachable.js.map +1 -0
  336. package/dist/tailwind/dist/utils/entries.cjs +2 -3
  337. package/dist/tailwind/dist/utils/entries.js +3 -3
  338. package/dist/tailwind/dist/utils/entries.js.map +1 -0
  339. package/dist/tailwind/dist/utils/entryPoints.cjs +5 -6
  340. package/dist/tailwind/dist/utils/entryPoints.js +5 -5
  341. package/dist/tailwind/dist/utils/entryPoints.js.map +1 -0
  342. package/dist/tailwind/dist/utils/fromEntries.cjs +2 -3
  343. package/dist/tailwind/dist/utils/fromEntries.js +3 -3
  344. package/dist/tailwind/dist/utils/fromEntries.js.map +1 -0
  345. package/dist/tailwind/dist/utils/generatePurgeCSSData.cjs +11 -13
  346. package/dist/tailwind/dist/utils/generatePurgeCSSData.js +7 -8
  347. package/dist/tailwind/dist/utils/generatePurgeCSSData.js.map +1 -0
  348. package/dist/tailwind/dist/utils/mapValues.cjs +2 -3
  349. package/dist/tailwind/dist/utils/mapValues.js +3 -3
  350. package/dist/tailwind/dist/utils/mapValues.js.map +1 -0
  351. package/dist/tailwind/dist/utils/opacity.cjs +6 -6
  352. package/dist/tailwind/dist/utils/opacity.js +4 -4
  353. package/dist/tailwind/dist/utils/opacity.js.map +1 -0
  354. package/dist/tailwind/dist/utils/optimizeCSS.cjs +3 -4
  355. package/dist/tailwind/dist/utils/optimizeCSS.js +4 -4
  356. package/dist/tailwind/dist/utils/optimizeCSS.js.map +1 -0
  357. package/dist/tailwind/dist/utils/parseTokens.cjs +32 -32
  358. package/dist/tailwind/dist/utils/parseTokens.d.cts +5 -5
  359. package/dist/tailwind/dist/utils/parseTokens.d.cts.map +1 -0
  360. package/dist/tailwind/dist/utils/parseTokens.d.ts +5 -5
  361. package/dist/tailwind/dist/utils/parseTokens.d.ts.map +1 -0
  362. package/dist/tailwind/dist/utils/parseTokens.js +6 -6
  363. package/dist/tailwind/dist/utils/parseTokens.js.map +1 -0
  364. package/dist/tailwind/dist/utils/postcssPreserveVars.cjs +2 -3
  365. package/dist/tailwind/dist/utils/postcssPreserveVars.js +3 -3
  366. package/dist/tailwind/dist/utils/postcssPreserveVars.js.map +1 -0
  367. package/dist/tailwind/dist/utils/tsMorph.cjs +13 -11
  368. package/dist/tailwind/dist/utils/tsMorph.js +4 -4
  369. package/dist/tailwind/dist/utils/tsMorph.js.map +1 -0
  370. package/dist/tailwind/dist/utils.cjs +25 -0
  371. package/dist/tailwind/dist/utils.d.cts +2 -1
  372. package/dist/tailwind/dist/utils.d.ts +2 -1
  373. package/dist/tailwind/dist/utils.js +13 -0
  374. package/dist/uds/generated/componentData.cjs +145 -145
  375. package/dist/uds/generated/componentData.js +145 -145
  376. package/generated/componentData.json +209 -209
  377. package/package.json +1 -1
@@ -1,20 +1,17 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { defaultTokensConfig } from "../../../config/dist/index.js";
3
- import { cyan, magenta, yellow } from "../../../cli/dist/lib/colors.js";
4
- import { print } from "../../../cli/dist/lib/print.js";
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
5
2
  import { resolveEntryPaths } from "../utils/entryPoints.js";
6
- import { spinStop } from "../../../cli/dist/lib/spinner.js";
7
3
  import { loadConfigFile, scanDirectoriesForSafelist } from "./nodeUtils.js";
8
4
  import { deduplicateSafelist, getThemeAndScaleClasses } from "../purger/optimized/utils/safelist.js";
9
5
  import { extractVariantDefaults, getConfigurableCssVariables, getMotionVarPrefixes } from "./utils.js";
10
6
  import { applyScopedColorModeFix, buildPostcssPlugins, createTailwindPlugin, getCssFeatureFlags, optimizeGeneratedCss, printSimpleModeStats } from "./generate.helpers.js";
11
- import path from "node:path";
7
+ import { cyan, magenta, print, spinStop, yellow } from "@yahoo/uds-cli/lib";
12
8
  import fs from "node:fs";
9
+ import path from "node:path";
10
+ import { defaultTokensConfig } from "@yahoo/uds-config";
13
11
  import { gzipSync } from "node:zlib";
14
12
  import postcss from "postcss";
15
13
 
16
- //#region ../tailwind/dist/css/generate.js
17
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
14
+ //#region src/css/generate.ts
18
15
  const normalizeScope = (scope) => {
19
16
  const trimmedScope = scope?.trim();
20
17
  return trimmedScope ? trimmedScope : void 0;
@@ -121,4 +118,5 @@ const generateSimpleModeCSS = async (options) => {
121
118
  };
122
119
 
123
120
  //#endregion
124
- export { generateCSS, generateSimpleModeCSS };
121
+ export { generateCSS, generateSimpleModeCSS };
122
+ //# sourceMappingURL=generate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.js","names":[],"sources":["../../src/css/generate.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { gzipSync } from 'node:zlib';\n\nimport { cyan, magenta, print, spinStop, yellow } from '@yahoo/uds-cli/lib';\nimport type { UniversalTokensConfig } from '@yahoo/uds-config';\nimport { defaultTokensConfig } from '@yahoo/uds-config';\nimport postcss from 'postcss';\nimport type { SafelistConfig } from 'tailwindcss/types/config';\n\nimport type { SerializedComponentInfo } from '../commands/generateComponentData';\nimport { deduplicateSafelist, getThemeAndScaleClasses } from '../purger/optimized';\nimport type { EntryValue } from '../utils/entryPoints';\nimport { resolveEntryPaths } from '../utils/entryPoints';\nimport {\n applyScopedColorModeFix,\n buildPostcssPlugins,\n createTailwindPlugin,\n getCssFeatureFlags,\n optimizeGeneratedCss,\n printSimpleModeStats,\n} from './generate.helpers';\nimport { loadConfigFile, scanDirectoriesForSafelist } from './nodeUtils';\nimport type { UDSCSSOptimizationOptions, UDSCSSVarSafelistPattern } from './theme';\nimport { extractVariantDefaults, getConfigurableCssVariables, getMotionVarPrefixes } from './utils';\n\n/**\n * Result from generating CSS\n */\ninterface CSSResult {\n css: string;\n sizeBytes: number;\n sizeGzipBytes: number;\n classCount: number;\n optimizationStats?: {\n originalSize: number;\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n validationErrors: string[];\n };\n}\n\n/**\n * CSS generation options for uds.theme.ts\n */\ninterface UDSCSSOptions {\n /** CSS scope wrapper class (optional) */\n scope?: string;\n /** Safelist of CSS classes to always include */\n safelist?: SafelistConfig[];\n /** CSS optimization settings */\n optimization?: UDSCSSOptimizationOptions;\n /** Include Tailwind preflight/reset styles (default: true) */\n preflight?: boolean;\n /** Include @font-face declarations (default: true) */\n fontFaceDeclarations?: boolean;\n /** Debounce delay (ms) for watch mode regenerations */\n watchDebounce?: number;\n}\n\n/**\n * Options for generateCSS function\n */\ninterface GenerateCSSOptions {\n /** CSS scope wrapper class */\n scope?: string;\n /** Directory to scan for arbitrary Tailwind classes (className props) */\n contentDir?: string | string[];\n /** CSS generation options from theme config */\n cssOptions?: UDSCSSOptions;\n /** Reference CSS to deduplicate font-faces against (for scoped CSS) */\n referenceCss?: string;\n /** CSS variable prefixes or patterns to preserve during pruning */\n safeVarPrefixes?: UDSCSSVarSafelistPattern[];\n}\n\nconst normalizeScope = (scope?: string): string | undefined => {\n const trimmedScope = scope?.trim();\n return trimmedScope ? trimmedScope : undefined;\n};\n\nconst getArbitrarySafelistRawContent = (safelist: SafelistConfig[]): string[] => {\n const arbitraryClasses = safelist.filter(\n (entry): entry is string => typeof entry === 'string' && entry.includes('['),\n );\n\n if (arbitraryClasses.length === 0) {\n return [];\n }\n\n return [`<div class=\"${arbitraryClasses.join(' ')}\"></div>`];\n};\n\n/**\n * Generate CSS from a safelist using Tailwind + PostCSS\n * @param safelist - UDS component classes to include\n * @param config - Token configuration\n * @param options - Additional options\n */\nconst generateCSS = async (\n safelist: SafelistConfig[],\n config: UniversalTokensConfig,\n options?: GenerateCSSOptions,\n): Promise<CSSResult> => {\n // Do we need base?\n const sourceCSS = '@tailwind base; @tailwind components; @tailwind utilities';\n\n const contentDir = options?.contentDir ?? path.join(process.cwd(), 'src');\n const cssFlags = getCssFeatureFlags(options?.cssOptions);\n const optimizationConfig = options?.cssOptions?.optimization;\n const scopeClass = normalizeScope(options?.scope) ?? normalizeScope(options?.cssOptions?.scope);\n const twPlugin = createTailwindPlugin({\n contentDir,\n rawContents: getArbitrarySafelistRawContent(safelist),\n safelist,\n config,\n enablePreflight: cssFlags.enablePreflight,\n enableFontFaceDeclarations: cssFlags.enableFontFaceDeclarations,\n });\n const plugins = buildPostcssPlugins({\n tailwindPlugin: twPlugin,\n shouldPruneVars: cssFlags.shouldPruneVars,\n safeVarPrefixes: options?.safeVarPrefixes ?? [],\n scopeClass,\n });\n\n const result = await postcss(plugins).process(sourceCSS, { from: undefined });\n let css = await applyScopedColorModeFix(result.css, scopeClass);\n const optimizedCss = await optimizeGeneratedCss({\n css,\n shouldOptimize: cssFlags.shouldOptimize,\n optimizationConfig,\n referenceCss: options?.referenceCss,\n scopeClass,\n });\n css = optimizedCss.css;\n\n const sizeBytes = Buffer.byteLength(css, 'utf8');\n const sizeGzipBytes = gzipSync(css).length;\n\n return {\n css,\n sizeBytes,\n sizeGzipBytes,\n classCount: safelist.length,\n optimizationStats: optimizedCss.optimizationStats,\n };\n};\n\n/**\n * Generate CSS in simple mode (no uds.theme.ts)\n */\nconst generateSimpleModeCSS = async (options: {\n workspaceDir: string;\n entry: EntryValue;\n outFile: string;\n variants: Record<string, Record<string, string>>;\n autoVariants: Record<string, Record<string, string>>;\n componentData: Record<string, SerializedComponentInfo>;\n scope?: string;\n configPath?: string;\n isWatch?: boolean;\n silent?: boolean;\n}): Promise<{ success: boolean; outputPath: string; packageDirs?: string[] }> => {\n const isWatch = options.isWatch === true;\n const isSilent = options.silent === true;\n const shouldLogStats = !isSilent && !isWatch;\n const startTime = performance.now();\n const colorModes: ('dark' | 'light')[] = ['dark']; // Light mode is already in :root\n\n // Load config if provided, otherwise use default\n let tokensConfig: UniversalTokensConfig = defaultTokensConfig;\n if (options.configPath) {\n const loadedConfig = await loadConfigFile<UniversalTokensConfig>(options.configPath);\n if (loadedConfig) {\n tokensConfig = loadedConfig;\n } else if (shouldLogStats) {\n spinStop('⚠️', `Config file not found: ${options.configPath}, using defaults`);\n }\n }\n\n // Extract variant defaults from config for auto-variant class generation\n const variantDefaults = extractVariantDefaults(tokensConfig);\n\n const resolvedEntries = resolveEntryPaths(options.entry, options.workspaceDir);\n const entryDirs = resolvedEntries.map((entry) => entry.absolutePath);\n const scanResult = await scanDirectoriesForSafelist(\n entryDirs,\n colorModes,\n options.variants,\n options.autoVariants,\n options.componentData,\n variantDefaults,\n );\n\n const totalFilesScanned = scanResult.filesScanned;\n const allClasses: string[] = [...scanResult.safelist];\n const allComponents = new Set<string>(scanResult.components);\n const packageDirs: string[] = [\n ...new Set(\n resolvedEntries.map((entry) =>\n entry.kind === 'directory' ? entry.absolutePath : entry.watchDirectory,\n ),\n ),\n ];\n\n // Add color mode classes\n const fullSafelist = [...allClasses, ...getThemeAndScaleClasses(colorModes)];\n const finalSafelist = deduplicateSafelist(fullSafelist);\n\n // Generate CSS (Tailwind will scan entry dir for arbitrary classes on className props)\n const cssResult = await generateCSS(finalSafelist, tokensConfig, {\n scope: options.scope,\n contentDir: entryDirs,\n safeVarPrefixes: [\n ...getMotionVarPrefixes(options.componentData, [...allComponents]),\n ...getConfigurableCssVariables(),\n ],\n });\n\n // Write output\n const outputPath = path.isAbsolute(options.outFile)\n ? options.outFile\n : path.join(options.workspaceDir, options.outFile);\n const outputDir = path.dirname(outputPath);\n\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n fs.writeFileSync(outputPath, cssResult.css);\n\n const duration = Math.round(performance.now() - startTime);\n\n if (shouldLogStats) {\n printSimpleModeStats({\n outputPath,\n totalFilesScanned,\n classCount: cssResult.classCount,\n sizeBytes: cssResult.sizeBytes,\n sizeGzipBytes: cssResult.sizeGzipBytes,\n duration,\n scope: options.scope,\n optimizationStats: cssResult.optimizationStats,\n print,\n magenta,\n cyan,\n yellow,\n });\n }\n\n return { success: true, outputPath, packageDirs };\n};\n\nexport { generateCSS, generateSimpleModeCSS };\nexport type { UDSCSSOptions };\n"],"mappings":";;;;;;;;;;;;;;AA6EA,MAAM,kBAAkB,UAAuC;CAC7D,MAAM,eAAe,OAAO,MAAM;AAClC,QAAO,eAAe,eAAe;;AAGvC,MAAM,kCAAkC,aAAyC;CAC/E,MAAM,mBAAmB,SAAS,QAC/B,UAA2B,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,CAC7E;AAED,KAAI,iBAAiB,WAAW,EAC9B,QAAO,EAAE;AAGX,QAAO,CAAC,eAAe,iBAAiB,KAAK,IAAI,CAAC,UAAU;;;;;;;;AAS9D,MAAM,cAAc,OAClB,UACA,QACA,YACuB;CAEvB,MAAM,YAAY;CAElB,MAAM,aAAa,SAAS,cAAc,KAAK,KAAK,QAAQ,KAAK,EAAE,MAAM;CACzE,MAAM,WAAW,mBAAmB,SAAS,WAAW;CACxD,MAAM,qB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,eACR,gBACD;CAED,MAAM,oBAAoB,WAAW;CACrC,MAAM,aAAuB,CAAC,GAAG,WAAW,SAAS;CACrD,MAAM,gBAAgB,IAAI,IAAY,WAAW,WAAW;CAC5D,MAAM,cAAwB,CAC5B,GAAG,IAAI,IACL,gBAAgB,KAAK,UACnB,MAAM,SAAS,cAAc,MAAM,eAAe,MAAM,eACzD,CACF,CACF;CAOD,MAAM,YAAY,MAAM,YAHF,oBADD,CAAC,GAAG,YAAY,GAAG,wBAAwB,WAAW,CAAC,CACrB,EAGJ,cAAc;EAC/D,OAAO,QAAQ;EACf,YAAY;EACZ,iBAAiB,CACf,GAAG,qBAAqB,QAAQ,eAAe,CAAC,GAAG,cAAc,CAAC,EAClE,GAAG,6BAA6B,CACjC;EACF,CAAC;CAGF,MAAM,aAAa,KAAK,WAAW,QAAQ,QAAQ,GAC/C,QAAQ,UACR,KAAK,KAAK,QAAQ,cAAc,QAAQ,QAAQ;CACpD,MAAM,YAAY,KAAK,QAAQ,WAAW;AAE1C,KAAI,CAAC,GAAG,WAAW,UAAU,CAC3B,IAAG,UAAU,WAAW,EAAE,WAAW,MAAM,CAAC;AAG9C,IAAG,cAAc,YAAY,UAAU,IAAI;CAE3C,MAAM,WAAW,KAAK,MAAM,YAAY,KAAK,GAAG,UAAU;AAE1D,KAAI,eACF,sBAAqB;EACnB;EACA;EACA,YAAY,UAAU;EACtB,WAAW,UAAU;EACrB,eAAe,UAAU;EACzB;EACA,OAAO,QAAQ;EACf,mBAAmB,UAAU;EAC7B;EACA;EACA;EACA;EACD,CAAC;AAGJ,QAAO;EAAE,SAAS;EAAM;EAAY;EAAa"}
@@ -1,19 +1,17 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
3
- const require_colors = require('../../../cli/dist/lib/colors.cjs');
4
- const require_print = require('../../../cli/dist/lib/print.cjs');
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
5
3
  const require_purgeFromCode = require('../purger/optimized/purgeFromCode.cjs');
6
4
  const require_entryPoints = require('../utils/entryPoints.cjs');
7
- let node_path = require("node:path");
8
- node_path = require_runtime.__toESM(node_path);
5
+ let _yahoo_uds_cli_lib = require("@yahoo/uds-cli/lib");
9
6
  let node_fs = require("node:fs");
10
7
  node_fs = require_runtime.__toESM(node_fs);
11
8
  let node_module = require("node:module");
9
+ let node_path = require("node:path");
10
+ node_path = require_runtime.__toESM(node_path);
12
11
  let fast_glob = require("fast-glob");
13
12
  fast_glob = require_runtime.__toESM(fast_glob);
14
13
 
15
- //#region ../tailwind/dist/css/nodeUtils.js
16
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
14
+ //#region src/css/nodeUtils.ts
17
15
  const loadConfigFile = async (configPath) => {
18
16
  const absolutePath = node_path.default.isAbsolute(configPath) ? configPath : node_path.default.join(process.cwd(), configPath);
19
17
  if (!node_fs.default.existsSync(absolutePath)) return null;
@@ -129,7 +127,7 @@ const scaffoldThemeConfig = async (options) => {
129
127
  const outputPath = options.outputPath ?? "uds.theme.ts";
130
128
  const absoluteOutputPath = node_path.default.isAbsolute(outputPath) ? outputPath : node_path.default.join(workspaceDir, outputPath);
131
129
  if (node_fs.default.existsSync(absoluteOutputPath) && !options.force) {
132
- require_print.print(require_colors.red(`Error: ${outputPath} already exists. Use --force to overwrite.`));
130
+ (0, _yahoo_uds_cli_lib.print)((0, _yahoo_uds_cli_lib.red)(`Error: ${outputPath} already exists. Use --force to overwrite.`));
133
131
  process.exitCode = 1;
134
132
  return;
135
133
  }
@@ -168,13 +166,13 @@ export default defineTheme({
168
166
  });
169
167
  `;
170
168
  node_fs.default.writeFileSync(absoluteOutputPath, template);
171
- require_print.print("");
172
- require_print.print(require_colors.green("✅ Created uds.theme.ts"));
173
- require_print.print("");
174
- require_print.print(`${require_colors.magenta("Next steps:")}`);
175
- require_print.print(` 1. Review and customize ${require_colors.cyan(outputPath)}`);
176
- require_print.print(` 2. Run ${require_colors.cyan("uds css")} to generate CSS`);
177
- require_print.print("");
169
+ (0, _yahoo_uds_cli_lib.print)("");
170
+ (0, _yahoo_uds_cli_lib.print)((0, _yahoo_uds_cli_lib.green)("✅ Created uds.theme.ts"));
171
+ (0, _yahoo_uds_cli_lib.print)("");
172
+ (0, _yahoo_uds_cli_lib.print)(`${(0, _yahoo_uds_cli_lib.magenta)("Next steps:")}`);
173
+ (0, _yahoo_uds_cli_lib.print)(` 1. Review and customize ${(0, _yahoo_uds_cli_lib.cyan)(outputPath)}`);
174
+ (0, _yahoo_uds_cli_lib.print)(` 2. Run ${(0, _yahoo_uds_cli_lib.cyan)("uds css")} to generate CSS`);
175
+ (0, _yahoo_uds_cli_lib.print)("");
178
176
  };
179
177
 
180
178
  //#endregion
@@ -1,15 +1,13 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { cyan, green, magenta, red } from "../../../cli/dist/lib/colors.js";
3
- import { print } from "../../../cli/dist/lib/print.js";
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
4
2
  import { purgeFromCodeOptimized } from "../purger/optimized/purgeFromCode.js";
5
3
  import { formatEntryValue } from "../utils/entryPoints.js";
6
- import path from "node:path";
4
+ import { cyan, green, magenta, print, red } from "@yahoo/uds-cli/lib";
7
5
  import fs from "node:fs";
8
6
  import { createRequire } from "node:module";
7
+ import path from "node:path";
9
8
  import fg from "fast-glob";
10
9
 
11
- //#region ../tailwind/dist/css/nodeUtils.js
12
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
10
+ //#region src/css/nodeUtils.ts
13
11
  const loadConfigFile = async (configPath) => {
14
12
  const absolutePath = path.isAbsolute(configPath) ? configPath : path.join(process.cwd(), configPath);
15
13
  if (!fs.existsSync(absolutePath)) return null;
@@ -174,4 +172,5 @@ export default defineTheme({
174
172
  };
175
173
 
176
174
  //#endregion
177
- export { findPackageSourceDir, loadConfigFile, scaffoldThemeConfig, scanDirectoriesForSafelist, scanDirectoryForSafelist };
175
+ export { findPackageSourceDir, loadConfigFile, scaffoldThemeConfig, scanDirectoriesForSafelist, scanDirectoryForSafelist };
176
+ //# sourceMappingURL=nodeUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeUtils.js","names":[],"sources":["../../src/css/nodeUtils.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\n\nimport { cyan, green, magenta, print, red } from '@yahoo/uds-cli/lib';\nimport fg from 'fast-glob';\n\nimport type { SerializedComponentInfo } from '../commands/generateComponentData';\nimport type { VariantDefaults } from '../purger/optimized/purgeFromCode';\nimport { purgeFromCodeOptimized } from '../purger/optimized/purgeFromCode';\nimport type { EntryValue } from '../utils/entryPoints';\nimport { formatEntryValue } from '../utils/entryPoints';\n\nconst loadConfigFile = async <T>(configPath: string): Promise<T | null> => {\n const absolutePath = path.isAbsolute(configPath)\n ? configPath\n : path.join(process.cwd(), configPath);\n\n if (!fs.existsSync(absolutePath)) {\n return null;\n }\n\n try {\n const module = await import(absolutePath);\n return module.default ?? module.config ?? module;\n } catch (error) {\n throw new Error(\n `Failed to load config file: ${absolutePath}\\n${error instanceof Error ? error.message : 'Unknown error'}`,\n );\n }\n};\n\nconst scanDirectoryForSafelist = async (\n dir: string,\n colorModes: ('dark' | 'light')[],\n variants: Record<string, Record<string, string>>,\n autoVariants: Record<string, Record<string, string>>,\n componentData: Record<string, SerializedComponentInfo>,\n variantDefaults?: VariantDefaults,\n includeAllClassNamePrimitives = false,\n): Promise<{ safelist: string[]; components: string[]; filesScanned: number }> => {\n const files = await fg('**/*.{js,jsx,ts,tsx}', {\n cwd: dir,\n absolute: true,\n ignore: ['**/node_modules/**'],\n });\n\n const results = await Promise.all(\n files.map(async (filePath) => {\n const code = fs.readFileSync(filePath, 'utf-8');\n return purgeFromCodeOptimized(code, {\n colorModes,\n variantDefaults,\n variants,\n autoVariants,\n componentData,\n includeAllClassNamePrimitives,\n filePath,\n });\n }),\n );\n\n const allClasses = results.flatMap((result) => result.safelist);\n const allComponents = new Set(results.flatMap((result) => result.components));\n\n return {\n safelist: allClasses,\n components: [...allComponents],\n filesScanned: files.length,\n };\n};\n\nconst scanFileForSafelist = async (\n filePath: string,\n colorModes: ('dark' | 'light')[],\n variants: Record<string, Record<string, string>>,\n autoVariants: Record<string, Record<string, string>>,\n componentData: Record<string, SerializedComponentInfo>,\n variantDefaults?: VariantDefaults,\n includeAllClassNamePrimitives = false,\n): Promise<{ safelist: string[]; components: string[]; filesScanned: number }> => {\n const code = fs.readFileSync(filePath, 'utf-8');\n const result = await purgeFromCodeOptimized(code, {\n colorModes,\n variantDefaults,\n variants,\n autoVariants,\n componentData,\n includeAllClassNamePrimitives,\n });\n\n return {\n safelist: result.safelist,\n components: result.components,\n filesScanned: 1,\n };\n};\n\nconst scanDirectoriesForSafelist = async (\n dirs: string[],\n colorModes: ('dark' | 'light')[],\n variants: Record<string, Record<string, string>>,\n autoVariants: Record<string, Record<string, string>>,\n componentData: Record<string, SerializedComponentInfo>,\n variantDefaults?: VariantDefaults,\n includeAllClassNamePrimitives = false,\n): Promise<{ safelist: string[]; components: string[]; filesScanned: number }> => {\n const results = await Promise.all(\n dirs.map((dir) => {\n if (fs.existsSync(dir) && fs.statSync(dir).isFile()) {\n return scanFileForSafelist(\n dir,\n colorModes,\n variants,\n autoVariants,\n componentData,\n variantDefaults,\n includeAllClassNamePrimitives,\n );\n }\n\n return scanDirectoryForSafelist(\n dir,\n colorModes,\n variants,\n autoVariants,\n componentData,\n variantDefaults,\n includeAllClassNamePrimitives,\n );\n }),\n );\n\n return {\n safelist: results.flatMap((result) => result.safelist),\n components: [...new Set(results.flatMap((result) => result.components))],\n filesScanned: results.reduce((total, result) => total + result.filesScanned, 0),\n };\n};\n\nconst findMonorepoRoot = (startDir: string): string | null => {\n const findUp = (currentDir: string): string | null => {\n if (fs.existsSync(path.join(currentDir, 'packages'))) {\n return currentDir;\n }\n\n const parentDir = path.dirname(currentDir);\n return parentDir === currentDir ? null : findUp(parentDir);\n };\n\n return findUp(startDir);\n};\n\nconst resolvePackageRoot = (workspaceDir: string, packageName: string): string | null => {\n const require = createRequire(import.meta.url);\n\n try {\n const resolvedPackageJson = require.resolve(path.join(packageName, 'package.json'), {\n paths: [workspaceDir],\n });\n return path.dirname(resolvedPackageJson);\n } catch {\n return null;\n }\n};\n\nconst findPackageRootInMonorepo = (monorepoRoot: string, packageName: string): string | null => {\n const packageJsonPaths = fg.sync('packages/**/package.json', {\n cwd: monorepoRoot,\n absolute: true,\n ignore: ['**/node_modules/**', '**/dist/**'],\n });\n\n const matchingPath = packageJsonPaths.find((pkgJsonPath) => {\n try {\n const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8')) as { name?: string };\n return pkgJson.name === packageName;\n } catch {\n return false;\n }\n });\n\n return matchingPath ? path.dirname(matchingPath) : null;\n};\n\nconst buildPackageSourceCandidates = (\n workspaceDir: string,\n packageName: string,\n packageRoot: string | null,\n): string[] => {\n return [\n packageRoot ? path.join(packageRoot, 'src') : null,\n packageRoot ? path.join(packageRoot, 'lib') : null,\n packageRoot ? path.join(packageRoot, 'dist') : null,\n packageRoot,\n path.join(workspaceDir, 'node_modules', packageName, 'src'),\n path.join(workspaceDir, 'node_modules', packageName, 'lib'),\n path.join(workspaceDir, 'node_modules', packageName, 'dist'),\n path.join(workspaceDir, 'node_modules', packageName),\n ].filter(Boolean) as string[];\n};\n\nconst getFirstExistingPath = (candidates: string[]): string | null =>\n candidates.find((candidate) => fs.existsSync(candidate)) ?? null;\n\nconst findPackageSourceDir = (packageName: string): string | null => {\n const workspaceDir = process.cwd();\n const monorepoRoot = findMonorepoRoot(workspaceDir);\n\n let packageRoot = resolvePackageRoot(workspaceDir, packageName);\n if (!packageRoot && monorepoRoot) {\n packageRoot = findPackageRootInMonorepo(monorepoRoot, packageName);\n }\n\n return getFirstExistingPath(buildPackageSourceCandidates(workspaceDir, packageName, packageRoot));\n};\n\nconst scaffoldThemeConfig = async (options: {\n outputPath?: string;\n configPath?: string;\n entry?: EntryValue;\n force?: boolean;\n}): Promise<void> => {\n const workspaceDir = process.cwd();\n const outputPath = options.outputPath ?? 'uds.theme.ts';\n const absoluteOutputPath = path.isAbsolute(outputPath)\n ? outputPath\n : path.join(workspaceDir, outputPath);\n\n if (fs.existsSync(absoluteOutputPath) && !options.force) {\n print(red(`Error: ${outputPath} already exists. Use --force to overwrite.`));\n process.exitCode = 1;\n return;\n }\n\n const configPath = options.configPath ?? './uds.config.ts';\n const entry = options.entry ?? './src';\n const serializedEntry = formatEntryValue(entry);\n\n const template = `import { defineTheme } from '@yahoo/uds';\n\n/**\n * UDS Theme Configuration\n * \n * This file configures CSS generation for your app and shared packages.\n * Run \\`uds css\\` to generate optimized CSS.\n */\nexport default defineTheme({\n // Path to your uds.config.ts file\n config: '${configPath}',\n\n // Entry directory or .tsx file path for scanning your app code\n entry: ${serializedEntry},\n\n // Color modes to include (light mode is always in :root)\n colorModes: ['dark'],\n\n // Packages that inherit your app's theme (merged into main uds.css)\n // inherit: ['@your-org/shared-ui'],\n\n // CSS generation options (all optional)\n // css: {\n // safelist: [],\n // preflight: true,\n // fontFaceDeclarations: true,\n // optimization: {\n // removeUnusedFonts: false,\n // removeEmptyRules: true,\n // deduplicateScopedCss: true\n // }\n // }\n});\n`;\n\n fs.writeFileSync(absoluteOutputPath, template);\n\n print('');\n print(green('✅ Created uds.theme.ts'));\n print('');\n print(`${magenta('Next steps:')}`);\n print(` 1. Review and customize ${cyan(outputPath)}`);\n print(` 2. Run ${cyan('uds css')} to generate CSS`);\n print('');\n};\n\nexport {\n findPackageSourceDir,\n loadConfigFile,\n scaffoldThemeConfig,\n scanDirectoriesForSafelist,\n scanDirectoryForSafelist,\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAM,iBAAiB,OAAU,eAA0C;CACzE,MAAM,eAAe,KAA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GAAG"}
@@ -1,8 +1,7 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
2
  const require_postcss_helpers = require('./postcss.helpers.cjs');
3
3
 
4
- //#region ../tailwind/dist/css/postcss.js
5
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
4
+ //#region src/css/postcss.ts
6
5
  /**
7
6
  * PostCSS plugin to fix color mode selectors for scoped CSS.
8
7
  *
@@ -1,7 +1,6 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
-
3
- //#region ../tailwind/dist/css/postcss.helpers.js
4
1
  /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+
3
+ //#region src/css/postcss.helpers.ts
5
4
  const COLOR_MODE_RE = /^(\.(uds-color-mode-(?:dark|light)))(\s+.+)?$/;
6
5
  const escapeForRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7
6
  const getScopedColorModeAlternativeSelector = (selector, scopeClass, variant = "descendant") => {
@@ -1,6 +1,5 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- //#region ../tailwind/dist/css/postcss.helpers.js
3
1
  /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ //#region src/css/postcss.helpers.ts
4
3
  const COLOR_MODE_RE = /^(\.(uds-color-mode-(?:dark|light)))(\s+.+)?$/;
5
4
  const escapeForRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
6
5
  const getScopedColorModeAlternativeSelector = (selector, scopeClass, variant = "descendant") => {
@@ -25,4 +24,5 @@ const buildScopedColorModeSelectorList = (ruleSelector, scopeClass) => {
25
24
  };
26
25
 
27
26
  //#endregion
28
- export { buildScopedColorModeSelectorList };
27
+ export { buildScopedColorModeSelectorList };
28
+ //# sourceMappingURL=postcss.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postcss.helpers.js","names":[],"sources":["../../src/css/postcss.helpers.ts"],"sourcesContent":["const COLOR_MODE_RE = /^(\\.(uds-color-mode-(?:dark|light)))(\\s+.+)?$/;\n\nconst escapeForRegExp = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\ntype ScopedColorModeSelectorVariant = 'descendant' | 'same-element';\n\nconst getScopedColorModeAlternativeSelector = (\n selector: string,\n scopeClass: string,\n variant: ScopedColorModeSelectorVariant = 'descendant',\n): string | null => {\n const scopeMatch = selector.match(new RegExp(`^(${escapeForRegExp(scopeClass)})\\\\s+(.+)$`));\n\n if (!scopeMatch) {\n return null;\n }\n\n const afterScope = scopeMatch[2];\n const colorModeMatch = afterScope.match(COLOR_MODE_RE);\n if (!colorModeMatch) {\n return null;\n }\n\n const colorModeClass = colorModeMatch[1];\n const rest = colorModeMatch[3] ?? '';\n return variant === 'same-element'\n ? `${colorModeClass}${scopeClass}${rest}`\n : `${colorModeClass} ${scopeClass}${rest}`;\n};\n\nconst buildScopedColorModeSelectorList = (ruleSelector: string, scopeClass: string): string => {\n const selectors = ruleSelector.split(',').map((value) => value.trim());\n const nextSelectors = selectors.reduce<string[]>((acc, selector) => {\n const altSelectors = [\n getScopedColorModeAlternativeSelector(selector, scopeClass),\n getScopedColorModeAlternativeSelector(selector, scopeClass, 'same-element'),\n ].filter((value): value is string => Boolean(value));\n const nextAltSelectors = altSelectors.filter(\n (altSelector) => !selectors.includes(altSelector) && !acc.includes(altSelector),\n );\n\n return [...acc, selector, ...nextAltSelectors];\n }, []);\n\n return nextSelectors.join(', ');\n};\n\nexport { buildScopedColorModeSelectorList, getScopedColorModeAlternativeSelector };\n"],"mappings":";;AAAA,MAAM,gBAAgB;AAEtB,MAAM,mBAAmB,UAA0B,MAAM,QAAQ,uBAAuB,OAAO;AAI/F,MAAM,yCACJ,UACA,YACA,UAA0C,iBACxB;CAClB,MAAM,aAAa,SAAS,MAAM,IAAI,OAAO,KAAK,gBAAgB,WAAW,CAAC,YAAY,CAAC;AAE3F,KAAI,CAAC,WACH,QAAO;CAIT,MAAM,iBADa,WAAW,GACI,MAAM,cAAc;AACtD,KAAI,CAAC,eACH,QAAO;CAGT,MAAM,iBAAiB,eAAe;CACtC,MAAM,OAAO,eAAe,MAAM;AAClC,QAAO,YAAY,iBACf,GAAG,iBAAiB,aAAa,SACjC,GAAG,eAAe,GAAG,aAAa;;AAGxC,MAAM,oCAAoC,cAAsB,eAA+B;CAC7F,MAAM,YAAY,aAAa,MAAM,IAAI,CAAC,KAAK,UAAU,MAAM,MAAM,CAAC;AAatE,QAZsB,UAAU,QAAkB,KAAK,aAAa;EAKlE,MAAM,mBAJe,CACnB,sCAAsC,UAAU,WAAW,EAC3D,sCAAsC,UAAU,YAAY,eAAe,CAC5E,CAAC,QAAQ,UAA2B,QAAQ,MAAM,CAAC,CACd,QACnC,gBAAgB,CAAC,UAAU,SAAS,YAAY,IAAI,CAAC,IAAI,SAAS,YAAY,CAChF;AAED,SAAO;GAAC,GAAG;GAAK;GAAU,GAAG;GAAiB;IAC7C,EAAE,CAAC,CAEe,KAAK,KAAK"}
@@ -1,8 +1,7 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
2
  import { buildScopedColorModeSelectorList } from "./postcss.helpers.js";
3
3
 
4
- //#region ../tailwind/dist/css/postcss.js
5
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
4
+ //#region src/css/postcss.ts
6
5
  /**
7
6
  * PostCSS plugin to fix color mode selectors for scoped CSS.
8
7
  *
@@ -32,4 +31,5 @@ const fixScopedColorModeSelectorsPlugin = (scopeClass) => {
32
31
  };
33
32
 
34
33
  //#endregion
35
- export { fixScopedColorModeSelectorsPlugin };
34
+ export { fixScopedColorModeSelectorsPlugin };
35
+ //# sourceMappingURL=postcss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postcss.js","names":[],"sources":["../../src/css/postcss.ts"],"sourcesContent":["import type postcss from 'postcss';\n\nimport { buildScopedColorModeSelectorList } from './postcss.helpers';\n\n/**\n * PostCSS plugin to fix color mode selectors for scoped CSS.\n *\n * postcss-scope converts selectors like:\n * `.uds-color-mode-dark .foo` → `.scope .uds-color-mode-dark .foo`\n *\n * But the color mode class is typically on <html> or <body>, which is an\n * ANCESTOR of the scope, not a descendant. This plugin adds alternative\n * selectors so color modes work correctly:\n *\n * `.scope .uds-color-mode-dark .foo` → `.scope .uds-color-mode-dark .foo, .uds-color-mode-dark .scope .foo, .uds-color-mode-dark.scope .foo`\n *\n * This ensures styles apply whether the color mode class is inside or outside the scope.\n */\nconst fixScopedColorModeSelectorsPlugin = (scopeClass: string): postcss.Plugin => {\n const colorModePattern = /\\.(uds-color-mode-(?:dark|light))/;\n\n return {\n postcssPlugin: 'fix-scoped-color-mode-selectors',\n // Use Once to process all rules after parsing is complete\n Once(root) {\n root.walkRules((rule) => {\n // Skip if selector doesn't contain both scope and color mode\n if (!rule.selector.includes(scopeClass) || !colorModePattern.test(rule.selector)) {\n return;\n }\n\n const nextSelector = buildScopedColorModeSelectorList(rule.selector, scopeClass);\n if (nextSelector !== rule.selector) {\n rule.selector = nextSelector;\n }\n });\n },\n };\n};\nexport { fixScopedColorModeSelectorsPlugin };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,qCAAqC,eAAuC;CAChF,MAAM,mBAAmB;AAEzB,QAAO;EACL,eAAe;EAEf,KAAK,MAAM;AACT,QAAK,WAAW,SAAS;AAEvB,QAAI,CAAC,KAAK,SAAS,SAAS,WAAW,IAAI,CAAC,iBAAiB,KAAK,KAAK,SAAS,CAC9E;IAGF,MAAM,eAAe,iCAAiC,KAAK,UAAU,WAAW;AAChF,QAAI,iBAAiB,KAAK,SACxB,MAAK,WAAW;KAElB;;EAEL"}
@@ -1,23 +1,19 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
3
- const require_index = require('../../../config/dist/index.cjs');
4
- const require_colors = require('../../../cli/dist/lib/colors.cjs');
5
- const require_print = require('../../../cli/dist/lib/print.cjs');
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
6
3
  const require_entryPoints = require('../utils/entryPoints.cjs');
7
- const require_spinner = require('../../../cli/dist/lib/spinner.cjs');
8
- const require_logger = require('../../../cli/dist/lib/logger.cjs');
9
4
  const require_nodeUtils = require('./nodeUtils.cjs');
10
5
  const require_safelist = require('../purger/optimized/utils/safelist.cjs');
11
6
  const require_utils = require('./utils.cjs');
12
7
  const require_generate = require('./generate.cjs');
13
8
  const require_runner_helpers = require('./runner.helpers.cjs');
14
- let node_path = require("node:path");
15
- node_path = require_runtime.__toESM(node_path);
9
+ let _yahoo_uds_cli_lib = require("@yahoo/uds-cli/lib");
16
10
  let node_fs = require("node:fs");
17
11
  node_fs = require_runtime.__toESM(node_fs);
12
+ let node_path = require("node:path");
13
+ node_path = require_runtime.__toESM(node_path);
14
+ let _yahoo_uds_config = require("@yahoo/uds-config");
18
15
 
19
- //#region ../tailwind/dist/css/runner.js
20
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
16
+ //#region src/css/runner.ts
21
17
  const SOURCE_FILE_PATTERN = /\.(jsx?|tsx?)$/i;
22
18
  const getWatchDirs = (dirs) => [...new Set(dirs.filter((dir) => !dir.split(node_path.default.sep).includes("node_modules")))];
23
19
  const isCoveredByRecursiveWatch = (watchPath, targetPath) => targetPath === watchPath || targetPath.startsWith(`${watchPath}${node_path.default.sep}`);
@@ -56,6 +52,11 @@ const createDebouncedAction = (action, delayMs) => {
56
52
  debounceTimer = setTimeout(action, delayMs);
57
53
  };
58
54
  };
55
+ const getPruneVarSafelist = (themeConfig) => {
56
+ const pruneVars = themeConfig.css?.optimization?.pruneVars;
57
+ if (!pruneVars || typeof pruneVars !== "object") return [];
58
+ return pruneVars.safelist ?? [];
59
+ };
59
60
  const createQueuedRegenerator = (options) => {
60
61
  let isGenerating = false;
61
62
  let pendingRegenerate = false;
@@ -92,7 +93,7 @@ const runCssCommand = async (options, context) => {
92
93
  const runSimpleMode = async (options, context) => {
93
94
  const entry = options.entryOption ?? require_entryPoints.DEFAULT_ENTRY;
94
95
  const configPath = typeof options.configOption === "string" ? options.configOption : void 0;
95
- if (!options.watch && !options.silent) require_spinner.spinStart("Generating CSS...");
96
+ if (!options.watch && !options.silent) (0, _yahoo_uds_cli_lib.spinStart)("Generating CSS...");
96
97
  try {
97
98
  const result = await require_generate.generateSimpleModeCSS({
98
99
  workspaceDir: options.workspaceDir,
@@ -108,7 +109,7 @@ const runSimpleMode = async (options, context) => {
108
109
  });
109
110
  if (options.watch) await runSimpleModeWatch(options, context, entry, configPath, result.packageDirs ?? []);
110
111
  } catch (error) {
111
- require_spinner.spinStop("❌", error instanceof Error ? error.message : "CSS generation failed");
112
+ (0, _yahoo_uds_cli_lib.spinStop)("❌", error instanceof Error ? error.message : "CSS generation failed");
112
113
  process.exitCode = 1;
113
114
  }
114
115
  };
@@ -120,15 +121,15 @@ const runSimpleModeWatch = async (options, context, entry, configPath, packageDi
120
121
  }));
121
122
  const watchTargets = packageDirs.length > 0 ? fallbackTargets : entryWatchTargets;
122
123
  if (!options.silent) {
123
- require_print.print("");
124
- require_print.print(`${require_colors.magenta("Watching for changes...")}`);
125
- watchTargets.forEach((target) => require_print.print(` ${require_colors.gray("•")} ${target.watchPath}`));
126
- require_print.print(`${require_colors.gray("Press Ctrl+C to stop")}`);
127
- require_print.print("");
124
+ (0, _yahoo_uds_cli_lib.print)("");
125
+ (0, _yahoo_uds_cli_lib.print)(`${(0, _yahoo_uds_cli_lib.magenta)("Watching for changes...")}`);
126
+ watchTargets.forEach((target) => (0, _yahoo_uds_cli_lib.print)(` ${(0, _yahoo_uds_cli_lib.gray)("•")} ${target.watchPath}`));
127
+ (0, _yahoo_uds_cli_lib.print)(`${(0, _yahoo_uds_cli_lib.gray)("Press Ctrl+C to stop")}`);
128
+ (0, _yahoo_uds_cli_lib.print)("");
128
129
  }
129
130
  const regenerate = createQueuedRegenerator({
130
131
  onStart: () => {
131
- if (!options.silent) require_print.print(`${require_colors.gray(`[${(/* @__PURE__ */ new Date()).toLocaleTimeString()}]`)} Change detected, regenerating...`);
132
+ if (!options.silent) (0, _yahoo_uds_cli_lib.print)(`${(0, _yahoo_uds_cli_lib.gray)(`[${(/* @__PURE__ */ new Date()).toLocaleTimeString()}]`)} Change detected, regenerating...`);
132
133
  },
133
134
  regenerateOnce: async () => {
134
135
  await require_generate.generateSimpleModeCSS({
@@ -146,12 +147,12 @@ const runSimpleModeWatch = async (options, context, entry, configPath, packageDi
146
147
  },
147
148
  onSuccess: () => {
148
149
  if (!options.silent) {
149
- require_print.print(`${require_colors.gray(`[${(/* @__PURE__ */ new Date()).toLocaleTimeString()}]`)} ${require_colors.green("CSS updated")}`);
150
- require_print.print("");
150
+ (0, _yahoo_uds_cli_lib.print)(`${(0, _yahoo_uds_cli_lib.gray)(`[${(/* @__PURE__ */ new Date()).toLocaleTimeString()}]`)} ${(0, _yahoo_uds_cli_lib.green)("CSS updated")}`);
151
+ (0, _yahoo_uds_cli_lib.print)("");
151
152
  }
152
153
  },
153
154
  onError: (message) => {
154
- require_print.print(`Error: ${message}`);
155
+ (0, _yahoo_uds_cli_lib.print)(`Error: ${message}`);
155
156
  }
156
157
  });
157
158
  watchSourceFiles(watchTargets, createDebouncedAction(() => {
@@ -167,7 +168,7 @@ const loadThemeModeSetup = async (options) => {
167
168
  watch: options.watch
168
169
  };
169
170
  const themeConfig = typeof themeConfigInput === "function" ? await themeConfigInput(themeContext) : themeConfigInput;
170
- let appConfig = require_index.defaultTokensConfig;
171
+ let appConfig = _yahoo_uds_config.defaultTokensConfig;
171
172
  if (themeConfig.config) {
172
173
  const loadedConfig = await require_nodeUtils.loadConfigFile(themeConfig.config);
173
174
  if (loadedConfig) appConfig = loadedConfig;
@@ -185,7 +186,7 @@ const runThemeMode = async (options, context) => {
185
186
  const workspaceDir = options.workspaceDir;
186
187
  const outputPath = node_path.default.isAbsolute(options.outFile) ? options.outFile : node_path.default.join(workspaceDir, String(options.outFile));
187
188
  let effectiveSilent = options.silent;
188
- let log = require_logger.createLogger({ silent: effectiveSilent });
189
+ let log = (0, _yahoo_uds_cli_lib.createLogger)({ silent: effectiveSilent });
189
190
  log.spinStart("Loading theme configuration...");
190
191
  try {
191
192
  const setup = await loadThemeModeSetup(options);
@@ -196,14 +197,14 @@ const runThemeMode = async (options, context) => {
196
197
  }
197
198
  const { themeConfig, colorModes, entries, appConfig, appVariantDefaults } = setup;
198
199
  effectiveSilent = setup.effectiveSilent;
199
- log = require_logger.createLogger({ silent: effectiveSilent });
200
+ log = (0, _yahoo_uds_cli_lib.createLogger)({ silent: effectiveSilent });
200
201
  const entryDirs = entries.map((entry) => entry.absolutePath);
201
202
  if (!effectiveSilent) log.spinStop("✅", "Theme configuration loaded");
202
- if (themeConfig.config && appConfig === require_index.defaultTokensConfig) log.warn(`App config not found: ${themeConfig.config}, using defaults`);
203
+ if (themeConfig.config && appConfig === _yahoo_uds_config.defaultTokensConfig) log.warn(`App config not found: ${themeConfig.config}, using defaults`);
203
204
  const packageDirs = [];
204
205
  const generateThemeModeCSS = async (opts) => {
205
206
  const genStartTime = performance.now();
206
- const genLog = opts?.isWatch ? require_logger.createLogger({ silent: true }) : log;
207
+ const genLog = opts?.isWatch ? (0, _yahoo_uds_cli_lib.createLogger)({ silent: true }) : log;
207
208
  genLog.spinStart("Scanning app code...");
208
209
  const appScanResult = await require_nodeUtils.scanDirectoriesForSafelist(entryDirs, colorModes, context.variants, context.autoVariants, context.componentData, appVariantDefaults);
209
210
  genLog.spinStop("✅", `Scanned ${appScanResult.filesScanned} files`);
@@ -233,7 +234,11 @@ const runThemeMode = async (options, context) => {
233
234
  scope: options.scope,
234
235
  contentDir: entryDirs,
235
236
  cssOptions: themeConfig.css,
236
- safeVarPrefixes: [...require_utils.getMotionVarPrefixes(context.componentData, allMotionComponents), ...require_utils.getConfigurableCssVariables()]
237
+ safeVarPrefixes: [
238
+ ...require_utils.getMotionVarPrefixes(context.componentData, allMotionComponents),
239
+ ...require_utils.getConfigurableCssVariables(),
240
+ ...getPruneVarSafelist(themeConfig)
241
+ ]
237
242
  });
238
243
  const outputDir = node_path.default.dirname(outputPath);
239
244
  if (!node_fs.default.existsSync(outputDir)) node_fs.default.mkdirSync(outputDir, { recursive: true });
@@ -245,11 +250,11 @@ const runThemeMode = async (options, context) => {
245
250
  }));
246
251
  const duration = Math.round(performance.now() - genStartTime);
247
252
  genLog.newline();
248
- genLog.print(require_colors.green("CSS generation complete!"));
253
+ genLog.print((0, _yahoo_uds_cli_lib.green)("CSS generation complete!"));
249
254
  genLog.newline();
250
255
  genLog.label("Output file:", outputPath);
251
256
  genLog.newline();
252
- genLog.print(`${require_colors.magenta("Total time:")} ${duration}ms`);
257
+ genLog.print(`${(0, _yahoo_uds_cli_lib.magenta)("Total time:")} ${duration}ms`);
253
258
  return {
254
259
  duration,
255
260
  outputPath,
@@ -262,28 +267,28 @@ const runThemeMode = async (options, context) => {
262
267
  const { filteredPackageDirs } = require_runner_helpers.getWatchDirectoryGroups(getWatchDirs(entryWatchTargets.map((target) => target.watchPath)), [...entryDirs, ...packageDirs]);
263
268
  if (!effectiveSilent) {
264
269
  log.newline();
265
- log.print(`${require_colors.magenta("Watching for changes...")}`);
270
+ log.print(`${(0, _yahoo_uds_cli_lib.magenta)("Watching for changes...")}`);
266
271
  entryDirs.forEach((entryDir) => {
267
272
  log.listItem(`App: ${entryDir}`);
268
273
  });
269
274
  filteredPackageDirs.forEach((dir) => {
270
275
  log.listItem(`Package: ${dir}`);
271
276
  });
272
- log.print(`${require_colors.gray("Press Ctrl+C to stop")}`);
277
+ log.print(`${(0, _yahoo_uds_cli_lib.gray)("Press Ctrl+C to stop")}`);
273
278
  log.newline();
274
279
  }
275
280
  const regenerate = createQueuedRegenerator({
276
281
  onStart: () => {
277
282
  if (!effectiveSilent) {
278
283
  const timestamp = (/* @__PURE__ */ new Date()).toLocaleTimeString();
279
- log.print(`${require_colors.gray(`[${timestamp}]`)} Change detected, regenerating...`);
284
+ log.print(`${(0, _yahoo_uds_cli_lib.gray)(`[${timestamp}]`)} Change detected, regenerating...`);
280
285
  }
281
286
  },
282
287
  regenerateOnce: async () => generateThemeModeCSS({ isWatch: true }),
283
288
  onSuccess: (result) => {
284
289
  if (!effectiveSilent) {
285
290
  const updatedAt = (/* @__PURE__ */ new Date()).toLocaleTimeString();
286
- log.print(`${require_colors.gray(`[${updatedAt}]`)} ${require_colors.green(`CSS updated (${result?.duration}ms)`)}`);
291
+ log.print(`${(0, _yahoo_uds_cli_lib.gray)(`[${updatedAt}]`)} ${(0, _yahoo_uds_cli_lib.green)(`CSS updated (${result?.duration}ms)`)}`);
287
292
  log.newline();
288
293
  }
289
294
  },
@@ -302,7 +307,7 @@ const runThemeMode = async (options, context) => {
302
307
  }
303
308
  } catch (error) {
304
309
  const message = error instanceof Error ? error.message : "CSS generation failed";
305
- if (effectiveSilent) require_spinner.spinStop("❌", message);
310
+ if (effectiveSilent) (0, _yahoo_uds_cli_lib.spinStop)("❌", message);
306
311
  else log.spinStop("❌", message);
307
312
  process.exitCode = 1;
308
313
  }
@@ -1,10 +1,9 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  let node_path = require("node:path");
4
4
  node_path = require_runtime.__toESM(node_path);
5
5
 
6
- //#region ../tailwind/dist/css/runner.helpers.js
7
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
6
+ //#region src/css/runner.helpers.ts
8
7
  const getMainCssSummaryMessage = (options) => {
9
8
  const { optimizationStats, sizeGzipBytes, formatBytes } = options;
10
9
  if (!optimizationStats) return `Main CSS: ${formatBytes(sizeGzipBytes)} gzip`;
@@ -1,8 +1,7 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
2
2
  import path from "node:path";
3
3
 
4
- //#region ../tailwind/dist/css/runner.helpers.js
5
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
4
+ //#region src/css/runner.helpers.ts
6
5
  const getMainCssSummaryMessage = (options) => {
7
6
  const { optimizationStats, sizeGzipBytes, formatBytes } = options;
8
7
  if (!optimizationStats) return `Main CSS: ${formatBytes(sizeGzipBytes)} gzip`;
@@ -20,4 +19,5 @@ const getWatchDirectoryGroups = (entryDirs, dirs) => {
20
19
  };
21
20
 
22
21
  //#endregion
23
- export { getMainCssSummaryMessage, getWatchDirectoryGroups };
22
+ export { getMainCssSummaryMessage, getWatchDirectoryGroups };
23
+ //# sourceMappingURL=runner.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.helpers.js","names":[],"sources":["../../src/css/runner.helpers.ts"],"sourcesContent":["import path from 'node:path';\n\ntype OptimizationStats = {\n originalSizeGzip: number;\n fontFacesRemoved: number;\n emptyRulesRemoved: number;\n};\n\ntype MainCssSummaryOptions = {\n sizeGzipBytes: number;\n optimizationStats?: OptimizationStats;\n formatBytes: (bytes: number) => string;\n};\n\nconst getMainCssSummaryMessage = (options: MainCssSummaryOptions): string => {\n const { optimizationStats, sizeGzipBytes, formatBytes } = options;\n\n if (!optimizationStats) {\n return `Main CSS: ${formatBytes(sizeGzipBytes)} gzip`;\n }\n\n const { originalSizeGzip, fontFacesRemoved, emptyRulesRemoved } = optimizationStats;\n const savedBytesGzip = originalSizeGzip - sizeGzipBytes;\n\n if (savedBytesGzip <= 0) {\n return `Main CSS: ${formatBytes(sizeGzipBytes)} gzip`;\n }\n\n return `Main CSS: ${formatBytes(sizeGzipBytes)} gzip)(optimized: saved ${formatBytes(savedBytesGzip)} gzip, ${fontFacesRemoved} unused @font-face, ${emptyRulesRemoved} empty rules removed)`;\n};\n\nconst getWatchDirectoryGroups = (entryDirs: string[], dirs: string[]) => {\n const watchDirs = [\n ...new Set(dirs.filter((dir) => !dir.split(path.sep).includes('node_modules'))),\n ];\n const filteredPackageDirs = watchDirs.filter((dir) => !entryDirs.includes(dir));\n\n return {\n watchDirs,\n filteredPackageDirs,\n };\n};\n\nexport { getMainCssSummaryMessage, getWatchDirectoryGroups };\n"],"mappings":";;;;AAcA,MAAM,4BAA4B,YAA2C;CAC3E,MAAM,EAAE,mBAAmB,eAAe,gBAAgB;AAE1D,KAAI,CAAC,kBACH,QAAO,aAAa,YAAY,cAAc,CAAC;CAGjD,MAAM,EAAE,kBAAkB,kBAAkB,sBAAsB;CAClE,MAAM,iBAAiB,mBAAmB;AAE1C,KAAI,kBAAkB,EACpB,QAAO,aAAa,YAAY,cAAc,CAAC;AAGjD,QAAO,aAAa,YAAY,cAAc,CAAC,0BAA0B,YAAY,eAAe,CAAC,SAAS,iBAAiB,sBAAsB,kBAAkB;;AAGzK,MAAM,2BAA2B,WAAqB,SAAmB;CACvE,MAAM,YAAY,CAChB,GAAG,IAAI,IAAI,KAAK,QAAQ,QAAQ,CAAC,IAAI,MAAM,KAAK,IAAI,CAAC,SAAS,eAAe,CAAC,CAAC,CAChF;AAGD,QAAO;EACL;EACA,qBAJ0B,UAAU,QAAQ,QAAQ,CAAC,UAAU,SAAS,IAAI,CAAC;EAK9E"}
@@ -1,20 +1,16 @@
1
- /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
- import { defaultTokensConfig } from "../../../config/dist/index.js";
3
- import { gray, green, magenta } from "../../../cli/dist/lib/colors.js";
4
- import { print } from "../../../cli/dist/lib/print.js";
1
+ /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
5
2
  import { DEFAULT_ENTRY, resolveEntryPaths } from "../utils/entryPoints.js";
6
- import { spinStart, spinStop } from "../../../cli/dist/lib/spinner.js";
7
- import { createLogger } from "../../../cli/dist/lib/logger.js";
8
3
  import { findPackageSourceDir, loadConfigFile, scanDirectoriesForSafelist, scanDirectoryForSafelist } from "./nodeUtils.js";
9
4
  import { deduplicateSafelist, getThemeAndScaleClasses } from "../purger/optimized/utils/safelist.js";
10
5
  import { extractVariantDefaults, formatBytes, getConfigurableCssVariables, getMotionVarPrefixes } from "./utils.js";
11
6
  import { generateCSS, generateSimpleModeCSS } from "./generate.js";
12
7
  import { getMainCssSummaryMessage, getWatchDirectoryGroups } from "./runner.helpers.js";
13
- import path from "node:path";
8
+ import { createLogger, gray, green, magenta, print, spinStart, spinStop } from "@yahoo/uds-cli/lib";
14
9
  import fs from "node:fs";
10
+ import path from "node:path";
11
+ import { defaultTokensConfig } from "@yahoo/uds-config";
15
12
 
16
- //#region ../tailwind/dist/css/runner.js
17
- /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
13
+ //#region src/css/runner.ts
18
14
  const SOURCE_FILE_PATTERN = /\.(jsx?|tsx?)$/i;
19
15
  const getWatchDirs = (dirs) => [...new Set(dirs.filter((dir) => !dir.split(path.sep).includes("node_modules")))];
20
16
  const isCoveredByRecursiveWatch = (watchPath, targetPath) => targetPath === watchPath || targetPath.startsWith(`${watchPath}${path.sep}`);
@@ -53,6 +49,11 @@ const createDebouncedAction = (action, delayMs) => {
53
49
  debounceTimer = setTimeout(action, delayMs);
54
50
  };
55
51
  };
52
+ const getPruneVarSafelist = (themeConfig) => {
53
+ const pruneVars = themeConfig.css?.optimization?.pruneVars;
54
+ if (!pruneVars || typeof pruneVars !== "object") return [];
55
+ return pruneVars.safelist ?? [];
56
+ };
56
57
  const createQueuedRegenerator = (options) => {
57
58
  let isGenerating = false;
58
59
  let pendingRegenerate = false;
@@ -230,7 +231,11 @@ const runThemeMode = async (options, context) => {
230
231
  scope: options.scope,
231
232
  contentDir: entryDirs,
232
233
  cssOptions: themeConfig.css,
233
- safeVarPrefixes: [...getMotionVarPrefixes(context.componentData, allMotionComponents), ...getConfigurableCssVariables()]
234
+ safeVarPrefixes: [
235
+ ...getMotionVarPrefixes(context.componentData, allMotionComponents),
236
+ ...getConfigurableCssVariables(),
237
+ ...getPruneVarSafelist(themeConfig)
238
+ ]
234
239
  });
235
240
  const outputDir = path.dirname(outputPath);
236
241
  if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
@@ -306,4 +311,5 @@ const runThemeMode = async (options, context) => {
306
311
  };
307
312
 
308
313
  //#endregion
309
- export { runCssCommand };
314
+ export { runCssCommand };
315
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","names":[],"sources":["../../src/css/runner.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\nimport { createLogger, gray, green, magenta, print, spinStart, spinStop } from '@yahoo/uds-cli/lib';\nimport type { UniversalTokensConfig } from '@yahoo/uds-config';\nimport { defaultTokensConfig } from '@yahoo/uds-config';\n\nimport type { SerializedComponentInfo } from '../commands/generateComponentData';\nimport { deduplicateSafelist, getThemeAndScaleClasses } from '../purger/optimized/utils/safelist';\nimport type { EntryValue, ResolvedEntryPath } from '../utils/entryPoints';\nimport { DEFAULT_ENTRY, resolveEntryPaths } from '../utils/entryPoints';\nimport { generateCSS, generateSimpleModeCSS } from './generate';\nimport {\n findPackageSourceDir,\n loadConfigFile,\n scanDirectoriesForSafelist,\n scanDirectoryForSafelist,\n} from './nodeUtils';\nimport { getMainCssSummaryMessage, getWatchDirectoryGroups } from './runner.helpers';\nimport type { UDSThemeConfig, UDSThemeConfigInput, UDSThemeContext } from './theme';\nimport {\n extractVariantDefaults,\n formatBytes,\n getConfigurableCssVariables,\n getMotionVarPrefixes,\n} from './utils';\n\ntype CssCommandContext = {\n variants: Record<string, Record<string, string>>;\n autoVariants: Record<string, Record<string, string>>;\n componentData: Record<string, SerializedComponentInfo>;\n};\n\ntype CssCommandOptions = {\n workspaceDir: string;\n outFile: string;\n themeConfigPath: string;\n scope?: string;\n entryOption?: EntryValue;\n configOption?: string;\n watch: boolean;\n silent: boolean;\n};\n\ntype ThemeModeSetup = {\n themeConfig: UDSThemeConfig;\n colorModes: ('dark' | 'light')[];\n entries: ResolvedEntryPath[];\n appConfig: UniversalTokensConfig;\n appVariantDefaults: ReturnType<typeof extractVariantDefaults>;\n effectiveSilent: boolean;\n};\n\nconst SOURCE_FILE_PATTERN = /\\.(jsx?|tsx?)$/i;\n\ntype WatchTarget = {\n watchPath: string;\n recursive: boolean;\n fileNames?: string[];\n};\n\nconst getWatchDirs = (dirs: string[]): string[] => [\n ...new Set(dirs.filter((dir) => !dir.split(path.sep).includes('node_modules'))),\n];\n\nconst isCoveredByRecursiveWatch = (watchPath: string, targetPath: string): boolean =>\n targetPath === watchPath || targetPath.startsWith(`${watchPath}${path.sep}`);\n\nconst getEntryWatchTargets = (entries: ResolvedEntryPath[]): WatchTarget[] => {\n const directoryTargets = getWatchDirs(\n entries.filter((entry) => entry.kind === 'directory').map((entry) => entry.absolutePath),\n ).map((watchPath) => ({ watchPath, recursive: true }));\n\n const fileNamesByDirectory = new Map<string, Set<string>>();\n\n entries\n .filter(\n (entry): entry is ResolvedEntryPath & { kind: 'file'; fileName: string } =>\n entry.kind === 'file' && typeof entry.fileName === 'string',\n )\n .forEach((entry) => {\n if (\n directoryTargets.some((target) =>\n isCoveredByRecursiveWatch(target.watchPath, entry.absolutePath),\n )\n ) {\n return;\n }\n\n const fileNames = fileNamesByDirectory.get(entry.watchDirectory) ?? new Set<string>();\n fileNames.add(entry.fileName);\n fileNamesByDirectory.set(entry.watchDirectory, fileNames);\n });\n\n const fileTargets = [...fileNamesByDirectory.entries()].map(([watchPath, fileNames]) => ({\n watchPath,\n recursive: false,\n fileNames: [...fileNames],\n }));\n\n return [...directoryTargets, ...fileTargets];\n};\n\nconst watchSourceFiles = (targets: WatchTarget[], onFileChange: () => void): void => {\n targets.forEach((target) => {\n fs.watch(target.watchPath, { recursive: target.recursive }, (_eventType, filename) => {\n if (!filename || !SOURCE_FILE_PATTERN.test(filename)) {\n return;\n }\n\n if (target.fileNames && !target.fileNames.includes(path.basename(String(filename)))) {\n return;\n }\n\n onFileChange();\n });\n });\n};\n\nconst createDebouncedAction = (action: () => void, delayMs: number): (() => void) => {\n let debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n return () => {\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n debounceTimer = setTimeout(action, delayMs);\n };\n};\n\nconst getPruneVarSafelist = (themeConfig: UDSThemeConfig): Array<string | RegExp> => {\n const pruneVars = themeConfig.css?.optimization?.pruneVars;\n\n if (!pruneVars || typeof pruneVars !== 'object') {\n return [];\n }\n\n return pruneVars.safelist ?? [];\n};\n\nconst createQueuedRegenerator = <T>(options: {\n onStart?: () => void;\n onSuccess?: (result: T) => void;\n onError: (message: string) => void;\n regenerateOnce: () => Promise<T>;\n}): (() => Promise<void>) => {\n let isGenerating = false;\n let pendingRegenerate = false;\n\n const regenerate = async (): Promise<void> => {\n if (isGenerating) {\n pendingRegenerate = true;\n return;\n }\n\n isGenerating = true;\n try {\n options.onStart?.();\n const result = await options.regenerateOnce();\n options.onSuccess?.(result);\n } catch (error) {\n const message = error instanceof Error ? error.message : 'CSS generation failed';\n options.onError(message);\n } finally {\n isGenerating = false;\n\n if (pendingRegenerate) {\n pendingRegenerate = false;\n await regenerate();\n }\n }\n };\n\n return regenerate;\n};\n\nconst runCssCommand = async (\n options: CssCommandOptions,\n context: CssCommandContext,\n): Promise<void> => {\n const themeConfigExists = fs.existsSync(\n path.join(options.workspaceDir, String(options.themeConfigPath)),\n );\n\n if (!themeConfigExists) {\n await runSimpleMode(options, context);\n return;\n }\n\n await runThemeMode(options, context);\n};\n\nconst runSimpleMode = async (\n options: CssCommandOptions,\n context: CssCommandContext,\n): Promise<void> => {\n const entry = options.entryOption ?? DEFAULT_ENTRY;\n const configPath = typeof options.configOption === 'string' ? options.configOption : undefined;\n\n if (!options.watch && !options.silent) {\n spinStart('Generating CSS...');\n }\n\n try {\n const result = await generateSimpleModeCSS({\n workspaceDir: options.workspaceDir,\n entry,\n outFile: String(options.outFile),\n variants: context.variants,\n autoVariants: context.autoVariants,\n componentData: context.componentData,\n scope: options.scope,\n configPath,\n isWatch: options.watch,\n silent: options.silent,\n });\n\n if (options.watch) {\n await runSimpleModeWatch(options, context, entry, configPath, result.packageDirs ?? []);\n }\n } catch (error) {\n spinStop('❌', error instanceof Error ? error.message : 'CSS generation failed');\n process.exitCode = 1;\n }\n};\n\nconst runSimpleModeWatch = async (\n options: CssCommandOptions,\n context: CssCommandContext,\n entry: EntryValue,\n configPath: string | undefined,\n packageDirs: string[],\n): Promise<void> => {\n const resolvedEntries = resolveEntryPaths(entry, options.workspaceDir);\n const entryWatchTargets = getEntryWatchTargets(resolvedEntries);\n const fallbackTargets = getWatchDirs(packageDirs).map((watchPath) => ({\n watchPath,\n recursive: true,\n }));\n const watchTargets = packageDirs.length > 0 ? fallbackTargets : entryWatchTargets;\n\n if (!options.silent) {\n print('');\n print(`${magenta('Watching for changes...')}`);\n watchTargets.forEach((target) => print(` ${gray('•')} ${target.watchPath}`));\n print(`${gray('Press Ctrl+C to stop')}`);\n print('');\n }\n\n const regenerate = createQueuedRegenerator({\n onStart: () => {\n if (!options.silent) {\n const timestamp = new Date().toLocaleTimeString();\n print(`${gray(`[${timestamp}]`)} Change detected, regenerating...`);\n }\n },\n regenerateOnce: async () => {\n await generateSimpleModeCSS({\n workspaceDir: options.workspaceDir,\n entry,\n outFile: String(options.outFile),\n variants: context.variants,\n autoVariants: context.autoVariants,\n componentData: context.componentData,\n scope: options.scope,\n configPath,\n isWatch: true,\n silent: true,\n });\n },\n onSuccess: () => {\n if (!options.silent) {\n const updatedAt = new Date().toLocaleTimeString();\n print(`${gray(`[${updatedAt}]`)} ${green('CSS updated')}`);\n print('');\n }\n },\n onError: (message) => {\n print(`Error: ${message}`);\n },\n });\n\n watchSourceFiles(\n watchTargets,\n createDebouncedAction(() => {\n void regenerate();\n }, 100),\n );\n\n await new Promise(() => {});\n};\n\nconst loadThemeModeSetup = async (options: CssCommandOptions): Promise<ThemeModeSetup | null> => {\n const themeConfigInput = await loadConfigFile<UDSThemeConfigInput>(\n String(options.themeConfigPath),\n );\n if (!themeConfigInput) {\n return null;\n }\n\n const themeContext: UDSThemeContext = {\n cwd: options.workspaceDir,\n watch: options.watch,\n };\n const themeConfig: UDSThemeConfig =\n typeof themeConfigInput === 'function'\n ? await themeConfigInput(themeContext)\n : themeConfigInput;\n\n let appConfig: UniversalTokensConfig = defaultTokensConfig;\n if (themeConfig.config) {\n const loadedConfig = await loadConfigFile<UniversalTokensConfig>(themeConfig.config);\n if (loadedConfig) {\n appConfig = loadedConfig;\n }\n }\n\n return {\n themeConfig,\n colorModes: themeConfig.colorModes ?? ['dark'],\n entries: resolveEntryPaths(themeConfig.entry, options.workspaceDir),\n appConfig,\n appVariantDefaults: extractVariantDefaults(appConfig),\n effectiveSilent: options.silent || themeConfig.silent === true,\n };\n};\n\nconst runThemeMode = async (\n options: CssCommandOptions,\n context: CssCommandContext,\n): Promise<void> => {\n const workspaceDir = options.workspaceDir;\n const outputPath = path.isAbsolute(options.outFile)\n ? options.outFile\n : path.join(workspaceDir, String(options.outFile));\n let effectiveSilent = options.silent;\n let log = createLogger({ silent: effectiveSilent });\n\n log.spinStart('Loading theme configuration...');\n\n try {\n const setup = await loadThemeModeSetup(options);\n if (!setup) {\n log.spinStop('❌', `Theme config not found: ${options.themeConfigPath}`);\n process.exitCode = 1;\n return;\n }\n\n const { themeConfig, colorModes, entries, appConfig, appVariantDefaults } = setup;\n effectiveSilent = setup.effectiveSilent;\n log = createLogger({ silent: effectiveSilent });\n const entryDirs = entries.map((entry) => entry.absolutePath);\n\n if (!effectiveSilent) {\n log.spinStop('✅', 'Theme configuration loaded');\n }\n\n if (themeConfig.config && appConfig === defaultTokensConfig) {\n log.warn(`App config not found: ${themeConfig.config}, using defaults`);\n }\n const packageDirs: string[] = [];\n\n const generateThemeModeCSS = async (opts?: { isWatch?: boolean }) => {\n const genStartTime = performance.now();\n const genLog = opts?.isWatch ? createLogger({ silent: true }) : log;\n\n genLog.spinStart('Scanning app code...');\n const appScanResult = await scanDirectoriesForSafelist(\n entryDirs,\n colorModes,\n context.variants,\n context.autoVariants,\n context.componentData,\n appVariantDefaults,\n );\n genLog.spinStop('✅', `Scanned ${appScanResult.filesScanned} files`);\n\n genLog.spinStart('Generating main CSS...');\n\n const inheritedClasses: string[] = [...appScanResult.safelist];\n const inheritedComponents = new Set<string>(appScanResult.components);\n\n const processInheritedPackage = async (packageName: string) => {\n genLog.spinStart(`Processing package: ${packageName}...`);\n\n const packageDir = findPackageSourceDir(packageName);\n if (!packageDir) {\n genLog.spinStop('⚠️', `Package not found: ${packageName}`);\n return;\n }\n\n if (!packageDirs.includes(packageDir)) {\n packageDirs.push(packageDir);\n }\n\n const packageScanResult = await scanDirectoryForSafelist(\n packageDir,\n colorModes,\n context.variants,\n context.autoVariants,\n context.componentData,\n appVariantDefaults,\n true,\n );\n inheritedClasses.push(...packageScanResult.safelist);\n packageScanResult.components.forEach((comp) => inheritedComponents.add(comp));\n genLog.spinStop('✅', `${packageName}: ${packageScanResult.filesScanned} files (inherit)`);\n };\n\n await (themeConfig.inherit ?? []).reduce(async (promise, packageName) => {\n await promise;\n await processInheritedPackage(packageName);\n }, Promise.resolve());\n\n const mainSafelist = deduplicateSafelist([\n ...inheritedClasses,\n ...getThemeAndScaleClasses(colorModes),\n ]);\n\n const allMotionComponents: string[] = [...inheritedComponents];\n\n const mainCssResult = await generateCSS(\n [...(themeConfig.css?.safelist ?? []), ...mainSafelist],\n appConfig,\n {\n scope: options.scope,\n contentDir: entryDirs,\n cssOptions: themeConfig.css,\n safeVarPrefixes: [\n ...getMotionVarPrefixes(context.componentData, allMotionComponents),\n ...getConfigurableCssVariables(),\n ...getPruneVarSafelist(themeConfig),\n ],\n },\n );\n\n const outputDir = path.dirname(outputPath);\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n fs.writeFileSync(outputPath, mainCssResult.css);\n\n genLog.spinStop(\n '✅',\n getMainCssSummaryMessage({\n sizeGzipBytes: mainCssResult.sizeGzipBytes,\n optimizationStats: mainCssResult.optimizationStats,\n formatBytes,\n }),\n );\n\n const duration = Math.round(performance.now() - genStartTime);\n\n genLog.newline();\n genLog.print(green('CSS generation complete!'));\n genLog.newline();\n genLog.label('Output file:', outputPath);\n genLog.newline();\n genLog.print(`${magenta('Total time:')} ${duration}ms`);\n\n return { duration, outputPath, packageDirs };\n };\n\n await generateThemeModeCSS();\n\n if (options.watch) {\n const entryWatchTargets = getEntryWatchTargets(entries);\n const entryWatchDirs = getWatchDirs(entryWatchTargets.map((target) => target.watchPath));\n const { filteredPackageDirs } = getWatchDirectoryGroups(entryWatchDirs, [\n ...entryDirs,\n ...packageDirs,\n ]);\n\n if (!effectiveSilent) {\n log.newline();\n log.print(`${magenta('Watching for changes...')}`);\n entryDirs.forEach((entryDir) => {\n log.listItem(`App: ${entryDir}`);\n });\n filteredPackageDirs.forEach((dir) => {\n log.listItem(`Package: ${dir}`);\n });\n log.print(`${gray('Press Ctrl+C to stop')}`);\n log.newline();\n }\n\n const regenerate = createQueuedRegenerator({\n onStart: () => {\n if (!effectiveSilent) {\n const timestamp = new Date().toLocaleTimeString();\n log.print(`${gray(`[${timestamp}]`)} Change detected, regenerating...`);\n }\n },\n regenerateOnce: async () => generateThemeModeCSS({ isWatch: true }),\n onSuccess: (result) => {\n if (!effectiveSilent) {\n const updatedAt = new Date().toLocaleTimeString();\n log.print(`${gray(`[${updatedAt}]`)} ${green(`CSS updated (${result?.duration}ms)`)}`);\n log.newline();\n }\n },\n onError: (message) => {\n log.print(message);\n },\n });\n\n const watchDebounce = themeConfig.css?.watchDebounce ?? 100;\n\n watchSourceFiles(\n [\n ...entryWatchTargets,\n ...filteredPackageDirs\n .filter(\n (packageDir) =>\n !entryWatchTargets.some((target) =>\n isCoveredByRecursiveWatch(target.watchPath, packageDir),\n ),\n )\n .map((watchPath) => ({ watchPath, recursive: true })),\n ],\n createDebouncedAction(() => {\n void regenerate();\n }, watchDebounce),\n );\n\n await new Promise(() => {});\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : 'CSS generation failed';\n if (effectiveSilent) {\n spinStop('❌', message);\n } else {\n log.spinStop('❌', message);\n }\n process.exitCode = 1;\n }\n};\n\nexport { runCssCommand };\nexport type { CssCommandContext, CssCommandOptions };\n"],"mappings":";;;;;;;;;;;;;AAqDA,MAAM,sBAAsB;AAQ5B,MAAM,gBAAgB,SAA6B,CACjD,GAAG,IAAI,IAAI,KAAK,QAAQ,QAAQ,CAAC,IAAI,MAAM,KAAK,IAAI,CAAC,SAAS,eAAe,CAAC,CAAC,CAChF;AAED,MAAM,6BAA6B,WAAmB,eACpD,eAAe,aAAa,WAAW,WAAW,GAAG,YAAY,KAAK,MAAM;AAE9E,MAAM,wBAAwB,YAAgD;CAC5E,MAAM,mBAAmB,aACvB,QAAQ,QAAQ,UAAU,MAAM,SAAS,YAAY,CAAC,KAAK,UAAU,MAAM,aAAa,CACzF,CAAC,KAAK,eAAe;EAAE;EAAW,WAAW;EAAM,EAAE;CAEtD,MAAM,uCAAuB,IAAI,KAA0B;AAE3D,SACG,QACE,UACC,MAAM,SAAS,UAAU,OAAO,MAAM,aAAa,SACtD,CACA,SAAS,UAAU;AAClB,MACE,iBAAiB,MAAM,WACrB,0BAA0B,OAAO,WAAW,MAAM,aAAa,CAChE,CAED;EAGF,MAAM,YAAY,qBAAqB,IAAI,MAAM,eAAe,oBAAI,IAAI,KAAa;AACrF,YAAU,IAAI,MAAM,SAAS;AAC7B,uBAAqB,IAAI,MAAM,gBAAgB,UAAU;GACzD;CAEJ,MAAM,cAAc,CAAC,GAAG,qBAAqB,SAAS,CAAC,CAAC,KAAK,CAAC,WAAW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