@supernova-studio/supernova-sdk-beta 1.6.43 → 1.6.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/sdk-typescript/.eslintrc.d.cts +6 -6
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +1 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +5 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaMultiplayer.d.ts +1 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +5 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +30 -1
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +4 -0
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +30 -8
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +6 -2
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +9 -1
- package/build/sdk-typescript/src/exports.d.ts +2 -2
- package/build/sdk-typescript/src/model/base/SDKDesignSystemVersion.d.ts +45 -3
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +4 -1
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +2 -2
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +2 -2
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -27
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -27
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +4 -2
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIntegration.d.ts +50 -15
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIntegrationAccessToken.d.ts +12 -0
- package/build/sdk-typescript/src/tests/helpers.d.ts +2 -2
- package/build/sdk-typescript/src/tests/validators.d.ts +3 -3
- package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +3 -3
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +14 -2
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +6 -1
- 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 +112 -125
|
@@ -6,7 +6,7 @@ export declare const testVersionIdentifier: RemoteVersionIdentifier;
|
|
|
6
6
|
export declare const testWorkspaceVersionIdentifier: RemoteWorkspaceVersionIdentifier;
|
|
7
7
|
export declare const randomAlphabeticalOnlyIdentifier: (length: number) => string;
|
|
8
8
|
export declare const randomNumberInRange: (min: number, max: number) => number;
|
|
9
|
-
export declare const retryAssertAsync: (t: ExecutionContext<unknown>, assertFn: (ctx: ExecutionContext<unknown>) => Promise<any>, beforeFn?: (
|
|
10
|
-
export declare const testRetry: (title: string, fn: (ctx: ExecutionContext<unknown>) => Promise<any>, beforeFn?: (
|
|
9
|
+
export declare const retryAssertAsync: (t: ExecutionContext<unknown>, assertFn: (ctx: ExecutionContext<unknown>) => Promise<any>, beforeFn?: (ctx: ExecutionContext<unknown>) => Promise<any>, retriesLeft?: number, interval?: number) => Promise<any>;
|
|
10
|
+
export declare const testRetry: (title: string, fn: (ctx: ExecutionContext<unknown>) => Promise<any>, beforeFn?: (ctx: ExecutionContext<unknown>) => Promise<any>, attempts?: number, interval?: number) => Promise<void>;
|
|
11
11
|
export declare const testRetryBefore: (beforeFn: (ctx: ExecutionContext<unknown>) => Promise<any>) => (title: string, fn: (ctx: ExecutionContext<unknown>) => Promise<any>, attempts?: number, interval?: number) => Promise<void>;
|
|
12
12
|
export declare const testAva: import("ava").TestFn;
|
|
@@ -2,7 +2,7 @@ import { BorderPosition, ColorToken, ShadowType, TextCase, TextDecoration, Unit
|
|
|
2
2
|
import { BorderStyle } from "../model/enums/SDKBorderStyle";
|
|
3
3
|
import { StringTokenType } from "../model/enums/SDKTokenType";
|
|
4
4
|
import { Token } from "../model/tokens/SDKToken";
|
|
5
|
-
export declare const validateToken: (t: any, tokens: Token[], name: string, hex: string, opacity?: number) => void;
|
|
5
|
+
export declare const validateToken: (t: any, tokens: Token[], name: string, hex: string, opacity?: number, aliasName?: string) => void;
|
|
6
6
|
export declare const validateDimensionToken: (t: any, tokens: Token[], name: string, measure: number, unit: Unit) => void;
|
|
7
7
|
export declare const validateStringToken: (t: any, tokens: Token[], name: string, text: string, type: StringTokenType) => void;
|
|
8
8
|
export declare const validateOptionToken: (t: any, tokens: Token[], name: string, text: string) => void;
|
|
@@ -38,7 +38,7 @@ export declare const validateShadowTokenRef: (t: any, tokens: Token[], descripti
|
|
|
38
38
|
spread: number;
|
|
39
39
|
type: ShadowType;
|
|
40
40
|
}>) => void;
|
|
41
|
-
export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], description: string, layers: {
|
|
41
|
+
export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], description: string, layers: Array<{
|
|
42
42
|
refName: string;
|
|
43
43
|
layers: Array<{
|
|
44
44
|
hex: string;
|
|
@@ -48,7 +48,7 @@ export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], d
|
|
|
48
48
|
spread: number;
|
|
49
49
|
type: ShadowType;
|
|
50
50
|
}>;
|
|
51
|
-
}
|
|
51
|
+
}>) => void;
|
|
52
52
|
export declare const validateShadowTokenInnerRef: (t: any, tokens: Token[], name: string, value: {
|
|
53
53
|
hex: string;
|
|
54
54
|
x: number;
|
|
@@ -6,7 +6,7 @@ import { TokenTheme } from "../../model/themes/SDKTokenTheme";
|
|
|
6
6
|
import { Token } from "../../model/tokens/SDKToken";
|
|
7
7
|
import { AnyToken } from "../../model/tokens/SDKTokenValue";
|
|
8
8
|
import { DTProcessedTokenNode } from "./utilities/SDKDTJSONConverter";
|
|
9
|
-
import { DTPluginToSupernovaMap, DTPluginToSupernovaMapPack, DTPluginToSupernovaSettings } from "./utilities/SDKDTMapLoader";
|
|
9
|
+
import { DTPluginPreciseCopyStrategy, DTPluginThemeOverrideStrategy, DTPluginToSupernovaMap, DTPluginToSupernovaMapPack, DTPluginToSupernovaSettings } from "./utilities/SDKDTMapLoader";
|
|
10
10
|
import { DTTokenMergeDiff } from "./utilities/SDKDTTokenMerger";
|
|
11
11
|
export type SupernovaToolsDesignTokensLoadingResult = {
|
|
12
12
|
processedNodes: Array<DTProcessedTokenNode>;
|
|
@@ -40,13 +40,13 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
40
40
|
groups: Array<TokenGroup>;
|
|
41
41
|
};
|
|
42
42
|
/** Loads remote source connected to this tool, then merges tokens and groups with it, creating union. Can optionally write to the source as well */
|
|
43
|
-
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy:
|
|
43
|
+
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: DTPluginPreciseCopyStrategy): Promise<{
|
|
44
44
|
tokens: Array<Token>;
|
|
45
45
|
groups: Array<TokenGroup>;
|
|
46
46
|
diff: DTTokenMergeDiff;
|
|
47
47
|
}>;
|
|
48
48
|
/** Loads remote source connected to this tool, then creates the diff from the base tree and updates the associated theme. Can optionally write to the source as well */
|
|
49
|
-
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?:
|
|
49
|
+
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy): Promise<{
|
|
50
50
|
theme: TokenTheme;
|
|
51
51
|
tokens: Array<Token>;
|
|
52
52
|
}>;
|
|
@@ -6,6 +6,16 @@ export declare enum DTPluginToSupernovaMapType {
|
|
|
6
6
|
theme = "theme",
|
|
7
7
|
set = "set"
|
|
8
8
|
}
|
|
9
|
+
export declare enum DTPluginThemeOverrideStrategy {
|
|
10
|
+
default = "default",
|
|
11
|
+
aliasIsDifferent = "aliasIsDifferent"
|
|
12
|
+
}
|
|
13
|
+
export declare enum DTPluginPreciseCopyStrategy {
|
|
14
|
+
none = "none",// preciseCopy = false
|
|
15
|
+
deleteAll = "deleteAll",// preciseCopy = true
|
|
16
|
+
keepManualTokens = "keepManualTokens"
|
|
17
|
+
}
|
|
18
|
+
export declare const isPreciseCopyEnabled: (preciseCopy: DTPluginPreciseCopyStrategy) => boolean;
|
|
9
19
|
export type DTPluginToSupernovaMap = {
|
|
10
20
|
type: DTPluginToSupernovaMapType;
|
|
11
21
|
pluginSets: Array<string> | null;
|
|
@@ -29,11 +39,13 @@ export type DTPluginToSupernovaMappingFile = {
|
|
|
29
39
|
settings?: {
|
|
30
40
|
verbose?: boolean;
|
|
31
41
|
dryRun?: boolean;
|
|
32
|
-
preciseCopy?: boolean;
|
|
42
|
+
preciseCopy?: boolean | DTPluginPreciseCopyStrategy;
|
|
43
|
+
themeOverridesStrategy?: DTPluginThemeOverrideStrategy;
|
|
33
44
|
};
|
|
34
45
|
};
|
|
35
46
|
export type DTPluginToSupernovaSettings = {
|
|
36
47
|
verbose: boolean;
|
|
37
48
|
dryRun: boolean;
|
|
38
|
-
preciseCopy:
|
|
49
|
+
preciseCopy: DTPluginPreciseCopyStrategy;
|
|
50
|
+
themeOverridesStrategy: DTPluginThemeOverrideStrategy;
|
|
39
51
|
};
|
|
@@ -2,6 +2,7 @@ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
|
|
|
2
2
|
import { TokenTheme } from "../../../model/themes/SDKTokenTheme";
|
|
3
3
|
import { Token } from "../../../model/tokens/SDKToken";
|
|
4
4
|
import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
|
|
5
|
+
import { DTPluginPreciseCopyStrategy, DTPluginThemeOverrideStrategy } from "./SDKDTMapLoader";
|
|
5
6
|
export type DTThemeMergeDiff = {
|
|
6
7
|
toUpdate: Array<DTProcessedTokenNode>;
|
|
7
8
|
toCreate: Array<DTProcessedTokenNode>;
|
|
@@ -10,6 +11,10 @@ export type DTThemeMergeDiff = {
|
|
|
10
11
|
export declare class DTThemeMerger {
|
|
11
12
|
private versionId;
|
|
12
13
|
constructor(versionId: string);
|
|
13
|
-
makeTheme(upstreamTokens: Array<Token>, upstreamGroups: Array<TokenGroup>, upstreamTheme: TokenTheme, processedNodes: Array<DTProcessedTokenNode>, preciseCopy?:
|
|
14
|
+
makeTheme(upstreamTokens: Array<Token>, upstreamGroups: Array<TokenGroup>, upstreamTheme: TokenTheme, processedNodes: Array<DTProcessedTokenNode>, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy): TokenTheme;
|
|
14
15
|
inlineTokens(themeReplica: TokenTheme, tokensInThemeButNotInUpstream: Map<string, DTProcessedTokenNode>): void;
|
|
16
|
+
applyThemeOverrideStrategy(idsToRemap: Map<string, string>, themeOverridesStrategy: DTPluginThemeOverrideStrategy, token: Token, incomingThemeOverrideToken?: Token, currentThemeOverride?: Token): {
|
|
17
|
+
keepOverrideDueToAlias: boolean | "" | null;
|
|
18
|
+
incomingThemeDiffersFromUpstreamThemeAlias: boolean | "" | null;
|
|
19
|
+
};
|
|
15
20
|
}
|
|
@@ -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): "visibility" | "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "text" | "shadow" | "measure" | undefined;
|
|
66
66
|
/** Retrieve chain of groups up to a specified group, ordered from parent to children */
|
|
67
67
|
referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
|
|
68
68
|
}
|