@yahoo/uds-create-config 4.17.0 → 4.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/configs/CanvasConfig.d.ts +98 -0
  2. package/dist/configs/react-native-system.d.ts +69 -3
  3. package/dist/configs/system.d.ts +77 -7
  4. package/dist/configs/system.js +3 -1
  5. package/dist/css/root-font-size.d.ts +16 -0
  6. package/dist/css/root-font-size.js +97 -0
  7. package/dist/css/value-type.js +5 -1
  8. package/dist/entities/native/NativeModifier.d.ts +1 -1
  9. package/dist/entities/native/NativeSettings.d.ts +1 -0
  10. package/dist/entities/system/Component.d.ts +50 -0
  11. package/dist/entities/system/Component.js +8 -1
  12. package/dist/entities/system/Modifier.d.ts +2 -2
  13. package/dist/entities/system/Settings.d.ts +3 -0
  14. package/dist/entities/system/Settings.js +12 -1
  15. package/dist/entities/system/StyleProperty.js +2 -3
  16. package/dist/entities/system/Token.d.ts +16 -3
  17. package/dist/entities/system/Token.js +21 -1
  18. package/dist/entities/system/token-index.js +1 -1
  19. package/dist/entities/system/token-values.d.ts +138 -0
  20. package/dist/entities/system/token-values.js +154 -0
  21. package/dist/framework/Config.d.ts +1 -1
  22. package/dist/framework/Config.js +1 -1
  23. package/dist/framework/defineEntity.d.ts +1 -1
  24. package/dist/framework/schema-version.d.ts +1 -1
  25. package/dist/framework/schema-version.js +5 -5
  26. package/dist/framework/utils/identifier.d.ts +8 -0
  27. package/dist/framework/utils/identifier.js +62 -0
  28. package/dist/index.d.ts +5 -2
  29. package/dist/index.js +6 -3
  30. package/dist/migrations/2.0.0/raw-css.js +1 -1
  31. package/dist/migrations/2.0.0/v1-artifact.d.ts +39 -4
  32. package/dist/migrations/2.0.0/v1-artifact.js +1 -1
  33. package/dist/migrations/20260923160425_render_token_refs.d.ts +14 -0
  34. package/dist/migrations/20260923160425_render_token_refs.js +10 -0
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +2 -2
@@ -0,0 +1,154 @@
1
+ import { isRef, kindOf, pathOf, ref, splitRef } from "../../framework/utils/refs.js";
2
+ import { parseRootFontSize } from "../../css/root-font-size.js";
3
+ import { CSS_DEFAULTS, Settings } from "./Settings.js";
4
+ import { createSliceMemo } from "../../framework/memo.js";
5
+ import { cssVar, resolveTokenValue } from "../../framework/projections.js";
6
+ //#region src/entities/system/token-values.ts
7
+ /**
8
+ * A token as a VALUE a module can compute with.
9
+ *
10
+ * The stylesheet carries every token as a custom property, which is all a style prop needs. A render
11
+ * that hands a token to something outside the stylesheet — a third-party prop that wants a number, a
12
+ * layout measured in JS — needs the value itself, and the config is the only place it can come from
13
+ * without a hand-written table that drifts. This is that answer, computed once per build: a render
14
+ * reads it as `Token.ref('spacing/2.5').px()`, which the build resolves in place, and the emitted
15
+ * `components/_tokens.ts` module carries the tables a read through a prop needs. The readers are typed
16
+ * per path off {@link RegisteredTokenValues}, which the emitted `uds-env.d.ts` fills in.
17
+ *
18
+ * A token has a value only when nothing changes it: a token with an override, or aliasing one, is
19
+ * whatever the viewer's mode or state says on the page, so it is only ever reachable as its `var()`.
20
+ */
21
+ const NUMERIC = /^(-?(?:\d+(?:\.\d*)?|\.\d+))(px|rem|ms|s)?$/;
22
+ function tokenValueEntry({ value, rem }) {
23
+ if (typeof value === "number") return {
24
+ css: String(value),
25
+ px: value
26
+ };
27
+ const css = value.trim();
28
+ const match = NUMERIC.exec(css);
29
+ if (!match) return { css };
30
+ const amount = Number(match[1]);
31
+ switch (match[2]) {
32
+ case void 0:
33
+ case "px": return {
34
+ css,
35
+ px: amount
36
+ };
37
+ case "rem": return rem === void 0 ? { css } : {
38
+ css,
39
+ px: amount * rem
40
+ };
41
+ case "ms": return {
42
+ css,
43
+ ms: amount
44
+ };
45
+ case "s": return {
46
+ css,
47
+ ms: amount * 1e3
48
+ };
49
+ default: return { css };
50
+ }
51
+ }
52
+ /** The root font size of the page this config's sheet is for, as stated or the browser's own. A
53
+ * stored value already passed the setting's own check, so it parses. */
54
+ function rootFontSize(config) {
55
+ const css = Settings.get(config)?.css?.rem ?? CSS_DEFAULTS.rem;
56
+ return parseRootFontSize(css) ?? {
57
+ css,
58
+ px: void 0
59
+ };
60
+ }
61
+ /**
62
+ * Every token this config lists, in list order, as {@link TokenValueRow}s.
63
+ *
64
+ * Keyed on the token and settings slices, plus the attached sources every memo keys on: a token edit
65
+ * or a `rem` change recomputes, a component edit does not. A source's values reach here through the
66
+ * closure the artifact recorded whether or not the source is attached, so the two answer the same.
67
+ */
68
+ const tokenValueRows = createSliceMemo({
69
+ kinds: ["token", "settings"],
70
+ compute: (config) => {
71
+ const rem = rootFontSize(config).px;
72
+ return config.list("token").map((token) => {
73
+ const { path } = token;
74
+ const slash = path.indexOf("/");
75
+ const owner = config.configFor(ref("token", path)) ?? config;
76
+ return {
77
+ path,
78
+ group: slash > 0 ? path.slice(0, slash) : path,
79
+ alias: slash > 0 ? path.slice(slash + 1) : path,
80
+ variable: cssVar(owner, "token", path),
81
+ state: stateOf({
82
+ config,
83
+ path,
84
+ rem
85
+ })
86
+ };
87
+ });
88
+ }
89
+ });
90
+ function stateOf({ config, path, rem }) {
91
+ if (modeDecides(config, path)) return { kind: "conditional" };
92
+ const resolved = resolveTokenValue(config, path);
93
+ if (resolved === void 0) return { kind: "unresolved" };
94
+ return {
95
+ kind: "value",
96
+ value: tokenValueEntry({
97
+ value: resolved,
98
+ rem
99
+ })
100
+ };
101
+ }
102
+ /** Path → its row, over the same memo as {@link tokenValueRows}. */
103
+ const tokenValueIndex = createSliceMemo({
104
+ kinds: ["token", "settings"],
105
+ compute: (config) => new Map(tokenValueRows(config).map((row) => [row.path, row]))
106
+ });
107
+ /** A bare path or a ref string, as a `token:` ref string. */
108
+ function tokenTarget(target) {
109
+ return typeof target === "string" && !target.includes(":") ? `token:${target}` : target;
110
+ }
111
+ /**
112
+ * One token's row by ref or path, qualified or not. A qualified target is read in the source it
113
+ * names, so the row spells that source's variable and value; an unqualified one is this config's,
114
+ * including a row this config derived from a link.
115
+ */
116
+ function tokenValueRow({ config, target }) {
117
+ const { path, source } = splitRef(tokenTarget(target));
118
+ const owner = source === void 0 ? config : config.sourceFor(source);
119
+ return owner ? tokenValueIndex(owner).get(path) : void 0;
120
+ }
121
+ /**
122
+ * Whether a `token:` target names something this config can answer for — an item, qualified or not,
123
+ * or a group. A group is what a read whose path a prop completes is an edge to.
124
+ */
125
+ function tokenExists({ config, target }) {
126
+ const { path, qualifiedPath } = splitRef(tokenTarget(target));
127
+ if (config.resolve("token", qualifiedPath)) return true;
128
+ return config.groups("token").some((group) => group.path === path);
129
+ }
130
+ /**
131
+ * Whether a token's value depends on a modifier: it carries an override itself, or it aliases a token
132
+ * that does, however many hops away. Chased through the config each alias was authored in, the way
133
+ * `resolveTokenValue` chases the value.
134
+ */
135
+ function modeDecides(config, path, seen = /* @__PURE__ */ new Set()) {
136
+ const body = config.resolve("token", path)?.toJSON();
137
+ if (!body) return false;
138
+ if (body.overrides && Object.keys(body.overrides).length > 0) return true;
139
+ const { value } = body;
140
+ if (!isRef(value) || kindOf(value) !== "token") return false;
141
+ if (seen.has(value.__ref)) return false;
142
+ seen.add(value.__ref);
143
+ const source = config.configFor(value);
144
+ return source ? modeDecides(source, pathOf(value), seen) : false;
145
+ }
146
+ /** The reader names, which is what the build recognizes on a `Token.ref(…)`. */
147
+ const TOKEN_READERS = [
148
+ "var",
149
+ "value",
150
+ "px",
151
+ "ms"
152
+ ];
153
+ //#endregion
154
+ export { TOKEN_READERS, rootFontSize, tokenExists, tokenValueRow, tokenValueRows };
@@ -72,7 +72,7 @@ interface RecordedSource {
72
72
  * The dense-counter `2` a short-lived scheme stamped before the chain existed reads as the mint
73
73
  * that replaced it (see `detectedWireVersion`).
74
74
  */
75
- declare const SERIALIZED_CONFIG_VERSION = 20260923144958;
75
+ declare const SERIALIZED_CONFIG_VERSION = 20260923160425;
76
76
  interface SerializedConfig {
77
77
  /** See {@link SERIALIZED_CONFIG_VERSION}. Always written; a stored artifact may lack it. */
78
78
  readonly version: number;
@@ -4836,7 +4836,7 @@ var Config = class Config {
4836
4836
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
4837
4837
  hydrateFrom(stored, options) {
4838
4838
  const claimed = schemaVersionOf(stored);
4839
- if (claimed > 20260923144958) throw new SchemaVersionTooNew(claimed);
4839
+ if (claimed > 20260923160425) throw new SchemaVersionTooNew(claimed);
4840
4840
  const wire = upgradeSerializedConfig(stored);
4841
4841
  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\`.`);
4842
4842
  const leftover = wire.options;
@@ -355,4 +355,4 @@ type OpInput<E extends {
355
355
  input: infer I extends z.ZodTypeAny;
356
356
  } ? z.input<I> : never;
357
357
  //#endregion
358
- export { EntityClass, GroupComputedInput, ItemOf, OpInput, defineEntity };
358
+ export { EntityClass, GroupComputedInput, ItemOf, KindRef, OpInput, defineEntity };
@@ -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 = 20260923144958;
18
+ declare const CURRENT_SCHEMA_VERSION = 20260923160425;
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 = 20260923144958;
16
+ const CURRENT_SCHEMA_VERSION = 20260923160425;
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 > 20260923144958) 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 > 20260923160425) 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 ?? 20260923144958;
105
+ const target = options?.target ?? 20260923160425;
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 ?? 20260923144958;
163
+ const target = options?.target ?? 20260923160425;
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 ?? 20260923144958;
182
+ const target = options?.target ?? 20260923160425;
183
183
  const entries = [];
184
184
  const held = [];
185
185
  const retired = [];
@@ -0,0 +1,8 @@
1
+ //#region src/framework/utils/identifier.d.ts
2
+ /** What may be written as one JavaScript identifier — a prop name, an export, a binding. */
3
+ /** Whether `name` has the shape of an identifier. A reserved word has the shape and still cannot be
4
+ * bound; {@link isReservedWord} is that question. */
5
+ declare function isIdentifier(name: string): boolean;
6
+ declare function isReservedWord(name: string): boolean;
7
+ //#endregion
8
+ export { isIdentifier, isReservedWord };
@@ -0,0 +1,62 @@
1
+ //#region src/framework/utils/identifier.ts
2
+ /** What may be written as one JavaScript identifier — a prop name, an export, a binding. */
3
+ const IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
4
+ /** Words the language keeps, in every context or in a module: a binding cannot be named one. */
5
+ const RESERVED = new Set([
6
+ "await",
7
+ "break",
8
+ "case",
9
+ "catch",
10
+ "class",
11
+ "const",
12
+ "continue",
13
+ "debugger",
14
+ "default",
15
+ "delete",
16
+ "do",
17
+ "else",
18
+ "enum",
19
+ "export",
20
+ "extends",
21
+ "false",
22
+ "finally",
23
+ "for",
24
+ "function",
25
+ "if",
26
+ "implements",
27
+ "import",
28
+ "in",
29
+ "instanceof",
30
+ "interface",
31
+ "let",
32
+ "new",
33
+ "null",
34
+ "package",
35
+ "private",
36
+ "protected",
37
+ "public",
38
+ "return",
39
+ "static",
40
+ "super",
41
+ "switch",
42
+ "this",
43
+ "throw",
44
+ "true",
45
+ "try",
46
+ "typeof",
47
+ "var",
48
+ "void",
49
+ "while",
50
+ "with",
51
+ "yield"
52
+ ]);
53
+ /** Whether `name` has the shape of an identifier. A reserved word has the shape and still cannot be
54
+ * bound; {@link isReservedWord} is that question. */
55
+ function isIdentifier(name) {
56
+ return IDENTIFIER.test(name);
57
+ }
58
+ function isReservedWord(name) {
59
+ return RESERVED.has(name);
60
+ }
61
+ //#endregion
62
+ export { isIdentifier, isReservedWord };
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ import { AnySystemConfig, isNativeConfig, isSystemConfig } from "./configs/platf
45
45
  import { AiChat, AiFlow, AiFlowOrigin, AiGeneration, AiMessage, AiMultiAgentMode, Canvas, CanvasConfig, Node, Page, SystemSource, createCanvasConfig } from "./configs/CanvasConfig.js";
46
46
  import { DocumentationLibrary } from "./configs/documentation.js";
47
47
  import { CssPropertyEntry } from "./css/properties.generated.js";
48
+ import { RootFontSize, parseRootFontSize } from "./css/root-font-size.js";
48
49
  import { ResolveValueTypeInput, ValueType, resolveValueType, sniffValueType } from "./css/value-type.js";
49
50
  import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
50
51
  import { Documentation } from "./entities/documentation/Documentation.js";
@@ -57,6 +58,8 @@ import { ColorValue, DERIVED_COLOR_SPACE, DerivedColor, Gradient, alpha, darken,
57
58
  import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
58
59
  import { CANVAS_ROLES, CanvasRole, CanvasRoleName } from "./entities/system/CanvasRole.js";
59
60
  import { StyleValue } from "./entities/system/style-bag.js";
61
+ import { RegisteredTokenValues, TOKEN_READERS, TokenGroupReader, TokenReader, TokenReaders, TokenValueEntry, TokenValueRow, TokenValueState, rootFontSize, tokenExists, tokenValueRow, tokenValueRows } from "./entities/system/token-values.js";
62
+ import { OverrideCondition, Token, TokenBody, TokenRefPath, TokenReference, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
60
63
  import { AsInput, AuthoredComponent, AuthoredProp, ComponentBuilder, ComponentPropsOf, GlyphComponent, LayerElement, LayerMap, PropCondition, PropDecl, PropMap, RegisteredMembers, RenderArgs, StyleRuleInput, defineComponent } from "./entities/system/defineComponent.js";
61
64
  import { AuthoredPropBody, Component, ComponentBody, ComponentElementBody, ComponentPropBody, ComponentReference, ComponentStyleBody, ElementVisibility, ElementVisibilityInput, ExtendedComponentRef, ProjectedVisibility, VariantValueBody, VariantValues, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
62
65
  import { Composite } from "./entities/system/Composite.js";
@@ -75,7 +78,6 @@ import { Operation } from "./entities/system/Operation.js";
75
78
  import { Package } from "./entities/system/Package.js";
76
79
  import { DeclaredRuntimeModule, declaredRuntimeModules } from "./entities/system/runtime-modules.js";
77
80
  import { BuildSection, CSS_DEFAULTS, CssPrefix, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf } from "./entities/system/Settings.js";
78
- import { OverrideCondition, Token, TokenBody, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
79
81
  import { Tool } from "./entities/system/Tool.js";
80
82
  import { TokenBinding, TokenMatch, matchTokens, searchTokens, tokenBinding } from "./entities/system/token-index.js";
81
83
  import { AnatomyIssue, AnatomyIssueKind, AnatomyReport, DiffOptions, RenderedNode, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, anatomyIssueKey, diffRendered, normalizeStyleValue, renderedSignatureOf, snapshotHtml } from "./framework/anatomy-check.js";
@@ -96,9 +98,10 @@ import { ConfigSession, ConfigSessionOptions, ConfigSink, ConfigSource, DraftSou
96
98
  import { SignatureOptions, renderSignature, signatureOf } from "./framework/signature.js";
97
99
  import { DanglingDirective, DanglingRef, LeafAddress, MisdeclaredOverlay, OverlayVerb, RedundantQualifier, UnadoptedDirective, UnreadableBorrow, UnstatableCondition, classifyOverlay, danglingDirectives, danglingSourcedRefs, leafAddresses, leafVerb, misdeclaredOverlays, overlayVerb, redundantQualifiers, unadoptedDirectives, unreadableBorrows, unstatableConditions, valueAt } from "./framework/source-integrity.js";
98
100
  import { applyPathDelta, isPlainObject, namedFields, pathDelta, pathSegments, setAtPath, touchedFields } from "./framework/utils/field-path.js";
101
+ import { isIdentifier, isReservedWord } from "./framework/utils/identifier.js";
99
102
  import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
100
103
  import { SpecNode, validateSpec } from "./framework/validate-spec.js";
101
104
  import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
102
105
  import { views } from "./framework/views-facade.js";
103
106
  import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
104
- export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, 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 CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, 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, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type ComputedFields, type ComputedFunctions, type ComputedInput, type ComputedMap, type ComputedValue, 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_COLOR_SPACE, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, 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 GlyphComponent, type GlyphSource, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, 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 PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, 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 RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedSource, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, 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 SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, 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, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, 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, tablerExportName, toCssPropertyName, tokenBinding, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
107
+ export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, 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 CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, 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, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type ComputedFields, type ComputedFunctions, type ComputedInput, type ComputedMap, type ComputedValue, 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_COLOR_SPACE, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, 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 GlyphComponent, type GlyphSource, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, 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 PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, 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 RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, 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 SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenGroupReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, Tool, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, 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, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, 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, tablerExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@ import { CapturedNode, capturedFromDom, elementFromCaptured } from "./capture/ca
3
3
  import { ENTITY_PATH_MESSAGE, MINTED, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, refTo, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
4
4
  import { VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
5
5
  import { BUILD_DEFAULTS } from "./configs/build-options.js";
6
+ import { resolveValueType, sniffValueType } from "./css/value-type.js";
7
+ import { parseRootFontSize } from "./css/root-font-size.js";
6
8
  import { CONFIG_OPERATION_KIND } from "./framework/config-operation-kind.js";
7
9
  import { ConfigFormatError, ConfigRejection, isConfigFormatError, isConfigRejection } from "./framework/rejection.js";
8
10
  import { describePatch } from "./framework/plan.js";
@@ -22,6 +24,7 @@ import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCs
22
24
  import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
23
25
  import { Composite } from "./entities/system/Composite.js";
24
26
  import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
27
+ import { isIdentifier, isReservedWord } from "./framework/utils/identifier.js";
25
28
  import { STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
26
29
  import { createSliceMemo } from "./framework/memo.js";
27
30
  import { UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
@@ -33,6 +36,8 @@ import { ANATOMY_MARKER, anatomyElementComponent, anatomyTextProp, boundElementT
33
36
  import { instanceHolding } from "./spec/instance.js";
34
37
  import { Package } from "./entities/system/Package.js";
35
38
  import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
39
+ import { TOKEN_READERS, rootFontSize, tokenExists, tokenValueRow, tokenValueRows } from "./entities/system/token-values.js";
40
+ import { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
36
41
  import { Component, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
37
42
  import { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
38
43
  import { classGrammar } from "./capture/class-grammar.js";
@@ -69,7 +74,6 @@ import { planCopy, sourceEntries } from "./entities/system/copy-plan.js";
69
74
  import { planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
70
75
  import { LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug } from "./entities/system/LinkedSystem.js";
71
76
  import { Motion } from "./entities/system/Motion.js";
72
- import { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
73
77
  import { danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
74
78
  import { System } from "./configs/system.js";
75
79
  import { AiChat, AiFlow, AiGeneration, AiMessage, Canvas, CanvasConfig, Node, Page, SystemSource, createCanvasConfig } from "./configs/CanvasConfig.js";
@@ -81,7 +85,6 @@ import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
81
85
  import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
82
86
  import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
83
87
  import { ReactNativeSystem } from "./configs/react-native-system.js";
84
- import { resolveValueType, sniffValueType } from "./css/value-type.js";
85
88
  import { defineComponent } from "./entities/system/defineComponent.js";
86
89
  import { declaredRuntimeModules } from "./entities/system/runtime-modules.js";
87
90
  import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
@@ -95,4 +98,4 @@ import { inferredRenames } from "./framework/rename-inference.js";
95
98
  import { ConfigSession, memoryConfigSource } from "./framework/session.js";
96
99
  import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
97
100
  import { validateSpec } from "./framework/validate-spec.js";
98
- export { AI_LANES, ANATOMY_MARKER, 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, CapturedNode, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, Device, Documentation, DocumentationLibrary, 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, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, 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, tablerExportName, toCssPropertyName, tokenBinding, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
101
+ export { AI_LANES, ANATOMY_MARKER, 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, CapturedNode, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, Device, Documentation, DocumentationLibrary, 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, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, TOKEN_READERS, Token, Tool, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, 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, tablerExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
@@ -1,5 +1,5 @@
1
- import generate from "css-tree/generator";
2
1
  import parse from "css-tree/parser";
2
+ import generate from "css-tree/generator";
3
3
  import { tokenTypes, tokenize } from "css-tree/tokenizer";
4
4
  //#region src/migrations/2.0.0/raw-css.ts
5
5
  function parseRawCss(css) {
@@ -17,8 +17,8 @@ import { cellAt } from "../../spec/cell.js";
17
17
  import { instanceAt } from "../../spec/instance.js";
18
18
  import { ComposedValue } from "../../entities/system/composed-values.js";
19
19
  import { StyleValue } from "../../entities/system/style-bag.js";
20
+ import { OverrideCondition, TokenRefPath, TokenReference } from "../../entities/system/Token.js";
20
21
  import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../../entities/system/Component.js";
21
- import { OverrideCondition } from "../../entities/system/Token.js";
22
22
  import { DocumentRename } from "../../spec/rewrite-refs.js";
23
23
  import * as _$zod from "zod";
24
24
  import * as _$zod_v4_core0 from "zod/v4/core";
@@ -222,6 +222,7 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
222
222
  }, _$zod_v4_core0.$strict>]>>;
223
223
  scope: _$zod.ZodOptional<_$zod.ZodString>;
224
224
  preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
225
+ rem: _$zod.ZodOptional<_$zod.ZodString>;
225
226
  safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
226
227
  }, _$zod_v4_core0.$strict>>;
227
228
  playground: _$zod.ZodOptional<_$zod.ZodObject<{
@@ -229,7 +230,7 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
229
230
  port: _$zod.ZodOptional<_$zod.ZodNumber>;
230
231
  }, _$zod_v4_core0.$strict>>;
231
232
  }, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "settings", Record<never, never>, Record<never, never>, true, Record<never, never>, Record<never, never>>;
232
- tokens: EntityClass<_$zod.ZodObject<{
233
+ tokens: Omit<EntityClass<_$zod.ZodObject<{
233
234
  value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
234
235
  type: _$zod.ZodOptional<_$zod.ZodString>;
235
236
  overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
@@ -242,7 +243,9 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
242
243
  readonly create: {
243
244
  readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
244
245
  };
245
- }, Record<never, never>, false, Record<never, never>, Record<never, never>>;
246
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
247
+ readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
248
+ };
246
249
  components: Omit<EntityClass<_$zod.ZodObject<{
247
250
  layers: SubEntityClass<_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>, EntityClass<_$zod.ZodObject<{
248
251
  version: _$zod.ZodOptional<_$zod.ZodString>;
@@ -411,6 +414,22 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
411
414
  __ref: _$zod.ZodString;
412
415
  }, _$zod_v4_core0.$strip>>;
413
416
  export: _$zod.ZodOptional<_$zod.ZodString>;
417
+ tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
418
+ value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
419
+ type: _$zod.ZodOptional<_$zod.ZodString>;
420
+ overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
421
+ on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
422
+ value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
423
+ }, _$zod_v4_core0.$strip>>>;
424
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
425
+ cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
426
+ }, _$zod_v4_core0.$strip>, "token", {
427
+ readonly create: {
428
+ readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
429
+ };
430
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
431
+ readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
432
+ }>>;
414
433
  }, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
415
434
  icon: _$zod.ZodOptional<_$zod.ZodString>;
416
435
  }, _$zod_v4_core0.$strip>, "component", {
@@ -583,6 +602,22 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
583
602
  __ref: _$zod.ZodString;
584
603
  }, _$zod_v4_core0.$strip>>;
585
604
  export: _$zod.ZodOptional<_$zod.ZodString>;
605
+ tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
606
+ value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
607
+ type: _$zod.ZodOptional<_$zod.ZodString>;
608
+ overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
609
+ on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
610
+ value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
611
+ }, _$zod_v4_core0.$strip>>>;
612
+ }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
613
+ cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
614
+ }, _$zod_v4_core0.$strip>, "token", {
615
+ readonly create: {
616
+ readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
617
+ };
618
+ }, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
619
+ readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
620
+ }>>;
586
621
  }, _$zod_v4_core0.$strict>;
587
622
  readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
588
623
  readonly example: ({
@@ -1631,8 +1666,8 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
1631
1666
  }, _$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>>>]>;
1632
1667
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
1633
1668
  type: _$zod.ZodOptional<_$zod.ZodEnum<{
1634
- state: "state";
1635
1669
  mode: "mode";
1670
+ state: "state";
1636
1671
  }>>;
1637
1672
  default: _$zod.ZodOptional<_$zod.ZodObject<{
1638
1673
  __ref: _$zod.ZodString;
@@ -6,6 +6,7 @@ import { Composite } from "../../entities/system/Composite.js";
6
6
  import { Modifier } from "../../entities/system/Modifier.js";
7
7
  import { StyleProperty } from "../../entities/system/StyleProperty.js";
8
8
  import { cssVar } from "../../framework/projections.js";
9
+ import { Token, overrideKey } from "../../entities/system/Token.js";
9
10
  import { Component, canonicalWhen } from "../../entities/system/Component.js";
10
11
  import { Icon } from "../../entities/system/Icon.js";
11
12
  import { stableStringify } from "../../framework/utils/content-key.js";
@@ -13,7 +14,6 @@ import { CanvasRole } from "../../entities/system/CanvasRole.js";
13
14
  import { GlobalStyle, globalStyleName } from "../../entities/system/GlobalStyle.js";
14
15
  import { Guidance } from "../../entities/system/Guidance.js";
15
16
  import { Motion } from "../../entities/system/Motion.js";
16
- import { Token, overrideKey } from "../../entities/system/Token.js";
17
17
  import { danglingLocalRefs } from "../../framework/ref-integrity.js";
18
18
  import { parseRawCss } from "./raw-css.js";
19
19
  import { System } from "../../configs/system.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A stored component gains `tokenRefs`: the tokens its render reads as values
3
+ * (`Token.ref('spacing/2.5').px()`), baked from the source the way `file` is. Each is an ordinary
4
+ * ref, so the graph sees the read: a rename reaches it, a delete names the component, and a link's
5
+ * closure carries the token. The `css` settings gain `rem`, the page's root font size as CSS. A
6
+ * component or settings stored before this version has neither and means what it meant.
7
+ *
8
+ * Additive; nothing stored before this version reshapes.
9
+ *
10
+ * Deletable once no stored artifact predates it.
11
+ */
12
+ import type { SchemaMigration } from '../framework/schema-version';
13
+ export declare const RENDER_TOKEN_REFS_VERSION = 20260923160425;
14
+ export declare const renderTokenRefsMigration: SchemaMigration;