@supernova-studio/supernova-sdk-beta 1.6.37 → 1.6.39
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 +41 -0
- package/build/sdk-typescript/src/core/SDKSupernova.d.ts +4 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +11 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +14 -14
- package/build/sdk-typescript/src/core/areas/SDKAreaBrands.d.ts +1 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaBulkOperations.d.ts +10 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaComponents.d.ts +10 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +24 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +78 -37
- package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +13 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaMultiplayer.d.ts +10 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +25 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +2 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +6 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +5 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +95 -39
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +48 -16
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +44 -53
- package/build/sdk-typescript/src/core/errors/SDKSupernovaError.d.ts +4 -2
- package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +4 -0
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityMultiplayerItemResolver.d.ts +7 -0
- package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +4 -4
- package/build/sdk-typescript/src/exports.d.ts +22 -4
- package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +1 -7
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +2 -11
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockDefinition.d.ts +13 -23
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockItemDefinition.d.ts +3 -10
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockLayout.d.ts +2 -7
- package/build/sdk-typescript/src/model/docs/blocks/definition/SDKDocsBlockVariant.d.ts +9 -18
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/{token-group/SDKDocsBlockActualTokenGroup.d.ts → color-ramps/SDKDocsBlockActualColorRamps.d.ts} +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/design-tokens/SDKDocsBlockActualDesignTokens.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +9 -5
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +4 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockColorProperty.d.ts +13 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +2 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty.d.ts +30 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMarkdownProperty.d.ts +4 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts +19 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +3 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockProperty.d.ts +2 -10
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +3 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +13 -3
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts +23 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +8 -2
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsColorRef.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsImageRef.d.ts +18 -13
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsLinkRef.d.ts +10 -7
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlock.d.ts +11 -24
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlockItem.d.ts +2 -7
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntity.d.ts +5 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityConfiguration.d.ts +6 -1
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityGroup.d.ts +24 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityHeader.d.ts +8 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityPage.d.ts +14 -0
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationLegacyPageAsset.d.ts +1 -1
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockRenderCode.d.ts +1 -1
- package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +1 -1
- package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +27 -5
- package/build/sdk-typescript/src/model/enums/SDKAlignment.d.ts +5 -0
- package/build/sdk-typescript/src/model/enums/SDKCodeLanguage.d.ts +9 -8
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +1 -1
- package/build/sdk-typescript/src/model/enums/{SDKDocsBlockAssetPropertyPreviewContainerSize.d.ts → SDKDocsBlockContainerSize.d.ts} +1 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +7 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutAlign.d.ts +3 -3
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutColumnResizing.d.ts +2 -2
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemVariantLayoutGap.d.ts +4 -4
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockMultiRichTextPropertyStyle.d.ts +8 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockRichTextPropertyStyle.d.ts +0 -4
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockTextPropertyStyle.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsPublishStatus.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +19 -19
- package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +2 -2
- package/build/sdk-typescript/src/model/exporters/SDKConnections.d.ts +9 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuild.d.ts +11 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuildResults.d.ts +12 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportDestinations.d.ts +16 -1
- package/build/sdk-typescript/src/model/exporters/remote/SDKRemoteConnectionsModel.d.ts +1 -1
- package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +4 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceFont.d.ts +2 -2
- package/build/sdk-typescript/src/model/support/SDKFigmaFrame.d.ts +2 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +14 -5
- package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +1 -1
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +6 -6
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +11 -6
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +2 -1
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKShadowToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -1
- 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/SDKTokenCompator.d.ts +2 -2
- package/build/sdk-typescript/src/model/tokens/SDKTokenValue.d.ts +3 -3
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +1 -1
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceNPMRegistryAccessToken.d.ts +15 -0
- package/build/sdk-typescript/src/tests/Areas/AreaAssets.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/FigmaTokensDataLoader.d.ts +3 -3
- package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +2 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +1 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +1 -1
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +47 -6
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +1 -1
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewReferenceInfoGenerator.d.ts +0 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewStyleGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +3 -1
- package/build/sdk-typescript/src/utils/CommonUtils.d.ts +5 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +5 -4
- package/build/sdk-typescript/src/utils/deepPartial.d.ts +3 -0
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -14
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +122 -118
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel, DocsBlockPropertyData } from "./SDKDocsBlockProperty";
|
|
2
2
|
/** Storybook property - Additional non-value options */
|
|
3
|
-
export type DocsBlockStorybookPropertyOptions =
|
|
3
|
+
export type DocsBlockStorybookPropertyOptions = {
|
|
4
|
+
/** Defines what should be the default height of the embed */
|
|
5
|
+
defaultHeight: number;
|
|
6
|
+
/** If enabled, additional text can be provided for the embed property */
|
|
7
|
+
allowCaption?: boolean;
|
|
8
|
+
/** If enabled, the embed can be resized */
|
|
9
|
+
allowResize?: boolean;
|
|
10
|
+
/** Defined how to validate the embed URL */
|
|
11
|
+
urlValidationRegex?: string;
|
|
12
|
+
};
|
|
4
13
|
/** Storybook property - Data */
|
|
5
|
-
export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<string> & {
|
|
14
|
+
export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<string | undefined> & {
|
|
15
|
+
alt?: string;
|
|
6
16
|
caption?: string;
|
|
7
17
|
height?: number;
|
|
8
|
-
|
|
18
|
+
embedUrl?: string;
|
|
9
19
|
};
|
|
10
20
|
/** Storybook property - Definition model */
|
|
11
21
|
export type DocsBlockStorybookPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockStorybookPropertyOptions;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts
CHANGED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
+
import { DocumentationLegacyRichTextModel } from "../../../documentation/SDKDocumentationLegacyRichText";
|
|
1
2
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
3
|
+
import { DocsImageRef } from "../support/SDKDocsImageRef";
|
|
2
4
|
import { DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel, DocsBlockPropertyData } from "./SDKDocsBlockProperty";
|
|
3
5
|
/** Table property - Additional non-value options */
|
|
4
6
|
export type DocsBlockTablePropertyOptions = Record<string, never>;
|
|
7
|
+
export type DocsBlockTableRichTextNode = {
|
|
8
|
+
type: "RichText";
|
|
9
|
+
value: DocumentationLegacyRichTextModel;
|
|
10
|
+
};
|
|
11
|
+
export type DocsBlockTableImageNode = {
|
|
12
|
+
type: "Image";
|
|
13
|
+
value: DocsImageRef;
|
|
14
|
+
};
|
|
15
|
+
export type DocsBlockTableMultiRichTextNode = {
|
|
16
|
+
type: "MultiRichText";
|
|
17
|
+
value: Array<DocumentationLegacyRichTextModel>;
|
|
18
|
+
};
|
|
19
|
+
export type DocsBlockTableNode = DocsBlockTableRichTextNode | DocsBlockTableImageNode | DocsBlockTableMultiRichTextNode;
|
|
5
20
|
/** Table property - Data */
|
|
6
|
-
export type DocsBlockTablePropertyData = DocsBlockPropertyData<
|
|
21
|
+
export type DocsBlockTablePropertyData = DocsBlockPropertyData<Array<{
|
|
22
|
+
cells: {
|
|
23
|
+
id: string;
|
|
24
|
+
alignment: "Left" | "Center" | "Right";
|
|
25
|
+
columnWidth: number;
|
|
26
|
+
nodes: Array<DocsBlockTableNode>;
|
|
27
|
+
}[];
|
|
28
|
+
}>> & {
|
|
7
29
|
highlightHeaderColumn?: boolean;
|
|
8
30
|
highlightHeaderRow?: boolean;
|
|
9
31
|
showBorder?: boolean;
|
|
10
|
-
width?: number;
|
|
11
32
|
};
|
|
12
33
|
/** Table property - Definition model */
|
|
13
34
|
export type DocsBlockTablePropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockTablePropertyOptions;
|
|
@@ -9,7 +9,7 @@ export type DocsBlockTextPropertyOptions = {
|
|
|
9
9
|
/** Default value to set when block is created */
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
/** Visual style of the text property */
|
|
12
|
-
|
|
12
|
+
textStyle?: DocsBlockTextPropertyStyle;
|
|
13
13
|
/** Text color */
|
|
14
14
|
color?: DocsBlockTextPropertyColor;
|
|
15
15
|
};
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts
CHANGED
|
@@ -3,10 +3,14 @@ import { TokenType } from "../../../enums/SDKTokenType";
|
|
|
3
3
|
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
4
4
|
/** Token property - Additional non-value options */
|
|
5
5
|
export type DocsBlockTokenPropertyOptions = {
|
|
6
|
+
/** Default theme to be chosen */
|
|
7
|
+
defaultTheme?: "none";
|
|
8
|
+
/** Default value preview */
|
|
9
|
+
defaultValuePreview?: "Split" | "Override";
|
|
6
10
|
/** Token types that are allowed to be selected. All types allowed if nothing is provided */
|
|
7
11
|
allowedTypes?: Array<TokenType>;
|
|
8
12
|
/** How should the tokens be rendered in editor */
|
|
9
|
-
renderLayoutAs?: "
|
|
13
|
+
renderLayoutAs?: "Grid" | "List";
|
|
10
14
|
/** Whether to allow selecting token custom properties. True by default */
|
|
11
15
|
allowPropertySelection?: boolean;
|
|
12
16
|
/** Whether to allow selecting themes. True by default */
|
|
@@ -15,12 +19,14 @@ export type DocsBlockTokenPropertyOptions = {
|
|
|
15
19
|
/** Token property - Data */
|
|
16
20
|
export type DocsBlockTokenPropertyData = DocsBlockPropertyData<Array<{
|
|
17
21
|
entityId: string;
|
|
18
|
-
entityType: "
|
|
22
|
+
entityType: "Token" | "TokenGroup";
|
|
19
23
|
}>> & {
|
|
20
24
|
/** Selected token ids */
|
|
21
25
|
selectedPropertyIds?: Array<string>;
|
|
22
26
|
/** Selected theme ids */
|
|
23
27
|
selectedThemeIds?: Array<string>;
|
|
28
|
+
/** Display mode of themes associated with the token property */
|
|
29
|
+
themeDisplayMode?: "Split" | "Override";
|
|
24
30
|
};
|
|
25
31
|
/** Token property - Definition model */
|
|
26
32
|
export type DocsBlockTokenPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockTokenPropertyOptions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PageBlockColorV2 } from "@supernova-studio/model";
|
|
2
2
|
/** A color data container */
|
|
3
|
-
export type DocsColorRef =
|
|
3
|
+
export type DocsColorRef = PageBlockColorV2;
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
+
import { Supernova } from "../../../../exports";
|
|
1
2
|
/** An image data container */
|
|
2
3
|
export type DocsImageRef = {
|
|
3
4
|
/** Ref type */
|
|
4
5
|
type: DocsImageRefType;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
/** Referenced resource, if any */
|
|
7
|
+
resource?: {
|
|
8
|
+
/** Absolute, directly consumable URL */
|
|
9
|
+
url: string;
|
|
10
|
+
/** Referenced resource, if any */
|
|
11
|
+
resourceId: string;
|
|
12
|
+
};
|
|
13
|
+
/** Referenced Figma file, if any */
|
|
14
|
+
figmaNode?: {
|
|
15
|
+
sourceId: string;
|
|
16
|
+
frameReferenceId: string;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
export declare enum DocsImageRefType {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
figmaFrame = "FigmaFrame"
|
|
20
|
+
resource = "Resource",
|
|
21
|
+
figmaNode = "FigmaNode"
|
|
21
22
|
}
|
|
23
|
+
export declare function docsImageRefToUrl(image: DocsImageRef | undefined, sdk: Supernova, from: {
|
|
24
|
+
dsId: string;
|
|
25
|
+
versionId: string;
|
|
26
|
+
}): string | undefined;
|
|
@@ -3,19 +3,22 @@ export type DocsLinkRef = {
|
|
|
3
3
|
/** Ref type */
|
|
4
4
|
type: DocsLinkRefType;
|
|
5
5
|
/** Referenced page */
|
|
6
|
-
|
|
6
|
+
documentationItemId?: string;
|
|
7
7
|
/** Referenced page block - heading */
|
|
8
8
|
pageHeadingId?: string;
|
|
9
|
-
/** Referenced page group */
|
|
10
|
-
groupId?: string;
|
|
11
9
|
/** Referenced URL */
|
|
12
10
|
url?: string;
|
|
13
11
|
/** Open in other tab */
|
|
14
12
|
openInNewTab?: boolean;
|
|
15
13
|
};
|
|
16
14
|
export declare enum DocsLinkRefType {
|
|
17
|
-
|
|
18
|
-
pageHeading = "
|
|
19
|
-
|
|
20
|
-
url = "url"
|
|
15
|
+
documentationItem = "DocumentationItem",
|
|
16
|
+
pageHeading = "PageHeading",
|
|
17
|
+
url = "Url"
|
|
21
18
|
}
|
|
19
|
+
export declare function docsLinkToUrl(link: DocsLinkRef): string | undefined;
|
|
20
|
+
export declare function docsLinkToLinkAttributes(link: DocsLinkRef): {
|
|
21
|
+
href: string;
|
|
22
|
+
target: string;
|
|
23
|
+
} | undefined;
|
|
24
|
+
export declare function linkAttributeToDocsLink(href: string | null | undefined, target: string | null | undefined): DocsLinkRef | undefined;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
+
import { PageBlockEditorModel } from "@supernova-studio/client";
|
|
1
2
|
import { DocsColorRef } from "../support/SDKDocsColorRef";
|
|
2
3
|
import { DocsLinkRef } from "../support/SDKDocsLinkRef";
|
|
3
4
|
import { DocsBlockItem } from "./SDKDocsBlockItem";
|
|
4
|
-
export type DocsBlockModel =
|
|
5
|
-
id: string;
|
|
6
|
-
packageId: string;
|
|
7
|
-
variantId?: string;
|
|
8
|
-
indentLevel: number;
|
|
9
|
-
appearance?: {
|
|
10
|
-
itemBackgroundColor?: DocsColorRef;
|
|
11
|
-
};
|
|
12
|
-
data?: Array<DocsBlockItemDefinitionModel>;
|
|
13
|
-
};
|
|
14
|
-
export type DocsBlockItemDefinitionModel = {
|
|
15
|
-
id: string;
|
|
16
|
-
props: {
|
|
17
|
-
[key: string]: object;
|
|
18
|
-
};
|
|
19
|
-
linksTo?: DocsLinkRef;
|
|
20
|
-
};
|
|
5
|
+
export type DocsBlockModel = PageBlockEditorModel;
|
|
21
6
|
export declare class DocsBlock {
|
|
22
7
|
/** Unique identifier of the block */
|
|
23
8
|
id: string;
|
|
@@ -31,6 +16,8 @@ export declare class DocsBlock {
|
|
|
31
16
|
appearance: {
|
|
32
17
|
/** Background color of all items of the block. Can be further overriden on every item */
|
|
33
18
|
itemBackgroundColor: DocsColorRef | null;
|
|
19
|
+
/** Number of columns */
|
|
20
|
+
numberOfColumns?: number;
|
|
34
21
|
};
|
|
35
22
|
/** Data of all items of the block */
|
|
36
23
|
data: Array<DocsBlockItem>;
|
|
@@ -40,21 +27,21 @@ export declare class DocsBlock {
|
|
|
40
27
|
/** Returns stored data of all properties. This will retrieve properties for item at any position */
|
|
41
28
|
allPropertyDataForItemAtIndex(index: number): Record<string, object> | null;
|
|
42
29
|
/** Returns stored data of a single property. This will retrieve property for item on the first position, ideal for single-item blocks */
|
|
43
|
-
propertyDataForSingleItem(propertyId: string):
|
|
30
|
+
propertyDataForSingleItem<T extends object>(propertyId: string): T | null;
|
|
44
31
|
/** Returns stored data of a single property. This will retrieve property for item at any position */
|
|
45
|
-
propertyDataForItemAtIndex(index: number, propertyId: string):
|
|
32
|
+
propertyDataForItemAtIndex<T extends object>(index: number, propertyId: string): T | null;
|
|
46
33
|
/** Returns stored link, if any. This will retrieve link for item on the first position, ideal for single-item blocks */
|
|
47
34
|
linkForSingleItem(): DocsLinkRef | null;
|
|
48
35
|
/** Returns stored link, if any. This will retrieve link for item at any position */
|
|
49
36
|
linkForItemAtIndex(index: number): DocsLinkRef | null;
|
|
50
37
|
/** Update data for property of specific key and index */
|
|
51
|
-
updatePropertyDataForItemAtIndex(index: number, propertyId: string, data:
|
|
38
|
+
updatePropertyDataForItemAtIndex<T extends object>(index: number, propertyId: string, data: T): void;
|
|
52
39
|
/** Update data for property of specific key and index */
|
|
53
|
-
updatePropertyDataForSingleItem(propertyId: string, data:
|
|
40
|
+
updatePropertyDataForSingleItem<T extends object>(propertyId: string, data: T): void;
|
|
54
41
|
/** Update link for item at specific index */
|
|
55
|
-
updateLinkForItemAtIndex(index: number, link: DocsLinkRef |
|
|
42
|
+
updateLinkForItemAtIndex(index: number, link: DocsLinkRef | undefined): void;
|
|
56
43
|
/** Update link for item at specific index */
|
|
57
|
-
updateLinkForSingleItem(link: DocsLinkRef |
|
|
44
|
+
updateLinkForSingleItem(link: DocsLinkRef | undefined): void;
|
|
58
45
|
/** Constructs representation that can be used to write full object to remote */
|
|
59
|
-
toRemote():
|
|
46
|
+
toRemote(): PageBlockEditorModel;
|
|
60
47
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
+
import { PageBlockItemV2 } from "@supernova-studio/model";
|
|
1
2
|
import { DocsLinkRef } from "../support/SDKDocsLinkRef";
|
|
2
|
-
export type DocsBlockItemModel =
|
|
3
|
-
id: string;
|
|
4
|
-
props: {
|
|
5
|
-
[key: string]: object;
|
|
6
|
-
};
|
|
7
|
-
linksTo?: DocsLinkRef;
|
|
8
|
-
};
|
|
3
|
+
export type DocsBlockItemModel = PageBlockItemV2;
|
|
9
4
|
export declare class DocsBlockItem {
|
|
10
5
|
/** Unique identifier of the block item */
|
|
11
6
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { DocumentationItemConfigurationV2 } from "@supernova-studio/model";
|
|
1
2
|
import { DocsEntityType } from "../../enums/SDKDocsEntityType";
|
|
2
|
-
import { DocsEntityConfiguration
|
|
3
|
+
import { DocsEntityConfiguration } from "./SDKDocsEntityConfiguration";
|
|
3
4
|
export type DocsEntityModel = {
|
|
4
5
|
persistentId: string;
|
|
5
6
|
shortPersistentId: string;
|
|
@@ -9,7 +10,8 @@ export type DocsEntityModel = {
|
|
|
9
10
|
type: DocsEntityType;
|
|
10
11
|
slug: string;
|
|
11
12
|
userSlug?: string;
|
|
12
|
-
|
|
13
|
+
path?: string;
|
|
14
|
+
configuration: DocumentationItemConfigurationV2;
|
|
13
15
|
createdAt?: string;
|
|
14
16
|
updatedAt?: string;
|
|
15
17
|
};
|
|
@@ -21,6 +23,7 @@ export declare class DocsEntity {
|
|
|
21
23
|
configuration: DocsEntityConfiguration;
|
|
22
24
|
slug: string;
|
|
23
25
|
userSlug: string | null;
|
|
26
|
+
relativeUrl: string | null;
|
|
24
27
|
createdAt: Date | null;
|
|
25
28
|
updatedAt: Date | null;
|
|
26
29
|
constructor(model: DocsEntityModel);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocumentationItemConfigurationV2 } from "@supernova-studio/model";
|
|
1
2
|
import { DocsEntityHeader, DocsEntityHeaderModel } from "./SDKDocsEntityHeader";
|
|
2
3
|
export type DocsEntityConfigurationModel = {
|
|
3
4
|
header: DocsEntityHeaderModel;
|
|
@@ -6,5 +7,9 @@ export type DocsEntityConfigurationModel = {
|
|
|
6
7
|
export declare class DocsEntityConfiguration {
|
|
7
8
|
header: DocsEntityHeader;
|
|
8
9
|
showSidebar: boolean;
|
|
9
|
-
|
|
10
|
+
title: string;
|
|
11
|
+
constructor(model: DocumentationItemConfigurationV2, title: string);
|
|
12
|
+
/** Constructs representation that can be used to write full object to remote */
|
|
13
|
+
toRemote(): DocumentationItemConfigurationV2;
|
|
14
|
+
static default(): DocsEntityConfiguration;
|
|
10
15
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DocsEntityGroupBehavior } from "../../enums/SDKDocsEntityGroupBehavior";
|
|
2
|
+
import { DocsEntityType } from "../../enums/SDKDocsEntityType";
|
|
2
3
|
import { DocsEntity, DocsEntityModel } from "./SDKDocsEntity";
|
|
3
|
-
|
|
4
|
+
import { DocsEntityMultiplayerPage, DocsEntityPage } from "./SDKDocsEntityPage";
|
|
5
|
+
export type DocsEntityGroupModel = {
|
|
4
6
|
isRoot: boolean;
|
|
5
7
|
childrenIds: Array<string>;
|
|
6
8
|
parentId: string | null;
|
|
@@ -11,6 +13,8 @@ export declare class DocsEntityGroup extends DocsEntity {
|
|
|
11
13
|
isRoot: boolean;
|
|
12
14
|
/** IDs of items belonging to the documentation group. Can be page or group */
|
|
13
15
|
childrenIds: Array<string>;
|
|
16
|
+
/** References to pages */
|
|
17
|
+
children: Array<DocsEntityGroup | DocsEntityPage>;
|
|
14
18
|
/** Parent group reference */
|
|
15
19
|
parentId: string | null;
|
|
16
20
|
/** Signifies how the group should behave. If set to "tabs", group behaves as "page", but contains multiple tabbed pages inside it. "Group" signifies virtual group used for content structuring */
|
|
@@ -19,7 +23,7 @@ export declare class DocsEntityGroup extends DocsEntity {
|
|
|
19
23
|
relativeFirstPageUrl: string | null;
|
|
20
24
|
/** Internal */
|
|
21
25
|
deployedFirstPageUrl: string | null;
|
|
22
|
-
constructor(model:
|
|
26
|
+
constructor(model: DocsEntityGroupModel);
|
|
23
27
|
/** Internal: Modifies object with new paths. Don't use outside SDK environment as it doesn't propagate the data back to source */
|
|
24
28
|
internalOverridePaths(relative: string | null, deployed: string | null): void;
|
|
25
29
|
/** Retrieve relative page path without the associated domain for the first page in the group. Will work even when documentation was not yet deployed */
|
|
@@ -27,3 +31,21 @@ export declare class DocsEntityGroup extends DocsEntity {
|
|
|
27
31
|
/** Retrieve page url for the first page in the group, if the documentation was already deployed (either default or custom domain) */
|
|
28
32
|
deployedDocsPageUrl(): string | null;
|
|
29
33
|
}
|
|
34
|
+
/** Lightweight page representation used in multiplayer context type-validated against the full version */
|
|
35
|
+
export declare class DocsEntityMultiplayerGroup implements Pick<DocsEntityGroup, "id" | "persistentId" | "type" | "title" | "groupBehavior" | "childrenIds" | "isRoot"> {
|
|
36
|
+
id: string;
|
|
37
|
+
persistentId: string;
|
|
38
|
+
type: DocsEntityType.group;
|
|
39
|
+
title: string;
|
|
40
|
+
groupBehavior: DocsEntityGroupBehavior;
|
|
41
|
+
childrenIds: Array<string>;
|
|
42
|
+
isRoot: boolean;
|
|
43
|
+
parent: DocsEntityMultiplayerGroup | null;
|
|
44
|
+
children: Array<DocsEntityMultiplayerGroup | DocsEntityMultiplayerPage>;
|
|
45
|
+
/** Children filtered to be only groups */
|
|
46
|
+
get subgroups(): Array<DocsEntityMultiplayerGroup>;
|
|
47
|
+
/** Children filtered to be only pages */
|
|
48
|
+
get pages(): Array<DocsEntityMultiplayerPage>;
|
|
49
|
+
parentId: string | null;
|
|
50
|
+
constructor(model: DocsEntityGroupModel);
|
|
51
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { DocumentationItemHeaderV2 } from "@supernova-studio/model";
|
|
1
2
|
import { Alignment } from "../../enums/SDKAlignment";
|
|
2
3
|
import { AssetScaleType } from "../../enums/SDKAssetScaleType";
|
|
3
4
|
import { DocsColorRef } from "../blocks/support/SDKDocsColorRef";
|
|
5
|
+
import { DocsImageRef } from "../blocks/support/SDKDocsImageRef";
|
|
4
6
|
export type DocsEntityHeaderModel = {
|
|
5
7
|
description: string;
|
|
6
8
|
alignment: Alignment;
|
|
7
9
|
foregroundColor?: DocsColorRef;
|
|
8
10
|
backgroundColor?: DocsColorRef;
|
|
11
|
+
backgroundImageAsset?: DocsImageRef;
|
|
9
12
|
backgroundImageScaleType: AssetScaleType;
|
|
10
13
|
showBackgroundOverlay: boolean;
|
|
11
14
|
showCoverText: boolean;
|
|
@@ -13,11 +16,14 @@ export type DocsEntityHeaderModel = {
|
|
|
13
16
|
};
|
|
14
17
|
export declare class DocsEntityHeader {
|
|
15
18
|
description: string;
|
|
16
|
-
alignment:
|
|
19
|
+
alignment: "Left" | "Center";
|
|
17
20
|
foregroundColor: DocsColorRef | null;
|
|
18
21
|
backgroundColor: DocsColorRef | null;
|
|
22
|
+
backgroundImage: DocsImageRef | null;
|
|
19
23
|
showBackgroundOverlay: boolean;
|
|
20
24
|
showCoverText: boolean;
|
|
21
25
|
minHeight: number | null;
|
|
22
|
-
|
|
26
|
+
backgroundImageScale: "AspectFill" | "AspectFit";
|
|
27
|
+
constructor(model: DocumentationItemHeaderV2);
|
|
28
|
+
toRemote(): DocumentationItemHeaderV2;
|
|
23
29
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { DocsEntityType } from "../../enums/SDKDocsEntityType";
|
|
1
2
|
import { DocsEntity, DocsEntityModel } from "./SDKDocsEntity";
|
|
3
|
+
import { DocsEntityMultiplayerGroup } from "./SDKDocsEntityGroup";
|
|
2
4
|
export type DocsEntityPageModel = {
|
|
3
5
|
childrenIds: Array<string>;
|
|
4
6
|
} & DocsEntityModel;
|
|
@@ -23,3 +25,15 @@ export declare class DocsEntityPage extends DocsEntity {
|
|
|
23
25
|
/** Retrieve relative page path without the associated domain. Will work even when documentation was not yet deployed */
|
|
24
26
|
relativePageUrl(): string | null;
|
|
25
27
|
}
|
|
28
|
+
/** Lightweight page representation used in multiplayer context type-validated against the full version */
|
|
29
|
+
export declare class DocsEntityMultiplayerPage implements Pick<DocsEntityPage, "id" | "persistentId" | "type" | "title" | "relativeUrl" | "createdAt"> {
|
|
30
|
+
id: string;
|
|
31
|
+
persistentId: string;
|
|
32
|
+
parentId: string | null;
|
|
33
|
+
parent: DocsEntityMultiplayerGroup | null;
|
|
34
|
+
type: DocsEntityType.page;
|
|
35
|
+
title: string;
|
|
36
|
+
relativeUrl: string | null;
|
|
37
|
+
createdAt: Date | null;
|
|
38
|
+
constructor(model: DocsEntityPageModel);
|
|
39
|
+
}
|
|
@@ -10,7 +10,7 @@ export type DocumentationLegacyPageAssetModel = {
|
|
|
10
10
|
figmaFrame?: DocumentationLegacyPageBlockFrameModel;
|
|
11
11
|
};
|
|
12
12
|
export declare class DocumentationLegacyPageAsset {
|
|
13
|
-
id
|
|
13
|
+
id?: string;
|
|
14
14
|
persistentId: string | null;
|
|
15
15
|
sourceId: string | null;
|
|
16
16
|
sourceFrameId: string | null;
|
|
@@ -27,7 +27,7 @@ export declare class DocumentationLegacyPageBlockRenderCode extends Documentatio
|
|
|
27
27
|
sandboxType: DocumentationLegacyPageBlockRenderCodeEnvironmentType;
|
|
28
28
|
constructor(model: DocumentationLegacyPageBlockRenderCodeModel, children: Array<DocumentationLegacyPageBlock>, configuration: DocumentationLegacyConfiguration);
|
|
29
29
|
private encodeSandboxData;
|
|
30
|
-
btoaUnicode(str: any): string;
|
|
30
|
+
btoaUnicode(str: any): string | null;
|
|
31
31
|
atobUnicode(str: any): string;
|
|
32
32
|
}
|
|
33
33
|
export {};
|
|
@@ -14,7 +14,7 @@ export declare enum ElementPropertyTargetElementType {
|
|
|
14
14
|
documentationPage = "DocumentationPage"
|
|
15
15
|
}
|
|
16
16
|
export declare enum ElementPropertyLinkElementType {
|
|
17
|
-
documentationItem = "
|
|
17
|
+
documentationItem = "DocumentationPage",
|
|
18
18
|
figmaComponent = "FigmaComponent"
|
|
19
19
|
}
|
|
20
20
|
export type ElementPropertyRemoteModel = {
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
declare const badgeColorValues: {
|
|
2
|
+
readonly blue: "#EDF5FF";
|
|
3
|
+
readonly cyan: "#D5FBFE";
|
|
4
|
+
readonly fuchsia: "#FCF0FF";
|
|
5
|
+
readonly green: "#EBFEF6";
|
|
6
|
+
readonly grey: "#EDEFF3";
|
|
7
|
+
readonly "light-grey": "#F6F7F9";
|
|
8
|
+
readonly orange: "#FFF2E1";
|
|
9
|
+
readonly pink: "#FDF0F7";
|
|
10
|
+
readonly purple: "#F5F2FD";
|
|
11
|
+
readonly red: "#FEF1F2";
|
|
12
|
+
readonly teal: "#DFFDF6";
|
|
13
|
+
readonly yellow: "#FEF9C3";
|
|
14
|
+
readonly custom: null;
|
|
15
|
+
};
|
|
16
|
+
export type ElementPropertyOptionBadgeColor = keyof typeof badgeColorValues;
|
|
2
17
|
export type ElementPropertyOptionRemoteModel = {
|
|
3
18
|
id: string;
|
|
4
19
|
name: string;
|
|
@@ -13,10 +28,17 @@ export declare class ElementPropertyOption {
|
|
|
13
28
|
name: string;
|
|
14
29
|
backgroundColor: string | null;
|
|
15
30
|
constructor(model: ElementPropertyOptionRemoteModel);
|
|
16
|
-
|
|
31
|
+
static toHex6(rawColor: string): string;
|
|
32
|
+
/** Constructs directly manipulable update object for property option */
|
|
17
33
|
toUpdateObject(): ElementPropertyOptionUpdateModel;
|
|
18
|
-
/** Returns background color represented as badge color.
|
|
34
|
+
/** Returns background color represented as badge color.
|
|
35
|
+
* If badge color is different from what badge defines as base, return `custom`.
|
|
36
|
+
* */
|
|
19
37
|
asBadgeColor(): ElementPropertyOptionBadgeColor;
|
|
20
|
-
/**
|
|
21
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Sets background color from hex color or badge color name.
|
|
40
|
+
* @param color - Hex color or badge color name
|
|
41
|
+
*/
|
|
42
|
+
setBackgroundColor(color: string): void;
|
|
22
43
|
}
|
|
44
|
+
export {};
|
|
@@ -3,31 +3,32 @@ export declare enum CodeLanguage {
|
|
|
3
3
|
bash = "Bash",
|
|
4
4
|
c = "C",
|
|
5
5
|
cpp = "Cpp",
|
|
6
|
+
css = "CSS",
|
|
6
7
|
csharp = "Csharp",
|
|
7
8
|
dart = "Dart",
|
|
8
9
|
handlebars = "Handlebars",
|
|
9
|
-
html = "
|
|
10
|
+
html = "HTML",
|
|
10
11
|
java = "Java",
|
|
11
12
|
javascript = "Javascript",
|
|
12
|
-
json = "
|
|
13
|
-
reactJsx = "
|
|
14
|
-
reactTsx = "
|
|
13
|
+
json = "JSON",
|
|
14
|
+
reactJsx = "ReactJSX",
|
|
15
|
+
reactTsx = "ReactTSX",
|
|
15
16
|
kotlin = "Kotlin",
|
|
16
17
|
lua = "Lua",
|
|
17
18
|
markdown = "Markdown",
|
|
18
19
|
objectiveC = "ObjectiveC",
|
|
19
|
-
php = "
|
|
20
|
+
php = "PHP",
|
|
20
21
|
plain = "Plain",
|
|
21
22
|
python = "Python",
|
|
22
23
|
ruby = "Ruby",
|
|
23
24
|
rust = "Rust",
|
|
24
25
|
sass = "Sass",
|
|
25
|
-
scss = "
|
|
26
|
+
scss = "SCSS",
|
|
26
27
|
svelte = "Svelte",
|
|
27
28
|
swift = "Swift",
|
|
28
29
|
twig = "Twig",
|
|
29
30
|
typescript = "Typescript",
|
|
30
31
|
vue = "Vue",
|
|
31
|
-
xml = "
|
|
32
|
-
yaml = "
|
|
32
|
+
xml = "XML",
|
|
33
|
+
yaml = "YAML"
|
|
33
34
|
}
|
|
@@ -8,5 +8,5 @@ export declare enum DocsBlockBehaviorDataType {
|
|
|
8
8
|
/** Component type allows selection of asset entity and associated groups * */
|
|
9
9
|
component = "Component",
|
|
10
10
|
/** Figma frame type allows selection of any frame coming from Figma * */
|
|
11
|
-
|
|
11
|
+
figmaNode = "FigmaNode"
|
|
12
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare enum DocsBlockItemPropertyType {
|
|
2
2
|
/** Rich text property allows user to input rich text (with additional attributes like bold, links etc.) */
|
|
3
3
|
richText = "RichText",
|
|
4
|
+
/** Rich text property allows user to input multiple paragraphs of rich text (with additional attributes like bold, links etc.) */
|
|
5
|
+
multiRichText = "MultiRichText",
|
|
4
6
|
/** Text property allows user to input plain text */
|
|
5
7
|
text = "Text",
|
|
6
8
|
/** Boolean property allows user to input true/false value */
|
|
@@ -45,5 +47,9 @@ export declare enum DocsBlockItemPropertyType {
|
|
|
45
47
|
/** Divider property that puts visual divider into the block. It has no user input */
|
|
46
48
|
divider = "Divider",
|
|
47
49
|
/** Storybook property allows user to add Storybook story to render */
|
|
48
|
-
storybook = "Storybook"
|
|
50
|
+
storybook = "Storybook",
|
|
51
|
+
/** Color property allows users to select color for further use */
|
|
52
|
+
color = "Color",
|
|
53
|
+
/** Figma node property (frames, sections, etc.) */
|
|
54
|
+
figmaNode = "FigmaNode"
|
|
49
55
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare enum DocsBlockItemVariantLayoutGap {
|
|
2
2
|
/** small gap between columns/row */
|
|
3
|
-
small = "
|
|
3
|
+
small = "Small",
|
|
4
4
|
/** medium gap between columns/row */
|
|
5
|
-
medium = "
|
|
5
|
+
medium = "Medium",
|
|
6
6
|
/** large gap between columns/row */
|
|
7
|
-
large = "
|
|
7
|
+
large = "Large",
|
|
8
8
|
/** no gap between columns/row */
|
|
9
|
-
none = "
|
|
9
|
+
none = "None"
|
|
10
10
|
}
|
|
@@ -20,5 +20,7 @@ export declare enum DocsBlockTextPropertyStyle {
|
|
|
20
20
|
/** Small bold text */
|
|
21
21
|
smallBold = "SmallBold",
|
|
22
22
|
/** Small semibold text */
|
|
23
|
-
smallSemibold = "SmallSemibold"
|
|
23
|
+
smallSemibold = "SmallSemibold",
|
|
24
|
+
/** Custom (will render as text field) */
|
|
25
|
+
custom = "Custom"
|
|
24
26
|
}
|