@superdoc-dev/cli 0.12.0-next.15 → 0.12.0-next.16
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 +8 -8
package/dist/index.js
CHANGED
|
@@ -218157,7 +218157,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
218157
218157
|
init_remark_gfm_BhnWr3yf_es();
|
|
218158
218158
|
});
|
|
218159
218159
|
|
|
218160
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
218160
|
+
// ../../packages/superdoc/dist/chunks/src-DkDAd28K.es.js
|
|
218161
218161
|
function deleteProps(obj, propOrProps) {
|
|
218162
218162
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
218163
218163
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -306546,7 +306546,7 @@ menclose::after {
|
|
|
306546
306546
|
return;
|
|
306547
306547
|
console.log(...args$1);
|
|
306548
306548
|
}, 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;
|
|
306549
|
-
var
|
|
306549
|
+
var init_src_DkDAd28K_es = __esm(() => {
|
|
306550
306550
|
init_rolldown_runtime_Bg48TavK_es();
|
|
306551
306551
|
init_SuperConverter_UqLu6KQU_es();
|
|
306552
306552
|
init_jszip_C49i9kUs_es();
|
|
@@ -317917,20 +317917,31 @@ ${err.toString()}`);
|
|
|
317917
317917
|
tr = tr.removeMark(from$1, to, linkMarkType);
|
|
317918
317918
|
if (underlineMarkType) {
|
|
317919
317919
|
const rangesMissingUnderline = [];
|
|
317920
|
+
const negationMarksToRemove = [];
|
|
317920
317921
|
tr.doc.nodesBetween(from$1, to, (node3, pos) => {
|
|
317921
317922
|
if (!node3.isText || node3.nodeSize <= 0)
|
|
317922
317923
|
return;
|
|
317923
|
-
|
|
317924
|
+
const existing = node3.marks.find((mark2) => mark2.type === underlineMarkType);
|
|
317925
|
+
if (existing && existing.attrs?.underlineType !== "none")
|
|
317924
317926
|
return;
|
|
317925
317927
|
const rangeFrom = Math.max(pos, from$1);
|
|
317926
317928
|
const rangeTo = Math.min(pos + node3.nodeSize, to);
|
|
317927
317929
|
if (rangeFrom >= rangeTo)
|
|
317928
317930
|
return;
|
|
317931
|
+
if (existing && existing.attrs?.underlineType === "none")
|
|
317932
|
+
negationMarksToRemove.push({
|
|
317933
|
+
from: rangeFrom,
|
|
317934
|
+
to: rangeTo,
|
|
317935
|
+
mark: existing
|
|
317936
|
+
});
|
|
317929
317937
|
rangesMissingUnderline.push({
|
|
317930
317938
|
from: rangeFrom,
|
|
317931
317939
|
to: rangeTo
|
|
317932
317940
|
});
|
|
317933
317941
|
});
|
|
317942
|
+
negationMarksToRemove.forEach((range) => {
|
|
317943
|
+
tr = tr.removeMark(range.from, range.to, range.mark);
|
|
317944
|
+
});
|
|
317934
317945
|
rangesMissingUnderline.forEach((range) => {
|
|
317935
317946
|
tr = tr.addMark(range.from, range.to, underlineMarkType.create({ autoAdded: true }));
|
|
317936
317947
|
});
|
|
@@ -317961,13 +317972,35 @@ ${err.toString()}`);
|
|
|
317961
317972
|
const underlineMarkType = editor.schema.marks.underline;
|
|
317962
317973
|
let { from: from$1, to } = selection;
|
|
317963
317974
|
if (selection.empty && linkMarkType) {
|
|
317964
|
-
const
|
|
317965
|
-
if (
|
|
317966
|
-
from$1 =
|
|
317967
|
-
to =
|
|
317975
|
+
const initialRange = getMarkRange(selection.$from, linkMarkType);
|
|
317976
|
+
if (initialRange) {
|
|
317977
|
+
from$1 = initialRange.from;
|
|
317978
|
+
to = initialRange.to;
|
|
317979
|
+
} else {
|
|
317980
|
+
const doc$12 = state.doc;
|
|
317981
|
+
const docSize = doc$12.content.size;
|
|
317982
|
+
const probePositions = [
|
|
317983
|
+
selection.from - 1,
|
|
317984
|
+
selection.from,
|
|
317985
|
+
selection.from + 1
|
|
317986
|
+
].filter((pos) => pos >= 0 && pos <= docSize);
|
|
317987
|
+
for (const pos of probePositions) {
|
|
317988
|
+
const range = getMarkRange(doc$12.resolve(pos), linkMarkType);
|
|
317989
|
+
if (range) {
|
|
317990
|
+
from$1 = range.from;
|
|
317991
|
+
to = range.to;
|
|
317992
|
+
break;
|
|
317993
|
+
}
|
|
317994
|
+
}
|
|
317968
317995
|
}
|
|
317969
317996
|
}
|
|
317970
|
-
|
|
317997
|
+
const commandChain = chain();
|
|
317998
|
+
if (selection.empty && linkMarkType && from$1 !== to)
|
|
317999
|
+
commandChain.command(({ tr }) => {
|
|
318000
|
+
tr.setSelection(TextSelection.create(tr.doc, from$1, to));
|
|
318001
|
+
return true;
|
|
318002
|
+
});
|
|
318003
|
+
return commandChain.unsetColor().unsetMark("link", { extendEmptyMarkRange: true }).command(({ tr }) => {
|
|
317971
318004
|
if (underlineMarkType)
|
|
317972
318005
|
tr.doc.nodesBetween(from$1, to, (node3, pos) => {
|
|
317973
318006
|
if (!node3.isText)
|
|
@@ -318019,6 +318052,23 @@ ${err.toString()}`);
|
|
|
318019
318052
|
}
|
|
318020
318053
|
}, node3.marks);
|
|
318021
318054
|
});
|
|
318055
|
+
if (linkMarkType) {
|
|
318056
|
+
const runNodeMarkRemovals = [];
|
|
318057
|
+
tr.doc.nodesBetween(from$1, to, (node3, pos) => {
|
|
318058
|
+
if (node3.type.name !== "run")
|
|
318059
|
+
return;
|
|
318060
|
+
if (!node3.marks.some((mark2) => mark2.type === linkMarkType))
|
|
318061
|
+
return;
|
|
318062
|
+
runNodeMarkRemovals.push(pos);
|
|
318063
|
+
});
|
|
318064
|
+
runNodeMarkRemovals.reverse().forEach((pos) => {
|
|
318065
|
+
const mappedPos = tr.mapping.map(pos);
|
|
318066
|
+
const runNode = tr.doc.nodeAt(mappedPos);
|
|
318067
|
+
if (!runNode)
|
|
318068
|
+
return;
|
|
318069
|
+
tr.setNodeMarkup(mappedPos, runNode.type, runNode.attrs, runNode.marks.filter((mark2) => mark2.type !== linkMarkType));
|
|
318070
|
+
});
|
|
318071
|
+
}
|
|
318022
318072
|
return true;
|
|
318023
318073
|
}).run();
|
|
318024
318074
|
},
|
|
@@ -344320,7 +344370,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
344320
344370
|
|
|
344321
344371
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
344322
344372
|
var init_super_editor_es = __esm(() => {
|
|
344323
|
-
|
|
344373
|
+
init_src_DkDAd28K_es();
|
|
344324
344374
|
init_SuperConverter_UqLu6KQU_es();
|
|
344325
344375
|
init_jszip_C49i9kUs_es();
|
|
344326
344376
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.12.0-next.
|
|
3
|
+
"version": "0.12.0-next.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
27
|
"@superdoc/document-api": "0.0.1",
|
|
28
|
-
"superdoc": "1.34.0",
|
|
29
28
|
"@superdoc/super-editor": "0.0.1",
|
|
30
|
-
"@superdoc/pm-adapter": "0.0.0"
|
|
29
|
+
"@superdoc/pm-adapter": "0.0.0",
|
|
30
|
+
"superdoc": "1.34.0"
|
|
31
31
|
},
|
|
32
32
|
"module": "src/index.ts",
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@superdoc-dev/cli-darwin-arm64": "0.12.0-next.
|
|
38
|
-
"@superdoc-dev/cli-darwin-x64": "0.12.0-next.
|
|
39
|
-
"@superdoc-dev/cli-linux-x64": "0.12.0-next.
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.12.0-next.16",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.12.0-next.16",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.12.0-next.16",
|
|
40
|
+
"@superdoc-dev/cli-windows-x64": "0.12.0-next.16",
|
|
41
|
+
"@superdoc-dev/cli-linux-arm64": "0.12.0-next.16"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|