@supernova-studio/client 0.36.2 → 0.38.0

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 (29) hide show
  1. package/dist/index.d.mts +2231 -997
  2. package/dist/index.d.ts +2231 -997
  3. package/dist/index.js +358 -175
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +531 -348
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/src/api/conversion/design-systems/elements/properties/property-value.ts +2 -2
  9. package/src/api/conversion/design-systems/index.ts +1 -1
  10. package/src/api/conversion/documentation/documentation-elements-to-hierarchy-v2-dto.ts +6 -5
  11. package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +85 -0
  12. package/src/api/conversion/documentation/{documentation-group-to-dto.ts → documentation-group-v2-to-dto.ts} +16 -12
  13. package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +46 -0
  14. package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +16 -5
  15. package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +12 -10
  16. package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +9 -7
  17. package/src/api/conversion/documentation/index.ts +3 -1
  18. package/src/api/conversion/index.ts +1 -1
  19. package/src/api/dto/design-systems/index.ts +2 -2
  20. package/src/api/dto/elements/documentation/group-action.ts +1 -1
  21. package/src/api/dto/elements/documentation/group-v1.ts +35 -0
  22. package/src/api/dto/elements/documentation/index.ts +3 -1
  23. package/src/api/dto/elements/documentation/item-configuration-v1.ts +22 -0
  24. package/src/api/dto/elements/documentation/page-v1.ts +8 -7
  25. package/src/api/dto/elements/documentation/page-v2.ts +2 -3
  26. package/src/yjs/design-system-content/documentation-hierarchy.ts +47 -2
  27. package/src/yjs/docs-editor/mock.ts +13 -13
  28. package/src/yjs/docs-editor/prosemirror-to-blocks.ts +1 -1
  29. /package/src/api/dto/elements/documentation/{group.ts → group-v2.ts} +0 -0
@@ -20,7 +20,7 @@ const blocks: PageBlockDefinition[] = [
20
20
  name: "Text",
21
21
  description: "Plain text",
22
22
  category: "Text",
23
- icon: "https://cdn-assets.supernova.io/blocks/icons/v2/text.svg",
23
+ icon: "https://cdn-assets.supernova.io/blocks/icons/v3/text.svg",
24
24
  searchKeywords: ["paragraph", "rich text"],
25
25
  item: {
26
26
  properties: [
@@ -490,7 +490,7 @@ const blocks: PageBlockDefinition[] = [
490
490
  {
491
491
  id: "io.supernova.block.image",
492
492
  name: "Image",
493
- description: "Display an image or Figma frame",
493
+ description: "Display an image or Figma image",
494
494
  category: "Media",
495
495
  icon: "https://cdn-assets.supernova.io/blocks/icons/v2/image.svg",
496
496
  searchKeywords: ["image", "figma", "frame", "picture", "photo"],
@@ -519,7 +519,7 @@ const blocks: PageBlockDefinition[] = [
519
519
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
520
520
  editorOptions: {
521
521
  onboarding: {
522
- helpText: "Use to display an image or Figma frame.",
522
+ helpText: "Use to display an image or Figma image.",
523
523
  documentationLink:
524
524
  "https://learn.supernova.io/latest/documentation/types-of-blocks/media-and-assets/image-Ue8VdT8B",
525
525
  },
@@ -1246,7 +1246,7 @@ const blocks: PageBlockDefinition[] = [
1246
1246
  behavior: { dataType: "Item", items: { numberOfItems: 1, allowLinks: false } },
1247
1247
  editorOptions: { onboarding: { helpText: "Code descriptor." } },
1248
1248
  appearance: {
1249
- isBordered: true,
1249
+ isBordered: false,
1250
1250
  hasBackground: false,
1251
1251
  isEditorPresentationDifferent: false,
1252
1252
  showBlockHeaderInEditor: false,
@@ -1352,7 +1352,7 @@ const blocks: PageBlockDefinition[] = [
1352
1352
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
1353
1353
  maxColumns: 8,
1354
1354
  defaultColumns: 1,
1355
- appearance: { isEditorPresentationDifferent: false },
1355
+ appearance: {},
1356
1356
  },
1357
1357
  {
1358
1358
  id: "square-grid",
@@ -1362,7 +1362,7 @@ const blocks: PageBlockDefinition[] = [
1362
1362
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
1363
1363
  maxColumns: 8,
1364
1364
  defaultColumns: 1,
1365
- appearance: { isEditorPresentationDifferent: false },
1365
+ appearance: { isEditorPresentationDifferent: true },
1366
1366
  },
1367
1367
  {
1368
1368
  id: "borderless-grid",
@@ -1372,7 +1372,7 @@ const blocks: PageBlockDefinition[] = [
1372
1372
  layout: { type: "Column", children: ["assets"], columnAlign: "Start", columnResizing: "Fill", gap: "Medium" },
1373
1373
  maxColumns: 8,
1374
1374
  defaultColumns: 1,
1375
- appearance: { isEditorPresentationDifferent: false },
1375
+ appearance: { isEditorPresentationDifferent: true },
1376
1376
  },
1377
1377
  ],
1378
1378
  defaultVariantKey: "default",
@@ -1394,11 +1394,11 @@ const blocks: PageBlockDefinition[] = [
1394
1394
  },
1395
1395
  {
1396
1396
  id: "io.supernova.block.figma-frames",
1397
- name: "Figma frames",
1398
- description: "Display Figma frames as images",
1397
+ name: "Figma images",
1398
+ description: "Generate images from Figma layers",
1399
1399
  category: "Figma",
1400
1400
  icon: "https://cdn-assets.supernova.io/blocks/icons/v2/figma-frames.svg",
1401
- searchKeywords: ["figma", "frames", "image"],
1401
+ searchKeywords: ["figma", "frames", "image", "layer"],
1402
1402
  item: {
1403
1403
  properties: [
1404
1404
  {
@@ -1422,7 +1422,7 @@ const blocks: PageBlockDefinition[] = [
1422
1422
  columnResizing: "Fill",
1423
1423
  gap: "Medium",
1424
1424
  },
1425
- maxColumns: 1,
1425
+ maxColumns: 8,
1426
1426
  defaultColumns: 1,
1427
1427
  appearance: {},
1428
1428
  },
@@ -1438,7 +1438,7 @@ const blocks: PageBlockDefinition[] = [
1438
1438
  columnResizing: "Fill",
1439
1439
  gap: "Medium",
1440
1440
  },
1441
- maxColumns: 1,
1441
+ maxColumns: 8,
1442
1442
  defaultColumns: 1,
1443
1443
  appearance: {},
1444
1444
  },
@@ -1448,7 +1448,7 @@ const blocks: PageBlockDefinition[] = [
1448
1448
  behavior: { dataType: "FigmaNode", entities: { selectionType: "Entity", maxSelected: 0 } },
1449
1449
  editorOptions: {
1450
1450
  onboarding: {
1451
- helpText: "Display Figma frames as images.",
1451
+ helpText: "Generate images from Figma layers",
1452
1452
  documentationLink:
1453
1453
  "https://learn.supernova.io/latest/documentation/types-of-blocks/figma/figma-frames/general-f3IYC5dg",
1454
1454
  },
@@ -74,7 +74,7 @@ export function prosemirrorDocToPage(
74
74
  }
75
75
 
76
76
  export function shallowProsemirrorNodeToBlock(prosemirrorNode: ProsemirrorNode, definition: PageBlockDefinition) {
77
- return shallowProsemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition);
77
+ return prosemirrorNodeAndDefinitionToBlock(prosemirrorNode, definition, new Map([[definition.id, definition]]), 0);
78
78
  }
79
79
 
80
80
  //