@burdenoff/microfe-support 2026.819.3 → 2026.819.5

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 (82) hide show
  1. package/dist/microfe-support.css +1 -1
  2. package/dist/node_modules/@tiptap/core/dist/index.js +3453 -0
  3. package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -0
  4. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +21 -0
  5. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
  6. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +76 -0
  7. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -0
  8. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +74 -0
  9. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -0
  10. package/dist/node_modules/@tiptap/extension-code/dist/index.js +68 -0
  11. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -0
  12. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +160 -0
  13. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -0
  14. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  15. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -0
  16. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +51 -0
  17. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -0
  18. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +68 -0
  19. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -0
  20. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +50 -0
  21. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -0
  22. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +71 -0
  23. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -0
  24. package/dist/node_modules/@tiptap/extension-link/dist/index.js +373 -0
  25. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -0
  26. package/dist/node_modules/@tiptap/extension-list/dist/index.js +964 -0
  27. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -0
  28. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +46 -0
  29. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -0
  30. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +7 -0
  31. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -0
  32. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +56 -0
  33. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -0
  34. package/dist/node_modules/@tiptap/extension-text/dist/index.js +15 -0
  35. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -0
  36. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +63 -0
  37. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -0
  38. package/dist/node_modules/@tiptap/extensions/dist/index.js +459 -0
  39. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -0
  40. package/dist/node_modules/@tiptap/react/dist/index.js +316 -0
  41. package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -0
  42. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +29 -0
  43. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -0
  44. package/dist/node_modules/fast-equals/dist/es/index.js +267 -0
  45. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -0
  46. package/dist/node_modules/linkifyjs/dist/linkify.js +514 -0
  47. package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -0
  48. package/dist/node_modules/orderedmap/dist/index.js +69 -0
  49. package/dist/node_modules/orderedmap/dist/index.js.map +1 -0
  50. package/dist/node_modules/prosemirror-commands/dist/index.js +335 -0
  51. package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -0
  52. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +113 -0
  53. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -0
  54. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +173 -0
  55. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -0
  56. package/dist/node_modules/prosemirror-history/dist/index.js +214 -0
  57. package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -0
  58. package/dist/node_modules/prosemirror-keymap/dist/index.js +52 -0
  59. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -0
  60. package/dist/node_modules/prosemirror-model/dist/index.js +1786 -0
  61. package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -0
  62. package/dist/node_modules/prosemirror-schema-list/dist/index.js +75 -0
  63. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -0
  64. package/dist/node_modules/prosemirror-state/dist/index.js +527 -0
  65. package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -0
  66. package/dist/node_modules/prosemirror-transform/dist/index.js +1153 -0
  67. package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -0
  68. package/dist/node_modules/prosemirror-view/dist/index.js +3296 -0
  69. package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -0
  70. package/dist/node_modules/rope-sequence/dist/index.js +85 -0
  71. package/dist/node_modules/rope-sequence/dist/index.js.map +1 -0
  72. package/dist/node_modules/w3c-keyname/index.js +90 -0
  73. package/dist/node_modules/w3c-keyname/index.js.map +1 -0
  74. package/dist/support/components/careers/RichTextEditor.d.ts +16 -0
  75. package/dist/support/components/careers/RichTextEditor.js +87 -0
  76. package/dist/support/components/careers/RichTextEditor.js.map +1 -0
  77. package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -0
  78. package/dist/support/pages/JobApplicationDetailPage.js +338 -336
  79. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  80. package/dist/support/pages/JobPostingDetailPage.js +310 -303
  81. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  82. package/package.json +4 -1
@@ -0,0 +1,964 @@
1
+ import { Fragment as e } from "../../../prosemirror-model/dist/index.js";
2
+ import { Plugin as t, TextSelection as n } from "../../../prosemirror-state/dist/index.js";
3
+ import { Extension as r, Node as i, getNodeAtPosition as a, getNodeType as o, getPreviousBlockSibling as s, getRenderedAttributes as c, isAtEndOfNode as l, isAtStartOfNode as u, isNodeActive as d, mergeAttributes as f, parseIndentedBlocks as p, renderNestedMarkdownContent as m, wrappingInputRule as h } from "../../core/dist/index.js";
4
+ //#region node_modules/@tiptap/extension-list/dist/index.js
5
+ var g = Object.defineProperty, _ = (e, t) => {
6
+ for (var n in t) g(e, n, {
7
+ get: t[n],
8
+ enumerable: !0
9
+ });
10
+ }, ee = "listItem", v = "textStyle", y = /^\s*([-+*])\s$/, b = i.create({
11
+ name: "bulletList",
12
+ addOptions() {
13
+ return {
14
+ itemTypeName: "listItem",
15
+ HTMLAttributes: {},
16
+ keepMarks: !1,
17
+ keepAttributes: !1
18
+ };
19
+ },
20
+ group: "block list",
21
+ content() {
22
+ return `${this.options.itemTypeName}+`;
23
+ },
24
+ parseHTML() {
25
+ return [{ tag: "ul" }];
26
+ },
27
+ renderHTML({ HTMLAttributes: e }) {
28
+ return [
29
+ "ul",
30
+ f(this.options.HTMLAttributes, e),
31
+ 0
32
+ ];
33
+ },
34
+ markdownTokenName: "list",
35
+ parseMarkdown: (e, t) => e.type !== "list" || e.ordered ? [] : {
36
+ type: "bulletList",
37
+ content: e.items ? t.parseChildren(e.items) : []
38
+ },
39
+ renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
40
+ markdownOptions: { indentsContent: !0 },
41
+ addCommands() {
42
+ return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ee, this.editor.getAttributes(v)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
43
+ },
44
+ addKeyboardShortcuts() {
45
+ return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
46
+ },
47
+ addInputRules() {
48
+ let e = h({
49
+ find: y,
50
+ type: this.type
51
+ });
52
+ return (this.options.keepMarks || this.options.keepAttributes) && (e = h({
53
+ find: y,
54
+ type: this.type,
55
+ keepMarks: this.options.keepMarks,
56
+ keepAttributes: this.options.keepAttributes,
57
+ getAttributes: () => this.editor.getAttributes(v),
58
+ editor: this.editor
59
+ })), [e];
60
+ }
61
+ }), te = (e, t, n) => {
62
+ let { selection: r } = e;
63
+ if (!r.empty) return null;
64
+ let { $from: i } = r;
65
+ if (!i.parent.isTextblock || i.parentOffset !== i.parent.content.size) return null;
66
+ let a = -1;
67
+ for (let e = i.depth; e > 0; --e) if (i.node(e).type.name === t) {
68
+ a = e;
69
+ break;
70
+ }
71
+ if (a < 0) return null;
72
+ let o = i.node(a), s = i.index(a);
73
+ if (s + 1 >= o.childCount) return null;
74
+ let c = o.child(s + 1);
75
+ if (!n.includes(c.type.name)) return null;
76
+ let l = e.schema.nodes[t], u = !1;
77
+ if (c.forEach((e) => {
78
+ e.type === l && e.childCount > 1 && (u = !0);
79
+ }), !u) return null;
80
+ let d = e.doc.resolve(i.after()).nodeAfter;
81
+ if (!d || !n.includes(d.type.name)) return null;
82
+ let f = [];
83
+ return d.forEach((e) => {
84
+ f.push(e);
85
+ }), f.length === 0 ? null : {
86
+ listItemDepth: a,
87
+ nestedList: d,
88
+ nestedListPos: i.after(),
89
+ insertPos: i.after(a),
90
+ items: f
91
+ };
92
+ }, ne = (t, n, r, i) => {
93
+ let a = te(t, r, i);
94
+ if (!a) return !1;
95
+ let { selection: o } = t, { nestedList: s, nestedListPos: c, insertPos: l, items: u } = a, d = t.tr;
96
+ d.delete(c, c + s.nodeSize);
97
+ let f = d.mapping.map(l);
98
+ return d.insert(f, e.from(u)), d.setSelection(o.map(d.doc, d.mapping)), n && n(d), !0;
99
+ }, re = (e, t, n) => ne(e.state, e.view.dispatch, t, n), x = (e, t) => r.create({
100
+ name: `${e}BranchingDeleteKeymap`,
101
+ priority: 101,
102
+ addKeyboardShortcuts() {
103
+ let n = () => re(this.editor, e, t);
104
+ return {
105
+ Delete: n,
106
+ "Mod-Delete": n
107
+ };
108
+ }
109
+ }), S = [
110
+ [1e3, "m"],
111
+ [900, "cm"],
112
+ [500, "d"],
113
+ [400, "cd"],
114
+ [100, "c"],
115
+ [90, "xc"],
116
+ [50, "l"],
117
+ [40, "xl"],
118
+ [10, "x"],
119
+ [9, "ix"],
120
+ [5, "v"],
121
+ [4, "iv"],
122
+ [1, "i"]
123
+ ], C = "abcdefghijklmnopqrstuvwxyz", w = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
124
+ function T(e) {
125
+ let t = e, n = "";
126
+ for (let [e, r] of S) for (; t >= e;) n += r, t -= e;
127
+ return n;
128
+ }
129
+ function E(e) {
130
+ return T(e).toUpperCase();
131
+ }
132
+ function D(e) {
133
+ let t = e.toLowerCase(), n = 0, r = 0;
134
+ for (; n < t.length;) {
135
+ let e = !1;
136
+ for (let [i, a] of S) if (t.startsWith(a, n)) {
137
+ r += i, n += a.length, e = !0;
138
+ break;
139
+ }
140
+ if (!e) return 0;
141
+ }
142
+ return r;
143
+ }
144
+ function ie(e) {
145
+ if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
146
+ let t = D(e);
147
+ return t <= 0 ? !1 : (e === e.toLowerCase() ? T(t) : E(t)) === e;
148
+ }
149
+ function ae(e) {
150
+ let t = e.toLowerCase();
151
+ if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
152
+ if (t.length === 2) {
153
+ let e = t.charCodeAt(0) - 97, n = t.charCodeAt(1) - 97;
154
+ return (e + 1) * 26 + n + 1;
155
+ }
156
+ return 0;
157
+ }
158
+ function O(e) {
159
+ if (e <= 26) return C[e - 1];
160
+ let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
161
+ return t < 0 ? C[n] : C[t] + C[n];
162
+ }
163
+ function k(e) {
164
+ if (!(!e || /^\d+$/.test(e))) {
165
+ if (ie(e)) return e === e.toLowerCase() ? "i" : "I";
166
+ if (/^[a-z]{1,2}$/.test(e)) return "a";
167
+ if (/^[A-Z]{1,2}$/.test(e)) return "A";
168
+ }
169
+ }
170
+ function A(e) {
171
+ if (/^\d+$/.test(e)) return parseInt(e, 10);
172
+ let t = k(e);
173
+ if (t === "i" || t === "I") return D(e);
174
+ if (t === "a" || t === "A") {
175
+ let t = ae(e);
176
+ return t > 0 ? t : 1;
177
+ }
178
+ let n = parseInt(e, 10);
179
+ return Number.isNaN(n) ? 1 : n;
180
+ }
181
+ function oe(e, t) {
182
+ if (e === "numeric") return String(t);
183
+ switch (e) {
184
+ case "a": return O(t);
185
+ case "A": return O(t).toUpperCase();
186
+ case "i": return T(t);
187
+ case "I": return E(t);
188
+ default: return String(t);
189
+ }
190
+ }
191
+ function j(e) {
192
+ if (e.length === 0) return !1;
193
+ let t = k(e[0]) ?? "numeric", n = A(e[0]);
194
+ if (n < 1) return !1;
195
+ for (let r = 0; r < e.length; r++) {
196
+ let i = oe(t, n + r);
197
+ if (e[r] !== i) return !1;
198
+ }
199
+ return !0;
200
+ }
201
+ function M(e) {
202
+ return {
203
+ type: k(e),
204
+ start: A(e)
205
+ };
206
+ }
207
+ function N(e) {
208
+ let { type: t, start: n } = M(e), r = {};
209
+ return t && (r.type = t), n !== 1 && (r.start = n), r;
210
+ }
211
+ function P(e, t, n = ". ") {
212
+ let r = t + 1;
213
+ if (!e || e === "1") return `${r}${n}`;
214
+ switch (e) {
215
+ case "a": return `${O(r)}${n}`;
216
+ case "A": return `${O(r).toUpperCase()}${n}`;
217
+ case "i": return `${T(r)}${n}`;
218
+ case "I": return `${E(r)}${n}`;
219
+ default: return `${r}${n}`;
220
+ }
221
+ }
222
+ function se(e) {
223
+ let t = e.tokens?.[0];
224
+ return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
225
+ }
226
+ function ce(e, t) {
227
+ return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
228
+ type: "text",
229
+ raw: e,
230
+ text: e
231
+ }]);
232
+ }
233
+ var F = i.create({
234
+ name: "listItem",
235
+ addOptions() {
236
+ return {
237
+ HTMLAttributes: {},
238
+ bulletListTypeName: "bulletList",
239
+ orderedListTypeName: "orderedList"
240
+ };
241
+ },
242
+ content: "paragraph block*",
243
+ defining: !0,
244
+ parseHTML() {
245
+ return [{ tag: "li" }];
246
+ },
247
+ renderHTML({ HTMLAttributes: e }) {
248
+ return [
249
+ "li",
250
+ f(this.options.HTMLAttributes, e),
251
+ 0
252
+ ];
253
+ },
254
+ markdownTokenName: "list_item",
255
+ parseMarkdown: (e, t) => {
256
+ if (e.type !== "list_item") return [];
257
+ let n = t.parseBlockChildren ?? t.parseChildren, r = [];
258
+ if (e.tokens && e.tokens.length > 0) {
259
+ if (se(e)) return {
260
+ type: "listItem",
261
+ content: [{
262
+ type: "paragraph",
263
+ content: ce(e.text || "", t)
264
+ }]
265
+ };
266
+ if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
267
+ else {
268
+ let i = e.tokens[0];
269
+ if (i && i.type === "text" && i.tokens && i.tokens.length > 0) {
270
+ if (r = [{
271
+ type: "paragraph",
272
+ content: t.parseInline(i.tokens)
273
+ }], e.tokens.length > 1) {
274
+ let t = n(e.tokens.slice(1));
275
+ r.push(...t);
276
+ }
277
+ } else r = n(e.tokens);
278
+ }
279
+ }
280
+ return r.length === 0 && (r = [{
281
+ type: "paragraph",
282
+ content: []
283
+ }]), {
284
+ type: "listItem",
285
+ content: r
286
+ };
287
+ },
288
+ renderMarkdown: (e, t, n) => m(e, t, (e) => {
289
+ if (e.parentType === "bulletList") return "- ";
290
+ if (e.parentType === "orderedList") {
291
+ let t = e.meta?.parentAttrs?.start || 1;
292
+ return P(e.meta?.parentAttrs?.type, t - 1 + (e.index || 0), ". ");
293
+ }
294
+ return "- ";
295
+ }, n),
296
+ addExtensions() {
297
+ return [x(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
298
+ },
299
+ addKeyboardShortcuts() {
300
+ return {
301
+ Enter: () => this.editor.commands.splitListItem(this.name),
302
+ Tab: () => this.editor.commands.sinkListItem(this.name),
303
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
304
+ };
305
+ }
306
+ }), I = {};
307
+ _(I, {
308
+ findListItemPos: () => L,
309
+ getNextListDepth: () => R,
310
+ handleBackspace: () => B,
311
+ handleDelete: () => U,
312
+ handleTab: () => W,
313
+ hasListBefore: () => z,
314
+ hasListItemAfter: () => le,
315
+ hasListItemBefore: () => ue,
316
+ listItemHasSubList: () => de,
317
+ nextListIsDeeper: () => V,
318
+ nextListIsHigher: () => H
319
+ });
320
+ var L = (e, t) => {
321
+ let { $from: n } = t.selection, r = o(e, t.schema), i = null, a = n.depth, s = n.pos, c = null;
322
+ for (; a > 0 && c === null;) i = n.node(a), i.type === r ? c = a : (--a, --s);
323
+ return c === null ? null : {
324
+ $pos: t.doc.resolve(s),
325
+ depth: c
326
+ };
327
+ }, R = (e, t) => {
328
+ let n = L(e, t);
329
+ if (!n) return !1;
330
+ let [, r] = a(t, e, n.$pos.pos + 4);
331
+ return r;
332
+ }, z = (e, t, n) => {
333
+ let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
334
+ return !(!a || !n.includes(a.type.name));
335
+ }, B = (e, t, n) => {
336
+ if (e.commands.undoInputRule()) return !0;
337
+ if (e.state.selection.from !== e.state.selection.to) return !1;
338
+ if (!d(e.state, t) && z(e.state, t, n)) {
339
+ let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
340
+ r.node().descendants((e, n) => {
341
+ e.type.name === t && i.push({
342
+ node: e,
343
+ pos: n
344
+ });
345
+ });
346
+ let a = i.at(-1);
347
+ if (!a) return !1;
348
+ let o = e.state.doc.resolve(r.start() + a.pos + 1);
349
+ return e.chain().cut({
350
+ from: n.start() - 1,
351
+ to: n.end() + 1
352
+ }, o.end()).joinForward().run();
353
+ }
354
+ if (!d(e.state, t) || !u(e.state)) return !1;
355
+ let { $from: r } = e.state.selection, i = r.depth - 1;
356
+ return r.node(i).type !== e.schema.nodes[t] || r.index(i) !== 0 ? !1 : e.chain().liftListItem(t).run();
357
+ }, V = (e, t) => {
358
+ let n = R(e, t), r = L(e, t);
359
+ return !r || !n ? !1 : n > r.depth;
360
+ }, H = (e, t) => {
361
+ let n = R(e, t), r = L(e, t);
362
+ return !r || !n ? !1 : n < r.depth;
363
+ }, U = (e, t) => {
364
+ if (!d(e.state, t) || !l(e.state, t)) return !1;
365
+ let { selection: n } = e.state, { $from: r, $to: i } = n;
366
+ return !n.empty && r.sameParent(i) ? !1 : V(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : H(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
367
+ }, W = (t, r, i) => {
368
+ let { state: a } = t, { selection: o } = a;
369
+ if (!o.empty) return !1;
370
+ let { $from: c } = o;
371
+ if (c.parentOffset !== 0 || !c.parent.isTextblock || d(a, r)) return !1;
372
+ let l = s(c);
373
+ if (!l || !i.includes(l.type.name)) return !1;
374
+ let u = l.lastChild;
375
+ if (!u || u.type.name !== r) return !1;
376
+ let f = c.parent;
377
+ if (!u.canReplace(u.childCount, u.childCount, e.from(f))) return !1;
378
+ let p = c.before(), m = c.after(), h = p - 2;
379
+ return t.commands.command(({ tr: t, dispatch: r }) => (r && (t.delete(p, m).insert(h, e.from(f)), t.setSelection(n.create(t.doc, h + 1)), t.scrollIntoView()), !0));
380
+ }, le = (e, t) => {
381
+ let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
382
+ return r.index() !== r.parent.childCount - 1 && r.nodeAfter?.type.name === e;
383
+ }, ue = (e, t) => {
384
+ let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
385
+ return r.index() !== 0 && r.nodeBefore?.type.name === e;
386
+ }, de = (e, t, n) => {
387
+ if (!n) return !1;
388
+ let r = o(e, t.schema), i = !1;
389
+ return n.descendants((e) => {
390
+ e.type === r && (i = !0);
391
+ }), i;
392
+ }, G = r.create({
393
+ name: "listKeymap",
394
+ addOptions() {
395
+ return { listTypes: [{
396
+ itemName: "listItem",
397
+ wrapperNames: ["bulletList", "orderedList"]
398
+ }, {
399
+ itemName: "taskItem",
400
+ wrapperNames: ["taskList"]
401
+ }] };
402
+ },
403
+ addKeyboardShortcuts() {
404
+ return {
405
+ Delete: ({ editor: e }) => {
406
+ let t = !1;
407
+ return this.options.listTypes.forEach(({ itemName: n }) => {
408
+ e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
409
+ }), t;
410
+ },
411
+ "Mod-Delete": ({ editor: e }) => {
412
+ let t = !1;
413
+ return this.options.listTypes.forEach(({ itemName: n }) => {
414
+ e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
415
+ }), t;
416
+ },
417
+ Backspace: ({ editor: e }) => {
418
+ let t = !1;
419
+ return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
420
+ e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
421
+ }), t;
422
+ },
423
+ "Mod-Backspace": ({ editor: e }) => {
424
+ let t = !1;
425
+ return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
426
+ e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
427
+ }), t;
428
+ },
429
+ Tab: ({ editor: e }) => {
430
+ for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && W(e, t, n)) return !0;
431
+ return !1;
432
+ }
433
+ };
434
+ }
435
+ }), K = RegExp(`^(\\s*)(${w})([.)])\\s+(.*)$`), fe = /^\s/, q = {
436
+ heading: /^#{1,6}(?:\s|$)/,
437
+ bulletItem: /^[-+*]\s+/,
438
+ codeFence: /^(?:```|~~~)/,
439
+ blockMath: /^\$\$/,
440
+ thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
441
+ };
442
+ function pe(e) {
443
+ return K.test(e.trimStart());
444
+ }
445
+ function me(e) {
446
+ let t = e.trimStart();
447
+ return q.bulletItem.test(t) || pe(t) || q.heading.test(t) || q.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || q.codeFence.test(t) || q.blockMath.test(t);
448
+ }
449
+ function he(e) {
450
+ return Object.values(q).some((t) => t.test(e));
451
+ }
452
+ function ge(e) {
453
+ let t = [], n = [], r = !1;
454
+ return e.forEach((e) => {
455
+ if (r) {
456
+ n.push(e);
457
+ return;
458
+ }
459
+ if (e.trim() === "") {
460
+ r = !0, n.push(e);
461
+ return;
462
+ }
463
+ if (t.length > 0 && me(e)) {
464
+ r = !0, n.push(e);
465
+ return;
466
+ }
467
+ t.push(e);
468
+ }), {
469
+ paragraphLines: t,
470
+ blockLines: n
471
+ };
472
+ }
473
+ function _e(e) {
474
+ let t = [], n = 0, r = 0;
475
+ for (; n < e.length;) {
476
+ let i = e[n], a = i.match(K);
477
+ if (!a) break;
478
+ let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? k(s) : void 0, p = isNaN(d) ? A(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
479
+ for (; h < e.length;) {
480
+ let t = e[h];
481
+ if (t.match(K)) break;
482
+ if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
483
+ else if (t.match(fe)) {
484
+ let e = t.length - t.trimStart().length, n = u + s.length + 1;
485
+ g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
486
+ } else {
487
+ if (_ || he(t)) break;
488
+ g.push(t), m.push(t), h += 1;
489
+ }
490
+ }
491
+ t.push({
492
+ indent: u,
493
+ number: p,
494
+ type: f,
495
+ content: m.join("\n").trim(),
496
+ contentLines: m,
497
+ raw: g.join("\n")
498
+ }), r = h, n = h;
499
+ }
500
+ return [t, r];
501
+ }
502
+ var ve = RegExp(`^(${w})([.)])\\s+(.+)$`);
503
+ function J(e) {
504
+ let t = e.split("\n").filter((e) => e.trim().length > 0);
505
+ if (t.length === 0) return null;
506
+ let n = [];
507
+ for (let e of t) {
508
+ let t = e.trim().match(ve);
509
+ if (!t) return null;
510
+ n.push({
511
+ marker: t[1],
512
+ content: t[3]
513
+ });
514
+ }
515
+ return j(n.map((e) => e.marker)) ? {
516
+ type: "orderedList",
517
+ attrs: N(n[0].marker),
518
+ content: n.map((e) => ({
519
+ type: "listItem",
520
+ content: [{
521
+ type: "paragraph",
522
+ content: [{
523
+ type: "text",
524
+ text: e.content
525
+ }]
526
+ }]
527
+ }))
528
+ } : null;
529
+ }
530
+ function Y(e, t, n) {
531
+ let r = [], i = 0;
532
+ for (; i < e.length;) {
533
+ let a = e[i];
534
+ if (a.indent === t) {
535
+ let { paragraphLines: o, blockLines: s } = ge(a.contentLines), c = o.join("\n").trim(), l = [];
536
+ c && l.push({
537
+ type: "paragraph",
538
+ raw: c,
539
+ tokens: n.inlineTokens(c)
540
+ });
541
+ let u = s.join("\n").trim();
542
+ if (u) {
543
+ let e = n.blockTokens(u);
544
+ l.push(...e);
545
+ }
546
+ let d = i + 1, f = [];
547
+ for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
548
+ if (f.length > 0) {
549
+ let e = Y(f, Math.min(...f.map((e) => e.indent)), n);
550
+ l.push({
551
+ type: "list",
552
+ ordered: !0,
553
+ start: f[0].number,
554
+ typeMarker: f[0].type,
555
+ items: e,
556
+ raw: f.map((e) => e.raw).join("\n")
557
+ });
558
+ }
559
+ r.push({
560
+ type: "list_item",
561
+ raw: a.raw,
562
+ tokens: l
563
+ }), i = d;
564
+ } else i += 1;
565
+ }
566
+ return r;
567
+ }
568
+ function ye(e, t) {
569
+ return e.map((e) => {
570
+ if (e.type !== "list_item") return t.parseChildren([e])[0];
571
+ let n = [];
572
+ return e.tokens && e.tokens.length > 0 && e.tokens.forEach((e) => {
573
+ if (e.type === "paragraph" || e.type === "list" || e.type === "blockquote" || e.type === "code") n.push(...t.parseChildren([e]));
574
+ else if (e.type === "text" && e.tokens) {
575
+ let r = t.parseChildren([e]);
576
+ n.push({
577
+ type: "paragraph",
578
+ content: r
579
+ });
580
+ } else {
581
+ let r = t.parseChildren([e]);
582
+ r.length > 0 && n.push(...r);
583
+ }
584
+ }), {
585
+ type: "listItem",
586
+ content: n
587
+ };
588
+ });
589
+ }
590
+ var be = "listItem", X = "textStyle", Z = /^(\d+)\.\s$/;
591
+ function Q(e) {
592
+ let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
593
+ if (!t) return null;
594
+ switch (t[1].trim().toLowerCase()) {
595
+ case "upper-roman": return "I";
596
+ case "lower-roman": return "i";
597
+ case "upper-alpha":
598
+ case "upper-latin": return "A";
599
+ case "lower-alpha":
600
+ case "lower-latin": return "a";
601
+ default: return null;
602
+ }
603
+ }
604
+ var xe = i.create({
605
+ name: "orderedList",
606
+ addOptions() {
607
+ return {
608
+ itemTypeName: "listItem",
609
+ HTMLAttributes: {},
610
+ keepMarks: !1,
611
+ keepAttributes: !1
612
+ };
613
+ },
614
+ group: "block list",
615
+ content() {
616
+ return `${this.options.itemTypeName}+`;
617
+ },
618
+ addAttributes() {
619
+ return {
620
+ start: {
621
+ default: 1,
622
+ parseHTML: (e) => e.hasAttribute("start") ? parseInt(e.getAttribute("start") || "", 10) : 1
623
+ },
624
+ type: {
625
+ default: null,
626
+ parseHTML: (e) => {
627
+ let t = e.getAttribute("type");
628
+ if (t) return t;
629
+ let n = e.getAttribute("style");
630
+ if (n) {
631
+ let e = Q(n);
632
+ if (e) return e;
633
+ }
634
+ let r = e.querySelector("li");
635
+ if (r) {
636
+ let e = r.getAttribute("style");
637
+ if (e) {
638
+ let t = Q(e);
639
+ if (t) return t;
640
+ }
641
+ }
642
+ return null;
643
+ }
644
+ }
645
+ };
646
+ },
647
+ parseHTML() {
648
+ return [{ tag: "ol" }];
649
+ },
650
+ renderHTML({ HTMLAttributes: e }) {
651
+ let { start: t, type: n, ...r } = e, i = f(this.options.HTMLAttributes, r);
652
+ return t !== 1 && (i.start = t), n && n !== "1" && (i.type = n), [
653
+ "ol",
654
+ i,
655
+ 0
656
+ ];
657
+ },
658
+ markdownTokenName: "list",
659
+ parseMarkdown: (e, t) => {
660
+ if (e.type !== "list" || !e.ordered) return [];
661
+ let n = e.start || 1, r = e.typeMarker, i = e.items ? ye(e.items, t) : [], a = {};
662
+ return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
663
+ type: "orderedList",
664
+ attrs: a,
665
+ content: i
666
+ } : {
667
+ type: "orderedList",
668
+ content: i
669
+ };
670
+ },
671
+ renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
672
+ markdownTokenizer: {
673
+ name: "orderedList",
674
+ level: "block",
675
+ start: () => -1,
676
+ tokenize: (e, t, n) => {
677
+ let r = e.split("\n"), [i, a] = _e(r);
678
+ if (i.length === 0) return;
679
+ let o = Y(i, i[0].indent, n);
680
+ if (o.length !== 0) return {
681
+ type: "list",
682
+ ordered: !0,
683
+ start: i[0]?.number || 1,
684
+ typeMarker: i[0]?.type,
685
+ items: o,
686
+ raw: r.slice(0, a).join("\n")
687
+ };
688
+ }
689
+ },
690
+ markdownOptions: { indentsContent: !0 },
691
+ addCommands() {
692
+ return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(be, this.editor.getAttributes(X)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
693
+ },
694
+ addKeyboardShortcuts() {
695
+ return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
696
+ },
697
+ addProseMirrorPlugins() {
698
+ return [new t({ props: { handlePaste: (e, t) => {
699
+ if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
700
+ let n = t.clipboardData?.getData("text/plain");
701
+ if (!n) return !1;
702
+ let r = J(n);
703
+ if (!r) return !1;
704
+ try {
705
+ let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
706
+ return e.dispatch(n), !0;
707
+ } catch {
708
+ return !1;
709
+ }
710
+ } } })];
711
+ },
712
+ addInputRules() {
713
+ let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = h({
714
+ find: Z,
715
+ type: this.type,
716
+ getAttributes: (e) => ({ start: +e[1] }),
717
+ joinPredicate: e
718
+ });
719
+ return (this.options.keepMarks || this.options.keepAttributes) && (t = h({
720
+ find: Z,
721
+ type: this.type,
722
+ keepMarks: this.options.keepMarks,
723
+ keepAttributes: this.options.keepAttributes,
724
+ getAttributes: (e) => ({
725
+ start: +e[1],
726
+ ...this.editor.getAttributes(X)
727
+ }),
728
+ joinPredicate: e,
729
+ editor: this.editor
730
+ })), [t];
731
+ }
732
+ }), Se = /^\s*(\[([( |x])?\])\s$/, Ce = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", we = (e, t, n) => (n?.checkboxLabel)?.call(n, e, t) || `Task item checkbox for ${e.textContent || "empty task item"}`, Te = i.create({
733
+ name: "taskItem",
734
+ addOptions() {
735
+ return {
736
+ nested: !1,
737
+ HTMLAttributes: {},
738
+ taskListTypeName: "taskList",
739
+ a11y: void 0
740
+ };
741
+ },
742
+ content() {
743
+ return this.options.nested ? "paragraph block*" : "paragraph+";
744
+ },
745
+ defining: !0,
746
+ addAttributes() {
747
+ return { checked: {
748
+ default: !1,
749
+ keepOnSplit: !1,
750
+ parseHTML: (e) => {
751
+ let t = e.getAttribute("data-checked");
752
+ return t === "" || t === "true";
753
+ },
754
+ renderHTML: (e) => ({ "data-checked": e.checked })
755
+ } };
756
+ },
757
+ parseHTML() {
758
+ return [{
759
+ tag: `li[data-type="${this.name}"]`,
760
+ priority: 51,
761
+ contentElement: (e) => e.querySelector("div") ?? e
762
+ }];
763
+ },
764
+ renderHTML({ node: e, HTMLAttributes: t }) {
765
+ return [
766
+ "li",
767
+ f(this.options.HTMLAttributes, t, { "data-type": this.name }),
768
+ [
769
+ "label",
770
+ ["input", {
771
+ type: "checkbox",
772
+ checked: e.attrs.checked ? "checked" : null
773
+ }],
774
+ ["span"]
775
+ ],
776
+ ["div", 0]
777
+ ];
778
+ },
779
+ parseMarkdown: (e, t) => {
780
+ let n = [];
781
+ if (e.tokens && e.tokens.length > 0 ? n.push(t.createNode("paragraph", {}, t.parseInline(e.tokens))) : e.text ? n.push(t.createNode("paragraph", {}, [t.createNode("text", { text: e.text })])) : n.push(t.createNode("paragraph", {}, [])), e.nestedTokens && e.nestedTokens.length > 0) {
782
+ let r = t.parseChildren(e.nestedTokens);
783
+ n.push(...r);
784
+ }
785
+ return t.createNode("taskItem", { checked: e.checked || !1 }, n);
786
+ },
787
+ renderMarkdown: (e, t) => {
788
+ let n = `- [${e.attrs?.checked ? "x" : " "}] `;
789
+ return m(e, t, n);
790
+ },
791
+ addExtensions() {
792
+ return this.options.nested ? [x(this.name, [this.options.taskListTypeName])] : [];
793
+ },
794
+ addKeyboardShortcuts() {
795
+ let e = {
796
+ Enter: () => this.editor.commands.splitListItem(this.name),
797
+ "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
798
+ };
799
+ return this.options.nested ? {
800
+ ...e,
801
+ Tab: () => this.editor.commands.sinkListItem(this.name)
802
+ } : e;
803
+ },
804
+ addNodeView() {
805
+ return ({ node: e, HTMLAttributes: t, getPos: n, editor: r }) => {
806
+ let i = document.createElement("li"), a = document.createElement("label"), o = document.createElement("span"), s = document.createElement("input"), l = document.createElement("div");
807
+ o.style.cssText = Ce;
808
+ let u = (e) => {
809
+ let t = we(e, e.attrs.checked, this.options.a11y);
810
+ s.setAttribute("aria-label", t), o.textContent = t;
811
+ };
812
+ u(e), a.contentEditable = "false", s.type = "checkbox", s.addEventListener("mousedown", (e) => e.preventDefault()), s.addEventListener("change", (t) => {
813
+ if (!r.isEditable && !this.options.onReadOnlyChecked) {
814
+ s.checked = !s.checked;
815
+ return;
816
+ }
817
+ let { checked: i } = t.target;
818
+ r.isEditable && typeof n == "function" && r.chain().focus(void 0, { scrollIntoView: !1 }).command(({ tr: e }) => {
819
+ let t = n();
820
+ if (typeof t != "number") return !1;
821
+ let r = e.doc.nodeAt(t);
822
+ return e.setNodeMarkup(t, void 0, {
823
+ ...r?.attrs,
824
+ checked: i
825
+ }), !0;
826
+ }).run(), !r.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(e, i) || (s.checked = !s.checked));
827
+ }), Object.entries(this.options.HTMLAttributes).forEach(([e, t]) => {
828
+ i.setAttribute(e, t);
829
+ }), i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, a.append(s, o), i.append(a, l), Object.entries(t).forEach(([e, t]) => {
830
+ i.setAttribute(e, t);
831
+ });
832
+ let d = new Set(Object.keys(t));
833
+ return {
834
+ dom: i,
835
+ contentDOM: l,
836
+ update: (e) => {
837
+ if (e.type !== this.type) return !1;
838
+ i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, u(e);
839
+ let t = r.extensionManager.attributes, n = c(e, t), a = new Set(Object.keys(n)), o = this.options.HTMLAttributes;
840
+ return d.forEach((e) => {
841
+ a.has(e) || (e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e));
842
+ }), Object.entries(n).forEach(([e, t]) => {
843
+ t == null ? e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e) : i.setAttribute(e, t);
844
+ }), d = a, !0;
845
+ }
846
+ };
847
+ };
848
+ },
849
+ addInputRules() {
850
+ return [h({
851
+ find: Se,
852
+ type: this.type,
853
+ getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
854
+ })];
855
+ }
856
+ }), $ = i.create({
857
+ name: "taskList",
858
+ addOptions() {
859
+ return {
860
+ itemTypeName: "taskItem",
861
+ HTMLAttributes: {}
862
+ };
863
+ },
864
+ group: "block list",
865
+ content() {
866
+ return `${this.options.itemTypeName}+`;
867
+ },
868
+ parseHTML() {
869
+ return [{
870
+ tag: `ul[data-type="${this.name}"]`,
871
+ priority: 51
872
+ }];
873
+ },
874
+ renderHTML({ HTMLAttributes: e }) {
875
+ return [
876
+ "ul",
877
+ f(this.options.HTMLAttributes, e, { "data-type": this.name }),
878
+ 0
879
+ ];
880
+ },
881
+ parseMarkdown: (e, t) => t.createNode("taskList", {}, t.parseChildren(e.items || [])),
882
+ renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
883
+ markdownTokenizer: {
884
+ name: "taskList",
885
+ level: "block",
886
+ start(e) {
887
+ let t = e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;
888
+ return t === void 0 ? -1 : t;
889
+ },
890
+ tokenize(e, t, n) {
891
+ let r = (e) => {
892
+ let t = p(e, {
893
+ itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
894
+ extractItemData: (e) => ({
895
+ indentLevel: e[1].length,
896
+ mainContent: e[4],
897
+ checked: e[3].toLowerCase() === "x"
898
+ }),
899
+ createToken: (e, t) => ({
900
+ type: "taskItem",
901
+ raw: "",
902
+ mainContent: e.mainContent,
903
+ indentLevel: e.indentLevel,
904
+ checked: e.checked,
905
+ text: e.mainContent,
906
+ tokens: n.inlineTokens(e.mainContent),
907
+ nestedTokens: t
908
+ }),
909
+ customNestedParser: r
910
+ }, n);
911
+ if (t) {
912
+ let r = {
913
+ type: "taskList",
914
+ raw: t.raw,
915
+ items: t.items
916
+ }, i = e.slice(t.raw.length);
917
+ return i.trim() ? [r, ...n.blockTokens(i)] : [r];
918
+ }
919
+ return n.blockTokens(e);
920
+ }, i = p(e, {
921
+ itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
922
+ extractItemData: (e) => ({
923
+ indentLevel: e[1].length,
924
+ mainContent: e[4],
925
+ checked: e[3].toLowerCase() === "x"
926
+ }),
927
+ createToken: (e, t) => ({
928
+ type: "taskItem",
929
+ raw: "",
930
+ mainContent: e.mainContent,
931
+ indentLevel: e.indentLevel,
932
+ checked: e.checked,
933
+ text: e.mainContent,
934
+ tokens: n.inlineTokens(e.mainContent),
935
+ nestedTokens: t
936
+ }),
937
+ customNestedParser: r
938
+ }, n);
939
+ if (i) return {
940
+ type: "taskList",
941
+ raw: i.raw,
942
+ items: i.items
943
+ };
944
+ }
945
+ },
946
+ markdownOptions: { indentsContent: !0 },
947
+ addCommands() {
948
+ return { toggleTaskList: () => ({ commands: e }) => e.toggleList(this.name, this.options.itemTypeName) };
949
+ },
950
+ addKeyboardShortcuts() {
951
+ return { "Mod-Shift-9": () => this.editor.commands.toggleTaskList() };
952
+ }
953
+ });
954
+ r.create({
955
+ name: "listKit",
956
+ addExtensions() {
957
+ let e = [];
958
+ return this.options.bulletList !== !1 && e.push(b.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(F.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(G.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(xe.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Te.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push($.configure(this.options.taskList)), e;
959
+ }
960
+ });
961
+ //#endregion
962
+ export { b as BulletList, F as ListItem, G as ListKeymap, w as ORDERED_LIST_MARKER_PATTERN, xe as OrderedList, Te as TaskItem, $ as TaskList, j as areOrderedListMarkersSequential, N as buildOrderedListAttrsFromMarker, y as bulletListInputRegex, k as detectMarkerType, P as getListMarker, Se as inputRegex, I as listHelpers, A as markerToStart, Z as orderedListInputRegex, M as parseListMarker, J as parsePlainTextOrderedListPaste, T as toRoman, E as toRomanUpper };
963
+
964
+ //# sourceMappingURL=index.js.map