@superdoc-dev/cli 0.11.0 → 0.11.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.
Files changed (2) hide show
  1. package/dist/index.js +350 -133
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -29179,6 +29179,212 @@ var init_y_websocket = __esm(() => {
29179
29179
  };
29180
29180
  });
29181
29181
 
29182
+ // src/lib/collaboration/diagnostics.ts
29183
+ function isSensitiveDiagnosticKey(key) {
29184
+ const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
29185
+ if (!normalized)
29186
+ return false;
29187
+ return normalized === "key" || normalized === "apikey" || normalized === "authorization" || normalized.includes("token") || normalized.includes("auth") || normalized.includes("secret") || normalized.includes("password") || normalized.includes("credential");
29188
+ }
29189
+ function sanitizeUrlCandidate(value) {
29190
+ try {
29191
+ const parsed = new URL(value);
29192
+ for (const key of Array.from(parsed.searchParams.keys())) {
29193
+ if (isSensitiveDiagnosticKey(key)) {
29194
+ parsed.searchParams.set(key, REDACTED);
29195
+ }
29196
+ }
29197
+ return parsed.toString();
29198
+ } catch {
29199
+ return value;
29200
+ }
29201
+ }
29202
+ function sanitizeDiagnosticString(value) {
29203
+ const withSanitizedUrls = value.replace(/\b(?:wss?|https?):\/\/[^\s"'<>]+/gi, sanitizeUrlCandidate);
29204
+ return withSanitizedUrls.replace(/([?&])([^=&#\s"']+)=([^&#\s"']*)/g, (match, prefix, key) => {
29205
+ let decodedKey;
29206
+ try {
29207
+ decodedKey = decodeURIComponent(key.replace(/\+/g, " "));
29208
+ } catch {
29209
+ decodedKey = key;
29210
+ }
29211
+ if (!isSensitiveDiagnosticKey(decodedKey))
29212
+ return match;
29213
+ return `${prefix}${key}=${REDACTED}`;
29214
+ });
29215
+ }
29216
+ function summarizeError(error) {
29217
+ return {
29218
+ name: sanitizeDiagnosticString(error.name),
29219
+ message: sanitizeDiagnosticString(error.message)
29220
+ };
29221
+ }
29222
+ function isRecord4(value) {
29223
+ return !!value && typeof value === "object";
29224
+ }
29225
+ function summarizeEventLike(value) {
29226
+ if ("code" in value && "reason" in value && "wasClean" in value) {
29227
+ return {
29228
+ code: typeof value.code === "number" ? value.code : undefined,
29229
+ reason: sanitizeDiagnosticString(String(value.reason ?? "")),
29230
+ wasClean: Boolean(value.wasClean)
29231
+ };
29232
+ }
29233
+ if ("message" in value && "type" in value) {
29234
+ return {
29235
+ type: sanitizeDiagnosticString(String(value.type ?? "")),
29236
+ message: sanitizeDiagnosticString(String(value.message ?? ""))
29237
+ };
29238
+ }
29239
+ return null;
29240
+ }
29241
+ function sanitizeDiagnosticValue(value, depth = 0) {
29242
+ if (value == null)
29243
+ return value;
29244
+ if (typeof value === "string")
29245
+ return sanitizeDiagnosticString(value);
29246
+ if (typeof value === "number" || typeof value === "boolean")
29247
+ return value;
29248
+ if (typeof value === "bigint")
29249
+ return value.toString();
29250
+ if (value instanceof Error)
29251
+ return summarizeError(value);
29252
+ if (depth >= MAX_OBJECT_DEPTH)
29253
+ return "[Truncated]";
29254
+ if (Array.isArray(value)) {
29255
+ return value.map((entry) => sanitizeDiagnosticValue(entry, depth + 1));
29256
+ }
29257
+ if (!isRecord4(value)) {
29258
+ return Object.prototype.toString.call(value);
29259
+ }
29260
+ const eventSummary = summarizeEventLike(value);
29261
+ if (eventSummary)
29262
+ return eventSummary;
29263
+ const output = {};
29264
+ for (const [key, entry] of Object.entries(value)) {
29265
+ if (typeof entry === "function" || typeof entry === "symbol" || typeof entry === "undefined")
29266
+ continue;
29267
+ output[key] = sanitizeDiagnosticValue(entry, depth + 1);
29268
+ }
29269
+ return output;
29270
+ }
29271
+ function sanitizeProviderState(provider) {
29272
+ const record = provider;
29273
+ return sanitizeDiagnosticValue({
29274
+ synced: record.synced,
29275
+ isSynced: record.isSynced,
29276
+ status: record.status,
29277
+ wsconnected: record.wsconnected,
29278
+ wsconnecting: record.wsconnecting,
29279
+ shouldConnect: record.shouldConnect
29280
+ });
29281
+ }
29282
+ function firstUsefulArg(args2) {
29283
+ return args2[0];
29284
+ }
29285
+ function attachProviderDiagnostics(provider, context) {
29286
+ const eventCounts = {};
29287
+ const cleanup = [];
29288
+ let lastStatus;
29289
+ let lastConnectionError;
29290
+ let lastConnectionClose;
29291
+ let lastClose;
29292
+ let lastDisconnect;
29293
+ let lastAuthenticationFailed;
29294
+ let detached = false;
29295
+ const capture = (eventName, args2) => {
29296
+ eventCounts[eventName] = (eventCounts[eventName] ?? 0) + 1;
29297
+ const payload = firstUsefulArg(args2);
29298
+ if (eventName === "connection-close" && payload == null)
29299
+ return;
29300
+ const sanitizedPayload = sanitizeDiagnosticValue(payload);
29301
+ switch (eventName) {
29302
+ case "status":
29303
+ lastStatus = sanitizedPayload;
29304
+ break;
29305
+ case "connection-error":
29306
+ lastConnectionError = sanitizedPayload;
29307
+ break;
29308
+ case "connection-close":
29309
+ lastConnectionClose = sanitizedPayload;
29310
+ break;
29311
+ case "close":
29312
+ lastClose = sanitizedPayload;
29313
+ break;
29314
+ case "disconnect":
29315
+ lastDisconnect = sanitizedPayload;
29316
+ break;
29317
+ case "authenticationFailed":
29318
+ lastAuthenticationFailed = sanitizedPayload;
29319
+ break;
29320
+ }
29321
+ };
29322
+ const subscribe3 = (eventName) => {
29323
+ if (!provider.on)
29324
+ return;
29325
+ try {
29326
+ const handler = (...args2) => capture(eventName, args2);
29327
+ provider.on(eventName, handler);
29328
+ cleanup.push(() => {
29329
+ try {
29330
+ provider.off?.(eventName, handler);
29331
+ } catch {}
29332
+ });
29333
+ } catch {}
29334
+ };
29335
+ for (const eventName of [
29336
+ "status",
29337
+ "sync",
29338
+ "synced",
29339
+ "connection-error",
29340
+ "connection-close",
29341
+ "close",
29342
+ "disconnect",
29343
+ "authenticationFailed",
29344
+ "authenticated"
29345
+ ]) {
29346
+ subscribe3(eventName);
29347
+ }
29348
+ return {
29349
+ toTimeoutDetails(providerForSnapshot, timeoutMs, elapsedMs) {
29350
+ const details = {
29351
+ timeoutMs,
29352
+ elapsedMs,
29353
+ providerType: context.providerType,
29354
+ url: sanitizeDiagnosticString(context.url),
29355
+ documentId: sanitizeDiagnosticString(context.documentId),
29356
+ tokenEnvConfigured: context.tokenEnvConfigured,
29357
+ authTokenResolved: context.authTokenResolved,
29358
+ paramsKeys: [...context.paramsKeys],
29359
+ eventCounts: { ...eventCounts },
29360
+ providerState: sanitizeProviderState(providerForSnapshot)
29361
+ };
29362
+ if (lastStatus !== undefined)
29363
+ details.lastStatus = lastStatus;
29364
+ if (lastConnectionError !== undefined)
29365
+ details.lastConnectionError = lastConnectionError;
29366
+ if (lastConnectionClose !== undefined)
29367
+ details.lastConnectionClose = lastConnectionClose;
29368
+ if (lastClose !== undefined)
29369
+ details.lastClose = lastClose;
29370
+ if (lastDisconnect !== undefined)
29371
+ details.lastDisconnect = lastDisconnect;
29372
+ if (lastAuthenticationFailed !== undefined)
29373
+ details.lastAuthenticationFailed = lastAuthenticationFailed;
29374
+ return details;
29375
+ },
29376
+ detach() {
29377
+ if (detached)
29378
+ return;
29379
+ detached = true;
29380
+ for (const run of cleanup.splice(0)) {
29381
+ run();
29382
+ }
29383
+ }
29384
+ };
29385
+ }
29386
+ var REDACTED = "[REDACTED]", MAX_OBJECT_DEPTH = 5;
29387
+
29182
29388
  // ../../node_modules/.pnpm/@liveblocks+core@3.15.5_@types+json-schema@7.0.15/node_modules/@liveblocks/core/dist/index.js
29183
29389
  function error(msg) {
29184
29390
  if (false) {} else {
@@ -42343,10 +42549,11 @@ var init_liveblocks = __esm(() => {
42343
42549
  function isSynced(provider) {
42344
42550
  return provider.synced === true || provider.isSynced === true;
42345
42551
  }
42346
- function waitForProviderSync(provider, timeoutMs) {
42552
+ function waitForProviderSync(provider, timeoutMs, diagnostics) {
42347
42553
  if (isSynced(provider))
42348
42554
  return Promise.resolve();
42349
42555
  return new Promise((resolve, reject) => {
42556
+ const startedAt = Date.now();
42350
42557
  let settled = false;
42351
42558
  const cleanup = [];
42352
42559
  const finish = (error3) => {
@@ -42374,8 +42581,9 @@ function waitForProviderSync(provider, timeoutMs) {
42374
42581
  cleanup.push(() => provider.off?.("sync", onSync));
42375
42582
  }
42376
42583
  const timer = setTimeout(() => {
42584
+ const elapsedMs = Date.now() - startedAt;
42377
42585
  finish(new CliError("COLLABORATION_SYNC_TIMEOUT", `Collaboration sync timed out after ${timeoutMs}ms.`, {
42378
- timeoutMs
42586
+ ...diagnostics?.toTimeoutDetails(provider, timeoutMs, elapsedMs) ?? { timeoutMs }
42379
42587
  }));
42380
42588
  }, timeoutMs);
42381
42589
  cleanup.push(() => clearTimeout(timer));
@@ -42412,11 +42620,20 @@ function createWebSocketRuntime(profile) {
42412
42620
  preserveConnection: false
42413
42621
  });
42414
42622
  }
42623
+ const diagnostics = attachProviderDiagnostics(provider, {
42624
+ providerType: profile.providerType,
42625
+ url: profile.url,
42626
+ documentId: profile.documentId,
42627
+ tokenEnvConfigured: Boolean(profile.tokenEnv),
42628
+ authTokenResolved: Boolean(token),
42629
+ paramsKeys: Object.keys(profile.params ?? {})
42630
+ });
42415
42631
  return {
42416
42632
  ydoc,
42417
42633
  provider,
42418
- waitForSync: () => waitForProviderSync(provider, syncTimeoutMs),
42634
+ waitForSync: () => waitForProviderSync(provider, syncTimeoutMs, diagnostics),
42419
42635
  dispose() {
42636
+ diagnostics?.detach();
42420
42637
  provider.disconnect?.();
42421
42638
  provider.destroy?.();
42422
42639
  ydoc.destroy();
@@ -66558,7 +66775,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
66558
66775
  emptyOptions2 = {};
66559
66776
  });
66560
66777
 
66561
- // ../../packages/superdoc/dist/chunks/SuperConverter-CzwJ7ds9.es.js
66778
+ // ../../packages/superdoc/dist/chunks/SuperConverter-SvCYq2KK.es.js
66562
66779
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
66563
66780
  const fieldValue = extension$1.config[field];
66564
66781
  if (typeof fieldValue === "function")
@@ -67413,28 +67630,28 @@ function assertTargetPresent2(target, operationName) {
67413
67630
  if (target === undefined || target === null)
67414
67631
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a target.`);
67415
67632
  }
67416
- function isRecord4(value) {
67633
+ function isRecord5(value) {
67417
67634
  return typeof value === "object" && value != null && !Array.isArray(value);
67418
67635
  }
67419
67636
  function isInteger3(value) {
67420
67637
  return typeof value === "number" && Number.isInteger(value);
67421
67638
  }
67422
67639
  function isTextAddress2(value) {
67423
- if (!isRecord4(value))
67640
+ if (!isRecord5(value))
67424
67641
  return false;
67425
67642
  if (value.kind !== "text")
67426
67643
  return false;
67427
67644
  if (typeof value.blockId !== "string")
67428
67645
  return false;
67429
67646
  const range = value.range;
67430
- if (!isRecord4(range))
67647
+ if (!isRecord5(range))
67431
67648
  return false;
67432
67649
  if (!isInteger3(range.start) || !isInteger3(range.end))
67433
67650
  return false;
67434
67651
  return range.start <= range.end;
67435
67652
  }
67436
67653
  function isTextTarget2(value) {
67437
- if (!isRecord4(value))
67654
+ if (!isRecord5(value))
67438
67655
  return false;
67439
67656
  if (value.kind !== "text")
67440
67657
  return false;
@@ -67442,12 +67659,12 @@ function isTextTarget2(value) {
67442
67659
  if (!Array.isArray(segments) || segments.length === 0)
67443
67660
  return false;
67444
67661
  for (const seg of segments) {
67445
- if (!isRecord4(seg))
67662
+ if (!isRecord5(seg))
67446
67663
  return false;
67447
67664
  if (typeof seg.blockId !== "string")
67448
67665
  return false;
67449
67666
  const range = seg.range;
67450
- if (!isRecord4(range))
67667
+ if (!isRecord5(range))
67451
67668
  return false;
67452
67669
  if (!isInteger3(range.start) || !isInteger3(range.end))
67453
67670
  return false;
@@ -67457,7 +67674,7 @@ function isTextTarget2(value) {
67457
67674
  return true;
67458
67675
  }
67459
67676
  function isBlockNodeAddress2(value) {
67460
- if (!isRecord4(value))
67677
+ if (!isRecord5(value))
67461
67678
  return false;
67462
67679
  if (value.kind !== "block")
67463
67680
  return false;
@@ -67475,7 +67692,7 @@ function assertNoUnknownFields3(input, allowlist, operationName) {
67475
67692
  function validateNestingPolicyValue2(value) {
67476
67693
  if (value === undefined)
67477
67694
  return;
67478
- if (!isRecord4(value))
67695
+ if (!isRecord5(value))
67479
67696
  throw new DocumentApiValidationError2("INVALID_INPUT", `nestingPolicy must be an object, got ${typeof value}.`, {
67480
67697
  field: "nestingPolicy",
67481
67698
  value
@@ -67504,7 +67721,7 @@ function runAttributeCarrier2(runPropertyKey) {
67504
67721
  };
67505
67722
  }
67506
67723
  function isObjectPatch2(value) {
67507
- return isRecord4(value) && !Array.isArray(value);
67724
+ return isRecord5(value) && !Array.isArray(value);
67508
67725
  }
67509
67726
  function assertNonEmptyObject2(value, propertyKey) {
67510
67727
  if (Object.keys(value).length === 0)
@@ -67694,12 +67911,12 @@ function executeWrite2(adapter, request, options) {
67694
67911
  return adapter.write(request, normalizeMutationOptions2(options));
67695
67912
  }
67696
67913
  function assertParagraphTarget2(input, operation) {
67697
- if (!isRecord4(input))
67914
+ if (!isRecord5(input))
67698
67915
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operation} input must be a non-null object.`);
67699
67916
  const { target } = input;
67700
67917
  if (target === undefined || target === null)
67701
67918
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operation} requires a target.`);
67702
- if (!isRecord4(target))
67919
+ if (!isRecord5(target))
67703
67920
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operation} target must be an object.`, { field: "target" });
67704
67921
  if (target.kind !== "block")
67705
67922
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operation} target.kind must be 'block'.`, {
@@ -68191,7 +68408,7 @@ function validateValue2(path2, value, schema) {
68191
68408
  }
68192
68409
  }
68193
68410
  function validateObjectValue2(path2, value, children) {
68194
- if (!isRecord4(value))
68411
+ if (!isRecord5(value))
68195
68412
  throw new DocumentApiValidationError2("INVALID_INPUT", `${path2} must be a non-null object, got ${typeof value}.`, {
68196
68413
  field: path2,
68197
68414
  value
@@ -68219,13 +68436,13 @@ function validateArrayValue2(path2, value, itemSchema) {
68219
68436
  validateValue2(`${path2}[${i$1}]`, value[i$1], itemSchema);
68220
68437
  }
68221
68438
  function validateStylesApplyInput2(input) {
68222
- if (!isRecord4(input))
68439
+ if (!isRecord5(input))
68223
68440
  throw new DocumentApiValidationError2("INVALID_INPUT", "styles.apply input must be a non-null object.");
68224
68441
  assertNoUnknownFields$1(input, INPUT_ALLOWED_KEYS2);
68225
68442
  const { target, patch } = input;
68226
68443
  if (target === undefined || target === null)
68227
68444
  throw new DocumentApiValidationError2("INVALID_TARGET", "styles.apply requires a target object.");
68228
- if (!isRecord4(target))
68445
+ if (!isRecord5(target))
68229
68446
  throw new DocumentApiValidationError2("INVALID_TARGET", "target must be a non-null object.", {
68230
68447
  field: "target",
68231
68448
  value: target
@@ -68244,7 +68461,7 @@ function validateStylesApplyInput2(input) {
68244
68461
  const channel = target.channel;
68245
68462
  if (patch === undefined || patch === null)
68246
68463
  throw new DocumentApiValidationError2("INVALID_INPUT", "styles.apply requires a patch object.");
68247
- if (!isRecord4(patch))
68464
+ if (!isRecord5(patch))
68248
68465
  throw new DocumentApiValidationError2("INVALID_INPUT", "patch must be a non-null object.", {
68249
68466
  field: "patch",
68250
68467
  value: patch
@@ -68283,7 +68500,7 @@ function validateStylesApplyInput2(input) {
68283
68500
  function validateStylesApplyOptions2(options) {
68284
68501
  if (options === undefined || options === null)
68285
68502
  return;
68286
- if (!isRecord4(options))
68503
+ if (!isRecord5(options))
68287
68504
  throw new DocumentApiValidationError2("INVALID_INPUT", "styles.apply options must be a non-null object.");
68288
68505
  for (const key of Object.keys(options))
68289
68506
  if (!OPTIONS_ALLOWED_KEYS2.has(key))
@@ -69137,7 +69354,7 @@ function derivePropertyStateFromDirect2(direct) {
69137
69354
  }
69138
69355
  }
69139
69356
  function isSelectionEdgeNodeAddress2(value) {
69140
- if (!isRecord4(value))
69357
+ if (!isRecord5(value))
69141
69358
  return false;
69142
69359
  if (value.kind !== "block")
69143
69360
  return false;
@@ -69148,7 +69365,7 @@ function isSelectionEdgeNodeAddress2(value) {
69148
69365
  return true;
69149
69366
  }
69150
69367
  function isSelectionPoint2(value) {
69151
- if (!isRecord4(value))
69368
+ if (!isRecord5(value))
69152
69369
  return false;
69153
69370
  if (value.kind === "text")
69154
69371
  return typeof value.blockId === "string" && value.blockId !== "" && isInteger3(value.offset) && value.offset >= 0;
@@ -69157,7 +69374,7 @@ function isSelectionPoint2(value) {
69157
69374
  return false;
69158
69375
  }
69159
69376
  function isSelectionTarget2(value) {
69160
- if (!isRecord4(value))
69377
+ if (!isRecord5(value))
69161
69378
  return false;
69162
69379
  if (value.kind !== "selection")
69163
69380
  return false;
@@ -69173,7 +69390,7 @@ function validateStoryLocator2(value, field) {
69173
69390
  });
69174
69391
  }
69175
69392
  function validateAnchor2(value, fieldName) {
69176
- if (!isRecord4(value))
69393
+ if (!isRecord5(value))
69177
69394
  throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be a non-null object.`, { field: fieldName });
69178
69395
  if (typeof value.kind !== "string" || !VALID_ANCHOR_KINDS2.has(value.kind))
69179
69396
  throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName}.kind must be "document", "point", or "ref", got ${JSON.stringify(value.kind)}.`, {
@@ -69210,7 +69427,7 @@ function validateAnchor2(value, fieldName) {
69210
69427
  }
69211
69428
  }
69212
69429
  function validateResolveRangeInput2(input) {
69213
- if (!isRecord4(input))
69430
+ if (!isRecord5(input))
69214
69431
  throw new DocumentApiValidationError2("INVALID_INPUT", "ranges.resolve input must be a non-null object.");
69215
69432
  assertNoUnknownFields3(input, RESOLVE_RANGE_ALLOWED_KEYS2, "ranges.resolve");
69216
69433
  if (input.start === undefined)
@@ -69233,7 +69450,7 @@ function executeResolveRange2(adapter, input) {
69233
69450
  function validateSelectionCurrentInput2(input) {
69234
69451
  if (input === undefined)
69235
69452
  return;
69236
- if (!isRecord4(input))
69453
+ if (!isRecord5(input))
69237
69454
  throw new DocumentApiValidationError2("INVALID_INPUT", "selection.current input must be a non-null object.");
69238
69455
  assertNoUnknownFields3(input, SELECTION_CURRENT_ALLOWED_KEYS2, "selection.current");
69239
69456
  if (input.includeText !== undefined && typeof input.includeText !== "boolean")
@@ -69250,7 +69467,7 @@ function executeMarkdownToFragment2(adapter, input) {
69250
69467
  return adapter.markdownToFragment(input);
69251
69468
  }
69252
69469
  function validateCreateCommentInput2(input) {
69253
- if (!isRecord4(input))
69470
+ if (!isRecord5(input))
69254
69471
  throw new DocumentApiValidationError2("INVALID_INPUT", "comments.create input must be a non-null object.");
69255
69472
  assertNoUnknownFields3(input, CREATE_COMMENT_ALLOWED_KEYS2, "comments.create");
69256
69473
  const { target, text: text$2, parentCommentId } = input;
@@ -69280,7 +69497,7 @@ function validateCreateCommentInput2(input) {
69280
69497
  });
69281
69498
  }
69282
69499
  function validatePatchCommentInput2(input) {
69283
- if (!isRecord4(input))
69500
+ if (!isRecord5(input))
69284
69501
  throw new DocumentApiValidationError2("INVALID_INPUT", "comments.patch input must be a non-null object.");
69285
69502
  assertNoUnknownFields3(input, PATCH_COMMENT_ALLOWED_KEYS2, "comments.patch");
69286
69503
  const { commentId, target } = input;
@@ -69356,7 +69573,7 @@ function executeCommentsPatch2(adapter, input, options) {
69356
69573
  throw new DocumentApiValidationError2("INTERNAL_ERROR", "comments.patch: no mutation field matched after validation. This is a bug.");
69357
69574
  }
69358
69575
  function validateCommentIdInput2(input, operationName) {
69359
- if (!isRecord4(input))
69576
+ if (!isRecord5(input))
69360
69577
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
69361
69578
  if (typeof input.commentId !== "string" || input.commentId.length === 0)
69362
69579
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} commentId must be a non-empty string.`, {
@@ -69373,7 +69590,7 @@ function executeGetComment2(adapter, input) {
69373
69590
  return adapter.get(input);
69374
69591
  }
69375
69592
  function executeListComments2(adapter, query2) {
69376
- if (query2 !== undefined && !isRecord4(query2))
69593
+ if (query2 !== undefined && !isRecord5(query2))
69377
69594
  throw new DocumentApiValidationError2("INVALID_INPUT", "comments.list query must be an object if provided.");
69378
69595
  return adapter.list(query2);
69379
69596
  }
@@ -69399,7 +69616,7 @@ function validateTargetLocator$1(input, operation) {
69399
69616
  });
69400
69617
  }
69401
69618
  function validateStyleApplyInput2(input) {
69402
- if (!isRecord4(input))
69619
+ if (!isRecord5(input))
69403
69620
  throw new DocumentApiValidationError2("INVALID_INPUT", "format.apply input must be a non-null object.");
69404
69621
  assertNoUnknownFields3(input, STYLE_APPLY_INPUT_ALLOWED_KEYS2, "format.apply");
69405
69622
  validateStoryLocator2(input.in, "in");
@@ -69435,7 +69652,7 @@ function normalizeInlineAliasValue2(key, value) {
69435
69652
  }
69436
69653
  function validateInlineAliasInput2(key, input) {
69437
69654
  const operation = `format.${key}`;
69438
- const candidate = isRecord4(input) ? input : {};
69655
+ const candidate = isRecord5(input) ? input : {};
69439
69656
  assertNoUnknownFields3(candidate, INLINE_ALIAS_INPUT_ALLOWED_KEYS2, operation);
69440
69657
  validateStoryLocator2(candidate.in, "in");
69441
69658
  validateTargetLocator$1(candidate, operation);
@@ -69468,19 +69685,19 @@ function executeGet2(adapter, input) {
69468
69685
  return adapter.get(input);
69469
69686
  }
69470
69687
  function executeGetText2(adapter, input) {
69471
- if (!isRecord4(input))
69688
+ if (!isRecord5(input))
69472
69689
  throw new DocumentApiValidationError2("INVALID_INPUT", "getText input must be a non-null object.");
69473
69690
  validateStoryLocator2(input.in, "in");
69474
69691
  return adapter.getText(input);
69475
69692
  }
69476
69693
  function executeGetMarkdown2(adapter, input) {
69477
- if (!isRecord4(input))
69694
+ if (!isRecord5(input))
69478
69695
  throw new DocumentApiValidationError2("INVALID_INPUT", "getMarkdown input must be a non-null object.");
69479
69696
  validateStoryLocator2(input.in, "in");
69480
69697
  return adapter.getMarkdown(input);
69481
69698
  }
69482
69699
  function executeGetHtml2(adapter, input) {
69483
- if (!isRecord4(input))
69700
+ if (!isRecord5(input))
69484
69701
  throw new DocumentApiValidationError2("INVALID_INPUT", "getHtml input must be a non-null object.");
69485
69702
  validateStoryLocator2(input.in, "in");
69486
69703
  return adapter.getHtml(input);
@@ -69495,7 +69712,7 @@ function executeClearContent2(adapter, input, options) {
69495
69712
  return adapter.clearContent(input, options);
69496
69713
  }
69497
69714
  function validateDeleteInput2(input) {
69498
- if (!isRecord4(input))
69715
+ if (!isRecord5(input))
69499
69716
  throw new DocumentApiValidationError2("INVALID_TARGET", "Delete input must be a non-null object.");
69500
69717
  assertNoUnknownFields3(input, DELETE_INPUT_ALLOWED_KEYS2, "delete");
69501
69718
  validateStoryLocator2(input.in, "in");
@@ -69550,7 +69767,7 @@ function validateDocumentFragment2(fragment2) {
69550
69767
  if (nodes.length === 0)
69551
69768
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", "Fragment must contain at least one node.");
69552
69769
  const first = nodes[0];
69553
- if (isRecord4(first) && typeof first.kind === "string") {
69770
+ if (isRecord5(first) && typeof first.kind === "string") {
69554
69771
  validateSDFragment2(fragment2);
69555
69772
  return;
69556
69773
  }
@@ -69576,7 +69793,7 @@ function validateContentNode2(node3, seenIds) {
69576
69793
  validateContentByKind2(rec, kind, seenIds);
69577
69794
  }
69578
69795
  function assertPlainObject2(node3) {
69579
- if (!isRecord4(node3))
69796
+ if (!isRecord5(node3))
69580
69797
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", "Each node in a fragment must be a plain object.");
69581
69798
  }
69582
69799
  function assertKindField2(rec) {
@@ -69598,7 +69815,7 @@ function validatePayloadKeyMatchesKind2(rec, kind) {
69598
69815
  return;
69599
69816
  if (!(kind in rec))
69600
69817
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `Node with kind "${kind}" must have a "${kind}" payload key.`, { kind });
69601
- if (rec[kind] !== undefined && !isRecord4(rec[kind]))
69818
+ if (rec[kind] !== undefined && !isRecord5(rec[kind]))
69602
69819
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `"${kind}" payload must be an object.`, { kind });
69603
69820
  }
69604
69821
  function collectAndCheckId2(rec, seenIds) {
@@ -69642,7 +69859,7 @@ function validateParagraphPayload2(rec, seenIds) {
69642
69859
  const payload = rec.paragraph;
69643
69860
  if (!payload)
69644
69861
  return;
69645
- if (payload.numbering != null && isRecord4(payload.numbering)) {
69862
+ if (payload.numbering != null && isRecord5(payload.numbering)) {
69646
69863
  const numbering = payload.numbering;
69647
69864
  if (typeof numbering.level === "number") {
69648
69865
  const level = numbering.level;
@@ -69652,7 +69869,7 @@ function validateParagraphPayload2(rec, seenIds) {
69652
69869
  }
69653
69870
  if (Array.isArray(payload.tabs)) {
69654
69871
  for (const tab of payload.tabs)
69655
- if (isRecord4(tab)) {
69872
+ if (isRecord5(tab)) {
69656
69873
  const pos = tab.position;
69657
69874
  if (typeof pos === "number" && pos <= 0)
69658
69875
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `paragraph.tabs position must be positive, got ${pos}.`, { field: "tabs.position" });
@@ -69722,7 +69939,7 @@ function validateListPayload2(rec, seenIds) {
69722
69939
  }
69723
69940
  }
69724
69941
  function rejectNumberingInsideListItem2(node3) {
69725
- if (!isRecord4(node3))
69942
+ if (!isRecord5(node3))
69726
69943
  return;
69727
69944
  const rec = node3;
69728
69945
  const kind = rec.kind;
@@ -69762,9 +69979,9 @@ function validateTocPayload2(rec) {
69762
69979
  const payload = rec.toc;
69763
69980
  if (!payload)
69764
69981
  return;
69765
- const sourceConfig = isRecord4(payload.sourceConfig) ? payload.sourceConfig : undefined;
69766
- const displayConfig = isRecord4(payload.displayConfig) ? payload.displayConfig : undefined;
69767
- if (sourceConfig && isRecord4(sourceConfig.outlineLevels)) {
69982
+ const sourceConfig = isRecord5(payload.sourceConfig) ? payload.sourceConfig : undefined;
69983
+ const displayConfig = isRecord5(payload.displayConfig) ? payload.displayConfig : undefined;
69984
+ if (sourceConfig && isRecord5(sourceConfig.outlineLevels)) {
69768
69985
  const range = sourceConfig.outlineLevels;
69769
69986
  const from4 = range.from;
69770
69987
  const to = range.to;
@@ -69775,7 +69992,7 @@ function validateTocPayload2(rec) {
69775
69992
  if (typeof from4 === "number" && typeof to === "number" && from4 > to)
69776
69993
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `TOC sourceConfig.outlineLevels.from (${from4}) must be <= to (${to}).`);
69777
69994
  }
69778
- if (sourceConfig && isRecord4(sourceConfig.tcFieldLevels)) {
69995
+ if (sourceConfig && isRecord5(sourceConfig.tcFieldLevels)) {
69779
69996
  const range = sourceConfig.tcFieldLevels;
69780
69997
  const from4 = range.from;
69781
69998
  const to = range.to;
@@ -69787,7 +70004,7 @@ function validateTocPayload2(rec) {
69787
70004
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `TOC sourceConfig.tcFieldLevels.from (${from4}) must be <= to (${to}).`);
69788
70005
  }
69789
70006
  if (displayConfig) {
69790
- if (displayConfig.includePageNumbers === false && isRecord4(displayConfig.omitPageNumberLevels))
70007
+ if (displayConfig.includePageNumbers === false && isRecord5(displayConfig.omitPageNumberLevels))
69791
70008
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", "TOC cannot set displayConfig.includePageNumbers=false and also provide displayConfig.omitPageNumberLevels.");
69792
70009
  if (displayConfig.tabLeader !== undefined && displayConfig.separator !== undefined)
69793
70010
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", "TOC cannot set both displayConfig.tabLeader and displayConfig.separator.");
@@ -69835,7 +70052,7 @@ function validateLegacyTopLevelNode2(node3) {
69835
70052
  validateLegacyNodeContent2(rec, type);
69836
70053
  }
69837
70054
  function assertLegacyNodeShape2(node3) {
69838
- if (!isRecord4(node3))
70055
+ if (!isRecord5(node3))
69839
70056
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", "Each node in a fragment must be a plain object.");
69840
70057
  const rec = node3;
69841
70058
  if (typeof rec.kind !== "string" && typeof rec.type !== "string")
@@ -69934,7 +70151,7 @@ function validateLegacyInlineArray2(content$2, parentType) {
69934
70151
  validateLegacyInlineContent2(item, parentType);
69935
70152
  }
69936
70153
  function validateLegacyInlineContent2(item, parentType) {
69937
- if (!isRecord4(item))
70154
+ if (!isRecord5(item))
69938
70155
  throw new DocumentApiValidationError2("INVALID_PAYLOAD", `Each inline content item in ${parentType} must be a plain object.`);
69939
70156
  const itemType = item.type;
69940
70157
  if (itemType !== "text" && itemType !== "image")
@@ -70009,7 +70226,7 @@ function isStructuralInsertInput2(input) {
70009
70226
  return "content" in input && input.content !== undefined;
70010
70227
  }
70011
70228
  function validateInsertInput2(input) {
70012
- if (!isRecord4(input))
70229
+ if (!isRecord5(input))
70013
70230
  throw new DocumentApiValidationError2("INVALID_TARGET", "Insert input must be a non-null object.");
70014
70231
  const hasValue = "value" in input && input.value !== undefined;
70015
70232
  const hasContent2 = "content" in input && input.content !== undefined;
@@ -70117,13 +70334,13 @@ function executeInsert2(selectionAdapter, writeAdapter, input, options) {
70117
70334
  }, options));
70118
70335
  }
70119
70336
  function validateListInput2(input, operationName) {
70120
- if (!isRecord4(input))
70337
+ if (!isRecord5(input))
70121
70338
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
70122
70339
  }
70123
70340
  function validateListItemAddress2(value, field, operationName) {
70124
70341
  if (value === undefined || value === null)
70125
70342
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a ${field}.`);
70126
- if (!isRecord4(value))
70343
+ if (!isRecord5(value))
70127
70344
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
70128
70345
  field,
70129
70346
  value
@@ -70149,7 +70366,7 @@ function validateListItemTarget2(input, operationName) {
70149
70366
  validateListItemAddress2(input.target, "target", operationName);
70150
70367
  }
70151
70368
  function validateBlockAddress2(value, field, operationName) {
70152
- if (!isRecord4(value))
70369
+ if (!isRecord5(value))
70153
70370
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
70154
70371
  field,
70155
70372
  value
@@ -70172,7 +70389,7 @@ function validateBlockAddress2(value, field, operationName) {
70172
70389
  });
70173
70390
  }
70174
70391
  function validateBlockAddressOrRange2(value, field, operationName) {
70175
- if (!isRecord4(value))
70392
+ if (!isRecord5(value))
70176
70393
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} ${field} must be an object.`, {
70177
70394
  field,
70178
70395
  value
@@ -70235,7 +70452,7 @@ function optionalLevelsArray2(value, field, operationName) {
70235
70452
  });
70236
70453
  }
70237
70454
  function validateListLevelTemplate2(entry, path2, operationName) {
70238
- if (!isRecord4(entry))
70455
+ if (!isRecord5(entry))
70239
70456
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2} must be an object.`, {
70240
70457
  field: path2,
70241
70458
  value: entry
@@ -70270,7 +70487,7 @@ function validateListLevelTemplate2(entry, path2, operationName) {
70270
70487
  if (e.tabStopAt !== undefined && e.tabStopAt !== null)
70271
70488
  optionalNumber2(e.tabStopAt, `${path2}.tabStopAt`, operationName);
70272
70489
  if (e.indents !== undefined) {
70273
- if (!isRecord4(e.indents))
70490
+ if (!isRecord5(e.indents))
70274
70491
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${path2}.indents must be an object.`, {
70275
70492
  field: `${path2}.indents`,
70276
70493
  value: e.indents
@@ -70282,7 +70499,7 @@ function validateListLevelTemplate2(entry, path2, operationName) {
70282
70499
  }
70283
70500
  }
70284
70501
  function validateListTemplate2(value, field, operationName) {
70285
- if (!isRecord4(value))
70502
+ if (!isRecord5(value))
70286
70503
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be an object.`, {
70287
70504
  field,
70288
70505
  value
@@ -70313,7 +70530,7 @@ function validateListsCreateFields2(raw) {
70313
70530
  });
70314
70531
  }
70315
70532
  if (raw.sequence !== undefined) {
70316
- if (!isRecord4(raw.sequence))
70533
+ if (!isRecord5(raw.sequence))
70317
70534
  throw new DocumentApiValidationError2("INVALID_INPUT", `${op} sequence must be an object.`, {
70318
70535
  field: "sequence",
70319
70536
  value: raw.sequence
@@ -70338,7 +70555,7 @@ function validateListsCreateFields2(raw) {
70338
70555
  }
70339
70556
  function executeListsList2(adapter, query2) {
70340
70557
  if (query2 !== undefined) {
70341
- if (!isRecord4(query2))
70558
+ if (!isRecord5(query2))
70342
70559
  throw new DocumentApiValidationError2("INVALID_INPUT", "lists.list query must be an object if provided.");
70343
70560
  const q$1 = query2;
70344
70561
  if (q$1.kind !== undefined)
@@ -70348,7 +70565,7 @@ function executeListsList2(adapter, query2) {
70348
70565
  optionalInteger2(q$1.offset, "offset", "lists.list");
70349
70566
  optionalInteger2(q$1.ordinal, "ordinal", "lists.list");
70350
70567
  if (q$1.within !== undefined) {
70351
- if (!isRecord4(q$1.within))
70568
+ if (!isRecord5(q$1.within))
70352
70569
  throw new DocumentApiValidationError2("INVALID_INPUT", "lists.list within must be an object.", {
70353
70570
  field: "within",
70354
70571
  value: q$1.within
@@ -70641,7 +70858,7 @@ function executeListsSetLevelStart2(adapter, input, options) {
70641
70858
  function executeListsSetLevelLayout2(adapter, input, options) {
70642
70859
  validateListItemTarget2(input, "lists.setLevelLayout");
70643
70860
  requireLevel2(input.level, "lists.setLevelLayout");
70644
- if (!isRecord4(input.layout))
70861
+ if (!isRecord5(input.layout))
70645
70862
  throw new DocumentApiValidationError2("INVALID_INPUT", "lists.setLevelLayout layout must be an object.", {
70646
70863
  field: "layout",
70647
70864
  value: input.layout
@@ -70679,7 +70896,7 @@ function validateTargetLocator3(input, operation) {
70679
70896
  });
70680
70897
  }
70681
70898
  function validateReplaceInput2(input) {
70682
- if (!isRecord4(input))
70899
+ if (!isRecord5(input))
70683
70900
  throw new DocumentApiValidationError2("INVALID_TARGET", "Replace input must be a non-null object.");
70684
70901
  const hasText = "text" in input && input.text !== undefined;
70685
70902
  const hasContent2 = "content" in input && input.content !== undefined;
@@ -70804,7 +71021,7 @@ function validateCreateSectionBreakInput2(input) {
70804
71021
  }
70805
71022
  }
70806
71023
  function executeCreateParagraph2(adapter, input, options) {
70807
- if (!isRecord4(input))
71024
+ if (!isRecord5(input))
70808
71025
  throw new DocumentApiValidationError2("INVALID_INPUT", "create.paragraph input must be a non-null object.");
70809
71026
  validateStoryLocator2(input.in, "in");
70810
71027
  const normalized = {
@@ -70814,7 +71031,7 @@ function executeCreateParagraph2(adapter, input, options) {
70814
71031
  return adapter.paragraph(normalized, normalizeMutationOptions2(options));
70815
71032
  }
70816
71033
  function executeCreateHeading2(adapter, input, options) {
70817
- if (!isRecord4(input))
71034
+ if (!isRecord5(input))
70818
71035
  throw new DocumentApiValidationError2("INVALID_INPUT", "create.heading input must be a non-null object.");
70819
71036
  validateStoryLocator2(input.in, "in");
70820
71037
  if (!isInteger3(input.level) || !VALID_HEADING_LEVELS2.has(input.level))
@@ -70831,7 +71048,7 @@ function executeCreateHeading2(adapter, input, options) {
70831
71048
  return adapter.heading(normalized, normalizeMutationOptions2(options));
70832
71049
  }
70833
71050
  function executeCreateTable2(adapter, input, options) {
70834
- if (!isRecord4(input))
71051
+ if (!isRecord5(input))
70835
71052
  throw new DocumentApiValidationError2("INVALID_INPUT", "create.table input must be a non-null object.");
70836
71053
  if (!isInteger3(input.rows) || input.rows < 1)
70837
71054
  throw new DocumentApiValidationError2("INVALID_INPUT", `create.table rows must be a positive integer, got ${JSON.stringify(input.rows)}.`, {
@@ -71645,17 +71862,17 @@ function assertBoolean$1(value, fieldName) {
71645
71862
  });
71646
71863
  }
71647
71864
  function assertSectionAddress$1(value, fieldName) {
71648
- if (!isRecord4(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
71865
+ if (!isRecord5(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
71649
71866
  throw new DocumentApiValidationError2("INVALID_TARGET", `${fieldName} must be a section address.`, {
71650
71867
  field: fieldName,
71651
71868
  value
71652
71869
  });
71653
71870
  }
71654
71871
  function assertHeaderFooterSlotTarget2(input, operationName) {
71655
- if (!isRecord4(input))
71872
+ if (!isRecord5(input))
71656
71873
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
71657
71874
  const target = input.target;
71658
- if (!isRecord4(target) || target.kind !== "headerFooterSlot")
71875
+ if (!isRecord5(target) || target.kind !== "headerFooterSlot")
71659
71876
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}.target must be a headerFooterSlot address.`, {
71660
71877
  field: `${operationName}.target`,
71661
71878
  value: target
@@ -71665,10 +71882,10 @@ function assertHeaderFooterSlotTarget2(input, operationName) {
71665
71882
  assertOneOf$1(target.variant, `${operationName}.target.variant`, HEADER_FOOTER_VARIANTS$1);
71666
71883
  }
71667
71884
  function assertHeaderFooterPartTarget2(input, operationName) {
71668
- if (!isRecord4(input))
71885
+ if (!isRecord5(input))
71669
71886
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
71670
71887
  const target = input.target;
71671
- if (!isRecord4(target) || target.kind !== "headerFooterPart")
71888
+ if (!isRecord5(target) || target.kind !== "headerFooterPart")
71672
71889
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName}.target must be a headerFooterPart address.`, {
71673
71890
  field: `${operationName}.target`,
71674
71891
  value: target
@@ -71720,14 +71937,14 @@ function executeHeaderFootersPartsDelete2(adapter, input, options) {
71720
71937
  return adapter.parts.delete(input, normalizeMutationOptions2(options));
71721
71938
  }
71722
71939
  function assertSectionAddress3(value, fieldName) {
71723
- if (!isRecord4(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
71940
+ if (!isRecord5(value) || value.kind !== "section" || typeof value.sectionId !== "string" || value.sectionId.length === 0)
71724
71941
  throw new DocumentApiValidationError2("INVALID_TARGET", `${fieldName} must be a section address.`, {
71725
71942
  field: fieldName,
71726
71943
  value
71727
71944
  });
71728
71945
  }
71729
71946
  function assertSectionTarget2(input, operationName) {
71730
- if (!isRecord4(input))
71947
+ if (!isRecord5(input))
71731
71948
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} input must be an object.`);
71732
71949
  assertSectionAddress3(input.target, `${operationName}.target`);
71733
71950
  }
@@ -71779,7 +71996,7 @@ function hasAnyDefined2(value, keys$1) {
71779
71996
  return keys$1.some((key) => value[key] !== undefined);
71780
71997
  }
71781
71998
  function assertObject2(value, fieldName) {
71782
- if (!isRecord4(value))
71999
+ if (!isRecord5(value))
71783
72000
  throw new DocumentApiValidationError2("INVALID_INPUT", `${fieldName} must be an object.`, {
71784
72001
  field: fieldName,
71785
72002
  value
@@ -72250,7 +72467,7 @@ function validateInsertionTarget2(target, operationName) {
72250
72467
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target.anchor must have nodeType 'paragraph' and a string nodeId.`, { target });
72251
72468
  }
72252
72469
  function validateTocInput2(input, operationName) {
72253
- if (!isRecord4(input))
72470
+ if (!isRecord5(input))
72254
72471
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
72255
72472
  }
72256
72473
  function executeTocList2(adapter, query2) {
@@ -72302,7 +72519,7 @@ function executeTocGetEntry2(adapter, input) {
72302
72519
  return adapter.getEntry(input);
72303
72520
  }
72304
72521
  function validateTocEditEntryPatch2(patch, operationName) {
72305
- if (!isRecord4(patch))
72522
+ if (!isRecord5(patch))
72306
72523
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} patch must be a non-null object.`, {
72307
72524
  field: "patch",
72308
72525
  value: patch
@@ -72340,16 +72557,16 @@ function executeTocEditEntry2(adapter, input, options) {
72340
72557
  return adapter.editEntry(input, normalizeMutationOptions2(options));
72341
72558
  }
72342
72559
  function isHyperlinkTarget2(value) {
72343
- if (!isRecord4(value))
72560
+ if (!isRecord5(value))
72344
72561
  return false;
72345
72562
  if (value.kind !== "inline" || value.nodeType !== "hyperlink")
72346
72563
  return false;
72347
72564
  const anchor = value.anchor;
72348
- if (!isRecord4(anchor))
72565
+ if (!isRecord5(anchor))
72349
72566
  return false;
72350
72567
  const start = anchor.start;
72351
72568
  const end = anchor.end;
72352
- if (!isRecord4(start) || !isRecord4(end))
72569
+ if (!isRecord5(start) || !isRecord5(end))
72353
72570
  return false;
72354
72571
  return typeof start.blockId === "string" && typeof start.offset === "number" && typeof end.blockId === "string" && typeof end.offset === "number";
72355
72572
  }
@@ -72360,7 +72577,7 @@ function validateHyperlinkTarget2(target, operationName) {
72360
72577
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} target must be a HyperlinkTarget with kind 'inline', nodeType 'hyperlink', and a valid anchor.`, { target });
72361
72578
  }
72362
72579
  function validateDestination2(destination, operationName) {
72363
- if (!isRecord4(destination))
72580
+ if (!isRecord5(destination))
72364
72581
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} requires a destination object.`);
72365
72582
  const hasHref = typeof destination.href === "string" && destination.href.length > 0;
72366
72583
  const hasAnchor = typeof destination.anchor === "string" && destination.anchor.length > 0;
@@ -72368,12 +72585,12 @@ function validateDestination2(destination, operationName) {
72368
72585
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} destination must have at least one of 'href' or 'anchor'.`);
72369
72586
  }
72370
72587
  function validateHyperlinkSpec2(link2, operationName) {
72371
- if (!isRecord4(link2))
72588
+ if (!isRecord5(link2))
72372
72589
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} requires a link specification object.`);
72373
72590
  validateDestination2(link2.destination, operationName);
72374
72591
  }
72375
72592
  function validatePatch2(patch, operationName) {
72376
- if (!isRecord4(patch))
72593
+ if (!isRecord5(patch))
72377
72594
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} requires a patch object.`);
72378
72595
  for (const key of Object.keys(patch))
72379
72596
  if (!PATCH_FIELDS2.has(key))
@@ -72425,11 +72642,11 @@ function executeHyperlinksRemove2(adapter, input, options) {
72425
72642
  return adapter.remove(input, normalizeMutationOptions2(options));
72426
72643
  }
72427
72644
  function validateCCInput2(input, operationName) {
72428
- if (!isRecord4(input))
72645
+ if (!isRecord5(input))
72429
72646
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} input must be a non-null object.`);
72430
72647
  }
72431
72648
  function validateCCTarget2(target, operationName) {
72432
- if (!isRecord4(target))
72649
+ if (!isRecord5(target))
72433
72650
  throw new DocumentApiValidationError2("INVALID_TARGET", `${operationName} requires a valid target with { kind, nodeType: 'sdt', nodeId }.`, {
72434
72651
  field: "target",
72435
72652
  value: target
@@ -72494,14 +72711,14 @@ function validateContentPayload2(input, operationName) {
72494
72711
  validateContentFormat2(input.format, "format", operationName);
72495
72712
  }
72496
72713
  function validateSymbol2(value, field, operationName) {
72497
- if (!isRecord4(value) || typeof value.font !== "string" || typeof value.char !== "string")
72714
+ if (!isRecord5(value) || typeof value.font !== "string" || typeof value.char !== "string")
72498
72715
  throw new DocumentApiValidationError2("INVALID_INPUT", `${operationName} ${field} must be { font: string, char: string }.`, {
72499
72716
  field,
72500
72717
  value
72501
72718
  });
72502
72719
  }
72503
72720
  function executeContentControlsList2(adapter, query2) {
72504
- if (query2 !== undefined && !isRecord4(query2))
72721
+ if (query2 !== undefined && !isRecord5(query2))
72505
72722
  throw new DocumentApiValidationError2("INVALID_INPUT", "contentControls.list query must be an object if provided.");
72506
72723
  return adapter.list(query2);
72507
72724
  }
@@ -72681,7 +72898,7 @@ function executeContentControlsPatchRawProperties2(adapter, input, options) {
72681
72898
  });
72682
72899
  for (let i$1 = 0;i$1 < input.patches.length; i$1++) {
72683
72900
  const patch = input.patches[i$1];
72684
- if (!isRecord4(patch))
72901
+ if (!isRecord5(patch))
72685
72902
  throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.patchRawProperties patches[${i$1}] must be an object.`, {
72686
72903
  field: `patches[${i$1}]`,
72687
72904
  value: patch
@@ -72812,7 +73029,7 @@ function executeContentControlsChoiceListSetItems2(adapter, input, options) {
72812
73029
  });
72813
73030
  for (let i$1 = 0;i$1 < input.items.length; i$1++) {
72814
73031
  const item = input.items[i$1];
72815
- if (!isRecord4(item) || typeof item.displayText !== "string" || typeof item.value !== "string")
73032
+ if (!isRecord5(item) || typeof item.displayText !== "string" || typeof item.value !== "string")
72816
73033
  throw new DocumentApiValidationError2("INVALID_INPUT", `contentControls.choiceList.setItems items[${i$1}] must be { displayText: string, value: string }.`, {
72817
73034
  field: `items[${i$1}]`,
72818
73035
  value: item
@@ -120500,7 +120717,7 @@ var isRegExp = (value) => {
120500
120717
  if (id2)
120501
120718
  return trackedChanges.filter(({ mark }) => mark.attrs.id === id2);
120502
120719
  return trackedChanges;
120503
- }, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES2, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.33.1", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
120720
+ }, DERIVED_ID_LENGTH = 24, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES2, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.34.0", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
120504
120721
  if (!runProps?.elements?.length || !state)
120505
120722
  return;
120506
120723
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -120534,7 +120751,7 @@ var isRegExp = (value) => {
120534
120751
  state.kern = kernNode.attributes["w:val"];
120535
120752
  }
120536
120753
  }, SuperConverter;
120537
- var init_SuperConverter_CzwJ7ds9_es = __esm(() => {
120754
+ var init_SuperConverter_SvCYq2KK_es = __esm(() => {
120538
120755
  init_rolldown_runtime_Bg48TavK_es();
120539
120756
  init_jszip_C49i9kUs_es();
120540
120757
  init_xml_js_CqGKpaft_es();
@@ -158711,7 +158928,7 @@ var init_SuperConverter_CzwJ7ds9_es = __esm(() => {
158711
158928
  };
158712
158929
  });
158713
158930
 
158714
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-BQTnHkb4.es.js
158931
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CAjlOJ3Q.es.js
158715
158932
  function parseSizeUnit(val = "0") {
158716
158933
  const length3 = val.toString() || "0";
158717
158934
  const value = Number.parseFloat(length3);
@@ -163479,7 +163696,7 @@ function resolveKind(node3) {
163479
163696
  function resolvePayload(node3, kind) {
163480
163697
  return node3[kind] ?? node3;
163481
163698
  }
163482
- function isRecord5(value) {
163699
+ function isRecord6(value) {
163483
163700
  return value !== null && typeof value === "object" && !Array.isArray(value);
163484
163701
  }
163485
163702
  function materializeFragment(schema, fragment2, existingDocIds = /* @__PURE__ */ new Set, operation = "insert", options) {
@@ -163556,7 +163773,7 @@ function materializeTable(schema, node3, seenIds, existingDocIds, operation, opt
163556
163773
  paraId: v4_default()
163557
163774
  };
163558
163775
  const styleRef = payload.styleRef ?? payload.style;
163559
- const tableProperties = isRecord5(payload.tableProperties) ? { ...payload.tableProperties } : {};
163776
+ const tableProperties = isRecord6(payload.tableProperties) ? { ...payload.tableProperties } : {};
163560
163777
  if (styleRef) {
163561
163778
  attrs.tableStyleId = styleRef;
163562
163779
  tableProperties.tableStyleId = styleRef;
@@ -163574,7 +163791,7 @@ function materializeTable(schema, node3, seenIds, existingDocIds, operation, opt
163574
163791
  attrs.justification = justification;
163575
163792
  tableProperties.justification = justification;
163576
163793
  }
163577
- if (payload.props?.borders && isRecord5(payload.props.borders)) {
163794
+ if (payload.props?.borders && isRecord6(payload.props.borders)) {
163578
163795
  attrs.borders = payload.props.borders;
163579
163796
  tableProperties.borders = payload.props.borders;
163580
163797
  }
@@ -163620,7 +163837,7 @@ function normalizeTableGridColumns(columns) {
163620
163837
  if (!Array.isArray(columns) || columns.length === 0)
163621
163838
  return;
163622
163839
  const normalized = columns.map((column) => {
163623
- const raw = typeof column === "number" ? column : isRecord5(column) && typeof column.width === "number" ? column.width : undefined;
163840
+ const raw = typeof column === "number" ? column : isRecord6(column) && typeof column.width === "number" ? column.width : undefined;
163624
163841
  if (typeof raw !== "number" || !Number.isFinite(raw))
163625
163842
  return null;
163626
163843
  return { col: Math.round(raw) };
@@ -163628,7 +163845,7 @@ function normalizeTableGridColumns(columns) {
163628
163845
  return normalized.length > 0 ? normalized : undefined;
163629
163846
  }
163630
163847
  function mapSDTableWidthToMeasurement(width) {
163631
- if (isRecord5(width)) {
163848
+ if (isRecord6(width)) {
163632
163849
  if ("kind" in width && typeof width.kind === "string")
163633
163850
  switch (width.kind) {
163634
163851
  case "auto":
@@ -163682,15 +163899,15 @@ function mapSDTableAlignmentToJustification(value) {
163682
163899
  function resolveNeedsTableStyleNormalization(node3, payload) {
163683
163900
  if (payload.needsTableStyleNormalization === true)
163684
163901
  return true;
163685
- if (!isRecord5(node3))
163902
+ if (!isRecord6(node3))
163686
163903
  return false;
163687
163904
  const ext = node3.ext;
163688
- if (!isRecord5(ext))
163905
+ if (!isRecord6(ext))
163689
163906
  return false;
163690
163907
  if (ext.needsTableStyleNormalization === true)
163691
163908
  return true;
163692
163909
  const superdocExt = ext.superdoc;
163693
- if (isRecord5(superdocExt) && superdocExt.needsTableStyleNormalization === true)
163910
+ if (isRecord6(superdocExt) && superdocExt.needsTableStyleNormalization === true)
163694
163911
  return true;
163695
163912
  return false;
163696
163913
  }
@@ -168721,8 +168938,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
168721
168938
  }
168722
168939
  };
168723
168940
  };
168724
- var init_create_headless_toolbar_BQTnHkb4_es = __esm(() => {
168725
- init_SuperConverter_CzwJ7ds9_es();
168941
+ var init_create_headless_toolbar_CAjlOJ3Q_es = __esm(() => {
168942
+ init_SuperConverter_SvCYq2KK_es();
168726
168943
  init_uuid_qzgm05fK_es();
168727
168944
  init_constants_DrU4EASo_es();
168728
168945
  init_dist_B8HfvhaK_es();
@@ -183513,14 +183730,14 @@ var require_lib2 = __commonJS((exports) => {
183513
183730
  var mixinPluginNames = Object.keys(mixinPlugins);
183514
183731
 
183515
183732
  class ExpressionParser extends LValParser {
183516
- checkProto(prop, isRecord6, sawProto, refExpressionErrors) {
183733
+ checkProto(prop, isRecord7, sawProto, refExpressionErrors) {
183517
183734
  if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
183518
183735
  return sawProto;
183519
183736
  }
183520
183737
  const key2 = prop.key;
183521
183738
  const name = key2.type === "Identifier" ? key2.name : key2.value;
183522
183739
  if (name === "__proto__") {
183523
- if (isRecord6) {
183740
+ if (isRecord7) {
183524
183741
  this.raise(Errors.RecordNoProto, key2);
183525
183742
  return true;
183526
183743
  }
@@ -184583,8 +184800,8 @@ var require_lib2 = __commonJS((exports) => {
184583
184800
  parseTemplateSubstitution() {
184584
184801
  return this.parseExpression();
184585
184802
  }
184586
- parseObjectLike(close2, isPattern, isRecord6, refExpressionErrors) {
184587
- if (isRecord6) {
184803
+ parseObjectLike(close2, isPattern, isRecord7, refExpressionErrors) {
184804
+ if (isRecord7) {
184588
184805
  this.expectPlugin("recordAndTuple");
184589
184806
  }
184590
184807
  const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
@@ -184609,9 +184826,9 @@ var require_lib2 = __commonJS((exports) => {
184609
184826
  prop = this.parseBindingProperty();
184610
184827
  } else {
184611
184828
  prop = this.parsePropertyDefinition(refExpressionErrors);
184612
- sawProto = this.checkProto(prop, isRecord6, sawProto, refExpressionErrors);
184829
+ sawProto = this.checkProto(prop, isRecord7, sawProto, refExpressionErrors);
184613
184830
  }
184614
- if (isRecord6 && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
184831
+ if (isRecord7 && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
184615
184832
  this.raise(Errors.InvalidRecordProperty, prop);
184616
184833
  }
184617
184834
  if (prop.shorthand) {
@@ -184624,7 +184841,7 @@ var require_lib2 = __commonJS((exports) => {
184624
184841
  let type = "ObjectExpression";
184625
184842
  if (isPattern) {
184626
184843
  type = "ObjectPattern";
184627
- } else if (isRecord6) {
184844
+ } else if (isRecord7) {
184628
184845
  type = "RecordExpression";
184629
184846
  }
184630
184847
  return this.finishNode(node3, type);
@@ -217927,7 +218144,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
217927
218144
  init_remark_gfm_BhnWr3yf_es();
217928
218145
  });
217929
218146
 
217930
- // ../../packages/superdoc/dist/chunks/src-CFBkvkMY.es.js
218147
+ // ../../packages/superdoc/dist/chunks/src-C5nJLlXh.es.js
217931
218148
  function deleteProps(obj, propOrProps) {
217932
218149
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
217933
218150
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -218710,7 +218927,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
218710
218927
  }
218711
218928
  function getSuperdocVersion() {
218712
218929
  try {
218713
- return "1.33.1";
218930
+ return "1.34.0";
218714
218931
  } catch {
218715
218932
  return "unknown";
218716
218933
  }
@@ -231407,8 +231624,8 @@ function projectTable(pmNode) {
231407
231624
  result.table.columns = columns;
231408
231625
  }
231409
231626
  if (pmAttrs?.needsTableStyleNormalization === true) {
231410
- const ext = isRecord6(result.ext) ? { ...result.ext } : {};
231411
- const superdocExt = isRecord6(ext.superdoc) ? { ...ext.superdoc } : {};
231627
+ const ext = isRecord7(result.ext) ? { ...result.ext } : {};
231628
+ const superdocExt = isRecord7(ext.superdoc) ? { ...ext.superdoc } : {};
231412
231629
  superdocExt.needsTableStyleNormalization = true;
231413
231630
  result.ext = {
231414
231631
  ...ext,
@@ -231880,7 +232097,7 @@ function resolveSdtNodeId(pmNode) {
231880
232097
  return String(id2);
231881
232098
  return typeof id2 === "string" && id2.length > 0 ? id2 : undefined;
231882
232099
  }
231883
- function isRecord6(value) {
232100
+ function isRecord7(value) {
231884
232101
  return value !== null && typeof value === "object" && !Array.isArray(value);
231885
232102
  }
231886
232103
  function extractTableProps(attrs, pmAttrs) {
@@ -231923,7 +232140,7 @@ function mapTableAlignmentToSD(value) {
231923
232140
  }
231924
232141
  }
231925
232142
  function extractTableWidth(width) {
231926
- if (!isRecord6(width))
232143
+ if (!isRecord7(width))
231927
232144
  return;
231928
232145
  const type = typeof width.type === "string" ? width.type.toLowerCase() : undefined;
231929
232146
  const value = typeof width.value === "number" ? width.value : typeof width.width === "number" ? width.width : undefined;
@@ -289317,7 +289534,7 @@ var Node$13 = class Node$14 {
289317
289534
  domAvailabilityCache = false;
289318
289535
  return false;
289319
289536
  }
289320
- }, summaryVersion = "1.33.1", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
289537
+ }, summaryVersion = "1.34.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
289321
289538
  const container = document.createElement("div");
289322
289539
  container.innerHTML = html3;
289323
289540
  const result = [];
@@ -290492,7 +290709,7 @@ var Node$13 = class Node$14 {
290492
290709
  return () => {};
290493
290710
  const handle3 = setInterval(callback, intervalMs);
290494
290711
  return () => clearInterval(handle3);
290495
- }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.33.1", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension3) => {
290712
+ }, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.34.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, cloneExtensionInstance = (extension3) => {
290496
290713
  const extensionLike = extension3;
290497
290714
  const config2 = extensionLike?.config;
290498
290715
  const ExtensionCtor = extensionLike?.constructor;
@@ -306314,13 +306531,13 @@ menclose::after {
306314
306531
  return;
306315
306532
  console.log(...args$1);
306316
306533
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
306317
- var init_src_CFBkvkMY_es = __esm(() => {
306534
+ var init_src_C5nJLlXh_es = __esm(() => {
306318
306535
  init_rolldown_runtime_Bg48TavK_es();
306319
- init_SuperConverter_CzwJ7ds9_es();
306536
+ init_SuperConverter_SvCYq2KK_es();
306320
306537
  init_jszip_C49i9kUs_es();
306321
306538
  init_xml_js_CqGKpaft_es();
306322
306539
  init_uuid_qzgm05fK_es();
306323
- init_create_headless_toolbar_BQTnHkb4_es();
306540
+ init_create_headless_toolbar_CAjlOJ3Q_es();
306324
306541
  init_constants_DrU4EASo_es();
306325
306542
  init_dist_B8HfvhaK_es();
306326
306543
  init_unified_Dsuw2be5_es();
@@ -344036,11 +344253,11 @@ function print() { __p += __j.call(arguments, '') }
344036
344253
  ];
344037
344254
  });
344038
344255
 
344039
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BNIXtF7U.es.js
344256
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-Bgxw65Gk.es.js
344040
344257
  var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
344041
- var init_create_super_doc_ui_BNIXtF7U_es = __esm(() => {
344042
- init_SuperConverter_CzwJ7ds9_es();
344043
- init_create_headless_toolbar_BQTnHkb4_es();
344258
+ var init_create_super_doc_ui_Bgxw65Gk_es = __esm(() => {
344259
+ init_SuperConverter_SvCYq2KK_es();
344260
+ init_create_headless_toolbar_CAjlOJ3Q_es();
344044
344261
  MOD_ALIASES = new Set([
344045
344262
  "Mod",
344046
344263
  "Meta",
@@ -344082,16 +344299,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
344082
344299
 
344083
344300
  // ../../packages/superdoc/dist/super-editor.es.js
344084
344301
  var init_super_editor_es = __esm(() => {
344085
- init_src_CFBkvkMY_es();
344086
- init_SuperConverter_CzwJ7ds9_es();
344302
+ init_src_C5nJLlXh_es();
344303
+ init_SuperConverter_SvCYq2KK_es();
344087
344304
  init_jszip_C49i9kUs_es();
344088
344305
  init_xml_js_CqGKpaft_es();
344089
- init_create_headless_toolbar_BQTnHkb4_es();
344306
+ init_create_headless_toolbar_CAjlOJ3Q_es();
344090
344307
  init_constants_DrU4EASo_es();
344091
344308
  init_dist_B8HfvhaK_es();
344092
344309
  init_unified_Dsuw2be5_es();
344093
344310
  init_DocxZipper_CZMPWpOp_es();
344094
- init_create_super_doc_ui_BNIXtF7U_es();
344311
+ init_create_super_doc_ui_Bgxw65Gk_es();
344095
344312
  init_ui_C5PAS9hY_es();
344096
344313
  init_eventemitter3_BnGqBE_Q_es();
344097
344314
  init_errors_CNaD6vcg_es();
@@ -393845,13 +394062,13 @@ var init_special_handlers = __esm(() => {
393845
394062
  });
393846
394063
 
393847
394064
  // src/lib/invoke-input.ts
393848
- function isRecord7(value2) {
394065
+ function isRecord8(value2) {
393849
394066
  return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
393850
394067
  }
393851
394068
  function isTextAddressLike(value2) {
393852
- if (!isRecord7(value2) || value2.kind !== "text" || typeof value2.blockId !== "string")
394069
+ if (!isRecord8(value2) || value2.kind !== "text" || typeof value2.blockId !== "string")
393853
394070
  return false;
393854
- if (!isRecord7(value2.range))
394071
+ if (!isRecord8(value2.range))
393855
394072
  return false;
393856
394073
  return typeof value2.range.start === "number" && typeof value2.range.end === "number";
393857
394074
  }
@@ -393879,7 +394096,7 @@ function assertLegacySelectionTargetSupported(operationId, target2) {
393879
394096
  }
393880
394097
  }
393881
394098
  function normalizeFlatTargetFlags(operationId, apiInput) {
393882
- if (!isRecord7(apiInput))
394099
+ if (!isRecord8(apiInput))
393883
394100
  return apiInput;
393884
394101
  if (apiInput.target !== undefined) {
393885
394102
  if (SELECTION_TARGET_OPERATIONS.has(operationId) && isTextAddressLike(apiInput.target)) {
@@ -397320,11 +397537,11 @@ var init_close = __esm(() => {
397320
397537
  });
397321
397538
 
397322
397539
  // src/commands/insert-inline-special.ts
397323
- function isRecord8(value2) {
397540
+ function isRecord9(value2) {
397324
397541
  return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
397325
397542
  }
397326
397543
  function isSelectionTarget3(value2) {
397327
- return isRecord8(value2) && value2.kind === "selection" && isRecord8(value2.start) && isRecord8(value2.end);
397544
+ return isRecord9(value2) && value2.kind === "selection" && isRecord9(value2.start) && isRecord9(value2.end);
397328
397545
  }
397329
397546
  function isCollapsedTextSelectionTarget(target2) {
397330
397547
  return target2.start.kind === "text" && target2.end.kind === "text" && target2.start.blockId === target2.end.blockId && target2.start.offset === target2.end.offset;
@@ -397335,7 +397552,7 @@ function buildPrettyOutput3(kind2, revision, outputPath) {
397335
397552
  }
397336
397553
  async function resolveInsertionPoint(editor, input2, kind2) {
397337
397554
  const apiInput = extractInvokeInput("insert", input2);
397338
- if (!isRecord8(apiInput)) {
397555
+ if (!isRecord9(apiInput)) {
397339
397556
  throw new CliError("INVALID_ARGUMENT", `insert ${COMMAND_BY_KIND[kind2].label}: invalid target input.`);
397340
397557
  }
397341
397558
  const ref4 = typeof apiInput.ref === "string" ? apiInput.ref : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -24,21 +24,21 @@
24
24
  "@types/node": "22.19.2",
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
+ "@superdoc/document-api": "0.0.1",
27
28
  "@superdoc/pm-adapter": "0.0.0",
28
- "superdoc": "1.33.1",
29
29
  "@superdoc/super-editor": "0.0.1",
30
- "@superdoc/document-api": "0.0.1"
30
+ "superdoc": "1.34.0"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.11.0",
38
- "@superdoc-dev/cli-darwin-x64": "0.11.0",
39
- "@superdoc-dev/cli-linux-x64": "0.11.0",
40
- "@superdoc-dev/cli-linux-arm64": "0.11.0",
41
- "@superdoc-dev/cli-windows-x64": "0.11.0"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.11.1",
38
+ "@superdoc-dev/cli-darwin-x64": "0.11.1",
39
+ "@superdoc-dev/cli-linux-x64": "0.11.1",
40
+ "@superdoc-dev/cli-linux-arm64": "0.11.1",
41
+ "@superdoc-dev/cli-windows-x64": "0.11.1"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",