@supernova-studio/client 1.3.1 → 1.3.2

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
@@ -13633,6 +13633,7 @@ var LocalDocsElementActionExecutor = class {
13633
13633
  case "DocumentationPageRestore":
13634
13634
  throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13635
13635
  case "DocumentationTabCreate":
13636
+ return this.documentationTabCreate(trx);
13636
13637
  case "DocumentationTabGroupDelete":
13637
13638
  throw new Error(`Transaction type ${trx.type} is not yet implemented`);
13638
13639
  case "FigmaNodeRender":
@@ -13787,6 +13788,40 @@ var LocalDocsElementActionExecutor = class {
13787
13788
  }
13788
13789
  }
13789
13790
  //
13791
+ // Tabs
13792
+ //
13793
+ documentationTabCreate(trx) {
13794
+ const { input } = trx;
13795
+ const page = this.pages.get(input.fromItemPersistentId);
13796
+ if (!page) {
13797
+ throw new Error(`Cannot create tab: page id ${input.fromItemPersistentId} was not found`);
13798
+ }
13799
+ const tabGroup = {
13800
+ parentPersistentId: page.parentPersistentId,
13801
+ persistentId: input.persistentId,
13802
+ shortPersistentId: generateShortPersistentId(),
13803
+ slug: page.slug,
13804
+ meta: page.meta,
13805
+ createdAt: /* @__PURE__ */ new Date(),
13806
+ updatedAt: /* @__PURE__ */ new Date(),
13807
+ data: {
13808
+ behavior: "Tabs",
13809
+ configuration: page?.data.configuration
13810
+ },
13811
+ sortOrder: page.sortOrder,
13812
+ designSystemVersionId: this.designSystemVersionId
13813
+ };
13814
+ this.groups.set(input.persistentId, tabGroup);
13815
+ const newLocalPage = {
13816
+ ...page,
13817
+ userSlug: void 0,
13818
+ sortOrder: 0,
13819
+ parentPersistentId: input.persistentId,
13820
+ meta: { name: input.tabName }
13821
+ };
13822
+ this.pages.set(newLocalPage.persistentId, newLocalPage);
13823
+ }
13824
+ //
13790
13825
  // Approval states
13791
13826
  //
13792
13827
  documentationApprovalStateUpdate(trx) {