@supernova-studio/supernova-sdk-beta 2.0.18 → 2.0.19

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 (44) hide show
  1. package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +2 -5
  2. package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +18 -2
  3. package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +14 -0
  4. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +2 -2
  5. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +16 -5
  6. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +6 -3
  7. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +11 -3
  8. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityMultiplayerItemResolver.d.ts +1 -1
  9. package/build/sdk-typescript/src/exports-pulsar.d.ts +2 -0
  10. package/build/sdk-typescript/src/exports.d.ts +5 -1
  11. package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +6 -0
  12. package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +2 -0
  13. package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockDefinition.d.ts +2 -0
  14. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/do-dont-guidelines/SDKDocsBlockActualDoDontGuidelines.d.ts +8 -0
  15. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +2 -0
  16. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockRichTextEditorProperty.d.ts +19 -0
  17. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +9 -3
  18. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +2 -0
  19. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntity.d.ts +10 -1
  20. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityApprovalState.d.ts +14 -0
  21. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityDraftState.d.ts +0 -2
  22. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityGroup.d.ts +5 -2
  23. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityHeader.d.ts +3 -3
  24. package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityPage.d.ts +5 -2
  25. package/build/sdk-typescript/src/model/documentation/SDKDocumentationLegacyItem.d.ts +4 -0
  26. package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
  27. package/build/sdk-typescript/src/model/enums/SDKDocsBlockOptionColor.d.ts +14 -0
  28. package/build/sdk-typescript/src/model/enums/SDKDocsBlockOptionRenderStyle.d.ts +1 -1
  29. package/build/sdk-typescript/src/model/enums/SDKDocsBlockRichTextEditorPropertyStyle.d.ts +16 -0
  30. package/build/sdk-typescript/src/model/enums/SDKIconSet.d.ts +5 -0
  31. package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +1 -1
  32. package/build/sdk-typescript/src/model/exporters/SDKExporter.d.ts +8 -0
  33. package/build/sdk-typescript/src/model/support/SDKSource.d.ts +3 -1
  34. package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +4 -0
  35. package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +2 -0
  36. package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +4 -0
  37. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSSOSettings.d.ts +2 -0
  38. package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +21 -4
  39. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewTypes.d.ts +4 -0
  40. package/build/sdk-typescript/src/utils/TokenUtils.d.ts +1 -1
  41. package/build/sdk-typescript/src/utils/tokenDefaultValues.d.ts +31 -0
  42. package/build/supernova-sdk-typescript.js +1 -1
  43. package/build/supernova-sdk-typescript.js.map +1 -1
  44. package/package.json +3 -3
@@ -0,0 +1,5 @@
1
+ export declare enum IconSet {
2
+ checkCircle = "CheckCircle",
3
+ crossCircle = "CrossCircle",
4
+ alert = "Alert"
5
+ }
@@ -46,4 +46,4 @@ export type ReferencableTokenType = (typeof REFERENCABLE_TOKEN_TYPES)[number];
46
46
  export declare const tokenTypeIsReferencable: (tokenType: TokenType) => tokenType is TokenType.color | TokenType.radius | TokenType.borderWidth | TokenType.duration | TokenType.fontSize | TokenType.dimension | TokenType.letterSpacing | TokenType.lineHeight | TokenType.opacity | TokenType.paragraphSpacing | TokenType.size | TokenType.space | TokenType.zIndex | TokenType.textDecoration | TokenType.textCase | TokenType.fontFamily | TokenType.fontWeight;
47
47
  export declare const DT_TOKEN_TYPES: readonly [TokenType.color, TokenType.shadow, TokenType.gradient, TokenType.typography, TokenType.border, 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.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
48
48
  export type DTTokenType = (typeof DT_TOKEN_TYPES)[number];
49
- export type DTOriginalTokenType = "color" | "borderRadius" | "boxShadow" | "gradient" | "typography" | "border" | "borderWidth" | "sizing" | "opacity" | "spacing" | "fontSizes" | "paragraphSpacing" | "letterSpacing" | "lineHeights" | "other" | "dimension" | "fontFamilies" | "fontWeights" | "textCase" | "textDecoration";
49
+ export type DTOriginalTokenType = "color" | "borderRadius" | "boxShadow" | "gradient" | "typography" | "border" | "borderWidth" | "sizing" | "opacity" | "spacing" | "fontSizes" | "paragraphSpacing" | "letterSpacing" | "lineHeights" | "other" | "dimension" | "fontFamilies" | "fontWeights" | "textCase" | "textDecoration" | "duration";
@@ -7,6 +7,7 @@ export type ExporterModel = {
7
7
  packageId: string;
8
8
  isPrivate: boolean;
9
9
  isDefaultDocumentationExporter: boolean;
10
+ isOwner?: boolean;
10
11
  usesBrands: boolean;
11
12
  usesThemes?: boolean;
12
13
  name: string;
@@ -31,6 +32,11 @@ export type NewExporterPayload = {
31
32
  url?: string;
32
33
  provider?: ExporterProvider;
33
34
  };
35
+ export type ExporterMembershipModel = {
36
+ exporterId: string;
37
+ workspaceId: string;
38
+ role: "Owner" | "User";
39
+ };
34
40
  export declare class Exporter {
35
41
  /** Unique exporter installation id. This id is used to referenced exporter within Supernova system (for example, in ds.documentationExporterId) */
36
42
  id: string;
@@ -70,6 +76,8 @@ export declare class Exporter {
70
76
  gitBranch: string | null;
71
77
  /** Root directory in the repository containing the exporter package. If not provided, exporter is located at the root directory */
72
78
  gitDirectory: string | null;
79
+ /** If the workspace is owner of an exporter */
80
+ isOwner?: boolean;
73
81
  /** Contribution of this exporter to the Supernova system */
74
82
  contributes: {
75
83
  /** DocumentationLegacy block variants */
@@ -12,6 +12,7 @@ export type SourceRemoteModel = {
12
12
  id: string;
13
13
  fileName?: string;
14
14
  brandId?: string;
15
+ themeId?: string;
15
16
  plugin?: {
16
17
  fileId: string;
17
18
  lastImportedAt?: string;
@@ -124,7 +125,7 @@ export type SourceModelCloud = Omit<SourceRemoteModelCloud, "lastUpdatesCheckedA
124
125
  export type SourceModelFigmaVariablesPlugin = Omit<SourceRemoteModelFigmaVariablesPlugin, "lastImportedAt"> & {
125
126
  lastImportedAt?: Date;
126
127
  };
127
- export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "brandId" | "scope"> & {
128
+ export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "brandId" | "themeId" | "scope"> & {
128
129
  cloud?: SourceRemoteModelCloud | null;
129
130
  };
130
131
  export declare class Source {
@@ -132,6 +133,7 @@ export declare class Source {
132
133
  id: string;
133
134
  fileName: string | null;
134
135
  brandId: string | null;
136
+ themeId: string | null;
135
137
  cloud: SourceModelCloud | null;
136
138
  tokenStudio?: SourceModelTokenStudio | null;
137
139
  figmaVariablesPlugin?: SourceModelFigmaVariablesPlugin | null;
@@ -7,6 +7,8 @@ export type TokenOriginModel = {
7
7
  referenceOriginId?: string;
8
8
  referencePersistentId?: string;
9
9
  referenceResolutionFailed?: boolean;
10
+ referenceOriginRemote?: boolean;
11
+ referenceOriginName?: string;
10
12
  key?: string;
11
13
  };
12
14
  export declare class TokenOrigin {
@@ -17,6 +19,8 @@ export declare class TokenOrigin {
17
19
  referenceOriginId?: string | null;
18
20
  referencePersistentId?: string | null;
19
21
  referenceResolutionFailed?: boolean | null;
22
+ referenceOriginRemote?: boolean | null;
23
+ referenceOriginName?: string | null;
20
24
  key?: string | null;
21
25
  constructor(model: TokenOriginModel);
22
26
  }
@@ -17,6 +17,8 @@ export type TokenRemoteModel = {
17
17
  referenceOriginId?: string;
18
18
  referencePersistentId?: string;
19
19
  referenceResolutionFailed?: boolean;
20
+ referenceOriginRemote?: boolean;
21
+ referenceOriginName?: string;
20
22
  key?: string;
21
23
  };
22
24
  data: {
@@ -25,6 +25,8 @@ export type UserProfileOnboardingRemoteModel = {
25
25
  designSystemName?: string;
26
26
  figmaUrl?: string;
27
27
  defaultDestination?: UserOnboardingDefaultDestination;
28
+ isPageDraftOnboardingFinished?: boolean;
29
+ isApprovalsOnboardingFinished?: boolean;
28
30
  };
29
31
  export type UserProfileTransportModel = UserProfileRemoteModel;
30
32
  export type UserProfileOnboardingUpdateModel = UserProfileOnboardingRemoteModel;
@@ -54,6 +56,8 @@ export declare class UserProfile {
54
56
  designSystemName: string | null;
55
57
  figmaUrl: string | null;
56
58
  defaultDestination: UserOnboardingDefaultDestination | null;
59
+ isPageDraftOnboardingFinished: boolean | null;
60
+ isApprovalsOnboardingFinished: boolean | null;
57
61
  } | null;
58
62
  constructor(model: UserProfileRemoteModel);
59
63
  /** Constructs directly manipulable update object for user profile */
@@ -3,6 +3,7 @@ export type WorkspaceSSOSettingsRemoteModel = {
3
3
  defaultAutoInviteValue: boolean;
4
4
  autoInviteDomains: Record<string, boolean>;
5
5
  areInvitesDisabled: boolean;
6
+ skipDocsSupernovaLogin: boolean;
6
7
  };
7
8
  export type WorkspaceSSOSettingsUpdateModel = WorkspaceSSOSettingsRemoteModel;
8
9
  export type WorkspaceSSOSettingsTransportModel = WorkspaceSSOSettingsRemoteModel;
@@ -11,6 +12,7 @@ export declare class WorkspaceSSOSettings {
11
12
  defaultAutoInviteValue: boolean;
12
13
  autoInviteDomains: Record<string, boolean>;
13
14
  areInvitesDisabled: boolean;
15
+ skipDocsSupernovaLogin: boolean;
14
16
  constructor(model: WorkspaceSSOSettingsRemoteModel);
15
17
  toUpdateObject(): WorkspaceSSOSettingsUpdateModel;
16
18
  toRemote(): WorkspaceSSOSettingsTransportModel;
@@ -1,4 +1,3 @@
1
- import { DocsBlockFigmaNodePropertyOptions, DocsBlockMultiRichTextPropertyOptions } from "../../exports";
2
1
  import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
3
2
  import { DocsBlockItemDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockItemDefinition";
4
3
  import { DocsBlockLayout } from "../../model/docs/blocks/definition/SDKDocsBlockLayout";
@@ -14,12 +13,14 @@ import { DocsBlockComponentPropertyPropertyDefinition, DocsBlockComponentPropert
14
13
  import { DocsBlockDividerPropertyDefinition, DocsBlockDividerPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockDividerProperty";
15
14
  import { DocsBlockEmbedUrlPropertyDefinition, DocsBlockEmbedUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty";
16
15
  import { DocsBlockFigmaComponentPropertyDefinition, DocsBlockFigmaComponentPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty";
17
- import { DocsBlockFigmaNodePropertyDefinition } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty";
16
+ import { DocsBlockFigmaNodePropertyDefinition, DocsBlockFigmaNodePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty";
18
17
  import { DocsBlockImagePropertyDefinition, DocsBlockImagePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockImageProperty";
19
18
  import { DocsBlockMarkdownPropertyDefinition, DocsBlockMarkdownPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMarkdownProperty";
19
+ import { DocsBlockMultiRichTextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty";
20
20
  import { DocsBlockMultiSelectPropertyDefinition, DocsBlockMultiSelectPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty";
21
21
  import { DocsBlockNumberPropertyDefinition, DocsBlockNumberPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockNumberProperty";
22
22
  import { DocsBlockItemPropertyAnyDefinition } from "../../model/docs/blocks/properties/SDKDocsBlockProperty";
23
+ import { DocsBlockRichTextEditorPropertyDefinition, DocsBlockRichTextEditorPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockRichTextEditorProperty";
23
24
  import { DocsBlockRichTextPropertyDefinition, DocsBlockRichTextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockRichTextProperty";
24
25
  import { DocsBlockSingleSelectPropertyDefinition, DocsBlockSingleSelectPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty";
25
26
  import { DocsBlockStorybookPropertyDefinition, DocsBlockStorybookPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockStorybookProperty";
@@ -53,6 +54,7 @@ export declare class DocsBlockBuilder {
53
54
  image: string;
54
55
  layout: DocsBlockLayout;
55
56
  description?: string;
57
+ defaultColumns?: number;
56
58
  maxColumns?: number;
57
59
  }): DocsBlockVariant;
58
60
  /** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
@@ -63,6 +65,7 @@ export declare class DocsBlockBuilder {
63
65
  properties: Array<DocsBlockItemPropertyAnyDefinition>;
64
66
  description?: string;
65
67
  maxColumns?: number;
68
+ defaultColumns?: number;
66
69
  appearance?: {
67
70
  isBordered?: boolean;
68
71
  hasBackground?: boolean;
@@ -76,6 +79,7 @@ export declare class DocsBlockBuilder {
76
79
  image?: string;
77
80
  description?: string;
78
81
  maxColumns?: number;
82
+ defaultColumns?: number;
79
83
  appearance?: {
80
84
  isBordered?: boolean;
81
85
  hasBackground?: boolean;
@@ -131,7 +135,10 @@ export declare class DocsBlockBuilder {
131
135
  item: DocsBlockItemDefinition;
132
136
  maxItems?: number;
133
137
  description?: string;
134
- linkable?: boolean;
138
+ options?: {
139
+ linkable?: boolean;
140
+ newItemLabel?: string;
141
+ };
135
142
  appearance?: {
136
143
  isBordered?: boolean;
137
144
  hasBackground?: boolean;
@@ -187,7 +194,7 @@ export declare class DocsBlockBuilder {
187
194
  [key: string]: DocsBlockRichTextPropertyOptions;
188
195
  };
189
196
  }): DocsBlockRichTextPropertyDefinition;
190
- /** Create a block property with type .richText and its specific options */
197
+ /** Create a block property with type .multiRichText and its specific options */
191
198
  multiRichTextProperty(configuration: {
192
199
  id: string;
193
200
  name: string;
@@ -197,6 +204,16 @@ export declare class DocsBlockBuilder {
197
204
  [key: string]: DocsBlockMultiRichTextPropertyOptions;
198
205
  };
199
206
  }): DocsBlockRichTextPropertyDefinition;
207
+ /** Create a block property with type .multiRichText and its specific options */
208
+ richTextEditorProperty(configuration: {
209
+ id: string;
210
+ name: string;
211
+ description?: string;
212
+ options: DocsBlockRichTextEditorPropertyOptions;
213
+ variants?: {
214
+ [key: string]: DocsBlockRichTextEditorPropertyOptions;
215
+ };
216
+ }): DocsBlockRichTextEditorPropertyDefinition;
200
217
  /** Create a block property with type .boolean and its specific options */
201
218
  booleanProperty(configuration: {
202
219
  id: string;
@@ -3,12 +3,16 @@ export type TokenUtilPreviewTokenValueSegment = {
3
3
  referencedName?: string;
4
4
  prefersReferenceName?: boolean;
5
5
  referenceResolutionFailed?: boolean;
6
+ referenceOriginRemote?: boolean;
7
+ referenceOriginName?: string;
6
8
  };
7
9
  export type TokenUtilPreviewTokenType = "blur" | "border" | "borderWidth" | "color" | "copy" | "fontFamily" | "fontSize" | "fontWeight" | "dimension" | "duration" | "gradient" | "lineHeight" | "letterSpacing" | "opacity" | "paragraphSpacing" | "radius" | "shadow" | "size" | "space" | "string" | "textCase" | "textDecoration" | "typography" | "visibility" | "zIndex";
8
10
  export type TokenUtilPreviewMetadata = {
9
11
  displayValue: string;
10
12
  referencedTo?: string;
11
13
  referenceResolutionFailed?: boolean;
14
+ referenceOriginRemote?: boolean;
15
+ referenceOriginName?: string;
12
16
  tokenType: TokenUtilPreviewTokenType;
13
17
  } & ({
14
18
  meta?: null;
@@ -11,7 +11,7 @@ import { FontFamilyToken, FontWeightToken, ProductCopyToken, StringToken } from
11
11
  import { TextCaseToken } from "../model/tokens/SDKTextCaseToken";
12
12
  import { TextDecorationToken } from "../model/tokens/SDKTextDecorationToken";
13
13
  import { Token } from "../model/tokens/SDKToken";
14
- import { AnyTokenValue, AnyMultiLayerToken, AnySingleLayerToken, BorderWidthTokenValue, ColorTokenValue, ColorValue, DimensionTokenValue, DurationTokenValue, FontFamilyTokenValue, FontSizeTokenValue, FontWeightTokenValue, LetterSpacingTokenValue, LineHeightTokenValue, OpacityTokenValue, ParagraphSpacingTokenValue, ProductCopyTokenValue, RadiusTokenValue, RawValue, SizeTokenValue, SpaceTokenValue, StringTokenValue, TextCaseTokenValue, TextDecorationTokenValue, VisibilityTokenValue, ZIndexTokenValue } from "../model/tokens/SDKTokenValue";
14
+ import { AnyMultiLayerToken, AnySingleLayerToken, AnyTokenValue, BorderWidthTokenValue, ColorTokenValue, ColorValue, DimensionTokenValue, DurationTokenValue, FontFamilyTokenValue, FontSizeTokenValue, FontWeightTokenValue, LetterSpacingTokenValue, LineHeightTokenValue, OpacityTokenValue, ParagraphSpacingTokenValue, ProductCopyTokenValue, RadiusTokenValue, RawValue, SizeTokenValue, SpaceTokenValue, StringTokenValue, TextCaseTokenValue, TextDecorationTokenValue, VisibilityTokenValue, ZIndexTokenValue } from "../model/tokens/SDKTokenValue";
15
15
  import { TypographyToken } from "../model/tokens/SDKTypographyToken";
16
16
  import { VisibilityToken } from "../model/tokens/SDKVisibilityToken";
17
17
  type TokenMapCompletenessTypeCheck<T extends {
@@ -0,0 +1,31 @@
1
+ import { DimensionTokenType } from "../model/enums/SDKTokenType";
2
+ export declare const typographyTokenDefaultValue: {
3
+ fontFamily: string;
4
+ fontWeight: string;
5
+ fontSize: number;
6
+ lineHeight: number;
7
+ letterSpacing: number;
8
+ paragraphIndent: number;
9
+ paragraphSpacing: number;
10
+ };
11
+ export declare const shadowTokenDefaultValue: {
12
+ x: number;
13
+ y: number;
14
+ blur: number;
15
+ spread: number;
16
+ color: string;
17
+ opacity: number;
18
+ type: string;
19
+ };
20
+ export declare const borderDefaultValue: {
21
+ color: string;
22
+ position: string;
23
+ style: string;
24
+ width: number;
25
+ };
26
+ export declare const blurDefaultValue: {
27
+ radius: number;
28
+ type: string;
29
+ };
30
+ export declare const opacityDefaultValue = 100;
31
+ export declare const dimensionDefaultValues: Record<DimensionTokenType, number | string>;