@yahoo/uds-create-config 4.26.0 → 4.26.2

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.
@@ -8,7 +8,7 @@ import { defineSubEntity } from "../../framework/defineSubEntity.js";
8
8
  import { derivedColor, gradient } from "./color.js";
9
9
  import { listedIn } from "../../framework/utils/enumerated.js";
10
10
  import { valueSchemaOf } from "../../framework/value-domain.js";
11
- import { glyphLeafOf } from "./glyph-identity.js";
11
+ import { bindPreviewGlyphs, glyphLeafOf } from "./glyph-identity.js";
12
12
  import { Style, addBagKeyIssues, anatomyPropValue, bagNameEdges, bagRewriteName, bindBagTokens, collectBag, isPlainRecord, openBag, styleValue } from "./style-bag.js";
13
13
  import { storedPreview } from "../../framework/preview-store.js";
14
14
  import { glyphPropsOf, propValueDomain, refListOf, resolveComponentProps, stylePropValueLeaves, validateComponentProps } from "../../framework/projections.js";
@@ -985,7 +985,10 @@ const Preview = defineSubEntity({
985
985
  for (const [name, decl] of Object.entries(body.props ?? {})) when[name] = conditionValue(name, decl, config).optional();
986
986
  return z.strictObject({
987
987
  when: z.strictObject(when, { error: previewShapeError }).nullable().default(null),
988
- props: z.record(z.string(), z.unknown())
988
+ props: z.record(z.string(), z.unknown()).transform((props) => bindPreviewGlyphs({
989
+ config,
990
+ props
991
+ }))
989
992
  }, { error: previewShapeError });
990
993
  }
991
994
  });
@@ -1,6 +1,6 @@
1
1
  import { isRef, pathOf } from "../../framework/utils/refs.js";
2
2
  import { defineEntity } from "../../framework/defineEntity.js";
3
- import { glyphOfLibrary, recordGlyphIdentities } from "./glyph-identity.js";
3
+ import { glyphOfLibrary, libraryGlyphFacts, recordGlyphIdentities } from "./glyph-identity.js";
4
4
  import { Package } from "./Package.js";
5
5
  import { iconDomainInvariants } from "./icon-domain-invariants.js";
6
6
  import { iconMemberMetadata, iconMetadataDeclaration } from "./icon-metadata.js";
@@ -93,15 +93,11 @@ glyphs: ({ input, body }) => {
93
93
  * open-bag pass turned it into. Either is answered as the member name when the export is one of
94
94
  * this library's and comes from the module its `package` names.
95
95
  */
96
- authoredValue: ({ config, target, leaves }) => {
97
- const meta = config.configFor(target)?.groupMeta("icon", pathOf(target));
98
- const module = isRef(meta?.package) ? pathOf(meta.package) : void 0;
99
- return glyphOfLibrary({
100
- library: pathOf(target),
101
- module,
102
- leaves
103
- });
104
- },
96
+ authoredValue: ({ config, target, leaves }) => glyphOfLibrary(libraryGlyphFacts({
97
+ config,
98
+ target,
99
+ leaves
100
+ })),
105
101
  invariants: (config) => iconDomainInvariants(config)
106
102
  });
107
103
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { canonicalCondition, isRef, kindOf, memberRef, pathOf } from "../../framework/utils/refs.js";
2
- import { isComponentType } from "./glyph-identity.js";
2
+ import { glyphIdentityOf, glyphPackageRefOf, isComponentType } from "./glyph-identity.js";
3
3
  import "../../framework/preview-store.js";
4
4
  import { Component, canonicalWhen, layerRef } from "./Component.js";
5
5
  //#region src/entities/system/defineComponent.ts
@@ -46,13 +46,10 @@ function build(body) {
46
46
  * this runs when a config is registered, and a reader can't tell which made the config it holds.
47
47
  *
48
48
  * A component handed as a value (`icon: PlusIcon`) stores as the bare ref the registry keys it under,
49
- * so the receiving component gets the component back rather than a node.
50
- *
51
- * OPEN: a foreign component (a Phosphor glyph) is dropped. Its export is known once its library has
52
- * handed `register` its namespace (`glyphIdentityOf`), but a preview entry's props are stored open
53
- * (`Preview.fields`) and never re-bound to a member, so a ref written here would reach the build as
54
- * a package export the package row never lists. An absent default renders nothing; the build fills
55
- * the prop from the import specifier (`extractPreviewProps`).
49
+ * so the receiving component gets the component back rather than a node. A glyph of a registered
50
+ * library stores as its package export, and the owner-bound pass (`Preview.fields`) binds that to
51
+ * the library member, the spelling the build writes. A component neither side can name is dropped:
52
+ * an absent default renders nothing, where a guessed ref would render the wrong thing.
56
53
  */
57
54
  function storableProps(props) {
58
55
  if (props === void 0) return void 0;
@@ -68,9 +65,13 @@ function storableProps(props) {
68
65
  function isReactElement(value) {
69
66
  return typeof value === "object" && value !== null && "$$typeof" in value && "props" in value;
70
67
  }
71
- /** A component handed as a value, as the ref that names it — `undefined` for one this path can't name. */
68
+ /** A component handed as a value, as the ref that names it: a component of this system under its
69
+ * path, a glyph a library handed `register` as its package export. `undefined` for one neither
70
+ * names. */
72
71
  function storableComponentRef(value) {
73
- return isComponentElement(value) && value.path ? Component.ref(value.path) : void 0;
72
+ if (isComponentElement(value) && value.path) return Component.ref(value.path);
73
+ const identity = glyphIdentityOf(value);
74
+ return identity ? glyphPackageRefOf(identity) : void 0;
74
75
  }
75
76
  const FRAGMENT = Symbol.for("react.fragment");
76
77
  /**
@@ -99,6 +99,25 @@ const glyphPackageRef = z.custom(isComponentType).transform((value, ctx) => {
99
99
  });
100
100
  glyphPackageRef._zod.toJSONSchema = () => ({ not: {} });
101
101
  /**
102
+ * The facts for the library a target names. `target` is the library's ref (`icon:phosphor`, with a
103
+ * source qualifier for a borrowed set), whose config answers for its `package`. `leaves` may be
104
+ * handed in by a domain that has already expanded them.
105
+ */
106
+ function libraryGlyphFacts({ config, target, leaves = memberLeaves(config, target) }) {
107
+ const library = pathOf(target);
108
+ const named = (config.configFor(target)?.groupMeta("icon", library))?.package;
109
+ return {
110
+ library,
111
+ module: isRef(named) ? pathOf(named) : void 0,
112
+ leaves
113
+ };
114
+ }
115
+ /** Whether a library ships a glyph: the identity's specifier is the library's package and its name
116
+ * is one of the members. */
117
+ function libraryClaims(facts, identity) {
118
+ return facts.module === identity.specifier && facts.leaves.includes(identity.name);
119
+ }
120
+ /**
102
121
  * The owner-bound form of a glyph for one library: a component or its `package:` ref, answered as
103
122
  * the member name so the domain binds it like a written leaf. Refused, naming the reason, when the
104
123
  * export belongs to another module than the library draws from or is not one of its members.
@@ -138,16 +157,42 @@ function glyphOfLibrary({ library, module, leaves }) {
138
157
  * so a glyph of a library the key does not reach says so.
139
158
  */
140
159
  function glyphLeafOf({ config, libraries }) {
141
- const arms = libraries.map((library) => {
142
- const named = config.groupMeta("icon", library)?.package;
143
- return glyphOfLibrary({
144
- library,
145
- module: isRef(named) ? pathOf(named) : void 0,
146
- leaves: memberLeaves(config, `icon:${library}`)
147
- });
148
- });
160
+ const arms = libraries.map((library) => glyphOfLibrary(libraryGlyphFacts({
161
+ config,
162
+ target: `icon:${library}`
163
+ })));
149
164
  if (arms.length === 1) return arms[0];
150
165
  return z.union(arms);
151
166
  }
167
+ /** `icon:<library>/<name>` for a glyph identity a library of this config claims; `undefined` when
168
+ * none does. */
169
+ function glyphMemberRefOf(config, identity) {
170
+ for (const { path } of config.groups("icon")) if (libraryClaims(libraryGlyphFacts({
171
+ config,
172
+ target: `icon:${path}`
173
+ }), identity)) return { __ref: `icon:${path}/${identity.name}` };
174
+ }
175
+ /**
176
+ * Preview props with every glyph bound to its library member.
177
+ *
178
+ * A glyph handed under `.preview()` is stored open as the package export it is
179
+ * (`package:<specifier>#<name>`), since the props there are not each bound to a declared prop the
180
+ * way `defaultProps` are. Once an owner is known, this pass binds each such ref to
181
+ * `icon:<library>/<name>` through the library whose package ships it, at the top level and inside a
182
+ * stored element's props, which is the spelling the build writes when it reads `.preview()` from
183
+ * source. A `package:` ref no library claims is another package's export and stays as written.
184
+ */
185
+ function bindPreviewGlyphs({ config, props }) {
186
+ const bind = (value) => {
187
+ if (typeof value !== "object" || value === null) return value;
188
+ if (Array.isArray(value)) return value.map(bind);
189
+ const identity = glyphIdentityOfRef(value);
190
+ if (identity) return glyphMemberRefOf(config, identity) ?? value;
191
+ const out = {};
192
+ for (const [key, member] of Object.entries(value)) out[key] = bind(member);
193
+ return out;
194
+ };
195
+ return bind(props);
196
+ }
152
197
  //#endregion
153
- export { glyphLeafOf, glyphOfLibrary, glyphPackageRef, isComponentType, recordGlyphIdentities };
198
+ export { bindPreviewGlyphs, glyphIdentityOf, glyphLeafOf, glyphOfLibrary, glyphPackageRef, glyphPackageRefOf, isComponentType, libraryGlyphFacts, recordGlyphIdentities };
@@ -0,0 +1,97 @@
1
+ import { Config } from "./Config.js";
2
+ import { BindingKind } from "./prop-surface.js";
3
+
4
+ //#region src/framework/bindings.d.ts
5
+ /** Which marker a value is, by the key that makes it one. */
6
+ type MarkerKind = 'state' | 'bindState' | 'cond' | 'item' | 'index' | 'computed' | 'template' | 'other';
7
+ /**
8
+ * The marker a value is, or `undefined` for a literal. A record with any other `$`-prefixed key is
9
+ * `other`: a directive this module can name but not settle.
10
+ */
11
+ declare function markerKind(value: unknown): MarkerKind | undefined;
12
+ /** Whether a value reads state anywhere, however deep: a `$state` or `$bindState`, in a prop value or
13
+ * in a condition. */
14
+ declare function readsState(value: unknown): boolean;
15
+ /** The state path a `$state` or `$bindState` reads, as written, or `undefined` for any other value. */
16
+ declare function bindingPath(value: unknown): string | undefined;
17
+ /** A `$cond` value's parts, or `undefined` for any other value. */
18
+ declare function condArms(value: unknown): {
19
+ when: unknown;
20
+ ifTrue: unknown;
21
+ ifFalse: unknown;
22
+ } | undefined;
23
+ /** Whether a marker sits anywhere in a value, however deep. */
24
+ declare function containsMarker(value: unknown): boolean;
25
+ /** A value settled against a prop state, or the fact that it could not be. */
26
+ type ResolvedBinding = {
27
+ readonly resolved: true;
28
+ readonly value: unknown;
29
+ } | {
30
+ readonly resolved: false;
31
+ };
32
+ /**
33
+ * A value settled against `state`, the whole prop state of the instance being read: its defaults,
34
+ * overrides and cell coordinate.
35
+ *
36
+ * A `$state` or `$bindState` reads the state, and a prop the state lacks reads `undefined`. A
37
+ * `$cond` settles only when its condition reads props the state holds, since a capture can key a
38
+ * condition on a seed no prop state carries, and reading that seed as `undefined` would pick a
39
+ * branch the render never paints. Only the branch taken has to settle. Any other directive, and
40
+ * `$template` in particular, which interpolates an unread path to `''`, stays unresolved.
41
+ */
42
+ declare function resolveBinding(value: unknown, state: Record<string, unknown>): ResolvedBinding;
43
+ /** A read of one prop: `{ $state: '/tone' }`. */
44
+ declare function stateRef(prop: string): {
45
+ $state: string;
46
+ };
47
+ /** A two-way read of one state key, for a control that writes it back: `{ $bindState: '/open' }`. */
48
+ declare function bindStateRef(key: string): {
49
+ $bindState: string;
50
+ };
51
+ /**
52
+ * A test of one prop, in the grammar `visible` and `$cond` share: truthy, or equal to a value, and
53
+ * negated with `not`. Naming `eq` makes it a comparison even when its value is `undefined`.
54
+ */
55
+ declare function stateTest(test: {
56
+ prop: string;
57
+ eq?: unknown;
58
+ not?: boolean;
59
+ }): Record<string, unknown>;
60
+ /** A value chosen by a condition: `{ $cond, $then, $else }`. */
61
+ declare function condValue({
62
+ when,
63
+ ifTrue,
64
+ ifFalse
65
+ }: {
66
+ when: unknown;
67
+ ifTrue: unknown;
68
+ ifFalse: unknown;
69
+ }): {
70
+ $cond: unknown;
71
+ $then: unknown;
72
+ $else: unknown;
73
+ };
74
+ /** The component prop that drives one of a layer's props, and how it gets there. */
75
+ interface LayerPropDriver {
76
+ /** The component prop, without a pointer slash. */
77
+ readonly prop: string;
78
+ /** A declared forward, or a binding the render recorded. */
79
+ readonly kind: BindingKind;
80
+ /** For a render binding, the anatomy node it sits on, which is what clearing it edits. */
81
+ readonly node?: string;
82
+ }
83
+ /**
84
+ * Every prop of `layer` a component prop drives, keyed by the layer prop. A declared forward wins
85
+ * where a render binding names the same layer prop.
86
+ */
87
+ declare function layerPropDrivers({
88
+ config,
89
+ path,
90
+ layer
91
+ }: {
92
+ config: Config;
93
+ path: string;
94
+ layer: string;
95
+ }): Record<string, LayerPropDriver>;
96
+ //#endregion
97
+ export { LayerPropDriver, MarkerKind, ResolvedBinding, bindStateRef, bindingPath, condArms, condValue, containsMarker, layerPropDrivers, markerKind, readsState, resolveBinding, stateRef, stateTest };
@@ -0,0 +1,173 @@
1
+ import { isExpression, readStatePointer, resolveVisibility, slotTargetsOf, valueForwardsOf } from "./render-spec.js";
2
+ import { renderBindingsOf } from "./prop-surface.js";
3
+ //#region src/framework/bindings.ts
4
+ const KIND_BY_KEY = [
5
+ ["$bindState", "bindState"],
6
+ ["$cond", "cond"],
7
+ ["$computed", "computed"],
8
+ ["$template", "template"],
9
+ ["$item", "item"],
10
+ ["$index", "index"],
11
+ ["$state", "state"]
12
+ ];
13
+ function isRecord(value) {
14
+ return typeof value === "object" && value !== null && !Array.isArray(value);
15
+ }
16
+ /**
17
+ * The marker a value is, or `undefined` for a literal. A record with any other `$`-prefixed key is
18
+ * `other`: a directive this module can name but not settle.
19
+ */
20
+ function markerKind(value) {
21
+ if (!isRecord(value)) return void 0;
22
+ for (const [key, kind] of KIND_BY_KEY) if (key in value) return kind;
23
+ return Object.keys(value).some((key) => key.startsWith("$")) ? "other" : void 0;
24
+ }
25
+ /** Whether a value reads state anywhere, however deep: a `$state` or `$bindState`, in a prop value or
26
+ * in a condition. */
27
+ function readsState(value) {
28
+ if (Array.isArray(value)) return value.some(readsState);
29
+ if (!isRecord(value)) return false;
30
+ if ("$state" in value || "$bindState" in value) return true;
31
+ return Object.values(value).some(readsState);
32
+ }
33
+ /** The state path a `$state` or `$bindState` reads, as written, or `undefined` for any other value. */
34
+ function bindingPath(value) {
35
+ if (!isRecord(value)) return void 0;
36
+ const kind = markerKind(value);
37
+ const path = kind === "state" ? value.$state : kind === "bindState" ? value.$bindState : void 0;
38
+ return typeof path === "string" ? path : void 0;
39
+ }
40
+ /** A `$cond` value's parts, or `undefined` for any other value. */
41
+ function condArms(value) {
42
+ if (!isRecord(value) || markerKind(value) !== "cond") return void 0;
43
+ if (!Object.hasOwn(value, "$then") || !Object.hasOwn(value, "$else")) return;
44
+ return {
45
+ when: value.$cond,
46
+ ifTrue: value.$then,
47
+ ifFalse: value.$else
48
+ };
49
+ }
50
+ /** Whether a marker sits anywhere in a value, however deep. */
51
+ function containsMarker(value) {
52
+ if (Array.isArray(value)) return value.some(containsMarker);
53
+ if (!isRecord(value)) return false;
54
+ if (isExpression(value) || markerKind(value) !== void 0) return true;
55
+ return Object.values(value).some(containsMarker);
56
+ }
57
+ const UNRESOLVED = { resolved: false };
58
+ /**
59
+ * A value settled against `state`, the whole prop state of the instance being read: its defaults,
60
+ * overrides and cell coordinate.
61
+ *
62
+ * A `$state` or `$bindState` reads the state, and a prop the state lacks reads `undefined`. A
63
+ * `$cond` settles only when its condition reads props the state holds, since a capture can key a
64
+ * condition on a seed no prop state carries, and reading that seed as `undefined` would pick a
65
+ * branch the render never paints. Only the branch taken has to settle. Any other directive, and
66
+ * `$template` in particular, which interpolates an unread path to `''`, stays unresolved.
67
+ */
68
+ function resolveBinding(value, state) {
69
+ if (Array.isArray(value)) {
70
+ const out = [];
71
+ for (const entry of value) {
72
+ const inner = resolveBinding(entry, state);
73
+ if (!inner.resolved) return UNRESOLVED;
74
+ out.push(inner.value);
75
+ }
76
+ return {
77
+ resolved: true,
78
+ value: out
79
+ };
80
+ }
81
+ if (!isRecord(value)) return {
82
+ resolved: true,
83
+ value
84
+ };
85
+ const kind = markerKind(value);
86
+ const directives = Object.keys(value).filter((key) => key.startsWith("$"));
87
+ if (kind === void 0) {
88
+ const out = {};
89
+ for (const [key, member] of Object.entries(value)) {
90
+ const inner = resolveBinding(member, state);
91
+ if (!inner.resolved) return UNRESOLVED;
92
+ out[key] = inner.value;
93
+ }
94
+ return {
95
+ resolved: true,
96
+ value: out
97
+ };
98
+ }
99
+ if (kind === "cond") {
100
+ if (directives.some((key) => !COND_KEYS.has(key))) return UNRESOLVED;
101
+ const holds = resolveVisibility(value.$cond, state, { seededOnly: true });
102
+ if (holds === void 0) return UNRESOLVED;
103
+ return resolveBinding(holds ? value.$then : value.$else, state);
104
+ }
105
+ if (directives.length !== 1) return UNRESOLVED;
106
+ const pointer = kind === "state" ? value.$state : value.$bindState;
107
+ if (kind !== "state" && kind !== "bindState" || typeof pointer !== "string") return UNRESOLVED;
108
+ return {
109
+ resolved: true,
110
+ value: readStatePointer(state, pointer)
111
+ };
112
+ }
113
+ const COND_KEYS = new Set([
114
+ "$cond",
115
+ "$then",
116
+ "$else"
117
+ ]);
118
+ /** The JSON pointer json-render reads a prop by: `/tone`. */
119
+ function pointerTo(prop) {
120
+ return prop.startsWith("/") ? prop : `/${prop}`;
121
+ }
122
+ /** A read of one prop: `{ $state: '/tone' }`. */
123
+ function stateRef(prop) {
124
+ return { $state: pointerTo(prop) };
125
+ }
126
+ /** A two-way read of one state key, for a control that writes it back: `{ $bindState: '/open' }`. */
127
+ function bindStateRef(key) {
128
+ return { $bindState: pointerTo(key) };
129
+ }
130
+ /**
131
+ * A test of one prop, in the grammar `visible` and `$cond` share: truthy, or equal to a value, and
132
+ * negated with `not`. Naming `eq` makes it a comparison even when its value is `undefined`.
133
+ */
134
+ function stateTest(test) {
135
+ return {
136
+ ...stateRef(test.prop),
137
+ ...Object.hasOwn(test, "eq") ? { eq: test.eq } : {},
138
+ ...test.not ? { not: true } : {}
139
+ };
140
+ }
141
+ /** A value chosen by a condition: `{ $cond, $then, $else }`. */
142
+ function condValue({ when, ifTrue, ifFalse }) {
143
+ return {
144
+ $cond: when,
145
+ $then: ifTrue,
146
+ $else: ifFalse
147
+ };
148
+ }
149
+ /**
150
+ * Every prop of `layer` a component prop drives, keyed by the layer prop. A declared forward wins
151
+ * where a render binding names the same layer prop.
152
+ */
153
+ function layerPropDrivers({ config, path, layer }) {
154
+ const out = {};
155
+ for (const route of [...slotTargetsOf(config, path), ...valueForwardsOf(config, path)]) {
156
+ if (route.layer !== layer || route.into in out) continue;
157
+ out[route.into] = {
158
+ prop: route.from,
159
+ kind: "forward"
160
+ };
161
+ }
162
+ for (const route of renderBindingsOf(config, path)) {
163
+ if (route.layer !== layer || route.into in out) continue;
164
+ out[route.into] = {
165
+ prop: route.from,
166
+ kind: "render",
167
+ ...route.node !== void 0 ? { node: route.node } : {}
168
+ };
169
+ }
170
+ return out;
171
+ }
172
+ //#endregion
173
+ export { bindStateRef, bindingPath, condArms, condValue, containsMarker, layerPropDrivers, markerKind, readsState, resolveBinding, stateRef, stateTest };
@@ -1,5 +1,5 @@
1
1
  import { isRef, kindOf, memberOf, pathOf, ref, refLeaf, sourceOf, splitRef } from "./utils/refs.js";
2
- import { forwardedPropName, forwardsOf } from "../entities/system/element.js";
2
+ import { forwardedPropName, forwardsOf, rootLayerOf } from "../entities/system/element.js";
3
3
  import { classPrefixOf, varPrefixOf } from "../entities/system/Settings.js";
4
4
  import { isComposedValue, renderComposedValue } from "../entities/system/composed-values.js";
5
5
  import { fontFamilyStack } from "../entities/system/Font.js";
@@ -973,6 +973,13 @@ function glyphPropsOfBody({ config, body, seen = /* @__PURE__ */ new Set() }) {
973
973
  const libraries = glyphPropsOf(config, receiver, seen)[forwardIntoName(declaration.into, prop)];
974
974
  if (libraries) out[prop] = libraries;
975
975
  }
976
+ const [, rootElement] = rootLayerOf(layers);
977
+ if (isRef(rootElement) && kindOf(rootElement) === "component") {
978
+ const root = pathOf(rootElement);
979
+ if (!seen.has(root)) {
980
+ for (const [prop, libraries] of Object.entries(glyphPropsOf(config, root, seen))) if (!(prop in props) && !(prop in out)) out[prop] = libraries;
981
+ }
982
+ }
976
983
  return out;
977
984
  }
978
985
  function iconToolOf(config) {
@@ -67,6 +67,10 @@ interface ResolveContext {
67
67
  * left for the renderer (and where fill routing reads it); on inside a `$computed`'s arguments
68
68
  * and a repeat's source, which have to be values before the call. */
69
69
  readonly settle?: boolean;
70
+ /** Read a `$state` only when the bag holds its prop. A condition a capture keyed on a seed no prop
71
+ * state carries would otherwise read that seed as `undefined` and pick a branch the render never
72
+ * takes. */
73
+ readonly seededOnly?: boolean;
70
74
  }
71
75
  /**
72
76
  * The registry key of an element rendered THROUGH a package factory — `motion.create(Box)`, spelled
@@ -578,7 +578,10 @@ const UNREADABLE = Symbol("unreadable");
578
578
  * `$index` read the row of a repeated node; outside one they read nothing.
579
579
  */
580
580
  function readBinding(test, state, context) {
581
- if (typeof test.$state === "string") return readStatePointer(state, test.$state);
581
+ if (typeof test.$state === "string") {
582
+ if (context.seededOnly && !Object.hasOwn(state, statePointerProp(test.$state))) return UNREADABLE;
583
+ return readStatePointer(state, test.$state);
584
+ }
582
585
  if (typeof test.$item === "string") {
583
586
  if (!context.row) return UNREADABLE;
584
587
  if (test.$item === "") return context.row.item;
@@ -1422,4 +1425,4 @@ function expandComponent(config, path, props = {}, options = {}) {
1422
1425
  return expandSpec(config, instanceSpec(path, props), options);
1423
1426
  }
1424
1427
  //#endregion
1425
- export { ANATOMY_MARKER, anatomyElementComponent, anatomyTextProp, andListOf, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, layerTextProp, liveStateProps, previewSpec, propInto, propsIntoLayer, readStatePointer, resolveValue, resolveVisibility, routeOf, slotAnatomyPropOf, slotTargetsOf, specWithResolvedVisibility, spelled, statePointerProp, valueForwardsOf, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
1428
+ export { ANATOMY_MARKER, anatomyElementComponent, anatomyTextProp, andListOf, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, isExpression, layerTextProp, liveStateProps, previewSpec, propInto, propsIntoLayer, readStatePointer, resolveValue, resolveVisibility, routeOf, slotAnatomyPropOf, slotTargetsOf, specWithResolvedVisibility, spelled, statePointerProp, valueForwardsOf, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
package/dist/index.d.ts CHANGED
@@ -81,6 +81,7 @@ import { BuildSection, CSS_DEFAULTS, CssPrefix, CssSection, PLAYGROUND_DEFAULTS,
81
81
  import { Tool } from "./entities/system/Tool.js";
82
82
  import { TokenBinding, TokenMatch, matchTokens, searchTokens, tokenBinding } from "./entities/system/token-index.js";
83
83
  import { AnatomyIssue, AnatomyIssueKind, AnatomyReport, DiffOptions, RenderedNode, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, anatomyIssueKey, diffRendered, normalizeStyleValue, renderedSignatureOf, snapshotHtml } from "./framework/anatomy-check.js";
84
+ import { LayerPropDriver, MarkerKind, ResolvedBinding, bindStateRef, bindingPath, condArms, condValue, containsMarker, layerPropDrivers, markerKind, readsState, resolveBinding, stateRef, stateTest } from "./framework/bindings.js";
84
85
  import { ChangeHook, runChangeHooks } from "./framework/change-hooks.js";
85
86
  import { Change, ChangeTarget, baseOf, changeOf, changeValueAt, changesOf, describeBody, summarizeChanges } from "./framework/changes.js";
86
87
  import { ComponentRuleClass, SplitStyleProps, componentClassBase, componentCompositeClasses, componentLayerClass, componentMotionClasses, componentPropClasses, componentRuleClasses, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, isForceModeProp, kebabComponent, layerRoutedProps, modifierUtilitiesUsed, motionClassName, ruleCondition, splitStyleProps, stylePropClassBase, stylePropClassName, stylePropClasses, styleRuleMotionClasses } from "./framework/class-names.js";
@@ -104,4 +105,4 @@ import { SpecNode, validateSpec } from "./framework/validate-spec.js";
104
105
  import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
105
106
  import { views } from "./framework/views-facade.js";
106
107
  import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
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 BindingKind, 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 CodeSlot, 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 GlyphValue, 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, type PropRoute, 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, SLOT_CODE_FORMS, 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 SlotCodeForm, type SlotDecl, 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, codeSlotsOf, 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, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropRoutes, 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, renderBindingsOf, 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, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, 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 };
108
+ 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 BindingKind, 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 CodeSlot, 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 GlyphValue, 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 LayerPropDriver, 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 MarkerKind, 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, type PropRoute, 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 ResolvedBinding, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, 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 SlotCodeForm, type SlotDecl, 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, bindStateRef, bindingPath, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, 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, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, markerKind, 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, readsState, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveBinding, 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, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, statePointerProp, stateRef, stateTest, 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
@@ -90,6 +90,7 @@ import { declaredRuntimeModules } from "./entities/system/runtime-modules.js";
90
90
  import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
91
91
  import { matchTokens, searchTokens, tokenBinding } from "./entities/system/token-index.js";
92
92
  import { SIZE_TOLERANCE_PX, STYLE_PROPERTIES, anatomyIssueKey, diffRendered, normalizeStyleValue, renderedSignatureOf, snapshotHtml } from "./framework/anatomy-check.js";
93
+ import { bindStateRef, bindingPath, condArms, condValue, containsMarker, layerPropDrivers, markerKind, readsState, resolveBinding, stateRef, stateTest } from "./framework/bindings.js";
93
94
  import { runChangeHooks } from "./framework/change-hooks.js";
94
95
  import { baseOf, changeOf, changeValueAt, changesOf, describeBody, summarizeChanges } from "./framework/changes.js";
95
96
  import { DERIVED_MUTATIONS } from "./framework/derived-mutations.js";
@@ -98,4 +99,4 @@ import { inferredRenames } from "./framework/rename-inference.js";
98
99
  import { ConfigSession, memoryConfigSource } from "./framework/session.js";
99
100
  import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
100
101
  import { validateSpec } from "./framework/validate-spec.js";
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, SLOT_CODE_FORMS, 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, codeSlotsOf, 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, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropRoutes, 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, renderBindingsOf, 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, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, 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 };
102
+ 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, SLOT_CODE_FORMS, 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, bindStateRef, bindingPath, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, 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, isTokenReader, isTransition, isValueSlot, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, markerKind, 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, readsState, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveBinding, 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, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitStyleProps, stamp, standsInForCode, statePointerProp, stateRef, stateTest, 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,4 +1,5 @@
1
- import { isRef, kindOf, splitRef } from "../../framework/utils/ref-grammar.js";
1
+ import { kindOf } from "../../framework/utils/ref-grammar.js";
2
+ import { glyphMemberFor } from "../../spec/glyph-members.js";
2
3
  import React from "react";
3
4
  //#region src/renderer/wrappers/glyph-props.tsx
4
5
  /**
@@ -16,12 +17,10 @@ function glyphFor({ value, libraries, members }) {
16
17
  }
17
18
  return;
18
19
  }
19
- if (!isRef(value)) return void 0;
20
- const parts = splitRef(value);
21
- if (parts.kind !== "icon") return void 0;
22
- const slash = parts.path.lastIndexOf("/");
23
- if (slash <= 0) return void 0;
24
- return members.get(parts.path.slice(0, slash))?.get(parts.path.slice(slash + 1));
20
+ return glyphMemberFor({
21
+ ref: value,
22
+ members
23
+ });
25
24
  }
26
25
  /** The spec element one rendered slot fill paints, read off json-render's element renderer. A
27
26
  * fill of several nodes is content, not a glyph. */