@supernova-studio/supernova-sdk-beta 1.6.30 → 1.6.32
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 +7 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +1 -14
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +34 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaMultiplayer.d.ts +10 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +28 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +4 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +27 -16
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +13 -7
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +16 -7
- package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +4 -0
- package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +1 -1
- package/build/sdk-typescript/src/exports-pulsar.d.ts +1 -1
- package/build/sdk-typescript/src/exports.d.ts +21 -2
- 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 +7 -23
- package/build/sdk-typescript/src/model/docs/blocks/definition/{SDKDocsBlockItem.d.ts → SDKDocsBlockItemDefinition.d.ts} +5 -12
- 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 +4 -14
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/assets/SDKDocsBlockActualAssets.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code/SDKDocsBlockActualCode.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code-react/SDKDocsBlockActualCodeReact.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist/SDKDocsBlockActualComponentChecklist.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist-all/SDKDocsBlockActualComponentChecklistAll.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-health/SDKDocsBlockActualComponentHealth.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/figma-frames/SDKDocsBlockActualFigmaFrames.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/link/SDKDocsBlockActualLink.d.ts +8 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-multi-item/SDKDocsBlockActualOmniMultiItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-single-item/SDKDocsBlockActualOmniSingleItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/release-notes/SDKDocsBlockActualReleaseNotes.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +8 -1
- 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 +5 -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 +7 -2
- 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 +2 -0
- 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 +7 -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 +10 -1
- 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 +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +14 -0
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsImageRef.d.ts +5 -2
- 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 -30
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlockItem.d.ts +16 -0
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityHeader.d.ts +3 -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/enums/SDKDocsBlockAssetPropertyPreviewContainerSize.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyAspectRatio.d.ts +4 -2
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyWidth.d.ts +2 -0
- 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/SDKDocsPublishStatus.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKSourceType.d.ts +2 -1
- 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/exporter_builds/SDKExportBuild.d.ts +6 -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/SDKResource.d.ts +26 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceAsset.d.ts +6 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceFont.d.ts +15 -0
- package/build/sdk-typescript/src/model/support/SDKFigmaFrame.d.ts +2 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +20 -4
- 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 +6 -6
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
- 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/SDKTokenValue.d.ts +2 -2
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +10 -4
- 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 +40 -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/TokenUtilPreviewStyleGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/utils/CommonUtils.d.ts +5 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +3 -3
- 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 +118 -118
|
@@ -14,7 +14,7 @@ export declare class TextDecorationToken extends Token {
|
|
|
14
14
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: TextDecorationToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TextDecorationToken;
|
|
15
15
|
static textDecorationFromDefinition(textDecoration: string): {
|
|
16
16
|
value: TextDecoration;
|
|
17
|
-
referencedTokenId:
|
|
17
|
+
referencedTokenId: null;
|
|
18
18
|
};
|
|
19
19
|
static optionValueFromDefinitionOrReference(definition: any, referenceResolver: DTTokenReferenceResolver, tokenType: OptionTokenType): AnyOptionTokenValue;
|
|
20
20
|
static optionValueFromDefinition(definition: string, type: OptionTokenType): AnyOptionTokenValue;
|
|
@@ -192,9 +192,9 @@ export type AnyPlainTokenValue = Exclude<AnyTokenValue, ShadowTokenValue[] | Gra
|
|
|
192
192
|
export type RawValue<T extends {
|
|
193
193
|
referencedTokenId: string;
|
|
194
194
|
}> = Omit<T, "referencedTokenId">;
|
|
195
|
-
export declare const getReferencedTokens: (token: AnyToken, allTokens: Map<string, Token>) => Token[];
|
|
195
|
+
export declare const getReferencedTokens: (token: AnyToken, allTokens: Map<string, Token>) => (Token | undefined)[];
|
|
196
196
|
export declare const getSingleReferencedTokenId: (token: AnyToken, allTokens: Map<string, Token>) => string | undefined;
|
|
197
|
-
export declare const checkSingleReferencedTokenById: (token: AnyToken, candidateId: string, allTokens: Map<string, Token>) => boolean;
|
|
197
|
+
export declare const checkSingleReferencedTokenById: (token: AnyToken, candidateId: string, allTokens: Map<string, Token>) => boolean | "";
|
|
198
198
|
export declare const replaceReferencedTokenIds: (token: AnyToken, currentId: string, newId: string, allTokens: Map<string, Token>) => void;
|
|
199
199
|
export declare const replaceReferencedToken: (token: Token, existingToken: AnyToken, newToken: AnyToken) => void;
|
|
200
200
|
export declare const replaceReferencedTokenByIds: (token: Token, existingTokenId: string, newTokenId: string) => void;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
+
export type UserOnboardingDepartmentType = "Design" | "Engineering" | "Brand" | "Other";
|
|
2
|
+
export type UserOnboardingJobLevelType = "Executive" | "Manager" | "IndividualContributor" | "Other";
|
|
1
3
|
export type UserProfileRemoteModel = {
|
|
2
4
|
name?: string;
|
|
3
5
|
nickname?: string;
|
|
4
6
|
avatar?: string;
|
|
5
7
|
onboarding?: UserProfileOnboardingRemoteModel;
|
|
8
|
+
isOnboardingFinished?: boolean;
|
|
6
9
|
};
|
|
7
10
|
export type UserProfileOnboardingRemoteModel = {
|
|
8
11
|
companyName?: string;
|
|
9
12
|
numberOfPeopleInOrg?: string;
|
|
10
13
|
numberOfPeopleInDesignTeam?: string;
|
|
11
|
-
department?:
|
|
14
|
+
department?: UserOnboardingDepartmentType;
|
|
12
15
|
jobTitle?: string;
|
|
13
16
|
phase?: string;
|
|
14
|
-
jobLevel?:
|
|
17
|
+
jobLevel?: UserOnboardingJobLevelType;
|
|
15
18
|
};
|
|
16
19
|
export type UserProfileTransportModel = UserProfileRemoteModel;
|
|
17
20
|
export type UserProfileOnboardingUpdateModel = UserProfileOnboardingRemoteModel;
|
|
18
21
|
export type UserProfileUpdateModel = {
|
|
19
22
|
name?: string;
|
|
20
23
|
nickname?: string;
|
|
24
|
+
onboarding?: UserProfileOnboardingRemoteModel;
|
|
21
25
|
};
|
|
22
26
|
export declare class UserProfile {
|
|
23
27
|
/** User name */
|
|
@@ -26,15 +30,17 @@ export declare class UserProfile {
|
|
|
26
30
|
nickname: string | null;
|
|
27
31
|
/** Avatar */
|
|
28
32
|
avatar: string | null;
|
|
33
|
+
/** Is profile onboarding finished */
|
|
34
|
+
isOnboardingFinished: boolean;
|
|
29
35
|
/** Onboarding object */
|
|
30
36
|
onboarding: {
|
|
31
37
|
companyName: string | null;
|
|
32
38
|
numberOfPeopleInOrg: string | null;
|
|
33
39
|
numberOfPeopleInDesignTeam: string | null;
|
|
34
|
-
department:
|
|
40
|
+
department: UserOnboardingDepartmentType | null;
|
|
35
41
|
jobTitle: string | null;
|
|
36
42
|
phase: string | null;
|
|
37
|
-
jobLevel:
|
|
43
|
+
jobLevel: UserOnboardingJobLevelType | null;
|
|
38
44
|
} | null;
|
|
39
45
|
constructor(model: UserProfileRemoteModel);
|
|
40
46
|
/** Constructs directly manipulable update object for user profile */
|
|
@@ -10,9 +10,9 @@ export declare class FigmaTokensDataLoader {
|
|
|
10
10
|
settings: DTPluginToSupernovaSettings;
|
|
11
11
|
mapping: {
|
|
12
12
|
supernovaBrand: string;
|
|
13
|
-
supernovaTheme: string;
|
|
14
|
-
tokensTheme: string | string[];
|
|
15
|
-
tokenSets: string[];
|
|
13
|
+
supernovaTheme: string | null;
|
|
14
|
+
tokensTheme: string | string[] | null;
|
|
15
|
+
tokenSets: string[] | null;
|
|
16
16
|
}[];
|
|
17
17
|
payload: object;
|
|
18
18
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Supernova } from "../../core/SDKSupernova";
|
|
2
2
|
import { Brand } from "../../model/base/SDKBrand";
|
|
3
3
|
import { TokenGroup } from "../../model/groups/SDKTokenGroup";
|
|
4
|
+
import { Logger } from "../../model/support/SDKLogger";
|
|
4
5
|
import { TokenTheme } from "../../model/themes/SDKTokenTheme";
|
|
5
6
|
import { Token } from "../../model/tokens/SDKToken";
|
|
6
7
|
import { AnyToken } from "../../model/tokens/SDKTokenValue";
|
|
@@ -25,7 +26,7 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
25
26
|
private versionId;
|
|
26
27
|
private sortMultiplier;
|
|
27
28
|
private logger;
|
|
28
|
-
constructor(designSystemId: string, versionId: string, instance: Supernova);
|
|
29
|
+
constructor(designSystemId: string, versionId: string, instance: Supernova, logger?: Logger);
|
|
29
30
|
synchronizeTokensFromData(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<object>;
|
|
30
31
|
synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<{
|
|
31
32
|
results: SupernovaToolsDesignTokensResult[];
|
|
@@ -7,6 +7,6 @@ export type TokenTreeElement = Token | TokenGroup;
|
|
|
7
7
|
export declare class GroupTree extends GroupTreeNode {
|
|
8
8
|
childType: TokenType;
|
|
9
9
|
constructor(backingElement: TokenTreeElement);
|
|
10
|
-
static populate(root: TokenTreeElement, elements: Array<TokenTreeElement>, parentChildrenMap: Map<string, Array<TokenTreeElement>>): GroupTree;
|
|
10
|
+
static populate(root: TokenTreeElement, elements: Array<TokenTreeElement>, parentChildrenMap: Map<string, Array<TokenTreeElement>>): GroupTree | null;
|
|
11
11
|
}
|
|
12
12
|
export declare function buildBrandedElementRoots(elements: TokenTreeElement[]): Map<string, Map<TokenType, GroupTree>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { DocsBlockMultiRichTextPropertyOptions } from "../../exports";
|
|
1
2
|
import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
2
|
-
import {
|
|
3
|
+
import { DocsBlockItemDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockItemDefinition";
|
|
3
4
|
import { DocsBlockLayout } from "../../model/docs/blocks/definition/SDKDocsBlockLayout";
|
|
4
5
|
import { DocsBlockOnboarding } from "../../model/docs/blocks/definition/SDKDocsBlockOnboarding";
|
|
5
6
|
import { DocsBlockVariant } from "../../model/docs/blocks/definition/SDKDocsBlockVariant";
|
|
@@ -25,6 +26,7 @@ import { DocsBlockTextPropertyDefinition, DocsBlockTextPropertyOptions } from ".
|
|
|
25
26
|
import { DocsBlockTokenPropertyDefinition, DocsBlockTokenPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenProperty";
|
|
26
27
|
import { DocsBlockTokenPropertyPropertyDefinition, DocsBlockTokenPropertyPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenPropertyProperty";
|
|
27
28
|
import { DocsBlockTokenTypePropertyDefinition, DocsBlockTokenTypePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenTypeProperty";
|
|
29
|
+
import { DocsBlockUrlPropertyDefinition, DocsBlockUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockUrlProperty";
|
|
28
30
|
import { DocsBlockBehaviorDataType } from "../../model/enums/SDKDocsBlockBehaviorDataType";
|
|
29
31
|
import { DocsBlockBehaviorSelectionType } from "../../model/enums/SDKDocsBlockBehaviorSelectionType";
|
|
30
32
|
import { DocsBlockCategory } from "../../model/enums/SDKDocsBlockCategory";
|
|
@@ -48,6 +50,7 @@ export declare class DocsBlockBuilder {
|
|
|
48
50
|
name: string;
|
|
49
51
|
image: string;
|
|
50
52
|
layout: DocsBlockLayout;
|
|
53
|
+
description?: string;
|
|
51
54
|
maxColumns?: number;
|
|
52
55
|
}): DocsBlockVariant;
|
|
53
56
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
@@ -56,12 +59,23 @@ export declare class DocsBlockBuilder {
|
|
|
56
59
|
name: string;
|
|
57
60
|
image: string;
|
|
58
61
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
62
|
+
description?: string;
|
|
59
63
|
maxColumns?: number;
|
|
64
|
+
appearance?: {
|
|
65
|
+
isBordered?: boolean;
|
|
66
|
+
hasBackground?: boolean;
|
|
67
|
+
isEditorPresentationDifferent?: boolean;
|
|
68
|
+
};
|
|
60
69
|
}): DocsBlockVariant;
|
|
61
70
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
62
71
|
defaultVariantUsingDefaultLayout(options: {
|
|
63
72
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
64
73
|
maxColumns?: number;
|
|
74
|
+
appearance?: {
|
|
75
|
+
isBordered?: boolean;
|
|
76
|
+
hasBackground?: boolean;
|
|
77
|
+
isEditorPresentationDifferent?: boolean;
|
|
78
|
+
};
|
|
65
79
|
}): DocsBlockVariant;
|
|
66
80
|
/** Create block item with a single variant of rendering */
|
|
67
81
|
singleVariantItem(configuration: {
|
|
@@ -71,7 +85,7 @@ export declare class DocsBlockBuilder {
|
|
|
71
85
|
isBordered?: boolean;
|
|
72
86
|
hasBackground?: boolean;
|
|
73
87
|
};
|
|
74
|
-
}):
|
|
88
|
+
}): DocsBlockItemDefinition;
|
|
75
89
|
/** Create block item with multiple variants of rendering. The first variant becomes the default one */
|
|
76
90
|
multiVariantItem(configuration: {
|
|
77
91
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
@@ -80,7 +94,7 @@ export declare class DocsBlockBuilder {
|
|
|
80
94
|
isBordered?: boolean;
|
|
81
95
|
hasBackground?: boolean;
|
|
82
96
|
};
|
|
83
|
-
}):
|
|
97
|
+
}): DocsBlockItemDefinition;
|
|
84
98
|
/** Creates a core block definition which can't select from Supernova data, and its item can only be created once (Examples: Rich Text, Callout, Heading blocks) */
|
|
85
99
|
singleItemBlock(configuration: {
|
|
86
100
|
id: string;
|
|
@@ -88,7 +102,7 @@ export declare class DocsBlockBuilder {
|
|
|
88
102
|
category: DocsBlockCategory;
|
|
89
103
|
icon: string;
|
|
90
104
|
description?: string;
|
|
91
|
-
item:
|
|
105
|
+
item: DocsBlockItemDefinition;
|
|
92
106
|
linkable?: boolean;
|
|
93
107
|
isBordered?: boolean;
|
|
94
108
|
hasBackground?: boolean;
|
|
@@ -101,7 +115,7 @@ export declare class DocsBlockBuilder {
|
|
|
101
115
|
name: string;
|
|
102
116
|
category: DocsBlockCategory;
|
|
103
117
|
icon: string;
|
|
104
|
-
item:
|
|
118
|
+
item: DocsBlockItemDefinition;
|
|
105
119
|
maxItems?: number;
|
|
106
120
|
description?: string;
|
|
107
121
|
linkable?: boolean;
|
|
@@ -116,7 +130,7 @@ export declare class DocsBlockBuilder {
|
|
|
116
130
|
name: string;
|
|
117
131
|
icon: string;
|
|
118
132
|
category: DocsBlockCategory;
|
|
119
|
-
item:
|
|
133
|
+
item: DocsBlockItemDefinition;
|
|
120
134
|
dataType: Exclude<DocsBlockBehaviorDataType, DocsBlockBehaviorDataType.item>;
|
|
121
135
|
selectionType: DocsBlockBehaviorSelectionType;
|
|
122
136
|
maxSelection?: number;
|
|
@@ -152,6 +166,16 @@ export declare class DocsBlockBuilder {
|
|
|
152
166
|
[key: string]: DocsBlockRichTextPropertyOptions;
|
|
153
167
|
};
|
|
154
168
|
}): DocsBlockRichTextPropertyDefinition;
|
|
169
|
+
/** Create a block property with type .richText and its specific options */
|
|
170
|
+
multiRichTextProperty(configuration: {
|
|
171
|
+
id: string;
|
|
172
|
+
name: string;
|
|
173
|
+
description?: string;
|
|
174
|
+
options: DocsBlockMultiRichTextPropertyOptions;
|
|
175
|
+
variants?: {
|
|
176
|
+
[key: string]: DocsBlockMultiRichTextPropertyOptions;
|
|
177
|
+
};
|
|
178
|
+
}): DocsBlockRichTextPropertyDefinition;
|
|
155
179
|
/** Create a block property with type .boolean and its specific options */
|
|
156
180
|
booleanProperty(configuration: {
|
|
157
181
|
id: string;
|
|
@@ -292,6 +316,16 @@ export declare class DocsBlockBuilder {
|
|
|
292
316
|
[key: string]: DocsBlockMarkdownPropertyOptions;
|
|
293
317
|
};
|
|
294
318
|
}): DocsBlockMarkdownPropertyDefinition;
|
|
319
|
+
/** Create a block property with type .url and its specific options */
|
|
320
|
+
urlProperty(configuration: {
|
|
321
|
+
id: string;
|
|
322
|
+
name: string;
|
|
323
|
+
description?: string;
|
|
324
|
+
options: DocsBlockUrlPropertyOptions;
|
|
325
|
+
variants?: {
|
|
326
|
+
[key: string]: DocsBlockUrlPropertyOptions;
|
|
327
|
+
};
|
|
328
|
+
}): DocsBlockUrlPropertyDefinition;
|
|
295
329
|
/** Create a block property with type .storybook and its specific options */
|
|
296
330
|
storybookProperty(configuration: {
|
|
297
331
|
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" | "text" | "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
|
}
|
|
@@ -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 */
|
|
@@ -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
|
}
|
|
@@ -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>;
|
|
@@ -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;
|