@ecomcx/ecomweb-editor 0.0.0-stage → 1.17.1
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/README.md +107 -2
- package/node_modules/@floating-ui/core/LICENSE +20 -0
- package/node_modules/@floating-ui/core/README.md +4 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1164 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +535 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +535 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1038 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1038 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1183 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
- package/node_modules/@floating-ui/core/package.json +63 -0
- package/node_modules/@floating-ui/dom/LICENSE +20 -0
- package/node_modules/@floating-ui/dom/README.md +4 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +964 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +362 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +362 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +789 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +789 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +983 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/dom/package.json +72 -0
- package/node_modules/@floating-ui/utils/LICENSE +20 -0
- package/node_modules/@floating-ui/utils/README.md +4 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +105 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +105 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +167 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dom/package.json +6 -0
- package/node_modules/@floating-ui/utils/package.json +70 -0
- package/node_modules/@tiptap/core/LICENSE.md +21 -0
- package/node_modules/@tiptap/core/README.md +18 -0
- package/node_modules/@tiptap/core/dist/index.cjs +8463 -0
- package/node_modules/@tiptap/core/dist/index.d.cts +5798 -0
- package/node_modules/@tiptap/core/dist/index.d.ts +5797 -0
- package/node_modules/@tiptap/core/dist/index.js +8288 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +70 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +28 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +28 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +64 -0
- package/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/package.json +74 -0
- package/node_modules/@tiptap/extension-blockquote/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-blockquote/README.md +18 -0
- package/node_modules/@tiptap/extension-blockquote/dist/index.cjs +132 -0
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.cts +40 -0
- package/node_modules/@tiptap/extension-blockquote/dist/index.d.ts +40 -0
- package/node_modules/@tiptap/extension-blockquote/dist/index.js +126 -0
- package/node_modules/@tiptap/extension-blockquote/package.json +52 -0
- package/node_modules/@tiptap/extension-bold/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-bold/README.md +18 -0
- package/node_modules/@tiptap/extension-bold/dist/index.cjs +117 -0
- package/node_modules/@tiptap/extension-bold/dist/index.d.cts +52 -0
- package/node_modules/@tiptap/extension-bold/dist/index.d.ts +52 -0
- package/node_modules/@tiptap/extension-bold/dist/index.js +108 -0
- package/node_modules/@tiptap/extension-bold/package.json +50 -0
- package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-bubble-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +333 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +170 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +170 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +326 -0
- package/node_modules/@tiptap/extension-bubble-menu/package.json +56 -0
- package/node_modules/@tiptap/extension-bullet-list/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-bullet-list/README.md +18 -0
- package/node_modules/@tiptap/extension-bullet-list/dist/index.cjs +17 -0
- package/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-bullet-list/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-bullet-list/package.json +50 -0
- package/node_modules/@tiptap/extension-code/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-code/README.md +18 -0
- package/node_modules/@tiptap/extension-code/dist/index.cjs +136 -0
- package/node_modules/@tiptap/extension-code/dist/index.d.cts +60 -0
- package/node_modules/@tiptap/extension-code/dist/index.d.ts +60 -0
- package/node_modules/@tiptap/extension-code/dist/index.js +127 -0
- package/node_modules/@tiptap/extension-code/package.json +50 -0
- package/node_modules/@tiptap/extension-code-block/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-code-block/README.md +18 -0
- package/node_modules/@tiptap/extension-code-block/dist/index.cjs +255 -0
- package/node_modules/@tiptap/extension-code-block/dist/index.d.cts +84 -0
- package/node_modules/@tiptap/extension-code-block/dist/index.d.ts +84 -0
- package/node_modules/@tiptap/extension-code-block/dist/index.js +248 -0
- package/node_modules/@tiptap/extension-code-block/package.json +52 -0
- package/node_modules/@tiptap/extension-document/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-document/README.md +18 -0
- package/node_modules/@tiptap/extension-document/dist/index.cjs +26 -0
- package/node_modules/@tiptap/extension-document/dist/index.d.cts +10 -0
- package/node_modules/@tiptap/extension-document/dist/index.d.ts +10 -0
- package/node_modules/@tiptap/extension-document/dist/index.js +22 -0
- package/node_modules/@tiptap/extension-document/package.json +50 -0
- package/node_modules/@tiptap/extension-dropcursor/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-dropcursor/README.md +18 -0
- package/node_modules/@tiptap/extension-dropcursor/dist/index.cjs +17 -0
- package/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-dropcursor/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-dropcursor/package.json +50 -0
- package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-floating-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +272 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +180 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +180 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js +265 -0
- package/node_modules/@tiptap/extension-floating-menu/package.json +55 -0
- package/node_modules/@tiptap/extension-gapcursor/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-gapcursor/README.md +18 -0
- package/node_modules/@tiptap/extension-gapcursor/dist/index.cjs +17 -0
- package/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-gapcursor/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-gapcursor/package.json +50 -0
- package/node_modules/@tiptap/extension-hard-break/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-hard-break/README.md +18 -0
- package/node_modules/@tiptap/extension-hard-break/dist/index.cjs +69 -0
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-hard-break/dist/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-hard-break/dist/index.js +64 -0
- package/node_modules/@tiptap/extension-hard-break/package.json +50 -0
- package/node_modules/@tiptap/extension-heading/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-heading/README.md +18 -0
- package/node_modules/@tiptap/extension-heading/dist/index.cjs +93 -0
- package/node_modules/@tiptap/extension-heading/dist/index.d.cts +50 -0
- package/node_modules/@tiptap/extension-heading/dist/index.d.ts +50 -0
- package/node_modules/@tiptap/extension-heading/dist/index.js +88 -0
- package/node_modules/@tiptap/extension-heading/package.json +50 -0
- package/node_modules/@tiptap/extension-highlight/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-highlight/README.md +18 -0
- package/node_modules/@tiptap/extension-highlight/dist/index.cjs +113 -0
- package/node_modules/@tiptap/extension-highlight/dist/index.d.cts +59 -0
- package/node_modules/@tiptap/extension-highlight/dist/index.d.ts +59 -0
- package/node_modules/@tiptap/extension-highlight/dist/index.js +106 -0
- package/node_modules/@tiptap/extension-highlight/package.json +50 -0
- package/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-horizontal-rule/README.md +18 -0
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs +78 -0
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +73 -0
- package/node_modules/@tiptap/extension-horizontal-rule/package.json +52 -0
- package/node_modules/@tiptap/extension-image/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-image/README.md +18 -0
- package/node_modules/@tiptap/extension-image/dist/index.cjs +181 -0
- package/node_modules/@tiptap/extension-image/dist/index.d.cts +69 -0
- package/node_modules/@tiptap/extension-image/dist/index.d.ts +69 -0
- package/node_modules/@tiptap/extension-image/dist/index.js +175 -0
- package/node_modules/@tiptap/extension-image/package.json +50 -0
- package/node_modules/@tiptap/extension-italic/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-italic/README.md +18 -0
- package/node_modules/@tiptap/extension-italic/dist/index.cjs +113 -0
- package/node_modules/@tiptap/extension-italic/dist/index.d.cts +55 -0
- package/node_modules/@tiptap/extension-italic/dist/index.d.ts +55 -0
- package/node_modules/@tiptap/extension-italic/dist/index.js +104 -0
- package/node_modules/@tiptap/extension-italic/package.json +50 -0
- package/node_modules/@tiptap/extension-link/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-link/README.md +18 -0
- package/node_modules/@tiptap/extension-link/dist/index.cjs +560 -0
- package/node_modules/@tiptap/extension-link/dist/index.d.cts +159 -0
- package/node_modules/@tiptap/extension-link/dist/index.d.ts +159 -0
- package/node_modules/@tiptap/extension-link/dist/index.js +553 -0
- package/node_modules/@tiptap/extension-link/package.json +56 -0
- package/node_modules/@tiptap/extension-list/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-list/README.md +18 -0
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs +84 -0
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts +52 -0
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts +52 -0
- package/node_modules/@tiptap/extension-list/dist/bullet-list/index.js +82 -0
- package/node_modules/@tiptap/extension-list/dist/index.cjs +1570 -0
- package/node_modules/@tiptap/extension-list/dist/index.d.cts +391 -0
- package/node_modules/@tiptap/extension-list/dist/index.d.ts +390 -0
- package/node_modules/@tiptap/extension-list/dist/index.js +1533 -0
- package/node_modules/@tiptap/extension-list/dist/item/index.cjs +308 -0
- package/node_modules/@tiptap/extension-list/dist/item/index.d.cts +30 -0
- package/node_modules/@tiptap/extension-list/dist/item/index.d.ts +30 -0
- package/node_modules/@tiptap/extension-list/dist/item/index.js +307 -0
- package/node_modules/@tiptap/extension-list/dist/keymap/index.cjs +263 -0
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts +66 -0
- package/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts +65 -0
- package/node_modules/@tiptap/extension-list/dist/keymap/index.js +245 -0
- package/node_modules/@tiptap/extension-list/dist/keymap/rolldown-runtime-D7D4PA-g.js +13 -0
- package/node_modules/@tiptap/extension-list/dist/kit/index.cjs +1487 -0
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.cts +235 -0
- package/node_modules/@tiptap/extension-list/dist/kit/index.d.ts +235 -0
- package/node_modules/@tiptap/extension-list/dist/kit/index.js +1486 -0
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs +671 -0
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts +120 -0
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts +120 -0
- package/node_modules/@tiptap/extension-list/dist/ordered-list/index.js +659 -0
- package/node_modules/@tiptap/extension-list/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/node_modules/@tiptap/extension-list/dist/task-item/index.cjs +327 -0
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts +69 -0
- package/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts +69 -0
- package/node_modules/@tiptap/extension-list/dist/task-item/index.js +325 -0
- package/node_modules/@tiptap/extension-list/dist/task-list/index.cjs +121 -0
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-list/dist/task-list/index.js +120 -0
- package/node_modules/@tiptap/extension-list/package.json +108 -0
- package/node_modules/@tiptap/extension-list-item/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-list-item/README.md +18 -0
- package/node_modules/@tiptap/extension-list-item/dist/index.cjs +17 -0
- package/node_modules/@tiptap/extension-list-item/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-list-item/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-list-item/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-list-item/package.json +50 -0
- package/node_modules/@tiptap/extension-list-keymap/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-list-keymap/README.md +18 -0
- package/node_modules/@tiptap/extension-list-keymap/dist/index.cjs +23 -0
- package/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-list-keymap/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-list-keymap/package.json +50 -0
- package/node_modules/@tiptap/extension-ordered-list/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-ordered-list/README.md +18 -0
- package/node_modules/@tiptap/extension-ordered-list/dist/index.cjs +17 -0
- package/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts +2 -0
- package/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts +2 -0
- package/node_modules/@tiptap/extension-ordered-list/dist/index.js +7 -0
- package/node_modules/@tiptap/extension-ordered-list/package.json +50 -0
- package/node_modules/@tiptap/extension-paragraph/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-paragraph/README.md +18 -0
- package/node_modules/@tiptap/extension-paragraph/dist/index.cjs +73 -0
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.cts +29 -0
- package/node_modules/@tiptap/extension-paragraph/dist/index.d.ts +29 -0
- package/node_modules/@tiptap/extension-paragraph/dist/index.js +68 -0
- package/node_modules/@tiptap/extension-paragraph/package.json +50 -0
- package/node_modules/@tiptap/extension-strike/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-strike/README.md +18 -0
- package/node_modules/@tiptap/extension-strike/dist/index.cjs +88 -0
- package/node_modules/@tiptap/extension-strike/dist/index.d.cts +47 -0
- package/node_modules/@tiptap/extension-strike/dist/index.d.ts +47 -0
- package/node_modules/@tiptap/extension-strike/dist/index.js +81 -0
- package/node_modules/@tiptap/extension-strike/package.json +50 -0
- package/node_modules/@tiptap/extension-subscript/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-subscript/README.md +18 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.cjs +56 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.cts +39 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +39 -0
- package/node_modules/@tiptap/extension-subscript/dist/index.js +51 -0
- package/node_modules/@tiptap/extension-subscript/package.json +52 -0
- package/node_modules/@tiptap/extension-superscript/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-superscript/README.md +18 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.cjs +56 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.cts +39 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +39 -0
- package/node_modules/@tiptap/extension-superscript/dist/index.js +51 -0
- package/node_modules/@tiptap/extension-superscript/package.json +52 -0
- package/node_modules/@tiptap/extension-table/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-table/README.md +18 -0
- package/node_modules/@tiptap/extension-table/dist/cell/index.cjs +142 -0
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-table/dist/cell/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-table/dist/cell/index.js +141 -0
- package/node_modules/@tiptap/extension-table/dist/header/index.cjs +142 -0
- package/node_modules/@tiptap/extension-table/dist/header/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-table/dist/header/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-table/dist/header/index.js +141 -0
- package/node_modules/@tiptap/extension-table/dist/index.cjs +832 -0
- package/node_modules/@tiptap/extension-table/dist/index.d.cts +344 -0
- package/node_modules/@tiptap/extension-table/dist/index.d.ts +344 -0
- package/node_modules/@tiptap/extension-table/dist/index.js +819 -0
- package/node_modules/@tiptap/extension-table/dist/kit/index.cjs +817 -0
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.cts +265 -0
- package/node_modules/@tiptap/extension-table/dist/kit/index.d.ts +265 -0
- package/node_modules/@tiptap/extension-table/dist/kit/index.js +816 -0
- package/node_modules/@tiptap/extension-table/dist/row/index.cjs +29 -0
- package/node_modules/@tiptap/extension-table/dist/row/index.d.cts +35 -0
- package/node_modules/@tiptap/extension-table/dist/row/index.d.ts +35 -0
- package/node_modules/@tiptap/extension-table/dist/row/index.js +28 -0
- package/node_modules/@tiptap/extension-table/dist/table/index.cjs +616 -0
- package/node_modules/@tiptap/extension-table/dist/table/index.d.cts +254 -0
- package/node_modules/@tiptap/extension-table/dist/table/index.d.ts +254 -0
- package/node_modules/@tiptap/extension-table/dist/table/index.js +609 -0
- package/node_modules/@tiptap/extension-table/package.json +92 -0
- package/node_modules/@tiptap/extension-text/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-text/README.md +18 -0
- package/node_modules/@tiptap/extension-text/dist/index.cjs +28 -0
- package/node_modules/@tiptap/extension-text/dist/index.d.cts +10 -0
- package/node_modules/@tiptap/extension-text/dist/index.d.ts +10 -0
- package/node_modules/@tiptap/extension-text/dist/index.js +24 -0
- package/node_modules/@tiptap/extension-text/package.json +50 -0
- package/node_modules/@tiptap/extension-text-align/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-text-align/README.md +18 -0
- package/node_modules/@tiptap/extension-text-align/dist/index.cjs +73 -0
- package/node_modules/@tiptap/extension-text-align/dist/index.d.cts +53 -0
- package/node_modules/@tiptap/extension-text-align/dist/index.d.ts +53 -0
- package/node_modules/@tiptap/extension-text-align/dist/index.js +68 -0
- package/node_modules/@tiptap/extension-text-align/package.json +50 -0
- package/node_modules/@tiptap/extension-text-style/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-text-style/README.md +18 -0
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.cjs +121 -0
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.cts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.ts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/background-color/index.js +116 -0
- package/node_modules/@tiptap/extension-text-style/dist/color/index.cjs +121 -0
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.cts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/color/index.d.ts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/color/index.js +116 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.cjs +120 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.cts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.ts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-family/index.js +115 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.cjs +120 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.cts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.ts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/font-size/index.js +115 -0
- package/node_modules/@tiptap/extension-text-style/dist/index.cjs +298 -0
- package/node_modules/@tiptap/extension-text-style/dist/index.d.cts +275 -0
- package/node_modules/@tiptap/extension-text-style/dist/index.d.ts +275 -0
- package/node_modules/@tiptap/extension-text-style/dist/index.js +291 -0
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.cjs +120 -0
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.cts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.ts +161 -0
- package/node_modules/@tiptap/extension-text-style/dist/line-height/index.js +115 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.cjs +80 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.cts +170 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.ts +170 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style/index.js +79 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.cjs +292 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.cts +244 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.ts +244 -0
- package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.js +291 -0
- package/node_modules/@tiptap/extension-text-style/package.json +106 -0
- package/node_modules/@tiptap/extension-underline/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-underline/README.md +18 -0
- package/node_modules/@tiptap/extension-underline/dist/index.cjs +81 -0
- package/node_modules/@tiptap/extension-underline/dist/index.d.cts +39 -0
- package/node_modules/@tiptap/extension-underline/dist/index.d.ts +39 -0
- package/node_modules/@tiptap/extension-underline/dist/index.js +76 -0
- package/node_modules/@tiptap/extension-underline/package.json +50 -0
- package/node_modules/@tiptap/extension-youtube/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-youtube/README.md +18 -0
- package/node_modules/@tiptap/extension-youtube/dist/index.cjs +254 -0
- package/node_modules/@tiptap/extension-youtube/dist/index.d.cts +204 -0
- package/node_modules/@tiptap/extension-youtube/dist/index.d.ts +204 -0
- package/node_modules/@tiptap/extension-youtube/dist/index.js +246 -0
- package/node_modules/@tiptap/extension-youtube/package.json +50 -0
- package/node_modules/@tiptap/extensions/LICENSE.md +21 -0
- package/node_modules/@tiptap/extensions/README.md +18 -0
- package/node_modules/@tiptap/extensions/dist/character-count/index.cjs +87 -0
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.cts +70 -0
- package/node_modules/@tiptap/extensions/dist/character-count/index.d.ts +70 -0
- package/node_modules/@tiptap/extensions/dist/character-count/index.js +86 -0
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs +27 -0
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts +32 -0
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts +32 -0
- package/node_modules/@tiptap/extensions/dist/drop-cursor/index.js +26 -0
- package/node_modules/@tiptap/extensions/dist/focus/index.cjs +48 -0
- package/node_modules/@tiptap/extensions/dist/focus/index.d.cts +29 -0
- package/node_modules/@tiptap/extensions/dist/focus/index.d.ts +29 -0
- package/node_modules/@tiptap/extensions/dist/focus/index.js +47 -0
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs +29 -0
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts +26 -0
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts +26 -0
- package/node_modules/@tiptap/extensions/dist/gap-cursor/index.js +28 -0
- package/node_modules/@tiptap/extensions/dist/index.cjs +711 -0
- package/node_modules/@tiptap/extensions/dist/index.d.cts +321 -0
- package/node_modules/@tiptap/extensions/dist/index.d.ts +321 -0
- package/node_modules/@tiptap/extensions/dist/index.js +699 -0
- package/node_modules/@tiptap/extensions/dist/placeholder/index.cjs +372 -0
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts +91 -0
- package/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts +91 -0
- package/node_modules/@tiptap/extensions/dist/placeholder/index.js +368 -0
- package/node_modules/@tiptap/extensions/dist/selection/index.cjs +72 -0
- package/node_modules/@tiptap/extensions/dist/selection/index.d.cts +20 -0
- package/node_modules/@tiptap/extensions/dist/selection/index.d.ts +20 -0
- package/node_modules/@tiptap/extensions/dist/selection/index.js +71 -0
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs +62 -0
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts +30 -0
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts +30 -0
- package/node_modules/@tiptap/extensions/dist/trailing-node/index.js +60 -0
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs +48 -0
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts +45 -0
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts +45 -0
- package/node_modules/@tiptap/extensions/dist/undo-redo/index.js +47 -0
- package/node_modules/@tiptap/extensions/package.json +116 -0
- package/node_modules/@tiptap/pm/LICENSE +21 -0
- package/node_modules/@tiptap/pm/README.md +22 -0
- package/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md +47 -0
- package/node_modules/@tiptap/pm/changeset/index.ts +1 -0
- package/node_modules/@tiptap/pm/commands/index.ts +1 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/commands/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/history/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/model/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/state/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/tables/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/transform/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/view/index.cjs +9 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.js +2 -0
- package/node_modules/@tiptap/pm/dropcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/gapcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/history/index.ts +1 -0
- package/node_modules/@tiptap/pm/inputrules/index.ts +1 -0
- package/node_modules/@tiptap/pm/keymap/index.ts +1 -0
- package/node_modules/@tiptap/pm/model/index.ts +1 -0
- package/node_modules/@tiptap/pm/package.json +166 -0
- package/node_modules/@tiptap/pm/schema-list/index.ts +1 -0
- package/node_modules/@tiptap/pm/state/index.ts +1 -0
- package/node_modules/@tiptap/pm/tables/index.ts +1 -0
- package/node_modules/@tiptap/pm/transform/index.ts +1 -0
- package/node_modules/@tiptap/pm/view/index.ts +1 -0
- package/node_modules/@tiptap/react/LICENSE.md +21 -0
- package/node_modules/@tiptap/react/README.md +18 -0
- package/node_modules/@tiptap/react/dist/index.cjs +1396 -0
- package/node_modules/@tiptap/react/dist/index.d.cts +632 -0
- package/node_modules/@tiptap/react/dist/index.d.ts +632 -0
- package/node_modules/@tiptap/react/dist/index.js +1337 -0
- package/node_modules/@tiptap/react/dist/menus/index.cjs +469 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.cts +21 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.ts +21 -0
- package/node_modules/@tiptap/react/dist/menus/index.js +444 -0
- package/node_modules/@tiptap/react/package.json +80 -0
- package/node_modules/@tiptap/starter-kit/LICENSE.md +21 -0
- package/node_modules/@tiptap/starter-kit/README.md +18 -0
- package/node_modules/@tiptap/starter-kit/dist/index.cjs +76 -0
- package/node_modules/@tiptap/starter-kit/dist/index.d.cts +137 -0
- package/node_modules/@tiptap/starter-kit/dist/index.d.ts +137 -0
- package/node_modules/@tiptap/starter-kit/dist/index.js +71 -0
- package/node_modules/@tiptap/starter-kit/package.json +70 -0
- package/node_modules/@tiptap/suggestion/LICENSE.md +21 -0
- package/node_modules/@tiptap/suggestion/README.md +18 -0
- package/node_modules/@tiptap/suggestion/dist/index.cjs +665 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.cts +419 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.ts +419 -0
- package/node_modules/@tiptap/suggestion/dist/index.js +657 -0
- package/node_modules/@tiptap/suggestion/package.json +54 -0
- package/node_modules/@types/use-sync-external-store/LICENSE +21 -0
- package/node_modules/@types/use-sync-external-store/README.md +15 -0
- package/node_modules/@types/use-sync-external-store/index.d.ts +5 -0
- package/node_modules/@types/use-sync-external-store/package.json +30 -0
- package/node_modules/@types/use-sync-external-store/shim/index.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/with-selector.d.ts +7 -0
- package/node_modules/fast-equals/LICENSE +21 -0
- package/node_modules/fast-equals/README.md +479 -0
- package/node_modules/fast-equals/dist/cjs/index.cjs +796 -0
- package/node_modules/fast-equals/dist/cjs/index.d.cts +211 -0
- package/node_modules/fast-equals/dist/es/index.d.mts +211 -0
- package/node_modules/fast-equals/dist/es/index.mjs +785 -0
- package/node_modules/fast-equals/dist/umd/index.d.ts +211 -0
- package/node_modules/fast-equals/dist/umd/index.js +802 -0
- package/node_modules/fast-equals/index.d.ts +211 -0
- package/node_modules/fast-equals/package.json +120 -0
- package/node_modules/linkifyjs/LICENSE +19 -0
- package/node_modules/linkifyjs/README.md +47 -0
- package/node_modules/linkifyjs/dist/linkify.cjs +1854 -0
- package/node_modules/linkifyjs/dist/linkify.d.cts +637 -0
- package/node_modules/linkifyjs/dist/linkify.d.mts +637 -0
- package/node_modules/linkifyjs/dist/linkify.js +1859 -0
- package/node_modules/linkifyjs/dist/linkify.min.js +1 -0
- package/node_modules/linkifyjs/dist/linkify.mjs +1836 -0
- package/node_modules/linkifyjs/package.json +38 -0
- package/node_modules/orderedmap/LICENSE +19 -0
- package/node_modules/orderedmap/README.md +69 -0
- package/node_modules/orderedmap/dist/index.cjs +139 -0
- package/node_modules/orderedmap/dist/index.d.cts +33 -0
- package/node_modules/orderedmap/dist/index.d.ts +33 -0
- package/node_modules/orderedmap/dist/index.js +137 -0
- package/node_modules/orderedmap/package.json +39 -0
- package/node_modules/prosemirror-changeset/CHANGELOG.md +171 -0
- package/node_modules/prosemirror-changeset/LICENSE +19 -0
- package/node_modules/prosemirror-changeset/README.md +175 -0
- package/node_modules/prosemirror-changeset/dist/index.cjs +588 -0
- package/node_modules/prosemirror-changeset/dist/index.d.cts +187 -0
- package/node_modules/prosemirror-changeset/dist/index.d.ts +187 -0
- package/node_modules/prosemirror-changeset/dist/index.js +722 -0
- package/node_modules/prosemirror-changeset/package.json +40 -0
- package/node_modules/prosemirror-changeset/test/test-changed-range.ts +48 -0
- package/node_modules/prosemirror-changeset/test/test-changes.ts +211 -0
- package/node_modules/prosemirror-changeset/test/test-diff.ts +77 -0
- package/node_modules/prosemirror-changeset/test/test-merge.ts +56 -0
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +74 -0
- package/node_modules/prosemirror-commands/.tern-project +8 -0
- package/node_modules/prosemirror-commands/CHANGELOG.md +328 -0
- package/node_modules/prosemirror-commands/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-commands/LICENSE +19 -0
- package/node_modules/prosemirror-commands/README.md +28 -0
- package/node_modules/prosemirror-commands/dist/index.cjs +688 -0
- package/node_modules/prosemirror-commands/dist/index.d.cts +215 -0
- package/node_modules/prosemirror-commands/dist/index.d.ts +215 -0
- package/node_modules/prosemirror-commands/dist/index.js +852 -0
- package/node_modules/prosemirror-commands/package.json +39 -0
- package/node_modules/prosemirror-dropcursor/CHANGELOG.md +149 -0
- package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-dropcursor/LICENSE +19 -0
- package/node_modules/prosemirror-dropcursor/README.md +50 -0
- package/node_modules/prosemirror-dropcursor/dist/index.cjs +200 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.cts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.ts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.js +163 -0
- package/node_modules/prosemirror-dropcursor/package.json +38 -0
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +122 -0
- package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-gapcursor/LICENSE +19 -0
- package/node_modules/prosemirror-gapcursor/README.md +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +239 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.cts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.ts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.js +239 -0
- package/node_modules/prosemirror-gapcursor/package.json +43 -0
- package/node_modules/prosemirror-gapcursor/style/gapcursor.css +25 -0
- package/node_modules/prosemirror-history/.tern-project +8 -0
- package/node_modules/prosemirror-history/CHANGELOG.md +176 -0
- package/node_modules/prosemirror-history/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-history/LICENSE +19 -0
- package/node_modules/prosemirror-history/README.md +27 -0
- package/node_modules/prosemirror-history/dist/index.cjs +383 -0
- package/node_modules/prosemirror-history/dist/index.d.cts +64 -0
- package/node_modules/prosemirror-history/dist/index.d.ts +64 -0
- package/node_modules/prosemirror-history/dist/index.js +454 -0
- package/node_modules/prosemirror-history/package.json +40 -0
- package/node_modules/prosemirror-inputrules/.tern-project +8 -0
- package/node_modules/prosemirror-inputrules/CHANGELOG.md +127 -0
- package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-inputrules/LICENSE +19 -0
- package/node_modules/prosemirror-inputrules/README.md +29 -0
- package/node_modules/prosemirror-inputrules/dist/index.cjs +194 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.cts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.ts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.js +239 -0
- package/node_modules/prosemirror-inputrules/package.json +36 -0
- package/node_modules/prosemirror-keymap/.tern-project +8 -0
- package/node_modules/prosemirror-keymap/CHANGELOG.md +104 -0
- package/node_modules/prosemirror-keymap/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-keymap/LICENSE +19 -0
- package/node_modules/prosemirror-keymap/README.md +27 -0
- package/node_modules/prosemirror-keymap/dist/index.cjs +65 -0
- package/node_modules/prosemirror-keymap/dist/index.d.cts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.d.ts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.js +128 -0
- package/node_modules/prosemirror-keymap/package.json +38 -0
- package/node_modules/prosemirror-model/.tern-project +8 -0
- package/node_modules/prosemirror-model/CHANGELOG.md +782 -0
- package/node_modules/prosemirror-model/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-model/LICENSE +19 -0
- package/node_modules/prosemirror-model/README.md +29 -0
- package/node_modules/prosemirror-model/dist/index.cjs +2911 -0
- package/node_modules/prosemirror-model/dist/index.d.cts +1683 -0
- package/node_modules/prosemirror-model/dist/index.d.ts +1683 -0
- package/node_modules/prosemirror-model/dist/index.js +3463 -0
- package/node_modules/prosemirror-model/package.json +38 -0
- package/node_modules/prosemirror-schema-list/.tern-project +8 -0
- package/node_modules/prosemirror-schema-list/CHANGELOG.md +140 -0
- package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-schema-list/LICENSE +19 -0
- package/node_modules/prosemirror-schema-list/README.md +28 -0
- package/node_modules/prosemirror-schema-list/dist/index.cjs +253 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.cts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.ts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.js +289 -0
- package/node_modules/prosemirror-schema-list/package.json +40 -0
- package/node_modules/prosemirror-state/.tern-project +8 -0
- package/node_modules/prosemirror-state/CHANGELOG.md +296 -0
- package/node_modules/prosemirror-state/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-state/LICENSE +19 -0
- package/node_modules/prosemirror-state/README.md +28 -0
- package/node_modules/prosemirror-state/dist/index.cjs +884 -0
- package/node_modules/prosemirror-state/dist/index.d.cts +709 -0
- package/node_modules/prosemirror-state/dist/index.d.ts +709 -0
- package/node_modules/prosemirror-state/dist/index.js +1002 -0
- package/node_modules/prosemirror-state/package.json +39 -0
- package/node_modules/prosemirror-tables/LICENSE +19 -0
- package/node_modules/prosemirror-tables/README.md +254 -0
- package/node_modules/prosemirror-tables/dist/index.cjs +2683 -0
- package/node_modules/prosemirror-tables/dist/index.d.cts +751 -0
- package/node_modules/prosemirror-tables/dist/index.d.ts +751 -0
- package/node_modules/prosemirror-tables/dist/index.js +2626 -0
- package/node_modules/prosemirror-tables/package.json +80 -0
- package/node_modules/prosemirror-tables/style/tables.css +48 -0
- package/node_modules/prosemirror-transform/.tern-project +8 -0
- package/node_modules/prosemirror-transform/CHANGELOG.md +530 -0
- package/node_modules/prosemirror-transform/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-transform/LICENSE +19 -0
- package/node_modules/prosemirror-transform/README.md +29 -0
- package/node_modules/prosemirror-transform/dist/index.cjs +2014 -0
- package/node_modules/prosemirror-transform/dist/index.d.cts +857 -0
- package/node_modules/prosemirror-transform/dist/index.d.ts +857 -0
- package/node_modules/prosemirror-transform/dist/index.js +2272 -0
- package/node_modules/prosemirror-transform/package.json +37 -0
- package/node_modules/prosemirror-view/.tern-project +8 -0
- package/node_modules/prosemirror-view/CHANGELOG.md +2543 -0
- package/node_modules/prosemirror-view/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-view/LICENSE +19 -0
- package/node_modules/prosemirror-view/README.md +28 -0
- package/node_modules/prosemirror-view/dist/index.cjs +5549 -0
- package/node_modules/prosemirror-view/dist/index.d.cts +913 -0
- package/node_modules/prosemirror-view/dist/index.d.ts +913 -0
- package/node_modules/prosemirror-view/dist/index.js +6053 -0
- package/node_modules/prosemirror-view/package.json +43 -0
- package/node_modules/prosemirror-view/style/prosemirror.css +54 -0
- package/node_modules/rope-sequence/LICENSE +19 -0
- package/node_modules/rope-sequence/README.md +63 -0
- package/node_modules/rope-sequence/dist/index.cjs +209 -0
- package/node_modules/rope-sequence/dist/index.d.cts +11 -0
- package/node_modules/rope-sequence/dist/index.d.ts +11 -0
- package/node_modules/rope-sequence/dist/index.js +207 -0
- package/node_modules/rope-sequence/index.js +190 -0
- package/node_modules/rope-sequence/package.json +34 -0
- package/node_modules/rope-sequence/test.js +78 -0
- package/node_modules/use-sync-external-store/LICENSE +21 -0
- package/node_modules/use-sync-external-store/README.md +5 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
- package/node_modules/use-sync-external-store/index.js +7 -0
- package/node_modules/use-sync-external-store/package.json +43 -0
- package/node_modules/use-sync-external-store/shim/index.js +7 -0
- package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
- package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
- package/node_modules/use-sync-external-store/with-selector.js +7 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +79 -4
- package/src/Editor.tsx +425 -0
- package/src/ask.tsx +154 -0
- package/src/basic.tsx +149 -0
- package/src/blockMeta.ts +42 -0
- package/src/blockops.ts +179 -0
- package/src/blocks.tsx +189 -0
- package/src/boundary.tsx +17 -0
- package/src/content.ts +22 -0
- package/src/dynamic.tsx +105 -0
- package/src/editor.css +345 -0
- package/src/extensions.ts +78 -0
- package/src/handle.tsx +188 -0
- package/src/handles.tsx +149 -0
- package/src/index.ts +29 -0
- package/src/insert.ts +9 -0
- package/src/inserter.tsx +163 -0
- package/src/inspector.tsx +237 -0
- package/src/labels.ts +135 -0
- package/src/layout.tsx +174 -0
- package/src/layoutUi.tsx +226 -0
- package/src/media.ts +31 -0
- package/src/nodes.tsx +107 -0
- package/src/outline.tsx +124 -0
- package/src/panels.ts +59 -0
- package/src/paste.ts +100 -0
- package/src/patterns.ts +129 -0
- package/src/rank.ts +22 -0
- package/src/registry.ts +20 -0
- package/src/styleattr.ts +55 -0
- package/src/stylepanel.tsx +275 -0
- package/src/synced.tsx +128 -0
- package/src/toolbar.tsx +238 -0
- package/src/types.ts +55 -0
- package/src/unknown.tsx +74 -0
- package/src/util.ts +3 -0
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _tiptap_core = require("@tiptap/core");
|
|
3
|
+
let _tiptap_pm_state = require("@tiptap/pm/state");
|
|
4
|
+
let _tiptap_pm_tables = require("@tiptap/pm/tables");
|
|
5
|
+
//#region src/utils/parseAlign.ts
|
|
6
|
+
/**
|
|
7
|
+
* Normalize unknown input into a supported table alignment
|
|
8
|
+
*
|
|
9
|
+
* @param value - A potential alignment value
|
|
10
|
+
* @returns A valid TableCellAlign value or null
|
|
11
|
+
*/
|
|
12
|
+
function normalizeTableCellAlign(value) {
|
|
13
|
+
if (value === "left" || value === "right" || value === "center") return value;
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parse table cell alignment from an HTML element
|
|
18
|
+
*
|
|
19
|
+
* Prefers inline style (${"`"}text-align${"`"}) and falls back to the legacy
|
|
20
|
+
* ${"`"}align${"`"} attribute.
|
|
21
|
+
*
|
|
22
|
+
* @param element - The table cell/header DOM element
|
|
23
|
+
* @returns A valid TableCellAlign value or null
|
|
24
|
+
*/
|
|
25
|
+
function parseAlign(element) {
|
|
26
|
+
const styleAlign = (element.style.textAlign || "").trim().toLowerCase();
|
|
27
|
+
const attrAlign = (element.getAttribute("align") || "").trim().toLowerCase();
|
|
28
|
+
return normalizeTableCellAlign(styleAlign || attrAlign);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Normalize alignment from a generic attrs object that may include an align field
|
|
32
|
+
*
|
|
33
|
+
* @param attributes - A node attrs-like object with an optional align field
|
|
34
|
+
* @returns A valid TableCellAlign value or null.
|
|
35
|
+
*/
|
|
36
|
+
function normalizeTableCellAlignFromAttributes(attributes) {
|
|
37
|
+
return normalizeTableCellAlign(attributes === null || attributes === void 0 ? void 0 : attributes.align);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create a reusable Tiptap attribute config for table alignment
|
|
41
|
+
*
|
|
42
|
+
* @returns A Tiptap Attribute definition that parses and renders table alignment
|
|
43
|
+
*/
|
|
44
|
+
function createAlignAttribute() {
|
|
45
|
+
return {
|
|
46
|
+
default: null,
|
|
47
|
+
parseHTML: (element) => parseAlign(element),
|
|
48
|
+
renderHTML: (attributes) => {
|
|
49
|
+
const align = normalizeTableCellAlign(attributes.align);
|
|
50
|
+
if (!(0, _tiptap_core.isValidCSSStyleValue)(align)) return {};
|
|
51
|
+
return { style: `text-align: ${align}` };
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/utils/parseColwidth.ts
|
|
57
|
+
/**
|
|
58
|
+
* reads the width of the `<col>` element matching a cell's column from the table's `<colgroup>`
|
|
59
|
+
*
|
|
60
|
+
* @param element - The table cell/header DOM element
|
|
61
|
+
* @returns - An array with the column width in pixels or null
|
|
62
|
+
*/
|
|
63
|
+
function parseColgroupWidth(element) {
|
|
64
|
+
var _table$querySelectorA;
|
|
65
|
+
const row = element.parentElement;
|
|
66
|
+
const table = element.closest("table");
|
|
67
|
+
if (!row || !table) return null;
|
|
68
|
+
const cellIndex = Array.from(row.children).indexOf(element);
|
|
69
|
+
const width = (_table$querySelectorA = table.querySelectorAll("colgroup > col")[cellIndex]) === null || _table$querySelectorA === void 0 ? void 0 : _table$querySelectorA.getAttribute("width");
|
|
70
|
+
return width ? [parseInt(width, 10)] : null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parse the column width/s of a table cell/header from an HTML element.
|
|
74
|
+
* it prefers the `colwidth` attribute and if not-provided falls back to the `width` attribute
|
|
75
|
+
* of the matching `<col>` element in the table's `<colgroup>`.
|
|
76
|
+
*
|
|
77
|
+
* @param element - The table cell/header DOM element
|
|
78
|
+
* @returns - An array of column widths in pixels or null
|
|
79
|
+
*/
|
|
80
|
+
function parseColwidth(element) {
|
|
81
|
+
const colwidth = element.getAttribute("colwidth");
|
|
82
|
+
if (colwidth) return colwidth.split(",").map((width) => parseInt(width, 10));
|
|
83
|
+
return parseColgroupWidth(element);
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/utils/fillEmptyCellContent.ts
|
|
87
|
+
const COLLAPSIBLE_WHITESPACE = /[ \t\r\n\f]+/g;
|
|
88
|
+
/** Whether a cell/header element has no child elements and only collapsible whitespace. */
|
|
89
|
+
function isEmptyCellElement(element) {
|
|
90
|
+
var _element$textContent;
|
|
91
|
+
if (element.children.length > 0) return false;
|
|
92
|
+
return ((_element$textContent = element.textContent) !== null && _element$textContent !== void 0 ? _element$textContent : "").replace(COLLAPSIBLE_WHITESPACE, "") === "";
|
|
93
|
+
}
|
|
94
|
+
/** Builds a cell/header's minimal `block+` content, derived from the node type. */
|
|
95
|
+
function fillEmptyCellContent(cellType) {
|
|
96
|
+
const filled = cellType.createAndFill();
|
|
97
|
+
if (!filled) throw new Error(`[tiptap error]: "${cellType.name}" has no default content to backfill.`);
|
|
98
|
+
return filled.content;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/utils/omitDefaultSpanAttribute.ts
|
|
102
|
+
function omitDefaultSpanAttribute(attributes, renderedAttributes, name) {
|
|
103
|
+
if (!(name in renderedAttributes)) return;
|
|
104
|
+
const value = renderedAttributes[name];
|
|
105
|
+
if (value === 1 || value === "1" || value === null || value === void 0) delete attributes[name];
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/cell/table-cell.ts
|
|
109
|
+
/**
|
|
110
|
+
* This extension allows you to create table cells.
|
|
111
|
+
* @see https://www.tiptap.dev/api/nodes/table-cell
|
|
112
|
+
*/
|
|
113
|
+
const TableCell = _tiptap_core.Node.create({
|
|
114
|
+
name: "tableCell",
|
|
115
|
+
addOptions() {
|
|
116
|
+
return { HTMLAttributes: {} };
|
|
117
|
+
},
|
|
118
|
+
content: "block+",
|
|
119
|
+
addAttributes() {
|
|
120
|
+
return {
|
|
121
|
+
colspan: { default: 1 },
|
|
122
|
+
rowspan: { default: 1 },
|
|
123
|
+
colwidth: {
|
|
124
|
+
default: null,
|
|
125
|
+
parseHTML: parseColwidth
|
|
126
|
+
},
|
|
127
|
+
align: createAlignAttribute()
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
tableRole: "cell",
|
|
131
|
+
isolating: true,
|
|
132
|
+
parseHTML() {
|
|
133
|
+
return [{
|
|
134
|
+
tag: "td",
|
|
135
|
+
getAttrs: (node) => isEmptyCellElement(node) ? {} : false,
|
|
136
|
+
getContent: (_node, schema) => fillEmptyCellContent(schema.nodes[this.name])
|
|
137
|
+
}, { tag: "td" }];
|
|
138
|
+
},
|
|
139
|
+
renderHTML({ HTMLAttributes }) {
|
|
140
|
+
const attributes = (0, _tiptap_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes);
|
|
141
|
+
omitDefaultSpanAttribute(attributes, HTMLAttributes, "colspan");
|
|
142
|
+
omitDefaultSpanAttribute(attributes, HTMLAttributes, "rowspan");
|
|
143
|
+
return [
|
|
144
|
+
"td",
|
|
145
|
+
attributes,
|
|
146
|
+
0
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/header/table-header.ts
|
|
152
|
+
/**
|
|
153
|
+
* This extension allows you to create table headers.
|
|
154
|
+
* @see https://www.tiptap.dev/api/nodes/table-header
|
|
155
|
+
*/
|
|
156
|
+
const TableHeader = _tiptap_core.Node.create({
|
|
157
|
+
name: "tableHeader",
|
|
158
|
+
addOptions() {
|
|
159
|
+
return { HTMLAttributes: {} };
|
|
160
|
+
},
|
|
161
|
+
content: "block+",
|
|
162
|
+
addAttributes() {
|
|
163
|
+
return {
|
|
164
|
+
colspan: { default: 1 },
|
|
165
|
+
rowspan: { default: 1 },
|
|
166
|
+
colwidth: {
|
|
167
|
+
default: null,
|
|
168
|
+
parseHTML: parseColwidth
|
|
169
|
+
},
|
|
170
|
+
align: createAlignAttribute()
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
tableRole: "header_cell",
|
|
174
|
+
isolating: true,
|
|
175
|
+
parseHTML() {
|
|
176
|
+
return [{
|
|
177
|
+
tag: "th",
|
|
178
|
+
getAttrs: (node) => isEmptyCellElement(node) ? {} : false,
|
|
179
|
+
getContent: (_node, schema) => fillEmptyCellContent(schema.nodes[this.name])
|
|
180
|
+
}, { tag: "th" }];
|
|
181
|
+
},
|
|
182
|
+
renderHTML({ HTMLAttributes }) {
|
|
183
|
+
const attributes = (0, _tiptap_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes);
|
|
184
|
+
omitDefaultSpanAttribute(attributes, HTMLAttributes, "colspan");
|
|
185
|
+
omitDefaultSpanAttribute(attributes, HTMLAttributes, "rowspan");
|
|
186
|
+
return [
|
|
187
|
+
"th",
|
|
188
|
+
attributes,
|
|
189
|
+
0
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/row/table-row.ts
|
|
195
|
+
/**
|
|
196
|
+
* This extension allows you to create table rows.
|
|
197
|
+
* @see https://www.tiptap.dev/api/nodes/table-row
|
|
198
|
+
*/
|
|
199
|
+
const TableRow = _tiptap_core.Node.create({
|
|
200
|
+
name: "tableRow",
|
|
201
|
+
addOptions() {
|
|
202
|
+
return { HTMLAttributes: {} };
|
|
203
|
+
},
|
|
204
|
+
content: "(tableCell | tableHeader)*",
|
|
205
|
+
tableRole: "row",
|
|
206
|
+
parseHTML() {
|
|
207
|
+
return [{ tag: "tr" }];
|
|
208
|
+
},
|
|
209
|
+
renderHTML({ HTMLAttributes }) {
|
|
210
|
+
return [
|
|
211
|
+
"tr",
|
|
212
|
+
(0, _tiptap_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes),
|
|
213
|
+
0
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/table/utilities/colStyle.ts
|
|
219
|
+
function getColStyleDeclaration(minWidth, width) {
|
|
220
|
+
if (width) return ["width", `${Math.max(width, minWidth)}px`];
|
|
221
|
+
return ["min-width", `${minWidth}px`];
|
|
222
|
+
}
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/table/TableView.ts
|
|
225
|
+
function updateColumns(node, colgroup, table, cellMinWidth, overrideCol, overrideValue) {
|
|
226
|
+
let totalWidth = 0;
|
|
227
|
+
let fixedWidth = true;
|
|
228
|
+
let nextDOM = colgroup.firstChild;
|
|
229
|
+
const row = node.firstChild;
|
|
230
|
+
if (row !== null) for (let i = 0, col = 0; i < row.childCount; i += 1) {
|
|
231
|
+
const { colspan, colwidth } = row.child(i).attrs;
|
|
232
|
+
for (let j = 0; j < colspan; j += 1, col += 1) {
|
|
233
|
+
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
|
|
234
|
+
const cssWidth = hasWidth ? `${hasWidth}px` : "";
|
|
235
|
+
totalWidth += hasWidth || cellMinWidth;
|
|
236
|
+
if (!hasWidth) fixedWidth = false;
|
|
237
|
+
if (!nextDOM) {
|
|
238
|
+
const colElement = document.createElement("col");
|
|
239
|
+
const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
240
|
+
colElement.style.setProperty(propertyKey, propertyValue);
|
|
241
|
+
colgroup.appendChild(colElement);
|
|
242
|
+
} else {
|
|
243
|
+
if (nextDOM.style.width !== cssWidth) {
|
|
244
|
+
const [propertyKey, propertyValue] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
245
|
+
nextDOM.style.setProperty(propertyKey, propertyValue);
|
|
246
|
+
}
|
|
247
|
+
nextDOM = nextDOM.nextSibling;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
while (nextDOM) {
|
|
252
|
+
var _nextDOM$parentNode;
|
|
253
|
+
const after = nextDOM.nextSibling;
|
|
254
|
+
(_nextDOM$parentNode = nextDOM.parentNode) === null || _nextDOM$parentNode === void 0 || _nextDOM$parentNode.removeChild(nextDOM);
|
|
255
|
+
nextDOM = after;
|
|
256
|
+
}
|
|
257
|
+
const hasUserWidth = node.attrs.style && typeof node.attrs.style === "string" && /\bwidth\s*:/i.test(node.attrs.style);
|
|
258
|
+
if (fixedWidth && !hasUserWidth) {
|
|
259
|
+
table.style.width = `${totalWidth}px`;
|
|
260
|
+
table.style.minWidth = "";
|
|
261
|
+
} else {
|
|
262
|
+
table.style.width = "";
|
|
263
|
+
table.style.minWidth = `${totalWidth}px`;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
var TableView = class {
|
|
267
|
+
constructor(node, cellMinWidth, _view, HTMLAttributes = {}) {
|
|
268
|
+
this.node = node;
|
|
269
|
+
this.cellMinWidth = cellMinWidth;
|
|
270
|
+
this.dom = document.createElement("div");
|
|
271
|
+
this.dom.className = "tableWrapper";
|
|
272
|
+
this.table = this.dom.appendChild(document.createElement("table"));
|
|
273
|
+
for (const [key, value] of Object.entries(HTMLAttributes)) if (value !== void 0 && value !== null) {
|
|
274
|
+
if (key === "style") this.table.style.cssText = String(value);
|
|
275
|
+
else this.table.setAttribute(key, String(value));
|
|
276
|
+
}
|
|
277
|
+
if (node.attrs.style) this.table.style.cssText = node.attrs.style;
|
|
278
|
+
this.colgroup = this.table.appendChild(document.createElement("colgroup"));
|
|
279
|
+
updateColumns(node, this.colgroup, this.table, cellMinWidth);
|
|
280
|
+
this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
281
|
+
}
|
|
282
|
+
update(node) {
|
|
283
|
+
if (node.type !== this.node.type) return false;
|
|
284
|
+
this.node = node;
|
|
285
|
+
updateColumns(node, this.colgroup, this.table, this.cellMinWidth);
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
ignoreMutation(mutation) {
|
|
289
|
+
const target = mutation.target;
|
|
290
|
+
const isInsideWrapper = this.dom.contains(target);
|
|
291
|
+
const isInsideContent = this.contentDOM.contains(target);
|
|
292
|
+
if (isInsideWrapper && !isInsideContent) {
|
|
293
|
+
if (mutation.type === "attributes" || mutation.type === "childList" || mutation.type === "characterData") return true;
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/table/utilities/createColGroup.ts
|
|
300
|
+
function createColGroup(node, cellMinWidth, overrideCol, overrideValue) {
|
|
301
|
+
let totalWidth = 0;
|
|
302
|
+
let fixedWidth = true;
|
|
303
|
+
const cols = [];
|
|
304
|
+
const row = node.firstChild;
|
|
305
|
+
if (!row) return {};
|
|
306
|
+
for (let i = 0, col = 0; i < row.childCount; i += 1) {
|
|
307
|
+
const { colspan, colwidth } = row.child(i).attrs;
|
|
308
|
+
for (let j = 0; j < colspan; j += 1, col += 1) {
|
|
309
|
+
const hasWidth = overrideCol === col ? overrideValue : colwidth && colwidth[j];
|
|
310
|
+
totalWidth += hasWidth || cellMinWidth;
|
|
311
|
+
if (!hasWidth) fixedWidth = false;
|
|
312
|
+
const [property, value] = getColStyleDeclaration(cellMinWidth, hasWidth);
|
|
313
|
+
cols.push(["col", { style: `${property}: ${value}` }]);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
const tableWidth = fixedWidth ? `${totalWidth}px` : "";
|
|
317
|
+
const tableMinWidth = fixedWidth ? "" : `${totalWidth}px`;
|
|
318
|
+
return {
|
|
319
|
+
colgroup: [
|
|
320
|
+
"colgroup",
|
|
321
|
+
{},
|
|
322
|
+
...cols
|
|
323
|
+
],
|
|
324
|
+
tableWidth,
|
|
325
|
+
tableMinWidth
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/table/utilities/createCell.ts
|
|
330
|
+
function createCell(cellType, cellContent) {
|
|
331
|
+
if (cellContent) return cellType.createChecked(null, cellContent);
|
|
332
|
+
return cellType.createAndFill();
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/table/utilities/getTableNodeTypes.ts
|
|
336
|
+
function getTableNodeTypes(schema) {
|
|
337
|
+
if (schema.cached.tableNodeTypes) return schema.cached.tableNodeTypes;
|
|
338
|
+
const roles = {};
|
|
339
|
+
Object.keys(schema.nodes).forEach((type) => {
|
|
340
|
+
const nodeType = schema.nodes[type];
|
|
341
|
+
if (nodeType.spec.tableRole) roles[nodeType.spec.tableRole] = nodeType;
|
|
342
|
+
});
|
|
343
|
+
schema.cached.tableNodeTypes = roles;
|
|
344
|
+
return roles;
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/table/utilities/createTable.ts
|
|
348
|
+
function createTable(schema, rowsCount, colsCount, withHeaderRow, cellContent) {
|
|
349
|
+
const types = getTableNodeTypes(schema);
|
|
350
|
+
const headerCells = [];
|
|
351
|
+
const cells = [];
|
|
352
|
+
for (let index = 0; index < colsCount; index += 1) {
|
|
353
|
+
const cell = createCell(types.cell, cellContent);
|
|
354
|
+
if (cell) cells.push(cell);
|
|
355
|
+
if (withHeaderRow) {
|
|
356
|
+
const headerCell = createCell(types.header_cell, cellContent);
|
|
357
|
+
if (headerCell) headerCells.push(headerCell);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const rows = [];
|
|
361
|
+
for (let index = 0; index < rowsCount; index += 1) rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells));
|
|
362
|
+
return types.table.createChecked(null, rows);
|
|
363
|
+
}
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/table/utilities/isCellSelection.ts
|
|
366
|
+
function isCellSelection(value) {
|
|
367
|
+
return value instanceof _tiptap_pm_tables.CellSelection;
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/table/utilities/deleteTableWhenAllCellsSelected.ts
|
|
371
|
+
const deleteTableWhenAllCellsSelected = ({ editor }) => {
|
|
372
|
+
const { selection } = editor.state;
|
|
373
|
+
if (!isCellSelection(selection)) return false;
|
|
374
|
+
let cellCount = 0;
|
|
375
|
+
const table = (0, _tiptap_core.findParentNodeClosestToPos)(selection.ranges[0].$from, (node) => {
|
|
376
|
+
return node.type.name === "table";
|
|
377
|
+
});
|
|
378
|
+
table === null || table === void 0 || table.node.descendants((node) => {
|
|
379
|
+
if (node.type.name === "table") return false;
|
|
380
|
+
if (["tableCell", "tableHeader"].includes(node.type.name)) cellCount += 1;
|
|
381
|
+
});
|
|
382
|
+
if (!(cellCount === selection.ranges.length)) return false;
|
|
383
|
+
editor.commands.deleteTable();
|
|
384
|
+
return true;
|
|
385
|
+
};
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/table/utilities/keepCursorInTable.ts
|
|
388
|
+
function keepCursorInTable(tr, tablePos) {
|
|
389
|
+
const mappedTablePos = tr.mapping.map(tablePos);
|
|
390
|
+
const stillInTable = (0, _tiptap_core.findParentNodeClosestToPos)(tr.selection.$from, (node) => node.type.name === "table");
|
|
391
|
+
if ((stillInTable === null || stillInTable === void 0 ? void 0 : stillInTable.pos) === mappedTablePos) return;
|
|
392
|
+
const tableNode = tr.doc.nodeAt(mappedTablePos);
|
|
393
|
+
if (!tableNode) return;
|
|
394
|
+
const endOfTable = mappedTablePos + tableNode.nodeSize - 1;
|
|
395
|
+
tr.setSelection(_tiptap_pm_state.TextSelection.near(tr.doc.resolve(endOfTable), -1));
|
|
396
|
+
}
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/table/utilities/markdown.ts
|
|
399
|
+
const DEFAULT_CELL_LINE_SEPARATOR = "";
|
|
400
|
+
/**
|
|
401
|
+
* Walk a single table-row line and escape any `|` characters that appear
|
|
402
|
+
* inside backtick code spans so marked's cell splitter ignores them.
|
|
403
|
+
* Backslash escape sequences outside code spans are passed through untouched.
|
|
404
|
+
* If a backtick run has no matching closer on the same line it is emitted
|
|
405
|
+
* as-is — no over-escaping for malformed input.
|
|
406
|
+
*/
|
|
407
|
+
function escapeTableCellPipes(line) {
|
|
408
|
+
let result = "";
|
|
409
|
+
let i = 0;
|
|
410
|
+
while (i < line.length) {
|
|
411
|
+
if (line[i] === "\\" && i + 1 < line.length) {
|
|
412
|
+
result += line[i] + line[i + 1];
|
|
413
|
+
i += 2;
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
if (line[i] !== "`") {
|
|
417
|
+
result += line[i++];
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
let runLen = 0;
|
|
421
|
+
while (i + runLen < line.length && line[i + runLen] === "`") runLen += 1;
|
|
422
|
+
let j = i + runLen;
|
|
423
|
+
let found = false;
|
|
424
|
+
while (j < line.length) {
|
|
425
|
+
if (line[j] !== "`") {
|
|
426
|
+
j += 1;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
let closeLen = 0;
|
|
430
|
+
while (j + closeLen < line.length && line[j + closeLen] === "`") closeLen += 1;
|
|
431
|
+
if (closeLen === runLen) {
|
|
432
|
+
const spanContent = line.slice(i + runLen, j);
|
|
433
|
+
result += line.slice(i, i + runLen) + spanContent.replace(/\\\||\|/g, (match) => match === "|" ? "\\|" : match) + line.slice(j, j + runLen);
|
|
434
|
+
i = j + runLen;
|
|
435
|
+
found = true;
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
j += closeLen;
|
|
439
|
+
}
|
|
440
|
+
if (!found) {
|
|
441
|
+
result += line.slice(i, i + runLen);
|
|
442
|
+
i += runLen;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return result;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Escape pipe characters inside backtick code spans on table-row lines.
|
|
449
|
+
* marked's `splitCells` only recognises backslash-escaped pipes (`\|`) and
|
|
450
|
+
* splits on every other `|`, so \`a || b\` in a table cell would be treated
|
|
451
|
+
* as multiple column delimiters. Escaping them here lets `splitCells` skip
|
|
452
|
+
* them; it already converts `\|` → `|` after splitting, so the cell content
|
|
453
|
+
* is restored correctly.
|
|
454
|
+
*/
|
|
455
|
+
function preprocessTablePipes(src) {
|
|
456
|
+
return src.split("\n").map((line) => {
|
|
457
|
+
if (!line.includes("|") || !line.includes("`")) return line;
|
|
458
|
+
return escapeTableCellPipes(line);
|
|
459
|
+
}).join("\n");
|
|
460
|
+
}
|
|
461
|
+
function collapseWhitespace(s) {
|
|
462
|
+
return (s || "").replaceAll("", " ").replace(/\s+/g, " ").trim();
|
|
463
|
+
}
|
|
464
|
+
function replaceCellLineSeparator(value, cellLineSeparator) {
|
|
465
|
+
if (!cellLineSeparator) return value;
|
|
466
|
+
return value.split(cellLineSeparator).join("\n");
|
|
467
|
+
}
|
|
468
|
+
function escapePipesInCellText(text) {
|
|
469
|
+
return text.replace(/\\.|\|/g, (match) => match === "|" ? "\\|" : match);
|
|
470
|
+
}
|
|
471
|
+
function renderTableToMarkdown(node, h, options = {}) {
|
|
472
|
+
if (!node || !node.content || node.content.length === 0) return "";
|
|
473
|
+
const rows = [];
|
|
474
|
+
node.content.forEach((rowNode) => {
|
|
475
|
+
const cells = [];
|
|
476
|
+
if (rowNode.content) rowNode.content.forEach((cellNode) => {
|
|
477
|
+
let raw = "";
|
|
478
|
+
if (cellNode.content && Array.isArray(cellNode.content) && cellNode.content.length > 1) raw = cellNode.content.map((child) => replaceCellLineSeparator(h.renderChildren(child), options.cellLineSeparator)).join("\n");
|
|
479
|
+
else raw = replaceCellLineSeparator(cellNode.content ? h.renderChildren(cellNode.content) : "", options.cellLineSeparator);
|
|
480
|
+
const text = escapePipesInCellText(collapseWhitespace(raw.replace(/[ \t]*\r?\n[ \t]*/g, "<br>")));
|
|
481
|
+
const isHeader = cellNode.type === "tableHeader";
|
|
482
|
+
const align = normalizeTableCellAlignFromAttributes(cellNode.attrs);
|
|
483
|
+
cells.push({
|
|
484
|
+
text,
|
|
485
|
+
isHeader,
|
|
486
|
+
align
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
rows.push(cells);
|
|
490
|
+
});
|
|
491
|
+
const columnCount = rows.reduce((max, r) => Math.max(max, r.length), 0);
|
|
492
|
+
if (columnCount === 0) return "";
|
|
493
|
+
const colWidths = Array.from({ length: columnCount }).fill(0);
|
|
494
|
+
rows.forEach((r) => {
|
|
495
|
+
for (let i = 0; i < columnCount; i += 1) {
|
|
496
|
+
var _r$i;
|
|
497
|
+
const len = (((_r$i = r[i]) === null || _r$i === void 0 ? void 0 : _r$i.text) || "").length;
|
|
498
|
+
if (len > colWidths[i]) colWidths[i] = len;
|
|
499
|
+
if (colWidths[i] < 3) colWidths[i] = 3;
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
const pad = (s, width) => s + " ".repeat(Math.max(0, width - s.length));
|
|
503
|
+
const headerRow = rows[0];
|
|
504
|
+
const hasHeader = headerRow.some((c) => c.isHeader);
|
|
505
|
+
const colAlignments = Array.from({ length: columnCount }).fill(null);
|
|
506
|
+
rows.forEach((r) => {
|
|
507
|
+
for (let i = 0; i < columnCount; i += 1) {
|
|
508
|
+
var _r$i2;
|
|
509
|
+
if (!colAlignments[i] && ((_r$i2 = r[i]) === null || _r$i2 === void 0 ? void 0 : _r$i2.align)) colAlignments[i] = r[i].align;
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
let out = "\n";
|
|
513
|
+
const headerTexts = Array.from({ length: columnCount }).map((_, i) => hasHeader ? headerRow[i] && headerRow[i].text || "" : "");
|
|
514
|
+
out += `| ${headerTexts.map((t, i) => pad(t, colWidths[i])).join(" | ")} |\n`;
|
|
515
|
+
out += `| ${colWidths.map((w, index) => {
|
|
516
|
+
const dashCount = Math.max(3, w);
|
|
517
|
+
const alignment = colAlignments[index];
|
|
518
|
+
if (alignment === "left") return `:${"-".repeat(dashCount)}`;
|
|
519
|
+
if (alignment === "right") return `${"-".repeat(dashCount)}:`;
|
|
520
|
+
if (alignment === "center") return `:${"-".repeat(dashCount)}:`;
|
|
521
|
+
return "-".repeat(dashCount);
|
|
522
|
+
}).join(" | ")} |\n`;
|
|
523
|
+
(hasHeader ? rows.slice(1) : rows).forEach((r) => {
|
|
524
|
+
out += `| ${Array.from({ length: columnCount }).fill(0).map((_, i) => pad(r[i] && r[i].text || "", colWidths[i])).join(" | ")} |\n`;
|
|
525
|
+
});
|
|
526
|
+
return out;
|
|
527
|
+
}
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region src/table/utilities/preserveCellSelectionOnContextMenu.ts
|
|
530
|
+
const preserveCellSelectionOnContextMenuPluginKey = new _tiptap_pm_state.PluginKey("preserveCellSelectionOnContextMenu");
|
|
531
|
+
function resolveClickPos(view, event) {
|
|
532
|
+
const coords = view.posAtCoords({
|
|
533
|
+
left: event.clientX,
|
|
534
|
+
top: event.clientY
|
|
535
|
+
});
|
|
536
|
+
if (coords) return coords.pos;
|
|
537
|
+
if (!(event.target instanceof Node)) return null;
|
|
538
|
+
try {
|
|
539
|
+
return view.posAtDOM(event.target, 0);
|
|
540
|
+
} catch {
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function isPosInsideCellSelection(selection, pos) {
|
|
545
|
+
let inside = false;
|
|
546
|
+
selection.forEachCell((cell, cellPos) => {
|
|
547
|
+
if (pos >= cellPos && pos < cellPos + cell.nodeSize) inside = true;
|
|
548
|
+
});
|
|
549
|
+
return inside;
|
|
550
|
+
}
|
|
551
|
+
function preserveCellSelectionOnContextMenu() {
|
|
552
|
+
return new _tiptap_pm_state.Plugin({
|
|
553
|
+
key: preserveCellSelectionOnContextMenuPluginKey,
|
|
554
|
+
props: { handleDOMEvents: { mousedown(view, event) {
|
|
555
|
+
if (event.button !== 2) return false;
|
|
556
|
+
const { selection } = view.state;
|
|
557
|
+
if (!isCellSelection(selection) || selection.ranges.length < 2) return false;
|
|
558
|
+
const clickPos = resolveClickPos(view, event);
|
|
559
|
+
if (clickPos == null || !isPosInsideCellSelection(selection, clickPos)) return false;
|
|
560
|
+
event.preventDefault();
|
|
561
|
+
return true;
|
|
562
|
+
} } }
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region src/table/table.ts
|
|
567
|
+
/**
|
|
568
|
+
* This extension allows you to create tables.
|
|
569
|
+
* @see https://www.tiptap.dev/api/nodes/table
|
|
570
|
+
*/
|
|
571
|
+
const Table = _tiptap_core.Node.create({
|
|
572
|
+
name: "table",
|
|
573
|
+
addOptions() {
|
|
574
|
+
return {
|
|
575
|
+
HTMLAttributes: {},
|
|
576
|
+
resizable: false,
|
|
577
|
+
renderWrapper: false,
|
|
578
|
+
handleWidth: 5,
|
|
579
|
+
cellMinWidth: 25,
|
|
580
|
+
View: TableView,
|
|
581
|
+
lastColumnResizable: true,
|
|
582
|
+
allowTableNodeSelection: false
|
|
583
|
+
};
|
|
584
|
+
},
|
|
585
|
+
content: "tableRow+",
|
|
586
|
+
tableRole: "table",
|
|
587
|
+
isolating: true,
|
|
588
|
+
group: "block",
|
|
589
|
+
parseHTML() {
|
|
590
|
+
return [{ tag: "table" }];
|
|
591
|
+
},
|
|
592
|
+
renderHTML({ node, HTMLAttributes }) {
|
|
593
|
+
const { colgroup, tableWidth, tableMinWidth } = createColGroup(node, this.options.cellMinWidth);
|
|
594
|
+
const userStyles = HTMLAttributes.style;
|
|
595
|
+
function getTableStyle() {
|
|
596
|
+
if (userStyles) return userStyles;
|
|
597
|
+
return tableWidth ? `width: ${tableWidth}` : `min-width: ${tableMinWidth}`;
|
|
598
|
+
}
|
|
599
|
+
const table = [
|
|
600
|
+
"table",
|
|
601
|
+
(0, _tiptap_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes, { style: getTableStyle() }),
|
|
602
|
+
colgroup,
|
|
603
|
+
["tbody", 0]
|
|
604
|
+
];
|
|
605
|
+
return this.options.renderWrapper ? [
|
|
606
|
+
"div",
|
|
607
|
+
{ class: "tableWrapper" },
|
|
608
|
+
table
|
|
609
|
+
] : table;
|
|
610
|
+
},
|
|
611
|
+
parseMarkdown: (token, h) => {
|
|
612
|
+
const rows = [];
|
|
613
|
+
const alignments = Array.isArray(token.align) ? token.align : [];
|
|
614
|
+
if (token.header) {
|
|
615
|
+
const headerCells = [];
|
|
616
|
+
token.header.forEach((cell, index) => {
|
|
617
|
+
var _alignments$index;
|
|
618
|
+
const align = normalizeTableCellAlign((_alignments$index = alignments[index]) !== null && _alignments$index !== void 0 ? _alignments$index : cell.align);
|
|
619
|
+
const attrs = align ? { align } : {};
|
|
620
|
+
headerCells.push(h.createNode("tableHeader", attrs, [{
|
|
621
|
+
type: "paragraph",
|
|
622
|
+
content: h.parseInline(cell.tokens)
|
|
623
|
+
}]));
|
|
624
|
+
});
|
|
625
|
+
rows.push(h.createNode("tableRow", {}, headerCells));
|
|
626
|
+
}
|
|
627
|
+
if (token.rows) token.rows.forEach((row) => {
|
|
628
|
+
const bodyCells = [];
|
|
629
|
+
row.forEach((cell, index) => {
|
|
630
|
+
var _alignments$index2;
|
|
631
|
+
const align = normalizeTableCellAlign((_alignments$index2 = alignments[index]) !== null && _alignments$index2 !== void 0 ? _alignments$index2 : cell.align);
|
|
632
|
+
const attrs = align ? { align } : {};
|
|
633
|
+
bodyCells.push(h.createNode("tableCell", attrs, [{
|
|
634
|
+
type: "paragraph",
|
|
635
|
+
content: h.parseInline(cell.tokens)
|
|
636
|
+
}]));
|
|
637
|
+
});
|
|
638
|
+
rows.push(h.createNode("tableRow", {}, bodyCells));
|
|
639
|
+
});
|
|
640
|
+
return h.createNode("table", void 0, rows);
|
|
641
|
+
},
|
|
642
|
+
renderMarkdown: (node, h) => {
|
|
643
|
+
return renderTableToMarkdown(node, h);
|
|
644
|
+
},
|
|
645
|
+
markdownTokenizer: {
|
|
646
|
+
name: "table",
|
|
647
|
+
level: "block",
|
|
648
|
+
start: (src) => {
|
|
649
|
+
const lines = src.split("\n");
|
|
650
|
+
if (lines.length < 2) return -1;
|
|
651
|
+
const sep = lines[1];
|
|
652
|
+
if (!/^[ \t|:]*-[ \t|:-]*$/.test(sep) || !sep.includes("|")) return -1;
|
|
653
|
+
return lines[0].includes("|") ? 0 : -1;
|
|
654
|
+
},
|
|
655
|
+
tokenize(src, _tokens, helper) {
|
|
656
|
+
const blankLineIndex = src.indexOf("\n\n");
|
|
657
|
+
const candidate = blankLineIndex >= 0 ? src.slice(0, blankLineIndex) : src;
|
|
658
|
+
const candidateLines = candidate.split("\n");
|
|
659
|
+
if (candidateLines.length < 2) return void 0;
|
|
660
|
+
const sep = candidateLines[1];
|
|
661
|
+
if (!/^[ \t|:]*-[ \t|:-]*$/.test(sep) || !sep.includes("|")) return void 0;
|
|
662
|
+
const preprocessed = preprocessTablePipes(candidate);
|
|
663
|
+
if (preprocessed === candidate) return void 0;
|
|
664
|
+
const tableToken = helper.blockTokens(preprocessed)[0];
|
|
665
|
+
if ((tableToken === null || tableToken === void 0 ? void 0 : tableToken.type) !== "table" || !tableToken.raw) return void 0;
|
|
666
|
+
const lineCount = tableToken.raw.split("\n").length;
|
|
667
|
+
const raw = src.split("\n").slice(0, lineCount).join("\n");
|
|
668
|
+
return {
|
|
669
|
+
...tableToken,
|
|
670
|
+
raw
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
addCommands() {
|
|
675
|
+
return {
|
|
676
|
+
insertTable: ({ rows = 3, cols = 3, withHeaderRow = true } = {}) => ({ tr, dispatch, editor }) => {
|
|
677
|
+
const node = createTable(editor.schema, rows, cols, withHeaderRow);
|
|
678
|
+
if (dispatch) {
|
|
679
|
+
const offset = tr.selection.from + 1;
|
|
680
|
+
tr.replaceSelectionWith(node).scrollIntoView().setSelection(_tiptap_pm_state.TextSelection.near(tr.doc.resolve(offset)));
|
|
681
|
+
}
|
|
682
|
+
return true;
|
|
683
|
+
},
|
|
684
|
+
addColumnBefore: () => ({ state, dispatch }) => {
|
|
685
|
+
return (0, _tiptap_pm_tables.addColumnBefore)(state, dispatch);
|
|
686
|
+
},
|
|
687
|
+
addColumnAfter: () => ({ state, dispatch }) => {
|
|
688
|
+
return (0, _tiptap_pm_tables.addColumnAfter)(state, dispatch);
|
|
689
|
+
},
|
|
690
|
+
deleteColumn: () => ({ state, dispatch }) => {
|
|
691
|
+
const table = (0, _tiptap_core.findParentNodeClosestToPos)(state.selection.$from, (node) => node.type.name === "table");
|
|
692
|
+
return (0, _tiptap_pm_tables.deleteColumn)(state, dispatch && ((tr) => {
|
|
693
|
+
if (table) keepCursorInTable(tr, table.pos);
|
|
694
|
+
dispatch(tr);
|
|
695
|
+
}));
|
|
696
|
+
},
|
|
697
|
+
addRowBefore: () => ({ state, dispatch }) => {
|
|
698
|
+
return (0, _tiptap_pm_tables.addRowBefore)(state, dispatch);
|
|
699
|
+
},
|
|
700
|
+
addRowAfter: () => ({ state, dispatch }) => {
|
|
701
|
+
return (0, _tiptap_pm_tables.addRowAfter)(state, dispatch);
|
|
702
|
+
},
|
|
703
|
+
deleteRow: () => ({ state, dispatch }) => {
|
|
704
|
+
const table = (0, _tiptap_core.findParentNodeClosestToPos)(state.selection.$from, (node) => node.type.name === "table");
|
|
705
|
+
return (0, _tiptap_pm_tables.deleteRow)(state, dispatch && ((tr) => {
|
|
706
|
+
if (table) keepCursorInTable(tr, table.pos);
|
|
707
|
+
dispatch(tr);
|
|
708
|
+
}));
|
|
709
|
+
},
|
|
710
|
+
deleteTable: () => ({ state, dispatch }) => {
|
|
711
|
+
return (0, _tiptap_pm_tables.deleteTable)(state, dispatch);
|
|
712
|
+
},
|
|
713
|
+
mergeCells: () => ({ state, dispatch }) => {
|
|
714
|
+
return (0, _tiptap_pm_tables.mergeCells)(state, dispatch);
|
|
715
|
+
},
|
|
716
|
+
splitCell: () => ({ state, dispatch }) => {
|
|
717
|
+
return (0, _tiptap_pm_tables.splitCell)(state, dispatch);
|
|
718
|
+
},
|
|
719
|
+
toggleHeaderColumn: () => ({ state, dispatch }) => {
|
|
720
|
+
return (0, _tiptap_pm_tables.toggleHeader)("column")(state, dispatch);
|
|
721
|
+
},
|
|
722
|
+
toggleHeaderRow: () => ({ state, dispatch }) => {
|
|
723
|
+
return (0, _tiptap_pm_tables.toggleHeader)("row")(state, dispatch);
|
|
724
|
+
},
|
|
725
|
+
toggleHeaderCell: () => ({ state, dispatch }) => {
|
|
726
|
+
return (0, _tiptap_pm_tables.toggleHeaderCell)(state, dispatch);
|
|
727
|
+
},
|
|
728
|
+
mergeOrSplit: () => ({ state, dispatch }) => {
|
|
729
|
+
if ((0, _tiptap_pm_tables.mergeCells)(state, dispatch)) return true;
|
|
730
|
+
return (0, _tiptap_pm_tables.splitCell)(state, dispatch);
|
|
731
|
+
},
|
|
732
|
+
setCellAttribute: (name, value) => ({ state, dispatch }) => {
|
|
733
|
+
return (0, _tiptap_pm_tables.setCellAttr)(name, value)(state, dispatch);
|
|
734
|
+
},
|
|
735
|
+
goToNextCell: () => ({ state, dispatch }) => {
|
|
736
|
+
return (0, _tiptap_pm_tables.goToNextCell)(1)(state, dispatch);
|
|
737
|
+
},
|
|
738
|
+
goToPreviousCell: () => ({ state, dispatch }) => {
|
|
739
|
+
return (0, _tiptap_pm_tables.goToNextCell)(-1)(state, dispatch);
|
|
740
|
+
},
|
|
741
|
+
fixTables: () => ({ state, dispatch }) => {
|
|
742
|
+
if (dispatch) (0, _tiptap_pm_tables.fixTables)(state);
|
|
743
|
+
return true;
|
|
744
|
+
},
|
|
745
|
+
setCellSelection: (position) => ({ tr, dispatch }) => {
|
|
746
|
+
if (dispatch) {
|
|
747
|
+
const selection = _tiptap_pm_tables.CellSelection.create(tr.doc, position.anchorCell, position.headCell);
|
|
748
|
+
tr.setSelection(selection);
|
|
749
|
+
}
|
|
750
|
+
return true;
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
},
|
|
754
|
+
addKeyboardShortcuts() {
|
|
755
|
+
return {
|
|
756
|
+
Tab: () => {
|
|
757
|
+
if (this.editor.commands.goToNextCell()) return true;
|
|
758
|
+
if (!this.editor.can().addRowAfter()) return false;
|
|
759
|
+
return this.editor.chain().addRowAfter().goToNextCell().run();
|
|
760
|
+
},
|
|
761
|
+
"Shift-Tab": () => this.editor.commands.goToPreviousCell(),
|
|
762
|
+
Backspace: deleteTableWhenAllCellsSelected,
|
|
763
|
+
"Mod-Backspace": deleteTableWhenAllCellsSelected,
|
|
764
|
+
Delete: deleteTableWhenAllCellsSelected,
|
|
765
|
+
"Mod-Delete": deleteTableWhenAllCellsSelected
|
|
766
|
+
};
|
|
767
|
+
},
|
|
768
|
+
addProseMirrorPlugins() {
|
|
769
|
+
return [
|
|
770
|
+
...this.options.resizable && this.editor.isEditable ? [(0, _tiptap_pm_tables.columnResizing)({
|
|
771
|
+
handleWidth: this.options.handleWidth,
|
|
772
|
+
cellMinWidth: this.options.cellMinWidth,
|
|
773
|
+
defaultCellMinWidth: this.options.cellMinWidth,
|
|
774
|
+
View: this.options.View,
|
|
775
|
+
lastColumnResizable: this.options.lastColumnResizable
|
|
776
|
+
})] : [],
|
|
777
|
+
(0, _tiptap_pm_tables.tableEditing)({ allowTableNodeSelection: this.options.allowTableNodeSelection }),
|
|
778
|
+
preserveCellSelectionOnContextMenu()
|
|
779
|
+
];
|
|
780
|
+
},
|
|
781
|
+
addNodeView() {
|
|
782
|
+
const isResizable = this.options.resizable && this.editor.isEditable;
|
|
783
|
+
const View = this.options.View;
|
|
784
|
+
if (isResizable || !View) return null;
|
|
785
|
+
return ({ node, view, HTMLAttributes }) => {
|
|
786
|
+
const mergedAttributes = (0, _tiptap_core.mergeAttributes)(this.options.HTMLAttributes, HTMLAttributes);
|
|
787
|
+
return new View(node, this.options.cellMinWidth, view, mergedAttributes);
|
|
788
|
+
};
|
|
789
|
+
},
|
|
790
|
+
extendNodeSchema(extension) {
|
|
791
|
+
const context = {
|
|
792
|
+
name: extension.name,
|
|
793
|
+
options: extension.options,
|
|
794
|
+
storage: extension.storage
|
|
795
|
+
};
|
|
796
|
+
return { tableRole: (0, _tiptap_core.callOrReturn)((0, _tiptap_core.getExtensionField)(extension, "tableRole", context)) };
|
|
797
|
+
}
|
|
798
|
+
});
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region src/kit/index.ts
|
|
801
|
+
/**
|
|
802
|
+
* The table kit is a collection of table editor extensions.
|
|
803
|
+
*
|
|
804
|
+
* It’s a good starting point for building your own table in Tiptap.
|
|
805
|
+
*/
|
|
806
|
+
const TableKit = _tiptap_core.Extension.create({
|
|
807
|
+
name: "tableKit",
|
|
808
|
+
addExtensions() {
|
|
809
|
+
const extensions = [];
|
|
810
|
+
if (this.options.table !== false) extensions.push(Table.configure(this.options.table));
|
|
811
|
+
if (this.options.tableCell !== false) extensions.push(TableCell.configure(this.options.tableCell));
|
|
812
|
+
if (this.options.tableHeader !== false) extensions.push(TableHeader.configure(this.options.tableHeader));
|
|
813
|
+
if (this.options.tableRow !== false) extensions.push(TableRow.configure(this.options.tableRow));
|
|
814
|
+
return extensions;
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
//#endregion
|
|
818
|
+
exports.DEFAULT_CELL_LINE_SEPARATOR = DEFAULT_CELL_LINE_SEPARATOR;
|
|
819
|
+
exports.Table = Table;
|
|
820
|
+
exports.TableCell = TableCell;
|
|
821
|
+
exports.TableHeader = TableHeader;
|
|
822
|
+
exports.TableKit = TableKit;
|
|
823
|
+
exports.TableRow = TableRow;
|
|
824
|
+
exports.TableView = TableView;
|
|
825
|
+
exports.createColGroup = createColGroup;
|
|
826
|
+
exports.createTable = createTable;
|
|
827
|
+
exports.escapeTableCellPipes = escapeTableCellPipes;
|
|
828
|
+
exports.preprocessTablePipes = preprocessTablePipes;
|
|
829
|
+
exports.renderTableToMarkdown = renderTableToMarkdown;
|
|
830
|
+
exports.updateColumns = updateColumns;
|
|
831
|
+
|
|
832
|
+
//# sourceMappingURL=index.cjs.map
|