@supernova-studio/client 1.69.5 → 1.69.7

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.d.mts CHANGED
@@ -83295,22 +83295,27 @@ declare const DTOSandboxTemplateVersionCreated: z$1.ZodObject<{
83295
83295
  data: z$1.ZodObject<{
83296
83296
  templateId: z$1.ZodString;
83297
83297
  version: z$1.ZodString;
83298
+ designSystemId: z$1.ZodString;
83298
83299
  }, "strip", z$1.ZodTypeAny, {
83300
+ designSystemId: string;
83299
83301
  version: string;
83300
83302
  templateId: string;
83301
83303
  }, {
83304
+ designSystemId: string;
83302
83305
  version: string;
83303
83306
  templateId: string;
83304
83307
  }>;
83305
83308
  }, "strip", z$1.ZodTypeAny, {
83306
83309
  type: "SandboxTemplateVersionCreated";
83307
83310
  data: {
83311
+ designSystemId: string;
83308
83312
  version: string;
83309
83313
  templateId: string;
83310
83314
  };
83311
83315
  }, {
83312
83316
  type: "SandboxTemplateVersionCreated";
83313
83317
  data: {
83318
+ designSystemId: string;
83314
83319
  version: string;
83315
83320
  templateId: string;
83316
83321
  };
@@ -111436,22 +111441,27 @@ declare const DTOWorkspaceRoomEvent: z$1.ZodDiscriminatedUnion<"type", [z$1.ZodO
111436
111441
  data: z$1.ZodObject<{
111437
111442
  templateId: z$1.ZodString;
111438
111443
  version: z$1.ZodString;
111444
+ designSystemId: z$1.ZodString;
111439
111445
  }, "strip", z$1.ZodTypeAny, {
111446
+ designSystemId: string;
111440
111447
  version: string;
111441
111448
  templateId: string;
111442
111449
  }, {
111450
+ designSystemId: string;
111443
111451
  version: string;
111444
111452
  templateId: string;
111445
111453
  }>;
111446
111454
  }, "strip", z$1.ZodTypeAny, {
111447
111455
  type: "SandboxTemplateVersionCreated";
111448
111456
  data: {
111457
+ designSystemId: string;
111449
111458
  version: string;
111450
111459
  templateId: string;
111451
111460
  };
111452
111461
  }, {
111453
111462
  type: "SandboxTemplateVersionCreated";
111454
111463
  data: {
111464
+ designSystemId: string;
111455
111465
  version: string;
111456
111466
  templateId: string;
111457
111467
  };
@@ -352960,10 +352970,10 @@ declare class RequestExecutorError extends Error {
352960
352970
  readonly type: RequestExecutorErrorType;
352961
352971
  readonly errorCode: RequestEexecutorServerErrorCode | undefined;
352962
352972
  readonly serverErrorType: SupernovaExceptionType | undefined;
352963
- static tryParseErrorCode(body: string): any;
352964
- static tryParseServerErrorType(body: string): any;
352973
+ static tryParseJSON(body: string): any;
352965
352974
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
352966
352975
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
352976
+ getDisplayMessage(): string;
352967
352977
  private constructor();
352968
352978
  }
352969
352979
 
package/dist/index.d.ts CHANGED
@@ -83295,22 +83295,27 @@ declare const DTOSandboxTemplateVersionCreated: z$1.ZodObject<{
83295
83295
  data: z$1.ZodObject<{
83296
83296
  templateId: z$1.ZodString;
83297
83297
  version: z$1.ZodString;
83298
+ designSystemId: z$1.ZodString;
83298
83299
  }, "strip", z$1.ZodTypeAny, {
83300
+ designSystemId: string;
83299
83301
  version: string;
83300
83302
  templateId: string;
83301
83303
  }, {
83304
+ designSystemId: string;
83302
83305
  version: string;
83303
83306
  templateId: string;
83304
83307
  }>;
83305
83308
  }, "strip", z$1.ZodTypeAny, {
83306
83309
  type: "SandboxTemplateVersionCreated";
83307
83310
  data: {
83311
+ designSystemId: string;
83308
83312
  version: string;
83309
83313
  templateId: string;
83310
83314
  };
83311
83315
  }, {
83312
83316
  type: "SandboxTemplateVersionCreated";
83313
83317
  data: {
83318
+ designSystemId: string;
83314
83319
  version: string;
83315
83320
  templateId: string;
83316
83321
  };
@@ -111436,22 +111441,27 @@ declare const DTOWorkspaceRoomEvent: z$1.ZodDiscriminatedUnion<"type", [z$1.ZodO
111436
111441
  data: z$1.ZodObject<{
111437
111442
  templateId: z$1.ZodString;
111438
111443
  version: z$1.ZodString;
111444
+ designSystemId: z$1.ZodString;
111439
111445
  }, "strip", z$1.ZodTypeAny, {
111446
+ designSystemId: string;
111440
111447
  version: string;
111441
111448
  templateId: string;
111442
111449
  }, {
111450
+ designSystemId: string;
111443
111451
  version: string;
111444
111452
  templateId: string;
111445
111453
  }>;
111446
111454
  }, "strip", z$1.ZodTypeAny, {
111447
111455
  type: "SandboxTemplateVersionCreated";
111448
111456
  data: {
111457
+ designSystemId: string;
111449
111458
  version: string;
111450
111459
  templateId: string;
111451
111460
  };
111452
111461
  }, {
111453
111462
  type: "SandboxTemplateVersionCreated";
111454
111463
  data: {
111464
+ designSystemId: string;
111455
111465
  version: string;
111456
111466
  templateId: string;
111457
111467
  };
@@ -352960,10 +352970,10 @@ declare class RequestExecutorError extends Error {
352960
352970
  readonly type: RequestExecutorErrorType;
352961
352971
  readonly errorCode: RequestEexecutorServerErrorCode | undefined;
352962
352972
  readonly serverErrorType: SupernovaExceptionType | undefined;
352963
- static tryParseErrorCode(body: string): any;
352964
- static tryParseServerErrorType(body: string): any;
352973
+ static tryParseJSON(body: string): any;
352965
352974
  static serverError(endpoint: string, status: number, bodyText: string): RequestExecutorError;
352966
352975
  static responseParsingError(endpoint: string, cause: Error): RequestExecutorError;
352976
+ getDisplayMessage(): string;
352967
352977
  private constructor();
352968
352978
  }
352969
352979
 
package/dist/index.js CHANGED
@@ -5823,7 +5823,8 @@ var FlaggedFeature = _zod.z.enum([
5823
5823
  "ForgeOnDemandIterations",
5824
5824
  "ForgeAutoRetryOnErrors",
5825
5825
  "ForgeAiBackendMigrated",
5826
- "CustomForgeTemplate"
5826
+ "CustomForgeTemplate",
5827
+ "ForgeRestartPlaywright"
5827
5828
  ]);
5828
5829
  var FeatureFlagMap = _zod.z.record(FlaggedFeature, _zod.z.boolean());
5829
5830
  var FeatureFlag = _zod.z.object({
@@ -11145,7 +11146,8 @@ var DTOSandboxTemplateVersionCreated = _zod2.default.object({
11145
11146
  type: _zod2.default.literal("SandboxTemplateVersionCreated"),
11146
11147
  data: _zod2.default.object({
11147
11148
  templateId: _zod2.default.string(),
11148
- version: _zod2.default.string()
11149
+ version: _zod2.default.string(),
11150
+ designSystemId: _zod2.default.string()
11149
11151
  })
11150
11152
  });
11151
11153
  var DTOSandboxTemplateBuildCreated = _zod2.default.object({
@@ -13518,35 +13520,22 @@ var RequestExecutorError = class _RequestExecutorError extends Error {
13518
13520
  this.errorCode = errorCode;
13519
13521
  this.serverErrorType = serverErrorType;
13520
13522
  }
13521
- static tryParseErrorCode(body) {
13523
+ static tryParseJSON(body) {
13522
13524
  try {
13523
- const errorObj = JSON.parse(body);
13524
- if (errorObj && typeof errorObj.errorCode === "string") {
13525
- return errorObj.errorCode;
13526
- }
13527
- return null;
13528
- } catch (e) {
13529
- return null;
13530
- }
13531
- }
13532
- static tryParseServerErrorType(body) {
13533
- try {
13534
- const errorObj = JSON.parse(body);
13535
- if (errorObj && typeof errorObj.errorCode === "string") {
13536
- return errorObj.type;
13537
- }
13538
- return null;
13525
+ return JSON.parse(body);
13539
13526
  } catch (e) {
13540
13527
  return null;
13541
13528
  }
13542
13529
  }
13543
13530
  static serverError(endpoint, status, bodyText) {
13531
+ const parsedBody = this.tryParseJSON(bodyText);
13544
13532
  return new _RequestExecutorError(
13545
13533
  "ServerError",
13546
13534
  `Endpoint ${endpoint} returned ${status}
13547
13535
  ${bodyText}`,
13548
- this.tryParseErrorCode(bodyText),
13549
- this.tryParseServerErrorType(bodyText)
13536
+ _nullishCoalesce(_optionalChain([parsedBody, 'optionalAccess', _38 => _38.errorCode]), () => ( null)),
13537
+ _nullishCoalesce(_optionalChain([parsedBody, 'optionalAccess', _39 => _39.type]), () => ( null)),
13538
+ _nullishCoalesce(parsedBody, () => ( null))
13550
13539
  );
13551
13540
  }
13552
13541
  static responseParsingError(endpoint, cause) {
@@ -13558,6 +13547,12 @@ ${bodyText}`,
13558
13547
  cause
13559
13548
  );
13560
13549
  }
13550
+ getDisplayMessage() {
13551
+ if (this.type === "ServerError" && this.cause && typeof this.cause === "object" && "message" in this.cause) {
13552
+ return this.cause.message || this.message;
13553
+ }
13554
+ return this.message;
13555
+ }
13561
13556
  };
13562
13557
 
13563
13558
  // src/api/transport/request-executor.ts
@@ -13614,7 +13609,7 @@ var RequestExecutor = class {
13614
13609
  }
13615
13610
  fullUrl(path, query) {
13616
13611
  let url = `https://${this.testServerConfig.host}/api/v2${path}`;
13617
- const queryString = _optionalChain([query, 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]);
13612
+ const queryString = _optionalChain([query, 'optionalAccess', _40 => _40.toString, 'call', _41 => _41()]);
13618
13613
  if (queryString) url += `?${queryString}`;
13619
13614
  return url;
13620
13615
  }
@@ -13634,7 +13629,7 @@ var SupernovaApiClient = class {
13634
13629
  __publicField(this, "threads");
13635
13630
  __publicField(this, "mcpStreams");
13636
13631
  __publicField(this, "sandboxes");
13637
- const apiSecret = _nullishCoalesce(config.apiSecret, () => ( _optionalChain([process, 'optionalAccess', _40 => _40.env, 'optionalAccess', _41 => _41.SUPERNOVA_API_SECRET])));
13632
+ const apiSecret = _nullishCoalesce(config.apiSecret, () => ( _optionalChain([process, 'optionalAccess', _42 => _42.env, 'optionalAccess', _43 => _43.SUPERNOVA_API_SECRET])));
13638
13633
  const requestExecutor = new RequestExecutor({
13639
13634
  apiSecret,
13640
13635
  host: config.host,
@@ -13864,9 +13859,9 @@ var LocalDocsElementActionExecutor = class {
13864
13859
  ...existingGroup.data,
13865
13860
  // TODO Artem: move somewhere reusable
13866
13861
  configuration: input.configuration ? {
13867
- ..._nullishCoalesce(_optionalChain([existingGroup, 'access', _42 => _42.data, 'optionalAccess', _43 => _43.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
13862
+ ..._nullishCoalesce(_optionalChain([existingGroup, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
13868
13863
  ...input.configuration
13869
- } : _optionalChain([existingGroup, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.configuration])
13864
+ } : _optionalChain([existingGroup, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.configuration])
13870
13865
  }
13871
13866
  };
13872
13867
  this.groups.set(localGroup.persistentId, localGroup);
@@ -13907,7 +13902,7 @@ var LocalDocsElementActionExecutor = class {
13907
13902
  updatedAt: /* @__PURE__ */ new Date(),
13908
13903
  data: {
13909
13904
  behavior: "Tabs",
13910
- configuration: _optionalChain([page, 'optionalAccess', _46 => _46.data, 'access', _47 => _47.configuration])
13905
+ configuration: _optionalChain([page, 'optionalAccess', _48 => _48.data, 'access', _49 => _49.configuration])
13911
13906
  },
13912
13907
  sortOrder: page.sortOrder,
13913
13908
  designSystemVersionId: this.designSystemVersionId
@@ -13931,7 +13926,7 @@ var LocalDocsElementActionExecutor = class {
13931
13926
  if (input.approvalState) {
13932
13927
  this.approvalStates.set(input.persistentId, {
13933
13928
  approvalState: input.approvalState,
13934
- createdAt: _nullishCoalesce(_optionalChain([existingApproval, 'optionalAccess', _48 => _48.createdAt]), () => ( /* @__PURE__ */ new Date())),
13929
+ createdAt: _nullishCoalesce(_optionalChain([existingApproval, 'optionalAccess', _50 => _50.createdAt]), () => ( /* @__PURE__ */ new Date())),
13935
13930
  designSystemVersionId: this.designSystemVersionId,
13936
13931
  pagePersistentId: input.persistentId,
13937
13932
  updatedAt: /* @__PURE__ */ new Date(),
@@ -13959,7 +13954,7 @@ var LocalDocsElementActionExecutor = class {
13959
13954
  return neighbours[neighbours.length - 1].sortOrder + sortOrderStep;
13960
13955
  }
13961
13956
  const left = neighbours[index].sortOrder;
13962
- const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _49 => _49[index + 1], 'optionalAccess', _50 => _50.sortOrder]), () => ( left + sortOrderStep * 2));
13957
+ const right = _nullishCoalesce(_optionalChain([neighbours, 'access', _51 => _51[index + 1], 'optionalAccess', _52 => _52.sortOrder]), () => ( left + sortOrderStep * 2));
13963
13958
  return (right + left) / 2;
13964
13959
  }
13965
13960
  };
@@ -14247,7 +14242,7 @@ function buildPageDraftCreatedAndUpdatedStates(pages, pageSnapshots, pageHashes,
14247
14242
  if (snapshot) {
14248
14243
  publishedState = itemStateFromPage(snapshot.page, snapshot.pageContentHash);
14249
14244
  }
14250
- const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _51 => _51.pageContentHash]))), () => ( ""));
14245
+ const currentPageContentHash = _nullishCoalesce(_nullishCoalesce(pageHashes[page.persistentId], () => ( _optionalChain([snapshot, 'optionalAccess', _53 => _53.pageContentHash]))), () => ( ""));
14251
14246
  const currentState = itemStateFromPage(page, currentPageContentHash);
14252
14247
  const draftState = createDraftState(page.persistentId, currentState, publishedState, debug);
14253
14248
  if (draftState) result.set(page.persistentId, draftState);
@@ -14380,7 +14375,7 @@ function buildGroupDraftCreatedAndUpdatedStates(groups, groupSnapshots, debug) {
14380
14375
  function itemStateFromGroup(group) {
14381
14376
  return {
14382
14377
  title: group.meta.name,
14383
- configuration: _nullishCoalesce(_optionalChain([group, 'access', _52 => _52.data, 'optionalAccess', _53 => _53.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
14378
+ configuration: _nullishCoalesce(_optionalChain([group, 'access', _54 => _54.data, 'optionalAccess', _55 => _55.configuration]), () => ( defaultDocumentationItemConfigurationV2)),
14384
14379
  contentHash: "-"
14385
14380
  };
14386
14381
  }
@@ -14541,7 +14536,7 @@ var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
14541
14536
  function itemConfigurationToYjs(yDoc, item) {
14542
14537
  yDoc.transact((trx) => {
14543
14538
  const { title, configuration } = item;
14544
- const header = _optionalChain([configuration, 'optionalAccess', _54 => _54.header]);
14539
+ const header = _optionalChain([configuration, 'optionalAccess', _56 => _56.header]);
14545
14540
  if (title !== void 0) {
14546
14541
  const headerYMap = trx.doc.getMap("itemTitle");
14547
14542
  headerYMap.set("title", title);
@@ -14559,9 +14554,9 @@ function itemConfigurationToYjs(yDoc, item) {
14559
14554
  header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
14560
14555
  }
14561
14556
  const configYMap = trx.doc.getMap("itemConfiguration");
14562
- _optionalChain([configuration, 'optionalAccess', _55 => _55.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
14563
- _optionalChain([configuration, 'optionalAccess', _56 => _56.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
14564
- _optionalChain([configuration, 'optionalAccess', _57 => _57.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
14557
+ _optionalChain([configuration, 'optionalAccess', _57 => _57.showSidebar]) !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
14558
+ _optionalChain([configuration, 'optionalAccess', _58 => _58.isHidden]) !== void 0 && configYMap.set("isHidden", configuration.isHidden);
14559
+ _optionalChain([configuration, 'optionalAccess', _59 => _59.isPrivate]) !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
14565
14560
  });
14566
14561
  }
14567
14562
 
@@ -15385,7 +15380,7 @@ var ListTreeBuilder = class {
15385
15380
  }
15386
15381
  addWithProperty(block, multiRichTextProperty) {
15387
15382
  const parsedOptions = PageBlockDefinitionMutiRichTextOptions.optional().parse(multiRichTextProperty.options);
15388
- return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _58 => _58.multiRichTextStyle]) || "OL");
15383
+ return this.add(block, multiRichTextProperty.id, _optionalChain([parsedOptions, 'optionalAccess', _60 => _60.multiRichTextStyle]) || "OL");
15389
15384
  }
15390
15385
  add(block, multiRichTextPropertyId, multiRichTextPropertyStyle) {
15391
15386
  const list = this.createList(block, multiRichTextPropertyId, multiRichTextPropertyStyle);
@@ -15400,7 +15395,7 @@ var ListTreeBuilder = class {
15400
15395
  }
15401
15396
  const listParent = this.getParentOfDepth(block.data.indentLevel);
15402
15397
  const lastChild = listParent.children[listParent.children.length - 1];
15403
- if (_optionalChain([lastChild, 'optionalAccess', _59 => _59.type]) === "List") {
15398
+ if (_optionalChain([lastChild, 'optionalAccess', _61 => _61.type]) === "List") {
15404
15399
  lastChild.children.push(...list.leadingChildren);
15405
15400
  return;
15406
15401
  } else {
@@ -15629,7 +15624,7 @@ function serializeAsRichTextBlock(input) {
15629
15624
  const textPropertyValue = BlockParsingUtils.richTextPropertyValue(blockItem, richTextProperty.id);
15630
15625
  const enrichedInput = { ...input, richTextPropertyValue: textPropertyValue };
15631
15626
  const parsedOptions = PageBlockDefinitionRichTextOptions.optional().parse(richTextProperty.options);
15632
- const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _60 => _60.richTextStyle]), () => ( "Default"));
15627
+ const style = _nullishCoalesce(_optionalChain([parsedOptions, 'optionalAccess', _62 => _62.richTextStyle]), () => ( "Default"));
15633
15628
  switch (style) {
15634
15629
  case "Callout":
15635
15630
  return serializeAsCallout(enrichedInput);
@@ -15853,7 +15848,7 @@ function serializeBlockNodeAttributes(block) {
15853
15848
  };
15854
15849
  }
15855
15850
  function richTextHeadingLevel(property) {
15856
- const style = _optionalChain([property, 'access', _61 => _61.options, 'optionalAccess', _62 => _62.richTextStyle]);
15851
+ const style = _optionalChain([property, 'access', _63 => _63.options, 'optionalAccess', _64 => _64.richTextStyle]);
15857
15852
  if (!style) return void 0;
15858
15853
  switch (style) {
15859
15854
  case "Title1":
@@ -15972,7 +15967,7 @@ function serializeAsCustomBlock(block, definition) {
15972
15967
  linksTo: i.linksTo
15973
15968
  };
15974
15969
  });
15975
- const columns = _optionalChain([block, 'access', _63 => _63.data, 'access', _64 => _64.appearance, 'optionalAccess', _65 => _65.numberOfColumns]);
15970
+ const columns = _optionalChain([block, 'access', _65 => _65.data, 'access', _66 => _66.appearance, 'optionalAccess', _67 => _67.numberOfColumns]);
15976
15971
  return {
15977
15972
  type: serializeCustomBlockNodeType(block, definition),
15978
15973
  attrs: {
@@ -18297,7 +18292,7 @@ function parseAsListNode(prosemirrorNode) {
18297
18292
  }
18298
18293
  function parseAsListNodeItem(prosemirrorNode) {
18299
18294
  if (prosemirrorNode.type !== "listItem") return null;
18300
- const firstChild = _optionalChain([prosemirrorNode, 'access', _66 => _66.content, 'optionalAccess', _67 => _67[0]]);
18295
+ const firstChild = _optionalChain([prosemirrorNode, 'access', _68 => _68.content, 'optionalAccess', _69 => _69[0]]);
18301
18296
  if (!firstChild || firstChild.type !== "paragraph") return null;
18302
18297
  return parseRichText(_nullishCoalesce(firstChild.content, () => ( [])));
18303
18298
  }
@@ -18445,9 +18440,9 @@ function parseAsMultiRichText(prosemirrorNode, definition, property, definitions
18445
18440
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
18446
18441
  const result = [];
18447
18442
  const listItems = [];
18448
- _optionalChain([prosemirrorNode, 'access', _68 => _68.content, 'optionalAccess', _69 => _69.forEach, 'call', _70 => _70((c) => {
18443
+ _optionalChain([prosemirrorNode, 'access', _70 => _70.content, 'optionalAccess', _71 => _71.forEach, 'call', _72 => _72((c) => {
18449
18444
  if (c.type !== "listItem") return;
18450
- _optionalChain([c, 'access', _71 => _71.content, 'optionalAccess', _72 => _72.forEach, 'call', _73 => _73((cc) => {
18445
+ _optionalChain([c, 'access', _73 => _73.content, 'optionalAccess', _74 => _74.forEach, 'call', _75 => _75((cc) => {
18451
18446
  listItems.push(cc);
18452
18447
  })]);
18453
18448
  })]);
@@ -18558,17 +18553,17 @@ function parseAsTable(prosemirrorNode, definition, property) {
18558
18553
  if (!id) return null;
18559
18554
  const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
18560
18555
  const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", _zod.z.boolean().optional()) !== false;
18561
- const tableChild = _optionalChain([prosemirrorNode, 'access', _74 => _74.content, 'optionalAccess', _75 => _75.find, 'call', _76 => _76((c) => c.type === "table")]);
18556
+ const tableChild = _optionalChain([prosemirrorNode, 'access', _76 => _76.content, 'optionalAccess', _77 => _77.find, 'call', _78 => _78((c) => c.type === "table")]);
18562
18557
  if (!tableChild) {
18563
18558
  return emptyTable(id, variantId, 0);
18564
18559
  }
18565
- 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]))]), () => ( []));
18560
+ 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]))]), () => ( []));
18566
18561
  if (!rows.length) {
18567
18562
  return emptyTable(id, variantId, 0);
18568
18563
  }
18569
- 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));
18570
- const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _87 => _87.content, 'optionalAccess', _88 => _88[0], 'optionalAccess', _89 => _89.type]) === "tableHeader").length;
18571
- const hasHeaderRow = _optionalChain([rows, 'access', _90 => _90[0], 'access', _91 => _91.content, 'optionalAccess', _92 => _92.length]) === rowHeaderCells;
18564
+ 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));
18565
+ const columnHeaderCells = rows.filter((r) => _optionalChain([r, 'access', _89 => _89.content, 'optionalAccess', _90 => _90[0], 'optionalAccess', _91 => _91.type]) === "tableHeader").length;
18566
+ const hasHeaderRow = _optionalChain([rows, 'access', _92 => _92[0], 'access', _93 => _93.content, 'optionalAccess', _94 => _94.length]) === rowHeaderCells;
18572
18567
  const hasHeaderColumn = rows.length === columnHeaderCells;
18573
18568
  const tableValue = {
18574
18569
  showBorder: hasBorder,
@@ -18645,7 +18640,7 @@ function parseAsTableNode(prosemirrorNode) {
18645
18640
  if (!items) return null;
18646
18641
  const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
18647
18642
  if (!parsedItems.success) return null;
18648
- const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _93 => _93.data, 'access', _94 => _94[0], 'optionalAccess', _95 => _95.props, 'access', _96 => _96.image]);
18643
+ const rawImagePropertyValue = _optionalChain([parsedItems, 'access', _95 => _95.data, 'access', _96 => _96[0], 'optionalAccess', _97 => _97.props, 'access', _98 => _98.image]);
18649
18644
  if (!rawImagePropertyValue) return null;
18650
18645
  const imagePropertyValueParseResult = PageBlockItemImageValue.safeParse(rawImagePropertyValue);
18651
18646
  if (!imagePropertyValueParseResult.success) return null;
@@ -18886,7 +18881,7 @@ function getProsemirrorBlockVariantId(prosemirrorNode) {
18886
18881
  return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(_zod.z.string()));
18887
18882
  }
18888
18883
  function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
18889
- const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _97 => _97.attrs, 'optionalAccess', _98 => _98[attributeName]]));
18884
+ const parsedAttr = validationSchema.safeParse(_optionalChain([prosemirrorNode, 'access', _99 => _99.attrs, 'optionalAccess', _100 => _100[attributeName]]));
18890
18885
  if (parsedAttr.success) {
18891
18886
  return parsedAttr.data;
18892
18887
  } else {
@@ -19714,10 +19709,10 @@ var LocalProjectActionExecutor = class {
19714
19709
  const SORT_ORDER_STEP = 1e3;
19715
19710
  if (afterItemId === void 0) {
19716
19711
  const lastSection = findLast(projectId, sectionId);
19717
- return (_nullishCoalesce(_optionalChain([lastSection, 'optionalAccess', _99 => _99.sortOrder]), () => ( 0))) + SORT_ORDER_STEP;
19712
+ return (_nullishCoalesce(_optionalChain([lastSection, 'optionalAccess', _101 => _101.sortOrder]), () => ( 0))) + SORT_ORDER_STEP;
19718
19713
  } else if (afterItemId === null) {
19719
19714
  const firstSection = findFirst(projectId, sectionId);
19720
- return (_nullishCoalesce(_optionalChain([firstSection, 'optionalAccess', _100 => _100.sortOrder]), () => ( SORT_ORDER_STEP))) - SORT_ORDER_STEP;
19715
+ return (_nullishCoalesce(_optionalChain([firstSection, 'optionalAccess', _102 => _102.sortOrder]), () => ( SORT_ORDER_STEP))) - SORT_ORDER_STEP;
19721
19716
  } else {
19722
19717
  const targetSection = findUnique(projectId, afterItemId, sectionId);
19723
19718
  if (!targetSection) return null;