@burdenoff/microfe-support 2026.1031.1 → 2026.1109.1

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 (147) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +6 -0
  2. package/dist/dev/main.d.ts +0 -0
  3. package/dist/generated/global-operations.d.ts +60 -60
  4. package/dist/node_modules/@tiptap/core/dist/index.js +949 -674
  5. package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
  6. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
  7. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
  8. package/dist/node_modules/@tiptap/extension-code/dist/index.js +14 -3
  9. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
  10. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +1 -3
  11. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
  12. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
  13. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
  14. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +4 -1
  15. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
  16. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
  17. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
  18. package/dist/node_modules/@tiptap/extension-link/dist/index.js +76 -51
  19. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
  20. package/dist/node_modules/@tiptap/extension-list/dist/index.js +143 -127
  21. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -1
  22. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +3 -2
  23. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
  24. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
  25. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
  26. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
  27. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +21 -11
  28. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
  29. package/dist/node_modules/@tiptap/extensions/dist/index.js +8 -9
  30. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -1
  31. package/dist/node_modules/@tiptap/react/dist/index.js +70 -49
  32. package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
  33. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
  34. package/dist/node_modules/fast-equals/dist/es/index.js +108 -76
  35. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  36. package/dist/node_modules/linkifyjs/dist/linkify.js +127 -113
  37. package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -1
  38. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +1 -1
  39. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
  40. package/dist/node_modules/prosemirror-history/dist/index.js +21 -14
  41. package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
  42. package/dist/node_modules/prosemirror-model/dist/index.js +98 -105
  43. package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
  44. package/dist/node_modules/prosemirror-schema-list/dist/index.js +37 -34
  45. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
  46. package/dist/node_modules/prosemirror-transform/dist/index.js +153 -101
  47. package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
  48. package/dist/node_modules/prosemirror-view/dist/index.js +742 -693
  49. package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
  50. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +96 -17
  51. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  52. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +55 -0
  53. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
  54. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +53 -0
  55. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
  56. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +53 -0
  57. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  58. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +45 -0
  59. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
  60. package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
  61. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  62. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +11 -0
  63. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
  64. package/dist/support/SupportAdminRoot.d.ts +2 -2
  65. package/dist/support/SupportAdminRoutes.d.ts +1 -1
  66. package/dist/support/SupportUserRoot.d.ts +2 -2
  67. package/dist/support/SupportUserRoutes.d.ts +1 -1
  68. package/dist/support/components/NotificationToast.d.ts +2 -2
  69. package/dist/support/components/PageLayout.d.ts +4 -4
  70. package/dist/support/components/RouteHelpers.d.ts +1 -1
  71. package/dist/support/components/analytics/CategoryBreakdown.d.ts +1 -1
  72. package/dist/support/components/analytics/MetricCard.d.ts +1 -1
  73. package/dist/support/components/analytics/PriorityBreakdown.d.ts +1 -1
  74. package/dist/support/components/analytics/SLAReport.d.ts +1 -1
  75. package/dist/support/components/analytics/SatisfactionDistribution.d.ts +1 -1
  76. package/dist/support/components/analytics/TopAgents.d.ts +1 -1
  77. package/dist/support/components/analytics/TrendChart.d.ts +1 -1
  78. package/dist/support/components/careers/BulkCandidateActionGuidance.d.ts +1 -1
  79. package/dist/support/components/careers/BulkCandidateDialogs.d.ts +7 -7
  80. package/dist/support/components/careers/BulkOperationFeedback.d.ts +8 -8
  81. package/dist/support/components/careers/BulkSelectionSummary.d.ts +2 -2
  82. package/dist/support/components/careers/RichTextEditor.d.ts +1 -2
  83. package/dist/support/components/careers/RichTextEditor.js.map +1 -1
  84. package/dist/support/components/kb/ArticleForm.d.ts +1 -1
  85. package/dist/support/components/settings/CannedResponsesSettings.d.ts +1 -1
  86. package/dist/support/components/settings/SLAPoliciesSettings.d.ts +1 -1
  87. package/dist/support/components/settings/TicketCategoriesSettings.d.ts +1 -1
  88. package/dist/support/components/tickets/AttachmentList.d.ts +1 -1
  89. package/dist/support/components/tickets/MarkdownContent.d.ts +1 -1
  90. package/dist/support/components/tickets/MessageComposer.d.ts +1 -1
  91. package/dist/support/components/tickets/MessageThread.d.ts +2 -2
  92. package/dist/support/components/tickets/TicketDetailHeader.d.ts +2 -2
  93. package/dist/support/components/tickets/TicketHeader.d.ts +2 -2
  94. package/dist/support/components/tickets/TicketSidebar.d.ts +2 -2
  95. package/dist/support/components/tickets/TriagePanel.d.ts +2 -2
  96. package/dist/support/constants/pipeline.d.ts +0 -6
  97. package/dist/support/events/rybbit.d.ts +1 -1
  98. package/dist/support/hooks/useAnalyticsOperations.d.ts +10 -25
  99. package/dist/support/hooks/useAnalyticsOperations.js +40 -39
  100. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  101. package/dist/support/hooks/useAttachmentsFailedToast.d.ts +1 -1
  102. package/dist/support/hooks/useChatOperations.d.ts +2 -2
  103. package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +7 -13
  104. package/dist/support/hooks/useKnowledgeBaseOperations.js +84 -83
  105. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  106. package/dist/support/hooks/useRegisterFooter.d.ts +1 -1
  107. package/dist/support/hooks/useSettingsOperations.d.ts +7 -16
  108. package/dist/support/hooks/useSupportAttachments.d.ts +1 -1
  109. package/dist/support/hooks/useTicketListOperations.d.ts +3 -6
  110. package/dist/support/hooks/useTicketOperations.d.ts +5 -11
  111. package/dist/support/hooks/useTicketOperations.js +80 -79
  112. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  113. package/dist/support/pages/AnalyticsPage.d.ts +1 -1
  114. package/dist/support/pages/ArticleDetailAdminPage.d.ts +1 -1
  115. package/dist/support/pages/ArticleDetailUserPage.d.ts +1 -1
  116. package/dist/support/pages/ContactInquiriesPage.d.ts +1 -1
  117. package/dist/support/pages/ContactInquiryDetailPage.d.ts +1 -1
  118. package/dist/support/pages/CreateArticlePage.d.ts +1 -1
  119. package/dist/support/pages/CreateTicketPage.d.ts +1 -1
  120. package/dist/support/pages/EditArticlePage.d.ts +1 -1
  121. package/dist/support/pages/InterviewersPage.d.ts +1 -1
  122. package/dist/support/pages/JobApplicationDetailPage.d.ts +1 -2
  123. package/dist/support/pages/JobApplicationsPage.d.ts +1 -1
  124. package/dist/support/pages/JobPostingDetailPage.d.ts +1 -1
  125. package/dist/support/pages/JobPostingsPage.d.ts +1 -1
  126. package/dist/support/pages/KnowledgeBaseAdminPage.d.ts +1 -1
  127. package/dist/support/pages/KnowledgeBaseUserPage.d.ts +1 -1
  128. package/dist/support/pages/SettingsPage.d.ts +1 -1
  129. package/dist/support/pages/SettingsPage.js.map +1 -1
  130. package/dist/support/pages/TicketDetailAdminPage.d.ts +1 -1
  131. package/dist/support/pages/TicketDetailUserPage.d.ts +1 -1
  132. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  133. package/dist/support/pages/TicketListPage.d.ts +1 -1
  134. package/dist/support/providers/SupportProvider.d.ts +2 -2
  135. package/dist/support/store/supportStore.d.ts +2 -2
  136. package/dist/support/utils/bulkCandidateTargetQuery.d.ts +1 -1
  137. package/dist/support/utils/cn.d.ts +1 -1
  138. package/dist/support/utils/index.d.ts +1 -1
  139. package/dist/support/utils/markdown.d.ts +0 -1
  140. package/dist/support/utils/refetch.d.ts +12 -0
  141. package/dist/support/utils/refetch.js +7 -0
  142. package/dist/support/utils/refetch.js.map +1 -0
  143. package/dist/support/utils/ticketFilters.d.ts +2 -2
  144. package/dist/support/utils/uiTokens.d.ts +1 -1
  145. package/dist/test/dom.d.ts +1 -0
  146. package/dist/test/setup.d.ts +1 -0
  147. package/package.json +65 -54
@@ -1,13 +1,9 @@
1
1
  import { Extension as e, Node as t, getNodeAtPosition as n, getNodeType as r, getPreviousBlockSibling as i, getRenderedAttributes as a, isAtEndOfNode as o, isAtStartOfNode as s, isNodeActive as c, mergeAttributes as l, parseIndentedBlocks as u, renderNestedMarkdownContent as d, wrappingInputRule as f } from "../../core/dist/index.js";
2
2
  import { Fragment as p } from "../../../prosemirror-model/dist/index.js";
3
- import { Plugin as m, TextSelection as h } from "../../../prosemirror-state/dist/index.js";
3
+ import { joinTextblockBackward as m, joinTextblockForward as h } from "../../../prosemirror-commands/dist/index.js";
4
+ import { Plugin as g, TextSelection as _ } from "../../../prosemirror-state/dist/index.js";
4
5
  // 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 = t.create({
6
+ var ee = "listItem", v = "textStyle", y = /^\s*([-+*])\s$/, b = t.create({
11
7
  name: "bulletList",
12
8
  addOptions() {
13
9
  return {
@@ -220,17 +216,28 @@ function P(e, t, n = ". ") {
220
216
  }
221
217
  }
222
218
  function se(e) {
219
+ return !e[0] || e[0].type === "paragraph" ? e : [{
220
+ type: "paragraph",
221
+ content: []
222
+ }, ...e];
223
+ }
224
+ function ce(e) {
225
+ let t = e.content?.[0];
226
+ return t?.type === "paragraph" && !t.content?.length;
227
+ }
228
+ var le = " ", F = 1, ue = (e) => (e?.level ?? F) > F;
229
+ function de(e) {
223
230
  let t = e.tokens?.[0];
224
231
  return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
225
232
  }
226
- function ce(e, t) {
233
+ function fe(e, t) {
227
234
  return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
228
235
  type: "text",
229
236
  raw: e,
230
237
  text: e
231
238
  }]);
232
239
  }
233
- var F = t.create({
240
+ var I = t.create({
234
241
  name: "listItem",
235
242
  addOptions() {
236
243
  return {
@@ -256,43 +263,54 @@ var F = t.create({
256
263
  if (e.type !== "list_item") return [];
257
264
  let n = t.parseBlockChildren ?? t.parseChildren, r = [];
258
265
  if (e.tokens && e.tokens.length > 0) {
259
- if (se(e)) return {
266
+ if (de(e)) return {
260
267
  type: "listItem",
261
268
  content: [{
262
269
  type: "paragraph",
263
- content: ce(e.text || "", t)
270
+ content: fe(e.text || "", t)
264
271
  }]
265
272
  };
273
+ let [i, ...a] = e.tokens;
274
+ if (i.type === "heading") return {
275
+ type: "listItem",
276
+ content: [{
277
+ type: "paragraph",
278
+ content: t.parseInline(i.tokens ?? [])
279
+ }, ...a.length > 0 ? n(a) : []]
280
+ };
266
281
  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
- }
282
+ else if (i.type === "text" && i.tokens && i.tokens.length > 0) {
283
+ if (r = [{
284
+ type: "paragraph",
285
+ content: t.parseInline(i.tokens)
286
+ }], e.tokens.length > 1) {
287
+ let t = n(e.tokens.slice(1));
288
+ r.push(...t);
289
+ }
290
+ } else r = n(e.tokens);
279
291
  }
280
292
  return r.length === 0 && (r = [{
281
293
  type: "paragraph",
282
294
  content: []
283
295
  }]), {
284
296
  type: "listItem",
285
- content: r
297
+ content: se(r)
286
298
  };
287
299
  },
288
- renderMarkdown: (e, t, n) => d(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),
300
+ renderMarkdown: (e, t, n) => {
301
+ let r = (e) => {
302
+ if (e.parentType === "bulletList") return "- ";
303
+ if (e.parentType === "orderedList") {
304
+ var t, n;
305
+ let r = ((t = e.meta) == null || (t = t.parentAttrs) == null ? void 0 : t.start) || 1;
306
+ return P((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
307
+ }
308
+ return "- ";
309
+ }, i = d(e, t, r, n, { alignNestedToPrefix: n?.parentType === "orderedList" });
310
+ if (!ce(e) || !ue(n)) return i;
311
+ let a = r(n);
312
+ return `${a}${le}${i.slice(a.length)}`;
313
+ },
296
314
  addExtensions() {
297
315
  return [x(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
298
316
  },
@@ -303,21 +321,7 @@ var F = t.create({
303
321
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
304
322
  };
305
323
  }
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) => {
324
+ }), L = (e, t) => {
321
325
  let { $from: n } = t.selection, i = r(e, t.schema), a = null, o = n.depth, s = n.pos, c = null;
322
326
  for (; o > 0 && c === null;) a = n.node(o), a.type === i ? c = o : (--o, --s);
323
327
  return c === null ? null : {
@@ -329,13 +333,13 @@ var L = (e, t) => {
329
333
  if (!r) return !1;
330
334
  let [, i] = n(t, e, r.$pos.pos + 4);
331
335
  return i;
332
- }, z = (e, t, n) => {
336
+ }, pe = (e, t, n) => {
333
337
  let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
334
338
  return !(!a || !n.includes(a.type.name));
335
- }, B = (e, t, n) => {
339
+ }, z = (e, t, n) => {
336
340
  if (e.commands.undoInputRule()) return !0;
337
341
  if (e.state.selection.from !== e.state.selection.to) return !1;
338
- if (!c(e.state, t) && z(e.state, t, n)) {
342
+ if (!c(e.state, t) && pe(e.state, t, n)) {
339
343
  let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
340
344
  r.node().descendants((e, n) => {
341
345
  e.type.name === t && i.push({
@@ -346,25 +350,21 @@ var L = (e, t) => {
346
350
  let a = i.at(-1);
347
351
  if (!a) return !1;
348
352
  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
+ return e.chain().command(({ tr: e }) => {
354
+ let t = o.end();
355
+ return e.delete(n.before(), n.after()).insert(t, n.parent), e.setSelection(_.create(e.doc, t + 1)), !0;
356
+ }).command(({ state: e, dispatch: t }) => (m(e, t), !0)).run();
353
357
  }
354
358
  if (!c(e.state, t) || !s(e.state)) return !1;
355
359
  let { $from: r } = e.state.selection, i = r.depth - 1;
356
360
  return r.node(i).type !== e.schema.nodes[t] || r.index(i) !== 0 ? !1 : e.chain().liftListItem(t).run();
357
- }, V = (e, t) => {
361
+ }, me = (e, t) => {
358
362
  let n = R(e, t), r = L(e, t);
359
363
  return !r || !n ? !1 : n > r.depth;
360
- }, H = (e, t) => {
364
+ }, he = (e, t) => {
361
365
  let n = R(e, t), r = L(e, t);
362
366
  return !r || !n ? !1 : n < r.depth;
363
- }, U = (e, t) => {
364
- if (!c(e.state, t) || !o(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 = (e, t, n) => {
367
+ }, B = (e, t) => !c(e.state, t) || !o(e.state, t) || !e.state.selection.empty ? !1 : me(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : he(t, e.state) ? e.commands.command(({ state: e, dispatch: t }) => h(e, t)) : e.commands.joinItemForward(), ge = (e, t, n) => {
368
368
  let { state: r } = e, { selection: a } = r;
369
369
  if (!a.empty) return !1;
370
370
  let { $from: o } = a;
@@ -376,20 +376,8 @@ var L = (e, t) => {
376
376
  let u = o.parent;
377
377
  if (!l.canReplace(l.childCount, l.childCount, p.from(u))) return !1;
378
378
  let d = o.before(), f = o.after(), m = d - 2;
379
- return e.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(d, f).insert(m, p.from(u)), e.setSelection(h.create(e.doc, m + 1)), e.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 i = r(e, t.schema), a = !1;
389
- return n.descendants((e) => {
390
- e.type === i && (a = !0);
391
- }), a;
392
- }, G = e.create({
379
+ return e.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(d, f).insert(m, p.from(u)), e.setSelection(_.create(e.doc, m + 1)), e.scrollIntoView()), !0));
380
+ }, V = e.create({
393
381
  name: "listKeymap",
394
382
  addOptions() {
395
383
  return { listTypes: [{
@@ -405,74 +393,74 @@ var L = (e, t) => {
405
393
  Delete: ({ editor: e }) => {
406
394
  let t = !1;
407
395
  return this.options.listTypes.forEach(({ itemName: n }) => {
408
- e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
396
+ e.state.schema.nodes[n] !== void 0 && B(e, n) && (t = !0);
409
397
  }), t;
410
398
  },
411
399
  "Mod-Delete": ({ editor: e }) => {
412
400
  let t = !1;
413
401
  return this.options.listTypes.forEach(({ itemName: n }) => {
414
- e.state.schema.nodes[n] !== void 0 && U(e, n) && (t = !0);
402
+ e.state.schema.nodes[n] !== void 0 && B(e, n) && (t = !0);
415
403
  }), t;
416
404
  },
417
405
  Backspace: ({ editor: e }) => {
418
406
  let t = !1;
419
407
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
420
- e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
408
+ e.state.schema.nodes[n] !== void 0 && z(e, n, r) && (t = !0);
421
409
  }), t;
422
410
  },
423
411
  "Mod-Backspace": ({ editor: e }) => {
424
412
  let t = !1;
425
413
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
426
- e.state.schema.nodes[n] !== void 0 && B(e, n, r) && (t = !0);
414
+ e.state.schema.nodes[n] !== void 0 && z(e, n, r) && (t = !0);
427
415
  }), t;
428
416
  },
429
417
  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;
418
+ for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && ge(e, t, n)) return !0;
431
419
  return !1;
432
420
  }
433
421
  };
434
422
  }
435
- }), K = RegExp(`^(\\s*)(${w})([.)])\\s+(.*)$`), fe = /^\s/, q = {
423
+ }), H = RegExp(`^(\\s*)(${w})([.)])\\s+(.*)$`), _e = /^\s/, U = {
436
424
  heading: /^#{1,6}(?:\s|$)/,
437
425
  bulletItem: /^[-+*]\s+/,
438
426
  codeFence: /^(?:```|~~~)/,
439
427
  blockMath: /^\$\$/,
440
428
  thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
441
429
  };
442
- function pe(e) {
443
- return K.test(e.trimStart());
430
+ function ve(e) {
431
+ return H.test(e.trimStart());
444
432
  }
445
- function me(e) {
433
+ function ye(e) {
446
434
  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);
435
+ return U.bulletItem.test(t) || ve(t) || U.heading.test(t) || U.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || U.codeFence.test(t) || U.blockMath.test(t);
448
436
  }
449
- function he(e) {
450
- return Object.values(q).some((t) => t.test(e));
437
+ function be(e) {
438
+ return Object.values(U).some((t) => t.test(e));
451
439
  }
452
- function ge(e) {
440
+ function xe(e) {
453
441
  let t = [], n = [], r = !1;
454
442
  return e.forEach((e) => {
455
- r ? n.push(e) : e.trim() === "" || t.length > 0 && me(e) ? (r = !0, n.push(e)) : t.push(e);
443
+ r ? n.push(e) : e.trim() === "" || t.length > 0 && ye(e) ? (r = !0, n.push(e)) : t.push(e);
456
444
  }), {
457
445
  paragraphLines: t,
458
446
  blockLines: n
459
447
  };
460
448
  }
461
- function _e(e) {
449
+ function W(e) {
462
450
  let t = [], n = 0, r = 0;
463
451
  for (; n < e.length;) {
464
- let i = e[n], a = i.match(K);
452
+ let i = e[n], a = i.match(H);
465
453
  if (!a) break;
466
454
  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;
467
455
  for (; h < e.length;) {
468
456
  let t = e[h];
469
- if (t.match(K)) break;
457
+ if (t.match(H)) break;
470
458
  if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
471
- else if (t.match(fe)) {
459
+ else if (t.match(_e)) {
472
460
  let e = t.length - t.trimStart().length, n = u + s.length + 1;
473
461
  g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
474
462
  } else {
475
- if (_ || he(t)) break;
463
+ if (_ || be(t)) break;
476
464
  g.push(t), m.push(t), h += 1;
477
465
  }
478
466
  }
@@ -487,13 +475,13 @@ function _e(e) {
487
475
  }
488
476
  return [t, r];
489
477
  }
490
- var ve = RegExp(`^(${w})([.)])\\s+(.+)$`);
491
- function J(e) {
478
+ var Se = RegExp(`^(${w})([.)])\\s+(.+)$`);
479
+ function G(e) {
492
480
  let t = e.split("\n").filter((e) => e.trim().length > 0);
493
481
  if (t.length === 0) return null;
494
482
  let n = [];
495
483
  for (let e of t) {
496
- let t = e.trim().match(ve);
484
+ let t = e.trim().match(Se);
497
485
  if (!t) return null;
498
486
  n.push({
499
487
  marker: t[1],
@@ -515,12 +503,12 @@ function J(e) {
515
503
  }))
516
504
  } : null;
517
505
  }
518
- function Y(e, t, n) {
506
+ function K(e, t, n) {
519
507
  let r = [], i = 0;
520
508
  for (; i < e.length;) {
521
509
  let a = e[i];
522
510
  if (a.indent === t) {
523
- let { paragraphLines: o, blockLines: s } = ge(a.contentLines), c = o.join("\n").trim(), l = [];
511
+ let { paragraphLines: o, blockLines: s } = xe(a.contentLines), c = o.join("\n").trim(), l = [];
524
512
  c && l.push({
525
513
  type: "paragraph",
526
514
  raw: c,
@@ -534,7 +522,7 @@ function Y(e, t, n) {
534
522
  let d = i + 1, f = [];
535
523
  for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
536
524
  if (f.length > 0) {
537
- let e = Y(f, Math.min(...f.map((e) => e.indent)), n);
525
+ let e = K(f, Math.min(...f.map((e) => e.indent)), n);
538
526
  l.push({
539
527
  type: "list",
540
528
  ordered: !0,
@@ -553,7 +541,7 @@ function Y(e, t, n) {
553
541
  }
554
542
  return r;
555
543
  }
556
- function ye(e, t) {
544
+ function Ce(e, t) {
557
545
  return e.map((e) => {
558
546
  if (e.type !== "list_item") return t.parseChildren([e])[0];
559
547
  let n = [];
@@ -575,8 +563,33 @@ function ye(e, t) {
575
563
  };
576
564
  });
577
565
  }
578
- var be = "listItem", X = "textStyle", Z = /^(\d+)\.\s$/;
579
- function Q(e) {
566
+ var we = 64;
567
+ function q(e, t) {
568
+ let n = [], r = 0;
569
+ for (; n.length < t;) {
570
+ let t = e.indexOf("\n", r);
571
+ if (t === -1) return n.push(e.slice(r)), n;
572
+ n.push(e.slice(r, t)), r = t + 1;
573
+ }
574
+ return n;
575
+ }
576
+ function Te(e) {
577
+ let t = e.indexOf("\n"), n = t === -1 ? e : e.slice(0, t);
578
+ if (!H.test(n)) return [
579
+ [],
580
+ 0,
581
+ []
582
+ ];
583
+ let r = we, i = q(e, r), a = W(i);
584
+ for (; a[1] === i.length && i.length === r;) r *= 2, i = q(e, r), a = W(i);
585
+ return [
586
+ a[0],
587
+ a[1],
588
+ i
589
+ ];
590
+ }
591
+ var Ee = "listItem", J = "textStyle", Y = /^(\d+)\.\s$/;
592
+ function X(e) {
580
593
  let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
581
594
  if (!t) return null;
582
595
  switch (t[1].trim().toLowerCase()) {
@@ -589,7 +602,7 @@ function Q(e) {
589
602
  default: return null;
590
603
  }
591
604
  }
592
- var xe = t.create({
605
+ var Z = t.create({
593
606
  name: "orderedList",
594
607
  addOptions() {
595
608
  return {
@@ -616,14 +629,14 @@ var xe = t.create({
616
629
  if (t) return t;
617
630
  let n = e.getAttribute("style");
618
631
  if (n) {
619
- let e = Q(n);
632
+ let e = X(n);
620
633
  if (e) return e;
621
634
  }
622
635
  let r = e.querySelector("li");
623
636
  if (r) {
624
637
  let e = r.getAttribute("style");
625
638
  if (e) {
626
- let t = Q(e);
639
+ let t = X(e);
627
640
  if (t) return t;
628
641
  }
629
642
  }
@@ -646,7 +659,7 @@ var xe = t.create({
646
659
  markdownTokenName: "list",
647
660
  parseMarkdown: (e, t) => {
648
661
  if (e.type !== "list" || !e.ordered) return [];
649
- let n = e.start || 1, r = e.typeMarker, i = e.items ? ye(e.items, t) : [], a = {};
662
+ let n = e.start || 1, r = e.typeMarker, i = e.items ? Ce(e.items, t) : [], a = {};
650
663
  return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
651
664
  type: "orderedList",
652
665
  attrs: a,
@@ -662,32 +675,32 @@ var xe = t.create({
662
675
  level: "block",
663
676
  start: () => -1,
664
677
  tokenize: (e, t, n) => {
665
- let r = e.split("\n"), [i, a] = _e(r);
666
- if (i.length === 0) return;
667
- let o = Y(i, i[0].indent, n);
678
+ let [r, i, a] = Te(e);
679
+ if (r.length === 0) return;
680
+ let o = K(r, r[0].indent, n);
668
681
  if (o.length !== 0) return {
669
682
  type: "list",
670
683
  ordered: !0,
671
- start: i[0]?.number || 1,
672
- typeMarker: i[0]?.type,
684
+ start: r[0]?.number || 1,
685
+ typeMarker: r[0]?.type,
673
686
  items: o,
674
- raw: r.slice(0, a).join("\n")
687
+ raw: a.slice(0, i).join("\n")
675
688
  };
676
689
  }
677
690
  },
678
691
  markdownOptions: { indentsContent: !0 },
679
692
  addCommands() {
680
- 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
+ return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ee, this.editor.getAttributes(J)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
681
694
  },
682
695
  addKeyboardShortcuts() {
683
696
  return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
684
697
  },
685
698
  addProseMirrorPlugins() {
686
- return [new m({ props: { handlePaste: (e, t) => {
699
+ return [new g({ props: { handlePaste: (e, t) => {
687
700
  if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
688
701
  let n = t.clipboardData?.getData("text/plain");
689
702
  if (!n) return !1;
690
- let r = J(n);
703
+ let r = G(n);
691
704
  if (!r) return !1;
692
705
  try {
693
706
  let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
@@ -699,25 +712,28 @@ var xe = t.create({
699
712
  },
700
713
  addInputRules() {
701
714
  let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], t = f({
702
- find: Z,
715
+ find: Y,
703
716
  type: this.type,
704
717
  getAttributes: (e) => ({ start: +e[1] }),
705
718
  joinPredicate: e
706
719
  });
707
720
  return (this.options.keepMarks || this.options.keepAttributes) && (t = f({
708
- find: Z,
721
+ find: Y,
709
722
  type: this.type,
710
723
  keepMarks: this.options.keepMarks,
711
724
  keepAttributes: this.options.keepAttributes,
712
725
  getAttributes: (e) => ({
713
726
  start: +e[1],
714
- ...this.editor.getAttributes(X)
727
+ ...this.editor.getAttributes(J)
715
728
  }),
716
729
  joinPredicate: e,
717
730
  editor: this.editor
718
731
  })), [t];
719
732
  }
720
- }), 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 = t.create({
733
+ }), Q = /^\s*(\[([( |x])?\])\s$/, De = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", Oe = (e, t, n) => {
734
+ var r;
735
+ return (n == null || (r = n.checkboxLabel) == null ? void 0 : r.call(n, e, t)) || `Task item checkbox for ${e.textContent || "empty task item"}`;
736
+ }, $ = t.create({
721
737
  name: "taskItem",
722
738
  addOptions() {
723
739
  return {
@@ -774,7 +790,7 @@ var xe = t.create({
774
790
  },
775
791
  renderMarkdown: (e, t) => {
776
792
  let n = `- [${e.attrs?.checked ? "x" : " "}] `;
777
- return d(e, t, n);
793
+ return d(e, t, n, void 0, { indentMainContent: !0 });
778
794
  },
779
795
  addExtensions() {
780
796
  return this.options.nested ? [x(this.name, [this.options.taskListTypeName])] : [];
@@ -792,9 +808,9 @@ var xe = t.create({
792
808
  addNodeView() {
793
809
  return ({ node: e, HTMLAttributes: t, getPos: n, editor: r }) => {
794
810
  let i = document.createElement("li"), o = document.createElement("label"), s = document.createElement("span"), c = document.createElement("input"), l = document.createElement("div");
795
- s.style.cssText = Ce;
811
+ s.style.cssText = De;
796
812
  let u = (e) => {
797
- let t = we(e, e.attrs.checked, this.options.a11y);
813
+ let t = Oe(e, e.attrs.checked, this.options.a11y);
798
814
  c.setAttribute("aria-label", t), s.textContent = t;
799
815
  };
800
816
  u(e), o.contentEditable = "false", c.type = "checkbox", c.addEventListener("mousedown", (e) => e.preventDefault()), c.addEventListener("change", (t) => {
@@ -836,12 +852,12 @@ var xe = t.create({
836
852
  },
837
853
  addInputRules() {
838
854
  return [f({
839
- find: Se,
855
+ find: Q,
840
856
  type: this.type,
841
857
  getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
842
858
  })];
843
859
  }
844
- }), $ = t.create({
860
+ }), ke = t.create({
845
861
  name: "taskList",
846
862
  addOptions() {
847
863
  return {
@@ -943,9 +959,9 @@ e.create({
943
959
  name: "listKit",
944
960
  addExtensions() {
945
961
  let e = [];
946
- 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;
962
+ return this.options.bulletList !== !1 && e.push(b.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(I.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(V.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Z.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push($.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(ke.configure(this.options.taskList)), e;
947
963
  }
948
964
  });
949
- 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 };
965
+ export { b as BulletList, I as ListItem, V as ListKeymap, w as ORDERED_LIST_MARKER_PATTERN, Z as OrderedList, $ as TaskItem, ke as TaskList, j as areOrderedListMarkersSequential, N as buildOrderedListAttrsFromMarker, y as bulletListInputRegex, k as detectMarkerType, P as getListMarker, Q as inputRegex, A as markerToStart, Y as orderedListInputRegex, M as parseListMarker, G as parsePlainTextOrderedListPaste, T as toRoman, E as toRomanUpper };
950
966
 
951
967
  //# sourceMappingURL=index.js.map