@yahoo/uds-v5-wip 1.60.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 (563) 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 +29 -1
  53. package/dist/loader/dist/loader.js +71 -309
  54. package/dist/loader/dist/next.d.ts +2 -1
  55. package/dist/loader/dist/transform-runner.js +14 -0
  56. package/dist/loader/dist/unplugin.d.ts +27 -0
  57. package/dist/loader/dist/unplugin.js +52 -0
  58. package/dist/plugin.d.ts +2 -2
  59. package/dist/plugin.js +3 -2
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +3 -51
  62. package/dist/components/accordion.config.d.ts +0 -2
  63. package/dist/components/accordion.config.js +0 -2
  64. package/dist/components/accordion.d.ts +0 -2
  65. package/dist/components/accordion.js +0 -2
  66. package/dist/components/alert.config.d.ts +0 -2
  67. package/dist/components/alert.config.js +0 -2
  68. package/dist/components/alert.d.ts +0 -2
  69. package/dist/components/alert.js +0 -2
  70. package/dist/components/anchor.config.d.ts +0 -2
  71. package/dist/components/anchor.config.js +0 -2
  72. package/dist/components/anchor.d.ts +0 -2
  73. package/dist/components/anchor.js +0 -2
  74. package/dist/components/article.d.ts +0 -2
  75. package/dist/components/article.js +0 -2
  76. package/dist/components/aside.d.ts +0 -2
  77. package/dist/components/aside.js +0 -2
  78. package/dist/components/avatar-group.config.d.ts +0 -2
  79. package/dist/components/avatar-group.config.js +0 -2
  80. package/dist/components/avatar-group.d.ts +0 -2
  81. package/dist/components/avatar-group.js +0 -2
  82. package/dist/components/avatar.config.d.ts +0 -2
  83. package/dist/components/avatar.config.js +0 -2
  84. package/dist/components/avatar.d.ts +0 -2
  85. package/dist/components/avatar.js +0 -2
  86. package/dist/components/badge.config.d.ts +0 -2
  87. package/dist/components/badge.config.js +0 -2
  88. package/dist/components/badge.d.ts +0 -2
  89. package/dist/components/badge.js +0 -2
  90. package/dist/components/box.d.ts +0 -2
  91. package/dist/components/box.js +0 -2
  92. package/dist/components/breadcrumb.config.d.ts +0 -2
  93. package/dist/components/breadcrumb.config.js +0 -2
  94. package/dist/components/breadcrumb.d.ts +0 -2
  95. package/dist/components/breadcrumb.js +0 -2
  96. package/dist/components/button.config.d.ts +0 -2
  97. package/dist/components/button.config.js +0 -2
  98. package/dist/components/button.d.ts +0 -2
  99. package/dist/components/button.js +0 -2
  100. package/dist/components/card.config.d.ts +0 -2
  101. package/dist/components/card.config.js +0 -2
  102. package/dist/components/card.d.ts +0 -2
  103. package/dist/components/card.js +0 -2
  104. package/dist/components/collapsible.config.d.ts +0 -2
  105. package/dist/components/collapsible.config.js +0 -2
  106. package/dist/components/collapsible.d.ts +0 -2
  107. package/dist/components/collapsible.js +0 -2
  108. package/dist/components/command.config.d.ts +0 -2
  109. package/dist/components/command.config.js +0 -2
  110. package/dist/components/command.d.ts +0 -2
  111. package/dist/components/command.js +0 -2
  112. package/dist/components/control-color.config.d.ts +0 -2
  113. package/dist/components/control-color.config.js +0 -2
  114. package/dist/components/control-color.d.ts +0 -2
  115. package/dist/components/control-color.js +0 -2
  116. package/dist/components/control-curve.config.d.ts +0 -2
  117. package/dist/components/control-curve.config.js +0 -2
  118. package/dist/components/control-curve.d.ts +0 -2
  119. package/dist/components/control-curve.js +0 -2
  120. package/dist/components/control-folder.config.d.ts +0 -2
  121. package/dist/components/control-folder.config.js +0 -2
  122. package/dist/components/control-folder.d.ts +0 -2
  123. package/dist/components/control-folder.js +0 -2
  124. package/dist/components/control-group.config.d.ts +0 -2
  125. package/dist/components/control-group.config.js +0 -2
  126. package/dist/components/control-group.d.ts +0 -2
  127. package/dist/components/control-group.js +0 -2
  128. package/dist/components/control-knob.config.d.ts +0 -2
  129. package/dist/components/control-knob.config.js +0 -2
  130. package/dist/components/control-knob.d.ts +0 -2
  131. package/dist/components/control-knob.js +0 -2
  132. package/dist/components/control-panel.config.d.ts +0 -2
  133. package/dist/components/control-panel.config.js +0 -2
  134. package/dist/components/control-panel.d.ts +0 -2
  135. package/dist/components/control-panel.js +0 -2
  136. package/dist/components/control-select.config.d.ts +0 -2
  137. package/dist/components/control-select.config.js +0 -2
  138. package/dist/components/control-select.d.ts +0 -2
  139. package/dist/components/control-select.js +0 -2
  140. package/dist/components/control-slider.config.d.ts +0 -2
  141. package/dist/components/control-slider.config.js +0 -2
  142. package/dist/components/control-slider.d.ts +0 -2
  143. package/dist/components/control-slider.js +0 -2
  144. package/dist/components/control-spring.config.d.ts +0 -2
  145. package/dist/components/control-spring.config.js +0 -2
  146. package/dist/components/control-spring.d.ts +0 -2
  147. package/dist/components/control-spring.js +0 -2
  148. package/dist/components/control-stepper.config.d.ts +0 -2
  149. package/dist/components/control-stepper.config.js +0 -2
  150. package/dist/components/control-stepper.d.ts +0 -2
  151. package/dist/components/control-stepper.js +0 -2
  152. package/dist/components/control-toggle.config.d.ts +0 -2
  153. package/dist/components/control-toggle.config.js +0 -2
  154. package/dist/components/control-toggle.d.ts +0 -2
  155. package/dist/components/control-toggle.js +0 -2
  156. package/dist/components/dist/_slots.js +0 -8
  157. package/dist/components/dist/accordion.config.d.ts +0 -431
  158. package/dist/components/dist/accordion.config.js +0 -81
  159. package/dist/components/dist/accordion.d.ts +0 -453
  160. package/dist/components/dist/accordion.js +0 -60
  161. package/dist/components/dist/alert.config.d.ts +0 -219
  162. package/dist/components/dist/alert.config.js +0 -54
  163. package/dist/components/dist/alert.d.ts +0 -230
  164. package/dist/components/dist/alert.js +0 -16
  165. package/dist/components/dist/anchor.config.d.ts +0 -250
  166. package/dist/components/dist/anchor.config.js +0 -22
  167. package/dist/components/dist/anchor.d.ts +0 -261
  168. package/dist/components/dist/anchor.js +0 -9
  169. package/dist/components/dist/article.d.ts +0 -11
  170. package/dist/components/dist/article.js +0 -9
  171. package/dist/components/dist/aside.d.ts +0 -11
  172. package/dist/components/dist/aside.js +0 -9
  173. package/dist/components/dist/avatar-group.config.d.ts +0 -315
  174. package/dist/components/dist/avatar-group.config.js +0 -33
  175. package/dist/components/dist/avatar-group.d.ts +0 -329
  176. package/dist/components/dist/avatar-group.js +0 -39
  177. package/dist/components/dist/avatar.config.d.ts +0 -197
  178. package/dist/components/dist/avatar.config.js +0 -49
  179. package/dist/components/dist/avatar.d.ts +0 -211
  180. package/dist/components/dist/avatar.js +0 -20
  181. package/dist/components/dist/badge.config.d.ts +0 -477
  182. package/dist/components/dist/badge.config.js +0 -99
  183. package/dist/components/dist/badge.d.ts +0 -489
  184. package/dist/components/dist/badge.js +0 -16
  185. package/dist/components/dist/box.d.ts +0 -14
  186. package/dist/components/dist/box.js +0 -9
  187. package/dist/components/dist/breadcrumb.config.d.ts +0 -390
  188. package/dist/components/dist/breadcrumb.config.js +0 -43
  189. package/dist/components/dist/breadcrumb.d.ts +0 -420
  190. package/dist/components/dist/breadcrumb.js +0 -119
  191. package/dist/components/dist/button.config.d.ts +0 -381
  192. package/dist/components/dist/button.config.js +0 -91
  193. package/dist/components/dist/button.d.ts +0 -403
  194. package/dist/components/dist/button.js +0 -35
  195. package/dist/components/dist/card.config.d.ts +0 -336
  196. package/dist/components/dist/card.config.js +0 -33
  197. package/dist/components/dist/card.d.ts +0 -352
  198. package/dist/components/dist/card.js +0 -27
  199. package/dist/components/dist/collapsible.config.d.ts +0 -45
  200. package/dist/components/dist/collapsible.config.js +0 -46
  201. package/dist/components/dist/collapsible.d.ts +0 -61
  202. package/dist/components/dist/collapsible.js +0 -38
  203. package/dist/components/dist/command.config.d.ts +0 -1613
  204. package/dist/components/dist/command.config.js +0 -170
  205. package/dist/components/dist/command.d.ts +0 -1722
  206. package/dist/components/dist/command.js +0 -341
  207. package/dist/components/dist/control-color.config.d.ts +0 -979
  208. package/dist/components/dist/control-color.config.js +0 -81
  209. package/dist/components/dist/control-color.d.ts +0 -995
  210. package/dist/components/dist/control-color.js +0 -64
  211. package/dist/components/dist/control-curve.config.d.ts +0 -18
  212. package/dist/components/dist/control-curve.config.js +0 -14
  213. package/dist/components/dist/control-curve.d.ts +0 -35
  214. package/dist/components/dist/control-curve.js +0 -81
  215. package/dist/components/dist/control-folder.config.d.ts +0 -177
  216. package/dist/components/dist/control-folder.config.js +0 -47
  217. package/dist/components/dist/control-folder.d.ts +0 -194
  218. package/dist/components/dist/control-folder.js +0 -41
  219. package/dist/components/dist/control-group.config.d.ts +0 -859
  220. package/dist/components/dist/control-group.config.js +0 -80
  221. package/dist/components/dist/control-group.d.ts +0 -881
  222. package/dist/components/dist/control-group.js +0 -89
  223. package/dist/components/dist/control-knob.config.d.ts +0 -792
  224. package/dist/components/dist/control-knob.config.js +0 -67
  225. package/dist/components/dist/control-knob.d.ts +0 -819
  226. package/dist/components/dist/control-knob.js +0 -148
  227. package/dist/components/dist/control-panel.config.d.ts +0 -402
  228. package/dist/components/dist/control-panel.config.js +0 -38
  229. package/dist/components/dist/control-panel.d.ts +0 -415
  230. package/dist/components/dist/control-panel.js +0 -22
  231. package/dist/components/dist/control-select.config.d.ts +0 -1176
  232. package/dist/components/dist/control-select.config.js +0 -102
  233. package/dist/components/dist/control-select.d.ts +0 -1200
  234. package/dist/components/dist/control-select.js +0 -63
  235. package/dist/components/dist/control-slider.config.d.ts +0 -104
  236. package/dist/components/dist/control-slider.config.js +0 -98
  237. package/dist/components/dist/control-slider.d.ts +0 -127
  238. package/dist/components/dist/control-slider.js +0 -87
  239. package/dist/components/dist/control-spring.config.d.ts +0 -417
  240. package/dist/components/dist/control-spring.config.js +0 -36
  241. package/dist/components/dist/control-spring.d.ts +0 -439
  242. package/dist/components/dist/control-spring.js +0 -136
  243. package/dist/components/dist/control-stepper.config.d.ts +0 -1084
  244. package/dist/components/dist/control-stepper.config.js +0 -108
  245. package/dist/components/dist/control-stepper.d.ts +0 -1104
  246. package/dist/components/dist/control-stepper.js +0 -109
  247. package/dist/components/dist/control-toggle.config.d.ts +0 -407
  248. package/dist/components/dist/control-toggle.config.js +0 -26
  249. package/dist/components/dist/control-toggle.d.ts +0 -420
  250. package/dist/components/dist/control-toggle.js +0 -36
  251. package/dist/components/dist/createSlot.d.ts +0 -8
  252. package/dist/components/dist/createSlot.js +0 -89
  253. package/dist/components/dist/dropdown.config.d.ts +0 -920
  254. package/dist/components/dist/dropdown.config.js +0 -107
  255. package/dist/components/dist/dropdown.d.ts +0 -950
  256. package/dist/components/dist/dropdown.js +0 -92
  257. package/dist/components/dist/empty-state.config.d.ts +0 -396
  258. package/dist/components/dist/empty-state.config.js +0 -53
  259. package/dist/components/dist/empty-state.d.ts +0 -416
  260. package/dist/components/dist/empty-state.js +0 -33
  261. package/dist/components/dist/footer.d.ts +0 -11
  262. package/dist/components/dist/footer.js +0 -9
  263. package/dist/components/dist/grid.d.ts +0 -41
  264. package/dist/components/dist/grid.js +0 -34
  265. package/dist/components/dist/header.d.ts +0 -11
  266. package/dist/components/dist/header.js +0 -9
  267. package/dist/components/dist/hstack.d.ts +0 -15
  268. package/dist/components/dist/hstack.js +0 -21
  269. package/dist/components/dist/image.d.ts +0 -19
  270. package/dist/components/dist/image.js +0 -9
  271. package/dist/components/dist/input.config.d.ts +0 -58
  272. package/dist/components/dist/input.config.js +0 -42
  273. package/dist/components/dist/input.d.ts +0 -67
  274. package/dist/components/dist/input.js +0 -14
  275. package/dist/components/dist/item.config.d.ts +0 -351
  276. package/dist/components/dist/item.config.js +0 -83
  277. package/dist/components/dist/item.d.ts +0 -374
  278. package/dist/components/dist/item.js +0 -51
  279. package/dist/components/dist/list.d.ts +0 -19
  280. package/dist/components/dist/list.js +0 -21
  281. package/dist/components/dist/main.d.ts +0 -11
  282. package/dist/components/dist/main.js +0 -9
  283. package/dist/components/dist/modal.config.d.ts +0 -397
  284. package/dist/components/dist/modal.config.js +0 -92
  285. package/dist/components/dist/modal.d.ts +0 -433
  286. package/dist/components/dist/modal.js +0 -125
  287. package/dist/components/dist/nav-header.config.d.ts +0 -158
  288. package/dist/components/dist/nav-header.config.js +0 -26
  289. package/dist/components/dist/nav-header.d.ts +0 -173
  290. package/dist/components/dist/nav-header.js +0 -23
  291. package/dist/components/dist/nav.d.ts +0 -11
  292. package/dist/components/dist/nav.js +0 -9
  293. package/dist/components/dist/preset-bar.config.d.ts +0 -192
  294. package/dist/components/dist/preset-bar.config.js +0 -39
  295. package/dist/components/dist/preset-bar.d.ts +0 -215
  296. package/dist/components/dist/preset-bar.js +0 -71
  297. package/dist/components/dist/presets/index.d.ts +0 -17674
  298. package/dist/components/dist/presets/index.js +0 -97
  299. package/dist/components/dist/pressable.d.ts +0 -11
  300. package/dist/components/dist/pressable.js +0 -9
  301. package/dist/components/dist/progress.config.d.ts +0 -296
  302. package/dist/components/dist/progress.config.js +0 -35
  303. package/dist/components/dist/progress.d.ts +0 -311
  304. package/dist/components/dist/progress.js +0 -43
  305. package/dist/components/dist/section.d.ts +0 -11
  306. package/dist/components/dist/section.js +0 -9
  307. package/dist/components/dist/select.config.d.ts +0 -31
  308. package/dist/components/dist/select.config.js +0 -25
  309. package/dist/components/dist/select.d.ts +0 -45
  310. package/dist/components/dist/select.js +0 -13
  311. package/dist/components/dist/sheet.config.d.ts +0 -245
  312. package/dist/components/dist/sheet.config.js +0 -99
  313. package/dist/components/dist/sheet.d.ts +0 -267
  314. package/dist/components/dist/sheet.js +0 -53
  315. package/dist/components/dist/sidebar.config.d.ts +0 -1651
  316. package/dist/components/dist/sidebar.config.js +0 -217
  317. package/dist/components/dist/sidebar.d.ts +0 -1825
  318. package/dist/components/dist/sidebar.js +0 -492
  319. package/dist/components/dist/skeleton.config.d.ts +0 -16
  320. package/dist/components/dist/skeleton.config.js +0 -10
  321. package/dist/components/dist/skeleton.d.ts +0 -27
  322. package/dist/components/dist/skeleton.js +0 -16
  323. package/dist/components/dist/slider.config.d.ts +0 -44
  324. package/dist/components/dist/slider.config.js +0 -40
  325. package/dist/components/dist/slider.d.ts +0 -70
  326. package/dist/components/dist/slider.js +0 -247
  327. package/dist/components/dist/spinner.config.d.ts +0 -34
  328. package/dist/components/dist/spinner.config.js +0 -24
  329. package/dist/components/dist/spinner.d.ts +0 -42
  330. package/dist/components/dist/spinner.js +0 -29
  331. package/dist/components/dist/svg.d.ts +0 -21
  332. package/dist/components/dist/svg.js +0 -17
  333. package/dist/components/dist/switch.config.d.ts +0 -353
  334. package/dist/components/dist/switch.config.js +0 -47
  335. package/dist/components/dist/switch.d.ts +0 -370
  336. package/dist/components/dist/switch.js +0 -32
  337. package/dist/components/dist/table.d.ts +0 -36
  338. package/dist/components/dist/table.js +0 -29
  339. package/dist/components/dist/tabs.config.d.ts +0 -611
  340. package/dist/components/dist/tabs.config.js +0 -56
  341. package/dist/components/dist/tabs.d.ts +0 -632
  342. package/dist/components/dist/tabs.js +0 -77
  343. package/dist/components/dist/text.config.d.ts +0 -306
  344. package/dist/components/dist/text.config.js +0 -149
  345. package/dist/components/dist/text.d.ts +0 -205
  346. package/dist/components/dist/text.js +0 -12
  347. package/dist/components/dist/textarea.config.d.ts +0 -352
  348. package/dist/components/dist/textarea.config.js +0 -57
  349. package/dist/components/dist/textarea.d.ts +0 -362
  350. package/dist/components/dist/textarea.js +0 -9
  351. package/dist/components/dist/toast.config.d.ts +0 -335
  352. package/dist/components/dist/toast.config.js +0 -145
  353. package/dist/components/dist/toast.d.ts +0 -426
  354. package/dist/components/dist/toast.js +0 -159
  355. package/dist/components/dist/tooltip.config.d.ts +0 -193
  356. package/dist/components/dist/tooltip.config.js +0 -40
  357. package/dist/components/dist/tooltip.d.ts +0 -206
  358. package/dist/components/dist/tooltip.js +0 -28
  359. package/dist/components/dist/vstack.d.ts +0 -15
  360. package/dist/components/dist/vstack.js +0 -20
  361. package/dist/components/dropdown.config.d.ts +0 -2
  362. package/dist/components/dropdown.config.js +0 -2
  363. package/dist/components/dropdown.d.ts +0 -2
  364. package/dist/components/dropdown.js +0 -2
  365. package/dist/components/empty-state.config.d.ts +0 -2
  366. package/dist/components/empty-state.config.js +0 -2
  367. package/dist/components/empty-state.d.ts +0 -2
  368. package/dist/components/empty-state.js +0 -2
  369. package/dist/components/footer.d.ts +0 -2
  370. package/dist/components/footer.js +0 -2
  371. package/dist/components/grid.d.ts +0 -2
  372. package/dist/components/grid.js +0 -2
  373. package/dist/components/header.d.ts +0 -2
  374. package/dist/components/header.js +0 -2
  375. package/dist/components/hstack.d.ts +0 -2
  376. package/dist/components/hstack.js +0 -2
  377. package/dist/components/image.d.ts +0 -2
  378. package/dist/components/image.js +0 -2
  379. package/dist/components/input.config.d.ts +0 -2
  380. package/dist/components/input.config.js +0 -2
  381. package/dist/components/input.d.ts +0 -2
  382. package/dist/components/input.js +0 -2
  383. package/dist/components/item.config.d.ts +0 -2
  384. package/dist/components/item.config.js +0 -2
  385. package/dist/components/item.d.ts +0 -2
  386. package/dist/components/item.js +0 -2
  387. package/dist/components/list.d.ts +0 -2
  388. package/dist/components/list.js +0 -2
  389. package/dist/components/main.d.ts +0 -2
  390. package/dist/components/main.js +0 -2
  391. package/dist/components/modal.config.d.ts +0 -2
  392. package/dist/components/modal.config.js +0 -2
  393. package/dist/components/modal.d.ts +0 -2
  394. package/dist/components/modal.js +0 -2
  395. package/dist/components/nav-header.config.d.ts +0 -2
  396. package/dist/components/nav-header.config.js +0 -2
  397. package/dist/components/nav-header.d.ts +0 -2
  398. package/dist/components/nav-header.js +0 -2
  399. package/dist/components/nav.d.ts +0 -2
  400. package/dist/components/nav.js +0 -2
  401. package/dist/components/preset-bar.config.d.ts +0 -2
  402. package/dist/components/preset-bar.config.js +0 -2
  403. package/dist/components/preset-bar.d.ts +0 -2
  404. package/dist/components/preset-bar.js +0 -2
  405. package/dist/components/presets/index.d.ts +0 -44
  406. package/dist/components/presets/index.js +0 -44
  407. package/dist/components/pressable.d.ts +0 -2
  408. package/dist/components/pressable.js +0 -2
  409. package/dist/components/progress.config.d.ts +0 -2
  410. package/dist/components/progress.config.js +0 -2
  411. package/dist/components/progress.d.ts +0 -2
  412. package/dist/components/progress.js +0 -2
  413. package/dist/components/section.d.ts +0 -2
  414. package/dist/components/section.js +0 -2
  415. package/dist/components/select.config.d.ts +0 -2
  416. package/dist/components/select.config.js +0 -2
  417. package/dist/components/select.d.ts +0 -2
  418. package/dist/components/select.js +0 -2
  419. package/dist/components/sheet.config.d.ts +0 -2
  420. package/dist/components/sheet.config.js +0 -2
  421. package/dist/components/sheet.d.ts +0 -2
  422. package/dist/components/sheet.js +0 -2
  423. package/dist/components/sidebar.config.d.ts +0 -2
  424. package/dist/components/sidebar.config.js +0 -2
  425. package/dist/components/sidebar.d.ts +0 -2
  426. package/dist/components/sidebar.js +0 -2
  427. package/dist/components/skeleton.config.d.ts +0 -2
  428. package/dist/components/skeleton.config.js +0 -2
  429. package/dist/components/skeleton.d.ts +0 -2
  430. package/dist/components/skeleton.js +0 -2
  431. package/dist/components/slider.config.d.ts +0 -2
  432. package/dist/components/slider.config.js +0 -2
  433. package/dist/components/slider.d.ts +0 -2
  434. package/dist/components/slider.js +0 -2
  435. package/dist/components/spinner.config.d.ts +0 -2
  436. package/dist/components/spinner.config.js +0 -2
  437. package/dist/components/spinner.d.ts +0 -2
  438. package/dist/components/spinner.js +0 -2
  439. package/dist/components/svg.d.ts +0 -2
  440. package/dist/components/svg.js +0 -2
  441. package/dist/components/switch.config.d.ts +0 -2
  442. package/dist/components/switch.config.js +0 -2
  443. package/dist/components/switch.d.ts +0 -2
  444. package/dist/components/switch.js +0 -2
  445. package/dist/components/table.d.ts +0 -2
  446. package/dist/components/table.js +0 -2
  447. package/dist/components/tabs.config.d.ts +0 -2
  448. package/dist/components/tabs.config.js +0 -2
  449. package/dist/components/tabs.d.ts +0 -2
  450. package/dist/components/tabs.js +0 -2
  451. package/dist/components/text.config.d.ts +0 -2
  452. package/dist/components/text.config.js +0 -2
  453. package/dist/components/text.d.ts +0 -2
  454. package/dist/components/text.js +0 -2
  455. package/dist/components/textarea.config.d.ts +0 -2
  456. package/dist/components/textarea.config.js +0 -2
  457. package/dist/components/textarea.d.ts +0 -2
  458. package/dist/components/textarea.js +0 -2
  459. package/dist/components/toast.config.d.ts +0 -2
  460. package/dist/components/toast.config.js +0 -2
  461. package/dist/components/toast.d.ts +0 -2
  462. package/dist/components/toast.js +0 -2
  463. package/dist/components/tooltip.config.d.ts +0 -2
  464. package/dist/components/tooltip.config.js +0 -2
  465. package/dist/components/tooltip.d.ts +0 -2
  466. package/dist/components/tooltip.js +0 -2
  467. package/dist/components/vstack.d.ts +0 -2
  468. package/dist/components/vstack.js +0 -2
  469. package/dist/config/dist/component-resolution.js +0 -78
  470. package/dist/config/dist/consts/defaultColors.d.ts +0 -253
  471. package/dist/config/dist/consts/defaultColors.js +0 -252
  472. package/dist/config/dist/createComponent.d.ts +0 -1
  473. package/dist/config/dist/createComponent.js +0 -1
  474. package/dist/config/dist/preset-merge.js +0 -192
  475. package/dist/config/dist/propertyGroups.d.ts +0 -1
  476. package/dist/config/dist/propertyGroups.js +0 -414
  477. package/dist/config/dist/resolveTokenTypes.d.ts +0 -1
  478. package/dist/config/dist/resolveTokenTypes.js +0 -149
  479. package/dist/config-utils/dist/componentConfig.d.ts +0 -10
  480. package/dist/config-utils/dist/componentConfig.js +0 -11
  481. package/dist/config-utils.d.ts +0 -2
  482. package/dist/config-utils.js +0 -2
  483. package/dist/core/dist/color-opacity-map.js +0 -33
  484. package/dist/core/dist/compositeStyles.d.ts +0 -21
  485. package/dist/core/dist/compositeStyles.js +0 -51
  486. package/dist/core/dist/configurable-prop-helpers.d.ts +0 -31
  487. package/dist/core/dist/configurable-prop-helpers.js +0 -61
  488. package/dist/core/dist/createComponent.boundaries.js +0 -192
  489. package/dist/core/dist/createComponent.d.ts +0 -56
  490. package/dist/core/dist/createComponent.js +0 -67
  491. package/dist/core/dist/createComponentExample.d.ts +0 -41
  492. package/dist/core/dist/createComponentExample.js +0 -27
  493. package/dist/core/dist/createProvider.d.ts +0 -12
  494. package/dist/core/dist/createProvider.js +0 -24
  495. package/dist/core/dist/generated/stylePropsTwMap.d.ts +0 -1700
  496. package/dist/core/dist/generated/stylePropsTwMap.js +0 -570
  497. package/dist/core/dist/getComponentStyles.d.ts +0 -49
  498. package/dist/core/dist/getComponentStyles.js +0 -85
  499. package/dist/core/dist/getStyles.d.ts +0 -42
  500. package/dist/core/dist/getStyles.js +0 -300
  501. package/dist/core/dist/index.d.ts +0 -13
  502. package/dist/core/dist/index.js +0 -13
  503. package/dist/core/dist/modifier-mappings.d.ts +0 -12
  504. package/dist/core/dist/modifier-mappings.js +0 -61
  505. package/dist/core/dist/resolveMotionState.d.ts +0 -4
  506. package/dist/core/dist/resolveMotionState.js +0 -17
  507. package/dist/core/dist/resolveProps.boundaries.js +0 -131
  508. package/dist/core/dist/style-prop-data.d.ts +0 -32
  509. package/dist/core/dist/style-prop-data.js +0 -1257
  510. package/dist/core/dist/transformPreset.d.ts +0 -17
  511. package/dist/core/dist/transformPreset.js +0 -28
  512. package/dist/core/dist/withDefaultStyleProps.d.ts +0 -43
  513. package/dist/core/dist/withDefaultStyleProps.js +0 -18
  514. package/dist/core.d.ts +0 -14
  515. package/dist/core.js +0 -15
  516. package/dist/createSlot.d.ts +0 -2
  517. package/dist/createSlot.js +0 -2
  518. package/dist/fixtures.d.ts +0 -4
  519. package/dist/fixtures.js +0 -5
  520. package/dist/foundational-presets/dist/_virtual/_rolldown/runtime.js +0 -13
  521. package/dist/foundational-presets/dist/defaultPreset.d.ts +0 -1557
  522. package/dist/foundational-presets/dist/defaultPreset.js +0 -615
  523. package/dist/foundational-presets/dist/index.d.ts +0 -1
  524. package/dist/foundational-presets/dist/index.js +0 -1
  525. package/dist/foundational-presets/dist/motion.d.ts +0 -12
  526. package/dist/foundational-presets/dist/motion.js +0 -10
  527. package/dist/foundational-presets/dist/style-props.js +0 -1445
  528. package/dist/loader/dist/loader/create-component-data.js +0 -33
  529. package/dist/loader/dist/loader/create-component-lowering.js +0 -454
  530. package/dist/loader/dist/loader/data-attr-transform.js +0 -191
  531. package/dist/loader/dist/loader/dynamic-style-codegen.js +0 -97
  532. package/dist/loader/dist/loader/motion-transform.js +0 -717
  533. package/dist/loader/dist/loader/style-transform.js +0 -670
  534. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -203
  535. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -25
  536. package/dist/loader/dist/node_modules/react/cjs/react.development.js +0 -762
  537. package/dist/loader/dist/node_modules/react/cjs/react.production.js +0 -351
  538. package/dist/loader/dist/node_modules/react/index.js +0 -10
  539. package/dist/loader/dist/node_modules/react/jsx-runtime.js +0 -10
  540. package/dist/loader/dist/packages/core/dist/color-opacity-map.js +0 -33
  541. package/dist/loader/dist/packages/core/dist/compositeStyles.js +0 -43
  542. package/dist/loader/dist/packages/core/dist/createComponent.js +0 -6
  543. package/dist/loader/dist/packages/core/dist/createProvider.js +0 -7
  544. package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +0 -570
  545. package/dist/loader/dist/packages/core/dist/getComponentStyles.js +0 -2
  546. package/dist/loader/dist/packages/core/dist/getStyles.js +0 -60
  547. package/dist/loader/dist/packages/core/dist/index.js +0 -6
  548. package/dist/loader/dist/packages/core/dist/modifier-mappings.js +0 -61
  549. package/dist/loader/dist/packages/core/dist/style-prop-data.js +0 -1257
  550. package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +0 -1
  551. package/dist/presets/dist/defaultPreset.d.ts +0 -6
  552. package/dist/presets/dist/defaultPreset.js +0 -51
  553. package/dist/presets/dist/index.d.ts +0 -1
  554. package/dist/presets/dist/index.js +0 -1
  555. package/dist/presets/motion.d.ts +0 -2
  556. package/dist/presets/motion.js +0 -2
  557. package/dist/presets.d.ts +0 -2
  558. package/dist/presets.js +0 -3
  559. package/dist/styles.d.ts +0 -4
  560. package/dist/styles.js +0 -5
  561. package/dist/transformPreset.d.ts +0 -2
  562. package/dist/transformPreset.js +0 -3
  563. /package/dist/{config/dist/component-resolution.d.ts → loader/dist/transform-runner.d.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ //#region ../config/dist/defineCompositeStyle.js
2
+ /**
3
+ * Author a composite style. Returns a branded value the consumer
4
+ * passes to `.registerComposites({...})` on the UDS builder.
5
+ *
6
+ * Pure — no global registration happens here; the builder's
7
+ * `.registerComposites({...})` is the registration step.
8
+ */
9
+ function defineCompositeStyle(input) {
10
+ return {
11
+ __kind: "compositeStyle",
12
+ label: input.label,
13
+ ...input.description !== void 0 ? { description: input.description } : {},
14
+ styles: input.styles
15
+ };
16
+ }
17
+ //#endregion
18
+ export { defineCompositeStyle };
@@ -0,0 +1,152 @@
1
+ import { CSSProperties } from "react";
2
+
3
+ //#region ../config/dist/defineMotionConfig.d.ts
4
+ //#region src/defineMotionConfig.d.ts
5
+ /** Augmented by codegen with motion preset names from uds.config.ts */
6
+ interface CustomMotionPreset {}
7
+ /** Union of all configured motion preset names */
8
+ type MotionPresetName = keyof CustomMotionPreset;
9
+ /**
10
+ * Animatable properties for motion keyframes.
11
+ *
12
+ * Values can be numbers, strings, or CSS var() references from tokens.
13
+ * motion/react supports animating CSS custom properties directly, so
14
+ * token references like `var(--uds-color-brand)` work here.
15
+ */
16
+ interface MotionKeyframe {
17
+ opacity?: number | number[];
18
+ scale?: number | number[];
19
+ scaleX?: number | number[];
20
+ scaleY?: number | number[];
21
+ z?: number | string | (number | string)[];
22
+ rotate?: number | number[];
23
+ x?: number | string | (number | string)[];
24
+ y?: number | string | (number | string)[];
25
+ rotateX?: number | number[];
26
+ rotateY?: number | number[];
27
+ skewX?: number | number[];
28
+ skewY?: number | number[];
29
+ width?: number | string | (number | string)[];
30
+ height?: number | string | (number | string)[];
31
+ /** Animate background color (supports token var() references) */
32
+ backgroundColor?: string | string[];
33
+ /** Animate text color (supports token var() references) */
34
+ color?: string | string[];
35
+ /** Animate border color (supports token var() references) */
36
+ borderColor?: string | string[];
37
+ /** Animate border radius */
38
+ borderRadius?: number | string | (number | string)[];
39
+ /** Arbitrary CSS custom properties to animate */
40
+ [cssVar: `--${string}`]: string | number | (string | number)[];
41
+ }
42
+ /** Transition configuration for a motion preset */
43
+ interface MotionTransition {
44
+ /** Framer Motion transition type */
45
+ type?: 'tween' | 'spring' | 'inertia';
46
+ duration?: number;
47
+ delay?: number;
48
+ ease?: string | [number, number, number, number];
49
+ stiffness?: number;
50
+ damping?: number;
51
+ mass?: number;
52
+ bounce?: number;
53
+ velocity?: number;
54
+ restDelta?: number;
55
+ restSpeed?: number;
56
+ repeat?: number;
57
+ repeatType?: 'loop' | 'reverse' | 'mirror';
58
+ repeatDelay?: number;
59
+ }
60
+ interface JsMotionPreset {
61
+ runtime: 'js';
62
+ initial?: MotionKeyframe;
63
+ animate?: MotionKeyframe;
64
+ exit?: MotionKeyframe;
65
+ transition?: MotionTransition;
66
+ whileHover?: MotionKeyframe;
67
+ whileTap?: MotionKeyframe;
68
+ reducedMotion?: 'none' | Partial<JsMotionPreset>;
69
+ }
70
+ /**
71
+ * Inline motion/react config without uds runtime discriminators.
72
+ * Allows arbitrary motion/react props beyond the typed subset.
73
+ */
74
+ interface MotionInlineConfig {
75
+ initial?: Record<string, unknown>;
76
+ animate?: Record<string, unknown>;
77
+ exit?: Record<string, unknown>;
78
+ transition?: Record<string, unknown>;
79
+ whileHover?: Record<string, unknown>;
80
+ whileTap?: Record<string, unknown>;
81
+ [key: string]: unknown;
82
+ }
83
+ interface CssMotionPreset {
84
+ runtime: 'css';
85
+ /** CSS @keyframes map (e.g. `{ from: { opacity: 0 }, to: { opacity: 1 } }`). */
86
+ keyframes: {
87
+ from?: MotionKeyframe;
88
+ to?: MotionKeyframe;
89
+ [offset: `${number}%`]: MotionKeyframe | undefined;
90
+ };
91
+ animationDuration?: CSSProperties['animationDuration'];
92
+ animationTimingFunction?: CSSProperties['animationTimingFunction'];
93
+ animationDelay?: CSSProperties['animationDelay'];
94
+ animationIterationCount?: CSSProperties['animationIterationCount'];
95
+ animationDirection?: CSSProperties['animationDirection'];
96
+ animationFillMode?: CSSProperties['animationFillMode'];
97
+ animationPlayState?: CSSProperties['animationPlayState'];
98
+ reducedMotion?: 'none';
99
+ }
100
+ /** A named motion preset definition */
101
+ type MotionPreset = JsMotionPreset | CssMotionPreset;
102
+ /** Animate value with optional data-attribute conditional keyframes */
103
+ type SlotMotionAnimate = MotionKeyframe & {
104
+ /**
105
+ * Conditional keyframes keyed by data-attribute value.
106
+ * The key is the HTML data attribute name (e.g. `'data-state'`),
107
+ * and the value maps attribute values to keyframes.
108
+ *
109
+ * Example:
110
+ * ```ts
111
+ * animate: {
112
+ * 'data-state': { open: { rotate: 180 }, closed: { rotate: 0 } }
113
+ * }
114
+ * ```
115
+ */
116
+ [dataAttr: `data-${string}`]: Record<string, MotionStateKeyframe> | undefined;
117
+ };
118
+ /** Motion config for a single slot */
119
+ interface SlotMotionConfig {
120
+ initial?: MotionKeyframe;
121
+ animate?: MotionKeyframe;
122
+ exit?: MotionKeyframe;
123
+ transition?: MotionTransition;
124
+ /** Gesture: animate while hovered (JS runtime only) */
125
+ whileHover?: MotionKeyframe;
126
+ /** Gesture: animate while pressed (JS runtime only) */
127
+ whileTap?: MotionKeyframe;
128
+ /** Enable drag on this element (JS runtime only) */
129
+ drag?: boolean | 'x' | 'y';
130
+ /** Constrain drag movement */
131
+ dragConstraints?: {
132
+ top?: number;
133
+ right?: number;
134
+ bottom?: number;
135
+ left?: number;
136
+ };
137
+ /** Elasticity of drag beyond constraints (0 = rigid, 1 = full elastic) */
138
+ dragElastic?: number;
139
+ /** Snap back to origin on drag release */
140
+ dragSnapToOrigin?: boolean;
141
+ /** Enable layout animations (JS runtime only) */
142
+ layout?: boolean | 'position' | 'size';
143
+ }
144
+ interface InterpolateMarker {
145
+ __type: 'interpolate';
146
+ output: number[];
147
+ extrapolate: 'clamp' | 'extend' | 'identity';
148
+ }
149
+ /** A keyframe where values may include InterpolateMarker for index-based interpolation */
150
+ type MotionStateKeyframe = { [K in keyof MotionKeyframe]?: MotionKeyframe[K] | InterpolateMarker }; //#endregion
151
+ //#endregion
152
+ export { CssMotionPreset, CustomMotionPreset, InterpolateMarker, JsMotionPreset, MotionInlineConfig, MotionKeyframe, MotionPreset, MotionPresetName, MotionStateKeyframe, MotionTransition, SlotMotionAnimate, SlotMotionConfig };
@@ -0,0 +1,45 @@
1
+ import { ReactElement } from "react";
2
+
3
+ //#region ../config/dist/definePreview.d.ts
4
+ //#region src/definePreview.d.ts
5
+ /**
6
+ * Authoring metadata attached via `.metadata({ ... })` on a preview.
7
+ * Optional; codegen reads these slots when emitting `manifest.preview[name]`.
8
+ */
9
+ interface PreviewMetadata {
10
+ /** Free-form description used by docs / catalog tile tooltips. */
11
+ description?: string;
12
+ /** Icon SVG path or identifier used by the catalog tile. */
13
+ icon?: string;
14
+ /** Minimum container width hint for the preview render surface. */
15
+ minWidth?: number;
16
+ }
17
+ /**
18
+ * The value `definePreview(jsx)` produces — a branded object whose
19
+ * `element` field carries the authored JSX. The `.metadata({...})`
20
+ * chain attaches authoring metadata non-enumerably on `__metadata`.
21
+ */
22
+ interface DefinedPreview<E extends ReactElement = ReactElement> {
23
+ readonly __kind: 'preview';
24
+ readonly element: E;
25
+ /** Non-enumerable runtime slot populated by `.metadata({...})`. */
26
+ readonly __metadata?: PreviewMetadata;
27
+ /**
28
+ * Chainable: attach authoring metadata. Returns a new `DefinedPreview`
29
+ * carrying the merged metadata (last call wins on collision).
30
+ */
31
+ metadata(meta: PreviewMetadata): DefinedPreview<E>;
32
+ }
33
+ /**
34
+ * Wrap an authored JSX expression as a `DefinedPreview`. The element is
35
+ * captured as-is; codegen reads its source via ts-morph and converts
36
+ * to a canvas `Spec` for rendering.
37
+ *
38
+ * `definePreview` is a typed identity at runtime — it doesn't render
39
+ * the element or eagerly evaluate it. The branded shape exists so
40
+ * `registerPreviews` can require that every value is a preview (not
41
+ * just any ReactElement) and so codegen can find call sites by name.
42
+ */
43
+ declare function definePreview<E extends ReactElement>(element: E): DefinedPreview<E>; //#endregion
44
+ //#endregion
45
+ export { DefinedPreview, PreviewMetadata, definePreview };
@@ -0,0 +1,35 @@
1
+ //#region ../config/dist/definePreview.js
2
+ /**
3
+ * Wrap an authored JSX expression as a `DefinedPreview`. The element is
4
+ * captured as-is; codegen reads its source via ts-morph and converts
5
+ * to a canvas `Spec` for rendering.
6
+ *
7
+ * `definePreview` is a typed identity at runtime — it doesn't render
8
+ * the element or eagerly evaluate it. The branded shape exists so
9
+ * `registerPreviews` can require that every value is a preview (not
10
+ * just any ReactElement) and so codegen can find call sites by name.
11
+ */
12
+ function definePreview(element) {
13
+ return makePreview(element);
14
+ }
15
+ function makePreview(element, metadata) {
16
+ const value = {
17
+ __kind: "preview",
18
+ element,
19
+ metadata(meta) {
20
+ return makePreview(element, {
21
+ ...metadata ?? {},
22
+ ...meta
23
+ });
24
+ }
25
+ };
26
+ if (metadata !== void 0) Object.defineProperty(value, "__metadata", {
27
+ enumerable: false,
28
+ configurable: true,
29
+ writable: false,
30
+ value: metadata
31
+ });
32
+ return value;
33
+ }
34
+ //#endregion
35
+ export { definePreview };
@@ -1,6 +1,29 @@
1
+ import { TokenGroupMarker, TokenMarker } from "./component-config.js";
1
2
  import { CssValueTypeName } from "./types/css-values.js";
3
+ import { ColorCssProperty, CssPropertyName, CssPropertyValues } from "./types/css-properties.js";
2
4
 
3
5
  //#region ../config/dist/defineStyleProp.d.ts
6
+ //#region src/defineStyleProp.d.ts
7
+ /**
8
+ * Registry of token groups available in the active UDS config. **Empty by
9
+ * default** — populated via module augmentation by `uds build`'s codegen.
10
+ */
11
+ interface RegisteredTokenGroups {}
12
+ /**
13
+ * Companion registry to {@link RegisteredTokenGroups} — each key is a group
14
+ * namespace, value is a union of its tokens' CSS value types
15
+ * ({@link CssValueTypeName}). Codegen populates both interfaces.
16
+ */
17
+ interface RegisteredTokenGroupMeta {}
18
+ /**
19
+ * Object form pairing a `tokenGroup(...)` marker with an explicit
20
+ * namespace — disambiguates when two groups share token keys and the
21
+ * consumer needs to write `'bg.brand'` / `'line.brand'` in JSX.
22
+ */
23
+ interface NamespacedTokenGroup {
24
+ ref: TokenGroupMarker;
25
+ namespace: string;
26
+ }
4
27
  /** Runtime input type for `toCss` based on the entry's `type`. */
5
28
  type ArbitraryRuntimeValue<T extends CssValueTypeName> = T extends 'integer' | 'number' ? number : string;
6
29
  /**
@@ -28,6 +51,113 @@ type ArbitrarySpec = CssValueTypeName | readonly ArbitraryEntry[];
28
51
  * type is governed by the required `cssType` field instead, so any string
29
52
  * is accepted at the type level.
30
53
  */
54
+ type LiteralFor<P extends CssPropertyName | `--${string}`> = [P] extends [CssPropertyName] ? Extract<CssPropertyValues[P], string> : string;
55
+ /**
56
+ * `{ alias: 'col', value: 'column' }` — an author-facing keyword (`alias`)
57
+ * that maps to a CSS-valid value (`value`) at emission time. Lets us keep
58
+ * legacy Tailwind-shorthand parity (`flexDirection='col'` → `flex-direction: column`)
59
+ * without spelling out the CSS keyword in JSX.
60
+ *
61
+ * `value` may be either a CSS literal (`'column'`) or a token ref
62
+ * (`'{borderWidth/default}'`). When it's a token ref, the resolver looks
63
+ * up the referenced token and uses its resolved CSS value.
64
+ *
65
+ * Type level: codegen emits the `alias` into `RegisteredStyleProps[<prop>]`.
66
+ * CSS level: the resolver carries the alias→value mapping through to the
67
+ * CSS emitter so the generated stylesheet uses real CSS keywords.
68
+ */
69
+ /**
70
+ * Multi-property CSS map for composite-style aliases. Keys are
71
+ * camelCase CSS property names (or registered style-prop names);
72
+ * values are CSS literals or token refs.
73
+ *
74
+ * Example: Tailwind's `truncate` sets three properties at once —
75
+ * `{ overflow: 'hidden', textOverflow: 'ellipsis', whitespace: 'nowrap' }`.
76
+ */
77
+ type CompositeValueMap = Readonly<Record<string, string>>;
78
+ type ValueAlias<P extends CssPropertyName | `--${string}`> = {
79
+ readonly alias: string | number | boolean;
80
+ /** The CSS-emitted value. Accepts:
81
+ * - a `token('namespace/name')` marker for design-token references,
82
+ * - a property-typed literal,
83
+ * - any CSS-valid string, OR
84
+ * - a `CompositeValueMap` (inline multi-property style — `truncate=true`
85
+ * setting `overflow`, `textOverflow`, `whitespace` all at once).
86
+ */
87
+ readonly value: LiteralFor<P> | TokenMarker | (string & {}) | CompositeValueMap;
88
+ };
89
+ /**
90
+ * A single entry in the `values` array — one of:
91
+ * - a token-group ref (`'{group}'` or `{ ref, namespace }`)
92
+ * - a CSS-literal keyword constrained by `cssProperty`
93
+ * - a bare `number` (shorthand for `{ alias: n, value: String(n) }`) —
94
+ * valid where CSS itself accepts numbers (e.g. `line-clamp: 3`)
95
+ * - a `{ alias, value }` mapping for shorthand-to-CSS rewrites
96
+ *
97
+ * Bare `boolean` is *not* a valid CSS value, so booleans must use the
98
+ * `{ alias: true, value: '...' }` form (e.g. `border={true}` →
99
+ * `border-width: 1px`).
100
+ *
101
+ * Group refs are narrowed by `P` so suggestions show only groups whose
102
+ * value type fits the property.
103
+ */
104
+ type ValuesEntry<P extends CssPropertyName | `--${string}`> = TokenGroupMarker | NamespacedTokenGroup | LiteralFor<P> | number | ValueAlias<P>;
105
+ type StyleSpecBase<P extends CssPropertyName | `--${string}`> = {
106
+ values?: readonly ValuesEntry<P>[];
107
+ arbitrary?: ArbitrarySpec;
108
+ /**
109
+ * The CSS property (or properties) this style prop writes. Single
110
+ * string is the common case; arrays fan out to "side shorthand"
111
+ * props (e.g. `borderRadiusStart` covering both
112
+ * `border-start-start-radius` and `border-end-start-radius`). The
113
+ * output `StyleProp.cssProperty` exposes the original input;
114
+ * normalize at the call site (`Array.isArray(p) ? p : [p]`) when
115
+ * iterating.
116
+ *
117
+ * Arrays are restricted to standard CSS properties — `--*` custom
118
+ * properties must use the single-string form so `cssType` can pair
119
+ * with them unambiguously.
120
+ */
121
+ cssProperty: P | readonly P[];
122
+ classPrefix: string;
123
+ /**
124
+ * Optional CSS-value computer. Applied to bare-literal entries in
125
+ * `values` (numbers and plain string keywords) when the resolver
126
+ * builds the alias→CSS map. The author-facing alias stays as
127
+ * authored; the transform's return becomes the emitted CSS.
128
+ *
129
+ * Skipped for token-group refs (`'{group}'`, `{ ref, namespace }`)
130
+ * and `{ alias, value }` entries — those already carry their own
131
+ * value mapping.
132
+ *
133
+ * Pattern: a style prop with a regular shape that's tedious to spell
134
+ * out as `{ alias, value }` rows can list the bare aliases inline
135
+ * and let the transform produce the CSS:
136
+ *
137
+ * defineStyleProp({
138
+ * cssProperty: 'grid-template-columns',
139
+ * classPrefix: 'grid-cols',
140
+ * values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 'none', 'subgrid'],
141
+ * transform: (v) =>
142
+ * typeof v === 'number' ? `repeat(${v}, minmax(0, 1fr))` : v,
143
+ * arbitrary: 'string',
144
+ * });
145
+ */
146
+ transform?: (value: string | number) => string;
147
+ };
148
+ /**
149
+ * Conditional spec shape:
150
+ * - For custom CSS properties (`--*`), `cssType` is REQUIRED.
151
+ * - For known CSS properties, `cssType` is FORBIDDEN.
152
+ * - Fan-out arrays (`cssProperty: [...]`) are restricted to standard
153
+ * properties and never carry `cssType`.
154
+ */
155
+ type StyleSpec<P extends CssPropertyName | `--${string}`> = [P] extends [`--${string}`] ? StyleSpecBase<P> & {
156
+ cssType: CssValueTypeName;
157
+ cssProperty: P;
158
+ } : StyleSpecBase<P> & {
159
+ cssType?: never;
160
+ };
31
161
  type StylePropMetadata = {
32
162
  label?: string;
33
163
  description?: string;
@@ -47,6 +177,24 @@ type StylePropMetadata = {
47
177
  * (`Array.isArray(p) ? p : [p]`); readers that only need the primary
48
178
  * use the string directly or `Array.isArray(p) ? p[0] : p`.
49
179
  */
180
+ type StyleProp<P extends CssPropertyName | `--${string}` = CssPropertyName | `--${string}`> = {
181
+ readonly kind: 'styleProp';
182
+ readonly cssProperty: P | readonly P[];
183
+ readonly classPrefix: string;
184
+ readonly values: readonly ValuesEntry<P>[];
185
+ readonly arbitrary?: ArbitrarySpec;
186
+ readonly cssType?: CssValueTypeName;
187
+ readonly metadata: StylePropMetadata;
188
+ readonly transform?: (value: string | number) => string;
189
+ /**
190
+ * Set by `.withOpacity({...})` on color-typed props — names the
191
+ * paired opacity sibling so the resolver registers a second
192
+ * `ResolvedStyleProp` alongside the parent. Consumers (codegen,
193
+ * runtime, loader) read `pairedWith` on the resolved sibling to know
194
+ * which color prop it composes with.
195
+ */
196
+ readonly opacityPair?: OpacityPairSpec;
197
+ };
50
198
  /**
51
199
  * Internal shape attached to a {@link StyleProp} by `.withOpacity()`.
52
200
  * The resolver inspects this at `resolveConfig` time to synthesize a
@@ -55,8 +203,8 @@ type StylePropMetadata = {
55
203
  interface OpacityPairSpec {
56
204
  /** JSX-prop name for the opacity sibling, e.g. `'bgOpacity'`. */
57
205
  readonly as: string;
58
- /** Token-group refs the opacity sibling accepts as values. */
59
- readonly values: readonly unknown[];
206
+ /** Token group the opacity sibling pulls its values from. */
207
+ readonly values: TokenGroupMarker;
60
208
  /**
61
209
  * Separator between the parent's value-token suffix and the opacity
62
210
  * value in the emitted class name (`bg-primary_75` vs.
@@ -79,6 +227,7 @@ interface AnyStyleProp {
79
227
  readonly cssType?: CssValueTypeName;
80
228
  readonly metadata: StylePropMetadata;
81
229
  readonly opacityPair?: OpacityPairSpec;
230
+ readonly transform?: (value: string | number) => string;
82
231
  }
83
232
  /**
84
233
  * Return shape of {@link defineStyleProp}. The `metadata` field doubles as
@@ -89,5 +238,52 @@ interface AnyStyleProp {
89
238
  * {@link StylePropMetadata} structural shape because both fields are
90
239
  * optional, so the dual nature is type-safe.
91
240
  */
241
+ type StylePropWithBuilder<P extends CssPropertyName | `--${string}`> = Omit<StyleProp<P>, 'metadata'> & {
242
+ readonly metadata: StylePropMetadata & ((meta?: StylePropMetadata) => StyleProp<P>);
243
+ } & (P extends ColorCssProperty | `--${string}` ? WithOpacityBuilder<P> : Record<never, never>);
244
+ /**
245
+ * Conditional method exposed on `defineStyleProp(...)` results when the
246
+ * authored `cssProperty` is a standard CSS color property (see
247
+ * {@link ColorCssProperty}) or a custom property (`--*`). Calling it
248
+ * names a paired opacity sibling that's auto-registered alongside the
249
+ * parent at `resolveConfig` time.
250
+ *
251
+ * ```ts
252
+ * const bg = defineStyleProp({ cssProperty: 'background-color', ... })
253
+ * .withOpacity({ as: 'bgOpacity', values: [{ ref: 'opacity' }] });
254
+ * // registerStyleProps({ bg }) now registers BOTH `bg` and `bgOpacity`.
255
+ * ```
256
+ *
257
+ * The method is absent from the type when `cssProperty` is anything
258
+ * else — `defineStyleProp({ cssProperty: 'width' }).withOpacity(...)`
259
+ * is a compile-time error.
260
+ */
261
+ interface WithOpacityBuilder<P extends CssPropertyName | `--${string}`> {
262
+ withOpacity(spec: {
263
+ /** JSX-prop name for the opacity sibling, e.g. `'bgOpacity'`. */as: string; /** Token group the opacity sibling pulls its values from. */
264
+ values: TokenGroupMarker;
265
+ /**
266
+ * Class-name separator between the parent's token suffix and the
267
+ * opacity value (`bg-primary_75` vs. `bg-primary/75`). Defaults to
268
+ * `'_'` — no CSS-selector escape required. Pass `'/'` for the
269
+ * Tailwind-flavored output.
270
+ */
271
+ separator?: string;
272
+ }): StylePropWithBuilder<P>;
273
+ }
274
+ /**
275
+ * Author a style prop. Returns a {@link StyleProp} directly so callers can
276
+ * skip the `.metadata({...})` chain when there's nothing to attach:
277
+ *
278
+ * ```ts
279
+ * defineStyleProp({ cssProperty: 'flex-direction', classPrefix: 'flex', values: ['row', 'col'] })
280
+ * ```
281
+ *
282
+ * The returned object still supports `.metadata({...})` for the common
283
+ * case where you want to attach a label/description — the chain returns a
284
+ * plain {@link StyleProp} with the metadata baked in. Pure — no global
285
+ * registration.
286
+ */
287
+ declare function defineStyleProp<const P extends CssPropertyName | `--${string}`>(spec: StyleSpec<P>): StylePropWithBuilder<P>; //#endregion
92
288
  //#endregion
93
- export { AnyStyleProp, ArbitraryEntry, ArbitrarySpec, StylePropMetadata };
289
+ export { AnyStyleProp, ArbitraryEntry, ArbitrarySpec, NamespacedTokenGroup, RegisteredTokenGroupMeta, RegisteredTokenGroups, StyleProp, StylePropMetadata, StylePropWithBuilder, StyleSpec, ValuesEntry, defineStyleProp };
@@ -14,7 +14,7 @@ const CUSTOM_PROPERTY_PREFIX = "--";
14
14
  * registration.
15
15
  */
16
16
  function defineStyleProp(spec) {
17
- const { cssProperty: cssPropertyInput, classPrefix, values, arbitrary, cssType } = spec;
17
+ const { cssProperty: cssPropertyInput, classPrefix, values, arbitrary, cssType, transform } = spec;
18
18
  let cssProperty;
19
19
  if (Array.isArray(cssPropertyInput)) {
20
20
  const deduped = Array.from(new Set(cssPropertyInput));
@@ -33,7 +33,8 @@ function defineStyleProp(spec) {
33
33
  classPrefix,
34
34
  values: values ?? [],
35
35
  arbitrary,
36
- cssType
36
+ cssType,
37
+ transform
37
38
  };
38
39
  const buildChainable = (fields) => {
39
40
  const metadata = (meta = {}) => ({
@@ -1,13 +1,22 @@
1
- import { ComponentRef, CompositeRef, RegisteredComponents, RegisteredComposites, RegisteredStyleProps, StylePropRef } from "./component-refs.js";
2
- import { BoolMarker, ComponentConfigValue, ComposedLayer, CompositeBinding, CompoundVariant, EnumMarker, HtmlTag, LayerInput, PrimitiveLayer, PrimitivePropBinding, PropBinding, RootTag, SingleLayerCompositeBinding, StylePropBinding, StylePropShorthand, VerbosePropBinding } from "./component-config.js";
3
- import { Props } from "./Props.js";
4
- import { BoundComponent } from "./defineComponent.js";
5
- import { ColorFn, ColorKeyword, CssAngle, CssColor, CssLength, CssPercentage, CssRatio, CssTime, CssValue, CssValueTypeName, HexColor, HslColor, RgbColor } from "./types/css-values.js";
6
- import { AnyStyleProp, ArbitraryEntry, ArbitrarySpec, StylePropMetadata } from "./defineStyleProp.js";
1
+ import { ComponentRef, CompositeRef, MotionRef, RegisteredComponents, RegisteredComposites, RegisteredModifiers, RegisteredMotion, RegisteredStyleProps, StylePropRef } from "./component-refs.js";
2
+ import { CssMotionPreset, CustomMotionPreset, InterpolateMarker, JsMotionPreset, MotionInlineConfig, MotionKeyframe, MotionPreset, MotionPresetName, MotionStateKeyframe, MotionTransition, SlotMotionAnimate, SlotMotionConfig } from "./defineMotionConfig.js";
3
+ import { BoolMarker, ComponentConfigInput, ComponentConfigValue, ComponentMotionValue, ComponentSlotStyles, CompositeBinding, CompositeMarker, CompoundPropsEntry, EnumMarker, HiddenMarker, HtmlTag, LayerBundle, LayerInput, LayerOverride, PrimitiveLayer, PrimitivePropBinding, PropBinding, RenderArgs, RootTag, SingleLayerCompositeBinding, SlotMarker, SlotMotion, SplitSlotPath, StringMarker, StylePropBinding, StylePropMarker, StylePropShorthand, TokenGroupMarker, TokenMarker, VerbosePropBinding, WhenClause, bool, composite, enums, hidden, slot, string, styleProp, token, tokenGroup } from "./component-config.js";
4
+ import { Props, PropsOf } from "./Props.js";
5
+ import { CreateComponentRenderArgs } from "./bindRender.js";
6
+ import { buildStylePropClassName } from "./className.js";
7
+ import { DefinedPreview, PreviewMetadata, definePreview } from "./definePreview.js";
8
+ import { CompositeStyleDef, CompositeStyleInput, CompositeStyleObject, CompositeStylesConfig, DefinedCompositeStyle, defineCompositeStyle } from "./defineCompositeStyle.js";
9
+ import { BoundComponent, DefineHelpers, DefinedComponent, PrimitiveComponentInput, defineComponent } from "./defineComponent.js";
10
+ import { ColorFn, ColorKeyword, CssAngle, CssColor, CssLength, CssPercentage, CssRatio, CssTime, CssValue, CssValueTypeName, CssVarRef, HexColor, HslColor, RgbColor } from "./types/css-values.js";
11
+ import { CssGlobalKeyword, CssPropertyName, CssPropertyValues } from "./types/css-properties.js";
12
+ import { AnyStyleProp, ArbitraryEntry, ArbitrarySpec, NamespacedTokenGroup, RegisteredTokenGroupMeta, RegisteredTokenGroups, StyleProp, StylePropMetadata, StylePropWithBuilder, StyleSpec, ValuesEntry, defineStyleProp } from "./defineStyleProp.js";
13
+ import { PROPERTY_ACCEPTED_TYPES, PropertyAccept, isTokenAcceptedByProperty } from "./propertyAcceptedTypes.js";
7
14
  import { TokenType, VarGroupDef, VarTokenDef, VarsConfig } from "./types.js";
8
- import { AtomicToken, BuildOptions, CheckForReservedModifiersInput, ComponentConfig, DefineComponentInput, DefineComponentMotionInput, ExampleDef, ExampleEntryDef, ExampleLayoutStyles, GetModifierFromInput, GlobalStylesDef, InterpolateMarker, ModeGroup, ModeOption, ModeOptionInput, ModeSetInput, ModesInput, ModifierDef, MotionPresetsDef, SingleComponentDef, UdsConfig, UdsConfigData, buildTokenReference, createConfigBuilder, darker, lighter, resolveConfig } from "./createConfig.js";
9
- import { ResolvedStyleProp, ResolvedToken } from "./resolveStyleProp.js";
10
- import { defaultColors } from "./consts/defaultColors.js";
15
+ import { AtomicToken, BuildOptions, CheckForReservedModifiersInput, ComponentConfigMergeStrategy, ExampleDef, ExampleEntryDef, ExampleLayoutStyles, GetModifierFromInput, GlobalStylesDef, ModeGroup, ModeOption, ModeOptionInput, ModeSetInput, ModesInput, ModifierDef, MotionPresetsDef, PresetMergeMode, UdsConfig, UdsConfigData, buildCompositeStylesReference, buildTokenReference, convertModesInputToGroups, createConfigBuilder, darker, interpolate, lighter, rem, resolveConfig, uds } from "./createConfig.js";
16
+ import { DetectTokenValueTypeGroup, DetectTokenValueTypeInput, ResolvedStyleProp, ResolvedToken, detectTokenValueType, getColorOpacityMap, resolveStyleProp } from "./resolveStyleProp.js";
17
+ import { Styler, createStyler } from "./createStyler.js";
18
+ import { TokenWithModifier, darken, isTokenWithModifier, lighten, resolveTokenValue, resolveTokenWithModifier } from "./refs.js";
19
+ import { ResolvedCompoundOverrides, ResolvedLayerOverride, applyCompoundProps, isLayerHidden, resolveCompoundProps } from "./resolveCompoundProps.js";
11
20
  import { SerializedConfig, TokenRef, buildReverseMap, deserializeConfig, serializeConfig } from "./serialize.js";
12
- import { ComponentsConfig as ComponentsConfig$1 } from "@uds/types";
13
- export { type ComponentsConfig$1 as ComponentsConfig };
21
+ import { sniffTokenTypeFromValue } from "./sniffTokenType.js";
22
+ import { BUILT_IN_PSEUDO, DynamicRule, ProcessStylePropsOpts, ProcessStylePropsResult, ResolvedModifier, StylePropEntry, StylePropRuntimeData, buildStylePropRuntime, processStyleProps } from "./style-prop-runtime.js";
@@ -1,11 +1,15 @@
1
- import "./component-resolution.js";
2
- import "./consts/defaultColors.js";
1
+ import "./className.js";
2
+ import "./component-config.js";
3
3
  import "./propertyAcceptedTypes.js";
4
4
  import "./refs.js";
5
- import "./resolveTokenTypes.js";
5
+ import "./sniffTokenType.js";
6
6
  import "./resolveStyleProp.js";
7
7
  import "./createConfig.js";
8
+ import "./createStyler.js";
8
9
  import "./defineComponent.js";
10
+ import "./defineCompositeStyle.js";
11
+ import "./definePreview.js";
9
12
  import "./defineStyleProp.js";
10
- import "./propertyGroups.js";
13
+ import "./resolveCompoundProps.js";
11
14
  import "./serialize.js";
15
+ import "./style-prop-runtime.js";
@@ -0,0 +1,51 @@
1
+ //#region ../config/dist/merge-utils.js
2
+ function flattenAtomic(atomic) {
3
+ const entries = [];
4
+ for (const group of atomic) for (const property of group.properties) for (const token of group.tokens) entries.push({
5
+ property,
6
+ cssPrefix: group.cssPrefix,
7
+ namespace: group.namespace,
8
+ groupType: group.type,
9
+ groupDescription: group.description,
10
+ token
11
+ });
12
+ return entries;
13
+ }
14
+ function tokenKey(entry) {
15
+ return `${entry.property}|${entry.cssPrefix ?? ""}|${entry.token.name}`;
16
+ }
17
+ function mergeAtomic(base, incoming, mode) {
18
+ if (incoming.length === 0) return base;
19
+ if (base.length === 0) return incoming;
20
+ const baseEntries = flattenAtomic(base);
21
+ const incomingEntries = flattenAtomic(incoming);
22
+ const merged = /* @__PURE__ */ new Map();
23
+ for (const entry of baseEntries) merged.set(tokenKey(entry), entry);
24
+ for (const entry of incomingEntries) {
25
+ const key = tokenKey(entry);
26
+ if (mode === "preserve" && merged.has(key)) continue;
27
+ merged.set(key, entry);
28
+ }
29
+ const regrouped = /* @__PURE__ */ new Map();
30
+ for (const entry of merged.values()) {
31
+ const groupKey = `${entry.property}|${entry.cssPrefix ?? ""}`;
32
+ const existing = regrouped.get(groupKey);
33
+ if (existing) {
34
+ existing.tokens.push(entry.token);
35
+ if (entry.groupType) existing.type = entry.groupType;
36
+ if (entry.groupDescription) existing.description = entry.groupDescription;
37
+ continue;
38
+ }
39
+ regrouped.set(groupKey, {
40
+ properties: [entry.property],
41
+ ...entry.namespace ? { namespace: entry.namespace } : {},
42
+ ...entry.cssPrefix ? { cssPrefix: entry.cssPrefix } : {},
43
+ ...entry.groupType ? { type: entry.groupType } : {},
44
+ ...entry.groupDescription ? { description: entry.groupDescription } : {},
45
+ tokens: [entry.token]
46
+ });
47
+ }
48
+ return Array.from(regrouped.values());
49
+ }
50
+ //#endregion
51
+ export { mergeAtomic };
@@ -0,0 +1,19 @@
1
+ import { CssValueTypeName } from "./types/css-values.js";
2
+
3
+ //#region ../config/dist/propertyAcceptedTypes.d.ts
4
+ //#region src/propertyAcceptedTypes.d.ts
5
+ interface PropertyAccept {
6
+ /** CSS value types accepted by the property (e.g. `'length-percentage'`). */
7
+ readonly types?: readonly CssValueTypeName[];
8
+ /** Literal keyword values accepted by the property (e.g. `'auto'`). */
9
+ readonly literals?: readonly string[];
10
+ }
11
+ declare const PROPERTY_ACCEPTED_TYPES: ReadonlyMap<string, PropertyAccept>;
12
+ /**
13
+ * Whether a token with the given detected value type AND raw string value
14
+ * is accepted by the CSS property. Returns `true` for any property not in
15
+ * the table.
16
+ */
17
+ declare function isTokenAcceptedByProperty(cssProperty: string, valueType: CssValueTypeName | undefined, rawValue: string): boolean; //#endregion
18
+ //#endregion
19
+ export { PROPERTY_ACCEPTED_TYPES, PropertyAccept, isTokenAcceptedByProperty };