@yahoo/uds-create-config 5.25.2 → 5.27.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 +22 -4
- package/dist/configs/system.js +4 -0
- package/dist/entities/native/NativeToken.d.ts +22 -4
- package/dist/entities/native/NativeToken.js +2 -1
- package/dist/entities/system/Component.d.ts +35 -2
- package/dist/entities/system/Component.js +224 -9
- package/dist/entities/system/LinkedSystem.js +3 -2
- package/dist/entities/system/Settings.js +1 -1
- package/dist/entities/system/StyleProperty.js +1 -1
- package/dist/entities/system/Token.d.ts +22 -4
- package/dist/entities/system/Token.js +4 -3
- package/dist/entities/system/component-module.d.ts +17 -1
- package/dist/entities/system/component-module.js +54 -2
- package/dist/entities/system/defineComponent.d.ts +53 -13
- package/dist/entities/system/defineComponent.js +1 -0
- package/dist/entities/system/forward-route-invariants.js +1 -1
- package/dist/entities/system/icon-domain-invariants.js +1 -1
- package/dist/entities/system/root-layer-invariants.js +1 -1
- package/dist/entities/system/token-values.js +1 -1
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +33 -2
- package/dist/framework/class-names.d.ts +27 -1
- package/dist/framework/class-names.js +56 -3
- package/dist/framework/component-states.d.ts +40 -0
- package/dist/framework/component-states.js +53 -0
- package/dist/framework/config-ops.d.ts +1 -1
- package/dist/framework/config-ops.js +25 -4
- package/dist/framework/defineSubEntity.d.ts +7 -0
- package/dist/framework/defineSubEntity.js +9 -0
- package/dist/framework/interaction-conditions.d.ts +48 -0
- package/dist/framework/interaction-conditions.js +104 -0
- package/dist/framework/layer-styles.d.ts +5 -1
- package/dist/framework/layer-styles.js +18 -4
- package/dist/framework/projections.js +44 -2
- package/dist/framework/render-spec.js +14 -4
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/deprecated.d.ts +18 -0
- package/dist/framework/utils/deprecated.js +12 -0
- package/dist/framework/validate-spec.js +14 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +6 -4
- package/dist/migrations/20261013154037_component_states.d.ts +19 -0
- package/dist/migrations/20261013154037_component_states.js +74 -0
- package/dist/migrations/20261013164300_token_overrides_list.d.ts +7 -0
- package/dist/migrations/20261013164300_token_overrides_list.js +10 -0
- package/dist/renderer/componentEntry.d.ts +7 -1
- package/dist/renderer/componentEntry.js +30 -1
- package/dist/renderer/forced-stamp.d.ts +26 -0
- package/dist/renderer/forced-stamp.js +50 -0
- package/dist/renderer/index.d.ts +3 -1
- package/dist/renderer/index.js +3 -1
- package/dist/renderer/use-forced-stamp.d.ts +11 -0
- package/dist/renderer/use-forced-stamp.js +50 -0
- package/dist/spec/specToJsx.d.ts +6 -0
- package/dist/spec/specToJsx.js +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ import { CanvasSection, CanvasSectionClass, NativeSettings } from "./entities/na
|
|
|
72
72
|
import { NativeStyleProperty, rnStyleKey } from "./entities/native/NativeStyleProperty.js";
|
|
73
73
|
import { NativeToken, nativeTokenValue } from "./entities/native/NativeToken.js";
|
|
74
74
|
import { CANVAS_ROLES, CanvasRole, CanvasRoleClass, CanvasRoleName } from "./entities/system/CanvasRole.js";
|
|
75
|
-
import { COMPONENT_ENTRY_STATIC, ComponentModuleSource, ComponentRegistryImport, ComponentRegistryImportBinding, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports, linkedComponentModule, linkedModuleView } from "./entities/system/component-module.js";
|
|
75
|
+
import { COMPONENT_ENTRY_STATIC, CREATED_COMPONENT_DIRECTORY, ComponentModuleSource, ComponentRegistryImport, ComponentRegistryImportBinding, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports, createdComponentFilePath, createdComponentPathOf, createdModuleKey, isCreatedComponent, linkedComponentModule, linkedModuleView } from "./entities/system/component-module.js";
|
|
76
76
|
import { Device, DeviceClass } from "./entities/system/Device.js";
|
|
77
77
|
import { ChildrenPolicy, RenderedTarget, VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
|
|
78
78
|
import { File, FileClass, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
@@ -97,11 +97,13 @@ import { AnatomyIssue, AnatomyIssueKind, AnatomyReport, DiffOptions, RenderedNod
|
|
|
97
97
|
import { LayerPropDriver, MarkerKind, ResolvedBinding, bindStateRef, bindingPath, condArms, condValue, containsMarker, layerPropDrivers, markerKind, readsState, resolveBinding, stateRef, stateTest } from "./framework/bindings.js";
|
|
98
98
|
import { ChangeHook, runChangeHooks } from "./framework/change-hooks.js";
|
|
99
99
|
import { Change, ChangeTarget, baseOf, changeOf, changeValueAt, changesOf, describeBody, summarizeChanges } from "./framework/changes.js";
|
|
100
|
-
import {
|
|
100
|
+
import { ComponentState, UDS_FORCE_STATES, componentStateDefaults, componentStates } from "./framework/component-states.js";
|
|
101
|
+
import { ComponentRuleClass, PickedComposite, SplitStyleProps, arbitraryClassName, arbitraryNeedsClass, classLeaf, classSelector, componentClassBase, componentCompositeClasses, componentLayerClass, componentMotionClasses, componentPropClasses, componentPropComposites, componentRuleClasses, componentStateAttribute, componentStateAttributes, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, inlineRuleComposites, isForceModeProp, kebabComponent, layerJsMotionPresets, layerRoutedProps, modifierUtilitiesUsed, motionClassName, ruleCondition, splitStyleProps, splitVariants, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropOffScaleLiteral, stylePropOwnClasses, styleRuleMotionClasses } from "./framework/class-names.js";
|
|
101
102
|
import { CONFIG_OPERATION_KIND } from "./framework/config-operation-kind.js";
|
|
102
103
|
import { AuthoringSignatureOptions, KindSignature, authoringSignatures } from "./framework/config-ops.js";
|
|
103
104
|
import { DERIVED_MUTATIONS } from "./framework/derived-mutations.js";
|
|
104
105
|
import { matchEntities, normalizeName, searchEntities } from "./framework/entity-search.js";
|
|
106
|
+
import { ComponentInteraction, InteractionCondition, componentInteractions, hasInteraction, interactionKey, interactionModifiers, isInteractionModifier, whenParts } from "./framework/interaction-conditions.js";
|
|
105
107
|
import { LayerStyleOptions, layerStyles, ruleApplies } from "./framework/layer-styles.js";
|
|
106
108
|
import { HasSnapshot, createSliceMemo } from "./framework/memo.js";
|
|
107
109
|
import { DanglingLocalRef, UnknownStyleLeaf, danglingLocalRefs, unknownStyleLeaves } from "./framework/ref-integrity.js";
|
|
@@ -118,4 +120,4 @@ import { SpecNode, validateSpec } from "./framework/validate-spec.js";
|
|
|
118
120
|
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
119
121
|
import { views } from "./framework/views-facade.js";
|
|
120
122
|
import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
121
|
-
export { AI_LANES, ANATOMY_MARKER, type Add, AiChat, type AiChatClass, AiFlow, type AiFlowClass, type AiFlowOrigin, AiGeneration, type AiGenerationClass, type AiLane, AiMessage, type AiMessageClass, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, Annotation, type AnnotationClass, AnnotationFields, type AnnotationSegment, type AnySystemConfig, type AppliedOp, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoredStyleBag, type AuthoredStyleField, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BatchReceipt, type BindingKind, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, type BuildSectionClass, CANVAS_ROLES, COMPONENT_ENTRY_STATIC, CONFIG_OPERATION_KIND, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, type Calc, type CalcOperand, Canvas, type CanvasClass, CanvasConfig, type CanvasConfigClass, CanvasRole, type CanvasRoleClass, type CanvasRoleName, CanvasSection, type CanvasSectionClass, 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 CheckedTokenRefPath, type ChildrenPolicy, type ClassGrammar, type CodeSlot, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentClass, type ComponentContractOf, type ComponentCreateInput, type ComponentElementBody, type ComponentItemInput, 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 CompositeClass, 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, type CssSectionClass, DERIVED_COLOR_DEFAULT_SPACE, 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 DeviceClass, type DiffOptions, type Divide, Documentation, type DocumentationClass, DocumentationLibrary, type DocumentationLibraryClass, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, type ElementVisibilitySchema, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type EntryGroup, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, type FileClass, Font, type FontClass, FontFile, type FontFileClass, type ForwardBlockedReason, type ForwardClaims, type ForwardOption, type ForwardOptions, type ForwardRequest, GROUP, GUIDANCE_LANES, GlobalStyle, type GlobalStyleClass, type GlyphComponent, type GlyphExportRule, type GlyphSource, type GlyphValue, type GoverningCondition, type Gradient, type GroupBody, type GroupComputedInput, Guidance, type GuidanceClass, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type GuidanceStyleClass, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconClass, 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 InlineMotion, type Instance, type InstanceSlot, type InstanceSpec, type ItemOf, type KindRef, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, type LinkedElsewhere, LinkedSystem, type LinkedSystemClass, type LinkedSystemCreateInput, type LinkedSystemItemInput, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, MOTION_FACTORY, MOTION_VARIANT_STATES, type MarkerKind, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierClass, type ModifierGroupMeta, Motion, type MotionClass, type MotionPresetToken, type Multiply, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, type NativeModifierClass, NativeSettings, NativeStyleProperty, NativeToken, Node, type NodeClass, type OklchColor, type OnLinked, type OpHandler, type OpInput, Operation, type OperationClass, type OrphanedMotionVariant, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLACED_NODE_KEY, PLAYGROUND_DEFAULTS, Package, type PackageClass, Page, type PageClass, type Patch, type PathOf, type PickedComposite, type PinDirective, type PinOptions, type PinOptionsField, type PinOptionsInput, type PlacedMotion, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PlaygroundSectionClass, Presence, type PresenceProps, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, type PropRoute, type PropShapeSchema, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemClass, 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 RegisteredMotionRuntimes, type RegisteredPaths, type RegisteredStyleBag, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type RequiredContent, type RequiredPropUnforwarded, type ResolveContext, type ResolveValueTypeInput, type ResolvedBinding, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_NUMBER_UNITS, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SafelistEntry, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SettingsClass, type Shadow, type ShadowColor, type ShadowLayer, type ShadowParts, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotCodeForm, type SlotDecl, type SlotHost, 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 StyleClass, type StyleDeclarationGroup, type StylePropEntry, type StylePropLeaf, type StylePropNumberUnit, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyClass, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type Subtract, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemClass, type SystemConfig, SystemSection, type SystemSectionClass, SystemSource, type SystemSourceClass, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenClass, type TokenGroupReader, type TokenGroupVariableReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, type TokenVariableAsText, type TokenVariableReaders, Tool, type ToolClass, 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 UnstatableOverride, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueRefs, type ValueType, type VarNaming, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, add, addressOf, adoptLinkedModule, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, arbitraryClassName, arbitraryNeedsClass, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, bodyNumberLeaves, bodyNumberUnit, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, calcOperands, calcOperator, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, convertLinkedTokenValue, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssString, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declarationKeyName, declarationText, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, declaredVariants, declaresCssVariable, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, elementFromCaptured, entityRefOf, entryKeyOf, evaluateCalc, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardRoutes, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphExportRule, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, glyphVariantProp, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, hasJsMotion, heldLinked, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, iconResolver, iconToolAxisOptions, iconToolFor, iconToolLibraries, iconToolOf, iconToolsOf, iconVariantAs, inferredRenames, inlineJsMotion, inlineMotionId, inlineMotionProps, inlineMotions, inlineRuleComposites, inputOf, instanceHolding, instanceSpec, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isLinkSlug, isMintedRow, isMultiply, isNativeConfig, isOklchColor, isPlainObject, isPreviewElement, isRef, isReservedWord, isShadow, isSubtract, isSystemConfig, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerJsMotionPresets, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refKey, refLeaf, refListOf, refOfKey, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderInterpolated, renderOklch, renderShadow, renderSignature, renderStyleValue, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveOutputAlias, resolveRegistryDir, resolveSourceAlias, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rewriteStyleNumbers, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routedSource, routesContent, routesOf, ruleApplies, ruleCondition, runChangeHooks, safelistEntrySchema, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedPreview, styleAliasesOf, styleDeclarationGroups, styleDeclarations, styleNumberAsPainted, styleNumberReadingChanges, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropNumberCss, stylePropNumberLeaf, stylePropNumberLeaves, stylePropNumberName, stylePropNumberNamedLeaves, stylePropNumberUnit, stylePropNumberUnitRefusal, stylePropOffScaleLiteral, stylePropOwnClasses, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
|
123
|
+
export { AI_LANES, ANATOMY_MARKER, type Add, AiChat, type AiChatClass, AiFlow, type AiFlowClass, type AiFlowOrigin, AiGeneration, type AiGenerationClass, type AiLane, AiMessage, type AiMessageClass, type AiMultiAgentMode, type AnatomyIssue, type AnatomyIssueKind, type AnatomyReport, Annotation, type AnnotationClass, AnnotationFields, type AnnotationSegment, type AnySystemConfig, type AppliedOp, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredProp, type AuthoredPropBody, type AuthoredStyleBag, type AuthoredStyleField, type AuthoringSignatureOptions, BUILD_DEFAULTS, type BatchReceipt, type BindingKind, type BreakOutcome, type BreakPlan, type BreakPlanInput, type BreakPlanRow, type BreakReach, BuildSection, type BuildSectionClass, CANVAS_ROLES, COMPONENT_ENTRY_STATIC, CONFIG_OPERATION_KIND, CREATED_COMPONENT_DIRECTORY, CSS_DEFAULTS, CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, CURRENT_SCHEMA_VERSION, type Calc, type CalcOperand, Canvas, type CanvasClass, CanvasConfig, type CanvasConfigClass, CanvasRole, type CanvasRoleClass, type CanvasRoleName, CanvasSection, type CanvasSectionClass, 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 CheckedTokenRefPath, type ChildrenPolicy, type ClassGrammar, type CodeSlot, type Collection, type ColorValue, Component, type ComponentBody, type ComponentBuilder, type ComponentClass, type ComponentContractOf, type ComponentCreateInput, type ComponentElementBody, type ComponentInteraction, type ComponentItemInput, type ComponentModuleSource, type ComponentPropBody, type ComponentPropsOf, type ComponentReference, type ComponentRegistryImport, type ComponentRegistryImportBinding, type ComponentRuleClass, type ComponentSpec, type ComponentSpecs, type ComponentState, type ComponentStyleBody, type ComposedValue, type ComposedValueAuthoring, type ComposedValueForm, Composite, type CompositeClass, 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, type CssSectionClass, DERIVED_COLOR_DEFAULT_SPACE, 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 DeviceClass, type DiffOptions, type Divide, Documentation, type DocumentationClass, DocumentationLibrary, type DocumentationLibraryClass, type DomLikeElement, type DraftSource, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type Edition, type ElementVisibility, type ElementVisibilityInput, type ElementVisibilitySchema, Entity, type EntityAddress, type EntityChange, type EntityClass, type EntityKind, type EntityMap, type EntryGroup, type ExpandOptions, type ExpansionResult, type ExtendedComponentRef, type ExtendedRef, type FieldsSchema, File, type FileClass, Font, type FontClass, FontFile, type FontFileClass, type ForwardBlockedReason, type ForwardClaims, type ForwardOption, type ForwardOptions, type ForwardRequest, GROUP, GUIDANCE_LANES, GlobalStyle, type GlobalStyleClass, type GlyphComponent, type GlyphExportRule, type GlyphSource, type GlyphValue, type GoverningCondition, type Gradient, type GroupBody, type GroupComputedInput, Guidance, type GuidanceClass, type GuidanceLane, type GuidanceScope, type GuidanceSegment, GuidanceStyle, type GuidanceStyleBody, type GuidanceStyleClass, type HasSnapshot, type HydrationOptions, ICON_METADATA_FORMATS, Icon, type IconAnswer, type IconClass, 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 InlineMotion, type Instance, type InstanceSlot, type InstanceSpec, type InteractionCondition, type ItemOf, type KindRef, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, type LinkedElsewhere, LinkedSystem, type LinkedSystemClass, type LinkedSystemCreateInput, type LinkedSystemItemInput, type LinkedSystemResolver, type LinkedSystemState, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, MOTION_FACTORY, MOTION_VARIANT_STATES, type MarkerKind, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierClass, type ModifierGroupMeta, Motion, type MotionClass, type MotionPresetToken, type Multiply, NATIVE_ACTIVATIONS, type NativeActivation, NativeModifier, type NativeModifierClass, NativeSettings, NativeStyleProperty, NativeToken, Node, type NodeClass, type OklchColor, type OnLinked, type OpHandler, type OpInput, Operation, type OperationClass, type OrphanedMotionVariant, type OverlayVerb, type OverrideCondition, type OwnedRecords, PLACED_NODE_KEY, PLAYGROUND_DEFAULTS, Package, type PackageClass, Page, type PageClass, type Patch, type PathOf, type PickedComposite, type PinDirective, type PinOptions, type PinOptionsField, type PinOptionsInput, type PlacedMotion, type Plan, type PlanImpact, type PlanOp, PlaygroundSection, type PlaygroundSectionClass, Presence, type PresenceProps, type PreviewElement, type PreviewMatrix, type ProjectedVisibility, type PropCondition, type PropDecl, type PropDeclaration, type PropMap, type PropRoute, type PropShapeSchema, RN_STYLE_KEYS, ReactNativeSystem, type ReactNativeSystemClass, 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 RegisteredMotionRuntimes, type RegisteredPaths, type RegisteredStyleBag, type RegisteredStyleProps, type RegisteredTokenValues, type RenamePlan, type RenderArgs, type RenderElement, type RenderSpec, type RenderedNode, type RenderedTarget, type RepeatRow, type RepeatSpec, type RequiredContent, type RequiredPropUnforwarded, type ResolveContext, type ResolveValueTypeInput, type ResolvedBinding, type ResolvedSource, type RootFontSize, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_NUMBER_UNITS, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, type SafelistEntry, type SchemaEntry, type SchemaMigration, SchemaVersionTooNew, type SerializedConfig, type SerializedSourceAnswer, Settings, type SettingsClass, type Shadow, type ShadowColor, type ShadowLayer, type ShadowParts, type SignatureOptions, type SkippedOp, type Slot, type SlotCell, type SlotCodeForm, type SlotDecl, type SlotHost, 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 StyleClass, type StyleDeclarationGroup, type StylePropEntry, type StylePropLeaf, type StylePropNumberUnit, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyClass, type StylePropertyItem, type StyleRuleInput, type StyleValue, type SubEntityClass, type SubPatch, type Subtract, type SurfaceCompositeProp, type SurfaceProp, type SurfacePropCondition, type SurfacePropKind, type SurfaceScalarProp, type SurfaceSlotProp, type SurfaceStylePropertyProp, type SurfaceVariantProp, System, type SystemClass, type SystemConfig, SystemSection, type SystemSectionClass, SystemSource, type SystemSourceClass, TOKEN_READERS, type TimingValue, Token, type TokenBinding, type TokenBody, type TokenClass, type TokenGroupReader, type TokenGroupVariableReader, type TokenMatch, type TokenReader, type TokenReaders, type TokenRefPath, type TokenReference, type TokenValueEntry, type TokenValueRow, type TokenValueState, type TokenVariableAsText, type TokenVariableReaders, Tool, type ToolClass, type Transition, type TransitionSegment, type TraverseOptions, type TreeNode, UDS_FORCE_STATES, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, type UnadoptedDirective, type UnknownStyleLeaf, type UnlinkPlan, type UnlinkPlanInput, type UnreadableBorrow, type UnstatableCondition, type UnstatableOverride, type UpgradedDraft, type UserSchemas, VOID_ELEMENTS, type ValueOf, type ValueRefs, type ValueType, type VarNaming, type VariantValueBody, type VariantValues, type VisibilityOperator, type VisibilityTerm, WEB_ACTIVATIONS, type WalkOptions, type WebActivation, add, addressOf, adoptLinkedModule, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, arbitraryClassName, arbitraryNeedsClass, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, bodyNumberLeaves, bodyNumberUnit, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, calcOperands, calcOperator, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentInteractions, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSpec, componentStateAttribute, componentStateAttributes, componentStateDefaults, componentStates, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, convertLinkedTokenValue, createCanvasConfig, createSliceMemo, createdComponentFilePath, createdComponentPathOf, createdModuleKey, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssString, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declarationKeyName, declarationText, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, declaredVariants, declaresCssVariable, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, elementFromCaptured, entityRefOf, entryKeyOf, evaluateCalc, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, forwardClaims, forwardRoutes, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphExportRule, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, glyphVariantProp, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, hasInteraction, hasJsMotion, heldLinked, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, iconResolver, iconToolAxisOptions, iconToolFor, iconToolLibraries, iconToolOf, iconToolsOf, iconVariantAs, inferredRenames, inlineJsMotion, inlineMotionId, inlineMotionProps, inlineMotions, inlineRuleComposites, inputOf, instanceHolding, instanceSpec, interactionKey, interactionModifiers, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCreatedComponent, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isInteractionModifier, isLinkSlug, isMintedRow, isMultiply, isNativeConfig, isOklchColor, isPlainObject, isPreviewElement, isRef, isReservedWord, isShadow, isSubtract, isSystemConfig, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerJsMotionPresets, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refKey, refLeaf, refListOf, refOfKey, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderInterpolated, renderOklch, renderShadow, renderSignature, renderStyleValue, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveOutputAlias, resolveRegistryDir, resolveSourceAlias, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rewriteStyleNumbers, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routedSource, routesContent, routesOf, ruleApplies, ruleCondition, runChangeHooks, safelistEntrySchema, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedPreview, styleAliasesOf, styleDeclarationGroups, styleDeclarations, styleNumberAsPainted, styleNumberReadingChanges, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropNumberCss, stylePropNumberLeaf, stylePropNumberLeaves, stylePropNumberName, stylePropNumberNamedLeaves, stylePropNumberUnit, stylePropNumberUnitRefusal, stylePropOffScaleLiteral, stylePropOwnClasses, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, whenParts, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,8 @@ import { GROUP, brandGroup, isGroupBody } from "./framework/utils/group.js";
|
|
|
18
18
|
import { defineEntity } from "./framework/defineEntity.js";
|
|
19
19
|
import { defineSubEntity, orList } from "./framework/defineSubEntity.js";
|
|
20
20
|
import { VOID_ELEMENTS, childrenPolicy, forwardsOf, ownerOf, partsOf, renderedElement, renderedTarget, rootLayerOf } from "./entities/system/element.js";
|
|
21
|
+
import { createSliceMemo } from "./framework/memo.js";
|
|
22
|
+
import { componentInteractions, hasInteraction, interactionKey, interactionModifiers, isInteractionModifier, whenParts } from "./framework/interaction-conditions.js";
|
|
21
23
|
import { Font, FontFile, cssString, fontFamilyStack } from "./entities/system/Font.js";
|
|
22
24
|
import { CSS_PROPERTY_NAMES, CSS_WIDE_KEYWORDS, cssProperty, cssValueIssue, isCssProperty } from "./css/values.js";
|
|
23
25
|
import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
@@ -28,12 +30,12 @@ import { MODIFIER_CATEGORIES, Modifier, WEB_ACTIVATIONS, modeAxes, modifierAxes,
|
|
|
28
30
|
import { BUILD_DEFAULTS } from "./configs/build-options.js";
|
|
29
31
|
import { resolveValueType, sniffValueType } from "./css/value-type.js";
|
|
30
32
|
import { parseRootFontSize } from "./css/root-font-size.js";
|
|
31
|
-
import { createSliceMemo } from "./framework/memo.js";
|
|
32
33
|
import { resolveInputDir, resolveOutDir, resolveOutputAlias, resolveRegistryDir, resolveSourceAlias } from "./framework/registry-dir.js";
|
|
33
34
|
import { safelistEntrySchema } from "./entities/system/safelist.js";
|
|
34
35
|
import { BuildSection, CSS_DEFAULTS, CssSection, PLAYGROUND_DEFAULTS, PlaygroundSection, Settings, SystemSection, classPrefixOf, cssPrefixes, prefixed, varPrefixOf } from "./entities/system/Settings.js";
|
|
35
36
|
import { isIdentifier, isReservedWord } from "./framework/utils/identifier.js";
|
|
36
37
|
import { STYLE_PROP_NUMBER_UNITS, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, StyleProperty, classifyStylePropValue, cssPropertyNames, leavesOfStylePropValue, stylePropValueFormOf, stylePropValueSchema, toCssPropertyName, tokenVariablesAsText } from "./entities/system/StyleProperty.js";
|
|
38
|
+
import { UDS_FORCE_STATES, componentStateDefaults, componentStates } from "./framework/component-states.js";
|
|
37
39
|
import { UNCONDITIONAL_PREVIEW_KEY, storedPreview, unconditionalPreviewProps } from "./framework/preview-store.js";
|
|
38
40
|
import { authoredBag, authoredValue, bodyNumberLeaves, bodyNumberUnit, className, cssPropValue, cssVar, cssVarRef, declarationKeyName, declaredPropDefaults, declaredPropRouting, declaresCssVariable, glyphComponentOf, glyphLibrariesOf, glyphPropsOf, heldLinked, iconToolAxisOptions, iconToolFor, iconToolOf, iconToolsOf, isCustomPropertyKey, keyedPreviewConditions, linkedVarNaming, literalValueOf, memberFromLeaf, memberLeaves, nameStyleNumbers, negatedCssValue, opacityPercentage, pinStyleNumbers, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, propOwner, propValueDomain, propValueFromAxis, refListOf, renderInterpolated, renderStyleValue, resolveComponentProps, resolveFieldValue, resolveTokenValue, resolveTokenValueUnder, rewriteStyleNumbers, routedBag, sourceVarPrefix, styleAliasesOf, styleDeclarationGroups, styleDeclarations, styleNumberAsPainted, styleNumberReadingChanges, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropNumberCss, stylePropNumberLeaf, stylePropNumberLeaves, stylePropNumberName, stylePropNumberNamedLeaves, stylePropNumberUnit, stylePropNumberUnitRefusal, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, tokenReference, validateComponentProps } from "./framework/projections.js";
|
|
39
41
|
import { codeSlotsOf, forwardClaims, forwardRoutes, forwardedLayers, glyphVariantProp, intoName, isValueSlot, layerPropRoutes, ownTextProp, propApplies, propRegistryRef, renderBindingsOf, routedProp, routedPropIn, routesContent, slotCodeForms, standsInForCode, surfaceProp, surfaceProps } from "./framework/prop-surface.js";
|
|
@@ -45,7 +47,7 @@ import { renderValue, valueTypeOf } from "./entities/system/value-render.js";
|
|
|
45
47
|
import { hasJsMotion, inlineMotionProps, jsMotionPresets, motionPresetTokens } from "./entities/system/motion-presets.js";
|
|
46
48
|
import { graftPreviewElements, isPreviewElement } from "./spec/preview-elements.js";
|
|
47
49
|
import { layerStyles, ruleApplies } from "./framework/layer-styles.js";
|
|
48
|
-
import { arbitraryClassName, arbitraryNeedsClass, classLeaf, classSelector, componentClassBase, componentCompositeClasses, componentLayerClass, componentMotionClasses, componentPropClasses, componentPropComposites, componentRuleClasses, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, inlineRuleComposites, isForceModeProp, kebabComponent, layerJsMotionPresets, layerRoutedProps, modifierUtilitiesUsed, motionClassName, ruleCondition, splitStyleProps, splitVariants, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropOffScaleLiteral, stylePropOwnClasses, styleRuleMotionClasses } from "./framework/class-names.js";
|
|
50
|
+
import { arbitraryClassName, arbitraryNeedsClass, classLeaf, classSelector, componentClassBase, componentCompositeClasses, componentLayerClass, componentMotionClasses, componentPropClasses, componentPropComposites, componentRuleClasses, componentStateAttribute, componentStateAttributes, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, inlineRuleComposites, isForceModeProp, kebabComponent, layerJsMotionPresets, layerRoutedProps, modifierUtilitiesUsed, motionClassName, ruleCondition, splitStyleProps, splitVariants, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropOffScaleLiteral, stylePropOwnClasses, styleRuleMotionClasses } from "./framework/class-names.js";
|
|
49
51
|
import { ANATOMY_MARKER, MOTION_FACTORY, anatomyElementComponent, anatomyTextProp, boundElementType, componentSpec, deriveSpec, entryKeyOf, expandComponent, expandSpec, instanceSpec, layerTextProp, liveStateProps, previewSpec, propInto, propsIntoLayer, readStatePointer, resolveValue, resolveVisibility, routeOf, routesOf, slotTargetsOf, specWithResolvedVisibility, statePointerProp, valueForwardsOf, visibilityStateProps, visibilityTerms, withoutTruthyTerm, wrappedElementKey } from "./framework/render-spec.js";
|
|
50
52
|
import { instanceHolding } from "./spec/instance.js";
|
|
51
53
|
import { File, SCRIPT_EXTENSIONS, isBinaryAsset } from "./entities/system/File.js";
|
|
@@ -81,7 +83,7 @@ import { CANVAS_ROLES, CanvasRole } from "./entities/system/CanvasRole.js";
|
|
|
81
83
|
import { GlobalStyle, globalStyleName } from "./entities/system/GlobalStyle.js";
|
|
82
84
|
import { Guidance, guidanceReaches, guidanceScopeOf, guidanceTextOf } from "./entities/system/Guidance.js";
|
|
83
85
|
import { GuidanceStyle } from "./entities/system/GuidanceStyle.js";
|
|
84
|
-
import { COMPONENT_ENTRY_STATIC, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports, linkedComponentModule, linkedModuleView } from "./entities/system/component-module.js";
|
|
86
|
+
import { COMPONENT_ENTRY_STATIC, CREATED_COMPONENT_DIRECTORY, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentRegistryImports, createdComponentFilePath, createdComponentPathOf, createdModuleKey, isCreatedComponent, linkedComponentModule, linkedModuleView } from "./entities/system/component-module.js";
|
|
85
87
|
import { planCopy, sourceEntries } from "./entities/system/copy-plan.js";
|
|
86
88
|
import { planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
|
|
87
89
|
import { LINK_SLUG, LINK_SLUG_MESSAGE, LinkedSystem, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug } from "./entities/system/LinkedSystem.js";
|
|
@@ -110,4 +112,4 @@ import { inferredRenames } from "./framework/rename-inference.js";
|
|
|
110
112
|
import { ConfigSession, memoryConfigSource } from "./framework/session.js";
|
|
111
113
|
import { EXPORT_MEMBER, packageKey, packageName } from "./framework/utils/package-path.js";
|
|
112
114
|
import { validateSpec } from "./framework/validate-spec.js";
|
|
113
|
-
export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, AiGeneration, AiMessage, Annotation, AnnotationFields, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, COMPONENT_ENTRY_STATIC, 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_DEFAULT_SPACE, 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, MOTION_FACTORY, MOTION_VARIANT_STATES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLACED_NODE_KEY, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, Presence, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_NUMBER_UNITS, 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, add, addressOf, adoptLinkedModule, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, arbitraryClassName, arbitraryNeedsClass, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, bodyNumberLeaves, bodyNumberUnit, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, calcOperands, calcOperator, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSpec, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, convertLinkedTokenValue, createCanvasConfig, createSliceMemo, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssString, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declarationKeyName, declarationText, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, declaredVariants, declaresCssVariable, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, elementFromCaptured, entityRefOf, entryKeyOf, evaluateCalc, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forwardClaims, forwardRoutes, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphExportRule, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, glyphVariantProp, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, hasJsMotion, heldLinked, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, iconResolver, iconToolAxisOptions, iconToolFor, iconToolLibraries, iconToolOf, iconToolsOf, iconVariantAs, inferredRenames, inlineJsMotion, inlineMotionId, inlineMotionProps, inlineMotions, inlineRuleComposites, inputOf, instanceHolding, instanceSpec, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isLinkSlug, isMintedRow, isMultiply, isNativeConfig, isOklchColor, isPlainObject, isPreviewElement, isRef, isReservedWord, isShadow, isSubtract, isSystemConfig, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerJsMotionPresets, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refKey, refLeaf, refListOf, refOfKey, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderInterpolated, renderOklch, renderShadow, renderSignature, renderStyleValue, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveOutputAlias, resolveRegistryDir, resolveSourceAlias, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rewriteStyleNumbers, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routedSource, routesContent, routesOf, ruleApplies, ruleCondition, runChangeHooks, safelistEntrySchema, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedPreview, styleAliasesOf, styleDeclarationGroups, styleDeclarations, styleNumberAsPainted, styleNumberReadingChanges, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropNumberCss, stylePropNumberLeaf, stylePropNumberLeaves, stylePropNumberName, stylePropNumberNamedLeaves, stylePropNumberUnit, stylePropNumberUnitRefusal, stylePropOffScaleLiteral, stylePropOwnClasses, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
|
115
|
+
export { AI_LANES, ANATOMY_MARKER, AiChat, AiFlow, AiGeneration, AiMessage, Annotation, AnnotationFields, BUILD_DEFAULTS, BuildSection, CANVAS_ROLES, COMPONENT_ENTRY_STATIC, CONFIG_OPERATION_KIND, CREATED_COMPONENT_DIRECTORY, 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_DEFAULT_SPACE, 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, MOTION_FACTORY, MOTION_VARIANT_STATES, Modifier, Motion, NATIVE_ACTIVATIONS, NativeModifier, NativeSettings, NativeStyleProperty, NativeToken, Node, Operation, PLACED_NODE_KEY, PLAYGROUND_DEFAULTS, Package, Page, PlaygroundSection, Presence, RN_STYLE_KEYS, ReactNativeSystem, SCRIPT_EXTENSIONS, SERIALIZED_CONFIG_VERSION, SIZE_TOLERANCE_PX, SLOT_CODE_FORMS, STYLE_PROPERTIES, STYLE_PROP_NUMBER_UNITS, STYLE_PROP_VALUE_FORMS, STYLE_PROP_VALUE_LEAVES, SchemaVersionTooNew, Settings, Snapshot, StyleProperty, System, SystemSection, SystemSource, TOKEN_READERS, Token, Tool, UDS_FORCE_STATES, UNCONDITIONAL_PREVIEW_KEY, UNREACHABLE, VOID_ELEMENTS, WEB_ACTIVATIONS, add, addressOf, adoptLinkedModule, alpha, anatomyElementComponent, anatomyIssueKey, anatomyTextProp, applyPathDelta, arbitraryClassName, arbitraryNeedsClass, authoredBag, authoredValue, authoringSignatures, baseOf, bindStateRef, bindingPath, blankComponentBody, bodyNumberLeaves, bodyNumberUnit, borrowedGroup, borrowedItem, boundElementType, brandGroup, buildRefGraph, buildRefIndex, calcOperands, calcOperator, canonicalWhen, capturedFromDom, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, codeSlotsOf, collectRefs, componentClassBase, componentCompositeClasses, componentInteractions, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSpec, componentStateAttribute, componentStateAttributes, componentStateDefaults, componentStates, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, condArms, condValue, containsMarker, convertLinkedTokenValue, createCanvasConfig, createSliceMemo, createdComponentFilePath, createdComponentPathOf, createdModuleKey, cssPrefixes, cssPropValue, cssProperty, cssPropertyNames, cssString, cssValueIssue, cssVar, cssVarRef, danglingDirectives, danglingLocalRefs, danglingSourcedRefs, darken, declarationKeyName, declarationText, declaredField, declaredPropDefaults, declaredPropRouting, declaredRuntimeModules, declaredVariants, declaresCssVariable, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, elementFromCaptured, entityRefOf, entryKeyOf, evaluateCalc, expandComponent, expandSpec, fieldKeys, fontFamilyStack, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, forwardClaims, forwardRoutes, forwardedLayers, forwardedNames, forwardsOf, globalStyleName, glyphComponentOf, glyphExportNames, glyphExportRule, glyphLibrariesOf, glyphPropsOf, glyphSourcesOf, glyphType, glyphVariantProp, graftPreviewElements, guidanceReaches, guidanceScopeOf, guidanceTextOf, hasInteraction, hasJsMotion, heldLinked, iconCategories, iconLibraries, iconLibrary, iconMemberMetadata, iconMetadata, iconMetadataDeclaration, iconMetadataFile, iconMetadataFileJsonSchema, iconMetadataFormat, iconMetadataSourceFile, iconResolver, iconToolAxisOptions, iconToolFor, iconToolLibraries, iconToolOf, iconToolsOf, iconVariantAs, inferredRenames, inlineJsMotion, inlineMotionId, inlineMotionProps, inlineMotions, inlineRuleComposites, inputOf, instanceHolding, instanceSpec, interactionKey, interactionModifiers, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCreatedComponent, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isInteractionModifier, isLinkSlug, isMintedRow, isMultiply, isNativeConfig, isOklchColor, isPlainObject, isPreviewElement, isRef, isReservedWord, isShadow, isSubtract, isSystemConfig, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerJsMotionPresets, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, markerKind, matchEntities, matchTokens, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, motionClassName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propInto, propOwner, propRegistryRef, propValueDomain, propValueFromAxis, propsIntoLayer, readStatePointer, readsState, redundantQualifiers, ref, refGraphOf, refKey, refLeaf, refListOf, refOfKey, refSchema, refTo, registerSchemaMigrations, renderBindingsOf, renderComposedValue, renderDerivedColor, renderGradient, renderInterpolated, renderOklch, renderShadow, renderSignature, renderStyleValue, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resolutionSchema, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveOutDir, resolveOutputAlias, resolveRegistryDir, resolveSourceAlias, resolveTokenValue, resolveTokenValueUnder, resolveValue, resolveValueType, resolveVisibility, resolvedSource, rewriteRefNamespace, rewriteRefSource, rewriteRefs, rewriteStyleNumbers, rnStyleKey, rootFontSize, rootLayerOf, routeOf, routedBag, routedProp, routedPropIn, routedSource, routesContent, routesOf, ruleApplies, ruleCondition, runChangeHooks, safelistEntrySchema, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedPreview, styleAliasesOf, styleDeclarationGroups, styleDeclarations, styleNumberAsPainted, styleNumberReadingChanges, stylePropClassBase, stylePropClassName, stylePropClasses, stylePropEntries, stylePropLeafForToken, stylePropNegates, stylePropNumberCss, stylePropNumberLeaf, stylePropNumberLeaves, stylePropNumberName, stylePropNumberNamedLeaves, stylePropNumberUnit, stylePropNumberUnitRefusal, stylePropOffScaleLiteral, stylePropOwnClasses, stylePropTokenGroup, stylePropTokenPath, stylePropTokenValues, stylePropValueFormOf, stylePropValueFromLeaf, stylePropValueLeaves, stylePropValueSchema, stylePropValues, stylePropertiesWriting, stylePropertyAccepts, stylePropertyFor, stylePropertyPathFor, styleRuleMotionClasses, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, whenParts, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A component's STATES — what its render knows and a style rule keys on — are their own field,
|
|
3
|
+
* `states`, not props: `{ "filled": { "type": "boolean" } }`, `{ "phase": { "type": "variant",
|
|
4
|
+
* "value": ["idle", "sliding"], "default": "idle" } }`. A caller never passes one, so none is part of
|
|
5
|
+
* the component's API. Style rules name a state in `when` like a prop, with its value written plainly
|
|
6
|
+
* (a variant state has no value members to ref).
|
|
7
|
+
*
|
|
8
|
+
* A stored config from before this version has no states, so `up` passes it through. The one shape it
|
|
9
|
+
* folds is the `state: true` prop a pre-release build of this change wrote (stamped 20261006125634 on
|
|
10
|
+
* its preview deployments only, never on main): it moves to `states`, taking a variant's
|
|
11
|
+
* `defaultProps` entry as its default. Stored patches never named it, so there is no `upPatch`.
|
|
12
|
+
*
|
|
13
|
+
* Deletable once no stored artifact predates it.
|
|
14
|
+
*/
|
|
15
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
16
|
+
export declare const COMPONENT_STATES_VERSION = 20261013154037;
|
|
17
|
+
/** One component body with its `state: true` props moved to `states`. */
|
|
18
|
+
export declare function foldedStates(body: Record<string, unknown>): Record<string, unknown>;
|
|
19
|
+
export declare const componentStatesMigration: SchemaMigration;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { isPlainObject } from "../framework/utils/field-path.js";
|
|
2
|
+
//#region src/migrations/20261013154037_component_states.ts
|
|
3
|
+
const COMPONENT_STATES_VERSION = 20261013154037;
|
|
4
|
+
/** A condition value read to the name it spells, frozen here: a ref's last path segment, else the
|
|
5
|
+
* value itself. */
|
|
6
|
+
function leafOf(value) {
|
|
7
|
+
if (isPlainObject(value) && typeof value.__ref === "string") return /([^/]*)$/.exec(value.__ref)?.[1] ?? value.__ref;
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
/** One component body with its `state: true` props moved to `states`. */
|
|
11
|
+
function foldedStates(body) {
|
|
12
|
+
const props = isPlainObject(body.props) ? body.props : void 0;
|
|
13
|
+
if (!props) return body;
|
|
14
|
+
const moved = Object.entries(props).filter(([, decl]) => isPlainObject(decl) && decl.state === true);
|
|
15
|
+
if (moved.length === 0) return body;
|
|
16
|
+
const nextProps = { ...props };
|
|
17
|
+
const defaults = isPlainObject(body.defaultProps) ? { ...body.defaultProps } : void 0;
|
|
18
|
+
const states = isPlainObject(body.states) ? { ...body.states } : {};
|
|
19
|
+
for (const [name, decl] of moved) {
|
|
20
|
+
delete nextProps[name];
|
|
21
|
+
const { type, value } = decl;
|
|
22
|
+
if (type === "variant" && Array.isArray(value)) {
|
|
23
|
+
const fallback = defaults?.[name];
|
|
24
|
+
states[name] = {
|
|
25
|
+
type: "variant",
|
|
26
|
+
value: value.map((member) => String(leafOf(member))),
|
|
27
|
+
...typeof leafOf(fallback) === "string" ? { default: leafOf(fallback) } : {}
|
|
28
|
+
};
|
|
29
|
+
} else states[name] = { type: "boolean" };
|
|
30
|
+
if (defaults) delete defaults[name];
|
|
31
|
+
}
|
|
32
|
+
const movedVariants = new Set(moved.filter(([, decl]) => decl.type === "variant").map(([name]) => name));
|
|
33
|
+
const plainWhen = (entry) => {
|
|
34
|
+
if (!isPlainObject(entry) || !isPlainObject(entry.when)) return entry;
|
|
35
|
+
const when = { ...entry.when };
|
|
36
|
+
for (const name of movedVariants) if (name in when) when[name] = leafOf(when[name]);
|
|
37
|
+
return {
|
|
38
|
+
...entry,
|
|
39
|
+
when
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const plainConditions = (collection) => Array.isArray(collection) ? collection.map(plainWhen) : isPlainObject(collection) ? Object.fromEntries(Object.entries(collection).map(([key, entry]) => [key, plainWhen(entry)])) : collection;
|
|
43
|
+
return {
|
|
44
|
+
...body,
|
|
45
|
+
props: nextProps,
|
|
46
|
+
states,
|
|
47
|
+
...defaults ? { defaultProps: defaults } : {},
|
|
48
|
+
...movedVariants.size > 0 && body.styles !== void 0 ? { styles: plainConditions(body.styles) } : {},
|
|
49
|
+
...movedVariants.size > 0 && body.preview !== void 0 ? { preview: plainConditions(body.preview) } : {}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const componentStatesMigration = {
|
|
53
|
+
version: COMPONENT_STATES_VERSION,
|
|
54
|
+
up(json) {
|
|
55
|
+
const items = isPlainObject(json.items) ? json.items : void 0;
|
|
56
|
+
const components = isPlainObject(items?.component) ? items.component : void 0;
|
|
57
|
+
if (!items || !components) return json;
|
|
58
|
+
let changed = false;
|
|
59
|
+
const folded = Object.fromEntries(Object.entries(components).map(([path, body]) => {
|
|
60
|
+
const next = isPlainObject(body) ? foldedStates(body) : body;
|
|
61
|
+
if (next !== body) changed = true;
|
|
62
|
+
return [path, next];
|
|
63
|
+
}));
|
|
64
|
+
return changed ? {
|
|
65
|
+
...json,
|
|
66
|
+
items: {
|
|
67
|
+
...items,
|
|
68
|
+
component: folded
|
|
69
|
+
}
|
|
70
|
+
} : json;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { COMPONENT_STATES_VERSION, componentStatesMigration };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A token's `overrides` also takes a list of `{ on, value }`, which is stored as the record keyed by
|
|
3
|
+
* each override's condition. The stored form is unchanged, so the hop is identity.
|
|
4
|
+
*/
|
|
5
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
6
|
+
export declare const TOKEN_OVERRIDES_LIST_VERSION = 20261013164300;
|
|
7
|
+
export declare const tokenOverridesListMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20261013164300_token_overrides_list.ts
|
|
2
|
+
const TOKEN_OVERRIDES_LIST_VERSION = 20261013164300;
|
|
3
|
+
const tokenOverridesListMigration = {
|
|
4
|
+
version: TOKEN_OVERRIDES_LIST_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { TOKEN_OVERRIDES_LIST_VERSION, tokenOverridesListMigration };
|
|
@@ -19,7 +19,7 @@ type ComponentEntry = (ctx: BaseComponentProps) => React.ReactNode;
|
|
|
19
19
|
*/
|
|
20
20
|
declare function slotFillValue(fill: React.ReactNode): React.ReactNode;
|
|
21
21
|
/** The facts codegen stamps on an emitted component as `__udsEntry`. */
|
|
22
|
-
type ComponentEntryFacts = Pick<MakeComponentEntryOptions, 'childless' | 'computed'>;
|
|
22
|
+
type ComponentEntryFacts = Pick<MakeComponentEntryOptions, 'childless' | 'computed' | 'states'>;
|
|
23
23
|
interface MakeComponentEntryOptions {
|
|
24
24
|
component: React.ComponentType<any>;
|
|
25
25
|
/**
|
|
@@ -41,6 +41,12 @@ interface MakeComponentEntryOptions {
|
|
|
41
41
|
* registered as the entry is made, which is when a canvas can first paint the component.
|
|
42
42
|
*/
|
|
43
43
|
computed?: ComputedFunctions;
|
|
44
|
+
/**
|
|
45
|
+
* The component's states. A spec element pins one under its name (the grid's `filled` column, a
|
|
46
|
+
* canvas mock); a state is never a prop, so the entry hands those values to the module through its
|
|
47
|
+
* internal channel ({@link UDS_FORCE_STATES}) instead.
|
|
48
|
+
*/
|
|
49
|
+
states?: readonly string[];
|
|
44
50
|
}
|
|
45
51
|
/**
|
|
46
52
|
* One component's registry entry.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { UDS_FORCE_STATES } from "../framework/component-states.js";
|
|
2
|
+
import { forcedModifierAttributes } from "../framework/class-names.js";
|
|
1
3
|
import { registerComputed } from "./computed.js";
|
|
2
4
|
import { RendererErrorBoundary } from "./RendererErrorBoundary.js";
|
|
3
5
|
import { specContent } from "./spec-content.js";
|
|
6
|
+
import { useForcedModifierStamp } from "./use-forced-stamp.js";
|
|
4
7
|
import React from "react";
|
|
5
8
|
//#region src/renderer/componentEntry.tsx
|
|
6
9
|
/**
|
|
@@ -33,11 +36,12 @@ function definedOnly(options) {
|
|
|
33
36
|
* data, so it never imports this renderer: whoever assembles a registry makes the entry.
|
|
34
37
|
*/
|
|
35
38
|
function makeComponentEntry(options) {
|
|
36
|
-
const { component: Comp, childless, name, computed } = {
|
|
39
|
+
const { component: Comp, childless, name, computed, states } = {
|
|
37
40
|
...options.component.__udsEntry,
|
|
38
41
|
...definedOnly(options)
|
|
39
42
|
};
|
|
40
43
|
const label = name ?? Comp.displayName ?? Comp.name ?? "component";
|
|
44
|
+
const componentPath = name?.startsWith("component:") ? name.slice(10) : label;
|
|
41
45
|
if (computed) registerComputed(computed);
|
|
42
46
|
return function ComponentEntry({ props: elementProps, children, slots }) {
|
|
43
47
|
let props = elementProps ?? {};
|
|
@@ -51,6 +55,18 @@ function makeComponentEntry(options) {
|
|
|
51
55
|
props = filled;
|
|
52
56
|
}
|
|
53
57
|
const { children: propChildren, ...rest } = props;
|
|
58
|
+
if (states?.some((state) => state in rest)) {
|
|
59
|
+
const forced = { ...rest["__udsForceStates"] ?? {} };
|
|
60
|
+
for (const state of states) {
|
|
61
|
+
if (!(state in rest)) continue;
|
|
62
|
+
forced[state] = rest[state];
|
|
63
|
+
delete rest[state];
|
|
64
|
+
}
|
|
65
|
+
rest[UDS_FORCE_STATES] = forced;
|
|
66
|
+
}
|
|
67
|
+
let forcedAttrs = {};
|
|
68
|
+
const pins = rest[UDS_FORCE_STATES];
|
|
69
|
+
if (pins && typeof pins === "object") forcedAttrs = forcedModifierAttributes(pins);
|
|
54
70
|
let rendered;
|
|
55
71
|
if (childless) rendered = React.createElement(Comp, rest);
|
|
56
72
|
else {
|
|
@@ -60,6 +76,10 @@ function makeComponentEntry(options) {
|
|
|
60
76
|
});
|
|
61
77
|
rendered = finalChildren !== void 0 && finalChildren !== null ? React.createElement(Comp, rest, finalChildren) : React.createElement(Comp, rest);
|
|
62
78
|
}
|
|
79
|
+
if (Object.keys(forcedAttrs).length > 0) rendered = React.createElement(ForcedHost, {
|
|
80
|
+
component: componentPath,
|
|
81
|
+
attributes: forcedAttrs
|
|
82
|
+
}, rendered);
|
|
63
83
|
return React.createElement(RendererErrorBoundary, {
|
|
64
84
|
name: label,
|
|
65
85
|
resetKey: elementProps
|
|
@@ -84,5 +104,14 @@ function entryRenderer(entry) {
|
|
|
84
104
|
});
|
|
85
105
|
};
|
|
86
106
|
}
|
|
107
|
+
/** A layout-neutral wrapper that marks the forced component's own elements under it. */
|
|
108
|
+
function ForcedHost({ component, attributes, children }) {
|
|
109
|
+
const host = React.useRef(null);
|
|
110
|
+
useForcedModifierStamp(host, component, attributes);
|
|
111
|
+
return React.createElement("div", {
|
|
112
|
+
ref: host,
|
|
113
|
+
style: { display: "contents" }
|
|
114
|
+
}, children);
|
|
115
|
+
}
|
|
87
116
|
//#endregion
|
|
88
117
|
export { entryRenderer, makeComponentEntry, slotFillValue };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/renderer/forced-stamp.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mark a forced component's own elements with its force attributes, inside `container`.
|
|
4
|
+
*
|
|
5
|
+
* The design sheet's force twin matches an element that carries the attribute itself, so a state is
|
|
6
|
+
* forced exactly where this puts it: the component's root, and its other elements tagged with its
|
|
7
|
+
* own `data-uds-component` — except the root of a component nested in it. That root is tagged with
|
|
8
|
+
* the parent's markers (the props it was given land over its own), but it is the nearest tagged
|
|
9
|
+
* ancestor of the nested component's own non-root parts, which is how it's told apart. A nested
|
|
10
|
+
* IconButton then keeps its own hover and focus ring, as the browser would. Returns the undo.
|
|
11
|
+
*
|
|
12
|
+
* Each attribute's value lists the components forced on the element, and this adds `component` to
|
|
13
|
+
* it: the twin matches only its own component's name (`forceStateSelector`), so a component
|
|
14
|
+
* whose root is another's instance — one element for both — doesn't light the inner one's state.
|
|
15
|
+
*/
|
|
16
|
+
declare function stampForcedModifiers({
|
|
17
|
+
container,
|
|
18
|
+
component,
|
|
19
|
+
attributes
|
|
20
|
+
}: {
|
|
21
|
+
container: Element;
|
|
22
|
+
component: string;
|
|
23
|
+
attributes: Readonly<Record<string, string>>;
|
|
24
|
+
}): () => void;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { stampForcedModifiers };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/renderer/forced-stamp.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mark a forced component's own elements with its force attributes, inside `container`.
|
|
4
|
+
*
|
|
5
|
+
* The design sheet's force twin matches an element that carries the attribute itself, so a state is
|
|
6
|
+
* forced exactly where this puts it: the component's root, and its other elements tagged with its
|
|
7
|
+
* own `data-uds-component` — except the root of a component nested in it. That root is tagged with
|
|
8
|
+
* the parent's markers (the props it was given land over its own), but it is the nearest tagged
|
|
9
|
+
* ancestor of the nested component's own non-root parts, which is how it's told apart. A nested
|
|
10
|
+
* IconButton then keeps its own hover and focus ring, as the browser would. Returns the undo.
|
|
11
|
+
*
|
|
12
|
+
* Each attribute's value lists the components forced on the element, and this adds `component` to
|
|
13
|
+
* it: the twin matches only its own component's name (`forceStateSelector`), so a component
|
|
14
|
+
* whose root is another's instance — one element for both — doesn't light the inner one's state.
|
|
15
|
+
*/
|
|
16
|
+
function stampForcedModifiers({ container, component, attributes }) {
|
|
17
|
+
const names = Object.keys(attributes);
|
|
18
|
+
if (names.length === 0) return () => {};
|
|
19
|
+
const tagged = [...container.querySelectorAll("[data-uds-component]")];
|
|
20
|
+
const nestedRoots = /* @__PURE__ */ new Set();
|
|
21
|
+
for (const element of tagged) {
|
|
22
|
+
if (element.getAttribute("data-uds-component") === component) continue;
|
|
23
|
+
if (element.getAttribute("data-uds-layer") === "root") continue;
|
|
24
|
+
const owner = element.parentElement?.closest("[data-uds-component]");
|
|
25
|
+
if (owner && owner.getAttribute("data-uds-component") === component) nestedRoots.add(owner);
|
|
26
|
+
}
|
|
27
|
+
const stamped = [];
|
|
28
|
+
for (const element of tagged) {
|
|
29
|
+
if (element.getAttribute("data-uds-component") !== component) continue;
|
|
30
|
+
if (!(element.getAttribute("data-uds-layer") === "root") && nestedRoots.has(element)) continue;
|
|
31
|
+
for (const name of names) {
|
|
32
|
+
const owners = ownersOf(element, name);
|
|
33
|
+
if (!owners.includes(component)) element.setAttribute(name, [...owners, component].join(" "));
|
|
34
|
+
}
|
|
35
|
+
stamped.push(element);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
for (const element of stamped) for (const name of names) {
|
|
39
|
+
const owners = ownersOf(element, name).filter((owner) => owner !== component);
|
|
40
|
+
if (owners.length > 0) element.setAttribute(name, owners.join(" "));
|
|
41
|
+
else element.removeAttribute(name);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** The components a force attribute already names on an element. */
|
|
46
|
+
function ownersOf(element, name) {
|
|
47
|
+
return (element.getAttribute(name) ?? "").split(/\s+/).filter(Boolean);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { stampForcedModifiers };
|
package/dist/renderer/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentEntry, ComponentEntryFacts, MakeComponentEntryOptions, entryRenderer, makeComponentEntry, slotFillValue } from "./componentEntry.js";
|
|
2
2
|
import { computedFunctions, registerComputed, withComputedFunctions } from "./computed.js";
|
|
3
|
+
import { stampForcedModifiers } from "./forced-stamp.js";
|
|
3
4
|
import { GlyphEntriesResult, GlyphMembers, glyphRegistryEntries } from "./glyphEntries.js";
|
|
4
5
|
import { FragmentRenderer } from "./primitives/FragmentRenderer.js";
|
|
5
6
|
import { SlotRenderer } from "./primitives/SlotRenderer.js";
|
|
@@ -11,7 +12,8 @@ import { GlyphPropMap, wrapGlyphProps } from "./wrappers/glyph-props.js";
|
|
|
11
12
|
import { VERBATIM_ATTRIBUTES, aliasHtmlTypes } from "./wrappers/html-aliases.js";
|
|
12
13
|
import { RegistryDescriptor, wrapRegistry } from "./wrapRegistry.js";
|
|
13
14
|
import { UdsRenderer, UdsRendererProps } from "./UdsRenderer.js";
|
|
15
|
+
import { useForcedModifierStamp } from "./use-forced-stamp.js";
|
|
14
16
|
import { wrapEventBridge } from "./wrappers/event-bridge.js";
|
|
15
17
|
import { wrapNormalizeHex } from "./wrappers/hex-normalize.js";
|
|
16
18
|
import { wrapInlineStyleProps } from "./wrappers/inline-styles.js";
|
|
17
|
-
export { type ComponentEntry, type ComponentEntryFacts, FragmentRenderer, type Glyph, type GlyphEntriesResult, type GlyphLibrary, type GlyphMembers, type GlyphPropMap, type MakeComponentEntryOptions, REVEALED_LAYER_ATTR, type RegistryDescriptor, RendererErrorBoundary, type ResolvedGlyph, RuntimeComponentFailureContext, type RuntimeComponentFailureReporter, RuntimeComponentRebuildContext, type RuntimeComponentRebuildReporter, type RuntimeComponentScope, type RuntimeComponentStatus, type RuntimeComponentStore, RuntimeComponentStoreContext, SlotRenderer, UdsRenderer, type UdsRendererProps, VERBATIM_ATTRIBUTES, aliasHtmlTypes, computedFunctions, entryRenderer, glyphRegistryEntries, installRuntimeComponentStore, makeComponentEntry, registerComputed, resolveGlyph, runtimeComponent, slotFillValue, specContent, withComputedFunctions, wrapEventBridge, wrapGlyphProps, wrapInlineStyleProps, wrapNormalizeHex, wrapRegistry };
|
|
19
|
+
export { type ComponentEntry, type ComponentEntryFacts, FragmentRenderer, type Glyph, type GlyphEntriesResult, type GlyphLibrary, type GlyphMembers, type GlyphPropMap, type MakeComponentEntryOptions, REVEALED_LAYER_ATTR, type RegistryDescriptor, RendererErrorBoundary, type ResolvedGlyph, RuntimeComponentFailureContext, type RuntimeComponentFailureReporter, RuntimeComponentRebuildContext, type RuntimeComponentRebuildReporter, type RuntimeComponentScope, type RuntimeComponentStatus, type RuntimeComponentStore, RuntimeComponentStoreContext, SlotRenderer, UdsRenderer, type UdsRendererProps, VERBATIM_ATTRIBUTES, aliasHtmlTypes, computedFunctions, entryRenderer, glyphRegistryEntries, installRuntimeComponentStore, makeComponentEntry, registerComputed, resolveGlyph, runtimeComponent, slotFillValue, specContent, stampForcedModifiers, useForcedModifierStamp, withComputedFunctions, wrapEventBridge, wrapGlyphProps, wrapInlineStyleProps, wrapNormalizeHex, wrapRegistry };
|
package/dist/renderer/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { computedFunctions, registerComputed, withComputedFunctions } from "./computed.js";
|
|
2
2
|
import { RendererErrorBoundary } from "./RendererErrorBoundary.js";
|
|
3
3
|
import { REVEALED_LAYER_ATTR, specContent } from "./spec-content.js";
|
|
4
|
+
import { stampForcedModifiers } from "./forced-stamp.js";
|
|
5
|
+
import { useForcedModifierStamp } from "./use-forced-stamp.js";
|
|
4
6
|
import { entryRenderer, makeComponentEntry, slotFillValue } from "./componentEntry.js";
|
|
5
7
|
import { resolveGlyph } from "./resolveGlyph.js";
|
|
6
8
|
import { glyphRegistryEntries } from "./glyphEntries.js";
|
|
@@ -14,4 +16,4 @@ import { VERBATIM_ATTRIBUTES, aliasHtmlTypes } from "./wrappers/html-aliases.js"
|
|
|
14
16
|
import { wrapInlineStyleProps } from "./wrappers/inline-styles.js";
|
|
15
17
|
import { wrapRegistry } from "./wrapRegistry.js";
|
|
16
18
|
import { UdsRenderer } from "./UdsRenderer.js";
|
|
17
|
-
export { FragmentRenderer, REVEALED_LAYER_ATTR, RendererErrorBoundary, RuntimeComponentFailureContext, RuntimeComponentRebuildContext, RuntimeComponentStoreContext, SlotRenderer, UdsRenderer, VERBATIM_ATTRIBUTES, aliasHtmlTypes, computedFunctions, entryRenderer, glyphRegistryEntries, installRuntimeComponentStore, makeComponentEntry, registerComputed, resolveGlyph, runtimeComponent, slotFillValue, specContent, withComputedFunctions, wrapEventBridge, wrapGlyphProps, wrapInlineStyleProps, wrapNormalizeHex, wrapRegistry };
|
|
19
|
+
export { FragmentRenderer, REVEALED_LAYER_ATTR, RendererErrorBoundary, RuntimeComponentFailureContext, RuntimeComponentRebuildContext, RuntimeComponentStoreContext, SlotRenderer, UdsRenderer, VERBATIM_ATTRIBUTES, aliasHtmlTypes, computedFunctions, entryRenderer, glyphRegistryEntries, installRuntimeComponentStore, makeComponentEntry, registerComputed, resolveGlyph, runtimeComponent, slotFillValue, specContent, stampForcedModifiers, useForcedModifierStamp, withComputedFunctions, wrapEventBridge, wrapGlyphProps, wrapInlineStyleProps, wrapNormalizeHex, wrapRegistry };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/renderer/use-forced-stamp.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Keep a forced component's own elements under `ref` marked with `attributes` (see
|
|
6
|
+
* {@link stampForcedModifiers}) as its DOM renders and re-renders: marked after every commit, and
|
|
7
|
+
* again when the subtree changes underneath (a lazy layer mounting, a module swapping in).
|
|
8
|
+
*/
|
|
9
|
+
declare function useForcedModifierStamp(ref: RefObject<Element | null>, component: string, attributes: Readonly<Record<string, string>>): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useForcedModifierStamp };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { stampForcedModifiers } from "./forced-stamp.js";
|
|
2
|
+
import { useLayoutEffect, useRef } from "react";
|
|
3
|
+
//#region src/renderer/use-forced-stamp.ts
|
|
4
|
+
/**
|
|
5
|
+
* Keep a forced component's own elements under `ref` marked with `attributes` (see
|
|
6
|
+
* {@link stampForcedModifiers}) as its DOM renders and re-renders: marked after every commit, and
|
|
7
|
+
* again when the subtree changes underneath (a lazy layer mounting, a module swapping in).
|
|
8
|
+
*/
|
|
9
|
+
function useForcedModifierStamp(ref, component, attributes) {
|
|
10
|
+
const key = Object.keys(attributes).sort().join("|");
|
|
11
|
+
const latest = useRef(attributes);
|
|
12
|
+
latest.current = attributes;
|
|
13
|
+
useLayoutEffect(() => {
|
|
14
|
+
const container = ref.current;
|
|
15
|
+
if (!container || key === "") return;
|
|
16
|
+
const attributes = latest.current;
|
|
17
|
+
let undo = stampForcedModifiers({
|
|
18
|
+
container,
|
|
19
|
+
component,
|
|
20
|
+
attributes
|
|
21
|
+
});
|
|
22
|
+
const observer = new MutationObserver(() => {
|
|
23
|
+
observer.disconnect();
|
|
24
|
+
undo();
|
|
25
|
+
undo = stampForcedModifiers({
|
|
26
|
+
container,
|
|
27
|
+
component,
|
|
28
|
+
attributes
|
|
29
|
+
});
|
|
30
|
+
observer.observe(container, {
|
|
31
|
+
childList: true,
|
|
32
|
+
subtree: true
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
observer.observe(container, {
|
|
36
|
+
childList: true,
|
|
37
|
+
subtree: true
|
|
38
|
+
});
|
|
39
|
+
return () => {
|
|
40
|
+
observer.disconnect();
|
|
41
|
+
undo();
|
|
42
|
+
};
|
|
43
|
+
}, [
|
|
44
|
+
ref,
|
|
45
|
+
component,
|
|
46
|
+
key
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { useForcedModifierStamp };
|
package/dist/spec/specToJsx.d.ts
CHANGED
|
@@ -32,6 +32,12 @@ interface SpecToJsxOptions {
|
|
|
32
32
|
* package that exports it.
|
|
33
33
|
*/
|
|
34
34
|
glyphMembers?: Readonly<Record<string, readonly string[]>>;
|
|
35
|
+
/**
|
|
36
|
+
* Component type → the states it declares. A design-time instance may pin one (a canvas mock of a
|
|
37
|
+
* filled field); a state is never a prop, so code leaves it out rather than writing
|
|
38
|
+
* `<Input filled />`, which would force the look in production.
|
|
39
|
+
*/
|
|
40
|
+
states?: Readonly<Record<string, readonly string[]>>;
|
|
35
41
|
}
|
|
36
42
|
interface SpecToJsxResult {
|
|
37
43
|
/** Generated JSX source code */
|