@yahoo/uds-create-config 4.0.3 → 4.0.5
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.
- package/dist/configs/react-native-system.js +2 -0
- package/dist/configs/system.js +2 -0
- package/dist/entities/system/Component.d.ts +8 -0
- package/dist/entities/system/Component.js +26 -1
- package/dist/entities/system/component-module.d.ts +5 -2
- package/dist/entities/system/component-module.js +10 -3
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/render-spec.d.ts +21 -2
- package/dist/framework/render-spec.js +86 -9
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/migrations/20260918161049_anatomy_node_actions.d.ts +14 -0
- package/dist/migrations/20260918161049_anatomy_node_actions.js +10 -0
- package/dist/renderer/wrappers/event-bridge.js +11 -2
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +2 -2
- package/dist/spec/rewrite-refs.d.ts +13 -1
- package/dist/spec/rewrite-refs.js +74 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -19,6 +19,7 @@ import { iconKnockoutVariantsMigration } from "../migrations/20260909183001_icon
|
|
|
19
19
|
import { linkedSystemLinkOpsMigration } from "../migrations/20260910212453_linked_system_link_ops.js";
|
|
20
20
|
import { componentCreateBlankOpMigration } from "../migrations/20260914155048_component_create_blank_op.js";
|
|
21
21
|
import { anatomyHarnessMigration } from "../migrations/20260914181845_anatomy_harness.js";
|
|
22
|
+
import { anatomyNodeActionsMigration } from "../migrations/20260918161049_anatomy_node_actions.js";
|
|
22
23
|
import { NativeModifier } from "../entities/native/NativeModifier.js";
|
|
23
24
|
import { NativeSettings } from "../entities/native/NativeSettings.js";
|
|
24
25
|
import { NativeStyleProperty } from "../entities/native/NativeStyleProperty.js";
|
|
@@ -64,5 +65,6 @@ if (!registeredSchemaMigrations().has(20260909183001)) registerSchemaMigrations(
|
|
|
64
65
|
if (!registeredSchemaMigrations().has(20260910212453)) registerSchemaMigrations(linkedSystemLinkOpsMigration);
|
|
65
66
|
if (!registeredSchemaMigrations().has(20260914155048)) registerSchemaMigrations(componentCreateBlankOpMigration);
|
|
66
67
|
if (!registeredSchemaMigrations().has(20260914181845)) registerSchemaMigrations(anatomyHarnessMigration);
|
|
68
|
+
if (!registeredSchemaMigrations().has(20260918161049)) registerSchemaMigrations(anatomyNodeActionsMigration);
|
|
67
69
|
//#endregion
|
|
68
70
|
export { ReactNativeSystem };
|
package/dist/configs/system.js
CHANGED
|
@@ -29,6 +29,7 @@ import { previewConditionsMigration } from "../migrations/20260912161840_preview
|
|
|
29
29
|
import { fontVariableMigration } from "../migrations/20260912164927_font_variable.js";
|
|
30
30
|
import { componentCreateBlankOpMigration } from "../migrations/20260914155048_component_create_blank_op.js";
|
|
31
31
|
import { anatomyHarnessMigration } from "../migrations/20260914181845_anatomy_harness.js";
|
|
32
|
+
import { anatomyNodeActionsMigration } from "../migrations/20260918161049_anatomy_node_actions.js";
|
|
32
33
|
//#region src/configs/system.ts
|
|
33
34
|
/**
|
|
34
35
|
* `System` — the design-system config TYPE. Declares the exact kinds a design system owns (tokens,
|
|
@@ -78,5 +79,6 @@ if (!registeredSchemaMigrations().has(20260912161840)) registerSchemaMigrations(
|
|
|
78
79
|
if (!registeredSchemaMigrations().has(20260912164927)) registerSchemaMigrations(fontVariableMigration);
|
|
79
80
|
if (!registeredSchemaMigrations().has(20260914155048)) registerSchemaMigrations(componentCreateBlankOpMigration);
|
|
80
81
|
if (!registeredSchemaMigrations().has(20260914181845)) registerSchemaMigrations(anatomyHarnessMigration);
|
|
82
|
+
if (!registeredSchemaMigrations().has(20260918161049)) registerSchemaMigrations(anatomyNodeActionsMigration);
|
|
81
83
|
//#endregion
|
|
82
84
|
export { System };
|
|
@@ -314,6 +314,14 @@ interface ComponentElementBody {
|
|
|
314
314
|
visible?: ElementVisibility;
|
|
315
315
|
props?: Record<string, unknown>;
|
|
316
316
|
text?: string;
|
|
317
|
+
/** Event name → the state actions it runs, in json-render's `on` grammar. */
|
|
318
|
+
on?: Record<string, {
|
|
319
|
+
action: 'setState';
|
|
320
|
+
params: {
|
|
321
|
+
statePath: string;
|
|
322
|
+
value?: unknown;
|
|
323
|
+
};
|
|
324
|
+
}[]>;
|
|
317
325
|
}
|
|
318
326
|
declare const componentFields: z.ZodObject<{
|
|
319
327
|
layers: SubEntityClass<z.ZodUnion<readonly [z.ZodString, z.ZodLazy<z.ZodType<Ref, unknown, z.core.$ZodTypeInternals<Ref, unknown>>>, EntityClass<z.ZodObject<{
|
|
@@ -605,10 +605,23 @@ function ownValues(declaration) {
|
|
|
605
605
|
* see a real edge. Accepting a ref as well is what lets stored data re-validate on update.
|
|
606
606
|
*/
|
|
607
607
|
function conditionValue(prop, declaration, config) {
|
|
608
|
+
const scalar = scalarConditionValue(declaration);
|
|
609
|
+
if (scalar) return scalar;
|
|
608
610
|
const domain = valueSchemaOf(declaration, config);
|
|
609
611
|
if (!ownsItsValues(declaration)) return domain;
|
|
610
612
|
return z.union([domain, refSchema]).transform((value) => isRef(value) ? value : valueRef(prop, String(value)));
|
|
611
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* The condition on a boolean or number prop, in the prop's type. A preview axis spells every value
|
|
616
|
+
* as a string and a rule's key stringifies it, so a writer reading either hands back `'true'` where
|
|
617
|
+
* the author wrote `true`; the string form is taken and stored as the value it names.
|
|
618
|
+
*/
|
|
619
|
+
function scalarConditionValue(declaration) {
|
|
620
|
+
const decl = declaration;
|
|
621
|
+
if (decl?.value !== void 0) return void 0;
|
|
622
|
+
if (decl?.type === "boolean") return z.union([z.boolean(), z.enum(["true", "false"]).transform((value) => value === "true")]);
|
|
623
|
+
if (decl?.type === "number") return z.union([z.number(), z.string().refine((value) => value.trim() !== "" && Number.isFinite(Number(value)), { error: "a number condition is a number, or a string spelling one" }).transform(Number)]);
|
|
624
|
+
}
|
|
612
625
|
/** `ExampleComponent`, or the first numbered name no component holds. Models copy examples
|
|
613
626
|
* literally, so the path has to be one a create would take. */
|
|
614
627
|
function freeExamplePath(config) {
|
|
@@ -937,6 +950,17 @@ const visibility = z.union([
|
|
|
937
950
|
z.array(z.union([stateCondition, orCondition])),
|
|
938
951
|
flatCondition
|
|
939
952
|
], { error: "a condition is `{ \"$state\": \"<prop>\" }` for a prop that is set, `{ \"$state\": \"<prop>\", \"eq\": \"<value>\" }` for one value of it (`neq`, `gt`, `gte`, `lt`, `lte` and `not: true` also work), `{ \"$or\": [ … ] }` for any of several, or a list of conditions that must all hold" });
|
|
953
|
+
/** What an event on a node does to the state model: json-render's own `setState`, its path and the
|
|
954
|
+
* value to write, which may itself be a choice on the state (`{ $cond, $then, $else }`). */
|
|
955
|
+
const stateAction = z.strictObject({
|
|
956
|
+
action: z.literal("setState"),
|
|
957
|
+
params: z.strictObject({
|
|
958
|
+
statePath: z.string(),
|
|
959
|
+
value: z.unknown()
|
|
960
|
+
})
|
|
961
|
+
});
|
|
962
|
+
/** json-render's `on` grammar as a stored node keeps it: event name → the actions it runs. */
|
|
963
|
+
const nodeActions = z.record(z.string(), z.array(stateAction));
|
|
940
964
|
/** One inserted node's accepted shape — {@link InsertedNode}, as the op validates it. Declared after
|
|
941
965
|
* {@link visibility} because a descendant may carry its own condition. */
|
|
942
966
|
const insertedNode = z.strictObject({
|
|
@@ -1061,7 +1085,8 @@ const AnatomyNode = defineSubEntity({
|
|
|
1061
1085
|
cssBehind: false,
|
|
1062
1086
|
values: anatomyPropValue
|
|
1063
1087
|
}) : z.record(z.string(), anatomyPropValue)).optional().describe("Props passed to what the node renders, keyed by prop or style-property name, as literal values. Content is not set here: a `slot` prop's content lands where a `{ \"element\": \"Slot\", \"props\": { \"name\": \"<prop>\" } }` node sits among a parent's `children` (on the root when there is none), and a `forward` prop (`{ \"type\": \"forward\", \"target\": \"label/children\" }`) routes it into that layer with no node entry. `$state` belongs to `visible` and to an `element` a prop chooses."),
|
|
1064
|
-
text: z.string().optional().describe("Literal text content, for a node that renders a fixed string.")
|
|
1088
|
+
text: z.string().optional().describe("Literal text content, for a node that renders a fixed string."),
|
|
1089
|
+
on: nodeActions.optional().describe("What an event on the node does to the state model, in json-render's `on` grammar: `{ \"press\": [{ \"action\": \"setState\", \"params\": { \"statePath\": \"/checked\", \"value\": … } }] }`. Read off the render's own handlers; a preview runs them so the composition responds as the component does.")
|
|
1065
1090
|
};
|
|
1066
1091
|
if (!config || !body) return z.object({
|
|
1067
1092
|
...shape,
|
|
@@ -10,9 +10,12 @@ interface ComponentModuleSource {
|
|
|
10
10
|
readonly filePath: string;
|
|
11
11
|
/** Content identity for the file and its complete config-visible build closure. */
|
|
12
12
|
readonly moduleKey: string;
|
|
13
|
-
/** The component export in the
|
|
13
|
+
/** The component's export in the emitted module: the path's leaf, which the build renames the
|
|
14
|
+
* authored declaration to (`Anchor` registered as `Link/LinkRoot` ships as `LinkRoot`). The
|
|
15
|
+
* authored name is `Component.export`, and the two differ for a grouped registration under
|
|
16
|
+
* another leaf and for a draft rename the source file has not caught up with. */
|
|
14
17
|
readonly exportName: string;
|
|
15
|
-
/** The ctx-shaped registry export emitted beside the component
|
|
18
|
+
/** The ctx-shaped registry export emitted beside the component, `<leaf>Entry`. */
|
|
16
19
|
readonly entryExportName: string;
|
|
17
20
|
}
|
|
18
21
|
/** One component export an authored import can resolve through the runtime registry. */
|
|
@@ -16,7 +16,7 @@ import { isNativeConfig } from "../../configs/platform.js";
|
|
|
16
16
|
* The shared compiler/runtime contract. Bump whenever codegen can produce different module bytes
|
|
17
17
|
* from identical config-visible inputs (shim contracts, entry shape, transforms, and so on).
|
|
18
18
|
*/
|
|
19
|
-
const COMPONENT_MODULE_BUILD_VERSION =
|
|
19
|
+
const COMPONENT_MODULE_BUILD_VERSION = 5;
|
|
20
20
|
/**
|
|
21
21
|
* Generated web runtime inputs shared by every component module. These are intentionally separate
|
|
22
22
|
* from the per-file closure: editing an unrelated component should not invalidate this module, but
|
|
@@ -28,6 +28,12 @@ const WEB_RUNTIME_KINDS = [
|
|
|
28
28
|
"motion",
|
|
29
29
|
"composite"
|
|
30
30
|
];
|
|
31
|
+
/** The name an emitted module exports a component under: its path's leaf. Codegen's
|
|
32
|
+
* `componentEntryExportName` is this leaf plus `Entry`; the config package cannot import codegen, so
|
|
33
|
+
* the leaf is computed here as well. */
|
|
34
|
+
function componentModuleExportName(path) {
|
|
35
|
+
return path.split("/").pop() ?? path;
|
|
36
|
+
}
|
|
31
37
|
const componentsByFileCache = /* @__PURE__ */ new WeakMap();
|
|
32
38
|
/** Documentation and examples never enter emitted component modules. */
|
|
33
39
|
function buildEntityBody(kind, body) {
|
|
@@ -246,12 +252,13 @@ function componentModuleSource(config, componentPathOrRef) {
|
|
|
246
252
|
if (ref.source) return void 0;
|
|
247
253
|
const moduleKey = componentModuleKey(config, ref.path);
|
|
248
254
|
if (!moduleKey) return void 0;
|
|
255
|
+
const forward = componentModuleExportName(component.path);
|
|
249
256
|
return {
|
|
250
257
|
componentRef: Component.ref(component.path).__ref,
|
|
251
258
|
filePath: ref.path,
|
|
252
259
|
moduleKey,
|
|
253
|
-
exportName,
|
|
254
|
-
entryExportName: `${
|
|
260
|
+
exportName: forward,
|
|
261
|
+
entryExportName: `${forward}Entry`
|
|
255
262
|
};
|
|
256
263
|
}
|
|
257
264
|
//#endregion
|
|
@@ -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 =
|
|
75
|
+
declare const SERIALIZED_CONFIG_VERSION = 20260918161049;
|
|
76
76
|
interface SerializedConfig {
|
|
77
77
|
/** See {@link SERIALIZED_CONFIG_VERSION}. Always written; a stored artifact may lack it. */
|
|
78
78
|
readonly version: number;
|
package/dist/framework/Config.js
CHANGED
|
@@ -4715,7 +4715,7 @@ var Config = class Config {
|
|
|
4715
4715
|
* links from the provided sources. A declared `linkedKind` with no provided source throws. */
|
|
4716
4716
|
hydrateFrom(stored, options) {
|
|
4717
4717
|
const claimed = schemaVersionOf(stored);
|
|
4718
|
-
if (claimed >
|
|
4718
|
+
if (claimed > 20260918161049) throw new SchemaVersionTooNew(claimed);
|
|
4719
4719
|
const wire = upgradeSerializedConfig(stored);
|
|
4720
4720
|
if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration — import the config type's module (e.g. \`configs/system\`) before hydrating, or port the repo once with \`uds migrate\`.`);
|
|
4721
4721
|
const leftover = wire.options;
|
|
@@ -17,6 +17,9 @@ interface RenderElement {
|
|
|
17
17
|
* json-render `Spec` is read through this type too, and its grammar has `$item`, `$index` and
|
|
18
18
|
* `$and` arms the entity refuses. */
|
|
19
19
|
readonly visible?: unknown;
|
|
20
|
+
/** json-render's own `on` grammar: event name → the actions it runs. Carried from the anatomy
|
|
21
|
+
* for the component's own composition, so a click in a preview writes the state model. */
|
|
22
|
+
readonly on?: unknown;
|
|
20
23
|
}
|
|
21
24
|
interface RenderSpec {
|
|
22
25
|
readonly root: string;
|
|
@@ -67,6 +70,12 @@ declare function entryKeyOf(nodes: Record<string, {
|
|
|
67
70
|
* and that was always stated rather than run.
|
|
68
71
|
*/
|
|
69
72
|
declare function deriveSpec(config: Config, path: string): RenderSpec | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* The props a spec's actions write — the root of every `setState` path under any element's `on`.
|
|
75
|
+
* These are the props a preview must keep LIVE: their conditions stay for the renderer to judge
|
|
76
|
+
* against the state model rather than being settled once, and their styles paint per value.
|
|
77
|
+
*/
|
|
78
|
+
declare function liveStateProps(spec: RenderSpec): Set<string>;
|
|
70
79
|
/**
|
|
71
80
|
* ONE COMPONENT, as a spec — the instance form, and the only place the `component:` prefix is minted.
|
|
72
81
|
*
|
|
@@ -180,11 +189,21 @@ interface ExpansionResult {
|
|
|
180
189
|
*
|
|
181
190
|
* A condition that does not resolve is left exactly as it was, so nothing is claimed about it.
|
|
182
191
|
*/
|
|
183
|
-
declare function specWithResolvedVisibility(spec: RenderSpec, state: Record<string, unknown
|
|
192
|
+
declare function specWithResolvedVisibility(spec: RenderSpec, state: Record<string, unknown>, options?: {
|
|
193
|
+
/** Props the renderer keeps deciding at paint time — a choice reading one is left as it is. */readonly live?: ReadonlySet<string>;
|
|
194
|
+
}): RenderSpec;
|
|
184
195
|
/** The comparison a `$state` test can make: json-render's own operator set, minus the state pointer
|
|
185
196
|
* and the `not` modifier. Typed off the library so an operator it adds is a typecheck failure here
|
|
186
197
|
* until {@link COMPARATORS} handles it. */
|
|
187
198
|
type VisibilityOperator = Exclude<keyof StateCondition, '$state' | 'not'>;
|
|
199
|
+
/**
|
|
200
|
+
* A `$state` pointer read off a prop bag, the way json-render reads it: `/size` is the prop, and
|
|
201
|
+
* `/value/required` a member of an object prop. For a component's own anatomy the state model IS
|
|
202
|
+
* its prop bag.
|
|
203
|
+
*/
|
|
204
|
+
declare function readStatePointer(state: Record<string, unknown>, pointer: string): unknown;
|
|
205
|
+
/** The prop a `$state` pointer reads — its first segment, for a pointer into an object prop. */
|
|
206
|
+
declare function statePointerProp(pointer: string): string;
|
|
188
207
|
/** A value in json-render's `visible` grammar, resolved against a prop bag. `undefined` when this
|
|
189
208
|
* reader can't settle it, which leaves the condition on the element for the renderer to judge. */
|
|
190
209
|
declare function resolveVisibility(condition: unknown, state: Record<string, unknown>): boolean | undefined;
|
|
@@ -304,4 +323,4 @@ declare function expandSpec(config: Config, spec: RenderSpec, options?: ExpandOp
|
|
|
304
323
|
*/
|
|
305
324
|
declare function expandComponent(config: Config, path: string, props?: Record<string, unknown>, options?: ExpandOptions): ExpansionResult;
|
|
306
325
|
//#endregion
|
|
307
|
-
export { ComponentSpec, ComponentSpecs, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, SlotTarget, VisibilityOperator, VisibilityTerm, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, previewSpec, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
326
|
+
export { ComponentSpec, ComponentSpecs, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, SlotTarget, VisibilityOperator, VisibilityTerm, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, liveStateProps, previewSpec, readStatePointer, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, statePointerProp, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -221,7 +221,8 @@ function deriveSpec(config, path) {
|
|
|
221
221
|
...Object.keys(props).length ? { props } : {},
|
|
222
222
|
...children?.length ? { children } : {},
|
|
223
223
|
...node.slots && Object.keys(node.slots).length ? { slots: node.slots } : {},
|
|
224
|
-
...node.visible !== void 0 ? { visible: node.visible } : {}
|
|
224
|
+
...node.visible !== void 0 ? { visible: node.visible } : {},
|
|
225
|
+
...node.on !== void 0 ? { on: node.on } : {}
|
|
225
226
|
};
|
|
226
227
|
}
|
|
227
228
|
return {
|
|
@@ -230,6 +231,31 @@ function deriveSpec(config, path) {
|
|
|
230
231
|
};
|
|
231
232
|
}
|
|
232
233
|
/**
|
|
234
|
+
* The props a spec's actions write — the root of every `setState` path under any element's `on`.
|
|
235
|
+
* These are the props a preview must keep LIVE: their conditions stay for the renderer to judge
|
|
236
|
+
* against the state model rather than being settled once, and their styles paint per value.
|
|
237
|
+
*/
|
|
238
|
+
function liveStateProps(spec) {
|
|
239
|
+
const props = /* @__PURE__ */ new Set();
|
|
240
|
+
for (const element of Object.values(spec.elements)) {
|
|
241
|
+
if (typeof element.on !== "object" || element.on === null) continue;
|
|
242
|
+
for (const binding of Object.values(element.on)) {
|
|
243
|
+
const actions = Array.isArray(binding) ? binding : [binding];
|
|
244
|
+
for (const action of actions) {
|
|
245
|
+
const params = action?.params;
|
|
246
|
+
if (typeof params?.statePath === "string") props.add(statePointerProp(params.statePath));
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return props;
|
|
251
|
+
}
|
|
252
|
+
/** Whether a value's choice reads any of `props`, at any depth. */
|
|
253
|
+
function readsAnyOf(value, props) {
|
|
254
|
+
if (typeof value !== "object" || value === null || !("$cond" in value)) return false;
|
|
255
|
+
const choice = value;
|
|
256
|
+
return visibilityStateProps(choice.$cond).some((prop) => props.has(prop)) || readsAnyOf(choice.$then, props) || readsAnyOf(choice.$else, props);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
233
259
|
* ONE COMPONENT, as a spec — the instance form, and the only place the `component:` prefix is minted.
|
|
234
260
|
*
|
|
235
261
|
* A spec type is `kind:identity`, always: the emitted registry keys every entry that way and holds
|
|
@@ -345,19 +371,31 @@ function expandable(sink, type) {
|
|
|
345
371
|
*
|
|
346
372
|
* A condition that does not resolve is left exactly as it was, so nothing is claimed about it.
|
|
347
373
|
*/
|
|
348
|
-
function specWithResolvedVisibility(spec, state) {
|
|
374
|
+
function specWithResolvedVisibility(spec, state, options = {}) {
|
|
349
375
|
let changed = false;
|
|
350
376
|
const elements = {};
|
|
377
|
+
const live = options.live;
|
|
351
378
|
for (const [key, element] of Object.entries(spec.elements)) {
|
|
352
379
|
const resolved = element.visible === void 0 ? void 0 : resolveVisibility(element.visible, state);
|
|
353
|
-
|
|
380
|
+
let props = element.props;
|
|
381
|
+
for (const [name, value] of Object.entries(element.props ?? {})) {
|
|
382
|
+
if (live?.size && readsAnyOf(value, live)) continue;
|
|
383
|
+
const settled = resolveChosenValue(value, state);
|
|
384
|
+
if (settled === value) continue;
|
|
385
|
+
props = {
|
|
386
|
+
...props,
|
|
387
|
+
[name]: settled
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
if ((resolved === void 0 || resolved === element.visible) && props === element.props) {
|
|
354
391
|
elements[key] = element;
|
|
355
392
|
continue;
|
|
356
393
|
}
|
|
357
394
|
changed = true;
|
|
358
395
|
elements[key] = {
|
|
359
396
|
...element,
|
|
360
|
-
|
|
397
|
+
...props === element.props ? {} : { props },
|
|
398
|
+
...resolved === void 0 || resolved === element.visible ? {} : { visible: resolved }
|
|
361
399
|
};
|
|
362
400
|
}
|
|
363
401
|
return changed ? {
|
|
@@ -384,6 +422,23 @@ const OPERATORS = Object.keys(COMPARATORS);
|
|
|
384
422
|
function operatorOf(test) {
|
|
385
423
|
return OPERATORS.find((name) => name in test);
|
|
386
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* A `$state` pointer read off a prop bag, the way json-render reads it: `/size` is the prop, and
|
|
427
|
+
* `/value/required` a member of an object prop. For a component's own anatomy the state model IS
|
|
428
|
+
* its prop bag.
|
|
429
|
+
*/
|
|
430
|
+
function readStatePointer(state, pointer) {
|
|
431
|
+
let current = state;
|
|
432
|
+
for (const segment of pointer.replace(/^\//, "").split("/")) {
|
|
433
|
+
if (current === null || typeof current !== "object") return void 0;
|
|
434
|
+
current = current[segment];
|
|
435
|
+
}
|
|
436
|
+
return current;
|
|
437
|
+
}
|
|
438
|
+
/** The prop a `$state` pointer reads — its first segment, for a pointer into an object prop. */
|
|
439
|
+
function statePointerProp(pointer) {
|
|
440
|
+
return pointer.replace(/^\//, "").split("/")[0] ?? "";
|
|
441
|
+
}
|
|
387
442
|
/** A value in json-render's `visible` grammar, resolved against a prop bag. `undefined` when this
|
|
388
443
|
* reader can't settle it, which leaves the condition on the element for the renderer to judge. */
|
|
389
444
|
function resolveVisibility(condition, state) {
|
|
@@ -411,11 +466,20 @@ function resolveVisibility(condition, state) {
|
|
|
411
466
|
}
|
|
412
467
|
if (Array.isArray(test.$and)) return resolveVisibility(test.$and, state);
|
|
413
468
|
if (typeof test.$state !== "string") return void 0;
|
|
414
|
-
const value = state
|
|
469
|
+
const value = readStatePointer(state, test.$state);
|
|
415
470
|
const operator = operatorOf(test);
|
|
416
471
|
const result = operator ? COMPARATORS[operator](value, test[operator]) : Boolean(value);
|
|
417
472
|
return test.not === true ? !result : result;
|
|
418
473
|
}
|
|
474
|
+
/** A json-render `{ $cond, $then, $else }` value settled against a prop bag: the arm the condition
|
|
475
|
+
* picks, itself settled, or the choice untouched when the condition can't be. */
|
|
476
|
+
function resolveChosenValue(value, state) {
|
|
477
|
+
if (typeof value !== "object" || value === null || !("$cond" in value)) return value;
|
|
478
|
+
const choice = value;
|
|
479
|
+
const picked = resolveVisibility(choice.$cond, state);
|
|
480
|
+
if (picked === void 0) return value;
|
|
481
|
+
return resolveChosenValue(picked ? choice.$then : choice.$else, state);
|
|
482
|
+
}
|
|
419
483
|
/**
|
|
420
484
|
* Which PROPS a `visible` condition reads, in the order they appear.
|
|
421
485
|
*
|
|
@@ -447,7 +511,7 @@ function collectStateProps(condition, sink) {
|
|
|
447
511
|
for (const entry of test.$and) collectStateProps(entry, sink);
|
|
448
512
|
return;
|
|
449
513
|
}
|
|
450
|
-
if (typeof test.$state === "string") sink.push(test.$state
|
|
514
|
+
if (typeof test.$state === "string") sink.push(statePointerProp(test.$state));
|
|
451
515
|
}
|
|
452
516
|
/**
|
|
453
517
|
* The tests a `visible` condition makes, in order, flattened to one list.
|
|
@@ -507,7 +571,7 @@ function collectTerms({ condition, junction, group, sink }) {
|
|
|
507
571
|
if (typeof test.$state !== "string") return;
|
|
508
572
|
const operator = operatorOf(test);
|
|
509
573
|
sink.push({
|
|
510
|
-
prop: test.$state
|
|
574
|
+
prop: statePointerProp(test.$state),
|
|
511
575
|
operator: operator ?? "truthy",
|
|
512
576
|
...operator ? { value: test[operator] } : {},
|
|
513
577
|
negated: test.not === true,
|
|
@@ -857,6 +921,10 @@ function expandInstance(sink, path, instanceProps, content, hint, instanceSlots)
|
|
|
857
921
|
]) || void 0
|
|
858
922
|
} : authoredProps(config, node.props);
|
|
859
923
|
if (node.text !== void 0) props.children = node.text;
|
|
924
|
+
for (const [name, value] of Object.entries(props)) {
|
|
925
|
+
const settled = resolveChosenValue(value, state);
|
|
926
|
+
if (settled !== value) props[name] = settled;
|
|
927
|
+
}
|
|
860
928
|
const children = [];
|
|
861
929
|
const boundFills = {};
|
|
862
930
|
for (const [name, value] of Object.entries(props)) {
|
|
@@ -942,12 +1010,21 @@ function expandSpec(config, spec, options = {}) {
|
|
|
942
1010
|
for (const [name, fills] of Object.entries(element.slots ?? {})) slots[name] = fills.map((fill) => emit(fill)).filter((placed) => placed !== void 0);
|
|
943
1011
|
const placed = place(sink, element.type, { ...element.props }, children, key, slots);
|
|
944
1012
|
if (element.visible !== void 0) withCondition(sink, placed, { visible: element.visible });
|
|
1013
|
+
if (element.on !== void 0) {
|
|
1014
|
+
const target = sink.elements[placed];
|
|
1015
|
+
if (target) sink.elements[placed] = {
|
|
1016
|
+
...target,
|
|
1017
|
+
on: element.on
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
945
1020
|
emitting.delete(key);
|
|
946
1021
|
return placed;
|
|
947
1022
|
};
|
|
1023
|
+
const root = emit(spec.root) ?? spec.root;
|
|
948
1024
|
return {
|
|
949
1025
|
spec: {
|
|
950
|
-
|
|
1026
|
+
...spec,
|
|
1027
|
+
root,
|
|
951
1028
|
elements: sink.elements
|
|
952
1029
|
},
|
|
953
1030
|
unresolved: [...sink.unresolved]
|
|
@@ -964,4 +1041,4 @@ function expandComponent(config, path, props = {}, options = {}) {
|
|
|
964
1041
|
return expandSpec(config, instanceSpec(path, props), options);
|
|
965
1042
|
}
|
|
966
1043
|
//#endregion
|
|
967
|
-
export { boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, previewSpec, resolveVisibility, slotAnatomyPropOf, slotTargetsOf, specWithResolvedVisibility, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
1044
|
+
export { boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, liveStateProps, previewSpec, readStatePointer, resolveVisibility, slotAnatomyPropOf, slotTargetsOf, specWithResolvedVisibility, statePointerProp, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -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 =
|
|
18
|
+
declare const CURRENT_SCHEMA_VERSION = 20260918161049;
|
|
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 =
|
|
16
|
+
const CURRENT_SCHEMA_VERSION = 20260918161049;
|
|
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 >
|
|
48
|
+
if (migration.version > 20260918161049) 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 ??
|
|
105
|
+
const target = options?.target ?? 20260918161049;
|
|
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 ??
|
|
163
|
+
const target = options?.target ?? 20260918161049;
|
|
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 ??
|
|
182
|
+
const target = options?.target ?? 20260918161049;
|
|
183
183
|
const entries = [];
|
|
184
184
|
const held = [];
|
|
185
185
|
const retired = [];
|
package/dist/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ import { ForwardClaims, SurfaceCompositeProp, SurfaceProp, SurfacePropKind, Surf
|
|
|
76
76
|
import { DanglingLocalRef, UnknownStyleLeaf, danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
|
|
77
77
|
import { resolveInputDir, resolveOutDir, resolveRegistryDir } from "./framework/registry-dir.js";
|
|
78
78
|
import { InferredRename, inferredRenames } from "./framework/rename-inference.js";
|
|
79
|
-
import { ComponentSpec, ComponentSpecs, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, SlotTarget, VisibilityOperator, VisibilityTerm, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, previewSpec, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
79
|
+
import { ComponentSpec, ComponentSpecs, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, SlotTarget, VisibilityOperator, VisibilityTerm, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, liveStateProps, previewSpec, readStatePointer, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, statePointerProp, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
80
80
|
import { CURRENT_SCHEMA_VERSION, SchemaMigration, SchemaVersionTooNew, UpgradedDraft, WalkOptions, detectedWireVersion, registerSchemaMigrations, schemaVersionOf, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig } from "./framework/schema-version.js";
|
|
81
81
|
import { ConfigSession, ConfigSessionOptions, ConfigSink, ConfigSource, DraftSource, RebaseOrigin, SourceChange, memoryConfigSource } from "./framework/session.js";
|
|
82
82
|
import { SignatureOptions, renderSignature, signatureOf } from "./framework/signature.js";
|
|
@@ -89,4 +89,4 @@ import { views } from "./framework/views-facade.js";
|
|
|
89
89
|
import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
90
90
|
import { namedSlotTargets } from "./spec/empty-node-slots.js";
|
|
91
91
|
import { PreviewElement, graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
|
|
92
|
-
export { AI_LANES, 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 Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, Composite, type ComputedFields, type ComputedInput, type ComputedMap, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IdentifiedOp, type InferredRename, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, 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 SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type TraverseOptions, type TreeNode, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyIssueKey, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
92
|
+
export { AI_LANES, 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 Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, Composite, type ComputedFields, type ComputedInput, type ComputedMap, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IdentifiedOp, type InferredRename, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, 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 SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type TraverseOptions, type TreeNode, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyIssueKey, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import { forwardClaims, forwardedLayers, intoName, routedProp, routedPropIn, rou
|
|
|
26
26
|
import { graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
|
|
27
27
|
import { layerStyles, ruleApplies } from "./framework/layer-styles.js";
|
|
28
28
|
import { 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";
|
|
29
|
-
import { boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, previewSpec, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
29
|
+
import { boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, liveStateProps, previewSpec, readStatePointer, resolveVisibility, slotTargetsOf, specWithResolvedVisibility, statePointerProp, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
30
30
|
import { Package } from "./entities/system/Package.js";
|
|
31
31
|
import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
32
32
|
import { Component, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
@@ -85,4 +85,4 @@ import { ConfigSession, memoryConfigSource } from "./framework/session.js";
|
|
|
85
85
|
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
86
86
|
import { validateSpec } from "./framework/validate-spec.js";
|
|
87
87
|
import { namedSlotTargets } from "./spec/empty-node-slots.js";
|
|
88
|
-
export { AI_LANES, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_MUTATIONS, Device, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyIssueKey, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
88
|
+
export { AI_LANES, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_MUTATIONS, Device, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyIssueKey, applyPathDelta, assetType, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, changeOf, changeValueAt, changesOf, childrenPolicy, className, classPrefixOf, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, inferredRenames, inputOf, instanceSpec, intoName, isAuthored, isBinaryAsset, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, leafAddresses, leafVerb, leavesOfStylePropValue, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, namedFields, namedSlotTargets, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propOwner, propValueDomain, propValueFromAxis, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibrary, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An anatomy node gains an optional `on`: json-render's own event grammar, event name → the
|
|
3
|
+
* `setState` actions it runs, read off the render's handlers (`onClick={() => !disabled &&
|
|
4
|
+
* setChecked(!checked)}` is `press` setting `/checked`). A preview runs them so the composition
|
|
5
|
+
* responds as the component does.
|
|
6
|
+
*
|
|
7
|
+
* Nothing stored before this version reshapes. A node without `on` means what its absence always
|
|
8
|
+
* meant: a node no event does anything to.
|
|
9
|
+
*
|
|
10
|
+
* Deletable once no stored artifact predates it.
|
|
11
|
+
*/
|
|
12
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
13
|
+
export declare const ANATOMY_NODE_ACTIONS_VERSION = 20260918161049;
|
|
14
|
+
export declare const anatomyNodeActionsMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20260918161049_anatomy_node_actions.ts
|
|
2
|
+
const ANATOMY_NODE_ACTIONS_VERSION = 20260918161049;
|
|
3
|
+
const anatomyNodeActionsMigration = {
|
|
4
|
+
version: ANATOMY_NODE_ACTIONS_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ANATOMY_NODE_ACTIONS_VERSION, anatomyNodeActionsMigration };
|