@supernova-studio/supernova-sdk-beta 1.6.10 → 1.6.11
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/src/browser-bundle.d.ts +1 -1
- package/build/sdk-typescript/src/core/SDKSupernova.d.ts +45 -39
- package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +35 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaBrands.d.ts +18 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaBulkOperations.d.ts +31 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaComponents.d.ts +43 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +18 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +17 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +50 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +26 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaMe.d.ts +22 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaPipelines.d.ts +36 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaTokenValues.d.ts +140 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +217 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaUsers.d.ts +6 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +14 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +114 -0
- package/build/sdk-typescript/src/core/areas/SDKRemoteIdentifiers.d.ts +25 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +16 -17
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +209 -134
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +124 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreRenderRequests.d.ts +18 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +73 -0
- package/build/sdk-typescript/src/core/errors/SDKSupernovaError.d.ts +41 -20
- package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +1 -1
- package/build/sdk-typescript/src/core/resolvers/SDKComponentGroupResolver.d.ts +13 -0
- package/build/sdk-typescript/src/core/resolvers/SDKComponentResolver.d.ts +5 -6
- package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +1 -4
- package/build/sdk-typescript/src/core/resolvers/SDKDocumentationItemResolver.d.ts +6 -8
- package/build/sdk-typescript/src/core/resolvers/SDKTokenGroupResolver.d.ts +1 -2
- package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +73 -45
- package/build/sdk-typescript/src/exports.d.ts +143 -117
- package/build/sdk-typescript/src/index.d.ts +1 -1
- package/build/sdk-typescript/src/model/acl/SDKAcl.d.ts +51 -0
- package/build/sdk-typescript/src/model/assets/SDKRenderedAsset.d.ts +5 -5
- package/build/sdk-typescript/src/model/base/SDKBrand.d.ts +30 -0
- package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +56 -0
- package/build/sdk-typescript/src/model/base/SDKDesignSystemVersion.d.ts +40 -0
- package/build/sdk-typescript/src/model/base/SDKDocumentation.d.ts +10 -0
- package/build/sdk-typescript/src/model/components/SDKComponent.d.ts +4 -4
- package/build/sdk-typescript/src/model/components/SDKDesignComponent.d.ts +4 -4
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationConfiguration.d.ts +5 -5
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationGroup.d.ts +2 -2
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationItem.d.ts +2 -2
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationPage.d.ts +4 -4
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationPageAsset.d.ts +4 -4
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationPageBlock.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichText.d.ts +3 -3
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichTextSpan.d.ts +3 -3
- package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichTextSpanAttribute.d.ts +2 -2
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAsset.d.ts +3 -3
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAssets.d.ts +6 -8
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCallout.d.ts +5 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCode.d.ts +5 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockColumn.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockColumnItem.d.ts +7 -9
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCustom.d.ts +5 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockDivider.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedFigma.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedGeneric.d.ts +5 -7
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedLink.d.ts +5 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedStorybook.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedYoutube.d.ts +1 -5
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockFrame.d.ts +3 -3
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockFrames.d.ts +6 -8
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockHeading.d.ts +5 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockImage.d.ts +5 -7
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockOrderedList.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockQuote.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockRenderCode.d.ts +3 -4
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockShortcut.d.ts +3 -3
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockShortcuts.d.ts +5 -7
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTab.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTabItem.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTable.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableCell.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableColumn.d.ts +5 -5
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableRow.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockText.d.ts +5 -7
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockToken.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTokenGroup.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTokenList.d.ts +4 -6
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockUnorderedList.d.ts +2 -6
- package/build/sdk-typescript/src/model/documentation/builder/SDKDocumentationBlockBuilder.d.ts +1 -1
- package/build/sdk-typescript/src/model/documentation/configuration/SDKDocumentationItemConfiguration.d.ts +2 -2
- package/build/sdk-typescript/src/model/documentation/configuration/SDKDocumentationItemHeader.d.ts +6 -6
- package/build/sdk-typescript/src/model/elements/SDKElementDataView.d.ts +4 -4
- package/build/sdk-typescript/src/model/elements/SDKElementDataViewColumn.d.ts +2 -2
- package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +23 -6
- package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +6 -2
- package/build/sdk-typescript/src/model/elements/values/SDKElementPropertyValue.d.ts +2 -2
- package/build/sdk-typescript/src/model/enums/SDKBorderStyle.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKIntegrationService.d.ts +7 -0
- package/build/sdk-typescript/src/model/enums/SDKTextCase.d.ts +2 -1
- package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +42 -6
- package/build/sdk-typescript/src/model/enums/SDKUnit.d.ts +13 -2
- package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +7 -0
- package/build/sdk-typescript/src/model/enums/SDKVisibilityType.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceNPMRegistryAuthType.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceNPMRegistryType.d.ts +12 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionPlanInterval.d.ts +6 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionProduct.d.ts +12 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatus.d.ts +18 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatusInternal.d.ts +8 -0
- package/build/sdk-typescript/src/model/exporters/SDKExporter.d.ts +3 -3
- package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlock.d.ts +2 -2
- package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlockProperty.d.ts +2 -2
- package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlockVariant.d.ts +2 -2
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterConfigurationProperty.d.ts +5 -5
- package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +5 -5
- package/build/sdk-typescript/src/model/groups/SDKComponentGroup.d.ts +39 -0
- package/build/sdk-typescript/src/model/groups/SDKDesignComponentGroup.d.ts +7 -7
- package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +12 -11
- package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +16 -0
- package/build/sdk-typescript/src/model/support/SDKDesignComponentOrigin.d.ts +4 -4
- package/build/sdk-typescript/src/model/support/SDKFrameOrigin.d.ts +2 -2
- package/build/sdk-typescript/src/model/support/SDKSize.d.ts +2 -2
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +19 -9
- package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +2 -2
- package/build/sdk-typescript/src/model/themes/SDKThemeUtilities.d.ts +8 -3
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +16 -24
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +13 -21
- package/build/sdk-typescript/src/model/tokens/SDKBlurToken.d.ts +12 -8
- package/build/sdk-typescript/src/model/tokens/SDKBorderToken.d.ts +15 -10
- package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +19 -11
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +70 -0
- package/build/sdk-typescript/src/model/tokens/SDKGradientToken.d.ts +18 -10
- package/build/sdk-typescript/src/model/tokens/SDKShadowToken.d.ts +17 -13
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +36 -0
- package/build/sdk-typescript/src/model/tokens/SDKTextCaseToken.d.ts +23 -0
- package/build/sdk-typescript/src/model/tokens/SDKTextDecorationToken.d.ts +26 -0
- package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +13 -12
- package/build/sdk-typescript/src/model/tokens/SDKTokenCompator.d.ts +10 -10
- package/build/sdk-typescript/src/model/tokens/SDKTokenValue.d.ts +149 -63
- package/build/sdk-typescript/src/model/tokens/SDKTypographyToken.d.ts +12 -11
- package/build/sdk-typescript/src/model/tokens/SDKVisibilityToken.d.ts +18 -0
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenData.d.ts +74 -14
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +18 -16
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +73 -34
- package/build/sdk-typescript/src/model/users/SDKUser.d.ts +20 -11
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +49 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +27 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIPWhitelistSettings.d.ts +26 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceNPMRegistrySettings.d.ts +34 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceOnboarding.d.ts +30 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +30 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProfile.d.ts +68 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSSOSettings.d.ts +17 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +82 -0
- package/build/sdk-typescript/src/tests/Areas/AreaTokenValues.d.ts +0 -0
- package/build/sdk-typescript/src/tests/FigmaTokensDataLoader.d.ts +20 -0
- package/build/sdk-typescript/src/tests/Serialization/WorkspaceNPMRegistrySettings.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Serialization/WorkspaceOnboarding.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Serialization/WorkspaceSSOSettings.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Tooling/PluginFigmaTokens.spec.d.ts +1 -17
- package/build/sdk-typescript/src/tests/Tooling/ReadTokens.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Tooling/TokensModel.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/helpers.d.ts +6 -1
- package/build/sdk-typescript/src/tests/validators.d.ts +83 -0
- package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +15 -13
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +15 -12
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONGroupBuilder.d.ts +8 -6
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +2 -1
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +5 -3
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +4 -4
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapResolver.d.ts +2 -5
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +7 -7
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenGroupTreeMerger.d.ts +6 -6
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +6 -6
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +5 -6
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenSetResolver.d.ts +1 -2
- package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +4 -2
- package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTreeNode.d.ts +1 -4
- package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTParentChildMapping.d.ts +1 -1
- package/build/sdk-typescript/src/tools/json-builder/SDKToolsJSONBuilder.d.ts +6 -5
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +17 -20
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementStyleDictionaryTransformer.d.ts +11 -14
- package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +27 -36
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +5 -6
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +39 -39
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +4 -8
- package/build/sdk-typescript/src/tools/search-index/SDKToolsDocSearch.d.ts +1 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewGenerator.d.ts +17 -0
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewMetadataGenerator.d.ts +8 -0
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewReferenceInfoGenerator.d.ts +10 -0
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewSegmentGenerator.d.ts +5 -0
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewStyleGenerator.d.ts +5 -0
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewTypes.d.ts +68 -0
- package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +8 -12
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +113 -0
- package/build/sdk-typescript/src/utils/UnreachableCaseError.d.ts +3 -0
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +9 -6
- package/build/sdk-typescript/src/core/SDKBrand.d.ts +0 -80
- package/build/sdk-typescript/src/core/SDKBrandWriter.d.ts +0 -29
- package/build/sdk-typescript/src/core/SDKDesignSystem.d.ts +0 -62
- package/build/sdk-typescript/src/core/SDKDesignSystemVersion.d.ts +0 -99
- package/build/sdk-typescript/src/core/SDKDocumentation.d.ts +0 -55
- package/build/sdk-typescript/src/core/SDKWorkspace.d.ts +0 -26
- package/build/sdk-typescript/src/model/support/SDKWorkspaceNPMRegistry.d.ts +0 -13
- package/build/sdk-typescript/src/model/tokens/SDKFontToken.d.ts +0 -16
- package/build/sdk-typescript/src/model/tokens/SDKGenericToken.d.ts +0 -18
- package/build/sdk-typescript/src/model/tokens/SDKMeasureToken.d.ts +0 -26
- package/build/sdk-typescript/src/model/tokens/SDKRadiusToken.d.ts +0 -18
- package/build/sdk-typescript/src/model/tokens/SDKTextToken.d.ts +0 -16
- /package/build/sdk-typescript/src/tests/{Accessors/Brand.spec.d.ts → Areas/AreaBatchUpdates.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/Components.spec.d.ts → Areas/AreaBrands.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/DesignSystem.spec.d.ts → Areas/AreaMe.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/DesignSystemVersion.spec.d.ts → Areas/AreaTokens.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/Documentation.spec.d.ts → Areas/AreaWorkspace.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/Supernova.spec.d.ts → Serialization/User.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors → Serialization}/Workspace.spec.d.ts +0 -0
- /package/build/sdk-typescript/src/tests/{Accessors/Theme.spec.d.ts → Serialization/WorkspaceIPWhitelistSettings.spec.d.ts} +0 -0
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { DTTokenReferenceResolver } from "../../tools/design-tokens/utilities/SDKDTTokenReferenceResolver";
|
|
2
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
3
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
4
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
5
|
+
import { ShadowTokenRemoteData } from "./remote/SDKRemoteTokenData";
|
|
6
|
+
import { ShadowTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
7
|
+
import { ShadowTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
8
|
+
import { Token } from "./SDKToken";
|
|
9
|
+
import { ShadowTokenValue } from "./SDKTokenValue";
|
|
9
10
|
export declare class ShadowToken extends Token {
|
|
10
|
-
value: ShadowTokenValue
|
|
11
|
+
value: Array<ShadowTokenValue>;
|
|
11
12
|
shadowLayers: Array<ShadowToken>;
|
|
12
13
|
isVirtual: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
static
|
|
14
|
+
tokenType: TokenType;
|
|
15
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: ShadowTokenValue[], alias: ShadowToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
16
|
+
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: ShadowToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): ShadowToken;
|
|
17
|
+
static shadowValueFromDefinition(definition: object, referenceResolver: DTTokenReferenceResolver): ShadowTokenValue[];
|
|
18
|
+
static shadowSingleValueFromDefinition(definition: object, referenceResolver: DTTokenReferenceResolver): ShadowTokenValue;
|
|
16
19
|
toWriteObject(): ShadowTokenRemoteModel;
|
|
17
|
-
static valueToWriteObject(value: ShadowTokenValue):
|
|
20
|
+
static valueToWriteObject(value: ShadowTokenValue[]): ShadowTokenRemoteData;
|
|
21
|
+
static singleValueToWriteObject(value: ShadowTokenValue): {
|
|
18
22
|
aliasTo: string | undefined;
|
|
19
23
|
value: ShadowTokenRemoteValue;
|
|
20
24
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
2
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
3
|
+
import { StringTokenType, TokenType } from "../enums/SDKTokenType";
|
|
4
|
+
import { StringTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
5
|
+
import { StringTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
6
|
+
import { Token } from "./SDKToken";
|
|
7
|
+
import { AnyStringTokenValue, FontFamilyTokenValue, FontWeightTokenValue, ProductCopyTokenValue, StringTokenValue } from "./SDKTokenValue";
|
|
8
|
+
import { DTTokenReferenceResolver } from "tools/design-tokens/utilities/SDKDTTokenReferenceResolver";
|
|
9
|
+
export declare class StringCategoryToken<T extends AnyStringTokenValue> extends Token {
|
|
10
|
+
value: T;
|
|
11
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: T, alias: StringCategoryToken<T> | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
12
|
+
static create<TValue extends AnyStringTokenValue, TToken extends StringCategoryToken<TValue>>(this: new (...args: any[]) => TToken, type: StringTokenType, versionId: string, brandId: string, name: string, description: string, value: string | number, alias: TToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TToken;
|
|
13
|
+
static stringValueFromDefinitionOrReference(definition: any, referenceResolver: DTTokenReferenceResolver, tokenType: StringTokenType): AnyStringTokenValue | undefined;
|
|
14
|
+
static stringValueFromDefinition(definition: string, tokenType: StringTokenType): AnyStringTokenValue;
|
|
15
|
+
toWriteObject(): StringTokenRemoteModel;
|
|
16
|
+
static valueToWriteObject(value: AnyStringTokenValue): {
|
|
17
|
+
aliasTo: string | undefined;
|
|
18
|
+
value: StringTokenRemoteValue;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare class StringToken extends StringCategoryToken<StringTokenValue> {
|
|
22
|
+
tokenType: TokenType;
|
|
23
|
+
}
|
|
24
|
+
export declare class ProductCopyToken extends StringCategoryToken<ProductCopyTokenValue> {
|
|
25
|
+
tokenType: TokenType;
|
|
26
|
+
}
|
|
27
|
+
export declare class FontFamilyToken extends StringCategoryToken<FontFamilyTokenValue> {
|
|
28
|
+
tokenType: TokenType;
|
|
29
|
+
}
|
|
30
|
+
export declare class FontWeightToken extends StringCategoryToken<FontWeightTokenValue> {
|
|
31
|
+
tokenType: TokenType;
|
|
32
|
+
}
|
|
33
|
+
export type AnyStringToken = StringToken | ProductCopyToken | FontFamilyToken | FontWeightToken;
|
|
34
|
+
type TypeofAnyStringToken = typeof StringToken | typeof ProductCopyToken | typeof FontFamilyToken | typeof FontWeightToken;
|
|
35
|
+
export declare const resolveString: (type: StringTokenType) => TypeofAnyStringToken;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
2
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
3
|
+
import { TextCase } from "../enums/SDKTextCase";
|
|
4
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
5
|
+
import { TextCaseTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
6
|
+
import { TextCaseTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
7
|
+
import { Token } from "./SDKToken";
|
|
8
|
+
import { TextCaseTokenValue } from "./SDKTokenValue";
|
|
9
|
+
export declare class TextCaseToken extends Token {
|
|
10
|
+
value: TextCaseTokenValue;
|
|
11
|
+
tokenType: TokenType;
|
|
12
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: TextCaseTokenValue, alias: TextCaseToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
|
+
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: TextCaseToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TextCaseToken;
|
|
14
|
+
static textCaseFromDefinition(textCase: string): {
|
|
15
|
+
value: TextCase;
|
|
16
|
+
referencedTokenId: any;
|
|
17
|
+
};
|
|
18
|
+
toWriteObject(): TextCaseTokenRemoteModel;
|
|
19
|
+
static valueToWriteObject(value: TextCaseTokenValue): {
|
|
20
|
+
aliasTo: string | undefined;
|
|
21
|
+
value: TextCaseTokenRemoteValue;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DTTokenReferenceResolver } from "../../tools/design-tokens/utilities/SDKDTTokenReferenceResolver";
|
|
2
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
3
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
4
|
+
import { TextDecoration } from "../enums/SDKTextDecoration";
|
|
5
|
+
import { OptionTokenType, TokenType } from "../enums/SDKTokenType";
|
|
6
|
+
import { TextCaseTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
7
|
+
import { TextDecorationTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
8
|
+
import { Token } from "./SDKToken";
|
|
9
|
+
import { AnyOptionTokenValue, TextDecorationTokenValue } from "./SDKTokenValue";
|
|
10
|
+
export declare class TextDecorationToken extends Token {
|
|
11
|
+
value: TextDecorationTokenValue;
|
|
12
|
+
tokenType: TokenType;
|
|
13
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: TextDecorationTokenValue, alias: TextDecorationToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
14
|
+
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: TextDecorationToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TextDecorationToken;
|
|
15
|
+
static textDecorationFromDefinition(textDecoration: string): {
|
|
16
|
+
value: TextDecoration;
|
|
17
|
+
referencedTokenId: any;
|
|
18
|
+
};
|
|
19
|
+
static optionValueFromDefinitionOrReference(definition: any, referenceResolver: DTTokenReferenceResolver, tokenType: OptionTokenType): AnyOptionTokenValue;
|
|
20
|
+
static optionValueFromDefinition(definition: string, type: OptionTokenType): AnyOptionTokenValue;
|
|
21
|
+
toWriteObject(): TextCaseTokenRemoteModel;
|
|
22
|
+
static valueToWriteObject(value: TextDecorationTokenValue): {
|
|
23
|
+
aliasTo: string | undefined;
|
|
24
|
+
value: TextDecorationTokenRemoteValue;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TokenRemoteModel } from './remote/SDKRemoteTokenModel';
|
|
8
|
-
import { TokenValue } from './SDKTokenValue';
|
|
1
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
2
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
3
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
4
|
+
import { TokenOrigin } from "../support/SDKTokenOrigin";
|
|
5
|
+
import { TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
6
|
+
import { TokenValue } from "./SDKTokenValue";
|
|
9
7
|
export declare class Token implements TokenValue {
|
|
8
|
+
/** Persistent id of the token. This id never changes across versions */
|
|
10
9
|
id: string;
|
|
11
|
-
|
|
10
|
+
/** Version id of the token. This id changes whenever a new version is created, and each version of the token in version has different id */
|
|
11
|
+
idInVersion: string;
|
|
12
|
+
/** Persistent id of the brand. This id never changes as tokens can't be moved across the brands */
|
|
12
13
|
brandId: string;
|
|
13
14
|
themeId: string | null;
|
|
14
15
|
designSystemVersionId: string;
|
|
@@ -16,14 +17,14 @@ export declare class Token implements TokenValue {
|
|
|
16
17
|
description: string;
|
|
17
18
|
tokenType: TokenType;
|
|
18
19
|
origin: TokenOrigin | null;
|
|
19
|
-
|
|
20
|
+
parentGroupId: string;
|
|
20
21
|
sortOrder: number;
|
|
21
22
|
properties: Array<ElementProperty>;
|
|
22
23
|
propertyValues: object;
|
|
23
24
|
createdAt: Date | null;
|
|
24
25
|
updatedAt: Date | null;
|
|
25
|
-
constructor(model: TokenRemoteModel,
|
|
26
|
-
|
|
26
|
+
constructor(model: TokenRemoteModel, versionId: string, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>, empty?: boolean);
|
|
27
|
+
setParentGroupId(parentGroupId: string | null): void;
|
|
27
28
|
setSortOrder(order: number): void;
|
|
28
29
|
toBaseWriteObject(): TokenRemoteModel;
|
|
29
30
|
toWriteObject(): TokenRemoteModel;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Token } from
|
|
2
|
-
import {
|
|
1
|
+
import { Token } from "./SDKToken";
|
|
2
|
+
import { AnyDimensionTokenValue, AnyOptionTokenValue, AnyPlainTokenValue, AnyStringTokenValue, BlurTokenValue, BorderTokenValue, ColorTokenValue, GradientStopValue, GradientTokenValue, ShadowTokenValue, TypographyTokenValue } from "./SDKTokenValue";
|
|
3
3
|
export declare class TokenComparator {
|
|
4
4
|
static isEqualTokenValue(a: Token, b: Token): boolean;
|
|
5
|
-
static referencesSameToken(a:
|
|
6
|
-
static anyIsReference(a:
|
|
7
|
-
static isUndefinedValue(a:
|
|
5
|
+
static referencesSameToken(a: AnyPlainTokenValue, b: AnyPlainTokenValue): boolean;
|
|
6
|
+
static anyIsReference(a: AnyPlainTokenValue, b: AnyPlainTokenValue): boolean;
|
|
7
|
+
static isUndefinedValue(a: AnyPlainTokenValue, b: AnyPlainTokenValue): boolean;
|
|
8
8
|
static isEqualBlurTokenValue(a: BlurTokenValue, b: BlurTokenValue): boolean;
|
|
9
9
|
static isEqualBorderTokenValue(a: BorderTokenValue, b: BorderTokenValue): boolean;
|
|
10
10
|
static isEqualColorTokenValue(a: ColorTokenValue, b: ColorTokenValue): boolean;
|
|
11
|
-
static
|
|
12
|
-
static isEqualGenericTokenValue(a: GenericTokenValue, b: GenericTokenValue): boolean;
|
|
11
|
+
static isEqualGradientsTokenValue(a: GradientTokenValue[], b: GradientTokenValue[]): boolean;
|
|
13
12
|
static isEqualGradientTokenValue(a: GradientTokenValue, b: GradientTokenValue): boolean;
|
|
14
13
|
static isEqualGradientStops(a: Array<GradientStopValue>, b: Array<GradientStopValue>): boolean;
|
|
15
|
-
static
|
|
16
|
-
static
|
|
14
|
+
static isEqualDimensionTokenValue(a: AnyDimensionTokenValue, b: AnyDimensionTokenValue): boolean;
|
|
15
|
+
static isEqualShadowsTokenValue(a: ShadowTokenValue[], b: ShadowTokenValue[]): boolean;
|
|
17
16
|
static isEqualShadowTokenValue(a: ShadowTokenValue, b: ShadowTokenValue): boolean;
|
|
18
|
-
static
|
|
17
|
+
static isEqualStringTokenValue(a: AnyStringTokenValue, b: AnyStringTokenValue): boolean;
|
|
18
|
+
static isEqualOptionTokenValue(a: AnyOptionTokenValue, b: AnyOptionTokenValue): boolean;
|
|
19
19
|
static isEqualTypographyTokenValue(a: TypographyTokenValue, b: TypographyTokenValue): boolean;
|
|
20
20
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { BlurType } from
|
|
2
|
-
import { BorderPosition } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
1
|
+
import { BlurType } from "../enums/SDKBlurType";
|
|
2
|
+
import { BorderPosition } from "../enums/SDKBorderPosition";
|
|
3
|
+
import { BorderStyle } from "../enums/SDKBorderStyle";
|
|
4
|
+
import { GradientType } from "../enums/SDKGradientType";
|
|
5
|
+
import { ShadowType } from "../enums/SDKShadowType";
|
|
6
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
7
|
+
import { LineHeightUnit, MsUnit, PxUnit, RawUnit, SizeUnit, Unit } from "../enums/SDKUnit";
|
|
8
|
+
import { TokenOrigin } from "../support/SDKTokenOrigin";
|
|
9
|
+
import { BlurToken } from "./SDKBlurToken";
|
|
10
|
+
import { BorderToken } from "./SDKBorderToken";
|
|
11
|
+
import { ColorToken } from "./SDKColorToken";
|
|
12
|
+
import { AnyDimensionToken } from "./SDKDimensionToken";
|
|
13
|
+
import { GradientToken } from "./SDKGradientToken";
|
|
14
|
+
import { ShadowToken } from "./SDKShadowToken";
|
|
15
|
+
import { AnyStringToken } from "./SDKStringToken";
|
|
16
|
+
import { TextCaseToken } from "./SDKTextCaseToken";
|
|
17
|
+
import { TextDecorationToken } from "./SDKTextDecorationToken";
|
|
18
|
+
import { Token } from "./SDKToken";
|
|
19
|
+
import { TypographyToken } from "./SDKTypographyToken";
|
|
20
|
+
import { VisibilityToken } from "./SDKVisibilityToken";
|
|
21
21
|
export type TokenValue = {
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
@@ -26,57 +26,105 @@ export type TokenValue = {
|
|
|
26
26
|
origin: TokenOrigin | null;
|
|
27
27
|
};
|
|
28
28
|
export type ColorTokenValue = {
|
|
29
|
-
|
|
29
|
+
color: ColorValue;
|
|
30
|
+
opacity: OpacityTokenValue;
|
|
31
|
+
referencedTokenId: string | null;
|
|
32
|
+
};
|
|
33
|
+
export type ColorValue = {
|
|
30
34
|
r: number;
|
|
31
35
|
g: number;
|
|
32
36
|
b: number;
|
|
33
|
-
|
|
34
|
-
referencedToken: ColorToken | null;
|
|
37
|
+
referencedTokenId: string | null;
|
|
35
38
|
};
|
|
36
39
|
export type TypographyTokenValue = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export type RadiusTokenValue = {
|
|
48
|
-
radius: MeasureTokenValue;
|
|
49
|
-
topLeft: MeasureTokenValue | null;
|
|
50
|
-
topRight: MeasureTokenValue | null;
|
|
51
|
-
bottomLeft: MeasureTokenValue | null;
|
|
52
|
-
bottomRight: MeasureTokenValue | null;
|
|
53
|
-
referencedToken: RadiusToken | null;
|
|
40
|
+
fontFamily: FontFamilyTokenValue;
|
|
41
|
+
fontWeight: FontWeightTokenValue;
|
|
42
|
+
fontSize: FontSizeTokenValue;
|
|
43
|
+
textDecoration: TextDecorationTokenValue;
|
|
44
|
+
textCase: TextCaseTokenValue;
|
|
45
|
+
letterSpacing: LetterSpacingTokenValue;
|
|
46
|
+
lineHeight: LineHeightTokenValue | null;
|
|
47
|
+
paragraphIndent: ParagraphSpacingTokenValue;
|
|
48
|
+
paragraphSpacing: ParagraphSpacingTokenValue;
|
|
49
|
+
referencedTokenId: string | null;
|
|
54
50
|
};
|
|
55
51
|
export type ShadowTokenValue = {
|
|
56
52
|
color: ColorTokenValue;
|
|
57
|
-
x:
|
|
58
|
-
y:
|
|
59
|
-
radius:
|
|
60
|
-
spread:
|
|
61
|
-
opacity:
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
radius: number;
|
|
56
|
+
spread: number;
|
|
57
|
+
opacity: OpacityTokenValue;
|
|
62
58
|
type: ShadowType;
|
|
63
|
-
|
|
59
|
+
referencedTokenId: string | null;
|
|
64
60
|
};
|
|
65
|
-
export type
|
|
61
|
+
export type DimensionTokenValue = {
|
|
66
62
|
unit: Unit;
|
|
67
63
|
measure: number;
|
|
68
|
-
|
|
64
|
+
referencedTokenId: string | null;
|
|
65
|
+
};
|
|
66
|
+
export type SizeTokenValue = {
|
|
67
|
+
unit: SizeUnit;
|
|
68
|
+
measure: number;
|
|
69
|
+
referencedTokenId: string | null;
|
|
70
|
+
};
|
|
71
|
+
export type SpaceTokenValue = {
|
|
72
|
+
unit: SizeUnit;
|
|
73
|
+
measure: number;
|
|
74
|
+
referencedTokenId: string | null;
|
|
75
|
+
};
|
|
76
|
+
export type OpacityTokenValue = {
|
|
77
|
+
unit: RawUnit;
|
|
78
|
+
measure: number;
|
|
79
|
+
referencedTokenId: string | null;
|
|
80
|
+
};
|
|
81
|
+
export type FontSizeTokenValue = {
|
|
82
|
+
unit: SizeUnit;
|
|
83
|
+
measure: number;
|
|
84
|
+
referencedTokenId: string | null;
|
|
85
|
+
};
|
|
86
|
+
export type LineHeightTokenValue = {
|
|
87
|
+
unit: LineHeightUnit;
|
|
88
|
+
measure: number;
|
|
89
|
+
referencedTokenId: string | null;
|
|
90
|
+
};
|
|
91
|
+
export type LetterSpacingTokenValue = {
|
|
92
|
+
unit: SizeUnit;
|
|
93
|
+
measure: number;
|
|
94
|
+
referencedTokenId: string | null;
|
|
95
|
+
};
|
|
96
|
+
export type ParagraphSpacingTokenValue = {
|
|
97
|
+
unit: SizeUnit;
|
|
98
|
+
measure: number;
|
|
99
|
+
referencedTokenId: string | null;
|
|
100
|
+
};
|
|
101
|
+
export type BorderWidthTokenValue = {
|
|
102
|
+
unit: PxUnit;
|
|
103
|
+
measure: number;
|
|
104
|
+
referencedTokenId: string | null;
|
|
105
|
+
};
|
|
106
|
+
export type RadiusTokenValue = {
|
|
107
|
+
unit: PxUnit;
|
|
108
|
+
measure: number;
|
|
109
|
+
referencedTokenId: string | null;
|
|
110
|
+
};
|
|
111
|
+
export type DurationTokenValue = {
|
|
112
|
+
unit: MsUnit;
|
|
113
|
+
measure: number;
|
|
114
|
+
referencedTokenId: string | null;
|
|
69
115
|
};
|
|
70
|
-
export type
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
116
|
+
export type ZIndexTokenValue = {
|
|
117
|
+
unit: RawUnit;
|
|
118
|
+
measure: number;
|
|
119
|
+
referencedTokenId: string | null;
|
|
74
120
|
};
|
|
121
|
+
export type AnyDimensionTokenValue = DimensionTokenValue | SizeTokenValue | SpaceTokenValue | OpacityTokenValue | FontSizeTokenValue | LineHeightTokenValue | LetterSpacingTokenValue | ParagraphSpacingTokenValue | BorderWidthTokenValue | RadiusTokenValue | DurationTokenValue | ZIndexTokenValue;
|
|
75
122
|
export type BorderTokenValue = {
|
|
76
123
|
color: ColorTokenValue;
|
|
77
|
-
width:
|
|
124
|
+
width: BorderWidthTokenValue;
|
|
78
125
|
position: BorderPosition;
|
|
79
|
-
|
|
126
|
+
style: BorderStyle;
|
|
127
|
+
referencedTokenId: string | null;
|
|
80
128
|
};
|
|
81
129
|
export type GradientTokenValue = {
|
|
82
130
|
to: {
|
|
@@ -90,24 +138,62 @@ export type GradientTokenValue = {
|
|
|
90
138
|
type: GradientType;
|
|
91
139
|
aspectRatio: number;
|
|
92
140
|
stops: Array<GradientStopValue>;
|
|
93
|
-
|
|
141
|
+
referencedTokenId: string | null;
|
|
94
142
|
};
|
|
95
143
|
export type GradientStopValue = {
|
|
96
144
|
position: number;
|
|
97
145
|
color: ColorTokenValue;
|
|
98
146
|
};
|
|
99
|
-
export type
|
|
147
|
+
export type StringTokenValue = {
|
|
148
|
+
text: string;
|
|
149
|
+
referencedTokenId: string | null;
|
|
150
|
+
};
|
|
151
|
+
export type ProductCopyTokenValue = {
|
|
152
|
+
text: string;
|
|
153
|
+
referencedTokenId: string | null;
|
|
154
|
+
};
|
|
155
|
+
export type FontFamilyTokenValue = {
|
|
100
156
|
text: string;
|
|
101
|
-
|
|
157
|
+
referencedTokenId: string | null;
|
|
102
158
|
};
|
|
103
|
-
export type
|
|
159
|
+
export type FontWeightTokenValue = {
|
|
104
160
|
text: string;
|
|
105
|
-
|
|
161
|
+
referencedTokenId: string | null;
|
|
162
|
+
};
|
|
163
|
+
export type AnyStringTokenValue = StringTokenValue | ProductCopyTokenValue | FontFamilyTokenValue | FontWeightTokenValue;
|
|
164
|
+
export type TextCaseTokenValue = {
|
|
165
|
+
value: string;
|
|
166
|
+
options?: string[];
|
|
167
|
+
referencedTokenId: string | null;
|
|
168
|
+
};
|
|
169
|
+
export type TextDecorationTokenValue = {
|
|
170
|
+
value: string;
|
|
171
|
+
options?: string[];
|
|
172
|
+
referencedTokenId: string | null;
|
|
173
|
+
};
|
|
174
|
+
export type VisibilityTokenValue = {
|
|
175
|
+
value: string;
|
|
176
|
+
options?: string[];
|
|
177
|
+
referencedTokenId: string | null;
|
|
106
178
|
};
|
|
179
|
+
export type AnyOptionTokenValue = TextCaseTokenValue | TextDecorationTokenValue | VisibilityTokenValue;
|
|
180
|
+
export type AnyOptionToken = TextCaseToken | TextDecorationToken | VisibilityToken;
|
|
107
181
|
export type BlurTokenValue = {
|
|
108
182
|
type: BlurType;
|
|
109
|
-
radius:
|
|
110
|
-
|
|
183
|
+
radius: DimensionTokenValue;
|
|
184
|
+
referencedTokenId: string | null;
|
|
111
185
|
};
|
|
112
|
-
export type AnyTokenValue = ColorTokenValue |
|
|
113
|
-
export type AnyToken = ColorToken |
|
|
186
|
+
export type AnyTokenValue = ColorTokenValue | AnyStringTokenValue | TypographyTokenValue | ShadowTokenValue[] | AnyDimensionTokenValue | BorderTokenValue | GradientTokenValue[] | BlurTokenValue | AnyOptionTokenValue;
|
|
187
|
+
export type AnyToken = ColorToken | AnyStringToken | TypographyToken | ShadowToken | AnyDimensionToken | BorderToken | GradientToken | BlurToken | AnyOptionToken;
|
|
188
|
+
export type AnySingleLayerToken = Exclude<AnyToken, ShadowToken | GradientToken>;
|
|
189
|
+
export type AnyMultiLayerToken = ShadowToken | GradientToken;
|
|
190
|
+
export type AnyPlainTokenValue = Exclude<AnyTokenValue, ShadowTokenValue[] | GradientTokenValue[]> | ShadowTokenValue | GradientTokenValue;
|
|
191
|
+
export type RawValue<T extends {
|
|
192
|
+
referencedTokenId: string;
|
|
193
|
+
}> = Omit<T, "referencedTokenId">;
|
|
194
|
+
export declare const getReferencedTokens: (token: AnyToken, allTokens: Map<string, Token>) => Token[];
|
|
195
|
+
export declare const getSingleReferencedTokenId: (token: AnyToken, allTokens: Map<string, Token>) => string | undefined;
|
|
196
|
+
export declare const checkSingleReferencedTokenById: (token: AnyToken, candidateId: string, allTokens: Map<string, Token>) => boolean;
|
|
197
|
+
export declare const replaceReferencedTokenIds: (token: AnyToken, currentId: string, newId: string, allTokens: Map<string, Token>) => void;
|
|
198
|
+
export declare const replaceReferencedToken: (token: Token, existingToken: AnyToken, newToken: AnyToken) => void;
|
|
199
|
+
export declare const replaceReferencedTokenByIds: (token: Token, existingTokenId: string, newTokenId: string) => void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TokenRemoteModel, TypographyTokenRemoteModel } from
|
|
6
|
-
import { TypographyTokenRemoteValue } from
|
|
7
|
-
import { Token } from
|
|
8
|
-
import { TypographyTokenValue } from
|
|
1
|
+
import { DTTokenReferenceResolver } from "../../tools/design-tokens/utilities/SDKDTTokenReferenceResolver";
|
|
2
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
3
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
4
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
5
|
+
import { TokenRemoteModel, TypographyTokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
6
|
+
import { TypographyTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
7
|
+
import { Token } from "./SDKToken";
|
|
8
|
+
import { TypographyTokenValue } from "./SDKTokenValue";
|
|
9
9
|
export declare class TypographyToken extends Token {
|
|
10
10
|
value: TypographyTokenValue;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
static
|
|
11
|
+
tokenType: TokenType;
|
|
12
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: TypographyTokenValue, alias: TypographyToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
|
+
static create(versionId: string, brandId: string, name: string, description: string, value: object, alias: TypographyToken | null, referenceResolver: DTTokenReferenceResolver, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TypographyToken;
|
|
14
|
+
static typographyValueFromDefinition(definition: any, referenceResolver: DTTokenReferenceResolver): TypographyTokenValue;
|
|
14
15
|
toWriteObject(): TypographyTokenRemoteModel;
|
|
15
16
|
static valueToWriteObject(value: TypographyTokenValue): {
|
|
16
17
|
aliasTo: string | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ElementProperty } from "../elements/SDKElementProperty";
|
|
2
|
+
import { ElementPropertyValue } from "../elements/values/SDKElementPropertyValue";
|
|
3
|
+
import { TokenType } from "../enums/SDKTokenType";
|
|
4
|
+
import { TextCaseTokenRemoteModel, TokenRemoteModel } from "./remote/SDKRemoteTokenModel";
|
|
5
|
+
import { VisibilityTokenRemoteValue } from "./remote/SDKRemoteTokenValue";
|
|
6
|
+
import { Token } from "./SDKToken";
|
|
7
|
+
import { VisibilityTokenValue } from "./SDKTokenValue";
|
|
8
|
+
export declare class VisibilityToken extends Token {
|
|
9
|
+
value: VisibilityTokenValue;
|
|
10
|
+
tokenType: TokenType;
|
|
11
|
+
constructor(versionId: string, baseToken: TokenRemoteModel, value: VisibilityTokenValue, alias: VisibilityToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
12
|
+
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: VisibilityToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): VisibilityToken;
|
|
13
|
+
toWriteObject(): TextCaseTokenRemoteModel;
|
|
14
|
+
static valueToWriteObject(value: VisibilityTokenValue): {
|
|
15
|
+
aliasTo: string | undefined;
|
|
16
|
+
value: VisibilityTokenRemoteValue;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,43 +1,103 @@
|
|
|
1
|
-
import { BlurTokenRemoteValue, BorderTokenRemoteValue, ColorTokenRemoteValue,
|
|
1
|
+
import { BlurTokenRemoteValue, BorderTokenRemoteValue, BorderWidthTokenRemoteValue, ColorTokenRemoteValue, DimensionTokenRemoteValue, DurationTokenRemoteValue, FontSizeTokenRemoteValue, GradientTokenRemoteValue, LetterSpacingTokenRemoteValue, LineHeightTokenRemoteValue, OpacityTokenRemoteValue, ParagraphSpacingTokenRemoteValue, RadiusTokenRemoteValue, ShadowTokenRemoteValue, SizeTokenRemoteValue, SpaceTokenRemoteValue, StringTokenRemoteValue, TextCaseTokenRemoteValue, TextDecorationTokenRemoteValue, TypographyTokenRemoteValue, VisibilityTokenRemoteValue, ZIndexTokenRemoteValue } from "./SDKRemoteTokenValue";
|
|
2
2
|
export type ColorTokenRemoteData = {
|
|
3
3
|
aliasTo?: string;
|
|
4
4
|
value?: ColorTokenRemoteValue;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type StringTokenRemoteData = {
|
|
7
7
|
aliasTo?: string;
|
|
8
|
-
value?:
|
|
8
|
+
value?: StringTokenRemoteValue;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type FontFamilyTokenRemoteData = {
|
|
11
11
|
aliasTo?: string;
|
|
12
|
-
value?:
|
|
12
|
+
value?: StringTokenRemoteValue;
|
|
13
13
|
};
|
|
14
|
+
export type FontWeightTokenRemoteData = {
|
|
15
|
+
aliasTo?: string;
|
|
16
|
+
value?: StringTokenRemoteValue;
|
|
17
|
+
};
|
|
18
|
+
export type ProductCopyTokenRemoteData = {
|
|
19
|
+
aliasTo?: string;
|
|
20
|
+
value?: StringTokenRemoteValue;
|
|
21
|
+
};
|
|
22
|
+
export type AnyStringTokenRemoteData = StringTokenRemoteData | FontFamilyTokenRemoteData | FontWeightTokenRemoteData | ProductCopyTokenRemoteData;
|
|
23
|
+
export type TextCaseTokenRemoteData = {
|
|
24
|
+
aliasTo?: string;
|
|
25
|
+
value?: TextCaseTokenRemoteValue;
|
|
26
|
+
};
|
|
27
|
+
export type TextDecorationTokenRemoteData = {
|
|
28
|
+
aliasTo?: string;
|
|
29
|
+
value?: TextDecorationTokenRemoteValue;
|
|
30
|
+
};
|
|
31
|
+
export type VisibilityTokenRemoteData = {
|
|
32
|
+
aliasTo?: string;
|
|
33
|
+
value?: VisibilityTokenRemoteValue;
|
|
34
|
+
};
|
|
35
|
+
export type AnyOptionTokenRemoteValue = TextCaseTokenRemoteValue | TextDecorationTokenRemoteValue | VisibilityTokenRemoteValue;
|
|
36
|
+
export type AnyOptionTokenRemoteData = TextCaseTokenRemoteData | TextDecorationTokenRemoteData | VisibilityTokenRemoteData;
|
|
14
37
|
export type TypographyTokenRemoteData = {
|
|
15
38
|
aliasTo?: string;
|
|
16
39
|
value?: TypographyTokenRemoteValue;
|
|
17
40
|
};
|
|
18
|
-
export type
|
|
41
|
+
export type ShadowTokenRemoteData = {
|
|
19
42
|
aliasTo?: string;
|
|
20
|
-
value?:
|
|
43
|
+
value?: ShadowTokenRemoteValue | ShadowTokenRemoteData[];
|
|
21
44
|
};
|
|
22
|
-
export type
|
|
45
|
+
export type DimensionTokenRemoteData = {
|
|
46
|
+
aliasTo?: string;
|
|
47
|
+
value?: DimensionTokenRemoteValue;
|
|
48
|
+
};
|
|
49
|
+
export type SizeTokenRemoteData = {
|
|
50
|
+
aliasTo?: string;
|
|
51
|
+
value?: SizeTokenRemoteValue;
|
|
52
|
+
};
|
|
53
|
+
export type SpaceTokenRemoteData = {
|
|
54
|
+
aliasTo?: string;
|
|
55
|
+
value?: SpaceTokenRemoteValue;
|
|
56
|
+
};
|
|
57
|
+
export type OpacityTokenRemoteData = {
|
|
58
|
+
aliasTo?: string;
|
|
59
|
+
value?: OpacityTokenRemoteValue;
|
|
60
|
+
};
|
|
61
|
+
export type FontSizeTokenRemoteData = {
|
|
62
|
+
aliasTo?: string;
|
|
63
|
+
value?: FontSizeTokenRemoteValue;
|
|
64
|
+
};
|
|
65
|
+
export type LineHeightTokenRemoteData = {
|
|
66
|
+
aliasTo?: string;
|
|
67
|
+
value?: LineHeightTokenRemoteValue;
|
|
68
|
+
};
|
|
69
|
+
export type LetterSpacingTokenRemoteData = {
|
|
23
70
|
aliasTo?: string;
|
|
24
|
-
value?:
|
|
71
|
+
value?: LetterSpacingTokenRemoteValue;
|
|
72
|
+
};
|
|
73
|
+
export type ParagraphSpacingTokenRemoteData = {
|
|
74
|
+
aliasTo?: string;
|
|
75
|
+
value?: ParagraphSpacingTokenRemoteValue;
|
|
76
|
+
};
|
|
77
|
+
export type BorderWidthTokenRemoteData = {
|
|
78
|
+
aliasTo?: string;
|
|
79
|
+
value?: BorderWidthTokenRemoteValue;
|
|
80
|
+
};
|
|
81
|
+
export type RadiusTokenRemoteData = {
|
|
82
|
+
aliasTo?: string;
|
|
83
|
+
value?: RadiusTokenRemoteValue;
|
|
25
84
|
};
|
|
26
|
-
export type
|
|
85
|
+
export type DurationTokenRemoteData = {
|
|
27
86
|
aliasTo?: string;
|
|
28
|
-
value?:
|
|
87
|
+
value?: DurationTokenRemoteValue;
|
|
29
88
|
};
|
|
30
|
-
export type
|
|
89
|
+
export type ZIndexTokenRemoteData = {
|
|
31
90
|
aliasTo?: string;
|
|
32
|
-
value?:
|
|
91
|
+
value?: ZIndexTokenRemoteValue;
|
|
33
92
|
};
|
|
93
|
+
export type AnyDimensionTokenRemoteData = DimensionTokenRemoteData | SizeTokenRemoteData | SpaceTokenRemoteData | OpacityTokenRemoteData | FontSizeTokenRemoteData | LineHeightTokenRemoteData | LetterSpacingTokenRemoteData | ParagraphSpacingTokenRemoteData | BorderWidthTokenRemoteData | RadiusTokenRemoteData | DurationTokenRemoteData | ZIndexTokenRemoteData;
|
|
34
94
|
export type BorderTokenRemoteData = {
|
|
35
95
|
aliasTo?: string;
|
|
36
96
|
value?: BorderTokenRemoteValue;
|
|
37
97
|
};
|
|
38
98
|
export type GradientTokenRemoteData = {
|
|
39
99
|
aliasTo?: string;
|
|
40
|
-
value?: GradientTokenRemoteValue;
|
|
100
|
+
value?: GradientTokenRemoteValue | GradientTokenRemoteData[];
|
|
41
101
|
};
|
|
42
102
|
export type BlurTokenRemoteData = {
|
|
43
103
|
aliasTo?: string;
|