@superdoc-dev/mcp 0.12.0-next.1 → 0.12.0-next.3
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.
- package/dist/index.js +97 -33
- 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-
|
|
52175
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CfRQprW6.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")
|
|
@@ -86315,13 +86315,16 @@ function isSettled(status) {
|
|
|
86315
86315
|
function normalizeFamilyName(name) {
|
|
86316
86316
|
return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
|
|
86317
86317
|
}
|
|
86318
|
-
function buildFallback(row, physicalFamily) {
|
|
86318
|
+
function buildFallback(row, physicalFamily, verdict, faceSlot) {
|
|
86319
|
+
const glyphExceptions = faceSlot ? row.glyphExceptions?.filter((g) => g.slot === faceSlot) : row.glyphExceptions ? [...row.glyphExceptions] : undefined;
|
|
86319
86320
|
return {
|
|
86320
86321
|
substituteFamily: physicalFamily,
|
|
86321
86322
|
policyAction: row.policyAction,
|
|
86322
|
-
verdict
|
|
86323
|
-
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(
|
|
86324
|
-
|
|
86323
|
+
verdict,
|
|
86324
|
+
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS.has(verdict),
|
|
86325
|
+
faces: row.faces,
|
|
86326
|
+
evidenceId: row.evidenceId,
|
|
86327
|
+
...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
|
|
86325
86328
|
};
|
|
86326
86329
|
}
|
|
86327
86330
|
function decideRow(row, canRenderFamily$1) {
|
|
@@ -86350,7 +86353,27 @@ function decideRow(row, canRenderFamily$1) {
|
|
|
86350
86353
|
};
|
|
86351
86354
|
return {
|
|
86352
86355
|
kind: "fallback",
|
|
86353
|
-
fallback: buildFallback(row, physicalFamily)
|
|
86356
|
+
fallback: buildFallback(row, physicalFamily, verdict)
|
|
86357
|
+
};
|
|
86358
|
+
}
|
|
86359
|
+
function isFaceScoped(row) {
|
|
86360
|
+
const f2 = row.faces;
|
|
86361
|
+
return f2.regular || f2.bold || f2.italic || f2.boldItalic;
|
|
86362
|
+
}
|
|
86363
|
+
function decideRowForFace(row, face, canRenderFamily$1) {
|
|
86364
|
+
const base$1 = decideRow(row, canRenderFamily$1);
|
|
86365
|
+
if (base$1.kind !== "fallback")
|
|
86366
|
+
return base$1;
|
|
86367
|
+
if (isFaceScoped(row) && !row.faces[face])
|
|
86368
|
+
return {
|
|
86369
|
+
kind: "face_missing",
|
|
86370
|
+
substituteFamily: base$1.fallback.substituteFamily,
|
|
86371
|
+
evidenceId: row.evidenceId
|
|
86372
|
+
};
|
|
86373
|
+
const faceVerdict = row.faceVerdicts?.[face] ?? row.verdict;
|
|
86374
|
+
return {
|
|
86375
|
+
kind: "fallback",
|
|
86376
|
+
fallback: buildFallback(row, base$1.fallback.substituteFamily, faceVerdict, face)
|
|
86354
86377
|
};
|
|
86355
86378
|
}
|
|
86356
86379
|
function getFallbackDecision(family$1, options = {}) {
|
|
@@ -86361,6 +86384,14 @@ function getRenderableFallback(family$1, options) {
|
|
|
86361
86384
|
const decision = getFallbackDecision(family$1, options);
|
|
86362
86385
|
return decision.kind === "fallback" ? decision.fallback : null;
|
|
86363
86386
|
}
|
|
86387
|
+
function getFallbackDecisionForFace(family$1, face, options = {}) {
|
|
86388
|
+
const row = BY_LOGICAL.get(normalizeFamilyName(family$1));
|
|
86389
|
+
return row ? decideRowForFace(row, face, options.canRenderFamily) : { kind: "unknown" };
|
|
86390
|
+
}
|
|
86391
|
+
function getRenderableFallbackForFace(family$1, face, options) {
|
|
86392
|
+
const decision = getFallbackDecisionForFace(family$1, face, options);
|
|
86393
|
+
return decision.kind === "fallback" ? decision.fallback : null;
|
|
86394
|
+
}
|
|
86364
86395
|
function fourFaces(filePrefix) {
|
|
86365
86396
|
return [
|
|
86366
86397
|
{
|
|
@@ -86491,6 +86522,17 @@ function installBundledSubstitutes(registry2, options = {}) {
|
|
|
86491
86522
|
});
|
|
86492
86523
|
}
|
|
86493
86524
|
}
|
|
86525
|
+
function toEvidence(fallback) {
|
|
86526
|
+
if (!fallback)
|
|
86527
|
+
return;
|
|
86528
|
+
return {
|
|
86529
|
+
evidenceId: fallback.evidenceId,
|
|
86530
|
+
policyAction: fallback.policyAction,
|
|
86531
|
+
verdict: fallback.verdict,
|
|
86532
|
+
lineBreakSafe: fallback.lineBreakSafe,
|
|
86533
|
+
...fallback.glyphExceptions ? { glyphExceptions: fallback.glyphExceptions } : {}
|
|
86534
|
+
};
|
|
86535
|
+
}
|
|
86494
86536
|
function buildFontReport(logicalFamilies, registry2, resolver$1) {
|
|
86495
86537
|
const seen = /* @__PURE__ */ new Set;
|
|
86496
86538
|
const report = [];
|
|
@@ -86500,13 +86542,15 @@ function buildFontReport(logicalFamilies, registry2, resolver$1) {
|
|
|
86500
86542
|
seen.add(logical);
|
|
86501
86543
|
const { physicalFamily, reason } = resolver$1 ? resolver$1.resolveFontFamily(logical) : resolveFontFamily(logical);
|
|
86502
86544
|
const loadStatus = registry2.getStatus(physicalFamily);
|
|
86545
|
+
const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallback(logical, RENDER_ALL)) : undefined;
|
|
86503
86546
|
report.push({
|
|
86504
86547
|
logicalFamily: logical,
|
|
86505
86548
|
physicalFamily,
|
|
86506
86549
|
reason,
|
|
86507
86550
|
loadStatus,
|
|
86508
86551
|
exportFamily: logical,
|
|
86509
|
-
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
|
|
86552
|
+
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded",
|
|
86553
|
+
...evidence ? { evidence } : {}
|
|
86510
86554
|
});
|
|
86511
86555
|
}
|
|
86512
86556
|
return report;
|
|
@@ -86533,6 +86577,7 @@ function buildFaceReport(usedFaces, registry2, resolver$1) {
|
|
|
86533
86577
|
style
|
|
86534
86578
|
});
|
|
86535
86579
|
const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
86580
|
+
const evidence = isRenderedSubstitute(reason) ? toEvidence(getRenderableFallbackForFace(logicalFamily, faceSlotFor(face), RENDER_ALL)) : undefined;
|
|
86536
86581
|
report.push({
|
|
86537
86582
|
logicalFamily,
|
|
86538
86583
|
physicalFamily: reason === "registered_face" ? logicalFamily : physicalFamily,
|
|
@@ -86540,7 +86585,8 @@ function buildFaceReport(usedFaces, registry2, resolver$1) {
|
|
|
86540
86585
|
loadStatus,
|
|
86541
86586
|
exportFamily: logicalFamily,
|
|
86542
86587
|
missing,
|
|
86543
|
-
face
|
|
86588
|
+
face,
|
|
86589
|
+
...evidence ? { evidence } : {}
|
|
86544
86590
|
});
|
|
86545
86591
|
}
|
|
86546
86592
|
return report;
|
|
@@ -113632,7 +113678,17 @@ var isRegExp = (value) => {
|
|
|
113632
113678
|
out.add(this.resolvePrimaryPhysicalFamily(family$1));
|
|
113633
113679
|
return [...out];
|
|
113634
113680
|
}
|
|
113635
|
-
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries,
|
|
113681
|
+
}, defaultResolver, DEFAULT_FONT_MEASURE_CONTEXT, fontConfigVersion = 0, defaultAssetBase = "/fonts/", installedRegistries, faceSlotFor = ({ weight, style }) => {
|
|
113682
|
+
const bold = weight === "700";
|
|
113683
|
+
const italic = style === "italic";
|
|
113684
|
+
if (bold && italic)
|
|
113685
|
+
return "boldItalic";
|
|
113686
|
+
if (bold)
|
|
113687
|
+
return "bold";
|
|
113688
|
+
if (italic)
|
|
113689
|
+
return "italic";
|
|
113690
|
+
return "regular";
|
|
113691
|
+
}, isRenderedSubstitute = (reason) => reason === "bundled_substitute" || reason === "category_fallback", RENDER_ALL, FS_TYPE_RESTRICTED = 2, FS_SELECTION_ITALIC = 1, BOLD_WEIGHT_THRESHOLD = 600, SFNT_TABLE_DIR_OFFSET = 12, SFNT_TABLE_RECORD_SIZE = 16, OS2_USWEIGHTCLASS = 4, OS2_FSTYPE = 8, OS2_FSSELECTION = 62, OS2_MIN_LENGTH, DEFAULT_FONT_LOAD_TIMEOUT_MS = 3000, DEFAULT_PROBE_SIZE = "16px", FontRegistry = class {
|
|
113636
113692
|
#fontSet;
|
|
113637
113693
|
#FontFaceCtor;
|
|
113638
113694
|
#probeSize;
|
|
@@ -117949,7 +118005,7 @@ var isRegExp = (value) => {
|
|
|
117949
118005
|
state.kern = kernNode.attributes["w:val"];
|
|
117950
118006
|
}
|
|
117951
118007
|
}, SuperConverter;
|
|
117952
|
-
var
|
|
118008
|
+
var init_SuperConverter_CfRQprW6_es = __esm(() => {
|
|
117953
118009
|
init_rolldown_runtime_Bg48TavK_es();
|
|
117954
118010
|
init_jszip_C49i9kUs_es();
|
|
117955
118011
|
init_xml_js_CqGKpaft_es();
|
|
@@ -155892,6 +155948,7 @@ var init_SuperConverter_C6RGktKO_es = __esm(() => {
|
|
|
155892
155948
|
fontSignature: ""
|
|
155893
155949
|
});
|
|
155894
155950
|
installedRegistries = /* @__PURE__ */ new WeakMap;
|
|
155951
|
+
RENDER_ALL = { canRenderFamily: () => true };
|
|
155895
155952
|
OS2_MIN_LENGTH = OS2_FSSELECTION + 2;
|
|
155896
155953
|
registriesByFontSet = /* @__PURE__ */ new WeakMap;
|
|
155897
155954
|
PHYSICAL_GENERIC = Object.freeze({
|
|
@@ -157696,7 +157753,7 @@ var init_SuperConverter_C6RGktKO_es = __esm(() => {
|
|
|
157696
157753
|
};
|
|
157697
157754
|
});
|
|
157698
157755
|
|
|
157699
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
157756
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-DOEFHsWP.es.js
|
|
157700
157757
|
function parseSizeUnit(val = "0") {
|
|
157701
157758
|
const length = val.toString() || "0";
|
|
157702
157759
|
const value = Number.parseFloat(length);
|
|
@@ -168054,8 +168111,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
168054
168111
|
}
|
|
168055
168112
|
};
|
|
168056
168113
|
};
|
|
168057
|
-
var
|
|
168058
|
-
|
|
168114
|
+
var init_create_headless_toolbar_DOEFHsWP_es = __esm(() => {
|
|
168115
|
+
init_SuperConverter_CfRQprW6_es();
|
|
168059
168116
|
init_uuid_B2wVPhPi_es();
|
|
168060
168117
|
init_constants_D9qj59G2_es();
|
|
168061
168118
|
init_dist_B8HfvhaK_es();
|
|
@@ -222739,7 +222796,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
222739
222796
|
init_remark_gfm_BhnWr3yf_es();
|
|
222740
222797
|
});
|
|
222741
222798
|
|
|
222742
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
222799
|
+
// ../../packages/superdoc/dist/chunks/src-CDxARMZD.es.js
|
|
222743
222800
|
function deleteProps(obj, propOrProps) {
|
|
222744
222801
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
222745
222802
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -319937,13 +319994,13 @@ menclose::after {
|
|
|
319937
319994
|
return;
|
|
319938
319995
|
console.log(...args$1);
|
|
319939
319996
|
}, 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;
|
|
319940
|
-
var
|
|
319997
|
+
var init_src_CDxARMZD_es = __esm(() => {
|
|
319941
319998
|
init_rolldown_runtime_Bg48TavK_es();
|
|
319942
|
-
|
|
319999
|
+
init_SuperConverter_CfRQprW6_es();
|
|
319943
320000
|
init_jszip_C49i9kUs_es();
|
|
319944
320001
|
init_xml_js_CqGKpaft_es();
|
|
319945
320002
|
init_uuid_B2wVPhPi_es();
|
|
319946
|
-
|
|
320003
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
319947
320004
|
init_constants_D9qj59G2_es();
|
|
319948
320005
|
init_dist_B8HfvhaK_es();
|
|
319949
320006
|
init_unified_Dsuw2be5_es();
|
|
@@ -346320,6 +346377,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
346320
346377
|
editor: this
|
|
346321
346378
|
});
|
|
346322
346379
|
console.error(err);
|
|
346380
|
+
throw err;
|
|
346323
346381
|
}
|
|
346324
346382
|
}
|
|
346325
346383
|
#endCollaboration() {
|
|
@@ -354847,11 +354905,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
354847
354905
|
]);
|
|
354848
354906
|
});
|
|
354849
354907
|
|
|
354850
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
354908
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-CanMzNxA.es.js
|
|
354851
354909
|
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;
|
|
354852
|
-
var
|
|
354853
|
-
|
|
354854
|
-
|
|
354910
|
+
var init_create_super_doc_ui_CanMzNxA_es = __esm(() => {
|
|
354911
|
+
init_SuperConverter_CfRQprW6_es();
|
|
354912
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
354855
354913
|
headlessToolbarConstants = {
|
|
354856
354914
|
DEFAULT_TEXT_ALIGN_OPTIONS: [
|
|
354857
354915
|
{
|
|
@@ -355133,16 +355191,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
355133
355191
|
|
|
355134
355192
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
355135
355193
|
var init_super_editor_es = __esm(() => {
|
|
355136
|
-
|
|
355137
|
-
|
|
355194
|
+
init_src_CDxARMZD_es();
|
|
355195
|
+
init_SuperConverter_CfRQprW6_es();
|
|
355138
355196
|
init_jszip_C49i9kUs_es();
|
|
355139
355197
|
init_xml_js_CqGKpaft_es();
|
|
355140
|
-
|
|
355198
|
+
init_create_headless_toolbar_DOEFHsWP_es();
|
|
355141
355199
|
init_constants_D9qj59G2_es();
|
|
355142
355200
|
init_dist_B8HfvhaK_es();
|
|
355143
355201
|
init_unified_Dsuw2be5_es();
|
|
355144
355202
|
init_DocxZipper_FUsfThjV_es();
|
|
355145
|
-
|
|
355203
|
+
init_create_super_doc_ui_CanMzNxA_es();
|
|
355146
355204
|
init_ui_C5PAS9hY_es();
|
|
355147
355205
|
init_eventemitter3_BnGqBE_Q_es();
|
|
355148
355206
|
init_errors_CNaD6vcg_es();
|
|
@@ -456352,7 +456410,7 @@ var init_exporter = __esm(() => {
|
|
|
456352
456410
|
// ../../shared/font-system/src/types.ts
|
|
456353
456411
|
var init_types8 = () => {};
|
|
456354
456412
|
|
|
456355
|
-
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.
|
|
456413
|
+
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/data.js
|
|
456356
456414
|
var SUBSTITUTION_EVIDENCE2;
|
|
456357
456415
|
var init_data = __esm(() => {
|
|
456358
456416
|
SUBSTITUTION_EVIDENCE2 = [
|
|
@@ -457006,17 +457064,20 @@ var init_data = __esm(() => {
|
|
|
457006
457064
|
];
|
|
457007
457065
|
});
|
|
457008
457066
|
|
|
457009
|
-
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.
|
|
457067
|
+
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/fallbacks.js
|
|
457010
457068
|
function normalizeFamilyName2(name) {
|
|
457011
457069
|
return name.trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
|
|
457012
457070
|
}
|
|
457013
|
-
function buildFallback2(row2, physicalFamily) {
|
|
457071
|
+
function buildFallback2(row2, physicalFamily, verdict, faceSlot) {
|
|
457072
|
+
const glyphExceptions = faceSlot ? row2.glyphExceptions?.filter((g2) => g2.slot === faceSlot) : row2.glyphExceptions ? [...row2.glyphExceptions] : undefined;
|
|
457014
457073
|
return {
|
|
457015
457074
|
substituteFamily: physicalFamily,
|
|
457016
457075
|
policyAction: row2.policyAction,
|
|
457017
|
-
verdict
|
|
457018
|
-
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(
|
|
457019
|
-
|
|
457076
|
+
verdict,
|
|
457077
|
+
lineBreakSafe: LINE_BREAK_SAFE_VERDICTS2.has(verdict),
|
|
457078
|
+
faces: row2.faces,
|
|
457079
|
+
evidenceId: row2.evidenceId,
|
|
457080
|
+
...glyphExceptions && glyphExceptions.length > 0 ? { glyphExceptions } : {}
|
|
457020
457081
|
};
|
|
457021
457082
|
}
|
|
457022
457083
|
function decideRow2(row2, canRenderFamily2) {
|
|
@@ -457034,7 +457095,10 @@ function decideRow2(row2, canRenderFamily2) {
|
|
|
457034
457095
|
verdict,
|
|
457035
457096
|
evidenceId
|
|
457036
457097
|
};
|
|
457037
|
-
return {
|
|
457098
|
+
return {
|
|
457099
|
+
kind: "fallback",
|
|
457100
|
+
fallback: buildFallback2(row2, physicalFamily, verdict)
|
|
457101
|
+
};
|
|
457038
457102
|
}
|
|
457039
457103
|
function getFallbackDecision2(family2, options = {}) {
|
|
457040
457104
|
const row2 = BY_LOGICAL2.get(normalizeFamilyName2(family2));
|
|
@@ -457058,7 +457122,7 @@ var init_fallbacks = __esm(() => {
|
|
|
457058
457122
|
]));
|
|
457059
457123
|
});
|
|
457060
457124
|
|
|
457061
|
-
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.
|
|
457125
|
+
// ../../node_modules/.pnpm/@docfonts+fallbacks@0.4.0/node_modules/@docfonts/fallbacks/dist/index.js
|
|
457062
457126
|
var init_dist11 = __esm(() => {
|
|
457063
457127
|
init_data();
|
|
457064
457128
|
init_fallbacks();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.12.0-next.
|
|
3
|
+
"version": "0.12.0-next.3",
|
|
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": "
|
|
24
|
-
"
|
|
23
|
+
"@superdoc/super-editor": "0.0.1",
|
|
24
|
+
"superdoc": "1.39.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|