@tailor-cms/ce-html-edit 2.0.0 → 2.0.1
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/LICENSE +21 -0
- package/README.md +54 -1
- package/dist/index.cjs +356 -275
- package/dist/index.js +356 -275
- package/package.json +18 -10
package/dist/index.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
}
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$2(target, "default", {
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp$2(target, "default", {
|
|
24
24
|
value: mod,
|
|
25
25
|
enumerable: true
|
|
26
26
|
}) : target, mod));
|
|
@@ -252,8 +252,10 @@ var Fragment = class Fragment {
|
|
|
252
252
|
let text = "", first = true;
|
|
253
253
|
this.nodesBetween(from, to, (node, pos) => {
|
|
254
254
|
let nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : "";
|
|
255
|
-
if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator)
|
|
256
|
-
|
|
255
|
+
if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {
|
|
256
|
+
if (first) first = false;
|
|
257
|
+
else text += blockSeparator;
|
|
258
|
+
}
|
|
257
259
|
text += nodeText;
|
|
258
260
|
}, 0);
|
|
259
261
|
return text;
|
|
@@ -282,8 +284,10 @@ var Fragment = class Fragment {
|
|
|
282
284
|
if (to > from) for (let i = 0, pos = 0; pos < to; i++) {
|
|
283
285
|
let child = this.content[i], end = pos + child.nodeSize;
|
|
284
286
|
if (end > from) {
|
|
285
|
-
if (pos < from || end > to)
|
|
286
|
-
|
|
287
|
+
if (pos < from || end > to) {
|
|
288
|
+
if (child.isText) child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));
|
|
289
|
+
else child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));
|
|
290
|
+
}
|
|
287
291
|
result.push(child);
|
|
288
292
|
size += child.nodeSize;
|
|
289
293
|
}
|
|
@@ -1067,7 +1071,8 @@ var ResolveCache = class {
|
|
|
1067
1071
|
this.i = 0;
|
|
1068
1072
|
}
|
|
1069
1073
|
};
|
|
1070
|
-
var resolveCacheSize = 12
|
|
1074
|
+
var resolveCacheSize = 12;
|
|
1075
|
+
var resolveCache = /* @__PURE__ */ new WeakMap();
|
|
1071
1076
|
/**
|
|
1072
1077
|
Represents a flat range of content, i.e. one that starts and
|
|
1073
1078
|
ends in the same node.
|
|
@@ -1811,8 +1816,10 @@ function parseNum(stream) {
|
|
|
1811
1816
|
}
|
|
1812
1817
|
function parseExprRange(stream, expr) {
|
|
1813
1818
|
let min = parseNum(stream), max = min;
|
|
1814
|
-
if (stream.eat(","))
|
|
1815
|
-
|
|
1819
|
+
if (stream.eat(",")) {
|
|
1820
|
+
if (stream.next != "}") max = parseNum(stream);
|
|
1821
|
+
else max = -1;
|
|
1822
|
+
}
|
|
1816
1823
|
if (!stream.eat("}")) stream.err("Unclosed braced range");
|
|
1817
1824
|
return {
|
|
1818
1825
|
type: "range",
|
|
@@ -2554,10 +2561,12 @@ var listTags = {
|
|
|
2554
2561
|
ol: true,
|
|
2555
2562
|
ul: true
|
|
2556
2563
|
};
|
|
2557
|
-
var OPT_PRESERVE_WS = 1
|
|
2564
|
+
var OPT_PRESERVE_WS = 1;
|
|
2565
|
+
var OPT_PRESERVE_WS_FULL = 2;
|
|
2566
|
+
var OPT_OPEN_LEFT = 4;
|
|
2558
2567
|
function wsOptionsFor(type, preserveWhitespace, base) {
|
|
2559
2568
|
if (preserveWhitespace != null) return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
|
|
2560
|
-
return type && type.whitespace == "pre" ?
|
|
2569
|
+
return type && type.whitespace == "pre" ? 3 : base & -5;
|
|
2561
2570
|
}
|
|
2562
2571
|
var NodeContext = class {
|
|
2563
2572
|
constructor(type, attrs, marks, solid, match, options) {
|
|
@@ -3065,11 +3074,14 @@ function suspiciousAttributes(attrs) {
|
|
|
3065
3074
|
function suspiciousAttributesInner(attrs) {
|
|
3066
3075
|
let result = null;
|
|
3067
3076
|
function scan(value) {
|
|
3068
|
-
if (value && typeof value == "object")
|
|
3069
|
-
if (
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3077
|
+
if (value && typeof value == "object") {
|
|
3078
|
+
if (Array.isArray(value)) {
|
|
3079
|
+
if (typeof value[0] == "string") {
|
|
3080
|
+
if (!result) result = [];
|
|
3081
|
+
result.push(value);
|
|
3082
|
+
} else for (let i = 0; i < value.length; i++) scan(value[i]);
|
|
3083
|
+
} else for (let prop in value) scan(value[prop]);
|
|
3084
|
+
}
|
|
3073
3085
|
}
|
|
3074
3086
|
scan(attrs);
|
|
3075
3087
|
return result;
|
|
@@ -3133,7 +3145,10 @@ function recoverIndex(value) {
|
|
|
3133
3145
|
function recoverOffset(value) {
|
|
3134
3146
|
return (value - (value & lower16)) / factor16;
|
|
3135
3147
|
}
|
|
3136
|
-
var DEL_BEFORE = 1
|
|
3148
|
+
var DEL_BEFORE = 1;
|
|
3149
|
+
var DEL_AFTER = 2;
|
|
3150
|
+
var DEL_ACROSS = 4;
|
|
3151
|
+
var DEL_SIDE = 8;
|
|
3137
3152
|
/**
|
|
3138
3153
|
An object representing a mapped position with extra
|
|
3139
3154
|
information.
|
|
@@ -3159,13 +3174,13 @@ var MapResult = class {
|
|
|
3159
3174
|
Tells you whether the token before the mapped position was deleted.
|
|
3160
3175
|
*/
|
|
3161
3176
|
get deletedBefore() {
|
|
3162
|
-
return (this.delInfo &
|
|
3177
|
+
return (this.delInfo & 5) > 0;
|
|
3163
3178
|
}
|
|
3164
3179
|
/**
|
|
3165
3180
|
True when the token after the mapped position was deleted.
|
|
3166
3181
|
*/
|
|
3167
3182
|
get deletedAfter() {
|
|
3168
|
-
return (this.delInfo &
|
|
3183
|
+
return (this.delInfo & 6) > 0;
|
|
3169
3184
|
}
|
|
3170
3185
|
/**
|
|
3171
3186
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -3884,8 +3899,10 @@ function addMark(tr, from, to, mark) {
|
|
|
3884
3899
|
if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {
|
|
3885
3900
|
let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);
|
|
3886
3901
|
let newSet = mark.addToSet(marks);
|
|
3887
|
-
for (let i = 0; i < marks.length; i++) if (!marks[i].isInSet(newSet))
|
|
3888
|
-
|
|
3902
|
+
for (let i = 0; i < marks.length; i++) if (!marks[i].isInSet(newSet)) {
|
|
3903
|
+
if (removing && removing.to == start && removing.mark.eq(marks[i])) removing.to = end;
|
|
3904
|
+
else removed.push(removing = new RemoveMarkStep(start, end, marks[i]));
|
|
3905
|
+
}
|
|
3889
3906
|
if (adding && adding.to == start) adding.to = end;
|
|
3890
3907
|
else added.push(adding = new AddMarkStep(start, end, mark));
|
|
3891
3908
|
}
|
|
@@ -5240,10 +5257,12 @@ var TextSelection = class TextSelection extends Selection$1 {
|
|
|
5240
5257
|
if (found) $head = found.$head;
|
|
5241
5258
|
else return Selection$1.near($head, bias);
|
|
5242
5259
|
}
|
|
5243
|
-
if (!$anchor.parent.inlineContent)
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5260
|
+
if (!$anchor.parent.inlineContent) {
|
|
5261
|
+
if (dPos == 0) $anchor = $head;
|
|
5262
|
+
else {
|
|
5263
|
+
$anchor = (Selection$1.findFrom($anchor, -bias, true) || Selection$1.findFrom($anchor, bias, true)).$anchor;
|
|
5264
|
+
if ($anchor.pos < $head.pos != dPos < 0) $anchor = $head;
|
|
5265
|
+
}
|
|
5247
5266
|
}
|
|
5248
5267
|
return new TextSelection($anchor, $head);
|
|
5249
5268
|
}
|
|
@@ -5408,7 +5427,9 @@ function selectionToInsertionEnd$1(tr, startLen, bias) {
|
|
|
5408
5427
|
});
|
|
5409
5428
|
tr.setSelection(Selection$1.near(tr.doc.resolve(end), bias));
|
|
5410
5429
|
}
|
|
5411
|
-
var UPDATED_SEL = 1
|
|
5430
|
+
var UPDATED_SEL = 1;
|
|
5431
|
+
var UPDATED_MARKS = 2;
|
|
5432
|
+
var UPDATED_SCROLL = 4;
|
|
5412
5433
|
/**
|
|
5413
5434
|
An editor state transaction, which can be applied to a state to
|
|
5414
5435
|
create an updated state. Use
|
|
@@ -5465,7 +5486,7 @@ var Transaction = class extends Transform {
|
|
|
5465
5486
|
if (selection.$from.doc != this.doc) throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
5466
5487
|
this.curSelection = selection;
|
|
5467
5488
|
this.curSelectionFor = this.steps.length;
|
|
5468
|
-
this.updated = (this.updated | UPDATED_SEL) &
|
|
5489
|
+
this.updated = (this.updated | UPDATED_SEL) & -3;
|
|
5469
5490
|
this.storedMarks = null;
|
|
5470
5491
|
return this;
|
|
5471
5492
|
}
|
|
@@ -5515,7 +5536,7 @@ var Transaction = class extends Transform {
|
|
|
5515
5536
|
*/
|
|
5516
5537
|
addStep(step, doc) {
|
|
5517
5538
|
super.addStep(step, doc);
|
|
5518
|
-
this.updated = this.updated &
|
|
5539
|
+
this.updated = this.updated & -3;
|
|
5519
5540
|
this.storedMarks = null;
|
|
5520
5541
|
}
|
|
5521
5542
|
/**
|
|
@@ -6639,9 +6660,10 @@ function scanFor(node, off, targetNode, targetOff, dir) {
|
|
|
6639
6660
|
node = parent;
|
|
6640
6661
|
} else if (node.nodeType == 1) {
|
|
6641
6662
|
let child = node.childNodes[off + (dir < 0 ? -1 : 0)];
|
|
6642
|
-
if (child.nodeType == 1 && child.contentEditable == "false")
|
|
6643
|
-
|
|
6644
|
-
|
|
6663
|
+
if (child.nodeType == 1 && child.contentEditable == "false") {
|
|
6664
|
+
if ((_a = child.pmViewDesc) === null || _a === void 0 ? void 0 : _a.ignoreForSelection) off += dir;
|
|
6665
|
+
else return false;
|
|
6666
|
+
} else {
|
|
6645
6667
|
node = child;
|
|
6646
6668
|
off = dir < 0 ? nodeSize(node) : 0;
|
|
6647
6669
|
}
|
|
@@ -6789,18 +6811,20 @@ function scrollRectIntoView(view, rect, startDOM) {
|
|
|
6789
6811
|
else if (rect.bottom > bounding.bottom - getSide$1(scrollThreshold, "bottom")) moveY = rect.bottom - rect.top > bounding.bottom - bounding.top ? rect.top + getSide$1(scrollMargin, "top") - bounding.top : rect.bottom - bounding.bottom + getSide$1(scrollMargin, "bottom");
|
|
6790
6812
|
if (rect.left < bounding.left + getSide$1(scrollThreshold, "left")) moveX = -(bounding.left - rect.left + getSide$1(scrollMargin, "left"));
|
|
6791
6813
|
else if (rect.right > bounding.right - getSide$1(scrollThreshold, "right")) moveX = rect.right - bounding.right + getSide$1(scrollMargin, "right");
|
|
6792
|
-
if (moveX || moveY)
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6814
|
+
if (moveX || moveY) {
|
|
6815
|
+
if (atTop) doc.defaultView.scrollBy(moveX, moveY);
|
|
6816
|
+
else {
|
|
6817
|
+
let startX = elt.scrollLeft, startY = elt.scrollTop;
|
|
6818
|
+
if (moveY) elt.scrollTop += moveY;
|
|
6819
|
+
if (moveX) elt.scrollLeft += moveX;
|
|
6820
|
+
let dX = elt.scrollLeft - startX, dY = elt.scrollTop - startY;
|
|
6821
|
+
rect = {
|
|
6822
|
+
left: rect.left - dX,
|
|
6823
|
+
top: rect.top - dY,
|
|
6824
|
+
right: rect.right - dX,
|
|
6825
|
+
bottom: rect.bottom - dY
|
|
6826
|
+
};
|
|
6827
|
+
}
|
|
6804
6828
|
}
|
|
6805
6829
|
let pos = atTop ? "fixed" : getComputedStyle(parent).position;
|
|
6806
6830
|
if (/^(fixed|sticky)$/.test(pos)) break;
|
|
@@ -7032,27 +7056,29 @@ var BIDI = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
|
7032
7056
|
function coordsAtPos(view, pos, side) {
|
|
7033
7057
|
let { node, offset, atom } = view.docView.domFromPos(pos, side < 0 ? -1 : 1);
|
|
7034
7058
|
let supportEmptyRange = webkit || gecko;
|
|
7035
|
-
if (node.nodeType == 3)
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7059
|
+
if (node.nodeType == 3) {
|
|
7060
|
+
if (supportEmptyRange && (BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {
|
|
7061
|
+
let rect = singleRect(textRange(node, offset, offset), side);
|
|
7062
|
+
if (gecko && offset && /\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {
|
|
7063
|
+
let rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);
|
|
7064
|
+
if (rectBefore.top == rect.top) {
|
|
7065
|
+
let rectAfter = singleRect(textRange(node, offset, offset + 1), -1);
|
|
7066
|
+
if (rectAfter.top != rect.top) return flattenV(rectAfter, rectAfter.left < rectBefore.left);
|
|
7067
|
+
}
|
|
7042
7068
|
}
|
|
7069
|
+
return rect;
|
|
7070
|
+
} else {
|
|
7071
|
+
let from = offset, to = offset, takeSide = side < 0 ? 1 : -1;
|
|
7072
|
+
if (side < 0 && !offset) {
|
|
7073
|
+
to++;
|
|
7074
|
+
takeSide = -1;
|
|
7075
|
+
} else if (side >= 0 && offset == node.nodeValue.length) {
|
|
7076
|
+
from--;
|
|
7077
|
+
takeSide = 1;
|
|
7078
|
+
} else if (side < 0) from--;
|
|
7079
|
+
else to++;
|
|
7080
|
+
return flattenV(singleRect(textRange(node, from, to), takeSide), takeSide < 0);
|
|
7043
7081
|
}
|
|
7044
|
-
return rect;
|
|
7045
|
-
} else {
|
|
7046
|
-
let from = offset, to = offset, takeSide = side < 0 ? 1 : -1;
|
|
7047
|
-
if (side < 0 && !offset) {
|
|
7048
|
-
to++;
|
|
7049
|
-
takeSide = -1;
|
|
7050
|
-
} else if (side >= 0 && offset == node.nodeValue.length) {
|
|
7051
|
-
from--;
|
|
7052
|
-
takeSide = 1;
|
|
7053
|
-
} else if (side < 0) from--;
|
|
7054
|
-
else to++;
|
|
7055
|
-
return flattenV(singleRect(textRange(node, from, to), takeSide), takeSide < 0);
|
|
7056
7082
|
}
|
|
7057
7083
|
if (!view.state.doc.resolve(pos - (atom || 0)).parent.inlineContent) {
|
|
7058
7084
|
if (atom == null && offset && (side < 0 || offset == nodeSize(node))) {
|
|
@@ -7169,7 +7195,10 @@ function endOfTextblock(view, state, dir) {
|
|
|
7169
7195
|
cachedDir = dir;
|
|
7170
7196
|
return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);
|
|
7171
7197
|
}
|
|
7172
|
-
var NOT_DIRTY = 0
|
|
7198
|
+
var NOT_DIRTY = 0;
|
|
7199
|
+
var CHILD_DIRTY = 1;
|
|
7200
|
+
var CONTENT_DIRTY = 2;
|
|
7201
|
+
var NODE_DIRTY = 3;
|
|
7173
7202
|
var ViewDesc = class {
|
|
7174
7203
|
constructor(parent, children, dom, contentDOM) {
|
|
7175
7204
|
this.parent = parent;
|
|
@@ -7230,24 +7259,26 @@ var ViewDesc = class {
|
|
|
7230
7259
|
return this.posAtStart + this.size - 2 * this.border;
|
|
7231
7260
|
}
|
|
7232
7261
|
localPosFromDOM(dom, offset, bias) {
|
|
7233
|
-
if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode))
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7262
|
+
if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {
|
|
7263
|
+
if (bias < 0) {
|
|
7264
|
+
let domBefore, desc;
|
|
7265
|
+
if (dom == this.contentDOM) domBefore = dom.childNodes[offset - 1];
|
|
7266
|
+
else {
|
|
7267
|
+
while (dom.parentNode != this.contentDOM) dom = dom.parentNode;
|
|
7268
|
+
domBefore = dom.previousSibling;
|
|
7269
|
+
}
|
|
7270
|
+
while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) domBefore = domBefore.previousSibling;
|
|
7271
|
+
return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart;
|
|
7272
|
+
} else {
|
|
7273
|
+
let domAfter, desc;
|
|
7274
|
+
if (dom == this.contentDOM) domAfter = dom.childNodes[offset];
|
|
7275
|
+
else {
|
|
7276
|
+
while (dom.parentNode != this.contentDOM) dom = dom.parentNode;
|
|
7277
|
+
domAfter = dom.nextSibling;
|
|
7278
|
+
}
|
|
7279
|
+
while (domAfter && !((desc = domAfter.pmViewDesc) && desc.parent == this)) domAfter = domAfter.nextSibling;
|
|
7280
|
+
return domAfter ? this.posBeforeChild(desc) : this.posAtEnd;
|
|
7248
7281
|
}
|
|
7249
|
-
while (domAfter && !((desc = domAfter.pmViewDesc) && desc.parent == this)) domAfter = domAfter.nextSibling;
|
|
7250
|
-
return domAfter ? this.posBeforeChild(desc) : this.posAtEnd;
|
|
7251
7282
|
}
|
|
7252
7283
|
let atEnd;
|
|
7253
7284
|
if (dom == this.dom && this.contentDOM) atEnd = offset > domIndex(this.contentDOM);
|
|
@@ -7273,8 +7304,10 @@ var ViewDesc = class {
|
|
|
7273
7304
|
nearestDesc(dom, onlyNodes = false) {
|
|
7274
7305
|
for (let first = true, cur = dom; cur; cur = cur.parentNode) {
|
|
7275
7306
|
let desc = this.getDesc(cur), nodeDOM;
|
|
7276
|
-
if (desc && (!onlyNodes || desc.node))
|
|
7277
|
-
|
|
7307
|
+
if (desc && (!onlyNodes || desc.node)) {
|
|
7308
|
+
if (first && (nodeDOM = desc.nodeDOM) && !(nodeDOM.nodeType == 1 ? nodeDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode) : nodeDOM == dom)) first = false;
|
|
7309
|
+
else return desc;
|
|
7310
|
+
}
|
|
7278
7311
|
}
|
|
7279
7312
|
}
|
|
7280
7313
|
getDesc(dom) {
|
|
@@ -8223,13 +8256,17 @@ function iterDeco(parent, deco, onWidget, onNode) {
|
|
|
8223
8256
|
let widget, widgets;
|
|
8224
8257
|
while (decoIndex < locals.length && locals[decoIndex].to == offset) {
|
|
8225
8258
|
let next = locals[decoIndex++];
|
|
8226
|
-
if (next.widget)
|
|
8227
|
-
|
|
8259
|
+
if (next.widget) {
|
|
8260
|
+
if (!widget) widget = next;
|
|
8261
|
+
else (widgets || (widgets = [widget])).push(next);
|
|
8262
|
+
}
|
|
8263
|
+
}
|
|
8264
|
+
if (widget) {
|
|
8265
|
+
if (widgets) {
|
|
8266
|
+
widgets.sort(compareSide);
|
|
8267
|
+
for (let i = 0; i < widgets.length; i++) onWidget(widgets[i], parentIndex, !!restNode);
|
|
8268
|
+
} else onWidget(widget, parentIndex, !!restNode);
|
|
8228
8269
|
}
|
|
8229
|
-
if (widget) if (widgets) {
|
|
8230
|
-
widgets.sort(compareSide);
|
|
8231
|
-
for (let i = 0; i < widgets.length; i++) onWidget(widgets[i], parentIndex, !!restNode);
|
|
8232
|
-
} else onWidget(widget, parentIndex, !!restNode);
|
|
8233
8270
|
let child, index;
|
|
8234
8271
|
if (restNode) {
|
|
8235
8272
|
index = -1;
|
|
@@ -8519,18 +8556,19 @@ function skipIgnoredNodesBefore(view) {
|
|
|
8519
8556
|
if (!node) return;
|
|
8520
8557
|
let moveNode, moveOffset, force = false;
|
|
8521
8558
|
if (gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset], -1)) force = true;
|
|
8522
|
-
for (;;) if (offset > 0)
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8559
|
+
for (;;) if (offset > 0) {
|
|
8560
|
+
if (node.nodeType != 1) break;
|
|
8561
|
+
else {
|
|
8562
|
+
let before = node.childNodes[offset - 1];
|
|
8563
|
+
if (isIgnorable(before, -1)) {
|
|
8564
|
+
moveNode = node;
|
|
8565
|
+
moveOffset = --offset;
|
|
8566
|
+
} else if (before.nodeType == 3) {
|
|
8567
|
+
node = before;
|
|
8568
|
+
offset = node.nodeValue.length;
|
|
8569
|
+
} else break;
|
|
8570
|
+
}
|
|
8571
|
+
} else if (isBlockNode(node)) break;
|
|
8534
8572
|
else {
|
|
8535
8573
|
let prev = node.previousSibling;
|
|
8536
8574
|
while (prev && isIgnorable(prev, -1)) {
|
|
@@ -9701,7 +9739,8 @@ var Decoration = class Decoration {
|
|
|
9701
9739
|
return this.type instanceof WidgetType;
|
|
9702
9740
|
}
|
|
9703
9741
|
};
|
|
9704
|
-
var none = []
|
|
9742
|
+
var none = [];
|
|
9743
|
+
var noSpec = {};
|
|
9705
9744
|
/**
|
|
9706
9745
|
A collection of [decorations](https://prosemirror.net/docs/ref/#view.Decoration), organized in such
|
|
9707
9746
|
a way that the drawing algorithm can efficiently use and compare
|
|
@@ -10515,21 +10554,23 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
|
|
|
10515
10554
|
view.input.lastIOSEnter = 0;
|
|
10516
10555
|
return;
|
|
10517
10556
|
}
|
|
10518
|
-
if (!change)
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10557
|
+
if (!change) {
|
|
10558
|
+
if (typeOver && sel instanceof TextSelection && !sel.empty && sel.$head.sameParent(sel.$anchor) && !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) change = {
|
|
10559
|
+
start: sel.from,
|
|
10560
|
+
endA: sel.to,
|
|
10561
|
+
endB: sel.to
|
|
10562
|
+
};
|
|
10563
|
+
else {
|
|
10564
|
+
if (parse.sel) {
|
|
10565
|
+
let sel = resolveSelection(view, view.state.doc, parse.sel);
|
|
10566
|
+
if (sel && !sel.eq(view.state.selection)) {
|
|
10567
|
+
let tr = view.state.tr.setSelection(sel);
|
|
10568
|
+
if (compositionID) tr.setMeta("composition", compositionID);
|
|
10569
|
+
view.dispatch(tr);
|
|
10570
|
+
}
|
|
10530
10571
|
}
|
|
10572
|
+
return;
|
|
10531
10573
|
}
|
|
10532
|
-
return;
|
|
10533
10574
|
}
|
|
10534
10575
|
if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof TextSelection) {
|
|
10535
10576
|
if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse.from) change.start = view.state.selection.from;
|
|
@@ -10576,26 +10617,27 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
|
|
|
10576
10617
|
return tr.scrollIntoView();
|
|
10577
10618
|
};
|
|
10578
10619
|
let markChange;
|
|
10579
|
-
if (inlineChange)
|
|
10580
|
-
if (
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10620
|
+
if (inlineChange) {
|
|
10621
|
+
if ($from.pos == $to.pos) {
|
|
10622
|
+
if (ie$1 && ie_version <= 11 && $from.parentOffset == 0) {
|
|
10623
|
+
view.domObserver.suppressSelectionUpdates();
|
|
10624
|
+
setTimeout(() => selectionToDOM(view), 20);
|
|
10625
|
+
}
|
|
10626
|
+
let tr = mkTr(view.state.tr.delete(chFrom, chTo));
|
|
10627
|
+
let marks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));
|
|
10628
|
+
if (marks) tr.ensureMarks(marks);
|
|
10629
|
+
view.dispatch(tr);
|
|
10630
|
+
} else if (change.endA == change.endB && (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset), $fromA.parent.content.cut($fromA.parentOffset, change.endA - $fromA.start())))) {
|
|
10631
|
+
let tr = mkTr(view.state.tr);
|
|
10632
|
+
if (markChange.type == "add") tr.addMark(chFrom, chTo, markChange.mark);
|
|
10633
|
+
else tr.removeMark(chFrom, chTo, markChange.mark);
|
|
10634
|
+
view.dispatch(tr);
|
|
10635
|
+
} else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {
|
|
10636
|
+
let text = $from.parent.textBetween($from.parentOffset, $to.parentOffset);
|
|
10637
|
+
let deflt = () => mkTr(view.state.tr.insertText(text, chFrom, chTo));
|
|
10638
|
+
if (!view.someProp("handleTextInput", (f) => f(view, chFrom, chTo, text, deflt))) view.dispatch(deflt());
|
|
10639
|
+
} else view.dispatch(mkTr());
|
|
10597
10640
|
} else view.dispatch(mkTr());
|
|
10598
|
-
else view.dispatch(mkTr());
|
|
10599
10641
|
}
|
|
10600
10642
|
function resolveSelection(view, doc, parsedSel) {
|
|
10601
10643
|
if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) return null;
|
|
@@ -11291,9 +11333,10 @@ function normalizeKeyName$1(name) {
|
|
|
11291
11333
|
else if (/^a(lt)?$/i.test(mod)) alt = true;
|
|
11292
11334
|
else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;
|
|
11293
11335
|
else if (/^s(hift)?$/i.test(mod)) shift = true;
|
|
11294
|
-
else if (/^mod$/i.test(mod))
|
|
11295
|
-
|
|
11296
|
-
|
|
11336
|
+
else if (/^mod$/i.test(mod)) {
|
|
11337
|
+
if (mac) meta = true;
|
|
11338
|
+
else ctrl = true;
|
|
11339
|
+
} else throw new Error("Unrecognized modifier name: " + mod);
|
|
11297
11340
|
}
|
|
11298
11341
|
if (alt) result = "Alt-" + result;
|
|
11299
11342
|
if (ctrl) result = "Ctrl-" + result;
|
|
@@ -12047,9 +12090,10 @@ function normalizeKeyName(name) {
|
|
|
12047
12090
|
else if (/^a(lt)?$/i.test(mod)) alt = true;
|
|
12048
12091
|
else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;
|
|
12049
12092
|
else if (/^s(hift)?$/i.test(mod)) shift = true;
|
|
12050
|
-
else if (/^mod$/i.test(mod))
|
|
12051
|
-
|
|
12052
|
-
|
|
12093
|
+
else if (/^mod$/i.test(mod)) {
|
|
12094
|
+
if (isiOS() || isMacOS()) meta = true;
|
|
12095
|
+
else ctrl = true;
|
|
12096
|
+
} else throw new Error(`Unrecognized modifier name: ${mod}`);
|
|
12053
12097
|
}
|
|
12054
12098
|
if (alt) result = `Alt-${result}`;
|
|
12055
12099
|
if (ctrl) result = `Ctrl-${result}`;
|
|
@@ -12938,27 +12982,29 @@ var setMark = (typeOrName, attributes = {}) => ({ tr, state, dispatch }) => {
|
|
|
12938
12982
|
const { selection } = tr;
|
|
12939
12983
|
const { empty, ranges } = selection;
|
|
12940
12984
|
const type = getMarkType(typeOrName, state.schema);
|
|
12941
|
-
if (dispatch)
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
if (
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12985
|
+
if (dispatch) {
|
|
12986
|
+
if (empty) {
|
|
12987
|
+
const oldAttributes = getMarkAttributes(state, type);
|
|
12988
|
+
tr.addStoredMark(type.create({
|
|
12989
|
+
...oldAttributes,
|
|
12990
|
+
...attributes
|
|
12991
|
+
}));
|
|
12992
|
+
} else ranges.forEach((range) => {
|
|
12993
|
+
const from = range.$from.pos;
|
|
12994
|
+
const to = range.$to.pos;
|
|
12995
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
12996
|
+
const trimmedFrom = Math.max(pos, from);
|
|
12997
|
+
const trimmedTo = Math.min(pos + node.nodeSize, to);
|
|
12998
|
+
if (node.marks.find((mark) => mark.type === type)) node.marks.forEach((mark) => {
|
|
12999
|
+
if (type === mark.type) tr.addMark(trimmedFrom, trimmedTo, type.create({
|
|
13000
|
+
...mark.attrs,
|
|
13001
|
+
...attributes
|
|
13002
|
+
}));
|
|
13003
|
+
});
|
|
13004
|
+
else tr.addMark(trimmedFrom, trimmedTo, type.create(attributes));
|
|
12958
13005
|
});
|
|
12959
|
-
else tr.addMark(trimmedFrom, trimmedTo, type.create(attributes));
|
|
12960
13006
|
});
|
|
12961
|
-
}
|
|
13007
|
+
}
|
|
12962
13008
|
return canSetMark(state, tr, type);
|
|
12963
13009
|
};
|
|
12964
13010
|
var setMeta = (key, value) => ({ tr }) => {
|
|
@@ -13417,8 +13463,10 @@ var EventEmitter = class {
|
|
|
13417
13463
|
}
|
|
13418
13464
|
off(event, fn) {
|
|
13419
13465
|
const callbacks = this.callbacks[event];
|
|
13420
|
-
if (callbacks)
|
|
13421
|
-
|
|
13466
|
+
if (callbacks) {
|
|
13467
|
+
if (fn) this.callbacks[event] = callbacks.filter((callback) => callback !== fn);
|
|
13468
|
+
else delete this.callbacks[event];
|
|
13469
|
+
}
|
|
13422
13470
|
return this;
|
|
13423
13471
|
}
|
|
13424
13472
|
once(event, fn) {
|
|
@@ -13515,10 +13563,11 @@ function inputRulesPlugin(props) {
|
|
|
13515
13563
|
if (typeof text === "string") text = text;
|
|
13516
13564
|
else text = getHTMLFromFragment(Fragment.from(text), state.schema);
|
|
13517
13565
|
const { from } = simulatedInputMeta;
|
|
13566
|
+
const to = from + text.length;
|
|
13518
13567
|
run$2({
|
|
13519
13568
|
editor,
|
|
13520
13569
|
from,
|
|
13521
|
-
to
|
|
13570
|
+
to,
|
|
13522
13571
|
text,
|
|
13523
13572
|
rules,
|
|
13524
13573
|
plugin
|
|
@@ -13639,7 +13688,8 @@ var Mark = class _Mark extends Extendable {
|
|
|
13639
13688
|
* @param config - Mark configuration object or a function that returns a configuration object
|
|
13640
13689
|
*/
|
|
13641
13690
|
static create(config = {}) {
|
|
13642
|
-
|
|
13691
|
+
const resolvedConfig = typeof config === "function" ? config() : config;
|
|
13692
|
+
return new _Mark(resolvedConfig);
|
|
13643
13693
|
}
|
|
13644
13694
|
static handleExit({ editor, mark }) {
|
|
13645
13695
|
const { tr } = editor.state;
|
|
@@ -13746,12 +13796,13 @@ function pasteRulesPlugin(props) {
|
|
|
13746
13796
|
}
|
|
13747
13797
|
const processEvent = ({ state, from, to, rule, pasteEvt }) => {
|
|
13748
13798
|
const tr = state.tr;
|
|
13799
|
+
const chainableState = createChainableState({
|
|
13800
|
+
state,
|
|
13801
|
+
transaction: tr
|
|
13802
|
+
});
|
|
13749
13803
|
if (!run2({
|
|
13750
13804
|
editor,
|
|
13751
|
-
state:
|
|
13752
|
-
state,
|
|
13753
|
-
transaction: tr
|
|
13754
|
-
}),
|
|
13805
|
+
state: chainableState,
|
|
13755
13806
|
from: Math.max(from - 1, 0),
|
|
13756
13807
|
to: to.b - 1,
|
|
13757
13808
|
rule,
|
|
@@ -13963,6 +14014,7 @@ var ExtensionManager = class {
|
|
|
13963
14014
|
const nodeViewResult = addNodeView();
|
|
13964
14015
|
if (!nodeViewResult) return [];
|
|
13965
14016
|
const nodeview = (node, view, getPos, decorations, innerDecorations) => {
|
|
14017
|
+
const HTMLAttributes = getRenderedAttributes(node, extensionAttributes);
|
|
13966
14018
|
return nodeViewResult({
|
|
13967
14019
|
node,
|
|
13968
14020
|
view,
|
|
@@ -13971,7 +14023,7 @@ var ExtensionManager = class {
|
|
|
13971
14023
|
innerDecorations,
|
|
13972
14024
|
editor,
|
|
13973
14025
|
extension,
|
|
13974
|
-
HTMLAttributes
|
|
14026
|
+
HTMLAttributes
|
|
13975
14027
|
});
|
|
13976
14028
|
};
|
|
13977
14029
|
return [extension.name, nodeview];
|
|
@@ -14119,7 +14171,8 @@ var Extension = class _Extension extends Extendable {
|
|
|
14119
14171
|
* @param config - Extension configuration object or a function that returns a configuration object
|
|
14120
14172
|
*/
|
|
14121
14173
|
static create(config = {}) {
|
|
14122
|
-
|
|
14174
|
+
const resolvedConfig = typeof config === "function" ? config() : config;
|
|
14175
|
+
return new _Extension(resolvedConfig);
|
|
14123
14176
|
}
|
|
14124
14177
|
configure(options) {
|
|
14125
14178
|
return super.configure(options);
|
|
@@ -14489,7 +14542,8 @@ var NodePos = class _NodePos {
|
|
|
14489
14542
|
get parent() {
|
|
14490
14543
|
if (this.depth === 0) return null;
|
|
14491
14544
|
const parentPos = this.resolvedPos.start(this.resolvedPos.depth - 1);
|
|
14492
|
-
|
|
14545
|
+
const $pos = this.resolvedPos.doc.resolve(parentPos);
|
|
14546
|
+
return new _NodePos($pos, this.editor);
|
|
14493
14547
|
}
|
|
14494
14548
|
get before() {
|
|
14495
14549
|
let $pos = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
|
|
@@ -14528,14 +14582,16 @@ var NodePos = class _NodePos {
|
|
|
14528
14582
|
let node = null;
|
|
14529
14583
|
let currentNode = this.parent;
|
|
14530
14584
|
while (currentNode && !node) {
|
|
14531
|
-
if (currentNode.node.type.name === selector)
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14585
|
+
if (currentNode.node.type.name === selector) {
|
|
14586
|
+
if (Object.keys(attributes).length > 0) {
|
|
14587
|
+
const nodeAttributes = currentNode.node.attrs;
|
|
14588
|
+
const attrKeys = Object.keys(attributes);
|
|
14589
|
+
for (let index = 0; index < attrKeys.length; index += 1) {
|
|
14590
|
+
const key = attrKeys[index];
|
|
14591
|
+
if (nodeAttributes[key] !== attributes[key]) break;
|
|
14592
|
+
}
|
|
14593
|
+
} else node = currentNode;
|
|
14594
|
+
}
|
|
14539
14595
|
currentNode = currentNode.parent;
|
|
14540
14596
|
}
|
|
14541
14597
|
return node;
|
|
@@ -15762,7 +15818,8 @@ function parseAttributes(attrString) {
|
|
|
15762
15818
|
if (idMatch) attributes.id = idMatch[1];
|
|
15763
15819
|
Array.from(tempString.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([, key, quotedRef]) => {
|
|
15764
15820
|
var _a;
|
|
15765
|
-
const
|
|
15821
|
+
const quotedIndex = parseInt(((_a = quotedRef.match(/__QUOTED_(\d+)__/)) == null ? void 0 : _a[1]) || "0", 10);
|
|
15822
|
+
const quotedValue = quotedStrings[quotedIndex];
|
|
15766
15823
|
if (quotedValue) attributes[key] = quotedValue.slice(1, -1);
|
|
15767
15824
|
});
|
|
15768
15825
|
const cleanString = tempString.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, "").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, "").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, "").trim();
|
|
@@ -15815,7 +15872,8 @@ function createAtomBlockMarkdownSpec(options) {
|
|
|
15815
15872
|
const regex = new RegExp(`^:::${blockName}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`);
|
|
15816
15873
|
const match = src.match(regex);
|
|
15817
15874
|
if (!match) return;
|
|
15818
|
-
const
|
|
15875
|
+
const attrString = match[1] || "";
|
|
15876
|
+
const attributes = parseAttributes2(attrString);
|
|
15819
15877
|
if (requiredAttributes.find((required) => !(required in attributes))) return;
|
|
15820
15878
|
return {
|
|
15821
15879
|
type: nodeName,
|
|
@@ -15825,8 +15883,10 @@ function createAtomBlockMarkdownSpec(options) {
|
|
|
15825
15883
|
}
|
|
15826
15884
|
},
|
|
15827
15885
|
renderMarkdown: (node) => {
|
|
15828
|
-
const
|
|
15829
|
-
|
|
15886
|
+
const filteredAttrs = filterAttributes(node.attrs || {});
|
|
15887
|
+
const attrs = serializeAttributes2(filteredAttrs);
|
|
15888
|
+
const attrString = attrs ? ` {${attrs}}` : "";
|
|
15889
|
+
return `:::${blockName}${attrString} :::`;
|
|
15830
15890
|
}
|
|
15831
15891
|
};
|
|
15832
15892
|
}
|
|
@@ -15894,17 +15954,19 @@ function createBlockMarkdownSpec(options) {
|
|
|
15894
15954
|
matchedContent = rawContent.trim();
|
|
15895
15955
|
const fullMatch = src.slice(0, position + matchPos + match[0].length);
|
|
15896
15956
|
let contentTokens = [];
|
|
15897
|
-
if (matchedContent)
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15957
|
+
if (matchedContent) {
|
|
15958
|
+
if (content === "block") {
|
|
15959
|
+
contentTokens = lexer.blockTokens(rawContent);
|
|
15960
|
+
contentTokens.forEach((token) => {
|
|
15961
|
+
if (token.text && (!token.tokens || token.tokens.length === 0)) token.tokens = lexer.inlineTokens(token.text);
|
|
15962
|
+
});
|
|
15963
|
+
while (contentTokens.length > 0) {
|
|
15964
|
+
const lastToken = contentTokens[contentTokens.length - 1];
|
|
15965
|
+
if (lastToken.type === "paragraph" && (!lastToken.text || lastToken.text.trim() === "")) contentTokens.pop();
|
|
15966
|
+
else break;
|
|
15967
|
+
}
|
|
15968
|
+
} else contentTokens = lexer.inlineTokens(matchedContent);
|
|
15969
|
+
}
|
|
15908
15970
|
return {
|
|
15909
15971
|
type: nodeName,
|
|
15910
15972
|
raw: fullMatch,
|
|
@@ -15918,10 +15980,13 @@ function createBlockMarkdownSpec(options) {
|
|
|
15918
15980
|
}
|
|
15919
15981
|
},
|
|
15920
15982
|
renderMarkdown: (node, h2) => {
|
|
15921
|
-
const
|
|
15922
|
-
|
|
15983
|
+
const filteredAttrs = filterAttributes(node.attrs || {});
|
|
15984
|
+
const attrs = serializeAttributes2(filteredAttrs);
|
|
15985
|
+
const attrString = attrs ? ` {${attrs}}` : "";
|
|
15986
|
+
const renderedContent = h2.renderChildren(node.content || [], "\n\n");
|
|
15987
|
+
return `:::${blockName}${attrString}
|
|
15923
15988
|
|
|
15924
|
-
${
|
|
15989
|
+
${renderedContent}
|
|
15925
15990
|
|
|
15926
15991
|
:::`;
|
|
15927
15992
|
}
|
|
@@ -16007,7 +16072,8 @@ function createInlineMarkdownSpec(options) {
|
|
|
16007
16072
|
let content = "";
|
|
16008
16073
|
if (getContent) content = getContent(node);
|
|
16009
16074
|
else if (node.content && node.content.length > 0) content = node.content.filter((child) => child.type === "text").map((child) => child.text).join("");
|
|
16010
|
-
const
|
|
16075
|
+
const filteredAttrs = filterAttributes(node.attrs || {});
|
|
16076
|
+
const attrs = serializeAttributes2(filteredAttrs);
|
|
16011
16077
|
const attrString = attrs ? ` ${attrs}` : "";
|
|
16012
16078
|
if (selfClosing) return `[${shortcode}${attrString}]`;
|
|
16013
16079
|
return `[${shortcode}${attrString}]${content}[/${shortcode}]`;
|
|
@@ -16024,13 +16090,15 @@ function parseIndentedBlocks(src, config, lexer) {
|
|
|
16024
16090
|
while (i < lines.length) {
|
|
16025
16091
|
const currentLine = lines[i];
|
|
16026
16092
|
const itemMatch = currentLine.match(config.itemPattern);
|
|
16027
|
-
if (!itemMatch)
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
16093
|
+
if (!itemMatch) {
|
|
16094
|
+
if (items.length > 0) break;
|
|
16095
|
+
else if (currentLine.trim() === "") {
|
|
16096
|
+
i += 1;
|
|
16097
|
+
totalRaw = `${totalRaw}${currentLine}
|
|
16031
16098
|
`;
|
|
16032
|
-
|
|
16033
|
-
|
|
16099
|
+
continue;
|
|
16100
|
+
} else return;
|
|
16101
|
+
}
|
|
16034
16102
|
const itemData = config.extractItemData(itemMatch);
|
|
16035
16103
|
const { indentLevel, mainContent } = itemData;
|
|
16036
16104
|
totalRaw = `${totalRaw}${currentLine}
|
|
@@ -16061,8 +16129,10 @@ function parseIndentedBlocks(src, config, lexer) {
|
|
|
16061
16129
|
const nestedContent = itemContent.slice(1);
|
|
16062
16130
|
if (nestedContent.length > 0) {
|
|
16063
16131
|
const dedentedNested = nestedContent.map((nestedLine) => nestedLine.slice(indentLevel + baseIndentSize)).join("\n");
|
|
16064
|
-
if (dedentedNested.trim())
|
|
16065
|
-
|
|
16132
|
+
if (dedentedNested.trim()) {
|
|
16133
|
+
if (config.customNestedParser) nestedTokens = config.customNestedParser(dedentedNested);
|
|
16134
|
+
else nestedTokens = lexer.blockTokens(dedentedNested);
|
|
16135
|
+
}
|
|
16066
16136
|
}
|
|
16067
16137
|
const token = config.createToken(itemData, nestedTokens);
|
|
16068
16138
|
items.push(token);
|
|
@@ -16129,7 +16199,8 @@ var Node3 = class _Node extends Extendable {
|
|
|
16129
16199
|
* @param config - Node configuration object or a function that returns a configuration object
|
|
16130
16200
|
*/
|
|
16131
16201
|
static create(config = {}) {
|
|
16132
|
-
|
|
16202
|
+
const resolvedConfig = typeof config === "function" ? config() : config;
|
|
16203
|
+
return new _Node(resolvedConfig);
|
|
16133
16204
|
}
|
|
16134
16205
|
configure(options) {
|
|
16135
16206
|
return super.configure(options);
|
|
@@ -16166,7 +16237,7 @@ function markPasteRule(config) {
|
|
|
16166
16237
|
});
|
|
16167
16238
|
}
|
|
16168
16239
|
//#endregion
|
|
16169
|
-
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.22.4_@floating-ui+dom@1.7.6_@tiptap+core@3.22.4_@tiptap+pm@3.22.4__@
|
|
16240
|
+
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.22.4_@floating-ui+dom@1.7.6_@tiptap+core@3.22.4_@tiptap+pm@3.22.4__@tip_4b90ea8c72f0a859dfa12986a7a2cc20/node_modules/@tiptap/vue-3/dist/index.js
|
|
16170
16241
|
function useDebouncedRef(value) {
|
|
16171
16242
|
return (0, vue.customRef)((track, trigger) => {
|
|
16172
16243
|
return {
|
|
@@ -16359,8 +16430,10 @@ function getRawTag(value) {
|
|
|
16359
16430
|
var unmasked = true;
|
|
16360
16431
|
} catch (e) {}
|
|
16361
16432
|
var result = nativeObjectToString$1.call(value);
|
|
16362
|
-
if (unmasked)
|
|
16363
|
-
|
|
16433
|
+
if (unmasked) {
|
|
16434
|
+
if (isOwn) value[symToStringTag$1] = tag;
|
|
16435
|
+
else delete value[symToStringTag$1];
|
|
16436
|
+
}
|
|
16364
16437
|
return result;
|
|
16365
16438
|
}
|
|
16366
16439
|
//#endregion
|
|
@@ -16384,7 +16457,8 @@ function objectToString(value) {
|
|
|
16384
16457
|
//#endregion
|
|
16385
16458
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
|
|
16386
16459
|
/** `Object#toString` result references. */
|
|
16387
|
-
var nullTag = "[object Null]"
|
|
16460
|
+
var nullTag = "[object Null]";
|
|
16461
|
+
var undefinedTag = "[object Undefined]";
|
|
16388
16462
|
/** Built-in value references. */
|
|
16389
16463
|
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
16390
16464
|
/**
|
|
@@ -16585,7 +16659,8 @@ var now = function() {
|
|
|
16585
16659
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/debounce.js
|
|
16586
16660
|
/** Error message constants. */
|
|
16587
16661
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
16588
|
-
var nativeMax = Math.max
|
|
16662
|
+
var nativeMax = Math.max;
|
|
16663
|
+
var nativeMin = Math.min;
|
|
16589
16664
|
/**
|
|
16590
16665
|
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
16591
16666
|
* milliseconds have elapsed since the last time the debounced function was
|
|
@@ -19427,8 +19502,10 @@ var DropCursorView = class {
|
|
|
19427
19502
|
this.handlers.forEach(({ name, handler }) => this.editorView.dom.removeEventListener(name, handler));
|
|
19428
19503
|
}
|
|
19429
19504
|
update(editorView, prevState) {
|
|
19430
|
-
if (this.cursorPos != null && prevState.doc != editorView.state.doc)
|
|
19431
|
-
|
|
19505
|
+
if (this.cursorPos != null && prevState.doc != editorView.state.doc) {
|
|
19506
|
+
if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);
|
|
19507
|
+
else this.updateOverlay();
|
|
19508
|
+
}
|
|
19432
19509
|
}
|
|
19433
19510
|
setCursor(pos) {
|
|
19434
19511
|
if (pos == this.cursorPos) return;
|
|
@@ -19988,7 +20065,8 @@ var Branch = class Branch {
|
|
|
19988
20065
|
}, start);
|
|
19989
20066
|
let newMaps = [];
|
|
19990
20067
|
for (let i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i]));
|
|
19991
|
-
let
|
|
20068
|
+
let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);
|
|
20069
|
+
let branch = new Branch(items, eventCount);
|
|
19992
20070
|
if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);
|
|
19993
20071
|
return branch;
|
|
19994
20072
|
}
|
|
@@ -20063,9 +20141,10 @@ function applyTransaction(history, state, tr, options) {
|
|
|
20063
20141
|
if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1);
|
|
20064
20142
|
let appended = tr.getMeta("appendedTransaction");
|
|
20065
20143
|
if (tr.steps.length == 0) return history;
|
|
20066
|
-
else if (appended && appended.getMeta(historyKey))
|
|
20067
|
-
|
|
20068
|
-
|
|
20144
|
+
else if (appended && appended.getMeta(historyKey)) {
|
|
20145
|
+
if (appended.getMeta(historyKey).redo) return new HistoryState(history.done.addTransform(tr, void 0, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps), history.prevTime, history.prevComposition);
|
|
20146
|
+
else return new HistoryState(history.done, history.undone.addTransform(tr, void 0, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);
|
|
20147
|
+
} else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
|
|
20069
20148
|
let composition = tr.getMeta("composition");
|
|
20070
20149
|
let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));
|
|
20071
20150
|
let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps);
|
|
@@ -20109,7 +20188,8 @@ function histTransaction(history, state, redo) {
|
|
|
20109
20188
|
historyState: newHist
|
|
20110
20189
|
});
|
|
20111
20190
|
}
|
|
20112
|
-
var cachedPreserveItems = false
|
|
20191
|
+
var cachedPreserveItems = false;
|
|
20192
|
+
var cachedPreserveItemsPlugins = null;
|
|
20113
20193
|
function mustPreserveItems(state) {
|
|
20114
20194
|
let plugins = state.plugins;
|
|
20115
20195
|
if (cachedPreserveItemsPlugins != plugins) {
|
|
@@ -20177,8 +20257,6 @@ var undo = buildCommand(false, true);
|
|
|
20177
20257
|
A command function that redoes the last undone change, if any.
|
|
20178
20258
|
*/
|
|
20179
20259
|
var redo = buildCommand(true, true);
|
|
20180
|
-
buildCommand(false, false);
|
|
20181
|
-
buildCommand(true, false);
|
|
20182
20260
|
Extension.create({
|
|
20183
20261
|
name: "characterCount",
|
|
20184
20262
|
addOptions() {
|
|
@@ -21081,10 +21159,11 @@ var HorizontalRule = Node3.create({
|
|
|
21081
21159
|
if (dispatch) {
|
|
21082
21160
|
const { $to } = tr.selection;
|
|
21083
21161
|
const posAfter = $to.end();
|
|
21084
|
-
if ($to.nodeAfter)
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21162
|
+
if ($to.nodeAfter) {
|
|
21163
|
+
if ($to.nodeAfter.isTextblock) tr.setSelection(TextSelection.create(tr.doc, $to.pos + 1));
|
|
21164
|
+
else if ($to.nodeAfter.isBlock) tr.setSelection(NodeSelection.create(tr.doc, $to.pos));
|
|
21165
|
+
else tr.setSelection(TextSelection.create(tr.doc, $to.pos));
|
|
21166
|
+
} else {
|
|
21088
21167
|
const nodeType = chainState.schema.nodes[this.options.nextNodeType] || $to.parent.type.contentMatch.defaultType;
|
|
21089
21168
|
const node = nodeType == null ? void 0 : nodeType.create();
|
|
21090
21169
|
if (node) {
|
|
@@ -21513,7 +21592,7 @@ var TILDE = "TILDE";
|
|
|
21513
21592
|
var UNDERSCORE = "UNDERSCORE";
|
|
21514
21593
|
var EMOJI$1 = "EMOJI";
|
|
21515
21594
|
var SYM = "SYM";
|
|
21516
|
-
var tk =
|
|
21595
|
+
var tk = /*#__PURE__*/ Object.freeze({
|
|
21517
21596
|
__proto__: null,
|
|
21518
21597
|
ALPHANUMERICAL,
|
|
21519
21598
|
AMPERSAND,
|
|
@@ -21585,7 +21664,8 @@ var LF = "\n";
|
|
|
21585
21664
|
var EMOJI_VARIATION = "️";
|
|
21586
21665
|
var EMOJI_JOINER = "";
|
|
21587
21666
|
var OBJECT_REPLACEMENT = "";
|
|
21588
|
-
var tlds = null
|
|
21667
|
+
var tlds = null;
|
|
21668
|
+
var utlds = null;
|
|
21589
21669
|
/**
|
|
21590
21670
|
* Scanner output token:
|
|
21591
21671
|
* - `t` is the token name (e.g., 'NUM', 'EMOJI', 'TLD')
|
|
@@ -23043,19 +23123,21 @@ var ListItem = Node3.create({
|
|
|
23043
23123
|
if (token.type !== "list_item") return [];
|
|
23044
23124
|
const parseBlockChildren = (_a = helpers.parseBlockChildren) != null ? _a : helpers.parseChildren;
|
|
23045
23125
|
let content = [];
|
|
23046
|
-
if (token.tokens && token.tokens.length > 0)
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23126
|
+
if (token.tokens && token.tokens.length > 0) {
|
|
23127
|
+
if (token.tokens.some((t) => t.type === "paragraph")) content = parseBlockChildren(token.tokens);
|
|
23128
|
+
else {
|
|
23129
|
+
const firstToken = token.tokens[0];
|
|
23130
|
+
if (firstToken && firstToken.type === "text" && firstToken.tokens && firstToken.tokens.length > 0) {
|
|
23131
|
+
content = [{
|
|
23132
|
+
type: "paragraph",
|
|
23133
|
+
content: helpers.parseInline(firstToken.tokens)
|
|
23134
|
+
}];
|
|
23135
|
+
if (token.tokens.length > 1) {
|
|
23136
|
+
const additionalContent = parseBlockChildren(token.tokens.slice(1));
|
|
23137
|
+
content.push(...additionalContent);
|
|
23138
|
+
}
|
|
23139
|
+
} else content = parseBlockChildren(token.tokens);
|
|
23140
|
+
}
|
|
23059
23141
|
}
|
|
23060
23142
|
if (content.length === 0) content = [{
|
|
23061
23143
|
type: "paragraph",
|
|
@@ -23653,13 +23735,16 @@ var TaskItem = Node3.create({
|
|
|
23653
23735
|
const newKeys = new Set(Object.keys(newHTMLAttributes));
|
|
23654
23736
|
const staticAttrs = this.options.HTMLAttributes;
|
|
23655
23737
|
prevRenderedAttributeKeys.forEach((key) => {
|
|
23656
|
-
if (!newKeys.has(key))
|
|
23657
|
-
|
|
23738
|
+
if (!newKeys.has(key)) {
|
|
23739
|
+
if (key in staticAttrs) listItem.setAttribute(key, staticAttrs[key]);
|
|
23740
|
+
else listItem.removeAttribute(key);
|
|
23741
|
+
}
|
|
23658
23742
|
});
|
|
23659
23743
|
Object.entries(newHTMLAttributes).forEach(([key, value]) => {
|
|
23660
|
-
if (value === null || value === void 0)
|
|
23661
|
-
|
|
23662
|
-
|
|
23744
|
+
if (value === null || value === void 0) {
|
|
23745
|
+
if (key in staticAttrs) listItem.setAttribute(key, staticAttrs[key]);
|
|
23746
|
+
else listItem.removeAttribute(key);
|
|
23747
|
+
} else listItem.setAttribute(key, value);
|
|
23663
23748
|
});
|
|
23664
23749
|
prevRenderedAttributeKeys = newKeys;
|
|
23665
23750
|
return true;
|
|
@@ -24458,9 +24543,7 @@ var image_default = Node3.create({
|
|
|
24458
24543
|
if (value != null) switch (key) {
|
|
24459
24544
|
case "width":
|
|
24460
24545
|
case "height": break;
|
|
24461
|
-
default:
|
|
24462
|
-
el.setAttribute(key, value);
|
|
24463
|
-
break;
|
|
24546
|
+
default: el.setAttribute(key, value);
|
|
24464
24547
|
}
|
|
24465
24548
|
});
|
|
24466
24549
|
el.src = HTMLAttributes.src;
|
|
@@ -24633,7 +24716,7 @@ var sides = [
|
|
|
24633
24716
|
"left"
|
|
24634
24717
|
];
|
|
24635
24718
|
var alignments = ["start", "end"];
|
|
24636
|
-
var placements =
|
|
24719
|
+
var placements = /*#__PURE__*/ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
24637
24720
|
var min = Math.min;
|
|
24638
24721
|
var max = Math.max;
|
|
24639
24722
|
var round = Math.round;
|
|
@@ -24797,9 +24880,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
24797
24880
|
case "start":
|
|
24798
24881
|
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
24799
24882
|
break;
|
|
24800
|
-
case "end":
|
|
24801
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
24802
|
-
break;
|
|
24883
|
+
case "end": coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
24803
24884
|
}
|
|
24804
24885
|
return coords;
|
|
24805
24886
|
}
|
|
@@ -25099,9 +25180,7 @@ var flip$1 = function(options) {
|
|
|
25099
25180
|
if (placement) resetPlacement = placement;
|
|
25100
25181
|
break;
|
|
25101
25182
|
}
|
|
25102
|
-
case "initialPlacement":
|
|
25103
|
-
resetPlacement = initialPlacement;
|
|
25104
|
-
break;
|
|
25183
|
+
case "initialPlacement": resetPlacement = initialPlacement;
|
|
25105
25184
|
}
|
|
25106
25185
|
if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
|
|
25107
25186
|
}
|
|
@@ -25253,7 +25332,7 @@ var inline$1 = function(options) {
|
|
|
25253
25332
|
}
|
|
25254
25333
|
};
|
|
25255
25334
|
};
|
|
25256
|
-
var originSides =
|
|
25335
|
+
var originSides = /*#__PURE__*/ new Set(["left", "top"]);
|
|
25257
25336
|
async function convertValueToCoords(state, options) {
|
|
25258
25337
|
const { placement, platform, elements } = state;
|
|
25259
25338
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
@@ -25577,7 +25656,7 @@ function getScale(element) {
|
|
|
25577
25656
|
y
|
|
25578
25657
|
};
|
|
25579
25658
|
}
|
|
25580
|
-
var noOffsets =
|
|
25659
|
+
var noOffsets = /*#__PURE__*/ createCoords(0);
|
|
25581
25660
|
function getVisualOffsets(element) {
|
|
25582
25661
|
const win = getWindow(element);
|
|
25583
25662
|
if (!isWebKit() || !win.visualViewport) return noOffsets;
|
|
@@ -25597,9 +25676,11 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
25597
25676
|
const clientRect = element.getBoundingClientRect();
|
|
25598
25677
|
const domElement = unwrapElement(element);
|
|
25599
25678
|
let scale = createCoords(1);
|
|
25600
|
-
if (includeScale)
|
|
25601
|
-
if (
|
|
25602
|
-
|
|
25679
|
+
if (includeScale) {
|
|
25680
|
+
if (offsetParent) {
|
|
25681
|
+
if (isElement(offsetParent)) scale = getScale(offsetParent);
|
|
25682
|
+
} else scale = getScale(element);
|
|
25683
|
+
}
|
|
25603
25684
|
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
25604
25685
|
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
25605
25686
|
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
@@ -25966,7 +26047,7 @@ var computePosition = (reference, floating, options) => {
|
|
|
25966
26047
|
});
|
|
25967
26048
|
};
|
|
25968
26049
|
//#endregion
|
|
25969
|
-
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.22.4_@floating-ui+dom@1.7.6_@tiptap+core@3.22.4_@tiptap+pm@3.22.4__@
|
|
26050
|
+
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.22.4_@floating-ui+dom@1.7.6_@tiptap+core@3.22.4_@tiptap+pm@3.22.4__@tip_4b90ea8c72f0a859dfa12986a7a2cc20/node_modules/@tiptap/vue-3/dist/menus/index.js
|
|
25970
26051
|
function combineDOMRects(rect1, rect2) {
|
|
25971
26052
|
const top = Math.min(rect1.top, rect2.top);
|
|
25972
26053
|
const bottom = Math.max(rect1.bottom, rect2.bottom);
|
|
@@ -26630,7 +26711,7 @@ var FloatingMenuPlugin = (options) => {
|
|
|
26630
26711
|
});
|
|
26631
26712
|
//#endregion
|
|
26632
26713
|
//#region src/components/IconButton.vue?vue&type=script&setup=true&lang.ts
|
|
26633
|
-
var IconButton_vue_vue_type_script_setup_true_lang_default =
|
|
26714
|
+
var IconButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
26634
26715
|
__name: "IconButton",
|
|
26635
26716
|
props: {
|
|
26636
26717
|
active: { type: Boolean },
|
|
@@ -26691,10 +26772,10 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
26691
26772
|
};
|
|
26692
26773
|
//#endregion
|
|
26693
26774
|
//#region src/components/IconButton.vue
|
|
26694
|
-
var IconButton_default =
|
|
26775
|
+
var IconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(IconButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-691ccfae"]]);
|
|
26695
26776
|
//#endregion
|
|
26696
26777
|
//#region src/components/bubble-menus/ImageMenu.vue
|
|
26697
|
-
var ImageMenu_default =
|
|
26778
|
+
var ImageMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
26698
26779
|
__name: "ImageMenu",
|
|
26699
26780
|
props: { editor: {} },
|
|
26700
26781
|
setup(__props) {
|
|
@@ -26760,7 +26841,7 @@ var ImageMenu_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__
|
|
|
26760
26841
|
}), [["__scopeId", "data-v-6167587e"]]);
|
|
26761
26842
|
//#endregion
|
|
26762
26843
|
//#region src/components/bubble-menus/TableMenu.vue
|
|
26763
|
-
var TableMenu_default =
|
|
26844
|
+
var TableMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
26764
26845
|
__name: "TableMenu",
|
|
26765
26846
|
props: { editor: {} },
|
|
26766
26847
|
setup(__props) {
|
|
@@ -26856,7 +26937,7 @@ var _hoisted_1$4 = { class: "tce-container" };
|
|
|
26856
26937
|
var SAVE_DEBOUNCE = 3e3;
|
|
26857
26938
|
//#endregion
|
|
26858
26939
|
//#region src/components/Edit.vue
|
|
26859
|
-
var Edit_default =
|
|
26940
|
+
var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
26860
26941
|
__name: "Edit",
|
|
26861
26942
|
props: {
|
|
26862
26943
|
element: {},
|
|
@@ -27264,7 +27345,7 @@ var rules = {
|
|
|
27264
27345
|
var _hoisted_1$3 = { class: "actions d-flex justify-end" };
|
|
27265
27346
|
//#endregion
|
|
27266
27347
|
//#region src/components/actions/AddImage.vue
|
|
27267
|
-
var AddImage_default =
|
|
27348
|
+
var AddImage_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27268
27349
|
__name: "AddImage",
|
|
27269
27350
|
props: { editor: {} },
|
|
27270
27351
|
setup(__props) {
|
|
@@ -27366,7 +27447,7 @@ var AddImage_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
27366
27447
|
var _hoisted_1$2 = { class: "actions d-flex justify-end" };
|
|
27367
27448
|
//#endregion
|
|
27368
27449
|
//#region src/components/actions/AddLink.vue
|
|
27369
|
-
var AddLink_default =
|
|
27450
|
+
var AddLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27370
27451
|
__name: "AddLink",
|
|
27371
27452
|
props: { editor: {} },
|
|
27372
27453
|
setup(__props) {
|
|
@@ -27487,7 +27568,7 @@ var INIT_SIZE = 5;
|
|
|
27487
27568
|
var MAX_SIZE = 10;
|
|
27488
27569
|
//#endregion
|
|
27489
27570
|
//#region src/components/actions/AddTable.vue
|
|
27490
|
-
var AddTable_default =
|
|
27571
|
+
var AddTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27491
27572
|
__name: "AddTable",
|
|
27492
27573
|
props: { editor: {} },
|
|
27493
27574
|
setup(__props) {
|
|
@@ -27504,9 +27585,9 @@ var AddTable_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
27504
27585
|
});
|
|
27505
27586
|
const updateSelection = (rows, cols) => {
|
|
27506
27587
|
if (rows === gridSize.rows) gridSize.rows = Math.min(rows + 1, MAX_SIZE);
|
|
27507
|
-
else if (rows < gridSize.rows - 1 && rows >=
|
|
27588
|
+
else if (rows < gridSize.rows - 1 && rows >= 4) gridSize.rows--;
|
|
27508
27589
|
if (cols === gridSize.cols) gridSize.cols = Math.min(cols + 1, MAX_SIZE);
|
|
27509
|
-
else if (cols < gridSize.cols - 1 && cols >=
|
|
27590
|
+
else if (cols < gridSize.cols - 1 && cols >= 4) gridSize.cols--;
|
|
27510
27591
|
selectedSize.rows = rows;
|
|
27511
27592
|
selectedSize.cols = cols;
|
|
27512
27593
|
};
|
|
@@ -27597,7 +27678,7 @@ var AddTable_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
27597
27678
|
var _hoisted_1 = { class: "actions d-flex justify-end" };
|
|
27598
27679
|
//#endregion
|
|
27599
27680
|
//#region src/components/actions/AddTooltip.vue
|
|
27600
|
-
var AddTooltip_default =
|
|
27681
|
+
var AddTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27601
27682
|
__name: "AddTooltip",
|
|
27602
27683
|
props: { editor: {} },
|
|
27603
27684
|
setup(__props) {
|
|
@@ -27787,7 +27868,7 @@ var FONT_FAMILIES = [
|
|
|
27787
27868
|
];
|
|
27788
27869
|
//#endregion
|
|
27789
27870
|
//#region src/components/actions/ColorPicker.vue
|
|
27790
|
-
var ColorPicker_default =
|
|
27871
|
+
var ColorPicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27791
27872
|
__name: "ColorPicker",
|
|
27792
27873
|
props: {
|
|
27793
27874
|
disabled: { type: Boolean },
|
|
@@ -27913,7 +27994,7 @@ var BackgroundColor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
27913
27994
|
});
|
|
27914
27995
|
//#endregion
|
|
27915
27996
|
//#region src/components/actions/FontFamily.vue
|
|
27916
|
-
var FontFamily_default =
|
|
27997
|
+
var FontFamily_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27917
27998
|
__name: "FontFamily",
|
|
27918
27999
|
props: { editor: {} },
|
|
27919
28000
|
setup(__props) {
|
|
@@ -27987,7 +28068,7 @@ var FontFamily_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @_
|
|
|
27987
28068
|
}), [["__scopeId", "data-v-d6c041e6"]]);
|
|
27988
28069
|
//#endregion
|
|
27989
28070
|
//#region src/components/actions/FontSize.vue
|
|
27990
|
-
var FontSize_default =
|
|
28071
|
+
var FontSize_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
27991
28072
|
__name: "FontSize",
|
|
27992
28073
|
props: { editor: {} },
|
|
27993
28074
|
setup(__props) {
|
|
@@ -28057,7 +28138,7 @@ var FontSize_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
28057
28138
|
}), [["__scopeId", "data-v-4a24240e"]]);
|
|
28058
28139
|
//#endregion
|
|
28059
28140
|
//#region src/components/actions/TextAlign.vue
|
|
28060
|
-
var TextAlign_default =
|
|
28141
|
+
var TextAlign_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
28061
28142
|
__name: "TextAlign",
|
|
28062
28143
|
props: { editor: {} },
|
|
28063
28144
|
setup(__props) {
|
|
@@ -28154,7 +28235,7 @@ var TextColor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
28154
28235
|
});
|
|
28155
28236
|
//#endregion
|
|
28156
28237
|
//#region src/components/actions/TextHeading.vue
|
|
28157
|
-
var TextHeading_default =
|
|
28238
|
+
var TextHeading_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
28158
28239
|
__name: "TextHeading",
|
|
28159
28240
|
props: { editor: {} },
|
|
28160
28241
|
setup(__props) {
|
|
@@ -28239,7 +28320,7 @@ var TextHeading_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @
|
|
|
28239
28320
|
}), [["__scopeId", "data-v-eb5927ce"]]);
|
|
28240
28321
|
//#endregion
|
|
28241
28322
|
//#region src/components/EditorToolbar.vue
|
|
28242
|
-
var EditorToolbar_default =
|
|
28323
|
+
var EditorToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ (0, vue.defineComponent)({
|
|
28243
28324
|
__name: "EditorToolbar",
|
|
28244
28325
|
props: { editor: {} },
|
|
28245
28326
|
setup(__props) {
|