@yahoo/uds-create-config 2.20.0 → 2.21.1
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/Component.d.ts +7 -1
- package/dist/Component.js +104 -3
- package/dist/Config.d.ts +34 -29
- package/dist/Config.js +102 -74
- package/dist/Token.d.ts +8 -1
- package/dist/Token.js +13 -11
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -2
- package/dist/native/NativeConfig.d.ts +1 -1
- package/dist/native/NativeConfig.js +1 -1
- package/dist/native/types.d.ts +2 -2
- package/dist/native/validation.js +3 -3
- package/dist/registry-aliases.d.ts +33 -0
- package/dist/registry-aliases.js +27 -0
- package/dist/registry-dir.d.ts +2 -2
- package/dist/registry-dir.js +1 -1
- package/dist/renderer/wrappers/void-elements.js +13 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +16 -22
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import { ColorExpression, ColorSpace, ColorValue, GradientStop, GradientValue, L
|
|
|
5
5
|
import { MOTION_CSS_DIRECTIONS, MOTION_CSS_FILL_MODES, MOTION_CSS_PLAY_STATES, MOTION_CSS_PROPERTY_PREFIXES, MOTION_JS_DRAG_AXES, MOTION_JS_LAYOUT_MODES, MOTION_JS_REPEAT_TYPES, MOTION_JS_SPRING_FIELDS, MOTION_JS_TRANSITION_TYPES, MOTION_JS_TWEEN_FIELDS } from "./motion-constants.js";
|
|
6
6
|
import { CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, CssPropertyWithKeywords } from "./types/css-property-keywords.js";
|
|
7
7
|
import { ColorCssProperty, CssGlobalKeyword, CssPropertyName, CssPropertyValues } from "./types/css-properties.js";
|
|
8
|
-
import { AnyStylePropDefinition, ArbitrarySpec, BaseStyles, BuildOptions, CanvasRole, CanvasRoleEntry, CanvasRoleEntryInput, CanvasRolesDefinition, CanvasRolesDefinitionInput, CanvasRolesInputConstraint, ComponentDefinition, ComponentGroupDefinition, ComponentMetadata, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, CssMotionDefinition, CssMotionFields, CssSlotMotion, FontAssetMember, GlobalStylesDef, JsMotionDefinition, JsMotionFields, JsSlotMotion, LayerInput,
|
|
8
|
+
import { AnyStylePropDefinition, ArbitrarySpec, BaseStyles, BuildOptions, CanvasRole, CanvasRoleEntry, CanvasRoleEntryInput, CanvasRolesDefinition, CanvasRolesDefinitionInput, CanvasRolesInputConstraint, ComponentDefinition, ComponentGroupDefinition, ComponentMetadata, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, CssMotionDefinition, CssMotionFields, CssSlotMotion, FontAssetMember, GlobalStylesDef, JsMotionDefinition, JsMotionFields, JsSlotMotion, LayerInput, LinkedSystemPin, LinkedSystemsInput, LiteralFor, ModeDefinition, ModeOptionDefinition, ModifierDefinition, MotionDefinitionInput, MotionDragBox, MotionKeyframes, MotionMetadata, MotionState, MotionStateKeyframe, MotionTransition, MotionVariants, MotionViewportOptions, OpacityPairSpec, PlaygroundOptions, PlaygroundPage, PlaygroundSpec, PreviewDefinition, PropBinding, SerializedAssetGroup, SerializedComponentGroup, SerializedConfig, SerializedFontAssetGroup, SerializedIconAssetGroup, SerializedPlaygroundOptions, SerializedTokenGroup, SlotMotion, StylePropDefinition, StylePropMetadata, StylePropProperty, SystemLink, TokenDefinition, TokenDefinitionFor, TokenGroupDefinition, TokenGroupDefinitionFor, TokenModifierKey, TokenModifierValue, TokenType, TokenValue, ValuesEntry } from "./types.js";
|
|
9
9
|
import { AssetGroupBuilder, AssetGroupConfig, AssetGroupDefinition, FontAssetGroupConfig, FontAssetGroupDefinition, IconAssetGroupConfig, IconAssetGroupDefinition, IconAssetMember, IconAssetMetadata, defineAssetGroup, defineAssetIcon } from "./defineAssetGroup.js";
|
|
10
10
|
import { AssetGroup } from "./AssetGroup.js";
|
|
11
11
|
import { resolveAssetRefCss, resolveFontStack } from "./asset-value.js";
|
|
12
12
|
import { Css, CssClassName, CssDeclaration, CssSelector, CssVar, cssClassName, cssDeclaration, cssSelector, cssVar } from "./brands.js";
|
|
13
13
|
import { BooleanMarker, LayerMarker, MotionMarker, NumberMarker, PREVIEW_SEED_KEY, PreviewAxisMarker, PreviewPropsRule, RequiredBrand, SlotMarker, SlotRef, SlotValueType, StringMarker, VariantMarker, VariantMarkerArray, VariantMarkerObject, isBoolMarker, isLayerMarker, isMotionMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules } from "./markers.js";
|
|
14
|
-
import { Component, ComponentKind, CompositeInfo, FunctionInfo, Layer, PrimitivePropKind, PropBase, PropInfo, PropKind, ResolvedCompoundOverrides, SlotInfo, SlotValueKind, StylePropInfo, StylePropKeyword, StylePropTokenUsage, VariantInfo } from "./Component.js";
|
|
14
|
+
import { Component, ComponentKind, CompositeInfo, FunctionInfo, Layer, PrimitivePropKind, PropBase, PropInfo, PropKind, ResolvedCompoundOverrides, SlotInfo, SlotValueKind, StylePropInfo, StylePropKeyword, StylePropTokenUsage, VOID_HTML_TAGS, VariantInfo } from "./Component.js";
|
|
15
15
|
import { ComponentGroup } from "./ComponentGroup.js";
|
|
16
16
|
import { CompositeStyle } from "./CompositeStyle.js";
|
|
17
17
|
import { makeTokenRefToCss } from "./entity-utils.js";
|
|
@@ -32,8 +32,9 @@ import { ConfigDiagnostic, ConfigDiagnosticDefinition, ConfigValidationError } f
|
|
|
32
32
|
import { ELEMENT_MARKER_KIND, ElementMarker, OpaqueLeafPredicate, hasElementMarkerDeep, isElementLikeValue, isElementMarker, reviveElementMarkersDeep, serializeElementsDeep } from "./element-marker.js";
|
|
33
33
|
import { collectFontFaceCss, deriveFontFaceCss, familiesInRawCss } from "./font-face.js";
|
|
34
34
|
import { interpolate } from "./interpolate.js";
|
|
35
|
+
import { RegistryAliasSource, buildRegistryAliases, slugifyLinkedName } from "./registry-aliases.js";
|
|
35
36
|
import { resolveRegistryDir } from "./registry-dir.js";
|
|
36
37
|
import { ModeBackedModifierDefinition, ModeBackedModifierInput, ModeBackedModifierLookup, ModifierTree, OverrideModeRef, OverrideRow, buildModeBackedModifierLookup, buildNestedModifierUpdate, createModeBackedModifierLookup, mergeModifierUpdates, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, overrideRowsToModifierTree, resolveOverrideRow, resolveOverrideRowValue } from "./token-override-rows.js";
|
|
37
38
|
import { rem } from "./units.js";
|
|
38
39
|
import { EntityKind } from "@yahoo/uds-create-types/entity";
|
|
39
|
-
export { ASSET_CLASS_CAPABILITIES, type AnyRef, type AnyStylePropDefinition, type ArbitrarySpec, AssetGroup, type AssetGroupBuilder, type AssetGroupConfig, type AssetGroupDefinition, type AssetGroupName, type AssetGroupRef, type AssetKind, type AssetName, type AssetRef, type BaseStyles, type BooleanMarker, type BoundComponent, type BuildOptions, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, type CanvasRole, type CanvasRoleEntry, type CanvasRoleEntryInput, type CanvasRolesDefinition, type CanvasRolesDefinitionInput, type CanvasRolesInputConstraint, type ColorCssProperty, type ColorExpression, type ColorFn, type ColorKeyword, type ColorSpace, type ColorValue, Component, type ComponentBuilder, type ComponentBuilderMethods, type ComponentDefinition, ComponentGroup, type ComponentGroupDefinition, type ComponentKind, type ComponentMetadata, type ComponentName, type ComponentRef, type ComponentRenderFn, type CompositeInfo, type CompositeName, type CompositeRef, type CompositeRefBuilder, CompositeStyle, type CompositeStyleDefinition, type CompositeStyleObject, type CompoundPropsEntry, Config, type ConfigCallbackHelpers, type ConfigDiagnostic, type ConfigDiagnosticDefinition, ConfigValidationError, type Css, type CssAngle, type CssClassName, type CssColor, type CssDeclaration, type CssGlobalKeyword, type CssLength, CssMotionDef, type CssMotionDefinition, type CssMotionFields, type CssPercentage, type CssPropertyName, type CssPropertyValues, type CssPropertyWithKeywords, type CssRatio, type CssSelector, type CssSlotMotion, type CssTime, type CssValue, type CssValueTypeName, type CssVar, type CssVarRef, type DataAttrs, type DefineComponentFn, type DefinedComponent, type DefinedMotion, type DefinedProvider, type DefinedStyleProp, type DefinedTokenGroup, type DependenciesQuery, type DependencyKind, type DependencyRef, type DependentsQuery, ELEMENT_MARKER_KIND, type ElementMarker, type EntityKind, type FontAssetGroupConfig, type FontAssetGroupDefinition, type FontAssetMember, type FunctionInfo, type GlobalStylesDef, type GradientStop, type GradientValue, type HexColor, type HslColor, type IconAssetGroupConfig, type IconAssetGroupDefinition, type IconAssetMember, type IconAssetMetadata, JsMotionDef, type JsMotionDefinition, type JsMotionFields, type JsSlotMotion, Layer, type LayerInput, type LayerMarker, type LayerPropsMap, type LengthOrPercent, type LineDirection, type LinearGradientExpr, type
|
|
40
|
+
export { ASSET_CLASS_CAPABILITIES, type AnyRef, type AnyStylePropDefinition, type ArbitrarySpec, AssetGroup, type AssetGroupBuilder, type AssetGroupConfig, type AssetGroupDefinition, type AssetGroupName, type AssetGroupRef, type AssetKind, type AssetName, type AssetRef, type BaseStyles, type BooleanMarker, type BoundComponent, type BuildOptions, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, type CanvasRole, type CanvasRoleEntry, type CanvasRoleEntryInput, type CanvasRolesDefinition, type CanvasRolesDefinitionInput, type CanvasRolesInputConstraint, type ColorCssProperty, type ColorExpression, type ColorFn, type ColorKeyword, type ColorSpace, type ColorValue, Component, type ComponentBuilder, type ComponentBuilderMethods, type ComponentDefinition, ComponentGroup, type ComponentGroupDefinition, type ComponentKind, type ComponentMetadata, type ComponentName, type ComponentRef, type ComponentRenderFn, type CompositeInfo, type CompositeName, type CompositeRef, type CompositeRefBuilder, CompositeStyle, type CompositeStyleDefinition, type CompositeStyleObject, type CompoundPropsEntry, Config, type ConfigCallbackHelpers, type ConfigDiagnostic, type ConfigDiagnosticDefinition, ConfigValidationError, type Css, type CssAngle, type CssClassName, type CssColor, type CssDeclaration, type CssGlobalKeyword, type CssLength, CssMotionDef, type CssMotionDefinition, type CssMotionFields, type CssPercentage, type CssPropertyName, type CssPropertyValues, type CssPropertyWithKeywords, type CssRatio, type CssSelector, type CssSlotMotion, type CssTime, type CssValue, type CssValueTypeName, type CssVar, type CssVarRef, type DataAttrs, type DefineComponentFn, type DefinedComponent, type DefinedMotion, type DefinedProvider, type DefinedStyleProp, type DefinedTokenGroup, type DependenciesQuery, type DependencyKind, type DependencyRef, type DependentsQuery, ELEMENT_MARKER_KIND, type ElementMarker, type EntityKind, type FontAssetGroupConfig, type FontAssetGroupDefinition, type FontAssetMember, type FunctionInfo, type GlobalStylesDef, type GradientStop, type GradientValue, type HexColor, type HslColor, type IconAssetGroupConfig, type IconAssetGroupDefinition, type IconAssetMember, type IconAssetMetadata, JsMotionDef, type JsMotionDefinition, type JsMotionFields, type JsSlotMotion, Layer, type LayerInput, type LayerMarker, type LayerPropsMap, type LengthOrPercent, type LineDirection, type LinearGradientExpr, type LinkedSystemPin, type LinkedSystemsInput, type LiteralFor, MOTION_CSS_DEFINITION_KEYS, MOTION_CSS_DIRECTIONS, MOTION_CSS_FILL_MODES, MOTION_CSS_PLAY_STATES, MOTION_CSS_PROPERTY_PREFIXES, MOTION_JS_DEFINITION_KEYS, MOTION_JS_DRAG_AXES, MOTION_JS_FIELD_KEYS, MOTION_JS_LAYOUT_MODES, MOTION_JS_REPEAT_TYPES, MOTION_JS_SPRING_FIELDS, MOTION_JS_TRANSITION_TYPES, MOTION_JS_TWEEN_FIELDS, type MixExpr, Mode, type ModeBackedModifierDefinition, type ModeBackedModifierInput, type ModeBackedModifierLookup, type ModeDefinition, type ModeName, ModeOption, type ModeOptionDefinition, type ModeRef, Modifier, type ModifierDefinition, type ModifierTree, type MotionDef, type MotionDefinitionInput, type MotionDragBox, type MotionKeyframes, type MotionMarker, type MotionMetadata, type MotionName, type MotionState, type MotionStateKeyframe, type MotionTransition, type MotionVariants, type MotionViewportOptions, type NumberMarker, type OpacityPairSpec, type OpaqueLeafPredicate, type OverrideModeRef, type OverrideRow, PREVIEW_SEED_KEY, type PlaygroundOptions, type PlaygroundPage, type PlaygroundSpec, type PreviewAxisMarker, type PreviewCallbackHelpers, type PreviewDefinition, type PreviewPropsRule, type PrimitivePropKind, type PropBase, type PropBinding, type PropInfo, type PropKind, Provider, type RadialGradientExpr, type RadialSize, type RawToken, type RegisteredAssetGroups, type RegisteredComponents, type RegisteredCompositeStyles, type RegisteredModes, type RegisteredModifiers, type RegisteredMotion, type RegisteredStyleProps, type RegisteredTokenGroups, type RegistryAliasSource, type RequiredBrand, type ResolvedCompoundOverrides, type ResolvedTokenLiteral, type RgbColor, SOURCE_PATH_KEY, type SerializedAssetGroup, type SerializedComponentGroup, type SerializedConfig, type SerializedFontAssetGroup, type SerializedIconAssetGroup, type SerializedPlaygroundOptions, type SerializedTokenGroup, type SlotInfo, type SlotMarker, type SlotMotion, type SlotRef, type SlotValueKind, type SlotValueType, type StringMarker, StyleProp, type StylePropDefinition, type StylePropInfo, type StylePropKeyword, type StylePropMetadata, type StylePropName, type StylePropProperty, type StylePropRef, type StylePropTokenUsage, type SystemLink, type TagName, type TagRef, Token, type TokenDefinition, type TokenDefinitionFor, TokenGroup, type TokenGroupDefinition, type TokenGroupDefinitionFor, type TokenGroupMetadata, type TokenGroupName, type TokenGroupRef, type TokenModifierKey, type TokenModifierValue, type TokenName, type TokenQualifiedName, type TokenRawNameRegistry, type TokenRawValue, type TokenRef, type TokenRefToCss, type TokenType, type TokenValue, type TypedSlotRef, VOID_HTML_TAGS, type ValuesEntry, type VariantInfo, type VariantMarker, type VariantMarkerArray, type VariantMarkerObject, alpha, asChild, asset, assetGroup, attachSourcePath, boolean, buildModeBackedModifierLookup, buildNestedModifierUpdate, buildRegistryAliases, captureCallerPath, collectFontFaceCss, component, composite, createModeBackedModifierLookup, cssClassName, cssDeclaration, cssSelector, cssVar, defineAssetGroup, defineAssetIcon, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineProvider, defineStyleProp, defineTokenGroup, deriveFontFaceCss, familiesInRawCss, findComponentReferrers, hasElementMarkerDeep, interpolate, isAssetGroupRef, isAssetRef, isBoolMarker, isColorExpression, isComponentRef, isCompositeRef, isElementLikeValue, isElementMarker, isLayerMarker, isLinearGradientExpr, isMixExpr, isModeRef, isMotionMarker, isNumberMarker, isPlaceable, isPreviewAxisMarker, isRadialGradientExpr, isSafeClassNameValue, isSlotMarker, isStringMarker, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, isVariantArrayMarker, isVariantMarker, linearGradient, makeTokenRefToCss, matchesPreviewWhen, mergeModifierUpdates, mix, mode, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, motion, number, overrideRowsToModifierTree, parseRegistryKey, radialGradient, readSourcePath, rem, resolveAssetRefCss, resolveColorExpression, resolveFontStack, resolveOverrideRow, resolveOverrideRowValue, resolvePreviewRules, resolveRegistryDir, reviveElementMarkersDeep, serializeElementsDeep, slot, slugifyLinkedName, string, styleProp, tag, token, tokenGroup, variant };
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { alpha, isColorExpression, isLinearGradientExpr, isMixExpr, isRadialGrad
|
|
|
9
9
|
import { defineAssetGroup, defineAssetIcon } from "./defineAssetGroup.js";
|
|
10
10
|
import { ELEMENT_MARKER_KIND, hasElementMarkerDeep, isElementLikeValue, isElementMarker, reviveElementMarkersDeep, serializeElementsDeep } from "./element-marker.js";
|
|
11
11
|
import { PREVIEW_SEED_KEY, isBoolMarker, isLayerMarker, isMotionMarker, isNumberMarker, isPreviewAxisMarker, isSlotMarker, isStringMarker, isVariantArrayMarker, isVariantMarker, matchesPreviewWhen, resolvePreviewRules } from "./markers.js";
|
|
12
|
-
import { Component, Layer } from "./Component.js";
|
|
12
|
+
import { Component, Layer, VOID_HTML_TAGS } from "./Component.js";
|
|
13
13
|
import { ComponentGroup } from "./ComponentGroup.js";
|
|
14
14
|
import { CompositeStyle } from "./CompositeStyle.js";
|
|
15
15
|
import { Mode, ModeOption } from "./Mode.js";
|
|
@@ -27,8 +27,9 @@ import { asChild, boolean, defineComponent, defineComponentGroup, defineComposit
|
|
|
27
27
|
import { collectFontFaceCss, deriveFontFaceCss, familiesInRawCss } from "./font-face.js";
|
|
28
28
|
import { interpolate } from "./interpolate.js";
|
|
29
29
|
import { MOTION_CSS_DIRECTIONS, MOTION_CSS_FILL_MODES, MOTION_CSS_PLAY_STATES, MOTION_CSS_PROPERTY_PREFIXES, MOTION_JS_DRAG_AXES, MOTION_JS_LAYOUT_MODES, MOTION_JS_REPEAT_TYPES, MOTION_JS_SPRING_FIELDS, MOTION_JS_TRANSITION_TYPES, MOTION_JS_TWEEN_FIELDS } from "./motion-constants.js";
|
|
30
|
+
import { buildRegistryAliases, slugifyLinkedName } from "./registry-aliases.js";
|
|
30
31
|
import { resolveRegistryDir } from "./registry-dir.js";
|
|
31
32
|
import { buildModeBackedModifierLookup, buildNestedModifierUpdate, createModeBackedModifierLookup, mergeModifierUpdates, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, overrideRowsToModifierTree, resolveOverrideRow, resolveOverrideRowValue } from "./token-override-rows.js";
|
|
32
33
|
import { CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS } from "./types/css-property-keywords.js";
|
|
33
34
|
import { rem } from "./units.js";
|
|
34
|
-
export { ASSET_CLASS_CAPABILITIES, AssetGroup, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, Component, ComponentGroup, CompositeStyle, Config, ConfigValidationError, CssMotionDef, ELEMENT_MARKER_KIND, JsMotionDef, Layer, MOTION_CSS_DEFINITION_KEYS, MOTION_CSS_DIRECTIONS, MOTION_CSS_FILL_MODES, MOTION_CSS_PLAY_STATES, MOTION_CSS_PROPERTY_PREFIXES, MOTION_JS_DEFINITION_KEYS, MOTION_JS_DRAG_AXES, MOTION_JS_FIELD_KEYS, MOTION_JS_LAYOUT_MODES, MOTION_JS_REPEAT_TYPES, MOTION_JS_SPRING_FIELDS, MOTION_JS_TRANSITION_TYPES, MOTION_JS_TWEEN_FIELDS, Mode, ModeOption, Modifier, PREVIEW_SEED_KEY, Provider, SOURCE_PATH_KEY, StyleProp, Token, TokenGroup, alpha, asChild, asset, assetGroup, attachSourcePath, boolean, buildModeBackedModifierLookup, buildNestedModifierUpdate, captureCallerPath, collectFontFaceCss, component, composite, createModeBackedModifierLookup, cssClassName, cssDeclaration, cssSelector, cssVar, defineAssetGroup, defineAssetIcon, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineProvider, defineStyleProp, defineTokenGroup, deriveFontFaceCss, familiesInRawCss, findComponentReferrers, hasElementMarkerDeep, interpolate, isAssetGroupRef, isAssetRef, isBoolMarker, isColorExpression, isComponentRef, isCompositeRef, isElementLikeValue, isElementMarker, isLayerMarker, isLinearGradientExpr, isMixExpr, isModeRef, isMotionMarker, isNumberMarker, isPlaceable, isPreviewAxisMarker, isRadialGradientExpr, isSafeClassNameValue, isSlotMarker, isStringMarker, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, isVariantArrayMarker, isVariantMarker, linearGradient, makeTokenRefToCss, matchesPreviewWhen, mergeModifierUpdates, mix, mode, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, motion, number, overrideRowsToModifierTree, parseRegistryKey, radialGradient, readSourcePath, rem, resolveAssetRefCss, resolveColorExpression, resolveFontStack, resolveOverrideRow, resolveOverrideRowValue, resolvePreviewRules, resolveRegistryDir, reviveElementMarkersDeep, serializeElementsDeep, slot, string, styleProp, tag, token, tokenGroup, variant };
|
|
35
|
+
export { ASSET_CLASS_CAPABILITIES, AssetGroup, CSS_GLOBAL_KEYWORDS, CSS_PROPERTY_KEYWORDS, Component, ComponentGroup, CompositeStyle, Config, ConfigValidationError, CssMotionDef, ELEMENT_MARKER_KIND, JsMotionDef, Layer, MOTION_CSS_DEFINITION_KEYS, MOTION_CSS_DIRECTIONS, MOTION_CSS_FILL_MODES, MOTION_CSS_PLAY_STATES, MOTION_CSS_PROPERTY_PREFIXES, MOTION_JS_DEFINITION_KEYS, MOTION_JS_DRAG_AXES, MOTION_JS_FIELD_KEYS, MOTION_JS_LAYOUT_MODES, MOTION_JS_REPEAT_TYPES, MOTION_JS_SPRING_FIELDS, MOTION_JS_TRANSITION_TYPES, MOTION_JS_TWEEN_FIELDS, Mode, ModeOption, Modifier, PREVIEW_SEED_KEY, Provider, SOURCE_PATH_KEY, StyleProp, Token, TokenGroup, VOID_HTML_TAGS, alpha, asChild, asset, assetGroup, attachSourcePath, boolean, buildModeBackedModifierLookup, buildNestedModifierUpdate, buildRegistryAliases, captureCallerPath, collectFontFaceCss, component, composite, createModeBackedModifierLookup, cssClassName, cssDeclaration, cssSelector, cssVar, defineAssetGroup, defineAssetIcon, defineComponent, defineComponentGroup, defineCompositeStyle, defineMode, defineModifier, defineMotion, defineProvider, defineStyleProp, defineTokenGroup, deriveFontFaceCss, familiesInRawCss, findComponentReferrers, hasElementMarkerDeep, interpolate, isAssetGroupRef, isAssetRef, isBoolMarker, isColorExpression, isComponentRef, isCompositeRef, isElementLikeValue, isElementMarker, isLayerMarker, isLinearGradientExpr, isMixExpr, isModeRef, isMotionMarker, isNumberMarker, isPlaceable, isPreviewAxisMarker, isRadialGradientExpr, isSafeClassNameValue, isSlotMarker, isStringMarker, isStylePropRef, isTagRef, isTokenGroupRef, isTokenRef, isVariantArrayMarker, isVariantMarker, linearGradient, makeTokenRefToCss, matchesPreviewWhen, mergeModifierUpdates, mix, mode, modifierIdToPath, modifierPathToId, modifierTreeToOverrideRows, motion, number, overrideRowsToModifierTree, parseRegistryKey, radialGradient, readSourcePath, rem, resolveAssetRefCss, resolveColorExpression, resolveFontStack, resolveOverrideRow, resolveOverrideRowValue, resolvePreviewRules, resolveRegistryDir, reviveElementMarkersDeep, serializeElementsDeep, slot, slugifyLinkedName, string, styleProp, tag, token, tokenGroup, variant };
|
|
@@ -8,7 +8,7 @@ declare class NativeConfigValidationError extends ConfigValidationError<NativeCo
|
|
|
8
8
|
}
|
|
9
9
|
declare class NativeConfig {
|
|
10
10
|
#private;
|
|
11
|
-
static readonly SCHEMA_VERSION =
|
|
11
|
+
static readonly SCHEMA_VERSION = 4;
|
|
12
12
|
readonly platform: "native";
|
|
13
13
|
namespace?: string;
|
|
14
14
|
styleEngine?: NativeStyleEngine;
|
package/dist/native/types.d.ts
CHANGED
|
@@ -52,8 +52,8 @@ type NativeDefaultModes = Record<string, string>;
|
|
|
52
52
|
/** Styling runtime selected for generated native component and adapter files. */
|
|
53
53
|
type NativeStyleEngine = 'react-native' | 'unistyles';
|
|
54
54
|
interface NativeFontAssetMember {
|
|
55
|
-
/**
|
|
56
|
-
|
|
55
|
+
/** Family identifier React Native consumes after the app registers the font. */
|
|
56
|
+
fontFamily: string;
|
|
57
57
|
}
|
|
58
58
|
interface NativeFontAssetGroupDefinition {
|
|
59
59
|
assetKind: 'font';
|
|
@@ -25,7 +25,7 @@ const ASSET_GROUP_KEYS = new Set([
|
|
|
25
25
|
"label",
|
|
26
26
|
"description"
|
|
27
27
|
]);
|
|
28
|
-
const ASSET_MEMBER_KEYS = new Set(["
|
|
28
|
+
const ASSET_MEMBER_KEYS = new Set(["fontFamily"]);
|
|
29
29
|
const MODE_OPTION_KEYS = new Set([
|
|
30
30
|
"modifier",
|
|
31
31
|
"label",
|
|
@@ -60,7 +60,7 @@ const COLOR_SPACES = new Set([
|
|
|
60
60
|
"hsl",
|
|
61
61
|
"hwb"
|
|
62
62
|
]);
|
|
63
|
-
function validateSerializedNativeConfig(input, expectedSchemaVersion =
|
|
63
|
+
function validateSerializedNativeConfig(input, expectedSchemaVersion = 4) {
|
|
64
64
|
const diagnostics = [];
|
|
65
65
|
const configDefinition = { kind: "config" };
|
|
66
66
|
if (!isRecord(input)) {
|
|
@@ -214,7 +214,7 @@ function validateAssetGroups(value, diagnostics) {
|
|
|
214
214
|
continue;
|
|
215
215
|
}
|
|
216
216
|
reportUnknownKeys(member, ASSET_MEMBER_KEYS, memberPath, memberDefinition, diagnostics);
|
|
217
|
-
if (typeof member.
|
|
217
|
+
if (typeof member.fontFamily !== "string" || member.fontFamily.length === 0) push(diagnostics, "INVALID_SCHEMA", [...memberPath, "fontFamily"], memberDefinition, `Native font asset "${groupName}/${memberName}" requires a non-empty fontFamily.`);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/registry-aliases.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Import-alias slugs for the linked-system registry (UDS-2771).
|
|
4
|
+
* Each top-level linked dependency gets a stable folder alias — the slug
|
|
5
|
+
* derives from the entry's `name` in the consumer's own
|
|
6
|
+
* `registerLinkedSystems` pin (stable across remote renames, fixable
|
|
7
|
+
* locally on collision). The pull materializer uses these aliases to
|
|
8
|
+
* rewrite a node's own `@uds-registry/{slug}` imports into relative paths,
|
|
9
|
+
* keeping the on-disk tree self-contained; the link patch applier uses the
|
|
10
|
+
* same slugs for the consumer's own barrel imports.
|
|
11
|
+
*/
|
|
12
|
+
/** One top-level declared dependency, as needed for alias building. */
|
|
13
|
+
interface RegistryAliasSource {
|
|
14
|
+
systemId: string;
|
|
15
|
+
version: string;
|
|
16
|
+
/** Display name from the consumer's registerLinkedSystems pin. */
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Slug for one linked system's import alias: lowercase, hyphen-separated,
|
|
21
|
+
* ASCII-safe. Names that reduce to nothing get a generic fallback (the
|
|
22
|
+
* collision suffix in {@link buildRegistryAliases} keeps them distinct).
|
|
23
|
+
*/
|
|
24
|
+
declare function slugifyLinkedName(name: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Map top-level declared dependencies to `slug → {systemId}@{version}` (the
|
|
27
|
+
* registry folder name). Colliding slugs keep declaration order: the first
|
|
28
|
+
* wins the bare slug, later ones get a `-{systemId-prefix}` suffix — still
|
|
29
|
+
* deterministic across machines.
|
|
30
|
+
*/
|
|
31
|
+
declare function buildRegistryAliases(roots: RegistryAliasSource[]): Record<string, string>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { RegistryAliasSource, buildRegistryAliases, slugifyLinkedName };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/registry-aliases.ts
|
|
2
|
+
/**
|
|
3
|
+
* Slug for one linked system's import alias: lowercase, hyphen-separated,
|
|
4
|
+
* ASCII-safe. Names that reduce to nothing get a generic fallback (the
|
|
5
|
+
* collision suffix in {@link buildRegistryAliases} keeps them distinct).
|
|
6
|
+
*/
|
|
7
|
+
function slugifyLinkedName(name) {
|
|
8
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
9
|
+
return slug === "" ? "linked-system" : slug;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Map top-level declared dependencies to `slug → {systemId}@{version}` (the
|
|
13
|
+
* registry folder name). Colliding slugs keep declaration order: the first
|
|
14
|
+
* wins the bare slug, later ones get a `-{systemId-prefix}` suffix — still
|
|
15
|
+
* deterministic across machines.
|
|
16
|
+
*/
|
|
17
|
+
function buildRegistryAliases(roots) {
|
|
18
|
+
const aliases = {};
|
|
19
|
+
for (const root of roots) {
|
|
20
|
+
let slug = slugifyLinkedName(root.name);
|
|
21
|
+
if (aliases[slug] !== void 0) slug = `${slug}-${root.systemId.slice(0, 8)}`;
|
|
22
|
+
aliases[slug] = `${root.systemId}@${root.version}`;
|
|
23
|
+
}
|
|
24
|
+
return aliases;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { buildRegistryAliases, slugifyLinkedName };
|
package/dist/registry-dir.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* 1. `buildOptions.registryDir` when the consumer sets one;
|
|
10
10
|
* 2. `<componentsDir>/registry` — the default, keeping the registry inside
|
|
11
11
|
* the design system's own subtree;
|
|
12
|
-
* 3.
|
|
13
|
-
*
|
|
12
|
+
* 3. `registry` at the project root, for configs that declare no
|
|
13
|
+
* `componentsDir`.
|
|
14
14
|
*/
|
|
15
15
|
interface RegistryDirOptions {
|
|
16
16
|
componentsDir?: string;
|
package/dist/registry-dir.js
CHANGED
|
@@ -4,7 +4,7 @@ const normalize = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
|
4
4
|
function resolveRegistryDir(buildOptions) {
|
|
5
5
|
if (buildOptions?.registryDir) return normalize(buildOptions.registryDir);
|
|
6
6
|
if (buildOptions?.componentsDir) return `${normalize(buildOptions.componentsDir)}/registry`;
|
|
7
|
-
return "
|
|
7
|
+
return "registry";
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
export { resolveRegistryDir };
|
|
@@ -16,8 +16,20 @@ function wrapVoidElements(reg, { voidComponents, noChildrenComponents } = {}) {
|
|
|
16
16
|
const Orig = wrapped[key];
|
|
17
17
|
if (!Orig) continue;
|
|
18
18
|
wrapped[key] = function VoidElementWrapper(p) {
|
|
19
|
+
const props = p.element?.props;
|
|
20
|
+
let next = p;
|
|
21
|
+
if (props && "children" in props) {
|
|
22
|
+
const { children: _dropped, ...rest } = props;
|
|
23
|
+
next = {
|
|
24
|
+
...p,
|
|
25
|
+
element: {
|
|
26
|
+
...p.element,
|
|
27
|
+
props: rest
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
19
31
|
return /* @__PURE__ */ jsx(Orig, {
|
|
20
|
-
...
|
|
32
|
+
...next,
|
|
21
33
|
children: void 0
|
|
22
34
|
});
|
|
23
35
|
};
|