@superdoc-dev/mcp 0.11.0-next.4 → 0.11.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 +262 -86
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -219498,7 +219498,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
219498
219498
  init_remark_gfm_BhnWr3yf_es();
219499
219499
  });
219500
219500
 
219501
- // ../../packages/superdoc/dist/chunks/src-B1aSE-tB.es.js
219501
+ // ../../packages/superdoc/dist/chunks/src-DvgAvHbj.es.js
219502
219502
  function deleteProps(obj, propOrProps) {
219503
219503
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
219504
219504
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -259661,8 +259661,8 @@ function resolveFontFamily2(logicalFamily) {
259661
259661
  function resolvePhysicalFamily(cssFontFamily) {
259662
259662
  return defaultResolver.resolvePhysicalFamily(cssFontFamily);
259663
259663
  }
259664
- function resolvePrimaryPhysicalFamily(family$1) {
259665
- return defaultResolver.resolvePrimaryPhysicalFamily(family$1);
259664
+ function resolveFace(logicalFamily, face, hasFace) {
259665
+ return defaultResolver.resolveFace(logicalFamily, face, hasFace);
259666
259666
  }
259667
259667
  function getFontConfigVersion() {
259668
259668
  return fontConfigVersion;
@@ -259772,6 +259772,40 @@ function buildFontReport(logicalFamilies, registry3, resolver2) {
259772
259772
  }
259773
259773
  return report;
259774
259774
  }
259775
+ function buildFaceReport(usedFaces, registry3, resolver2) {
259776
+ const hasFace = (family$1, weight, style2) => registry3.hasFace(family$1, weight, style2);
259777
+ const seen = /* @__PURE__ */ new Set;
259778
+ const report = [];
259779
+ for (const { logicalFamily, weight, style: style2 } of usedFaces) {
259780
+ if (!logicalFamily)
259781
+ continue;
259782
+ const key2 = `${logicalFamily.toLowerCase()}|${weight}|${style2}`;
259783
+ if (seen.has(key2))
259784
+ continue;
259785
+ seen.add(key2);
259786
+ const face = {
259787
+ weight,
259788
+ style: style2
259789
+ };
259790
+ const { physicalFamily, reason } = resolver2 ? resolver2.resolveFace(logicalFamily, face, hasFace) : resolveFace(logicalFamily, face, hasFace);
259791
+ const loadStatus = registry3.getFaceStatus({
259792
+ family: physicalFamily,
259793
+ weight,
259794
+ style: style2
259795
+ });
259796
+ const missing = reason === "fallback_face_absent" || isSettled(loadStatus) && loadStatus !== "loaded";
259797
+ report.push({
259798
+ logicalFamily,
259799
+ physicalFamily,
259800
+ reason,
259801
+ loadStatus,
259802
+ exportFamily: logicalFamily,
259803
+ missing,
259804
+ face
259805
+ });
259806
+ }
259807
+ return report;
259808
+ }
259775
259809
  function quoteFamily(family$1) {
259776
259810
  return `"${family$1.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`;
259777
259811
  }
@@ -275321,7 +275355,11 @@ function buildFontString$1(run2, fontContext) {
275321
275355
  if (run2.bold)
275322
275356
  parts.push("bold");
275323
275357
  parts.push(`${normalizeFontSize$1(run2.fontSize)}px`);
275324
- const physicalFamily = normalizeFontFamily$1(fontContext.resolvePhysical(normalizeFontFamily$1(run2.fontFamily)));
275358
+ const face = {
275359
+ weight: run2.bold ? "700" : "400",
275360
+ style: run2.italic ? "italic" : "normal"
275361
+ };
275362
+ const physicalFamily = normalizeFontFamily$1(fontContext.resolvePhysical(normalizeFontFamily$1(run2.fontFamily), face));
275325
275363
  parts.push(toCssFontFamily(physicalFamily) ?? physicalFamily);
275326
275364
  return parts.join(" ");
275327
275365
  }
@@ -275428,6 +275466,12 @@ function getCanvasContext() {
275428
275466
  }
275429
275467
  return canvasContext;
275430
275468
  }
275469
+ function faceOf(run2) {
275470
+ return {
275471
+ weight: run2.bold ? "700" : "400",
275472
+ style: run2.italic ? "italic" : "normal"
275473
+ };
275474
+ }
275431
275475
  function buildFontString(run2, fontContext) {
275432
275476
  const parts = [];
275433
275477
  if (run2.italic)
@@ -275435,7 +275479,7 @@ function buildFontString(run2, fontContext) {
275435
275479
  if (run2.bold)
275436
275480
  parts.push("bold");
275437
275481
  parts.push(`${run2.fontSize}px`);
275438
- const physicalFamily = fontContext.resolvePhysical(run2.fontFamily);
275482
+ const physicalFamily = fontContext.resolvePhysical(run2.fontFamily, faceOf(run2));
275439
275483
  if (measurementConfig.mode === "deterministic")
275440
275484
  parts.push(measurementConfig.fonts.fallbackStack.length > 0 ? measurementConfig.fonts.fallbackStack.join(", ") : measurementConfig.fonts.deterministicFamily);
275441
275485
  else
@@ -275502,7 +275546,7 @@ function lineHeightFontSize(run2) {
275502
275546
  }
275503
275547
  function getFontInfoFromRun(run2, fontContext) {
275504
275548
  return {
275505
- fontFamily: normalizeFontFamily(fontContext.resolvePhysical(run2.fontFamily)),
275549
+ fontFamily: normalizeFontFamily(fontContext.resolvePhysical(run2.fontFamily, faceOf(run2))),
275506
275550
  fontSize: normalizeFontSize2(lineHeightFontSize(run2)),
275507
275551
  bold: run2.bold,
275508
275552
  italic: run2.italic
@@ -276305,7 +276349,7 @@ async function measureParagraphBlock(block, maxWidth, fontContext) {
276305
276349
  if (isFieldAnnotationRun(run2)) {
276306
276350
  const displayText = applyTextTransform(run2.displayLabel || "", run2);
276307
276351
  const annotationFontSize = typeof run2.fontSize === "number" ? run2.fontSize : typeof run2.fontSize === "string" ? parseFloat(run2.fontSize) || DEFAULT_FIELD_ANNOTATION_FONT_SIZE : DEFAULT_FIELD_ANNOTATION_FONT_SIZE;
276308
- const annotationFontFamily = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif");
276352
+ const annotationFontFamily = fontContext.resolvePhysical(run2.fontFamily || "Arial, sans-serif", faceOf(run2));
276309
276353
  const fontWeight = run2.bold ? "bold" : "normal";
276310
276354
  ctx$1.font = `${run2.italic ? "italic" : "normal"} ${fontWeight} ${annotationFontSize}px ${annotationFontFamily}`;
276311
276355
  const textWidth = displayText ? ctx$1.measureText(displayText).width : 0;
@@ -277363,7 +277407,7 @@ async function measureListBlock(block, constraints, fontContext) {
277363
277407
  totalHeight
277364
277408
  };
277365
277409
  }
277366
- async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, deps, fontResolver) {
277410
+ async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, deps, fontResolver, hasFace, effectiveSignature) {
277367
277411
  deps.headerLayoutsByRId.clear();
277368
277412
  deps.footerLayoutsByRId.clear();
277369
277413
  if (!headerFooterInput)
@@ -277386,21 +277430,21 @@ async function layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetad
277386
277430
  };
277387
277431
  };
277388
277432
  if (sectionMetadata.length > 1 && sectionMetadata.some((s2) => s2.margins || s2.pageSize)) {
277389
- await layoutWithPerSectionConstraints("header", headerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.headerLayoutsByRId, fontResolver);
277390
- await layoutWithPerSectionConstraints("footer", footerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.footerLayoutsByRId, fontResolver);
277433
+ await layoutWithPerSectionConstraints("header", headerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.headerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
277434
+ await layoutWithPerSectionConstraints("footer", footerBlocksByRId, sectionMetadata, constraints, pageResolver, deps.footerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
277391
277435
  } else {
277392
277436
  const effectiveHeaderRefsBySection = buildEffectiveHeaderFooterRefsBySection(sectionMetadata, "header");
277393
277437
  const effectiveFooterRefsBySection = buildEffectiveHeaderFooterRefsBySection(sectionMetadata, "footer");
277394
- await layoutBlocksByRId("header", headerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveHeaderRefsBySection), constraints, pageResolver, deps.headerLayoutsByRId, fontResolver);
277395
- await layoutBlocksByRId("footer", footerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveFooterRefsBySection), constraints, pageResolver, deps.footerLayoutsByRId, fontResolver);
277438
+ await layoutBlocksByRId("header", headerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveHeaderRefsBySection), constraints, pageResolver, deps.headerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
277439
+ await layoutBlocksByRId("footer", footerBlocksByRId, collectReferencedHeaderFooterRIds(effectiveFooterRefsBySection), constraints, pageResolver, deps.footerLayoutsByRId, fontResolver, hasFace, effectiveSignature);
277396
277440
  }
277397
277441
  }
277398
- async function layoutBlocksByRId(kind, blocksByRId, referencedRIds, constraints, pageResolver, layoutsByRId, fontResolver) {
277442
+ async function layoutBlocksByRId(kind, blocksByRId, referencedRIds, constraints, pageResolver, layoutsByRId, fontResolver, hasFace, effectiveSignature) {
277399
277443
  if (!blocksByRId || referencedRIds.size === 0)
277400
277444
  return;
277401
- const fontSignature = fontResolver?.signature ?? "";
277445
+ const fontSignature = effectiveSignature ?? "";
277402
277446
  const fontMeasureContext = fontResolver ? {
277403
- resolvePhysical: (css) => fontResolver.resolvePhysicalFamily(css),
277447
+ resolvePhysical: (css, face) => hasFace ? fontResolver.resolvePhysicalFamilyForFace(css, face, hasFace) : fontResolver.resolvePhysicalFamily(css),
277404
277448
  fontSignature
277405
277449
  } : undefined;
277406
277450
  for (const [rId, blocks2] of blocksByRId) {
@@ -277455,12 +277499,12 @@ function adjustFramePositionsForContentWidth(layout, blocks2, effectiveWidth, co
277455
277499
  fragment.x -= widthDiff / 2;
277456
277500
  }
277457
277501
  }
277458
- async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadata, fallbackConstraints, pageResolver, layoutsByRId, fontResolver) {
277502
+ async function layoutWithPerSectionConstraints(kind, blocksByRId, sectionMetadata, fallbackConstraints, pageResolver, layoutsByRId, fontResolver, hasFace, effectiveSignature) {
277459
277503
  if (!blocksByRId)
277460
277504
  return;
277461
- const fontSignature = fontResolver?.signature ?? "";
277505
+ const fontSignature = effectiveSignature ?? "";
277462
277506
  const fontMeasureContext = fontResolver ? {
277463
- resolvePhysical: (css) => fontResolver.resolvePhysicalFamily(css),
277507
+ resolvePhysical: (css, face) => hasFace ? fontResolver.resolvePhysicalFamilyForFace(css, face, hasFace) : fontResolver.resolvePhysicalFamily(css),
277464
277508
  fontSignature
277465
277509
  } : undefined;
277466
277510
  const groups = buildSectionAwareHeaderFooterMeasurementGroups(kind, blocksByRId, sectionMetadata, fallbackConstraints);
@@ -278129,80 +278173,136 @@ function defaultScheduleMicrotask(callback) {
278129
278173
  }
278130
278174
  Promise.resolve().then(callback);
278131
278175
  }
278132
- function faceKey(req) {
278133
- return `${req.family.toLowerCase()}|${req.weight}|${req.style}`;
278176
+ function primaryFamily(css) {
278177
+ const comma = css.indexOf(",");
278178
+ return (comma === -1 ? css : css.slice(0, comma)).trim().replace(/^["']|["']$/g, "");
278134
278179
  }
278135
- function collect(out, node2, resolve2) {
278180
+ function makeResolveFace(resolver2, hasFace) {
278181
+ if (resolver2 && hasFace)
278182
+ return (logical, face) => {
278183
+ const r$1 = resolver2.resolveFace(logical, face, hasFace);
278184
+ return {
278185
+ physicalFamily: r$1.physicalFamily,
278186
+ reason: r$1.reason
278187
+ };
278188
+ };
278189
+ if (resolver2)
278190
+ return (logical) => {
278191
+ const r$1 = resolver2.resolveFontFamily(logical);
278192
+ return {
278193
+ physicalFamily: r$1.physicalFamily,
278194
+ reason: r$1.reason
278195
+ };
278196
+ };
278197
+ return (logical) => {
278198
+ const r$1 = resolveFontFamily2(logical);
278199
+ return {
278200
+ physicalFamily: r$1.physicalFamily,
278201
+ reason: r$1.reason
278202
+ };
278203
+ };
278204
+ }
278205
+ function collect(acc, node2, resolveFace$1) {
278136
278206
  if (!node2 || typeof node2.fontFamily !== "string" || !node2.fontFamily)
278137
278207
  return;
278138
- const family$1 = resolve2(node2.fontFamily);
278139
- if (!family$1)
278208
+ const weight = node2.bold === true ? "700" : "400";
278209
+ const style2 = node2.italic === true ? "italic" : "normal";
278210
+ const logicalPrimary = primaryFamily(node2.fontFamily);
278211
+ if (!logicalPrimary)
278140
278212
  return;
278141
- const req = {
278142
- family: family$1,
278143
- weight: node2.bold === true ? "700" : "400",
278144
- style: node2.italic === true ? "italic" : "normal"
278145
- };
278146
- const key2 = faceKey(req);
278147
- if (!out.has(key2))
278148
- out.set(key2, req);
278213
+ const usedKey = `${logicalPrimary.toLowerCase()}|${weight}|${style2}`;
278214
+ if (acc.usedFaces.has(usedKey))
278215
+ return;
278216
+ const { physicalFamily, reason } = resolveFace$1(node2.fontFamily, {
278217
+ weight,
278218
+ style: style2
278219
+ });
278220
+ acc.usedFaces.set(usedKey, {
278221
+ logicalFamily: logicalPrimary,
278222
+ weight,
278223
+ style: style2
278224
+ });
278225
+ acc.sigEntries.set(usedKey, [
278226
+ logicalPrimary.toLowerCase(),
278227
+ weight,
278228
+ style2,
278229
+ (physicalFamily || "").toLowerCase(),
278230
+ reason
278231
+ ]);
278232
+ if (physicalFamily) {
278233
+ const reqKey = `${physicalFamily.toLowerCase()}|${weight}|${style2}`;
278234
+ if (!acc.requiredFaces.has(reqKey))
278235
+ acc.requiredFaces.set(reqKey, {
278236
+ family: physicalFamily,
278237
+ weight,
278238
+ style: style2
278239
+ });
278240
+ }
278149
278241
  }
278150
- function collectRuns(out, runs2, resolve2) {
278242
+ function collectRuns(acc, runs2, resolveFace$1) {
278151
278243
  if (!runs2)
278152
278244
  return;
278153
278245
  for (const run2 of runs2) {
278154
278246
  const bearing = run2;
278155
278247
  if (run2.kind === "fieldAnnotation" && (typeof bearing.fontFamily !== "string" || !bearing.fontFamily))
278156
- collect(out, {
278248
+ collect(acc, {
278157
278249
  ...bearing,
278158
278250
  fontFamily: "Arial"
278159
- }, resolve2);
278251
+ }, resolveFace$1);
278160
278252
  else
278161
- collect(out, bearing, resolve2);
278253
+ collect(acc, bearing, resolveFace$1);
278162
278254
  }
278163
278255
  }
278164
- function collectParagraph(out, paragraph2, resolve2) {
278256
+ function collectParagraph(acc, paragraph2, resolveFace$1) {
278165
278257
  if (!paragraph2)
278166
278258
  return;
278167
- collectRuns(out, paragraph2.runs, resolve2);
278168
- collect(out, paragraph2.attrs?.wordLayout?.marker?.run, resolve2);
278169
- collect(out, paragraph2.attrs?.dropCapDescriptor?.run, resolve2);
278259
+ collectRuns(acc, paragraph2.runs, resolveFace$1);
278260
+ collect(acc, paragraph2.attrs?.wordLayout?.marker?.run, resolveFace$1);
278261
+ collect(acc, paragraph2.attrs?.dropCapDescriptor?.run, resolveFace$1);
278170
278262
  }
278171
- function collectTable(out, table2, resolve2) {
278263
+ function collectTable(acc, table2, resolveFace$1) {
278172
278264
  for (const row2 of table2.rows)
278173
278265
  for (const cell2 of row2.cells) {
278174
- collectParagraph(out, cell2.paragraph, resolve2);
278266
+ collectParagraph(acc, cell2.paragraph, resolveFace$1);
278175
278267
  if (cell2.blocks)
278176
278268
  for (const b$1 of cell2.blocks)
278177
- collectBlock(out, b$1, resolve2);
278269
+ collectBlock(acc, b$1, resolveFace$1);
278178
278270
  }
278179
278271
  }
278180
- function collectList(out, list5, resolve2) {
278272
+ function collectList(acc, list5, resolveFace$1) {
278181
278273
  for (const item of list5.items)
278182
- collectParagraph(out, item.paragraph, resolve2);
278274
+ collectParagraph(acc, item.paragraph, resolveFace$1);
278183
278275
  }
278184
- function collectBlock(out, block, resolve2) {
278276
+ function collectBlock(acc, block, resolveFace$1) {
278185
278277
  switch (block.kind) {
278186
278278
  case "paragraph":
278187
- collectParagraph(out, block, resolve2);
278279
+ collectParagraph(acc, block, resolveFace$1);
278188
278280
  break;
278189
278281
  case "table":
278190
- collectTable(out, block, resolve2);
278282
+ collectTable(acc, block, resolveFace$1);
278191
278283
  break;
278192
278284
  case "list":
278193
- collectList(out, block, resolve2);
278285
+ collectList(acc, block, resolveFace$1);
278194
278286
  break;
278195
278287
  default:
278196
278288
  break;
278197
278289
  }
278198
278290
  }
278199
- function planRequiredFontFaces(blocks2, resolver2) {
278200
- const resolve2 = resolver2 ? (family$1) => resolver2.resolvePrimaryPhysicalFamily(family$1) : resolvePrimaryPhysicalFamily;
278201
- const out = /* @__PURE__ */ new Map;
278291
+ function planFontFaces(blocks2, resolver2, hasFace) {
278292
+ const resolveFace$1 = makeResolveFace(resolver2, hasFace);
278293
+ const acc = {
278294
+ requiredFaces: /* @__PURE__ */ new Map,
278295
+ usedFaces: /* @__PURE__ */ new Map,
278296
+ sigEntries: /* @__PURE__ */ new Map
278297
+ };
278202
278298
  if (blocks2)
278203
278299
  for (const block of blocks2)
278204
- collectBlock(out, block, resolve2);
278205
- return [...out.values()];
278300
+ collectBlock(acc, block, resolveFace$1);
278301
+ return {
278302
+ requiredFaces: [...acc.requiredFaces.values()],
278303
+ usedFaces: [...acc.usedFaces.values()],
278304
+ effectiveSignature: acc.sigEntries.size === 0 ? "" : JSON.stringify([...acc.sigEntries.entries()].sort(([a2], [b$1]) => a2 < b$1 ? -1 : a2 > b$1 ? 1 : 0).map(([, tuple3]) => tuple3))
278305
+ };
278206
278306
  }
278207
278307
  function buildSemanticFootnoteBlocks(input2, footnotesMode) {
278208
278308
  if (!input2 || input2.refs.length === 0 || input2.blocksById.size === 0)
@@ -299365,6 +299465,40 @@ menclose::after {
299365
299465
  return cssFontFamily;
299366
299466
  return [physical, ...parts.slice(1)].join(", ");
299367
299467
  }
299468
+ resolveFace(logicalFamily, face, hasFace) {
299469
+ const primary = splitStack(logicalFamily)[0] ?? logicalFamily;
299470
+ const { physical, reason } = this.#physicalFor(primary);
299471
+ if (reason === "as_requested")
299472
+ return {
299473
+ logicalFamily,
299474
+ physicalFamily: physical,
299475
+ reason
299476
+ };
299477
+ if (hasFace(physical, face.weight, face.style))
299478
+ return {
299479
+ logicalFamily,
299480
+ physicalFamily: physical,
299481
+ reason
299482
+ };
299483
+ return {
299484
+ logicalFamily,
299485
+ physicalFamily: primary,
299486
+ reason: "fallback_face_absent"
299487
+ };
299488
+ }
299489
+ resolvePhysicalFamilyForFace(cssFontFamily, face, hasFace) {
299490
+ if (!cssFontFamily)
299491
+ return cssFontFamily;
299492
+ const parts = splitStack(cssFontFamily);
299493
+ if (parts.length === 0)
299494
+ return cssFontFamily;
299495
+ const { physical, reason } = this.#physicalFor(parts[0]);
299496
+ if (reason === "as_requested")
299497
+ return cssFontFamily;
299498
+ if (!hasFace(physical, face.weight, face.style))
299499
+ return cssFontFamily;
299500
+ return [physical, ...parts.slice(1)].join(", ");
299501
+ }
299368
299502
  resolvePrimaryPhysicalFamily(family$1) {
299369
299503
  const primary = splitStack(family$1)[0] ?? family$1;
299370
299504
  return this.#physicalFor(primary).physical;
@@ -299470,6 +299604,9 @@ menclose::after {
299470
299604
  return s2;
299471
299605
  return "unloaded";
299472
299606
  }
299607
+ hasFace(family$1, weight, style2) {
299608
+ return this.#facesByFamily.get(normalizeFamilyKey$1(family$1))?.has(faceKeyOf$1(family$1, weight, style2)) ?? false;
299609
+ }
299473
299610
  isAvailable(family$1) {
299474
299611
  if (!this.#fontSet)
299475
299612
  return false;
@@ -299962,7 +300099,7 @@ menclose::after {
299962
300099
  if (typeof value !== "number" || !Number.isFinite(value) || value < 0)
299963
300100
  return;
299964
300101
  return value;
299965
- }, resolvePainterMarkerTextWidth = (markerTextWidthPx, marker) => getFiniteNonNegativeNumber(markerTextWidthPx) ?? getFiniteNonNegativeNumber(marker.glyphWidthPx) ?? getFiniteNonNegativeNumber(marker.markerBoxWidthPx) ?? 0, resolvePainterListMarkerGeometry = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListMarkerGeometry(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), resolvePainterListTextStartPx = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListTextStartPx(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), isMarkerSuffix = (suffix) => suffix === "tab" || suffix === "space" || suffix === "nothing", createListMarkerElement = (doc$12, markerText, run2, sourceAnchor, resolvePhysical = resolvePhysicalFamily) => {
300102
+ }, resolvePainterMarkerTextWidth = (markerTextWidthPx, marker) => getFiniteNonNegativeNumber(markerTextWidthPx) ?? getFiniteNonNegativeNumber(marker.glyphWidthPx) ?? getFiniteNonNegativeNumber(marker.markerBoxWidthPx) ?? 0, resolvePainterListMarkerGeometry = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListMarkerGeometry(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), resolvePainterListTextStartPx = ({ wordLayout, indentLeftPx, hangingIndentPx, firstLineIndentPx, markerTextWidthPx }) => resolveListTextStartPx(wordLayout, indentLeftPx, firstLineIndentPx, hangingIndentPx, (_markerText, marker) => resolvePainterMarkerTextWidth(markerTextWidthPx, marker)), isMarkerSuffix = (suffix) => suffix === "tab" || suffix === "space" || suffix === "nothing", createListMarkerElement = (doc$12, markerText, run2, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css)) => {
299966
300103
  const markerContainer = doc$12.createElement("span");
299967
300104
  markerContainer.classList.add(DOM_CLASS_NAMES.LIST_MARKER);
299968
300105
  markerContainer.style.display = "inline-block";
@@ -299972,7 +300109,10 @@ menclose::after {
299972
300109
  markerEl.textContent = markerText;
299973
300110
  markerEl.style.pointerEvents = "none";
299974
300111
  const cssFontFamily = toCssFontFamily(run2.fontFamily) ?? run2.fontFamily ?? "";
299975
- markerEl.style.fontFamily = resolvePhysical(cssFontFamily);
300112
+ markerEl.style.fontFamily = resolvePhysical(cssFontFamily, {
300113
+ weight: run2.bold ? "700" : "400",
300114
+ style: run2.italic ? "italic" : "normal"
300115
+ });
299976
300116
  if (run2.fontSize != null)
299977
300117
  markerEl.style.fontSize = `${run2.fontSize}px`;
299978
300118
  markerEl.style.fontWeight = run2.bold ? "bold" : "";
@@ -299990,7 +300130,7 @@ menclose::after {
299990
300130
  applySourceAnchorDataset(markerEl, sourceAnchor);
299991
300131
  return markerContainer;
299992
300132
  }, renderLegacyListMarker = (params$1) => {
299993
- const { doc: doc$12, lineEl, wordLayout, markerLayout, markerMeasure, markerTextWidthPx, indentLeftPx, hangingIndentPx, firstLineIndentPx, isRtl, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
300133
+ const { doc: doc$12, lineEl, wordLayout, markerLayout, markerMeasure, markerTextWidthPx, indentLeftPx, hangingIndentPx, firstLineIndentPx, isRtl, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
299994
300134
  const markerTextWidth = markerTextWidthPx ?? markerMeasure?.markerTextWidth ?? 0;
299995
300135
  const markerGeometry = markerLayout?.justification === "left" && wordLayout?.firstLineIndentMode !== true && typeof markerTextWidth === "number" && Number.isFinite(markerTextWidth) && markerTextWidth >= 0 ? resolvePainterListMarkerGeometry({
299996
300136
  wordLayout,
@@ -300048,7 +300188,7 @@ menclose::after {
300048
300188
  prependMarkerSuffix(doc$12, lineEl, isMarkerSuffix(suffix) ? suffix : undefined, suffixWidthPx, markerLayout?.run?.fontSize);
300049
300189
  lineEl.prepend(markerContainer);
300050
300190
  }, renderResolvedListMarker = (params$1) => {
300051
- const { doc: doc$12, lineEl, marker, isRtl, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
300191
+ const { doc: doc$12, lineEl, marker, isRtl, sourceAnchor, resolvePhysical } = params$1;
300052
300192
  if (isRtl)
300053
300193
  lineEl.style.paddingRight = `${marker.firstLinePaddingLeftPx}px`;
300054
300194
  else
@@ -300323,7 +300463,7 @@ menclose::after {
300323
300463
  skipJustifyOverride: (resolvedLine?.skipJustify ?? false) || hasMultipleExplicitPositionedSegments
300324
300464
  }) ? Math.max(lineWidth, availableWidth) : lineWidth;
300325
300465
  }, renderResolvedLines = (params$1) => {
300326
- const { frameEl, block, resolvedContent: content3, markerTextWidth, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
300466
+ const { frameEl, block, resolvedContent: content3, markerTextWidth, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
300327
300467
  const renderedLines = [];
300328
300468
  const resolvedMarker = content3.marker;
300329
300469
  const expandedRunsForBlock = expandRunsForInlineNewlines(block.runs);
@@ -300377,7 +300517,7 @@ menclose::after {
300377
300517
  renderedLines
300378
300518
  };
300379
300519
  }, renderMeasuredLines = (params$1) => {
300380
- const { doc: doc$12, frameEl, block, measure, containerKind, width, localStartLine, localEndLine, linesOverride, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, markerWidth, markerTextWidth, wordLayout, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = resolvePhysicalFamily } = params$1;
300520
+ const { doc: doc$12, frameEl, block, measure, containerKind, width, localStartLine, localEndLine, linesOverride, lineIndexOffset = 0, continuesFromPrev, continuesOnNext, markerWidth, markerTextWidth, wordLayout, renderLine: renderLine$1, captureLineSnapshot, convertFinalParagraphMark, lineTopOffset = 0, sourceAnchor, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
300381
300521
  const lines = linesOverride ?? measure.lines ?? [];
300382
300522
  const paraIndent = block.attrs?.indent;
300383
300523
  const paraIndentLeft = paraIndent?.left ?? 0;
@@ -301648,7 +301788,7 @@ menclose::after {
301648
301788
  else
301649
301789
  delete el.dataset.continuesOnNext;
301650
301790
  }, isMinimalWordLayout$2 = (value) => isMinimalWordLayout(value), renderParagraphFragment = (params$1) => {
301651
- const { doc: doc$12, fragment, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome, resolvePhysical = resolvePhysicalFamily } = params$1;
301791
+ const { doc: doc$12, fragment, sdtBoundary, betweenInfo, resolvedItem, applyStyles: applyStyles$3, applyResolvedFragmentFrame, applyFragmentFrame, applySdtDataset: applySdtDataset$1, applyContainerSdtDataset: applyContainerSdtDataset$1, renderLine: renderLine$1, captureLineSnapshot, createErrorPlaceholder, contentControlsChrome, resolvePhysical = (css) => resolvePhysicalFamily(css) } = params$1;
301652
301792
  try {
301653
301793
  if (!doc$12)
301654
301794
  throw new Error("DomPainter: document is not available");
@@ -301727,12 +301867,15 @@ menclose::after {
301727
301867
  });
301728
301868
  return createErrorPlaceholder(fragment.blockId, error48);
301729
301869
  }
301730
- }, renderDropCap = (doc$12, descriptor, measure, resolvePhysical = resolvePhysicalFamily) => {
301870
+ }, renderDropCap = (doc$12, descriptor, measure, resolvePhysical = (css) => resolvePhysicalFamily(css)) => {
301731
301871
  const { run: run2, mode } = descriptor;
301732
301872
  const dropCapEl = doc$12.createElement("span");
301733
301873
  dropCapEl.classList.add("superdoc-drop-cap");
301734
301874
  dropCapEl.textContent = run2.text;
301735
- dropCapEl.style.fontFamily = resolvePhysical(run2.fontFamily);
301875
+ dropCapEl.style.fontFamily = resolvePhysical(run2.fontFamily, {
301876
+ weight: run2.bold ? "700" : "400",
301877
+ style: run2.italic ? "italic" : "normal"
301878
+ });
301736
301879
  dropCapEl.style.fontSize = `${run2.fontSize}px`;
301737
301880
  if (run2.bold)
301738
301881
  dropCapEl.style.fontWeight = "bold";
@@ -301848,7 +301991,10 @@ menclose::after {
301848
301991
  }, applyRunStyles = (element3, run2, _isLink = false, resolvePhysical = resolvePhysicalFamily) => {
301849
301992
  if (run2.kind === "tab" || run2.kind === "image" || run2.kind === "lineBreak" || run2.kind === "break" || run2.kind === "fieldAnnotation" || run2.kind === "math")
301850
301993
  return;
301851
- element3.style.fontFamily = resolvePhysical(run2.fontFamily);
301994
+ element3.style.fontFamily = resolvePhysical(run2.fontFamily, {
301995
+ weight: run2.bold ? "700" : "400",
301996
+ style: run2.italic ? "italic" : "normal"
301997
+ });
301852
301998
  element3.style.fontSize = `${run2.fontSize}px`;
301853
301999
  if (run2.bold)
301854
302000
  element3.style.fontWeight = "bold";
@@ -302031,7 +302177,10 @@ menclose::after {
302031
302177
  }
302032
302178
  {
302033
302179
  const resolvePhysical = context.resolvePhysical ?? resolvePhysicalFamily;
302034
- annotation.style.fontFamily = resolvePhysical(run2.fontFamily || "Arial, sans-serif");
302180
+ annotation.style.fontFamily = resolvePhysical(run2.fontFamily || "Arial, sans-serif", {
302181
+ weight: run2.bold ? "700" : "400",
302182
+ style: run2.italic ? "italic" : "normal"
302183
+ });
302035
302184
  }
302036
302185
  {
302037
302186
  const fontSize = run2.fontSize ? typeof run2.fontSize === "number" ? `${run2.fontSize}pt` : run2.fontSize : BROWSER_DEFAULT_FONT_SIZE;
@@ -313963,11 +314112,11 @@ menclose::after {
313963
314112
  #resolveResult(result, storyId) {
313964
314113
  return resolveResult(result, storyId, this.#options.getFontSignature?.() ?? "");
313965
314114
  }
313966
- async layoutPerRId(headerFooterInput, layout, sectionMetadata, fontResolver) {
314115
+ async layoutPerRId(headerFooterInput, layout, sectionMetadata, fontResolver, hasFace, effectiveSignature) {
313967
314116
  await layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata, {
313968
314117
  headerLayoutsByRId: this.#headerLayoutsByRId,
313969
314118
  footerLayoutsByRId: this.#footerLayoutsByRId
313970
- }, fontResolver);
314119
+ }, fontResolver, hasFace, effectiveSignature);
313971
314120
  this.#resolvedHeaderByRId.clear();
313972
314121
  for (const [key2, result] of this.#headerLayoutsByRId)
313973
314122
  this.#resolvedHeaderByRId.set(key2, this.#resolveResult(result, storyIdFromHeaderFooterLayoutKey(key2)));
@@ -314825,6 +314974,7 @@ menclose::after {
314825
314974
  }, FontReadinessGate = class {
314826
314975
  #getDocumentFonts;
314827
314976
  #getRequiredFaces;
314977
+ #getUsedFaces;
314828
314978
  #resolveFamilies;
314829
314979
  #fontResolver;
314830
314980
  #requestReflow;
@@ -314834,6 +314984,7 @@ menclose::after {
314834
314984
  #timeoutMs;
314835
314985
  #invalidateCaches;
314836
314986
  #context = null;
314987
+ #packInstalledFor = null;
314837
314988
  #fontConfigVersion = 0;
314838
314989
  #requiredSignature = "";
314839
314990
  #requiredFamilies = /* @__PURE__ */ new Set;
@@ -314846,6 +314997,7 @@ menclose::after {
314846
314997
  constructor(options) {
314847
314998
  this.#getDocumentFonts = options.getDocumentFonts;
314848
314999
  this.#getRequiredFaces = options.getRequiredFaces ?? null;
315000
+ this.#getUsedFaces = options.getUsedFaces ?? null;
314849
315001
  this.#fontResolver = options.fontResolver ?? null;
314850
315002
  const resolver2 = this.#fontResolver;
314851
315003
  this.#resolveFamilies = options.resolveFamilies ?? (resolver2 ? (families) => resolver2.resolvePhysicalFamilies(families) : (families) => families);
@@ -314870,13 +315022,19 @@ menclose::after {
314870
315022
  return this.#lastSummary;
314871
315023
  }
314872
315024
  getReport() {
314873
- let logical = [];
315025
+ let declared = [];
314874
315026
  try {
314875
- logical = this.#getDocumentFonts();
315027
+ declared = this.#getDocumentFonts();
314876
315028
  } catch {
314877
315029
  return [];
314878
315030
  }
314879
- return buildFontReport(logical, this.#resolveContext().registry, this.#fontResolver ?? undefined);
315031
+ const registry3 = this.#resolveContext().registry;
315032
+ const resolver2 = this.#fontResolver ?? undefined;
315033
+ const usedFaces = this.#getUsedFaces?.() ?? [];
315034
+ const faceRows = buildFaceReport(usedFaces, registry3, resolver2);
315035
+ const usedFamilies = new Set(usedFaces.map((u) => u.logicalFamily.toLowerCase()));
315036
+ const declaredRows = buildFontReport(declared.filter((family$1) => family$1 && !usedFamilies.has(family$1.toLowerCase())), registry3, resolver2);
315037
+ return [...faceRows, ...declaredRows];
314880
315038
  }
314881
315039
  async ensureReadyForMeasure() {
314882
315040
  if (this.#getRequiredFaces)
@@ -314986,10 +315144,12 @@ menclose::after {
314986
315144
  fontSet,
314987
315145
  registry: registry3
314988
315146
  };
314989
- if (fontSet && this.#onRegistryResolved)
315147
+ if (this.#onRegistryResolved && registry3 !== this.#packInstalledFor) {
315148
+ this.#packInstalledFor = registry3;
314990
315149
  try {
314991
315150
  this.#onRegistryResolved(registry3);
314992
315151
  } catch {}
315152
+ }
314993
315153
  return this.#context;
314994
315154
  }
314995
315155
  #ensureSubscribed() {
@@ -315247,7 +315407,7 @@ menclose::after {
315247
315407
  return;
315248
315408
  console.log(...args$1);
315249
315409
  }, 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;
315250
- var init_src_B1aSE_tB_es = __esm(() => {
315410
+ var init_src_DvgAvHbj_es = __esm(() => {
315251
315411
  init_rolldown_runtime_Bg48TavK_es();
315252
315412
  init_SuperConverter_B9mZiCO9_es();
315253
315413
  init_jszip_C49i9kUs_es();
@@ -342137,7 +342297,7 @@ function print() { __p += __j.call(arguments, '') }
342137
342297
  });
342138
342298
  defaultResolver = new FontResolver;
342139
342299
  DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
342140
- resolvePhysical: resolvePhysicalFamily,
342300
+ resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
342141
342301
  fontSignature: ""
342142
342302
  });
342143
342303
  BUNDLED_MANIFEST = Object.freeze([
@@ -343421,7 +343581,10 @@ function print() { __p += __j.call(arguments, '') }
343421
343581
  }
343422
343582
  });
343423
343583
  #fontPlanBlocks = null;
343584
+ #fontPlan = null;
343585
+ #hasFace = (family$1, weight, style2) => this.#fontGate ? this.#fontGate.resolveRegistry().hasFace(family$1, weight, style2) : false;
343424
343586
  #lastFontsChangedKey = null;
343587
+ #lastFontsChangedVersion = -1;
343425
343588
  #lastFontsChangedPayload = null;
343426
343589
  #shouldScrollSelectionIntoView = false;
343427
343590
  #suppressSelectionScrollUntilRaf = false;
@@ -343652,7 +343815,7 @@ function print() { __p += __j.call(arguments, '') }
343652
343815
  initBudgetMs: HEADER_FOOTER_INIT_BUDGET_MS,
343653
343816
  defaultPageSize: DEFAULT_PAGE_SIZE,
343654
343817
  defaultMargins: DEFAULT_MARGINS,
343655
- getFontSignature: () => this.#fontResolver.signature
343818
+ getFontSignature: () => this.#layoutFontSignature
343656
343819
  });
343657
343820
  this.#headerFooterSession.setHoverElements({
343658
343821
  hoverOverlay: this.#hoverOverlay,
@@ -343707,7 +343870,8 @@ function print() { __p += __j.call(arguments, '') }
343707
343870
  return this.#editor.converter?.getDocumentFonts?.() ?? [];
343708
343871
  },
343709
343872
  requestReflow: () => this.#requestFontReflow(),
343710
- getRequiredFaces: () => planRequiredFontFaces(this.#fontPlanBlocks, this.#fontResolver),
343873
+ getRequiredFaces: () => this.#fontPlan?.requiredFaces ?? [],
343874
+ getUsedFaces: () => this.#fontPlan?.usedFaces ?? [],
343711
343875
  fontResolver: this.#fontResolver,
343712
343876
  onRegistryResolved: (registry3) => installBundledSubstitutes(registry3, {
343713
343877
  assetBaseUrl: this.#options.fontAssets?.assetBaseUrl,
@@ -344682,7 +344846,7 @@ function print() { __p += __j.call(arguments, '') }
344682
344846
  return this.#fontGate?.getReport() ?? [];
344683
344847
  }
344684
344848
  getMissingFonts() {
344685
- return this.getFontReport().filter((record3) => record3.missing).map((record3) => record3.logicalFamily);
344849
+ return [...new Set(this.getFontReport().filter((record3) => record3.missing).map((record3) => record3.logicalFamily))];
344686
344850
  }
344687
344851
  mapFonts(mappings) {
344688
344852
  this.#fontController.map(mappings);
@@ -344711,14 +344875,17 @@ function print() { __p += __j.call(arguments, '') }
344711
344875
  if (!gate)
344712
344876
  return;
344713
344877
  const version$1 = gate.fontConfigVersion;
344714
- const key2 = `${version$1}|${summary ? summary.results.map((result) => `${result.family}:${result.status}`).sort().join(",") : ""}`;
344878
+ const statusKey = summary ? summary.results.map((result) => `${result.family}:${result.status}`).sort().join(",") : "";
344879
+ const key2 = `${version$1}|${this.#fontPlan?.effectiveSignature ?? ""}|${statusKey}`;
344715
344880
  if (key2 === this.#lastFontsChangedKey)
344716
344881
  return;
344717
344882
  const isInitial = this.#lastFontsChangedKey === null;
344883
+ const epochBumped = !isInitial && version$1 !== this.#lastFontsChangedVersion;
344718
344884
  this.#lastFontsChangedKey = key2;
344885
+ this.#lastFontsChangedVersion = version$1;
344719
344886
  const pendingSource = this.#nextFontsChangedSource;
344720
344887
  this.#nextFontsChangedSource = null;
344721
- const source = isInitial ? "initial" : pendingSource ?? "late-load";
344888
+ const source = isInitial ? "initial" : pendingSource ?? (epochBumped ? "late-load" : "render-change");
344722
344889
  let resolutions;
344723
344890
  try {
344724
344891
  resolutions = gate.getReport();
@@ -344726,9 +344893,9 @@ function print() { __p += __j.call(arguments, '') }
344726
344893
  return;
344727
344894
  }
344728
344895
  const payload = {
344729
- documentFonts: resolutions.map((record3) => record3.logicalFamily),
344896
+ documentFonts: [...new Set(resolutions.map((record3) => record3.logicalFamily))],
344730
344897
  resolutions,
344731
- missingFonts: resolutions.filter((record3) => record3.missing).map((record3) => record3.logicalFamily),
344898
+ missingFonts: [...new Set(resolutions.filter((record3) => record3.missing).map((record3) => record3.logicalFamily))],
344732
344899
  loadSummary: summary ?? {
344733
344900
  loaded: 0,
344734
344901
  failed: 0,
@@ -344750,7 +344917,10 @@ function print() { __p += __j.call(arguments, '') }
344750
344917
  #resetFontReportStateForDocumentChange() {
344751
344918
  this.#nextFontsChangedSource = null;
344752
344919
  this.#lastFontsChangedKey = null;
344920
+ this.#lastFontsChangedVersion = -1;
344753
344921
  this.#lastFontsChangedPayload = null;
344922
+ this.#fontPlan = null;
344923
+ this.#fontPlanBlocks = null;
344754
344924
  }
344755
344925
  getLayoutOptions() {
344756
344926
  return { ...this.#layoutOptions };
@@ -344900,7 +345070,7 @@ function print() { __p += __j.call(arguments, '') }
344900
345070
  flowMode: this.#layoutOptions.flowMode ?? "paginated",
344901
345071
  blocks: blocks2,
344902
345072
  measures,
344903
- fontSignature: this.#fontResolver.signature
345073
+ fontSignature: this.#layoutFontSignature
344904
345074
  });
344905
345075
  const isSemanticFlow = this.#layoutOptions.flowMode === "semantic";
344906
345076
  this.#ensurePainter();
@@ -347109,10 +347279,10 @@ function print() { __p += __j.call(arguments, '') }
347109
347279
  const previousBlocks = this.#layoutState.blocks;
347110
347280
  const previousLayout = this.#layoutState.layout;
347111
347281
  const previousMeasures = this.#layoutState.measures;
347112
- const resolvePhysical = (css) => this.#fontResolver.resolvePhysicalFamily(css);
347113
- const fontSignature = this.#fontResolver.signature;
347282
+ const resolvePhysical = (css, face) => this.#fontResolver.resolvePhysicalFamilyForFace(css, face, this.#hasFace);
347283
+ let fontSignature = "";
347114
347284
  const previousFontSignature = this.#layoutFontSignature;
347115
- const fontMeasureContext = {
347285
+ let fontMeasureContext = {
347116
347286
  resolvePhysical,
347117
347287
  fontSignature
347118
347288
  };
@@ -347134,6 +347304,12 @@ function print() { __p += __j.call(arguments, '') }
347134
347304
  ...headerFooterInput ? this.#collectHeaderFooterFaceBlocks(headerFooterInput) : [],
347135
347305
  ...!isSemanticFlow && footnotesLayoutInput?.blocksById ? [...footnotesLayoutInput.blocksById.values()].flat() : []
347136
347306
  ];
347307
+ this.#fontPlan = planFontFaces(this.#fontPlanBlocks, this.#fontResolver, this.#hasFace);
347308
+ fontSignature = this.#fontPlan.effectiveSignature;
347309
+ fontMeasureContext = {
347310
+ resolvePhysical,
347311
+ fontSignature
347312
+ };
347137
347313
  const fontSummary = await this.#fontGate?.ensureReadyForMeasure() ?? null;
347138
347314
  this.#emitFontsChangedIfChanged(fontSummary);
347139
347315
  } catch {}
@@ -347293,7 +347469,7 @@ function print() { __p += __j.call(arguments, '') }
347293
347469
  pageGap: this.#layoutState.layout?.pageGap ?? effectiveGap,
347294
347470
  showFormattingMarks: this.#layoutOptions.showFormattingMarks ?? false,
347295
347471
  contentControlsChrome: this.#layoutOptions.contentControlsChrome ?? "default",
347296
- resolvePhysical: (css) => this.#fontResolver.resolvePhysicalFamily(css)
347472
+ resolvePhysical: (css, face) => this.#fontResolver.resolvePhysicalFamilyForFace(css, face, this.#hasFace)
347297
347473
  });
347298
347474
  const currentZoom = this.#layoutOptions.zoom ?? 1;
347299
347475
  if (currentZoom !== 1)
@@ -348045,7 +348221,7 @@ function print() { __p += __j.call(arguments, '') }
348045
348221
  }
348046
348222
  async#layoutPerRIdHeaderFooters(headerFooterInput, layout, sectionMetadata) {
348047
348223
  if (this.#headerFooterSession)
348048
- await this.#headerFooterSession.layoutPerRId(headerFooterInput, layout, sectionMetadata, this.#fontResolver);
348224
+ await this.#headerFooterSession.layoutPerRId(headerFooterInput, layout, sectionMetadata, this.#fontResolver, this.#hasFace, this.#fontPlan?.effectiveSignature ?? "");
348049
348225
  }
348050
348226
  #updateDecorationProviders(resolvedLayout) {
348051
348227
  this.#headerFooterSession?.updateDecorationProviders(resolvedLayout);
@@ -349992,7 +350168,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
349992
350168
 
349993
350169
  // ../../packages/superdoc/dist/super-editor.es.js
349994
350170
  var init_super_editor_es = __esm(() => {
349995
- init_src_B1aSE_tB_es();
350171
+ init_src_DvgAvHbj_es();
349996
350172
  init_SuperConverter_B9mZiCO9_es();
349997
350173
  init_jszip_C49i9kUs_es();
349998
350174
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/mcp",
3
- "version": "0.11.0-next.4",
3
+ "version": "0.11.0-next.5",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"