@supernova-studio/supernova-sdk-beta 1.6.13 → 1.6.15
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/SDKAreaComponents.d.ts +114 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaPipelines.d.ts +3 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaTokenValues.d.ts +3 -7
- 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 +51 -6
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +3 -1
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +24 -6
- package/build/sdk-typescript/src/core/resolvers/SDKDocumentationItemResolver.d.ts +3 -2
- package/build/sdk-typescript/src/exports.d.ts +8 -2
- package/build/sdk-typescript/src/model/components/SDKComponent.d.ts +3 -1
- 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/elements/SDKElementPropertyOption.d.ts +5 -0
- package/build/sdk-typescript/src/model/enums/SDKDocumentationEnvironment.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +2 -2
- package/build/sdk-typescript/src/model/groups/SDKComponentGroup.d.ts +1 -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 +4 -1
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +51 -17
- 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 +2 -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/token-preview/TokenUtilPreviewSegmentGenerator.d.ts +3 -1
- package/build/sdk-typescript/src/utils/ComponentUtils.d.ts +12 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +181 -1
- package/build/supernova-sdk-typescript.js +66300 -2
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +4 -3
|
@@ -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 | number;
|
|
15
15
|
}>;
|
|
16
16
|
propertyValuesToDelete?: Array<string>;
|
|
17
17
|
themesToUpdate?: Array<TokenTheme>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Component } from "../../model/components/SDKComponent";
|
|
2
2
|
import { DesignComponent } from "../../model/components/SDKDesignComponent";
|
|
3
3
|
import { ElementDataView } from "../../model/elements/SDKElementDataView";
|
|
4
|
-
import {
|
|
4
|
+
import { ElementDataViewColumn } from "../../model/elements/SDKElementDataViewColumn";
|
|
5
|
+
import { ElementProperty, ElementPropertyCreationModel, ElementPropertyUpdateModel } from "../../model/elements/SDKElementProperty";
|
|
6
|
+
import { ElementPropertyValue } from "../../model/elements/values/SDKElementPropertyValue";
|
|
5
7
|
import { ComponentGroup } from "../../model/groups/SDKComponentGroup";
|
|
6
8
|
import { DesignComponentGroup } from "../../model/groups/SDKDesignComponentGroup";
|
|
7
9
|
import { DataCore } from "../data/SDKDataCore";
|
|
@@ -30,14 +32,124 @@ export declare class AreaComponents {
|
|
|
30
32
|
* @returns All design component groups in the specified version
|
|
31
33
|
*/
|
|
32
34
|
getDesignComponentGroups(from: RemoteVersionIdentifier): Promise<Array<DesignComponentGroup>>;
|
|
33
|
-
/** Retrieves all remote properties for
|
|
35
|
+
/** Retrieves all remote properties for components
|
|
34
36
|
* @param from - Remote version to fetch from
|
|
35
37
|
* @returns All component properties in the specified version
|
|
36
38
|
*/
|
|
37
39
|
getComponentProperties(from: RemoteVersionIdentifier): Promise<Array<ElementProperty>>;
|
|
40
|
+
/** Retrieves all remote property definitions for components
|
|
41
|
+
* @param from - Remote version to fetch from
|
|
42
|
+
* @returns All property definitions in the specified version
|
|
43
|
+
*/
|
|
44
|
+
getComponentPropertyValues(from: RemoteVersionIdentifier): Promise<Array<ElementPropertyValue>>;
|
|
38
45
|
/** Retrieves all remote property views for components
|
|
39
46
|
* @param from - Remote version to fetch from
|
|
40
47
|
* @returns All component views in the specified version
|
|
41
48
|
*/
|
|
42
49
|
getComponentDataViews(from: RemoteVersionIdentifier): Promise<Array<ElementDataView>>;
|
|
50
|
+
/** Creates remote component. This method can only be used once per component and will assign persistent id to the component. Calling this version on component that already has id assigned will result in error
|
|
51
|
+
* @param to - Remote version to write to
|
|
52
|
+
* @param component - Component to create
|
|
53
|
+
* @param parentId - Id of the group to add the component to. This is id of the group, not the versioned id
|
|
54
|
+
* @returns New remote component ids
|
|
55
|
+
*/
|
|
56
|
+
createComponent(to: RemoteVersionIdentifier, component: Component, parentId: string): Promise<{
|
|
57
|
+
id: string;
|
|
58
|
+
idInVersion: string;
|
|
59
|
+
}>;
|
|
60
|
+
/** Creates local component. This component doesn't have id associated with it on remote, and must be created once with `createComponent` to be stored in design system
|
|
61
|
+
* @returns New component filled with default values not associated with remote (yet)
|
|
62
|
+
*/
|
|
63
|
+
createLocalComponent(versionId: string, brandId: string): Component;
|
|
64
|
+
/** Creates remote component group. This method can only be used once per group and will assign persistent id to the group. Calling this version on group that already has id assigned will result in error
|
|
65
|
+
* @param to - Remote version to write to
|
|
66
|
+
* @param group - Group to create
|
|
67
|
+
* @param parentId - Id of the group to add the group to. This is id of the group, not the versioned id
|
|
68
|
+
* @returns New remote component group ids
|
|
69
|
+
*/
|
|
70
|
+
createComponentGroup(to: RemoteVersionIdentifier, group: ComponentGroup, parentId: string): Promise<{
|
|
71
|
+
id: string;
|
|
72
|
+
idInVersion: string;
|
|
73
|
+
}>;
|
|
74
|
+
/** Creates local component group. This group doesn't have id associated with it on remote, and must be created once with `createComponentGroup` to be stored in design system
|
|
75
|
+
* @param versionId - Id of the version to create the group in
|
|
76
|
+
* @param brandId - Id of the brand to create the group in
|
|
77
|
+
* @returns New group with id assigned
|
|
78
|
+
*/
|
|
79
|
+
createLocalComponentGroup(versionId: string, brandId: string): ComponentGroup;
|
|
80
|
+
/** Updates remote component. This method can only be used on components that already exist in the version
|
|
81
|
+
* @param to - Remote version to write to
|
|
82
|
+
* @param component - Component to update
|
|
83
|
+
* @returns Nothing
|
|
84
|
+
*/
|
|
85
|
+
updateComponent(to: RemoteVersionIdentifier, component: Component): Promise<void>;
|
|
86
|
+
/** Updates remote component groups. This method can only be used on component groups that already exist in the version
|
|
87
|
+
* @param to - Remote version to write to
|
|
88
|
+
* @param component - Component group to update
|
|
89
|
+
* @returns Nothing
|
|
90
|
+
*/
|
|
91
|
+
updateComponentGroup(to: RemoteVersionIdentifier, group: ComponentGroup): Promise<void>;
|
|
92
|
+
/** Updates remote component property value. This also creates the property value if it doesn't exist
|
|
93
|
+
* @param to - Remote version to write to
|
|
94
|
+
* @param newValue - Value to set - this can be multiple things, from ID to raw string value to others
|
|
95
|
+
* @param forComponent - Component to assign the value to
|
|
96
|
+
* @param forProperty - Property to assign the value to
|
|
97
|
+
*/
|
|
98
|
+
updateComponentPropertyValue(to: RemoteVersionIdentifier, newValue: string, forComponent: Component, forProperty: ElementProperty): Promise<void>;
|
|
99
|
+
/** Deletes remote component property value
|
|
100
|
+
* @param to - Remote version to write to
|
|
101
|
+
* @param valueId - Value identifier
|
|
102
|
+
*/
|
|
103
|
+
deleteComponentPropertyValue(to: RemoteVersionIdentifier, valueId: string): Promise<void>;
|
|
104
|
+
/** Create component property
|
|
105
|
+
* @param to - Remote version to write to
|
|
106
|
+
* @param model - Property creation model to create the property from
|
|
107
|
+
*/
|
|
108
|
+
createComponentProperty(to: RemoteVersionIdentifier, model: ElementPropertyCreationModel): Promise<{
|
|
109
|
+
id: string;
|
|
110
|
+
idInVersion: string;
|
|
111
|
+
}>;
|
|
112
|
+
/** Update component property
|
|
113
|
+
* @param to - Remote version to write to
|
|
114
|
+
* @param propertyIdInVersion - Remote element property to update
|
|
115
|
+
* @param model - Property update model to apply to property
|
|
116
|
+
*/
|
|
117
|
+
updateComponentProperty(to: RemoteVersionIdentifier, propertyIdInVersion: string, model: ElementPropertyUpdateModel): Promise<void>;
|
|
118
|
+
/** Delete component property. This will remove all values associated with the property
|
|
119
|
+
* @param to - Remote version to write to
|
|
120
|
+
* @param propertyIdInVersion - Id of the property to delete
|
|
121
|
+
*/
|
|
122
|
+
deleteComponentProperty(to: RemoteVersionIdentifier, propertyIdInVersion: string): Promise<void>;
|
|
123
|
+
/** Resize specific component column
|
|
124
|
+
* @param to - Remote version to write to
|
|
125
|
+
* @param columnIdInVersion - Id of the column to update
|
|
126
|
+
* @param newWidth - New width of the column
|
|
127
|
+
*/
|
|
128
|
+
updateResizeComponentColumn(to: RemoteVersionIdentifier, view: ElementDataView, column: ElementDataViewColumn, newWidth: number): Promise<void>;
|
|
129
|
+
/** Move column to a new index and reorder all other columns around it
|
|
130
|
+
* @param to - Remote version to write to
|
|
131
|
+
* @param colum - Column object to move
|
|
132
|
+
* @param newIndex - New index to move the component to
|
|
133
|
+
*/
|
|
134
|
+
updateReorderComponentColumn(to: RemoteVersionIdentifier, view: ElementDataView, column: ElementDataViewColumn, newIndex: number): Promise<void>;
|
|
135
|
+
/** Deletes remote component. Calling this method on component that doesn't exist in the version will result in error
|
|
136
|
+
* @param to - Remote version to write to
|
|
137
|
+
* @param componentIdInVersion - Component idInVersion to delete
|
|
138
|
+
* @returns Nothing
|
|
139
|
+
*/
|
|
140
|
+
deleteComponent(to: RemoteVersionIdentifier, componentIdInVersion: string): Promise<void>;
|
|
141
|
+
/** Deletes remote component group. This method will also fix the component 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
|
|
142
|
+
* @param to - Remote version to write to
|
|
143
|
+
* @param componentGroupIdInVersion - Component group idInVersion to delete
|
|
144
|
+
* @returns Nothing
|
|
145
|
+
*/
|
|
146
|
+
ungroupComponentGroup(to: RemoteVersionIdentifier, componentGroupIdInVersion: string): Promise<void>;
|
|
147
|
+
/** Deletes remote component group and all its descendants. All items (groups and components) underneath will be deleted. Calling this method on group that doesn't exist in the version will result in error
|
|
148
|
+
* @param to - Remote version to write to
|
|
149
|
+
* @param componentGroupToDelete - Component group to delete
|
|
150
|
+
* @param allComponents - Components for lookup
|
|
151
|
+
* @param allComponentGroup - Component group for lookup
|
|
152
|
+
* @returns Nothing
|
|
153
|
+
*/
|
|
154
|
+
deleteComponentGroup(to: RemoteVersionIdentifier, componentGroupToDelete: ComponentGroup, components: Array<Component>, componentGroups: Array<ComponentGroup>): Promise<void>;
|
|
43
155
|
}
|
|
@@ -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;
|
|
@@ -32,6 +32,8 @@ export declare class AreaTokenValues {
|
|
|
32
32
|
typographyTokenByUpdatingParagraphIndent(token: TypographyToken, newValue: RawValue<ParagraphSpacingTokenValue> | ParagraphSpacingToken): TypographyToken;
|
|
33
33
|
/** Creates a new border token with updated .position value */
|
|
34
34
|
typographyTokenByUpdatingTextDecoration(token: TypographyToken, newValue: RawValue<TextDecorationTokenValue> | TextDecorationToken): TypographyToken;
|
|
35
|
+
/** Creates a new typography token with updated .textCase value */
|
|
36
|
+
typographyTokenByUpdatingTextCase(token: TypographyToken, newValue: RawValue<TextCaseTokenValue> | TextCaseToken): TypographyToken;
|
|
35
37
|
/** Creates a new border token with updated .color value. Do note, opacity is ignored */
|
|
36
38
|
borderTokenByUpdatingColor(token: BorderToken, newValue: ColorValue | ColorToken): BorderToken;
|
|
37
39
|
/** Creates a new border token with updated color.opacity value */
|
|
@@ -117,12 +119,10 @@ export declare class AreaTokenValues {
|
|
|
117
119
|
position: number;
|
|
118
120
|
color: ColorTokenValue | ColorToken;
|
|
119
121
|
}>): GradientToken;
|
|
120
|
-
/** Builds the gradient stop data from the elementary values */
|
|
121
|
-
private gradientStopsFromRawData;
|
|
122
122
|
/** Creates a new token where value is reference to the provided token. Token and reference must be of the same type */
|
|
123
123
|
tokenByReferencing<T extends AnyToken>(token: T, reference: T): T;
|
|
124
124
|
/** Creates a new multilayer token where one of the layers is reference to the provided token. Token and reference must be of the same type */
|
|
125
|
-
multilayerTokenByReferencing<T extends AnyMultiLayerToken>(token: T, layerIndex: number, reference:
|
|
125
|
+
multilayerTokenByReferencing<T extends AnyMultiLayerToken, R extends T>(token: T, layerIndex: number, reference: R): T;
|
|
126
126
|
/** Creates a new token where value is raw, but taken from the previously referenced token. Token must have had reference before */
|
|
127
127
|
tokenByDisconnectingReference<T extends AnySingleLayerToken>(token: T): T;
|
|
128
128
|
/** Creates a new multilayer token where one of the layers value is raw, but taken from the previously referenced token. That layer must have had reference before */
|
|
@@ -133,8 +133,4 @@ export declare class AreaTokenValues {
|
|
|
133
133
|
isReferencedMultilayerTokenLayer(token: AnyMultiLayerToken, layerIndex: number): boolean;
|
|
134
134
|
/** Checks if a token was imported from some foreign source. Not imported tokens were always created in Supernova */
|
|
135
135
|
isTokenImported(token: AnyToken): boolean;
|
|
136
|
-
private checkNotReference;
|
|
137
|
-
private rawOrReferencedDimensionValue;
|
|
138
|
-
private rawOrReferencedStringValue;
|
|
139
|
-
private validateLayerAccess;
|
|
140
136
|
}
|
|
@@ -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";
|
|
@@ -71,7 +72,7 @@ export declare class DataCore {
|
|
|
71
72
|
elementPropertyValues(designSystemId: string, versionId: string): Promise<Array<ElementPropertyValue>>;
|
|
72
73
|
/** Download all necessary data for element views and retrieve them resolved */
|
|
73
74
|
elementViews(designSystemId: string, versionId: string, type: ElementPropertyTargetElementType): Promise<Array<ElementDataView>>;
|
|
74
|
-
/** Download all
|
|
75
|
+
/** Download all necessary data for tokens and retrieve them resolved */
|
|
75
76
|
tokens(designSystemId: string, versionId: string, filter?: {
|
|
76
77
|
type?: TokenType;
|
|
77
78
|
brandId?: string;
|
|
@@ -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 | number, 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 */
|
|
@@ -142,6 +146,45 @@ export declare class DataCore {
|
|
|
142
146
|
componentGroups(designSystemId: string, versionId: string): Promise<Array<ComponentGroup>>;
|
|
143
147
|
designComponents(designSystemId: string, versionId: string): Promise<Array<DesignComponent>>;
|
|
144
148
|
designComponentGroups(designSystemId: string, versionId: string): Promise<Array<DesignComponentGroup>>;
|
|
149
|
+
/** Write new component to remote */
|
|
150
|
+
createComponent(designSystemId: string, versionId: string, component: Component, parentId: string): Promise<{
|
|
151
|
+
id: string;
|
|
152
|
+
idInVersion: string;
|
|
153
|
+
}>;
|
|
154
|
+
/** Update existing component in remote */
|
|
155
|
+
updateComponent(designSystemId: string, versionId: string, component: Component): Promise<void>;
|
|
156
|
+
/** Write new component group to remote */
|
|
157
|
+
createComponentGroup(designSystemId: string, versionId: string, group: ComponentGroup, parentId: string): Promise<{
|
|
158
|
+
id: string;
|
|
159
|
+
idInVersion: string;
|
|
160
|
+
}>;
|
|
161
|
+
/** Update existing component group in remote */
|
|
162
|
+
updateComponentGroup(designSystemId: string, versionId: string, group: ComponentGroup): Promise<void>;
|
|
163
|
+
/** Update component property at remote */
|
|
164
|
+
updateComponentPropertyValue(designSystemId: string, versionId: string, newValue: string | boolean, component: Component, property: ElementProperty): Promise<void>;
|
|
165
|
+
/** Delete component property in remote */
|
|
166
|
+
deleteComponentPropertyValue(designSystemId: string, versionId: string, valueId: string): Promise<void>;
|
|
167
|
+
/** Create a custom property in remote */
|
|
168
|
+
createComponentProperty(designSystemId: string, versionId: string, model: ElementPropertyCreationModel): Promise<{
|
|
169
|
+
id: string;
|
|
170
|
+
idInVersion: string;
|
|
171
|
+
}>;
|
|
172
|
+
/** Create a custom property in remote */
|
|
173
|
+
updateComponentProperty(designSystemId: string, versionId: string, propertyIdInVersion: string, model: ElementPropertyUpdateModel): Promise<void>;
|
|
174
|
+
/** Delete a custom property in remote */
|
|
175
|
+
deleteComponentProperty(designSystemId: string, versionId: string, propertyId: string): Promise<void>;
|
|
176
|
+
/** Move column to a new index and reorder all other columns around it */
|
|
177
|
+
updateReorderComponentColumn(designSystemId: string, versionId: string, view: ElementDataView, column: ElementDataViewColumn, newIndex: number): Promise<void>;
|
|
178
|
+
/** Update column size */
|
|
179
|
+
updateResizeComponentColumn(designSystemId: string, versionId: string, view: ElementDataView, column: ElementDataViewColumn, newWidth: number): Promise<void>;
|
|
180
|
+
/** Delete component from remote */
|
|
181
|
+
deleteComponent(designSystemId: string, versionId: string, componentId: string): Promise<void>;
|
|
182
|
+
/** Delete group from remote */
|
|
183
|
+
ungroupComponentGroup(designSystemId: string, versionId: string, groupId: string): Promise<void>;
|
|
184
|
+
/** Delete group from remote */
|
|
185
|
+
deleteComponentGroup(designSystemId: string, versionId: string, componentGroupToDelete: ComponentGroup, components: Array<Component>, componentGroups: Array<ComponentGroup>): Promise<void>;
|
|
186
|
+
/** Write the component to remote */
|
|
187
|
+
writeComponentData(designSystemId: string, versionId: string, components: Array<Component>, groups: Array<ComponentGroup>, deleteComponents: Array<Component>, deleteGroups: Array<ComponentGroup>): Promise<void>;
|
|
145
188
|
/** Download all necessary data for assets and retrieve them resolved */
|
|
146
189
|
assets(designSystemId: string, versionId: string): Promise<Array<Asset>>;
|
|
147
190
|
/** Download all necessary data for asset groups and retrieve them resolved */
|
|
@@ -155,7 +198,7 @@ export declare class DataCore {
|
|
|
155
198
|
/** Retrieve currently deployed documentation url */
|
|
156
199
|
documentationDomain(designSystemId: string, versionId: string): Promise<string | null>;
|
|
157
200
|
/** Publish the documentation */
|
|
158
|
-
documentationPublish(workspaceId: string, designSystemId: string, versionId: string): Promise<{
|
|
201
|
+
documentationPublish(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment): Promise<{
|
|
159
202
|
status: "Queued" | "InProgress" | "Failure";
|
|
160
203
|
jobId: string;
|
|
161
204
|
exporterId: string;
|
|
@@ -176,7 +219,7 @@ export declare class DataCore {
|
|
|
176
219
|
/** Download information about all installed exporter and retrieve it resolved */
|
|
177
220
|
exporters(workspaceId: string): Promise<Array<Exporter>>;
|
|
178
221
|
/** Download information about documentation builds and retrieve it resolved */
|
|
179
|
-
documentationBuilds(workspaceId: string, designSystemId: string, versionId: string, limit?: number): Promise<Array<{
|
|
222
|
+
documentationBuilds(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment, limit?: number): Promise<Array<{
|
|
180
223
|
status: "InProgress" | "Success" | "Failed";
|
|
181
224
|
id: string | null;
|
|
182
225
|
exporterId: string | null;
|
|
@@ -213,4 +256,6 @@ export declare class DataCore {
|
|
|
213
256
|
getBrand(designSystemId: string, versionId: string, brandId: string): Promise<Brand>;
|
|
214
257
|
getOAuthURL(service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<string>;
|
|
215
258
|
bulkUpdateTokenData(designSystemId: string, versionId: string, data: TokenUpdateTransactionData): Promise<any>;
|
|
259
|
+
getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
|
|
260
|
+
writeTokenStudioData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
|
|
216
261
|
}
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
|
|
1
2
|
import { ElementDataViewColumnType } from "../../../exports";
|
|
3
|
+
import { Component, ComponentRemoteModel } from "../../../model/components/SDKComponent";
|
|
2
4
|
import { ElementPropertyRemoteModel } from "../../../model/elements/SDKElementProperty";
|
|
3
|
-
import {
|
|
5
|
+
import { ComponentGroup, ComponentGroupRemoteModel } from "../../../model/groups/SDKComponentGroup";
|
|
6
|
+
import { TokenGroup, TokenGroupRemoteModel } from "../../../model/groups/SDKTokenGroup";
|
|
4
7
|
import { TokenThemeRemoteModel } from "../../../model/themes/SDKTokenTheme";
|
|
5
8
|
import { TokenRemoteModel } from "../../../model/tokens/remote/SDKRemoteTokenModel";
|
|
6
9
|
import { Token } from "../../../model/tokens/SDKToken";
|
|
@@ -47,7 +50,7 @@ export declare class DataCoreWriteRequests {
|
|
|
47
50
|
deleteRemoteWorkspaceAvatar(workspaceId: string): Promise<void>;
|
|
48
51
|
/** Remote: Deletes a workspace NPM settings */
|
|
49
52
|
deleteRemoteWorkspaceNPMRegistrySettings(workspaceId: string): Promise<void>;
|
|
50
|
-
publishDocumentation(workspaceId: string, designSystemId: string, versionId: string): Promise<{
|
|
53
|
+
publishDocumentation(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment): Promise<{
|
|
51
54
|
status: "Queued" | "InProgress" | "Failure";
|
|
52
55
|
jobId: string;
|
|
53
56
|
exporterId: string;
|
|
@@ -57,17 +60,32 @@ export declare class DataCoreWriteRequests {
|
|
|
57
60
|
createRemoteTokenGroup(designSystemId: string, versionId: string, group: TokenGroupRemoteModel): Promise<TokenGroupRemoteModel>;
|
|
58
61
|
updateRemoteTokenGroup(designSystemId: string, versionId: string, group: TokenGroupRemoteModel): Promise<void>;
|
|
59
62
|
deleteRemoteToken(designSystemId: string, versionId: string, tokenId: string): Promise<void>;
|
|
60
|
-
|
|
63
|
+
ungroupRemoteTokenGroup(designSystemId: string, versionId: string, tokenGroupId: string): Promise<void>;
|
|
61
64
|
createRemoteTokenTheme(designSystemId: string, versionId: string, theme: TokenThemeRemoteModel): Promise<TokenThemeRemoteModel>;
|
|
62
65
|
updateRemoteTokenTheme(designSystemId: string, versionId: string, group: TokenThemeRemoteModel): Promise<void>;
|
|
63
66
|
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>;
|
|
67
|
+
writeTokenData(designSystemId: string, versionId: string, tokens: Array<TokenRemoteModel>, groups: Array<TokenGroupRemoteModel>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>): Promise<void>;
|
|
65
68
|
writeTokenThemeData(designSystemId: string, versionId: string, theme: TokenThemeRemoteModel): Promise<void>;
|
|
66
|
-
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string, tokenId: string, propertyId: string): Promise<void>;
|
|
69
|
+
updateTokenPropertyValue(designSystemId: string, versionId: string, newValue: string | boolean | number, tokenId: string, propertyId: string): Promise<void>;
|
|
67
70
|
deleteTokenPropertyValue(designSystemId: string, versionId: string, valueId: string): Promise<void>;
|
|
68
71
|
createTokenProperty(designSystemId: string, versionId: string, model: object): Promise<ElementPropertyRemoteModel>;
|
|
69
72
|
updateTokenProperty(designSystemId: string, versionId: string, propertyIdInVersion: string, model: object): Promise<void>;
|
|
70
73
|
deleteTokenProperty(designSystemId: string, versionId: string, propertyId: string): Promise<void>;
|
|
71
74
|
updateReorderTokenColumn(designSystemId: string, versionId: string, viewId: string, columnId: string, newIndex: number): Promise<void>;
|
|
72
|
-
updateResizeTokenColumn(designSystemId: string, versionId: string, viewId: string, columnType: ElementDataViewColumnType, columnId: string, columnThemeId: string | undefined, columnBasePropertyType: string | undefined, newWidth: number): Promise<void>;
|
|
75
|
+
updateResizeTokenColumn(designSystemId: string, versionId: string, viewId: string, columnType: ElementDataViewColumnType, columnId: string, columnThemeId: string | undefined, columnBasePropertyType: string | undefined, columnPropertyDefinitionId: string | undefined, newWidth: number): Promise<void>;
|
|
76
|
+
createRemoteComponent(designSystemId: string, versionId: string, component: ComponentRemoteModel): Promise<ComponentRemoteModel>;
|
|
77
|
+
updateRemoteComponent(designSystemId: string, versionId: string, component: ComponentRemoteModel): Promise<ComponentRemoteModel>;
|
|
78
|
+
createRemoteComponentGroup(designSystemId: string, versionId: string, group: ComponentGroupRemoteModel): Promise<ComponentGroupRemoteModel>;
|
|
79
|
+
updateRemoteComponentGroup(designSystemId: string, versionId: string, group: ComponentGroupRemoteModel): Promise<void>;
|
|
80
|
+
deleteRemoteComponent(designSystemId: string, versionId: string, componentId: string): Promise<void>;
|
|
81
|
+
ungroupRemoteComponentGroup(designSystemId: string, versionId: string, componentGroupId: string): Promise<void>;
|
|
82
|
+
writeComponentData(designSystemId: string, versionId: string, components: Array<ComponentRemoteModel>, groups: Array<ComponentGroupRemoteModel>, deleteComponents: Array<Component>, deleteComponentGroups: Array<ComponentGroup>): Promise<void>;
|
|
83
|
+
updateComponentPropertyValue(designSystemId: string, versionId: string, newValue: string | boolean, componentId: string, propertyId: string): Promise<void>;
|
|
84
|
+
deleteComponentPropertyValue(designSystemId: string, versionId: string, valueId: string): Promise<void>;
|
|
85
|
+
createComponentProperty(designSystemId: string, versionId: string, model: object): Promise<ElementPropertyRemoteModel>;
|
|
86
|
+
updateComponentProperty(designSystemId: string, versionId: string, propertyIdInVersion: string, model: object): Promise<void>;
|
|
87
|
+
deleteComponentProperty(designSystemId: string, versionId: string, propertyId: string): Promise<void>;
|
|
88
|
+
updateReorderComponentColumn(designSystemId: string, versionId: string, viewId: string, columnId: string, newIndex: number): Promise<void>;
|
|
89
|
+
updateResizeComponentColumn(designSystemId: string, versionId: string, viewId: string, columnType: ElementDataViewColumnType, columnId: string, columnThemeId: string | undefined, columnBasePropertyType: string | undefined, columnPropertyDefinitionId: string | undefined, newWidth: number): Promise<void>;
|
|
90
|
+
writeTokenStudioJSONData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
|
|
73
91
|
}
|
|
@@ -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,4 +1,9 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ThemeUtilities } from "./model/themes/SDKThemeUtilities";
|
|
2
|
+
export { ElementPropertyValue } from "./model/elements/values/SDKElementPropertyValue";
|
|
3
|
+
export { TokenUtilPreviewSegmentGenerator } from "./tools/token-preview/TokenUtilPreviewSegmentGenerator";
|
|
4
|
+
export { TokenTypeMapToken } from "./utils/TokenUtils";
|
|
5
|
+
export { TokenUtils } from "./utils/TokenUtils";
|
|
6
|
+
export { DimensionTokenType, DIMENSION_TOKEN_TYPES, StringTokenType, STRING_TOKEN_TYPES, OptionTokenType, OPTION_TOKEN_TYPES, } from "./model/enums/SDKTokenType";
|
|
2
7
|
export { Supernova } from "./core/SDKSupernova";
|
|
3
8
|
export { Workspace } from "./model/workspaces/SDKWorkspace";
|
|
4
9
|
export { WorkspaceProfile, WorkspaceProfileUpdateModel, } from "./model/workspaces/SDKWorkspaceProfile";
|
|
@@ -27,7 +32,7 @@ export { Asset } from "./model/assets/SDKAsset";
|
|
|
27
32
|
export { RenderedAsset } from "./model/assets/SDKRenderedAsset";
|
|
28
33
|
export { Component } from "./model/components/SDKComponent";
|
|
29
34
|
export { ElementProperty, ElementPropertyLinkElementType, ElementPropertyTargetElementType, ElementPropertyType, } from "./model/elements/SDKElementProperty";
|
|
30
|
-
export { ElementPropertyOption } from "./model/elements/SDKElementPropertyOption";
|
|
35
|
+
export { ElementPropertyOption, ElementPropertyOptionBadgeColor, } from "./model/elements/SDKElementPropertyOption";
|
|
31
36
|
export { ElementDataView } from "./model/elements/SDKElementDataView";
|
|
32
37
|
export { ElementDataViewColumn, ElementDataViewColumnBasePropertyType, ElementDataViewColumnType, } from "./model/elements/SDKElementDataViewColumn";
|
|
33
38
|
export { DesignComponent } from "./model/components/SDKDesignComponent";
|
|
@@ -141,3 +146,4 @@ export { TokenTransform } from "./tools/token-transform/SDKToolsTokenTransform";
|
|
|
141
146
|
export { UnreachableCaseError } from "./utils/UnreachableCaseError";
|
|
142
147
|
export { SupernovaError, SupernovaFieldValidationError, } from "./core/errors/SDKSupernovaError";
|
|
143
148
|
export { RemoteVersionIdentifier, RemoteBrandIdentifier, RemoteWorkspaceVersionIdentifier, } from "./core/areas/SDKRemoteIdentifiers";
|
|
149
|
+
export { TokenUtilPreviewReferenceInfo, TokenUtilPreviewReferenceInfoPiece, } from "./tools/token-preview/TokenUtilPreviewTypes";
|
|
@@ -11,10 +11,11 @@ export type ComponentRemoteModel = {
|
|
|
11
11
|
};
|
|
12
12
|
createdAt?: string;
|
|
13
13
|
updatedAt?: string;
|
|
14
|
+
groupPersistentId?: string;
|
|
14
15
|
};
|
|
15
16
|
export declare class Component {
|
|
17
|
+
idInVersion: string;
|
|
16
18
|
id: string;
|
|
17
|
-
persistentId: string;
|
|
18
19
|
designSystemVersionId: string;
|
|
19
20
|
brandId: string;
|
|
20
21
|
name: string;
|
|
@@ -24,4 +25,5 @@ export declare class Component {
|
|
|
24
25
|
createdAt: Date | null;
|
|
25
26
|
updatedAt: Date | null;
|
|
26
27
|
constructor(model: ComponentRemoteModel, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
28
|
+
toWriteObject(): ComponentRemoteModel;
|
|
27
29
|
}
|
|
@@ -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 */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type ElementPropertyOptionBadgeColor = "blue" | "cyan" | "fuchsia" | "green" | "grey" | "light-grey" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "custom";
|
|
1
2
|
export type ElementPropertyOptionRemoteModel = {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
@@ -14,4 +15,8 @@ export declare class ElementPropertyOption {
|
|
|
14
15
|
constructor(model: ElementPropertyOptionRemoteModel);
|
|
15
16
|
/** Constructs directly manipulable update object for user profile */
|
|
16
17
|
toUpdateObject(): ElementPropertyOptionUpdateModel;
|
|
18
|
+
/** Returns background color represented as badge color. If badge color is different than what badge defines as base, return custom. Note: Only temporary implementation until BE supports it properly */
|
|
19
|
+
asBadgeColor(): ElementPropertyOptionBadgeColor;
|
|
20
|
+
/** Sets background color based on badge identifier color. Note: Only temporary implementation until BE supports it properly */
|
|
21
|
+
setFromBadgeColor(color: ElementPropertyOptionBadgeColor): void;
|
|
17
22
|
}
|
|
@@ -34,10 +34,10 @@ export type DimensionTokenType = (typeof DIMENSION_TOKEN_TYPES)[number];
|
|
|
34
34
|
export declare const RAW_DIMENSION_TOKEN_TYPES: TokenType[];
|
|
35
35
|
export declare const MS_DIMENSION_TOKEN_TYPES: TokenType[];
|
|
36
36
|
export declare const ALL_TOKEN_TYPES: TokenType[];
|
|
37
|
-
export declare const PURE_TOKEN_TYPES: readonly [TokenType.
|
|
37
|
+
export declare const PURE_TOKEN_TYPES: readonly [TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.string, TokenType.productCopy, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
|
|
38
38
|
export type PureTokenType = (typeof PURE_TOKEN_TYPES)[number];
|
|
39
39
|
export type NonPureTokenType = Exclude<TokenType, PureTokenType>;
|
|
40
|
-
export declare const tokenTypeIsPure: (tokenType: TokenType) => tokenType is TokenType.
|
|
40
|
+
export declare const tokenTypeIsPure: (tokenType: TokenType) => tokenType is TokenType.dimension | TokenType.size | TokenType.space | TokenType.opacity | TokenType.fontSize | TokenType.lineHeight | TokenType.letterSpacing | TokenType.paragraphSpacing | TokenType.borderWidth | TokenType.radius | TokenType.duration | TokenType.zIndex | TokenType.string | TokenType.productCopy | TokenType.fontFamily | TokenType.fontWeight | TokenType.textCase | TokenType.textDecoration | TokenType.visibility;
|
|
41
41
|
export declare const tokenTypeIsNonPure: (tokenType: TokenType) => tokenType is NonPureTokenType;
|
|
42
42
|
export declare const REPLACABLE_TOKEN_TYPES: readonly [TokenType.color, TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.string, TokenType.productCopy, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
|
|
43
43
|
export type ReplacableTokenType = (typeof REPLACABLE_TOKEN_TYPES)[number];
|
|
@@ -33,7 +33,7 @@ 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
|
} | {
|
|
@@ -42,14 +42,14 @@ export declare class TokenTheme {
|
|
|
42
42
|
} | {
|
|
43
43
|
aliasTo: string;
|
|
44
44
|
value: import("../tokens/remote/SDKRemoteTokenValue").ColorTokenRemoteValue;
|
|
45
|
-
} |
|
|
45
|
+
} | {
|
|
46
46
|
aliasTo: string;
|
|
47
47
|
value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
|
|
48
|
-
} | import("../tokens/remote/SDKRemoteTokenData").ShadowTokenRemoteData | {
|
|
49
|
-
aliasTo: string;
|
|
50
|
-
value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
|
|
51
48
|
} | {
|
|
52
49
|
aliasTo: string;
|
|
53
50
|
value: string;
|
|
51
|
+
} | {
|
|
52
|
+
aliasTo: string;
|
|
53
|
+
value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
|
|
54
54
|
};
|
|
55
55
|
}
|