@supernova-studio/supernova-sdk-beta 2.0.32 → 2.0.36

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.
Files changed (63) hide show
  1. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +10 -0
  2. package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +34 -0
  3. package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +7 -4
  4. package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +26 -7
  5. package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +19 -1
  6. package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +11 -8
  7. package/build/sdk-typescript/src/core/areas/SDKAreaImport.d.ts +16 -0
  8. package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +84 -0
  9. package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +6 -1
  10. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +52 -10
  11. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +15 -0
  12. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +19 -2
  13. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +416 -9
  14. package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +5 -0
  15. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +212 -0
  16. package/build/sdk-typescript/src/exports.d.ts +21 -2
  17. package/build/sdk-typescript/src/model/assets/SDKAsset.d.ts +24 -1
  18. package/build/sdk-typescript/src/model/base/SDKBrand.d.ts +1 -2
  19. package/build/sdk-typescript/src/model/base/SDKDesignSystemVersionStats.d.ts +11 -0
  20. package/build/sdk-typescript/src/model/components/SDKDesignComponent.d.ts +1 -0
  21. package/build/sdk-typescript/src/model/components/SDKDesignComponentVariant.d.ts +1 -0
  22. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntity.d.ts +6 -5
  23. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityApprovalState.d.ts +2 -2
  24. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityGroup.d.ts +8 -16
  25. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityPage.d.ts +10 -9
  26. package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +4 -0
  27. package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +1 -1
  28. package/build/sdk-typescript/src/model/exporters/SDKExporter.d.ts +15 -0
  29. package/build/sdk-typescript/src/model/exporters/SDKExporterJobDestination.d.ts +36 -0
  30. package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +3 -54
  31. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyBase.d.ts +11 -0
  32. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyBoolean.d.ts +7 -0
  33. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyDefinition.d.ts +6 -0
  34. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyEnum.d.ts +14 -0
  35. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyNumber.d.ts +7 -0
  36. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyObject.d.ts +12 -0
  37. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyString.d.ts +7 -0
  38. package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuildResults.d.ts +2 -2
  39. package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +4 -0
  40. package/build/sdk-typescript/src/model/groups/SDKDesignComponentGroup.d.ts +7 -0
  41. package/build/sdk-typescript/src/model/support/SDKDesignComponentOrigin.d.ts +15 -1
  42. package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +1 -0
  43. package/build/sdk-typescript/src/model/users/SDKUser.d.ts +5 -1
  44. package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +17 -0
  45. package/build/sdk-typescript/src/tests/helpers.d.ts +2 -5
  46. package/build/sdk-typescript/src/tests/validators.d.ts +24 -23
  47. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewSegmentGenerator.d.ts +26 -1
  48. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewTypes.d.ts +2 -0
  49. package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +2 -0
  50. package/build/sdk-typescript/src/utils/TokenUtils.d.ts +5 -0
  51. package/build/sdk-typescript/vitest.config-ci.d.ts +2 -0
  52. package/build/sdk-typescript/vitest.config-token-studio.d.ts +2 -0
  53. package/build/sdk-typescript/vitest.config.d.ts +2 -0
  54. package/build/supernova-sdk-typescript.js +1 -1
  55. package/build/supernova-sdk-typescript.js.map +1 -1
  56. package/package.json +3 -3
  57. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityMultiplayerItemResolver.d.ts +0 -7
  58. package/build/sdk-typescript/src/tests/Tooling/ReadTokens.spec.d.ts +0 -1
  59. package/build/sdk-typescript/src/tests/Tooling/TokensModel.spec.d.ts +0 -1
  60. package/build/sdk-typescript/src/tests/Tooling/ToolDocSearch.spec.d.ts +0 -1
  61. package/build/sdk-typescript/src/tests/Tooling/ToolMarkdownTransform.spec.d.ts +0 -1
  62. /package/build/sdk-typescript/src/tests/Areas/{AreaAssets.spec.d.ts → AreaImport.spec.d.ts} +0 -0
  63. /package/build/sdk-typescript/src/tests/Tooling/{PluginFigmaTokens.spec.d.ts → TokensModel.spec.token-studio.d.ts} +0 -0
@@ -1,66 +1,14 @@
1
1
  import { DTOPipeline } from "@supernova-studio/client";
2
2
  import { ExportBuild } from "./exporter_builds/SDKExportBuild";
3
- export type GithubDestinationPayload = {
4
- branch: string;
5
- relativePath: string;
6
- url: string;
7
- };
8
- export type AzureDestinationPayload = {
9
- organizationId: string;
10
- projectId: string;
11
- repositoryId: string;
12
- branch: string;
13
- relativePath: string;
14
- };
15
- export type BitbucketDestinationPayload = {
16
- workspaceSlug: string;
17
- projectKey: string;
18
- repoSlug: string;
19
- branch: string;
20
- relativePath: string;
21
- };
22
- export type GitlabDestinationPayload = {
23
- projectId: string;
24
- branch: string;
25
- relativePath: string;
26
- };
27
- export type DocumentationDestinationPayload = {
28
- environment: "Live" | "Preview";
29
- };
30
- export type GitObjectQuery = {
31
- organization?: string;
32
- project?: string;
33
- repository?: string;
34
- };
3
+ export type ExporterConfigurationProperties = Record<string, boolean | number | string | Array<string> | Record<string, string>>;
35
4
  export type NewPipelinePayloadDestination = "Github" | "Gitlab" | "Bitbucket" | "Azure" | "WebhookUrl" | "S3" | "Documentation";
36
- export type NewPipelinePayload = {
37
- brandPersistentId?: string;
38
- themePersistentIds?: string[];
39
- themePersistentId?: string;
40
- designSystemId: string;
41
- destinations: {
42
- azure: AzureDestinationPayload | null;
43
- bitbucket: BitbucketDestinationPayload | null;
44
- documentation: DocumentationDestinationPayload | null;
45
- github: GithubDestinationPayload | null;
46
- gitlab: GitlabDestinationPayload | null;
47
- s3: Record<string, any>;
48
- webhookUrl: null;
49
- };
50
- eventType: "OnHeadChanged" | "OnSourceUpdated" | "OnVersionReleased" | "None";
51
- exporterId: string;
52
- isEnabled: boolean;
53
- name: string;
54
- destination: NewPipelinePayloadDestination;
55
- gitQuery: GitObjectQuery;
56
- };
57
- export type PipelineUpdateModel = Omit<DTOPipeline, "latestJobs" | "workspaceId" | "designSystem">;
58
5
  export declare class Pipeline {
59
6
  id: string;
60
7
  workspaceId: string;
61
8
  designSystemId: string;
62
9
  name: string;
63
10
  isEnabled: boolean;
11
+ exporterConfigurationProperties?: ExporterConfigurationProperties;
64
12
  eventType: "OnVersionReleased" | "OnHeadChanged" | "OnSourceUpdated" | "None";
65
13
  exporterId: string;
66
14
  destinations: {
@@ -102,6 +50,7 @@ export declare class Pipeline {
102
50
  /** @deprecated Use themePersistentIds instead */
103
51
  themePersistentId?: string;
104
52
  latestJobs: Array<ExportBuild>;
53
+ isExporterDeprecated: boolean;
105
54
  constructor(data: DTOPipeline);
106
55
  get isBuildOnly(): boolean;
107
56
  get gitProviderType(): "github" | "bitbucket" | "gitlab" | "azure" | null;
@@ -0,0 +1,11 @@
1
+ import { DTOExporterPropertyDefinition } from "@supernova-studio/client";
2
+ export type ExporterPropertyType = "Boolean" | "Number" | "String" | "Enum" | "Array" | "Object";
3
+ export declare class ExporterPropertyBase {
4
+ key: string;
5
+ title: string;
6
+ description: string;
7
+ category?: string;
8
+ dependsOn?: Record<string, boolean>;
9
+ type: ExporterPropertyType;
10
+ constructor(model: DTOExporterPropertyDefinition);
11
+ }
@@ -0,0 +1,7 @@
1
+ import { DTOExporterPropertyDefinitionBoolean } from "@supernova-studio/client";
2
+ import { ExporterPropertyBase, ExporterPropertyType } from "./SDKExporterPropertyBase";
3
+ export declare class ExporterPropertyDefinitionBoolean extends ExporterPropertyBase {
4
+ type: ExporterPropertyType;
5
+ defaultValue: boolean;
6
+ constructor(model: DTOExporterPropertyDefinitionBoolean);
7
+ }
@@ -0,0 +1,6 @@
1
+ import { ExporterPropertyDefinitionBoolean } from "./SDKExporterPropertyBoolean";
2
+ import { ExporterPropertyDefinitionEnum } from "./SDKExporterPropertyEnum";
3
+ import { ExporterPropertyDefinitionNumber } from "./SDKExporterPropertyNumber";
4
+ import { ExporterPropertyDefinitionObject } from "./SDKExporterPropertyObject";
5
+ import { ExporterPropertyDefinitionString } from "./SDKExporterPropertyString";
6
+ export type ExporterPropertyDefinition = ExporterPropertyDefinitionBoolean | ExporterPropertyDefinitionEnum | ExporterPropertyDefinitionNumber | ExporterPropertyDefinitionObject | ExporterPropertyDefinitionString;
@@ -0,0 +1,14 @@
1
+ import { DTOExporterPropertyDefinitionEnum } from "@supernova-studio/client";
2
+ import { ExporterPropertyBase, ExporterPropertyType } from "./SDKExporterPropertyBase";
3
+ type ExporterPropertyDefinitionEnumOption = {
4
+ key: string;
5
+ label: string;
6
+ description: string;
7
+ };
8
+ export declare class ExporterPropertyDefinitionEnum extends ExporterPropertyBase {
9
+ type: ExporterPropertyType;
10
+ options: Array<ExporterPropertyDefinitionEnumOption>;
11
+ defaultValue: string;
12
+ constructor(model: DTOExporterPropertyDefinitionEnum);
13
+ }
14
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DTOExporterPropertyDefinitionNumber } from "@supernova-studio/client";
2
+ import { ExporterPropertyBase, ExporterPropertyType } from "./SDKExporterPropertyBase";
3
+ export declare class ExporterPropertyDefinitionNumber extends ExporterPropertyBase {
4
+ type: ExporterPropertyType;
5
+ defaultValue: number;
6
+ constructor(model: DTOExporterPropertyDefinitionNumber);
7
+ }
@@ -0,0 +1,12 @@
1
+ import { DTOExporterPropertyDefinitionObject } from "@supernova-studio/client";
2
+ import { ExporterPropertyBase, ExporterPropertyType } from "./SDKExporterPropertyBase";
3
+ type AllowedKeys = {
4
+ options: Array<string>;
5
+ };
6
+ export declare class ExporterPropertyDefinitionObject extends ExporterPropertyBase {
7
+ type: ExporterPropertyType;
8
+ allowedKeys: AllowedKeys;
9
+ defaultValues: Record<string, string>;
10
+ constructor(model: DTOExporterPropertyDefinitionObject);
11
+ }
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { DTOExporterPropertyDefinitionString } from "@supernova-studio/client";
2
+ import { ExporterPropertyBase, ExporterPropertyType } from "./SDKExporterPropertyBase";
3
+ export declare class ExporterPropertyDefinitionString extends ExporterPropertyBase {
4
+ type: ExporterPropertyType;
5
+ defaultValue: string;
6
+ constructor(model: DTOExporterPropertyDefinitionString);
7
+ }
@@ -1,7 +1,7 @@
1
1
  export type S3ExportBuildResultModel = {
2
2
  bucket: string;
3
3
  files: Array<string>;
4
- path: string;
4
+ url: string;
5
5
  };
6
6
  /** The type definition for the data model of an S3 export build result. */
7
7
  export declare class S3ExportBuildResult {
@@ -10,7 +10,7 @@ export declare class S3ExportBuildResult {
10
10
  /** An array of URLs associated with the export build result */
11
11
  files: Array<string>;
12
12
  /** A URL associated with the export build result */
13
- path: string;
13
+ url: string;
14
14
  constructor(data: S3ExportBuildResultModel);
15
15
  }
16
16
  export type ExportBuildPullRequestResultModel = {
@@ -16,6 +16,10 @@ export declare class AssetGroup {
16
16
  isAssetGroup: boolean;
17
17
  sourceId: string | null;
18
18
  sourceName: string | null;
19
+ sources: Array<{
20
+ id: string;
21
+ name: string;
22
+ }>;
19
23
  constructor(model: DesignComponentGroupRemoteModel);
20
24
  addChild(groupId: string): void;
21
25
  addChildren(groupsIds: Array<string>): void;
@@ -14,6 +14,7 @@ export type DesignComponentGroupRemoteModel = {
14
14
  };
15
15
  export declare class DesignComponentGroup {
16
16
  id: string;
17
+ persistentId: string;
17
18
  brandId: string;
18
19
  name: string;
19
20
  description: string;
@@ -25,6 +26,12 @@ export declare class DesignComponentGroup {
25
26
  parentGroupId: string | null;
26
27
  createdAt: Date | null;
27
28
  updatedAt: Date | null;
29
+ sourceId: string | null;
30
+ sourceName: string | null;
31
+ sources: Array<{
32
+ id: string;
33
+ name: string;
34
+ }>;
28
35
  constructor(model: DesignComponentGroupRemoteModel);
29
36
  addChild(groupId: string): void;
30
37
  addChildren(groupsIds: Array<string>): void;
@@ -1,6 +1,17 @@
1
1
  import { DTOFigmaComponent } from "@supernova-studio/client";
2
2
  import { SourceType } from "../enums/SDKSourceType";
3
3
  import { Source } from "./SDKSource";
4
+ export type DesignComponentOriginTransportModel = {
5
+ sourceType: SourceType;
6
+ sourceId: string | null;
7
+ fileId: string | null;
8
+ fileName: string | null;
9
+ id: string | null;
10
+ nodeId: string | null;
11
+ name: string | null;
12
+ width: number | null;
13
+ height: number | null;
14
+ };
4
15
  export type DesignComponentOriginModel = NonNullable<DTOFigmaComponent["originComponent"]>;
5
16
  export declare class DesignComponentOrigin {
6
17
  sourceType: SourceType;
@@ -12,6 +23,9 @@ export declare class DesignComponentOrigin {
12
23
  name: string | null;
13
24
  width: number | null;
14
25
  height: number | null;
15
- constructor(model: DesignComponentOriginModel, sources: Array<Source>);
26
+ constructor(model: DesignComponentOriginModel, sources: Array<Source>, rawSourceData?: DesignComponentOriginTransportModel);
16
27
  get remoteDesignComponentUrl(): string | undefined;
28
+ /** Constructs representation that can be used to transport the instantiated object as JSON */
29
+ toTransport(): DesignComponentOriginTransportModel;
30
+ static fromTransport(transport: DesignComponentOriginTransportModel): DesignComponentOrigin;
17
31
  }
@@ -15,6 +15,7 @@ export type TokenRemoteModel = {
15
15
  id?: string;
16
16
  name?: string;
17
17
  sourceId?: string;
18
+ sortOrder?: number;
18
19
  referenceOriginId?: string;
19
20
  referencePersistentId?: string;
20
21
  referenceResolutionFailed?: boolean;
@@ -1,4 +1,4 @@
1
- import { UserProfile, UserProfileRemoteModel, UserProfileTransportModel } from "./SDKUserProfile";
1
+ import { UserProfile, UserProfileRemoteModel, UserProfileTransportModel, UserThemeRemoteModel } from "./SDKUserProfile";
2
2
  type UserSource = "SignUp" | "Invite" | "SSO";
3
3
  export type UserRemoteModel = {
4
4
  id: string;
@@ -6,6 +6,7 @@ export type UserRemoteModel = {
6
6
  source: UserSource | null;
7
7
  createdAt: string;
8
8
  profile: UserProfileRemoteModel;
9
+ theme?: UserThemeRemoteModel;
9
10
  linkedIntegrations?: LinkedIntegrations;
10
11
  };
11
12
  export type LinkedIntegrations = {
@@ -53,5 +54,8 @@ export declare class User {
53
54
  static fromTransport(model: UserTransportModel): User;
54
55
  /** Returns user's name which should be used in read-only cases. */
55
56
  get displayName(): string;
57
+ /** Returns user's initials */
58
+ get initials(): string;
59
+ get firstName(): string | undefined;
56
60
  }
57
61
  export {};
@@ -13,6 +13,7 @@ export type UserProfileRemoteModel = {
13
13
  avatar?: string;
14
14
  onboarding?: UserProfileOnboardingRemoteModel;
15
15
  isOnboardingFinished?: boolean;
16
+ theme?: UserThemeRemoteModel;
16
17
  };
17
18
  export type UserProfileOnboardingRemoteModel = {
18
19
  companyName?: string;
@@ -28,12 +29,26 @@ export type UserProfileOnboardingRemoteModel = {
28
29
  isPageDraftOnboardingFinished?: boolean;
29
30
  isApprovalsOnboardingFinished?: boolean;
30
31
  };
32
+ export type UserThemeRemoteModel = {
33
+ preset?: "SystemPreference" | "Default" | "Sepia" | "HighContrast" | "DefaultDark" | "HighContrastDark" | "SpaceBlue" | "DarkGrey" | "Custom";
34
+ backgroundColor?: string;
35
+ accentColor?: string;
36
+ contrast?: number;
37
+ isSecondaryEnabled?: boolean;
38
+ secondaryBackgroundColor?: string;
39
+ secondaryContrast?: number;
40
+ isEditorWhite?: boolean;
41
+ };
42
+ export type UserTheme = {
43
+ preset: Exclude<UserThemeRemoteModel["preset"], undefined>;
44
+ } & Omit<UserThemeRemoteModel, "preset">;
31
45
  export type UserProfileTransportModel = UserProfileRemoteModel;
32
46
  export type UserProfileOnboardingUpdateModel = UserProfileOnboardingRemoteModel;
33
47
  export type UserProfileUpdateModel = {
34
48
  name?: string;
35
49
  nickname?: string;
36
50
  onboarding?: UserProfileOnboardingRemoteModel;
51
+ theme?: UserThemeRemoteModel;
37
52
  };
38
53
  export declare class UserProfile {
39
54
  /** User name */
@@ -44,6 +59,8 @@ export declare class UserProfile {
44
59
  avatar: string | null;
45
60
  /** Is profile onboarding finished */
46
61
  isOnboardingFinished: boolean;
62
+ /** User theme */
63
+ theme: UserTheme | null;
47
64
  /** Onboarding object */
48
65
  onboarding: {
49
66
  companyName: string | null;
@@ -1,12 +1,9 @@
1
+ import { TestContext, TestFunction } from "vitest";
1
2
  import { Supernova } from "../core/SDKSupernova";
2
3
  import { RemoteVersionIdentifier, RemoteWorkspaceVersionIdentifier } from "../core/areas/SDKRemoteIdentifiers";
3
- import { ExecutionContext } from "ava";
4
4
  export declare const testInstance: Supernova;
5
5
  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?: (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
- 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
- export declare const testAva: import("ava").TestFn;
9
+ export declare const testRetryBefore: (beforeFn?: (ctx: any) => Promise<any>) => (name: string, assertFn: TestFunction<TestContext & object>) => void;
@@ -1,16 +1,17 @@
1
- import { AnyStringToken } from "../model/tokens/SDKStringToken";
2
1
  import { BorderPosition, ColorToken, ShadowType, TextCase, TextDecoration, Unit } from "../index";
3
2
  import { BorderStyle } from "../model/enums/SDKBorderStyle";
4
3
  import { StringTokenType } from "../model/enums/SDKTokenType";
4
+ import { AnyStringToken } from "../model/tokens/SDKStringToken";
5
5
  import { Token } from "../model/tokens/SDKToken";
6
6
  import { AnyToken } from "../model/tokens/SDKTokenValue";
7
- export declare const validateToken: (t: any, tokens: Token[], name: string, hex: string, opacity?: number, aliasName?: string) => void;
8
- export declare const validateDimensionToken: (t: any, tokens: Token[], name: string, measure: number, unit: Unit) => void;
9
- export declare const validateStringToken: (t: any, tokens: Token[], name: string, text: string, type: StringTokenType) => void;
10
- export declare const validateOptionToken: (t: any, tokens: Token[], name: string, text: string) => void;
11
- export declare const validateBorderToken: (t: any, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
12
- export declare const validateShadowTokenOpacities: (t: any, tokens: Token[], name: string, measures: Array<number | null>, colorMeasures: Array<number | null>) => void;
13
- export declare const validateShadowToken: (t: any, tokens: Token[], name: string, value: {
7
+ import { ExpectStatic } from "vitest";
8
+ export declare const validateToken: (expect: ExpectStatic, tokens: Token[], name: string, hex: string, opacity?: number, aliasName?: string) => void;
9
+ export declare const validateDimensionToken: (expect: ExpectStatic, tokens: Token[], name: string, measure: number, unit: Unit) => void;
10
+ export declare const validateStringToken: (expect: ExpectStatic, tokens: Token[], name: string, text: string, type: StringTokenType) => void;
11
+ export declare const validateOptionToken: (expect: ExpectStatic, tokens: Token[], name: string, text: string) => void;
12
+ export declare const validateBorderToken: (expect: ExpectStatic, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
13
+ export declare const validateShadowTokenOpacities: (expect: ExpectStatic, tokens: Token[], name: string, measures: Array<number | null>, colorMeasures: Array<number | null>) => void;
14
+ export declare const validateShadowToken: (expect: ExpectStatic, tokens: Token[], name: string, value: {
14
15
  hex: string;
15
16
  x: number;
16
17
  y: number;
@@ -25,7 +26,7 @@ export declare const validateShadowToken: (t: any, tokens: Token[], name: string
25
26
  spread: number;
26
27
  type: ShadowType;
27
28
  }>) => void;
28
- export declare const validateShadowTokenRef: (t: any, tokens: Token[], description: string, refName: string, value: {
29
+ export declare const validateShadowTokenRef: (expect: ExpectStatic, tokens: Token[], description: string, refName: string, value: {
29
30
  hex: string;
30
31
  x: number;
31
32
  y: number;
@@ -40,7 +41,7 @@ export declare const validateShadowTokenRef: (t: any, tokens: Token[], descripti
40
41
  spread: number;
41
42
  type: ShadowType;
42
43
  }>) => void;
43
- export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], description: string, layers: Array<{
44
+ export declare const validateShadowTokenRefMultiple: (expect: ExpectStatic, tokens: Token[], description: string, layers: Array<{
44
45
  refName: string;
45
46
  layers: Array<{
46
47
  hex: string;
@@ -51,7 +52,7 @@ export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], d
51
52
  type: ShadowType;
52
53
  }>;
53
54
  }>) => void;
54
- export declare const validateShadowTokenInnerRef: (t: any, tokens: Token[], name: string, value: {
55
+ export declare const validateShadowTokenInnerRef: (expect: ExpectStatic, tokens: Token[], name: string, value: {
55
56
  hex: string;
56
57
  x: number;
57
58
  xUnit: Unit;
@@ -74,17 +75,17 @@ export declare const validateShadowTokenInnerRef: (t: any, tokens: Token[], name
74
75
  spreadUnit: Unit;
75
76
  type: ShadowType;
76
77
  }>, allTokens: Map<string, Token>) => void;
77
- export declare const validateTypographyToken: (t: any, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
78
- export declare const validateTypographyTokenRef: (t: any, tokens: Token[], description: string, refName: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
79
- export declare const validateTypographyTokenInnerRef: (t: any, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
80
- export declare const validateNoToken: (t: any, tokens: Token[], name: string) => void;
81
- export declare const validateTokenRef: (t: any, tokens: Token[], description: string, hex: string, name: string, refDescription?: string) => void;
82
- export declare const validateTokensJustColorRef: (t: any, token: ColorToken, colorRef: ColorToken, name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
83
- export declare const validateTokenJustColorRef: (t: any, tokens: Token[], name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
84
- export declare const validateColorTokenJustOpacityRef: (t: any, tokens: Token[], name: string, opacity: number, unit: Unit, opacityRefId: string, opacityRefName: string) => void;
85
- export declare const validateDimensionTokenRef: (t: any, tokens: Token[], description: string, refName: string, measure: number, unit: Unit) => void;
86
- export declare const validateBorderTokenRef: (t: any, tokens: Token[], description: string, refName: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
87
- export declare const validateBorderTokenInnerRef: (t: any, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
88
- export declare const validateOrigin: (t: any, tokens: Token[], name: string, nameRef: string) => void;
78
+ export declare const validateTypographyToken: (expect: ExpectStatic, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
79
+ export declare const validateTypographyTokenRef: (expect: ExpectStatic, tokens: Token[], description: string, refName: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
80
+ export declare const validateTypographyTokenInnerRef: (expect: ExpectStatic, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
81
+ export declare const validateNoToken: (expect: ExpectStatic, tokens: Token[], name: string) => void;
82
+ export declare const validateTokenRef: (expect: ExpectStatic, tokens: Token[], description: string, hex: string, name: string, refDescription?: string) => void;
83
+ export declare const validateTokensJustColorRef: (expect: ExpectStatic, token: ColorToken, colorRef: ColorToken, name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
84
+ export declare const validateTokenJustColorRef: (expect: ExpectStatic, tokens: Token[], name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
85
+ export declare const validateColorTokenJustOpacityRef: (expect: ExpectStatic, tokens: Token[], name: string, opacity: number, unit: Unit, opacityRefId: string, opacityRefName: string) => void;
86
+ export declare const validateDimensionTokenRef: (expect: ExpectStatic, tokens: Token[], description: string, refName: string, measure: number, unit: Unit) => void;
87
+ export declare const validateBorderTokenRef: (expect: ExpectStatic, tokens: Token[], description: string, refName: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
88
+ export declare const validateBorderTokenInnerRef: (expect: ExpectStatic, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
89
+ export declare const validateOrigin: (expect: ExpectStatic, tokens: Token[], name: string, nameRef: string) => void;
89
90
  export declare const isStringToken: (token?: Token | AnyToken | undefined | null) => token is AnyStringToken;
90
91
  export declare const getExpectedByDescription: (description: string) => string | undefined;
@@ -1,7 +1,32 @@
1
1
  import { Token } from "../../model/tokens/SDKToken";
2
- import { ShadowTokenValue } from "../../model/tokens/SDKTokenValue";
2
+ import { ShadowTokenValue, TypographyTokenValueTypes } from "../../model/tokens/SDKTokenValue";
3
3
  import { TokenUtilPreviewTokenValueSegment } from "./TokenUtilPreviewTypes";
4
4
  export declare class TokenUtilPreviewSegmentGenerator {
5
+ static getTypographyValueReferenceProperties(tokenValue: TypographyTokenValueTypes | undefined | null, allTokens: Map<string, Token>): Pick<TokenUtilPreviewTokenValueSegment, "referencedName" | "referenceResolutionFailed" | "referenceOriginRemote" | "referenceOriginName" | "referenceFullPath">;
6
+ static getReferenceName(reference: Token): string;
7
+ static getCommonProperties(token: Token | undefined, reference: Token | undefined): {
8
+ referenceName: undefined;
9
+ referenceResolutionFailed?: undefined;
10
+ referenceOriginRemote?: undefined;
11
+ referenceOriginName?: undefined;
12
+ referenceFullPath?: undefined;
13
+ referencedName?: undefined;
14
+ isDifferentTypeValue?: undefined;
15
+ isValueOutOfRange?: undefined;
16
+ tokenOutOfRangeErrorMessage?: undefined;
17
+ tokenDifferentTypeErrorMessage?: undefined;
18
+ } | {
19
+ referenceResolutionFailed: boolean;
20
+ referenceOriginRemote: boolean;
21
+ referenceOriginName: string | undefined;
22
+ referenceFullPath: string | undefined;
23
+ referencedName: string | undefined;
24
+ isDifferentTypeValue: boolean;
25
+ isValueOutOfRange: boolean;
26
+ tokenOutOfRangeErrorMessage: string | undefined;
27
+ tokenDifferentTypeErrorMessage: string | undefined;
28
+ referenceName?: undefined;
29
+ };
5
30
  static resolvedSegmentsForToken(token: Token, allTokens: Map<string, Token>): Array<TokenUtilPreviewTokenValueSegment | "separator">;
6
31
  static shadowValuesToSegments(layer: ShadowTokenValue | null, allTokens: Map<string, Token>): Array<TokenUtilPreviewTokenValueSegment | "separator">;
7
32
  }
@@ -76,4 +76,6 @@ export type TokenUtilPreviewReferenceInfoPiece = {
76
76
  value?: Array<TokenUtilPreviewTokenValueSegment>;
77
77
  icon?: string;
78
78
  fullWidth?: boolean;
79
+ wrapSegments?: boolean;
80
+ forceRawValue?: boolean;
79
81
  };
@@ -24,6 +24,8 @@ export declare class TokenTransform {
24
24
  dimensionTokenToCSS(value: AnyDimensionTokenValue): string;
25
25
  private unitToCSS;
26
26
  gradientsTokenToCSS(value: GradientTokenValue[]): string;
27
+ gradientTokenToCssFunction(value: GradientTokenValue): string;
28
+ gradientTokenToCssDirection(value: GradientTokenValue): string;
27
29
  /** Converts gradient token value to css definition */
28
30
  gradientTokenToCSS(value: GradientTokenValue): string;
29
31
  /** Converts generic token value to css definition */
@@ -88,6 +88,11 @@ export declare class TokenUtils {
88
88
  /** Map tokens for lookup */
89
89
  static tokensToReferenceMap(tokens: Array<Token>): Map<string, Token>;
90
90
  static isReferenceResolutionFailed(token: Token): boolean;
91
+ static isReferenceResolutionFailedById(tokenReferenceId: string | undefined | null, tokensMap: Map<string, Token>): boolean;
92
+ /**
93
+ * Checks if resolution of token or any underlying token has failed
94
+ */
95
+ static hasAnyReferenceResolutionFailed(token: Token, tokensMap: Map<string, Token>): boolean;
91
96
  /** Map token groups for lookup */
92
97
  static tokenGroupsToReferenceMap(groups: Array<TokenGroup>): Map<string, TokenGroup>;
93
98
  static lookupReference<T extends Token>(id: string | undefined | null, tokens: Map<string, Token>): T | undefined;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;