@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.
Files changed (239) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index10.js +1 -1
  3. package/dist/index11.js +1 -1
  4. package/dist/index12.js +17 -17
  5. package/dist/index127.js +2 -2
  6. package/dist/index13.js +3 -3
  7. package/dist/index14.js +2 -2
  8. package/dist/index15.js +1 -1
  9. package/dist/index16.js +15 -15
  10. package/dist/index161.js +1 -1
  11. package/dist/index17.js +1 -1
  12. package/dist/index174.js +17 -17
  13. package/dist/index175.js +7 -7
  14. package/dist/index176.js +4 -4
  15. package/dist/index178.js +19 -19
  16. package/dist/index18.js +3 -3
  17. package/dist/index185.js +11 -11
  18. package/dist/index187.js +4 -4
  19. package/dist/index189.js +17 -17
  20. package/dist/index19.js +1 -1
  21. package/dist/index192.js +17 -17
  22. package/dist/index193.js +7 -7
  23. package/dist/index194.js +1 -1
  24. package/dist/index195.js +1 -1
  25. package/dist/index196.js +1 -1
  26. package/dist/index199.js +1 -1
  27. package/dist/index2.js +11 -11
  28. package/dist/index20.js +5 -5
  29. package/dist/index202.js +1 -1
  30. package/dist/index203.js +81 -78
  31. package/dist/index204.js +88 -81
  32. package/dist/index205.js +84 -29
  33. package/dist/index206.js +400 -109
  34. package/dist/index207.js +22 -36
  35. package/dist/index208.js +161 -26
  36. package/dist/index209.js +19 -35
  37. package/dist/index21.js +5 -5
  38. package/dist/index210.js +20 -9
  39. package/dist/index211.js +21 -18
  40. package/dist/index212.js +199 -10
  41. package/dist/index213.js +70 -10
  42. package/dist/index214.js +34 -51
  43. package/dist/index215.js +37 -40
  44. package/dist/index216.js +160 -3
  45. package/dist/index217.js +223 -34
  46. package/dist/index218.js +37 -21
  47. package/dist/index219.js +10 -161
  48. package/dist/index22.js +5 -5
  49. package/dist/index220.js +32 -19
  50. package/dist/index221.js +115 -19
  51. package/dist/index222.js +35 -21
  52. package/dist/index223.js +26 -199
  53. package/dist/index224.js +35 -69
  54. package/dist/index225.js +49 -86
  55. package/dist/index226.js +39 -403
  56. package/dist/index227.js +4 -34
  57. package/dist/index228.js +9 -40
  58. package/dist/index229.js +18 -160
  59. package/dist/index23.js +3 -3
  60. package/dist/index230.js +10 -228
  61. package/dist/index231.js +10 -37
  62. package/dist/index232.js +39 -10
  63. package/dist/index233.js +21 -22
  64. package/dist/index234.js +2 -2
  65. package/dist/index235.js +3 -3
  66. package/dist/index236.js +1 -1
  67. package/dist/index237.js +3 -3
  68. package/dist/index238.js +3 -3
  69. package/dist/index239.js +3 -3
  70. package/dist/index24.js +3 -3
  71. package/dist/index240.js +3 -3
  72. package/dist/index241.js +3 -3
  73. package/dist/index242.js +3 -3
  74. package/dist/index243.js +3 -3
  75. package/dist/index244.js +9 -9
  76. package/dist/index245.js +11 -11
  77. package/dist/index246.js +1 -1
  78. package/dist/index247.js +3 -3
  79. package/dist/index248.js +3 -3
  80. package/dist/index249.js +3 -3
  81. package/dist/index25.js +3 -3
  82. package/dist/index251.js +3 -3
  83. package/dist/index252.js +4 -4
  84. package/dist/index253.js +25 -25
  85. package/dist/index254.js +3 -3
  86. package/dist/index255.js +3 -3
  87. package/dist/index256.js +3 -3
  88. package/dist/index257.js +3 -3
  89. package/dist/index258.js +3 -3
  90. package/dist/index259.js +3 -3
  91. package/dist/index26.js +1 -1
  92. package/dist/index262.js +35 -31
  93. package/dist/index263.js +1 -1
  94. package/dist/index264.js +1 -1
  95. package/dist/index27.js +11 -11
  96. package/dist/index272.js +136 -133
  97. package/dist/index273.js +14 -11
  98. package/dist/index277.js +2 -2
  99. package/dist/index278.js +249 -50
  100. package/dist/index279.js +8 -79
  101. package/dist/index28.js +5 -5
  102. package/dist/index280.js +138 -26
  103. package/dist/index281.js +83 -22
  104. package/dist/index282.js +53 -21
  105. package/dist/index283.js +78 -15
  106. package/dist/index284.js +26 -17
  107. package/dist/index285.js +22 -253
  108. package/dist/index286.js +22 -8
  109. package/dist/index287.js +15 -137
  110. package/dist/index288.js +17 -83
  111. package/dist/index289.js +1 -1
  112. package/dist/index29.js +1 -1
  113. package/dist/index290.js +2 -3
  114. package/dist/index291.js +257 -22
  115. package/dist/index292.js +6 -2
  116. package/dist/index293.js +133 -255
  117. package/dist/index294.js +71 -4
  118. package/dist/index295.js +77 -130
  119. package/dist/index296.js +26 -70
  120. package/dist/index297.js +13 -84
  121. package/dist/index298.js +72 -26
  122. package/dist/index299.js +3 -15
  123. package/dist/index3.js +7 -7
  124. package/dist/index30.js +1 -1
  125. package/dist/index300.js +2 -75
  126. package/dist/index301.js +82 -3
  127. package/dist/index302.js +53 -2
  128. package/dist/index303.js +5 -82
  129. package/dist/index304.js +4 -52
  130. package/dist/index305.js +178 -5
  131. package/dist/index306.js +62 -4
  132. package/dist/index307.js +74 -178
  133. package/dist/index308.js +1525 -54
  134. package/dist/index309.js +385 -74
  135. package/dist/index31.js +1 -1
  136. package/dist/index310.js +2731 -79
  137. package/dist/index311.js +85 -21
  138. package/dist/index312.js +3751 -894
  139. package/dist/index313.js +59 -21
  140. package/dist/index314.js +15 -20
  141. package/dist/index315.js +83 -19
  142. package/dist/index316.js +194 -61
  143. package/dist/index317.js +246 -19
  144. package/dist/index318.js +76 -16
  145. package/dist/index319.js +16 -16
  146. package/dist/index32.js +9 -9
  147. package/dist/index320.js +935 -22
  148. package/dist/index321.js +22 -63
  149. package/dist/index322.js +20 -1518
  150. package/dist/index323.js +20 -386
  151. package/dist/index324.js +69 -2731
  152. package/dist/index325.js +19 -86
  153. package/dist/index326.js +19 -3770
  154. package/dist/index327.js +21 -59
  155. package/dist/index328.js +22 -15
  156. package/dist/index329.js +63 -84
  157. package/dist/index33.js +4 -4
  158. package/dist/index330.js +3 -202
  159. package/dist/index331.js +21 -240
  160. package/dist/index332.js +1 -1
  161. package/dist/index333.js +18 -8
  162. package/dist/index334.js +56 -12
  163. package/dist/index335.js +27 -53
  164. package/dist/index336.js +6 -11
  165. package/dist/index337.js +50 -12
  166. package/dist/index338.js +7 -58
  167. package/dist/index339.js +10 -50
  168. package/dist/index34.js +5 -5
  169. package/dist/index340.js +7 -31
  170. package/dist/index341.js +28 -2
  171. package/dist/index342.js +2 -5
  172. package/dist/index343.js +70 -2
  173. package/dist/index344.js +165 -21
  174. package/dist/index345.js +19 -40
  175. package/dist/index346.js +20 -2
  176. package/dist/index347.js +64 -11
  177. package/dist/index348.js +36 -19
  178. package/dist/index349.js +8 -16
  179. package/dist/index35.js +8 -8
  180. package/dist/index350.js +13 -10
  181. package/dist/index351.js +55 -10
  182. package/dist/index352.js +12 -2
  183. package/dist/index353.js +14 -9
  184. package/dist/index354.js +57 -9
  185. package/dist/index355.js +52 -14
  186. package/dist/index356.js +28 -16
  187. package/dist/index357.js +2 -57
  188. package/dist/index358.js +5 -29
  189. package/dist/index359.js +2 -7
  190. package/dist/index36.js +2 -2
  191. package/dist/index360.js +21 -50
  192. package/dist/index361.js +40 -6
  193. package/dist/index362.js +2 -12
  194. package/dist/index363.js +10 -6
  195. package/dist/index364.js +20 -28
  196. package/dist/index365.js +10 -2
  197. package/dist/index366.js +9 -69
  198. package/dist/index367.js +15 -165
  199. package/dist/index368.js +2 -20
  200. package/dist/index369.js +9 -20
  201. package/dist/index37.js +2 -2
  202. package/dist/index370.js +9 -63
  203. package/dist/index371.js +14 -37
  204. package/dist/index372.js +1 -1
  205. package/dist/index373.js +3 -3
  206. package/dist/index378.js +1 -1
  207. package/dist/index38.js +2 -2
  208. package/dist/index380.js +1 -1
  209. package/dist/index381.js +6 -6
  210. package/dist/index382.js +3 -3
  211. package/dist/index384.js +97 -16
  212. package/dist/index386.js +17 -91
  213. package/dist/index387.js +91 -98
  214. package/dist/index39.js +4 -4
  215. package/dist/index393.js +1 -1
  216. package/dist/index394.js +2 -2
  217. package/dist/index4.js +5 -5
  218. package/dist/index40.js +7 -7
  219. package/dist/index41.js +7 -7
  220. package/dist/index42.js +5 -5
  221. package/dist/index43.js +5 -5
  222. package/dist/index44.js +1 -1
  223. package/dist/index45.js +1 -1
  224. package/dist/index46.js +1 -1
  225. package/dist/index47.js +2 -2
  226. package/dist/index48.js +5 -5
  227. package/dist/index49.js +1 -1
  228. package/dist/index5.js +2 -2
  229. package/dist/index50.js +3 -3
  230. package/dist/index51.js +1 -1
  231. package/dist/index52.js +3 -3
  232. package/dist/index53.js +1 -1
  233. package/dist/index6.js +3 -3
  234. package/dist/index7.js +4 -4
  235. package/dist/index8.js +4 -4
  236. package/dist/index9.js +1 -1
  237. package/dist/src/components/data-table/data-table.d.ts +4 -4
  238. package/dist/src/views/tables.vue.d.ts +4 -4
  239. package/package.json +1 -1
package/dist/index272.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Node as g, Extension as $, wrappingInputRule as b, mergeAttributes as L, renderNestedMarkdownContent 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";
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((r) => r.type === "paragraph"))
86
+ if (t.tokens.some((n) => n.type === "paragraph"))
87
87
  s = e.parseChildren(t.tokens);
88
88
  else {
89
- const r = t.tokens[0];
90
- if (r && r.type === "text" && r.tokens && r.tokens.length > 0) {
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(r.tokens)
94
+ content: e.parseInline(n.tokens)
95
95
  }
96
96
  ], t.tokens.length > 1) {
97
- const d = t.tokens.slice(1), a = e.parseChildren(d);
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) => S(
113
+ renderMarkdown: (t, e, s) => $(
114
114
  t,
115
115
  e,
116
- (n) => n.parentType === "bulletList" ? "- " : n.parentType === "orderedList" ? `${n.index + 1}. ` : "- ",
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: () => P,
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, n = O(t, e.schema);
141
- let r = null, i = s.depth, d = s.pos, a = null;
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
- r = s.node(i), r.type === n ? a = i : (i -= 1, d -= 1);
144
- return a === null ? null : { $pos: e.doc.resolve(d), depth: a };
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 [, n] = X(e, t, s.$pos.pos + 4);
150
- return n;
151
- }, P = (t, e, s) => {
152
- const { $anchor: n } = t.selection, r = Math.max(0, n.pos - 2), i = t.doc.resolve(r).node();
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
- }, _ = (t, e) => {
157
+ }, P = (t, e) => {
155
158
  var s;
156
- const { $anchor: n } = e.selection, r = e.doc.resolve(n.pos - 2);
157
- return !(r.index() === 0 || ((s = r.nodeBefore) == null ? void 0 : s.type.name) !== t);
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 n = O(t, e.schema);
162
- let r = !1;
164
+ const r = O(t, e.schema);
165
+ let n = !1;
163
166
  return s.descendants((i) => {
164
- i.type === n && (r = !0);
165
- }), r;
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) && P(t.state, e, s)) {
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((c, l) => {
174
- c.type.name === e && p.push({ node: c, pos: l });
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 n = y(e, t.state);
185
- if (!n)
187
+ const r = y(e, t.state);
188
+ if (!r)
186
189
  return !1;
187
- const i = t.state.doc.resolve(n.$pos.pos - 2).node(n.depth), d = D(e, t.state, i);
188
- return _(e, t.state) && !d ? t.commands.joinItemBackward() : t.chain().liftListItem(e).run();
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), n = y(t, e);
191
- return !n || !s ? !1 : s > n.depth;
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), n = y(t, e);
194
- return !n || !s ? !1 : s < n.depth;
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: n, $to: r } = s;
199
- return !s.empty && n.sameParent(r) ? !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();
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: n } = e.selection, r = e.doc.resolve(n.pos - n.parentOffset - 2);
203
- return !(r.index() === r.parent.childCount - 1 || ((s = r.nodeAfter) == null ? void 0 : s.type.name) !== t);
204
- }, U = $.create({
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: n }) => {
237
- t.state.schema.nodes[s] !== void 0 && T(t, s, n) && (e = !0);
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: n }) => {
243
- t.state.schema.nodes[s] !== void 0 && T(t, s, n) && (e = !0);
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, n = 0;
254
+ let s = 0, r = 0;
252
255
  for (; s < t.length; ) {
253
- const r = t[s], i = r.match(N);
256
+ const n = t[s], i = n.match(N);
254
257
  if (!i)
255
258
  break;
256
- const [, d, a, u] = i, p = d.length;
259
+ const [, c, a, u] = i, p = c.length;
257
260
  let h = u, o = s + 1;
258
- const c = [r];
261
+ const l = [n];
259
262
  for (; o < t.length; ) {
260
- const l = t[o];
261
- if (l.match(N))
263
+ const d = t[o];
264
+ if (d.match(N))
262
265
  break;
263
- if (l.trim() === "")
264
- c.push(l), h += `
266
+ if (d.trim() === "")
267
+ l.push(d), h += `
265
268
  `, o += 1;
266
- else if (l.match(Z))
267
- c.push(l), h += `
268
- ${l.slice(p + 2)}`, o += 1;
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: c.join(`
279
+ raw: l.join(`
277
280
  `)
278
- }), n = o, s = o;
281
+ }), r = o, s = o;
279
282
  }
280
- return [e, n];
283
+ return [e, r];
281
284
  }
282
285
  function B(t, e, s) {
283
- var n;
284
- const r = [];
286
+ var r;
287
+ const n = [];
285
288
  let i = 0;
286
289
  for (; i < t.length; ) {
287
- const d = t[i];
288
- if (d.indent === e) {
289
- const a = d.content.split(`
290
- `), u = ((n = a[0]) == null ? void 0 : n.trim()) || "", p = [];
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 l = s.blockTokens(h);
300
- p.push(...l);
302
+ const d = s.blockTokens(h);
303
+ p.push(...d);
301
304
  }
302
305
  let o = i + 1;
303
- const c = [];
306
+ const l = [];
304
307
  for (; o < t.length && t[o].indent > e; )
305
- c.push(t[o]), o += 1;
306
- if (c.length > 0) {
307
- const l = Math.min(...c.map((m) => m.indent)), k = B(c, l, s);
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: c[0].number,
314
+ start: l[0].number,
312
315
  items: k,
313
- raw: c.map((m) => m.raw).join(`
316
+ raw: l.map((m) => m.raw).join(`
314
317
  `)
315
318
  });
316
319
  }
317
- r.push({
320
+ n.push({
318
321
  type: "list_item",
319
- raw: d.raw,
322
+ raw: c.raw,
320
323
  tokens: p
321
324
  }), i = o;
322
325
  } else
323
326
  i += 1;
324
327
  }
325
- return r;
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 n = [];
332
- return s.tokens && s.tokens.length > 0 && s.tokens.forEach((r) => {
333
- if (r.type === "paragraph" || r.type === "list" || r.type === "blockquote" || r.type === "code")
334
- n.push(...e.parseChildren([r]));
335
- else if (r.type === "text" && r.tokens) {
336
- const i = e.parseChildren([r]);
337
- n.push({
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([r]);
343
- i.length > 0 && n.push(...i);
345
+ const i = e.parseChildren([n]);
346
+ i.length > 0 && r.push(...i);
344
347
  }
345
348
  }), {
346
349
  type: "listItem",
347
- content: n
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, n = t.items ? et(t.items, e) : [];
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: n
399
+ content: r
397
400
  } : {
398
401
  type: "orderedList",
399
- content: n
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 n;
413
- const r = t.split(`
414
- `), [i, d] = tt(r);
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: ((n = i[0]) == null ? void 0 : n.number) || 1,
424
+ start: ((r = i[0]) == null ? void 0 : r.number) || 1,
422
425
  items: a,
423
- raw: r.slice(0, d).join(`
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 n = e.parseChildren(t.nestedTokens);
519
- s.push(...n);
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 r = `- [${(s = t.attrs) != null && s.checked ? "x" : " "}] `;
526
- return S(t, e, r);
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: n }) => {
540
- const r = document.createElement("li"), i = document.createElement("label"), d = document.createElement("span"), a = document.createElement("input"), u = document.createElement("div"), p = (o) => {
541
- var c, l;
542
- a.ariaLabel = ((l = (c = this.options.a11y) == null ? void 0 : c.checkboxLabel) == null ? void 0 : l.call(c, o, a.checked)) || `Task item checkbox for ${o.textContent || "empty task item"}`;
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 (!n.isEditable && !this.options.onReadOnlyChecked) {
548
+ if (!r.isEditable && !this.options.onReadOnlyChecked) {
546
549
  a.checked = !a.checked;
547
550
  return;
548
551
  }
549
- const { checked: c } = o.target;
550
- n.isEditable && typeof s == "function" && n.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: l }) => {
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 = l.doc.nodeAt(k);
555
- return l.setNodeMarkup(k, void 0, {
557
+ const m = d.doc.nodeAt(k);
558
+ return d.setNodeMarkup(k, void 0, {
556
559
  ...m?.attrs,
557
- checked: c
560
+ checked: l
558
561
  }), !0;
559
- }).run(), !n.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(t, c) || (a.checked = !a.checked));
560
- }), Object.entries(this.options.HTMLAttributes).forEach(([o, c]) => {
561
- r.setAttribute(o, c);
562
- }), r.dataset.checked = t.attrs.checked, a.checked = t.attrs.checked, i.append(a, d), r.append(i, u), Object.entries(e).forEach(([o, c]) => {
563
- r.setAttribute(o, c);
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: r,
570
+ dom: n,
568
571
  contentDOM: u,
569
572
  update: (o) => {
570
573
  if (o.type !== this.type)
571
574
  return !1;
572
- r.dataset.checked = o.attrs.checked, a.checked = o.attrs.checked, p(o);
573
- const c = n.extensionManager.attributes, l = z(o, c), k = new Set(Object.keys(l)), m = this.options.HTMLAttributes;
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 ? r.setAttribute(f, m[f]) : r.removeAttribute(f));
576
- }), Object.entries(l).forEach(([f, v]) => {
577
- v == null ? f in m ? r.setAttribute(f, m[f]) : r.removeAttribute(f) : r.setAttribute(f, v);
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 n = (i) => {
630
- const d = x(
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: n
653
+ customNestedParser: r
651
654
  },
652
655
  s
653
656
  );
654
- return d ? [
657
+ return c ? [
655
658
  {
656
659
  type: "taskList",
657
- raw: d.raw,
658
- items: d.items
660
+ raw: c.raw,
661
+ items: c.items
659
662
  }
660
663
  ] : s.blockTokens(i);
661
- }, r = x(
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, d) => ({
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: d
681
+ nestedTokens: c
679
682
  }),
680
683
  // Use the recursive parser for nested content
681
- customNestedParser: n
684
+ customNestedParser: r
682
685
  },
683
686
  s
684
687
  );
685
- if (r)
688
+ if (n)
686
689
  return {
687
690
  type: "taskList",
688
- raw: r.raw,
689
- items: r.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
- $.create({
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 a, mergeAttributes as n } from "./index262.js";
2
- var i = a.create({
1
+ import { Node as o, mergeAttributes as i } from "./index262.js";
2
+ var a = "&nbsp;", 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", n(this.options.HTMLAttributes, r), 0];
16
+ return ["p", i(this.options.HTMLAttributes, r), 0];
17
17
  },
18
18
  parseMarkdown: (r, e) => {
19
19
  const t = r.tokens || [];
20
- return t.length === 1 && t[0].type === "image" ? e.parseChildren([t[0]]) : e.createNode(
21
- "paragraph",
22
- void 0,
23
- // no attributes for paragraph
24
- e.parseInline(t)
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
- i as Paragraph
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 "./index324.js";
2
- import { ReplaceStep as P, ReplaceAroundStep as K, Transform as $ } from "./index322.js";
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
  /**