@supernova-studio/client 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -249,6 +249,9 @@ var Asset = z13.object({
249
249
  properties: AssetProperties.nullish(),
250
250
  origin: AssetOrigin.nullish()
251
251
  });
252
+ function isImportedAsset(asset) {
253
+ return !!asset.origin;
254
+ }
252
255
 
253
256
  // ../model/src/dsm/data-sources/data-source.ts
254
257
  import { z as z14 } from "zod";
@@ -501,6 +504,9 @@ var DesignElementType = DesignTokenType.or(
501
504
  "PageBlock"
502
505
  ])
503
506
  );
507
+ function isTokenType(type) {
508
+ return DesignTokenType.safeParse(type).success;
509
+ }
504
510
  var DesignElementCategory = z27.enum([
505
511
  "Token",
506
512
  "Component",
@@ -856,10 +862,18 @@ var PageBlockV1 = PageBlockBaseV1.extend({
856
862
  () => PageBlockV1.array().nullish().transform((t) => t ?? [])
857
863
  )
858
864
  });
865
+ function traversePageBlocksV1(blocks2, action) {
866
+ for (const block of blocks2) {
867
+ action(block);
868
+ traversePageBlocksV1(block.children, action);
869
+ }
870
+ }
859
871
 
860
872
  // ../model/src/dsm/elements/data/documentation-block-v2.ts
861
873
  import { z as z33 } from "zod";
862
- var PageBlockLinkType = z33.enum(["Page", "PageHeading", "Group", "Url"]);
874
+ var PageBlockLinkType = z33.enum(["DocumentationItem", "PageHeading", "Url"]);
875
+ var PageBlockImageType = z33.enum(["Upload", "Asset", "FigmaFrame"]);
876
+ var PageBlockImageAlignment = z33.enum(["Left", "Center", "Stretch"]);
863
877
  var PageBlockAppearanceV2 = z33.object({
864
878
  itemBackgroundColor: ColorValue
865
879
  });
@@ -870,6 +884,11 @@ var PageBlockItemRichTextPropertyValue = z33.object({
870
884
  value: PageBlockText,
871
885
  calloutType: PageBlockCalloutType.optional()
872
886
  });
887
+ var PageBlockItemEmbedPropertyValue = z33.object({
888
+ value: z33.string().optional(),
889
+ caption: z33.string().optional(),
890
+ height: z33.number().optional()
891
+ });
873
892
  var PageBlockItemMultiRichTextPropertyValue = z33.object({
874
893
  value: PageBlockText.array()
875
894
  });
@@ -877,11 +896,26 @@ var PageBlockItemTextPropertyValue = z33.object({
877
896
  value: z33.string(),
878
897
  calloutType: PageBlockCalloutType.optional()
879
898
  });
899
+ var PageBlockItemImageReference = z33.object({
900
+ type: PageBlockImageType,
901
+ url: z33.string(),
902
+ assetId: z33.string().optional(),
903
+ size: Size.optional(),
904
+ figmaFile: z33.object({
905
+ sourceId: z33.string(),
906
+ frameId: z33.string()
907
+ }).optional()
908
+ });
909
+ var PageBlockItemImageValue = z33.object({
910
+ alt: z33.string().optional(),
911
+ caption: z33.string().optional(),
912
+ alignment: PageBlockImageAlignment.optional(),
913
+ value: PageBlockItemImageReference.optional()
914
+ });
880
915
  var PageBlockLinkV2 = z33.object({
881
916
  type: PageBlockLinkType,
882
- pageId: z33.string().optional(),
917
+ documentationItemId: z33.string().optional(),
883
918
  pageHeadingId: z33.string().optional(),
884
- groupId: z33.string().optional(),
885
919
  url: z33.string().optional(),
886
920
  openInNewTab: z33.boolean().optional()
887
921
  });
@@ -959,6 +993,16 @@ var FigmaFileStructureElementData = z38.object({
959
993
  assetsInFile: FigmaFileStructureStatistics
960
994
  })
961
995
  });
996
+ function figmaFileStructureToMap(root) {
997
+ const map = /* @__PURE__ */ new Map();
998
+ recursiveFigmaFileStructureToMap(root, map);
999
+ return map;
1000
+ }
1001
+ function recursiveFigmaFileStructureToMap(node, map) {
1002
+ map.set(node.id, node);
1003
+ for (const child of node.children)
1004
+ recursiveFigmaFileStructureToMap(child, map);
1005
+ }
962
1006
 
963
1007
  // ../model/src/dsm/elements/data/figma-node-reference.ts
964
1008
  import { z as z39 } from "zod";
@@ -1199,6 +1243,9 @@ var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shap
1199
1243
  svg: ComponentAsset.optional(),
1200
1244
  isAsset: z60.boolean()
1201
1245
  });
1246
+ function isImportedComponent(component) {
1247
+ return !!component.origin;
1248
+ }
1202
1249
 
1203
1250
  // ../model/src/dsm/elements/documentation-page-v1.ts
1204
1251
  import { z as z61 } from "zod";
@@ -1237,6 +1284,12 @@ var FigmaFileStructure = DesignElementBase.extend({
1237
1284
  origin: FigmaFileStructureOrigin,
1238
1285
  data: FigmaFileStructureData
1239
1286
  });
1287
+ function traverseStructure(node, action) {
1288
+ action(node);
1289
+ for (const child of node.children) {
1290
+ traverseStructure(child, action);
1291
+ }
1292
+ }
1240
1293
 
1241
1294
  // ../model/src/dsm/elements/figma-node-reference.ts
1242
1295
  var FigmaNodeReference = DesignElementBase.extend({
@@ -1431,6 +1484,21 @@ var DesignTokenTypedData = z66.discriminatedUnion("type", [
1431
1484
  ]);
1432
1485
  var DesignToken = DesignTokenTypedData.and(DesignTokenBase);
1433
1486
  var CreateDesignToken = DesignTokenTypedData.and(CreateDesignTokenBase);
1487
+ function extractTokenTypedData(source) {
1488
+ return {
1489
+ type: source.type,
1490
+ data: source.data
1491
+ };
1492
+ }
1493
+ function isImportedDesignToken(designToken) {
1494
+ return !!designToken.origin;
1495
+ }
1496
+ function isDesignTokenOfType(designToken, type) {
1497
+ return designToken.type === type;
1498
+ }
1499
+ function designTokenTypeFilter(type) {
1500
+ return (designToken) => isDesignTokenOfType(designToken, type);
1501
+ }
1434
1502
 
1435
1503
  // ../model/src/dsm/elements/theme.ts
1436
1504
  var ThemeOverrideOriginPart = DesignTokenOriginPart;
@@ -1650,6 +1718,12 @@ var DesignTokenImportModelInputBase = ImportModelInputBase.extend(DesignTokenImp
1650
1718
  });
1651
1719
  var DesignTokenImportModel = DesignTokenTypedData.and(DesignTokenImportModelBase);
1652
1720
  var DesignTokenImportModelInput = DesignTokenTypedData.and(DesignTokenImportModelInputBase);
1721
+ function isDesignTokenImportModelOfType(designToken, type) {
1722
+ return designToken.type === type;
1723
+ }
1724
+ function designTokenImportModelTypeFilter(type) {
1725
+ return (designToken) => isDesignTokenImportModelOfType(designToken, type);
1726
+ }
1653
1727
 
1654
1728
  // ../model/src/dsm/import/figma-frames.ts
1655
1729
  import { z as z75 } from "zod";
@@ -1673,6 +1747,16 @@ var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
1673
1747
  ).extend({
1674
1748
  fileVersionId: z75.string()
1675
1749
  });
1750
+ function figmaFileStructureImportModelToMap(root) {
1751
+ const map = /* @__PURE__ */ new Map();
1752
+ recursiveFigmaFileStructureToMap2(root, map);
1753
+ return map;
1754
+ }
1755
+ function recursiveFigmaFileStructureToMap2(node, map) {
1756
+ map.set(node.id, node);
1757
+ for (const child of node.children)
1758
+ recursiveFigmaFileStructureToMap2(child, map);
1759
+ }
1676
1760
 
1677
1761
  // ../model/src/dsm/import/data-source.ts
1678
1762
  import { z as z76 } from "zod";
@@ -1700,6 +1784,16 @@ var ImportModelCollection = z77.object({
1700
1784
  themes: z77.array(ThemeImportModel).default([]),
1701
1785
  figmaFileStructures: z77.array(FigmaFileStructureImportModel)
1702
1786
  });
1787
+ function addImportModelCollections(lhs, rhs) {
1788
+ return {
1789
+ sources: [...lhs.sources, ...rhs.sources],
1790
+ tokens: [...lhs.tokens, ...rhs.tokens],
1791
+ components: [...lhs.components, ...rhs.components],
1792
+ themeUpdates: [...lhs.themeUpdates, ...rhs.themeUpdates],
1793
+ themes: [...lhs.themes, ...rhs.themes],
1794
+ figmaFileStructures: [...lhs.figmaFileStructures, ...rhs.figmaFileStructures]
1795
+ };
1796
+ }
1703
1797
 
1704
1798
  // ../model/src/dsm/import/warning.ts
1705
1799
  import { z as z78 } from "zod";
@@ -1837,7 +1931,8 @@ var PageBlockDefinitionPropertyType = z82.enum([
1837
1931
  "CodeSandbox",
1838
1932
  "Table",
1839
1933
  "Divider",
1840
- "Storybook"
1934
+ "Storybook",
1935
+ "Color"
1841
1936
  ]);
1842
1937
  var PageBlockDefinitionRichTextPropertyStyle = z82.enum([
1843
1938
  "Title1",
@@ -2196,6 +2291,14 @@ var DesignSystemUpdateInput = z97.object({
2196
2291
  docExporterId: z97.string().optional()
2197
2292
  });
2198
2293
 
2294
+ // ../model/src/dsm/published-doc-page.ts
2295
+ var SHORT_PERSISTENT_ID_LENGTH = 8;
2296
+ function tryParseShortPersistentId(url = "/") {
2297
+ const lastUrlPart = url.split("/").pop() || "";
2298
+ const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
2299
+ return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
2300
+ }
2301
+
2199
2302
  // ../model/src/dsm/published-doc.ts
2200
2303
  import { z as z98 } from "zod";
2201
2304
  var publishedDocEnvironments = ["Live", "Preview"];
@@ -3879,6 +3982,11 @@ var BlockParsingUtils = {
3879
3982
  const richText = PageBlockItemMultiRichTextPropertyValue.parse(objectValue);
3880
3983
  return richText;
3881
3984
  },
3985
+ embedPropertyValue(item, propertyKey) {
3986
+ const objectValue = this.objectPropertyValue(item, propertyKey);
3987
+ const embed = PageBlockItemEmbedPropertyValue.parse(objectValue);
3988
+ return embed;
3989
+ },
3882
3990
  objectPropertyValue(item, propertyKey) {
3883
3991
  const value = this.propertyValueOrThrow(item, propertyKey);
3884
3992
  if (typeof value !== "object") {
@@ -3912,6 +4020,12 @@ var BlockDefinitionUtils = {
3912
4020
  return property;
3913
4021
  return void 0;
3914
4022
  },
4023
+ firstEmbedProperty(definition) {
4024
+ const property = definition.item.properties.find((p) => p.type === "EmbedURL");
4025
+ if (property)
4026
+ return property;
4027
+ return void 0;
4028
+ },
3915
4029
  richTextProperty(definition, propertyKey) {
3916
4030
  return this.property(definition, propertyKey, "RichText");
3917
4031
  },
@@ -3967,6 +4081,24 @@ function blockToProsemirrorNode(block, definition) {
3967
4081
  property: multiRichTextProperty
3968
4082
  });
3969
4083
  }
4084
+ const embedProperty = BlockDefinitionUtils.firstEmbedProperty(definition);
4085
+ const embedType = serializeEmbedType(block.data.packageId);
4086
+ if (embedProperty && embedType) {
4087
+ return serializeAsEmbed(
4088
+ {
4089
+ block,
4090
+ definition,
4091
+ property: embedProperty
4092
+ },
4093
+ embedType
4094
+ );
4095
+ }
4096
+ if (block.data.packageId === "io.supernova.block.divider") {
4097
+ return serializeAsDivider({
4098
+ block,
4099
+ definition
4100
+ });
4101
+ }
3970
4102
  return serializeAsCustomBlock(block, definition);
3971
4103
  }
3972
4104
  function serializeAsRichTextBlock(input) {
@@ -4079,6 +4211,38 @@ function serializeAsListItem(text) {
4079
4211
  ]
4080
4212
  };
4081
4213
  }
4214
+ function serializeAsEmbed(input, embedType) {
4215
+ const { block, definition, property: embedProperty } = input;
4216
+ const blockItem = BlockParsingUtils.singleBlockItem(block);
4217
+ const embedValue = BlockParsingUtils.embedPropertyValue(blockItem, embedProperty.id);
4218
+ return {
4219
+ type: "embed",
4220
+ attrs: {
4221
+ ...serializeBlockNodeAttributes(input),
4222
+ type: embedType,
4223
+ url: embedValue.value,
4224
+ height: embedValue.height,
4225
+ caption: embedValue.caption
4226
+ }
4227
+ };
4228
+ }
4229
+ function serializeEmbedType(blockDefinitionId) {
4230
+ switch (blockDefinitionId) {
4231
+ case "io.supernova.block.embed":
4232
+ return "generic";
4233
+ case "io.supernova.block.embed-youtube":
4234
+ return "youtube";
4235
+ case "io.supernova.block.embed-figma":
4236
+ return "figma";
4237
+ }
4238
+ return void 0;
4239
+ }
4240
+ function serializeAsDivider(input) {
4241
+ return {
4242
+ type: "horizontalrule",
4243
+ attrs: serializeBlockNodeAttributes(input)
4244
+ };
4245
+ }
4082
4246
  function serializeBlockNodeAttributes(input) {
4083
4247
  const { block } = input;
4084
4248
  return {
@@ -4171,43 +4335,23 @@ function serializeTextSpanAttribute(spanAttribute) {
4171
4335
  }
4172
4336
  }
4173
4337
  function serializeAsCustomBlock(block, definition) {
4174
- const items = block.data.items.map((i) => serializeItem(i, block, definition));
4338
+ const items = block.data.items.map((i) => {
4339
+ return {
4340
+ id: i.id,
4341
+ props: i.props,
4342
+ linksTo: i.linksTo
4343
+ };
4344
+ });
4175
4345
  return {
4176
4346
  type: "blockNode",
4177
4347
  attrs: {
4178
4348
  id: block.id,
4179
4349
  definitionId: block.data.packageId,
4180
- variantId: "default",
4181
- columns: 1,
4350
+ variantId: block.data.variantId,
4182
4351
  items: JSON.stringify(items)
4183
- // TODO Docs: variant, columns
4184
4352
  }
4185
4353
  };
4186
4354
  }
4187
- function serializeItem(item, block, definition) {
4188
- const result = {
4189
- properties: []
4190
- };
4191
- for (const property of definition.item.properties) {
4192
- const serializedValue = serializePropertyValue(item, property);
4193
- serializedValue && result.properties.push(serializedValue);
4194
- }
4195
- return result;
4196
- }
4197
- function serializePropertyValue(item, property) {
4198
- const value = item.props[property.id] ?? void 0;
4199
- if (!value) {
4200
- return void 0;
4201
- }
4202
- const result = {
4203
- id: property.id,
4204
- data: {}
4205
- };
4206
- if (typeof value === "string") {
4207
- result.data.value = value;
4208
- }
4209
- return result;
4210
- }
4211
4355
  function nonNullFilter(item) {
4212
4356
  return !!item;
4213
4357
  }
@@ -4801,7 +4945,7 @@ var blocks = [
4801
4945
  {
4802
4946
  id: "block.links.property.title",
4803
4947
  name: "Title",
4804
- type: "RichText",
4948
+ type: "Text",
4805
4949
  description: void 0,
4806
4950
  options: { textStyle: "Title5" },
4807
4951
  variantOptions: void 0
@@ -4809,7 +4953,7 @@ var blocks = [
4809
4953
  {
4810
4954
  id: "block.links.property.description",
4811
4955
  name: "Short description",
4812
- type: "RichText",
4956
+ type: "Text",
4813
4957
  description: void 0,
4814
4958
  options: { textStyle: "Default", color: "NeutralFaded" },
4815
4959
  variantOptions: void 0
@@ -5603,24 +5747,86 @@ function prosemirrorNodeToBlock(prosemirrorNode, definition) {
5603
5747
  if (richTextProperty) {
5604
5748
  return parseAsRichText(prosemirrorNode, definition, richTextProperty);
5605
5749
  }
5750
+ const multiRichTextProperty = BlockDefinitionUtils.firstMultiRichTextProperty(definition);
5751
+ if (multiRichTextProperty) {
5752
+ return parseAsMultiRichText(prosemirrorNode, definition, multiRichTextProperty);
5753
+ }
5754
+ const embedProperty = BlockDefinitionUtils.firstEmbedProperty(definition);
5755
+ if (prosemirrorNode.type === "embed" && embedProperty) {
5756
+ return parseAsEmbed(prosemirrorNode, definition, embedProperty);
5757
+ }
5758
+ if (definition.id === "io.supernova.block.divider") {
5759
+ return parseAsDivider(prosemirrorNode, definition);
5760
+ }
5606
5761
  return parseAsCustomBlock(prosemirrorNode, definition);
5607
5762
  }
5608
5763
  function parseAsRichText(prosemirrorNode, definition, property) {
5609
5764
  const id = parseProsemirrorBlockAttribute(prosemirrorNode, "id");
5610
5765
  const variantId = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "variantId");
5766
+ const calloutType = parseCalloutType(parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "type"));
5611
5767
  return {
5612
5768
  // TODO Artem: indent
5613
5769
  id,
5770
+ ...variantId && { variantId },
5614
5771
  data: {
5615
5772
  packageId: definition.id,
5616
5773
  indentLevel: 0,
5617
- variantId,
5618
5774
  items: [
5619
5775
  {
5620
5776
  id,
5621
5777
  props: {
5622
5778
  [property.id]: {
5623
- value: parseRichText(prosemirrorNode.content ?? [])
5779
+ // Required
5780
+ value: parseRichText(prosemirrorNode.content ?? []),
5781
+ // Optional
5782
+ ...calloutType && { calloutType }
5783
+ }
5784
+ }
5785
+ }
5786
+ ]
5787
+ }
5788
+ };
5789
+ }
5790
+ function parseCalloutType(prosemirrorCalloutType) {
5791
+ if (!prosemirrorCalloutType)
5792
+ return void 0;
5793
+ switch (prosemirrorCalloutType) {
5794
+ case "error":
5795
+ return "Error";
5796
+ case "neutral":
5797
+ return "Info";
5798
+ case "success":
5799
+ return "Success";
5800
+ case "warning":
5801
+ return "Warning";
5802
+ }
5803
+ }
5804
+ function parseAsMultiRichText(prosemirrorNode, definition, property) {
5805
+ const id = parseProsemirrorBlockAttribute(prosemirrorNode, "id");
5806
+ const variantId = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "variantId");
5807
+ return {
5808
+ // TODO Artem: indent
5809
+ id,
5810
+ data: {
5811
+ packageId: definition.id,
5812
+ indentLevel: 0,
5813
+ ...variantId && { variantId },
5814
+ items: [
5815
+ {
5816
+ id,
5817
+ props: {
5818
+ [property.id]: {
5819
+ // Required
5820
+ value: (prosemirrorNode.content ?? []).map((listItem) => {
5821
+ if (listItem.type !== "listitem")
5822
+ return null;
5823
+ if (!listItem.content?.length)
5824
+ return parseRichText([]);
5825
+ const paragraph = listItem.content[0];
5826
+ if (paragraph.type !== "paragraph")
5827
+ return parseRichText([]);
5828
+ return parseRichText(paragraph.content ?? []);
5829
+ }).filter(nonNullFilter2)
5624
5830
  }
5625
5831
  }
5626
5832
  }
@@ -5664,8 +5870,97 @@ function parseRichTextAttribute(mark) {
5664
5870
  }
5665
5871
  return null;
5666
5872
  }
5873
+ function parseAsEmbed(prosemirrorNode, definition, property) {
5874
+ const id = parseProsemirrorBlockAttribute(prosemirrorNode, "id");
5875
+ const variantId = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "variantId");
5876
+ const url = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "url");
5877
+ const caption = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "caption");
5878
+ const height = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "height");
5879
+ return {
5880
+ id,
5881
+ data: {
5882
+ packageId: definition.id,
5883
+ indentLevel: 0,
5884
+ ...variantId && { variantId },
5885
+ items: [
5886
+ {
5887
+ id,
5888
+ props: {
5889
+ [property.id]: {
5890
+ value: url,
5891
+ caption,
5892
+ height
5893
+ }
5894
+ }
5895
+ }
5896
+ ]
5897
+ }
5898
+ };
5899
+ }
5900
+ function parseAsDivider(prosemirrorNode, definition) {
5901
+ const id = parseProsemirrorBlockAttribute(prosemirrorNode, "id");
5902
+ const variantId = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "variantId");
5903
+ return {
5904
+ id,
5905
+ data: {
5906
+ packageId: definition.id,
5907
+ indentLevel: 0,
5908
+ ...variantId && { variantId },
5909
+ items: [{ id, props: {} }]
5910
+ }
5911
+ };
5912
+ }
5667
5913
  function parseAsCustomBlock(prosemirrorNode, definition) {
5668
- return null;
5914
+ const id = parseProsemirrorBlockAttribute(prosemirrorNode, "id");
5915
+ const variantId = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, "variantId");
5916
+ const itemsString = parseProsemirrorBlockAttribute(prosemirrorNode, "items");
5917
+ const itemsJson = JSON.parse(itemsString);
5918
+ if (!Array.isArray(itemsJson)) {
5919
+ console.error("Block `items` property must be a json array");
5920
+ return null;
5921
+ }
5922
+ const parsedItems = itemsJson.map((i) => parseItem(i, definition));
5923
+ return {
5924
+ id,
5925
+ data: {
5926
+ packageId: definition.id,
5927
+ indentLevel: 0,
5928
+ ...variantId && { variantId },
5929
+ items: parsedItems
5930
+ }
5931
+ };
5932
+ }
5933
+ function parseItem(rawItem, definition) {
5934
+ const parsedItem = PageBlockItemV2.safeParse(rawItem);
5935
+ if (!parsedItem.success) {
5936
+ return null;
5937
+ }
5938
+ const sanitizedProps = {};
5939
+ for (const property of definition.item.properties) {
5940
+ const value = parsedItem.data.props[property.id];
5941
+ if (!value) {
5942
+ return null;
5943
+ }
5944
+ switch (property.type) {
5945
+ case "Text":
5946
+ PageBlockItemTextPropertyValue.parse(value);
5947
+ break;
5948
+ case "EmbedURL":
5949
+ PageBlockItemEmbedPropertyValue.parse(value);
5950
+ break;
5951
+ case "Image":
5952
+ PageBlockItemImageValue.parse(value);
5953
+ break;
5954
+ default:
5955
+ return null;
5956
+ }
5957
+ sanitizedProps[property.id] = value;
5958
+ }
5959
+ return {
5960
+ id: parsedItem.data.id,
5961
+ linksTo: parsedItem.data.linksTo,
5962
+ props: sanitizedProps
5963
+ };
5669
5964
  }
5670
5965
  function parseProsemirrorBlockAttribute(prosemirrorNode, attributeName) {
5671
5966
  const attributeValue = parseProsemirrorOptionalBlockAttribute(prosemirrorNode, attributeName);
@@ -5688,22 +5983,433 @@ function mapByUnique(items, keyFn) {
5688
5983
  return result;
5689
5984
  }
5690
5985
  export {
5986
+ Address,
5987
+ Asset,
5988
+ AssetFontProperties,
5989
+ AssetImportModelInput,
5990
+ AssetOrigin,
5991
+ AssetProperties,
5992
+ AssetReference,
5993
+ AssetScope,
5994
+ AssetType,
5995
+ AssetValue,
5996
+ AuthTokens,
5997
+ BasePulsarProperty,
5998
+ BillingDetails,
5999
+ BillingIntervalSchema,
6000
+ BillingType,
6001
+ BillingTypeSchema,
5691
6002
  BlockDefinitionUtils,
5692
6003
  BlockParsingUtils,
6004
+ BlurTokenData,
6005
+ BlurType,
6006
+ BlurValue,
6007
+ BorderPosition,
6008
+ BorderRadiusTokenData,
6009
+ BorderRadiusUnit,
6010
+ BorderRadiusValue,
6011
+ BorderStyle,
6012
+ BorderTokenData,
6013
+ BorderValue,
6014
+ BorderWidthTokenData,
6015
+ BorderWidthUnit,
6016
+ BorderWidthValue,
6017
+ BrandedElementGroup,
6018
+ CardSchema,
6019
+ ChangedImportedFigmaSourceData,
6020
+ ColorTokenData,
6021
+ ColorTokenInlineData,
6022
+ ColorValue,
6023
+ Component,
6024
+ ComponentElementData,
6025
+ ComponentImportModel,
6026
+ ComponentImportModelInput,
6027
+ ComponentOrigin,
6028
+ ComponentOriginPart,
6029
+ ContentLoadInstruction,
6030
+ ContentLoaderPayload,
6031
+ CreateDesignToken,
6032
+ CreateWorkspaceInput,
6033
+ CustomDomain,
6034
+ Customer,
6035
+ DataSourceAutoImportMode,
6036
+ DataSourceFigmaFileData,
6037
+ DataSourceFigmaFileVersionData,
6038
+ DataSourceFigmaImportMetadata,
6039
+ DataSourceFigmaRemote,
6040
+ DataSourceFigmaScope,
6041
+ DataSourceFigmaState,
6042
+ DataSourceImportModel,
6043
+ DataSourceRemote,
6044
+ DataSourceRemoteType,
6045
+ DataSourceStats,
6046
+ DataSourceTokenStudioRemote,
6047
+ DataSourceUploadImportMetadata,
6048
+ DataSourceUploadRemote,
6049
+ DataSourceUploadRemoteSource,
6050
+ DataSourceVersion,
6051
+ DesignElement,
6052
+ DesignElementBase,
6053
+ DesignElementBrandedPart,
6054
+ DesignElementCategory,
6055
+ DesignElementGroupableBase,
6056
+ DesignElementGroupablePart,
6057
+ DesignElementGroupableRequiredPart,
6058
+ DesignElementImportedBase,
6059
+ DesignElementOrigin,
6060
+ DesignElementSlugPart,
6061
+ DesignElementType,
6062
+ DesignSystem,
6063
+ DesignSystemCreateInput,
6064
+ DesignSystemElementExportProps,
6065
+ DesignSystemSwitcher,
6066
+ DesignSystemUpdateInput,
6067
+ DesignSystemVersionRoom,
6068
+ DesignSystemWithWorkspace,
6069
+ DesignToken,
6070
+ DesignTokenImportModel,
6071
+ DesignTokenImportModelBase,
6072
+ DesignTokenImportModelInput,
6073
+ DesignTokenImportModelInputBase,
6074
+ DesignTokenOrigin,
6075
+ DesignTokenOriginPart,
6076
+ DesignTokenType,
6077
+ DesignTokenTypedData,
6078
+ DimensionTokenData,
6079
+ DimensionUnit,
6080
+ DimensionValue,
6081
+ DocumentationGroupBehavior,
6082
+ DocumentationGroupDTO,
6083
+ DocumentationItemConfiguration,
6084
+ DocumentationPage,
6085
+ DocumentationPageDTOV1,
6086
+ DocumentationPageDataV1,
6087
+ DocumentationPageDataV2,
5693
6088
  DocumentationPageEditorModel,
6089
+ DocumentationPageElementDataV1,
6090
+ DocumentationPageElementDataV2,
6091
+ DocumentationPageGroup,
6092
+ DocumentationPageRoom,
6093
+ DocumentationPageV1,
6094
+ DocumentationPageV2,
6095
+ DurationTokenData,
6096
+ DurationUnit,
6097
+ DurationValue,
6098
+ ElementGroup,
6099
+ ElementGroupData,
6100
+ ElementGroupElementData,
6101
+ ElementPropertyDefinition,
6102
+ ElementPropertyDefinitionOption,
6103
+ ElementPropertyLinkType,
6104
+ ElementPropertyTargetType,
6105
+ ElementPropertyType,
6106
+ ElementPropertyValue,
6107
+ Entity,
6108
+ ExportJob,
6109
+ ExportJobStatus,
6110
+ Exporter,
6111
+ ExporterDetails,
6112
+ ExporterSource,
6113
+ ExporterTag,
6114
+ ExporterType,
6115
+ ExporterWorkspaceMembership,
6116
+ ExporterWorkspaceMembershipRole,
6117
+ ExternalOAuthRequest,
6118
+ ExternalServiceType,
6119
+ FeatureFlag,
6120
+ FeatureFlagMap,
6121
+ FeaturesSummary,
6122
+ FigmaFileAccessData,
6123
+ FigmaFileDownloadScope,
6124
+ FigmaFileStructure,
6125
+ FigmaFileStructureData,
6126
+ FigmaFileStructureElementData,
6127
+ FigmaFileStructureImportModel,
6128
+ FigmaFileStructureImportModelInput,
6129
+ FigmaFileStructureNode,
6130
+ FigmaFileStructureNodeBase,
6131
+ FigmaFileStructureNodeImportModel,
6132
+ FigmaFileStructureNodeType,
6133
+ FigmaFileStructureOrigin,
6134
+ FigmaFileStructureStatistics,
6135
+ FigmaImportBaseContext,
6136
+ FigmaImportContextWithDownloadScopes,
6137
+ FigmaNodeReference,
6138
+ FigmaNodeReferenceData,
6139
+ FigmaNodeReferenceElementData,
6140
+ FigmaPngRenderImportModel,
6141
+ FigmaRenderFormat,
6142
+ FigmaRenderImportModel,
6143
+ FigmaSvgRenderImportModel,
6144
+ FileStructureStats,
6145
+ FlaggedFeature,
6146
+ FontFamilyTokenData,
6147
+ FontFamilyValue,
6148
+ FontSizeTokenData,
6149
+ FontSizeUnit,
6150
+ FontSizeValue,
6151
+ FontWeightTokenData,
6152
+ FontWeightValue,
5694
6153
  GetBlockDefinitionsResponse,
6154
+ GitProvider,
6155
+ GitProviderNames,
6156
+ GradientLayerData,
6157
+ GradientLayerValue,
6158
+ GradientStop,
6159
+ GradientTokenData,
6160
+ GradientTokenValue,
6161
+ GradientType,
6162
+ HANDLE_MAX_LENGTH,
6163
+ HANDLE_MIN_LENGTH,
6164
+ ImageImportModel,
6165
+ ImageImportModelType,
6166
+ ImportFunctionInput,
6167
+ ImportJob,
6168
+ ImportJobOperation,
6169
+ ImportJobState,
6170
+ ImportModelBase,
6171
+ ImportModelCollection,
6172
+ ImportModelInputBase,
6173
+ ImportModelInputCollection,
6174
+ ImportWarning,
6175
+ ImportWarningType,
6176
+ ImportedFigmaSourceData,
6177
+ IntegrationAuthType,
6178
+ IntegrationTokenSchema,
6179
+ IntegrationUserInfo,
6180
+ InternalStatus,
6181
+ InternalStatusSchema,
6182
+ InvoiceCouponSchema,
6183
+ InvoiceLineSchema,
6184
+ InvoiceSchema,
6185
+ LetterSpacingTokenData,
6186
+ LetterSpacingUnit,
6187
+ LetterSpacingValue,
6188
+ LineHeightTokenData,
6189
+ LineHeightUnit,
6190
+ LineHeightValue,
6191
+ MAX_MEMBERS_COUNT,
6192
+ NpmPackage,
6193
+ NpmProxyToken,
6194
+ NpmProxyTokenPayload,
6195
+ NpmRegistrCustomAuthConfig,
6196
+ NpmRegistryAuthConfig,
6197
+ NpmRegistryAuthType,
6198
+ NpmRegistryBasicAuthConfig,
6199
+ NpmRegistryBearerAuthConfig,
6200
+ NpmRegistryConfig,
6201
+ NpmRegistryNoAuthConfig,
6202
+ NpmRegistryType,
6203
+ OAuthProvider,
6204
+ OAuthProviderNames,
6205
+ OAuthProviderSchema,
6206
+ ObjectMeta,
6207
+ OpacityTokenData,
6208
+ OpacityValue,
6209
+ PageBlockAlignment,
6210
+ PageBlockAppearanceV2,
6211
+ PageBlockAsset,
6212
+ PageBlockAssetComponent,
6213
+ PageBlockAssetType,
6214
+ PageBlockBehaviorDataType,
6215
+ PageBlockBehaviorSelectionType,
6216
+ PageBlockCalloutType,
6217
+ PageBlockCategory,
6218
+ PageBlockCodeLanguage,
6219
+ PageBlockCustomBlockPropertyImageValue,
6220
+ PageBlockCustomBlockPropertyValue,
6221
+ PageBlockDataV2,
6222
+ PageBlockDefinition,
6223
+ PageBlockDefinitionAppearance,
6224
+ PageBlockDefinitionBehavior,
6225
+ PageBlockDefinitionBooleanPropertyStyle,
6226
+ PageBlockDefinitionItem,
6227
+ PageBlockDefinitionLayout,
6228
+ PageBlockDefinitionLayoutAlign,
6229
+ PageBlockDefinitionLayoutBase,
6230
+ PageBlockDefinitionLayoutGap,
6231
+ PageBlockDefinitionLayoutResizing,
6232
+ PageBlockDefinitionLayoutType,
6233
+ PageBlockDefinitionMultiRichTextPropertyStyle,
6234
+ PageBlockDefinitionMultiSelectPropertyStyle,
6235
+ PageBlockDefinitionOnboarding,
6236
+ PageBlockDefinitionProperty,
6237
+ PageBlockDefinitionPropertyOptions,
6238
+ PageBlockDefinitionPropertyType,
6239
+ PageBlockDefinitionRichTextPropertyStyle,
6240
+ PageBlockDefinitionSingleSelectPropertyStyle,
6241
+ PageBlockDefinitionTextPropertyStyle,
6242
+ PageBlockDefinitionVariant,
5695
6243
  PageBlockEditorModel,
6244
+ PageBlockEditorModelV2,
6245
+ PageBlockFigmaFrameProperties,
6246
+ PageBlockFrame,
6247
+ PageBlockFrameOrigin,
6248
+ PageBlockImageAlignment,
6249
+ PageBlockImageType,
6250
+ PageBlockItemEmbedPropertyValue,
6251
+ PageBlockItemImageReference,
6252
+ PageBlockItemImageValue,
6253
+ PageBlockItemMultiRichTextPropertyValue,
6254
+ PageBlockItemRichTextPropertyValue,
6255
+ PageBlockItemTextPropertyValue,
6256
+ PageBlockItemUntypedPropertyValue,
6257
+ PageBlockItemV2,
6258
+ PageBlockLinkPreview,
6259
+ PageBlockLinkType,
6260
+ PageBlockLinkV2,
6261
+ PageBlockRenderCodeProperties,
6262
+ PageBlockShortcut,
6263
+ PageBlockTableColumn,
6264
+ PageBlockTableProperties,
6265
+ PageBlockText,
6266
+ PageBlockTextSpan,
6267
+ PageBlockTextSpanAttribute,
6268
+ PageBlockTextSpanAttributeType,
6269
+ PageBlockTheme,
6270
+ PageBlockThemeType,
6271
+ PageBlockTilesAlignment,
6272
+ PageBlockTilesLayout,
6273
+ PageBlockTypeV1,
6274
+ PageBlockUrlPreview,
6275
+ PageBlockV1,
6276
+ PageBlockV2,
6277
+ ParagraphIndentTokenData,
6278
+ ParagraphIndentUnit,
6279
+ ParagraphIndentValue,
6280
+ ParagraphSpacingTokenData,
6281
+ ParagraphSpacingUnit,
6282
+ ParagraphSpacingValue,
6283
+ PeriodSchema,
6284
+ PersonalAccessToken,
6285
+ PluginOAuthRequestSchema,
6286
+ Point2D,
6287
+ PostStripeCheckoutBodyInputSchema,
6288
+ PostStripeCheckoutOutputSchema,
6289
+ PostStripePortalSessionBodyInputSchema,
6290
+ PostStripePortalSessionOutputSchema,
6291
+ PostStripePortalUpdateSessionBodyInputSchema,
6292
+ PriceSchema,
6293
+ ProductCode,
6294
+ ProductCodeSchema,
6295
+ ProductCopyTokenData,
6296
+ ProductCopyValue,
6297
+ PublishedDoc,
6298
+ PublishedDocEnvironment,
6299
+ PublishedDocRoutingVersion,
6300
+ PublishedDocsChecksums,
6301
+ PulsarContributionBlock,
6302
+ PulsarContributionConfigurationProperty,
6303
+ PulsarContributionVariant,
6304
+ PulsarPropertyType,
6305
+ SHORT_PERSISTENT_ID_LENGTH,
6306
+ Session,
6307
+ SessionData,
6308
+ ShadowLayerValue,
6309
+ ShadowTokenData,
6310
+ ShadowType,
6311
+ ShallowDesignElement,
6312
+ Size,
6313
+ SizeOrUndefined,
6314
+ SizeTokenData,
6315
+ SizeUnit,
6316
+ SizeValue,
6317
+ SourceImportComponentSummary,
6318
+ SourceImportFrameSummary,
6319
+ SourceImportSummary,
6320
+ SourceImportSummaryByTokenType,
6321
+ SourceImportTokenSummary,
6322
+ SpaceTokenData,
6323
+ SpaceUnit,
6324
+ SpaceValue,
6325
+ SsoProvider,
6326
+ StringTokenData,
6327
+ StringValue,
6328
+ StripeSubscriptionStatus,
6329
+ StripeSubscriptionStatusSchema,
6330
+ Subscription,
6331
+ TextCase,
6332
+ TextCaseTokenData,
6333
+ TextCaseValue,
6334
+ TextDecoration,
6335
+ TextDecorationTokenData,
6336
+ TextDecorationValue,
6337
+ Theme,
6338
+ ThemeElementData,
6339
+ ThemeImportModel,
6340
+ ThemeImportModelInput,
6341
+ ThemeOrigin,
6342
+ ThemeOriginObject,
6343
+ ThemeOriginPart,
6344
+ ThemeOriginSource,
6345
+ ThemeOverride,
6346
+ ThemeOverrideImportModel,
6347
+ ThemeOverrideImportModelBase,
6348
+ ThemeOverrideImportModelInput,
6349
+ ThemeOverrideOrigin,
6350
+ ThemeOverrideOriginPart,
6351
+ ThemeUpdateImportModel,
6352
+ ThemeUpdateImportModelInput,
6353
+ TokenDataAliasSchema,
6354
+ TypographyTokenData,
6355
+ TypographyValue,
6356
+ UrlImageImportModel,
6357
+ User,
6358
+ UserIdentity,
6359
+ UserInvite,
6360
+ UserInvites,
6361
+ UserLinkedIntegrations,
6362
+ UserOnboarding,
6363
+ UserOnboardingDepartment,
6364
+ UserOnboardingJobLevel,
6365
+ UserProfile,
6366
+ UserSession,
6367
+ Visibility,
6368
+ VisibilityTokenData,
6369
+ VisibilityValue,
6370
+ Workspace,
6371
+ WorkspaceContext,
6372
+ WorkspaceInvitation,
6373
+ WorkspaceIpSettings,
6374
+ WorkspaceIpWhitelistEntry,
6375
+ WorkspaceMembership,
6376
+ WorkspaceProfile,
6377
+ WorkspaceRole,
6378
+ WorkspaceRoleSchema,
6379
+ WorkspaceWithDesignSystems,
6380
+ ZIndexTokenData,
6381
+ ZIndexUnit,
6382
+ ZIndexValue,
6383
+ addImportModelCollections,
5696
6384
  blockDefinitionForBlock,
5697
6385
  blockToProsemirrorNode,
6386
+ designTokenImportModelTypeFilter,
6387
+ designTokenTypeFilter,
6388
+ extractTokenTypedData,
6389
+ figmaFileStructureImportModelToMap,
6390
+ figmaFileStructureToMap,
5698
6391
  getMockPageBlockDefinitions,
6392
+ isDesignTokenImportModelOfType,
6393
+ isDesignTokenOfType,
6394
+ isImportedAsset,
6395
+ isImportedComponent,
6396
+ isImportedDesignToken,
6397
+ isTokenType,
6398
+ nullishToOptional,
5699
6399
  pageToProsemirrorDoc,
5700
6400
  pageToYXmlFragment,
5701
6401
  pmSchema,
5702
6402
  prosemirrorDocToPage,
5703
6403
  prosemirrorNodeToBlock,
6404
+ publishedDocEnvironments,
5704
6405
  serializeAsCustomBlock,
5705
- serializeAsMultiRichTextBlock,
5706
- serializeAsRichTextBlock,
5707
- yXmlFragmetToPage
6406
+ tokenAliasOrValue,
6407
+ tokenElementTypes,
6408
+ traversePageBlocksV1,
6409
+ traverseStructure,
6410
+ tryParseShortPersistentId,
6411
+ yXmlFragmetToPage,
6412
+ zodCreateInputOmit,
6413
+ zodUpdateInputOmit
5708
6414
  };
5709
6415
  //# sourceMappingURL=index.mjs.map