@supernova-studio/supernova-sdk-beta 1.6.15 → 1.6.17

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.
@@ -35165,6 +35165,18 @@ class AreaBulkOperations {
35165
35165
  return this.dataCore.bulkUpdateTokenData(to.designSystemId, to.versionId, data);
35166
35166
  });
35167
35167
  }
35168
+ /** Batch updates, creates or deletes component data from Supernova at once. Use this method to perform multiple operations at once instead of chaining single update operations. Batch routine runs everything in a single transaction, so either all operations succeed or all fail.
35169
+ *
35170
+ * WARNING: This method is not yet complete and only supports limited set of operations. Also, doesn't work as transation just yet.
35171
+ * @param to - Remote version to write to
35172
+ * @param data - Update information. All keys except component and its parent are optional and any combination of optional properties is allowed.
35173
+ * @returns Nothing
35174
+ */
35175
+ updateComponentData(to, data) {
35176
+ return __awaiter(this, void 0, void 0, function* () {
35177
+ return this.dataCore.bulkUpdateComponentData(to.designSystemId, to.versionId, data);
35178
+ });
35179
+ }
35168
35180
  }
35169
35181
  exports.AreaBulkOperations = AreaBulkOperations;
35170
35182
 
@@ -35198,6 +35210,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
35198
35210
  exports.AreaComponents = void 0;
35199
35211
  const SDKElementProperty_1 = __webpack_require__(/*! ../../model/elements/SDKElementProperty */ "./src/model/elements/SDKElementProperty.ts");
35200
35212
  const ComponentUtils_1 = __webpack_require__(/*! ../../utils/ComponentUtils */ "./src/utils/ComponentUtils.ts");
35213
+ const SDKSupernovaError_1 = __webpack_require__(/*! ../errors/SDKSupernovaError */ "./src/core/errors/SDKSupernovaError.ts");
35201
35214
  // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
35202
35215
  // MARK: - Users Area
35203
35216
  class AreaComponents {
@@ -35223,7 +35236,8 @@ class AreaComponents {
35223
35236
  */
35224
35237
  getComponentGroups(from) {
35225
35238
  return __awaiter(this, void 0, void 0, function* () {
35226
- return this.dataCore.componentGroups(from.designSystemId, from.versionId);
35239
+ // For now, retrieve just the root group that we create by hand
35240
+ throw SDKSupernovaError_1.SupernovaError.fromMessage("getComponentGroups should not be used right now. Components form a flat list and root group can be safely ignored.");
35227
35241
  });
35228
35242
  }
35229
35243
  /** Fetches all remote design components in the version
@@ -35279,9 +35293,13 @@ class AreaComponents {
35279
35293
  * @param parentId - Id of the group to add the component to. This is id of the group, not the versioned id
35280
35294
  * @returns New remote component ids
35281
35295
  */
35282
- createComponent(to, component, parentId) {
35296
+ createComponent(to, component
35297
+ // parentId: string
35298
+ ) {
35283
35299
  return __awaiter(this, void 0, void 0, function* () {
35284
- return this.dataCore.createComponent(to.designSystemId, to.versionId, component, parentId);
35300
+ return this.dataCore.createComponent(to.designSystemId, to.versionId, component
35301
+ // parentId
35302
+ );
35285
35303
  });
35286
35304
  }
35287
35305
  /** Creates local component. This component doesn't have id associated with it on remote, and must be created once with `createComponent` to be stored in design system
@@ -35296,9 +35314,13 @@ class AreaComponents {
35296
35314
  * @param parentId - Id of the group to add the group to. This is id of the group, not the versioned id
35297
35315
  * @returns New remote component group ids
35298
35316
  */
35299
- createComponentGroup(to, group, parentId) {
35317
+ createComponentGroup(to, group
35318
+ // parentId: string
35319
+ ) {
35300
35320
  return __awaiter(this, void 0, void 0, function* () {
35301
- return this.dataCore.createComponentGroup(to.designSystemId, to.versionId, group, parentId);
35321
+ return this.dataCore.createComponentGroup(to.designSystemId, to.versionId, group
35322
+ // parentId
35323
+ );
35302
35324
  });
35303
35325
  }
35304
35326
  /** Creates local component group. This group doesn't have id associated with it on remote, and must be created once with `createComponentGroup` to be stored in design system
@@ -37729,10 +37751,12 @@ class DataCore {
37729
37751
  });
37730
37752
  }
37731
37753
  /** Write new component to remote */
37732
- createComponent(designSystemId, versionId, component, parentId) {
37754
+ createComponent(designSystemId, versionId, component
37755
+ // parentId: string
37756
+ ) {
37733
37757
  return __awaiter(this, void 0, void 0, function* () {
37734
37758
  const componentWriteObject = component.toWriteObject();
37735
- componentWriteObject.groupPersistentId = parentId;
37759
+ // componentWriteObject.groupPersistentId = parentId <- Enable this once we support groups
37736
37760
  const remoteComponent = yield this.write.createRemoteComponent(designSystemId, versionId, componentWriteObject);
37737
37761
  return {
37738
37762
  id: remoteComponent.persistentId,
@@ -37743,15 +37767,17 @@ class DataCore {
37743
37767
  /** Update existing component in remote */
37744
37768
  updateComponent(designSystemId, versionId, component) {
37745
37769
  return __awaiter(this, void 0, void 0, function* () {
37746
- const componentWriteObject = component.toWriteObject();
37770
+ const componentWriteObject = component.toWriteUpdateObject();
37747
37771
  yield this.write.updateRemoteComponent(designSystemId, versionId, componentWriteObject);
37748
37772
  });
37749
37773
  }
37750
37774
  /** Write new component group to remote */
37751
- createComponentGroup(designSystemId, versionId, group, parentId) {
37775
+ createComponentGroup(designSystemId, versionId, group
37776
+ // parentId: string
37777
+ ) {
37752
37778
  return __awaiter(this, void 0, void 0, function* () {
37753
37779
  const groupWriteObject = group.toWriteObject();
37754
- groupWriteObject.parentId = parentId;
37780
+ // groupWriteObject.parentId = parentId
37755
37781
  const remoteGroup = yield this.write.createRemoteComponentGroup(designSystemId, versionId, groupWriteObject);
37756
37782
  return {
37757
37783
  id: remoteGroup.persistentId,
@@ -38225,6 +38251,47 @@ class DataCore {
38225
38251
  yield Promise.all(secondaryPromises);
38226
38252
  });
38227
38253
  }
38254
+ bulkUpdateComponentData(designSystemId, versionId, data) {
38255
+ return __awaiter(this, void 0, void 0, function* () {
38256
+ let primaryPromise = Promise.resolve();
38257
+ if (data.componentMode === "create") {
38258
+ // Create component if it didn't exist. We don't have to update the top level group, because BE will do that for us
38259
+ const ids = yield this.createComponent(designSystemId, versionId, data.component
38260
+ // data.componentParent.id
38261
+ );
38262
+ data.component.id = ids.id;
38263
+ data.component.idInVersion = ids.idInVersion;
38264
+ }
38265
+ else if (data.componentMode === "update") {
38266
+ // Update token because it did exist. In this case, also update group where it belongs
38267
+ // but make sure that `this.updateToken` runs first and `this.updateTokenGroup` after it
38268
+ primaryPromise = primaryPromise.then(() => this.updateComponent(designSystemId, versionId, data.component));
38269
+ /*
38270
+ .then(() =>
38271
+ this.updateComponentGroup(
38272
+ designSystemId,
38273
+ versionId,
38274
+ data.componentParent
38275
+ )
38276
+ ) */
38277
+ }
38278
+ // Add all secondary updates
38279
+ const secondaryPromises = new Array();
38280
+ if (data.propertyValuesToCreateOrUpdate) {
38281
+ data.propertyValuesToCreateOrUpdate.forEach((p) => {
38282
+ secondaryPromises.push(this.updateComponentPropertyValue(designSystemId, versionId, p.value, data.component, p.property));
38283
+ });
38284
+ }
38285
+ if (data.propertyValuesToDelete) {
38286
+ data.propertyValuesToDelete.forEach((p) => {
38287
+ secondaryPromises.push(this.deleteTokenPropertyValue(designSystemId, versionId, p));
38288
+ });
38289
+ }
38290
+ // NOTE: have the primary promise run first and secondary promises run after that
38291
+ yield primaryPromise;
38292
+ yield Promise.all(secondaryPromises);
38293
+ });
38294
+ }
38228
38295
  // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
38229
38296
  // MARK: - TS Data
38230
38297
  getTokenStudioData(designSystemId, versionId) {
@@ -38473,21 +38540,20 @@ class DataCoreReadRequests {
38473
38540
  const endpointBase = this.bridge.getVersionEndpoint(designSystemId, versionId, "tokens");
38474
38541
  // Create a URL object from the base endpoint
38475
38542
  const url = new URL(endpointBase);
38476
- /*
38477
38543
  if (filter) {
38478
- if (filter.type) {
38479
- const types = [filter.type] // Prep if we every decide that we want to support multiple types (API supports it)
38480
-
38481
- types.forEach((type) => {
38482
- url.searchParams.append("types", type)
38483
- })
38484
- }
38485
-
38486
- if (filter.brandId) {
38487
- url.searchParams.append("brandId", filter.brandId)
38488
- }
38544
+ /*
38545
+ if (filter.type) {
38546
+ const types = [filter.type] // Prep if we every decide that we want to support multiple types (API supports it)
38547
+
38548
+ types.forEach((type) => {
38549
+ url.searchParams.append("types", type)
38550
+ })
38551
+ }
38552
+ */
38553
+ if (filter.brandId) {
38554
+ url.searchParams.append("brandId", filter.brandId);
38555
+ }
38489
38556
  }
38490
- */
38491
38557
  // Get the full endpoint with the query string
38492
38558
  const endpoint = url.toString();
38493
38559
  const payload = yield this.bridge.get(endpoint);
@@ -39120,39 +39186,39 @@ class DataCoreWriteRequests {
39120
39186
  // MARK: - Components
39121
39187
  createRemoteComponent(designSystemId, versionId, component) {
39122
39188
  return __awaiter(this, void 0, void 0, function* () {
39123
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "components");
39189
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "design-system-components");
39124
39190
  const payload = yield this.bridge.post(endpoint, component);
39125
39191
  return payload.result.component;
39126
39192
  });
39127
39193
  }
39128
39194
  updateRemoteComponent(designSystemId, versionId, component) {
39129
39195
  return __awaiter(this, void 0, void 0, function* () {
39130
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `components/${component.id}`);
39196
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `design-system-components/${component.id}`);
39131
39197
  return this.bridge.put(endpoint, component);
39132
39198
  });
39133
39199
  }
39134
39200
  createRemoteComponentGroup(designSystemId, versionId, group) {
39135
39201
  return __awaiter(this, void 0, void 0, function* () {
39136
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "component-groups");
39202
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, "design-system-component-groups");
39137
39203
  const payload = yield this.bridge.post(endpoint, group);
39138
39204
  return payload.result.group;
39139
39205
  });
39140
39206
  }
39141
39207
  updateRemoteComponentGroup(designSystemId, versionId, group) {
39142
39208
  return __awaiter(this, void 0, void 0, function* () {
39143
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `component-groups/${group.id}`);
39209
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `design-system-component-groups/${group.id}`);
39144
39210
  return this.bridge.put(endpoint, group);
39145
39211
  });
39146
39212
  }
39147
39213
  deleteRemoteComponent(designSystemId, versionId, componentId) {
39148
39214
  return __awaiter(this, void 0, void 0, function* () {
39149
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `components/${componentId}`);
39215
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `design-system-components/${componentId}`);
39150
39216
  return this.bridge.delete(endpoint);
39151
39217
  });
39152
39218
  }
39153
39219
  ungroupRemoteComponentGroup(designSystemId, versionId, componentGroupId) {
39154
39220
  return __awaiter(this, void 0, void 0, function* () {
39155
- const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `component-groups/${componentGroupId}`);
39221
+ const endpoint = this.bridge.getVersionEndpoint(designSystemId, versionId, `design-system-component-groups/${componentGroupId}`);
39156
39222
  return this.bridge.delete(endpoint);
39157
39223
  });
39158
39224
  }
@@ -42102,7 +42168,6 @@ class Component {
42102
42168
  constructor(model, properties, propertyValues) {
42103
42169
  this.idInVersion = model.id;
42104
42170
  this.id = model.persistentId;
42105
- this.designSystemVersionId = model.designSystemVersionId;
42106
42171
  this.brandId = model.brandId;
42107
42172
  this.name = model.meta.name;
42108
42173
  this.description = model.meta.description;
@@ -42126,15 +42191,19 @@ class Component {
42126
42191
  var _a;
42127
42192
  return {
42128
42193
  id: this.idInVersion,
42129
- brandId: this.brandId,
42130
- designSystemVersionId: this.designSystemVersionId,
42131
42194
  persistentId: this.id,
42195
+ brandId: this.brandId,
42132
42196
  meta: {
42133
42197
  name: this.name,
42134
42198
  description: (_a = this.description) !== null && _a !== void 0 ? _a : "",
42135
42199
  },
42136
42200
  };
42137
42201
  }
42202
+ toWriteUpdateObject() {
42203
+ const model = this.toWriteObject();
42204
+ delete model.brandId;
42205
+ return model;
42206
+ }
42138
42207
  }
42139
42208
  exports.Component = Component;
42140
42209
 
@@ -46444,7 +46513,7 @@ class ThemeUtilities {
46444
46513
  replica = new SDKColorToken_1.ColorToken(versionId, {}, null, null, [], []);
46445
46514
  break;
46446
46515
  case SDKTokenType_1.TokenType.gradient:
46447
- replica = new SDKGradientToken_1.GradientToken(versionId, {}, null, null, [], []);
46516
+ replica = new SDKGradientToken_1.GradientToken(versionId, {}, [], null, [], []);
46448
46517
  break;
46449
46518
  case SDKTokenType_1.TokenType.dimension:
46450
46519
  replica = new SDKDimensionToken_1.DimensionToken(versionId, {}, null, null, [], []);
@@ -46483,7 +46552,7 @@ class ThemeUtilities {
46483
46552
  replica = new SDKDimensionToken_1.ZIndexToken(versionId, {}, null, null, [], []);
46484
46553
  break;
46485
46554
  case SDKTokenType_1.TokenType.shadow:
46486
- replica = new SDKShadowToken_1.ShadowToken(versionId, {}, null, null, [], []);
46555
+ replica = new SDKShadowToken_1.ShadowToken(versionId, {}, [], null, [], []);
46487
46556
  break;
46488
46557
  case SDKTokenType_1.TokenType.string:
46489
46558
  replica = new SDKStringToken_1.StringToken(versionId, {}, null, null, [], []);
@@ -46544,7 +46613,7 @@ class ThemeUtilities {
46544
46613
  replica = new SDKColorToken_1.ColorToken("", {}, null, null, [], []);
46545
46614
  break;
46546
46615
  case SDKTokenType_1.TokenType.gradient:
46547
- replica = new SDKGradientToken_1.GradientToken("", {}, null, null, [], []);
46616
+ replica = new SDKGradientToken_1.GradientToken("", {}, [], null, [], []);
46548
46617
  break;
46549
46618
  case SDKTokenType_1.TokenType.dimension:
46550
46619
  replica = new SDKDimensionToken_1.DimensionToken("", {}, null, null, [], []);
@@ -46583,7 +46652,7 @@ class ThemeUtilities {
46583
46652
  replica = new SDKDimensionToken_1.ZIndexToken("", {}, null, null, [], []);
46584
46653
  break;
46585
46654
  case SDKTokenType_1.TokenType.shadow:
46586
- replica = new SDKShadowToken_1.ShadowToken("", {}, null, null, [], []);
46655
+ replica = new SDKShadowToken_1.ShadowToken("", {}, [], null, [], []);
46587
46656
  break;
46588
46657
  case SDKTokenType_1.TokenType.string:
46589
46658
  replica = new SDKStringToken_1.StringToken("", {}, null, null, [], []);
@@ -48042,13 +48111,11 @@ class GradientToken extends SDKToken_1.Token {
48042
48111
  constructor(versionId, baseToken, value, alias, properties, propertyValues) {
48043
48112
  super(baseToken, versionId, properties, propertyValues);
48044
48113
  this.tokenType = SDKTokenType_1.TokenType.gradient;
48045
- this.value = value;
48114
+ this.value = value.map((gradientTokenValue) => (Object.assign({}, gradientTokenValue))); // NOTE: ensure no same reference
48046
48115
  this.gradientLayers = new Array();
48047
48116
  this.isVirtual = false;
48048
48117
  if (alias) {
48049
- for (const layer of this.value) {
48050
- layer.referencedTokenId = alias.id;
48051
- }
48118
+ this.value = this.value.map((tokenValueToUpdate) => (Object.assign(Object.assign({}, tokenValueToUpdate), { referencedTokenId: alias.id })));
48052
48119
  }
48053
48120
  }
48054
48121
  // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -48318,13 +48385,11 @@ class ShadowToken extends SDKToken_1.Token {
48318
48385
  constructor(versionId, baseToken, value, alias, properties, propertyValues) {
48319
48386
  super(baseToken, versionId, properties, propertyValues);
48320
48387
  this.tokenType = SDKTokenType_1.TokenType.shadow;
48321
- this.value = value;
48388
+ this.value = value.map((shadowTokenValue) => (Object.assign({}, shadowTokenValue))); // NOTE: ensure no same reference
48322
48389
  this.shadowLayers = new Array();
48323
48390
  this.isVirtual = false;
48324
48391
  if (alias) {
48325
- for (const layer of this.value) {
48326
- layer.referencedTokenId = alias.id;
48327
- }
48392
+ this.value = this.value.map((tokenValueToUpdate) => (Object.assign(Object.assign({}, tokenValueToUpdate), { referencedTokenId: alias.id })));
48328
48393
  }
48329
48394
  }
48330
48395
  // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
@@ -52101,6 +52166,7 @@ class DTTokenMerger {
52101
52166
  const existingAsProcessedNodes = this.convertBaseTokensToProcessedNode(existing, groups);
52102
52167
  const existingMap = this.buildNodeMap(existingAsProcessedNodes);
52103
52168
  const extractedMap = this.buildNodeMap(extracted);
52169
+ const idInVersionToIgnore = [];
52104
52170
  // Existing: font-sizing/font-size/fontsizes/body
52105
52171
  // Extracted: measure/font-size/fontsizes/body
52106
52172
  // Maybe, instead we should run a migration to rename origin.ids?
@@ -52118,6 +52184,7 @@ class DTTokenMerger {
52118
52184
  node.token.id = oldToken.token.id;
52119
52185
  node.token.idInVersion = oldToken.token.idInVersion;
52120
52186
  toUpdate.push(node);
52187
+ idInVersionToIgnore.push(oldToken.token.idInVersion);
52121
52188
  }
52122
52189
  else {
52123
52190
  const newId = (0, uuid_1.v4)();
@@ -52133,8 +52200,12 @@ class DTTokenMerger {
52133
52200
  TokenUtils_1.TokenUtils.replaceIdForComplexTokens(node.token, oldId, newId);
52134
52201
  }
52135
52202
  }
52203
+ const extractedMapWithoutMatchedTokens = this.buildNodeMap([...extractedMap.values()].filter(t => !idInVersionToIgnore.includes(t.token.idInVersion)));
52136
52204
  for (const node of existingAsProcessedNodes) {
52137
- const isInExtractedMap = !!TokenUtils_1.TokenUtils.getTokenByKeyOrBackwardKey(node, extractedMap);
52205
+ if (idInVersionToIgnore.includes(node.token.idInVersion)) {
52206
+ continue;
52207
+ }
52208
+ const isInExtractedMap = !!TokenUtils_1.TokenUtils.getTokenByKeyOrBackwardKey(node, extractedMapWithoutMatchedTokens);
52138
52209
  if (!isInExtractedMap) {
52139
52210
  toDelete.push(node);
52140
52211
  // Any tokens and theme overrides that were imported from Figma are unlinked (turned into SN tokens)
@@ -55900,7 +55971,7 @@ const TokenUtils_1 = __webpack_require__(/*! ../../utils/TokenUtils */ "./src/ut
55900
55971
  // MARK: - Utility
55901
55972
  class TokenUtilPreviewSegmentGenerator {
55902
55973
  static resolvedSegmentsForToken(token, allTokens) {
55903
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
55974
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45;
55904
55975
  switch (token.tokenType) {
55905
55976
  case SDKTokenType_1.TokenType.color: {
55906
55977
  const t = token;
@@ -55928,10 +55999,15 @@ class TokenUtilPreviewSegmentGenerator {
55928
55999
  const t = token;
55929
56000
  const reference = TokenUtils_1.TokenUtils.lookupReference((_d = t.value) === null || _d === void 0 ? void 0 : _d.referencedTokenId, allTokens);
55930
56001
  return [
56002
+ {
56003
+ value: (_e = t.value) === null || _e === void 0 ? void 0 : _e.type.toLowerCase(),
56004
+ prefersReferenceName: false,
56005
+ referencedName: undefined,
56006
+ },
55931
56007
  {
55932
56008
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value.radius),
55933
56009
  prefersReferenceName: false,
55934
- referencedName: (_e = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _e !== void 0 ? _e : undefined,
56010
+ referencedName: (_f = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _f !== void 0 ? _f : undefined,
55935
56011
  },
55936
56012
  ];
55937
56013
  }
@@ -56007,78 +56083,78 @@ class TokenUtilPreviewSegmentGenerator {
56007
56083
  }
56008
56084
  case SDKTokenType_1.TokenType.fontFamily: {
56009
56085
  const t = token;
56010
- const reference = TokenUtils_1.TokenUtils.lookupReference((_f = t.value) === null || _f === void 0 ? void 0 : _f.referencedTokenId, allTokens);
56086
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_g = t.value) === null || _g === void 0 ? void 0 : _g.referencedTokenId, allTokens);
56011
56087
  return [
56012
56088
  {
56013
56089
  value: t.value.text,
56014
56090
  prefersReferenceName: false,
56015
- referencedName: (_g = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _g !== void 0 ? _g : undefined,
56091
+ referencedName: (_h = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _h !== void 0 ? _h : undefined,
56016
56092
  },
56017
56093
  ];
56018
56094
  }
56019
56095
  case SDKTokenType_1.TokenType.fontWeight: {
56020
56096
  const t = token;
56021
- const reference = TokenUtils_1.TokenUtils.lookupReference((_h = t.value) === null || _h === void 0 ? void 0 : _h.referencedTokenId, allTokens);
56097
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_j = t.value) === null || _j === void 0 ? void 0 : _j.referencedTokenId, allTokens);
56022
56098
  return [
56023
56099
  {
56024
56100
  value: t.value.text,
56025
56101
  prefersReferenceName: false,
56026
- referencedName: (_j = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _j !== void 0 ? _j : undefined,
56102
+ referencedName: (_k = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _k !== void 0 ? _k : undefined,
56027
56103
  },
56028
56104
  ];
56029
56105
  }
56030
56106
  case SDKTokenType_1.TokenType.fontSize: {
56031
56107
  const t = token;
56032
- const reference = TokenUtils_1.TokenUtils.lookupReference((_k = t.value) === null || _k === void 0 ? void 0 : _k.referencedTokenId, allTokens);
56108
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_l = t.value) === null || _l === void 0 ? void 0 : _l.referencedTokenId, allTokens);
56033
56109
  return [
56034
56110
  {
56035
56111
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56036
56112
  prefersReferenceName: false,
56037
- referencedName: (_l = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _l !== void 0 ? _l : undefined,
56113
+ referencedName: (_m = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _m !== void 0 ? _m : undefined,
56038
56114
  },
56039
56115
  ];
56040
56116
  }
56041
56117
  case SDKTokenType_1.TokenType.lineHeight: {
56042
56118
  const t = token;
56043
- const reference = TokenUtils_1.TokenUtils.lookupReference((_m = t.value) === null || _m === void 0 ? void 0 : _m.referencedTokenId, allTokens);
56119
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_o = t.value) === null || _o === void 0 ? void 0 : _o.referencedTokenId, allTokens);
56044
56120
  return [
56045
56121
  {
56046
56122
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56047
56123
  prefersReferenceName: false,
56048
- referencedName: (_o = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _o !== void 0 ? _o : undefined,
56124
+ referencedName: (_p = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _p !== void 0 ? _p : undefined,
56049
56125
  },
56050
56126
  ];
56051
56127
  }
56052
56128
  case SDKTokenType_1.TokenType.letterSpacing: {
56053
56129
  const t = token;
56054
- const reference = TokenUtils_1.TokenUtils.lookupReference((_p = t.value) === null || _p === void 0 ? void 0 : _p.referencedTokenId, allTokens);
56130
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_q = t.value) === null || _q === void 0 ? void 0 : _q.referencedTokenId, allTokens);
56055
56131
  return [
56056
56132
  {
56057
56133
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56058
56134
  prefersReferenceName: false,
56059
- referencedName: (_q = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _q !== void 0 ? _q : undefined,
56135
+ referencedName: (_r = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _r !== void 0 ? _r : undefined,
56060
56136
  },
56061
56137
  ];
56062
56138
  }
56063
56139
  case SDKTokenType_1.TokenType.paragraphSpacing: {
56064
56140
  const t = token;
56065
- const reference = TokenUtils_1.TokenUtils.lookupReference((_r = t.value) === null || _r === void 0 ? void 0 : _r.referencedTokenId, allTokens);
56141
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_s = t.value) === null || _s === void 0 ? void 0 : _s.referencedTokenId, allTokens);
56066
56142
  return [
56067
56143
  {
56068
56144
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56069
56145
  prefersReferenceName: false,
56070
- referencedName: (_s = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _s !== void 0 ? _s : undefined,
56146
+ referencedName: (_t = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _t !== void 0 ? _t : undefined,
56071
56147
  },
56072
56148
  ];
56073
56149
  }
56074
56150
  case SDKTokenType_1.TokenType.opacity: {
56075
56151
  const t = token;
56076
- const reference = TokenUtils_1.TokenUtils.lookupReference((_t = t.value) === null || _t === void 0 ? void 0 : _t.referencedTokenId, allTokens);
56152
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_u = t.value) === null || _u === void 0 ? void 0 : _u.referencedTokenId, allTokens);
56077
56153
  return [
56078
56154
  {
56079
56155
  value: `${Math.round(t.value.measure * 100)}%`,
56080
56156
  prefersReferenceName: false,
56081
- referencedName: (_u = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _u !== void 0 ? _u : undefined,
56157
+ referencedName: (_v = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _v !== void 0 ? _v : undefined,
56082
56158
  },
56083
56159
  ];
56084
56160
  }
@@ -56105,7 +56181,7 @@ class TokenUtilPreviewSegmentGenerator {
56105
56181
  {
56106
56182
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value.width),
56107
56183
  prefersReferenceName: false,
56108
- referencedName: (_y = (_x = TokenUtils_1.TokenUtils.lookupReference((_w = (_v = t.value) === null || _v === void 0 ? void 0 : _v.width) === null || _w === void 0 ? void 0 : _w.referencedTokenId, allTokens)) === null || _x === void 0 ? void 0 : _x.name) !== null && _y !== void 0 ? _y : undefined,
56184
+ referencedName: (_z = (_y = TokenUtils_1.TokenUtils.lookupReference((_x = (_w = t.value) === null || _w === void 0 ? void 0 : _w.width) === null || _x === void 0 ? void 0 : _x.referencedTokenId, allTokens)) === null || _y === void 0 ? void 0 : _y.name) !== null && _z !== void 0 ? _z : undefined,
56109
56185
  },
56110
56186
  {
56111
56187
  value: style,
@@ -56115,7 +56191,7 @@ class TokenUtilPreviewSegmentGenerator {
56115
56191
  {
56116
56192
  value: SDKColorToken_1.ColorToken.colorValueToHex6(t.value.color).toUpperCase(),
56117
56193
  prefersReferenceName: true,
56118
- referencedName: (_2 = (_1 = TokenUtils_1.TokenUtils.lookupReference((_0 = (_z = t.value) === null || _z === void 0 ? void 0 : _z.color) === null || _0 === void 0 ? void 0 : _0.referencedTokenId, allTokens)) === null || _1 === void 0 ? void 0 : _1.name) !== null && _2 !== void 0 ? _2 : undefined,
56194
+ referencedName: (_3 = (_2 = TokenUtils_1.TokenUtils.lookupReference((_1 = (_0 = t.value) === null || _0 === void 0 ? void 0 : _0.color) === null || _1 === void 0 ? void 0 : _1.referencedTokenId, allTokens)) === null || _2 === void 0 ? void 0 : _2.name) !== null && _3 !== void 0 ? _3 : undefined,
56119
56195
  },
56120
56196
  ];
56121
56197
  if (t.value.color.opacity.measure < 1) {
@@ -56125,7 +56201,7 @@ class TokenUtilPreviewSegmentGenerator {
56125
56201
  {
56126
56202
  value: `${Math.round(t.value.color.opacity.measure * 100)}%`,
56127
56203
  prefersReferenceName: false,
56128
- referencedName: (_4 = (_3 = TokenUtils_1.TokenUtils.lookupReference(t.value.color.opacity.referencedTokenId, allTokens)) === null || _3 === void 0 ? void 0 : _3.name) !== null && _4 !== void 0 ? _4 : undefined,
56204
+ referencedName: (_5 = (_4 = TokenUtils_1.TokenUtils.lookupReference(t.value.color.opacity.referencedTokenId, allTokens)) === null || _4 === void 0 ? void 0 : _4.name) !== null && _5 !== void 0 ? _5 : undefined,
56129
56205
  },
56130
56206
  ]);
56131
56207
  }
@@ -56133,45 +56209,45 @@ class TokenUtilPreviewSegmentGenerator {
56133
56209
  }
56134
56210
  case SDKTokenType_1.TokenType.radius: {
56135
56211
  const t = token;
56136
- const reference = TokenUtils_1.TokenUtils.lookupReference((_5 = t.value) === null || _5 === void 0 ? void 0 : _5.referencedTokenId, allTokens);
56212
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_6 = t.value) === null || _6 === void 0 ? void 0 : _6.referencedTokenId, allTokens);
56137
56213
  return [
56138
56214
  {
56139
56215
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56140
56216
  prefersReferenceName: false,
56141
- referencedName: (_6 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _6 !== void 0 ? _6 : undefined,
56217
+ referencedName: (_7 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _7 !== void 0 ? _7 : undefined,
56142
56218
  },
56143
56219
  ];
56144
56220
  }
56145
56221
  case SDKTokenType_1.TokenType.borderWidth: {
56146
56222
  const t = token;
56147
- const reference = TokenUtils_1.TokenUtils.lookupReference((_7 = t.value) === null || _7 === void 0 ? void 0 : _7.referencedTokenId, allTokens);
56223
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_8 = t.value) === null || _8 === void 0 ? void 0 : _8.referencedTokenId, allTokens);
56148
56224
  return [
56149
56225
  {
56150
56226
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56151
56227
  prefersReferenceName: false,
56152
- referencedName: (_8 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _8 !== void 0 ? _8 : undefined,
56228
+ referencedName: (_9 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _9 !== void 0 ? _9 : undefined,
56153
56229
  },
56154
56230
  ];
56155
56231
  }
56156
56232
  case SDKTokenType_1.TokenType.duration: {
56157
56233
  const t = token;
56158
- const reference = TokenUtils_1.TokenUtils.lookupReference((_9 = t.value) === null || _9 === void 0 ? void 0 : _9.referencedTokenId, allTokens);
56234
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_10 = t.value) === null || _10 === void 0 ? void 0 : _10.referencedTokenId, allTokens);
56159
56235
  return [
56160
56236
  {
56161
56237
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56162
56238
  prefersReferenceName: false,
56163
- referencedName: (_10 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _10 !== void 0 ? _10 : undefined,
56239
+ referencedName: (_11 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _11 !== void 0 ? _11 : undefined,
56164
56240
  },
56165
56241
  ];
56166
56242
  }
56167
56243
  case SDKTokenType_1.TokenType.zIndex: {
56168
56244
  const t = token;
56169
- const reference = TokenUtils_1.TokenUtils.lookupReference((_11 = t.value) === null || _11 === void 0 ? void 0 : _11.referencedTokenId, allTokens);
56245
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_12 = t.value) === null || _12 === void 0 ? void 0 : _12.referencedTokenId, allTokens);
56170
56246
  return [
56171
56247
  {
56172
56248
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56173
56249
  prefersReferenceName: false,
56174
- referencedName: (_12 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _12 !== void 0 ? _12 : undefined,
56250
+ referencedName: (_13 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _13 !== void 0 ? _13 : undefined,
56175
56251
  },
56176
56252
  ];
56177
56253
  }
@@ -56197,12 +56273,12 @@ class TokenUtilPreviewSegmentGenerator {
56197
56273
  default:
56198
56274
  throw new Error("Unknown text case");
56199
56275
  }
56200
- const reference = TokenUtils_1.TokenUtils.lookupReference((_13 = t.value) === null || _13 === void 0 ? void 0 : _13.referencedTokenId, allTokens);
56276
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_14 = t.value) === null || _14 === void 0 ? void 0 : _14.referencedTokenId, allTokens);
56201
56277
  return [
56202
56278
  {
56203
56279
  value,
56204
56280
  prefersReferenceName: false,
56205
- referencedName: (_14 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _14 !== void 0 ? _14 : undefined,
56281
+ referencedName: (_15 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _15 !== void 0 ? _15 : undefined,
56206
56282
  },
56207
56283
  ];
56208
56284
  }
@@ -56222,12 +56298,12 @@ class TokenUtilPreviewSegmentGenerator {
56222
56298
  default:
56223
56299
  throw new Error("Unknown text decoration option");
56224
56300
  }
56225
- const reference = TokenUtils_1.TokenUtils.lookupReference((_15 = t.value) === null || _15 === void 0 ? void 0 : _15.referencedTokenId, allTokens);
56301
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_16 = t.value) === null || _16 === void 0 ? void 0 : _16.referencedTokenId, allTokens);
56226
56302
  return [
56227
56303
  {
56228
56304
  value,
56229
56305
  prefersReferenceName: false,
56230
- referencedName: (_16 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _16 !== void 0 ? _16 : undefined,
56306
+ referencedName: (_17 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _17 !== void 0 ? _17 : undefined,
56231
56307
  },
56232
56308
  ];
56233
56309
  }
@@ -56244,67 +56320,67 @@ class TokenUtilPreviewSegmentGenerator {
56244
56320
  default:
56245
56321
  throw new Error("Unknown visibility option");
56246
56322
  }
56247
- const reference = TokenUtils_1.TokenUtils.lookupReference((_17 = t.value) === null || _17 === void 0 ? void 0 : _17.referencedTokenId, allTokens);
56323
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_18 = t.value) === null || _18 === void 0 ? void 0 : _18.referencedTokenId, allTokens);
56248
56324
  return [
56249
56325
  {
56250
56326
  value,
56251
56327
  prefersReferenceName: false,
56252
- referencedName: (_18 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _18 !== void 0 ? _18 : undefined,
56328
+ referencedName: (_19 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _19 !== void 0 ? _19 : undefined,
56253
56329
  },
56254
56330
  ];
56255
56331
  }
56256
56332
  case SDKTokenType_1.TokenType.productCopy: {
56257
56333
  const t = token;
56258
- const reference = TokenUtils_1.TokenUtils.lookupReference((_19 = t.value) === null || _19 === void 0 ? void 0 : _19.referencedTokenId, allTokens);
56334
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_20 = t.value) === null || _20 === void 0 ? void 0 : _20.referencedTokenId, allTokens);
56259
56335
  return [
56260
56336
  {
56261
56337
  value: t.value.text,
56262
56338
  prefersReferenceName: false,
56263
- referencedName: (_20 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _20 !== void 0 ? _20 : undefined,
56339
+ referencedName: (_21 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _21 !== void 0 ? _21 : undefined,
56264
56340
  },
56265
56341
  ];
56266
56342
  }
56267
56343
  case SDKTokenType_1.TokenType.string: {
56268
56344
  const t = token;
56269
- const reference = TokenUtils_1.TokenUtils.lookupReference((_21 = t.value) === null || _21 === void 0 ? void 0 : _21.referencedTokenId, allTokens);
56345
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_22 = t.value) === null || _22 === void 0 ? void 0 : _22.referencedTokenId, allTokens);
56270
56346
  return [
56271
56347
  {
56272
56348
  value: t.value.text,
56273
56349
  prefersReferenceName: false,
56274
- referencedName: (_22 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _22 !== void 0 ? _22 : undefined,
56350
+ referencedName: (_23 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _23 !== void 0 ? _23 : undefined,
56275
56351
  },
56276
56352
  ];
56277
56353
  }
56278
56354
  case SDKTokenType_1.TokenType.dimension: {
56279
56355
  const t = token;
56280
- const reference = TokenUtils_1.TokenUtils.lookupReference((_23 = t.value) === null || _23 === void 0 ? void 0 : _23.referencedTokenId, allTokens);
56356
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_24 = t.value) === null || _24 === void 0 ? void 0 : _24.referencedTokenId, allTokens);
56281
56357
  return [
56282
56358
  {
56283
56359
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56284
56360
  prefersReferenceName: false,
56285
- referencedName: (_24 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _24 !== void 0 ? _24 : undefined,
56361
+ referencedName: (_25 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _25 !== void 0 ? _25 : undefined,
56286
56362
  },
56287
56363
  ];
56288
56364
  }
56289
56365
  case SDKTokenType_1.TokenType.size: {
56290
56366
  const t = token;
56291
- const reference = TokenUtils_1.TokenUtils.lookupReference((_25 = t.value) === null || _25 === void 0 ? void 0 : _25.referencedTokenId, allTokens);
56367
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_26 = t.value) === null || _26 === void 0 ? void 0 : _26.referencedTokenId, allTokens);
56292
56368
  return [
56293
56369
  {
56294
56370
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56295
56371
  prefersReferenceName: false,
56296
- referencedName: (_26 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _26 !== void 0 ? _26 : undefined,
56372
+ referencedName: (_27 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _27 !== void 0 ? _27 : undefined,
56297
56373
  },
56298
56374
  ];
56299
56375
  }
56300
56376
  case SDKTokenType_1.TokenType.space: {
56301
56377
  const t = token;
56302
- const reference = TokenUtils_1.TokenUtils.lookupReference((_27 = t.value) === null || _27 === void 0 ? void 0 : _27.referencedTokenId, allTokens);
56378
+ const reference = TokenUtils_1.TokenUtils.lookupReference((_28 = t.value) === null || _28 === void 0 ? void 0 : _28.referencedTokenId, allTokens);
56303
56379
  return [
56304
56380
  {
56305
56381
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value),
56306
56382
  prefersReferenceName: false,
56307
- referencedName: (_28 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _28 !== void 0 ? _28 : undefined,
56383
+ referencedName: (_29 = reference === null || reference === void 0 ? void 0 : reference.name) !== null && _29 !== void 0 ? _29 : undefined,
56308
56384
  },
56309
56385
  ];
56310
56386
  }
@@ -56317,7 +56393,7 @@ class TokenUtilPreviewSegmentGenerator {
56317
56393
  {
56318
56394
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value.lineHeight),
56319
56395
  prefersReferenceName: false,
56320
- referencedName: (_32 = (_31 = TokenUtils_1.TokenUtils.lookupReference((_30 = (_29 = t.value) === null || _29 === void 0 ? void 0 : _29.lineHeight) === null || _30 === void 0 ? void 0 : _30.referencedTokenId, allTokens)) === null || _31 === void 0 ? void 0 : _31.name) !== null && _32 !== void 0 ? _32 : undefined,
56396
+ referencedName: (_33 = (_32 = TokenUtils_1.TokenUtils.lookupReference((_31 = (_30 = t.value) === null || _30 === void 0 ? void 0 : _30.lineHeight) === null || _31 === void 0 ? void 0 : _31.referencedTokenId, allTokens)) === null || _32 === void 0 ? void 0 : _32.name) !== null && _33 !== void 0 ? _33 : undefined,
56321
56397
  },
56322
56398
  ];
56323
56399
  }
@@ -56325,18 +56401,18 @@ class TokenUtilPreviewSegmentGenerator {
56325
56401
  {
56326
56402
  value: SDKDimensionToken_1.DimensionToken.valueToString(t.value.fontSize),
56327
56403
  prefersReferenceName: false,
56328
- referencedName: (_36 = (_35 = TokenUtils_1.TokenUtils.lookupReference((_34 = (_33 = t.value) === null || _33 === void 0 ? void 0 : _33.fontSize) === null || _34 === void 0 ? void 0 : _34.referencedTokenId, allTokens)) === null || _35 === void 0 ? void 0 : _35.name) !== null && _36 !== void 0 ? _36 : undefined,
56404
+ referencedName: (_37 = (_36 = TokenUtils_1.TokenUtils.lookupReference((_35 = (_34 = t.value) === null || _34 === void 0 ? void 0 : _34.fontSize) === null || _35 === void 0 ? void 0 : _35.referencedTokenId, allTokens)) === null || _36 === void 0 ? void 0 : _36.name) !== null && _37 !== void 0 ? _37 : undefined,
56329
56405
  },
56330
56406
  ...lineHeightFragments,
56331
56407
  {
56332
56408
  value: t.value.fontFamily.text,
56333
56409
  prefersReferenceName: false,
56334
- referencedName: (_40 = (_39 = TokenUtils_1.TokenUtils.lookupReference((_38 = (_37 = t.value) === null || _37 === void 0 ? void 0 : _37.fontFamily) === null || _38 === void 0 ? void 0 : _38.referencedTokenId, allTokens)) === null || _39 === void 0 ? void 0 : _39.name) !== null && _40 !== void 0 ? _40 : undefined,
56410
+ referencedName: (_41 = (_40 = TokenUtils_1.TokenUtils.lookupReference((_39 = (_38 = t.value) === null || _38 === void 0 ? void 0 : _38.fontFamily) === null || _39 === void 0 ? void 0 : _39.referencedTokenId, allTokens)) === null || _40 === void 0 ? void 0 : _40.name) !== null && _41 !== void 0 ? _41 : undefined,
56335
56411
  },
56336
56412
  {
56337
56413
  value: t.value.fontWeight.text,
56338
56414
  prefersReferenceName: false,
56339
- referencedName: (_44 = (_43 = TokenUtils_1.TokenUtils.lookupReference((_42 = (_41 = t.value) === null || _41 === void 0 ? void 0 : _41.fontWeight) === null || _42 === void 0 ? void 0 : _42.referencedTokenId, allTokens)) === null || _43 === void 0 ? void 0 : _43.name) !== null && _44 !== void 0 ? _44 : undefined,
56415
+ referencedName: (_45 = (_44 = TokenUtils_1.TokenUtils.lookupReference((_43 = (_42 = t.value) === null || _42 === void 0 ? void 0 : _42.fontWeight) === null || _43 === void 0 ? void 0 : _43.referencedTokenId, allTokens)) === null || _44 === void 0 ? void 0 : _44.name) !== null && _45 !== void 0 ? _45 : undefined,
56340
56416
  },
56341
56417
  ];
56342
56418
  }
@@ -56376,7 +56452,7 @@ class TokenUtilPreviewSegmentGenerator {
56376
56452
  },
56377
56453
  {
56378
56454
  value: SDKColorToken_1.ColorToken.colorValueToHex6(layer.color).toUpperCase(),
56379
- prefersReferenceName: true,
56455
+ prefersReferenceName: false,
56380
56456
  referencedName: (_b = (_a = TokenUtils_1.TokenUtils.lookupReference(layer.color.referencedTokenId, allTokens)) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : undefined,
56381
56457
  },
56382
56458
  ];
@@ -56849,7 +56925,6 @@ class ComponentUtils {
56849
56925
  id: undefined,
56850
56926
  persistentId: (0, uuid_1.v4)(),
56851
56927
  brandId,
56852
- designSystemVersionId: versionId,
56853
56928
  meta: {
56854
56929
  name: name !== null && name !== void 0 ? name : "Group",
56855
56930
  description: "",
@@ -58400,8 +58475,6 @@ class TokenUtils {
58400
58475
  if (token.tokenType !== reference.tokenType) {
58401
58476
  throw exports_1.SupernovaError.fromMessage("Can't reference token of different type");
58402
58477
  }
58403
- // NOTE: make sure that token copy value is blank to have new value copied in
58404
- update.value = [];
58405
58478
  update.value[layerIndex] = Object.assign(Object.assign({}, (0, lodash_2.cloneDeep)(reference.value[layerIndex])), { referencedTokenId: reference.id });
58406
58479
  return update;
58407
58480
  }
@@ -58609,17 +58682,20 @@ class TokenUtils {
58609
58682
  static buildFallbackKey(node) {
58610
58683
  return this.buildKey(node.path, node.token.name)
58611
58684
  .replace(/^measure\//, this.mapTypeToPrefix(node.token.tokenType) + '/')
58612
- .replace(/^generic\//, this.mapTypeToPrefix(node.token.tokenType) + '/');
58685
+ .replace(/^generic\//, this.mapTypeToPrefix(node.token.tokenType) + '/')
58686
+ .replace(/^radius\//, this.mapTypeToPrefix(node.token.tokenType) + '/');
58613
58687
  }
58614
58688
  static buildFallbackKeyBack(node) {
58615
58689
  return this.buildKey(node.path, node.token.name)
58616
- .replace(/^(font-size|font-sizing|line-height|letter-spacing|paragraph-spacing|spacing|space|opacity|size|sizing)\//, 'measure/')
58617
- .replace(/^(font-family|font-weight)\//, 'generic/');
58690
+ .replace(/^(dimension|font-size|font-sizing|line-height|letter-spacing|paragraph-spacing|spacing|space|opacity|size|sizing|border-width)\//, 'measure/')
58691
+ .replace(/^(font-family|font-weight)\//, 'generic/')
58692
+ .replace(/^(border-radius)\//, 'radius/');
58618
58693
  }
58619
58694
  static buildFallbackKey2(node) {
58620
58695
  return this.buildKey(node.path, node.token.name)
58621
58696
  .replace(/^measure\//, this.mapTypeToPrefix2(node.token.tokenType) + '/')
58622
- .replace(/^generic\//, this.mapTypeToPrefix(node.token.tokenType) + '/');
58697
+ .replace(/^generic\//, this.mapTypeToPrefix(node.token.tokenType) + '/')
58698
+ .replace(/^radius\//, this.mapTypeToPrefix(node.token.tokenType) + '/');
58623
58699
  }
58624
58700
  static getTokenByKeyOrFallbackKeys(node, map) {
58625
58701
  var _a;
@@ -58629,7 +58705,7 @@ class TokenUtils {
58629
58705
  static getKeysByKeyOrFallbackKeys(node) {
58630
58706
  const key = TokenUtils.buildKey(node.path, node.token.name);
58631
58707
  const fallbackKey = TokenUtils.buildFallbackKey(node);
58632
- const fallbackKey2 = TokenUtils.buildFallbackKey(node);
58708
+ const fallbackKey2 = TokenUtils.buildFallbackKey2(node);
58633
58709
  // FIXMENOW: Verify and test
58634
58710
  const fallbackKey3 = TokenUtils.buildFallbackKeyBack(node);
58635
58711
  // if (key !== fallbackKey || key !== fallbackKey2) console.log({ key, fallbackKey, fallbackKey2 })
@@ -58662,7 +58738,7 @@ TokenUtils.mapTypeToPrefix = (type) => {
58662
58738
  case SDKTokenType_1.TokenType.space:
58663
58739
  return 'spacing';
58664
58740
  case SDKTokenType_1.TokenType.radius:
58665
- return 'radius';
58741
+ return 'border-radius';
58666
58742
  case SDKTokenType_1.TokenType.fontFamily:
58667
58743
  return 'font-family';
58668
58744
  case SDKTokenType_1.TokenType.fontWeight: