@yahoo/uds-create-config 2.14.0 → 2.15.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/config-diagnostics.d.ts +21 -0
- package/dist/config-diagnostics.js +12 -0
- package/dist/factories.d.ts +10 -1
- package/dist/factories.js +6 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/native/NativeConfig.d.ts +31 -0
- package/dist/native/NativeConfig.js +75 -0
- package/dist/native/assets.d.ts +20 -0
- package/dist/native/assets.js +17 -0
- package/dist/native/index.d.ts +12 -71
- package/dist/native/index.js +11 -101
- package/dist/native/types.d.ts +51 -0
- package/dist/native/types.js +0 -0
- package/dist/native/validation.d.ts +8 -0
- package/dist/native/validation.js +456 -0
- package/dist/native/values.d.ts +7 -0
- package/dist/native/values.js +15 -0
- package/dist/native.d.ts +11 -4
- package/dist/native.js +9 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +15 -8
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -26,6 +26,16 @@ type TokenType = string;
|
|
|
26
26
|
*/
|
|
27
27
|
type TokenValue = string | number | boolean | TokenRef | AssetRef | ColorExpression;
|
|
28
28
|
type TokenModifierKey = `_${string}`;
|
|
29
|
+
/**
|
|
30
|
+
* Platform-neutral authored token definition. Web and native configs share
|
|
31
|
+
* the definition envelope (value, type, link provenance, and nested modifier
|
|
32
|
+
* overrides) while supplying their own supported value union.
|
|
33
|
+
*/
|
|
34
|
+
type TokenDefinitionFor<TValue> = {
|
|
35
|
+
value: TValue;
|
|
36
|
+
type?: TokenType; /** Set when this token is linked from another system — see {@link SystemLink}. */
|
|
37
|
+
link?: SystemLink;
|
|
38
|
+
} & { [K in `_${string}`]?: TValue | TokenDefinitionFor<TValue> };
|
|
29
39
|
type TokenModifierValue = TokenValue | TokenDefinition;
|
|
30
40
|
/**
|
|
31
41
|
* Provenance marker on an entity linked from another system: it records where
|
|
@@ -64,11 +74,7 @@ interface SystemLink {
|
|
|
64
74
|
* time so consumers reading the class instance work with the
|
|
65
75
|
* doc-described class shape.
|
|
66
76
|
*/
|
|
67
|
-
type TokenDefinition =
|
|
68
|
-
value: TokenValue;
|
|
69
|
-
type?: TokenType; /** Set when this token is linked from another system — see {@link SystemLink}. */
|
|
70
|
-
link?: SystemLink;
|
|
71
|
-
} & { [K in `_${string}`]?: TokenModifierValue };
|
|
77
|
+
type TokenDefinition = TokenDefinitionFor<TokenValue>;
|
|
72
78
|
/**
|
|
73
79
|
* Authored shape — the bare tokens record. Mirrors the old `@yahoo/uds-create-config`
|
|
74
80
|
* `defineTokenGroup(tokens)` signature: input is the tokens map; group
|
|
@@ -82,11 +88,12 @@ type TokenDefinition = {
|
|
|
82
88
|
* appear here. Tokens nest under `tokens` so a token named `'label'`
|
|
83
89
|
* (or any meta key) can never collide with group metadata.
|
|
84
90
|
*/
|
|
85
|
-
interface
|
|
86
|
-
tokens: Record<string,
|
|
91
|
+
interface TokenGroupDefinitionFor<TDefinition> {
|
|
92
|
+
tokens: Record<string, TDefinition>;
|
|
87
93
|
label?: string;
|
|
88
94
|
description?: string;
|
|
89
95
|
}
|
|
96
|
+
type TokenGroupDefinition = TokenGroupDefinitionFor<TokenDefinition>;
|
|
90
97
|
/**
|
|
91
98
|
* Alias for the on-disk wire shape — structurally identical to
|
|
92
99
|
* `TokenGroupDefinition`. Used as the return type of
|
|
@@ -1100,4 +1107,4 @@ interface SerializedConfig {
|
|
|
1100
1107
|
linkedComponents?: Record<string, LinkedSystemEntry>;
|
|
1101
1108
|
}
|
|
1102
1109
|
//#endregion
|
|
1103
|
-
export { AnyStylePropDefinition, ArbitraryEntry, ArbitrarySpec, BaseStyles, BuildOptions, CanvasRole, CanvasRoleEntry, CanvasRoleEntryInput, CanvasRolesDefinition, CanvasRolesDefinitionInput, CanvasRolesInputConstraint, ComponentDefinition, ComponentGroupDefinition, ComponentMetadata, ComponentMotionValue, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, CssMotionDefinition, CssMotionFields, CssSlotMotion, FontAssetMember, GlobalStylesDef, JsMotionDefinition, JsMotionFields, JsSlotMotion, LayerInput, LinkedComponentsInput, LinkedSystemEntry, LiteralFor, ModeDefinition, ModeOptionDefinition, ModifierDefinition, MotionDefinitionInput, MotionDragBox, MotionKeyframes, MotionMetadata, MotionState, MotionStateKeyframe, MotionTransition, MotionVariants, MotionViewportOptions, OpacityPairSpec, PlaygroundOptions, PlaygroundPage, PlaygroundSpec, PreviewDefinition, PropBinding, RefElement, RefTag, RootTag, SerializedAssetGroup, SerializedComponent, SerializedComponentGroup, SerializedConfig, SerializedFontAssetGroup, SerializedIconAssetGroup, SerializedPlaygroundOptions, SerializedTokenGroup, SlotMotion, StylePropDefinition, StylePropMetadata, StylePropProperty, SystemLink, TokenDefinition, TokenGroupDefinition, TokenModifierKey, TokenModifierValue, TokenType, TokenValue, ValuesEntry };
|
|
1110
|
+
export { AnyStylePropDefinition, ArbitraryEntry, ArbitrarySpec, BaseStyles, BuildOptions, CanvasRole, CanvasRoleEntry, CanvasRoleEntryInput, CanvasRolesDefinition, CanvasRolesDefinitionInput, CanvasRolesInputConstraint, ComponentDefinition, ComponentGroupDefinition, ComponentMetadata, ComponentMotionValue, CompositeStyleDefinition, CompositeStyleObject, CompoundPropsEntry, CssMotionDefinition, CssMotionFields, CssSlotMotion, FontAssetMember, GlobalStylesDef, JsMotionDefinition, JsMotionFields, JsSlotMotion, LayerInput, LinkedComponentsInput, LinkedSystemEntry, LiteralFor, ModeDefinition, ModeOptionDefinition, ModifierDefinition, MotionDefinitionInput, MotionDragBox, MotionKeyframes, MotionMetadata, MotionState, MotionStateKeyframe, MotionTransition, MotionVariants, MotionViewportOptions, OpacityPairSpec, PlaygroundOptions, PlaygroundPage, PlaygroundSpec, PreviewDefinition, PropBinding, RefElement, RefTag, RootTag, SerializedAssetGroup, SerializedComponent, SerializedComponentGroup, SerializedConfig, SerializedFontAssetGroup, SerializedIconAssetGroup, SerializedPlaygroundOptions, SerializedTokenGroup, SlotMotion, StylePropDefinition, StylePropMetadata, StylePropProperty, SystemLink, TokenDefinition, TokenDefinitionFor, TokenGroupDefinition, TokenGroupDefinitionFor, TokenModifierKey, TokenModifierValue, TokenType, TokenValue, ValuesEntry };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yahoo/uds-create-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@babel/parser": "^7.29.0",
|
|
74
74
|
"motion": "^12.35.0",
|
|
75
|
-
"@yahoo/uds-create-types": "2.
|
|
76
|
-
"@yahoo/uds-create-utils": "2.
|
|
75
|
+
"@yahoo/uds-create-types": "2.15.0",
|
|
76
|
+
"@yahoo/uds-create-utils": "2.15.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@babel/types": "^7.29.0",
|