@quoreadmin/ui 1.7.18 → 1.7.19
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/index140.js +2 -2
- package/dist/index142.js +1 -1
- package/dist/index172.js +14 -14
- package/dist/index173.js +3 -3
- package/dist/index176.js +4 -4
- package/dist/index183.js +10 -10
- package/dist/index185.js +10 -10
- package/dist/index187.js +1190 -36
- package/dist/index189.js +36 -1190
- package/dist/{index188.js → index190.js} +17 -17
- package/dist/index191.js +28 -28
- package/dist/index192.js +2 -2
- package/dist/index193.js +2 -2
- package/dist/index194.js +1 -1
- package/dist/index196.js +2 -2
- package/dist/index198.js +14 -14
- package/dist/index199.js +1 -1
- package/dist/index200.js +1 -1
- package/dist/index201.js +3 -3
- package/dist/index202.js +5 -5
- package/dist/index203.js +29 -84
- package/dist/index204.js +109 -400
- package/dist/index205.js +36 -22
- package/dist/index206.js +26 -33
- package/dist/index207.js +31 -111
- package/dist/index208.js +9 -36
- package/dist/index209.js +19 -26
- package/dist/index210.js +10 -36
- package/dist/index211.js +10 -9
- package/dist/index212.js +50 -18
- package/dist/index213.js +43 -10
- package/dist/index214.js +4 -10
- package/dist/index215.js +36 -48
- package/dist/index216.js +21 -43
- package/dist/index217.js +126 -3
- package/dist/index218.js +36 -37
- package/dist/index219.js +407 -21
- package/dist/index220.js +76 -157
- package/dist/index221.js +9 -9
- package/dist/index222.js +87 -19
- package/dist/index223.js +13 -15
- package/dist/index224.js +19 -198
- package/dist/index225.js +18 -68
- package/dist/index226.js +20 -34
- package/dist/index227.js +21 -39
- package/dist/index228.js +159 -159
- package/dist/index229.js +20 -228
- package/dist/index230.js +21 -36
- package/dist/index231.js +198 -9
- package/dist/index232.js +64 -121
- package/dist/index233.js +32 -36
- package/dist/index234.js +40 -80
- package/dist/index235.js +160 -19
- package/dist/index236.js +228 -20
- package/dist/index237.js +36 -19
- package/dist/index238.js +10 -20
- package/dist/index239.js +3632 -22
- package/dist/index240.js +55 -22
- package/dist/index241.js +77 -20
- package/dist/index242.js +39 -823
- package/dist/index243.js +198 -685
- package/dist/index244.js +9 -175
- package/dist/index245.js +57 -22
- package/dist/index246.js +61 -20
- package/dist/index247.js +54 -20
- package/dist/index248.js +75 -3
- package/dist/index249.js +707 -171
- package/dist/index250.js +34 -128
- package/dist/index251.js +55 -1214
- package/dist/index252.js +11 -20
- package/dist/index253.js +705 -22
- package/dist/index254.js +820 -22
- package/dist/index255.js +15 -22
- package/dist/index256.js +15 -13
- package/dist/index257.js +12 -12
- package/dist/index258.js +836 -2
- package/dist/index259.js +702 -2
- package/dist/index260.js +170 -3626
- package/dist/index261.js +22 -55
- package/dist/index262.js +20 -77
- package/dist/index263.js +20 -52
- package/dist/index264.js +3 -215
- package/dist/index265.js +187 -10
- package/dist/index266.js +128 -52
- package/dist/index267.js +1214 -52
- package/dist/index268.js +20 -54
- package/dist/index269.js +22 -75
- package/dist/index270.js +21 -722
- package/dist/index271.js +29 -39
- package/dist/index272.js +20 -64
- package/dist/index273.js +20 -11
- package/dist/index274.js +2 -705
- package/dist/index275.js +2 -820
- package/dist/index280.js +2 -54
- package/dist/index281.js +1 -1
- package/dist/index282.js +53 -25
- package/dist/index283.js +19 -15
- package/dist/index284.js +9 -9
- package/dist/index285.js +22 -16
- package/dist/index286.js +14 -15
- package/dist/index287.js +15 -21
- package/dist/index288.js +22 -261
- package/dist/index289.js +260 -4
- package/dist/index290.js +5 -139
- package/dist/index291.js +135 -68
- package/dist/index292.js +71 -85
- package/dist/index293.js +85 -27
- package/dist/index294.js +27 -14
- package/dist/index295.js +12 -71
- package/dist/index296.js +74 -3
- package/dist/index297.js +4 -2
- package/dist/index298.js +2 -83
- package/dist/index299.js +79 -49
- package/dist/index300.js +52 -5
- package/dist/index301.js +5 -4
- package/dist/index302.js +4 -178
- package/dist/index303.js +174 -58
- package/dist/index304.js +61 -73
- package/dist/index305.js +75 -2
- package/dist/index307.js +1 -1
- package/dist/index310.js +1 -1
- package/dist/index311.js +1 -1
- package/dist/index312.js +15 -79
- package/dist/index313.js +83 -21
- package/dist/index314.js +186 -919
- package/dist/index315.js +246 -22
- package/dist/index316.js +3 -20
- package/dist/index317.js +26 -19
- package/dist/index318.js +77 -67
- package/dist/index319.js +21 -18
- package/dist/index320.js +934 -18
- package/dist/index321.js +16 -16
- package/dist/index322.js +11 -13
- package/dist/index323.js +19 -62
- package/dist/index324.js +69 -15
- package/dist/index325.js +19 -84
- package/dist/index326.js +18 -201
- package/dist/index327.js +22 -246
- package/dist/index328.js +22 -3
- package/dist/index329.js +63 -27
- package/dist/index331.js +1 -1
- package/dist/index332.js +1 -1
- package/dist/index333.js +5 -5
- package/dist/index335.js +2 -2
- package/dist/index337.js +2 -2
- package/dist/index339.js +1 -1
- package/dist/index341.js +4 -4
- package/dist/index342.js +3 -3
- package/dist/index343.js +8 -19
- package/dist/index344.js +12 -19
- package/dist/index345.js +51 -60
- package/dist/index346.js +12 -37
- package/dist/index347.js +13 -8
- package/dist/index348.js +57 -12
- package/dist/index349.js +48 -51
- package/dist/index350.js +28 -9
- package/dist/index351.js +2 -14
- package/dist/index352.js +5 -58
- package/dist/index353.js +2 -52
- package/dist/index354.js +22 -30
- package/dist/index355.js +41 -2
- package/dist/index356.js +2 -5
- package/dist/index357.js +11 -2
- package/dist/index358.js +19 -22
- package/dist/index359.js +14 -38
- package/dist/index360.js +10 -2
- package/dist/index361.js +9 -10
- package/dist/index362.js +2 -20
- package/dist/index363.js +8 -16
- package/dist/index364.js +10 -10
- package/dist/index365.js +13 -9
- package/dist/index366.js +20 -2
- package/dist/index367.js +20 -9
- package/dist/index368.js +63 -9
- package/dist/index369.js +37 -14
- package/dist/index370.js +1 -1
- package/dist/index371.js +3 -3
- package/dist/index376.js +1 -1
- package/dist/index378.js +1 -1
- package/dist/index379.js +3 -3
- package/dist/index380.js +3 -3
- package/dist/index382.js +97 -16
- package/dist/index385.js +16 -97
- package/dist/index392.js +1 -1
- package/dist/index43.js +13 -6
- package/package.json +1 -1
package/dist/index313.js
CHANGED
|
@@ -1,24 +1,86 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
import { Plugin as w } from "./index254.js";
|
|
2
|
+
import { dropPoint as v } from "./index306.js";
|
|
3
|
+
function y(m = {}) {
|
|
4
|
+
return new w({
|
|
5
|
+
view(e) {
|
|
6
|
+
return new C(e, m);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
}
|
|
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
|
+
}
|
|
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
|
+
}
|
|
42
|
+
}
|
|
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
|
+
}
|
|
20
83
|
}
|
|
21
|
-
n.render = d;
|
|
22
84
|
export {
|
|
23
|
-
|
|
85
|
+
y as dropCursor
|
|
24
86
|
};
|