@templatical/editor 0.8.0 → 0.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 (147) hide show
  1. package/dist/{AiChatSidebar-B74X6tIx.js → AiChatSidebar-CXpsSTbt.js} +13 -13
  2. package/dist/{AiFeatureMenu-BOxQqkn9.js → AiFeatureMenu-CBtADSlv.js} +7 -7
  3. package/dist/{BlockIssueBadge-DJTiT1eF.js → BlockIssueBadge-FEuyG1p0.js} +5 -5
  4. package/dist/{CloudEditor-BzCVDD6e.js → CloudEditor-C5iH4_HX.js} +19 -19
  5. package/dist/{CollaboratorBar-Cb-c1IkS.js → CollaboratorBar-Bqp1kjPK.js} +4 -4
  6. package/dist/{CommentsSidebar-Qvppl-DR.js → CommentsSidebar-DaWP5ZGl.js} +12 -12
  7. package/dist/{CountdownBlock-D0IiMliC.js → CountdownBlock-C51M6s-J.js} +3 -3
  8. package/dist/{CountdownToolbar-BVVT8U5C.js → CountdownToolbar-C2QkG8S0.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-ucgtoDll.js → DesignReferenceSidebar-BwIRFmpA.js} +9 -9
  10. package/dist/{IssuesPanel-XVdvrgmq.js → IssuesPanel-B6ukjc1i.js} +8 -8
  11. package/dist/{LoadingTrack-CFkDkjBb.js → LoadingTrack-CZ6tO326.js} +1 -1
  12. package/dist/{ModuleBrowserModal-BotDsZ0R.js → ModuleBrowserModal-DvhbtQ5Q.js} +11 -11
  13. package/dist/{ModulePreviewCanvas-CDg4MnJP.js → ModulePreviewCanvas-DJbx-ARl.js} +3 -3
  14. package/dist/{NumberWithSuffix-n-cr7lpU.js → NumberWithSuffix-wOM0319c.js} +3 -3
  15. package/dist/{ParagraphEditor-CfzIUFQ_.js → ParagraphEditor-DcVQcYUK.js} +25 -25
  16. package/dist/{RichTextEditorContent-Cu9NEkKd.js → RichTextEditorContent-C02UzFoS.js} +6 -6
  17. package/dist/{SaveModuleDialog-DuzfCamG.js → SaveModuleDialog-C0Hcbpfe.js} +7 -7
  18. package/dist/{SnapshotHistory-DiAPOSDM.js → SnapshotHistory-ByXaMG1n.js} +9 -9
  19. package/dist/{TemplateScoringPanel-BzDVdfOx.js → TemplateScoringPanel-BpQgtaDl.js} +14 -14
  20. package/dist/{TestEmailModal-D5I5Mgtb.js → TestEmailModal-Rdi8WxSm.js} +5 -5
  21. package/dist/{TitleEditor-CZUkhtDo.js → TitleEditor-CT4asLZe.js} +12 -12
  22. package/dist/{TplModal-CVq2BAIW.js → TplModal-anuE6Hb0.js} +4 -4
  23. package/dist/{blockTypeIcons-CJNuGjLX.js → blockTypeIcons-8MdDzKgP.js} +2 -2
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js → AiFeatureMenu-B2lX_OPX.js} +3 -3
  26. package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js.map → AiFeatureMenu-B2lX_OPX.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js → BlockIssueBadge-CrmWF2hu.js} +3 -3
  28. package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js.map → BlockIssueBadge-CrmWF2hu.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js → CloudEditor-Do4-w8x5.js} +8 -8
  30. package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js.map → CloudEditor-Do4-w8x5.js.map} +1 -1
  31. package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js → CollaboratorBar-Xmam6lHp.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js.map → CollaboratorBar-Xmam6lHp.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js → CountdownBlock-DadDprcu.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js.map → CountdownBlock-DadDprcu.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js → CountdownToolbar-qQC07x3l.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js.map → CountdownToolbar-qQC07x3l.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js → IssuesPanel-DWoYjpo4.js} +4 -4
  38. package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js.map → IssuesPanel-DWoYjpo4.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js → ModuleBrowserModal-BQ2-bR4y.js} +6 -6
  40. package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js.map → ModuleBrowserModal-BQ2-bR4y.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js → ModulePreviewCanvas-B57d9ZNW.js} +3 -3
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js.map → ModulePreviewCanvas-B57d9ZNW.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js → NumberWithSuffix-CJFH3eNR.js} +3 -3
  44. package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js.map → NumberWithSuffix-CJFH3eNR.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js → ParagraphEditor-DPFK_KjR.js} +19 -19
  46. package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js.map → ParagraphEditor-DPFK_KjR.js.map} +1 -1
  47. package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js → RichTextEditorContent-frc9A4J9.js} +3 -3
  48. package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js.map → RichTextEditorContent-frc9A4J9.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js → SaveModuleDialog-OgP9rNwp.js} +3 -3
  50. package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js.map → SaveModuleDialog-OgP9rNwp.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-CSDdss38.js → TitleEditor-DZ_v-LQC.js} +9 -9
  52. package/dist/cdn/chunks/{TitleEditor-CSDdss38.js.map → TitleEditor-DZ_v-LQC.js.map} +1 -1
  53. package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js → blockTypeIcons-DYAslSVB.js} +3 -3
  54. package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js.map → blockTypeIcons-DYAslSVB.js.map} +1 -1
  55. package/dist/cdn/chunks/de-BBEGQDsd.js.map +1 -1
  56. package/dist/cdn/chunks/de-DG1WWVXM.js.map +1 -1
  57. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -1
  58. package/dist/cdn/chunks/{draggable-P6QWzy4g.js → draggable-CLpL3kf8.js} +6 -6
  59. package/dist/cdn/chunks/draggable-CLpL3kf8.js.map +1 -0
  60. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -1
  61. package/dist/cdn/chunks/en-BE6OV83-.js.map +1 -1
  62. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -1
  63. package/dist/cdn/chunks/en-CHha-_ta.js.map +1 -1
  64. package/dist/cdn/chunks/{extensions-DgvvgeJU.js → extensions-IwIDJ7T-.js} +4 -4
  65. package/dist/cdn/chunks/{extensions-DgvvgeJU.js.map → extensions-IwIDJ7T-.js.map} +1 -1
  66. package/dist/cdn/chunks/{features-CgTy87Ni.js → features-svfaXiyQ.js} +663 -645
  67. package/dist/cdn/chunks/features-svfaXiyQ.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-DxJ--AJb.js → icons-BWmUvlwk.js} +12 -12
  69. package/dist/cdn/chunks/{icons-DxJ--AJb.js.map → icons-BWmUvlwk.js.map} +1 -1
  70. package/dist/cdn/chunks/{liquid.browser-lQbkge2E.js → liquid.browser-cpFt-Vmw.js} +674 -612
  71. package/dist/cdn/chunks/liquid.browser-cpFt-Vmw.js.map +1 -0
  72. package/dist/cdn/chunks/{media-library-Byh_BbTm.js → media-library-DyxGPQvA.js} +6 -5
  73. package/dist/cdn/chunks/{media-library-Byh_BbTm.js.map → media-library-DyxGPQvA.js.map} +1 -1
  74. package/dist/cdn/chunks/pt-BR-BYRTP5Ww.js.map +1 -1
  75. package/dist/cdn/chunks/pt-BR-CFomv2R8.js.map +1 -1
  76. package/dist/cdn/chunks/pt-BR-CQl2JxRp.js.map +1 -1
  77. package/dist/cdn/chunks/pusher-bjpcqCZG.js.map +1 -1
  78. package/dist/cdn/chunks/quality-DLJBm0Sf.js +2140 -0
  79. package/dist/cdn/chunks/quality-DLJBm0Sf.js.map +1 -0
  80. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -1
  81. package/dist/cdn/chunks/{renderer-DttVILgu.js → renderer-BDRxApzE.js} +11 -5
  82. package/dist/cdn/chunks/{renderer-DttVILgu.js.map → renderer-BDRxApzE.js.map} +1 -1
  83. package/dist/cdn/chunks/{src-a8fYhBi5.js → src-DBcvijiJ.js} +5 -5
  84. package/dist/cdn/chunks/{src-a8fYhBi5.js.map → src-DBcvijiJ.js.map} +1 -1
  85. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -1
  86. package/dist/cdn/chunks/{styles-8qDRQ-6n.js → styles--HrprHTR.js} +17 -17
  87. package/dist/cdn/chunks/{styles-8qDRQ-6n.js.map → styles--HrprHTR.js.map} +1 -1
  88. package/dist/cdn/chunks/{tiptap-BwTCLVWl.js → tiptap-BCvhHXDe.js} +711 -692
  89. package/dist/cdn/chunks/tiptap-BCvhHXDe.js.map +1 -0
  90. package/dist/cdn/editor.js +6 -6
  91. package/dist/cdn/editor.js.map +1 -1
  92. package/dist/{check-BF4bEbCU.js → check-DwVS7v3N.js} +1 -1
  93. package/dist/{chevron-down-4NzWtv6Y.js → chevron-down-CytfFjil.js} +1 -1
  94. package/dist/{circle-alert-CPIth9bC.js → circle-alert-9J8Q4fwU.js} +1 -1
  95. package/dist/{clock-B9-ct9r_.js → clock-CL2fYWmc.js} +1 -1
  96. package/dist/{cloud-k0DgeCo2.js → cloud-DHsOqOnH.js} +1 -1
  97. package/dist/{createLucideIcon-Di4mqmGn.js → createLucideIcon-DTECxBv6.js} +4 -4
  98. package/dist/{dist-DVwOAodp.js → dist-3RAjjDZq.js} +2 -2
  99. package/dist/{dist-hfu7I2rO.js → dist-B5FKze93.js} +375 -353
  100. package/dist/dist-BWVK8w_m.js +5 -0
  101. package/dist/{dist-CISFttkF.js → dist-BjSjVZRA.js} +2 -2
  102. package/dist/{dist-DD-9hatO.js → dist-BoGj0ys1.js} +8 -8
  103. package/dist/{dist-BzRLLpfq.js → dist-CkhqaMca.js} +6 -5
  104. package/dist/{dist-U5guDm2w.js → dist-D8IxYzaU.js} +125 -125
  105. package/dist/{dist-B2jcQhv8.js → dist-DPiqL9q5.js} +17 -17
  106. package/dist/{dist-v8h02hhE.js → dist-DgD8K8y0.js} +2 -2
  107. package/dist/{dist-DxD1kSdH.js → dist-DiYYRj9J.js} +22 -48
  108. package/dist/{dist-CQQS9SRN.js → dist-DpF3BN6Y.js} +85 -62
  109. package/dist/dist-UekZXGFH.js +5 -0
  110. package/dist/{dist-DUvhjQ2-.js → dist-qFGe50Kc.js} +2 -2
  111. package/dist/{extensions-C-FpnfJn.js → extensions-BTheidN4.js} +19 -19
  112. package/dist/{image-up-CubAveUO.js → image-up-YgXg9o1y.js} +1 -1
  113. package/dist/index.d.ts +39 -92
  114. package/dist/{info-DiINxXfZ.js → info-W-213KLD.js} +1 -1
  115. package/dist/{keys-CY3tkCsv.js → keys-XS_XrjqL.js} +1 -1
  116. package/dist/{liquid.browser-DX8ZHRdq.js → liquid.browser-Dc30h4PN.js} +673 -611
  117. package/dist/{list-checks-CMtEXe9l.js → list-checks-BQrZlWzC.js} +1 -1
  118. package/dist/{loader-circle-_9bP23op.js → loader-circle-BQPHssrF.js} +1 -1
  119. package/dist/{message-circle-gzy2ZGJ3.js → message-circle-iMgHXBeH.js} +1 -1
  120. package/dist/{refresh-cw-C9_M6yB3.js → refresh-cw-DFozdLYp.js} +1 -1
  121. package/dist/{scan-line-DUEg6DoT.js → scan-line-D3NN0Gre.js} +1 -1
  122. package/dist/{send-BatIZC9a.js → send-DBhq0GU2.js} +1 -1
  123. package/dist/{shield-check-C5Gv2cM1.js → shield-check-DquM3-E5.js} +1 -1
  124. package/dist/{sparkles-D1IGi_cC.js → sparkles-CTGknLJy.js} +1 -1
  125. package/dist/{styles-Ci7RdimQ.js → styles-BUp0dVGV.js} +33 -33
  126. package/dist/templatical-editor.js +4 -4
  127. package/dist/{text-align-start-DG3aAH7Y.js → text-align-end-BPOHCD7K.js} +11 -11
  128. package/dist/{trash-2-424iqbpN.js → trash-2-VyX2kcG0.js} +1 -1
  129. package/dist/{triangle-alert-DWQySIE2.js → triangle-alert-HIqW9Hwv.js} +1 -1
  130. package/dist/{useAliveFlag-D8GoB4VE.js → useAliveFlag-t3e0dokQ.js} +1 -1
  131. package/dist/{useCloudI18n-BPUHj2CZ.js → useCloudI18n-oETj4WiF.js} +2 -2
  132. package/dist/{useEditorCore-DT3VrvZS.js → useEditorCore-CJB2x6Ts.js} +719 -716
  133. package/dist/{useI18n-CWX9ZTCW.js → useI18n-tMHqPsE4.js} +2 -2
  134. package/dist/{useMergeTag-B3F9VR04.js → useMergeTag-Bv8ASt6n.js} +2 -2
  135. package/dist/usePopoverRoot-Bs6kLsI3.js +8 -0
  136. package/dist/{vue.runtime.esm-bundler-Bxqkjqhc.js → vue.runtime.esm-bundler-xiAB6UTz.js} +15 -12
  137. package/dist/{x-Dlaenqta.js → x-C1j-AamY.js} +1 -1
  138. package/package.json +33 -34
  139. package/dist/cdn/chunks/draggable-P6QWzy4g.js.map +0 -1
  140. package/dist/cdn/chunks/features-CgTy87Ni.js.map +0 -1
  141. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  142. package/dist/cdn/chunks/quality-CHCEMG8e.js +0 -1846
  143. package/dist/cdn/chunks/quality-CHCEMG8e.js.map +0 -1
  144. package/dist/cdn/chunks/tiptap-BwTCLVWl.js.map +0 -1
  145. package/dist/dist-BYt3jdCR.js +0 -5
  146. package/dist/dist-CfQPBf15.js +0 -5
  147. package/dist/usePopoverRoot-BKJcxsst.js +0 -8
@@ -1,8 +1,8 @@
1
- import { Cn as e, Ct as t, Dn as n, En as r, Gt as i, Ht as a, Jt as o, Mt as s, Nt as c, Qt as l, Sn as u, St as d, Tn as f, Ut as p, Z as m, _ as ee, _n as h, at as g, bn as _, c as v, gn as te, hn as y, i as b, jt as x, nn as ne, ot as re, pn as S, rt as ie, u as C, v as ae, vn as w, wn as oe, xn as T, yn as E } from "./dist-CQQS9SRN.js";
2
- import { Link as se } from "./dist-B2jcQhv8.js";
3
- import { Underline as ce } from "./dist-DUvhjQ2-.js";
4
- //#region ../../node_modules/.pnpm/@tiptap+core@3.22.5_@tiptap+pm@3.22.5/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
5
- var D = (e, t) => {
1
+ import { $t as e, Cn as t, Ct as n, Dn as r, En as i, Kt as a, Mt as o, Nt as s, On as c, Pt as l, Sn as u, Tn as d, Ut as f, Wt as p, Yt as ee, Z as te, _ as ne, _n as re, at as ie, bn as m, c as h, gn as g, i as _, mn as v, ot as ae, rn as y, rt as oe, u as b, v as se, vn as x, wn as S, wt as ce, xn as C, yn as w } from "./dist-DpF3BN6Y.js";
2
+ import { Link as le } from "./dist-DPiqL9q5.js";
3
+ import { Underline as ue } from "./dist-qFGe50Kc.js";
4
+ //#region ../../node_modules/.pnpm/@tiptap+core@3.23.4_@tiptap+pm@3.23.4/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
5
+ var T = (e, t) => {
6
6
  if (e === "slot") return 0;
7
7
  if (e instanceof Function) return e(t);
8
8
  let { children: n, ...r } = t ?? {};
@@ -12,7 +12,7 @@ var D = (e, t) => {
12
12
  r,
13
13
  n
14
14
  ];
15
- }, le = /^\s*>\s$/, ue = C.create({
15
+ }, de = /^\s*>\s$/, fe = b.create({
16
16
  name: "blockquote",
17
17
  addOptions() {
18
18
  return { HTMLAttributes: {} };
@@ -24,9 +24,9 @@ var D = (e, t) => {
24
24
  return [{ tag: "blockquote" }];
25
25
  },
26
26
  renderHTML({ HTMLAttributes: e }) {
27
- return /* @__PURE__ */ D("blockquote", {
28
- ...i(this.options.HTMLAttributes, e),
29
- children: /* @__PURE__ */ D("slot", {})
27
+ return /* @__PURE__ */ T("blockquote", {
28
+ ...a(this.options.HTMLAttributes, e),
29
+ children: /* @__PURE__ */ T("slot", {})
30
30
  });
31
31
  },
32
32
  parseMarkdown: (e, t) => {
@@ -52,12 +52,12 @@ var D = (e, t) => {
52
52
  return { "Mod-Shift-b": () => this.editor.commands.toggleBlockquote() };
53
53
  },
54
54
  addInputRules() {
55
- return [y({
56
- find: le,
55
+ return [g({
56
+ find: de,
57
57
  type: this.type
58
58
  })];
59
59
  }
60
- }), de = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, fe = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, pe = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, me = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, he = v.create({
60
+ }), pe = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, me = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, he = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, ge = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, _e = h.create({
61
61
  name: "bold",
62
62
  addOptions() {
63
63
  return { HTMLAttributes: {} };
@@ -80,9 +80,9 @@ var D = (e, t) => {
80
80
  ];
81
81
  },
82
82
  renderHTML({ HTMLAttributes: e }) {
83
- return /* @__PURE__ */ D("strong", {
84
- ...i(this.options.HTMLAttributes, e),
85
- children: /* @__PURE__ */ D("slot", {})
83
+ return /* @__PURE__ */ T("strong", {
84
+ ...a(this.options.HTMLAttributes, e),
85
+ children: /* @__PURE__ */ T("slot", {})
86
86
  });
87
87
  },
88
88
  markdownTokenName: "strong",
@@ -106,24 +106,24 @@ var D = (e, t) => {
106
106
  };
107
107
  },
108
108
  addInputRules() {
109
- return [a({
110
- find: de,
111
- type: this.type
112
- }), a({
109
+ return [f({
113
110
  find: pe,
114
111
  type: this.type
112
+ }), f({
113
+ find: he,
114
+ type: this.type
115
115
  })];
116
116
  },
117
117
  addPasteRules() {
118
118
  return [p({
119
- find: fe,
119
+ find: me,
120
120
  type: this.type
121
121
  }), p({
122
- find: me,
122
+ find: ge,
123
123
  type: this.type
124
124
  })];
125
125
  }
126
- }), ge = /(^|[^`])`([^`]+)`(?!`)$/, _e = /(^|[^`])`([^`]+)`(?!`)/g, ve = v.create({
126
+ }), ve = /(^|[^`])`([^`]+)`(?!`)$/, ye = /(^|[^`])`([^`]+)`(?!`)/g, be = h.create({
127
127
  name: "code",
128
128
  addOptions() {
129
129
  return { HTMLAttributes: {} };
@@ -137,7 +137,7 @@ var D = (e, t) => {
137
137
  renderHTML({ HTMLAttributes: e }) {
138
138
  return [
139
139
  "code",
140
- i(this.options.HTMLAttributes, e),
140
+ a(this.options.HTMLAttributes, e),
141
141
  0
142
142
  ];
143
143
  },
@@ -158,18 +158,18 @@ var D = (e, t) => {
158
158
  return { "Mod-e": () => this.editor.commands.toggleCode() };
159
159
  },
160
160
  addInputRules() {
161
- return [a({
162
- find: ge,
161
+ return [f({
162
+ find: ve,
163
163
  type: this.type
164
164
  })];
165
165
  },
166
166
  addPasteRules() {
167
167
  return [p({
168
- find: _e,
168
+ find: ye,
169
169
  type: this.type
170
170
  })];
171
171
  }
172
- }), O = 4, ye = /^```([a-z]+)?[\s\n]$/, be = /^~~~([a-z]+)?[\s\n]$/, xe = C.create({
172
+ }), E = 4, xe = /^```([a-z]+)?[\s\n]$/, Se = /^~~~([a-z]+)?[\s\n]$/, Ce = b.create({
173
173
  name: "codeBlock",
174
174
  addOptions() {
175
175
  return {
@@ -178,7 +178,7 @@ var D = (e, t) => {
178
178
  exitOnArrowDown: !0,
179
179
  defaultLanguage: null,
180
180
  enableTabIndentation: !1,
181
- tabSize: O,
181
+ tabSize: E,
182
182
  HTMLAttributes: {}
183
183
  };
184
184
  },
@@ -206,7 +206,7 @@ var D = (e, t) => {
206
206
  renderHTML({ node: e, HTMLAttributes: t }) {
207
207
  return [
208
208
  "pre",
209
- i(this.options.HTMLAttributes, t),
209
+ a(this.options.HTMLAttributes, t),
210
210
  [
211
211
  "code",
212
212
  { class: e.attrs.language ? this.options.languageClassPrefix + e.attrs.language : null },
@@ -241,7 +241,7 @@ var D = (e, t) => {
241
241
  },
242
242
  Tab: ({ editor: e }) => {
243
243
  if (!this.options.enableTabIndentation) return !1;
244
- let t = this.options.tabSize ?? O, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
244
+ let t = this.options.tabSize ?? E, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
245
245
  if (i.parent.type !== this.type) return !1;
246
246
  let o = " ".repeat(t);
247
247
  return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
@@ -249,29 +249,29 @@ var D = (e, t) => {
249
249
  return e.replaceWith(t, i, n.schema.text(a)), !0;
250
250
  });
251
251
  },
252
- "Shift-Tab": ({ editor: t }) => {
252
+ "Shift-Tab": ({ editor: e }) => {
253
253
  if (!this.options.enableTabIndentation) return !1;
254
- let n = this.options.tabSize ?? O, { state: r } = t, { selection: i } = r, { $from: a, empty: o } = i;
255
- return a.parent.type === this.type ? o ? t.commands.command(({ tr: t }) => {
256
- let { pos: i } = a, o = a.start(), s = a.end(), c = r.doc.textBetween(o, s, "\n", "\n").split("\n"), l = 0, u = 0, d = i - o;
257
- for (let e = 0; e < c.length; e += 1) {
258
- if (u + c[e].length >= d) {
259
- l = e;
254
+ let t = this.options.tabSize ?? E, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
255
+ return i.parent.type === this.type ? a ? e.commands.command(({ tr: e }) => {
256
+ let { pos: r } = i, a = i.start(), o = i.end(), s = n.doc.textBetween(a, o, "\n", "\n").split("\n"), c = 0, l = 0, u = r - a;
257
+ for (let e = 0; e < s.length; e += 1) {
258
+ if (l + s[e].length >= u) {
259
+ c = e;
260
260
  break;
261
261
  }
262
- u += c[e].length + 1;
262
+ l += s[e].length + 1;
263
263
  }
264
- let f = c[l].match(/^ */)?.[0] || "", p = Math.min(f.length, n);
265
- if (p === 0) return !0;
266
- let m = o;
267
- for (let e = 0; e < l; e += 1) m += c[e].length + 1;
268
- return t.delete(m, m + p), i - m <= p && t.setSelection(e.create(t.doc, m)), !0;
269
- }) : t.commands.command(({ tr: e }) => {
270
- let { from: t, to: a } = i, o = r.doc.textBetween(t, a, "\n", "\n").split("\n").map((e) => {
271
- let t = e.match(/^ */)?.[0] || "", r = Math.min(t.length, n);
264
+ let d = s[c].match(/^ */)?.[0] || "", f = Math.min(d.length, t);
265
+ if (f === 0) return !0;
266
+ let p = a;
267
+ for (let e = 0; e < c; e += 1) p += s[e].length + 1;
268
+ return e.delete(p, p + f), r - p <= f && e.setSelection(S.create(e.doc, p)), !0;
269
+ }) : e.commands.command(({ tr: e }) => {
270
+ let { from: i, to: a } = r, o = n.doc.textBetween(i, a, "\n", "\n").split("\n").map((e) => {
271
+ let n = e.match(/^ */)?.[0] || "", r = Math.min(n.length, t);
272
272
  return e.slice(r);
273
273
  }).join("\n");
274
- return e.replaceWith(t, a, r.schema.text(o)), !0;
274
+ return e.replaceWith(i, a, n.schema.text(o)), !0;
275
275
  }) : !1;
276
276
  },
277
277
  Enter: ({ editor: e }) => {
@@ -283,42 +283,42 @@ var D = (e, t) => {
283
283
  },
284
284
  ArrowDown: ({ editor: e }) => {
285
285
  if (!this.options.exitOnArrowDown) return !1;
286
- let { state: t } = e, { selection: n, doc: r } = t, { $from: i, empty: a } = n;
287
- if (!a || i.parent.type !== this.type || i.parentOffset !== i.parent.nodeSize - 2) return !1;
288
- let o = i.after();
289
- return o === void 0 ? !1 : r.nodeAt(o) ? e.commands.command(({ tr: e }) => (e.setSelection(u.near(r.resolve(o))), !0)) : e.commands.exitCode();
286
+ let { state: n } = e, { selection: r, doc: i } = n, { $from: a, empty: o } = r;
287
+ if (!o || a.parent.type !== this.type || a.parentOffset !== a.parent.nodeSize - 2) return !1;
288
+ let s = a.after();
289
+ return s === void 0 ? !1 : i.nodeAt(s) ? e.commands.command(({ tr: e }) => (e.setSelection(t.near(i.resolve(s))), !0)) : e.commands.exitCode();
290
290
  }
291
291
  };
292
292
  },
293
293
  addInputRules() {
294
- return [S({
295
- find: ye,
294
+ return [v({
295
+ find: xe,
296
296
  type: this.type,
297
297
  getAttributes: (e) => ({ language: e[1] })
298
- }), S({
299
- find: be,
298
+ }), v({
299
+ find: Se,
300
300
  type: this.type,
301
301
  getAttributes: (e) => ({ language: e[1] })
302
302
  })];
303
303
  },
304
304
  addProseMirrorPlugins() {
305
- return [new _({
306
- key: new T("codeBlockVSCodeHandler"),
307
- props: { handlePaste: (t, n) => {
308
- if (!n.clipboardData || this.editor.isActive(this.type.name)) return !1;
309
- let r = n.clipboardData.getData("text/plain"), i = n.clipboardData.getData("vscode-editor-data"), a = (i ? JSON.parse(i) : void 0)?.mode;
310
- if (!r || !a) return !1;
311
- let { tr: o, schema: s } = t.state, c = s.text(r.replace(/\r\n?/g, "\n"));
312
- return o.replaceSelectionWith(this.type.create({ language: a }, c)), o.selection.$from.parent.type !== this.type && o.setSelection(e.near(o.doc.resolve(Math.max(0, o.selection.from - 2)))), o.setMeta("paste", !0), t.dispatch(o), !0;
305
+ return [new C({
306
+ key: new u("codeBlockVSCodeHandler"),
307
+ props: { handlePaste: (e, t) => {
308
+ if (!t.clipboardData || this.editor.isActive(this.type.name)) return !1;
309
+ let n = t.clipboardData.getData("text/plain"), r = t.clipboardData.getData("vscode-editor-data"), i = (r ? JSON.parse(r) : void 0)?.mode;
310
+ if (!n || !i) return !1;
311
+ let { tr: a, schema: o } = e.state, s = o.text(n.replace(/\r\n?/g, "\n"));
312
+ return a.replaceSelectionWith(this.type.create({ language: i }, s)), a.selection.$from.parent.type !== this.type && a.setSelection(S.near(a.doc.resolve(Math.max(0, a.selection.from - 2)))), a.setMeta("paste", !0), e.dispatch(a), !0;
313
313
  } }
314
314
  })];
315
315
  }
316
- }), Se = C.create({
316
+ }), we = b.create({
317
317
  name: "doc",
318
318
  topNode: !0,
319
319
  content: "block+",
320
320
  renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
321
- }), Ce = C.create({
321
+ }), Te = b.create({
322
322
  name: "hardBreak",
323
323
  markdownTokenName: "br",
324
324
  addOptions() {
@@ -335,7 +335,7 @@ var D = (e, t) => {
335
335
  return [{ tag: "br" }];
336
336
  },
337
337
  renderHTML({ HTMLAttributes: e }) {
338
- return ["br", i(this.options.HTMLAttributes, e)];
338
+ return ["br", a(this.options.HTMLAttributes, e)];
339
339
  },
340
340
  renderText() {
341
341
  return "\n";
@@ -362,7 +362,7 @@ var D = (e, t) => {
362
362
  "Shift-Enter": () => this.editor.commands.setHardBreak()
363
363
  };
364
364
  }
365
- }), we = C.create({
365
+ }), Ee = b.create({
366
366
  name: "heading",
367
367
  addOptions() {
368
368
  return {
@@ -395,7 +395,7 @@ var D = (e, t) => {
395
395
  renderHTML({ node: e, HTMLAttributes: t }) {
396
396
  return [
397
397
  `h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`,
398
- i(this.options.HTMLAttributes, t),
398
+ a(this.options.HTMLAttributes, t),
399
399
  0
400
400
  ];
401
401
  },
@@ -417,13 +417,13 @@ var D = (e, t) => {
417
417
  }), {});
418
418
  },
419
419
  addInputRules() {
420
- return this.options.levels.map((e) => S({
420
+ return this.options.levels.map((e) => v({
421
421
  find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
422
422
  type: this.type,
423
423
  getAttributes: { level: e }
424
424
  }));
425
425
  }
426
- }), Te = C.create({
426
+ }), De = b.create({
427
427
  name: "horizontalRule",
428
428
  addOptions() {
429
429
  return {
@@ -436,36 +436,36 @@ var D = (e, t) => {
436
436
  return [{ tag: "hr" }];
437
437
  },
438
438
  renderHTML({ HTMLAttributes: e }) {
439
- return ["hr", i(this.options.HTMLAttributes, e)];
439
+ return ["hr", a(this.options.HTMLAttributes, e)];
440
440
  },
441
441
  markdownTokenName: "hr",
442
442
  parseMarkdown: (e, t) => t.createNode("horizontalRule"),
443
443
  renderMarkdown: () => "---",
444
444
  addCommands() {
445
- return { setHorizontalRule: () => ({ chain: t, state: n }) => {
446
- if (!ae(n, n.schema.nodes[this.name])) return !1;
447
- let { selection: r } = n, { $to: i } = r, a = t();
448
- return c(r) ? a.insertContentAt(i.pos, { type: this.name }) : a.insertContent({ type: this.name }), a.command(({ state: t, tr: n, dispatch: r }) => {
449
- if (r) {
450
- let { $to: r } = n.selection, i = r.end();
451
- if (r.nodeAfter) r.nodeAfter.isTextblock ? n.setSelection(e.create(n.doc, r.pos + 1)) : r.nodeAfter.isBlock ? n.setSelection(E.create(n.doc, r.pos)) : n.setSelection(e.create(n.doc, r.pos));
445
+ return { setHorizontalRule: () => ({ chain: e, state: t }) => {
446
+ if (!se(t, t.schema.nodes[this.name])) return !1;
447
+ let { selection: n } = t, { $to: r } = n, i = e();
448
+ return l(n) ? i.insertContentAt(r.pos, { type: this.name }) : i.insertContent({ type: this.name }), i.command(({ state: e, tr: t, dispatch: n }) => {
449
+ if (n) {
450
+ let { $to: n } = t.selection, r = n.end();
451
+ if (n.nodeAfter) n.nodeAfter.isTextblock ? t.setSelection(S.create(t.doc, n.pos + 1)) : n.nodeAfter.isBlock ? t.setSelection(m.create(t.doc, n.pos)) : t.setSelection(S.create(t.doc, n.pos));
452
452
  else {
453
- let a = (t.schema.nodes[this.options.nextNodeType] || r.parent.type.contentMatch.defaultType)?.create();
454
- a && (n.insert(i, a), n.setSelection(e.create(n.doc, i + 1)));
453
+ let i = (e.schema.nodes[this.options.nextNodeType] || n.parent.type.contentMatch.defaultType)?.create();
454
+ i && (t.insert(r, i), t.setSelection(S.create(t.doc, r + 1)));
455
455
  }
456
- n.scrollIntoView();
456
+ t.scrollIntoView();
457
457
  }
458
458
  return !0;
459
459
  }).run();
460
460
  } };
461
461
  },
462
462
  addInputRules() {
463
- return [o({
463
+ return [ee({
464
464
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
465
465
  type: this.type
466
466
  })];
467
467
  }
468
- }), Ee = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, De = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Oe = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, ke = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Ae = v.create({
468
+ }), Oe = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, ke = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ae = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, je = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Me = h.create({
469
469
  name: "italic",
470
470
  addOptions() {
471
471
  return { HTMLAttributes: {} };
@@ -487,7 +487,7 @@ var D = (e, t) => {
487
487
  renderHTML({ HTMLAttributes: e }) {
488
488
  return [
489
489
  "em",
490
- i(this.options.HTMLAttributes, e),
490
+ a(this.options.HTMLAttributes, e),
491
491
  0
492
492
  ];
493
493
  },
@@ -512,29 +512,29 @@ var D = (e, t) => {
512
512
  };
513
513
  },
514
514
  addInputRules() {
515
- return [a({
516
- find: Ee,
517
- type: this.type
518
- }), a({
515
+ return [f({
519
516
  find: Oe,
520
517
  type: this.type
518
+ }), f({
519
+ find: Ae,
520
+ type: this.type
521
521
  })];
522
522
  },
523
523
  addPasteRules() {
524
524
  return [p({
525
- find: De,
525
+ find: ke,
526
526
  type: this.type
527
527
  }), p({
528
- find: ke,
528
+ find: je,
529
529
  type: this.type
530
530
  })];
531
531
  }
532
- }), je = Object.defineProperty, Me = (e, t) => {
533
- for (var n in t) je(e, n, {
532
+ }), Ne = Object.defineProperty, Pe = (e, t) => {
533
+ for (var n in t) Ne(e, n, {
534
534
  get: t[n],
535
535
  enumerable: !0
536
536
  });
537
- }, Ne = "listItem", k = "textStyle", A = /^\s*([-+*])\s$/, j = C.create({
537
+ }, Fe = "listItem", D = "textStyle", O = /^\s*([-+*])\s$/, k = b.create({
538
538
  name: "bulletList",
539
539
  addOptions() {
540
540
  return {
@@ -554,7 +554,7 @@ var D = (e, t) => {
554
554
  renderHTML({ HTMLAttributes: e }) {
555
555
  return [
556
556
  "ul",
557
- i(this.options.HTMLAttributes, e),
557
+ a(this.options.HTMLAttributes, e),
558
558
  0
559
559
  ];
560
560
  },
@@ -566,26 +566,38 @@ var D = (e, t) => {
566
566
  renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
567
567
  markdownOptions: { indentsContent: !0 },
568
568
  addCommands() {
569
- return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ne, this.editor.getAttributes(k)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
569
+ return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Fe, this.editor.getAttributes(D)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
570
570
  },
571
571
  addKeyboardShortcuts() {
572
572
  return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
573
573
  },
574
574
  addInputRules() {
575
- let e = y({
576
- find: A,
575
+ let e = g({
576
+ find: O,
577
577
  type: this.type
578
578
  });
579
- return (this.options.keepMarks || this.options.keepAttributes) && (e = y({
580
- find: A,
579
+ return (this.options.keepMarks || this.options.keepAttributes) && (e = g({
580
+ find: O,
581
581
  type: this.type,
582
582
  keepMarks: this.options.keepMarks,
583
583
  keepAttributes: this.options.keepAttributes,
584
- getAttributes: () => this.editor.getAttributes(k),
584
+ getAttributes: () => this.editor.getAttributes(D),
585
585
  editor: this.editor
586
586
  })), [e];
587
587
  }
588
- }), M = C.create({
588
+ });
589
+ function Ie(e) {
590
+ let t = e.tokens?.[0];
591
+ return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
592
+ }
593
+ function Le(e, t) {
594
+ return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
595
+ type: "text",
596
+ raw: e,
597
+ text: e
598
+ }]);
599
+ }
600
+ var A = b.create({
589
601
  name: "listItem",
590
602
  addOptions() {
591
603
  return {
@@ -602,7 +614,7 @@ var D = (e, t) => {
602
614
  renderHTML({ HTMLAttributes: e }) {
603
615
  return [
604
616
  "li",
605
- i(this.options.HTMLAttributes, e),
617
+ a(this.options.HTMLAttributes, e),
606
618
  0
607
619
  ];
608
620
  },
@@ -610,18 +622,27 @@ var D = (e, t) => {
610
622
  parseMarkdown: (e, t) => {
611
623
  if (e.type !== "list_item") return [];
612
624
  let n = t.parseBlockChildren ?? t.parseChildren, r = [];
613
- if (e.tokens && e.tokens.length > 0) if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
614
- else {
615
- let i = e.tokens[0];
616
- if (i && i.type === "text" && i.tokens && i.tokens.length > 0) {
617
- if (r = [{
625
+ if (e.tokens && e.tokens.length > 0) {
626
+ if (Ie(e)) return {
627
+ type: "listItem",
628
+ content: [{
618
629
  type: "paragraph",
619
- content: t.parseInline(i.tokens)
620
- }], e.tokens.length > 1) {
621
- let t = n(e.tokens.slice(1));
622
- r.push(...t);
623
- }
624
- } else r = n(e.tokens);
630
+ content: Le(e.text || "", t)
631
+ }]
632
+ };
633
+ if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
634
+ else {
635
+ let i = e.tokens[0];
636
+ if (i && i.type === "text" && i.tokens && i.tokens.length > 0) {
637
+ if (r = [{
638
+ type: "paragraph",
639
+ content: t.parseInline(i.tokens)
640
+ }], e.tokens.length > 1) {
641
+ let t = n(e.tokens.slice(1));
642
+ r.push(...t);
643
+ }
644
+ } else r = n(e.tokens);
645
+ }
625
646
  }
626
647
  return r.length === 0 && (r = [{
627
648
  type: "paragraph",
@@ -631,7 +652,7 @@ var D = (e, t) => {
631
652
  content: r
632
653
  };
633
654
  },
634
- renderMarkdown: (e, t, n) => ne(e, t, (e) => e.parentType === "bulletList" ? "- " : e.parentType === "orderedList" ? `${(e.meta?.parentAttrs?.start || 1) + e.index}. ` : "- ", n),
655
+ renderMarkdown: (e, t, n) => y(e, t, (e) => e.parentType === "bulletList" ? "- " : e.parentType === "orderedList" ? `${(e.meta?.parentAttrs?.start || 1) + e.index}. ` : "- ", n),
635
656
  addKeyboardShortcuts() {
636
657
  return {
637
658
  Enter: () => this.editor.commands.splitListItem(this.name),
@@ -640,80 +661,80 @@ var D = (e, t) => {
640
661
  };
641
662
  }
642
663
  });
643
- Me({}, {
644
- findListItemPos: () => N,
645
- getNextListDepth: () => P,
646
- handleBackspace: () => L,
664
+ Pe({}, {
665
+ findListItemPos: () => j,
666
+ getNextListDepth: () => M,
667
+ handleBackspace: () => I,
647
668
  handleDelete: () => R,
648
- hasListBefore: () => F,
649
- hasListItemAfter: () => Le,
650
- hasListItemBefore: () => I,
651
- listItemHasSubList: () => Pe,
652
- nextListIsDeeper: () => Fe,
653
- nextListIsHigher: () => Ie
669
+ hasListBefore: () => N,
670
+ hasListItemAfter: () => ze,
671
+ hasListItemBefore: () => P,
672
+ listItemHasSubList: () => F,
673
+ nextListIsDeeper: () => L,
674
+ nextListIsHigher: () => Re
654
675
  });
655
- var N = (e, t) => {
656
- let { $from: n } = t.selection, r = g(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
676
+ var j = (e, t) => {
677
+ let { $from: n } = t.selection, r = ie(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
657
678
  for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
658
679
  return s === null ? null : {
659
680
  $pos: t.doc.resolve(o),
660
681
  depth: s
661
682
  };
662
- }, P = (e, t) => {
663
- let n = N(e, t);
683
+ }, M = (e, t) => {
684
+ let n = j(e, t);
664
685
  if (!n) return !1;
665
- let [, r] = ie(t, e, n.$pos.pos + 4);
686
+ let [, r] = oe(t, e, n.$pos.pos + 4);
666
687
  return r;
667
- }, F = (e, t, n) => {
688
+ }, N = (e, t, n) => {
668
689
  let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
669
690
  return !(!a || !n.includes(a.type.name));
670
- }, I = (e, t) => {
691
+ }, P = (e, t) => {
671
692
  let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
672
693
  return !(r.index() === 0 || r.nodeBefore?.type.name !== e);
673
- }, Pe = (e, t, n) => {
694
+ }, F = (e, t, n) => {
674
695
  if (!n) return !1;
675
- let r = g(e, t.schema), i = !1;
696
+ let r = ie(e, t.schema), i = !1;
676
697
  return n.descendants((e) => {
677
698
  e.type === r && (i = !0);
678
699
  }), i;
679
- }, L = (e, n, r) => {
700
+ }, I = (e, t, n) => {
680
701
  if (e.commands.undoInputRule()) return !0;
681
702
  if (e.state.selection.from !== e.state.selection.to) return !1;
682
- if (!x(e.state, n) && F(e.state, n, r)) {
683
- let { $anchor: t } = e.state.selection, r = e.state.doc.resolve(t.before() - 1), i = [];
684
- r.node().descendants((e, t) => {
685
- e.type.name === n && i.push({
703
+ if (!o(e.state, t) && N(e.state, t, n)) {
704
+ let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
705
+ r.node().descendants((e, n) => {
706
+ e.type.name === t && i.push({
686
707
  node: e,
687
- pos: t
708
+ pos: n
688
709
  });
689
710
  });
690
711
  let a = i.at(-1);
691
712
  if (!a) return !1;
692
713
  let o = e.state.doc.resolve(r.start() + a.pos + 1);
693
714
  return e.chain().cut({
694
- from: t.start() - 1,
695
- to: t.end() + 1
715
+ from: n.start() - 1,
716
+ to: n.end() + 1
696
717
  }, o.end()).joinForward().run();
697
718
  }
698
- if (!x(e.state, n) || !t(e.state)) return !1;
699
- let i = N(n, e.state);
700
- if (!i) return !1;
701
- let a = e.state.doc.resolve(i.$pos.pos - 2).node(i.depth), o = Pe(n, e.state, a);
702
- return I(n, e.state) && !o ? e.commands.joinItemBackward() : e.chain().liftListItem(n).run();
703
- }, Fe = (e, t) => {
704
- let n = P(e, t), r = N(e, t);
719
+ if (!o(e.state, t) || !ce(e.state)) return !1;
720
+ let r = j(t, e.state);
721
+ if (!r) return !1;
722
+ let i = e.state.doc.resolve(r.$pos.pos - 2).node(r.depth), a = F(t, e.state, i);
723
+ return P(t, e.state) && !a ? e.commands.joinItemBackward() : e.chain().liftListItem(t).run();
724
+ }, L = (e, t) => {
725
+ let n = M(e, t), r = j(e, t);
705
726
  return !r || !n ? !1 : n > r.depth;
706
- }, Ie = (e, t) => {
707
- let n = P(e, t), r = N(e, t);
727
+ }, Re = (e, t) => {
728
+ let n = M(e, t), r = j(e, t);
708
729
  return !r || !n ? !1 : n < r.depth;
709
730
  }, R = (e, t) => {
710
- if (!x(e.state, t) || !d(e.state, t)) return !1;
711
- let { selection: n } = e.state, { $from: r, $to: i } = n;
712
- return !n.empty && r.sameParent(i) ? !1 : Fe(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : Ie(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
713
- }, Le = (e, t) => {
731
+ if (!o(e.state, t) || !n(e.state, t)) return !1;
732
+ let { selection: r } = e.state, { $from: i, $to: a } = r;
733
+ return !r.empty && i.sameParent(a) ? !1 : L(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : Re(t, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
734
+ }, ze = (e, t) => {
714
735
  let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
715
736
  return !(r.index() === r.parent.childCount - 1 || r.nodeAfter?.type.name !== e);
716
- }, Re = b.create({
737
+ }, Be = _.create({
717
738
  name: "listKeymap",
718
739
  addOptions() {
719
740
  return { listTypes: [{
@@ -741,23 +762,23 @@ var N = (e, t) => {
741
762
  Backspace: ({ editor: e }) => {
742
763
  let t = !1;
743
764
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
744
- e.state.schema.nodes[n] !== void 0 && L(e, n, r) && (t = !0);
765
+ e.state.schema.nodes[n] !== void 0 && I(e, n, r) && (t = !0);
745
766
  }), t;
746
767
  },
747
768
  "Mod-Backspace": ({ editor: e }) => {
748
769
  let t = !1;
749
770
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
750
- e.state.schema.nodes[n] !== void 0 && L(e, n, r) && (t = !0);
771
+ e.state.schema.nodes[n] !== void 0 && I(e, n, r) && (t = !0);
751
772
  }), t;
752
773
  }
753
774
  };
754
775
  }
755
- }), ze = /^(\s*)(\d+)\.\s+(.*)$/, Be = /^\s/;
756
- function Ve(e) {
776
+ }), Ve = /^(\s*)(\d+)\.\s+(.*)$/, He = /^\s/;
777
+ function Ue(e) {
757
778
  let t = e.trimStart();
758
779
  return /^[-+*]\s+/.test(t) || /^\d+\.\s+/.test(t) || /^>\s?/.test(t) || /^```/.test(t) || /^~~~/.test(t);
759
780
  }
760
- function He(e) {
781
+ function We(e) {
761
782
  let t = [], n = [], r = !1;
762
783
  return e.forEach((e) => {
763
784
  if (r) {
@@ -768,7 +789,7 @@ function He(e) {
768
789
  r = !0, n.push(e);
769
790
  return;
770
791
  }
771
- if (t.length > 0 && Ve(e)) {
792
+ if (t.length > 0 && Ue(e)) {
772
793
  r = !0, n.push(e);
773
794
  return;
774
795
  }
@@ -778,17 +799,17 @@ function He(e) {
778
799
  blockLines: n
779
800
  };
780
801
  }
781
- function Ue(e) {
802
+ function Ge(e) {
782
803
  let t = [], n = 0, r = 0;
783
804
  for (; n < e.length;) {
784
- let i = e[n], a = i.match(ze);
805
+ let i = e[n], a = i.match(Ve);
785
806
  if (!a) break;
786
807
  let [, o, s, c] = a, l = o.length, u = [c], d = n + 1, f = [i], p = !1;
787
808
  for (; d < e.length;) {
788
809
  let t = e[d];
789
- if (t.match(ze)) break;
810
+ if (t.match(Ve)) break;
790
811
  if (t.trim() === "") f.push(t), u.push(""), p = !0, d += 1;
791
- else if (t.match(Be)) f.push(t), u.push(t.slice(l + 2)), d += 1;
812
+ else if (t.match(He)) f.push(t), u.push(t.slice(l + 2)), d += 1;
792
813
  else {
793
814
  if (p) break;
794
815
  f.push(t), u.push(t), d += 1;
@@ -804,12 +825,12 @@ function Ue(e) {
804
825
  }
805
826
  return [t, r];
806
827
  }
807
- function We(e, t, n) {
828
+ function Ke(e, t, n) {
808
829
  let r = [], i = 0;
809
830
  for (; i < e.length;) {
810
831
  let a = e[i];
811
832
  if (a.indent === t) {
812
- let { paragraphLines: o, blockLines: s } = He(a.contentLines), c = o.join("\n").trim(), l = [];
833
+ let { paragraphLines: o, blockLines: s } = We(a.contentLines), c = o.join("\n").trim(), l = [];
813
834
  c && l.push({
814
835
  type: "paragraph",
815
836
  raw: c,
@@ -823,7 +844,7 @@ function We(e, t, n) {
823
844
  let d = i + 1, f = [];
824
845
  for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
825
846
  if (f.length > 0) {
826
- let e = We(f, Math.min(...f.map((e) => e.indent)), n);
847
+ let e = Ke(f, Math.min(...f.map((e) => e.indent)), n);
827
848
  l.push({
828
849
  type: "list",
829
850
  ordered: !0,
@@ -841,7 +862,7 @@ function We(e, t, n) {
841
862
  }
842
863
  return r;
843
864
  }
844
- function Ge(e, t) {
865
+ function qe(e, t) {
845
866
  return e.map((e) => {
846
867
  if (e.type !== "list_item") return t.parseChildren([e])[0];
847
868
  let n = [];
@@ -863,7 +884,7 @@ function Ge(e, t) {
863
884
  };
864
885
  });
865
886
  }
866
- var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
887
+ var Je = "listItem", Ye = "textStyle", Xe = /^(\d+)\.\s$/, Ze = b.create({
867
888
  name: "orderedList",
868
889
  addOptions() {
869
890
  return {
@@ -896,18 +917,18 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
896
917
  let { start: t, ...n } = e;
897
918
  return t === 1 ? [
898
919
  "ol",
899
- i(this.options.HTMLAttributes, n),
920
+ a(this.options.HTMLAttributes, n),
900
921
  0
901
922
  ] : [
902
923
  "ol",
903
- i(this.options.HTMLAttributes, e),
924
+ a(this.options.HTMLAttributes, e),
904
925
  0
905
926
  ];
906
927
  },
907
928
  markdownTokenName: "list",
908
929
  parseMarkdown: (e, t) => {
909
930
  if (e.type !== "list" || !e.ordered) return [];
910
- let n = e.start || 1, r = e.items ? Ge(e.items, t) : [];
931
+ let n = e.start || 1, r = e.items ? qe(e.items, t) : [];
911
932
  return n === 1 ? {
912
933
  type: "orderedList",
913
934
  content: r
@@ -926,9 +947,9 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
926
947
  return t === void 0 ? -1 : t;
927
948
  },
928
949
  tokenize: (e, t, n) => {
929
- let r = e.split("\n"), [i, a] = Ue(r);
950
+ let r = e.split("\n"), [i, a] = Ge(r);
930
951
  if (i.length === 0) return;
931
- let o = We(i, 0, n);
952
+ let o = Ke(i, 0, n);
932
953
  if (o.length !== 0) return {
933
954
  type: "list",
934
955
  ordered: !0,
@@ -940,32 +961,32 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
940
961
  },
941
962
  markdownOptions: { indentsContent: !0 },
942
963
  addCommands() {
943
- return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ke, this.editor.getAttributes(qe)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
964
+ return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Je, this.editor.getAttributes(Ye)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
944
965
  },
945
966
  addKeyboardShortcuts() {
946
967
  return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
947
968
  },
948
969
  addInputRules() {
949
- let e = y({
950
- find: Je,
970
+ let e = g({
971
+ find: Xe,
951
972
  type: this.type,
952
973
  getAttributes: (e) => ({ start: +e[1] }),
953
974
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
954
975
  });
955
- return (this.options.keepMarks || this.options.keepAttributes) && (e = y({
956
- find: Je,
976
+ return (this.options.keepMarks || this.options.keepAttributes) && (e = g({
977
+ find: Xe,
957
978
  type: this.type,
958
979
  keepMarks: this.options.keepMarks,
959
980
  keepAttributes: this.options.keepAttributes,
960
981
  getAttributes: (e) => ({
961
982
  start: +e[1],
962
- ...this.editor.getAttributes(qe)
983
+ ...this.editor.getAttributes(Ye)
963
984
  }),
964
985
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1],
965
986
  editor: this.editor
966
987
  })), [e];
967
988
  }
968
- }), Xe = /^\s*(\[([( |x])?\])\s$/, Ze = C.create({
989
+ }), Qe = /^\s*(\[([( |x])?\])\s$/, $e = b.create({
969
990
  name: "taskItem",
970
991
  addOptions() {
971
992
  return {
@@ -999,7 +1020,7 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
999
1020
  renderHTML({ node: e, HTMLAttributes: t }) {
1000
1021
  return [
1001
1022
  "li",
1002
- i(this.options.HTMLAttributes, t, { "data-type": this.name }),
1023
+ a(this.options.HTMLAttributes, t, { "data-type": this.name }),
1003
1024
  [
1004
1025
  "label",
1005
1026
  ["input", {
@@ -1019,7 +1040,7 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1019
1040
  }
1020
1041
  return t.createNode("taskItem", { checked: e.checked || !1 }, n);
1021
1042
  },
1022
- renderMarkdown: (e, t) => ne(e, t, `- [${e.attrs?.checked ? "x" : " "}] `),
1043
+ renderMarkdown: (e, t) => y(e, t, `- [${e.attrs?.checked ? "x" : " "}] `),
1023
1044
  addKeyboardShortcuts() {
1024
1045
  let e = {
1025
1046
  Enter: () => this.editor.commands.splitListItem(this.name),
@@ -1063,7 +1084,7 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1063
1084
  update: (e) => {
1064
1085
  if (e.type !== this.type) return !1;
1065
1086
  i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, l(e);
1066
- let t = r.extensionManager.attributes, n = re(e, t), a = new Set(Object.keys(n)), o = this.options.HTMLAttributes;
1087
+ let t = r.extensionManager.attributes, n = ae(e, t), a = new Set(Object.keys(n)), o = this.options.HTMLAttributes;
1067
1088
  return u.forEach((e) => {
1068
1089
  a.has(e) || (e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e));
1069
1090
  }), Object.entries(n).forEach(([e, t]) => {
@@ -1074,13 +1095,13 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1074
1095
  };
1075
1096
  },
1076
1097
  addInputRules() {
1077
- return [y({
1078
- find: Xe,
1098
+ return [g({
1099
+ find: Qe,
1079
1100
  type: this.type,
1080
1101
  getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
1081
1102
  })];
1082
1103
  }
1083
- }), Qe = C.create({
1104
+ }), et = b.create({
1084
1105
  name: "taskList",
1085
1106
  addOptions() {
1086
1107
  return {
@@ -1101,7 +1122,7 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1101
1122
  renderHTML({ HTMLAttributes: e }) {
1102
1123
  return [
1103
1124
  "ul",
1104
- i(this.options.HTMLAttributes, e, { "data-type": this.name }),
1125
+ a(this.options.HTMLAttributes, e, { "data-type": this.name }),
1105
1126
  0
1106
1127
  ];
1107
1128
  },
@@ -1114,9 +1135,9 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1114
1135
  let t = e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;
1115
1136
  return t === void 0 ? -1 : t;
1116
1137
  },
1117
- tokenize(e, t, n) {
1118
- let r = (e) => {
1119
- let t = l(e, {
1138
+ tokenize(t, n, r) {
1139
+ let i = (t) => {
1140
+ let n = e(t, {
1120
1141
  itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
1121
1142
  extractItemData: (e) => ({
1122
1143
  indentLevel: e[1].length,
@@ -1130,17 +1151,17 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1130
1151
  indentLevel: e.indentLevel,
1131
1152
  checked: e.checked,
1132
1153
  text: e.mainContent,
1133
- tokens: n.inlineTokens(e.mainContent),
1154
+ tokens: r.inlineTokens(e.mainContent),
1134
1155
  nestedTokens: t
1135
1156
  }),
1136
- customNestedParser: r
1137
- }, n);
1138
- return t ? [{
1157
+ customNestedParser: i
1158
+ }, r);
1159
+ return n ? [{
1139
1160
  type: "taskList",
1140
- raw: t.raw,
1141
- items: t.items
1142
- }] : n.blockTokens(e);
1143
- }, i = l(e, {
1161
+ raw: n.raw,
1162
+ items: n.items
1163
+ }] : r.blockTokens(t);
1164
+ }, a = e(t, {
1144
1165
  itemPattern: /^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,
1145
1166
  extractItemData: (e) => ({
1146
1167
  indentLevel: e[1].length,
@@ -1154,15 +1175,15 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1154
1175
  indentLevel: e.indentLevel,
1155
1176
  checked: e.checked,
1156
1177
  text: e.mainContent,
1157
- tokens: n.inlineTokens(e.mainContent),
1178
+ tokens: r.inlineTokens(e.mainContent),
1158
1179
  nestedTokens: t
1159
1180
  }),
1160
- customNestedParser: r
1161
- }, n);
1162
- if (i) return {
1181
+ customNestedParser: i
1182
+ }, r);
1183
+ if (a) return {
1163
1184
  type: "taskList",
1164
- raw: i.raw,
1165
- items: i.items
1185
+ raw: a.raw,
1186
+ items: a.items
1166
1187
  };
1167
1188
  }
1168
1189
  },
@@ -1174,16 +1195,16 @@ var Ke = "listItem", qe = "textStyle", Je = /^(\d+)\.\s$/, Ye = C.create({
1174
1195
  return { "Mod-Shift-9": () => this.editor.commands.toggleTaskList() };
1175
1196
  }
1176
1197
  });
1177
- b.create({
1198
+ _.create({
1178
1199
  name: "listKit",
1179
1200
  addExtensions() {
1180
1201
  let e = [];
1181
- return this.options.bulletList !== !1 && e.push(j.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(M.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Re.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Ye.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Ze.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Qe.configure(this.options.taskList)), e;
1202
+ return this.options.bulletList !== !1 && e.push(k.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(A.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Be.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Ze.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push($e.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(et.configure(this.options.taskList)), e;
1182
1203
  }
1183
1204
  });
1184
1205
  //#endregion
1185
- //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.22.5_@tiptap+core@3.22.5_@tiptap+pm@3.22.5_/node_modules/@tiptap/extension-paragraph/dist/index.js
1186
- var z = "&nbsp;", B = "\xA0", $e = C.create({
1206
+ //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.23.4_@tiptap+core@3.23.4_@tiptap+pm@3.23.4_/node_modules/@tiptap/extension-paragraph/dist/index.js
1207
+ var z = "&nbsp;", B = "\xA0", tt = b.create({
1187
1208
  name: "paragraph",
1188
1209
  priority: 1e3,
1189
1210
  addOptions() {
@@ -1197,7 +1218,7 @@ var z = "&nbsp;", B = "\xA0", $e = C.create({
1197
1218
  renderHTML({ HTMLAttributes: e }) {
1198
1219
  return [
1199
1220
  "p",
1200
- i(this.options.HTMLAttributes, e),
1221
+ a(this.options.HTMLAttributes, e),
1201
1222
  0
1202
1223
  ];
1203
1224
  },
@@ -1222,7 +1243,7 @@ var z = "&nbsp;", B = "\xA0", $e = C.create({
1222
1243
  addKeyboardShortcuts() {
1223
1244
  return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
1224
1245
  }
1225
- }), et = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, tt = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, nt = v.create({
1246
+ }), nt = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, rt = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, it = h.create({
1226
1247
  name: "strike",
1227
1248
  addOptions() {
1228
1249
  return { HTMLAttributes: {} };
@@ -1242,7 +1263,7 @@ var z = "&nbsp;", B = "\xA0", $e = C.create({
1242
1263
  renderHTML({ HTMLAttributes: e }) {
1243
1264
  return [
1244
1265
  "s",
1245
- i(this.options.HTMLAttributes, e),
1266
+ a(this.options.HTMLAttributes, e),
1246
1267
  0
1247
1268
  ];
1248
1269
  },
@@ -1260,18 +1281,18 @@ var z = "&nbsp;", B = "\xA0", $e = C.create({
1260
1281
  return { "Mod-Shift-s": () => this.editor.commands.toggleStrike() };
1261
1282
  },
1262
1283
  addInputRules() {
1263
- return [a({
1264
- find: et,
1284
+ return [f({
1285
+ find: nt,
1265
1286
  type: this.type
1266
1287
  })];
1267
1288
  },
1268
1289
  addPasteRules() {
1269
1290
  return [p({
1270
- find: tt,
1291
+ find: rt,
1271
1292
  type: this.type
1272
1293
  })];
1273
1294
  }
1274
- }), rt = C.create({
1295
+ }), at = b.create({
1275
1296
  name: "text",
1276
1297
  group: "inline",
1277
1298
  parseMarkdown: (e) => ({
@@ -1282,12 +1303,12 @@ var z = "&nbsp;", B = "\xA0", $e = C.create({
1282
1303
  });
1283
1304
  //#endregion
1284
1305
  //#region ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
1285
- function it(e = {}) {
1286
- return new _({ view(t) {
1287
- return new at(t, e);
1306
+ function ot(e = {}) {
1307
+ return new C({ view(t) {
1308
+ return new st(t, e);
1288
1309
  } });
1289
1310
  }
1290
- var at = class {
1311
+ var st = class {
1291
1312
  constructor(e, t) {
1292
1313
  this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
1293
1314
  "dragover",
@@ -1359,11 +1380,11 @@ var at = class {
1359
1380
  let t = this.editorView.posAtCoords({
1360
1381
  left: e.clientX,
1361
1382
  top: e.clientY
1362
- }), n = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = n && n.type.spec.disableDropCursor, i = typeof r == "function" ? r(this.editorView, t, e) : r;
1363
- if (t && !i) {
1383
+ }), n = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = n && n.type.spec.disableDropCursor, a = typeof r == "function" ? r(this.editorView, t, e) : r;
1384
+ if (t && !a) {
1364
1385
  let e = t.pos;
1365
1386
  if (this.editorView.dragging && this.editorView.dragging.slice) {
1366
- let t = f(this.editorView.state.doc, e, this.editorView.dragging.slice);
1387
+ let t = i(this.editorView.state.doc, e, this.editorView.dragging.slice);
1367
1388
  t != null && (e = t);
1368
1389
  }
1369
1390
  this.setCursor(e), this.scheduleRemoval(5e3);
@@ -1378,16 +1399,16 @@ var at = class {
1378
1399
  dragleave(e) {
1379
1400
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
1380
1401
  }
1381
- }, V = class e extends u {
1402
+ }, V = class e extends t {
1382
1403
  constructor(e) {
1383
1404
  super(e, e);
1384
1405
  }
1385
- map(t, n) {
1386
- let r = t.resolve(n.map(this.head));
1387
- return e.valid(r) ? new e(r) : u.near(r);
1406
+ map(n, r) {
1407
+ let i = n.resolve(r.map(this.head));
1408
+ return e.valid(i) ? new e(i) : t.near(i);
1388
1409
  }
1389
1410
  content() {
1390
- return n.empty;
1411
+ return c.empty;
1391
1412
  }
1392
1413
  eq(t) {
1393
1414
  return t instanceof e && t.head == this.head;
@@ -1403,11 +1424,11 @@ var at = class {
1403
1424
  return new e(t.resolve(n.pos));
1404
1425
  }
1405
1426
  getBookmark() {
1406
- return new ot(this.anchor);
1427
+ return new ct(this.anchor);
1407
1428
  }
1408
1429
  static valid(e) {
1409
1430
  let t = e.parent;
1410
- if (t.inlineContent || !ct(e) || !lt(e)) return !1;
1431
+ if (t.inlineContent || !ut(e) || !dt(e)) return !1;
1411
1432
  let n = t.type.spec.allowGapCursor;
1412
1433
  if (n != null) return n;
1413
1434
  let r = t.contentMatchAt(e.index()).defaultType;
@@ -1430,7 +1451,7 @@ var at = class {
1430
1451
  for (;;) {
1431
1452
  let o = n > 0 ? a.firstChild : a.lastChild;
1432
1453
  if (!o) {
1433
- if (a.isAtom && !a.isText && !E.isSelectable(a)) {
1454
+ if (a.isAtom && !a.isText && !m.isSelectable(a)) {
1434
1455
  t = t.doc.resolve(i + a.nodeSize * n), r = !1;
1435
1456
  continue search;
1436
1457
  }
@@ -1444,8 +1465,8 @@ var at = class {
1444
1465
  }
1445
1466
  }
1446
1467
  };
1447
- V.prototype.visible = !1, V.findFrom = V.findGapCursorFrom, u.jsonID("gapcursor", V);
1448
- var ot = class e {
1468
+ V.prototype.visible = !1, V.findFrom = V.findGapCursorFrom, t.jsonID("gapcursor", V);
1469
+ var ct = class e {
1449
1470
  constructor(e) {
1450
1471
  this.pos = e;
1451
1472
  }
@@ -1453,14 +1474,14 @@ var ot = class e {
1453
1474
  return new e(t.map(this.pos));
1454
1475
  }
1455
1476
  resolve(e) {
1456
- let t = e.resolve(this.pos);
1457
- return V.valid(t) ? new V(t) : u.near(t);
1477
+ let n = e.resolve(this.pos);
1478
+ return V.valid(n) ? new V(n) : t.near(n);
1458
1479
  }
1459
1480
  };
1460
- function st(e) {
1481
+ function lt(e) {
1461
1482
  return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
1462
1483
  }
1463
- function ct(e) {
1484
+ function ut(e) {
1464
1485
  for (let t = e.depth; t >= 0; t--) {
1465
1486
  let n = e.index(t), r = e.node(t);
1466
1487
  if (n == 0) {
@@ -1468,13 +1489,13 @@ function ct(e) {
1468
1489
  continue;
1469
1490
  }
1470
1491
  for (let e = r.child(n - 1);; e = e.lastChild) {
1471
- if (e.childCount == 0 && !e.inlineContent || st(e.type)) return !0;
1492
+ if (e.childCount == 0 && !e.inlineContent || lt(e.type)) return !0;
1472
1493
  if (e.inlineContent) return !1;
1473
1494
  }
1474
1495
  }
1475
1496
  return !0;
1476
1497
  }
1477
- function lt(e) {
1498
+ function dt(e) {
1478
1499
  for (let t = e.depth; t >= 0; t--) {
1479
1500
  let n = e.indexAfter(t), r = e.node(t);
1480
1501
  if (n == r.childCount) {
@@ -1482,42 +1503,42 @@ function lt(e) {
1482
1503
  continue;
1483
1504
  }
1484
1505
  for (let e = r.child(n);; e = e.firstChild) {
1485
- if (e.childCount == 0 && !e.inlineContent || st(e.type)) return !0;
1506
+ if (e.childCount == 0 && !e.inlineContent || lt(e.type)) return !0;
1486
1507
  if (e.inlineContent) return !1;
1487
1508
  }
1488
1509
  }
1489
1510
  return !0;
1490
1511
  }
1491
- function ut() {
1492
- return new _({ props: {
1493
- decorations: mt,
1512
+ function ft() {
1513
+ return new C({ props: {
1514
+ decorations: gt,
1494
1515
  createSelectionBetween(e, t, n) {
1495
1516
  return t.pos == n.pos && V.valid(n) ? new V(n) : null;
1496
1517
  },
1497
- handleClick: ft,
1498
- handleKeyDown: dt,
1499
- handleDOMEvents: { beforeinput: pt }
1518
+ handleClick: mt,
1519
+ handleKeyDown: pt,
1520
+ handleDOMEvents: { beforeinput: ht }
1500
1521
  } });
1501
1522
  }
1502
- var dt = te({
1523
+ var pt = re({
1503
1524
  ArrowLeft: H("horiz", -1),
1504
1525
  ArrowRight: H("horiz", 1),
1505
1526
  ArrowUp: H("vert", -1),
1506
1527
  ArrowDown: H("vert", 1)
1507
1528
  });
1508
- function H(t, n) {
1509
- let r = t == "vert" ? n > 0 ? "down" : "up" : n > 0 ? "right" : "left";
1510
- return function(t, i, a) {
1511
- let o = t.selection, s = n > 0 ? o.$to : o.$from, c = o.empty;
1512
- if (o instanceof e) {
1513
- if (!a.endOfTextblock(r) || s.depth == 0) return !1;
1514
- c = !1, s = t.doc.resolve(n > 0 ? s.after() : s.before());
1529
+ function H(e, t) {
1530
+ let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
1531
+ return function(e, r, i) {
1532
+ let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
1533
+ if (a instanceof S) {
1534
+ if (!i.endOfTextblock(n) || o.depth == 0) return !1;
1535
+ s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
1515
1536
  }
1516
- let l = V.findGapCursorFrom(s, n, c);
1517
- return l ? (i && i(t.tr.setSelection(new V(l))), !0) : !1;
1537
+ let c = V.findGapCursorFrom(o, t, s);
1538
+ return c ? (r && r(e.tr.setSelection(new V(c))), !0) : !1;
1518
1539
  };
1519
1540
  }
1520
- function ft(e, t, n) {
1541
+ function mt(e, t, n) {
1521
1542
  if (!e || !e.editable) return !1;
1522
1543
  let r = e.state.doc.resolve(t);
1523
1544
  if (!V.valid(r)) return !1;
@@ -1525,21 +1546,21 @@ function ft(e, t, n) {
1525
1546
  left: n.clientX,
1526
1547
  top: n.clientY
1527
1548
  });
1528
- return i && i.inside > -1 && E.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new V(r))), !0);
1549
+ return i && i.inside > -1 && m.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new V(r))), !0);
1529
1550
  }
1530
- function pt(t, i) {
1531
- if (i.inputType != "insertCompositionText" || !(t.state.selection instanceof V)) return !1;
1532
- let { $from: a } = t.state.selection, o = a.parent.contentMatchAt(a.index()).findWrapping(t.state.schema.nodes.text);
1533
- if (!o) return !1;
1534
- let s = r.empty;
1535
- for (let e = o.length - 1; e >= 0; e--) s = r.from(o[e].createAndFill(null, s));
1536
- let c = t.state.tr.replace(a.pos, a.pos, new n(s, 0, 0));
1537
- return c.setSelection(e.near(c.doc.resolve(a.pos + 1))), t.dispatch(c), !1;
1551
+ function ht(e, t) {
1552
+ if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof V)) return !1;
1553
+ let { $from: n } = e.state.selection, i = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
1554
+ if (!i) return !1;
1555
+ let a = r.empty;
1556
+ for (let e = i.length - 1; e >= 0; e--) a = r.from(i[e].createAndFill(null, a));
1557
+ let o = e.state.tr.replace(n.pos, n.pos, new c(a, 0, 0));
1558
+ return o.setSelection(S.near(o.doc.resolve(n.pos + 1))), e.dispatch(o), !1;
1538
1559
  }
1539
- function mt(e) {
1560
+ function gt(e) {
1540
1561
  if (!(e.selection instanceof V)) return null;
1541
1562
  let t = document.createElement("div");
1542
- return t.className = "ProseMirror-gapcursor", w.create(e.doc, [h.widget(e.selection.head, t, { key: "gapcursor" })]);
1563
+ return t.className = "ProseMirror-gapcursor", w.create(e.doc, [x.widget(e.selection.head, t, { key: "gapcursor" })]);
1543
1564
  }
1544
1565
  //#endregion
1545
1566
  //#region ../../node_modules/.pnpm/rope-sequence@1.3.4/node_modules/rope-sequence/dist/index.js
@@ -1549,7 +1570,7 @@ W.prototype.append = function(e) {
1549
1570
  }, W.prototype.prepend = function(e) {
1550
1571
  return e.length ? W.from(e).append(this) : this;
1551
1572
  }, W.prototype.appendInner = function(e) {
1552
- return new gt(this, e);
1573
+ return new vt(this, e);
1553
1574
  }, W.prototype.slice = function(e, t) {
1554
1575
  return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? W.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
1555
1576
  }, W.prototype.get = function(e) {
@@ -1563,9 +1584,9 @@ W.prototype.append = function(e) {
1563
1584
  return r.push(e(t, n));
1564
1585
  }, t, n), r;
1565
1586
  }, W.from = function(e) {
1566
- return e instanceof W ? e : e && e.length ? new ht(e) : W.empty;
1587
+ return e instanceof W ? e : e && e.length ? new _t(e) : W.empty;
1567
1588
  };
1568
- var ht = /* @__PURE__ */ function(e) {
1589
+ var _t = /* @__PURE__ */ function(e) {
1569
1590
  function t(t) {
1570
1591
  e.call(this), this.values = t;
1571
1592
  }
@@ -1594,8 +1615,8 @@ var ht = /* @__PURE__ */ function(e) {
1594
1615
  return 0;
1595
1616
  }, Object.defineProperties(t.prototype, n), t;
1596
1617
  }(W);
1597
- W.empty = new ht([]);
1598
- var gt = /* @__PURE__ */ function(e) {
1618
+ W.empty = new _t([]);
1619
+ var vt = /* @__PURE__ */ function(e) {
1599
1620
  function t(t, n) {
1600
1621
  e.call(this), this.left = t, this.right = n, this.length = t.length + n.length, this.depth = Math.max(t.depth, n.depth) + 1;
1601
1622
  }
@@ -1622,7 +1643,7 @@ var gt = /* @__PURE__ */ function(e) {
1622
1643
  }, t.prototype.appendInner = function(e) {
1623
1644
  return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
1624
1645
  }, t;
1625
- }(W), _t = 500, G = class e {
1646
+ }(W), yt = 500, G = class e {
1626
1647
  constructor(e, t) {
1627
1648
  this.items = e, this.eventCount = t;
1628
1649
  }
@@ -1660,10 +1681,10 @@ var gt = /* @__PURE__ */ function(e) {
1660
1681
  (u = c && c.merge(l)) && (l = u, e ? a.pop() : s = s.slice(0, s.length - 1)), a.push(l), n &&= (o++, void 0), i || (c = l);
1661
1682
  }
1662
1683
  let l = o - r.depth;
1663
- return l > yt && (s = vt(s, l), o -= l), new e(s.append(a), o);
1684
+ return l > xt && (s = bt(s, l), o -= l), new e(s.append(a), o);
1664
1685
  }
1665
1686
  remapping(e, t) {
1666
- let n = new oe();
1687
+ let n = new d();
1667
1688
  return this.items.forEach((t, r) => {
1668
1689
  let i = t.mirrorOffset != null && r - t.mirrorOffset >= e ? n.maps.length - t.mirrorOffset : void 0;
1669
1690
  n.appendMap(t.map, i);
@@ -1692,7 +1713,7 @@ var gt = /* @__PURE__ */ function(e) {
1692
1713
  let l = [];
1693
1714
  for (let e = n; e < o; e++) l.push(new K(a.maps[e]));
1694
1715
  let u = new e(this.items.slice(0, i).append(l).append(r), s);
1695
- return u.emptyItemCount() > _t && (u = u.compress(this.items.length - r.length)), u;
1716
+ return u.emptyItemCount() > yt && (u = u.compress(this.items.length - r.length)), u;
1696
1717
  }
1697
1718
  emptyItemCount() {
1698
1719
  let e = 0;
@@ -1717,7 +1738,7 @@ var gt = /* @__PURE__ */ function(e) {
1717
1738
  }
1718
1739
  };
1719
1740
  G.empty = new G(W.empty, 0);
1720
- function vt(e, t) {
1741
+ function bt(e, t) {
1721
1742
  let n;
1722
1743
  return e.forEach((e, r) => {
1723
1744
  if (e.selection && t-- == 0) return n = r, !1;
@@ -1737,21 +1758,21 @@ var K = class e {
1737
1758
  constructor(e, t, n, r, i) {
1738
1759
  this.done = e, this.undone = t, this.prevRanges = n, this.prevTime = r, this.prevComposition = i;
1739
1760
  }
1740
- }, yt = 20;
1741
- function bt(e, t, n, r) {
1742
- let i = n.getMeta(Z), a;
1761
+ }, xt = 20;
1762
+ function St(e, t, n, r) {
1763
+ let i = n.getMeta(Q), a;
1743
1764
  if (i) return i.historyState;
1744
- n.getMeta(Tt) && (e = new q(e.done, e.undone, null, 0, -1));
1765
+ n.getMeta(Et) && (e = new q(e.done, e.undone, null, 0, -1));
1745
1766
  let o = n.getMeta("appendedTransaction");
1746
1767
  if (n.steps.length == 0) return e;
1747
- if (o && o.getMeta(Z)) return o.getMeta(Z).redo ? new q(e.done.addTransform(n, void 0, r, X(t)), e.undone, St(n.mapping.maps), e.prevTime, e.prevComposition) : new q(e.done, e.undone.addTransform(n, void 0, r, X(t)), null, e.prevTime, e.prevComposition);
1768
+ if (o && o.getMeta(Q)) return o.getMeta(Q).redo ? new q(e.done.addTransform(n, void 0, r, Z(t)), e.undone, J(n.mapping.maps), e.prevTime, e.prevComposition) : new q(e.done, e.undone.addTransform(n, void 0, r, Z(t)), null, e.prevTime, e.prevComposition);
1748
1769
  if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
1749
- let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !xt(n, e.prevRanges)), s = o ? J(e.prevRanges, n.mapping) : St(n.mapping.maps);
1750
- return new q(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, X(t)), G.empty, s, n.time, i ?? e.prevComposition);
1751
- } else if (a = n.getMeta("rebased")) return new q(e.done.rebased(n, a), e.undone.rebased(n, a), J(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
1752
- else return new q(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), J(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
1770
+ let i = n.getMeta("composition"), a = e.prevTime == 0 || !o && e.prevComposition != i && (e.prevTime < (n.time || 0) - r.newGroupDelay || !Ct(n, e.prevRanges)), s = o ? Y(e.prevRanges, n.mapping) : J(n.mapping.maps);
1771
+ return new q(e.done.addTransform(n, a ? t.selection.getBookmark() : void 0, r, Z(t)), G.empty, s, n.time, i ?? e.prevComposition);
1772
+ } else if (a = n.getMeta("rebased")) return new q(e.done.rebased(n, a), e.undone.rebased(n, a), Y(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
1773
+ else return new q(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), Y(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
1753
1774
  }
1754
- function xt(e, t) {
1775
+ function Ct(e, t) {
1755
1776
  if (!t) return !1;
1756
1777
  if (!e.docChanged) return !0;
1757
1778
  let n = !1;
@@ -1759,12 +1780,12 @@ function xt(e, t) {
1759
1780
  for (let i = 0; i < t.length; i += 2) e <= t[i + 1] && r >= t[i] && (n = !0);
1760
1781
  }), n;
1761
1782
  }
1762
- function St(e) {
1783
+ function J(e) {
1763
1784
  let t = [];
1764
1785
  for (let n = e.length - 1; n >= 0 && t.length == 0; n--) e[n].forEach((e, n, r, i) => t.push(r, i));
1765
1786
  return t;
1766
1787
  }
1767
- function J(e, t) {
1788
+ function Y(e, t) {
1768
1789
  if (!e) return null;
1769
1790
  let n = [];
1770
1791
  for (let r = 0; r < e.length; r += 2) {
@@ -1773,66 +1794,67 @@ function J(e, t) {
1773
1794
  }
1774
1795
  return n;
1775
1796
  }
1776
- function Ct(e, t, n) {
1777
- let r = X(t), i = Z.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
1797
+ function wt(e, t, n) {
1798
+ let r = Z(t), i = Q.get(t).spec.config, a = (n ? e.undone : e.done).popEvent(t, r);
1778
1799
  if (!a) return null;
1779
1800
  let o = a.selection.resolve(a.transform.doc), s = (n ? e.done : e.undone).addTransform(a.transform, t.selection.getBookmark(), i, r), c = new q(n ? s : a.remaining, n ? a.remaining : s, null, 0, -1);
1780
- return a.transform.setSelection(o).setMeta(Z, {
1801
+ return a.transform.setSelection(o).setMeta(Q, {
1781
1802
  redo: n,
1782
1803
  historyState: c
1783
1804
  });
1784
1805
  }
1785
- var Y = !1, wt = null;
1786
- function X(e) {
1806
+ var X = !1, Tt = null;
1807
+ function Z(e) {
1787
1808
  let t = e.plugins;
1788
- if (wt != t) {
1789
- Y = !1, wt = t;
1809
+ if (Tt != t) {
1810
+ X = !1, Tt = t;
1790
1811
  for (let e = 0; e < t.length; e++) if (t[e].spec.historyPreserveItems) {
1791
- Y = !0;
1812
+ X = !0;
1792
1813
  break;
1793
1814
  }
1794
1815
  }
1795
- return Y;
1816
+ return X;
1796
1817
  }
1797
- var Z = new T("history"), Tt = new T("closeHistory");
1798
- function Et(e = {}) {
1818
+ var Q = new u("history"), Et = new u("closeHistory");
1819
+ function Dt(e = {}) {
1799
1820
  return e = {
1800
1821
  depth: e.depth || 100,
1801
1822
  newGroupDelay: e.newGroupDelay || 500
1802
- }, new _({
1803
- key: Z,
1823
+ }, new C({
1824
+ key: Q,
1804
1825
  state: {
1805
1826
  init() {
1806
1827
  return new q(G.empty, G.empty, null, 0, -1);
1807
1828
  },
1808
1829
  apply(t, n, r) {
1809
- return bt(n, r, t, e);
1830
+ return St(n, r, t, e);
1810
1831
  }
1811
1832
  },
1812
1833
  config: e,
1813
1834
  props: { handleDOMEvents: { beforeinput(e, t) {
1814
- let n = t.inputType, r = n == "historyUndo" ? Q : n == "historyRedo" ? Ot : null;
1835
+ let n = t.inputType, r = n == "historyUndo" ? kt : n == "historyRedo" ? At : null;
1815
1836
  return !r || !e.editable ? !1 : (t.preventDefault(), r(e.state, e.dispatch));
1816
1837
  } } }
1817
1838
  });
1818
1839
  }
1819
- function Dt(e, t) {
1840
+ function Ot(e, t) {
1820
1841
  return (n, r) => {
1821
- let i = Z.getState(n);
1842
+ let i = Q.getState(n);
1822
1843
  if (!i || (e ? i.undone : i.done).eventCount == 0) return !1;
1823
1844
  if (r) {
1824
- let a = Ct(i, n, e);
1845
+ let a = wt(i, n, e);
1825
1846
  a && r(t ? a.scrollIntoView() : a);
1826
1847
  }
1827
1848
  return !0;
1828
1849
  };
1829
1850
  }
1830
- var Q = Dt(!1, !0), Ot = Dt(!0, !0);
1831
- b.create({
1851
+ var kt = Ot(!1, !0), At = Ot(!0, !0);
1852
+ _.create({
1832
1853
  name: "characterCount",
1833
1854
  addOptions() {
1834
1855
  return {
1835
1856
  limit: null,
1857
+ autoTrim: !0,
1836
1858
  mode: "textSize",
1837
1859
  textCounter: (e) => e.length,
1838
1860
  wordCounter: (e) => e.split(" ").filter((e) => e !== "").length
@@ -1859,18 +1881,18 @@ b.create({
1859
1881
  },
1860
1882
  addProseMirrorPlugins() {
1861
1883
  let e = !1;
1862
- return [new _({
1863
- key: new T("characterCount"),
1884
+ return [new C({
1885
+ key: new u("characterCount"),
1864
1886
  appendTransaction: (t, n, r) => {
1865
1887
  if (e) return;
1866
- let i = this.options.limit;
1867
- if (i == null || i === 0) {
1888
+ let i = this.options.limit, a = this.options.autoTrim;
1889
+ if (i == null || i === 0 || a === !1) {
1868
1890
  e = !0;
1869
1891
  return;
1870
1892
  }
1871
- let a = this.storage.characters({ node: r.doc });
1872
- if (a > i) {
1873
- let t = a - i;
1893
+ let o = this.storage.characters({ node: r.doc });
1894
+ if (o > i) {
1895
+ let t = o - i;
1874
1896
  console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);
1875
1897
  let n = r.tr.deleteRange(0, t);
1876
1898
  return e = !0, n;
@@ -1889,7 +1911,7 @@ b.create({
1889
1911
  })];
1890
1912
  }
1891
1913
  });
1892
- var kt = b.create({
1914
+ var jt = _.create({
1893
1915
  name: "dropCursor",
1894
1916
  addOptions() {
1895
1917
  return {
@@ -1899,10 +1921,10 @@ var kt = b.create({
1899
1921
  };
1900
1922
  },
1901
1923
  addProseMirrorPlugins() {
1902
- return [it(this.options)];
1924
+ return [ot(this.options)];
1903
1925
  }
1904
1926
  });
1905
- b.create({
1927
+ _.create({
1906
1928
  name: "focus",
1907
1929
  addOptions() {
1908
1930
  return {
@@ -1911,8 +1933,8 @@ b.create({
1911
1933
  };
1912
1934
  },
1913
1935
  addProseMirrorPlugins() {
1914
- return [new _({
1915
- key: new T("focus"),
1936
+ return [new C({
1937
+ key: new u("focus"),
1916
1938
  props: { decorations: ({ doc: e, selection: t }) => {
1917
1939
  let { isEditable: n, isFocused: r } = this.editor, { anchor: i } = t, a = [];
1918
1940
  if (!n || !r) return w.create(e, []);
@@ -1927,35 +1949,35 @@ b.create({
1927
1949
  return e.descendants((e, t) => {
1928
1950
  if (e.isText || !(i >= t && i <= t + e.nodeSize - 1)) return !1;
1929
1951
  if (s += 1, this.options.mode === "deepest" && o - s > 0 || this.options.mode === "shallowest" && s > 1) return this.options.mode === "deepest";
1930
- a.push(h.node(t, t + e.nodeSize, { class: this.options.className }));
1952
+ a.push(x.node(t, t + e.nodeSize, { class: this.options.className }));
1931
1953
  }), w.create(e, a);
1932
1954
  } }
1933
1955
  })];
1934
1956
  }
1935
1957
  });
1936
- var At = b.create({
1958
+ var Mt = _.create({
1937
1959
  name: "gapCursor",
1938
1960
  addProseMirrorPlugins() {
1939
- return [ut()];
1961
+ return [ft()];
1940
1962
  },
1941
1963
  extendNodeSchema(e) {
1942
- return { allowGapCursor: ee(m(e, "allowGapCursor", {
1964
+ return { allowGapCursor: ne(te(e, "allowGapCursor", {
1943
1965
  name: e.name,
1944
1966
  options: e.options,
1945
1967
  storage: e.storage
1946
1968
  })) ?? null };
1947
1969
  }
1948
- }), jt = "placeholder";
1949
- function Mt(e) {
1970
+ }), Nt = "placeholder";
1971
+ function Pt(e) {
1950
1972
  return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
1951
1973
  }
1952
- b.create({
1974
+ _.create({
1953
1975
  name: "placeholder",
1954
1976
  addOptions() {
1955
1977
  return {
1956
1978
  emptyEditorClass: "is-editor-empty",
1957
1979
  emptyNodeClass: "is-empty",
1958
- dataAttribute: jt,
1980
+ dataAttribute: Nt,
1959
1981
  placeholder: "Write something …",
1960
1982
  showOnlyWhenEditable: !0,
1961
1983
  showOnlyCurrent: !0,
@@ -1963,9 +1985,9 @@ b.create({
1963
1985
  };
1964
1986
  },
1965
1987
  addProseMirrorPlugins() {
1966
- let e = this.options.dataAttribute ? `data-${Mt(this.options.dataAttribute)}` : `data-${jt}`;
1967
- return [new _({
1968
- key: new T("placeholder"),
1988
+ let e = this.options.dataAttribute ? `data-${Pt(this.options.dataAttribute)}` : `data-${Nt}`;
1989
+ return [new C({
1990
+ key: new u("placeholder"),
1969
1991
  props: { decorations: ({ doc: t, selection: n }) => {
1970
1992
  let r = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: i } = n, a = [];
1971
1993
  if (!r) return null;
@@ -1976,7 +1998,7 @@ b.create({
1976
1998
  if ((r || !this.options.showOnlyCurrent) && c) {
1977
1999
  let i = [this.options.emptyNodeClass];
1978
2000
  o && i.push(this.options.emptyEditorClass);
1979
- let s = h.node(n, n + t.nodeSize, {
2001
+ let s = x.node(n, n + t.nodeSize, {
1980
2002
  class: i.join(" "),
1981
2003
  [e]: typeof this.options.placeholder == "function" ? this.options.placeholder({
1982
2004
  editor: this.editor,
@@ -1992,25 +2014,25 @@ b.create({
1992
2014
  } }
1993
2015
  })];
1994
2016
  }
1995
- }), b.create({
2017
+ }), _.create({
1996
2018
  name: "selection",
1997
2019
  addOptions() {
1998
2020
  return { className: "selection" };
1999
2021
  },
2000
2022
  addProseMirrorPlugins() {
2001
2023
  let { editor: e, options: t } = this;
2002
- return [new _({
2003
- key: new T("selection"),
2024
+ return [new C({
2025
+ key: new u("selection"),
2004
2026
  props: { decorations(n) {
2005
- return n.selection.empty || e.isFocused || !e.isEditable || c(n.selection) || e.view.dragging ? null : w.create(n.doc, [h.inline(n.selection.from, n.selection.to, { class: t.className })]);
2027
+ return n.selection.empty || e.isFocused || !e.isEditable || l(n.selection) || e.view.dragging ? null : w.create(n.doc, [x.inline(n.selection.from, n.selection.to, { class: t.className })]);
2006
2028
  } }
2007
2029
  })];
2008
2030
  }
2009
2031
  });
2010
- function Nt({ types: e, node: t }) {
2032
+ function Ft({ types: e, node: t }) {
2011
2033
  return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
2012
2034
  }
2013
- var Pt = b.create({
2035
+ var It = _.create({
2014
2036
  name: "trailingNode",
2015
2037
  addOptions() {
2016
2038
  return {
@@ -2019,8 +2041,8 @@ var Pt = b.create({
2019
2041
  };
2020
2042
  },
2021
2043
  addProseMirrorPlugins() {
2022
- let e = new T(this.name), t = this.options.node || this.editor.schema.topNodeType.contentMatch.defaultType?.name || "paragraph", n = Object.entries(this.editor.schema.nodes).map(([, e]) => e).filter((e) => (this.options.notAfter || []).concat(t).includes(e.name));
2023
- return [new _({
2044
+ let e = new u(this.name), t = this.options.node || this.editor.schema.topNodeType.contentMatch.defaultType?.name || "paragraph", n = Object.entries(this.editor.schema.nodes).map(([, e]) => e).filter((e) => (this.options.notAfter || []).concat(t).includes(e.name));
2045
+ return [new C({
2024
2046
  key: e,
2025
2047
  appendTransaction: (n, r, i) => {
2026
2048
  let { doc: a, tr: o, schema: s } = i, c = e.getState(i), l = a.content.size, u = s.nodes[t];
@@ -2029,7 +2051,7 @@ var Pt = b.create({
2029
2051
  state: {
2030
2052
  init: (e, t) => {
2031
2053
  let r = t.tr.doc.lastChild;
2032
- return !Nt({
2054
+ return !Ft({
2033
2055
  node: r,
2034
2056
  types: n
2035
2057
  });
@@ -2037,7 +2059,7 @@ var Pt = b.create({
2037
2059
  apply: (e, t) => {
2038
2060
  if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
2039
2061
  let r = e.doc.lastChild;
2040
- return !Nt({
2062
+ return !Ft({
2041
2063
  node: r,
2042
2064
  types: n
2043
2065
  });
@@ -2045,7 +2067,7 @@ var Pt = b.create({
2045
2067
  }
2046
2068
  })];
2047
2069
  }
2048
- }), Ft = b.create({
2070
+ }), Lt = _.create({
2049
2071
  name: "undoRedo",
2050
2072
  addOptions() {
2051
2073
  return {
@@ -2055,12 +2077,12 @@ var Pt = b.create({
2055
2077
  },
2056
2078
  addCommands() {
2057
2079
  return {
2058
- undo: () => ({ state: e, dispatch: t }) => Q(e, t),
2059
- redo: () => ({ state: e, dispatch: t }) => Ot(e, t)
2080
+ undo: () => ({ state: e, dispatch: t }) => kt(e, t),
2081
+ redo: () => ({ state: e, dispatch: t }) => At(e, t)
2060
2082
  };
2061
2083
  },
2062
2084
  addProseMirrorPlugins() {
2063
- return [Et(this.options)];
2085
+ return [Dt(this.options)];
2064
2086
  },
2065
2087
  addKeyboardShortcuts() {
2066
2088
  return {
@@ -2071,12 +2093,12 @@ var Pt = b.create({
2071
2093
  "Shift-Mod-я": () => this.editor.commands.redo()
2072
2094
  };
2073
2095
  }
2074
- }), $ = b.create({
2096
+ }), $ = _.create({
2075
2097
  name: "starterKit",
2076
2098
  addExtensions() {
2077
2099
  let e = [];
2078
- return this.options.bold !== !1 && e.push(he.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(ue.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(j.configure(this.options.bulletList)), this.options.code !== !1 && e.push(ve.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(xe.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(Se.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(kt.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(At.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(Ce.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(we.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Ft.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(Te.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(Ae.configure(this.options.italic)), this.options.listItem !== !1 && e.push(M.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Re.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(se.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Ye.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push($e.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(nt.configure(this.options.strike)), this.options.text !== !1 && e.push(rt.configure(this.options.text)), this.options.underline !== !1 && e.push(ce.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Pt.configure(this.options?.trailingNode)), e;
2100
+ return this.options.bold !== !1 && e.push(_e.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(fe.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(k.configure(this.options.bulletList)), this.options.code !== !1 && e.push(be.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(Ce.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(we.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(jt.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(Mt.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(Te.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(Ee.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Lt.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(De.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(Me.configure(this.options.italic)), this.options.listItem !== !1 && e.push(A.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(Be.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(le.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Ze.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(tt.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(it.configure(this.options.strike)), this.options.text !== !1 && e.push(at.configure(this.options.text)), this.options.underline !== !1 && e.push(ue.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(It.configure(this.options?.trailingNode)), e;
2079
2101
  }
2080
- }), It = $;
2102
+ }), Rt = $;
2081
2103
  //#endregion
2082
- export { $ as StarterKit, It as default };
2104
+ export { $ as StarterKit, Rt as default };