@yahoo/uds-create-config 3.0.6 → 3.0.7

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 (33) hide show
  1. package/dist/configs/CanvasConfig.d.ts +24 -0
  2. package/dist/configs/react-native-system.d.ts +20 -2
  3. package/dist/configs/react-native-system.js +1 -1
  4. package/dist/configs/system.d.ts +18 -0
  5. package/dist/configs/system.js +5 -1
  6. package/dist/entities/native/NativeStyleProperty.d.ts +2 -2
  7. package/dist/entities/system/Component.d.ts +12 -0
  8. package/dist/entities/system/Component.js +6 -0
  9. package/dist/entities/system/Font.d.ts +25 -1
  10. package/dist/entities/system/Font.js +34 -1
  11. package/dist/entities/system/Token.js +1 -1
  12. package/dist/entities/system/defineComponent.d.ts +32 -11
  13. package/dist/entities/system/defineComponent.js +10 -1
  14. package/dist/entities/system/icon-library.js +5 -1
  15. package/dist/entities/system/style-bag.js +1 -0
  16. package/dist/framework/Config.d.ts +16 -1
  17. package/dist/framework/Config.js +33 -1
  18. package/dist/framework/projections.d.ts +23 -2
  19. package/dist/framework/projections.js +67 -11
  20. package/dist/framework/render-spec.js +16 -1
  21. package/dist/framework/schema-version.d.ts +1 -1
  22. package/dist/framework/schema-version.js +5 -5
  23. package/dist/framework/utils/field-schema.js +3 -2
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.js +3 -3
  26. package/dist/migrations/2.0.0/v1-artifact.d.ts +20 -0
  27. package/dist/migrations/2.0.0/v1-artifact.js +358 -18
  28. package/dist/migrations/20260912161840_preview_conditions.d.ts +9 -0
  29. package/dist/migrations/20260912161840_preview_conditions.js +10 -0
  30. package/dist/migrations/20260912164927_font_variable.d.ts +18 -0
  31. package/dist/migrations/20260912164927_font_variable.js +10 -0
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +2 -2
@@ -8,6 +8,7 @@ import { dataSchema, resolveInputSchema } from "./schemas.js";
8
8
  import { borrowedSlug, classifyOverlay } from "./source-integrity.js";
9
9
  import { kindBorrowable, titleCase } from "./registry.js";
10
10
  import { isGroupBody } from "./utils/group.js";
11
+ import { authoredBag } from "./projections.js";
11
12
  import { addressOf, editOp, inputOf, opVerb } from "./config-op.js";
12
13
  import { configSchemas } from "./config-ops.js";
13
14
  import { isAuthored } from "./authoring.js";
@@ -644,6 +645,37 @@ var Config = class Config {
644
645
  return this.state.entities.get(kind);
645
646
  }
646
647
  /**
648
+ * The value each of a kind's fields takes when a create leaves it out — `responsive: false` on a
649
+ * style property, say.
650
+ *
651
+ * A create stores the schema's parsed output, so a body that never mentioned `responsive` holds
652
+ * `responsive: false` from then on, indistinguishable from one that wrote it. What authored source
653
+ * is emitted from is that stored body, and writing every filled-in default back out turned a
654
+ * one-line hand-authored prop into four — which is why the emitter asks here what it may leave out.
655
+ * Read off the create op's `data` schema with this config as context, since a kind's fields may be
656
+ * a factory over it; a field with no default is absent from the answer.
657
+ */
658
+ fieldDefaults(kind) {
659
+ const entry = this.entityOf(kind)?.schemas.create;
660
+ if (!entry) return {};
661
+ const schema = resolveInputSchema(entry.input, { config: this });
662
+ if (!(schema instanceof z.ZodObject)) return {};
663
+ const data = schema.shape.data;
664
+ if (!(data instanceof z.ZodObject)) return {};
665
+ const defaults = {};
666
+ for (const [field, fieldSchema] of Object.entries(data.shape)) {
667
+ const def = fieldSchema._zod?.def;
668
+ if (def?.type !== "default") continue;
669
+ defaults[field] = typeof def.defaultValue === "function" ? def.defaultValue() : def.defaultValue;
670
+ }
671
+ return defaults;
672
+ }
673
+ /** A style bag read back to the leaves an author wrote — `projections.authoredBag`, reachable
674
+ * from a consumer that holds the config and not the module. */
675
+ authoredBag(bag) {
676
+ return authoredBag(this, bag);
677
+ }
678
+ /**
647
679
  * Run one of a kind's operations — the input parsed through the op's own schema, then handed to
648
680
  * its handler.
649
681
  *
@@ -4683,7 +4715,7 @@ var Config = class Config {
4683
4715
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
4684
4716
  hydrateFrom(stored, options) {
4685
4717
  const claimed = schemaVersionOf(stored);
4686
- if (claimed > 20260910212453) throw new SchemaVersionTooNew(claimed);
4718
+ if (claimed > 20260912164927) throw new SchemaVersionTooNew(claimed);
4687
4719
  const wire = upgradeSerializedConfig(stored);
4688
4720
  if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration — import the config type's module (e.g. \`configs/system\`) before hydrating, or port the repo once with \`uds migrate\`.`);
4689
4721
  const leftover = wire.options;
@@ -439,7 +439,28 @@ declare function validateComponentProps(config: Config, componentPath: string, p
439
439
  * accessor that exists for a reader which can't reach its entity class, and it is not `toJSON` —
440
440
  * serialization is for storage and the wire.
441
441
  */
442
- declare function previewDefaults(config: Config, path: string): Record<string, unknown>;
442
+ declare function previewDefaults(config: Config, path: string,
443
+ /** The cell's own prop values. Given, every `preview({ when })` entry that holds for the cell —
444
+ * tested against the defaults under these values, as a rule's `when` is — adds its props. */
445
+
446
+ cell?: Record<string, unknown>): Record<string, unknown>;
447
+ /**
448
+ * Only what the `preview({ when })` entries add for a cell — the props of every condition that holds
449
+ * for the cell's values over the defaults, later entries over earlier. Nothing else: a caller that
450
+ * merges these onto a cell's own props is adding the content the author tied to that coordinate,
451
+ * without restating defaults that would shadow an edit.
452
+ */
453
+ declare function previewConditionalProps(config: Config, path: string, cell: Record<string, unknown>): Record<string, unknown>;
454
+ /** One preview condition as stored — see `defineComponent`'s `PreviewCondition`. */
455
+ interface StoredPreviewCondition {
456
+ readonly when: Record<string, unknown>;
457
+ readonly props: Record<string, unknown>;
458
+ }
459
+ /**
460
+ * A component's conditional preview props, in authored order. Empty for a component that declares
461
+ * none, or a path that names no component.
462
+ */
463
+ declare function previewConditions(config: Config, path: string): readonly StoredPreviewCondition[];
443
464
  /** A preview grid, derived. Rows sweep a prop's declared values; columns are the states the
444
465
  * Component actually styles for. */
445
466
  interface PreviewMatrix {
@@ -477,4 +498,4 @@ declare function previewMatrix(config: Config, path: string): PreviewMatrix;
477
498
  */
478
499
  declare function propValueFromAxis(config: Config, path: string, prop: string, value: string): unknown;
479
500
  //#endregion
480
- export { PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
501
+ export { PreviewMatrix, PropDeclaration, StoredPreviewCondition, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
@@ -1,6 +1,7 @@
1
1
  import { isRef, kindOf, memberOf, pathOf, ref, refLeaf, sourceOf, splitRef } from "./utils/refs.js";
2
2
  import { isDerivedColor, isGradient, renderDerivedColor, renderGradient } from "../entities/system/color.js";
3
3
  import { forwardsOf } from "../entities/system/element.js";
4
+ import { fontFamilyStack } from "../entities/system/Font.js";
4
5
  import { listedIn } from "./utils/enumerated.js";
5
6
  import { modifierCategory } from "../entities/system/Modifier.js";
6
7
  import { classPrefixOf, varPrefixOf } from "../entities/system/Settings.js";
@@ -393,6 +394,17 @@ function chaseTag(config) {
393
394
  }
394
395
  return tag;
395
396
  }
397
+ /** The `font-family` stack a declared font stands for, or `undefined` for a path the config does not
398
+ * hold — the value side of a `font:` ref, read in the config the ref names. */
399
+ function fontStackOf(config, path) {
400
+ const font = config.resolve("font", path)?.toJSON();
401
+ if (typeof font?.fontFamily !== "string") return void 0;
402
+ return fontFamilyStack({
403
+ fontFamily: font.fontFamily,
404
+ fallbackStack: Array.isArray(font.fallbackStack) ? font.fallbackStack.filter((f) => typeof f === "string") : void 0,
405
+ variable: typeof font.variable === "string" ? font.variable : void 0
406
+ });
407
+ }
396
408
  /**
397
409
  * One field of one entity, with refs chased to the literal they denote — local and linked alike.
398
410
  *
@@ -420,7 +432,10 @@ function resolveFieldValue(config, kind, path, field, seen = /* @__PURE__ */ new
420
432
  if (seen.has(key)) return void 0;
421
433
  seen.add(key);
422
434
  const source = config.configFor(value);
423
- if (source) return resolveFieldValue(source, kindOf(value), pathOf(value), field, seen);
435
+ if (source) {
436
+ if (kindOf(value) === "font") return fontStackOf(source, pathOf(value));
437
+ return resolveFieldValue(source, kindOf(value), pathOf(value), field, seen);
438
+ }
424
439
  return;
425
440
  }
426
441
  return value;
@@ -449,7 +464,9 @@ function resolveTokenValueUnder(config, path, condition, seen = /* @__PURE__ */
449
464
  if (seen.has(key)) return void 0;
450
465
  seen.add(key);
451
466
  const source = config.configFor(value);
452
- if (!source || kindOf(value) !== "token") return void 0;
467
+ if (!source) return void 0;
468
+ if (kindOf(value) === "font") return fontStackOf(source, pathOf(value));
469
+ if (kindOf(value) !== "token") return void 0;
453
470
  return resolveTokenValueUnder(source, pathOf(value), condition, seen);
454
471
  }
455
472
  return typeof value === "string" || typeof value === "number" ? value : void 0;
@@ -468,6 +485,7 @@ function renderStyleValue(config, value, varPrefix) {
468
485
  if (isRef(value)) {
469
486
  const source = config.configFor(value);
470
487
  if (!source) return "";
488
+ if (kindOf(value) === "font") return fontStackOf(source, pathOf(value)) ?? "";
471
489
  const slug = sourceOf(value);
472
490
  return cssVarRef(source, "token", pathOf(value), slug === void 0 ? varPrefix : sourceVarPrefix(config, slug));
473
491
  }
@@ -888,14 +906,49 @@ function validateComponentProps(config, componentPath, props) {
888
906
  * accessor that exists for a reader which can't reach its entity class, and it is not `toJSON` —
889
907
  * serialization is for storage and the wire.
890
908
  */
891
- function previewDefaults(config, path) {
909
+ function previewDefaults(config, path, cell) {
892
910
  const component = config.resolve("component", path);
893
911
  if (!component) return {};
894
912
  const { defaultProps, previewProps } = component.body;
895
- return {
913
+ const base = {
896
914
  ...defaultProps,
897
915
  ...previewProps
898
916
  };
917
+ if (!cell) return base;
918
+ return {
919
+ ...base,
920
+ ...previewConditionalProps(config, path, cell)
921
+ };
922
+ }
923
+ /**
924
+ * Only what the `preview({ when })` entries add for a cell — the props of every condition that holds
925
+ * for the cell's values over the defaults, later entries over earlier. Nothing else: a caller that
926
+ * merges these onto a cell's own props is adding the content the author tied to that coordinate,
927
+ * without restating defaults that would shadow an edit.
928
+ */
929
+ function previewConditionalProps(config, path, cell) {
930
+ const component = config.resolve("component", path);
931
+ if (!component) return {};
932
+ const { defaultProps, previewProps } = component.body;
933
+ const state = {
934
+ ...defaultProps,
935
+ ...previewProps,
936
+ ...cell
937
+ };
938
+ const holds = (when) => Object.entries(when).every(([prop, value]) => String(state[prop]) === String(refLeaf(value)));
939
+ const conditional = {};
940
+ for (const { when, props } of previewConditions(config, path)) if (holds(when)) Object.assign(conditional, props);
941
+ return conditional;
942
+ }
943
+ /**
944
+ * A component's conditional preview props, in authored order. Empty for a component that declares
945
+ * none, or a path that names no component.
946
+ */
947
+ function previewConditions(config, path) {
948
+ const component = config.resolve("component", path);
949
+ if (!component) return [];
950
+ const { previewWhen } = component.body;
951
+ return Array.isArray(previewWhen) ? previewWhen : [];
899
952
  }
900
953
  /**
901
954
  * The preview grid a component implies.
@@ -922,23 +975,26 @@ function previewMatrix(config, path) {
922
975
  const { styles = {}, props: declared = {} } = component.toJSON();
923
976
  const props = {};
924
977
  const modifiers = /* @__PURE__ */ new Set();
978
+ const nameAxisPoint = (prop, stored) => {
979
+ const value = String(refLeaf(stored));
980
+ const values = props[prop] ?? [];
981
+ if (!values.includes(value)) values.push(value);
982
+ props[prop] = values;
983
+ };
925
984
  for (const rule of Object.values(styles)) {
926
- for (const [prop, stored] of Object.entries(rule.when ?? {})) {
927
- const value = String(refLeaf(stored));
928
- const values = props[prop] ?? [];
929
- if (!values.includes(value)) values.push(value);
930
- props[prop] = values;
931
- }
985
+ for (const [prop, stored] of Object.entries(rule.when ?? {})) nameAxisPoint(prop, stored);
932
986
  for (const bag of Object.values(rule.layers ?? {})) for (const key of Object.keys(bag ?? {})) {
933
987
  if (!key.startsWith("_")) continue;
934
988
  if (modifierCategory(config, key.slice(1)) === "state") modifiers.add(key);
935
989
  }
936
990
  }
991
+ for (const { when } of previewConditions(config, path)) for (const [prop, stored] of Object.entries(when)) nameAxisPoint(prop, stored);
937
992
  for (const [name, decl] of Object.entries(declared)) {
938
993
  if (decl?.type === "composite" && isRef(decl.value)) {
939
994
  const values = declaredFirst([...memberLeaves(config, decl.value)], props[name] ?? []);
940
995
  if (values.length > 0) props[name] = values;
941
996
  }
997
+ if (decl?.type === "boolean" && props[name]) props[name] = declaredFirst(["false", "true"], props[name] ?? []);
942
998
  if (decl?.type === "variant") {
943
999
  const values = declaredFirst(isRef(decl.value) ? [] : listedIn(decl.value) ?? [], props[name] ?? []);
944
1000
  if (values.length > 0) props[name] = values;
@@ -971,4 +1027,4 @@ function propValueFromAxis(config, path, prop, value) {
971
1027
  return value;
972
1028
  }
973
1029
  //#endregion
974
- export { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
1030
+ export { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps };
@@ -143,10 +143,20 @@ function deriveSpec(config, path) {
143
143
  "data-uds-component": path
144
144
  } : {}
145
145
  };
146
+ let children = node.children?.length ? [...node.children] : void 0;
147
+ if (props.children !== void 0 && children) {
148
+ const textKey = `${key}•text`;
149
+ elements[textKey] = {
150
+ type: "span",
151
+ props: { children: props.children }
152
+ };
153
+ delete props.children;
154
+ children = [textKey, ...children];
155
+ }
146
156
  elements[key] = {
147
157
  type,
148
158
  ...Object.keys(props).length ? { props } : {},
149
- ...node.children?.length ? { children: node.children } : {},
159
+ ...children?.length ? { children } : {},
150
160
  ...node.slots && Object.keys(node.slots).length ? { slots: node.slots } : {},
151
161
  ...node.visible !== void 0 ? { visible: node.visible } : {}
152
162
  };
@@ -742,6 +752,11 @@ function expandInstance(sink, path, instanceProps, content, hint, instanceSlots)
742
752
  }
743
753
  if (overridden && routed) slots[overridden] = [...routed];
744
754
  if (routed?.length && !overridden) children.push(...routed);
755
+ if ((node.text !== void 0 || node.props !== void 0 && "children" in node.props) && props.children !== void 0 && children.length > 0) {
756
+ const text = props.children;
757
+ delete props.children;
758
+ children.unshift(place(nested, "span", { children: text }, [], `${keyHint}•text`));
759
+ }
745
760
  const placed = place(nested, type, props, children, keyHint, Object.keys(slots).length ? slots : void 0);
746
761
  if (visible === void 0) withCondition(nested, placed, { visible: node.visible });
747
762
  return placed;
@@ -15,7 +15,7 @@ import { Patch, SerializedConfig } from "./Config.js";
15
15
  * sets this constant to its own older timestamp; the merge ref then carries a registered migration
16
16
  * newer than the constant, and the assertion fails until the author re-mints.
17
17
  */
18
- declare const CURRENT_SCHEMA_VERSION = 20260910212453;
18
+ declare const CURRENT_SCHEMA_VERSION = 20260912164927;
19
19
  /** What the walkers need to see of an envelope — loose on purpose, so a typed `SerializedConfig`
20
20
  * and a raw old-shape record both flow in without casts. */
21
21
  interface VersionStamped {
@@ -13,7 +13,7 @@ import { ConfigFormatError } from "./rejection.js";
13
13
  * sets this constant to its own older timestamp; the merge ref then carries a registered migration
14
14
  * newer than the constant, and the assertion fails until the author re-mints.
15
15
  */
16
- const CURRENT_SCHEMA_VERSION = 20260910212453;
16
+ const CURRENT_SCHEMA_VERSION = 20260912164927;
17
17
  /** The mint that moved `options` into the `settings` kind — restated here, rather than imported
18
18
  * from the migration that owns it, because that migration imports this module. */
19
19
  const SETTINGS_AS_KIND_VERSION = 20260908171448;
@@ -45,7 +45,7 @@ function registerSchemaMigrations(...migrations) {
45
45
  for (const migration of migrations) {
46
46
  if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp — mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
47
47
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
48
- if (migration.version > 20260910212453) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
48
+ if (migration.version > 20260912164927) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) — a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
49
49
  REGISTERED.set(migration.version, migration);
50
50
  }
51
51
  }
@@ -102,7 +102,7 @@ function pendingFor(version, target, options) {
102
102
  * Already-current input passes through untouched — same reference, so hot paths pay nothing.
103
103
  */
104
104
  function upgradeSerializedConfig(json, options) {
105
- const target = options?.target ?? 20260910212453;
105
+ const target = options?.target ?? 20260912164927;
106
106
  const version = detectedWireVersion(json);
107
107
  if (version > target) throw new SchemaVersionTooNew(version, target);
108
108
  const raw = json;
@@ -160,7 +160,7 @@ function upgradedSources(json, options) {
160
160
  * meaning under the current schema and replay skips it — reported by the caller, not swallowed here.
161
161
  */
162
162
  function upgradePatch(patch, writtenAt, options) {
163
- const target = options?.target ?? 20260910212453;
163
+ const target = options?.target ?? 20260912164927;
164
164
  if (writtenAt > target) throw new SchemaVersionTooNew(writtenAt, target);
165
165
  let current = patch;
166
166
  for (const migration of pendingFor(writtenAt, target, options)) {
@@ -179,7 +179,7 @@ function upgradePatch(patch, writtenAt, options) {
179
179
  * stamp would cause.
180
180
  */
181
181
  function upgradeDraftEntries(draft, options) {
182
- const target = options?.target ?? 20260910212453;
182
+ const target = options?.target ?? 20260912164927;
183
183
  const entries = [];
184
184
  const held = [];
185
185
  const retired = [];
@@ -65,8 +65,9 @@ function partializeShape(shape, keep) {
65
65
  out[key] = field;
66
66
  continue;
67
67
  }
68
- const f = field;
69
- out[key] = (f instanceof z.ZodOptional ? f.unwrap() : f).nullable().optional();
68
+ let inner = field;
69
+ while (inner instanceof z.ZodOptional || inner instanceof z.ZodDefault) inner = inner.unwrap();
70
+ out[key] = inner.nullable().optional();
70
71
  }
71
72
  return out;
72
73
  }
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ import { ComponentModuleSource, ComponentRegistryImport, ComponentRegistryImport
44
44
  import { Device } from "./entities/system/Device.js";
45
45
  import { ChildrenPolicy, RenderedTarget, VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
46
46
  import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
47
- import { Font, FontFile } from "./entities/system/Font.js";
47
+ import { Font, FontFile, fontFamilyStack } from "./entities/system/Font.js";
48
48
  import { GlobalStyle, globalStyleName } from "./entities/system/GlobalStyle.js";
49
49
  import { Guidance, GuidanceScope, GuidanceSegment, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
50
50
  import { GuidanceStyle, GuidanceStyleBody } from "./entities/system/GuidanceStyle.js";
@@ -70,7 +70,7 @@ import { DERIVED_MUTATIONS } from "./framework/derived-mutations.js";
70
70
  import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
71
71
  import { LayerStyleOptions, layerStyles, ruleApplies } from "./framework/layer-styles.js";
72
72
  import { HasSnapshot, createSliceMemo } from "./framework/memo.js";
73
- import { PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
73
+ import { PreviewMatrix, PropDeclaration, StoredPreviewCondition, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
74
74
  import { ForwardClaims, SurfaceCompositeProp, SurfaceProp, SurfacePropKind, SurfaceScalarProp, SurfaceSlotProp, SurfaceStylePropertyProp, SurfaceVariantProp, forwardClaims, forwardedLayers, intoName, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
75
75
  import { DanglingLocalRef, UnknownStyleLeaf, danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
76
76
  import { resolveInputDir, resolveOutDir, resolveRegistryDir } from "./framework/registry-dir.js";
@@ -87,4 +87,4 @@ import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
87
87
  import { views } from "./framework/views-facade.js";
88
88
  import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
89
89
  import { namedSlotTargets } from "./spec/empty-node-slots.js";
90
- export { AI_LANES, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnySystemConfig, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, Composite, type ComputedFields, type ComputedInput, type ComputedMap, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IdentifiedOp, type InferredRename, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewMatrix, type ProjectedVisibility, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedTarget, type ResolveValueTypeInput, type ResolvedSource, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type TraverseOptions, type TreeNode, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerCompositeProps, layerRef, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm };
90
+ export { AI_LANES, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnySystemConfig, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, Composite, type ComputedFields, type ComputedInput, type ComputedMap, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IdentifiedOp, type InferredRename, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewMatrix, type ProjectedVisibility, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedTarget, type ResolveValueTypeInput, type ResolvedSource, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type TraverseOptions, type TreeNode, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerCompositeProps, layerRef, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm };
package/dist/index.js CHANGED
@@ -13,13 +13,14 @@ import { defineEntity } from "./framework/defineEntity.js";
13
13
  import { defineSubEntity } from "./framework/defineSubEntity.js";
14
14
  import { alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
15
15
  import { VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
16
+ import { Font, FontFile, fontFamilyStack } from "./entities/system/Font.js";
16
17
  import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
17
18
  import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
18
19
  import { Composite } from "./entities/system/Composite.js";
19
20
  import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
20
21
  import { BuildSection, CSS_DEFAULTS, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf } from "./entities/system/Settings.js";
21
22
  import { STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
22
- import { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
23
+ import { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropRouting, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
23
24
  import { forwardClaims, forwardedLayers, intoName, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
24
25
  import { layerStyles, ruleApplies } from "./framework/layer-styles.js";
25
26
  import { createSliceMemo } from "./framework/memo.js";
@@ -48,7 +49,6 @@ import { views } from "./framework/views-facade.js";
48
49
  import { Config, SERIALIZED_CONFIG_VERSION } from "./framework/Config.js";
49
50
  import { defineConfig, kindsOf } from "./framework/defineConfig.js";
50
51
  import { CANVAS_ROLES, CanvasRole } from "./entities/system/CanvasRole.js";
51
- import { Font, FontFile } from "./entities/system/Font.js";
52
52
  import { GlobalStyle, globalStyleName } from "./entities/system/GlobalStyle.js";
53
53
  import { Guidance, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
54
54
  import { GuidanceStyle } from "./entities/system/GuidanceStyle.js";
@@ -83,4 +83,4 @@ import { ConfigSession, memoryConfigSource } from "./framework/session.js";
83
83
  import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
84
84
  import { validateSpec } from "./framework/validate-spec.js";
85
85
  import { namedSlotTargets } from "./spec/empty-node-slots.js";
86
- export { AI_LANES, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_MUTATIONS, Device, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerCompositeProps, layerRef, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm };
86
+ export { AI_LANES, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_MUTATIONS, Device, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerCompositeProps, layerRef, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm };
@@ -38,6 +38,9 @@ declare const V1_DIAGNOSTIC_CODES: {
38
38
  }; /** A component that took content without declaring `children`; the slot is declared for it. */
39
39
  readonly 'children-slot-inferred': {
40
40
  readonly loss: false;
41
+ }; /** A variant whose values were all numbers and styled nothing — a number wearing an enum. */
42
+ readonly 'variant-numeric-to-number': {
43
+ readonly loss: false;
41
44
  }; /** CSS whose syntax or ordered entries cannot be represented by a global style. */
42
45
  readonly 'raw-css-unparsed': {
43
46
  readonly loss: true;
@@ -60,6 +63,12 @@ declare const V1_DIAGNOSTIC_CODES: {
60
63
  readonly 'style-key-unrecognized': {
61
64
  readonly loss: false;
62
65
  };
66
+ /** A `font-family` token reaching its face through a `--<prefix>-font-family-*` variable that no
67
+ * declared font answers to. Kept as written, so it paints what it painted; it is just not an
68
+ * edge to a font. */
69
+ readonly 'font-var-unbound': {
70
+ readonly loss: false;
71
+ };
63
72
  };
64
73
  type V1DiagnosticCode = keyof typeof V1_DIAGNOSTIC_CODES;
65
74
  interface V1Diagnostic {
@@ -77,6 +86,8 @@ interface LoadV1Options {
77
86
  }
78
87
  interface V1Artifact {
79
88
  prefix?: string;
89
+ /** Brand and product prose for the model, unkeyed — config-v2's `guidance`. */
90
+ designPrinciples?: readonly unknown[];
80
91
  /** How the REPO builds the system. Kept verbatim apart from the prefix, which the artifact spells
81
92
  * at the top level and the config keeps in here. */
82
93
  buildOptions?: {
@@ -333,6 +344,10 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
333
344
  anatomy: _$zod.ZodOptional<SubEntityClass<_$zod.ZodType<ComponentElementBody, unknown, _$zod_v4_core0.$ZodTypeInternals<ComponentElementBody, unknown>>>>;
334
345
  defaultProps: _$zod.ZodOptional<SubEntityClass<_$zod.ZodType<StyleValue, unknown, _$zod_v4_core0.$ZodTypeInternals<StyleValue, unknown>>>>;
335
346
  previewProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
347
+ previewWhen: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
348
+ when: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>;
349
+ props: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>;
350
+ }, _$zod_v4_core0.$strip>>>;
336
351
  file: _$zod.ZodOptional<_$zod.ZodObject<{
337
352
  __ref: _$zod.ZodString;
338
353
  }, _$zod_v4_core0.$strip>>;
@@ -447,6 +462,10 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
447
462
  anatomy: _$zod.ZodOptional<SubEntityClass<_$zod.ZodType<ComponentElementBody, unknown, _$zod_v4_core0.$ZodTypeInternals<ComponentElementBody, unknown>>>>;
448
463
  defaultProps: _$zod.ZodOptional<SubEntityClass<_$zod.ZodType<StyleValue, unknown, _$zod_v4_core0.$ZodTypeInternals<StyleValue, unknown>>>>;
449
464
  previewProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
465
+ previewWhen: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
466
+ when: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>;
467
+ props: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>;
468
+ }, _$zod_v4_core0.$strip>>>;
450
469
  file: _$zod.ZodOptional<_$zod.ZodObject<{
451
470
  __ref: _$zod.ZodString;
452
471
  }, _$zod_v4_core0.$strip>>;
@@ -1055,6 +1074,7 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
1055
1074
  postscriptName: _$zod.ZodOptional<_$zod.ZodString>;
1056
1075
  }, _$zod_v4_core0.$strip>>>;
1057
1076
  fallbackStack: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
1077
+ variable: _$zod.ZodOptional<_$zod.ZodString>;
1058
1078
  isVariableFont: _$zod.ZodOptional<_$zod.ZodBoolean>;
1059
1079
  }, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
1060
1080
  version: _$zod.ZodOptional<_$zod.ZodString>;