@supernova-studio/supernova-sdk-beta 1.6.29 → 1.6.31
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/SDKSupernova.d.ts +3 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +24 -0
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +12 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +6 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +8 -0
- package/build/sdk-typescript/src/exports-pulsar.d.ts +1 -1
- package/build/sdk-typescript/src/exports.d.ts +12 -1
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockDefinition.d.ts +4 -4
- package/build/sdk-typescript/src/model/docs/blocks/definition/{SDKDocsBlockItem.d.ts → SDKDocsBlockItemDefinition.d.ts} +3 -3
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockVariant.d.ts +3 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/assets/SDKDocsBlockActualAssets.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code/SDKDocsBlockActualCode.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code-react/SDKDocsBlockActualCodeReact.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist/SDKDocsBlockActualComponentChecklist.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist-all/SDKDocsBlockActualComponentChecklistAll.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-health/SDKDocsBlockActualComponentHealth.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/figma-frames/SDKDocsBlockActualFigmaFrames.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/link/SDKDocsBlockActualLink.d.ts +8 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-multi-item/SDKDocsBlockActualOmniMultiItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-single-item/SDKDocsBlockActualOmniSingleItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/release-notes/SDKDocsBlockActualReleaseNotes.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +7 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +4 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +6 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +2 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +5 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +14 -0
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlock.d.ts +13 -19
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlockItem.d.ts +21 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockAssetPropertyPreviewContainerSize.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyAspectRatio.d.ts +4 -2
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyWidth.d.ts +2 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +2 -0
- package/build/sdk-typescript/src/model/enums/SDKSourceType.d.ts +2 -1
- package/build/sdk-typescript/src/model/resources/SDKResource.d.ts +26 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceAsset.d.ts +6 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceFont.d.ts +15 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +10 -0
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +10 -4
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +1 -0
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +29 -6
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +118 -118
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum ResourceType {
|
|
2
|
+
asset = "Asset",
|
|
3
|
+
font = "Font"
|
|
4
|
+
}
|
|
5
|
+
export type ResourceModel = {
|
|
6
|
+
id: string;
|
|
7
|
+
persistentId: string;
|
|
8
|
+
url: string;
|
|
9
|
+
originalName?: string;
|
|
10
|
+
scope: "DesignSystem" | "Documentation";
|
|
11
|
+
};
|
|
12
|
+
export declare class Resource {
|
|
13
|
+
/** Unique identifier of the resource */
|
|
14
|
+
id: string;
|
|
15
|
+
/** Unique identifier of the resource in the version */
|
|
16
|
+
idInVersion: string;
|
|
17
|
+
/** URL of the resource */
|
|
18
|
+
url: string;
|
|
19
|
+
/** Original filename of the resource */
|
|
20
|
+
originalName: string | null;
|
|
21
|
+
/** Scope of the resource */
|
|
22
|
+
scope: "DesignSystem" | "Documentation";
|
|
23
|
+
/** Type of the resource */
|
|
24
|
+
type: ResourceType;
|
|
25
|
+
constructor(model: ResourceModel);
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Resource, ResourceModel, ResourceType } from "./SDKResource";
|
|
2
|
+
export type ResourceFontModel = ResourceModel & {
|
|
3
|
+
fontProperties?: {
|
|
4
|
+
family?: string;
|
|
5
|
+
subfamily?: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare class ResourceFont extends Resource {
|
|
9
|
+
type: ResourceType;
|
|
10
|
+
fontProperties: {
|
|
11
|
+
family: string | null;
|
|
12
|
+
subfamily: string | null;
|
|
13
|
+
} | null;
|
|
14
|
+
constructor(model: ResourceFontModel);
|
|
15
|
+
}
|
|
@@ -12,6 +12,7 @@ export type SourceRemoteModel = {
|
|
|
12
12
|
};
|
|
13
13
|
cloud?: SourceRemoteModelCloud;
|
|
14
14
|
tokenStudio?: SourceRemoteModelTokensStudio;
|
|
15
|
+
figmaVariablesPlugin?: SourceRemoteModelFigmaVariablesPlugin;
|
|
15
16
|
scope: SourceScope;
|
|
16
17
|
};
|
|
17
18
|
export type SourceScope = {
|
|
@@ -96,6 +97,10 @@ export type SourceRemoteModelTokensStudio = {
|
|
|
96
97
|
themeId?: string;
|
|
97
98
|
}>;
|
|
98
99
|
};
|
|
100
|
+
export type SourceRemoteModelFigmaVariablesPlugin = {
|
|
101
|
+
fileId: string;
|
|
102
|
+
lastImportedAt?: string;
|
|
103
|
+
};
|
|
99
104
|
export type SourceModelTokenStudio = Omit<SourceRemoteModelTokensStudio, "lastUpdatesCheckedAt" | "lastImportedAt"> & {
|
|
100
105
|
lastUpdatesCheckedAt?: Date;
|
|
101
106
|
lastImportedAt?: Date;
|
|
@@ -104,6 +109,9 @@ export type SourceModelCloud = Omit<SourceRemoteModelCloud, "lastUpdatesCheckedA
|
|
|
104
109
|
lastUpdatesCheckedAt?: Date;
|
|
105
110
|
lastImportedAt?: Date;
|
|
106
111
|
};
|
|
112
|
+
export type SourceModelFigmaVariablesPlugin = Omit<SourceRemoteModelFigmaVariablesPlugin, "lastImportedAt"> & {
|
|
113
|
+
lastImportedAt?: Date;
|
|
114
|
+
};
|
|
107
115
|
export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "linkType" | "brandId" | "scope"> & {
|
|
108
116
|
cloud?: SourceRemoteModelCloud | null;
|
|
109
117
|
};
|
|
@@ -115,7 +123,9 @@ export declare class Source {
|
|
|
115
123
|
brandId: string | null;
|
|
116
124
|
cloud: SourceModelCloud | null;
|
|
117
125
|
tokenStudio?: SourceModelTokenStudio | null;
|
|
126
|
+
figmaVariablesPlugin?: SourceModelFigmaVariablesPlugin | null;
|
|
118
127
|
scope: SourceScope;
|
|
128
|
+
get lastImportedAt(): Date | null;
|
|
119
129
|
get hasError(): boolean;
|
|
120
130
|
get hasWarning(): boolean;
|
|
121
131
|
get isCloudAvailable(): boolean;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
+
export type UserOnboardingDepartmentType = "Design" | "Engineering" | "Brand" | "Other";
|
|
2
|
+
export type UserOnboardingJobLevelType = "Executive" | "Manager" | "IndividualContributor" | "Other";
|
|
1
3
|
export type UserProfileRemoteModel = {
|
|
2
4
|
name?: string;
|
|
3
5
|
nickname?: string;
|
|
4
6
|
avatar?: string;
|
|
5
7
|
onboarding?: UserProfileOnboardingRemoteModel;
|
|
8
|
+
isOnboardingFinished?: boolean;
|
|
6
9
|
};
|
|
7
10
|
export type UserProfileOnboardingRemoteModel = {
|
|
8
11
|
companyName?: string;
|
|
9
12
|
numberOfPeopleInOrg?: string;
|
|
10
13
|
numberOfPeopleInDesignTeam?: string;
|
|
11
|
-
department?:
|
|
14
|
+
department?: UserOnboardingDepartmentType;
|
|
12
15
|
jobTitle?: string;
|
|
13
16
|
phase?: string;
|
|
14
|
-
jobLevel?:
|
|
17
|
+
jobLevel?: UserOnboardingJobLevelType;
|
|
15
18
|
};
|
|
16
19
|
export type UserProfileTransportModel = UserProfileRemoteModel;
|
|
17
20
|
export type UserProfileOnboardingUpdateModel = UserProfileOnboardingRemoteModel;
|
|
18
21
|
export type UserProfileUpdateModel = {
|
|
19
22
|
name?: string;
|
|
20
23
|
nickname?: string;
|
|
24
|
+
onboarding?: UserProfileOnboardingRemoteModel;
|
|
21
25
|
};
|
|
22
26
|
export declare class UserProfile {
|
|
23
27
|
/** User name */
|
|
@@ -26,15 +30,17 @@ export declare class UserProfile {
|
|
|
26
30
|
nickname: string | null;
|
|
27
31
|
/** Avatar */
|
|
28
32
|
avatar: string | null;
|
|
33
|
+
/** Is profile onboarding finished */
|
|
34
|
+
isOnboardingFinished: boolean;
|
|
29
35
|
/** Onboarding object */
|
|
30
36
|
onboarding: {
|
|
31
37
|
companyName: string | null;
|
|
32
38
|
numberOfPeopleInOrg: string | null;
|
|
33
39
|
numberOfPeopleInDesignTeam: string | null;
|
|
34
|
-
department:
|
|
40
|
+
department: UserOnboardingDepartmentType | null;
|
|
35
41
|
jobTitle: string | null;
|
|
36
42
|
phase: string | null;
|
|
37
|
-
jobLevel:
|
|
43
|
+
jobLevel: UserOnboardingJobLevelType | null;
|
|
38
44
|
} | null;
|
|
39
45
|
constructor(model: UserProfileRemoteModel);
|
|
40
46
|
/** Constructs directly manipulable update object for user profile */
|
|
@@ -17,6 +17,7 @@ export declare class DTJSONConverter {
|
|
|
17
17
|
referenceResolver: DTTokenReferenceResolver;
|
|
18
18
|
constructor(versionId: string, mapping: DTPluginToSupernovaMapPack);
|
|
19
19
|
convertNodesToTokens(nodes: Array<DTParsedNode>, brand: Brand): Array<DTProcessedTokenNode>;
|
|
20
|
+
private restoreInitialTokenOrder;
|
|
20
21
|
private remapRootNodeKey;
|
|
21
22
|
private remapRootNodeKeys;
|
|
22
23
|
private convertNodesToTokensForSupportedNodeTypes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
2
|
-
import {
|
|
2
|
+
import { DocsBlockItemDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockItemDefinition";
|
|
3
3
|
import { DocsBlockLayout } from "../../model/docs/blocks/definition/SDKDocsBlockLayout";
|
|
4
4
|
import { DocsBlockOnboarding } from "../../model/docs/blocks/definition/SDKDocsBlockOnboarding";
|
|
5
5
|
import { DocsBlockVariant } from "../../model/docs/blocks/definition/SDKDocsBlockVariant";
|
|
@@ -25,6 +25,7 @@ import { DocsBlockTextPropertyDefinition, DocsBlockTextPropertyOptions } from ".
|
|
|
25
25
|
import { DocsBlockTokenPropertyDefinition, DocsBlockTokenPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenProperty";
|
|
26
26
|
import { DocsBlockTokenPropertyPropertyDefinition, DocsBlockTokenPropertyPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenPropertyProperty";
|
|
27
27
|
import { DocsBlockTokenTypePropertyDefinition, DocsBlockTokenTypePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockTokenTypeProperty";
|
|
28
|
+
import { DocsBlockUrlPropertyDefinition, DocsBlockUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockUrlProperty";
|
|
28
29
|
import { DocsBlockBehaviorDataType } from "../../model/enums/SDKDocsBlockBehaviorDataType";
|
|
29
30
|
import { DocsBlockBehaviorSelectionType } from "../../model/enums/SDKDocsBlockBehaviorSelectionType";
|
|
30
31
|
import { DocsBlockCategory } from "../../model/enums/SDKDocsBlockCategory";
|
|
@@ -48,6 +49,7 @@ export declare class DocsBlockBuilder {
|
|
|
48
49
|
name: string;
|
|
49
50
|
image: string;
|
|
50
51
|
layout: DocsBlockLayout;
|
|
52
|
+
description?: string;
|
|
51
53
|
maxColumns?: number;
|
|
52
54
|
}): DocsBlockVariant;
|
|
53
55
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
@@ -56,12 +58,23 @@ export declare class DocsBlockBuilder {
|
|
|
56
58
|
name: string;
|
|
57
59
|
image: string;
|
|
58
60
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
61
|
+
description?: string;
|
|
59
62
|
maxColumns?: number;
|
|
63
|
+
appearance?: {
|
|
64
|
+
isBordered?: boolean;
|
|
65
|
+
hasBackground?: boolean;
|
|
66
|
+
isEditorPresentationDifferent?: boolean;
|
|
67
|
+
};
|
|
60
68
|
}): DocsBlockVariant;
|
|
61
69
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
62
70
|
defaultVariantUsingDefaultLayout(options: {
|
|
63
71
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
64
72
|
maxColumns?: number;
|
|
73
|
+
appearance?: {
|
|
74
|
+
isBordered?: boolean;
|
|
75
|
+
hasBackground?: boolean;
|
|
76
|
+
isEditorPresentationDifferent?: boolean;
|
|
77
|
+
};
|
|
65
78
|
}): DocsBlockVariant;
|
|
66
79
|
/** Create block item with a single variant of rendering */
|
|
67
80
|
singleVariantItem(configuration: {
|
|
@@ -71,7 +84,7 @@ export declare class DocsBlockBuilder {
|
|
|
71
84
|
isBordered?: boolean;
|
|
72
85
|
hasBackground?: boolean;
|
|
73
86
|
};
|
|
74
|
-
}):
|
|
87
|
+
}): DocsBlockItemDefinition;
|
|
75
88
|
/** Create block item with multiple variants of rendering. The first variant becomes the default one */
|
|
76
89
|
multiVariantItem(configuration: {
|
|
77
90
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
@@ -80,7 +93,7 @@ export declare class DocsBlockBuilder {
|
|
|
80
93
|
isBordered?: boolean;
|
|
81
94
|
hasBackground?: boolean;
|
|
82
95
|
};
|
|
83
|
-
}):
|
|
96
|
+
}): DocsBlockItemDefinition;
|
|
84
97
|
/** Creates a core block definition which can't select from Supernova data, and its item can only be created once (Examples: Rich Text, Callout, Heading blocks) */
|
|
85
98
|
singleItemBlock(configuration: {
|
|
86
99
|
id: string;
|
|
@@ -88,7 +101,7 @@ export declare class DocsBlockBuilder {
|
|
|
88
101
|
category: DocsBlockCategory;
|
|
89
102
|
icon: string;
|
|
90
103
|
description?: string;
|
|
91
|
-
item:
|
|
104
|
+
item: DocsBlockItemDefinition;
|
|
92
105
|
linkable?: boolean;
|
|
93
106
|
isBordered?: boolean;
|
|
94
107
|
hasBackground?: boolean;
|
|
@@ -101,7 +114,7 @@ export declare class DocsBlockBuilder {
|
|
|
101
114
|
name: string;
|
|
102
115
|
category: DocsBlockCategory;
|
|
103
116
|
icon: string;
|
|
104
|
-
item:
|
|
117
|
+
item: DocsBlockItemDefinition;
|
|
105
118
|
maxItems?: number;
|
|
106
119
|
description?: string;
|
|
107
120
|
linkable?: boolean;
|
|
@@ -116,7 +129,7 @@ export declare class DocsBlockBuilder {
|
|
|
116
129
|
name: string;
|
|
117
130
|
icon: string;
|
|
118
131
|
category: DocsBlockCategory;
|
|
119
|
-
item:
|
|
132
|
+
item: DocsBlockItemDefinition;
|
|
120
133
|
dataType: Exclude<DocsBlockBehaviorDataType, DocsBlockBehaviorDataType.item>;
|
|
121
134
|
selectionType: DocsBlockBehaviorSelectionType;
|
|
122
135
|
maxSelection?: number;
|
|
@@ -292,6 +305,16 @@ export declare class DocsBlockBuilder {
|
|
|
292
305
|
[key: string]: DocsBlockMarkdownPropertyOptions;
|
|
293
306
|
};
|
|
294
307
|
}): DocsBlockMarkdownPropertyDefinition;
|
|
308
|
+
/** Create a block property with type .url and its specific options */
|
|
309
|
+
urlProperty(configuration: {
|
|
310
|
+
id: string;
|
|
311
|
+
name: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
options: DocsBlockUrlPropertyOptions;
|
|
314
|
+
variants?: {
|
|
315
|
+
[key: string]: DocsBlockUrlPropertyOptions;
|
|
316
|
+
};
|
|
317
|
+
}): DocsBlockUrlPropertyDefinition;
|
|
295
318
|
/** Create a block property with type .storybook and its specific options */
|
|
296
319
|
storybookProperty(configuration: {
|
|
297
320
|
id: string;
|
|
@@ -62,7 +62,7 @@ export declare class TokenJSONElementTransformer {
|
|
|
62
62
|
safeGroupName(group: TokenGroup): string;
|
|
63
63
|
processedName(name: string, naming: JSONBuilderNamingOption): string;
|
|
64
64
|
/** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
|
|
65
|
-
typeLabel(type: TokenType): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "
|
|
65
|
+
typeLabel(type: TokenType): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "visibility" | "shadow" | "measure" | "text";
|
|
66
66
|
/** Retrieve chain of groups up to a specified group, ordered from parent to children */
|
|
67
67
|
referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
|
|
68
68
|
}
|