@supernova-studio/client 1.69.6 → 1.71.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.js CHANGED
@@ -3719,15 +3719,20 @@ var Collection = _zod.z.object({
3719
3719
  });
3720
3720
  var CollectionImportModelInput = _zod.z.object({
3721
3721
  id: _zod.z.string(),
3722
+ legacyId: _zod.z.string(),
3722
3723
  name: _zod.z.string(),
3723
3724
  parentId: _zod.z.string().optional(),
3725
+ parentLegacyId: _zod.z.string().optional(),
3724
3726
  parentPersistentId: _zod.z.string().optional()
3725
3727
  });
3726
3728
  var CollectionImportModel = _zod.z.object({
3727
3729
  id: _zod.z.string(),
3730
+ legacyId: _zod.z.string(),
3731
+ parentId: _zod.z.string().optional(),
3732
+ parentLegacyId: _zod.z.string().optional(),
3728
3733
  name: _zod.z.string(),
3729
- parentPersistentId: _zod.z.string().optional(),
3730
- origin: CollectionOrigin
3734
+ origin: CollectionOrigin,
3735
+ parentPersistentId: _zod.z.string().optional()
3731
3736
  });
3732
3737
  var ImportModelBase = _zod.z.object({
3733
3738
  id: _zod.z.string(),
@@ -3831,20 +3836,22 @@ var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
3831
3836
  })
3832
3837
  );
3833
3838
  var ThemeImportModel = _zod.z.object({
3839
+ id: _zod.z.string(),
3840
+ parentId: _zod.z.string().optional(),
3834
3841
  meta: ObjectMeta,
3835
3842
  brandPersistentId: _zod.z.string(),
3836
3843
  originSource: ThemeOriginSource,
3837
3844
  overrides: _zod.z.array(ThemeOverrideImportModel),
3838
3845
  sortOrder: _zod.z.number(),
3839
- collectionIds: _zod.z.array(_zod.z.string()).optional(),
3840
- parentPersistentId: _zod.z.string().optional()
3846
+ collectionIds: _zod.z.array(_zod.z.string()).optional()
3841
3847
  });
3842
3848
  var ThemeImportModelInput = _zod.z.object({
3849
+ id: _zod.z.string(),
3850
+ parentId: _zod.z.string().optional(),
3843
3851
  meta: ObjectMeta,
3844
3852
  originObjects: _zod.z.array(ThemeOriginObject),
3845
3853
  overrides: _zod.z.array(ThemeOverrideImportModelInput),
3846
- collectionIds: _zod.z.array(_zod.z.string()).optional(),
3847
- parentPersistentId: _zod.z.string().optional()
3854
+ collectionIds: _zod.z.array(_zod.z.string()).optional()
3848
3855
  });
3849
3856
  var ThemeUpdateImportModel = _zod.z.object({
3850
3857
  themePersistentId: _zod.z.string(),
@@ -4836,6 +4843,7 @@ var ForgeProjectInvitation = _zod.z.object({
4836
4843
  forgeProjectId: _zod.z.string(),
4837
4844
  workspaceInvitationId: _zod.z.string(),
4838
4845
  role: ForgeProjectRole,
4846
+ effectiveRole: ForgeProjectRole,
4839
4847
  createdAt: _zod.z.coerce.date(),
4840
4848
  updatedAt: _zod.z.coerce.date(),
4841
4849
  createdById: _zod.z.string()
@@ -5823,7 +5831,8 @@ var FlaggedFeature = _zod.z.enum([
5823
5831
  "ForgeOnDemandIterations",
5824
5832
  "ForgeAutoRetryOnErrors",
5825
5833
  "ForgeAiBackendMigrated",
5826
- "CustomForgeTemplate"
5834
+ "CustomForgeTemplate",
5835
+ "ForgeRestartPlaywright"
5827
5836
  ]);
5828
5837
  var FeatureFlagMap = _zod.z.record(FlaggedFeature, _zod.z.boolean());
5829
5838
  var FeatureFlag = _zod.z.object({
@@ -13519,35 +13528,22 @@ var RequestExecutorError = class _RequestExecutorError extends Error {
13519
13528
  this.errorCode = errorCode;
13520
13529
  this.serverErrorType = serverErrorType;
13521
13530
  }
13522
- static tryParseErrorCode(body) {
13523
- try {
13524
- const errorObj = JSON.parse(body);
13525
- if (errorObj && typeof errorObj.errorCode === "string") {
13526
- return errorObj.errorCode;
13527
- }
13528
- return null;
13529
- } catch (e) {
13530
- return null;
13531
- }
13532
- }
13533
- static tryParseServerErrorType(body) {
13531
+ static tryParseJSON(body) {
13534
13532
  try {
13535
- const errorObj = JSON.parse(body);
13536
- if (errorObj && typeof errorObj.errorCode === "string") {
13537
- return errorObj.type;
13538
- }
13539
- return null;
13533
+ return JSON.parse(body);
13540
13534
  } catch (e) {
13541
13535
  return null;
13542
13536
  }
13543
13537
  }
13544
13538
  static serverError(endpoint, status, bodyText) {
13539
+ const parsedBody = this.tryParseJSON(bodyText);
13545
13540
  return new _RequestExecutorError(
13546
13541
  "ServerError",
13547
13542
  `Endpoint ${endpoint} returned ${status}
13548
13543
  ${bodyText}`,
13549
- this.tryParseErrorCode(bodyText),
13550
- this.tryParseServerErrorType(bodyText)
13544
+ _nullishCoalesce(_optionalChain([parsedBody, 'optionalAccess', _38 => _38.errorCode]), () => ( null)),
13545
+ _nullishCoalesce(_optionalChain([parsedBody, 'optionalAccess', _39 => _39.type]), () => ( null)),
13546
+ _nullishCoalesce(parsedBody, () => ( null))
13551
13547
  );
13552
13548
  }
13553
13549
  static responseParsingError(endpoint, cause) {
@@ -13559,6 +13555,12 @@ ${bodyText}`,
13559
13555
  cause
13560
13556
  );
13561
13557
  }
13558
+ getDisplayMessage() {
13559
+ if (this.type === "ServerError" && this.cause && typeof this.cause === "object" && "message" in this.cause) {
13560
+ return this.cause.message || this.message;
13561
+ }
13562
+ return this.message;
13563
+ }
13562
13564
  };
13563
13565
 
13564
13566
  // src/api/transport/request-executor.ts
@@ -13615,7 +13617,7 @@ var RequestExecutor = class {
13615
13617
  }
13616
13618
  fullUrl(path, query) {
13617
13619
  let url = `https://${this.testServerConfig.host}/api/v2${path}`;
13618
- const queryString = _optionalChain([query, 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]);
13620
+ const queryString = _optionalChain([query, 'optionalAccess', _40 => _40.toString, 'call', _41 => _41()]);
13619
13621
  if (queryString) url += `?${queryString}`;
13620
13622
  return url;
13621
13623
  }
@@ -13635,7 +13637,7 @@ var SupernovaApiClient = class {
13635
13637
  __publicField(this, "threads");
13636
13638
  __publicField(this, "mcpStreams");
13637
13639
  __publicField(this, "sandboxes");
13638
- const apiSecret = _nullishCoalesce(config.apiSecret, () => ( _optionalChain([process, 'optionalAccess', _40 => _40.env, 'optionalAccess', _41 => _41.SUPERNOVA_API_SECRET])));
13640
+ const apiSecret = _nullishCoalesce(config.apiSecret, () => ( _optionalChain([process, 'optionalAccess', _42 => _42.env, 'optionalAccess', _43 => _43.SUPERNOVA_API_SECRET])));
13639
13641
  const requestExecutor = new RequestExecutor({
13640
13642
  apiSecret,
13641
13643
  host: config.host,
@@ -13865,9 +13867,9 @@ var LocalDocsElementActionExecutor = class {
13865
13867
  ...existingGroup.data,
13866
13868
  // TODO Artem: move somewhere reusable
13867
13869
  configuration: input.configuration ? {
13868
- ..._nullishCoalesce(_optionalChain([existingGroup, 'access', _42 => _42.data, 'optionalAccess', _43 => _43.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
13870
+ ..._nullishCoalesce(_optionalChain([existingGroup, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
13869
13871
  ...input.configuration
13870
- } : _optionalChain([existingGroup, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.configuration])
13872
+ } : _optionalChain([existingGroup, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.configuration])
13871
13873
  }
13872
13874
  };
13873
13875
  this.groups.set(localGroup.persistentId, localGroup);
@@ -13908,7 +13910,7 @@ var LocalDocsElementActionExecutor = class {
13908
13910
  updatedAt: /* @__PURE__ */ new Date(),
13909
13911
  data: {
13910
13912
  behavior: "Tabs",
13911
- configuration: _optionalChain([page, 'optionalAccess', _46 => _46.data, 'access', _47 => _47.configuration])
13913
+ configuration: _optionalChain([page, 'optionalAccess', _48 => _48.data, 'access', _49 => _49.configuration])
13912
13914
  },
13913
13915
  sortOrder: page.sortOrder,
13914
13916
  designSystemVersionId: this.designSystemVersionId
@@ -13932,7 +13934,7 @@ var LocalDocsElementActionExecutor = class {
13932
13934
  if (input.approvalState) {
13933
13935
  this.approvalStates.set(input.persistentId, {
13934
13936
  approvalState: input.approvalState,
13935
- createdAt: _nullishCoalesce(_optionalChain([existingApproval, 'optionalAccess', _48 => _48.createdAt]), () => ( /* @__PURE__ */ new Date())),
13937
+ createdAt: _nullishCoalesce(_optionalChain([existingApproval, 'optionalAccess', _50 => _50.createdAt]), () => ( /* @__PURE__ */ new Date())),
13936
13938
  designSystemVersionId: this.designSystemVersionId,
13937
13939
  pagePersistentId: input.persistentId,
13938
13940
  updatedAt: /* @__PURE__ */ new Date(),
@@ -13960,7 +13962,7 @@ var LocalDocsElementActionExecutor = class {
13960
13962
  return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13961
13963
  }
13962
13964
  const left = neighbours[index].sortOrder;
13963
- const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _49 => _49[index + 1], 'optionalAccess', _50 => _50.sortOrder]), () => ( left + sortOrderStep * 2));
13965
+ const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _51 => _51[index + 1], 'optionalAccess', _52 => _52.sortOrder]), () => ( left + sortOrderStep * 2));
13964
13966
  return (right + left) / 2;
13965
13967
  }
13966
13968
  };
@@ -14248,7 +14250,7 @@ function buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageHashes,
14248
14250
  if (snapshot) {
14249
14251
  publishedState = itemStateFromPage(snapshot.page, snapshot.pageContentHash);
14250
14252
  }
14251
- const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _51 => _51.pageContentHash]))), () => ( ""));
14253
+ const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _53 => _53.pageContentHash]))), () => ( ""));
14252
14254
  const currentState = itemStateFromPage(page, currentPageContentHash);
14253
14255
  const draftState = createDraftState(page.persistentId, currentState, publishedState, debug);
14254
14256
  if (draftState) result.set(page.persistentId, draftState);
@@ -14381,7 +14383,7 @@ function buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug) {
14381
14383
  function itemStateFromGroup(group) {
14382
14384
  return {
14383
14385
  title: group.meta.name,
14384
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _52 => _52.data, 'optionalAccess', _53 => _53.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
14386
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _54 => _54.data, 'optionalAccess', _55 => _55.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
14385
14387
  contentHash: "-"
14386
14388
  };
14387
14389
  }
@@ -14542,7 +14544,7 @@ var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
14542
14544
  function itemConfigurationToYjs(yDoc, item) {
14543
14545
  yDoc.transact((trx) => {
14544
14546
  const { title, configuration } = item;
14545
- const header = _optionalChain([configuration, 'optionalAccess', _54 => _54.header]);
14547
+ const header = _optionalChain([configuration, 'optionalAccess', _56 => _56.header]);
14546
14548
  if (title !== void 0) {
14547
14549
  const headerYMap = trx.doc.getMap("itemTitle");
14548
14550
  headerYMap.set("title", title);
@@ -14560,9 +14562,9 @@ function itemConfigurationToYjs(yDoc, item) {
14560
14562
  header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
14561
14563
  }
14562
14564
  const configYMap = trx.doc.getMap("itemConfiguration");
14563
- _optionalChain([configuration, 'optionalAccess', _55 => _55.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
14564
- _optionalChain([configuration, 'optionalAccess', _56 => _56.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
14565
- _optionalChain([configuration, 'optionalAccess', _57 => _57.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
14565
+ _optionalChain([configuration, 'optionalAccess', _57 => _57.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
14566
+ _optionalChain([configuration, 'optionalAccess', _58 => _58.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
14567
+ _optionalChain([configuration, 'optionalAccess', _59 => _59.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
14566
14568
  });
14567
14569
  }
14568
14570
 
@@ -15386,7 +15388,7 @@ var ListTreeBuilder = class {
15386
15388
  }
15387
15389
  addWithProperty(block, multiRichTextProperty) {
15388
15390
  const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
15389
- return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _58 => _58.multiRichTextStyle]) || "OL");
15391
+ return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _60 => _60.multiRichTextStyle]) || "OL");
15390
15392
  }
15391
15393
  add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
15392
15394
  const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
@@ -15401,7 +15403,7 @@ var ListTreeBuilder = class {
15401
15403
  }
15402
15404
  const listParent = this.getParentOfDepth(block.data.indentLevel);
15403
15405
  const lastChild = listParent.children[listParent.children.length - 1];
15404
- if (_optionalChain([lastChild, 'optionalAccess', _59 => _59.type]) === "List") {
15406
+ if (_optionalChain([lastChild, 'optionalAccess', _61 => _61.type]) === "List") {
15405
15407
  lastChild.children.push(...list.leadingChildren);
15406
15408
  return;
15407
15409
  } else {
@@ -15630,7 +15632,7 @@ function serializeAsRichTextBlock(input) {
15630
15632
  const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
15631
15633
  const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
15632
15634
  const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
15633
- const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _60 => _60.richTextStyle]), () => ( "Default"));
15635
+ const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _62 => _62.richTextStyle]), () => ( "Default"));
15634
15636
  switch (style) {
15635
15637
  case "Callout":
15636
15638
  return serializeAsCallout(enrichedInput);
@@ -15854,7 +15856,7 @@ function serializeBlockNodeAttributes(block) {
15854
15856
  };
15855
15857
  }
15856
15858
  function richTextHeadingLevel(property) {
15857
- const style = _optionalChain([property, 'access', _61 => _61.options, 'optionalAccess', _62 => _62.richTextStyle]);
15859
+ const style = _optionalChain([property, 'access', _63 => _63.options, 'optionalAccess', _64 => _64.richTextStyle]);
15858
15860
  if (!style) return void 0;
15859
15861
  switch (style) {
15860
15862
  case "Title1":
@@ -15973,7 +15975,7 @@ function serializeAsCustomBlock(block, definition) {
15973
15975
  linksTo: i.linksTo
15974
15976
  };
15975
15977
  });
15976
- const columns = _optionalChain([block, 'access', _63 => _63.data, 'access', _64 => _64.appearance, 'optionalAccess', _65 => _65.numberOfColumns]);
15978
+ const columns = _optionalChain([block, 'access', _65 => _65.data, 'access', _66 => _66.appearance, 'optionalAccess', _67 => _67.numberOfColumns]);
15977
15979
  return {
15978
15980
  type: serializeCustomBlockNodeType(block, definition),
15979
15981
  attrs: {
@@ -18298,7 +18300,7 @@ function parseAsListNode(prosemirrorNode) {
18298
18300
  }
18299
18301
  function parseAsListNodeItem(prosemirrorNode) {
18300
18302
  if (prosemirrorNode.type !== "listItem") return null;
18301
- const firstChild = _optionalChain([prosemirrorNode, 'access', _66 => _66.content, 'optionalAccess', _67 => _67[0]]);
18303
+ const firstChild = _optionalChain([prosemirrorNode, 'access', _68 => _68.content, 'optionalAccess', _69 => _69[0]]);
18302
18304
  if (!firstChild || firstChild.type !== "paragraph") return null;
18303
18305
  return parseRichText(_nullishCoalesce(firstChild.content, () => ( [])));
18304
18306
  }
@@ -18446,9 +18448,9 @@ function parseAsMultiRichText(prosemirrorNode, definition, property, definitions
18446
18448
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
18447
18449
  const result = [];
18448
18450
  const listItems = [];
18449
- _optionalChain([prosemirrorNode, 'access', _68 => _68.content, 'optionalAccess', _69 => _69.forEach, 'call', _70 => _70((c) => {
18451
+ _optionalChain([prosemirrorNode, 'access', _70 => _70.content, 'optionalAccess', _71 => _71.forEach, 'call', _72 => _72((c) => {
18450
18452
  if (c.type !== "listItem") return;
18451
- _optionalChain([c, 'access', _71 => _71.content, 'optionalAccess', _72 => _72.forEach, 'call', _73 => _73((cc) => {
18453
+ _optionalChain([c, 'access', _73 => _73.content, 'optionalAccess', _74 => _74.forEach, 'call', _75 => _75((cc) => {
18452
18454
  listItems.push(cc);
18453
18455
  })]);
18454
18456
  })]);
@@ -18559,17 +18561,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
18559
18561
  if (!id) return null;
18560
18562
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
18561
18563
  const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
18562
- const tableChild = _optionalChain([prosemirrorNode, 'access', _74 => _74.content, 'optionalAccess', _75 => _75.find, 'call', _76 => _76((c) => c.type === "table")]);
18564
+ const tableChild = _optionalChain([prosemirrorNode, 'access', _76 => _76.content, 'optionalAccess', _77 => _77.find, 'call', _78 => _78((c) => c.type === "table")]);
18563
18565
  if (!tableChild) {
18564
18566
  return emptyTable(id, variantId, 0);
18565
18567
  }
18566
- const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _77 => _77.content, 'optionalAccess', _78 => _78.filter, 'call', _79 => _79((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _80 => _80.content, 'optionalAccess', _81 => _81.length]))]), () => ( []));
18568
+ const rows = _nullishCoalesce(_optionalChain([tableChild, 'access', _79 => _79.content, 'optionalAccess', _80 => _80.filter, 'call', _81 => _81((c) => c.type === "tableRow" && !!_optionalChain([c, 'access', _82 => _82.content, 'optionalAccess', _83 => _83.length]))]), () => ( []));
18567
18569
  if (!rows.length) {
18568
18570
  return emptyTable(id, variantId, 0);
18569
18571
  }
18570
- const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _82 => _82[0], 'access', _83 => _83.content, 'optionalAccess', _84 => _84.filter, 'call', _85 => _85((c) => c.type === "tableHeader"), 'access', _86 => _86.length]), () => ( 0));
18571
- const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _87 => _87.content, 'optionalAccess', _88 => _88[0], 'optionalAccess', _89 => _89.type]) === "tableHeader").length;
18572
- const hasHeaderRow = _optionalChain([rows, 'access', _90 => _90[0], 'access', _91 => _91.content, 'optionalAccess', _92 => _92.length]) === rowHeaderCells;
18572
+ const rowHeaderCells = _nullishCoalesce(_optionalChain([rows, 'access', _84 => _84[0], 'access', _85 => _85.content, 'optionalAccess', _86 => _86.filter, 'call', _87 => _87((c) => c.type === "tableHeader"), 'access', _88 => _88.length]), () => ( 0));
18573
+ const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _89 => _89.content, 'optionalAccess', _90 => _90[0], 'optionalAccess', _91 => _91.type]) === "tableHeader").length;
18574
+ const hasHeaderRow = _optionalChain([rows, 'access', _92 => _92[0], 'access', _93 => _93.content, 'optionalAccess', _94 => _94.length]) === rowHeaderCells;
18573
18575
  const hasHeaderColumn = rows.length === columnHeaderCells;
18574
18576
  const tableValue = {
18575
18577
  showBorder: hasBorder,
@@ -18646,7 +18648,7 @@ function parseAsTableNode(prosemirrorNode) {
18646
18648
  if (!items) return null;
18647
18649
  const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
18648
18650
  if (!parsedItems.success) return null;
18649
- const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _93 => _93.data, 'access', _94 => _94[0], 'optionalAccess', _95 => _95.props, 'access', _96 => _96.image]);
18651
+ const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _95 => _95.data, 'access', _96 => _96[0], 'optionalAccess', _97 => _97.props, 'access', _98 => _98.image]);
18650
18652
  if (!rawImagePropertyValue) return null;
18651
18653
  const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
18652
18654
  if (!imagePropertyValueParseResult.success) return null;
@@ -18887,7 +18889,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
18887
18889
  return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
18888
18890
  }
18889
18891
  function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
18890
- const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _97 => _97.attrs, 'optionalAccess', _98 => _98[attributeName]]));
18892
+ const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _99 => _99.attrs, 'optionalAccess', _100 => _100[attributeName]]));
18891
18893
  if (parsedAttr.success) {
18892
18894
  return parsedAttr.data;
18893
18895
  } else {
@@ -19715,10 +19717,10 @@ var LocalProjectActionExecutor = class {
19715
19717
  const SORT_ORDER_STEP = 1e3;
19716
19718
  if (afterItemId === void 0) {
19717
19719
  const lastSection = findLast(projectId, sectionId);
19718
- return (_nullishCoalesce(_optionalChain([lastSection, 'optionalAccess', _99 => _99.sortOrder]), () => ( 0))) + SORT_ORDER_STEP;
19720
+ return (_nullishCoalesce(_optionalChain([lastSection, 'optionalAccess', _101 => _101.sortOrder]), () => ( 0))) + SORT_ORDER_STEP;
19719
19721
  } else if (afterItemId === null) {
19720
19722
  const firstSection = findFirst(projectId, sectionId);
19721
- return (_nullishCoalesce(_optionalChain([firstSection, 'optionalAccess', _100 => _100.sortOrder]), () => ( SORT_ORDER_STEP))) - SORT_ORDER_STEP;
19723
+ return (_nullishCoalesce(_optionalChain([firstSection, 'optionalAccess', _102 => _102.sortOrder]), () => ( SORT_ORDER_STEP))) - SORT_ORDER_STEP;
19722
19724
  } else {
19723
19725
  const targetSection = findUnique(projectId, afterItemId, sectionId);
19724
19726
  if (!targetSection) return null;