@yahoo/uds-v5-wip 1.59.0 → 1.61.0

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 (562) hide show
  1. package/dist/codegen/dist/loader/getLoaderArtifacts.js +2 -0
  2. package/dist/config/dist/Props.d.ts +161 -25
  3. package/dist/config/dist/bindRender.d.ts +16 -0
  4. package/dist/config/dist/bindRender.js +310 -0
  5. package/dist/config/dist/className.d.ts +54 -0
  6. package/dist/config/dist/className.js +77 -0
  7. package/dist/config/dist/component-config.d.ts +674 -161
  8. package/dist/config/dist/component-config.js +163 -0
  9. package/dist/config/dist/component-refs.d.ts +41 -18
  10. package/dist/config/dist/createConfig.d.ts +140 -59
  11. package/dist/config/dist/createConfig.js +95 -217
  12. package/dist/config/dist/createStyler.d.ts +35 -0
  13. package/dist/config/dist/createStyler.js +93 -0
  14. package/dist/config/dist/defineComponent.d.ts +297 -4
  15. package/dist/config/dist/defineComponent.js +264 -2
  16. package/dist/config/dist/defineCompositeStyle.d.ts +93 -0
  17. package/dist/config/dist/defineCompositeStyle.js +18 -0
  18. package/dist/config/dist/defineMotionConfig.d.ts +152 -0
  19. package/dist/config/dist/definePreview.d.ts +45 -0
  20. package/dist/config/dist/definePreview.js +35 -0
  21. package/dist/config/dist/defineStyleProp.d.ts +199 -3
  22. package/dist/config/dist/defineStyleProp.js +3 -2
  23. package/dist/config/dist/index.d.ts +20 -11
  24. package/dist/config/dist/index.js +8 -4
  25. package/dist/config/dist/merge-utils.js +51 -0
  26. package/dist/config/dist/propertyAcceptedTypes.d.ts +19 -0
  27. package/dist/config/dist/refs.d.ts +85 -0
  28. package/dist/config/dist/refs.js +92 -47
  29. package/dist/config/dist/resolveCompoundProps.d.ts +65 -0
  30. package/dist/config/dist/resolveCompoundProps.js +120 -0
  31. package/dist/config/dist/resolveStyleProp.d.ts +72 -3
  32. package/dist/config/dist/resolveStyleProp.js +68 -43
  33. package/dist/config/dist/runtime-registry.js +30 -2
  34. package/dist/config/dist/serialize.d.ts +8 -34
  35. package/dist/config/dist/serialize.js +10 -71
  36. package/dist/config/dist/sniffTokenType.d.ts +7 -0
  37. package/dist/config/dist/sniffTokenType.js +67 -0
  38. package/dist/config/dist/style-prop-runtime.d.ts +75 -1
  39. package/dist/config/dist/style-prop-runtime.js +390 -0
  40. package/dist/config/dist/types/css-properties.d.ts +223 -0
  41. package/dist/config/dist/types/css-values.d.ts +2 -1
  42. package/dist/config/dist/types.d.ts +14 -3
  43. package/dist/config.d.ts +21 -1560
  44. package/dist/config.js +15 -20
  45. package/dist/loader/dist/_virtual/_rolldown/runtime.js +1 -2
  46. package/dist/loader/dist/index.d.ts +2 -0
  47. package/dist/loader/dist/index.js +3 -0
  48. package/dist/loader/dist/loader/artifacts.js +2 -2
  49. package/dist/loader/dist/loader/babel-utils.js +1 -29
  50. package/dist/loader/dist/loader/internal-meta.js +38 -1
  51. package/dist/loader/dist/loader/lower-new-api-primitive.js +176 -14
  52. package/dist/loader/dist/loader.d.ts +27 -0
  53. package/dist/loader/dist/loader.js +71 -309
  54. package/dist/loader/dist/transform-runner.js +14 -0
  55. package/dist/loader/dist/unplugin.d.ts +27 -0
  56. package/dist/loader/dist/unplugin.js +52 -0
  57. package/dist/plugin.d.ts +2 -2
  58. package/dist/plugin.js +3 -2
  59. package/dist/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +3 -51
  61. package/dist/components/accordion.config.d.ts +0 -2
  62. package/dist/components/accordion.config.js +0 -2
  63. package/dist/components/accordion.d.ts +0 -2
  64. package/dist/components/accordion.js +0 -2
  65. package/dist/components/alert.config.d.ts +0 -2
  66. package/dist/components/alert.config.js +0 -2
  67. package/dist/components/alert.d.ts +0 -2
  68. package/dist/components/alert.js +0 -2
  69. package/dist/components/anchor.config.d.ts +0 -2
  70. package/dist/components/anchor.config.js +0 -2
  71. package/dist/components/anchor.d.ts +0 -2
  72. package/dist/components/anchor.js +0 -2
  73. package/dist/components/article.d.ts +0 -2
  74. package/dist/components/article.js +0 -2
  75. package/dist/components/aside.d.ts +0 -2
  76. package/dist/components/aside.js +0 -2
  77. package/dist/components/avatar-group.config.d.ts +0 -2
  78. package/dist/components/avatar-group.config.js +0 -2
  79. package/dist/components/avatar-group.d.ts +0 -2
  80. package/dist/components/avatar-group.js +0 -2
  81. package/dist/components/avatar.config.d.ts +0 -2
  82. package/dist/components/avatar.config.js +0 -2
  83. package/dist/components/avatar.d.ts +0 -2
  84. package/dist/components/avatar.js +0 -2
  85. package/dist/components/badge.config.d.ts +0 -2
  86. package/dist/components/badge.config.js +0 -2
  87. package/dist/components/badge.d.ts +0 -2
  88. package/dist/components/badge.js +0 -2
  89. package/dist/components/box.d.ts +0 -2
  90. package/dist/components/box.js +0 -2
  91. package/dist/components/breadcrumb.config.d.ts +0 -2
  92. package/dist/components/breadcrumb.config.js +0 -2
  93. package/dist/components/breadcrumb.d.ts +0 -2
  94. package/dist/components/breadcrumb.js +0 -2
  95. package/dist/components/button.config.d.ts +0 -2
  96. package/dist/components/button.config.js +0 -2
  97. package/dist/components/button.d.ts +0 -2
  98. package/dist/components/button.js +0 -2
  99. package/dist/components/card.config.d.ts +0 -2
  100. package/dist/components/card.config.js +0 -2
  101. package/dist/components/card.d.ts +0 -2
  102. package/dist/components/card.js +0 -2
  103. package/dist/components/collapsible.config.d.ts +0 -2
  104. package/dist/components/collapsible.config.js +0 -2
  105. package/dist/components/collapsible.d.ts +0 -2
  106. package/dist/components/collapsible.js +0 -2
  107. package/dist/components/command.config.d.ts +0 -2
  108. package/dist/components/command.config.js +0 -2
  109. package/dist/components/command.d.ts +0 -2
  110. package/dist/components/command.js +0 -2
  111. package/dist/components/control-color.config.d.ts +0 -2
  112. package/dist/components/control-color.config.js +0 -2
  113. package/dist/components/control-color.d.ts +0 -2
  114. package/dist/components/control-color.js +0 -2
  115. package/dist/components/control-curve.config.d.ts +0 -2
  116. package/dist/components/control-curve.config.js +0 -2
  117. package/dist/components/control-curve.d.ts +0 -2
  118. package/dist/components/control-curve.js +0 -2
  119. package/dist/components/control-folder.config.d.ts +0 -2
  120. package/dist/components/control-folder.config.js +0 -2
  121. package/dist/components/control-folder.d.ts +0 -2
  122. package/dist/components/control-folder.js +0 -2
  123. package/dist/components/control-group.config.d.ts +0 -2
  124. package/dist/components/control-group.config.js +0 -2
  125. package/dist/components/control-group.d.ts +0 -2
  126. package/dist/components/control-group.js +0 -2
  127. package/dist/components/control-knob.config.d.ts +0 -2
  128. package/dist/components/control-knob.config.js +0 -2
  129. package/dist/components/control-knob.d.ts +0 -2
  130. package/dist/components/control-knob.js +0 -2
  131. package/dist/components/control-panel.config.d.ts +0 -2
  132. package/dist/components/control-panel.config.js +0 -2
  133. package/dist/components/control-panel.d.ts +0 -2
  134. package/dist/components/control-panel.js +0 -2
  135. package/dist/components/control-select.config.d.ts +0 -2
  136. package/dist/components/control-select.config.js +0 -2
  137. package/dist/components/control-select.d.ts +0 -2
  138. package/dist/components/control-select.js +0 -2
  139. package/dist/components/control-slider.config.d.ts +0 -2
  140. package/dist/components/control-slider.config.js +0 -2
  141. package/dist/components/control-slider.d.ts +0 -2
  142. package/dist/components/control-slider.js +0 -2
  143. package/dist/components/control-spring.config.d.ts +0 -2
  144. package/dist/components/control-spring.config.js +0 -2
  145. package/dist/components/control-spring.d.ts +0 -2
  146. package/dist/components/control-spring.js +0 -2
  147. package/dist/components/control-stepper.config.d.ts +0 -2
  148. package/dist/components/control-stepper.config.js +0 -2
  149. package/dist/components/control-stepper.d.ts +0 -2
  150. package/dist/components/control-stepper.js +0 -2
  151. package/dist/components/control-toggle.config.d.ts +0 -2
  152. package/dist/components/control-toggle.config.js +0 -2
  153. package/dist/components/control-toggle.d.ts +0 -2
  154. package/dist/components/control-toggle.js +0 -2
  155. package/dist/components/dist/_slots.js +0 -8
  156. package/dist/components/dist/accordion.config.d.ts +0 -432
  157. package/dist/components/dist/accordion.config.js +0 -81
  158. package/dist/components/dist/accordion.d.ts +0 -454
  159. package/dist/components/dist/accordion.js +0 -60
  160. package/dist/components/dist/alert.config.d.ts +0 -220
  161. package/dist/components/dist/alert.config.js +0 -54
  162. package/dist/components/dist/alert.d.ts +0 -231
  163. package/dist/components/dist/alert.js +0 -16
  164. package/dist/components/dist/anchor.config.d.ts +0 -251
  165. package/dist/components/dist/anchor.config.js +0 -22
  166. package/dist/components/dist/anchor.d.ts +0 -262
  167. package/dist/components/dist/anchor.js +0 -9
  168. package/dist/components/dist/article.d.ts +0 -12
  169. package/dist/components/dist/article.js +0 -9
  170. package/dist/components/dist/aside.d.ts +0 -12
  171. package/dist/components/dist/aside.js +0 -9
  172. package/dist/components/dist/avatar-group.config.d.ts +0 -316
  173. package/dist/components/dist/avatar-group.config.js +0 -33
  174. package/dist/components/dist/avatar-group.d.ts +0 -330
  175. package/dist/components/dist/avatar-group.js +0 -39
  176. package/dist/components/dist/avatar.config.d.ts +0 -198
  177. package/dist/components/dist/avatar.config.js +0 -49
  178. package/dist/components/dist/avatar.d.ts +0 -212
  179. package/dist/components/dist/avatar.js +0 -20
  180. package/dist/components/dist/badge.config.d.ts +0 -478
  181. package/dist/components/dist/badge.config.js +0 -99
  182. package/dist/components/dist/badge.d.ts +0 -490
  183. package/dist/components/dist/badge.js +0 -16
  184. package/dist/components/dist/box.d.ts +0 -15
  185. package/dist/components/dist/box.js +0 -9
  186. package/dist/components/dist/breadcrumb.config.d.ts +0 -391
  187. package/dist/components/dist/breadcrumb.config.js +0 -43
  188. package/dist/components/dist/breadcrumb.d.ts +0 -421
  189. package/dist/components/dist/breadcrumb.js +0 -119
  190. package/dist/components/dist/button.config.d.ts +0 -382
  191. package/dist/components/dist/button.config.js +0 -91
  192. package/dist/components/dist/button.d.ts +0 -404
  193. package/dist/components/dist/button.js +0 -35
  194. package/dist/components/dist/card.config.d.ts +0 -337
  195. package/dist/components/dist/card.config.js +0 -33
  196. package/dist/components/dist/card.d.ts +0 -353
  197. package/dist/components/dist/card.js +0 -27
  198. package/dist/components/dist/collapsible.config.d.ts +0 -46
  199. package/dist/components/dist/collapsible.config.js +0 -46
  200. package/dist/components/dist/collapsible.d.ts +0 -62
  201. package/dist/components/dist/collapsible.js +0 -38
  202. package/dist/components/dist/command.config.d.ts +0 -1614
  203. package/dist/components/dist/command.config.js +0 -170
  204. package/dist/components/dist/command.d.ts +0 -1723
  205. package/dist/components/dist/command.js +0 -341
  206. package/dist/components/dist/control-color.config.d.ts +0 -980
  207. package/dist/components/dist/control-color.config.js +0 -81
  208. package/dist/components/dist/control-color.d.ts +0 -996
  209. package/dist/components/dist/control-color.js +0 -64
  210. package/dist/components/dist/control-curve.config.d.ts +0 -19
  211. package/dist/components/dist/control-curve.config.js +0 -14
  212. package/dist/components/dist/control-curve.d.ts +0 -36
  213. package/dist/components/dist/control-curve.js +0 -81
  214. package/dist/components/dist/control-folder.config.d.ts +0 -178
  215. package/dist/components/dist/control-folder.config.js +0 -47
  216. package/dist/components/dist/control-folder.d.ts +0 -195
  217. package/dist/components/dist/control-folder.js +0 -41
  218. package/dist/components/dist/control-group.config.d.ts +0 -860
  219. package/dist/components/dist/control-group.config.js +0 -80
  220. package/dist/components/dist/control-group.d.ts +0 -882
  221. package/dist/components/dist/control-group.js +0 -89
  222. package/dist/components/dist/control-knob.config.d.ts +0 -793
  223. package/dist/components/dist/control-knob.config.js +0 -67
  224. package/dist/components/dist/control-knob.d.ts +0 -820
  225. package/dist/components/dist/control-knob.js +0 -148
  226. package/dist/components/dist/control-panel.config.d.ts +0 -403
  227. package/dist/components/dist/control-panel.config.js +0 -38
  228. package/dist/components/dist/control-panel.d.ts +0 -416
  229. package/dist/components/dist/control-panel.js +0 -22
  230. package/dist/components/dist/control-select.config.d.ts +0 -1177
  231. package/dist/components/dist/control-select.config.js +0 -102
  232. package/dist/components/dist/control-select.d.ts +0 -1201
  233. package/dist/components/dist/control-select.js +0 -63
  234. package/dist/components/dist/control-slider.config.d.ts +0 -105
  235. package/dist/components/dist/control-slider.config.js +0 -98
  236. package/dist/components/dist/control-slider.d.ts +0 -128
  237. package/dist/components/dist/control-slider.js +0 -87
  238. package/dist/components/dist/control-spring.config.d.ts +0 -418
  239. package/dist/components/dist/control-spring.config.js +0 -36
  240. package/dist/components/dist/control-spring.d.ts +0 -440
  241. package/dist/components/dist/control-spring.js +0 -136
  242. package/dist/components/dist/control-stepper.config.d.ts +0 -1085
  243. package/dist/components/dist/control-stepper.config.js +0 -108
  244. package/dist/components/dist/control-stepper.d.ts +0 -1105
  245. package/dist/components/dist/control-stepper.js +0 -109
  246. package/dist/components/dist/control-toggle.config.d.ts +0 -408
  247. package/dist/components/dist/control-toggle.config.js +0 -26
  248. package/dist/components/dist/control-toggle.d.ts +0 -421
  249. package/dist/components/dist/control-toggle.js +0 -36
  250. package/dist/components/dist/createSlot.d.ts +0 -9
  251. package/dist/components/dist/createSlot.js +0 -89
  252. package/dist/components/dist/dropdown.config.d.ts +0 -921
  253. package/dist/components/dist/dropdown.config.js +0 -107
  254. package/dist/components/dist/dropdown.d.ts +0 -951
  255. package/dist/components/dist/dropdown.js +0 -92
  256. package/dist/components/dist/empty-state.config.d.ts +0 -397
  257. package/dist/components/dist/empty-state.config.js +0 -53
  258. package/dist/components/dist/empty-state.d.ts +0 -417
  259. package/dist/components/dist/empty-state.js +0 -33
  260. package/dist/components/dist/footer.d.ts +0 -12
  261. package/dist/components/dist/footer.js +0 -9
  262. package/dist/components/dist/grid.d.ts +0 -42
  263. package/dist/components/dist/grid.js +0 -34
  264. package/dist/components/dist/header.d.ts +0 -12
  265. package/dist/components/dist/header.js +0 -9
  266. package/dist/components/dist/hstack.d.ts +0 -16
  267. package/dist/components/dist/hstack.js +0 -21
  268. package/dist/components/dist/image.d.ts +0 -20
  269. package/dist/components/dist/image.js +0 -9
  270. package/dist/components/dist/input.config.d.ts +0 -59
  271. package/dist/components/dist/input.config.js +0 -42
  272. package/dist/components/dist/input.d.ts +0 -68
  273. package/dist/components/dist/input.js +0 -14
  274. package/dist/components/dist/item.config.d.ts +0 -352
  275. package/dist/components/dist/item.config.js +0 -83
  276. package/dist/components/dist/item.d.ts +0 -375
  277. package/dist/components/dist/item.js +0 -51
  278. package/dist/components/dist/list.d.ts +0 -20
  279. package/dist/components/dist/list.js +0 -21
  280. package/dist/components/dist/main.d.ts +0 -12
  281. package/dist/components/dist/main.js +0 -9
  282. package/dist/components/dist/modal.config.d.ts +0 -398
  283. package/dist/components/dist/modal.config.js +0 -92
  284. package/dist/components/dist/modal.d.ts +0 -434
  285. package/dist/components/dist/modal.js +0 -125
  286. package/dist/components/dist/nav-header.config.d.ts +0 -159
  287. package/dist/components/dist/nav-header.config.js +0 -26
  288. package/dist/components/dist/nav-header.d.ts +0 -174
  289. package/dist/components/dist/nav-header.js +0 -23
  290. package/dist/components/dist/nav.d.ts +0 -12
  291. package/dist/components/dist/nav.js +0 -9
  292. package/dist/components/dist/preset-bar.config.d.ts +0 -193
  293. package/dist/components/dist/preset-bar.config.js +0 -39
  294. package/dist/components/dist/preset-bar.d.ts +0 -216
  295. package/dist/components/dist/preset-bar.js +0 -71
  296. package/dist/components/dist/presets/index.d.ts +0 -17675
  297. package/dist/components/dist/presets/index.js +0 -97
  298. package/dist/components/dist/pressable.d.ts +0 -12
  299. package/dist/components/dist/pressable.js +0 -9
  300. package/dist/components/dist/progress.config.d.ts +0 -297
  301. package/dist/components/dist/progress.config.js +0 -35
  302. package/dist/components/dist/progress.d.ts +0 -312
  303. package/dist/components/dist/progress.js +0 -43
  304. package/dist/components/dist/section.d.ts +0 -12
  305. package/dist/components/dist/section.js +0 -9
  306. package/dist/components/dist/select.config.d.ts +0 -32
  307. package/dist/components/dist/select.config.js +0 -25
  308. package/dist/components/dist/select.d.ts +0 -46
  309. package/dist/components/dist/select.js +0 -13
  310. package/dist/components/dist/sheet.config.d.ts +0 -246
  311. package/dist/components/dist/sheet.config.js +0 -99
  312. package/dist/components/dist/sheet.d.ts +0 -268
  313. package/dist/components/dist/sheet.js +0 -53
  314. package/dist/components/dist/sidebar.config.d.ts +0 -1652
  315. package/dist/components/dist/sidebar.config.js +0 -217
  316. package/dist/components/dist/sidebar.d.ts +0 -1826
  317. package/dist/components/dist/sidebar.js +0 -492
  318. package/dist/components/dist/skeleton.config.d.ts +0 -17
  319. package/dist/components/dist/skeleton.config.js +0 -10
  320. package/dist/components/dist/skeleton.d.ts +0 -28
  321. package/dist/components/dist/skeleton.js +0 -16
  322. package/dist/components/dist/slider.config.d.ts +0 -45
  323. package/dist/components/dist/slider.config.js +0 -40
  324. package/dist/components/dist/slider.d.ts +0 -71
  325. package/dist/components/dist/slider.js +0 -247
  326. package/dist/components/dist/spinner.config.d.ts +0 -35
  327. package/dist/components/dist/spinner.config.js +0 -24
  328. package/dist/components/dist/spinner.d.ts +0 -43
  329. package/dist/components/dist/spinner.js +0 -29
  330. package/dist/components/dist/svg.d.ts +0 -22
  331. package/dist/components/dist/svg.js +0 -17
  332. package/dist/components/dist/switch.config.d.ts +0 -354
  333. package/dist/components/dist/switch.config.js +0 -47
  334. package/dist/components/dist/switch.d.ts +0 -371
  335. package/dist/components/dist/switch.js +0 -32
  336. package/dist/components/dist/table.d.ts +0 -37
  337. package/dist/components/dist/table.js +0 -29
  338. package/dist/components/dist/tabs.config.d.ts +0 -612
  339. package/dist/components/dist/tabs.config.js +0 -56
  340. package/dist/components/dist/tabs.d.ts +0 -633
  341. package/dist/components/dist/tabs.js +0 -77
  342. package/dist/components/dist/text.config.d.ts +0 -307
  343. package/dist/components/dist/text.config.js +0 -149
  344. package/dist/components/dist/text.d.ts +0 -206
  345. package/dist/components/dist/text.js +0 -12
  346. package/dist/components/dist/textarea.config.d.ts +0 -353
  347. package/dist/components/dist/textarea.config.js +0 -57
  348. package/dist/components/dist/textarea.d.ts +0 -363
  349. package/dist/components/dist/textarea.js +0 -9
  350. package/dist/components/dist/toast.config.d.ts +0 -336
  351. package/dist/components/dist/toast.config.js +0 -145
  352. package/dist/components/dist/toast.d.ts +0 -427
  353. package/dist/components/dist/toast.js +0 -159
  354. package/dist/components/dist/tooltip.config.d.ts +0 -194
  355. package/dist/components/dist/tooltip.config.js +0 -40
  356. package/dist/components/dist/tooltip.d.ts +0 -207
  357. package/dist/components/dist/tooltip.js +0 -28
  358. package/dist/components/dist/vstack.d.ts +0 -16
  359. package/dist/components/dist/vstack.js +0 -20
  360. package/dist/components/dropdown.config.d.ts +0 -2
  361. package/dist/components/dropdown.config.js +0 -2
  362. package/dist/components/dropdown.d.ts +0 -2
  363. package/dist/components/dropdown.js +0 -2
  364. package/dist/components/empty-state.config.d.ts +0 -2
  365. package/dist/components/empty-state.config.js +0 -2
  366. package/dist/components/empty-state.d.ts +0 -2
  367. package/dist/components/empty-state.js +0 -2
  368. package/dist/components/footer.d.ts +0 -2
  369. package/dist/components/footer.js +0 -2
  370. package/dist/components/grid.d.ts +0 -2
  371. package/dist/components/grid.js +0 -2
  372. package/dist/components/header.d.ts +0 -2
  373. package/dist/components/header.js +0 -2
  374. package/dist/components/hstack.d.ts +0 -2
  375. package/dist/components/hstack.js +0 -2
  376. package/dist/components/image.d.ts +0 -2
  377. package/dist/components/image.js +0 -2
  378. package/dist/components/input.config.d.ts +0 -2
  379. package/dist/components/input.config.js +0 -2
  380. package/dist/components/input.d.ts +0 -2
  381. package/dist/components/input.js +0 -2
  382. package/dist/components/item.config.d.ts +0 -2
  383. package/dist/components/item.config.js +0 -2
  384. package/dist/components/item.d.ts +0 -2
  385. package/dist/components/item.js +0 -2
  386. package/dist/components/list.d.ts +0 -2
  387. package/dist/components/list.js +0 -2
  388. package/dist/components/main.d.ts +0 -2
  389. package/dist/components/main.js +0 -2
  390. package/dist/components/modal.config.d.ts +0 -2
  391. package/dist/components/modal.config.js +0 -2
  392. package/dist/components/modal.d.ts +0 -2
  393. package/dist/components/modal.js +0 -2
  394. package/dist/components/nav-header.config.d.ts +0 -2
  395. package/dist/components/nav-header.config.js +0 -2
  396. package/dist/components/nav-header.d.ts +0 -2
  397. package/dist/components/nav-header.js +0 -2
  398. package/dist/components/nav.d.ts +0 -2
  399. package/dist/components/nav.js +0 -2
  400. package/dist/components/preset-bar.config.d.ts +0 -2
  401. package/dist/components/preset-bar.config.js +0 -2
  402. package/dist/components/preset-bar.d.ts +0 -2
  403. package/dist/components/preset-bar.js +0 -2
  404. package/dist/components/presets/index.d.ts +0 -44
  405. package/dist/components/presets/index.js +0 -44
  406. package/dist/components/pressable.d.ts +0 -2
  407. package/dist/components/pressable.js +0 -2
  408. package/dist/components/progress.config.d.ts +0 -2
  409. package/dist/components/progress.config.js +0 -2
  410. package/dist/components/progress.d.ts +0 -2
  411. package/dist/components/progress.js +0 -2
  412. package/dist/components/section.d.ts +0 -2
  413. package/dist/components/section.js +0 -2
  414. package/dist/components/select.config.d.ts +0 -2
  415. package/dist/components/select.config.js +0 -2
  416. package/dist/components/select.d.ts +0 -2
  417. package/dist/components/select.js +0 -2
  418. package/dist/components/sheet.config.d.ts +0 -2
  419. package/dist/components/sheet.config.js +0 -2
  420. package/dist/components/sheet.d.ts +0 -2
  421. package/dist/components/sheet.js +0 -2
  422. package/dist/components/sidebar.config.d.ts +0 -2
  423. package/dist/components/sidebar.config.js +0 -2
  424. package/dist/components/sidebar.d.ts +0 -2
  425. package/dist/components/sidebar.js +0 -2
  426. package/dist/components/skeleton.config.d.ts +0 -2
  427. package/dist/components/skeleton.config.js +0 -2
  428. package/dist/components/skeleton.d.ts +0 -2
  429. package/dist/components/skeleton.js +0 -2
  430. package/dist/components/slider.config.d.ts +0 -2
  431. package/dist/components/slider.config.js +0 -2
  432. package/dist/components/slider.d.ts +0 -2
  433. package/dist/components/slider.js +0 -2
  434. package/dist/components/spinner.config.d.ts +0 -2
  435. package/dist/components/spinner.config.js +0 -2
  436. package/dist/components/spinner.d.ts +0 -2
  437. package/dist/components/spinner.js +0 -2
  438. package/dist/components/svg.d.ts +0 -2
  439. package/dist/components/svg.js +0 -2
  440. package/dist/components/switch.config.d.ts +0 -2
  441. package/dist/components/switch.config.js +0 -2
  442. package/dist/components/switch.d.ts +0 -2
  443. package/dist/components/switch.js +0 -2
  444. package/dist/components/table.d.ts +0 -2
  445. package/dist/components/table.js +0 -2
  446. package/dist/components/tabs.config.d.ts +0 -2
  447. package/dist/components/tabs.config.js +0 -2
  448. package/dist/components/tabs.d.ts +0 -2
  449. package/dist/components/tabs.js +0 -2
  450. package/dist/components/text.config.d.ts +0 -2
  451. package/dist/components/text.config.js +0 -2
  452. package/dist/components/text.d.ts +0 -2
  453. package/dist/components/text.js +0 -2
  454. package/dist/components/textarea.config.d.ts +0 -2
  455. package/dist/components/textarea.config.js +0 -2
  456. package/dist/components/textarea.d.ts +0 -2
  457. package/dist/components/textarea.js +0 -2
  458. package/dist/components/toast.config.d.ts +0 -2
  459. package/dist/components/toast.config.js +0 -2
  460. package/dist/components/toast.d.ts +0 -2
  461. package/dist/components/toast.js +0 -2
  462. package/dist/components/tooltip.config.d.ts +0 -2
  463. package/dist/components/tooltip.config.js +0 -2
  464. package/dist/components/tooltip.d.ts +0 -2
  465. package/dist/components/tooltip.js +0 -2
  466. package/dist/components/vstack.d.ts +0 -2
  467. package/dist/components/vstack.js +0 -2
  468. package/dist/config/dist/component-resolution.js +0 -78
  469. package/dist/config/dist/consts/defaultColors.d.ts +0 -253
  470. package/dist/config/dist/consts/defaultColors.js +0 -252
  471. package/dist/config/dist/createComponent.d.ts +0 -1
  472. package/dist/config/dist/createComponent.js +0 -1
  473. package/dist/config/dist/preset-merge.js +0 -192
  474. package/dist/config/dist/propertyGroups.d.ts +0 -1
  475. package/dist/config/dist/propertyGroups.js +0 -414
  476. package/dist/config/dist/resolveTokenTypes.d.ts +0 -1
  477. package/dist/config/dist/resolveTokenTypes.js +0 -149
  478. package/dist/config-utils/dist/componentConfig.d.ts +0 -10
  479. package/dist/config-utils/dist/componentConfig.js +0 -11
  480. package/dist/config-utils.d.ts +0 -2
  481. package/dist/config-utils.js +0 -2
  482. package/dist/core/dist/color-opacity-map.js +0 -33
  483. package/dist/core/dist/compositeStyles.d.ts +0 -22
  484. package/dist/core/dist/compositeStyles.js +0 -51
  485. package/dist/core/dist/configurable-prop-helpers.d.ts +0 -32
  486. package/dist/core/dist/configurable-prop-helpers.js +0 -61
  487. package/dist/core/dist/createComponent.boundaries.js +0 -192
  488. package/dist/core/dist/createComponent.d.ts +0 -57
  489. package/dist/core/dist/createComponent.js +0 -67
  490. package/dist/core/dist/createComponentExample.d.ts +0 -42
  491. package/dist/core/dist/createComponentExample.js +0 -27
  492. package/dist/core/dist/createProvider.d.ts +0 -13
  493. package/dist/core/dist/createProvider.js +0 -24
  494. package/dist/core/dist/generated/stylePropsTwMap.d.ts +0 -1701
  495. package/dist/core/dist/generated/stylePropsTwMap.js +0 -570
  496. package/dist/core/dist/getComponentStyles.d.ts +0 -50
  497. package/dist/core/dist/getComponentStyles.js +0 -85
  498. package/dist/core/dist/getStyles.d.ts +0 -43
  499. package/dist/core/dist/getStyles.js +0 -300
  500. package/dist/core/dist/index.d.ts +0 -13
  501. package/dist/core/dist/index.js +0 -13
  502. package/dist/core/dist/modifier-mappings.d.ts +0 -13
  503. package/dist/core/dist/modifier-mappings.js +0 -61
  504. package/dist/core/dist/resolveMotionState.d.ts +0 -5
  505. package/dist/core/dist/resolveMotionState.js +0 -17
  506. package/dist/core/dist/resolveProps.boundaries.js +0 -131
  507. package/dist/core/dist/style-prop-data.d.ts +0 -33
  508. package/dist/core/dist/style-prop-data.js +0 -1257
  509. package/dist/core/dist/transformPreset.d.ts +0 -18
  510. package/dist/core/dist/transformPreset.js +0 -28
  511. package/dist/core/dist/withDefaultStyleProps.d.ts +0 -44
  512. package/dist/core/dist/withDefaultStyleProps.js +0 -18
  513. package/dist/core.d.ts +0 -14
  514. package/dist/core.js +0 -15
  515. package/dist/createSlot.d.ts +0 -2
  516. package/dist/createSlot.js +0 -2
  517. package/dist/fixtures.d.ts +0 -4
  518. package/dist/fixtures.js +0 -5
  519. package/dist/foundational-presets/dist/_virtual/_rolldown/runtime.js +0 -13
  520. package/dist/foundational-presets/dist/defaultPreset.d.ts +0 -1558
  521. package/dist/foundational-presets/dist/defaultPreset.js +0 -615
  522. package/dist/foundational-presets/dist/index.d.ts +0 -1
  523. package/dist/foundational-presets/dist/index.js +0 -1
  524. package/dist/foundational-presets/dist/motion.d.ts +0 -13
  525. package/dist/foundational-presets/dist/motion.js +0 -10
  526. package/dist/foundational-presets/dist/style-props.js +0 -1445
  527. package/dist/loader/dist/loader/create-component-data.js +0 -33
  528. package/dist/loader/dist/loader/create-component-lowering.js +0 -454
  529. package/dist/loader/dist/loader/data-attr-transform.js +0 -191
  530. package/dist/loader/dist/loader/dynamic-style-codegen.js +0 -97
  531. package/dist/loader/dist/loader/motion-transform.js +0 -717
  532. package/dist/loader/dist/loader/style-transform.js +0 -670
  533. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -203
  534. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -25
  535. package/dist/loader/dist/node_modules/react/cjs/react.development.js +0 -762
  536. package/dist/loader/dist/node_modules/react/cjs/react.production.js +0 -351
  537. package/dist/loader/dist/node_modules/react/index.js +0 -10
  538. package/dist/loader/dist/node_modules/react/jsx-runtime.js +0 -10
  539. package/dist/loader/dist/packages/core/dist/color-opacity-map.js +0 -33
  540. package/dist/loader/dist/packages/core/dist/compositeStyles.js +0 -43
  541. package/dist/loader/dist/packages/core/dist/createComponent.js +0 -6
  542. package/dist/loader/dist/packages/core/dist/createProvider.js +0 -7
  543. package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +0 -570
  544. package/dist/loader/dist/packages/core/dist/getComponentStyles.js +0 -2
  545. package/dist/loader/dist/packages/core/dist/getStyles.js +0 -60
  546. package/dist/loader/dist/packages/core/dist/index.js +0 -6
  547. package/dist/loader/dist/packages/core/dist/modifier-mappings.js +0 -61
  548. package/dist/loader/dist/packages/core/dist/style-prop-data.js +0 -1257
  549. package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +0 -1
  550. package/dist/presets/dist/defaultPreset.d.ts +0 -6
  551. package/dist/presets/dist/defaultPreset.js +0 -51
  552. package/dist/presets/dist/index.d.ts +0 -1
  553. package/dist/presets/dist/index.js +0 -1
  554. package/dist/presets/motion.d.ts +0 -2
  555. package/dist/presets/motion.js +0 -2
  556. package/dist/presets.d.ts +0 -2
  557. package/dist/presets.js +0 -3
  558. package/dist/styles.d.ts +0 -4
  559. package/dist/styles.js +0 -5
  560. package/dist/transformPreset.d.ts +0 -2
  561. package/dist/transformPreset.js +0 -3
  562. /package/dist/{config/dist/component-resolution.d.ts → loader/dist/transform-runner.d.ts} +0 -0
@@ -1,15 +1,11 @@
1
1
  import { kebabCase } from "../../utils/dist/string-utils/kebabCase.js";
2
2
  import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
3
3
  import "../../utils/dist/index.js";
4
- import { getConfigurablePropMapping } from "../../core/dist/configurable-prop-helpers.js";
5
- import "../../core/dist/index.js";
6
- import { buildMotionReference, resolveComponentMotionAliases, validateComponentVariants } from "./component-resolution.js";
7
- import { resolveTokenType, sniffTokenTypeFromValue } from "./resolveTokenTypes.js";
4
+ import { sniffTokenTypeFromValue } from "./sniffTokenType.js";
8
5
  import { resolveStyleProp } from "./resolveStyleProp.js";
9
- import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
10
- import { setRegisteredStyleProps } from "./runtime-registry.js";
6
+ import { mergeAtomic } from "./merge-utils.js";
7
+ import { setRegisteredComposites, setRegisteredStyleProps } from "./runtime-registry.js";
11
8
  //#region ../config/dist/createConfig.js
12
- /** biome-ignore-all lint/suspicious/noExplicitAny: necessary for dynamic builder to work correctly */
13
9
  /**
14
10
  * Convert the authored object-keyed input into the internal `ModeGroup[]` shape.
15
11
  * Derives `_${optionKey}` modifiers when no explicit `modifier` is provided.
@@ -43,7 +39,7 @@ function convertModesInputToGroups(input) {
43
39
  function buildTokenReference(atomic, configPrefix) {
44
40
  const result = Object.create(null);
45
41
  for (const token of atomic) {
46
- const varPrefix = token.cssPrefix ?? getConfigurablePropMapping(token.properties[0])?.defaultVarPrefix;
42
+ const varPrefix = token.cssPrefix ?? token.properties[0];
47
43
  const tokenEntries = Object.create(null);
48
44
  for (const t of token.tokens) {
49
45
  const safeName = safeTokenName(t.name);
@@ -95,27 +91,6 @@ function resolveCompositeRefsInSelector(selector, compositeStyles) {
95
91
  });
96
92
  }
97
93
  /**
98
- * Migrate legacy `macros` JSON (the pre-rename shape) into the new
99
- * `compositeStyles` shape. Each old key (`elevation`) becomes a `{ label,
100
- * styles }` def so older serialized configs (in `uds.config.json`,
101
- * `draft_base_configs.baseConfig`) keep loading until they're rewritten.
102
- *
103
- * Returns `undefined` when no legacy data is present so callers can chain
104
- * a fallback (`?? {}`).
105
- */
106
- function upgradeLegacyMacros(legacy) {
107
- if (!legacy || typeof legacy !== "object") return void 0;
108
- const out = {};
109
- for (const [name, variants] of Object.entries(legacy)) {
110
- if (!variants || typeof variants !== "object") continue;
111
- out[name] = {
112
- label: name,
113
- styles: variants
114
- };
115
- }
116
- return Object.keys(out).length > 0 ? out : void 0;
117
- }
118
- /**
119
94
  * Convert a VarGroupDef into AtomicToken tokens, extracting modifier overrides.
120
95
  *
121
96
  * Also extracts group-level metadata:
@@ -129,15 +104,10 @@ function varGroupToTokens(varGroup, knownModifiers) {
129
104
  let groupType;
130
105
  let groupDescription;
131
106
  const tokens = [];
107
+ for (const [tokenName, rawDef] of Object.entries(varGroup)) if (tokenName === "$type" && typeof rawDef === "string") groupType = rawDef;
108
+ else if (tokenName === "$description" && typeof rawDef === "string") groupDescription = rawDef;
132
109
  for (const [tokenName, rawDef] of Object.entries(varGroup)) {
133
- if (tokenName === "$type") {
134
- if (typeof rawDef === "string") groupType = rawDef;
135
- continue;
136
- }
137
- if (tokenName === "$description") {
138
- if (typeof rawDef === "string") groupDescription = rawDef;
139
- continue;
140
- }
110
+ if (tokenName === "$type" || tokenName === "$description") continue;
141
111
  if (rawDef == null || typeof rawDef !== "object") continue;
142
112
  const tokenDef = rawDef;
143
113
  const modifiers = {};
@@ -145,10 +115,16 @@ function varGroupToTokens(varGroup, knownModifiers) {
145
115
  if (key === "value" || key === "$type" || val === void 0) continue;
146
116
  if (key.startsWith("_") && knownModifiers.has(key)) modifiers[key] = val;
147
117
  }
118
+ const value = tokenDef.value;
119
+ let perTokenType = tokenDef.$type;
120
+ if (!perTokenType && groupType && typeof value === "string") {
121
+ const sniffed = sniffTokenTypeFromValue(value);
122
+ if (sniffed && sniffed !== groupType) perTokenType = sniffed;
123
+ }
148
124
  tokens.push({
149
125
  name: tokenName,
150
- value: tokenDef.value,
151
- ...tokenDef.$type ? { type: tokenDef.$type } : {},
126
+ value,
127
+ ...perTokenType ? { type: perTokenType } : {},
152
128
  ...Object.keys(modifiers).length > 0 ? { modifiers } : {}
153
129
  });
154
130
  }
@@ -168,7 +144,6 @@ function varGroupToTokens(varGroup, knownModifiers) {
168
144
  function buildNamespaceConsumers(styleProps) {
169
145
  const result = /* @__PURE__ */ new Map();
170
146
  if (!styleProps) return result;
171
- const refRe = /^\{([^.{}]+)/;
172
147
  const addConsumer = (namespace, propName) => {
173
148
  const list = result.get(namespace);
174
149
  if (!list) {
@@ -177,14 +152,17 @@ function buildNamespaceConsumers(styleProps) {
177
152
  }
178
153
  if (!list.includes(propName)) list.push(propName);
179
154
  };
155
+ const namespaceOf = (entry) => {
156
+ if (typeof entry === "object" && entry !== null && entry.__kind === "tokenGroup" && typeof entry.group === "string") {
157
+ const group = entry.group;
158
+ const slash = group.indexOf("/");
159
+ return slash > 0 ? group.slice(0, slash) : group;
160
+ }
161
+ if (typeof entry === "object" && entry !== null && "ref" in entry && typeof entry.ref === "object") return namespaceOf(entry.ref);
162
+ };
180
163
  for (const [propName, prop] of Object.entries(styleProps)) for (const entry of prop.values ?? []) {
181
- let raw;
182
- if (typeof entry === "string") raw = entry;
183
- else if (entry !== null && typeof entry === "object" && "ref" in entry && typeof entry.ref === "string") raw = entry.ref;
184
- if (!raw) continue;
185
- const match = refRe.exec(raw);
186
- if (!match || !match[1]) continue;
187
- addConsumer(match[1], propName);
164
+ const ns = namespaceOf(entry);
165
+ if (ns) addConsumer(ns, propName);
188
166
  }
189
167
  return result;
190
168
  }
@@ -205,17 +183,12 @@ function synthesizeAtomicFromVarsAndStyleProps(vars, styleProps, modes) {
205
183
  const { tokens, groupType, groupDescription } = varGroupToTokens(varGroup, knownModifiers);
206
184
  const properties = consumers.get(namespace) ?? [];
207
185
  const cssPfx = kebabCase(namespace);
208
- const resolvedGroupType = resolveTokenType({ explicit: groupType });
209
- if (resolvedGroupType && resolvedGroupType !== "string") for (const token of tokens) {
210
- if (token.type) continue;
211
- if (sniffTokenTypeFromValue(token.value) === "string") token.type = "string";
212
- }
213
186
  result.push({
214
187
  properties,
215
188
  tokens,
216
189
  namespace,
217
190
  cssPrefix: cssPfx,
218
- ...resolvedGroupType ? { type: resolvedGroupType } : {},
191
+ ...groupType ? { type: groupType } : {},
219
192
  ...groupDescription ? { description: groupDescription } : {}
220
193
  });
221
194
  }
@@ -228,10 +201,10 @@ function resolveConfig(config) {
228
201
  else configData = {
229
202
  modes: config.modes ?? [],
230
203
  modifiers: config.modifiers ?? [],
231
- atomic: config.atomic ?? [],
232
- compositeStyles: config.compositeStyles ?? upgradeLegacyMacros(config.macros) ?? {},
204
+ atomic: [],
205
+ compositeStyles: config.compositeStyles ?? {},
233
206
  motion: config.motion ?? {},
234
- components: config.components ?? {},
207
+ components: {},
235
208
  globalStyles: config.globalStyles ?? {},
236
209
  preflight: config.preflight ?? true,
237
210
  prefix: config.prefix ?? "uds",
@@ -239,7 +212,6 @@ function resolveConfig(config) {
239
212
  examples: config.examples,
240
213
  designPrinciples: config.designPrinciples,
241
214
  vars: config.vars,
242
- presetTokenNames: config.presetTokenNames,
243
215
  styleProps: config.styleProps
244
216
  };
245
217
  if (configData.vars) {
@@ -260,89 +232,10 @@ function resolveConfig(config) {
260
232
  };
261
233
  }
262
234
  if (configData.styleProps) setRegisteredStyleProps(configData.styleProps);
235
+ if (configData.compositeStyles) setRegisteredComposites(configData.compositeStyles);
263
236
  }
264
237
  return configData;
265
238
  }
266
- function isComponentDefinition(input) {
267
- return typeof input === "object" && input !== null && "requiredTokens" in input && "components" in input;
268
- }
269
- function resolvePresetData(input) {
270
- if (isComponentDefinition(input)) return {
271
- modes: [],
272
- modifiers: [],
273
- atomic: [],
274
- compositeStyles: {},
275
- motion: input.motion ?? {},
276
- components: input.components,
277
- globalStyles: {},
278
- preflight: true,
279
- prefix: "uds"
280
- };
281
- if ("defineVars" in input) return resolveConfig(input);
282
- return {
283
- modes: input.modes ?? [],
284
- modifiers: input.modifiers ?? [],
285
- atomic: input.atomic ?? [],
286
- compositeStyles: input.compositeStyles ?? {},
287
- motion: input.motion ?? {},
288
- components: input.components ?? {},
289
- globalStyles: input.globalStyles ?? {},
290
- preflight: input.preflight ?? true,
291
- prefix: input.prefix ?? "uds",
292
- examples: input.examples,
293
- designPrinciples: input.designPrinciples,
294
- vars: input.vars,
295
- presetTokenNames: input.presetTokenNames
296
- };
297
- }
298
- function extractVarReferences(value) {
299
- if (typeof value !== "string") return [];
300
- return value.match(/var\([^()]+\)/g) ?? [];
301
- }
302
- function collectRequiredTokensFromObject(value, out) {
303
- if (value == null) return;
304
- if (typeof value === "string") {
305
- const refs = extractVarReferences(value);
306
- for (const ref of refs) out.add(ref);
307
- return;
308
- }
309
- if (Array.isArray(value)) {
310
- for (const item of value) collectRequiredTokensFromObject(item, out);
311
- return;
312
- }
313
- if (typeof value === "object") for (const child of Object.values(value)) collectRequiredTokensFromObject(child, out);
314
- }
315
- /**
316
- * Collect the set of `var(--uds-X-Y)` references a component preset uses, so
317
- * downstream `compose()` calls can verify the target config emits those
318
- * variables. Storing raw var refs (instead of `propName.tokenKey` pairs)
319
- * decouples the check from prop/namespace association lookups — only the
320
- * actual CSS variable surface needs to be compatible.
321
- */
322
- function collectRequiredTokens(_sourceData, components, motion) {
323
- const out = /* @__PURE__ */ new Set();
324
- collectRequiredTokensFromObject(components, out);
325
- if (motion) collectRequiredTokensFromObject(motion, out);
326
- return Array.from(out).sort();
327
- }
328
- function buildComponentsAccessor(components) {
329
- const accessor = {};
330
- for (const [name, config] of Object.entries(components)) {
331
- const comp = {};
332
- comp.base = { ...config.base?.root ?? {} };
333
- for (const [slot, styles] of Object.entries(config.base ?? {})) if (slot !== "root") comp.base[slot] = styles;
334
- if (config.variants) for (const [axis, values] of Object.entries(config.variants)) {
335
- const axisAcc = {};
336
- for (const [val, slots] of Object.entries(values)) {
337
- axisAcc[val] = { ...slots.root ?? {} };
338
- for (const [slot, styles] of Object.entries(slots)) if (slot !== "root") axisAcc[val][slot] = styles;
339
- }
340
- comp[axis] = axisAcc;
341
- }
342
- accessor[name] = comp;
343
- }
344
- return accessor;
345
- }
346
239
  function createConfigBuilder(data, extensions) {
347
240
  const next = (overrides = {}) => createConfigBuilder({
348
241
  ...data,
@@ -424,6 +317,51 @@ function createConfigBuilder(data, extensions) {
424
317
  }
425
318
  }, extensions);
426
319
  },
320
+ registerComposites(composites) {
321
+ const resolved = {};
322
+ for (const [name, value] of Object.entries(composites)) resolved[name] = {
323
+ label: value.label,
324
+ ...value.description !== void 0 ? { description: value.description } : {},
325
+ styles: value.styles
326
+ };
327
+ const allCompositeStyles = {
328
+ ...data.compositeStyles,
329
+ ...resolved
330
+ };
331
+ const edges = /* @__PURE__ */ new Map();
332
+ for (const [groupName, def] of Object.entries(allCompositeStyles)) {
333
+ const targets = /* @__PURE__ */ new Set();
334
+ for (const bag of Object.values(def.styles)) if (bag && typeof bag === "object") {
335
+ for (const key of Object.keys(bag)) if (key in allCompositeStyles) targets.add(key);
336
+ }
337
+ if (targets.size > 0) edges.set(groupName, targets);
338
+ }
339
+ const visited = /* @__PURE__ */ new Set();
340
+ const stack = /* @__PURE__ */ new Set();
341
+ const path = [];
342
+ function dfs(node) {
343
+ if (stack.has(node)) {
344
+ const cycleStart = path.indexOf(node);
345
+ throw new Error(`Circular composite style reference: ${[...path.slice(cycleStart), node].join(" → ")}`);
346
+ }
347
+ if (visited.has(node)) return;
348
+ visited.add(node);
349
+ stack.add(node);
350
+ path.push(node);
351
+ const neighbors = edges.get(node);
352
+ if (neighbors) for (const neighbor of neighbors) dfs(neighbor);
353
+ path.pop();
354
+ stack.delete(node);
355
+ }
356
+ for (const node of edges.keys()) dfs(node);
357
+ return createConfigBuilder({
358
+ ...data,
359
+ compositeStyles: {
360
+ ...data.compositeStyles,
361
+ ...resolved
362
+ }
363
+ }, extensions);
364
+ },
427
365
  registerStyleProps(props) {
428
366
  const expanded = {};
429
367
  for (const [propName, prop] of Object.entries(props)) {
@@ -433,7 +371,7 @@ function createConfigBuilder(data, extensions) {
433
371
  kind: "styleProp",
434
372
  cssProperty: prop.cssProperty,
435
373
  classPrefix: "",
436
- values: prop.opacityPair.values,
374
+ values: [prop.opacityPair.values],
437
375
  arbitrary: void 0,
438
376
  cssType: prop.cssType,
439
377
  metadata: { label: prop.metadata?.label ? `${prop.metadata.label} opacity` : void 0 },
@@ -453,8 +391,10 @@ function createConfigBuilder(data, extensions) {
453
391
  },
454
392
  registerComponents(configs) {
455
393
  const normalized = {};
394
+ const instances = {};
456
395
  for (const [name, entry] of Object.entries(configs)) {
457
- const config = typeof entry === "function" && "__config" in entry ? entry.__config : entry;
396
+ const isBound = typeof entry === "function" && "__config" in entry;
397
+ const config = isBound ? entry.__config : entry;
458
398
  Object.defineProperty(config, "__componentName", {
459
399
  enumerable: false,
460
400
  configurable: true,
@@ -462,10 +402,23 @@ function createConfigBuilder(data, extensions) {
462
402
  value: name
463
403
  });
464
404
  normalized[name] = config;
405
+ if (isBound) instances[name] = entry;
465
406
  }
466
- return next({ componentConfigs: {
467
- ...data.componentConfigs ?? {},
468
- ...normalized
407
+ return next({
408
+ components: {
409
+ ...data.components,
410
+ ...normalized
411
+ },
412
+ componentInstances: {
413
+ ...data.componentInstances ?? {},
414
+ ...instances
415
+ }
416
+ });
417
+ },
418
+ registerPreviews(previews) {
419
+ return next({ previews: {
420
+ ...data.previews ?? {},
421
+ ...previews
469
422
  } });
470
423
  },
471
424
  defineMotion(presets) {
@@ -479,24 +432,6 @@ function createConfigBuilder(data, extensions) {
479
432
  }
480
433
  }, extensions);
481
434
  },
482
- defineComponents(params) {
483
- const tokenReference = buildTokenReference(data.atomic, data.prefix);
484
- const motionReference = buildMotionReference(data.motion);
485
- const componentsAccessor = buildComponentsAccessor(data.components);
486
- const newComponents = resolveComponentMotionAliases(typeof params === "function" ? params({
487
- tokens: tokenReference,
488
- motion: motionReference,
489
- components: componentsAccessor
490
- }) : params, data.motion);
491
- validateComponentVariants(newComponents);
492
- const mergedComponents = { ...data.components };
493
- for (const [name, def] of Object.entries(newComponents)) {
494
- const existing = mergedComponents[name];
495
- if (existing && typeof existing === "object" && typeof def === "object") mergedComponents[name] = deepMerge(existing, def);
496
- else mergedComponents[name] = def;
497
- }
498
- return next({ components: mergedComponents });
499
- },
500
435
  defineGlobalStyles(params) {
501
436
  const tokenReference = buildTokenReference(data.atomic, data.prefix);
502
437
  const newGlobalStyles = typeof params === "function" ? params(tokenReference) : params;
@@ -508,63 +443,6 @@ function createConfigBuilder(data, extensions) {
508
443
  defineDesignPrinciples(principles) {
509
444
  return next({ designPrinciples: [...data.designPrinciples ?? [], ...principles] });
510
445
  },
511
- defineExample(name, examples) {
512
- const componentConfig = data.components[name];
513
- if (!componentConfig) throw new Error(`defineExample: component "${name}" not found. Available components: ${Object.keys(data.components).join(", ")}`);
514
- const variantAxes = Object.keys(componentConfig.variants ?? {});
515
- for (const [exampleKey, entry] of Object.entries(examples)) if (entry.each && !variantAxes.includes(entry.each)) throw new Error(`defineExample: "${name}" example "${exampleKey}" references unknown variant axis "${entry.each}". Available axes: ${variantAxes.join(", ") || "(none)"}`);
516
- return next({ examples: {
517
- ...data.examples,
518
- [name]: examples
519
- } });
520
- },
521
- compose(...presets) {
522
- return createConfigBuilder(presets.reduce((acc, preset) => {
523
- return applyPresetToData(acc, resolvePresetData(preset));
524
- }, data), extensions);
525
- },
526
- defineComponent(name, component, motion) {
527
- const tokenReference = buildTokenReference(data.atomic, data.prefix);
528
- const resolvedMotion = typeof motion === "function" ? motion(tokenReference) : motion;
529
- const motionReference = buildMotionReference({
530
- ...data.motion,
531
- ...resolvedMotion ?? {}
532
- });
533
- const componentsAccessor = buildComponentsAccessor(data.components);
534
- const inputComponent = typeof component === "function" ? component({
535
- tokens: tokenReference,
536
- motion: motionReference,
537
- components: componentsAccessor
538
- }) : component;
539
- const resolvedComponents = resolveComponentMotionAliases({ [name]: inputComponent }, {
540
- ...data.motion,
541
- ...resolvedMotion ?? {}
542
- });
543
- validateComponentVariants(resolvedComponents);
544
- return {
545
- name,
546
- requiredTokens: collectRequiredTokens(data, resolvedComponents, resolvedMotion),
547
- components: resolvedComponents,
548
- motion: resolvedMotion
549
- };
550
- },
551
- from(input) {
552
- return createConfigBuilder({
553
- modes: input.modes ?? data.modes,
554
- modifiers: input.modifiers ?? data.modifiers,
555
- atomic: input.atomic ?? data.atomic,
556
- compositeStyles: input.compositeStyles ?? data.compositeStyles,
557
- motion: input.motion ?? data.motion,
558
- components: input.components ?? data.components,
559
- globalStyles: input.globalStyles ?? data.globalStyles,
560
- preflight: input.preflight ?? data.preflight,
561
- prefix: input.prefix ?? data.prefix,
562
- examples: input.examples ?? data.examples,
563
- designPrinciples: input.designPrinciples ?? data.designPrinciples,
564
- vars: input.vars ?? data.vars,
565
- presetTokenNames: input.presetTokenNames ?? data.presetTokenNames
566
- }, extensions);
567
- },
568
446
  extend(ext) {
569
447
  return createConfigBuilder(data, {
570
448
  ...extensions,
@@ -0,0 +1,35 @@
1
+ import { UdsConfigData } from "./createConfig.js";
2
+
3
+ //#region ../config/dist/createStyler.d.ts
4
+ //#region src/createStyler.d.ts
5
+ /**
6
+ * A styler bound to a resolved config's style-prop registry. Takes a
7
+ * props object and returns the className string. Empty string when
8
+ * no prop matches a registered style prop.
9
+ */
10
+ type Styler = (props: Record<string, unknown>) => string;
11
+ /**
12
+ * Bind a styler to a resolved config. Reads the registered style-
13
+ * prop registry once; the returned function does just per-call
14
+ * className composition.
15
+ *
16
+ * // codegen / build pipeline
17
+ * const getStyles = createStyler(resolveConfig(udsBuilder));
18
+ * for (const site of scannedJsxSites) {
19
+ * const merged = mergeComponentDefaults(site.config, site.props);
20
+ * safelist.add(getStyles(merged));
21
+ * }
22
+ *
23
+ * `resolvedConfig` is the output of `resolveConfig(udsBuilder)`. The
24
+ * styler closes over the registry under either of two fields:
25
+ *
26
+ * - `resolvedStyleProps` — the canonical resolved registry the
27
+ * codegen + runtime consume; entries carry `propName` +
28
+ * `classPrefix`.
29
+ * - `styleProps` — fallback to the unresolved map when
30
+ * `resolvedStyleProps` isn't populated (test configs that skip
31
+ * the full resolver).
32
+ */
33
+ declare function createStyler(resolvedConfig: UdsConfigData): Styler; //#endregion
34
+ //#endregion
35
+ export { Styler, createStyler };
@@ -0,0 +1,93 @@
1
+ import { buildStylePropClassName } from "./className.js";
2
+ //#region ../config/dist/createStyler.js
3
+ /**
4
+ * **NEW-API ONLY** — factory that produces a styler bound to a
5
+ * resolved config's registered style props. The returned function
6
+ * takes a props object and returns the className string for those
7
+ * style-prop values.
8
+ *
9
+ * const getStyles = createStyler(resolveConfig(udsBuilder));
10
+ * getStyles({ bg: 'brand', gap: '4' });
11
+ * // → 'bg-brand gap-4'
12
+ *
13
+ * Parity with the legacy `getStyles` from `@uds/core`, but the lookup
14
+ * is sourced from the user's `.registerStyleProps({...})` registry
15
+ * (via `resolveConfig`) instead of `@uds/core`'s hardcoded
16
+ * `propMappings` table. Registering a style prop is enough to make
17
+ * it work — no edits to `@uds/core`.
18
+ *
19
+ * Used by:
20
+ *
21
+ * - `@uds/codegen/css/extractClasses` (build-time CSS scanner) —
22
+ * populates the Tailwind safelist with every class the runtime
23
+ * can produce. The scanner walks JSX call sites, merges the
24
+ * component's `defaultProps` into the JSX props, and passes the
25
+ * merged shape here.
26
+ * - Custom tooling that wants "what would the runtime render?"
27
+ * without going through React.
28
+ *
29
+ * Both the styler and `bindRender` (the runtime) call the same
30
+ * `buildStylePropClassName` helper in `./className.ts` — that's the
31
+ * load-bearing invariant: identical class strings for the same
32
+ * inputs.
33
+ *
34
+ * Scope: only style-prop bindings the user registered. Markers
35
+ * (`bool()` / `enums()`), `ForwardBinding`, compound variants, and
36
+ * `_<modifier>` props don't flow through here — they're handled by
37
+ * codegen via dedicated emission paths (component-utility classes,
38
+ * modifier-prefixed @utility blocks).
39
+ */
40
+ /**
41
+ * Bind a styler to a resolved config. Reads the registered style-
42
+ * prop registry once; the returned function does just per-call
43
+ * className composition.
44
+ *
45
+ * // codegen / build pipeline
46
+ * const getStyles = createStyler(resolveConfig(udsBuilder));
47
+ * for (const site of scannedJsxSites) {
48
+ * const merged = mergeComponentDefaults(site.config, site.props);
49
+ * safelist.add(getStyles(merged));
50
+ * }
51
+ *
52
+ * `resolvedConfig` is the output of `resolveConfig(udsBuilder)`. The
53
+ * styler closes over the registry under either of two fields:
54
+ *
55
+ * - `resolvedStyleProps` — the canonical resolved registry the
56
+ * codegen + runtime consume; entries carry `propName` +
57
+ * `classPrefix`.
58
+ * - `styleProps` — fallback to the unresolved map when
59
+ * `resolvedStyleProps` isn't populated (test configs that skip
60
+ * the full resolver).
61
+ */
62
+ function createStyler(resolvedConfig) {
63
+ const classPrefixByPropName = buildClassPrefixLookup(resolvedConfig);
64
+ return (props) => classNameFor(props, classPrefixByPropName);
65
+ }
66
+ /**
67
+ * Per-styler resolved style-prop lookup. Keys are JSX-prop names
68
+ * (e.g. `bg`, `padding`); values are the `classPrefix` the style
69
+ * prop registered with.
70
+ *
71
+ * `resolvedStyleProps` (the canonical shape) takes precedence;
72
+ * `styleProps` (the unresolved map) is consulted only when a prop
73
+ * isn't already present — that keeps test configs that skip the
74
+ * full resolver working without overriding the canonical entries.
75
+ */
76
+ function buildClassPrefixLookup(config) {
77
+ const out = {};
78
+ for (const entry of config.resolvedStyleProps ?? []) if (entry.propName) out[entry.propName] = entry.classPrefix ?? "";
79
+ for (const [propName, styleProp] of Object.entries(config.styleProps ?? {})) if (!(propName in out)) out[propName] = styleProp.classPrefix ?? "";
80
+ return out;
81
+ }
82
+ function classNameFor(props, classPrefixByPropName) {
83
+ const classNames = [];
84
+ for (const [propName, value] of Object.entries(props)) {
85
+ const classPrefix = classPrefixByPropName[propName];
86
+ if (classPrefix === void 0) continue;
87
+ const className = buildStylePropClassName({ classPrefix }, value);
88
+ if (className) classNames.push(className);
89
+ }
90
+ return classNames.join(" ");
91
+ }
92
+ //#endregion
93
+ export { createStyler };