@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,866 +0,0 @@
|
|
|
1
|
-
import { a as Schema, M as Mark } from './vendor-prosemirror-model-BZu3WVcD.js';
|
|
2
|
-
import { M as MarkdownIt } from './vendor-markdown-it-D-apazHa.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
Document schema for the data model used by CommonMark.
|
|
6
|
-
*/
|
|
7
|
-
const schema = new Schema({
|
|
8
|
-
nodes: {
|
|
9
|
-
doc: {
|
|
10
|
-
content: "block+"
|
|
11
|
-
},
|
|
12
|
-
paragraph: {
|
|
13
|
-
content: "inline*",
|
|
14
|
-
group: "block",
|
|
15
|
-
parseDOM: [{ tag: "p" }],
|
|
16
|
-
toDOM() { return ["p", 0]; }
|
|
17
|
-
},
|
|
18
|
-
blockquote: {
|
|
19
|
-
content: "block+",
|
|
20
|
-
group: "block",
|
|
21
|
-
parseDOM: [{ tag: "blockquote" }],
|
|
22
|
-
toDOM() { return ["blockquote", 0]; }
|
|
23
|
-
},
|
|
24
|
-
horizontal_rule: {
|
|
25
|
-
group: "block",
|
|
26
|
-
parseDOM: [{ tag: "hr" }],
|
|
27
|
-
toDOM() { return ["div", ["hr"]]; }
|
|
28
|
-
},
|
|
29
|
-
heading: {
|
|
30
|
-
attrs: { level: { default: 1 } },
|
|
31
|
-
content: "(text | image)*",
|
|
32
|
-
group: "block",
|
|
33
|
-
defining: true,
|
|
34
|
-
parseDOM: [{ tag: "h1", attrs: { level: 1 } },
|
|
35
|
-
{ tag: "h2", attrs: { level: 2 } },
|
|
36
|
-
{ tag: "h3", attrs: { level: 3 } },
|
|
37
|
-
{ tag: "h4", attrs: { level: 4 } },
|
|
38
|
-
{ tag: "h5", attrs: { level: 5 } },
|
|
39
|
-
{ tag: "h6", attrs: { level: 6 } }],
|
|
40
|
-
toDOM(node) { return ["h" + node.attrs.level, 0]; }
|
|
41
|
-
},
|
|
42
|
-
code_block: {
|
|
43
|
-
content: "text*",
|
|
44
|
-
group: "block",
|
|
45
|
-
code: true,
|
|
46
|
-
defining: true,
|
|
47
|
-
marks: "",
|
|
48
|
-
attrs: { params: { default: "" } },
|
|
49
|
-
parseDOM: [{ tag: "pre", preserveWhitespace: "full", getAttrs: node => ({ params: node.getAttribute("data-params") || "" }) }],
|
|
50
|
-
toDOM(node) { return ["pre", node.attrs.params ? { "data-params": node.attrs.params } : {}, ["code", 0]]; }
|
|
51
|
-
},
|
|
52
|
-
ordered_list: {
|
|
53
|
-
content: "list_item+",
|
|
54
|
-
group: "block",
|
|
55
|
-
attrs: { order: { default: 1 }, tight: { default: false } },
|
|
56
|
-
parseDOM: [{ tag: "ol", getAttrs(dom) {
|
|
57
|
-
return { order: dom.hasAttribute("start") ? +dom.getAttribute("start") : 1,
|
|
58
|
-
tight: dom.hasAttribute("data-tight") };
|
|
59
|
-
} }],
|
|
60
|
-
toDOM(node) {
|
|
61
|
-
return ["ol", { start: node.attrs.order == 1 ? null : node.attrs.order,
|
|
62
|
-
"data-tight": node.attrs.tight ? "true" : null }, 0];
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
bullet_list: {
|
|
66
|
-
content: "list_item+",
|
|
67
|
-
group: "block",
|
|
68
|
-
attrs: { tight: { default: false } },
|
|
69
|
-
parseDOM: [{ tag: "ul", getAttrs: dom => ({ tight: dom.hasAttribute("data-tight") }) }],
|
|
70
|
-
toDOM(node) { return ["ul", { "data-tight": node.attrs.tight ? "true" : null }, 0]; }
|
|
71
|
-
},
|
|
72
|
-
list_item: {
|
|
73
|
-
content: "block+",
|
|
74
|
-
defining: true,
|
|
75
|
-
parseDOM: [{ tag: "li" }],
|
|
76
|
-
toDOM() { return ["li", 0]; }
|
|
77
|
-
},
|
|
78
|
-
text: {
|
|
79
|
-
group: "inline"
|
|
80
|
-
},
|
|
81
|
-
image: {
|
|
82
|
-
inline: true,
|
|
83
|
-
attrs: {
|
|
84
|
-
src: {},
|
|
85
|
-
alt: { default: null },
|
|
86
|
-
title: { default: null }
|
|
87
|
-
},
|
|
88
|
-
group: "inline",
|
|
89
|
-
draggable: true,
|
|
90
|
-
parseDOM: [{ tag: "img[src]", getAttrs(dom) {
|
|
91
|
-
return {
|
|
92
|
-
src: dom.getAttribute("src"),
|
|
93
|
-
title: dom.getAttribute("title"),
|
|
94
|
-
alt: dom.getAttribute("alt")
|
|
95
|
-
};
|
|
96
|
-
} }],
|
|
97
|
-
toDOM(node) { return ["img", node.attrs]; }
|
|
98
|
-
},
|
|
99
|
-
hard_break: {
|
|
100
|
-
inline: true,
|
|
101
|
-
group: "inline",
|
|
102
|
-
selectable: false,
|
|
103
|
-
parseDOM: [{ tag: "br" }],
|
|
104
|
-
toDOM() { return ["br"]; }
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
marks: {
|
|
108
|
-
em: {
|
|
109
|
-
parseDOM: [
|
|
110
|
-
{ tag: "i" }, { tag: "em" },
|
|
111
|
-
{ style: "font-style=italic" },
|
|
112
|
-
{ style: "font-style=normal", clearMark: m => m.type.name == "em" }
|
|
113
|
-
],
|
|
114
|
-
toDOM() { return ["em"]; }
|
|
115
|
-
},
|
|
116
|
-
strong: {
|
|
117
|
-
parseDOM: [
|
|
118
|
-
{ tag: "strong" },
|
|
119
|
-
{ tag: "b", getAttrs: node => node.style.fontWeight != "normal" && null },
|
|
120
|
-
{ style: "font-weight=400", clearMark: m => m.type.name == "strong" },
|
|
121
|
-
{ style: "font-weight", getAttrs: value => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null }
|
|
122
|
-
],
|
|
123
|
-
toDOM() { return ["strong"]; }
|
|
124
|
-
},
|
|
125
|
-
link: {
|
|
126
|
-
attrs: {
|
|
127
|
-
href: {},
|
|
128
|
-
title: { default: null }
|
|
129
|
-
},
|
|
130
|
-
inclusive: false,
|
|
131
|
-
parseDOM: [{ tag: "a[href]", getAttrs(dom) {
|
|
132
|
-
return { href: dom.getAttribute("href"), title: dom.getAttribute("title") };
|
|
133
|
-
} }],
|
|
134
|
-
toDOM(node) { return ["a", node.attrs]; }
|
|
135
|
-
},
|
|
136
|
-
code: {
|
|
137
|
-
code: true,
|
|
138
|
-
parseDOM: [{ tag: "code" }],
|
|
139
|
-
toDOM() { return ["code"]; }
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// @ts-ignore
|
|
145
|
-
function maybeMerge(a, b) {
|
|
146
|
-
if (a.isText && b.isText && Mark.sameSet(a.marks, b.marks))
|
|
147
|
-
return a.withText(a.text + b.text);
|
|
148
|
-
}
|
|
149
|
-
// Object used to track the context of a running parse.
|
|
150
|
-
class MarkdownParseState {
|
|
151
|
-
constructor(schema, tokenHandlers) {
|
|
152
|
-
this.schema = schema;
|
|
153
|
-
this.tokenHandlers = tokenHandlers;
|
|
154
|
-
this.stack = [{ type: schema.topNodeType, attrs: null, content: [], marks: Mark.none }];
|
|
155
|
-
}
|
|
156
|
-
top() {
|
|
157
|
-
return this.stack[this.stack.length - 1];
|
|
158
|
-
}
|
|
159
|
-
push(elt) {
|
|
160
|
-
if (this.stack.length)
|
|
161
|
-
this.top().content.push(elt);
|
|
162
|
-
}
|
|
163
|
-
// Adds the given text to the current position in the document,
|
|
164
|
-
// using the current marks as styling.
|
|
165
|
-
addText(text) {
|
|
166
|
-
if (!text)
|
|
167
|
-
return;
|
|
168
|
-
let top = this.top(), nodes = top.content, last = nodes[nodes.length - 1];
|
|
169
|
-
let node = this.schema.text(text, top.marks), merged;
|
|
170
|
-
if (last && (merged = maybeMerge(last, node)))
|
|
171
|
-
nodes[nodes.length - 1] = merged;
|
|
172
|
-
else
|
|
173
|
-
nodes.push(node);
|
|
174
|
-
}
|
|
175
|
-
// Adds the given mark to the set of active marks.
|
|
176
|
-
openMark(mark) {
|
|
177
|
-
let top = this.top();
|
|
178
|
-
top.marks = mark.addToSet(top.marks);
|
|
179
|
-
}
|
|
180
|
-
// Removes the given mark from the set of active marks.
|
|
181
|
-
closeMark(mark) {
|
|
182
|
-
let top = this.top();
|
|
183
|
-
top.marks = mark.removeFromSet(top.marks);
|
|
184
|
-
}
|
|
185
|
-
parseTokens(toks) {
|
|
186
|
-
for (let i = 0; i < toks.length; i++) {
|
|
187
|
-
let tok = toks[i];
|
|
188
|
-
let handler = this.tokenHandlers[tok.type];
|
|
189
|
-
if (!handler)
|
|
190
|
-
throw new Error("Token type `" + tok.type + "` not supported by Markdown parser");
|
|
191
|
-
handler(this, tok, toks, i);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
// Add a node at the current position.
|
|
195
|
-
addNode(type, attrs, content) {
|
|
196
|
-
let top = this.top();
|
|
197
|
-
let node = type.createAndFill(attrs, content, top ? top.marks : []);
|
|
198
|
-
if (!node)
|
|
199
|
-
return null;
|
|
200
|
-
this.push(node);
|
|
201
|
-
return node;
|
|
202
|
-
}
|
|
203
|
-
// Wrap subsequent content in a node of the given type.
|
|
204
|
-
openNode(type, attrs) {
|
|
205
|
-
this.stack.push({ type: type, attrs: attrs, content: [], marks: Mark.none });
|
|
206
|
-
}
|
|
207
|
-
// Close and return the node that is currently on top of the stack.
|
|
208
|
-
closeNode() {
|
|
209
|
-
let info = this.stack.pop();
|
|
210
|
-
return this.addNode(info.type, info.attrs, info.content);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
function attrs(spec, token, tokens, i) {
|
|
214
|
-
if (spec.getAttrs)
|
|
215
|
-
return spec.getAttrs(token, tokens, i);
|
|
216
|
-
// For backwards compatibility when `attrs` is a Function
|
|
217
|
-
else if (spec.attrs instanceof Function)
|
|
218
|
-
return spec.attrs(token);
|
|
219
|
-
else
|
|
220
|
-
return spec.attrs;
|
|
221
|
-
}
|
|
222
|
-
// Code content is represented as a single token with a `content`
|
|
223
|
-
// property in Markdown-it.
|
|
224
|
-
function noCloseToken(spec, type) {
|
|
225
|
-
return spec.noCloseToken || type == "code_inline" || type == "code_block" || type == "fence";
|
|
226
|
-
}
|
|
227
|
-
function withoutTrailingNewline(str) {
|
|
228
|
-
return str[str.length - 1] == "\n" ? str.slice(0, str.length - 1) : str;
|
|
229
|
-
}
|
|
230
|
-
function noOp() { }
|
|
231
|
-
function tokenHandlers(schema, tokens) {
|
|
232
|
-
let handlers = Object.create(null);
|
|
233
|
-
for (let type in tokens) {
|
|
234
|
-
let spec = tokens[type];
|
|
235
|
-
if (spec.block) {
|
|
236
|
-
let nodeType = schema.nodeType(spec.block);
|
|
237
|
-
if (noCloseToken(spec, type)) {
|
|
238
|
-
handlers[type] = (state, tok, tokens, i) => {
|
|
239
|
-
state.openNode(nodeType, attrs(spec, tok, tokens, i));
|
|
240
|
-
state.addText(withoutTrailingNewline(tok.content));
|
|
241
|
-
state.closeNode();
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
handlers[type + "_open"] = (state, tok, tokens, i) => state.openNode(nodeType, attrs(spec, tok, tokens, i));
|
|
246
|
-
handlers[type + "_close"] = state => state.closeNode();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
else if (spec.node) {
|
|
250
|
-
let nodeType = schema.nodeType(spec.node);
|
|
251
|
-
handlers[type] = (state, tok, tokens, i) => state.addNode(nodeType, attrs(spec, tok, tokens, i));
|
|
252
|
-
}
|
|
253
|
-
else if (spec.mark) {
|
|
254
|
-
let markType = schema.marks[spec.mark];
|
|
255
|
-
if (noCloseToken(spec, type)) {
|
|
256
|
-
handlers[type] = (state, tok, tokens, i) => {
|
|
257
|
-
state.openMark(markType.create(attrs(spec, tok, tokens, i)));
|
|
258
|
-
state.addText(withoutTrailingNewline(tok.content));
|
|
259
|
-
state.closeMark(markType);
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
handlers[type + "_open"] = (state, tok, tokens, i) => state.openMark(markType.create(attrs(spec, tok, tokens, i)));
|
|
264
|
-
handlers[type + "_close"] = state => state.closeMark(markType);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
else if (spec.ignore) {
|
|
268
|
-
if (noCloseToken(spec, type)) {
|
|
269
|
-
handlers[type] = noOp;
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
handlers[type + "_open"] = noOp;
|
|
273
|
-
handlers[type + "_close"] = noOp;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
throw new RangeError("Unrecognized parsing spec " + JSON.stringify(spec));
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
handlers.text = (state, tok) => state.addText(tok.content);
|
|
281
|
-
handlers.inline = (state, tok) => state.parseTokens(tok.children);
|
|
282
|
-
handlers.softbreak = handlers.softbreak || (state => state.addText(" "));
|
|
283
|
-
return handlers;
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
A configuration of a Markdown parser. Such a parser uses
|
|
287
|
-
[markdown-it](https://github.com/markdown-it/markdown-it) to
|
|
288
|
-
tokenize a file, and then runs the custom rules it is given over
|
|
289
|
-
the tokens to create a ProseMirror document tree.
|
|
290
|
-
*/
|
|
291
|
-
class MarkdownParser {
|
|
292
|
-
/**
|
|
293
|
-
Create a parser with the given configuration. You can configure
|
|
294
|
-
the markdown-it parser to parse the dialect you want, and provide
|
|
295
|
-
a description of the ProseMirror entities those tokens map to in
|
|
296
|
-
the `tokens` object, which maps token names to descriptions of
|
|
297
|
-
what to do with them. Such a description is an object, and may
|
|
298
|
-
have the following properties:
|
|
299
|
-
*/
|
|
300
|
-
constructor(
|
|
301
|
-
/**
|
|
302
|
-
The parser's document schema.
|
|
303
|
-
*/
|
|
304
|
-
schema,
|
|
305
|
-
/**
|
|
306
|
-
This parser's markdown-it tokenizer.
|
|
307
|
-
*/
|
|
308
|
-
tokenizer,
|
|
309
|
-
/**
|
|
310
|
-
The value of the `tokens` object used to construct this
|
|
311
|
-
parser. Can be useful to copy and modify to base other parsers
|
|
312
|
-
on.
|
|
313
|
-
*/
|
|
314
|
-
tokens) {
|
|
315
|
-
this.schema = schema;
|
|
316
|
-
this.tokenizer = tokenizer;
|
|
317
|
-
this.tokens = tokens;
|
|
318
|
-
this.tokenHandlers = tokenHandlers(schema, tokens);
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
Parse a string as [CommonMark](http://commonmark.org/) markup,
|
|
322
|
-
and create a ProseMirror document as prescribed by this parser's
|
|
323
|
-
rules.
|
|
324
|
-
|
|
325
|
-
The second argument, when given, is passed through to the
|
|
326
|
-
[Markdown
|
|
327
|
-
parser](https://markdown-it.github.io/markdown-it/#MarkdownIt.parse).
|
|
328
|
-
*/
|
|
329
|
-
parse(text, markdownEnv = {}) {
|
|
330
|
-
let state = new MarkdownParseState(this.schema, this.tokenHandlers), doc;
|
|
331
|
-
state.parseTokens(this.tokenizer.parse(text, markdownEnv));
|
|
332
|
-
do {
|
|
333
|
-
doc = state.closeNode();
|
|
334
|
-
} while (state.stack.length);
|
|
335
|
-
return doc || this.schema.topNodeType.createAndFill();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function listIsTight(tokens, i) {
|
|
339
|
-
while (++i < tokens.length)
|
|
340
|
-
if (tokens[i].type != "list_item_open")
|
|
341
|
-
return tokens[i].hidden;
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
A parser parsing unextended [CommonMark](http://commonmark.org/),
|
|
346
|
-
without inline HTML, and producing a document in the basic schema.
|
|
347
|
-
*/
|
|
348
|
-
new MarkdownParser(schema, MarkdownIt("commonmark", { html: false }), {
|
|
349
|
-
blockquote: { block: "blockquote" },
|
|
350
|
-
paragraph: { block: "paragraph" },
|
|
351
|
-
list_item: { block: "list_item" },
|
|
352
|
-
bullet_list: { block: "bullet_list", getAttrs: (_, tokens, i) => ({ tight: listIsTight(tokens, i) }) },
|
|
353
|
-
ordered_list: { block: "ordered_list", getAttrs: (tok, tokens, i) => ({
|
|
354
|
-
order: +tok.attrGet("start") || 1,
|
|
355
|
-
tight: listIsTight(tokens, i)
|
|
356
|
-
}) },
|
|
357
|
-
heading: { block: "heading", getAttrs: tok => ({ level: +tok.tag.slice(1) }) },
|
|
358
|
-
code_block: { block: "code_block", noCloseToken: true },
|
|
359
|
-
fence: { block: "code_block", getAttrs: tok => ({ params: tok.info || "" }), noCloseToken: true },
|
|
360
|
-
hr: { node: "horizontal_rule" },
|
|
361
|
-
image: { node: "image", getAttrs: tok => ({
|
|
362
|
-
src: tok.attrGet("src"),
|
|
363
|
-
title: tok.attrGet("title") || null,
|
|
364
|
-
alt: tok.children[0] && tok.children[0].content || null
|
|
365
|
-
}) },
|
|
366
|
-
hardbreak: { node: "hard_break" },
|
|
367
|
-
em: { mark: "em" },
|
|
368
|
-
strong: { mark: "strong" },
|
|
369
|
-
link: { mark: "link", getAttrs: tok => ({
|
|
370
|
-
href: tok.attrGet("href"),
|
|
371
|
-
title: tok.attrGet("title") || null
|
|
372
|
-
}) },
|
|
373
|
-
code_inline: { mark: "code", noCloseToken: true }
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
const blankMark = { open: "", close: "", mixable: true };
|
|
377
|
-
/**
|
|
378
|
-
A specification for serializing a ProseMirror document as
|
|
379
|
-
Markdown/CommonMark text.
|
|
380
|
-
*/
|
|
381
|
-
class MarkdownSerializer {
|
|
382
|
-
/**
|
|
383
|
-
Construct a serializer with the given configuration. The `nodes`
|
|
384
|
-
object should map node names in a given schema to function that
|
|
385
|
-
take a serializer state and such a node, and serialize the node.
|
|
386
|
-
*/
|
|
387
|
-
constructor(
|
|
388
|
-
/**
|
|
389
|
-
The node serializer functions for this serializer.
|
|
390
|
-
*/
|
|
391
|
-
nodes,
|
|
392
|
-
/**
|
|
393
|
-
The mark serializer info.
|
|
394
|
-
*/
|
|
395
|
-
marks, options = {}) {
|
|
396
|
-
this.nodes = nodes;
|
|
397
|
-
this.marks = marks;
|
|
398
|
-
this.options = options;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
Serialize the content of the given node to
|
|
402
|
-
[CommonMark](http://commonmark.org/).
|
|
403
|
-
*/
|
|
404
|
-
serialize(content, options = {}) {
|
|
405
|
-
options = Object.assign({}, this.options, options);
|
|
406
|
-
let state = new MarkdownSerializerState$1(this.nodes, this.marks, options);
|
|
407
|
-
state.renderContent(content);
|
|
408
|
-
return state.out;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
A serializer for the [basic schema](https://prosemirror.net/docs/ref/#schema).
|
|
413
|
-
*/
|
|
414
|
-
const defaultMarkdownSerializer = new MarkdownSerializer({
|
|
415
|
-
blockquote(state, node) {
|
|
416
|
-
state.wrapBlock("> ", null, node, () => state.renderContent(node));
|
|
417
|
-
},
|
|
418
|
-
code_block(state, node) {
|
|
419
|
-
// Make sure the front matter fences are longer than any dash sequence within it
|
|
420
|
-
const backticks = node.textContent.match(/`{3,}/gm);
|
|
421
|
-
const fence = backticks ? (backticks.sort().slice(-1)[0] + "`") : "```";
|
|
422
|
-
state.write(fence + (node.attrs.params || "") + "\n");
|
|
423
|
-
state.text(node.textContent, false);
|
|
424
|
-
// Add a newline to the current content before adding closing marker
|
|
425
|
-
state.write("\n");
|
|
426
|
-
state.write(fence);
|
|
427
|
-
state.closeBlock(node);
|
|
428
|
-
},
|
|
429
|
-
heading(state, node) {
|
|
430
|
-
state.write(state.repeat("#", node.attrs.level) + " ");
|
|
431
|
-
state.renderInline(node, false);
|
|
432
|
-
state.closeBlock(node);
|
|
433
|
-
},
|
|
434
|
-
horizontal_rule(state, node) {
|
|
435
|
-
state.write(node.attrs.markup || "---");
|
|
436
|
-
state.closeBlock(node);
|
|
437
|
-
},
|
|
438
|
-
bullet_list(state, node) {
|
|
439
|
-
state.renderList(node, " ", () => (node.attrs.bullet || "*") + " ");
|
|
440
|
-
},
|
|
441
|
-
ordered_list(state, node) {
|
|
442
|
-
let start = node.attrs.order || 1;
|
|
443
|
-
let maxW = String(start + node.childCount - 1).length;
|
|
444
|
-
let space = state.repeat(" ", maxW + 2);
|
|
445
|
-
state.renderList(node, space, i => {
|
|
446
|
-
let nStr = String(start + i);
|
|
447
|
-
return state.repeat(" ", maxW - nStr.length) + nStr + ". ";
|
|
448
|
-
});
|
|
449
|
-
},
|
|
450
|
-
list_item(state, node) {
|
|
451
|
-
state.renderContent(node);
|
|
452
|
-
},
|
|
453
|
-
paragraph(state, node) {
|
|
454
|
-
state.renderInline(node);
|
|
455
|
-
state.closeBlock(node);
|
|
456
|
-
},
|
|
457
|
-
image(state, node) {
|
|
458
|
-
state.write("]/g, "\\$&") +
|
|
459
|
-
(node.attrs.title ? ' "' + node.attrs.title.replace(/"/g, '\\"') + '"' : "") + ")");
|
|
460
|
-
},
|
|
461
|
-
hard_break(state, node, parent, index) {
|
|
462
|
-
for (let i = index + 1; i < parent.childCount; i++)
|
|
463
|
-
if (parent.child(i).type != node.type) {
|
|
464
|
-
state.write("\\\n");
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
text(state, node) {
|
|
469
|
-
state.text(node.text, !state.inAutolink);
|
|
470
|
-
}
|
|
471
|
-
}, {
|
|
472
|
-
em: { open: "*", close: "*", mixable: true, expelEnclosingWhitespace: true },
|
|
473
|
-
strong: { open: "**", close: "**", mixable: true, expelEnclosingWhitespace: true },
|
|
474
|
-
link: {
|
|
475
|
-
open(state, mark, parent, index) {
|
|
476
|
-
state.inAutolink = isPlainURL(mark, parent, index);
|
|
477
|
-
return state.inAutolink ? "<" : "[";
|
|
478
|
-
},
|
|
479
|
-
close(state, mark, parent, index) {
|
|
480
|
-
let { inAutolink } = state;
|
|
481
|
-
state.inAutolink = undefined;
|
|
482
|
-
return inAutolink ? ">"
|
|
483
|
-
: "](" + mark.attrs.href.replace(/[\(\)"]/g, "\\$&") + (mark.attrs.title ? ` "${mark.attrs.title.replace(/"/g, '\\"')}"` : "") + ")";
|
|
484
|
-
},
|
|
485
|
-
mixable: true
|
|
486
|
-
},
|
|
487
|
-
code: { open(_state, _mark, parent, index) { return backticksFor(parent.child(index), -1); },
|
|
488
|
-
close(_state, _mark, parent, index) { return backticksFor(parent.child(index - 1), 1); },
|
|
489
|
-
escape: false }
|
|
490
|
-
});
|
|
491
|
-
function backticksFor(node, side) {
|
|
492
|
-
let ticks = /`+/g, m, len = 0;
|
|
493
|
-
if (node.isText)
|
|
494
|
-
while (m = ticks.exec(node.text))
|
|
495
|
-
len = Math.max(len, m[0].length);
|
|
496
|
-
let result = len > 0 && side > 0 ? " `" : "`";
|
|
497
|
-
for (let i = 0; i < len; i++)
|
|
498
|
-
result += "`";
|
|
499
|
-
if (len > 0 && side < 0)
|
|
500
|
-
result += " ";
|
|
501
|
-
return result;
|
|
502
|
-
}
|
|
503
|
-
function isPlainURL(link, parent, index) {
|
|
504
|
-
if (link.attrs.title || !/^\w+:/.test(link.attrs.href))
|
|
505
|
-
return false;
|
|
506
|
-
let content = parent.child(index);
|
|
507
|
-
if (!content.isText || content.text != link.attrs.href || content.marks[content.marks.length - 1] != link)
|
|
508
|
-
return false;
|
|
509
|
-
return index == parent.childCount - 1 || !link.isInSet(parent.child(index + 1).marks);
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
This is an object used to track state and expose
|
|
513
|
-
methods related to markdown serialization. Instances are passed to
|
|
514
|
-
node and mark serialization methods (see `toMarkdown`).
|
|
515
|
-
*/
|
|
516
|
-
let MarkdownSerializerState$1 = class MarkdownSerializerState {
|
|
517
|
-
/**
|
|
518
|
-
@internal
|
|
519
|
-
*/
|
|
520
|
-
constructor(
|
|
521
|
-
/**
|
|
522
|
-
@internal
|
|
523
|
-
*/
|
|
524
|
-
nodes,
|
|
525
|
-
/**
|
|
526
|
-
@internal
|
|
527
|
-
*/
|
|
528
|
-
marks,
|
|
529
|
-
/**
|
|
530
|
-
The options passed to the serializer.
|
|
531
|
-
*/
|
|
532
|
-
options) {
|
|
533
|
-
this.nodes = nodes;
|
|
534
|
-
this.marks = marks;
|
|
535
|
-
this.options = options;
|
|
536
|
-
/**
|
|
537
|
-
@internal
|
|
538
|
-
*/
|
|
539
|
-
this.delim = "";
|
|
540
|
-
/**
|
|
541
|
-
@internal
|
|
542
|
-
*/
|
|
543
|
-
this.out = "";
|
|
544
|
-
/**
|
|
545
|
-
@internal
|
|
546
|
-
*/
|
|
547
|
-
this.closed = null;
|
|
548
|
-
/**
|
|
549
|
-
@internal
|
|
550
|
-
*/
|
|
551
|
-
this.inAutolink = undefined;
|
|
552
|
-
/**
|
|
553
|
-
@internal
|
|
554
|
-
*/
|
|
555
|
-
this.atBlockStart = false;
|
|
556
|
-
/**
|
|
557
|
-
@internal
|
|
558
|
-
*/
|
|
559
|
-
this.inTightList = false;
|
|
560
|
-
if (typeof this.options.tightLists == "undefined")
|
|
561
|
-
this.options.tightLists = false;
|
|
562
|
-
if (typeof this.options.hardBreakNodeName == "undefined")
|
|
563
|
-
this.options.hardBreakNodeName = "hard_break";
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
@internal
|
|
567
|
-
*/
|
|
568
|
-
flushClose(size = 2) {
|
|
569
|
-
if (this.closed) {
|
|
570
|
-
if (!this.atBlank())
|
|
571
|
-
this.out += "\n";
|
|
572
|
-
if (size > 1) {
|
|
573
|
-
let delimMin = this.delim;
|
|
574
|
-
let trim = /\s+$/.exec(delimMin);
|
|
575
|
-
if (trim)
|
|
576
|
-
delimMin = delimMin.slice(0, delimMin.length - trim[0].length);
|
|
577
|
-
for (let i = 1; i < size; i++)
|
|
578
|
-
this.out += delimMin + "\n";
|
|
579
|
-
}
|
|
580
|
-
this.closed = null;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
@internal
|
|
585
|
-
*/
|
|
586
|
-
getMark(name) {
|
|
587
|
-
let info = this.marks[name];
|
|
588
|
-
if (!info) {
|
|
589
|
-
if (this.options.strict !== false)
|
|
590
|
-
throw new Error(`Mark type \`${name}\` not supported by Markdown renderer`);
|
|
591
|
-
info = blankMark;
|
|
592
|
-
}
|
|
593
|
-
return info;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
Render a block, prefixing each line with `delim`, and the first
|
|
597
|
-
line in `firstDelim`. `node` should be the node that is closed at
|
|
598
|
-
the end of the block, and `f` is a function that renders the
|
|
599
|
-
content of the block.
|
|
600
|
-
*/
|
|
601
|
-
wrapBlock(delim, firstDelim, node, f) {
|
|
602
|
-
let old = this.delim;
|
|
603
|
-
this.write(firstDelim != null ? firstDelim : delim);
|
|
604
|
-
this.delim += delim;
|
|
605
|
-
f();
|
|
606
|
-
this.delim = old;
|
|
607
|
-
this.closeBlock(node);
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
@internal
|
|
611
|
-
*/
|
|
612
|
-
atBlank() {
|
|
613
|
-
return /(^|\n)$/.test(this.out);
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
Ensure the current content ends with a newline.
|
|
617
|
-
*/
|
|
618
|
-
ensureNewLine() {
|
|
619
|
-
if (!this.atBlank())
|
|
620
|
-
this.out += "\n";
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
Prepare the state for writing output (closing closed paragraphs,
|
|
624
|
-
adding delimiters, and so on), and then optionally add content
|
|
625
|
-
(unescaped) to the output.
|
|
626
|
-
*/
|
|
627
|
-
write(content) {
|
|
628
|
-
this.flushClose();
|
|
629
|
-
if (this.delim && this.atBlank())
|
|
630
|
-
this.out += this.delim;
|
|
631
|
-
if (content)
|
|
632
|
-
this.out += content;
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
Close the block for the given node.
|
|
636
|
-
*/
|
|
637
|
-
closeBlock(node) {
|
|
638
|
-
this.closed = node;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
Add the given text to the document. When escape is not `false`,
|
|
642
|
-
it will be escaped.
|
|
643
|
-
*/
|
|
644
|
-
text(text, escape = true) {
|
|
645
|
-
let lines = text.split("\n");
|
|
646
|
-
for (let i = 0; i < lines.length; i++) {
|
|
647
|
-
this.write();
|
|
648
|
-
// Escape exclamation marks in front of links
|
|
649
|
-
if (!escape && lines[i][0] == "[" && /(^|[^\\])\!$/.test(this.out))
|
|
650
|
-
this.out = this.out.slice(0, this.out.length - 1) + "\\!";
|
|
651
|
-
this.out += escape ? this.esc(lines[i], this.atBlockStart) : lines[i];
|
|
652
|
-
if (i != lines.length - 1)
|
|
653
|
-
this.out += "\n";
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
Render the given node as a block.
|
|
658
|
-
*/
|
|
659
|
-
render(node, parent, index) {
|
|
660
|
-
if (this.nodes[node.type.name]) {
|
|
661
|
-
this.nodes[node.type.name](this, node, parent, index);
|
|
662
|
-
}
|
|
663
|
-
else {
|
|
664
|
-
if (this.options.strict !== false) {
|
|
665
|
-
throw new Error("Token type `" + node.type.name + "` not supported by Markdown renderer");
|
|
666
|
-
}
|
|
667
|
-
else if (!node.type.isLeaf) {
|
|
668
|
-
if (node.type.inlineContent)
|
|
669
|
-
this.renderInline(node);
|
|
670
|
-
else
|
|
671
|
-
this.renderContent(node);
|
|
672
|
-
if (node.isBlock)
|
|
673
|
-
this.closeBlock(node);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
|
-
Render the contents of `parent` as block nodes.
|
|
679
|
-
*/
|
|
680
|
-
renderContent(parent) {
|
|
681
|
-
parent.forEach((node, _, i) => this.render(node, parent, i));
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
Render the contents of `parent` as inline content.
|
|
685
|
-
*/
|
|
686
|
-
renderInline(parent, fromBlockStart = true) {
|
|
687
|
-
this.atBlockStart = fromBlockStart;
|
|
688
|
-
let active = [], trailing = "";
|
|
689
|
-
let progress = (node, offset, index) => {
|
|
690
|
-
let marks = node ? node.marks : [];
|
|
691
|
-
// Remove marks from `hard_break` that are the last node inside
|
|
692
|
-
// that mark to prevent parser edge cases with new lines just
|
|
693
|
-
// before closing marks.
|
|
694
|
-
if (node && node.type.name === this.options.hardBreakNodeName)
|
|
695
|
-
marks = marks.filter(m => {
|
|
696
|
-
if (index + 1 == parent.childCount)
|
|
697
|
-
return false;
|
|
698
|
-
let next = parent.child(index + 1);
|
|
699
|
-
return m.isInSet(next.marks) && (!next.isText || /\S/.test(next.text));
|
|
700
|
-
});
|
|
701
|
-
let leading = trailing;
|
|
702
|
-
trailing = "";
|
|
703
|
-
// If whitespace has to be expelled from the node, adjust
|
|
704
|
-
// leading and trailing accordingly.
|
|
705
|
-
if (node && node.isText && marks.some(mark => {
|
|
706
|
-
let info = this.getMark(mark.type.name);
|
|
707
|
-
return info && info.expelEnclosingWhitespace && !mark.isInSet(active);
|
|
708
|
-
})) {
|
|
709
|
-
let [_, lead, rest] = /^(\s*)(.*)$/m.exec(node.text);
|
|
710
|
-
if (lead) {
|
|
711
|
-
leading += lead;
|
|
712
|
-
node = rest ? node.withText(rest) : null;
|
|
713
|
-
if (!node)
|
|
714
|
-
marks = active;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
if (node && node.isText && marks.some(mark => {
|
|
718
|
-
let info = this.getMark(mark.type.name);
|
|
719
|
-
return info && info.expelEnclosingWhitespace &&
|
|
720
|
-
(index == parent.childCount - 1 || !mark.isInSet(parent.child(index + 1).marks));
|
|
721
|
-
})) {
|
|
722
|
-
let [_, rest, trail] = /^(.*?)(\s*)$/m.exec(node.text);
|
|
723
|
-
if (trail) {
|
|
724
|
-
trailing = trail;
|
|
725
|
-
node = rest ? node.withText(rest) : null;
|
|
726
|
-
if (!node)
|
|
727
|
-
marks = active;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
let inner = marks.length ? marks[marks.length - 1] : null;
|
|
731
|
-
let noEsc = inner && this.getMark(inner.type.name).escape === false;
|
|
732
|
-
let len = marks.length - (noEsc ? 1 : 0);
|
|
733
|
-
// Try to reorder 'mixable' marks, such as em and strong, which
|
|
734
|
-
// in Markdown may be opened and closed in different order, so
|
|
735
|
-
// that order of the marks for the token matches the order in
|
|
736
|
-
// active.
|
|
737
|
-
outer: for (let i = 0; i < len; i++) {
|
|
738
|
-
let mark = marks[i];
|
|
739
|
-
if (!this.getMark(mark.type.name).mixable)
|
|
740
|
-
break;
|
|
741
|
-
for (let j = 0; j < active.length; j++) {
|
|
742
|
-
let other = active[j];
|
|
743
|
-
if (!this.getMark(other.type.name).mixable)
|
|
744
|
-
break;
|
|
745
|
-
if (mark.eq(other)) {
|
|
746
|
-
if (i > j)
|
|
747
|
-
marks = marks.slice(0, j).concat(mark).concat(marks.slice(j, i)).concat(marks.slice(i + 1, len));
|
|
748
|
-
else if (j > i)
|
|
749
|
-
marks = marks.slice(0, i).concat(marks.slice(i + 1, j)).concat(mark).concat(marks.slice(j, len));
|
|
750
|
-
continue outer;
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
// Find the prefix of the mark set that didn't change
|
|
755
|
-
let keep = 0;
|
|
756
|
-
while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep]))
|
|
757
|
-
++keep;
|
|
758
|
-
// Close the marks that need to be closed
|
|
759
|
-
while (keep < active.length)
|
|
760
|
-
this.text(this.markString(active.pop(), false, parent, index), false);
|
|
761
|
-
// Output any previously expelled trailing whitespace outside the marks
|
|
762
|
-
if (leading)
|
|
763
|
-
this.text(leading);
|
|
764
|
-
// Open the marks that need to be opened
|
|
765
|
-
if (node) {
|
|
766
|
-
while (active.length < len) {
|
|
767
|
-
let add = marks[active.length];
|
|
768
|
-
active.push(add);
|
|
769
|
-
this.text(this.markString(add, true, parent, index), false);
|
|
770
|
-
this.atBlockStart = false;
|
|
771
|
-
}
|
|
772
|
-
// Render the node. Special case code marks, since their content
|
|
773
|
-
// may not be escaped.
|
|
774
|
-
if (noEsc && node.isText)
|
|
775
|
-
this.text(this.markString(inner, true, parent, index) + node.text +
|
|
776
|
-
this.markString(inner, false, parent, index + 1), false);
|
|
777
|
-
else
|
|
778
|
-
this.render(node, parent, index);
|
|
779
|
-
this.atBlockStart = false;
|
|
780
|
-
}
|
|
781
|
-
// After the first non-empty text node is rendered, the end of output
|
|
782
|
-
// is no longer at block start.
|
|
783
|
-
//
|
|
784
|
-
// FIXME: If a non-text node writes something to the output for this
|
|
785
|
-
// block, the end of output is also no longer at block start. But how
|
|
786
|
-
// can we detect that?
|
|
787
|
-
if ((node === null || node === void 0 ? void 0 : node.isText) && node.nodeSize > 0) {
|
|
788
|
-
this.atBlockStart = false;
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
parent.forEach(progress);
|
|
792
|
-
progress(null, 0, parent.childCount);
|
|
793
|
-
this.atBlockStart = false;
|
|
794
|
-
}
|
|
795
|
-
/**
|
|
796
|
-
Render a node's content as a list. `delim` should be the extra
|
|
797
|
-
indentation added to all lines except the first in an item,
|
|
798
|
-
`firstDelim` is a function going from an item index to a
|
|
799
|
-
delimiter for the first line of the item.
|
|
800
|
-
*/
|
|
801
|
-
renderList(node, delim, firstDelim) {
|
|
802
|
-
if (this.closed && this.closed.type == node.type)
|
|
803
|
-
this.flushClose(3);
|
|
804
|
-
else if (this.inTightList)
|
|
805
|
-
this.flushClose(1);
|
|
806
|
-
let isTight = typeof node.attrs.tight != "undefined" ? node.attrs.tight : this.options.tightLists;
|
|
807
|
-
let prevTight = this.inTightList;
|
|
808
|
-
this.inTightList = isTight;
|
|
809
|
-
node.forEach((child, _, i) => {
|
|
810
|
-
if (i && isTight)
|
|
811
|
-
this.flushClose(1);
|
|
812
|
-
this.wrapBlock(delim, firstDelim(i), node, () => this.render(child, node, i));
|
|
813
|
-
});
|
|
814
|
-
this.inTightList = prevTight;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
Escape the given string so that it can safely appear in Markdown
|
|
818
|
-
content. If `startOfLine` is true, also escape characters that
|
|
819
|
-
have special meaning only at the start of the line.
|
|
820
|
-
*/
|
|
821
|
-
esc(str, startOfLine = false) {
|
|
822
|
-
str = str.replace(/[`*\\~\[\]_]/g, (m, i) => m == "_" && i > 0 && i + 1 < str.length && str[i - 1].match(/\w/) && str[i + 1].match(/\w/) ? m : "\\" + m);
|
|
823
|
-
if (startOfLine)
|
|
824
|
-
str = str.replace(/^(\+[ ]|[\-*>])/, "\\$&").replace(/^(\s*)(#{1,6})(\s|$)/, '$1\\$2$3').replace(/^(\s*\d+)\.\s/, "$1\\. ");
|
|
825
|
-
if (this.options.escapeExtraCharacters)
|
|
826
|
-
str = str.replace(this.options.escapeExtraCharacters, "\\$&");
|
|
827
|
-
return str;
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
@internal
|
|
831
|
-
*/
|
|
832
|
-
quote(str) {
|
|
833
|
-
let wrap = str.indexOf('"') == -1 ? '""' : str.indexOf("'") == -1 ? "''" : "()";
|
|
834
|
-
return wrap[0] + str + wrap[1];
|
|
835
|
-
}
|
|
836
|
-
/**
|
|
837
|
-
Repeat the given string `n` times.
|
|
838
|
-
*/
|
|
839
|
-
repeat(str, n) {
|
|
840
|
-
let out = "";
|
|
841
|
-
for (let i = 0; i < n; i++)
|
|
842
|
-
out += str;
|
|
843
|
-
return out;
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
Get the markdown string for a given opening or closing mark.
|
|
847
|
-
*/
|
|
848
|
-
markString(mark, open, parent, index) {
|
|
849
|
-
let info = this.getMark(mark.type.name);
|
|
850
|
-
let value = open ? info.open : info.close;
|
|
851
|
-
return typeof value == "string" ? value : value(this, mark, parent, index);
|
|
852
|
-
}
|
|
853
|
-
/**
|
|
854
|
-
Get leading and trailing whitespace from a string. Values of
|
|
855
|
-
leading or trailing property of the return object will be undefined
|
|
856
|
-
if there is no match.
|
|
857
|
-
*/
|
|
858
|
-
getEnclosingWhitespace(text) {
|
|
859
|
-
return {
|
|
860
|
-
leading: (text.match(/^(\s+)/) || [undefined])[0],
|
|
861
|
-
trailing: (text.match(/(\s+)$/) || [undefined])[0]
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
export { MarkdownSerializerState$1 as M, defaultMarkdownSerializer as d };
|