@yahoo/uds-create-config 2.45.0 → 3.0.1

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
@@ -0,0 +1,134 @@
1
+ import { DerivedEntityClass } from "../../framework/defineDerivedEntity.js";
2
+ import { Config } from "../../framework/Config.js";
3
+ import { ComputedInput } from "../../framework/registry.js";
4
+ import { z } from "zod";
5
+
6
+ //#region src/entities/system/Tool.d.ts
7
+ declare const Tool: DerivedEntityClass<z.ZodObject<{
8
+ operation: DerivedEntityClass<z.ZodObject<{
9
+ kind: z.ZodString;
10
+ verb: z.ZodString;
11
+ readOnly: z.ZodBoolean;
12
+ label: z.ZodString;
13
+ description: z.ZodString;
14
+ scope: z.ZodString;
15
+ creates: z.ZodBoolean;
16
+ approval: z.ZodOptional<z.ZodEnum<{
17
+ destructive: "destructive";
18
+ "reference-change": "reference-change";
19
+ }>>;
20
+ }, z.core.$strip>, {
21
+ inputSchema: ({
22
+ member: op,
23
+ config
24
+ }: Omit<ComputedInput, "member"> & {
25
+ member: {
26
+ kind: string;
27
+ verb: string;
28
+ readOnly: boolean;
29
+ label: string;
30
+ description: string;
31
+ scope: string;
32
+ creates: boolean;
33
+ approval?: "destructive" | "reference-change" | undefined;
34
+ };
35
+ }) => z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
36
+ execute: ({
37
+ member: op,
38
+ config: declaring
39
+ }: Omit<ComputedInput, "member"> & {
40
+ member: {
41
+ kind: string;
42
+ verb: string;
43
+ readOnly: boolean;
44
+ label: string;
45
+ description: string;
46
+ scope: string;
47
+ creates: boolean;
48
+ approval?: "destructive" | "reference-change" | undefined;
49
+ };
50
+ }) => ((input: Record<string, unknown>, config: Config) => unknown) | undefined;
51
+ field: ({
52
+ member: op
53
+ }: Omit<ComputedInput, "member"> & {
54
+ member: {
55
+ kind: string;
56
+ verb: string;
57
+ readOnly: boolean;
58
+ label: string;
59
+ description: string;
60
+ scope: string;
61
+ creates: boolean;
62
+ approval?: "destructive" | "reference-change" | undefined;
63
+ };
64
+ }) => string | undefined;
65
+ title: ({
66
+ member: op,
67
+ config
68
+ }: Omit<ComputedInput, "member"> & {
69
+ member: {
70
+ kind: string;
71
+ verb: string;
72
+ readOnly: boolean;
73
+ label: string;
74
+ description: string;
75
+ scope: string;
76
+ creates: boolean;
77
+ approval?: "destructive" | "reference-change" | undefined;
78
+ };
79
+ }) => ((entity: string) => string) | undefined;
80
+ example: ({
81
+ member: op,
82
+ config
83
+ }: Omit<ComputedInput, "member"> & {
84
+ member: {
85
+ kind: string;
86
+ verb: string;
87
+ readOnly: boolean;
88
+ label: string;
89
+ description: string;
90
+ scope: string;
91
+ creates: boolean;
92
+ approval?: "destructive" | "reference-change" | undefined;
93
+ };
94
+ }) => Record<string, unknown> | undefined;
95
+ }>;
96
+ name: z.ZodString;
97
+ description: z.ZodString;
98
+ enabled: z.ZodDefault<z.ZodBoolean>;
99
+ }, z.core.$strip>, {
100
+ kind: (input: ComputedInput) => string | undefined;
101
+ verb: (input: ComputedInput) => string | undefined;
102
+ readOnly: ({
103
+ member,
104
+ config
105
+ }: Omit<ComputedInput, "member"> & {
106
+ member: {
107
+ operation: {
108
+ __ref: string;
109
+ };
110
+ name: string;
111
+ description: string;
112
+ enabled: boolean;
113
+ };
114
+ }) => boolean;
115
+ inputSchema: (input: ComputedInput) => z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
116
+ execute: (input: ComputedInput) => ((input: Record<string, unknown>, config: Config) => unknown) | undefined;
117
+ action: (input: ComputedInput) => string | undefined; /** The sub-entity collection a sub-op targets (`layers`); absent on a kind-level op. */
118
+ field: (input: ComputedInput) => string | undefined;
119
+ /** What the op ADDRESSES — `item` | `collection` | `group` | `config` — declared by the op, which is
120
+ * the reason a consumer never parses a verb to find out. Projected here so the agent-facing surface
121
+ * answers it directly: a caller selecting "tools that resolve one thing" asks for `item` rather than
122
+ * listing the verbs that happen to mean that today. */
123
+ scope: (input: ComputedInput) => string | undefined; /** Approval policy follows the operation into every transport, including compact batches. */
124
+ approval: (input: ComputedInput) => "destructive" | "reference-change" | undefined;
125
+ /** The standalone title — composed from the op's own verb word and the labels THIS config gives
126
+ * its entities, so it names what this system actually calls things. */
127
+ label: (input: ComputedInput) => string | undefined;
128
+ /** The verb alone — for a row whose folder already names the entity/collection. Declared by the
129
+ * op, so a custom op's row reads correctly without this file knowing it exists. */
130
+ shortLabel: (input: ComputedInput) => string | undefined; /** Bound to a real entity in this config — built by the op from its own input shape. */
131
+ example: (input: ComputedInput) => Record<string, unknown> | undefined;
132
+ }>;
133
+ //#endregion
134
+ export { Tool };
@@ -0,0 +1,124 @@
1
+ import { defineDerivedEntity } from "../../framework/defineDerivedEntity.js";
2
+ import { Operation, opField } from "./Operation.js";
3
+ import { z } from "zod";
4
+ //#region src/entities/system/Tool.ts
5
+ /**
6
+ * `Tool` — the editable, agent-facing surface over `Operation`, a DERIVED entity with per-field
7
+ * overrides. One member per `Operation` (derived membership — no manual create), each wrapping its
8
+ * operation by a typed ref and carrying an editable `name`/`description`/`enabled`. The transport
9
+ * bits — `inputSchema` (zod), `execute` (fn), and `readOnly` — aren't stored; they're `computed`,
10
+ * delegating to the wrapped operation.
11
+ *
12
+ * `Tool.list(config)` is the whole tool catalog: reads and mutations alike, each with a model-facing
13
+ * name + description, its input shape, a callable, and its display + example derivations — so a
14
+ * consumer needs no second layer to join against. A user renames/re-describes a tool (a sparse
15
+ * override) without touching the operation truth; a consumer that needs a different DEFAULT
16
+ * description extends the kind (`Tool.extend({ deriveMembers })`) rather than branching inside one.
17
+ *
18
+ * What a tool DERIVES here is only what's true of a tool rather than of a capability: the model-facing
19
+ * `name`, and the composed human title. Everything else — the verb's label, the description, what the
20
+ * op addresses, its example — is DECLARED BY THE OPERATION (`schemas.ts`), because that's where the
21
+ * verb is defined. So adding a custom op (a component's `validate`) touches only that entity: no
22
+ * switch here grows a case, and nothing infers meaning from a verb string.
23
+ *
24
+ * What a tool does NOT carry is how its OUTPUT looks: markdown is a format a consumer picks, not a
25
+ * fact about the capability.
26
+ */
27
+ /**
28
+ * A computed field that reads the wrapped operation — the shape of every field on this entity but
29
+ * one. Resolves the op, hands it to `pick`, and yields `undefined` when the ref doesn't resolve, so
30
+ * no field repeats that guard.
31
+ */
32
+ function viaOp(pick) {
33
+ return ({ member, config }) => {
34
+ const op = Operation.get(config, member.operation);
35
+ return op ? pick(op, config) : void 0;
36
+ };
37
+ }
38
+ const Tool = defineDerivedEntity({
39
+ kind: "tool",
40
+ label: "Tool",
41
+ fields: z.object({
42
+ operation: Operation,
43
+ name: z.string(),
44
+ description: z.string(),
45
+ enabled: z.boolean().default(true)
46
+ }),
47
+ deriveMembers: (source) => Object.fromEntries(Operation.list(source).map((op) => [op.path, {
48
+ operation: Operation.ref(op.path),
49
+ name: toolNameOf(source.name, op.kind, op.verb, op.scope),
50
+ description: op.description,
51
+ enabled: true
52
+ }])),
53
+ overridable: [
54
+ "name",
55
+ "description",
56
+ "enabled"
57
+ ],
58
+ computed: {
59
+ kind: viaOp((op) => op.kind),
60
+ verb: viaOp((op) => op.verb),
61
+ readOnly: ({ member, config }) => Operation.get(config, member.operation)?.readOnly ?? true,
62
+ inputSchema: viaOp((op) => op.inputSchema),
63
+ execute: viaOp((op) => op.execute),
64
+ action: viaOp((op) => op.verb.split("/")[0]),
65
+ /** The sub-entity collection a sub-op targets (`layers`); absent on a kind-level op. */
66
+ field: viaOp((op) => opField(op.verb)),
67
+ /** What the op ADDRESSES — `item` | `collection` | `group` | `config` — declared by the op, which is
68
+ * the reason a consumer never parses a verb to find out. Projected here so the agent-facing surface
69
+ * answers it directly: a caller selecting "tools that resolve one thing" asks for `item` rather than
70
+ * listing the verbs that happen to mean that today. */
71
+ scope: viaOp((op) => op.scope),
72
+ /** Approval policy follows the operation into every transport, including compact batches. */
73
+ approval: viaOp((op) => op.approval),
74
+ /** The standalone title — composed from the op's own verb word and the labels THIS config gives
75
+ * its entities, so it names what this system actually calls things. */
76
+ label: viaOp((op, source) => titleOf(source, op)),
77
+ /** The verb alone — for a row whose folder already names the entity/collection. Declared by the
78
+ * op, so a custom op's row reads correctly without this file knowing it exists. */
79
+ shortLabel: viaOp((op) => op.label),
80
+ /** Bound to a real entity in this config — built by the op from its own input shape. */
81
+ example: viaOp((op) => op.example)
82
+ }
83
+ });
84
+ /** A verb/kind → a tool-name segment (`style-prop` → `style_prop`). */
85
+ /** A name segment as it appears in a tool id: `-` and the `/` of a nested collection's path both
86
+ * become `_`, so `props/value` reads as one more segment rather than as punctuation. */
87
+ const slug = (segment) => segment.replace(/[-/]/g, "_");
88
+ const titleCase = (word) => word.charAt(0).toUpperCase() + word.slice(1);
89
+ /** `uds_<ns>_<verb>_<kind>[_<field>]` — a sub-verb (`sub-create/layers`) drops the `sub-` prefix and
90
+ * appends its field, matching the flat tool naming a model calls. The one naming rule that IS a
91
+ * tool concern: an operation has no wire name, a tool does. */
92
+ function toolNameOf(ns, kind, verb, scope) {
93
+ const field = opField(verb);
94
+ const action = verb.split("/")[0].replace("sub-", "").replace(/-/g, "_");
95
+ if (scope === "config") return `uds_${slug(ns)}_${action}`;
96
+ return `uds_${slug(ns)}_${action}_${slug(kind)}${field ? `_${slug(field)}` : ""}`;
97
+ }
98
+ /** A collection's DECLARED noun at the arity the op acts on — plural for a whole-collection op,
99
+ * singular for a per-member one. Read off the sub-entity, never title-cased from the field key, so
100
+ * a collection is named the way it declares itself. */
101
+ function collectionNoun(config, kind, field, scope) {
102
+ const sub = config.subEntityOf(kind, field);
103
+ if (!sub) return titleCase(field);
104
+ return scope === "collection" ? sub.labelPlural : sub.label;
105
+ }
106
+ /**
107
+ * A tool's standalone title — `<Verb> <Entity> <Noun>`. Names the entity because this is a heading (a
108
+ * detail pane, a doc), where a tree row nested under the entity would only repeat it; the row shows
109
+ * the op's own `label` instead.
110
+ *
111
+ * Pure composition: the verb's word and any odd phrasing come from the OP, the nouns from the config's
112
+ * own entity labels. An op whose name isn't a plain verb supplies its own `title` (a `dependents` op
113
+ * reads entity-first) rather than being special-cased here.
114
+ */
115
+ function titleOf(config, op) {
116
+ const entity = config.entityLabel(op.kind);
117
+ if (op.title) return op.title(entity);
118
+ const field = opField(op.verb);
119
+ if (field) return `${op.label} ${entity} ${collectionNoun(config, op.kind, field, op.scope)}`;
120
+ const noun = op.scope === "collection" ? config.entityLabelPlural(op.kind) : entity;
121
+ return `${op.label} ${noun}`;
122
+ }
123
+ //#endregion
124
+ export { Tool };
@@ -0,0 +1,64 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/entities/system/color.d.ts
4
+ /** A colour: a literal, a token ref, a derived colour, or a gradient. */
5
+ type ColorValue = string | {
6
+ readonly __ref: string;
7
+ } | DerivedColor | Gradient;
8
+ interface DerivedColor {
9
+ readonly op: 'darken' | 'lighten' | 'alpha' | 'mix';
10
+ readonly color: ColorValue;
11
+ /**
12
+ * How much, as a PERCENTAGE (0–100) in every case — one unit, so a reader never has to remember
13
+ * which op takes a fraction. The authoring helpers take whatever's natural for each (`alpha` takes
14
+ * a 0–1 opacity, matching CSS) and convert.
15
+ */
16
+ readonly amount: number;
17
+ /** `mix`'s second colour. */
18
+ readonly with?: ColorValue;
19
+ /** Interpolation space — `oklch` for shading (perceptually even), `srgb` for alpha. */
20
+ readonly space?: string;
21
+ }
22
+ /**
23
+ * A gradient — a colour that varies across a direction.
24
+ *
25
+ * Here rather than as a string because its stops are COLOURS: each may be a token ref, and a ref is
26
+ * an edge the dependency graph has to see. Flattened into a CSS string, renaming the token it points
27
+ * at would leave a gradient quietly pointing at nothing.
28
+ */
29
+ interface Gradient {
30
+ readonly gradient: 'linear' | 'radial' | 'conic';
31
+ /** A CSS angle (`'135deg'`) or a direction keyword (`'to right'`). */
32
+ readonly angle?: string;
33
+ readonly stops: readonly {
34
+ color: ColorValue;
35
+ at?: string;
36
+ }[];
37
+ readonly space?: string;
38
+ readonly repeating?: boolean;
39
+ }
40
+ /** Whether a value is a gradient. */
41
+ declare function isGradient(value: unknown): value is Gradient;
42
+ /** `linearGradient({ angle: 'to right', stops: [...] })`. */
43
+ declare function linearGradient(spec: Omit<Gradient, 'gradient'>): Gradient;
44
+ /** Whether a value is a derived colour — the test the renderers branch on. */
45
+ declare function isDerivedColor(value: unknown): value is DerivedColor;
46
+ /** Blend toward black in light mode and white in dark — so a hover state darkens in both. */
47
+ declare function darken(color: ColorValue, amount: number): DerivedColor;
48
+ /** Mirror of {@link darken}: toward white in light mode, black in dark. */
49
+ declare function lighten(color: ColorValue, amount: number): DerivedColor;
50
+ /** `alpha(color, 0.2)` — the colour at 20% opacity. Takes a 0–1 opacity, like CSS. */
51
+ declare function alpha(color: ColorValue, opacity: number): DerivedColor;
52
+ /** `mix(a, b, 30)` — 30% of the way from `a` to `b`. */
53
+ declare function mix(color: ColorValue, towards: ColorValue, amount: number, space?: string): DerivedColor;
54
+ /**
55
+ * A derived colour as CSS.
56
+ *
57
+ * `render` resolves the nested colours — passed in rather than imported, because resolving a token
58
+ * ref to a `var()` is the projection layer's job and this module is the value's shape.
59
+ */
60
+ declare function renderDerivedColor(value: DerivedColor, render: (color: ColorValue) => string): string;
61
+ /** A gradient as CSS — `linear-gradient(to right, transparent 0%, var(--uds-bg-primary) 50%)`. */
62
+ declare function renderGradient(value: Gradient, render: (color: ColorValue) => string): string;
63
+ //#endregion
64
+ export { ColorValue, DerivedColor, Gradient, alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient };
@@ -0,0 +1,123 @@
1
+ import { refSchema } from "../../framework/utils/refs.js";
2
+ import { z } from "zod";
3
+ //#region src/entities/system/color.ts
4
+ /**
5
+ * A colour COMPUTED from another colour — `darken(Token.ref('bg/brand'), 10)`.
6
+ *
7
+ * A design system doesn't only name colours, it derives them: a hover state is the brand colour a
8
+ * little darker, a scrim is black at 40%. Without a value form for that, the derivation has to happen
9
+ * somewhere outside the config — and then the config no longer says what the component looks like.
10
+ *
11
+ * It resolves to native CSS `color-mix()`, NOT to a flattened literal. That's the point: the base
12
+ * stays a `var(--…)`, so a mode override or a theme swap flows through the derived colour too. A
13
+ * literal computed at build time would freeze the hover state to whatever the light-mode brand was.
14
+ *
15
+ * Usable wherever a colour is — a token's value, a style bag, a composite — because it IS a colour.
16
+ * That's also why this isn't a separate entity: a derived colour is a value, and making it its own
17
+ * kind would split the token store and break every `token:` ref that points into it.
18
+ */
19
+ const colorValue = z.lazy(() => z.union([
20
+ z.string(),
21
+ refSchema,
22
+ derivedColor,
23
+ gradient
24
+ ]));
25
+ const gradient = z.lazy(() => z.strictObject({
26
+ gradient: z.enum([
27
+ "linear",
28
+ "radial",
29
+ "conic"
30
+ ]),
31
+ angle: z.string().optional(),
32
+ stops: z.array(z.strictObject({
33
+ color: colorValue,
34
+ at: z.string().optional()
35
+ })),
36
+ space: z.string().optional(),
37
+ repeating: z.boolean().optional()
38
+ }));
39
+ /** Whether a value is a gradient. */
40
+ function isGradient(value) {
41
+ return typeof value === "object" && value !== null && typeof value.gradient === "string" && Array.isArray(value.stops);
42
+ }
43
+ /** `linearGradient({ angle: 'to right', stops: [...] })`. */
44
+ function linearGradient(spec) {
45
+ return {
46
+ gradient: "linear",
47
+ ...spec
48
+ };
49
+ }
50
+ const derivedColor = z.lazy(() => z.strictObject({
51
+ op: z.enum([
52
+ "darken",
53
+ "lighten",
54
+ "alpha",
55
+ "mix"
56
+ ]),
57
+ color: colorValue,
58
+ amount: z.number(),
59
+ with: colorValue.optional(),
60
+ space: z.string().optional()
61
+ }));
62
+ /** Whether a value is a derived colour — the test the renderers branch on. */
63
+ function isDerivedColor(value) {
64
+ return typeof value === "object" && value !== null && typeof value.op === "string" && "color" in value;
65
+ }
66
+ /** Blend toward black in light mode and white in dark — so a hover state darkens in both. */
67
+ function darken(color, amount) {
68
+ return {
69
+ op: "darken",
70
+ color,
71
+ amount,
72
+ space: "oklch"
73
+ };
74
+ }
75
+ /** Mirror of {@link darken}: toward white in light mode, black in dark. */
76
+ function lighten(color, amount) {
77
+ return {
78
+ op: "lighten",
79
+ color,
80
+ amount,
81
+ space: "oklch"
82
+ };
83
+ }
84
+ /** `alpha(color, 0.2)` — the colour at 20% opacity. Takes a 0–1 opacity, like CSS. */
85
+ function alpha(color, opacity) {
86
+ return {
87
+ op: "alpha",
88
+ color,
89
+ amount: Math.round(Math.max(0, Math.min(1, opacity)) * 100),
90
+ space: "srgb"
91
+ };
92
+ }
93
+ /** `mix(a, b, 30)` — 30% of the way from `a` to `b`. */
94
+ function mix(color, towards, amount, space = "oklch") {
95
+ return {
96
+ op: "mix",
97
+ color,
98
+ with: towards,
99
+ amount,
100
+ space
101
+ };
102
+ }
103
+ /**
104
+ * A derived colour as CSS.
105
+ *
106
+ * `render` resolves the nested colours — passed in rather than imported, because resolving a token
107
+ * ref to a `var()` is the projection layer's job and this module is the value's shape.
108
+ */
109
+ function renderDerivedColor(value, render) {
110
+ const space = value.space ?? "oklch";
111
+ const base = render(value.color);
112
+ if (value.op === "darken" || value.op === "lighten") return `color-mix(in ${space}, ${base}, ${value.op === "darken" ? "light-dark(black, white)" : "light-dark(white, black)"} ${value.amount}%)`;
113
+ if (value.op === "alpha") return `color-mix(in ${space}, ${base} ${value.amount}%, transparent)`;
114
+ return `color-mix(in ${space}, ${base}, ${render(value.with ?? "transparent")} ${value.amount}%)`;
115
+ }
116
+ /** A gradient as CSS — `linear-gradient(to right, transparent 0%, var(--uds-bg-primary) 50%)`. */
117
+ function renderGradient(value, render) {
118
+ const stops = value.stops.map((stop) => [render(stop.color), stop.at].filter(Boolean).join(" ")).join(", ");
119
+ const head = [value.angle, value.space ? `in ${value.space}` : void 0].filter(Boolean);
120
+ return `${value.repeating ? "repeating-" : ""}${value.gradient}-gradient(${[...head, stops].join(", ")})`;
121
+ }
122
+ //#endregion
123
+ export { alpha, darken, derivedColor, gradient, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient };
@@ -0,0 +1,63 @@
1
+ import { Ref } from "../../framework/utils/refs.js";
2
+ import { Config } from "../../framework/Config.js";
3
+
4
+ //#region src/entities/system/component-module.d.ts
5
+ /** The runtime address of one locally-built component export. */
6
+ interface ComponentModuleSource {
7
+ /** The stable registry identity (`component:actions/Button`). */
8
+ readonly componentRef: string;
9
+ /** Config-relative sealed source path. One file is one compiled module. */
10
+ readonly filePath: string;
11
+ /** Content identity for the file and its complete config-visible build closure. */
12
+ readonly moduleKey: string;
13
+ /** The component export in the authored source module. */
14
+ readonly exportName: string;
15
+ /** The ctx-shaped registry export emitted beside the component. */
16
+ readonly entryExportName: string;
17
+ }
18
+ /** One component export an authored import can resolve through the runtime registry. */
19
+ interface ComponentRegistryImportBinding {
20
+ readonly componentRef: string;
21
+ readonly exportName: string;
22
+ }
23
+ /**
24
+ * One authored module edge whose complete runtime surface is component exports.
25
+ *
26
+ * These imports can be replaced with stable registry refs in a standalone component build. An edge
27
+ * that also imports a helper, hook, namespace, or side effect is deliberately absent: that target's
28
+ * source remains part of the ordinary static build closure.
29
+ */
30
+ interface ComponentRegistryImport {
31
+ readonly specifier: string;
32
+ readonly targetFilePath: string;
33
+ readonly bindings: readonly ComponentRegistryImportBinding[];
34
+ }
35
+ /**
36
+ * Component-only imports made by one sealed file, expressed in config-v2's existing identities.
37
+ *
38
+ * `File.imports` already records the authored specifier, resolved File, and imported names;
39
+ * `Component.file` + `Component.export` already say which of those names are registry components.
40
+ * Joining those facts here avoids inventing another dependency graph for incremental modules.
41
+ */
42
+ declare function componentRegistryImports(config: Config, filePath: string): readonly ComponentRegistryImport[];
43
+ /**
44
+ * Local sealed files required to rebuild one component module. This is the File half of the exact
45
+ * build plan used by {@link componentModuleKey}: the entry and its statically imported helpers.
46
+ * Component-only imports stop at stable registry refs; package pins and linked-system files stay in
47
+ * the key but have no local bytes for this branch to fetch.
48
+ */
49
+ declare function componentModuleFilePaths(config: Config, filePath: string): readonly string[];
50
+ /**
51
+ * One sealed local file's web module key, or `undefined` when the file is not sealed. Stable across
52
+ * clients: the key is a sorted-serialization content hash, so two holders of one config spell it
53
+ * identically.
54
+ */
55
+ declare function componentModuleKey(config: Config, filePath: string): string | undefined;
56
+ /**
57
+ * Resolve a component ref through config-v2's existing Component -> File facts to the independently
58
+ * rebuildable module that owns it. Studio-authored anatomy has no File and linked source files are
59
+ * not owned by this config's branch, so neither claims a local runtime URL.
60
+ */
61
+ declare function componentModuleSource(config: Config, componentPathOrRef: string | Ref): ComponentModuleSource | undefined;
62
+ //#endregion
63
+ export { ComponentModuleSource, ComponentRegistryImport, ComponentRegistryImportBinding, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports };