@yahoo/uds-create-config 5.69.0 → 5.71.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/system.js +4 -0
- package/dist/entities/system/Component.d.ts +10 -4
- package/dist/entities/system/Component.js +22 -12
- package/dist/entities/system/LinkedSystem.d.ts +2 -0
- package/dist/entities/system/LinkedSystem.js +14 -4
- package/dist/entities/system/link-plan.d.ts +34 -1
- package/dist/entities/system/link-plan.js +157 -2
- package/dist/framework/Config.d.ts +1 -1
- package/dist/framework/Config.js +1 -1
- package/dist/framework/component-api-changes.d.ts +14 -1
- package/dist/framework/component-api-changes.js +22 -6
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/migrations/20261102185610_link_replace.d.ts +7 -0
- package/dist/migrations/20261102185610_link_replace.js +8 -0
- package/dist/migrations/20261102193912_map_props_from.d.ts +12 -0
- package/dist/migrations/20261102193912_map_props_from.js +10 -0
- package/dist/spec/index.d.ts +2 -2
- package/dist/spec/index.js +2 -2
- package/dist/spec/prop-mapping.d.ts +34 -2
- package/dist/spec/prop-mapping.js +47 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ import { Instance, InstanceSlot, InstanceSpec, instanceHolding } from "./spec/in
|
|
|
51
51
|
import { ForwardBlockedReason, ForwardOption, ForwardOptions, ForwardRequest } from "./entities/system/component-forwards.js";
|
|
52
52
|
import { AnatomyNodeClass, AuthoredPropBody, Component, ComponentBody, ComponentClass, ComponentCreateInput, ComponentElementBody, ComponentItemInput, ComponentPropBody, ComponentReference, ComponentStyleBody, ElementVisibility, ElementVisibilityInput, ElementVisibilitySchema, ExtendedComponentRef, ForwardClass, LayerClass, ProjectedVisibility, PropClass, PropShapeSchema, SLOT_CODE_FORMS, VariantValueBody, VariantValues, blankComponentBody, canonicalWhen, forwardedNames, layerRef, ownValues, ownsItsValues, valueRef } from "./entities/system/Component.js";
|
|
53
53
|
import { LINK_SLUG, LINK_SLUG_MESSAGE, LinkDeclaration, LinkedSystem, LinkedSystemClass, LinkedSystemCreateInput, LinkedSystemItemInput, LinkedSystemResolver, LinkedSystemState, PinDirective, PinOptions, PinOptionsField, PinOptionsInput, ResolvedSource, Source, SourceUnavailable, borrowedGroup, borrowedItem, isLinkSlug, resolvedSource, sourceOfGroup, sourceOfItem, sourceSlugFor, sourceUnavailable, suggestLinkSlug } from "./entities/system/LinkedSystem.js";
|
|
54
|
-
import { BreakOutcome, BreakPlan, BreakPlanInput, BreakPlanRow, BreakReach, DroppedDirective, LinkArrival, LinkPaths, LinkPlan, LinkPlanInput, LinkedElsewhere, OnLinked, SourceRowState, UnlinkPlan, UnlinkPlanInput, planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
|
|
54
|
+
import { BreakOutcome, BreakPlan, BreakPlanInput, BreakPlanRow, BreakReach, DroppedDirective, LinkArrival, LinkPaths, LinkPlan, LinkPlanInput, LinkReplacement, LinkReplacements, LinkedElsewhere, OnLinked, SourceRowState, UnlinkPlan, UnlinkPlanInput, planBreak, planLink, planUnlink, sourceRowStates } from "./entities/system/link-plan.js";
|
|
55
55
|
import { EntityChange, KindSlice, Snapshot } from "./framework/snapshot.js";
|
|
56
56
|
import { DanglingDirective, DanglingRef, LeafAddress, MisdeclaredOverlay, OverlayVerb, OverrideCopyingSource, RedundantQualifier, UnadoptedDirective, UnreadableBorrow, UnstatableCondition, UnstatableOverride, classifyOverlay, danglingDirectives, danglingSourcedRefs, excludedCondition, leafAddresses, leafVerb, misdeclaredOverlays, overlayVerb, overridesCopyingSource, redundantQualifiers, unadoptedDirectives, unreadableBorrows, unreadableTokenBorrows, unstatableConditions, unstatableOverrides, valueAt } from "./framework/source-integrity.js";
|
|
57
57
|
import { AppliedOp, AttachedSources, BatchReceipt, Config, CssGrammar, Edition, HydrationOptions, ListOptions, LiveConfig, Origin, Patch, RecordedSource, SERIALIZED_CONFIG_VERSION, SerializedConfig, SkippedOp, SourcesBySlug, StoredConfig, SubPatch, TreeNode, sameOrigin } from "./framework/Config.js";
|
|
@@ -134,4 +134,4 @@ import { valueLeavesOf, valueSchemaOf } from "./framework/value-domain.js";
|
|
|
134
134
|
import { views } from "./framework/views-facade.js";
|
|
135
135
|
import { RN_STYLE_KEYS } from "./react-native/style-keys.generated.js";
|
|
136
136
|
import { EditedCellContent, cellSeedSpec, editedCellContent, followCellContent, followingContent, resetCellContent, withCellValues } from "./spec/bake.js";
|
|
137
|
-
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 AnatomyNodeClass, type AnatomyReport, Annotation, type AnnotationClass, AnnotationFields, type AnnotationSegment, type AnySystemConfig, type AppliedOp, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredDefaultColor, type AuthoredDefaultsOf, 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 ComponentApiBreak, type ComponentApiChange, 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 DefaultColor, type DefaultColorValue, type DefaultColors, DefaultsSection, type DefaultsSectionClass, 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, type DroppedDirective, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type EditedCellContent, 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 ForwardClass, 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 ItemInput, type ItemOf, type KindRef, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerClass, type LayerDeclaration, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, type LinkedDraw, type LinkedElsewhere, type LinkedHandle, LinkedSystem, type LinkedSystemClass, type LinkedSystemCreateInput, type LinkedSystemItemInput, type LinkedSystemResolver, type LinkedSystemState, LintSection, type LintSectionClass, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, MOTION_FACTORY, MOTION_VARIANT_STATES, type MarkerKind, type Max, type Min, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierClass, type ModifierGroupMeta, type ModifierProps, type ModuleViewLink, Motion, type MotionClass, type MotionPresetToken, type Multiply, NATIVE_ACTIVATIONS, type NativeActivation, type NativeFlexValue, NativeModifier, type NativeModifierClass, NativeSettings, NativeStyleProperty, NativeToken, Node, type NodeClass, type OklchColor, type OnLinked, type OpHandler, type OpInput, Operation, type OperationClass, type Origin, type OrphanedMotionVariant, type OverlayVerb, type OverrideCondition, type OverrideCopyingSource, 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 PreviewStatePins, type ProjectedVisibility, type PropClass, type PropCondition, type PropDecl, type PropDeclaration, type PropDefaultCondition, type PropMap, type PropRoute, type PropRule, type PropShapeSchema, type PropsOrRules, 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 RegisteredComponentHandles, type RegisteredEntities, type RegisteredGroupPaths, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleBag, type RegisteredStyleProps, type RegisteredTokenValues, type RelativeLineHeightValue, 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 Rgba, 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 ShipGraphFile, type ShipRuleOptions, 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 SourceType, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredDefaultCondition, type StoredPreviewCondition, type StyleClass, type StyleDeclarationGroup, type StylePropEntry, type StylePropLeaf, type StylePropNumberUnit, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyClass, type StylePropertyItem, type StyleProps, type StyleRefProps, type StyleRefs, type StyleRuleInput, type StyleSetChange, 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 Timing, type TimingParts, 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 UnconditionalDefaults, 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, calcFunction, calcOperands, calcOperator, canonicalWhen, canvasCellAt, canvasDefaultCoordinate, capturedFromDom, cellAxes, cellSeedSpec, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, clearsCompositeDefault, codeSlotsOf, collectRefs, compareComponentRules, componentApiChanges, componentClassBase, componentCompositeClasses, componentInteractions, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSourceDerivedFields, componentSpec, componentStateAttribute, componentStateAttributes, componentStateDefaults, componentStates, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, compositeMemberBag, condArms, condValue, containsMarker, contrastRatio, 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, defaultColorOf, defaultColorsOf, defaultsFor, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveInputDir, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, editedCellContent, elementFromCaptured, entityPathProblem, entityRefOf, entryKeyOf, evaluateCalc, excludedCondition, expandComponent, expandSpec, fieldKeys, followCellContent, followingContent, fontFamilyStack, fontFileDescriptors, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, forwardClaims, forwardRoutes, forwardedCompositeClears, 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, instanceStatePins, interactionKey, interactionModifiers, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCreatedComponent, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isFontFaceStyle, isFontFaceWeight, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isInteractionModifier, isLinkSlug, isMax, isMin, isMintedRow, isMultiply, isNativeConfig, isNativeFlexValue, isOklchColor, isPlainObject, isPreviewElement, isPreviewStatePins, isRef, isRelativeLineHeightValue, isReservedWord, isShadow, isSubtract, isSystemConfig, isTiming, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerDeclarations, layerJsMotionPresets, layerPrefixOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedDraw, linkedLocalRow, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, luminance, markerKind, matchEntities, matchTokens, matchesExclude, max, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, min, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, moduleViewOf, motionClassName, motionKeyframesName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeFlexToWeb, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, overridesCopyingSource, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseColor, parseCssLength, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propDefaultConditions, 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, renderTiming, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resetCellContent, resolutionSchema, resolveAppliedComposites, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveLinkedAlias, resolveLinkedDir, resolveOutDir, resolveOutputAlias, resolveRetiredLinkedDir, 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, sameOrigin, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, shippedModuleRoots, shippedModules, shipsByDefault, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitRuleComposites, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedDefaultConditions, 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, styleSetEdits, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, timing, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unreadableTokenBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, webFlexToNative, whenParts, withCellValues, withPropDefaultConditions, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
|
137
|
+
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 AnatomyNodeClass, type AnatomyReport, Annotation, type AnnotationClass, AnnotationFields, type AnnotationSegment, type AnySystemConfig, type AppliedOp, type AsInput, type AttachedSources, type Authored, type AuthoredComponent, type AuthoredDefaultColor, type AuthoredDefaultsOf, 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 ComponentApiBreak, type ComponentApiChange, 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 DefaultColor, type DefaultColorValue, type DefaultColors, DefaultsSection, type DefaultsSectionClass, 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, type DroppedDirective, ENTITY_PATH_MESSAGE, EXPORT_MEMBER, type EditedCellContent, 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 ForwardClass, 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 ItemInput, type ItemOf, type KindRef, type KindSignature, type KindSlice, LINK_SLUG, LINK_SLUG_MESSAGE, type LayerClass, type LayerDeclaration, type LayerElement, type LayerMap, type LayerPropDriver, type LayerStyleOptions, type LeafAddress, type LinkArrival, type LinkDeclaration, type LinkPaths, type LinkPlan, type LinkPlanInput, type LinkReplacement, type LinkReplacements, type LinkedDraw, type LinkedElsewhere, type LinkedHandle, LinkedSystem, type LinkedSystemClass, type LinkedSystemCreateInput, type LinkedSystemItemInput, type LinkedSystemResolver, type LinkedSystemState, LintSection, type LintSectionClass, type ListOptions, type LiveConfig, type LocalOverlay, MINTED, MODIFIER_CATEGORIES, MOTION_FACTORY, MOTION_VARIANT_STATES, type MarkerKind, type Max, type Min, type MisdeclaredOverlay, Modifier, type ModifierCategory, type ModifierClass, type ModifierGroupMeta, type ModifierProps, type ModuleViewLink, Motion, type MotionClass, type MotionPresetToken, type Multiply, NATIVE_ACTIVATIONS, type NativeActivation, type NativeFlexValue, NativeModifier, type NativeModifierClass, NativeSettings, NativeStyleProperty, NativeToken, Node, type NodeClass, type OklchColor, type OnLinked, type OpHandler, type OpInput, Operation, type OperationClass, type Origin, type OrphanedMotionVariant, type OverlayVerb, type OverrideCondition, type OverrideCopyingSource, 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 PreviewStatePins, type ProjectedVisibility, type PropClass, type PropCondition, type PropDecl, type PropDeclaration, type PropDefaultCondition, type PropMap, type PropRoute, type PropRule, type PropShapeSchema, type PropsOrRules, 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 RegisteredComponentHandles, type RegisteredEntities, type RegisteredGroupPaths, type RegisteredMembers, type RegisteredModifiers, type RegisteredPaths, type RegisteredStyleBag, type RegisteredStyleProps, type RegisteredTokenValues, type RelativeLineHeightValue, 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 Rgba, 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 ShipGraphFile, type ShipRuleOptions, 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 SourceType, type SourceUnavailable, type SourcesBySlug, type SourcesOf, type SpecNode, type SplitStyleProps, type StampedPatch, type StoredConfig, type StoredDefaultCondition, type StoredPreviewCondition, type StyleClass, type StyleDeclarationGroup, type StylePropEntry, type StylePropLeaf, type StylePropNumberUnit, type StylePropValue, type StylePropValueCtx, type StylePropValueKind, StyleProperty, type StylePropertyClass, type StylePropertyItem, type StyleProps, type StyleRefProps, type StyleRefs, type StyleRuleInput, type StyleSetChange, 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 Timing, type TimingParts, 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 UnconditionalDefaults, 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, calcFunction, calcOperands, calcOperator, canonicalWhen, canvasCellAt, canvasDefaultCoordinate, capturedFromDom, cellAxes, cellSeedSpec, changeOf, changeValueAt, changesOf, childrenPolicy, classGrammar, classLeaf, className, classPrefixOf, classSelector, classifyOverlay, classifyStylePropValue, clearsCompositeDefault, codeSlotsOf, collectRefs, compareComponentRules, componentApiChanges, componentClassBase, componentCompositeClasses, componentInteractions, componentLayerClass, componentModuleFilePaths, componentModuleKey, componentModuleSource, componentMotionClasses, componentPropClasses, componentPropComposites, componentRegistryImports, componentRuleClasses, componentSourceDerivedFields, componentSpec, componentStateAttribute, componentStateAttributes, componentStateDefaults, componentStates, composedValueAuthoring, composedValueFormOf, composedValueForms, composedValueSchemas, compositeMemberBag, condArms, condValue, containsMarker, contrastRatio, 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, defaultColorOf, defaultColorsOf, defaultsFor, defineComponent, defineConfig, defineDerivedEntity, defineEntity, defineOverride, defineSubEntity, deriveCreateSchema, deriveInputDir, deriveSpec, deriveUpdateSchema, describeBody, describePatch, detectedWireVersion, diffRendered, divide, editOp, editedCellContent, elementFromCaptured, entityPathProblem, entityRefOf, entryKeyOf, evaluateCalc, excludedCondition, expandComponent, expandSpec, fieldKeys, followCellContent, followingContent, fontFamilyStack, fontFileDescriptors, forceModeAttribute, forceModeAttributeOf, forceModeProp, forceModePropGroup, forceModePropValue, forceModeProps, forceStateAttribute, forceStateSelector, forwardClaims, forwardRoutes, forwardedCompositeClears, 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, instanceStatePins, interactionKey, interactionModifiers, intoName, isAdd, isAuthored, isBinaryAsset, isCalc, isComposedValue, isConfigFormatError, isConfigRejection, isCreatedComponent, isCssProperty, isCustomPropertyKey, isDeclaredElementProp, isDerivedColor, isDivide, isEntityPath, isExtendedRef, isFontFaceStyle, isFontFaceWeight, isForceModeProp, isGradient, isGroupBody, isIdentifier, isInlineMotion, isInteractionModifier, isLinkSlug, isMax, isMin, isMintedRow, isMultiply, isNativeConfig, isNativeFlexValue, isOklchColor, isPlainObject, isPreviewElement, isPreviewStatePins, isRef, isRelativeLineHeightValue, isReservedWord, isShadow, isSubtract, isSystemConfig, isTiming, isTokenReader, isTransition, isValueSlot, jsMotionBody, jsMotionPresets, jsMotionPropFields, kebabComponent, keyedPreviewConditions, kindOf, kindsOf, layerDeclarations, layerJsMotionPresets, layerPrefixOf, layerPropDrivers, layerPropRoutes, layerRef, layerRoutedProps, layerStyles, layerTextProp, leafAddresses, leafVerb, leavesOfStylePropValue, librariesBoundBy, libraryHolding, lighten, linearGradient, linkedComponentModule, linkedDraw, linkedLocalRow, linkedModuleView, linkedVarNaming, literalValueOf, liveStateProps, luminance, markerKind, matchEntities, matchTokens, matchesExclude, max, memberFromLeaf, memberLeaves, memberOf, memberRef, memberVariantOptions, memoryConfigSource, min, misdeclaredOverlays, mix, modeAxes, modifierAxes, modifierAxis, modifierCategory, modifierGroupFields, modifierInvariants, modifierLeaf, modifierUtilitiesUsed, moduleViewOf, motionClassName, motionKeyframesName, motionPresetTokens, motionVariantGroups, multiply, nameIconsInTree, nameStyleNumbers, namedFields, nativeFlexToWeb, nativeTokenValue, negatedCssValue, normalizeName, normalizeStyleValue, oklch, opOf, opVerb, opacityPercentage, opsForKind, orList, orRef, orphanedMotionVariants, overlayVerb, overrideCondition, overrideKey, overrideKeyModifiers, overrideModifiers, overridesCopyingSource, ownTextProp, ownValues, ownerOf, ownsItsValues, packageKey, packageName, parseColor, parseCssLength, parseRootFontSize, parseTokenValue, partsOf, pathDelta, pathOf, pathSegments, pinStyleNumbers, placedGlyphElement, placedMotions, planBreak, planCopy, planLink, planUnlink, prefixed, prepareLinkedTokenBody, previewConditionalProps, previewConditions, previewDefaults, previewMatrix, previewSpec, propApplies, propDefaultConditions, 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, renderTiming, renderTransition, renderValue, renderedElement, renderedSignatureOf, renderedTarget, replaceRefMarkers, requiredContentCondition, requiredContentLayers, requiredPropsUnforwarded, resetCellContent, resolutionSchema, resolveAppliedComposites, resolveBinding, resolveComponentProps, resolveFieldValue, resolveIconLibraries, resolveInputDir, resolveLinkedAlias, resolveLinkedDir, resolveOutDir, resolveOutputAlias, resolveRetiredLinkedDir, 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, sameOrigin, schemaVersionOf, searchEntities, searchTokens, setAtPath, shadow, shippedModuleRoots, shippedModules, shipsByDefault, signatureOf, slotCodeForms, slotTargetsOf, snapshotHtml, sniffValueType, sourceEntries, sourceHops, sourceOf, sourceOfGroup, sourceOfItem, sourceRowStates, sourceSlugFor, sourceUnavailable, sourceUnreachable, sourceVarPrefix, specFromCapture, specToNodePatches, specWithResolvedVisibility, spellTokenRead, splitRef, splitRefMarkers, splitRuleComposites, splitStyleProps, splitVariants, stamp, standsInForCode, statePointerProp, stateRef, stateTest, stateVariantNames, storedDefaultConditions, 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, styleSetEdits, subtract, suggestLinkSlug, summarizeChanges, surfaceProp, surfaceProps, tablerExportName, tablerStyledExportName, timing, toCssPropertyName, tokenBinding, tokenExists, tokenReference, tokenValueRow, tokenValueRows, tokenVariablesAsText, touchedFields, transition, unadoptedDirectives, unconditionalPreviewProps, unknownStyleLeaves, unreadableBorrows, unreadableTokenBorrows, unstatableConditions, unstatableOverrides, updateRefIndex, upgradeDraftEntries, upgradePatch, upgradeSerializedConfig, validateComponentProps, validateSpec, valueAt, valueForwardsOf, valueLeavesOf, valueRef, valueSchemaOf, valueTypeOf, varPrefixOf, views, visibilityStateProps, visibilityTerms, webFlexToNative, whenParts, withCellValues, withPropDefaultConditions, withRequiredContentHidden, withoutTruthyTerm, wrappedElementKey };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** `linked-system/link` and `link-plan` take `replace`: a component this config holds under one name,
|
|
2
|
+
* replaced with a linked system's of another name. The op writes only patches that already exist (a
|
|
3
|
+
* create, a rename, a pin update), and no stored config or draft row carries its input, so this is an
|
|
4
|
+
* identity hop. Retire it only when no supported artifact predates this schema. */
|
|
5
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
6
|
+
export declare const LINK_REPLACE_VERSION = 20261102185610;
|
|
7
|
+
export declare const linkReplaceMigration: SchemaMigration;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/migrations/20261102185610_link_replace.ts
|
|
2
|
+
const LINK_REPLACE_VERSION = 20261102185610;
|
|
3
|
+
const linkReplaceMigration = {
|
|
4
|
+
version: LINK_REPLACE_VERSION,
|
|
5
|
+
up: (json) => json
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { LINK_REPLACE_VERSION, linkReplaceMigration };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `component/map-props` op takes `from` and `only`. `from` names a component the system no
|
|
3
|
+
* longer has (a rename or removal its design files didn't follow): the mapping moves that
|
|
4
|
+
* component's instances onto the op's own component, then maps their props, and with `from` the
|
|
5
|
+
* rules may be empty. `only` limits it to some nodes of one design file.
|
|
6
|
+
*
|
|
7
|
+
* Only the op's input moved. A mapping writes nothing to the config, so no stored config or draft
|
|
8
|
+
* patch holds one, and `up` is identity with no `upPatch`.
|
|
9
|
+
*/
|
|
10
|
+
import type { SchemaMigration } from '../framework/schema-version';
|
|
11
|
+
export declare const MAP_PROPS_FROM_VERSION = 20261102193912;
|
|
12
|
+
export declare const mapPropsFromMigration: SchemaMigration;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/migrations/20261102193912_map_props_from.ts
|
|
2
|
+
const MAP_PROPS_FROM_VERSION = 20261102193912;
|
|
3
|
+
const mapPropsFromMigration = {
|
|
4
|
+
version: MAP_PROPS_FROM_VERSION,
|
|
5
|
+
up(json) {
|
|
6
|
+
return json;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { MAP_PROPS_FROM_VERSION, mapPropsFromMigration };
|
package/dist/spec/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { AcceptsChildNodes, ChildNodesClassification, ClassifyChildNodes, buildA
|
|
|
7
7
|
import { CollapseTextLabelsResult, CollapsedTextLabel, collapseWrappedTextLabels } from "./collapse-text-labels.js";
|
|
8
8
|
import { GlyphJsxForm, GlyphNodeResolver, glyphJsxForm, glyphMemberOf, jsxIdentifier, parseGlyphType } from "./glyph-jsx.js";
|
|
9
9
|
import { JsxToSpecOptions, UNRESOLVED, hasUnresolvedProps, jsxToSpec, stripUnresolvedProps } from "./jsxToSpec.js";
|
|
10
|
-
import { MappedInstance, MappedProps, MatchedValue, PropMapping, PropMappingConflict, PropMappingResult, PropMappingRule, applyPropMapping, mapComponentProps, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn } from "./prop-mapping.js";
|
|
10
|
+
import { MappedInstance, MappedProps, MappingScope, MatchedValue, PropMapping, PropMappingConflict, PropMappingResult, PropMappingRule, applyPropMapping, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, swapMappingRulesSchema } from "./prop-mapping.js";
|
|
11
11
|
import { SpecToJsxOptions, SpecToJsxResult, specToJsx } from "./specToJsx.js";
|
|
12
12
|
|
|
13
13
|
//#region src/spec/index.d.ts
|
|
@@ -29,4 +29,4 @@ import { SpecToJsxOptions, SpecToJsxResult, specToJsx } from "./specToJsx.js";
|
|
|
29
29
|
* element, without changing the rendered layer hierarchy. */
|
|
30
30
|
declare const SYNTHETIC_TEXT_SLOT_PROP = "data-uds-synthetic-text-slot";
|
|
31
31
|
//#endregion
|
|
32
|
-
export { type AcceptsChildNodes, type Cell, type CellSlot, type ChildNodesClassification, type ClassifyChildNodes, type CollapseTextLabelsResult, type CollapsedTextLabel, type DocumentRename, type GlyphJsxForm, type GlyphNodeResolver, type GraftableElement, type GraftableSpec, type JsxToSpecOptions, type MappedInstance, type MappedProps, type MatchedValue, type PreviewElement, type PreviewRef, type PreviewSpecNode, type PreviewValue, type PropMapping, type PropMappingConflict, type PropMappingResult, type PropMappingRule, type RewritableElement, type RewritableSpec, SYNTHETIC_TEXT_SLOT_PROP, type Slot, type SlotCell, type SpecRewrite, type SpecToJsxOptions, type SpecToJsxResult, UNRESOLVED, applyForcedModifiers, applyPropMapping, buildAcceptsChildNodes, buildClassifyChildNodes, collapseWrappedTextLabels, collectForcedModifierProps, componentPathAfter, composeRenames, documentRenamesFromPatches, documentRenamesFromSource, glyphJsxForm, glyphMemberOf, graftPreviewElements, graftSlotContent, hasPreviewElementDeep, hasUnresolvedProps, isComponentRef, isPreviewElement, isPreviewRef, jsxIdentifier, jsxToSpec, mapComponentProps, onlyMapsProps, parseGlyphType, previewElementNodes, previewElementType, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, rewriteSpecRefs, specToJsx, stripInjectedSlots, stripUnresolvedProps, styleNumberReadingRenames, withContainerChildSlots, withEmptyNodeSlots, withRenderSlots };
|
|
32
|
+
export { type AcceptsChildNodes, type Cell, type CellSlot, type ChildNodesClassification, type ClassifyChildNodes, type CollapseTextLabelsResult, type CollapsedTextLabel, type DocumentRename, type GlyphJsxForm, type GlyphNodeResolver, type GraftableElement, type GraftableSpec, type JsxToSpecOptions, type MappedInstance, type MappedProps, type MappingScope, type MatchedValue, type PreviewElement, type PreviewRef, type PreviewSpecNode, type PreviewValue, type PropMapping, type PropMappingConflict, type PropMappingResult, type PropMappingRule, type RewritableElement, type RewritableSpec, SYNTHETIC_TEXT_SLOT_PROP, type Slot, type SlotCell, type SpecRewrite, type SpecToJsxOptions, type SpecToJsxResult, UNRESOLVED, applyForcedModifiers, applyPropMapping, buildAcceptsChildNodes, buildClassifyChildNodes, collapseWrappedTextLabels, collectForcedModifierProps, componentPathAfter, composeRenames, documentRenamesFromPatches, documentRenamesFromSource, glyphJsxForm, glyphMemberOf, graftPreviewElements, graftSlotContent, hasPreviewElementDeep, hasUnresolvedProps, isComponentRef, isPreviewElement, isPreviewRef, jsxIdentifier, jsxToSpec, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, parseGlyphType, previewElementNodes, previewElementType, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, rewriteSpecRefs, specToJsx, stripInjectedSlots, stripUnresolvedProps, styleNumberReadingRenames, swapMappingRulesSchema, withContainerChildSlots, withEmptyNodeSlots, withRenderSlots };
|
package/dist/spec/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { graftPreviewElements, graftSlotContent, hasPreviewElementDeep, isComponentRef, isPreviewElement, isPreviewRef, previewElementNodes, previewElementType } from "./preview-elements.js";
|
|
2
2
|
import { componentPathAfter, composeRenames, documentRenamesFromPatches, documentRenamesFromSource, rewriteSpecRefs, styleNumberReadingRenames } from "./rewrite-refs.js";
|
|
3
|
-
import { applyPropMapping, mapComponentProps, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn } from "./prop-mapping.js";
|
|
3
|
+
import { applyPropMapping, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, swapMappingRulesSchema } from "./prop-mapping.js";
|
|
4
4
|
import { glyphJsxForm, glyphMemberOf, jsxIdentifier, parseGlyphType } from "./glyph-jsx.js";
|
|
5
5
|
import { applyForcedModifiers, collectForcedModifierProps } from "./apply-forced-modifiers.js";
|
|
6
6
|
import { collapseWrappedTextLabels } from "./collapse-text-labels.js";
|
|
@@ -26,4 +26,4 @@ import { specToJsx } from "./specToJsx.js";
|
|
|
26
26
|
* element, without changing the rendered layer hierarchy. */
|
|
27
27
|
const SYNTHETIC_TEXT_SLOT_PROP = "data-uds-synthetic-text-slot";
|
|
28
28
|
//#endregion
|
|
29
|
-
export { SYNTHETIC_TEXT_SLOT_PROP, UNRESOLVED, applyForcedModifiers, applyPropMapping, buildAcceptsChildNodes, buildClassifyChildNodes, collapseWrappedTextLabels, collectForcedModifierProps, componentPathAfter, composeRenames, documentRenamesFromPatches, documentRenamesFromSource, glyphJsxForm, glyphMemberOf, graftPreviewElements, graftSlotContent, hasPreviewElementDeep, hasUnresolvedProps, isComponentRef, isPreviewElement, isPreviewRef, jsxIdentifier, jsxToSpec, mapComponentProps, onlyMapsProps, parseGlyphType, previewElementNodes, previewElementType, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, rewriteSpecRefs, specToJsx, stripInjectedSlots, stripUnresolvedProps, styleNumberReadingRenames, withContainerChildSlots, withEmptyNodeSlots, withRenderSlots };
|
|
29
|
+
export { SYNTHETIC_TEXT_SLOT_PROP, UNRESOLVED, applyForcedModifiers, applyPropMapping, buildAcceptsChildNodes, buildClassifyChildNodes, collapseWrappedTextLabels, collectForcedModifierProps, componentPathAfter, composeRenames, documentRenamesFromPatches, documentRenamesFromSource, glyphJsxForm, glyphMemberOf, graftPreviewElements, graftSlotContent, hasPreviewElementDeep, hasUnresolvedProps, isComponentRef, isPreviewElement, isPreviewRef, jsxIdentifier, jsxToSpec, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, parseGlyphType, previewElementNodes, previewElementType, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, rewriteSpecRefs, specToJsx, stripInjectedSlots, stripUnresolvedProps, styleNumberReadingRenames, swapMappingRulesSchema, withContainerChildSlots, withEmptyNodeSlots, withRenderSlots };
|
|
@@ -15,10 +15,19 @@ interface PropMappingRule {
|
|
|
15
15
|
readonly unset?: readonly string[];
|
|
16
16
|
}
|
|
17
17
|
interface PropMapping {
|
|
18
|
-
/** The component whose instances it rewrites, as a path. */
|
|
18
|
+
/** The component whose instances it rewrites, as a path. With `from`, the one they become. */
|
|
19
19
|
readonly component: string;
|
|
20
|
+
/** The component whose instances become `component`'s, as a path; it needn't exist anymore. */
|
|
21
|
+
readonly from?: string;
|
|
22
|
+
/** Limits it to some nodes of one design file, by its canvas id and their ids: Create's alone. */
|
|
23
|
+
readonly only?: MappingScope;
|
|
20
24
|
readonly rules: readonly PropMappingRule[];
|
|
21
25
|
}
|
|
26
|
+
/** Some nodes of one design file. */
|
|
27
|
+
interface MappingScope {
|
|
28
|
+
readonly canvas: string;
|
|
29
|
+
readonly nodes: readonly string[];
|
|
30
|
+
}
|
|
22
31
|
/** A rule as a tool takes it: the shape every surface that applies a mapping parses its input with. */
|
|
23
32
|
declare const propMappingRuleSchema: z.ZodObject<{
|
|
24
33
|
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
@@ -31,6 +40,29 @@ declare const propMappingRulesSchema: z.ZodArray<z.ZodObject<{
|
|
|
31
40
|
set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
32
41
|
unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
42
|
}, z.core.$strip>>;
|
|
43
|
+
/** A swap's rules: none is a swap that keeps every prop, and `when: {}` reaches every swapped instance. */
|
|
44
|
+
declare const swapMappingRulesSchema: z.ZodArray<z.ZodObject<{
|
|
45
|
+
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
46
|
+
set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
|
+
unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
/**
|
|
50
|
+
* A mapping's rules as `map-props` takes them: at least one for a mapping, any number for a swap
|
|
51
|
+
* (`from`), where none keeps the swapped instances' props and `when: {}` reaches every one of them.
|
|
52
|
+
* Required by the op's own check rather than the schema, so one shape serves both.
|
|
53
|
+
*/
|
|
54
|
+
declare const mapPropsRulesSchema: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
55
|
+
when: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
56
|
+
set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
57
|
+
unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
/** `only` as a tool takes it. */
|
|
60
|
+
declare const mappingScopeSchema: z.ZodObject<{
|
|
61
|
+
canvas: z.ZodString;
|
|
62
|
+
nodes: z.ZodArray<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
/** `from` as a tool takes it. */
|
|
65
|
+
declare const mappingFromSchema: z.ZodString;
|
|
34
66
|
/**
|
|
35
67
|
* The mappings a batch of edits carries, in order: each `component/map-props` op as the mapping it
|
|
36
68
|
* applies. The op changes nothing in the config, so the host that ran the batch applies these to the
|
|
@@ -94,4 +126,4 @@ type MappedProps = {
|
|
|
94
126
|
*/
|
|
95
127
|
declare function mapComponentProps(config: Config, mapping: PropMapping, instances: readonly Record<string, unknown>[]): MappedProps;
|
|
96
128
|
//#endregion
|
|
97
|
-
export { MappedInstance, MappedProps, MatchedValue, PropMapping, PropMappingConflict, PropMappingResult, PropMappingRule, applyPropMapping, mapComponentProps, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn };
|
|
129
|
+
export { MappedInstance, MappedProps, MappingScope, MatchedValue, PropMapping, PropMappingConflict, PropMappingResult, PropMappingRule, applyPropMapping, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, swapMappingRulesSchema };
|
|
@@ -22,6 +22,11 @@ import { z } from "zod";
|
|
|
22
22
|
* Positions follow the rename rewriter's: an element's own props, every modifier block nested in
|
|
23
23
|
* them (`_hover: { variant: … }` is the same element's props under a condition), and each
|
|
24
24
|
* `layerProps` bag whose layer renders the component.
|
|
25
|
+
*
|
|
26
|
+
* A mapping with `from` also swaps the component: instances of `from`, a component the system
|
|
27
|
+
* may no longer have (the Bridge's `SelectContent`, after a take made in code replaced it), become
|
|
28
|
+
* instances of `component`, and the rules move their props onto it. Which component replaces which
|
|
29
|
+
* is as much a decision as a prop's new spelling, so it comes from the person too.
|
|
25
30
|
*/
|
|
26
31
|
/** A rule as a tool takes it: the shape every surface that applies a mapping parses its input with. */
|
|
27
32
|
const propMappingRuleSchema = z.object({
|
|
@@ -35,6 +40,21 @@ const propMappingRuleSchema = z.object({
|
|
|
35
40
|
});
|
|
36
41
|
/** The rules of a mapping, as a tool takes them. */
|
|
37
42
|
const propMappingRulesSchema = z.array(propMappingRuleSchema).min(1).describe("Every rule whose `when` matches an instance as stored applies to it, so separate props are mapped by separate rules, and a combination by one rule naming both.");
|
|
43
|
+
/** A swap's rules: none is a swap that keeps every prop, and `when: {}` reaches every swapped instance. */
|
|
44
|
+
const swapMappingRulesSchema = z.array(propMappingRuleSchema).describe("The rules for the swapped instances, as a mapping has them. `when: {}` applies to every one of them (to `unset` a prop the new component lacks), and none keeps their props as they are.");
|
|
45
|
+
/**
|
|
46
|
+
* A mapping's rules as `map-props` takes them: at least one for a mapping, any number for a swap
|
|
47
|
+
* (`from`), where none keeps the swapped instances' props and `when: {}` reaches every one of them.
|
|
48
|
+
* Required by the op's own check rather than the schema, so one shape serves both.
|
|
49
|
+
*/
|
|
50
|
+
const mapPropsRulesSchema = z.array(propMappingRuleSchema).default([]).describe("Every rule whose `when` matches an instance as stored applies to it, so separate props are mapped by separate rules, and a combination by one rule naming both. A mapping needs at least one. With `from`, none keeps the swapped instances' props, and `when: {}` reaches every swapped instance.");
|
|
51
|
+
/** `only` as a tool takes it. */
|
|
52
|
+
const mappingScopeSchema = z.object({
|
|
53
|
+
canvas: z.string().min(1).describe("The design file's canvas id."),
|
|
54
|
+
nodes: z.array(z.string().min(1)).min(1).describe("The ids of the nodes it reaches, in that design file.")
|
|
55
|
+
}).describe("Create only: limits the mapping to these nodes of one design file, for fixing one instance before asking about the rest. A checkout's call sites aren't nodes, so there it isn't taken.");
|
|
56
|
+
/** `from` as a tool takes it. */
|
|
57
|
+
const mappingFromSchema = z.string().min(1).describe("The component whose instances become this one's, as a path: the one a design file still names after the system lost it (`SelectContent`, replaced by `SelectMenu`). It needn't exist. Which component replaces which is the user's call: propose it, and apply it only once they confirm.");
|
|
38
58
|
/**
|
|
39
59
|
* The mappings a batch of edits carries, in order: each `component/map-props` op as the mapping it
|
|
40
60
|
* applies. The op changes nothing in the config, so the host that ran the batch applies these to the
|
|
@@ -45,10 +65,15 @@ function propMappingsIn(edits) {
|
|
|
45
65
|
return edits.flatMap((edit) => {
|
|
46
66
|
const { op } = editOp(edit);
|
|
47
67
|
if (op.kind !== "component" || op.operation !== "map-props") return [];
|
|
48
|
-
const
|
|
68
|
+
const data = op.data;
|
|
69
|
+
const from = typeof data?.from === "string" ? data.from : void 0;
|
|
70
|
+
const only = mappingScopeSchema.safeParse(data?.only);
|
|
71
|
+
const rules = (from ? swapMappingRulesSchema : propMappingRulesSchema).safeParse(data?.rules ?? (from ? [] : void 0));
|
|
49
72
|
if (!rules.success || typeof op.path !== "string") return [];
|
|
50
73
|
return [{
|
|
51
74
|
component: op.path.replace(/^component:/, ""),
|
|
75
|
+
...from ? { from: from.replace(/^component:/, "") } : {},
|
|
76
|
+
...only.success ? { only: only.data } : {},
|
|
52
77
|
rules: rules.data
|
|
53
78
|
}];
|
|
54
79
|
});
|
|
@@ -81,9 +106,10 @@ function valueRefusal(config, component, prop, value) {
|
|
|
81
106
|
*/
|
|
82
107
|
function propMappingErrors(config, mapping) {
|
|
83
108
|
if (!config.resolve("component", mapping.component)) return [`No component "${mapping.component}"`];
|
|
109
|
+
if (mapping.from === mapping.component) return [`"${mapping.component}" can't replace itself: \`from\` names the component its instances are now`];
|
|
84
110
|
const errors = [];
|
|
85
111
|
mapping.rules.forEach((rule, i) => {
|
|
86
|
-
if (Object.keys(rule.when).length === 0) errors.push(`Rule ${i + 1} matches every instance: name what it matches in \`when\``);
|
|
112
|
+
if (Object.keys(rule.when).length === 0 && mapping.from === void 0) errors.push(`Rule ${i + 1} matches every instance: name what it matches in \`when\``);
|
|
87
113
|
for (const [name, value] of Object.entries(rule.set ?? {})) {
|
|
88
114
|
const prop = surfaceProp(config, mapping.component, name);
|
|
89
115
|
if (!prop) {
|
|
@@ -125,6 +151,11 @@ function mapBag(bag, rules) {
|
|
|
125
151
|
bag: next
|
|
126
152
|
};
|
|
127
153
|
}
|
|
154
|
+
/** A stored type naming `to` in place of what it names, keeping the source it was placed through. */
|
|
155
|
+
function retyped(type, to) {
|
|
156
|
+
const at = type.lastIndexOf("@");
|
|
157
|
+
return `component:${to}${type.includes(":") && at > 0 ? type.slice(at) : ""}`;
|
|
158
|
+
}
|
|
128
159
|
/**
|
|
129
160
|
* A props bag on `component`, with the mapping applied to it when it's the mapped component's, and
|
|
130
161
|
* to the modifier blocks and layer overrides inside it either way. `undefined` when nothing moved.
|
|
@@ -192,8 +223,10 @@ function applyPropMapping(config, spec, mapping) {
|
|
|
192
223
|
let elements;
|
|
193
224
|
let changed = 0;
|
|
194
225
|
const conflicts = [];
|
|
226
|
+
const reached = mapping.only ? new Set(mapping.only.nodes) : void 0;
|
|
195
227
|
for (const [key, element] of Object.entries(spec.elements ?? {})) {
|
|
196
|
-
if (!element
|
|
228
|
+
if (!element) continue;
|
|
229
|
+
if (reached && !reached.has(key)) continue;
|
|
197
230
|
const walk = {
|
|
198
231
|
config,
|
|
199
232
|
mapping,
|
|
@@ -201,14 +234,18 @@ function applyPropMapping(config, spec, mapping) {
|
|
|
201
234
|
conflicts,
|
|
202
235
|
changed: 0
|
|
203
236
|
};
|
|
204
|
-
const
|
|
205
|
-
|
|
237
|
+
const component = componentOf(element.type);
|
|
238
|
+
const swapped = mapping.from !== void 0 && component === mapping.from && typeof element.type === "string";
|
|
239
|
+
if (!swapped && !element.props) continue;
|
|
240
|
+
const props = mapProps(walk, swapped ? mapping.component : component, element.props ?? {}, "props");
|
|
241
|
+
if (!props && !swapped) continue;
|
|
206
242
|
elements ??= { ...spec.elements };
|
|
207
243
|
elements[key] = {
|
|
208
244
|
...element,
|
|
209
|
-
|
|
245
|
+
...swapped ? { type: retyped(element.type, mapping.component) } : {},
|
|
246
|
+
...props ? { props } : {}
|
|
210
247
|
};
|
|
211
|
-
changed += walk.changed;
|
|
248
|
+
changed += walk.changed + (swapped && walk.changed === 0 ? 1 : 0);
|
|
212
249
|
}
|
|
213
250
|
return elements ? {
|
|
214
251
|
spec: {
|
|
@@ -236,7 +273,7 @@ function mapComponentProps(config, mapping, instances) {
|
|
|
236
273
|
errors
|
|
237
274
|
};
|
|
238
275
|
const { spec, conflicts } = applyPropMapping(config, { elements: Object.fromEntries(instances.map((props, i) => [String(i), {
|
|
239
|
-
type: `component:${mapping.component}`,
|
|
276
|
+
type: `component:${mapping.from ?? mapping.component}`,
|
|
240
277
|
props
|
|
241
278
|
}])) }, mapping);
|
|
242
279
|
return {
|
|
@@ -245,11 +282,11 @@ function mapComponentProps(config, mapping, instances) {
|
|
|
245
282
|
const after = spec.elements?.[String(i)]?.props ?? props;
|
|
246
283
|
return {
|
|
247
284
|
props: after,
|
|
248
|
-
changed: after !== props,
|
|
285
|
+
changed: after !== props || mapping.from !== void 0,
|
|
249
286
|
conflicts: conflicts.filter((conflict) => conflict.element === String(i)).flatMap((conflict) => conflict.props)
|
|
250
287
|
};
|
|
251
288
|
})
|
|
252
289
|
};
|
|
253
290
|
}
|
|
254
291
|
//#endregion
|
|
255
|
-
export { applyPropMapping, mapComponentProps, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn };
|
|
292
|
+
export { applyPropMapping, mapComponentProps, mapPropsRulesSchema, mappingFromSchema, mappingScopeSchema, onlyMapsProps, propMappingErrors, propMappingRuleSchema, propMappingRulesSchema, propMappingsIn, swapMappingRulesSchema };
|