@vc-shell/framework 1.1.46 → 1.1.47
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/CHANGELOG.md +4 -0
- package/core/plugins/modularity/loader.ts +126 -97
- package/dist/assets/042c75b764bc78a7.svg +1 -0
- package/dist/assets/0ba156439a339f2a.svg +1 -0
- package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
- package/dist/assets/0f590f8a94577092.svg +1 -0
- package/dist/assets/0fc5820f8be53a1b.svg +1 -0
- package/dist/assets/10768e2cc79fc60b.svg +1 -0
- package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
- package/dist/assets/157b8721e0600ea8.svg +1 -0
- package/dist/assets/15e91cdd649cde9a.svg +1 -0
- package/dist/assets/1a3e84b2457f709a.woff +0 -0
- package/dist/assets/1de63eb118636cce.svg +1 -0
- package/dist/assets/1ea01de36eb5491b.svg +1 -0
- package/dist/assets/204eaf512fde2023.svg +1 -0
- package/dist/assets/2088983edf42e153.svg +1 -0
- package/dist/assets/208f810a9321a327.svg +1 -0
- package/dist/assets/21220a9d10e6c558.svg +1 -0
- package/dist/assets/220db345a102045d.woff2 +0 -0
- package/dist/assets/225da11d23968333.svg +1 -0
- package/dist/assets/226f862dd81bdc13.woff2 +0 -0
- package/dist/assets/23a2d53395ddb14f.woff +0 -0
- package/dist/assets/259e6ad461a52ad7.svg +1 -0
- package/dist/assets/261e6dec4d53b9ac.woff +0 -0
- package/dist/assets/262f46a0b6d94bb6.svg +1 -0
- package/dist/assets/2857c513073467da.svg +1 -0
- package/dist/assets/2b3be7889467d98f.woff +0 -0
- package/dist/assets/2d4e6190eec72737.svg +1 -0
- package/dist/assets/2eba973185078bc8.woff +0 -0
- package/dist/assets/327511cd4a7ba7f9.woff +0 -0
- package/dist/assets/334d3f6bc766c516.woff +0 -0
- package/dist/assets/34ff7dd0c2285956.svg +1 -0
- package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
- package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
- package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
- package/dist/assets/41275bcb979cb650.svg +1 -0
- package/dist/assets/42df4e2d6fa3fd2a.woff2 +0 -0
- package/dist/assets/434f7982590e462f.woff +0 -0
- package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
- package/dist/assets/4d7a77b0e5373992.svg +1 -0
- package/dist/assets/4e43c74354534fb3.svg +1 -0
- package/dist/assets/4fe75f5117100705.svg +1 -0
- package/dist/assets/52610491f372cb0c.woff2 +0 -0
- package/dist/assets/52e261a005074e1b.woff +0 -0
- package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
- package/dist/assets/572bb1bb4156a9c1.svg +1 -0
- package/dist/assets/5b3661be8be679d0.woff2 +0 -0
- package/dist/assets/5d96cfcc5bedd917.woff2 +0 -0
- package/dist/assets/6075995d7e74da46.woff2 +0 -0
- package/dist/assets/617c4736236e199e.woff +0 -0
- package/dist/assets/6619e9e10beea0e7.woff2 +0 -0
- package/dist/assets/67230f05dc94a265.svg +1 -0
- package/dist/assets/6798e4dd4add9b48.svg +1 -0
- package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
- package/dist/assets/6a3e73faf406cf33.svg +1 -0
- package/dist/assets/72de3a63bc0b70dd.svg +1 -0
- package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
- package/dist/assets/74ed5f8a78e71106.svg +1 -0
- package/dist/assets/7ce0c166fd6a1204.woff +0 -0
- package/dist/assets/7d55399c2a7bc985.svg +1 -0
- package/dist/assets/7d970675c69fca1d.woff +0 -0
- package/dist/assets/7eda727273fd98d3.svg +1 -0
- package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
- package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
- package/dist/assets/861e6b7192b3b6c7.woff +0 -0
- package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
- package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
- package/dist/assets/910b0d99b9e26568.svg +1 -0
- package/dist/assets/91eee1aa81f72683.woff +0 -0
- package/dist/assets/92508f8707159b51.svg +1 -0
- package/dist/assets/9392bf1d591e1abb.svg +1 -0
- package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
- package/dist/assets/9cb83236f6bb7ab1.svg +1 -0
- package/dist/assets/9d37314695c0b68d.woff +0 -0
- package/dist/assets/a18404194e3f9047.svg +1 -0
- package/dist/assets/a2017fe7f0a26510.svg +1 -0
- package/dist/assets/a47034e65dbcc3d7.woff +0 -0
- package/dist/assets/a617e11804bbacb7.woff +0 -0
- package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
- package/dist/assets/abf88f301a0730f4.svg +1 -0
- package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
- package/dist/assets/b1a596e31ad1185a.svg +1 -0
- package/dist/assets/b27767411c8427be.woff +0 -0
- package/dist/assets/b291dc35a17511f7.woff +0 -0
- package/dist/assets/b325adcae33bbe7a.svg +1 -0
- package/dist/assets/b372390551ca2fa1.svg +1 -0
- package/dist/assets/b5bb1e8fc975decd.svg +1 -0
- package/dist/assets/b645a4a2181b9dc1.svg +1 -0
- package/dist/assets/b6499ddce0a4ef7d.svg +1 -0
- package/dist/assets/b94421fadd23b0f2.svg +1 -0
- package/dist/assets/bb28fb0f27f1c11b.svg +1 -0
- package/dist/assets/bfbe205759295eca.woff2 +0 -0
- package/dist/assets/ca791c5ca5848a03.svg +1 -0
- package/dist/assets/cb32840ce330103f.woff +0 -0
- package/dist/assets/d084bda16abe8a56.svg +1 -0
- package/dist/assets/d32b129cae2fffd6.svg +1 -0
- package/dist/assets/d35a4c7113315758.woff2 +0 -0
- package/dist/assets/d3f792f54ae4c307.svg +1 -0
- package/dist/assets/d5a5b8630120073d.svg +1 -0
- package/dist/assets/d5f9664ebbfb104b.svg +1 -0
- package/dist/assets/d80b05788e407de7.woff2 +0 -0
- package/dist/assets/d84247b59449dd88.woff2 +0 -0
- package/dist/assets/dd05d43ff0df2fc7.svg +1 -0
- package/dist/assets/e38acaa1757232e0.svg +1 -0
- package/dist/assets/e4a8550f1c7ffe36.svg +1 -0
- package/dist/assets/e5adb5ae3a3698f6.svg +1 -0
- package/dist/assets/e61a1889bac955f4.woff2 +0 -0
- package/dist/assets/e72bb11356af94c7.svg +1 -0
- package/dist/assets/e98196a9f8dcb2f0.svg +1 -0
- package/dist/assets/ebec912a42ad49ff.woff +0 -0
- package/dist/assets/f09d89268e4c0317.svg +1 -0
- package/dist/assets/f276d55184e05a07.woff +0 -0
- package/dist/assets/f5722262b6e7214e.woff2 +0 -0
- package/dist/assets/f7fc8bf46089d8b2.svg +1 -0
- package/dist/assets/fcb1c1ffb5640194.woff +0 -0
- package/dist/assets/fe141d99763f5d2b.woff +0 -0
- package/dist/assets/fed13b0d59903483.svg +1 -0
- package/dist/assets/fed757d2c2344ead.woff2 +0 -0
- package/dist/assets/ffc438f20e79ce73.woff +0 -0
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/framework.js +16544 -25878
- package/dist/index.css +1 -1
- package/dist/index.d.ts +5 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/vendor-boolbase-Bgn9I6iN.js +21 -0
- package/dist/vendor-cheerio-CleDsuQZ.js +1053 -0
- package/dist/vendor-cheerio-select-CVkYl3Z-.js +191 -0
- package/dist/vendor-css-select-CtIzVIiG.js +622 -0
- package/dist/vendor-css-what-CZZaquJM.js +267 -0
- package/dist/vendor-cypress-signalr-mock-CdKwIhWw.js +769 -0
- package/dist/vendor-date-fns-CdFbeoHV.js +2989 -0
- package/dist/vendor-dom-serializer-CugO0RdN.js +213 -0
- package/dist/vendor-dom7-wvIUV9pT.js +529 -0
- package/dist/vendor-domelementtype-B3sFIGaC.js +21 -0
- package/dist/vendor-domhandler-CL40eeX9.js +311 -0
- package/dist/vendor-dompurify-eYFoHPwR.js +528 -0
- package/dist/vendor-domutils-D3Y2YQFR.js +386 -0
- package/dist/vendor-entities-v26HW8wW.js +363 -0
- package/dist/vendor-floating-ui-core-C9uEvi1M.js +349 -0
- package/dist/vendor-floating-ui-dom-CZkYGmv4.js +393 -0
- package/dist/vendor-floating-ui-utils-Bx3BTd6_.js +259 -0
- package/dist/vendor-floating-ui-vue-CLOiVYP7.js +107 -0
- package/dist/vendor-headlessui-vue-Dg0Llidi.js +961 -0
- package/dist/vendor-htmlparser2-CXL_uhMI.js +735 -0
- package/dist/vendor-iconify-vue-D4fihzvl.js +1205 -0
- package/dist/vendor-intlify-core-base-Bvt2vJFV.js +1129 -0
- package/dist/vendor-intlify-message-compiler-1VxNzq21.js +945 -0
- package/dist/vendor-intlify-shared-D7kiPMOG.js +130 -0
- package/dist/vendor-iso-639-1-dVGfSUIM.js +781 -0
- package/dist/vendor-linkify-it-LzoUhj6C.js +199 -0
- package/dist/vendor-linkifyjs-DTu7SY_Y.js +705 -0
- package/dist/vendor-lodash-es-CrYlgAi8.js +4816 -0
- package/dist/vendor-markdown-it-4AJoRTAg.js +2263 -0
- package/dist/vendor-markdown-it-task-lists-Byg1-ms9.js +69 -0
- package/dist/vendor-mdurl-DZFDNdqC.js +192 -0
- package/dist/vendor-microsoft-applicationinsights-analytics-js-DA-ctcAL.js +1105 -0
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-COfRj-2q.js +261 -0
- package/dist/vendor-microsoft-applicationinsights-channel-js-MTPYhH-I.js +1809 -0
- package/dist/vendor-microsoft-applicationinsights-common-CDVnJ6MR.js +1921 -0
- package/dist/vendor-microsoft-applicationinsights-core-js-D7Aicf8S.js +4127 -0
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-CvQWWraU.js +1399 -0
- package/dist/vendor-microsoft-applicationinsights-properties-js-C0Iv1cZE.js +572 -0
- package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +43 -0
- package/dist/vendor-microsoft-applicationinsights-web-BRuQAzjU.js +487 -0
- package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +147 -0
- package/dist/vendor-microsoft-signalr-qIrag5xx.js +1761 -0
- package/dist/vendor-moment-CwOqp704.js +2589 -0
- package/dist/vendor-nevware21-ts-async-FAyg3c9V.js +260 -0
- package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +853 -0
- package/dist/vendor-nth-check-BE7AeBMg.js +45 -0
- package/dist/vendor-orderedmap-B3SOk52B.js +103 -0
- package/dist/vendor-parse5-DqztJOGh.js +5747 -0
- package/dist/vendor-parse5-htmlparser2-tree-adapter-CNubfdOP.js +143 -0
- package/dist/vendor-popperjs-core-LGjf7Wza.js +905 -0
- package/dist/vendor-prettier-D8C9GG-0.js +4858 -0
- package/dist/vendor-prosemirror-commands-BqYcdumy.js +344 -0
- package/dist/vendor-prosemirror-dropcursor-zknUsW5x.js +86 -0
- package/dist/vendor-prosemirror-gapcursor-DjOZhP78.js +200 -0
- package/dist/vendor-prosemirror-history-l8l3CFac.js +248 -0
- package/dist/vendor-prosemirror-keymap-C17r08p-.js +62 -0
- package/dist/vendor-prosemirror-markdown-WJEDhc-w.js +650 -0
- package/dist/vendor-prosemirror-model-BN5TnJD_.js +2736 -0
- package/dist/vendor-prosemirror-schema-list-CR0gi7aY.js +87 -0
- package/dist/vendor-prosemirror-state-B0bFP8WI.js +821 -0
- package/dist/vendor-prosemirror-tables-B1txTKlC.js +1711 -0
- package/dist/vendor-prosemirror-transform-Bo7kNPme.js +1507 -0
- package/dist/vendor-prosemirror-view--C7TZvmQ.js +3746 -0
- package/dist/vendor-punycode-js-CNI-zL6U.js +133 -0
- package/dist/vendor-rope-sequence-sEGCUMi8.js +100 -0
- package/dist/vendor-semver-BoKYtkQw.js +1021 -0
- package/dist/vendor-ssr-window-D4k3p53c.js +133 -0
- package/dist/vendor-swiper-CMVLTGu0.js +2825 -0
- package/dist/vendor-tippy-js-BGdgwGX-.js +812 -0
- package/dist/vendor-tiptap-core-BRY37Sb2.js +2806 -0
- package/dist/vendor-tiptap-extension-blockquote-CPd5qv-9.js +43 -0
- package/dist/vendor-tiptap-extension-bold-B0GwBNks.js +71 -0
- package/dist/vendor-tiptap-extension-bubble-menu-B0sZZld7.js +128 -0
- package/dist/vendor-tiptap-extension-bullet-list-CQm4ReOu.js +53 -0
- package/dist/vendor-tiptap-extension-code-C8cy6bRj.js +51 -0
- package/dist/vendor-tiptap-extension-code-block-BqTchNEf.js +133 -0
- package/dist/vendor-tiptap-extension-document-Dka1Uu0g.js +9 -0
- package/dist/vendor-tiptap-extension-dropcursor-CFSh-BuE.js +20 -0
- package/dist/vendor-tiptap-extension-floating-menu-H8PB4zeI.js +99 -0
- package/dist/vendor-tiptap-extension-gapcursor-CzwfD_IT.js +24 -0
- package/dist/vendor-tiptap-extension-hard-break-Rm6aVcrK.js +55 -0
- package/dist/vendor-tiptap-extension-heading-CavI6u1v.js +54 -0
- package/dist/vendor-tiptap-extension-history-WEN1_74D.js +35 -0
- package/dist/vendor-tiptap-extension-horizontal-rule-DZkUEL6s.js +58 -0
- package/dist/vendor-tiptap-extension-image-B67_mxGM.js +64 -0
- package/dist/vendor-tiptap-extension-italic-BshxBFou.js +70 -0
- package/dist/vendor-tiptap-extension-link-CJAQIgui.js +262 -0
- package/dist/vendor-tiptap-extension-list-item-DF-iMpqO.js +33 -0
- package/dist/vendor-tiptap-extension-ordered-list-CN8MF-kN.js +71 -0
- package/dist/vendor-tiptap-extension-paragraph-DI577lM5.js +33 -0
- package/dist/vendor-tiptap-extension-placeholder-DwAtlfAF.js +52 -0
- package/dist/vendor-tiptap-extension-strike-CIty09KN.js +61 -0
- package/dist/vendor-tiptap-extension-table-C5nv-GUb.js +213 -0
- package/dist/vendor-tiptap-extension-table-cell-DXbBhJW3.js +40 -0
- package/dist/vendor-tiptap-extension-table-header-rtggsYXA.js +40 -0
- package/dist/vendor-tiptap-extension-table-row-67khjMDt.js +22 -0
- package/dist/vendor-tiptap-extension-text-D1OHb_a1.js +8 -0
- package/dist/vendor-tiptap-extension-underline-IqWixw3m.js +40 -0
- package/dist/vendor-tiptap-markdown-DVxB1hbO.js +825 -0
- package/dist/vendor-tiptap-starter-kit-CPH9gu2X.js +29 -0
- package/dist/vendor-tiptap-vue-3-CkBe4_xM.js +225 -0
- package/dist/vendor-truncate-html-Bx1HJzRq.js +145 -0
- package/dist/vendor-uc-micro-4lbSaZOs.js +17 -0
- package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +93 -0
- package/dist/vendor-vee-validate-rules-DDeNM2Gc.js +314 -0
- package/dist/vendor-vue-currency-input-DxWnS-HB.js +315 -0
- package/dist/vendor-vue-devtools-api-aVYGocXp.js +93 -0
- package/dist/vendor-vue-i18n-DPtOLen3.js +1359 -0
- package/dist/vendor-vue3-application-insights-dAGGfA_M.js +69 -0
- package/dist/vendor-vue3-touch-events-8Pa3HHlV.js +169 -0
- package/dist/vendor-vuepic-vue-datepicker-DglsiNYa.js +4997 -0
- package/dist/vendor-vueuse-components-DtK_mxpP.js +219 -0
- package/dist/vendor-vueuse-core-cB-c7DzH.js +5129 -0
- package/dist/vendor-vueuse-shared-Dg7PMM0z.js +1169 -0
- package/dist/vendor-w3c-keyname-CLxH8j-f.js +92 -0
- package/dist/vendor-whatwg-fetch-l0sNRNKZ.js +1 -0
- package/package.json +5 -4
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +2 -1
- package/dist/vendor-boolbase-Cp9L0GAZ.js +0 -25
- package/dist/vendor-cheerio-HN9zIPZn.js +0 -3135
- package/dist/vendor-cheerio-select-5Ry0HvBq.js +0 -306
- package/dist/vendor-css-select-DRIZ9kfZ.js +0 -966
- package/dist/vendor-css-what-DuPJ1HEF.js +0 -448
- package/dist/vendor-cypress-signalr-mock-BKdBJpdt.js +0 -778
- package/dist/vendor-date-fns-515YWkk-.js +0 -6724
- package/dist/vendor-dom-serializer-nQMsqjYW.js +0 -286
- package/dist/vendor-dom7-CJLPMwy5.js +0 -941
- package/dist/vendor-domelementtype-CjSzQey5.js +0 -53
- package/dist/vendor-domhandler-9z8cS16a.js +0 -484
- package/dist/vendor-dompurify-CRFzu7ib.js +0 -1336
- package/dist/vendor-domutils-Bc-Opz-v.js +0 -981
- package/dist/vendor-entities-Bfsx4xOQ.js +0 -636
- package/dist/vendor-floating-ui-core-wV8u8QP4.js +0 -511
- package/dist/vendor-floating-ui-dom-DDnRPs17.js +0 -706
- package/dist/vendor-floating-ui-utils-OMIFy1QU.js +0 -296
- package/dist/vendor-floating-ui-vue-D-tCDAMm.js +0 -167
- package/dist/vendor-fontsource-plus-jakarta-sans.css +0 -1
- package/dist/vendor-headlessui-vue-CY9FRgTb.js +0 -83
- package/dist/vendor-htmlparser2-B1dhFPOs.js +0 -1426
- package/dist/vendor-iconify-vue-DfRGgyNu.js +0 -1840
- package/dist/vendor-intlify-core-base-BuknsFQe.js +0 -1876
- package/dist/vendor-intlify-message-compiler-CuOQDWx1.js +0 -1508
- package/dist/vendor-intlify-shared-Cz4YRMuC.js +0 -241
- package/dist/vendor-iso-639-1-BJCk9DvE.js +0 -819
- package/dist/vendor-linkify-it-CKUf4vsc.js +0 -830
- package/dist/vendor-linkifyjs-BfyGgbCh.js +0 -1756
- package/dist/vendor-lodash-es-BySUOlwf.js +0 -18333
- package/dist/vendor-markdown-it-D-apazHa.js +0 -6000
- package/dist/vendor-markdown-it-task-lists-rxMVH6Ku.js +0 -131
- package/dist/vendor-mdurl-BNh2CCgT.js +0 -537
- package/dist/vendor-microsoft-applicationinsights-analytics-js-kG3lLg8X.js +0 -1275
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-C0uQkiQq.js +0 -591
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dyd_PXA3.js +0 -2153
- package/dist/vendor-microsoft-applicationinsights-common-CfmP1_Qr.js +0 -2470
- package/dist/vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js +0 -6589
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-C56OBFr4.js +0 -1510
- package/dist/vendor-microsoft-applicationinsights-properties-js-CBJTBawx.js +0 -761
- package/dist/vendor-microsoft-applicationinsights-shims-CX8sJgar.js +0 -70
- package/dist/vendor-microsoft-applicationinsights-web-pim2ri-g.js +0 -667
- package/dist/vendor-microsoft-dynamicproto-js-CFBBUu9p.js +0 -520
- package/dist/vendor-microsoft-signalr-dUnlRsGm.js +0 -3339
- package/dist/vendor-moment-Mki5YqAR.js +0 -5679
- package/dist/vendor-nevware21-ts-async-CLMApQ9E.js +0 -395
- package/dist/vendor-nevware21-ts-utils-e8v8Jty3.js +0 -1160
- package/dist/vendor-nth-check-Bx8TxtJt.js +0 -157
- package/dist/vendor-orderedmap-dGG6uMFJ.js +0 -137
- package/dist/vendor-parse5-Bt2NhSzR.js +0 -8432
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BUUtKzf8.js +0 -216
- package/dist/vendor-popperjs-core-Cr2byIky.js +0 -1790
- package/dist/vendor-prettier-B4PaeWRQ.js +0 -98
- package/dist/vendor-prosemirror-commands-BH9lWGpW.js +0 -561
- package/dist/vendor-prosemirror-dropcursor-CeyPcxrA.js +0 -146
- package/dist/vendor-prosemirror-gapcursor-U8UoUJII.js +0 -236
- package/dist/vendor-prosemirror-history-BDaJkvNx.js +0 -414
- package/dist/vendor-prosemirror-keymap-BbWvIWmH.js +0 -128
- package/dist/vendor-prosemirror-markdown-gB0PXBbz.js +0 -866
- package/dist/vendor-prosemirror-model-BZu3WVcD.js +0 -3463
- package/dist/vendor-prosemirror-schema-list-Bl9NpKA7.js +0 -158
- package/dist/vendor-prosemirror-state-BvL9Pxph.js +0 -1003
- package/dist/vendor-prosemirror-tables-17qAnviK.js +0 -2159
- package/dist/vendor-prosemirror-transform-CE9VV3qg.js +0 -2156
- package/dist/vendor-prosemirror-view-CU2WTHT7.js +0 -5811
- package/dist/vendor-punycode-js-iAs5RxMf.js +0 -441
- package/dist/vendor-rope-sequence-BdXDKoGt.js +0 -207
- package/dist/vendor-semver-CVLMK-S4.js +0 -2702
- package/dist/vendor-ssr-window-s6OpKa3O.js +0 -150
- package/dist/vendor-swiper-CdiyNHVt.js +0 -5679
- package/dist/vendor-tippy-js-DWFe2TfK.js +0 -1647
- package/dist/vendor-tiptap-core-NfwGfaQk.js +0 -4910
- package/dist/vendor-tiptap-extension-blockquote-jmWBTtsI.js +0 -57
- package/dist/vendor-tiptap-extension-bold-p5frh4ak.js +0 -97
- package/dist/vendor-tiptap-extension-bubble-menu-KUhZSfrs.js +0 -218
- package/dist/vendor-tiptap-extension-bullet-list-COmZRoSB.js +0 -73
- package/dist/vendor-tiptap-extension-code-block-DyTARZss.js +0 -221
- package/dist/vendor-tiptap-extension-code-jVv6CXpX.js +0 -75
- package/dist/vendor-tiptap-extension-document-DssuotYs.js +0 -13
- package/dist/vendor-tiptap-extension-dropcursor-BoO0Qv91.js +0 -26
- package/dist/vendor-tiptap-extension-floating-menu-CrO8CN5w.js +0 -165
- package/dist/vendor-tiptap-extension-gapcursor-KpsWEoMD.js +0 -30
- package/dist/vendor-tiptap-extension-hard-break-ldOzhSvf.js +0 -68
- package/dist/vendor-tiptap-extension-heading-CKz2llX0.js +0 -77
- package/dist/vendor-tiptap-extension-history-DeKZ2VQ9.js +0 -48
- package/dist/vendor-tiptap-extension-horizontal-rule-CAjWRyDS.js +0 -92
- package/dist/vendor-tiptap-extension-image-ZagcEYuk.js +0 -76
- package/dist/vendor-tiptap-extension-italic-CM4xdznY.js +0 -96
- package/dist/vendor-tiptap-extension-link-Z-AMC4Ri.js +0 -414
- package/dist/vendor-tiptap-extension-list-item-BJi5QpXc.js +0 -37
- package/dist/vendor-tiptap-extension-ordered-list-C_TMrfBE.js +0 -97
- package/dist/vendor-tiptap-extension-paragraph-CQw0E0Au.js +0 -39
- package/dist/vendor-tiptap-extension-placeholder-BBNVKfa_.js +0 -66
- package/dist/vendor-tiptap-extension-strike-DUyMYX1Z.js +0 -79
- package/dist/vendor-tiptap-extension-table-cell-CoDIMPA5.js +0 -47
- package/dist/vendor-tiptap-extension-table-header-DvbGHnmw.js +0 -47
- package/dist/vendor-tiptap-extension-table-row-D1uqN5Aj.js +0 -26
- package/dist/vendor-tiptap-extension-table-tKS4MOM4.js +0 -354
- package/dist/vendor-tiptap-extension-text-DtRBhKB2.js +0 -12
- package/dist/vendor-tiptap-extension-underline-DqaSFp_P.js +0 -50
- package/dist/vendor-tiptap-markdown-7-PCADTU.js +0 -1017
- package/dist/vendor-tiptap-starter-kit-CDSV_Zuu.js +0 -88
- package/dist/vendor-tiptap-vue-3-DZg2fjq_.js +0 -268
- package/dist/vendor-truncate-html-3qQY0Djo.js +0 -196
- package/dist/vendor-uc-micro-jjt6LQ65.js +0 -23
- package/dist/vendor-vee-validate-i18n-v_gHjRmD.js +0 -154
- package/dist/vendor-vee-validate-rules-DzV3VY3N.js +0 -536
- package/dist/vendor-vue-currency-input-DGAkEFBO.js +0 -545
- package/dist/vendor-vue-devtools-api-DXYR8qBG.js +0 -169
- package/dist/vendor-vue-i18n-Co752uk3.js +0 -1897
- package/dist/vendor-vue3-application-insights-CYWFCr_J.js +0 -119
- package/dist/vendor-vue3-touch-events-BJEAiSa3.js +0 -416
- package/dist/vendor-vuepic-vue-datepicker-BSWXRSiu.js +0 -5019
- package/dist/vendor-vueuse-components-l1bL12mE.js +0 -339
- package/dist/vendor-vueuse-core-DGcJOmwG.js +0 -7743
- package/dist/vendor-vueuse-shared-_mOXsFuM.js +0 -1568
- package/dist/vendor-w3c-keyname-BOm2dtJm.js +0 -121
|
@@ -1,1017 +0,0 @@
|
|
|
1
|
-
import { E as Extension, u as index, N as Node$1, M as Mark, v as getHTMLFromFragment } from './vendor-tiptap-core-NfwGfaQk.js';
|
|
2
|
-
import { M as MarkdownSerializerState$1, d as defaultMarkdownSerializer } from './vendor-prosemirror-markdown-gB0PXBbz.js';
|
|
3
|
-
import { t as taskListPlugin } from './vendor-markdown-it-task-lists-rxMVH6Ku.js';
|
|
4
|
-
import { M as MarkdownIt } from './vendor-markdown-it-D-apazHa.js';
|
|
5
|
-
import { P as Plugin, a as PluginKey } from './vendor-prosemirror-state-BvL9Pxph.js';
|
|
6
|
-
import { d as DOMParser, F as Fragment } from './vendor-prosemirror-model-BZu3WVcD.js';
|
|
7
|
-
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __publicField = (obj, key, value) => {
|
|
11
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
12
|
-
return value;
|
|
13
|
-
};
|
|
14
|
-
const MarkdownTightLists = Extension.create({
|
|
15
|
-
name: "markdownTightLists",
|
|
16
|
-
addOptions: () => ({
|
|
17
|
-
tight: true,
|
|
18
|
-
tightClass: "tight",
|
|
19
|
-
listTypes: ["bulletList", "orderedList"]
|
|
20
|
-
}),
|
|
21
|
-
addGlobalAttributes() {
|
|
22
|
-
return [{
|
|
23
|
-
types: this.options.listTypes,
|
|
24
|
-
attributes: {
|
|
25
|
-
tight: {
|
|
26
|
-
default: this.options.tight,
|
|
27
|
-
parseHTML: (element) => element.getAttribute("data-tight") === "true" || !element.querySelector("p"),
|
|
28
|
-
renderHTML: (attributes) => ({
|
|
29
|
-
class: attributes.tight ? this.options.tightClass : null,
|
|
30
|
-
"data-tight": attributes.tight ? "true" : null
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}];
|
|
35
|
-
},
|
|
36
|
-
addCommands() {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return {
|
|
39
|
-
toggleTight: function() {
|
|
40
|
-
let tight = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
41
|
-
return (_ref) => {
|
|
42
|
-
let {
|
|
43
|
-
editor,
|
|
44
|
-
commands
|
|
45
|
-
} = _ref;
|
|
46
|
-
function toggleTight(name) {
|
|
47
|
-
if (!editor.isActive(name)) {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
const attrs = editor.getAttributes(name);
|
|
51
|
-
return commands.updateAttributes(name, {
|
|
52
|
-
tight: tight !== null && tight !== void 0 ? tight : !(attrs !== null && attrs !== void 0 && attrs.tight)
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return _this.options.listTypes.some((name) => toggleTight(name));
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const md = MarkdownIt();
|
|
62
|
-
function scanDelims(text, pos) {
|
|
63
|
-
md.inline.State.prototype.scanDelims.call({
|
|
64
|
-
src: text,
|
|
65
|
-
posMax: text.length
|
|
66
|
-
});
|
|
67
|
-
const state = new md.inline.State(text, null, null, []);
|
|
68
|
-
return state.scanDelims(pos, true);
|
|
69
|
-
}
|
|
70
|
-
function shiftDelim(text, delim, start, offset) {
|
|
71
|
-
let res = text.substring(0, start) + text.substring(start + delim.length);
|
|
72
|
-
res = res.substring(0, start + offset) + delim + res.substring(start + offset);
|
|
73
|
-
return res;
|
|
74
|
-
}
|
|
75
|
-
function trimStart(text, delim, from, to) {
|
|
76
|
-
let pos = from, res = text;
|
|
77
|
-
while (pos < to) {
|
|
78
|
-
if (scanDelims(res, pos).can_open) {
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
res = shiftDelim(res, delim, pos, 1);
|
|
82
|
-
pos++;
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
text: res,
|
|
86
|
-
from: pos,
|
|
87
|
-
to
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function trimEnd(text, delim, from, to) {
|
|
91
|
-
let pos = to, res = text;
|
|
92
|
-
while (pos > from) {
|
|
93
|
-
if (scanDelims(res, pos).can_close) {
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
res = shiftDelim(res, delim, pos, -1);
|
|
97
|
-
pos--;
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
text: res,
|
|
101
|
-
from,
|
|
102
|
-
to: pos
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function trimInline(text, delim, from, to) {
|
|
106
|
-
let state = {
|
|
107
|
-
text,
|
|
108
|
-
from,
|
|
109
|
-
to
|
|
110
|
-
};
|
|
111
|
-
state = trimStart(state.text, delim, state.from, state.to);
|
|
112
|
-
state = trimEnd(state.text, delim, state.from, state.to);
|
|
113
|
-
if (state.to - state.from < delim.length + 1) {
|
|
114
|
-
state.text = state.text.substring(0, state.from) + state.text.substring(state.to + delim.length);
|
|
115
|
-
}
|
|
116
|
-
return state.text;
|
|
117
|
-
}
|
|
118
|
-
class MarkdownSerializerState extends MarkdownSerializerState$1 {
|
|
119
|
-
constructor(nodes, marks, options) {
|
|
120
|
-
super(nodes, marks, options !== null && options !== void 0 ? options : {});
|
|
121
|
-
__publicField(this, "inTable", false);
|
|
122
|
-
this.inlines = [];
|
|
123
|
-
}
|
|
124
|
-
render(node, parent, index) {
|
|
125
|
-
super.render(node, parent, index);
|
|
126
|
-
const top = this.inlines[this.inlines.length - 1];
|
|
127
|
-
if (top !== null && top !== void 0 && top.start && top !== null && top !== void 0 && top.end) {
|
|
128
|
-
const {
|
|
129
|
-
delimiter,
|
|
130
|
-
start,
|
|
131
|
-
end
|
|
132
|
-
} = this.normalizeInline(top);
|
|
133
|
-
this.out = trimInline(this.out, delimiter, start, end);
|
|
134
|
-
this.inlines.pop();
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
markString(mark, open, parent, index) {
|
|
138
|
-
const info = this.marks[mark.type.name];
|
|
139
|
-
if (info.expelEnclosingWhitespace) {
|
|
140
|
-
if (open) {
|
|
141
|
-
this.inlines.push({
|
|
142
|
-
start: this.out.length,
|
|
143
|
-
delimiter: info.open
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
const top = this.inlines.pop();
|
|
147
|
-
this.inlines.push({
|
|
148
|
-
...top,
|
|
149
|
-
end: this.out.length
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return super.markString(mark, open, parent, index);
|
|
154
|
-
}
|
|
155
|
-
normalizeInline(inline) {
|
|
156
|
-
let {
|
|
157
|
-
start} = inline;
|
|
158
|
-
while (this.out.charAt(start).match(/\s/)) {
|
|
159
|
-
start++;
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
...inline,
|
|
163
|
-
start
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
const HTMLMark = Mark.create({
|
|
168
|
-
name: "markdownHTMLMark",
|
|
169
|
-
/**
|
|
170
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
171
|
-
*/
|
|
172
|
-
addStorage() {
|
|
173
|
-
return {
|
|
174
|
-
markdown: {
|
|
175
|
-
serialize: {
|
|
176
|
-
open(state, mark) {
|
|
177
|
-
var _getMarkTags$, _getMarkTags;
|
|
178
|
-
if (!this.editor.storage.markdown.options.html) {
|
|
179
|
-
console.warn(`Tiptap Markdown: "${mark.type.name}" mark is only available in html mode`);
|
|
180
|
-
return "";
|
|
181
|
-
}
|
|
182
|
-
return (_getMarkTags$ = (_getMarkTags = getMarkTags(mark)) === null || _getMarkTags === void 0 ? void 0 : _getMarkTags[0]) !== null && _getMarkTags$ !== void 0 ? _getMarkTags$ : "";
|
|
183
|
-
},
|
|
184
|
-
close(state, mark) {
|
|
185
|
-
var _getMarkTags$2, _getMarkTags2;
|
|
186
|
-
if (!this.editor.storage.markdown.options.html) {
|
|
187
|
-
return "";
|
|
188
|
-
}
|
|
189
|
-
return (_getMarkTags$2 = (_getMarkTags2 = getMarkTags(mark)) === null || _getMarkTags2 === void 0 ? void 0 : _getMarkTags2[1]) !== null && _getMarkTags$2 !== void 0 ? _getMarkTags$2 : "";
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
parse: {
|
|
193
|
-
// handled by markdown-it
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
function getMarkTags(mark) {
|
|
200
|
-
const schema = mark.type.schema;
|
|
201
|
-
const node = schema.text(" ", [mark]);
|
|
202
|
-
const html = getHTMLFromFragment(Fragment.from(node), schema);
|
|
203
|
-
const match = html.match(/^(<.*?>) (<\/.*?>)$/);
|
|
204
|
-
return match ? [match[1], match[2]] : null;
|
|
205
|
-
}
|
|
206
|
-
function elementFromString(value) {
|
|
207
|
-
const wrappedValue = `<body>${value}</body>`;
|
|
208
|
-
return new window.DOMParser().parseFromString(wrappedValue, "text/html").body;
|
|
209
|
-
}
|
|
210
|
-
function escapeHTML(value) {
|
|
211
|
-
return value === null || value === void 0 ? void 0 : value.replace(/</g, "<").replace(/>/g, ">");
|
|
212
|
-
}
|
|
213
|
-
function extractElement(node) {
|
|
214
|
-
const parent = node.parentElement;
|
|
215
|
-
const prepend = parent.cloneNode();
|
|
216
|
-
while (parent.firstChild && parent.firstChild !== node) {
|
|
217
|
-
prepend.appendChild(parent.firstChild);
|
|
218
|
-
}
|
|
219
|
-
if (prepend.childNodes.length > 0) {
|
|
220
|
-
parent.parentElement.insertBefore(prepend, parent);
|
|
221
|
-
}
|
|
222
|
-
parent.parentElement.insertBefore(node, parent);
|
|
223
|
-
if (parent.childNodes.length === 0) {
|
|
224
|
-
parent.remove();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function unwrapElement(node) {
|
|
228
|
-
const parent = node.parentNode;
|
|
229
|
-
while (node.firstChild)
|
|
230
|
-
parent.insertBefore(node.firstChild, node);
|
|
231
|
-
parent.removeChild(node);
|
|
232
|
-
}
|
|
233
|
-
const HTMLNode = Node$1.create({
|
|
234
|
-
name: "markdownHTMLNode",
|
|
235
|
-
addStorage() {
|
|
236
|
-
return {
|
|
237
|
-
markdown: {
|
|
238
|
-
serialize(state, node, parent) {
|
|
239
|
-
if (this.editor.storage.markdown.options.html) {
|
|
240
|
-
state.write(serializeHTML(node, parent));
|
|
241
|
-
} else {
|
|
242
|
-
console.warn(`Tiptap Markdown: "${node.type.name}" node is only available in html mode`);
|
|
243
|
-
state.write(`[${node.type.name}]`);
|
|
244
|
-
}
|
|
245
|
-
if (node.isBlock) {
|
|
246
|
-
state.closeBlock(node);
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
parse: {
|
|
250
|
-
// handled by markdown-it
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
function serializeHTML(node, parent) {
|
|
257
|
-
const schema = node.type.schema;
|
|
258
|
-
const html = getHTMLFromFragment(Fragment.from(node), schema);
|
|
259
|
-
if (node.isBlock && (parent instanceof Fragment || parent.type.name === schema.topNodeType.name)) {
|
|
260
|
-
return formatBlock(html);
|
|
261
|
-
}
|
|
262
|
-
return html;
|
|
263
|
-
}
|
|
264
|
-
function formatBlock(html) {
|
|
265
|
-
const dom = elementFromString(html);
|
|
266
|
-
const element = dom.firstElementChild;
|
|
267
|
-
element.innerHTML = element.innerHTML.trim() ? `
|
|
268
|
-
${element.innerHTML}
|
|
269
|
-
` : `
|
|
270
|
-
`;
|
|
271
|
-
return element.outerHTML;
|
|
272
|
-
}
|
|
273
|
-
const Blockquote = Node$1.create({
|
|
274
|
-
name: "blockquote"
|
|
275
|
-
});
|
|
276
|
-
const Blockquote$1 = Blockquote.extend({
|
|
277
|
-
/**
|
|
278
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
279
|
-
*/
|
|
280
|
-
addStorage() {
|
|
281
|
-
return {
|
|
282
|
-
markdown: {
|
|
283
|
-
serialize: defaultMarkdownSerializer.nodes.blockquote,
|
|
284
|
-
parse: {
|
|
285
|
-
// handled by markdown-it
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
const BulletList = Node$1.create({
|
|
292
|
-
name: "bulletList"
|
|
293
|
-
});
|
|
294
|
-
const BulletList$1 = BulletList.extend({
|
|
295
|
-
/**
|
|
296
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
297
|
-
*/
|
|
298
|
-
addStorage() {
|
|
299
|
-
return {
|
|
300
|
-
markdown: {
|
|
301
|
-
serialize(state, node) {
|
|
302
|
-
return state.renderList(node, " ", () => (this.editor.storage.markdown.options.bulletListMarker || "-") + " ");
|
|
303
|
-
},
|
|
304
|
-
parse: {
|
|
305
|
-
// handled by markdown-it
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
const CodeBlock = Node$1.create({
|
|
312
|
-
name: "codeBlock"
|
|
313
|
-
});
|
|
314
|
-
const CodeBlock$1 = CodeBlock.extend({
|
|
315
|
-
/**
|
|
316
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
317
|
-
*/
|
|
318
|
-
addStorage() {
|
|
319
|
-
return {
|
|
320
|
-
markdown: {
|
|
321
|
-
serialize(state, node) {
|
|
322
|
-
state.write("```" + (node.attrs.language || "") + "\n");
|
|
323
|
-
state.text(node.textContent, false);
|
|
324
|
-
state.ensureNewLine();
|
|
325
|
-
state.write("```");
|
|
326
|
-
state.closeBlock(node);
|
|
327
|
-
},
|
|
328
|
-
parse: {
|
|
329
|
-
setup(markdownit2) {
|
|
330
|
-
var _this$options$languag;
|
|
331
|
-
markdownit2.set({
|
|
332
|
-
langPrefix: (_this$options$languag = this.options.languageClassPrefix) !== null && _this$options$languag !== void 0 ? _this$options$languag : "language-"
|
|
333
|
-
});
|
|
334
|
-
},
|
|
335
|
-
updateDOM(element) {
|
|
336
|
-
element.innerHTML = element.innerHTML.replace(/\n<\/code><\/pre>/g, "</code></pre>");
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
const HardBreak = Node$1.create({
|
|
344
|
-
name: "hardBreak"
|
|
345
|
-
});
|
|
346
|
-
const HardBreak$1 = HardBreak.extend({
|
|
347
|
-
/**
|
|
348
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
349
|
-
*/
|
|
350
|
-
addStorage() {
|
|
351
|
-
return {
|
|
352
|
-
markdown: {
|
|
353
|
-
serialize(state, node, parent, index) {
|
|
354
|
-
for (let i = index + 1; i < parent.childCount; i++)
|
|
355
|
-
if (parent.child(i).type != node.type) {
|
|
356
|
-
state.write(state.inTable ? HTMLNode.storage.markdown.serialize.call(this, state, node, parent) : "\\\n");
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
parse: {
|
|
361
|
-
// handled by markdown-it
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
const Heading = Node$1.create({
|
|
368
|
-
name: "heading"
|
|
369
|
-
});
|
|
370
|
-
const Heading$1 = Heading.extend({
|
|
371
|
-
/**
|
|
372
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
373
|
-
*/
|
|
374
|
-
addStorage() {
|
|
375
|
-
return {
|
|
376
|
-
markdown: {
|
|
377
|
-
serialize: defaultMarkdownSerializer.nodes.heading,
|
|
378
|
-
parse: {
|
|
379
|
-
// handled by markdown-it
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
const HorizontalRule = Node$1.create({
|
|
386
|
-
name: "horizontalRule"
|
|
387
|
-
});
|
|
388
|
-
const HorizontalRule$1 = HorizontalRule.extend({
|
|
389
|
-
/**
|
|
390
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
391
|
-
*/
|
|
392
|
-
addStorage() {
|
|
393
|
-
return {
|
|
394
|
-
markdown: {
|
|
395
|
-
serialize: defaultMarkdownSerializer.nodes.horizontal_rule,
|
|
396
|
-
parse: {
|
|
397
|
-
// handled by markdown-it
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
const Image = Node$1.create({
|
|
404
|
-
name: "image"
|
|
405
|
-
});
|
|
406
|
-
const Image$1 = Image.extend({
|
|
407
|
-
/**
|
|
408
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
409
|
-
*/
|
|
410
|
-
addStorage() {
|
|
411
|
-
return {
|
|
412
|
-
markdown: {
|
|
413
|
-
serialize: defaultMarkdownSerializer.nodes.image,
|
|
414
|
-
parse: {
|
|
415
|
-
// handled by markdown-it
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
const ListItem = Node$1.create({
|
|
422
|
-
name: "listItem"
|
|
423
|
-
});
|
|
424
|
-
const ListItem$1 = ListItem.extend({
|
|
425
|
-
/**
|
|
426
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
427
|
-
*/
|
|
428
|
-
addStorage() {
|
|
429
|
-
return {
|
|
430
|
-
markdown: {
|
|
431
|
-
serialize: defaultMarkdownSerializer.nodes.list_item,
|
|
432
|
-
parse: {
|
|
433
|
-
// handled by markdown-it
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
});
|
|
439
|
-
const OrderedList = Node$1.create({
|
|
440
|
-
name: "orderedList"
|
|
441
|
-
});
|
|
442
|
-
function findIndexOfAdjacentNode(node, parent, index) {
|
|
443
|
-
let i = 0;
|
|
444
|
-
for (; index - i > 0; i++) {
|
|
445
|
-
if (parent.child(index - i - 1).type.name !== node.type.name) {
|
|
446
|
-
break;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
return i;
|
|
450
|
-
}
|
|
451
|
-
const OrderedList$1 = OrderedList.extend({
|
|
452
|
-
/**
|
|
453
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
454
|
-
*/
|
|
455
|
-
addStorage() {
|
|
456
|
-
return {
|
|
457
|
-
markdown: {
|
|
458
|
-
serialize(state, node, parent, index) {
|
|
459
|
-
const start = node.attrs.start || 1;
|
|
460
|
-
const maxW = String(start + node.childCount - 1).length;
|
|
461
|
-
const space = state.repeat(" ", maxW + 2);
|
|
462
|
-
const adjacentIndex = findIndexOfAdjacentNode(node, parent, index);
|
|
463
|
-
const separator = adjacentIndex % 2 ? ") " : ". ";
|
|
464
|
-
state.renderList(node, space, (i) => {
|
|
465
|
-
const nStr = String(start + i);
|
|
466
|
-
return state.repeat(" ", maxW - nStr.length) + nStr + separator;
|
|
467
|
-
});
|
|
468
|
-
},
|
|
469
|
-
parse: {
|
|
470
|
-
// handled by markdown-it
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
});
|
|
476
|
-
const Paragraph = Node$1.create({
|
|
477
|
-
name: "paragraph"
|
|
478
|
-
});
|
|
479
|
-
const Paragraph$1 = Paragraph.extend({
|
|
480
|
-
/**
|
|
481
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
482
|
-
*/
|
|
483
|
-
addStorage() {
|
|
484
|
-
return {
|
|
485
|
-
markdown: {
|
|
486
|
-
serialize: defaultMarkdownSerializer.nodes.paragraph,
|
|
487
|
-
parse: {
|
|
488
|
-
// handled by markdown-it
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
function childNodes(node) {
|
|
495
|
-
var _node$content$content, _node$content;
|
|
496
|
-
return (_node$content$content = node === null || node === void 0 || (_node$content = node.content) === null || _node$content === void 0 ? void 0 : _node$content.content) !== null && _node$content$content !== void 0 ? _node$content$content : [];
|
|
497
|
-
}
|
|
498
|
-
const Table = Node$1.create({
|
|
499
|
-
name: "table"
|
|
500
|
-
});
|
|
501
|
-
const Table$1 = Table.extend({
|
|
502
|
-
/**
|
|
503
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
504
|
-
*/
|
|
505
|
-
addStorage() {
|
|
506
|
-
return {
|
|
507
|
-
markdown: {
|
|
508
|
-
serialize(state, node, parent) {
|
|
509
|
-
if (!isMarkdownSerializable(node)) {
|
|
510
|
-
HTMLNode.storage.markdown.serialize.call(this, state, node, parent);
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
state.inTable = true;
|
|
514
|
-
node.forEach((row, p, i) => {
|
|
515
|
-
state.write("| ");
|
|
516
|
-
row.forEach((col, p2, j) => {
|
|
517
|
-
if (j) {
|
|
518
|
-
state.write(" | ");
|
|
519
|
-
}
|
|
520
|
-
const cellContent = col.firstChild;
|
|
521
|
-
if (cellContent.textContent.trim()) {
|
|
522
|
-
state.renderInline(cellContent);
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
state.write(" |");
|
|
526
|
-
state.ensureNewLine();
|
|
527
|
-
if (!i) {
|
|
528
|
-
const delimiterRow = Array.from({
|
|
529
|
-
length: row.childCount
|
|
530
|
-
}).map(() => "---").join(" | ");
|
|
531
|
-
state.write(`| ${delimiterRow} |`);
|
|
532
|
-
state.ensureNewLine();
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
state.closeBlock(node);
|
|
536
|
-
state.inTable = false;
|
|
537
|
-
},
|
|
538
|
-
parse: {
|
|
539
|
-
// handled by markdown-it
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
function hasSpan(node) {
|
|
546
|
-
return node.attrs.colspan > 1 || node.attrs.rowspan > 1;
|
|
547
|
-
}
|
|
548
|
-
function isMarkdownSerializable(node) {
|
|
549
|
-
const rows = childNodes(node);
|
|
550
|
-
const firstRow = rows[0];
|
|
551
|
-
const bodyRows = rows.slice(1);
|
|
552
|
-
if (childNodes(firstRow).some((cell) => cell.type.name !== "tableHeader" || hasSpan(cell) || cell.childCount > 1)) {
|
|
553
|
-
return false;
|
|
554
|
-
}
|
|
555
|
-
if (bodyRows.some((row) => childNodes(row).some((cell) => cell.type.name === "tableHeader" || hasSpan(cell) || cell.childCount > 1))) {
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
return true;
|
|
559
|
-
}
|
|
560
|
-
const TaskItem = Node$1.create({
|
|
561
|
-
name: "taskItem"
|
|
562
|
-
});
|
|
563
|
-
const TaskItem$1 = TaskItem.extend({
|
|
564
|
-
/**
|
|
565
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
566
|
-
*/
|
|
567
|
-
addStorage() {
|
|
568
|
-
return {
|
|
569
|
-
markdown: {
|
|
570
|
-
serialize(state, node) {
|
|
571
|
-
const check = node.attrs.checked ? "[x]" : "[ ]";
|
|
572
|
-
state.write(`${check} `);
|
|
573
|
-
state.renderContent(node);
|
|
574
|
-
},
|
|
575
|
-
parse: {
|
|
576
|
-
updateDOM(element) {
|
|
577
|
-
[...element.querySelectorAll(".task-list-item")].forEach((item) => {
|
|
578
|
-
const input = item.querySelector("input");
|
|
579
|
-
item.setAttribute("data-type", "taskItem");
|
|
580
|
-
if (input) {
|
|
581
|
-
item.setAttribute("data-checked", input.checked);
|
|
582
|
-
input.remove();
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
const TaskList = Node$1.create({
|
|
592
|
-
name: "taskList"
|
|
593
|
-
});
|
|
594
|
-
const TaskList$1 = TaskList.extend({
|
|
595
|
-
/**
|
|
596
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
597
|
-
*/
|
|
598
|
-
addStorage() {
|
|
599
|
-
return {
|
|
600
|
-
markdown: {
|
|
601
|
-
serialize: BulletList$1.storage.markdown.serialize,
|
|
602
|
-
parse: {
|
|
603
|
-
setup(markdownit2) {
|
|
604
|
-
markdownit2.use(taskListPlugin);
|
|
605
|
-
},
|
|
606
|
-
updateDOM(element) {
|
|
607
|
-
[...element.querySelectorAll(".contains-task-list")].forEach((list) => {
|
|
608
|
-
list.setAttribute("data-type", "taskList");
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
});
|
|
616
|
-
const Text = Node$1.create({
|
|
617
|
-
name: "text"
|
|
618
|
-
});
|
|
619
|
-
const Text$1 = Text.extend({
|
|
620
|
-
/**
|
|
621
|
-
* @return {{markdown: MarkdownNodeSpec}}
|
|
622
|
-
*/
|
|
623
|
-
addStorage() {
|
|
624
|
-
return {
|
|
625
|
-
markdown: {
|
|
626
|
-
serialize(state, node) {
|
|
627
|
-
state.text(escapeHTML(node.text));
|
|
628
|
-
},
|
|
629
|
-
parse: {
|
|
630
|
-
// handled by markdown-it
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
const Bold = Mark.create({
|
|
637
|
-
name: "bold"
|
|
638
|
-
});
|
|
639
|
-
const Bold$1 = Bold.extend({
|
|
640
|
-
/**
|
|
641
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
642
|
-
*/
|
|
643
|
-
addStorage() {
|
|
644
|
-
return {
|
|
645
|
-
markdown: {
|
|
646
|
-
serialize: defaultMarkdownSerializer.marks.strong,
|
|
647
|
-
parse: {
|
|
648
|
-
// handled by markdown-it
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
const Code = Mark.create({
|
|
655
|
-
name: "code"
|
|
656
|
-
});
|
|
657
|
-
const Code$1 = Code.extend({
|
|
658
|
-
/**
|
|
659
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
660
|
-
*/
|
|
661
|
-
addStorage() {
|
|
662
|
-
return {
|
|
663
|
-
markdown: {
|
|
664
|
-
serialize: defaultMarkdownSerializer.marks.code,
|
|
665
|
-
parse: {
|
|
666
|
-
// handled by markdown-it
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
const Italic = Mark.create({
|
|
673
|
-
name: "italic"
|
|
674
|
-
});
|
|
675
|
-
const Italic$1 = Italic.extend({
|
|
676
|
-
/**
|
|
677
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
678
|
-
*/
|
|
679
|
-
addStorage() {
|
|
680
|
-
return {
|
|
681
|
-
markdown: {
|
|
682
|
-
serialize: defaultMarkdownSerializer.marks.em,
|
|
683
|
-
parse: {
|
|
684
|
-
// handled by markdown-it
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
const Link = Mark.create({
|
|
691
|
-
name: "link"
|
|
692
|
-
});
|
|
693
|
-
const Link$1 = Link.extend({
|
|
694
|
-
/**
|
|
695
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
696
|
-
*/
|
|
697
|
-
addStorage() {
|
|
698
|
-
return {
|
|
699
|
-
markdown: {
|
|
700
|
-
serialize: defaultMarkdownSerializer.marks.link,
|
|
701
|
-
parse: {
|
|
702
|
-
// handled by markdown-it
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
});
|
|
708
|
-
const Strike = Mark.create({
|
|
709
|
-
name: "strike"
|
|
710
|
-
});
|
|
711
|
-
const Strike$1 = Strike.extend({
|
|
712
|
-
/**
|
|
713
|
-
* @return {{markdown: MarkdownMarkSpec}}
|
|
714
|
-
*/
|
|
715
|
-
addStorage() {
|
|
716
|
-
return {
|
|
717
|
-
markdown: {
|
|
718
|
-
serialize: {
|
|
719
|
-
open: "~~",
|
|
720
|
-
close: "~~",
|
|
721
|
-
expelEnclosingWhitespace: true
|
|
722
|
-
},
|
|
723
|
-
parse: {
|
|
724
|
-
// handled by markdown-it
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
});
|
|
730
|
-
const markdownExtensions = [Blockquote$1, BulletList$1, CodeBlock$1, HardBreak$1, Heading$1, HorizontalRule$1, HTMLNode, Image$1, ListItem$1, OrderedList$1, Paragraph$1, Table$1, TaskItem$1, TaskList$1, Text$1, Bold$1, Code$1, HTMLMark, Italic$1, Link$1, Strike$1];
|
|
731
|
-
function getMarkdownSpec(extension) {
|
|
732
|
-
var _extension$storage, _markdownExtensions$f;
|
|
733
|
-
const markdownSpec = (_extension$storage = extension.storage) === null || _extension$storage === void 0 ? void 0 : _extension$storage.markdown;
|
|
734
|
-
const defaultMarkdownSpec = (_markdownExtensions$f = markdownExtensions.find((e) => e.name === extension.name)) === null || _markdownExtensions$f === void 0 ? void 0 : _markdownExtensions$f.storage.markdown;
|
|
735
|
-
if (markdownSpec || defaultMarkdownSpec) {
|
|
736
|
-
return {
|
|
737
|
-
...defaultMarkdownSpec,
|
|
738
|
-
...markdownSpec
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
return null;
|
|
742
|
-
}
|
|
743
|
-
class MarkdownSerializer {
|
|
744
|
-
constructor(editor) {
|
|
745
|
-
/**
|
|
746
|
-
* @type {import('@tiptap/core').Editor}
|
|
747
|
-
*/
|
|
748
|
-
__publicField(this, "editor", null);
|
|
749
|
-
this.editor = editor;
|
|
750
|
-
}
|
|
751
|
-
serialize(content) {
|
|
752
|
-
const state = new MarkdownSerializerState(this.nodes, this.marks, {
|
|
753
|
-
hardBreakNodeName: HardBreak$1.name
|
|
754
|
-
});
|
|
755
|
-
state.renderContent(content);
|
|
756
|
-
return state.out;
|
|
757
|
-
}
|
|
758
|
-
get nodes() {
|
|
759
|
-
var _this$editor$extensio;
|
|
760
|
-
return {
|
|
761
|
-
...Object.fromEntries(Object.keys(this.editor.schema.nodes).map((name) => [name, this.serializeNode(HTMLNode)])),
|
|
762
|
-
...Object.fromEntries((_this$editor$extensio = this.editor.extensionManager.extensions.filter((extension) => extension.type === "node" && this.serializeNode(extension)).map((extension) => [extension.name, this.serializeNode(extension)])) !== null && _this$editor$extensio !== void 0 ? _this$editor$extensio : [])
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
get marks() {
|
|
766
|
-
var _this$editor$extensio2;
|
|
767
|
-
return {
|
|
768
|
-
...Object.fromEntries(Object.keys(this.editor.schema.marks).map((name) => [name, this.serializeMark(HTMLMark)])),
|
|
769
|
-
...Object.fromEntries((_this$editor$extensio2 = this.editor.extensionManager.extensions.filter((extension) => extension.type === "mark" && this.serializeMark(extension)).map((extension) => [extension.name, this.serializeMark(extension)])) !== null && _this$editor$extensio2 !== void 0 ? _this$editor$extensio2 : [])
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
serializeNode(node) {
|
|
773
|
-
var _getMarkdownSpec;
|
|
774
|
-
return (_getMarkdownSpec = getMarkdownSpec(node)) === null || _getMarkdownSpec === void 0 || (_getMarkdownSpec = _getMarkdownSpec.serialize) === null || _getMarkdownSpec === void 0 ? void 0 : _getMarkdownSpec.bind({
|
|
775
|
-
editor: this.editor,
|
|
776
|
-
options: node.options
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
serializeMark(mark) {
|
|
780
|
-
var _getMarkdownSpec2;
|
|
781
|
-
const serialize = (_getMarkdownSpec2 = getMarkdownSpec(mark)) === null || _getMarkdownSpec2 === void 0 ? void 0 : _getMarkdownSpec2.serialize;
|
|
782
|
-
return serialize ? {
|
|
783
|
-
...serialize,
|
|
784
|
-
open: typeof serialize.open === "function" ? serialize.open.bind({
|
|
785
|
-
editor: this.editor,
|
|
786
|
-
options: mark.options
|
|
787
|
-
}) : serialize.open,
|
|
788
|
-
close: typeof serialize.close === "function" ? serialize.close.bind({
|
|
789
|
-
editor: this.editor,
|
|
790
|
-
options: mark.options
|
|
791
|
-
}) : serialize.close
|
|
792
|
-
} : null;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
class MarkdownParser {
|
|
796
|
-
constructor(editor, _ref) {
|
|
797
|
-
/**
|
|
798
|
-
* @type {import('@tiptap/core').Editor}
|
|
799
|
-
*/
|
|
800
|
-
__publicField(this, "editor", null);
|
|
801
|
-
/**
|
|
802
|
-
* @type {markdownit}
|
|
803
|
-
*/
|
|
804
|
-
__publicField(this, "md", null);
|
|
805
|
-
let {
|
|
806
|
-
html,
|
|
807
|
-
linkify,
|
|
808
|
-
breaks
|
|
809
|
-
} = _ref;
|
|
810
|
-
this.editor = editor;
|
|
811
|
-
this.md = this.withPatchedRenderer(MarkdownIt({
|
|
812
|
-
html,
|
|
813
|
-
linkify,
|
|
814
|
-
breaks
|
|
815
|
-
}));
|
|
816
|
-
}
|
|
817
|
-
parse(content) {
|
|
818
|
-
let {
|
|
819
|
-
inline
|
|
820
|
-
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
821
|
-
if (typeof content === "string") {
|
|
822
|
-
this.editor.extensionManager.extensions.forEach((extension) => {
|
|
823
|
-
var _getMarkdownSpec;
|
|
824
|
-
return (_getMarkdownSpec = getMarkdownSpec(extension)) === null || _getMarkdownSpec === void 0 || (_getMarkdownSpec = _getMarkdownSpec.parse) === null || _getMarkdownSpec === void 0 || (_getMarkdownSpec = _getMarkdownSpec.setup) === null || _getMarkdownSpec === void 0 ? void 0 : _getMarkdownSpec.call({
|
|
825
|
-
editor: this.editor,
|
|
826
|
-
options: extension.options
|
|
827
|
-
}, this.md);
|
|
828
|
-
});
|
|
829
|
-
const renderedHTML = this.md.render(content);
|
|
830
|
-
const element = elementFromString(renderedHTML);
|
|
831
|
-
this.editor.extensionManager.extensions.forEach((extension) => {
|
|
832
|
-
var _getMarkdownSpec2;
|
|
833
|
-
return (_getMarkdownSpec2 = getMarkdownSpec(extension)) === null || _getMarkdownSpec2 === void 0 || (_getMarkdownSpec2 = _getMarkdownSpec2.parse) === null || _getMarkdownSpec2 === void 0 || (_getMarkdownSpec2 = _getMarkdownSpec2.updateDOM) === null || _getMarkdownSpec2 === void 0 ? void 0 : _getMarkdownSpec2.call({
|
|
834
|
-
editor: this.editor,
|
|
835
|
-
options: extension.options
|
|
836
|
-
}, element);
|
|
837
|
-
});
|
|
838
|
-
this.normalizeDOM(element, {
|
|
839
|
-
inline,
|
|
840
|
-
content
|
|
841
|
-
});
|
|
842
|
-
return element.innerHTML;
|
|
843
|
-
}
|
|
844
|
-
return content;
|
|
845
|
-
}
|
|
846
|
-
normalizeDOM(node, _ref2) {
|
|
847
|
-
let {
|
|
848
|
-
inline,
|
|
849
|
-
content
|
|
850
|
-
} = _ref2;
|
|
851
|
-
this.normalizeBlocks(node);
|
|
852
|
-
node.querySelectorAll("*").forEach((el) => {
|
|
853
|
-
var _el$nextSibling;
|
|
854
|
-
if (((_el$nextSibling = el.nextSibling) === null || _el$nextSibling === void 0 ? void 0 : _el$nextSibling.nodeType) === Node.TEXT_NODE && !el.closest("pre")) {
|
|
855
|
-
el.nextSibling.textContent = el.nextSibling.textContent.replace(/^\n/, "");
|
|
856
|
-
}
|
|
857
|
-
});
|
|
858
|
-
if (inline) {
|
|
859
|
-
this.normalizeInline(node, content);
|
|
860
|
-
}
|
|
861
|
-
return node;
|
|
862
|
-
}
|
|
863
|
-
normalizeBlocks(node) {
|
|
864
|
-
const blocks = Object.values(this.editor.schema.nodes).filter((node2) => node2.isBlock);
|
|
865
|
-
const selector = blocks.map((block) => {
|
|
866
|
-
var _block$spec$parseDOM;
|
|
867
|
-
return (_block$spec$parseDOM = block.spec.parseDOM) === null || _block$spec$parseDOM === void 0 ? void 0 : _block$spec$parseDOM.map((spec) => spec.tag);
|
|
868
|
-
}).flat().filter(Boolean).join(",");
|
|
869
|
-
if (!selector) {
|
|
870
|
-
return;
|
|
871
|
-
}
|
|
872
|
-
[...node.querySelectorAll(selector)].forEach((el) => {
|
|
873
|
-
if (el.parentElement.matches("p")) {
|
|
874
|
-
extractElement(el);
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
normalizeInline(node, content) {
|
|
879
|
-
var _node$firstElementChi;
|
|
880
|
-
if ((_node$firstElementChi = node.firstElementChild) !== null && _node$firstElementChi !== void 0 && _node$firstElementChi.matches("p")) {
|
|
881
|
-
var _content$match$, _content$match, _content$match$2, _content$match2;
|
|
882
|
-
const firstParagraph = node.firstElementChild;
|
|
883
|
-
const {
|
|
884
|
-
nextElementSibling
|
|
885
|
-
} = firstParagraph;
|
|
886
|
-
const startSpaces = (_content$match$ = (_content$match = content.match(/^\s+/)) === null || _content$match === void 0 ? void 0 : _content$match[0]) !== null && _content$match$ !== void 0 ? _content$match$ : "";
|
|
887
|
-
const endSpaces = !nextElementSibling ? (_content$match$2 = (_content$match2 = content.match(/\s+$/)) === null || _content$match2 === void 0 ? void 0 : _content$match2[0]) !== null && _content$match$2 !== void 0 ? _content$match$2 : "" : "";
|
|
888
|
-
if (content.match(/^\n\n/)) {
|
|
889
|
-
firstParagraph.innerHTML = `${firstParagraph.innerHTML}${endSpaces}`;
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
unwrapElement(firstParagraph);
|
|
893
|
-
node.innerHTML = `${startSpaces}${node.innerHTML}${endSpaces}`;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* @param {markdownit} md
|
|
898
|
-
*/
|
|
899
|
-
withPatchedRenderer(md2) {
|
|
900
|
-
const withoutNewLine = (renderer) => function() {
|
|
901
|
-
const rendered = renderer(...arguments);
|
|
902
|
-
if (rendered === "\n") {
|
|
903
|
-
return rendered;
|
|
904
|
-
}
|
|
905
|
-
if (rendered[rendered.length - 1] === "\n") {
|
|
906
|
-
return rendered.slice(0, -1);
|
|
907
|
-
}
|
|
908
|
-
return rendered;
|
|
909
|
-
};
|
|
910
|
-
md2.renderer.rules.hardbreak = withoutNewLine(md2.renderer.rules.hardbreak);
|
|
911
|
-
md2.renderer.rules.softbreak = withoutNewLine(md2.renderer.rules.softbreak);
|
|
912
|
-
md2.renderer.rules.fence = withoutNewLine(md2.renderer.rules.fence);
|
|
913
|
-
md2.renderer.rules.code_block = withoutNewLine(md2.renderer.rules.code_block);
|
|
914
|
-
md2.renderer.renderToken = withoutNewLine(md2.renderer.renderToken.bind(md2.renderer));
|
|
915
|
-
return md2;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
const MarkdownClipboard = Extension.create({
|
|
919
|
-
name: "markdownClipboard",
|
|
920
|
-
addOptions() {
|
|
921
|
-
return {
|
|
922
|
-
transformPastedText: false,
|
|
923
|
-
transformCopiedText: false
|
|
924
|
-
};
|
|
925
|
-
},
|
|
926
|
-
addProseMirrorPlugins() {
|
|
927
|
-
return [new Plugin({
|
|
928
|
-
key: new PluginKey("markdownClipboard"),
|
|
929
|
-
props: {
|
|
930
|
-
clipboardTextParser: (text, context, plainText) => {
|
|
931
|
-
if (plainText || !this.options.transformPastedText) {
|
|
932
|
-
return null;
|
|
933
|
-
}
|
|
934
|
-
const parsed = this.editor.storage.markdown.parser.parse(text, {
|
|
935
|
-
inline: true
|
|
936
|
-
});
|
|
937
|
-
return DOMParser.fromSchema(this.editor.schema).parseSlice(elementFromString(parsed), {
|
|
938
|
-
preserveWhitespace: true,
|
|
939
|
-
context
|
|
940
|
-
});
|
|
941
|
-
},
|
|
942
|
-
/**
|
|
943
|
-
* @param {import('prosemirror-model').Slice} slice
|
|
944
|
-
*/
|
|
945
|
-
clipboardTextSerializer: (slice) => {
|
|
946
|
-
if (!this.options.transformCopiedText) {
|
|
947
|
-
return null;
|
|
948
|
-
}
|
|
949
|
-
return this.editor.storage.markdown.serializer.serialize(slice.content);
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
})];
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
const Markdown = Extension.create({
|
|
956
|
-
name: "markdown",
|
|
957
|
-
priority: 50,
|
|
958
|
-
addOptions() {
|
|
959
|
-
return {
|
|
960
|
-
html: true,
|
|
961
|
-
tightLists: true,
|
|
962
|
-
tightListClass: "tight",
|
|
963
|
-
bulletListMarker: "-",
|
|
964
|
-
linkify: false,
|
|
965
|
-
breaks: false,
|
|
966
|
-
transformPastedText: false,
|
|
967
|
-
transformCopiedText: false
|
|
968
|
-
};
|
|
969
|
-
},
|
|
970
|
-
addCommands() {
|
|
971
|
-
const commands = index.Commands.config.addCommands();
|
|
972
|
-
return {
|
|
973
|
-
setContent: (content, emitUpdate, parseOptions) => (props) => {
|
|
974
|
-
return commands.setContent(props.editor.storage.markdown.parser.parse(content), emitUpdate, parseOptions)(props);
|
|
975
|
-
},
|
|
976
|
-
insertContentAt: (range, content, options) => (props) => {
|
|
977
|
-
return commands.insertContentAt(range, props.editor.storage.markdown.parser.parse(content, {
|
|
978
|
-
inline: true
|
|
979
|
-
}), options)(props);
|
|
980
|
-
}
|
|
981
|
-
};
|
|
982
|
-
},
|
|
983
|
-
onBeforeCreate() {
|
|
984
|
-
this.editor.storage.markdown = {
|
|
985
|
-
options: {
|
|
986
|
-
...this.options
|
|
987
|
-
},
|
|
988
|
-
parser: new MarkdownParser(this.editor, this.options),
|
|
989
|
-
serializer: new MarkdownSerializer(this.editor),
|
|
990
|
-
getMarkdown: () => {
|
|
991
|
-
return this.editor.storage.markdown.serializer.serialize(this.editor.state.doc);
|
|
992
|
-
}
|
|
993
|
-
};
|
|
994
|
-
this.editor.options.initialContent = this.editor.options.content;
|
|
995
|
-
this.editor.options.content = this.editor.storage.markdown.parser.parse(this.editor.options.content);
|
|
996
|
-
},
|
|
997
|
-
onCreate() {
|
|
998
|
-
this.editor.options.content = this.editor.options.initialContent;
|
|
999
|
-
delete this.editor.options.initialContent;
|
|
1000
|
-
},
|
|
1001
|
-
addStorage() {
|
|
1002
|
-
return {
|
|
1003
|
-
/// storage will be defined in onBeforeCreate() to prevent initial object overriding
|
|
1004
|
-
};
|
|
1005
|
-
},
|
|
1006
|
-
addExtensions() {
|
|
1007
|
-
return [MarkdownTightLists.configure({
|
|
1008
|
-
tight: this.options.tightLists,
|
|
1009
|
-
tightClass: this.options.tightListClass
|
|
1010
|
-
}), MarkdownClipboard.configure({
|
|
1011
|
-
transformPastedText: this.options.transformPastedText,
|
|
1012
|
-
transformCopiedText: this.options.transformCopiedText
|
|
1013
|
-
})];
|
|
1014
|
-
}
|
|
1015
|
-
});
|
|
1016
|
-
|
|
1017
|
-
export { Markdown as M };
|