@templatical/editor 0.51.0 → 0.52.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.
- package/THIRD_PARTY_NOTICES.md +208 -0
- package/dist/{AiAltTextPopover-BZQ95GXL.js → AiAltTextPopover-Cm11CsKH.js} +7 -8
- package/dist/{AiAltTextReview-DoBEudnE.js → AiAltTextReview-DE8t8Rud.js} +8 -9
- package/dist/{AiChatPanel-Bs6sES3b.js → AiChatPanel-7ftS7d40.js} +18 -20
- package/dist/{AiPanels-CfN7A-ZA.js → AiPanels-CxGp6klr.js} +5 -7
- package/dist/{AiRewriteMenu-C3ZfDDYy.js → AiRewriteMenu-DNI-5CUj.js} +21 -22
- package/dist/{BlockIssueBadge-CKwZ1Vgn.js → BlockIssueBadge-6Ri2FfX-.js} +6 -7
- package/dist/{BlockPreviewCanvas-BXNLLLYi.js → BlockPreviewCanvas-Df9iz7sK.js} +10 -11
- package/dist/{CloudHeaderExtras-CsJMEiyN.js → CloudHeaderExtras-CsgyNNV1.js} +3 -4
- package/dist/{CloudPanels-B4F5m7vy.js → CloudPanels-BDV4XQ_l.js} +8 -9
- package/dist/{CollaborationNotices-CNuDp7Y2.js → CollaborationNotices-JQ3vQoqO.js} +4 -5
- package/dist/{CollaboratorBar-BtHPiuHq.js → CollaboratorBar-EeqqWcX6.js} +4 -5
- package/dist/{CommentsPanel-CyCM-BvT.js → CommentsPanel-BuftXc0U.js} +3 -5
- package/dist/{CommentsSidebar-Ca3DyFOX.js → CommentsSidebar-Co3x4uH0.js} +16 -17
- package/dist/{CountdownBlock-DR4Xm2-T.js → CountdownBlock-BT3ZTH1F.js} +5 -6
- package/dist/{CountdownToolbar-CEIMPojJ.js → CountdownToolbar-CrL4WKy9.js} +8 -9
- package/dist/{IssuesPanel-C8nMUccy.js → IssuesPanel-BHFQ3wrP.js} +12 -13
- package/dist/{LoadingTrack-B0RKQWq3.js → LoadingTrack-DZA5AoP9.js} +3 -4
- package/dist/{LogicTagInsertButton-CqfU52CO.js → LogicTagInsertButton-CSD9cfJB.js} +23 -30
- package/dist/{MediaEditModal-DHtkZ4OU.js → MediaEditModal-DQl5w44r.js} +7 -10
- package/dist/{MediaPanels-CGcOB2pR.js → MediaPanels-BFWYuJot.js} +3 -5
- package/dist/{MergeTagInput-YnEkorTZ.js → MergeTagInput-DE7kWwXx.js} +5 -6
- package/dist/{MergeTagModeToggle-Dhb1DAcQ.js → MergeTagModeToggle-DvD0ne7N.js} +7 -8
- package/dist/{MergeTagTextarea-e4lnwtqZ.js → MergeTagTextarea-DVPQkiYY.js} +3 -4
- package/dist/{ParagraphEditor-B6NK0ytw.js → ParagraphEditor-D-nqs82g.js} +55 -58
- package/dist/{RestoreVersionDialog-Bq_IGOLJ.js → RestoreVersionDialog-DqUPsLB9.js} +7 -8
- package/dist/{RichTextEditorContent-AOM6fylS.js → RichTextEditorContent-Xq9D0Zs3.js} +9 -10
- package/dist/{SaveBlockDialog-C8GngfQx.js → SaveBlockDialog-DAPv70p4.js} +13 -14
- package/dist/{SavedBlocksBrowserModal-wnkvxpm_.js → SavedBlocksBrowserModal-SRtN5h9q.js} +17 -18
- package/dist/{SavedBlocksPanels-C2s3q0pJ.js → SavedBlocksPanels-ChbL9v9x.js} +3 -5
- package/dist/{SavedBlocksPickBar-BjcTiV87.js → SavedBlocksPickBar-hRaiLNdu.js} +6 -7
- package/dist/{TemplateSettings-BVBWpiDU.js → TemplateSettings-D0XcH32O.js} +14 -15
- package/dist/{TestEmailModal-SyhO9bn3.js → TestEmailModal-Cb5t0yB2.js} +16 -18
- package/dist/{TestEmailPanel-BDd2Rtav.js → TestEmailPanel-COJQa2A9.js} +3 -5
- package/dist/{TitleEditor-pxD53y_l.js → TitleEditor-BYk_9SpQ.js} +14 -15
- package/dist/{ToggleSwitch-D51U9cmR.js → ToggleSwitch-poGWbduy.js} +2 -3
- package/dist/{Toolbar-CZSPZYbj.js → Toolbar-Dku_pZni.js} +134 -142
- package/dist/{TplModal-DCzBzicE.js → TplModal-9IndEYk5.js} +6 -7
- package/dist/{VersionHistoryMenu-BQeWPT85.js → VersionHistoryMenu-BG5qayvg.js} +12 -13
- package/dist/{VersionHistoryPanels-BBm7YbRQ.js → VersionHistoryPanels-hPg7Q5-f.js} +3 -5
- package/dist/{VersionPreviewBanner-DUGF0tUJ.js → VersionPreviewBanner-CSs7zum_.js} +5 -6
- package/dist/{WrapperBlock-BO619LAb.js → WrapperBlock-DwjK_IdJ.js} +6 -7
- package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +3 -5
- package/dist/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +2 -3
- package/dist/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +1 -2
- package/dist/{blockTypeIcons-NzaYvAI4.js → blockTypeIcons-yt7SLzub.js} +3 -4
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +1 -2
- package/dist/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +1 -2
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js → AiAltTextPopover-DjMoJCgU.js} +7 -8
- package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js.map → AiAltTextPopover-DjMoJCgU.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js → AiAltTextReview-BafAtBoA.js} +8 -9
- package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js.map → AiAltTextReview-BafAtBoA.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js → AiChatPanel-DXeZgc7D.js} +15 -17
- package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js.map → AiChatPanel-DXeZgc7D.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js → AiPanels-B4uAVRoO.js} +5 -7
- package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js.map → AiPanels-B4uAVRoO.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-Bhh71zcc.js → AiRewriteMenu-4F6vwhJ5.js} +21 -22
- package/dist/cdn/chunks/AiRewriteMenu-4F6vwhJ5.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-DAn2vsMJ.js → BlockIssueBadge-DIJDqqcY.js} +6 -7
- package/dist/cdn/chunks/{BlockIssueBadge-DAn2vsMJ.js.map → BlockIssueBadge-DIJDqqcY.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js → BlockPreviewCanvas-Ny1X_mee.js} +9 -10
- package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js.map → BlockPreviewCanvas-Ny1X_mee.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js → CloudHeaderExtras-DtMORiLS.js} +4 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js.map → CloudHeaderExtras-DtMORiLS.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js → CloudPanels-BkmLc2Fl.js} +7 -8
- package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js.map → CloudPanels-BkmLc2Fl.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js → CollaborationNotices-Hf8r08Sw.js} +5 -6
- package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js.map → CollaborationNotices-Hf8r08Sw.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js → CollaboratorBar-II8eYtKu.js} +6 -7
- package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js.map → CollaboratorBar-II8eYtKu.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js → CommentsPanel-CAiwilM2.js} +4 -6
- package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js.map → CommentsPanel-CAiwilM2.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js → CommentsSidebar-Dj8sDiLN.js} +18 -19
- package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js.map → CommentsSidebar-Dj8sDiLN.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js → CountdownBlock-Dyr5P0IP.js} +6 -7
- package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js.map → CountdownBlock-Dyr5P0IP.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js → CountdownToolbar-CguFJdqn.js} +9 -10
- package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js.map → CountdownToolbar-CguFJdqn.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js → IssuesPanel-pr7_nuLI.js} +9 -10
- package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js.map → IssuesPanel-pr7_nuLI.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-DfJ_C33G.js +11 -0
- package/dist/cdn/chunks/{LoadingTrack-BIcL4NiY.js.map → LoadingTrack-DfJ_C33G.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js → LogicTagInsertButton-B_ldj3TO.js} +18 -25
- package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js.map → LogicTagInsertButton-B_ldj3TO.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js → MediaEditModal-CGfzcHwP.js} +7 -10
- package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js.map → MediaEditModal-CGfzcHwP.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js → MediaPanels-D0BdxdqP.js} +4 -6
- package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js.map → MediaPanels-D0BdxdqP.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js → MergeTagInput-CFu9VXPS.js} +6 -7
- package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js.map → MergeTagInput-CFu9VXPS.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js → MergeTagModeToggle-BFpK5dxg.js} +7 -8
- package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js.map → MergeTagModeToggle-BFpK5dxg.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js → MergeTagTextarea-Zo0mYWbf.js} +4 -5
- package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js.map → MergeTagTextarea-Zo0mYWbf.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js → ParagraphEditor-DsPLVAgm.js} +35 -38
- package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js.map → ParagraphEditor-DsPLVAgm.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js → RestoreVersionDialog-B866zFP0.js} +9 -10
- package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js.map → RestoreVersionDialog-B866zFP0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js → RichTextEditorContent-DaY63kye.js} +9 -10
- package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js.map → RichTextEditorContent-DaY63kye.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js → SaveBlockDialog-B7nftAAS.js} +11 -12
- package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js.map → SaveBlockDialog-B7nftAAS.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js → SavedBlocksBrowserModal-B9XCjDfm.js} +13 -14
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js.map → SavedBlocksBrowserModal-B9XCjDfm.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js → SavedBlocksPanels-C3nK90pz.js} +4 -6
- package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js.map → SavedBlocksPanels-C3nK90pz.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js → SavedBlocksPickBar-B166Mek9.js} +7 -8
- package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js.map → SavedBlocksPickBar-B166Mek9.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js → TemplateSettings-jWpmuWDR.js} +13 -14
- package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js.map → TemplateSettings-jWpmuWDR.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js → TestEmailModal-DcwKhFnI.js} +15 -17
- package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js.map → TestEmailModal-DcwKhFnI.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js → TestEmailPanel-BDBAvAfI.js} +4 -6
- package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js.map → TestEmailPanel-BDBAvAfI.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js → TitleEditor-R2lQw6WA.js} +15 -16
- package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js.map → TitleEditor-R2lQw6WA.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js → ToggleSwitch-BDMugNES.js} +3 -4
- package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js.map → ToggleSwitch-BDMugNES.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js → Toolbar-CnvfW72e.js} +156 -164
- package/dist/cdn/chunks/{Toolbar-DoprRgTn.js.map → Toolbar-CnvfW72e.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BXQzmsJX.js → TplModal-BDyeS69p.js} +6 -7
- package/dist/cdn/chunks/{TplModal-BXQzmsJX.js.map → TplModal-BDyeS69p.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js → VersionHistoryMenu-CmpgUI4Q.js} +13 -14
- package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js.map → VersionHistoryMenu-CmpgUI4Q.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js → VersionHistoryPanels-DB_FZyyg.js} +4 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js.map → VersionHistoryPanels-DB_FZyyg.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js → VersionPreviewBanner-CZ--HOoa.js} +6 -7
- package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js.map → VersionPreviewBanner-CZ--HOoa.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js → WrapperBlock-D3obNGab.js} +7 -8
- package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js.map → WrapperBlock-D3obNGab.js.map} +1 -1
- package/dist/cdn/chunks/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +4 -6
- package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js.map → aiErrors-C3QEMB0x.js.map} +1 -1
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +3 -4
- package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js.map → aiImageContext-BQ5mQ6B5.js.map} +1 -1
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +2 -3
- package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js.map → aiRewritePreview-DlMyx6Si.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-ikZAmd6U.js → blockTypeIcons-DFf7AyqI.js} +3 -4
- package/dist/cdn/chunks/{blockTypeIcons-ikZAmd6U.js.map → blockTypeIcons-DFf7AyqI.js.map} +1 -1
- package/dist/cdn/chunks/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +2 -3
- package/dist/cdn/chunks/{ca-C7mTzW1r.js.map → ca-CD-Kt1qz.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +2 -3
- package/dist/cdn/chunks/{ca-CYQH3J0b.js.map → ca-Cc6eL0ZS.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js → createCloudRuntime-D6niZ2Rc.js} +27 -46
- package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js.map → createCloudRuntime-D6niZ2Rc.js.map} +1 -1
- package/dist/cdn/chunks/{de-DBOTcDj2.js → de-6M4JoHoD.js} +2 -3
- package/dist/cdn/chunks/{de-DBOTcDj2.js.map → de-6M4JoHoD.js.map} +1 -1
- package/dist/cdn/chunks/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +2 -3
- package/dist/cdn/chunks/{de-DNuYQTmS.js.map → de-CeFJ6wbM.js.map} +1 -1
- package/dist/cdn/chunks/{de-JvCTMJPy.js → de-DtrXVcuY.js} +2 -3
- package/dist/cdn/chunks/{de-JvCTMJPy.js.map → de-DtrXVcuY.js.map} +1 -1
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js → dist-C2epoAwW.js} +3 -4
- package/dist/cdn/chunks/{dist-Bo8Thh8v.js.map → dist-C2epoAwW.js.map} +1 -1
- package/dist/cdn/chunks/{dist-S-rLGqax.js → dist-CONcGNwy.js} +4 -5
- package/dist/cdn/chunks/{dist-S-rLGqax.js.map → dist-CONcGNwy.js.map} +1 -1
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js +872 -0
- package/dist/cdn/chunks/dompurify-JVtr5-B1.js.map +1 -0
- package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js → draggable-B8hTTYFO.js} +19 -22
- package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js.map → draggable-B8hTTYFO.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js → editor-modal-cvYkpbHD.js} +66 -81
- package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js.map → editor-modal-cvYkpbHD.js.map} +1 -1
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +2 -3
- package/dist/cdn/chunks/{emojiData-6m0DBh7O.js.map → emojiData-CBNuCfum.js.map} +1 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +1 -0
- package/dist/cdn/chunks/{en-CW71OK66.js → en-D14i5nFh.js} +2 -3
- package/dist/cdn/chunks/{en-CW71OK66.js.map → en-D14i5nFh.js.map} +1 -1
- package/dist/cdn/chunks/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +2 -3
- package/dist/cdn/chunks/{en-CDhWRrF_.js.map → en-FzUuJ8HW.js.map} +1 -1
- package/dist/cdn/chunks/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +2 -3
- package/dist/cdn/chunks/{es-CAv-Vldw.js.map → es-Dw_h7Oll.js.map} +1 -1
- package/dist/cdn/chunks/{es-DdK7zQfi.js → es-zDacbMhs.js} +2 -3
- package/dist/cdn/chunks/{es-DdK7zQfi.js.map → es-zDacbMhs.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-taJTZlLK.js → extensions-ClDhn88e.js} +12 -17
- package/dist/cdn/chunks/{extensions-taJTZlLK.js.map → extensions-ClDhn88e.js.map} +1 -1
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +2 -3
- package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js.map → formatAbsoluteDateTime-Ck2_zXra.js.map} +1 -1
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +1 -2
- package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js.map → formatRelativeTime-BTD8Ktt-.js.map} +1 -1
- package/dist/cdn/chunks/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +2 -3
- package/dist/cdn/chunks/{fr-DVPtxpR6.js.map → fr-BJaeKu_8.js.map} +1 -1
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +2 -3
- package/dist/cdn/chunks/{fr-Dz5Bgb7-.js.map → fr-CSgYtjOd.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js → htmlparser-hu3YnNQU.js} +6 -11
- package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js.map → htmlparser-hu3YnNQU.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DNX6StSs.js → icons-HCBP93Ch.js} +50 -55
- package/dist/cdn/chunks/{icons-DNX6StSs.js.map → icons-HCBP93Ch.js.map} +1 -1
- package/dist/cdn/chunks/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +2 -3
- package/dist/cdn/chunks/{ja-Di-zJiT8.js.map → ja-B7H3ID8O.js.map} +1 -1
- package/dist/cdn/chunks/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +2 -3
- package/dist/cdn/chunks/{ja-dcWzjStz.js.map → ja-Cu2HdYaK.js.map} +1 -1
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js → keys-BF9gazbd.js} +3 -4
- package/dist/cdn/chunks/{keys-BTpmg2Tt.js.map → keys-BF9gazbd.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-Bbt17cVz.js → liquid.browser-DkLBNrft.js} +705 -687
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +1 -0
- package/dist/cdn/chunks/{logger-Tj0RPskW.js → logger-CqQTfJGx.js} +2 -3
- package/dist/cdn/chunks/{logger-Tj0RPskW.js.map → logger-CqQTfJGx.js.map} +1 -1
- package/dist/cdn/chunks/{nl-CvVuHYFL.js → nl-176ySmc5.js} +2 -3
- package/dist/cdn/chunks/{nl-CvVuHYFL.js.map → nl-176ySmc5.js.map} +1 -1
- package/dist/cdn/chunks/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +2 -3
- package/dist/cdn/chunks/{nl-LZNqQgE4.js.map → nl-1Ai2NykB.js.map} +1 -1
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js → normalizeMergeTagMarkup-DpHCSESZ.js} +3 -4
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js.map → normalizeMergeTagMarkup-DpHCSESZ.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js → preRenderCustomBlocks-D-dsBq5t.js} +6 -7
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js.map → preRenderCustomBlocks-D-dsBq5t.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js.map → pt-BR-Bp92Fc6J.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js.map → pt-BR-CIbp__Z7.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +2 -3
- package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js.map → pt-BR-dDlTwX18.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js → pusher-x9rNqzon.js} +3 -4
- package/dist/cdn/chunks/{pusher-Cs4GGEtd.js.map → pusher-x9rNqzon.js.map} +1 -1
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +2 -3
- package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js.map → readableTextColor-BfZUGnVj.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js +72 -0
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js → socialIcons-rJoqO1TJ.js} +167 -191
- package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js.map → socialIcons-rJoqO1TJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bs_yxk3h.js → src-BKpAis_q.js} +502 -537
- package/dist/cdn/chunks/src-BKpAis_q.js.map +1 -0
- package/dist/cdn/chunks/{src-BNFnxfrA.js → src-C9DTvn1H.js} +207 -171
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +1 -0
- package/dist/cdn/chunks/src-CUH_EI7k.js +647 -0
- package/dist/cdn/chunks/src-CUH_EI7k.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +2 -3
- package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js.map → styleConstants-B8xVRiwX.js.map} +1 -1
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +2 -3
- package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js.map → templateSettingsFields-cjlP-jdw.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CtVrAViq.js → tiptap-ChSZybTi.js} +3364 -3240
- package/dist/cdn/chunks/tiptap-ChSZybTi.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js → useCloudI18n-RJXyVnIf.js} +4 -5
- package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js.map → useCloudI18n-RJXyVnIf.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CCVFi1YZ.js → useEditorCore-CjaEV_01.js} +534 -586
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-CR5GjJD6.js.map → useEditorRoot-BT3c9CXj.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js → useI18n-11iqzC6m.js} +4 -5
- package/dist/cdn/chunks/{useI18n-CbVubQhM.js.map → useI18n-11iqzC6m.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js → useLogicTag-vy5KGg5D.js} +5 -6
- package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js.map → useLogicTag-vy5KGg5D.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js → useMergeTag-BFBBjnwh.js} +5 -6
- package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js.map → useMergeTag-BFBBjnwh.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js → usePopoverPosition-AnVIwiVv.js} +7 -11
- package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js.map → usePopoverPosition-AnVIwiVv.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js → useScrollToBlock-C0dawxGr.js} +5 -7
- package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js.map → useScrollToBlock-C0dawxGr.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js → withCurrentFont-C3CquBQN.js} +3 -4
- package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js.map → withCurrentFont-C3CquBQN.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +389 -378
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-yYsp5Xpk.js → check-N3x4z_rH.js} +1 -2
- package/dist/{chevron-down-DTmD06_j.js → chevron-down-gXu9qNwO.js} +1 -2
- package/dist/{chevron-right-BSeYZOxc.js → chevron-right-rL0ayGk5.js} +1 -2
- package/dist/{chevron-up-BOApwrxi.js → chevron-up-0ugh8HnW.js} +1 -2
- package/dist/{circle-alert-BMszY8im.js → circle-alert-B9Ls75B5.js} +1 -2
- package/dist/{clock-HADxnl6-.js → clock-BqHBaCLm.js} +1 -2
- package/dist/{createCloudRuntime-DVQI_ReU.js → createCloudRuntime-B5VIdnwz.js} +11 -17
- package/dist/{createLucideIcon-0lYYH3EW.js → createLucideIcon-BV7Gwz_Z.js} +6 -11
- package/dist/{de-DBOTcDj2.js → de-6M4JoHoD.js} +1 -2
- package/dist/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +1 -2
- package/dist/{de-JvCTMJPy.js → de-DtrXVcuY.js} +1 -2
- package/dist/{dist-DI4_YSnG.js → dist-BA-jTQgw.js} +3 -4
- package/dist/{dist-BC-ZEYLd.js → dist-BF5zEHop.js} +2 -3
- package/dist/{dist-CyBwSiAa.js → dist-BS5uKktL.js} +2 -3
- package/dist/{dist-C7EtxNCb.js → dist-CEdyyDn7.js} +2 -3
- package/dist/{dist-Cr7RPxI9.js → dist-CWSG7Kj0.js} +478 -461
- package/dist/{dist-DXyGqIDE.js → dist-Cy8I5scI.js} +2 -3
- package/dist/{dist-DtOF3bDW.js → dist-CzrLYq2s.js} +398 -344
- package/dist/{dist-DVNjPKsH.js → dist-D6fZec6r.js} +3 -4
- package/dist/{dist-C_dV9QAx.js → dist-DDN7yR-w.js} +7 -7
- package/dist/{dist-CuLwJF7H.js → dist-Dd5MU2Ev.js} +23 -14
- package/dist/dist-DyFArF_G.js +4 -0
- package/dist/{dist-DBxgrOeo.js → dist-V7W1UhVr.js} +1882 -1792
- package/dist/{dist-DPcf6XZ8.js → dist-p3wymUDt.js} +2 -3
- package/dist/dist-pA3ooG6N.js +4 -0
- package/dist/{dist-3HpYixwF.js → dist-txQLT2sF.js} +173 -161
- package/dist/{editor-modal-Bzhl-PgI.js → editor-modal-Du9VI9q4.js} +203 -218
- package/dist/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +1 -2
- package/dist/en-CyEE7FPY.js +1 -0
- package/dist/{en-CW71OK66.js → en-D14i5nFh.js} +1 -2
- package/dist/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +1 -2
- package/dist/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +1 -2
- package/dist/{es-DdK7zQfi.js → es-zDacbMhs.js} +1 -2
- package/dist/{extensions-CdyweA50.js → extensions-FRYhx7qa.js} +59 -68
- package/dist/{eye-DWkSvYpj.js → eye-BKj9Tfnc.js} +1 -2
- package/dist/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +1 -2
- package/dist/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +0 -1
- package/dist/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +1 -2
- package/dist/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +1 -2
- package/dist/{image-DesWjcZ4.js → image-DNdvdTla.js} +1 -2
- package/dist/index.d.ts +6 -6
- package/dist/{info-ClWJGoZy.js → info-Bx-kBkbH.js} +1 -2
- package/dist/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +1 -2
- package/dist/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +1 -2
- package/dist/{keys-Zd9KWRD1.js → keys-DBjrQkYH.js} +2 -3
- package/dist/{link-BqRicFTA.js → link-D8-rYdIQ.js} +1 -2
- package/dist/{liquid.browser-Ct2-EezB.js → liquid.browser-D1RxawkY.js} +704 -686
- package/dist/{list-bojQr9bn.js → list-BneisA27.js} +1 -2
- package/dist/{loader-circle-B2B8LbUu.js → loader-circle-DBEXphyx.js} +1 -2
- package/dist/{logger-k9Nbj3Cp.js → logger-BOu7oEtk.js} +1 -2
- package/dist/{message-circle-BEuiNsyZ.js → message-circle-Bg4xInCM.js} +1 -2
- package/dist/{nl-CvVuHYFL.js → nl-176ySmc5.js} +1 -2
- package/dist/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +1 -2
- package/dist/{normalizeMergeTagMarkup-P6SUBuPv.js → normalizeMergeTagMarkup-IH8COHzd.js} +30 -31
- package/dist/{package-DCROB4aM.js → package-B40Vkfsp.js} +1 -2
- package/dist/{pencil-CEotCKbf.js → pencil-CYdAHTds.js} +1 -2
- package/dist/{preRenderCustomBlocks-D8rr61_z.js → preRenderCustomBlocks-AbZArwkR.js} +4 -5
- package/dist/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +1 -2
- package/dist/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +1 -2
- package/dist/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +1 -2
- package/dist/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +1 -2
- package/dist/{refresh-cw-C6M2mHNC.js → refresh-cw-Bb1FWrU0.js} +1 -2
- package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/dist/{runtime-dom.esm-bundler-B8WCZWUm.js → runtime-dom.esm-bundler-CLGymEyk.js} +7 -8
- package/dist/sanitizeHtml-CnOA1efV.js +942 -0
- package/dist/{search-Cy99zPYf.js → search-BZEo08gi.js} +1 -2
- package/dist/{send-BDLJFsf3.js → send-DHtrnXQs.js} +1 -2
- package/dist/{smartphone-CVvQaNA4.js → smartphone-dlN3vpA3.js} +1 -2
- package/dist/{socialIcons-Dd-jRiVe.js → socialIcons-B_d52_eS.js} +256 -267
- package/dist/{sparkles-Ce0Qz0ox.js → sparkles-NOttoDnJ.js} +1 -2
- package/dist/{square-BWlolnXe.js → square-B1CJgdt2.js} +1 -2
- package/dist/style.css +1 -1
- package/dist/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +1 -2
- package/dist/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +1 -2
- package/dist/templatical-editor.js +413 -401
- package/dist/{text-align-start-D1V5gPTy.js → text-align-start-zpoXmb-Z.js} +1 -2
- package/dist/{trash-CZfiUFmw.js → trash-CGbk4Sgt.js} +1 -2
- package/dist/{triangle-alert-CFDzyFC7.js → triangle-alert-CKLMyGVp.js} +1 -2
- package/dist/{upload-BJfvdIrD.js → upload-DQoackAn.js} +1 -2
- package/dist/{useCloudI18n-Dcjua65H.js → useCloudI18n-DcLtxOQZ.js} +3 -4
- package/dist/{useEditorCore-BTLeAVlM.js → useEditorCore-DG9UvWUm.js} +931 -984
- package/dist/useEditorRoot-BKr6nNkC.js +7 -0
- package/dist/{useI18n-BdoY7xDE.js → useI18n-CeTm777E.js} +3 -4
- package/dist/{useLogicTag-DKLZ1T9H.js → useLogicTag-DFDYJeMN.js} +4 -5
- package/dist/{useMergeTag-Bhdx7AKk.js → useMergeTag-B46vACAG.js} +4 -5
- package/dist/{usePopoverPosition-BZea45XK.js → usePopoverPosition-C42kD7zt.js} +6 -10
- package/dist/{useScrollToBlock-FmNMALM_.js → useScrollToBlock-C-NzvjeO.js} +4 -6
- package/dist/{vue.runtime.esm-bundler-DgFJ6GPG.js → vue.runtime.esm-bundler-CrlI8j5R.js} +14 -18
- package/dist/{withCurrentFont-BATJHNve.js → withCurrentFont-v_a4Oso8.js} +2 -3
- package/dist/{x-CZ0Js0hA.js → x-zcrnmcmU.js} +1 -2
- package/package.json +24 -22
- package/dist/AiHeaderMenu-BEaTazx4.js +0 -36
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +0 -37
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +0 -1
- package/dist/cdn/chunks/LoadingTrack-BIcL4NiY.js +0 -12
- package/dist/cdn/chunks/en-ifvu6oPv.js +0 -1
- package/dist/cdn/chunks/liquid.browser-Bbt17cVz.js.map +0 -1
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +0 -62
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +0 -1
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +0 -1
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +0 -1
- package/dist/cdn/chunks/src-K6fw_35b.js +0 -649
- package/dist/cdn/chunks/src-K6fw_35b.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +0 -10
- package/dist/dist-BPFcLKTw.js +0 -5
- package/dist/dist-D7Yj7E-F.js +0 -5
- package/dist/en-DwV15ltA.js +0 -1
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +0 -60
- package/dist/useEditorRoot-DUy67lJu.js +0 -8
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Link as de } from "./dist-
|
|
3
|
-
import { Underline as fe } from "./dist-
|
|
4
|
-
|
|
5
|
-
var pe = /* @__PURE__ */ new WeakSet(),
|
|
6
|
-
function
|
|
1
|
+
import { $n as e, Bn as t, Bt as n, Gn as r, Ht as i, Jn as a, Kn as o, Mt as s, On as c, Qn as l, Rn 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, _n as y, bn as ee, er as b, f as x, ft as te, ir as S, it as ne, jt as re, m as C, mn as w, mt as ie, nr as ae, nt as oe, pn as T, pt as se, qn as E, rr as D, s as O, ut as ce, w as le, wn as ue } from "./dist-V7W1UhVr.js";
|
|
2
|
+
import { Link as de } from "./dist-txQLT2sF.js";
|
|
3
|
+
import { Underline as fe } from "./dist-Dd5MU2Ev.js";
|
|
4
|
+
// ../../node_modules/.pnpm/@tiptap+core@3.32.1_@tiptap+pm@3.32.1/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
|
|
5
|
+
var pe = /* @__PURE__ */ new WeakSet(), k = /* @__PURE__ */ new WeakSet();
|
|
6
|
+
function A(e) {
|
|
7
7
|
let t = e;
|
|
8
8
|
return pe.add(t), t;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function j(e) {
|
|
11
11
|
return Array.isArray(e) && pe.has(e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return e.flatMap((e) => e == null ? [] : Array.isArray(e) &&
|
|
13
|
+
function M(e) {
|
|
14
|
+
return e.flatMap((e) => e == null ? [] : Array.isArray(e) && k.has(e) && !j(e) ? M(e) : [e]);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function me(e, t) {
|
|
17
17
|
if (e === "slot") return 0;
|
|
18
18
|
if (e instanceof Function) {
|
|
19
19
|
let n = e(t);
|
|
20
|
-
return Array.isArray(n) && !
|
|
20
|
+
return Array.isArray(n) && !j(n) && !k.has(n) ? A(n) : n;
|
|
21
21
|
}
|
|
22
22
|
let { children: n, ...r } = t ?? {};
|
|
23
23
|
if (e === "svg") throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
|
|
24
24
|
if (Array.isArray(n)) {
|
|
25
|
-
if (
|
|
25
|
+
if (j(n)) return A([
|
|
26
26
|
e,
|
|
27
27
|
r,
|
|
28
28
|
n
|
|
29
29
|
]);
|
|
30
|
-
if (n.length === 0) return
|
|
31
|
-
let t =
|
|
32
|
-
return t.length === 0 ?
|
|
30
|
+
if (n.length === 0) return A([e, r]);
|
|
31
|
+
let t = M(n);
|
|
32
|
+
return t.length === 0 ? A([e, r]) : A([
|
|
33
33
|
e,
|
|
34
34
|
r,
|
|
35
35
|
...t
|
|
36
36
|
]);
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return A(n == null ? [e, r] : [
|
|
39
39
|
e,
|
|
40
40
|
r,
|
|
41
41
|
n
|
|
42
42
|
]);
|
|
43
43
|
}
|
|
44
|
-
var
|
|
44
|
+
var N = (e, t) => me(e, t), he = (e, t) => {
|
|
45
45
|
let { state: n } = e, { selection: r } = n;
|
|
46
46
|
if (!r.empty) return !1;
|
|
47
47
|
let { $from: i } = r;
|
|
@@ -51,15 +51,15 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
51
51
|
let o = i.node(a), s = i.index(a);
|
|
52
52
|
if (s === 0) return !1;
|
|
53
53
|
if (o.type === t) return e.commands.lift(t.name);
|
|
54
|
-
let
|
|
55
|
-
if (
|
|
56
|
-
let
|
|
54
|
+
let c = o.child(s - 1);
|
|
55
|
+
if (c.type !== t || !c.lastChild?.isTextblock) return !1;
|
|
56
|
+
let l = i.before() - 1 - 1;
|
|
57
57
|
return e.commands.command(({ tr: e, dispatch: t }) => {
|
|
58
58
|
if (!t) return !0;
|
|
59
59
|
let n = i.parent.content, r = new S(n, 0, 0);
|
|
60
|
-
return e.replace(
|
|
60
|
+
return e.replace(l, i.after(), r), e.setSelection(b.create(e.doc, l + n.size)), e.scrollIntoView(), t(e), !0;
|
|
61
61
|
});
|
|
62
|
-
},
|
|
62
|
+
}, ge = /^\s*>\s$/, _e = C.create({
|
|
63
63
|
name: "blockquote",
|
|
64
64
|
addOptions() {
|
|
65
65
|
return { HTMLAttributes: {} };
|
|
@@ -71,9 +71,9 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
71
71
|
return [{ tag: "blockquote" }];
|
|
72
72
|
},
|
|
73
73
|
renderHTML({ HTMLAttributes: e }) {
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
...
|
|
76
|
-
children: /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ N("blockquote", {
|
|
75
|
+
...y(this.options.HTMLAttributes, e),
|
|
76
|
+
children: /* @__PURE__ */ N("slot", {})
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
parseMarkdown: (e, t) => {
|
|
@@ -98,16 +98,16 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
98
98
|
addKeyboardShortcuts() {
|
|
99
99
|
return {
|
|
100
100
|
"Mod-Shift-b": () => this.editor.commands.toggleBlockquote(),
|
|
101
|
-
Backspace: () =>
|
|
101
|
+
Backspace: () => he(this.editor, this.type)
|
|
102
102
|
};
|
|
103
103
|
},
|
|
104
104
|
addInputRules() {
|
|
105
|
-
return [
|
|
106
|
-
find:
|
|
105
|
+
return [t({
|
|
106
|
+
find: ge,
|
|
107
107
|
type: this.type
|
|
108
108
|
})];
|
|
109
109
|
}
|
|
110
|
-
}),
|
|
110
|
+
}), ve = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, ye = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, be = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, xe = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Se = x.create({
|
|
111
111
|
name: "bold",
|
|
112
112
|
addOptions() {
|
|
113
113
|
return { HTMLAttributes: {} };
|
|
@@ -130,9 +130,9 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
130
130
|
];
|
|
131
131
|
},
|
|
132
132
|
renderHTML({ HTMLAttributes: e }) {
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
...
|
|
135
|
-
children: /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ N("strong", {
|
|
134
|
+
...y(this.options.HTMLAttributes, e),
|
|
135
|
+
children: /* @__PURE__ */ N("slot", {})
|
|
136
136
|
});
|
|
137
137
|
},
|
|
138
138
|
markdownTokenName: "strong",
|
|
@@ -156,31 +156,31 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
156
156
|
};
|
|
157
157
|
},
|
|
158
158
|
addInputRules() {
|
|
159
|
-
return [
|
|
160
|
-
find:
|
|
159
|
+
return [T({
|
|
160
|
+
find: ve,
|
|
161
161
|
type: this.type
|
|
162
|
-
}),
|
|
163
|
-
find:
|
|
162
|
+
}), T({
|
|
163
|
+
find: be,
|
|
164
164
|
type: this.type
|
|
165
165
|
})];
|
|
166
166
|
},
|
|
167
167
|
addPasteRules() {
|
|
168
|
-
return [
|
|
169
|
-
find:
|
|
168
|
+
return [w({
|
|
169
|
+
find: ye,
|
|
170
170
|
type: this.type
|
|
171
|
-
}),
|
|
172
|
-
find:
|
|
171
|
+
}), w({
|
|
172
|
+
find: xe,
|
|
173
173
|
type: this.type
|
|
174
174
|
})];
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
176
|
+
}), Ce = (e) => {
|
|
177
177
|
let t = /`([^`]+)`(?!`)$/.exec(e);
|
|
178
178
|
return !t || t.index > 0 && e[t.index - 1] === "`" ? null : {
|
|
179
179
|
index: t.index,
|
|
180
180
|
text: t[0],
|
|
181
181
|
replaceWith: t[1]
|
|
182
182
|
};
|
|
183
|
-
},
|
|
183
|
+
}, we = (e) => {
|
|
184
184
|
let t = /`([^`]+)`(?!`)/g, n = [], r;
|
|
185
185
|
for (; (r = t.exec(e)) !== null;) r.index > 0 && e[r.index - 1] === "`" || n.push({
|
|
186
186
|
index: r.index,
|
|
@@ -189,12 +189,12 @@ var k = (e, t) => ge(e, t), _e = (e, t) => {
|
|
|
189
189
|
});
|
|
190
190
|
return n;
|
|
191
191
|
};
|
|
192
|
-
function
|
|
192
|
+
function Te(e) {
|
|
193
193
|
let t = new Set((e.match(/`+/g) || []).map((e) => e.length)), n = 1;
|
|
194
194
|
for (; t.has(n);) n += 1;
|
|
195
195
|
return n;
|
|
196
196
|
}
|
|
197
|
-
var
|
|
197
|
+
var Ee = x.create({
|
|
198
198
|
name: "code",
|
|
199
199
|
addOptions() {
|
|
200
200
|
return { HTMLAttributes: {} };
|
|
@@ -208,7 +208,7 @@ var Oe = y.create({
|
|
|
208
208
|
renderHTML({ HTMLAttributes: e }) {
|
|
209
209
|
return [
|
|
210
210
|
"code",
|
|
211
|
-
|
|
211
|
+
y(this.options.HTMLAttributes, e),
|
|
212
212
|
0
|
|
213
213
|
];
|
|
214
214
|
},
|
|
@@ -220,7 +220,7 @@ var Oe = y.create({
|
|
|
220
220
|
renderMarkdown: (e, t, n) => {
|
|
221
221
|
var r;
|
|
222
222
|
if (!e.content) return "";
|
|
223
|
-
let i = typeof (n == null || (r = n.meta) == null ? void 0 : r.markText) == "string" ? n.meta.markText : "", a = "`".repeat(
|
|
223
|
+
let i = typeof (n == null || (r = n.meta) == null ? void 0 : r.markText) == "string" ? n.meta.markText : "", a = "`".repeat(Te(i)), o = i.startsWith("`") || i.endsWith("`") ? " " : "";
|
|
224
224
|
return `${a}${o}${t.renderChildren(e.content)}${o}${a}`;
|
|
225
225
|
},
|
|
226
226
|
addCommands() {
|
|
@@ -234,18 +234,18 @@ var Oe = y.create({
|
|
|
234
234
|
return { "Mod-e": () => this.editor.commands.toggleCode() };
|
|
235
235
|
},
|
|
236
236
|
addInputRules() {
|
|
237
|
-
return [
|
|
238
|
-
find:
|
|
237
|
+
return [T({
|
|
238
|
+
find: Ce,
|
|
239
239
|
type: this.type
|
|
240
240
|
})];
|
|
241
241
|
},
|
|
242
242
|
addPasteRules() {
|
|
243
|
-
return [
|
|
244
|
-
find:
|
|
243
|
+
return [w({
|
|
244
|
+
find: we,
|
|
245
245
|
type: this.type
|
|
246
246
|
})];
|
|
247
247
|
}
|
|
248
|
-
}),
|
|
248
|
+
}), P = 4, De = /^```([a-z]+)?[\s\n]$/, Oe = /^~~~([a-z]+)?[\s\n]$/, ke = C.create({
|
|
249
249
|
name: "codeBlock",
|
|
250
250
|
addOptions() {
|
|
251
251
|
return {
|
|
@@ -255,7 +255,7 @@ var Oe = y.create({
|
|
|
255
255
|
exitOnArrowUp: !0,
|
|
256
256
|
defaultLanguage: null,
|
|
257
257
|
enableTabIndentation: !1,
|
|
258
|
-
tabSize:
|
|
258
|
+
tabSize: P,
|
|
259
259
|
HTMLAttributes: {}
|
|
260
260
|
};
|
|
261
261
|
},
|
|
@@ -283,7 +283,7 @@ var Oe = y.create({
|
|
|
283
283
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
284
284
|
return [
|
|
285
285
|
"pre",
|
|
286
|
-
|
|
286
|
+
y(this.options.HTMLAttributes, t),
|
|
287
287
|
[
|
|
288
288
|
"code",
|
|
289
289
|
{ class: e.attrs.language ? this.options.languageClassPrefix + e.attrs.language : null },
|
|
@@ -316,7 +316,7 @@ var Oe = y.create({
|
|
|
316
316
|
},
|
|
317
317
|
Tab: ({ editor: e }) => {
|
|
318
318
|
if (!this.options.enableTabIndentation) return !1;
|
|
319
|
-
let t = this.options.tabSize ??
|
|
319
|
+
let t = this.options.tabSize ?? P, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
320
320
|
if (i.parent.type !== this.type) return !1;
|
|
321
321
|
let o = " ".repeat(t);
|
|
322
322
|
return a ? e.commands.insertContent(o) : e.commands.command(({ tr: e }) => {
|
|
@@ -326,21 +326,21 @@ var Oe = y.create({
|
|
|
326
326
|
},
|
|
327
327
|
"Shift-Tab": ({ editor: e }) => {
|
|
328
328
|
if (!this.options.enableTabIndentation) return !1;
|
|
329
|
-
let t = this.options.tabSize ??
|
|
329
|
+
let t = this.options.tabSize ?? P, { state: n } = e, { selection: r } = n, { $from: i, empty: a } = r;
|
|
330
330
|
return i.parent.type === this.type ? a ? e.commands.command(({ tr: e }) => {
|
|
331
|
-
let { pos: r } = i, a = i.start(), o = i.end(), s = n.doc.textBetween(a, o, "\n", "\n").split("\n"),
|
|
331
|
+
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;
|
|
332
332
|
for (let e = 0; e < s.length; e += 1) {
|
|
333
|
-
if (
|
|
334
|
-
|
|
333
|
+
if (l + s[e].length >= u) {
|
|
334
|
+
c = e;
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
|
-
|
|
337
|
+
l += s[e].length + 1;
|
|
338
338
|
}
|
|
339
|
-
let
|
|
340
|
-
if (
|
|
341
|
-
let
|
|
342
|
-
for (let e = 0; e <
|
|
343
|
-
return e.delete(
|
|
339
|
+
let d = s[c].match(/^ */)?.[0] || "", f = Math.min(d.length, t);
|
|
340
|
+
if (f === 0) return !0;
|
|
341
|
+
let p = a;
|
|
342
|
+
for (let e = 0; e < c; e += 1) p += s[e].length + 1;
|
|
343
|
+
return e.delete(p, p + f), r - p <= f && e.setSelection(b.create(e.doc, p)), !0;
|
|
344
344
|
}) : e.commands.command(({ tr: e }) => {
|
|
345
345
|
let { from: i, to: a } = r, o = n.doc.textBetween(i, a, "\n", "\n").split("\n").map((e) => {
|
|
346
346
|
let n = e.match(/^ */)?.[0] || "", r = Math.min(n.length, t);
|
|
@@ -363,44 +363,44 @@ var Oe = y.create({
|
|
|
363
363
|
let a = r.before();
|
|
364
364
|
return a > 0 ? !1 : e.commands.insertDefaultBlock({ pos: a });
|
|
365
365
|
},
|
|
366
|
-
ArrowDown: ({ editor:
|
|
366
|
+
ArrowDown: ({ editor: t }) => {
|
|
367
367
|
if (!this.options.exitOnArrowDown) return !1;
|
|
368
|
-
let { state:
|
|
369
|
-
if (!
|
|
370
|
-
let
|
|
371
|
-
return
|
|
368
|
+
let { state: n } = t, { selection: r, doc: i } = n, { $from: a, empty: o } = r;
|
|
369
|
+
if (!o || a.parent.type !== this.type || a.parentOffset !== a.parent.nodeSize - 2) return !1;
|
|
370
|
+
let s = a.after();
|
|
371
|
+
return s === void 0 ? !1 : i.nodeAt(s) ? t.commands.command(({ tr: t }) => (t.setSelection(e.near(i.resolve(s))), !0)) : t.commands.exitCode();
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
},
|
|
375
375
|
addInputRules() {
|
|
376
|
-
return [
|
|
377
|
-
find:
|
|
376
|
+
return [u({
|
|
377
|
+
find: De,
|
|
378
378
|
type: this.type,
|
|
379
379
|
getAttributes: (e) => ({ language: e[1] })
|
|
380
|
-
}),
|
|
381
|
-
find:
|
|
380
|
+
}), u({
|
|
381
|
+
find: Oe,
|
|
382
382
|
type: this.type,
|
|
383
383
|
getAttributes: (e) => ({ language: e[1] })
|
|
384
384
|
})];
|
|
385
385
|
},
|
|
386
386
|
addProseMirrorPlugins() {
|
|
387
|
-
return [new
|
|
388
|
-
key: new
|
|
387
|
+
return [new v({
|
|
388
|
+
key: new l("codeBlockVSCodeHandler"),
|
|
389
389
|
props: { handlePaste: (e, t) => {
|
|
390
390
|
if (!t.clipboardData || this.editor.isActive(this.type.name)) return !1;
|
|
391
391
|
let n = t.clipboardData.getData("text/plain"), r = t.clipboardData.getData("vscode-editor-data"), i = (r ? JSON.parse(r) : void 0)?.mode;
|
|
392
392
|
if (!n || !i) return !1;
|
|
393
393
|
let { tr: a, schema: o } = e.state, s = o.text(n.replace(/\r\n?/g, "\n"));
|
|
394
|
-
return a.replaceSelectionWith(this.type.create({ language: i }, s)), a.selection.$from.parent.type !== this.type && a.setSelection(
|
|
394
|
+
return a.replaceSelectionWith(this.type.create({ language: i }, s)), a.selection.$from.parent.type !== this.type && a.setSelection(b.near(a.doc.resolve(Math.max(0, a.selection.from - 2)))), a.setMeta("paste", !0), e.dispatch(a), !0;
|
|
395
395
|
} }
|
|
396
396
|
})];
|
|
397
397
|
}
|
|
398
|
-
}),
|
|
398
|
+
}), Ae = C.create({
|
|
399
399
|
name: "doc",
|
|
400
400
|
topNode: !0,
|
|
401
401
|
content: "block+",
|
|
402
402
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n\n") : ""
|
|
403
|
-
}),
|
|
403
|
+
}), je = C.create({
|
|
404
404
|
name: "hardBreak",
|
|
405
405
|
markdownTokenName: "br",
|
|
406
406
|
addOptions() {
|
|
@@ -417,7 +417,7 @@ var Oe = y.create({
|
|
|
417
417
|
return [{ tag: "br" }];
|
|
418
418
|
},
|
|
419
419
|
renderHTML({ HTMLAttributes: e }) {
|
|
420
|
-
return ["br",
|
|
420
|
+
return ["br", y(this.options.HTMLAttributes, e)];
|
|
421
421
|
},
|
|
422
422
|
renderText() {
|
|
423
423
|
return "\n";
|
|
@@ -444,7 +444,7 @@ var Oe = y.create({
|
|
|
444
444
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
-
}),
|
|
447
|
+
}), Me = C.create({
|
|
448
448
|
name: "heading",
|
|
449
449
|
addOptions() {
|
|
450
450
|
return {
|
|
@@ -477,11 +477,14 @@ var Oe = y.create({
|
|
|
477
477
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
478
478
|
return [
|
|
479
479
|
`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`,
|
|
480
|
-
|
|
480
|
+
y(this.options.HTMLAttributes, t),
|
|
481
481
|
0
|
|
482
482
|
];
|
|
483
483
|
},
|
|
484
|
-
parseMarkdown
|
|
484
|
+
parseMarkdown(e, t) {
|
|
485
|
+
let n = e.depth || 1;
|
|
486
|
+
return this.options.levels.includes(n) ? t.createNode("heading", { level: n }, t.parseInline(e.tokens || [])) : t.createNode("paragraph", void 0, t.parseInline(e.tokens || []));
|
|
487
|
+
},
|
|
485
488
|
renderMarkdown: (e, t) => {
|
|
486
489
|
let n = e.attrs?.level ? parseInt(e.attrs.level, 10) : 1, r = "#".repeat(n);
|
|
487
490
|
return e.content ? `${r} ${t.renderChildren(e.content)}` : "";
|
|
@@ -499,13 +502,13 @@ var Oe = y.create({
|
|
|
499
502
|
}), {});
|
|
500
503
|
},
|
|
501
504
|
addInputRules() {
|
|
502
|
-
return this.options.levels.map((e) =>
|
|
505
|
+
return this.options.levels.map((e) => u({
|
|
503
506
|
find: RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
504
507
|
type: this.type,
|
|
505
508
|
getAttributes: { level: e }
|
|
506
509
|
}));
|
|
507
510
|
}
|
|
508
|
-
}),
|
|
511
|
+
}), Ne = C.create({
|
|
509
512
|
name: "horizontalRule",
|
|
510
513
|
addOptions() {
|
|
511
514
|
return {
|
|
@@ -518,22 +521,22 @@ var Oe = y.create({
|
|
|
518
521
|
return [{ tag: "hr" }];
|
|
519
522
|
},
|
|
520
523
|
renderHTML({ HTMLAttributes: e }) {
|
|
521
|
-
return ["hr",
|
|
524
|
+
return ["hr", y(this.options.HTMLAttributes, e)];
|
|
522
525
|
},
|
|
523
526
|
markdownTokenName: "hr",
|
|
524
527
|
parseMarkdown: (e, t) => t.createNode("horizontalRule"),
|
|
525
528
|
renderMarkdown: () => "---",
|
|
526
529
|
addCommands() {
|
|
527
530
|
return { setHorizontalRule: () => ({ chain: e, state: t }) => {
|
|
528
|
-
if (!
|
|
529
|
-
let { selection: n } = t, { $to:
|
|
530
|
-
return
|
|
531
|
+
if (!d(t, t.schema.nodes[this.name])) return !1;
|
|
532
|
+
let { selection: n } = t, { $to: r } = n, a = e();
|
|
533
|
+
return i(n) ? a.insertContentAt(r.pos, { type: this.name }) : a.insertContent({ type: this.name }), a.command(({ state: e, tr: t, dispatch: n }) => {
|
|
531
534
|
if (n) {
|
|
532
535
|
let { $to: n } = t.selection, r = n.end();
|
|
533
|
-
if (n.nodeAfter) n.nodeAfter.isTextblock ? t.setSelection(
|
|
536
|
+
if (n.nodeAfter) n.nodeAfter.isTextblock ? t.setSelection(b.create(t.doc, n.pos + 1)) : n.nodeAfter.isBlock ? t.setSelection(g.create(t.doc, n.pos)) : t.setSelection(b.create(t.doc, n.pos));
|
|
534
537
|
else {
|
|
535
538
|
let i = (e.schema.nodes[this.options.nextNodeType] || n.parent.type.contentMatch.defaultType)?.create();
|
|
536
|
-
i && (t.insert(r, i), t.setSelection(
|
|
539
|
+
i && (t.insert(r, i), t.setSelection(b.create(t.doc, r + 1)));
|
|
537
540
|
}
|
|
538
541
|
t.scrollIntoView();
|
|
539
542
|
}
|
|
@@ -547,7 +550,7 @@ var Oe = y.create({
|
|
|
547
550
|
type: this.type
|
|
548
551
|
})];
|
|
549
552
|
}
|
|
550
|
-
}),
|
|
553
|
+
}), Pe = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Fe = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ie = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Le = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Re = x.create({
|
|
551
554
|
name: "italic",
|
|
552
555
|
addOptions() {
|
|
553
556
|
return { HTMLAttributes: {} };
|
|
@@ -569,7 +572,7 @@ var Oe = y.create({
|
|
|
569
572
|
renderHTML({ HTMLAttributes: e }) {
|
|
570
573
|
return [
|
|
571
574
|
"em",
|
|
572
|
-
|
|
575
|
+
y(this.options.HTMLAttributes, e),
|
|
573
576
|
0
|
|
574
577
|
];
|
|
575
578
|
},
|
|
@@ -594,24 +597,24 @@ var Oe = y.create({
|
|
|
594
597
|
};
|
|
595
598
|
},
|
|
596
599
|
addInputRules() {
|
|
597
|
-
return [
|
|
598
|
-
find:
|
|
600
|
+
return [T({
|
|
601
|
+
find: Pe,
|
|
599
602
|
type: this.type
|
|
600
|
-
}),
|
|
601
|
-
find:
|
|
603
|
+
}), T({
|
|
604
|
+
find: Ie,
|
|
602
605
|
type: this.type
|
|
603
606
|
})];
|
|
604
607
|
},
|
|
605
608
|
addPasteRules() {
|
|
606
|
-
return [
|
|
607
|
-
find:
|
|
609
|
+
return [w({
|
|
610
|
+
find: Fe,
|
|
608
611
|
type: this.type
|
|
609
|
-
}),
|
|
610
|
-
find:
|
|
612
|
+
}), w({
|
|
613
|
+
find: Le,
|
|
611
614
|
type: this.type
|
|
612
615
|
})];
|
|
613
616
|
}
|
|
614
|
-
}),
|
|
617
|
+
}), ze = "listItem", Be = "textStyle", Ve = /^\s*([-+*])\s$/, He = C.create({
|
|
615
618
|
name: "bulletList",
|
|
616
619
|
addOptions() {
|
|
617
620
|
return {
|
|
@@ -631,7 +634,7 @@ var Oe = y.create({
|
|
|
631
634
|
renderHTML({ HTMLAttributes: e }) {
|
|
632
635
|
return [
|
|
633
636
|
"ul",
|
|
634
|
-
|
|
637
|
+
y(this.options.HTMLAttributes, e),
|
|
635
638
|
0
|
|
636
639
|
];
|
|
637
640
|
},
|
|
@@ -643,26 +646,26 @@ var Oe = y.create({
|
|
|
643
646
|
renderMarkdown: (e, t) => e.content ? t.renderChildren(e.content, "\n") : "",
|
|
644
647
|
markdownOptions: { indentsContent: !0 },
|
|
645
648
|
addCommands() {
|
|
646
|
-
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
649
|
+
return { toggleBulletList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(ze, this.editor.getAttributes(Be)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
647
650
|
},
|
|
648
651
|
addKeyboardShortcuts() {
|
|
649
652
|
return { "Mod-Shift-8": () => this.editor.commands.toggleBulletList() };
|
|
650
653
|
},
|
|
651
654
|
addInputRules() {
|
|
652
|
-
let
|
|
653
|
-
find:
|
|
655
|
+
let e = t({
|
|
656
|
+
find: Ve,
|
|
654
657
|
type: this.type
|
|
655
658
|
});
|
|
656
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (
|
|
657
|
-
find:
|
|
659
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (e = t({
|
|
660
|
+
find: Ve,
|
|
658
661
|
type: this.type,
|
|
659
662
|
keepMarks: this.options.keepMarks,
|
|
660
663
|
keepAttributes: this.options.keepAttributes,
|
|
661
|
-
getAttributes: () => this.editor.getAttributes(
|
|
664
|
+
getAttributes: () => this.editor.getAttributes(Be),
|
|
662
665
|
editor: this.editor
|
|
663
|
-
})), [
|
|
666
|
+
})), [e];
|
|
664
667
|
}
|
|
665
|
-
}),
|
|
668
|
+
}), Ue = (e, t, n) => {
|
|
666
669
|
let { selection: r } = e;
|
|
667
670
|
if (!r.empty) return null;
|
|
668
671
|
let { $from: i } = r;
|
|
@@ -693,18 +696,18 @@ var Oe = y.create({
|
|
|
693
696
|
insertPos: i.after(a),
|
|
694
697
|
items: f
|
|
695
698
|
};
|
|
696
|
-
},
|
|
697
|
-
let i =
|
|
699
|
+
}, We = (e, t, n, r) => {
|
|
700
|
+
let i = Ue(e, n, r);
|
|
698
701
|
if (!i) return !1;
|
|
699
702
|
let { selection: a } = e, { nestedList: o, nestedListPos: s, insertPos: c, items: l } = i, u = e.tr;
|
|
700
703
|
u.delete(s, s + o.nodeSize);
|
|
701
704
|
let d = u.mapping.map(c);
|
|
702
|
-
return u.insert(d,
|
|
703
|
-
},
|
|
705
|
+
return u.insert(d, D.from(l)), u.setSelection(a.map(u.doc, u.mapping)), t && t(u), !0;
|
|
706
|
+
}, Ge = (e, t, n) => We(e.state, e.view.dispatch, t, n), Ke = (e, t) => O.create({
|
|
704
707
|
name: `${e}BranchingDeleteKeymap`,
|
|
705
708
|
priority: 101,
|
|
706
709
|
addKeyboardShortcuts() {
|
|
707
|
-
let n = () =>
|
|
710
|
+
let n = () => Ge(this.editor, e, t);
|
|
708
711
|
return {
|
|
709
712
|
Delete: n,
|
|
710
713
|
"Mod-Delete": n
|
|
@@ -724,16 +727,16 @@ var Oe = y.create({
|
|
|
724
727
|
[5, "v"],
|
|
725
728
|
[4, "iv"],
|
|
726
729
|
[1, "i"]
|
|
727
|
-
], I = "abcdefghijklmnopqrstuvwxyz",
|
|
728
|
-
function
|
|
730
|
+
], I = "abcdefghijklmnopqrstuvwxyz", L = String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;
|
|
731
|
+
function R(e) {
|
|
729
732
|
let t = e, n = "";
|
|
730
733
|
for (let [e, r] of F) for (; t >= e;) n += r, t -= e;
|
|
731
734
|
return n;
|
|
732
735
|
}
|
|
733
|
-
function
|
|
734
|
-
return
|
|
736
|
+
function z(e) {
|
|
737
|
+
return R(e).toUpperCase();
|
|
735
738
|
}
|
|
736
|
-
function
|
|
739
|
+
function qe(e) {
|
|
737
740
|
let t = e.toLowerCase(), n = 0, r = 0;
|
|
738
741
|
for (; n < t.length;) {
|
|
739
742
|
let e = !1;
|
|
@@ -745,12 +748,12 @@ function Ke(e) {
|
|
|
745
748
|
}
|
|
746
749
|
return r;
|
|
747
750
|
}
|
|
748
|
-
function
|
|
751
|
+
function Je(e) {
|
|
749
752
|
if (!/^[ivxlcdmIVXLCDM]+$/.test(e)) return !1;
|
|
750
|
-
let t =
|
|
751
|
-
return t <= 0 ? !1 : (e === e.toLowerCase() ?
|
|
753
|
+
let t = qe(e);
|
|
754
|
+
return t <= 0 ? !1 : (e === e.toLowerCase() ? R(t) : z(t)) === e;
|
|
752
755
|
}
|
|
753
|
-
function
|
|
756
|
+
function Ye(e) {
|
|
754
757
|
let t = e.toLowerCase();
|
|
755
758
|
if (t.length === 1) return t.charCodeAt(0) - 97 + 1;
|
|
756
759
|
if (t.length === 2) {
|
|
@@ -759,82 +762,93 @@ function Je(e) {
|
|
|
759
762
|
}
|
|
760
763
|
return 0;
|
|
761
764
|
}
|
|
762
|
-
function
|
|
765
|
+
function B(e) {
|
|
763
766
|
if (e <= 26) return I[e - 1];
|
|
764
767
|
let t = Math.floor((e - 1) / 26) - 1, n = (e - 1) % 26;
|
|
765
768
|
return t < 0 ? I[n] : I[t] + I[n];
|
|
766
769
|
}
|
|
767
|
-
function
|
|
770
|
+
function V(e) {
|
|
768
771
|
if (e && !/^\d+$/.test(e)) {
|
|
769
|
-
if (
|
|
772
|
+
if (Je(e)) return e === e.toLowerCase() ? "i" : "I";
|
|
770
773
|
if (/^[a-z]{1,2}$/.test(e)) return "a";
|
|
771
774
|
if (/^[A-Z]{1,2}$/.test(e)) return "A";
|
|
772
775
|
}
|
|
773
776
|
}
|
|
774
|
-
function
|
|
777
|
+
function H(e) {
|
|
775
778
|
if (/^\d+$/.test(e)) return parseInt(e, 10);
|
|
776
|
-
let t =
|
|
777
|
-
if (t === "i" || t === "I") return
|
|
779
|
+
let t = V(e);
|
|
780
|
+
if (t === "i" || t === "I") return qe(e);
|
|
778
781
|
if (t === "a" || t === "A") {
|
|
779
|
-
let t =
|
|
782
|
+
let t = Ye(e);
|
|
780
783
|
return t > 0 ? t : 1;
|
|
781
784
|
}
|
|
782
785
|
let n = parseInt(e, 10);
|
|
783
786
|
return Number.isNaN(n) ? 1 : n;
|
|
784
787
|
}
|
|
785
|
-
function
|
|
788
|
+
function Xe(e, t) {
|
|
786
789
|
if (e === "numeric") return String(t);
|
|
787
790
|
switch (e) {
|
|
788
|
-
case "a": return
|
|
789
|
-
case "A": return
|
|
790
|
-
case "i": return
|
|
791
|
-
case "I": return
|
|
791
|
+
case "a": return B(t);
|
|
792
|
+
case "A": return B(t).toUpperCase();
|
|
793
|
+
case "i": return R(t);
|
|
794
|
+
case "I": return z(t);
|
|
792
795
|
default: return String(t);
|
|
793
796
|
}
|
|
794
797
|
}
|
|
795
|
-
function
|
|
798
|
+
function Ze(e) {
|
|
796
799
|
if (e.length === 0) return !1;
|
|
797
|
-
let t =
|
|
800
|
+
let t = V(e[0]) ?? "numeric", n = H(e[0]);
|
|
798
801
|
if (n < 1) return !1;
|
|
799
802
|
for (let r = 0; r < e.length; r++) {
|
|
800
|
-
let i =
|
|
803
|
+
let i = Xe(t, n + r);
|
|
801
804
|
if (e[r] !== i) return !1;
|
|
802
805
|
}
|
|
803
806
|
return !0;
|
|
804
807
|
}
|
|
805
|
-
function
|
|
808
|
+
function Qe(e) {
|
|
806
809
|
return {
|
|
807
|
-
type:
|
|
808
|
-
start:
|
|
810
|
+
type: V(e),
|
|
811
|
+
start: H(e)
|
|
809
812
|
};
|
|
810
813
|
}
|
|
811
|
-
function
|
|
812
|
-
let { type: t, start: n } =
|
|
814
|
+
function $e(e) {
|
|
815
|
+
let { type: t, start: n } = Qe(e), r = {};
|
|
813
816
|
return t && (r.type = t), n !== 1 && (r.start = n), r;
|
|
814
817
|
}
|
|
815
|
-
function
|
|
818
|
+
function et(e, t, n = ". ") {
|
|
816
819
|
let r = t + 1;
|
|
817
820
|
if (!e || e === "1") return `${r}${n}`;
|
|
818
821
|
switch (e) {
|
|
819
|
-
case "a": return `${
|
|
820
|
-
case "A": return `${
|
|
821
|
-
case "i": return `${
|
|
822
|
-
case "I": return `${
|
|
822
|
+
case "a": return `${B(r)}${n}`;
|
|
823
|
+
case "A": return `${B(r).toUpperCase()}${n}`;
|
|
824
|
+
case "i": return `${R(r)}${n}`;
|
|
825
|
+
case "I": return `${z(r)}${n}`;
|
|
823
826
|
default: return `${r}${n}`;
|
|
824
827
|
}
|
|
825
828
|
}
|
|
826
|
-
function
|
|
829
|
+
function tt(e) {
|
|
830
|
+
return !e[0] || e[0].type === "paragraph" ? e : [{
|
|
831
|
+
type: "paragraph",
|
|
832
|
+
content: []
|
|
833
|
+
}, ...e];
|
|
834
|
+
}
|
|
835
|
+
function nt(e) {
|
|
836
|
+
let t = e.content?.[0];
|
|
837
|
+
return t?.type === "paragraph" && !t.content?.length;
|
|
838
|
+
}
|
|
839
|
+
var rt = " ", it = 1, at = (e) => (e?.level ?? it) > it;
|
|
840
|
+
function ot(e) {
|
|
827
841
|
let t = e.tokens?.[0];
|
|
828
842
|
return !!(e.text && e.tokens?.length === 1 && t?.type === "list" && t.ordered && t.raw === e.text);
|
|
829
843
|
}
|
|
830
|
-
function
|
|
844
|
+
function st(e, t) {
|
|
831
845
|
return t.tokenizeInline ? t.parseInline(t.tokenizeInline(e)) : t.parseInline([{
|
|
832
846
|
type: "text",
|
|
833
847
|
raw: e,
|
|
834
848
|
text: e
|
|
835
849
|
}]);
|
|
836
850
|
}
|
|
837
|
-
var
|
|
851
|
+
var ct = C.create({
|
|
838
852
|
name: "listItem",
|
|
839
853
|
addOptions() {
|
|
840
854
|
return {
|
|
@@ -851,7 +865,7 @@ var nt = b.create({
|
|
|
851
865
|
renderHTML({ HTMLAttributes: e }) {
|
|
852
866
|
return [
|
|
853
867
|
"li",
|
|
854
|
-
|
|
868
|
+
y(this.options.HTMLAttributes, e),
|
|
855
869
|
0
|
|
856
870
|
];
|
|
857
871
|
},
|
|
@@ -860,46 +874,56 @@ var nt = b.create({
|
|
|
860
874
|
if (e.type !== "list_item") return [];
|
|
861
875
|
let n = t.parseBlockChildren ?? t.parseChildren, r = [];
|
|
862
876
|
if (e.tokens && e.tokens.length > 0) {
|
|
863
|
-
if (
|
|
877
|
+
if (ot(e)) return {
|
|
864
878
|
type: "listItem",
|
|
865
879
|
content: [{
|
|
866
880
|
type: "paragraph",
|
|
867
|
-
content:
|
|
881
|
+
content: st(e.text || "", t)
|
|
868
882
|
}]
|
|
869
883
|
};
|
|
884
|
+
let [i, ...a] = e.tokens;
|
|
885
|
+
if (i.type === "heading") return {
|
|
886
|
+
type: "listItem",
|
|
887
|
+
content: [{
|
|
888
|
+
type: "paragraph",
|
|
889
|
+
content: t.parseInline(i.tokens ?? [])
|
|
890
|
+
}, ...a.length > 0 ? n(a) : []]
|
|
891
|
+
};
|
|
870
892
|
if (e.tokens.some((e) => e.type === "paragraph")) r = n(e.tokens);
|
|
871
|
-
else {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
}
|
|
881
|
-
} else r = n(e.tokens);
|
|
882
|
-
}
|
|
893
|
+
else if (i.type === "text" && i.tokens && i.tokens.length > 0) {
|
|
894
|
+
if (r = [{
|
|
895
|
+
type: "paragraph",
|
|
896
|
+
content: t.parseInline(i.tokens)
|
|
897
|
+
}], e.tokens.length > 1) {
|
|
898
|
+
let t = n(e.tokens.slice(1));
|
|
899
|
+
r.push(...t);
|
|
900
|
+
}
|
|
901
|
+
} else r = n(e.tokens);
|
|
883
902
|
}
|
|
884
903
|
return r.length === 0 && (r = [{
|
|
885
904
|
type: "paragraph",
|
|
886
905
|
content: []
|
|
887
906
|
}]), {
|
|
888
907
|
type: "listItem",
|
|
889
|
-
content: r
|
|
908
|
+
content: tt(r)
|
|
890
909
|
};
|
|
891
910
|
},
|
|
892
|
-
renderMarkdown: (e, t, n) =>
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
911
|
+
renderMarkdown: (e, t, n) => {
|
|
912
|
+
let r = (e) => {
|
|
913
|
+
if (e.parentType === "bulletList") return "- ";
|
|
914
|
+
if (e.parentType === "orderedList") {
|
|
915
|
+
var t, n;
|
|
916
|
+
let r = ((t = e.meta) == null || (t = t.parentAttrs) == null ? void 0 : t.start) || 1;
|
|
917
|
+
return et((n = e.meta) == null || (n = n.parentAttrs) == null ? void 0 : n.type, r - 1 + (e.index || 0), ". ");
|
|
918
|
+
}
|
|
919
|
+
return "- ";
|
|
920
|
+
}, i = c(e, t, r, n, { alignNestedToPrefix: n?.parentType === "orderedList" });
|
|
921
|
+
if (!nt(e) || !at(n)) return i;
|
|
922
|
+
let a = r(n);
|
|
923
|
+
return `${a}${rt}${i.slice(a.length)}`;
|
|
924
|
+
},
|
|
901
925
|
addExtensions() {
|
|
902
|
-
return [
|
|
926
|
+
return [Ke(this.name, [this.options.bulletListTypeName, this.options.orderedListTypeName])];
|
|
903
927
|
},
|
|
904
928
|
addKeyboardShortcuts() {
|
|
905
929
|
return {
|
|
@@ -908,67 +932,63 @@ var nt = b.create({
|
|
|
908
932
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
909
933
|
};
|
|
910
934
|
}
|
|
911
|
-
}),
|
|
912
|
-
let { $from: n } = t.selection, r =
|
|
935
|
+
}), U = (e, t) => {
|
|
936
|
+
let { $from: n } = t.selection, r = te(e, t.schema), i = null, a = n.depth, o = n.pos, s = null;
|
|
913
937
|
for (; a > 0 && s === null;) i = n.node(a), i.type === r ? s = a : (--a, --o);
|
|
914
938
|
return s === null ? null : {
|
|
915
939
|
$pos: t.doc.resolve(o),
|
|
916
940
|
depth: s
|
|
917
941
|
};
|
|
918
|
-
},
|
|
919
|
-
let n =
|
|
942
|
+
}, lt = (e, t) => {
|
|
943
|
+
let n = U(e, t);
|
|
920
944
|
if (!n) return !1;
|
|
921
945
|
let [, r] = ce(t, e, n.$pos.pos + 4);
|
|
922
946
|
return r;
|
|
923
|
-
},
|
|
947
|
+
}, ut = (e, t, n) => {
|
|
924
948
|
let { $anchor: r } = e.selection, i = Math.max(0, r.pos - 2), a = e.doc.resolve(i).node();
|
|
925
949
|
return !(!a || !n.includes(a.type.name));
|
|
926
|
-
},
|
|
950
|
+
}, dt = (e, t, r) => {
|
|
927
951
|
if (e.commands.undoInputRule()) return !0;
|
|
928
952
|
if (e.state.selection.from !== e.state.selection.to) return !1;
|
|
929
|
-
if (!
|
|
930
|
-
let { $anchor:
|
|
931
|
-
r.node().descendants((e,
|
|
932
|
-
e.type.name ===
|
|
953
|
+
if (!n(e.state, t) && ut(e.state, t, r)) {
|
|
954
|
+
let { $anchor: n } = e.state.selection, r = e.state.doc.resolve(n.before() - 1), i = [];
|
|
955
|
+
r.node().descendants((e, n) => {
|
|
956
|
+
e.type.name === t && i.push({
|
|
933
957
|
node: e,
|
|
934
|
-
pos:
|
|
958
|
+
pos: n
|
|
935
959
|
});
|
|
936
960
|
});
|
|
937
|
-
let
|
|
938
|
-
if (!
|
|
939
|
-
let
|
|
940
|
-
return e.chain().
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
},
|
|
944
|
-
}
|
|
945
|
-
if (!
|
|
946
|
-
let { $from: i } = e.state.selection,
|
|
947
|
-
return i.node(
|
|
948
|
-
},
|
|
949
|
-
let n =
|
|
961
|
+
let o = i.at(-1);
|
|
962
|
+
if (!o) return !1;
|
|
963
|
+
let s = e.state.doc.resolve(r.start() + o.pos + 1);
|
|
964
|
+
return e.chain().command(({ tr: e }) => {
|
|
965
|
+
let t = s.end();
|
|
966
|
+
return e.delete(n.before(), n.after()).insert(t, n.parent), e.setSelection(b.create(e.doc, t + 1)), !0;
|
|
967
|
+
}).command(({ state: e, dispatch: t }) => (a(e, t), !0)).run();
|
|
968
|
+
}
|
|
969
|
+
if (!n(e.state, t) || !s(e.state)) return !1;
|
|
970
|
+
let { $from: i } = e.state.selection, o = i.depth - 1;
|
|
971
|
+
return i.node(o).type !== e.schema.nodes[t] || i.index(o) !== 0 ? !1 : e.chain().liftListItem(t).run();
|
|
972
|
+
}, ft = (e, t) => {
|
|
973
|
+
let n = lt(e, t), r = U(e, t);
|
|
950
974
|
return !r || !n ? !1 : n > r.depth;
|
|
951
|
-
},
|
|
952
|
-
let n =
|
|
975
|
+
}, pt = (e, t) => {
|
|
976
|
+
let n = lt(e, t), r = U(e, t);
|
|
953
977
|
return !r || !n ? !1 : n < r.depth;
|
|
954
|
-
},
|
|
955
|
-
if (!t(e.state, n) || !ie(e.state, n)) return !1;
|
|
956
|
-
let { selection: r } = e.state, { $from: i, $to: a } = r;
|
|
957
|
-
return !r.empty && i.sameParent(a) ? !1 : at(n, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(n).joinBackward().run() : ot(n, e.state) ? e.chain().joinForward().joinBackward().run() : e.commands.joinItemForward();
|
|
958
|
-
}, ct = (e, n, r) => {
|
|
978
|
+
}, mt = (e, t) => !n(e.state, t) || !re(e.state, t) || !e.state.selection.empty ? !1 : ft(t, e.state) ? e.chain().focus(e.state.selection.from + 4).lift(t).joinBackward().run() : pt(t, e.state) ? e.commands.command(({ state: e, dispatch: t }) => _(e, t)) : e.commands.joinItemForward(), ht = (e, t, r) => {
|
|
959
979
|
let { state: i } = e, { selection: a } = i;
|
|
960
980
|
if (!a.empty) return !1;
|
|
961
981
|
let { $from: o } = a;
|
|
962
|
-
if (o.parentOffset !== 0 || !o.parent.isTextblock ||
|
|
982
|
+
if (o.parentOffset !== 0 || !o.parent.isTextblock || n(i, t)) return !1;
|
|
963
983
|
let s = se(o);
|
|
964
984
|
if (!s || !r.includes(s.type.name)) return !1;
|
|
965
|
-
let
|
|
966
|
-
if (!
|
|
967
|
-
let
|
|
968
|
-
if (!
|
|
969
|
-
let
|
|
970
|
-
return e.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(
|
|
971
|
-
},
|
|
985
|
+
let c = s.lastChild;
|
|
986
|
+
if (!c || c.type.name !== t) return !1;
|
|
987
|
+
let l = o.parent;
|
|
988
|
+
if (!c.canReplace(c.childCount, c.childCount, D.from(l))) return !1;
|
|
989
|
+
let u = o.before(), d = o.after(), f = u - 2;
|
|
990
|
+
return e.commands.command(({ tr: e, dispatch: t }) => (t && (e.delete(u, d).insert(f, D.from(l)), e.setSelection(b.create(e.doc, f + 1)), e.scrollIntoView()), !0));
|
|
991
|
+
}, W = O.create({
|
|
972
992
|
name: "listKeymap",
|
|
973
993
|
addOptions() {
|
|
974
994
|
return { listTypes: [{
|
|
@@ -984,74 +1004,74 @@ var nt = b.create({
|
|
|
984
1004
|
Delete: ({ editor: e }) => {
|
|
985
1005
|
let t = !1;
|
|
986
1006
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
987
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
1007
|
+
e.state.schema.nodes[n] !== void 0 && mt(e, n) && (t = !0);
|
|
988
1008
|
}), t;
|
|
989
1009
|
},
|
|
990
1010
|
"Mod-Delete": ({ editor: e }) => {
|
|
991
1011
|
let t = !1;
|
|
992
1012
|
return this.options.listTypes.forEach(({ itemName: n }) => {
|
|
993
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
1013
|
+
e.state.schema.nodes[n] !== void 0 && mt(e, n) && (t = !0);
|
|
994
1014
|
}), t;
|
|
995
1015
|
},
|
|
996
1016
|
Backspace: ({ editor: e }) => {
|
|
997
1017
|
let t = !1;
|
|
998
1018
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
999
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
1019
|
+
e.state.schema.nodes[n] !== void 0 && dt(e, n, r) && (t = !0);
|
|
1000
1020
|
}), t;
|
|
1001
1021
|
},
|
|
1002
1022
|
"Mod-Backspace": ({ editor: e }) => {
|
|
1003
1023
|
let t = !1;
|
|
1004
1024
|
return this.options.listTypes.forEach(({ itemName: n, wrapperNames: r }) => {
|
|
1005
|
-
e.state.schema.nodes[n] !== void 0 &&
|
|
1025
|
+
e.state.schema.nodes[n] !== void 0 && dt(e, n, r) && (t = !0);
|
|
1006
1026
|
}), t;
|
|
1007
1027
|
},
|
|
1008
1028
|
Tab: ({ editor: e }) => {
|
|
1009
|
-
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 &&
|
|
1029
|
+
for (let { itemName: t, wrapperNames: n } of this.options.listTypes) if (e.state.schema.nodes[t] !== void 0 && ht(e, t, n)) return !0;
|
|
1010
1030
|
return !1;
|
|
1011
1031
|
}
|
|
1012
1032
|
};
|
|
1013
1033
|
}
|
|
1014
|
-
}),
|
|
1034
|
+
}), G = RegExp(`^(\\s*)(${L})([.)])\\s+(.*)$`), gt = /^\s/, K = {
|
|
1015
1035
|
heading: /^#{1,6}(?:\s|$)/,
|
|
1016
1036
|
bulletItem: /^[-+*]\s+/,
|
|
1017
1037
|
codeFence: /^(?:```|~~~)/,
|
|
1018
1038
|
blockMath: /^\$\$/,
|
|
1019
1039
|
thematicBreak: /^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/
|
|
1020
1040
|
};
|
|
1021
|
-
function
|
|
1022
|
-
return
|
|
1041
|
+
function _t(e) {
|
|
1042
|
+
return G.test(e.trimStart());
|
|
1023
1043
|
}
|
|
1024
|
-
function
|
|
1044
|
+
function vt(e) {
|
|
1025
1045
|
let t = e.trimStart();
|
|
1026
|
-
return
|
|
1046
|
+
return K.bulletItem.test(t) || _t(t) || K.heading.test(t) || K.thematicBreak.test(t) && !t.startsWith("-") || /^>\s?/.test(t) || K.codeFence.test(t) || K.blockMath.test(t);
|
|
1027
1047
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return Object.values(
|
|
1048
|
+
function yt(e) {
|
|
1049
|
+
return Object.values(K).some((t) => t.test(e));
|
|
1030
1050
|
}
|
|
1031
|
-
function
|
|
1051
|
+
function bt(e) {
|
|
1032
1052
|
let t = [], n = [], r = !1;
|
|
1033
1053
|
return e.forEach((e) => {
|
|
1034
|
-
r ? n.push(e) : e.trim() === "" || t.length > 0 &&
|
|
1054
|
+
r ? n.push(e) : e.trim() === "" || t.length > 0 && vt(e) ? (r = !0, n.push(e)) : t.push(e);
|
|
1035
1055
|
}), {
|
|
1036
1056
|
paragraphLines: t,
|
|
1037
1057
|
blockLines: n
|
|
1038
1058
|
};
|
|
1039
1059
|
}
|
|
1040
|
-
function
|
|
1060
|
+
function xt(e) {
|
|
1041
1061
|
let t = [], n = 0, r = 0;
|
|
1042
1062
|
for (; n < e.length;) {
|
|
1043
|
-
let i = e[n], a = i.match(
|
|
1063
|
+
let i = e[n], a = i.match(G);
|
|
1044
1064
|
if (!a) break;
|
|
1045
|
-
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ?
|
|
1065
|
+
let [, o, s, c, l] = a, u = o.length, d = parseInt(s, 10), f = isNaN(d) ? V(s) : void 0, p = isNaN(d) ? H(s) : d, m = [l], h = n + 1, g = [i], _ = !1;
|
|
1046
1066
|
for (; h < e.length;) {
|
|
1047
1067
|
let t = e[h];
|
|
1048
|
-
if (t.match(
|
|
1068
|
+
if (t.match(G)) break;
|
|
1049
1069
|
if (t.trim() === "") g.push(t), m.push(""), _ = !0, h += 1;
|
|
1050
|
-
else if (t.match(
|
|
1070
|
+
else if (t.match(gt)) {
|
|
1051
1071
|
let e = t.length - t.trimStart().length, n = u + s.length + 1;
|
|
1052
1072
|
g.push(t), m.push(t.slice(Math.min(e, n))), h += 1;
|
|
1053
1073
|
} else {
|
|
1054
|
-
if (_ ||
|
|
1074
|
+
if (_ || yt(t)) break;
|
|
1055
1075
|
g.push(t), m.push(t), h += 1;
|
|
1056
1076
|
}
|
|
1057
1077
|
}
|
|
@@ -1066,22 +1086,22 @@ function ht(e) {
|
|
|
1066
1086
|
}
|
|
1067
1087
|
return [t, r];
|
|
1068
1088
|
}
|
|
1069
|
-
var
|
|
1070
|
-
function
|
|
1089
|
+
var St = RegExp(`^(${L})([.)])\\s+(.+)$`);
|
|
1090
|
+
function Ct(e) {
|
|
1071
1091
|
let t = e.split("\n").filter((e) => e.trim().length > 0);
|
|
1072
1092
|
if (t.length === 0) return null;
|
|
1073
1093
|
let n = [];
|
|
1074
1094
|
for (let e of t) {
|
|
1075
|
-
let t = e.trim().match(
|
|
1095
|
+
let t = e.trim().match(St);
|
|
1076
1096
|
if (!t) return null;
|
|
1077
1097
|
n.push({
|
|
1078
1098
|
marker: t[1],
|
|
1079
1099
|
content: t[3]
|
|
1080
1100
|
});
|
|
1081
1101
|
}
|
|
1082
|
-
return
|
|
1102
|
+
return Ze(n.map((e) => e.marker)) ? {
|
|
1083
1103
|
type: "orderedList",
|
|
1084
|
-
attrs:
|
|
1104
|
+
attrs: $e(n[0].marker),
|
|
1085
1105
|
content: n.map((e) => ({
|
|
1086
1106
|
type: "listItem",
|
|
1087
1107
|
content: [{
|
|
@@ -1094,12 +1114,12 @@ function _t(e) {
|
|
|
1094
1114
|
}))
|
|
1095
1115
|
} : null;
|
|
1096
1116
|
}
|
|
1097
|
-
function
|
|
1117
|
+
function wt(e, t, n) {
|
|
1098
1118
|
let r = [], i = 0;
|
|
1099
1119
|
for (; i < e.length;) {
|
|
1100
1120
|
let a = e[i];
|
|
1101
1121
|
if (a.indent === t) {
|
|
1102
|
-
let { paragraphLines: o, blockLines: s } =
|
|
1122
|
+
let { paragraphLines: o, blockLines: s } = bt(a.contentLines), c = o.join("\n").trim(), l = [];
|
|
1103
1123
|
c && l.push({
|
|
1104
1124
|
type: "paragraph",
|
|
1105
1125
|
raw: c,
|
|
@@ -1113,7 +1133,7 @@ function vt(e, t, n) {
|
|
|
1113
1133
|
let d = i + 1, f = [];
|
|
1114
1134
|
for (; d < e.length && e[d].indent > t;) f.push(e[d]), d += 1;
|
|
1115
1135
|
if (f.length > 0) {
|
|
1116
|
-
let e =
|
|
1136
|
+
let e = wt(f, Math.min(...f.map((e) => e.indent)), n);
|
|
1117
1137
|
l.push({
|
|
1118
1138
|
type: "list",
|
|
1119
1139
|
ordered: !0,
|
|
@@ -1132,7 +1152,7 @@ function vt(e, t, n) {
|
|
|
1132
1152
|
}
|
|
1133
1153
|
return r;
|
|
1134
1154
|
}
|
|
1135
|
-
function
|
|
1155
|
+
function Tt(e, t) {
|
|
1136
1156
|
return e.map((e) => {
|
|
1137
1157
|
if (e.type !== "list_item") return t.parseChildren([e])[0];
|
|
1138
1158
|
let n = [];
|
|
@@ -1154,8 +1174,8 @@ function yt(e, t) {
|
|
|
1154
1174
|
};
|
|
1155
1175
|
});
|
|
1156
1176
|
}
|
|
1157
|
-
var
|
|
1158
|
-
function
|
|
1177
|
+
var Et = 64;
|
|
1178
|
+
function Dt(e, t) {
|
|
1159
1179
|
let n = [], r = 0;
|
|
1160
1180
|
for (; n.length < t;) {
|
|
1161
1181
|
let t = e.indexOf("\n", r);
|
|
@@ -1164,23 +1184,23 @@ function xt(e, t) {
|
|
|
1164
1184
|
}
|
|
1165
1185
|
return n;
|
|
1166
1186
|
}
|
|
1167
|
-
function
|
|
1187
|
+
function Ot(e) {
|
|
1168
1188
|
let t = e.indexOf("\n"), n = t === -1 ? e : e.slice(0, t);
|
|
1169
|
-
if (!
|
|
1189
|
+
if (!G.test(n)) return [
|
|
1170
1190
|
[],
|
|
1171
1191
|
0,
|
|
1172
1192
|
[]
|
|
1173
1193
|
];
|
|
1174
|
-
let r =
|
|
1175
|
-
for (; a[1] === i.length && i.length === r;) r *= 2, i =
|
|
1194
|
+
let r = Et, i = Dt(e, r), a = xt(i);
|
|
1195
|
+
for (; a[1] === i.length && i.length === r;) r *= 2, i = Dt(e, r), a = xt(i);
|
|
1176
1196
|
return [
|
|
1177
1197
|
a[0],
|
|
1178
1198
|
a[1],
|
|
1179
1199
|
i
|
|
1180
1200
|
];
|
|
1181
1201
|
}
|
|
1182
|
-
var
|
|
1183
|
-
function
|
|
1202
|
+
var kt = "listItem", At = "textStyle", jt = /^(\d+)\.\s$/;
|
|
1203
|
+
function Mt(e) {
|
|
1184
1204
|
let t = e.match(/list-style-type\s*:\s*([^;]+)/i);
|
|
1185
1205
|
if (!t) return null;
|
|
1186
1206
|
switch (t[1].trim().toLowerCase()) {
|
|
@@ -1193,7 +1213,7 @@ function Et(e) {
|
|
|
1193
1213
|
default: return null;
|
|
1194
1214
|
}
|
|
1195
1215
|
}
|
|
1196
|
-
var
|
|
1216
|
+
var Nt = C.create({
|
|
1197
1217
|
name: "orderedList",
|
|
1198
1218
|
addOptions() {
|
|
1199
1219
|
return {
|
|
@@ -1220,14 +1240,14 @@ var Dt = b.create({
|
|
|
1220
1240
|
if (t) return t;
|
|
1221
1241
|
let n = e.getAttribute("style");
|
|
1222
1242
|
if (n) {
|
|
1223
|
-
let e =
|
|
1243
|
+
let e = Mt(n);
|
|
1224
1244
|
if (e) return e;
|
|
1225
1245
|
}
|
|
1226
1246
|
let r = e.querySelector("li");
|
|
1227
1247
|
if (r) {
|
|
1228
1248
|
let e = r.getAttribute("style");
|
|
1229
1249
|
if (e) {
|
|
1230
|
-
let t =
|
|
1250
|
+
let t = Mt(e);
|
|
1231
1251
|
if (t) return t;
|
|
1232
1252
|
}
|
|
1233
1253
|
}
|
|
@@ -1240,7 +1260,7 @@ var Dt = b.create({
|
|
|
1240
1260
|
return [{ tag: "ol" }];
|
|
1241
1261
|
},
|
|
1242
1262
|
renderHTML({ HTMLAttributes: e }) {
|
|
1243
|
-
let { start: t, type: n, ...r } = e, i =
|
|
1263
|
+
let { start: t, type: n, ...r } = e, i = y(this.options.HTMLAttributes, r);
|
|
1244
1264
|
return t !== 1 && (i.start = t), n && n !== "1" && (i.type = n), [
|
|
1245
1265
|
"ol",
|
|
1246
1266
|
i,
|
|
@@ -1250,7 +1270,7 @@ var Dt = b.create({
|
|
|
1250
1270
|
markdownTokenName: "list",
|
|
1251
1271
|
parseMarkdown: (e, t) => {
|
|
1252
1272
|
if (e.type !== "list" || !e.ordered) return [];
|
|
1253
|
-
let n = e.start || 1, r = e.typeMarker, i = e.items ?
|
|
1273
|
+
let n = e.start || 1, r = e.typeMarker, i = e.items ? Tt(e.items, t) : [], a = {};
|
|
1254
1274
|
return n !== 1 && (a.start = n), r && (a.type = r), Object.keys(a).length > 0 ? {
|
|
1255
1275
|
type: "orderedList",
|
|
1256
1276
|
attrs: a,
|
|
@@ -1266,9 +1286,9 @@ var Dt = b.create({
|
|
|
1266
1286
|
level: "block",
|
|
1267
1287
|
start: () => -1,
|
|
1268
1288
|
tokenize: (e, t, n) => {
|
|
1269
|
-
let [r, i, a] =
|
|
1289
|
+
let [r, i, a] = Ot(e);
|
|
1270
1290
|
if (r.length === 0) return;
|
|
1271
|
-
let o =
|
|
1291
|
+
let o = wt(r, r[0].indent, n);
|
|
1272
1292
|
if (o.length !== 0) return {
|
|
1273
1293
|
type: "list",
|
|
1274
1294
|
ordered: !0,
|
|
@@ -1281,17 +1301,17 @@ var Dt = b.create({
|
|
|
1281
1301
|
},
|
|
1282
1302
|
markdownOptions: { indentsContent: !0 },
|
|
1283
1303
|
addCommands() {
|
|
1284
|
-
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
1304
|
+
return { toggleOrderedList: () => ({ commands: e, chain: t }) => this.options.keepAttributes ? t().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(kt, this.editor.getAttributes(At)).run() : e.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks) };
|
|
1285
1305
|
},
|
|
1286
1306
|
addKeyboardShortcuts() {
|
|
1287
1307
|
return { "Mod-Shift-7": () => this.editor.commands.toggleOrderedList() };
|
|
1288
1308
|
},
|
|
1289
1309
|
addProseMirrorPlugins() {
|
|
1290
|
-
return [new
|
|
1310
|
+
return [new v({ props: { handlePaste: (e, t) => {
|
|
1291
1311
|
if ((t.clipboardData?.getData("text/html"))?.trim()) return !1;
|
|
1292
1312
|
let n = t.clipboardData?.getData("text/plain");
|
|
1293
1313
|
if (!n) return !1;
|
|
1294
|
-
let r =
|
|
1314
|
+
let r = Ct(n);
|
|
1295
1315
|
if (!r) return !1;
|
|
1296
1316
|
try {
|
|
1297
1317
|
let t = e.state.schema.nodeFromJSON(r), n = e.state.tr.replaceSelectionWith(t);
|
|
@@ -1302,29 +1322,29 @@ var Dt = b.create({
|
|
|
1302
1322
|
} } })];
|
|
1303
1323
|
},
|
|
1304
1324
|
addInputRules() {
|
|
1305
|
-
let
|
|
1306
|
-
find:
|
|
1325
|
+
let e = (e, t) => (!t.attrs.type || t.attrs.type === "1") && t.childCount + t.attrs.start === +e[1], n = t({
|
|
1326
|
+
find: jt,
|
|
1307
1327
|
type: this.type,
|
|
1308
1328
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
1309
|
-
joinPredicate:
|
|
1329
|
+
joinPredicate: e
|
|
1310
1330
|
});
|
|
1311
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (n =
|
|
1312
|
-
find:
|
|
1331
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (n = t({
|
|
1332
|
+
find: jt,
|
|
1313
1333
|
type: this.type,
|
|
1314
1334
|
keepMarks: this.options.keepMarks,
|
|
1315
1335
|
keepAttributes: this.options.keepAttributes,
|
|
1316
1336
|
getAttributes: (e) => ({
|
|
1317
1337
|
start: +e[1],
|
|
1318
|
-
...this.editor.getAttributes(
|
|
1338
|
+
...this.editor.getAttributes(At)
|
|
1319
1339
|
}),
|
|
1320
|
-
joinPredicate:
|
|
1340
|
+
joinPredicate: e,
|
|
1321
1341
|
editor: this.editor
|
|
1322
1342
|
})), [n];
|
|
1323
1343
|
}
|
|
1324
|
-
}),
|
|
1344
|
+
}), Pt = /^\s*(\[([( |x])?\])\s$/, Ft = "position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0", It = (e, t, n) => {
|
|
1325
1345
|
var r;
|
|
1326
1346
|
return (n == null || (r = n.checkboxLabel) == null ? void 0 : r.call(n, e, t)) || `Task item checkbox for ${e.textContent || "empty task item"}`;
|
|
1327
|
-
},
|
|
1347
|
+
}, Lt = C.create({
|
|
1328
1348
|
name: "taskItem",
|
|
1329
1349
|
addOptions() {
|
|
1330
1350
|
return {
|
|
@@ -1359,7 +1379,7 @@ var Dt = b.create({
|
|
|
1359
1379
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
1360
1380
|
return [
|
|
1361
1381
|
"li",
|
|
1362
|
-
|
|
1382
|
+
y(this.options.HTMLAttributes, t, { "data-type": this.name }),
|
|
1363
1383
|
[
|
|
1364
1384
|
"label",
|
|
1365
1385
|
["input", {
|
|
@@ -1381,10 +1401,10 @@ var Dt = b.create({
|
|
|
1381
1401
|
},
|
|
1382
1402
|
renderMarkdown: (e, t) => {
|
|
1383
1403
|
let n = `- [${e.attrs?.checked ? "x" : " "}] `;
|
|
1384
|
-
return
|
|
1404
|
+
return c(e, t, n, void 0, { indentMainContent: !0 });
|
|
1385
1405
|
},
|
|
1386
1406
|
addExtensions() {
|
|
1387
|
-
return this.options.nested ? [
|
|
1407
|
+
return this.options.nested ? [Ke(this.name, [this.options.taskListTypeName])] : [];
|
|
1388
1408
|
},
|
|
1389
1409
|
addKeyboardShortcuts() {
|
|
1390
1410
|
let e = {
|
|
@@ -1399,9 +1419,9 @@ var Dt = b.create({
|
|
|
1399
1419
|
addNodeView() {
|
|
1400
1420
|
return ({ node: e, HTMLAttributes: t, getPos: n, editor: r }) => {
|
|
1401
1421
|
let i = document.createElement("li"), a = document.createElement("label"), o = document.createElement("span"), s = document.createElement("input"), c = document.createElement("div");
|
|
1402
|
-
o.style.cssText =
|
|
1422
|
+
o.style.cssText = Ft;
|
|
1403
1423
|
let l = (e) => {
|
|
1404
|
-
let t =
|
|
1424
|
+
let t = It(e, e.attrs.checked, this.options.a11y);
|
|
1405
1425
|
s.setAttribute("aria-label", t), o.textContent = t;
|
|
1406
1426
|
};
|
|
1407
1427
|
l(e), a.contentEditable = "false", s.type = "checkbox", s.addEventListener("mousedown", (e) => e.preventDefault()), s.addEventListener("change", (t) => {
|
|
@@ -1431,7 +1451,7 @@ var Dt = b.create({
|
|
|
1431
1451
|
update: (e) => {
|
|
1432
1452
|
if (e.type !== this.type) return !1;
|
|
1433
1453
|
i.dataset.checked = e.attrs.checked, s.checked = e.attrs.checked, l(e);
|
|
1434
|
-
let t = r.extensionManager.attributes, n =
|
|
1454
|
+
let t = r.extensionManager.attributes, n = ie(e, t), a = new Set(Object.keys(n)), o = this.options.HTMLAttributes;
|
|
1435
1455
|
return u.forEach((e) => {
|
|
1436
1456
|
a.has(e) || (e in o ? i.setAttribute(e, o[e]) : i.removeAttribute(e));
|
|
1437
1457
|
}), Object.entries(n).forEach(([e, t]) => {
|
|
@@ -1442,13 +1462,13 @@ var Dt = b.create({
|
|
|
1442
1462
|
};
|
|
1443
1463
|
},
|
|
1444
1464
|
addInputRules() {
|
|
1445
|
-
return [
|
|
1446
|
-
find:
|
|
1465
|
+
return [t({
|
|
1466
|
+
find: Pt,
|
|
1447
1467
|
type: this.type,
|
|
1448
1468
|
getAttributes: (e) => ({ checked: e[e.length - 1] === "x" })
|
|
1449
1469
|
})];
|
|
1450
1470
|
}
|
|
1451
|
-
}),
|
|
1471
|
+
}), Rt = C.create({
|
|
1452
1472
|
name: "taskList",
|
|
1453
1473
|
addOptions() {
|
|
1454
1474
|
return {
|
|
@@ -1469,7 +1489,7 @@ var Dt = b.create({
|
|
|
1469
1489
|
renderHTML({ HTMLAttributes: e }) {
|
|
1470
1490
|
return [
|
|
1471
1491
|
"ul",
|
|
1472
|
-
|
|
1492
|
+
y(this.options.HTMLAttributes, e, { "data-type": this.name }),
|
|
1473
1493
|
0
|
|
1474
1494
|
];
|
|
1475
1495
|
},
|
|
@@ -1546,16 +1566,15 @@ var Dt = b.create({
|
|
|
1546
1566
|
return { "Mod-Shift-9": () => this.editor.commands.toggleTaskList() };
|
|
1547
1567
|
}
|
|
1548
1568
|
});
|
|
1549
|
-
|
|
1569
|
+
O.create({
|
|
1550
1570
|
name: "listKit",
|
|
1551
1571
|
addExtensions() {
|
|
1552
1572
|
let e = [];
|
|
1553
|
-
return this.options.bulletList !== !1 && e.push(
|
|
1573
|
+
return this.options.bulletList !== !1 && e.push(He.configure(this.options.bulletList)), this.options.listItem !== !1 && e.push(ct.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(W.configure(this.options.listKeymap)), this.options.orderedList !== !1 && e.push(Nt.configure(this.options.orderedList)), this.options.taskItem !== !1 && e.push(Lt.configure(this.options.taskItem)), this.options.taskList !== !1 && e.push(Rt.configure(this.options.taskList)), e;
|
|
1554
1574
|
}
|
|
1555
1575
|
});
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
var K = " ", q = "\xA0", Nt = b.create({
|
|
1576
|
+
// ../../node_modules/.pnpm/@tiptap+extension-paragraph@3.32.1_@tiptap+core@3.32.1_@tiptap+pm@3.32.1_/node_modules/@tiptap/extension-paragraph/dist/index.js
|
|
1577
|
+
var q = " ", J = "\xA0", zt = C.create({
|
|
1559
1578
|
name: "paragraph",
|
|
1560
1579
|
priority: 1e3,
|
|
1561
1580
|
addOptions() {
|
|
@@ -1569,7 +1588,7 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1569
1588
|
renderHTML({ HTMLAttributes: e }) {
|
|
1570
1589
|
return [
|
|
1571
1590
|
"p",
|
|
1572
|
-
|
|
1591
|
+
y(this.options.HTMLAttributes, e),
|
|
1573
1592
|
0
|
|
1574
1593
|
];
|
|
1575
1594
|
},
|
|
@@ -1577,7 +1596,7 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1577
1596
|
let n = e.tokens || [];
|
|
1578
1597
|
if (n.length === 1 && n[0].type === "image") return t.parseChildren([n[0]]);
|
|
1579
1598
|
let r = t.parseInline(n);
|
|
1580
|
-
return n.length === 1 && n[0].type === "text" && (n[0].raw ===
|
|
1599
|
+
return n.length === 1 && n[0].type === "text" && (n[0].raw === q || n[0].text === q || n[0].raw === J || n[0].text === J) && r.length === 1 && r[0].type === "text" && (r[0].text === q || r[0].text === J) ? t.createNode("paragraph", void 0, []) : t.createNode("paragraph", void 0, r);
|
|
1581
1600
|
},
|
|
1582
1601
|
renderMarkdown: (e, t, n) => {
|
|
1583
1602
|
if (!e) return "";
|
|
@@ -1585,7 +1604,7 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1585
1604
|
if (r.length === 0) {
|
|
1586
1605
|
var i, a;
|
|
1587
1606
|
let e = Array.isArray(n == null || (i = n.previousNode) == null ? void 0 : i.content) ? n.previousNode.content : [];
|
|
1588
|
-
return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ?
|
|
1607
|
+
return (n == null || (a = n.previousNode) == null ? void 0 : a.type) === "paragraph" && e.length === 0 ? q : "";
|
|
1589
1608
|
}
|
|
1590
1609
|
return t.renderChildren(r);
|
|
1591
1610
|
},
|
|
@@ -1595,7 +1614,7 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1595
1614
|
addKeyboardShortcuts() {
|
|
1596
1615
|
return { "Mod-Alt-0": () => this.editor.commands.setParagraph() };
|
|
1597
1616
|
}
|
|
1598
|
-
}),
|
|
1617
|
+
}), Bt = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Vt = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, Ht = x.create({
|
|
1599
1618
|
name: "strike",
|
|
1600
1619
|
addOptions() {
|
|
1601
1620
|
return { HTMLAttributes: {} };
|
|
@@ -1615,7 +1634,7 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1615
1634
|
renderHTML({ HTMLAttributes: e }) {
|
|
1616
1635
|
return [
|
|
1617
1636
|
"s",
|
|
1618
|
-
|
|
1637
|
+
y(this.options.HTMLAttributes, e),
|
|
1619
1638
|
0
|
|
1620
1639
|
];
|
|
1621
1640
|
},
|
|
@@ -1633,18 +1652,18 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1633
1652
|
return { "Mod-Shift-s": () => this.editor.commands.toggleStrike() };
|
|
1634
1653
|
},
|
|
1635
1654
|
addInputRules() {
|
|
1636
|
-
return [
|
|
1637
|
-
find:
|
|
1655
|
+
return [T({
|
|
1656
|
+
find: Bt,
|
|
1638
1657
|
type: this.type
|
|
1639
1658
|
})];
|
|
1640
1659
|
},
|
|
1641
1660
|
addPasteRules() {
|
|
1642
|
-
return [
|
|
1643
|
-
find:
|
|
1661
|
+
return [w({
|
|
1662
|
+
find: Vt,
|
|
1644
1663
|
type: this.type
|
|
1645
1664
|
})];
|
|
1646
1665
|
}
|
|
1647
|
-
}),
|
|
1666
|
+
}), Ut = C.create({
|
|
1648
1667
|
name: "text",
|
|
1649
1668
|
group: "inline",
|
|
1650
1669
|
parseMarkdown: (e) => ({
|
|
@@ -1653,14 +1672,13 @@ var K = " ", q = "\xA0", Nt = b.create({
|
|
|
1653
1672
|
}),
|
|
1654
1673
|
renderMarkdown: (e) => e.text || ""
|
|
1655
1674
|
});
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
return new zt(t, e);
|
|
1675
|
+
// ../../node_modules/.pnpm/prosemirror-dropcursor@1.8.4/node_modules/prosemirror-dropcursor/dist/index.js
|
|
1676
|
+
function Wt(e = {}) {
|
|
1677
|
+
return new v({ view(t) {
|
|
1678
|
+
return new Gt(t, e);
|
|
1661
1679
|
} });
|
|
1662
1680
|
}
|
|
1663
|
-
var
|
|
1681
|
+
var Gt = class {
|
|
1664
1682
|
constructor(e, t) {
|
|
1665
1683
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.lastDragEvent = null, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = [
|
|
1666
1684
|
"dragover",
|
|
@@ -1740,7 +1758,7 @@ var zt = class {
|
|
|
1740
1758
|
if (!t || i) return null;
|
|
1741
1759
|
let a = t.pos;
|
|
1742
1760
|
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
1743
|
-
let e =
|
|
1761
|
+
let e = ae(this.editorView.state.doc, a, this.editorView.dragging.slice);
|
|
1744
1762
|
e != null && (a = e);
|
|
1745
1763
|
}
|
|
1746
1764
|
return a;
|
|
@@ -1760,19 +1778,19 @@ var zt = class {
|
|
|
1760
1778
|
dragleave(e) {
|
|
1761
1779
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
1762
1780
|
}
|
|
1763
|
-
},
|
|
1781
|
+
}, Y = class t extends e {
|
|
1764
1782
|
constructor(e) {
|
|
1765
1783
|
super(e, e);
|
|
1766
1784
|
}
|
|
1767
|
-
map(
|
|
1768
|
-
let
|
|
1769
|
-
return
|
|
1785
|
+
map(n, r) {
|
|
1786
|
+
let i = n.resolve(r.map(this.head));
|
|
1787
|
+
return t.valid(i) ? new t(i) : e.near(i);
|
|
1770
1788
|
}
|
|
1771
1789
|
content() {
|
|
1772
1790
|
return S.empty;
|
|
1773
1791
|
}
|
|
1774
|
-
eq(
|
|
1775
|
-
return
|
|
1792
|
+
eq(e) {
|
|
1793
|
+
return e instanceof t && e.head == this.head;
|
|
1776
1794
|
}
|
|
1777
1795
|
toJSON() {
|
|
1778
1796
|
return {
|
|
@@ -1780,147 +1798,147 @@ var zt = class {
|
|
|
1780
1798
|
pos: this.head
|
|
1781
1799
|
};
|
|
1782
1800
|
}
|
|
1783
|
-
static fromJSON(
|
|
1801
|
+
static fromJSON(e, n) {
|
|
1784
1802
|
if (typeof n.pos != "number") throw RangeError("Invalid input for GapCursor.fromJSON");
|
|
1785
|
-
return new e
|
|
1803
|
+
return new t(e.resolve(n.pos));
|
|
1786
1804
|
}
|
|
1787
1805
|
getBookmark() {
|
|
1788
|
-
return new
|
|
1806
|
+
return new Kt(this.anchor);
|
|
1789
1807
|
}
|
|
1790
1808
|
static valid(e) {
|
|
1791
1809
|
let t = e.parent;
|
|
1792
|
-
if (t.inlineContent || !
|
|
1810
|
+
if (t.inlineContent || !Jt(e) || !Yt(e)) return !1;
|
|
1793
1811
|
let n = t.type.spec.allowGapCursor;
|
|
1794
1812
|
if (n != null) return n;
|
|
1795
1813
|
let r = t.contentMatchAt(e.index()).defaultType;
|
|
1796
1814
|
return r && r.isTextblock;
|
|
1797
1815
|
}
|
|
1798
|
-
static findGapCursorFrom(
|
|
1816
|
+
static findGapCursorFrom(e, n, r = !1) {
|
|
1799
1817
|
search: for (;;) {
|
|
1800
|
-
if (!r &&
|
|
1801
|
-
let
|
|
1802
|
-
for (let r =
|
|
1803
|
-
let
|
|
1804
|
-
if (n > 0 ?
|
|
1805
|
-
|
|
1818
|
+
if (!r && t.valid(e)) return e;
|
|
1819
|
+
let i = e.pos, a = null;
|
|
1820
|
+
for (let r = e.depth;; r--) {
|
|
1821
|
+
let o = e.node(r);
|
|
1822
|
+
if (n > 0 ? e.indexAfter(r) < o.childCount : e.index(r) > 0) {
|
|
1823
|
+
a = o.child(n > 0 ? e.indexAfter(r) : e.index(r) - 1);
|
|
1806
1824
|
break;
|
|
1807
1825
|
}
|
|
1808
1826
|
if (r == 0) return null;
|
|
1809
|
-
|
|
1810
|
-
let s =
|
|
1811
|
-
if (
|
|
1827
|
+
i += n;
|
|
1828
|
+
let s = e.doc.resolve(i);
|
|
1829
|
+
if (t.valid(s)) return s;
|
|
1812
1830
|
}
|
|
1813
1831
|
for (;;) {
|
|
1814
|
-
let
|
|
1815
|
-
if (!
|
|
1816
|
-
if (
|
|
1817
|
-
|
|
1832
|
+
let o = n > 0 ? a.firstChild : a.lastChild;
|
|
1833
|
+
if (!o) {
|
|
1834
|
+
if (a.isAtom && !a.isText && !g.isSelectable(a)) {
|
|
1835
|
+
e = e.doc.resolve(i + a.nodeSize * n), r = !1;
|
|
1818
1836
|
continue search;
|
|
1819
1837
|
}
|
|
1820
1838
|
break;
|
|
1821
1839
|
}
|
|
1822
|
-
|
|
1823
|
-
let
|
|
1824
|
-
if (
|
|
1840
|
+
a = o, i += n;
|
|
1841
|
+
let s = e.doc.resolve(i);
|
|
1842
|
+
if (t.valid(s)) return s;
|
|
1825
1843
|
}
|
|
1826
1844
|
return null;
|
|
1827
1845
|
}
|
|
1828
1846
|
}
|
|
1829
1847
|
};
|
|
1830
|
-
|
|
1831
|
-
var
|
|
1848
|
+
Y.prototype.visible = !1, Y.findFrom = Y.findGapCursorFrom, e.jsonID("gapcursor", Y);
|
|
1849
|
+
var Kt = class t {
|
|
1832
1850
|
constructor(e) {
|
|
1833
1851
|
this.pos = e;
|
|
1834
1852
|
}
|
|
1835
|
-
map(
|
|
1836
|
-
return new e
|
|
1853
|
+
map(e) {
|
|
1854
|
+
return new t(e.map(this.pos));
|
|
1837
1855
|
}
|
|
1838
|
-
resolve(
|
|
1839
|
-
let
|
|
1840
|
-
return
|
|
1856
|
+
resolve(t) {
|
|
1857
|
+
let n = t.resolve(this.pos);
|
|
1858
|
+
return Y.valid(n) ? new Y(n) : e.near(n);
|
|
1841
1859
|
}
|
|
1842
1860
|
};
|
|
1843
|
-
function
|
|
1861
|
+
function qt(e) {
|
|
1844
1862
|
return e.isAtom || e.spec.isolating || e.spec.createGapCursor;
|
|
1845
1863
|
}
|
|
1846
|
-
function
|
|
1864
|
+
function Jt(e) {
|
|
1847
1865
|
for (let t = e.depth; t >= 0; t--) {
|
|
1848
1866
|
let n = e.index(t), r = e.node(t);
|
|
1849
1867
|
if (n == 0) {
|
|
1850
1868
|
if (r.type.spec.isolating) return !0;
|
|
1851
1869
|
} else for (let e = r.child(n - 1);; e = e.lastChild) {
|
|
1852
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
1870
|
+
if (e.childCount == 0 && !e.inlineContent || qt(e.type)) return !0;
|
|
1853
1871
|
if (e.inlineContent) return !1;
|
|
1854
1872
|
}
|
|
1855
1873
|
}
|
|
1856
1874
|
return !0;
|
|
1857
1875
|
}
|
|
1858
|
-
function
|
|
1876
|
+
function Yt(e) {
|
|
1859
1877
|
for (let t = e.depth; t >= 0; t--) {
|
|
1860
1878
|
let n = e.indexAfter(t), r = e.node(t);
|
|
1861
1879
|
if (n == r.childCount) {
|
|
1862
1880
|
if (r.type.spec.isolating) return !0;
|
|
1863
1881
|
} else for (let e = r.child(n);; e = e.firstChild) {
|
|
1864
|
-
if (e.childCount == 0 && !e.inlineContent ||
|
|
1882
|
+
if (e.childCount == 0 && !e.inlineContent || qt(e.type)) return !0;
|
|
1865
1883
|
if (e.inlineContent) return !1;
|
|
1866
1884
|
}
|
|
1867
1885
|
}
|
|
1868
1886
|
return !0;
|
|
1869
1887
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return new
|
|
1872
|
-
decorations:
|
|
1888
|
+
function Xt() {
|
|
1889
|
+
return new v({ props: {
|
|
1890
|
+
decorations: en,
|
|
1873
1891
|
createSelectionBetween(e, t, n) {
|
|
1874
|
-
return t.pos == n.pos &&
|
|
1892
|
+
return t.pos == n.pos && Y.valid(n) ? new Y(n) : null;
|
|
1875
1893
|
},
|
|
1876
|
-
handleClick:
|
|
1877
|
-
handleKeyDown:
|
|
1878
|
-
handleDOMEvents: { beforeinput:
|
|
1894
|
+
handleClick: Qt,
|
|
1895
|
+
handleKeyDown: Zt,
|
|
1896
|
+
handleDOMEvents: { beforeinput: $t }
|
|
1879
1897
|
} });
|
|
1880
1898
|
}
|
|
1881
|
-
var
|
|
1882
|
-
ArrowLeft:
|
|
1883
|
-
ArrowRight:
|
|
1884
|
-
ArrowUp:
|
|
1885
|
-
ArrowDown:
|
|
1899
|
+
var Zt = r({
|
|
1900
|
+
ArrowLeft: X("horiz", -1),
|
|
1901
|
+
ArrowRight: X("horiz", 1),
|
|
1902
|
+
ArrowUp: X("vert", -1),
|
|
1903
|
+
ArrowDown: X("vert", 1)
|
|
1886
1904
|
});
|
|
1887
|
-
function
|
|
1905
|
+
function X(e, t) {
|
|
1888
1906
|
let n = e == "vert" ? t > 0 ? "down" : "up" : t > 0 ? "right" : "left";
|
|
1889
1907
|
return function(e, r, i) {
|
|
1890
1908
|
let a = e.selection, o = t > 0 ? a.$to : a.$from, s = a.empty;
|
|
1891
|
-
if (a instanceof
|
|
1909
|
+
if (a instanceof b) {
|
|
1892
1910
|
if (!i.endOfTextblock(n) || o.depth == 0) return !1;
|
|
1893
1911
|
s = !1, o = e.doc.resolve(t > 0 ? o.after() : o.before());
|
|
1894
1912
|
}
|
|
1895
|
-
let
|
|
1896
|
-
return
|
|
1913
|
+
let c = Y.findGapCursorFrom(o, t, s);
|
|
1914
|
+
return c ? (r && r(e.tr.setSelection(new Y(c))), !0) : !1;
|
|
1897
1915
|
};
|
|
1898
1916
|
}
|
|
1899
|
-
function
|
|
1917
|
+
function Qt(e, t, n) {
|
|
1900
1918
|
if (!e || !e.editable) return !1;
|
|
1901
1919
|
let r = e.state.doc.resolve(t);
|
|
1902
|
-
if (!
|
|
1903
|
-
let
|
|
1920
|
+
if (!Y.valid(r)) return !1;
|
|
1921
|
+
let i = e.posAtCoords({
|
|
1904
1922
|
left: n.clientX,
|
|
1905
1923
|
top: n.clientY
|
|
1906
1924
|
});
|
|
1907
|
-
return
|
|
1925
|
+
return i && i.inside > -1 && g.isSelectable(e.state.doc.nodeAt(i.inside)) ? !1 : (e.dispatch(e.state.tr.setSelection(new Y(r))), !0);
|
|
1908
1926
|
}
|
|
1909
|
-
function
|
|
1910
|
-
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof
|
|
1927
|
+
function $t(e, t) {
|
|
1928
|
+
if (t.inputType != "insertCompositionText" || !(e.state.selection instanceof Y)) return !1;
|
|
1911
1929
|
let { $from: n } = e.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);
|
|
1912
1930
|
if (!r) return !1;
|
|
1913
|
-
let i =
|
|
1914
|
-
for (let e = r.length - 1; e >= 0; e--) i =
|
|
1931
|
+
let i = D.empty;
|
|
1932
|
+
for (let e = r.length - 1; e >= 0; e--) i = D.from(r[e].createAndFill(null, i));
|
|
1915
1933
|
let a = e.state.tr.replace(n.pos, n.pos, new S(i, 0, 0));
|
|
1916
|
-
return a.setSelection(
|
|
1934
|
+
return a.setSelection(b.near(a.doc.resolve(n.pos + 1))), e.dispatch(a), !1;
|
|
1917
1935
|
}
|
|
1918
|
-
function
|
|
1919
|
-
if (!(e.selection instanceof
|
|
1936
|
+
function en(e) {
|
|
1937
|
+
if (!(e.selection instanceof Y)) return null;
|
|
1920
1938
|
let t = document.createElement("div");
|
|
1921
|
-
return t.className = "ProseMirror-gapcursor",
|
|
1939
|
+
return t.className = "ProseMirror-gapcursor", E.create(e.doc, [o.widget(e.selection.head, t, { key: "gapcursor" })]);
|
|
1922
1940
|
}
|
|
1923
|
-
|
|
1941
|
+
O.create({
|
|
1924
1942
|
name: "characterCount",
|
|
1925
1943
|
addOptions() {
|
|
1926
1944
|
return {
|
|
@@ -1952,8 +1970,8 @@ T.create({
|
|
|
1952
1970
|
},
|
|
1953
1971
|
addProseMirrorPlugins() {
|
|
1954
1972
|
let e = !1;
|
|
1955
|
-
return [new
|
|
1956
|
-
key: new
|
|
1973
|
+
return [new v({
|
|
1974
|
+
key: new l("characterCount"),
|
|
1957
1975
|
appendTransaction: (t, n, r) => {
|
|
1958
1976
|
if (e) return;
|
|
1959
1977
|
let i = this.options.limit, a = this.options.autoTrim;
|
|
@@ -1982,7 +2000,7 @@ T.create({
|
|
|
1982
2000
|
})];
|
|
1983
2001
|
}
|
|
1984
2002
|
});
|
|
1985
|
-
var
|
|
2003
|
+
var tn = O.create({
|
|
1986
2004
|
name: "dropCursor",
|
|
1987
2005
|
addOptions() {
|
|
1988
2006
|
return {
|
|
@@ -1992,10 +2010,10 @@ var Yt = T.create({
|
|
|
1992
2010
|
};
|
|
1993
2011
|
},
|
|
1994
2012
|
addProseMirrorPlugins() {
|
|
1995
|
-
return [
|
|
2013
|
+
return [Wt(this.options)];
|
|
1996
2014
|
}
|
|
1997
2015
|
});
|
|
1998
|
-
|
|
2016
|
+
O.create({
|
|
1999
2017
|
name: "focus",
|
|
2000
2018
|
addOptions() {
|
|
2001
2019
|
return {
|
|
@@ -2004,11 +2022,11 @@ T.create({
|
|
|
2004
2022
|
};
|
|
2005
2023
|
},
|
|
2006
2024
|
addProseMirrorPlugins() {
|
|
2007
|
-
return [new
|
|
2008
|
-
key: new
|
|
2025
|
+
return [new v({
|
|
2026
|
+
key: new l("focus"),
|
|
2009
2027
|
props: { decorations: ({ doc: e, selection: t }) => {
|
|
2010
|
-
let { isEditable: n, isFocused: r } = this.editor, { anchor: i } = t,
|
|
2011
|
-
if (!n || !r) return
|
|
2028
|
+
let { isEditable: n, isFocused: r } = this.editor, { anchor: i } = t, a = [];
|
|
2029
|
+
if (!n || !r) return E.create(e, []);
|
|
2012
2030
|
let s = 0;
|
|
2013
2031
|
this.options.mode === "deepest" && e.descendants((e, t) => {
|
|
2014
2032
|
if (!e.isText) {
|
|
@@ -2020,16 +2038,16 @@ T.create({
|
|
|
2020
2038
|
return e.descendants((e, t) => {
|
|
2021
2039
|
if (e.isText || !(i >= t && i <= t + e.nodeSize - 1)) return !1;
|
|
2022
2040
|
if (c += 1, this.options.mode === "deepest" && s - c > 0 || this.options.mode === "shallowest" && c > 1) return this.options.mode === "deepest";
|
|
2023
|
-
|
|
2024
|
-
}),
|
|
2041
|
+
a.push(o.node(t, t + e.nodeSize, { class: this.options.className }));
|
|
2042
|
+
}), E.create(e, a);
|
|
2025
2043
|
} }
|
|
2026
2044
|
})];
|
|
2027
2045
|
}
|
|
2028
2046
|
});
|
|
2029
|
-
var
|
|
2047
|
+
var nn = O.create({
|
|
2030
2048
|
name: "gapCursor",
|
|
2031
2049
|
addProseMirrorPlugins() {
|
|
2032
|
-
return [
|
|
2050
|
+
return [Xt()];
|
|
2033
2051
|
},
|
|
2034
2052
|
extendNodeSchema(e) {
|
|
2035
2053
|
let t = {
|
|
@@ -2037,29 +2055,29 @@ var Xt = T.create({
|
|
|
2037
2055
|
options: e.options,
|
|
2038
2056
|
storage: e.storage
|
|
2039
2057
|
};
|
|
2040
|
-
return { allowGapCursor: le(
|
|
2058
|
+
return { allowGapCursor: le(ne(e, "allowGapCursor", t)) ?? null };
|
|
2041
2059
|
}
|
|
2042
|
-
}),
|
|
2043
|
-
function
|
|
2044
|
-
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node:
|
|
2045
|
-
return s && d.push(u),
|
|
2060
|
+
}), rn = "placeholder", an = new l("tiptap__placeholder");
|
|
2061
|
+
function on(e) {
|
|
2062
|
+
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: s, hasAnchor: c, classes: { emptyNode: l, emptyEditor: u } } = e, d = [l];
|
|
2063
|
+
return s && d.push(u), o.node(i, i + a.nodeSize, {
|
|
2046
2064
|
class: d.join(" "),
|
|
2047
2065
|
[r]: typeof n == "function" ? n({
|
|
2048
2066
|
editor: t,
|
|
2049
|
-
node:
|
|
2067
|
+
node: a,
|
|
2050
2068
|
pos: i,
|
|
2051
2069
|
hasAnchor: c
|
|
2052
2070
|
}) : n
|
|
2053
2071
|
});
|
|
2054
2072
|
}
|
|
2055
|
-
function
|
|
2073
|
+
function sn(e, t) {
|
|
2056
2074
|
return typeof e == "function" ? e(t) : e;
|
|
2057
2075
|
}
|
|
2058
|
-
function
|
|
2076
|
+
function cn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
2059
2077
|
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
2060
2078
|
return r.nodesBetween(a, o, (r, i) => {
|
|
2061
|
-
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf &&
|
|
2062
|
-
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(
|
|
2079
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && m(r);
|
|
2080
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(on({
|
|
2063
2081
|
editor: e,
|
|
2064
2082
|
isEmptyDoc: l,
|
|
2065
2083
|
dataAttribute: n,
|
|
@@ -2067,7 +2085,7 @@ function tn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
2067
2085
|
placeholder: t.placeholder,
|
|
2068
2086
|
classes: {
|
|
2069
2087
|
emptyEditor: t.emptyEditorClass,
|
|
2070
|
-
emptyNode:
|
|
2088
|
+
emptyNode: sn(t.emptyNodeClass, {
|
|
2071
2089
|
editor: e,
|
|
2072
2090
|
node: r,
|
|
2073
2091
|
pos: i,
|
|
@@ -2079,14 +2097,14 @@ function tn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, fro
|
|
|
2079
2097
|
})), t.includeChildren;
|
|
2080
2098
|
}), c;
|
|
2081
2099
|
}
|
|
2082
|
-
function
|
|
2100
|
+
function ln({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
2083
2101
|
if (!e.isEditable && t.showOnlyWhenEditable) return null;
|
|
2084
2102
|
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
2085
2103
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
2086
2104
|
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
2087
|
-
if (c && c.type.isTextblock &&
|
|
2105
|
+
if (c && c.type.isTextblock && m(c)) {
|
|
2088
2106
|
let r = a >= l && a <= l + c.nodeSize;
|
|
2089
|
-
o.push(
|
|
2107
|
+
o.push(on({
|
|
2090
2108
|
editor: e,
|
|
2091
2109
|
isEmptyDoc: s,
|
|
2092
2110
|
dataAttribute: n,
|
|
@@ -2094,7 +2112,7 @@ function nn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
2094
2112
|
placeholder: t.placeholder,
|
|
2095
2113
|
classes: {
|
|
2096
2114
|
emptyEditor: t.emptyEditorClass,
|
|
2097
|
-
emptyNode:
|
|
2115
|
+
emptyNode: sn(t.emptyNodeClass, {
|
|
2098
2116
|
editor: e,
|
|
2099
2117
|
node: c,
|
|
2100
2118
|
pos: l,
|
|
@@ -2105,7 +2123,7 @@ function nn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
2105
2123
|
pos: l
|
|
2106
2124
|
}));
|
|
2107
2125
|
}
|
|
2108
|
-
} else o.push(...
|
|
2126
|
+
} else o.push(...cn({
|
|
2109
2127
|
editor: e,
|
|
2110
2128
|
options: t,
|
|
2111
2129
|
dataAttribute: n,
|
|
@@ -2114,9 +2132,9 @@ function nn({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
|
2114
2132
|
from: 0,
|
|
2115
2133
|
to: r.content.size
|
|
2116
2134
|
}));
|
|
2117
|
-
return
|
|
2135
|
+
return E.create(r, o);
|
|
2118
2136
|
}
|
|
2119
|
-
function
|
|
2137
|
+
function Z(e, t) {
|
|
2120
2138
|
let n = e.resolve(t);
|
|
2121
2139
|
if (n.depth === 0) {
|
|
2122
2140
|
let e = n.nodeAfter ?? n.nodeBefore;
|
|
@@ -2136,13 +2154,13 @@ function X(e, t) {
|
|
|
2136
2154
|
to: r + n.node(1).nodeSize
|
|
2137
2155
|
};
|
|
2138
2156
|
}
|
|
2139
|
-
function
|
|
2157
|
+
function Q(e, t) {
|
|
2140
2158
|
return {
|
|
2141
2159
|
from: Math.max(0, t.from - 1),
|
|
2142
2160
|
to: Math.min(e.content.size, t.to - 1)
|
|
2143
2161
|
};
|
|
2144
2162
|
}
|
|
2145
|
-
function
|
|
2163
|
+
function un(e, t, n) {
|
|
2146
2164
|
let r = [];
|
|
2147
2165
|
return e.forEach((e, i) => {
|
|
2148
2166
|
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
@@ -2152,7 +2170,7 @@ function rn(e, t, n) {
|
|
|
2152
2170
|
});
|
|
2153
2171
|
}), r;
|
|
2154
2172
|
}
|
|
2155
|
-
function
|
|
2173
|
+
function dn(e) {
|
|
2156
2174
|
if (e.length === 0) return [];
|
|
2157
2175
|
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
2158
2176
|
for (let e = 1; e < t.length; e += 1) {
|
|
@@ -2161,31 +2179,31 @@ function an(e) {
|
|
|
2161
2179
|
}
|
|
2162
2180
|
return n;
|
|
2163
2181
|
}
|
|
2164
|
-
function
|
|
2165
|
-
let n =
|
|
2166
|
-
return n.push(
|
|
2182
|
+
function fn(e, t) {
|
|
2183
|
+
let n = un(e, t.from, t.to);
|
|
2184
|
+
return n.push(Q(e, Z(e, t.from))), t.to > t.from ? n.push(Q(e, Z(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(Q(e, Z(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
2167
2185
|
}
|
|
2168
|
-
function
|
|
2186
|
+
function pn(e, t, n) {
|
|
2169
2187
|
let r = [];
|
|
2170
2188
|
if (e.docChanged) {
|
|
2171
2189
|
let t = oe(e);
|
|
2172
|
-
for (let e of t) r.push(...
|
|
2190
|
+
for (let e of t) r.push(...fn(n.doc, e.newRange));
|
|
2173
2191
|
}
|
|
2174
|
-
return e.selectionSet && (r.push(
|
|
2192
|
+
return e.selectionSet && (r.push(Q(n.doc, Z(n.doc, e.mapping.map(t.selection.anchor)))), r.push(Q(n.doc, Z(n.doc, n.selection.anchor)))), dn(r);
|
|
2175
2193
|
}
|
|
2176
|
-
function
|
|
2194
|
+
function mn(e, t, n) {
|
|
2177
2195
|
let r = Math.max(0, Math.min(e, n.content.size));
|
|
2178
2196
|
return {
|
|
2179
2197
|
from: r,
|
|
2180
2198
|
to: Math.max(r, Math.min(t, n.content.size))
|
|
2181
2199
|
};
|
|
2182
2200
|
}
|
|
2183
|
-
function
|
|
2201
|
+
function hn({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
2184
2202
|
let s = e;
|
|
2185
2203
|
for (let e of t) {
|
|
2186
|
-
let { from: t, to: c } =
|
|
2204
|
+
let { from: t, to: c } = mn(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
2187
2205
|
l.length && (s = s.remove(l));
|
|
2188
|
-
let u =
|
|
2206
|
+
let u = cn({
|
|
2189
2207
|
editor: n,
|
|
2190
2208
|
options: r,
|
|
2191
2209
|
dataAttribute: i,
|
|
@@ -2198,21 +2216,21 @@ function ln({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i
|
|
|
2198
2216
|
}
|
|
2199
2217
|
return s;
|
|
2200
2218
|
}
|
|
2201
|
-
function
|
|
2219
|
+
function gn({ editor: e, options: t, dataAttribute: n }) {
|
|
2202
2220
|
return {
|
|
2203
2221
|
init(r, i) {
|
|
2204
|
-
return
|
|
2222
|
+
return ln({
|
|
2205
2223
|
editor: e,
|
|
2206
2224
|
options: t,
|
|
2207
2225
|
dataAttribute: n,
|
|
2208
2226
|
doc: i.doc,
|
|
2209
2227
|
selection: i.selection
|
|
2210
|
-
}) ??
|
|
2228
|
+
}) ?? E.empty;
|
|
2211
2229
|
},
|
|
2212
2230
|
apply(r, i, a, o) {
|
|
2213
|
-
return !r.docChanged && !r.selectionSet ? i :
|
|
2231
|
+
return !r.docChanged && !r.selectionSet ? i : hn({
|
|
2214
2232
|
decorations: i.map(r.mapping, r.doc),
|
|
2215
|
-
ranges:
|
|
2233
|
+
ranges: pn(r, a, o),
|
|
2216
2234
|
editor: e,
|
|
2217
2235
|
options: t,
|
|
2218
2236
|
dataAttribute: n,
|
|
@@ -2222,34 +2240,34 @@ function un({ editor: e, options: t, dataAttribute: n }) {
|
|
|
2222
2240
|
}
|
|
2223
2241
|
};
|
|
2224
2242
|
}
|
|
2225
|
-
function
|
|
2243
|
+
function _n(e) {
|
|
2226
2244
|
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
2227
2245
|
}
|
|
2228
|
-
function
|
|
2229
|
-
let n = t.dataAttribute ? `data-${
|
|
2230
|
-
return new
|
|
2231
|
-
key:
|
|
2232
|
-
...r ? {} : { state:
|
|
2246
|
+
function vn({ editor: e, options: t }) {
|
|
2247
|
+
let n = t.dataAttribute ? `data-${_n(t.dataAttribute)}` : `data-${rn}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
2248
|
+
return new v({
|
|
2249
|
+
key: an,
|
|
2250
|
+
...r ? {} : { state: gn({
|
|
2233
2251
|
editor: e,
|
|
2234
2252
|
options: t,
|
|
2235
2253
|
dataAttribute: n
|
|
2236
2254
|
}) },
|
|
2237
|
-
props: { decorations: r ? ({ doc: r, selection: i }) =>
|
|
2255
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => ln({
|
|
2238
2256
|
editor: e,
|
|
2239
2257
|
options: t,
|
|
2240
2258
|
dataAttribute: n,
|
|
2241
2259
|
doc: r,
|
|
2242
2260
|
selection: i
|
|
2243
|
-
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ?
|
|
2261
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? E.empty : an.getState(n) ?? E.empty }
|
|
2244
2262
|
});
|
|
2245
2263
|
}
|
|
2246
|
-
|
|
2264
|
+
O.create({
|
|
2247
2265
|
name: "placeholder",
|
|
2248
2266
|
addOptions() {
|
|
2249
2267
|
return {
|
|
2250
2268
|
emptyEditorClass: "is-editor-empty",
|
|
2251
2269
|
emptyNodeClass: "is-empty",
|
|
2252
|
-
dataAttribute:
|
|
2270
|
+
dataAttribute: rn,
|
|
2253
2271
|
placeholder: "Write something …",
|
|
2254
2272
|
showOnlyWhenEditable: !0,
|
|
2255
2273
|
showOnlyCurrent: !0,
|
|
@@ -2257,45 +2275,45 @@ T.create({
|
|
|
2257
2275
|
};
|
|
2258
2276
|
},
|
|
2259
2277
|
addProseMirrorPlugins() {
|
|
2260
|
-
return [
|
|
2278
|
+
return [vn({
|
|
2261
2279
|
editor: this.editor,
|
|
2262
2280
|
options: this.options
|
|
2263
2281
|
})];
|
|
2264
2282
|
}
|
|
2265
2283
|
});
|
|
2266
|
-
function
|
|
2267
|
-
return !e.selection.empty && !
|
|
2284
|
+
function $(e, t) {
|
|
2285
|
+
return !e.selection.empty && !i(e.selection) && t.isEditable;
|
|
2268
2286
|
}
|
|
2269
|
-
function
|
|
2270
|
-
return
|
|
2287
|
+
function yn(e, t) {
|
|
2288
|
+
return $(e, t) && !t.isFocused && !t.view.dragging;
|
|
2271
2289
|
}
|
|
2272
|
-
function
|
|
2290
|
+
function bn() {
|
|
2273
2291
|
var e;
|
|
2274
2292
|
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
2275
2293
|
}
|
|
2276
|
-
function
|
|
2294
|
+
function xn(e) {
|
|
2277
2295
|
e.focus();
|
|
2278
2296
|
}
|
|
2279
|
-
|
|
2297
|
+
O.create({
|
|
2280
2298
|
name: "selection",
|
|
2281
2299
|
addOptions() {
|
|
2282
2300
|
return { className: "selection" };
|
|
2283
2301
|
},
|
|
2284
2302
|
addProseMirrorPlugins() {
|
|
2285
2303
|
let { editor: e, options: t } = this;
|
|
2286
|
-
return [new
|
|
2287
|
-
key: new
|
|
2304
|
+
return [new v({
|
|
2305
|
+
key: new l("selection"),
|
|
2288
2306
|
props: {
|
|
2289
2307
|
decorations(n) {
|
|
2290
|
-
return
|
|
2308
|
+
return yn(n, e) ? E.create(n.doc, [o.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
2291
2309
|
},
|
|
2292
2310
|
handleDOMEvents: {
|
|
2293
2311
|
blur(t) {
|
|
2294
|
-
return
|
|
2312
|
+
return $(t.state, e) && bn(), !1;
|
|
2295
2313
|
},
|
|
2296
2314
|
focus(t) {
|
|
2297
|
-
return
|
|
2298
|
-
!e.isDestroyed && t.hasFocus() &&
|
|
2315
|
+
return $(t.state, e) && requestAnimationFrame(() => {
|
|
2316
|
+
!e.isDestroyed && t.hasFocus() && xn(t);
|
|
2299
2317
|
}), !1;
|
|
2300
2318
|
}
|
|
2301
2319
|
}
|
|
@@ -2303,10 +2321,10 @@ T.create({
|
|
|
2303
2321
|
})];
|
|
2304
2322
|
}
|
|
2305
2323
|
});
|
|
2306
|
-
function
|
|
2324
|
+
function Sn({ types: e, node: t }) {
|
|
2307
2325
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
2308
2326
|
}
|
|
2309
|
-
var
|
|
2327
|
+
var Cn = O.create({
|
|
2310
2328
|
name: "trailingNode",
|
|
2311
2329
|
addOptions() {
|
|
2312
2330
|
return {
|
|
@@ -2315,8 +2333,8 @@ var _n = T.create({
|
|
|
2315
2333
|
};
|
|
2316
2334
|
},
|
|
2317
2335
|
addProseMirrorPlugins() {
|
|
2318
|
-
let e = new
|
|
2319
|
-
return [new
|
|
2336
|
+
let e = new l(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));
|
|
2337
|
+
return [new v({
|
|
2320
2338
|
key: e,
|
|
2321
2339
|
appendTransaction: (n, r, i) => {
|
|
2322
2340
|
let { doc: a, tr: o, schema: s } = i, c = e.getState(i), l = a.content.size, u = s.nodes[t];
|
|
@@ -2325,7 +2343,7 @@ var _n = T.create({
|
|
|
2325
2343
|
state: {
|
|
2326
2344
|
init: (e, t) => {
|
|
2327
2345
|
let r = t.tr.doc.lastChild;
|
|
2328
|
-
return !
|
|
2346
|
+
return !Sn({
|
|
2329
2347
|
node: r,
|
|
2330
2348
|
types: n
|
|
2331
2349
|
});
|
|
@@ -2333,7 +2351,7 @@ var _n = T.create({
|
|
|
2333
2351
|
apply: (e, t) => {
|
|
2334
2352
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
2335
2353
|
let r = e.doc.lastChild;
|
|
2336
|
-
return !
|
|
2354
|
+
return !Sn({
|
|
2337
2355
|
node: r,
|
|
2338
2356
|
types: n
|
|
2339
2357
|
});
|
|
@@ -2341,7 +2359,7 @@ var _n = T.create({
|
|
|
2341
2359
|
}
|
|
2342
2360
|
})];
|
|
2343
2361
|
}
|
|
2344
|
-
}),
|
|
2362
|
+
}), wn = O.create({
|
|
2345
2363
|
name: "undoRedo",
|
|
2346
2364
|
addOptions() {
|
|
2347
2365
|
return {
|
|
@@ -2351,12 +2369,12 @@ var _n = T.create({
|
|
|
2351
2369
|
},
|
|
2352
2370
|
addCommands() {
|
|
2353
2371
|
return {
|
|
2354
|
-
undo: () => ({ state: e, dispatch: t }) =>
|
|
2355
|
-
redo: () => ({ state: e, dispatch: t }) =>
|
|
2372
|
+
undo: () => ({ state: e, dispatch: t }) => h(e, t),
|
|
2373
|
+
redo: () => ({ state: e, dispatch: t }) => f(e, t)
|
|
2356
2374
|
};
|
|
2357
2375
|
},
|
|
2358
2376
|
addProseMirrorPlugins() {
|
|
2359
|
-
return [
|
|
2377
|
+
return [p(this.options)];
|
|
2360
2378
|
},
|
|
2361
2379
|
addKeyboardShortcuts() {
|
|
2362
2380
|
return {
|
|
@@ -2367,12 +2385,11 @@ var _n = T.create({
|
|
|
2367
2385
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
2368
2386
|
};
|
|
2369
2387
|
}
|
|
2370
|
-
}),
|
|
2388
|
+
}), Tn = O.create({
|
|
2371
2389
|
name: "starterKit",
|
|
2372
2390
|
addExtensions() {
|
|
2373
2391
|
let e = [];
|
|
2374
|
-
return this.options.bold !== !1 && e.push(
|
|
2392
|
+
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(He.configure(this.options.bulletList)), this.options.code !== !1 && e.push(Ee.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(ke.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(Ae.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(tn.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(nn.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(je.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(Me.configure(this.options.heading)), this.options.undoRedo !== !1 && e.push(wn.configure(this.options.undoRedo)), this.options.horizontalRule !== !1 && e.push(Ne.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(Re.configure(this.options.italic)), this.options.listItem !== !1 && e.push(ct.configure(this.options.listItem)), this.options.listKeymap !== !1 && e.push(W.configure(this.options?.listKeymap)), this.options.link !== !1 && e.push(de.configure(this.options?.link)), this.options.orderedList !== !1 && e.push(Nt.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(zt.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(Ht.configure(this.options.strike)), this.options.text !== !1 && e.push(Ut.configure(this.options.text)), this.options.underline !== !1 && e.push(fe.configure(this.options?.underline)), this.options.trailingNode !== !1 && e.push(Cn.configure(this.options?.trailingNode)), e;
|
|
2375
2393
|
}
|
|
2376
|
-
}),
|
|
2377
|
-
|
|
2378
|
-
export { $ as StarterKit, yn as default };
|
|
2394
|
+
}), En = Tn;
|
|
2395
|
+
export { Tn as StarterKit, En as default };
|