@superdoc-dev/mcp 0.12.0-next.2 → 0.12.0-next.4

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 +304 -82
  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-DIVxfqYC.es.js
222867
+ // ../../packages/superdoc/dist/chunks/src-BU1mfNkI.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) => {
@@ -319555,6 +319653,17 @@ menclose::after {
319555
319653
  const declaredRows = buildFontReport(declared.filter((family2) => family2 && !usedFamilies.has(family2.toLowerCase())), registry3, resolver2);
319556
319654
  return [...faceRows, ...declaredRows];
319557
319655
  }
319656
+ getDocumentFontOptions() {
319657
+ try {
319658
+ const usedFaces = this.#getUsedFaces?.() ?? [];
319659
+ if (!usedFaces.length)
319660
+ return [];
319661
+ const { registry: registry3 } = this.#resolveContext();
319662
+ return buildDocumentFontOptions(usedFaces, registry3, this.#fontResolver ?? undefined);
319663
+ } catch {
319664
+ return [];
319665
+ }
319666
+ }
319558
319667
  async ensureReadyForMeasure() {
319559
319668
  if (this.#getRequiredFaces)
319560
319669
  return this.#ensureFacesReady(this.#getRequiredFaces);
@@ -319994,13 +320103,13 @@ menclose::after {
319994
320103
  return;
319995
320104
  console.log(...args$1);
319996
320105
  }, 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_DIVxfqYC_es = __esm(() => {
320106
+ var init_src_BU1mfNkI_es = __esm(() => {
319998
320107
  init_rolldown_runtime_Bg48TavK_es();
319999
- init_SuperConverter_CfRQprW6_es();
320108
+ init_SuperConverter_BaKhr4cp_es();
320000
320109
  init_jszip_C49i9kUs_es();
320001
320110
  init_xml_js_CqGKpaft_es();
320002
320111
  init_uuid_B2wVPhPi_es();
320003
- init_create_headless_toolbar_DOEFHsWP_es();
320112
+ init_create_headless_toolbar_B3wNa0zb_es();
320004
320113
  init_constants_D9qj59G2_es();
320005
320114
  init_dist_B8HfvhaK_es();
320006
320115
  init_unified_Dsuw2be5_es();
@@ -342220,16 +342329,21 @@ function print() { __p += __j.call(arguments, '') }
342220
342329
  toolbarKey.value += 1;
342221
342330
  };
342222
342331
  const onResizeThrottled = throttle(onWindowResized, 300);
342223
- function teardownWindowListeners() {
342332
+ const onToolbarItemsChanged = () => {
342333
+ toolbarKey.value += 1;
342334
+ };
342335
+ function teardownListeners() {
342224
342336
  window.removeEventListener("resize", onResizeThrottled);
342225
342337
  window.removeEventListener("keydown", onKeyDown);
342338
+ proxy.$toolbar.off?.("toolbar-items-changed", onToolbarItemsChanged);
342226
342339
  containerResizeObserver?.disconnect();
342227
342340
  containerResizeObserver = null;
342228
342341
  }
342229
- function setupWindowListeners() {
342230
- teardownWindowListeners();
342342
+ function setupListeners() {
342343
+ teardownListeners();
342231
342344
  window.addEventListener("resize", onResizeThrottled);
342232
342345
  window.addEventListener("keydown", onKeyDown);
342346
+ proxy.$toolbar.on?.("toolbar-items-changed", onToolbarItemsChanged);
342233
342347
  if (typeof ResizeObserver !== "undefined" && proxy.$toolbar.config?.responsiveToContainer && proxy.$toolbar.toolbarContainer) {
342234
342348
  containerResizeObserver = new ResizeObserver(() => {
342235
342349
  onResizeThrottled();
@@ -342238,10 +342352,10 @@ function print() { __p += __j.call(arguments, '') }
342238
342352
  }
342239
342353
  updateCompactSideGroups();
342240
342354
  }
342241
- exports_vue.onMounted(setupWindowListeners);
342242
- exports_vue.onActivated(setupWindowListeners);
342243
- exports_vue.onDeactivated(teardownWindowListeners);
342244
- exports_vue.onBeforeUnmount(teardownWindowListeners);
342355
+ exports_vue.onMounted(setupListeners);
342356
+ exports_vue.onActivated(setupListeners);
342357
+ exports_vue.onDeactivated(teardownListeners);
342358
+ exports_vue.onBeforeUnmount(teardownListeners);
342245
342359
  const handleCommand = ({ item, argument, option }) => {
342246
342360
  proxy.$toolbar.emitCommand({
342247
342361
  item,
@@ -342320,7 +342434,7 @@ function print() { __p += __j.call(arguments, '') }
342320
342434
  ], 32);
342321
342435
  };
342322
342436
  }
342323
- }, [["__scopeId", "data-v-b83d488a"]]);
342437
+ }, [["__scopeId", "data-v-938eaa1b"]]);
342324
342438
  toolbarTexts = {
342325
342439
  bold: "Bold",
342326
342440
  fontFamily: "Font",
@@ -342451,8 +342565,10 @@ function print() { __p += __j.call(arguments, '') }
342451
342565
  this._boundEditorHandlers = {
342452
342566
  transaction: null,
342453
342567
  selectionUpdate: null,
342454
- focus: null
342568
+ focus: null,
342569
+ fontsChanged: null
342455
342570
  };
342571
+ this._lastFontOptionsSignature = "";
342456
342572
  this._restoreFocusTimeoutId = null;
342457
342573
  if (!this.config.selector && this.config.element)
342458
342574
  this.config.selector = this.config.element;
@@ -342511,24 +342627,40 @@ function print() { __p += __j.call(arguments, '') }
342511
342627
  if (this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length)
342512
342628
  this.config.toolbarGroups = Object.keys(this.config.groups);
342513
342629
  }
342630
+ #detachActiveEditorListeners() {
342631
+ if (!this.activeEditor || !this._boundEditorHandlers.transaction)
342632
+ return;
342633
+ this.activeEditor.off("transaction", this._boundEditorHandlers.transaction);
342634
+ this.activeEditor.off("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
342635
+ this.activeEditor.off("focus", this._boundEditorHandlers.focus);
342636
+ this.activeEditor.off("fonts-changed", this._boundEditorHandlers.fontsChanged);
342637
+ this._boundEditorHandlers.transaction = null;
342638
+ this._boundEditorHandlers.selectionUpdate = null;
342639
+ this._boundEditorHandlers.focus = null;
342640
+ this._boundEditorHandlers.fontsChanged = null;
342641
+ }
342514
342642
  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;
342643
+ const sameEditor = editor === this.activeEditor;
342644
+ const alreadyListening = Boolean(this._boundEditorHandlers.transaction);
342645
+ if (sameEditor && (!editor || alreadyListening)) {
342646
+ this.updateToolbarState();
342647
+ return;
342522
342648
  }
342649
+ this.#detachActiveEditorListeners();
342523
342650
  this.activeEditor = editor;
342524
342651
  if (editor) {
342525
342652
  this._boundEditorHandlers.transaction = this.onEditorTransaction.bind(this);
342526
342653
  this._boundEditorHandlers.selectionUpdate = this.onEditorSelectionUpdate.bind(this);
342527
342654
  this._boundEditorHandlers.focus = this.onEditorFocus.bind(this);
342655
+ this._boundEditorHandlers.fontsChanged = this.onEditorFontsChanged.bind(this);
342528
342656
  this.activeEditor.on("transaction", this._boundEditorHandlers.transaction);
342529
342657
  this.activeEditor.on("selectionUpdate", this._boundEditorHandlers.selectionUpdate);
342530
342658
  this.activeEditor.on("focus", this._boundEditorHandlers.focus);
342659
+ this.activeEditor.on("fonts-changed", this._boundEditorHandlers.fontsChanged);
342531
342660
  }
342661
+ this.#rebuildToolbarItems();
342662
+ this._lastFontOptionsSignature = this.#fontOptionsSignature();
342663
+ this.updateToolbarState();
342532
342664
  }
342533
342665
  getToolbarItemByGroup(groupName) {
342534
342666
  return this.toolbarItems.filter((item) => (item.group?.value || "center") === groupName);
@@ -342545,13 +342677,14 @@ function print() { __p += __j.call(arguments, '') }
342545
342677
  return this.config.responsiveToContainer ? containerWidth : documentWidth;
342546
342678
  }
342547
342679
  #makeToolbarItems({ superToolbar, icons: icons$1, texts, fonts, hideButtons, isDev = false } = {}) {
342680
+ const availableWidth = this.getAvailableWidth();
342548
342681
  const { defaultItems, overflowItems } = makeDefaultItems({
342549
342682
  superToolbar,
342550
342683
  toolbarIcons: icons$1,
342551
342684
  toolbarTexts: texts,
342552
- toolbarFonts: fonts,
342685
+ toolbarFonts: this.#resolveToolbarFonts(fonts),
342553
342686
  hideButtons,
342554
- availableWidth: this.getAvailableWidth(),
342687
+ availableWidth,
342555
342688
  role: this.role,
342556
342689
  isDev
342557
342690
  });
@@ -342564,6 +342697,26 @@ function print() { __p += __j.call(arguments, '') }
342564
342697
  this.toolbarItems = defaultItems.filter((item) => allConfigItems.includes(item.name.value)).filter((item) => !this.config.excludeItems.includes(item.name.value));
342565
342698
  this.overflowItems = overflowItems.filter((item) => allConfigItems.includes(item.name.value));
342566
342699
  }
342700
+ #resolveToolbarFonts(configFonts) {
342701
+ return composeToolbarFontOptions(this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [], configFonts);
342702
+ }
342703
+ #rebuildToolbarItems() {
342704
+ this.#makeToolbarItems({
342705
+ superToolbar: this,
342706
+ icons: this.config.icons,
342707
+ texts: this.config.texts,
342708
+ fonts: this.config.fonts,
342709
+ hideButtons: this.config.hideButtons,
342710
+ isDev: this.isDev
342711
+ });
342712
+ this.emit("toolbar-items-changed");
342713
+ }
342714
+ #fontOptionsSignature() {
342715
+ if (this.config.fonts)
342716
+ return "custom-fonts";
342717
+ const options = this.superdoc?.fonts?.getDocumentFontOptions?.() ?? [];
342718
+ return JSON.stringify(options.map((option) => [option.logicalFamily, option.previewFamily]));
342719
+ }
342567
342720
  #initDefaultFonts() {
342568
342721
  if (!this.activeEditor || !this.activeEditor.converter)
342569
342722
  return;
@@ -342935,6 +343088,14 @@ function print() { __p += __j.call(arguments, '') }
342935
343088
  if (this.#restoreStickyMarksIfNeeded())
342936
343089
  this.updateToolbarState();
342937
343090
  }
343091
+ onEditorFontsChanged() {
343092
+ const signature = this.#fontOptionsSignature();
343093
+ if (signature !== this._lastFontOptionsSignature) {
343094
+ this._lastFontOptionsSignature = signature;
343095
+ this.#rebuildToolbarItems();
343096
+ }
343097
+ this.updateToolbarState();
343098
+ }
342938
343099
  onEditorFocus() {
342939
343100
  if (this.pendingMarkCommands.length) {
342940
343101
  this.onEditorSelectionUpdate();
@@ -343001,6 +343162,7 @@ function print() { __p += __j.call(arguments, '') }
343001
343162
  clearTimeout(this._restoreFocusTimeoutId);
343002
343163
  this._restoreFocusTimeoutId = null;
343003
343164
  }
343165
+ this.#detachActiveEditorListeners();
343004
343166
  this.destroyHeadlessToolbar();
343005
343167
  this.app?.unmount();
343006
343168
  }
@@ -346377,6 +346539,7 @@ function print() { __p += __j.call(arguments, '') }
346377
346539
  editor: this
346378
346540
  });
346379
346541
  console.error(err);
346542
+ throw err;
346380
346543
  }
346381
346544
  }
346382
346545
  #endCollaboration() {
@@ -349620,6 +349783,9 @@ function print() { __p += __j.call(arguments, '') }
349620
349783
  getFontReport() {
349621
349784
  return this.#fontGate?.getReport() ?? [];
349622
349785
  }
349786
+ getDocumentFontOptions() {
349787
+ return this.#fontGate?.getDocumentFontOptions() ?? [];
349788
+ }
349623
349789
  getMissingFonts() {
349624
349790
  return [...new Set(this.getFontReport().filter((record3) => record3.missing).map((record3) => record3.logicalFamily))];
349625
349791
  }
@@ -354904,11 +355070,11 @@ function print() { __p += __j.call(arguments, '') }
354904
355070
  ]);
354905
355071
  });
354906
355072
 
354907
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
355073
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-ClaBD_rO.es.js
354908
355074
  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;
354909
- var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
354910
- init_SuperConverter_CfRQprW6_es();
354911
- init_create_headless_toolbar_DOEFHsWP_es();
355075
+ var init_create_super_doc_ui_ClaBD_rO_es = __esm(() => {
355076
+ init_SuperConverter_BaKhr4cp_es();
355077
+ init_create_headless_toolbar_B3wNa0zb_es();
354912
355078
  headlessToolbarConstants = {
354913
355079
  DEFAULT_TEXT_ALIGN_OPTIONS: [
354914
355080
  {
@@ -355190,16 +355356,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
355190
355356
 
355191
355357
  // ../../packages/superdoc/dist/super-editor.es.js
355192
355358
  var init_super_editor_es = __esm(() => {
355193
- init_src_DIVxfqYC_es();
355194
- init_SuperConverter_CfRQprW6_es();
355359
+ init_src_BU1mfNkI_es();
355360
+ init_SuperConverter_BaKhr4cp_es();
355195
355361
  init_jszip_C49i9kUs_es();
355196
355362
  init_xml_js_CqGKpaft_es();
355197
- init_create_headless_toolbar_DOEFHsWP_es();
355363
+ init_create_headless_toolbar_B3wNa0zb_es();
355198
355364
  init_constants_D9qj59G2_es();
355199
355365
  init_dist_B8HfvhaK_es();
355200
355366
  init_unified_Dsuw2be5_es();
355201
355367
  init_DocxZipper_FUsfThjV_es();
355202
- init_create_super_doc_ui_CanMzNxA_es();
355368
+ init_create_super_doc_ui_ClaBD_rO_es();
355203
355369
  init_ui_C5PAS9hY_es();
355204
355370
  init_eventemitter3_BnGqBE_Q_es();
355205
355371
  init_errors_CNaD6vcg_es();
@@ -456409,12 +456575,13 @@ var init_exporter = __esm(() => {
456409
456575
  // ../../shared/font-system/src/types.ts
456410
456576
  var init_types8 = () => {};
456411
456577
 
456412
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/data.js
456578
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/data.js
456413
456579
  var SUBSTITUTION_EVIDENCE2;
456414
456580
  var init_data = __esm(() => {
456415
456581
  SUBSTITUTION_EVIDENCE2 = [
456416
456582
  {
456417
456583
  evidenceId: "calibri",
456584
+ generic: "sans-serif",
456418
456585
  logicalFamily: "Calibri",
456419
456586
  physicalFamily: "Carlito",
456420
456587
  verdict: "metric_safe",
@@ -456444,6 +456611,7 @@ var init_data = __esm(() => {
456444
456611
  },
456445
456612
  {
456446
456613
  evidenceId: "cambria",
456614
+ generic: "serif",
456447
456615
  logicalFamily: "Cambria",
456448
456616
  physicalFamily: "Caladea",
456449
456617
  verdict: "visual_only",
@@ -456489,6 +456657,7 @@ var init_data = __esm(() => {
456489
456657
  },
456490
456658
  {
456491
456659
  evidenceId: "arial",
456660
+ generic: "sans-serif",
456492
456661
  logicalFamily: "Arial",
456493
456662
  physicalFamily: "Liberation Sans",
456494
456663
  verdict: "metric_safe",
@@ -456517,6 +456686,7 @@ var init_data = __esm(() => {
456517
456686
  },
456518
456687
  {
456519
456688
  evidenceId: "times-new-roman",
456689
+ generic: "serif",
456520
456690
  logicalFamily: "Times New Roman",
456521
456691
  physicalFamily: "Liberation Serif",
456522
456692
  verdict: "metric_safe",
@@ -456545,6 +456715,7 @@ var init_data = __esm(() => {
456545
456715
  },
456546
456716
  {
456547
456717
  evidenceId: "courier-new",
456718
+ generic: "monospace",
456548
456719
  logicalFamily: "Courier New",
456549
456720
  physicalFamily: "Liberation Mono",
456550
456721
  verdict: "metric_safe",
@@ -456573,6 +456744,7 @@ var init_data = __esm(() => {
456573
456744
  },
456574
456745
  {
456575
456746
  evidenceId: "georgia",
456747
+ generic: "serif",
456576
456748
  logicalFamily: "Georgia",
456577
456749
  physicalFamily: "Gelasio",
456578
456750
  verdict: "near_metric",
@@ -456628,6 +456800,7 @@ var init_data = __esm(() => {
456628
456800
  },
456629
456801
  {
456630
456802
  evidenceId: "arial-narrow",
456803
+ generic: "sans-serif",
456631
456804
  logicalFamily: "Arial Narrow",
456632
456805
  physicalFamily: "Liberation Sans Narrow",
456633
456806
  verdict: "visual_only",
@@ -456673,6 +456846,7 @@ var init_data = __esm(() => {
456673
456846
  },
456674
456847
  {
456675
456848
  evidenceId: "aptos",
456849
+ generic: "sans-serif",
456676
456850
  logicalFamily: "Aptos",
456677
456851
  physicalFamily: null,
456678
456852
  verdict: "no_substitute",
@@ -456697,6 +456871,7 @@ var init_data = __esm(() => {
456697
456871
  },
456698
456872
  {
456699
456873
  evidenceId: "consolas",
456874
+ generic: "monospace",
456700
456875
  logicalFamily: "Consolas",
456701
456876
  physicalFamily: "Inconsolata SemiExpanded",
456702
456877
  verdict: "cell_width_only",
@@ -456725,6 +456900,7 @@ var init_data = __esm(() => {
456725
456900
  },
456726
456901
  {
456727
456902
  evidenceId: "verdana",
456903
+ generic: "sans-serif",
456728
456904
  logicalFamily: "Verdana",
456729
456905
  physicalFamily: null,
456730
456906
  verdict: "visual_only",
@@ -456749,6 +456925,7 @@ var init_data = __esm(() => {
456749
456925
  },
456750
456926
  {
456751
456927
  evidenceId: "tahoma",
456928
+ generic: "sans-serif",
456752
456929
  logicalFamily: "Tahoma",
456753
456930
  physicalFamily: null,
456754
456931
  verdict: "visual_only",
@@ -456773,6 +456950,7 @@ var init_data = __esm(() => {
456773
456950
  },
456774
456951
  {
456775
456952
  evidenceId: "trebuchet-ms",
456953
+ generic: "sans-serif",
456776
456954
  logicalFamily: "Trebuchet MS",
456777
456955
  physicalFamily: null,
456778
456956
  verdict: "visual_only",
@@ -456797,6 +456975,7 @@ var init_data = __esm(() => {
456797
456975
  },
456798
456976
  {
456799
456977
  evidenceId: "comic-sans-ms",
456978
+ generic: "sans-serif",
456800
456979
  logicalFamily: "Comic Sans MS",
456801
456980
  physicalFamily: "Comic Neue",
456802
456981
  verdict: "visual_only",
@@ -456825,6 +457004,7 @@ var init_data = __esm(() => {
456825
457004
  },
456826
457005
  {
456827
457006
  evidenceId: "candara",
457007
+ generic: "sans-serif",
456828
457008
  logicalFamily: "Candara",
456829
457009
  physicalFamily: null,
456830
457010
  verdict: "visual_only",
@@ -456849,6 +457029,7 @@ var init_data = __esm(() => {
456849
457029
  },
456850
457030
  {
456851
457031
  evidenceId: "constantia",
457032
+ generic: "serif",
456852
457033
  logicalFamily: "Constantia",
456853
457034
  physicalFamily: null,
456854
457035
  verdict: "visual_only",
@@ -456873,6 +457054,7 @@ var init_data = __esm(() => {
456873
457054
  },
456874
457055
  {
456875
457056
  evidenceId: "corbel",
457057
+ generic: "sans-serif",
456876
457058
  logicalFamily: "Corbel",
456877
457059
  physicalFamily: null,
456878
457060
  verdict: "visual_only",
@@ -456897,6 +457079,7 @@ var init_data = __esm(() => {
456897
457079
  },
456898
457080
  {
456899
457081
  evidenceId: "lucida-console",
457082
+ generic: "monospace",
456900
457083
  logicalFamily: "Lucida Console",
456901
457084
  physicalFamily: "Cousine",
456902
457085
  verdict: "cell_width_only",
@@ -456925,6 +457108,7 @@ var init_data = __esm(() => {
456925
457108
  },
456926
457109
  {
456927
457110
  evidenceId: "aptos-display",
457111
+ generic: "sans-serif",
456928
457112
  logicalFamily: "Aptos Display",
456929
457113
  physicalFamily: null,
456930
457114
  verdict: "customer_supplied",
@@ -456946,6 +457130,7 @@ var init_data = __esm(() => {
456946
457130
  },
456947
457131
  {
456948
457132
  evidenceId: "cambria-math",
457133
+ generic: "serif",
456949
457134
  logicalFamily: "Cambria Math",
456950
457135
  physicalFamily: null,
456951
457136
  verdict: "preserve_only",
@@ -456967,6 +457152,7 @@ var init_data = __esm(() => {
456967
457152
  },
456968
457153
  {
456969
457154
  evidenceId: "helvetica",
457155
+ generic: "sans-serif",
456970
457156
  logicalFamily: "Helvetica",
456971
457157
  physicalFamily: "Liberation Sans",
456972
457158
  verdict: "metric_safe",
@@ -456995,6 +457181,7 @@ var init_data = __esm(() => {
456995
457181
  },
456996
457182
  {
456997
457183
  evidenceId: "calibri-light",
457184
+ generic: "sans-serif",
456998
457185
  logicalFamily: "Calibri Light",
456999
457186
  physicalFamily: "Carlito",
457000
457187
  verdict: "visual_only",
@@ -457023,6 +457210,7 @@ var init_data = __esm(() => {
457023
457210
  },
457024
457211
  {
457025
457212
  evidenceId: "baskerville-old-face",
457213
+ generic: "serif",
457026
457214
  logicalFamily: "Baskerville Old Face",
457027
457215
  physicalFamily: "Bacasime Antique",
457028
457216
  verdict: "visual_only",
@@ -457059,11 +457247,43 @@ var init_data = __esm(() => {
457059
457247
  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."
457060
457248
  }
457061
457249
  ]
457250
+ },
457251
+ {
457252
+ evidenceId: "cooper-black",
457253
+ generic: "serif",
457254
+ logicalFamily: "Cooper Black",
457255
+ physicalFamily: "Caprasimo",
457256
+ verdict: "metric_safe",
457257
+ faces: {
457258
+ regular: true,
457259
+ bold: false,
457260
+ italic: false,
457261
+ boldItalic: false
457262
+ },
457263
+ gates: {
457264
+ static: "pass",
457265
+ metric: "pass",
457266
+ layout: "not_run",
457267
+ ship: "not_run"
457268
+ },
457269
+ policyAction: "substitute",
457270
+ measurementRefs: [
457271
+ "cooper-black_regular__caprasimo#regular#w400#786ab84e#analytic_advance#2026-06-05"
457272
+ ],
457273
+ exportRule: "preserve_original_name",
457274
+ advance: {
457275
+ meanDelta: 0,
457276
+ maxDelta: 0
457277
+ },
457278
+ candidateLicense: "OFL-1.1",
457279
+ faceVerdicts: {
457280
+ regular: "metric_safe"
457281
+ }
457062
457282
  }
457063
457283
  ];
457064
457284
  });
457065
457285
 
457066
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457286
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
457067
457287
  function normalizeFamilyName2(name) {
457068
457288
  return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
457069
457289
  }
@@ -457076,23 +457296,25 @@ function buildFallback2(row2, physicalFamily, verdict, faceSlot) {
457076
457296
  lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(verdict),
457077
457297
  faces: row2.faces,
457078
457298
  evidenceId: row2.evidenceId,
457299
+ generic: row2.generic,
457079
457300
  ...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
457080
457301
  };
457081
457302
  }
457082
457303
  function decideRow2(row2, canRenderFamily2) {
457083
- const { policyAction, physicalFamily, verdict, evidenceId } = row2;
457304
+ const { policyAction, physicalFamily, verdict, evidenceId, generic } = row2;
457084
457305
  if (policyAction === "preserve_only")
457085
- return { kind: "preserve_only", evidenceId };
457306
+ return { kind: "preserve_only", evidenceId, generic };
457086
457307
  if (policyAction === "customer_supplied")
457087
- return { kind: "customer_supplied", evidenceId };
457308
+ return { kind: "customer_supplied", evidenceId, generic };
457088
457309
  if (physicalFamily === null)
457089
- return { kind: "no_recommended_fallback", evidenceId };
457310
+ return { kind: "no_recommended_fallback", evidenceId, generic };
457090
457311
  if (canRenderFamily2 && !canRenderFamily2(physicalFamily))
457091
457312
  return {
457092
457313
  kind: "asset_missing",
457093
457314
  substituteFamily: physicalFamily,
457094
457315
  verdict,
457095
- evidenceId
457316
+ evidenceId,
457317
+ generic
457096
457318
  };
457097
457319
  return {
457098
457320
  kind: "fallback",
@@ -457121,7 +457343,7 @@ var init_fallbacks = __esm(() => {
457121
457343
  ]));
457122
457344
  });
457123
457345
 
457124
- // ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/index.js
457346
+ // ../../node_modules/.pnpm/@docfonts+fallbacks@0.6.0/node_modules/@docfonts/fallbacks/dist/index.js
457125
457347
  var init_dist11 = __esm(() => {
457126
457348
  init_data();
457127
457349
  init_fallbacks();
@@ -457770,7 +457992,7 @@ function deriveOfferings2() {
457770
457992
  return {
457771
457993
  logicalFamily: row2.logicalFamily,
457772
457994
  physicalFamily: row2.physicalFamily,
457773
- generic: row2.physicalFamily && PHYSICAL_GENERIC2[row2.physicalFamily] || "sans-serif",
457995
+ generic: row2.generic,
457774
457996
  offering: classifyOffering2(row2.policyAction, row2.verdict, row2.physicalFamily, bundled),
457775
457997
  bundled,
457776
457998
  verdict: row2.verdict,
@@ -457779,21 +458001,20 @@ function deriveOfferings2() {
457779
458001
  });
457780
458002
  return Object.freeze(offerings);
457781
458003
  }
457782
- var PHYSICAL_GENERIC2, BUNDLED_FAMILIES2, FONT_OFFERINGS2;
458004
+ var BUNDLED_FAMILIES2, FONT_OFFERINGS2;
457783
458005
  var init_font_offerings = __esm(() => {
457784
458006
  init_substitution_evidence();
457785
458007
  init_bundled_manifest();
457786
- PHYSICAL_GENERIC2 = Object.freeze({
457787
- Carlito: "sans-serif",
457788
- Caladea: "serif",
457789
- "Liberation Sans": "sans-serif",
457790
- "Liberation Serif": "serif",
457791
- "Liberation Mono": "monospace"
457792
- });
457793
458008
  BUNDLED_FAMILIES2 = new Set(BUNDLED_MANIFEST2.map((f2) => f2.family));
457794
458009
  FONT_OFFERINGS2 = deriveOfferings2();
457795
458010
  });
457796
458011
 
458012
+ // ../../shared/font-system/src/document-font-options.ts
458013
+ var init_document_font_options = __esm(() => {
458014
+ init_report();
458015
+ init_font_offerings();
458016
+ });
458017
+
457797
458018
  // ../../shared/font-system/src/index.ts
457798
458019
  var init_src5 = __esm(() => {
457799
458020
  init_types8();
@@ -457804,6 +458025,7 @@ var init_src5 = __esm(() => {
457804
458025
  init_os2();
457805
458026
  init_registry2();
457806
458027
  init_font_offerings();
458028
+ init_document_font_options();
457807
458029
  });
457808
458030
 
457809
458031
  // ../../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.2",
3
+ "version": "0.12.0-next.4",
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"