@yahoo/uds-create-config 4.12.0 → 4.13.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/react-native-system.d.ts +8 -0
- package/dist/configs/system.d.ts +8 -0
- package/dist/configs/system.js +2 -0
- package/dist/entities/system/CanvasRole.d.ts +5 -1
- package/dist/entities/system/CanvasRole.js +7 -2
- package/dist/entities/system/Component.js +2 -10
- package/dist/entities/system/Icon.d.ts +2 -0
- package/dist/entities/system/Icon.js +9 -3
- package/dist/entities/system/defineComponent.d.ts +6 -3
- package/dist/entities/system/element.d.ts +0 -11
- package/dist/entities/system/element.js +11 -2
- package/dist/entities/system/icon-library.d.ts +21 -6
- package/dist/entities/system/icon-library.js +35 -14
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/projections.d.ts +27 -8
- package/dist/framework/projections.js +49 -11
- package/dist/framework/prop-surface.d.ts +24 -1
- package/dist/framework/prop-surface.js +42 -9
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/migrations/2.0.0/v1-artifact.d.ts +4 -0
- package/dist/migrations/20260923005318_icon_canvas_tool.d.ts +12 -0
- package/dist/migrations/20260923005318_icon_canvas_tool.js +8 -0
- package/dist/renderer/glyphEntries.d.ts +6 -5
- package/dist/renderer/glyphEntries.js +17 -13
- package/dist/renderer/glyphRenderable.js +19 -12
- package/dist/renderer/icon-library.d.ts +5 -2
- package/dist/renderer/resolveGlyph.d.ts +6 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -147,7 +147,30 @@ interface ForwardClaims {
|
|
|
147
147
|
readonly own: ReadonlySet<string>;
|
|
148
148
|
/** Forwarded name → the layer whose entry delivers it. The first entry in key order wins an overlap. */
|
|
149
149
|
readonly forwarded: ReadonlyMap<string, string>;
|
|
150
|
+
/** Own declarations that change the type of a name a forwards entry offers, one row per prop. */
|
|
151
|
+
readonly shadowed: readonly ShadowedForward[];
|
|
152
|
+
}
|
|
153
|
+
interface ShadowedForward {
|
|
154
|
+
readonly component: string;
|
|
155
|
+
readonly prop: string;
|
|
156
|
+
/** The layer whose entry would have delivered the prop, and that layer's element with its source. */
|
|
157
|
+
readonly layer: string;
|
|
158
|
+
readonly element: string;
|
|
159
|
+
/** How this component declares the prop (`variant`, `string`, …). */
|
|
160
|
+
readonly declared: string;
|
|
161
|
+
/** How the layer's element declares it. */
|
|
162
|
+
readonly forwarded: string;
|
|
150
163
|
}
|
|
151
164
|
declare function forwardClaims(config: Config, componentPath: string): ForwardClaims;
|
|
165
|
+
/** A component's own props that redeclare, as another type, a name a `forwards` entry offers. The
|
|
166
|
+
* own declaration wins, so the element's prop of that name is unreachable through this component
|
|
167
|
+
* and a call site's value means something else than it does on the element. */
|
|
168
|
+
declare function shadowedForwards({
|
|
169
|
+
config,
|
|
170
|
+
path
|
|
171
|
+
}: {
|
|
172
|
+
readonly config: Config;
|
|
173
|
+
readonly path: string;
|
|
174
|
+
}): ShadowedForward[];
|
|
152
175
|
//#endregion
|
|
153
|
-
export { ForwardClaims, SurfaceCompositeProp, SurfaceProp, SurfacePropCondition, SurfacePropKind, SurfaceScalarProp, SurfaceSlotProp, SurfaceStylePropertyProp, SurfaceVariantProp, forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps };
|
|
176
|
+
export { ForwardClaims, ShadowedForward, SurfaceCompositeProp, SurfaceProp, SurfacePropCondition, SurfacePropKind, SurfaceScalarProp, SurfaceSlotProp, SurfaceStylePropertyProp, SurfaceVariantProp, forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, shadowedForwards, surfaceProp, surfaceProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isRef, kindOf, memberOf, pathOf, refLeaf } from "./utils/refs.js";
|
|
1
|
+
import { isRef, kindOf, memberOf, pathOf, refLeaf, splitRef } from "./utils/refs.js";
|
|
2
2
|
import { forwardsOf, rootLayerOf } from "../entities/system/element.js";
|
|
3
|
-
import { propValueDomain, refListOf, resolveComponentProps } from "./projections.js";
|
|
3
|
+
import { propValueDomain, refListOf, resolveComponentProps, takenByForward } from "./projections.js";
|
|
4
4
|
import { Component } from "../entities/system/Component.js";
|
|
5
5
|
//#region src/framework/prop-surface.ts
|
|
6
6
|
/**
|
|
@@ -302,9 +302,12 @@ function computeForwardClaims(config, componentPath) {
|
|
|
302
302
|
const body = Component.get(config, componentPath)?.toJSON();
|
|
303
303
|
const own = /* @__PURE__ */ new Set();
|
|
304
304
|
const forwarded = /* @__PURE__ */ new Map();
|
|
305
|
+
const shadowed = [];
|
|
306
|
+
const seenShadow = /* @__PURE__ */ new Set();
|
|
305
307
|
if (!body) return {
|
|
306
308
|
own,
|
|
307
309
|
forwarded,
|
|
310
|
+
shadowed,
|
|
308
311
|
rootLayer: void 0
|
|
309
312
|
};
|
|
310
313
|
const { layers = {}, props = {}, forwards } = body;
|
|
@@ -313,19 +316,42 @@ function computeForwardClaims(config, componentPath) {
|
|
|
313
316
|
for (const [layer, entry] of Object.entries(forwardsOf({ forwards }))) {
|
|
314
317
|
const element = layers[layer];
|
|
315
318
|
if (!isRef(element)) continue;
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
const taken = takenByForward({
|
|
320
|
+
entry,
|
|
321
|
+
exposed: resolveComponentProps(config, pathOf(element.__ref))
|
|
322
|
+
});
|
|
323
|
+
for (const [name, theirs] of Object.entries(taken)) {
|
|
324
|
+
if (own.has(name)) {
|
|
325
|
+
if (seenShadow.has(name)) continue;
|
|
326
|
+
seenShadow.add(name);
|
|
327
|
+
const declared = declaredTypeOf(props[name]);
|
|
328
|
+
const forwardedType = declaredTypeOf(theirs);
|
|
329
|
+
if (props[name] === null || declared === "forward" || declared === forwardedType) continue;
|
|
330
|
+
shadowed.push({
|
|
331
|
+
component: componentPath,
|
|
332
|
+
prop: name,
|
|
333
|
+
layer,
|
|
334
|
+
element: splitRef(element.__ref).qualifiedPath,
|
|
335
|
+
declared,
|
|
336
|
+
forwarded: forwardedType
|
|
337
|
+
});
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
if (forwarded.has(name)) continue;
|
|
320
341
|
forwarded.set(name, layer);
|
|
321
342
|
}
|
|
322
343
|
}
|
|
323
344
|
return {
|
|
324
345
|
own,
|
|
325
346
|
forwarded,
|
|
347
|
+
shadowed,
|
|
326
348
|
rootLayer
|
|
327
349
|
};
|
|
328
350
|
}
|
|
351
|
+
function declaredTypeOf(decl) {
|
|
352
|
+
const type = decl?.type;
|
|
353
|
+
return typeof type === "string" ? type : "unknown";
|
|
354
|
+
}
|
|
329
355
|
/**
|
|
330
356
|
* Each non-root layer a component forwards to, and the sorted prop names each one receives — the
|
|
331
357
|
* emitter's view, which writes a literal key set per layer. Root is absent on purpose: it takes
|
|
@@ -344,11 +370,18 @@ function forwardedLayers(config, componentPath) {
|
|
|
344
370
|
return out;
|
|
345
371
|
}
|
|
346
372
|
function forwardClaims(config, componentPath) {
|
|
347
|
-
const { own, forwarded } = computeForwardClaims(config, componentPath);
|
|
373
|
+
const { own, forwarded, shadowed } = computeForwardClaims(config, componentPath);
|
|
348
374
|
return {
|
|
349
375
|
own,
|
|
350
|
-
forwarded
|
|
376
|
+
forwarded,
|
|
377
|
+
shadowed
|
|
351
378
|
};
|
|
352
379
|
}
|
|
380
|
+
/** A component's own props that redeclare, as another type, a name a `forwards` entry offers. The
|
|
381
|
+
* own declaration wins, so the element's prop of that name is unreachable through this component
|
|
382
|
+
* and a call site's value means something else than it does on the element. */
|
|
383
|
+
function shadowedForwards({ config, path }) {
|
|
384
|
+
return computeForwardClaims(config, path).shadowed;
|
|
385
|
+
}
|
|
353
386
|
//#endregion
|
|
354
|
-
export { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, routesIntoText, surfaceProp, surfaceProps };
|
|
387
|
+
export { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, routesIntoText, shadowedForwards, surfaceProp, surfaceProps };
|
|
@@ -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 = 20260923005318;
|
|
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 = 20260923005318;
|
|
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 > 20260923005318) 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 ?? 20260923005318;
|
|
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 ?? 20260923005318;
|
|
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 ?? 20260923005318;
|
|
183
183
|
const entries = [];
|
|
184
184
|
const held = [];
|
|
185
185
|
const retired = [];
|
package/dist/index.d.ts
CHANGED
|
@@ -26,17 +26,17 @@ import { CapturedChild, CapturedElement, CapturedNode, CapturedNodeJson, Capture
|
|
|
26
26
|
import { CaptureToSpecOptions, CaptureToSpecResult, IconAnswer, IconHook, Spec, SpecElement, specFromCapture } from "./capture/capture-to-spec.js";
|
|
27
27
|
import { ClassGrammar, classGrammar } from "./capture/class-grammar.js";
|
|
28
28
|
import { Icon, IconVariantAs, iconVariantAs } from "./entities/system/Icon.js";
|
|
29
|
-
import { IconLibrary, glyphExportNames, glyphType, iconCategories, iconLibraries, iconLibrary, isDeclaredElementProp, librariesBoundBy, libraryHolding, memberVariantOptions, placedGlyphElement, resolveIconLibraries } from "./entities/system/icon-library.js";
|
|
29
|
+
import { IconLibrary, glyphExportNames, glyphType, iconCategories, iconLibraries, iconLibrary, iconToolLibraries, isDeclaredElementProp, librariesBoundBy, libraryHolding, memberVariantOptions, placedGlyphElement, resolveIconLibraries } from "./entities/system/icon-library.js";
|
|
30
30
|
import { GlyphSource, IconGlyph, glyphSourcesOf, iconResolver, nameIconsInTree } from "./capture/icon-resolver.js";
|
|
31
31
|
import { specToNodePatches } from "./capture/node-patches.js";
|
|
32
32
|
import { BUILD_DEFAULTS } from "./configs/build-options.js";
|
|
33
33
|
import { ANATOMY_MARKER, ComponentSpec, ComponentSpecs, ExpandOptions, ExpansionResult, RenderElement, RenderSpec, SlotTarget, VisibilityOperator, VisibilityTerm, anatomyElementComponent, anatomyTextProp, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, layerTextProp, liveStateProps, previewSpec, propInto, propsIntoLayer, readStatePointer, resolveVisibility, routeOf, slotTargetsOf, specWithResolvedVisibility, statePointerProp, valueForwardsOf, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
34
34
|
import { RefMember, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StylePropLeaf, StylePropValue, StylePropValueCtx, StylePropValueKind, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
|
|
35
35
|
import { StoredPreviewCondition, UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
|
|
36
|
-
import { PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
|
|
36
|
+
import { IconTool, PreviewMatrix, PropDeclaration, StylePropEntry, StylePropertyItem, authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, iconToolAxisOptions, iconToolOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
|
|
37
37
|
import { PreviewElement, graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
|
|
38
38
|
import { Slot, SlotCell } from "./spec/slot.js";
|
|
39
|
-
import { ForwardClaims, SurfaceCompositeProp, SurfaceProp, SurfacePropCondition, SurfacePropKind, SurfaceScalarProp, SurfaceSlotProp, SurfaceStylePropertyProp, SurfaceVariantProp, forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
39
|
+
import { ForwardClaims, ShadowedForward, SurfaceCompositeProp, SurfaceProp, SurfacePropCondition, SurfacePropKind, SurfaceScalarProp, SurfaceSlotProp, SurfaceStylePropertyProp, SurfaceVariantProp, forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, shadowedForwards, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
40
40
|
import { Cell, CellSlot, GoverningCondition } from "./spec/cell.js";
|
|
41
41
|
import { Instance, InstanceSlot, InstanceSpec, instanceHolding } from "./spec/instance.js";
|
|
42
42
|
import { ReactNativeSystem, ReactNativeSystemConfig } from "./configs/react-native-system.js";
|
|
@@ -99,4 +99,4 @@ import { SpecNode, validateSpec } from "./framework/validate-spec.js";
|
|
|
99
99
|
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
100
100
|
import { views } from "./framework/views-facade.js";
|
|
101
101
|
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 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, 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 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 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, 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, 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 };
|
|
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 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, 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 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 ShadowedForward, 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, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadowedForwards, 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 };
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes,
|
|
|
23
23
|
import { STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName } from "./entities/system/StyleProperty.js";
|
|
24
24
|
import { createSliceMemo } from "./framework/memo.js";
|
|
25
25
|
import { UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
|
|
26
|
-
import { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
|
|
26
|
+
import { authoredBag, authoredValue, className, cssPropValue, cssVar, cssVarRef, declaredPropDefaults, declaredPropRouting, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, iconToolAxisOptions, iconToolOf, keyedPreviewConditions, memberFromLeaf, memberLeaves, negatedCssValue, opacityPercentage, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarations, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, validateComponentProps } from "./framework/projections.js";
|
|
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
29
|
import { graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
|
|
@@ -32,12 +32,12 @@ import { instanceHolding } from "./spec/instance.js";
|
|
|
32
32
|
import { Package } from "./entities/system/Package.js";
|
|
33
33
|
import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
34
34
|
import { Component, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
35
|
-
import { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
35
|
+
import { forwardClaims, forwardedLayers, intoName, propApplies, propRegistryRef, routedProp, routedPropIn, routesContent, shadowedForwards, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
36
36
|
import { classGrammar } from "./capture/class-grammar.js";
|
|
37
37
|
import { specFromCapture } from "./capture/capture-to-spec.js";
|
|
38
38
|
import { ICON_METADATA_FORMATS, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, tablerExportName } from "./entities/system/icon-metadata.js";
|
|
39
39
|
import { Icon, iconVariantAs } from "./entities/system/Icon.js";
|
|
40
|
-
import { glyphExportNames, glyphType, iconCategories, iconLibraries, iconLibrary, isDeclaredElementProp, librariesBoundBy, libraryHolding, memberVariantOptions, placedGlyphElement, resolveIconLibraries } from "./entities/system/icon-library.js";
|
|
40
|
+
import { glyphExportNames, glyphType, iconCategories, iconLibraries, iconLibrary, iconToolLibraries, isDeclaredElementProp, librariesBoundBy, libraryHolding, memberVariantOptions, placedGlyphElement, resolveIconLibraries } from "./entities/system/icon-library.js";
|
|
41
41
|
import { glyphSourcesOf, iconResolver, nameIconsInTree } from "./capture/icon-resolver.js";
|
|
42
42
|
import { specToNodePatches } from "./capture/node-patches.js";
|
|
43
43
|
import { Device } from "./entities/system/Device.js";
|
|
@@ -93,4 +93,4 @@ import { inferredRenames } from "./framework/rename-inference.js";
|
|
|
93
93
|
import { ConfigSession, memoryConfigSource } from "./framework/session.js";
|
|
94
94
|
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
95
95
|
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, 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, 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 };
|
|
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, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rnStyleKey, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routesContent, ruleApplies, ruleCondition, runChangeHooks, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadowedForwards, 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 };
|
|
@@ -1470,6 +1470,10 @@ declare function loadV1Artifact(studio: V1Artifact, options?: LoadV1Options): Co
|
|
|
1470
1470
|
}, _$zod_v4_core0.$strip>;
|
|
1471
1471
|
default: _$zod.ZodOptional<_$zod.ZodBoolean>;
|
|
1472
1472
|
defaultProps: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
|
|
1473
|
+
props: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1474
|
+
glyph: _$zod.ZodString;
|
|
1475
|
+
axes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
1476
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1473
1477
|
}, _$zod_v4_core0.$strip>>;
|
|
1474
1478
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<Record<never, never>, _$zod_v4_core0.$strip>, "canvas-role", {
|
|
1475
1479
|
readonly create: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An additive fence: the `icon` canvas role, and the `props` field on a canvas-role entry that names
|
|
3
|
+
* the prop taking the glyph and the props the picker offers as axes. No stored byte moves.
|
|
4
|
+
*
|
|
5
|
+
* Identity, so a stamp below this version means "may lack these fields" and one at it means they
|
|
6
|
+
* are understood, which is what lets the pull gate keep an older client from stripping them.
|
|
7
|
+
*
|
|
8
|
+
* Deletable once no stored config artifact is below this version.
|
|
9
|
+
*/
|
|
10
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
11
|
+
export declare const ICON_CANVAS_TOOL_VERSION = 20260923005318;
|
|
12
|
+
export declare const iconCanvasToolMigration: SchemaMigration;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/migrations/20260923005318_icon_canvas_tool.ts
|
|
2
|
+
const ICON_CANVAS_TOOL_VERSION = 20260923005318;
|
|
3
|
+
const iconCanvasToolMigration = {
|
|
4
|
+
version: ICON_CANVAS_TOOL_VERSION,
|
|
5
|
+
up: (json) => json
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ICON_CANVAS_TOOL_VERSION, iconCanvasToolMigration };
|
|
@@ -9,17 +9,18 @@ type GlyphMembers = ReadonlyMap<string, ReadonlyMap<string, React.ComponentType<
|
|
|
9
9
|
interface GlyphEntriesResult {
|
|
10
10
|
/** One ctx-shaped registry entry per placed glyph type (`icon:<library>/<Member>`). */
|
|
11
11
|
entries: Record<string, ComponentEntry>;
|
|
12
|
-
/** Each member as the glyph itself, by library and name: what
|
|
12
|
+
/** Each member as the glyph itself, by library and name: what the set's component receives on its
|
|
13
|
+
* glyph prop. */
|
|
13
14
|
glyphMembers: GlyphMembers;
|
|
14
|
-
/** Each member the way a placed glyph paints, through the set's
|
|
15
|
+
/** Each member the way a placed glyph paints, through the set's component when the registry holds
|
|
15
16
|
* one: what a browsing surface shows for it. */
|
|
16
17
|
drawnMembers: GlyphMembers;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* The registry entries an icon library contributes: every member the set ships, keyed by the type a
|
|
20
|
-
*
|
|
21
|
-
* glyph
|
|
22
|
-
* library's
|
|
21
|
+
* raw glyph node carries, and the same members by library and name in two forms — as a component's
|
|
22
|
+
* glyph prop receives them, and as a browsing surface draws them. `components` holds the registry's
|
|
23
|
+
* raw components by key, where a library's component is looked up.
|
|
23
24
|
*/
|
|
24
25
|
declare function glyphRegistryEntries({
|
|
25
26
|
libraries,
|
|
@@ -3,9 +3,9 @@ import { makeGlyphRenderable } from "./glyphRenderable.js";
|
|
|
3
3
|
//#region src/renderer/glyphEntries.ts
|
|
4
4
|
/**
|
|
5
5
|
* The registry entries an icon library contributes: every member the set ships, keyed by the type a
|
|
6
|
-
*
|
|
7
|
-
* glyph
|
|
8
|
-
* library's
|
|
6
|
+
* raw glyph node carries, and the same members by library and name in two forms — as a component's
|
|
7
|
+
* glyph prop receives them, and as a browsing surface draws them. `components` holds the registry's
|
|
8
|
+
* raw components by key, where a library's component is looked up.
|
|
9
9
|
*/
|
|
10
10
|
function glyphRegistryEntries({ libraries, components = {} }) {
|
|
11
11
|
const entries = {};
|
|
@@ -14,26 +14,30 @@ function glyphRegistryEntries({ libraries, components = {} }) {
|
|
|
14
14
|
for (const group of libraries) {
|
|
15
15
|
const members = group.members;
|
|
16
16
|
if (!members) continue;
|
|
17
|
-
const
|
|
17
|
+
const iconComponent = group.component ? components[group.component] : void 0;
|
|
18
18
|
const bySlug = /* @__PURE__ */ new Map();
|
|
19
19
|
const drawnBySlug = /* @__PURE__ */ new Map();
|
|
20
20
|
for (const name of group.glyphNames) {
|
|
21
21
|
const member = members[name];
|
|
22
22
|
if (member === void 0) continue;
|
|
23
|
-
const drawn = makeGlyphRenderable({
|
|
24
|
-
member,
|
|
25
|
-
library: group,
|
|
26
|
-
Drawer
|
|
27
|
-
});
|
|
28
23
|
entries[group.glyphType(name)] = makeComponentEntry({
|
|
29
|
-
component:
|
|
24
|
+
component: makeGlyphRenderable({
|
|
25
|
+
member,
|
|
26
|
+
library: group
|
|
27
|
+
}),
|
|
30
28
|
name: group.glyphType(name)
|
|
31
29
|
});
|
|
32
|
-
|
|
30
|
+
const handed = group.variantAs && "export" in group.variantAs ? makeGlyphRenderable({
|
|
33
31
|
member,
|
|
34
|
-
library: group
|
|
32
|
+
library: group,
|
|
33
|
+
sized: false
|
|
34
|
+
}) : member;
|
|
35
|
+
bySlug.set(name, handed);
|
|
36
|
+
drawnBySlug.set(name, makeGlyphRenderable({
|
|
37
|
+
member,
|
|
38
|
+
library: group,
|
|
39
|
+
iconComponent
|
|
35
40
|
}));
|
|
36
|
-
drawnBySlug.set(name, drawn);
|
|
37
41
|
}
|
|
38
42
|
glyphMembers.set(group.name, bySlug);
|
|
39
43
|
drawnMembers.set(group.name, drawnBySlug);
|
|
@@ -4,20 +4,26 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
/**
|
|
5
5
|
* A library member as a registry renderable.
|
|
6
6
|
*
|
|
7
|
-
* Through the set's
|
|
8
|
-
* component's glyph prop and `size`/`variant` stay
|
|
9
|
-
* paints exactly as the component would. Otherwise the member draws itself through `resolveGlyph`,
|
|
10
|
-
*
|
|
7
|
+
* Through the set's component when one is handed in (the icon tool's, or the one whose prop is
|
|
8
|
+
* bound to the set): the member lands on that component's glyph prop and `size`/`variant` stay its
|
|
9
|
+
* own props, so the glyph paints exactly as the component would. Otherwise the member draws itself through `resolveGlyph`, which turns the set's
|
|
10
|
+
* `variantAs` into the props the glyph takes, and its `sizes` too when the member is `sized` here.
|
|
11
|
+
* The member a component's glyph prop receives is not: that component writes `size` in its
|
|
12
|
+
* package's own vocabulary (`16` for one set, `"sm"` for another), and what it writes reaches the
|
|
13
|
+
* glyph as written.
|
|
11
14
|
*/
|
|
12
|
-
function makeGlyphRenderable({ member, library,
|
|
15
|
+
function makeGlyphRenderable({ member, library, iconComponent, sized = true }) {
|
|
13
16
|
const Member = member;
|
|
14
17
|
const { members, sizes, variantAs, glyphProp } = library;
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
if (iconComponent && glyphProp) {
|
|
19
|
+
const IconComponent = iconComponent;
|
|
20
|
+
return function DrawnGlyph(props) {
|
|
21
|
+
return /* @__PURE__ */ jsx(IconComponent, {
|
|
22
|
+
...props,
|
|
23
|
+
[glyphProp]: Member
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
}
|
|
21
27
|
const facts = {
|
|
22
28
|
glyphs: members ?? {},
|
|
23
29
|
sizes,
|
|
@@ -27,11 +33,12 @@ function makeGlyphRenderable({ member, library, Drawer }) {
|
|
|
27
33
|
const { Glyph, props: glyphProps } = resolveGlyph({
|
|
28
34
|
library: facts,
|
|
29
35
|
glyph: Member,
|
|
30
|
-
size,
|
|
36
|
+
size: sized ? size : void 0,
|
|
31
37
|
variant
|
|
32
38
|
});
|
|
33
39
|
return /* @__PURE__ */ jsx(Glyph, {
|
|
34
40
|
...props,
|
|
41
|
+
...sized ? {} : { size },
|
|
35
42
|
...glyphProps
|
|
36
43
|
});
|
|
37
44
|
};
|
|
@@ -14,9 +14,12 @@ interface IconLibrary {
|
|
|
14
14
|
readonly members?: Record<string, React.ComponentType<any> | undefined>;
|
|
15
15
|
readonly glyphType: (name: string) => string;
|
|
16
16
|
/** How a `variant` reaches a glyph, when the set declares it, so a raw glyph draws the requested
|
|
17
|
-
* variant rather than its default.
|
|
17
|
+
* variant rather than its default.
|
|
18
|
+
* @deprecated Only the raw-draw path reads it; a glyph is drawn through the icon tool's component.
|
|
19
|
+
* TODO: remove with the group field. */
|
|
18
20
|
readonly variantAs?: IconVariantAs;
|
|
19
|
-
/** Named sizes (`sm: 16`), so a raw glyph's `size` names a bucket rather than a pixel count.
|
|
21
|
+
/** Named sizes (`sm: 16`), so a raw glyph's `size` names a bucket rather than a pixel count.
|
|
22
|
+
* @deprecated As {@link variantAs}. */
|
|
20
23
|
readonly sizes?: Readonly<Record<string, number>>;
|
|
21
24
|
/** The registry key of the component that draws this set's glyphs (`component:primitives/Icon`),
|
|
22
25
|
* and the prop it takes the glyph on. Absent, a placed glyph is the member drawn raw. */
|
|
@@ -28,8 +28,12 @@ interface ResolveGlyphArgs {
|
|
|
28
28
|
variant?: string;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* The one place a `variant` and a named `size` become glyph props, so
|
|
32
|
-
*
|
|
31
|
+
* The one place a `variant` and a named `size` become glyph props, so a picker cell and a raw glyph
|
|
32
|
+
* draw the same thing for the same request.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated The raw-draw path: a glyph is drawn through the icon tool's component, which passes
|
|
35
|
+
* `size` and `variant` the way its package wants. TODO: remove with the library's `sizes` and
|
|
36
|
+
* `variantAs`, leaving a raw `icon:` element to render the member with its stored props.
|
|
33
37
|
*
|
|
34
38
|
* `variantAs` decides the variant: `prop` sets it as a prop, `export` swaps in the variant's own
|
|
35
39
|
* export when the template names one and it exists, and no declaration drops it. A named size reads
|