@superdoc-dev/cli 0.8.0-next.5 → 0.8.0-next.6
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 +23 -25
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -205992,7 +205992,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
205992
205992
|
init_remark_gfm_BhnWr3yf_es();
|
|
205993
205993
|
});
|
|
205994
205994
|
|
|
205995
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
205995
|
+
// ../../packages/superdoc/dist/chunks/src-NhQXv8uF.es.js
|
|
205996
205996
|
function deleteProps(obj, propOrProps) {
|
|
205997
205997
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
205998
205998
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -208422,6 +208422,9 @@ function chainCommands(...commands$1) {
|
|
|
208422
208422
|
return false;
|
|
208423
208423
|
};
|
|
208424
208424
|
}
|
|
208425
|
+
function resolveHeaderFooterSelection({ tr }) {
|
|
208426
|
+
return tr?.selection;
|
|
208427
|
+
}
|
|
208425
208428
|
function findParagraph($pos) {
|
|
208426
208429
|
for (let depth = $pos.depth;depth >= 0; depth--) {
|
|
208427
208430
|
const node3 = $pos.node(depth);
|
|
@@ -208496,10 +208499,8 @@ function removeRunPropertiesForMark(runProperties, mark2) {
|
|
|
208496
208499
|
break;
|
|
208497
208500
|
}
|
|
208498
208501
|
}
|
|
208499
|
-
function canSetMark(
|
|
208500
|
-
|
|
208501
|
-
if (editor.options.isHeaderOrFooter)
|
|
208502
|
-
selection = editor.options.lastSelection;
|
|
208502
|
+
function canSetMark(state, tr, newMarkType) {
|
|
208503
|
+
const selection = resolveHeaderFooterSelection({ tr });
|
|
208503
208504
|
let cursor = null;
|
|
208504
208505
|
if (isTextSelection(selection))
|
|
208505
208506
|
cursor = selection.$cursor;
|
|
@@ -266669,11 +266670,8 @@ var Node$13 = class Node$14 {
|
|
|
266669
266670
|
return createParagraphNear(state, dispatch);
|
|
266670
266671
|
}, newlineInCode$1 = () => ({ state, dispatch }) => newlineInCode(state, dispatch), exitCode$1 = () => ({ state, dispatch }) => {
|
|
266671
266672
|
return exitCode(state, dispatch);
|
|
266672
|
-
}, setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch
|
|
266673
|
-
|
|
266674
|
-
if (editor.options.isHeaderOrFooter)
|
|
266675
|
-
selection = editor.options.lastSelection;
|
|
266676
|
-
const { empty: empty$1, ranges } = selection;
|
|
266673
|
+
}, setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {
|
|
266674
|
+
const { empty: empty$1, ranges } = resolveHeaderFooterSelection({ tr });
|
|
266677
266675
|
const type = getMarkType(typeOrName, state.schema);
|
|
266678
266676
|
if (dispatch)
|
|
266679
266677
|
if (empty$1) {
|
|
@@ -266703,12 +266701,10 @@ var Node$13 = class Node$14 {
|
|
|
266703
266701
|
tr.addMark(trimmedFrom, trimmedTo, type.create(attributes));
|
|
266704
266702
|
});
|
|
266705
266703
|
});
|
|
266706
|
-
return canSetMark(
|
|
266707
|
-
}, unsetMark = (typeOrName, options = {}) => ({ tr, state, dispatch
|
|
266704
|
+
return canSetMark(state, tr, type);
|
|
266705
|
+
}, unsetMark = (typeOrName, options = {}) => ({ tr, state, dispatch }) => {
|
|
266708
266706
|
const { extendEmptyMarkRange = false } = options;
|
|
266709
|
-
|
|
266710
|
-
if (editor.options.isHeaderOrFooter)
|
|
266711
|
-
selection = editor.options.lastSelection;
|
|
266707
|
+
const selection = resolveHeaderFooterSelection({ tr });
|
|
266712
266708
|
const type = getMarkType(typeOrName, state.schema);
|
|
266713
266709
|
const { $from, empty: empty$1, ranges } = selection;
|
|
266714
266710
|
if (!dispatch)
|
|
@@ -266733,11 +266729,8 @@ var Node$13 = class Node$14 {
|
|
|
266733
266729
|
tr.removeStoredMark(type);
|
|
266734
266730
|
removeParagraphRunProperty(tr, markToRemove);
|
|
266735
266731
|
return true;
|
|
266736
|
-
}, unsetAllMarks = () => ({ tr, dispatch
|
|
266737
|
-
|
|
266738
|
-
if (editor.options.isHeaderOrFooter)
|
|
266739
|
-
selection = editor.options.lastSelection;
|
|
266740
|
-
const { empty: empty$1, ranges } = selection;
|
|
266732
|
+
}, unsetAllMarks = () => ({ tr, dispatch }) => {
|
|
266733
|
+
const { empty: empty$1, ranges } = resolveHeaderFooterSelection({ tr });
|
|
266741
266734
|
if (dispatch) {
|
|
266742
266735
|
if (!empty$1)
|
|
266743
266736
|
ranges.forEach((range) => {
|
|
@@ -290719,7 +290712,7 @@ menclose::after {
|
|
|
290719
290712
|
return;
|
|
290720
290713
|
console.log(...args$1);
|
|
290721
290714
|
}, 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;
|
|
290722
|
-
var
|
|
290715
|
+
var init_src_NhQXv8uF_es = __esm(() => {
|
|
290723
290716
|
init_rolldown_runtime_Bg48TavK_es();
|
|
290724
290717
|
init_SuperConverter_DEAeNCv7_es();
|
|
290725
290718
|
init_jszip_C49i9kUs_es();
|
|
@@ -311772,7 +311765,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311772
311765
|
});
|
|
311773
311766
|
};
|
|
311774
311767
|
const restoreSelection$1 = () => {
|
|
311775
|
-
proxy.$toolbar.activeEditor
|
|
311768
|
+
const editor = proxy.$toolbar.activeEditor;
|
|
311769
|
+
if (!editor)
|
|
311770
|
+
return;
|
|
311771
|
+
if (editor.options?.isHeaderOrFooter)
|
|
311772
|
+
return;
|
|
311773
|
+
editor.commands?.restoreSelection();
|
|
311776
311774
|
};
|
|
311777
311775
|
const handleToolbarMousedown = (e) => {
|
|
311778
311776
|
if (e.target.closest('input, textarea, [contenteditable="true"]'))
|
|
@@ -311836,7 +311834,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
311836
311834
|
], 32);
|
|
311837
311835
|
};
|
|
311838
311836
|
}
|
|
311839
|
-
}, [["__scopeId", "data-v-
|
|
311837
|
+
}, [["__scopeId", "data-v-bae4cd8a"]]);
|
|
311840
311838
|
toolbarTexts = {
|
|
311841
311839
|
bold: "Bold",
|
|
311842
311840
|
fontFamily: "Font",
|
|
@@ -312312,7 +312310,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
312312
312310
|
const isFontCommand = item?.command === "setFontFamily" || item?.command === "setFontSize";
|
|
312313
312311
|
if (isDropdownOpen && isFontCommand)
|
|
312314
312312
|
return;
|
|
312315
|
-
if (!wasFocused && isMarkToggle) {
|
|
312313
|
+
if (!wasFocused && isMarkToggle && !this.activeEditor?.options?.isHeaderOrFooter) {
|
|
312316
312314
|
this.pendingMarkCommands.push({
|
|
312317
312315
|
command: command$1,
|
|
312318
312316
|
argument,
|
|
@@ -325663,7 +325661,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
|
|
|
325663
325661
|
|
|
325664
325662
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
325665
325663
|
var init_super_editor_es = __esm(() => {
|
|
325666
|
-
|
|
325664
|
+
init_src_NhQXv8uF_es();
|
|
325667
325665
|
init_SuperConverter_DEAeNCv7_es();
|
|
325668
325666
|
init_jszip_C49i9kUs_es();
|
|
325669
325667
|
init_xml_js_CqGKpaft_es();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/cli",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"superdoc": "./dist/index.js"
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"@types/node": "22.19.2",
|
|
25
25
|
"@types/ws": "^8.5.13",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"@superdoc/document-api": "0.0.1",
|
|
28
27
|
"@superdoc/pm-adapter": "0.0.0",
|
|
29
|
-
"superdoc": "
|
|
30
|
-
"@superdoc/super-editor": "0.0.1"
|
|
28
|
+
"@superdoc/document-api": "0.0.1",
|
|
29
|
+
"@superdoc/super-editor": "0.0.1",
|
|
30
|
+
"superdoc": "1.27.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.8.0-next.
|
|
38
|
-
"@superdoc-dev/cli-
|
|
39
|
-
"@superdoc-dev/cli-linux-
|
|
40
|
-
"@superdoc-dev/cli-
|
|
41
|
-
"@superdoc-dev/cli-
|
|
37
|
+
"@superdoc-dev/cli-darwin-arm64": "0.8.0-next.6",
|
|
38
|
+
"@superdoc-dev/cli-darwin-x64": "0.8.0-next.6",
|
|
39
|
+
"@superdoc-dev/cli-linux-x64": "0.8.0-next.6",
|
|
40
|
+
"@superdoc-dev/cli-linux-arm64": "0.8.0-next.6",
|
|
41
|
+
"@superdoc-dev/cli-windows-x64": "0.8.0-next.6"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"predev": "node scripts/ensure-superdoc-build.js",
|