@fewangsit/wangsvue-fats 1.0.0-alpha.41 → 1.0.0-alpha.42
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/assets/lottiejs/loading-page-B9ooQcfF.system.js +1 -0
- package/assets/lottiejs/loading-page-CQ0mKER2.es.js +15 -0
- package/assets/lottiejs/loading-table-B4T3FYiI.system.js +1 -0
- package/assets/lottiejs/loading-table-BnpbX8Ew.es.js +15 -0
- package/assets/lottiejs/no-data-CMWnya_k.system.js +1 -0
- package/{no-data-DLHO1L_u.js → assets/lottiejs/no-data-DOy8kIGF.es.js} +13 -2
- package/components/animation/Animation-6756VN9N.system.js +1 -0
- package/components/animation/Animation-COWVilAA.es.js +428 -0
- package/components/approverinfo/ApproverInfo-BdqBpNjY.system.js +1 -0
- package/components/approverinfo/ApproverInfo-C3_ibV8c.es.js +321 -0
- package/components/assetinfo/AssetInfo-BBgKToRP.system.js +1 -0
- package/components/assetinfo/AssetInfo-CmwgOU74.es.js +298 -0
- package/components/backgroundimagecropper/BackgroundImageCropper-DFHtaSyE.system.js +1 -0
- package/components/backgroundimagecropper/BackgroundImageCropper-HKzUEXq-.es.js +57 -0
- package/components/badge/Badge-CndPv5v9.system.js +1 -0
- package/components/badge/Badge-DA-XiE1C.es.js +115 -0
- package/components/badgegroup/BadgeGroup-Bj0EjoML.es.js +68 -0
- package/components/badgegroup/BadgeGroup-Y-HhiHk8.system.js +1 -0
- package/components/basecalendar/BaseCalendar-47ahYXrt.es.js +867 -0
- package/components/basecalendar/BaseCalendar-Ce46jOkg.system.js +1 -0
- package/components/basetree/BaseTree-DDu1qI7t.system.js +1 -0
- package/components/basetree/BaseTree-DLSA5FMh.es.js +167 -0
- package/components/breadcrumb/Breadcrumb-B5bAijry.system.js +1 -0
- package/components/breadcrumb/Breadcrumb-BWSmLPqn.es.js +46 -0
- package/components/button/Button-D-MSv_AS.es.js +120 -0
- package/components/button/Button-Okx1_kOu.system.js +1 -0
- package/components/buttonbulkaction/ButtonBulkAction-B4RcdWmb.es.js +185 -0
- package/components/buttonbulkaction/ButtonBulkAction-DLmvicRL.system.js +1 -0
- package/components/buttoncopy/ButtonCopy-BZgQAFOM.es.js +31 -0
- package/components/buttoncopy/ButtonCopy-CKi1bBpz.system.js +1 -0
- package/components/buttondownload/ButtonDownload-Bw9T3mbW.es.js +92 -0
- package/components/buttondownload/ButtonDownload-CpA0ryUT.system.js +1 -0
- package/components/buttonfilter/ButtonFilter-BIE-jM2i.es.js +28 -0
- package/components/buttonfilter/ButtonFilter-C4WRvUrj.system.js +1 -0
- package/components/buttonradio/ButtonRadio-5VUY8o5h.es.js +83 -0
- package/components/buttonradio/ButtonRadio-B2wWrgB5.system.js +1 -0
- package/components/buttonscan/ButtonScan-BCScT2cx.es.js +421 -0
- package/components/buttonscan/ButtonScan-TbyhlW5M.system.js +1 -0
- package/components/buttonsearch/ButtonSearch-Clbafqts.es.js +70 -0
- package/components/buttonsearch/ButtonSearch-e57pD5r3.system.js +1 -0
- package/components/buttonselecttree/ButtonSelectTree-B-_Iw5sB.es.js +218 -0
- package/components/buttonselecttree/ButtonSelectTree-Cbq1oeVK.system.js +1 -0
- package/components/buttonselectuser/ButtonSelectUser-Ar7Y8tVR.es.js +101 -0
- package/components/buttonselectuser/ButtonSelectUser-Cfe6m75Z.system.js +1 -0
- package/components/buttonsync/ButtonSync-Bc1GZXT6.es.js +29 -0
- package/components/buttonsync/ButtonSync-ClllEdAy.system.js +1 -0
- package/components/buttontoggle/ButtonToggle-DIy3M8Pz.es.js +11 -0
- package/components/buttontoggle/ButtonToggle-VNp0lbcW.system.js +1 -0
- package/components/buttonviewlog/ButtonViewLog-Ct8QwEey.system.js +1 -0
- package/components/buttonviewlog/ButtonViewLog-h9uVv5A5.es.js +21 -0
- package/components/calendar/Calendar-7yBKZsvj.system.js +1 -0
- package/components/calendar/Calendar-Df6CnW-l.es.js +112 -0
- package/components/card/Card-BUKU2FcT.system.js +1 -0
- package/components/card/Card-CwnxKNdM.es.js +47 -0
- package/components/checkbox/Checkbox-CCtItmVW.system.js +1 -0
- package/components/checkbox/Checkbox-DdsR222S.es.js +135 -0
- package/components/codesnippet/CodeSnippet-Bpps-Iyc.es.js +127 -0
- package/components/codesnippet/CodeSnippet-DvTtZ28b.system.js +2 -0
- package/components/codesnippetadapter/CodeSnippetAdapter-BtSqWBl1.system.js +1 -0
- package/components/codesnippetadapter/CodeSnippetAdapter-jgXoPKzr.es.js +26 -0
- package/components/columnlist/ColumnList-Bh3LZlOa.system.js +1 -0
- package/components/columnlist/ColumnList-Bp7soiys.es.js +204 -0
- package/components/customcolumn/CustomColumn-CVhAbTGn.system.js +1 -0
- package/components/customcolumn/CustomColumn-Dblxjw_0.es.js +138 -0
- package/components/datatable/DataTable--mHUKNUr.system.js +1 -0
- package/components/datatable/DataTable-J1j-OKsW.es.js +983 -0
- package/components/dialog/Dialog-Dy93f91f.es.js +121 -0
- package/components/dialog/Dialog-WEl66uTI.system.js +1 -0
- package/components/dialogconfirm/DialogConfirm-BOFb7rJD.es.js +139 -0
- package/components/dialogconfirm/DialogConfirm-o7_v7F31.system.js +1 -0
- package/components/dialogform/DialogForm-C15nC1wH.es.js +223 -0
- package/components/dialogform/DialogForm-CdpY1_-F.system.js +1 -0
- package/components/dialogselecttree/DialogSelectTree-BA8xEqco.es.js +268 -0
- package/components/dialogselecttree/DialogSelectTree-DKxWI9Re.system.js +1 -0
- package/components/dialogselectuser/DialogSelectUser-BZTSktHZ.system.js +1 -0
- package/components/dialogselectuser/DialogSelectUser-Bu5TDAPt.es.js +186 -0
- package/components/dialogselectuserfilter/DialogSelectUserFilter-DEl4zFaX.system.js +1 -0
- package/components/dialogselectuserfilter/DialogSelectUserFilter-Dz5OxAU-.es.js +40 -0
- package/components/dropdown/Dropdown-D4S52rW5.es.js +252 -0
- package/components/dropdown/Dropdown-DuvNYyq0.system.js +1 -0
- package/components/editor/Editor-DQ7Xdy30.es.js +1036 -0
- package/components/editor/Editor-IfYw2Tps.system.js +1 -0
- package/components/editorbutton/EditorButton-DDgS2vga.es.js +28 -0
- package/components/editorbutton/EditorButton-DmVrr4Bk.system.js +1 -0
- package/components/fieldwrapper/FieldWrapper-C6HJ2HnC.es.js +34 -0
- package/components/fieldwrapper/FieldWrapper-DFjw9hA8.system.js +1 -0
- package/components/fileupload/FileUpload-B6PAucnD.es.js +175 -0
- package/components/fileupload/FileUpload-iVAJXujV.system.js +1 -0
- package/components/filtercontainer/FilterContainer-CuMaq5Sv.es.js +284 -0
- package/components/filtercontainer/FilterContainer-DUeVLHgZ.system.js +1 -0
- package/components/form/Form-D-e0VI8V.system.js +1 -0
- package/components/form/Form-eSj-nb1y.es.js +181 -0
- package/components/hardwaresync/HardwareSync--HomfQuH.system.js +1 -0
- package/components/hardwaresync/HardwareSync-DUsVwHx1.es.js +236 -0
- package/components/icon/Icon-DUylRmY4.system.js +1 -0
- package/components/icon/Icon-mDqG7urn.es.js +82 -0
- package/components/image/Image-BZ31CL-y.es.js +169 -0
- package/components/image/Image-DX6uB7Ns.system.js +1 -0
- package/components/imagecompressor/ImageCompressor-BLeJDvN3.system.js +1 -0
- package/components/imagecompressor/ImageCompressor-DaW0ak9c.es.js +501 -0
- package/components/imageinputinfo/ImageInputInfo-C5F14hbF.system.js +1 -0
- package/components/imageinputinfo/ImageInputInfo-oTtVBxzO.es.js +46 -0
- package/components/inlinemessage/InlineMessage-19w6FOcP.system.js +1 -0
- package/components/inlinemessage/InlineMessage-CBZT3jWS.es.js +94 -0
- package/components/inputbadge/InputBadge-CsdT7M7-.es.js +186 -0
- package/components/inputbadge/InputBadge-dgANMV70.system.js +1 -0
- package/components/inputcurrency/InputCurrency-B96npK8W.es.js +1208 -0
- package/components/inputcurrency/InputCurrency-ChqGX5L8.system.js +1 -0
- package/components/inputemail/InputEmail-BMzumenA.es.js +49 -0
- package/components/inputemail/InputEmail-CYILS9bp.system.js +1 -0
- package/components/inputgroup/InputGroup-G9TEI4vX.system.js +1 -0
- package/components/inputgroup/InputGroup-eNDRlJ5R.es.js +56 -0
- package/components/inputnumber/InputNumber-Bzk_YzWM.es.js +232 -0
- package/components/inputnumber/InputNumber-CRyg8Xw_.system.js +1 -0
- package/components/inputpassword/InputPassword-BMHMWLgU.es.js +121 -0
- package/components/inputpassword/InputPassword-BjB6FsoL.system.js +1 -0
- package/components/inputphonenumber/InputPhoneNumber-CVM2oK5q.es.js +591 -0
- package/components/inputphonenumber/InputPhoneNumber-DIbd3upL.system.js +1 -0
- package/components/inputrangenumber/InputRangeNumber-B1aAoKVj.es.js +134 -0
- package/components/inputrangenumber/InputRangeNumber-C28xgFBY.system.js +1 -0
- package/components/inputsearch/InputSearch--KHwTBTm.system.js +1 -0
- package/components/inputsearch/InputSearch-cPq3vqhy.es.js +53 -0
- package/components/inputtext/InputText-93zDNfC3.system.js +1 -0
- package/components/inputtext/InputText-_xEnXysf.es.js +241 -0
- package/components/inputurl/InputURL-aqx1PVKL.es.js +61 -0
- package/components/inputurl/InputURL-kWIiKGEG.system.js +1 -0
- package/components/invisiblefield/InvisibleField-4XbiOrqw.es.js +27 -0
- package/components/invisiblefield/InvisibleField-BHudtX2g.system.js +1 -0
- package/components/litedropdown/LiteDropdown-3KsCx4wX.system.js +1 -0
- package/components/litedropdown/LiteDropdown-DcSzP11l.es.js +102 -0
- package/components/loading/Loading-D8M801C9.es.js +24 -0
- package/components/loading/Loading-Diwog8dc.system.js +1 -0
- package/components/mentionlist/MentionList--7AymnhE.es.js +58 -0
- package/components/mentionlist/MentionList-600dsWhX.system.js +1 -0
- package/components/mentionsection/MentionSection-C1gWOzH2.system.js +3 -0
- package/components/mentionsection/MentionSection-C_c4qbpq.es.js +52 -0
- package/components/menu/Menu-BmTMFwBD.es.js +73 -0
- package/components/menu/Menu-OR25pAK3.system.js +1 -0
- package/components/menuitem/MenuItem-LoZMc0T9.es.js +65 -0
- package/components/menuitem/MenuItem-imQ-hYTP.system.js +1 -0
- package/components/multirow/MultiRow-ClSMxrEx.es.js +52 -0
- package/components/multirow/MultiRow-DKu6uIsI.system.js +1 -0
- package/components/multiselect/MultiSelect-DGhS1EyX.es.js +189 -0
- package/components/multiselect/MultiSelect-DKFYq47E.system.js +1 -0
- package/components/overlaypanel/OverlayPanel-C_WCcNPw.system.js +1 -0
- package/components/overlaypanel/OverlayPanel-DXNek7Yb.es.js +49 -0
- package/components/tabmenu/TabMenu-CAQqu-ff.system.js +1 -0
- package/components/tabmenu/TabMenu-iMeZa8gy.es.js +108 -0
- package/components/tagtype/TagType-CX7BVRrE.es.js +49 -0
- package/components/tagtype/TagType-IMYg8AJf.system.js +1 -0
- package/components/textarea/Textarea-ClnQ2qmf.es.js +108 -0
- package/components/textarea/Textarea-DlkzVURV.system.js +1 -0
- package/components/timeline/Timeline-BMRdV_mH.es.js +120 -0
- package/components/timeline/Timeline-D7SYc3QX.system.js +1 -0
- package/components/timelinecontentbytype/TimelineContentByType-BmWsZID0.system.js +1 -0
- package/components/timelinecontentbytype/TimelineContentByType-ehFLzTA1.es.js +111 -0
- package/components/toast/Toast-DnALWJkx.es.js +74 -0
- package/components/toast/Toast-Pc_DOZ5-.system.js +1 -0
- package/components/toggleswitch/ToggleSwitch-WHdD3oYL.system.js +1 -0
- package/components/toggleswitch/ToggleSwitch-wRjnHRIw.es.js +90 -0
- package/components/transactionroles/TransactionRoles-B_67h5wb.es.js +223 -0
- package/components/transactionroles/TransactionRoles-DSXBVwPM.system.js +1 -0
- package/components/tree/Tree-BoVGYw5N.system.js +1 -0
- package/components/tree/Tree-DnaIZZ8S.es.js +268 -0
- package/components/treenode/TreeNode-D5aepDIU.system.js +1 -0
- package/components/treenode/TreeNode-KJOUvlTH.es.js +499 -0
- package/components/treesearchinput/TreeSearchInput-B1PmhE7k.es.js +56 -0
- package/components/treesearchinput/TreeSearchInput-C-hXPV61.system.js +1 -0
- package/components/username/UserName-CCyPAYG6.system.js +1 -0
- package/components/username/UserName-CWs83BX6.es.js +130 -0
- package/components/userwithicon/UserWithIcon-CFjQcbAS.system.js +1 -0
- package/components/userwithicon/UserWithIcon-Dn3aNKdq.es.js +18 -0
- package/components/validatormessage/ValidatorMessage-BtKfBXzO.es.js +19 -0
- package/components/validatormessage/ValidatorMessage-VVfyqlRF.system.js +1 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/style.css +1 -1
- package/vendor/@popperjs/core-BDAJHTVh.es.js +905 -0
- package/vendor/@popperjs/core-DpNOCyB0.system.js +1 -0
- package/vendor/@tiptap/core-BLz8iRA3.es.js +2868 -0
- package/vendor/@tiptap/core-bnIgGWIt.system.js +80 -0
- package/vendor/@tiptap/extension-bold-BnsTNqIJ.es.js +71 -0
- package/vendor/@tiptap/extension-bold-C_KVm_D0.system.js +1 -0
- package/vendor/@tiptap/extension-bubble-menu-D421L1EU.system.js +1 -0
- package/vendor/@tiptap/extension-bubble-menu-D9Vgq7yO.es.js +128 -0
- package/vendor/@tiptap/extension-bullet-list-GNj3sKw9.es.js +53 -0
- package/vendor/@tiptap/extension-bullet-list-kXXFF-_p.system.js +1 -0
- package/vendor/@tiptap/extension-code-CfQ7g1i2.es.js +51 -0
- package/vendor/@tiptap/extension-code-Q8P1EHjz.system.js +1 -0
- package/vendor/@tiptap/extension-floating-menu-8rFSweor.system.js +1 -0
- package/vendor/@tiptap/extension-floating-menu-CSQuJzDM.es.js +99 -0
- package/vendor/@tiptap/extension-heading-BE64-Rg_.system.js +1 -0
- package/vendor/@tiptap/extension-heading-ZTlCgdtc.es.js +54 -0
- package/vendor/@tiptap/extension-history-GLkLmX-Y.system.js +1 -0
- package/vendor/@tiptap/extension-history-eJIThEn-.es.js +35 -0
- package/vendor/@tiptap/extension-image-B8NPUVFM.es.js +64 -0
- package/vendor/@tiptap/extension-image-rKrdkZpJ.system.js +1 -0
- package/vendor/@tiptap/extension-italic-C_CyJubw.es.js +70 -0
- package/vendor/@tiptap/extension-italic-Dg0Nosoc.system.js +1 -0
- package/vendor/@tiptap/extension-link-Cd8bTMBz.system.js +1 -0
- package/vendor/@tiptap/extension-link-D4PFdLvA.es.js +262 -0
- package/vendor/@tiptap/extension-list-item-7pIJ7t09.es.js +33 -0
- package/vendor/@tiptap/extension-list-item-Mnhfw2gP.system.js +1 -0
- package/vendor/@tiptap/extension-mention-DVF3rX_z.system.js +1 -0
- package/vendor/@tiptap/extension-mention-Dkg-tbrz.es.js +130 -0
- package/vendor/@tiptap/extension-ordered-list-DLI4xDN8.es.js +71 -0
- package/vendor/@tiptap/extension-ordered-list-Hl0QU8Zt.system.js +1 -0
- package/vendor/@tiptap/extension-placeholder-BeLl2T-f.system.js +1 -0
- package/vendor/@tiptap/extension-placeholder-V0iTxU19.es.js +52 -0
- package/vendor/@tiptap/extension-underline-BdcAQ4JH.system.js +1 -0
- package/vendor/@tiptap/extension-underline-DsGbvz80.es.js +40 -0
- package/vendor/@tiptap/suggestion-BpZSO8Lm.system.js +1 -0
- package/vendor/@tiptap/suggestion-C4sBhJAD.es.js +131 -0
- package/vendor/@tiptap/vue-3-BH1pZykd.system.js +1 -0
- package/vendor/@tiptap/vue-3-DceiR7pK.es.js +436 -0
- package/vendor/highlight.js-BAruEf1H.system.js +2 -0
- package/vendor/highlight.js-DHowhWoU.es.js +2493 -0
- package/vendor/linkifyjs-BxsOjwQz.es.js +705 -0
- package/vendor/linkifyjs-CMLfIa6I.system.js +5 -0
- package/vendor/lodash-DbIT-6qv.es.js +127 -0
- package/vendor/lodash-DbvKLWSv.system.js +1 -0
- package/vendor/lodash-es-C3G1Cc1m.system.js +1 -0
- package/vendor/lodash-es-CJerBxJQ.es.js +766 -0
- package/vendor/orderedmap-B3SOk52B.es.js +103 -0
- package/vendor/orderedmap-Dwr31MF0.system.js +1 -0
- package/vendor/primevue-CadmDhWp.es.js +13928 -0
- package/vendor/primevue-u6FsQONA.system.js +193 -0
- package/vendor/prosemirror-commands-DLmzIpoS.es.js +383 -0
- package/vendor/prosemirror-commands-DgY3QRzI.system.js +2 -0
- package/vendor/prosemirror-history-BMpJFORS.es.js +248 -0
- package/vendor/prosemirror-history-BrK-FTBv.system.js +1 -0
- package/vendor/prosemirror-keymap-COb3Dq2o.system.js +1 -0
- package/vendor/prosemirror-keymap-DF8LLxca.es.js +60 -0
- package/vendor/prosemirror-model-D2n-Dx_L.es.js +2736 -0
- package/vendor/prosemirror-model-DTWK5xnv.system.js +4 -0
- package/vendor/prosemirror-schema-list-BPpAP8wR.system.js +1 -0
- package/vendor/prosemirror-schema-list-BvrICwYb.es.js +87 -0
- package/vendor/prosemirror-state-CwkYUmNs.es.js +820 -0
- package/vendor/prosemirror-state-DzPLD-6l.system.js +1 -0
- package/vendor/prosemirror-transform-DvAmofec.es.js +1507 -0
- package/vendor/prosemirror-transform-VaXuT0NM.system.js +2 -0
- package/vendor/prosemirror-view-JTdpiWMD.system.js +5 -0
- package/vendor/prosemirror-view-ta7l3rKk.es.js +3742 -0
- package/vendor/rope-sequence-4t46C6az.system.js +1 -0
- package/vendor/rope-sequence-sEGCUMi8.es.js +100 -0
- package/vendor/simplebar-core-71xT5g0m.system.js +1 -0
- package/vendor/simplebar-core-Db65-Ath.es.js +333 -0
- package/vendor/simplebar-vue-BFEeFUIv.system.js +1 -0
- package/vendor/simplebar-vue-DAxqu0eM.es.js +176 -0
- package/vendor/tippy.js-CuKTz0UR.system.js +1 -0
- package/vendor/tippy.js-DNnwm2RY.es.js +721 -0
- package/vendor/uuid-93tp0umt.es.js +9 -0
- package/vendor/uuid-Cymn6orr.system.js +1 -0
- package/vendor/vee-validate-Cc_B-qII.system.js +5 -0
- package/vendor/vee-validate-RE5RuswC.es.js +1309 -0
- package/vendor/vue-advanced-cropper-CshlvNaD.es.js +1380 -0
- package/vendor/vue-advanced-cropper-NG93jHnU.system.js +20 -0
- package/vendor/w3c-keyname-BSD-PgAi.system.js +1 -0
- package/vendor/w3c-keyname-CLxH8j-f.es.js +92 -0
- package/wangsvue-fats.js +542 -0
- package/wangsvue-fats.system.js +1 -313
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CoC9UhfC.js +0 -4
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-page-f8D03l3G.js +0 -4
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-plane-CoXtqoc9.js +0 -4
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-ByUoWqUo.js +0 -4
- package/loading-table-BygEMzFM.js +0 -4
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-D9bw9OcI.js +0 -4
- package/loading-table-chOgXi94.js +0 -1
- package/no-data-CTKux8RI.js +0 -4
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-g0dJCy2p.js +0 -4
- package/no-data-y1X5WtcQ.js +0 -1
- package/wangsvue-fats.es.js +0 -51894
- /package/{loading-page-CgfbWppy.js → assets/lottiejs/loading-plane-CgfbWppy.system.js} +0 -0
- /package/{loading-page-CoXtqoc9.js → assets/lottiejs/loading-plane-CoXtqoc9.es.js} +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { E as c, g as m, d as f, p as y } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
import { P as v, a as g } from "../prosemirror-state-CwkYUmNs.es.js";
|
|
3
|
+
import { t as w } from "../tippy.js-DNnwm2RY.es.js";
|
|
4
|
+
class H {
|
|
5
|
+
getTextContent(t) {
|
|
6
|
+
return m(t, { textSerializers: f(this.editor.schema) });
|
|
7
|
+
}
|
|
8
|
+
constructor({ editor: t, element: i, view: l, tippyOptions: h = {}, shouldShow: n }) {
|
|
9
|
+
this.preventHide = !1, this.shouldShow = ({ view: e, state: o }) => {
|
|
10
|
+
const { selection: p } = o, { $anchor: s, empty: d } = p, u = s.depth === 1, a = s.parent.isTextblock && !s.parent.type.spec.code && !s.parent.textContent && s.parent.childCount === 0 && !this.getTextContent(s.parent);
|
|
11
|
+
return !(!e.hasFocus() || !d || !u || !a || !this.editor.isEditable);
|
|
12
|
+
}, this.mousedownHandler = () => {
|
|
13
|
+
this.preventHide = !0;
|
|
14
|
+
}, this.focusHandler = () => {
|
|
15
|
+
setTimeout(() => this.update(this.editor.view));
|
|
16
|
+
}, this.blurHandler = ({ event: e }) => {
|
|
17
|
+
var o;
|
|
18
|
+
if (this.preventHide) {
|
|
19
|
+
this.preventHide = !1;
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
e != null && e.relatedTarget && (!((o = this.element.parentNode) === null || o === void 0) && o.contains(e.relatedTarget)) || (e == null ? void 0 : e.relatedTarget) !== this.editor.view.dom && this.hide();
|
|
23
|
+
}, this.tippyBlurHandler = (e) => {
|
|
24
|
+
this.blurHandler({ event: e });
|
|
25
|
+
}, this.editor = t, this.element = i, this.view = l, n && (this.shouldShow = n), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = h, this.element.remove(), this.element.style.visibility = "visible";
|
|
26
|
+
}
|
|
27
|
+
createTooltip() {
|
|
28
|
+
const { element: t } = this.editor.options, i = !!t.parentElement;
|
|
29
|
+
this.tippy || !i || (this.tippy = w(t, {
|
|
30
|
+
duration: 0,
|
|
31
|
+
getReferenceClientRect: null,
|
|
32
|
+
content: this.element,
|
|
33
|
+
interactive: !0,
|
|
34
|
+
trigger: "manual",
|
|
35
|
+
placement: "right",
|
|
36
|
+
hideOnClick: "toggle",
|
|
37
|
+
...this.tippyOptions
|
|
38
|
+
}), this.tippy.popper.firstChild && this.tippy.popper.firstChild.addEventListener("blur", this.tippyBlurHandler));
|
|
39
|
+
}
|
|
40
|
+
update(t, i) {
|
|
41
|
+
var l, h, n;
|
|
42
|
+
const { state: e } = t, { doc: o, selection: p } = e, { from: s, to: d } = p;
|
|
43
|
+
if (i && i.doc.eq(o) && i.selection.eq(p))
|
|
44
|
+
return;
|
|
45
|
+
if (this.createTooltip(), !((l = this.shouldShow) === null || l === void 0 ? void 0 : l.call(this, {
|
|
46
|
+
editor: this.editor,
|
|
47
|
+
view: t,
|
|
48
|
+
state: e,
|
|
49
|
+
oldState: i
|
|
50
|
+
}))) {
|
|
51
|
+
this.hide();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
(h = this.tippy) === null || h === void 0 || h.setProps({
|
|
55
|
+
getReferenceClientRect: ((n = this.tippyOptions) === null || n === void 0 ? void 0 : n.getReferenceClientRect) || (() => y(t, s, d))
|
|
56
|
+
}), this.show();
|
|
57
|
+
}
|
|
58
|
+
show() {
|
|
59
|
+
var t;
|
|
60
|
+
(t = this.tippy) === null || t === void 0 || t.show();
|
|
61
|
+
}
|
|
62
|
+
hide() {
|
|
63
|
+
var t;
|
|
64
|
+
(t = this.tippy) === null || t === void 0 || t.hide();
|
|
65
|
+
}
|
|
66
|
+
destroy() {
|
|
67
|
+
var t, i;
|
|
68
|
+
!((t = this.tippy) === null || t === void 0) && t.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (i = this.tippy) === null || i === void 0 || i.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const b = (r) => new v({
|
|
72
|
+
key: typeof r.pluginKey == "string" ? new g(r.pluginKey) : r.pluginKey,
|
|
73
|
+
view: (t) => new H({ view: t, ...r })
|
|
74
|
+
}), E = c.create({
|
|
75
|
+
name: "floatingMenu",
|
|
76
|
+
addOptions() {
|
|
77
|
+
return {
|
|
78
|
+
element: null,
|
|
79
|
+
tippyOptions: {},
|
|
80
|
+
pluginKey: "floatingMenu",
|
|
81
|
+
shouldShow: null
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
addProseMirrorPlugins() {
|
|
85
|
+
return this.options.element ? [
|
|
86
|
+
b({
|
|
87
|
+
pluginKey: this.options.pluginKey,
|
|
88
|
+
editor: this.editor,
|
|
89
|
+
element: this.options.element,
|
|
90
|
+
tippyOptions: this.options.tippyOptions,
|
|
91
|
+
shouldShow: this.options.shouldShow
|
|
92
|
+
})
|
|
93
|
+
] : [];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
E as F,
|
|
98
|
+
b as a
|
|
99
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(l,o){"use strict";var n,r,i;return{setters:[s=>{n=s.N,r=s.t,i=s.m}],execute:function(){const s=l("H",n.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,i(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>r({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}))}}});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { N as s, t as n, m as r } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const a = s.create({
|
|
3
|
+
name: "heading",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
levels: [1, 2, 3, 4, 5, 6],
|
|
7
|
+
HTMLAttributes: {}
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
content: "inline*",
|
|
11
|
+
group: "block",
|
|
12
|
+
defining: !0,
|
|
13
|
+
addAttributes() {
|
|
14
|
+
return {
|
|
15
|
+
level: {
|
|
16
|
+
default: 1,
|
|
17
|
+
rendered: !1
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
parseHTML() {
|
|
22
|
+
return this.options.levels.map((e) => ({
|
|
23
|
+
tag: `h${e}`,
|
|
24
|
+
attrs: { level: e }
|
|
25
|
+
}));
|
|
26
|
+
},
|
|
27
|
+
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
28
|
+
return [`h${this.options.levels.includes(e.attrs.level) ? e.attrs.level : this.options.levels[0]}`, r(this.options.HTMLAttributes, t), 0];
|
|
29
|
+
},
|
|
30
|
+
addCommands() {
|
|
31
|
+
return {
|
|
32
|
+
setHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.setNode(this.name, e) : !1,
|
|
33
|
+
toggleHeading: (e) => ({ commands: t }) => this.options.levels.includes(e.level) ? t.toggleNode(this.name, "paragraph", e) : !1
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
addKeyboardShortcuts() {
|
|
37
|
+
return this.options.levels.reduce((e, t) => ({
|
|
38
|
+
...e,
|
|
39
|
+
[`Mod-Alt-${t}`]: () => this.editor.commands.toggleHeading({ level: t })
|
|
40
|
+
}), {});
|
|
41
|
+
},
|
|
42
|
+
addInputRules() {
|
|
43
|
+
return this.options.levels.map((e) => n({
|
|
44
|
+
find: new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),
|
|
45
|
+
type: this.type,
|
|
46
|
+
getAttributes: {
|
|
47
|
+
level: e
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
a as H
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js","../prosemirror-history-BrK-FTBv.system.js"],function(i,u){"use strict";var e,s,d,n;return{setters:[r=>{e=r.E},r=>{s=r.h,d=r.r,n=r.u}],execute:function(){const r=i("H",e.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:o,dispatch:t})=>n(o,t),redo:()=>({state:o,dispatch:t})=>d(o,t)}},addProseMirrorPlugins(){return[s(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}))}}});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { E as d } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
import { h as t, r as s, u as e } from "../prosemirror-history-BMpJFORS.es.js";
|
|
3
|
+
const a = d.create({
|
|
4
|
+
name: "history",
|
|
5
|
+
addOptions() {
|
|
6
|
+
return {
|
|
7
|
+
depth: 100,
|
|
8
|
+
newGroupDelay: 500
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
addCommands() {
|
|
12
|
+
return {
|
|
13
|
+
undo: () => ({ state: o, dispatch: r }) => e(o, r),
|
|
14
|
+
redo: () => ({ state: o, dispatch: r }) => s(o, r)
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
addProseMirrorPlugins() {
|
|
18
|
+
return [
|
|
19
|
+
t(this.options)
|
|
20
|
+
];
|
|
21
|
+
},
|
|
22
|
+
addKeyboardShortcuts() {
|
|
23
|
+
return {
|
|
24
|
+
"Mod-z": () => this.editor.commands.undo(),
|
|
25
|
+
"Shift-Mod-z": () => this.editor.commands.redo(),
|
|
26
|
+
"Mod-y": () => this.editor.commands.redo(),
|
|
27
|
+
// Russian keyboard layouts
|
|
28
|
+
"Mod-я": () => this.editor.commands.undo(),
|
|
29
|
+
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
a as H
|
|
35
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { N as s, n as i, m as a } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const l = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, o = s.create({
|
|
3
|
+
name: "image",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
inline: !1,
|
|
7
|
+
allowBase64: !1,
|
|
8
|
+
HTMLAttributes: {}
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
inline() {
|
|
12
|
+
return this.options.inline;
|
|
13
|
+
},
|
|
14
|
+
group() {
|
|
15
|
+
return this.options.inline ? "inline" : "block";
|
|
16
|
+
},
|
|
17
|
+
draggable: !0,
|
|
18
|
+
addAttributes() {
|
|
19
|
+
return {
|
|
20
|
+
src: {
|
|
21
|
+
default: null
|
|
22
|
+
},
|
|
23
|
+
alt: {
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
default: null
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
parseHTML() {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
tag: this.options.allowBase64 ? "img[src]" : 'img[src]:not([src^="data:"])'
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
},
|
|
38
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
39
|
+
return ["img", a(this.options.HTMLAttributes, t)];
|
|
40
|
+
},
|
|
41
|
+
addCommands() {
|
|
42
|
+
return {
|
|
43
|
+
setImage: (t) => ({ commands: e }) => e.insertContent({
|
|
44
|
+
type: this.name,
|
|
45
|
+
attrs: t
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
addInputRules() {
|
|
50
|
+
return [
|
|
51
|
+
i({
|
|
52
|
+
find: l,
|
|
53
|
+
type: this.type,
|
|
54
|
+
getAttributes: (t) => {
|
|
55
|
+
const [, , e, n, r] = t;
|
|
56
|
+
return { src: n, alt: e, title: r };
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
o as I
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(u,o){"use strict";var r,s,i;return{setters:[t=>{r=t.N,s=t.n,i=t.m}],execute:function(){const t=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,d=u("I",r.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",i(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:n})=>n.insertContent({type:this.name,attrs:e})}},addInputRules(){return[s({find:t,type:this.type,getAttributes:e=>{const[,,n,a,l]=e;return{src:a,alt:n,title:l}}})]}}))}}});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { M as r, a as e, b as s, m as a } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const n = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, i = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, o = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, l = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, d = r.create({
|
|
3
|
+
name: "italic",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
HTMLAttributes: {}
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
parseHTML() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
tag: "em"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
tag: "i",
|
|
16
|
+
getAttrs: (t) => t.style.fontStyle !== "normal" && null
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
style: "font-style=normal",
|
|
20
|
+
clearMark: (t) => t.type.name === this.name
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
style: "font-style=italic"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
},
|
|
27
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
28
|
+
return ["em", a(this.options.HTMLAttributes, t), 0];
|
|
29
|
+
},
|
|
30
|
+
addCommands() {
|
|
31
|
+
return {
|
|
32
|
+
setItalic: () => ({ commands: t }) => t.setMark(this.name),
|
|
33
|
+
toggleItalic: () => ({ commands: t }) => t.toggleMark(this.name),
|
|
34
|
+
unsetItalic: () => ({ commands: t }) => t.unsetMark(this.name)
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
addKeyboardShortcuts() {
|
|
38
|
+
return {
|
|
39
|
+
"Mod-i": () => this.editor.commands.toggleItalic(),
|
|
40
|
+
"Mod-I": () => this.editor.commands.toggleItalic()
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
addInputRules() {
|
|
44
|
+
return [
|
|
45
|
+
s({
|
|
46
|
+
find: n,
|
|
47
|
+
type: this.type
|
|
48
|
+
}),
|
|
49
|
+
s({
|
|
50
|
+
find: o,
|
|
51
|
+
type: this.type
|
|
52
|
+
})
|
|
53
|
+
];
|
|
54
|
+
},
|
|
55
|
+
addPasteRules() {
|
|
56
|
+
return [
|
|
57
|
+
e({
|
|
58
|
+
find: i,
|
|
59
|
+
type: this.type
|
|
60
|
+
}),
|
|
61
|
+
e({
|
|
62
|
+
find: l,
|
|
63
|
+
type: this.type
|
|
64
|
+
})
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
d as I
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(i,l){"use strict";var n,s,r,a;return{setters:[e=>{n=e.M,s=e.a,r=e.b,a=e.m}],execute:function(){const e=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,u=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,o=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,c=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,d=i("I",n.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",a(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[r({find:e,type:this.type}),r({find:o,type:this.type})]},addPasteRules(){return[s({find:u,type:this.type}),s({find:c,type:this.type})]}}))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js","../linkifyjs-CMLfIa6I.system.js","../prosemirror-state-DzPLD-6l.system.js"],function(V,_){"use strict";var M,x,P,b,C,T,w,E,y,v,H,B,A,m;return{setters:[n=>{M=n.M,x=n.a,P=n.m,b=n.e,C=n.f,T=n.h,w=n.j,E=n.k},n=>{y=n.f,v=n.r,H=n.t,B=n.a},n=>{A=n.P,m=n.a}],execute:function(){function n(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function j(t){return new A({key:new m("autolink"),appendTransaction:(e,i,o)=>{const l=e.some(s=>s.docChanged)&&!i.doc.eq(o.doc),a=e.some(s=>s.getMeta("preventAutolink"));if(!l||a)return;const{tr:u}=o,d=b(i.doc,[...e]);if(C(d).forEach(({newRange:s})=>{const h=T(o.doc,s,g=>g.isTextblock);let f,p;if(h.length>1?(f=h[0],p=o.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):h.length&&o.doc.textBetween(s.from,s.to," "," ").endsWith(" ")&&(f=h[0],p=o.doc.textBetween(f.pos,s.to,void 0," ")),f&&p){const g=p.split(" ").filter(r=>r!=="");if(g.length<=0)return!1;const L=g[g.length-1],O=f.pos+p.lastIndexOf(L);if(!L)return!1;const U=H(L).map(r=>r.toObject(t.defaultProtocol));if(!n(U))return!1;U.filter(r=>r.isLink).map(r=>({...r,from:O+r.start+1,to:O+r.end+1})).filter(r=>o.schema.marks.code?!o.doc.rangeHasMark(r.from,r.to,o.schema.marks.code):!0).filter(r=>t.validate(r.value)).filter(r=>t.shouldAutoLink(r.value)).forEach(r=>{w(r.from,r.to,o.doc).some(I=>I.mark.type===t.type)||u.addMark(r.from,r.to,t.type.create({href:r.href}))})}}),!!u.steps.length)return u}})}function R(t){return new A({key:new m("handleClickLink"),props:{handleClick:(e,i,o)=>{var l,a;if(o.button!==0||!e.editable)return!1;let u=o.target;const d=[];for(;u.nodeName!=="DIV";)d.push(u),u=u.parentNode;if(!d.find(p=>p.nodeName==="A"))return!1;const k=E(e.state,t.type.name),s=o.target,h=(l=s==null?void 0:s.href)!==null&&l!==void 0?l:k.href,f=(a=s==null?void 0:s.target)!==null&&a!==void 0?a:k.target;return s&&h?(window.open(h,f),!0):!1}}})}function W(t){return new A({key:new m("handlePasteLink"),props:{handlePaste:(e,i,o)=>{const{state:l}=e,{selection:a}=l,{empty:u}=a;if(u)return!1;let d="";o.content.forEach(s=>{d+=s.textContent});const k=y(d,{defaultProtocol:t.defaultProtocol}).find(s=>s.isLink&&s.value===d);return!d||!k?!1:t.editor.commands.setMark(t.type,{href:k.href})}}})}const z=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function c(t,e){const i=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(o=>{const l=typeof o=="string"?o:o.scheme;l&&i.push(l)}),!t||t.replace(z,"").match(new RegExp(`^(?:(?:${i.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const N=V("L",M.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){v(t);return}v(t.scheme,t.optionalSlashes)})},onDestroy(){B()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!c(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:i=>!!c(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!c(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",P(this.options.HTMLAttributes,t),0]:["a",P(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:i}=t;return this.options.isAllowedUri(i,{defaultValidate:o=>!!c(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:i}=t;return this.options.isAllowedUri(i,{defaultValidate:o=>!!c(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[x({find:t=>{const e=[];if(t){const{protocols:i,defaultProtocol:o}=this.options,l=y(t).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:u=>!!c(u,i),protocols:i,defaultProtocol:o}));l.length&&l.forEach(a=>e.push({text:a.value,data:{href:a.href},index:a.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:i}=this.options;return this.options.autolink&&t.push(j({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:o=>this.options.isAllowedUri(o,{defaultValidate:l=>!!c(l,e),protocols:e,defaultProtocol:i}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(R({type:this.type})),this.options.linkOnPaste&&t.push(W({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}))}}});
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { M as b, a as C, m as v, e as T, f as w, h as E, j as H, k as B } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
import { f as M, r as y, t as O, a as U } from "../linkifyjs-BxsOjwQz.es.js";
|
|
3
|
+
import { P as m, a as A } from "../prosemirror-state-CwkYUmNs.es.js";
|
|
4
|
+
function V(t) {
|
|
5
|
+
return t.length === 1 ? t[0].isLink : t.length === 3 && t[1].isLink ? ["()", "[]"].includes(t[0].value + t[2].value) : !1;
|
|
6
|
+
}
|
|
7
|
+
function R(t) {
|
|
8
|
+
return new m({
|
|
9
|
+
key: new A("autolink"),
|
|
10
|
+
appendTransaction: (e, n, o) => {
|
|
11
|
+
const i = e.some((s) => s.docChanged) && !n.doc.eq(o.doc), l = e.some((s) => s.getMeta("preventAutolink"));
|
|
12
|
+
if (!i || l)
|
|
13
|
+
return;
|
|
14
|
+
const { tr: a } = o, f = T(n.doc, [...e]);
|
|
15
|
+
if (w(f).forEach(({ newRange: s }) => {
|
|
16
|
+
const d = E(o.doc, s, (k) => k.isTextblock);
|
|
17
|
+
let u, c;
|
|
18
|
+
if (d.length > 1 ? (u = d[0], c = o.doc.textBetween(u.pos, u.pos + u.node.nodeSize, void 0, " ")) : d.length && o.doc.textBetween(s.from, s.to, " ", " ").endsWith(" ") && (u = d[0], c = o.doc.textBetween(u.pos, s.to, void 0, " ")), u && c) {
|
|
19
|
+
const k = c.split(" ").filter((r) => r !== "");
|
|
20
|
+
if (k.length <= 0)
|
|
21
|
+
return !1;
|
|
22
|
+
const g = k[k.length - 1], P = u.pos + c.lastIndexOf(g);
|
|
23
|
+
if (!g)
|
|
24
|
+
return !1;
|
|
25
|
+
const L = O(g).map((r) => r.toObject(t.defaultProtocol));
|
|
26
|
+
if (!V(L))
|
|
27
|
+
return !1;
|
|
28
|
+
L.filter((r) => r.isLink).map((r) => ({
|
|
29
|
+
...r,
|
|
30
|
+
from: P + r.start + 1,
|
|
31
|
+
to: P + r.end + 1
|
|
32
|
+
})).filter((r) => o.schema.marks.code ? !o.doc.rangeHasMark(r.from, r.to, o.schema.marks.code) : !0).filter((r) => t.validate(r.value)).filter((r) => t.shouldAutoLink(r.value)).forEach((r) => {
|
|
33
|
+
H(r.from, r.to, o.doc).some((x) => x.mark.type === t.type) || a.addMark(r.from, r.to, t.type.create({
|
|
34
|
+
href: r.href
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}), !!a.steps.length)
|
|
39
|
+
return a;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function W(t) {
|
|
44
|
+
return new m({
|
|
45
|
+
key: new A("handleClickLink"),
|
|
46
|
+
props: {
|
|
47
|
+
handleClick: (e, n, o) => {
|
|
48
|
+
var i, l;
|
|
49
|
+
if (o.button !== 0 || !e.editable)
|
|
50
|
+
return !1;
|
|
51
|
+
let a = o.target;
|
|
52
|
+
const f = [];
|
|
53
|
+
for (; a.nodeName !== "DIV"; )
|
|
54
|
+
f.push(a), a = a.parentNode;
|
|
55
|
+
if (!f.find((c) => c.nodeName === "A"))
|
|
56
|
+
return !1;
|
|
57
|
+
const h = B(e.state, t.type.name), s = o.target, d = (i = s == null ? void 0 : s.href) !== null && i !== void 0 ? i : h.href, u = (l = s == null ? void 0 : s.target) !== null && l !== void 0 ? l : h.target;
|
|
58
|
+
return s && d ? (window.open(d, u), !0) : !1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function z(t) {
|
|
64
|
+
return new m({
|
|
65
|
+
key: new A("handlePasteLink"),
|
|
66
|
+
props: {
|
|
67
|
+
handlePaste: (e, n, o) => {
|
|
68
|
+
const { state: i } = e, { selection: l } = i, { empty: a } = l;
|
|
69
|
+
if (a)
|
|
70
|
+
return !1;
|
|
71
|
+
let f = "";
|
|
72
|
+
o.content.forEach((s) => {
|
|
73
|
+
f += s.textContent;
|
|
74
|
+
});
|
|
75
|
+
const h = M(f, { defaultProtocol: t.defaultProtocol }).find((s) => s.isLink && s.value === f);
|
|
76
|
+
return !f || !h ? !1 : t.editor.commands.setMark(t.type, {
|
|
77
|
+
href: h.href
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const I = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
|
|
84
|
+
function p(t, e) {
|
|
85
|
+
const n = [
|
|
86
|
+
"http",
|
|
87
|
+
"https",
|
|
88
|
+
"ftp",
|
|
89
|
+
"ftps",
|
|
90
|
+
"mailto",
|
|
91
|
+
"tel",
|
|
92
|
+
"callto",
|
|
93
|
+
"sms",
|
|
94
|
+
"cid",
|
|
95
|
+
"xmpp"
|
|
96
|
+
];
|
|
97
|
+
return e && e.forEach((o) => {
|
|
98
|
+
const i = typeof o == "string" ? o : o.scheme;
|
|
99
|
+
i && n.push(i);
|
|
100
|
+
}), !t || t.replace(I, "").match(new RegExp(
|
|
101
|
+
// eslint-disable-next-line no-useless-escape
|
|
102
|
+
`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
|
|
103
|
+
"i"
|
|
104
|
+
));
|
|
105
|
+
}
|
|
106
|
+
const D = b.create({
|
|
107
|
+
name: "link",
|
|
108
|
+
priority: 1e3,
|
|
109
|
+
keepOnSplit: !1,
|
|
110
|
+
exitable: !0,
|
|
111
|
+
onCreate() {
|
|
112
|
+
this.options.validate && !this.options.shouldAutoLink && (this.options.shouldAutoLink = this.options.validate, console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")), this.options.protocols.forEach((t) => {
|
|
113
|
+
if (typeof t == "string") {
|
|
114
|
+
y(t);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
y(t.scheme, t.optionalSlashes);
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
onDestroy() {
|
|
121
|
+
U();
|
|
122
|
+
},
|
|
123
|
+
inclusive() {
|
|
124
|
+
return this.options.autolink;
|
|
125
|
+
},
|
|
126
|
+
addOptions() {
|
|
127
|
+
return {
|
|
128
|
+
openOnClick: !0,
|
|
129
|
+
linkOnPaste: !0,
|
|
130
|
+
autolink: !0,
|
|
131
|
+
protocols: [],
|
|
132
|
+
defaultProtocol: "http",
|
|
133
|
+
HTMLAttributes: {
|
|
134
|
+
target: "_blank",
|
|
135
|
+
rel: "noopener noreferrer nofollow",
|
|
136
|
+
class: null
|
|
137
|
+
},
|
|
138
|
+
isAllowedUri: (t, e) => !!p(t, e.protocols),
|
|
139
|
+
validate: (t) => !!t,
|
|
140
|
+
shouldAutoLink: (t) => !!t
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
addAttributes() {
|
|
144
|
+
return {
|
|
145
|
+
href: {
|
|
146
|
+
default: null,
|
|
147
|
+
parseHTML(t) {
|
|
148
|
+
return t.getAttribute("href");
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
target: {
|
|
152
|
+
default: this.options.HTMLAttributes.target
|
|
153
|
+
},
|
|
154
|
+
rel: {
|
|
155
|
+
default: this.options.HTMLAttributes.rel
|
|
156
|
+
},
|
|
157
|
+
class: {
|
|
158
|
+
default: this.options.HTMLAttributes.class
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
parseHTML() {
|
|
163
|
+
return [
|
|
164
|
+
{
|
|
165
|
+
tag: "a[href]",
|
|
166
|
+
getAttrs: (t) => {
|
|
167
|
+
const e = t.getAttribute("href");
|
|
168
|
+
return !e || !this.options.isAllowedUri(e, {
|
|
169
|
+
defaultValidate: (n) => !!p(n, this.options.protocols),
|
|
170
|
+
protocols: this.options.protocols,
|
|
171
|
+
defaultProtocol: this.options.defaultProtocol
|
|
172
|
+
}) ? !1 : null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
},
|
|
177
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
178
|
+
return this.options.isAllowedUri(t.href, {
|
|
179
|
+
defaultValidate: (e) => !!p(e, this.options.protocols),
|
|
180
|
+
protocols: this.options.protocols,
|
|
181
|
+
defaultProtocol: this.options.defaultProtocol
|
|
182
|
+
}) ? ["a", v(this.options.HTMLAttributes, t), 0] : [
|
|
183
|
+
"a",
|
|
184
|
+
v(this.options.HTMLAttributes, { ...t, href: "" }),
|
|
185
|
+
0
|
|
186
|
+
];
|
|
187
|
+
},
|
|
188
|
+
addCommands() {
|
|
189
|
+
return {
|
|
190
|
+
setLink: (t) => ({ chain: e }) => {
|
|
191
|
+
const { href: n } = t;
|
|
192
|
+
return this.options.isAllowedUri(n, {
|
|
193
|
+
defaultValidate: (o) => !!p(o, this.options.protocols),
|
|
194
|
+
protocols: this.options.protocols,
|
|
195
|
+
defaultProtocol: this.options.defaultProtocol
|
|
196
|
+
}) ? e().setMark(this.name, t).setMeta("preventAutolink", !0).run() : !1;
|
|
197
|
+
},
|
|
198
|
+
toggleLink: (t) => ({ chain: e }) => {
|
|
199
|
+
const { href: n } = t;
|
|
200
|
+
return this.options.isAllowedUri(n, {
|
|
201
|
+
defaultValidate: (o) => !!p(o, this.options.protocols),
|
|
202
|
+
protocols: this.options.protocols,
|
|
203
|
+
defaultProtocol: this.options.defaultProtocol
|
|
204
|
+
}) ? e().toggleMark(this.name, t, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run() : !1;
|
|
205
|
+
},
|
|
206
|
+
unsetLink: () => ({ chain: t }) => t().unsetMark(this.name, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run()
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
addPasteRules() {
|
|
210
|
+
return [
|
|
211
|
+
C({
|
|
212
|
+
find: (t) => {
|
|
213
|
+
const e = [];
|
|
214
|
+
if (t) {
|
|
215
|
+
const { protocols: n, defaultProtocol: o } = this.options, i = M(t).filter((l) => l.isLink && this.options.isAllowedUri(l.value, {
|
|
216
|
+
defaultValidate: (a) => !!p(a, n),
|
|
217
|
+
protocols: n,
|
|
218
|
+
defaultProtocol: o
|
|
219
|
+
}));
|
|
220
|
+
i.length && i.forEach((l) => e.push({
|
|
221
|
+
text: l.value,
|
|
222
|
+
data: {
|
|
223
|
+
href: l.href
|
|
224
|
+
},
|
|
225
|
+
index: l.start
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
return e;
|
|
229
|
+
},
|
|
230
|
+
type: this.type,
|
|
231
|
+
getAttributes: (t) => {
|
|
232
|
+
var e;
|
|
233
|
+
return {
|
|
234
|
+
href: (e = t.data) === null || e === void 0 ? void 0 : e.href
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
})
|
|
238
|
+
];
|
|
239
|
+
},
|
|
240
|
+
addProseMirrorPlugins() {
|
|
241
|
+
const t = [], { protocols: e, defaultProtocol: n } = this.options;
|
|
242
|
+
return this.options.autolink && t.push(R({
|
|
243
|
+
type: this.type,
|
|
244
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
245
|
+
validate: (o) => this.options.isAllowedUri(o, {
|
|
246
|
+
defaultValidate: (i) => !!p(i, e),
|
|
247
|
+
protocols: e,
|
|
248
|
+
defaultProtocol: n
|
|
249
|
+
}),
|
|
250
|
+
shouldAutoLink: this.options.shouldAutoLink
|
|
251
|
+
})), this.options.openOnClick === !0 && t.push(W({
|
|
252
|
+
type: this.type
|
|
253
|
+
})), this.options.linkOnPaste && t.push(z({
|
|
254
|
+
editor: this.editor,
|
|
255
|
+
defaultProtocol: this.options.defaultProtocol,
|
|
256
|
+
type: this.type
|
|
257
|
+
})), t;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
export {
|
|
261
|
+
D as L
|
|
262
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { N as e, m as i } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const s = e.create({
|
|
3
|
+
name: "listItem",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
HTMLAttributes: {},
|
|
7
|
+
bulletListTypeName: "bulletList",
|
|
8
|
+
orderedListTypeName: "orderedList"
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
content: "paragraph block*",
|
|
12
|
+
defining: !0,
|
|
13
|
+
parseHTML() {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
tag: "li"
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
},
|
|
20
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
21
|
+
return ["li", i(this.options.HTMLAttributes, t), 0];
|
|
22
|
+
},
|
|
23
|
+
addKeyboardShortcuts() {
|
|
24
|
+
return {
|
|
25
|
+
Enter: () => this.editor.commands.splitListItem(this.name),
|
|
26
|
+
Tab: () => this.editor.commands.sinkListItem(this.name),
|
|
27
|
+
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
s as L
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(r,n){"use strict";var e,s;return{setters:[t=>{e=t.N,s=t.m}],execute:function(){const t=r("L",e.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",s(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js","../prosemirror-state-DzPLD-6l.system.js","./suggestion-BpZSO8Lm.system.js"],function(h,m){"use strict";var u,d,c,p;return{setters:[s=>{u=s.N,d=s.m},s=>{c=s.a},s=>{p=s.S}],execute:function(){const s=new c("mention"),g=h("M",u.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:e,node:t}){var n;return`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t}){var n;return["span",d(this.HTMLAttributes,e.HTMLAttributes),`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`]},suggestion:{char:"@",pluginKey:s,command:({editor:e,range:t,props:n})=>{var r,i,o;const a=e.view.state.selection.$to.nodeAfter;((r=a==null?void 0:a.text)===null||r===void 0?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(o=(i=e.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||o===void 0||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",d({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})];const n={...this.options};n.HTMLAttributes=d({"data-type":this.name},this.options.HTMLAttributes,t);const r=this.options.renderHTML({options:n,node:e});return typeof r=="string"?["span",d({"data-type":this.name},this.options.HTMLAttributes,t),r]:r},renderText({node:e}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:e})):this.options.renderText({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return i?(t.doc.nodesBetween(o-1,o,(a,l)=>{if(a.type.name===this.name)return n=!0,e.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",l,l+a.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[p({editor:this.editor,...this.options.suggestion})]}}))}}});
|