@harbour-enterprises/superdoc 0.28.0-next.7 → 0.28.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/chunks/{PdfViewer-Bs6lahtW.cjs → PdfViewer-B13bR8VJ.cjs} +1 -1
- package/dist/chunks/{PdfViewer-Dk0kxvT5.es.js → PdfViewer-DRCcOt2t.es.js} +1 -1
- package/dist/chunks/{index-DrY82WYq.cjs → index-DcpSDyC4.cjs} +2 -2
- package/dist/chunks/{index-DW9wEJ6m.es.js → index-KRsMbx-o.es.js} +2 -2
- package/dist/chunks/{super-editor.es-BqTmBqM7.cjs → super-editor.es-BnJV-Q-L.cjs} +135 -59
- package/dist/chunks/{super-editor.es-Cv1NFWG8.es.js → super-editor.es-DKQa7RQl.es.js} +135 -59
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{editor-D8CLRqpz.js → editor-DdEaVosL.js} +144 -67
- package/dist/super-editor/chunks/{toolbar-lCqYD_z-.js → toolbar-CTt4vWNb.js} +1 -1
- package/dist/super-editor/editor.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/commands/decreaseListIndent.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/commands/increaseListIndent.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/commands/list-helpers/list-indent-helpers.d.ts +3 -0
- package/dist/super-editor/super-editor.es.js +20 -20
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +134 -58
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -9788,38 +9788,93 @@ const toggleList = (listType) => ({ editor, state, tr, dispatch }) => {
|
|
|
9788
9788
|
if (dispatch) dispatch(tr);
|
|
9789
9789
|
return true;
|
|
9790
9790
|
};
|
|
9791
|
-
const
|
|
9791
|
+
const LIST_NODE_NAMES = /* @__PURE__ */ new Set(["orderedList", "bulletList"]);
|
|
9792
|
+
const parseLevel = (value) => {
|
|
9793
|
+
if (typeof value === "number") return value;
|
|
9794
|
+
const parsed = parseInt(value, 10);
|
|
9795
|
+
return Number.isNaN(parsed) ? 0 : parsed;
|
|
9796
|
+
};
|
|
9797
|
+
const resolveParentList = ($pos) => {
|
|
9798
|
+
if (!$pos) return null;
|
|
9799
|
+
for (let depth = $pos.depth; depth >= 0; depth--) {
|
|
9800
|
+
const node2 = $pos.node(depth);
|
|
9801
|
+
if (node2?.type && LIST_NODE_NAMES.has(node2.type.name)) {
|
|
9802
|
+
return node2;
|
|
9803
|
+
}
|
|
9804
|
+
}
|
|
9805
|
+
return null;
|
|
9806
|
+
};
|
|
9807
|
+
const collectTargetListItemPositions = (state, fallbackPos) => {
|
|
9808
|
+
const doc2 = state?.doc;
|
|
9809
|
+
const listItemType = state?.schema?.nodes?.listItem;
|
|
9810
|
+
if (!doc2 || !listItemType) {
|
|
9811
|
+
return typeof fallbackPos === "number" ? [fallbackPos] : [];
|
|
9812
|
+
}
|
|
9813
|
+
const candidates = [];
|
|
9814
|
+
const { from: from2, to } = state.selection;
|
|
9815
|
+
doc2.nodesBetween(from2, to, (node2, pos) => {
|
|
9816
|
+
if (node2.type === listItemType) {
|
|
9817
|
+
const size = typeof node2.nodeSize === "number" ? node2.nodeSize : 0;
|
|
9818
|
+
candidates.push({ node: node2, pos, end: pos + size });
|
|
9819
|
+
}
|
|
9820
|
+
});
|
|
9821
|
+
if (!candidates.length && typeof fallbackPos === "number") {
|
|
9822
|
+
return [fallbackPos];
|
|
9823
|
+
}
|
|
9824
|
+
const filtered = candidates.filter(({ pos, end: end2 }) => {
|
|
9825
|
+
return !candidates.some((other) => other.pos > pos && other.pos < end2);
|
|
9826
|
+
});
|
|
9827
|
+
const sorted = filtered.map(({ pos }) => pos).sort((a2, b) => a2 - b);
|
|
9828
|
+
return sorted.filter((pos, index2) => index2 === 0 || pos !== sorted[index2 - 1]);
|
|
9829
|
+
};
|
|
9830
|
+
const decreaseListIndent = (_targetPositions) => ({ editor, tr }) => {
|
|
9792
9831
|
const { state } = editor;
|
|
9793
9832
|
const currentItem = ListHelpers.getCurrentListItem && ListHelpers.getCurrentListItem(state) || findParentNode((n) => n.type && n.type.name === "listItem")(state.selection);
|
|
9794
|
-
|
|
9795
|
-
const
|
|
9796
|
-
const
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
const
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9833
|
+
const parentOrderedHelper = ListHelpers.getParentOrderedList && ListHelpers.getParentOrderedList(state);
|
|
9834
|
+
const parentBulletHelper = ListHelpers.getParentBulletList && ListHelpers.getParentBulletList(state);
|
|
9835
|
+
const targetPositions = _targetPositions || collectTargetListItemPositions(state, currentItem?.pos);
|
|
9836
|
+
if (!targetPositions.length) return false;
|
|
9837
|
+
let parentListsMap = {};
|
|
9838
|
+
const mappedNodes = targetPositions.map((originalPos) => {
|
|
9839
|
+
const mappedPos = tr.mapping ? tr.mapping.map(originalPos) : originalPos;
|
|
9840
|
+
const node2 = tr.doc && tr.doc.nodeAt(mappedPos) || (currentItem && originalPos === currentItem.pos ? currentItem.node : null);
|
|
9841
|
+
return { originalPos, mappedPos, node: node2 };
|
|
9842
|
+
});
|
|
9843
|
+
const validNodes = mappedNodes.filter(({ node: node2 }) => node2 && node2.type.name === "listItem");
|
|
9844
|
+
validNodes.forEach(({ mappedPos, node: node2 }) => {
|
|
9845
|
+
const attrs = node2.attrs || {};
|
|
9846
|
+
const currLevel = parseLevel(attrs.level);
|
|
9847
|
+
if (currLevel <= 0) {
|
|
9848
|
+
return;
|
|
9849
|
+
}
|
|
9850
|
+
const newLevel = currLevel - 1;
|
|
9851
|
+
const $pos = tr.doc ? tr.doc.resolve(mappedPos) : null;
|
|
9852
|
+
const parentListNode = resolveParentList($pos) || parentOrderedHelper?.node || parentBulletHelper?.node || parentOrderedHelper || parentBulletHelper;
|
|
9853
|
+
parentListsMap[mappedPos] = parentListNode;
|
|
9854
|
+
if (!parentListNode) {
|
|
9855
|
+
return;
|
|
9856
|
+
}
|
|
9857
|
+
const fallbackListId = parentListNode.attrs?.listId ?? null;
|
|
9858
|
+
let numId = fallbackListId ?? attrs.numId ?? null;
|
|
9859
|
+
let createdNewId = false;
|
|
9860
|
+
if (numId == null && ListHelpers.getNewListId) {
|
|
9861
|
+
numId = ListHelpers.getNewListId(editor);
|
|
9862
|
+
createdNewId = numId != null;
|
|
9863
|
+
}
|
|
9864
|
+
if (createdNewId && numId != null && ListHelpers.generateNewListDefinition) {
|
|
9865
|
+
ListHelpers.generateNewListDefinition({
|
|
9866
|
+
numId,
|
|
9867
|
+
listType: parentListNode.type,
|
|
9868
|
+
editor
|
|
9869
|
+
});
|
|
9870
|
+
}
|
|
9871
|
+
tr.setNodeMarkup(mappedPos, null, {
|
|
9872
|
+
...attrs,
|
|
9873
|
+
level: newLevel,
|
|
9874
|
+
numId
|
|
9815
9875
|
});
|
|
9816
|
-
}
|
|
9817
|
-
tr.setNodeMarkup(currentItem.pos, null, {
|
|
9818
|
-
...attrs,
|
|
9819
|
-
level: newLevel,
|
|
9820
|
-
numId
|
|
9821
9876
|
});
|
|
9822
|
-
return true;
|
|
9877
|
+
return Object.values(parentListsMap).length ? !Object.values(parentListsMap).every((pos) => !pos) : true;
|
|
9823
9878
|
};
|
|
9824
9879
|
function isVisuallyEmptyParagraph(node2) {
|
|
9825
9880
|
if (!node2 || node2.type.name !== "paragraph") return false;
|
|
@@ -10061,30 +10116,49 @@ const deleteListItem = () => (props) => {
|
|
|
10061
10116
|
tr.setSelection(TextSelection.near($pos));
|
|
10062
10117
|
return true;
|
|
10063
10118
|
};
|
|
10064
|
-
const increaseListIndent = () => ({ editor, tr }) => {
|
|
10119
|
+
const increaseListIndent = (_targetPositions) => ({ editor, tr }) => {
|
|
10065
10120
|
const { state } = editor;
|
|
10066
10121
|
const currentItem = ListHelpers.getCurrentListItem && ListHelpers.getCurrentListItem(state) || findParentNode((n) => n.type && n.type.name === "listItem")(state.selection);
|
|
10067
|
-
|
|
10068
|
-
const
|
|
10069
|
-
const
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
const
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
numId = parentList.node?.attrs?.listId ?? ListHelpers.getNewListId(editor);
|
|
10077
|
-
if (ListHelpers.generateNewListDefinition) {
|
|
10078
|
-
const listType = parentList.node.type === editor.schema.nodes.orderedList ? editor.schema.nodes.orderedList : editor.schema.nodes.bulletList;
|
|
10079
|
-
ListHelpers.generateNewListDefinition({ numId, listType, editor });
|
|
10080
|
-
}
|
|
10081
|
-
}
|
|
10082
|
-
tr.setNodeMarkup(currentItem.pos, null, {
|
|
10083
|
-
...currAttrs,
|
|
10084
|
-
level: newLevel,
|
|
10085
|
-
numId
|
|
10122
|
+
const parentOrderedHelper = ListHelpers.getParentOrderedList && ListHelpers.getParentOrderedList(state);
|
|
10123
|
+
const parentBulletHelper = ListHelpers.getParentBulletList && ListHelpers.getParentBulletList(state);
|
|
10124
|
+
const targetPositions = _targetPositions || collectTargetListItemPositions(state, currentItem?.pos);
|
|
10125
|
+
if (!targetPositions.length) return false;
|
|
10126
|
+
let parentListsMap = {};
|
|
10127
|
+
const mappedNodes = targetPositions.map((originalPos) => {
|
|
10128
|
+
const mappedPos = tr.mapping ? tr.mapping.map(originalPos) : originalPos;
|
|
10129
|
+
const node2 = tr.doc && tr.doc.nodeAt(mappedPos) || (currentItem && originalPos === currentItem.pos ? currentItem.node : null);
|
|
10130
|
+
return { originalPos, mappedPos, node: node2 };
|
|
10086
10131
|
});
|
|
10087
|
-
|
|
10132
|
+
const validNodes = mappedNodes.filter(({ node: node2 }) => node2 && node2.type.name === "listItem");
|
|
10133
|
+
validNodes.forEach(({ mappedPos, node: node2 }) => {
|
|
10134
|
+
const attrs = node2.attrs || {};
|
|
10135
|
+
const currentLevel = parseLevel(attrs.level);
|
|
10136
|
+
const newLevel = currentLevel + 1;
|
|
10137
|
+
const $pos = tr.doc ? tr.doc.resolve(mappedPos) : null;
|
|
10138
|
+
const parentListNode = resolveParentList($pos) || parentOrderedHelper?.node || parentBulletHelper?.node || parentOrderedHelper || parentBulletHelper;
|
|
10139
|
+
parentListsMap[mappedPos] = parentListNode;
|
|
10140
|
+
if (!parentListNode) {
|
|
10141
|
+
return;
|
|
10142
|
+
}
|
|
10143
|
+
let numId = attrs.numId;
|
|
10144
|
+
if (numId == null) {
|
|
10145
|
+
const fallbackListId = parentListNode.attrs?.listId ?? null;
|
|
10146
|
+
numId = fallbackListId ?? (ListHelpers.getNewListId ? ListHelpers.getNewListId(editor) : null);
|
|
10147
|
+
if (numId != null && ListHelpers.generateNewListDefinition) {
|
|
10148
|
+
ListHelpers.generateNewListDefinition({
|
|
10149
|
+
numId,
|
|
10150
|
+
listType: parentListNode.type,
|
|
10151
|
+
editor
|
|
10152
|
+
});
|
|
10153
|
+
}
|
|
10154
|
+
}
|
|
10155
|
+
tr.setNodeMarkup(mappedPos, null, {
|
|
10156
|
+
...attrs,
|
|
10157
|
+
level: newLevel,
|
|
10158
|
+
numId
|
|
10159
|
+
});
|
|
10160
|
+
});
|
|
10161
|
+
return Object.values(parentListsMap).length ? !Object.values(parentListsMap).every((pos) => !pos) : true;
|
|
10088
10162
|
};
|
|
10089
10163
|
const isList = (n) => !!n && (n.type?.name === "orderedList" || n.type?.name === "bulletList");
|
|
10090
10164
|
const findNodePosition = (doc2, targetNode) => {
|
|
@@ -29002,10 +29076,12 @@ const getTrackChangesDecorations = (state, onlyOriginalShown, onlyModifiedShown)
|
|
|
29002
29076
|
() => {
|
|
29003
29077
|
const span = document.createElement("span");
|
|
29004
29078
|
span.classList.add("track-delete-widget");
|
|
29005
|
-
span.contentEditable = false;
|
|
29006
29079
|
return span;
|
|
29007
29080
|
},
|
|
29008
|
-
{
|
|
29081
|
+
{
|
|
29082
|
+
ignoreSelection: true,
|
|
29083
|
+
key: "stable-key"
|
|
29084
|
+
}
|
|
29009
29085
|
);
|
|
29010
29086
|
decorations.push(decorationWidget);
|
|
29011
29087
|
}
|
|
@@ -55432,26 +55508,27 @@ export {
|
|
|
55432
55508
|
_export_sfc as _,
|
|
55433
55509
|
getQuickFormatList as a,
|
|
55434
55510
|
generateLinkedStyleString as b,
|
|
55435
|
-
|
|
55436
|
-
|
|
55437
|
-
|
|
55438
|
-
|
|
55511
|
+
collectTargetListItemPositions as c,
|
|
55512
|
+
getFileOpener as d,
|
|
55513
|
+
checkAndProcessImage as e,
|
|
55514
|
+
uploadAndInsertImage as f,
|
|
55439
55515
|
global as g,
|
|
55440
|
-
|
|
55516
|
+
collectTrackedChanges as h,
|
|
55441
55517
|
isTrackedChangeActionAllowed as i,
|
|
55442
|
-
|
|
55443
|
-
|
|
55444
|
-
|
|
55445
|
-
|
|
55446
|
-
|
|
55447
|
-
|
|
55448
|
-
|
|
55449
|
-
index as q,
|
|
55518
|
+
undoDepth as j,
|
|
55519
|
+
redoDepth as k,
|
|
55520
|
+
collectTrackedChangesForContext as l,
|
|
55521
|
+
getStarterExtensions as m,
|
|
55522
|
+
getRichTextExtensions as n,
|
|
55523
|
+
Decoration as o,
|
|
55524
|
+
Extension as p,
|
|
55525
|
+
index$1 as q,
|
|
55450
55526
|
replaceSelectionWithImagePlaceholder as r,
|
|
55451
55527
|
shouldBypassContextMenu as s,
|
|
55452
|
-
|
|
55528
|
+
index as t,
|
|
55453
55529
|
useHighContrastMode as u,
|
|
55454
|
-
|
|
55455
|
-
|
|
55530
|
+
AnnotatorHelpers as v,
|
|
55531
|
+
SectionHelpers as w,
|
|
55532
|
+
getAllowedImageDimensions as x,
|
|
55456
55533
|
yUndoPluginKey as y
|
|
55457
55534
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
2
|
import { p as process$1 } from "./converter-kpd0gAZh.js";
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DdEaVosL.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function decreaseListIndent(): Function;
|
|
1
|
+
export function decreaseListIndent(_targetPositions?: any[]): Function;
|
|
@@ -9,12 +9,12 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { K as getDefaultExportFromCjs, W as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside,
|
|
12
|
+
import { K as getDefaultExportFromCjs, W as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, aw as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-kpd0gAZh.js";
|
|
13
13
|
import { c1, a6, i, a3 } from "./chunks/converter-kpd0gAZh.js";
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as
|
|
15
|
-
import {
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, m as getStarterExtensions, P as Placeholder, n as getRichTextExtensions, D as DecorationSet, o as Decoration, M as Mark, p as Extension, A as Attribute, N as Node } from "./chunks/editor-DdEaVosL.js";
|
|
15
|
+
import { v, C, w, T, q, x, t } from "./chunks/editor-DdEaVosL.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-CTt4vWNb.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
19
|
import { D } from "./chunks/docx-zipper-1SfZh-7P.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
@@ -2726,11 +2726,11 @@ class SuperToolbar extends EventEmitter {
|
|
|
2726
2726
|
* @returns {void}
|
|
2727
2727
|
*/
|
|
2728
2728
|
increaseTextIndent: ({ item, argument }) => {
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
if (
|
|
2733
|
-
return this.activeEditor.commands.increaseListIndent();
|
|
2729
|
+
const command = item.command;
|
|
2730
|
+
const { state } = this.activeEditor;
|
|
2731
|
+
const listItemsInSelection = collectTargetListItemPositions(state);
|
|
2732
|
+
if (listItemsInSelection.length) {
|
|
2733
|
+
return this.activeEditor.commands.increaseListIndent(listItemsInSelection);
|
|
2734
2734
|
}
|
|
2735
2735
|
if (command in this.activeEditor.commands) {
|
|
2736
2736
|
this.activeEditor.commands[command](argument);
|
|
@@ -2746,9 +2746,9 @@ class SuperToolbar extends EventEmitter {
|
|
|
2746
2746
|
decreaseTextIndent: ({ item, argument }) => {
|
|
2747
2747
|
let command = item.command;
|
|
2748
2748
|
let { state } = this.activeEditor;
|
|
2749
|
-
|
|
2750
|
-
if (
|
|
2751
|
-
return this.activeEditor.commands.decreaseListIndent();
|
|
2749
|
+
const listItemsInSelection = collectTargetListItemPositions(state);
|
|
2750
|
+
if (listItemsInSelection.length) {
|
|
2751
|
+
return this.activeEditor.commands.decreaseListIndent(listItemsInSelection);
|
|
2752
2752
|
}
|
|
2753
2753
|
if (command in this.activeEditor.commands) {
|
|
2754
2754
|
this.activeEditor.commands[command](argument);
|
|
@@ -3266,7 +3266,7 @@ runCommandWithArgumentOnly_fn = function({ item, argument, noArgumentCallback =
|
|
|
3266
3266
|
};
|
|
3267
3267
|
const onMarginClickCursorChange = (event, editor) => {
|
|
3268
3268
|
const y = event.clientY;
|
|
3269
|
-
const
|
|
3269
|
+
const x2 = event.clientX;
|
|
3270
3270
|
const { view } = editor;
|
|
3271
3271
|
const editorRect = view.dom.getBoundingClientRect();
|
|
3272
3272
|
let coords = {
|
|
@@ -3274,10 +3274,10 @@ const onMarginClickCursorChange = (event, editor) => {
|
|
|
3274
3274
|
top: y
|
|
3275
3275
|
};
|
|
3276
3276
|
let isRightMargin = false;
|
|
3277
|
-
if (
|
|
3277
|
+
if (x2 > editorRect.right) {
|
|
3278
3278
|
coords.left = editorRect.left + editorRect.width - 1;
|
|
3279
3279
|
isRightMargin = true;
|
|
3280
|
-
} else if (
|
|
3280
|
+
} else if (x2 < editorRect.left) {
|
|
3281
3281
|
coords.left = editorRect.left;
|
|
3282
3282
|
}
|
|
3283
3283
|
const pos = view.posAtCoords(coords)?.pos;
|
|
@@ -5188,13 +5188,13 @@ const Extensions = {
|
|
|
5188
5188
|
};
|
|
5189
5189
|
export {
|
|
5190
5190
|
AIWriter,
|
|
5191
|
-
|
|
5191
|
+
v as AnnotatorHelpers,
|
|
5192
5192
|
c1 as BasicUpload,
|
|
5193
5193
|
C as CommentsPluginKey,
|
|
5194
5194
|
D as DocxZipper,
|
|
5195
5195
|
Editor,
|
|
5196
5196
|
Extensions,
|
|
5197
|
-
|
|
5197
|
+
w as SectionHelpers,
|
|
5198
5198
|
_sfc_main$4 as SlashMenu,
|
|
5199
5199
|
a6 as SuperConverter,
|
|
5200
5200
|
SuperEditor,
|
|
@@ -5203,13 +5203,13 @@ export {
|
|
|
5203
5203
|
Toolbar,
|
|
5204
5204
|
T as TrackChangesBasePluginKey,
|
|
5205
5205
|
createZip,
|
|
5206
|
-
|
|
5206
|
+
q as fieldAnnotationHelpers,
|
|
5207
5207
|
getActiveFormatting,
|
|
5208
|
-
|
|
5208
|
+
x as getAllowedImageDimensions,
|
|
5209
5209
|
i as getMarksFromSelection,
|
|
5210
5210
|
getRichTextExtensions,
|
|
5211
5211
|
getStarterExtensions,
|
|
5212
5212
|
a3 as helpers,
|
|
5213
5213
|
registeredHandlers,
|
|
5214
|
-
|
|
5214
|
+
t as trackChangesHelpers
|
|
5215
5215
|
};
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BnJV-Q-L.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-DKQa7RQl.es.js";
|
|
2
2
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-BnJV-Q-L.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-DcpSDyC4.cjs");
|
|
5
5
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-DKQa7RQl.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-KRsMbx-o.es.js";
|
|
3
3
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
export {
|