@supernova-studio/supernova-sdk-beta 1.6.12 → 1.6.14
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/core/areas/SDKAreaBulkOperations.d.ts +1 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaPipelines.d.ts +3 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +11 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +2 -0
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +11 -5
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +3 -1
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +7 -5
- package/build/sdk-typescript/src/core/resolvers/SDKDocumentationItemResolver.d.ts +3 -2
- package/build/sdk-typescript/src/exports.d.ts +4 -0
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationItem.d.ts +2 -0
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationPage.d.ts +3 -2
- package/build/sdk-typescript/src/model/enums/SDKDocumentationEnvironment.d.ts +4 -0
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +5 -5
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +5 -5
- package/build/sdk-typescript/src/model/tokens/SDKBlurToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKBorderToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +43 -16
- package/build/sdk-typescript/src/model/tokens/SDKGradientToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKShadowToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +32 -7
- 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/SDKToken.d.ts +3 -1
- package/build/sdk-typescript/src/model/tokens/SDKTokenValue.d.ts +1 -0
- package/build/sdk-typescript/src/model/tokens/SDKTypographyToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKVisibilityToken.d.ts +1 -1
- package/build/sdk-typescript/src/tests/Areas/AreaDocumentation.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Enterprise/PluginFigmaTokens.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/FigmaTokensDataLoader.d.ts +13 -0
- package/build/sdk-typescript/src/tests/validators.d.ts +1 -1
- package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +2 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +3 -3
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +0 -2
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +3 -4
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +13 -2
- package/build/sdk-typescript/src/tools/design-tokens/utilities/collection/SDKDTTokenCollection.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/TokenUtilPreviewSegmentGenerator.d.ts +3 -1
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +45 -0
- package/build/supernova-sdk-typescript.js +65269 -2
- package/build/supernova-sdk-typescript.js.LICENSE.txt +14 -0
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +5 -2
|
@@ -11,7 +11,7 @@ export type TokenUpdateTransactionData = {
|
|
|
11
11
|
tokenMode: "create" | "update";
|
|
12
12
|
propertyValuesToCreateOrUpdate?: Array<{
|
|
13
13
|
property: ElementProperty;
|
|
14
|
-
value: string;
|
|
14
|
+
value: string | boolean;
|
|
15
15
|
}>;
|
|
16
16
|
propertyValuesToDelete?: Array<string>;
|
|
17
17
|
themesToUpdate?: Array<TokenTheme>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
|
|
1
2
|
import { ExporterCustomBlockVariant } from "../../model/exporters/custom_blocks/SDKExporterCustomBlockVariant";
|
|
2
3
|
import { ExporterConfigurationProperty } from "../../model/exporters/custom_properties/SDKExporterConfigurationProperty";
|
|
3
4
|
import { Exporter } from "../../model/exporters/SDKExporter";
|
|
@@ -22,13 +23,13 @@ export declare class AreaPipelines {
|
|
|
22
23
|
*/
|
|
23
24
|
getExporterBlockVariants(workspaceId: string, exporterId: string): Promise<Array<ExporterCustomBlockVariant>>;
|
|
24
25
|
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
25
|
-
publish(to: RemoteWorkspaceVersionIdentifier): Promise<{
|
|
26
|
+
publish(to: RemoteWorkspaceVersionIdentifier, environment: DocumentationEnvironment): Promise<{
|
|
26
27
|
status: "Queued" | "InProgress" | "Failure";
|
|
27
28
|
jobId: string | null;
|
|
28
29
|
exporterId: string | null;
|
|
29
30
|
}>;
|
|
30
31
|
/** Publish documentation. This queues a build on Supernova's server that will be processed by the asynchronous CI/CD pipeline. You can request status of the build with associated `isBeingPublished` method. */
|
|
31
|
-
isPublishing(to: RemoteWorkspaceVersionIdentifier): Promise<{
|
|
32
|
+
isPublishing(to: RemoteWorkspaceVersionIdentifier, environment: DocumentationEnvironment): Promise<{
|
|
32
33
|
status: "InProgress" | "Idle";
|
|
33
34
|
jobId: string | null;
|
|
34
35
|
exporterId: string | null;
|
|
@@ -188,12 +188,20 @@ export declare class AreaTokens {
|
|
|
188
188
|
* @returns Nothing
|
|
189
189
|
*/
|
|
190
190
|
deleteToken(to: RemoteVersionIdentifier, tokenIdInVersion: string): Promise<void>;
|
|
191
|
-
/** Deletes remote token group. This method will also fix the token group tree by moving any subgroups to parent. Calling this method on group that doesn't exist in the version will result in error
|
|
191
|
+
/** Deletes remote token group. This method will also fix the token group tree by moving any subgroups to parent - do note it will NOT delete contents of the group. Calling this method on group that doesn't exist in the version will result in error
|
|
192
192
|
* @param to - Remote version to write to
|
|
193
193
|
* @param tokenGroupIdInVersion - Token group idInVersion to delete
|
|
194
194
|
* @returns Nothing
|
|
195
195
|
*/
|
|
196
|
-
|
|
196
|
+
ungroupTokenGroup(to: RemoteVersionIdentifier, tokenGroupIdInVersion: string): Promise<void>;
|
|
197
|
+
/** Deletes remote token group and all its descendants. All items (groups and tokens) underneath will be deleted. Calling this method on group that doesn't exist in the version will result in error
|
|
198
|
+
* @param to - Remote version to write to
|
|
199
|
+
* @param tokenGroupToDelete - Token group to delete
|
|
200
|
+
* @param allTokens - Tokens for lookup
|
|
201
|
+
* @param allTokenGroup - Token group for lookup
|
|
202
|
+
* @returns Nothing
|
|
203
|
+
*/
|
|
204
|
+
deleteTokenGroup(to: RemoteVersionIdentifier, tokenGroupToDelete: TokenGroup, tokens: Array<Token>, tokenGroups: Array<TokenGroup>): Promise<void>;
|
|
197
205
|
/** Deletes remote token theme. This method will also remove all theme overrides and disconnect theme from assigned column, all of which will be updated
|
|
198
206
|
* @param to - Remote version to write to
|
|
199
207
|
* @param idInVersion - Theme idInVersion to delete
|
|
@@ -201,7 +209,7 @@ export declare class AreaTokens {
|
|
|
201
209
|
*/
|
|
202
210
|
deleteTokenTheme(to: RemoteVersionIdentifier, idInVersion: string): Promise<void>;
|
|
203
211
|
/** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write tokens in bulk */
|
|
204
|
-
writeTokens(to: RemoteVersionIdentifier, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>): Promise<void>;
|
|
212
|
+
writeTokens(to: RemoteVersionIdentifier, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>): Promise<void>;
|
|
205
213
|
/** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write theme in bulk */
|
|
206
214
|
writeTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<void>;
|
|
207
215
|
/** Resolves tokens by applying themes to them and retrieves new token set where values correctly correspond to that theme */
|
|
@@ -11,4 +11,6 @@ export declare class AreaVersions {
|
|
|
11
11
|
getVersions(designSystemId: string): Promise<Array<DesignSystemVersion>>;
|
|
12
12
|
/** Fetches design system version by id */
|
|
13
13
|
getVersion(from: RemoteVersionIdentifier): Promise<DesignSystemVersion>;
|
|
14
|
+
getTokenStudioData(from: RemoteVersionIdentifier): Promise<object>;
|
|
15
|
+
writeTokenStudioData(from: RemoteVersionIdentifier, data: object): Promise<boolean>;
|
|
14
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
|
|
1
2
|
import { Acl } from "../../model/acl/SDKAcl";
|
|
2
3
|
import { Asset } from "../../model/assets/SDKAsset";
|
|
3
4
|
import { RenderedAsset } from "../../model/assets/SDKRenderedAsset";
|
|
@@ -111,14 +112,17 @@ export declare class DataCore {
|
|
|
111
112
|
/** Update existing token theme in remote */
|
|
112
113
|
updateTokenTheme(designSystemId: string, versionId: string, theme: TokenTheme): Promise<void>;
|
|
113
114
|
/** Write the tokens to remote */
|
|
114
|
-
writeTokenData(designSystemId: string, versionId: string, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>): Promise<void>;
|
|
115
|
+
writeTokenData(designSystemId: string, versionId: string, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>, deleteGroups: Array<TokenGroup>): Promise<void>;
|
|
115
116
|
writeTokenThemeData(designSystemId: string, versionId: string, theme: TokenTheme): Promise<void>;
|
|
116
117
|
/** Delete token from remote */
|
|
117
118
|
deleteToken(designSystemId: string, versionId: string, tokenId: string): Promise<void>;
|
|
118
119
|
/** Delete group from remote */
|
|
119
|
-
|
|
120
|
+
ungroupTokenGroup(designSystemId: string, versionId: string, groupId: string): Promise<void>;
|
|
121
|
+
/** Delete group from remote */
|
|
122
|
+
deleteTokenGroup(designSystemId: string, versionId: string, tokenGroupToDelete: TokenGroup, tokens: Array<Token>, tokenGroups: Array<TokenGroup>): Promise<void>;
|
|
123
|
+
private itemsToDeleteFromGroup;
|
|
120
124
|
/** Update token property at remote */
|
|
121
|
-
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string, token: Token, property: ElementProperty): Promise<void>;
|
|
125
|
+
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string | boolean, token: Token, property: ElementProperty): Promise<void>;
|
|
122
126
|
/** Delete token property in remote */
|
|
123
127
|
deleteTokenPropertyValue(designSystemId: string, versionId: string, valueId: string): Promise<void>;
|
|
124
128
|
/** Create a custom property in remote */
|
|
@@ -155,7 +159,7 @@ export declare class DataCore {
|
|
|
155
159
|
/** Retrieve currently deployed documentation url */
|
|
156
160
|
documentationDomain(designSystemId: string, versionId: string): Promise<string | null>;
|
|
157
161
|
/** Publish the documentation */
|
|
158
|
-
documentationPublish(workspaceId: string, designSystemId: string, versionId: string): Promise<{
|
|
162
|
+
documentationPublish(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment): Promise<{
|
|
159
163
|
status: "Queued" | "InProgress" | "Failure";
|
|
160
164
|
jobId: string;
|
|
161
165
|
exporterId: string;
|
|
@@ -176,7 +180,7 @@ export declare class DataCore {
|
|
|
176
180
|
/** Download information about all installed exporter and retrieve it resolved */
|
|
177
181
|
exporters(workspaceId: string): Promise<Array<Exporter>>;
|
|
178
182
|
/** Download information about documentation builds and retrieve it resolved */
|
|
179
|
-
documentationBuilds(workspaceId: string, designSystemId: string, versionId: string, limit?: number): Promise<Array<{
|
|
183
|
+
documentationBuilds(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment, limit?: number): Promise<Array<{
|
|
180
184
|
status: "InProgress" | "Success" | "Failed";
|
|
181
185
|
id: string | null;
|
|
182
186
|
exporterId: string | null;
|
|
@@ -213,4 +217,6 @@ export declare class DataCore {
|
|
|
213
217
|
getBrand(designSystemId: string, versionId: string, brandId: string): Promise<Brand>;
|
|
214
218
|
getOAuthURL(service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<string>;
|
|
215
219
|
bulkUpdateTokenData(designSystemId: string, versionId: string, data: TokenUpdateTransactionData): Promise<any>;
|
|
220
|
+
getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
|
|
221
|
+
writeTokenStudioData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
|
|
216
222
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
|
|
1
2
|
import { AclRemoteModel } from "../../../model/acl/SDKAcl";
|
|
2
3
|
import { BrandRemoteModel } from "../../../model/base/SDKBrand";
|
|
3
4
|
import { DesignSystemRemoteModel } from "../../../model/base/SDKDesignSystem";
|
|
@@ -111,7 +112,7 @@ export declare class DataCoreReadRequests {
|
|
|
111
112
|
getRemoteElementDataViewDefinitions(designSystemId: string, versionId: string): Promise<Array<ElementDataViewRemoteModel>>;
|
|
112
113
|
/** Remote: Get all property values that were set by the user for each elemen */
|
|
113
114
|
getRemoteElementPropertyValues(designSystemId: string, versionId: string): Promise<ElementPropertyValueRemoteModel[]>;
|
|
114
|
-
getRemoteDocumentationBuilds(workspaceId: string, designSystemId: string, versionId: string, limit?: number): Promise<Array<{
|
|
115
|
+
getRemoteDocumentationBuilds(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment, limit?: number): Promise<Array<{
|
|
115
116
|
status: "InProgress" | "Success" | "Failed";
|
|
116
117
|
id: string | null;
|
|
117
118
|
exporterId: string | null;
|
|
@@ -121,4 +122,5 @@ export declare class DataCoreReadRequests {
|
|
|
121
122
|
getOAuthURL(service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<string>;
|
|
122
123
|
getVersion(designSystemId: string, versionId: string): Promise<DesignSystemVersionRemoteModel>;
|
|
123
124
|
getVersions(designSystemId: string): Promise<Array<DesignSystemVersionRemoteModel>>;
|
|
125
|
+
getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
|
|
124
126
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
|
|
1
2
|
import { ElementDataViewColumnType } from "../../../exports";
|
|
2
3
|
import { ElementPropertyRemoteModel } from "../../../model/elements/SDKElementProperty";
|
|
3
|
-
import { TokenGroupRemoteModel } from "../../../model/groups/SDKTokenGroup";
|
|
4
|
+
import { TokenGroup, TokenGroupRemoteModel } from "../../../model/groups/SDKTokenGroup";
|
|
4
5
|
import { TokenThemeRemoteModel } from "../../../model/themes/SDKTokenTheme";
|
|
5
6
|
import { TokenRemoteModel } from "../../../model/tokens/remote/SDKRemoteTokenModel";
|
|
6
7
|
import { Token } from "../../../model/tokens/SDKToken";
|
|
@@ -47,7 +48,7 @@ export declare class DataCoreWriteRequests {
|
|
|
47
48
|
deleteRemoteWorkspaceAvatar(workspaceId: string): Promise<void>;
|
|
48
49
|
/** Remote: Deletes a workspace NPM settings */
|
|
49
50
|
deleteRemoteWorkspaceNPMRegistrySettings(workspaceId: string): Promise<void>;
|
|
50
|
-
publishDocumentation(workspaceId: string, designSystemId: string, versionId: string): Promise<{
|
|
51
|
+
publishDocumentation(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment): Promise<{
|
|
51
52
|
status: "Queued" | "InProgress" | "Failure";
|
|
52
53
|
jobId: string;
|
|
53
54
|
exporterId: string;
|
|
@@ -57,17 +58,18 @@ export declare class DataCoreWriteRequests {
|
|
|
57
58
|
createRemoteTokenGroup(designSystemId: string, versionId: string, group: TokenGroupRemoteModel): Promise<TokenGroupRemoteModel>;
|
|
58
59
|
updateRemoteTokenGroup(designSystemId: string, versionId: string, group: TokenGroupRemoteModel): Promise<void>;
|
|
59
60
|
deleteRemoteToken(designSystemId: string, versionId: string, tokenId: string): Promise<void>;
|
|
60
|
-
|
|
61
|
+
ungroupRemoteTokenGroup(designSystemId: string, versionId: string, tokenGroupId: string): Promise<void>;
|
|
61
62
|
createRemoteTokenTheme(designSystemId: string, versionId: string, theme: TokenThemeRemoteModel): Promise<TokenThemeRemoteModel>;
|
|
62
63
|
updateRemoteTokenTheme(designSystemId: string, versionId: string, group: TokenThemeRemoteModel): Promise<void>;
|
|
63
64
|
deleteRemoteTokenTheme(designSystemId: string, versionId: string, themeId: string): Promise<void>;
|
|
64
|
-
writeTokenData(designSystemId: string, versionId: string, tokens: Array<TokenRemoteModel>, groups: Array<TokenGroupRemoteModel>, deleteTokens: Array<Token>): Promise<void>;
|
|
65
|
+
writeTokenData(designSystemId: string, versionId: string, tokens: Array<TokenRemoteModel>, groups: Array<TokenGroupRemoteModel>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>): Promise<void>;
|
|
65
66
|
writeTokenThemeData(designSystemId: string, versionId: string, theme: TokenThemeRemoteModel): Promise<void>;
|
|
66
|
-
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string, tokenId: string, propertyId: string): Promise<void>;
|
|
67
|
+
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string | boolean, tokenId: string, propertyId: string): Promise<void>;
|
|
67
68
|
deleteTokenPropertyValue(designSystemId: string, versionId: string, valueId: string): Promise<void>;
|
|
68
69
|
createTokenProperty(designSystemId: string, versionId: string, model: object): Promise<ElementPropertyRemoteModel>;
|
|
69
70
|
updateTokenProperty(designSystemId: string, versionId: string, propertyIdInVersion: string, model: object): Promise<void>;
|
|
70
71
|
deleteTokenProperty(designSystemId: string, versionId: string, propertyId: string): Promise<void>;
|
|
71
72
|
updateReorderTokenColumn(designSystemId: string, versionId: string, viewId: string, columnId: string, newIndex: number): Promise<void>;
|
|
72
73
|
updateResizeTokenColumn(designSystemId: string, versionId: string, viewId: string, columnType: ElementDataViewColumnType, columnId: string, columnThemeId: string | undefined, columnBasePropertyType: string | undefined, newWidth: number): Promise<void>;
|
|
74
|
+
writeTokenStudioJSONData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
|
|
73
75
|
}
|
|
@@ -11,15 +11,16 @@ export declare class DocumentationItemResolver {
|
|
|
11
11
|
workspaceHandle: string;
|
|
12
12
|
versionId: string;
|
|
13
13
|
designSystemId: string;
|
|
14
|
+
designSystemName: string;
|
|
14
15
|
docsUrl: string | undefined;
|
|
15
|
-
constructor(customBlocks: Array<ExporterCustomBlock>, configuration: DocumentationConfiguration, designSystemId: string, versionId: string, workspaceHandle: string, docsUrl: string | undefined);
|
|
16
|
+
constructor(customBlocks: Array<ExporterCustomBlock>, configuration: DocumentationConfiguration, designSystemId: string, designSystemName: string, versionId: string, workspaceHandle: string, docsUrl: string | undefined);
|
|
16
17
|
resolveItemData(pageDetails: Array<DocumentationPageModel>, groupDetails: Array<DocumentationGroupModel>): Array<DocumentationItem>;
|
|
17
18
|
private resolveItemsForGroup;
|
|
18
19
|
private resolveBlockChains;
|
|
19
20
|
private resolveBlockGroup;
|
|
20
21
|
/** Create URL pointing to the deployed documentation page hosted on Supernova side. Will be empty if there was nothing deployed, or if not hosted at Supernova */
|
|
21
22
|
private deployedUrl;
|
|
22
|
-
/** Create editor URL pointing to editable page.
|
|
23
|
+
/** Create editor URL pointing to editable page. */
|
|
23
24
|
private editorUrl;
|
|
24
25
|
/** Create page URL or group URL pointing to the first contained page */
|
|
25
26
|
private pageUrl;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { ElementPropertyValue } from "./model/elements/values/SDKElementPropertyValue";
|
|
2
|
+
export { TokenUtilPreviewSegmentGenerator } from "./tools/token-preview/TokenUtilPreviewSegmentGenerator";
|
|
3
|
+
export { TokenTypeMapToken } from "./utils/TokenUtils";
|
|
1
4
|
export { DimensionTokenType, DIMENSION_TOKEN_TYPES, } from "./model/enums/SDKTokenType";
|
|
2
5
|
export { Supernova } from "./core/SDKSupernova";
|
|
3
6
|
export { Workspace } from "./model/workspaces/SDKWorkspace";
|
|
@@ -141,3 +144,4 @@ export { TokenTransform } from "./tools/token-transform/SDKToolsTokenTransform";
|
|
|
141
144
|
export { UnreachableCaseError } from "./utils/UnreachableCaseError";
|
|
142
145
|
export { SupernovaError, SupernovaFieldValidationError, } from "./core/errors/SDKSupernovaError";
|
|
143
146
|
export { RemoteVersionIdentifier, RemoteBrandIdentifier, RemoteWorkspaceVersionIdentifier, } from "./core/areas/SDKRemoteIdentifiers";
|
|
147
|
+
export { TokenUtilPreviewReferenceInfo, TokenUtilPreviewReferenceInfoPiece, } from "./tools/token-preview/TokenUtilPreviewTypes";
|
|
@@ -2,6 +2,7 @@ import { DocumentationItemType } from "../enums/SDKDocumentationItemType";
|
|
|
2
2
|
import { DocumentationItemConfiguration, DocumentationItemConfigurationModel } from "./configuration/SDKDocumentationItemConfiguration";
|
|
3
3
|
export type DocumentationItemModel = {
|
|
4
4
|
persistentId: string;
|
|
5
|
+
shortPersistentId: string;
|
|
5
6
|
id: string;
|
|
6
7
|
designSystemVersionId: string;
|
|
7
8
|
title: string;
|
|
@@ -15,6 +16,7 @@ export type DocumentationItemModel = {
|
|
|
15
16
|
export declare class DocumentationItem {
|
|
16
17
|
id: string;
|
|
17
18
|
persistentId: string;
|
|
19
|
+
shortPersistentId: string;
|
|
18
20
|
type: DocumentationItemType;
|
|
19
21
|
title: string;
|
|
20
22
|
configuration: DocumentationItemConfiguration;
|
|
@@ -4,6 +4,7 @@ import { DocumentationGroup } from "./SDKDocumentationGroup";
|
|
|
4
4
|
import { DocumentationItem, DocumentationItemModel } from "./SDKDocumentationItem";
|
|
5
5
|
import { DocumentationPageBlock, DocumentationPageBlockModel } from "./SDKDocumentationPageBlock";
|
|
6
6
|
export type DocumentationPageModel = {
|
|
7
|
+
path: string;
|
|
7
8
|
blocks?: Array<DocumentationPageBlockModel>;
|
|
8
9
|
} & DocumentationItemModel;
|
|
9
10
|
export declare class DocumentationPage extends DocumentationItem {
|
|
@@ -14,12 +15,12 @@ export declare class DocumentationPage extends DocumentationItem {
|
|
|
14
15
|
/** Internal */
|
|
15
16
|
deployedUrl: string | null;
|
|
16
17
|
/** Internal */
|
|
17
|
-
relativeUrl: string
|
|
18
|
+
relativeUrl: string;
|
|
18
19
|
/** Internal */
|
|
19
20
|
editorUrl: string | null;
|
|
20
21
|
constructor(model: DocumentationPageModel, customBlocks: Array<ExporterCustomBlock>, configuration: DocumentationConfiguration);
|
|
21
22
|
/** Internal: Modifies object with new paths. Don't use outside SDK environment as it doesn't propagate the data back to source */
|
|
22
|
-
internalOverridePaths(deployed: string | null, editor: string | null
|
|
23
|
+
internalOverridePaths(deployed: string | null, editor: string | null): void;
|
|
23
24
|
/** Internal: Sets new parent. Used when manipulating with object internally. Don't use outside SDK environment */
|
|
24
25
|
setParent(parent: DocumentationGroup): void;
|
|
25
26
|
/** Retrieve editor page URL that can be opened */
|
|
@@ -33,21 +33,21 @@ export declare class TokenTheme {
|
|
|
33
33
|
toWriteObject(): TokenThemeRemoteModel;
|
|
34
34
|
private tokensToOverrides;
|
|
35
35
|
toWriteOverrideObject(token: Token): TokenThemeOverrideRemoteModel;
|
|
36
|
-
valueToWriteObject(value: AnyTokenValue, type: TokenType, token: AnyToken): {
|
|
36
|
+
valueToWriteObject(value: AnyTokenValue, type: TokenType, token: AnyToken): import("../tokens/remote/SDKRemoteTokenData").ShadowTokenRemoteData | import("../tokens/remote/SDKRemoteTokenData").GradientTokenRemoteData | {
|
|
37
37
|
aliasTo: string;
|
|
38
38
|
value: import("../tokens/remote/SDKRemoteTokenValue").BlurTokenRemoteValue;
|
|
39
39
|
} | {
|
|
40
40
|
aliasTo: string;
|
|
41
41
|
value: import("../tokens/remote/SDKRemoteTokenValue").BorderTokenRemoteValue;
|
|
42
|
-
} |
|
|
42
|
+
} | {
|
|
43
43
|
aliasTo: string;
|
|
44
44
|
value: import("../tokens/remote/SDKRemoteTokenValue").ColorTokenRemoteValue;
|
|
45
|
-
} | import("../tokens/remote/SDKRemoteTokenData").ShadowTokenRemoteData | {
|
|
46
|
-
aliasTo: string;
|
|
47
|
-
value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
|
|
48
45
|
} | {
|
|
49
46
|
aliasTo: string;
|
|
50
47
|
value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
|
|
48
|
+
} | {
|
|
49
|
+
aliasTo: string;
|
|
50
|
+
value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
|
|
51
51
|
} | {
|
|
52
52
|
aliasTo: string;
|
|
53
53
|
value: string;
|
|
@@ -19,21 +19,21 @@ export declare class TokenThemeOverride {
|
|
|
19
19
|
updatedAt: Date | null;
|
|
20
20
|
constructor(model: TokenThemeOverrideRemoteModel, value: AnyTokenValue);
|
|
21
21
|
toWriteObject(): TokenThemeOverrideRemoteModel;
|
|
22
|
-
valueToWriteObject(value: AnyTokenValue, type: TokenType): {
|
|
22
|
+
valueToWriteObject(value: AnyTokenValue, type: TokenType): ShadowTokenRemoteData | GradientTokenRemoteData | {
|
|
23
23
|
aliasTo: string;
|
|
24
24
|
value: import("../tokens/remote/SDKRemoteTokenValue").BlurTokenRemoteValue;
|
|
25
25
|
} | {
|
|
26
26
|
aliasTo: string;
|
|
27
27
|
value: import("../tokens/remote/SDKRemoteTokenValue").BorderTokenRemoteValue;
|
|
28
|
-
} |
|
|
28
|
+
} | {
|
|
29
29
|
aliasTo: string;
|
|
30
30
|
value: import("../tokens/remote/SDKRemoteTokenValue").ColorTokenRemoteValue;
|
|
31
|
-
} | ShadowTokenRemoteData | {
|
|
32
|
-
aliasTo: string;
|
|
33
|
-
value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
|
|
34
31
|
} | {
|
|
35
32
|
aliasTo: string;
|
|
36
33
|
value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
|
|
34
|
+
} | {
|
|
35
|
+
aliasTo: string;
|
|
36
|
+
value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
|
|
37
37
|
} | {
|
|
38
38
|
aliasTo: string;
|
|
39
39
|
value: string;
|
|
@@ -10,7 +10,7 @@ export declare class BlurToken extends Token {
|
|
|
10
10
|
value: BlurTokenValue;
|
|
11
11
|
blurLayers: Array<BlurToken>;
|
|
12
12
|
isVirtual: boolean;
|
|
13
|
-
tokenType: TokenType;
|
|
13
|
+
tokenType: TokenType.blur;
|
|
14
14
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: BlurTokenValue, alias: BlurToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
15
15
|
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: BlurToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): BlurToken;
|
|
16
16
|
static blurValueFromDefinition(definition: object, referenceResolver: DTTokenReferenceResolver): BlurTokenValue;
|
|
@@ -10,7 +10,7 @@ import { Token } from "./SDKToken";
|
|
|
10
10
|
import { BorderTokenValue } from "./SDKTokenValue";
|
|
11
11
|
export declare class BorderToken extends Token {
|
|
12
12
|
value: BorderTokenValue;
|
|
13
|
-
tokenType: TokenType;
|
|
13
|
+
tokenType: TokenType.border;
|
|
14
14
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: BorderTokenValue, alias: BorderToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
15
15
|
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: BorderToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): BorderToken;
|
|
16
16
|
static borderValueFromDefinition(definition: object, referenceResolver: DTTokenReferenceResolver): BorderTokenValue;
|
|
@@ -8,7 +8,7 @@ import { Token } from "./SDKToken";
|
|
|
8
8
|
import { ColorTokenValue } from "./SDKTokenValue";
|
|
9
9
|
export declare class ColorToken extends Token {
|
|
10
10
|
value: ColorTokenValue;
|
|
11
|
-
tokenType: TokenType;
|
|
11
|
+
tokenType: TokenType.color;
|
|
12
12
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: ColorTokenValue, alias: ColorToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
13
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: ColorToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): ColorToken;
|
|
14
14
|
static colorValueFromDefinition(definition: string): ColorTokenValue;
|
|
@@ -7,11 +7,14 @@ import { DimensionTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteT
|
|
|
7
7
|
import { AnyDimensionTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
8
8
|
import { Token } from "./SDKToken";
|
|
9
9
|
import { AnyDimensionTokenValue, BorderWidthTokenValue, DimensionTokenValue, DurationTokenValue, FontSizeTokenValue, LetterSpacingTokenValue, LineHeightTokenValue, OpacityTokenValue, ParagraphSpacingTokenValue, RadiusTokenValue, SizeTokenValue, SpaceTokenValue, ZIndexTokenValue } from "./SDKTokenValue";
|
|
10
|
+
import { TokenClassTypeMapToken } from "../../utils/TokenUtils";
|
|
10
11
|
export declare class DimensionCategoryToken<T extends AnyDimensionTokenValue> extends Token {
|
|
11
12
|
value: T;
|
|
12
13
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: T, alias: DimensionCategoryToken<T> | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
14
|
static create<TValue extends AnyDimensionTokenValue, TToken extends DimensionCategoryToken<TValue>>(this: new (...args: any[]) => TToken, type: DimensionTokenType, versionId: string, brandId: string, name: string, description: string, value: string | number, alias: TToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TToken;
|
|
14
|
-
static
|
|
15
|
+
static getCompatibleUnit(unit: Unit, type: DimensionTokenType): Unit;
|
|
16
|
+
static getCompatibleMeasure(unit: Unit, type: DimensionTokenType, measure: number): number;
|
|
17
|
+
static getDefaultUnit(type: DimensionTokenType, parsedDefinition?: number): Unit.pixels | Unit.ms | Unit.raw;
|
|
15
18
|
static dimensionValueFromDefinition(definition: string | number, type: DimensionTokenType): OpacityTokenValue;
|
|
16
19
|
static parseDimension(definition: string, type: DimensionTokenType): {
|
|
17
20
|
measure: number;
|
|
@@ -29,42 +32,66 @@ export declare class DimensionCategoryToken<T extends AnyDimensionTokenValue> ex
|
|
|
29
32
|
static valueToInternalWriteObject(value: AnyDimensionTokenValue | null): AnyDimensionTokenValue | null;
|
|
30
33
|
}
|
|
31
34
|
export declare class DimensionToken extends DimensionCategoryToken<DimensionTokenValue> {
|
|
32
|
-
tokenType: TokenType;
|
|
35
|
+
tokenType: TokenType.dimension;
|
|
33
36
|
}
|
|
34
37
|
export declare class SizeToken extends DimensionCategoryToken<SizeTokenValue> {
|
|
35
|
-
tokenType: TokenType;
|
|
38
|
+
tokenType: TokenType.size;
|
|
36
39
|
}
|
|
37
40
|
export declare class SpaceToken extends DimensionCategoryToken<SpaceTokenValue> {
|
|
38
|
-
tokenType: TokenType;
|
|
41
|
+
tokenType: TokenType.space;
|
|
39
42
|
}
|
|
40
43
|
export declare class OpacityToken extends DimensionCategoryToken<OpacityTokenValue> {
|
|
41
|
-
tokenType: TokenType;
|
|
44
|
+
tokenType: TokenType.opacity;
|
|
42
45
|
}
|
|
43
46
|
export declare class FontSizeToken extends DimensionCategoryToken<FontSizeTokenValue> {
|
|
44
|
-
tokenType: TokenType;
|
|
47
|
+
tokenType: TokenType.fontSize;
|
|
45
48
|
}
|
|
46
49
|
export declare class LineHeightToken extends DimensionCategoryToken<LineHeightTokenValue> {
|
|
47
|
-
tokenType: TokenType;
|
|
50
|
+
tokenType: TokenType.lineHeight;
|
|
48
51
|
}
|
|
49
52
|
export declare class LetterSpacingToken extends DimensionCategoryToken<LetterSpacingTokenValue> {
|
|
50
|
-
tokenType: TokenType;
|
|
53
|
+
tokenType: TokenType.letterSpacing;
|
|
51
54
|
}
|
|
52
55
|
export declare class ParagraphSpacingToken extends DimensionCategoryToken<ParagraphSpacingTokenValue> {
|
|
53
|
-
tokenType: TokenType;
|
|
56
|
+
tokenType: TokenType.paragraphSpacing;
|
|
54
57
|
}
|
|
55
58
|
export declare class BorderWidthToken extends DimensionCategoryToken<BorderWidthTokenValue> {
|
|
56
|
-
tokenType: TokenType;
|
|
59
|
+
tokenType: TokenType.borderWidth;
|
|
57
60
|
}
|
|
58
61
|
export declare class RadiusToken extends DimensionCategoryToken<RadiusTokenValue> {
|
|
59
|
-
tokenType: TokenType;
|
|
62
|
+
tokenType: TokenType.radius;
|
|
60
63
|
}
|
|
61
64
|
export declare class DurationToken extends DimensionCategoryToken<DurationTokenValue> {
|
|
62
|
-
tokenType: TokenType;
|
|
65
|
+
tokenType: TokenType.duration;
|
|
63
66
|
}
|
|
64
67
|
export declare class ZIndexToken extends DimensionCategoryToken<ZIndexTokenValue> {
|
|
65
|
-
tokenType: TokenType;
|
|
68
|
+
tokenType: TokenType.zIndex;
|
|
66
69
|
}
|
|
67
70
|
export type AnyDimensionToken = DimensionToken | SizeToken | SpaceToken | OpacityToken | FontSizeToken | LineHeightToken | LetterSpacingToken | ParagraphSpacingToken | BorderWidthToken | RadiusToken | DurationToken | ZIndexToken;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
export declare const resolveDimension: <TK extends TokenType.dimension | TokenType.size | TokenType.space | TokenType.opacity | TokenType.fontSize | TokenType.lineHeight | TokenType.letterSpacing | TokenType.paragraphSpacing | TokenType.borderWidth | TokenType.radius | TokenType.duration | TokenType.zIndex>(type: TK) => {
|
|
72
|
+
Color: typeof import("./SDKColorToken").ColorToken;
|
|
73
|
+
Typography: typeof import("./SDKTypographyToken").TypographyToken;
|
|
74
|
+
Blur: typeof import("./SDKBlurToken").BlurToken;
|
|
75
|
+
Border: typeof import("./SDKBorderToken").BorderToken;
|
|
76
|
+
Shadow: typeof import("./SDKShadowToken").ShadowToken;
|
|
77
|
+
Gradient: typeof import("./SDKGradientToken").GradientToken;
|
|
78
|
+
String: typeof import("./SDKStringToken").StringToken;
|
|
79
|
+
ProductCopy: typeof import("./SDKStringToken").ProductCopyToken;
|
|
80
|
+
FontFamily: typeof import("./SDKStringToken").FontFamilyToken;
|
|
81
|
+
FontWeight: typeof import("./SDKStringToken").FontWeightToken;
|
|
82
|
+
TextCase: typeof import("./SDKTextCaseToken").TextCaseToken;
|
|
83
|
+
TextDecoration: typeof import("./SDKTextDecorationToken").TextDecorationToken;
|
|
84
|
+
Visibility: typeof import("./SDKVisibilityToken").VisibilityToken;
|
|
85
|
+
BorderWidth: typeof BorderWidthToken;
|
|
86
|
+
Dimension: typeof DimensionToken;
|
|
87
|
+
Size: typeof SizeToken;
|
|
88
|
+
Space: typeof SpaceToken;
|
|
89
|
+
Opacity: typeof OpacityToken;
|
|
90
|
+
FontSize: typeof FontSizeToken;
|
|
91
|
+
LineHeight: typeof LineHeightToken;
|
|
92
|
+
LetterSpacing: typeof LetterSpacingToken;
|
|
93
|
+
ParagraphSpacing: typeof ParagraphSpacingToken;
|
|
94
|
+
BorderRadius: typeof RadiusToken;
|
|
95
|
+
Duration: typeof DurationToken;
|
|
96
|
+
ZIndex: typeof ZIndexToken;
|
|
97
|
+
}[TK];
|
|
@@ -11,7 +11,7 @@ export declare class GradientToken extends Token {
|
|
|
11
11
|
value: GradientTokenValue[];
|
|
12
12
|
gradientLayers: Array<GradientToken>;
|
|
13
13
|
isVirtual: boolean;
|
|
14
|
-
tokenType: TokenType;
|
|
14
|
+
tokenType: TokenType.gradient;
|
|
15
15
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: GradientTokenValue[], alias: GradientToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
16
16
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: GradientToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): GradientToken;
|
|
17
17
|
static gradientValueFromDefinition(definition: object | string, referenceResolver: DTTokenReferenceResolver): GradientTokenValue[];
|
|
@@ -11,7 +11,7 @@ export declare class ShadowToken extends Token {
|
|
|
11
11
|
value: Array<ShadowTokenValue>;
|
|
12
12
|
shadowLayers: Array<ShadowToken>;
|
|
13
13
|
isVirtual: boolean;
|
|
14
|
-
tokenType: TokenType;
|
|
14
|
+
tokenType: TokenType.shadow;
|
|
15
15
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: ShadowTokenValue[], alias: ShadowToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
16
16
|
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: ShadowToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): ShadowToken;
|
|
17
17
|
static shadowValueFromDefinition(definition: object, referenceResolver: DTTokenReferenceResolver): ShadowTokenValue[];
|
|
@@ -6,6 +6,7 @@ import { StringTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
|
6
6
|
import { Token } from "./SDKToken";
|
|
7
7
|
import { AnyStringTokenValue, FontFamilyTokenValue, FontWeightTokenValue, ProductCopyTokenValue, StringTokenValue } from "./SDKTokenValue";
|
|
8
8
|
import { DTTokenReferenceResolver } from "../../tools/design-tokens/utilities/SDKDTTokenReferenceResolver";
|
|
9
|
+
import { TokenClassTypeMapToken } from "../../utils/TokenUtils";
|
|
9
10
|
export declare class StringCategoryToken<T extends AnyStringTokenValue> extends Token {
|
|
10
11
|
value: T;
|
|
11
12
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: T, alias: StringCategoryToken<T> | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
@@ -19,18 +20,42 @@ export declare class StringCategoryToken<T extends AnyStringTokenValue> extends
|
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
export declare class StringToken extends StringCategoryToken<StringTokenValue> {
|
|
22
|
-
tokenType: TokenType;
|
|
23
|
+
tokenType: TokenType.string;
|
|
23
24
|
}
|
|
24
25
|
export declare class ProductCopyToken extends StringCategoryToken<ProductCopyTokenValue> {
|
|
25
|
-
tokenType: TokenType;
|
|
26
|
+
tokenType: TokenType.productCopy;
|
|
26
27
|
}
|
|
27
28
|
export declare class FontFamilyToken extends StringCategoryToken<FontFamilyTokenValue> {
|
|
28
|
-
tokenType: TokenType;
|
|
29
|
+
tokenType: TokenType.fontFamily;
|
|
29
30
|
}
|
|
30
31
|
export declare class FontWeightToken extends StringCategoryToken<FontWeightTokenValue> {
|
|
31
|
-
tokenType: TokenType;
|
|
32
|
+
tokenType: TokenType.fontWeight;
|
|
32
33
|
}
|
|
33
34
|
export type AnyStringToken = StringToken | ProductCopyToken | FontFamilyToken | FontWeightToken;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
export declare const resolveString: <TK extends TokenType.string | TokenType.productCopy | TokenType.fontFamily | TokenType.fontWeight>(type: TK) => {
|
|
36
|
+
Color: typeof import("./SDKColorToken").ColorToken;
|
|
37
|
+
Typography: typeof import("./SDKTypographyToken").TypographyToken;
|
|
38
|
+
Blur: typeof import("./SDKBlurToken").BlurToken;
|
|
39
|
+
Border: typeof import("./SDKBorderToken").BorderToken;
|
|
40
|
+
Shadow: typeof import("./SDKShadowToken").ShadowToken;
|
|
41
|
+
Gradient: typeof import("./SDKGradientToken").GradientToken;
|
|
42
|
+
String: typeof StringToken;
|
|
43
|
+
ProductCopy: typeof ProductCopyToken;
|
|
44
|
+
FontFamily: typeof FontFamilyToken;
|
|
45
|
+
FontWeight: typeof FontWeightToken;
|
|
46
|
+
TextCase: typeof import("./SDKTextCaseToken").TextCaseToken;
|
|
47
|
+
TextDecoration: typeof import("./SDKTextDecorationToken").TextDecorationToken;
|
|
48
|
+
Visibility: typeof import("./SDKVisibilityToken").VisibilityToken;
|
|
49
|
+
BorderWidth: typeof import("./SDKDimensionToken").BorderWidthToken;
|
|
50
|
+
Dimension: typeof import("./SDKDimensionToken").DimensionToken;
|
|
51
|
+
Size: typeof import("./SDKDimensionToken").SizeToken;
|
|
52
|
+
Space: typeof import("./SDKDimensionToken").SpaceToken;
|
|
53
|
+
Opacity: typeof import("./SDKDimensionToken").OpacityToken;
|
|
54
|
+
FontSize: typeof import("./SDKDimensionToken").FontSizeToken;
|
|
55
|
+
LineHeight: typeof import("./SDKDimensionToken").LineHeightToken;
|
|
56
|
+
LetterSpacing: typeof import("./SDKDimensionToken").LetterSpacingToken;
|
|
57
|
+
ParagraphSpacing: typeof import("./SDKDimensionToken").ParagraphSpacingToken;
|
|
58
|
+
BorderRadius: typeof import("./SDKDimensionToken").RadiusToken;
|
|
59
|
+
Duration: typeof import("./SDKDimensionToken").DurationToken;
|
|
60
|
+
ZIndex: typeof import("./SDKDimensionToken").ZIndexToken;
|
|
61
|
+
}[TK];
|
|
@@ -8,7 +8,7 @@ import { Token } from "./SDKToken";
|
|
|
8
8
|
import { TextCaseTokenValue } from "./SDKTokenValue";
|
|
9
9
|
export declare class TextCaseToken extends Token {
|
|
10
10
|
value: TextCaseTokenValue;
|
|
11
|
-
tokenType: TokenType;
|
|
11
|
+
tokenType: TokenType.textCase;
|
|
12
12
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: TextCaseTokenValue, alias: TextCaseToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
13
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: TextCaseToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TextCaseToken;
|
|
14
14
|
static textCaseFromDefinition(textCase: string): {
|
|
@@ -9,7 +9,7 @@ import { Token } from "./SDKToken";
|
|
|
9
9
|
import { AnyOptionTokenValue, TextDecorationTokenValue } from "./SDKTokenValue";
|
|
10
10
|
export declare class TextDecorationToken extends Token {
|
|
11
11
|
value: TextDecorationTokenValue;
|
|
12
|
-
tokenType: TokenType;
|
|
12
|
+
tokenType: TokenType.textDecoration;
|
|
13
13
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: TextDecorationTokenValue, alias: TextDecorationToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
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): {
|
|
@@ -20,7 +20,9 @@ export declare class Token implements TokenValue {
|
|
|
20
20
|
parentGroupId: string;
|
|
21
21
|
sortOrder: number;
|
|
22
22
|
properties: Array<ElementProperty>;
|
|
23
|
-
propertyValues:
|
|
23
|
+
propertyValues: {
|
|
24
|
+
[key: string]: string | boolean | number;
|
|
25
|
+
};
|
|
24
26
|
createdAt: Date | null;
|
|
25
27
|
updatedAt: Date | null;
|
|
26
28
|
constructor(model: TokenRemoteModel, versionId: string, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>, empty?: boolean);
|
|
@@ -187,6 +187,7 @@ export type AnyTokenValue = ColorTokenValue | AnyStringTokenValue | TypographyTo
|
|
|
187
187
|
export type AnyToken = ColorToken | AnyStringToken | TypographyToken | ShadowToken | AnyDimensionToken | BorderToken | GradientToken | BlurToken | AnyOptionToken;
|
|
188
188
|
export type AnySingleLayerToken = Exclude<AnyToken, ShadowToken | GradientToken>;
|
|
189
189
|
export type AnyMultiLayerToken = ShadowToken | GradientToken;
|
|
190
|
+
export type AnyMultiLayerTokenValue = ShadowTokenValue | GradientTokenValue;
|
|
190
191
|
export type AnyPlainTokenValue = Exclude<AnyTokenValue, ShadowTokenValue[] | GradientTokenValue[]> | ShadowTokenValue | GradientTokenValue;
|
|
191
192
|
export type RawValue<T extends {
|
|
192
193
|
referencedTokenId: string;
|
|
@@ -8,7 +8,7 @@ import { Token } from "./SDKToken";
|
|
|
8
8
|
import { TypographyTokenValue } from "./SDKTokenValue";
|
|
9
9
|
export declare class TypographyToken extends Token {
|
|
10
10
|
value: TypographyTokenValue;
|
|
11
|
-
tokenType: TokenType;
|
|
11
|
+
tokenType: TokenType.typography;
|
|
12
12
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: TypographyTokenValue, alias: TypographyToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
13
|
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: TypographyToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TypographyToken;
|
|
14
14
|
static typographyValueFromDefinition(definition: any, referenceResolver: DTTokenReferenceResolver): TypographyTokenValue;
|
|
@@ -7,7 +7,7 @@ import { Token } from "./SDKToken";
|
|
|
7
7
|
import { VisibilityTokenValue } from "./SDKTokenValue";
|
|
8
8
|
export declare class VisibilityToken extends Token {
|
|
9
9
|
value: VisibilityTokenValue;
|
|
10
|
-
tokenType: TokenType;
|
|
10
|
+
tokenType: TokenType.visibility;
|
|
11
11
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: VisibilityTokenValue, alias: VisibilityToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
12
12
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: VisibilityToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): VisibilityToken;
|
|
13
13
|
toWriteObject(): TextCaseTokenRemoteModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|