@quoreadmin/ui 1.10.15 → 1.10.17

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.
Files changed (159) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index182.js +14 -14
  3. package/dist/index183.js +3 -3
  4. package/dist/index186.js +4 -4
  5. package/dist/index193.js +9 -9
  6. package/dist/index194.js +1 -1
  7. package/dist/index195.js +2 -2
  8. package/dist/index198.js +17 -17
  9. package/dist/index201.js +4 -4
  10. package/dist/index202.js +1 -1
  11. package/dist/index203.js +1 -1
  12. package/dist/index204.js +1 -1
  13. package/dist/index212.js +4 -4
  14. package/dist/index213.js +29 -84
  15. package/dist/index214.js +109 -400
  16. package/dist/index215.js +36 -22
  17. package/dist/index216.js +26 -33
  18. package/dist/index217.js +31 -111
  19. package/dist/index218.js +50 -35
  20. package/dist/index219.js +43 -26
  21. package/dist/index220.js +3 -35
  22. package/dist/index221.js +9 -51
  23. package/dist/index222.js +18 -42
  24. package/dist/index223.js +10 -4
  25. package/dist/index224.js +10 -9
  26. package/dist/index225.js +38 -18
  27. package/dist/index226.js +21 -10
  28. package/dist/index227.js +88 -10
  29. package/dist/index228.js +403 -35
  30. package/dist/index229.js +22 -21
  31. package/dist/index238.js +159 -159
  32. package/dist/index239.js +20 -228
  33. package/dist/index240.js +21 -36
  34. package/dist/index241.js +198 -9
  35. package/dist/index242.js +49 -140
  36. package/dist/index243.js +34 -20
  37. package/dist/index244.js +39 -21
  38. package/dist/index245.js +156 -194
  39. package/dist/index246.js +224 -66
  40. package/dist/index247.js +37 -34
  41. package/dist/index248.js +9 -39
  42. package/dist/index252.js +8 -8
  43. package/dist/index253.js +2 -2
  44. package/dist/index259.js +2 -2
  45. package/dist/index260.js +2 -2
  46. package/dist/index261.js +5 -5
  47. package/dist/index270.js +6 -6
  48. package/dist/index271.js +1 -1
  49. package/dist/index272.js +1 -1
  50. package/dist/index285.js +2 -2
  51. package/dist/index291.js +1 -1
  52. package/dist/index292.js +54 -3
  53. package/dist/index293.js +25 -26
  54. package/dist/index294.js +21 -53
  55. package/dist/index295.js +13 -17
  56. package/dist/index296.js +16 -22
  57. package/dist/index297.js +17 -22
  58. package/dist/index298.js +22 -15
  59. package/dist/index299.js +261 -16
  60. package/dist/index300.js +6 -23
  61. package/dist/index301.js +130 -1524
  62. package/dist/index302.js +65 -378
  63. package/dist/index303.js +81 -2725
  64. package/dist/index304.js +26 -83
  65. package/dist/index305.js +13 -3789
  66. package/dist/index306.js +72 -57
  67. package/dist/index307.js +3 -78
  68. package/dist/index308.js +2 -22
  69. package/dist/index309.js +74 -926
  70. package/dist/index310.js +52 -21
  71. package/dist/index311.js +5 -19
  72. package/dist/index312.js +4 -19
  73. package/dist/index313.js +171 -61
  74. package/dist/index314.js +62 -18
  75. package/dist/index315.js +74 -18
  76. package/dist/index316.js +3 -22
  77. package/dist/index317.js +26 -21
  78. package/dist/index318.js +1534 -63
  79. package/dist/index319.js +385 -14
  80. package/dist/index320.js +2714 -67
  81. package/dist/index321.js +73 -189
  82. package/dist/index322.js +3767 -221
  83. package/dist/index323.js +52 -254
  84. package/dist/index324.js +78 -5
  85. package/dist/index325.js +21 -139
  86. package/dist/index326.js +928 -66
  87. package/dist/index327.js +21 -86
  88. package/dist/index328.js +19 -28
  89. package/dist/index329.js +19 -15
  90. package/dist/index330.js +67 -73
  91. package/dist/index331.js +19 -4
  92. package/dist/index332.js +19 -2
  93. package/dist/index333.js +21 -82
  94. package/dist/index334.js +21 -52
  95. package/dist/index335.js +63 -6
  96. package/dist/index336.js +15 -5
  97. package/dist/index337.js +71 -166
  98. package/dist/index338.js +196 -57
  99. package/dist/index339.js +246 -75
  100. package/dist/index341.js +18 -8
  101. package/dist/index342.js +56 -12
  102. package/dist/index343.js +27 -53
  103. package/dist/index344.js +6 -11
  104. package/dist/index345.js +50 -12
  105. package/dist/index346.js +7 -58
  106. package/dist/index347.js +10 -50
  107. package/dist/index348.js +7 -31
  108. package/dist/index349.js +28 -2
  109. package/dist/index350.js +2 -5
  110. package/dist/index351.js +70 -2
  111. package/dist/index352.js +165 -21
  112. package/dist/index353.js +8 -40
  113. package/dist/index354.js +13 -2
  114. package/dist/index355.js +55 -11
  115. package/dist/index356.js +10 -18
  116. package/dist/index357.js +14 -10
  117. package/dist/index358.js +58 -10
  118. package/dist/index359.js +51 -16
  119. package/dist/index360.js +31 -2
  120. package/dist/index361.js +2 -9
  121. package/dist/index362.js +5 -10
  122. package/dist/index363.js +2 -14
  123. package/dist/index364.js +23 -20
  124. package/dist/index365.js +40 -19
  125. package/dist/index366.js +2 -64
  126. package/dist/index367.js +10 -36
  127. package/dist/index368.js +17 -16
  128. package/dist/index369.js +10 -57
  129. package/dist/index370.js +10 -29
  130. package/dist/index371.js +16 -6
  131. package/dist/index372.js +2 -52
  132. package/dist/index373.js +8 -6
  133. package/dist/index374.js +9 -11
  134. package/dist/index375.js +13 -6
  135. package/dist/index376.js +20 -28
  136. package/dist/index377.js +20 -2
  137. package/dist/index378.js +61 -67
  138. package/dist/index379.js +36 -166
  139. package/dist/index380.js +28 -98
  140. package/dist/index381.js +10 -90
  141. package/dist/index382.js +4 -17
  142. package/dist/index383.js +4 -98
  143. package/dist/index384.js +12 -30
  144. package/dist/index385.js +7 -11
  145. package/dist/index386.js +11 -3
  146. package/dist/index387.js +4 -3
  147. package/dist/index388.js +33 -13
  148. package/dist/index389.js +31 -7
  149. package/dist/index390.js +28 -12
  150. package/dist/index391.js +61 -5
  151. package/dist/index392.js +101 -33
  152. package/dist/index393.js +91 -31
  153. package/dist/index394.js +16 -27
  154. package/dist/index395.js +96 -59
  155. package/dist/index396.js +1 -1
  156. package/dist/index4.js +5 -5
  157. package/dist/index401.js +1 -1
  158. package/dist/index402.js +2 -2
  159. package/package.json +1 -1
package/dist/index321.js CHANGED
@@ -1,204 +1,88 @@
1
- import { keydownHandler as v } from "./index306.js";
2
- import { Plugin as w, TextSelection as m, NodeSelection as x, Selection as u } from "./index285.js";
3
- import { Fragment as h, Slice as g } from "./index303.js";
4
- import { DecorationSet as S, Decoration as A } from "./index305.js";
5
- class i extends u {
6
- /**
7
- Create a gap cursor.
8
- */
9
- constructor(e) {
10
- super(e, e);
11
- }
12
- map(e, t) {
13
- let o = e.resolve(t.map(this.head));
14
- return i.valid(o) ? new i(o) : u.near(o);
15
- }
16
- content() {
17
- return g.empty;
18
- }
19
- eq(e) {
20
- return e instanceof i && e.head == this.head;
21
- }
22
- toJSON() {
23
- return { type: "gapcursor", pos: this.head };
24
- }
25
- /**
26
- @internal
27
- */
28
- static fromJSON(e, t) {
29
- if (typeof t.pos != "number")
30
- throw new RangeError("Invalid input for GapCursor.fromJSON");
31
- return new i(e.resolve(t.pos));
32
- }
33
- /**
34
- @internal
35
- */
36
- getBookmark() {
37
- return new d(this.anchor);
38
- }
39
- /**
40
- @internal
41
- */
42
- static valid(e) {
43
- let t = e.parent;
44
- if (t.isTextblock || !b(e) || !y(e))
1
+ import { ReplaceAroundStep as h, liftTarget as w, canJoin as C, findWrapping as L, canSplit as R } from "./index318.js";
2
+ import { Fragment as s, Slice as I, NodeRange as x } from "./index320.js";
3
+ function O(r, t = null) {
4
+ return function(e, l) {
5
+ let { $from: o, $to: n } = e.selection, f = o.blockRange(n);
6
+ if (!f)
45
7
  return !1;
46
- let o = t.type.spec.allowGapCursor;
47
- if (o != null)
48
- return o;
49
- let r = t.contentMatchAt(e.index()).defaultType;
50
- return r && r.isTextblock;
51
- }
52
- /**
53
- @internal
54
- */
55
- static findGapCursorFrom(e, t, o = !1) {
56
- e: for (; ; ) {
57
- if (!o && i.valid(e))
58
- return e;
59
- let r = e.pos, s = null;
60
- for (let l = e.depth; ; l--) {
61
- let a = e.node(l);
62
- if (t > 0 ? e.indexAfter(l) < a.childCount : e.index(l) > 0) {
63
- s = a.child(t > 0 ? e.indexAfter(l) : e.index(l) - 1);
64
- break;
65
- } else if (l == 0)
66
- return null;
67
- r += t;
68
- let f = e.doc.resolve(r);
69
- if (i.valid(f))
70
- return f;
71
- }
72
- for (; ; ) {
73
- let l = t > 0 ? s.firstChild : s.lastChild;
74
- if (!l) {
75
- if (s.isAtom && !s.isText && !x.isSelectable(s)) {
76
- e = e.doc.resolve(r + s.nodeSize * t), o = !1;
77
- continue e;
78
- }
79
- break;
80
- }
81
- s = l, r += t;
82
- let a = e.doc.resolve(r);
83
- if (i.valid(a))
84
- return a;
85
- }
86
- return null;
87
- }
88
- }
89
- }
90
- i.prototype.visible = !1;
91
- i.findFrom = i.findGapCursorFrom;
92
- u.jsonID("gapcursor", i);
93
- class d {
94
- constructor(e) {
95
- this.pos = e;
96
- }
97
- map(e) {
98
- return new d(e.map(this.pos));
99
- }
100
- resolve(e) {
101
- let t = e.resolve(this.pos);
102
- return i.valid(t) ? new i(t) : u.near(t);
103
- }
104
- }
105
- function C(n) {
106
- return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
107
- }
108
- function b(n) {
109
- for (let e = n.depth; e >= 0; e--) {
110
- let t = n.index(e), o = n.node(e);
111
- if (t == 0) {
112
- if (o.type.spec.isolating)
113
- return !0;
114
- continue;
115
- }
116
- for (let r = o.child(t - 1); ; r = r.lastChild) {
117
- if (r.childCount == 0 && !r.inlineContent || C(r.type))
118
- return !0;
119
- if (r.inlineContent)
120
- return !1;
121
- }
122
- }
123
- return !0;
8
+ let i = l ? e.tr : null;
9
+ return S(i, f, r, t) ? (l && l(i.scrollIntoView()), !0) : !1;
10
+ };
124
11
  }
125
- function y(n) {
126
- for (let e = n.depth; e >= 0; e--) {
127
- let t = n.indexAfter(e), o = n.node(e);
128
- if (t == o.childCount) {
129
- if (o.type.spec.isolating)
130
- return !0;
131
- continue;
132
- }
133
- for (let r = o.child(t); ; r = r.firstChild) {
134
- if (r.childCount == 0 && !r.inlineContent || C(r.type))
135
- return !0;
136
- if (r.inlineContent)
137
- return !1;
138
- }
12
+ function S(r, t, e, l = null) {
13
+ let o = !1, n = t, f = t.$from.doc;
14
+ if (t.depth >= 2 && t.$from.node(t.depth - 1).type.compatibleContent(e) && t.startIndex == 0) {
15
+ if (t.$from.index(t.depth - 1) == 0)
16
+ return !1;
17
+ let d = f.resolve(t.start - 2);
18
+ n = new x(d, d, t.depth), t.endIndex < t.parent.childCount && (t = new x(t.$from, f.resolve(t.$to.end(t.depth)), t.depth)), o = !0;
139
19
  }
140
- return !0;
20
+ let i = L(n, e, l, t);
21
+ return i ? (r && v(r, t, i, o, e), !0) : !1;
141
22
  }
142
- function B() {
143
- return new w({
144
- props: {
145
- decorations: F,
146
- createSelectionBetween(n, e, t) {
147
- return e.pos == t.pos && i.valid(t) ? new i(t) : null;
148
- },
149
- handleClick: T,
150
- handleKeyDown: k,
151
- handleDOMEvents: { beforeinput: D }
152
- }
153
- });
23
+ function v(r, t, e, l, o) {
24
+ let n = s.empty;
25
+ for (let u = e.length - 1; u >= 0; u--)
26
+ n = s.from(e[u].type.create(e[u].attrs, n));
27
+ r.step(new h(t.start - (l ? 2 : 0), t.end, t.start, t.end, new I(n, 0, 0), e.length, !0));
28
+ let f = 0;
29
+ for (let u = 0; u < e.length; u++)
30
+ e[u].type == o && (f = u + 1);
31
+ let i = e.length - f, d = t.start + e.length - (l ? 2 : 0), c = t.parent;
32
+ for (let u = t.startIndex, m = t.endIndex, p = !0; u < m; u++, p = !1)
33
+ !p && R(r.doc, d, i) && (r.split(d, i), d += 2 * i), d += c.child(u).nodeSize;
34
+ return r;
154
35
  }
155
- const k = v({
156
- ArrowLeft: c("horiz", -1),
157
- ArrowRight: c("horiz", 1),
158
- ArrowUp: c("vert", -1),
159
- ArrowDown: c("vert", 1)
160
- });
161
- function c(n, e) {
162
- const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
163
- return function(o, r, s) {
164
- let l = o.selection, a = e > 0 ? l.$to : l.$from, f = l.empty;
165
- if (l instanceof m) {
166
- if (!s.endOfTextblock(t) || a.depth == 0)
167
- return !1;
168
- f = !1, a = o.doc.resolve(e > 0 ? a.after() : a.before());
169
- }
170
- let p = i.findGapCursorFrom(a, e, f);
171
- return p ? (r && r(o.tr.setSelection(new i(p))), !0) : !1;
36
+ function V(r) {
37
+ return function(t, e) {
38
+ let { $from: l, $to: o } = t.selection, n = l.blockRange(o, (f) => f.childCount > 0 && f.firstChild.type == r);
39
+ return n ? e ? l.node(n.depth - 1).type == r ? b(t, e, r, n) : k(t, e, n) : !0 : !1;
172
40
  };
173
41
  }
174
- function T(n, e, t) {
175
- if (!n || !n.editable)
176
- return !1;
177
- let o = n.state.doc.resolve(e);
178
- if (!i.valid(o))
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)
179
47
  return !1;
180
- let r = n.posAtCoords({ left: t.clientX, top: t.clientY });
181
- return r && r.inside > -1 && x.isSelectable(n.state.doc.nodeAt(r.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new i(o))), !0);
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;
182
51
  }
183
- function D(n, e) {
184
- if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof i))
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)
185
58
  return !1;
186
- let { $from: t } = n.state.selection, o = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
187
- if (!o)
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))))
188
61
  return !1;
189
- let r = h.empty;
190
- for (let l = o.length - 1; l >= 0; l--)
191
- r = h.from(o[l].createAndFill(null, r));
192
- let s = n.state.tr.replace(t.pos, t.pos, new g(r, 0, 0));
193
- return s.setSelection(m.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !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;
194
64
  }
195
- function F(n) {
196
- if (!(n.selection instanceof i))
197
- return null;
198
- let e = document.createElement("div");
199
- return e.className = "ProseMirror-gapcursor", S.create(n.doc, [A.widget(n.selection.head, e, { key: "gapcursor" })]);
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());
79
+ }
80
+ return !0;
81
+ };
200
82
  }
201
83
  export {
202
- i as GapCursor,
203
- B as gapCursor
84
+ V as liftListItem,
85
+ B as sinkListItem,
86
+ O as wrapInList,
87
+ S as wrapRangeInList
204
88
  };