@supernova-studio/supernova-sdk-beta 1.6.10 → 1.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/build/sdk-typescript/src/browser-bundle.d.ts +1 -1
  2. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +45 -39
  3. package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +35 -0
  4. package/build/sdk-typescript/src/core/areas/SDKAreaBrands.d.ts +18 -0
  5. package/build/sdk-typescript/src/core/areas/SDKAreaBulkOperations.d.ts +31 -0
  6. package/build/sdk-typescript/src/core/areas/SDKAreaComponents.d.ts +43 -0
  7. package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +18 -0
  8. package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +17 -0
  9. package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +50 -0
  10. package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +26 -0
  11. package/build/sdk-typescript/src/core/areas/SDKAreaMe.d.ts +22 -0
  12. package/build/sdk-typescript/src/core/areas/SDKAreaPipelines.d.ts +36 -0
  13. package/build/sdk-typescript/src/core/areas/SDKAreaTokenValues.d.ts +140 -0
  14. package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +217 -0
  15. package/build/sdk-typescript/src/core/areas/SDKAreaUsers.d.ts +6 -0
  16. package/build/sdk-typescript/src/core/areas/SDKAreaVersions.d.ts +14 -0
  17. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +114 -0
  18. package/build/sdk-typescript/src/core/areas/SDKRemoteIdentifiers.d.ts +25 -0
  19. package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +16 -17
  20. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +209 -134
  21. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +124 -0
  22. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreRenderRequests.d.ts +18 -0
  23. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +73 -0
  24. package/build/sdk-typescript/src/core/errors/SDKSupernovaError.d.ts +41 -20
  25. package/build/sdk-typescript/src/core/resolvers/SDKAssetGroupResolver.d.ts +1 -1
  26. package/build/sdk-typescript/src/core/resolvers/SDKComponentGroupResolver.d.ts +13 -0
  27. package/build/sdk-typescript/src/core/resolvers/SDKComponentResolver.d.ts +5 -6
  28. package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +1 -4
  29. package/build/sdk-typescript/src/core/resolvers/SDKDocumentationItemResolver.d.ts +6 -8
  30. package/build/sdk-typescript/src/core/resolvers/SDKTokenGroupResolver.d.ts +1 -2
  31. package/build/sdk-typescript/src/core/resolvers/SDKTokenResolver.d.ts +73 -45
  32. package/build/sdk-typescript/src/exports.d.ts +143 -117
  33. package/build/sdk-typescript/src/index.d.ts +1 -1
  34. package/build/sdk-typescript/src/model/acl/SDKAcl.d.ts +51 -0
  35. package/build/sdk-typescript/src/model/assets/SDKRenderedAsset.d.ts +5 -5
  36. package/build/sdk-typescript/src/model/base/SDKBrand.d.ts +30 -0
  37. package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +56 -0
  38. package/build/sdk-typescript/src/model/base/SDKDesignSystemVersion.d.ts +40 -0
  39. package/build/sdk-typescript/src/model/base/SDKDocumentation.d.ts +10 -0
  40. package/build/sdk-typescript/src/model/components/SDKComponent.d.ts +4 -4
  41. package/build/sdk-typescript/src/model/components/SDKDesignComponent.d.ts +4 -4
  42. package/build/sdk-typescript/src/model/documentation/SDKDocumentationConfiguration.d.ts +5 -5
  43. package/build/sdk-typescript/src/model/documentation/SDKDocumentationGroup.d.ts +2 -2
  44. package/build/sdk-typescript/src/model/documentation/SDKDocumentationItem.d.ts +2 -2
  45. package/build/sdk-typescript/src/model/documentation/SDKDocumentationPage.d.ts +4 -4
  46. package/build/sdk-typescript/src/model/documentation/SDKDocumentationPageAsset.d.ts +4 -4
  47. package/build/sdk-typescript/src/model/documentation/SDKDocumentationPageBlock.d.ts +4 -6
  48. package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichText.d.ts +3 -3
  49. package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichTextSpan.d.ts +3 -3
  50. package/build/sdk-typescript/src/model/documentation/SDKDocumentationRichTextSpanAttribute.d.ts +2 -2
  51. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAsset.d.ts +3 -3
  52. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAssets.d.ts +6 -8
  53. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCallout.d.ts +5 -6
  54. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCode.d.ts +5 -6
  55. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockColumn.d.ts +2 -6
  56. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockColumnItem.d.ts +7 -9
  57. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockCustom.d.ts +5 -6
  58. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockDivider.d.ts +2 -6
  59. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedFigma.d.ts +2 -6
  60. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedGeneric.d.ts +5 -7
  61. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedLink.d.ts +5 -6
  62. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedStorybook.d.ts +2 -6
  63. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedYoutube.d.ts +1 -5
  64. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockFrame.d.ts +3 -3
  65. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockFrames.d.ts +6 -8
  66. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockHeading.d.ts +5 -6
  67. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockImage.d.ts +5 -7
  68. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockOrderedList.d.ts +2 -6
  69. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockQuote.d.ts +2 -6
  70. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockRenderCode.d.ts +3 -4
  71. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockShortcut.d.ts +3 -3
  72. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockShortcuts.d.ts +5 -7
  73. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTab.d.ts +2 -6
  74. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTabItem.d.ts +4 -6
  75. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTable.d.ts +4 -6
  76. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableCell.d.ts +4 -6
  77. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableColumn.d.ts +5 -5
  78. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTableRow.d.ts +2 -6
  79. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockText.d.ts +5 -7
  80. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockToken.d.ts +4 -6
  81. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTokenGroup.d.ts +4 -6
  82. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockTokenList.d.ts +4 -6
  83. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockUnorderedList.d.ts +2 -6
  84. package/build/sdk-typescript/src/model/documentation/builder/SDKDocumentationBlockBuilder.d.ts +1 -1
  85. package/build/sdk-typescript/src/model/documentation/configuration/SDKDocumentationItemConfiguration.d.ts +2 -2
  86. package/build/sdk-typescript/src/model/documentation/configuration/SDKDocumentationItemHeader.d.ts +6 -6
  87. package/build/sdk-typescript/src/model/elements/SDKElementDataView.d.ts +4 -4
  88. package/build/sdk-typescript/src/model/elements/SDKElementDataViewColumn.d.ts +2 -2
  89. package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +23 -6
  90. package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +6 -2
  91. package/build/sdk-typescript/src/model/elements/values/SDKElementPropertyValue.d.ts +2 -2
  92. package/build/sdk-typescript/src/model/enums/SDKBorderStyle.d.ts +6 -0
  93. package/build/sdk-typescript/src/model/enums/SDKIntegrationService.d.ts +7 -0
  94. package/build/sdk-typescript/src/model/enums/SDKTextCase.d.ts +2 -1
  95. package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +42 -6
  96. package/build/sdk-typescript/src/model/enums/SDKUnit.d.ts +13 -2
  97. package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +7 -0
  98. package/build/sdk-typescript/src/model/enums/SDKVisibilityType.d.ts +4 -0
  99. package/build/sdk-typescript/src/model/enums/SDKWorkspaceNPMRegistryAuthType.d.ts +6 -0
  100. package/build/sdk-typescript/src/model/enums/SDKWorkspaceNPMRegistryType.d.ts +12 -0
  101. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionPlanInterval.d.ts +6 -0
  102. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionProduct.d.ts +12 -0
  103. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatus.d.ts +18 -0
  104. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatusInternal.d.ts +8 -0
  105. package/build/sdk-typescript/src/model/exporters/SDKExporter.d.ts +3 -3
  106. package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlock.d.ts +2 -2
  107. package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlockProperty.d.ts +2 -2
  108. package/build/sdk-typescript/src/model/exporters/custom_blocks/SDKExporterCustomBlockVariant.d.ts +2 -2
  109. package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterConfigurationProperty.d.ts +5 -5
  110. package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +5 -5
  111. package/build/sdk-typescript/src/model/groups/SDKComponentGroup.d.ts +39 -0
  112. package/build/sdk-typescript/src/model/groups/SDKDesignComponentGroup.d.ts +7 -7
  113. package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +12 -11
  114. package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +16 -0
  115. package/build/sdk-typescript/src/model/support/SDKDesignComponentOrigin.d.ts +4 -4
  116. package/build/sdk-typescript/src/model/support/SDKFrameOrigin.d.ts +2 -2
  117. package/build/sdk-typescript/src/model/support/SDKSize.d.ts +2 -2
  118. package/build/sdk-typescript/src/model/support/SDKSource.d.ts +19 -9
  119. package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +2 -2
  120. package/build/sdk-typescript/src/model/themes/SDKThemeUtilities.d.ts +8 -3
  121. package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +16 -24
  122. package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +13 -21
  123. package/build/sdk-typescript/src/model/tokens/SDKBlurToken.d.ts +12 -8
  124. package/build/sdk-typescript/src/model/tokens/SDKBorderToken.d.ts +15 -10
  125. package/build/sdk-typescript/src/model/tokens/SDKColorToken.d.ts +19 -11
  126. package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +70 -0
  127. package/build/sdk-typescript/src/model/tokens/SDKGradientToken.d.ts +18 -10
  128. package/build/sdk-typescript/src/model/tokens/SDKShadowToken.d.ts +17 -13
  129. package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +36 -0
  130. package/build/sdk-typescript/src/model/tokens/SDKTextCaseToken.d.ts +23 -0
  131. package/build/sdk-typescript/src/model/tokens/SDKTextDecorationToken.d.ts +26 -0
  132. package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +13 -12
  133. package/build/sdk-typescript/src/model/tokens/SDKTokenCompator.d.ts +10 -10
  134. package/build/sdk-typescript/src/model/tokens/SDKTokenValue.d.ts +149 -63
  135. package/build/sdk-typescript/src/model/tokens/SDKTypographyToken.d.ts +12 -11
  136. package/build/sdk-typescript/src/model/tokens/SDKVisibilityToken.d.ts +18 -0
  137. package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenData.d.ts +74 -14
  138. package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +18 -16
  139. package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +73 -34
  140. package/build/sdk-typescript/src/model/users/SDKUser.d.ts +20 -11
  141. package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +49 -0
  142. package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +27 -0
  143. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceIPWhitelistSettings.d.ts +26 -0
  144. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceNPMRegistrySettings.d.ts +34 -0
  145. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceOnboarding.d.ts +30 -0
  146. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +30 -0
  147. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProfile.d.ts +68 -0
  148. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSSOSettings.d.ts +17 -0
  149. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +82 -0
  150. package/build/sdk-typescript/src/tests/Areas/AreaTokenValues.d.ts +0 -0
  151. package/build/sdk-typescript/src/tests/FigmaTokensDataLoader.d.ts +20 -0
  152. package/build/sdk-typescript/src/tests/Serialization/WorkspaceNPMRegistrySettings.spec.d.ts +1 -0
  153. package/build/sdk-typescript/src/tests/Serialization/WorkspaceOnboarding.spec.d.ts +1 -0
  154. package/build/sdk-typescript/src/tests/Serialization/WorkspaceSSOSettings.spec.d.ts +1 -0
  155. package/build/sdk-typescript/src/tests/Tooling/PluginFigmaTokens.spec.d.ts +1 -17
  156. package/build/sdk-typescript/src/tests/Tooling/ReadTokens.spec.d.ts +1 -0
  157. package/build/sdk-typescript/src/tests/Tooling/TokensModel.spec.d.ts +1 -0
  158. package/build/sdk-typescript/src/tests/helpers.d.ts +6 -1
  159. package/build/sdk-typescript/src/tests/validators.d.ts +83 -0
  160. package/build/sdk-typescript/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +15 -13
  161. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +15 -12
  162. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONGroupBuilder.d.ts +8 -6
  163. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +2 -1
  164. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +5 -3
  165. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +4 -4
  166. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapResolver.d.ts +2 -5
  167. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +7 -7
  168. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenGroupTreeMerger.d.ts +6 -6
  169. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +6 -6
  170. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +5 -6
  171. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTTokenSetResolver.d.ts +1 -2
  172. package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +4 -2
  173. package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTGroupTreeNode.d.ts +1 -4
  174. package/build/sdk-typescript/src/tools/design-tokens/utilities/tree/SDKDTParentChildMapping.d.ts +1 -1
  175. package/build/sdk-typescript/src/tools/json-builder/SDKToolsJSONBuilder.d.ts +6 -5
  176. package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +17 -20
  177. package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementStyleDictionaryTransformer.d.ts +11 -14
  178. package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +27 -36
  179. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +5 -6
  180. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +39 -39
  181. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +4 -8
  182. package/build/sdk-typescript/src/tools/search-index/SDKToolsDocSearch.d.ts +1 -1
  183. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewGenerator.d.ts +17 -0
  184. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewMetadataGenerator.d.ts +8 -0
  185. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewReferenceInfoGenerator.d.ts +10 -0
  186. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewSegmentGenerator.d.ts +5 -0
  187. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewStyleGenerator.d.ts +5 -0
  188. package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewTypes.d.ts +68 -0
  189. package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +8 -12
  190. package/build/sdk-typescript/src/utils/TokenUtils.d.ts +113 -0
  191. package/build/sdk-typescript/src/utils/UnreachableCaseError.d.ts +3 -0
  192. package/build/supernova-sdk-typescript.js +1 -1
  193. package/build/supernova-sdk-typescript.js.map +1 -1
  194. package/package.json +9 -6
  195. package/build/sdk-typescript/src/core/SDKBrand.d.ts +0 -80
  196. package/build/sdk-typescript/src/core/SDKBrandWriter.d.ts +0 -29
  197. package/build/sdk-typescript/src/core/SDKDesignSystem.d.ts +0 -62
  198. package/build/sdk-typescript/src/core/SDKDesignSystemVersion.d.ts +0 -99
  199. package/build/sdk-typescript/src/core/SDKDocumentation.d.ts +0 -55
  200. package/build/sdk-typescript/src/core/SDKWorkspace.d.ts +0 -26
  201. package/build/sdk-typescript/src/model/support/SDKWorkspaceNPMRegistry.d.ts +0 -13
  202. package/build/sdk-typescript/src/model/tokens/SDKFontToken.d.ts +0 -16
  203. package/build/sdk-typescript/src/model/tokens/SDKGenericToken.d.ts +0 -18
  204. package/build/sdk-typescript/src/model/tokens/SDKMeasureToken.d.ts +0 -26
  205. package/build/sdk-typescript/src/model/tokens/SDKRadiusToken.d.ts +0 -18
  206. package/build/sdk-typescript/src/model/tokens/SDKTextToken.d.ts +0 -16
  207. /package/build/sdk-typescript/src/tests/{Accessors/Brand.spec.d.ts → Areas/AreaBatchUpdates.spec.d.ts} +0 -0
  208. /package/build/sdk-typescript/src/tests/{Accessors/Components.spec.d.ts → Areas/AreaBrands.spec.d.ts} +0 -0
  209. /package/build/sdk-typescript/src/tests/{Accessors/DesignSystem.spec.d.ts → Areas/AreaMe.spec.d.ts} +0 -0
  210. /package/build/sdk-typescript/src/tests/{Accessors/DesignSystemVersion.spec.d.ts → Areas/AreaTokens.spec.d.ts} +0 -0
  211. /package/build/sdk-typescript/src/tests/{Accessors/Documentation.spec.d.ts → Areas/AreaWorkspace.spec.d.ts} +0 -0
  212. /package/build/sdk-typescript/src/tests/{Accessors/Supernova.spec.d.ts → Serialization/User.spec.d.ts} +0 -0
  213. /package/build/sdk-typescript/src/tests/{Accessors → Serialization}/Workspace.spec.d.ts +0 -0
  214. /package/build/sdk-typescript/src/tests/{Accessors/Theme.spec.d.ts → Serialization/WorkspaceIPWhitelistSettings.spec.d.ts} +0 -0
@@ -1,2 +1,7 @@
1
- import { Supernova } from '../core/SDKSupernova';
1
+ import { RemoteVersionIdentifier, RemoteWorkspaceVersionIdentifier } from "../core/areas/SDKRemoteIdentifiers";
2
+ import { Supernova } from "../core/SDKSupernova";
2
3
  export declare const testInstance: Supernova;
4
+ export declare const testVersionIdentifier: RemoteVersionIdentifier;
5
+ export declare const testWorkspaceVersionIdentifier: RemoteWorkspaceVersionIdentifier;
6
+ export declare const randomAlphabeticalOnlyIdentifier: (length: number) => string;
7
+ export declare const randomNumberInRange: (min: number, max: number) => number;
@@ -0,0 +1,83 @@
1
+ import { BorderPosition, ColorToken, ShadowType, TextCase, TextDecoration, Unit } from "../index";
2
+ import { BorderStyle } from "../model/enums/SDKBorderStyle";
3
+ import { StringTokenType } from "../model/enums/SDKTokenType";
4
+ import { Token } from "../model/tokens/SDKToken";
5
+ export declare const validateToken: (t: any, tokens: Token[], name: string, hex: string, opacity?: number) => void;
6
+ export declare const validateDimensionToken: (t: any, tokens: Token[], name: string, measure: number, unit: Unit) => void;
7
+ export declare const validateStringToken: (t: any, tokens: Token[], name: string, text: string, type: StringTokenType) => void;
8
+ export declare const validateOptionToken: (t: any, tokens: Token[], name: string, text: string) => void;
9
+ export declare const validateBorderToken: (t: any, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
10
+ export declare const validateShadowToken: (t: any, tokens: Token[], name: string, value: {
11
+ hex: string;
12
+ x: number;
13
+ y: number;
14
+ blur: number;
15
+ spread: number;
16
+ type: ShadowType;
17
+ }, layers: Array<{
18
+ hex: string;
19
+ x: number;
20
+ y: number;
21
+ blur: number;
22
+ spread: number;
23
+ type: ShadowType;
24
+ }>) => void;
25
+ export declare const validateShadowTokenRef: (t: any, tokens: Token[], description: string, refName: string, value: {
26
+ hex: string;
27
+ x: number;
28
+ y: number;
29
+ blur: number;
30
+ spread: number;
31
+ type: ShadowType;
32
+ }, layers: Array<{
33
+ hex: string;
34
+ x: number;
35
+ y: number;
36
+ blur: number;
37
+ spread: number;
38
+ type: ShadowType;
39
+ }>) => void;
40
+ export declare const validateShadowTokenRefMultiple: (t: any, tokens: Token[], description: string, layers: {
41
+ refName: string;
42
+ layers: Array<{
43
+ hex: string;
44
+ x: number;
45
+ y: number;
46
+ blur: number;
47
+ spread: number;
48
+ type: ShadowType;
49
+ }>;
50
+ }[]) => void;
51
+ export declare const validateShadowTokenInnerRef: (t: any, tokens: Token[], name: string, value: {
52
+ hex: string;
53
+ x: number;
54
+ xUnit: Unit;
55
+ y: number;
56
+ yUnit: Unit;
57
+ blur: number;
58
+ blurUnit: Unit;
59
+ spread: number;
60
+ spreadUnit: Unit;
61
+ type: ShadowType;
62
+ }, layers: Array<{
63
+ hex: string;
64
+ x: number;
65
+ xUnit: Unit;
66
+ y: number;
67
+ yUnit: Unit;
68
+ blur: number;
69
+ blurUnit: Unit;
70
+ spread: number;
71
+ spreadUnit: Unit;
72
+ type: ShadowType;
73
+ }>, allTokens: Map<string, Token>) => void;
74
+ export declare const validateTypographyToken: (t: any, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
75
+ export declare const validateTypographyTokenRef: (t: any, tokens: Token[], description: string, refName: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
76
+ export declare const validateTypographyTokenInnerRef: (t: any, tokens: Token[], name: string, fontFamily: string, fontWeight: string, lineHeightMeasure: number, fontSizeMeasure: number, letterSpacingMeasure: number, paragraphSpacingMeasure: number, paragraphIndentMeasure: number, textDecoration: TextDecoration, textCase: TextCase) => void;
77
+ export declare const validateNoToken: (t: any, tokens: Token[], name: string) => void;
78
+ export declare const validateTokenRef: (t: any, tokens: Token[], description: string, hex: string, name: string) => void;
79
+ export declare const validateTokensJustColorRef: (t: any, token: ColorToken, colorRef: ColorToken, name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
80
+ export declare const validateTokenJustColorRef: (t: any, tokens: Token[], name: string, hex: string, opacity?: number, colorRefId?: string, colorRefName?: string, refHex?: string, refOpacity?: number) => void;
81
+ export declare const validateDimensionTokenRef: (t: any, tokens: Token[], description: string, refName: string, measure: number, unit: Unit) => void;
82
+ export declare const validateBorderTokenRef: (t: any, tokens: Token[], description: string, refName: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
83
+ export declare const validateBorderTokenInnerRef: (t: any, tokens: Token[], name: string, hex: string, position: BorderPosition, style: BorderStyle, measure: number, unit: Unit) => void;
@@ -1,36 +1,38 @@
1
- import { DesignSystemVersion } from '../../core/SDKDesignSystemVersion';
2
- import { TokenGroup } from '../../model/groups/SDKTokenGroup';
3
- import { Token } from '../../model/tokens/SDKToken';
4
- import { DTProcessedTokenNode } from './utilities/SDKDTJSONConverter';
5
- import { DTTokenMergeDiff } from './utilities/SDKDTTokenMerger';
6
- import { Brand } from '../../core/SDKBrand';
7
- import { TokenTheme } from '../../model/themes/SDKTokenTheme';
8
- import { DTPluginToSupernovaMap, DTPluginToSupernovaMapPack, DTPluginToSupernovaSettings } from './utilities/SDKDTMapLoader';
1
+ import { Supernova } from "../../core/SDKSupernova";
2
+ import { Brand } from "../../model/base/SDKBrand";
3
+ import { TokenGroup } from "../../model/groups/SDKTokenGroup";
4
+ import { TokenTheme } from "../../model/themes/SDKTokenTheme";
5
+ import { Token } from "../../model/tokens/SDKToken";
6
+ import { DTProcessedTokenNode } from "./utilities/SDKDTJSONConverter";
7
+ import { DTPluginToSupernovaMap, DTPluginToSupernovaMapPack, DTPluginToSupernovaSettings } from "./utilities/SDKDTMapLoader";
8
+ import { DTTokenMergeDiff } from "./utilities/SDKDTTokenMerger";
9
9
  export type SupernovaToolsDesignTokensLoadingResult = {
10
10
  processedNodes: Array<DTProcessedTokenNode>;
11
11
  tokens: Array<Token>;
12
12
  groups: Array<TokenGroup>;
13
13
  };
14
14
  export type SupernovaToolsDesignTokensResult = {
15
- map: Pick<DTPluginToSupernovaMap, 'bindToBrand' | 'bindToTheme' | 'pluginSets' | 'pluginTheme' | 'type'>;
15
+ map: Pick<DTPluginToSupernovaMap, "bindToBrand" | "bindToTheme" | "pluginSets" | "pluginTheme" | "type">;
16
16
  tokensCreated: Array<string>;
17
17
  tokensUpdated: Array<string>;
18
18
  tokensDeleted: Array<string>;
19
19
  };
20
20
  /** Design Tokens Plugin Manipulation Tool */
21
21
  export declare class SupernovaToolsDesignTokensPlugin {
22
- private version;
22
+ private instance;
23
+ private designSystemId;
24
+ private versionId;
23
25
  private sortMultiplier;
24
- constructor(version: DesignSystemVersion);
26
+ constructor(designSystemId: string, versionId: string, instance: Supernova);
25
27
  synchronizeTokensFromData(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<boolean>;
26
28
  synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<SupernovaToolsDesignTokensResult[]>;
27
29
  private processTokenNodes;
28
30
  private setTokensOrigin;
29
31
  /** Creates pure tree for validation purposes, ignoring any existing token state in workspaces. This method works offline. */
30
- createPureTokenTree(processedNodes: Array<DTProcessedTokenNode>, verbose: boolean): Promise<{
32
+ createPureTokenTree(processedNodes: Array<DTProcessedTokenNode>, verbose: boolean): {
31
33
  tokens: Array<Token>;
32
34
  groups: Array<TokenGroup>;
33
- }>;
35
+ };
34
36
  /** Loads remote source connected to this tool, then merges tokens and groups with it, creating union. Can optionally write to the source as well */
35
37
  mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: boolean): Promise<{
36
38
  tokens: Array<Token>;
@@ -1,32 +1,35 @@
1
- import { Brand } from '../../../core/SDKBrand';
2
- import { DesignSystemVersion } from '../../../core/SDKDesignSystemVersion';
3
- import { Token } from '../../../model/tokens/SDKToken';
4
- import { DTParsedNode } from './SDKDTJSONLoader';
5
- import { DTPluginToSupernovaMapPack } from './SDKDTMapLoader';
6
- import { DTTokenReferenceResolver } from './SDKDTTokenReferenceResolver';
1
+ import { Brand } from "../../../model/base/SDKBrand";
2
+ import { DTOriginalTokenType } from "../../../model/enums/SDKTokenType";
3
+ import { Token } from "../../../model/tokens/SDKToken";
4
+ import { DTParsedNode } from "./SDKDTJSONLoader";
5
+ import { DTPluginToSupernovaMapPack } from "./SDKDTMapLoader";
6
+ import { DTTokenReferenceResolver } from "./SDKDTTokenReferenceResolver";
7
7
  export type DTProcessedTokenNode = {
8
8
  token: Token;
9
- originalType: string;
9
+ originalType: DTOriginalTokenType;
10
10
  path: Array<string>;
11
11
  key: string;
12
12
  };
13
13
  /** Utility to DS Tokens plugin JSON to Supernova entities */
14
14
  export declare class DTJSONConverter {
15
- version: DesignSystemVersion;
15
+ versionId: string;
16
16
  mapping: DTPluginToSupernovaMapPack;
17
17
  referenceResolver: DTTokenReferenceResolver;
18
- constructor(version: DesignSystemVersion, mapping: DTPluginToSupernovaMapPack);
18
+ constructor(versionId: string, mapping: DTPluginToSupernovaMapPack);
19
19
  convertNodesToTokens(nodes: Array<DTParsedNode>, brand: Brand): Array<DTProcessedTokenNode>;
20
20
  private remapRootNodeKeys;
21
21
  private convertNodesToTokensForSupportedNodeTypes;
22
22
  private convertAtomicNode;
23
23
  private convertColorAtomicNode;
24
- private convertMeasureAtomicNode;
25
- private convertRadiusAtomicNode;
24
+ private convertDimensionAtomicNode;
25
+ private convertStringAtomicNode;
26
+ private convertTextCaseAtomicNode;
27
+ private convertTextDecorationAtomicNode;
28
+ private convertVisibilityAtomicNode;
26
29
  private convertShadowAtomicNode;
27
30
  private convertBorderAtomicNode;
31
+ private convertGradientAtomicNode;
28
32
  private convertTypographyAtomicNode;
29
- private convertGenericAtomicNode;
30
33
  private convertReferencedNode;
31
34
  private convertPureReferencedNode;
32
35
  private convertComplexReferenceNode;
@@ -1,6 +1,8 @@
1
- import { Brand, DesignSystemVersion, TokenGroup, TokenType } from '../../..';
2
- import { DTProcessedTokenNode } from './SDKDTJSONConverter';
3
- import { DTPluginToSupernovaMapPack } from './SDKDTMapLoader';
1
+ import { Brand } from "../../../model/base/SDKBrand";
2
+ import { TokenType } from "../../../model/enums/SDKTokenType";
3
+ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
4
+ import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
5
+ import { DTPluginToSupernovaMapPack } from "./SDKDTMapLoader";
4
6
  export type DTRootGroupMapping = {
5
7
  snType: TokenType;
6
8
  dtType: string;
@@ -9,13 +11,13 @@ export type DTRootGroupMapping = {
9
11
  };
10
12
  /** Utility for building token trees */
11
13
  export declare class DTJSONGroupBuilder {
12
- version: DesignSystemVersion;
14
+ versionId: string;
13
15
  mapping: DTPluginToSupernovaMapPack;
14
- constructor(version: DesignSystemVersion, mapping: DTPluginToSupernovaMapPack);
16
+ constructor(versionId: string, mapping: DTPluginToSupernovaMapPack);
15
17
  /** Create mapping between DT <> SN and assign all tokens into their respective newly created groups */
16
18
  constructAllDefinableGroupsTrees(processedNodes: Array<DTProcessedTokenNode>, brand: Brand): Array<TokenGroup>;
17
19
  /** Create group tree needed to contain entire token tree for particular mapping combination */
18
20
  constructGroupTree(processedNodes: Array<DTProcessedTokenNode>, mapping: DTRootGroupMapping, brand: Brand): Array<TokenGroup>;
19
- constructGroupChain(version: DesignSystemVersion, brand: Brand, groups: Map<string, TokenGroup>, path: Array<string>): void;
21
+ constructGroupChain(versionId: string, brand: Brand, groups: Map<string, TokenGroup>, path: Array<string>): void;
20
22
  createGroup(brandId: string, versionId: string, name: string, type: TokenType, isRoot: boolean): TokenGroup;
21
23
  }
@@ -1,8 +1,9 @@
1
+ import { DTOriginalTokenType } from "../../../model/enums/SDKTokenType";
1
2
  export type DTParsedNode = {
2
3
  rootKey: string;
3
4
  name: string;
4
5
  path: Array<string>;
5
- type: string;
6
+ type: DTOriginalTokenType;
6
7
  value: any;
7
8
  description: string | null;
8
9
  };
@@ -1,8 +1,9 @@
1
+ import { DTOriginalTokenType } from "../../../model/enums/SDKTokenType";
1
2
  export type DTParsedNode = {
2
3
  rootKey: string;
3
4
  name: string;
4
5
  path: Array<string>;
5
- type: string;
6
+ type: DTOriginalTokenType;
6
7
  value: any;
7
8
  description: string | null;
8
9
  };
@@ -29,12 +30,13 @@ export declare enum DTParsedThemeSetPriority {
29
30
  export declare class DTJSONParser {
30
31
  themeBuffer: Array<DTParsedTheme>;
31
32
  constructor();
32
- processPluginDataRepresentation(definition: object): Promise<{
33
+ processPluginDataRepresentation(definition: object): {
33
34
  nodes: Array<DTParsedNode>;
34
35
  themes: Array<DTParsedTheme>;
35
36
  sets: Array<DTParsedTokenSet>;
36
- }>;
37
+ };
37
38
  private processThemes;
38
39
  private processSets;
39
40
  private parseNode;
41
+ private modifyEntityForParse;
40
42
  }
@@ -1,6 +1,6 @@
1
- import { TokenGroup } from '../../..';
2
- import { DTProcessedTokenNode } from './SDKDTJSONConverter';
3
- import { DTParsedNode } from './SDKDTJSONLoader';
1
+ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
2
+ import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
3
+ import { DTParsedNode } from "./SDKDTJSONLoader";
4
4
  export type DTPluginToSupernovaMapPack = Array<DTPluginToSupernovaMap>;
5
5
  export declare enum DTPluginToSupernovaMapType {
6
6
  theme = "theme",
@@ -17,7 +17,7 @@ export type DTPluginToSupernovaMap = {
17
17
  processedGroups: Array<TokenGroup> | null;
18
18
  };
19
19
  export type DTPluginToSupernovaMappingFile = {
20
- mode: 'single-file' | 'multi-file';
20
+ mode: "single-file" | "multi-file";
21
21
  mapping: [
22
22
  {
23
23
  tokensTheme?: string;
@@ -1,10 +1,7 @@
1
- import { DesignSystemVersion } from '../../../core/SDKDesignSystemVersion';
2
- import { DTParsedTheme, DTParsedTokenSet } from './SDKDTJSONLoader';
3
- import { DTPluginToSupernovaMap } from './SDKDTMapLoader';
1
+ import { DTParsedTheme, DTParsedTokenSet } from "./SDKDTJSONLoader";
2
+ import { DTPluginToSupernovaMap } from "./SDKDTMapLoader";
4
3
  /** Utility to resolve token maps */
5
4
  export declare class DTMapResolver {
6
- private version;
7
- constructor(version: DesignSystemVersion);
8
5
  mappedNodePools(map: DTPluginToSupernovaMap, themes: Array<DTParsedTheme>, sets: Array<DTParsedTokenSet>): DTPluginToSupernovaMap;
9
6
  private computeUniqueNodesFromSets;
10
7
  }
@@ -1,17 +1,17 @@
1
- import { DesignSystemVersion } from "../../../core/SDKDesignSystemVersion";
2
- import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
1
+ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
3
2
  import { TokenTheme } from "../../../model/themes/SDKTokenTheme";
4
3
  import { Token } from "../../../model/tokens/SDKToken";
4
+ import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
5
5
  export type DTThemeMergeDiff = {
6
6
  toUpdate: Array<DTProcessedTokenNode>;
7
7
  toCreate: Array<DTProcessedTokenNode>;
8
8
  };
9
9
  /** Utility allowing merging of two pools of tokens */
10
10
  export declare class DTThemeMerger {
11
- private version;
12
- constructor(version: DesignSystemVersion);
13
- makeTheme(upstreamTokens: Array<Token>, upstreamTheme: TokenTheme, processedNodes: Array<DTProcessedTokenNode>, preciseCopy?: boolean): TokenTheme;
14
- replaceIdAcrossAllPossibleReferences(override: DTProcessedTokenNode, newId: string, allTokens: Array<DTProcessedTokenNode>): void;
11
+ private versionId;
12
+ constructor(versionId: string);
13
+ makeTheme(upstreamTokens: Array<Token>, upstreamGroups: Array<TokenGroup>, upstreamTheme: TokenTheme, processedNodes: Array<DTProcessedTokenNode>, preciseCopy?: boolean): TokenTheme;
14
+ inlineTokens(themeReplica: TokenTheme, tokensInThemeButNotInUpstream: Map<string, DTProcessedTokenNode>): void;
15
15
  buildKey(path: Array<string>, name: string): string;
16
- buildPath(token: Token): Array<string>;
16
+ buildPath(token: Token, groups: Array<TokenGroup>): Array<string>;
17
17
  }
@@ -1,6 +1,7 @@
1
- import { Token, TokenGroup } from '../../..';
2
- import { DTTokenMergeDiff } from './SDKDTTokenMerger';
3
- import { TokenTreeElement } from './tree/SDKDTGroupTreeNode';
1
+ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
2
+ import { Token } from "../../../model/tokens/SDKToken";
3
+ import { TokenTreeElement } from "./tree/SDKDTGroupTree";
4
+ import { DTTokenMergeDiff } from "./SDKDTTokenMerger";
4
5
  export type DTTokenTreeMergeDiff = {
5
6
  toUpdate: Array<TokenTreeElement>;
6
7
  toCreate: Array<TokenTreeElement>;
@@ -11,13 +12,12 @@ export type DTGroupMergeDiffElement = {
11
12
  element: TokenTreeElement;
12
13
  childrenIds: Array<string>;
13
14
  };
14
- export declare class DTGroupMergeDiff {
15
+ export type DTGroupMergeDiff = {
15
16
  toUpdate: Array<DTGroupMergeDiffElement>;
16
17
  toCreate: Array<DTGroupMergeDiffElement>;
17
18
  toDelete: Array<TokenTreeElement>;
18
- }
19
+ };
19
20
  /** Utility allowing merging of two distinct token trees */
20
21
  export declare class DTTokenGroupTreeMerger {
21
- constructor();
22
22
  makeGroupsDiff(tokensDiff: DTTokenMergeDiff, existingElements: Array<Token | TokenGroup>): DTGroupMergeDiff;
23
23
  }
@@ -1,5 +1,6 @@
1
- import { Token } from '../../../model/tokens/SDKToken';
2
- import { DTProcessedTokenNode } from './SDKDTJSONConverter';
1
+ import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
2
+ import { Token } from "../../../model/tokens/SDKToken";
3
+ import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
3
4
  export type DTTokenMergeDiff = {
4
5
  toUpdate: Array<DTProcessedTokenNode>;
5
6
  toCreate: Array<DTProcessedTokenNode>;
@@ -8,10 +9,9 @@ export type DTTokenMergeDiff = {
8
9
  };
9
10
  /** Utility allowing merging of two pools of tokens */
10
11
  export declare class DTTokenMerger {
11
- constructor();
12
12
  static buildKey(path: Array<string>, name: string): string;
13
- buildPath(token: Token): Array<string>;
13
+ buildPath(token: Token, groups: Array<TokenGroup>): Array<string>;
14
14
  buildNodeMap(nodes: Array<DTProcessedTokenNode>): Map<string, DTProcessedTokenNode>;
15
- convertBaseTokensToProcessedNode(tokens: Array<Token>): Array<DTProcessedTokenNode>;
16
- makeTokensDiff(existing: Array<Token>, extracted: Array<DTProcessedTokenNode>): DTTokenMergeDiff;
15
+ convertBaseTokensToProcessedNode(tokens: Array<Token>, groups: Array<TokenGroup>): Array<DTProcessedTokenNode>;
16
+ makeTokensDiff(existing: Array<Token>, extracted: Array<DTProcessedTokenNode>, groups: Array<TokenGroup>): DTTokenMergeDiff;
17
17
  }
@@ -1,13 +1,12 @@
1
- import { AnyToken } from '../../../model/tokens/SDKTokenValue';
2
- import { Token } from '../../../model/tokens/SDKToken';
3
- import { DTProcessedTokenNode } from './SDKDTJSONConverter';
1
+ import { Token } from "../../../model/tokens/SDKToken";
2
+ import { AnyToken } from "../../../model/tokens/SDKTokenValue";
3
+ import { DTProcessedTokenNode } from "./SDKDTJSONConverter";
4
4
  /** Utility allowing resolution of token references */
5
5
  export declare class DTTokenReferenceResolver {
6
6
  private mappedTokens;
7
7
  private nodes;
8
- constructor();
9
8
  replaceRefs(existingToken: AnyToken, newToken: AnyToken): void;
10
- addAtomicToken(token: DTProcessedTokenNode): void;
9
+ addAtomicToken(token: DTProcessedTokenNode, indexOfNewNode: number): void;
11
10
  addAtomicTokens(tokens: Array<DTProcessedTokenNode>): void;
12
11
  unmappedValues(): Array<DTProcessedTokenNode>;
13
12
  lookupReferencedToken(reference: string): Token | undefined;
@@ -29,7 +28,7 @@ export declare class DTTokenReferenceResolver {
29
28
  valueIsPureReference(value: string | object): boolean;
30
29
  hasSameNumberOfCharacters(str: string, char1: string, char2: string): boolean;
31
30
  countCharacter(str: string, char: string): number;
32
- tokenReferenceKey(path: Array<String>, name: string): string;
31
+ tokenReferenceKey(path: Array<string>, name: string): string;
33
32
  findBracketStrings(str: string): {
34
33
  index: number;
35
34
  value: string;
@@ -1,4 +1,4 @@
1
- import { Token } from "../../..";
1
+ import { Token } from "../../../model/tokens/SDKToken";
2
2
  export type DTProcessedTheme = {
3
3
  sets: Array<DTProcessedTokenSet>;
4
4
  };
@@ -7,6 +7,5 @@ export type DTProcessedTokenSet = {
7
7
  };
8
8
  /** Utility allowing merging of two pools of tokens */
9
9
  export declare class DTTokenSetResolver {
10
- constructor();
11
10
  parseTokenSets(sets: any): void;
12
11
  }
@@ -1,5 +1,7 @@
1
- import { Token, TokenGroup, TokenType } from '../../../..';
2
- import { GroupTreeNode } from './SDKDTGroupTreeNode';
1
+ import { TokenType } from "../../../../model/enums/SDKTokenType";
2
+ import { TokenGroup } from "../../../../model/groups/SDKTokenGroup";
3
+ import { Token } from "../../../../model/tokens/SDKToken";
4
+ import { GroupTreeNode } from "./SDKDTGroupTreeNode";
3
5
  export type GroupTreeNodeWalker = (node: GroupTreeNode, path: GroupTreeNode[]) => void;
4
6
  export type TokenTreeElement = Token | TokenGroup;
5
7
  export declare class GroupTree extends GroupTreeNode {
@@ -1,7 +1,4 @@
1
- import { Token, TokenGroup } from '../../../..';
2
- import { GroupTree } from './SDKDTGroupTree';
3
- export type GroupTreeNodeWalker = (node: GroupTreeNode, path: GroupTreeNode[]) => void;
4
- export type TokenTreeElement = Token | TokenGroup;
1
+ import { GroupTree, GroupTreeNodeWalker, TokenTreeElement } from "./SDKDTGroupTree";
5
2
  export declare class GroupTreeNode {
6
3
  children: GroupTreeNode[];
7
4
  element: TokenTreeElement;
@@ -1,4 +1,4 @@
1
- import { TokenTreeElement } from "./SDKDTGroupTreeNode";
1
+ import { TokenTreeElement } from "./SDKDTGroupTree";
2
2
  export declare const MAX_SORT_ORDER: number;
3
3
  export declare function buildParentChildrenMap(elements: TokenTreeElement[]): {
4
4
  childrenMap: Map<string, TokenTreeElement[]>;
@@ -1,4 +1,3 @@
1
- import { DesignSystemVersion } from "../../core/SDKDesignSystemVersion";
2
1
  import { Supernova } from "../../core/SDKSupernova";
3
2
  import { TokenType } from "../../model/enums/SDKTokenType";
4
3
  import { TokenGroup } from "../../model/groups/SDKTokenGroup";
@@ -38,12 +37,14 @@ declare enum ConsumerMode {
38
37
  export declare class TokenJSONBuilder {
39
38
  private instance;
40
39
  private version;
40
+ private designSystemId;
41
+ private versionId;
41
42
  private tokenTransformer;
42
- constructor(instance: Supernova, version: DesignSystemVersion);
43
+ constructor(instance: Supernova, designSystemId: string, versionId: string);
43
44
  /** Fetches all tokens available for selected design system version, and converts them to style dictionary representation. */
44
- styleDictionaryRepresentation(options: TokenJSONBuilderOptions): Promise<Object>;
45
+ styleDictionaryRepresentation(options: TokenJSONBuilderOptions): Promise<{}>;
45
46
  /** Fetches all tokens available for selected design system version, and converts them to figma tokens representation. */
46
- figmaTokensRepresentation(isSingleFile: boolean): Promise<Object>;
47
+ figmaTokensRepresentation(isSingleFile: boolean): Promise<{}>;
47
48
  private buildTokenStructure;
48
49
  /** Generate style dictionary tree */
49
50
  private generateStyleDictionaryTree;
@@ -52,6 +53,6 @@ export declare class TokenJSONBuilder {
52
53
  /** Find all tokens that belong to a certain group and retrieve them as objects */
53
54
  static tokensOfGroup(containingGroup: TokenGroup, allTokens: Array<Token>): Array<Token>;
54
55
  /** Retrieve chain of groups up to a specified group, ordered from parent to children */
55
- static referenceGroupChain(containingGroup: TokenGroup): Array<TokenGroup>;
56
+ static referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
56
57
  }
57
58
  export {};
@@ -1,40 +1,37 @@
1
1
  import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
2
2
  import { Token } from "../../../model/tokens/SDKToken";
3
- import { BorderTokenValue, ColorTokenValue, FontTokenValue, GradientTokenValue, MeasureTokenValue, RadiusTokenValue, ShadowTokenValue, TextTokenValue, TypographyTokenValue } from "../../../model/tokens/SDKTokenValue";
4
- import { JSONBuilderNamingOption, TokenJSONBuilderOptionsInternal } from "../SDKToolsJSONBuilder";
3
+ import { AnyOptionTokenValue, AnyStringTokenValue, BorderTokenValue, ColorTokenValue, DimensionTokenValue, GradientTokenValue, ShadowTokenValue, TypographyTokenValue } from "../../../model/tokens/SDKTokenValue";
4
+ import { TokenJSONBuilderOptionsInternal } from "../SDKToolsJSONBuilder";
5
5
  import { TokenJSONElementTransformer } from "./SDKToolsJSONElementTransformer";
6
6
  /** Token transformer that allow generic transform of tokens to different destinations, like Style Dictionary or Figma Tokens representation */
7
7
  export declare class TokenJSONElementFigmaTokensTransformer extends TokenJSONElementTransformer {
8
8
  /** Represent color token value either as reference or as plain representation */
9
- representColorTokenValue(value: ColorTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
10
- /** Represent radius token value either as reference or as plain representation */
11
- representRadiusTokenValue(value: RadiusTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
12
- /** Represent measure token value either as reference or as plain representation */
13
- representMeasureTokenValue(value: MeasureTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
14
- /** Represent font token value either as reference or as plain representation */
15
- representFontTokenValue(value: FontTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
9
+ representColorTokenValue(value: ColorTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
10
+ /** Represent dimension token value either as reference or as plain representation */
11
+ representDimensionTokenValue(value: DimensionTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
16
12
  /** Represent text token value either as reference or as plain representation */
17
- representTextTokenValue(value: TextTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
13
+ representStringTokenValue(value: AnyStringTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
14
+ representOptionTokenValue(value: AnyOptionTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
18
15
  /** Represent typography token value either as reference or as plain representation */
19
- representTypographyTokenValue(value: TypographyTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
16
+ representTypographyTokenValue(value: TypographyTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
20
17
  /** Represent border token value either as reference or as plain representation */
21
- representBorderTokenValue(value: BorderTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
18
+ representBorderTokenValue(value: BorderTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
22
19
  /** Represent shadow token value either as reference or as plain representation */
23
- representShadowTokenValue(value: ShadowTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
20
+ representShadowTokenValue(values: ShadowTokenValue[], allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
24
21
  /** Represent gradient token value either as reference or as plain representation */
25
- representGradientTokenValue(value: GradientTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
22
+ representGradientTokenValue(values: GradientTokenValue[], allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
26
23
  /** Retrieve token wrapper containing its metadata and value information (used as container for each defined token) */
27
- tokenWrapper(token: Token, value: any, options: TokenJSONBuilderOptionsInternal): Object;
24
+ tokenWrapper(token: Token, value: any, options: TokenJSONBuilderOptionsInternal, groups: Array<TokenGroup>): object;
28
25
  /** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
29
- typeLabelConsideringAbstractGroups(token: Token): "border" | "color" | "fontSize" | "letterSpacing" | "lineHeight" | "paragraphSpacing" | "font" | "gradient" | "radius" | "shadow" | "text" | "typography" | "sizing" | "borderWidth" | "spacing" | "opacity" | "dimension" | "borderRadius";
26
+ typeLabelConsideringAbstractGroups(token: Token, groups: Array<TokenGroup>): string;
30
27
  /** Retrieve wrapper to certain token (referenced by name) pointing to token value */
31
- referenceWrapper(reference: string, options: TokenJSONBuilderOptionsInternal): string;
28
+ referenceWrapper(reference: string): string;
32
29
  /** Retrieve safe group name made out of normal group name
33
30
  * This replace spaces with dashes, also change anything non-alphanumeric char to it as well.
34
31
  * For example, ST&RK Industries will be changed to st-rk-industries
35
32
  */
36
- safeGroupName(group: TokenGroup, naming: JSONBuilderNamingOption): string;
33
+ safeGroupName(group: TokenGroup): string;
37
34
  /** Create full reference name representing token. Such name can, for example, look like: [g1].[g2].[g3].[g4].[token-name] */
38
- referenceName(token: Token, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): string;
39
- groupIsAbstract(group: TokenGroup): boolean;
35
+ referenceName(referenceId: string, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): string;
36
+ groupIsAbstract(group: TokenGroup, allGroups: Array<TokenGroup>): boolean;
40
37
  }
@@ -1,29 +1,26 @@
1
1
  import { TokenGroup } from "../../../model/groups/SDKTokenGroup";
2
2
  import { Token } from "../../../model/tokens/SDKToken";
3
- import { BorderTokenValue, ColorTokenValue, FontTokenValue, GradientTokenValue, MeasureTokenValue, RadiusTokenValue, ShadowTokenValue, TextTokenValue, TypographyTokenValue } from "../../../model/tokens/SDKTokenValue";
3
+ import { AnyOptionTokenValue, AnyStringTokenValue, BorderTokenValue, ColorTokenValue, DimensionTokenValue, GradientTokenValue, ShadowTokenValue, TypographyTokenValue } from "../../../model/tokens/SDKTokenValue";
4
4
  import { TokenJSONBuilderOptionsInternal } from "../SDKToolsJSONBuilder";
5
5
  import { TokenJSONElementTransformer } from "./SDKToolsJSONElementTransformer";
6
6
  /** Token transformer that allow generic transform of tokens to different destinations, like Style Dictionary or Figma Tokens representation */
7
7
  export declare class TokenJSONElementStyleDictionaryTransformer extends TokenJSONElementTransformer {
8
8
  /** Represent color token value either as reference or as plain representation */
9
- representColorTokenValue(value: ColorTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
10
- /** Represent radius token value either as reference or as plain representation */
11
- representRadiusTokenValue(value: RadiusTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
12
- /** Represent measure token value either as reference or as plain representation */
13
- representMeasureTokenValue(value: MeasureTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
14
- /** Represent font token value either as reference or as plain representation */
15
- representFontTokenValue(value: FontTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
9
+ representColorTokenValue(value: ColorTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
10
+ /** Represent dimension token value either as reference or as plain representation */
11
+ representDimensionTokenValue(value: DimensionTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
16
12
  /** Represent text token value either as reference or as plain representation */
17
- representTextTokenValue(value: TextTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
13
+ representStringTokenValue(value: AnyStringTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
14
+ representOptionTokenValue(value: AnyOptionTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
18
15
  /** Represent typography token value either as reference or as plain representation */
19
- representTypographyTokenValue(value: TypographyTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
16
+ representTypographyTokenValue(value: TypographyTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
20
17
  /** Represent border token value either as reference or as plain representation */
21
- representBorderTokenValue(value: BorderTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
18
+ representBorderTokenValue(value: BorderTokenValue, allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
22
19
  /** Represent shadow token value either as reference or as plain representation */
23
- representShadowTokenValue(value: ShadowTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
20
+ representShadowTokenValue(values: ShadowTokenValue[], allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
24
21
  /** Represent gradient token value either as reference or as plain representation */
25
- representGradientTokenValue(value: GradientTokenValue, allTokens: Array<Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
22
+ representGradientTokenValue(values: GradientTokenValue[], allTokens: Map<string, Token>, allGroups: Array<TokenGroup>, options: TokenJSONBuilderOptionsInternal): any;
26
23
  /** Retrieve wrapper to certain token (referenced by name) pointing to token value */
27
- referenceWrapper(reference: string, options: TokenJSONBuilderOptionsInternal): string;
24
+ referenceWrapper(reference: string): string;
28
25
  groupIsAbstract(group: TokenGroup): boolean;
29
26
  }