@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,130 @@
|
|
|
1
|
+
import { N as l, m as a } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
import { a as u } from "../prosemirror-state-CwkYUmNs.es.js";
|
|
3
|
+
import { S as p } from "./suggestion-C4sBhJAD.es.js";
|
|
4
|
+
const c = new u("mention"), g = l.create({
|
|
5
|
+
name: "mention",
|
|
6
|
+
priority: 101,
|
|
7
|
+
addOptions() {
|
|
8
|
+
return {
|
|
9
|
+
HTMLAttributes: {},
|
|
10
|
+
renderText({ options: e, node: t }) {
|
|
11
|
+
var n;
|
|
12
|
+
return `${e.suggestion.char}${(n = t.attrs.label) !== null && n !== void 0 ? n : t.attrs.id}`;
|
|
13
|
+
},
|
|
14
|
+
deleteTriggerWithBackspace: !1,
|
|
15
|
+
renderHTML({ options: e, node: t }) {
|
|
16
|
+
var n;
|
|
17
|
+
return [
|
|
18
|
+
"span",
|
|
19
|
+
a(this.HTMLAttributes, e.HTMLAttributes),
|
|
20
|
+
`${e.suggestion.char}${(n = t.attrs.label) !== null && n !== void 0 ? n : t.attrs.id}`
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
suggestion: {
|
|
24
|
+
char: "@",
|
|
25
|
+
pluginKey: c,
|
|
26
|
+
command: ({ editor: e, range: t, props: n }) => {
|
|
27
|
+
var r, i, s;
|
|
28
|
+
const o = e.view.state.selection.$to.nodeAfter;
|
|
29
|
+
((r = o == null ? void 0 : o.text) === null || r === void 0 ? void 0 : r.startsWith(" ")) && (t.to += 1), e.chain().focus().insertContentAt(t, [
|
|
30
|
+
{
|
|
31
|
+
type: this.name,
|
|
32
|
+
attrs: n
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "text",
|
|
36
|
+
text: " "
|
|
37
|
+
}
|
|
38
|
+
]).run(), (s = (i = e.view.dom.ownerDocument.defaultView) === null || i === void 0 ? void 0 : i.getSelection()) === null || s === void 0 || s.collapseToEnd();
|
|
39
|
+
},
|
|
40
|
+
allow: ({ state: e, range: t }) => {
|
|
41
|
+
const n = e.doc.resolve(t.from), r = e.schema.nodes[this.name];
|
|
42
|
+
return !!n.parent.type.contentMatch.matchType(r);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
group: "inline",
|
|
48
|
+
inline: !0,
|
|
49
|
+
selectable: !1,
|
|
50
|
+
atom: !0,
|
|
51
|
+
addAttributes() {
|
|
52
|
+
return {
|
|
53
|
+
id: {
|
|
54
|
+
default: null,
|
|
55
|
+
parseHTML: (e) => e.getAttribute("data-id"),
|
|
56
|
+
renderHTML: (e) => e.id ? {
|
|
57
|
+
"data-id": e.id
|
|
58
|
+
} : {}
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
default: null,
|
|
62
|
+
parseHTML: (e) => e.getAttribute("data-label"),
|
|
63
|
+
renderHTML: (e) => e.label ? {
|
|
64
|
+
"data-label": e.label
|
|
65
|
+
} : {}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
parseHTML() {
|
|
70
|
+
return [
|
|
71
|
+
{
|
|
72
|
+
tag: `span[data-type="${this.name}"]`
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
},
|
|
76
|
+
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
77
|
+
if (this.options.renderLabel !== void 0)
|
|
78
|
+
return console.warn("renderLabel is deprecated use renderText and renderHTML instead"), [
|
|
79
|
+
"span",
|
|
80
|
+
a({ "data-type": this.name }, this.options.HTMLAttributes, t),
|
|
81
|
+
this.options.renderLabel({
|
|
82
|
+
options: this.options,
|
|
83
|
+
node: e
|
|
84
|
+
})
|
|
85
|
+
];
|
|
86
|
+
const n = { ...this.options };
|
|
87
|
+
n.HTMLAttributes = a({ "data-type": this.name }, this.options.HTMLAttributes, t);
|
|
88
|
+
const r = this.options.renderHTML({
|
|
89
|
+
options: n,
|
|
90
|
+
node: e
|
|
91
|
+
});
|
|
92
|
+
return typeof r == "string" ? [
|
|
93
|
+
"span",
|
|
94
|
+
a({ "data-type": this.name }, this.options.HTMLAttributes, t),
|
|
95
|
+
r
|
|
96
|
+
] : r;
|
|
97
|
+
},
|
|
98
|
+
renderText({ node: e }) {
|
|
99
|
+
return this.options.renderLabel !== void 0 ? (console.warn("renderLabel is deprecated use renderText and renderHTML instead"), this.options.renderLabel({
|
|
100
|
+
options: this.options,
|
|
101
|
+
node: e
|
|
102
|
+
})) : this.options.renderText({
|
|
103
|
+
options: this.options,
|
|
104
|
+
node: e
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
addKeyboardShortcuts() {
|
|
108
|
+
return {
|
|
109
|
+
Backspace: () => this.editor.commands.command(({ tr: e, state: t }) => {
|
|
110
|
+
let n = !1;
|
|
111
|
+
const { selection: r } = t, { empty: i, anchor: s } = r;
|
|
112
|
+
return i ? (t.doc.nodesBetween(s - 1, s, (o, d) => {
|
|
113
|
+
if (o.type.name === this.name)
|
|
114
|
+
return n = !0, e.insertText(this.options.deleteTriggerWithBackspace ? "" : this.options.suggestion.char || "", d, d + o.nodeSize), !1;
|
|
115
|
+
}), n) : !1;
|
|
116
|
+
})
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
addProseMirrorPlugins() {
|
|
120
|
+
return [
|
|
121
|
+
p({
|
|
122
|
+
editor: this.editor,
|
|
123
|
+
...this.options.suggestion
|
|
124
|
+
})
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
g as M
|
|
130
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { N as n, w as r, m as i } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const p = "listItem", o = "textStyle", a = /^(\d+)\.\s$/, d = n.create({
|
|
3
|
+
name: "orderedList",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
itemTypeName: "listItem",
|
|
7
|
+
HTMLAttributes: {},
|
|
8
|
+
keepMarks: !1,
|
|
9
|
+
keepAttributes: !1
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
group: "block list",
|
|
13
|
+
content() {
|
|
14
|
+
return `${this.options.itemTypeName}+`;
|
|
15
|
+
},
|
|
16
|
+
addAttributes() {
|
|
17
|
+
return {
|
|
18
|
+
start: {
|
|
19
|
+
default: 1,
|
|
20
|
+
parseHTML: (t) => t.hasAttribute("start") ? parseInt(t.getAttribute("start") || "", 10) : 1
|
|
21
|
+
},
|
|
22
|
+
type: {
|
|
23
|
+
default: null,
|
|
24
|
+
parseHTML: (t) => t.getAttribute("type")
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
parseHTML() {
|
|
29
|
+
return [
|
|
30
|
+
{
|
|
31
|
+
tag: "ol"
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
},
|
|
35
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
36
|
+
const { start: e, ...s } = t;
|
|
37
|
+
return e === 1 ? ["ol", i(this.options.HTMLAttributes, s), 0] : ["ol", i(this.options.HTMLAttributes, t), 0];
|
|
38
|
+
},
|
|
39
|
+
addCommands() {
|
|
40
|
+
return {
|
|
41
|
+
toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(p, this.editor.getAttributes(o)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
addKeyboardShortcuts() {
|
|
45
|
+
return {
|
|
46
|
+
"Mod-Shift-7": () => this.editor.commands.toggleOrderedList()
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
addInputRules() {
|
|
50
|
+
let t = r({
|
|
51
|
+
find: a,
|
|
52
|
+
type: this.type,
|
|
53
|
+
getAttributes: (e) => ({ start: +e[1] }),
|
|
54
|
+
joinPredicate: (e, s) => s.childCount + s.attrs.start === +e[1]
|
|
55
|
+
});
|
|
56
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = r({
|
|
57
|
+
find: a,
|
|
58
|
+
type: this.type,
|
|
59
|
+
keepMarks: this.options.keepMarks,
|
|
60
|
+
keepAttributes: this.options.keepAttributes,
|
|
61
|
+
getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(o) }),
|
|
62
|
+
joinPredicate: (e, s) => s.childCount + s.attrs.start === +e[1],
|
|
63
|
+
editor: this.editor
|
|
64
|
+
})), [
|
|
65
|
+
t
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
export {
|
|
70
|
+
d as O
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(p,d){"use strict";var n,i,o;return{setters:[r=>{n=r.N,i=r.w,o=r.m}],execute:function(){const r="listItem",a="textStyle",u=/^(\d+)\.\s$/,h=p("O",n.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...s}=t;return e===1?["ol",o(this.options.HTMLAttributes,s),0]:["ol",o(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(r,this.editor.getAttributes(a)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=i({find:u,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,s)=>s.childCount+s.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=i({find:u,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(a)}),joinPredicate:(e,s)=>s.childCount+s.attrs.start===+e[1],editor:this.editor})),[t]}}))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js","../prosemirror-state-DzPLD-6l.system.js","../prosemirror-view-JTdpiWMD.system.js"],function(y,w){"use strict";var i,o,r,n,a,c;return{setters:[e=>{i=e.E,o=e.l},e=>{r=e.P,n=e.a},e=>{a=e.D,c=e.a}],execute:function(){const e=y("P",i.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new r({key:new n("placeholder"),props:{decorations:({doc:l,selection:m})=>{const E=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:h}=m,d=[];if(!E)return null;const f=this.editor.isEmpty;return l.descendants((t,s)=>{const p=h>=s&&h<=s+t.nodeSize,C=!t.isLeaf&&o(t);if((p||!this.options.showOnlyCurrent)&&C){const u=[this.options.emptyNodeClass];f&&u.push(this.options.emptyEditorClass);const P=a.node(s,s+t.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:t,pos:s,hasAnchor:p}):this.options.placeholder});d.push(P)}return this.options.includeChildren}),c.create(l,d)}}})]}}))}}});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { E as p, l as m } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
import { P as u, a as y } from "../prosemirror-state-CwkYUmNs.es.js";
|
|
3
|
+
import { D as E, a as f } from "../prosemirror-view-ta7l3rKk.es.js";
|
|
4
|
+
const O = p.create({
|
|
5
|
+
name: "placeholder",
|
|
6
|
+
addOptions() {
|
|
7
|
+
return {
|
|
8
|
+
emptyEditorClass: "is-editor-empty",
|
|
9
|
+
emptyNodeClass: "is-empty",
|
|
10
|
+
placeholder: "Write something …",
|
|
11
|
+
showOnlyWhenEditable: !0,
|
|
12
|
+
showOnlyCurrent: !0,
|
|
13
|
+
includeChildren: !1
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
addProseMirrorPlugins() {
|
|
17
|
+
return [
|
|
18
|
+
new u({
|
|
19
|
+
key: new y("placeholder"),
|
|
20
|
+
props: {
|
|
21
|
+
decorations: ({ doc: o, selection: a }) => {
|
|
22
|
+
const l = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: s } = a, i = [];
|
|
23
|
+
if (!l)
|
|
24
|
+
return null;
|
|
25
|
+
const c = this.editor.isEmpty;
|
|
26
|
+
return o.descendants((t, e) => {
|
|
27
|
+
const n = s >= e && s <= e + t.nodeSize, d = !t.isLeaf && m(t);
|
|
28
|
+
if ((n || !this.options.showOnlyCurrent) && d) {
|
|
29
|
+
const r = [this.options.emptyNodeClass];
|
|
30
|
+
c && r.push(this.options.emptyEditorClass);
|
|
31
|
+
const h = E.node(e, e + t.nodeSize, {
|
|
32
|
+
class: r.join(" "),
|
|
33
|
+
"data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
|
|
34
|
+
editor: this.editor,
|
|
35
|
+
node: t,
|
|
36
|
+
pos: e,
|
|
37
|
+
hasAnchor: n
|
|
38
|
+
}) : this.options.placeholder
|
|
39
|
+
});
|
|
40
|
+
i.push(h);
|
|
41
|
+
}
|
|
42
|
+
return this.options.includeChildren;
|
|
43
|
+
}), f.create(o, i);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
O as P
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./core-bnIgGWIt.system.js"],function(s,i){"use strict";var r,n;return{setters:[t=>{r=t.M,n=t.m}],execute:function(){const t=s("U",r.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}))}}});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { M as t, m as r } from "./core-BLz8iRA3.es.js";
|
|
2
|
+
const s = t.create({
|
|
3
|
+
name: "underline",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
HTMLAttributes: {}
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
parseHTML() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
tag: "u"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
style: "text-decoration",
|
|
16
|
+
consuming: !1,
|
|
17
|
+
getAttrs: (e) => e.includes("underline") ? {} : !1
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
},
|
|
21
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
22
|
+
return ["u", r(this.options.HTMLAttributes, e), 0];
|
|
23
|
+
},
|
|
24
|
+
addCommands() {
|
|
25
|
+
return {
|
|
26
|
+
setUnderline: () => ({ commands: e }) => e.setMark(this.name),
|
|
27
|
+
toggleUnderline: () => ({ commands: e }) => e.toggleMark(this.name),
|
|
28
|
+
unsetUnderline: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
addKeyboardShortcuts() {
|
|
32
|
+
return {
|
|
33
|
+
"Mod-u": () => this.editor.commands.toggleUnderline(),
|
|
34
|
+
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
s as U
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["../prosemirror-state-DzPLD-6l.system.js","../prosemirror-view-JTdpiWMD.system.js","./core-bnIgGWIt.system.js"],function(G,V){"use strict";var N,O,b,F,T;return{setters:[d=>{N=d.a,O=d.P},d=>{b=d.a,F=d.D},d=>{T=d.o}],execute:function(){G("S",J);function d(D){var s;const{char:_,allowSpaces:B,allowToIncludeChar:E,allowedPrefixes:v,startOfLine:C,$position:u}=D,I=B&&!E,g=T(_),M=new RegExp(`\\s${g}$`),p=C?"^":"",P=E?"":g,j=I?new RegExp(`${p}${g}.*?(?=\\s${P}|$)`,"gm"):new RegExp(`${p}(?:^)?${g}[^\\s${P}]*`,"gm"),r=((s=u.nodeBefore)===null||s===void 0?void 0:s.isText)&&u.nodeBefore.text;if(!r)return null;const e=u.pos-r.length,o=Array.from(r.matchAll(j)).pop();if(!o||o.input===void 0||o.index===void 0)return null;const n=o.input.slice(Math.max(0,o.index-1),o.index),i=new RegExp(`^[${v==null?void 0:v.join("")}\0]?$`).test(n);if(v!==null&&!i)return null;const a=e+o.index;let l=a+o[0].length;return I&&M.test(r.slice(l-1,l+1))&&(o[0]+=" ",l+=1),a<u.pos&&l>=u.pos?{range:{from:a,to:l},query:o[0].slice(_.length),text:o[0]}:null}const H=new N("suggestion");function J({pluginKey:D=H,editor:s,char:_="@",allowSpaces:B=!1,allowToIncludeChar:E=!1,allowedPrefixes:v=[" "],startOfLine:C=!1,decorationTag:u="span",decorationClass:I="suggestion",command:g=()=>null,items:M=()=>[],render:p=()=>({}),allow:P=()=>!0,findSuggestionMatch:j=d}){let r;const e=p==null?void 0:p(),o=new O({key:D,view(){return{update:async(n,i)=>{var a,l,f,m,x,S,y;const t=(a=this.key)===null||a===void 0?void 0:a.getState(i),c=(l=this.key)===null||l===void 0?void 0:l.getState(n.state),$=t.active&&c.active&&t.range.from!==c.range.from,U=!t.active&&c.active,L=t.active&&!c.active,k=!U&&!L&&t.query!==c.query,w=U||$&&k,R=k||$,A=L||$&&k;if(!w&&!R&&!A)return;const h=A&&!w?t:c,z=n.dom.querySelector(`[data-decoration-id="${h.decorationId}"]`);r={editor:s,range:h.range,query:h.query,text:h.text,items:[],command:q=>g({editor:s,range:h.range,props:q}),decorationNode:z,clientRect:z?()=>{var q;const{decorationId:Q}=(q=this.key)===null||q===void 0?void 0:q.getState(s.state),K=n.dom.querySelector(`[data-decoration-id="${Q}"]`);return(K==null?void 0:K.getBoundingClientRect())||null}:null},w&&((f=e==null?void 0:e.onBeforeStart)===null||f===void 0||f.call(e,r)),R&&((m=e==null?void 0:e.onBeforeUpdate)===null||m===void 0||m.call(e,r)),(R||w)&&(r.items=await M({editor:s,query:h.query})),A&&((x=e==null?void 0:e.onExit)===null||x===void 0||x.call(e,r)),R&&((S=e==null?void 0:e.onUpdate)===null||S===void 0||S.call(e,r)),w&&((y=e==null?void 0:e.onStart)===null||y===void 0||y.call(e,r))},destroy:()=>{var n;r&&((n=e==null?void 0:e.onExit)===null||n===void 0||n.call(e,r))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(n,i,a,l){const{isEditable:f}=s,{composing:m}=s.view,{selection:x}=n,{empty:S,from:y}=x,t={...i};if(t.composing=m,f&&(S||s.view.composing)){(y<i.range.from||y>i.range.to)&&!m&&!i.composing&&(t.active=!1);const c=j({char:_,allowSpaces:B,allowToIncludeChar:E,allowedPrefixes:v,startOfLine:C,$position:x.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;c&&P({editor:s,state:l,range:c.range,isActive:i.active})?(t.active=!0,t.decorationId=i.decorationId?i.decorationId:$,t.range=c.range,t.query=c.query,t.text=c.text):t.active=!1}else t.active=!1;return t.active||(t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null),t}},props:{handleKeyDown(n,i){var a;const{active:l,range:f}=o.getState(n.state);return l&&((a=e==null?void 0:e.onKeyDown)===null||a===void 0?void 0:a.call(e,{view:n,event:i,range:f}))||!1},decorations(n){const{active:i,range:a,decorationId:l}=o.getState(n);return i?b.create(n.doc,[F.inline(a.from,a.to,{nodeName:u,class:I,"data-decoration-id":l})]):null}}});return o}}}});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { a as T, P as U } from "../prosemirror-state-CwkYUmNs.es.js";
|
|
2
|
+
import { a as j, D as L } from "../prosemirror-view-ta7l3rKk.es.js";
|
|
3
|
+
import { o as z } from "./core-BLz8iRA3.es.js";
|
|
4
|
+
function G(R) {
|
|
5
|
+
var s;
|
|
6
|
+
const { char: q, allowSpaces: D, allowToIncludeChar: _, allowedPrefixes: f, startOfLine: B, $position: d } = R, E = D && !_, g = z(q), C = new RegExp(`\\s${g}$`), v = B ? "^" : "", I = _ ? "" : g, M = E ? new RegExp(`${v}${g}.*?(?=\\s${I}|$)`, "gm") : new RegExp(`${v}(?:^)?${g}[^\\s${I}]*`, "gm"), r = ((s = d.nodeBefore) === null || s === void 0 ? void 0 : s.isText) && d.nodeBefore.text;
|
|
7
|
+
if (!r)
|
|
8
|
+
return null;
|
|
9
|
+
const e = d.pos - r.length, o = Array.from(r.matchAll(M)).pop();
|
|
10
|
+
if (!o || o.input === void 0 || o.index === void 0)
|
|
11
|
+
return null;
|
|
12
|
+
const n = o.input.slice(Math.max(0, o.index - 1), o.index), i = new RegExp(`^[${f == null ? void 0 : f.join("")}\0]?$`).test(n);
|
|
13
|
+
if (f !== null && !i)
|
|
14
|
+
return null;
|
|
15
|
+
const a = e + o.index;
|
|
16
|
+
let l = a + o[0].length;
|
|
17
|
+
return E && C.test(r.slice(l - 1, l + 1)) && (o[0] += " ", l += 1), a < d.pos && l >= d.pos ? {
|
|
18
|
+
range: {
|
|
19
|
+
from: a,
|
|
20
|
+
to: l
|
|
21
|
+
},
|
|
22
|
+
query: o[0].slice(q.length),
|
|
23
|
+
text: o[0]
|
|
24
|
+
} : null;
|
|
25
|
+
}
|
|
26
|
+
const H = new T("suggestion");
|
|
27
|
+
function W({ pluginKey: R = H, editor: s, char: q = "@", allowSpaces: D = !1, allowToIncludeChar: _ = !1, allowedPrefixes: f = [" "], startOfLine: B = !1, decorationTag: d = "span", decorationClass: E = "suggestion", command: g = () => null, items: C = () => [], render: v = () => ({}), allow: I = () => !0, findSuggestionMatch: M = G }) {
|
|
28
|
+
let r;
|
|
29
|
+
const e = v == null ? void 0 : v(), o = new U({
|
|
30
|
+
key: R,
|
|
31
|
+
view() {
|
|
32
|
+
return {
|
|
33
|
+
update: async (n, i) => {
|
|
34
|
+
var a, l, u, p, m, y, x;
|
|
35
|
+
const t = (a = this.key) === null || a === void 0 ? void 0 : a.getState(i), c = (l = this.key) === null || l === void 0 ? void 0 : l.getState(n.state), S = t.active && c.active && t.range.from !== c.range.from, N = !t.active && c.active, b = t.active && !c.active, k = !N && !b && t.query !== c.query, $ = N || S && k, P = k || S, A = b || S && k;
|
|
36
|
+
if (!$ && !P && !A)
|
|
37
|
+
return;
|
|
38
|
+
const h = A && !$ ? t : c, F = n.dom.querySelector(`[data-decoration-id="${h.decorationId}"]`);
|
|
39
|
+
r = {
|
|
40
|
+
editor: s,
|
|
41
|
+
range: h.range,
|
|
42
|
+
query: h.query,
|
|
43
|
+
text: h.text,
|
|
44
|
+
items: [],
|
|
45
|
+
command: (w) => g({
|
|
46
|
+
editor: s,
|
|
47
|
+
range: h.range,
|
|
48
|
+
props: w
|
|
49
|
+
}),
|
|
50
|
+
decorationNode: F,
|
|
51
|
+
// virtual node for popper.js or tippy.js
|
|
52
|
+
// this can be used for building popups without a DOM node
|
|
53
|
+
clientRect: F ? () => {
|
|
54
|
+
var w;
|
|
55
|
+
const { decorationId: O } = (w = this.key) === null || w === void 0 ? void 0 : w.getState(s.state), K = n.dom.querySelector(`[data-decoration-id="${O}"]`);
|
|
56
|
+
return (K == null ? void 0 : K.getBoundingClientRect()) || null;
|
|
57
|
+
} : null
|
|
58
|
+
}, $ && ((u = e == null ? void 0 : e.onBeforeStart) === null || u === void 0 || u.call(e, r)), P && ((p = e == null ? void 0 : e.onBeforeUpdate) === null || p === void 0 || p.call(e, r)), (P || $) && (r.items = await C({
|
|
59
|
+
editor: s,
|
|
60
|
+
query: h.query
|
|
61
|
+
})), A && ((m = e == null ? void 0 : e.onExit) === null || m === void 0 || m.call(e, r)), P && ((y = e == null ? void 0 : e.onUpdate) === null || y === void 0 || y.call(e, r)), $ && ((x = e == null ? void 0 : e.onStart) === null || x === void 0 || x.call(e, r));
|
|
62
|
+
},
|
|
63
|
+
destroy: () => {
|
|
64
|
+
var n;
|
|
65
|
+
r && ((n = e == null ? void 0 : e.onExit) === null || n === void 0 || n.call(e, r));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
state: {
|
|
70
|
+
// Initialize the plugin's internal state.
|
|
71
|
+
init() {
|
|
72
|
+
return {
|
|
73
|
+
active: !1,
|
|
74
|
+
range: {
|
|
75
|
+
from: 0,
|
|
76
|
+
to: 0
|
|
77
|
+
},
|
|
78
|
+
query: null,
|
|
79
|
+
text: null,
|
|
80
|
+
composing: !1
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
// Apply changes to the plugin state from a view transaction.
|
|
84
|
+
apply(n, i, a, l) {
|
|
85
|
+
const { isEditable: u } = s, { composing: p } = s.view, { selection: m } = n, { empty: y, from: x } = m, t = { ...i };
|
|
86
|
+
if (t.composing = p, u && (y || s.view.composing)) {
|
|
87
|
+
(x < i.range.from || x > i.range.to) && !p && !i.composing && (t.active = !1);
|
|
88
|
+
const c = M({
|
|
89
|
+
char: q,
|
|
90
|
+
allowSpaces: D,
|
|
91
|
+
allowToIncludeChar: _,
|
|
92
|
+
allowedPrefixes: f,
|
|
93
|
+
startOfLine: B,
|
|
94
|
+
$position: m.$from
|
|
95
|
+
}), S = `id_${Math.floor(Math.random() * 4294967295)}`;
|
|
96
|
+
c && I({
|
|
97
|
+
editor: s,
|
|
98
|
+
state: l,
|
|
99
|
+
range: c.range,
|
|
100
|
+
isActive: i.active
|
|
101
|
+
}) ? (t.active = !0, t.decorationId = i.decorationId ? i.decorationId : S, t.range = c.range, t.query = c.query, t.text = c.text) : t.active = !1;
|
|
102
|
+
} else
|
|
103
|
+
t.active = !1;
|
|
104
|
+
return t.active || (t.decorationId = null, t.range = { from: 0, to: 0 }, t.query = null, t.text = null), t;
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
props: {
|
|
108
|
+
// Call the keydown hook if suggestion is active.
|
|
109
|
+
handleKeyDown(n, i) {
|
|
110
|
+
var a;
|
|
111
|
+
const { active: l, range: u } = o.getState(n.state);
|
|
112
|
+
return l && ((a = e == null ? void 0 : e.onKeyDown) === null || a === void 0 ? void 0 : a.call(e, { view: n, event: i, range: u })) || !1;
|
|
113
|
+
},
|
|
114
|
+
// Setup decorator on the currently active suggestion.
|
|
115
|
+
decorations(n) {
|
|
116
|
+
const { active: i, range: a, decorationId: l } = o.getState(n);
|
|
117
|
+
return i ? j.create(n.doc, [
|
|
118
|
+
L.inline(a.from, a.to, {
|
|
119
|
+
nodeName: d,
|
|
120
|
+
class: E,
|
|
121
|
+
"data-decoration-id": l
|
|
122
|
+
})
|
|
123
|
+
]) : null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return o;
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
W as S
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./extension-bubble-menu-D421L1EU.system.js","vue","./core-bnIgGWIt.system.js","./extension-floating-menu-8rFSweor.system.js"],function(a,V){"use strict";var y,c,u,v,f,b,l,m,C,h,p,w,S,_,x,N,O,P,j;return{setters:[o=>{y=o.B},o=>{c=o.ref,u=o.defineComponent,v=o.provide,f=o.markRaw,b=o.reactive,l=o.h,m=o.render,C=o.shallowRef,h=o.onMounted,p=o.onBeforeUnmount,w=o.getCurrentInstance,S=o.watchEffect,_=o.nextTick,x=o.unref,N=o.customRef},o=>{O=o.q,P=o.r},o=>{j=o.a}],execute:function(){a("V",M),u({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:t}){const n=c(null);return h(()=>{const{updateDelay:e,editor:i,pluginKey:s,shouldShow:d,tippyOptions:g}=r;i.registerPlugin(y({updateDelay:e,editor:i,element:n.value,pluginKey:s,shouldShow:d,tippyOptions:g}))}),p(()=>{const{pluginKey:e,editor:i}=r;i.unregisterPlugin(e)}),()=>{var e;return l("div",{ref:n},(e=t.default)===null||e===void 0?void 0:e.call(t))}}});function o(r){return N((t,n)=>({get(){return t(),r},set(e){r=e,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class D extends P{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=o(this.view.state),this.reactiveExtensionStorage=o(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),f(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,n){const e=super.registerPlugin(t,n);return this.reactiveState&&(this.reactiveState.value=e),e}unregisterPlugin(t){const n=super.unregisterPlugin(t);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const F=a("E",u({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(r){const t=c(),n=w();return S(()=>{const e=r.editor;e&&e.options.element&&t.value&&_(()=>{if(!t.value||!e.options.element.firstChild)return;const i=x(t.value);t.value.append(...e.options.element.childNodes),e.contentComponent=n.ctx._,n&&(e.appContext={...n.appContext,provides:n.provides}),e.setOptions({element:i}),e.createNodeViews()})}),p(()=>{const e=r.editor;e&&(e.contentComponent=null,e.appContext=null)}),{rootEl:t}},render(){return l("div",{ref:r=>{this.rootEl=r}})}})),A=a("F",u({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:t}){const n=c(null);return h(()=>{const{pluginKey:e,editor:i,tippyOptions:s,shouldShow:d}=r;i.registerPlugin(j({pluginKey:e,editor:i,element:n.value,tippyOptions:s,shouldShow:d}))}),p(()=>{const{pluginKey:e,editor:i}=r;i.unregisterPlugin(e)}),()=>{var e;return l("div",{ref:n},(e=t.default)===null||e===void 0?void 0:e.call(t))}}}));u({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return l(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});const R=a("N",u({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,t;return l(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(r=this.$slots).default)===null||t===void 0?void 0:t.call(r))}})),U=a("u",(r={})=>{const t=C();return h(()=>{t.value=new D(r)}),p(()=>{var n,e,i;const s=(n=t.value)===null||n===void 0?void 0:n.options.element,d=s==null?void 0:s.cloneNode(!0);(e=s==null?void 0:s.parentNode)===null||e===void 0||e.replaceChild(d,s),(i=t.value)===null||i===void 0||i.destroy()}),t});class E{constructor(t,{props:n={},editor:e}){this.editor=e,this.component=f(t),this.el=document.createElement("div"),this.props=b(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var t,n,e,i;return!((n=(t=this.renderedComponent.vNode)===null||t===void 0?void 0:t.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(i=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let t=l(this.component,this.props);return this.editor.appContext&&(t.appContext=this.editor.appContext),typeof document<"u"&&this.el&&m(t,this.el),{vNode:t,destroy:()=>{this.el&&m(null,this.el),this.el=null,t=null},el:this.el?this.el.firstElementChild:null}}updateProps(t={}){Object.entries(t).forEach(([n,e])=>{this.props[n]=e}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}a("a",E);const B=a("n",{editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}});class q extends O{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=c(this.getDecorationClasses());const e=u({extends:{...this.component},props:Object.keys(t),template:this.component.template,setup:i=>{var s,d;return v("onDragStart",n),v("decorationClasses",this.decorationClasses),(d=(s=this.component).setup)===null||d===void 0?void 0:d.call(s,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new E(e,{editor:this.editor,props:t})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection,e=this.getPos();if(typeof e=="number")if(t<=e&&n>=e+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n,e){const i=s=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(s)};if(typeof this.options.update=="function"){const s=this.node,d=this.decorations,g=this.innerDecorations;return this.node=t,this.decorations=n,this.innerDecorations=e,this.options.update({oldNode:s,oldDecorations:d,newNode:t,newDecorations:n,oldInnerDecorations:g,innerDecorations:e,updateProps:()=>i({node:t,decorations:n,innerDecorations:e})})}return t.type!==this.node.type?!1:(t===this.node&&this.decorations===n&&this.innerDecorations===e||(this.node=t,this.decorations=n,this.innerDecorations=e,i({node:t,decorations:n,innerDecorations:e})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(t=>t.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function M(r,t){return n=>{if(!n.editor.contentComponent)return{};const e=typeof r=="function"&&"__vccOpts"in r?r.__vccOpts:r;return new q(e,n,t)}}}}});
|