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

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 +1826 -461
  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-BSDZ3hYr.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,100 @@ 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();
102488
- }
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);
102470
+ function normalizeFamilyName(name) {
102471
+ return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
102505
102472
  }
102506
- function stripFamilyQuotes(family$1) {
102507
- return family$1.trim().replace(/^["']|["']$/g, "");
102473
+ function buildFallback(row, physicalFamily, verdict, faceSlot, faceSource) {
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
+ generic: row.generic,
102483
+ ...faceSource ? { faceSource: { ...faceSource } } : {},
102484
+ ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
102485
+ };
102508
102486
  }
102509
- function splitStack(cssFontFamily) {
102510
- return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
102487
+ function decideRow(row, canRenderFamily$1) {
102488
+ const { policyAction, physicalFamily, verdict, evidenceId, generic } = row;
102489
+ if (policyAction === "preserve_only")
102490
+ return {
102491
+ kind: "preserve_only",
102492
+ evidenceId,
102493
+ generic
102494
+ };
102495
+ if (policyAction === "customer_supplied")
102496
+ return {
102497
+ kind: "customer_supplied",
102498
+ evidenceId,
102499
+ generic
102500
+ };
102501
+ if (physicalFamily === null)
102502
+ return {
102503
+ kind: "no_recommended_fallback",
102504
+ evidenceId,
102505
+ generic
102506
+ };
102507
+ if (canRenderFamily$1 && !canRenderFamily$1(physicalFamily))
102508
+ return {
102509
+ kind: "asset_missing",
102510
+ substituteFamily: physicalFamily,
102511
+ verdict,
102512
+ evidenceId,
102513
+ generic
102514
+ };
102515
+ return {
102516
+ kind: "fallback",
102517
+ fallback: buildFallback(row, physicalFamily, verdict)
102518
+ };
102511
102519
  }
102512
- function createFontResolver() {
102513
- return new FontResolver;
102520
+ function isFaceScoped(row) {
102521
+ const f2 = row.faces;
102522
+ return f2.regular || f2.bold || f2.italic || f2.boldItalic;
102514
102523
  }
102515
- function resolveFontFamily(logicalFamily) {
102516
- return defaultResolver.resolveFontFamily(logicalFamily);
102524
+ function faceSourceFor(row, face) {
102525
+ const explicit = row.faceSources?.[face];
102526
+ if (explicit)
102527
+ return explicit;
102528
+ return isFaceScoped(row) && row.faces[face] ? { kind: "real" } : undefined;
102529
+ }
102530
+ function decideRowForFace(row, face, canRenderFamily$1) {
102531
+ const base$1 = decideRow(row, canRenderFamily$1);
102532
+ if (base$1.kind !== "fallback")
102533
+ return base$1;
102534
+ const faceSource = faceSourceFor(row, face);
102535
+ if (isFaceScoped(row) && !faceSource)
102536
+ return {
102537
+ kind: "face_missing",
102538
+ substituteFamily: base$1.fallback.substituteFamily,
102539
+ evidenceId: row.evidenceId,
102540
+ generic: row.generic
102541
+ };
102542
+ const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
102543
+ const projectedFaceSource = faceSource?.kind === "synthetic" ? faceSource : undefined;
102544
+ return {
102545
+ kind: "fallback",
102546
+ fallback: buildFallback(row, base$1.fallback.substituteFamily, faceVerdict, face, projectedFaceSource)
102547
+ };
102517
102548
  }
102518
- function resolvePhysicalFamily(cssFontFamily) {
102519
- return defaultResolver.resolvePhysicalFamily(cssFontFamily);
102549
+ function getFallbackDecision(family$1, options = {}) {
102550
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
102551
+ return row ? decideRow(row, options.canRenderFamily) : { kind: "unknown" };
102520
102552
  }
102521
- function resolveFace(logicalFamily, face, hasFace) {
102522
- return defaultResolver.resolveFace(logicalFamily, face, hasFace);
102553
+ function getRenderableFallback(family$1, options) {
102554
+ const decision = getFallbackDecision(family$1, options);
102555
+ return decision.kind === "fallback" ? decision.fallback : null;
102523
102556
  }
102524
- function getFontConfigVersion() {
102525
- return fontConfigVersion;
102557
+ function getFallbackDecisionForFace(family$1, face, options = {}) {
102558
+ const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
102559
+ return row ? decideRowForFace(row, face, options.canRenderFamily) : { kind: "unknown" };
102526
102560
  }
102527
- function bumpFontConfigVersion() {
102528
- return fontConfigVersion += 1;
102561
+ function getRenderableFallbackForFace(family$1, face, options) {
102562
+ const decision = getFallbackDecisionForFace(family$1, face, options);
102563
+ return decision.kind === "fallback" ? decision.fallback : null;
102529
102564
  }
102530
102565
  function fourFaces(filePrefix) {
102531
102566
  return [
@@ -102558,6 +102593,129 @@ function family(name, filePrefix, license) {
102558
102593
  faces: fourFaces(filePrefix)
102559
102594
  };
102560
102595
  }
102596
+ function familyWithFaces(name, license, faces) {
102597
+ return {
102598
+ family: name,
102599
+ license,
102600
+ faces
102601
+ };
102602
+ }
102603
+ function normalizeFamilyKey$1(family$1) {
102604
+ return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
102605
+ }
102606
+ function sortPairs(pairs) {
102607
+ return pairs.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
102608
+ }
102609
+ function faceSlotFor$1({ weight, style }) {
102610
+ const bold2 = weight === "700";
102611
+ const italic = style === "italic";
102612
+ if (bold2 && italic)
102613
+ return "boldItalic";
102614
+ if (bold2)
102615
+ return "bold";
102616
+ if (italic)
102617
+ return "italic";
102618
+ return "regular";
102619
+ }
102620
+ function faceKeyForSlot(slot) {
102621
+ switch (slot) {
102622
+ case "bold":
102623
+ return {
102624
+ weight: "700",
102625
+ style: "normal"
102626
+ };
102627
+ case "italic":
102628
+ return {
102629
+ weight: "400",
102630
+ style: "italic"
102631
+ };
102632
+ case "boldItalic":
102633
+ return {
102634
+ weight: "700",
102635
+ style: "italic"
102636
+ };
102637
+ case "regular":
102638
+ return {
102639
+ weight: "400",
102640
+ style: "normal"
102641
+ };
102642
+ }
102643
+ }
102644
+ function reasonForFallback(policyAction) {
102645
+ return policyAction === "category_fallback" ? "category_fallback" : "bundled_substitute";
102646
+ }
102647
+ function resolveDocfontsFace(primary, face, hasFace) {
102648
+ const decision = getFallbackDecisionForFace(primary, faceSlotFor$1(face), { canRenderFamily });
102649
+ if (decision.kind === "face_missing")
102650
+ return {
102651
+ physical: primary,
102652
+ reason: "fallback_face_absent"
102653
+ };
102654
+ if (decision.kind !== "fallback")
102655
+ return null;
102656
+ const fallback = decision.fallback;
102657
+ if (fallback.policyAction !== "substitute" && fallback.policyAction !== "category_fallback")
102658
+ return null;
102659
+ if (hasFace(fallback.substituteFamily, face.weight, face.style))
102660
+ return {
102661
+ physical: fallback.substituteFamily,
102662
+ reason: reasonForFallback(fallback.policyAction)
102663
+ };
102664
+ const sourceFace = fallback.faceSource?.kind === "synthetic" ? faceKeyForSlot(fallback.faceSource.from) : face;
102665
+ if (!hasFace(fallback.substituteFamily, sourceFace.weight, sourceFace.style))
102666
+ return fallback.policyAction === "substitute" ? {
102667
+ physical: primary,
102668
+ reason: "fallback_face_absent"
102669
+ } : null;
102670
+ const sourceDiffers = sourceFace.weight !== face.weight || sourceFace.style !== face.style;
102671
+ return {
102672
+ physical: fallback.substituteFamily,
102673
+ reason: reasonForFallback(fallback.policyAction),
102674
+ ...sourceDiffers ? { sourceFace } : {}
102675
+ };
102676
+ }
102677
+ function deriveBundledSubstitutes() {
102678
+ const substitutes = {};
102679
+ for (const row of SUBSTITUTION_EVIDENCE) {
102680
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
102681
+ if (fallback?.policyAction === "substitute")
102682
+ substitutes[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
102683
+ }
102684
+ return Object.freeze(substitutes);
102685
+ }
102686
+ function deriveCategoryFallbacks() {
102687
+ const fallbacks = {};
102688
+ for (const row of SUBSTITUTION_EVIDENCE) {
102689
+ const fallback = getRenderableFallback(row.logicalFamily, { canRenderFamily });
102690
+ if (fallback?.policyAction === "category_fallback")
102691
+ fallbacks[normalizeFamilyKey$1(row.logicalFamily)] = fallback.substituteFamily;
102692
+ }
102693
+ return Object.freeze(fallbacks);
102694
+ }
102695
+ function stripFamilyQuotes(family$1) {
102696
+ return family$1.trim().replace(/^["']|["']$/g, "");
102697
+ }
102698
+ function splitStack(cssFontFamily) {
102699
+ return cssFontFamily.split(",").map((part) => part.trim()).filter(Boolean);
102700
+ }
102701
+ function createFontResolver() {
102702
+ return new FontResolver;
102703
+ }
102704
+ function resolveFontFamily(logicalFamily) {
102705
+ return defaultResolver.resolveFontFamily(logicalFamily);
102706
+ }
102707
+ function resolvePhysicalFamily(cssFontFamily) {
102708
+ return defaultResolver.resolvePhysicalFamily(cssFontFamily);
102709
+ }
102710
+ function resolveFace(logicalFamily, face, hasFace) {
102711
+ return defaultResolver.resolveFace(logicalFamily, face, hasFace);
102712
+ }
102713
+ function getFontConfigVersion() {
102714
+ return fontConfigVersion;
102715
+ }
102716
+ function bumpFontConfigVersion() {
102717
+ return fontConfigVersion += 1;
102718
+ }
102561
102719
  function withTrailingSlash(base$1) {
102562
102720
  return base$1.endsWith("/") ? base$1 : `${base$1}/`;
102563
102721
  }
@@ -102609,6 +102767,17 @@ function installBundledSubstitutes(registry, options = {}) {
102609
102767
  });
102610
102768
  }
102611
102769
  }
102770
+ function toEvidence(fallback) {
102771
+ if (!fallback)
102772
+ return;
102773
+ return {
102774
+ evidenceId: fallback.evidenceId,
102775
+ policyAction: fallback.policyAction,
102776
+ verdict: fallback.verdict,
102777
+ lineBreakSafe: fallback.lineBreakSafe,
102778
+ ...fallback.glyphExceptions ? { glyphExceptions: fallback.glyphExceptions } : {}
102779
+ };
102780
+ }
102612
102781
  function buildFontReport(logicalFamilies, registry, resolver$1) {
102613
102782
  const seen = /* @__PURE__ */ new Set;
102614
102783
  const report = [];
@@ -102618,13 +102787,15 @@ function buildFontReport(logicalFamilies, registry, resolver$1) {
102618
102787
  seen.add(logical);
102619
102788
  const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFontFamily(logical) : resolveFontFamily(logical);
102620
102789
  const loadStatus = registry.getStatus(physicalFamily);
102790
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallback(logical, RENDER_ALL)) : undefined;
102621
102791
  report.push({
102622
102792
  logicalFamily: logical,
102623
102793
  physicalFamily,
102624
102794
  reason,
102625
102795
  loadStatus,
102626
102796
  exportFamily: logical,
102627
- missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
102797
+ missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded",
102798
+ ...evidence ? { evidence } : {}
102628
102799
  });
102629
102800
  }
102630
102801
  return report;
@@ -102644,13 +102815,16 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
102644
102815
  weight,
102645
102816
  style
102646
102817
  };
102647
- const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
102818
+ const resolution = resolver$1 ? resolver$1.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
102819
+ const { physicalFamily, reason } = resolution;
102820
+ const statusFace = resolution.sourceFace ?? face;
102648
102821
  const loadStatus = registry.getFaceStatus({
102649
102822
  family: physicalFamily,
102650
- weight,
102651
- style
102823
+ weight: statusFace.weight,
102824
+ style: statusFace.style
102652
102825
  });
102653
102826
  const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
102827
+ const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallbackForFace(logicalFamily, faceSlotFor(face), RENDER_ALL)) : undefined;
102654
102828
  report.push({
102655
102829
  logicalFamily,
102656
102830
  physicalFamily: reason === "registered_face" ? logicalFamily : physicalFamily,
@@ -102658,7 +102832,8 @@ function buildFaceReport(usedFaces, registry, resolver$1) {
102658
102832
  loadStatus,
102659
102833
  exportFamily: logicalFamily,
102660
102834
  missing,
102661
- face
102835
+ face,
102836
+ ...evidence ? { evidence } : {}
102662
102837
  });
102663
102838
  }
102664
102839
  return report;
@@ -102761,7 +102936,7 @@ function deriveOfferings() {
102761
102936
  return {
102762
102937
  logicalFamily: row.logicalFamily,
102763
102938
  physicalFamily: row.physicalFamily,
102764
- generic: row.physicalFamily && PHYSICAL_GENERIC[row.physicalFamily] || "sans-serif",
102939
+ generic: row.generic,
102765
102940
  offering: classifyOffering(row.policyAction, row.verdict, row.physicalFamily, bundled),
102766
102941
  bundled,
102767
102942
  verdict: row.verdict,
@@ -102770,12 +102945,11 @@ function deriveOfferings() {
102770
102945
  });
102771
102946
  return Object.freeze(offerings);
102772
102947
  }
102773
- function getDefaultFontOfferings() {
102774
- const rank$1 = (name) => {
102775
- const i$1 = DEFAULT_FONT_ORDER.indexOf(name);
102776
- return i$1 === -1 ? DEFAULT_FONT_ORDER.length : i$1;
102777
- };
102778
- return FONT_OFFERINGS.filter((o) => o.offering === "default").sort((a, b) => rank$1(a.logicalFamily) - rank$1(b.logicalFamily));
102948
+ function compareLogicalFamily(a, b) {
102949
+ return a.logicalFamily.localeCompare(b.logicalFamily, "en", { sensitivity: "base" });
102950
+ }
102951
+ function getBuiltInToolbarFontOfferings() {
102952
+ return FONT_OFFERINGS.filter((o) => o.offering === "default" || o.bundled && ADVERTISED_BUILT_IN_TOOLBAR_FAMILIES.has(o.logicalFamily) && (o.offering === "qualified" || o.offering === "category_fallback")).sort(compareLogicalFamily);
102779
102953
  }
102780
102954
  function fontOfferingStack(offering) {
102781
102955
  return `${offering.logicalFamily}, ${offering.generic}`;
@@ -102784,11 +102958,38 @@ function fontOfferingRenderStack(offering) {
102784
102958
  return offering.physicalFamily ? `${offering.physicalFamily}, ${offering.generic}` : fontOfferingStack(offering);
102785
102959
  }
102786
102960
  function getDefaultFontFamilyOptions() {
102787
- return getDefaultFontOfferings().map((offering) => ({
102961
+ return getBuiltInToolbarFontOfferings().map((offering) => ({
102788
102962
  label: offering.logicalFamily,
102789
102963
  value: fontOfferingStack(offering)
102790
102964
  }));
102791
102965
  }
102966
+ function normalizeKey(family$1) {
102967
+ return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
102968
+ }
102969
+ function isRegularFace(rec) {
102970
+ return rec.face?.weight === "400" && rec.face?.style === "normal";
102971
+ }
102972
+ function buildDocumentFontOptions(usedFaces, registry, resolver$1) {
102973
+ const faceRecords = buildFaceReport(usedFaces, registry, resolver$1);
102974
+ const agg = /* @__PURE__ */ new Map;
102975
+ for (const rec of faceRecords) {
102976
+ const key = normalizeKey(rec.logicalFamily);
102977
+ const existing = agg.get(key);
102978
+ if (!existing) {
102979
+ agg.set(key, rec);
102980
+ continue;
102981
+ }
102982
+ if (isRegularFace(rec) && !isRegularFace(existing))
102983
+ agg.set(key, rec);
102984
+ }
102985
+ const options = [];
102986
+ for (const rep of agg.values())
102987
+ options.push({
102988
+ logicalFamily: rep.logicalFamily,
102989
+ previewFamily: rep.physicalFamily
102990
+ });
102991
+ return options;
102992
+ }
102792
102993
  function writeAppStatistics(convertedXml, stats) {
102793
102994
  const elements = ensureElements$1(ensureAppPropertiesRoot(convertedXml));
102794
102995
  upsertSimpleElement(elements, "Words", String(stats.words));
@@ -104778,12 +104979,14 @@ function applyTocMetadata(blocks, metadata) {
104778
104979
  };
104779
104980
  if (metadata.instruction)
104780
104981
  block.attrs.tocInstruction = metadata.instruction;
104982
+ if (metadata.tocId)
104983
+ block.attrs.tocId = metadata.tocId;
104781
104984
  }
104782
104985
  });
104783
104986
  }
104784
104987
  function processTocChildren(children, metadata, context, outputArrays) {
104785
104988
  const paragraphConverter = context.converters.paragraphToFlowBlocks;
104786
- const { docPartGallery, docPartObjectId, tocInstruction } = metadata;
104989
+ const { docPartGallery, docPartObjectId, tocInstruction, tocId } = metadata;
104787
104990
  const { blocks, recordBlockKind } = outputArrays;
104788
104991
  children.forEach((child) => {
104789
104992
  if (child.type === "paragraph") {
@@ -104808,7 +105011,8 @@ function processTocChildren(children, metadata, context, outputArrays) {
104808
105011
  applyTocMetadata(paragraphBlocks, {
104809
105012
  gallery: docPartGallery,
104810
105013
  uniqueId: docPartObjectId,
104811
- instruction: tocInstruction
105014
+ instruction: tocInstruction,
105015
+ tocId
104812
105016
  });
104813
105017
  applySdtMetadataToParagraphBlocks(paragraphBlocks.filter((b) => b.kind === "paragraph"), metadata.sdtMetadata);
104814
105018
  paragraphBlocks.forEach((block) => {
@@ -104823,7 +105027,8 @@ function processTocChildren(children, metadata, context, outputArrays) {
104823
105027
  docPartGallery,
104824
105028
  docPartObjectId,
104825
105029
  tocInstruction: finalInstruction,
104826
- sdtMetadata: metadata.sdtMetadata
105030
+ sdtMetadata: metadata.sdtMetadata,
105031
+ tocId
104827
105032
  }, context, outputArrays);
104828
105033
  }
104829
105034
  });
@@ -104831,7 +105036,11 @@ function processTocChildren(children, metadata, context, outputArrays) {
104831
105036
  function handleTableOfContentsNode(node3, context) {
104832
105037
  if (!Array.isArray(node3.content))
104833
105038
  return;
104834
- processTocChildren(node3.content, { tocInstruction: getNodeInstruction(node3) }, {
105039
+ const sdBlockId = node3.attrs?.sdBlockId;
105040
+ processTocChildren(node3.content, {
105041
+ tocInstruction: getNodeInstruction(node3),
105042
+ tocId: typeof sdBlockId === "string" ? sdBlockId : undefined
105043
+ }, {
104835
105044
  nextBlockId: context.nextBlockId,
104836
105045
  positions: context.positions,
104837
105046
  bookmarks: context.bookmarks,
@@ -105160,7 +105369,8 @@ function processDocumentPartObject(child, sectionMetadata, context, output, conv
105160
105369
  docPartGallery,
105161
105370
  docPartObjectId,
105162
105371
  tocInstruction,
105163
- sdtMetadata: docPartSdtMetadata
105372
+ sdtMetadata: docPartSdtMetadata,
105373
+ tocId: docPartObjectId ?? undefined
105164
105374
  }, {
105165
105375
  nextBlockId: context.nextBlockId,
105166
105376
  positions: context.positions,
@@ -105231,12 +105441,15 @@ function handleDocumentPartObjectNode(node3, context) {
105231
105441
  const tocInstruction = getNodeInstruction(node3);
105232
105442
  const docPartSdtMetadata = resolveNodeSdtMetadata(node3, "docPartObject");
105233
105443
  const paragraphToFlowBlocks$1 = converters$1.paragraphToFlowBlocks;
105444
+ const sdBlockId = node3.attrs?.sdBlockId;
105445
+ const tocId = docPartObjectId && docPartObjectId.length > 0 ? docPartObjectId : typeof sdBlockId === "string" && sdBlockId.length > 0 ? sdBlockId : undefined;
105234
105446
  if (docPartGallery === "Table of Contents")
105235
105447
  processTocChildren(Array.from(node3.content), {
105236
105448
  docPartGallery,
105237
105449
  docPartObjectId,
105238
105450
  tocInstruction,
105239
- sdtMetadata: docPartSdtMetadata
105451
+ sdtMetadata: docPartSdtMetadata,
105452
+ tocId
105240
105453
  }, {
105241
105454
  nextBlockId,
105242
105455
  positions,
@@ -105284,7 +105497,8 @@ function handleDocumentPartObjectNode(node3, context) {
105284
105497
  docPartGallery: docPartGallery ?? "",
105285
105498
  docPartObjectId,
105286
105499
  tocInstruction: getNodeInstruction(child) ?? tocInstruction,
105287
- sdtMetadata: docPartSdtMetadata
105500
+ sdtMetadata: docPartSdtMetadata,
105501
+ tocId
105288
105502
  };
105289
105503
  const tocContext = {
105290
105504
  nextBlockId,
@@ -107788,6 +108002,9 @@ function hasTrackDeleteMark(node3) {
107788
108002
  function shouldSkipTextNode(node3, options) {
107789
108003
  return isVisibleTextModel(options) && hasTrackDeleteMark(node3);
107790
108004
  }
108005
+ function shouldSkipLeafNode(node3, options) {
108006
+ return isVisibleTextModel(options) && hasTrackDeleteMark(node3);
108007
+ }
107791
108008
  function resolveSegmentPosition(targetOffset, segmentStart, segmentLength, docFrom, docTo) {
107792
108009
  if (segmentLength <= 1)
107793
108010
  return targetOffset <= segmentStart ? docFrom : docTo;
@@ -107819,7 +108036,13 @@ function pmPositionToTextOffset(blockNode, blockPos, pmPos, options) {
107819
108036
  return;
107820
108037
  }
107821
108038
  if (node3.isLeaf) {
107822
- if (pmPos >= docPos + node3.nodeSize)
108039
+ const endPos = docPos + node3.nodeSize;
108040
+ if (shouldSkipLeafNode(node3, options)) {
108041
+ if (pmPos < endPos)
108042
+ done = true;
108043
+ return;
108044
+ }
108045
+ if (pmPos >= endPos)
107823
108046
  offset += 1;
107824
108047
  else
107825
108048
  done = true;
@@ -107860,6 +108083,8 @@ function computeTextContentLength(blockNode, options) {
107860
108083
  return;
107861
108084
  }
107862
108085
  if (node3.isLeaf) {
108086
+ if (shouldSkipLeafNode(node3, options))
108087
+ return;
107863
108088
  length3 += 1;
107864
108089
  return;
107865
108090
  }
@@ -107919,6 +108144,8 @@ function resolveTextRangeInBlock(blockNode, blockPos, range, options) {
107919
108144
  return;
107920
108145
  }
107921
108146
  if (node3.isLeaf) {
108147
+ if (shouldSkipLeafNode(node3, options))
108148
+ return;
107922
108149
  advanceSegment(1, docPos, docPos + node3.nodeSize);
107923
108150
  return;
107924
108151
  }
@@ -107950,7 +108177,10 @@ function textContentInBlock(blockNode, options) {
107950
108177
  return;
107951
108178
  }
107952
108179
  if (node3.isLeaf) {
107953
- text$2 += "";
108180
+ if (shouldSkipLeafNode(node3, options))
108181
+ return;
108182
+ const leafText = node3.type?.spec?.leafText;
108183
+ text$2 += typeof leafText === "function" ? leafText(node3) : "";
107954
108184
  return;
107955
108185
  }
107956
108186
  let isFirstChild$1 = true;
@@ -107975,19 +108205,31 @@ function textContentInBlock(blockNode, options) {
107975
108205
  return text$2;
107976
108206
  }
107977
108207
  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");
108208
+ const normalized = text$2.includes("\r") ? text$2.replace(/\r\n?/g, `
108209
+ `) : text$2;
108210
+ const hasTab = normalized.includes("\t");
108211
+ const hasNewline = normalized.includes(`
108212
+ `);
108213
+ if (!hasTab && !hasNewline)
108214
+ return schema.text(normalized, marks);
108215
+ const tabNodeType = hasTab && opts.parentAllowsTab !== false ? schema.nodes?.tab : undefined;
108216
+ const lineBreakNodeType = hasNewline && opts.parentAllowsLineBreak !== false ? schema.nodes?.lineBreak : undefined;
108217
+ if (!tabNodeType && !lineBreakNodeType)
108218
+ return schema.text(normalized, marks);
108219
+ const tabMarks = marks ?? undefined;
108220
+ const splitPattern = [tabNodeType ? "\\t" : null, lineBreakNodeType ? "\\n" : null].filter(Boolean).join("|");
108221
+ const parts = normalized.split(/* @__PURE__ */ new RegExp(`(${splitPattern})`));
107985
108222
  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)
108223
+ for (const part of parts) {
108224
+ if (part === "")
108225
+ continue;
108226
+ if (part === "\t" && tabNodeType)
107990
108227
  nodes.push(tabNodeType.create(null, null, tabMarks));
108228
+ else if (part === `
108229
+ ` && lineBreakNodeType)
108230
+ nodes.push(lineBreakNodeType.create());
108231
+ else
108232
+ nodes.push(schema.text(part, marks));
107991
108233
  }
107992
108234
  return Fragment.from(nodes);
107993
108235
  }
@@ -108029,6 +108271,8 @@ function textBetweenWithTabs(doc$2, from5, to, blockSeparator, leafFallback, opt
108029
108271
  }
108030
108272
  if (node3.isLeaf) {
108031
108273
  if (node3.isInline) {
108274
+ if (options.textModel === "visible" && node3.marks?.some((mark) => mark.type.name === "trackDelete"))
108275
+ return false;
108032
108276
  const leafTextFn = node3.type?.spec?.leafText;
108033
108277
  if (typeof leafTextFn === "function")
108034
108278
  out += leafTextFn(node3);
@@ -129531,7 +129775,7 @@ var isRegExp = (value) => {
129531
129775
  tags.push(`</${name}>`);
129532
129776
  return tags;
129533
129777
  }
129534
- }, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
129778
+ }, 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
129779
  #overrides = /* @__PURE__ */ new Map;
129536
129780
  #embedded = /* @__PURE__ */ new Map;
129537
129781
  #version = 0;
@@ -129647,18 +129891,10 @@ var isRegExp = (value) => {
129647
129891
  physical: primary,
129648
129892
  reason: "registered_face"
129649
129893
  };
129894
+ const docfonts = resolveDocfontsFace(primary, face, hasFace);
129895
+ if (docfonts)
129896
+ return docfonts;
129650
129897
  const bundled = BUNDLED_SUBSTITUTES[key];
129651
- if (bundled && hasFace(bundled, face.weight, face.style))
129652
- return {
129653
- physical: bundled,
129654
- reason: "bundled_substitute"
129655
- };
129656
- const category = CATEGORY_FALLBACKS[key];
129657
- if (category && hasFace(category, face.weight, face.style))
129658
- return {
129659
- physical: category,
129660
- reason: "category_fallback"
129661
- };
129662
129898
  if (override || bundled)
129663
129899
  return {
129664
129900
  physical: primary,
@@ -129691,11 +129927,12 @@ var isRegExp = (value) => {
129691
129927
  }
129692
129928
  resolveFace(logicalFamily, face, hasFace) {
129693
129929
  const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
129694
- const { physical, reason } = this.#resolveFaceLadder(primary, face, hasFace);
129930
+ const { physical, reason, sourceFace } = this.#resolveFaceLadder(primary, face, hasFace);
129695
129931
  return {
129696
129932
  logicalFamily,
129697
129933
  physicalFamily: stripFamilyQuotes(physical),
129698
- reason
129934
+ reason,
129935
+ ...sourceFace ? { sourceFace } : {}
129699
129936
  };
129700
129937
  }
129701
129938
  resolvePhysicalFamilyForFace(cssFontFamily, face, hasFace) {
@@ -129720,7 +129957,17 @@ var isRegExp = (value) => {
129720
129957
  out.add(this.resolvePrimaryPhysicalFamily(family$1));
129721
129958
  return [...out];
129722
129959
  }
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 {
129960
+ }, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, faceSlotFor = ({ weight, style }) => {
129961
+ const bold2 = weight === "700";
129962
+ const italic = style === "italic";
129963
+ if (bold2 && italic)
129964
+ return "boldItalic";
129965
+ if (bold2)
129966
+ return "bold";
129967
+ if (italic)
129968
+ return "italic";
129969
+ return "regular";
129970
+ }, 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
129971
  #fontSet;
129725
129972
  #FontFaceCtor;
129726
129973
  #probeSize;
@@ -130061,7 +130308,7 @@ var isRegExp = (value) => {
130061
130308
  const detail = sources && sources.length ? ` from ${sources.join(", ")}` : "";
130062
130309
  console.warn(`[superdoc] font asset failed to load for "${family$1}"${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
130063
130310
  }
130064
- }, registriesByFontSet, domlessRegistry = null, PHYSICAL_GENERIC, BUNDLED_FAMILIES, FONT_OFFERINGS, DEFAULT_FONT_ORDER, prepareCommentParaIds = (comment) => {
130311
+ }, registriesByFontSet, domlessRegistry = null, BUNDLED_FAMILIES, ADVERTISED_BUILT_IN_TOOLBAR_FAMILIES, FONT_OFFERINGS, prepareCommentParaIds = (comment) => {
130065
130312
  return {
130066
130313
  ...comment,
130067
130314
  commentParaId: generateDocxRandomId()
@@ -134003,7 +134250,7 @@ var isRegExp = (value) => {
134003
134250
  sourceId: stringOf(primary.sourceId),
134004
134251
  revisionGroupId: stringOf(primary.revisionGroupId) || representativeRevisionId
134005
134252
  });
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 }) => {
134253
+ }, 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
134254
  if (!runProps?.elements?.length || !state)
134008
134255
  return;
134009
134256
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -134037,11 +134284,11 @@ var isRegExp = (value) => {
134037
134284
  state.kern = kernNode.attributes["w:val"];
134038
134285
  }
134039
134286
  }, SuperConverter;
134040
- var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
134287
+ var init_SuperConverter_BSDZ3hYr_es = __esm(() => {
134041
134288
  init_rolldown_runtime_Bg48TavK_es();
134042
134289
  init_jszip_C49i9kUs_es();
134043
134290
  init_xml_js_CqGKpaft_es();
134044
- init_uuid_qzgm05fK_es();
134291
+ init_uuid_B2wVPhPi_es();
134045
134292
  init_constants_D9qj59G2_es();
134046
134293
  init_dist_B8HfvhaK_es();
134047
134294
  init_unified_Dsuw2be5_es();
@@ -171354,9 +171601,10 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171354
171601
  "timed_out",
171355
171602
  "fallback_used"
171356
171603
  ];
171357
- SUBSTITUTION_EVIDENCE = Object.freeze([
171604
+ SUBSTITUTION_EVIDENCE$1 = [
171358
171605
  {
171359
171606
  evidenceId: "calibri",
171607
+ generic: "sans-serif",
171360
171608
  logicalFamily: "Calibri",
171361
171609
  physicalFamily: "Carlito",
171362
171610
  verdict: "metric_safe",
@@ -171366,10 +171614,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171366
171614
  italic: true,
171367
171615
  boldItalic: true
171368
171616
  },
171369
- advance: {
171370
- meanDelta: 0,
171371
- maxDelta: 0
171372
- },
171373
171617
  gates: {
171374
171618
  static: "pass",
171375
171619
  metric: "pass",
@@ -171378,36 +171622,26 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171378
171622
  },
171379
171623
  policyAction: "substitute",
171380
171624
  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"
171625
+ exportRule: "preserve_original_name",
171626
+ advance: {
171627
+ basis: "latin_full",
171628
+ meanDelta: 0,
171629
+ maxDelta: 0
171630
+ },
171631
+ candidateLicense: "OFL-1.1"
171383
171632
  },
171384
171633
  {
171385
171634
  evidenceId: "cambria",
171635
+ generic: "serif",
171386
171636
  logicalFamily: "Cambria",
171387
171637
  physicalFamily: "Caladea",
171388
171638
  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
171639
  faces: {
171402
171640
  regular: true,
171403
171641
  bold: true,
171404
171642
  italic: true,
171405
171643
  boldItalic: true
171406
171644
  },
171407
- advance: {
171408
- meanDelta: 0.0002378,
171409
- maxDelta: 0.2310758
171410
- },
171411
171645
  gates: {
171412
171646
  static: "pass",
171413
171647
  metric: "pass",
@@ -171421,11 +171655,29 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171421
171655
  "cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
171422
171656
  "cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
171423
171657
  ],
171658
+ exportRule: "preserve_original_name",
171659
+ advance: {
171660
+ basis: "latin_full",
171661
+ meanDelta: 0.0002378,
171662
+ maxDelta: 0.2310758
171663
+ },
171424
171664
  candidateLicense: "Apache-2.0",
171425
- exportRule: "preserve_original_name"
171665
+ faceVerdicts: {
171666
+ regular: "metric_safe",
171667
+ bold: "metric_safe",
171668
+ italic: "metric_safe",
171669
+ boldItalic: "visual_only"
171670
+ },
171671
+ glyphExceptions: [{
171672
+ slot: "boldItalic",
171673
+ codepoint: 96,
171674
+ advanceDelta: 0.231,
171675
+ 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."
171676
+ }]
171426
171677
  },
171427
171678
  {
171428
171679
  evidenceId: "arial",
171680
+ generic: "sans-serif",
171429
171681
  logicalFamily: "Arial",
171430
171682
  physicalFamily: "Liberation Sans",
171431
171683
  verdict: "metric_safe",
@@ -171435,10 +171687,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171435
171687
  italic: true,
171436
171688
  boldItalic: true
171437
171689
  },
171438
- advance: {
171439
- meanDelta: 0,
171440
- maxDelta: 0
171441
- },
171442
171690
  gates: {
171443
171691
  static: "pass",
171444
171692
  metric: "pass",
@@ -171447,11 +171695,17 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171447
171695
  },
171448
171696
  policyAction: "substitute",
171449
171697
  measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
171450
- candidateLicense: "OFL-1.1",
171451
- exportRule: "preserve_original_name"
171698
+ exportRule: "preserve_original_name",
171699
+ advance: {
171700
+ basis: "latin_full",
171701
+ meanDelta: 0,
171702
+ maxDelta: 0
171703
+ },
171704
+ candidateLicense: "OFL-1.1"
171452
171705
  },
171453
171706
  {
171454
171707
  evidenceId: "times-new-roman",
171708
+ generic: "serif",
171455
171709
  logicalFamily: "Times New Roman",
171456
171710
  physicalFamily: "Liberation Serif",
171457
171711
  verdict: "metric_safe",
@@ -171461,10 +171715,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171461
171715
  italic: true,
171462
171716
  boldItalic: true
171463
171717
  },
171464
- advance: {
171465
- meanDelta: 0,
171466
- maxDelta: 0
171467
- },
171468
171718
  gates: {
171469
171719
  static: "pass",
171470
171720
  metric: "pass",
@@ -171473,11 +171723,17 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171473
171723
  },
171474
171724
  policyAction: "substitute",
171475
171725
  measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
171476
- candidateLicense: "OFL-1.1",
171477
- exportRule: "preserve_original_name"
171726
+ exportRule: "preserve_original_name",
171727
+ advance: {
171728
+ basis: "latin_full",
171729
+ meanDelta: 0,
171730
+ maxDelta: 0
171731
+ },
171732
+ candidateLicense: "OFL-1.1"
171478
171733
  },
171479
171734
  {
171480
171735
  evidenceId: "courier-new",
171736
+ generic: "monospace",
171481
171737
  logicalFamily: "Courier New",
171482
171738
  physicalFamily: "Liberation Mono",
171483
171739
  verdict: "metric_safe",
@@ -171487,23 +171743,586 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171487
171743
  italic: true,
171488
171744
  boldItalic: true
171489
171745
  },
171746
+ gates: {
171747
+ static: "pass",
171748
+ metric: "pass",
171749
+ layout: "not_run",
171750
+ ship: "pass"
171751
+ },
171752
+ policyAction: "substitute",
171753
+ measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
171754
+ exportRule: "preserve_original_name",
171490
171755
  advance: {
171756
+ basis: "latin_full",
171491
171757
  meanDelta: 0,
171492
171758
  maxDelta: 0
171493
171759
  },
171760
+ candidateLicense: "OFL-1.1"
171761
+ },
171762
+ {
171763
+ evidenceId: "georgia",
171764
+ generic: "serif",
171765
+ logicalFamily: "Georgia",
171766
+ physicalFamily: "Gelasio",
171767
+ verdict: "near_metric",
171768
+ faces: {
171769
+ regular: true,
171770
+ bold: true,
171771
+ italic: true,
171772
+ boldItalic: true
171773
+ },
171774
+ gates: {
171775
+ static: "pass",
171776
+ metric: "pass",
171777
+ layout: "pass",
171778
+ ship: "fail"
171779
+ },
171780
+ policyAction: "substitute",
171781
+ measurementRefs: [
171782
+ "georgia_regular__gelasio#regular#w400#1543f04d#analytic_advance#2026-06-04",
171783
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#analytic_advance#2026-06-04",
171784
+ "georgia_italic__gelasio#italic#w400#be1243a9#analytic_advance#2026-06-04",
171785
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#analytic_advance#2026-06-04",
171786
+ "georgia_regular__gelasio#regular#w400#1543f04d#live_layout#2026-06-03",
171787
+ "georgia_bold__gelasio#bold#w700#5a1b9bd7#live_layout#2026-06-03",
171788
+ "georgia_italic__gelasio#italic#w400#be1243a9#live_layout#2026-06-03",
171789
+ "georgia_boldItalic__gelasio#boldItalic#w700#6f3b3f7a#live_layout#2026-06-03"
171790
+ ],
171791
+ exportRule: "preserve_original_name",
171792
+ advance: {
171793
+ basis: "latin_full",
171794
+ meanDelta: 0.0000197,
171795
+ maxDelta: 0.0183727
171796
+ },
171797
+ candidateLicense: "OFL-1.1",
171798
+ faceVerdicts: {
171799
+ regular: "metric_safe",
171800
+ bold: "metric_safe",
171801
+ italic: "near_metric",
171802
+ boldItalic: "near_metric"
171803
+ },
171804
+ glyphExceptions: [{
171805
+ slot: "italic",
171806
+ codepoint: 210,
171807
+ advanceDelta: 0.0184,
171808
+ 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%."
171809
+ }, {
171810
+ slot: "boldItalic",
171811
+ codepoint: 204,
171812
+ advanceDelta: 0.011,
171813
+ 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%."
171814
+ }]
171815
+ },
171816
+ {
171817
+ evidenceId: "arial-narrow",
171818
+ generic: "sans-serif",
171819
+ logicalFamily: "Arial Narrow",
171820
+ physicalFamily: "Liberation Sans Narrow",
171821
+ verdict: "visual_only",
171822
+ faces: {
171823
+ regular: true,
171824
+ bold: true,
171825
+ italic: true,
171826
+ boldItalic: true
171827
+ },
171494
171828
  gates: {
171495
171829
  static: "pass",
171496
171830
  metric: "pass",
171497
171831
  layout: "not_run",
171498
- ship: "pass"
171832
+ ship: "fail"
171499
171833
  },
171500
171834
  policyAction: "substitute",
171501
- measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
171835
+ measurementRefs: [
171836
+ "arial-narrow_regular__liberation-sans-narrow#regular#w400#546e8957#analytic_advance#2026-06-04",
171837
+ "arial-narrow_bold__liberation-sans-narrow#bold#w700#8e5eb509#analytic_advance#2026-06-04",
171838
+ "arial-narrow_italic__liberation-sans-narrow#italic#w400#c5de4127#analytic_advance#2026-06-04",
171839
+ "arial-narrow_boldItalic__liberation-sans-narrow#boldItalic#w700#57fe1513#analytic_advance#2026-06-04"
171840
+ ],
171841
+ exportRule: "preserve_original_name",
171842
+ advance: {
171843
+ basis: "latin_full",
171844
+ meanDelta: 0,
171845
+ maxDelta: 0.5
171846
+ },
171847
+ candidateLicense: "GPLv2-with-font-exception",
171848
+ faceVerdicts: {
171849
+ regular: "metric_safe",
171850
+ bold: "visual_only",
171851
+ italic: "metric_safe",
171852
+ boldItalic: "metric_safe"
171853
+ },
171854
+ glyphExceptions: [{
171855
+ slot: "bold",
171856
+ codepoint: 160,
171857
+ advanceDelta: 0.5,
171858
+ 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."
171859
+ }]
171860
+ },
171861
+ {
171862
+ evidenceId: "aptos",
171863
+ generic: "sans-serif",
171864
+ logicalFamily: "Aptos",
171865
+ physicalFamily: null,
171866
+ verdict: "no_substitute",
171867
+ faces: {
171868
+ regular: false,
171869
+ bold: false,
171870
+ italic: false,
171871
+ boldItalic: false
171872
+ },
171873
+ gates: {
171874
+ static: "not_run",
171875
+ metric: "fail",
171876
+ layout: "not_run",
171877
+ ship: "not_run"
171878
+ },
171879
+ policyAction: "customer_supplied",
171880
+ measurementRefs: ["aptos#top_candidates#2026-06-03"],
171881
+ exportRule: "preserve_original_name",
171882
+ candidateLicense: null
171883
+ },
171884
+ {
171885
+ evidenceId: "arial-black",
171886
+ generic: "sans-serif",
171887
+ logicalFamily: "Arial Black",
171888
+ physicalFamily: "Archivo Black",
171889
+ verdict: "visual_only",
171890
+ faces: {
171891
+ regular: true,
171892
+ bold: false,
171893
+ italic: false,
171894
+ boldItalic: false
171895
+ },
171896
+ faceSources: { italic: {
171897
+ kind: "synthetic",
171898
+ from: "regular"
171899
+ } },
171900
+ gates: {
171901
+ static: "pass",
171902
+ metric: "fail",
171903
+ layout: "not_run",
171904
+ ship: "fail"
171905
+ },
171906
+ policyAction: "substitute",
171907
+ measurementRefs: ["arial-black__archivo-black#visual_review#2026-06-09"],
171908
+ exportRule: "preserve_original_name",
171502
171909
  candidateLicense: "OFL-1.1",
171910
+ faceVerdicts: { italic: "visual_only" }
171911
+ },
171912
+ {
171913
+ evidenceId: "arial-rounded-mt-bold",
171914
+ generic: "sans-serif",
171915
+ logicalFamily: "Arial Rounded MT Bold",
171916
+ physicalFamily: "Ubuntu",
171917
+ verdict: "visual_only",
171918
+ faces: {
171919
+ regular: true,
171920
+ bold: true,
171921
+ italic: true,
171922
+ boldItalic: true
171923
+ },
171924
+ gates: {
171925
+ static: "pass",
171926
+ metric: "fail",
171927
+ layout: "not_run",
171928
+ ship: "fail"
171929
+ },
171930
+ policyAction: "category_fallback",
171931
+ measurementRefs: ["arial-rounded-mt-bold__ubuntu#visual_review#2026-06-09"],
171932
+ exportRule: "preserve_original_name",
171933
+ candidateLicense: "Ubuntu-font-1.0"
171934
+ },
171935
+ {
171936
+ evidenceId: "bookman-old-style",
171937
+ generic: "serif",
171938
+ logicalFamily: "Bookman Old Style",
171939
+ physicalFamily: "TeX Gyre Bonum",
171940
+ verdict: "visual_only",
171941
+ faces: {
171942
+ regular: true,
171943
+ bold: true,
171944
+ italic: true,
171945
+ boldItalic: true
171946
+ },
171947
+ gates: {
171948
+ static: "pass",
171949
+ metric: "fail",
171950
+ layout: "not_run",
171951
+ ship: "fail"
171952
+ },
171953
+ policyAction: "substitute",
171954
+ measurementRefs: ["bookman-old-style__tex-gyre-bonum#visual_review#2026-06-09"],
171955
+ exportRule: "preserve_original_name",
171956
+ candidateLicense: "GUST-Font-License-1.0"
171957
+ },
171958
+ {
171959
+ evidenceId: "century",
171960
+ generic: "serif",
171961
+ logicalFamily: "Century",
171962
+ physicalFamily: "C059",
171963
+ verdict: "visual_only",
171964
+ faces: {
171965
+ regular: true,
171966
+ bold: true,
171967
+ italic: true,
171968
+ boldItalic: true
171969
+ },
171970
+ gates: {
171971
+ static: "pass",
171972
+ metric: "fail",
171973
+ layout: "not_run",
171974
+ ship: "fail"
171975
+ },
171976
+ policyAction: "substitute",
171977
+ measurementRefs: ["century__c059#visual_review#2026-06-09"],
171978
+ exportRule: "preserve_original_name",
171979
+ candidateLicense: "AGPL-3.0-only WITH PS-or-PDF-font-exception-20170817"
171980
+ },
171981
+ {
171982
+ evidenceId: "garamond",
171983
+ generic: "serif",
171984
+ logicalFamily: "Garamond",
171985
+ physicalFamily: "Cardo",
171986
+ verdict: "visual_only",
171987
+ faces: {
171988
+ regular: true,
171989
+ bold: true,
171990
+ italic: true,
171991
+ boldItalic: false
171992
+ },
171993
+ faceSources: { boldItalic: {
171994
+ kind: "synthetic",
171995
+ from: "bold"
171996
+ } },
171997
+ gates: {
171998
+ static: "pass",
171999
+ metric: "fail",
172000
+ layout: "not_run",
172001
+ ship: "fail"
172002
+ },
172003
+ policyAction: "category_fallback",
172004
+ measurementRefs: ["garamond__cardo#visual_review#2026-06-09"],
172005
+ exportRule: "preserve_original_name",
172006
+ candidateLicense: "OFL-1.1",
172007
+ faceVerdicts: { boldItalic: "visual_only" }
172008
+ },
172009
+ {
172010
+ evidenceId: "consolas",
172011
+ generic: "monospace",
172012
+ logicalFamily: "Consolas",
172013
+ physicalFamily: "Inconsolata SemiExpanded",
172014
+ verdict: "cell_width_only",
172015
+ faces: {
172016
+ regular: false,
172017
+ bold: false,
172018
+ italic: false,
172019
+ boldItalic: false
172020
+ },
172021
+ gates: {
172022
+ static: "not_run",
172023
+ metric: "not_run",
172024
+ layout: "not_run",
172025
+ ship: "not_run"
172026
+ },
172027
+ policyAction: "category_fallback",
172028
+ measurementRefs: ["consolas__inconsolata-semiexpanded#analytic_advance#2026-06-03"],
172029
+ exportRule: "preserve_original_name",
172030
+ advance: {
172031
+ basis: "monospace_cell",
172032
+ meanDelta: 0.00035999999999999997,
172033
+ maxDelta: 0.00035999999999999997
172034
+ },
172035
+ candidateLicense: "OFL-1.1"
172036
+ },
172037
+ {
172038
+ evidenceId: "verdana",
172039
+ generic: "sans-serif",
172040
+ logicalFamily: "Verdana",
172041
+ physicalFamily: null,
172042
+ verdict: "visual_only",
172043
+ faces: {
172044
+ regular: false,
172045
+ bold: false,
172046
+ italic: false,
172047
+ boldItalic: false
172048
+ },
172049
+ gates: {
172050
+ static: "not_run",
172051
+ metric: "fail",
172052
+ layout: "not_run",
172053
+ ship: "not_run"
172054
+ },
172055
+ policyAction: "category_fallback",
172056
+ measurementRefs: ["verdana#top_candidates#2026-06-03"],
172057
+ exportRule: "preserve_original_name",
172058
+ candidateLicense: null
172059
+ },
172060
+ {
172061
+ evidenceId: "tahoma",
172062
+ generic: "sans-serif",
172063
+ logicalFamily: "Tahoma",
172064
+ physicalFamily: "Noto Sans",
172065
+ verdict: "visual_only",
172066
+ faces: {
172067
+ regular: true,
172068
+ bold: true,
172069
+ italic: true,
172070
+ boldItalic: true
172071
+ },
172072
+ gates: {
172073
+ static: "pass",
172074
+ metric: "fail",
172075
+ layout: "not_run",
172076
+ ship: "fail"
172077
+ },
172078
+ policyAction: "category_fallback",
172079
+ measurementRefs: ["tahoma__noto-sans#visual_review#2026-06-09"],
172080
+ exportRule: "preserve_original_name",
172081
+ candidateLicense: "OFL-1.1"
172082
+ },
172083
+ {
172084
+ evidenceId: "trebuchet-ms",
172085
+ generic: "sans-serif",
172086
+ logicalFamily: "Trebuchet MS",
172087
+ physicalFamily: "PT Sans",
172088
+ verdict: "visual_only",
172089
+ faces: {
172090
+ regular: true,
172091
+ bold: true,
172092
+ italic: true,
172093
+ boldItalic: true
172094
+ },
172095
+ gates: {
172096
+ static: "pass",
172097
+ metric: "fail",
172098
+ layout: "not_run",
172099
+ ship: "fail"
172100
+ },
172101
+ policyAction: "category_fallback",
172102
+ measurementRefs: ["trebuchet-ms__pt-sans#visual_review#2026-06-09"],
172103
+ exportRule: "preserve_original_name",
172104
+ candidateLicense: "OFL-1.1"
172105
+ },
172106
+ {
172107
+ evidenceId: "comic-sans-ms",
172108
+ generic: "sans-serif",
172109
+ logicalFamily: "Comic Sans MS",
172110
+ physicalFamily: "Comic Relief",
172111
+ verdict: "visual_only",
172112
+ faces: {
172113
+ regular: true,
172114
+ bold: true,
172115
+ italic: false,
172116
+ boldItalic: false
172117
+ },
172118
+ faceSources: {
172119
+ italic: {
172120
+ kind: "synthetic",
172121
+ from: "regular"
172122
+ },
172123
+ boldItalic: {
172124
+ kind: "synthetic",
172125
+ from: "bold"
172126
+ }
172127
+ },
172128
+ gates: {
172129
+ static: "pass",
172130
+ metric: "fail",
172131
+ layout: "not_run",
172132
+ ship: "fail"
172133
+ },
172134
+ policyAction: "category_fallback",
172135
+ measurementRefs: ["comic-sans-ms__comic-relief#visual_review#2026-06-09"],
172136
+ exportRule: "preserve_original_name",
172137
+ candidateLicense: "OFL-1.1",
172138
+ faceVerdicts: {
172139
+ italic: "visual_only",
172140
+ boldItalic: "visual_only"
172141
+ }
172142
+ },
172143
+ {
172144
+ evidenceId: "candara",
172145
+ generic: "sans-serif",
172146
+ logicalFamily: "Candara",
172147
+ physicalFamily: null,
172148
+ verdict: "visual_only",
172149
+ faces: {
172150
+ regular: false,
172151
+ bold: false,
172152
+ italic: false,
172153
+ boldItalic: false
172154
+ },
172155
+ gates: {
172156
+ static: "not_run",
172157
+ metric: "fail",
172158
+ layout: "not_run",
172159
+ ship: "not_run"
172160
+ },
172161
+ policyAction: "category_fallback",
172162
+ measurementRefs: ["candara#top_candidates#2026-06-03"],
172163
+ exportRule: "preserve_original_name",
172164
+ candidateLicense: null
172165
+ },
172166
+ {
172167
+ evidenceId: "constantia",
172168
+ generic: "serif",
172169
+ logicalFamily: "Constantia",
172170
+ physicalFamily: null,
172171
+ verdict: "visual_only",
172172
+ faces: {
172173
+ regular: false,
172174
+ bold: false,
172175
+ italic: false,
172176
+ boldItalic: false
172177
+ },
172178
+ gates: {
172179
+ static: "not_run",
172180
+ metric: "fail",
172181
+ layout: "not_run",
172182
+ ship: "not_run"
172183
+ },
172184
+ policyAction: "category_fallback",
172185
+ measurementRefs: ["constantia#top_candidates#2026-06-03"],
172186
+ exportRule: "preserve_original_name",
172187
+ candidateLicense: null
172188
+ },
172189
+ {
172190
+ evidenceId: "corbel",
172191
+ generic: "sans-serif",
172192
+ logicalFamily: "Corbel",
172193
+ physicalFamily: null,
172194
+ verdict: "visual_only",
172195
+ faces: {
172196
+ regular: false,
172197
+ bold: false,
172198
+ italic: false,
172199
+ boldItalic: false
172200
+ },
172201
+ gates: {
172202
+ static: "not_run",
172203
+ metric: "fail",
172204
+ layout: "not_run",
172205
+ ship: "not_run"
172206
+ },
172207
+ policyAction: "category_fallback",
172208
+ measurementRefs: ["corbel#top_candidates#2026-06-03"],
172209
+ exportRule: "preserve_original_name",
172210
+ candidateLicense: null
172211
+ },
172212
+ {
172213
+ evidenceId: "lucida-console",
172214
+ generic: "monospace",
172215
+ logicalFamily: "Lucida Console",
172216
+ physicalFamily: "Cousine",
172217
+ verdict: "cell_width_only",
172218
+ faces: {
172219
+ regular: false,
172220
+ bold: false,
172221
+ italic: false,
172222
+ boldItalic: false
172223
+ },
172224
+ gates: {
172225
+ static: "not_run",
172226
+ metric: "not_run",
172227
+ layout: "not_run",
172228
+ ship: "not_run"
172229
+ },
172230
+ policyAction: "category_fallback",
172231
+ measurementRefs: ["lucida-console__cousine#analytic_advance#2026-06-03"],
172232
+ exportRule: "preserve_original_name",
172233
+ advance: {
172234
+ basis: "monospace_cell",
172235
+ meanDelta: 0.004050000000000001,
172236
+ maxDelta: 0.004050000000000001
172237
+ },
172238
+ candidateLicense: "OFL-1.1"
172239
+ },
172240
+ {
172241
+ evidenceId: "gill-sans-mt-condensed",
172242
+ generic: "sans-serif",
172243
+ logicalFamily: "Gill Sans MT Condensed",
172244
+ physicalFamily: "PT Sans Narrow",
172245
+ verdict: "visual_only",
172246
+ faces: {
172247
+ regular: true,
172248
+ bold: true,
172249
+ italic: false,
172250
+ boldItalic: false
172251
+ },
172252
+ faceSources: {
172253
+ italic: {
172254
+ kind: "synthetic",
172255
+ from: "regular"
172256
+ },
172257
+ boldItalic: {
172258
+ kind: "synthetic",
172259
+ from: "bold"
172260
+ }
172261
+ },
172262
+ gates: {
172263
+ static: "pass",
172264
+ metric: "fail",
172265
+ layout: "not_run",
172266
+ ship: "fail"
172267
+ },
172268
+ policyAction: "category_fallback",
172269
+ measurementRefs: ["gill-sans-mt-condensed__pt-sans-narrow#visual_review#2026-06-09"],
172270
+ exportRule: "preserve_original_name",
172271
+ candidateLicense: "OFL-1.1",
172272
+ faceVerdicts: {
172273
+ regular: "visual_only",
172274
+ bold: "visual_only",
172275
+ italic: "visual_only",
172276
+ boldItalic: "visual_only"
172277
+ }
172278
+ },
172279
+ {
172280
+ evidenceId: "aptos-display",
172281
+ generic: "sans-serif",
172282
+ logicalFamily: "Aptos Display",
172283
+ physicalFamily: null,
172284
+ verdict: "customer_supplied",
172285
+ faces: {
172286
+ regular: false,
172287
+ bold: false,
172288
+ italic: false,
172289
+ boldItalic: false
172290
+ },
172291
+ gates: {
172292
+ static: "not_run",
172293
+ metric: "not_run",
172294
+ layout: "not_run",
172295
+ ship: "fail"
172296
+ },
172297
+ policyAction: "customer_supplied",
172298
+ measurementRefs: [],
172299
+ exportRule: "preserve_original_name"
172300
+ },
172301
+ {
172302
+ evidenceId: "cambria-math",
172303
+ generic: "serif",
172304
+ logicalFamily: "Cambria Math",
172305
+ physicalFamily: null,
172306
+ verdict: "preserve_only",
172307
+ faces: {
172308
+ regular: false,
172309
+ bold: false,
172310
+ italic: false,
172311
+ boldItalic: false
172312
+ },
172313
+ gates: {
172314
+ static: "not_run",
172315
+ metric: "not_run",
172316
+ layout: "not_run",
172317
+ ship: "not_run"
172318
+ },
172319
+ policyAction: "preserve_only",
172320
+ measurementRefs: [],
171503
172321
  exportRule: "preserve_original_name"
171504
172322
  },
171505
172323
  {
171506
172324
  evidenceId: "helvetica",
172325
+ generic: "sans-serif",
171507
172326
  logicalFamily: "Helvetica",
171508
172327
  physicalFamily: "Liberation Sans",
171509
172328
  verdict: "metric_safe",
@@ -171513,23 +172332,25 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171513
172332
  italic: true,
171514
172333
  boldItalic: true
171515
172334
  },
171516
- advance: {
171517
- meanDelta: 0,
171518
- maxDelta: 0
171519
- },
171520
172335
  gates: {
171521
172336
  static: "not_run",
171522
172337
  metric: "pass",
171523
172338
  layout: "not_run",
171524
- ship: "fail"
172339
+ ship: "pass"
171525
172340
  },
171526
172341
  policyAction: "substitute",
171527
172342
  measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
171528
- candidateLicense: "OFL-1.1",
171529
- exportRule: "preserve_original_name"
172343
+ exportRule: "preserve_original_name",
172344
+ advance: {
172345
+ basis: "latin_full",
172346
+ meanDelta: 0,
172347
+ maxDelta: 0
172348
+ },
172349
+ candidateLicense: "OFL-1.1"
171530
172350
  },
171531
172351
  {
171532
172352
  evidenceId: "calibri-light",
172353
+ generic: "sans-serif",
171533
172354
  logicalFamily: "Calibri Light",
171534
172355
  physicalFamily: "Carlito",
171535
172356
  verdict: "visual_only",
@@ -171539,10 +172360,6 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171539
172360
  italic: false,
171540
172361
  boldItalic: false
171541
172362
  },
171542
- advance: {
171543
- meanDelta: 0.0148,
171544
- maxDelta: 0.066
171545
- },
171546
172363
  gates: {
171547
172364
  static: "not_run",
171548
172365
  metric: "fail",
@@ -171551,10 +172368,147 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171551
172368
  },
171552
172369
  policyAction: "category_fallback",
171553
172370
  measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
172371
+ exportRule: "preserve_original_name",
172372
+ advance: {
172373
+ basis: "latin_full",
172374
+ meanDelta: 0.0148,
172375
+ maxDelta: 0.066
172376
+ },
172377
+ candidateLicense: "OFL-1.1"
172378
+ },
172379
+ {
172380
+ evidenceId: "baskerville-old-face",
172381
+ generic: "serif",
172382
+ logicalFamily: "Baskerville Old Face",
172383
+ physicalFamily: "Bacasime Antique",
172384
+ verdict: "visual_only",
172385
+ faces: {
172386
+ regular: true,
172387
+ bold: false,
172388
+ italic: false,
172389
+ boldItalic: false
172390
+ },
172391
+ gates: {
172392
+ static: "pass",
172393
+ metric: "fail",
172394
+ layout: "not_run",
172395
+ ship: "not_run"
172396
+ },
172397
+ policyAction: "substitute",
172398
+ measurementRefs: ["baskerville-old-face_regular__bacasime-antique#regular#w400#7dac1e5f#analytic_advance#2026-06-05"],
172399
+ exportRule: "preserve_original_name",
172400
+ advance: {
172401
+ basis: "latin_full",
172402
+ meanDelta: 0,
172403
+ maxDelta: 0.4915590863952334
172404
+ },
171554
172405
  candidateLicense: "OFL-1.1",
171555
- exportRule: "preserve_original_name"
172406
+ faceVerdicts: { regular: "visual_only" },
172407
+ glyphExceptions: [{
172408
+ slot: "regular",
172409
+ codepoint: 160,
172410
+ advanceDelta: 0.4916,
172411
+ 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."
172412
+ }]
172413
+ },
172414
+ {
172415
+ evidenceId: "cooper-black",
172416
+ generic: "serif",
172417
+ logicalFamily: "Cooper Black",
172418
+ physicalFamily: "Caprasimo",
172419
+ verdict: "visual_only",
172420
+ faces: {
172421
+ regular: true,
172422
+ bold: false,
172423
+ italic: false,
172424
+ boldItalic: false
172425
+ },
172426
+ faceSources: {
172427
+ bold: {
172428
+ kind: "synthetic",
172429
+ from: "regular"
172430
+ },
172431
+ italic: {
172432
+ kind: "synthetic",
172433
+ from: "regular"
172434
+ },
172435
+ boldItalic: {
172436
+ kind: "synthetic",
172437
+ from: "regular"
172438
+ }
172439
+ },
172440
+ gates: {
172441
+ static: "pass",
172442
+ metric: "pass",
172443
+ layout: "not_run",
172444
+ ship: "not_run"
172445
+ },
172446
+ policyAction: "substitute",
172447
+ measurementRefs: ["cooper-black_regular__caprasimo#regular#w400#786ab84e#analytic_advance#2026-06-05", "cooper-black__caprasimo#synthetic_faces#visual_review#2026-06-09"],
172448
+ exportRule: "preserve_original_name",
172449
+ advance: {
172450
+ basis: "latin_full",
172451
+ meanDelta: 0,
172452
+ maxDelta: 0
172453
+ },
172454
+ candidateLicense: "OFL-1.1",
172455
+ faceVerdicts: {
172456
+ regular: "metric_safe",
172457
+ bold: "visual_only",
172458
+ italic: "visual_only",
172459
+ boldItalic: "visual_only"
172460
+ }
171556
172461
  }
172462
+ ];
172463
+ LINE_BREAK_SAFE_VERDICTS = new Set([
172464
+ "metric_safe",
172465
+ "near_metric",
172466
+ "cell_width_only"
171557
172467
  ]);
172468
+ BY_LOGICAL = new Map(SUBSTITUTION_EVIDENCE$1.map((row) => [normalizeFamilyName(row.logicalFamily), row]));
172469
+ BUNDLED_MANIFEST = Object.freeze([
172470
+ family("Carlito", "Carlito", "OFL-1.1"),
172471
+ family("Caladea", "Caladea", "Apache-2.0"),
172472
+ family("Liberation Sans", "LiberationSans", "OFL-1.1"),
172473
+ family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
172474
+ family("Liberation Mono", "LiberationMono", "OFL-1.1"),
172475
+ familyWithFaces("Caprasimo", "OFL-1.1", [{
172476
+ weight: "normal",
172477
+ style: "normal",
172478
+ file: "Caprasimo-Regular.woff2"
172479
+ }]),
172480
+ family("Gelasio", "Gelasio", "OFL-1.1"),
172481
+ familyWithFaces("Cardo", "OFL-1.1", [
172482
+ {
172483
+ weight: "normal",
172484
+ style: "normal",
172485
+ file: "Cardo-Regular.woff2"
172486
+ },
172487
+ {
172488
+ weight: "bold",
172489
+ style: "normal",
172490
+ file: "Cardo-Bold.woff2"
172491
+ },
172492
+ {
172493
+ weight: "normal",
172494
+ style: "italic",
172495
+ file: "Cardo-Italic.woff2"
172496
+ }
172497
+ ]),
172498
+ familyWithFaces("Comic Relief", "OFL-1.1", [{
172499
+ weight: "normal",
172500
+ style: "normal",
172501
+ file: "ComicRelief-Regular.woff2"
172502
+ }, {
172503
+ weight: "bold",
172504
+ style: "normal",
172505
+ file: "ComicRelief-Bold.woff2"
172506
+ }]),
172507
+ family("Noto Sans", "NotoSans", "OFL-1.1"),
172508
+ family("PT Sans", "PTSans", "OFL-1.1")
172509
+ ]);
172510
+ SUBSTITUTION_EVIDENCE = SUBSTITUTION_EVIDENCE$1;
172511
+ bundledFamilies = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
171558
172512
  BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
171559
172513
  CATEGORY_FALLBACKS = deriveCategoryFallbacks();
171560
172514
  defaultResolver = new FontResolver;
@@ -171562,32 +172516,20 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
171562
172516
  resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
171563
172517
  fontSignature: ""
171564
172518
  });
171565
- BUNDLED_MANIFEST = Object.freeze([
171566
- family("Carlito", "Carlito", "OFL-1.1"),
171567
- family("Caladea", "Caladea", "Apache-2.0"),
171568
- family("Liberation Sans", "LiberationSans", "OFL-1.1"),
171569
- family("Liberation Serif", "LiberationSerif", "OFL-1.1"),
171570
- family("Liberation Mono", "LiberationMono", "OFL-1.1")
171571
- ]);
171572
172519
  installedRegistries = /* @__PURE__ */ new WeakMap;
172520
+ RENDER_ALL = { canRenderFamily: () => true };
171573
172521
  OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
171574
172522
  registriesByFontSet = /* @__PURE__ */ new WeakMap;
171575
- PHYSICAL_GENERIC = Object.freeze({
171576
- Carlito: "sans-serif",
171577
- Caladea: "serif",
171578
- "Liberation Sans": "sans-serif",
171579
- "Liberation Serif": "serif",
171580
- "Liberation Mono": "monospace"
171581
- });
171582
172523
  BUNDLED_FAMILIES = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
172524
+ ADVERTISED_BUILT_IN_TOOLBAR_FAMILIES = new Set([
172525
+ "Cooper Black",
172526
+ "Comic Sans MS",
172527
+ "Garamond",
172528
+ "Georgia",
172529
+ "Tahoma",
172530
+ "Trebuchet MS"
172531
+ ]);
171583
172532
  FONT_OFFERINGS = deriveOfferings();
171584
- DEFAULT_FONT_ORDER = [
171585
- "Calibri",
171586
- "Arial",
171587
- "Courier New",
171588
- "Times New Roman",
171589
- "Helvetica"
171590
- ];
171591
172533
  ALL_COMMENT_TARGETS = COMMENT_FILE_BASENAMES;
171592
172534
  REL_ID_NUMERIC_PATTERN = /rId|mi/g;
171593
172535
  FOOTNOTES_CONFIG$1 = {
@@ -173374,7 +174316,7 @@ var init_SuperConverter_DOoAJ6Zk_es = __esm(() => {
173374
174316
  };
173375
174317
  });
173376
174318
 
173377
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DUhzXJ4D.es.js
174319
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-CKZ579SH.es.js
173378
174320
  function parseSizeUnit(val = "0") {
173379
174321
  const length3 = val.toString() || "0";
173380
174322
  const value = Number.parseFloat(length3);
@@ -177222,6 +178164,8 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177222
178164
  const absTo = mapping.map(target.absTo);
177223
178165
  const replacementText = getReplacementText(step3.args.replacement);
177224
178166
  const marks = resolveMarksForRange(editor, target, step3);
178167
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
178168
+ const parentAllowsLineBreakAt = (pos) => lineBreakNodeType ? parentAllowsNodeAt(tr, pos, lineBreakNodeType) : false;
177225
178169
  const structuralRewrite = resolveStructuralRangeRewrite(tr.doc, absFrom, absTo, step3);
177226
178170
  if (structuralRewrite) {
177227
178171
  const slice2 = buildReplacementParagraphSlice(editor, structuralRewrite.replacementBlocks, marks, structuralRewrite.paragraphAttrs, step3.id, structuralRewrite.leadingWrappers, structuralRewrite.trailingWrappers, structuralRewrite.openStart, structuralRewrite.openEnd);
@@ -177249,7 +178193,7 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177249
178193
  tr.delete(absFrom, absTo);
177250
178194
  return { changed: target.text.length > 0 };
177251
178195
  }
177252
- const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks));
178196
+ const content2 = buildTextWithTabs(editor.state.schema, replacementText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(absFrom) });
177253
178197
  tr.replaceWith(absFrom, absTo, content2);
177254
178198
  return { changed: replacementText !== target.text };
177255
178199
  }
@@ -177291,17 +178235,17 @@ function executeTextRewrite(editor, tr, target, step3, mapping) {
177291
178235
  if (change.type === "delete")
177292
178236
  tr.delete(remap(change.docFrom), remap(change.docTo));
177293
178237
  else if (change.type === "insert") {
177294
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
178238
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docPos)) });
177295
178239
  tr.insert(remap(change.docPos), content2);
177296
178240
  } else {
177297
- const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks));
178241
+ const content2 = buildTextWithTabs(editor.state.schema, change.newText, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(remap(change.docFrom)) });
177298
178242
  tr.replaceWith(remap(change.docFrom), remap(change.docTo), content2);
177299
178243
  }
177300
178244
  }
177301
178245
  } else if (trimmedNew.length === 0)
177302
178246
  tr.delete(trimmedFrom, trimmedTo);
177303
178247
  else {
177304
- const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks));
178248
+ const content2 = buildTextWithTabs(editor.state.schema, trimmedNew, asProseMirrorMarks(marks), { parentAllowsLineBreak: parentAllowsLineBreakAt(trimmedFrom) });
177305
178249
  tr.replaceWith(trimmedFrom, trimmedTo, content2);
177306
178250
  }
177307
178251
  return { changed: replacementText !== target.text };
@@ -177372,7 +178316,12 @@ function executeTextInsert(editor, tr, target, step3, mapping) {
177372
178316
  }
177373
178317
  const tabNodeType = editor.state.schema.nodes?.tab;
177374
178318
  const parentAllowsTab = tabNodeType && text4.includes("\t") ? parentAllowsNodeAt(tr, absPos, tabNodeType) : false;
177375
- tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, { parentAllowsTab }));
178319
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
178320
+ const parentAllowsLineBreak = lineBreakNodeType && /[\r\n]/.test(text4) ? parentAllowsNodeAt(tr, absPos, lineBreakNodeType) : false;
178321
+ tr.insert(absPos, buildTextWithTabs(editor.state.schema, text4, marks, {
178322
+ parentAllowsTab,
178323
+ parentAllowsLineBreak
178324
+ }));
177376
178325
  return { changed: true };
177377
178326
  }
177378
178327
  function executeTextDelete(_editor, tr, target, _step, mapping) {
@@ -177466,7 +178415,9 @@ function executeSpanTextRewrite(editor, tr, target, step3, mapping) {
177466
178415
  const absTo = mapping.map(lastSeg.absTo, -1);
177467
178416
  if (replacementBlocks.length === 1) {
177468
178417
  const marks = resolveSpanMarks(editor, target, policy, step3.id);
177469
- const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks));
178418
+ const lineBreakNodeType = editor.state.schema.nodes?.lineBreak;
178419
+ const parentAllowsLineBreak = lineBreakNodeType ? parentAllowsNodeAt(tr, absFrom, lineBreakNodeType) : false;
178420
+ const content2 = buildTextWithTabs(editor.state.schema, replacementBlocks[0], asProseMirrorMarks(marks), { parentAllowsLineBreak });
177470
178421
  tr.replaceWith(absFrom, absTo, content2);
177471
178422
  return { changed: true };
177472
178423
  }
@@ -178693,7 +179644,7 @@ function materializeTab(schema) {
178693
179644
  return nodeType.create();
178694
179645
  }
178695
179646
  function materializeLineBreak(schema) {
178696
- const nodeType = schema.nodes.hardBreak ?? schema.nodes.lineBreak;
179647
+ const nodeType = schema.nodes.lineBreak ?? schema.nodes.hardBreak;
178697
179648
  if (!nodeType)
178698
179649
  return schema.text(`
178699
179650
  `);
@@ -182818,6 +183769,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182818
183769
  disabled: !context,
182819
183770
  value: typeof superdoc?.getZoom === "function" ? superdoc.getZoom() : 100
182820
183771
  };
183772
+ }, createZoomFitWidthStateDeriver = () => ({ context, superdoc }) => {
183773
+ return {
183774
+ active: (typeof superdoc?.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined) === "fit-width",
183775
+ disabled: !context || typeof superdoc?.setZoomMode !== "function"
183776
+ };
182821
183777
  }, createDocumentModeStateDeriver = () => ({ context, superdoc }) => {
182822
183778
  return {
182823
183779
  active: false,
@@ -182838,6 +183794,12 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
182838
183794
  return false;
182839
183795
  superdoc.setZoom?.(normalizedPayload);
182840
183796
  return true;
183797
+ }, createZoomFitWidthExecute = () => ({ superdoc }) => {
183798
+ if (typeof superdoc?.setZoomMode !== "function")
183799
+ return false;
183800
+ const mode = typeof superdoc.getZoomState === "function" ? superdoc.getZoomState()?.mode : undefined;
183801
+ superdoc.setZoomMode(mode === "fit-width" ? "manual" : "fit-width");
183802
+ return true;
182841
183803
  }, createDocumentModeExecute = () => ({ superdoc, payload }) => {
182842
183804
  const validModes = [
182843
183805
  "editing",
@@ -183511,6 +184473,11 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183511
184473
  state: createZoomStateDeriver(),
183512
184474
  execute: createZoomExecute()
183513
184475
  },
184476
+ "zoom-fit-width": {
184477
+ id: "zoom-fit-width",
184478
+ state: createZoomFitWidthStateDeriver(),
184479
+ execute: createZoomFitWidthExecute()
184480
+ },
183514
184481
  "document-mode": {
183515
184482
  id: "document-mode",
183516
184483
  state: createDocumentModeStateDeriver(),
@@ -183707,9 +184674,9 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
183707
184674
  }
183708
184675
  };
183709
184676
  };
183710
- var init_create_headless_toolbar_DUhzXJ4D_es = __esm(() => {
183711
- init_SuperConverter_DOoAJ6Zk_es();
183712
- init_uuid_qzgm05fK_es();
184677
+ var init_create_headless_toolbar_CKZ579SH_es = __esm(() => {
184678
+ init_SuperConverter_BSDZ3hYr_es();
184679
+ init_uuid_B2wVPhPi_es();
183713
184680
  init_constants_D9qj59G2_es();
183714
184681
  init_dist_B8HfvhaK_es();
183715
184682
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -184896,7 +185863,7 @@ var init_remark_stringify_6MMJfY0k_es = __esm(() => {
184896
185863
  eol = /\r?\n|\r/g;
184897
185864
  });
184898
185865
 
184899
- // ../../packages/superdoc/dist/chunks/detect-container-B6sqy7HZ.es.js
185866
+ // ../../packages/superdoc/dist/chunks/detect-container-sTWXwOzh.es.js
184900
185867
  function matchesMagic(bytes, magic) {
184901
185868
  if (bytes.length < magic.length)
184902
185869
  return false;
@@ -184914,7 +185881,7 @@ function detectContainerType(data) {
184914
185881
  return "unknown";
184915
185882
  }
184916
185883
  var ZIP_MAGIC, CFB_MAGIC;
184917
- var init_detect_container_B6sqy7HZ_es = __esm(() => {
185884
+ var init_detect_container_sTWXwOzh_es = __esm(() => {
184918
185885
  ZIP_MAGIC = [
184919
185886
  80,
184920
185887
  75,
@@ -184933,13 +185900,13 @@ var init_detect_container_B6sqy7HZ_es = __esm(() => {
184933
185900
  ];
184934
185901
  });
184935
185902
 
184936
- // ../../packages/superdoc/dist/chunks/detect-container-Cs3KoJVc.es.js
184937
- var exports_detect_container_Cs3KoJVc_es = {};
184938
- __export(exports_detect_container_Cs3KoJVc_es, {
185903
+ // ../../packages/superdoc/dist/chunks/detect-container-0tUwtCR4.es.js
185904
+ var exports_detect_container_0tUwtCR4_es = {};
185905
+ __export(exports_detect_container_0tUwtCR4_es, {
184939
185906
  detectContainerType: () => detectContainerType
184940
185907
  });
184941
- var init_detect_container_Cs3KoJVc_es = __esm(() => {
184942
- init_detect_container_B6sqy7HZ_es();
185908
+ var init_detect_container_0tUwtCR4_es = __esm(() => {
185909
+ init_detect_container_sTWXwOzh_es();
184943
185910
  });
184944
185911
 
184945
185912
  // ../../packages/superdoc/dist/chunks/errors-CNaD6vcg.es.js
@@ -184992,9 +185959,9 @@ var init_errors_CNaD6vcg_es = __esm(() => {
184992
185959
  };
184993
185960
  });
184994
185961
 
184995
- // ../../packages/superdoc/dist/chunks/decrypt-docx-G2a7hkiV.es.js
184996
- var exports_decrypt_docx_G2a7hkiV_es = {};
184997
- __export(exports_decrypt_docx_G2a7hkiV_es, {
185962
+ // ../../packages/superdoc/dist/chunks/decrypt-docx-CPcaRl5W.es.js
185963
+ var exports_decrypt_docx_CPcaRl5W_es = {};
185964
+ __export(exports_decrypt_docx_CPcaRl5W_es, {
184998
185965
  decryptDocxIfNeeded: () => decryptDocxIfNeeded
184999
185966
  });
185000
185967
  function concatUint8Arrays(chunks) {
@@ -185535,10 +186502,10 @@ async function decryptDocxIfNeeded(data, options) {
185535
186502
  };
185536
186503
  }
185537
186504
  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(() => {
186505
+ var init_decrypt_docx_CPcaRl5W_es = __esm(() => {
185539
186506
  init_dist_B8HfvhaK_es();
185540
186507
  init_errors_CNaD6vcg_es();
185541
- init_detect_container_B6sqy7HZ_es();
186508
+ init_detect_container_sTWXwOzh_es();
185542
186509
  CFB_SIGNATURE = new Uint8Array([
185543
186510
  208,
185544
186511
  207,
@@ -185607,7 +186574,7 @@ var init_decrypt_docx_G2a7hkiV_es = __esm(() => {
185607
186574
  ]);
185608
186575
  });
185609
186576
 
185610
- // ../../packages/superdoc/dist/chunks/DocxZipper-Bu2Fhqkw.es.js
186577
+ // ../../packages/superdoc/dist/chunks/DocxZipper-FUsfThjV.es.js
185611
186578
  function sniffEncoding(u8) {
185612
186579
  if (u8.length >= 2) {
185613
186580
  const b0 = u8[0], b1 = u8[1];
@@ -185923,11 +186890,11 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
185923
186890
  return new Uint8Array(0);
185924
186891
  }
185925
186892
  async getDocxData(file, isNode3 = false, options = {}) {
185926
- const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_Cs3KoJVc_es(), exports_detect_container_Cs3KoJVc_es));
186893
+ const { detectContainerType: detectContainerType2 } = await Promise.resolve().then(() => (init_detect_container_0tUwtCR4_es(), exports_detect_container_0tUwtCR4_es));
185927
186894
  const containerType = detectContainerType2(await this.#peekBytes(file, 8));
185928
186895
  let fileData = file;
185929
186896
  if (containerType === "cfb") {
185930
- const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_G2a7hkiV_es(), exports_decrypt_docx_G2a7hkiV_es));
186897
+ const { decryptDocxIfNeeded: decryptDocxIfNeeded2 } = await Promise.resolve().then(() => (init_decrypt_docx_CPcaRl5W_es(), exports_decrypt_docx_CPcaRl5W_es));
185931
186898
  const result = await decryptDocxIfNeeded2(file instanceof Uint8Array ? file : file instanceof ArrayBuffer ? new Uint8Array(file) : new Uint8Array(await file.arrayBuffer()), { password: options.password });
185932
186899
  fileData = result.data;
185933
186900
  this.decryptedFileData = result.data;
@@ -186280,7 +187247,7 @@ var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.docum
186280
187247
  return `image/${MIME_TYPE_FOR_EXT[detectedType] || detectedType}`;
186281
187248
  }
186282
187249
  }, DocxZipper_default;
186283
- var init_DocxZipper_Bu2Fhqkw_es = __esm(() => {
187250
+ var init_DocxZipper_FUsfThjV_es = __esm(() => {
186284
187251
  init_rolldown_runtime_Bg48TavK_es();
186285
187252
  init_jszip_C49i9kUs_es();
186286
187253
  init_xml_js_CqGKpaft_es();
@@ -219228,7 +220195,7 @@ If you want to remount the same app, move your app creation logic into a factory
219228
220195
  var createVNodeWithArgsTransform = (...args2) => {
219229
220196
  return _createVNode(...vnodeArgsTransformer ? vnodeArgsTransformer(args2, currentRenderingInstance) : args2);
219230
220197
  };
219231
- var normalizeKey = ({ key: key2 }) => key2 != null ? key2 : null;
220198
+ var normalizeKey2 = ({ key: key2 }) => key2 != null ? key2 : null;
219232
220199
  var normalizeRef = ({
219233
220200
  ref: ref3,
219234
220201
  ref_key,
@@ -219245,7 +220212,7 @@ If you want to remount the same app, move your app creation logic into a factory
219245
220212
  __v_skip: true,
219246
220213
  type,
219247
220214
  props,
219248
- key: props && normalizeKey(props),
220215
+ key: props && normalizeKey2(props),
219249
220216
  ref: props && normalizeRef(props),
219250
220217
  scopeId: currentScopeId,
219251
220218
  slotScopeIds: null,
@@ -219345,7 +220312,7 @@ Component that was made reactive: `, type);
219345
220312
  __v_skip: true,
219346
220313
  type: vnode.type,
219347
220314
  props: mergedProps,
219348
- key: mergedProps && normalizeKey(mergedProps),
220315
+ key: mergedProps && normalizeKey2(mergedProps),
219349
220316
  ref: extraProps && extraProps.ref ? mergeRef && ref3 ? shared.isArray(ref3) ? ref3.concat(normalizeRef(extraProps)) : [ref3, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref3,
219350
220317
  scopeId: vnode.scopeId,
219351
220318
  slotScopeIds: vnode.slotScopeIds,
@@ -222159,9 +223126,9 @@ var init_unified_vFnLRfAM_es = __esm(() => {
222159
223126
  init_unified_Dsuw2be5_es();
222160
223127
  });
222161
223128
 
222162
- // ../../packages/superdoc/dist/chunks/rehype-parse-q8NfsLv7.es.js
222163
- var exports_rehype_parse_q8NfsLv7_es = {};
222164
- __export(exports_rehype_parse_q8NfsLv7_es, {
223129
+ // ../../packages/superdoc/dist/chunks/rehype-parse-DTSDs3kr.es.js
223130
+ var exports_rehype_parse_DTSDs3kr_es = {};
223131
+ __export(exports_rehype_parse_DTSDs3kr_es, {
222165
223132
  default: () => rehypeParse
222166
223133
  });
222167
223134
  function merge2(definitions, space) {
@@ -228110,7 +229077,7 @@ var Schema2 = class {
228110
229077
  }
228111
229078
  }
228112
229079
  }, 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(() => {
229080
+ var init_rehype_parse_DTSDs3kr_es = __esm(() => {
228114
229081
  init_rolldown_runtime_Bg48TavK_es();
228115
229082
  init_default_BqgWzMfR_es();
228116
229083
  init_lib_CYqLdG4z_es();
@@ -230855,9 +231822,9 @@ var init_rehype_parse_q8NfsLv7_es = __esm(() => {
230855
231822
  emptyOptions3 = {};
230856
231823
  });
230857
231824
 
230858
- // ../../packages/superdoc/dist/chunks/rehype-remark-CKg94dxK.es.js
230859
- var exports_rehype_remark_CKg94dxK_es = {};
230860
- __export(exports_rehype_remark_CKg94dxK_es, {
231825
+ // ../../packages/superdoc/dist/chunks/rehype-remark-Bt5njn02.es.js
231826
+ var exports_rehype_remark_Bt5njn02_es = {};
231827
+ __export(exports_rehype_remark_Bt5njn02_es, {
230861
231828
  default: () => rehypeRemark
230862
231829
  });
230863
231830
  function anyFactory2(tests) {
@@ -232477,7 +233444,7 @@ var env, deserializer = ($2, _2) => {
232477
233444
  if (is(parent.children[index2], index2, parent))
232478
233445
  return parent.children[index2];
232479
233446
  }, 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(() => {
233447
+ var init_rehype_remark_Bt5njn02_es = __esm(() => {
232481
233448
  init_lib_DEff_P2k_es();
232482
233449
  env = typeof self === "object" ? self : globalThis;
232483
233450
  ({ toString: toString$1 } = {});
@@ -232871,7 +233838,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
232871
233838
  init_remark_gfm_BhnWr3yf_es();
232872
233839
  });
232873
233840
 
232874
- // ../../packages/superdoc/dist/chunks/src-DEnygTyz.es.js
233841
+ // ../../packages/superdoc/dist/chunks/src-BXck1nRd.es.js
232875
233842
  function deleteProps(obj, propOrProps) {
232876
233843
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
232877
233844
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -232945,7 +233912,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
232945
233912
  }
232946
233913
  function getSuperdocVersion() {
232947
233914
  try {
232948
- return "1.38.0";
233915
+ return "1.39.0";
232949
233916
  } catch {
232950
233917
  return "unknown";
232951
233918
  }
@@ -241965,9 +242932,6 @@ function replaceCommand(wrap5, moveForward) {
241965
242932
  return true;
241966
242933
  };
241967
242934
  }
241968
- function buildSdtBlockSelector(escapedSdtId) {
241969
- return `.${DOM_CLASS_NAMES.BLOCK_SDT}[${DATA_ATTRS.SDT_ID}="${escapedSdtId}"]`;
241970
- }
241971
242935
  function buildAnnotationSelector() {
241972
242936
  return `.${DOM_CLASS_NAMES.ANNOTATION}[${DATA_ATTRS.PM_START}]`;
241973
242937
  }
@@ -245229,6 +246193,36 @@ function scrollToElement(targetElement, options = {
245229
246193
  behavior: options.behavior
245230
246194
  });
245231
246195
  }
246196
+ function normalizeToolbarFamily(value) {
246197
+ return String(value ?? "").trim().toLowerCase();
246198
+ }
246199
+ function compareToolbarFontOptions(a2, b$1) {
246200
+ return String(a2.label ?? "").trim().localeCompare(String(b$1.label ?? "").trim(), "en", { sensitivity: "base" });
246201
+ }
246202
+ function composeToolbarFontOptions(documentOptions, configFonts) {
246203
+ if (configFonts)
246204
+ return configFonts;
246205
+ if (!documentOptions?.length)
246206
+ return;
246207
+ const seen = new Set(TOOLBAR_FONTS.map((option) => normalizeToolbarFamily(option.label)));
246208
+ const merged = [...TOOLBAR_FONTS];
246209
+ for (const option of documentOptions) {
246210
+ const dedupeKey = normalizeToolbarFamily(option.logicalFamily);
246211
+ if (seen.has(dedupeKey))
246212
+ continue;
246213
+ seen.add(dedupeKey);
246214
+ merged.push({
246215
+ label: option.logicalFamily,
246216
+ key: option.logicalFamily,
246217
+ fontWeight: 400,
246218
+ props: {
246219
+ style: { fontFamily: option.previewFamily || option.logicalFamily },
246220
+ "data-item": "btn-fontFamily-option"
246221
+ }
246222
+ });
246223
+ }
246224
+ return merged.length > TOOLBAR_FONTS.length ? merged.sort(compareToolbarFontOptions) : undefined;
246225
+ }
245232
246226
  function isExtensionRulesEnabled(extension3, enabled) {
245233
246227
  if (Array.isArray(enabled))
245234
246228
  return enabled.some((enabledExtension) => {
@@ -264462,7 +265456,12 @@ function insertTextAroundSdt(editor, target, content3, resolvePos) {
264462
265456
  const { tr } = editor.state;
264463
265457
  const tabType = editor.schema.nodes?.tab;
264464
265458
  const parentAllowsTab = tabType && content3.includes("\t") ? parentAllowsNodeAt(tr, pos, tabType) : false;
264465
- tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, { parentAllowsTab }));
265459
+ const lineBreakType = editor.schema.nodes?.lineBreak;
265460
+ const parentAllowsLineBreak = lineBreakType && /[\r\n]/.test(content3) ? parentAllowsNodeAt(tr, pos, lineBreakType) : false;
265461
+ tr.insert(pos, buildTextWithTabs(editor.schema, content3, undefined, {
265462
+ parentAllowsTab,
265463
+ parentAllowsLineBreak
265464
+ }));
264466
265465
  dispatchTransaction$1(editor, tr);
264467
265466
  return true;
264468
265467
  }
@@ -273439,6 +274438,9 @@ function applySourceAnchorDataset(element3, sourceAnchor) {
273439
274438
  else
273440
274439
  delete element3.dataset.sourceOccurrenceId;
273441
274440
  }
274441
+ function allowFontSynthesis(element3) {
274442
+ element3.style.setProperty("font-synthesis", "weight style");
274443
+ }
273442
274444
  function getCellSegmentCount(cell2) {
273443
274445
  if (cell2.blocks && cell2.blocks.length > 0) {
273444
274446
  let total = 0;
@@ -277983,7 +278985,10 @@ function calculateBalancedColumnHeight(ctx$1, config2 = DEFAULT_BALANCING_CONFIG
277983
278985
  iterations: 0
277984
278986
  };
277985
278987
  const totalHeight = ctx$1.contentBlocks.reduce((sum, b$1) => sum + b$1.measuredHeight, 0);
277986
- const maxBlockHeight = ctx$1.contentBlocks.reduce((m$1, b$1) => Math.max(m$1, b$1.measuredHeight), 0);
278988
+ const maxBlockHeight = ctx$1.contentBlocks.reduce((m$1, b$1) => {
278989
+ const indivisible = b$1.canBreak && b$1.lineHeights && b$1.lineHeights.length > 1 ? Math.max(...b$1.lineHeights) : b$1.measuredHeight;
278990
+ return Math.max(m$1, indivisible);
278991
+ }, 0);
277987
278992
  if (totalHeight < config2.minColumnHeight * ctx$1.columnCount)
277988
278993
  return createSingleColumnResult(ctx$1);
277989
278994
  let lo = Math.max(maxBlockHeight, config2.minColumnHeight);
@@ -278153,6 +279158,8 @@ function shouldSkipBalancing(ctx$1, config2 = DEFAULT_BALANCING_CONFIG) {
278153
279158
  }
278154
279159
  function getFragmentHeight(fragment2, measureMap) {
278155
279160
  if (fragment2.kind === "para") {
279161
+ if (fragment2.lines && fragment2.lines.length > 0)
279162
+ return fragment2.lines.reduce((sum$1, l) => sum$1 + (l.lineHeight ?? 0), 0);
278156
279163
  const measure = measureMap.get(fragment2.blockId);
278157
279164
  if (!measure || measure.kind !== "paragraph" || !measure.lines)
278158
279165
  return 0;
@@ -278233,13 +279240,38 @@ function balanceSectionOnPage(args$1) {
278233
279240
  return a2.x - b$1.x;
278234
279241
  return a2.y - b$1.y;
278235
279242
  });
278236
- const contentBlocks = ordered.map((f2, i4) => ({
278237
- blockId: `${f2.blockId}#${i4}`,
278238
- measuredHeight: getBalancingHeight(f2, args$1.measureMap, args$1.sectPrMarkerBlockIds),
278239
- canBreak: false,
278240
- keepWithNext: false,
278241
- keepTogether: true
278242
- }));
279243
+ const lineHeightsFor = (f2) => {
279244
+ if (f2.kind !== "para")
279245
+ return;
279246
+ if (args$1.sectPrMarkerBlockIds?.has(f2.blockId))
279247
+ return;
279248
+ if (args$1.keepLinesBlockIds?.has(f2.blockId))
279249
+ return;
279250
+ if (f2.lines && f2.lines.length > 0) {
279251
+ if (f2.lines.length <= 1)
279252
+ return;
279253
+ return f2.lines.map((l) => l.lineHeight);
279254
+ }
279255
+ const measure = args$1.measureMap.get(f2.blockId);
279256
+ if (!measure || measure.kind !== "paragraph" || !Array.isArray(measure.lines))
279257
+ return;
279258
+ const fromLine = f2.fromLine ?? 0;
279259
+ const toLine = f2.toLine ?? measure.lines.length;
279260
+ if (toLine - fromLine <= 1)
279261
+ return;
279262
+ return measure.lines.slice(fromLine, toLine).map((l) => l.lineHeight);
279263
+ };
279264
+ const contentBlocks = ordered.map((f2, i4) => {
279265
+ const lineHeights = lineHeightsFor(f2);
279266
+ return {
279267
+ blockId: `${f2.blockId}#${i4}`,
279268
+ measuredHeight: getBalancingHeight(f2, args$1.measureMap, args$1.sectPrMarkerBlockIds),
279269
+ canBreak: lineHeights !== undefined,
279270
+ keepWithNext: false,
279271
+ keepTogether: lineHeights === undefined,
279272
+ lineHeights
279273
+ };
279274
+ });
278243
279275
  if (shouldSkipBalancing({
278244
279276
  columnCount,
278245
279277
  columnWidth,
@@ -278274,6 +279306,39 @@ function balanceSectionOnPage(args$1) {
278274
279306
  f2.x = columnX(col);
278275
279307
  f2.y = colCursors[col];
278276
279308
  f2.width = columnWidth;
279309
+ const bp = result.blockBreakPoints?.get(block.blockId);
279310
+ if (bp && bp.heightAfterBreak > 0 && col < columnCount - 1) {
279311
+ const splitLine = (f2.fromLine ?? 0) + bp.breakAfterLine + 1;
279312
+ const measureLineCount = args$1.measureMap.get(f2.blockId)?.lines?.length ?? splitLine;
279313
+ const originalToLine = f2.toLine ?? measureLineCount;
279314
+ const originalContinuesOnNext = f2.continuesOnNext ?? false;
279315
+ const secondHalf = {
279316
+ ...f2,
279317
+ fromLine: splitLine,
279318
+ toLine: originalToLine,
279319
+ x: columnX(col + 1),
279320
+ y: colCursors[col + 1],
279321
+ width: columnWidth,
279322
+ continuesFromPrev: true,
279323
+ continuesOnNext: originalContinuesOnNext
279324
+ };
279325
+ if (f2.lines && f2.lines.length > 0) {
279326
+ secondHalf.lines = f2.lines.slice(bp.breakAfterLine + 1);
279327
+ f2.lines = f2.lines.slice(0, bp.breakAfterLine + 1);
279328
+ }
279329
+ f2.toLine = splitLine;
279330
+ f2.continuesOnNext = true;
279331
+ colCursors[col] += bp.heightBeforeBreak;
279332
+ colCursors[col + 1] += bp.heightAfterBreak;
279333
+ const fragIdx = fragments.indexOf(f2);
279334
+ if (fragIdx >= 0)
279335
+ fragments.splice(fragIdx + 1, 0, secondHalf);
279336
+ if (colCursors[col] > maxY)
279337
+ maxY = colCursors[col];
279338
+ if (colCursors[col + 1] > maxY)
279339
+ maxY = colCursors[col + 1];
279340
+ continue;
279341
+ }
278277
279342
  colCursors[col] += block.measuredHeight;
278278
279343
  if (colCursors[col] > maxY)
278279
279344
  maxY = colCursors[col];
@@ -279425,6 +280490,7 @@ function layoutDocument(blocks2, measures, options = {}) {
279425
280490
  const sectionTypeIsExplicit = /* @__PURE__ */ new Map;
279426
280491
  let lastSectionIdx = null;
279427
280492
  const sectPrMarkerBlockIds = /* @__PURE__ */ new Set;
280493
+ const keepLinesBlockIds = /* @__PURE__ */ new Set;
279428
280494
  let documentHasExplicitColumnBreak = false;
279429
280495
  let documentHasAnySectionBreak = false;
279430
280496
  const alreadyBalancedSections = /* @__PURE__ */ new Set;
@@ -279458,6 +280524,8 @@ function layoutDocument(blocks2, measures, options = {}) {
279458
280524
  documentHasExplicitColumnBreak = true;
279459
280525
  if (block.kind === "paragraph" && blockWithAttrs.attrs?.sectPrMarker === true)
279460
280526
  sectPrMarkerBlockIds.add(block.id);
280527
+ if (block.kind === "paragraph" && blockWithAttrs.attrs?.keepLines === true)
280528
+ keepLinesBlockIds.add(block.id);
279461
280529
  });
279462
280530
  const anchoredByParagraph = collectAnchoredDrawings(blocks2, measures);
279463
280531
  const anchoredTables = collectAnchoredTables(blocks2, measures);
@@ -279676,7 +280744,8 @@ function layoutDocument(blocks2, measures, options = {}) {
279676
280744
  columnWidth: normalized.width,
279677
280745
  availableHeight,
279678
280746
  measureMap: balancingMeasureMap,
279679
- sectPrMarkerBlockIds
280747
+ sectPrMarkerBlockIds,
280748
+ keepLinesBlockIds
279680
280749
  });
279681
280750
  if (balanceResult) {
279682
280751
  state.cursorY = balanceResult.maxY;
@@ -280075,7 +281144,9 @@ function layoutDocument(blocks2, measures, options = {}) {
280075
281144
  const isMultiPage = sectionPagesCount > 1;
280076
281145
  if (isMultiPage && !isLast)
280077
281146
  continue;
280078
- const allowedByMidDocContinuous = endBreakType === "continuous" && !isLast;
281147
+ const nextSectionBeginType = sectionEndBreakType.get(sectionIdx + 1);
281148
+ const nextIsBody = lastSectionIdx !== null && sectionIdx + 1 === lastSectionIdx;
281149
+ const allowedByMidDocContinuous = !isLast && !nextIsBody && nextSectionBeginType === "continuous";
280079
281150
  const allowedByBodyExplicitContinuous = bodyExplicitContinuousIdx !== null && sectionIdx === bodyExplicitContinuousIdx - 1 && !isExplicitNonContinuous;
280080
281151
  if (!allowedByMidDocContinuous && !allowedByBodyExplicitContinuous && !isMultiPage)
280081
281152
  continue;
@@ -280106,7 +281177,8 @@ function layoutDocument(blocks2, measures, options = {}) {
280106
281177
  columnWidth: normalized.width,
280107
281178
  availableHeight: sectionAvailableHeight,
280108
281179
  measureMap: balancingMeasureMap,
280109
- sectPrMarkerBlockIds
281180
+ sectPrMarkerBlockIds,
281181
+ keepLinesBlockIds
280110
281182
  });
280111
281183
  }
280112
281184
  for (const state of states) {
@@ -284943,9 +286015,28 @@ function computeDomCaretPageLocal(options, pos) {
284943
286015
  const boundary = resolveTextBoundaryInElement(targetEl, pos, entry.pmStart, entry.pmEnd, "forward");
284944
286016
  if (!boundary) {
284945
286017
  const elRect = targetEl.getBoundingClientRect();
286018
+ if (targetEl.classList.contains("superdoc-line")) {
286019
+ const paddingLeft = parseFloat(targetEl.style.paddingLeft) || 0;
286020
+ const paddingRight = parseFloat(targetEl.style.paddingRight) || 0;
286021
+ const lineLeft = (elRect.left - pageRect.left) / zoom + paddingLeft;
286022
+ const lineRight = (elRect.right - pageRect.left) / zoom - paddingRight;
286023
+ const textAlign = targetEl.style.textAlign;
286024
+ let x;
286025
+ if (textAlign === "center")
286026
+ x = (lineLeft + lineRight) / 2;
286027
+ else if (textAlign === "right")
286028
+ x = lineRight;
286029
+ else
286030
+ x = lineLeft;
286031
+ return {
286032
+ pageIndex: Number(page.dataset.pageIndex ?? "0"),
286033
+ x,
286034
+ y: (elRect.top - pageRect.top) / zoom
286035
+ };
286036
+ }
284946
286037
  const isEmptySdtPlaceholder = targetEl.classList.contains("superdoc-empty-sdt-placeholder") || targetEl.classList.contains("superdoc-empty-inline-sdt-placeholder") || targetEl.classList.contains("superdoc-empty-block-sdt-placeholder");
284947
286038
  const atEnd = isEmptySdtPlaceholder ? pos > entry.pmEnd : pos >= entry.pmEnd;
284948
- const yRect = (isEmptySdtPlaceholder ? targetEl.closest(".superdoc-line") : null)?.getBoundingClientRect() ?? elRect;
286039
+ const yRect = (isEmptySdtPlaceholder || targetEl.classList.contains("superdoc-tab") ? targetEl.closest(".superdoc-line") : null)?.getBoundingClientRect() ?? elRect;
284949
286040
  return {
284950
286041
  pageIndex: Number(page.dataset.pageIndex ?? "0"),
284951
286042
  x: ((atEnd ? elRect.right : elRect.left) - pageRect.left) / zoom,
@@ -292368,7 +293459,8 @@ function makeResolveFace(resolver2, hasFace) {
292368
293459
  const r$1 = resolver2.resolveFace(logical, face, hasFace);
292369
293460
  return {
292370
293461
  physicalFamily: r$1.physicalFamily,
292371
- reason: r$1.reason
293462
+ reason: r$1.reason,
293463
+ sourceFace: r$1.sourceFace
292372
293464
  };
292373
293465
  };
292374
293466
  if (resolver2)
@@ -292398,10 +293490,14 @@ function collect(acc, node3, resolveFace2) {
292398
293490
  const usedKey = `${logicalPrimary.toLowerCase()}|${weight}|${style2}`;
292399
293491
  if (acc.usedFaces.has(usedKey))
292400
293492
  return;
292401
- const { physicalFamily, reason } = resolveFace2(node3.fontFamily, {
293493
+ const { physicalFamily, reason, sourceFace } = resolveFace2(node3.fontFamily, {
292402
293494
  weight,
292403
293495
  style: style2
292404
293496
  });
293497
+ const requiredFace = sourceFace ?? {
293498
+ weight,
293499
+ style: style2
293500
+ };
292405
293501
  acc.usedFaces.set(usedKey, {
292406
293502
  logicalFamily: logicalPrimary,
292407
293503
  weight,
@@ -292412,15 +293508,17 @@ function collect(acc, node3, resolveFace2) {
292412
293508
  weight,
292413
293509
  style2,
292414
293510
  (physicalFamily || "").toLowerCase(),
293511
+ requiredFace.weight,
293512
+ requiredFace.style,
292415
293513
  reason
292416
293514
  ]);
292417
293515
  if (physicalFamily) {
292418
- const reqKey = `${physicalFamily.toLowerCase()}|${weight}|${style2}`;
293516
+ const reqKey = `${physicalFamily.toLowerCase()}|${requiredFace.weight}|${requiredFace.style}`;
292419
293517
  if (!acc.requiredFaces.has(reqKey))
292420
293518
  acc.requiredFaces.set(reqKey, {
292421
293519
  family: physicalFamily,
292422
- weight,
292423
- style: style2
293520
+ weight: requiredFace.weight,
293521
+ style: requiredFace.style
292424
293522
  });
292425
293523
  }
292426
293524
  }
@@ -306595,17 +307693,25 @@ var Node$13 = class Node$14 {
306595
307693
  this.deco = deco;
306596
307694
  }
306597
307695
  }, 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 }) => {
307696
+ `, ATOM_PLACEHOLDER = "", DELETION_BARRIER = "\x00", DEFAULT_SEARCH_MODEL$1 = "raw", hasTrackDeleteMark$2 = (node3) => node3?.marks?.some((mark2) => mark2?.type?.name === "trackDelete") ?? false, readLeafText = (node3) => {
307697
+ const leafText = node3?.type?.spec?.leafText;
307698
+ if (typeof leafText === "function")
307699
+ return leafText(node3);
307700
+ if (typeof leafText === "string")
307701
+ return leafText;
307702
+ return ATOM_PLACEHOLDER;
307703
+ }, 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
307704
  const matches2 = [];
306600
307705
  for (const indexMatch of indexMatches) {
306601
307706
  const ranges = searchIndex.offsetRangeToDocRanges(indexMatch.start, indexMatch.end);
306602
307707
  if (ranges.length === 0)
306603
307708
  continue;
306604
307709
  const matchTexts = ranges.map((r$1) => doc$12.textBetween(r$1.from, r$1.to));
307710
+ const matchText = typeof indexMatch.text === "string" ? indexMatch.text : matchTexts.join("");
306605
307711
  const match$1 = {
306606
307712
  from: ranges[0].from,
306607
307713
  to: ranges[ranges.length - 1].to,
306608
- text: matchTexts.join(""),
307714
+ text: matchText,
306609
307715
  id: v4_default(),
306610
307716
  ranges,
306611
307717
  trackerIds: []
@@ -309825,7 +310931,7 @@ var Node$13 = class Node$14 {
309825
310931
  domAvailabilityCache = false;
309826
310932
  return false;
309827
310933
  }
309828
- }, summaryVersion = "1.38.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
310934
+ }, summaryVersion = "1.39.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
309829
310935
  const container = document.createElement("div");
309830
310936
  container.innerHTML = html3;
309831
310937
  const result = [];
@@ -311011,7 +312117,7 @@ var Node$13 = class Node$14 {
311011
312117
  return () => {};
311012
312118
  const handle3 = setInterval(callback, intervalMs);
311013
312119
  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) => {
312120
+ }, 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
312121
  if (!isTrackedReviewMark(mark2))
311016
312122
  return null;
311017
312123
  const id2 = typeof mark2.attrs?.id === "string" ? mark2.attrs.id : "";
@@ -312040,6 +313146,7 @@ var Node$13 = class Node$14 {
312040
313146
  this.syncInlineStyleLayers(options.editorState, options.domPositionIndex);
312041
313147
  this.applyProofingAnnotations(options.proofingAnnotations, options.rebuildDomPositionIndex);
312042
313148
  options.reapplyStructuredContentHover?.();
313149
+ options.reapplyTocGroupHover?.();
312043
313150
  }
312044
313151
  destroy() {
312045
313152
  this.#proofingDecorator.clear();
@@ -312049,6 +313156,83 @@ var Node$13 = class Node$14 {
312049
313156
  this.#commentHighlightDecorator.destroy();
312050
313157
  this.#decorationBridge.destroy();
312051
313158
  }
313159
+ }, HoverGroupCoordinator = class {
313160
+ #spec;
313161
+ #current = null;
313162
+ constructor(spec) {
313163
+ this.handleMouseEnter = (event) => {
313164
+ const entry = event.target?.closest?.(this.#spec.entrySelector);
313165
+ if (!entry)
313166
+ return;
313167
+ const id2 = this.#spec.getId(entry);
313168
+ if (!id2)
313169
+ return;
313170
+ this.#set(id2);
313171
+ };
313172
+ this.handleMouseLeave = (event) => {
313173
+ const entry = event.target?.closest?.(this.#spec.entrySelector);
313174
+ if (!entry)
313175
+ return;
313176
+ const id2 = this.#spec.getId(entry);
313177
+ if (!id2)
313178
+ return;
313179
+ const relatedTarget = event.relatedTarget;
313180
+ if (relatedTarget) {
313181
+ const nextEntry = relatedTarget.closest?.(this.#spec.entrySelector);
313182
+ if (nextEntry && this.#spec.getId(nextEntry) === id2)
313183
+ return;
313184
+ }
313185
+ this.clear();
313186
+ };
313187
+ this.#spec = spec;
313188
+ }
313189
+ reapply() {
313190
+ if (!this.#current)
313191
+ return;
313192
+ const { id: id2 } = this.#current;
313193
+ const elements = this.#spec.queryGroup(id2);
313194
+ if (elements.length === 0) {
313195
+ this.#current = null;
313196
+ return;
313197
+ }
313198
+ this.#applyClass(elements);
313199
+ this.#spec.onApply?.(elements);
313200
+ this.#current = {
313201
+ id: id2,
313202
+ elements
313203
+ };
313204
+ }
313205
+ clear() {
313206
+ if (!this.#current)
313207
+ return;
313208
+ for (const element3 of this.#current.elements) {
313209
+ element3.classList.remove(this.#spec.hoverClass);
313210
+ this.#spec.onClear?.(element3);
313211
+ }
313212
+ this.#current = null;
313213
+ }
313214
+ #set(id2) {
313215
+ if (this.#current?.id === id2)
313216
+ return;
313217
+ this.clear();
313218
+ const elements = this.#spec.queryGroup(id2);
313219
+ if (elements.length === 0)
313220
+ return;
313221
+ this.#applyClass(elements);
313222
+ this.#spec.onApply?.(elements);
313223
+ this.#current = {
313224
+ id: id2,
313225
+ elements
313226
+ };
313227
+ }
313228
+ #applyClass(elements) {
313229
+ const filter = this.#spec.shouldApplyTo;
313230
+ for (const element3 of elements) {
313231
+ if (filter && !filter(element3))
313232
+ continue;
313233
+ element3.classList.add(this.#spec.hoverClass);
313234
+ }
313235
+ }
312052
313236
  }, ProofingStore = class {
312053
313237
  #issuesBySegment = /* @__PURE__ */ new Map;
312054
313238
  addIssue(issue) {
@@ -312659,6 +313843,9 @@ var Node$13 = class Node$14 {
312659
313843
  color: inherit !important;
312660
313844
  text-decoration: none !important;
312661
313845
  cursor: default;
313846
+ /* Disable native link drag so our pointer loop can run text-selection. */
313847
+ -webkit-user-drag: none;
313848
+ user-drag: none;
312662
313849
  }
312663
313850
 
312664
313851
  .superdoc-toc-entry .superdoc-link:hover {
@@ -312670,6 +313857,31 @@ var Node$13 = class Node$14 {
312670
313857
  outline: none;
312671
313858
  }
312672
313859
 
313860
+ /* TOC hover. .toc-group-hover is set by PresentationEditor on every entry
313861
+ sharing a data-toc-id so the whole TOC greys out together. The ::after
313862
+ stripe (height set via --toc-gap-below) fills the paragraph-spacing gap
313863
+ between adjacent entries so the hover reads as one continuous block. */
313864
+ .superdoc-toc-entry:hover,
313865
+ .superdoc-toc-entry.toc-group-hover {
313866
+ background-color: var(--sd-content-controls-block-hover-bg, #f2f2f2);
313867
+ }
313868
+
313869
+ /* Pointer-events stay on (default) so the stripe extends the parent entry's
313870
+ hit-test area through the paragraph-spacing gap. Without this, moving the
313871
+ cursor between two adjacent entries fires mouseout on the upper entry with
313872
+ relatedTarget = the page (not a TOC entry), the coordinator drops the
313873
+ group-hover class, and the grey disappears for a frame before the next
313874
+ entry's mouseover restores it — visible as a flicker. */
313875
+ .superdoc-toc-entry.toc-group-hover::after {
313876
+ content: '';
313877
+ position: absolute;
313878
+ left: 0;
313879
+ right: 0;
313880
+ top: 100%;
313881
+ height: var(--toc-gap-below, 0px);
313882
+ background-color: var(--sd-content-controls-block-hover-bg, #f2f2f2);
313883
+ }
313884
+
312673
313885
  /* Remove focus outlines from layout engine elements */
312674
313886
  .superdoc-layout,
312675
313887
  .superdoc-page,
@@ -314724,6 +315936,7 @@ menclose::after {
314724
315936
  });
314725
315937
  if (run2.fontSize != null)
314726
315938
  markerEl.style.fontSize = `${run2.fontSize}px`;
315939
+ allowFontSynthesis(markerEl);
314727
315940
  markerEl.style.fontWeight = run2.bold ? "bold" : "";
314728
315941
  markerEl.style.fontStyle = run2.italic ? "italic" : "";
314729
315942
  if (run2.color)
@@ -316647,8 +317860,12 @@ menclose::after {
316647
317860
  applyResolvedFragmentFrame(fragmentEl, resolvedItem, fragment2);
316648
317861
  else
316649
317862
  applyFragmentFrame(fragmentEl, fragment2);
316650
- if (isTocEntry)
316651
- fragmentEl.classList.add("superdoc-toc-entry");
317863
+ if (isTocEntry) {
317864
+ fragmentEl.classList.add(DOM_CLASS_NAMES.TOC_ENTRY);
317865
+ const tocId = block.attrs?.tocId;
317866
+ if (typeof tocId === "string" && tocId.length > 0)
317867
+ fragmentEl.dataset.tocId = tocId;
317868
+ }
316652
317869
  if (paraContinuesFromPrev)
316653
317870
  fragmentEl.dataset.continuesFromPrev = "true";
316654
317871
  if (paraContinuesOnNext)
@@ -316705,6 +317922,7 @@ menclose::after {
316705
317922
  style: run2.italic ? "italic" : "normal"
316706
317923
  });
316707
317924
  dropCapEl.style.fontSize = `${run2.fontSize}px`;
317925
+ allowFontSynthesis(dropCapEl);
316708
317926
  if (run2.bold)
316709
317927
  dropCapEl.style.fontWeight = "bold";
316710
317928
  if (run2.italic)
@@ -316824,6 +318042,7 @@ menclose::after {
316824
318042
  style: run2.italic ? "italic" : "normal"
316825
318043
  });
316826
318044
  element3.style.fontSize = `${run2.fontSize}px`;
318045
+ allowFontSynthesis(element3);
316827
318046
  if (run2.bold)
316828
318047
  element3.style.fontWeight = "bold";
316829
318048
  if (run2.italic)
@@ -317016,6 +318235,7 @@ menclose::after {
317016
318235
  }
317017
318236
  if (run2.textColor)
317018
318237
  annotation.style.color = run2.textColor;
318238
+ allowFontSynthesis(annotation);
317019
318239
  if (run2.bold)
317020
318240
  annotation.style.fontWeight = "bold";
317021
318241
  if (run2.italic)
@@ -324843,6 +326063,7 @@ menclose::after {
324843
326063
  #cellAnchor = null;
324844
326064
  #cellDragMode = "none";
324845
326065
  #pendingMarginClick = null;
326066
+ #pendingTocLinkNav = null;
324846
326067
  #lastSelectedImageBlockId = null;
324847
326068
  #suppressFocusInFromDraggable = false;
324848
326069
  #pendingStructuredContentLabelGesture = null;
@@ -325384,10 +326605,14 @@ menclose::after {
325384
326605
  return;
325385
326606
  }
325386
326607
  const linkEl = target?.closest?.("a.superdoc-link");
325387
- if (linkEl) {
325388
- this.#handleLinkClick(event, linkEl);
325389
- return;
325390
- }
326608
+ this.#pendingTocLinkNav = null;
326609
+ if (linkEl)
326610
+ if (linkEl.closest(`.${DOM_CLASS_NAMES.TOC_ENTRY}`))
326611
+ this.#pendingTocLinkNav = linkEl;
326612
+ else {
326613
+ this.#handleLinkClick(event, linkEl);
326614
+ return;
326615
+ }
325391
326616
  const annotationEl = target?.closest?.(buildAnnotationSelector());
325392
326617
  const isDraggableAnnotation = target?.closest?.(DRAGGABLE_SELECTOR) != null;
325393
326618
  const isNativeDragSource = target?.closest?.(DRAG_SOURCE_SELECTOR) != null;
@@ -325726,6 +326951,10 @@ menclose::after {
325726
326951
  event
325727
326952
  });
325728
326953
  this.#suppressFocusInFromDraggable = false;
326954
+ const pendingTocLink = this.#pendingTocLinkNav;
326955
+ this.#pendingTocLinkNav = null;
326956
+ if (pendingTocLink && !this.#dragThresholdExceeded)
326957
+ this.#handleLinkClick(event, pendingTocLink);
325729
326958
  if (!this.#isDragging) {
325730
326959
  this.#stopAutoScroll();
325731
326960
  return;
@@ -329750,6 +330979,17 @@ menclose::after {
329750
330979
  const declaredRows = buildFontReport(declared.filter((family2) => family2 && !usedFamilies.has(family2.toLowerCase())), registry2, resolver2);
329751
330980
  return [...faceRows, ...declaredRows];
329752
330981
  }
330982
+ getDocumentFontOptions() {
330983
+ try {
330984
+ const usedFaces = this.#getUsedFaces?.() ?? [];
330985
+ if (!usedFaces.length)
330986
+ return [];
330987
+ const { registry: registry2 } = this.#resolveContext();
330988
+ return buildDocumentFontOptions(usedFaces, registry2, this.#fontResolver ?? undefined);
330989
+ } catch {
330990
+ return [];
330991
+ }
330992
+ }
329753
330993
  async ensureReadyForMeasure() {
329754
330994
  if (this.#getRequiredFaces)
329755
330995
  return this.#ensureFacesReady(this.#getRequiredFaces);
@@ -330189,19 +331429,19 @@ menclose::after {
330189
331429
  return;
330190
331430
  console.log(...args$1);
330191
331431
  }, 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(() => {
331432
+ var init_src_BXck1nRd_es = __esm(() => {
330193
331433
  init_rolldown_runtime_Bg48TavK_es();
330194
- init_SuperConverter_DOoAJ6Zk_es();
331434
+ init_SuperConverter_BSDZ3hYr_es();
330195
331435
  init_jszip_C49i9kUs_es();
330196
331436
  init_xml_js_CqGKpaft_es();
330197
- init_uuid_qzgm05fK_es();
330198
- init_create_headless_toolbar_DUhzXJ4D_es();
331437
+ init_uuid_B2wVPhPi_es();
331438
+ init_create_headless_toolbar_CKZ579SH_es();
330199
331439
  init_constants_D9qj59G2_es();
330200
331440
  init_dist_B8HfvhaK_es();
330201
331441
  init_unified_Dsuw2be5_es();
330202
331442
  init_remark_gfm_BhnWr3yf_es();
330203
331443
  init_remark_stringify_6MMJfY0k_es();
330204
- init_DocxZipper_Bu2Fhqkw_es();
331444
+ init_DocxZipper_FUsfThjV_es();
330205
331445
  init__plugin_vue_export_helper_5t5P5NuM_es();
330206
331446
  init_eventemitter3_BnGqBE_Q_es();
330207
331447
  init_errors_CNaD6vcg_es();
@@ -334093,10 +335333,12 @@ ${err.toString()}`);
334093
335333
  return false;
334094
335334
  const { $from } = selection;
334095
335335
  let paragraph2 = null;
335336
+ let paragraphDepth = null;
334096
335337
  for (let d = $from.depth;d >= 0; d--) {
334097
335338
  const node3 = $from.node(d);
334098
335339
  if (node3.type.name === "paragraph") {
334099
335340
  paragraph2 = node3;
335341
+ paragraphDepth = d;
334100
335342
  break;
334101
335343
  }
334102
335344
  }
@@ -334106,7 +335348,14 @@ ${err.toString()}`);
334106
335348
  return false;
334107
335349
  if (!isVisuallyEmptyParagraph(paragraph2) && !hasOnlyBreakContent(paragraph2))
334108
335350
  return false;
334109
- const tr = state.tr.insertText(event.data);
335351
+ let tr = state.tr;
335352
+ if (hasOnlyBreakContent(paragraph2) && paragraphDepth != null) {
335353
+ const contentStart = $from.start(paragraphDepth);
335354
+ const contentEnd = $from.end(paragraphDepth);
335355
+ tr = tr.delete(contentStart, contentEnd).insertText(event.data, contentStart);
335356
+ tr = tr.setSelection(TextSelection.create(tr.doc, contentStart + event.data.length));
335357
+ } else
335358
+ tr = tr.insertText(event.data);
334110
335359
  view.dispatch(tr);
334111
335360
  event.preventDefault();
334112
335361
  return true;
@@ -334426,6 +335675,8 @@ ${err.toString()}`);
334426
335675
  selectable: false,
334427
335676
  content: "",
334428
335677
  atom: true,
335678
+ leafText: () => `
335679
+ `,
334429
335680
  addOptions() {
334430
335681
  return {};
334431
335682
  },
@@ -348257,7 +349508,7 @@ function print() { __p += __j.call(arguments, '') }
348257
349508
  if (searchModel === "visible")
348258
349509
  this.#buildVisible(doc$12);
348259
349510
  else
348260
- this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, ATOM_PLACEHOLDER);
349511
+ this.text = doc$12.textBetween(0, doc$12.content.size, BLOCK_SEPARATOR, readLeafText);
348261
349512
  this.segments = [];
348262
349513
  this.docSize = doc$12.content.size;
348263
349514
  this.doc = doc$12;
@@ -348304,7 +349555,11 @@ function print() { __p += __j.call(arguments, '') }
348304
349555
  return;
348305
349556
  }
348306
349557
  if (node3.isLeaf) {
348307
- parts.push(ATOM_PLACEHOLDER);
349558
+ if (hasTrackDeleteMark$2(node3)) {
349559
+ appendDeletionBarrier();
349560
+ return;
349561
+ }
349562
+ parts.push(readLeafText(node3));
348308
349563
  emittedDeletionBarrier = false;
348309
349564
  return;
348310
349565
  }
@@ -348367,26 +349622,43 @@ function print() { __p += __j.call(arguments, '') }
348367
349622
  return offset$1;
348368
349623
  }
348369
349624
  if (node3.isLeaf) {
349625
+ if (searchModel === "visible" && hasTrackDeleteMark$2(node3)) {
349626
+ if (context?.deletionBarrierActive)
349627
+ return offset$1;
349628
+ addSegment({
349629
+ offsetStart: offset$1,
349630
+ offsetEnd: offset$1 + 1,
349631
+ docFrom: docPos,
349632
+ docTo: docPos + node3.nodeSize,
349633
+ kind: "atom"
349634
+ });
349635
+ if (context)
349636
+ context.deletionBarrierActive = true;
349637
+ return offset$1 + 1;
349638
+ }
348370
349639
  if (context && searchModel === "visible")
348371
349640
  context.deletionBarrierActive = false;
349641
+ const leafText = readLeafText(node3);
349642
+ if (leafText.length === 0)
349643
+ return offset$1;
348372
349644
  if (node3.type.name === "hard_break") {
348373
349645
  addSegment({
348374
349646
  offsetStart: offset$1,
348375
- offsetEnd: offset$1 + 1,
349647
+ offsetEnd: offset$1 + leafText.length,
348376
349648
  docFrom: docPos,
348377
349649
  docTo: docPos + node3.nodeSize,
348378
349650
  kind: "hardBreak"
348379
349651
  });
348380
- return offset$1 + 1;
349652
+ return offset$1 + leafText.length;
348381
349653
  }
348382
349654
  addSegment({
348383
349655
  offsetStart: offset$1,
348384
- offsetEnd: offset$1 + 1,
349656
+ offsetEnd: offset$1 + leafText.length,
348385
349657
  docFrom: docPos,
348386
349658
  docTo: docPos + node3.nodeSize,
348387
349659
  kind: "atom"
348388
349660
  });
348389
- return offset$1 + 1;
349661
+ return offset$1 + leafText.length;
348390
349662
  }
348391
349663
  return this.#walkNodeContent(node3, docPos + 1, offset$1, addSegment, searchModel, context);
348392
349664
  }
@@ -348403,24 +349675,56 @@ function print() { __p += __j.call(arguments, '') }
348403
349675
  }
348404
349676
  offsetRangeToDocRanges(start$1, end$1) {
348405
349677
  const ranges = [];
349678
+ let current = null;
348406
349679
  for (const segment of this.segments) {
348407
349680
  if (segment.offsetEnd <= start$1)
348408
349681
  continue;
348409
349682
  if (segment.offsetStart >= end$1)
348410
349683
  break;
348411
- if (segment.kind !== "text")
349684
+ if (segment.kind === "blockSep") {
349685
+ if (current) {
349686
+ ranges.push({
349687
+ from: current.from,
349688
+ to: current.to
349689
+ });
349690
+ current = null;
349691
+ }
348412
349692
  continue;
349693
+ }
348413
349694
  const overlapStart = Math.max(start$1, segment.offsetStart);
348414
349695
  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
- });
349696
+ if (overlapStart >= overlapEnd)
349697
+ continue;
349698
+ let from$1;
349699
+ let to;
349700
+ if (segment.kind === "text") {
349701
+ from$1 = segment.docFrom + (overlapStart - segment.offsetStart);
349702
+ to = segment.docFrom + (overlapEnd - segment.offsetStart);
349703
+ } else {
349704
+ from$1 = segment.docFrom;
349705
+ to = segment.docTo;
349706
+ }
349707
+ if (current && segment.offsetStart === current.offsetEnd && from$1 === current.to) {
349708
+ current.to = to;
349709
+ current.offsetEnd = overlapEnd;
349710
+ } else {
349711
+ if (current)
349712
+ ranges.push({
349713
+ from: current.from,
349714
+ to: current.to
349715
+ });
349716
+ current = {
349717
+ from: from$1,
349718
+ to,
349719
+ offsetEnd: overlapEnd
349720
+ };
348422
349721
  }
348423
349722
  }
349723
+ if (current)
349724
+ ranges.push({
349725
+ from: current.from,
349726
+ to: current.to
349727
+ });
348424
349728
  return ranges;
348425
349729
  }
348426
349730
  offsetToDocPos(offset$1) {
@@ -349061,6 +350365,8 @@ function print() { __p += __j.call(arguments, '') }
349061
350365
  TABLE_FRAGMENT: "superdoc-table-fragment",
349062
350366
  DOCUMENT_SECTION: "superdoc-document-section",
349063
350367
  SDT_GROUP_HOVER: "sdt-group-hover",
350368
+ TOC_ENTRY: "superdoc-toc-entry",
350369
+ TOC_GROUP_HOVER: "toc-group-hover",
349064
350370
  IMAGE_FRAGMENT: "superdoc-image-fragment",
349065
350371
  INLINE_IMAGE: "superdoc-inline-image",
349066
350372
  LIST_MARKER: "superdoc-list-marker",
@@ -350841,7 +352147,7 @@ function print() { __p += __j.call(arguments, '') }
350841
352147
  };
350842
352148
  }
350843
352149
  }, [["__scopeId", "data-v-d25821a5"]]);
350844
- TOOLBAR_FONTS = getDefaultFontOfferings().map((offering) => ({
352150
+ TOOLBAR_FONTS = getBuiltInToolbarFontOfferings().map((offering) => ({
350845
352151
  label: offering.logicalFamily,
350846
352152
  key: fontOfferingStack(offering),
350847
352153
  fontWeight: 400,
@@ -351374,7 +352680,8 @@ function print() { __p += __j.call(arguments, '') }
351374
352680
  const menuRef = exports_vue.ref(null);
351375
352681
  const menuPosition = exports_vue.ref({
351376
352682
  top: "0px",
351377
- left: "0px"
352683
+ left: "0px",
352684
+ maxHeight: "none"
351378
352685
  });
351379
352686
  const optionRefs = exports_vue.ref([]);
351380
352687
  const keyboardIndex = exports_vue.ref(-1);
@@ -351411,6 +352718,7 @@ function print() { __p += __j.call(arguments, '') }
351411
352718
  position: "fixed",
351412
352719
  top: menuPosition.value.top,
351413
352720
  left: menuPosition.value.left,
352721
+ maxHeight: menuPosition.value.maxHeight,
351414
352722
  zIndex: 2000
351415
352723
  };
351416
352724
  });
@@ -351426,17 +352734,30 @@ function print() { __p += __j.call(arguments, '') }
351426
352734
  if (!triggerRef.value)
351427
352735
  return;
351428
352736
  const rect = triggerRef.value.getBoundingClientRect();
351429
- const menuWidth = menuRef.value?.offsetWidth ?? 0;
352737
+ const menuEl = menuRef.value;
352738
+ const menuWidth = menuEl?.offsetWidth ?? 0;
352739
+ const menuHeight = menuEl?.scrollHeight ?? menuEl?.offsetHeight ?? 0;
351430
352740
  const viewportWidth = window.innerWidth || document.documentElement.clientWidth || 0;
352741
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight || 0;
351431
352742
  const gutter = 8;
352743
+ const gap = 4;
352744
+ const belowTop = rect.bottom + gap;
352745
+ const aboveBottom = rect.top - gap;
352746
+ const availableBelow = Math.max(0, viewportHeight - belowTop - gutter);
352747
+ const availableAbove = Math.max(0, aboveBottom - gutter);
352748
+ const openAbove = availableBelow < menuHeight && availableAbove > availableBelow;
352749
+ const maxHeight = openAbove ? availableAbove : availableBelow;
352750
+ const menuRenderHeight = menuHeight ? Math.min(menuHeight, maxHeight) : maxHeight;
352751
+ const top$1 = openAbove ? Math.max(gutter, aboveBottom - menuRenderHeight) : belowTop;
351432
352752
  let left$1 = rect.left;
351433
352753
  if (props.placement === "bottom-end")
351434
352754
  left$1 = rect.right - menuWidth;
351435
352755
  const maxLeft = Math.max(gutter, viewportWidth - menuWidth - gutter);
351436
352756
  left$1 = Math.min(Math.max(gutter, left$1), maxLeft);
351437
352757
  menuPosition.value = {
351438
- top: `${rect.bottom + 4}px`,
351439
- left: `${left$1}px`
352758
+ top: `${top$1}px`,
352759
+ left: `${left$1}px`,
352760
+ maxHeight: `${maxHeight}px`
351440
352761
  };
351441
352762
  };
351442
352763
  const onTriggerClick = () => {
@@ -351502,8 +352823,13 @@ function print() { __p += __j.call(arguments, '') }
351502
352823
  el.setAttribute("tabindex", index2 === keyboardIndex.value ? "0" : "-1");
351503
352824
  });
351504
352825
  const target = optionRefs.value[keyboardIndex.value];
351505
- if (target && typeof target.focus === "function")
352826
+ if (target && typeof target.focus === "function") {
351506
352827
  target.focus();
352828
+ target.scrollIntoView?.({
352829
+ block: "nearest",
352830
+ inline: "nearest"
352831
+ });
352832
+ }
351507
352833
  };
351508
352834
  const moveKeyboardIndex = (direction) => {
351509
352835
  const navigableIndexes = getNavigableIndexes();
@@ -351638,6 +352964,7 @@ function print() { __p += __j.call(arguments, '') }
351638
352964
  if (hasRenderOptions.value)
351639
352965
  return;
351640
352966
  keyboardIndex.value = getInitialKeyboardIndex();
352967
+ await exports_vue.nextTick();
351641
352968
  focusKeyboardIndex();
351642
352969
  }, { immediate: true });
351643
352970
  exports_vue.watch(isOpen, (open2) => {
@@ -351701,7 +353028,7 @@ function print() { __p += __j.call(arguments, '') }
351701
353028
  })]))]);
351702
353029
  };
351703
353030
  }
351704
- }, [["__scopeId", "data-v-302f7d86"]]);
353031
+ }, [["__scopeId", "data-v-69732782"]]);
351705
353032
  SdTooltip_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
351706
353033
  __name: "SdTooltip",
351707
353034
  props: {
@@ -352351,16 +353678,21 @@ function print() { __p += __j.call(arguments, '') }
352351
353678
  toolbarKey.value += 1;
352352
353679
  };
352353
353680
  const onResizeThrottled = throttle(onWindowResized, 300);
352354
- function teardownWindowListeners() {
353681
+ const onToolbarItemsChanged = () => {
353682
+ toolbarKey.value += 1;
353683
+ };
353684
+ function teardownListeners() {
352355
353685
  window.removeEventListener("resize", onResizeThrottled);
352356
353686
  window.removeEventListener("keydown", onKeyDown);
353687
+ proxy.$toolbar.off?.("toolbar-items-changed", onToolbarItemsChanged);
352357
353688
  containerResizeObserver?.disconnect();
352358
353689
  containerResizeObserver = null;
352359
353690
  }
352360
- function setupWindowListeners() {
352361
- teardownWindowListeners();
353691
+ function setupListeners() {
353692
+ teardownListeners();
352362
353693
  window.addEventListener("resize", onResizeThrottled);
352363
353694
  window.addEventListener("keydown", onKeyDown);
353695
+ proxy.$toolbar.on?.("toolbar-items-changed", onToolbarItemsChanged);
352364
353696
  if (typeof ResizeObserver !== "undefined" && proxy.$toolbar.config?.responsiveToContainer && proxy.$toolbar.toolbarContainer) {
352365
353697
  containerResizeObserver = new ResizeObserver(() => {
352366
353698
  onResizeThrottled();
@@ -352369,10 +353701,10 @@ function print() { __p += __j.call(arguments, '') }
352369
353701
  }
352370
353702
  updateCompactSideGroups();
352371
353703
  }
352372
- exports_vue.onMounted(setupWindowListeners);
352373
- exports_vue.onActivated(setupWindowListeners);
352374
- exports_vue.onDeactivated(teardownWindowListeners);
352375
- exports_vue.onBeforeUnmount(teardownWindowListeners);
353704
+ exports_vue.onMounted(setupListeners);
353705
+ exports_vue.onActivated(setupListeners);
353706
+ exports_vue.onDeactivated(teardownListeners);
353707
+ exports_vue.onBeforeUnmount(teardownListeners);
352376
353708
  const handleCommand = ({ item, argument, option }) => {
352377
353709
  proxy.$toolbar.emitCommand({
352378
353710
  item,
@@ -352451,7 +353783,7 @@ function print() { __p += __j.call(arguments, '') }
352451
353783
  ], 32);
352452
353784
  };
352453
353785
  }
352454
- }, [["__scopeId", "data-v-b83d488a"]]);
353786
+ }, [["__scopeId", "data-v-938eaa1b"]]);
352455
353787
  toolbarTexts = {
352456
353788
  bold: "Bold",
352457
353789
  fontFamily: "Font",
@@ -352582,8 +353914,10 @@ function print() { __p += __j.call(arguments, '') }
352582
353914
  this._boundEditorHandlers = {
352583
353915
  transaction: null,
352584
353916
  selectionUpdate: null,
352585
- focus: null
353917
+ focus: null,
353918
+ fontsChanged: null
352586
353919
  };
353920
+ this._lastFontOptionsSignature = "";
352587
353921
  this._restoreFocusTimeoutId = null;
352588
353922
  if (!this.config.selector && this.config.element)
352589
353923
  this.config.selector = this.config.element;
@@ -352642,24 +353976,40 @@ function print() { __p += __j.call(arguments, '') }
352642
353976
  if (this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length)
352643
353977
  this.config.toolbarGroups = Object.keys(this.config.groups);
352644
353978
  }
353979
+ #detachActiveEditorListeners() {
353980
+ if (!this.activeEditor || !this._boundEditorHandlers.transaction)
353981
+ return;
353982
+ this.activeEditor.off("transaction", this._boundEditorHandlers.transaction);
353983
+ this.activeEditor.off("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
353984
+ this.activeEditor.off("focus", this._boundEditorHandlers.focus);
353985
+ this.activeEditor.off("fonts-changed", this._boundEditorHandlers.fontsChanged);
353986
+ this._boundEditorHandlers.transaction = null;
353987
+ this._boundEditorHandlers.selectionUpdate = null;
353988
+ this._boundEditorHandlers.focus = null;
353989
+ this._boundEditorHandlers.fontsChanged = null;
353990
+ }
352645
353991
  setActiveEditor(editor) {
352646
- if (this.activeEditor && this._boundEditorHandlers.transaction) {
352647
- this.activeEditor.off("transaction", this._boundEditorHandlers.transaction);
352648
- this.activeEditor.off("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
352649
- this.activeEditor.off("focus", this._boundEditorHandlers.focus);
352650
- this._boundEditorHandlers.transaction = null;
352651
- this._boundEditorHandlers.selectionUpdate = null;
352652
- this._boundEditorHandlers.focus = null;
353992
+ const sameEditor = editor === this.activeEditor;
353993
+ const alreadyListening = Boolean(this._boundEditorHandlers.transaction);
353994
+ if (sameEditor && (!editor || alreadyListening)) {
353995
+ this.updateToolbarState();
353996
+ return;
352653
353997
  }
353998
+ this.#detachActiveEditorListeners();
352654
353999
  this.activeEditor = editor;
352655
354000
  if (editor) {
352656
354001
  this._boundEditorHandlers.transaction = this.onEditorTransaction.bind(this);
352657
354002
  this._boundEditorHandlers.selectionUpdate = this.onEditorSelectionUpdate.bind(this);
352658
354003
  this._boundEditorHandlers.focus = this.onEditorFocus.bind(this);
354004
+ this._boundEditorHandlers.fontsChanged = this.onEditorFontsChanged.bind(this);
352659
354005
  this.activeEditor.on("transaction", this._boundEditorHandlers.transaction);
352660
354006
  this.activeEditor.on("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
352661
354007
  this.activeEditor.on("focus", this._boundEditorHandlers.focus);
354008
+ this.activeEditor.on("fonts-changed", this._boundEditorHandlers.fontsChanged);
352662
354009
  }
354010
+ this.#rebuildToolbarItems();
354011
+ this._lastFontOptionsSignature = this.#fontOptionsSignature();
354012
+ this.updateToolbarState();
352663
354013
  }
352664
354014
  getToolbarItemByGroup(groupName) {
352665
354015
  return this.toolbarItems.filter((item) => (item.group?.value || "center") === groupName);
@@ -352676,13 +354026,14 @@ function print() { __p += __j.call(arguments, '') }
352676
354026
  return this.config.responsiveToContainer ? containerWidth : documentWidth;
352677
354027
  }
352678
354028
  #makeToolbarItems({ superToolbar, icons: icons$1, texts, fonts, hideButtons, isDev = false } = {}) {
354029
+ const availableWidth = this.getAvailableWidth();
352679
354030
  const { defaultItems, overflowItems } = makeDefaultItems({
352680
354031
  superToolbar,
352681
354032
  toolbarIcons: icons$1,
352682
354033
  toolbarTexts: texts,
352683
- toolbarFonts: fonts,
354034
+ toolbarFonts: this.#resolveToolbarFonts(fonts),
352684
354035
  hideButtons,
352685
- availableWidth: this.getAvailableWidth(),
354036
+ availableWidth,
352686
354037
  role: this.role,
352687
354038
  isDev
352688
354039
  });
@@ -352695,6 +354046,26 @@ function print() { __p += __j.call(arguments, '') }
352695
354046
  this.toolbarItems = defaultItems.filter((item) => allConfigItems.includes(item.name.value)).filter((item) => !this.config.excludeItems.includes(item.name.value));
352696
354047
  this.overflowItems = overflowItems.filter((item) => allConfigItems.includes(item.name.value));
352697
354048
  }
354049
+ #resolveToolbarFonts(configFonts) {
354050
+ return composeToolbarFontOptions(this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [], configFonts);
354051
+ }
354052
+ #rebuildToolbarItems() {
354053
+ this.#makeToolbarItems({
354054
+ superToolbar: this,
354055
+ icons: this.config.icons,
354056
+ texts: this.config.texts,
354057
+ fonts: this.config.fonts,
354058
+ hideButtons: this.config.hideButtons,
354059
+ isDev: this.isDev
354060
+ });
354061
+ this.emit("toolbar-items-changed");
354062
+ }
354063
+ #fontOptionsSignature() {
354064
+ if (this.config.fonts)
354065
+ return "custom-fonts";
354066
+ const options = this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [];
354067
+ return JSON.stringify(options.map((option) => [option.logicalFamily, option.previewFamily]));
354068
+ }
352698
354069
  #initDefaultFonts() {
352699
354070
  if (!this.activeEditor || !this.activeEditor.converter)
352700
354071
  return;
@@ -353066,6 +354437,14 @@ function print() { __p += __j.call(arguments, '') }
353066
354437
  if (this.#restoreStickyMarksIfNeeded())
353067
354438
  this.updateToolbarState();
353068
354439
  }
354440
+ onEditorFontsChanged() {
354441
+ const signature = this.#fontOptionsSignature();
354442
+ if (signature !== this._lastFontOptionsSignature) {
354443
+ this._lastFontOptionsSignature = signature;
354444
+ this.#rebuildToolbarItems();
354445
+ }
354446
+ this.updateToolbarState();
354447
+ }
353069
354448
  onEditorFocus() {
353070
354449
  if (this.pendingMarkCommands.length) {
353071
354450
  this.onEditorSelectionUpdate();
@@ -353132,6 +354511,7 @@ function print() { __p += __j.call(arguments, '') }
353132
354511
  clearTimeout(this._restoreFocusTimeoutId);
353133
354512
  this._restoreFocusTimeoutId = null;
353134
354513
  }
354514
+ this.#detachActiveEditorListeners();
353135
354515
  this.destroyHeadlessToolbar();
353136
354516
  this.app?.unmount();
353137
354517
  }
@@ -356184,8 +357564,8 @@ function print() { __p += __j.call(arguments, '') }
356184
357564
  try {
356185
357565
  const [{ unified: unified$1 }, { default: rehypeParse2 }, { default: rehypeRemark2 }, { default: remarkStringify$1 }, { default: remarkGfm$1 }] = await Promise.all([
356186
357566
  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)),
357567
+ Promise.resolve().then(() => (init_rehype_parse_DTSDs3kr_es(), exports_rehype_parse_DTSDs3kr_es)),
357568
+ Promise.resolve().then(() => (init_rehype_remark_Bt5njn02_es(), exports_rehype_remark_Bt5njn02_es)),
356189
357569
  Promise.resolve().then(() => (init_remark_stringify_B_orWEvD_es(), exports_remark_stringify_B_orWEvD_es)),
356190
357570
  Promise.resolve().then(() => (init_remark_gfm_eZN6yzWQ_es(), exports_remark_gfm_eZN6yzWQ_es))
356191
357571
  ]);
@@ -356508,6 +357888,7 @@ function print() { __p += __j.call(arguments, '') }
356508
357888
  editor: this
356509
357889
  });
356510
357890
  console.error(err);
357891
+ throw err;
356511
357892
  }
356512
357893
  }
356513
357894
  #endCollaboration() {
@@ -358511,7 +359892,8 @@ function print() { __p += __j.call(arguments, '') }
358511
359892
  #lastSelectedFieldAnnotation = null;
358512
359893
  #lastSelectedStructuredContentBlock = null;
358513
359894
  #lastSelectedStructuredContentInline = null;
358514
- #lastHoveredStructuredContentBlock = null;
359895
+ #sdtHoverCoordinator = null;
359896
+ #tocHoverCoordinator = null;
358515
359897
  #remoteCursorManager = null;
358516
359898
  #cursorUpdateTimer = null;
358517
359899
  #remoteCursorOverlay = null;
@@ -358582,8 +359964,11 @@ function print() { __p += __j.call(arguments, '') }
358582
359964
  ensureEditorNativeSelectionStyles(doc$12);
358583
359965
  ensureEditorFieldAnnotationInteractionStyles(doc$12);
358584
359966
  ensureEditorMovableObjectInteractionStyles(doc$12);
358585
- this.#painterHost.addEventListener("mouseover", this.#handleStructuredContentBlockMouseEnter);
358586
- this.#painterHost.addEventListener("mouseout", this.#handleStructuredContentBlockMouseLeave);
359967
+ this.#initializeHoverCoordinators();
359968
+ this.#painterHost.addEventListener("mouseover", this.#sdtHoverCoordinator.handleMouseEnter);
359969
+ this.#painterHost.addEventListener("mouseout", this.#sdtHoverCoordinator.handleMouseLeave);
359970
+ this.#painterHost.addEventListener("mouseover", this.#tocHoverCoordinator.handleMouseEnter);
359971
+ this.#painterHost.addEventListener("mouseout", this.#tocHoverCoordinator.handleMouseLeave);
358587
359972
  this.#domIndexObserverManager = new DomPositionIndexObserverManager({
358588
359973
  windowRoot: this.#visibleHost?.ownerDocument?.defaultView ?? window,
358589
359974
  getPainterHost: () => this.#painterHost,
@@ -359751,6 +361136,9 @@ function print() { __p += __j.call(arguments, '') }
359751
361136
  getFontReport() {
359752
361137
  return this.#fontGate?.getReport() ?? [];
359753
361138
  }
361139
+ getDocumentFontOptions() {
361140
+ return this.#fontGate?.getDocumentFontOptions() ?? [];
361141
+ }
359754
361142
  getMissingFonts() {
359755
361143
  return [...new Set(this.getFontReport().filter((record) => record.missing).map((record) => record.logicalFamily))];
359756
361144
  }
@@ -362571,74 +363959,50 @@ function print() { __p += __j.call(arguments, '') }
362571
363959
  }
362572
363960
  this.#setSelectedStructuredContentBlockClass(elements, id2);
362573
363961
  }
362574
- #handleStructuredContentBlockMouseEnter = (event) => {
362575
- const block = event.target.closest(`.${DOM_CLASS_NAMES.BLOCK_SDT}`);
362576
- if (!block || !(block instanceof HTMLElement))
362577
- return;
362578
- if (block.classList.contains("ProseMirror-selectednode"))
362579
- return;
362580
- const rawId = block.dataset.sdtId;
362581
- if (!rawId)
363962
+ #initializeHoverCoordinators() {
363963
+ if (this.#sdtHoverCoordinator || this.#tocHoverCoordinator)
362582
363964
  return;
362583
- this.#setHoveredStructuredContentBlockClass(rawId);
362584
- };
362585
- #handleStructuredContentBlockMouseLeave = (event) => {
362586
- const block = event.target.closest(`.${DOM_CLASS_NAMES.BLOCK_SDT}`);
362587
- if (!block)
363965
+ this.#sdtHoverCoordinator = new HoverGroupCoordinator({
363966
+ entrySelector: `.${DOM_CLASS_NAMES.BLOCK_SDT}`,
363967
+ getId: (entry) => entry.dataset.sdtId,
363968
+ queryGroup: (id2) => this.#painterAdapter.getStructuredContentBlockElementsById(id2),
363969
+ hoverClass: DOM_CLASS_NAMES.SDT_GROUP_HOVER,
363970
+ shouldApplyTo: (element3) => !element3.classList.contains("ProseMirror-selectednode")
363971
+ });
363972
+ this.#tocHoverCoordinator = new HoverGroupCoordinator({
363973
+ entrySelector: `.${DOM_CLASS_NAMES.TOC_ENTRY}`,
363974
+ getId: (entry) => entry.dataset.tocId,
363975
+ queryGroup: (id2) => this.#queryTocEntryElementsById(id2),
363976
+ hoverClass: DOM_CLASS_NAMES.TOC_GROUP_HOVER,
363977
+ onApply: (elements) => this.#applyTocGapFill(elements),
363978
+ onClear: (element3) => element3.style.removeProperty("--toc-gap-below")
363979
+ });
363980
+ }
363981
+ #applyTocGapFill(elements) {
363982
+ if (elements.length < 2)
362588
363983
  return;
362589
- const relatedTarget = event.relatedTarget;
362590
- if (relatedTarget && block.dataset.sdtId) {
362591
- const escapedCheckId = typeof CSS !== "undefined" && CSS.escape ? CSS.escape(block.dataset.sdtId) : block.dataset.sdtId.replace(/"/g, "\\\"");
362592
- if (relatedTarget.closest(buildSdtBlockSelector(escapedCheckId)))
362593
- return;
363984
+ const measured = elements.map((element3) => ({
363985
+ element: element3,
363986
+ rect: element3.getBoundingClientRect()
363987
+ })).sort((a2, b$1) => a2.rect.top - b$1.rect.top);
363988
+ for (let i4 = 0;i4 < measured.length - 1; i4++) {
363989
+ const current = measured[i4];
363990
+ const next2 = measured[i4 + 1];
363991
+ const currentPage = current.element.closest("[data-page-index]");
363992
+ if (!currentPage || currentPage !== next2.element.closest("[data-page-index]"))
363993
+ continue;
363994
+ const rawGap = next2.rect.top - current.rect.bottom;
363995
+ const scaleY = current.rect.height && current.element.offsetHeight ? current.rect.height / current.element.offsetHeight : 1;
363996
+ const gap = scaleY > 0 ? rawGap / scaleY : rawGap;
363997
+ if (gap > 0)
363998
+ current.element.style.setProperty("--toc-gap-below", `${gap + 1}px`);
362594
363999
  }
362595
- this.#clearHoveredStructuredContentBlockClass();
362596
- };
362597
- #clearHoveredStructuredContentBlockClass() {
362598
- if (!this.#lastHoveredStructuredContentBlock)
362599
- return;
362600
- this.#lastHoveredStructuredContentBlock.elements.forEach((element3) => {
362601
- element3.classList.remove(DOM_CLASS_NAMES.SDT_GROUP_HOVER);
362602
- });
362603
- this.#lastHoveredStructuredContentBlock = null;
362604
364000
  }
362605
- #setHoveredStructuredContentBlockClass(id2) {
362606
- if (this.#lastHoveredStructuredContentBlock?.id === id2)
362607
- return;
362608
- this.#clearHoveredStructuredContentBlockClass();
364001
+ #queryTocEntryElementsById(id2) {
362609
364002
  if (!this.#painterHost)
362610
- return;
362611
- const elements = this.#painterAdapter.getStructuredContentBlockElementsById(id2);
362612
- if (elements.length === 0)
362613
- return;
362614
- elements.forEach((element3) => {
362615
- if (!element3.classList.contains("ProseMirror-selectednode"))
362616
- element3.classList.add(DOM_CLASS_NAMES.SDT_GROUP_HOVER);
362617
- });
362618
- this.#lastHoveredStructuredContentBlock = {
362619
- id: id2,
362620
- elements
362621
- };
362622
- }
362623
- #reapplySdtGroupHover() {
362624
- if (!this.#lastHoveredStructuredContentBlock || !this.#painterHost)
362625
- return;
362626
- const { id: id2 } = this.#lastHoveredStructuredContentBlock;
362627
- if (!id2)
362628
- return;
362629
- const elements = this.#painterAdapter.getStructuredContentBlockElementsById(id2);
362630
- if (elements.length === 0) {
362631
- this.#lastHoveredStructuredContentBlock = null;
362632
- return;
362633
- }
362634
- elements.forEach((element3) => {
362635
- if (!element3.classList.contains("ProseMirror-selectednode"))
362636
- element3.classList.add(DOM_CLASS_NAMES.SDT_GROUP_HOVER);
362637
- });
362638
- this.#lastHoveredStructuredContentBlock = {
362639
- id: id2,
362640
- elements
362641
- };
364003
+ return [];
364004
+ const escapedId = escapeAttrValue(id2);
364005
+ return Array.from(this.#painterHost.querySelectorAll(`.${DOM_CLASS_NAMES.TOC_ENTRY}[data-toc-id="${escapedId}"]`));
362642
364006
  }
362643
364007
  #refreshEditorDomAugmentations() {
362644
364008
  this.#postPaintPipeline.refreshAfterPaint({
@@ -362647,7 +364011,8 @@ function print() { __p += __j.call(arguments, '') }
362647
364011
  domPositionIndex: this.#domPositionIndex,
362648
364012
  proofingAnnotations: this.#buildProofingAnnotations(),
362649
364013
  rebuildDomPositionIndex: () => this.#rebuildDomPositionIndex(),
362650
- reapplyStructuredContentHover: () => this.#reapplySdtGroupHover()
364014
+ reapplyStructuredContentHover: () => this.#sdtHoverCoordinator?.reapply(),
364015
+ reapplyTocGroupHover: () => this.#tocHoverCoordinator?.reapply()
362651
364016
  });
362652
364017
  }
362653
364018
  #clearSelectedStructuredContentInlineClass() {
@@ -365035,11 +366400,11 @@ function print() { __p += __j.call(arguments, '') }
365035
366400
  ]);
365036
366401
  });
365037
366402
 
365038
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CmcU7hTR.es.js
366403
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui---bNCP-9.es.js
365039
366404
  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();
366405
+ var init_create_super_doc_ui_bNCP_9_es = __esm(() => {
366406
+ init_SuperConverter_BSDZ3hYr_es();
366407
+ init_create_headless_toolbar_CKZ579SH_es();
365043
366408
  headlessToolbarConstants = {
365044
366409
  DEFAULT_TEXT_ALIGN_OPTIONS: [
365045
366410
  {
@@ -365321,16 +366686,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
365321
366686
 
365322
366687
  // ../../packages/superdoc/dist/super-editor.es.js
365323
366688
  var init_super_editor_es = __esm(() => {
365324
- init_src_DEnygTyz_es();
365325
- init_SuperConverter_DOoAJ6Zk_es();
366689
+ init_src_BXck1nRd_es();
366690
+ init_SuperConverter_BSDZ3hYr_es();
365326
366691
  init_jszip_C49i9kUs_es();
365327
366692
  init_xml_js_CqGKpaft_es();
365328
- init_create_headless_toolbar_DUhzXJ4D_es();
366693
+ init_create_headless_toolbar_CKZ579SH_es();
365329
366694
  init_constants_D9qj59G2_es();
365330
366695
  init_dist_B8HfvhaK_es();
365331
366696
  init_unified_Dsuw2be5_es();
365332
- init_DocxZipper_Bu2Fhqkw_es();
365333
- init_create_super_doc_ui_CmcU7hTR_es();
366697
+ init_DocxZipper_FUsfThjV_es();
366698
+ init_create_super_doc_ui_bNCP_9_es();
365334
366699
  init_ui_C5PAS9hY_es();
365335
366700
  init_eventemitter3_BnGqBE_Q_es();
365336
366701
  init_errors_CNaD6vcg_es();