@quoreadmin/ui 1.8.1 → 1.8.2
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/index10.js +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.js +17 -17
- package/dist/index127.js +2 -2
- package/dist/index13.js +3 -3
- package/dist/index14.js +2 -2
- package/dist/index15.js +1 -1
- package/dist/index16.js +15 -15
- package/dist/index161.js +1 -1
- package/dist/index17.js +1 -1
- package/dist/index174.js +17 -17
- package/dist/index175.js +7 -7
- package/dist/index176.js +4 -4
- package/dist/index178.js +19 -19
- package/dist/index18.js +3 -3
- package/dist/index185.js +11 -11
- package/dist/index187.js +4 -4
- package/dist/index189.js +17 -17
- package/dist/index19.js +1 -1
- package/dist/index192.js +17 -17
- package/dist/index193.js +7 -7
- package/dist/index194.js +1 -1
- package/dist/index195.js +1 -1
- package/dist/index196.js +1 -1
- package/dist/index199.js +1 -1
- package/dist/index2.js +11 -11
- package/dist/index20.js +5 -5
- package/dist/index202.js +1 -1
- package/dist/index203.js +81 -78
- package/dist/index204.js +88 -81
- package/dist/index205.js +84 -29
- package/dist/index206.js +400 -109
- package/dist/index207.js +22 -36
- package/dist/index208.js +161 -26
- package/dist/index209.js +19 -35
- package/dist/index21.js +5 -5
- package/dist/index210.js +20 -9
- package/dist/index211.js +21 -18
- package/dist/index212.js +199 -10
- package/dist/index213.js +70 -10
- package/dist/index214.js +34 -51
- package/dist/index215.js +37 -40
- package/dist/index216.js +160 -3
- package/dist/index217.js +223 -34
- package/dist/index218.js +37 -21
- package/dist/index219.js +10 -161
- package/dist/index22.js +5 -5
- package/dist/index220.js +32 -19
- package/dist/index221.js +115 -19
- package/dist/index222.js +35 -21
- package/dist/index223.js +26 -199
- package/dist/index224.js +35 -69
- package/dist/index225.js +49 -86
- package/dist/index226.js +39 -403
- package/dist/index227.js +4 -34
- package/dist/index228.js +9 -40
- package/dist/index229.js +18 -160
- package/dist/index23.js +3 -3
- package/dist/index230.js +10 -228
- package/dist/index231.js +10 -37
- package/dist/index232.js +39 -10
- package/dist/index233.js +21 -22
- package/dist/index234.js +2 -2
- package/dist/index235.js +3 -3
- package/dist/index236.js +1 -1
- package/dist/index237.js +3 -3
- package/dist/index238.js +3 -3
- package/dist/index239.js +3 -3
- package/dist/index24.js +3 -3
- package/dist/index240.js +3 -3
- package/dist/index241.js +3 -3
- package/dist/index242.js +3 -3
- package/dist/index243.js +3 -3
- package/dist/index244.js +9 -9
- package/dist/index245.js +11 -11
- package/dist/index246.js +1 -1
- package/dist/index247.js +3 -3
- package/dist/index248.js +3 -3
- package/dist/index249.js +3 -3
- package/dist/index25.js +3 -3
- package/dist/index251.js +3 -3
- package/dist/index252.js +4 -4
- package/dist/index253.js +25 -25
- package/dist/index254.js +3 -3
- package/dist/index255.js +3 -3
- package/dist/index256.js +3 -3
- package/dist/index257.js +3 -3
- package/dist/index258.js +3 -3
- package/dist/index259.js +3 -3
- package/dist/index26.js +1 -1
- package/dist/index262.js +35 -31
- package/dist/index263.js +1 -1
- package/dist/index264.js +1 -1
- package/dist/index27.js +11 -11
- package/dist/index272.js +136 -133
- package/dist/index273.js +14 -11
- package/dist/index277.js +2 -2
- package/dist/index278.js +249 -50
- package/dist/index279.js +8 -79
- package/dist/index28.js +5 -5
- package/dist/index280.js +138 -26
- package/dist/index281.js +83 -22
- package/dist/index282.js +53 -21
- package/dist/index283.js +78 -15
- package/dist/index284.js +26 -17
- package/dist/index285.js +22 -253
- package/dist/index286.js +22 -8
- package/dist/index287.js +15 -137
- package/dist/index288.js +17 -83
- package/dist/index289.js +1 -1
- package/dist/index29.js +1 -1
- package/dist/index290.js +2 -3
- package/dist/index291.js +257 -22
- package/dist/index292.js +6 -2
- package/dist/index293.js +133 -255
- package/dist/index294.js +71 -4
- package/dist/index295.js +77 -130
- package/dist/index296.js +26 -70
- package/dist/index297.js +13 -84
- package/dist/index298.js +72 -26
- package/dist/index299.js +3 -15
- package/dist/index3.js +7 -7
- package/dist/index30.js +1 -1
- package/dist/index300.js +2 -75
- package/dist/index301.js +82 -3
- package/dist/index302.js +53 -2
- package/dist/index303.js +5 -82
- package/dist/index304.js +4 -52
- package/dist/index305.js +178 -5
- package/dist/index306.js +62 -4
- package/dist/index307.js +74 -178
- package/dist/index308.js +1525 -54
- package/dist/index309.js +385 -74
- package/dist/index31.js +1 -1
- package/dist/index310.js +2731 -79
- package/dist/index311.js +85 -21
- package/dist/index312.js +3751 -894
- package/dist/index313.js +59 -21
- package/dist/index314.js +15 -20
- package/dist/index315.js +83 -19
- package/dist/index316.js +194 -61
- package/dist/index317.js +246 -19
- package/dist/index318.js +76 -16
- package/dist/index319.js +16 -16
- package/dist/index32.js +9 -9
- package/dist/index320.js +935 -22
- package/dist/index321.js +22 -63
- package/dist/index322.js +20 -1518
- package/dist/index323.js +20 -386
- package/dist/index324.js +69 -2731
- package/dist/index325.js +19 -86
- package/dist/index326.js +19 -3770
- package/dist/index327.js +21 -59
- package/dist/index328.js +22 -15
- package/dist/index329.js +63 -84
- package/dist/index33.js +4 -4
- package/dist/index330.js +3 -202
- package/dist/index331.js +21 -240
- package/dist/index332.js +1 -1
- package/dist/index333.js +18 -8
- package/dist/index334.js +56 -12
- package/dist/index335.js +27 -53
- package/dist/index336.js +6 -11
- package/dist/index337.js +50 -12
- package/dist/index338.js +7 -58
- package/dist/index339.js +10 -50
- package/dist/index34.js +5 -5
- package/dist/index340.js +7 -31
- package/dist/index341.js +28 -2
- package/dist/index342.js +2 -5
- package/dist/index343.js +70 -2
- package/dist/index344.js +165 -21
- package/dist/index345.js +19 -40
- package/dist/index346.js +20 -2
- package/dist/index347.js +64 -11
- package/dist/index348.js +36 -19
- package/dist/index349.js +8 -16
- package/dist/index35.js +8 -8
- package/dist/index350.js +13 -10
- package/dist/index351.js +55 -10
- package/dist/index352.js +12 -2
- package/dist/index353.js +14 -9
- package/dist/index354.js +57 -9
- package/dist/index355.js +52 -14
- package/dist/index356.js +28 -16
- package/dist/index357.js +2 -57
- package/dist/index358.js +5 -29
- package/dist/index359.js +2 -7
- package/dist/index36.js +2 -2
- package/dist/index360.js +21 -50
- package/dist/index361.js +40 -6
- package/dist/index362.js +2 -12
- package/dist/index363.js +10 -6
- package/dist/index364.js +20 -28
- package/dist/index365.js +10 -2
- package/dist/index366.js +9 -69
- package/dist/index367.js +15 -165
- package/dist/index368.js +2 -20
- package/dist/index369.js +9 -20
- package/dist/index37.js +2 -2
- package/dist/index370.js +9 -63
- package/dist/index371.js +14 -37
- package/dist/index372.js +1 -1
- package/dist/index373.js +3 -3
- package/dist/index378.js +1 -1
- package/dist/index38.js +2 -2
- package/dist/index380.js +1 -1
- package/dist/index381.js +6 -6
- package/dist/index382.js +3 -3
- package/dist/index384.js +97 -16
- package/dist/index386.js +17 -91
- package/dist/index387.js +91 -98
- package/dist/index39.js +4 -4
- package/dist/index393.js +1 -1
- package/dist/index394.js +2 -2
- package/dist/index4.js +5 -5
- package/dist/index40.js +7 -7
- package/dist/index41.js +7 -7
- package/dist/index42.js +5 -5
- package/dist/index43.js +5 -5
- package/dist/index44.js +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.js +2 -2
- package/dist/index48.js +5 -5
- package/dist/index49.js +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.js +3 -3
- package/dist/index51.js +1 -1
- package/dist/index52.js +3 -3
- package/dist/index53.js +1 -1
- package/dist/index6.js +3 -3
- package/dist/index7.js +4 -4
- package/dist/index8.js +4 -4
- package/dist/index9.js +1 -1
- package/dist/src/components/data-table/data-table.d.ts +4 -4
- package/dist/src/views/tables.vue.d.ts +4 -4
- package/package.json +1 -1
package/dist/index272.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Node as g,
|
|
1
|
+
import { Node as g, wrappingInputRule as b, mergeAttributes as L, renderNestedMarkdownContent as $, Extension as S, isNodeActive as I, isAtStartOfNode as K, isAtEndOfNode as V, getNodeType as O, getNodeAtPosition as X, getRenderedAttributes as z, parseIndentedBlocks as x } from "./index262.js";
|
|
2
2
|
var F = Object.defineProperty, G = (t, e) => {
|
|
3
3
|
for (var s in e)
|
|
4
4
|
F(t, s, { get: e[s], enumerable: !0 });
|
|
@@ -83,18 +83,18 @@ var F = Object.defineProperty, G = (t, e) => {
|
|
|
83
83
|
return [];
|
|
84
84
|
let s = [];
|
|
85
85
|
if (t.tokens && t.tokens.length > 0)
|
|
86
|
-
if (t.tokens.some((
|
|
86
|
+
if (t.tokens.some((n) => n.type === "paragraph"))
|
|
87
87
|
s = e.parseChildren(t.tokens);
|
|
88
88
|
else {
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
89
|
+
const n = t.tokens[0];
|
|
90
|
+
if (n && n.type === "text" && n.tokens && n.tokens.length > 0) {
|
|
91
91
|
if (s = [
|
|
92
92
|
{
|
|
93
93
|
type: "paragraph",
|
|
94
|
-
content: e.parseInline(
|
|
94
|
+
content: e.parseInline(n.tokens)
|
|
95
95
|
}
|
|
96
96
|
], t.tokens.length > 1) {
|
|
97
|
-
const
|
|
97
|
+
const c = t.tokens.slice(1), a = e.parseChildren(c);
|
|
98
98
|
s.push(...a);
|
|
99
99
|
}
|
|
100
100
|
} else
|
|
@@ -110,10 +110,13 @@ var F = Object.defineProperty, G = (t, e) => {
|
|
|
110
110
|
content: s
|
|
111
111
|
};
|
|
112
112
|
},
|
|
113
|
-
renderMarkdown: (t, e, s) =>
|
|
113
|
+
renderMarkdown: (t, e, s) => $(
|
|
114
114
|
t,
|
|
115
115
|
e,
|
|
116
|
-
(
|
|
116
|
+
(r) => {
|
|
117
|
+
var n, i;
|
|
118
|
+
return r.parentType === "bulletList" ? "- " : r.parentType === "orderedList" ? `${(((i = (n = r.meta) == null ? void 0 : n.parentAttrs) == null ? void 0 : i.start) || 1) + r.index}. ` : "- ";
|
|
119
|
+
},
|
|
117
120
|
s
|
|
118
121
|
),
|
|
119
122
|
addKeyboardShortcuts() {
|
|
@@ -129,49 +132,49 @@ G(J, {
|
|
|
129
132
|
getNextListDepth: () => A,
|
|
130
133
|
handleBackspace: () => T,
|
|
131
134
|
handleDelete: () => M,
|
|
132
|
-
hasListBefore: () =>
|
|
135
|
+
hasListBefore: () => _,
|
|
133
136
|
hasListItemAfter: () => Q,
|
|
134
|
-
hasListItemBefore: () =>
|
|
137
|
+
hasListItemBefore: () => P,
|
|
135
138
|
listItemHasSubList: () => D,
|
|
136
139
|
nextListIsDeeper: () => R,
|
|
137
140
|
nextListIsHigher: () => j
|
|
138
141
|
});
|
|
139
142
|
var y = (t, e) => {
|
|
140
|
-
const { $from: s } = e.selection,
|
|
141
|
-
let
|
|
143
|
+
const { $from: s } = e.selection, r = O(t, e.schema);
|
|
144
|
+
let n = null, i = s.depth, c = s.pos, a = null;
|
|
142
145
|
for (; i > 0 && a === null; )
|
|
143
|
-
|
|
144
|
-
return a === null ? null : { $pos: e.doc.resolve(
|
|
146
|
+
n = s.node(i), n.type === r ? a = i : (i -= 1, c -= 1);
|
|
147
|
+
return a === null ? null : { $pos: e.doc.resolve(c), depth: a };
|
|
145
148
|
}, A = (t, e) => {
|
|
146
149
|
const s = y(t, e);
|
|
147
150
|
if (!s)
|
|
148
151
|
return !1;
|
|
149
|
-
const [,
|
|
150
|
-
return
|
|
151
|
-
},
|
|
152
|
-
const { $anchor:
|
|
152
|
+
const [, r] = X(e, t, s.$pos.pos + 4);
|
|
153
|
+
return r;
|
|
154
|
+
}, _ = (t, e, s) => {
|
|
155
|
+
const { $anchor: r } = t.selection, n = Math.max(0, r.pos - 2), i = t.doc.resolve(n).node();
|
|
153
156
|
return !(!i || !s.includes(i.type.name));
|
|
154
|
-
},
|
|
157
|
+
}, P = (t, e) => {
|
|
155
158
|
var s;
|
|
156
|
-
const { $anchor:
|
|
157
|
-
return !(
|
|
159
|
+
const { $anchor: r } = e.selection, n = e.doc.resolve(r.pos - 2);
|
|
160
|
+
return !(n.index() === 0 || ((s = n.nodeBefore) == null ? void 0 : s.type.name) !== t);
|
|
158
161
|
}, D = (t, e, s) => {
|
|
159
162
|
if (!s)
|
|
160
163
|
return !1;
|
|
161
|
-
const
|
|
162
|
-
let
|
|
164
|
+
const r = O(t, e.schema);
|
|
165
|
+
let n = !1;
|
|
163
166
|
return s.descendants((i) => {
|
|
164
|
-
i.type ===
|
|
165
|
-
}),
|
|
167
|
+
i.type === r && (n = !0);
|
|
168
|
+
}), n;
|
|
166
169
|
}, T = (t, e, s) => {
|
|
167
170
|
if (t.commands.undoInputRule())
|
|
168
171
|
return !0;
|
|
169
172
|
if (t.state.selection.from !== t.state.selection.to)
|
|
170
173
|
return !1;
|
|
171
|
-
if (!I(t.state, e) &&
|
|
174
|
+
if (!I(t.state, e) && _(t.state, e, s)) {
|
|
172
175
|
const { $anchor: a } = t.state.selection, u = t.state.doc.resolve(a.before() - 1), p = [];
|
|
173
|
-
u.node().descendants((
|
|
174
|
-
|
|
176
|
+
u.node().descendants((l, d) => {
|
|
177
|
+
l.type.name === e && p.push({ node: l, pos: d });
|
|
175
178
|
});
|
|
176
179
|
const h = p.at(-1);
|
|
177
180
|
if (!h)
|
|
@@ -181,27 +184,27 @@ var y = (t, e) => {
|
|
|
181
184
|
}
|
|
182
185
|
if (!I(t.state, e) || !K(t.state))
|
|
183
186
|
return !1;
|
|
184
|
-
const
|
|
185
|
-
if (!
|
|
187
|
+
const r = y(e, t.state);
|
|
188
|
+
if (!r)
|
|
186
189
|
return !1;
|
|
187
|
-
const i = t.state.doc.resolve(
|
|
188
|
-
return
|
|
190
|
+
const i = t.state.doc.resolve(r.$pos.pos - 2).node(r.depth), c = D(e, t.state, i);
|
|
191
|
+
return P(e, t.state) && !c ? t.commands.joinItemBackward() : t.chain().liftListItem(e).run();
|
|
189
192
|
}, R = (t, e) => {
|
|
190
|
-
const s = A(t, e),
|
|
191
|
-
return !
|
|
193
|
+
const s = A(t, e), r = y(t, e);
|
|
194
|
+
return !r || !s ? !1 : s > r.depth;
|
|
192
195
|
}, j = (t, e) => {
|
|
193
|
-
const s = A(t, e),
|
|
194
|
-
return !
|
|
196
|
+
const s = A(t, e), r = y(t, e);
|
|
197
|
+
return !r || !s ? !1 : s < r.depth;
|
|
195
198
|
}, M = (t, e) => {
|
|
196
199
|
if (!I(t.state, e) || !V(t.state, e))
|
|
197
200
|
return !1;
|
|
198
|
-
const { selection: s } = t.state, { $from:
|
|
199
|
-
return !s.empty &&
|
|
201
|
+
const { selection: s } = t.state, { $from: r, $to: n } = s;
|
|
202
|
+
return !s.empty && r.sameParent(n) ? !1 : R(e, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(e).joinBackward().run() : j(e, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
|
|
200
203
|
}, Q = (t, e) => {
|
|
201
204
|
var s;
|
|
202
|
-
const { $anchor:
|
|
203
|
-
return !(
|
|
204
|
-
}, U =
|
|
205
|
+
const { $anchor: r } = e.selection, n = e.doc.resolve(r.pos - r.parentOffset - 2);
|
|
206
|
+
return !(n.index() === n.parent.childCount - 1 || ((s = n.nodeAfter) == null ? void 0 : s.type.name) !== t);
|
|
207
|
+
}, U = S.create({
|
|
205
208
|
name: "listKeymap",
|
|
206
209
|
addOptions() {
|
|
207
210
|
return {
|
|
@@ -233,14 +236,14 @@ var y = (t, e) => {
|
|
|
233
236
|
},
|
|
234
237
|
Backspace: ({ editor: t }) => {
|
|
235
238
|
let e = !1;
|
|
236
|
-
return this.options.listTypes.forEach(({ itemName: s, wrapperNames:
|
|
237
|
-
t.state.schema.nodes[s] !== void 0 && T(t, s,
|
|
239
|
+
return this.options.listTypes.forEach(({ itemName: s, wrapperNames: r }) => {
|
|
240
|
+
t.state.schema.nodes[s] !== void 0 && T(t, s, r) && (e = !0);
|
|
238
241
|
}), e;
|
|
239
242
|
},
|
|
240
243
|
"Mod-Backspace": ({ editor: t }) => {
|
|
241
244
|
let e = !1;
|
|
242
|
-
return this.options.listTypes.forEach(({ itemName: s, wrapperNames:
|
|
243
|
-
t.state.schema.nodes[s] !== void 0 && T(t, s,
|
|
245
|
+
return this.options.listTypes.forEach(({ itemName: s, wrapperNames: r }) => {
|
|
246
|
+
t.state.schema.nodes[s] !== void 0 && T(t, s, r) && (e = !0);
|
|
244
247
|
}), e;
|
|
245
248
|
}
|
|
246
249
|
};
|
|
@@ -248,24 +251,24 @@ var y = (t, e) => {
|
|
|
248
251
|
}), N = /^(\s*)(\d+)\.\s+(.*)$/, Z = /^\s/;
|
|
249
252
|
function tt(t) {
|
|
250
253
|
const e = [];
|
|
251
|
-
let s = 0,
|
|
254
|
+
let s = 0, r = 0;
|
|
252
255
|
for (; s < t.length; ) {
|
|
253
|
-
const
|
|
256
|
+
const n = t[s], i = n.match(N);
|
|
254
257
|
if (!i)
|
|
255
258
|
break;
|
|
256
|
-
const [,
|
|
259
|
+
const [, c, a, u] = i, p = c.length;
|
|
257
260
|
let h = u, o = s + 1;
|
|
258
|
-
const
|
|
261
|
+
const l = [n];
|
|
259
262
|
for (; o < t.length; ) {
|
|
260
|
-
const
|
|
261
|
-
if (
|
|
263
|
+
const d = t[o];
|
|
264
|
+
if (d.match(N))
|
|
262
265
|
break;
|
|
263
|
-
if (
|
|
264
|
-
|
|
266
|
+
if (d.trim() === "")
|
|
267
|
+
l.push(d), h += `
|
|
265
268
|
`, o += 1;
|
|
266
|
-
else if (
|
|
267
|
-
|
|
268
|
-
${
|
|
269
|
+
else if (d.match(Z))
|
|
270
|
+
l.push(d), h += `
|
|
271
|
+
${d.slice(p + 2)}`, o += 1;
|
|
269
272
|
else
|
|
270
273
|
break;
|
|
271
274
|
}
|
|
@@ -273,21 +276,21 @@ ${l.slice(p + 2)}`, o += 1;
|
|
|
273
276
|
indent: p,
|
|
274
277
|
number: parseInt(a, 10),
|
|
275
278
|
content: h.trim(),
|
|
276
|
-
raw:
|
|
279
|
+
raw: l.join(`
|
|
277
280
|
`)
|
|
278
|
-
}),
|
|
281
|
+
}), r = o, s = o;
|
|
279
282
|
}
|
|
280
|
-
return [e,
|
|
283
|
+
return [e, r];
|
|
281
284
|
}
|
|
282
285
|
function B(t, e, s) {
|
|
283
|
-
var
|
|
284
|
-
const
|
|
286
|
+
var r;
|
|
287
|
+
const n = [];
|
|
285
288
|
let i = 0;
|
|
286
289
|
for (; i < t.length; ) {
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
-
const a =
|
|
290
|
-
`), u = ((
|
|
290
|
+
const c = t[i];
|
|
291
|
+
if (c.indent === e) {
|
|
292
|
+
const a = c.content.split(`
|
|
293
|
+
`), u = ((r = a[0]) == null ? void 0 : r.trim()) || "", p = [];
|
|
291
294
|
u && p.push({
|
|
292
295
|
type: "paragraph",
|
|
293
296
|
raw: u,
|
|
@@ -296,55 +299,55 @@ function B(t, e, s) {
|
|
|
296
299
|
const h = a.slice(1).join(`
|
|
297
300
|
`).trim();
|
|
298
301
|
if (h) {
|
|
299
|
-
const
|
|
300
|
-
p.push(...
|
|
302
|
+
const d = s.blockTokens(h);
|
|
303
|
+
p.push(...d);
|
|
301
304
|
}
|
|
302
305
|
let o = i + 1;
|
|
303
|
-
const
|
|
306
|
+
const l = [];
|
|
304
307
|
for (; o < t.length && t[o].indent > e; )
|
|
305
|
-
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
+
l.push(t[o]), o += 1;
|
|
309
|
+
if (l.length > 0) {
|
|
310
|
+
const d = Math.min(...l.map((m) => m.indent)), k = B(l, d, s);
|
|
308
311
|
p.push({
|
|
309
312
|
type: "list",
|
|
310
313
|
ordered: !0,
|
|
311
|
-
start:
|
|
314
|
+
start: l[0].number,
|
|
312
315
|
items: k,
|
|
313
|
-
raw:
|
|
316
|
+
raw: l.map((m) => m.raw).join(`
|
|
314
317
|
`)
|
|
315
318
|
});
|
|
316
319
|
}
|
|
317
|
-
|
|
320
|
+
n.push({
|
|
318
321
|
type: "list_item",
|
|
319
|
-
raw:
|
|
322
|
+
raw: c.raw,
|
|
320
323
|
tokens: p
|
|
321
324
|
}), i = o;
|
|
322
325
|
} else
|
|
323
326
|
i += 1;
|
|
324
327
|
}
|
|
325
|
-
return
|
|
328
|
+
return n;
|
|
326
329
|
}
|
|
327
330
|
function et(t, e) {
|
|
328
331
|
return t.map((s) => {
|
|
329
332
|
if (s.type !== "list_item")
|
|
330
333
|
return e.parseChildren([s])[0];
|
|
331
|
-
const
|
|
332
|
-
return s.tokens && s.tokens.length > 0 && s.tokens.forEach((
|
|
333
|
-
if (
|
|
334
|
-
|
|
335
|
-
else if (
|
|
336
|
-
const i = e.parseChildren([
|
|
337
|
-
|
|
334
|
+
const r = [];
|
|
335
|
+
return s.tokens && s.tokens.length > 0 && s.tokens.forEach((n) => {
|
|
336
|
+
if (n.type === "paragraph" || n.type === "list" || n.type === "blockquote" || n.type === "code")
|
|
337
|
+
r.push(...e.parseChildren([n]));
|
|
338
|
+
else if (n.type === "text" && n.tokens) {
|
|
339
|
+
const i = e.parseChildren([n]);
|
|
340
|
+
r.push({
|
|
338
341
|
type: "paragraph",
|
|
339
342
|
content: i
|
|
340
343
|
});
|
|
341
344
|
} else {
|
|
342
|
-
const i = e.parseChildren([
|
|
343
|
-
i.length > 0 &&
|
|
345
|
+
const i = e.parseChildren([n]);
|
|
346
|
+
i.length > 0 && r.push(...i);
|
|
344
347
|
}
|
|
345
348
|
}), {
|
|
346
349
|
type: "listItem",
|
|
347
|
-
content:
|
|
350
|
+
content: r
|
|
348
351
|
};
|
|
349
352
|
});
|
|
350
353
|
}
|
|
@@ -389,14 +392,14 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
389
392
|
parseMarkdown: (t, e) => {
|
|
390
393
|
if (t.type !== "list" || !t.ordered)
|
|
391
394
|
return [];
|
|
392
|
-
const s = t.start || 1,
|
|
395
|
+
const s = t.start || 1, r = t.items ? et(t.items, e) : [];
|
|
393
396
|
return s !== 1 ? {
|
|
394
397
|
type: "orderedList",
|
|
395
398
|
attrs: { start: s },
|
|
396
|
-
content:
|
|
399
|
+
content: r
|
|
397
400
|
} : {
|
|
398
401
|
type: "orderedList",
|
|
399
|
-
content:
|
|
402
|
+
content: r
|
|
400
403
|
};
|
|
401
404
|
},
|
|
402
405
|
renderMarkdown: (t, e) => t.content ? e.renderChildren(t.content, `
|
|
@@ -409,18 +412,18 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
409
412
|
return s !== void 0 ? s : -1;
|
|
410
413
|
},
|
|
411
414
|
tokenize: (t, e, s) => {
|
|
412
|
-
var
|
|
413
|
-
const
|
|
414
|
-
`), [i,
|
|
415
|
+
var r;
|
|
416
|
+
const n = t.split(`
|
|
417
|
+
`), [i, c] = tt(n);
|
|
415
418
|
if (i.length === 0)
|
|
416
419
|
return;
|
|
417
420
|
const a = B(i, 0, s);
|
|
418
421
|
return a.length === 0 ? void 0 : {
|
|
419
422
|
type: "list",
|
|
420
423
|
ordered: !0,
|
|
421
|
-
start: ((
|
|
424
|
+
start: ((r = i[0]) == null ? void 0 : r.number) || 1,
|
|
422
425
|
items: a,
|
|
423
|
-
raw:
|
|
426
|
+
raw: n.slice(0, c).join(`
|
|
424
427
|
`)
|
|
425
428
|
};
|
|
426
429
|
}
|
|
@@ -515,15 +518,15 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
515
518
|
parseMarkdown: (t, e) => {
|
|
516
519
|
const s = [];
|
|
517
520
|
if (t.tokens && t.tokens.length > 0 ? s.push(e.createNode("paragraph", {}, e.parseInline(t.tokens))) : t.text ? s.push(e.createNode("paragraph", {}, [e.createNode("text", { text: t.text })])) : s.push(e.createNode("paragraph", {}, [])), t.nestedTokens && t.nestedTokens.length > 0) {
|
|
518
|
-
const
|
|
519
|
-
s.push(...
|
|
521
|
+
const r = e.parseChildren(t.nestedTokens);
|
|
522
|
+
s.push(...r);
|
|
520
523
|
}
|
|
521
524
|
return e.createNode("taskItem", { checked: t.checked || !1 }, s);
|
|
522
525
|
},
|
|
523
526
|
renderMarkdown: (t, e) => {
|
|
524
527
|
var s;
|
|
525
|
-
const
|
|
526
|
-
return
|
|
528
|
+
const n = `- [${(s = t.attrs) != null && s.checked ? "x" : " "}] `;
|
|
529
|
+
return $(t, e, n);
|
|
527
530
|
},
|
|
528
531
|
addKeyboardShortcuts() {
|
|
529
532
|
const t = {
|
|
@@ -536,45 +539,45 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
536
539
|
} : t;
|
|
537
540
|
},
|
|
538
541
|
addNodeView() {
|
|
539
|
-
return ({ node: t, HTMLAttributes: e, getPos: s, editor:
|
|
540
|
-
const
|
|
541
|
-
var
|
|
542
|
-
a.ariaLabel = ((
|
|
542
|
+
return ({ node: t, HTMLAttributes: e, getPos: s, editor: r }) => {
|
|
543
|
+
const n = document.createElement("li"), i = document.createElement("label"), c = document.createElement("span"), a = document.createElement("input"), u = document.createElement("div"), p = (o) => {
|
|
544
|
+
var l, d;
|
|
545
|
+
a.ariaLabel = ((d = (l = this.options.a11y) == null ? void 0 : l.checkboxLabel) == null ? void 0 : d.call(l, o, a.checked)) || `Task item checkbox for ${o.textContent || "empty task item"}`;
|
|
543
546
|
};
|
|
544
547
|
p(t), i.contentEditable = "false", a.type = "checkbox", a.addEventListener("mousedown", (o) => o.preventDefault()), a.addEventListener("change", (o) => {
|
|
545
|
-
if (!
|
|
548
|
+
if (!r.isEditable && !this.options.onReadOnlyChecked) {
|
|
546
549
|
a.checked = !a.checked;
|
|
547
550
|
return;
|
|
548
551
|
}
|
|
549
|
-
const { checked:
|
|
550
|
-
|
|
552
|
+
const { checked: l } = o.target;
|
|
553
|
+
r.isEditable && typeof s == "function" && r.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: d }) => {
|
|
551
554
|
const k = s();
|
|
552
555
|
if (typeof k != "number")
|
|
553
556
|
return !1;
|
|
554
|
-
const m =
|
|
555
|
-
return
|
|
557
|
+
const m = d.doc.nodeAt(k);
|
|
558
|
+
return d.setNodeMarkup(k, void 0, {
|
|
556
559
|
...m?.attrs,
|
|
557
|
-
checked:
|
|
560
|
+
checked: l
|
|
558
561
|
}), !0;
|
|
559
|
-
}).run(), !
|
|
560
|
-
}), Object.entries(this.options.HTMLAttributes).forEach(([o,
|
|
561
|
-
|
|
562
|
-
}),
|
|
563
|
-
|
|
562
|
+
}).run(), !r.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(t, l) || (a.checked = !a.checked));
|
|
563
|
+
}), Object.entries(this.options.HTMLAttributes).forEach(([o, l]) => {
|
|
564
|
+
n.setAttribute(o, l);
|
|
565
|
+
}), n.dataset.checked = t.attrs.checked, a.checked = t.attrs.checked, i.append(a, c), n.append(i, u), Object.entries(e).forEach(([o, l]) => {
|
|
566
|
+
n.setAttribute(o, l);
|
|
564
567
|
});
|
|
565
568
|
let h = new Set(Object.keys(e));
|
|
566
569
|
return {
|
|
567
|
-
dom:
|
|
570
|
+
dom: n,
|
|
568
571
|
contentDOM: u,
|
|
569
572
|
update: (o) => {
|
|
570
573
|
if (o.type !== this.type)
|
|
571
574
|
return !1;
|
|
572
|
-
|
|
573
|
-
const
|
|
575
|
+
n.dataset.checked = o.attrs.checked, a.checked = o.attrs.checked, p(o);
|
|
576
|
+
const l = r.extensionManager.attributes, d = z(o, l), k = new Set(Object.keys(d)), m = this.options.HTMLAttributes;
|
|
574
577
|
return h.forEach((f) => {
|
|
575
|
-
k.has(f) || (f in m ?
|
|
576
|
-
}), Object.entries(
|
|
577
|
-
v == null ? f in m ?
|
|
578
|
+
k.has(f) || (f in m ? n.setAttribute(f, m[f]) : n.removeAttribute(f));
|
|
579
|
+
}), Object.entries(d).forEach(([f, v]) => {
|
|
580
|
+
v == null ? f in m ? n.setAttribute(f, m[f]) : n.removeAttribute(f) : n.setAttribute(f, v);
|
|
578
581
|
}), h = k, !0;
|
|
579
582
|
}
|
|
580
583
|
};
|
|
@@ -626,8 +629,8 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
626
629
|
return s !== void 0 ? s : -1;
|
|
627
630
|
},
|
|
628
631
|
tokenize(t, e, s) {
|
|
629
|
-
const
|
|
630
|
-
const
|
|
632
|
+
const r = (i) => {
|
|
633
|
+
const c = x(
|
|
631
634
|
i,
|
|
632
635
|
{
|
|
633
636
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
@@ -647,18 +650,18 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
647
650
|
nestedTokens: u
|
|
648
651
|
}),
|
|
649
652
|
// Allow recursive nesting
|
|
650
|
-
customNestedParser:
|
|
653
|
+
customNestedParser: r
|
|
651
654
|
},
|
|
652
655
|
s
|
|
653
656
|
);
|
|
654
|
-
return
|
|
657
|
+
return c ? [
|
|
655
658
|
{
|
|
656
659
|
type: "taskList",
|
|
657
|
-
raw:
|
|
658
|
-
items:
|
|
660
|
+
raw: c.raw,
|
|
661
|
+
items: c.items
|
|
659
662
|
}
|
|
660
663
|
] : s.blockTokens(i);
|
|
661
|
-
},
|
|
664
|
+
}, n = x(
|
|
662
665
|
t,
|
|
663
666
|
{
|
|
664
667
|
itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
|
|
@@ -667,7 +670,7 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
667
670
|
mainContent: i[4],
|
|
668
671
|
checked: i[3].toLowerCase() === "x"
|
|
669
672
|
}),
|
|
670
|
-
createToken: (i,
|
|
673
|
+
createToken: (i, c) => ({
|
|
671
674
|
type: "taskItem",
|
|
672
675
|
raw: "",
|
|
673
676
|
mainContent: i.mainContent,
|
|
@@ -675,18 +678,18 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
675
678
|
checked: i.checked,
|
|
676
679
|
text: i.mainContent,
|
|
677
680
|
tokens: s.inlineTokens(i.mainContent),
|
|
678
|
-
nestedTokens:
|
|
681
|
+
nestedTokens: c
|
|
679
682
|
}),
|
|
680
683
|
// Use the recursive parser for nested content
|
|
681
|
-
customNestedParser:
|
|
684
|
+
customNestedParser: r
|
|
682
685
|
},
|
|
683
686
|
s
|
|
684
687
|
);
|
|
685
|
-
if (
|
|
688
|
+
if (n)
|
|
686
689
|
return {
|
|
687
690
|
type: "taskList",
|
|
688
|
-
raw:
|
|
689
|
-
items:
|
|
691
|
+
raw: n.raw,
|
|
692
|
+
items: n.items
|
|
690
693
|
};
|
|
691
694
|
}
|
|
692
695
|
},
|
|
@@ -704,7 +707,7 @@ var st = "listItem", E = "textStyle", H = /^(\d+)\.\s$/, nt = g.create({
|
|
|
704
707
|
};
|
|
705
708
|
}
|
|
706
709
|
});
|
|
707
|
-
|
|
710
|
+
S.create({
|
|
708
711
|
name: "listKit",
|
|
709
712
|
addExtensions() {
|
|
710
713
|
const t = [];
|
package/dist/index273.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node as
|
|
2
|
-
var
|
|
1
|
+
import { Node as o, mergeAttributes as i } from "./index262.js";
|
|
2
|
+
var a = " ", d = " ", p = o.create({
|
|
3
3
|
name: "paragraph",
|
|
4
4
|
priority: 1e3,
|
|
5
5
|
addOptions() {
|
|
@@ -13,18 +13,21 @@ var i = a.create({
|
|
|
13
13
|
return [{ tag: "p" }];
|
|
14
14
|
},
|
|
15
15
|
renderHTML({ HTMLAttributes: r }) {
|
|
16
|
-
return ["p",
|
|
16
|
+
return ["p", i(this.options.HTMLAttributes, r), 0];
|
|
17
17
|
},
|
|
18
18
|
parseMarkdown: (r, e) => {
|
|
19
19
|
const t = r.tokens || [];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (t.length === 1 && t[0].type === "image")
|
|
21
|
+
return e.parseChildren([t[0]]);
|
|
22
|
+
const n = e.parseInline(t);
|
|
23
|
+
return n.length === 1 && n[0].type === "text" && (n[0].text === a || n[0].text === d) ? e.createNode("paragraph", void 0, []) : e.createNode("paragraph", void 0, n);
|
|
24
|
+
},
|
|
25
|
+
renderMarkdown: (r, e) => {
|
|
26
|
+
if (!r)
|
|
27
|
+
return "";
|
|
28
|
+
const t = Array.isArray(r.content) ? r.content : [];
|
|
29
|
+
return t.length === 0 ? a : e.renderChildren(t);
|
|
26
30
|
},
|
|
27
|
-
renderMarkdown: (r, e) => !r || !Array.isArray(r.content) ? "" : e.renderChildren(r.content),
|
|
28
31
|
addCommands() {
|
|
29
32
|
return {
|
|
30
33
|
setParagraph: () => ({ commands: r }) => r.setNode(this.name)
|
|
@@ -37,5 +40,5 @@ var i = a.create({
|
|
|
37
40
|
}
|
|
38
41
|
});
|
|
39
42
|
export {
|
|
40
|
-
|
|
43
|
+
p as Paragraph
|
|
41
44
|
};
|
package/dist/index277.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Slice as m, Fragment as B, Node as x, Mark as R } from "./
|
|
2
|
-
import { ReplaceStep as P, ReplaceAroundStep as K, Transform as $ } from "./
|
|
1
|
+
import { Slice as m, Fragment as B, Node as x, Mark as R } from "./index310.js";
|
|
2
|
+
import { ReplaceStep as P, ReplaceAroundStep as K, Transform as $ } from "./index308.js";
|
|
3
3
|
const O = /* @__PURE__ */ Object.create(null);
|
|
4
4
|
class l {
|
|
5
5
|
/**
|