@yahoo/uds-create-config 4.16.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/CanvasConfig.d.ts +98 -0
- package/dist/configs/react-native-system.d.ts +75 -8
- package/dist/configs/system.d.ts +82 -12
- package/dist/configs/system.js +5 -1
- package/dist/css/root-font-size.d.ts +16 -0
- package/dist/css/root-font-size.js +97 -0
- package/dist/css/value-type.js +5 -1
- package/dist/entities/native/NativeModifier.d.ts +1 -1
- package/dist/entities/native/NativeSettings.d.ts +1 -0
- package/dist/entities/native/NativeToken.d.ts +4 -3
- package/dist/entities/system/Component.d.ts +50 -0
- package/dist/entities/system/Component.js +8 -1
- package/dist/entities/system/Modifier.d.ts +2 -2
- package/dist/entities/system/Modifier.js +2 -5
- package/dist/entities/system/Settings.d.ts +3 -0
- package/dist/entities/system/Settings.js +12 -1
- package/dist/entities/system/StyleProperty.js +2 -3
- package/dist/entities/system/Token.d.ts +21 -8
- package/dist/entities/system/Token.js +24 -5
- package/dist/entities/system/color.d.ts +4 -1
- package/dist/entities/system/color.js +59 -5
- package/dist/entities/system/composed-values.d.ts +36 -0
- package/dist/entities/system/composed-values.js +52 -0
- package/dist/entities/system/style-bag.d.ts +2 -2
- package/dist/entities/system/style-bag.js +3 -5
- package/dist/entities/system/token-index.js +1 -1
- package/dist/entities/system/token-values.d.ts +138 -0
- package/dist/entities/system/token-values.js +154 -0
- package/dist/entities/system/transition.d.ts +35 -0
- package/dist/entities/system/transition.js +57 -0
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/defineEntity.d.ts +1 -1
- package/dist/framework/defineEntity.js +2 -5
- package/dist/framework/projections.js +2 -3
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/identifier.d.ts +8 -0
- package/dist/framework/utils/identifier.js +62 -0
- package/dist/framework/utils/refs.d.ts +7 -1
- package/dist/framework/utils/refs.js +10 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.js +10 -5
- package/dist/migrations/2.0.0/raw-css.js +1 -1
- package/dist/migrations/2.0.0/v1-artifact.d.ts +42 -7
- package/dist/migrations/2.0.0/v1-artifact.js +1 -1
- package/dist/migrations/20260923144958_transition_token_value.d.ts +13 -0
- package/dist/migrations/20260923144958_transition_token_value.js +10 -0
- package/dist/migrations/20260923160425_render_token_refs.d.ts +14 -0
- package/dist/migrations/20260923160425_render_token_refs.js +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/framework/utils/identifier.ts
|
|
2
|
+
/** What may be written as one JavaScript identifier — a prop name, an export, a binding. */
|
|
3
|
+
const IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
|
|
4
|
+
/** Words the language keeps, in every context or in a module: a binding cannot be named one. */
|
|
5
|
+
const RESERVED = new Set([
|
|
6
|
+
"await",
|
|
7
|
+
"break",
|
|
8
|
+
"case",
|
|
9
|
+
"catch",
|
|
10
|
+
"class",
|
|
11
|
+
"const",
|
|
12
|
+
"continue",
|
|
13
|
+
"debugger",
|
|
14
|
+
"default",
|
|
15
|
+
"delete",
|
|
16
|
+
"do",
|
|
17
|
+
"else",
|
|
18
|
+
"enum",
|
|
19
|
+
"export",
|
|
20
|
+
"extends",
|
|
21
|
+
"false",
|
|
22
|
+
"finally",
|
|
23
|
+
"for",
|
|
24
|
+
"function",
|
|
25
|
+
"if",
|
|
26
|
+
"implements",
|
|
27
|
+
"import",
|
|
28
|
+
"in",
|
|
29
|
+
"instanceof",
|
|
30
|
+
"interface",
|
|
31
|
+
"let",
|
|
32
|
+
"new",
|
|
33
|
+
"null",
|
|
34
|
+
"package",
|
|
35
|
+
"private",
|
|
36
|
+
"protected",
|
|
37
|
+
"public",
|
|
38
|
+
"return",
|
|
39
|
+
"static",
|
|
40
|
+
"super",
|
|
41
|
+
"switch",
|
|
42
|
+
"this",
|
|
43
|
+
"throw",
|
|
44
|
+
"true",
|
|
45
|
+
"try",
|
|
46
|
+
"typeof",
|
|
47
|
+
"var",
|
|
48
|
+
"void",
|
|
49
|
+
"while",
|
|
50
|
+
"with",
|
|
51
|
+
"yield"
|
|
52
|
+
]);
|
|
53
|
+
/** Whether `name` has the shape of an identifier. A reserved word has the shape and still cannot be
|
|
54
|
+
* bound; {@link isReservedWord} is that question. */
|
|
55
|
+
function isIdentifier(name) {
|
|
56
|
+
return IDENTIFIER.test(name);
|
|
57
|
+
}
|
|
58
|
+
function isReservedWord(name) {
|
|
59
|
+
return RESERVED.has(name);
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { isIdentifier, isReservedWord };
|
|
@@ -77,6 +77,12 @@ declare function entityRefOf(target: string): string;
|
|
|
77
77
|
declare const refSchema: z.ZodObject<{
|
|
78
78
|
__ref: z.ZodString;
|
|
79
79
|
}, z.core.$strip>;
|
|
80
|
+
/** The zod schema of a ref to one kind: `refTo('token')` accepts `token:motion/color` and refuses
|
|
81
|
+
* `font:sans`. The `refKind` meta names the target for any consumer, and `kindOf` reads the ref
|
|
82
|
+
* grammar rather than a prefix test restating it. */
|
|
83
|
+
declare function refTo(kind: string): z.ZodObject<{
|
|
84
|
+
__ref: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
80
86
|
/** Widen a field's value type to also accept a ref: `value: orRef(z.string())`. */
|
|
81
87
|
declare function orRef<T extends z.ZodTypeAny>(schema: T): z.ZodUnion<readonly [T, z.ZodObject<{
|
|
82
88
|
__ref: z.ZodString;
|
|
@@ -166,4 +172,4 @@ declare function rewriteRefNamespace(value: unknown, kind: string, from: string,
|
|
|
166
172
|
*/
|
|
167
173
|
declare function rewriteRefSource(value: unknown, from: string, to: string): unknown;
|
|
168
174
|
//#endregion
|
|
169
|
-
export { ENTITY_PATH_MESSAGE, ExtendableRef, ExtendedRef, MINTED, Ref, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef };
|
|
175
|
+
export { ENTITY_PATH_MESSAGE, ExtendableRef, ExtendedRef, MINTED, Ref, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, refTo, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef };
|
|
@@ -102,6 +102,15 @@ function entityRefOf(target) {
|
|
|
102
102
|
* Schema, an authoring UI) — this generic form carries no target kind (use an entity as the field
|
|
103
103
|
* to bake one in). */
|
|
104
104
|
const refSchema = z.object({ __ref: z.string() }).meta({ ref: true });
|
|
105
|
+
/** The zod schema of a ref to one kind: `refTo('token')` accepts `token:motion/color` and refuses
|
|
106
|
+
* `font:sans`. The `refKind` meta names the target for any consumer, and `kindOf` reads the ref
|
|
107
|
+
* grammar rather than a prefix test restating it. */
|
|
108
|
+
function refTo(kind) {
|
|
109
|
+
return z.object({ __ref: z.string().refine((raw) => kindOf(raw) === kind, { error: `a ref to a ${kind} (\`${kind}:<path>\`)` }) }).meta({
|
|
110
|
+
ref: true,
|
|
111
|
+
refKind: kind
|
|
112
|
+
});
|
|
113
|
+
}
|
|
105
114
|
/** Widen a field's value type to also accept a ref: `value: orRef(z.string())`. */
|
|
106
115
|
function orRef(schema) {
|
|
107
116
|
return z.union([schema, refSchema]);
|
|
@@ -346,4 +355,4 @@ function canonicalCondition(when) {
|
|
|
346
355
|
return entries.length === 0 ? "*" : entries.map(([k, v]) => `${k}=${String(refLeaf(v))}`).join("&");
|
|
347
356
|
}
|
|
348
357
|
//#endregion
|
|
349
|
-
export { ENTITY_PATH_MESSAGE, MINTED, canonicalCondition, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, qualifyRefs, ref, refLeaf, refSchema, rewriteRefNamespace, rewriteRefSource, rewriteRefs, singletonRef, sourceOf, splitRef };
|
|
358
|
+
export { ENTITY_PATH_MESSAGE, MINTED, canonicalCondition, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, qualifyRefs, ref, refLeaf, refSchema, refTo, rewriteRefNamespace, rewriteRefSource, rewriteRefs, singletonRef, sourceOf, splitRef };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ConfigFormatError, ConfigIssue, ConfigIssueCode, ConfigRejection, isCon
|
|
|
5
5
|
import { RebaseConflict, RebaseResult, StampedPatch, stamp } from "./framework/overlay.js";
|
|
6
6
|
import { DeletePlan, EntityAddress, Plan, PlanImpact, PlanOp, RenamePlan, describePatch } from "./framework/plan.js";
|
|
7
7
|
import { Entity } from "./framework/Entity.js";
|
|
8
|
-
import { ENTITY_PATH_MESSAGE, ExtendedRef, MINTED, Ref, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
|
|
8
|
+
import { ENTITY_PATH_MESSAGE, ExtendedRef, MINTED, Ref, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, refTo, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
|
|
9
9
|
import { RefGraph, RefGraphEntry, RefIndex, RefIndexChange, RefTarget, TraverseOptions, buildRefGraph, buildRefIndex, refGraphOf, updateRefIndex } from "./framework/ref-graph.js";
|
|
10
10
|
import { CreateInput, FieldsSchema, declaredField, deriveCreateSchema, deriveUpdateSchema, fieldKeys } from "./framework/utils/field-schema.js";
|
|
11
11
|
import { DerivedOp, OpHandler, SchemaEntry, UserSchemas } from "./framework/schemas.js";
|
|
@@ -45,16 +45,21 @@ import { AnySystemConfig, isNativeConfig, isSystemConfig } from "./configs/platf
|
|
|
45
45
|
import { AiChat, AiFlow, AiFlowOrigin, AiGeneration, AiMessage, AiMultiAgentMode, Canvas, CanvasConfig, Node, Page, SystemSource, createCanvasConfig } from "./configs/CanvasConfig.js";
|
|
46
46
|
import { DocumentationLibrary } from "./configs/documentation.js";
|
|
47
47
|
import { CssPropertyEntry } from "./css/properties.generated.js";
|
|
48
|
+
import { RootFontSize, parseRootFontSize } from "./css/root-font-size.js";
|
|
48
49
|
import { ResolveValueTypeInput, ValueType, resolveValueType, sniffValueType } from "./css/value-type.js";
|
|
49
50
|
import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
|
|
50
51
|
import { Documentation } from "./entities/documentation/Documentation.js";
|
|
51
52
|
import { NATIVE_ACTIVATIONS, NativeActivation, NativeModifier } from "./entities/native/NativeModifier.js";
|
|
52
53
|
import { CanvasSection, NativeSettings } from "./entities/native/NativeSettings.js";
|
|
53
54
|
import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
|
|
54
|
-
import {
|
|
55
|
+
import { TimingValue, Transition, TransitionSegment, isTransition, renderTransition, transition } from "./entities/system/transition.js";
|
|
56
|
+
import { ComposedValue, ComposedValueAuthoring, ComposedValueForm, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, isComposedValue, renderComposedValue } from "./entities/system/composed-values.js";
|
|
57
|
+
import { ColorValue, DERIVED_COLOR_SPACE, DerivedColor, Gradient, alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
|
|
55
58
|
import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
|
|
56
59
|
import { CANVAS_ROLES, CanvasRole, CanvasRoleName } from "./entities/system/CanvasRole.js";
|
|
57
60
|
import { StyleValue } from "./entities/system/style-bag.js";
|
|
61
|
+
import { RegisteredTokenValues, TOKEN_READERS, TokenGroupReader, TokenReader, TokenReaders, TokenValueEntry, TokenValueRow, TokenValueState, rootFontSize, tokenExists, tokenValueRow, tokenValueRows } from "./entities/system/token-values.js";
|
|
62
|
+
import { OverrideCondition, Token, TokenBody, TokenRefPath, TokenReference, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
58
63
|
import { AsInput, AuthoredComponent, AuthoredProp, ComponentBuilder, ComponentPropsOf, GlyphComponent, LayerElement, LayerMap, PropCondition, PropDecl, PropMap, RegisteredMembers, RenderArgs, StyleRuleInput, defineComponent } from "./entities/system/defineComponent.js";
|
|
59
64
|
import { AuthoredPropBody, Component, ComponentBody, ComponentElementBody, ComponentPropBody, ComponentReference, ComponentStyleBody, ElementVisibility, ElementVisibilityInput, ExtendedComponentRef, ProjectedVisibility, VariantValueBody, VariantValues, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
60
65
|
import { Composite } from "./entities/system/Composite.js";
|
|
@@ -73,7 +78,6 @@ import { Operation } from "./entities/system/Operation.js";
|
|
|
73
78
|
import { Package } from "./entities/system/Package.js";
|
|
74
79
|
import { DeclaredRuntimeModule, declaredRuntimeModules } from "./entities/system/runtime-modules.js";
|
|
75
80
|
import { BuildSection, CSS_DEFAULTS, CssPrefix, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf } from "./entities/system/Settings.js";
|
|
76
|
-
import { OverrideCondition, Token, TokenBody, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
77
81
|
import { Tool } from "./entities/system/Tool.js";
|
|
78
82
|
import { TokenBinding, TokenMatch, matchTokens, searchTokens, tokenBinding } from "./entities/system/token-index.js";
|
|
79
83
|
import { AnatomyIssue, AnatomyIssueKind, AnatomyReport, DiffOptions, RenderedNode, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, anatomyIssueKey, diffRendered, normalizeStyleValue, renderedSignatureOf, snapshotHtml } from "./framework/anatomy-check.js";
|
|
@@ -94,9 +98,10 @@ import { ConfigSession, ConfigSessionOptions, ConfigSink, ConfigSource, DraftSou
|
|
|
94
98
|
import { SignatureOptions, renderSignature, signatureOf } from "./framework/signature.js";
|
|
95
99
|
import { DanglingDirective, DanglingRef, LeafAddress, MisdeclaredOverlay, OverlayVerb, RedundantQualifier, UnadoptedDirective, UnreadableBorrow, UnstatableCondition, classifyOverlay, danglingDirectives, danglingSourcedRefs, leafAddresses, leafVerb, misdeclaredOverlays, overlayVerb, redundantQualifiers, unadoptedDirectives, unreadableBorrows, unstatableConditions, valueAt } from "./framework/source-integrity.js";
|
|
96
100
|
import { applyPathDelta, isPlainObject, namedFields, pathDelta, pathSegments, setAtPath, touchedFields } from "./framework/utils/field-path.js";
|
|
101
|
+
import { isIdentifier, isReservedWord } from "./framework/utils/identifier.js";
|
|
97
102
|
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
98
103
|
import { SpecNode, validateSpec } from "./framework/validate-spec.js";
|
|
99
104
|
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
100
105
|
import { views } from "./framework/views-facade.js";
|
|
101
106
|
import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
102
|
-
export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, 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_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type GlyphComponent, type GlyphSource, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedSource, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, Token, type TokenBinding, type TokenBody, type TokenMatch, Tool, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, 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, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
107
|
+
export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, type AiFlowOrigin, AiGeneration, type AiLane, AiMessage, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, type AnySystemConfig, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, type CanvasRoleName, CanvasSection, type CaptureToSpecOptions, type CaptureToSpecResult, type CapturedChild, type CapturedElement, CapturedNode, type CapturedNodeJson, type Spec as CapturedSpec, type SpecElement as CapturedSpecElement, type CapturedText, type Cell, type CellSlot, type Change, type ChangeHook, type ChangeTarget, type ChildrenPolicy, type ClassGrammar, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentContractOf, type ComponentElementBody, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentStyleBody, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type ComputedFields, type ComputedFunctions, type ComputedInput, type ComputedMap, type ComputedValue, Config, type ConfigClass, type ConfigEdit, ConfigFormatError, type ConfigInstance, type ConfigIssue, type ConfigIssueCode, type ConfigKind, type ConfigOp, ConfigRejection, ConfigSession, type ConfigSessionOptions, type ConfigSink, type ConfigSource, type CopyPlan, type CopyPlanInput, type CopyPlanRow, type CreateInput, type CssGrammar, type CssPrefix, type CssPropertyEntry, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, type DanglingDirective, type DanglingLocalRef, type DanglingRef, type DeclaredRuntimeModule, type DeletePlan, type DeriveMembers, type DerivedColor, type DerivedEntityClass, type DerivedOp, Device, type DiffOptions, Documentation, DocumentationLibrary, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, Font, FontFile, type ForwardClaims, GROUP, GUIDANCE_LANES, GlobalStyle, type GlyphComponent, type GlyphSource, type GoverningCondition, type Gradient, type GroupBody, Guidance, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconGlyph, type IconHook, type IconLibrary, type IconMemberMetadata, type IconMetadataAdapter, type IconMetadataDeclaration, type IconMetadataFile, type IconMetadataFormat, type IconTool, type IconVariantAs, type IdentifiedOp, type InferredRename, type Instance, type InstanceSlot, type InstanceSpec, type ItemOf, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, LinkedSystem, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierGroupMeta, Motion, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, type OpHandler, type OpInput, Operation, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLAYGROUND_DEFAULTS, Package, Page, type Patch, type PathOf, type PinDirective, type PinOptions, type PinOptionsField, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemConfig, type RebaseConflict, type RebaseOrigin, type RebaseResult, type RecordedSource, type RedundantQualifier, type Ref, type RefGraph, type RefGraphEntry, type RefIndex, type RefIndexChange, type RefMember, type RefTarget, type RegisteredComponentContracts, type RegisteredEntities, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type ResolveContext, type ResolveValueTypeInput, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotTarget, Snapshot, type Source, type SourceAnswer, type SourceChange, type SourceMap, type SourceResolution, type SourceResolutionSchemas, type SourceResolver, type SourceRowState, type SourceState, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredPreviewCondition, type StylePropEntry, type StylePropLeaf, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemConfig, SystemSection, SystemSource, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenGroupReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, Tool, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueType, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AI_LANES, GUIDANCE_LANES } from "./ai-lanes.js";
|
|
2
2
|
import { CapturedNode, capturedFromDom, elementFromCaptured } from "./capture/captured-tree.js";
|
|
3
|
-
import { ENTITY_PATH_MESSAGE, MINTED, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
|
|
3
|
+
import { ENTITY_PATH_MESSAGE, MINTED, collectRefs, entityRefOf, isEntityPath, isExtendedRef, isMintedRow, isRef, kindOf, memberOf, memberRef, orRef, pathOf, ref, refLeaf, refSchema, refTo, rewriteRefNamespace, rewriteRefSource, rewriteRefs, sourceOf, splitRef } from "./framework/utils/refs.js";
|
|
4
4
|
import { VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
|
|
5
5
|
import { BUILD_DEFAULTS } from "./configs/build-options.js";
|
|
6
|
+
import { resolveValueType, sniffValueType } from "./css/value-type.js";
|
|
7
|
+
import { parseRootFontSize } from "./css/root-font-size.js";
|
|
6
8
|
import { CONFIG_OPERATION_KIND } from "./framework/config-operation-kind.js";
|
|
7
9
|
import { ConfigFormatError, ConfigRejection, isConfigFormatError, isConfigRejection } from "./framework/rejection.js";
|
|
8
10
|
import { describePatch } from "./framework/plan.js";
|
|
@@ -14,12 +16,15 @@ import { GROUP, brandGroup, isGroupBody } from "./framework/utils/group.js";
|
|
|
14
16
|
import { defineEntity } from "./framework/defineEntity.js";
|
|
15
17
|
import { defineSubEntity } from "./framework/defineSubEntity.js";
|
|
16
18
|
import { BuildSection, CSS_DEFAULTS, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, varPrefixOf } from "./entities/system/Settings.js";
|
|
17
|
-
import { alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
|
|
19
|
+
import { DERIVED_COLOR_SPACE, alpha, darken, isDerivedColor, isGradient, lighten, linearGradient, mix, renderDerivedColor, renderGradient } from "./entities/system/color.js";
|
|
20
|
+
import { isTransition, renderTransition, transition } from "./entities/system/transition.js";
|
|
21
|
+
import { composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, isComposedValue, renderComposedValue } from "./entities/system/composed-values.js";
|
|
18
22
|
import { Font, FontFile, fontFamilyStack } from "./entities/system/Font.js";
|
|
19
23
|
import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
|
|
20
24
|
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
21
25
|
import { Composite } from "./entities/system/Composite.js";
|
|
22
26
|
import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf } from "./entities/system/Modifier.js";
|
|
27
|
+
import { isIdentifier, isReservedWord } from "./framework/utils/identifier.js";
|
|
23
28
|
import { STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
|
|
24
29
|
import { createSliceMemo } from "./framework/memo.js";
|
|
25
30
|
import { UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
|
|
@@ -31,6 +36,8 @@ import { ANATOMY_MARKER, anatomyElementComponent, anatomyTextProp, boundElementT
|
|
|
31
36
|
import { instanceHolding } from "./spec/instance.js";
|
|
32
37
|
import { Package } from "./entities/system/Package.js";
|
|
33
38
|
import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
39
|
+
import { TOKEN_READERS, rootFontSize, tokenExists, tokenValueRow, tokenValueRows } from "./entities/system/token-values.js";
|
|
40
|
+
import { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
34
41
|
import { Component, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
35
42
|
import { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
36
43
|
import { classGrammar } from "./capture/class-grammar.js";
|
|
@@ -67,7 +74,6 @@ import { planCopy, sourceEntries } from "./entities/system/copy-plan.js";
|
|
|
67
74
|
import { planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
|
|
68
75
|
import { LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug } from "./entities/system/LinkedSystem.js";
|
|
69
76
|
import { Motion } from "./entities/system/Motion.js";
|
|
70
|
-
import { Token, defineOverride, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers } from "./entities/system/Token.js";
|
|
71
77
|
import { danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
|
|
72
78
|
import { System } from "./configs/system.js";
|
|
73
79
|
import { AiChat, AiFlow, AiGeneration, AiMessage, Canvas, CanvasConfig, Node, Page, SystemSource, createCanvasConfig } from "./configs/CanvasConfig.js";
|
|
@@ -79,7 +85,6 @@ import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
|
79
85
|
import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
|
|
80
86
|
import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
|
|
81
87
|
import { ReactNativeSystem } from "./configs/react-native-system.js";
|
|
82
|
-
import { resolveValueType, sniffValueType } from "./css/value-type.js";
|
|
83
88
|
import { defineComponent } from "./entities/system/defineComponent.js";
|
|
84
89
|
import { declaredRuntimeModules } from "./entities/system/runtime-modules.js";
|
|
85
90
|
import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
|
|
@@ -93,4 +98,4 @@ import { inferredRenames } from "./framework/rename-inference.js";
|
|
|
93
98
|
import { ConfigSession, memoryConfigSource } from "./framework/session.js";
|
|
94
99
|
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
95
100
|
import { validateSpec } from "./framework/validate-spec.js";
|
|
96
|
-
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_MUTATIONS, Device, Documentation, DocumentationLibrary, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, Token, Tool, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, 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, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isSystemConfig, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, registerSchemaMigrations, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, toCssPropertyName, tokenBinding, touchedFields, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
101
|
+
export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, AiGeneration, AiMessage, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, Canvas, CanvasConfig, CanvasRole, CanvasSection, CapturedNode, Component, Composite, Config, ConfigFormatError, ConfigRejection, ConfigSession, CssSection, DERIVED_COLOR_SPACE, DERIVED_MUTATIONS, Device, Documentation, DocumentationLibrary, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, Entity, File, Font, FontFile, GROUP, GUIDANCE_LANES, GlobalStyle, Guidance, GuidanceStyle, ICON_METADATA_FORMATS, Icon, LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, MINTED, MODIFIER_CATEGORIES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, STYLE_PROPERTIES, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, TOKEN_READERS, Token, Tool, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, addressOf, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, authoredBag, authoredValue, authoringSignatures, baseOf, blankComponentBody, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, className, classPrefixOf, classifyOverlay, classifyStylePropValue, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, editOp, elementFromCaptured, entityRefOf, entryKeyOf, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconResolver, iconToolAxisOptions, iconToolLibraries, iconToolOf, iconVariantAs, inferredRenames, inputOf, instanceHolding, instanceSpec, intoName, isAuthored, isBinaryAsset, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isDeclaredElementProp, isDerivedColor, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isLinkSlug, isMintedRow, isNativeConfig, isPlainObject, isPreviewElement, isRef, isReservedWord, isSystemConfig, isTransition, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, liveStateProps, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, nameIconsInTree, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, opOf, opVerb, opacityPercentage, opsForKind, orRef, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, partsOf, pathDelta, pathOf, pathSegments, placedGlyphElement, planBreak, planCopy, planLink, planUnlink, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, redundantQualifiers, ref, refGraphOf, refLeaf, refListOf, refSchema, refTo, registerSchemaMigrations, renderComposedValue, renderDerivedColor, renderGradient, renderSignature, renderStyleValue, renderTransition, renderedElement, renderedSignatureOf, renderedTarget, resolutionSchema, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveRegistryDir, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, signatureOf, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, splitRef, splitStyleProps, stamp, statePointerProp, storedPreview, styleAliasesOf, styleDeclarations, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, toCssPropertyName, tokenBinding, tokenExists, tokenValueRow, tokenValueRows, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -15,10 +15,10 @@ import { StoredPreviewCondition } from "../../framework/preview-store.js";
|
|
|
15
15
|
import { listSlots, namedSlots, slotHostedBy, slotOf } from "../../spec/slot.js";
|
|
16
16
|
import { cellAt } from "../../spec/cell.js";
|
|
17
17
|
import { instanceAt } from "../../spec/instance.js";
|
|
18
|
-
import {
|
|
18
|
+
import { ComposedValue } from "../../entities/system/composed-values.js";
|
|
19
19
|
import { StyleValue } from "../../entities/system/style-bag.js";
|
|
20
|
+
import { OverrideCondition, TokenRefPath, TokenReference } from "../../entities/system/Token.js";
|
|
20
21
|
import { ComponentElementBody, ComponentReference, ComponentStyleBody } from "../../entities/system/Component.js";
|
|
21
|
-
import { OverrideCondition } from "../../entities/system/Token.js";
|
|
22
22
|
import { DocumentRename } from "../../spec/rewrite-refs.js";
|
|
23
23
|
import * as _$zod from "zod";
|
|
24
24
|
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
@@ -222,6 +222,7 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
222
222
|
}, _$zod_v4_core0.$strict>]>>;
|
|
223
223
|
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
224
224
|
preflight: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
225
|
+
rem: _$zod.ZodOptional<_$zod.ZodString>;
|
|
225
226
|
safelist: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
226
227
|
}, _$zod_v4_core0.$strict>>;
|
|
227
228
|
playground: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
@@ -229,12 +230,12 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
229
230
|
port: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
230
231
|
}, _$zod_v4_core0.$strict>>;
|
|
231
232
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "settings", Record<never, never>, Record<never, never>, true, Record<never, never>, Record<never, never>>;
|
|
232
|
-
tokens: EntityClass<_$zod.ZodObject<{
|
|
233
|
-
value: _$zod.ZodType<string | number | Ref |
|
|
233
|
+
tokens: Omit<EntityClass<_$zod.ZodObject<{
|
|
234
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
234
235
|
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
235
236
|
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
236
237
|
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
237
|
-
value: _$zod.ZodType<string | number | Ref |
|
|
238
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
238
239
|
}, _$zod_v4_core0.$strip>>>;
|
|
239
240
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
240
241
|
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -242,7 +243,9 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
242
243
|
readonly create: {
|
|
243
244
|
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
244
245
|
};
|
|
245
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never
|
|
246
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
247
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
248
|
+
};
|
|
246
249
|
components: Omit<EntityClass<_$zod.ZodObject<{
|
|
247
250
|
layers: SubEntityClass<_$zod.ZodUnion<readonly [_$zod.ZodString, _$zod.ZodLazy<_$zod.ZodType<Ref, unknown, _$zod_v4_core0.$ZodTypeInternals<Ref, unknown>>>, EntityClass<_$zod.ZodObject<{
|
|
248
251
|
version: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -411,6 +414,22 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
411
414
|
__ref: _$zod.ZodString;
|
|
412
415
|
}, _$zod_v4_core0.$strip>>;
|
|
413
416
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
417
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
418
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
419
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
420
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
421
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
422
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
423
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
424
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
425
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
426
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
427
|
+
readonly create: {
|
|
428
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
429
|
+
};
|
|
430
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
431
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
432
|
+
}>>;
|
|
414
433
|
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
415
434
|
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
416
435
|
}, _$zod_v4_core0.$strip>, "component", {
|
|
@@ -583,6 +602,22 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
583
602
|
__ref: _$zod.ZodString;
|
|
584
603
|
}, _$zod_v4_core0.$strip>>;
|
|
585
604
|
export: _$zod.ZodOptional<_$zod.ZodString>;
|
|
605
|
+
tokenRefs: _$zod.ZodOptional<_$zod.ZodArray<Omit<EntityClass<_$zod.ZodObject<{
|
|
606
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
607
|
+
type: _$zod.ZodOptional<_$zod.ZodString>;
|
|
608
|
+
overrides: _$zod.ZodOptional<SubEntityClass<_$zod.ZodObject<{
|
|
609
|
+
on: _$zod.ZodType<OverrideCondition, unknown, _$zod_v4_core0.$ZodTypeInternals<OverrideCondition, unknown>>;
|
|
610
|
+
value: _$zod.ZodType<string | number | Ref | ComposedValue, unknown, _$zod_v4_core0.$ZodTypeInternals<string | number | Ref | ComposedValue, unknown>>;
|
|
611
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
612
|
+
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
613
|
+
cssPrefix: _$zod.ZodOptional<_$zod.ZodString>;
|
|
614
|
+
}, _$zod_v4_core0.$strip>, "token", {
|
|
615
|
+
readonly create: {
|
|
616
|
+
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
617
|
+
};
|
|
618
|
+
}, Record<never, never>, false, Record<never, never>, Record<never, never>>, "ref"> & {
|
|
619
|
+
readonly ref: <const Path extends TokenRefPath>(path: Path) => TokenReference<Path>;
|
|
620
|
+
}>>;
|
|
586
621
|
}, _$zod_v4_core0.$strict>;
|
|
587
622
|
readonly description: "Create a component at a new qualified `path`. For a component with nothing in it yet, one to design on the canvas before it has props or variants, use `create-blank` with only a `path` instead of authoring a minimal body here. When its complete body is known, include all layers, anatomy, props, defaults, and styles in this one operation. `data.layers` maps each stable layer name to the element it renders and must include `root` — a tag for a primitive (`{ \"layers\": { \"root\": \"div\" } }`), and for anything built on top, a ref to a primitive (`{ \"root\": { \"__ref\": \"component:Box\" }, \"label\": { \"__ref\": \"component:Text\" } }`), which is what lets the layer take that primitive's style props. A primitive exposes style props as `{ \"type\": \"styleProperty\", \"value\": { \"__ref\": \"style-property:bg\" } }` and declares `children: { \"type\": \"slot\", \"text\": true }` when it holds content — without the slot, nothing nested inside it renders. A composed component exposes a layer's props at its own top level through `forwards`, keyed by layer: `{ \"forwards\": { \"root\": \"*\" } }` passes every prop the root's element takes (so `<Button width=\"full\">` reaches the root's `width`), and a list of member refs (`[{ \"__ref\": \"component:Box#props/width\" }]`, each naming the component that declares the prop) passes only those. A prop a layer already exposes is forwarded, never redeclared in `props`; a `props` entry of `{ \"type\": \"forward\" }` is the reverse route, one of this component's props into a layer's. `anatomy` is the tree the build would read off a render: each node renders a layer (`{ \"__ref\": \"layer:<name>\" }`), an intrinsic tag, or `Slot` (`{ \"element\": \"Slot\", \"props\": { \"name\": \"children\" } }`, where a slot prop's content lands — but a declared slot fills `root` by default, so a primitive still declares its `children` slot prop yet needs no `Slot` node or `children` entry for it, and a `Slot` node is only for landing that content in a nested layer); `children` lists sibling node keys from the `root` node, never a prop name; `text` is a fixed string; `visible` is a condition on a prop (`{ \"$state\": \"<prop>\" }`, or with `eq`); content shown in a nested layer is a route, `children: { \"type\": \"forward\", \"target\": \"label/children\" }`. `$state` appears only in `visible` and in an `element` a prop chooses, never as a prop value. A glyph is a node of its own, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" } }`, listed in the `children` of the layer node that holds it, never a prop value. Text a prop supplies to a text layer is never a node either: declare the prop `{ \"type\": \"forward\", \"target\": \"<layer>/children\" }` and the layer shows it; a `Slot` node goes only under a layer that takes nodes. A style rule is `\"styles\": { \"*\": { \"when\": null, \"layers\": { \"root\": { \"bg\": \"surface\" } } } }`, keyed by a name, with each layer's bag under `layers`. A composed component carries its own styles: give it an unconditional (`\"*\"`) rule that lays out and surfaces it through the system's style properties — spacing, alignment and gap on the container, a background and color where it has one — rather than leaning on the bare primitives, which paint flat. Style a layer only with the style props the primitive it renders exposes, set to the values those props accept: `component/get` on the primitive lists both, so read it and choose from that rather than reaching for a CSS name or value the system has no style property for. Set `preview` (`{ \"*\": { \"when\": null, \"props\": { \"children\": \"Example\" } } }`) or `defaultProps` so the component previews with content; a root that takes children renders empty otherwise. A style rule's layer bag is keyed by style-prop name (`fontWeight`, `color`), never by CSS property name, and each value is one of that prop's values.";
|
|
588
623
|
readonly example: ({
|
|
@@ -1631,8 +1666,8 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
1631
1666
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "composite", Record<never, never>, Record<never, never>, false, Record<never, never>, Record<never, never>>>]>;
|
|
1632
1667
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1633
1668
|
type: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1634
|
-
state: "state";
|
|
1635
1669
|
mode: "mode";
|
|
1670
|
+
state: "state";
|
|
1636
1671
|
}>>;
|
|
1637
1672
|
default: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1638
1673
|
__ref: _$zod.ZodString;
|
|
@@ -6,6 +6,7 @@ import { Composite } from "../../entities/system/Composite.js";
|
|
|
6
6
|
import { Modifier } from "../../entities/system/Modifier.js";
|
|
7
7
|
import { StyleProperty } from "../../entities/system/StyleProperty.js";
|
|
8
8
|
import { cssVar } from "../../framework/projections.js";
|
|
9
|
+
import { Token, overrideKey } from "../../entities/system/Token.js";
|
|
9
10
|
import { Component, canonicalWhen } from "../../entities/system/Component.js";
|
|
10
11
|
import { Icon } from "../../entities/system/Icon.js";
|
|
11
12
|
import { stableStringify } from "../../framework/utils/content-key.js";
|
|
@@ -13,7 +14,6 @@ import { CanvasRole } from "../../entities/system/CanvasRole.js";
|
|
|
13
14
|
import { GlobalStyle, globalStyleName } from "../../entities/system/GlobalStyle.js";
|
|
14
15
|
import { Guidance } from "../../entities/system/Guidance.js";
|
|
15
16
|
import { Motion } from "../../entities/system/Motion.js";
|
|
16
|
-
import { Token, overrideKey } from "../../entities/system/Token.js";
|
|
17
17
|
import { danglingLocalRefs } from "../../framework/ref-integrity.js";
|
|
18
18
|
import { parseRawCss } from "./raw-css.js";
|
|
19
19
|
import { System } from "../../configs/system.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A token's `value` may be a composed transition: the properties it animates and the timing they
|
|
3
|
+
* run on, held as parts so the timing stays a ref
|
|
4
|
+
* (`{ "transition": [{ "properties": ["opacity"], "timing": { "__ref": "token:motion/color" } }] }`).
|
|
5
|
+
* A style bag accepts the same form.
|
|
6
|
+
*
|
|
7
|
+
* Additive: no stored value changes shape, so `up` is the identity and no patch is reshaped.
|
|
8
|
+
*
|
|
9
|
+
* Deletable once no stored artifact predates it.
|
|
10
|
+
*/
|
|
11
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
12
|
+
export declare const TRANSITION_TOKEN_VALUE_VERSION = 20260923144958;
|
|
13
|
+
export declare const transitionTokenValueMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20260923144958_transition_token_value.ts
|
|
2
|
+
const TRANSITION_TOKEN_VALUE_VERSION = 20260923144958;
|
|
3
|
+
const transitionTokenValueMigration = {
|
|
4
|
+
version: TRANSITION_TOKEN_VALUE_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { TRANSITION_TOKEN_VALUE_VERSION, transitionTokenValueMigration };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stored component gains `tokenRefs`: the tokens its render reads as values
|
|
3
|
+
* (`Token.ref('spacing/2.5').px()`), baked from the source the way `file` is. Each is an ordinary
|
|
4
|
+
* ref, so the graph sees the read: a rename reaches it, a delete names the component, and a link's
|
|
5
|
+
* closure carries the token. The `css` settings gain `rem`, the page's root font size as CSS. A
|
|
6
|
+
* component or settings stored before this version has neither and means what it meant.
|
|
7
|
+
*
|
|
8
|
+
* Additive; nothing stored before this version reshapes.
|
|
9
|
+
*
|
|
10
|
+
* Deletable once no stored artifact predates it.
|
|
11
|
+
*/
|
|
12
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
13
|
+
export declare const RENDER_TOKEN_REFS_VERSION = 20260923160425;
|
|
14
|
+
export declare const renderTokenRefsMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20260923160425_render_token_refs.ts
|
|
2
|
+
const RENDER_TOKEN_REFS_VERSION = 20260923160425;
|
|
3
|
+
const renderTokenRefsMigration = {
|
|
4
|
+
version: RENDER_TOKEN_REFS_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { RENDER_TOKEN_REFS_VERSION, renderTokenRefsMigration };
|