@supernova-studio/supernova-sdk-beta 2.0.21 → 2.0.22
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/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +2 -2
- package/build/sdk-typescript/src/tests/validators.d.ts +4 -0
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,6 +44,6 @@ export type ReplacableTokenType = (typeof REPLACABLE_TOKEN_TYPES)[number];
|
|
|
44
44
|
export declare const REFERENCABLE_TOKEN_TYPES: readonly [TokenType.color, TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration];
|
|
45
45
|
export type ReferencableTokenType = (typeof REFERENCABLE_TOKEN_TYPES)[number];
|
|
46
46
|
export declare const tokenTypeIsReferencable: (tokenType: TokenType) => tokenType is TokenType.color | TokenType.radius | TokenType.borderWidth | TokenType.duration | TokenType.fontSize | TokenType.dimension | TokenType.letterSpacing | TokenType.lineHeight | TokenType.opacity | TokenType.paragraphSpacing | TokenType.size | TokenType.space | TokenType.zIndex | TokenType.textDecoration | TokenType.textCase | TokenType.fontFamily | TokenType.fontWeight;
|
|
47
|
-
export declare const DT_TOKEN_TYPES: readonly [TokenType.color, TokenType.shadow, TokenType.gradient, TokenType.typography, TokenType.border, TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
|
|
47
|
+
export declare const DT_TOKEN_TYPES: readonly [TokenType.color, TokenType.shadow, TokenType.gradient, TokenType.typography, TokenType.border, TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.fontFamily, TokenType.fontWeight, TokenType.string, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
|
|
48
48
|
export type DTTokenType = (typeof DT_TOKEN_TYPES)[number];
|
|
49
|
-
export type DTOriginalTokenType = "color" | "borderRadius" | "boxShadow" | "gradient" | "typography" | "border" | "borderWidth" | "sizing" | "opacity" | "spacing" | "fontSizes" | "paragraphSpacing" | "letterSpacing" | "lineHeights" | "other" | "dimension" | "fontFamilies" | "fontWeights" | "textCase" | "textDecoration" | "duration";
|
|
49
|
+
export type DTOriginalTokenType = "color" | "borderRadius" | "boxShadow" | "gradient" | "typography" | "border" | "borderWidth" | "sizing" | "opacity" | "spacing" | "fontSizes" | "paragraphSpacing" | "letterSpacing" | "lineHeights" | "other" | "text" | "dimension" | "fontFamilies" | "fontWeights" | "textCase" | "textDecoration" | "duration";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AnyStringToken } from "../model/tokens/SDKStringToken";
|
|
1
2
|
import { BorderPosition, ColorToken, ShadowType, TextCase, TextDecoration, Unit } from "../index";
|
|
2
3
|
import { BorderStyle } from "../model/enums/SDKBorderStyle";
|
|
3
4
|
import { StringTokenType } from "../model/enums/SDKTokenType";
|
|
4
5
|
import { Token } from "../model/tokens/SDKToken";
|
|
6
|
+
import { AnyToken } from "../model/tokens/SDKTokenValue";
|
|
5
7
|
export declare const validateToken: (t: any, tokens: Token[], name: string, hex: string, opacity?: number, aliasName?: string) => void;
|
|
6
8
|
export declare const validateDimensionToken: (t: any, tokens: Token[], name: string, measure: number, unit: Unit) => void;
|
|
7
9
|
export declare const validateStringToken: (t: any, tokens: Token[], name: string, text: string, type: StringTokenType) => void;
|
|
@@ -84,3 +86,5 @@ export declare const validateDimensionTokenRef: (t: any, tokens: Token[], descri
|
|
|
84
86
|
export declare const validateBorderTokenRef: (t: any, tokens: Token[], description: string, refName: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
|
|
85
87
|
export declare const validateBorderTokenInnerRef: (t: any, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
|
|
86
88
|
export declare const validateOrigin: (t: any, tokens: Token[], name: string, nameRef: string) => void;
|
|
89
|
+
export declare const isStringToken: (token?: Token | AnyToken | undefined | null) => token is AnyStringToken;
|
|
90
|
+
export declare const getExpectedByDescription: (description: string) => string | undefined;
|
|
@@ -62,7 +62,7 @@ export declare class TokenJSONElementTransformer {
|
|
|
62
62
|
safeGroupName(group: TokenGroup): string;
|
|
63
63
|
processedName(name: string, naming: JSONBuilderNamingOption): string;
|
|
64
64
|
/** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
|
|
65
|
-
typeLabel(type: TokenType): "visibility" | "color" | "gradient" | "typography" | "border" | "
|
|
65
|
+
typeLabel(type: TokenType): "visibility" | "color" | "gradient" | "typography" | "border" | "text" | "textCase" | "textDecoration" | "shadow" | "measure" | undefined;
|
|
66
66
|
/** Retrieve chain of groups up to a specified group, ordered from parent to children */
|
|
67
67
|
referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
|
|
68
68
|
}
|