@yahoo/uds-create-config 4.11.0 → 4.12.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 (59) hide show
  1. package/dist/capture/capture-to-spec.d.ts +69 -0
  2. package/dist/capture/capture-to-spec.js +433 -0
  3. package/dist/capture/captured-tree.d.ts +65 -0
  4. package/dist/capture/captured-tree.js +201 -0
  5. package/dist/capture/class-grammar.d.ts +64 -0
  6. package/dist/capture/class-grammar.js +131 -0
  7. package/dist/capture/fixtures/tree-from-html.d.ts +3 -0
  8. package/dist/capture/icon-resolver.d.ts +59 -0
  9. package/dist/capture/icon-resolver.js +205 -0
  10. package/dist/capture/node-ops.d.ts +2 -0
  11. package/dist/capture/node-ops.js +146 -0
  12. package/dist/capture/node-patches.d.ts +32 -0
  13. package/dist/capture/node-patches.js +99 -0
  14. package/dist/configs/CanvasConfig.d.ts +1 -1
  15. package/dist/configs/CanvasConfig.js +3 -1
  16. package/dist/configs/react-native-system.d.ts +28 -20
  17. package/dist/configs/react-native-system.js +1 -1
  18. package/dist/configs/system.d.ts +12 -4
  19. package/dist/configs/system.js +4 -2
  20. package/dist/entities/native/NativeModifier.d.ts +1 -1
  21. package/dist/entities/native/NativeStyleProperty.d.ts +15 -15
  22. package/dist/entities/system/CanvasRole.d.ts +5 -1
  23. package/dist/entities/system/CanvasRole.js +7 -2
  24. package/dist/entities/system/Component.js +3 -3
  25. package/dist/entities/system/Icon.d.ts +2 -0
  26. package/dist/entities/system/Icon.js +9 -3
  27. package/dist/entities/system/Modifier.d.ts +2 -2
  28. package/dist/entities/system/copy-plan.js +1 -1
  29. package/dist/entities/system/defineComponent.d.ts +6 -3
  30. package/dist/entities/system/element.d.ts +2 -1
  31. package/dist/entities/system/element.js +3 -1
  32. package/dist/entities/system/icon-library.d.ts +21 -6
  33. package/dist/entities/system/icon-library.js +36 -15
  34. package/dist/entities/system/link-plan.js +1 -1
  35. package/dist/framework/Config.d.ts +1 -1
  36. package/dist/framework/Config.js +2 -2
  37. package/dist/framework/defineEntity.js +1 -1
  38. package/dist/framework/inline-sources.js +1 -1
  39. package/dist/framework/plan.js +1 -1
  40. package/dist/framework/projections.d.ts +27 -8
  41. package/dist/framework/projections.js +38 -9
  42. package/dist/framework/render-spec.js +2 -2
  43. package/dist/framework/schema-version.d.ts +1 -1
  44. package/dist/framework/schema-version.js +5 -5
  45. package/dist/index.d.ts +10 -5
  46. package/dist/index.js +14 -9
  47. package/dist/migrations/2.0.0/v1-artifact.d.ts +7 -3
  48. package/dist/migrations/20260923005318_icon_canvas_tool.d.ts +12 -0
  49. package/dist/migrations/20260923005318_icon_canvas_tool.js +8 -0
  50. package/dist/renderer/glyphEntries.d.ts +6 -5
  51. package/dist/renderer/glyphEntries.js +17 -13
  52. package/dist/renderer/glyphRenderable.js +19 -12
  53. package/dist/renderer/icon-library.d.ts +5 -2
  54. package/dist/renderer/resolveGlyph.d.ts +6 -2
  55. package/dist/spec/cell.js +1 -1
  56. package/dist/spec/prop-conditions.js +1 -1
  57. package/dist/spec/slot.js +1 -1
  58. package/dist/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +3 -2
@@ -0,0 +1,146 @@
1
+ import { CapturedNode } from "./captured-tree.js";
2
+ import { pathOf } from "../framework/utils/refs.js";
3
+ import { rejectData } from "../framework/rejection.js";
4
+ import { pathInput } from "../framework/schemas.js";
5
+ import { specFromCapture } from "./capture-to-spec.js";
6
+ import { specToNodePatches } from "./node-patches.js";
7
+ import { z } from "zod";
8
+ //#region src/capture/node-ops.ts
9
+ /**
10
+ * The capture op on a canvas node: a captured page becomes an artboard's rows. It reads the system
11
+ * the canvas draws on, so a component's classes, layers and slots map back through the same config
12
+ * that emitted them.
13
+ */
14
+ const DEFAULT_WIDTH = 1600;
15
+ const frameSchema = z.object({
16
+ type: z.string().min(1),
17
+ props: z.record(z.string(), z.unknown()).optional()
18
+ });
19
+ const fromHtmlData = z.object({
20
+ /** The captured page, parsed by the host into the captured-tree shape. */
21
+ tree: CapturedNode,
22
+ /** The artboard's name. */
23
+ label: z.string().min(1).max(200).optional(),
24
+ /** The page to place the artboard on. */
25
+ page: z.string().min(1).optional(),
26
+ x: z.number().optional(),
27
+ y: z.number().optional(),
28
+ /** The frame width; also recorded on the spec, and what `100vw` measures inside it. */
29
+ width: z.number().min(100).max(4e3).optional(),
30
+ /** The captured viewport's height, what `100vh` measures inside the frame. */
31
+ height: z.number().min(100).max(8e3).optional(),
32
+ /** Wraps the capture's top-level components; required when there are several. */
33
+ frame: frameSchema.optional(),
34
+ /** Convert only the subtree this selector finds. */
35
+ selector: z.string().optional(),
36
+ /** Children kept per element; `0` keeps every child. */
37
+ childCap: z.number().int().nonnegative().optional()
38
+ });
39
+ const fromHtmlInput = z.object({
40
+ path: pathInput("node"),
41
+ data: fromHtmlData
42
+ });
43
+ /** The system this canvas draws on, with the slug node types are qualified by. */
44
+ function attachedSystem(config) {
45
+ const [source] = config.list("system-source");
46
+ const system = source ? config.sourceFor(source.path) : void 0;
47
+ if (!source || !system) return rejectData("This canvas has no system attached, so there is no component grammar to read a capture with.");
48
+ return {
49
+ slug: source.path,
50
+ system
51
+ };
52
+ }
53
+ function pageOf(body) {
54
+ return body.page ? pathOf(body.page) : void 0;
55
+ }
56
+ /** The placed nodes holding content on `page`, earliest first by stacking order. */
57
+ function artboardsOn(config, page) {
58
+ const out = [];
59
+ for (const node of config.list("node")) {
60
+ const body = node.body;
61
+ if (pageOf(body) !== page) continue;
62
+ if (!body.type && body.linkedSource == null) continue;
63
+ out.push({
64
+ id: node.path,
65
+ order: body.order ?? Number.NEGATIVE_INFINITY
66
+ });
67
+ }
68
+ return out.sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
69
+ }
70
+ function convert(config, input) {
71
+ const { slug, system } = attachedSystem(config);
72
+ const data = input.data;
73
+ if (config.resolve("node", input.path)) return rejectData(`Node "${input.path}" already exists; pick a path that is free.`, ["path"]);
74
+ if (!data.page) return rejectData(`Pass \`page\` (and \`label\`) to place node "${input.path}".`, ["data", "page"]);
75
+ if (!config.resolve("page", data.page)) return rejectData(`Page "${data.page}" does not exist.`, ["data", "page"]);
76
+ let converted;
77
+ try {
78
+ converted = specFromCapture({
79
+ tree: data.tree,
80
+ config: system,
81
+ selector: data.selector,
82
+ root: data.frame,
83
+ width: data.width ?? DEFAULT_WIDTH,
84
+ height: data.height,
85
+ childCap: data.childCap ?? 0
86
+ });
87
+ } catch (error) {
88
+ return rejectData(error instanceof Error ? error.message : String(error));
89
+ }
90
+ const front = artboardsOn(config, data.page).at(-1);
91
+ const placement = {
92
+ page: data.page,
93
+ x: data.x,
94
+ y: data.y,
95
+ width: data.width ?? DEFAULT_WIDTH,
96
+ label: data.label ?? input.path,
97
+ order: front && Number.isFinite(front.order) ? front.order + 1 : 1
98
+ };
99
+ return specToNodePatches({
100
+ config,
101
+ nodeId: input.path,
102
+ spec: converted.spec,
103
+ slug,
104
+ placement
105
+ });
106
+ }
107
+ const fromHtmlExample = () => ({
108
+ path: "screen-home",
109
+ data: {
110
+ label: "Home",
111
+ page: "home",
112
+ width: 1600,
113
+ frame: {
114
+ type: "component:Box",
115
+ props: { position: "relative" }
116
+ },
117
+ tree: {
118
+ tag: "body",
119
+ children: [{
120
+ tag: "div",
121
+ attrs: {
122
+ "data-uds-component": "Box",
123
+ "data-uds-layer": "root",
124
+ class: "uds-primitives-box-root uds-p-4"
125
+ },
126
+ children: ["Hello"]
127
+ }]
128
+ }
129
+ }
130
+ });
131
+ const captureNodeOps = { "from-html": {
132
+ input: fromHtmlInput,
133
+ readOnly: false,
134
+ label: "Artboard from a captured page",
135
+ description: "Turn a captured page into this node's content: each rendered component becomes an element with the props its classes, inline style and stamps say, its layers become slots, and the whole becomes the node's rows. `tree` is the page parsed into the captured-tree shape (a host that accepts raw HTML parses it first). The node is placed on `page` with `label`; a path that already exists is refused.",
136
+ scope: "item",
137
+ approval: "destructive",
138
+ title: (entity) => `Fill ${entity} from a captured page`,
139
+ example: fromHtmlExample,
140
+ handler: (input, config) => {
141
+ const patches = convert(config, fromHtmlInput.parse(input));
142
+ return patches.length === 0 ? config : config.applyAll(patches);
143
+ }
144
+ } };
145
+ //#endregion
146
+ export { captureNodeOps };
@@ -0,0 +1,32 @@
1
+ import { Config, Patch } from "../framework/Config.js";
2
+ import { Spec } from "./capture-to-spec.js";
3
+
4
+ //#region src/capture/node-patches.d.ts
5
+ interface Placement {
6
+ readonly page: string;
7
+ readonly x?: number;
8
+ readonly y?: number;
9
+ readonly width: number;
10
+ readonly label?: string;
11
+ readonly order?: number;
12
+ }
13
+ /**
14
+ * The patches that place `nodeId` holding `spec`: a create per subtree row, children before the
15
+ * rows that point at them, then the placed node itself with its placement. The node must not exist
16
+ * yet; a paste mints a fresh id, so a path that is taken is the caller's mistake, not a refill.
17
+ */
18
+ declare function specToNodePatches({
19
+ config,
20
+ nodeId,
21
+ spec,
22
+ slug,
23
+ placement
24
+ }: {
25
+ readonly config: Config;
26
+ readonly nodeId: string;
27
+ readonly spec: Spec;
28
+ readonly slug: string;
29
+ readonly placement: Placement;
30
+ }): Patch[];
31
+ //#endregion
32
+ export { specToNodePatches };
@@ -0,0 +1,99 @@
1
+ import { ref } from "../framework/utils/refs.js";
2
+ //#region src/capture/node-patches.ts
3
+ /**
4
+ * A spec as the node rows of one new placed node. A placed node's content is its subtree rows, one
5
+ * per element, at `<node>/<element key>`, each pointing at its children by ref; the root element's
6
+ * content lives on the placed node itself beside its placement.
7
+ */
8
+ const INTRINSIC_TAG = /^[a-z][a-zA-Z0-9-]*$/;
9
+ const SPEC_PRIMITIVES = new Set(["Slot", "Fragment"]);
10
+ /** A spec element's `type` as the ref a node row stores, qualified with the system's slug. */
11
+ function elementTypeRef({ type, slug }) {
12
+ const colon = type.indexOf(":");
13
+ if (colon !== -1) return ref(type.slice(0, colon), type.slice(colon + 1), slug);
14
+ if (INTRINSIC_TAG.test(type)) return ref("html", type);
15
+ if (SPEC_PRIMITIVES.has(type)) return ref("spec", type);
16
+ return ref("component", type, slug);
17
+ }
18
+ /** The content fields of one element as a node row holds them. */
19
+ function elementNodeFields({ element, nodeId, slug }) {
20
+ const sub = (key) => ref("node", `${nodeId}/${key}`);
21
+ const slots = {};
22
+ for (const [name, fills] of Object.entries(element.slots ?? {})) slots[name] = fills.map(sub);
23
+ return {
24
+ type: elementTypeRef({
25
+ type: element.type,
26
+ slug
27
+ }),
28
+ props: element.props ?? {},
29
+ ...element.children?.length ? { children: element.children.map(sub) } : {},
30
+ ...Object.keys(slots).length > 0 ? { slots } : {},
31
+ ...element.ref !== void 0 ? { ref: element.ref } : {},
32
+ ...element.visible !== void 0 ? { visible: element.visible } : {},
33
+ ...element.repeat !== void 0 ? { repeat: element.repeat } : {}
34
+ };
35
+ }
36
+ /** Element keys in the order a write needs: children before the element that points at them. */
37
+ function postOrder(spec) {
38
+ const out = [];
39
+ const seen = /* @__PURE__ */ new Set();
40
+ const visit = (key) => {
41
+ if (seen.has(key)) return;
42
+ seen.add(key);
43
+ const el = spec.elements[key];
44
+ if (!el) return;
45
+ for (const child of el.children ?? []) visit(child);
46
+ for (const fills of Object.values(el.slots ?? {})) for (const child of fills) visit(child);
47
+ out.push(key);
48
+ };
49
+ visit(spec.root);
50
+ return out;
51
+ }
52
+ /**
53
+ * The patches that place `nodeId` holding `spec`: a create per subtree row, children before the
54
+ * rows that point at them, then the placed node itself with its placement. The node must not exist
55
+ * yet; a paste mints a fresh id, so a path that is taken is the caller's mistake, not a refill.
56
+ */
57
+ function specToNodePatches({ config, nodeId, spec, slug, placement }) {
58
+ if (config.resolve("node", nodeId)) throw new Error(`Node "${nodeId}" already exists; pick a path that is free.`);
59
+ const patches = [];
60
+ for (const key of postOrder(spec)) {
61
+ if (key === spec.root) continue;
62
+ patches.push({
63
+ kind: "node",
64
+ operation: "create",
65
+ path: `${nodeId}/${key}`,
66
+ data: elementNodeFields({
67
+ element: spec.elements[key],
68
+ nodeId,
69
+ slug
70
+ })
71
+ });
72
+ }
73
+ patches.push({
74
+ kind: "node",
75
+ operation: "create",
76
+ path: nodeId,
77
+ data: {
78
+ ...elementNodeFields({
79
+ element: spec.elements[spec.root],
80
+ nodeId,
81
+ slug
82
+ }),
83
+ meta: spec.meta,
84
+ page: ref("page", placement.page),
85
+ x: placement.x ?? 0,
86
+ y: placement.y ?? 0,
87
+ size: {
88
+ type: "custom",
89
+ width: placement.width,
90
+ height: 0
91
+ },
92
+ ...placement.label !== void 0 ? { label: placement.label } : {},
93
+ ...placement.order !== void 0 ? { order: placement.order } : {}
94
+ }
95
+ });
96
+ return patches;
97
+ }
98
+ //#endregion
99
+ export { specToNodePatches };
@@ -6,11 +6,11 @@ import { ComponentContractOf, PathOf } from "../framework/registered.js";
6
6
  import { EntityClass, GroupComputedInput } from "../framework/defineEntity.js";
7
7
  import { ConfigClass, ConfigInstance } from "../framework/defineConfig.js";
8
8
  import { Config } from "../framework/Config.js";
9
+ import { GlyphNamespace } from "../entities/system/glyph-identity.js";
9
10
  import { StoredPreviewCondition } from "../framework/preview-store.js";
10
11
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
11
12
  import { cellAt } from "../spec/cell.js";
12
13
  import { instanceAt } from "../spec/instance.js";
13
- import { GlyphNamespace } from "../entities/system/glyph-identity.js";
14
14
  import { ReactNativeSystem } from "./react-native-system.js";
15
15
  import { System } from "./system.js";
16
16
  import { AnySystemConfig } from "./platform.js";
@@ -2,8 +2,9 @@ import { AI_LANES } from "../ai-lanes.js";
2
2
  import { defineEntity } from "../framework/defineEntity.js";
3
3
  import { Package } from "../entities/system/Package.js";
4
4
  import { Component } from "../entities/system/Component.js";
5
- import { Device } from "../entities/system/Device.js";
6
5
  import { Icon } from "../entities/system/Icon.js";
6
+ import { captureNodeOps } from "../capture/node-ops.js";
7
+ import { Device } from "../entities/system/Device.js";
7
8
  import { Operation } from "../entities/system/Operation.js";
8
9
  import { Tool } from "../entities/system/Tool.js";
9
10
  import { defineConfig } from "../framework/defineConfig.js";
@@ -211,6 +212,7 @@ const Size = z.discriminatedUnion("type", [z.object({
211
212
  */
212
213
  const Node = defineEntity({
213
214
  kind: "node",
215
+ schemas: captureNodeOps,
214
216
  fields: z.object({
215
217
  /** A real ref, never a bare name — dependents()/rename-cascade need a real edge, and a bare
216
218
  * `kind:path` string the framework never walks gives neither. Absent only on a placeholder
@@ -1,5 +1,5 @@
1
- import { Ref } from "../framework/utils/ref-grammar.js";
2
1
  import { CopyPlan } from "../entities/system/copy-plan.js";
2
+ import { Ref } from "../framework/utils/ref-grammar.js";
3
3
  import { SubEntityClass } from "../framework/defineSubEntity.js";
4
4
  import { ComputedInput } from "../framework/registry.js";
5
5
  import { DerivedEntityClass } from "../framework/defineDerivedEntity.js";
@@ -9,12 +9,12 @@ import { ConfigClass } from "../framework/defineConfig.js";
9
9
  import { PinOptionsField } from "../entities/system/LinkedSystem.js";
10
10
  import { BreakPlan, LinkPlan, SourceRowState, UnlinkPlan } from "../entities/system/link-plan.js";
11
11
  import { Config } from "../framework/Config.js";
12
+ import { GlyphNamespace } from "../entities/system/glyph-identity.js";
12
13
  import { StylePropValue } from "../entities/system/StyleProperty.js";
13
14
  import { StoredPreviewCondition } from "../framework/preview-store.js";
14
15
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
15
16
  import { cellAt } from "../spec/cell.js";
16
17
  import { instanceAt } from "../spec/instance.js";
17
- import { GlyphNamespace } from "../entities/system/glyph-identity.js";
18
18
  import { DerivedColor, Gradient } from "../entities/system/color.js";
19
19
  import { StyleValue } from "../entities/system/style-bag.js";
20
20
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
@@ -1144,8 +1144,8 @@ declare const ReactNativeSystem: ConfigClass<{
1144
1144
  value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
1145
1145
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
1146
1146
  type: _$zod.ZodOptional<_$zod.ZodEnum<{
1147
- mode: "mode";
1148
1147
  state: "state";
1148
+ mode: "mode";
1149
1149
  }>>;
1150
1150
  default: _$zod.ZodOptional<_$zod.ZodObject<{
1151
1151
  __ref: _$zod.ZodString;
@@ -1159,7 +1159,7 @@ declare const ReactNativeSystem: ConfigClass<{
1159
1159
  arbitrary: _$zod.ZodDefault<_$zod.ZodBoolean>;
1160
1160
  negates: _$zod.ZodDefault<_$zod.ZodBoolean>;
1161
1161
  opacityOf: _$zod.ZodOptional<_$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>>;
1162
- }, "values" | "properties" | "classPrefix"> & {
1162
+ }, "values" | "classPrefix" | "properties"> & {
1163
1163
  properties: _$zod.ZodArray<_$zod.ZodPipe<_$zod.ZodPipe<_$zod.ZodString, _$zod.ZodTransform<string, string>>, _$zod.ZodEnum<{
1164
1164
  filter: "filter";
1165
1165
  transform: "transform";
@@ -1184,7 +1184,14 @@ declare const ReactNativeSystem: ConfigClass<{
1184
1184
  overflow: "overflow";
1185
1185
  padding: "padding";
1186
1186
  width: "width";
1187
+ elevation: "elevation";
1187
1188
  fontFamily: "fontFamily";
1189
+ fontSize: "fontSize";
1190
+ fontStyle: "fontStyle";
1191
+ fontVariant: "fontVariant";
1192
+ fontWeight: "fontWeight";
1193
+ letterSpacing: "letterSpacing";
1194
+ pointerEvents: "pointerEvents";
1188
1195
  alignContent: "alignContent";
1189
1196
  alignItems: "alignItems";
1190
1197
  alignSelf: "alignSelf";
@@ -1226,7 +1233,6 @@ declare const ReactNativeSystem: ConfigClass<{
1226
1233
  boxShadow: "boxShadow";
1227
1234
  boxSizing: "boxSizing";
1228
1235
  columnGap: "columnGap";
1229
- elevation: "elevation";
1230
1236
  experimental_backgroundImage: "experimental_backgroundImage";
1231
1237
  experimental_backgroundPosition: "experimental_backgroundPosition";
1232
1238
  experimental_backgroundRepeat: "experimental_backgroundRepeat";
@@ -1236,10 +1242,6 @@ declare const ReactNativeSystem: ConfigClass<{
1236
1242
  flexGrow: "flexGrow";
1237
1243
  flexShrink: "flexShrink";
1238
1244
  flexWrap: "flexWrap";
1239
- fontSize: "fontSize";
1240
- fontStyle: "fontStyle";
1241
- fontVariant: "fontVariant";
1242
- fontWeight: "fontWeight";
1243
1245
  includeFontPadding: "includeFontPadding";
1244
1246
  insetBlock: "insetBlock";
1245
1247
  insetBlockEnd: "insetBlockEnd";
@@ -1248,7 +1250,6 @@ declare const ReactNativeSystem: ConfigClass<{
1248
1250
  insetInlineEnd: "insetInlineEnd";
1249
1251
  insetInlineStart: "insetInlineStart";
1250
1252
  justifyContent: "justifyContent";
1251
- letterSpacing: "letterSpacing";
1252
1253
  lineHeight: "lineHeight";
1253
1254
  marginBlock: "marginBlock";
1254
1255
  marginBlockEnd: "marginBlockEnd";
@@ -1289,7 +1290,6 @@ declare const ReactNativeSystem: ConfigClass<{
1289
1290
  paddingStart: "paddingStart";
1290
1291
  paddingTop: "paddingTop";
1291
1292
  paddingVertical: "paddingVertical";
1292
- pointerEvents: "pointerEvents";
1293
1293
  resizeMode: "resizeMode";
1294
1294
  rotation: "rotation";
1295
1295
  rowGap: "rowGap";
@@ -1442,6 +1442,10 @@ declare const ReactNativeSystem: ConfigClass<{
1442
1442
  }, _$zod_v4_core0.$strip>;
1443
1443
  default: _$zod.ZodOptional<_$zod.ZodBoolean>;
1444
1444
  defaultProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
1445
+ props: _$zod.ZodOptional<_$zod.ZodObject<{
1446
+ glyph: _$zod.ZodString;
1447
+ axes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
1448
+ }, _$zod_v4_core0.$strip>>;
1445
1449
  }, _$zod_v4_core0.$strip>>;
1446
1450
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "canvas-role", {
1447
1451
  readonly create: {
@@ -2970,8 +2974,8 @@ declare const ReactNativeSystem: ConfigClass<{
2970
2974
  value: _$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodNumber]>;
2971
2975
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
2972
2976
  type: _$zod.ZodOptional<_$zod.ZodEnum<{
2973
- mode: "mode";
2974
2977
  state: "state";
2978
+ mode: "mode";
2975
2979
  }>>;
2976
2980
  default: _$zod.ZodOptional<_$zod.ZodObject<{
2977
2981
  __ref: _$zod.ZodString;
@@ -2985,7 +2989,7 @@ declare const ReactNativeSystem: ConfigClass<{
2985
2989
  arbitrary: _$zod.ZodDefault<_$zod.ZodBoolean>;
2986
2990
  negates: _$zod.ZodDefault<_$zod.ZodBoolean>;
2987
2991
  opacityOf: _$zod.ZodOptional<_$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>>;
2988
- }, "values" | "properties" | "classPrefix"> & {
2992
+ }, "values" | "classPrefix" | "properties"> & {
2989
2993
  properties: _$zod.ZodArray<_$zod.ZodPipe<_$zod.ZodPipe<_$zod.ZodString, _$zod.ZodTransform<string, string>>, _$zod.ZodEnum<{
2990
2994
  filter: "filter";
2991
2995
  transform: "transform";
@@ -3010,7 +3014,14 @@ declare const ReactNativeSystem: ConfigClass<{
3010
3014
  overflow: "overflow";
3011
3015
  padding: "padding";
3012
3016
  width: "width";
3017
+ elevation: "elevation";
3013
3018
  fontFamily: "fontFamily";
3019
+ fontSize: "fontSize";
3020
+ fontStyle: "fontStyle";
3021
+ fontVariant: "fontVariant";
3022
+ fontWeight: "fontWeight";
3023
+ letterSpacing: "letterSpacing";
3024
+ pointerEvents: "pointerEvents";
3014
3025
  alignContent: "alignContent";
3015
3026
  alignItems: "alignItems";
3016
3027
  alignSelf: "alignSelf";
@@ -3052,7 +3063,6 @@ declare const ReactNativeSystem: ConfigClass<{
3052
3063
  boxShadow: "boxShadow";
3053
3064
  boxSizing: "boxSizing";
3054
3065
  columnGap: "columnGap";
3055
- elevation: "elevation";
3056
3066
  experimental_backgroundImage: "experimental_backgroundImage";
3057
3067
  experimental_backgroundPosition: "experimental_backgroundPosition";
3058
3068
  experimental_backgroundRepeat: "experimental_backgroundRepeat";
@@ -3062,10 +3072,6 @@ declare const ReactNativeSystem: ConfigClass<{
3062
3072
  flexGrow: "flexGrow";
3063
3073
  flexShrink: "flexShrink";
3064
3074
  flexWrap: "flexWrap";
3065
- fontSize: "fontSize";
3066
- fontStyle: "fontStyle";
3067
- fontVariant: "fontVariant";
3068
- fontWeight: "fontWeight";
3069
3075
  includeFontPadding: "includeFontPadding";
3070
3076
  insetBlock: "insetBlock";
3071
3077
  insetBlockEnd: "insetBlockEnd";
@@ -3074,7 +3080,6 @@ declare const ReactNativeSystem: ConfigClass<{
3074
3080
  insetInlineEnd: "insetInlineEnd";
3075
3081
  insetInlineStart: "insetInlineStart";
3076
3082
  justifyContent: "justifyContent";
3077
- letterSpacing: "letterSpacing";
3078
3083
  lineHeight: "lineHeight";
3079
3084
  marginBlock: "marginBlock";
3080
3085
  marginBlockEnd: "marginBlockEnd";
@@ -3115,7 +3120,6 @@ declare const ReactNativeSystem: ConfigClass<{
3115
3120
  paddingStart: "paddingStart";
3116
3121
  paddingTop: "paddingTop";
3117
3122
  paddingVertical: "paddingVertical";
3118
- pointerEvents: "pointerEvents";
3119
3123
  resizeMode: "resizeMode";
3120
3124
  rotation: "rotation";
3121
3125
  rowGap: "rowGap";
@@ -3268,6 +3272,10 @@ declare const ReactNativeSystem: ConfigClass<{
3268
3272
  }, _$zod_v4_core0.$strip>;
3269
3273
  default: _$zod.ZodOptional<_$zod.ZodBoolean>;
3270
3274
  defaultProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
3275
+ props: _$zod.ZodOptional<_$zod.ZodObject<{
3276
+ glyph: _$zod.ZodString;
3277
+ axes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
3278
+ }, _$zod_v4_core0.$strip>>;
3271
3279
  }, _$zod_v4_core0.$strip>>;
3272
3280
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "canvas-role", {
3273
3281
  readonly create: {
@@ -3,8 +3,8 @@ import { Composite } from "../entities/system/Composite.js";
3
3
  import { Package } from "../entities/system/Package.js";
4
4
  import { File } from "../entities/system/File.js";
5
5
  import { Component } from "../entities/system/Component.js";
6
- import { Device } from "../entities/system/Device.js";
7
6
  import { Icon } from "../entities/system/Icon.js";
7
+ import { Device } from "../entities/system/Device.js";
8
8
  import { Operation } from "../entities/system/Operation.js";
9
9
  import { Tool } from "../entities/system/Tool.js";
10
10
  import { registerSchemaMigrations, registeredSchemaMigrations } from "../framework/schema-version.js";
@@ -1,5 +1,5 @@
1
- import { Ref } from "../framework/utils/ref-grammar.js";
2
1
  import { CopyPlan } from "../entities/system/copy-plan.js";
2
+ import { Ref } from "../framework/utils/ref-grammar.js";
3
3
  import { SubEntityClass } from "../framework/defineSubEntity.js";
4
4
  import { ComputedInput } from "../framework/registry.js";
5
5
  import { DerivedEntityClass } from "../framework/defineDerivedEntity.js";
@@ -9,12 +9,12 @@ import { ConfigClass } from "../framework/defineConfig.js";
9
9
  import { PinOptionsField } from "../entities/system/LinkedSystem.js";
10
10
  import { BreakPlan, LinkPlan, SourceRowState, UnlinkPlan } from "../entities/system/link-plan.js";
11
11
  import { Config } from "../framework/Config.js";
12
+ import { GlyphNamespace } from "../entities/system/glyph-identity.js";
12
13
  import { StylePropValue } from "../entities/system/StyleProperty.js";
13
14
  import { StoredPreviewCondition } from "../framework/preview-store.js";
14
15
  import { listSlots, namedSlots, slotHostedBy, slotOf } from "../spec/slot.js";
15
16
  import { cellAt } from "../spec/cell.js";
16
17
  import { instanceAt } from "../spec/instance.js";
17
- import { GlyphNamespace } from "../entities/system/glyph-identity.js";
18
18
  import { DerivedColor, Gradient } from "../entities/system/color.js";
19
19
  import { StyleValue } from "../entities/system/style-bag.js";
20
20
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../entities/system/Component.js";
@@ -1133,8 +1133,8 @@ declare const System: ConfigClass<{
1133
1133
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
1134
1134
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
1135
1135
  type: _$zod.ZodOptional<_$zod.ZodEnum<{
1136
- mode: "mode";
1137
1136
  state: "state";
1137
+ mode: "mode";
1138
1138
  }>>;
1139
1139
  default: _$zod.ZodOptional<_$zod.ZodObject<{
1140
1140
  __ref: _$zod.ZodString;
@@ -1296,6 +1296,10 @@ declare const System: ConfigClass<{
1296
1296
  }, _$zod_v4_core0.$strip>;
1297
1297
  default: _$zod.ZodOptional<_$zod.ZodBoolean>;
1298
1298
  defaultProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
1299
+ props: _$zod.ZodOptional<_$zod.ZodObject<{
1300
+ glyph: _$zod.ZodString;
1301
+ axes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
1302
+ }, _$zod_v4_core0.$strip>>;
1299
1303
  }, _$zod_v4_core0.$strip>>;
1300
1304
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "canvas-role", {
1301
1305
  readonly create: {
@@ -2831,8 +2835,8 @@ declare const System: ConfigClass<{
2831
2835
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
2832
2836
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
2833
2837
  type: _$zod.ZodOptional<_$zod.ZodEnum<{
2834
- mode: "mode";
2835
2838
  state: "state";
2839
+ mode: "mode";
2836
2840
  }>>;
2837
2841
  default: _$zod.ZodOptional<_$zod.ZodObject<{
2838
2842
  __ref: _$zod.ZodString;
@@ -2994,6 +2998,10 @@ declare const System: ConfigClass<{
2994
2998
  }, _$zod_v4_core0.$strip>;
2995
2999
  default: _$zod.ZodOptional<_$zod.ZodBoolean>;
2996
3000
  defaultProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
3001
+ props: _$zod.ZodOptional<_$zod.ZodObject<{
3002
+ glyph: _$zod.ZodString;
3003
+ axes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
3004
+ }, _$zod_v4_core0.$strip>>;
2997
3005
  }, _$zod_v4_core0.$strip>>;
2998
3006
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "canvas-role", {
2999
3007
  readonly create: {
@@ -1,13 +1,13 @@
1
+ import { Settings } from "../entities/system/Settings.js";
1
2
  import { Font } from "../entities/system/Font.js";
2
3
  import { Composite } from "../entities/system/Composite.js";
3
4
  import { Modifier } from "../entities/system/Modifier.js";
4
- import { Settings } from "../entities/system/Settings.js";
5
5
  import { StyleProperty } from "../entities/system/StyleProperty.js";
6
6
  import { Package } from "../entities/system/Package.js";
7
7
  import { File } from "../entities/system/File.js";
8
8
  import { Component } from "../entities/system/Component.js";
9
- import { Device } from "../entities/system/Device.js";
10
9
  import { Icon } from "../entities/system/Icon.js";
10
+ import { Device } from "../entities/system/Device.js";
11
11
  import { Operation } from "../entities/system/Operation.js";
12
12
  import { Tool } from "../entities/system/Tool.js";
13
13
  import { registerSchemaMigrations, registeredSchemaMigrations } from "../framework/schema-version.js";
@@ -35,6 +35,7 @@ import { previewConditionsKeyedMigration } from "../migrations/20260920004019_pr
35
35
  import { prefixedTokenGroupMigration } from "../migrations/20260920161309_prefixed_token_group.js";
36
36
  import { iconLibraryWithoutComponentMigration } from "../migrations/20260921044042_icon_library_without_component.js";
37
37
  import { iconLibrariesMigration } from "../migrations/20260922013625_icon_libraries.js";
38
+ import { iconCanvasToolMigration } from "../migrations/20260923005318_icon_canvas_tool.js";
38
39
  //#region src/configs/system.ts
39
40
  /**
40
41
  * `System` — the design-system config TYPE. Declares the exact kinds a design system owns (tokens,
@@ -90,5 +91,6 @@ if (!registeredSchemaMigrations().has(20260920004019)) registerSchemaMigrations(
90
91
  if (!registeredSchemaMigrations().has(20260920161309)) registerSchemaMigrations(prefixedTokenGroupMigration);
91
92
  if (!registeredSchemaMigrations().has(20260921044042)) registerSchemaMigrations(iconLibraryWithoutComponentMigration);
92
93
  if (!registeredSchemaMigrations().has(20260922013625)) registerSchemaMigrations(iconLibrariesMigration);
94
+ if (!registeredSchemaMigrations().has(20260923005318)) registerSchemaMigrations(iconCanvasToolMigration);
93
95
  //#endregion
94
96
  export { System };
@@ -14,8 +14,8 @@ declare const NativeModifier: EntityClass<z.ZodObject<{
14
14
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
15
15
  }, z.core.$strip>, z.ZodObject<{
16
16
  type: z.ZodOptional<z.ZodEnum<{
17
- mode: "mode";
18
17
  state: "state";
18
+ mode: "mode";
19
19
  }>>;
20
20
  default: z.ZodOptional<z.ZodObject<{
21
21
  __ref: z.ZodString;