@superdoc-dev/cli 0.16.0 → 0.17.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +931 -295
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -59533,90 +59533,70 @@ Actual: ` + parser.attribValue);
59533
59533
  });
59534
59534
  });
59535
59535
 
59536
- // ../../packages/superdoc/dist/chunks/uuid-qzgm05fK.es.js
59537
- function rng() {
59538
- if (!getRandomValues3) {
59539
- getRandomValues3 = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
59540
- if (!getRandomValues3)
59541
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
59542
- }
59543
- return getRandomValues3(rnds8);
59544
- }
59536
+ // ../../packages/superdoc/dist/chunks/uuid-B2wVPhPi.es.js
59545
59537
  function validate(uuid) {
59546
59538
  return typeof uuid === "string" && regex_default.test(uuid);
59547
59539
  }
59548
- function unsafeStringify(arr, offset = 0) {
59549
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
59550
- }
59551
59540
  function parse(uuid) {
59552
59541
  if (!validate_default(uuid))
59553
59542
  throw TypeError("Invalid UUID");
59554
59543
  let v;
59555
- const arr = new Uint8Array(16);
59556
- arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
59557
- arr[1] = v >>> 16 & 255;
59558
- arr[2] = v >>> 8 & 255;
59559
- arr[3] = v & 255;
59560
- arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
59561
- arr[5] = v & 255;
59562
- arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
59563
- arr[7] = v & 255;
59564
- arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
59565
- arr[9] = v & 255;
59566
- arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
59567
- arr[11] = v / 4294967296 & 255;
59568
- arr[12] = v >>> 24 & 255;
59569
- arr[13] = v >>> 16 & 255;
59570
- arr[14] = v >>> 8 & 255;
59571
- arr[15] = v & 255;
59572
- return arr;
59544
+ return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
59545
+ }
59546
+ function unsafeStringify(arr, offset = 0) {
59547
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
59548
+ }
59549
+ function rng() {
59550
+ if (!getRandomValues3) {
59551
+ if (typeof crypto === "undefined" || !crypto.getRandomValues)
59552
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
59553
+ getRandomValues3 = crypto.getRandomValues.bind(crypto);
59554
+ }
59555
+ return getRandomValues3(rnds8);
59573
59556
  }
59574
59557
  function stringToBytes(str) {
59575
59558
  str = unescape(encodeURIComponent(str));
59576
- const bytes = [];
59559
+ const bytes = new Uint8Array(str.length);
59577
59560
  for (let i2 = 0;i2 < str.length; ++i2)
59578
- bytes.push(str.charCodeAt(i2));
59561
+ bytes[i2] = str.charCodeAt(i2);
59579
59562
  return bytes;
59580
59563
  }
59581
- function v35(name, version3, hashfunc) {
59582
- function generateUUID(value, namespace, buf, offset) {
59583
- var _namespace;
59584
- if (typeof value === "string")
59585
- value = stringToBytes(value);
59586
- if (typeof namespace === "string")
59587
- namespace = parse_default(namespace);
59588
- if (((_namespace = namespace) === null || _namespace === undefined ? undefined : _namespace.length) !== 16)
59589
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
59590
- let bytes = new Uint8Array(16 + value.length);
59591
- bytes.set(namespace);
59592
- bytes.set(value, namespace.length);
59593
- bytes = hashfunc(bytes);
59594
- bytes[6] = bytes[6] & 15 | version3;
59595
- bytes[8] = bytes[8] & 63 | 128;
59596
- if (buf) {
59597
- offset = offset || 0;
59598
- for (let i2 = 0;i2 < 16; ++i2)
59599
- buf[offset + i2] = bytes[i2];
59600
- return buf;
59601
- }
59602
- return unsafeStringify(bytes);
59564
+ function v35(version3, hash, value, namespace, buf, offset) {
59565
+ const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
59566
+ const namespaceBytes = typeof namespace === "string" ? parse_default(namespace) : namespace;
59567
+ if (typeof namespace === "string")
59568
+ namespace = parse_default(namespace);
59569
+ if (namespace?.length !== 16)
59570
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
59571
+ let bytes = new Uint8Array(16 + valueBytes.length);
59572
+ bytes.set(namespaceBytes);
59573
+ bytes.set(valueBytes, namespaceBytes.length);
59574
+ bytes = hash(bytes);
59575
+ bytes[6] = bytes[6] & 15 | version3;
59576
+ bytes[8] = bytes[8] & 63 | 128;
59577
+ if (buf) {
59578
+ offset = offset || 0;
59579
+ if (offset < 0 || offset + 16 > buf.length)
59580
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
59581
+ for (let i2 = 0;i2 < 16; ++i2)
59582
+ buf[offset + i2] = bytes[i2];
59583
+ return buf;
59603
59584
  }
59604
- try {
59605
- generateUUID.name = name;
59606
- } catch (err) {}
59607
- generateUUID.DNS = DNS;
59608
- generateUUID.URL = URL2;
59609
- return generateUUID;
59585
+ return unsafeStringify(bytes);
59610
59586
  }
59611
59587
  function v4(options, buf, offset) {
59612
59588
  if (native_default.randomUUID && !buf && !options)
59613
59589
  return native_default.randomUUID();
59614
59590
  options = options || {};
59615
- const rnds = options.random || (options.rng || rng)();
59591
+ const rnds = options.random ?? options.rng?.() ?? rng();
59592
+ if (rnds.length < 16)
59593
+ throw new Error("Random bytes length must be >= 16");
59616
59594
  rnds[6] = rnds[6] & 15 | 64;
59617
59595
  rnds[8] = rnds[8] & 63 | 128;
59618
59596
  if (buf) {
59619
59597
  offset = offset || 0;
59598
+ if (offset < 0 || offset + 16 > buf.length)
59599
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
59620
59600
  for (let i2 = 0;i2 < 16; ++i2)
59621
59601
  buf[offset + i2] = rnds[i2];
59622
59602
  return buf;
@@ -59652,14 +59632,10 @@ function sha1(bytes) {
59652
59632
  271733878,
59653
59633
  3285377520
59654
59634
  ];
59655
- if (typeof bytes === "string") {
59656
- const msg = unescape(encodeURIComponent(bytes));
59657
- bytes = [];
59658
- for (let i2 = 0;i2 < msg.length; ++i2)
59659
- bytes.push(msg.charCodeAt(i2));
59660
- } else if (!Array.isArray(bytes))
59661
- bytes = Array.prototype.slice.call(bytes);
59662
- bytes.push(128);
59635
+ const newBytes = new Uint8Array(bytes.length + 1);
59636
+ newBytes.set(bytes);
59637
+ newBytes[bytes.length] = 128;
59638
+ bytes = newBytes;
59663
59639
  const l = bytes.length / 4 + 2;
59664
59640
  const N = Math.ceil(l / 16);
59665
59641
  const M = new Array(N);
@@ -59698,41 +59674,26 @@ function sha1(bytes) {
59698
59674
  H[3] = H[3] + d >>> 0;
59699
59675
  H[4] = H[4] + e >>> 0;
59700
59676
  }
59701
- return [
59702
- H[0] >> 24 & 255,
59703
- H[0] >> 16 & 255,
59704
- H[0] >> 8 & 255,
59705
- H[0] & 255,
59706
- H[1] >> 24 & 255,
59707
- H[1] >> 16 & 255,
59708
- H[1] >> 8 & 255,
59709
- H[1] & 255,
59710
- H[2] >> 24 & 255,
59711
- H[2] >> 16 & 255,
59712
- H[2] >> 8 & 255,
59713
- H[2] & 255,
59714
- H[3] >> 24 & 255,
59715
- H[3] >> 16 & 255,
59716
- H[3] >> 8 & 255,
59717
- H[3] & 255,
59718
- H[4] >> 24 & 255,
59719
- H[4] >> 16 & 255,
59720
- H[4] >> 8 & 255,
59721
- H[4] & 255
59722
- ];
59677
+ return Uint8Array.of(H[0] >> 24, H[0] >> 16, H[0] >> 8, H[0], H[1] >> 24, H[1] >> 16, H[1] >> 8, H[1], H[2] >> 24, H[2] >> 16, H[2] >> 8, H[2], H[3] >> 24, H[3] >> 16, H[3] >> 8, H[3], H[4] >> 24, H[4] >> 16, H[4] >> 8, H[4]);
59723
59678
  }
59724
- var getRandomValues3, rnds8, regex_default, validate_default, byteToHex, parse_default, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, v5_default;
59725
- var init_uuid_qzgm05fK_es = __esm(() => {
59726
- rnds8 = new Uint8Array(16);
59727
- regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
59679
+ function v5(value, namespace, buf, offset) {
59680
+ return v35(80, sha1_default, value, namespace, buf, offset);
59681
+ }
59682
+ var regex_default, validate_default, parse_default, byteToHex, getRandomValues3, rnds8, DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8", native_default, v4_default, sha1_default, v5_default;
59683
+ var init_uuid_B2wVPhPi_es = __esm(() => {
59684
+ regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
59728
59685
  validate_default = validate;
59686
+ parse_default = parse;
59729
59687
  byteToHex = [];
59730
59688
  for (let i2 = 0;i2 < 256; ++i2)
59731
59689
  byteToHex.push((i2 + 256).toString(16).slice(1));
59732
- parse_default = parse;
59690
+ rnds8 = new Uint8Array(16);
59733
59691
  native_default = { randomUUID: typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
59734
59692
  v4_default = v4;
59735
- v5_default = v35("v5", 80, sha1);
59693
+ sha1_default = sha1;
59694
+ v5.DNS = DNS;
59695
+ v5.URL = URL2;
59696
+ v5_default = v5;
59736
59697
  });
59737
59698
 
59738
59699
  // ../../packages/superdoc/dist/chunks/constants-D9qj59G2.es.js
@@ -68366,7 +68327,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
68366
68327
  emptyOptions2 = {};
68367
68328
  });
68368
68329
 
68369
- // ../../packages/superdoc/dist/chunks/SuperConverter-DOoAJ6Zk.es.js
68330
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CfRQprW6.es.js
68370
68331
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
68371
68332
  const fieldValue = extension$1.config[field];
68372
68333
  if (typeof fieldValue === "function")
@@ -77490,9 +77451,9 @@ function decode$66(params3) {
77490
77451
  });
77491
77452
  if (params3.isFinalDoc)
77492
77453
  return null;
77493
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
77494
- if (textNode)
77495
- textNode.name = "w:delText";
77454
+ (translatedTextNode.elements || []).filter((n) => n.name === "w:t").forEach((n) => {
77455
+ n.name = "w:delText";
77456
+ });
77496
77457
  return {
77497
77458
  name: "w:del",
77498
77459
  attributes: {
@@ -98593,14 +98554,37 @@ function getTextNodeForExport(text$2, marks, params3) {
98593
98554
  wordIdAllocator: params3?.converter?.wordIdAllocator || null,
98594
98555
  partPath: resolveExportPartPath(params3)
98595
98556
  });
98596
- textNodes.push({
98597
- name: "w:t",
98598
- elements: [{
98599
- text: text$2,
98600
- type: "text"
98601
- }],
98602
- attributes: nodeAttrs
98603
- });
98557
+ const textValue = typeof text$2 === "string" ? text$2 : "";
98558
+ const normalizedText = textValue.includes("\r") ? textValue.replace(/\r\n?/g, `
98559
+ `) : textValue;
98560
+ if (normalizedText.includes(`
98561
+ `)) {
98562
+ const segments = normalizedText.split(`
98563
+ `);
98564
+ segments.forEach((segment, index2) => {
98565
+ if (segment.length > 0) {
98566
+ const segmentNeedsSpace = /^\s|\s$/.test(segment);
98567
+ textNodes.push({
98568
+ name: "w:t",
98569
+ elements: [{
98570
+ text: segment,
98571
+ type: "text"
98572
+ }],
98573
+ attributes: segmentNeedsSpace ? { "xml:space": "preserve" } : null
98574
+ });
98575
+ }
98576
+ if (index2 < segments.length - 1)
98577
+ textNodes.push({ name: "w:br" });
98578
+ });
98579
+ } else
98580
+ textNodes.push({
98581
+ name: "w:t",
98582
+ elements: [{
98583
+ text: normalizedText,
98584
+ type: "text"
98585
+ }],
98586
+ attributes: nodeAttrs
98587
+ });
98604
98588
  if (params3?.editor?.extensionService?.extensions) {
98605
98589
  const customMarks = params3.editor.extensionService.extensions.filter((extension$1) => extension$1.isExternal === true);
98606
98590
  normalizedMarks.forEach((mark) => {
@@ -102483,49 +102467,85 @@ function translateMark(mark) {
102483
102467
  function isSettled(status) {
102484
102468
  return SETTLED_STATUSES.includes(status);
102485
102469
  }
102486
- function normalizeFamilyKey$1(family$1) {
102487
- return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
102470
+ function normalizeFamilyName(name) {
102471
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
102488
102472
  }
102489
- function sortPairs(pairs) {
102490
- return pairs.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
102491
- }
102492
- function deriveBundledSubstitutes() {
102493
- const substitutes = {};
102494
- for (const row of SUBSTITUTION_EVIDENCE)
102495
- if (row.policyAction === "substitute" && row.physicalFamily)
102496
- substitutes[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
102497
- return Object.freeze(substitutes);
102498
- }
102499
- function deriveCategoryFallbacks() {
102500
- const fallbacks = {};
102501
- for (const row of SUBSTITUTION_EVIDENCE)
102502
- if (row.policyAction === "category_fallback" && row.physicalFamily)
102503
- fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = row.physicalFamily;
102504
- return Object.freeze(fallbacks);
102505
- }
102506
- function stripFamilyQuotes(family$1) {
102507
- return family$1.trim().replace(/^["']|["']$/g, "");
102473
+ function buildFallback(row, physicalFamily, verdict, faceSlot) {
102474
+ const glyphExceptions = faceSlot ? row.glyphExceptions?.filter((g2) => g2.slot === faceSlot) : row.glyphExceptions ? [...row.glyphExceptions] : undefined;
102475
+ return {
102476
+ substituteFamily: physicalFamily,
102477
+ policyAction: row.policyAction,
102478
+ verdict,
102479
+ lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(verdict),
102480
+ faces: row.faces,
102481
+ evidenceId: row.evidenceId,
102482
+ ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
102483
+ };
102508
102484
  }
102509
- function splitStack(cssFontFamily) {
102510
- return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
102485
+ function decideRow(row, canRenderFamily$1) {
102486
+ const { policyAction, physicalFamily, verdict, evidenceId } = row;
102487
+ if (policyAction === "preserve_only")
102488
+ return {
102489
+ kind: "preserve_only",
102490
+ evidenceId
102491
+ };
102492
+ if (policyAction === "customer_supplied")
102493
+ return {
102494
+ kind: "customer_supplied",
102495
+ evidenceId
102496
+ };
102497
+ if (physicalFamily === null)
102498
+ return {
102499
+ kind: "no_recommended_fallback",
102500
+ evidenceId
102501
+ };
102502
+ if (canRenderFamily$1 && !canRenderFamily$1(physicalFamily))
102503
+ return {
102504
+ kind: "asset_missing",
102505
+ substituteFamily: physicalFamily,
102506
+ verdict,
102507
+ evidenceId
102508
+ };
102509
+ return {
102510
+ kind: "fallback",
102511
+ fallback: buildFallback(row, physicalFamily, verdict)
102512
+ };
102511
102513
  }
102512
- function createFontResolver() {
102513
- return new FontResolver;
102514
+ function isFaceScoped(row) {
102515
+ const f2 = row.faces;
102516
+ return f2.regular || f2.bold || f2.italic || f2.boldItalic;
102514
102517
  }
102515
- function resolveFontFamily(logicalFamily) {
102516
- return defaultResolver.resolveFontFamily(logicalFamily);
102518
+ function decideRowForFace(row, face, canRenderFamily$1) {
102519
+ const base$1 = decideRow(row, canRenderFamily$1);
102520
+ if (base$1.kind !== "fallback")
102521
+ return base$1;
102522
+ if (isFaceScoped(row) && !row.faces[face])
102523
+ return {
102524
+ kind: "face_missing",
102525
+ substituteFamily: base$1.fallback.substituteFamily,
102526
+ evidenceId: row.evidenceId
102527
+ };
102528
+ const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
102529
+ return {
102530
+ kind: "fallback",
102531
+ fallback: buildFallback(row, base$1.fallback.substituteFamily, faceVerdict, face)
102532
+ };
102517
102533
  }
102518
- function resolvePhysicalFamily(cssFontFamily) {
102519
- return defaultResolver.resolvePhysicalFamily(cssFontFamily);
102534
+ function getFallbackDecision(family$1, options = {}) {
102535
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
102536
+ return row ? decideRow(row, options.canRenderFamily) : { kind: "unknown" };
102520
102537
  }
102521
- function resolveFace(logicalFamily, face, hasFace) {
102522
- return defaultResolver.resolveFace(logicalFamily, face, hasFace);
102538
+ function getRenderableFallback(family$1, options) {
102539
+ const decision = getFallbackDecision(family$1, options);
102540
+ return decision.kind === "fallback" ? decision.fallback : null;
102523
102541
  }
102524
- function getFontConfigVersion() {
102525
- return fontConfigVersion;
102542
+ function getFallbackDecisionForFace(family$1, face, options = {}) {
102543
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
102544
+ return row ? decideRowForFace(row, face, options.canRenderFamily) : { kind: "unknown" };
102526
102545
  }
102527
- function bumpFontConfigVersion() {
102528
- return fontConfigVersion += 1;
102546
+ function getRenderableFallbackForFace(family$1, face, options) {
102547
+ const decision = getFallbackDecisionForFace(family$1, face, options);
102548
+ return decision.kind === "fallback" ? decision.fallback : null;
102529
102549
  }
102530
102550
  function fourFaces(filePrefix) {
102531
102551
  return [
@@ -102558,6 +102578,54 @@ function family(name, filePrefix, license) {
102558
102578
  faces: fourFaces(filePrefix)
102559
102579
  };
102560
102580
  }
102581
+ function normalizeFamilyKey$1(family$1) {
102582
+ return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
102583
+ }
102584
+ function sortPairs(pairs) {
102585
+ return pairs.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
102586
+ }
102587
+ function deriveBundledSubstitutes() {
102588
+ const substitutes = {};
102589
+ for (const row of SUBSTITUTION_EVIDENCE) {
102590
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
102591
+ if (fallback?.policyAction === "substitute")
102592
+ substitutes[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
102593
+ }
102594
+ return Object.freeze(substitutes);
102595
+ }
102596
+ function deriveCategoryFallbacks() {
102597
+ const fallbacks = {};
102598
+ for (const row of SUBSTITUTION_EVIDENCE) {
102599
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
102600
+ if (fallback?.policyAction === "category_fallback")
102601
+ fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
102602
+ }
102603
+ return Object.freeze(fallbacks);
102604
+ }
102605
+ function stripFamilyQuotes(family$1) {
102606
+ return family$1.trim().replace(/^["']|["']$/g, "");
102607
+ }
102608
+ function splitStack(cssFontFamily) {
102609
+ return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
102610
+ }
102611
+ function createFontResolver() {
102612
+ return new FontResolver;
102613
+ }
102614
+ function resolveFontFamily(logicalFamily) {
102615
+ return defaultResolver.resolveFontFamily(logicalFamily);
102616
+ }
102617
+ function resolvePhysicalFamily(cssFontFamily) {
102618
+ return defaultResolver.resolvePhysicalFamily(cssFontFamily);
102619
+ }
102620
+ function resolveFace(logicalFamily, face, hasFace) {
102621
+ return defaultResolver.resolveFace(logicalFamily, face, hasFace);
102622
+ }
102623
+ function getFontConfigVersion() {
102624
+ return fontConfigVersion;
102625
+ }
102626
+ function bumpFontConfigVersion() {
102627
+ return fontConfigVersion += 1;
102628
+ }
102561
102629
  function withTrailingSlash(base$1) {
102562
102630
  return base$1.endsWith("/") ? base$1 : `${base$1}/`;
102563
102631
  }
@@ -102609,6 +102677,17 @@ function installBundledSubstitutes(registry, options = {}) {
102609
102677
  });
102610
102678
  }
102611
102679
  }
102680
+ function toEvidence(fallback) {
102681
+ if (!fallback)
102682
+ return;
102683
+ return {
102684
+ evidenceId: fallback.evidenceId,
102685
+ policyAction: fallback.policyAction,
102686
+ verdict: fallback.verdict,
102687
+ lineBreakSafe: fallback.lineBreakSafe,
102688
+ ...fallback.glyphExceptions ? { glyphExceptions: fallback.glyphExceptions } : {}
102689
+ };
102690
+ }
102612
102691
  function buildFontReport(logicalFamilies, registry, resolver$1) {
102613
102692
  const seen = /* @__PURE__ */ new Set;
102614
102693
  const report = [];
@@ -102618,13 +102697,15 @@ function buildFontReport(logicalFamilies, registry, resolver$1) {
102618
102697
  seen.add(logical);
102619
102698
  const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFontFamily(logical) : resolveFontFamily(logical);
102620
102699
  const loadStatus = registry.getStatus(physicalFamily);
102700
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallback(logical, RENDER_ALL)) : undefined;
102621
102701
  report.push({
102622
102702
  logicalFamily: logical,
102623
102703
  physicalFamily,
102624
102704
  reason,
102625
102705
  loadStatus,
102626
102706
  exportFamily: logical,
102627
- missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
102707
+ missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded",
102708
+ ...evidence ? { evidence } : {}
102628
102709
  });
102629
102710
  }
102630
102711
  return report;
@@ -102651,6 +102732,7 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
102651
102732
  style
102652
102733
  });
102653
102734
  const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
102735
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallbackForFace(logicalFamily, faceSlotFor(face), RENDER_ALL)) : undefined;
102654
102736
  report.push({
102655
102737
  logicalFamily,
102656
102738
  physicalFamily: reason === "registered_face" ? logicalFamily : physicalFamily,
@@ -102658,7 +102740,8 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
102658
102740
  loadStatus,
102659
102741
  exportFamily: logicalFamily,
102660
102742
  missing,
102661
- face
102743
+ face,
102744
+ ...evidence ? { evidence } : {}
102662
102745
  });
102663
102746
  }
102664
102747
  return report;
@@ -107788,6 +107871,9 @@ function hasTrackDeleteMark(node3) {
107788
107871
  function shouldSkipTextNode(node3, options) {
107789
107872
  return isVisibleTextModel(options) && hasTrackDeleteMark(node3);
107790
107873
  }
107874
+ function shouldSkipLeafNode(node3, options) {
107875
+ return isVisibleTextModel(options) && hasTrackDeleteMark(node3);
107876
+ }
107791
107877
  function resolveSegmentPosition(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
107792
107878
  if (segmentLength <= 1)
107793
107879
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -107819,7 +107905,13 @@ function pmPositionToTextOffset(blockNode, blockPos, pmPos, options) {
107819
107905
  return;
107820
107906
  }
107821
107907
  if (node3.isLeaf) {
107822
- if (pmPos >= docPos + node3.nodeSize)
107908
+ const endPos = docPos + node3.nodeSize;
107909
+ if (shouldSkipLeafNode(node3, options)) {
107910
+ if (pmPos < endPos)
107911
+ done = true;
107912
+ return;
107913
+ }
107914
+ if (pmPos >= endPos)
107823
107915
  offset += 1;
107824
107916
  else
107825
107917
  done = true;
@@ -107860,6 +107952,8 @@ function computeTextContentLength(blockNode, options) {
107860
107952
  return;
107861
107953
  }
107862
107954
  if (node3.isLeaf) {
107955
+ if (shouldSkipLeafNode(node3, options))
107956
+ return;
107863
107957
  length3 += 1;
107864
107958
  return;
107865
107959
  }
@@ -107919,6 +108013,8 @@ function resolveTextRangeInBlock(blockNode, blockPos, range, options) {
107919
108013
  return;
107920
108014
  }
107921
108015
  if (node3.isLeaf) {
108016
+ if (shouldSkipLeafNode(node3, options))
108017
+ return;
107922
108018
  advanceSegment(1, docPos, docPos + node3.nodeSize);
107923
108019
  return;
107924
108020
  }
@@ -107950,7 +108046,10 @@ function textContentInBlock(blockNode, options) {
107950
108046
  return;
107951
108047
  }
107952
108048
  if (node3.isLeaf) {
107953
- text$2 += "";
108049
+ if (shouldSkipLeafNode(node3, options))
108050
+ return;
108051
+ const leafText = node3.type?.spec?.leafText;
108052
+ text$2 += typeof leafText === "function" ? leafText(node3) : "";
107954
108053
  return;
107955
108054
  }
107956
108055
  let isFirstChild$1 = true;
@@ -107975,19 +108074,31 @@ function textContentInBlock(blockNode, options) {
107975
108074
  return text$2;
107976
108075
  }
107977
108076
  function buildTextWithTabs(schema, text$2, marks, opts = {}) {
107978
- if (!text$2.includes("\t"))
107979
- return schema.text(text$2, marks);
107980
- const tabNodeType = schema.nodes?.tab;
107981
- if (!tabNodeType || opts.parentAllowsTab === false)
107982
- return schema.text(text$2, marks);
107983
- const tabMarks = marks ?? null;
107984
- const parts = text$2.split("\t");
108077
+ const normalized = text$2.includes("\r") ? text$2.replace(/\r\n?/g, `
108078
+ `) : text$2;
108079
+ const hasTab = normalized.includes("\t");
108080
+ const hasNewline = normalized.includes(`
108081
+ `);
108082
+ if (!hasTab && !hasNewline)
108083
+ return schema.text(normalized, marks);
108084
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
108085
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
108086
+ if (!tabNodeType && !lineBreakNodeType)
108087
+ return schema.text(normalized, marks);
108088
+ const tabMarks = marks ?? undefined;
108089
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
108090
+ const parts = normalized.split(/* @__PURE__ */ new RegExp(`(${splitPattern})`));
107985
108091
  const nodes = [];
107986
- for (let i$1 = 0;i$1 < parts.length; i$1++) {
107987
- if (parts[i$1])
107988
- nodes.push(schema.text(parts[i$1], marks));
107989
- if (i$1 < parts.length - 1)
108092
+ for (const part of parts) {
108093
+ if (part === "")
108094
+ continue;
108095
+ if (part === "\t" && tabNodeType)
107990
108096
  nodes.push(tabNodeType.create(null, null, tabMarks));
108097
+ else if (part === `
108098
+ ` && lineBreakNodeType)
108099
+ nodes.push(lineBreakNodeType.create());
108100
+ else
108101
+ nodes.push(schema.text(part, marks));
107991
108102
  }
107992
108103
  return Fragment.from(nodes);
107993
108104
  }
@@ -108029,6 +108140,8 @@ function textBetweenWithTabs(doc$2, from5, to, blockSeparator, leafFallback, opt
108029
108140
  }
108030
108141
  if (node3.isLeaf) {
108031
108142
  if (node3.isInline) {
108143
+ if (options.textModel === "visible" && node3.marks?.some((mark) => mark.type.name === "trackDelete"))
108144
+ return false;
108032
108145
  const leafTextFn = node3.type?.spec?.leafText;
108033
108146
  if (typeof leafTextFn === "function")
108034
108147
  out += leafTextFn(node3);
@@ -129531,7 +129644,7 @@ var isRegExp = (value) => {
129531
129644
  tags.push(`</${name}>`);
129532
129645
  return tags;
129533
129646
  }
129534
- }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
129647
+ }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE$1, LINE_BREAK_SAFE_VERDICTS, BY_LOGICAL, BUNDLED_MANIFEST, SUBSTITUTION_EVIDENCE, bundledFamilies, canRenderFamily = (family$1) => bundledFamilies.has(family$1), BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
129535
129648
  #overrides = /* @__PURE__ */ new Map;
129536
129649
  #embedded = /* @__PURE__ */ new Map;
129537
129650
  #version = 0;
@@ -129720,7 +129833,17 @@ var isRegExp = (value) => {
129720
129833
  out.add(this.resolvePrimaryPhysicalFamily(family$1));
129721
129834
  return [...out];
129722
129835
  }
129723
- }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, BUNDLED_MANIFEST, defaultAssetBase = "/fonts/", installedRegistries, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
129836
+ }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, faceSlotFor = ({ weight, style }) => {
129837
+ const bold2 = weight === "700";
129838
+ const italic = style === "italic";
129839
+ if (bold2 && italic)
129840
+ return "boldItalic";
129841
+ if (bold2)
129842
+ return "bold";
129843
+ if (italic)
129844
+ return "italic";
129845
+ return "regular";
129846
+ }, isRenderedSubstitute = (reason) => reason === "bundled_substitute" || reason === "category_fallback", RENDER_ALL, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
129724
129847
  #fontSet;
129725
129848
  #FontFaceCtor;
129726
129849
  #probeSize;
@@ -134003,7 +134126,7 @@ var isRegExp = (value) => {
134003
134126
  sourceId: stringOf(primary.sourceId),
134004
134127
  revisionGroupId: stringOf(primary.revisionGroupId) || representativeRevisionId
134005
134128
  });
134006
- }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), 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.38.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
134129
+ }, stringOf = (value) => typeof value === "string" ? value : value == null ? "" : String(value), 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.39.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
134007
134130
  if (!runProps?.elements?.length || !state)
134008
134131
  return;
134009
134132
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -134037,11 +134160,11 @@ var isRegExp = (value) => {
134037
134160
  state.kern = kernNode.attributes["w:val"];
134038
134161
  }
134039
134162
  }, SuperConverter;
134040
- var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
134163
+ var init_SuperConverter_CfRQprW6_es = __esm(() => {
134041
134164
  init_rolldown_runtime_Bg48TavK_es();
134042
134165
  init_jszip_C49i9kUs_es();
134043
134166
  init_xml_js_CqGKpaft_es();
134044
- init_uuid_qzgm05fK_es();
134167
+ init_uuid_B2wVPhPi_es();
134045
134168
  init_constants_D9qj59G2_es();
134046
134169
  init_dist_B8HfvhaK_es();
134047
134170
  init_unified_Dsuw2be5_es();
@@ -171354,7 +171477,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171354
171477
  "timed_out",
171355
171478
  "fallback_used"
171356
171479
  ];
171357
- SUBSTITUTION_EVIDENCE = Object.freeze([
171480
+ SUBSTITUTION_EVIDENCE$1 = [
171358
171481
  {
171359
171482
  evidenceId: "calibri",
171360
171483
  logicalFamily: "Calibri",
@@ -171366,10 +171489,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171366
171489
  italic: true,
171367
171490
  boldItalic: true
171368
171491
  },
171369
- advance: {
171370
- meanDelta: 0,
171371
- maxDelta: 0
171372
- },
171373
171492
  gates: {
171374
171493
  static: "pass",
171375
171494
  metric: "pass",
@@ -171378,36 +171497,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171378
171497
  },
171379
171498
  policyAction: "substitute",
171380
171499
  measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
171381
- candidateLicense: "OFL-1.1",
171382
- exportRule: "preserve_original_name"
171500
+ exportRule: "preserve_original_name",
171501
+ advance: {
171502
+ meanDelta: 0,
171503
+ maxDelta: 0
171504
+ },
171505
+ candidateLicense: "OFL-1.1"
171383
171506
  },
171384
171507
  {
171385
171508
  evidenceId: "cambria",
171386
171509
  logicalFamily: "Cambria",
171387
171510
  physicalFamily: "Caladea",
171388
171511
  verdict: "visual_only",
171389
- faceVerdicts: {
171390
- regular: "metric_safe",
171391
- bold: "metric_safe",
171392
- italic: "metric_safe",
171393
- boldItalic: "visual_only"
171394
- },
171395
- glyphExceptions: [{
171396
- slot: "boldItalic",
171397
- codepoint: 96,
171398
- advanceDelta: 0.231,
171399
- note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
171400
- }],
171401
171512
  faces: {
171402
171513
  regular: true,
171403
171514
  bold: true,
171404
171515
  italic: true,
171405
171516
  boldItalic: true
171406
171517
  },
171407
- advance: {
171408
- meanDelta: 0.0002378,
171409
- maxDelta: 0.2310758
171410
- },
171411
171518
  gates: {
171412
171519
  static: "pass",
171413
171520
  metric: "pass",
@@ -171421,8 +171528,24 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171421
171528
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
171422
171529
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
171423
171530
  ],
171531
+ exportRule: "preserve_original_name",
171532
+ advance: {
171533
+ meanDelta: 0.0002378,
171534
+ maxDelta: 0.2310758
171535
+ },
171424
171536
  candidateLicense: "Apache-2.0",
171425
- exportRule: "preserve_original_name"
171537
+ faceVerdicts: {
171538
+ regular: "metric_safe",
171539
+ bold: "metric_safe",
171540
+ italic: "metric_safe",
171541
+ boldItalic: "visual_only"
171542
+ },
171543
+ glyphExceptions: [{
171544
+ slot: "boldItalic",
171545
+ codepoint: 96,
171546
+ advanceDelta: 0.231,
171547
+ note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow. All other glyphs, and the regular/bold/italic faces, are within the direct metric threshold."
171548
+ }]
171426
171549
  },
171427
171550
  {
171428
171551
  evidenceId: "arial",
@@ -171435,10 +171558,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171435
171558
  italic: true,
171436
171559
  boldItalic: true
171437
171560
  },
171438
- advance: {
171439
- meanDelta: 0,
171440
- maxDelta: 0
171441
- },
171442
171561
  gates: {
171443
171562
  static: "pass",
171444
171563
  metric: "pass",
@@ -171447,8 +171566,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171447
171566
  },
171448
171567
  policyAction: "substitute",
171449
171568
  measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
171450
- candidateLicense: "OFL-1.1",
171451
- exportRule: "preserve_original_name"
171569
+ exportRule: "preserve_original_name",
171570
+ advance: {
171571
+ meanDelta: 0,
171572
+ maxDelta: 0
171573
+ },
171574
+ candidateLicense: "OFL-1.1"
171452
171575
  },
171453
171576
  {
171454
171577
  evidenceId: "times-new-roman",
@@ -171461,10 +171584,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171461
171584
  italic: true,
171462
171585
  boldItalic: true
171463
171586
  },
171464
- advance: {
171465
- meanDelta: 0,
171466
- maxDelta: 0
171467
- },
171468
171587
  gates: {
171469
171588
  static: "pass",
171470
171589
  metric: "pass",
@@ -171473,8 +171592,12 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171473
171592
  },
171474
171593
  policyAction: "substitute",
171475
171594
  measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
171476
- candidateLicense: "OFL-1.1",
171477
- exportRule: "preserve_original_name"
171595
+ exportRule: "preserve_original_name",
171596
+ advance: {
171597
+ meanDelta: 0,
171598
+ maxDelta: 0
171599
+ },
171600
+ candidateLicense: "OFL-1.1"
171478
171601
  },
171479
171602
  {
171480
171603
  evidenceId: "courier-new",
@@ -171487,19 +171610,388 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171487
171610
  italic: true,
171488
171611
  boldItalic: true
171489
171612
  },
171613
+ gates: {
171614
+ static: "pass",
171615
+ metric: "pass",
171616
+ layout: "not_run",
171617
+ ship: "pass"
171618
+ },
171619
+ policyAction: "substitute",
171620
+ measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
171621
+ exportRule: "preserve_original_name",
171490
171622
  advance: {
171491
171623
  meanDelta: 0,
171492
171624
  maxDelta: 0
171493
171625
  },
171626
+ candidateLicense: "OFL-1.1"
171627
+ },
171628
+ {
171629
+ evidenceId: "georgia",
171630
+ logicalFamily: "Georgia",
171631
+ physicalFamily: "Gelasio",
171632
+ verdict: "near_metric",
171633
+ faces: {
171634
+ regular: true,
171635
+ bold: true,
171636
+ italic: true,
171637
+ boldItalic: true
171638
+ },
171494
171639
  gates: {
171495
171640
  static: "pass",
171496
171641
  metric: "pass",
171497
- layout: "not_run",
171498
- ship: "pass"
171642
+ layout: "pass",
171643
+ ship: "fail"
171499
171644
  },
171500
171645
  policyAction: "substitute",
171501
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
171646
+ measurementRefs: [
171647
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
171648
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
171649
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
171650
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
171651
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
171652
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
171653
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
171654
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
171655
+ ],
171656
+ exportRule: "preserve_original_name",
171657
+ advance: {
171658
+ meanDelta: 0.0000197,
171659
+ maxDelta: 0.0183727
171660
+ },
171502
171661
  candidateLicense: "OFL-1.1",
171662
+ faceVerdicts: {
171663
+ regular: "metric_safe",
171664
+ bold: "metric_safe",
171665
+ italic: "near_metric",
171666
+ boldItalic: "near_metric"
171667
+ },
171668
+ glyphExceptions: [{
171669
+ slot: "italic",
171670
+ codepoint: 210,
171671
+ advanceDelta: 0.0184,
171672
+ note: "Georgia Italic vs Gelasio Italic: accented capital O (U+00D2-D8: O-grave/acute/circumflex/diaeresis/stroke) advance differs ~1.84%. 5 rare glyphs; all other glyphs exact, mean 0%."
171673
+ }, {
171674
+ slot: "boldItalic",
171675
+ codepoint: 204,
171676
+ advanceDelta: 0.011,
171677
+ note: "Georgia Bold Italic vs Gelasio Bold Italic: accented capital I (U+00CC-CE: I-grave/acute/circumflex) advance differs ~1.10%. 3 rare glyphs; all other glyphs exact, mean ~0%."
171678
+ }]
171679
+ },
171680
+ {
171681
+ evidenceId: "arial-narrow",
171682
+ logicalFamily: "Arial Narrow",
171683
+ physicalFamily: "Liberation Sans Narrow",
171684
+ verdict: "visual_only",
171685
+ faces: {
171686
+ regular: true,
171687
+ bold: true,
171688
+ italic: true,
171689
+ boldItalic: true
171690
+ },
171691
+ gates: {
171692
+ static: "pass",
171693
+ metric: "pass",
171694
+ layout: "not_run",
171695
+ ship: "fail"
171696
+ },
171697
+ policyAction: "substitute",
171698
+ measurementRefs: [
171699
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
171700
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
171701
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
171702
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
171703
+ ],
171704
+ exportRule: "preserve_original_name",
171705
+ advance: {
171706
+ meanDelta: 0,
171707
+ maxDelta: 0.5
171708
+ },
171709
+ candidateLicense: "GPLv2-with-font-exception",
171710
+ faceVerdicts: {
171711
+ regular: "metric_safe",
171712
+ bold: "visual_only",
171713
+ italic: "metric_safe",
171714
+ boldItalic: "metric_safe"
171715
+ },
171716
+ glyphExceptions: [{
171717
+ slot: "bold",
171718
+ codepoint: 160,
171719
+ advanceDelta: 0.5,
171720
+ note: "Arial Narrow Bold no-break space (U+00A0) is double-width (2x the regular space); Liberation Sans Narrow Bold matches the regular space, so lines containing a non-breaking space reflow. All other glyphs, and the regular/italic/boldItalic faces, match within the direct metric threshold."
171721
+ }]
171722
+ },
171723
+ {
171724
+ evidenceId: "aptos",
171725
+ logicalFamily: "Aptos",
171726
+ physicalFamily: null,
171727
+ verdict: "no_substitute",
171728
+ faces: {
171729
+ regular: false,
171730
+ bold: false,
171731
+ italic: false,
171732
+ boldItalic: false
171733
+ },
171734
+ gates: {
171735
+ static: "not_run",
171736
+ metric: "fail",
171737
+ layout: "not_run",
171738
+ ship: "not_run"
171739
+ },
171740
+ policyAction: "customer_supplied",
171741
+ measurementRefs: ["aptos#top_candidates#2026-06-03"],
171742
+ exportRule: "preserve_original_name",
171743
+ candidateLicense: null
171744
+ },
171745
+ {
171746
+ evidenceId: "consolas",
171747
+ logicalFamily: "Consolas",
171748
+ physicalFamily: "Inconsolata SemiExpanded",
171749
+ verdict: "cell_width_only",
171750
+ faces: {
171751
+ regular: false,
171752
+ bold: false,
171753
+ italic: false,
171754
+ boldItalic: false
171755
+ },
171756
+ gates: {
171757
+ static: "not_run",
171758
+ metric: "not_run",
171759
+ layout: "not_run",
171760
+ ship: "not_run"
171761
+ },
171762
+ policyAction: "category_fallback",
171763
+ measurementRefs: ["consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"],
171764
+ exportRule: "preserve_original_name",
171765
+ advance: {
171766
+ meanDelta: 0.00035999999999999997,
171767
+ maxDelta: 0.00035999999999999997
171768
+ },
171769
+ candidateLicense: "OFL-1.1"
171770
+ },
171771
+ {
171772
+ evidenceId: "verdana",
171773
+ logicalFamily: "Verdana",
171774
+ physicalFamily: null,
171775
+ verdict: "visual_only",
171776
+ faces: {
171777
+ regular: false,
171778
+ bold: false,
171779
+ italic: false,
171780
+ boldItalic: false
171781
+ },
171782
+ gates: {
171783
+ static: "not_run",
171784
+ metric: "fail",
171785
+ layout: "not_run",
171786
+ ship: "not_run"
171787
+ },
171788
+ policyAction: "category_fallback",
171789
+ measurementRefs: ["verdana#top_candidates#2026-06-03"],
171790
+ exportRule: "preserve_original_name",
171791
+ candidateLicense: null
171792
+ },
171793
+ {
171794
+ evidenceId: "tahoma",
171795
+ logicalFamily: "Tahoma",
171796
+ physicalFamily: null,
171797
+ verdict: "visual_only",
171798
+ faces: {
171799
+ regular: false,
171800
+ bold: false,
171801
+ italic: false,
171802
+ boldItalic: false
171803
+ },
171804
+ gates: {
171805
+ static: "not_run",
171806
+ metric: "fail",
171807
+ layout: "not_run",
171808
+ ship: "not_run"
171809
+ },
171810
+ policyAction: "category_fallback",
171811
+ measurementRefs: ["tahoma#top_candidates#2026-06-03"],
171812
+ exportRule: "preserve_original_name",
171813
+ candidateLicense: null
171814
+ },
171815
+ {
171816
+ evidenceId: "trebuchet-ms",
171817
+ logicalFamily: "Trebuchet MS",
171818
+ physicalFamily: null,
171819
+ verdict: "visual_only",
171820
+ faces: {
171821
+ regular: false,
171822
+ bold: false,
171823
+ italic: false,
171824
+ boldItalic: false
171825
+ },
171826
+ gates: {
171827
+ static: "not_run",
171828
+ metric: "fail",
171829
+ layout: "not_run",
171830
+ ship: "not_run"
171831
+ },
171832
+ policyAction: "category_fallback",
171833
+ measurementRefs: ["trebuchet-ms#top_candidates#2026-06-03"],
171834
+ exportRule: "preserve_original_name",
171835
+ candidateLicense: null
171836
+ },
171837
+ {
171838
+ evidenceId: "comic-sans-ms",
171839
+ logicalFamily: "Comic Sans MS",
171840
+ physicalFamily: "Comic Neue",
171841
+ verdict: "visual_only",
171842
+ faces: {
171843
+ regular: false,
171844
+ bold: false,
171845
+ italic: false,
171846
+ boldItalic: false
171847
+ },
171848
+ gates: {
171849
+ static: "not_run",
171850
+ metric: "fail",
171851
+ layout: "not_run",
171852
+ ship: "not_run"
171853
+ },
171854
+ policyAction: "category_fallback",
171855
+ measurementRefs: ["comic-sans-ms__comic-neue#analytic_advance#2026-06-03"],
171856
+ exportRule: "preserve_original_name",
171857
+ advance: {
171858
+ meanDelta: 0.1005,
171859
+ maxDelta: 0.1419
171860
+ },
171861
+ candidateLicense: "OFL-1.1"
171862
+ },
171863
+ {
171864
+ evidenceId: "candara",
171865
+ logicalFamily: "Candara",
171866
+ physicalFamily: null,
171867
+ verdict: "visual_only",
171868
+ faces: {
171869
+ regular: false,
171870
+ bold: false,
171871
+ italic: false,
171872
+ boldItalic: false
171873
+ },
171874
+ gates: {
171875
+ static: "not_run",
171876
+ metric: "fail",
171877
+ layout: "not_run",
171878
+ ship: "not_run"
171879
+ },
171880
+ policyAction: "category_fallback",
171881
+ measurementRefs: ["candara#top_candidates#2026-06-03"],
171882
+ exportRule: "preserve_original_name",
171883
+ candidateLicense: null
171884
+ },
171885
+ {
171886
+ evidenceId: "constantia",
171887
+ logicalFamily: "Constantia",
171888
+ physicalFamily: null,
171889
+ verdict: "visual_only",
171890
+ faces: {
171891
+ regular: false,
171892
+ bold: false,
171893
+ italic: false,
171894
+ boldItalic: false
171895
+ },
171896
+ gates: {
171897
+ static: "not_run",
171898
+ metric: "fail",
171899
+ layout: "not_run",
171900
+ ship: "not_run"
171901
+ },
171902
+ policyAction: "category_fallback",
171903
+ measurementRefs: ["constantia#top_candidates#2026-06-03"],
171904
+ exportRule: "preserve_original_name",
171905
+ candidateLicense: null
171906
+ },
171907
+ {
171908
+ evidenceId: "corbel",
171909
+ logicalFamily: "Corbel",
171910
+ physicalFamily: null,
171911
+ verdict: "visual_only",
171912
+ faces: {
171913
+ regular: false,
171914
+ bold: false,
171915
+ italic: false,
171916
+ boldItalic: false
171917
+ },
171918
+ gates: {
171919
+ static: "not_run",
171920
+ metric: "fail",
171921
+ layout: "not_run",
171922
+ ship: "not_run"
171923
+ },
171924
+ policyAction: "category_fallback",
171925
+ measurementRefs: ["corbel#top_candidates#2026-06-03"],
171926
+ exportRule: "preserve_original_name",
171927
+ candidateLicense: null
171928
+ },
171929
+ {
171930
+ evidenceId: "lucida-console",
171931
+ logicalFamily: "Lucida Console",
171932
+ physicalFamily: "Cousine",
171933
+ verdict: "cell_width_only",
171934
+ faces: {
171935
+ regular: false,
171936
+ bold: false,
171937
+ italic: false,
171938
+ boldItalic: false
171939
+ },
171940
+ gates: {
171941
+ static: "not_run",
171942
+ metric: "not_run",
171943
+ layout: "not_run",
171944
+ ship: "not_run"
171945
+ },
171946
+ policyAction: "category_fallback",
171947
+ measurementRefs: ["lucida-console__cousine#analytic_advance#2026-06-03"],
171948
+ exportRule: "preserve_original_name",
171949
+ advance: {
171950
+ meanDelta: 0.004050000000000001,
171951
+ maxDelta: 0.004050000000000001
171952
+ },
171953
+ candidateLicense: "OFL-1.1"
171954
+ },
171955
+ {
171956
+ evidenceId: "aptos-display",
171957
+ logicalFamily: "Aptos Display",
171958
+ physicalFamily: null,
171959
+ verdict: "customer_supplied",
171960
+ faces: {
171961
+ regular: false,
171962
+ bold: false,
171963
+ italic: false,
171964
+ boldItalic: false
171965
+ },
171966
+ gates: {
171967
+ static: "not_run",
171968
+ metric: "not_run",
171969
+ layout: "not_run",
171970
+ ship: "fail"
171971
+ },
171972
+ policyAction: "customer_supplied",
171973
+ measurementRefs: [],
171974
+ exportRule: "preserve_original_name"
171975
+ },
171976
+ {
171977
+ evidenceId: "cambria-math",
171978
+ logicalFamily: "Cambria Math",
171979
+ physicalFamily: null,
171980
+ verdict: "preserve_only",
171981
+ faces: {
171982
+ regular: false,
171983
+ bold: false,
171984
+ italic: false,
171985
+ boldItalic: false
171986
+ },
171987
+ gates: {
171988
+ static: "not_run",
171989
+ metric: "not_run",
171990
+ layout: "not_run",
171991
+ ship: "not_run"
171992
+ },
171993
+ policyAction: "preserve_only",
171994
+ measurementRefs: [],
171503
171995
  exportRule: "preserve_original_name"
171504
171996
  },
171505
171997
  {
@@ -171513,20 +172005,20 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171513
172005
  italic: true,
171514
172006
  boldItalic: true
171515
172007
  },
171516
- advance: {
171517
- meanDelta: 0,
171518
- maxDelta: 0
171519
- },
171520
172008
  gates: {
171521
172009
  static: "not_run",
171522
172010
  metric: "pass",
171523
172011
  layout: "not_run",
171524
- ship: "fail"
172012
+ ship: "pass"
171525
172013
  },
171526
172014
  policyAction: "substitute",
171527
172015
  measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
171528
- candidateLicense: "OFL-1.1",
171529
- exportRule: "preserve_original_name"
172016
+ exportRule: "preserve_original_name",
172017
+ advance: {
172018
+ meanDelta: 0,
172019
+ maxDelta: 0
172020
+ },
172021
+ candidateLicense: "OFL-1.1"
171530
172022
  },
171531
172023
  {
171532
172024
  evidenceId: "calibri-light",
@@ -171539,10 +172031,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171539
172031
  italic: false,
171540
172032
  boldItalic: false
171541
172033
  },
171542
- advance: {
171543
- meanDelta: 0.0148,
171544
- maxDelta: 0.066
171545
- },
171546
172034
  gates: {
171547
172035
  static: "not_run",
171548
172036
  metric: "fail",
@@ -171551,17 +172039,53 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171551
172039
  },
171552
172040
  policyAction: "category_fallback",
171553
172041
  measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
172042
+ exportRule: "preserve_original_name",
172043
+ advance: {
172044
+ meanDelta: 0.0148,
172045
+ maxDelta: 0.066
172046
+ },
172047
+ candidateLicense: "OFL-1.1"
172048
+ },
172049
+ {
172050
+ evidenceId: "baskerville-old-face",
172051
+ logicalFamily: "Baskerville Old Face",
172052
+ physicalFamily: "Bacasime Antique",
172053
+ verdict: "visual_only",
172054
+ faces: {
172055
+ regular: true,
172056
+ bold: false,
172057
+ italic: false,
172058
+ boldItalic: false
172059
+ },
172060
+ gates: {
172061
+ static: "pass",
172062
+ metric: "fail",
172063
+ layout: "not_run",
172064
+ ship: "not_run"
172065
+ },
172066
+ policyAction: "substitute",
172067
+ measurementRefs: ["baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"],
172068
+ exportRule: "preserve_original_name",
172069
+ advance: {
172070
+ meanDelta: 0,
172071
+ maxDelta: 0.4915590863952334
172072
+ },
171554
172073
  candidateLicense: "OFL-1.1",
171555
- exportRule: "preserve_original_name"
172074
+ faceVerdicts: { regular: "visual_only" },
172075
+ glyphExceptions: [{
172076
+ slot: "regular",
172077
+ codepoint: 160,
172078
+ advanceDelta: 0.4916,
172079
+ note: "Bacasime Antique Regular's no-break space (U+00A0) advance diverges ~49% from Baskerville Old Face; lines containing NBSP reflow. Every other Latin-core glyph is advance-identical, which is why this is visual_only with a single named exception, not near_metric."
172080
+ }]
171556
172081
  }
172082
+ ];
172083
+ LINE_BREAK_SAFE_VERDICTS = new Set([
172084
+ "metric_safe",
172085
+ "near_metric",
172086
+ "cell_width_only"
171557
172087
  ]);
171558
- BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
171559
- CATEGORY_FALLBACKS = deriveCategoryFallbacks();
171560
- defaultResolver = new FontResolver;
171561
- DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
171562
- resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
171563
- fontSignature: ""
171564
- });
172088
+ BY_LOGICAL = new Map(SUBSTITUTION_EVIDENCE$1.map((row) => [normalizeFamilyName(row.logicalFamily), row]));
171565
172089
  BUNDLED_MANIFEST = Object.freeze([
171566
172090
  family("Carlito", "Carlito", "OFL-1.1"),
171567
172091
  family("Caladea", "Caladea", "Apache-2.0"),
@@ -171569,7 +172093,17 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171569
172093
  family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
171570
172094
  family("Liberation Mono", "LiberationMono", "OFL-1.1")
171571
172095
  ]);
172096
+ SUBSTITUTION_EVIDENCE = SUBSTITUTION_EVIDENCE$1;
172097
+ bundledFamilies = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
172098
+ BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
172099
+ CATEGORY_FALLBACKS = deriveCategoryFallbacks();
172100
+ defaultResolver = new FontResolver;
172101
+ DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
172102
+ resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
172103
+ fontSignature: ""
172104
+ });
171572
172105
  installedRegistries = /* @__PURE__ */ new WeakMap;
172106
+ RENDER_ALL = { canRenderFamily: () => true };
171573
172107
  OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
171574
172108
  registriesByFontSet = /* @__PURE__ */ new WeakMap;
171575
172109
  PHYSICAL_GENERIC = Object.freeze({
@@ -173374,7 +173908,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
173374
173908
  };
173375
173909
  });
173376
173910
 
173377
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
173911
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DOEFHsWP.es.js
173378
173912
  function parseSizeUnit(val = "0") {
173379
173913
  const length3 = val.toString() || "0";
173380
173914
  const value = Number.parseFloat(length3);
@@ -177222,6 +177756,8 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177222
177756
  const absTo = mapping.map(target.absTo);
177223
177757
  const replacementText = getReplacementText(step3.args.replacement);
177224
177758
  const marks = resolveMarksForRange(editor, target, step3);
177759
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
177760
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt(tr, pos, lineBreakNodeType) : false;
177225
177761
  const structuralRewrite = resolveStructuralRangeRewrite(tr.doc, absFrom, absTo, step3);
177226
177762
  if (structuralRewrite) {
177227
177763
  const slice2 = buildReplacementParagraphSlice(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step3.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -177249,7 +177785,7 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177249
177785
  tr.delete(absFrom, absTo);
177250
177786
  return { changed: target.text.length > 0 };
177251
177787
  }
177252
- const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks));
177788
+ const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom) });
177253
177789
  tr.replaceWith(absFrom, absTo, content2);
177254
177790
  return { changed: replacementText !== target.text };
177255
177791
  }
@@ -177291,17 +177827,17 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177291
177827
  if (change.type === "delete")
177292
177828
  tr.delete(remap(change.docFrom), remap(change.docTo));
177293
177829
  else if (change.type === "insert") {
177294
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
177830
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos)) });
177295
177831
  tr.insert(remap(change.docPos), content2);
177296
177832
  } else {
177297
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
177833
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom)) });
177298
177834
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content2);
177299
177835
  }
177300
177836
  }
177301
177837
  } else if (trimmedNew.length === 0)
177302
177838
  tr.delete(trimmedFrom, trimmedTo);
177303
177839
  else {
177304
- const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks));
177840
+ const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom) });
177305
177841
  tr.replaceWith(trimmedFrom, trimmedTo, content2);
177306
177842
  }
177307
177843
  return { changed: replacementText !== target.text };
@@ -177372,7 +177908,12 @@ function executeTextInsert(editor, tr, target, step3, mapping) {
177372
177908
  }
177373
177909
  const tabNodeType = editor.state.schema.nodes?.tab;
177374
177910
  const parentAllowsTab = tabNodeType && text4.includes("\t") ? parentAllowsNodeAt(tr, absPos, tabNodeType) : false;
177375
- tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, { parentAllowsTab }));
177911
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
177912
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text4) ? parentAllowsNodeAt(tr, absPos, lineBreakNodeType) : false;
177913
+ tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, {
177914
+ parentAllowsTab,
177915
+ parentAllowsLineBreak
177916
+ }));
177376
177917
  return { changed: true };
177377
177918
  }
177378
177919
  function executeTextDelete(_editor, tr, target, _step, mapping) {
@@ -177466,7 +178007,9 @@ function executeSpanTextRewrite(editor, tr, target, step3, mapping) {
177466
178007
  const absTo = mapping.map(lastSeg.absTo, -1);
177467
178008
  if (replacementBlocks.length === 1) {
177468
178009
  const marks = resolveSpanMarks(editor, target, policy, step3.id);
177469
- const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks));
178010
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
178011
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt(tr, absFrom, lineBreakNodeType) : false;
178012
+ const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks), { parentAllowsLineBreak });
177470
178013
  tr.replaceWith(absFrom, absTo, content2);
177471
178014
  return { changed: true };
177472
178015
  }
@@ -178693,7 +179236,7 @@ function materializeTab(schema) {
178693
179236
  return nodeType.create();
178694
179237
  }
178695
179238
  function materializeLineBreak(schema) {
178696
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
179239
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
178697
179240
  if (!nodeType)
178698
179241
  return schema.text(`
178699
179242
  `);
@@ -182818,6 +183361,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182818
183361
  disabled: !context,
182819
183362
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
182820
183363
  };
183364
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
183365
+ return {
183366
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
183367
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
183368
+ };
182821
183369
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
182822
183370
  return {
182823
183371
  active: false,
@@ -182838,6 +183386,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182838
183386
  return false;
182839
183387
  superdoc.setZoom?.(normalizedPayload);
182840
183388
  return true;
183389
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
183390
+ if (typeof superdoc?.setZoomMode !== "function")
183391
+ return false;
183392
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
183393
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
183394
+ return true;
182841
183395
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
182842
183396
  const validModes = [
182843
183397
  "editing",
@@ -183511,6 +184065,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183511
184065
  state: createZoomStateDeriver(),
183512
184066
  execute: createZoomExecute()
183513
184067
  },
184068
+ "zoom-fit-width": {
184069
+ id: "zoom-fit-width",
184070
+ state: createZoomFitWidthStateDeriver(),
184071
+ execute: createZoomFitWidthExecute()
184072
+ },
183514
184073
  "document-mode": {
183515
184074
  id: "document-mode",
183516
184075
  state: createDocumentModeStateDeriver(),
@@ -183707,9 +184266,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183707
184266
  }
183708
184267
  };
183709
184268
  };
183710
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
183711
- init_SuperConverter_DOoAJ6Zk_es();
183712
- init_uuid_qzgm05fK_es();
184269
+ var init_create_headless_toolbar_DOEFHsWP_es = __esm(() => {
184270
+ init_SuperConverter_CfRQprW6_es();
184271
+ init_uuid_B2wVPhPi_es();
183713
184272
  init_constants_D9qj59G2_es();
183714
184273
  init_dist_B8HfvhaK_es();
183715
184274
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -184896,7 +185455,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
184896
185455
  eol = /\r?\n|\r/g;
184897
185456
  });
184898
185457
 
184899
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
185458
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
184900
185459
  function matchesMagic(bytes, magic) {
184901
185460
  if (bytes.length < magic.length)
184902
185461
  return false;
@@ -184914,7 +185473,7 @@ function detectContainerType(data) {
184914
185473
  return "unknown";
184915
185474
  }
184916
185475
  var ZIP_MAGIC, CFB_MAGIC;
184917
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
185476
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
184918
185477
  ZIP_MAGIC = [
184919
185478
  80,
184920
185479
  75,
@@ -184933,13 +185492,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
184933
185492
  ];
184934
185493
  });
184935
185494
 
184936
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
184937
- var exports_detect_container_Cs3KoJVc_es = {};
184938
- __export(exports_detect_container_Cs3KoJVc_es, {
185495
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
185496
+ var exports_detect_container_0tUwtCR4_es = {};
185497
+ __export(exports_detect_container_0tUwtCR4_es, {
184939
185498
  detectContainerType: () => detectContainerType
184940
185499
  });
184941
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
184942
- init_detect_container_B6sqy7HZ_es();
185500
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
185501
+ init_detect_container_sTWXwOzh_es();
184943
185502
  });
184944
185503
 
184945
185504
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -184992,9 +185551,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
184992
185551
  };
184993
185552
  });
184994
185553
 
184995
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
184996
- var exports_decrypt_docx_G2a7hkiV_es = {};
184997
- __export(exports_decrypt_docx_G2a7hkiV_es, {
185554
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
185555
+ var exports_decrypt_docx_CPcaRl5W_es = {};
185556
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
184998
185557
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
184999
185558
  });
185000
185559
  function concatUint8Arrays(chunks) {
@@ -185535,10 +186094,10 @@ async function decryptDocxIfNeeded(data, options) {
185535
186094
  };
185536
186095
  }
185537
186096
  var CFB_SIGNATURE, CFB_END_OF_CHAIN = 4294967294, CFB_OBJECT_TYPE, utf16LeDecoder, AGILE_VERSION = 4, AGILE_RESERVED = 4, STANDARD_VERSION_3 = 3, STANDARD_VERSION_4 = 4, STANDARD_RESERVED = 3, MIN_HEADER_SIZE = 8, BLOCK_KEY_VERIFIER_INPUT, BLOCK_KEY_VERIFIER_VALUE, BLOCK_KEY_ENCRYPTED_KEY, BLOCK_KEY_HMAC_KEY, BLOCK_KEY_HMAC_VALUE, SEGMENT_SIZE = 4096, PACKAGE_HEADER_SIZE = 8;
185538
- var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
186097
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
185539
186098
  init_dist_B8HfvhaK_es();
185540
186099
  init_errors_CNaD6vcg_es();
185541
- init_detect_container_B6sqy7HZ_es();
186100
+ init_detect_container_sTWXwOzh_es();
185542
186101
  CFB_SIGNATURE = new Uint8Array([
185543
186102
  208,
185544
186103
  207,
@@ -185607,7 +186166,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
185607
186166
  ]);
185608
186167
  });
185609
186168
 
185610
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
186169
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
185611
186170
  function sniffEncoding(u8) {
185612
186171
  if (u8.length >= 2) {
185613
186172
  const b0 = u8[0], b1 = u8[1];
@@ -185923,11 +186482,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
185923
186482
  return new Uint8Array(0);
185924
186483
  }
185925
186484
  async getDocxData(file, isNode3 = false, options = {}) {
185926
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
186485
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
185927
186486
  const containerType = detectContainerType2(await this.#peekBytes(file, 8));
185928
186487
  let fileData = file;
185929
186488
  if (containerType === "cfb") {
185930
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
186489
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
185931
186490
  const result = await decryptDocxIfNeeded2(file instanceof Uint8Array ? file : file instanceof ArrayBuffer ? new Uint8Array(file) : new Uint8Array(await file.arrayBuffer()), { password: options.password });
185932
186491
  fileData = result.data;
185933
186492
  this.decryptedFileData = result.data;
@@ -186280,7 +186839,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
186280
186839
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
186281
186840
  }
186282
186841
  }, DocxZipper_default;
186283
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
186842
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
186284
186843
  init_rolldown_runtime_Bg48TavK_es();
186285
186844
  init_jszip_C49i9kUs_es();
186286
186845
  init_xml_js_CqGKpaft_es();
@@ -222159,9 +222718,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
222159
222718
  init_unified_Dsuw2be5_es();
222160
222719
  });
222161
222720
 
222162
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
222163
- var exports_rehype_parse_q8NfsLv7_es = {};
222164
- __export(exports_rehype_parse_q8NfsLv7_es, {
222721
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
222722
+ var exports_rehype_parse_DTSDs3kr_es = {};
222723
+ __export(exports_rehype_parse_DTSDs3kr_es, {
222165
222724
  default: () => rehypeParse
222166
222725
  });
222167
222726
  function merge2(definitions, space) {
@@ -228110,7 +228669,7 @@ var Schema2 = class {
228110
228669
  }
228111
228670
  }
228112
228671
  }, TABLE_VOID_ELEMENTS, errors, base3 = "https://html.spec.whatwg.org/multipage/parsing.html#parse-error-", dashToCamelRe, formatCRe, formatXRe, fatalities, emptyOptions3;
228113
- var init_rehype_parse_q8NfsLv7_es = __esm(() => {
228672
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
228114
228673
  init_rolldown_runtime_Bg48TavK_es();
228115
228674
  init_default_BqgWzMfR_es();
228116
228675
  init_lib_CYqLdG4z_es();
@@ -230855,9 +231414,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
230855
231414
  emptyOptions3 = {};
230856
231415
  });
230857
231416
 
230858
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
230859
- var exports_rehype_remark_CKg94dxK_es = {};
230860
- __export(exports_rehype_remark_CKg94dxK_es, {
231417
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
231418
+ var exports_rehype_remark_Bt5njn02_es = {};
231419
+ __export(exports_rehype_remark_Bt5njn02_es, {
230861
231420
  default: () => rehypeRemark
230862
231421
  });
230863
231422
  function anyFactory2(tests) {
@@ -232477,7 +233036,7 @@ var env, deserializer = ($2, _2) => {
232477
233036
  if (is(parent.children[index2], index2, parent))
232478
233037
  return parent.children[index2];
232479
233038
  }, searchLineFeeds, searchTabOrSpaces, br$1, cell, p$1, row, notRendered, blockOrCaption, prefix = "language-", defaultChecked = "[x]", defaultUnchecked = "[ ]", own$12, list$1, basic, meta, defaultQuotes, nodeHandlers2, handlers2, own6, emptyOptions4, defaults;
232480
- var init_rehype_remark_CKg94dxK_es = __esm(() => {
233039
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
232481
233040
  init_lib_DEff_P2k_es();
232482
233041
  env = typeof self === "object" ? self : globalThis;
232483
233042
  ({ toString: toString$1 } = {});
@@ -232871,7 +233430,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
232871
233430
  init_remark_gfm_BhnWr3yf_es();
232872
233431
  });
232873
233432
 
232874
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
233433
+ // ../../packages/superdoc/dist/chunks/src-DIVxfqYC.es.js
232875
233434
  function deleteProps(obj, propOrProps) {
232876
233435
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
232877
233436
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -232945,7 +233504,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
232945
233504
  }
232946
233505
  function getSuperdocVersion() {
232947
233506
  try {
232948
- return "1.38.0";
233507
+ return "1.39.0";
232949
233508
  } catch {
232950
233509
  return "unknown";
232951
233510
  }
@@ -264462,7 +265021,12 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
264462
265021
  const { tr } = editor.state;
264463
265022
  const tabType = editor.schema.nodes?.tab;
264464
265023
  const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
264465
- tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, { parentAllowsTab }));
265024
+ const lineBreakType = editor.schema.nodes?.lineBreak;
265025
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content3) ? parentAllowsNodeAt(tr, pos, lineBreakType) : false;
265026
+ tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, {
265027
+ parentAllowsTab,
265028
+ parentAllowsLineBreak
265029
+ }));
264466
265030
  dispatchTransaction$1(editor, tr);
264467
265031
  return true;
264468
265032
  }
@@ -306595,17 +307159,25 @@ var Node$13 = class Node$14 {
306595
307159
  this.deco = deco;
306596
307160
  }
306597
307161
  }, searchKey, BLOCK_SEPARATOR = `
306598
- `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node3) => node3?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, SearchIndex, customSearchHighlightsKey, isRegExp2 = (value) => Object.prototype.toString.call(value) === "[object RegExp]", SEARCH_POSITION_TRACKER_TYPE = "search-match", DEFAULT_SEARCH_MODEL = "raw", normalizeSearchModel = (value) => value === "visible" ? "visible" : DEFAULT_SEARCH_MODEL, mapIndexMatchesToDocMatches = ({ searchIndex, indexMatches, doc: doc$12, positionTracker }) => {
307162
+ `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node3) => node3?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, readLeafText = (node3) => {
307163
+ const leafText = node3?.type?.spec?.leafText;
307164
+ if (typeof leafText === "function")
307165
+ return leafText(node3);
307166
+ if (typeof leafText === "string")
307167
+ return leafText;
307168
+ return ATOM_PLACEHOLDER;
307169
+ }, SearchIndex, customSearchHighlightsKey, isRegExp2 = (value) => Object.prototype.toString.call(value) === "[object RegExp]", SEARCH_POSITION_TRACKER_TYPE = "search-match", DEFAULT_SEARCH_MODEL = "raw", normalizeSearchModel = (value) => value === "visible" ? "visible" : DEFAULT_SEARCH_MODEL, mapIndexMatchesToDocMatches = ({ searchIndex, indexMatches, doc: doc$12, positionTracker }) => {
306599
307170
  const matches2 = [];
306600
307171
  for (const indexMatch of indexMatches) {
306601
307172
  const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
306602
307173
  if (ranges.length === 0)
306603
307174
  continue;
306604
307175
  const matchTexts = ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to));
307176
+ const matchText = typeof indexMatch.text === "string" ? indexMatch.text : matchTexts.join("");
306605
307177
  const match$1 = {
306606
307178
  from: ranges[0].from,
306607
307179
  to: ranges[ranges.length - 1].to,
306608
- text: matchTexts.join(""),
307180
+ text: matchText,
306609
307181
  id: v4_default(),
306610
307182
  ranges,
306611
307183
  trackerIds: []
@@ -309825,7 +310397,7 @@ var Node$13 = class Node$14 {
309825
310397
  domAvailabilityCache = false;
309826
310398
  return false;
309827
310399
  }
309828
- }, summaryVersion = "1.38.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
310400
+ }, summaryVersion = "1.39.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
309829
310401
  const container = document.createElement("div");
309830
310402
  container.innerHTML = html3;
309831
310403
  const result = [];
@@ -311011,7 +311583,7 @@ var Node$13 = class Node$14 {
311011
311583
  return () => {};
311012
311584
  const handle3 = setInterval(callback, intervalMs);
311013
311585
  return () => clearInterval(handle3);
311014
- }, 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.38.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
311586
+ }, 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.39.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
311015
311587
  if (!isTrackedReviewMark(mark2))
311016
311588
  return null;
311017
311589
  const id2 = typeof mark2.attrs?.id === "string" ? mark2.attrs.id : "";
@@ -330189,19 +330761,19 @@ menclose::after {
330189
330761
  return;
330190
330762
  console.log(...args$1);
330191
330763
  }, 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, TRACKED_MARK_NAMES;
330192
- var init_src_DEnygTyz_es = __esm(() => {
330764
+ var init_src_DIVxfqYC_es = __esm(() => {
330193
330765
  init_rolldown_runtime_Bg48TavK_es();
330194
- init_SuperConverter_DOoAJ6Zk_es();
330766
+ init_SuperConverter_CfRQprW6_es();
330195
330767
  init_jszip_C49i9kUs_es();
330196
330768
  init_xml_js_CqGKpaft_es();
330197
- init_uuid_qzgm05fK_es();
330198
- init_create_headless_toolbar_DUhzXJ4D_es();
330769
+ init_uuid_B2wVPhPi_es();
330770
+ init_create_headless_toolbar_DOEFHsWP_es();
330199
330771
  init_constants_D9qj59G2_es();
330200
330772
  init_dist_B8HfvhaK_es();
330201
330773
  init_unified_Dsuw2be5_es();
330202
330774
  init_remark_gfm_BhnWr3yf_es();
330203
330775
  init_remark_stringify_6MMJfY0k_es();
330204
- init_DocxZipper_Bu2Fhqkw_es();
330776
+ init_DocxZipper_FUsfThjV_es();
330205
330777
  init__plugin_vue_export_helper_5t5P5NuM_es();
330206
330778
  init_eventemitter3_BnGqBE_Q_es();
330207
330779
  init_errors_CNaD6vcg_es();
@@ -334093,10 +334665,12 @@ ${err.toString()}`);
334093
334665
  return false;
334094
334666
  const { $from } = selection;
334095
334667
  let paragraph2 = null;
334668
+ let paragraphDepth = null;
334096
334669
  for (let d = $from.depth;d >= 0; d--) {
334097
334670
  const node3 = $from.node(d);
334098
334671
  if (node3.type.name === "paragraph") {
334099
334672
  paragraph2 = node3;
334673
+ paragraphDepth = d;
334100
334674
  break;
334101
334675
  }
334102
334676
  }
@@ -334106,7 +334680,14 @@ ${err.toString()}`);
334106
334680
  return false;
334107
334681
  if (!isVisuallyEmptyParagraph(paragraph2) && !hasOnlyBreakContent(paragraph2))
334108
334682
  return false;
334109
- const tr = state.tr.insertText(event.data);
334683
+ let tr = state.tr;
334684
+ if (hasOnlyBreakContent(paragraph2) && paragraphDepth != null) {
334685
+ const contentStart = $from.start(paragraphDepth);
334686
+ const contentEnd = $from.end(paragraphDepth);
334687
+ tr = tr.delete(contentStart, contentEnd).insertText(event.data, contentStart);
334688
+ tr = tr.setSelection(TextSelection.create(tr.doc, contentStart + event.data.length));
334689
+ } else
334690
+ tr = tr.insertText(event.data);
334110
334691
  view.dispatch(tr);
334111
334692
  event.preventDefault();
334112
334693
  return true;
@@ -334426,6 +335007,8 @@ ${err.toString()}`);
334426
335007
  selectable: false,
334427
335008
  content: "",
334428
335009
  atom: true,
335010
+ leafText: () => `
335011
+ `,
334429
335012
  addOptions() {
334430
335013
  return {};
334431
335014
  },
@@ -348257,7 +348840,7 @@ function print() { __p += __j.call(arguments, '') }
348257
348840
  if (searchModel === "visible")
348258
348841
  this.#buildVisible(doc$12);
348259
348842
  else
348260
- this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, ATOM_PLACEHOLDER);
348843
+ this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, readLeafText);
348261
348844
  this.segments = [];
348262
348845
  this.docSize = doc$12.content.size;
348263
348846
  this.doc = doc$12;
@@ -348304,7 +348887,11 @@ function print() { __p += __j.call(arguments, '') }
348304
348887
  return;
348305
348888
  }
348306
348889
  if (node3.isLeaf) {
348307
- parts.push(ATOM_PLACEHOLDER);
348890
+ if (hasTrackDeleteMark$2(node3)) {
348891
+ appendDeletionBarrier();
348892
+ return;
348893
+ }
348894
+ parts.push(readLeafText(node3));
348308
348895
  emittedDeletionBarrier = false;
348309
348896
  return;
348310
348897
  }
@@ -348367,26 +348954,43 @@ function print() { __p += __j.call(arguments, '') }
348367
348954
  return offset$1;
348368
348955
  }
348369
348956
  if (node3.isLeaf) {
348957
+ if (searchModel === "visible" && hasTrackDeleteMark$2(node3)) {
348958
+ if (context?.deletionBarrierActive)
348959
+ return offset$1;
348960
+ addSegment({
348961
+ offsetStart: offset$1,
348962
+ offsetEnd: offset$1 + 1,
348963
+ docFrom: docPos,
348964
+ docTo: docPos + node3.nodeSize,
348965
+ kind: "atom"
348966
+ });
348967
+ if (context)
348968
+ context.deletionBarrierActive = true;
348969
+ return offset$1 + 1;
348970
+ }
348370
348971
  if (context && searchModel === "visible")
348371
348972
  context.deletionBarrierActive = false;
348973
+ const leafText = readLeafText(node3);
348974
+ if (leafText.length === 0)
348975
+ return offset$1;
348372
348976
  if (node3.type.name === "hard_break") {
348373
348977
  addSegment({
348374
348978
  offsetStart: offset$1,
348375
- offsetEnd: offset$1 + 1,
348979
+ offsetEnd: offset$1 + leafText.length,
348376
348980
  docFrom: docPos,
348377
348981
  docTo: docPos + node3.nodeSize,
348378
348982
  kind: "hardBreak"
348379
348983
  });
348380
- return offset$1 + 1;
348984
+ return offset$1 + leafText.length;
348381
348985
  }
348382
348986
  addSegment({
348383
348987
  offsetStart: offset$1,
348384
- offsetEnd: offset$1 + 1,
348988
+ offsetEnd: offset$1 + leafText.length,
348385
348989
  docFrom: docPos,
348386
348990
  docTo: docPos + node3.nodeSize,
348387
348991
  kind: "atom"
348388
348992
  });
348389
- return offset$1 + 1;
348993
+ return offset$1 + leafText.length;
348390
348994
  }
348391
348995
  return this.#walkNodeContent(node3, docPos + 1, offset$1, addSegment, searchModel, context);
348392
348996
  }
@@ -348403,24 +349007,56 @@ function print() { __p += __j.call(arguments, '') }
348403
349007
  }
348404
349008
  offsetRangeToDocRanges(start$1, end$1) {
348405
349009
  const ranges = [];
349010
+ let current = null;
348406
349011
  for (const segment of this.segments) {
348407
349012
  if (segment.offsetEnd <= start$1)
348408
349013
  continue;
348409
349014
  if (segment.offsetStart >= end$1)
348410
349015
  break;
348411
- if (segment.kind !== "text")
349016
+ if (segment.kind === "blockSep") {
349017
+ if (current) {
349018
+ ranges.push({
349019
+ from: current.from,
349020
+ to: current.to
349021
+ });
349022
+ current = null;
349023
+ }
348412
349024
  continue;
349025
+ }
348413
349026
  const overlapStart = Math.max(start$1, segment.offsetStart);
348414
349027
  const overlapEnd = Math.min(end$1, segment.offsetEnd);
348415
- if (overlapStart < overlapEnd) {
348416
- const startInSegment = overlapStart - segment.offsetStart;
348417
- const endInSegment = overlapEnd - segment.offsetStart;
348418
- ranges.push({
348419
- from: segment.docFrom + startInSegment,
348420
- to: segment.docFrom + endInSegment
348421
- });
349028
+ if (overlapStart >= overlapEnd)
349029
+ continue;
349030
+ let from$1;
349031
+ let to;
349032
+ if (segment.kind === "text") {
349033
+ from$1 = segment.docFrom + (overlapStart - segment.offsetStart);
349034
+ to = segment.docFrom + (overlapEnd - segment.offsetStart);
349035
+ } else {
349036
+ from$1 = segment.docFrom;
349037
+ to = segment.docTo;
349038
+ }
349039
+ if (current && segment.offsetStart === current.offsetEnd && from$1 === current.to) {
349040
+ current.to = to;
349041
+ current.offsetEnd = overlapEnd;
349042
+ } else {
349043
+ if (current)
349044
+ ranges.push({
349045
+ from: current.from,
349046
+ to: current.to
349047
+ });
349048
+ current = {
349049
+ from: from$1,
349050
+ to,
349051
+ offsetEnd: overlapEnd
349052
+ };
348422
349053
  }
348423
349054
  }
349055
+ if (current)
349056
+ ranges.push({
349057
+ from: current.from,
349058
+ to: current.to
349059
+ });
348424
349060
  return ranges;
348425
349061
  }
348426
349062
  offsetToDocPos(offset$1) {
@@ -356184,8 +356820,8 @@ function print() { __p += __j.call(arguments, '') }
356184
356820
  try {
356185
356821
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
356186
356822
  Promise.resolve().then(() => (init_unified_vFnLRfAM_es(), exports_unified_vFnLRfAM_es)),
356187
- Promise.resolve().then(() => (init_rehype_parse_q8NfsLv7_es(), exports_rehype_parse_q8NfsLv7_es)),
356188
- Promise.resolve().then(() => (init_rehype_remark_CKg94dxK_es(), exports_rehype_remark_CKg94dxK_es)),
356823
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
356824
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
356189
356825
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
356190
356826
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
356191
356827
  ]);
@@ -365035,11 +365671,11 @@ function print() { __p += __j.call(arguments, '') }
365035
365671
  ]);
365036
365672
  });
365037
365673
 
365038
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
365674
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
365039
365675
  var headlessToolbarConstants, 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;
365040
- var init_create_super_doc_ui_CmcU7hTR_es = __esm(() => {
365041
- init_SuperConverter_DOoAJ6Zk_es();
365042
- init_create_headless_toolbar_DUhzXJ4D_es();
365676
+ var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
365677
+ init_SuperConverter_CfRQprW6_es();
365678
+ init_create_headless_toolbar_DOEFHsWP_es();
365043
365679
  headlessToolbarConstants = {
365044
365680
  DEFAULT_TEXT_ALIGN_OPTIONS: [
365045
365681
  {
@@ -365321,16 +365957,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
365321
365957
 
365322
365958
  // ../../packages/superdoc/dist/super-editor.es.js
365323
365959
  var init_super_editor_es = __esm(() => {
365324
- init_src_DEnygTyz_es();
365325
- init_SuperConverter_DOoAJ6Zk_es();
365960
+ init_src_DIVxfqYC_es();
365961
+ init_SuperConverter_CfRQprW6_es();
365326
365962
  init_jszip_C49i9kUs_es();
365327
365963
  init_xml_js_CqGKpaft_es();
365328
- init_create_headless_toolbar_DUhzXJ4D_es();
365964
+ init_create_headless_toolbar_DOEFHsWP_es();
365329
365965
  init_constants_D9qj59G2_es();
365330
365966
  init_dist_B8HfvhaK_es();
365331
365967
  init_unified_Dsuw2be5_es();
365332
- init_DocxZipper_Bu2Fhqkw_es();
365333
- init_create_super_doc_ui_CmcU7hTR_es();
365968
+ init_DocxZipper_FUsfThjV_es();
365969
+ init_create_super_doc_ui_CanMzNxA_es();
365334
365970
  init_ui_C5PAS9hY_es();
365335
365971
  init_eventemitter3_BnGqBE_Q_es();
365336
365972
  init_errors_CNaD6vcg_es();