@superdoc-dev/mcp 0.11.0-next.7 → 0.11.0-next.9
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 +443 -49
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -52211,7 +52211,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
52211
52211
|
emptyOptions2 = {};
|
|
52212
52212
|
});
|
|
52213
52213
|
|
|
52214
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
52214
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-DBsJeu9t.es.js
|
|
52215
52215
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
52216
52216
|
const fieldValue = extension$1.config[field];
|
|
52217
52217
|
if (typeof fieldValue === "function")
|
|
@@ -111839,6 +111839,44 @@ var isRegExp = (value) => {
|
|
|
111839
111839
|
...comment,
|
|
111840
111840
|
commentParaId: generateDocxRandomId()
|
|
111841
111841
|
};
|
|
111842
|
+
}, getCommentIds = (comment) => {
|
|
111843
|
+
if (!comment)
|
|
111844
|
+
return [];
|
|
111845
|
+
return [
|
|
111846
|
+
comment.commentId,
|
|
111847
|
+
comment.importedId,
|
|
111848
|
+
comment.internalId
|
|
111849
|
+
].filter((id) => id != null).map((id) => String(id));
|
|
111850
|
+
}, buildCommentLookup = (comments = []) => {
|
|
111851
|
+
const byId = /* @__PURE__ */ new Map;
|
|
111852
|
+
for (const comment of comments)
|
|
111853
|
+
getCommentIds(comment).forEach((id) => byId.set(id, comment));
|
|
111854
|
+
return byId;
|
|
111855
|
+
}, findCommentById = (comments = [], id) => {
|
|
111856
|
+
if (id == null)
|
|
111857
|
+
return null;
|
|
111858
|
+
return buildCommentLookup(comments).get(String(id)) || null;
|
|
111859
|
+
}, isCommentResolvedInThread = (comment, allComments = []) => {
|
|
111860
|
+
const isDone = (c$1) => Boolean(c$1?.resolvedTime || c$1?.isDone);
|
|
111861
|
+
if (isDone(comment))
|
|
111862
|
+
return true;
|
|
111863
|
+
const byId = buildCommentLookup(allComments);
|
|
111864
|
+
const seen = /* @__PURE__ */ new Set;
|
|
111865
|
+
let current = comment;
|
|
111866
|
+
while (current) {
|
|
111867
|
+
const parentId = current.threadingParentCommentId || current.parentCommentId;
|
|
111868
|
+
const parentKey = parentId != null ? String(parentId) : null;
|
|
111869
|
+
if (parentKey == null || seen.has(parentKey))
|
|
111870
|
+
break;
|
|
111871
|
+
seen.add(parentKey);
|
|
111872
|
+
const parent = byId.get(parentKey);
|
|
111873
|
+
if (!parent)
|
|
111874
|
+
break;
|
|
111875
|
+
if (isDone(parent))
|
|
111876
|
+
return true;
|
|
111877
|
+
current = parent;
|
|
111878
|
+
}
|
|
111879
|
+
return false;
|
|
111842
111880
|
}, getCommentDefinition = (comment, commentId, allComments, editor) => {
|
|
111843
111881
|
const translatedParagraphs = (Array.isArray(comment.commentJSON) ? comment.commentJSON : comment.commentJSON ? [comment.commentJSON] : []).map((node2) => translator.decode({
|
|
111844
111882
|
editor,
|
|
@@ -111849,7 +111887,7 @@ var isRegExp = (value) => {
|
|
|
111849
111887
|
"w:author": comment.creatorName || comment.importedAuthor?.name,
|
|
111850
111888
|
"w:date": toIsoNoFractional(comment.createdTime),
|
|
111851
111889
|
"w:initials": getInitials(comment.creatorName),
|
|
111852
|
-
"w:done": comment
|
|
111890
|
+
"w:done": isCommentResolvedInThread(comment, allComments) ? "1" : "0",
|
|
111853
111891
|
"w15:paraId": comment.commentParaId,
|
|
111854
111892
|
"custom:internalId": comment.commentId || comment.internalId,
|
|
111855
111893
|
"custom:trackedChange": comment.trackedChange,
|
|
@@ -111860,7 +111898,7 @@ var isRegExp = (value) => {
|
|
|
111860
111898
|
"custom:email": comment.creatorEmail || comment.importedAuthor?.email
|
|
111861
111899
|
};
|
|
111862
111900
|
if (comment?.parentCommentId) {
|
|
111863
|
-
const parentComment = allComments
|
|
111901
|
+
const parentComment = findCommentById(allComments, comment.parentCommentId);
|
|
111864
111902
|
if (parentComment && !parentComment.trackedChange)
|
|
111865
111903
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
|
111866
111904
|
}
|
|
@@ -111936,7 +111974,7 @@ var isRegExp = (value) => {
|
|
|
111936
111974
|
return null;
|
|
111937
111975
|
const xmlCopy = carbonCopy(commentsExtendedXml);
|
|
111938
111976
|
const commentsEx = comments.map((comment) => {
|
|
111939
|
-
const isResolved = comment
|
|
111977
|
+
const isResolved = isCommentResolvedInThread(comment, comments);
|
|
111940
111978
|
const attributes = {
|
|
111941
111979
|
"w15:paraId": comment.commentParaId,
|
|
111942
111980
|
"w15:done": isResolved ? "1" : "0"
|
|
@@ -111944,7 +111982,7 @@ var isRegExp = (value) => {
|
|
|
111944
111982
|
const parentId = comment.threadingParentCommentId || comment.parentCommentId;
|
|
111945
111983
|
const threadingStyle = resolveThreadingStyle(comment, profile);
|
|
111946
111984
|
if (parentId && (threadingStyle === "commentsExtended" || shouldIncludeForThreads)) {
|
|
111947
|
-
const parentComment = comments
|
|
111985
|
+
const parentComment = findCommentById(comments, parentId);
|
|
111948
111986
|
const allowTrackedParent = profile?.defaultStyle === "commentsExtended";
|
|
111949
111987
|
if (parentComment && (allowTrackedParent || !parentComment.trackedChange))
|
|
111950
111988
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
|
@@ -115551,7 +115589,7 @@ var isRegExp = (value) => {
|
|
|
115551
115589
|
state.kern = kernNode.attributes["w:val"];
|
|
115552
115590
|
}
|
|
115553
115591
|
}, SuperConverter;
|
|
115554
|
-
var
|
|
115592
|
+
var init_SuperConverter_DBsJeu9t_es = __esm(() => {
|
|
115555
115593
|
init_rolldown_runtime_Bg48TavK_es();
|
|
115556
115594
|
init_jszip_C49i9kUs_es();
|
|
115557
115595
|
init_xml_js_CqGKpaft_es();
|
|
@@ -154586,7 +154624,7 @@ var init_SuperConverter_7JlFliK8_es = __esm(() => {
|
|
|
154586
154624
|
};
|
|
154587
154625
|
});
|
|
154588
154626
|
|
|
154589
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
154627
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-BiY_0zZP.es.js
|
|
154590
154628
|
function parseSizeUnit(val = "0") {
|
|
154591
154629
|
const length = val.toString() || "0";
|
|
154592
154630
|
const value = Number.parseFloat(length);
|
|
@@ -164919,8 +164957,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
164919
164957
|
}
|
|
164920
164958
|
};
|
|
164921
164959
|
};
|
|
164922
|
-
var
|
|
164923
|
-
|
|
164960
|
+
var init_create_headless_toolbar_BiY_0zZP_es = __esm(() => {
|
|
164961
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
164924
164962
|
init_uuid_qzgm05fK_es();
|
|
164925
164963
|
init_constants_D9qj59G2_es();
|
|
164926
164964
|
init_dist_B8HfvhaK_es();
|
|
@@ -219604,7 +219642,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
219604
219642
|
init_remark_gfm_BhnWr3yf_es();
|
|
219605
219643
|
});
|
|
219606
219644
|
|
|
219607
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
219645
|
+
// ../../packages/superdoc/dist/chunks/src-MLERudib.es.js
|
|
219608
219646
|
function deleteProps(obj, propOrProps) {
|
|
219609
219647
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
219610
219648
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -259755,6 +259793,20 @@ function isSettled(status) {
|
|
|
259755
259793
|
function normalizeFamilyKey$2(family$1) {
|
|
259756
259794
|
return family$1.trim().replace(/^["']|["']$/g, "").toLowerCase();
|
|
259757
259795
|
}
|
|
259796
|
+
function deriveBundledSubstitutes() {
|
|
259797
|
+
const substitutes = {};
|
|
259798
|
+
for (const row2 of SUBSTITUTION_EVIDENCE)
|
|
259799
|
+
if (row2.policyAction === "substitute" && row2.physicalFamily)
|
|
259800
|
+
substitutes[normalizeFamilyKey$2(row2.logicalFamily)] = row2.physicalFamily;
|
|
259801
|
+
return Object.freeze(substitutes);
|
|
259802
|
+
}
|
|
259803
|
+
function deriveCategoryFallbacks() {
|
|
259804
|
+
const fallbacks = {};
|
|
259805
|
+
for (const row2 of SUBSTITUTION_EVIDENCE)
|
|
259806
|
+
if (row2.policyAction === "category_fallback" && row2.physicalFamily)
|
|
259807
|
+
fallbacks[normalizeFamilyKey$2(row2.logicalFamily)] = row2.physicalFamily;
|
|
259808
|
+
return Object.freeze(fallbacks);
|
|
259809
|
+
}
|
|
259758
259810
|
function stripFamilyQuotes(family$1) {
|
|
259759
259811
|
return family$1.trim().replace(/^["']|["']$/g, "");
|
|
259760
259812
|
}
|
|
@@ -259876,7 +259928,7 @@ function buildFontReport(logicalFamilies, registry3, resolver2) {
|
|
|
259876
259928
|
reason,
|
|
259877
259929
|
loadStatus,
|
|
259878
259930
|
exportFamily: logical,
|
|
259879
|
-
missing: isSettled(loadStatus) && loadStatus !== "loaded"
|
|
259931
|
+
missing: reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded"
|
|
259880
259932
|
});
|
|
259881
259933
|
}
|
|
259882
259934
|
return report;
|
|
@@ -259902,7 +259954,7 @@ function buildFaceReport(usedFaces, registry3, resolver2) {
|
|
|
259902
259954
|
weight,
|
|
259903
259955
|
style: style2
|
|
259904
259956
|
});
|
|
259905
|
-
const missing = reason === "fallback_face_absent" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
259957
|
+
const missing = reason === "fallback_face_absent" || reason === "category_fallback" || isSettled(loadStatus) && loadStatus !== "loaded";
|
|
259906
259958
|
report.push({
|
|
259907
259959
|
logicalFamily,
|
|
259908
259960
|
physicalFamily,
|
|
@@ -281524,28 +281576,61 @@ var Node$13 = class Node$14 {
|
|
|
281524
281576
|
ranges
|
|
281525
281577
|
};
|
|
281526
281578
|
}, resolveCommentById = ({ commentId, importedId, state, tr, dispatch }) => {
|
|
281579
|
+
const converted = resolveCommentsInTr({
|
|
281580
|
+
items: [{
|
|
281581
|
+
commentId,
|
|
281582
|
+
importedId
|
|
281583
|
+
}],
|
|
281584
|
+
state,
|
|
281585
|
+
tr
|
|
281586
|
+
});
|
|
281587
|
+
if (converted)
|
|
281588
|
+
dispatch(tr);
|
|
281589
|
+
return converted;
|
|
281590
|
+
}, resolveCommentsInTr = ({ items = [], state, tr }) => {
|
|
281527
281591
|
const { schema } = state;
|
|
281528
281592
|
const markType = schema.marks?.[CommentMarkName];
|
|
281529
281593
|
if (!markType)
|
|
281530
281594
|
return false;
|
|
281531
|
-
const { segments, ranges } = getCommentMarkRangesById(commentId, state.doc, importedId);
|
|
281532
|
-
if (!segments.length)
|
|
281533
|
-
return false;
|
|
281534
|
-
segments.forEach(({ from: from$1, to, attrs }) => {
|
|
281535
|
-
tr.removeMark(from$1, to, markType.create(attrs));
|
|
281536
|
-
});
|
|
281537
281595
|
const startType = schema.nodes?.commentRangeStart;
|
|
281538
281596
|
const endType = schema.nodes?.commentRangeEnd;
|
|
281539
|
-
|
|
281540
|
-
|
|
281541
|
-
|
|
281542
|
-
|
|
281597
|
+
const insertions = [];
|
|
281598
|
+
const seen = /* @__PURE__ */ new Set;
|
|
281599
|
+
let converted = false;
|
|
281600
|
+
for (const item of items) {
|
|
281601
|
+
if (!item)
|
|
281602
|
+
continue;
|
|
281603
|
+
const { commentId, importedId } = item;
|
|
281604
|
+
if (commentId == null)
|
|
281605
|
+
continue;
|
|
281606
|
+
const key2 = `${commentId}:${importedId ?? ""}`;
|
|
281607
|
+
if (seen.has(key2))
|
|
281608
|
+
continue;
|
|
281609
|
+
seen.add(key2);
|
|
281610
|
+
const { segments, ranges } = getCommentMarkRangesById(commentId, state.doc, importedId);
|
|
281611
|
+
if (!segments.length)
|
|
281612
|
+
continue;
|
|
281613
|
+
converted = true;
|
|
281614
|
+
segments.forEach(({ from: from$1, to, attrs }) => {
|
|
281615
|
+
tr.removeMark(from$1, to, markType.create(attrs));
|
|
281616
|
+
});
|
|
281617
|
+
if (startType && endType && item.preserveAnchor !== false)
|
|
281618
|
+
ranges.forEach(({ from: from$1, to, internal }) => insertions.push({
|
|
281619
|
+
from: from$1,
|
|
281620
|
+
to,
|
|
281621
|
+
internal,
|
|
281622
|
+
commentId
|
|
281623
|
+
}));
|
|
281624
|
+
}
|
|
281625
|
+
if (startType && endType && insertions.length)
|
|
281626
|
+
insertions.sort((a2, b$1) => b$1.from - a2.from || b$1.to - a2.to).forEach(({ from: from$1, to, internal, commentId }) => {
|
|
281627
|
+
tr.insert(tr.mapping.map(to), endType.create({ "w:id": commentId }));
|
|
281628
|
+
tr.insert(tr.mapping.map(from$1), startType.create({
|
|
281543
281629
|
"w:id": commentId,
|
|
281544
281630
|
internal
|
|
281545
281631
|
}));
|
|
281546
281632
|
});
|
|
281547
|
-
|
|
281548
|
-
return true;
|
|
281633
|
+
return converted;
|
|
281549
281634
|
}, getCommentRangeAnchorsById = (commentId, doc$12, importedId) => {
|
|
281550
281635
|
const anchors = [];
|
|
281551
281636
|
doc$12.descendants((node2, pos) => {
|
|
@@ -281840,6 +281925,60 @@ var Node$13 = class Node$14 {
|
|
|
281840
281925
|
});
|
|
281841
281926
|
});
|
|
281842
281927
|
}
|
|
281928
|
+
const nodeAnchorsById = /* @__PURE__ */ new Map;
|
|
281929
|
+
doc$12.descendants((node2, pos) => {
|
|
281930
|
+
const typeName = node2.type?.name;
|
|
281931
|
+
if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd")
|
|
281932
|
+
return;
|
|
281933
|
+
const anchorId = node2.attrs?.["w:id"];
|
|
281934
|
+
if (anchorId == null)
|
|
281935
|
+
return;
|
|
281936
|
+
const entry = nodeAnchorsById.get(anchorId) || {};
|
|
281937
|
+
if (typeName === "commentRangeStart")
|
|
281938
|
+
entry.startPos = pos;
|
|
281939
|
+
else
|
|
281940
|
+
entry.endPos = pos;
|
|
281941
|
+
nodeAnchorsById.set(anchorId, entry);
|
|
281942
|
+
});
|
|
281943
|
+
const isRepresented = (c) => seen.has(c.commentId) || c.importedId != null && seen.has(c.importedId) || nodeAnchorsById.has(c.commentId) || c.importedId != null && nodeAnchorsById.has(c.importedId);
|
|
281944
|
+
const findAncestorNodeAnchor = (comment2) => {
|
|
281945
|
+
let current = comment2;
|
|
281946
|
+
const visited = /* @__PURE__ */ new Set;
|
|
281947
|
+
while (current) {
|
|
281948
|
+
const parentId = getThreadingParentId(current);
|
|
281949
|
+
if (parentId == null || visited.has(parentId))
|
|
281950
|
+
return null;
|
|
281951
|
+
visited.add(parentId);
|
|
281952
|
+
const parent = commentMap.get(parentId) || comments.find((c) => c.importedId === parentId || c.commentId === parentId);
|
|
281953
|
+
const anchor = nodeAnchorsById.get(parentId) ?? (parent ? nodeAnchorsById.get(parent.commentId) ?? nodeAnchorsById.get(parent.importedId) : undefined);
|
|
281954
|
+
if (anchor?.startPos != null && anchor?.endPos != null)
|
|
281955
|
+
return anchor;
|
|
281956
|
+
current = parent;
|
|
281957
|
+
}
|
|
281958
|
+
return null;
|
|
281959
|
+
};
|
|
281960
|
+
comments.filter((c) => !c.trackedChange && c.commentId != null && !isRepresented(c)).sort((a2, b$1) => (a2.createdTime || 0) - (b$1.createdTime || 0)).forEach((c) => {
|
|
281961
|
+
const anchor = findAncestorNodeAnchor(c);
|
|
281962
|
+
if (!anchor)
|
|
281963
|
+
return;
|
|
281964
|
+
seen.add(c.commentId);
|
|
281965
|
+
const childAttrs = getPreparedComment({
|
|
281966
|
+
commentId: c.commentId,
|
|
281967
|
+
internal: c.isInternal
|
|
281968
|
+
});
|
|
281969
|
+
startNodes.push({
|
|
281970
|
+
pos: anchor.startPos + 1,
|
|
281971
|
+
node: schema.nodes.commentRangeStart.create(childAttrs),
|
|
281972
|
+
commentId: c.commentId,
|
|
281973
|
+
parentCommentId: getThreadingParentId(c)
|
|
281974
|
+
});
|
|
281975
|
+
endNodes.push({
|
|
281976
|
+
pos: anchor.endPos + 1,
|
|
281977
|
+
node: schema.nodes.commentRangeEnd.create(childAttrs),
|
|
281978
|
+
commentId: c.commentId,
|
|
281979
|
+
parentCommentId: getThreadingParentId(c)
|
|
281980
|
+
});
|
|
281981
|
+
});
|
|
281843
281982
|
startNodes.sort((a2, b$1) => {
|
|
281844
281983
|
if (a2.pos !== b$1.pos)
|
|
281845
281984
|
return a2.pos - b$1.pos;
|
|
@@ -299503,7 +299642,7 @@ menclose::after {
|
|
|
299503
299642
|
const minReadablePx = getMinimumReadableTextStartPx(markerContentEndPx, gutterWidthPx);
|
|
299504
299643
|
return Math.max(nextTabStopPx, minReadablePx);
|
|
299505
299644
|
}
|
|
299506
|
-
}, SETTLED_STATUSES, BUNDLED_SUBSTITUTES, FontResolver = class {
|
|
299645
|
+
}, SETTLED_STATUSES, SUBSTITUTION_EVIDENCE, BUNDLED_SUBSTITUTES, CATEGORY_FALLBACKS, FontResolver = class {
|
|
299507
299646
|
#overrides = /* @__PURE__ */ new Map;
|
|
299508
299647
|
#version = 0;
|
|
299509
299648
|
#cachedSignature = null;
|
|
@@ -299561,6 +299700,12 @@ menclose::after {
|
|
|
299561
299700
|
physical: bundled,
|
|
299562
299701
|
reason: "bundled_substitute"
|
|
299563
299702
|
};
|
|
299703
|
+
const category = CATEGORY_FALLBACKS[key2];
|
|
299704
|
+
if (category)
|
|
299705
|
+
return {
|
|
299706
|
+
physical: category,
|
|
299707
|
+
reason: "category_fallback"
|
|
299708
|
+
};
|
|
299564
299709
|
return {
|
|
299565
299710
|
physical: bareFamily,
|
|
299566
299711
|
reason: "as_requested"
|
|
@@ -299585,6 +299730,12 @@ menclose::after {
|
|
|
299585
299730
|
physical: bundled,
|
|
299586
299731
|
reason: "bundled_substitute"
|
|
299587
299732
|
};
|
|
299733
|
+
const category = CATEGORY_FALLBACKS[key2];
|
|
299734
|
+
if (category && hasFace(category, face.weight, face.style))
|
|
299735
|
+
return {
|
|
299736
|
+
physical: category,
|
|
299737
|
+
reason: "category_fallback"
|
|
299738
|
+
};
|
|
299588
299739
|
if (override || bundled)
|
|
299589
299740
|
return {
|
|
299590
299741
|
physical: primary,
|
|
@@ -299630,8 +299781,8 @@ menclose::after {
|
|
|
299630
299781
|
const parts = splitStack(cssFontFamily);
|
|
299631
299782
|
if (parts.length === 0)
|
|
299632
299783
|
return cssFontFamily;
|
|
299633
|
-
const { physical
|
|
299634
|
-
if (
|
|
299784
|
+
const { physical } = this.#resolveFaceLadder(parts[0], face, hasFace);
|
|
299785
|
+
if (normalizeFamilyKey$2(physical) !== normalizeFamilyKey$2(parts[0]))
|
|
299635
299786
|
return [physical, ...parts.slice(1)].join(", ");
|
|
299636
299787
|
return cssFontFamily;
|
|
299637
299788
|
}
|
|
@@ -315653,13 +315804,13 @@ menclose::after {
|
|
|
315653
315804
|
return;
|
|
315654
315805
|
console.log(...args$1);
|
|
315655
315806
|
}, 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;
|
|
315656
|
-
var
|
|
315807
|
+
var init_src_MLERudib_es = __esm(() => {
|
|
315657
315808
|
init_rolldown_runtime_Bg48TavK_es();
|
|
315658
|
-
|
|
315809
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
315659
315810
|
init_jszip_C49i9kUs_es();
|
|
315660
315811
|
init_xml_js_CqGKpaft_es();
|
|
315661
315812
|
init_uuid_qzgm05fK_es();
|
|
315662
|
-
|
|
315813
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
315663
315814
|
init_constants_D9qj59G2_es();
|
|
315664
315815
|
init_dist_B8HfvhaK_es();
|
|
315665
315816
|
init_unified_Dsuw2be5_es();
|
|
@@ -318740,6 +318891,17 @@ ${err.toString()}`);
|
|
|
318740
318891
|
dispatch
|
|
318741
318892
|
});
|
|
318742
318893
|
},
|
|
318894
|
+
resolveCommentThread: ({ comments } = {}) => ({ tr, dispatch, state }) => {
|
|
318895
|
+
tr.setMeta(CommentsPluginKey, { event: "update" });
|
|
318896
|
+
const converted = resolveCommentsInTr({
|
|
318897
|
+
items: comments,
|
|
318898
|
+
state,
|
|
318899
|
+
tr
|
|
318900
|
+
});
|
|
318901
|
+
if (converted)
|
|
318902
|
+
dispatch(tr);
|
|
318903
|
+
return converted;
|
|
318904
|
+
},
|
|
318743
318905
|
reopenComment: ({ commentId, importedId, internal }) => ({ tr, dispatch, state }) => {
|
|
318744
318906
|
tr.setMeta(CommentsPluginKey, { event: "update" });
|
|
318745
318907
|
return reopenCommentById({
|
|
@@ -342558,13 +342720,209 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
342558
342720
|
"timed_out",
|
|
342559
342721
|
"fallback_used"
|
|
342560
342722
|
];
|
|
342561
|
-
|
|
342562
|
-
|
|
342563
|
-
|
|
342564
|
-
|
|
342565
|
-
|
|
342566
|
-
|
|
342567
|
-
|
|
342723
|
+
SUBSTITUTION_EVIDENCE = Object.freeze([
|
|
342724
|
+
{
|
|
342725
|
+
evidenceId: "calibri",
|
|
342726
|
+
logicalFamily: "Calibri",
|
|
342727
|
+
physicalFamily: "Carlito",
|
|
342728
|
+
verdict: "metric_safe",
|
|
342729
|
+
faces: {
|
|
342730
|
+
regular: true,
|
|
342731
|
+
bold: true,
|
|
342732
|
+
italic: true,
|
|
342733
|
+
boldItalic: true
|
|
342734
|
+
},
|
|
342735
|
+
advance: {
|
|
342736
|
+
meanDelta: 0,
|
|
342737
|
+
maxDelta: 0
|
|
342738
|
+
},
|
|
342739
|
+
gates: {
|
|
342740
|
+
static: "pass",
|
|
342741
|
+
metric: "pass",
|
|
342742
|
+
layout: "pass",
|
|
342743
|
+
ship: "pass"
|
|
342744
|
+
},
|
|
342745
|
+
policyAction: "substitute",
|
|
342746
|
+
measurementRefs: ["calibri__carlito#analytic_advance#2026-06-03", "calibri__carlito#face_aggregate#2026-06-03"],
|
|
342747
|
+
candidateLicense: "OFL-1.1",
|
|
342748
|
+
exportRule: "preserve_original_name"
|
|
342749
|
+
},
|
|
342750
|
+
{
|
|
342751
|
+
evidenceId: "cambria",
|
|
342752
|
+
logicalFamily: "Cambria",
|
|
342753
|
+
physicalFamily: "Caladea",
|
|
342754
|
+
verdict: "visual_only",
|
|
342755
|
+
faceVerdicts: {
|
|
342756
|
+
regular: "metric_safe",
|
|
342757
|
+
bold: "metric_safe",
|
|
342758
|
+
italic: "metric_safe",
|
|
342759
|
+
boldItalic: "visual_only"
|
|
342760
|
+
},
|
|
342761
|
+
glyphExceptions: [{
|
|
342762
|
+
slot: "boldItalic",
|
|
342763
|
+
codepoint: 96,
|
|
342764
|
+
advanceDelta: 0.231,
|
|
342765
|
+
note: "Caladea Bold Italic grave accent (U+0060) advance diverges ~23% from Cambria; lines containing it reflow."
|
|
342766
|
+
}],
|
|
342767
|
+
faces: {
|
|
342768
|
+
regular: true,
|
|
342769
|
+
bold: true,
|
|
342770
|
+
italic: true,
|
|
342771
|
+
boldItalic: true
|
|
342772
|
+
},
|
|
342773
|
+
advance: {
|
|
342774
|
+
meanDelta: 0.0002378,
|
|
342775
|
+
maxDelta: 0.2310758
|
|
342776
|
+
},
|
|
342777
|
+
gates: {
|
|
342778
|
+
static: "pass",
|
|
342779
|
+
metric: "pass",
|
|
342780
|
+
layout: "not_run",
|
|
342781
|
+
ship: "pass"
|
|
342782
|
+
},
|
|
342783
|
+
policyAction: "substitute",
|
|
342784
|
+
measurementRefs: [
|
|
342785
|
+
"cambria_regular__caladea#regular#w400#d2f6cad3#analytic_advance#2026-06-04",
|
|
342786
|
+
"cambria_bold__caladea#bold#w700#74eda4fc#analytic_advance#2026-06-04",
|
|
342787
|
+
"cambria_italic__caladea#italic#w400#9c968bf6#analytic_advance#2026-06-04",
|
|
342788
|
+
"cambria_boldItalic__caladea#boldItalic#w700#f47a35ad#analytic_advance#2026-06-04"
|
|
342789
|
+
],
|
|
342790
|
+
candidateLicense: "Apache-2.0",
|
|
342791
|
+
exportRule: "preserve_original_name"
|
|
342792
|
+
},
|
|
342793
|
+
{
|
|
342794
|
+
evidenceId: "arial",
|
|
342795
|
+
logicalFamily: "Arial",
|
|
342796
|
+
physicalFamily: "Liberation Sans",
|
|
342797
|
+
verdict: "metric_safe",
|
|
342798
|
+
faces: {
|
|
342799
|
+
regular: true,
|
|
342800
|
+
bold: true,
|
|
342801
|
+
italic: true,
|
|
342802
|
+
boldItalic: true
|
|
342803
|
+
},
|
|
342804
|
+
advance: {
|
|
342805
|
+
meanDelta: 0,
|
|
342806
|
+
maxDelta: 0
|
|
342807
|
+
},
|
|
342808
|
+
gates: {
|
|
342809
|
+
static: "pass",
|
|
342810
|
+
metric: "pass",
|
|
342811
|
+
layout: "not_run",
|
|
342812
|
+
ship: "pass"
|
|
342813
|
+
},
|
|
342814
|
+
policyAction: "substitute",
|
|
342815
|
+
measurementRefs: ["arial__liberation-sans#analytic_advance#2026-06-03"],
|
|
342816
|
+
candidateLicense: "OFL-1.1",
|
|
342817
|
+
exportRule: "preserve_original_name"
|
|
342818
|
+
},
|
|
342819
|
+
{
|
|
342820
|
+
evidenceId: "times-new-roman",
|
|
342821
|
+
logicalFamily: "Times New Roman",
|
|
342822
|
+
physicalFamily: "Liberation Serif",
|
|
342823
|
+
verdict: "metric_safe",
|
|
342824
|
+
faces: {
|
|
342825
|
+
regular: true,
|
|
342826
|
+
bold: true,
|
|
342827
|
+
italic: true,
|
|
342828
|
+
boldItalic: true
|
|
342829
|
+
},
|
|
342830
|
+
advance: {
|
|
342831
|
+
meanDelta: 0,
|
|
342832
|
+
maxDelta: 0
|
|
342833
|
+
},
|
|
342834
|
+
gates: {
|
|
342835
|
+
static: "pass",
|
|
342836
|
+
metric: "pass",
|
|
342837
|
+
layout: "not_run",
|
|
342838
|
+
ship: "pass"
|
|
342839
|
+
},
|
|
342840
|
+
policyAction: "substitute",
|
|
342841
|
+
measurementRefs: ["times-new-roman__liberation-serif#analytic_advance#2026-06-03"],
|
|
342842
|
+
candidateLicense: "OFL-1.1",
|
|
342843
|
+
exportRule: "preserve_original_name"
|
|
342844
|
+
},
|
|
342845
|
+
{
|
|
342846
|
+
evidenceId: "courier-new",
|
|
342847
|
+
logicalFamily: "Courier New",
|
|
342848
|
+
physicalFamily: "Liberation Mono",
|
|
342849
|
+
verdict: "metric_safe",
|
|
342850
|
+
faces: {
|
|
342851
|
+
regular: true,
|
|
342852
|
+
bold: true,
|
|
342853
|
+
italic: true,
|
|
342854
|
+
boldItalic: true
|
|
342855
|
+
},
|
|
342856
|
+
advance: {
|
|
342857
|
+
meanDelta: 0,
|
|
342858
|
+
maxDelta: 0
|
|
342859
|
+
},
|
|
342860
|
+
gates: {
|
|
342861
|
+
static: "pass",
|
|
342862
|
+
metric: "pass",
|
|
342863
|
+
layout: "not_run",
|
|
342864
|
+
ship: "pass"
|
|
342865
|
+
},
|
|
342866
|
+
policyAction: "substitute",
|
|
342867
|
+
measurementRefs: ["courier-new__liberation-mono#analytic_advance#2026-06-03"],
|
|
342868
|
+
candidateLicense: "OFL-1.1",
|
|
342869
|
+
exportRule: "preserve_original_name"
|
|
342870
|
+
},
|
|
342871
|
+
{
|
|
342872
|
+
evidenceId: "helvetica",
|
|
342873
|
+
logicalFamily: "Helvetica",
|
|
342874
|
+
physicalFamily: "Liberation Sans",
|
|
342875
|
+
verdict: "metric_safe",
|
|
342876
|
+
faces: {
|
|
342877
|
+
regular: true,
|
|
342878
|
+
bold: true,
|
|
342879
|
+
italic: true,
|
|
342880
|
+
boldItalic: true
|
|
342881
|
+
},
|
|
342882
|
+
advance: {
|
|
342883
|
+
meanDelta: 0,
|
|
342884
|
+
maxDelta: 0
|
|
342885
|
+
},
|
|
342886
|
+
gates: {
|
|
342887
|
+
static: "not_run",
|
|
342888
|
+
metric: "pass",
|
|
342889
|
+
layout: "not_run",
|
|
342890
|
+
ship: "fail"
|
|
342891
|
+
},
|
|
342892
|
+
policyAction: "substitute",
|
|
342893
|
+
measurementRefs: ["helvetica__liberation-sans#analytic_advance#2026-06-03"],
|
|
342894
|
+
candidateLicense: "OFL-1.1",
|
|
342895
|
+
exportRule: "preserve_original_name"
|
|
342896
|
+
},
|
|
342897
|
+
{
|
|
342898
|
+
evidenceId: "calibri-light",
|
|
342899
|
+
logicalFamily: "Calibri Light",
|
|
342900
|
+
physicalFamily: "Carlito",
|
|
342901
|
+
verdict: "visual_only",
|
|
342902
|
+
faces: {
|
|
342903
|
+
regular: false,
|
|
342904
|
+
bold: false,
|
|
342905
|
+
italic: false,
|
|
342906
|
+
boldItalic: false
|
|
342907
|
+
},
|
|
342908
|
+
advance: {
|
|
342909
|
+
meanDelta: 0.0148,
|
|
342910
|
+
maxDelta: 0.066
|
|
342911
|
+
},
|
|
342912
|
+
gates: {
|
|
342913
|
+
static: "not_run",
|
|
342914
|
+
metric: "fail",
|
|
342915
|
+
layout: "not_run",
|
|
342916
|
+
ship: "fail"
|
|
342917
|
+
},
|
|
342918
|
+
policyAction: "category_fallback",
|
|
342919
|
+
measurementRefs: ["calibri-light__carlito#analytic_advance#2026-06-05"],
|
|
342920
|
+
candidateLicense: "OFL-1.1",
|
|
342921
|
+
exportRule: "preserve_original_name"
|
|
342922
|
+
}
|
|
342923
|
+
]);
|
|
342924
|
+
BUNDLED_SUBSTITUTES = deriveBundledSubstitutes();
|
|
342925
|
+
CATEGORY_FALLBACKS = deriveCategoryFallbacks();
|
|
342568
342926
|
defaultResolver = new FontResolver;
|
|
342569
342927
|
DEFAULT_FONT_MEASURE_CONTEXT = Object.freeze({
|
|
342570
342928
|
resolvePhysical: (cssFontFamily, _face) => resolvePhysicalFamily(cssFontFamily),
|
|
@@ -350392,11 +350750,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
350392
350750
|
]);
|
|
350393
350751
|
});
|
|
350394
350752
|
|
|
350395
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
350753
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-k5vyPmpN.es.js
|
|
350396
350754
|
var 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;
|
|
350397
|
-
var
|
|
350398
|
-
|
|
350399
|
-
|
|
350755
|
+
var init_create_super_doc_ui_k5vyPmpN_es = __esm(() => {
|
|
350756
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
350757
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
350400
350758
|
MOD_ALIASES = new Set([
|
|
350401
350759
|
"Mod",
|
|
350402
350760
|
"Meta",
|
|
@@ -350438,16 +350796,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
350438
350796
|
|
|
350439
350797
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
350440
350798
|
var init_super_editor_es = __esm(() => {
|
|
350441
|
-
|
|
350442
|
-
|
|
350799
|
+
init_src_MLERudib_es();
|
|
350800
|
+
init_SuperConverter_DBsJeu9t_es();
|
|
350443
350801
|
init_jszip_C49i9kUs_es();
|
|
350444
350802
|
init_xml_js_CqGKpaft_es();
|
|
350445
|
-
|
|
350803
|
+
init_create_headless_toolbar_BiY_0zZP_es();
|
|
350446
350804
|
init_constants_D9qj59G2_es();
|
|
350447
350805
|
init_dist_B8HfvhaK_es();
|
|
350448
350806
|
init_unified_Dsuw2be5_es();
|
|
350449
350807
|
init_DocxZipper_Bu2Fhqkw_es();
|
|
350450
|
-
|
|
350808
|
+
init_create_super_doc_ui_k5vyPmpN_es();
|
|
350451
350809
|
init_ui_C5PAS9hY_es();
|
|
350452
350810
|
init_eventemitter3_BnGqBE_Q_es();
|
|
350453
350811
|
init_errors_CNaD6vcg_es();
|
|
@@ -450924,6 +451282,42 @@ var prepareCommentParaIds2 = (comment2) => {
|
|
|
450924
451282
|
commentParaId: generateDocxRandomId2()
|
|
450925
451283
|
};
|
|
450926
451284
|
return newComment;
|
|
451285
|
+
}, getCommentIds2 = (comment2) => {
|
|
451286
|
+
if (!comment2)
|
|
451287
|
+
return [];
|
|
451288
|
+
return [comment2.commentId, comment2.importedId, comment2.internalId].filter((id2) => id2 != null).map((id2) => String(id2));
|
|
451289
|
+
}, buildCommentLookup2 = (comments = []) => {
|
|
451290
|
+
const byId = new Map;
|
|
451291
|
+
for (const comment2 of comments) {
|
|
451292
|
+
getCommentIds2(comment2).forEach((id2) => byId.set(id2, comment2));
|
|
451293
|
+
}
|
|
451294
|
+
return byId;
|
|
451295
|
+
}, findCommentById2 = (comments = [], id2) => {
|
|
451296
|
+
if (id2 == null)
|
|
451297
|
+
return null;
|
|
451298
|
+
const lookup3 = buildCommentLookup2(comments);
|
|
451299
|
+
return lookup3.get(String(id2)) || null;
|
|
451300
|
+
}, isCommentResolvedInThread2 = (comment2, allComments = []) => {
|
|
451301
|
+
const isDone = (c) => Boolean(c?.resolvedTime || c?.isDone);
|
|
451302
|
+
if (isDone(comment2))
|
|
451303
|
+
return true;
|
|
451304
|
+
const byId = buildCommentLookup2(allComments);
|
|
451305
|
+
const seen = new Set;
|
|
451306
|
+
let current = comment2;
|
|
451307
|
+
while (current) {
|
|
451308
|
+
const parentId = current.threadingParentCommentId || current.parentCommentId;
|
|
451309
|
+
const parentKey = parentId != null ? String(parentId) : null;
|
|
451310
|
+
if (parentKey == null || seen.has(parentKey))
|
|
451311
|
+
break;
|
|
451312
|
+
seen.add(parentKey);
|
|
451313
|
+
const parent = byId.get(parentKey);
|
|
451314
|
+
if (!parent)
|
|
451315
|
+
break;
|
|
451316
|
+
if (isDone(parent))
|
|
451317
|
+
return true;
|
|
451318
|
+
current = parent;
|
|
451319
|
+
}
|
|
451320
|
+
return false;
|
|
450927
451321
|
}, getCommentDefinition2 = (comment2, commentId, allComments, editor) => {
|
|
450928
451322
|
const nodes = Array.isArray(comment2.commentJSON) ? comment2.commentJSON : comment2.commentJSON ? [comment2.commentJSON] : [];
|
|
450929
451323
|
const translatedParagraphs = nodes.map((node4) => translator121.decode({ editor, node: node4 })).filter(Boolean);
|
|
@@ -450932,7 +451326,7 @@ var prepareCommentParaIds2 = (comment2) => {
|
|
|
450932
451326
|
"w:author": comment2.creatorName || comment2.importedAuthor?.name,
|
|
450933
451327
|
"w:date": toIsoNoFractional2(comment2.createdTime),
|
|
450934
451328
|
"w:initials": getInitials2(comment2.creatorName),
|
|
450935
|
-
"w:done": comment2
|
|
451329
|
+
"w:done": isCommentResolvedInThread2(comment2, allComments) ? "1" : "0",
|
|
450936
451330
|
"w15:paraId": comment2.commentParaId,
|
|
450937
451331
|
"custom:internalId": comment2.commentId || comment2.internalId,
|
|
450938
451332
|
"custom:trackedChange": comment2.trackedChange,
|
|
@@ -450943,7 +451337,7 @@ var prepareCommentParaIds2 = (comment2) => {
|
|
|
450943
451337
|
"custom:email": comment2.creatorEmail || comment2.importedAuthor?.email
|
|
450944
451338
|
};
|
|
450945
451339
|
if (comment2?.parentCommentId) {
|
|
450946
|
-
const parentComment = allComments
|
|
451340
|
+
const parentComment = findCommentById2(allComments, comment2.parentCommentId);
|
|
450947
451341
|
if (parentComment && !parentComment.trackedChange) {
|
|
450948
451342
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
|
450949
451343
|
}
|
|
@@ -451028,7 +451422,7 @@ var prepareCommentParaIds2 = (comment2) => {
|
|
|
451028
451422
|
}
|
|
451029
451423
|
const xmlCopy = carbonCopy2(commentsExtendedXml);
|
|
451030
451424
|
const commentsEx = comments.map((comment2) => {
|
|
451031
|
-
const isResolved = comment2
|
|
451425
|
+
const isResolved = isCommentResolvedInThread2(comment2, comments);
|
|
451032
451426
|
const attributes = {
|
|
451033
451427
|
"w15:paraId": comment2.commentParaId,
|
|
451034
451428
|
"w15:done": isResolved ? "1" : "0"
|
|
@@ -451036,7 +451430,7 @@ var prepareCommentParaIds2 = (comment2) => {
|
|
|
451036
451430
|
const parentId = comment2.threadingParentCommentId || comment2.parentCommentId;
|
|
451037
451431
|
const threadingStyle = resolveThreadingStyle2(comment2, profile);
|
|
451038
451432
|
if (parentId && (threadingStyle === "commentsExtended" || shouldIncludeForThreads)) {
|
|
451039
|
-
const parentComment = comments
|
|
451433
|
+
const parentComment = findCommentById2(comments, parentId);
|
|
451040
451434
|
const allowTrackedParent = profile?.defaultStyle === "commentsExtended";
|
|
451041
451435
|
if (parentComment && (allowTrackedParent || !parentComment.trackedChange)) {
|
|
451042
451436
|
attributes["w15:paraIdParent"] = parentComment.commentParaId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.11.0-next.
|
|
3
|
+
"version": "0.11.0-next.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@types/bun": "^1.3.8",
|
|
20
20
|
"@types/node": "22.19.2",
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
|
-
"@superdoc/super-editor": "0.0.1",
|
|
23
22
|
"@superdoc/document-api": "0.0.1",
|
|
24
|
-
"superdoc": "1.38.0"
|
|
23
|
+
"superdoc": "1.38.0",
|
|
24
|
+
"@superdoc/super-editor": "0.0.1"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|