@templatical/editor 0.28.1 → 0.29.0

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 (161) hide show
  1. package/dist/{AiChatSidebar-mZyf81xG.js → AiChatSidebar-KeS30iRG.js} +7 -7
  2. package/dist/{AiFeatureMenu-wpL2vbbd.js → AiFeatureMenu-CCdTgCy7.js} +4 -4
  3. package/dist/{BlockIssueBadge-CavnyR3o.js → BlockIssueBadge-DQ6jBV1T.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-C4M7JT4x.js → BlockPreviewCanvas-MgXVXOG_.js} +1 -1
  5. package/dist/{CloudHeaderExtras-fH0cB-Ru.js → CloudHeaderExtras-L_b51XVJ.js} +2 -2
  6. package/dist/{CloudPanels-Davlnzfd.js → CloudPanels-XUtScYFl.js} +3 -3
  7. package/dist/{CollaboratorBar-BvQZriPA.js → CollaboratorBar-Cx5klY7H.js} +2 -2
  8. package/dist/{ColorPicker-OLSFZBBZ.js → ColorPicker-DjfecH79.js} +1 -1
  9. package/dist/{CommentsPanel-B4_63eIS.js → CommentsPanel-5QxgkKF-.js} +1 -1
  10. package/dist/{CommentsSidebar-BkBHMXez.js → CommentsSidebar-CScszOsC.js} +10 -10
  11. package/dist/{CountdownToolbar-D8FsDIfa.js → CountdownToolbar-CiBrLbq0.js} +1 -1
  12. package/dist/{DesignReferenceSidebar-Dp44REBY.js → DesignReferenceSidebar-B1__DJJI.js} +5 -5
  13. package/dist/{IssuesPanel-C1v3dmoB.js → IssuesPanel-CkuV9Fjp.js} +5 -5
  14. package/dist/{MergeTagModeToggle-CZN0Pr1o.js → MergeTagModeToggle-oX-n91fH.js} +2 -2
  15. package/dist/{MergeTagSuggestion-a7Tk8tBB.js → MergeTagSuggestion-BUozNVtA.js} +55 -39
  16. package/dist/{ParagraphEditor-CGxsm0Mx.js → ParagraphEditor-BVlMj-YW.js} +19 -19
  17. package/dist/{RestoreVersionDialog-BLW8wC1J.js → RestoreVersionDialog-CZRLWoqP.js} +3 -3
  18. package/dist/{RichTextEditorContent-COBy_Q9j.js → RichTextEditorContent-BN6RBSZG.js} +3 -3
  19. package/dist/{SaveBlockDialog-KWQaS1_q.js → SaveBlockDialog-KNQVLcUG.js} +6 -6
  20. package/dist/{SavedBlocksBrowserModal-Cg8yP_EN.js → SavedBlocksBrowserModal-D7qatvfw.js} +7 -7
  21. package/dist/{SavedBlocksPanels-bept0JjA.js → SavedBlocksPanels-bizAFdNK.js} +1 -1
  22. package/dist/{SavedBlocksPickBar-Z-YRd488.js → SavedBlocksPickBar-BXUSoa38.js} +2 -2
  23. package/dist/{TemplateScoringPanel-5zp1qOSl.js → TemplateScoringPanel-Dm83xt9R.js} +10 -10
  24. package/dist/{TestEmailModal-DtJabfkS.js → TestEmailModal-DAdO9Gmo.js} +6 -6
  25. package/dist/{TestEmailPanel-CtFxt5q7.js → TestEmailPanel-DORs6xk0.js} +1 -1
  26. package/dist/{TitleEditor-BfWPus_C.js → TitleEditor-B_aWxZER.js} +8 -8
  27. package/dist/{TplModal-DBlMd7h9.js → TplModal-7623HR5x.js} +1 -1
  28. package/dist/{VersionHistoryMenu-Cg4UKxKc.js → VersionHistoryMenu-D7lgozpw.js} +4 -4
  29. package/dist/{VersionHistoryPanels-BKjbNEOM.js → VersionHistoryPanels-Dor0p1Ur.js} +1 -1
  30. package/dist/{VersionPreviewBanner-B0thyJ8F.js → VersionPreviewBanner-CQt2il1L.js} +1 -1
  31. package/dist/{blockTypeIcons-CQMkcHo9.js → blockTypeIcons-Di4AsjQx.js} +2 -2
  32. package/dist/bundle-stats.json +6 -6
  33. package/dist/cdn/chunks/{AiChatSidebar-BQATQ3Tr.js → AiChatSidebar-Cwr9eqTh.js} +2 -2
  34. package/dist/cdn/chunks/{AiChatSidebar-BQATQ3Tr.js.map → AiChatSidebar-Cwr9eqTh.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiFeatureMenu-cNoZ0xl_.js → AiFeatureMenu-CT2QiHmi.js} +3 -3
  36. package/dist/cdn/chunks/{AiFeatureMenu-cNoZ0xl_.js.map → AiFeatureMenu-CT2QiHmi.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockIssueBadge-CH_3vFw4.js → BlockIssueBadge-CXlXn9Sm.js} +2 -2
  38. package/dist/cdn/chunks/{BlockIssueBadge-CH_3vFw4.js.map → BlockIssueBadge-CXlXn9Sm.js.map} +1 -1
  39. package/dist/cdn/chunks/{BlockPreviewCanvas-BXVC8-Zj.js → BlockPreviewCanvas-BisO3JEy.js} +2 -2
  40. package/dist/cdn/chunks/{BlockPreviewCanvas-BXVC8-Zj.js.map → BlockPreviewCanvas-BisO3JEy.js.map} +1 -1
  41. package/dist/cdn/chunks/{CloudHeaderExtras-CUAM2ADe.js → CloudHeaderExtras-MRCYqip8.js} +3 -3
  42. package/dist/cdn/chunks/{CloudHeaderExtras-CUAM2ADe.js.map → CloudHeaderExtras-MRCYqip8.js.map} +1 -1
  43. package/dist/cdn/chunks/{CloudPanels-DMnnSIkX.js → CloudPanels-Bb9qSwKJ.js} +4 -4
  44. package/dist/cdn/chunks/{CloudPanels-DMnnSIkX.js.map → CloudPanels-Bb9qSwKJ.js.map} +1 -1
  45. package/dist/cdn/chunks/{CollaboratorBar-C6sorNRi.js → CollaboratorBar-CG13kDHu.js} +3 -3
  46. package/dist/cdn/chunks/{CollaboratorBar-C6sorNRi.js.map → CollaboratorBar-CG13kDHu.js.map} +1 -1
  47. package/dist/cdn/chunks/{ColorPicker-q1V7ggWI.js → ColorPicker-UpN24AsB.js} +2 -2
  48. package/dist/cdn/chunks/{ColorPicker-q1V7ggWI.js.map → ColorPicker-UpN24AsB.js.map} +1 -1
  49. package/dist/cdn/chunks/{CommentsPanel-ExfxJZM3.js → CommentsPanel-CIcIXzOB.js} +2 -2
  50. package/dist/cdn/chunks/{CommentsPanel-ExfxJZM3.js.map → CommentsPanel-CIcIXzOB.js.map} +1 -1
  51. package/dist/cdn/chunks/{CommentsSidebar-CzALURMJ.js → CommentsSidebar-CB5Z8xNz.js} +2 -2
  52. package/dist/cdn/chunks/{CommentsSidebar-CzALURMJ.js.map → CommentsSidebar-CB5Z8xNz.js.map} +1 -1
  53. package/dist/cdn/chunks/{CountdownToolbar-CkbWSrAH.js → CountdownToolbar-B1L0IK1T.js} +2 -2
  54. package/dist/cdn/chunks/{CountdownToolbar-CkbWSrAH.js.map → CountdownToolbar-B1L0IK1T.js.map} +1 -1
  55. package/dist/cdn/chunks/{DesignReferenceSidebar-COh0Rx_A.js → DesignReferenceSidebar-BwsfOFsc.js} +2 -2
  56. package/dist/cdn/chunks/{DesignReferenceSidebar-COh0Rx_A.js.map → DesignReferenceSidebar-BwsfOFsc.js.map} +1 -1
  57. package/dist/cdn/chunks/{IssuesPanel-C1NG0xRI.js → IssuesPanel-3nTCyKgK.js} +2 -2
  58. package/dist/cdn/chunks/{IssuesPanel-C1NG0xRI.js.map → IssuesPanel-3nTCyKgK.js.map} +1 -1
  59. package/dist/cdn/chunks/{MergeTagModeToggle-B1yXCp3D.js → MergeTagModeToggle-BUNsRKs6.js} +2 -2
  60. package/dist/cdn/chunks/{MergeTagModeToggle-B1yXCp3D.js.map → MergeTagModeToggle-BUNsRKs6.js.map} +1 -1
  61. package/dist/cdn/chunks/{MergeTagSuggestion-DqYR3jPA.js → MergeTagSuggestion-Dt6I8bZi.js} +2 -2
  62. package/dist/cdn/chunks/{MergeTagSuggestion-DqYR3jPA.js.map → MergeTagSuggestion-Dt6I8bZi.js.map} +1 -1
  63. package/dist/cdn/chunks/{ParagraphEditor-DPM1hUKo.js → ParagraphEditor-BtzkHfv2.js} +17 -17
  64. package/dist/cdn/chunks/{ParagraphEditor-DPM1hUKo.js.map → ParagraphEditor-BtzkHfv2.js.map} +1 -1
  65. package/dist/cdn/chunks/{RestoreVersionDialog-Dz0bX5ZZ.js → RestoreVersionDialog-DNoo-EBT.js} +3 -3
  66. package/dist/cdn/chunks/{RestoreVersionDialog-Dz0bX5ZZ.js.map → RestoreVersionDialog-DNoo-EBT.js.map} +1 -1
  67. package/dist/cdn/chunks/{RichTextEditorContent-nkyIRAyN.js → RichTextEditorContent-BQATmyd9.js} +3 -3
  68. package/dist/cdn/chunks/{RichTextEditorContent-nkyIRAyN.js.map → RichTextEditorContent-BQATmyd9.js.map} +1 -1
  69. package/dist/cdn/chunks/{SaveBlockDialog-DYr5yKqy.js → SaveBlockDialog-DB37Vmqt.js} +5 -5
  70. package/dist/cdn/chunks/{SaveBlockDialog-DYr5yKqy.js.map → SaveBlockDialog-DB37Vmqt.js.map} +1 -1
  71. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BUJjcHkw.js → SavedBlocksBrowserModal-CTU2rGWQ.js} +6 -6
  72. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BUJjcHkw.js.map → SavedBlocksBrowserModal-CTU2rGWQ.js.map} +1 -1
  73. package/dist/cdn/chunks/{SavedBlocksPanels-DFgvmsbj.js → SavedBlocksPanels-B9h9wI6d.js} +2 -2
  74. package/dist/cdn/chunks/{SavedBlocksPanels-DFgvmsbj.js.map → SavedBlocksPanels-B9h9wI6d.js.map} +1 -1
  75. package/dist/cdn/chunks/{SavedBlocksPickBar-Brg8US_n.js → SavedBlocksPickBar-CTY5WZum.js} +3 -3
  76. package/dist/cdn/chunks/{SavedBlocksPickBar-Brg8US_n.js.map → SavedBlocksPickBar-CTY5WZum.js.map} +1 -1
  77. package/dist/cdn/chunks/{TemplateScoringPanel-DO86BvdQ.js → TemplateScoringPanel-DZ0cpe_D.js} +7 -7
  78. package/dist/cdn/chunks/{TemplateScoringPanel-DO86BvdQ.js.map → TemplateScoringPanel-DZ0cpe_D.js.map} +1 -1
  79. package/dist/cdn/chunks/{TestEmailModal-DRCcdGvX.js → TestEmailModal-Dqx1RyDE.js} +6 -6
  80. package/dist/cdn/chunks/{TestEmailModal-DRCcdGvX.js.map → TestEmailModal-Dqx1RyDE.js.map} +1 -1
  81. package/dist/cdn/chunks/{TestEmailPanel-BZU5HX2c.js → TestEmailPanel-DrcQhnON.js} +2 -2
  82. package/dist/cdn/chunks/{TestEmailPanel-BZU5HX2c.js.map → TestEmailPanel-DrcQhnON.js.map} +1 -1
  83. package/dist/cdn/chunks/{TitleEditor-CLkXt5RZ.js → TitleEditor-CSeDvWVn.js} +8 -8
  84. package/dist/cdn/chunks/{TitleEditor-CLkXt5RZ.js.map → TitleEditor-CSeDvWVn.js.map} +1 -1
  85. package/dist/cdn/chunks/{TplModal-BhfPoZ_W.js → TplModal-BNBLwBxJ.js} +2 -2
  86. package/dist/cdn/chunks/{TplModal-BhfPoZ_W.js.map → TplModal-BNBLwBxJ.js.map} +1 -1
  87. package/dist/cdn/chunks/{VersionHistoryMenu-_DyRYBRP.js → VersionHistoryMenu-cZlb0sMi.js} +2 -2
  88. package/dist/cdn/chunks/{VersionHistoryMenu-_DyRYBRP.js.map → VersionHistoryMenu-cZlb0sMi.js.map} +1 -1
  89. package/dist/cdn/chunks/{VersionHistoryPanels-DGfOOcKV.js → VersionHistoryPanels-DgrjTK3z.js} +2 -2
  90. package/dist/cdn/chunks/{VersionHistoryPanels-DGfOOcKV.js.map → VersionHistoryPanels-DgrjTK3z.js.map} +1 -1
  91. package/dist/cdn/chunks/{VersionPreviewBanner-FbBmgknN.js → VersionPreviewBanner-BNq7PRun.js} +2 -2
  92. package/dist/cdn/chunks/{VersionPreviewBanner-FbBmgknN.js.map → VersionPreviewBanner-BNq7PRun.js.map} +1 -1
  93. package/dist/cdn/chunks/{blockTypeIcons-o4ammRlm.js → blockTypeIcons-BNGmmzB_.js} +2 -2
  94. package/dist/cdn/chunks/{blockTypeIcons-o4ammRlm.js.map → blockTypeIcons-BNGmmzB_.js.map} +1 -1
  95. package/dist/cdn/chunks/createCloudRuntime-B_HRgFxU.js +443 -0
  96. package/dist/cdn/chunks/createCloudRuntime-B_HRgFxU.js.map +1 -0
  97. package/dist/cdn/chunks/en-BZlZVGwM.js +2 -0
  98. package/dist/cdn/chunks/{extensions-qSqWdFko.js → extensions-Deqilwp8.js} +3 -3
  99. package/dist/cdn/chunks/{extensions-qSqWdFko.js.map → extensions-Deqilwp8.js.map} +1 -1
  100. package/dist/cdn/chunks/{icons-MeYdeH4P.js → icons-C2kP4vOJ.js} +17 -17
  101. package/dist/cdn/chunks/{icons-MeYdeH4P.js.map → icons-C2kP4vOJ.js.map} +1 -1
  102. package/dist/cdn/chunks/{src-2QDLdUyx.js → src-CgIXdQlX.js} +3 -3
  103. package/dist/cdn/chunks/{src-2QDLdUyx.js.map → src-CgIXdQlX.js.map} +1 -1
  104. package/dist/cdn/chunks/{src-BxHH_6Yr.js → src-CnQgwcsc.js} +2 -2
  105. package/dist/cdn/chunks/{src-BxHH_6Yr.js.map → src-CnQgwcsc.js.map} +1 -1
  106. package/dist/cdn/chunks/{tiptap-DgH_wKK_.js → tiptap-DOw5Yb4H.js} +3276 -3229
  107. package/dist/cdn/chunks/tiptap-DOw5Yb4H.js.map +1 -0
  108. package/dist/cdn/chunks/{useEditorCore-2ZVOY0Rh.js → useEditorCore-Dq5gdn5i.js} +435 -411
  109. package/dist/cdn/chunks/useEditorCore-Dq5gdn5i.js.map +1 -0
  110. package/dist/cdn/editor.css +1 -1
  111. package/dist/cdn/editor.js +1360 -1353
  112. package/dist/cdn/editor.js.map +1 -1
  113. package/dist/{check-CLfibuQc.js → check-Cv96tY88.js} +1 -1
  114. package/dist/{chevron-down-DamTR8ta.js → chevron-down-BwEyjSjd.js} +1 -1
  115. package/dist/{chevron-up-CrV_Ksg-.js → chevron-up-C6Ye-Nzc.js} +1 -1
  116. package/dist/{circle-alert-BLy-e34e.js → circle-alert-BLt_gkcU.js} +1 -1
  117. package/dist/{clock-DQI6aaFT.js → clock-D-2BI0Co.js} +1 -1
  118. package/dist/createCloudRuntime-CWPQ7puE.js +441 -0
  119. package/dist/{createLucideIcon-Cbl3Ma_H.js → createLucideIcon-DGRWivCX.js} +2 -2
  120. package/dist/{dist-CgXIMxZc.js → dist-BG2cHdqw.js} +2 -2
  121. package/dist/{dist-CclsUQ7r.js → dist-BIFUEhwQ.js} +2 -2
  122. package/dist/{dist-DUn6jY0n.js → dist-BUh4MT4D.js} +2111 -2086
  123. package/dist/{dist-7Lr_A7Va.js → dist-BpHkLruF.js} +5 -4
  124. package/dist/{dist-C145btxT.js → dist-BtPhkQ2u.js} +154 -162
  125. package/dist/{dist-CQQNoHxz.js → dist-Btz6cFCI.js} +4 -4
  126. package/dist/dist-CCfNhI54.js +5 -0
  127. package/dist/{dist-D4Jb08yv.js → dist-CHp21juN.js} +2 -2
  128. package/dist/dist-CMcNDUcw.js +5 -0
  129. package/dist/{dist-CLc1cpN2.js → dist-DAR13YWM.js} +6 -5
  130. package/dist/{dist-Dx-KOuOj.js → dist-DQ_4a0hb.js} +2 -2
  131. package/dist/{dist-Dz7KUOSg.js → dist-q3Puexqv.js} +2 -2
  132. package/dist/{extensions-PJK0gLCL.js → extensions-BlYe3NFn.js} +3 -3
  133. package/dist/{image-up-BVOMy_Fs.js → image-up-KRq0lcdU.js} +1 -1
  134. package/dist/index.d.ts +146 -117
  135. package/dist/{info-BKMKasyT.js → info-DbmE2JAo.js} +1 -1
  136. package/dist/{loader-circle-CSGh8n8A.js → loader-circle-dSap9DfQ.js} +1 -1
  137. package/dist/{message-circle-C6q2Fm_W.js → message-circle-qSKKLbac.js} +1 -1
  138. package/dist/{pencil-DaTN0HKw.js → pencil-DMP8vL2F.js} +1 -1
  139. package/dist/{refresh-cw-Cu4wRQwT.js → refresh-cw-WXtBeMva.js} +1 -1
  140. package/dist/{scan-line-O_o657Gv.js → scan-line-BTrngVuN.js} +1 -1
  141. package/dist/{send-GS3soauT.js → send-CLa8Cxmh.js} +1 -1
  142. package/dist/{shield-check-B2TzT3Wp.js → shield-check-42WZrKQu.js} +1 -1
  143. package/dist/{sparkles-CNENcXZl.js → sparkles-DcOb0umz.js} +1 -1
  144. package/dist/style.css +1 -1
  145. package/dist/templatical-editor.js +723 -716
  146. package/dist/{text-align-start-D0-k8RUf.js → text-align-start-zoZhXJ2T.js} +1 -1
  147. package/dist/{trash-2-BE-qGIpG.js → trash-2-Capv4cSE.js} +1 -1
  148. package/dist/{triangle-alert-DNM2_dyh.js → triangle-alert-CnJUGX-6.js} +1 -1
  149. package/dist/{upload-Cv2Jx-yM.js → upload-Bc0ZTywl.js} +1 -1
  150. package/dist/{useEditorCore-DM8vzMZQ.js → useEditorCore-CIjO_NM9.js} +1094 -1072
  151. package/dist/{useScrollToBlock-C2LYXENK.js → useScrollToBlock-C2-9xCr7.js} +1 -1
  152. package/dist/{x-DUPrT6Aa.js → x-CvPZ3OAd.js} +1 -1
  153. package/package.json +22 -22
  154. package/dist/cdn/chunks/createCloudRuntime-C-u7oIGa.js +0 -344
  155. package/dist/cdn/chunks/createCloudRuntime-C-u7oIGa.js.map +0 -1
  156. package/dist/cdn/chunks/en-C6FKrw69.js +0 -2
  157. package/dist/cdn/chunks/tiptap-DgH_wKK_.js.map +0 -1
  158. package/dist/cdn/chunks/useEditorCore-2ZVOY0Rh.js.map +0 -1
  159. package/dist/createCloudRuntime-BrgMP9gS.js +0 -342
  160. package/dist/dist-D-ulkdvF.js +0 -5
  161. package/dist/dist-Kf9u4ULN.js +0 -5
@@ -1,23 +1,47 @@
1
- import { Bn as e, Bt as t, Cn as n, Dn as r, Gn as i, Hn as a, Ht as o, Jn as s, Kn as c, Ln as l, Mt as u, T as d, Un as f, Vn as p, Vt as m, Wn as h, Xn as g, Yn as _, Zn as v, f as y, fn as b, ft as ee, gn as x, it as te, jt as ne, m as S, mt as re, nt as ie, pn as C, pt as ae, qn as w, s as T, ut as oe, w as se, yn as ce, zn as E } from "./dist-DUn6jY0n.js";
2
- import { Link as le } from "./dist-CQQNoHxz.js";
3
- import { Underline as ue } from "./dist-Dx-KOuOj.js";
4
- //#region ../../node_modules/.pnpm/@tiptap+core@3.30.2_@tiptap+pm@3.30.2/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
5
- function de(e, t, n) {
1
+ import { Bn as e, Bt as t, Cn as n, Dn as r, Gn as i, Hn as a, Ht as o, Jn as s, Kn as c, Ln as l, Mt as u, T as d, Un as f, Vn as p, Vt as m, Wn as h, Xn as g, Yn as _, Zn as v, f as y, fn as b, ft as ee, gn as x, it as te, jt as ne, m as S, mt as re, nt as ie, pn as C, pt as ae, qn as w, s as T, ut as oe, w as se, yn as ce, zn as E } from "./dist-BUh4MT4D.js";
2
+ import { Link as le } from "./dist-Btz6cFCI.js";
3
+ import { Underline as ue } from "./dist-DQ_4a0hb.js";
4
+ //#region ../../node_modules/.pnpm/@tiptap+core@3.30.3_@tiptap+pm@3.30.3/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
5
+ var de = /* @__PURE__ */ new WeakSet(), fe = /* @__PURE__ */ new WeakSet();
6
+ function D(e) {
7
+ let t = e;
8
+ return de.add(t), t;
9
+ }
10
+ function O(e) {
11
+ return Array.isArray(e) && de.has(e);
12
+ }
13
+ function pe(e) {
14
+ return e.flatMap((e) => e == null ? [] : Array.isArray(e) && fe.has(e) && !O(e) ? pe(e) : [e]);
15
+ }
16
+ function me(e, t) {
6
17
  if (e === "slot") return 0;
7
- if (e instanceof Function) return e(t);
8
- let { children: r, ...i } = t ?? {};
18
+ if (e instanceof Function) {
19
+ let n = e(t);
20
+ return Array.isArray(n) && !O(n) && !fe.has(n) ? D(n) : n;
21
+ }
22
+ let { children: n, ...r } = t ?? {};
9
23
  if (e === "svg") throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
10
- return n && Array.isArray(r) ? [
11
- e,
12
- i,
13
- ...r
14
- ] : [
24
+ if (Array.isArray(n)) {
25
+ if (O(n)) return D([
26
+ e,
27
+ r,
28
+ n
29
+ ]);
30
+ if (n.length === 0) return D([e, r]);
31
+ let t = pe(n);
32
+ return t.length === 0 ? D([e, r]) : D([
33
+ e,
34
+ r,
35
+ ...t
36
+ ]);
37
+ }
38
+ return D(n == null ? [e, r] : [
15
39
  e,
16
- i,
17
- r
18
- ];
40
+ r,
41
+ n
42
+ ]);
19
43
  }
20
- var D = (e, t) => de(e, t, !1), fe = (e, t) => {
44
+ var k = (e, t) => me(e, t), he = (e, t) => {
21
45
  let { state: n } = e, { selection: r } = n;
22
46
  if (!r.empty) return !1;
23
47
  let { $from: i } = r;
@@ -35,7 +59,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
35
59
  let n = i.parent.content, r = new v(n, 0, 0);
36
60
  return e.replace(l, i.after(), r), e.setSelection(w.create(e.doc, l + n.size)), e.scrollIntoView(), t(e), !0;
37
61
  });
38
- }, pe = /^\s*>\s$/, me = S.create({
62
+ }, ge = /^\s*>\s$/, _e = S.create({
39
63
  name: "blockquote",
40
64
  addOptions() {
41
65
  return { HTMLAttributes: {} };
@@ -47,9 +71,9 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
47
71
  return [{ tag: "blockquote" }];
48
72
  },
49
73
  renderHTML({ HTMLAttributes: e }) {
50
- return /* @__PURE__ */ D("blockquote", {
74
+ return /* @__PURE__ */ k("blockquote", {
51
75
  ...x(this.options.HTMLAttributes, e),
52
- children: /* @__PURE__ */ D("slot", {})
76
+ children: /* @__PURE__ */ k("slot", {})
53
77
  });
54
78
  },
55
79
  parseMarkdown: (e, t) => {
@@ -74,16 +98,16 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
74
98
  addKeyboardShortcuts() {
75
99
  return {
76
100
  "Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
77
- Backspace: () => fe(this.editor, this.type)
101
+ Backspace: () => he(this.editor, this.type)
78
102
  };
79
103
  },
80
104
  addInputRules() {
81
105
  return [E({
82
- find: pe,
106
+ find: ge,
83
107
  type: this.type
84
108
  })];
85
109
  }
86
- }), he = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, ge = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, _e = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, ve = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, ye = y.create({
110
+ }), ve = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, ye = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, be = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, xe = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Se = y.create({
87
111
  name: "bold",
88
112
  addOptions() {
89
113
  return { HTMLAttributes: {} };
@@ -106,9 +130,9 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
106
130
  ];
107
131
  },
108
132
  renderHTML({ HTMLAttributes: e }) {
109
- return /* @__PURE__ */ D("strong", {
133
+ return /* @__PURE__ */ k("strong", {
110
134
  ...x(this.options.HTMLAttributes, e),
111
- children: /* @__PURE__ */ D("slot", {})
135
+ children: /* @__PURE__ */ k("slot", {})
112
136
  });
113
137
  },
114
138
  markdownTokenName: "strong",
@@ -133,30 +157,30 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
133
157
  },
134
158
  addInputRules() {
135
159
  return [b({
136
- find: he,
160
+ find: ve,
137
161
  type: this.type
138
162
  }), b({
139
- find: _e,
163
+ find: be,
140
164
  type: this.type
141
165
  })];
142
166
  },
143
167
  addPasteRules() {
144
168
  return [C({
145
- find: ge,
169
+ find: ye,
146
170
  type: this.type
147
171
  }), C({
148
- find: ve,
172
+ find: xe,
149
173
  type: this.type
150
174
  })];
151
175
  }
152
- }), be = (e) => {
176
+ }), Ce = (e) => {
153
177
  let t = /`([^`]+)`(?!`)$/.exec(e);
154
178
  return !t || t.index > 0 && e[t.index - 1] === "`" ? null : {
155
179
  index: t.index,
156
180
  text: t[0],
157
181
  replaceWith: t[1]
158
182
  };
159
- }, xe = (e) => {
183
+ }, we = (e) => {
160
184
  let t = /`([^`]+)`(?!`)/g, n = [], r;
161
185
  for (; (r = t.exec(e)) !== null;) r.index > 0 && e[r.index - 1] === "`" || n.push({
162
186
  index: r.index,
@@ -164,7 +188,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
164
188
  replaceWith: r[1]
165
189
  });
166
190
  return n;
167
- }, Se = y.create({
191
+ }, Te = y.create({
168
192
  name: "code",
169
193
  addOptions() {
170
194
  return { HTMLAttributes: {} };
@@ -200,17 +224,17 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
200
224
  },
201
225
  addInputRules() {
202
226
  return [b({
203
- find: be,
227
+ find: Ce,
204
228
  type: this.type
205
229
  })];
206
230
  },
207
231
  addPasteRules() {
208
232
  return [C({
209
- find: xe,
233
+ find: we,
210
234
  type: this.type
211
235
  })];
212
236
  }
213
- }), O = 4, Ce = /^```([a-z]+)?[\s\n]$/, we = /^~~~([a-z]+)?[\s\n]$/, Te = S.create({
237
+ }), A = 4, Ee = /^```([a-z]+)?[\s\n]$/, De = /^~~~([a-z]+)?[\s\n]$/, Oe = S.create({
214
238
  name: "codeBlock",
215
239
  addOptions() {
216
240
  return {
@@ -220,7 +244,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
220
244
  exitOnArrowUp: !0,
221
245
  defaultLanguage: null,
222
246
  enableTabIndentation: !1,
223
- tabSize: O,
247
+ tabSize: A,
224
248
  HTMLAttributes: {}
225
249
  };
226
250
  },
@@ -264,9 +288,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
264
288
  `\`\`\`${r}`,
265
289
  t.renderChildren(e.content),
266
290
  "```"
267
- ].join("\n") : `\`\`\`${r}
268
-
269
- \`\`\``, n;
291
+ ].join("\n") : `\`\`\`${r}\n\n\`\`\``, n;
270
292
  },
271
293
  addCommands() {
272
294
  return {
@@ -283,7 +305,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
283
305
  },
284
306
  Tab: ({ editor: e }) => {
285
307
  if (!this.options.enableTabIndentation) return !1;
286
- let t = this.options.tabSize ?? O, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
308
+ let t = this.options.tabSize ?? A, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
287
309
  if (i.parent.type !== this.type) return !1;
288
310
  let o = " ".repeat(t);
289
311
  return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
@@ -293,7 +315,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
293
315
  },
294
316
  "Shift-Tab": ({ editor: e }) => {
295
317
  if (!this.options.enableTabIndentation) return !1;
296
- let t = this.options.tabSize ?? O, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
318
+ let t = this.options.tabSize ?? A, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
297
319
  return i.parent.type === this.type ? a ? e.commands.command(({ tr: e }) => {
298
320
  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;
299
321
  for (let e = 0; e < s.length; e += 1) {
@@ -341,11 +363,11 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
341
363
  },
342
364
  addInputRules() {
343
365
  return [l({
344
- find: Ce,
366
+ find: Ee,
345
367
  type: this.type,
346
368
  getAttributes: (e) => ({ language: e[1] })
347
369
  }), l({
348
- find: we,
370
+ find: De,
349
371
  type: this.type,
350
372
  getAttributes: (e) => ({ language: e[1] })
351
373
  })];
@@ -362,12 +384,12 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
362
384
  } }
363
385
  })];
364
386
  }
365
- }), Ee = S.create({
387
+ }), ke = S.create({
366
388
  name: "doc",
367
389
  topNode: !0,
368
390
  content: "block+",
369
391
  renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
370
- }), De = S.create({
392
+ }), Ae = S.create({
371
393
  name: "hardBreak",
372
394
  markdownTokenName: "br",
373
395
  addOptions() {
@@ -411,7 +433,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
411
433
  "Shift-Enter": () => this.editor.commands.setHardBreak()
412
434
  };
413
435
  }
414
- }), Oe = S.create({
436
+ }), je = S.create({
415
437
  name: "heading",
416
438
  addOptions() {
417
439
  return {
@@ -472,7 +494,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
472
494
  getAttributes: { level: e }
473
495
  }));
474
496
  }
475
- }), ke = S.create({
497
+ }), Me = S.create({
476
498
  name: "horizontalRule",
477
499
  addOptions() {
478
500
  return {
@@ -514,7 +536,7 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
514
536
  type: this.type
515
537
  })];
516
538
  }
517
- }), Ae = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, je = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Me = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Ne = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Pe = y.create({
539
+ }), Ne = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Pe = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Fe = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Ie = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Le = y.create({
518
540
  name: "italic",
519
541
  addOptions() {
520
542
  return { HTMLAttributes: {} };
@@ -562,28 +584,23 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
562
584
  },
563
585
  addInputRules() {
564
586
  return [b({
565
- find: Ae,
587
+ find: Ne,
566
588
  type: this.type
567
589
  }), b({
568
- find: Me,
590
+ find: Fe,
569
591
  type: this.type
570
592
  })];
571
593
  },
572
594
  addPasteRules() {
573
595
  return [C({
574
- find: je,
596
+ find: Pe,
575
597
  type: this.type
576
598
  }), C({
577
- find: Ne,
599
+ find: Ie,
578
600
  type: this.type
579
601
  })];
580
602
  }
581
- }), Fe = Object.defineProperty, Ie = (e, t) => {
582
- for (var n in t) Fe(e, n, {
583
- get: t[n],
584
- enumerable: !0
585
- });
586
- }, Le = "listItem", Re = "textStyle", ze = /^\s*([-+*])\s$/, Be = S.create({
603
+ }), Re = "listItem", ze = "textStyle", Be = /^\s*([-+*])\s$/, Ve = S.create({
587
604
  name: "bulletList",
588
605
  addOptions() {
589
606
  return {
@@ -615,26 +632,26 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
615
632
  renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
616
633
  markdownOptions: { indentsContent: !0 },
617
634
  addCommands() {
618
- return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Le, this.editor.getAttributes(Re)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
635
+ return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Re, this.editor.getAttributes(ze)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
619
636
  },
620
637
  addKeyboardShortcuts() {
621
638
  return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
622
639
  },
623
640
  addInputRules() {
624
641
  let e = E({
625
- find: ze,
642
+ find: Be,
626
643
  type: this.type
627
644
  });
628
645
  return (this.options.keepMarks || this.options.keepAttributes) && (e = E({
629
- find: ze,
646
+ find: Be,
630
647
  type: this.type,
631
648
  keepMarks: this.options.keepMarks,
632
649
  keepAttributes: this.options.keepAttributes,
633
- getAttributes: () => this.editor.getAttributes(Re),
650
+ getAttributes: () => this.editor.getAttributes(ze),
634
651
  editor: this.editor
635
652
  })), [e];
636
653
  }
637
- }), Ve = (e, t, n) => {
654
+ }), He = (e, t, n) => {
638
655
  let { selection: r } = e;
639
656
  if (!r.empty) return null;
640
657
  let { $from: i } = r;
@@ -665,24 +682,24 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
665
682
  insertPos: i.after(a),
666
683
  items: f
667
684
  };
668
- }, He = (e, t, n, r) => {
669
- let i = Ve(e, n, r);
685
+ }, Ue = (e, t, n, r) => {
686
+ let i = He(e, n, r);
670
687
  if (!i) return !1;
671
688
  let { selection: a } = e, { nestedList: o, nestedListPos: s, insertPos: c, items: l } = i, u = e.tr;
672
689
  u.delete(s, s + o.nodeSize);
673
690
  let d = u.mapping.map(c);
674
691
  return u.insert(d, g.from(l)), u.setSelection(a.map(u.doc, u.mapping)), t && t(u), !0;
675
- }, Ue = (e, t, n) => He(e.state, e.view.dispatch, t, n), We = (e, t) => T.create({
692
+ }, We = (e, t, n) => Ue(e.state, e.view.dispatch, t, n), Ge = (e, t) => T.create({
676
693
  name: `${e}BranchingDeleteKeymap`,
677
694
  priority: 101,
678
695
  addKeyboardShortcuts() {
679
- let n = () => Ue(this.editor, e, t);
696
+ let n = () => We(this.editor, e, t);
680
697
  return {
681
698
  Delete: n,
682
699
  "Mod-Delete": n
683
700
  };
684
701
  }
685
- }), Ge = [
702
+ }), Ke = [
686
703
  [1e3, "m"],
687
704
  [900, "cm"],
688
705
  [500, "d"],
@@ -696,20 +713,20 @@ var D = (e, t) => de(e, t, !1), fe = (e, t) => {
696
713
  [5, "v"],
697
714
  [4, "iv"],
698
715
  [1, "i"]
699
- ], k = "abcdefghijklmnopqrstuvwxyz", Ke = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
700
- function A(e) {
716
+ ], j = "abcdefghijklmnopqrstuvwxyz", qe = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
717
+ function M(e) {
701
718
  let t = e, n = "";
702
- for (let [e, r] of Ge) for (; t >= e;) n += r, t -= e;
719
+ for (let [e, r] of Ke) for (; t >= e;) n += r, t -= e;
703
720
  return n;
704
721
  }
705
- function qe(e) {
706
- return A(e).toUpperCase();
707
- }
708
722
  function Je(e) {
723
+ return M(e).toUpperCase();
724
+ }
725
+ function Ye(e) {
709
726
  let t = e.toLowerCase(), n = 0, r = 0;
710
727
  for (; n < t.length;) {
711
728
  let e = !1;
712
- for (let [i, a] of Ge) if (t.startsWith(a, n)) {
729
+ for (let [i, a] of Ke) if (t.startsWith(a, n)) {
713
730
  r += i, n += a.length, e = !0;
714
731
  break;
715
732
  }
@@ -717,12 +734,12 @@ function Je(e) {
717
734
  }
718
735
  return r;
719
736
  }
720
- function Ye(e) {
737
+ function Xe(e) {
721
738
  if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
722
- let t = Je(e);
723
- return t <= 0 ? !1 : (e === e.toLowerCase() ? A(t) : qe(t)) === e;
739
+ let t = Ye(e);
740
+ return t <= 0 ? !1 : (e === e.toLowerCase() ? M(t) : Je(t)) === e;
724
741
  }
725
- function Xe(e) {
742
+ function Ze(e) {
726
743
  let t = e.toLowerCase();
727
744
  if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
728
745
  if (t.length === 2) {
@@ -731,24 +748,24 @@ function Xe(e) {
731
748
  }
732
749
  return 0;
733
750
  }
734
- function j(e) {
735
- if (e <= 26) return k[e - 1];
751
+ function N(e) {
752
+ if (e <= 26) return j[e - 1];
736
753
  let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
737
- return t < 0 ? k[n] : k[t] + k[n];
754
+ return t < 0 ? j[n] : j[t] + j[n];
738
755
  }
739
- function M(e) {
756
+ function P(e) {
740
757
  if (!(!e || /^\d+$/.test(e))) {
741
- if (Ye(e)) return e === e.toLowerCase() ? "i" : "I";
758
+ if (Xe(e)) return e === e.toLowerCase() ? "i" : "I";
742
759
  if (/^[a-z]{1,2}$/.test(e)) return "a";
743
760
  if (/^[A-Z]{1,2}$/.test(e)) return "A";
744
761
  }
745
762
  }
746
- function Ze(e) {
763
+ function F(e) {
747
764
  if (/^\d+$/.test(e)) return parseInt(e, 10);
748
- let t = M(e);
749
- if (t === "i" || t === "I") return Je(e);
765
+ let t = P(e);
766
+ if (t === "i" || t === "I") return Ye(e);
750
767
  if (t === "a" || t === "A") {
751
- let t = Xe(e);
768
+ let t = Ze(e);
752
769
  return t > 0 ? t : 1;
753
770
  }
754
771
  let n = parseInt(e, 10);
@@ -757,16 +774,16 @@ function Ze(e) {
757
774
  function Qe(e, t) {
758
775
  if (e === "numeric") return String(t);
759
776
  switch (e) {
760
- case "a": return j(t);
761
- case "A": return j(t).toUpperCase();
762
- case "i": return A(t);
763
- case "I": return qe(t);
777
+ case "a": return N(t);
778
+ case "A": return N(t).toUpperCase();
779
+ case "i": return M(t);
780
+ case "I": return Je(t);
764
781
  default: return String(t);
765
782
  }
766
783
  }
767
784
  function $e(e) {
768
785
  if (e.length === 0) return !1;
769
- let t = M(e[0]) ?? "numeric", n = Ze(e[0]);
786
+ let t = P(e[0]) ?? "numeric", n = F(e[0]);
770
787
  if (n < 1) return !1;
771
788
  for (let r = 0; r < e.length; r++) {
772
789
  let i = Qe(t, n + r);
@@ -776,8 +793,8 @@ function $e(e) {
776
793
  }
777
794
  function et(e) {
778
795
  return {
779
- type: M(e),
780
- start: Ze(e)
796
+ type: P(e),
797
+ start: F(e)
781
798
  };
782
799
  }
783
800
  function tt(e) {
@@ -788,10 +805,10 @@ function nt(e, t, n = ". ") {
788
805
  let r = t + 1;
789
806
  if (!e || e === "1") return `${r}${n}`;
790
807
  switch (e) {
791
- case "a": return `${j(r)}${n}`;
792
- case "A": return `${j(r).toUpperCase()}${n}`;
793
- case "i": return `${A(r)}${n}`;
794
- case "I": return `${qe(r)}${n}`;
808
+ case "a": return `${N(r)}${n}`;
809
+ case "A": return `${N(r).toUpperCase()}${n}`;
810
+ case "i": return `${M(r)}${n}`;
811
+ case "I": return `${Je(r)}${n}`;
795
812
  default: return `${r}${n}`;
796
813
  }
797
814
  }
@@ -864,13 +881,14 @@ var at = S.create({
864
881
  renderMarkdown: (e, t, n) => r(e, t, (e) => {
865
882
  if (e.parentType === "bulletList") return "- ";
866
883
  if (e.parentType === "orderedList") {
867
- let t = e.meta?.parentAttrs?.start || 1;
868
- return nt(e.meta?.parentAttrs?.type, t - 1 + (e.index || 0), ". ");
884
+ var t, n;
885
+ let r = ((t = e.meta) == null || (t = t.parentAttrs) == null ? void 0 : t.start) || 1;
886
+ return nt((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
869
887
  }
870
888
  return "- ";
871
889
  }, n),
872
890
  addExtensions() {
873
- return [We(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
891
+ return [Ge(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
874
892
  },
875
893
  addKeyboardShortcuts() {
876
894
  return {
@@ -879,39 +897,25 @@ var at = S.create({
879
897
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
880
898
  };
881
899
  }
882
- });
883
- Ie({}, {
884
- findListItemPos: () => N,
885
- getNextListDepth: () => P,
886
- handleBackspace: () => F,
887
- handleDelete: () => I,
888
- handleTab: () => lt,
889
- hasListBefore: () => ot,
890
- hasListItemAfter: () => ut,
891
- hasListItemBefore: () => dt,
892
- listItemHasSubList: () => ft,
893
- nextListIsDeeper: () => st,
894
- nextListIsHigher: () => ct
895
- });
896
- var N = (e, t) => {
900
+ }), I = (e, t) => {
897
901
  let { $from: n } = t.selection, r = ee(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
898
902
  for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
899
903
  return s === null ? null : {
900
904
  $pos: t.doc.resolve(o),
901
905
  depth: s
902
906
  };
903
- }, P = (e, t) => {
904
- let n = N(e, t);
907
+ }, ot = (e, t) => {
908
+ let n = I(e, t);
905
909
  if (!n) return !1;
906
910
  let [, r] = oe(t, e, n.$pos.pos + 4);
907
911
  return r;
908
- }, ot = (e, t, n) => {
912
+ }, st = (e, t, n) => {
909
913
  let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
910
914
  return !(!a || !n.includes(a.type.name));
911
- }, F = (e, n, r) => {
915
+ }, ct = (e, n, r) => {
912
916
  if (e.commands.undoInputRule()) return !0;
913
917
  if (e.state.selection.from !== e.state.selection.to) return !1;
914
- if (!t(e.state, n) && ot(e.state, n, r)) {
918
+ if (!t(e.state, n) && st(e.state, n, r)) {
915
919
  let { $anchor: t } = e.state.selection, r = e.state.doc.resolve(t.before() - 1), i = [];
916
920
  r.node().descendants((e, t) => {
917
921
  e.type.name === n && i.push({
@@ -930,17 +934,17 @@ var N = (e, t) => {
930
934
  if (!t(e.state, n) || !u(e.state)) return !1;
931
935
  let { $from: i } = e.state.selection, a = i.depth - 1;
932
936
  return i.node(a).type !== e.schema.nodes[n] || i.index(a) !== 0 ? !1 : e.chain().liftListItem(n).run();
933
- }, st = (e, t) => {
934
- let n = P(e, t), r = N(e, t);
937
+ }, lt = (e, t) => {
938
+ let n = ot(e, t), r = I(e, t);
935
939
  return !r || !n ? !1 : n > r.depth;
936
- }, ct = (e, t) => {
937
- let n = P(e, t), r = N(e, t);
940
+ }, ut = (e, t) => {
941
+ let n = ot(e, t), r = I(e, t);
938
942
  return !r || !n ? !1 : n < r.depth;
939
- }, I = (e, n) => {
943
+ }, dt = (e, n) => {
940
944
  if (!t(e.state, n) || !ne(e.state, n)) return !1;
941
945
  let { selection: r } = e.state, { $from: i, $to: a } = r;
942
- return !r.empty && i.sameParent(a) ? !1 : st(n, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(n).joinBackward().run() : ct(n, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
943
- }, lt = (e, n, r) => {
946
+ return !r.empty && i.sameParent(a) ? !1 : lt(n, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(n).joinBackward().run() : ut(n, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
947
+ }, ft = (e, n, r) => {
944
948
  let { state: i } = e, { selection: a } = i;
945
949
  if (!a.empty) return !1;
946
950
  let { $from: o } = a;
@@ -953,18 +957,6 @@ var N = (e, t) => {
953
957
  if (!c.canReplace(c.childCount, c.childCount, g.from(l))) return !1;
954
958
  let u = o.before(), d = o.after(), f = u - 2;
955
959
  return e.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(u, d).insert(f, g.from(l)), e.setSelection(w.create(e.doc, f + 1)), e.scrollIntoView()), !0));
956
- }, ut = (e, t) => {
957
- let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - n.parentOffset - 2);
958
- return r.index() !== r.parent.childCount - 1 && r.nodeAfter?.type.name === e;
959
- }, dt = (e, t) => {
960
- let { $anchor: n } = t.selection, r = t.doc.resolve(n.pos - 2);
961
- return r.index() !== 0 && r.nodeBefore?.type.name === e;
962
- }, ft = (e, t, n) => {
963
- if (!n) return !1;
964
- let r = ee(e, t.schema), i = !1;
965
- return n.descendants((e) => {
966
- e.type === r && (i = !0);
967
- }), i;
968
960
  }, pt = T.create({
969
961
  name: "listKeymap",
970
962
  addOptions() {
@@ -981,34 +973,34 @@ var N = (e, t) => {
981
973
  Delete: ({ editor: e }) => {
982
974
  let t = !1;
983
975
  return this.options.listTypes.forEach(({ itemName: n }) => {
984
- e.state.schema.nodes[n] !== void 0 && I(e, n) && (t = !0);
976
+ e.state.schema.nodes[n] !== void 0 && dt(e, n) && (t = !0);
985
977
  }), t;
986
978
  },
987
979
  "Mod-Delete": ({ editor: e }) => {
988
980
  let t = !1;
989
981
  return this.options.listTypes.forEach(({ itemName: n }) => {
990
- e.state.schema.nodes[n] !== void 0 && I(e, n) && (t = !0);
982
+ e.state.schema.nodes[n] !== void 0 && dt(e, n) && (t = !0);
991
983
  }), t;
992
984
  },
993
985
  Backspace: ({ editor: e }) => {
994
986
  let t = !1;
995
987
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
996
- e.state.schema.nodes[n] !== void 0 && F(e, n, r) && (t = !0);
988
+ e.state.schema.nodes[n] !== void 0 && ct(e, n, r) && (t = !0);
997
989
  }), t;
998
990
  },
999
991
  "Mod-Backspace": ({ editor: e }) => {
1000
992
  let t = !1;
1001
993
  return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
1002
- e.state.schema.nodes[n] !== void 0 && F(e, n, r) && (t = !0);
994
+ e.state.schema.nodes[n] !== void 0 && ct(e, n, r) && (t = !0);
1003
995
  }), t;
1004
996
  },
1005
997
  Tab: ({ editor: e }) => {
1006
- for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && lt(e, t, n)) return !0;
998
+ for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && ft(e, t, n)) return !0;
1007
999
  return !1;
1008
1000
  }
1009
1001
  };
1010
1002
  }
1011
- }), L = RegExp(`^(\\s*)(${Ke})([.)])\\s+(.*)$`), mt = /^\s/, R = {
1003
+ }), L = RegExp(`^(\\s*)(${qe})([.)])\\s+(.*)$`), mt = /^\s/, R = {
1012
1004
  heading: /^#{1,6}(?:\s|$)/,
1013
1005
  bulletItem: /^[-+*]\s+/,
1014
1006
  codeFence: /^(?:```|~~~)/,
@@ -1051,7 +1043,7 @@ function yt(e) {
1051
1043
  for (; n < e.length;) {
1052
1044
  let i = e[n], a = i.match(L);
1053
1045
  if (!a) break;
1054
- let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? M(s) : void 0, p = isNaN(d) ? Ze(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
1046
+ let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? P(s) : void 0, p = isNaN(d) ? F(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
1055
1047
  for (; h < e.length;) {
1056
1048
  let t = e[h];
1057
1049
  if (t.match(L)) break;
@@ -1075,7 +1067,7 @@ function yt(e) {
1075
1067
  }
1076
1068
  return [t, r];
1077
1069
  }
1078
- var bt = RegExp(`^(${Ke})([.)])\\s+(.+)$`);
1070
+ var bt = RegExp(`^(${qe})([.)])\\s+(.+)$`);
1079
1071
  function xt(e) {
1080
1072
  let t = e.split("\n").filter((e) => e.trim().length > 0);
1081
1073
  if (t.length === 0) return null;
@@ -1305,7 +1297,10 @@ var Ot = S.create({
1305
1297
  editor: this.editor
1306
1298
  })), [t];
1307
1299
  }
1308
- }), kt = /^\s*(\[([( |x])?\])\s$/, At = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", jt = (e, t, n) => (n?.checkboxLabel)?.call(n, e, t) || `Task item checkbox for ${e.textContent || "empty task item"}`, Mt = S.create({
1300
+ }), kt = /^\s*(\[([( |x])?\])\s$/, At = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", jt = (e, t, n) => {
1301
+ var r;
1302
+ return (n == null || (r = n.checkboxLabel) == null ? void 0 : r.call(n, e, t)) || `Task item checkbox for ${e.textContent || "empty task item"}`;
1303
+ }, Mt = S.create({
1309
1304
  name: "taskItem",
1310
1305
  addOptions() {
1311
1306
  return {
@@ -1360,12 +1355,9 @@ var Ot = S.create({
1360
1355
  }
1361
1356
  return t.createNode("taskItem", { checked: e.checked || !1 }, n);
1362
1357
  },
1363
- renderMarkdown: (e, t) => {
1364
- let n = `- [${e.attrs?.checked ? "x" : " "}] `;
1365
- return r(e, t, n);
1366
- },
1358
+ renderMarkdown: (e, t) => r(e, t, `- [${e.attrs?.checked ? "x" : " "}] `),
1367
1359
  addExtensions() {
1368
- return this.options.nested ? [We(this.name, [this.options.taskListTypeName])] : [];
1360
+ return this.options.nested ? [Ge(this.name, [this.options.taskListTypeName])] : [];
1369
1361
  },
1370
1362
  addKeyboardShortcuts() {
1371
1363
  let e = {
@@ -1531,11 +1523,11 @@ T.create({
1531
1523
  name: "listKit",
1532
1524
  addExtensions() {
1533
1525
  let e = [];
1534
- return this.options.bulletList !== !1 && e.push(Be.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(at.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(pt.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Ot.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Mt.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Nt.configure(this.options.taskList)), e;
1526
+ return this.options.bulletList !== !1 && e.push(Ve.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(at.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(pt.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Ot.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Mt.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Nt.configure(this.options.taskList)), e;
1535
1527
  }
1536
1528
  });
1537
1529
  //#endregion
1538
- //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.30.2_@tiptap+core@3.30.2_@tiptap+pm@3.30.2_/node_modules/@tiptap/extension-paragraph/dist/index.js
1530
+ //#region ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.30.3_@tiptap+core@3.30.3_@tiptap+pm@3.30.3_/node_modules/@tiptap/extension-paragraph/dist/index.js
1539
1531
  var z = "&nbsp;", B = "\xA0", Pt = S.create({
1540
1532
  name: "paragraph",
1541
1533
  priority: 1e3,
@@ -1564,8 +1556,9 @@ var z = "&nbsp;", B = "\xA0", Pt = S.create({
1564
1556
  if (!e) return "";
1565
1557
  let r = Array.isArray(e.content) ? e.content : [];
1566
1558
  if (r.length === 0) {
1567
- let e = Array.isArray(n?.previousNode?.content) ? n.previousNode.content : [];
1568
- return n?.previousNode?.type === "paragraph" && e.length === 0 ? z : "";
1559
+ var i, a;
1560
+ let e = Array.isArray(n == null || (i = n.previousNode) == null ? void 0 : i.content) ? n.previousNode.content : [];
1561
+ return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ? z : "";
1569
1562
  }
1570
1563
  return t.renderChildren(r);
1571
1564
  },
@@ -2303,12 +2296,11 @@ var pn = T.create({
2303
2296
  return [Gt()];
2304
2297
  },
2305
2298
  extendNodeSchema(e) {
2306
- let t = {
2299
+ return { allowGapCursor: se(te(e, "allowGapCursor", {
2307
2300
  name: e.name,
2308
2301
  options: e.options,
2309
2302
  storage: e.storage
2310
- };
2311
- return { allowGapCursor: se(te(e, "allowGapCursor", t)) ?? null };
2303
+ })) ?? null };
2312
2304
  }
2313
2305
  }), mn = "placeholder", hn = new i("tiptap__placeholder");
2314
2306
  function gn(e) {
@@ -2642,7 +2634,7 @@ var Pn = T.create({
2642
2634
  name: "starterKit",
2643
2635
  addExtensions() {
2644
2636
  let e = [];
2645
- return this.options.bold !== !1 && e.push(ye.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(me.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(Be.configure(this.options.bulletList)), this.options.code !== !1 && e.push(Se.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(Te.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(Ee.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(fn.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(pn.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(De.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(Oe.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Fn.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(ke.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(Pe.configure(this.options.italic)), this.options.listItem !== !1 && e.push(at.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(pt.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(le.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Ot.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(Pt.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(Lt.configure(this.options.strike)), this.options.text !== !1 && e.push(Rt.configure(this.options.text)), this.options.underline !== !1 && e.push(ue.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Pn.configure(this.options?.trailingNode)), e;
2637
+ return this.options.bold !== !1 && e.push(Se.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(_e.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(Ve.configure(this.options.bulletList)), this.options.code !== !1 && e.push(Te.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(Oe.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(ke.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(fn.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(pn.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(Ae.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(je.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(Fn.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(Me.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(Le.configure(this.options.italic)), this.options.listItem !== !1 && e.push(at.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(pt.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(le.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Ot.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(Pt.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(Lt.configure(this.options.strike)), this.options.text !== !1 && e.push(Rt.configure(this.options.text)), this.options.underline !== !1 && e.push(ue.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Pn.configure(this.options?.trailingNode)), e;
2646
2638
  }
2647
2639
  }), Ln = In;
2648
2640
  //#endregion