@supernova-studio/supernova-sdk-beta 1.6.37 → 1.6.39
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/.eslintrc.d.cts +41 -0
- package/build/sdk-typescript/src/core/SDKSupernova.d.ts +4 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +11 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +14 -14
- package/build/sdk-typescript/src/core/areas/SDKAreaBrands.d.ts +1 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaBulkOperations.d.ts +10 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaComponents.d.ts +10 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +24 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +78 -37
- package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +13 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaMultiplayer.d.ts +10 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +25 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +2 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +6 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +5 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +95 -39
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +48 -16
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +44 -53
- package/build/sdk-typescript/src/core/errors/SDKSupernovaError.d.ts +4 -2
- package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +4 -0
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityMultiplayerItemResolver.d.ts +7 -0
- package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +4 -4
- package/build/sdk-typescript/src/exports.d.ts +22 -4
- package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +1 -7
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +2 -11
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockDefinition.d.ts +13 -23
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockItemDefinition.d.ts +3 -10
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockLayout.d.ts +2 -7
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockVariant.d.ts +9 -18
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/{token-group/SDKDocsBlockActualTokenGroup.d.ts → color-ramps/SDKDocsBlockActualColorRamps.d.ts} +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/design-tokens/SDKDocsBlockActualDesignTokens.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +9 -5
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +4 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockColorProperty.d.ts +13 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +2 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty.d.ts +30 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMarkdownProperty.d.ts +4 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts +19 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +3 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockProperty.d.ts +2 -10
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +3 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +13 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts +23 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +8 -2
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsColorRef.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsImageRef.d.ts +18 -13
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsLinkRef.d.ts +10 -7
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlock.d.ts +11 -24
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlockItem.d.ts +2 -7
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntity.d.ts +5 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityConfiguration.d.ts +6 -1
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityGroup.d.ts +24 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityHeader.d.ts +8 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityPage.d.ts +14 -0
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationLegacyPageAsset.d.ts +1 -1
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockRenderCode.d.ts +1 -1
- package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +27 -5
- package/build/sdk-typescript/src/model/enums/SDKAlignment.d.ts +5 -0
- package/build/sdk-typescript/src/model/enums/SDKCodeLanguage.d.ts +9 -8
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +1 -1
- package/build/sdk-typescript/src/model/enums/{SDKDocsBlockAssetPropertyPreviewContainerSize.d.ts → SDKDocsBlockContainerSize.d.ts} +1 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +7 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutAlign.d.ts +3 -3
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutColumnResizing.d.ts +2 -2
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutGap.d.ts +4 -4
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockMultiRichTextPropertyStyle.d.ts +8 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockRichTextPropertyStyle.d.ts +0 -4
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockTextPropertyStyle.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsPublishStatus.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +19 -19
- package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +2 -2
- package/build/sdk-typescript/src/model/exporters/SDKConnections.d.ts +9 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuild.d.ts +11 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuildResults.d.ts +12 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportDestinations.d.ts +16 -1
- package/build/sdk-typescript/src/model/exporters/remote/SDKRemoteConnectionsModel.d.ts +1 -1
- package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +4 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceFont.d.ts +2 -2
- package/build/sdk-typescript/src/model/support/SDKFigmaFrame.d.ts +2 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +14 -5
- package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +1 -1
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +6 -6
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +11 -6
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +2 -1
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKShadowToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKTextCaseToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKTextDecorationToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKTokenCompator.d.ts +2 -2
- package/build/sdk-typescript/src/model/tokens/SDKTokenValue.d.ts +3 -3
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +1 -1
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceNPMRegistryAccessToken.d.ts +15 -0
- package/build/sdk-typescript/src/tests/Areas/AreaAssets.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/FigmaTokensDataLoader.d.ts +3 -3
- package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +2 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +1 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +1 -1
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +47 -6
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +1 -1
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewReferenceInfoGenerator.d.ts +0 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewStyleGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +3 -1
- package/build/sdk-typescript/src/utils/CommonUtils.d.ts +5 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +5 -4
- package/build/sdk-typescript/src/utils/deepPartial.d.ts +3 -0
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -14
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +122 -118
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocsBlockFigmaNodePropertyOptions, DocsBlockMultiRichTextPropertyOptions } from "../../exports";
|
|
1
2
|
import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
2
3
|
import { DocsBlockItemDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockItemDefinition";
|
|
3
4
|
import { DocsBlockLayout } from "../../model/docs/blocks/definition/SDKDocsBlockLayout";
|
|
@@ -12,6 +13,7 @@ import { DocsBlockComponentPropertyDefinition, DocsBlockComponentPropertyOptions
|
|
|
12
13
|
import { DocsBlockComponentPropertyPropertyDefinition, DocsBlockComponentPropertyPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockComponentPropertyProperty";
|
|
13
14
|
import { DocsBlockDividerPropertyDefinition, DocsBlockDividerPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockDividerProperty";
|
|
14
15
|
import { DocsBlockEmbedUrlPropertyDefinition, DocsBlockEmbedUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty";
|
|
16
|
+
import { DocsBlockFigmaNodePropertyDefinition } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty";
|
|
15
17
|
import { DocsBlockImagePropertyDefinition, DocsBlockImagePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockImageProperty";
|
|
16
18
|
import { DocsBlockMarkdownPropertyDefinition, DocsBlockMarkdownPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMarkdownProperty";
|
|
17
19
|
import { DocsBlockMultiSelectPropertyDefinition, DocsBlockMultiSelectPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty";
|
|
@@ -64,16 +66,23 @@ export declare class DocsBlockBuilder {
|
|
|
64
66
|
isBordered?: boolean;
|
|
65
67
|
hasBackground?: boolean;
|
|
66
68
|
isEditorPresentationDifferent?: boolean;
|
|
69
|
+
showBlockHeaderInEditor?: boolean;
|
|
67
70
|
};
|
|
68
71
|
}): DocsBlockVariant;
|
|
69
72
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
70
73
|
defaultVariantUsingDefaultLayout(options: {
|
|
71
74
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
75
|
+
image?: string;
|
|
76
|
+
description?: string;
|
|
72
77
|
maxColumns?: number;
|
|
73
78
|
appearance?: {
|
|
74
79
|
isBordered?: boolean;
|
|
75
80
|
hasBackground?: boolean;
|
|
76
81
|
isEditorPresentationDifferent?: boolean;
|
|
82
|
+
/** When enabled, the header with block name, description, and header will be displayed
|
|
83
|
+
* Use only for custom blocks that don't have a good content do be displayed in the editor (e.g. Release notes, Lottie, etc.)
|
|
84
|
+
* */
|
|
85
|
+
showBlockHeaderInEditor?: boolean;
|
|
77
86
|
};
|
|
78
87
|
}): DocsBlockVariant;
|
|
79
88
|
/** Create block item with a single variant of rendering */
|
|
@@ -103,8 +112,12 @@ export declare class DocsBlockBuilder {
|
|
|
103
112
|
description?: string;
|
|
104
113
|
item: DocsBlockItemDefinition;
|
|
105
114
|
linkable?: boolean;
|
|
106
|
-
|
|
107
|
-
|
|
115
|
+
appearance?: {
|
|
116
|
+
isBordered?: boolean;
|
|
117
|
+
hasBackground?: boolean;
|
|
118
|
+
isEditorPresentationDifferent?: boolean;
|
|
119
|
+
showBlockHeaderInEditor?: boolean;
|
|
120
|
+
};
|
|
108
121
|
searchKeywords?: Array<string>;
|
|
109
122
|
onboarding?: DocsBlockOnboarding;
|
|
110
123
|
}): DocsBlockDefinition;
|
|
@@ -118,8 +131,12 @@ export declare class DocsBlockBuilder {
|
|
|
118
131
|
maxItems?: number;
|
|
119
132
|
description?: string;
|
|
120
133
|
linkable?: boolean;
|
|
121
|
-
|
|
122
|
-
|
|
134
|
+
appearance?: {
|
|
135
|
+
isBordered?: boolean;
|
|
136
|
+
hasBackground?: boolean;
|
|
137
|
+
isEditorPresentationDifferent?: boolean;
|
|
138
|
+
showBlockHeaderInEditor?: boolean;
|
|
139
|
+
};
|
|
123
140
|
searchKeywords?: Array<string>;
|
|
124
141
|
onboarding?: DocsBlockOnboarding;
|
|
125
142
|
}): DocsBlockDefinition;
|
|
@@ -135,8 +152,12 @@ export declare class DocsBlockBuilder {
|
|
|
135
152
|
maxSelection?: number;
|
|
136
153
|
description?: string;
|
|
137
154
|
linkable?: boolean;
|
|
138
|
-
|
|
139
|
-
|
|
155
|
+
appearance?: {
|
|
156
|
+
isBordered?: boolean;
|
|
157
|
+
hasBackground?: boolean;
|
|
158
|
+
isEditorPresentationDifferent?: boolean;
|
|
159
|
+
showBlockHeaderInEditor?: boolean;
|
|
160
|
+
};
|
|
140
161
|
searchKeywords?: Array<string>;
|
|
141
162
|
onboarding?: DocsBlockOnboarding;
|
|
142
163
|
}): DocsBlockDefinition;
|
|
@@ -165,6 +186,16 @@ export declare class DocsBlockBuilder {
|
|
|
165
186
|
[key: string]: DocsBlockRichTextPropertyOptions;
|
|
166
187
|
};
|
|
167
188
|
}): DocsBlockRichTextPropertyDefinition;
|
|
189
|
+
/** Create a block property with type .richText and its specific options */
|
|
190
|
+
multiRichTextProperty(configuration: {
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
options: DocsBlockMultiRichTextPropertyOptions;
|
|
195
|
+
variants?: {
|
|
196
|
+
[key: string]: DocsBlockMultiRichTextPropertyOptions;
|
|
197
|
+
};
|
|
198
|
+
}): DocsBlockRichTextPropertyDefinition;
|
|
168
199
|
/** Create a block property with type .boolean and its specific options */
|
|
169
200
|
booleanProperty(configuration: {
|
|
170
201
|
id: string;
|
|
@@ -275,6 +306,16 @@ export declare class DocsBlockBuilder {
|
|
|
275
306
|
[key: string]: DocsBlockAssetPropertyOptions;
|
|
276
307
|
};
|
|
277
308
|
}): DocsBlockAssetPropertyDefinition;
|
|
309
|
+
/** Create a block property with type .figmaNodeProperty and its specific options */
|
|
310
|
+
figmaNodeProperty(configuration: {
|
|
311
|
+
id: string;
|
|
312
|
+
name: string;
|
|
313
|
+
description?: string;
|
|
314
|
+
options: DocsBlockFigmaNodePropertyOptions;
|
|
315
|
+
variants?: {
|
|
316
|
+
[key: string]: DocsBlockFigmaNodePropertyOptions;
|
|
317
|
+
};
|
|
318
|
+
}): DocsBlockFigmaNodePropertyDefinition;
|
|
278
319
|
/** Create a block property with type .assetProperty and its specific options */
|
|
279
320
|
assetPropertyProperty(configuration: {
|
|
280
321
|
id: string;
|
|
@@ -23,7 +23,7 @@ export declare class TokenJSONElementFigmaTokensTransformer extends TokenJSONEle
|
|
|
23
23
|
/** Retrieve token wrapper containing its metadata and value information (used as container for each defined token) */
|
|
24
24
|
tokenWrapper(token: Token, value: any, options: TokenJSONBuilderOptionsInternal, groups: Array<TokenGroup>): object;
|
|
25
25
|
/** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
|
|
26
|
-
typeLabelConsideringAbstractGroups(token: Token, groups: Array<TokenGroup>): string;
|
|
26
|
+
typeLabelConsideringAbstractGroups(token: Token, groups: Array<TokenGroup>): string | undefined;
|
|
27
27
|
/** Retrieve wrapper to certain token (referenced by name) pointing to token value */
|
|
28
28
|
referenceWrapper(reference: string): string;
|
|
29
29
|
/** Retrieve safe group name made out of normal group name
|
|
@@ -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): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "visibility" | "shadow" | "
|
|
65
|
+
typeLabel(type: TokenType): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "visibility" | "shadow" | "measure" | "text" | 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
|
}
|
|
@@ -7,7 +7,10 @@ export declare class TokenUtilPreviewGenerator {
|
|
|
7
7
|
/** Generates metadata required for rendering of the preview. Only usable with Supernova preview */
|
|
8
8
|
static tokenPreviewMetadata(token: Token, allTokens: Map<string, Token>): TokenUtilPreviewMetadata;
|
|
9
9
|
/** Generates style required for rendering of the preview. Only usable with Supernova preview */
|
|
10
|
-
static tokenPreviewStyle(token: Token
|
|
10
|
+
static tokenPreviewStyle(token: Token, overridenStyles?: {
|
|
11
|
+
fontFamily?: string;
|
|
12
|
+
fontWeight?: string;
|
|
13
|
+
}): TokenUtilPreviewResolvedStyle;
|
|
11
14
|
/** Generates adjusted preview type required for rendering of the preview. Only usable with Supernova preview */
|
|
12
15
|
static tokenPreviewType(token: Token): TokenUtilPreviewTokenType;
|
|
13
16
|
/** Generates per-value description of passed token. Only usable with Supernova preview */
|
package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewReferenceInfoGenerator.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ export declare class TokenUtilPreviewReferenceInfoGenerator {
|
|
|
5
5
|
resolvedInfoForSingleLayerToken(token: Token, allTokens: Map<string, Token>): TokenUtilPreviewReferenceInfo;
|
|
6
6
|
resolvedInfoForMultiLayerToken(token: AnyMultiLayerToken, layerIndex: number, allTokens: Map<string, Token>): TokenUtilPreviewReferenceInfo;
|
|
7
7
|
private label;
|
|
8
|
-
private textCaseToString;
|
|
9
8
|
private textDecorationToString;
|
|
10
9
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Token } from "../../model/tokens/SDKToken";
|
|
2
2
|
import { TokenUtilPreviewResolvedStyle } from "./TokenUtilPreviewTypes";
|
|
3
3
|
export declare class TokenUtilPreviewStyleGenerator {
|
|
4
|
-
resolvedStyleForToken(token: Token
|
|
4
|
+
resolvedStyleForToken(token: Token, overridenStyles?: {
|
|
5
|
+
fontFamily?: string;
|
|
6
|
+
fontWeight?: string;
|
|
7
|
+
}): TokenUtilPreviewResolvedStyle | undefined;
|
|
5
8
|
}
|
|
@@ -8,9 +8,11 @@ export declare class TokenTransform {
|
|
|
8
8
|
/** Converts token to appropriate css variable definition --(name): css_definition */
|
|
9
9
|
tokenToCSSVariableDeclaration(token: Token, variableName: string): string;
|
|
10
10
|
/** Converts color token value to css definition */
|
|
11
|
-
colorTokenToCSS(value: ColorTokenValue): string;
|
|
11
|
+
colorTokenToCSS(value: ColorTokenValue, dedicatedOpacity?: number): string;
|
|
12
12
|
/** Converts border token value to css definition */
|
|
13
13
|
borderTokenToCSS(value: BorderTokenValue): string;
|
|
14
|
+
/** Converts shadow token and opacity by merging two opacities and using color token opacity as fallback */
|
|
15
|
+
shadowTokenColorAndOpacityToCSS(value: ShadowTokenValue): string;
|
|
14
16
|
/** Converts shadow token value to css definition */
|
|
15
17
|
shadowsTokenToCSS(value: ShadowTokenValue[]): string;
|
|
16
18
|
shadowTokenToCSS(value: ShadowTokenValue): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function castEnum<O extends string>(value: `${O}`): O;
|
|
2
|
+
export declare function castOptionalEnum<O extends string>(value: `${O}` | undefined): O | undefined;
|
|
3
|
+
export type NonEmptyArray<T> = [T, ...T[]];
|
|
4
|
+
export declare function sureOf<T>(entity: T | null | undefined): NonNullable<T>;
|
|
5
|
+
export declare function sortUsingMap<T, K>(items: Array<T>, indexes: Map<K, number>, keyFn: (item: T) => K): Array<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyToken, BlurType, BorderPosition, BorderStyle, DTProcessedTokenNode, GradientType, ShadowType, TokenGroup, TokenTheme } from "../exports";
|
|
1
|
+
import { AnyToken, BlurType, BorderPosition, BorderStyle, DTProcessedTokenNode, GradientType, ShadowType, TextCase, TokenGroup, TokenTheme } from "../exports";
|
|
2
2
|
import { ElementProperty } from "../model/elements/SDKElementProperty";
|
|
3
3
|
import { TokenType } from "../model/enums/SDKTokenType";
|
|
4
4
|
import { BlurToken } from "../model/tokens/SDKBlurToken";
|
|
@@ -81,7 +81,7 @@ export declare class TokenUtils {
|
|
|
81
81
|
static tokensToReferenceMap(tokens: Array<Token>): Map<string, Token>;
|
|
82
82
|
/** Map token groups for lookup */
|
|
83
83
|
static tokenGroupsToReferenceMap(groups: Array<TokenGroup>): Map<string, TokenGroup>;
|
|
84
|
-
static lookupReference<T extends Token>(id: string, tokens: Map<string, Token>): T | undefined;
|
|
84
|
+
static lookupReference<T extends Token>(id: string | undefined | null, tokens: Map<string, Token>): T | undefined;
|
|
85
85
|
/** Creates a new token group for a given token type. Default values will be used for all properties */
|
|
86
86
|
static createDefaultTokenGroup(type: TokenType, versionId: string, brandId: string, name?: string): TokenGroup;
|
|
87
87
|
/** Creates a new token theme. Default values will be used for all properties */
|
|
@@ -275,9 +275,9 @@ export declare class TokenUtils {
|
|
|
275
275
|
private static checkNotReference;
|
|
276
276
|
private static rawOrReferencedDimensionValue;
|
|
277
277
|
private static rawOrReferencedStringValue;
|
|
278
|
-
|
|
278
|
+
static validateLayerAccess(token: AnyMultiLayerToken, index: number): void;
|
|
279
279
|
static inlineValueIntoComplexTokens(token: AnyToken, candidateId: string, candidateValueToInline: AnyTokenValue): void;
|
|
280
|
-
static getRefIdsFromComplexTokens(token: AnyToken): string[];
|
|
280
|
+
static getRefIdsFromComplexTokens(token: AnyToken): (string | null | undefined)[];
|
|
281
281
|
static buildKey(path: Array<string>, name: string): string;
|
|
282
282
|
static buildPath(token: Token, groups: Array<TokenGroup>): Array<string>;
|
|
283
283
|
static mapTypeToPrefix: (type: TokenType) => string;
|
|
@@ -289,5 +289,6 @@ export declare class TokenUtils {
|
|
|
289
289
|
static getTokenByKeyOrFallbackKeys<T extends DTProcessedTokenNode | Token>(node: Pick<DTProcessedTokenNode, "path" | "token">, map: Map<string, T>): T | undefined;
|
|
290
290
|
static getKeysByKeyOrFallbackKeys<T extends DTProcessedTokenNode | Token>(node: Pick<DTProcessedTokenNode, "path" | "token">): string[];
|
|
291
291
|
static getTokenByKeyOrBackwardKey(node: Pick<DTProcessedTokenNode, "path" | "token">, map: Map<string, DTProcessedTokenNode>): DTProcessedTokenNode | undefined;
|
|
292
|
+
static getTextCaseTokenValue(value: TextCase): "Original" | "Uppercase" | "Lowercase" | "Capitalize" | "Small caps";
|
|
292
293
|
}
|
|
293
294
|
export {};
|