@superdoc-dev/mcp 0.12.0-next.3 → 0.12.0-next.5

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 +384 -93
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -52172,7 +52172,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
52172
52172
  emptyOptions2 = {};
52173
52173
  });
52174
52174
 
52175
- // ../../packages/superdoc/dist/chunks/SuperConverter-CfRQprW6.es.js
52175
+ // ../../packages/superdoc/dist/chunks/SuperConverter-BaKhr4cp.es.js
52176
52176
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
52177
52177
  const fieldValue = extension$1.config[field];
52178
52178
  if (typeof fieldValue === "function")
@@ -86324,32 +86324,37 @@ function buildFallback(row, physicalFamily, verdict, faceSlot) {
86324
86324
  lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(verdict),
86325
86325
  faces: row.faces,
86326
86326
  evidenceId: row.evidenceId,
86327
+ generic: row.generic,
86327
86328
  ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
86328
86329
  };
86329
86330
  }
86330
86331
  function decideRow(row, canRenderFamily$1) {
86331
- const { policyAction, physicalFamily, verdict, evidenceId } = row;
86332
+ const { policyAction, physicalFamily, verdict, evidenceId, generic } = row;
86332
86333
  if (policyAction === "preserve_only")
86333
86334
  return {
86334
86335
  kind: "preserve_only",
86335
- evidenceId
86336
+ evidenceId,
86337
+ generic
86336
86338
  };
86337
86339
  if (policyAction === "customer_supplied")
86338
86340
  return {
86339
86341
  kind: "customer_supplied",
86340
- evidenceId
86342
+ evidenceId,
86343
+ generic
86341
86344
  };
86342
86345
  if (physicalFamily === null)
86343
86346
  return {
86344
86347
  kind: "no_recommended_fallback",
86345
- evidenceId
86348
+ evidenceId,
86349
+ generic
86346
86350
  };
86347
86351
  if (canRenderFamily$1 && !canRenderFamily$1(physicalFamily))
86348
86352
  return {
86349
86353
  kind: "asset_missing",
86350
86354
  substituteFamily: physicalFamily,
86351
86355
  verdict,
86352
- evidenceId
86356
+ evidenceId,
86357
+ generic
86353
86358
  };
86354
86359
  return {
86355
86360
  kind: "fallback",
@@ -86368,7 +86373,8 @@ function decideRowForFace(row, face, canRenderFamily$1) {
86368
86373
  return {
86369
86374
  kind: "face_missing",
86370
86375
  substituteFamily: base$1.fallback.substituteFamily,
86371
- evidenceId: row.evidenceId
86376
+ evidenceId: row.evidenceId,
86377
+ generic: row.generic
86372
86378
  };
86373
86379
  const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
86374
86380
  return {
@@ -86689,7 +86695,7 @@ function deriveOfferings() {
86689
86695
  return {
86690
86696
  logicalFamily: row.logicalFamily,
86691
86697
  physicalFamily: row.physicalFamily,
86692
- generic: row.physicalFamily && PHYSICAL_GENERIC[row.physicalFamily] || "sans-serif",
86698
+ generic: row.generic,
86693
86699
  offering: classifyOffering(row.policyAction, row.verdict, row.physicalFamily, bundled),
86694
86700
  bundled,
86695
86701
  verdict: row.verdict,
@@ -86698,12 +86704,11 @@ function deriveOfferings() {
86698
86704
  });
86699
86705
  return Object.freeze(offerings);
86700
86706
  }
86707
+ function compareLogicalFamily(a, b) {
86708
+ return a.logicalFamily.localeCompare(b.logicalFamily, "en", { sensitivity: "base" });
86709
+ }
86701
86710
  function getDefaultFontOfferings() {
86702
- const rank$1 = (name) => {
86703
- const i$1 = DEFAULT_FONT_ORDER.indexOf(name);
86704
- return i$1 === -1 ? DEFAULT_FONT_ORDER.length : i$1;
86705
- };
86706
- return FONT_OFFERINGS.filter((o) => o.offering === "default").sort((a, b) => rank$1(a.logicalFamily) - rank$1(b.logicalFamily));
86711
+ return FONT_OFFERINGS.filter((o) => o.offering === "default").sort(compareLogicalFamily);
86707
86712
  }
86708
86713
  function fontOfferingStack(offering) {
86709
86714
  return `${offering.logicalFamily}, ${offering.generic}`;
@@ -86717,6 +86722,33 @@ function getDefaultFontFamilyOptions() {
86717
86722
  value: fontOfferingStack(offering)
86718
86723
  }));
86719
86724
  }
86725
+ function normalizeKey(family$1) {
86726
+ return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
86727
+ }
86728
+ function isRegularFace(rec) {
86729
+ return rec.face?.weight === "400" && rec.face?.style === "normal";
86730
+ }
86731
+ function buildDocumentFontOptions(usedFaces, registry2, resolver$1) {
86732
+ const faceRecords = buildFaceReport(usedFaces, registry2, resolver$1);
86733
+ const agg = /* @__PURE__ */ new Map;
86734
+ for (const rec of faceRecords) {
86735
+ const key = normalizeKey(rec.logicalFamily);
86736
+ const existing = agg.get(key);
86737
+ if (!existing) {
86738
+ agg.set(key, rec);
86739
+ continue;
86740
+ }
86741
+ if (isRegularFace(rec) && !isRegularFace(existing))
86742
+ agg.set(key, rec);
86743
+ }
86744
+ const options = [];
86745
+ for (const rep of agg.values())
86746
+ options.push({
86747
+ logicalFamily: rep.logicalFamily,
86748
+ previewFamily: rep.physicalFamily
86749
+ });
86750
+ return options;
86751
+ }
86720
86752
  function writeAppStatistics(convertedXml, stats) {
86721
86753
  const elements = ensureElements$1(ensureAppPropertiesRoot(convertedXml));
86722
86754
  upsertSimpleElement(elements, "Words", String(stats.words));
@@ -114029,7 +114061,7 @@ var isRegExp = (value) => {
114029
114061
  const detail = sources && sources.length ? ` from ${sources.join(", ")}` : "";
114030
114062
  console.warn(`[superdoc] font asset failed to load for "${family$1}"${detail}. Check fonts.assetBaseUrl / fonts.resolveAssetUrl so the bundled .woff2 are served.`);
114031
114063
  }
114032
- }, registriesByFontSet, domlessRegistry = null, PHYSICAL_GENERIC, BUNDLED_FAMILIES, FONT_OFFERINGS, DEFAULT_FONT_ORDER, prepareCommentParaIds = (comment) => {
114064
+ }, registriesByFontSet, domlessRegistry = null, BUNDLED_FAMILIES, FONT_OFFERINGS, prepareCommentParaIds = (comment) => {
114033
114065
  return {
114034
114066
  ...comment,
114035
114067
  commentParaId: generateDocxRandomId()
@@ -118005,7 +118037,7 @@ var isRegExp = (value) => {
118005
118037
  state.kern = kernNode.attributes["w:val"];
118006
118038
  }
118007
118039
  }, SuperConverter;
118008
- var init_SuperConverter_CfRQprW6_es = __esm(() => {
118040
+ var init_SuperConverter_BaKhr4cp_es = __esm(() => {
118009
118041
  init_rolldown_runtime_Bg48TavK_es();
118010
118042
  init_jszip_C49i9kUs_es();
118011
118043
  init_xml_js_CqGKpaft_es();
@@ -155325,6 +155357,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155325
155357
  SUBSTITUTION_EVIDENCE$1 = [
155326
155358
  {
155327
155359
  evidenceId: "calibri",
155360
+ generic: "sans-serif",
155328
155361
  logicalFamily: "Calibri",
155329
155362
  physicalFamily: "Carlito",
155330
155363
  verdict: "metric_safe",
@@ -155351,6 +155384,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155351
155384
  },
155352
155385
  {
155353
155386
  evidenceId: "cambria",
155387
+ generic: "serif",
155354
155388
  logicalFamily: "Cambria",
155355
155389
  physicalFamily: "Caladea",
155356
155390
  verdict: "visual_only",
@@ -155394,6 +155428,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155394
155428
  },
155395
155429
  {
155396
155430
  evidenceId: "arial",
155431
+ generic: "sans-serif",
155397
155432
  logicalFamily: "Arial",
155398
155433
  physicalFamily: "Liberation Sans",
155399
155434
  verdict: "metric_safe",
@@ -155420,6 +155455,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155420
155455
  },
155421
155456
  {
155422
155457
  evidenceId: "times-new-roman",
155458
+ generic: "serif",
155423
155459
  logicalFamily: "Times New Roman",
155424
155460
  physicalFamily: "Liberation Serif",
155425
155461
  verdict: "metric_safe",
@@ -155446,6 +155482,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155446
155482
  },
155447
155483
  {
155448
155484
  evidenceId: "courier-new",
155485
+ generic: "monospace",
155449
155486
  logicalFamily: "Courier New",
155450
155487
  physicalFamily: "Liberation Mono",
155451
155488
  verdict: "metric_safe",
@@ -155472,6 +155509,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155472
155509
  },
155473
155510
  {
155474
155511
  evidenceId: "georgia",
155512
+ generic: "serif",
155475
155513
  logicalFamily: "Georgia",
155476
155514
  physicalFamily: "Gelasio",
155477
155515
  verdict: "near_metric",
@@ -155524,6 +155562,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155524
155562
  },
155525
155563
  {
155526
155564
  evidenceId: "arial-narrow",
155565
+ generic: "sans-serif",
155527
155566
  logicalFamily: "Arial Narrow",
155528
155567
  physicalFamily: "Liberation Sans Narrow",
155529
155568
  verdict: "visual_only",
@@ -155567,6 +155606,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155567
155606
  },
155568
155607
  {
155569
155608
  evidenceId: "aptos",
155609
+ generic: "sans-serif",
155570
155610
  logicalFamily: "Aptos",
155571
155611
  physicalFamily: null,
155572
155612
  verdict: "no_substitute",
@@ -155589,6 +155629,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155589
155629
  },
155590
155630
  {
155591
155631
  evidenceId: "consolas",
155632
+ generic: "monospace",
155592
155633
  logicalFamily: "Consolas",
155593
155634
  physicalFamily: "Inconsolata SemiExpanded",
155594
155635
  verdict: "cell_width_only",
@@ -155615,6 +155656,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155615
155656
  },
155616
155657
  {
155617
155658
  evidenceId: "verdana",
155659
+ generic: "sans-serif",
155618
155660
  logicalFamily: "Verdana",
155619
155661
  physicalFamily: null,
155620
155662
  verdict: "visual_only",
@@ -155637,6 +155679,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155637
155679
  },
155638
155680
  {
155639
155681
  evidenceId: "tahoma",
155682
+ generic: "sans-serif",
155640
155683
  logicalFamily: "Tahoma",
155641
155684
  physicalFamily: null,
155642
155685
  verdict: "visual_only",
@@ -155659,6 +155702,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155659
155702
  },
155660
155703
  {
155661
155704
  evidenceId: "trebuchet-ms",
155705
+ generic: "sans-serif",
155662
155706
  logicalFamily: "Trebuchet MS",
155663
155707
  physicalFamily: null,
155664
155708
  verdict: "visual_only",
@@ -155681,6 +155725,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155681
155725
  },
155682
155726
  {
155683
155727
  evidenceId: "comic-sans-ms",
155728
+ generic: "sans-serif",
155684
155729
  logicalFamily: "Comic Sans MS",
155685
155730
  physicalFamily: "Comic Neue",
155686
155731
  verdict: "visual_only",
@@ -155707,6 +155752,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155707
155752
  },
155708
155753
  {
155709
155754
  evidenceId: "candara",
155755
+ generic: "sans-serif",
155710
155756
  logicalFamily: "Candara",
155711
155757
  physicalFamily: null,
155712
155758
  verdict: "visual_only",
@@ -155729,6 +155775,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155729
155775
  },
155730
155776
  {
155731
155777
  evidenceId: "constantia",
155778
+ generic: "serif",
155732
155779
  logicalFamily: "Constantia",
155733
155780
  physicalFamily: null,
155734
155781
  verdict: "visual_only",
@@ -155751,6 +155798,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155751
155798
  },
155752
155799
  {
155753
155800
  evidenceId: "corbel",
155801
+ generic: "sans-serif",
155754
155802
  logicalFamily: "Corbel",
155755
155803
  physicalFamily: null,
155756
155804
  verdict: "visual_only",
@@ -155773,6 +155821,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155773
155821
  },
155774
155822
  {
155775
155823
  evidenceId: "lucida-console",
155824
+ generic: "monospace",
155776
155825
  logicalFamily: "Lucida Console",
155777
155826
  physicalFamily: "Cousine",
155778
155827
  verdict: "cell_width_only",
@@ -155799,6 +155848,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155799
155848
  },
155800
155849
  {
155801
155850
  evidenceId: "aptos-display",
155851
+ generic: "sans-serif",
155802
155852
  logicalFamily: "Aptos Display",
155803
155853
  physicalFamily: null,
155804
155854
  verdict: "customer_supplied",
@@ -155820,6 +155870,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155820
155870
  },
155821
155871
  {
155822
155872
  evidenceId: "cambria-math",
155873
+ generic: "serif",
155823
155874
  logicalFamily: "Cambria Math",
155824
155875
  physicalFamily: null,
155825
155876
  verdict: "preserve_only",
@@ -155841,6 +155892,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155841
155892
  },
155842
155893
  {
155843
155894
  evidenceId: "helvetica",
155895
+ generic: "sans-serif",
155844
155896
  logicalFamily: "Helvetica",
155845
155897
  physicalFamily: "Liberation Sans",
155846
155898
  verdict: "metric_safe",
@@ -155867,6 +155919,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155867
155919
  },
155868
155920
  {
155869
155921
  evidenceId: "calibri-light",
155922
+ generic: "sans-serif",
155870
155923
  logicalFamily: "Calibri Light",
155871
155924
  physicalFamily: "Carlito",
155872
155925
  verdict: "visual_only",
@@ -155893,6 +155946,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155893
155946
  },
155894
155947
  {
155895
155948
  evidenceId: "baskerville-old-face",
155949
+ generic: "serif",
155896
155950
  logicalFamily: "Baskerville Old Face",
155897
155951
  physicalFamily: "Bacasime Antique",
155898
155952
  verdict: "visual_only",
@@ -155923,6 +155977,34 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155923
155977
  advanceDelta: 0.4916,
155924
155978
  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."
155925
155979
  }]
155980
+ },
155981
+ {
155982
+ evidenceId: "cooper-black",
155983
+ generic: "serif",
155984
+ logicalFamily: "Cooper Black",
155985
+ physicalFamily: "Caprasimo",
155986
+ verdict: "metric_safe",
155987
+ faces: {
155988
+ regular: true,
155989
+ bold: false,
155990
+ italic: false,
155991
+ boldItalic: false
155992
+ },
155993
+ gates: {
155994
+ static: "pass",
155995
+ metric: "pass",
155996
+ layout: "not_run",
155997
+ ship: "not_run"
155998
+ },
155999
+ policyAction: "substitute",
156000
+ measurementRefs: ["cooper-black_regular__caprasimo#regular#w400#786ab84e#analytic_advance#2026-06-05"],
156001
+ exportRule: "preserve_original_name",
156002
+ advance: {
156003
+ meanDelta: 0,
156004
+ maxDelta: 0
156005
+ },
156006
+ candidateLicense: "OFL-1.1",
156007
+ faceVerdicts: { regular: "metric_safe" }
155926
156008
  }
155927
156009
  ];
155928
156010
  LINE_BREAK_SAFE_VERDICTS = new Set([
@@ -155951,22 +156033,8 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
155951
156033
  RENDER_ALL = { canRenderFamily: () => true };
155952
156034
  OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
155953
156035
  registriesByFontSet = /* @__PURE__ */ new WeakMap;
155954
- PHYSICAL_GENERIC = Object.freeze({
155955
- Carlito: "sans-serif",
155956
- Caladea: "serif",
155957
- "Liberation Sans": "sans-serif",
155958
- "Liberation Serif": "serif",
155959
- "Liberation Mono": "monospace"
155960
- });
155961
156036
  BUNDLED_FAMILIES = new Set(BUNDLED_MANIFEST.map((f2) => f2.family));
155962
156037
  FONT_OFFERINGS = deriveOfferings();
155963
- DEFAULT_FONT_ORDER = [
155964
- "Calibri",
155965
- "Arial",
155966
- "Courier New",
155967
- "Times New Roman",
155968
- "Helvetica"
155969
- ];
155970
156038
  ALL_COMMENT_TARGETS = COMMENT_FILE_BASENAMES;
155971
156039
  REL_ID_NUMERIC_PATTERN = /rId|mi/g;
155972
156040
  FOOTNOTES_CONFIG$1 = {
@@ -157753,7 +157821,7 @@ var init_SuperConverter_CfRQprW6_es = __esm(() => {
157753
157821
  };
157754
157822
  });
157755
157823
 
157756
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DOEFHsWP.es.js
157824
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-B3wNa0zb.es.js
157757
157825
  function parseSizeUnit(val = "0") {
157758
157826
  const length = val.toString() || "0";
157759
157827
  const value = Number.parseFloat(length);
@@ -168111,8 +168179,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
168111
168179
  }
168112
168180
  };
168113
168181
  };
168114
- var init_create_headless_toolbar_DOEFHsWP_es = __esm(() => {
168115
- init_SuperConverter_CfRQprW6_es();
168182
+ var init_create_headless_toolbar_B3wNa0zb_es = __esm(() => {
168183
+ init_SuperConverter_BaKhr4cp_es();
168116
168184
  init_uuid_B2wVPhPi_es();
168117
168185
  init_constants_D9qj59G2_es();
168118
168186
  init_dist_B8HfvhaK_es();
@@ -209153,7 +209221,7 @@ If you want to remount the same app, move your app creation logic into a factory
209153
209221
  var createVNodeWithArgsTransform = (...args2) => {
209154
209222
  return _createVNode(...vnodeArgsTransformer ? vnodeArgsTransformer(args2, currentRenderingInstance) : args2);
209155
209223
  };
209156
- var normalizeKey = ({ key: key2 }) => key2 != null ? key2 : null;
209224
+ var normalizeKey2 = ({ key: key2 }) => key2 != null ? key2 : null;
209157
209225
  var normalizeRef = ({
209158
209226
  ref: ref2,
209159
209227
  ref_key,
@@ -209170,7 +209238,7 @@ If you want to remount the same app, move your app creation logic into a factory
209170
209238
  __v_skip: true,
209171
209239
  type,
209172
209240
  props,
209173
- key: props && normalizeKey(props),
209241
+ key: props && normalizeKey2(props),
209174
209242
  ref: props && normalizeRef(props),
209175
209243
  scopeId: currentScopeId,
209176
209244
  slotScopeIds: null,
@@ -209270,7 +209338,7 @@ Component that was made reactive: `, type);
209270
209338
  __v_skip: true,
209271
209339
  type: vnode.type,
209272
209340
  props: mergedProps,
209273
- key: mergedProps && normalizeKey(mergedProps),
209341
+ key: mergedProps && normalizeKey2(mergedProps),
209274
209342
  ref: extraProps && extraProps.ref ? mergeRef && ref2 ? shared.isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref2,
209275
209343
  scopeId: vnode.scopeId,
209276
209344
  slotScopeIds: vnode.slotScopeIds,
@@ -222796,7 +222864,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
222796
222864
  init_remark_gfm_BhnWr3yf_es();
222797
222865
  });
222798
222866
 
222799
- // ../../packages/superdoc/dist/chunks/src-CDxARMZD.es.js
222867
+ // ../../packages/superdoc/dist/chunks/src-Btvk6jT1.es.js
222800
222868
  function deleteProps(obj, propOrProps) {
222801
222869
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
222802
222870
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -235154,6 +235222,36 @@ function scrollToElement(targetElement, options = {
235154
235222
  behavior: options.behavior
235155
235223
  });
235156
235224
  }
235225
+ function normalizeToolbarFamily(value) {
235226
+ return String(value ?? "").trim().toLowerCase();
235227
+ }
235228
+ function compareToolbarFontOptions(a2, b$1) {
235229
+ return String(a2.label ?? "").trim().localeCompare(String(b$1.label ?? "").trim(), "en", { sensitivity: "base" });
235230
+ }
235231
+ function composeToolbarFontOptions(documentOptions, configFonts) {
235232
+ if (configFonts)
235233
+ return configFonts;
235234
+ if (!documentOptions?.length)
235235
+ return;
235236
+ const seen = new Set(TOOLBAR_FONTS.map((option) => normalizeToolbarFamily(option.label)));
235237
+ const merged = [...TOOLBAR_FONTS];
235238
+ for (const option of documentOptions) {
235239
+ const dedupeKey = normalizeToolbarFamily(option.logicalFamily);
235240
+ if (seen.has(dedupeKey))
235241
+ continue;
235242
+ seen.add(dedupeKey);
235243
+ merged.push({
235244
+ label: option.logicalFamily,
235245
+ key: option.logicalFamily,
235246
+ fontWeight: 400,
235247
+ props: {
235248
+ style: { fontFamily: option.previewFamily || option.logicalFamily },
235249
+ "data-item": "btn-fontFamily-option"
235250
+ }
235251
+ });
235252
+ }
235253
+ return merged.length > TOOLBAR_FONTS.length ? merged.sort(compareToolbarFontOptions) : undefined;
235254
+ }
235157
235255
  function isExtensionRulesEnabled(extension2, enabled) {
235158
235256
  if (Array.isArray(enabled))
235159
235257
  return enabled.some((enabledExtension) => {
@@ -267780,7 +267878,10 @@ function calculateBalancedColumnHeight(ctx$1, config3 = DEFAULT_BALANCING_CONFIG
267780
267878
  iterations: 0
267781
267879
  };
267782
267880
  const totalHeight = ctx$1.contentBlocks.reduce((sum, b$1) => sum + b$1.measuredHeight, 0);
267783
- const maxBlockHeight = ctx$1.contentBlocks.reduce((m$1, b$1) => Math.max(m$1, b$1.measuredHeight), 0);
267881
+ const maxBlockHeight = ctx$1.contentBlocks.reduce((m$1, b$1) => {
267882
+ const indivisible = b$1.canBreak && b$1.lineHeights && b$1.lineHeights.length > 1 ? Math.max(...b$1.lineHeights) : b$1.measuredHeight;
267883
+ return Math.max(m$1, indivisible);
267884
+ }, 0);
267784
267885
  if (totalHeight < config3.minColumnHeight * ctx$1.columnCount)
267785
267886
  return createSingleColumnResult(ctx$1);
267786
267887
  let lo = Math.max(maxBlockHeight, config3.minColumnHeight);
@@ -267950,6 +268051,8 @@ function shouldSkipBalancing(ctx$1, config3 = DEFAULT_BALANCING_CONFIG) {
267950
268051
  }
267951
268052
  function getFragmentHeight(fragment, measureMap) {
267952
268053
  if (fragment.kind === "para") {
268054
+ if (fragment.lines && fragment.lines.length > 0)
268055
+ return fragment.lines.reduce((sum$1, l) => sum$1 + (l.lineHeight ?? 0), 0);
267953
268056
  const measure = measureMap.get(fragment.blockId);
267954
268057
  if (!measure || measure.kind !== "paragraph" || !measure.lines)
267955
268058
  return 0;
@@ -268030,13 +268133,38 @@ function balanceSectionOnPage(args$1) {
268030
268133
  return a2.x - b$1.x;
268031
268134
  return a2.y - b$1.y;
268032
268135
  });
268033
- const contentBlocks = ordered.map((f2, i4) => ({
268034
- blockId: `${f2.blockId}#${i4}`,
268035
- measuredHeight: getBalancingHeight(f2, args$1.measureMap, args$1.sectPrMarkerBlockIds),
268036
- canBreak: false,
268037
- keepWithNext: false,
268038
- keepTogether: true
268039
- }));
268136
+ const lineHeightsFor = (f2) => {
268137
+ if (f2.kind !== "para")
268138
+ return;
268139
+ if (args$1.sectPrMarkerBlockIds?.has(f2.blockId))
268140
+ return;
268141
+ if (args$1.keepLinesBlockIds?.has(f2.blockId))
268142
+ return;
268143
+ if (f2.lines && f2.lines.length > 0) {
268144
+ if (f2.lines.length <= 1)
268145
+ return;
268146
+ return f2.lines.map((l) => l.lineHeight);
268147
+ }
268148
+ const measure = args$1.measureMap.get(f2.blockId);
268149
+ if (!measure || measure.kind !== "paragraph" || !Array.isArray(measure.lines))
268150
+ return;
268151
+ const fromLine = f2.fromLine ?? 0;
268152
+ const toLine = f2.toLine ?? measure.lines.length;
268153
+ if (toLine - fromLine <= 1)
268154
+ return;
268155
+ return measure.lines.slice(fromLine, toLine).map((l) => l.lineHeight);
268156
+ };
268157
+ const contentBlocks = ordered.map((f2, i4) => {
268158
+ const lineHeights = lineHeightsFor(f2);
268159
+ return {
268160
+ blockId: `${f2.blockId}#${i4}`,
268161
+ measuredHeight: getBalancingHeight(f2, args$1.measureMap, args$1.sectPrMarkerBlockIds),
268162
+ canBreak: lineHeights !== undefined,
268163
+ keepWithNext: false,
268164
+ keepTogether: lineHeights === undefined,
268165
+ lineHeights
268166
+ };
268167
+ });
268040
268168
  if (shouldSkipBalancing({
268041
268169
  columnCount,
268042
268170
  columnWidth,
@@ -268071,6 +268199,39 @@ function balanceSectionOnPage(args$1) {
268071
268199
  f2.x = columnX(col);
268072
268200
  f2.y = colCursors[col];
268073
268201
  f2.width = columnWidth;
268202
+ const bp = result.blockBreakPoints?.get(block.blockId);
268203
+ if (bp && bp.heightAfterBreak > 0 && col < columnCount - 1) {
268204
+ const splitLine = (f2.fromLine ?? 0) + bp.breakAfterLine + 1;
268205
+ const measureLineCount = args$1.measureMap.get(f2.blockId)?.lines?.length ?? splitLine;
268206
+ const originalToLine = f2.toLine ?? measureLineCount;
268207
+ const originalContinuesOnNext = f2.continuesOnNext ?? false;
268208
+ const secondHalf = {
268209
+ ...f2,
268210
+ fromLine: splitLine,
268211
+ toLine: originalToLine,
268212
+ x: columnX(col + 1),
268213
+ y: colCursors[col + 1],
268214
+ width: columnWidth,
268215
+ continuesFromPrev: true,
268216
+ continuesOnNext: originalContinuesOnNext
268217
+ };
268218
+ if (f2.lines && f2.lines.length > 0) {
268219
+ secondHalf.lines = f2.lines.slice(bp.breakAfterLine + 1);
268220
+ f2.lines = f2.lines.slice(0, bp.breakAfterLine + 1);
268221
+ }
268222
+ f2.toLine = splitLine;
268223
+ f2.continuesOnNext = true;
268224
+ colCursors[col] += bp.heightBeforeBreak;
268225
+ colCursors[col + 1] += bp.heightAfterBreak;
268226
+ const fragIdx = fragments.indexOf(f2);
268227
+ if (fragIdx >= 0)
268228
+ fragments.splice(fragIdx + 1, 0, secondHalf);
268229
+ if (colCursors[col] > maxY)
268230
+ maxY = colCursors[col];
268231
+ if (colCursors[col + 1] > maxY)
268232
+ maxY = colCursors[col + 1];
268233
+ continue;
268234
+ }
268074
268235
  colCursors[col] += block.measuredHeight;
268075
268236
  if (colCursors[col] > maxY)
268076
268237
  maxY = colCursors[col];
@@ -269222,6 +269383,7 @@ function layoutDocument(blocks2, measures, options = {}) {
269222
269383
  const sectionTypeIsExplicit = /* @__PURE__ */ new Map;
269223
269384
  let lastSectionIdx = null;
269224
269385
  const sectPrMarkerBlockIds = /* @__PURE__ */ new Set;
269386
+ const keepLinesBlockIds = /* @__PURE__ */ new Set;
269225
269387
  let documentHasExplicitColumnBreak = false;
269226
269388
  let documentHasAnySectionBreak = false;
269227
269389
  const alreadyBalancedSections = /* @__PURE__ */ new Set;
@@ -269255,6 +269417,8 @@ function layoutDocument(blocks2, measures, options = {}) {
269255
269417
  documentHasExplicitColumnBreak = true;
269256
269418
  if (block.kind === "paragraph" && blockWithAttrs.attrs?.sectPrMarker === true)
269257
269419
  sectPrMarkerBlockIds.add(block.id);
269420
+ if (block.kind === "paragraph" && blockWithAttrs.attrs?.keepLines === true)
269421
+ keepLinesBlockIds.add(block.id);
269258
269422
  });
269259
269423
  const anchoredByParagraph = collectAnchoredDrawings(blocks2, measures);
269260
269424
  const anchoredTables = collectAnchoredTables(blocks2, measures);
@@ -269473,7 +269637,8 @@ function layoutDocument(blocks2, measures, options = {}) {
269473
269637
  columnWidth: normalized.width,
269474
269638
  availableHeight,
269475
269639
  measureMap: balancingMeasureMap,
269476
- sectPrMarkerBlockIds
269640
+ sectPrMarkerBlockIds,
269641
+ keepLinesBlockIds
269477
269642
  });
269478
269643
  if (balanceResult) {
269479
269644
  state.cursorY = balanceResult.maxY;
@@ -269872,7 +270037,9 @@ function layoutDocument(blocks2, measures, options = {}) {
269872
270037
  const isMultiPage = sectionPagesCount > 1;
269873
270038
  if (isMultiPage && !isLast)
269874
270039
  continue;
269875
- const allowedByMidDocContinuous = endBreakType === "continuous" && !isLast;
270040
+ const nextSectionBeginType = sectionEndBreakType.get(sectionIdx + 1);
270041
+ const nextIsBody = lastSectionIdx !== null && sectionIdx + 1 === lastSectionIdx;
270042
+ const allowedByMidDocContinuous = !isLast && !nextIsBody && nextSectionBeginType === "continuous";
269876
270043
  const allowedByBodyExplicitContinuous = bodyExplicitContinuousIdx !== null && sectionIdx === bodyExplicitContinuousIdx - 1 && !isExplicitNonContinuous;
269877
270044
  if (!allowedByMidDocContinuous && !allowedByBodyExplicitContinuous && !isMultiPage)
269878
270045
  continue;
@@ -269903,7 +270070,8 @@ function layoutDocument(blocks2, measures, options = {}) {
269903
270070
  columnWidth: normalized.width,
269904
270071
  availableHeight: sectionAvailableHeight,
269905
270072
  measureMap: balancingMeasureMap,
269906
- sectPrMarkerBlockIds
270073
+ sectPrMarkerBlockIds,
270074
+ keepLinesBlockIds
269907
270075
  });
269908
270076
  }
269909
270077
  for (const state of states) {
@@ -319555,6 +319723,17 @@ menclose::after {
319555
319723
  const declaredRows = buildFontReport(declared.filter((family2) => family2 && !usedFamilies.has(family2.toLowerCase())), registry3, resolver2);
319556
319724
  return [...faceRows, ...declaredRows];
319557
319725
  }
319726
+ getDocumentFontOptions() {
319727
+ try {
319728
+ const usedFaces = this.#getUsedFaces?.() ?? [];
319729
+ if (!usedFaces.length)
319730
+ return [];
319731
+ const { registry: registry3 } = this.#resolveContext();
319732
+ return buildDocumentFontOptions(usedFaces, registry3, this.#fontResolver ?? undefined);
319733
+ } catch {
319734
+ return [];
319735
+ }
319736
+ }
319558
319737
  async ensureReadyForMeasure() {
319559
319738
  if (this.#getRequiredFaces)
319560
319739
  return this.#ensureFacesReady(this.#getRequiredFaces);
@@ -319994,13 +320173,13 @@ menclose::after {
319994
320173
  return;
319995
320174
  console.log(...args$1);
319996
320175
  }, 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;
319997
- var init_src_CDxARMZD_es = __esm(() => {
320176
+ var init_src_Btvk6jT1_es = __esm(() => {
319998
320177
  init_rolldown_runtime_Bg48TavK_es();
319999
- init_SuperConverter_CfRQprW6_es();
320178
+ init_SuperConverter_BaKhr4cp_es();
320000
320179
  init_jszip_C49i9kUs_es();
320001
320180
  init_xml_js_CqGKpaft_es();
320002
320181
  init_uuid_B2wVPhPi_es();
320003
- init_create_headless_toolbar_DOEFHsWP_es();
320182
+ init_create_headless_toolbar_B3wNa0zb_es();
320004
320183
  init_constants_D9qj59G2_es();
320005
320184
  init_dist_B8HfvhaK_es();
320006
320185
  init_unified_Dsuw2be5_es();
@@ -342220,16 +342399,21 @@ function print() { __p += __j.call(arguments, '') }
342220
342399
  toolbarKey.value += 1;
342221
342400
  };
342222
342401
  const onResizeThrottled = throttle(onWindowResized, 300);
342223
- function teardownWindowListeners() {
342402
+ const onToolbarItemsChanged = () => {
342403
+ toolbarKey.value += 1;
342404
+ };
342405
+ function teardownListeners() {
342224
342406
  window.removeEventListener("resize", onResizeThrottled);
342225
342407
  window.removeEventListener("keydown", onKeyDown);
342408
+ proxy.$toolbar.off?.("toolbar-items-changed", onToolbarItemsChanged);
342226
342409
  containerResizeObserver?.disconnect();
342227
342410
  containerResizeObserver = null;
342228
342411
  }
342229
- function setupWindowListeners() {
342230
- teardownWindowListeners();
342412
+ function setupListeners() {
342413
+ teardownListeners();
342231
342414
  window.addEventListener("resize", onResizeThrottled);
342232
342415
  window.addEventListener("keydown", onKeyDown);
342416
+ proxy.$toolbar.on?.("toolbar-items-changed", onToolbarItemsChanged);
342233
342417
  if (typeof ResizeObserver !== "undefined" && proxy.$toolbar.config?.responsiveToContainer && proxy.$toolbar.toolbarContainer) {
342234
342418
  containerResizeObserver = new ResizeObserver(() => {
342235
342419
  onResizeThrottled();
@@ -342238,10 +342422,10 @@ function print() { __p += __j.call(arguments, '') }
342238
342422
  }
342239
342423
  updateCompactSideGroups();
342240
342424
  }
342241
- exports_vue.onMounted(setupWindowListeners);
342242
- exports_vue.onActivated(setupWindowListeners);
342243
- exports_vue.onDeactivated(teardownWindowListeners);
342244
- exports_vue.onBeforeUnmount(teardownWindowListeners);
342425
+ exports_vue.onMounted(setupListeners);
342426
+ exports_vue.onActivated(setupListeners);
342427
+ exports_vue.onDeactivated(teardownListeners);
342428
+ exports_vue.onBeforeUnmount(teardownListeners);
342245
342429
  const handleCommand = ({ item, argument, option }) => {
342246
342430
  proxy.$toolbar.emitCommand({
342247
342431
  item,
@@ -342320,7 +342504,7 @@ function print() { __p += __j.call(arguments, '') }
342320
342504
  ], 32);
342321
342505
  };
342322
342506
  }
342323
- }, [["__scopeId", "data-v-b83d488a"]]);
342507
+ }, [["__scopeId", "data-v-938eaa1b"]]);
342324
342508
  toolbarTexts = {
342325
342509
  bold: "Bold",
342326
342510
  fontFamily: "Font",
@@ -342451,8 +342635,10 @@ function print() { __p += __j.call(arguments, '') }
342451
342635
  this._boundEditorHandlers = {
342452
342636
  transaction: null,
342453
342637
  selectionUpdate: null,
342454
- focus: null
342638
+ focus: null,
342639
+ fontsChanged: null
342455
342640
  };
342641
+ this._lastFontOptionsSignature = "";
342456
342642
  this._restoreFocusTimeoutId = null;
342457
342643
  if (!this.config.selector && this.config.element)
342458
342644
  this.config.selector = this.config.element;
@@ -342511,24 +342697,40 @@ function print() { __p += __j.call(arguments, '') }
342511
342697
  if (this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length)
342512
342698
  this.config.toolbarGroups = Object.keys(this.config.groups);
342513
342699
  }
342700
+ #detachActiveEditorListeners() {
342701
+ if (!this.activeEditor || !this._boundEditorHandlers.transaction)
342702
+ return;
342703
+ this.activeEditor.off("transaction", this._boundEditorHandlers.transaction);
342704
+ this.activeEditor.off("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
342705
+ this.activeEditor.off("focus", this._boundEditorHandlers.focus);
342706
+ this.activeEditor.off("fonts-changed", this._boundEditorHandlers.fontsChanged);
342707
+ this._boundEditorHandlers.transaction = null;
342708
+ this._boundEditorHandlers.selectionUpdate = null;
342709
+ this._boundEditorHandlers.focus = null;
342710
+ this._boundEditorHandlers.fontsChanged = null;
342711
+ }
342514
342712
  setActiveEditor(editor) {
342515
- if (this.activeEditor && this._boundEditorHandlers.transaction) {
342516
- this.activeEditor.off("transaction", this._boundEditorHandlers.transaction);
342517
- this.activeEditor.off("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
342518
- this.activeEditor.off("focus", this._boundEditorHandlers.focus);
342519
- this._boundEditorHandlers.transaction = null;
342520
- this._boundEditorHandlers.selectionUpdate = null;
342521
- this._boundEditorHandlers.focus = null;
342713
+ const sameEditor = editor === this.activeEditor;
342714
+ const alreadyListening = Boolean(this._boundEditorHandlers.transaction);
342715
+ if (sameEditor && (!editor || alreadyListening)) {
342716
+ this.updateToolbarState();
342717
+ return;
342522
342718
  }
342719
+ this.#detachActiveEditorListeners();
342523
342720
  this.activeEditor = editor;
342524
342721
  if (editor) {
342525
342722
  this._boundEditorHandlers.transaction = this.onEditorTransaction.bind(this);
342526
342723
  this._boundEditorHandlers.selectionUpdate = this.onEditorSelectionUpdate.bind(this);
342527
342724
  this._boundEditorHandlers.focus = this.onEditorFocus.bind(this);
342725
+ this._boundEditorHandlers.fontsChanged = this.onEditorFontsChanged.bind(this);
342528
342726
  this.activeEditor.on("transaction", this._boundEditorHandlers.transaction);
342529
342727
  this.activeEditor.on("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
342530
342728
  this.activeEditor.on("focus", this._boundEditorHandlers.focus);
342729
+ this.activeEditor.on("fonts-changed", this._boundEditorHandlers.fontsChanged);
342531
342730
  }
342731
+ this.#rebuildToolbarItems();
342732
+ this._lastFontOptionsSignature = this.#fontOptionsSignature();
342733
+ this.updateToolbarState();
342532
342734
  }
342533
342735
  getToolbarItemByGroup(groupName) {
342534
342736
  return this.toolbarItems.filter((item) => (item.group?.value || "center") === groupName);
@@ -342545,13 +342747,14 @@ function print() { __p += __j.call(arguments, '') }
342545
342747
  return this.config.responsiveToContainer ? containerWidth : documentWidth;
342546
342748
  }
342547
342749
  #makeToolbarItems({ superToolbar, icons: icons$1, texts, fonts, hideButtons, isDev = false } = {}) {
342750
+ const availableWidth = this.getAvailableWidth();
342548
342751
  const { defaultItems, overflowItems } = makeDefaultItems({
342549
342752
  superToolbar,
342550
342753
  toolbarIcons: icons$1,
342551
342754
  toolbarTexts: texts,
342552
- toolbarFonts: fonts,
342755
+ toolbarFonts: this.#resolveToolbarFonts(fonts),
342553
342756
  hideButtons,
342554
- availableWidth: this.getAvailableWidth(),
342757
+ availableWidth,
342555
342758
  role: this.role,
342556
342759
  isDev
342557
342760
  });
@@ -342564,6 +342767,26 @@ function print() { __p += __j.call(arguments, '') }
342564
342767
  this.toolbarItems = defaultItems.filter((item) => allConfigItems.includes(item.name.value)).filter((item) => !this.config.excludeItems.includes(item.name.value));
342565
342768
  this.overflowItems = overflowItems.filter((item) => allConfigItems.includes(item.name.value));
342566
342769
  }
342770
+ #resolveToolbarFonts(configFonts) {
342771
+ return composeToolbarFontOptions(this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [], configFonts);
342772
+ }
342773
+ #rebuildToolbarItems() {
342774
+ this.#makeToolbarItems({
342775
+ superToolbar: this,
342776
+ icons: this.config.icons,
342777
+ texts: this.config.texts,
342778
+ fonts: this.config.fonts,
342779
+ hideButtons: this.config.hideButtons,
342780
+ isDev: this.isDev
342781
+ });
342782
+ this.emit("toolbar-items-changed");
342783
+ }
342784
+ #fontOptionsSignature() {
342785
+ if (this.config.fonts)
342786
+ return "custom-fonts";
342787
+ const options = this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [];
342788
+ return JSON.stringify(options.map((option) => [option.logicalFamily, option.previewFamily]));
342789
+ }
342567
342790
  #initDefaultFonts() {
342568
342791
  if (!this.activeEditor || !this.activeEditor.converter)
342569
342792
  return;
@@ -342935,6 +343158,14 @@ function print() { __p += __j.call(arguments, '') }
342935
343158
  if (this.#restoreStickyMarksIfNeeded())
342936
343159
  this.updateToolbarState();
342937
343160
  }
343161
+ onEditorFontsChanged() {
343162
+ const signature = this.#fontOptionsSignature();
343163
+ if (signature !== this._lastFontOptionsSignature) {
343164
+ this._lastFontOptionsSignature = signature;
343165
+ this.#rebuildToolbarItems();
343166
+ }
343167
+ this.updateToolbarState();
343168
+ }
342938
343169
  onEditorFocus() {
342939
343170
  if (this.pendingMarkCommands.length) {
342940
343171
  this.onEditorSelectionUpdate();
@@ -343001,6 +343232,7 @@ function print() { __p += __j.call(arguments, '') }
343001
343232
  clearTimeout(this._restoreFocusTimeoutId);
343002
343233
  this._restoreFocusTimeoutId = null;
343003
343234
  }
343235
+ this.#detachActiveEditorListeners();
343004
343236
  this.destroyHeadlessToolbar();
343005
343237
  this.app?.unmount();
343006
343238
  }
@@ -349621,6 +349853,9 @@ function print() { __p += __j.call(arguments, '') }
349621
349853
  getFontReport() {
349622
349854
  return this.#fontGate?.getReport() ?? [];
349623
349855
  }
349856
+ getDocumentFontOptions() {
349857
+ return this.#fontGate?.getDocumentFontOptions() ?? [];
349858
+ }
349624
349859
  getMissingFonts() {
349625
349860
  return [...new Set(this.getFontReport().filter((record3) => record3.missing).map((record3) => record3.logicalFamily))];
349626
349861
  }
@@ -354905,11 +355140,11 @@ function print() { __p += __j.call(arguments, '') }
354905
355140
  ]);
354906
355141
  });
354907
355142
 
354908
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
355143
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-ClaBD_rO.es.js
354909
355144
  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;
354910
- var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
354911
- init_SuperConverter_CfRQprW6_es();
354912
- init_create_headless_toolbar_DOEFHsWP_es();
355145
+ var init_create_super_doc_ui_ClaBD_rO_es = __esm(() => {
355146
+ init_SuperConverter_BaKhr4cp_es();
355147
+ init_create_headless_toolbar_B3wNa0zb_es();
354913
355148
  headlessToolbarConstants = {
354914
355149
  DEFAULT_TEXT_ALIGN_OPTIONS: [
354915
355150
  {
@@ -355191,16 +355426,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
355191
355426
 
355192
355427
  // ../../packages/superdoc/dist/super-editor.es.js
355193
355428
  var init_super_editor_es = __esm(() => {
355194
- init_src_CDxARMZD_es();
355195
- init_SuperConverter_CfRQprW6_es();
355429
+ init_src_Btvk6jT1_es();
355430
+ init_SuperConverter_BaKhr4cp_es();
355196
355431
  init_jszip_C49i9kUs_es();
355197
355432
  init_xml_js_CqGKpaft_es();
355198
- init_create_headless_toolbar_DOEFHsWP_es();
355433
+ init_create_headless_toolbar_B3wNa0zb_es();
355199
355434
  init_constants_D9qj59G2_es();
355200
355435
  init_dist_B8HfvhaK_es();
355201
355436
  init_unified_Dsuw2be5_es();
355202
355437
  init_DocxZipper_FUsfThjV_es();
355203
- init_create_super_doc_ui_CanMzNxA_es();
355438
+ init_create_super_doc_ui_ClaBD_rO_es();
355204
355439
  init_ui_C5PAS9hY_es();
355205
355440
  init_eventemitter3_BnGqBE_Q_es();
355206
355441
  init_errors_CNaD6vcg_es();
@@ -456410,12 +456645,13 @@ var init_exporter = __esm(() => {
456410
456645
  // ../../shared/font-system/src/types.ts
456411
456646
  var init_types8 = () => {};
456412
456647
 
456413
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/data.js
456648
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/data.js
456414
456649
  var SUBSTITUTION_EVIDENCE2;
456415
456650
  var init_data = __esm(() => {
456416
456651
  SUBSTITUTION_EVIDENCE2 = [
456417
456652
  {
456418
456653
  evidenceId: "calibri",
456654
+ generic: "sans-serif",
456419
456655
  logicalFamily: "Calibri",
456420
456656
  physicalFamily: "Carlito",
456421
456657
  verdict: "metric_safe",
@@ -456445,6 +456681,7 @@ var init_data = __esm(() => {
456445
456681
  },
456446
456682
  {
456447
456683
  evidenceId: "cambria",
456684
+ generic: "serif",
456448
456685
  logicalFamily: "Cambria",
456449
456686
  physicalFamily: "Caladea",
456450
456687
  verdict: "visual_only",
@@ -456490,6 +456727,7 @@ var init_data = __esm(() => {
456490
456727
  },
456491
456728
  {
456492
456729
  evidenceId: "arial",
456730
+ generic: "sans-serif",
456493
456731
  logicalFamily: "Arial",
456494
456732
  physicalFamily: "Liberation Sans",
456495
456733
  verdict: "metric_safe",
@@ -456518,6 +456756,7 @@ var init_data = __esm(() => {
456518
456756
  },
456519
456757
  {
456520
456758
  evidenceId: "times-new-roman",
456759
+ generic: "serif",
456521
456760
  logicalFamily: "Times New Roman",
456522
456761
  physicalFamily: "Liberation Serif",
456523
456762
  verdict: "metric_safe",
@@ -456546,6 +456785,7 @@ var init_data = __esm(() => {
456546
456785
  },
456547
456786
  {
456548
456787
  evidenceId: "courier-new",
456788
+ generic: "monospace",
456549
456789
  logicalFamily: "Courier New",
456550
456790
  physicalFamily: "Liberation Mono",
456551
456791
  verdict: "metric_safe",
@@ -456574,6 +456814,7 @@ var init_data = __esm(() => {
456574
456814
  },
456575
456815
  {
456576
456816
  evidenceId: "georgia",
456817
+ generic: "serif",
456577
456818
  logicalFamily: "Georgia",
456578
456819
  physicalFamily: "Gelasio",
456579
456820
  verdict: "near_metric",
@@ -456629,6 +456870,7 @@ var init_data = __esm(() => {
456629
456870
  },
456630
456871
  {
456631
456872
  evidenceId: "arial-narrow",
456873
+ generic: "sans-serif",
456632
456874
  logicalFamily: "Arial Narrow",
456633
456875
  physicalFamily: "Liberation Sans Narrow",
456634
456876
  verdict: "visual_only",
@@ -456674,6 +456916,7 @@ var init_data = __esm(() => {
456674
456916
  },
456675
456917
  {
456676
456918
  evidenceId: "aptos",
456919
+ generic: "sans-serif",
456677
456920
  logicalFamily: "Aptos",
456678
456921
  physicalFamily: null,
456679
456922
  verdict: "no_substitute",
@@ -456698,6 +456941,7 @@ var init_data = __esm(() => {
456698
456941
  },
456699
456942
  {
456700
456943
  evidenceId: "consolas",
456944
+ generic: "monospace",
456701
456945
  logicalFamily: "Consolas",
456702
456946
  physicalFamily: "Inconsolata SemiExpanded",
456703
456947
  verdict: "cell_width_only",
@@ -456726,6 +456970,7 @@ var init_data = __esm(() => {
456726
456970
  },
456727
456971
  {
456728
456972
  evidenceId: "verdana",
456973
+ generic: "sans-serif",
456729
456974
  logicalFamily: "Verdana",
456730
456975
  physicalFamily: null,
456731
456976
  verdict: "visual_only",
@@ -456750,6 +456995,7 @@ var init_data = __esm(() => {
456750
456995
  },
456751
456996
  {
456752
456997
  evidenceId: "tahoma",
456998
+ generic: "sans-serif",
456753
456999
  logicalFamily: "Tahoma",
456754
457000
  physicalFamily: null,
456755
457001
  verdict: "visual_only",
@@ -456774,6 +457020,7 @@ var init_data = __esm(() => {
456774
457020
  },
456775
457021
  {
456776
457022
  evidenceId: "trebuchet-ms",
457023
+ generic: "sans-serif",
456777
457024
  logicalFamily: "Trebuchet MS",
456778
457025
  physicalFamily: null,
456779
457026
  verdict: "visual_only",
@@ -456798,6 +457045,7 @@ var init_data = __esm(() => {
456798
457045
  },
456799
457046
  {
456800
457047
  evidenceId: "comic-sans-ms",
457048
+ generic: "sans-serif",
456801
457049
  logicalFamily: "Comic Sans MS",
456802
457050
  physicalFamily: "Comic Neue",
456803
457051
  verdict: "visual_only",
@@ -456826,6 +457074,7 @@ var init_data = __esm(() => {
456826
457074
  },
456827
457075
  {
456828
457076
  evidenceId: "candara",
457077
+ generic: "sans-serif",
456829
457078
  logicalFamily: "Candara",
456830
457079
  physicalFamily: null,
456831
457080
  verdict: "visual_only",
@@ -456850,6 +457099,7 @@ var init_data = __esm(() => {
456850
457099
  },
456851
457100
  {
456852
457101
  evidenceId: "constantia",
457102
+ generic: "serif",
456853
457103
  logicalFamily: "Constantia",
456854
457104
  physicalFamily: null,
456855
457105
  verdict: "visual_only",
@@ -456874,6 +457124,7 @@ var init_data = __esm(() => {
456874
457124
  },
456875
457125
  {
456876
457126
  evidenceId: "corbel",
457127
+ generic: "sans-serif",
456877
457128
  logicalFamily: "Corbel",
456878
457129
  physicalFamily: null,
456879
457130
  verdict: "visual_only",
@@ -456898,6 +457149,7 @@ var init_data = __esm(() => {
456898
457149
  },
456899
457150
  {
456900
457151
  evidenceId: "lucida-console",
457152
+ generic: "monospace",
456901
457153
  logicalFamily: "Lucida Console",
456902
457154
  physicalFamily: "Cousine",
456903
457155
  verdict: "cell_width_only",
@@ -456926,6 +457178,7 @@ var init_data = __esm(() => {
456926
457178
  },
456927
457179
  {
456928
457180
  evidenceId: "aptos-display",
457181
+ generic: "sans-serif",
456929
457182
  logicalFamily: "Aptos Display",
456930
457183
  physicalFamily: null,
456931
457184
  verdict: "customer_supplied",
@@ -456947,6 +457200,7 @@ var init_data = __esm(() => {
456947
457200
  },
456948
457201
  {
456949
457202
  evidenceId: "cambria-math",
457203
+ generic: "serif",
456950
457204
  logicalFamily: "Cambria Math",
456951
457205
  physicalFamily: null,
456952
457206
  verdict: "preserve_only",
@@ -456968,6 +457222,7 @@ var init_data = __esm(() => {
456968
457222
  },
456969
457223
  {
456970
457224
  evidenceId: "helvetica",
457225
+ generic: "sans-serif",
456971
457226
  logicalFamily: "Helvetica",
456972
457227
  physicalFamily: "Liberation Sans",
456973
457228
  verdict: "metric_safe",
@@ -456996,6 +457251,7 @@ var init_data = __esm(() => {
456996
457251
  },
456997
457252
  {
456998
457253
  evidenceId: "calibri-light",
457254
+ generic: "sans-serif",
456999
457255
  logicalFamily: "Calibri Light",
457000
457256
  physicalFamily: "Carlito",
457001
457257
  verdict: "visual_only",
@@ -457024,6 +457280,7 @@ var init_data = __esm(() => {
457024
457280
  },
457025
457281
  {
457026
457282
  evidenceId: "baskerville-old-face",
457283
+ generic: "serif",
457027
457284
  logicalFamily: "Baskerville Old Face",
457028
457285
  physicalFamily: "Bacasime Antique",
457029
457286
  verdict: "visual_only",
@@ -457060,11 +457317,43 @@ var init_data = __esm(() => {
457060
457317
  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."
457061
457318
  }
457062
457319
  ]
457320
+ },
457321
+ {
457322
+ evidenceId: "cooper-black",
457323
+ generic: "serif",
457324
+ logicalFamily: "Cooper Black",
457325
+ physicalFamily: "Caprasimo",
457326
+ verdict: "metric_safe",
457327
+ faces: {
457328
+ regular: true,
457329
+ bold: false,
457330
+ italic: false,
457331
+ boldItalic: false
457332
+ },
457333
+ gates: {
457334
+ static: "pass",
457335
+ metric: "pass",
457336
+ layout: "not_run",
457337
+ ship: "not_run"
457338
+ },
457339
+ policyAction: "substitute",
457340
+ measurementRefs: [
457341
+ "cooper-black_regular__caprasimo#regular#w400#786ab84e#analytic_advance#2026-06-05"
457342
+ ],
457343
+ exportRule: "preserve_original_name",
457344
+ advance: {
457345
+ meanDelta: 0,
457346
+ maxDelta: 0
457347
+ },
457348
+ candidateLicense: "OFL-1.1",
457349
+ faceVerdicts: {
457350
+ regular: "metric_safe"
457351
+ }
457063
457352
  }
457064
457353
  ];
457065
457354
  });
457066
457355
 
457067
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457356
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457068
457357
  function normalizeFamilyName2(name) {
457069
457358
  return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
457070
457359
  }
@@ -457077,23 +457366,25 @@ function buildFallback2(row2, physicalFamily, verdict, faceSlot) {
457077
457366
  lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(verdict),
457078
457367
  faces: row2.faces,
457079
457368
  evidenceId: row2.evidenceId,
457369
+ generic: row2.generic,
457080
457370
  ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
457081
457371
  };
457082
457372
  }
457083
457373
  function decideRow2(row2, canRenderFamily2) {
457084
- const { policyAction, physicalFamily, verdict, evidenceId } = row2;
457374
+ const { policyAction, physicalFamily, verdict, evidenceId, generic } = row2;
457085
457375
  if (policyAction === "preserve_only")
457086
- return { kind: "preserve_only", evidenceId };
457376
+ return { kind: "preserve_only", evidenceId, generic };
457087
457377
  if (policyAction === "customer_supplied")
457088
- return { kind: "customer_supplied", evidenceId };
457378
+ return { kind: "customer_supplied", evidenceId, generic };
457089
457379
  if (physicalFamily === null)
457090
- return { kind: "no_recommended_fallback", evidenceId };
457380
+ return { kind: "no_recommended_fallback", evidenceId, generic };
457091
457381
  if (canRenderFamily2 && !canRenderFamily2(physicalFamily))
457092
457382
  return {
457093
457383
  kind: "asset_missing",
457094
457384
  substituteFamily: physicalFamily,
457095
457385
  verdict,
457096
- evidenceId
457386
+ evidenceId,
457387
+ generic
457097
457388
  };
457098
457389
  return {
457099
457390
  kind: "fallback",
@@ -457122,7 +457413,7 @@ var init_fallbacks = __esm(() => {
457122
457413
  ]));
457123
457414
  });
457124
457415
 
457125
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/index.js
457416
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/index.js
457126
457417
  var init_dist11 = __esm(() => {
457127
457418
  init_data();
457128
457419
  init_fallbacks();
@@ -457771,7 +458062,7 @@ function deriveOfferings2() {
457771
458062
  return {
457772
458063
  logicalFamily: row2.logicalFamily,
457773
458064
  physicalFamily: row2.physicalFamily,
457774
- generic: row2.physicalFamily && PHYSICAL_GENERIC2[row2.physicalFamily] || "sans-serif",
458065
+ generic: row2.generic,
457775
458066
  offering: classifyOffering2(row2.policyAction, row2.verdict, row2.physicalFamily, bundled),
457776
458067
  bundled,
457777
458068
  verdict: row2.verdict,
@@ -457780,21 +458071,20 @@ function deriveOfferings2() {
457780
458071
  });
457781
458072
  return Object.freeze(offerings);
457782
458073
  }
457783
- var PHYSICAL_GENERIC2, BUNDLED_FAMILIES2, FONT_OFFERINGS2;
458074
+ var BUNDLED_FAMILIES2, FONT_OFFERINGS2;
457784
458075
  var init_font_offerings = __esm(() => {
457785
458076
  init_substitution_evidence();
457786
458077
  init_bundled_manifest();
457787
- PHYSICAL_GENERIC2 = Object.freeze({
457788
- Carlito: "sans-serif",
457789
- Caladea: "serif",
457790
- "Liberation Sans": "sans-serif",
457791
- "Liberation Serif": "serif",
457792
- "Liberation Mono": "monospace"
457793
- });
457794
458078
  BUNDLED_FAMILIES2 = new Set(BUNDLED_MANIFEST2.map((f2) => f2.family));
457795
458079
  FONT_OFFERINGS2 = deriveOfferings2();
457796
458080
  });
457797
458081
 
458082
+ // ../../shared/font-system/src/document-font-options.ts
458083
+ var init_document_font_options = __esm(() => {
458084
+ init_report();
458085
+ init_font_offerings();
458086
+ });
458087
+
457798
458088
  // ../../shared/font-system/src/index.ts
457799
458089
  var init_src5 = __esm(() => {
457800
458090
  init_types8();
@@ -457805,6 +458095,7 @@ var init_src5 = __esm(() => {
457805
458095
  init_os2();
457806
458096
  init_registry2();
457807
458097
  init_font_offerings();
458098
+ init_document_font_options();
457808
458099
  });
457809
458100
 
457810
458101
  // ../../packages/super-editor/src/editors/v1/core/super-converter/v2/exporter/commentsExporter.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.12.0-next.3",
3
+ "version": "0.12.0-next.5",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -20,8 +20,8 @@
20
20
  "@types/node": "22.19.2",
21
21
  "typescript": "^5.9.2",
22
22
  "@superdoc/document-api": "0.0.1",
23
- "@superdoc/super-editor": "0.0.1",
24
- "superdoc": "1.39.0"
23
+ "superdoc": "1.39.0",
24
+ "@superdoc/super-editor": "0.0.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"