@superdoc-dev/mcp 0.7.0-next.16 → 0.7.0-next.18
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 +59 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -208791,7 +208791,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
208791
208791
|
init_remark_gfm_BhnWr3yf_es();
|
|
208792
208792
|
});
|
|
208793
208793
|
|
|
208794
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
208794
|
+
// ../../packages/superdoc/dist/chunks/src-DkDAd28K.es.js
|
|
208795
208795
|
function deleteProps(obj, propOrProps) {
|
|
208796
208796
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
208797
208797
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -297180,7 +297180,7 @@ menclose::after {
|
|
|
297180
297180
|
return;
|
|
297181
297181
|
console.log(...args$1);
|
|
297182
297182
|
}, 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;
|
|
297183
|
-
var
|
|
297183
|
+
var init_src_DkDAd28K_es = __esm(() => {
|
|
297184
297184
|
init_rolldown_runtime_Bg48TavK_es();
|
|
297185
297185
|
init_SuperConverter_UqLu6KQU_es();
|
|
297186
297186
|
init_jszip_C49i9kUs_es();
|
|
@@ -308551,20 +308551,31 @@ ${err.toString()}`);
|
|
|
308551
308551
|
tr = tr.removeMark(from$1, to, linkMarkType);
|
|
308552
308552
|
if (underlineMarkType) {
|
|
308553
308553
|
const rangesMissingUnderline = [];
|
|
308554
|
+
const negationMarksToRemove = [];
|
|
308554
308555
|
tr.doc.nodesBetween(from$1, to, (node2, pos) => {
|
|
308555
308556
|
if (!node2.isText || node2.nodeSize <= 0)
|
|
308556
308557
|
return;
|
|
308557
|
-
|
|
308558
|
+
const existing = node2.marks.find((mark2) => mark2.type === underlineMarkType);
|
|
308559
|
+
if (existing && existing.attrs?.underlineType !== "none")
|
|
308558
308560
|
return;
|
|
308559
308561
|
const rangeFrom = Math.max(pos, from$1);
|
|
308560
308562
|
const rangeTo = Math.min(pos + node2.nodeSize, to);
|
|
308561
308563
|
if (rangeFrom >= rangeTo)
|
|
308562
308564
|
return;
|
|
308565
|
+
if (existing && existing.attrs?.underlineType === "none")
|
|
308566
|
+
negationMarksToRemove.push({
|
|
308567
|
+
from: rangeFrom,
|
|
308568
|
+
to: rangeTo,
|
|
308569
|
+
mark: existing
|
|
308570
|
+
});
|
|
308563
308571
|
rangesMissingUnderline.push({
|
|
308564
308572
|
from: rangeFrom,
|
|
308565
308573
|
to: rangeTo
|
|
308566
308574
|
});
|
|
308567
308575
|
});
|
|
308576
|
+
negationMarksToRemove.forEach((range) => {
|
|
308577
|
+
tr = tr.removeMark(range.from, range.to, range.mark);
|
|
308578
|
+
});
|
|
308568
308579
|
rangesMissingUnderline.forEach((range) => {
|
|
308569
308580
|
tr = tr.addMark(range.from, range.to, underlineMarkType.create({ autoAdded: true }));
|
|
308570
308581
|
});
|
|
@@ -308595,13 +308606,35 @@ ${err.toString()}`);
|
|
|
308595
308606
|
const underlineMarkType = editor.schema.marks.underline;
|
|
308596
308607
|
let { from: from$1, to } = selection;
|
|
308597
308608
|
if (selection.empty && linkMarkType) {
|
|
308598
|
-
const
|
|
308599
|
-
if (
|
|
308600
|
-
from$1 =
|
|
308601
|
-
to =
|
|
308609
|
+
const initialRange = getMarkRange(selection.$from, linkMarkType);
|
|
308610
|
+
if (initialRange) {
|
|
308611
|
+
from$1 = initialRange.from;
|
|
308612
|
+
to = initialRange.to;
|
|
308613
|
+
} else {
|
|
308614
|
+
const doc$12 = state.doc;
|
|
308615
|
+
const docSize = doc$12.content.size;
|
|
308616
|
+
const probePositions = [
|
|
308617
|
+
selection.from - 1,
|
|
308618
|
+
selection.from,
|
|
308619
|
+
selection.from + 1
|
|
308620
|
+
].filter((pos) => pos >= 0 && pos <= docSize);
|
|
308621
|
+
for (const pos of probePositions) {
|
|
308622
|
+
const range = getMarkRange(doc$12.resolve(pos), linkMarkType);
|
|
308623
|
+
if (range) {
|
|
308624
|
+
from$1 = range.from;
|
|
308625
|
+
to = range.to;
|
|
308626
|
+
break;
|
|
308627
|
+
}
|
|
308628
|
+
}
|
|
308602
308629
|
}
|
|
308603
308630
|
}
|
|
308604
|
-
|
|
308631
|
+
const commandChain = chain();
|
|
308632
|
+
if (selection.empty && linkMarkType && from$1 !== to)
|
|
308633
|
+
commandChain.command(({ tr }) => {
|
|
308634
|
+
tr.setSelection(TextSelection.create(tr.doc, from$1, to));
|
|
308635
|
+
return true;
|
|
308636
|
+
});
|
|
308637
|
+
return commandChain.unsetColor().unsetMark("link", { extendEmptyMarkRange: true }).command(({ tr }) => {
|
|
308605
308638
|
if (underlineMarkType)
|
|
308606
308639
|
tr.doc.nodesBetween(from$1, to, (node2, pos) => {
|
|
308607
308640
|
if (!node2.isText)
|
|
@@ -308653,6 +308686,23 @@ ${err.toString()}`);
|
|
|
308653
308686
|
}
|
|
308654
308687
|
}, node2.marks);
|
|
308655
308688
|
});
|
|
308689
|
+
if (linkMarkType) {
|
|
308690
|
+
const runNodeMarkRemovals = [];
|
|
308691
|
+
tr.doc.nodesBetween(from$1, to, (node2, pos) => {
|
|
308692
|
+
if (node2.type.name !== "run")
|
|
308693
|
+
return;
|
|
308694
|
+
if (!node2.marks.some((mark2) => mark2.type === linkMarkType))
|
|
308695
|
+
return;
|
|
308696
|
+
runNodeMarkRemovals.push(pos);
|
|
308697
|
+
});
|
|
308698
|
+
runNodeMarkRemovals.reverse().forEach((pos) => {
|
|
308699
|
+
const mappedPos = tr.mapping.map(pos);
|
|
308700
|
+
const runNode = tr.doc.nodeAt(mappedPos);
|
|
308701
|
+
if (!runNode)
|
|
308702
|
+
return;
|
|
308703
|
+
tr.setNodeMarkup(mappedPos, runNode.type, runNode.attrs, runNode.marks.filter((mark2) => mark2.type !== linkMarkType));
|
|
308704
|
+
});
|
|
308705
|
+
}
|
|
308656
308706
|
return true;
|
|
308657
308707
|
}).run();
|
|
308658
308708
|
},
|
|
@@ -334954,7 +335004,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
334954
335004
|
|
|
334955
335005
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
334956
335006
|
var init_super_editor_es = __esm(() => {
|
|
334957
|
-
|
|
335007
|
+
init_src_DkDAd28K_es();
|
|
334958
335008
|
init_SuperConverter_UqLu6KQU_es();
|
|
334959
335009
|
init_jszip_C49i9kUs_es();
|
|
334960
335010
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.7.0-next.
|
|
3
|
+
"version": "0.7.0-next.18",
|
|
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.34.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|