@vc-shell/framework 1.1.44 → 1.1.46
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 +20 -0
- package/core/plugins/modularity/loader.ts +150 -74
- package/core/services/app-bar-mobile-buttons-service.ts +1 -1
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/core/services/app-bar-mobile-buttons-service.d.ts +1 -1
- package/dist/core/services/app-bar-mobile-buttons-service.d.ts.map +1 -1
- package/dist/framework.js +33355 -295
- package/dist/index.css +1 -9
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/de.json +0 -84
- package/dist/locales/en.json +0 -84
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.d.ts.map +1 -1
- package/dist/shared/components/change-password-button/change-password-button.vue.d.ts.map +1 -1
- package/dist/shared/components/logout-button/logout-button.vue.d.ts.map +1 -1
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +6 -6
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +0 -26
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts +0 -5
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +0 -20
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +36 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +17 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +16 -2381
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue.d.ts.map +1 -1
- package/dist/vendor-boolbase-Cp9L0GAZ.js +25 -0
- package/dist/vendor-cheerio-HN9zIPZn.js +3135 -0
- package/dist/vendor-cheerio-select-5Ry0HvBq.js +306 -0
- package/dist/vendor-core-js-l0sNRNKZ.js +1 -0
- package/dist/vendor-css-select-DRIZ9kfZ.js +966 -0
- package/dist/vendor-css-what-DuPJ1HEF.js +448 -0
- package/dist/vendor-cypress-signalr-mock-BKdBJpdt.js +778 -0
- package/dist/vendor-date-fns-515YWkk-.js +6724 -0
- package/dist/vendor-dom-serializer-nQMsqjYW.js +286 -0
- package/dist/vendor-dom7-CJLPMwy5.js +941 -0
- package/dist/vendor-domelementtype-CjSzQey5.js +53 -0
- package/dist/vendor-domhandler-9z8cS16a.js +484 -0
- package/dist/vendor-dompurify-CRFzu7ib.js +1336 -0
- package/dist/vendor-domutils-Bc-Opz-v.js +981 -0
- package/dist/vendor-entities-Bfsx4xOQ.js +636 -0
- package/dist/vendor-floating-ui-core-wV8u8QP4.js +511 -0
- package/dist/vendor-floating-ui-dom-DDnRPs17.js +706 -0
- package/dist/vendor-floating-ui-utils-OMIFy1QU.js +296 -0
- package/dist/vendor-floating-ui-vue-D-tCDAMm.js +167 -0
- package/dist/vendor-fontsource-plus-jakarta-sans.css +1 -0
- package/dist/vendor-headlessui-vue-CY9FRgTb.js +83 -0
- package/dist/vendor-htmlparser2-B1dhFPOs.js +1426 -0
- package/dist/vendor-iconify-vue-DfRGgyNu.js +1840 -0
- package/dist/vendor-intlify-core-base-BuknsFQe.js +1876 -0
- package/dist/vendor-intlify-message-compiler-CuOQDWx1.js +1508 -0
- package/dist/vendor-intlify-shared-Cz4YRMuC.js +241 -0
- package/dist/vendor-iso-639-1-BJCk9DvE.js +819 -0
- package/dist/vendor-linkify-it-CKUf4vsc.js +830 -0
- package/dist/vendor-linkifyjs-BfyGgbCh.js +1756 -0
- package/dist/vendor-lodash-es-BySUOlwf.js +18333 -0
- package/dist/vendor-markdown-it-D-apazHa.js +6000 -0
- package/dist/vendor-markdown-it-task-lists-rxMVH6Ku.js +131 -0
- package/dist/vendor-mdurl-BNh2CCgT.js +537 -0
- package/dist/vendor-microsoft-applicationinsights-analytics-js-kG3lLg8X.js +1275 -0
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-C0uQkiQq.js +591 -0
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dyd_PXA3.js +2153 -0
- package/dist/vendor-microsoft-applicationinsights-common-CfmP1_Qr.js +2470 -0
- package/dist/vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js +6589 -0
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-C56OBFr4.js +1510 -0
- package/dist/vendor-microsoft-applicationinsights-properties-js-CBJTBawx.js +761 -0
- package/dist/vendor-microsoft-applicationinsights-shims-CX8sJgar.js +70 -0
- package/dist/vendor-microsoft-applicationinsights-web-pim2ri-g.js +667 -0
- package/dist/vendor-microsoft-dynamicproto-js-CFBBUu9p.js +520 -0
- package/dist/vendor-microsoft-signalr-dUnlRsGm.js +3339 -0
- package/dist/vendor-moment-Mki5YqAR.js +5679 -0
- package/dist/vendor-nevware21-ts-async-CLMApQ9E.js +395 -0
- package/dist/vendor-nevware21-ts-utils-e8v8Jty3.js +1160 -0
- package/dist/vendor-normalize-css.css +1 -0
- package/dist/vendor-nth-check-Bx8TxtJt.js +157 -0
- package/dist/vendor-orderedmap-dGG6uMFJ.js +137 -0
- package/dist/vendor-parse5-Bt2NhSzR.js +8432 -0
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BUUtKzf8.js +216 -0
- package/dist/vendor-popperjs-core-Cr2byIky.js +1790 -0
- package/dist/vendor-prettier-B4PaeWRQ.js +98 -0
- package/dist/vendor-prosemirror-commands-BH9lWGpW.js +561 -0
- package/dist/vendor-prosemirror-dropcursor-CeyPcxrA.js +146 -0
- package/dist/vendor-prosemirror-gapcursor-U8UoUJII.js +236 -0
- package/dist/vendor-prosemirror-history-BDaJkvNx.js +414 -0
- package/dist/vendor-prosemirror-keymap-BbWvIWmH.js +128 -0
- package/dist/vendor-prosemirror-markdown-gB0PXBbz.js +866 -0
- package/dist/vendor-prosemirror-model-BZu3WVcD.js +3463 -0
- package/dist/vendor-prosemirror-schema-list-Bl9NpKA7.js +158 -0
- package/dist/vendor-prosemirror-state-BvL9Pxph.js +1003 -0
- package/dist/vendor-prosemirror-tables-17qAnviK.js +2159 -0
- package/dist/vendor-prosemirror-transform-CE9VV3qg.js +2156 -0
- package/dist/vendor-prosemirror-view-CU2WTHT7.js +5811 -0
- package/dist/vendor-punycode-js-iAs5RxMf.js +441 -0
- package/dist/vendor-rope-sequence-BdXDKoGt.js +207 -0
- package/dist/vendor-semver-CVLMK-S4.js +2702 -0
- package/dist/vendor-ssr-window-s6OpKa3O.js +150 -0
- package/dist/vendor-swiper-CdiyNHVt.js +5679 -0
- package/dist/vendor-swiper.css +1 -0
- package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +1 -0
- package/dist/vendor-tanstack-vue-virtual-l0sNRNKZ.js +1 -0
- package/dist/vendor-tippy-js-DWFe2TfK.js +1647 -0
- package/dist/vendor-tiptap-core-NfwGfaQk.js +4910 -0
- package/dist/vendor-tiptap-extension-blockquote-jmWBTtsI.js +57 -0
- package/dist/vendor-tiptap-extension-bold-p5frh4ak.js +97 -0
- package/dist/vendor-tiptap-extension-bubble-menu-KUhZSfrs.js +218 -0
- package/dist/vendor-tiptap-extension-bullet-list-COmZRoSB.js +73 -0
- package/dist/vendor-tiptap-extension-code-block-DyTARZss.js +221 -0
- package/dist/vendor-tiptap-extension-code-jVv6CXpX.js +75 -0
- package/dist/vendor-tiptap-extension-document-DssuotYs.js +13 -0
- package/dist/vendor-tiptap-extension-dropcursor-BoO0Qv91.js +26 -0
- package/dist/vendor-tiptap-extension-floating-menu-CrO8CN5w.js +165 -0
- package/dist/vendor-tiptap-extension-gapcursor-KpsWEoMD.js +30 -0
- package/dist/vendor-tiptap-extension-hard-break-ldOzhSvf.js +68 -0
- package/dist/vendor-tiptap-extension-heading-CKz2llX0.js +77 -0
- package/dist/vendor-tiptap-extension-history-DeKZ2VQ9.js +48 -0
- package/dist/vendor-tiptap-extension-horizontal-rule-CAjWRyDS.js +92 -0
- package/dist/vendor-tiptap-extension-image-ZagcEYuk.js +76 -0
- package/dist/vendor-tiptap-extension-italic-CM4xdznY.js +96 -0
- package/dist/vendor-tiptap-extension-link-Z-AMC4Ri.js +414 -0
- package/dist/vendor-tiptap-extension-list-item-BJi5QpXc.js +37 -0
- package/dist/vendor-tiptap-extension-ordered-list-C_TMrfBE.js +97 -0
- package/dist/vendor-tiptap-extension-paragraph-CQw0E0Au.js +39 -0
- package/dist/vendor-tiptap-extension-placeholder-BBNVKfa_.js +66 -0
- package/dist/vendor-tiptap-extension-strike-DUyMYX1Z.js +79 -0
- package/dist/vendor-tiptap-extension-table-cell-CoDIMPA5.js +47 -0
- package/dist/vendor-tiptap-extension-table-header-DvbGHnmw.js +47 -0
- package/dist/vendor-tiptap-extension-table-row-D1uqN5Aj.js +26 -0
- package/dist/vendor-tiptap-extension-table-tKS4MOM4.js +354 -0
- package/dist/vendor-tiptap-extension-text-DtRBhKB2.js +12 -0
- package/dist/vendor-tiptap-extension-underline-DqaSFp_P.js +50 -0
- package/dist/vendor-tiptap-markdown-7-PCADTU.js +1017 -0
- package/dist/vendor-tiptap-pm-l0sNRNKZ.js +1 -0
- package/dist/vendor-tiptap-starter-kit-CDSV_Zuu.js +88 -0
- package/dist/vendor-tiptap-vue-3-DZg2fjq_.js +268 -0
- package/dist/vendor-truncate-html-3qQY0Djo.js +196 -0
- package/dist/vendor-uc-micro-jjt6LQ65.js +23 -0
- package/dist/vendor-vee-validate-i18n-v_gHjRmD.js +154 -0
- package/dist/vendor-vee-validate-rules-DzV3VY3N.js +536 -0
- package/dist/vendor-vue-currency-input-DGAkEFBO.js +545 -0
- package/dist/vendor-vue-demi-l0sNRNKZ.js +1 -0
- package/dist/vendor-vue-devtools-api-DXYR8qBG.js +169 -0
- package/dist/vendor-vue-i18n-Co752uk3.js +1897 -0
- package/dist/vendor-vue3-application-insights-CYWFCr_J.js +119 -0
- package/dist/vendor-vue3-touch-events-BJEAiSa3.js +416 -0
- package/dist/vendor-vuepic-vue-datepicker-BSWXRSiu.js +5019 -0
- package/dist/vendor-vuepic-vue-datepicker.css +1 -0
- package/dist/vendor-vueuse-components-l1bL12mE.js +339 -0
- package/dist/vendor-vueuse-core-DGcJOmwG.js +7743 -0
- package/dist/vendor-vueuse-shared-_mOXsFuM.js +1568 -0
- package/dist/vendor-w3c-keyname-BOm2dtJm.js +121 -0
- package/package.json +22 -11
- package/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue +3 -3
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +2 -1
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -0
- package/shared/components/change-password-button/change-password-button.vue +1 -2
- package/shared/components/logout-button/logout-button.vue +1 -2
- package/shared/components/notifications/components/notification-container/index.ts +1 -1
- package/shared/components/notifications/core/notification.ts +1 -1
- package/shared/components/settings-menu-item/settings-menu-item.vue +1 -0
- package/shared/components/sidebar/sidebar.vue +2 -2
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +2 -1
- package/ui/components/atoms/vc-hint/vc-hint.vue +2 -0
- package/ui/components/atoms/vc-icon/composables/use-icon.ts +1 -1
- package/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue +18 -14
- package/ui/components/atoms/vc-icon/icons/index.ts +1 -27
- package/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue +7 -11
- package/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue +37 -31
- package/ui/components/atoms/vc-icon/vc-icon-examples.vue +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +4 -5
- package/ui/components/atoms/vc-icon/vc-icon.vue +43 -186
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +22 -70
- package/ui/components/atoms/vc-icon/vc-material-icon.vue +28 -59
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +2 -3
- package/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue +103 -0
- package/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue +252 -0
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -4
- package/ui/components/molecules/vc-editor/vc-editor.vue +666 -360
- package/ui/components/molecules/vc-form/vc-form.vue +7 -5
- package/ui/components/molecules/vc-input/vc-input.vue +1 -1
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +4 -17
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarMobileActions.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue +1 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -4
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +1 -3
- package/ui/components/organisms/vc-app/vc-app.backupsb.ts +214 -214
- package/ui/components/organisms/vc-app/vc-app.vue +3 -5
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +3 -10
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue +1 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +2 -2
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +2 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +4 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +1 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue +1 -2
- package/ui/components/organisms/vc-table/composables/useTableState.ts +5 -5
- package/dist/apl-B2DGVGxc.js +0 -76
- package/dist/asciiarmor-2LVJmxlE.js +0 -34
- package/dist/asn1-jKiBa2Ya.js +0 -95
- package/dist/asterisk-DS281yxp.js +0 -271
- package/dist/brainfuck-C_p9pTT8.js +0 -34
- package/dist/clike-DGTaUp48.js +0 -620
- package/dist/clojure-CCKyeQKf.js +0 -800
- package/dist/cmake-CuaCgAKt.js +0 -28
- package/dist/cobol-BlTKFDRj.js +0 -72
- package/dist/coffeescript-BVCvwO8I.js +0 -179
- package/dist/commonlisp-D_kxz07b.js +0 -75
- package/dist/crystal-D309uH6_.js +0 -217
- package/dist/css-BkF-NPzE.js +0 -1553
- package/dist/cypher-BMq4Fwjl.js +0 -68
- package/dist/d-BZcgY6La.js +0 -127
- package/dist/diff-Cg9d_RX2.js +0 -18
- package/dist/dockerfile-DIy8NleC.js +0 -194
- package/dist/dtd-CtLokQ-U.js +0 -84
- package/dist/dylan-QYeExnWK.js +0 -234
- package/dist/ebnf-DUPDuY4r.js +0 -78
- package/dist/ecl-CiXN-g_D.js +0 -121
- package/dist/eiffel-yQhjl4T1.js +0 -110
- package/dist/elm-CNT9vbN0.js +0 -108
- package/dist/erlang-CFOYdy9e.js +0 -487
- package/dist/factor-DDOC7X6P.js +0 -65
- package/dist/fcl-CPC2WYrI.js +0 -103
- package/dist/forth-BmxRyE9S.js +0 -60
- package/dist/fortran-9bvPyrOW.js +0 -442
- package/dist/gas-cpmYfFX2.js +0 -183
- package/dist/gherkin-CJuwpceU.js +0 -34
- package/dist/groovy-DZeT_VM-.js +0 -146
- package/dist/haskell-Bvt3Qq1t.js +0 -375
- package/dist/haxe-70NVW1pR.js +0 -359
- package/dist/http-D9LttvKF.js +0 -44
- package/dist/idl-B6TRFYjl.js +0 -947
- package/dist/index-4DWvmoYg.js +0 -71
- package/dist/index-52o7mJaX.js +0 -156
- package/dist/index-B0KatioT.js +0 -98
- package/dist/index-BP3W8zuk.js +0 -268
- package/dist/index-BykT5L1A.js +0 -148134
- package/dist/index-CfXo9hsG.js +0 -75
- package/dist/index-Ch37pBUt.js +0 -308
- package/dist/index-D2KGkAYT.js +0 -93
- package/dist/index-D83zQom_.js +0 -58
- package/dist/index-DuQrVLbu.js +0 -134
- package/dist/index-_fdMid5h.js +0 -288
- package/dist/index-a1wO-owY.js +0 -545
- package/dist/index-crMpNSFe.js +0 -611
- package/dist/index-dmBRpHHY.js +0 -137
- package/dist/index-kBdB14Fz.js +0 -341
- package/dist/index-uBhy41le.js +0 -249
- package/dist/index-zZrijNsr.js +0 -299
- package/dist/javascript-C2yteZeJ.js +0 -691
- package/dist/jinja2-DnB6dQmV.js +0 -154
- package/dist/julia-DpvXAuO6.js +0 -241
- package/dist/livescript-CanGTf8u.js +0 -272
- package/dist/lua-XplVlWi_.js +0 -217
- package/dist/mathematica-jaRHnSxC.js +0 -35
- package/dist/mbox-BctzC1hL.js +0 -76
- package/dist/mirc-CFBPAOaF.js +0 -72
- package/dist/mllike-BSnXJBGA.js +0 -272
- package/dist/modelica-vUgVs--1.js +0 -93
- package/dist/mscgen-Cpl0NYLN.js +0 -104
- package/dist/mumps-CQoS1kWX.js +0 -25
- package/dist/nginx-zDPm3Z74.js +0 -89
- package/dist/nsis-fePjrhq7.js +0 -62
- package/dist/ntriples-CsNjv2QF.js +0 -79
- package/dist/octave-C8PmmSRH.js +0 -143
- package/dist/oz-Ce8aN8oE.js +0 -151
- package/dist/pascal-De0D6mP7.js +0 -77
- package/dist/perl-B4bSCe1C.js +0 -915
- package/dist/pig-D24Z8EXi.js +0 -54
- package/dist/powershell-DkYVfTzP.js +0 -249
- package/dist/properties-Dn9wna3M.js +0 -26
- package/dist/protobuf-BPIjwpzm.js +0 -49
- package/dist/pug-CwAQJzGR.js +0 -248
- package/dist/puppet-nyd4dhjf.js +0 -45
- package/dist/python-BkR3uSy8.js +0 -313
- package/dist/q-DXjKs-tC.js +0 -83
- package/dist/r-LKEuhEGI.js +0 -104
- package/dist/rpm-IznJm2Xc.js +0 -57
- package/dist/ruby-CcYfvIk6.js +0 -228
- package/dist/sas-7E8yHoCW.js +0 -105
- package/dist/scheme-DjibxsNh.js +0 -124
- package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts +0 -113
- package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts +0 -3
- package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +0 -102
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts +0 -4
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts +0 -3
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts.map +0 -1
- package/dist/shell-C0C2sNA_.js +0 -182
- package/dist/sieve-Bwz7vjP5.js +0 -72
- package/dist/simple-mode-B0dvCdAA.js +0 -89
- package/dist/smalltalk-Bhddl2pB.js +0 -48
- package/dist/solr-BNlsLglM.js +0 -41
- package/dist/sparql-FarWu_Gb.js +0 -197
- package/dist/spreadsheet-C-cy4P5N.js +0 -49
- package/dist/sql-CfG5lQ3l.js +0 -282
- package/dist/stex-Du4h4KAU.js +0 -129
- package/dist/stylus-CAdqWld3.js +0 -250
- package/dist/swift-DSxqR9R6.js +0 -230
- package/dist/tcl-xfoLljhY.js +0 -81
- package/dist/textile-D1AWE-pc.js +0 -295
- package/dist/tiddlywiki-5wqsXtSk.js +0 -155
- package/dist/tiki-__Kn3CeS.js +0 -181
- package/dist/toml-BHiuTcfn.js +0 -49
- package/dist/troff-D2UO-fKf.js +0 -35
- package/dist/ttcn-Bsa4sfRm.js +0 -123
- package/dist/ttcn-cfg-Bac_acMi.js +0 -88
- package/dist/turtle-xwJUxoPV.js +0 -80
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts.map +0 -1
- package/dist/vb-c2kQGd6-.js +0 -74
- package/dist/vbscript-1f_Dhg5H.js +0 -324
- package/dist/velocity-DJd0pTTC.js +0 -96
- package/dist/verilog-CiS1jyi5.js +0 -262
- package/dist/vhdl-T9HkrbI2.js +0 -106
- package/dist/webidl-CjfDENEo.js +0 -155
- package/dist/xquery-BUQdORAS.js +0 -422
- package/dist/yacas-C0absKBh.js +0 -73
- package/dist/z80-Pki2zAjW.js +0 -61
- package/shared/modules/dynamic/components/fields/storybook/Button.stories.ts +0 -186
- package/shared/modules/dynamic/components/fields/storybook/Card.stories.ts +0 -175
- package/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.ts +0 -185
- package/shared/modules/dynamic/components/fields/storybook/ContentField.stories.ts +0 -245
- package/shared/modules/dynamic/components/fields/storybook/EditorField.stories.ts +0 -192
- package/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.ts +0 -347
- package/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.ts +0 -239
- package/shared/modules/dynamic/components/fields/storybook/ImageField.stories.ts +0 -186
- package/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.ts +0 -281
- package/shared/modules/dynamic/components/fields/storybook/InputField.stories.ts +0 -312
- package/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.ts +0 -361
- package/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.ts +0 -224
- package/shared/modules/dynamic/components/fields/storybook/RatingField.stories.ts +0 -131
- package/shared/modules/dynamic/components/fields/storybook/SelectField.stories.ts +0 -666
- package/shared/modules/dynamic/components/fields/storybook/StatusField.stories.ts +0 -202
- package/shared/modules/dynamic/components/fields/storybook/SwitchField.stories.ts +0 -178
- package/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.ts +0 -203
- package/shared/modules/dynamic/components/fields/storybook/VideoField.stories.ts +0 -92
- package/shared/modules/dynamic/components/fields/storybook/common/args.ts +0 -130
- package/shared/modules/dynamic/components/fields/storybook/common/templates.ts +0 -8
- package/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.ts +0 -54
- package/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.ts +0 -16
- package/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.ts +0 -41
- package/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue +0 -15
- package/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/BellIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue +0 -16
- package/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue +0 -27
- package/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue +0 -22
- package/ui/components/atoms/vc-icon/icons/LogoutIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/OffersIcon.vue +0 -23
- package/ui/components/atoms/vc-icon/icons/OrdersIcon.vue +0 -19
- package/ui/components/atoms/vc-icon/icons/PeopleIcon.vue +0 -21
- package/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/ProductsIcon.vue +0 -23
- package/ui/components/atoms/vc-icon/icons/ProfileIcon.vue +0 -18
- package/ui/components/atoms/vc-icon/icons/SearchIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue +0 -21
- package/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue +0 -16
- package/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue +0 -26
- package/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue +0 -19
|
@@ -0,0 +1,1017 @@
|
|
|
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 };
|