@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
@@ -0,0 +1,85 @@
1
+ import { TokenMarker } from "./component-config.js";
2
+
3
+ //#region ../config/dist/refs.d.ts
4
+ //#region src/refs.d.ts
5
+ /**
6
+ * Resolve a token value to its CSS form. `TokenMarker` from
7
+ * `token('ns/name')` becomes `var(--<prefix>-<ns>-<name>)`; string
8
+ * literals pass through unchanged.
9
+ *
10
+ * The CSS variable name follows `defineVars`'s `:root` declaration
11
+ * convention: `kebabCase` on the namespace, `safeTokenName` on the
12
+ * token name.
13
+ */
14
+ declare function resolveTokenValue(value: string | TokenMarker, configPrefix: string | undefined): string;
15
+ /**
16
+ * Object marker emitted by `darken()` / `lighten()` helpers. Codegen
17
+ * detects this shape on a per-value basis and resolves the inner
18
+ * `$token` to `var(--<prefix>-<ns>-<name>)`, then applies the modifier.
19
+ *
20
+ * Authored solely via the `darken` / `lighten` helpers — the object
21
+ * shape is internal and not meant to be hand-written. Serializes
22
+ * cleanly through JSON.stringify (unlike the legacy inline-string
23
+ * modifier syntax which the regex parser flagged as polynomial under
24
+ * adversarial input).
25
+ */
26
+ interface TokenWithModifier {
27
+ /** Brace-stripped token ref, e.g. `'bg/brand'`. */
28
+ readonly $token: string;
29
+ readonly $modifier: {
30
+ readonly type: 'darken' | 'lighten'; /** Mix percentage, e.g. `10` → `10%`. */
31
+ readonly amount: number;
32
+ };
33
+ }
34
+ /**
35
+ * Type-guard: a value is a `TokenWithModifier` marker.
36
+ */
37
+ declare function isTokenWithModifier(value: unknown): value is TokenWithModifier;
38
+ /**
39
+ * Resolve a `TokenWithModifier` marker to its CSS value:
40
+ * - `darken(N)` → `color-mix(in oklch, var(...), light-dark(black, white) N%)`
41
+ * - `lighten(N)` → `color-mix(in oklch, var(...), light-dark(white, black) N%)`
42
+ *
43
+ * Output matches the runtime helpers `darker` / `lighter` in
44
+ * `createConfig.ts` byte-for-byte so mechanical conversion of legacy
45
+ * callback-form components preserves compiled CSS.
46
+ */
47
+ declare function resolveTokenWithModifier(marker: TokenWithModifier, configPrefix: string | undefined): string;
48
+ /**
49
+ * Author-time helper that produces a darkened color-token reference for
50
+ * use in component-config style blocks. Takes a `TokenMarker` (from
51
+ * `token('ns/name')`) plus a mix amount, and returns a structured
52
+ * marker (`{ $token, $modifier }`) that codegen resolves at build
53
+ * time to:
54
+ *
55
+ * color-mix(in oklch, var(--<prefix>-<ns>-<name>),
56
+ * light-dark(black, white) <amount>%)
57
+ *
58
+ * defineComponent
59
+ * .layers({ root: 'div' })
60
+ * .config(({ enums, token }) => ({
61
+ * props: {
62
+ * variant: enums({
63
+ * brand: {
64
+ * root: {
65
+ * backgroundColor: token('bg/brand'),
66
+ * _hover: { backgroundColor: darken(token('bg/brand'), 10) },
67
+ * },
68
+ * },
69
+ * }),
70
+ * },
71
+ * }));
72
+ *
73
+ * The token reference stays portable across configs with different
74
+ * prefixes because the prefix is supplied at codegen time, not at
75
+ * author time.
76
+ */
77
+ declare function darken(ref: TokenMarker, amount: number): TokenWithModifier;
78
+ /**
79
+ * Author-time helper that produces a lightened color-token reference.
80
+ * Mirror of `darken()` — see its JSDoc. Resolves at codegen time to
81
+ * `color-mix(in oklch, var(--<prefix>-<ns>-<name>), light-dark(white, black) N%)`.
82
+ */
83
+ declare function lighten(ref: TokenMarker, amount: number): TokenWithModifier; //#endregion
84
+ //#endregion
85
+ export { TokenWithModifier, darken, isTokenWithModifier, lighten, resolveTokenValue, resolveTokenWithModifier };
@@ -3,13 +3,12 @@ import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
3
3
  import "../../utils/dist/index.js";
4
4
  //#region ../config/dist/refs.js
5
5
  /**
6
- * Token references `'{namespace/key}'` braces in token values.
7
- *
8
- * Authors can point one token at another via a brace-wrapped path:
6
+ * Token references inside `defineVars` token values + downstream CSS
7
+ * emission. Authors point one token at another via the `token()` helper:
9
8
  *
10
9
  * defineVars({
11
10
  * spectrum: { 'blue/500': { value: '#1167f4' } },
12
- * color: { brand: { value: '{spectrum/blue/500}' } },
11
+ * color: { brand: { value: token('spectrum/blue/500') } },
13
12
  * })
14
13
  *
15
14
  * At CSS-declaration time this expands to a CSS variable alias:
@@ -17,61 +16,107 @@ import "../../utils/dist/index.js";
17
16
  * --uds-spectrum-blue-500: #1167f4;
18
17
  * --uds-color-brand: var(--uds-spectrum-blue-500);
19
18
  *
20
- * Refs are a purely syntactic transform — no graph walk, no cycle
19
+ * Aliases are a purely syntactic transform — no graph walk, no cycle
21
20
  * detection. CSS handles aliasing (and any cascade cycles) at runtime.
22
- * Refs that don't match a declared token resolve to a `var(...)` that
23
- * has no `:root` declaration; the browser falls back to the property's
21
+ * Aliases pointing at unknown tokens resolve to a `var(...)` with no
22
+ * `:root` declaration; the browser falls back to the property's
24
23
  * initial value.
24
+ */
25
+ /**
26
+ * Resolve a token value to its CSS form. `TokenMarker` from
27
+ * `token('ns/name')` becomes `var(--<prefix>-<ns>-<name>)`; string
28
+ * literals pass through unchanged.
25
29
  *
26
- * Consumption is unchanged: `tokens.color.brand` in component configs
27
- * still resolves to `var(--uds-color-brand)`, regardless of whether the
28
- * brand value itself is a literal or a ref.
30
+ * The CSS variable name follows `defineVars`'s `:root` declaration
31
+ * convention: `kebabCase` on the namespace, `safeTokenName` on the
32
+ * token name.
29
33
  */
30
- const REF_PATTERN = /^\{([^{}]+)\}$/;
34
+ function resolveTokenValue(value, configPrefix) {
35
+ if (typeof value === "string") return value;
36
+ const ref = value.ref;
37
+ const slashIdx = ref.indexOf("/");
38
+ if (slashIdx <= 0 || slashIdx >= ref.length - 1) return ref;
39
+ return refToVar(ref.slice(0, slashIdx), ref.slice(slashIdx + 1), configPrefix);
40
+ }
41
+ function refToVar(namespace, name, configPrefix) {
42
+ const cssPrefix = kebabCase(namespace);
43
+ const cssName = safeTokenName(name);
44
+ return `var(${configPrefix ? `--${configPrefix}-${cssPrefix}-${cssName}` : `--${cssPrefix}-${cssName}`})`;
45
+ }
46
+ /**
47
+ * Type-guard: a value is a `TokenWithModifier` marker.
48
+ */
49
+ function isTokenWithModifier(value) {
50
+ return typeof value === "object" && value !== null && "$token" in value && "$modifier" in value;
51
+ }
31
52
  /**
32
- * Parse a value as a token ref. Returns `null` when the value isn't a
33
- * brace-wrapped ref of the form `{namespace/name}`. The `name` portion
34
- * may contain additional slashes only the first slash is treated as
35
- * the namespace separator.
53
+ * Resolve a `TokenWithModifier` marker to its CSS value:
54
+ * - `darken(N)` → `color-mix(in oklch, var(...), light-dark(black, white) N%)`
55
+ * - `lighten(N)` `color-mix(in oklch, var(...), light-dark(white, black) N%)`
36
56
  *
37
- * Color-modifier values (`darken` / `lighten`) are a structured object
38
- * form, not a string-encoded suffix. See {@link TokenWithModifier}.
57
+ * Output matches the runtime helpers `darker` / `lighter` in
58
+ * `createConfig.ts` byte-for-byte so mechanical conversion of legacy
59
+ * callback-form components preserves compiled CSS.
39
60
  */
40
- function parseTokenRef(value) {
41
- const outer = REF_PATTERN.exec(value);
42
- if (!outer) return null;
43
- const body = outer[1];
44
- if (!body) return null;
45
- return parseRefBody(body);
61
+ function resolveTokenWithModifier(marker, configPrefix) {
62
+ const slashIdx = marker.$token.indexOf("/");
63
+ if (slashIdx <= 0 || slashIdx >= marker.$token.length - 1) return marker.$token;
64
+ const resolved = refToVar(marker.$token.slice(0, slashIdx), marker.$token.slice(slashIdx + 1), configPrefix);
65
+ const amount = marker.$modifier.amount;
66
+ if (marker.$modifier.type === "darken") return `color-mix(in oklch, ${resolved}, light-dark(black, white) ${amount}%)`;
67
+ return `color-mix(in oklch, ${resolved}, light-dark(white, black) ${amount}%)`;
46
68
  }
47
- function parseRefBody(body) {
48
- if (body.includes("{") || body.includes("}")) return null;
49
- const slashIdx = body.indexOf("/");
50
- if (slashIdx <= 0 || slashIdx >= body.length - 1) return null;
69
+ /**
70
+ * Author-time helper that produces a darkened color-token reference for
71
+ * use in component-config style blocks. Takes a `TokenMarker` (from
72
+ * `token('ns/name')`) plus a mix amount, and returns a structured
73
+ * marker (`{ $token, $modifier }`) that codegen resolves at build
74
+ * time to:
75
+ *
76
+ * color-mix(in oklch, var(--<prefix>-<ns>-<name>),
77
+ * light-dark(black, white) <amount>%)
78
+ *
79
+ * defineComponent
80
+ * .layers({ root: 'div' })
81
+ * .config(({ enums, token }) => ({
82
+ * props: {
83
+ * variant: enums({
84
+ * brand: {
85
+ * root: {
86
+ * backgroundColor: token('bg/brand'),
87
+ * _hover: { backgroundColor: darken(token('bg/brand'), 10) },
88
+ * },
89
+ * },
90
+ * }),
91
+ * },
92
+ * }));
93
+ *
94
+ * The token reference stays portable across configs with different
95
+ * prefixes because the prefix is supplied at codegen time, not at
96
+ * author time.
97
+ */
98
+ function darken(ref, amount) {
51
99
  return {
52
- namespace: body.slice(0, slashIdx),
53
- name: body.slice(slashIdx + 1)
100
+ $token: ref.ref,
101
+ $modifier: {
102
+ type: "darken",
103
+ amount
104
+ }
54
105
  };
55
106
  }
56
107
  /**
57
- * Resolve a token value to its CSS form. If `value` is a token ref, returns
58
- * the corresponding `var(--<prefix>-<namespace>-<name>)` string. Otherwise
59
- * returns the value unchanged.
60
- *
61
- * The CSS variable name is built the same way `defineVars` builds its `:root`
62
- * declarations: `kebabCase` on the namespace, `safeTokenName` on the token
63
- * name. So `{spectrum/blue/500}` resolves to `var(--uds-spectrum-blue-500)`
64
- * (matching the namespace's own emitted variable name).
108
+ * Author-time helper that produces a lightened color-token reference.
109
+ * Mirror of `darken()` — see its JSDoc. Resolves at codegen time to
110
+ * `color-mix(in oklch, var(--<prefix>-<ns>-<name>), light-dark(white, black) N%)`.
65
111
  */
66
- function resolveTokenRef(value, configPrefix) {
67
- const ref = parseTokenRef(value);
68
- if (!ref) return value;
69
- return refToVar(ref.namespace, ref.name, configPrefix);
70
- }
71
- function refToVar(namespace, name, configPrefix) {
72
- const cssPrefix = kebabCase(namespace);
73
- const cssName = safeTokenName(name);
74
- return `var(${configPrefix ? `--${configPrefix}-${cssPrefix}-${cssName}` : `--${cssPrefix}-${cssName}`})`;
112
+ function lighten(ref, amount) {
113
+ return {
114
+ $token: ref.ref,
115
+ $modifier: {
116
+ type: "lighten",
117
+ amount
118
+ }
119
+ };
75
120
  }
76
121
  //#endregion
77
- export { parseTokenRef, resolveTokenRef };
122
+ export { darken, isTokenWithModifier, lighten, resolveTokenValue, resolveTokenWithModifier };
@@ -0,0 +1,65 @@
1
+ import { CompoundPropsEntry, HiddenMarker, LayerInput } from "./component-config.js";
2
+
3
+ //#region ../config/dist/resolveCompoundProps.d.ts
4
+ //#region src/resolveCompoundProps.d.ts
5
+ /**
6
+ * Per-layer entry on the resolved overrides map. Either a flat style/
7
+ * prop bag (for style overrides) or the hide marker. Downstream
8
+ * consumers can branch on `__kind === 'hidden'` to pick between
9
+ * `display: none` and stripping the layer from the rendered tree.
10
+ */
11
+ type ResolvedLayerOverride = HiddenMarker | Record<string, unknown>;
12
+ /**
13
+ * Per-layer map of overrides that should win at the given active-prop
14
+ * combination.
15
+ */
16
+ type ResolvedCompoundOverrides = Record<string, ResolvedLayerOverride>;
17
+ /**
18
+ * Find every `compoundProps` entry whose `when` clause is satisfied by
19
+ * the active props and merge them into a single per-layer override map.
20
+ *
21
+ * Conflict resolution:
22
+ * - For style-map overrides, per-property: higher `specificity(when)`
23
+ * wins; tie-break is later position in source order.
24
+ * - For a `hidden()` layer marker, the layer-level decision: most-
25
+ * specific hidden marker wins; tie-break is later source order. The
26
+ * marker takes precedence over style overrides at the same layer,
27
+ * since a hidden layer's styles are moot anyway.
28
+ *
29
+ * Returns an empty object when nothing matches — callers can treat it
30
+ * as a no-op without a separate `undefined` check.
31
+ */
32
+ declare function resolveCompoundProps<TLayers extends Record<string, LayerInput>, TProps extends Record<string, any> = Record<string, any>>(compoundProps: readonly CompoundPropsEntry<TLayers, TProps>[] | undefined, activeProps: Record<string, unknown>): ResolvedCompoundOverrides;
33
+ /**
34
+ * Fold a `resolveCompoundProps` result into an existing per-layer
35
+ * bundle of resolved style-prop values (the output of the enum/bool
36
+ * merge for the active prop combination).
37
+ *
38
+ * A `HiddenMarker` on a layer rewrites that layer's bundle to
39
+ * `{ __hidden: true }` — a sentinel the render fn checks at the JSX
40
+ * site to skip rendering the layer entirely, rather than emitting a
41
+ * `display: none` declaration that would leave a layout-occupying
42
+ * DOM node. Use {@link isLayerHidden} for the check:
43
+ *
44
+ * .render(({ props }) => (
45
+ * <a {...props.root}>
46
+ * {!isLayerHidden(props.endIcon) && <span {...props.endIcon} />}
47
+ * </a>
48
+ * ))
49
+ *
50
+ * Style-map overrides merge per-key into the existing bundle. The
51
+ * input bundles are not mutated — every layer that receives any
52
+ * override is copied first.
53
+ */
54
+ declare function applyCompoundProps(layerBundles: Record<string, Record<string, unknown>>, overrides: ResolvedCompoundOverrides): Record<string, Record<string, unknown>>;
55
+ /**
56
+ * Type guard used by render fns to skip rendering a hidden layer:
57
+ *
58
+ * {!isLayerHidden(props.endIcon) && <span {...props.endIcon} />}
59
+ *
60
+ * Returns `true` when the bundle carries the `__hidden: true`
61
+ * sentinel written by `applyCompoundProps`.
62
+ */
63
+ declare function isLayerHidden(bundle: Record<string, unknown> | undefined): boolean; //#endregion
64
+ //#endregion
65
+ export { ResolvedCompoundOverrides, ResolvedLayerOverride, applyCompoundProps, isLayerHidden, resolveCompoundProps };
@@ -0,0 +1,120 @@
1
+ //#region ../config/dist/resolveCompoundProps.js
2
+ function whenMatches(when, activeProps) {
3
+ for (const key in when) {
4
+ if (!Object.hasOwn(when, key)) continue;
5
+ if (activeProps[key] !== when[key]) return false;
6
+ }
7
+ return true;
8
+ }
9
+ function specificity(when) {
10
+ let count = 0;
11
+ for (const key in when) if (Object.hasOwn(when, key)) count++;
12
+ return count;
13
+ }
14
+ function isHiddenMarker(value) {
15
+ return typeof value === "object" && value !== null && value.__kind === "hidden";
16
+ }
17
+ /**
18
+ * Find every `compoundProps` entry whose `when` clause is satisfied by
19
+ * the active props and merge them into a single per-layer override map.
20
+ *
21
+ * Conflict resolution:
22
+ * - For style-map overrides, per-property: higher `specificity(when)`
23
+ * wins; tie-break is later position in source order.
24
+ * - For a `hidden()` layer marker, the layer-level decision: most-
25
+ * specific hidden marker wins; tie-break is later source order. The
26
+ * marker takes precedence over style overrides at the same layer,
27
+ * since a hidden layer's styles are moot anyway.
28
+ *
29
+ * Returns an empty object when nothing matches — callers can treat it
30
+ * as a no-op without a separate `undefined` check.
31
+ */
32
+ function resolveCompoundProps(compoundProps, activeProps) {
33
+ if (!compoundProps || compoundProps.length === 0) return {};
34
+ const styleResolved = {};
35
+ const stylePropSpecificity = {};
36
+ const hiddenSpecificity = {};
37
+ for (const entry of compoundProps) {
38
+ if (!whenMatches(entry.when, activeProps)) continue;
39
+ const entrySpecificity = specificity(entry.when);
40
+ for (const layerName in entry.layers) {
41
+ if (!Object.hasOwn(entry.layers, layerName)) continue;
42
+ const layerOverride = entry.layers[layerName];
43
+ if (!layerOverride) continue;
44
+ if (isHiddenMarker(layerOverride)) {
45
+ const prev = hiddenSpecificity[layerName];
46
+ if (prev === void 0 || entrySpecificity >= prev) hiddenSpecificity[layerName] = entrySpecificity;
47
+ continue;
48
+ }
49
+ const styleMap = layerOverride;
50
+ styleResolved[layerName] ??= {};
51
+ stylePropSpecificity[layerName] ??= {};
52
+ for (const propKey in styleMap) {
53
+ if (!Object.hasOwn(styleMap, propKey)) continue;
54
+ const prevSpecificity = stylePropSpecificity[layerName][propKey];
55
+ if (prevSpecificity === void 0 || entrySpecificity >= prevSpecificity) {
56
+ styleResolved[layerName][propKey] = styleMap[propKey];
57
+ stylePropSpecificity[layerName][propKey] = entrySpecificity;
58
+ }
59
+ }
60
+ }
61
+ }
62
+ const resolved = {};
63
+ for (const layerName in styleResolved) resolved[layerName] = styleResolved[layerName];
64
+ for (const layerName in hiddenSpecificity) resolved[layerName] = { __kind: "hidden" };
65
+ return resolved;
66
+ }
67
+ /**
68
+ * Fold a `resolveCompoundProps` result into an existing per-layer
69
+ * bundle of resolved style-prop values (the output of the enum/bool
70
+ * merge for the active prop combination).
71
+ *
72
+ * A `HiddenMarker` on a layer rewrites that layer's bundle to
73
+ * `{ __hidden: true }` — a sentinel the render fn checks at the JSX
74
+ * site to skip rendering the layer entirely, rather than emitting a
75
+ * `display: none` declaration that would leave a layout-occupying
76
+ * DOM node. Use {@link isLayerHidden} for the check:
77
+ *
78
+ * .render(({ props }) => (
79
+ * <a {...props.root}>
80
+ * {!isLayerHidden(props.endIcon) && <span {...props.endIcon} />}
81
+ * </a>
82
+ * ))
83
+ *
84
+ * Style-map overrides merge per-key into the existing bundle. The
85
+ * input bundles are not mutated — every layer that receives any
86
+ * override is copied first.
87
+ */
88
+ function applyCompoundProps(layerBundles, overrides) {
89
+ if (Object.keys(overrides).length === 0) return layerBundles;
90
+ const result = { ...layerBundles };
91
+ for (const layerName in overrides) {
92
+ if (!Object.hasOwn(overrides, layerName)) continue;
93
+ const override = overrides[layerName];
94
+ if (!override) continue;
95
+ if (isHiddenMarker(override)) {
96
+ result[layerName] = { __hidden: true };
97
+ continue;
98
+ }
99
+ const merged = { ...result[layerName] ?? {} };
100
+ for (const propKey in override) {
101
+ if (!Object.hasOwn(override, propKey)) continue;
102
+ merged[propKey] = override[propKey];
103
+ }
104
+ result[layerName] = merged;
105
+ }
106
+ return result;
107
+ }
108
+ /**
109
+ * Type guard used by render fns to skip rendering a hidden layer:
110
+ *
111
+ * {!isLayerHidden(props.endIcon) && <span {...props.endIcon} />}
112
+ *
113
+ * Returns `true` when the bundle carries the `__hidden: true`
114
+ * sentinel written by `applyCompoundProps`.
115
+ */
116
+ function isLayerHidden(bundle) {
117
+ return bundle?.__hidden === true;
118
+ }
119
+ //#endregion
120
+ export { applyCompoundProps, isLayerHidden, resolveCompoundProps };
@@ -1,5 +1,8 @@
1
1
  import { CssValueTypeName } from "./types/css-values.js";
2
2
  import { ArbitrarySpec, StylePropMetadata } from "./defineStyleProp.js";
3
+ import { TokenType } from "./types.js";
4
+ import { UdsConfigData } from "./createConfig.js";
5
+
3
6
  //#region ../config/dist/resolveStyleProp.d.ts
4
7
  //#region src/resolveStyleProp.d.ts
5
8
  interface ResolvedToken {
@@ -13,8 +16,8 @@ interface ResolvedToken {
13
16
  readonly group: string;
14
17
  /**
15
18
  * Style-prop-local namespace, set only when the token was sourced via a
16
- * {@link NamespacedGroupRef}. Used to disambiguate when two groups feed
17
- * the same prop and share keys.
19
+ * `NamespacedTokenGroup` (`{ ref: tokenGroup('X'), namespace: 'Y' }`).
20
+ * Used to disambiguate when two groups feed the same prop and share keys.
18
21
  */
19
22
  readonly namespace?: string;
20
23
  /**
@@ -84,5 +87,71 @@ interface ResolvedStyleProp {
84
87
  * resolver's signature doesn't expand `ValuesEntry<P>` over the full CSS
85
88
  * property union (TS2590).
86
89
  */
90
+ interface ResolveStylePropInput {
91
+ readonly kind?: 'styleProp';
92
+ readonly cssProperty: string | readonly string[];
93
+ readonly classPrefix: string;
94
+ readonly values?: readonly unknown[];
95
+ readonly arbitrary?: ArbitrarySpec;
96
+ readonly cssType?: CssValueTypeName;
97
+ readonly metadata?: StylePropMetadata;
98
+ }
99
+ /**
100
+ * Minimal input shapes for {@link detectTokenValueType} — see that
101
+ * function's docs for the algorithmic contract.
102
+ * `AtomicToken['tokens'][number]` and `AtomicToken` are structurally
103
+ * assignable to these, so codegen's existing call sites keep working
104
+ * unchanged.
105
+ */
106
+ interface DetectTokenValueTypeInput {
107
+ readonly value: string;
108
+ readonly type?: TokenType;
109
+ }
110
+ interface DetectTokenValueTypeGroup {
111
+ readonly type?: TokenType;
112
+ }
113
+ /**
114
+ * Detect a token's CSS value type. Resolution order:
115
+ * 1. Per-token `type` override.
116
+ * 2. Group-level `type`.
117
+ *
118
+ * When the resolved type is `'length-percentage'` and the raw value ends in
119
+ * `%`, narrow to `'percentage'`; otherwise narrow to `'length'`. When the
120
+ * resolved type is `'string'`, narrow shadow-like values to `'shadow'` and
121
+ * ratio-shaped values to `'ratio'`.
122
+ *
123
+ * Exported so Studio (and any other runtime consumer) can resolve a cell's
124
+ * effective `CssValueTypeName`.
125
+ *
126
+ * The input shapes ({@link DetectTokenValueTypeInput} /
127
+ * {@link DetectTokenValueTypeGroup}) are intentionally minimal: the resolver
128
+ * reads only `token.value`, `token.type`, and `group.type` — never walks
129
+ * `group.tokens`, never checks that `token` is inside `group`. Typing them
130
+ * as full `AtomicToken` would force trimmed-shape consumers (Studio's
131
+ * `TokenEntry`) to either round-trip back to the source group or `as`-assert
132
+ * past the type system.
133
+ */
134
+ declare function detectTokenValueType(token: DetectTokenValueTypeInput, group: DetectTokenValueTypeGroup): CssValueTypeName | undefined;
135
+ /**
136
+ * Resolve a style prop against the given resolved UDS config. Unknown group
137
+ * refs are silently dropped from `tokens` (callers can detect this by
138
+ * comparing input refs vs. resolved tokens if they need to surface a
139
+ * config-build warning).
140
+ *
141
+ * @param propName - The JSX prop name (the map key from `registerStyleProps`).
142
+ */
143
+ declare function resolveStyleProp(propName: string, styleProp: ResolveStylePropInput, config: UdsConfigData): ResolvedStyleProp;
144
+ /**
145
+ * Walk a resolved config's `resolvedStyleProps` and return the
146
+ * color-prop → opacity-sibling-prop map. Built from each opacity
147
+ * sibling's `pairedWith` field (set by the resolver when expanding a
148
+ * `.withOpacity({ as })` parent). Returns an empty object when no
149
+ * pairings exist.
150
+ *
151
+ * Replaces the legacy `colorPropToOpacityProp` table that lived in
152
+ * `@uds/core` — consumers (codegen safelist generation, runtime
153
+ * `getStyles`, loader style-transform) should call this instead.
154
+ */
155
+ declare function getColorOpacityMap(config: UdsConfigData): Record<string, string>; //#endregion
87
156
  //#endregion
88
- export { ResolvedStyleProp, ResolvedToken };
157
+ export { DetectTokenValueTypeGroup, DetectTokenValueTypeInput, ResolvedStyleProp, ResolvedToken, detectTokenValueType, getColorOpacityMap, resolveStyleProp };