@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,2 @@
1
+ import "../../../utils/dist/index.js";
2
+ import "../../../config/dist/index.js";
@@ -1,6 +1,6 @@
1
- import { RegisteredStyleProps } from "./component-refs.js";
1
+ import { RegisteredComposites, RegisteredModifiers, RegisteredStyleProps } from "./component-refs.js";
2
2
  import { ComponentConfigValue, HtmlTag, LayerInput, PropBinding } from "./component-config.js";
3
- import { ComponentPropsWithoutRef, HTMLAttributes, JSX } from "react";
3
+ import { ComponentPropsWithRef, HTMLAttributes, JSX, ReactNode } from "react";
4
4
 
5
5
  //#region ../config/dist/Props.d.ts
6
6
  //#region src/Props.d.ts
@@ -8,13 +8,38 @@ import { ComponentPropsWithoutRef, HTMLAttributes, JSX } from "react";
8
8
  * Resolve the native HTML-attribute surface for the config's root tag.
9
9
  *
10
10
  * - When `TTag` is a known `JSX.IntrinsicElements` key (`'a'`, `'div'`,
11
- * `'button'`, …), use `ComponentPropsWithoutRef<TTag>` so element-
12
- * specific attrs land in the prop type (`href` on `'a'`, `disabled`
13
- * on `'button'`, etc.).
11
+ * `'button'`, …), use `ComponentPropsWithRef<TTag>` so element-
12
+ * specific attrs *and* the React 19 `ref` prop both land in the prop
13
+ * type (`href` on `'a'`, `disabled` on `'button'`, `ref` on every
14
+ * intrinsic).
14
15
  * - Otherwise (no tag captured — e.g. the root is a brace-ref or
15
16
  * composed-layer), fall back to the generic `HTMLAttributes<HTMLElement>`.
16
17
  */
17
- type ElementProps<TTag extends HtmlTag | undefined> = TTag extends keyof JSX.IntrinsicElements ? ComponentPropsWithoutRef<TTag> : HTMLAttributes<HTMLElement>;
18
+ type ElementProps<TTag extends HtmlTag | undefined> = TTag extends keyof JSX.IntrinsicElements ? ComponentPropsWithRef<TTag> : HTMLAttributes<HTMLElement>;
19
+ /**
20
+ * Props inherited from the wrapped component when the root layer is a
21
+ * component value or a `ComposedLayer` `{ component, defaultProps }`
22
+ * form. Returns the wrapped component's own resolved `Props<...>`
23
+ * shape so a wrapper's JSX surface inherits everything the wrapped
24
+ * component accepts. Returns `{}` when the root isn't composed.
25
+ *
26
+ * Reads the `__config` slot off the layer value (or the
27
+ * `ComposedLayer`'s `component` field) and recursively resolves
28
+ * `Props<TInnerConfig>`. Falls back to the legacy
29
+ * `RegisteredComponents[name]` lookup when the layer is the
30
+ * shape so a wrapper's JSX surface inherits everything the wrapped
31
+ * component accepts. Returns `{}` when the root isn't composed.
32
+ *
33
+ * Reads the `__config` slot off the layer value directly. Authoring
34
+ * uses bare `defineComponent`-produced values (`layers: { root: Box }`)
35
+ * — there's no longer a `{ component, defaultProps }` wrapper layer
36
+ * to walk through.
37
+ */
38
+ type ComposedRootProps<TLayers> = TLayers extends {
39
+ root: infer R;
40
+ } ? R extends {
41
+ readonly __config: infer TInnerConfig extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>;
42
+ } ? Props<TInnerConfig> : {} : {};
18
43
  /**
19
44
  * Resolve the allowed-value union for one registered style prop.
20
45
  * Falls back to `string` when the prop registered no tokens (codegen
@@ -22,26 +47,104 @@ type ElementProps<TTag extends HtmlTag | undefined> = TTag extends keyof JSX.Int
22
47
  */
23
48
  type StylePropValue<K extends keyof RegisteredStyleProps> = [RegisteredStyleProps[K]] extends [never] ? string : RegisteredStyleProps[K];
24
49
  /**
25
- * Extract the registered style-prop name from a binding value:
26
- * - `'{bg}'` → `'bg'`
27
- * - `{ styleProp: '{bg}' }` → `'bg'`
50
+ * Extract the registered style-prop name from a `StylePropMarker`
51
+ * binding — `{ __kind: 'styleProp', ref: 'bg', layer }` → `'bg'`.
28
52
  * Returns `never` for non-matching forms.
29
53
  */
30
- type StylePropRefName<TBinding> = TBinding extends `{${infer N}}` ? N extends keyof RegisteredStyleProps & string ? N : never : TBinding extends {
31
- styleProp: `{${infer N}}`;
54
+ type StylePropRefName<TBinding> = TBinding extends {
55
+ readonly __kind: 'styleProp';
56
+ readonly ref: infer N;
32
57
  } ? N extends keyof RegisteredStyleProps & string ? N : never : never;
58
+ /**
59
+ * Extract the registered composite-group name from a `composite()`
60
+ * marker binding:
61
+ * - `{ __kind: 'composite', ref: 'textVariant' }` → `'textVariant'`
62
+ * (the marker stores the bare name — no brace-ref wrapping; the
63
+ * `composite()` call's position already establishes the
64
+ * composite-ref context.)
65
+ * Returns `never` for non-matching forms.
66
+ */
67
+ type CompositeRefName<TBinding> = TBinding extends {
68
+ readonly __kind: 'composite';
69
+ readonly ref: infer N;
70
+ } ? N extends keyof RegisteredComposites & string ? N : never : never;
71
+ /**
72
+ * Resolve the allowed-value union for a registered composite group —
73
+ * the union of `styles` keys. Falls back to `string` when the
74
+ * registry isn't populated (e.g. inside `@uds/config`'s own tests
75
+ * where codegen-emitted augmentation isn't loaded).
76
+ */
77
+ type CompositeValue<K extends keyof RegisteredComposites> = RegisteredComposites[K] extends {
78
+ styles: infer S;
79
+ } ? keyof S & string : string;
80
+ /**
81
+ * Detect a `slot('layer')` / `slot('layer/prop')` marker. Authoring
82
+ * surface stamps `__kind: 'slot'` on the value so the render-fn
83
+ * arg can be typed as `ReactNode` — slot props always route their
84
+ * value into a layer's children (or named slot prop), so a node is
85
+ * the only thing they can legally carry.
86
+ */
87
+ /**
88
+ * Resolve the JSX-value type for a `slot('layer/prop')` marker by
89
+ * looking up `prop` on the target layer's surface:
90
+ *
91
+ * - **Composed-component layer** — read `Props<TInnerConfig>[prop]`,
92
+ * so `slot('button/onClick')` types as the click-handler the
93
+ * wrapped component declares.
94
+ * - **HTML-tag layer** (bare-tag `'div'` or `{ tag: 'a', attrs }`) —
95
+ * read `ComponentPropsWithRef<tag>[prop]`, so `slot('link/href')`
96
+ * types as `string | undefined`.
97
+ * - Unknown layer / unknown prop falls back to `ReactNode` (the
98
+ * common case for slots and a safe default when the type system
99
+ * can't pinpoint).
100
+ */
101
+ type SlotTargetKey<A> = [A] extends [string] ? A : 'children';
102
+ type SlotPropValue<TBinding, TLayers> = TBinding extends {
103
+ readonly __kind: 'slot';
104
+ readonly layer: infer L extends keyof TLayers & string;
105
+ readonly prop?: infer A;
106
+ } ? TLayers[L] extends {
107
+ readonly __config: infer TInner extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>;
108
+ } ? SlotTargetKey<A> extends keyof Props<TInner> ? Props<TInner>[SlotTargetKey<A> & keyof Props<TInner>] : ReactNode : TLayers[L] extends keyof JSX.IntrinsicElements ? SlotTargetKey<A> extends keyof ComponentPropsWithRef<TLayers[L]> ? ComponentPropsWithRef<TLayers[L]>[SlotTargetKey<A> & keyof ComponentPropsWithRef<TLayers[L]>] : ReactNode : TLayers[L] extends {
109
+ readonly tag: infer T extends keyof JSX.IntrinsicElements;
110
+ } ? SlotTargetKey<A> extends keyof ComponentPropsWithRef<T> ? ComponentPropsWithRef<T>[SlotTargetKey<A> & keyof ComponentPropsWithRef<T>] : ReactNode : ReactNode : ReactNode;
111
+ type IsSlotMarker<TBinding> = TBinding extends {
112
+ readonly __kind: 'slot';
113
+ } ? true : false;
33
114
  /**
34
115
  * Walk the config's `props` block and produce one optional JSX prop
35
- * per entry.
116
+ * per entry:
117
+ *
118
+ * - `slot('layer/prop')` markers narrow to the value type the target
119
+ * layer exposes under `prop` — see {@link SlotPropValue}.
120
+ * - `styleProp(ref)` markers narrow to the registered token union.
121
+ * - `composite(ref)` markers narrow to the composite group's `styles`
122
+ * keys union.
123
+ * - Anything unrecognized stays open as `unknown`.
36
124
  */
37
- type PropsFromConfig<TProps> = { [K in keyof TProps]?: StylePropRefName<TProps[K]> extends never ? unknown : StylePropValue<Extract<StylePropRefName<TProps[K]>, keyof RegisteredStyleProps>> };
125
+ type PropsFromConfig<TProps, TLayers> = { [K in keyof TProps]?: IsSlotMarker<TProps[K]> extends true ? SlotPropValue<TProps[K], TLayers> : StylePropRefName<TProps[K]> extends never ? CompositeRefName<TProps[K]> extends never ? unknown : CompositeValue<Extract<CompositeRefName<TProps[K]>, keyof RegisteredComposites>> : StylePropValue<Extract<StylePropRefName<TProps[K]>, keyof RegisteredStyleProps>> };
38
126
  /**
39
127
  * Force TypeScript to fully evaluate a mapped/conditional type so the
40
128
  * hover display shows the resolved shape (`bg?: 'brand' | 'accent'`)
41
129
  * instead of the unevaluated type expression
42
- * (`PropsFromConfig<{ readonly bg: '{bg}' }>`).
130
+ * (`PropsFromConfig<{ readonly bg: StylePropMarker<'root', 'bg'> }>`).
43
131
  */
44
132
  type Prettify<T> = { [K in keyof T]: T[K] } & {};
133
+ /**
134
+ * `layerProps={{ overlay: { bg: '...' }, panel: { width: '...' } }}` — the
135
+ * value-type for one layer. If the layer is a defined component (carries a
136
+ * `__config` slot), use that component's full `Props<...>` surface so style
137
+ * props, modifiers, and HTML attrs all autocomplete. Otherwise (a bare
138
+ * HTML-tag string layer), widen to a permissive style-prop bag.
139
+ */
140
+ type LayerPropsValue<TLayer> = TLayer extends {
141
+ readonly __config: infer TInner extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>;
142
+ } ? Partial<Props<TInner>> : Partial<HTMLAttributes<HTMLElement>> & { [K in keyof RegisteredStyleProps]?: StylePropValue<K> };
143
+ /**
144
+ * `{ overlay?: ..., panel?: ..., dismiss?: ..., ... }` — every layer in
145
+ * `TLayers` is reachable.
146
+ */
147
+ type LayerPropsMap<TLayers extends Record<string, LayerInput>> = { [K in keyof TLayers]?: LayerPropsValue<TLayers[K]> };
45
148
  /**
46
149
  * Standard `data-*` attributes are valid on every HTML element by spec.
47
150
  * React 19's bundled types don't carry an index signature for them, so
@@ -51,24 +154,57 @@ type Prettify<T> = { [K in keyof T]: T[K] } & {};
51
154
  interface DataAttrs {
52
155
  [key: `data-${string}`]: unknown;
53
156
  }
157
+ /**
158
+ * Component prop surface without modifiers — the "base" type that
159
+ * `Props<TConfig>` wraps with `RegisteredModifiers<PropsBase<TConfig>>`.
160
+ *
161
+ * Splitting the modifier layer out breaks a self-reference cycle:
162
+ * TS can resolve `RegisteredModifiers<PropsBase<TConfig>>` because
163
+ * PropsBase doesn't reference itself, but
164
+ * `RegisteredModifiers<Props<TConfig>>` directly inside `Props<TConfig>`
165
+ * leaves TS unable to materialize the recursive shape and the
166
+ * modifier keys collapse to nothing at consumer call sites.
167
+ *
168
+ * Modifier values consequently autocomplete against the component's
169
+ * full top-level surface but don't carry recursive modifier nesting
170
+ * (`_hover={{ _focus: { ... } }}` won't typecheck through this path).
171
+ * Codegen-emitted `Registered${Name}Props` keeps the recursive shape
172
+ * because it self-references through a *named* alias the compiler
173
+ * can name-resolve lazily — `Props<TConfig>` can't replicate that.
174
+ */
175
+ type PropsBase<TConfig extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>> = TConfig extends ComponentConfigValue<infer TLayers extends Record<string, LayerInput>, infer TProps extends Record<string, PropBinding>, infer TTag extends HtmlTag | undefined> ? PropsFromConfig<TProps, TLayers> & Omit<ComposedRootProps<TLayers>, keyof TProps> & Omit<ElementProps<TTag>, keyof TProps | keyof ComposedRootProps<TLayers>> & DataAttrs & {
176
+ as?: keyof JSX.IntrinsicElements;
177
+ layerProps?: LayerPropsMap<TLayers>;
178
+ } : never;
54
179
  /**
55
180
  * Public derived-props type.
56
181
  *
57
- * Four layers:
182
+ * Layers — same shape codegen emits for `Registered${Name}Props` in
183
+ * `uds-env.d.ts` so `React.ComponentProps<typeof Box>` resolves to a
184
+ * type structurally equivalent to `RegisteredBoxProps<'div'>`:
185
+ *
58
186
  * 1. `PropsFromConfig<TConfig['props']>` — the config's declared props.
59
- * 2. `ElementProps<TTag>` — native attrs narrowed to the root tag when
60
- * statically known (e.g. `href` on `'a'`), otherwise generic
61
- * `HTMLAttributes<HTMLElement>`. Anything colliding with (1) is
62
- * stripped out so custom props' value unions don't get widened.
63
- * 3. `DataAttrs` permissive `data-*` index signature.
64
- * 4. Polymorphic `as` prop (open-ended `string` for now).
187
+ * 2. `ComposedRootProps<TLayers>` — the wrapped component's registered
188
+ * prop shape when the root layer is a ComposedLayer
189
+ * (`{ component: '{Box}' }`). Falls back to `{}` otherwise.
190
+ * 3. `Omit<ComponentPropsWithRef<TTag>, ...>` native attrs narrowed
191
+ * to the root tag (or the wrapper's `defaultProps.as` for value-
192
+ * extends captured as TTag at defineComponent time). Anything
193
+ * colliding with (1) or (2) is stripped out.
194
+ * 4. `DataAttrs` — permissive `data-*` index signature (React's
195
+ * `ComponentPropsWithRef` doesn't carry this).
196
+ * 5. `RegisteredModifiers<PropsBase<TConfig>>` — narrowed
197
+ * `_<modifier>` keys with `Partial<...>` values. Augmented by
198
+ * codegen from `BUILT_IN_PSEUDO` + config-defined modes + custom
199
+ * modifiers.
200
+ * 6. Polymorphic `as` prop — `keyof JSX.IntrinsicElements` so the
201
+ * value is a real tag name, matching codegen's emission.
65
202
  */
66
- type Props<TConfig extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>> = TConfig extends ComponentConfigValue<Record<string, LayerInput>, infer TProps extends Record<string, PropBinding>, infer TTag extends HtmlTag | undefined> ? Prettify<PropsFromConfig<TProps> & Omit<ElementProps<TTag>, keyof TProps> & DataAttrs & {
67
- as?: string;
68
- }> : never;
203
+ type Props<TConfig extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined>> = Prettify<PropsBase<TConfig> & RegisteredModifiers<PropsBase<TConfig>>>;
69
204
  /**
70
205
  * `Props<typeof boxConfig>` for the common 'use the config's inferred
71
206
  * type' invocation. Keeps `box.tsx` from having to repeat the generic.
72
207
  */
208
+ type PropsOf<TConfig> = TConfig extends ComponentConfigValue<Record<string, LayerInput>, Record<string, PropBinding>, HtmlTag | undefined> ? Props<TConfig> : never; //#endregion
73
209
  //#endregion
74
- export { Props };
210
+ export { Props, PropsOf };
@@ -0,0 +1,16 @@
1
+ import { LayerBundle, LayerInput } from "./component-config.js";
2
+
3
+ //#region ../config/dist/bindRender.d.ts
4
+ //#region src/bindRender.d.ts
5
+ /**
6
+ * Arguments handed to the user's render function. `props` is keyed by
7
+ * the component's layer names; `children` is React's standard
8
+ * children. Extra incoming props that aren't claimed by the config
9
+ * arrive on the same object.
10
+ */
11
+ interface CreateComponentRenderArgs<TLayers extends Record<string, LayerInput>> {
12
+ props: { [K in keyof TLayers]: LayerBundle };
13
+ [key: string]: unknown;
14
+ } //#endregion
15
+ //#endregion
16
+ export { CreateComponentRenderArgs };
@@ -0,0 +1,310 @@
1
+ import { buildStylePropClassName } from "./className.js";
2
+ import { kebabCase } from "../../utils/dist/string-utils/kebabCase.js";
3
+ import { componentCompoundClass, componentSlotClass, componentVariantClass } from "../../utils/dist/string-utils/componentClassName.js";
4
+ import "../../utils/dist/index.js";
5
+ import { getRegisteredComposite, getRegisteredStyleProp } from "./runtime-registry.js";
6
+ //#region ../config/dist/bindRender.js
7
+ /**
8
+ * **NEW-API ONLY** — internal runtime for `defineComponent`-authored
9
+ * configs. Binds a config to a React render function and walks the
10
+ * `layers` / `props` blocks on every render to produce `LayerBundle`s.
11
+ *
12
+ * Does NOT touch any legacy `createComponent` / `defineComponents`
13
+ * code path. The legacy `createComponent` factory lives in
14
+ * `@uds/components` and has its own runtime (className composition
15
+ * via `getStyles` / `processStyleProps`).
16
+ *
17
+ * Render-time behavior:
18
+ *
19
+ * 1. The framework walks each entry in `config.layers` and builds a
20
+ * `LayerBundle` per layer — a `className` string plus any HTML
21
+ * attrs / forwarded props. Primitive layers with `defaultProps`
22
+ * pick up the deterministic `componentName-layerName` @utility
23
+ * class (the same one codegen emits from those defaults).
24
+ *
25
+ * 2. Incoming JSX props are partitioned per the `props` config:
26
+ * style-prop bindings → contribute classes to a specific layer's
27
+ * bundle; composite bindings → expand to multiple layers' bundles;
28
+ * surface forwards → land verbatim on the target layer's bundle;
29
+ * bool/enum markers → contribute data-attrs or per-layer overrides.
30
+ *
31
+ * 3. The render function receives `{ props, children, ...rest }` where
32
+ * `props.<layer>` is the computed bundle for that layer and
33
+ * `...rest` carries any props that weren't claimed by the config.
34
+ *
35
+ * Exported surface: `bindRender` (consumed by `defineComponent.ts`).
36
+ */
37
+ /**
38
+ * Type-guard: a `StylePropMarker` is the helper-emitted binding with
39
+ * `__kind: 'styleProp'`, `layer`, and `ref` (bare registered style-
40
+ * prop name). Authored via `styleProp(ref).on(layer)`.
41
+ */
42
+ function isStylePropMarker(binding) {
43
+ return typeof binding === "object" && binding !== null && binding.__kind === "styleProp" && typeof binding.ref === "string" && typeof binding.layer === "string";
44
+ }
45
+ /**
46
+ * Type-guard: a `StringMarker` carries only `__kind: 'string'`.
47
+ * Authored via `string()` — parallel to `bool()`, but the JSX value
48
+ * is a string written verbatim into `data-<kebab-name>="<value>"` on
49
+ * every layer's bundle.
50
+ */
51
+ function isStringMarker(binding) {
52
+ return typeof binding === "object" && binding !== null && binding.__kind === "string";
53
+ }
54
+ /**
55
+ * Type-guard: an `EnumMarker` carries the `__kind: 'enum'` brand and a
56
+ * `values` map (axis-value → per-layer style map). Authored via
57
+ * `enums({...})` in the `props` block of a verbose-form
58
+ * `defineComponent` call.
59
+ */
60
+ function isEnumMarker(binding) {
61
+ return typeof binding === "object" && binding !== null && binding.__kind === "enum";
62
+ }
63
+ /**
64
+ * Type-guard: a `BoolMarker` carries only the `__kind: 'bool'` brand.
65
+ * Authored via `bool()` in the `props` block (e.g. `loading: bool()`).
66
+ */
67
+ function isBoolMarker(binding) {
68
+ return typeof binding === "object" && binding !== null && binding.__kind === "bool";
69
+ }
70
+ /**
71
+ * Type-guard: a `SlotMarker` carries `__kind: 'slot'`, a `layer` name,
72
+ * and optionally an `as` target. Authored via `slot('layer')` or
73
+ * `slot('layer', { as: 'propName' })`.
74
+ */
75
+ function isSlotMarker(binding) {
76
+ return typeof binding === "object" && binding !== null && binding.__kind === "slot" && typeof binding.layer === "string";
77
+ }
78
+ /**
79
+ * Type-guard: a `CompositeMarker` carries `__kind: 'composite'` and a
80
+ * brace-ref `ref` field pointing at a registered composite group.
81
+ * Authored via `composite('{textVariant}')` in the `props` block —
82
+ * the implicit-root-layer shorthand for composite bindings.
83
+ */
84
+ function isCompositeMarker(binding) {
85
+ return typeof binding === "object" && binding !== null && binding.__kind === "composite" && typeof binding.ref === "string";
86
+ }
87
+ /**
88
+ * Type-guard: a layer value is a component value (a `defineComponent`
89
+ * result). Recognized by the `__config` brand attached to every bound
90
+ * component. Stand-alone primitives (a `string` tag, `{ tag, attrs }`)
91
+ * never carry `__config` so the discriminator is unambiguous.
92
+ */
93
+ function isComposedComponentValue(value) {
94
+ return typeof value === "function" && "__config" in value;
95
+ }
96
+ /**
97
+ * Append a className to a layer bundle, joining with a space if a class
98
+ * was already accumulated. Empty / falsy contributions are dropped.
99
+ */
100
+ function appendClassName(bundle, className) {
101
+ if (!className) return;
102
+ const existing = bundle.className;
103
+ bundle.className = existing ? `${existing} ${className}` : className;
104
+ }
105
+ /**
106
+ * Build an initial `LayerBundle` for a layer.
107
+ *
108
+ * - `PrimitiveLayer.attrs` — locked HTML attrs (`role="alert"`,
109
+ * `aria-live="polite"`, …) seeded onto the bundle so the rendered
110
+ * element carries them.
111
+ * - Bare-tag string layers (`'div'`), bare component-value layers
112
+ * (`{ root: Card }`) — bundle starts empty; per-layer base styles
113
+ * come from the config's top-level `base: { <layer>: {...} }`
114
+ * block in a later pass.
115
+ */
116
+ function buildLayerBundle(layer, _layerName, _componentName) {
117
+ const bundle = {};
118
+ if (layer === null || layer === void 0) return bundle;
119
+ if (isComposedComponentValue(layer)) return bundle;
120
+ if (typeof layer !== "object") return bundle;
121
+ if ("tag" in layer) {
122
+ const { attrs } = layer;
123
+ if (attrs) for (const [key, value] of Object.entries(attrs)) bundle[key] = value;
124
+ }
125
+ return bundle;
126
+ }
127
+ /**
128
+ * Internal: bind a config to a render function and return a React.FC.
129
+ * Shared by `createComponent` (public, type-explicit two-arg form) and
130
+ * `defineComponent` (primitive auto-render + chained `.render()`).
131
+ */
132
+ function bindRender(config, render, options) {
133
+ const Component = (incomingProps) => {
134
+ const componentName = config.__componentName;
135
+ const configDefaults = config.defaultProps;
136
+ const effectiveProps = configDefaults ? {
137
+ ...configDefaults,
138
+ ...incomingProps
139
+ } : incomingProps;
140
+ const bundles = {};
141
+ for (const [layerName, layerValue] of Object.entries(config.layers)) bundles[layerName] = buildLayerBundle(layerValue, layerName, componentName);
142
+ const baseBlock = config.base;
143
+ if (baseBlock && componentName) for (const layerName of Object.keys(baseBlock)) {
144
+ const target = bundles[layerName];
145
+ if (!target) continue;
146
+ appendClassName(target, componentSlotClass(componentName, layerName));
147
+ }
148
+ const claimedKeys = /* @__PURE__ */ new Set();
149
+ const propsBlock = config.props;
150
+ if (propsBlock) for (const [jsxPropKey, binding] of Object.entries(propsBlock)) {
151
+ const incoming = effectiveProps[jsxPropKey];
152
+ if (isStylePropMarker(binding)) {
153
+ claimedKeys.add(jsxPropKey);
154
+ if (incoming === void 0 || incoming === null || incoming === false) continue;
155
+ const styleProp = getRegisteredStyleProp(binding.ref);
156
+ if (!styleProp) continue;
157
+ const target = bundles[binding.layer];
158
+ if (!target) continue;
159
+ const className = buildStylePropClassName(styleProp, incoming);
160
+ if (className) appendClassName(target, className);
161
+ continue;
162
+ }
163
+ if (isEnumMarker(binding)) {
164
+ claimedKeys.add(jsxPropKey);
165
+ if (incoming === void 0 || incoming === null || !componentName) continue;
166
+ const valueKey = String(incoming);
167
+ const perLayerStyles = binding.values[valueKey];
168
+ if (typeof perLayerStyles !== "object" || perLayerStyles === null) continue;
169
+ for (const layerName of Object.keys(perLayerStyles)) {
170
+ const target = bundles[layerName];
171
+ if (!target) continue;
172
+ appendClassName(target, componentVariantClass(componentName, layerName, jsxPropKey, valueKey));
173
+ }
174
+ continue;
175
+ }
176
+ if (isSlotMarker(binding)) {
177
+ if (!binding.layer) continue;
178
+ claimedKeys.add(jsxPropKey);
179
+ if (incoming === void 0 || incoming === null) continue;
180
+ const target = bundles[binding.layer];
181
+ if (!target) continue;
182
+ target[binding.prop ?? "children"] = incoming;
183
+ continue;
184
+ }
185
+ if (isCompositeMarker(binding)) {
186
+ claimedKeys.add(jsxPropKey);
187
+ if (incoming === void 0 || incoming === null) continue;
188
+ const refName = binding.ref;
189
+ if (!refName) continue;
190
+ const composite = getRegisteredComposite(refName);
191
+ if (!composite) continue;
192
+ const valueKey = String(incoming);
193
+ if (!composite.styles[valueKey]) continue;
194
+ const rootBundle = bundles.root;
195
+ if (!rootBundle) continue;
196
+ appendClassName(rootBundle, `${refName}-${valueKey.replace(/\./g, "_").replace(/\//g, "-")}`);
197
+ continue;
198
+ }
199
+ if (isBoolMarker(binding)) {
200
+ claimedKeys.add(jsxPropKey);
201
+ if (!incoming) continue;
202
+ const attrName = `data-${kebabCase(jsxPropKey)}`;
203
+ for (const layerName of Object.keys(bundles)) {
204
+ const target = bundles[layerName];
205
+ if (target) target[attrName] = "true";
206
+ }
207
+ continue;
208
+ }
209
+ if (isStringMarker(binding)) {
210
+ claimedKeys.add(jsxPropKey);
211
+ if (incoming === void 0 || incoming === null || incoming === "") continue;
212
+ const attrName = `data-${kebabCase(jsxPropKey)}`;
213
+ const attrValue = String(incoming);
214
+ for (const layerName of Object.keys(bundles)) {
215
+ const target = bundles[layerName];
216
+ if (target) target[attrName] = attrValue;
217
+ }
218
+ }
219
+ }
220
+ const compoundProps = config.compoundProps;
221
+ if (compoundProps && componentName) for (const entry of compoundProps) {
222
+ const conditions = {};
223
+ let match = true;
224
+ for (const [conditionKey, conditionValue] of Object.entries(entry.when)) {
225
+ const incoming = effectiveProps[conditionKey];
226
+ if (incoming === void 0 || incoming === null) {
227
+ match = false;
228
+ break;
229
+ }
230
+ const incomingStr = String(incoming);
231
+ if (incomingStr !== String(conditionValue)) {
232
+ match = false;
233
+ break;
234
+ }
235
+ conditions[conditionKey] = incomingStr;
236
+ }
237
+ if (!match) continue;
238
+ for (const [layerName, layerOverride] of Object.entries(entry.layers)) {
239
+ const target = bundles[layerName];
240
+ if (!target) continue;
241
+ if (layerOverride?.__kind === "hidden") {
242
+ target.__hidden = true;
243
+ continue;
244
+ }
245
+ appendClassName(target, componentCompoundClass(componentName, layerName, conditions));
246
+ }
247
+ }
248
+ const layerPropsValue = effectiveProps.layerProps;
249
+ if (typeof layerPropsValue === "object" && layerPropsValue !== null && !Array.isArray(layerPropsValue)) {
250
+ claimedKeys.add("layerProps");
251
+ for (const [layerName, overrides] of Object.entries(layerPropsValue)) {
252
+ if (typeof overrides !== "object" || overrides === null || Array.isArray(overrides)) continue;
253
+ const bundle = bundles[layerName];
254
+ if (!bundle) continue;
255
+ for (const [propKey, propValue] of Object.entries(overrides)) {
256
+ if (propKey.startsWith("_")) {
257
+ if (typeof propValue !== "object" || propValue === null) continue;
258
+ const variantName = propKey.slice(1);
259
+ for (const [innerKey, innerValue] of Object.entries(propValue)) {
260
+ const styleProp = getRegisteredStyleProp(innerKey);
261
+ if (!styleProp) continue;
262
+ const className = buildStylePropClassName(styleProp, innerValue);
263
+ if (className) appendClassName(bundle, `${variantName}:${className}`);
264
+ }
265
+ continue;
266
+ }
267
+ const styleProp = getRegisteredStyleProp(propKey);
268
+ if (styleProp) {
269
+ if (propValue === void 0 || propValue === null || propValue === false) continue;
270
+ const className = buildStylePropClassName(styleProp, propValue);
271
+ if (className) appendClassName(bundle, className);
272
+ continue;
273
+ }
274
+ if (propKey === "className" && typeof propValue === "string") {
275
+ appendClassName(bundle, propValue);
276
+ continue;
277
+ }
278
+ bundle[propKey] = propValue;
279
+ }
280
+ }
281
+ }
282
+ const rootBundleForMods = bundles.root;
283
+ for (const [key, value] of Object.entries(effectiveProps)) {
284
+ if (!key.startsWith("_")) continue;
285
+ if (claimedKeys.has(key)) continue;
286
+ claimedKeys.add(key);
287
+ if (!rootBundleForMods) continue;
288
+ if (typeof value !== "object" || value === null) continue;
289
+ const variantName = key.slice(1);
290
+ for (const [innerKey, innerValue] of Object.entries(value)) {
291
+ const styleProp = getRegisteredStyleProp(innerKey);
292
+ if (!styleProp) continue;
293
+ const baseClass = buildStylePropClassName(styleProp, innerValue);
294
+ if (!baseClass) continue;
295
+ appendClassName(rootBundleForMods, `${variantName}:${baseClass}`);
296
+ }
297
+ }
298
+ const passthrough = {};
299
+ for (const [key, value] of Object.entries(effectiveProps)) if (!claimedKeys.has(key)) passthrough[key] = value;
300
+ return render({
301
+ ...passthrough,
302
+ props: bundles
303
+ });
304
+ };
305
+ const displayName = options?.displayName || render.displayName || render.name?.trim() || void 0;
306
+ if (displayName) Component.displayName = displayName;
307
+ return Component;
308
+ }
309
+ //#endregion
310
+ export { bindRender };
@@ -0,0 +1,54 @@
1
+ //#region ../config/dist/className.d.ts
2
+ //#region src/className.d.ts
3
+ /**
4
+ * **NEW-API ONLY** — shared utility-class derivation for
5
+ * `defineComponent`-authored components.
6
+ *
7
+ * Single source of truth for `(prop, value, styleProp) → class`.
8
+ * Consumed by:
9
+ *
10
+ * - `bindRender.ts` (runtime) — emits the per-layer className
11
+ * bundle as JSX renders.
12
+ * - `getStylesForConfig.ts` (build-time) — derives the same
13
+ * className list for the CSS scanner's safelist so the purger
14
+ * keeps every class the runtime can produce.
15
+ *
16
+ * Both paths MUST agree on the className shape. Centralising the
17
+ * derivation here is the contract: any change to the convention
18
+ * (e.g. boolean-alias handling) updates one place and both paths
19
+ * stay in lockstep.
20
+ *
21
+ * Does NOT touch the legacy `@uds/core`'s `getStyles` /
22
+ * `propMappings` — that's the legacy `createComponent` factory's
23
+ * world and lives in a different package.
24
+ */
25
+ /**
26
+ * Build the utility-class name a style prop emits for a given
27
+ * JSX-level value. Mirrors the codegen convention in
28
+ * `prepareCss.ts`'s @utility emission:
29
+ *
30
+ * - `classPrefix === ''` — the value IS the class (e.g.
31
+ * `<Box display="block">` → `.block`).
32
+ * - Boolean `true` — the class IS the bare `classPrefix`
33
+ * (`<Box border>` / `<Box border={true}>` → `.border`, never
34
+ * `.border-true`). Falsy (`undefined` / `null` / `false`) →
35
+ * `undefined`, so the caller omits the class entirely. The "no
36
+ * border" state is the default; adding a class to undo one that
37
+ * was never applied is pointless.
38
+ * - Bracketed arbitrary values (`'[#abc]'`, `'[100px]'`) keep
39
+ * their brackets verbatim: `bg-[#abc]`, `w-[100px]`.
40
+ * - Otherwise: `${classPrefix}-${safeTokenName(value)}`. Authors
41
+ * write the original token name (`'1.5'`); the @utility block
42
+ * is keyed by the class-name-safe form (`'1_5'`), so apply the
43
+ * conversion at emit time. Bracketed arbitrary values are left
44
+ * alone — Tailwind's wildcard utility expansion expects them
45
+ * verbatim.
46
+ *
47
+ * Returns `undefined` when no class should be emitted — callers
48
+ * skip the contribution rather than push a malformed token.
49
+ */
50
+ declare function buildStylePropClassName(styleProp: {
51
+ classPrefix: string;
52
+ }, value: unknown): string | undefined; //#endregion
53
+ //#endregion
54
+ export { buildStylePropClassName };