@yahoo/uds-v5-wip 1.60.0 → 1.62.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 (605) hide show
  1. package/dist/config/dist/AssetGroup.d.ts +75 -0
  2. package/dist/config/dist/AssetGroup.js +114 -0
  3. package/dist/config/dist/Component.d.ts +309 -0
  4. package/dist/config/dist/Component.js +897 -0
  5. package/dist/config/dist/ComponentGroup.d.ts +21 -0
  6. package/dist/config/dist/ComponentGroup.js +46 -0
  7. package/dist/config/dist/CompositeStyle.d.ts +28 -0
  8. package/dist/config/dist/CompositeStyle.js +52 -0
  9. package/dist/config/dist/Config.d.ts +422 -0
  10. package/dist/config/dist/Config.js +1426 -0
  11. package/dist/config/dist/Mode.d.ts +42 -0
  12. package/dist/config/dist/Mode.js +81 -0
  13. package/dist/config/dist/Modifier.d.ts +52 -0
  14. package/dist/config/dist/Modifier.js +97 -0
  15. package/dist/config/dist/MotionDef.d.ts +50 -0
  16. package/dist/config/dist/MotionDef.js +97 -0
  17. package/dist/config/dist/Props.d.ts +284 -39
  18. package/dist/config/dist/Provider.d.ts +21 -0
  19. package/dist/config/dist/Provider.js +14 -0
  20. package/dist/config/dist/StyleProp.d.ts +113 -0
  21. package/dist/config/dist/StyleProp.js +197 -0
  22. package/dist/config/dist/Token.d.ts +56 -0
  23. package/dist/config/dist/Token.js +112 -0
  24. package/dist/config/dist/TokenGroup.d.ts +33 -0
  25. package/dist/config/dist/TokenGroup.js +68 -0
  26. package/dist/config/dist/asset-kind.d.ts +56 -0
  27. package/dist/config/dist/asset-kind.js +29 -0
  28. package/dist/config/dist/brands.d.ts +31 -0
  29. package/dist/config/dist/brands.js +20 -0
  30. package/dist/config/dist/captureCallerPath.d.ts +49 -0
  31. package/dist/config/dist/captureCallerPath.js +95 -0
  32. package/dist/config/dist/colorExpressions.d.ts +132 -0
  33. package/dist/config/dist/colorExpressions.js +148 -0
  34. package/dist/config/dist/defineAssetGroup.d.ts +158 -0
  35. package/dist/config/dist/defineAssetGroup.js +263 -0
  36. package/dist/config/dist/defineProvider.d.ts +30 -0
  37. package/dist/config/dist/defineProvider.js +60 -0
  38. package/dist/config/dist/element-marker.d.ts +55 -0
  39. package/dist/config/dist/element-marker.js +113 -0
  40. package/dist/config/dist/entity-utils.d.ts +27 -0
  41. package/dist/config/dist/entity-utils.js +105 -0
  42. package/dist/config/dist/factories.d.ts +707 -0
  43. package/dist/config/dist/factories.js +393 -0
  44. package/dist/config/dist/foreign-component-name.js +42 -0
  45. package/dist/config/dist/index.d.ts +31 -13
  46. package/dist/config/dist/index.js +26 -10
  47. package/dist/config/dist/interpolate.d.ts +21 -0
  48. package/dist/{foundational-presets/dist/motion.js → config/dist/interpolate.js} +1 -1
  49. package/dist/config/dist/markers.d.ts +218 -0
  50. package/dist/config/dist/markers.js +67 -0
  51. package/dist/config/dist/refs.d.ts +159 -0
  52. package/dist/config/dist/refs.js +98 -71
  53. package/dist/config/dist/token-override-rows.d.ts +67 -0
  54. package/dist/config/dist/token-override-rows.js +223 -0
  55. package/dist/config/dist/tokenValueType.js +138 -0
  56. package/dist/config/dist/types/css-properties.d.ts +233 -0
  57. package/dist/config/dist/types/css-property-keywords.d.ts +157 -0
  58. package/dist/config/dist/types/css-property-keywords.js +616 -0
  59. package/dist/config/dist/types/css-values.d.ts +20 -17
  60. package/dist/config/dist/types.d.ts +697 -64
  61. package/dist/config/dist/units.d.ts +15 -0
  62. package/dist/config/dist/units.js +16 -0
  63. package/dist/config.d.ts +32 -1562
  64. package/dist/config.js +28 -21
  65. package/dist/loader/dist/_virtual/_rolldown/runtime.js +1 -2
  66. package/dist/loader/dist/index.d.ts +2 -0
  67. package/dist/loader/dist/index.js +3 -0
  68. package/dist/loader/dist/loader/artifacts.js +26 -9
  69. package/dist/loader/dist/loader/babel-utils.js +1 -29
  70. package/dist/loader/dist/loader.d.ts +17 -1
  71. package/dist/loader/dist/loader.js +56 -339
  72. package/dist/loader/dist/next.d.ts +2 -1
  73. package/dist/loader/dist/next.js +3 -3
  74. package/dist/loader/dist/transform-runner.js +7 -0
  75. package/dist/loader/dist/unplugin.d.ts +27 -0
  76. package/dist/loader/dist/unplugin.js +52 -0
  77. package/dist/plugin.d.ts +2 -2
  78. package/dist/plugin.js +3 -2
  79. package/dist/tsconfig.tsbuildinfo +1 -1
  80. package/dist/utils/dist/index.js +1 -0
  81. package/dist/utils/dist/motion-utils/resolveMotionState.d.ts +35 -0
  82. package/dist/utils/dist/motion-utils/resolveMotionState.js +33 -0
  83. package/dist/utils/dist/string-utils/componentClassName.d.ts +41 -8
  84. package/dist/utils/dist/string-utils/componentClassName.js +48 -11
  85. package/dist/utils.d.ts +3 -2
  86. package/dist/utils.js +3 -2
  87. package/package.json +3 -51
  88. package/dist/components/accordion.config.d.ts +0 -2
  89. package/dist/components/accordion.config.js +0 -2
  90. package/dist/components/accordion.d.ts +0 -2
  91. package/dist/components/accordion.js +0 -2
  92. package/dist/components/alert.config.d.ts +0 -2
  93. package/dist/components/alert.config.js +0 -2
  94. package/dist/components/alert.d.ts +0 -2
  95. package/dist/components/alert.js +0 -2
  96. package/dist/components/anchor.config.d.ts +0 -2
  97. package/dist/components/anchor.config.js +0 -2
  98. package/dist/components/anchor.d.ts +0 -2
  99. package/dist/components/anchor.js +0 -2
  100. package/dist/components/article.d.ts +0 -2
  101. package/dist/components/article.js +0 -2
  102. package/dist/components/aside.d.ts +0 -2
  103. package/dist/components/aside.js +0 -2
  104. package/dist/components/avatar-group.config.d.ts +0 -2
  105. package/dist/components/avatar-group.config.js +0 -2
  106. package/dist/components/avatar-group.d.ts +0 -2
  107. package/dist/components/avatar-group.js +0 -2
  108. package/dist/components/avatar.config.d.ts +0 -2
  109. package/dist/components/avatar.config.js +0 -2
  110. package/dist/components/avatar.d.ts +0 -2
  111. package/dist/components/avatar.js +0 -2
  112. package/dist/components/badge.config.d.ts +0 -2
  113. package/dist/components/badge.config.js +0 -2
  114. package/dist/components/badge.d.ts +0 -2
  115. package/dist/components/badge.js +0 -2
  116. package/dist/components/box.d.ts +0 -2
  117. package/dist/components/box.js +0 -2
  118. package/dist/components/breadcrumb.config.d.ts +0 -2
  119. package/dist/components/breadcrumb.config.js +0 -2
  120. package/dist/components/breadcrumb.d.ts +0 -2
  121. package/dist/components/breadcrumb.js +0 -2
  122. package/dist/components/button.config.d.ts +0 -2
  123. package/dist/components/button.config.js +0 -2
  124. package/dist/components/button.d.ts +0 -2
  125. package/dist/components/button.js +0 -2
  126. package/dist/components/card.config.d.ts +0 -2
  127. package/dist/components/card.config.js +0 -2
  128. package/dist/components/card.d.ts +0 -2
  129. package/dist/components/card.js +0 -2
  130. package/dist/components/collapsible.config.d.ts +0 -2
  131. package/dist/components/collapsible.config.js +0 -2
  132. package/dist/components/collapsible.d.ts +0 -2
  133. package/dist/components/collapsible.js +0 -2
  134. package/dist/components/command.config.d.ts +0 -2
  135. package/dist/components/command.config.js +0 -2
  136. package/dist/components/command.d.ts +0 -2
  137. package/dist/components/command.js +0 -2
  138. package/dist/components/control-color.config.d.ts +0 -2
  139. package/dist/components/control-color.config.js +0 -2
  140. package/dist/components/control-color.d.ts +0 -2
  141. package/dist/components/control-color.js +0 -2
  142. package/dist/components/control-curve.config.d.ts +0 -2
  143. package/dist/components/control-curve.config.js +0 -2
  144. package/dist/components/control-curve.d.ts +0 -2
  145. package/dist/components/control-curve.js +0 -2
  146. package/dist/components/control-folder.config.d.ts +0 -2
  147. package/dist/components/control-folder.config.js +0 -2
  148. package/dist/components/control-folder.d.ts +0 -2
  149. package/dist/components/control-folder.js +0 -2
  150. package/dist/components/control-group.config.d.ts +0 -2
  151. package/dist/components/control-group.config.js +0 -2
  152. package/dist/components/control-group.d.ts +0 -2
  153. package/dist/components/control-group.js +0 -2
  154. package/dist/components/control-knob.config.d.ts +0 -2
  155. package/dist/components/control-knob.config.js +0 -2
  156. package/dist/components/control-knob.d.ts +0 -2
  157. package/dist/components/control-knob.js +0 -2
  158. package/dist/components/control-panel.config.d.ts +0 -2
  159. package/dist/components/control-panel.config.js +0 -2
  160. package/dist/components/control-panel.d.ts +0 -2
  161. package/dist/components/control-panel.js +0 -2
  162. package/dist/components/control-select.config.d.ts +0 -2
  163. package/dist/components/control-select.config.js +0 -2
  164. package/dist/components/control-select.d.ts +0 -2
  165. package/dist/components/control-select.js +0 -2
  166. package/dist/components/control-slider.config.d.ts +0 -2
  167. package/dist/components/control-slider.config.js +0 -2
  168. package/dist/components/control-slider.d.ts +0 -2
  169. package/dist/components/control-slider.js +0 -2
  170. package/dist/components/control-spring.config.d.ts +0 -2
  171. package/dist/components/control-spring.config.js +0 -2
  172. package/dist/components/control-spring.d.ts +0 -2
  173. package/dist/components/control-spring.js +0 -2
  174. package/dist/components/control-stepper.config.d.ts +0 -2
  175. package/dist/components/control-stepper.config.js +0 -2
  176. package/dist/components/control-stepper.d.ts +0 -2
  177. package/dist/components/control-stepper.js +0 -2
  178. package/dist/components/control-toggle.config.d.ts +0 -2
  179. package/dist/components/control-toggle.config.js +0 -2
  180. package/dist/components/control-toggle.d.ts +0 -2
  181. package/dist/components/control-toggle.js +0 -2
  182. package/dist/components/dist/_slots.js +0 -8
  183. package/dist/components/dist/accordion.config.d.ts +0 -431
  184. package/dist/components/dist/accordion.config.js +0 -81
  185. package/dist/components/dist/accordion.d.ts +0 -453
  186. package/dist/components/dist/accordion.js +0 -60
  187. package/dist/components/dist/alert.config.d.ts +0 -219
  188. package/dist/components/dist/alert.config.js +0 -54
  189. package/dist/components/dist/alert.d.ts +0 -230
  190. package/dist/components/dist/alert.js +0 -16
  191. package/dist/components/dist/anchor.config.d.ts +0 -250
  192. package/dist/components/dist/anchor.config.js +0 -22
  193. package/dist/components/dist/anchor.d.ts +0 -261
  194. package/dist/components/dist/anchor.js +0 -9
  195. package/dist/components/dist/article.d.ts +0 -11
  196. package/dist/components/dist/article.js +0 -9
  197. package/dist/components/dist/aside.d.ts +0 -11
  198. package/dist/components/dist/aside.js +0 -9
  199. package/dist/components/dist/avatar-group.config.d.ts +0 -315
  200. package/dist/components/dist/avatar-group.config.js +0 -33
  201. package/dist/components/dist/avatar-group.d.ts +0 -329
  202. package/dist/components/dist/avatar-group.js +0 -39
  203. package/dist/components/dist/avatar.config.d.ts +0 -197
  204. package/dist/components/dist/avatar.config.js +0 -49
  205. package/dist/components/dist/avatar.d.ts +0 -211
  206. package/dist/components/dist/avatar.js +0 -20
  207. package/dist/components/dist/badge.config.d.ts +0 -477
  208. package/dist/components/dist/badge.config.js +0 -99
  209. package/dist/components/dist/badge.d.ts +0 -489
  210. package/dist/components/dist/badge.js +0 -16
  211. package/dist/components/dist/box.d.ts +0 -14
  212. package/dist/components/dist/box.js +0 -9
  213. package/dist/components/dist/breadcrumb.config.d.ts +0 -390
  214. package/dist/components/dist/breadcrumb.config.js +0 -43
  215. package/dist/components/dist/breadcrumb.d.ts +0 -420
  216. package/dist/components/dist/breadcrumb.js +0 -119
  217. package/dist/components/dist/button.config.d.ts +0 -381
  218. package/dist/components/dist/button.config.js +0 -91
  219. package/dist/components/dist/button.d.ts +0 -403
  220. package/dist/components/dist/button.js +0 -35
  221. package/dist/components/dist/card.config.d.ts +0 -336
  222. package/dist/components/dist/card.config.js +0 -33
  223. package/dist/components/dist/card.d.ts +0 -352
  224. package/dist/components/dist/card.js +0 -27
  225. package/dist/components/dist/collapsible.config.d.ts +0 -45
  226. package/dist/components/dist/collapsible.config.js +0 -46
  227. package/dist/components/dist/collapsible.d.ts +0 -61
  228. package/dist/components/dist/collapsible.js +0 -38
  229. package/dist/components/dist/command.config.d.ts +0 -1613
  230. package/dist/components/dist/command.config.js +0 -170
  231. package/dist/components/dist/command.d.ts +0 -1722
  232. package/dist/components/dist/command.js +0 -341
  233. package/dist/components/dist/control-color.config.d.ts +0 -979
  234. package/dist/components/dist/control-color.config.js +0 -81
  235. package/dist/components/dist/control-color.d.ts +0 -995
  236. package/dist/components/dist/control-color.js +0 -64
  237. package/dist/components/dist/control-curve.config.d.ts +0 -18
  238. package/dist/components/dist/control-curve.config.js +0 -14
  239. package/dist/components/dist/control-curve.d.ts +0 -35
  240. package/dist/components/dist/control-curve.js +0 -81
  241. package/dist/components/dist/control-folder.config.d.ts +0 -177
  242. package/dist/components/dist/control-folder.config.js +0 -47
  243. package/dist/components/dist/control-folder.d.ts +0 -194
  244. package/dist/components/dist/control-folder.js +0 -41
  245. package/dist/components/dist/control-group.config.d.ts +0 -859
  246. package/dist/components/dist/control-group.config.js +0 -80
  247. package/dist/components/dist/control-group.d.ts +0 -881
  248. package/dist/components/dist/control-group.js +0 -89
  249. package/dist/components/dist/control-knob.config.d.ts +0 -792
  250. package/dist/components/dist/control-knob.config.js +0 -67
  251. package/dist/components/dist/control-knob.d.ts +0 -819
  252. package/dist/components/dist/control-knob.js +0 -148
  253. package/dist/components/dist/control-panel.config.d.ts +0 -402
  254. package/dist/components/dist/control-panel.config.js +0 -38
  255. package/dist/components/dist/control-panel.d.ts +0 -415
  256. package/dist/components/dist/control-panel.js +0 -22
  257. package/dist/components/dist/control-select.config.d.ts +0 -1176
  258. package/dist/components/dist/control-select.config.js +0 -102
  259. package/dist/components/dist/control-select.d.ts +0 -1200
  260. package/dist/components/dist/control-select.js +0 -63
  261. package/dist/components/dist/control-slider.config.d.ts +0 -104
  262. package/dist/components/dist/control-slider.config.js +0 -98
  263. package/dist/components/dist/control-slider.d.ts +0 -127
  264. package/dist/components/dist/control-slider.js +0 -87
  265. package/dist/components/dist/control-spring.config.d.ts +0 -417
  266. package/dist/components/dist/control-spring.config.js +0 -36
  267. package/dist/components/dist/control-spring.d.ts +0 -439
  268. package/dist/components/dist/control-spring.js +0 -136
  269. package/dist/components/dist/control-stepper.config.d.ts +0 -1084
  270. package/dist/components/dist/control-stepper.config.js +0 -108
  271. package/dist/components/dist/control-stepper.d.ts +0 -1104
  272. package/dist/components/dist/control-stepper.js +0 -109
  273. package/dist/components/dist/control-toggle.config.d.ts +0 -407
  274. package/dist/components/dist/control-toggle.config.js +0 -26
  275. package/dist/components/dist/control-toggle.d.ts +0 -420
  276. package/dist/components/dist/control-toggle.js +0 -36
  277. package/dist/components/dist/createSlot.d.ts +0 -8
  278. package/dist/components/dist/createSlot.js +0 -89
  279. package/dist/components/dist/dropdown.config.d.ts +0 -920
  280. package/dist/components/dist/dropdown.config.js +0 -107
  281. package/dist/components/dist/dropdown.d.ts +0 -950
  282. package/dist/components/dist/dropdown.js +0 -92
  283. package/dist/components/dist/empty-state.config.d.ts +0 -396
  284. package/dist/components/dist/empty-state.config.js +0 -53
  285. package/dist/components/dist/empty-state.d.ts +0 -416
  286. package/dist/components/dist/empty-state.js +0 -33
  287. package/dist/components/dist/footer.d.ts +0 -11
  288. package/dist/components/dist/footer.js +0 -9
  289. package/dist/components/dist/grid.d.ts +0 -41
  290. package/dist/components/dist/grid.js +0 -34
  291. package/dist/components/dist/header.d.ts +0 -11
  292. package/dist/components/dist/header.js +0 -9
  293. package/dist/components/dist/hstack.d.ts +0 -15
  294. package/dist/components/dist/hstack.js +0 -21
  295. package/dist/components/dist/image.d.ts +0 -19
  296. package/dist/components/dist/image.js +0 -9
  297. package/dist/components/dist/input.config.d.ts +0 -58
  298. package/dist/components/dist/input.config.js +0 -42
  299. package/dist/components/dist/input.d.ts +0 -67
  300. package/dist/components/dist/input.js +0 -14
  301. package/dist/components/dist/item.config.d.ts +0 -351
  302. package/dist/components/dist/item.config.js +0 -83
  303. package/dist/components/dist/item.d.ts +0 -374
  304. package/dist/components/dist/item.js +0 -51
  305. package/dist/components/dist/list.d.ts +0 -19
  306. package/dist/components/dist/list.js +0 -21
  307. package/dist/components/dist/main.d.ts +0 -11
  308. package/dist/components/dist/main.js +0 -9
  309. package/dist/components/dist/modal.config.d.ts +0 -397
  310. package/dist/components/dist/modal.config.js +0 -92
  311. package/dist/components/dist/modal.d.ts +0 -433
  312. package/dist/components/dist/modal.js +0 -125
  313. package/dist/components/dist/nav-header.config.d.ts +0 -158
  314. package/dist/components/dist/nav-header.config.js +0 -26
  315. package/dist/components/dist/nav-header.d.ts +0 -173
  316. package/dist/components/dist/nav-header.js +0 -23
  317. package/dist/components/dist/nav.d.ts +0 -11
  318. package/dist/components/dist/nav.js +0 -9
  319. package/dist/components/dist/preset-bar.config.d.ts +0 -192
  320. package/dist/components/dist/preset-bar.config.js +0 -39
  321. package/dist/components/dist/preset-bar.d.ts +0 -215
  322. package/dist/components/dist/preset-bar.js +0 -71
  323. package/dist/components/dist/presets/index.d.ts +0 -17674
  324. package/dist/components/dist/presets/index.js +0 -97
  325. package/dist/components/dist/pressable.d.ts +0 -11
  326. package/dist/components/dist/pressable.js +0 -9
  327. package/dist/components/dist/progress.config.d.ts +0 -296
  328. package/dist/components/dist/progress.config.js +0 -35
  329. package/dist/components/dist/progress.d.ts +0 -311
  330. package/dist/components/dist/progress.js +0 -43
  331. package/dist/components/dist/section.d.ts +0 -11
  332. package/dist/components/dist/section.js +0 -9
  333. package/dist/components/dist/select.config.d.ts +0 -31
  334. package/dist/components/dist/select.config.js +0 -25
  335. package/dist/components/dist/select.d.ts +0 -45
  336. package/dist/components/dist/select.js +0 -13
  337. package/dist/components/dist/sheet.config.d.ts +0 -245
  338. package/dist/components/dist/sheet.config.js +0 -99
  339. package/dist/components/dist/sheet.d.ts +0 -267
  340. package/dist/components/dist/sheet.js +0 -53
  341. package/dist/components/dist/sidebar.config.d.ts +0 -1651
  342. package/dist/components/dist/sidebar.config.js +0 -217
  343. package/dist/components/dist/sidebar.d.ts +0 -1825
  344. package/dist/components/dist/sidebar.js +0 -492
  345. package/dist/components/dist/skeleton.config.d.ts +0 -16
  346. package/dist/components/dist/skeleton.config.js +0 -10
  347. package/dist/components/dist/skeleton.d.ts +0 -27
  348. package/dist/components/dist/skeleton.js +0 -16
  349. package/dist/components/dist/slider.config.d.ts +0 -44
  350. package/dist/components/dist/slider.config.js +0 -40
  351. package/dist/components/dist/slider.d.ts +0 -70
  352. package/dist/components/dist/slider.js +0 -247
  353. package/dist/components/dist/spinner.config.d.ts +0 -34
  354. package/dist/components/dist/spinner.config.js +0 -24
  355. package/dist/components/dist/spinner.d.ts +0 -42
  356. package/dist/components/dist/spinner.js +0 -29
  357. package/dist/components/dist/svg.d.ts +0 -21
  358. package/dist/components/dist/svg.js +0 -17
  359. package/dist/components/dist/switch.config.d.ts +0 -353
  360. package/dist/components/dist/switch.config.js +0 -47
  361. package/dist/components/dist/switch.d.ts +0 -370
  362. package/dist/components/dist/switch.js +0 -32
  363. package/dist/components/dist/table.d.ts +0 -36
  364. package/dist/components/dist/table.js +0 -29
  365. package/dist/components/dist/tabs.config.d.ts +0 -611
  366. package/dist/components/dist/tabs.config.js +0 -56
  367. package/dist/components/dist/tabs.d.ts +0 -632
  368. package/dist/components/dist/tabs.js +0 -77
  369. package/dist/components/dist/text.config.d.ts +0 -306
  370. package/dist/components/dist/text.config.js +0 -149
  371. package/dist/components/dist/text.d.ts +0 -205
  372. package/dist/components/dist/text.js +0 -12
  373. package/dist/components/dist/textarea.config.d.ts +0 -352
  374. package/dist/components/dist/textarea.config.js +0 -57
  375. package/dist/components/dist/textarea.d.ts +0 -362
  376. package/dist/components/dist/textarea.js +0 -9
  377. package/dist/components/dist/toast.config.d.ts +0 -335
  378. package/dist/components/dist/toast.config.js +0 -145
  379. package/dist/components/dist/toast.d.ts +0 -426
  380. package/dist/components/dist/toast.js +0 -159
  381. package/dist/components/dist/tooltip.config.d.ts +0 -193
  382. package/dist/components/dist/tooltip.config.js +0 -40
  383. package/dist/components/dist/tooltip.d.ts +0 -206
  384. package/dist/components/dist/tooltip.js +0 -28
  385. package/dist/components/dist/vstack.d.ts +0 -15
  386. package/dist/components/dist/vstack.js +0 -20
  387. package/dist/components/dropdown.config.d.ts +0 -2
  388. package/dist/components/dropdown.config.js +0 -2
  389. package/dist/components/dropdown.d.ts +0 -2
  390. package/dist/components/dropdown.js +0 -2
  391. package/dist/components/empty-state.config.d.ts +0 -2
  392. package/dist/components/empty-state.config.js +0 -2
  393. package/dist/components/empty-state.d.ts +0 -2
  394. package/dist/components/empty-state.js +0 -2
  395. package/dist/components/footer.d.ts +0 -2
  396. package/dist/components/footer.js +0 -2
  397. package/dist/components/grid.d.ts +0 -2
  398. package/dist/components/grid.js +0 -2
  399. package/dist/components/header.d.ts +0 -2
  400. package/dist/components/header.js +0 -2
  401. package/dist/components/hstack.d.ts +0 -2
  402. package/dist/components/hstack.js +0 -2
  403. package/dist/components/image.d.ts +0 -2
  404. package/dist/components/image.js +0 -2
  405. package/dist/components/input.config.d.ts +0 -2
  406. package/dist/components/input.config.js +0 -2
  407. package/dist/components/input.d.ts +0 -2
  408. package/dist/components/input.js +0 -2
  409. package/dist/components/item.config.d.ts +0 -2
  410. package/dist/components/item.config.js +0 -2
  411. package/dist/components/item.d.ts +0 -2
  412. package/dist/components/item.js +0 -2
  413. package/dist/components/list.d.ts +0 -2
  414. package/dist/components/list.js +0 -2
  415. package/dist/components/main.d.ts +0 -2
  416. package/dist/components/main.js +0 -2
  417. package/dist/components/modal.config.d.ts +0 -2
  418. package/dist/components/modal.config.js +0 -2
  419. package/dist/components/modal.d.ts +0 -2
  420. package/dist/components/modal.js +0 -2
  421. package/dist/components/nav-header.config.d.ts +0 -2
  422. package/dist/components/nav-header.config.js +0 -2
  423. package/dist/components/nav-header.d.ts +0 -2
  424. package/dist/components/nav-header.js +0 -2
  425. package/dist/components/nav.d.ts +0 -2
  426. package/dist/components/nav.js +0 -2
  427. package/dist/components/preset-bar.config.d.ts +0 -2
  428. package/dist/components/preset-bar.config.js +0 -2
  429. package/dist/components/preset-bar.d.ts +0 -2
  430. package/dist/components/preset-bar.js +0 -2
  431. package/dist/components/presets/index.d.ts +0 -44
  432. package/dist/components/presets/index.js +0 -44
  433. package/dist/components/pressable.d.ts +0 -2
  434. package/dist/components/pressable.js +0 -2
  435. package/dist/components/progress.config.d.ts +0 -2
  436. package/dist/components/progress.config.js +0 -2
  437. package/dist/components/progress.d.ts +0 -2
  438. package/dist/components/progress.js +0 -2
  439. package/dist/components/section.d.ts +0 -2
  440. package/dist/components/section.js +0 -2
  441. package/dist/components/select.config.d.ts +0 -2
  442. package/dist/components/select.config.js +0 -2
  443. package/dist/components/select.d.ts +0 -2
  444. package/dist/components/select.js +0 -2
  445. package/dist/components/sheet.config.d.ts +0 -2
  446. package/dist/components/sheet.config.js +0 -2
  447. package/dist/components/sheet.d.ts +0 -2
  448. package/dist/components/sheet.js +0 -2
  449. package/dist/components/sidebar.config.d.ts +0 -2
  450. package/dist/components/sidebar.config.js +0 -2
  451. package/dist/components/sidebar.d.ts +0 -2
  452. package/dist/components/sidebar.js +0 -2
  453. package/dist/components/skeleton.config.d.ts +0 -2
  454. package/dist/components/skeleton.config.js +0 -2
  455. package/dist/components/skeleton.d.ts +0 -2
  456. package/dist/components/skeleton.js +0 -2
  457. package/dist/components/slider.config.d.ts +0 -2
  458. package/dist/components/slider.config.js +0 -2
  459. package/dist/components/slider.d.ts +0 -2
  460. package/dist/components/slider.js +0 -2
  461. package/dist/components/spinner.config.d.ts +0 -2
  462. package/dist/components/spinner.config.js +0 -2
  463. package/dist/components/spinner.d.ts +0 -2
  464. package/dist/components/spinner.js +0 -2
  465. package/dist/components/svg.d.ts +0 -2
  466. package/dist/components/svg.js +0 -2
  467. package/dist/components/switch.config.d.ts +0 -2
  468. package/dist/components/switch.config.js +0 -2
  469. package/dist/components/switch.d.ts +0 -2
  470. package/dist/components/switch.js +0 -2
  471. package/dist/components/table.d.ts +0 -2
  472. package/dist/components/table.js +0 -2
  473. package/dist/components/tabs.config.d.ts +0 -2
  474. package/dist/components/tabs.config.js +0 -2
  475. package/dist/components/tabs.d.ts +0 -2
  476. package/dist/components/tabs.js +0 -2
  477. package/dist/components/text.config.d.ts +0 -2
  478. package/dist/components/text.config.js +0 -2
  479. package/dist/components/text.d.ts +0 -2
  480. package/dist/components/text.js +0 -2
  481. package/dist/components/textarea.config.d.ts +0 -2
  482. package/dist/components/textarea.config.js +0 -2
  483. package/dist/components/textarea.d.ts +0 -2
  484. package/dist/components/textarea.js +0 -2
  485. package/dist/components/toast.config.d.ts +0 -2
  486. package/dist/components/toast.config.js +0 -2
  487. package/dist/components/toast.d.ts +0 -2
  488. package/dist/components/toast.js +0 -2
  489. package/dist/components/tooltip.config.d.ts +0 -2
  490. package/dist/components/tooltip.config.js +0 -2
  491. package/dist/components/tooltip.d.ts +0 -2
  492. package/dist/components/tooltip.js +0 -2
  493. package/dist/components/vstack.d.ts +0 -2
  494. package/dist/components/vstack.js +0 -2
  495. package/dist/config/dist/component-config.d.ts +0 -349
  496. package/dist/config/dist/component-refs.d.ts +0 -98
  497. package/dist/config/dist/component-resolution.js +0 -78
  498. package/dist/config/dist/consts/defaultColors.d.ts +0 -253
  499. package/dist/config/dist/consts/defaultColors.js +0 -252
  500. package/dist/config/dist/createComponent.d.ts +0 -1
  501. package/dist/config/dist/createComponent.js +0 -1
  502. package/dist/config/dist/createConfig.d.ts +0 -375
  503. package/dist/config/dist/createConfig.js +0 -625
  504. package/dist/config/dist/defineComponent.d.ts +0 -24
  505. package/dist/config/dist/defineComponent.js +0 -2
  506. package/dist/config/dist/defineStyleProp.d.ts +0 -93
  507. package/dist/config/dist/defineStyleProp.js +0 -60
  508. package/dist/config/dist/preset-merge.js +0 -192
  509. package/dist/config/dist/propertyAcceptedTypes.js +0 -220
  510. package/dist/config/dist/propertyGroups.d.ts +0 -1
  511. package/dist/config/dist/propertyGroups.js +0 -414
  512. package/dist/config/dist/resolveStyleProp.d.ts +0 -88
  513. package/dist/config/dist/resolveStyleProp.js +0 -235
  514. package/dist/config/dist/resolveTokenTypes.d.ts +0 -1
  515. package/dist/config/dist/resolveTokenTypes.js +0 -149
  516. package/dist/config/dist/runtime-registry.js +0 -9
  517. package/dist/config/dist/serialize.d.ts +0 -73
  518. package/dist/config/dist/serialize.js +0 -172
  519. package/dist/config/dist/style-prop-runtime.d.ts +0 -1
  520. package/dist/config-utils/dist/componentConfig.d.ts +0 -10
  521. package/dist/config-utils/dist/componentConfig.js +0 -11
  522. package/dist/config-utils.d.ts +0 -2
  523. package/dist/config-utils.js +0 -2
  524. package/dist/core/dist/color-opacity-map.js +0 -33
  525. package/dist/core/dist/compositeStyles.d.ts +0 -21
  526. package/dist/core/dist/compositeStyles.js +0 -51
  527. package/dist/core/dist/configurable-prop-helpers.d.ts +0 -31
  528. package/dist/core/dist/configurable-prop-helpers.js +0 -61
  529. package/dist/core/dist/createComponent.boundaries.js +0 -192
  530. package/dist/core/dist/createComponent.d.ts +0 -56
  531. package/dist/core/dist/createComponent.js +0 -67
  532. package/dist/core/dist/createComponentExample.d.ts +0 -41
  533. package/dist/core/dist/createComponentExample.js +0 -27
  534. package/dist/core/dist/createProvider.d.ts +0 -12
  535. package/dist/core/dist/createProvider.js +0 -24
  536. package/dist/core/dist/generated/stylePropsTwMap.d.ts +0 -1700
  537. package/dist/core/dist/generated/stylePropsTwMap.js +0 -570
  538. package/dist/core/dist/getComponentStyles.d.ts +0 -49
  539. package/dist/core/dist/getComponentStyles.js +0 -85
  540. package/dist/core/dist/getStyles.d.ts +0 -42
  541. package/dist/core/dist/getStyles.js +0 -300
  542. package/dist/core/dist/index.d.ts +0 -13
  543. package/dist/core/dist/index.js +0 -13
  544. package/dist/core/dist/modifier-mappings.d.ts +0 -12
  545. package/dist/core/dist/modifier-mappings.js +0 -61
  546. package/dist/core/dist/resolveMotionState.d.ts +0 -4
  547. package/dist/core/dist/resolveMotionState.js +0 -17
  548. package/dist/core/dist/resolveProps.boundaries.js +0 -131
  549. package/dist/core/dist/style-prop-data.d.ts +0 -32
  550. package/dist/core/dist/style-prop-data.js +0 -1257
  551. package/dist/core/dist/transformPreset.d.ts +0 -17
  552. package/dist/core/dist/transformPreset.js +0 -28
  553. package/dist/core/dist/withDefaultStyleProps.d.ts +0 -43
  554. package/dist/core/dist/withDefaultStyleProps.js +0 -18
  555. package/dist/core.d.ts +0 -14
  556. package/dist/core.js +0 -15
  557. package/dist/createSlot.d.ts +0 -2
  558. package/dist/createSlot.js +0 -2
  559. package/dist/fixtures.d.ts +0 -4
  560. package/dist/fixtures.js +0 -5
  561. package/dist/foundational-presets/dist/_virtual/_rolldown/runtime.js +0 -13
  562. package/dist/foundational-presets/dist/defaultPreset.d.ts +0 -1557
  563. package/dist/foundational-presets/dist/defaultPreset.js +0 -615
  564. package/dist/foundational-presets/dist/index.d.ts +0 -1
  565. package/dist/foundational-presets/dist/index.js +0 -1
  566. package/dist/foundational-presets/dist/motion.d.ts +0 -12
  567. package/dist/foundational-presets/dist/style-props.js +0 -1445
  568. package/dist/loader/dist/loader/create-component-data.js +0 -33
  569. package/dist/loader/dist/loader/create-component-lowering.js +0 -454
  570. package/dist/loader/dist/loader/data-attr-transform.js +0 -191
  571. package/dist/loader/dist/loader/dynamic-style-codegen.js +0 -97
  572. package/dist/loader/dist/loader/internal-meta.js +0 -22
  573. package/dist/loader/dist/loader/lower-new-api-primitive.js +0 -90
  574. package/dist/loader/dist/loader/motion-transform.js +0 -717
  575. package/dist/loader/dist/loader/style-transform.js +0 -670
  576. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -203
  577. package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -25
  578. package/dist/loader/dist/node_modules/react/cjs/react.development.js +0 -762
  579. package/dist/loader/dist/node_modules/react/cjs/react.production.js +0 -351
  580. package/dist/loader/dist/node_modules/react/index.js +0 -10
  581. package/dist/loader/dist/node_modules/react/jsx-runtime.js +0 -10
  582. package/dist/loader/dist/packages/core/dist/color-opacity-map.js +0 -33
  583. package/dist/loader/dist/packages/core/dist/compositeStyles.js +0 -43
  584. package/dist/loader/dist/packages/core/dist/createComponent.js +0 -6
  585. package/dist/loader/dist/packages/core/dist/createProvider.js +0 -7
  586. package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +0 -570
  587. package/dist/loader/dist/packages/core/dist/getComponentStyles.js +0 -2
  588. package/dist/loader/dist/packages/core/dist/getStyles.js +0 -60
  589. package/dist/loader/dist/packages/core/dist/index.js +0 -6
  590. package/dist/loader/dist/packages/core/dist/modifier-mappings.js +0 -61
  591. package/dist/loader/dist/packages/core/dist/style-prop-data.js +0 -1257
  592. package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +0 -1
  593. package/dist/presets/dist/defaultPreset.d.ts +0 -6
  594. package/dist/presets/dist/defaultPreset.js +0 -51
  595. package/dist/presets/dist/index.d.ts +0 -1
  596. package/dist/presets/dist/index.js +0 -1
  597. package/dist/presets/motion.d.ts +0 -2
  598. package/dist/presets/motion.js +0 -2
  599. package/dist/presets.d.ts +0 -2
  600. package/dist/presets.js +0 -3
  601. package/dist/styles.d.ts +0 -4
  602. package/dist/styles.js +0 -5
  603. package/dist/transformPreset.d.ts +0 -2
  604. package/dist/transformPreset.js +0 -3
  605. /package/dist/{config/dist/component-resolution.d.ts → loader/dist/transform-runner.d.ts} +0 -0
@@ -0,0 +1,218 @@
1
+ import { AssetGroupRef } from "./refs.js";
2
+ import { ComponentDefinition } from "./types.js";
3
+
4
+ //#region ../config/dist/markers.d.ts
5
+ //#region src/markers.d.ts
6
+ /**
7
+ * A slot's `.accepts(...)` argument: a registered component definition, or a
8
+ * placeable asset group returned by `defineAssetGroup(...).config(...)` (it
9
+ * carries the `AssetGroupRef` tag). The two are kept distinct downstream —
10
+ * component names land on `SlotInfo.accepts`, the asset-group slug on
11
+ * `SlotInfo.acceptsAssetGroup` — so the designer panel can pick the right
12
+ * picker. Non-placeable groups (fonts) are admitted by the type but rejected
13
+ * at config load.
14
+ */
15
+ type SlotAccepts = ComponentDefinition | AssetGroupRef;
16
+ /**
17
+ * Brand applied to a marker by `.required()`. Lives alongside the
18
+ * marker interfaces so the slot factories (whose `.required()`
19
+ * implementation is co-located with `.accepts()` rather than going
20
+ * through `attachRequired`) can return the brand-narrowed type via
21
+ * the interface signature.
22
+ *
23
+ * `RenderPropsFromConfig` reads this brand to decide whether a render-
24
+ * fn destructure entry is optional (`T | undefined`) or non-optional
25
+ * (`T`). Distinct from `__required?: boolean` on the marker bodies —
26
+ * that field is the runtime flag codegen reads; the brand is the
27
+ * compile-time signal the render-arg type-flow keys on.
28
+ */
29
+ type RequiredBrand = {
30
+ __required: true;
31
+ };
32
+ /**
33
+ * Author-declared slot value kind. A slot holds renderable content; the only
34
+ * explicit kind is text:
35
+ *
36
+ * - `'string'` — plain text content (e.g. Button's `children` label).
37
+ *
38
+ * An open `slot()` is a node container (`ReactNode`) by default — it accepts
39
+ * dropped layers and is narrowed to specific components via `.accepts(...)`;
40
+ * `'string'` instead marks a text surface, so tools like the Studio canvas
41
+ * inline-edit it rather than treat it as a reparent target. Scalars like
42
+ * boolean and number are *not* slots — use the dedicated `bool()` / `number()`
43
+ * markers. (A `'string'` slot still *resolves* to `SlotValueKind: 'ReactNode'`,
44
+ * since a string is a valid `ReactNode`; `authoredType` records the intent.)
45
+ *
46
+ * - `'component'` — the slot resolves to a `FunctionComponent`, not rendered
47
+ * content. Used by the aliased `Icon` pattern (`name: slot({ type:
48
+ * 'component' }).accepts(icons)`), where the render fn receives the icon
49
+ * component itself (`({ name: SvgIcon }) => <SvgIcon … />`) and the saved
50
+ * value is the inline asset-name string (`"Trophy"`), not a `$slot` ref.
51
+ * A `'component'` slot *requires* an asset-group `.accepts(...)` — config
52
+ * load throws otherwise.
53
+ */
54
+ type SlotValueType = 'string' | 'component';
55
+ /**
56
+ * Open-slot marker — `slot()` with no arguments. Codegen treats it as
57
+ * `ReactNode` accepted at the component's own children. Carries no
58
+ * cross-reference; `__accepts` / `__required` may still be set via the
59
+ * chain methods to constrain the slot's children or mark it required.
60
+ * `__valueType` records an explicit `slot({ type })` override (absent ⇒
61
+ * the default `ReactNode`).
62
+ */
63
+ interface SlotMarker {
64
+ readonly __kind: 'slot';
65
+ readonly __required?: boolean;
66
+ readonly __accepts?: readonly SlotAccepts[];
67
+ readonly __valueType?: SlotValueType;
68
+ /**
69
+ * Stamp `__required: true` on the marker. Codegen reads this per-prop
70
+ * and emits the JSX prop without a trailing `?`, so the slot becomes
71
+ * mandatory at call sites. The return type also intersects
72
+ * `RequiredBrand` so `RenderPropsFromConfig` narrows the render-fn
73
+ * destructure entry to non-optional.
74
+ */
75
+ required(): SlotMarker & RequiredBrand;
76
+ /**
77
+ * Constrain the slot's accepted children to one or more registered
78
+ * components, or to a placeable asset group (`slot().accepts(icons)`).
79
+ */
80
+ accepts(component: SlotAccepts | readonly SlotAccepts[]): SlotMarker;
81
+ }
82
+ /**
83
+ * A `slot({ type: 'component' })` marker — the aliased `Icon` pattern. Carries
84
+ * the literal `__valueType: 'component'` so `ResolveMarker` resolves the prop
85
+ * to a `ComponentType` (the render fn receives the icon component itself), and
86
+ * narrows `.accepts(...)` to asset groups only (a component-typed slot must
87
+ * accept an asset group). The chained `.accepts(...)` preserves this type so
88
+ * the literal survives to the render-fn inference.
89
+ */
90
+ interface ComponentSlotMarker extends SlotMarker {
91
+ readonly __valueType: 'component';
92
+ accepts(group: AssetGroupRef | readonly AssetGroupRef[]): ComponentSlotMarker;
93
+ }
94
+ /**
95
+ * Layer-targeting slot ref — `slot('layer')`, `slot('layer/prop')`, or
96
+ * `slot('layer', { prop })`. Routes a JSX prop into the named layer's
97
+ * `layerProp` (defaults to `'children'` when only a layer is given).
98
+ * The `layer` field is the cross-reference — that's what makes this a
99
+ * Ref rather than a Marker.
100
+ */
101
+ interface SlotRef<TLayer extends string = string, TAs extends string = string> {
102
+ readonly __kind: 'slot';
103
+ readonly layer: TLayer;
104
+ readonly layerProp: TAs;
105
+ readonly __required?: boolean;
106
+ readonly __accepts?: readonly SlotAccepts[];
107
+ /** Output adapter set via `.transform(fn)` — codegen wraps the
108
+ * layer's prop so the consumer-facing handler receives `fn(arg)`
109
+ * instead of the raw layer value (e.g. an input event → its
110
+ * string value). Must be self-contained (no closure over outer
111
+ * scope) since codegen lifts it into the generated module. */
112
+ readonly __transform?: (arg: never) => unknown;
113
+ readonly __valueType?: SlotValueType;
114
+ required(): SlotRef<TLayer, TAs> & RequiredBrand;
115
+ accepts(component: SlotAccepts | readonly SlotAccepts[]): SlotRef<TLayer, TAs>;
116
+ transform<Out>(fn: (arg: unknown) => Out): SlotRef<TLayer, TAs> & {
117
+ readonly __transformOut: Out;
118
+ };
119
+ }
120
+ /**
121
+ * Runtime guard for any slot binding (open marker or layered ref).
122
+ * Callers that need to distinguish the two forms narrow further by
123
+ * checking for the `layer` field — `'layer' in value`.
124
+ */
125
+ declare function isSlotMarker(value: unknown): value is SlotMarker | SlotRef;
126
+ interface BooleanMarker {
127
+ readonly __kind: 'boolean';
128
+ readonly __required?: boolean;
129
+ readonly values?: {
130
+ true?: Record<string, Record<string, unknown>>;
131
+ false?: Record<string, Record<string, unknown>>;
132
+ };
133
+ }
134
+ declare function isBoolMarker(value: unknown): value is BooleanMarker;
135
+ interface VariantMarkerObject<V extends Record<string, Record<string, unknown>> = Record<string, Record<string, unknown>>> {
136
+ readonly __kind: 'variant';
137
+ readonly __required?: boolean;
138
+ readonly values: V;
139
+ readonly default?: keyof V & string;
140
+ }
141
+ interface VariantMarkerArray<V extends readonly (string | number)[] = readonly (string | number)[]> {
142
+ readonly __kind: 'variant';
143
+ readonly __required?: boolean;
144
+ readonly values: V;
145
+ readonly default?: V[number];
146
+ }
147
+ type VariantMarker<V = unknown> = V extends readonly (string | number)[] ? VariantMarkerArray<V> : V extends Record<string, Record<string, unknown>> ? VariantMarkerObject<V> : VariantMarkerObject | VariantMarkerArray;
148
+ declare function isVariantMarker(value: unknown): value is VariantMarker;
149
+ /**
150
+ * Distinguish the two variant forms. `Array.isArray(marker.values)` is the
151
+ * single source of truth — every downstream consumer that branches on
152
+ * the form goes through this helper rather than duplicating the check.
153
+ */
154
+ declare function isVariantArrayMarker(value: VariantMarker): value is VariantMarkerArray;
155
+ interface StringMarker {
156
+ readonly __kind: 'string';
157
+ readonly __required?: boolean;
158
+ }
159
+ interface NumberMarker {
160
+ readonly __kind: 'number';
161
+ readonly __required?: boolean;
162
+ }
163
+ declare function isStringMarker(value: unknown): value is StringMarker;
164
+ declare function isNumberMarker(value: unknown): value is NumberMarker;
165
+ interface LayerMarker {
166
+ readonly __kind: 'layer';
167
+ readonly layer: string;
168
+ readonly styles: Record<string, unknown>;
169
+ }
170
+ declare function isLayerMarker(value: unknown): value is LayerMarker;
171
+ /**
172
+ * One conditional override for a `props` axis: apply `props` to the cell
173
+ * when every key in `when` matches the cell's other-axis values. A rule
174
+ * with no `when` always applies (the base). Later matching rules win.
175
+ */
176
+ interface PreviewPropsRule {
177
+ readonly when?: Readonly<Record<string, unknown>>;
178
+ readonly props: Readonly<Record<string, unknown>>;
179
+ }
180
+ /**
181
+ * Synthetic discriminator state a `props` axis compiles to, per axis side.
182
+ * The entry's label is the value. Codegen keys the merged spec's `$cond`
183
+ * on this, and the studio seeds it per cell — both derive it here so they
184
+ * never drift. (`columns`/`rows` entries are concatenated as sibling
185
+ * values of one dimension, so one key per side suffices.)
186
+ */
187
+ declare const PREVIEW_SEED_KEY: {
188
+ readonly row: "__previewSeedRow";
189
+ readonly column: "__previewSeedCol";
190
+ };
191
+ /** True when every key in `when` equals the cell coordinate's value. */
192
+ declare function matchesPreviewWhen(when: Readonly<Record<string, unknown>> | undefined, coord: Readonly<Record<string, unknown>>): boolean;
193
+ /**
194
+ * Merge the `props` of every rule whose `when` matches `coord` (in order,
195
+ * so later matching rules win). Shared by codegen's combo enumeration and
196
+ * the studio's cell assembly so a `props` axis resolves identically.
197
+ */
198
+ declare function resolvePreviewRules(rules: readonly PreviewPropsRule[], coord: Readonly<Record<string, unknown>>): Record<string, unknown>;
199
+ interface PreviewAxisMarker {
200
+ readonly __kind: 'previewAxis';
201
+ /** Axis name — either a prop name or a `_${string}` modifier. */
202
+ readonly prop?: string;
203
+ readonly modifier?: string;
204
+ /**
205
+ * `props` axis rules — per-cell prop-override bags, optionally guarded
206
+ * by `when` against the other axes' values. Lets a preview vary
207
+ * render-extra data per cell (e.g. sample `value`) without declaring a
208
+ * config prop. Resolved against the cell coordinate by the studio and
209
+ * by codegen's combo enumeration.
210
+ */
211
+ readonly rules?: readonly PreviewPropsRule[];
212
+ readonly kind: 'prop' | 'modifier' | 'props';
213
+ readonly nested?: PreviewAxisMarker;
214
+ nest(child: PreviewAxisMarker): PreviewAxisMarker;
215
+ }
216
+ declare function isPreviewAxisMarker(value: unknown): value is PreviewAxisMarker; //#endregion
217
+ //#endregion
218
+ export { BooleanMarker, ComponentSlotMarker, LayerMarker, NumberMarker, PREVIEW_SEED_KEY, PreviewAxisMarker, PreviewPropsRule, RequiredBrand, SlotMarker, SlotRef, SlotValueType, StringMarker, VariantMarker, VariantMarkerArray, VariantMarkerObject, isBoolMarker, isLayerMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules };
@@ -0,0 +1,67 @@
1
+ //#region ../config/dist/markers.js
2
+ /**
3
+ * Runtime guard for any slot binding (open marker or layered ref).
4
+ * Callers that need to distinguish the two forms narrow further by
5
+ * checking for the `layer` field — `'layer' in value`.
6
+ */
7
+ function isSlotMarker(value) {
8
+ return typeof value === "object" && value !== null && value.__kind === "slot";
9
+ }
10
+ function isBoolMarker(value) {
11
+ return typeof value === "object" && value !== null && value.__kind === "boolean";
12
+ }
13
+ function isVariantMarker(value) {
14
+ if (typeof value !== "object" || value === null) return false;
15
+ const v = value;
16
+ if (v.__kind !== "variant") return false;
17
+ return Array.isArray(v.values) || typeof v.values === "object";
18
+ }
19
+ /**
20
+ * Distinguish the two variant forms. `Array.isArray(marker.values)` is the
21
+ * single source of truth — every downstream consumer that branches on
22
+ * the form goes through this helper rather than duplicating the check.
23
+ */
24
+ function isVariantArrayMarker(value) {
25
+ return Array.isArray(value.values);
26
+ }
27
+ function isStringMarker(value) {
28
+ return typeof value === "object" && value !== null && value.__kind === "string";
29
+ }
30
+ function isNumberMarker(value) {
31
+ return typeof value === "object" && value !== null && value.__kind === "number";
32
+ }
33
+ function isLayerMarker(value) {
34
+ return typeof value === "object" && value !== null && value.__kind === "layer";
35
+ }
36
+ /**
37
+ * Synthetic discriminator state a `props` axis compiles to, per axis side.
38
+ * The entry's label is the value. Codegen keys the merged spec's `$cond`
39
+ * on this, and the studio seeds it per cell — both derive it here so they
40
+ * never drift. (`columns`/`rows` entries are concatenated as sibling
41
+ * values of one dimension, so one key per side suffices.)
42
+ */
43
+ const PREVIEW_SEED_KEY = {
44
+ row: "__previewSeedRow",
45
+ column: "__previewSeedCol"
46
+ };
47
+ /** True when every key in `when` equals the cell coordinate's value. */
48
+ function matchesPreviewWhen(when, coord) {
49
+ if (!when) return true;
50
+ for (const key of Object.keys(when)) if (coord[key] !== when[key]) return false;
51
+ return true;
52
+ }
53
+ /**
54
+ * Merge the `props` of every rule whose `when` matches `coord` (in order,
55
+ * so later matching rules win). Shared by codegen's combo enumeration and
56
+ * the studio's cell assembly so a `props` axis resolves identically.
57
+ */
58
+ function resolvePreviewRules(rules, coord) {
59
+ const out = {};
60
+ for (const rule of rules) if (matchesPreviewWhen(rule.when, coord)) Object.assign(out, rule.props);
61
+ return out;
62
+ }
63
+ function isPreviewAxisMarker(value) {
64
+ return typeof value === "object" && value !== null && value.__kind === "previewAxis";
65
+ }
66
+ //#endregion
67
+ export { PREVIEW_SEED_KEY, isBoolMarker, isLayerMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules };
@@ -0,0 +1,159 @@
1
+ //#region ../config/dist/refs.d.ts
2
+ //#region src/refs.d.ts
3
+ /**
4
+ * Cross-reference markers — the `{ __kind, ref }` shapes that appear in
5
+ * authored values and in the wire format. Each one represents "this
6
+ * position holds a pointer to another resource, not a literal."
7
+ *
8
+ * Naming:
9
+ *
10
+ * - `<X>Name` — the string-side identifier (`'color/brand'`, `'Box'`).
11
+ * Narrowed when the matching `Registered*` interface is augmented;
12
+ * falls open to `string` otherwise.
13
+ * - `<X>Ref` — the boxed marker shape `{ __kind, ref }` carrying an
14
+ * `<X>Name`. Distinguishes a pointer from a literal at every position
15
+ * that can hold either.
16
+ * - `<x>()` — the helper that constructs an `<X>Ref` from an `<X>Name`.
17
+ * - `is<X>Ref(value)` — type guard for use by the resolver and patch
18
+ * system.
19
+ *
20
+ * # Augmented refs
21
+ *
22
+ * The `Registered*` interfaces below are augmentation seams that
23
+ * consumer codegen populates via `declare module '@uds/config' {
24
+ * interface Registered* { ... } }`. When augmented, each ref's `ref`
25
+ * field narrows to only valid references — `token('color/brand')` is OK
26
+ * but `token('color/nope')` is a compile error. When un-augmented (this
27
+ * package's own tests, fresh consumers before first build), the ref
28
+ * accepts any string — codegen narrows it later.
29
+ */
30
+ interface RegisteredTokenGroups {}
31
+ interface RegisteredModifiers<T> {}
32
+ interface RegisteredModes {}
33
+ interface RegisteredCompositeStyles {}
34
+ interface RegisteredStyleProps {}
35
+ interface RegisteredComponents {}
36
+ interface RegisteredMotionDefs {}
37
+ interface RegisteredAssetGroups {}
38
+ /** `<groupName>/<tokenName>` for every registered token. */
39
+ type TokenName = [keyof RegisteredTokenGroups] extends [never] ? string : { [G in keyof RegisteredTokenGroups & string]: `${G}/${keyof RegisteredTokenGroups[G] & string}` }[keyof RegisteredTokenGroups & string];
40
+ /** Bare group names — `'color'`, `'spacing'`. */
41
+ type TokenGroupName = [keyof RegisteredTokenGroups] extends [never] ? string : keyof RegisteredTokenGroups & string;
42
+ /**
43
+ * Bare composite name (`'elevation'`) or `<name>/<variant>`
44
+ * (`'elevation/1'`).
45
+ *
46
+ * Indexes straight into `['styles']` rather than routing each member
47
+ * through an `extends { styles: infer V } ? … : never` conditional, for
48
+ * the same reason as `ModeName` — same resulting union, but no per-member
49
+ * conditional check + `infer`, and one consistent shape across every
50
+ * `*Name` union.
51
+ */
52
+ type CompositeName = [keyof RegisteredCompositeStyles] extends [never] ? `${string}/${string}` : (keyof RegisteredCompositeStyles & string) | { [C in keyof RegisteredCompositeStyles & string]: `${C}/${keyof RegisteredCompositeStyles[C]['styles'] & string}` }[keyof RegisteredCompositeStyles & string];
53
+ /**
54
+ * `<modeName>/<optionName>` for every registered mode option.
55
+ *
56
+ * Indexes straight into `['options']` rather than routing each member
57
+ * through an `extends { options: infer O } ? … : never` conditional.
58
+ * Both yield the same union, but the indexed access skips a per-member
59
+ * conditional assignability check + `infer`, so it's cheaper for the
60
+ * checker and keeps every `*Name` union on the one shape `TokenName`
61
+ * uses.
62
+ */
63
+ type ModeName = [keyof RegisteredModes] extends [never] ? `${string}/${string}` : { [M in keyof RegisteredModes & string]: `${M}/${keyof RegisteredModes[M]['options'] & string}` }[keyof RegisteredModes & string];
64
+ /** Style-prop names — `'bg'`, `'padding'`. */
65
+ type StylePropName = [keyof RegisteredStyleProps] extends [never] ? string : keyof RegisteredStyleProps & string;
66
+ /** Registered component names — `'Box'`, `'Alert'`. */
67
+ type ComponentName = [keyof RegisteredComponents] extends [never] ? string : keyof RegisteredComponents & string;
68
+ /** Bare asset-group slugs — `'icons'`, `'fonts'`. */
69
+ type AssetGroupName = [keyof RegisteredAssetGroups] extends [never] ? string : keyof RegisteredAssetGroups & string;
70
+ /** HTML tag names — open string for now; could narrow against `keyof JSX.IntrinsicElements`. */
71
+ type TagName = string;
72
+ interface TokenRef<TName extends string = string> {
73
+ readonly __kind: 'token';
74
+ readonly ref: TName;
75
+ }
76
+ interface TokenGroupRef<TName extends string = string> {
77
+ readonly __kind: 'tokenGroup';
78
+ readonly ref: TName;
79
+ }
80
+ interface CompositeRef<TName extends string = string, TLayer extends string | undefined = string | undefined> {
81
+ readonly __kind: 'composite';
82
+ readonly ref: TName;
83
+ /**
84
+ * Layer the marker should land on when used as a `.config()` prop
85
+ * binding (set by `composite(ref).on(layer)`). Absent when the ref
86
+ * is used as a token value, modifier selector, or as a bare prop
87
+ * binding that defaults to the `'root'` layer downstream.
88
+ */
89
+ readonly layer?: TLayer;
90
+ }
91
+ interface ModeRef<TName extends string = string> {
92
+ readonly __kind: 'mode';
93
+ readonly ref: TName;
94
+ }
95
+ interface StylePropRef<TName extends string = string> {
96
+ readonly __kind: 'styleProp';
97
+ readonly ref: TName;
98
+ readonly layer?: string;
99
+ /**
100
+ * Bind the style-prop to a specific layer — `styleProp('bg').on('root')`
101
+ * routes the JSX prop into the named layer instead of the component's
102
+ * own layer. Codegen reads the `layer` field and emits a class on
103
+ * that layer. Mirrors the old `@uds/config` `styleProp().on()` chain.
104
+ */
105
+ on(layer: string): StylePropRef<TName>;
106
+ }
107
+ interface TagRef<TName extends string = string> {
108
+ readonly __kind: 'tag';
109
+ readonly ref: TName;
110
+ }
111
+ interface ComponentRef<TName extends string = string> {
112
+ readonly __kind: 'component';
113
+ readonly ref: TName;
114
+ }
115
+ /**
116
+ * Asset-group pointer. The same `{ __kind, ref }` tag is *embedded* on
117
+ * the full group definition `defineAssetGroup(...)` returns (the
118
+ * definition object doubles as its own ref), so `isAssetGroupRef()` accepts
119
+ * both the bare marker and the live group object. The definition's
120
+ * `ref` is late-bound at `registerAssetGroups` and throws when read
121
+ * before registration; the guard only inspects `__kind`, so it is safe
122
+ * on unregistered groups.
123
+ */
124
+ interface AssetGroupRef<TName extends string = string> {
125
+ readonly __kind: 'assetGroup';
126
+ readonly ref: TName;
127
+ }
128
+ type AnyRef = TokenRef | TokenGroupRef | CompositeRef | ModeRef | StylePropRef | TagRef | ComponentRef | AssetGroupRef;
129
+ /** Doc-alignment alias kept for ergonomic import. */
130
+ type TokenQualifiedName = TokenName;
131
+ declare function token<TName extends TokenName>(ref: TName): TokenRef<TName>;
132
+ declare function tokenGroup<TName extends TokenGroupName>(ref: TName): TokenGroupRef<TName>;
133
+ /**
134
+ * `composite(ref)` returns a bare `CompositeRef` plus an `.on(layer)`
135
+ * method that produces the same shape with `layer` filled in — both
136
+ * forms are `CompositeRef`. Codegen's marker probe in
137
+ * `transformAuthoringSource.ts` reads `{ __kind, ref, layer? }`
138
+ * uniformly, so the on-layer marker is just a `CompositeRef` with a
139
+ * concrete `layer` field.
140
+ */
141
+ interface CompositeRefBuilder<TName extends string> extends CompositeRef<TName, undefined> {
142
+ on<TLayer extends string>(layer: TLayer): CompositeRef<TName, TLayer>;
143
+ }
144
+ declare function composite<TName extends CompositeName>(ref: TName): CompositeRefBuilder<TName>;
145
+ declare function mode<TName extends ModeName>(ref: TName): ModeRef<TName>;
146
+ declare function styleProp<TName extends StylePropName>(ref: TName): StylePropRef<TName>;
147
+ declare function tag<TName extends TagName>(ref: TName): TagRef<TName>;
148
+ declare function component<TName extends ComponentName>(ref: TName): ComponentRef<TName>;
149
+ declare function assetGroup<TName extends AssetGroupName>(ref: TName): AssetGroupRef<TName>;
150
+ declare function isTokenRef(value: unknown): value is TokenRef;
151
+ declare function isTokenGroupRef(value: unknown): value is TokenGroupRef;
152
+ declare function isCompositeRef(value: unknown): value is CompositeRef;
153
+ declare function isModeRef(value: unknown): value is ModeRef;
154
+ declare function isStylePropRef(value: unknown): value is StylePropRef;
155
+ declare function isTagRef(value: unknown): value is TagRef;
156
+ declare function isComponentRef(value: unknown): value is ComponentRef;
157
+ declare function isAssetGroupRef(value: unknown): value is AssetGroupRef; //#endregion
158
+ //#endregion
159
+ export { AnyRef, AssetGroupName, AssetGroupRef, ComponentName, ComponentRef, CompositeName, CompositeRef, CompositeRefBuilder, ModeName, ModeRef, RegisteredAssetGroups, RegisteredComponents, RegisteredCompositeStyles, RegisteredModes, RegisteredModifiers, RegisteredMotionDefs, RegisteredStyleProps, RegisteredTokenGroups, StylePropName, StylePropRef, TagName, TagRef, TokenGroupName, TokenGroupRef, TokenName, TokenQualifiedName, TokenRef, assetGroup, component, composite, isAssetGroupRef, isComponentRef, isCompositeRef, isModeRef, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, mode, styleProp, tag, token, tokenGroup };
@@ -1,77 +1,104 @@
1
- import { kebabCase } from "../../utils/dist/string-utils/kebabCase.js";
2
- import { safeTokenName } from "../../utils/dist/string-utils/cssVar.js";
3
- import "../../utils/dist/index.js";
4
1
  //#region ../config/dist/refs.js
5
- /**
6
- * Token references — `'{namespace/key}'` braces in token values.
7
- *
8
- * Authors can point one token at another via a brace-wrapped path:
9
- *
10
- * defineVars({
11
- * spectrum: { 'blue/500': { value: '#1167f4' } },
12
- * color: { brand: { value: '{spectrum/blue/500}' } },
13
- * })
14
- *
15
- * At CSS-declaration time this expands to a CSS variable alias:
16
- *
17
- * --uds-spectrum-blue-500: #1167f4;
18
- * --uds-color-brand: var(--uds-spectrum-blue-500);
19
- *
20
- * Refs are a purely syntactic transform — no graph walk, no cycle
21
- * detection. CSS handles aliasing (and any cascade cycles) at runtime.
22
- * Refs that don't match a declared token resolve to a `var(...)` that
23
- * has no `:root` declaration; the browser falls back to the property's
24
- * initial value.
25
- *
26
- * Consumption is unchanged: `tokens.color.brand` in component configs
27
- * still resolves to `var(--uds-color-brand)`, regardless of whether the
28
- * brand value itself is a literal or a ref.
29
- */
30
- const REF_PATTERN = /^\{([^{}]+)\}$/;
31
- /**
32
- * Parse a value as a token ref. Returns `null` when the value isn't a
33
- * brace-wrapped ref of the form `{namespace/name}`. The `name` portion
34
- * may contain additional slashes — only the first slash is treated as
35
- * the namespace separator.
36
- *
37
- * Color-modifier values (`darken` / `lighten`) are a structured object
38
- * form, not a string-encoded suffix. See {@link TokenWithModifier}.
39
- */
40
- function parseTokenRef(value) {
41
- const outer = REF_PATTERN.exec(value);
42
- if (!outer) return null;
43
- const body = outer[1];
44
- if (!body) return null;
45
- return parseRefBody(body);
46
- }
47
- function parseRefBody(body) {
48
- if (body.includes("{") || body.includes("}")) return null;
49
- const slashIdx = body.indexOf("/");
50
- if (slashIdx <= 0 || slashIdx >= body.length - 1) return null;
2
+ function token(ref) {
51
3
  return {
52
- namespace: body.slice(0, slashIdx),
53
- name: body.slice(slashIdx + 1)
4
+ __kind: "token",
5
+ ref
54
6
  };
55
7
  }
56
- /**
57
- * Resolve a token value to its CSS form. If `value` is a token ref, returns
58
- * the corresponding `var(--<prefix>-<namespace>-<name>)` string. Otherwise
59
- * returns the value unchanged.
60
- *
61
- * The CSS variable name is built the same way `defineVars` builds its `:root`
62
- * declarations: `kebabCase` on the namespace, `safeTokenName` on the token
63
- * name. So `{spectrum/blue/500}` resolves to `var(--uds-spectrum-blue-500)`
64
- * (matching the namespace's own emitted variable name).
65
- */
66
- function resolveTokenRef(value, configPrefix) {
67
- const ref = parseTokenRef(value);
68
- if (!ref) return value;
69
- return refToVar(ref.namespace, ref.name, configPrefix);
70
- }
71
- function refToVar(namespace, name, configPrefix) {
72
- const cssPrefix = kebabCase(namespace);
73
- const cssName = safeTokenName(name);
74
- return `var(${configPrefix ? `--${configPrefix}-${cssPrefix}-${cssName}` : `--${cssPrefix}-${cssName}`})`;
8
+ function tokenGroup(ref) {
9
+ return {
10
+ __kind: "tokenGroup",
11
+ ref
12
+ };
13
+ }
14
+ function composite(ref) {
15
+ return Object.assign({
16
+ __kind: "composite",
17
+ ref
18
+ }, { on(layer) {
19
+ return {
20
+ __kind: "composite",
21
+ ref,
22
+ layer
23
+ };
24
+ } });
25
+ }
26
+ function mode(ref) {
27
+ return {
28
+ __kind: "mode",
29
+ ref
30
+ };
31
+ }
32
+ function styleProp(ref) {
33
+ const marker = {
34
+ __kind: "styleProp",
35
+ ref
36
+ };
37
+ Object.defineProperty(marker, "on", {
38
+ enumerable: false,
39
+ configurable: true,
40
+ writable: true,
41
+ value(layer) {
42
+ const next = {
43
+ __kind: "styleProp",
44
+ ref,
45
+ layer
46
+ };
47
+ Object.defineProperty(next, "on", {
48
+ enumerable: false,
49
+ configurable: true,
50
+ writable: true,
51
+ value: marker.on
52
+ });
53
+ return next;
54
+ }
55
+ });
56
+ return marker;
57
+ }
58
+ function tag(ref) {
59
+ return {
60
+ __kind: "tag",
61
+ ref
62
+ };
63
+ }
64
+ function component(ref) {
65
+ return {
66
+ __kind: "component",
67
+ ref
68
+ };
69
+ }
70
+ function assetGroup(ref) {
71
+ return {
72
+ __kind: "assetGroup",
73
+ ref
74
+ };
75
+ }
76
+ function isRefOf(value, kind) {
77
+ return typeof value === "object" && value !== null && value.__kind === kind;
78
+ }
79
+ function isTokenRef(value) {
80
+ return isRefOf(value, "token");
81
+ }
82
+ function isTokenGroupRef(value) {
83
+ return isRefOf(value, "tokenGroup");
84
+ }
85
+ function isCompositeRef(value) {
86
+ return isRefOf(value, "composite");
87
+ }
88
+ function isModeRef(value) {
89
+ return isRefOf(value, "mode");
90
+ }
91
+ function isStylePropRef(value) {
92
+ return isRefOf(value, "styleProp");
93
+ }
94
+ function isTagRef(value) {
95
+ return isRefOf(value, "tag");
96
+ }
97
+ function isComponentRef(value) {
98
+ return isRefOf(value, "component");
99
+ }
100
+ function isAssetGroupRef(value) {
101
+ return isRefOf(value, "assetGroup");
75
102
  }
76
103
  //#endregion
77
- export { parseTokenRef, resolveTokenRef };
104
+ export { assetGroup, component, composite, isAssetGroupRef, isComponentRef, isCompositeRef, isModeRef, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, mode, styleProp, tag, token, tokenGroup };