@supernova-studio/supernova-sdk-beta 1.6.30 → 1.6.32
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 +7 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +1 -14
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +34 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaMultiplayer.d.ts +10 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +28 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +4 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +27 -16
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +13 -7
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +16 -7
- package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +4 -0
- package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +1 -1
- package/build/sdk-typescript/src/exports-pulsar.d.ts +1 -1
- package/build/sdk-typescript/src/exports.d.ts +21 -2
- 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 +7 -23
- package/build/sdk-typescript/src/model/docs/blocks/definition/{SDKDocsBlockItem.d.ts → SDKDocsBlockItemDefinition.d.ts} +5 -12
- 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 +4 -14
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/assets/SDKDocsBlockActualAssets.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code/SDKDocsBlockActualCode.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/code-react/SDKDocsBlockActualCodeReact.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist/SDKDocsBlockActualComponentChecklist.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-checklist-all/SDKDocsBlockActualComponentChecklistAll.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/component-health/SDKDocsBlockActualComponentHealth.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/figma-frames/SDKDocsBlockActualFigmaFrames.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/link/SDKDocsBlockActualLink.d.ts +8 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-multi-item/SDKDocsBlockActualOmniMultiItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/omni-single-item/SDKDocsBlockActualOmniSingleItem.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/release-notes/SDKDocsBlockActualReleaseNotes.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +8 -1
- 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 +5 -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 +7 -2
- 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 +2 -0
- 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 +7 -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 +10 -1
- 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 +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +14 -0
- package/build/sdk-typescript/src/model/docs/blocks/support/SDKDocsImageRef.d.ts +5 -2
- 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 -30
- package/build/sdk-typescript/src/model/docs/blocks/usage/SDKDocsBlockItem.d.ts +16 -0
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityHeader.d.ts +3 -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/enums/SDKDocsBlockAssetPropertyPreviewContainerSize.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyAspectRatio.d.ts +4 -2
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockImagePropertyWidth.d.ts +2 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +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/SDKDocsPublishStatus.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKSourceType.d.ts +2 -1
- 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/exporter_builds/SDKExportBuild.d.ts +6 -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/SDKResource.d.ts +26 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceAsset.d.ts +6 -0
- package/build/sdk-typescript/src/model/resources/SDKResourceFont.d.ts +15 -0
- package/build/sdk-typescript/src/model/support/SDKFigmaFrame.d.ts +2 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +20 -4
- 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 +6 -6
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
- 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/SDKTokenValue.d.ts +2 -2
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +10 -4
- 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 +40 -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/TokenUtilPreviewStyleGenerator.d.ts +4 -1
- package/build/sdk-typescript/src/utils/CommonUtils.d.ts +5 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +3 -3
- 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 +118 -118
|
@@ -1,27 +1,11 @@
|
|
|
1
|
+
import { PageBlockDefinition } from "@supernova-studio/model";
|
|
1
2
|
import { DocsBlockMode } from "../../../enums/SDKDocBlockMode";
|
|
2
3
|
import { DocsBlockCategory } from "../../../enums/SDKDocsBlockCategory";
|
|
3
4
|
import { DocsImageRef } from "../support/SDKDocsImageRef";
|
|
4
|
-
import { DocsBlockBehavior
|
|
5
|
-
import {
|
|
6
|
-
import { DocsBlockOnboarding
|
|
7
|
-
export type DocsBlockDefinitionModel =
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
category: DocsBlockCategory;
|
|
12
|
-
icon?: DocsImageRef;
|
|
13
|
-
documentationLink?: string;
|
|
14
|
-
searchKeywords?: Array<string>;
|
|
15
|
-
item: DocsBlockItemModel;
|
|
16
|
-
behavior: DocsBlockBehaviorModel;
|
|
17
|
-
editorOptions?: {
|
|
18
|
-
onboarding?: DocsBlockOnboardingModel;
|
|
19
|
-
};
|
|
20
|
-
appearance?: {
|
|
21
|
-
isBordered?: boolean;
|
|
22
|
-
hasBackground?: boolean;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
5
|
+
import { DocsBlockBehavior } from "./SDKDocsBlockBehavior";
|
|
6
|
+
import { DocsBlockItemDefinition } from "./SDKDocsBlockItemDefinition";
|
|
7
|
+
import { DocsBlockOnboarding } from "./SDKDocsBlockOnboarding";
|
|
8
|
+
export type DocsBlockDefinitionModel = PageBlockDefinition;
|
|
25
9
|
export declare class DocsBlockDefinition {
|
|
26
10
|
/** Unique id of the block. Block id must be unique across all blocks registered to Supernova in preparation for block store. Reserved ids will be created for all core blocks and they'll be installed by default to every exporter */
|
|
27
11
|
id: string;
|
|
@@ -36,8 +20,8 @@ export declare class DocsBlockDefinition {
|
|
|
36
20
|
/** Link to documentation or resource explaining the behavior of the block and its options */
|
|
37
21
|
documentationLink: string | null;
|
|
38
22
|
searchKeywords: Array<string>;
|
|
39
|
-
/** Primary definition of the block. See
|
|
40
|
-
item:
|
|
23
|
+
/** Primary definition of the block. See DocsBlockItemDefinition for more information */
|
|
24
|
+
item: DocsBlockItemDefinition;
|
|
41
25
|
/** Primary definition of the layered block behavior. See Block Behaviors for more information */
|
|
42
26
|
behavior: DocsBlockBehavior;
|
|
43
27
|
/** Top-level editor options for the block itself (but not for its items). This configuration has no bearing on front-end side of rendering and is only for editor */
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
+
import { PageBlockDefinitionItem } from "@supernova-studio/model";
|
|
1
2
|
import { DocsBlockItemPropertyAnyDefinition } from "../properties/SDKDocsBlockProperty";
|
|
2
|
-
import { DocsBlockVariant
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
appearance?: {
|
|
6
|
-
isBordered?: boolean;
|
|
7
|
-
hasBackground?: boolean;
|
|
8
|
-
};
|
|
9
|
-
variants: Array<DocsBlockVariantModel>;
|
|
10
|
-
defaultVariantKey: string;
|
|
11
|
-
};
|
|
12
|
-
export declare class DocsBlockItem {
|
|
3
|
+
import { DocsBlockVariant } from "./SDKDocsBlockVariant";
|
|
4
|
+
export type DocsBlockItemDefinitionModel = PageBlockDefinitionItem;
|
|
5
|
+
export declare class DocsBlockItemDefinition {
|
|
13
6
|
/** All properties that user can potentially input via one block / item */
|
|
14
7
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
15
8
|
/** All appearance options for item wrapper */
|
|
@@ -23,5 +16,5 @@ export declare class DocsBlockItem {
|
|
|
23
16
|
variants: Array<DocsBlockVariant>;
|
|
24
17
|
/** Key of the default variant. There must always be at least one variant to point to */
|
|
25
18
|
defaultVariantKey: string;
|
|
26
|
-
constructor(model:
|
|
19
|
+
constructor(model: DocsBlockItemDefinitionModel);
|
|
27
20
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
+
import { PageBlockDefinitionLayout } from "@supernova-studio/model";
|
|
1
2
|
import { DocsBlockItemVariantLayoutAlign } from "../../../enums/SDKDocsBlockItemVariantLayoutAlign";
|
|
2
3
|
import { DocsBlockItemVariantLayoutColumnResizing } from "../../../enums/SDKDocsBlockItemVariantLayoutColumnResizing";
|
|
3
4
|
import { DocsBlockItemVariantLayoutGap } from "../../../enums/SDKDocsBlockItemVariantLayoutGap";
|
|
4
5
|
import { DocsBlockItemVariantLayoutType } from "../../../enums/SDKDocsBlockItemVariantLayoutType";
|
|
5
|
-
export type DocsBlockLayoutModel =
|
|
6
|
-
type: DocsBlockItemVariantLayoutType;
|
|
7
|
-
children: Array<DocsBlockLayoutModel | string>;
|
|
8
|
-
gap?: DocsBlockItemVariantLayoutGap;
|
|
9
|
-
columnAlign?: DocsBlockItemVariantLayoutAlign;
|
|
10
|
-
columnResizing?: DocsBlockItemVariantLayoutColumnResizing;
|
|
11
|
-
};
|
|
6
|
+
export type DocsBlockLayoutModel = PageBlockDefinitionLayout;
|
|
12
7
|
export declare class DocsBlockLayout {
|
|
13
8
|
/** Type of a single node of the layout, either column for stacking vertically, or row for stacking horizontally */
|
|
14
9
|
type: DocsBlockItemVariantLayoutType;
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
+
import { PageBlockDefinitionVariant } from "@supernova-studio/model";
|
|
1
2
|
import { DocsBlockLayout } from "./SDKDocsBlockLayout";
|
|
2
|
-
export type DocsBlockVariantModel =
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
image: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
documentationLink?: string;
|
|
8
|
-
layout: DocsBlockLayout;
|
|
9
|
-
maxColumns?: number;
|
|
10
|
-
defaultColumns?: number;
|
|
11
|
-
appearance?: {
|
|
12
|
-
isBordered?: boolean;
|
|
13
|
-
hasBackground?: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
3
|
+
export type DocsBlockVariantModel = PageBlockDefinitionVariant;
|
|
16
4
|
export declare class DocsBlockVariant {
|
|
17
5
|
/** Variant id, validated to be unique within a block, but not necessarily unique across all blocks */
|
|
18
6
|
id: string;
|
|
@@ -36,6 +24,8 @@ export declare class DocsBlockVariant {
|
|
|
36
24
|
isBordered: boolean;
|
|
37
25
|
/** When background option is enabled, background color can be set for the item */
|
|
38
26
|
hasBackground: boolean;
|
|
27
|
+
/** When enabled, signifies that variants renders differently in the editor and in the published version */
|
|
28
|
+
isEditorPresentationDifferent: boolean;
|
|
39
29
|
};
|
|
40
30
|
constructor(model: DocsBlockVariantModel);
|
|
41
31
|
}
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DocsBlockAssetPropertyPreviewContainerSize } from "../../../enums/SDKDocsBlockAssetPropertyPreviewContainerSize";
|
|
1
2
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
3
|
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
3
4
|
/** Asset property - Additional non-value options */
|
|
@@ -5,10 +6,16 @@ export type DocsBlockAssetPropertyOptions = Record<string, never>;
|
|
|
5
6
|
/** Asset property - Data */
|
|
6
7
|
export type DocsBlockAssetPropertyData = DocsBlockPropertyData<Array<{
|
|
7
8
|
entityId: string;
|
|
8
|
-
entityType: "
|
|
9
|
+
entityType: "Asset" | "AssetGroup";
|
|
9
10
|
}>> & {
|
|
10
11
|
/** Selected asset ids */
|
|
11
12
|
selectedPropertyIds?: Array<string>;
|
|
13
|
+
/** If enabled, search is visible */
|
|
14
|
+
showSearch?: boolean;
|
|
15
|
+
/** Preview container size */
|
|
16
|
+
previewContainerSize?: DocsBlockAssetPropertyPreviewContainerSize.centered | DocsBlockAssetPropertyPreviewContainerSize.naturalHeight;
|
|
17
|
+
/** If enabled, each assets uses this for background */
|
|
18
|
+
backgroundColor?: string;
|
|
12
19
|
};
|
|
13
20
|
/** Asset property - Definition model */
|
|
14
21
|
export type DocsBlockAssetPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockAssetPropertyOptions;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type DocsBlockBooleanPropertyOptions = {
|
|
|
6
6
|
/** Default value to set when block is created */
|
|
7
7
|
defaultValue?: boolean;
|
|
8
8
|
/** Visual representation of the property */
|
|
9
|
-
|
|
9
|
+
booleanStyle?: Exclude<DocsBlockItemPropertyOptionRenderingStyle, DocsBlockItemPropertyOptionRenderingStyle.select>;
|
|
10
10
|
};
|
|
11
11
|
/** Boolean property - Data */
|
|
12
12
|
export type DocsBlockBooleanPropertyData = DocsBlockPropertyData<boolean> & Record<string, never>;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
2
|
import { DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel, DocsBlockPropertyData } from "./SDKDocsBlockProperty";
|
|
3
3
|
/** Code Sandbox property - Additional non-value options */
|
|
4
|
-
export type DocsBlockCodeSandboxPropertyOptions =
|
|
4
|
+
export type DocsBlockCodeSandboxPropertyOptions = {
|
|
5
|
+
/** How should we render the code example in editor */
|
|
6
|
+
renderLayoutAs?: "PreviewOnTop" | "PreviewOnBottom" | "PreviewOnLeft" | "PreviewOnRight";
|
|
7
|
+
};
|
|
5
8
|
/** Code Sandbox property - Data */
|
|
6
9
|
export type DocsBlockCodeSandboxPropertyData = DocsBlockPropertyData<string> & {
|
|
7
10
|
showCode?: boolean;
|
|
8
11
|
backgroundColor?: string;
|
|
9
|
-
alignPreview?: "
|
|
12
|
+
alignPreview?: "Left" | "Center";
|
|
10
13
|
};
|
|
11
14
|
/** Code Sandbox property - Definition model */
|
|
12
15
|
export type DocsBlockCodeSandboxPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockCodeSandboxPropertyOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
|
+
import { ColorTokenValue } from "../../../tokens/SDKTokenValue";
|
|
3
|
+
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
4
|
+
/** Color property - Additional non-value options */
|
|
5
|
+
export type DocsBlockColorPropertyOptions = Record<string, never>;
|
|
6
|
+
/** Color property - Data */
|
|
7
|
+
export type DocsBlockColorPropertyData = DocsBlockPropertyData<ColorTokenValue> & Record<string, never>;
|
|
8
|
+
/** Color property - Definition model */
|
|
9
|
+
export type DocsBlockColorPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockColorPropertyOptions;
|
|
10
|
+
/** Color property - Definition */
|
|
11
|
+
export declare class DocsBlockColorPropertyDefinition extends DocsBlockPropertyDefinition<DocsBlockColorPropertyOptions, DocsBlockColorPropertyData> {
|
|
12
|
+
type: DocsBlockItemPropertyType.color;
|
|
13
|
+
}
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
2
|
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
3
3
|
/** Component property - Additional non-value options */
|
|
4
|
-
export type DocsBlockComponentPropertyOptions =
|
|
4
|
+
export type DocsBlockComponentPropertyOptions = {
|
|
5
|
+
/** How should the tokens be rendered in editor */
|
|
6
|
+
renderLayoutAs?: "List" | "Table";
|
|
7
|
+
/** Whether to allow selecting component custom properties. True by default */
|
|
8
|
+
allowPropertySelection?: boolean;
|
|
9
|
+
};
|
|
5
10
|
/** Component property - Data */
|
|
6
11
|
export type DocsBlockComponentPropertyData = DocsBlockPropertyData<Array<{
|
|
7
12
|
entityId: string;
|
|
8
|
-
entityType: "
|
|
13
|
+
entityType: "Component" | "ComponentGroup";
|
|
9
14
|
}>> & {
|
|
10
15
|
/** Selected component ids */
|
|
11
16
|
selectedPropertyIds?: Array<string>;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocumentationLegacyRichTextModel } from "../../../documentation/SDKDocumentationLegacyRichText";
|
|
2
|
+
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
3
|
+
import { DocsBlockMultiRichTextPropertyStyle } from "../../../enums/SDKDocsBlockMultiRichTextPropertyStyle";
|
|
4
|
+
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
5
|
+
/** RichText property - Additional non-value options */
|
|
6
|
+
export type DocsBlockMultiRichTextPropertyOptions = {
|
|
7
|
+
/** Placeholder to show when rich text area is empty */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Visual style of the rich text property */
|
|
10
|
+
multiRichTextStyle?: DocsBlockMultiRichTextPropertyStyle;
|
|
11
|
+
};
|
|
12
|
+
/** RichText property - Data */
|
|
13
|
+
export type DocsBlockMultiRichTextPropertyData = DocsBlockPropertyData<Array<DocumentationLegacyRichTextModel>>;
|
|
14
|
+
/** RichText property - Definition model */
|
|
15
|
+
export type DocsBlockRichTextPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockMultiRichTextPropertyOptions;
|
|
16
|
+
/** RichText property - Definition */
|
|
17
|
+
export declare class DocsBlockMultiRichTextPropertyDefinition extends DocsBlockPropertyDefinition<DocsBlockMultiRichTextPropertyOptions, DocsBlockMultiRichTextPropertyData> {
|
|
18
|
+
type: DocsBlockItemPropertyType.multiRichText;
|
|
19
|
+
}
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type DocsBlockMultiSelectPropertyOptions = {
|
|
|
9
9
|
name: string;
|
|
10
10
|
icon?: string;
|
|
11
11
|
}>;
|
|
12
|
-
|
|
12
|
+
multiSelectStyle?: Exclude<DocsBlockOptionRenderingStyle, DocsBlockOptionRenderingStyle.toggleButton>;
|
|
13
13
|
};
|
|
14
14
|
/** MultiSelect property - Data */
|
|
15
15
|
export type DocsBlockMultiSelectPropertyData = DocsBlockPropertyData<Array<string>> & Record<string, never>;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type DocsBlockNumberPropertyOptions = {
|
|
|
10
10
|
max: number;
|
|
11
11
|
/** Step value */
|
|
12
12
|
step: number;
|
|
13
|
+
/** Field placeholder */
|
|
14
|
+
placeholder?: string;
|
|
13
15
|
};
|
|
14
16
|
/** Number property - Data */
|
|
15
17
|
export type DocsBlockNumberPropertyData = DocsBlockPropertyData<number> & Record<string, never>;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
+
import { PageBlockDefinitionProperty } from "@supernova-studio/model";
|
|
1
2
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
|
-
export type DocsBlockPropertyDefinitionModel =
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
type: DocsBlockItemPropertyType;
|
|
6
|
-
description?: string;
|
|
7
|
-
options?: object | Record<string, never>;
|
|
8
|
-
variantOptions?: {
|
|
9
|
-
[key: string]: object | Record<string, never>;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
3
|
+
export type DocsBlockPropertyDefinitionModel = PageBlockDefinitionProperty;
|
|
12
4
|
export type DocsBlockPropertyData<T> = {
|
|
13
5
|
value: T;
|
|
14
6
|
};
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentationLegacyRichTextModel } from "../../../documentation/SDKDocumentationLegacyRichText";
|
|
2
2
|
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
3
3
|
import { DocsBlockRichTextPropertyStyle } from "../../../enums/SDKDocsBlockRichTextPropertyStyle";
|
|
4
|
+
import { DocumentationLegacyCalloutType } from "../../../enums/SDKDocumentationLegacyCalloutType";
|
|
4
5
|
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
5
6
|
/** RichText property - Additional non-value options */
|
|
6
7
|
export type DocsBlockRichTextPropertyOptions = {
|
|
7
8
|
/** Placeholder to show when rich text area is empty */
|
|
8
9
|
placeholder?: string;
|
|
9
10
|
/** Visual style of the rich text property */
|
|
10
|
-
|
|
11
|
+
richTextStyle?: DocsBlockRichTextPropertyStyle;
|
|
11
12
|
};
|
|
12
13
|
/** RichText property - Data */
|
|
13
|
-
export type DocsBlockRichTextPropertyData = DocsBlockPropertyData<
|
|
14
|
+
export type DocsBlockRichTextPropertyData = DocsBlockPropertyData<DocumentationLegacyRichTextModel> & {
|
|
15
|
+
/** Selected token ids */
|
|
16
|
+
calloutType?: DocumentationLegacyCalloutType;
|
|
17
|
+
};
|
|
14
18
|
/** RichText property - Definition model */
|
|
15
19
|
export type DocsBlockRichTextPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockRichTextPropertyOptions;
|
|
16
20
|
/** RichText property - Definition */
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type DocsBlockSingleSelectPropertyOptions = {
|
|
|
15
15
|
icon?: string;
|
|
16
16
|
}>;
|
|
17
17
|
/** Visual representation of the property */
|
|
18
|
-
|
|
18
|
+
singleSelectStyle?: DocsBlockOptionRenderingStyle;
|
|
19
19
|
};
|
|
20
20
|
/** SingleSelect property - Data */
|
|
21
21
|
export type DocsBlockSingleSelectPropertyData = DocsBlockPropertyData<string> & Record<string, never>;
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
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
14
|
export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<string> & {
|
|
6
15
|
caption?: string;
|
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;
|
|
@@ -4,12 +4,12 @@ import { DocsBlockTextPropertyStyle } from "../../../enums/SDKDocsBlockTextPrope
|
|
|
4
4
|
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
5
5
|
/** Text property - Additional non-value options */
|
|
6
6
|
export type DocsBlockTextPropertyOptions = {
|
|
7
|
-
/**
|
|
7
|
+
/** Field placeholder */
|
|
8
8
|
placeholder?: string;
|
|
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
|
@@ -6,7 +6,7 @@ export type DocsBlockTokenPropertyOptions = {
|
|
|
6
6
|
/** Token types that are allowed to be selected. All types allowed if nothing is provided */
|
|
7
7
|
allowedTypes?: Array<TokenType>;
|
|
8
8
|
/** How should the tokens be rendered in editor */
|
|
9
|
-
renderLayoutAs?: "
|
|
9
|
+
renderLayoutAs?: "Grid" | "List";
|
|
10
10
|
/** Whether to allow selecting token custom properties. True by default */
|
|
11
11
|
allowPropertySelection?: boolean;
|
|
12
12
|
/** Whether to allow selecting themes. True by default */
|
|
@@ -15,7 +15,7 @@ export type DocsBlockTokenPropertyOptions = {
|
|
|
15
15
|
/** Token property - Data */
|
|
16
16
|
export type DocsBlockTokenPropertyData = DocsBlockPropertyData<Array<{
|
|
17
17
|
entityId: string;
|
|
18
|
-
entityType: "
|
|
18
|
+
entityType: "Token" | "TokenGroup";
|
|
19
19
|
}>> & {
|
|
20
20
|
/** Selected token ids */
|
|
21
21
|
selectedPropertyIds?: Array<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
|
|
2
|
+
import { DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel, DocsBlockPropertyData } from "./SDKDocsBlockProperty";
|
|
3
|
+
/** Url property - Additional non-value options */
|
|
4
|
+
export type DocsBlockUrlPropertyOptions = {
|
|
5
|
+
urlValidationRegex?: string;
|
|
6
|
+
};
|
|
7
|
+
/** Url property - Data */
|
|
8
|
+
export type DocsBlockUrlPropertyData = DocsBlockPropertyData<string> & Record<string, never>;
|
|
9
|
+
/** Url property - Definition model */
|
|
10
|
+
export type DocsBlockUrlPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockUrlPropertyOptions;
|
|
11
|
+
/** Url property - Definition */
|
|
12
|
+
export declare class DocsBlockUrlPropertyDefinition extends DocsBlockPropertyDefinition<DocsBlockUrlPropertyOptions, DocsBlockUrlPropertyData> {
|
|
13
|
+
type: DocsBlockItemPropertyType.embedURL;
|
|
14
|
+
}
|
|
@@ -6,8 +6,11 @@ export type DocsImageRef = {
|
|
|
6
6
|
url: string;
|
|
7
7
|
/** Referenced asset, if any */
|
|
8
8
|
assetId?: string;
|
|
9
|
-
/** Referenced
|
|
10
|
-
|
|
9
|
+
/** Referenced Figma file, if any */
|
|
10
|
+
figmaFile?: {
|
|
11
|
+
sourceId: string;
|
|
12
|
+
frameId: string;
|
|
13
|
+
};
|
|
11
14
|
/** Image size, if known */
|
|
12
15
|
size?: {
|
|
13
16
|
width?: number;
|
|
@@ -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,20 +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
|
-
|
|
5
|
-
packageId: string;
|
|
6
|
-
variantId?: string;
|
|
7
|
-
indentLevel: number;
|
|
8
|
-
appearance?: {
|
|
9
|
-
itemBackgroundColor?: DocsColorRef;
|
|
10
|
-
};
|
|
11
|
-
data?: Array<{
|
|
12
|
-
props: {
|
|
13
|
-
[key: string]: object;
|
|
14
|
-
};
|
|
15
|
-
linksTo?: DocsLinkRef;
|
|
16
|
-
}>;
|
|
17
|
-
};
|
|
4
|
+
import { DocsBlockItem } from "./SDKDocsBlockItem";
|
|
5
|
+
export type DocsBlockModel = PageBlockEditorModel;
|
|
18
6
|
export declare class DocsBlock {
|
|
19
7
|
/** Unique identifier of the block */
|
|
20
8
|
id: string;
|
|
@@ -28,20 +16,11 @@ export declare class DocsBlock {
|
|
|
28
16
|
appearance: {
|
|
29
17
|
/** Background color of all items of the block. Can be further overriden on every item */
|
|
30
18
|
itemBackgroundColor: DocsColorRef | null;
|
|
19
|
+
/** Number of columns */
|
|
20
|
+
numberOfColumns?: number;
|
|
31
21
|
};
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
* Property resolution:
|
|
35
|
-
* data > default (in block property definition) > not set
|
|
36
|
-
*/
|
|
37
|
-
data: Array<{
|
|
38
|
-
/** Dynamic key coming from property.id block definition */
|
|
39
|
-
props: {
|
|
40
|
-
[key: string]: object;
|
|
41
|
-
};
|
|
42
|
-
/** Link where the item points to, if any. Must be enabled in behaviors */
|
|
43
|
-
linksTo?: DocsLinkRef;
|
|
44
|
-
}>;
|
|
22
|
+
/** Data of all items of the block */
|
|
23
|
+
data: Array<DocsBlockItem>;
|
|
45
24
|
constructor(model: DocsBlockModel);
|
|
46
25
|
/** Returns stored data of all properties. This will retrieve properties for item on the first position, ideal for single-item blocks */
|
|
47
26
|
allPropertyDataForSingleItem(): Record<string, object> | null;
|
|
@@ -60,7 +39,9 @@ export declare class DocsBlock {
|
|
|
60
39
|
/** Update data for property of specific key and index */
|
|
61
40
|
updatePropertyDataForSingleItem(propertyId: string, data: object): void;
|
|
62
41
|
/** Update link for item at specific index */
|
|
63
|
-
updateLinkForItemAtIndex(index: number, link: DocsLinkRef |
|
|
42
|
+
updateLinkForItemAtIndex(index: number, link: DocsLinkRef | undefined): void;
|
|
64
43
|
/** Update link for item at specific index */
|
|
65
|
-
updateLinkForSingleItem(link: DocsLinkRef |
|
|
44
|
+
updateLinkForSingleItem(link: DocsLinkRef | undefined): void;
|
|
45
|
+
/** Constructs representation that can be used to write full object to remote */
|
|
46
|
+
toRemote(): PageBlockEditorModel;
|
|
66
47
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PageBlockItemV2 } from "@supernova-studio/model";
|
|
2
|
+
import { DocsLinkRef } from "../support/SDKDocsLinkRef";
|
|
3
|
+
export type DocsBlockItemModel = PageBlockItemV2;
|
|
4
|
+
export declare class DocsBlockItem {
|
|
5
|
+
/** Unique identifier of the block item */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Dynamic key coming from property.id block definition */
|
|
8
|
+
props: {
|
|
9
|
+
[key: string]: object;
|
|
10
|
+
};
|
|
11
|
+
/** Link where the item points to, if any. Must be enabled in behaviors */
|
|
12
|
+
linksTo: DocsLinkRef | undefined;
|
|
13
|
+
constructor(model: DocsBlockItemModel);
|
|
14
|
+
/** Constructs representation that can be used to write full object to remote */
|
|
15
|
+
toRemote(): DocsBlockItemModel;
|
|
16
|
+
}
|