@yahoo/uds-create-config 2.44.0 → 3.0.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 (376) hide show
  1. package/README.md +129 -0
  2. package/dist/ai-lanes.d.ts +23 -0
  3. package/dist/ai-lanes.js +34 -0
  4. package/dist/authoring/define-component.d.ts +85 -0
  5. package/dist/configs/CanvasConfig.d.ts +3237 -0
  6. package/dist/configs/CanvasConfig.js +332 -0
  7. package/dist/configs/build-options.d.ts +10 -0
  8. package/dist/configs/build-options.js +68 -0
  9. package/dist/configs/platform.d.ts +15 -0
  10. package/dist/configs/platform.js +17 -0
  11. package/dist/configs/react-native-system.d.ts +3026 -0
  12. package/dist/configs/react-native-system.js +64 -0
  13. package/dist/configs/system.d.ts +2771 -0
  14. package/dist/configs/system.js +74 -0
  15. package/dist/css/properties.generated.d.ts +14 -0
  16. package/dist/css/properties.generated.js +6260 -0
  17. package/dist/css/value-type.d.ts +48 -0
  18. package/dist/css/value-type.js +131 -0
  19. package/dist/css/values.d.ts +33 -0
  20. package/dist/css/values.js +116 -0
  21. package/dist/entities/native/NativeModifier.d.ts +25 -0
  22. package/dist/entities/native/NativeModifier.js +41 -0
  23. package/dist/entities/native/NativeSettings.d.ts +44 -0
  24. package/dist/entities/native/NativeSettings.js +39 -0
  25. package/dist/entities/native/NativeStyleProperty.d.ts +355 -0
  26. package/dist/entities/native/NativeStyleProperty.js +28 -0
  27. package/dist/entities/native/NativeToken.d.ts +31 -0
  28. package/dist/entities/native/NativeToken.js +49 -0
  29. package/dist/entities/system/CanvasRole.d.ts +34 -0
  30. package/dist/entities/system/CanvasRole.js +45 -0
  31. package/dist/entities/system/Component.d.ts +1287 -0
  32. package/dist/entities/system/Component.js +1840 -0
  33. package/dist/entities/system/Composite.d.ts +12 -0
  34. package/dist/entities/system/Composite.js +26 -0
  35. package/dist/entities/system/Device.d.ts +11 -0
  36. package/dist/entities/system/Device.js +18 -0
  37. package/dist/entities/system/File.d.ts +72 -0
  38. package/dist/entities/system/File.js +136 -0
  39. package/dist/entities/system/Font.d.ts +48 -0
  40. package/dist/entities/system/Font.js +56 -0
  41. package/dist/entities/system/GlobalStyle.d.ts +26 -0
  42. package/dist/entities/system/GlobalStyle.js +54 -0
  43. package/dist/entities/system/Guidance.d.ts +85 -0
  44. package/dist/entities/system/Guidance.js +59 -0
  45. package/dist/entities/system/GuidanceStyle.d.ts +14 -0
  46. package/dist/entities/system/GuidanceStyle.js +8 -0
  47. package/dist/entities/system/Icon.d.ts +46 -0
  48. package/dist/entities/system/Icon.js +46 -0
  49. package/dist/entities/system/LinkedSystem.d.ts +504 -0
  50. package/dist/entities/system/LinkedSystem.js +814 -0
  51. package/dist/entities/system/Modifier.d.ts +92 -0
  52. package/dist/entities/system/Modifier.js +120 -0
  53. package/dist/entities/system/Motion.d.ts +28 -0
  54. package/dist/entities/system/Motion.js +48 -0
  55. package/dist/entities/system/Operation.d.ts +100 -0
  56. package/dist/entities/system/Operation.js +236 -0
  57. package/dist/entities/system/Package.d.ts +42 -0
  58. package/dist/entities/system/Package.js +75 -0
  59. package/dist/entities/system/Settings.d.ts +94 -0
  60. package/dist/entities/system/Settings.js +166 -0
  61. package/dist/entities/system/StyleProperty.d.ts +135 -0
  62. package/dist/entities/system/StyleProperty.js +438 -0
  63. package/dist/entities/system/Token.d.ts +67 -0
  64. package/dist/entities/system/Token.js +129 -0
  65. package/dist/entities/system/Tool.d.ts +134 -0
  66. package/dist/entities/system/Tool.js +124 -0
  67. package/dist/entities/system/color.d.ts +64 -0
  68. package/dist/entities/system/color.js +123 -0
  69. package/dist/entities/system/component-module.d.ts +63 -0
  70. package/dist/entities/system/component-module.js +258 -0
  71. package/dist/entities/system/copy-plan.d.ts +98 -0
  72. package/dist/entities/system/copy-plan.js +451 -0
  73. package/dist/entities/system/defineComponent.d.ts +428 -0
  74. package/dist/entities/system/defineComponent.js +337 -0
  75. package/dist/entities/system/element.d.ts +101 -0
  76. package/dist/entities/system/element.js +171 -0
  77. package/dist/entities/system/icon-library.d.ts +64 -0
  78. package/dist/entities/system/icon-library.js +112 -0
  79. package/dist/entities/system/icon-metadata.d.ts +72 -0
  80. package/dist/entities/system/icon-metadata.js +111 -0
  81. package/dist/entities/system/link-declaration.d.ts +27 -0
  82. package/dist/entities/system/link-declaration.js +64 -0
  83. package/dist/entities/system/link-plan.d.ts +160 -0
  84. package/dist/entities/system/link-plan.js +770 -0
  85. package/dist/entities/system/runtime-modules.d.ts +25 -0
  86. package/dist/entities/system/runtime-modules.js +38 -0
  87. package/dist/entities/system/style-bag.d.ts +20 -0
  88. package/dist/entities/system/style-bag.js +246 -0
  89. package/dist/entities/system/token-index.d.ts +89 -0
  90. package/dist/entities/system/token-index.js +112 -0
  91. package/dist/framework/Config.d.ts +2472 -0
  92. package/dist/framework/Config.js +5023 -0
  93. package/dist/framework/Entity.d.ts +127 -0
  94. package/dist/framework/Entity.js +125 -0
  95. package/dist/framework/authoring.d.ts +24 -0
  96. package/dist/framework/authoring.js +7 -0
  97. package/dist/framework/change-hooks.d.ts +119 -0
  98. package/dist/framework/change-hooks.js +131 -0
  99. package/dist/framework/changes.d.ts +88 -0
  100. package/dist/framework/changes.js +246 -0
  101. package/dist/framework/class-names.d.ts +260 -0
  102. package/dist/framework/class-names.js +630 -0
  103. package/dist/framework/coalesce.d.ts +25 -0
  104. package/dist/framework/coalesce.js +60 -0
  105. package/dist/framework/config-op.d.ts +76 -0
  106. package/dist/framework/config-op.js +43 -0
  107. package/dist/framework/config-operation-kind.d.ts +14 -0
  108. package/dist/framework/config-operation-kind.js +14 -0
  109. package/dist/framework/config-ops.d.ts +34 -0
  110. package/dist/framework/config-ops.js +187 -0
  111. package/dist/framework/defineConfig.d.ts +196 -0
  112. package/dist/framework/defineConfig.js +100 -0
  113. package/dist/framework/defineDerivedEntity.d.ts +74 -0
  114. package/dist/framework/defineDerivedEntity.js +83 -0
  115. package/dist/framework/defineEntity.d.ts +318 -0
  116. package/dist/framework/defineEntity.js +183 -0
  117. package/dist/framework/defineSubEntity.d.ts +148 -0
  118. package/dist/framework/defineSubEntity.js +121 -0
  119. package/dist/framework/derived-mutations.d.ts +20 -0
  120. package/dist/framework/derived-mutations.js +38 -0
  121. package/dist/framework/entity-search.d.ts +29 -0
  122. package/dist/framework/entity-search.js +117 -0
  123. package/dist/framework/inline-sources.d.ts +49 -0
  124. package/dist/framework/inline-sources.js +388 -0
  125. package/dist/framework/layer-styles.d.ts +25 -0
  126. package/dist/framework/layer-styles.js +49 -0
  127. package/dist/framework/memo.d.ts +48 -0
  128. package/dist/framework/memo.js +84 -0
  129. package/dist/framework/overlay.d.ts +49 -0
  130. package/dist/framework/overlay.js +17 -0
  131. package/dist/framework/plan.d.ts +49 -0
  132. package/dist/framework/plan.js +73 -0
  133. package/dist/framework/projections.d.ts +480 -0
  134. package/dist/framework/projections.js +974 -0
  135. package/dist/framework/prop-surface.d.ts +132 -0
  136. package/dist/framework/prop-surface.js +278 -0
  137. package/dist/framework/ref-graph.d.ts +71 -0
  138. package/dist/framework/ref-graph.js +158 -0
  139. package/dist/framework/ref-integrity.d.ts +55 -0
  140. package/dist/framework/ref-integrity.js +171 -0
  141. package/dist/framework/registered.d.ts +95 -0
  142. package/dist/framework/registry-dir.d.ts +42 -0
  143. package/dist/framework/registry-dir.js +48 -0
  144. package/dist/framework/registry.d.ts +300 -0
  145. package/dist/framework/registry.js +104 -0
  146. package/dist/framework/rejection.d.ts +58 -0
  147. package/dist/framework/rejection.js +111 -0
  148. package/dist/framework/rename-inference.d.ts +26 -0
  149. package/dist/framework/rename-inference.js +50 -0
  150. package/dist/framework/render-spec.d.ts +296 -0
  151. package/dist/framework/render-spec.js +809 -0
  152. package/dist/framework/schema-version.d.ts +140 -0
  153. package/dist/framework/schema-version.js +214 -0
  154. package/dist/framework/schemas.d.ts +109 -0
  155. package/dist/framework/schemas.js +615 -0
  156. package/dist/framework/session.d.ts +196 -0
  157. package/dist/framework/session.js +367 -0
  158. package/dist/framework/signature.d.ts +15 -0
  159. package/dist/framework/signature.js +83 -0
  160. package/dist/framework/snapshot.d.ts +115 -0
  161. package/dist/framework/snapshot.js +277 -0
  162. package/dist/framework/source-integrity.d.ts +226 -0
  163. package/dist/framework/source-integrity.js +478 -0
  164. package/dist/framework/sources.d.ts +211 -0
  165. package/dist/framework/sources.js +89 -0
  166. package/dist/framework/utils/compiled-schema.d.ts +23 -0
  167. package/dist/framework/utils/compiled-schema.js +46 -0
  168. package/dist/framework/utils/content-key.d.ts +15 -0
  169. package/dist/framework/utils/content-key.js +33 -0
  170. package/dist/framework/utils/enumerated.d.ts +13 -0
  171. package/dist/framework/utils/enumerated.js +19 -0
  172. package/dist/framework/utils/field-path.d.ts +95 -0
  173. package/dist/framework/utils/field-path.js +136 -0
  174. package/dist/framework/utils/field-schema.d.ts +55 -0
  175. package/dist/framework/utils/field-schema.js +183 -0
  176. package/dist/framework/utils/group.d.ts +37 -0
  177. package/dist/framework/utils/group.js +13 -0
  178. package/dist/framework/utils/package-path.d.ts +37 -0
  179. package/dist/framework/utils/package-path.js +61 -0
  180. package/dist/framework/utils/refs.d.ts +194 -0
  181. package/dist/framework/utils/refs.js +403 -0
  182. package/dist/framework/validate-spec.d.ts +27 -0
  183. package/dist/framework/validate-spec.js +45 -0
  184. package/dist/framework/value-domain.d.ts +26 -0
  185. package/dist/framework/value-domain.js +202 -0
  186. package/dist/framework/views-facade.d.ts +15 -0
  187. package/dist/framework/views-facade.js +19 -0
  188. package/dist/index.d.ts +90 -42
  189. package/dist/index.js +86 -37
  190. package/dist/migrations/2.0.0/raw-css.d.ts +11 -0
  191. package/dist/migrations/2.0.0/raw-css.js +72 -0
  192. package/dist/migrations/2.0.0/v1-artifact.d.ts +1559 -0
  193. package/dist/migrations/2.0.0/v1-artifact.js +1018 -0
  194. package/dist/migrations/20260908171448_settings_as_kind.d.ts +22 -0
  195. package/dist/migrations/20260908171448_settings_as_kind.js +89 -0
  196. package/dist/migrations/20260908194245_visible_state_pointer.d.ts +19 -0
  197. package/dist/migrations/20260908194245_visible_state_pointer.js +115 -0
  198. package/dist/migrations/20260909183001_icon_knockout_variants.d.ts +18 -0
  199. package/dist/migrations/20260909183001_icon_knockout_variants.js +8 -0
  200. package/dist/migrations/20260910212453_linked_system_link_ops.d.ts +13 -0
  201. package/dist/migrations/20260910212453_linked_system_link_ops.js +8 -0
  202. package/dist/migrations/index.d.ts +2 -0
  203. package/dist/migrations/index.js +2 -0
  204. package/dist/react-native/style-keys.generated.d.ts +10 -0
  205. package/dist/react-native/style-keys.generated.js +167 -0
  206. package/dist/renderer/RendererErrorBoundary.d.ts +32 -5
  207. package/dist/renderer/RendererErrorBoundary.js +59 -10
  208. package/dist/renderer/UdsRenderer.d.ts +11 -10
  209. package/dist/renderer/UdsRenderer.js +1 -1
  210. package/dist/renderer/assetEntries.d.ts +37 -0
  211. package/dist/renderer/assetEntries.js +39 -0
  212. package/dist/renderer/assetRenderable.d.ts +14 -6
  213. package/dist/renderer/assetRenderable.js +8 -2
  214. package/dist/renderer/componentEntry.d.ts +58 -0
  215. package/dist/renderer/componentEntry.js +71 -0
  216. package/dist/renderer/icon-library.d.ts +20 -0
  217. package/dist/renderer/index.d.ts +7 -7
  218. package/dist/renderer/index.js +5 -5
  219. package/dist/renderer/primitives/SlotRenderer.d.ts +1 -1
  220. package/dist/renderer/primitives/SlotRenderer.js +1 -1
  221. package/dist/renderer/runtimeComponent.d.ts +33 -0
  222. package/dist/renderer/runtimeComponent.js +113 -0
  223. package/dist/renderer/spec-content.d.ts +43 -0
  224. package/dist/renderer/spec-content.js +95 -0
  225. package/dist/renderer/wrapRegistry.d.ts +22 -37
  226. package/dist/renderer/wrapRegistry.js +10 -20
  227. package/dist/renderer/wrappers/event-bridge.js +6 -5
  228. package/dist/renderer/wrappers/hex-normalize.js +6 -5
  229. package/dist/renderer/wrappers/html-aliases.d.ts +7 -2
  230. package/dist/renderer/wrappers/html-aliases.js +36 -19
  231. package/dist/renderer/wrappers/inline-styles.js +7 -6
  232. package/dist/spec/asset-jsx.d.ts +18 -5
  233. package/dist/spec/asset-jsx.js +27 -16
  234. package/dist/spec/collapse-text-labels.d.ts +5 -15
  235. package/dist/spec/collapse-text-labels.js +26 -19
  236. package/dist/spec/empty-node-slots.d.ts +56 -34
  237. package/dist/spec/empty-node-slots.js +87 -47
  238. package/dist/spec/index.d.ts +21 -10
  239. package/dist/spec/index.js +21 -10
  240. package/dist/spec/jsxToSpec.d.ts +14 -9
  241. package/dist/spec/jsxToSpec.js +20 -3
  242. package/dist/spec/preview-elements.d.ts +63 -0
  243. package/dist/spec/preview-elements.js +89 -0
  244. package/dist/spec/rewrite-refs.d.ts +58 -0
  245. package/dist/spec/rewrite-refs.js +250 -0
  246. package/dist/spec/specToJsx.js +18 -29
  247. package/dist/tsconfig.tsbuildinfo +1 -1
  248. package/package.json +39 -52
  249. package/dist/AssetGroup.d.ts +0 -77
  250. package/dist/AssetGroup.js +0 -125
  251. package/dist/Component.d.ts +0 -333
  252. package/dist/Component.js +0 -1061
  253. package/dist/ComponentGroup.d.ts +0 -22
  254. package/dist/ComponentGroup.js +0 -51
  255. package/dist/CompositeStyle.d.ts +0 -30
  256. package/dist/CompositeStyle.js +0 -59
  257. package/dist/Config.d.ts +0 -528
  258. package/dist/Config.js +0 -1712
  259. package/dist/Mode.d.ts +0 -41
  260. package/dist/Mode.js +0 -81
  261. package/dist/Modifier.d.ts +0 -51
  262. package/dist/Modifier.js +0 -97
  263. package/dist/MotionDef.d.ts +0 -81
  264. package/dist/MotionDef.js +0 -212
  265. package/dist/Props.d.ts +0 -332
  266. package/dist/Props.js +0 -35
  267. package/dist/Provider.d.ts +0 -20
  268. package/dist/Provider.js +0 -14
  269. package/dist/StyleProp.d.ts +0 -145
  270. package/dist/StyleProp.js +0 -239
  271. package/dist/Token.d.ts +0 -76
  272. package/dist/Token.js +0 -133
  273. package/dist/TokenGroup.d.ts +0 -33
  274. package/dist/TokenGroup.js +0 -69
  275. package/dist/asset-kind.d.ts +0 -55
  276. package/dist/asset-kind.js +0 -29
  277. package/dist/asset-value.d.ts +0 -23
  278. package/dist/asset-value.js +0 -40
  279. package/dist/brands.d.ts +0 -30
  280. package/dist/brands.js +0 -20
  281. package/dist/captureCallerPath.d.ts +0 -48
  282. package/dist/captureCallerPath.js +0 -95
  283. package/dist/colorExpressions.d.ts +0 -131
  284. package/dist/colorExpressions.js +0 -148
  285. package/dist/component-referrers.d.ts +0 -30
  286. package/dist/component-referrers.js +0 -40
  287. package/dist/config-diagnostics.d.ts +0 -21
  288. package/dist/config-diagnostics.js +0 -12
  289. package/dist/defineAssetGroup.d.ts +0 -200
  290. package/dist/defineAssetGroup.js +0 -323
  291. package/dist/defineProvider.d.ts +0 -29
  292. package/dist/defineProvider.js +0 -60
  293. package/dist/element-marker.d.ts +0 -63
  294. package/dist/element-marker.js +0 -113
  295. package/dist/entity-utils.d.ts +0 -56
  296. package/dist/entity-utils.js +0 -105
  297. package/dist/extension.d.ts +0 -55
  298. package/dist/extension.js +0 -214
  299. package/dist/factories.d.ts +0 -863
  300. package/dist/factories.js +0 -475
  301. package/dist/font-face.d.ts +0 -25
  302. package/dist/font-face.js +0 -72
  303. package/dist/foreign-component-name.d.ts +0 -21
  304. package/dist/foreign-component-name.js +0 -42
  305. package/dist/interpolate.d.ts +0 -20
  306. package/dist/interpolate.js +0 -10
  307. package/dist/jsx/__fixtures__/cross-component-preview.d.ts +0 -3
  308. package/dist/jsx/__fixtures__/cross-component-preview.js +0 -15
  309. package/dist/jsx/jsx-dev-runtime.d.ts +0 -15
  310. package/dist/jsx/jsx-dev-runtime.js +0 -11
  311. package/dist/jsx/jsx-runtime.d.ts +0 -48
  312. package/dist/jsx/jsx-runtime.js +0 -305
  313. package/dist/linked-system-pins.d.ts +0 -30
  314. package/dist/linked-system-pins.js +0 -45
  315. package/dist/linkedNodePrefixes.d.ts +0 -73
  316. package/dist/linkedNodePrefixes.js +0 -99
  317. package/dist/markers.d.ts +0 -235
  318. package/dist/markers.js +0 -70
  319. package/dist/motion-constants.d.ts +0 -37
  320. package/dist/motion-constants.js +0 -61
  321. package/dist/native/NativeConfig.d.ts +0 -56
  322. package/dist/native/NativeConfig.js +0 -162
  323. package/dist/native/assets.d.ts +0 -20
  324. package/dist/native/assets.js +0 -17
  325. package/dist/native/components.d.ts +0 -139
  326. package/dist/native/components.js +0 -67
  327. package/dist/native/index.d.ts +0 -18
  328. package/dist/native/index.js +0 -17
  329. package/dist/native/modes.d.ts +0 -10
  330. package/dist/native/modes.js +0 -11
  331. package/dist/native/types.d.ts +0 -95
  332. package/dist/native/types.js +0 -0
  333. package/dist/native/validation.d.ts +0 -8
  334. package/dist/native/validation.js +0 -885
  335. package/dist/native/values.d.ts +0 -7
  336. package/dist/native/values.js +0 -15
  337. package/dist/native.d.ts +0 -12
  338. package/dist/native.js +0 -10
  339. package/dist/refs.d.ts +0 -204
  340. package/dist/refs.js +0 -129
  341. package/dist/registry-aliases.d.ts +0 -33
  342. package/dist/registry-aliases.js +0 -35
  343. package/dist/registry-dir.d.ts +0 -22
  344. package/dist/registry-dir.js +0 -10
  345. package/dist/renderer/makeRegistry.d.ts +0 -34
  346. package/dist/renderer/makeRegistry.js +0 -52
  347. package/dist/renderer/makeUdsRenderer.d.ts +0 -13
  348. package/dist/renderer/makeUdsRenderer.js +0 -51
  349. package/dist/renderer/wrappers/component-slots.d.ts +0 -41
  350. package/dist/renderer/wrappers/component-slots.js +0 -66
  351. package/dist/renderer/wrappers/slot-resolution.d.ts +0 -25
  352. package/dist/renderer/wrappers/slot-resolution.js +0 -68
  353. package/dist/renderer/wrappers/void-elements.d.ts +0 -37
  354. package/dist/renderer/wrappers/void-elements.js +0 -40
  355. package/dist/spec/layer-props.d.ts +0 -52
  356. package/dist/spec/layer-props.js +0 -149
  357. package/dist/spec/preview-controls.d.ts +0 -44
  358. package/dist/spec/preview-controls.js +0 -139
  359. package/dist/spec/slot-refs.d.ts +0 -39
  360. package/dist/spec/slot-refs.js +0 -56
  361. package/dist/token-override-rows.d.ts +0 -68
  362. package/dist/token-override-rows.js +0 -233
  363. package/dist/tokenValueType.d.ts +0 -34
  364. package/dist/tokenValueType.js +0 -138
  365. package/dist/types/css-properties.d.ts +0 -233
  366. package/dist/types/css-properties.js +0 -14
  367. package/dist/types/css-property-keywords.d.ts +0 -156
  368. package/dist/types/css-property-keywords.js +0 -616
  369. package/dist/types/css-values.d.ts +0 -63
  370. package/dist/types/css-values.js +0 -16
  371. package/dist/types.d.ts +0 -1138
  372. package/dist/types.js +0 -12
  373. package/dist/units.d.ts +0 -14
  374. package/dist/units.js +0 -16
  375. package/dist/utils/index.d.ts +0 -4
  376. package/dist/utils/index.js +0 -4
package/package.json CHANGED
@@ -1,31 +1,18 @@
1
1
  {
2
2
  "name": "@yahoo/uds-create-config",
3
- "version": "2.44.0",
4
- "type": "module",
3
+ "version": "3.0.0",
5
4
  "private": false,
6
- "files": [
7
- "dist"
8
- ],
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
10
  "types": "./dist/index.d.ts",
12
11
  "default": "./dist/index.js"
13
12
  },
14
- "./native": {
15
- "types": "./dist/native.d.ts",
16
- "default": "./dist/native.js"
17
- },
18
- "./utils": {
19
- "types": "./dist/utils/index.d.ts",
20
- "default": "./dist/utils/index.js"
21
- },
22
- "./jsx/jsx-runtime": {
23
- "types": "./dist/jsx/jsx-runtime.d.ts",
24
- "default": "./dist/jsx/jsx-runtime.js"
25
- },
26
- "./jsx/jsx-dev-runtime": {
27
- "types": "./dist/jsx/jsx-dev-runtime.d.ts",
28
- "default": "./dist/jsx/jsx-dev-runtime.js"
13
+ "./migrations": {
14
+ "types": "./dist/migrations/index.d.ts",
15
+ "default": "./dist/migrations/index.js"
29
16
  },
30
17
  "./renderer": {
31
18
  "types": "./dist/renderer/index.d.ts",
@@ -35,57 +22,57 @@
35
22
  "types": "./dist/spec/index.d.ts",
36
23
  "default": "./dist/spec/index.js"
37
24
  },
38
- "./spec/*": {
39
- "types": "./dist/spec/*.d.ts",
40
- "default": "./dist/spec/*.js"
25
+ "./spec/apply-forced-modifiers": {
26
+ "types": "./dist/spec/apply-forced-modifiers.d.ts",
27
+ "default": "./dist/spec/apply-forced-modifiers.js"
41
28
  },
42
- "./package.json": "./package.json"
43
- },
44
- "imports": {
45
- "#jsx/jsx-runtime": {
46
- "types": "./src/jsx/jsx-runtime.ts",
47
- "default": "./src/jsx/jsx-runtime.ts"
29
+ "./spec/empty-node-slots": {
30
+ "types": "./dist/spec/empty-node-slots.d.ts",
31
+ "default": "./dist/spec/empty-node-slots.js"
32
+ },
33
+ "./spec/preview-elements": {
34
+ "types": "./dist/spec/preview-elements.d.ts",
35
+ "default": "./dist/spec/preview-elements.js"
48
36
  },
49
- "#jsx/jsx-dev-runtime": {
50
- "types": "./src/jsx/jsx-dev-runtime.ts",
51
- "default": "./src/jsx/jsx-dev-runtime.ts"
52
- }
37
+ "./package.json": "./package.json"
53
38
  },
54
39
  "scripts": {
55
- "bench": "bun run bench/load.bench.ts",
56
40
  "build": "tsdown",
57
41
  "clean": "internal-cli tools clean",
58
42
  "dev": "tsdown --watch --no-clean",
59
43
  "fix": "internal-cli tools fix",
44
+ "gen:css": "bun scripts/gen-css-properties.ts",
60
45
  "lint": "internal-cli tools lint",
61
- "test": "bun test src/",
62
- "test:update": "bun test src/ --update-snapshots",
46
+ "mint-migration": "bun scripts/mint-migration.ts",
47
+ "test": "bun test --timeout=30000 src/",
63
48
  "typecheck": "tsc -b"
64
49
  },
65
50
  "peerDependencies": {
66
- "@json-render/codegen": "^0.19.0",
67
- "@json-render/core": "^0.19.0",
68
- "@json-render/react": "^0.19.0",
69
- "@json-render/yaml": "^0.19.0",
51
+ "@json-render/codegen": "^0.20.0",
52
+ "@json-render/core": "^0.20.0",
53
+ "@json-render/react": "^0.20.0",
54
+ "motion": "^12.35.0",
70
55
  "react": "^19.2.4"
71
56
  },
72
57
  "dependencies": {
73
58
  "@babel/parser": "^7.29.0",
74
- "motion": "^12.35.0",
75
- "semver": "^7.7.3",
76
- "@yahoo/uds-create-types": "2.44.0",
77
- "@yahoo/uds-create-utils": "2.44.0"
59
+ "@babel/types": "^7.29.0",
60
+ "css-tree": "^3.2.1",
61
+ "zod": "^4.5.4"
78
62
  },
79
63
  "devDependencies": {
80
- "@babel/types": "^7.29.0",
81
- "@json-render/codegen": "^0.19.0",
82
- "@json-render/core": "^0.19.0",
83
- "@json-render/react": "^0.19.0",
84
- "@json-render/yaml": "^0.19.0",
64
+ "@json-render/codegen": "^0.20.0",
65
+ "@json-render/core": "^0.20.0",
66
+ "@json-render/react": "^0.20.0",
67
+ "@types/css-tree": "^2.3.10",
85
68
  "@types/react": "19.2.14",
86
- "@types/semver": "^7.8.0",
87
- "expect-type": "^1.2.1",
69
+ "mdn-data": "^2.27.1",
70
+ "motion": "^12.35.0",
88
71
  "react": "^19.2.4",
89
72
  "tsdown": "^0.21.0"
90
- }
73
+ },
74
+ "files": [
75
+ "dist"
76
+ ],
77
+ "udsSchemaVersion": 20260910212453
91
78
  }
@@ -1,77 +0,0 @@
1
- import { AssetKind } from "./asset-kind.js";
2
- import { FontAssetMember, SerializedAssetGroup } from "./types.js";
3
- import { IconAssetMember, IconAssetMetadata } from "./defineAssetGroup.js";
4
-
5
- //#region src/AssetGroup.d.ts
6
- declare class AssetGroup {
7
- #private;
8
- /** The slug — the `registerAssetGroups` record key. */
9
- readonly name: string;
10
- readonly label: string;
11
- /** Source-library version shown in the Assets UI (e.g. `2.1.1`). */
12
- readonly version?: string;
13
- readonly description?: string;
14
- readonly assetKind: AssetKind;
15
- /** Member names — the `${assetName}` segment of each asset's id. */
16
- readonly assetNames: readonly string[];
17
- /** Icon class only — named size → px (picker options = keys). */
18
- readonly sizes?: Readonly<Record<string, number>>;
19
- /** Icon class only — group-level variant superset. */
20
- readonly variants?: readonly string[];
21
- /**
22
- * Icon class only — the component that authors this group's members
23
- * (`'Icon'`). One declaration covers both rendering and export: a placed
24
- * member draws on the canvas by rendering through this component, and a
25
- * placed asset node serializes to `<Icon name="Trophy" … />` and
26
- * round-trips back. Absent for a component-less group, whose members
27
- * render bare and export to the bare member tag.
28
- */
29
- readonly component?: string;
30
- /**
31
- * Live members keyed by asset name. Present when registered from
32
- * code; absent on icon groups hydrated from JSON (the serialized
33
- * icon form is a name list).
34
- */
35
- readonly members?: Readonly<Record<string, IconAssetMember | FontAssetMember>>;
36
- /** Icon class only — per-member harvested `.metadata`. Not serialized (yet). */
37
- readonly memberMetadata?: Readonly<Record<string, IconAssetMetadata>>;
38
- constructor(args: {
39
- name: string;
40
- label: string;
41
- version?: string;
42
- description?: string;
43
- assetKind: AssetKind;
44
- assetNames: readonly string[];
45
- sizes?: Readonly<Record<string, number>>;
46
- variants?: readonly string[];
47
- component?: string;
48
- members?: Readonly<Record<string, IconAssetMember | FontAssetMember>>;
49
- memberMetadata?: Readonly<Record<string, IconAssetMetadata>>;
50
- /** Live getter so the namespace resolves correctly regardless of
51
- * `configure({ namespace })` / registration ordering. */
52
- namespaceGetter?: () => string | undefined;
53
- });
54
- /** The owning system's registry namespace at read time. */
55
- get namespace(): string | undefined;
56
- /**
57
- * Per-asset identity — `${namespace}:asset:${slug}/${assetName}`
58
- * (`uds:asset:icons/Trophy`). Mirrors `Component.registryKey`: an
59
- * un-namespaced config produces the bare `asset:${slug}/${name}`
60
- * form. This string is the spec `type` and the render-registry key;
61
- * it must NEVER route through `Config.getComponent` (which splits on
62
- * the first `:` and would silently miss) — resolution is
63
- * registry-key lookup only.
64
- */
65
- assetType(assetName: string): string;
66
- toJSON(): SerializedAssetGroup & {
67
- name: string;
68
- };
69
- /**
70
- * Rebuild from the wire format. Icon groups hydrate without live
71
- * members (names only); font groups hydrate with their full records
72
- * — they are the serialized form.
73
- */
74
- static fromJSON(name: string, json: SerializedAssetGroup, namespaceGetter?: () => string | undefined): AssetGroup;
75
- }
76
- //#endregion
77
- export { AssetGroup };
@@ -1,125 +0,0 @@
1
- import { compact } from "./entity-utils.js";
2
- //#region src/AssetGroup.ts
3
- var AssetGroup = class AssetGroup {
4
- /** The slug — the `registerAssetGroups` record key. */
5
- name;
6
- label;
7
- /** Source-library version shown in the Assets UI (e.g. `2.1.1`). */
8
- version;
9
- description;
10
- assetKind;
11
- /** Member names — the `${assetName}` segment of each asset's id. */
12
- assetNames;
13
- /** Icon class only — named size → px (picker options = keys). */
14
- sizes;
15
- /** Icon class only — group-level variant superset. */
16
- variants;
17
- /**
18
- * Icon class only — the component that authors this group's members
19
- * (`'Icon'`). One declaration covers both rendering and export: a placed
20
- * member draws on the canvas by rendering through this component, and a
21
- * placed asset node serializes to `<Icon name="Trophy" … />` and
22
- * round-trips back. Absent for a component-less group, whose members
23
- * render bare and export to the bare member tag.
24
- */
25
- component;
26
- /**
27
- * Live members keyed by asset name. Present when registered from
28
- * code; absent on icon groups hydrated from JSON (the serialized
29
- * icon form is a name list).
30
- */
31
- members;
32
- /** Icon class only — per-member harvested `.metadata`. Not serialized (yet). */
33
- memberMetadata;
34
- #namespaceGetter;
35
- constructor(args) {
36
- this.name = args.name;
37
- this.label = args.label;
38
- this.version = args.version;
39
- this.description = args.description;
40
- this.assetKind = args.assetKind;
41
- this.assetNames = args.assetNames;
42
- this.sizes = args.sizes;
43
- this.variants = args.variants;
44
- this.component = args.component;
45
- this.members = args.members;
46
- this.memberMetadata = args.memberMetadata;
47
- this.#namespaceGetter = args.namespaceGetter;
48
- }
49
- /** The owning system's registry namespace at read time. */
50
- get namespace() {
51
- return this.#namespaceGetter?.();
52
- }
53
- /**
54
- * Per-asset identity — `${namespace}:asset:${slug}/${assetName}`
55
- * (`uds:asset:icons/Trophy`). Mirrors `Component.registryKey`: an
56
- * un-namespaced config produces the bare `asset:${slug}/${name}`
57
- * form. This string is the spec `type` and the render-registry key;
58
- * it must NEVER route through `Config.getComponent` (which splits on
59
- * the first `:` and would silently miss) — resolution is
60
- * registry-key lookup only.
61
- */
62
- assetType(assetName) {
63
- const bare = `asset:${this.name}/${assetName}`;
64
- const namespace = this.namespace;
65
- return namespace === void 0 ? bare : `${namespace}:${bare}`;
66
- }
67
- toJSON() {
68
- if (this.assetKind === "font") return {
69
- name: this.name,
70
- assetKind: "font",
71
- label: this.label,
72
- ...compact({
73
- version: this.version,
74
- description: this.description
75
- }),
76
- members: this.members ?? {}
77
- };
78
- return {
79
- name: this.name,
80
- assetKind: "icon",
81
- label: this.label,
82
- ...compact({
83
- version: this.version,
84
- description: this.description
85
- }),
86
- sizes: this.sizes ?? {},
87
- variants: this.variants ?? [],
88
- members: this.assetNames,
89
- ...compact({ component: this.component }),
90
- ...compact({ memberMetadata: this.memberMetadata && Object.keys(this.memberMetadata).length > 0 ? this.memberMetadata : void 0 })
91
- };
92
- }
93
- /**
94
- * Rebuild from the wire format. Icon groups hydrate without live
95
- * members (names only); font groups hydrate with their full records
96
- * — they are the serialized form.
97
- */
98
- static fromJSON(name, json, namespaceGetter) {
99
- if (json.assetKind === "font") return new AssetGroup({
100
- name,
101
- label: json.label,
102
- version: json.version,
103
- description: json.description,
104
- assetKind: "font",
105
- assetNames: Object.keys(json.members),
106
- members: json.members,
107
- namespaceGetter
108
- });
109
- return new AssetGroup({
110
- name,
111
- label: json.label,
112
- version: json.version,
113
- description: json.description,
114
- assetKind: "icon",
115
- assetNames: json.members,
116
- sizes: json.sizes,
117
- variants: json.variants,
118
- component: json.component,
119
- memberMetadata: json.memberMetadata,
120
- namespaceGetter
121
- });
122
- }
123
- };
124
- //#endregion
125
- export { AssetGroup };
@@ -1,333 +0,0 @@
1
- import { BaseStyles, ComponentDefinition, ComponentExtensionRecord, ComponentMetadata, ComponentMotionValue, CompoundPropsEntry, LayerInput, PreviewDefinition, PropBinding, RefTag, SerializedComponent, SystemLink } from "./types.js";
2
- import { SlotValueType } from "./markers.js";
3
- import { ComponentClassNames } from "@yahoo/uds-create-utils";
4
-
5
- //#region src/Component.d.ts
6
- /**
7
- * Terminal prop value kinds — what a JSX value actually resolves to at
8
- * render time. Used both as the discriminant of non-slot `PropInfo`
9
- * variants and as a slot's `valueType` after walking its forward chain
10
- * to the terminal binding.
11
- */
12
- type PrimitivePropKind = 'string' | 'number' | 'boolean' | 'variant' | 'function';
13
- /**
14
- * Slot value kinds — primitives, `'ReactNode'` for children-style slots, and
15
- * `'composite'` when the forward chain bottoms out at a `composite(...)` ref
16
- * (so a slot forwarding to a layer's composite prop renders like one).
17
- */
18
- type SlotValueKind = PrimitivePropKind | 'ReactNode' | 'composite';
19
- /** Discriminant for top-level prop bindings (the `kind` field of `PropInfo`). */
20
- type PropKind = PrimitivePropKind | 'styleProp' | 'slot';
21
- /**
22
- * Authoring shape of a component — how it was built, which decides how to
23
- * author a new one like it:
24
- * - `primitive` — single layer, no `extendsFrom`, no render fn (`Box`).
25
- * - `extends` — value-extends another component via `defineComponent(Parent)`
26
- * (`extendsFrom` is set); inherits the parent's prop surface (`Text`).
27
- * - `multi-layer` — composed from `.layers({...})` and/or a custom `.render`
28
- * (more than one layer, or a render fn) (`StudioListItem`, `Accordion`).
29
- */
30
- type ComponentKind = 'primitive' | 'extends' | 'multi-layer';
31
- /** Common fields every `PropInfo` variant carries. */
32
- interface PropBase {
33
- /** JSX prop name. */
34
- name: string;
35
- /** Authored marker had `.required()` (slot/variant markers only carry this). */
36
- required: boolean;
37
- }
38
- /** Payload for `kind: 'variant'` props. */
39
- interface VariantInfo {
40
- /** Declared variant values in authored order. */
41
- values: readonly (string | number | boolean)[];
42
- }
43
- /** Payload for `kind: 'styleProp'` props. */
44
- interface StylePropInfo {
45
- /** Style-prop registry key — `'bg'`, `'padding'`, etc. */
46
- stylePropName: string;
47
- }
48
- /** Payload for `kind: 'function'` props. */
49
- interface FunctionInfo {
50
- /** Function is an event handler (forwards to an `on*` prop). */
51
- isEventHandler: boolean;
52
- }
53
- /** Payload for `kind: 'composite'` props — bound via `composite('elevation')`. */
54
- interface CompositeInfo {
55
- /** Composite-style registry key — `'elevation'`, `'textVariant'`, etc. */
56
- compositeName: string;
57
- /** Target layer (defaults to `'root'`). */
58
- layer?: string;
59
- }
60
- /**
61
- * Payload for `kind: 'slot'` props. `layer` undefined ⇒ open slot
62
- * (`slot()` with no path). `layerProp` defaults to `'children'` when
63
- * only a layer name is given. `accepts` is inherited through the
64
- * forward chain — outer `.accepts()` wins; otherwise the innermost
65
- * descendant slot's accepts is adopted. `valueType` reports what the
66
- * JSX value resolves to at render time after walking the forward chain
67
- * to a non-slot binding.
68
- *
69
- * `authoredType` is the kind the author declared via `slot({ type })`
70
- * (absent when undeclared). It records intent independent of resolution:
71
- * `derived.acceptsChildNodes` keys on it (a `children` slot the author
72
- * tagged `'string'` is a text label, not a node-drop target), and it holds
73
- * even when the forward chain can't resolve `valueType` to a primitive.
74
- * `valueType` itself now follows a `children` ref into its target and reports
75
- * what that resolves to — a Text leaf's `'string'`, a node container's
76
- * `'ReactNode'`. Codegen-emitted prop types come from the JSX markers, not
77
- * `valueType`, so they never narrow.
78
- */
79
- interface SlotInfo {
80
- layer?: string;
81
- layerProp: string;
82
- accepts?: readonly string[];
83
- /**
84
- * Slug of the placeable asset group this slot accepts (`slot().accepts(icons)`
85
- * → `'icons'`), kept separate from the component-name `accepts` list so the
86
- * designer panel can look the group up in `Config.assetGroups` and show its
87
- * picker (an icon picker for icon-class groups) instead of the generic
88
- * component picker. Absent for component-only slots. The config-load guard
89
- * rejects non-placeable groups, so a slug here is always placeable.
90
- */
91
- acceptsAssetGroup?: string;
92
- valueType: SlotValueKind;
93
- authoredType?: SlotValueType;
94
- /**
95
- * Selectable values when the forward chain bottoms out at a `variant`
96
- * binding (e.g. forwarding to an inner component's `variant` prop). Lets
97
- * editing tools render the forwarded prop as a dropdown of the target's
98
- * variant values instead of a bare string input. Absent for non-variant
99
- * terminals.
100
- */
101
- valueOptions?: readonly (string | number | boolean)[];
102
- /**
103
- * Composite-style registry key when the forward chain bottoms out at a
104
- * `composite(...)` ref (e.g. `slot('root/textVariant')` → an `Anchor` layer's
105
- * `textVariant: composite('textVariant')`). Mirrors a directly-authored
106
- * `kind: 'composite'` prop's `compositeName`, so editing tools render the
107
- * same composite control (and the `textVariant` typography special-case)
108
- * for the forwarded prop. Absent for non-composite terminals.
109
- */
110
- compositeName?: string;
111
- }
112
- type PropInfo = (PropBase & {
113
- kind: 'variant';
114
- } & VariantInfo) | (PropBase & {
115
- kind: 'boolean';
116
- }) | (PropBase & {
117
- kind: 'string';
118
- toggle?: boolean;
119
- }) | (PropBase & {
120
- kind: 'number';
121
- }) | (PropBase & {
122
- kind: 'motion';
123
- }) | (PropBase & {
124
- kind: 'styleProp';
125
- } & StylePropInfo) | (PropBase & {
126
- kind: 'composite';
127
- } & CompositeInfo) | (PropBase & {
128
- kind: 'function';
129
- } & FunctionInfo) | (PropBase & {
130
- kind: 'slot';
131
- } & SlotInfo);
132
- type ResolvedCompoundOverrides = Record<string, Record<string, unknown>>;
133
- declare class Layer {
134
- readonly name: string;
135
- readonly tag?: LayerInput;
136
- readonly base?: BaseStyles;
137
- constructor(args: {
138
- name: string;
139
- tag?: LayerInput;
140
- base?: BaseStyles;
141
- });
142
- /**
143
- * What this layer renders, normalized across the tag's representations:
144
- * - `{ kind: 'component', ref }` — renders a registered component (`Box`,
145
- * `Text`), so the layer takes that component's prop surface. The identity
146
- * survives both in memory (a non-enumerable `__componentName` stamp on the
147
- * builder) and on the wire (`{ __kind: 'component', ref }` from `fromJSON`).
148
- * - `{ kind: 'tag', ref }` — renders a bare HTML element (`'div'`).
149
- * - `undefined` — an inline anonymous builder with no registered identity.
150
- */
151
- get renders(): {
152
- kind: 'component' | 'tag';
153
- ref: string;
154
- } | undefined;
155
- toJSON(): {
156
- name: string;
157
- tag?: LayerInput;
158
- base?: BaseStyles;
159
- };
160
- }
161
- declare class Component {
162
- #private;
163
- readonly name: string;
164
- readonly layers: ReadonlyMap<string, Layer>;
165
- readonly props: Readonly<Record<string, PropBinding>>;
166
- readonly base?: BaseStyles;
167
- readonly defaultProps?: Record<string, unknown>;
168
- readonly compoundProps?: readonly CompoundPropsEntry[];
169
- readonly motion?: ComponentMotionValue;
170
- /** Opt-in forwarded-ref target tag (`.config({ ref: 'button' })`). Drives the
171
- * typed `ref` prop in `@yahoo/uds-create-config` and the codegen forwardRef wrapper. */
172
- readonly ref?: RefTag;
173
- /** Provenance when this component is linked from another system; `undefined`
174
- * for local components. Unrelated to `ref` above — see `SystemLink`. */
175
- readonly link?: SystemLink;
176
- /** Applied `.extend(patch)` override on a linked component — payload +
177
- * computed inverse. `undefined` for unextended components. */
178
- readonly extension?: ComponentExtensionRecord;
179
- readonly preview?: PreviewDefinition;
180
- readonly metadata?: ComponentMetadata;
181
- /**
182
- * Absolute path of the file that called `defineComponent('Name', …)`.
183
- * Captured via the stack walk in `captureCallerPath` and stashed
184
- * non-enumerably on the authored definition; lifted onto the class
185
- * here so codegen consumers don't have to thread a separate
186
- * `componentSourceMap`. `undefined` when the component was hydrated
187
- * from JSON (no original define call) or built outside the `define*`
188
- * helpers.
189
- */
190
- readonly sourceFilePath?: string;
191
- /**
192
- * `true` when the authored definition chained `.render(fn)` — the
193
- * non-enumerable `__hasRenderFn` flag set by the builder. Codegen
194
- * needs this to classify single-layer components that ship a custom
195
- * render fn (e.g. Accordion) into the transform path rather than
196
- * the inline primitive emitter, so the two paths don't both emit a
197
- * wrapper FC with the same name.
198
- */
199
- readonly hasRenderFn: boolean;
200
- /**
201
- * The actual `.render(fn)` callback when `hasRenderFn` is `true`.
202
- * Lifted from the seed's non-enumerable `__renderFn` so the spec
203
- * extractor can invoke it under the mock-react plugin to capture
204
- * the component's internal structure as a Spec. Not used at
205
- * production render time — the codegen-emitted per-file FC handles
206
- * that path.
207
- */
208
- readonly renderFn?: unknown;
209
- /** `true` when the authored definition chained `.renderCanvas(fn)` — the
210
- * non-enumerable `__hasRenderCanvasFn` flag. Codegen emits a canvas-only
211
- * overlay artifact for these; spec extraction prefers the canvas fn. */
212
- readonly hasCanvasRenderFn: boolean;
213
- /** The `.renderCanvas(fn)` callback when `hasCanvasRenderFn` is `true`.
214
- * In-memory only (functions never serialize). */
215
- readonly canvasRenderFn?: unknown;
216
- /**
217
- * Name of the component this one value-extends from
218
- * (`defineComponent(Box)` → `'Box'`). Resolved from the non-
219
- * enumerable `__extendsFrom.__componentName` chain stamped by
220
- * `defineComponent`'s value-extend branch and `Config.registerComponents`'
221
- * registration loop. `undefined` for primitives, brace-ref shorthand
222
- * forms, and JSON-hydrated configs (the wire format doesn't carry
223
- * this relationship).
224
- */
225
- readonly extendsFrom?: string;
226
- /**
227
- * Globally-unique lookup key — the spec `type` string a renderer
228
- * resolves against the registry. When the owning `Config` has a
229
- * namespace set (`Config.configure({ namespace: 'uds' })`), this is
230
- * `<namespace>:<name>` (`uds:Badge`); otherwise it's the bare `name`
231
- * (un-namespaced configs). Read live via a getter so it reflects the
232
- * namespace regardless of whether `configure` ran before or after the
233
- * component was registered — mirrors the lazy `prefixGetter` pattern
234
- * used for token CSS vars.
235
- *
236
- * `name` stays the bare authored/display/export identifier; codegen
237
- * emits a bare-name alias alongside the canonical key so existing
238
- * specs referencing the bare `name` keep resolving.
239
- */
240
- get registryKey(): string;
241
- constructor(args: {
242
- name: string;
243
- definition: ComponentDefinition;
244
- componentGroup?: string;
245
- subcomponentOf?: string;
246
- subcomponents?: readonly string[];
247
- /** Live getter for the owning Config's namespace — keeps
248
- * `registryKey` correct regardless of chain-method ordering. */
249
- namespaceGetter?: () => string | undefined;
250
- /** Live getter for the owning Config's class-name prefix — feeds
251
- * `derived.classNames` so emitted CSS selectors + generated TSX
252
- * classNames share the config's namespace. Read lazily so it
253
- * reflects `configure({ prefix })` regardless of chain ordering. */
254
- prefixGetter?: () => string;
255
- /** Resolves a registered component by name against the owning Config.
256
- * Lets a slot's forward chain follow a layer that renders another
257
- * registered component (`{ __kind: 'component', ref }`) into that
258
- * component's prop surface — without it, the chain can't see the
259
- * inner props (e.g. after a `fromJSON` round-trip, where layer tags
260
- * are component refs) and falls back to a `string` value type. */
261
- componentResolver?: (ref: string) => Component | undefined;
262
- /** Resolves a `(styleProp, value)` shorthand to a qualified token name
263
- * (`bg`, `'tertiary'` → `'bg/tertiary'`) against the owning Config's
264
- * style-prop registry + token groups, or `undefined` when the value
265
- * isn't a token of one of that prop's groups (a keyword or arbitrary
266
- * literal). Lets `derived.tokenRefs` capture shorthand token usage
267
- * structurally — the component knows its style props, but the
268
- * prop→token-group link lives on the registry. */
269
- resolveStylePropValueToken?: (styleProp: string, value: string) => string | undefined;
270
- /** Whether a style key names a registered style prop — gates
271
- * `derived.stylePropKeywords` so layer keys and marker internals don't
272
- * read as style-prop keyword values. */
273
- isStyleProp?: (name: string) => boolean;
274
- });
275
- get derived(): {
276
- readonly layers: readonly Layer[];
277
- readonly classNames: ComponentClassNames;
278
- readonly compoundOverrides: ResolvedCompoundOverrides;
279
- readonly componentGroup?: string;
280
- readonly subcomponentOf?: string;
281
- readonly subcomponents?: readonly string[];
282
- readonly props: readonly PropInfo[];
283
- readonly stylePropNames: readonly string[];
284
- /** Qualified token names (`bg/tertiary`, `color/brand`) this component
285
- * references anywhere in its styling — base, variant styles, and
286
- * compound overrides, recursing modifier sub-objects and color
287
- * expressions. Both structured `token(...)` refs and shorthand
288
- * style-prop values (`bg: 'tertiary'`) are captured, resolved through
289
- * the registry, so the edge is structural — no CSS-var/string matching.
290
- * The reverse direction is `Config.getTokenDependents`. */
291
- readonly tokenRefs: readonly string[];
292
- /** `(styleProp, token)` pairs — which style prop a referenced token sits
293
- * under (`bg` → `color/brand`, including refs nested in a color
294
- * expression). The "actually used with a value from this group" edge that
295
- * `Config.getTokenGroupUsage` reads, distinct from the registry "allowed
296
- * in" relation (`getTokenGroupDependents`). */
297
- readonly stylePropTokenUsages: readonly StylePropTokenUsage[];
298
- /** The non-token keyword values this component uses (`display`/`flex`,
299
- * `flexDirection`/`col`) — disjoint from `tokenRefs`, excluding arbitrary
300
- * bracket literals. Tracks keyword removal-impact; the reverse direction
301
- * is `dependentsOf({ kind: 'styleProp', name, value })`. */
302
- readonly stylePropKeywords: readonly StylePropKeyword[];
303
- readonly kind: ComponentKind;
304
- readonly acceptsChildren: boolean;
305
- readonly acceptsChildNodes: boolean;
306
- prop(propName: string): PropInfo | undefined;
307
- };
308
- toJSON(opts?: {
309
- projectRoot?: string;
310
- }): SerializedComponent & {
311
- name: string;
312
- };
313
- }
314
- /** Which style prop a referenced token sits under — `{ styleProp: 'bg',
315
- * token: 'color/brand' }`. See `Component.derived.stylePropTokenUsages`. */
316
- interface StylePropTokenUsage {
317
- readonly styleProp: string;
318
- readonly token: string;
319
- }
320
- /** A non-token keyword value a style prop carries — `{ styleProp: 'display',
321
- * value: 'flex' }`. See `Component.derived.stylePropKeywords`. */
322
- interface StylePropKeyword {
323
- readonly styleProp: string;
324
- readonly value: string;
325
- }
326
- /**
327
- * HTML void elements — tags that must never receive children (React throws).
328
- * Mirrors the HTML spec's void-element list; codegen's registry descriptor
329
- * derives its `voidComponents` set from the same tags.
330
- */
331
- declare const VOID_HTML_TAGS: ReadonlySet<string>;
332
- //#endregion
333
- export { Component, ComponentKind, CompositeInfo, FunctionInfo, Layer, PrimitivePropKind, PropBase, PropInfo, PropKind, ResolvedCompoundOverrides, SlotInfo, SlotValueKind, StylePropInfo, StylePropKeyword, StylePropTokenUsage, VOID_HTML_TAGS, VariantInfo };