@quoreadmin/ui 1.10.5 → 1.10.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.css +1 -1
- package/dist/index131.js +59 -54
- package/dist/index182.js +14 -14
- package/dist/index183.js +3 -3
- package/dist/index186.js +4 -4
- package/dist/index193.js +10 -10
- package/dist/index195.js +10 -10
- package/dist/index198.js +17 -17
- package/dist/index201.js +28 -28
- package/dist/index202.js +2 -2
- package/dist/index203.js +2 -2
- package/dist/index204.js +1 -1
- package/dist/index206.js +2 -2
- package/dist/index208.js +14 -14
- package/dist/index209.js +1 -1
- package/dist/index210.js +1 -1
- package/dist/index211.js +3 -3
- package/dist/index212.js +6 -6
- package/dist/index213.js +84 -29
- package/dist/index214.js +400 -109
- package/dist/index215.js +22 -36
- package/dist/index216.js +33 -26
- package/dist/index217.js +111 -31
- package/dist/index218.js +35 -50
- package/dist/index219.js +26 -43
- package/dist/index220.js +35 -3
- package/dist/index221.js +51 -9
- package/dist/index222.js +42 -18
- package/dist/index223.js +4 -10
- package/dist/index224.js +9 -10
- package/dist/index225.js +18 -38
- package/dist/index226.js +10 -21
- package/dist/index227.js +10 -88
- package/dist/index228.js +35 -403
- package/dist/index229.js +21 -22
- package/dist/index230.js +21 -160
- package/dist/index231.js +22 -228
- package/dist/index232.js +19 -36
- package/dist/index233.js +835 -9
- package/dist/index234.js +679 -104
- package/dist/index235.js +174 -36
- package/dist/index236.js +20 -80
- package/dist/index237.js +12 -12
- package/dist/index238.js +14 -12
- package/dist/index239.js +10 -10
- package/dist/index240.js +11 -11
- package/dist/index241.js +9 -9
- package/dist/index242.js +3 -3636
- package/dist/index243.js +181 -49
- package/dist/index244.js +128 -72
- package/dist/index245.js +154 -45
- package/dist/index246.js +1209 -201
- package/dist/index247.js +126 -9
- package/dist/index248.js +20 -57
- package/dist/index249.js +22 -61
- package/dist/index250.js +20 -54
- package/dist/index251.js +22 -75
- package/dist/index252.js +29 -717
- package/dist/index253.js +29 -42
- package/dist/index254.js +20 -64
- package/dist/index255.js +20 -11
- package/dist/index256.js +2 -705
- package/dist/index257.js +2 -820
- package/dist/index258.js +3624 -149
- package/dist/index259.js +55 -20
- package/dist/index260.js +77 -22
- package/dist/index261.js +43 -190
- package/dist/index262.js +211 -66
- package/dist/index263.js +9 -33
- package/dist/index264.js +53 -36
- package/dist/index265.js +61 -22
- package/dist/index266.js +54 -22
- package/dist/index267.js +75 -20
- package/dist/index268.js +681 -791
- package/dist/index269.js +33 -693
- package/dist/index270.js +56 -168
- package/dist/index271.js +11 -22
- package/dist/index272.js +705 -20
- package/dist/index273.js +820 -20
- package/dist/index274.js +80 -3
- package/dist/index275.js +19 -186
- package/dist/index276.js +19 -132
- package/dist/index277.js +149 -1211
- package/dist/index278.js +228 -20
- package/dist/index279.js +36 -21
- package/dist/index280.js +10 -22
- package/dist/index281.js +13 -20
- package/dist/index282.js +198 -19
- package/dist/index283.js +68 -18
- package/dist/index284.js +34 -2
- package/dist/index285.js +40 -2
- package/dist/index290.js +1534 -3
- package/dist/index291.js +382 -23
- package/dist/index292.js +2731 -2
- package/dist/index293.js +78 -71
- package/dist/index294.js +3552 -1294
- package/dist/index295.js +53 -379
- package/dist/index296.js +14 -2730
- package/dist/index297.js +80 -82
- package/dist/index298.js +155 -3745
- package/dist/index299.js +240 -54
- package/dist/index300.js +78 -14
- package/dist/index301.js +76 -81
- package/dist/index302.js +22 -202
- package/dist/index303.js +915 -226
- package/dist/index304.js +21 -53
- package/dist/index305.js +12 -18
- package/dist/index306.js +11 -13
- package/dist/index307.js +68 -21
- package/dist/index308.js +17 -14
- package/dist/index309.js +16 -14
- package/dist/index310.js +52 -21
- package/dist/index311.js +21 -78
- package/dist/index312.js +11 -11
- package/dist/index313.js +58 -930
- package/dist/index314.js +2 -22
- package/dist/index315.js +3 -20
- package/dist/index316.js +26 -19
- package/dist/index317.js +260 -67
- package/dist/index318.js +6 -19
- package/dist/index319.js +139 -18
- package/dist/index320.js +72 -21
- package/dist/index321.js +85 -20
- package/dist/index322.js +29 -63
- package/dist/index323.js +14 -260
- package/dist/index324.js +74 -5
- package/dist/index325.js +3 -139
- package/dist/index326.js +2 -73
- package/dist/index327.js +79 -83
- package/dist/index328.js +50 -26
- package/dist/index329.js +5 -15
- package/dist/index330.js +4 -74
- package/dist/index331.js +178 -3
- package/dist/index332.js +63 -2
- package/dist/index333.js +74 -82
- package/dist/index334.js +25 -52
- package/dist/index335.js +21 -5
- package/dist/index336.js +21 -4
- package/dist/index337.js +15 -178
- package/dist/index338.js +16 -62
- package/dist/index339.js +22 -74
- package/dist/index340.js +36 -8
- package/dist/index341.js +19 -12
- package/dist/index342.js +19 -54
- package/dist/index343.js +63 -11
- package/dist/index344.js +37 -14
- package/dist/index345.js +8 -57
- package/dist/index346.js +12 -51
- package/dist/index347.js +49 -25
- package/dist/index348.js +12 -2
- package/dist/index349.js +14 -5
- package/dist/index350.js +58 -2
- package/dist/index351.js +52 -23
- package/dist/index352.js +28 -38
- package/dist/index353.js +2 -2
- package/dist/index354.js +4 -10
- package/dist/index355.js +2 -20
- package/dist/index356.js +22 -9
- package/dist/index357.js +40 -9
- package/dist/index358.js +2 -17
- package/dist/index359.js +11 -2
- package/dist/index360.js +20 -9
- package/dist/index361.js +10 -10
- package/dist/index362.js +9 -13
- package/dist/index363.js +16 -36
- package/dist/index364.js +2 -20
- package/dist/index365.js +9 -20
- package/dist/index366.js +9 -63
- package/dist/index367.js +14 -37
- package/dist/index368.js +1 -1
- package/dist/index369.js +1 -1
- package/dist/index370.js +5 -5
- package/dist/index372.js +2 -2
- package/dist/index374.js +2 -2
- package/dist/index376.js +1 -1
- package/dist/index378.js +4 -4
- package/dist/index379.js +3 -3
- package/dist/index38.js +1 -1
- package/dist/index380.js +98 -95
- package/dist/index381.js +90 -100
- package/dist/index382.js +98 -91
- package/dist/index384.js +1 -1
- package/dist/index385.js +3 -3
- package/dist/index390.js +1 -1
- package/dist/index392.js +1 -1
- package/dist/index393.js +3 -3
- package/dist/index394.js +3 -3
- package/dist/index402.js +1 -1
- package/package.json +1 -1
package/dist/index297.js
CHANGED
|
@@ -1,88 +1,86 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return S(i, f, r, t) ? (l && l(i.scrollIntoView()), !0) : !1;
|
|
10
|
-
};
|
|
1
|
+
import { Plugin as w } from "./index273.js";
|
|
2
|
+
import { dropPoint as v } from "./index290.js";
|
|
3
|
+
function y(m = {}) {
|
|
4
|
+
return new w({
|
|
5
|
+
view(e) {
|
|
6
|
+
return new C(e, m);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
class C {
|
|
11
|
+
constructor(e, t) {
|
|
12
|
+
var i;
|
|
13
|
+
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (i = t.width) !== null && i !== void 0 ? i : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((s) => {
|
|
14
|
+
let d = (r) => {
|
|
15
|
+
this[s](r);
|
|
16
|
+
};
|
|
17
|
+
return e.dom.addEventListener(s, d), { name: s, handler: d };
|
|
18
|
+
});
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
e
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
function b(r, t, e, l) {
|
|
43
|
-
let o = r.tr, n = l.end, f = l.$to.end(l.depth);
|
|
44
|
-
n < f && (o.step(new h(n - 1, f, n, f, new I(s.from(e.create(null, l.parent.copy())), 1, 0), 1, !0)), l = new x(o.doc.resolve(l.$from.pos), o.doc.resolve(f), l.depth));
|
|
45
|
-
const i = w(l);
|
|
46
|
-
if (i == null)
|
|
47
|
-
return !1;
|
|
48
|
-
o.lift(l, i);
|
|
49
|
-
let d = o.doc.resolve(o.mapping.map(n, -1) - 1);
|
|
50
|
-
return C(o.doc, d.pos) && d.nodeBefore.type == d.nodeAfter.type && o.join(d.pos), t(o.scrollIntoView()), !0;
|
|
51
|
-
}
|
|
52
|
-
function k(r, t, e) {
|
|
53
|
-
let l = r.tr, o = e.parent;
|
|
54
|
-
for (let a = e.end, $ = e.endIndex - 1, y = e.startIndex; $ > y; $--)
|
|
55
|
-
a -= o.child($).nodeSize, l.delete(a - 1, a + 1);
|
|
56
|
-
let n = l.doc.resolve(e.start), f = n.nodeAfter;
|
|
57
|
-
if (l.mapping.map(e.end) != e.start + n.nodeAfter.nodeSize)
|
|
58
|
-
return !1;
|
|
59
|
-
let i = e.startIndex == 0, d = e.endIndex == o.childCount, c = n.node(-1), u = n.index(-1);
|
|
60
|
-
if (!c.canReplace(u + (i ? 0 : 1), u + 1, f.content.append(d ? s.empty : s.from(o))))
|
|
61
|
-
return !1;
|
|
62
|
-
let m = n.pos, p = m + f.nodeSize;
|
|
63
|
-
return l.step(new h(m - (i ? 1 : 0), p + (d ? 1 : 0), m + 1, p - 1, new I((i ? s.empty : s.from(o.copy(s.empty))).append(d ? s.empty : s.from(o.copy(s.empty))), i ? 0 : 1, d ? 0 : 1), i ? 0 : 1)), t(l.scrollIntoView()), !0;
|
|
64
|
-
}
|
|
65
|
-
function B(r) {
|
|
66
|
-
return function(t, e) {
|
|
67
|
-
let { $from: l, $to: o } = t.selection, n = l.blockRange(o, (c) => c.childCount > 0 && c.firstChild.type == r);
|
|
68
|
-
if (!n)
|
|
69
|
-
return !1;
|
|
70
|
-
let f = n.startIndex;
|
|
71
|
-
if (f == 0)
|
|
72
|
-
return !1;
|
|
73
|
-
let i = n.parent, d = i.child(f - 1);
|
|
74
|
-
if (d.type != r)
|
|
75
|
-
return !1;
|
|
76
|
-
if (e) {
|
|
77
|
-
let c = d.lastChild && d.lastChild.type == i.type, u = s.from(c ? r.create() : null), m = new I(s.from(r.create(null, s.from(i.type.create(null, u)))), c ? 3 : 1, 0), p = n.start, a = n.end;
|
|
78
|
-
e(t.tr.step(new h(p - (c ? 3 : 1), a, p, a, m, 1, !0)).scrollIntoView());
|
|
20
|
+
destroy() {
|
|
21
|
+
this.handlers.forEach(({ name: e, handler: t }) => this.editorView.dom.removeEventListener(e, t));
|
|
22
|
+
}
|
|
23
|
+
update(e, t) {
|
|
24
|
+
this.cursorPos != null && t.doc != e.state.doc && (this.cursorPos > e.state.doc.content.size ? this.setCursor(null) : this.updateOverlay());
|
|
25
|
+
}
|
|
26
|
+
setCursor(e) {
|
|
27
|
+
e != this.cursorPos && (this.cursorPos = e, e == null ? (this.element.parentNode.removeChild(this.element), this.element = null) : this.updateOverlay());
|
|
28
|
+
}
|
|
29
|
+
updateOverlay() {
|
|
30
|
+
let e = this.editorView.state.doc.resolve(this.cursorPos), t = !e.parent.inlineContent, i, s = this.editorView.dom, d = s.getBoundingClientRect(), r = d.width / s.offsetWidth, h = d.height / s.offsetHeight;
|
|
31
|
+
if (t) {
|
|
32
|
+
let o = e.nodeBefore, n = e.nodeAfter;
|
|
33
|
+
if (o || n) {
|
|
34
|
+
let a = this.editorView.nodeDOM(this.cursorPos - (o ? o.nodeSize : 0));
|
|
35
|
+
if (a) {
|
|
36
|
+
let c = a.getBoundingClientRect(), u = o ? c.bottom : c.top;
|
|
37
|
+
o && n && (u = (u + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2);
|
|
38
|
+
let g = this.width / 2 * h;
|
|
39
|
+
i = { left: c.left, right: c.right, top: u - g, bottom: u + g };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
79
42
|
}
|
|
80
|
-
|
|
81
|
-
|
|
43
|
+
if (!i) {
|
|
44
|
+
let o = this.editorView.coordsAtPos(this.cursorPos), n = this.width / 2 * r;
|
|
45
|
+
i = { left: o.left - n, right: o.left + n, top: o.top, bottom: o.bottom };
|
|
46
|
+
}
|
|
47
|
+
let l = this.editorView.dom.offsetParent;
|
|
48
|
+
this.element || (this.element = l.appendChild(document.createElement("div")), this.class && (this.element.className = this.class), this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;", this.color && (this.element.style.backgroundColor = this.color)), this.element.classList.toggle("prosemirror-dropcursor-block", t), this.element.classList.toggle("prosemirror-dropcursor-inline", !t);
|
|
49
|
+
let f, p;
|
|
50
|
+
if (!l || l == document.body && getComputedStyle(l).position == "static")
|
|
51
|
+
f = -pageXOffset, p = -pageYOffset;
|
|
52
|
+
else {
|
|
53
|
+
let o = l.getBoundingClientRect(), n = o.width / l.offsetWidth, a = o.height / l.offsetHeight;
|
|
54
|
+
f = o.left - l.scrollLeft * n, p = o.top - l.scrollTop * a;
|
|
55
|
+
}
|
|
56
|
+
this.element.style.left = (i.left - f) / r + "px", this.element.style.top = (i.top - p) / h + "px", this.element.style.width = (i.right - i.left) / r + "px", this.element.style.height = (i.bottom - i.top) / h + "px";
|
|
57
|
+
}
|
|
58
|
+
scheduleRemoval(e) {
|
|
59
|
+
clearTimeout(this.timeout), this.timeout = setTimeout(() => this.setCursor(null), e);
|
|
60
|
+
}
|
|
61
|
+
dragover(e) {
|
|
62
|
+
if (!this.editorView.editable)
|
|
63
|
+
return;
|
|
64
|
+
let t = this.editorView.posAtCoords({ left: e.clientX, top: e.clientY }), i = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), s = i && i.type.spec.disableDropCursor, d = typeof s == "function" ? s(this.editorView, t, e) : s;
|
|
65
|
+
if (t && !d) {
|
|
66
|
+
let r = t.pos;
|
|
67
|
+
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
68
|
+
let h = v(this.editorView.state.doc, r, this.editorView.dragging.slice);
|
|
69
|
+
h != null && (r = h);
|
|
70
|
+
}
|
|
71
|
+
this.setCursor(r), this.scheduleRemoval(5e3);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
dragend() {
|
|
75
|
+
this.scheduleRemoval(20);
|
|
76
|
+
}
|
|
77
|
+
drop() {
|
|
78
|
+
this.scheduleRemoval(20);
|
|
79
|
+
}
|
|
80
|
+
dragleave(e) {
|
|
81
|
+
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
82
|
+
}
|
|
82
83
|
}
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
-
B as sinkListItem,
|
|
86
|
-
O as wrapInList,
|
|
87
|
-
S as wrapRangeInList
|
|
85
|
+
y as dropCursor
|
|
88
86
|
};
|