@yahoo/uds-create-config 4.23.4 → 4.25.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 (31) hide show
  1. package/dist/configs/CanvasConfig.d.ts +65 -5
  2. package/dist/configs/react-native-system.d.ts +45 -5
  3. package/dist/configs/system.d.ts +53 -10
  4. package/dist/configs/system.js +4 -0
  5. package/dist/entities/native/NativeSettings.d.ts +1 -1
  6. package/dist/entities/native/NativeToken.d.ts +1 -1
  7. package/dist/entities/system/Component.d.ts +45 -3
  8. package/dist/entities/system/Component.js +13 -5
  9. package/dist/entities/system/GlobalStyle.d.ts +6 -2
  10. package/dist/entities/system/GlobalStyle.js +9 -1
  11. package/dist/entities/system/composed-values.d.ts +1 -1
  12. package/dist/entities/system/defineComponent.d.ts +87 -18
  13. package/dist/entities/system/icon-library.js +3 -2
  14. package/dist/framework/Config.d.ts +1 -1
  15. package/dist/framework/Config.js +1 -1
  16. package/dist/framework/projections.js +1 -1
  17. package/dist/framework/prop-surface.d.ts +35 -1
  18. package/dist/framework/prop-surface.js +85 -2
  19. package/dist/framework/render-spec.js +2 -2
  20. package/dist/framework/schema-version.d.ts +1 -1
  21. package/dist/framework/schema-version.js +5 -5
  22. package/dist/index.d.ts +12 -12
  23. package/dist/index.js +3 -3
  24. package/dist/migrations/2.0.0/v1-artifact.d.ts +28 -6
  25. package/dist/migrations/20260923163604_global_style_derived_colors.d.ts +10 -0
  26. package/dist/migrations/20260923163604_global_style_derived_colors.js +10 -0
  27. package/dist/migrations/20260924044539_slot_code_forms.d.ts +12 -0
  28. package/dist/migrations/20260924044539_slot_code_forms.js +8 -0
  29. package/dist/spec/detach.js +6 -0
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +2 -2
@@ -9,15 +9,15 @@ import { Config } from "../framework/Config.js";
9
9
  import { GlyphNamespace } from "../entities/system/glyph-identity.js";
10
10
  import { StoredPreviewCondition } from "../framework/preview-store.js";
11
11
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
12
- import { cellAt } from "../spec/cell.js";
13
- import { instanceAt } from "../spec/instance.js";
14
- import { ReactNativeSystem } from "./react-native-system.js";
15
- import { System } from "./system.js";
16
- import { AnySystemConfig } from "./platform.js";
17
12
  import { ComposedValue } from "../entities/system/composed-values.js";
18
13
  import { StyleValue } from "../entities/system/style-bag.js";
19
14
  import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
15
+ import { instanceAt } from "../spec/instance.js";
20
16
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
17
+ import { cellAt } from "../spec/cell.js";
18
+ import { ReactNativeSystem } from "./react-native-system.js";
19
+ import { System } from "./system.js";
20
+ import { AnySystemConfig } from "./platform.js";
21
21
  import { z } from "zod";
22
22
 
23
23
  //#region src/configs/CanvasConfig.d.ts
@@ -169,6 +169,16 @@ declare const Node: EntityClass<z.ZodObject<{
169
169
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
170
170
  __ref: z.ZodString;
171
171
  }, z.core.$strip>>]>>;
172
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
173
+ __ref: z.ZodString;
174
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
175
+ __ref: z.ZodString;
176
+ }, z.core.$strip>>]>>;
177
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
178
+ node: "node";
179
+ element: "element";
180
+ render: "render";
181
+ }>>>;
172
182
  required: z.ZodOptional<z.ZodBoolean>;
173
183
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
174
184
  __ref: z.ZodString;
@@ -357,6 +367,16 @@ declare const Node: EntityClass<z.ZodObject<{
357
367
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
358
368
  __ref: z.ZodString;
359
369
  }, z.core.$strip>>]>>;
370
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
371
+ __ref: z.ZodString;
372
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
373
+ __ref: z.ZodString;
374
+ }, z.core.$strip>>]>>;
375
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
376
+ node: "node";
377
+ element: "element";
378
+ render: "render";
379
+ }>>>;
360
380
  required: z.ZodOptional<z.ZodBoolean>;
361
381
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
362
382
  __ref: z.ZodString;
@@ -1713,6 +1733,16 @@ declare const CanvasConfig: ConfigClass<{
1713
1733
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1714
1734
  __ref: z.ZodString;
1715
1735
  }, z.core.$strip>>]>>;
1736
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1737
+ __ref: z.ZodString;
1738
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1739
+ __ref: z.ZodString;
1740
+ }, z.core.$strip>>]>>;
1741
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1742
+ node: "node";
1743
+ element: "element";
1744
+ render: "render";
1745
+ }>>>;
1716
1746
  required: z.ZodOptional<z.ZodBoolean>;
1717
1747
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
1718
1748
  __ref: z.ZodString;
@@ -1901,6 +1931,16 @@ declare const CanvasConfig: ConfigClass<{
1901
1931
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1902
1932
  __ref: z.ZodString;
1903
1933
  }, z.core.$strip>>]>>;
1934
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1935
+ __ref: z.ZodString;
1936
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
1937
+ __ref: z.ZodString;
1938
+ }, z.core.$strip>>]>>;
1939
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1940
+ node: "node";
1941
+ element: "element";
1942
+ render: "render";
1943
+ }>>>;
1904
1944
  required: z.ZodOptional<z.ZodBoolean>;
1905
1945
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
1906
1946
  __ref: z.ZodString;
@@ -3522,6 +3562,16 @@ declare function createCanvasConfig(system: AnySystemConfig): ConfigInstance<{
3522
3562
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
3523
3563
  __ref: z.ZodString;
3524
3564
  }, z.core.$strip>>]>>;
3565
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3566
+ __ref: z.ZodString;
3567
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
3568
+ __ref: z.ZodString;
3569
+ }, z.core.$strip>>]>>;
3570
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3571
+ node: "node";
3572
+ element: "element";
3573
+ render: "render";
3574
+ }>>>;
3525
3575
  required: z.ZodOptional<z.ZodBoolean>;
3526
3576
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
3527
3577
  __ref: z.ZodString;
@@ -3710,6 +3760,16 @@ declare function createCanvasConfig(system: AnySystemConfig): ConfigInstance<{
3710
3760
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
3711
3761
  __ref: z.ZodString;
3712
3762
  }, z.core.$strip>>]>>;
3763
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3764
+ __ref: z.ZodString;
3765
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
3766
+ __ref: z.ZodString;
3767
+ }, z.core.$strip>>]>>;
3768
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3769
+ node: "node";
3770
+ element: "element";
3771
+ render: "render";
3772
+ }>>>;
3713
3773
  required: z.ZodOptional<z.ZodBoolean>;
3714
3774
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
3715
3775
  __ref: z.ZodString;
@@ -13,13 +13,13 @@ import { GlyphNamespace } from "../entities/system/glyph-identity.js";
13
13
  import { StylePropValue } from "../entities/system/StyleProperty.js";
14
14
  import { StoredPreviewCondition } from "../framework/preview-store.js";
15
15
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
16
- import { cellAt } from "../spec/cell.js";
17
- import { instanceAt } from "../spec/instance.js";
18
- import { ComposedValue } from "../entities/system/composed-values.js";
19
16
  import { DerivedColor } from "../entities/system/color.js";
17
+ import { ComposedValue } from "../entities/system/composed-values.js";
20
18
  import { StyleValue } from "../entities/system/style-bag.js";
21
19
  import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
20
+ import { instanceAt } from "../spec/instance.js";
22
21
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
22
+ import { cellAt } from "../spec/cell.js";
23
23
  import * as _$zod from "zod";
24
24
  import * as _$zod_v4_core0 from "zod/v4/core";
25
25
 
@@ -58,7 +58,7 @@ declare const ReactNativeSystem: ConfigClass<{
58
58
  pagesDir: _$zod.ZodOptional<_$zod.ZodString>;
59
59
  port: _$zod.ZodOptional<_$zod.ZodNumber>;
60
60
  }, _$zod_v4_core0.$strict>>;
61
- }, "css" | "playground" | "canvas"> & {
61
+ }, "canvas" | "css" | "playground"> & {
62
62
  canvas: _$zod.ZodOptional<_$zod.ZodObject<{
63
63
  packageAliases: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
64
64
  }, _$zod_v4_core0.$strict>>;
@@ -96,6 +96,16 @@ declare const ReactNativeSystem: ConfigClass<{
96
96
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
97
97
  __ref: _$zod.ZodString;
98
98
  }, _$zod_v4_core0.$strip>>]>>;
99
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
100
+ __ref: _$zod.ZodString;
101
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
102
+ __ref: _$zod.ZodString;
103
+ }, _$zod_v4_core0.$strip>>]>>;
104
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
105
+ node: "node";
106
+ element: "element";
107
+ render: "render";
108
+ }>>>;
99
109
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
100
110
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
101
111
  __ref: _$zod.ZodString;
@@ -284,6 +294,16 @@ declare const ReactNativeSystem: ConfigClass<{
284
294
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
285
295
  __ref: _$zod.ZodString;
286
296
  }, _$zod_v4_core0.$strip>>]>>;
297
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
298
+ __ref: _$zod.ZodString;
299
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
300
+ __ref: _$zod.ZodString;
301
+ }, _$zod_v4_core0.$strip>>]>>;
302
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
303
+ node: "node";
304
+ element: "element";
305
+ render: "render";
306
+ }>>>;
287
307
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
288
308
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
289
309
  __ref: _$zod.ZodString;
@@ -2245,7 +2265,7 @@ declare const ReactNativeSystem: ConfigClass<{
2245
2265
  pagesDir: _$zod.ZodOptional<_$zod.ZodString>;
2246
2266
  port: _$zod.ZodOptional<_$zod.ZodNumber>;
2247
2267
  }, _$zod_v4_core0.$strict>>;
2248
- }, "css" | "playground" | "canvas"> & {
2268
+ }, "canvas" | "css" | "playground"> & {
2249
2269
  canvas: _$zod.ZodOptional<_$zod.ZodObject<{
2250
2270
  packageAliases: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
2251
2271
  }, _$zod_v4_core0.$strict>>;
@@ -2283,6 +2303,16 @@ declare const ReactNativeSystem: ConfigClass<{
2283
2303
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2284
2304
  __ref: _$zod.ZodString;
2285
2305
  }, _$zod_v4_core0.$strip>>]>>;
2306
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
2307
+ __ref: _$zod.ZodString;
2308
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2309
+ __ref: _$zod.ZodString;
2310
+ }, _$zod_v4_core0.$strip>>]>>;
2311
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
2312
+ node: "node";
2313
+ element: "element";
2314
+ render: "render";
2315
+ }>>>;
2286
2316
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
2287
2317
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
2288
2318
  __ref: _$zod.ZodString;
@@ -2471,6 +2501,16 @@ declare const ReactNativeSystem: ConfigClass<{
2471
2501
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2472
2502
  __ref: _$zod.ZodString;
2473
2503
  }, _$zod_v4_core0.$strip>>]>>;
2504
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
2505
+ __ref: _$zod.ZodString;
2506
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2507
+ __ref: _$zod.ZodString;
2508
+ }, _$zod_v4_core0.$strip>>]>>;
2509
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
2510
+ node: "node";
2511
+ element: "element";
2512
+ render: "render";
2513
+ }>>>;
2474
2514
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
2475
2515
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
2476
2516
  __ref: _$zod.ZodString;
@@ -13,12 +13,13 @@ import { GlyphNamespace } from "../entities/system/glyph-identity.js";
13
13
  import { StylePropValue } from "../entities/system/StyleProperty.js";
14
14
  import { StoredPreviewCondition } from "../framework/preview-store.js";
15
15
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
16
- import { cellAt } from "../spec/cell.js";
17
- import { instanceAt } from "../spec/instance.js";
16
+ import { DerivedColor } from "../entities/system/color.js";
18
17
  import { ComposedValue } from "../entities/system/composed-values.js";
19
18
  import { StyleValue } from "../entities/system/style-bag.js";
20
19
  import { OverrideCondition, TokenRefPath, TokenReference } from "../entities/system/Token.js";
20
+ import { instanceAt } from "../spec/instance.js";
21
21
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
22
+ import { cellAt } from "../spec/cell.js";
22
23
  import * as _$zod from "zod";
23
24
  import * as _$zod_v4_core0 from "zod/v4/core";
24
25
 
@@ -85,6 +86,16 @@ declare const System: ConfigClass<{
85
86
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
86
87
  __ref: _$zod.ZodString;
87
88
  }, _$zod_v4_core0.$strip>>]>>;
89
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
90
+ __ref: _$zod.ZodString;
91
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
92
+ __ref: _$zod.ZodString;
93
+ }, _$zod_v4_core0.$strip>>]>>;
94
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
95
+ node: "node";
96
+ element: "element";
97
+ render: "render";
98
+ }>>>;
88
99
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
89
100
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
90
101
  __ref: _$zod.ZodString;
@@ -273,6 +284,16 @@ declare const System: ConfigClass<{
273
284
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
274
285
  __ref: _$zod.ZodString;
275
286
  }, _$zod_v4_core0.$strip>>]>>;
287
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
288
+ __ref: _$zod.ZodString;
289
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
290
+ __ref: _$zod.ZodString;
291
+ }, _$zod_v4_core0.$strip>>]>>;
292
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
293
+ node: "node";
294
+ element: "element";
295
+ render: "render";
296
+ }>>>;
276
297
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
277
298
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
278
299
  __ref: _$zod.ZodString;
@@ -1667,19 +1688,20 @@ declare const System: ConfigClass<{
1667
1688
  }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
1668
1689
  globalStyles: EntityClass<_$zod.ZodObject<{
1669
1690
  selector: _$zod.ZodString;
1670
- declarations: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<string | number | {
1691
+ declarations: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<string | number | DerivedColor | {
1671
1692
  __ref: string;
1672
1693
  } | {
1673
- [key: string]: string | number | {
1694
+ [key: string]: string | number | DerivedColor | {
1674
1695
  __ref: string;
1675
1696
  } | /*elided*/any;
1676
- }, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | {
1697
+ }, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | DerivedColor | {
1677
1698
  __ref: string;
1678
1699
  } | {
1679
- [key: string]: string | number | {
1700
+ [key: string]: string | number | DerivedColor | {
1680
1701
  __ref: string;
1681
1702
  } | /*elided*/any;
1682
1703
  }, unknown>>>;
1704
+ important: _$zod.ZodOptional<_$zod.ZodBoolean>;
1683
1705
  }, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "global-style", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
1684
1706
  devices: EntityClass<_$zod.ZodObject<{
1685
1707
  width: _$zod.ZodNumber;
@@ -2146,6 +2168,16 @@ declare const System: ConfigClass<{
2146
2168
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2147
2169
  __ref: _$zod.ZodString;
2148
2170
  }, _$zod_v4_core0.$strip>>]>>;
2171
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
2172
+ __ref: _$zod.ZodString;
2173
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2174
+ __ref: _$zod.ZodString;
2175
+ }, _$zod_v4_core0.$strip>>]>>;
2176
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
2177
+ node: "node";
2178
+ element: "element";
2179
+ render: "render";
2180
+ }>>>;
2149
2181
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
2150
2182
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
2151
2183
  __ref: _$zod.ZodString;
@@ -2334,6 +2366,16 @@ declare const System: ConfigClass<{
2334
2366
  }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2335
2367
  __ref: _$zod.ZodString;
2336
2368
  }, _$zod_v4_core0.$strip>>]>>;
2369
+ value: _$zod.ZodOptional<_$zod.ZodUnion<readonly [_$zod.ZodObject<{
2370
+ __ref: _$zod.ZodString;
2371
+ }, _$zod_v4_core0.$strip>, _$zod.ZodArray<_$zod.ZodObject<{
2372
+ __ref: _$zod.ZodString;
2373
+ }, _$zod_v4_core0.$strip>>]>>;
2374
+ code: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodEnum<{
2375
+ node: "node";
2376
+ element: "element";
2377
+ render: "render";
2378
+ }>>>;
2337
2379
  required: _$zod.ZodOptional<_$zod.ZodBoolean>;
2338
2380
  when: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnion<readonly [_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber, _$zod.ZodBoolean, _$zod.ZodObject<{
2339
2381
  __ref: _$zod.ZodString;
@@ -3728,19 +3770,20 @@ declare const System: ConfigClass<{
3728
3770
  }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
3729
3771
  globalStyles: EntityClass<_$zod.ZodObject<{
3730
3772
  selector: _$zod.ZodString;
3731
- declarations: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<string | number | {
3773
+ declarations: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<string | number | DerivedColor | {
3732
3774
  __ref: string;
3733
3775
  } | {
3734
- [key: string]: string | number | {
3776
+ [key: string]: string | number | DerivedColor | {
3735
3777
  __ref: string;
3736
3778
  } | /*elided*/any;
3737
- }, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | {
3779
+ }, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | DerivedColor | {
3738
3780
  __ref: string;
3739
3781
  } | {
3740
- [key: string]: string | number | {
3782
+ [key: string]: string | number | DerivedColor | {
3741
3783
  __ref: string;
3742
3784
  } | /*elided*/any;
3743
3785
  }, unknown>>>;
3786
+ important: _$zod.ZodOptional<_$zod.ZodBoolean>;
3744
3787
  }, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "global-style", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
3745
3788
  devices: EntityClass<_$zod.ZodObject<{
3746
3789
  width: _$zod.ZodNumber;
@@ -39,6 +39,8 @@ import { iconCanvasToolMigration } from "../migrations/20260923005318_icon_canva
39
39
  import { computedValuesAndRepeatedNodesMigration } from "../migrations/20260923112910_computed_values_and_repeated_nodes.js";
40
40
  import { transitionTokenValueMigration } from "../migrations/20260923144958_transition_token_value.js";
41
41
  import { renderTokenRefsMigration } from "../migrations/20260923160425_render_token_refs.js";
42
+ import { globalStyleDerivedColorsMigration } from "../migrations/20260923163604_global_style_derived_colors.js";
43
+ import { slotCodeFormsMigration } from "../migrations/20260924044539_slot_code_forms.js";
42
44
  //#region src/configs/system.ts
43
45
  /**
44
46
  * `System` — the design-system config TYPE. Declares the exact kinds a design system owns (tokens,
@@ -98,5 +100,7 @@ if (!registeredSchemaMigrations().has(20260923005318)) registerSchemaMigrations(
98
100
  if (!registeredSchemaMigrations().has(20260923112910)) registerSchemaMigrations(computedValuesAndRepeatedNodesMigration);
99
101
  if (!registeredSchemaMigrations().has(20260923144958)) registerSchemaMigrations(transitionTokenValueMigration);
100
102
  if (!registeredSchemaMigrations().has(20260923160425)) registerSchemaMigrations(renderTokenRefsMigration);
103
+ if (!registeredSchemaMigrations().has(20260923163604)) registerSchemaMigrations(globalStyleDerivedColorsMigration);
104
+ if (!registeredSchemaMigrations().has(20260924044539)) registerSchemaMigrations(slotCodeFormsMigration);
101
105
  //#endregion
102
106
  export { System };
@@ -36,7 +36,7 @@ declare const NativeSettings: EntityClass<z.ZodObject<Omit<{
36
36
  pagesDir: z.ZodOptional<z.ZodString>;
37
37
  port: z.ZodOptional<z.ZodNumber>;
38
38
  }, z.core.$strict>>;
39
- }, "css" | "playground" | "canvas"> & {
39
+ }, "canvas" | "css" | "playground"> & {
40
40
  canvas: z.ZodOptional<z.ZodObject<{
41
41
  packageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
42
42
  }, z.core.$strict>>;
@@ -2,8 +2,8 @@ import { Ref } from "../../framework/utils/ref-grammar.js";
2
2
  import { Ref as Ref$1 } from "../../framework/utils/refs.js";
3
3
  import { SubEntityClass } from "../../framework/defineSubEntity.js";
4
4
  import { EntityClass } from "../../framework/defineEntity.js";
5
- import { ComposedValue } from "../system/composed-values.js";
6
5
  import { DerivedColor } from "../system/color.js";
6
+ import { ComposedValue } from "../system/composed-values.js";
7
7
  import { OverrideCondition } from "../system/Token.js";
8
8
  import { z } from "zod";
9
9
 
@@ -8,12 +8,12 @@ import { Config } from "../../framework/Config.js";
8
8
  import { RepeatSpec } from "../../framework/render-spec.js";
9
9
  import { StoredPreviewCondition } from "../../framework/preview-store.js";
10
10
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../../spec/slot.js";
11
- import { cellAt } from "../../spec/cell.js";
12
- import { instanceAt } from "../../spec/instance.js";
13
11
  import { ComposedValue } from "./composed-values.js";
14
12
  import { StyleValue } from "./style-bag.js";
15
13
  import { OverrideCondition, TokenRefPath, TokenReference } from "./Token.js";
14
+ import { instanceAt } from "../../spec/instance.js";
16
15
  import { AsInput, LayerMap, PhantomCallProps, PhantomReadProps, PropMap, RenderArgs, StyleRuleInput } from "./defineComponent.js";
16
+ import { cellAt } from "../../spec/cell.js";
17
17
  import { z } from "zod";
18
18
 
19
19
  //#region src/entities/system/Component.d.ts
@@ -51,6 +51,8 @@ declare const variantValueFields: z.ZodObject<{
51
51
  type VariantValueBody = z.infer<typeof variantValueFields>;
52
52
  /** A variant prop's own values — name → body, in the order they were declared. */
53
53
  type VariantValues = Record<string, VariantValueBody>;
54
+ /** The forms code may fill a slot with beside its own value — the members of {@link SlotCodeForm}. */
55
+ declare const SLOT_CODE_FORMS: readonly ["node", "element", "render"];
54
56
  declare const propShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
57
  type: z.ZodLiteral<"slot">;
56
58
  text: z.ZodOptional<z.ZodBoolean>;
@@ -59,6 +61,16 @@ declare const propShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
61
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
60
62
  __ref: z.ZodString;
61
63
  }, z.core.$strip>>]>>;
64
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
65
+ __ref: z.ZodString;
66
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
67
+ __ref: z.ZodString;
68
+ }, z.core.$strip>>]>>;
69
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
70
+ node: "node";
71
+ element: "element";
72
+ render: "render";
73
+ }>>>;
62
74
  required: z.ZodOptional<z.ZodBoolean>;
63
75
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
64
76
  __ref: z.ZodString;
@@ -565,6 +577,16 @@ declare const componentFields: z.ZodObject<{
565
577
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
566
578
  __ref: z.ZodString;
567
579
  }, z.core.$strip>>]>>;
580
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
581
+ __ref: z.ZodString;
582
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
583
+ __ref: z.ZodString;
584
+ }, z.core.$strip>>]>>;
585
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
586
+ node: "node";
587
+ element: "element";
588
+ render: "render";
589
+ }>>>;
568
590
  required: z.ZodOptional<z.ZodBoolean>;
569
591
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
570
592
  __ref: z.ZodString;
@@ -769,6 +791,16 @@ declare const ComponentEntity: EntityClass<z.ZodObject<{
769
791
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
770
792
  __ref: z.ZodString;
771
793
  }, z.core.$strip>>]>>;
794
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
795
+ __ref: z.ZodString;
796
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
797
+ __ref: z.ZodString;
798
+ }, z.core.$strip>>]>>;
799
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
800
+ node: "node";
801
+ element: "element";
802
+ render: "render";
803
+ }>>>;
772
804
  required: z.ZodOptional<z.ZodBoolean>;
773
805
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
774
806
  __ref: z.ZodString;
@@ -957,6 +989,16 @@ declare const ComponentEntity: EntityClass<z.ZodObject<{
957
989
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
958
990
  __ref: z.ZodString;
959
991
  }, z.core.$strip>>]>>;
992
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
993
+ __ref: z.ZodString;
994
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
995
+ __ref: z.ZodString;
996
+ }, z.core.$strip>>]>>;
997
+ code: z.ZodOptional<z.ZodArray<z.ZodEnum<{
998
+ node: "node";
999
+ element: "element";
1000
+ render: "render";
1001
+ }>>>;
960
1002
  required: z.ZodOptional<z.ZodBoolean>;
961
1003
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
962
1004
  __ref: z.ZodString;
@@ -2280,4 +2322,4 @@ declare const Component: Omit<typeof ComponentEntity, "ref"> & {
2280
2322
  instance: typeof instanceAt;
2281
2323
  };
2282
2324
  //#endregion
2283
- export { AuthoredPropBody, Component, ComponentBody, ComponentElementBody, ComponentPropBody, ComponentReference, ComponentStyleBody, ElementVisibility, ElementVisibilityInput, ExtendedComponentRef, ProjectedVisibility, VariantValueBody, VariantValues, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef };
2325
+ export { AuthoredPropBody, Component, ComponentBody, ComponentElementBody, ComponentPropBody, ComponentReference, ComponentStyleBody, ElementVisibility, ElementVisibilityInput, ExtendedComponentRef, ProjectedVisibility, SLOT_CODE_FORMS, VariantValueBody, VariantValues, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef };
@@ -21,7 +21,7 @@ import { File } from "./File.js";
21
21
  import { iconDomainInvariants } from "./icon-domain-invariants.js";
22
22
  import { rootLayerInvariants } from "./root-layer-invariants.js";
23
23
  import { Token } from "./Token.js";
24
- import { intoName, routedPropIn, routesContent } from "../../framework/prop-surface.js";
24
+ import { carriesContent, intoName, isValueSlot, routedPropIn, routesContent } from "../../framework/prop-surface.js";
25
25
  import { z } from "zod";
26
26
  //#region src/entities/system/Component.ts
27
27
  /**
@@ -361,6 +361,12 @@ const conditionLeaf = z.union([
361
361
  refSchema
362
362
  ]);
363
363
  const propCondition = z.record(z.string(), z.union([conditionLeaf, z.array(conditionLeaf)])).optional();
364
+ /** The forms code may fill a slot with beside its own value — the members of {@link SlotCodeForm}. */
365
+ const SLOT_CODE_FORMS = [
366
+ "node",
367
+ "element",
368
+ "render"
369
+ ];
364
370
  /**
365
371
  * The declaration shape over a given condition schema: the generic one with `when` open, and one
366
372
  * per owner with `when` narrowed to that component's props. A factory rather than a per-owner
@@ -373,6 +379,8 @@ function propShapeWith(when) {
373
379
  type: z.literal("slot"),
374
380
  text: z.boolean().optional(),
375
381
  accepts: z.union([refSchema, z.array(refSchema)]).optional(),
382
+ value: z.union([refSchema, z.array(refSchema).min(1)]).optional(),
383
+ code: z.array(z.enum(SLOT_CODE_FORMS)).min(1).optional(),
376
384
  required: z.boolean().optional(),
377
385
  when
378
386
  }),
@@ -445,7 +453,7 @@ const PROP_TYPES = [
445
453
  "number",
446
454
  "boolean"
447
455
  ];
448
- const PROP_DESCRIPTION = "What the prop is. A style property the component exposes, `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:<name>\" } }`, which is what a primitive's props mostly are and what makes a style rule's bag key valid on it; a closed set of names a style rule keys on, `{ \"type\": \"variant\", \"value\": [\"sm\", \"lg\"] }`; content, `{ \"type\": \"slot\", \"text\": true }`; or a plain `string`, `number` or `boolean`. `null` hides a prop an inherited layer would expose. A prop that applies only under a condition on a sibling carries `when`, the record a style rule uses: `{ \"type\": \"string\", \"when\": { \"type\": \"color\" } }` shows it for one value, `{ \"when\": { \"type\": [\"default\", \"header\"] } }` for several.";
456
+ const PROP_DESCRIPTION = "What the prop is. A style property the component exposes, `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:<name>\" } }`, which is what a primitive's props mostly are and what makes a style rule's bag key valid on it; a closed set of names a style rule keys on, `{ \"type\": \"variant\", \"value\": [\"sm\", \"lg\"] }`; content, `{ \"type\": \"slot\", \"text\": true }`, or a slot whose own value is a library member, `{ \"type\": \"slot\", \"value\": { \"__ref\": \"icon:<library>\" } }`, which code may also fill with the forms it lists under `code` (`[\"node\", \"element\", \"render\"]`); or a plain `string`, `number` or `boolean`. `null` hides a prop an inherited layer would expose. A prop that applies only under a condition on a sibling carries `when`, the record a style rule uses: `{ \"type\": \"string\", \"when\": { \"type\": \"color\" } }` shows it for one value, `{ \"when\": { \"type\": [\"default\", \"header\"] } }` for several.";
449
457
  /** Nullable because `null` is the omit tombstone: a component that `inherits` its element's props
450
458
  * drops one by declaring it `null`, rather than needing a second "don't expose" mechanism. */
451
459
  const Prop = defineSubEntity({
@@ -534,7 +542,7 @@ function styleBagValue({ config, declaration, name = "<prop>", glyphLibraries })
534
542
  config,
535
543
  libraries: glyphLibraries
536
544
  }), domain]);
537
- if (declaration?.type === "slot") return z.union([domain, z.never()], { error: () => `\`${name}\` is a slot, so a rule may set it to a string of content and nothing else. A glyph or a nested element is an anatomy node under the layer's node — \`{ "element": { "__ref": "icon:<library>/<Name>" }, "visible": { "$state": "<prop>", "eq": "<value>" } }\` to show one per variant value — and the instance's own content arrives through the prop.` });
545
+ if (declaration?.type === "slot" && !isValueSlot(declaration)) return z.union([domain, z.never()], { error: () => `\`${name}\` is a slot, so a rule may set it to a string of content and nothing else. A glyph or a nested element is an anatomy node under the layer's node — \`{ "element": { "__ref": "icon:<library>/<Name>" }, "visible": { "$state": "<prop>", "eq": "<value>" } }\` to show one per variant value — and the instance's own content arrives through the prop.` });
538
546
  if (!isRef(bound) || kindOf(bound.__ref) !== "style-property") return domain;
539
547
  const property = pathOf(bound.__ref);
540
548
  return z.union([
@@ -1569,7 +1577,7 @@ slots: ({ config, path, member }) => {
1569
1577
  for (const [name, decl] of Object.entries(resolveComponentProps(config, path))) {
1570
1578
  const body = decl;
1571
1579
  if (!body) continue;
1572
- if (body.type === "slot" || body.type === "forward" && routesContent(config, layers, body)) names.push(name);
1580
+ if (carriesContent(config, layers, body)) names.push(name);
1573
1581
  }
1574
1582
  return names;
1575
1583
  } },
@@ -2156,4 +2164,4 @@ function exampleProps(config, componentPath) {
2156
2164
  return {};
2157
2165
  }
2158
2166
  //#endregion
2159
- export { Component, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef };
2167
+ export { Component, SLOT_CODE_FORMS, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef };
@@ -1,17 +1,21 @@
1
1
  import { EntityClass } from "../../framework/defineEntity.js";
2
+ import { DerivedColor } from "./color.js";
2
3
  import { z } from "zod";
3
4
 
4
5
  //#region src/entities/system/GlobalStyle.d.ts
5
6
  /** A declared value, or a nested block of them — an at-rule (`@keyframes`) and a grouped selector
6
- * both hold rules rather than declarations, and they nest to any depth. */
7
+ * both hold rules rather than declarations, and they nest to any depth. A derived colour
8
+ * (`alpha(Token.ref('color/on-primary'), 0.2)`) is a value: it keeps its token, so a rename
9
+ * cascades into the rule and a mode override reaches it, where a baked `rgba()` would not. */
7
10
  type Declared = string | number | {
8
11
  __ref: string;
9
- } | {
12
+ } | DerivedColor | {
10
13
  [key: string]: Declared;
11
14
  };
12
15
  declare const GlobalStyle: EntityClass<z.ZodObject<{
13
16
  selector: z.ZodString;
14
17
  declarations: z.ZodRecord<z.ZodString, z.ZodType<Declared, unknown, z.core.$ZodTypeInternals<Declared, unknown>>>;
18
+ important: z.ZodOptional<z.ZodBoolean>;
15
19
  }, z.core.$strict>, z.ZodObject<Record<never, never>, z.core.$strip>, "global-style", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>;
16
20
  /**
17
21
  * A stable name for a rule, from its selector — `@keyframes bounce` → `bounce`, `.prompt-editor p`
@@ -1,5 +1,6 @@
1
1
  import { refSchema } from "../../framework/utils/refs.js";
2
2
  import { defineEntity } from "../../framework/defineEntity.js";
3
+ import { derivedColor } from "./color.js";
3
4
  import { z } from "zod";
4
5
  //#region src/entities/system/GlobalStyle.ts
5
6
  /**
@@ -22,6 +23,7 @@ const declared = z.lazy(() => z.union([
22
23
  z.string(),
23
24
  z.number(),
24
25
  refSchema,
26
+ derivedColor,
25
27
  z.record(z.string(), declared)
26
28
  ]));
27
29
  const GlobalStyle = defineEntity({
@@ -32,7 +34,13 @@ const GlobalStyle = defineEntity({
32
34
  /** What the rule applies to — `html, body`, `@keyframes bounce`, `.prompt-editor p`. */
33
35
  selector: z.string(),
34
36
  /** Property → value, camelCase as it's authored; a nested record is a nested rule. */
35
- declarations: z.record(z.string(), declared)
37
+ declarations: z.record(z.string(), declared),
38
+ /**
39
+ * Every declaration in the rule, nested ones included, is emitted `!important`. The sheet is
40
+ * layered and a third party's stylesheet (React Flow, CodeMirror's injected theme) is not, so a
41
+ * rule meant to beat one has to say so; the flag lets it while its values stay refs.
42
+ */
43
+ important: z.boolean().optional()
36
44
  })
37
45
  });
38
46
  /**
@@ -1,5 +1,5 @@
1
- import { Transition } from "./transition.js";
2
1
  import { DerivedColor, Gradient } from "./color.js";
2
+ import { Transition } from "./transition.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/entities/system/composed-values.d.ts