@gsc-basic/shared-service 1.0.5 → 1.0.7
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/dist/index.css +14 -0
- package/dist/shared-service.js +14 -0
- package/index.d.ts +64 -62
- package/package.json +16 -13
- package/dist/es/_virtual/_plugin-vue_export-helper.js +0 -22
- package/dist/es/_virtual/index.js +0 -15
- package/dist/es/_virtual/index2.js +0 -17
- package/dist/es/configs/auth-config/dist/index.js +0 -91
- package/dist/es/email-center/AccountConf/index.js +0 -19
- package/dist/es/email-center/AccountConf/src/config/columns.js +0 -82
- package/dist/es/email-center/AccountConf/src/config/filters.js +0 -61
- package/dist/es/email-center/AccountConf/src/config/schema.js +0 -139
- package/dist/es/email-center/AccountConf/src/constant/index.js +0 -72
- package/dist/es/email-center/AccountConf/src/index.css +0 -14
- package/dist/es/email-center/AccountConf/src/index.vue.js +0 -98
- package/dist/es/email-center/AccountConf/src/index2.css +0 -14
- package/dist/es/email-center/CmGroup/index.js +0 -19
- package/dist/es/email-center/CmGroup/src/config/columns.js +0 -77
- package/dist/es/email-center/CmGroup/src/config/filters.js +0 -64
- package/dist/es/email-center/CmGroup/src/config/schema.js +0 -79
- package/dist/es/email-center/CmGroup/src/constant/index.js +0 -26
- package/dist/es/email-center/CmGroup/src/index.css +0 -14
- package/dist/es/email-center/CmGroup/src/index.vue.js +0 -91
- package/dist/es/email-center/CmGroup/src/index2.css +0 -14
- package/dist/es/email-center/InboxNotifyConf/index.js +0 -19
- package/dist/es/email-center/InboxNotifyConf/src/config/columns.js +0 -124
- package/dist/es/email-center/InboxNotifyConf/src/config/filters.js +0 -61
- package/dist/es/email-center/InboxNotifyConf/src/config/schema.js +0 -152
- package/dist/es/email-center/InboxNotifyConf/src/constant/index.js +0 -104
- package/dist/es/email-center/InboxNotifyConf/src/index.css +0 -14
- package/dist/es/email-center/InboxNotifyConf/src/index.vue.js +0 -122
- package/dist/es/email-center/InboxNotifyConf/src/index2.css +0 -14
- package/dist/es/email-center/Log/index.js +0 -19
- package/dist/es/email-center/Log/src/config/columns.js +0 -115
- package/dist/es/email-center/Log/src/config/filters.js +0 -81
- package/dist/es/email-center/Log/src/index.css +0 -14
- package/dist/es/email-center/Log/src/index.vue.js +0 -161
- package/dist/es/email-center/Log/src/index2.css +0 -14
- package/dist/es/email-center/Template/index.js +0 -19
- package/dist/es/email-center/Template/src/components/MailTemplateSend.css +0 -14
- package/dist/es/email-center/Template/src/components/MailTemplateSend.vue.js +0 -256
- package/dist/es/email-center/Template/src/components/MailTemplateSend2.css +0 -14
- package/dist/es/email-center/Template/src/config/columns.js +0 -107
- package/dist/es/email-center/Template/src/config/filters.js +0 -82
- package/dist/es/email-center/Template/src/config/schema.js +0 -179
- package/dist/es/email-center/Template/src/constant/index.js +0 -274
- package/dist/es/email-center/Template/src/index.css +0 -14
- package/dist/es/email-center/Template/src/index.vue.js +0 -255
- package/dist/es/email-center/Template/src/index2.css +0 -14
- package/dist/es/email-center/api/accountConf.js +0 -21
- package/dist/es/email-center/api/cmGroup.js +0 -21
- package/dist/es/email-center/api/common.js +0 -42
- package/dist/es/email-center/api/inboxNotifyConf.js +0 -21
- package/dist/es/email-center/api/log.js +0 -23
- package/dist/es/email-center/api/template.js +0 -27
- package/dist/es/email-center/components/form.css +0 -14
- package/dist/es/email-center/components/form.vue.js +0 -116
- package/dist/es/email-center/components/form2.css +0 -14
- package/dist/es/email-center/components/grid.css +0 -14
- package/dist/es/email-center/components/grid.vue.js +0 -308
- package/dist/es/email-center/components/grid2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/index.js +0 -19
- package/dist/es/file-flow/DownloadCenter/src/components/progress.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/components/progress.vue.js +0 -135
- package/dist/es/file-flow/DownloadCenter/src/components/progress2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/config/columns.js +0 -80
- package/dist/es/file-flow/DownloadCenter/src/config/filters.js +0 -79
- package/dist/es/file-flow/DownloadCenter/src/config/logColumns.js +0 -48
- package/dist/es/file-flow/DownloadCenter/src/config/schema.js +0 -50
- package/dist/es/file-flow/DownloadCenter/src/index.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/index.vue.js +0 -219
- package/dist/es/file-flow/DownloadCenter/src/index2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/index3.css +0 -14
- package/dist/es/file-flow/UploadButton/index.js +0 -19
- package/dist/es/file-flow/UploadButton/src/component/upload.css +0 -14
- package/dist/es/file-flow/UploadButton/src/component/upload.vue.js +0 -139
- package/dist/es/file-flow/UploadButton/src/composables/useUploadFile.js +0 -57
- package/dist/es/file-flow/UploadButton/src/index.css +0 -14
- package/dist/es/file-flow/UploadButton/src/index.vue.js +0 -63
- package/dist/es/file-flow/UploadCenter/index.js +0 -19
- package/dist/es/file-flow/UploadCenter/src/config/columns.js +0 -75
- package/dist/es/file-flow/UploadCenter/src/config/filters.js +0 -103
- package/dist/es/file-flow/UploadCenter/src/config/logColumns.js +0 -47
- package/dist/es/file-flow/UploadCenter/src/config/schema.js +0 -50
- package/dist/es/file-flow/UploadCenter/src/config/statusColumns.js +0 -45
- package/dist/es/file-flow/UploadCenter/src/index.css +0 -14
- package/dist/es/file-flow/UploadCenter/src/index.vue.js +0 -244
- package/dist/es/file-flow/UploadCenter/src/index2.css +0 -14
- package/dist/es/file-flow/api/downloadCenter.js +0 -64
- package/dist/es/file-flow/api/uploadButton.js +0 -24
- package/dist/es/file-flow/api/uploadCenter.js +0 -62
- package/dist/es/file-flow/components/InterruptModal.css +0 -14
- package/dist/es/file-flow/components/InterruptModal.vue.js +0 -83
- package/dist/es/hooks/useLocale.js +0 -40
- package/dist/es/index.js +0 -49
- package/dist/es/locale/index.js +0 -44
- package/dist/es/locale/lang/en-US.js +0 -205
- package/dist/es/locale/lang/ja-JP.js +0 -206
- package/dist/es/locale/lang/zh-CN.js +0 -203
- package/dist/es/node_modules/@vueuse/core/dist/index.js +0 -230
- package/dist/es/node_modules/@vueuse/shared/dist/index.js +0 -165
- package/dist/es/node_modules/lodash-es/_Hash.js +0 -33
- package/dist/es/node_modules/lodash-es/_ListCache.js +0 -33
- package/dist/es/node_modules/lodash-es/_Map.js +0 -19
- package/dist/es/node_modules/lodash-es/_MapCache.js +0 -33
- package/dist/es/node_modules/lodash-es/_Symbol.js +0 -18
- package/dist/es/node_modules/lodash-es/_apply.js +0 -29
- package/dist/es/node_modules/lodash-es/_arrayMap.js +0 -21
- package/dist/es/node_modules/lodash-es/_arrayPush.js +0 -21
- package/dist/es/node_modules/lodash-es/_assignValue.js +0 -23
- package/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -23
- package/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -25
- package/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -26
- package/dist/es/node_modules/lodash-es/_baseGet.js +0 -24
- package/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -23
- package/dist/es/node_modules/lodash-es/_baseHasIn.js +0 -19
- package/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -22
- package/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -29
- package/dist/es/node_modules/lodash-es/_basePick.js +0 -23
- package/dist/es/node_modules/lodash-es/_basePickBy.js +0 -26
- package/dist/es/node_modules/lodash-es/_baseSet.js +0 -37
- package/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -27
- package/dist/es/node_modules/lodash-es/_baseToString.js +0 -31
- package/dist/es/node_modules/lodash-es/_castPath.js +0 -23
- package/dist/es/node_modules/lodash-es/_coreJsData.js +0 -18
- package/dist/es/node_modules/lodash-es/_defineProperty.js +0 -24
- package/dist/es/node_modules/lodash-es/_flatRest.js +0 -22
- package/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -17
- package/dist/es/node_modules/lodash-es/_getMapData.js +0 -21
- package/dist/es/node_modules/lodash-es/_getNative.js +0 -22
- package/dist/es/node_modules/lodash-es/_getRawTag.js +0 -28
- package/dist/es/node_modules/lodash-es/_getValue.js +0 -19
- package/dist/es/node_modules/lodash-es/_hasPath.js +0 -32
- package/dist/es/node_modules/lodash-es/_hashClear.js +0 -20
- package/dist/es/node_modules/lodash-es/_hashDelete.js +0 -20
- package/dist/es/node_modules/lodash-es/_hashGet.js +0 -26
- package/dist/es/node_modules/lodash-es/_hashHas.js +0 -22
- package/dist/es/node_modules/lodash-es/_hashSet.js +0 -22
- package/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -23
- package/dist/es/node_modules/lodash-es/_isIndex.js +0 -21
- package/dist/es/node_modules/lodash-es/_isKey.js +0 -25
- package/dist/es/node_modules/lodash-es/_isKeyable.js +0 -20
- package/dist/es/node_modules/lodash-es/_isMasked.js +0 -24
- package/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -19
- package/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -25
- package/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -21
- package/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -20
- package/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -21
- package/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -26
- package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -21
- package/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -20
- package/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -20
- package/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -21
- package/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -24
- package/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -18
- package/dist/es/node_modules/lodash-es/_objectToString.js +0 -20
- package/dist/es/node_modules/lodash-es/_overRest.js +0 -28
- package/dist/es/node_modules/lodash-es/_root.js +0 -18
- package/dist/es/node_modules/lodash-es/_setToString.js +0 -19
- package/dist/es/node_modules/lodash-es/_shortOut.js +0 -29
- package/dist/es/node_modules/lodash-es/_stringToPath.js +0 -23
- package/dist/es/node_modules/lodash-es/_toKey.js +0 -23
- package/dist/es/node_modules/lodash-es/_toSource.js +0 -30
- package/dist/es/node_modules/lodash-es/constant.js +0 -21
- package/dist/es/node_modules/lodash-es/eq.js +0 -19
- package/dist/es/node_modules/lodash-es/flatten.js +0 -21
- package/dist/es/node_modules/lodash-es/get.js +0 -21
- package/dist/es/node_modules/lodash-es/hasIn.js +0 -21
- package/dist/es/node_modules/lodash-es/identity.js +0 -19
- package/dist/es/node_modules/lodash-es/isArguments.js +0 -23
- package/dist/es/node_modules/lodash-es/isArray.js +0 -17
- package/dist/es/node_modules/lodash-es/isFunction.js +0 -25
- package/dist/es/node_modules/lodash-es/isLength.js +0 -20
- package/dist/es/node_modules/lodash-es/isObject.js +0 -20
- package/dist/es/node_modules/lodash-es/isObjectLike.js +0 -19
- package/dist/es/node_modules/lodash-es/isSymbol.js +0 -22
- package/dist/es/node_modules/lodash-es/memoize.js +0 -31
- package/dist/es/node_modules/lodash-es/pick.js +0 -21
- package/dist/es/node_modules/lodash-es/toString.js +0 -20
- package/dist/es/node_modules/path-to-regexp/dist/index.js +0 -275
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -300
- package/dist/es/node_modules/sortablejs/modular/sortable.esm.js +0 -1283
- package/dist/es/node_modules/title-case/dist/index.js +0 -20
- package/dist/es/packages/components/dist/es/Button/index.js +0 -19
- package/dist/es/packages/components/dist/es/Button/src/Button.css +0 -14
- package/dist/es/packages/components/dist/es/Button/src/Button.vue.js +0 -54
- package/dist/es/packages/components/dist/es/Button/src/Button2.css +0 -14
- package/dist/es/packages/components/dist/es/ConfigProvider/index.js +0 -19
- package/dist/es/packages/components/dist/es/ConfigProvider/src/configProvider.js +0 -27
- package/dist/es/packages/components/dist/es/ConfigProvider/src/configProviderProps.js +0 -35
- package/dist/es/packages/components/dist/es/ConfigProvider/src/constants.js +0 -22
- package/dist/es/packages/components/dist/es/ConfigProvider/src/useGlobalConfig.js +0 -47
- package/dist/es/packages/components/dist/es/Form/index.js +0 -19
- package/dist/es/packages/components/dist/es/Form/src/Form.css +0 -14
- package/dist/es/packages/components/dist/es/Form/src/Form.vue.js +0 -386
- package/dist/es/packages/components/dist/es/Form/src/Form2.css +0 -14
- package/dist/es/packages/components/dist/es/Form/src/styles/form.css +0 -14
- package/dist/es/packages/components/dist/es/Overlay/src/Modal.css +0 -14
- package/dist/es/packages/components/dist/es/Overlay/src/Modal.vue.js +0 -80
- package/dist/es/packages/components/dist/es/Overlay/src/Modal2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/index.js +0 -19
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +0 -182
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +0 -50
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +0 -50
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +0 -53
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +0 -68
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +0 -79
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +0 -90
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +0 -102
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +0 -86
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/MarkButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/MarkButton.vue.js +0 -99
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TableButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TableButton.vue.js +0 -175
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +0 -95
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +0 -53
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +0 -29
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +0 -27
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +0 -64
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +0 -90
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +0 -111
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +0 -390
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +0 -147
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/constant/index.js +0 -63
- package/dist/es/packages/components/dist/es/RichTextEditor/src/extensions/styledTable.js +0 -112
- package/dist/es/packages/components/dist/es/RichTextEditor/src/extensions/video.js +0 -78
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index.vue.js +0 -176
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/props.js +0 -50
- package/dist/es/packages/components/dist/es/_virtual/_plugin-vue_export-helper.js +0 -22
- package/dist/es/packages/components/dist/es/hooks/useLocale.js +0 -38
- package/dist/es/packages/components/dist/es/hooks/useNamespace.js +0 -21
- package/dist/es/packages/components/dist/es/locale/lang/en-US.js +0 -134
- package/dist/es/packages/components/dist/es/locale/lang/ja-JP.js +0 -134
- package/dist/es/packages/components/dist/es/locale/lang/zh-CN.js +0 -134
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +0 -191
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +0 -419
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +0 -799
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +0 -68
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +0 -122
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +0 -58
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +0 -226
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +0 -221
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +0 -136
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/store.js +0 -57
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +0 -51
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +0 -46
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +0 -61
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/core/dist/index.js +0 -3995
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +0 -98
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-code/dist/index.js +0 -67
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +0 -227
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-document/dist/index.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -72
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +0 -76
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -69
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-image/dist/index.js +0 -143
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +0 -96
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-link/dist/index.js +0 -326
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-list/dist/index.js +0 -743
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -62
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +0 -79
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +0 -54
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +0 -54
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-table/dist/index.js +0 -392
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text/dist/index.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +0 -60
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +0 -253
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +0 -78
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extensions/dist/index.js +0 -311
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/html/dist/index.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/vue-3/dist/index.js +0 -270
- package/dist/es/packages/components/dist/es/node_modules/linkifyjs/dist/linkify.js +0 -720
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_DataView.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Hash.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_ListCache.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Map.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_MapCache.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Promise.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Set.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_SetCache.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Stack.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Symbol.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Uint8Array.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_WeakMap.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_apply.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayFilter.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayIncludes.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayMap.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayPush.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arraySome.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assignMergeValue.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assignValue.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseCreate.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFindIndex.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFor.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGet.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIndexOf.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIntersection.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsEqual.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +0 -45
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsNaN.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseKeys.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseKeysIn.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseMerge.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseMergeDeep.js +0 -44
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseRest.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseTimes.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseToString.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseUnary.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseUniq.js +0 -46
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cacheHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_castPath.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneBuffer.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneTypedArray.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_copyArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_copyObject.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_coreJsData.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createAssigner.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createBaseFor.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createSet.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_defineProperty.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalArrays.js +0 -53
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalByTag.js +0 -58
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalObjects.js +0 -49
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -17
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getAllKeys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getMapData.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getNative.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getPrototype.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getRawTag.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getSymbols.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getTag.js +0 -41
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getValue.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashClear.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashDelete.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashGet.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashHas.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashSet.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_initCloneObject.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isIndex.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isIterateeCall.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isKey.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isKeyable.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isMasked.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isPrototype.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapToArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeKeys.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeKeysIn.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nodeUtil.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_objectToString.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_overArg.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_overRest.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_root.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_safeGet.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setCacheAdd.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setCacheHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setToArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setToString.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_shortOut.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackClear.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackDelete.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackGet.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackSet.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_strictIndexOf.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stringToPath.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_toKey.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_toSource.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/constant.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/eq.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/get.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/identity.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/intersectionWith.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArguments.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArray.js +0 -17
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArrayLike.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArrayLikeObject.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isBuffer.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isEqual.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isFunction.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isLength.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isObject.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isObjectLike.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isPlainObject.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isSymbol.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isTypedArray.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/keys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/keysIn.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/last.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/memoize.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/mergeWith.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/noop.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/stubArray.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/stubFalse.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/toPlainObject.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/toString.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/unionWith.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/orderedmap/dist/index.js +0 -116
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-commands/dist/index.js +0 -401
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +0 -99
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +0 -217
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-history/dist/index.js +0 -261
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-keymap/dist/index.js +0 -75
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-model/dist/index.js +0 -2746
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-schema-list/dist/index.js +0 -101
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-state/dist/index.js +0 -835
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-tables/dist/index.js +0 -1459
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-transform/dist/index.js +0 -1549
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-view/dist/index.js +0 -3811
- package/dist/es/packages/components/dist/es/node_modules/rope-sequence/dist/index.js +0 -113
- package/dist/es/packages/components/dist/es/node_modules/w3c-keyname/index.js +0 -106
- package/dist/es/packages/components/dist/es/packages/utils/dist/index.js +0 -556
- package/dist/es/packages/components/dist/es/styles/tokens.css +0 -14
- package/dist/es/packages/hooks/dist/index.js +0 -114
- package/dist/es/packages/shared-service/index.js +0 -59
- package/dist/es/packages/utils/dist/index.js +0 -532
- package/dist/es/utils/request.js +0 -98
- package/dist/es/utils/util.js +0 -53
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -14
- package/dist/lib/_virtual/index.js +0 -14
- package/dist/lib/_virtual/index2.js +0 -14
- package/dist/lib/configs/auth-config/dist/index.js +0 -14
- package/dist/lib/email-center/AccountConf/index.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/columns.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/filters.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/schema.js +0 -14
- package/dist/lib/email-center/AccountConf/src/constant/index.js +0 -14
- package/dist/lib/email-center/AccountConf/src/index.css +0 -14
- package/dist/lib/email-center/AccountConf/src/index.vue.js +0 -14
- package/dist/lib/email-center/AccountConf/src/index2.css +0 -14
- package/dist/lib/email-center/CmGroup/index.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/columns.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/filters.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/schema.js +0 -14
- package/dist/lib/email-center/CmGroup/src/constant/index.js +0 -14
- package/dist/lib/email-center/CmGroup/src/index.css +0 -14
- package/dist/lib/email-center/CmGroup/src/index.vue.js +0 -14
- package/dist/lib/email-center/CmGroup/src/index2.css +0 -14
- package/dist/lib/email-center/InboxNotifyConf/index.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/columns.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/filters.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/schema.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/constant/index.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index.css +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index.vue.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index2.css +0 -14
- package/dist/lib/email-center/Log/index.js +0 -14
- package/dist/lib/email-center/Log/src/config/columns.js +0 -14
- package/dist/lib/email-center/Log/src/config/filters.js +0 -14
- package/dist/lib/email-center/Log/src/index.css +0 -14
- package/dist/lib/email-center/Log/src/index.vue.js +0 -14
- package/dist/lib/email-center/Log/src/index2.css +0 -14
- package/dist/lib/email-center/Template/index.js +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend.css +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend.vue.js +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend2.css +0 -14
- package/dist/lib/email-center/Template/src/config/columns.js +0 -14
- package/dist/lib/email-center/Template/src/config/filters.js +0 -14
- package/dist/lib/email-center/Template/src/config/schema.js +0 -14
- package/dist/lib/email-center/Template/src/constant/index.js +0 -14
- package/dist/lib/email-center/Template/src/index.css +0 -14
- package/dist/lib/email-center/Template/src/index.vue.js +0 -14
- package/dist/lib/email-center/Template/src/index2.css +0 -14
- package/dist/lib/email-center/api/accountConf.js +0 -14
- package/dist/lib/email-center/api/cmGroup.js +0 -14
- package/dist/lib/email-center/api/common.js +0 -14
- package/dist/lib/email-center/api/inboxNotifyConf.js +0 -14
- package/dist/lib/email-center/api/log.js +0 -14
- package/dist/lib/email-center/api/template.js +0 -14
- package/dist/lib/email-center/components/form.css +0 -14
- package/dist/lib/email-center/components/form.vue.js +0 -14
- package/dist/lib/email-center/components/form2.css +0 -14
- package/dist/lib/email-center/components/grid.css +0 -14
- package/dist/lib/email-center/components/grid.vue.js +0 -14
- package/dist/lib/email-center/components/grid2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/index.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress.vue.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/columns.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/filters.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/logColumns.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/schema.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index.vue.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index3.css +0 -14
- package/dist/lib/file-flow/UploadButton/index.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/component/upload.css +0 -14
- package/dist/lib/file-flow/UploadButton/src/component/upload.vue.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/composables/useUploadFile.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/index.css +0 -14
- package/dist/lib/file-flow/UploadButton/src/index.vue.js +0 -14
- package/dist/lib/file-flow/UploadCenter/index.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/columns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/filters.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/logColumns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/schema.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/statusColumns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index.css +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index.vue.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index2.css +0 -14
- package/dist/lib/file-flow/api/downloadCenter.js +0 -14
- package/dist/lib/file-flow/api/uploadButton.js +0 -14
- package/dist/lib/file-flow/api/uploadCenter.js +0 -14
- package/dist/lib/file-flow/components/InterruptModal.css +0 -14
- package/dist/lib/file-flow/components/InterruptModal.vue.js +0 -14
- package/dist/lib/hooks/useLocale.js +0 -14
- package/dist/lib/index.js +0 -14
- package/dist/lib/locale/index.js +0 -14
- package/dist/lib/locale/lang/en-US.js +0 -14
- package/dist/lib/locale/lang/ja-JP.js +0 -14
- package/dist/lib/locale/lang/zh-CN.js +0 -14
- package/dist/lib/node_modules/@vueuse/core/dist/index.js +0 -14
- package/dist/lib/node_modules/@vueuse/shared/dist/index.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Hash.js +0 -14
- package/dist/lib/node_modules/lodash-es/_ListCache.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Map.js +0 -14
- package/dist/lib/node_modules/lodash-es/_MapCache.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Symbol.js +0 -14
- package/dist/lib/node_modules/lodash-es/_apply.js +0 -14
- package/dist/lib/node_modules/lodash-es/_arrayMap.js +0 -14
- package/dist/lib/node_modules/lodash-es/_arrayPush.js +0 -14
- package/dist/lib/node_modules/lodash-es/_assignValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseFlatten.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseGetTag.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseHasIn.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseIsNative.js +0 -14
- package/dist/lib/node_modules/lodash-es/_basePick.js +0 -14
- package/dist/lib/node_modules/lodash-es/_basePickBy.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_castPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_coreJsData.js +0 -14
- package/dist/lib/node_modules/lodash-es/_defineProperty.js +0 -14
- package/dist/lib/node_modules/lodash-es/_flatRest.js +0 -14
- package/dist/lib/node_modules/lodash-es/_freeGlobal.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getMapData.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getNative.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hasPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isFlattenable.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isIndex.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isKey.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isKeyable.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isMasked.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +0 -14
- package/dist/lib/node_modules/lodash-es/_nativeCreate.js +0 -14
- package/dist/lib/node_modules/lodash-es/_objectToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_overRest.js +0 -14
- package/dist/lib/node_modules/lodash-es/_root.js +0 -14
- package/dist/lib/node_modules/lodash-es/_setToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/lib/node_modules/lodash-es/_stringToPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_toKey.js +0 -14
- package/dist/lib/node_modules/lodash-es/_toSource.js +0 -14
- package/dist/lib/node_modules/lodash-es/constant.js +0 -14
- package/dist/lib/node_modules/lodash-es/eq.js +0 -14
- package/dist/lib/node_modules/lodash-es/flatten.js +0 -14
- package/dist/lib/node_modules/lodash-es/get.js +0 -14
- package/dist/lib/node_modules/lodash-es/hasIn.js +0 -14
- package/dist/lib/node_modules/lodash-es/identity.js +0 -14
- package/dist/lib/node_modules/lodash-es/isArguments.js +0 -14
- package/dist/lib/node_modules/lodash-es/isArray.js +0 -14
- package/dist/lib/node_modules/lodash-es/isFunction.js +0 -14
- package/dist/lib/node_modules/lodash-es/isLength.js +0 -14
- package/dist/lib/node_modules/lodash-es/isObject.js +0 -14
- package/dist/lib/node_modules/lodash-es/isObjectLike.js +0 -14
- package/dist/lib/node_modules/lodash-es/isSymbol.js +0 -14
- package/dist/lib/node_modules/lodash-es/memoize.js +0 -14
- package/dist/lib/node_modules/lodash-es/pick.js +0 -14
- package/dist/lib/node_modules/lodash-es/toString.js +0 -14
- package/dist/lib/node_modules/path-to-regexp/dist/index.js +0 -14
- package/dist/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -14
- package/dist/lib/node_modules/sortablejs/modular/sortable.esm.js +0 -14
- package/dist/lib/node_modules/title-case/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button.css +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button2.css +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/index.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/configProvider.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/configProviderProps.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/constants.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/useGlobalConfig.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form.css +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form2.css +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/styles/form.css +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal.css +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/index.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/MarkButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/MarkButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TableButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TableButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/constant/index.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/extensions/styledTable.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/extensions/video.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/props.js +0 -14
- package/dist/lib/packages/components/dist/es/_virtual/_plugin-vue_export-helper.js +0 -14
- package/dist/lib/packages/components/dist/es/hooks/useLocale.js +0 -14
- package/dist/lib/packages/components/dist/es/hooks/useNamespace.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/en-US.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/ja-JP.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/zh-CN.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/store.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/core/dist/index.js +0 -106
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-code/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +0 -31
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-document/dist/index.js +0 -16
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -16
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-image/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-link/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-list/dist/index.js +0 -25
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-table/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extensions/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/html/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/vue-3/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/linkifyjs/dist/linkify.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_DataView.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Hash.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_ListCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Map.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_MapCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Promise.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Set.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_SetCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Symbol.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Uint8Array.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_WeakMap.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_apply.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayFilter.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayIncludes.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayMap.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayPush.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arraySome.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assignMergeValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assignValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFindIndex.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFor.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIntersection.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsEqual.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsNaN.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseKeysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseMerge.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseMergeDeep.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseRest.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseTimes.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseUnary.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseUniq.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_castPath.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_copyArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_coreJsData.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createAssigner.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createBaseFor.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_defineProperty.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalArrays.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalByTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalObjects.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getAllKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getMapData.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getNative.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getPrototype.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getSymbols.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_initCloneObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isIndex.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isIterateeCall.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isKey.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isKeyable.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isMasked.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isPrototype.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapToArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeKeysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nodeUtil.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_objectToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_overArg.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_overRest.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_root.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_safeGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setCacheAdd.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setToArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_strictIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stringToPath.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_toKey.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_toSource.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/constant.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/eq.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/get.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/identity.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/intersectionWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArguments.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArrayLike.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArrayLikeObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isEqual.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isFunction.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isLength.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isObjectLike.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isSymbol.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/keys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/keysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/last.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/memoize.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/mergeWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/noop.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/stubArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/stubFalse.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/toPlainObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/toString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/unionWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/orderedmap/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-commands/dist/index.js +0 -15
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-history/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-keymap/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-model/dist/index.js +0 -17
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-schema-list/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-state/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-tables/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-transform/dist/index.js +0 -15
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-view/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/rope-sequence/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/w3c-keyname/index.js +0 -14
- package/dist/lib/packages/components/dist/es/packages/utils/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/styles/tokens.css +0 -14
- package/dist/lib/packages/hooks/dist/index.js +0 -14
- package/dist/lib/packages/shared-service/index.js +0 -14
- package/dist/lib/packages/utils/dist/index.js +0 -14
- package/dist/lib/utils/request.js +0 -14
- package/dist/lib/utils/util.js +0 -14
|
@@ -1,3995 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
|
|
3
|
-
@license Proprietary
|
|
4
|
-
|
|
5
|
-
This software is the confidential and proprietary property of Lenovo SSG BASD.
|
|
6
|
-
You shall not disclose such Confidential Information and shall use it only in
|
|
7
|
-
accordance with the terms of the license agreement.
|
|
8
|
-
|
|
9
|
-
--- Build Info ---
|
|
10
|
-
Version: 1.0.4
|
|
11
|
-
Build Time: 2026/3/20 19:01:32
|
|
12
|
-
Build Commit: e870d54d366d1b5dce52602a729199a8d55c50a8
|
|
13
|
-
*/
|
|
14
|
-
import { findWrapping as ge, canJoin as mt, Transform as ye, RemoveMarkStep as ve, liftTarget as be, joinPoint as Dt, canSplit as X, ReplaceStep as ke, ReplaceAroundStep as we } from "../../../prosemirror-transform/dist/index.js";
|
|
15
|
-
import { createParagraphNear as xe, deleteSelection as Me, exitCode as Se, joinUp as Ee, joinDown as Te, joinBackward as $e, joinForward as Ce, joinTextblockBackward as Ae, joinTextblockForward as Oe, lift as Pe, liftEmptyBlock as Re, newlineInCode as ze, selectNodeBackward as Ne, selectNodeForward as Ie, selectParentNode as je, selectTextblockEnd as De, selectTextblockStart as Be, setBlockType as Tt, wrapIn as He } from "../../../prosemirror-commands/dist/index.js";
|
|
16
|
-
import { NodeSelection as et, EditorState as Le, Selection as B, TextSelection as C, Plugin as A, PluginKey as j, AllSelection as Ve } from "../../../prosemirror-state/dist/index.js";
|
|
17
|
-
import { Schema as Bt, DOMSerializer as We, Fragment as I, Node as Ue, DOMParser as lt, Slice as Fe } from "../../../prosemirror-model/dist/index.js";
|
|
18
|
-
import { liftListItem as Ke, sinkListItem as _e, wrapInList as qe } from "../../../prosemirror-schema-list/dist/index.js";
|
|
19
|
-
import { EditorView as Je } from "../../../prosemirror-view/dist/index.js";
|
|
20
|
-
import { keymap as Ye } from "../../../prosemirror-keymap/dist/index.js";
|
|
21
|
-
var Xe = Object.defineProperty, ft = (t, e) => {
|
|
22
|
-
for (var n in e)
|
|
23
|
-
Xe(t, n, { get: e[n], enumerable: !0 });
|
|
24
|
-
};
|
|
25
|
-
function nt(t) {
|
|
26
|
-
const { state: e, transaction: n } = t;
|
|
27
|
-
let { selection: s } = n, { doc: r } = n, { storedMarks: o } = n;
|
|
28
|
-
return {
|
|
29
|
-
...e,
|
|
30
|
-
apply: e.apply.bind(e),
|
|
31
|
-
applyTransaction: e.applyTransaction.bind(e),
|
|
32
|
-
plugins: e.plugins,
|
|
33
|
-
schema: e.schema,
|
|
34
|
-
reconfigure: e.reconfigure.bind(e),
|
|
35
|
-
toJSON: e.toJSON.bind(e),
|
|
36
|
-
get storedMarks() {
|
|
37
|
-
return o;
|
|
38
|
-
},
|
|
39
|
-
get selection() {
|
|
40
|
-
return s;
|
|
41
|
-
},
|
|
42
|
-
get doc() {
|
|
43
|
-
return r;
|
|
44
|
-
},
|
|
45
|
-
get tr() {
|
|
46
|
-
return s = n.selection, r = n.doc, o = n.storedMarks, n;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
var st = class {
|
|
51
|
-
constructor(t) {
|
|
52
|
-
this.editor = t.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = t.state;
|
|
53
|
-
}
|
|
54
|
-
get hasCustomState() {
|
|
55
|
-
return !!this.customState;
|
|
56
|
-
}
|
|
57
|
-
get state() {
|
|
58
|
-
return this.customState || this.editor.state;
|
|
59
|
-
}
|
|
60
|
-
get commands() {
|
|
61
|
-
const { rawCommands: t, editor: e, state: n } = this, { view: s } = e, { tr: r } = n, o = this.buildProps(r);
|
|
62
|
-
return Object.fromEntries(
|
|
63
|
-
Object.entries(t).map(([c, i]) => [c, (...a) => {
|
|
64
|
-
const l = i(...a)(o);
|
|
65
|
-
return !r.getMeta("preventDispatch") && !this.hasCustomState && s.dispatch(r), l;
|
|
66
|
-
}])
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
get chain() {
|
|
70
|
-
return () => this.createChain();
|
|
71
|
-
}
|
|
72
|
-
get can() {
|
|
73
|
-
return () => this.createCan();
|
|
74
|
-
}
|
|
75
|
-
createChain(t, e = !0) {
|
|
76
|
-
const { rawCommands: n, editor: s, state: r } = this, { view: o } = s, c = [], i = !!t, a = t || r.tr, l = () => (!i && e && !a.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(a), c.every((p) => p === !0)), d = {
|
|
77
|
-
...Object.fromEntries(
|
|
78
|
-
Object.entries(n).map(([p, u]) => [p, (...h) => {
|
|
79
|
-
const m = this.buildProps(a, e), f = u(...h)(m);
|
|
80
|
-
return c.push(f), d;
|
|
81
|
-
}])
|
|
82
|
-
),
|
|
83
|
-
run: l
|
|
84
|
-
};
|
|
85
|
-
return d;
|
|
86
|
-
}
|
|
87
|
-
createCan(t) {
|
|
88
|
-
const { rawCommands: e, state: n } = this, s = !1, r = t || n.tr, o = this.buildProps(r, s);
|
|
89
|
-
return {
|
|
90
|
-
...Object.fromEntries(
|
|
91
|
-
Object.entries(e).map(([c, i]) => [c, (...a) => i(...a)({ ...o, dispatch: void 0 })])
|
|
92
|
-
),
|
|
93
|
-
chain: () => this.createChain(r, s)
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
buildProps(t, e = !0) {
|
|
97
|
-
const { rawCommands: n, editor: s, state: r } = this, { view: o } = s, c = {
|
|
98
|
-
tr: t,
|
|
99
|
-
editor: s,
|
|
100
|
-
view: o,
|
|
101
|
-
state: nt({
|
|
102
|
-
state: r,
|
|
103
|
-
transaction: t
|
|
104
|
-
}),
|
|
105
|
-
dispatch: e ? () => {
|
|
106
|
-
} : void 0,
|
|
107
|
-
chain: () => this.createChain(t, e),
|
|
108
|
-
can: () => this.createCan(t),
|
|
109
|
-
get commands() {
|
|
110
|
-
return Object.fromEntries(
|
|
111
|
-
Object.entries(n).map(([i, a]) => [i, (...l) => a(...l)(c)])
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
return c;
|
|
116
|
-
}
|
|
117
|
-
}, Ht = {};
|
|
118
|
-
ft(Ht, {
|
|
119
|
-
blur: () => Ze,
|
|
120
|
-
clearContent: () => Qe,
|
|
121
|
-
clearNodes: () => Ge,
|
|
122
|
-
command: () => tn,
|
|
123
|
-
createParagraphNear: () => en,
|
|
124
|
-
cut: () => nn,
|
|
125
|
-
deleteCurrentNode: () => sn,
|
|
126
|
-
deleteNode: () => rn,
|
|
127
|
-
deleteRange: () => on,
|
|
128
|
-
deleteSelection: () => an,
|
|
129
|
-
enter: () => cn,
|
|
130
|
-
exitCode: () => ln,
|
|
131
|
-
extendMarkRange: () => dn,
|
|
132
|
-
first: () => un,
|
|
133
|
-
focus: () => hn,
|
|
134
|
-
forEach: () => mn,
|
|
135
|
-
insertContent: () => fn,
|
|
136
|
-
insertContentAt: () => vn,
|
|
137
|
-
joinBackward: () => wn,
|
|
138
|
-
joinDown: () => kn,
|
|
139
|
-
joinForward: () => xn,
|
|
140
|
-
joinItemBackward: () => Mn,
|
|
141
|
-
joinItemForward: () => Sn,
|
|
142
|
-
joinTextblockBackward: () => En,
|
|
143
|
-
joinTextblockForward: () => Tn,
|
|
144
|
-
joinUp: () => bn,
|
|
145
|
-
keyboardShortcut: () => Cn,
|
|
146
|
-
lift: () => An,
|
|
147
|
-
liftEmptyBlock: () => On,
|
|
148
|
-
liftListItem: () => Pn,
|
|
149
|
-
newlineInCode: () => Rn,
|
|
150
|
-
resetAttributes: () => zn,
|
|
151
|
-
scrollIntoView: () => Nn,
|
|
152
|
-
selectAll: () => In,
|
|
153
|
-
selectNodeBackward: () => jn,
|
|
154
|
-
selectNodeForward: () => Dn,
|
|
155
|
-
selectParentNode: () => Bn,
|
|
156
|
-
selectTextblockEnd: () => Hn,
|
|
157
|
-
selectTextblockStart: () => Ln,
|
|
158
|
-
setContent: () => Vn,
|
|
159
|
-
setMark: () => as,
|
|
160
|
-
setMeta: () => cs,
|
|
161
|
-
setNode: () => ls,
|
|
162
|
-
setNodeSelection: () => ds,
|
|
163
|
-
setTextDirection: () => us,
|
|
164
|
-
setTextSelection: () => ps,
|
|
165
|
-
sinkListItem: () => hs,
|
|
166
|
-
splitBlock: () => ms,
|
|
167
|
-
splitListItem: () => fs,
|
|
168
|
-
toggleList: () => gs,
|
|
169
|
-
toggleMark: () => ys,
|
|
170
|
-
toggleNode: () => vs,
|
|
171
|
-
toggleWrap: () => bs,
|
|
172
|
-
undoInputRule: () => ks,
|
|
173
|
-
unsetAllMarks: () => ws,
|
|
174
|
-
unsetMark: () => xs,
|
|
175
|
-
unsetTextDirection: () => Ms,
|
|
176
|
-
updateAttributes: () => Ss,
|
|
177
|
-
wrapIn: () => Es,
|
|
178
|
-
wrapInList: () => Ts
|
|
179
|
-
});
|
|
180
|
-
var Ze = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
181
|
-
var n;
|
|
182
|
-
t.isDestroyed || (e.dom.blur(), (n = window?.getSelection()) == null || n.removeAllRanges());
|
|
183
|
-
}), !0), Qe = (t = !0) => ({ commands: e }) => e.setContent("", { emitUpdate: t }), Ge = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
184
|
-
const { selection: s } = e, { ranges: r } = s;
|
|
185
|
-
return n && r.forEach(({ $from: o, $to: c }) => {
|
|
186
|
-
t.doc.nodesBetween(o.pos, c.pos, (i, a) => {
|
|
187
|
-
if (i.type.isText)
|
|
188
|
-
return;
|
|
189
|
-
const { doc: l, mapping: d } = e, p = l.resolve(d.map(a)), u = l.resolve(d.map(a + i.nodeSize)), h = p.blockRange(u);
|
|
190
|
-
if (!h)
|
|
191
|
-
return;
|
|
192
|
-
const m = be(h);
|
|
193
|
-
if (i.type.isTextblock) {
|
|
194
|
-
const { defaultType: f } = p.parent.contentMatchAt(p.index());
|
|
195
|
-
e.setNodeMarkup(h.start, f);
|
|
196
|
-
}
|
|
197
|
-
(m || m === 0) && e.lift(h, m);
|
|
198
|
-
});
|
|
199
|
-
}), !0;
|
|
200
|
-
}, tn = (t) => (e) => t(e), en = () => ({ state: t, dispatch: e }) => xe(t, e), nn = (t, e) => ({ editor: n, tr: s }) => {
|
|
201
|
-
const { state: r } = n, o = r.doc.slice(t.from, t.to);
|
|
202
|
-
s.deleteRange(t.from, t.to);
|
|
203
|
-
const c = s.mapping.map(e);
|
|
204
|
-
return s.insert(c, o.content), s.setSelection(new C(s.doc.resolve(Math.max(c - 1, 0)))), !0;
|
|
205
|
-
}, sn = () => ({ tr: t, dispatch: e }) => {
|
|
206
|
-
const { selection: n } = t, s = n.$anchor.node();
|
|
207
|
-
if (s.content.size > 0)
|
|
208
|
-
return !1;
|
|
209
|
-
const r = t.selection.$anchor;
|
|
210
|
-
for (let o = r.depth; o > 0; o -= 1)
|
|
211
|
-
if (r.node(o).type === s.type) {
|
|
212
|
-
if (e) {
|
|
213
|
-
const c = r.before(o), i = r.after(o);
|
|
214
|
-
t.delete(c, i).scrollIntoView();
|
|
215
|
-
}
|
|
216
|
-
return !0;
|
|
217
|
-
}
|
|
218
|
-
return !1;
|
|
219
|
-
};
|
|
220
|
-
function T(t, e) {
|
|
221
|
-
if (typeof t == "string") {
|
|
222
|
-
if (!e.nodes[t])
|
|
223
|
-
throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);
|
|
224
|
-
return e.nodes[t];
|
|
225
|
-
}
|
|
226
|
-
return t;
|
|
227
|
-
}
|
|
228
|
-
var rn = (t) => ({ tr: e, state: n, dispatch: s }) => {
|
|
229
|
-
const r = T(t, n.schema), o = e.selection.$anchor;
|
|
230
|
-
for (let c = o.depth; c > 0; c -= 1)
|
|
231
|
-
if (o.node(c).type === r) {
|
|
232
|
-
if (s) {
|
|
233
|
-
const i = o.before(c), a = o.after(c);
|
|
234
|
-
e.delete(i, a).scrollIntoView();
|
|
235
|
-
}
|
|
236
|
-
return !0;
|
|
237
|
-
}
|
|
238
|
-
return !1;
|
|
239
|
-
}, on = (t) => ({ tr: e, dispatch: n }) => {
|
|
240
|
-
const { from: s, to: r } = t;
|
|
241
|
-
return n && e.delete(s, r), !0;
|
|
242
|
-
}, an = () => ({ state: t, dispatch: e }) => Me(t, e), cn = () => ({ commands: t }) => t.keyboardShortcut("Enter"), ln = () => ({ state: t, dispatch: e }) => Se(t, e);
|
|
243
|
-
function gt(t) {
|
|
244
|
-
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
245
|
-
}
|
|
246
|
-
function Q(t, e, n = { strict: !0 }) {
|
|
247
|
-
const s = Object.keys(e);
|
|
248
|
-
return s.length ? s.every((r) => n.strict ? e[r] === t[r] : gt(e[r]) ? e[r].test(t[r]) : e[r] === t[r]) : !0;
|
|
249
|
-
}
|
|
250
|
-
function Lt(t, e, n = {}) {
|
|
251
|
-
return t.find((s) => s.type === e && Q(
|
|
252
|
-
// Only check equality for the attributes that are provided
|
|
253
|
-
Object.fromEntries(Object.keys(n).map((r) => [r, s.attrs[r]])),
|
|
254
|
-
n
|
|
255
|
-
));
|
|
256
|
-
}
|
|
257
|
-
function $t(t, e, n = {}) {
|
|
258
|
-
return !!Lt(t, e, n);
|
|
259
|
-
}
|
|
260
|
-
function yt(t, e, n) {
|
|
261
|
-
var s;
|
|
262
|
-
if (!t || !e)
|
|
263
|
-
return;
|
|
264
|
-
let r = t.parent.childAfter(t.parentOffset);
|
|
265
|
-
if ((!r.node || !r.node.marks.some((l) => l.type === e)) && (r = t.parent.childBefore(t.parentOffset)), !r.node || !r.node.marks.some((l) => l.type === e) || (n = n || ((s = r.node.marks[0]) == null ? void 0 : s.attrs), !Lt([...r.node.marks], e, n)))
|
|
266
|
-
return;
|
|
267
|
-
let o = r.index, c = t.start() + r.offset, i = o + 1, a = c + r.node.nodeSize;
|
|
268
|
-
for (; o > 0 && $t([...t.parent.child(o - 1).marks], e, n); )
|
|
269
|
-
o -= 1, c -= t.parent.child(o).nodeSize;
|
|
270
|
-
for (; i < t.parent.childCount && $t([...t.parent.child(i).marks], e, n); )
|
|
271
|
-
a += t.parent.child(i).nodeSize, i += 1;
|
|
272
|
-
return {
|
|
273
|
-
from: c,
|
|
274
|
-
to: a
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
function z(t, e) {
|
|
278
|
-
if (typeof t == "string") {
|
|
279
|
-
if (!e.marks[t])
|
|
280
|
-
throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);
|
|
281
|
-
return e.marks[t];
|
|
282
|
-
}
|
|
283
|
-
return t;
|
|
284
|
-
}
|
|
285
|
-
var dn = (t, e = {}) => ({ tr: n, state: s, dispatch: r }) => {
|
|
286
|
-
const o = z(t, s.schema), { doc: c, selection: i } = n, { $from: a, from: l, to: d } = i;
|
|
287
|
-
if (r) {
|
|
288
|
-
const p = yt(a, o, e);
|
|
289
|
-
if (p && p.from <= l && p.to >= d) {
|
|
290
|
-
const u = C.create(c, p.from, p.to);
|
|
291
|
-
n.setSelection(u);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return !0;
|
|
295
|
-
}, un = (t) => (e) => {
|
|
296
|
-
const n = typeof t == "function" ? t(e) : t;
|
|
297
|
-
for (let s = 0; s < n.length; s += 1)
|
|
298
|
-
if (n[s](e))
|
|
299
|
-
return !0;
|
|
300
|
-
return !1;
|
|
301
|
-
};
|
|
302
|
-
function Vt(t) {
|
|
303
|
-
return t instanceof C;
|
|
304
|
-
}
|
|
305
|
-
function D(t = 0, e = 0, n = 0) {
|
|
306
|
-
return Math.min(Math.max(t, e), n);
|
|
307
|
-
}
|
|
308
|
-
function Wt(t, e = null) {
|
|
309
|
-
if (!e)
|
|
310
|
-
return null;
|
|
311
|
-
const n = B.atStart(t), s = B.atEnd(t);
|
|
312
|
-
if (e === "start" || e === !0)
|
|
313
|
-
return n;
|
|
314
|
-
if (e === "end")
|
|
315
|
-
return s;
|
|
316
|
-
const r = n.from, o = s.to;
|
|
317
|
-
return e === "all" ? C.create(t, D(0, r, o), D(t.content.size, r, o)) : C.create(t, D(e, r, o), D(e, r, o));
|
|
318
|
-
}
|
|
319
|
-
function Ct() {
|
|
320
|
-
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
321
|
-
}
|
|
322
|
-
function G() {
|
|
323
|
-
return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
|
|
324
|
-
navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
325
|
-
}
|
|
326
|
-
function pn() {
|
|
327
|
-
return typeof navigator < "u" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : !1;
|
|
328
|
-
}
|
|
329
|
-
var hn = (t = null, e = {}) => ({ editor: n, view: s, tr: r, dispatch: o }) => {
|
|
330
|
-
e = {
|
|
331
|
-
scrollIntoView: !0,
|
|
332
|
-
...e
|
|
333
|
-
};
|
|
334
|
-
const c = () => {
|
|
335
|
-
(G() || Ct()) && s.dom.focus(), pn() && !G() && !Ct() && s.dom.focus({ preventScroll: !0 }), requestAnimationFrame(() => {
|
|
336
|
-
n.isDestroyed || (s.focus(), e?.scrollIntoView && n.commands.scrollIntoView());
|
|
337
|
-
});
|
|
338
|
-
};
|
|
339
|
-
try {
|
|
340
|
-
if (s.hasFocus() && t === null || t === !1)
|
|
341
|
-
return !0;
|
|
342
|
-
} catch {
|
|
343
|
-
return !1;
|
|
344
|
-
}
|
|
345
|
-
if (o && t === null && !Vt(n.state.selection))
|
|
346
|
-
return c(), !0;
|
|
347
|
-
const i = Wt(r.doc, t) || n.state.selection, a = n.state.selection.eq(i);
|
|
348
|
-
return o && (a || r.setSelection(i), a && r.storedMarks && r.setStoredMarks(r.storedMarks), c()), !0;
|
|
349
|
-
}, mn = (t, e) => (n) => t.every((s, r) => e(s, { ...n, index: r })), fn = (t, e) => ({ tr: n, commands: s }) => s.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Ut = (t) => {
|
|
350
|
-
const e = t.childNodes;
|
|
351
|
-
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
352
|
-
const s = e[n];
|
|
353
|
-
s.nodeType === 3 && s.nodeValue && /^(\n\s\s|\n)$/.test(s.nodeValue) ? t.removeChild(s) : s.nodeType === 1 && Ut(s);
|
|
354
|
-
}
|
|
355
|
-
return t;
|
|
356
|
-
};
|
|
357
|
-
function _(t) {
|
|
358
|
-
if (typeof window > "u")
|
|
359
|
-
throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
|
|
360
|
-
const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
361
|
-
return Ut(n);
|
|
362
|
-
}
|
|
363
|
-
function U(t, e, n) {
|
|
364
|
-
if (t instanceof Ue || t instanceof I)
|
|
365
|
-
return t;
|
|
366
|
-
n = {
|
|
367
|
-
slice: !0,
|
|
368
|
-
parseOptions: {},
|
|
369
|
-
...n
|
|
370
|
-
};
|
|
371
|
-
const s = typeof t == "object" && t !== null, r = typeof t == "string";
|
|
372
|
-
if (s)
|
|
373
|
-
try {
|
|
374
|
-
if (Array.isArray(t) && t.length > 0)
|
|
375
|
-
return I.fromArray(t.map((c) => e.nodeFromJSON(c)));
|
|
376
|
-
const o = e.nodeFromJSON(t);
|
|
377
|
-
return n.errorOnInvalidContent && o.check(), o;
|
|
378
|
-
} catch (o) {
|
|
379
|
-
if (n.errorOnInvalidContent)
|
|
380
|
-
throw new Error("[tiptap error]: Invalid JSON content", { cause: o });
|
|
381
|
-
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", t, "Error:", o), U("", e, n);
|
|
382
|
-
}
|
|
383
|
-
if (r) {
|
|
384
|
-
if (n.errorOnInvalidContent) {
|
|
385
|
-
let c = !1, i = "";
|
|
386
|
-
const a = new Bt({
|
|
387
|
-
topNode: e.spec.topNode,
|
|
388
|
-
marks: e.spec.marks,
|
|
389
|
-
// Prosemirror's schemas are executed such that: the last to execute, matches last
|
|
390
|
-
// This means that we can add a catch-all node at the end of the schema to catch any content that we don't know how to handle
|
|
391
|
-
nodes: e.spec.nodes.append({
|
|
392
|
-
__tiptap__private__unknown__catch__all__node: {
|
|
393
|
-
content: "inline*",
|
|
394
|
-
group: "block",
|
|
395
|
-
parseDOM: [
|
|
396
|
-
{
|
|
397
|
-
tag: "*",
|
|
398
|
-
getAttrs: (l) => (c = !0, i = typeof l == "string" ? l : l.outerHTML, null)
|
|
399
|
-
}
|
|
400
|
-
]
|
|
401
|
-
}
|
|
402
|
-
})
|
|
403
|
-
});
|
|
404
|
-
if (n.slice ? lt.fromSchema(a).parseSlice(_(t), n.parseOptions) : lt.fromSchema(a).parse(_(t), n.parseOptions), n.errorOnInvalidContent && c)
|
|
405
|
-
throw new Error("[tiptap error]: Invalid HTML content", {
|
|
406
|
-
cause: new Error(`Invalid element found: ${i}`)
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
const o = lt.fromSchema(e);
|
|
410
|
-
return n.slice ? o.parseSlice(_(t), n.parseOptions).content : o.parse(_(t), n.parseOptions);
|
|
411
|
-
}
|
|
412
|
-
return U("", e, n);
|
|
413
|
-
}
|
|
414
|
-
function gn(t, e, n) {
|
|
415
|
-
const s = t.steps.length - 1;
|
|
416
|
-
if (s < e)
|
|
417
|
-
return;
|
|
418
|
-
const r = t.steps[s];
|
|
419
|
-
if (!(r instanceof ke || r instanceof we))
|
|
420
|
-
return;
|
|
421
|
-
const o = t.mapping.maps[s];
|
|
422
|
-
let c = 0;
|
|
423
|
-
o.forEach((i, a, l, d) => {
|
|
424
|
-
c === 0 && (c = d);
|
|
425
|
-
}), t.setSelection(B.near(t.doc.resolve(c), n));
|
|
426
|
-
}
|
|
427
|
-
var yn = (t) => !("type" in t), vn = (t, e, n) => ({ tr: s, dispatch: r, editor: o }) => {
|
|
428
|
-
var c;
|
|
429
|
-
if (r) {
|
|
430
|
-
n = {
|
|
431
|
-
parseOptions: o.options.parseOptions,
|
|
432
|
-
updateSelection: !0,
|
|
433
|
-
applyInputRules: !1,
|
|
434
|
-
applyPasteRules: !1,
|
|
435
|
-
...n
|
|
436
|
-
};
|
|
437
|
-
let i;
|
|
438
|
-
const a = (f) => {
|
|
439
|
-
o.emit("contentError", {
|
|
440
|
-
editor: o,
|
|
441
|
-
error: f,
|
|
442
|
-
disableCollaboration: () => {
|
|
443
|
-
"collaboration" in o.storage && typeof o.storage.collaboration == "object" && o.storage.collaboration && (o.storage.collaboration.isDisabled = !0);
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}, l = {
|
|
447
|
-
preserveWhitespace: "full",
|
|
448
|
-
...n.parseOptions
|
|
449
|
-
};
|
|
450
|
-
if (!n.errorOnInvalidContent && !o.options.enableContentCheck && o.options.emitContentError)
|
|
451
|
-
try {
|
|
452
|
-
U(e, o.schema, {
|
|
453
|
-
parseOptions: l,
|
|
454
|
-
errorOnInvalidContent: !0
|
|
455
|
-
});
|
|
456
|
-
} catch (f) {
|
|
457
|
-
a(f);
|
|
458
|
-
}
|
|
459
|
-
try {
|
|
460
|
-
i = U(e, o.schema, {
|
|
461
|
-
parseOptions: l,
|
|
462
|
-
errorOnInvalidContent: (c = n.errorOnInvalidContent) != null ? c : o.options.enableContentCheck
|
|
463
|
-
});
|
|
464
|
-
} catch (f) {
|
|
465
|
-
return a(f), !1;
|
|
466
|
-
}
|
|
467
|
-
let { from: d, to: p } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, u = !0, h = !0;
|
|
468
|
-
if ((yn(i) ? i : [i]).forEach((f) => {
|
|
469
|
-
f.check(), u = u ? f.isText && f.marks.length === 0 : !1, h = h ? f.isBlock : !1;
|
|
470
|
-
}), d === p && h) {
|
|
471
|
-
const { parent: f } = s.doc.resolve(d);
|
|
472
|
-
f.isTextblock && !f.type.spec.code && !f.childCount && (d -= 1, p += 1);
|
|
473
|
-
}
|
|
474
|
-
let m;
|
|
475
|
-
if (u) {
|
|
476
|
-
if (Array.isArray(e))
|
|
477
|
-
m = e.map((f) => f.text || "").join("");
|
|
478
|
-
else if (e instanceof I) {
|
|
479
|
-
let f = "";
|
|
480
|
-
e.forEach((g) => {
|
|
481
|
-
g.text && (f += g.text);
|
|
482
|
-
}), m = f;
|
|
483
|
-
} else typeof e == "object" && e && e.text ? m = e.text : m = e;
|
|
484
|
-
s.insertText(m, d, p);
|
|
485
|
-
} else {
|
|
486
|
-
m = i;
|
|
487
|
-
const f = s.doc.resolve(d), g = f.node(), y = f.parentOffset === 0, b = g.isText || g.isTextblock, w = g.content.size > 0;
|
|
488
|
-
y && b && w && (d = Math.max(0, d - 1)), s.replaceWith(d, p, m);
|
|
489
|
-
}
|
|
490
|
-
n.updateSelection && gn(s, s.steps.length - 1, -1), n.applyInputRules && s.setMeta("applyInputRules", { from: d, text: m }), n.applyPasteRules && s.setMeta("applyPasteRules", { from: d, text: m });
|
|
491
|
-
}
|
|
492
|
-
return !0;
|
|
493
|
-
}, bn = () => ({ state: t, dispatch: e }) => Ee(t, e), kn = () => ({ state: t, dispatch: e }) => Te(t, e), wn = () => ({ state: t, dispatch: e }) => $e(t, e), xn = () => ({ state: t, dispatch: e }) => Ce(t, e), Mn = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
494
|
-
try {
|
|
495
|
-
const s = Dt(t.doc, t.selection.$from.pos, -1);
|
|
496
|
-
return s == null ? !1 : (n.join(s, 2), e && e(n), !0);
|
|
497
|
-
} catch {
|
|
498
|
-
return !1;
|
|
499
|
-
}
|
|
500
|
-
}, Sn = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
501
|
-
try {
|
|
502
|
-
const s = Dt(t.doc, t.selection.$from.pos, 1);
|
|
503
|
-
return s == null ? !1 : (n.join(s, 2), e && e(n), !0);
|
|
504
|
-
} catch {
|
|
505
|
-
return !1;
|
|
506
|
-
}
|
|
507
|
-
}, En = () => ({ state: t, dispatch: e }) => Ae(t, e), Tn = () => ({ state: t, dispatch: e }) => Oe(t, e);
|
|
508
|
-
function Ft() {
|
|
509
|
-
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
510
|
-
}
|
|
511
|
-
function $n(t) {
|
|
512
|
-
const e = t.split(/-(?!$)/);
|
|
513
|
-
let n = e[e.length - 1];
|
|
514
|
-
n === "Space" && (n = " ");
|
|
515
|
-
let s, r, o, c;
|
|
516
|
-
for (let i = 0; i < e.length - 1; i += 1) {
|
|
517
|
-
const a = e[i];
|
|
518
|
-
if (/^(cmd|meta|m)$/i.test(a))
|
|
519
|
-
c = !0;
|
|
520
|
-
else if (/^a(lt)?$/i.test(a))
|
|
521
|
-
s = !0;
|
|
522
|
-
else if (/^(c|ctrl|control)$/i.test(a))
|
|
523
|
-
r = !0;
|
|
524
|
-
else if (/^s(hift)?$/i.test(a))
|
|
525
|
-
o = !0;
|
|
526
|
-
else if (/^mod$/i.test(a))
|
|
527
|
-
G() || Ft() ? c = !0 : r = !0;
|
|
528
|
-
else
|
|
529
|
-
throw new Error(`Unrecognized modifier name: ${a}`);
|
|
530
|
-
}
|
|
531
|
-
return s && (n = `Alt-${n}`), r && (n = `Ctrl-${n}`), c && (n = `Meta-${n}`), o && (n = `Shift-${n}`), n;
|
|
532
|
-
}
|
|
533
|
-
var Cn = (t) => ({ editor: e, view: n, tr: s, dispatch: r }) => {
|
|
534
|
-
const o = $n(t).split(/-(?!$)/), c = o.find((l) => !["Alt", "Ctrl", "Meta", "Shift"].includes(l)), i = new KeyboardEvent("keydown", {
|
|
535
|
-
key: c === "Space" ? " " : c,
|
|
536
|
-
altKey: o.includes("Alt"),
|
|
537
|
-
ctrlKey: o.includes("Ctrl"),
|
|
538
|
-
metaKey: o.includes("Meta"),
|
|
539
|
-
shiftKey: o.includes("Shift"),
|
|
540
|
-
bubbles: !0,
|
|
541
|
-
cancelable: !0
|
|
542
|
-
});
|
|
543
|
-
return e.captureTransaction(() => {
|
|
544
|
-
n.someProp("handleKeyDown", (l) => l(n, i));
|
|
545
|
-
})?.steps.forEach((l) => {
|
|
546
|
-
const d = l.map(s.mapping);
|
|
547
|
-
d && r && s.maybeStep(d);
|
|
548
|
-
}), !0;
|
|
549
|
-
};
|
|
550
|
-
function F(t, e, n = {}) {
|
|
551
|
-
const { from: s, to: r, empty: o } = t.selection, c = e ? T(e, t.schema) : null, i = [];
|
|
552
|
-
t.doc.nodesBetween(s, r, (d, p) => {
|
|
553
|
-
if (d.isText)
|
|
554
|
-
return;
|
|
555
|
-
const u = Math.max(s, p), h = Math.min(r, p + d.nodeSize);
|
|
556
|
-
i.push({
|
|
557
|
-
node: d,
|
|
558
|
-
from: u,
|
|
559
|
-
to: h
|
|
560
|
-
});
|
|
561
|
-
});
|
|
562
|
-
const a = r - s, l = i.filter((d) => c ? c.name === d.node.type.name : !0).filter((d) => Q(d.node.attrs, n, { strict: !1 }));
|
|
563
|
-
return o ? !!l.length : l.reduce((d, p) => d + p.to - p.from, 0) >= a;
|
|
564
|
-
}
|
|
565
|
-
var An = (t, e = {}) => ({ state: n, dispatch: s }) => {
|
|
566
|
-
const r = T(t, n.schema);
|
|
567
|
-
return F(n, r, e) ? Pe(n, s) : !1;
|
|
568
|
-
}, On = () => ({ state: t, dispatch: e }) => Re(t, e), Pn = (t) => ({ state: e, dispatch: n }) => {
|
|
569
|
-
const s = T(t, e.schema);
|
|
570
|
-
return Ke(s)(e, n);
|
|
571
|
-
}, Rn = () => ({ state: t, dispatch: e }) => ze(t, e);
|
|
572
|
-
function rt(t, e) {
|
|
573
|
-
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
574
|
-
}
|
|
575
|
-
function At(t, e) {
|
|
576
|
-
const n = typeof e == "string" ? [e] : e;
|
|
577
|
-
return Object.keys(t).reduce((s, r) => (n.includes(r) || (s[r] = t[r]), s), {});
|
|
578
|
-
}
|
|
579
|
-
var zn = (t, e) => ({ tr: n, state: s, dispatch: r }) => {
|
|
580
|
-
let o = null, c = null;
|
|
581
|
-
const i = rt(
|
|
582
|
-
typeof t == "string" ? t : t.name,
|
|
583
|
-
s.schema
|
|
584
|
-
);
|
|
585
|
-
if (!i)
|
|
586
|
-
return !1;
|
|
587
|
-
i === "node" && (o = T(t, s.schema)), i === "mark" && (c = z(t, s.schema));
|
|
588
|
-
let a = !1;
|
|
589
|
-
return n.selection.ranges.forEach((l) => {
|
|
590
|
-
s.doc.nodesBetween(l.$from.pos, l.$to.pos, (d, p) => {
|
|
591
|
-
o && o === d.type && (a = !0, r && n.setNodeMarkup(p, void 0, At(d.attrs, e))), c && d.marks.length && d.marks.forEach((u) => {
|
|
592
|
-
c === u.type && (a = !0, r && n.addMark(p, p + d.nodeSize, c.create(At(u.attrs, e))));
|
|
593
|
-
});
|
|
594
|
-
});
|
|
595
|
-
}), a;
|
|
596
|
-
}, Nn = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), In = () => ({ tr: t, dispatch: e }) => {
|
|
597
|
-
if (e) {
|
|
598
|
-
const n = new Ve(t.doc);
|
|
599
|
-
t.setSelection(n);
|
|
600
|
-
}
|
|
601
|
-
return !0;
|
|
602
|
-
}, jn = () => ({ state: t, dispatch: e }) => Ne(t, e), Dn = () => ({ state: t, dispatch: e }) => Ie(t, e), Bn = () => ({ state: t, dispatch: e }) => je(t, e), Hn = () => ({ state: t, dispatch: e }) => De(t, e), Ln = () => ({ state: t, dispatch: e }) => Be(t, e);
|
|
603
|
-
function pt(t, e, n = {}, s = {}) {
|
|
604
|
-
return U(t, e, {
|
|
605
|
-
slice: !1,
|
|
606
|
-
parseOptions: n,
|
|
607
|
-
errorOnInvalidContent: s.errorOnInvalidContent
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
var Vn = (t, { errorOnInvalidContent: e, emitUpdate: n = !0, parseOptions: s = {} } = {}) => ({ editor: r, tr: o, dispatch: c, commands: i }) => {
|
|
611
|
-
const { doc: a } = o;
|
|
612
|
-
if (s.preserveWhitespace !== "full") {
|
|
613
|
-
const l = pt(t, r.schema, s, {
|
|
614
|
-
errorOnInvalidContent: e ?? r.options.enableContentCheck
|
|
615
|
-
});
|
|
616
|
-
return c && o.replaceWith(0, a.content.size, l).setMeta("preventUpdate", !n), !0;
|
|
617
|
-
}
|
|
618
|
-
return c && o.setMeta("preventUpdate", !n), i.insertContentAt({ from: 0, to: a.content.size }, t, {
|
|
619
|
-
parseOptions: s,
|
|
620
|
-
errorOnInvalidContent: e ?? r.options.enableContentCheck
|
|
621
|
-
});
|
|
622
|
-
};
|
|
623
|
-
function Kt(t, e) {
|
|
624
|
-
const n = z(e, t.schema), { from: s, to: r, empty: o } = t.selection, c = [];
|
|
625
|
-
o ? (t.storedMarks && c.push(...t.storedMarks), c.push(...t.selection.$head.marks())) : t.doc.nodesBetween(s, r, (a) => {
|
|
626
|
-
c.push(...a.marks);
|
|
627
|
-
});
|
|
628
|
-
const i = c.find((a) => a.type.name === n.name);
|
|
629
|
-
return i ? { ...i.attrs } : {};
|
|
630
|
-
}
|
|
631
|
-
function Wn(t, e) {
|
|
632
|
-
const n = new ye(t);
|
|
633
|
-
return e.forEach((s) => {
|
|
634
|
-
s.steps.forEach((r) => {
|
|
635
|
-
n.step(r);
|
|
636
|
-
});
|
|
637
|
-
}), n;
|
|
638
|
-
}
|
|
639
|
-
function Un(t) {
|
|
640
|
-
for (let e = 0; e < t.edgeCount; e += 1) {
|
|
641
|
-
const { type: n } = t.edge(e);
|
|
642
|
-
if (n.isTextblock && !n.hasRequiredAttrs())
|
|
643
|
-
return n;
|
|
644
|
-
}
|
|
645
|
-
return null;
|
|
646
|
-
}
|
|
647
|
-
function or(t, e, n) {
|
|
648
|
-
const s = [];
|
|
649
|
-
return t.nodesBetween(e.from, e.to, (r, o) => {
|
|
650
|
-
n(r) && s.push({
|
|
651
|
-
node: r,
|
|
652
|
-
pos: o
|
|
653
|
-
});
|
|
654
|
-
}), s;
|
|
655
|
-
}
|
|
656
|
-
function Fn(t, e) {
|
|
657
|
-
for (let n = t.depth; n > 0; n -= 1) {
|
|
658
|
-
const s = t.node(n);
|
|
659
|
-
if (e(s))
|
|
660
|
-
return {
|
|
661
|
-
pos: n > 0 ? t.before(n) : 0,
|
|
662
|
-
start: t.start(n),
|
|
663
|
-
depth: n,
|
|
664
|
-
node: s
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
function ot(t) {
|
|
669
|
-
return (e) => Fn(e.$from, t);
|
|
670
|
-
}
|
|
671
|
-
function v(t, e, n) {
|
|
672
|
-
return t.config[e] === void 0 && t.parent ? v(t.parent, e, n) : typeof t.config[e] == "function" ? t.config[e].bind({
|
|
673
|
-
...n,
|
|
674
|
-
parent: t.parent ? v(t.parent, e, n) : null
|
|
675
|
-
}) : t.config[e];
|
|
676
|
-
}
|
|
677
|
-
function vt(t) {
|
|
678
|
-
return t.map((e) => {
|
|
679
|
-
const n = {
|
|
680
|
-
name: e.name,
|
|
681
|
-
options: e.options,
|
|
682
|
-
storage: e.storage
|
|
683
|
-
}, s = v(e, "addExtensions", n);
|
|
684
|
-
return s ? [e, ...vt(s())] : e;
|
|
685
|
-
}).flat(10);
|
|
686
|
-
}
|
|
687
|
-
function bt(t, e) {
|
|
688
|
-
const n = We.fromSchema(e).serializeFragment(t), s = document.implementation.createHTMLDocument().createElement("div");
|
|
689
|
-
return s.appendChild(n), s.innerHTML;
|
|
690
|
-
}
|
|
691
|
-
function _t(t) {
|
|
692
|
-
return typeof t == "function";
|
|
693
|
-
}
|
|
694
|
-
function M(t, e = void 0, ...n) {
|
|
695
|
-
return _t(t) ? e ? t.bind(e)(...n) : t(...n) : t;
|
|
696
|
-
}
|
|
697
|
-
function Kn(t = {}) {
|
|
698
|
-
return Object.keys(t).length === 0 && t.constructor === Object;
|
|
699
|
-
}
|
|
700
|
-
function H(t) {
|
|
701
|
-
const e = t.filter((r) => r.type === "extension"), n = t.filter((r) => r.type === "node"), s = t.filter((r) => r.type === "mark");
|
|
702
|
-
return {
|
|
703
|
-
baseExtensions: e,
|
|
704
|
-
nodeExtensions: n,
|
|
705
|
-
markExtensions: s
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
function qt(t) {
|
|
709
|
-
const e = [], { nodeExtensions: n, markExtensions: s } = H(t), r = [...n, ...s], o = {
|
|
710
|
-
default: null,
|
|
711
|
-
validate: void 0,
|
|
712
|
-
rendered: !0,
|
|
713
|
-
renderHTML: null,
|
|
714
|
-
parseHTML: null,
|
|
715
|
-
keepOnSplit: !0,
|
|
716
|
-
isRequired: !1
|
|
717
|
-
}, c = n.filter((l) => l.name !== "text").map((l) => l.name), i = s.map((l) => l.name), a = [...c, ...i];
|
|
718
|
-
return t.forEach((l) => {
|
|
719
|
-
const d = {
|
|
720
|
-
name: l.name,
|
|
721
|
-
options: l.options,
|
|
722
|
-
storage: l.storage,
|
|
723
|
-
extensions: r
|
|
724
|
-
}, p = v(
|
|
725
|
-
l,
|
|
726
|
-
"addGlobalAttributes",
|
|
727
|
-
d
|
|
728
|
-
);
|
|
729
|
-
p && p().forEach((u) => {
|
|
730
|
-
let h;
|
|
731
|
-
Array.isArray(u.types) ? h = u.types : u.types === "*" ? h = a : u.types === "nodes" ? h = c : u.types === "marks" ? h = i : h = [], h.forEach((m) => {
|
|
732
|
-
Object.entries(u.attributes).forEach(([f, g]) => {
|
|
733
|
-
e.push({
|
|
734
|
-
type: m,
|
|
735
|
-
name: f,
|
|
736
|
-
attribute: {
|
|
737
|
-
...o,
|
|
738
|
-
...g
|
|
739
|
-
}
|
|
740
|
-
});
|
|
741
|
-
});
|
|
742
|
-
});
|
|
743
|
-
});
|
|
744
|
-
}), r.forEach((l) => {
|
|
745
|
-
const d = {
|
|
746
|
-
name: l.name,
|
|
747
|
-
options: l.options,
|
|
748
|
-
storage: l.storage
|
|
749
|
-
}, p = v(
|
|
750
|
-
l,
|
|
751
|
-
"addAttributes",
|
|
752
|
-
d
|
|
753
|
-
);
|
|
754
|
-
if (!p)
|
|
755
|
-
return;
|
|
756
|
-
const u = p();
|
|
757
|
-
Object.entries(u).forEach(([h, m]) => {
|
|
758
|
-
const f = {
|
|
759
|
-
...o,
|
|
760
|
-
...m
|
|
761
|
-
};
|
|
762
|
-
typeof f?.default == "function" && (f.default = f.default()), f?.isRequired && f?.default === void 0 && delete f.default, e.push({
|
|
763
|
-
type: l.name,
|
|
764
|
-
name: h,
|
|
765
|
-
attribute: f
|
|
766
|
-
});
|
|
767
|
-
});
|
|
768
|
-
}), e;
|
|
769
|
-
}
|
|
770
|
-
function _n(t) {
|
|
771
|
-
const e = [];
|
|
772
|
-
let n = "", s = !1, r = !1, o = 0;
|
|
773
|
-
const c = t.length;
|
|
774
|
-
for (let i = 0; i < c; i += 1) {
|
|
775
|
-
const a = t[i];
|
|
776
|
-
if (a === "'" && !r) {
|
|
777
|
-
s = !s, n += a;
|
|
778
|
-
continue;
|
|
779
|
-
}
|
|
780
|
-
if (a === '"' && !s) {
|
|
781
|
-
r = !r, n += a;
|
|
782
|
-
continue;
|
|
783
|
-
}
|
|
784
|
-
if (!s && !r) {
|
|
785
|
-
if (a === "(") {
|
|
786
|
-
o += 1, n += a;
|
|
787
|
-
continue;
|
|
788
|
-
}
|
|
789
|
-
if (a === ")" && o > 0) {
|
|
790
|
-
o -= 1, n += a;
|
|
791
|
-
continue;
|
|
792
|
-
}
|
|
793
|
-
if (a === ";" && o === 0) {
|
|
794
|
-
e.push(n), n = "";
|
|
795
|
-
continue;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
n += a;
|
|
799
|
-
}
|
|
800
|
-
return n && e.push(n), e;
|
|
801
|
-
}
|
|
802
|
-
function Ot(t) {
|
|
803
|
-
const e = [], n = _n(t || ""), s = n.length;
|
|
804
|
-
for (let r = 0; r < s; r += 1) {
|
|
805
|
-
const o = n[r], c = o.indexOf(":");
|
|
806
|
-
if (c === -1)
|
|
807
|
-
continue;
|
|
808
|
-
const i = o.slice(0, c).trim(), a = o.slice(c + 1).trim();
|
|
809
|
-
i && a && e.push([i, a]);
|
|
810
|
-
}
|
|
811
|
-
return e;
|
|
812
|
-
}
|
|
813
|
-
function qn(...t) {
|
|
814
|
-
return t.filter((e) => !!e).reduce((e, n) => {
|
|
815
|
-
const s = { ...e };
|
|
816
|
-
return Object.entries(n).forEach(([r, o]) => {
|
|
817
|
-
if (!s[r]) {
|
|
818
|
-
s[r] = o;
|
|
819
|
-
return;
|
|
820
|
-
}
|
|
821
|
-
if (r === "class") {
|
|
822
|
-
const c = o ? String(o).split(" ") : [], i = s[r] ? s[r].split(" ") : [], a = c.filter((l) => !i.includes(l));
|
|
823
|
-
s[r] = [...i, ...a].join(" ");
|
|
824
|
-
} else if (r === "style") {
|
|
825
|
-
const c = new Map([...Ot(s[r]), ...Ot(o)]);
|
|
826
|
-
s[r] = Array.from(c.entries()).map(([i, a]) => `${i}: ${a}`).join("; ");
|
|
827
|
-
} else
|
|
828
|
-
s[r] = o;
|
|
829
|
-
}), s;
|
|
830
|
-
}, {});
|
|
831
|
-
}
|
|
832
|
-
function tt(t, e) {
|
|
833
|
-
return e.filter((n) => n.type === t.type.name).filter((n) => n.attribute.rendered).map((n) => n.attribute.renderHTML ? n.attribute.renderHTML(t.attrs) || {} : {
|
|
834
|
-
[n.name]: t.attrs[n.name]
|
|
835
|
-
}).reduce((n, s) => qn(n, s), {});
|
|
836
|
-
}
|
|
837
|
-
function Jn(t) {
|
|
838
|
-
return typeof t != "string" ? t : t.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(t) : t === "true" ? !0 : t === "false" ? !1 : t;
|
|
839
|
-
}
|
|
840
|
-
function Pt(t, e) {
|
|
841
|
-
return "style" in t ? t : {
|
|
842
|
-
...t,
|
|
843
|
-
getAttrs: (n) => {
|
|
844
|
-
const s = t.getAttrs ? t.getAttrs(n) : t.attrs;
|
|
845
|
-
if (s === !1)
|
|
846
|
-
return !1;
|
|
847
|
-
const r = e.reduce((o, c) => {
|
|
848
|
-
const i = c.attribute.parseHTML ? c.attribute.parseHTML(n) : Jn(n.getAttribute(c.name));
|
|
849
|
-
return i == null ? o : {
|
|
850
|
-
...o,
|
|
851
|
-
[c.name]: i
|
|
852
|
-
};
|
|
853
|
-
}, {});
|
|
854
|
-
return { ...s, ...r };
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
function Rt(t) {
|
|
859
|
-
return Object.fromEntries(
|
|
860
|
-
// @ts-ignore
|
|
861
|
-
Object.entries(t).filter(([e, n]) => e === "attrs" && Kn(n) ? !1 : n != null)
|
|
862
|
-
);
|
|
863
|
-
}
|
|
864
|
-
function zt(t) {
|
|
865
|
-
var e, n;
|
|
866
|
-
const s = {};
|
|
867
|
-
return !((e = t?.attribute) != null && e.isRequired) && "default" in (t?.attribute || {}) && (s.default = t.attribute.default), ((n = t?.attribute) == null ? void 0 : n.validate) !== void 0 && (s.validate = t.attribute.validate), [t.name, s];
|
|
868
|
-
}
|
|
869
|
-
function Jt(t, e) {
|
|
870
|
-
var n;
|
|
871
|
-
const s = qt(t), { nodeExtensions: r, markExtensions: o } = H(t), c = (n = r.find((l) => v(l, "topNode"))) == null ? void 0 : n.name, i = Object.fromEntries(
|
|
872
|
-
r.map((l) => {
|
|
873
|
-
const d = s.filter((y) => y.type === l.name), p = {
|
|
874
|
-
name: l.name,
|
|
875
|
-
options: l.options,
|
|
876
|
-
storage: l.storage,
|
|
877
|
-
editor: e
|
|
878
|
-
}, u = t.reduce((y, b) => {
|
|
879
|
-
const w = v(b, "extendNodeSchema", p);
|
|
880
|
-
return {
|
|
881
|
-
...y,
|
|
882
|
-
...w ? w(l) : {}
|
|
883
|
-
};
|
|
884
|
-
}, {}), h = Rt({
|
|
885
|
-
...u,
|
|
886
|
-
content: M(v(l, "content", p)),
|
|
887
|
-
marks: M(v(l, "marks", p)),
|
|
888
|
-
group: M(v(l, "group", p)),
|
|
889
|
-
inline: M(v(l, "inline", p)),
|
|
890
|
-
atom: M(v(l, "atom", p)),
|
|
891
|
-
selectable: M(v(l, "selectable", p)),
|
|
892
|
-
draggable: M(v(l, "draggable", p)),
|
|
893
|
-
code: M(v(l, "code", p)),
|
|
894
|
-
whitespace: M(v(l, "whitespace", p)),
|
|
895
|
-
linebreakReplacement: M(
|
|
896
|
-
v(l, "linebreakReplacement", p)
|
|
897
|
-
),
|
|
898
|
-
defining: M(v(l, "defining", p)),
|
|
899
|
-
isolating: M(v(l, "isolating", p)),
|
|
900
|
-
attrs: Object.fromEntries(d.map(zt))
|
|
901
|
-
}), m = M(v(l, "parseHTML", p));
|
|
902
|
-
m && (h.parseDOM = m.map(
|
|
903
|
-
(y) => Pt(y, d)
|
|
904
|
-
));
|
|
905
|
-
const f = v(l, "renderHTML", p);
|
|
906
|
-
f && (h.toDOM = (y) => f({
|
|
907
|
-
node: y,
|
|
908
|
-
HTMLAttributes: tt(y, d)
|
|
909
|
-
}));
|
|
910
|
-
const g = v(l, "renderText", p);
|
|
911
|
-
return g && (h.toText = g), [l.name, h];
|
|
912
|
-
})
|
|
913
|
-
), a = Object.fromEntries(
|
|
914
|
-
o.map((l) => {
|
|
915
|
-
const d = s.filter((g) => g.type === l.name), p = {
|
|
916
|
-
name: l.name,
|
|
917
|
-
options: l.options,
|
|
918
|
-
storage: l.storage,
|
|
919
|
-
editor: e
|
|
920
|
-
}, u = t.reduce((g, y) => {
|
|
921
|
-
const b = v(y, "extendMarkSchema", p);
|
|
922
|
-
return {
|
|
923
|
-
...g,
|
|
924
|
-
...b ? b(l) : {}
|
|
925
|
-
};
|
|
926
|
-
}, {}), h = Rt({
|
|
927
|
-
...u,
|
|
928
|
-
inclusive: M(v(l, "inclusive", p)),
|
|
929
|
-
excludes: M(v(l, "excludes", p)),
|
|
930
|
-
group: M(v(l, "group", p)),
|
|
931
|
-
spanning: M(v(l, "spanning", p)),
|
|
932
|
-
code: M(v(l, "code", p)),
|
|
933
|
-
attrs: Object.fromEntries(d.map(zt))
|
|
934
|
-
}), m = M(v(l, "parseHTML", p));
|
|
935
|
-
m && (h.parseDOM = m.map(
|
|
936
|
-
(g) => Pt(g, d)
|
|
937
|
-
));
|
|
938
|
-
const f = v(l, "renderHTML", p);
|
|
939
|
-
return f && (h.toDOM = (g) => f({
|
|
940
|
-
mark: g,
|
|
941
|
-
HTMLAttributes: tt(g, d)
|
|
942
|
-
})), [l.name, h];
|
|
943
|
-
})
|
|
944
|
-
);
|
|
945
|
-
return new Bt({
|
|
946
|
-
topNode: c,
|
|
947
|
-
nodes: i,
|
|
948
|
-
marks: a
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
function Yn(t) {
|
|
952
|
-
const e = t.filter((n, s) => t.indexOf(n) !== s);
|
|
953
|
-
return Array.from(new Set(e));
|
|
954
|
-
}
|
|
955
|
-
function W(t) {
|
|
956
|
-
return t.sort((e, n) => {
|
|
957
|
-
const s = v(e, "priority") || 100, r = v(n, "priority") || 100;
|
|
958
|
-
return s > r ? -1 : s < r ? 1 : 0;
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
function kt(t) {
|
|
962
|
-
const e = W(vt(t)), n = Yn(e.map((s) => s.name));
|
|
963
|
-
return n.length && console.warn(
|
|
964
|
-
`[tiptap warn]: Duplicate extension names found: [${n.map((s) => `'${s}'`).join(", ")}]. This can lead to issues.`
|
|
965
|
-
), e;
|
|
966
|
-
}
|
|
967
|
-
function ir(t, e) {
|
|
968
|
-
const n = kt(t);
|
|
969
|
-
return Jt(n, e);
|
|
970
|
-
}
|
|
971
|
-
function Yt(t, e, n) {
|
|
972
|
-
const { from: s, to: r } = e, { blockSeparator: o = `
|
|
973
|
-
|
|
974
|
-
`, textSerializers: c = {} } = n || {};
|
|
975
|
-
let i = "";
|
|
976
|
-
return t.nodesBetween(s, r, (a, l, d, p) => {
|
|
977
|
-
var u;
|
|
978
|
-
a.isBlock && l > s && (i += o);
|
|
979
|
-
const h = c?.[a.type.name];
|
|
980
|
-
if (h)
|
|
981
|
-
return d && (i += h({
|
|
982
|
-
node: a,
|
|
983
|
-
pos: l,
|
|
984
|
-
parent: d,
|
|
985
|
-
index: p,
|
|
986
|
-
range: e
|
|
987
|
-
})), !1;
|
|
988
|
-
a.isText && (i += (u = a?.text) == null ? void 0 : u.slice(Math.max(s, l) - l, r - l));
|
|
989
|
-
}), i;
|
|
990
|
-
}
|
|
991
|
-
function Xn(t, e) {
|
|
992
|
-
const n = {
|
|
993
|
-
from: 0,
|
|
994
|
-
to: t.content.size
|
|
995
|
-
};
|
|
996
|
-
return Yt(t, n, e);
|
|
997
|
-
}
|
|
998
|
-
function Xt(t) {
|
|
999
|
-
return Object.fromEntries(
|
|
1000
|
-
Object.entries(t.nodes).filter(([, e]) => e.spec.toText).map(([e, n]) => [e, n.spec.toText])
|
|
1001
|
-
);
|
|
1002
|
-
}
|
|
1003
|
-
function Zn(t, e) {
|
|
1004
|
-
const n = T(e, t.schema), { from: s, to: r } = t.selection, o = [];
|
|
1005
|
-
t.doc.nodesBetween(s, r, (i) => {
|
|
1006
|
-
o.push(i);
|
|
1007
|
-
});
|
|
1008
|
-
const c = o.reverse().find((i) => i.type.name === n.name);
|
|
1009
|
-
return c ? { ...c.attrs } : {};
|
|
1010
|
-
}
|
|
1011
|
-
function Qn(t, e) {
|
|
1012
|
-
const n = rt(
|
|
1013
|
-
typeof e == "string" ? e : e.name,
|
|
1014
|
-
t.schema
|
|
1015
|
-
);
|
|
1016
|
-
return n === "node" ? Zn(t, e) : n === "mark" ? Kt(t, e) : {};
|
|
1017
|
-
}
|
|
1018
|
-
function Gn(t, e = JSON.stringify) {
|
|
1019
|
-
const n = {};
|
|
1020
|
-
return t.filter((s) => {
|
|
1021
|
-
const r = e(s);
|
|
1022
|
-
return Object.prototype.hasOwnProperty.call(n, r) ? !1 : n[r] = !0;
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
function ts(t) {
|
|
1026
|
-
const e = Gn(t);
|
|
1027
|
-
return e.length === 1 ? e : e.filter((n, s) => !e.filter((r, o) => o !== s).some((r) => n.oldRange.from >= r.oldRange.from && n.oldRange.to <= r.oldRange.to && n.newRange.from >= r.newRange.from && n.newRange.to <= r.newRange.to));
|
|
1028
|
-
}
|
|
1029
|
-
function es(t) {
|
|
1030
|
-
const { mapping: e, steps: n } = t, s = [];
|
|
1031
|
-
return e.maps.forEach((r, o) => {
|
|
1032
|
-
const c = [];
|
|
1033
|
-
if (r.ranges.length)
|
|
1034
|
-
r.forEach((i, a) => {
|
|
1035
|
-
c.push({ from: i, to: a });
|
|
1036
|
-
});
|
|
1037
|
-
else {
|
|
1038
|
-
const { from: i, to: a } = n[o];
|
|
1039
|
-
if (i === void 0 || a === void 0)
|
|
1040
|
-
return;
|
|
1041
|
-
c.push({ from: i, to: a });
|
|
1042
|
-
}
|
|
1043
|
-
c.forEach(({ from: i, to: a }) => {
|
|
1044
|
-
const l = e.slice(o).map(i, -1), d = e.slice(o).map(a), p = e.invert().map(l, -1), u = e.invert().map(d);
|
|
1045
|
-
s.push({
|
|
1046
|
-
oldRange: {
|
|
1047
|
-
from: p,
|
|
1048
|
-
to: u
|
|
1049
|
-
},
|
|
1050
|
-
newRange: {
|
|
1051
|
-
from: l,
|
|
1052
|
-
to: d
|
|
1053
|
-
}
|
|
1054
|
-
});
|
|
1055
|
-
});
|
|
1056
|
-
}), ts(s);
|
|
1057
|
-
}
|
|
1058
|
-
function Zt(t, e, n) {
|
|
1059
|
-
const s = [];
|
|
1060
|
-
return t === e ? n.resolve(t).marks().forEach((r) => {
|
|
1061
|
-
const o = n.resolve(t), c = yt(o, r.type);
|
|
1062
|
-
c && s.push({
|
|
1063
|
-
mark: r,
|
|
1064
|
-
...c
|
|
1065
|
-
});
|
|
1066
|
-
}) : n.nodesBetween(t, e, (r, o) => {
|
|
1067
|
-
!r || r?.nodeSize === void 0 || s.push(
|
|
1068
|
-
...r.marks.map((c) => ({
|
|
1069
|
-
from: o,
|
|
1070
|
-
to: o + r.nodeSize,
|
|
1071
|
-
mark: c
|
|
1072
|
-
}))
|
|
1073
|
-
);
|
|
1074
|
-
}), s;
|
|
1075
|
-
}
|
|
1076
|
-
var ar = (t, e, n, s = 20) => {
|
|
1077
|
-
const r = t.doc.resolve(n);
|
|
1078
|
-
let o = s, c = null;
|
|
1079
|
-
for (; o > 0 && c === null; ) {
|
|
1080
|
-
const i = r.node(o);
|
|
1081
|
-
i?.type.name === e ? c = i : o -= 1;
|
|
1082
|
-
}
|
|
1083
|
-
return [c, o];
|
|
1084
|
-
};
|
|
1085
|
-
function L(t, e) {
|
|
1086
|
-
return e.nodes[t] || e.marks[t] || null;
|
|
1087
|
-
}
|
|
1088
|
-
function Z(t, e, n) {
|
|
1089
|
-
return Object.fromEntries(
|
|
1090
|
-
Object.entries(n).filter(([s]) => {
|
|
1091
|
-
const r = t.find((o) => o.type === e && o.name === s);
|
|
1092
|
-
return r ? r.attribute.keepOnSplit : !1;
|
|
1093
|
-
})
|
|
1094
|
-
);
|
|
1095
|
-
}
|
|
1096
|
-
var ns = (t, e = 500) => {
|
|
1097
|
-
let n = "";
|
|
1098
|
-
const s = t.parentOffset;
|
|
1099
|
-
return t.parent.nodesBetween(Math.max(0, s - e), s, (r, o, c, i) => {
|
|
1100
|
-
var a, l;
|
|
1101
|
-
const d = ((l = (a = r.type.spec).toText) == null ? void 0 : l.call(a, {
|
|
1102
|
-
node: r,
|
|
1103
|
-
pos: o,
|
|
1104
|
-
parent: c,
|
|
1105
|
-
index: i
|
|
1106
|
-
})) || r.textContent || "%leaf%";
|
|
1107
|
-
n += r.isAtom && !r.isText ? d : d.slice(0, Math.max(0, s - o));
|
|
1108
|
-
}), n;
|
|
1109
|
-
};
|
|
1110
|
-
function ht(t, e, n = {}) {
|
|
1111
|
-
const { empty: s, ranges: r } = t.selection, o = e ? z(e, t.schema) : null;
|
|
1112
|
-
if (s)
|
|
1113
|
-
return !!(t.storedMarks || t.selection.$from.marks()).filter((d) => o ? o.name === d.type.name : !0).find((d) => Q(d.attrs, n, { strict: !1 }));
|
|
1114
|
-
let c = 0;
|
|
1115
|
-
const i = [];
|
|
1116
|
-
if (r.forEach(({ $from: d, $to: p }) => {
|
|
1117
|
-
const u = d.pos, h = p.pos;
|
|
1118
|
-
t.doc.nodesBetween(u, h, (m, f) => {
|
|
1119
|
-
if (o && m.inlineContent && !m.type.allowsMarkType(o))
|
|
1120
|
-
return !1;
|
|
1121
|
-
if (!m.isText && !m.marks.length)
|
|
1122
|
-
return;
|
|
1123
|
-
const g = Math.max(u, f), y = Math.min(h, f + m.nodeSize), b = y - g;
|
|
1124
|
-
c += b, i.push(
|
|
1125
|
-
...m.marks.map((w) => ({
|
|
1126
|
-
mark: w,
|
|
1127
|
-
from: g,
|
|
1128
|
-
to: y
|
|
1129
|
-
}))
|
|
1130
|
-
);
|
|
1131
|
-
});
|
|
1132
|
-
}), c === 0)
|
|
1133
|
-
return !1;
|
|
1134
|
-
const a = i.filter((d) => o ? o.name === d.mark.type.name : !0).filter((d) => Q(d.mark.attrs, n, { strict: !1 })).reduce((d, p) => d + p.to - p.from, 0), l = i.filter((d) => o ? d.mark.type !== o && d.mark.type.excludes(o) : !0).reduce((d, p) => d + p.to - p.from, 0);
|
|
1135
|
-
return (a > 0 ? a + l : a) >= c;
|
|
1136
|
-
}
|
|
1137
|
-
function ss(t, e, n = {}) {
|
|
1138
|
-
if (!e)
|
|
1139
|
-
return F(t, null, n) || ht(t, null, n);
|
|
1140
|
-
const s = rt(e, t.schema);
|
|
1141
|
-
return s === "node" ? F(t, e, n) : s === "mark" ? ht(t, e, n) : !1;
|
|
1142
|
-
}
|
|
1143
|
-
var cr = (t, e) => {
|
|
1144
|
-
const { $from: n, $to: s, $anchor: r } = t.selection;
|
|
1145
|
-
if (e) {
|
|
1146
|
-
const o = ot((i) => i.type.name === e)(t.selection);
|
|
1147
|
-
if (!o)
|
|
1148
|
-
return !1;
|
|
1149
|
-
const c = t.doc.resolve(o.pos + 1);
|
|
1150
|
-
return r.pos + 1 === c.end();
|
|
1151
|
-
}
|
|
1152
|
-
return !(s.parentOffset < s.parent.nodeSize - 2 || n.pos !== s.pos);
|
|
1153
|
-
}, lr = (t) => {
|
|
1154
|
-
const { $from: e, $to: n } = t.selection;
|
|
1155
|
-
return !(e.parentOffset > 0 || e.pos !== n.pos);
|
|
1156
|
-
};
|
|
1157
|
-
function Nt(t, e) {
|
|
1158
|
-
return Array.isArray(e) ? e.some((n) => (typeof n == "string" ? n : n.name) === t.name) : e;
|
|
1159
|
-
}
|
|
1160
|
-
function It(t, e) {
|
|
1161
|
-
const { nodeExtensions: n } = H(e), s = n.find((c) => c.name === t);
|
|
1162
|
-
if (!s)
|
|
1163
|
-
return !1;
|
|
1164
|
-
const r = {
|
|
1165
|
-
name: s.name,
|
|
1166
|
-
options: s.options,
|
|
1167
|
-
storage: s.storage
|
|
1168
|
-
}, o = M(v(s, "group", r));
|
|
1169
|
-
return typeof o != "string" ? !1 : o.split(" ").includes("list");
|
|
1170
|
-
}
|
|
1171
|
-
function wt(t, {
|
|
1172
|
-
checkChildren: e = !0,
|
|
1173
|
-
ignoreWhitespace: n = !1
|
|
1174
|
-
} = {}) {
|
|
1175
|
-
var s;
|
|
1176
|
-
if (n) {
|
|
1177
|
-
if (t.type.name === "hardBreak")
|
|
1178
|
-
return !0;
|
|
1179
|
-
if (t.isText)
|
|
1180
|
-
return !/\S/.test((s = t.text) != null ? s : "");
|
|
1181
|
-
}
|
|
1182
|
-
if (t.isText)
|
|
1183
|
-
return !t.text;
|
|
1184
|
-
if (t.isAtom || t.isLeaf)
|
|
1185
|
-
return !1;
|
|
1186
|
-
if (t.content.childCount === 0)
|
|
1187
|
-
return !0;
|
|
1188
|
-
if (e) {
|
|
1189
|
-
let r = !0;
|
|
1190
|
-
return t.content.forEach((o) => {
|
|
1191
|
-
r !== !1 && (wt(o, { ignoreWhitespace: n, checkChildren: e }) || (r = !1));
|
|
1192
|
-
}), r;
|
|
1193
|
-
}
|
|
1194
|
-
return !1;
|
|
1195
|
-
}
|
|
1196
|
-
function dr(t) {
|
|
1197
|
-
return t instanceof et;
|
|
1198
|
-
}
|
|
1199
|
-
var Qt = class Gt {
|
|
1200
|
-
constructor(e) {
|
|
1201
|
-
this.position = e;
|
|
1202
|
-
}
|
|
1203
|
-
/**
|
|
1204
|
-
* Creates a MappablePosition from a JSON object.
|
|
1205
|
-
*/
|
|
1206
|
-
static fromJSON(e) {
|
|
1207
|
-
return new Gt(e.position);
|
|
1208
|
-
}
|
|
1209
|
-
/**
|
|
1210
|
-
* Converts the MappablePosition to a JSON object.
|
|
1211
|
-
*/
|
|
1212
|
-
toJSON() {
|
|
1213
|
-
return {
|
|
1214
|
-
position: this.position
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
function rs(t, e) {
|
|
1219
|
-
const n = e.mapping.mapResult(t.position);
|
|
1220
|
-
return {
|
|
1221
|
-
position: new Qt(n.pos),
|
|
1222
|
-
mapResult: n
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
function os(t) {
|
|
1226
|
-
return new Qt(t);
|
|
1227
|
-
}
|
|
1228
|
-
function is(t, e, n) {
|
|
1229
|
-
var s;
|
|
1230
|
-
const { selection: r } = e;
|
|
1231
|
-
let o = null;
|
|
1232
|
-
if (Vt(r) && (o = r.$cursor), o) {
|
|
1233
|
-
const i = (s = t.storedMarks) != null ? s : o.marks();
|
|
1234
|
-
return o.parent.type.allowsMarkType(n) && (!!n.isInSet(i) || !i.some((a) => a.type.excludes(n)));
|
|
1235
|
-
}
|
|
1236
|
-
const { ranges: c } = r;
|
|
1237
|
-
return c.some(({ $from: i, $to: a }) => {
|
|
1238
|
-
let l = i.depth === 0 ? t.doc.inlineContent && t.doc.type.allowsMarkType(n) : !1;
|
|
1239
|
-
return t.doc.nodesBetween(i.pos, a.pos, (d, p, u) => {
|
|
1240
|
-
if (l)
|
|
1241
|
-
return !1;
|
|
1242
|
-
if (d.isInline) {
|
|
1243
|
-
const h = !u || u.type.allowsMarkType(n), m = !!n.isInSet(d.marks) || !d.marks.some((f) => f.type.excludes(n));
|
|
1244
|
-
l = h && m;
|
|
1245
|
-
}
|
|
1246
|
-
return !l;
|
|
1247
|
-
}), l;
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
var as = (t, e = {}) => ({ tr: n, state: s, dispatch: r }) => {
|
|
1251
|
-
const { selection: o } = n, { empty: c, ranges: i } = o, a = z(t, s.schema);
|
|
1252
|
-
if (r)
|
|
1253
|
-
if (c) {
|
|
1254
|
-
const l = Kt(s, a);
|
|
1255
|
-
n.addStoredMark(
|
|
1256
|
-
a.create({
|
|
1257
|
-
...l,
|
|
1258
|
-
...e
|
|
1259
|
-
})
|
|
1260
|
-
);
|
|
1261
|
-
} else
|
|
1262
|
-
i.forEach((l) => {
|
|
1263
|
-
const d = l.$from.pos, p = l.$to.pos;
|
|
1264
|
-
s.doc.nodesBetween(d, p, (u, h) => {
|
|
1265
|
-
const m = Math.max(h, d), f = Math.min(h + u.nodeSize, p);
|
|
1266
|
-
u.marks.find((g) => g.type === a) ? u.marks.forEach((g) => {
|
|
1267
|
-
a === g.type && n.addMark(
|
|
1268
|
-
m,
|
|
1269
|
-
f,
|
|
1270
|
-
a.create({
|
|
1271
|
-
...g.attrs,
|
|
1272
|
-
...e
|
|
1273
|
-
})
|
|
1274
|
-
);
|
|
1275
|
-
}) : n.addMark(m, f, a.create(e));
|
|
1276
|
-
});
|
|
1277
|
-
});
|
|
1278
|
-
return is(s, n, a);
|
|
1279
|
-
}, cs = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), ls = (t, e = {}) => ({ state: n, dispatch: s, chain: r }) => {
|
|
1280
|
-
const o = T(t, n.schema);
|
|
1281
|
-
let c;
|
|
1282
|
-
return n.selection.$anchor.sameParent(n.selection.$head) && (c = n.selection.$anchor.parent.attrs), o.isTextblock ? r().command(({ commands: i }) => Tt(o, { ...c, ...e })(n) ? !0 : i.clearNodes()).command(({ state: i }) => Tt(o, { ...c, ...e })(i, s)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
1283
|
-
}, ds = (t) => ({ tr: e, dispatch: n }) => {
|
|
1284
|
-
if (n) {
|
|
1285
|
-
const { doc: s } = e, r = D(t, 0, s.content.size), o = et.create(s, r);
|
|
1286
|
-
e.setSelection(o);
|
|
1287
|
-
}
|
|
1288
|
-
return !0;
|
|
1289
|
-
}, us = (t, e) => ({ tr: n, state: s, dispatch: r }) => {
|
|
1290
|
-
const { selection: o } = s;
|
|
1291
|
-
let c, i;
|
|
1292
|
-
return typeof e == "number" ? (c = e, i = e) : e && "from" in e && "to" in e ? (c = e.from, i = e.to) : (c = o.from, i = o.to), r && n.doc.nodesBetween(c, i, (a, l) => {
|
|
1293
|
-
a.isText || n.setNodeMarkup(l, void 0, {
|
|
1294
|
-
...a.attrs,
|
|
1295
|
-
dir: t
|
|
1296
|
-
});
|
|
1297
|
-
}), !0;
|
|
1298
|
-
}, ps = (t) => ({ tr: e, dispatch: n }) => {
|
|
1299
|
-
if (n) {
|
|
1300
|
-
const { doc: s } = e, { from: r, to: o } = typeof t == "number" ? { from: t, to: t } : t, c = C.atStart(s).from, i = C.atEnd(s).to, a = D(r, c, i), l = D(o, c, i), d = C.create(s, a, l);
|
|
1301
|
-
e.setSelection(d);
|
|
1302
|
-
}
|
|
1303
|
-
return !0;
|
|
1304
|
-
}, hs = (t) => ({ state: e, dispatch: n }) => {
|
|
1305
|
-
const s = T(t, e.schema);
|
|
1306
|
-
return _e(s)(e, n);
|
|
1307
|
-
};
|
|
1308
|
-
function jt(t, e) {
|
|
1309
|
-
const n = t.storedMarks || t.selection.$to.parentOffset && t.selection.$from.marks();
|
|
1310
|
-
if (n) {
|
|
1311
|
-
const s = n.filter((r) => e?.includes(r.type.name));
|
|
1312
|
-
t.tr.ensureMarks(s);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
var ms = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: s, editor: r }) => {
|
|
1316
|
-
const { selection: o, doc: c } = e, { $from: i, $to: a } = o, l = r.extensionManager.attributes, d = Z(l, i.node().type.name, i.node().attrs);
|
|
1317
|
-
if (o instanceof et && o.node.isBlock)
|
|
1318
|
-
return !i.parentOffset || !X(c, i.pos) ? !1 : (s && (t && jt(n, r.extensionManager.splittableMarks), e.split(i.pos).scrollIntoView()), !0);
|
|
1319
|
-
if (!i.parent.isBlock)
|
|
1320
|
-
return !1;
|
|
1321
|
-
const p = a.parentOffset === a.parent.content.size, u = i.depth === 0 ? void 0 : Un(i.node(-1).contentMatchAt(i.indexAfter(-1)));
|
|
1322
|
-
let h = p && u ? [
|
|
1323
|
-
{
|
|
1324
|
-
type: u,
|
|
1325
|
-
attrs: d
|
|
1326
|
-
}
|
|
1327
|
-
] : void 0, m = X(e.doc, e.mapping.map(i.pos), 1, h);
|
|
1328
|
-
if (!h && !m && X(e.doc, e.mapping.map(i.pos), 1, u ? [{ type: u }] : void 0) && (m = !0, h = u ? [
|
|
1329
|
-
{
|
|
1330
|
-
type: u,
|
|
1331
|
-
attrs: d
|
|
1332
|
-
}
|
|
1333
|
-
] : void 0), s) {
|
|
1334
|
-
if (m && (o instanceof C && e.deleteSelection(), e.split(e.mapping.map(i.pos), 1, h), u && !p && !i.parentOffset && i.parent.type !== u)) {
|
|
1335
|
-
const f = e.mapping.map(i.before()), g = e.doc.resolve(f);
|
|
1336
|
-
i.node(-1).canReplaceWith(g.index(), g.index() + 1, u) && e.setNodeMarkup(e.mapping.map(i.before()), u);
|
|
1337
|
-
}
|
|
1338
|
-
t && jt(n, r.extensionManager.splittableMarks), e.scrollIntoView();
|
|
1339
|
-
}
|
|
1340
|
-
return m;
|
|
1341
|
-
}, fs = (t, e = {}) => ({ tr: n, state: s, dispatch: r, editor: o }) => {
|
|
1342
|
-
var c;
|
|
1343
|
-
const i = T(t, s.schema), { $from: a, $to: l } = s.selection, d = s.selection.node;
|
|
1344
|
-
if (d && d.isBlock || a.depth < 2 || !a.sameParent(l))
|
|
1345
|
-
return !1;
|
|
1346
|
-
const p = a.node(-1);
|
|
1347
|
-
if (p.type !== i)
|
|
1348
|
-
return !1;
|
|
1349
|
-
const u = o.extensionManager.attributes;
|
|
1350
|
-
if (a.parent.content.size === 0 && a.node(-1).childCount === a.indexAfter(-1)) {
|
|
1351
|
-
if (a.depth === 2 || a.node(-3).type !== i || a.index(-2) !== a.node(-2).childCount - 1)
|
|
1352
|
-
return !1;
|
|
1353
|
-
if (r) {
|
|
1354
|
-
let y = I.empty;
|
|
1355
|
-
const b = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
1356
|
-
for (let $ = a.depth - b; $ >= a.depth - 3; $ -= 1)
|
|
1357
|
-
y = I.from(a.node($).copy(y));
|
|
1358
|
-
const w = (
|
|
1359
|
-
// eslint-disable-next-line no-nested-ternary
|
|
1360
|
-
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
1361
|
-
), x = {
|
|
1362
|
-
...Z(u, a.node().type.name, a.node().attrs),
|
|
1363
|
-
...e
|
|
1364
|
-
}, k = ((c = i.contentMatch.defaultType) == null ? void 0 : c.createAndFill(x)) || void 0;
|
|
1365
|
-
y = y.append(I.from(i.createAndFill(null, k) || void 0));
|
|
1366
|
-
const S = a.before(a.depth - (b - 1));
|
|
1367
|
-
n.replace(S, a.after(-w), new Fe(y, 4 - b, 0));
|
|
1368
|
-
let E = -1;
|
|
1369
|
-
n.doc.nodesBetween(S, n.doc.content.size, ($, P) => {
|
|
1370
|
-
if (E > -1)
|
|
1371
|
-
return !1;
|
|
1372
|
-
$.isTextblock && $.content.size === 0 && (E = P + 1);
|
|
1373
|
-
}), E > -1 && n.setSelection(C.near(n.doc.resolve(E))), n.scrollIntoView();
|
|
1374
|
-
}
|
|
1375
|
-
return !0;
|
|
1376
|
-
}
|
|
1377
|
-
const h = l.pos === a.end() ? p.contentMatchAt(0).defaultType : null, m = {
|
|
1378
|
-
...Z(u, p.type.name, p.attrs),
|
|
1379
|
-
...e
|
|
1380
|
-
}, f = {
|
|
1381
|
-
...Z(u, a.node().type.name, a.node().attrs),
|
|
1382
|
-
...e
|
|
1383
|
-
};
|
|
1384
|
-
n.delete(a.pos, l.pos);
|
|
1385
|
-
const g = h ? [
|
|
1386
|
-
{ type: i, attrs: m },
|
|
1387
|
-
{ type: h, attrs: f }
|
|
1388
|
-
] : [{ type: i, attrs: m }];
|
|
1389
|
-
if (!X(n.doc, a.pos, 2))
|
|
1390
|
-
return !1;
|
|
1391
|
-
if (r) {
|
|
1392
|
-
const { selection: y, storedMarks: b } = s, { splittableMarks: w } = o.extensionManager, x = b || y.$to.parentOffset && y.$from.marks();
|
|
1393
|
-
if (n.split(a.pos, 2, g).scrollIntoView(), !x || !r)
|
|
1394
|
-
return !0;
|
|
1395
|
-
const k = x.filter((S) => w.includes(S.type.name));
|
|
1396
|
-
n.ensureMarks(k);
|
|
1397
|
-
}
|
|
1398
|
-
return !0;
|
|
1399
|
-
}, dt = (t, e) => {
|
|
1400
|
-
const n = ot((o) => o.type === e)(t.selection);
|
|
1401
|
-
if (!n)
|
|
1402
|
-
return !0;
|
|
1403
|
-
const s = t.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
|
|
1404
|
-
if (s === void 0)
|
|
1405
|
-
return !0;
|
|
1406
|
-
const r = t.doc.nodeAt(s);
|
|
1407
|
-
return n.node.type === r?.type && mt(t.doc, n.pos) && t.join(n.pos), !0;
|
|
1408
|
-
}, ut = (t, e) => {
|
|
1409
|
-
const n = ot((o) => o.type === e)(t.selection);
|
|
1410
|
-
if (!n)
|
|
1411
|
-
return !0;
|
|
1412
|
-
const s = t.doc.resolve(n.start).after(n.depth);
|
|
1413
|
-
if (s === void 0)
|
|
1414
|
-
return !0;
|
|
1415
|
-
const r = t.doc.nodeAt(s);
|
|
1416
|
-
return n.node.type === r?.type && mt(t.doc, s) && t.join(s), !0;
|
|
1417
|
-
}, gs = (t, e, n, s = {}) => ({ editor: r, tr: o, state: c, dispatch: i, chain: a, commands: l, can: d }) => {
|
|
1418
|
-
const { extensions: p, splittableMarks: u } = r.extensionManager, h = T(t, c.schema), m = T(e, c.schema), { selection: f, storedMarks: g } = c, { $from: y, $to: b } = f, w = y.blockRange(b), x = g || f.$to.parentOffset && f.$from.marks();
|
|
1419
|
-
if (!w)
|
|
1420
|
-
return !1;
|
|
1421
|
-
const k = ot((S) => It(S.type.name, p))(f);
|
|
1422
|
-
if (w.depth >= 1 && k && w.depth - k.depth <= 1) {
|
|
1423
|
-
if (k.node.type === h)
|
|
1424
|
-
return l.liftListItem(m);
|
|
1425
|
-
if (It(k.node.type.name, p) && h.validContent(k.node.content) && i)
|
|
1426
|
-
return a().command(() => (o.setNodeMarkup(k.pos, h), !0)).command(() => dt(o, h)).command(() => ut(o, h)).run();
|
|
1427
|
-
}
|
|
1428
|
-
return !n || !x || !i ? a().command(() => d().wrapInList(h, s) ? !0 : l.clearNodes()).wrapInList(h, s).command(() => dt(o, h)).command(() => ut(o, h)).run() : a().command(() => {
|
|
1429
|
-
const S = d().wrapInList(h, s), E = x.filter(($) => u.includes($.type.name));
|
|
1430
|
-
return o.ensureMarks(E), S ? !0 : l.clearNodes();
|
|
1431
|
-
}).wrapInList(h, s).command(() => dt(o, h)).command(() => ut(o, h)).run();
|
|
1432
|
-
}, ys = (t, e = {}, n = {}) => ({ state: s, commands: r }) => {
|
|
1433
|
-
const { extendEmptyMarkRange: o = !1 } = n, c = z(t, s.schema);
|
|
1434
|
-
return ht(s, c, e) ? r.unsetMark(c, { extendEmptyMarkRange: o }) : r.setMark(c, e);
|
|
1435
|
-
}, vs = (t, e, n = {}) => ({ state: s, commands: r }) => {
|
|
1436
|
-
const o = T(t, s.schema), c = T(e, s.schema), i = F(s, o, n);
|
|
1437
|
-
let a;
|
|
1438
|
-
return s.selection.$anchor.sameParent(s.selection.$head) && (a = s.selection.$anchor.parent.attrs), i ? r.setNode(c, a) : r.setNode(o, { ...a, ...n });
|
|
1439
|
-
}, bs = (t, e = {}) => ({ state: n, commands: s }) => {
|
|
1440
|
-
const r = T(t, n.schema);
|
|
1441
|
-
return F(n, r, e) ? s.lift(r) : s.wrapIn(r, e);
|
|
1442
|
-
}, ks = () => ({ state: t, dispatch: e }) => {
|
|
1443
|
-
const n = t.plugins;
|
|
1444
|
-
for (let s = 0; s < n.length; s += 1) {
|
|
1445
|
-
const r = n[s];
|
|
1446
|
-
let o;
|
|
1447
|
-
if (r.spec.isInputRules && (o = r.getState(t))) {
|
|
1448
|
-
if (e) {
|
|
1449
|
-
const c = t.tr, i = o.transform;
|
|
1450
|
-
for (let a = i.steps.length - 1; a >= 0; a -= 1)
|
|
1451
|
-
c.step(i.steps[a].invert(i.docs[a]));
|
|
1452
|
-
if (o.text) {
|
|
1453
|
-
const a = c.doc.resolve(o.from).marks();
|
|
1454
|
-
c.replaceWith(o.from, o.to, t.schema.text(o.text, a));
|
|
1455
|
-
} else
|
|
1456
|
-
c.delete(o.from, o.to);
|
|
1457
|
-
}
|
|
1458
|
-
return !0;
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
return !1;
|
|
1462
|
-
}, ws = () => ({ tr: t, dispatch: e }) => {
|
|
1463
|
-
const { selection: n } = t, { empty: s, ranges: r } = n;
|
|
1464
|
-
return s || e && r.forEach((o) => {
|
|
1465
|
-
t.removeMark(o.$from.pos, o.$to.pos);
|
|
1466
|
-
}), !0;
|
|
1467
|
-
}, xs = (t, e = {}) => ({ tr: n, state: s, dispatch: r }) => {
|
|
1468
|
-
var o;
|
|
1469
|
-
const { extendEmptyMarkRange: c = !1 } = e, { selection: i } = n, a = z(t, s.schema), { $from: l, empty: d, ranges: p } = i;
|
|
1470
|
-
if (!r)
|
|
1471
|
-
return !0;
|
|
1472
|
-
if (d && c) {
|
|
1473
|
-
let { from: u, to: h } = i;
|
|
1474
|
-
const m = (o = l.marks().find((g) => g.type === a)) == null ? void 0 : o.attrs, f = yt(l, a, m);
|
|
1475
|
-
f && (u = f.from, h = f.to), n.removeMark(u, h, a);
|
|
1476
|
-
} else
|
|
1477
|
-
p.forEach((u) => {
|
|
1478
|
-
n.removeMark(u.$from.pos, u.$to.pos, a);
|
|
1479
|
-
});
|
|
1480
|
-
return n.removeStoredMark(a), !0;
|
|
1481
|
-
}, Ms = (t) => ({ tr: e, state: n, dispatch: s }) => {
|
|
1482
|
-
const { selection: r } = n;
|
|
1483
|
-
let o, c;
|
|
1484
|
-
return typeof t == "number" ? (o = t, c = t) : t && "from" in t && "to" in t ? (o = t.from, c = t.to) : (o = r.from, c = r.to), s && e.doc.nodesBetween(o, c, (i, a) => {
|
|
1485
|
-
if (i.isText)
|
|
1486
|
-
return;
|
|
1487
|
-
const l = { ...i.attrs };
|
|
1488
|
-
delete l.dir, e.setNodeMarkup(a, void 0, l);
|
|
1489
|
-
}), !0;
|
|
1490
|
-
}, Ss = (t, e = {}) => ({ tr: n, state: s, dispatch: r }) => {
|
|
1491
|
-
let o = null, c = null;
|
|
1492
|
-
const i = rt(
|
|
1493
|
-
typeof t == "string" ? t : t.name,
|
|
1494
|
-
s.schema
|
|
1495
|
-
);
|
|
1496
|
-
if (!i)
|
|
1497
|
-
return !1;
|
|
1498
|
-
i === "node" && (o = T(t, s.schema)), i === "mark" && (c = z(t, s.schema));
|
|
1499
|
-
let a = !1;
|
|
1500
|
-
return n.selection.ranges.forEach((l) => {
|
|
1501
|
-
const d = l.$from.pos, p = l.$to.pos;
|
|
1502
|
-
let u, h, m, f;
|
|
1503
|
-
n.selection.empty ? s.doc.nodesBetween(d, p, (g, y) => {
|
|
1504
|
-
o && o === g.type && (a = !0, m = Math.max(y, d), f = Math.min(y + g.nodeSize, p), u = y, h = g);
|
|
1505
|
-
}) : s.doc.nodesBetween(d, p, (g, y) => {
|
|
1506
|
-
y < d && o && o === g.type && (a = !0, m = Math.max(y, d), f = Math.min(y + g.nodeSize, p), u = y, h = g), y >= d && y <= p && (o && o === g.type && (a = !0, r && n.setNodeMarkup(y, void 0, {
|
|
1507
|
-
...g.attrs,
|
|
1508
|
-
...e
|
|
1509
|
-
})), c && g.marks.length && g.marks.forEach((b) => {
|
|
1510
|
-
if (c === b.type && (a = !0, r)) {
|
|
1511
|
-
const w = Math.max(y, d), x = Math.min(y + g.nodeSize, p);
|
|
1512
|
-
n.addMark(
|
|
1513
|
-
w,
|
|
1514
|
-
x,
|
|
1515
|
-
c.create({
|
|
1516
|
-
...b.attrs,
|
|
1517
|
-
...e
|
|
1518
|
-
})
|
|
1519
|
-
);
|
|
1520
|
-
}
|
|
1521
|
-
}));
|
|
1522
|
-
}), h && (u !== void 0 && r && n.setNodeMarkup(u, void 0, {
|
|
1523
|
-
...h.attrs,
|
|
1524
|
-
...e
|
|
1525
|
-
}), c && h.marks.length && h.marks.forEach((g) => {
|
|
1526
|
-
c === g.type && r && n.addMark(
|
|
1527
|
-
m,
|
|
1528
|
-
f,
|
|
1529
|
-
c.create({
|
|
1530
|
-
...g.attrs,
|
|
1531
|
-
...e
|
|
1532
|
-
})
|
|
1533
|
-
);
|
|
1534
|
-
}));
|
|
1535
|
-
}), a;
|
|
1536
|
-
}, Es = (t, e = {}) => ({ state: n, dispatch: s }) => {
|
|
1537
|
-
const r = T(t, n.schema);
|
|
1538
|
-
return He(r, e)(n, s);
|
|
1539
|
-
}, Ts = (t, e = {}) => ({ state: n, dispatch: s }) => {
|
|
1540
|
-
const r = T(t, n.schema);
|
|
1541
|
-
return qe(r, e)(n, s);
|
|
1542
|
-
}, $s = class {
|
|
1543
|
-
constructor() {
|
|
1544
|
-
this.callbacks = {};
|
|
1545
|
-
}
|
|
1546
|
-
on(t, e) {
|
|
1547
|
-
return this.callbacks[t] || (this.callbacks[t] = []), this.callbacks[t].push(e), this;
|
|
1548
|
-
}
|
|
1549
|
-
emit(t, ...e) {
|
|
1550
|
-
const n = this.callbacks[t];
|
|
1551
|
-
return n && n.forEach((s) => s.apply(this, e)), this;
|
|
1552
|
-
}
|
|
1553
|
-
off(t, e) {
|
|
1554
|
-
const n = this.callbacks[t];
|
|
1555
|
-
return n && (e ? this.callbacks[t] = n.filter((s) => s !== e) : delete this.callbacks[t]), this;
|
|
1556
|
-
}
|
|
1557
|
-
once(t, e) {
|
|
1558
|
-
const n = (...s) => {
|
|
1559
|
-
this.off(t, n), e.apply(this, s);
|
|
1560
|
-
};
|
|
1561
|
-
return this.on(t, n);
|
|
1562
|
-
}
|
|
1563
|
-
removeAllListeners() {
|
|
1564
|
-
this.callbacks = {};
|
|
1565
|
-
}
|
|
1566
|
-
}, it = class {
|
|
1567
|
-
constructor(t) {
|
|
1568
|
-
var e;
|
|
1569
|
-
this.find = t.find, this.handler = t.handler, this.undoable = (e = t.undoable) != null ? e : !0;
|
|
1570
|
-
}
|
|
1571
|
-
}, Cs = (t, e) => {
|
|
1572
|
-
if (gt(e))
|
|
1573
|
-
return e.exec(t);
|
|
1574
|
-
const n = e(t);
|
|
1575
|
-
if (!n)
|
|
1576
|
-
return null;
|
|
1577
|
-
const s = [n.text];
|
|
1578
|
-
return s.index = n.index, s.input = t, s.data = n.data, n.replaceWith && (n.text.includes(n.replaceWith) || console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'), s.push(n.replaceWith)), s;
|
|
1579
|
-
};
|
|
1580
|
-
function q(t) {
|
|
1581
|
-
var e;
|
|
1582
|
-
const { editor: n, from: s, to: r, text: o, rules: c, plugin: i } = t, { view: a } = n;
|
|
1583
|
-
if (a.composing)
|
|
1584
|
-
return !1;
|
|
1585
|
-
const l = a.state.doc.resolve(s);
|
|
1586
|
-
if (
|
|
1587
|
-
// check for code node
|
|
1588
|
-
l.parent.type.spec.code || (e = l.nodeBefore || l.nodeAfter) != null && e.marks.find((u) => u.type.spec.code)
|
|
1589
|
-
)
|
|
1590
|
-
return !1;
|
|
1591
|
-
let d = !1;
|
|
1592
|
-
const p = ns(l) + o;
|
|
1593
|
-
return c.forEach((u) => {
|
|
1594
|
-
if (d)
|
|
1595
|
-
return;
|
|
1596
|
-
const h = Cs(p, u.find);
|
|
1597
|
-
if (!h)
|
|
1598
|
-
return;
|
|
1599
|
-
const m = a.state.tr, f = nt({
|
|
1600
|
-
state: a.state,
|
|
1601
|
-
transaction: m
|
|
1602
|
-
}), g = {
|
|
1603
|
-
from: s - (h[0].length - o.length),
|
|
1604
|
-
to: r
|
|
1605
|
-
}, { commands: y, chain: b, can: w } = new st({
|
|
1606
|
-
editor: n,
|
|
1607
|
-
state: f
|
|
1608
|
-
});
|
|
1609
|
-
u.handler({
|
|
1610
|
-
state: f,
|
|
1611
|
-
range: g,
|
|
1612
|
-
match: h,
|
|
1613
|
-
commands: y,
|
|
1614
|
-
chain: b,
|
|
1615
|
-
can: w
|
|
1616
|
-
}) === null || !m.steps.length || (u.undoable && m.setMeta(i, {
|
|
1617
|
-
transform: m,
|
|
1618
|
-
from: s,
|
|
1619
|
-
to: r,
|
|
1620
|
-
text: o
|
|
1621
|
-
}), a.dispatch(m), d = !0);
|
|
1622
|
-
}), d;
|
|
1623
|
-
}
|
|
1624
|
-
function As(t) {
|
|
1625
|
-
const { editor: e, rules: n } = t, s = new A({
|
|
1626
|
-
state: {
|
|
1627
|
-
init() {
|
|
1628
|
-
return null;
|
|
1629
|
-
},
|
|
1630
|
-
apply(r, o, c) {
|
|
1631
|
-
const i = r.getMeta(s);
|
|
1632
|
-
if (i)
|
|
1633
|
-
return i;
|
|
1634
|
-
const a = r.getMeta("applyInputRules");
|
|
1635
|
-
return a && setTimeout(() => {
|
|
1636
|
-
let { text: l } = a;
|
|
1637
|
-
typeof l == "string" ? l = l : l = bt(I.from(l), c.schema);
|
|
1638
|
-
const { from: d } = a, p = d + l.length;
|
|
1639
|
-
q({
|
|
1640
|
-
editor: e,
|
|
1641
|
-
from: d,
|
|
1642
|
-
to: p,
|
|
1643
|
-
text: l,
|
|
1644
|
-
rules: n,
|
|
1645
|
-
plugin: s
|
|
1646
|
-
});
|
|
1647
|
-
}), r.selectionSet || r.docChanged ? null : o;
|
|
1648
|
-
}
|
|
1649
|
-
},
|
|
1650
|
-
props: {
|
|
1651
|
-
handleTextInput(r, o, c, i) {
|
|
1652
|
-
return q({
|
|
1653
|
-
editor: e,
|
|
1654
|
-
from: o,
|
|
1655
|
-
to: c,
|
|
1656
|
-
text: i,
|
|
1657
|
-
rules: n,
|
|
1658
|
-
plugin: s
|
|
1659
|
-
});
|
|
1660
|
-
},
|
|
1661
|
-
handleDOMEvents: {
|
|
1662
|
-
compositionend: (r) => (setTimeout(() => {
|
|
1663
|
-
const { $cursor: o } = r.state.selection;
|
|
1664
|
-
o && q({
|
|
1665
|
-
editor: e,
|
|
1666
|
-
from: o.pos,
|
|
1667
|
-
to: o.pos,
|
|
1668
|
-
text: "",
|
|
1669
|
-
rules: n,
|
|
1670
|
-
plugin: s
|
|
1671
|
-
});
|
|
1672
|
-
}), !1)
|
|
1673
|
-
},
|
|
1674
|
-
// add support for input rules to trigger on enter
|
|
1675
|
-
// this is useful for example for code blocks
|
|
1676
|
-
handleKeyDown(r, o) {
|
|
1677
|
-
if (o.key !== "Enter")
|
|
1678
|
-
return !1;
|
|
1679
|
-
const { $cursor: c } = r.state.selection;
|
|
1680
|
-
return c ? q({
|
|
1681
|
-
editor: e,
|
|
1682
|
-
from: c.pos,
|
|
1683
|
-
to: c.pos,
|
|
1684
|
-
text: `
|
|
1685
|
-
`,
|
|
1686
|
-
rules: n,
|
|
1687
|
-
plugin: s
|
|
1688
|
-
}) : !1;
|
|
1689
|
-
}
|
|
1690
|
-
},
|
|
1691
|
-
// @ts-ignore
|
|
1692
|
-
isInputRules: !0
|
|
1693
|
-
});
|
|
1694
|
-
return s;
|
|
1695
|
-
}
|
|
1696
|
-
function Os(t) {
|
|
1697
|
-
return Object.prototype.toString.call(t).slice(8, -1);
|
|
1698
|
-
}
|
|
1699
|
-
function J(t) {
|
|
1700
|
-
return Os(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
|
|
1701
|
-
}
|
|
1702
|
-
function te(t, e) {
|
|
1703
|
-
const n = { ...t };
|
|
1704
|
-
return J(t) && J(e) && Object.keys(e).forEach((s) => {
|
|
1705
|
-
J(e[s]) && J(t[s]) ? n[s] = te(t[s], e[s]) : n[s] = e[s];
|
|
1706
|
-
}), n;
|
|
1707
|
-
}
|
|
1708
|
-
var xt = class {
|
|
1709
|
-
constructor(t = {}) {
|
|
1710
|
-
this.type = "extendable", this.parent = null, this.child = null, this.name = "", this.config = {
|
|
1711
|
-
name: this.name
|
|
1712
|
-
}, this.config = {
|
|
1713
|
-
...this.config,
|
|
1714
|
-
...t
|
|
1715
|
-
}, this.name = this.config.name;
|
|
1716
|
-
}
|
|
1717
|
-
get options() {
|
|
1718
|
-
return {
|
|
1719
|
-
...M(
|
|
1720
|
-
v(this, "addOptions", {
|
|
1721
|
-
name: this.name
|
|
1722
|
-
})
|
|
1723
|
-
) || {}
|
|
1724
|
-
};
|
|
1725
|
-
}
|
|
1726
|
-
get storage() {
|
|
1727
|
-
return {
|
|
1728
|
-
...M(
|
|
1729
|
-
v(this, "addStorage", {
|
|
1730
|
-
name: this.name,
|
|
1731
|
-
options: this.options
|
|
1732
|
-
})
|
|
1733
|
-
) || {}
|
|
1734
|
-
};
|
|
1735
|
-
}
|
|
1736
|
-
configure(t = {}) {
|
|
1737
|
-
const e = this.extend({
|
|
1738
|
-
...this.config,
|
|
1739
|
-
addOptions: () => te(this.options, t)
|
|
1740
|
-
});
|
|
1741
|
-
return e.name = this.name, e.parent = this.parent, e;
|
|
1742
|
-
}
|
|
1743
|
-
extend(t = {}) {
|
|
1744
|
-
const e = new this.constructor({ ...this.config, ...t });
|
|
1745
|
-
return e.parent = this, this.child = e, e.name = "name" in t ? t.name : e.parent.name, e;
|
|
1746
|
-
}
|
|
1747
|
-
}, Ps = class ee extends xt {
|
|
1748
|
-
constructor() {
|
|
1749
|
-
super(...arguments), this.type = "mark";
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
1752
|
-
* Create a new Mark instance
|
|
1753
|
-
* @param config - Mark configuration object or a function that returns a configuration object
|
|
1754
|
-
*/
|
|
1755
|
-
static create(e = {}) {
|
|
1756
|
-
const n = typeof e == "function" ? e() : e;
|
|
1757
|
-
return new ee(n);
|
|
1758
|
-
}
|
|
1759
|
-
static handleExit({ editor: e, mark: n }) {
|
|
1760
|
-
const { tr: s } = e.state, r = e.state.selection.$from;
|
|
1761
|
-
if (r.pos === r.end()) {
|
|
1762
|
-
const o = r.marks();
|
|
1763
|
-
if (!o.find((i) => i?.type.name === n.name))
|
|
1764
|
-
return !1;
|
|
1765
|
-
const c = o.find((i) => i?.type.name === n.name);
|
|
1766
|
-
return c && s.removeStoredMark(c), s.insertText(" ", r.pos), e.view.dispatch(s), !0;
|
|
1767
|
-
}
|
|
1768
|
-
return !1;
|
|
1769
|
-
}
|
|
1770
|
-
configure(e) {
|
|
1771
|
-
return super.configure(e);
|
|
1772
|
-
}
|
|
1773
|
-
extend(e) {
|
|
1774
|
-
const n = typeof e == "function" ? e() : e;
|
|
1775
|
-
return super.extend(n);
|
|
1776
|
-
}
|
|
1777
|
-
};
|
|
1778
|
-
function Rs(t) {
|
|
1779
|
-
return typeof t == "number";
|
|
1780
|
-
}
|
|
1781
|
-
var zs = class {
|
|
1782
|
-
constructor(t) {
|
|
1783
|
-
this.find = t.find, this.handler = t.handler;
|
|
1784
|
-
}
|
|
1785
|
-
}, Ns = (t, e, n) => {
|
|
1786
|
-
if (gt(e))
|
|
1787
|
-
return [...t.matchAll(e)];
|
|
1788
|
-
const s = e(t, n);
|
|
1789
|
-
return s ? s.map((r) => {
|
|
1790
|
-
const o = [r.text];
|
|
1791
|
-
return o.index = r.index, o.input = t, o.data = r.data, r.replaceWith && (r.text.includes(r.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), o.push(r.replaceWith)), o;
|
|
1792
|
-
}) : [];
|
|
1793
|
-
};
|
|
1794
|
-
function Is(t) {
|
|
1795
|
-
const { editor: e, state: n, from: s, to: r, rule: o, pasteEvent: c, dropEvent: i } = t, { commands: a, chain: l, can: d } = new st({
|
|
1796
|
-
editor: e,
|
|
1797
|
-
state: n
|
|
1798
|
-
}), p = [];
|
|
1799
|
-
return n.doc.nodesBetween(s, r, (u, h) => {
|
|
1800
|
-
var m, f, g, y, b;
|
|
1801
|
-
if ((f = (m = u.type) == null ? void 0 : m.spec) != null && f.code || !(u.isText || u.isTextblock || u.isInline))
|
|
1802
|
-
return;
|
|
1803
|
-
const w = (b = (y = (g = u.content) == null ? void 0 : g.size) != null ? y : u.nodeSize) != null ? b : 0, x = Math.max(s, h), k = Math.min(r, h + w);
|
|
1804
|
-
if (x >= k)
|
|
1805
|
-
return;
|
|
1806
|
-
const S = u.isText ? u.text || "" : u.textBetween(x - h, k - h, void 0, "");
|
|
1807
|
-
Ns(S, o.find, c).forEach((E) => {
|
|
1808
|
-
if (E.index === void 0)
|
|
1809
|
-
return;
|
|
1810
|
-
const $ = x + E.index + 1, P = $ + E[0].length, K = {
|
|
1811
|
-
from: n.tr.mapping.map($),
|
|
1812
|
-
to: n.tr.mapping.map(P)
|
|
1813
|
-
}, ct = o.handler({
|
|
1814
|
-
state: n,
|
|
1815
|
-
range: K,
|
|
1816
|
-
match: E,
|
|
1817
|
-
commands: a,
|
|
1818
|
-
chain: l,
|
|
1819
|
-
can: d,
|
|
1820
|
-
pasteEvent: c,
|
|
1821
|
-
dropEvent: i
|
|
1822
|
-
});
|
|
1823
|
-
p.push(ct);
|
|
1824
|
-
});
|
|
1825
|
-
}), p.every((u) => u !== null);
|
|
1826
|
-
}
|
|
1827
|
-
var Y = null, js = (t) => {
|
|
1828
|
-
var e;
|
|
1829
|
-
const n = new ClipboardEvent("paste", {
|
|
1830
|
-
clipboardData: new DataTransfer()
|
|
1831
|
-
});
|
|
1832
|
-
return (e = n.clipboardData) == null || e.setData("text/html", t), n;
|
|
1833
|
-
};
|
|
1834
|
-
function Ds(t) {
|
|
1835
|
-
const { editor: e, rules: n } = t;
|
|
1836
|
-
let s = null, r = !1, o = !1, c = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, i;
|
|
1837
|
-
try {
|
|
1838
|
-
i = typeof DragEvent < "u" ? new DragEvent("drop") : null;
|
|
1839
|
-
} catch {
|
|
1840
|
-
i = null;
|
|
1841
|
-
}
|
|
1842
|
-
const a = ({
|
|
1843
|
-
state: l,
|
|
1844
|
-
from: d,
|
|
1845
|
-
to: p,
|
|
1846
|
-
rule: u,
|
|
1847
|
-
pasteEvt: h
|
|
1848
|
-
}) => {
|
|
1849
|
-
const m = l.tr, f = nt({
|
|
1850
|
-
state: l,
|
|
1851
|
-
transaction: m
|
|
1852
|
-
});
|
|
1853
|
-
if (!(!Is({
|
|
1854
|
-
editor: e,
|
|
1855
|
-
state: f,
|
|
1856
|
-
from: Math.max(d - 1, 0),
|
|
1857
|
-
to: p.b - 1,
|
|
1858
|
-
rule: u,
|
|
1859
|
-
pasteEvent: h,
|
|
1860
|
-
dropEvent: i
|
|
1861
|
-
}) || !m.steps.length)) {
|
|
1862
|
-
try {
|
|
1863
|
-
i = typeof DragEvent < "u" ? new DragEvent("drop") : null;
|
|
1864
|
-
} catch {
|
|
1865
|
-
i = null;
|
|
1866
|
-
}
|
|
1867
|
-
return c = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, m;
|
|
1868
|
-
}
|
|
1869
|
-
};
|
|
1870
|
-
return n.map((l) => new A({
|
|
1871
|
-
// we register a global drag handler to track the current drag source element
|
|
1872
|
-
view(d) {
|
|
1873
|
-
const p = (h) => {
|
|
1874
|
-
var m;
|
|
1875
|
-
s = (m = d.dom.parentElement) != null && m.contains(h.target) ? d.dom.parentElement : null, s && (Y = e);
|
|
1876
|
-
}, u = () => {
|
|
1877
|
-
Y && (Y = null);
|
|
1878
|
-
};
|
|
1879
|
-
return window.addEventListener("dragstart", p), window.addEventListener("dragend", u), {
|
|
1880
|
-
destroy() {
|
|
1881
|
-
window.removeEventListener("dragstart", p), window.removeEventListener("dragend", u);
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
|
-
},
|
|
1885
|
-
props: {
|
|
1886
|
-
handleDOMEvents: {
|
|
1887
|
-
drop: (d, p) => {
|
|
1888
|
-
if (o = s === d.dom.parentElement, i = p, !o) {
|
|
1889
|
-
const u = Y;
|
|
1890
|
-
u?.isEditable && setTimeout(() => {
|
|
1891
|
-
const h = u.state.selection;
|
|
1892
|
-
h && u.commands.deleteRange({ from: h.from, to: h.to });
|
|
1893
|
-
}, 10);
|
|
1894
|
-
}
|
|
1895
|
-
return !1;
|
|
1896
|
-
},
|
|
1897
|
-
paste: (d, p) => {
|
|
1898
|
-
var u;
|
|
1899
|
-
const h = (u = p.clipboardData) == null ? void 0 : u.getData("text/html");
|
|
1900
|
-
return c = p, r = !!h?.includes("data-pm-slice"), !1;
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
},
|
|
1904
|
-
appendTransaction: (d, p, u) => {
|
|
1905
|
-
const h = d[0], m = h.getMeta("uiEvent") === "paste" && !r, f = h.getMeta("uiEvent") === "drop" && !o, g = h.getMeta("applyPasteRules"), y = !!g;
|
|
1906
|
-
if (!m && !f && !y)
|
|
1907
|
-
return;
|
|
1908
|
-
if (y) {
|
|
1909
|
-
let { text: x } = g;
|
|
1910
|
-
typeof x == "string" ? x = x : x = bt(I.from(x), u.schema);
|
|
1911
|
-
const { from: k } = g, S = k + x.length, E = js(x);
|
|
1912
|
-
return a({
|
|
1913
|
-
rule: l,
|
|
1914
|
-
state: u,
|
|
1915
|
-
from: k,
|
|
1916
|
-
to: { b: S },
|
|
1917
|
-
pasteEvt: E
|
|
1918
|
-
});
|
|
1919
|
-
}
|
|
1920
|
-
const b = p.doc.content.findDiffStart(u.doc.content), w = p.doc.content.findDiffEnd(u.doc.content);
|
|
1921
|
-
if (!(!Rs(b) || !w || b === w.b))
|
|
1922
|
-
return a({
|
|
1923
|
-
rule: l,
|
|
1924
|
-
state: u,
|
|
1925
|
-
from: b,
|
|
1926
|
-
to: w,
|
|
1927
|
-
pasteEvt: c
|
|
1928
|
-
});
|
|
1929
|
-
}
|
|
1930
|
-
}));
|
|
1931
|
-
}
|
|
1932
|
-
var at = class {
|
|
1933
|
-
constructor(t, e) {
|
|
1934
|
-
this.splittableMarks = [], this.editor = e, this.baseExtensions = t, this.extensions = kt(t), this.schema = Jt(this.extensions, e), this.setupExtensions();
|
|
1935
|
-
}
|
|
1936
|
-
/**
|
|
1937
|
-
* Get all commands from the extensions.
|
|
1938
|
-
* @returns An object with all commands where the key is the command name and the value is the command function
|
|
1939
|
-
*/
|
|
1940
|
-
get commands() {
|
|
1941
|
-
return this.extensions.reduce((t, e) => {
|
|
1942
|
-
const n = {
|
|
1943
|
-
name: e.name,
|
|
1944
|
-
options: e.options,
|
|
1945
|
-
storage: this.editor.extensionStorage[e.name],
|
|
1946
|
-
editor: this.editor,
|
|
1947
|
-
type: L(e.name, this.schema)
|
|
1948
|
-
}, s = v(e, "addCommands", n);
|
|
1949
|
-
return s ? {
|
|
1950
|
-
...t,
|
|
1951
|
-
...s()
|
|
1952
|
-
} : t;
|
|
1953
|
-
}, {});
|
|
1954
|
-
}
|
|
1955
|
-
/**
|
|
1956
|
-
* Get all registered Prosemirror plugins from the extensions.
|
|
1957
|
-
* @returns An array of Prosemirror plugins
|
|
1958
|
-
*/
|
|
1959
|
-
get plugins() {
|
|
1960
|
-
const { editor: t } = this;
|
|
1961
|
-
return W([...this.extensions].reverse()).flatMap((e) => {
|
|
1962
|
-
const n = {
|
|
1963
|
-
name: e.name,
|
|
1964
|
-
options: e.options,
|
|
1965
|
-
storage: this.editor.extensionStorage[e.name],
|
|
1966
|
-
editor: t,
|
|
1967
|
-
type: L(e.name, this.schema)
|
|
1968
|
-
}, s = [], r = v(
|
|
1969
|
-
e,
|
|
1970
|
-
"addKeyboardShortcuts",
|
|
1971
|
-
n
|
|
1972
|
-
);
|
|
1973
|
-
let o = {};
|
|
1974
|
-
if (e.type === "mark" && v(e, "exitable", n) && (o.ArrowRight = () => Ps.handleExit({ editor: t, mark: e })), r) {
|
|
1975
|
-
const d = Object.fromEntries(
|
|
1976
|
-
Object.entries(r()).map(([p, u]) => [p, () => u({ editor: t })])
|
|
1977
|
-
);
|
|
1978
|
-
o = { ...o, ...d };
|
|
1979
|
-
}
|
|
1980
|
-
const c = Ye(o);
|
|
1981
|
-
s.push(c);
|
|
1982
|
-
const i = v(e, "addInputRules", n);
|
|
1983
|
-
if (Nt(e, t.options.enableInputRules) && i) {
|
|
1984
|
-
const d = i();
|
|
1985
|
-
if (d && d.length) {
|
|
1986
|
-
const p = As({
|
|
1987
|
-
editor: t,
|
|
1988
|
-
rules: d
|
|
1989
|
-
}), u = Array.isArray(p) ? p : [p];
|
|
1990
|
-
s.push(...u);
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
const a = v(e, "addPasteRules", n);
|
|
1994
|
-
if (Nt(e, t.options.enablePasteRules) && a) {
|
|
1995
|
-
const d = a();
|
|
1996
|
-
if (d && d.length) {
|
|
1997
|
-
const p = Ds({ editor: t, rules: d });
|
|
1998
|
-
s.push(...p);
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
const l = v(
|
|
2002
|
-
e,
|
|
2003
|
-
"addProseMirrorPlugins",
|
|
2004
|
-
n
|
|
2005
|
-
);
|
|
2006
|
-
if (l) {
|
|
2007
|
-
const d = l();
|
|
2008
|
-
s.push(...d);
|
|
2009
|
-
}
|
|
2010
|
-
return s;
|
|
2011
|
-
});
|
|
2012
|
-
}
|
|
2013
|
-
/**
|
|
2014
|
-
* Get all attributes from the extensions.
|
|
2015
|
-
* @returns An array of attributes
|
|
2016
|
-
*/
|
|
2017
|
-
get attributes() {
|
|
2018
|
-
return qt(this.extensions);
|
|
2019
|
-
}
|
|
2020
|
-
/**
|
|
2021
|
-
* Get all node views from the extensions.
|
|
2022
|
-
* @returns An object with all node views where the key is the node name and the value is the node view function
|
|
2023
|
-
*/
|
|
2024
|
-
get nodeViews() {
|
|
2025
|
-
const { editor: t } = this, { nodeExtensions: e } = H(this.extensions);
|
|
2026
|
-
return Object.fromEntries(
|
|
2027
|
-
e.filter((n) => !!v(n, "addNodeView")).map((n) => {
|
|
2028
|
-
const s = this.attributes.filter((a) => a.type === n.name), r = {
|
|
2029
|
-
name: n.name,
|
|
2030
|
-
options: n.options,
|
|
2031
|
-
storage: this.editor.extensionStorage[n.name],
|
|
2032
|
-
editor: t,
|
|
2033
|
-
type: T(n.name, this.schema)
|
|
2034
|
-
}, o = v(n, "addNodeView", r);
|
|
2035
|
-
if (!o)
|
|
2036
|
-
return [];
|
|
2037
|
-
const c = o();
|
|
2038
|
-
if (!c)
|
|
2039
|
-
return [];
|
|
2040
|
-
const i = (a, l, d, p, u) => {
|
|
2041
|
-
const h = tt(a, s);
|
|
2042
|
-
return c({
|
|
2043
|
-
// pass-through
|
|
2044
|
-
node: a,
|
|
2045
|
-
view: l,
|
|
2046
|
-
getPos: d,
|
|
2047
|
-
decorations: p,
|
|
2048
|
-
innerDecorations: u,
|
|
2049
|
-
// tiptap-specific
|
|
2050
|
-
editor: t,
|
|
2051
|
-
extension: n,
|
|
2052
|
-
HTMLAttributes: h
|
|
2053
|
-
});
|
|
2054
|
-
};
|
|
2055
|
-
return [n.name, i];
|
|
2056
|
-
})
|
|
2057
|
-
);
|
|
2058
|
-
}
|
|
2059
|
-
/**
|
|
2060
|
-
* Get the composed dispatchTransaction function from all extensions.
|
|
2061
|
-
* @param baseDispatch The base dispatch function (e.g. from the editor or user props)
|
|
2062
|
-
* @returns A composed dispatch function
|
|
2063
|
-
*/
|
|
2064
|
-
dispatchTransaction(t) {
|
|
2065
|
-
const { editor: e } = this;
|
|
2066
|
-
return W([...this.extensions].reverse()).reduceRight((n, s) => {
|
|
2067
|
-
const r = {
|
|
2068
|
-
name: s.name,
|
|
2069
|
-
options: s.options,
|
|
2070
|
-
storage: this.editor.extensionStorage[s.name],
|
|
2071
|
-
editor: e,
|
|
2072
|
-
type: L(s.name, this.schema)
|
|
2073
|
-
}, o = v(
|
|
2074
|
-
s,
|
|
2075
|
-
"dispatchTransaction",
|
|
2076
|
-
r
|
|
2077
|
-
);
|
|
2078
|
-
return o ? (c) => {
|
|
2079
|
-
o.call(r, { transaction: c, next: n });
|
|
2080
|
-
} : n;
|
|
2081
|
-
}, t);
|
|
2082
|
-
}
|
|
2083
|
-
/**
|
|
2084
|
-
* Get the composed transformPastedHTML function from all extensions.
|
|
2085
|
-
* @param baseTransform The base transform function (e.g. from the editor props)
|
|
2086
|
-
* @returns A composed transform function that chains all extension transforms
|
|
2087
|
-
*/
|
|
2088
|
-
transformPastedHTML(t) {
|
|
2089
|
-
const { editor: e } = this;
|
|
2090
|
-
return W([...this.extensions]).reduce(
|
|
2091
|
-
(n, s) => {
|
|
2092
|
-
const r = {
|
|
2093
|
-
name: s.name,
|
|
2094
|
-
options: s.options,
|
|
2095
|
-
storage: this.editor.extensionStorage[s.name],
|
|
2096
|
-
editor: e,
|
|
2097
|
-
type: L(s.name, this.schema)
|
|
2098
|
-
}, o = v(
|
|
2099
|
-
s,
|
|
2100
|
-
"transformPastedHTML",
|
|
2101
|
-
r
|
|
2102
|
-
);
|
|
2103
|
-
return o ? (c, i) => {
|
|
2104
|
-
const a = n(c, i);
|
|
2105
|
-
return o.call(r, a);
|
|
2106
|
-
} : n;
|
|
2107
|
-
},
|
|
2108
|
-
t || ((n) => n)
|
|
2109
|
-
);
|
|
2110
|
-
}
|
|
2111
|
-
get markViews() {
|
|
2112
|
-
const { editor: t } = this, { markExtensions: e } = H(this.extensions);
|
|
2113
|
-
return Object.fromEntries(
|
|
2114
|
-
e.filter((n) => !!v(n, "addMarkView")).map((n) => {
|
|
2115
|
-
const s = this.attributes.filter((i) => i.type === n.name), r = {
|
|
2116
|
-
name: n.name,
|
|
2117
|
-
options: n.options,
|
|
2118
|
-
storage: this.editor.extensionStorage[n.name],
|
|
2119
|
-
editor: t,
|
|
2120
|
-
type: z(n.name, this.schema)
|
|
2121
|
-
}, o = v(n, "addMarkView", r);
|
|
2122
|
-
if (!o)
|
|
2123
|
-
return [];
|
|
2124
|
-
const c = (i, a, l) => {
|
|
2125
|
-
const d = tt(i, s);
|
|
2126
|
-
return o()({
|
|
2127
|
-
// pass-through
|
|
2128
|
-
mark: i,
|
|
2129
|
-
view: a,
|
|
2130
|
-
inline: l,
|
|
2131
|
-
// tiptap-specific
|
|
2132
|
-
editor: t,
|
|
2133
|
-
extension: n,
|
|
2134
|
-
HTMLAttributes: d,
|
|
2135
|
-
updateAttributes: (p) => {
|
|
2136
|
-
Zs(i, t, p);
|
|
2137
|
-
}
|
|
2138
|
-
});
|
|
2139
|
-
};
|
|
2140
|
-
return [n.name, c];
|
|
2141
|
-
})
|
|
2142
|
-
);
|
|
2143
|
-
}
|
|
2144
|
-
/**
|
|
2145
|
-
* Go through all extensions, create extension storages & setup marks
|
|
2146
|
-
* & bind editor event listener.
|
|
2147
|
-
*/
|
|
2148
|
-
setupExtensions() {
|
|
2149
|
-
const t = this.extensions;
|
|
2150
|
-
this.editor.extensionStorage = Object.fromEntries(
|
|
2151
|
-
t.map((e) => [e.name, e.storage])
|
|
2152
|
-
), t.forEach((e) => {
|
|
2153
|
-
var n;
|
|
2154
|
-
const s = {
|
|
2155
|
-
name: e.name,
|
|
2156
|
-
options: e.options,
|
|
2157
|
-
storage: this.editor.extensionStorage[e.name],
|
|
2158
|
-
editor: this.editor,
|
|
2159
|
-
type: L(e.name, this.schema)
|
|
2160
|
-
};
|
|
2161
|
-
e.type === "mark" && ((n = M(v(e, "keepOnSplit", s))) == null || n) && this.splittableMarks.push(e.name);
|
|
2162
|
-
const r = v(e, "onBeforeCreate", s), o = v(e, "onCreate", s), c = v(e, "onUpdate", s), i = v(
|
|
2163
|
-
e,
|
|
2164
|
-
"onSelectionUpdate",
|
|
2165
|
-
s
|
|
2166
|
-
), a = v(e, "onTransaction", s), l = v(e, "onFocus", s), d = v(e, "onBlur", s), p = v(e, "onDestroy", s);
|
|
2167
|
-
r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), c && this.editor.on("update", c), i && this.editor.on("selectionUpdate", i), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), d && this.editor.on("blur", d), p && this.editor.on("destroy", p);
|
|
2168
|
-
});
|
|
2169
|
-
}
|
|
2170
|
-
};
|
|
2171
|
-
at.resolve = kt;
|
|
2172
|
-
at.sort = W;
|
|
2173
|
-
at.flatten = vt;
|
|
2174
|
-
var Bs = {};
|
|
2175
|
-
ft(Bs, {
|
|
2176
|
-
ClipboardTextSerializer: () => se,
|
|
2177
|
-
Commands: () => re,
|
|
2178
|
-
Delete: () => oe,
|
|
2179
|
-
Drop: () => ie,
|
|
2180
|
-
Editable: () => ae,
|
|
2181
|
-
FocusEvents: () => le,
|
|
2182
|
-
Keymap: () => de,
|
|
2183
|
-
Paste: () => ue,
|
|
2184
|
-
Tabindex: () => pe,
|
|
2185
|
-
TextDirection: () => he,
|
|
2186
|
-
focusEventsPluginKey: () => ce
|
|
2187
|
-
});
|
|
2188
|
-
var O = class ne extends xt {
|
|
2189
|
-
constructor() {
|
|
2190
|
-
super(...arguments), this.type = "extension";
|
|
2191
|
-
}
|
|
2192
|
-
/**
|
|
2193
|
-
* Create a new Extension instance
|
|
2194
|
-
* @param config - Extension configuration object or a function that returns a configuration object
|
|
2195
|
-
*/
|
|
2196
|
-
static create(e = {}) {
|
|
2197
|
-
const n = typeof e == "function" ? e() : e;
|
|
2198
|
-
return new ne(n);
|
|
2199
|
-
}
|
|
2200
|
-
configure(e) {
|
|
2201
|
-
return super.configure(e);
|
|
2202
|
-
}
|
|
2203
|
-
extend(e) {
|
|
2204
|
-
const n = typeof e == "function" ? e() : e;
|
|
2205
|
-
return super.extend(n);
|
|
2206
|
-
}
|
|
2207
|
-
}, se = O.create({
|
|
2208
|
-
name: "clipboardTextSerializer",
|
|
2209
|
-
addOptions() {
|
|
2210
|
-
return {
|
|
2211
|
-
blockSeparator: void 0
|
|
2212
|
-
};
|
|
2213
|
-
},
|
|
2214
|
-
addProseMirrorPlugins() {
|
|
2215
|
-
return [
|
|
2216
|
-
new A({
|
|
2217
|
-
key: new j("clipboardTextSerializer"),
|
|
2218
|
-
props: {
|
|
2219
|
-
clipboardTextSerializer: () => {
|
|
2220
|
-
const { editor: t } = this, { state: e, schema: n } = t, { doc: s, selection: r } = e, { ranges: o } = r, c = Math.min(...o.map((l) => l.$from.pos)), i = Math.max(...o.map((l) => l.$to.pos)), a = Xt(n);
|
|
2221
|
-
return Yt(s, { from: c, to: i }, {
|
|
2222
|
-
...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
|
|
2223
|
-
textSerializers: a
|
|
2224
|
-
});
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
})
|
|
2228
|
-
];
|
|
2229
|
-
}
|
|
2230
|
-
}), re = O.create({
|
|
2231
|
-
name: "commands",
|
|
2232
|
-
addCommands() {
|
|
2233
|
-
return {
|
|
2234
|
-
...Ht
|
|
2235
|
-
};
|
|
2236
|
-
}
|
|
2237
|
-
}), oe = O.create({
|
|
2238
|
-
name: "delete",
|
|
2239
|
-
onUpdate({ transaction: t, appendedTransactions: e }) {
|
|
2240
|
-
var n, s, r;
|
|
2241
|
-
const o = () => {
|
|
2242
|
-
var c, i, a, l;
|
|
2243
|
-
if ((l = (a = (i = (c = this.editor.options.coreExtensionOptions) == null ? void 0 : c.delete) == null ? void 0 : i.filterTransaction) == null ? void 0 : a.call(i, t)) != null ? l : t.getMeta("y-sync$"))
|
|
2244
|
-
return;
|
|
2245
|
-
const d = Wn(t.before, [t, ...e]);
|
|
2246
|
-
es(d).forEach((u) => {
|
|
2247
|
-
d.mapping.mapResult(u.oldRange.from).deletedAfter && d.mapping.mapResult(u.oldRange.to).deletedBefore && d.before.nodesBetween(u.oldRange.from, u.oldRange.to, (h, m) => {
|
|
2248
|
-
const f = m + h.nodeSize - 2, g = u.oldRange.from <= m && f <= u.oldRange.to;
|
|
2249
|
-
this.editor.emit("delete", {
|
|
2250
|
-
type: "node",
|
|
2251
|
-
node: h,
|
|
2252
|
-
from: m,
|
|
2253
|
-
to: f,
|
|
2254
|
-
newFrom: d.mapping.map(m),
|
|
2255
|
-
newTo: d.mapping.map(f),
|
|
2256
|
-
deletedRange: u.oldRange,
|
|
2257
|
-
newRange: u.newRange,
|
|
2258
|
-
partial: !g,
|
|
2259
|
-
editor: this.editor,
|
|
2260
|
-
transaction: t,
|
|
2261
|
-
combinedTransform: d
|
|
2262
|
-
});
|
|
2263
|
-
});
|
|
2264
|
-
});
|
|
2265
|
-
const p = d.mapping;
|
|
2266
|
-
d.steps.forEach((u, h) => {
|
|
2267
|
-
var m, f;
|
|
2268
|
-
if (u instanceof ve) {
|
|
2269
|
-
const g = p.slice(h).map(u.from, -1), y = p.slice(h).map(u.to), b = p.invert().map(g, -1), w = p.invert().map(y), x = (m = d.doc.nodeAt(g - 1)) == null ? void 0 : m.marks.some((S) => S.eq(u.mark)), k = (f = d.doc.nodeAt(y)) == null ? void 0 : f.marks.some((S) => S.eq(u.mark));
|
|
2270
|
-
this.editor.emit("delete", {
|
|
2271
|
-
type: "mark",
|
|
2272
|
-
mark: u.mark,
|
|
2273
|
-
from: u.from,
|
|
2274
|
-
to: u.to,
|
|
2275
|
-
deletedRange: {
|
|
2276
|
-
from: b,
|
|
2277
|
-
to: w
|
|
2278
|
-
},
|
|
2279
|
-
newRange: {
|
|
2280
|
-
from: g,
|
|
2281
|
-
to: y
|
|
2282
|
-
},
|
|
2283
|
-
partial: !!(k || x),
|
|
2284
|
-
editor: this.editor,
|
|
2285
|
-
transaction: t,
|
|
2286
|
-
combinedTransform: d
|
|
2287
|
-
});
|
|
2288
|
-
}
|
|
2289
|
-
});
|
|
2290
|
-
};
|
|
2291
|
-
(r = (s = (n = this.editor.options.coreExtensionOptions) == null ? void 0 : n.delete) == null ? void 0 : s.async) == null || r ? setTimeout(o, 0) : o();
|
|
2292
|
-
}
|
|
2293
|
-
}), ie = O.create({
|
|
2294
|
-
name: "drop",
|
|
2295
|
-
addProseMirrorPlugins() {
|
|
2296
|
-
return [
|
|
2297
|
-
new A({
|
|
2298
|
-
key: new j("tiptapDrop"),
|
|
2299
|
-
props: {
|
|
2300
|
-
handleDrop: (t, e, n, s) => {
|
|
2301
|
-
this.editor.emit("drop", {
|
|
2302
|
-
editor: this.editor,
|
|
2303
|
-
event: e,
|
|
2304
|
-
slice: n,
|
|
2305
|
-
moved: s
|
|
2306
|
-
});
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
})
|
|
2310
|
-
];
|
|
2311
|
-
}
|
|
2312
|
-
}), ae = O.create({
|
|
2313
|
-
name: "editable",
|
|
2314
|
-
addProseMirrorPlugins() {
|
|
2315
|
-
return [
|
|
2316
|
-
new A({
|
|
2317
|
-
key: new j("editable"),
|
|
2318
|
-
props: {
|
|
2319
|
-
editable: () => this.editor.options.editable
|
|
2320
|
-
}
|
|
2321
|
-
})
|
|
2322
|
-
];
|
|
2323
|
-
}
|
|
2324
|
-
}), ce = new j("focusEvents"), le = O.create({
|
|
2325
|
-
name: "focusEvents",
|
|
2326
|
-
addProseMirrorPlugins() {
|
|
2327
|
-
const { editor: t } = this;
|
|
2328
|
-
return [
|
|
2329
|
-
new A({
|
|
2330
|
-
key: ce,
|
|
2331
|
-
props: {
|
|
2332
|
-
handleDOMEvents: {
|
|
2333
|
-
focus: (e, n) => {
|
|
2334
|
-
t.isFocused = !0;
|
|
2335
|
-
const s = t.state.tr.setMeta("focus", { event: n }).setMeta("addToHistory", !1);
|
|
2336
|
-
return e.dispatch(s), !1;
|
|
2337
|
-
},
|
|
2338
|
-
blur: (e, n) => {
|
|
2339
|
-
t.isFocused = !1;
|
|
2340
|
-
const s = t.state.tr.setMeta("blur", { event: n }).setMeta("addToHistory", !1);
|
|
2341
|
-
return e.dispatch(s), !1;
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
})
|
|
2346
|
-
];
|
|
2347
|
-
}
|
|
2348
|
-
}), de = O.create({
|
|
2349
|
-
name: "keymap",
|
|
2350
|
-
addKeyboardShortcuts() {
|
|
2351
|
-
const t = () => this.editor.commands.first(({ commands: o }) => [
|
|
2352
|
-
() => o.undoInputRule(),
|
|
2353
|
-
// maybe convert first text block node to default node
|
|
2354
|
-
() => o.command(({ tr: c }) => {
|
|
2355
|
-
const { selection: i, doc: a } = c, { empty: l, $anchor: d } = i, { pos: p, parent: u } = d, h = d.parent.isTextblock && p > 0 ? c.doc.resolve(p - 1) : d, m = h.parent.type.spec.isolating, f = d.pos - d.parentOffset, g = m && h.parent.childCount === 1 ? f === d.pos : B.atStart(a).from === p;
|
|
2356
|
-
return !l || !u.type.isTextblock || u.textContent.length || !g || g && d.parent.type.name === "paragraph" ? !1 : o.clearNodes();
|
|
2357
|
-
}),
|
|
2358
|
-
() => o.deleteSelection(),
|
|
2359
|
-
() => o.joinBackward(),
|
|
2360
|
-
() => o.selectNodeBackward()
|
|
2361
|
-
]), e = () => this.editor.commands.first(({ commands: o }) => [
|
|
2362
|
-
() => o.deleteSelection(),
|
|
2363
|
-
() => o.deleteCurrentNode(),
|
|
2364
|
-
() => o.joinForward(),
|
|
2365
|
-
() => o.selectNodeForward()
|
|
2366
|
-
]), n = {
|
|
2367
|
-
Enter: () => this.editor.commands.first(({ commands: o }) => [
|
|
2368
|
-
() => o.newlineInCode(),
|
|
2369
|
-
() => o.createParagraphNear(),
|
|
2370
|
-
() => o.liftEmptyBlock(),
|
|
2371
|
-
() => o.splitBlock()
|
|
2372
|
-
]),
|
|
2373
|
-
"Mod-Enter": () => this.editor.commands.exitCode(),
|
|
2374
|
-
Backspace: t,
|
|
2375
|
-
"Mod-Backspace": t,
|
|
2376
|
-
"Shift-Backspace": t,
|
|
2377
|
-
Delete: e,
|
|
2378
|
-
"Mod-Delete": e,
|
|
2379
|
-
"Mod-a": () => this.editor.commands.selectAll()
|
|
2380
|
-
}, s = {
|
|
2381
|
-
...n
|
|
2382
|
-
}, r = {
|
|
2383
|
-
...n,
|
|
2384
|
-
"Ctrl-h": t,
|
|
2385
|
-
"Alt-Backspace": t,
|
|
2386
|
-
"Ctrl-d": e,
|
|
2387
|
-
"Ctrl-Alt-Backspace": e,
|
|
2388
|
-
"Alt-Delete": e,
|
|
2389
|
-
"Alt-d": e,
|
|
2390
|
-
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
2391
|
-
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
2392
|
-
};
|
|
2393
|
-
return G() || Ft() ? r : s;
|
|
2394
|
-
},
|
|
2395
|
-
addProseMirrorPlugins() {
|
|
2396
|
-
return [
|
|
2397
|
-
// With this plugin we check if the whole document was selected and deleted.
|
|
2398
|
-
// In this case we will additionally call `clearNodes()` to convert e.g. a heading
|
|
2399
|
-
// to a paragraph if necessary.
|
|
2400
|
-
// This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
|
|
2401
|
-
// with many other commands.
|
|
2402
|
-
new A({
|
|
2403
|
-
key: new j("clearDocument"),
|
|
2404
|
-
appendTransaction: (t, e, n) => {
|
|
2405
|
-
if (t.some((h) => h.getMeta("composition")))
|
|
2406
|
-
return;
|
|
2407
|
-
const s = t.some((h) => h.docChanged) && !e.doc.eq(n.doc), r = t.some((h) => h.getMeta("preventClearDocument"));
|
|
2408
|
-
if (!s || r)
|
|
2409
|
-
return;
|
|
2410
|
-
const { empty: o, from: c, to: i } = e.selection, a = B.atStart(e.doc).from, l = B.atEnd(e.doc).to;
|
|
2411
|
-
if (o || !(c === a && i === l) || !wt(n.doc))
|
|
2412
|
-
return;
|
|
2413
|
-
const d = n.tr, p = nt({
|
|
2414
|
-
state: n,
|
|
2415
|
-
transaction: d
|
|
2416
|
-
}), { commands: u } = new st({
|
|
2417
|
-
editor: this.editor,
|
|
2418
|
-
state: p
|
|
2419
|
-
});
|
|
2420
|
-
if (u.clearNodes(), !!d.steps.length)
|
|
2421
|
-
return d;
|
|
2422
|
-
}
|
|
2423
|
-
})
|
|
2424
|
-
];
|
|
2425
|
-
}
|
|
2426
|
-
}), ue = O.create({
|
|
2427
|
-
name: "paste",
|
|
2428
|
-
addProseMirrorPlugins() {
|
|
2429
|
-
return [
|
|
2430
|
-
new A({
|
|
2431
|
-
key: new j("tiptapPaste"),
|
|
2432
|
-
props: {
|
|
2433
|
-
handlePaste: (t, e, n) => {
|
|
2434
|
-
this.editor.emit("paste", {
|
|
2435
|
-
editor: this.editor,
|
|
2436
|
-
event: e,
|
|
2437
|
-
slice: n
|
|
2438
|
-
});
|
|
2439
|
-
}
|
|
2440
|
-
}
|
|
2441
|
-
})
|
|
2442
|
-
];
|
|
2443
|
-
}
|
|
2444
|
-
}), pe = O.create({
|
|
2445
|
-
name: "tabindex",
|
|
2446
|
-
addProseMirrorPlugins() {
|
|
2447
|
-
return [
|
|
2448
|
-
new A({
|
|
2449
|
-
key: new j("tabindex"),
|
|
2450
|
-
props: {
|
|
2451
|
-
attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
|
|
2452
|
-
}
|
|
2453
|
-
})
|
|
2454
|
-
];
|
|
2455
|
-
}
|
|
2456
|
-
}), he = O.create({
|
|
2457
|
-
name: "textDirection",
|
|
2458
|
-
addOptions() {
|
|
2459
|
-
return {
|
|
2460
|
-
direction: void 0
|
|
2461
|
-
};
|
|
2462
|
-
},
|
|
2463
|
-
addGlobalAttributes() {
|
|
2464
|
-
if (!this.options.direction)
|
|
2465
|
-
return [];
|
|
2466
|
-
const { nodeExtensions: t } = H(this.extensions);
|
|
2467
|
-
return [
|
|
2468
|
-
{
|
|
2469
|
-
types: t.filter((e) => e.name !== "text").map((e) => e.name),
|
|
2470
|
-
attributes: {
|
|
2471
|
-
dir: {
|
|
2472
|
-
default: this.options.direction,
|
|
2473
|
-
parseHTML: (e) => {
|
|
2474
|
-
const n = e.getAttribute("dir");
|
|
2475
|
-
return n && (n === "ltr" || n === "rtl" || n === "auto") ? n : this.options.direction;
|
|
2476
|
-
},
|
|
2477
|
-
renderHTML: (e) => e.dir ? {
|
|
2478
|
-
dir: e.dir
|
|
2479
|
-
} : {}
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
}
|
|
2483
|
-
];
|
|
2484
|
-
},
|
|
2485
|
-
addProseMirrorPlugins() {
|
|
2486
|
-
return [
|
|
2487
|
-
new A({
|
|
2488
|
-
key: new j("textDirection"),
|
|
2489
|
-
props: {
|
|
2490
|
-
attributes: () => {
|
|
2491
|
-
const t = this.options.direction;
|
|
2492
|
-
return t ? {
|
|
2493
|
-
dir: t
|
|
2494
|
-
} : {};
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2497
|
-
})
|
|
2498
|
-
];
|
|
2499
|
-
}
|
|
2500
|
-
}), Hs = class V {
|
|
2501
|
-
constructor(e, n, s = !1, r = null) {
|
|
2502
|
-
this.currentNode = null, this.actualDepth = null, this.isBlock = s, this.resolvedPos = e, this.editor = n, this.currentNode = r;
|
|
2503
|
-
}
|
|
2504
|
-
get name() {
|
|
2505
|
-
return this.node.type.name;
|
|
2506
|
-
}
|
|
2507
|
-
get node() {
|
|
2508
|
-
return this.currentNode || this.resolvedPos.node();
|
|
2509
|
-
}
|
|
2510
|
-
get element() {
|
|
2511
|
-
return this.editor.view.domAtPos(this.pos).node;
|
|
2512
|
-
}
|
|
2513
|
-
get depth() {
|
|
2514
|
-
var e;
|
|
2515
|
-
return (e = this.actualDepth) != null ? e : this.resolvedPos.depth;
|
|
2516
|
-
}
|
|
2517
|
-
get pos() {
|
|
2518
|
-
return this.resolvedPos.pos;
|
|
2519
|
-
}
|
|
2520
|
-
get content() {
|
|
2521
|
-
return this.node.content;
|
|
2522
|
-
}
|
|
2523
|
-
set content(e) {
|
|
2524
|
-
let n = this.from, s = this.to;
|
|
2525
|
-
if (this.isBlock) {
|
|
2526
|
-
if (this.content.size === 0) {
|
|
2527
|
-
console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);
|
|
2528
|
-
return;
|
|
2529
|
-
}
|
|
2530
|
-
n = this.from + 1, s = this.to - 1;
|
|
2531
|
-
}
|
|
2532
|
-
this.editor.commands.insertContentAt({ from: n, to: s }, e);
|
|
2533
|
-
}
|
|
2534
|
-
get attributes() {
|
|
2535
|
-
return this.node.attrs;
|
|
2536
|
-
}
|
|
2537
|
-
get textContent() {
|
|
2538
|
-
return this.node.textContent;
|
|
2539
|
-
}
|
|
2540
|
-
get size() {
|
|
2541
|
-
return this.node.nodeSize;
|
|
2542
|
-
}
|
|
2543
|
-
get from() {
|
|
2544
|
-
return this.isBlock ? this.pos : this.resolvedPos.start(this.resolvedPos.depth);
|
|
2545
|
-
}
|
|
2546
|
-
get range() {
|
|
2547
|
-
return {
|
|
2548
|
-
from: this.from,
|
|
2549
|
-
to: this.to
|
|
2550
|
-
};
|
|
2551
|
-
}
|
|
2552
|
-
get to() {
|
|
2553
|
-
return this.isBlock ? this.pos + this.size : this.resolvedPos.end(this.resolvedPos.depth) + (this.node.isText ? 0 : 1);
|
|
2554
|
-
}
|
|
2555
|
-
get parent() {
|
|
2556
|
-
if (this.depth === 0)
|
|
2557
|
-
return null;
|
|
2558
|
-
const e = this.resolvedPos.start(this.resolvedPos.depth - 1), n = this.resolvedPos.doc.resolve(e);
|
|
2559
|
-
return new V(n, this.editor);
|
|
2560
|
-
}
|
|
2561
|
-
get before() {
|
|
2562
|
-
let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
|
|
2563
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new V(e, this.editor);
|
|
2564
|
-
}
|
|
2565
|
-
get after() {
|
|
2566
|
-
let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
|
|
2567
|
-
return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new V(e, this.editor);
|
|
2568
|
-
}
|
|
2569
|
-
get children() {
|
|
2570
|
-
const e = [];
|
|
2571
|
-
return this.node.content.forEach((n, s) => {
|
|
2572
|
-
const r = n.isBlock && !n.isTextblock, o = n.isAtom && !n.isText, c = n.isInline, i = this.pos + s + (o ? 0 : 1);
|
|
2573
|
-
if (i < 0 || i > this.resolvedPos.doc.nodeSize - 2)
|
|
2574
|
-
return;
|
|
2575
|
-
const a = this.resolvedPos.doc.resolve(i);
|
|
2576
|
-
if (!r && !c && a.depth <= this.depth)
|
|
2577
|
-
return;
|
|
2578
|
-
const l = new V(a, this.editor, r, r || c ? n : null);
|
|
2579
|
-
r && (l.actualDepth = this.depth + 1), e.push(l);
|
|
2580
|
-
}), e;
|
|
2581
|
-
}
|
|
2582
|
-
get firstChild() {
|
|
2583
|
-
return this.children[0] || null;
|
|
2584
|
-
}
|
|
2585
|
-
get lastChild() {
|
|
2586
|
-
const e = this.children;
|
|
2587
|
-
return e[e.length - 1] || null;
|
|
2588
|
-
}
|
|
2589
|
-
closest(e, n = {}) {
|
|
2590
|
-
let s = null, r = this.parent;
|
|
2591
|
-
for (; r && !s; ) {
|
|
2592
|
-
if (r.node.type.name === e)
|
|
2593
|
-
if (Object.keys(n).length > 0) {
|
|
2594
|
-
const o = r.node.attrs, c = Object.keys(n);
|
|
2595
|
-
for (let i = 0; i < c.length; i += 1) {
|
|
2596
|
-
const a = c[i];
|
|
2597
|
-
if (o[a] !== n[a])
|
|
2598
|
-
break;
|
|
2599
|
-
}
|
|
2600
|
-
} else
|
|
2601
|
-
s = r;
|
|
2602
|
-
r = r.parent;
|
|
2603
|
-
}
|
|
2604
|
-
return s;
|
|
2605
|
-
}
|
|
2606
|
-
querySelector(e, n = {}) {
|
|
2607
|
-
return this.querySelectorAll(e, n, !0)[0] || null;
|
|
2608
|
-
}
|
|
2609
|
-
querySelectorAll(e, n = {}, s = !1) {
|
|
2610
|
-
let r = [];
|
|
2611
|
-
if (!this.children || this.children.length === 0)
|
|
2612
|
-
return r;
|
|
2613
|
-
const o = Object.keys(n);
|
|
2614
|
-
return this.children.forEach((c) => {
|
|
2615
|
-
s && r.length > 0 || (c.node.type.name === e && o.every((i) => n[i] === c.node.attrs[i]) && r.push(c), !(s && r.length > 0) && (r = r.concat(c.querySelectorAll(e, n, s))));
|
|
2616
|
-
}), r;
|
|
2617
|
-
}
|
|
2618
|
-
setAttribute(e) {
|
|
2619
|
-
const { tr: n } = this.editor.state;
|
|
2620
|
-
n.setNodeMarkup(this.from, void 0, {
|
|
2621
|
-
...this.node.attrs,
|
|
2622
|
-
...e
|
|
2623
|
-
}), this.editor.view.dispatch(n);
|
|
2624
|
-
}
|
|
2625
|
-
}, Ls = `.ProseMirror {
|
|
2626
|
-
position: relative;
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
.ProseMirror {
|
|
2630
|
-
word-wrap: break-word;
|
|
2631
|
-
white-space: pre-wrap;
|
|
2632
|
-
white-space: break-spaces;
|
|
2633
|
-
-webkit-font-variant-ligatures: none;
|
|
2634
|
-
font-variant-ligatures: none;
|
|
2635
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
2636
|
-
}
|
|
2637
|
-
|
|
2638
|
-
.ProseMirror [contenteditable="false"] {
|
|
2639
|
-
white-space: normal;
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
2643
|
-
white-space: pre-wrap;
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
.ProseMirror pre {
|
|
2647
|
-
white-space: pre-wrap;
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
img.ProseMirror-separator {
|
|
2651
|
-
display: inline !important;
|
|
2652
|
-
border: none !important;
|
|
2653
|
-
margin: 0 !important;
|
|
2654
|
-
width: 0 !important;
|
|
2655
|
-
height: 0 !important;
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
.ProseMirror-gapcursor {
|
|
2659
|
-
display: none;
|
|
2660
|
-
pointer-events: none;
|
|
2661
|
-
position: absolute;
|
|
2662
|
-
margin: 0;
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
.ProseMirror-gapcursor:after {
|
|
2666
|
-
content: "";
|
|
2667
|
-
display: block;
|
|
2668
|
-
position: absolute;
|
|
2669
|
-
top: -2px;
|
|
2670
|
-
width: 20px;
|
|
2671
|
-
border-top: 1px solid black;
|
|
2672
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
@keyframes ProseMirror-cursor-blink {
|
|
2676
|
-
to {
|
|
2677
|
-
visibility: hidden;
|
|
2678
|
-
}
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
.ProseMirror-hideselection *::selection {
|
|
2682
|
-
background: transparent;
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
2686
|
-
background: transparent;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
.ProseMirror-hideselection * {
|
|
2690
|
-
caret-color: transparent;
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
2694
|
-
display: block;
|
|
2695
|
-
}`;
|
|
2696
|
-
function Vs(t, e, n) {
|
|
2697
|
-
const s = document.querySelector("style[data-tiptap-style]");
|
|
2698
|
-
if (s !== null)
|
|
2699
|
-
return s;
|
|
2700
|
-
const r = document.createElement("style");
|
|
2701
|
-
return e && r.setAttribute("nonce", e), r.setAttribute("data-tiptap-style", ""), r.innerHTML = t, document.getElementsByTagName("head")[0].appendChild(r), r;
|
|
2702
|
-
}
|
|
2703
|
-
var ur = class extends $s {
|
|
2704
|
-
constructor(t = {}) {
|
|
2705
|
-
super(), this.css = null, this.className = "tiptap", this.editorView = null, this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.instanceId = Math.random().toString(36).slice(2, 9), this.options = {
|
|
2706
|
-
element: typeof document < "u" ? document.createElement("div") : null,
|
|
2707
|
-
content: "",
|
|
2708
|
-
injectCSS: !0,
|
|
2709
|
-
injectNonce: void 0,
|
|
2710
|
-
extensions: [],
|
|
2711
|
-
autofocus: !1,
|
|
2712
|
-
editable: !0,
|
|
2713
|
-
textDirection: void 0,
|
|
2714
|
-
editorProps: {},
|
|
2715
|
-
parseOptions: {},
|
|
2716
|
-
coreExtensionOptions: {},
|
|
2717
|
-
enableInputRules: !0,
|
|
2718
|
-
enablePasteRules: !0,
|
|
2719
|
-
enableCoreExtensions: !0,
|
|
2720
|
-
enableContentCheck: !1,
|
|
2721
|
-
emitContentError: !1,
|
|
2722
|
-
onBeforeCreate: () => null,
|
|
2723
|
-
onCreate: () => null,
|
|
2724
|
-
onMount: () => null,
|
|
2725
|
-
onUnmount: () => null,
|
|
2726
|
-
onUpdate: () => null,
|
|
2727
|
-
onSelectionUpdate: () => null,
|
|
2728
|
-
onTransaction: () => null,
|
|
2729
|
-
onFocus: () => null,
|
|
2730
|
-
onBlur: () => null,
|
|
2731
|
-
onDestroy: () => null,
|
|
2732
|
-
onContentError: ({ error: s }) => {
|
|
2733
|
-
throw s;
|
|
2734
|
-
},
|
|
2735
|
-
onPaste: () => null,
|
|
2736
|
-
onDrop: () => null,
|
|
2737
|
-
onDelete: () => null,
|
|
2738
|
-
enableExtensionDispatchTransaction: !0
|
|
2739
|
-
}, this.isCapturingTransaction = !1, this.capturedTransaction = null, this.utils = {
|
|
2740
|
-
getUpdatedPosition: rs,
|
|
2741
|
-
createMappablePosition: os
|
|
2742
|
-
}, this.setOptions(t), this.createExtensionManager(), this.createCommandManager(), this.createSchema(), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("mount", this.options.onMount), this.on("unmount", this.options.onUnmount), this.on("contentError", this.options.onContentError), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", this.options.onFocus), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("drop", ({ event: s, slice: r, moved: o }) => this.options.onDrop(s, r, o)), this.on("paste", ({ event: s, slice: r }) => this.options.onPaste(s, r)), this.on("delete", this.options.onDelete);
|
|
2743
|
-
const e = this.createDoc(), n = Wt(e, this.options.autofocus);
|
|
2744
|
-
this.editorState = Le.create({
|
|
2745
|
-
doc: e,
|
|
2746
|
-
schema: this.schema,
|
|
2747
|
-
selection: n || void 0
|
|
2748
|
-
}), this.options.element && this.mount(this.options.element);
|
|
2749
|
-
}
|
|
2750
|
-
/**
|
|
2751
|
-
* Attach the editor to the DOM, creating a new editor view.
|
|
2752
|
-
*/
|
|
2753
|
-
mount(t) {
|
|
2754
|
-
if (typeof document > "u")
|
|
2755
|
-
throw new Error(
|
|
2756
|
-
"[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment."
|
|
2757
|
-
);
|
|
2758
|
-
this.createView(t), this.emit("mount", { editor: this }), this.css && !document.head.contains(this.css) && document.head.appendChild(this.css), window.setTimeout(() => {
|
|
2759
|
-
this.isDestroyed || (this.options.autofocus !== !1 && this.options.autofocus !== null && this.commands.focus(this.options.autofocus), this.emit("create", { editor: this }), this.isInitialized = !0);
|
|
2760
|
-
}, 0);
|
|
2761
|
-
}
|
|
2762
|
-
/**
|
|
2763
|
-
* Remove the editor from the DOM, but still allow remounting at a different point in time
|
|
2764
|
-
*/
|
|
2765
|
-
unmount() {
|
|
2766
|
-
if (this.editorView) {
|
|
2767
|
-
const t = this.editorView.dom;
|
|
2768
|
-
t?.editor && delete t.editor, this.editorView.destroy();
|
|
2769
|
-
}
|
|
2770
|
-
if (this.editorView = null, this.isInitialized = !1, this.css && !document.querySelectorAll(`.${this.className}`).length)
|
|
2771
|
-
try {
|
|
2772
|
-
typeof this.css.remove == "function" ? this.css.remove() : this.css.parentNode && this.css.parentNode.removeChild(this.css);
|
|
2773
|
-
} catch (t) {
|
|
2774
|
-
console.warn("Failed to remove CSS element:", t);
|
|
2775
|
-
}
|
|
2776
|
-
this.css = null, this.emit("unmount", { editor: this });
|
|
2777
|
-
}
|
|
2778
|
-
/**
|
|
2779
|
-
* Returns the editor storage.
|
|
2780
|
-
*/
|
|
2781
|
-
get storage() {
|
|
2782
|
-
return this.extensionStorage;
|
|
2783
|
-
}
|
|
2784
|
-
/**
|
|
2785
|
-
* An object of all registered commands.
|
|
2786
|
-
*/
|
|
2787
|
-
get commands() {
|
|
2788
|
-
return this.commandManager.commands;
|
|
2789
|
-
}
|
|
2790
|
-
/**
|
|
2791
|
-
* Create a command chain to call multiple commands at once.
|
|
2792
|
-
*/
|
|
2793
|
-
chain() {
|
|
2794
|
-
return this.commandManager.chain();
|
|
2795
|
-
}
|
|
2796
|
-
/**
|
|
2797
|
-
* Check if a command or a command chain can be executed. Without executing it.
|
|
2798
|
-
*/
|
|
2799
|
-
can() {
|
|
2800
|
-
return this.commandManager.can();
|
|
2801
|
-
}
|
|
2802
|
-
/**
|
|
2803
|
-
* Inject CSS styles.
|
|
2804
|
-
*/
|
|
2805
|
-
injectCSS() {
|
|
2806
|
-
this.options.injectCSS && typeof document < "u" && (this.css = Vs(Ls, this.options.injectNonce));
|
|
2807
|
-
}
|
|
2808
|
-
/**
|
|
2809
|
-
* Update editor options.
|
|
2810
|
-
*
|
|
2811
|
-
* @param options A list of options
|
|
2812
|
-
*/
|
|
2813
|
-
setOptions(t = {}) {
|
|
2814
|
-
this.options = {
|
|
2815
|
-
...this.options,
|
|
2816
|
-
...t
|
|
2817
|
-
}, !(!this.editorView || !this.state || this.isDestroyed) && (this.options.editorProps && this.view.setProps(this.options.editorProps), this.view.updateState(this.state));
|
|
2818
|
-
}
|
|
2819
|
-
/**
|
|
2820
|
-
* Update editable state of the editor.
|
|
2821
|
-
*/
|
|
2822
|
-
setEditable(t, e = !0) {
|
|
2823
|
-
this.setOptions({ editable: t }), e && this.emit("update", { editor: this, transaction: this.state.tr, appendedTransactions: [] });
|
|
2824
|
-
}
|
|
2825
|
-
/**
|
|
2826
|
-
* Returns whether the editor is editable.
|
|
2827
|
-
*/
|
|
2828
|
-
get isEditable() {
|
|
2829
|
-
return this.options.editable && this.view && this.view.editable;
|
|
2830
|
-
}
|
|
2831
|
-
/**
|
|
2832
|
-
* Returns the editor view.
|
|
2833
|
-
*/
|
|
2834
|
-
get view() {
|
|
2835
|
-
return this.editorView ? this.editorView : new Proxy(
|
|
2836
|
-
{
|
|
2837
|
-
state: this.editorState,
|
|
2838
|
-
updateState: (t) => {
|
|
2839
|
-
this.editorState = t;
|
|
2840
|
-
},
|
|
2841
|
-
dispatch: (t) => {
|
|
2842
|
-
this.dispatchTransaction(t);
|
|
2843
|
-
},
|
|
2844
|
-
// Stub some commonly accessed properties to prevent errors
|
|
2845
|
-
composing: !1,
|
|
2846
|
-
dragging: null,
|
|
2847
|
-
editable: !0,
|
|
2848
|
-
isDestroyed: !1
|
|
2849
|
-
},
|
|
2850
|
-
{
|
|
2851
|
-
get: (t, e) => {
|
|
2852
|
-
if (this.editorView)
|
|
2853
|
-
return this.editorView[e];
|
|
2854
|
-
if (e === "state")
|
|
2855
|
-
return this.editorState;
|
|
2856
|
-
if (e in t)
|
|
2857
|
-
return Reflect.get(t, e);
|
|
2858
|
-
throw new Error(
|
|
2859
|
-
`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`
|
|
2860
|
-
);
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
);
|
|
2864
|
-
}
|
|
2865
|
-
/**
|
|
2866
|
-
* Returns the editor state.
|
|
2867
|
-
*/
|
|
2868
|
-
get state() {
|
|
2869
|
-
return this.editorView && (this.editorState = this.view.state), this.editorState;
|
|
2870
|
-
}
|
|
2871
|
-
/**
|
|
2872
|
-
* Register a ProseMirror plugin.
|
|
2873
|
-
*
|
|
2874
|
-
* @param plugin A ProseMirror plugin
|
|
2875
|
-
* @param handlePlugins Control how to merge the plugin into the existing plugins.
|
|
2876
|
-
* @returns The new editor state
|
|
2877
|
-
*/
|
|
2878
|
-
registerPlugin(t, e) {
|
|
2879
|
-
const n = _t(e) ? e(t, [...this.state.plugins]) : [...this.state.plugins, t], s = this.state.reconfigure({ plugins: n });
|
|
2880
|
-
return this.view.updateState(s), s;
|
|
2881
|
-
}
|
|
2882
|
-
/**
|
|
2883
|
-
* Unregister a ProseMirror plugin.
|
|
2884
|
-
*
|
|
2885
|
-
* @param nameOrPluginKeyToRemove The plugins name
|
|
2886
|
-
* @returns The new editor state or undefined if the editor is destroyed
|
|
2887
|
-
*/
|
|
2888
|
-
unregisterPlugin(t) {
|
|
2889
|
-
if (this.isDestroyed)
|
|
2890
|
-
return;
|
|
2891
|
-
const e = this.state.plugins;
|
|
2892
|
-
let n = e;
|
|
2893
|
-
if ([].concat(t).forEach((r) => {
|
|
2894
|
-
const o = typeof r == "string" ? `${r}$` : r.key;
|
|
2895
|
-
n = n.filter((c) => !c.key.startsWith(o));
|
|
2896
|
-
}), e.length === n.length)
|
|
2897
|
-
return;
|
|
2898
|
-
const s = this.state.reconfigure({
|
|
2899
|
-
plugins: n
|
|
2900
|
-
});
|
|
2901
|
-
return this.view.updateState(s), s;
|
|
2902
|
-
}
|
|
2903
|
-
/**
|
|
2904
|
-
* Creates an extension manager.
|
|
2905
|
-
*/
|
|
2906
|
-
createExtensionManager() {
|
|
2907
|
-
var t, e;
|
|
2908
|
-
const n = [...this.options.enableCoreExtensions ? [
|
|
2909
|
-
ae,
|
|
2910
|
-
se.configure({
|
|
2911
|
-
blockSeparator: (e = (t = this.options.coreExtensionOptions) == null ? void 0 : t.clipboardTextSerializer) == null ? void 0 : e.blockSeparator
|
|
2912
|
-
}),
|
|
2913
|
-
re,
|
|
2914
|
-
le,
|
|
2915
|
-
de,
|
|
2916
|
-
pe,
|
|
2917
|
-
ie,
|
|
2918
|
-
ue,
|
|
2919
|
-
oe,
|
|
2920
|
-
he.configure({
|
|
2921
|
-
direction: this.options.textDirection
|
|
2922
|
-
})
|
|
2923
|
-
].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s?.type));
|
|
2924
|
-
this.extensionManager = new at(n, this);
|
|
2925
|
-
}
|
|
2926
|
-
/**
|
|
2927
|
-
* Creates an command manager.
|
|
2928
|
-
*/
|
|
2929
|
-
createCommandManager() {
|
|
2930
|
-
this.commandManager = new st({
|
|
2931
|
-
editor: this
|
|
2932
|
-
});
|
|
2933
|
-
}
|
|
2934
|
-
/**
|
|
2935
|
-
* Creates a ProseMirror schema.
|
|
2936
|
-
*/
|
|
2937
|
-
createSchema() {
|
|
2938
|
-
this.schema = this.extensionManager.schema;
|
|
2939
|
-
}
|
|
2940
|
-
/**
|
|
2941
|
-
* Creates the initial document.
|
|
2942
|
-
*/
|
|
2943
|
-
createDoc() {
|
|
2944
|
-
let t;
|
|
2945
|
-
try {
|
|
2946
|
-
t = pt(this.options.content, this.schema, this.options.parseOptions, {
|
|
2947
|
-
errorOnInvalidContent: this.options.enableContentCheck
|
|
2948
|
-
});
|
|
2949
|
-
} catch (e) {
|
|
2950
|
-
if (!(e instanceof Error) || !["[tiptap error]: Invalid JSON content", "[tiptap error]: Invalid HTML content"].includes(e.message))
|
|
2951
|
-
throw e;
|
|
2952
|
-
this.emit("contentError", {
|
|
2953
|
-
editor: this,
|
|
2954
|
-
error: e,
|
|
2955
|
-
disableCollaboration: () => {
|
|
2956
|
-
"collaboration" in this.storage && typeof this.storage.collaboration == "object" && this.storage.collaboration && (this.storage.collaboration.isDisabled = !0), this.options.extensions = this.options.extensions.filter((n) => n.name !== "collaboration"), this.createExtensionManager();
|
|
2957
|
-
}
|
|
2958
|
-
}), t = pt(this.options.content, this.schema, this.options.parseOptions, {
|
|
2959
|
-
errorOnInvalidContent: !1
|
|
2960
|
-
});
|
|
2961
|
-
}
|
|
2962
|
-
return t;
|
|
2963
|
-
}
|
|
2964
|
-
/**
|
|
2965
|
-
* Creates a ProseMirror view.
|
|
2966
|
-
*/
|
|
2967
|
-
createView(t) {
|
|
2968
|
-
const { editorProps: e, enableExtensionDispatchTransaction: n } = this.options, s = e.dispatchTransaction || this.dispatchTransaction.bind(this), r = n ? this.extensionManager.dispatchTransaction(s) : s, o = e.transformPastedHTML, c = this.extensionManager.transformPastedHTML(o);
|
|
2969
|
-
this.editorView = new Je(t, {
|
|
2970
|
-
...e,
|
|
2971
|
-
attributes: {
|
|
2972
|
-
// add `role="textbox"` to the editor element
|
|
2973
|
-
role: "textbox",
|
|
2974
|
-
...e?.attributes
|
|
2975
|
-
},
|
|
2976
|
-
dispatchTransaction: r,
|
|
2977
|
-
transformPastedHTML: c,
|
|
2978
|
-
state: this.editorState,
|
|
2979
|
-
markViews: this.extensionManager.markViews,
|
|
2980
|
-
nodeViews: this.extensionManager.nodeViews
|
|
2981
|
-
});
|
|
2982
|
-
const i = this.state.reconfigure({
|
|
2983
|
-
plugins: this.extensionManager.plugins
|
|
2984
|
-
});
|
|
2985
|
-
this.view.updateState(i), this.prependClass(), this.injectCSS();
|
|
2986
|
-
const a = this.view.dom;
|
|
2987
|
-
a.editor = this;
|
|
2988
|
-
}
|
|
2989
|
-
/**
|
|
2990
|
-
* Creates all node and mark views.
|
|
2991
|
-
*/
|
|
2992
|
-
createNodeViews() {
|
|
2993
|
-
this.view.isDestroyed || this.view.setProps({
|
|
2994
|
-
markViews: this.extensionManager.markViews,
|
|
2995
|
-
nodeViews: this.extensionManager.nodeViews
|
|
2996
|
-
});
|
|
2997
|
-
}
|
|
2998
|
-
/**
|
|
2999
|
-
* Prepend class name to element.
|
|
3000
|
-
*/
|
|
3001
|
-
prependClass() {
|
|
3002
|
-
this.view.dom.className = `${this.className} ${this.view.dom.className}`;
|
|
3003
|
-
}
|
|
3004
|
-
captureTransaction(t) {
|
|
3005
|
-
this.isCapturingTransaction = !0, t(), this.isCapturingTransaction = !1;
|
|
3006
|
-
const e = this.capturedTransaction;
|
|
3007
|
-
return this.capturedTransaction = null, e;
|
|
3008
|
-
}
|
|
3009
|
-
/**
|
|
3010
|
-
* The callback over which to send transactions (state updates) produced by the view.
|
|
3011
|
-
*
|
|
3012
|
-
* @param transaction An editor state transaction
|
|
3013
|
-
*/
|
|
3014
|
-
dispatchTransaction(t) {
|
|
3015
|
-
if (this.view.isDestroyed)
|
|
3016
|
-
return;
|
|
3017
|
-
if (this.isCapturingTransaction) {
|
|
3018
|
-
if (!this.capturedTransaction) {
|
|
3019
|
-
this.capturedTransaction = t;
|
|
3020
|
-
return;
|
|
3021
|
-
}
|
|
3022
|
-
t.steps.forEach((l) => {
|
|
3023
|
-
var d;
|
|
3024
|
-
return (d = this.capturedTransaction) == null ? void 0 : d.step(l);
|
|
3025
|
-
});
|
|
3026
|
-
return;
|
|
3027
|
-
}
|
|
3028
|
-
const { state: e, transactions: n } = this.state.applyTransaction(t), s = !this.state.selection.eq(e.selection), r = n.includes(t), o = this.state;
|
|
3029
|
-
if (this.emit("beforeTransaction", {
|
|
3030
|
-
editor: this,
|
|
3031
|
-
transaction: t,
|
|
3032
|
-
nextState: e
|
|
3033
|
-
}), !r)
|
|
3034
|
-
return;
|
|
3035
|
-
this.view.updateState(e), this.emit("transaction", {
|
|
3036
|
-
editor: this,
|
|
3037
|
-
transaction: t,
|
|
3038
|
-
appendedTransactions: n.slice(1)
|
|
3039
|
-
}), s && this.emit("selectionUpdate", {
|
|
3040
|
-
editor: this,
|
|
3041
|
-
transaction: t
|
|
3042
|
-
});
|
|
3043
|
-
const c = n.findLast((l) => l.getMeta("focus") || l.getMeta("blur")), i = c?.getMeta("focus"), a = c?.getMeta("blur");
|
|
3044
|
-
i && this.emit("focus", {
|
|
3045
|
-
editor: this,
|
|
3046
|
-
event: i.event,
|
|
3047
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3048
|
-
transaction: c
|
|
3049
|
-
}), a && this.emit("blur", {
|
|
3050
|
-
editor: this,
|
|
3051
|
-
event: a.event,
|
|
3052
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3053
|
-
transaction: c
|
|
3054
|
-
}), !(t.getMeta("preventUpdate") || !n.some((l) => l.docChanged) || o.doc.eq(e.doc)) && this.emit("update", {
|
|
3055
|
-
editor: this,
|
|
3056
|
-
transaction: t,
|
|
3057
|
-
appendedTransactions: n.slice(1)
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
/**
|
|
3061
|
-
* Get attributes of the currently selected node or mark.
|
|
3062
|
-
*/
|
|
3063
|
-
getAttributes(t) {
|
|
3064
|
-
return Qn(this.state, t);
|
|
3065
|
-
}
|
|
3066
|
-
isActive(t, e) {
|
|
3067
|
-
const n = typeof t == "string" ? t : null, s = typeof t == "string" ? e : t;
|
|
3068
|
-
return ss(this.state, n, s);
|
|
3069
|
-
}
|
|
3070
|
-
/**
|
|
3071
|
-
* Get the document as JSON.
|
|
3072
|
-
*/
|
|
3073
|
-
getJSON() {
|
|
3074
|
-
return this.state.doc.toJSON();
|
|
3075
|
-
}
|
|
3076
|
-
/**
|
|
3077
|
-
* Get the document as HTML.
|
|
3078
|
-
*/
|
|
3079
|
-
getHTML() {
|
|
3080
|
-
return bt(this.state.doc.content, this.schema);
|
|
3081
|
-
}
|
|
3082
|
-
/**
|
|
3083
|
-
* Get the document as text.
|
|
3084
|
-
*/
|
|
3085
|
-
getText(t) {
|
|
3086
|
-
const { blockSeparator: e = `
|
|
3087
|
-
|
|
3088
|
-
`, textSerializers: n = {} } = t || {};
|
|
3089
|
-
return Xn(this.state.doc, {
|
|
3090
|
-
blockSeparator: e,
|
|
3091
|
-
textSerializers: {
|
|
3092
|
-
...Xt(this.schema),
|
|
3093
|
-
...n
|
|
3094
|
-
}
|
|
3095
|
-
});
|
|
3096
|
-
}
|
|
3097
|
-
/**
|
|
3098
|
-
* Check if there is no content.
|
|
3099
|
-
*/
|
|
3100
|
-
get isEmpty() {
|
|
3101
|
-
return wt(this.state.doc);
|
|
3102
|
-
}
|
|
3103
|
-
/**
|
|
3104
|
-
* Destroy the editor.
|
|
3105
|
-
*/
|
|
3106
|
-
destroy() {
|
|
3107
|
-
this.emit("destroy"), this.unmount(), this.removeAllListeners();
|
|
3108
|
-
}
|
|
3109
|
-
/**
|
|
3110
|
-
* Check if the editor is already destroyed.
|
|
3111
|
-
*/
|
|
3112
|
-
get isDestroyed() {
|
|
3113
|
-
var t, e;
|
|
3114
|
-
return (e = (t = this.editorView) == null ? void 0 : t.isDestroyed) != null ? e : !0;
|
|
3115
|
-
}
|
|
3116
|
-
$node(t, e) {
|
|
3117
|
-
var n;
|
|
3118
|
-
return ((n = this.$doc) == null ? void 0 : n.querySelector(t, e)) || null;
|
|
3119
|
-
}
|
|
3120
|
-
$nodes(t, e) {
|
|
3121
|
-
var n;
|
|
3122
|
-
return ((n = this.$doc) == null ? void 0 : n.querySelectorAll(t, e)) || null;
|
|
3123
|
-
}
|
|
3124
|
-
$pos(t) {
|
|
3125
|
-
const e = this.state.doc.resolve(t);
|
|
3126
|
-
return new Hs(e, this);
|
|
3127
|
-
}
|
|
3128
|
-
get $doc() {
|
|
3129
|
-
return this.$pos(0);
|
|
3130
|
-
}
|
|
3131
|
-
};
|
|
3132
|
-
function pr(t) {
|
|
3133
|
-
return new it({
|
|
3134
|
-
find: t.find,
|
|
3135
|
-
handler: ({ state: e, range: n, match: s }) => {
|
|
3136
|
-
const r = M(t.getAttributes, void 0, s);
|
|
3137
|
-
if (r === !1 || r === null)
|
|
3138
|
-
return null;
|
|
3139
|
-
const { tr: o } = e, c = s[s.length - 1], i = s[0];
|
|
3140
|
-
if (c) {
|
|
3141
|
-
const a = i.search(/\S/), l = n.from + i.indexOf(c), d = l + c.length;
|
|
3142
|
-
if (Zt(n.from, n.to, e.doc).filter((u) => u.mark.type.excluded.find((h) => h === t.type && h !== u.mark.type)).filter((u) => u.to > l).length)
|
|
3143
|
-
return null;
|
|
3144
|
-
d < n.to && o.delete(d, n.to), l > n.from && o.delete(n.from + a, l);
|
|
3145
|
-
const p = n.from + a + c.length;
|
|
3146
|
-
o.addMark(n.from + a, p, t.type.create(r || {})), o.removeStoredMark(t.type);
|
|
3147
|
-
}
|
|
3148
|
-
},
|
|
3149
|
-
undoable: t.undoable
|
|
3150
|
-
});
|
|
3151
|
-
}
|
|
3152
|
-
function hr(t) {
|
|
3153
|
-
return new it({
|
|
3154
|
-
find: t.find,
|
|
3155
|
-
handler: ({ state: e, range: n, match: s }) => {
|
|
3156
|
-
const r = M(t.getAttributes, void 0, s) || {}, { tr: o } = e, c = n.from;
|
|
3157
|
-
let i = n.to;
|
|
3158
|
-
const a = t.type.create(r);
|
|
3159
|
-
if (s[1]) {
|
|
3160
|
-
const l = s[0].lastIndexOf(s[1]);
|
|
3161
|
-
let d = c + l;
|
|
3162
|
-
d > i ? d = i : i = d + s[1].length;
|
|
3163
|
-
const p = s[0][s[0].length - 1];
|
|
3164
|
-
o.insertText(p, c + s[0].length - 1), o.replaceWith(d, i, a);
|
|
3165
|
-
} else if (s[0]) {
|
|
3166
|
-
const l = t.type.isInline ? c : c - 1;
|
|
3167
|
-
o.insert(l, t.type.create(r)).delete(o.mapping.map(c), o.mapping.map(i));
|
|
3168
|
-
}
|
|
3169
|
-
o.scrollIntoView();
|
|
3170
|
-
},
|
|
3171
|
-
undoable: t.undoable
|
|
3172
|
-
});
|
|
3173
|
-
}
|
|
3174
|
-
function mr(t) {
|
|
3175
|
-
return new it({
|
|
3176
|
-
find: t.find,
|
|
3177
|
-
handler: ({ state: e, range: n, match: s }) => {
|
|
3178
|
-
const r = e.doc.resolve(n.from), o = M(t.getAttributes, void 0, s) || {};
|
|
3179
|
-
if (!r.node(-1).canReplaceWith(r.index(-1), r.indexAfter(-1), t.type))
|
|
3180
|
-
return null;
|
|
3181
|
-
e.tr.delete(n.from, n.to).setBlockType(n.from, n.from, t.type, o);
|
|
3182
|
-
},
|
|
3183
|
-
undoable: t.undoable
|
|
3184
|
-
});
|
|
3185
|
-
}
|
|
3186
|
-
function fr(t) {
|
|
3187
|
-
return new it({
|
|
3188
|
-
find: t.find,
|
|
3189
|
-
handler: ({ state: e, range: n, match: s, chain: r }) => {
|
|
3190
|
-
const o = M(t.getAttributes, void 0, s) || {}, c = e.tr.delete(n.from, n.to), i = c.doc.resolve(n.from).blockRange(), a = i && ge(i, t.type, o);
|
|
3191
|
-
if (!a)
|
|
3192
|
-
return null;
|
|
3193
|
-
if (c.wrap(i, a), t.keepMarks && t.editor) {
|
|
3194
|
-
const { selection: d, storedMarks: p } = e, { splittableMarks: u } = t.editor.extensionManager, h = p || d.$to.parentOffset && d.$from.marks();
|
|
3195
|
-
if (h) {
|
|
3196
|
-
const m = h.filter((f) => u.includes(f.type.name));
|
|
3197
|
-
c.ensureMarks(m);
|
|
3198
|
-
}
|
|
3199
|
-
}
|
|
3200
|
-
if (t.keepAttributes) {
|
|
3201
|
-
const d = t.type.name === "bulletList" || t.type.name === "orderedList" ? "listItem" : "taskList";
|
|
3202
|
-
r().updateAttributes(d, o).run();
|
|
3203
|
-
}
|
|
3204
|
-
const l = c.doc.resolve(n.from - 1).nodeBefore;
|
|
3205
|
-
l && l.type === t.type && mt(c.doc, n.from - 1) && (!t.joinPredicate || t.joinPredicate(s, l)) && c.join(n.from - 1);
|
|
3206
|
-
},
|
|
3207
|
-
undoable: t.undoable
|
|
3208
|
-
});
|
|
3209
|
-
}
|
|
3210
|
-
var Ws = (t) => "touches" in t, gr = class {
|
|
3211
|
-
/**
|
|
3212
|
-
* Creates a new ResizableNodeView instance.
|
|
3213
|
-
*
|
|
3214
|
-
* The constructor sets up the resize handles, applies initial sizing from
|
|
3215
|
-
* node attributes, and configures all resize behavior options.
|
|
3216
|
-
*
|
|
3217
|
-
* @param options - Configuration options for the resizable node view
|
|
3218
|
-
*/
|
|
3219
|
-
constructor(t) {
|
|
3220
|
-
this.directions = ["bottom-left", "bottom-right", "top-left", "top-right"], this.minSize = {
|
|
3221
|
-
height: 8,
|
|
3222
|
-
width: 8
|
|
3223
|
-
}, this.preserveAspectRatio = !1, this.classNames = {
|
|
3224
|
-
container: "",
|
|
3225
|
-
wrapper: "",
|
|
3226
|
-
handle: "",
|
|
3227
|
-
resizing: ""
|
|
3228
|
-
}, this.initialWidth = 0, this.initialHeight = 0, this.aspectRatio = 1, this.isResizing = !1, this.activeHandle = null, this.startX = 0, this.startY = 0, this.startWidth = 0, this.startHeight = 0, this.isShiftKeyPressed = !1, this.lastEditableState = void 0, this.handleMap = /* @__PURE__ */ new Map(), this.handleMouseMove = (i) => {
|
|
3229
|
-
if (!this.isResizing || !this.activeHandle)
|
|
3230
|
-
return;
|
|
3231
|
-
const a = i.clientX - this.startX, l = i.clientY - this.startY;
|
|
3232
|
-
this.handleResize(a, l);
|
|
3233
|
-
}, this.handleTouchMove = (i) => {
|
|
3234
|
-
if (!this.isResizing || !this.activeHandle)
|
|
3235
|
-
return;
|
|
3236
|
-
const a = i.touches[0];
|
|
3237
|
-
if (!a)
|
|
3238
|
-
return;
|
|
3239
|
-
const l = a.clientX - this.startX, d = a.clientY - this.startY;
|
|
3240
|
-
this.handleResize(l, d);
|
|
3241
|
-
}, this.handleMouseUp = () => {
|
|
3242
|
-
if (!this.isResizing)
|
|
3243
|
-
return;
|
|
3244
|
-
const i = this.element.offsetWidth, a = this.element.offsetHeight;
|
|
3245
|
-
this.onCommit(i, a), this.isResizing = !1, this.activeHandle = null, this.container.dataset.resizeState = "false", this.classNames.resizing && this.container.classList.remove(this.classNames.resizing), document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("mouseup", this.handleMouseUp), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("keyup", this.handleKeyUp);
|
|
3246
|
-
}, this.handleKeyDown = (i) => {
|
|
3247
|
-
i.key === "Shift" && (this.isShiftKeyPressed = !0);
|
|
3248
|
-
}, this.handleKeyUp = (i) => {
|
|
3249
|
-
i.key === "Shift" && (this.isShiftKeyPressed = !1);
|
|
3250
|
-
};
|
|
3251
|
-
var e, n, s, r, o, c;
|
|
3252
|
-
this.node = t.node, this.editor = t.editor, this.element = t.element, this.contentElement = t.contentElement, this.getPos = t.getPos, this.onResize = t.onResize, this.onCommit = t.onCommit, this.onUpdate = t.onUpdate, (e = t.options) != null && e.min && (this.minSize = {
|
|
3253
|
-
...this.minSize,
|
|
3254
|
-
...t.options.min
|
|
3255
|
-
}), (n = t.options) != null && n.max && (this.maxSize = t.options.max), (s = t?.options) != null && s.directions && (this.directions = t.options.directions), (r = t.options) != null && r.preserveAspectRatio && (this.preserveAspectRatio = t.options.preserveAspectRatio), (o = t.options) != null && o.className && (this.classNames = {
|
|
3256
|
-
container: t.options.className.container || "",
|
|
3257
|
-
wrapper: t.options.className.wrapper || "",
|
|
3258
|
-
handle: t.options.className.handle || "",
|
|
3259
|
-
resizing: t.options.className.resizing || ""
|
|
3260
|
-
}), (c = t.options) != null && c.createCustomHandle && (this.createCustomHandle = t.options.createCustomHandle), this.wrapper = this.createWrapper(), this.container = this.createContainer(), this.applyInitialSize(), this.attachHandles(), this.editor.on("update", this.handleEditorUpdate.bind(this));
|
|
3261
|
-
}
|
|
3262
|
-
/**
|
|
3263
|
-
* Returns the top-level DOM node that should be placed in the editor.
|
|
3264
|
-
*
|
|
3265
|
-
* This is required by the ProseMirror NodeView interface. The container
|
|
3266
|
-
* includes the wrapper, handles, and the actual content element.
|
|
3267
|
-
*
|
|
3268
|
-
* @returns The container element to be inserted into the editor
|
|
3269
|
-
*/
|
|
3270
|
-
get dom() {
|
|
3271
|
-
return this.container;
|
|
3272
|
-
}
|
|
3273
|
-
get contentDOM() {
|
|
3274
|
-
var t;
|
|
3275
|
-
return (t = this.contentElement) != null ? t : null;
|
|
3276
|
-
}
|
|
3277
|
-
handleEditorUpdate() {
|
|
3278
|
-
const t = this.editor.isEditable;
|
|
3279
|
-
t !== this.lastEditableState && (this.lastEditableState = t, t ? t && this.handleMap.size === 0 && this.attachHandles() : this.removeHandles());
|
|
3280
|
-
}
|
|
3281
|
-
/**
|
|
3282
|
-
* Called when the node's content or attributes change.
|
|
3283
|
-
*
|
|
3284
|
-
* Updates the internal node reference. If a custom `onUpdate` callback
|
|
3285
|
-
* was provided, it will be called to handle additional update logic.
|
|
3286
|
-
*
|
|
3287
|
-
* @param node - The new/updated node
|
|
3288
|
-
* @param decorations - Node decorations
|
|
3289
|
-
* @param innerDecorations - Inner decorations
|
|
3290
|
-
* @returns `false` if the node type has changed (requires full rebuild), otherwise the result of `onUpdate` or `true`
|
|
3291
|
-
*/
|
|
3292
|
-
update(t, e, n) {
|
|
3293
|
-
return t.type !== this.node.type ? !1 : (this.node = t, this.onUpdate ? this.onUpdate(t, e, n) : !0);
|
|
3294
|
-
}
|
|
3295
|
-
/**
|
|
3296
|
-
* Cleanup method called when the node view is being removed.
|
|
3297
|
-
*
|
|
3298
|
-
* Removes all event listeners to prevent memory leaks. This is required
|
|
3299
|
-
* by the ProseMirror NodeView interface. If a resize is active when
|
|
3300
|
-
* destroy is called, it will be properly cancelled.
|
|
3301
|
-
*/
|
|
3302
|
-
destroy() {
|
|
3303
|
-
this.isResizing && (this.container.dataset.resizeState = "false", this.classNames.resizing && this.container.classList.remove(this.classNames.resizing), document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("mouseup", this.handleMouseUp), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("keyup", this.handleKeyUp), this.isResizing = !1, this.activeHandle = null), this.editor.off("update", this.handleEditorUpdate.bind(this)), this.container.remove();
|
|
3304
|
-
}
|
|
3305
|
-
/**
|
|
3306
|
-
* Creates the outer container element.
|
|
3307
|
-
*
|
|
3308
|
-
* The container is the top-level element returned by the NodeView and
|
|
3309
|
-
* wraps the entire resizable node. It's set up with flexbox to handle
|
|
3310
|
-
* alignment and includes data attributes for styling and identification.
|
|
3311
|
-
*
|
|
3312
|
-
* @returns The container element
|
|
3313
|
-
*/
|
|
3314
|
-
createContainer() {
|
|
3315
|
-
const t = document.createElement("div");
|
|
3316
|
-
return t.dataset.resizeContainer = "", t.dataset.node = this.node.type.name, t.style.display = "flex", this.classNames.container && (t.className = this.classNames.container), t.appendChild(this.wrapper), t;
|
|
3317
|
-
}
|
|
3318
|
-
/**
|
|
3319
|
-
* Creates the wrapper element that contains the content and handles.
|
|
3320
|
-
*
|
|
3321
|
-
* The wrapper uses relative positioning so that resize handles can be
|
|
3322
|
-
* positioned absolutely within it. This is the direct parent of the
|
|
3323
|
-
* content element being made resizable.
|
|
3324
|
-
*
|
|
3325
|
-
* @returns The wrapper element
|
|
3326
|
-
*/
|
|
3327
|
-
createWrapper() {
|
|
3328
|
-
const t = document.createElement("div");
|
|
3329
|
-
return t.style.position = "relative", t.style.display = "block", t.dataset.resizeWrapper = "", this.classNames.wrapper && (t.className = this.classNames.wrapper), t.appendChild(this.element), t;
|
|
3330
|
-
}
|
|
3331
|
-
/**
|
|
3332
|
-
* Creates a resize handle element for a specific direction.
|
|
3333
|
-
*
|
|
3334
|
-
* Each handle is absolutely positioned and includes a data attribute
|
|
3335
|
-
* identifying its direction for styling purposes.
|
|
3336
|
-
*
|
|
3337
|
-
* @param direction - The resize direction for this handle
|
|
3338
|
-
* @returns The handle element
|
|
3339
|
-
*/
|
|
3340
|
-
createHandle(t) {
|
|
3341
|
-
const e = document.createElement("div");
|
|
3342
|
-
return e.dataset.resizeHandle = t, e.style.position = "absolute", this.classNames.handle && (e.className = this.classNames.handle), e;
|
|
3343
|
-
}
|
|
3344
|
-
/**
|
|
3345
|
-
* Positions a handle element according to its direction.
|
|
3346
|
-
*
|
|
3347
|
-
* Corner handles (e.g., 'top-left') are positioned at the intersection
|
|
3348
|
-
* of two edges. Edge handles (e.g., 'top') span the full width or height.
|
|
3349
|
-
*
|
|
3350
|
-
* @param handle - The handle element to position
|
|
3351
|
-
* @param direction - The direction determining the position
|
|
3352
|
-
*/
|
|
3353
|
-
positionHandle(t, e) {
|
|
3354
|
-
const n = e.includes("top"), s = e.includes("bottom"), r = e.includes("left"), o = e.includes("right");
|
|
3355
|
-
n && (t.style.top = "0"), s && (t.style.bottom = "0"), r && (t.style.left = "0"), o && (t.style.right = "0"), (e === "top" || e === "bottom") && (t.style.left = "0", t.style.right = "0"), (e === "left" || e === "right") && (t.style.top = "0", t.style.bottom = "0");
|
|
3356
|
-
}
|
|
3357
|
-
/**
|
|
3358
|
-
* Creates and attaches all resize handles to the wrapper.
|
|
3359
|
-
*
|
|
3360
|
-
* Iterates through the configured directions, creates a handle for each,
|
|
3361
|
-
* positions it, attaches the mousedown listener, and appends it to the DOM.
|
|
3362
|
-
*/
|
|
3363
|
-
attachHandles() {
|
|
3364
|
-
this.directions.forEach((t) => {
|
|
3365
|
-
let e;
|
|
3366
|
-
this.createCustomHandle ? e = this.createCustomHandle(t) : e = this.createHandle(t), e instanceof HTMLElement || (console.warn(
|
|
3367
|
-
`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`
|
|
3368
|
-
), e = this.createHandle(t)), this.createCustomHandle || this.positionHandle(e, t), e.addEventListener("mousedown", (n) => this.handleResizeStart(n, t)), e.addEventListener("touchstart", (n) => this.handleResizeStart(n, t)), this.handleMap.set(t, e), this.wrapper.appendChild(e);
|
|
3369
|
-
});
|
|
3370
|
-
}
|
|
3371
|
-
/**
|
|
3372
|
-
* Removes all resize handles from the wrapper.
|
|
3373
|
-
*
|
|
3374
|
-
* Cleans up the handle map and removes each handle element from the DOM.
|
|
3375
|
-
*/
|
|
3376
|
-
removeHandles() {
|
|
3377
|
-
this.handleMap.forEach((t) => t.remove()), this.handleMap.clear();
|
|
3378
|
-
}
|
|
3379
|
-
/**
|
|
3380
|
-
* Applies initial sizing from node attributes to the element.
|
|
3381
|
-
*
|
|
3382
|
-
* If width/height attributes exist on the node, they're applied to the element.
|
|
3383
|
-
* Otherwise, the element's natural/current dimensions are measured. The aspect
|
|
3384
|
-
* ratio is calculated for later use in aspect-ratio-preserving resizes.
|
|
3385
|
-
*/
|
|
3386
|
-
applyInitialSize() {
|
|
3387
|
-
const t = this.node.attrs.width, e = this.node.attrs.height;
|
|
3388
|
-
t ? (this.element.style.width = `${t}px`, this.initialWidth = t) : this.initialWidth = this.element.offsetWidth, e ? (this.element.style.height = `${e}px`, this.initialHeight = e) : this.initialHeight = this.element.offsetHeight, this.initialWidth > 0 && this.initialHeight > 0 && (this.aspectRatio = this.initialWidth / this.initialHeight);
|
|
3389
|
-
}
|
|
3390
|
-
/**
|
|
3391
|
-
* Initiates a resize operation when a handle is clicked.
|
|
3392
|
-
*
|
|
3393
|
-
* Captures the starting mouse position and element dimensions, sets up
|
|
3394
|
-
* the resize state, adds the resizing class and state attribute, and
|
|
3395
|
-
* attaches document-level listeners for mouse movement and keyboard input.
|
|
3396
|
-
*
|
|
3397
|
-
* @param event - The mouse down event
|
|
3398
|
-
* @param direction - The direction of the handle being dragged
|
|
3399
|
-
*/
|
|
3400
|
-
handleResizeStart(t, e) {
|
|
3401
|
-
t.preventDefault(), t.stopPropagation(), this.isResizing = !0, this.activeHandle = e, Ws(t) ? (this.startX = t.touches[0].clientX, this.startY = t.touches[0].clientY) : (this.startX = t.clientX, this.startY = t.clientY), this.startWidth = this.element.offsetWidth, this.startHeight = this.element.offsetHeight, this.startWidth > 0 && this.startHeight > 0 && (this.aspectRatio = this.startWidth / this.startHeight), this.getPos(), this.container.dataset.resizeState = "true", this.classNames.resizing && this.container.classList.add(this.classNames.resizing), document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("touchmove", this.handleTouchMove), document.addEventListener("mouseup", this.handleMouseUp), document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("keyup", this.handleKeyUp);
|
|
3402
|
-
}
|
|
3403
|
-
handleResize(t, e) {
|
|
3404
|
-
if (!this.activeHandle)
|
|
3405
|
-
return;
|
|
3406
|
-
const n = this.preserveAspectRatio || this.isShiftKeyPressed, { width: s, height: r } = this.calculateNewDimensions(this.activeHandle, t, e), o = this.applyConstraints(s, r, n);
|
|
3407
|
-
this.element.style.width = `${o.width}px`, this.element.style.height = `${o.height}px`, this.onResize && this.onResize(o.width, o.height);
|
|
3408
|
-
}
|
|
3409
|
-
/**
|
|
3410
|
-
* Calculates new dimensions based on mouse delta and resize direction.
|
|
3411
|
-
*
|
|
3412
|
-
* Takes the starting dimensions and applies the mouse movement delta
|
|
3413
|
-
* according to the handle direction. For corner handles, both dimensions
|
|
3414
|
-
* are affected. For edge handles, only one dimension changes. If aspect
|
|
3415
|
-
* ratio should be preserved, delegates to applyAspectRatio.
|
|
3416
|
-
*
|
|
3417
|
-
* @param direction - The active resize handle direction
|
|
3418
|
-
* @param deltaX - Horizontal mouse movement since resize start
|
|
3419
|
-
* @param deltaY - Vertical mouse movement since resize start
|
|
3420
|
-
* @returns The calculated width and height
|
|
3421
|
-
*/
|
|
3422
|
-
calculateNewDimensions(t, e, n) {
|
|
3423
|
-
let s = this.startWidth, r = this.startHeight;
|
|
3424
|
-
const o = t.includes("right"), c = t.includes("left"), i = t.includes("bottom"), a = t.includes("top");
|
|
3425
|
-
return o ? s = this.startWidth + e : c && (s = this.startWidth - e), i ? r = this.startHeight + n : a && (r = this.startHeight - n), (t === "right" || t === "left") && (s = this.startWidth + (o ? e : -e)), (t === "top" || t === "bottom") && (r = this.startHeight + (i ? n : -n)), this.preserveAspectRatio || this.isShiftKeyPressed ? this.applyAspectRatio(s, r, t) : { width: s, height: r };
|
|
3426
|
-
}
|
|
3427
|
-
/**
|
|
3428
|
-
* Applies min/max constraints to dimensions.
|
|
3429
|
-
*
|
|
3430
|
-
* When aspect ratio is NOT preserved, constraints are applied independently
|
|
3431
|
-
* to width and height. When aspect ratio IS preserved, constraints are
|
|
3432
|
-
* applied while maintaining the aspect ratio—if one dimension hits a limit,
|
|
3433
|
-
* the other is recalculated proportionally.
|
|
3434
|
-
*
|
|
3435
|
-
* This ensures that aspect ratio is never broken when constrained.
|
|
3436
|
-
*
|
|
3437
|
-
* @param width - The unconstrained width
|
|
3438
|
-
* @param height - The unconstrained height
|
|
3439
|
-
* @param preserveAspectRatio - Whether to maintain aspect ratio while constraining
|
|
3440
|
-
* @returns The constrained dimensions
|
|
3441
|
-
*/
|
|
3442
|
-
applyConstraints(t, e, n) {
|
|
3443
|
-
var s, r, o, c;
|
|
3444
|
-
if (!n) {
|
|
3445
|
-
let l = Math.max(this.minSize.width, t), d = Math.max(this.minSize.height, e);
|
|
3446
|
-
return (s = this.maxSize) != null && s.width && (l = Math.min(this.maxSize.width, l)), (r = this.maxSize) != null && r.height && (d = Math.min(this.maxSize.height, d)), { width: l, height: d };
|
|
3447
|
-
}
|
|
3448
|
-
let i = t, a = e;
|
|
3449
|
-
return i < this.minSize.width && (i = this.minSize.width, a = i / this.aspectRatio), a < this.minSize.height && (a = this.minSize.height, i = a * this.aspectRatio), (o = this.maxSize) != null && o.width && i > this.maxSize.width && (i = this.maxSize.width, a = i / this.aspectRatio), (c = this.maxSize) != null && c.height && a > this.maxSize.height && (a = this.maxSize.height, i = a * this.aspectRatio), { width: i, height: a };
|
|
3450
|
-
}
|
|
3451
|
-
/**
|
|
3452
|
-
* Adjusts dimensions to maintain the original aspect ratio.
|
|
3453
|
-
*
|
|
3454
|
-
* For horizontal handles (left/right), uses width as the primary dimension
|
|
3455
|
-
* and calculates height from it. For vertical handles (top/bottom), uses
|
|
3456
|
-
* height as primary and calculates width. For corner handles, uses width
|
|
3457
|
-
* as the primary dimension.
|
|
3458
|
-
*
|
|
3459
|
-
* @param width - The new width
|
|
3460
|
-
* @param height - The new height
|
|
3461
|
-
* @param direction - The active resize direction
|
|
3462
|
-
* @returns Dimensions adjusted to preserve aspect ratio
|
|
3463
|
-
*/
|
|
3464
|
-
applyAspectRatio(t, e, n) {
|
|
3465
|
-
return n === "left" || n === "right" ? {
|
|
3466
|
-
width: t,
|
|
3467
|
-
height: t / this.aspectRatio
|
|
3468
|
-
} : n === "top" || n === "bottom" ? {
|
|
3469
|
-
width: e * this.aspectRatio,
|
|
3470
|
-
height: e
|
|
3471
|
-
} : {
|
|
3472
|
-
width: t,
|
|
3473
|
-
height: t / this.aspectRatio
|
|
3474
|
-
};
|
|
3475
|
-
}
|
|
3476
|
-
};
|
|
3477
|
-
function yr(t, e) {
|
|
3478
|
-
const { selection: n } = t, { $from: s } = n;
|
|
3479
|
-
if (n instanceof et) {
|
|
3480
|
-
const o = s.index();
|
|
3481
|
-
return s.parent.canReplaceWith(o, o + 1, e);
|
|
3482
|
-
}
|
|
3483
|
-
let r = s.depth;
|
|
3484
|
-
for (; r >= 0; ) {
|
|
3485
|
-
const o = s.index(r);
|
|
3486
|
-
if (s.node(r).contentMatchAt(o).matchType(e))
|
|
3487
|
-
return !0;
|
|
3488
|
-
r -= 1;
|
|
3489
|
-
}
|
|
3490
|
-
return !1;
|
|
3491
|
-
}
|
|
3492
|
-
var Us = {};
|
|
3493
|
-
ft(Us, {
|
|
3494
|
-
createAtomBlockMarkdownSpec: () => Fs,
|
|
3495
|
-
createBlockMarkdownSpec: () => Ks,
|
|
3496
|
-
createInlineMarkdownSpec: () => Js,
|
|
3497
|
-
parseAttributes: () => Mt,
|
|
3498
|
-
parseIndentedBlocks: () => Ys,
|
|
3499
|
-
renderNestedMarkdownContent: () => Xs,
|
|
3500
|
-
serializeAttributes: () => St
|
|
3501
|
-
});
|
|
3502
|
-
function Mt(t) {
|
|
3503
|
-
if (!t?.trim())
|
|
3504
|
-
return {};
|
|
3505
|
-
const e = {}, n = [], s = t.replace(/["']([^"']*)["']/g, (a) => (n.push(a), `__QUOTED_${n.length - 1}__`)), r = s.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);
|
|
3506
|
-
if (r) {
|
|
3507
|
-
const a = r.map((l) => l.trim().slice(1));
|
|
3508
|
-
e.class = a.join(" ");
|
|
3509
|
-
}
|
|
3510
|
-
const o = s.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);
|
|
3511
|
-
o && (e.id = o[1]);
|
|
3512
|
-
const c = /([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;
|
|
3513
|
-
Array.from(s.matchAll(c)).forEach(([, a, l]) => {
|
|
3514
|
-
var d;
|
|
3515
|
-
const p = parseInt(((d = l.match(/__QUOTED_(\d+)__/)) == null ? void 0 : d[1]) || "0", 10), u = n[p];
|
|
3516
|
-
u && (e[a] = u.slice(1, -1));
|
|
3517
|
-
});
|
|
3518
|
-
const i = s.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g, "").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g, "").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g, "").trim();
|
|
3519
|
-
return i && i.split(/\s+/).filter(Boolean).forEach((a) => {
|
|
3520
|
-
a.match(/^[a-zA-Z][\w-]*$/) && (e[a] = !0);
|
|
3521
|
-
}), e;
|
|
3522
|
-
}
|
|
3523
|
-
function St(t) {
|
|
3524
|
-
if (!t || Object.keys(t).length === 0)
|
|
3525
|
-
return "";
|
|
3526
|
-
const e = [];
|
|
3527
|
-
return t.class && String(t.class).split(/\s+/).filter(Boolean).forEach((n) => e.push(`.${n}`)), t.id && e.push(`#${t.id}`), Object.entries(t).forEach(([n, s]) => {
|
|
3528
|
-
n === "class" || n === "id" || (s === !0 ? e.push(n) : s !== !1 && s != null && e.push(`${n}="${String(s)}"`));
|
|
3529
|
-
}), e.join(" ");
|
|
3530
|
-
}
|
|
3531
|
-
function Fs(t) {
|
|
3532
|
-
const {
|
|
3533
|
-
nodeName: e,
|
|
3534
|
-
name: n,
|
|
3535
|
-
parseAttributes: s = Mt,
|
|
3536
|
-
serializeAttributes: r = St,
|
|
3537
|
-
defaultAttributes: o = {},
|
|
3538
|
-
requiredAttributes: c = [],
|
|
3539
|
-
allowedAttributes: i
|
|
3540
|
-
} = t, a = n || e, l = (d) => {
|
|
3541
|
-
if (!i)
|
|
3542
|
-
return d;
|
|
3543
|
-
const p = {};
|
|
3544
|
-
return i.forEach((u) => {
|
|
3545
|
-
u in d && (p[u] = d[u]);
|
|
3546
|
-
}), p;
|
|
3547
|
-
};
|
|
3548
|
-
return {
|
|
3549
|
-
parseMarkdown: (d, p) => {
|
|
3550
|
-
const u = { ...o, ...d.attributes };
|
|
3551
|
-
return p.createNode(e, u, []);
|
|
3552
|
-
},
|
|
3553
|
-
markdownTokenizer: {
|
|
3554
|
-
name: e,
|
|
3555
|
-
level: "block",
|
|
3556
|
-
start(d) {
|
|
3557
|
-
var p;
|
|
3558
|
-
const u = new RegExp(`^:::${a}(?:\\s|$)`, "m"), h = (p = d.match(u)) == null ? void 0 : p.index;
|
|
3559
|
-
return h !== void 0 ? h : -1;
|
|
3560
|
-
},
|
|
3561
|
-
tokenize(d, p, u) {
|
|
3562
|
-
const h = new RegExp(`^:::${a}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`), m = d.match(h);
|
|
3563
|
-
if (!m)
|
|
3564
|
-
return;
|
|
3565
|
-
const f = m[1] || "", g = s(f);
|
|
3566
|
-
if (!c.find((y) => !(y in g)))
|
|
3567
|
-
return {
|
|
3568
|
-
type: e,
|
|
3569
|
-
raw: m[0],
|
|
3570
|
-
attributes: g
|
|
3571
|
-
};
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
renderMarkdown: (d) => {
|
|
3575
|
-
const p = l(d.attrs || {}), u = r(p), h = u ? ` {${u}}` : "";
|
|
3576
|
-
return `:::${a}${h} :::`;
|
|
3577
|
-
}
|
|
3578
|
-
};
|
|
3579
|
-
}
|
|
3580
|
-
function Ks(t) {
|
|
3581
|
-
const {
|
|
3582
|
-
nodeName: e,
|
|
3583
|
-
name: n,
|
|
3584
|
-
getContent: s,
|
|
3585
|
-
parseAttributes: r = Mt,
|
|
3586
|
-
serializeAttributes: o = St,
|
|
3587
|
-
defaultAttributes: c = {},
|
|
3588
|
-
content: i = "block",
|
|
3589
|
-
allowedAttributes: a
|
|
3590
|
-
} = t, l = n || e, d = (p) => {
|
|
3591
|
-
if (!a)
|
|
3592
|
-
return p;
|
|
3593
|
-
const u = {};
|
|
3594
|
-
return a.forEach((h) => {
|
|
3595
|
-
h in p && (u[h] = p[h]);
|
|
3596
|
-
}), u;
|
|
3597
|
-
};
|
|
3598
|
-
return {
|
|
3599
|
-
parseMarkdown: (p, u) => {
|
|
3600
|
-
let h;
|
|
3601
|
-
if (s) {
|
|
3602
|
-
const f = s(p);
|
|
3603
|
-
h = typeof f == "string" ? [{ type: "text", text: f }] : f;
|
|
3604
|
-
} else i === "block" ? h = u.parseChildren(p.tokens || []) : h = u.parseInline(p.tokens || []);
|
|
3605
|
-
const m = { ...c, ...p.attributes };
|
|
3606
|
-
return u.createNode(e, m, h);
|
|
3607
|
-
},
|
|
3608
|
-
markdownTokenizer: {
|
|
3609
|
-
name: e,
|
|
3610
|
-
level: "block",
|
|
3611
|
-
start(p) {
|
|
3612
|
-
var u;
|
|
3613
|
-
const h = new RegExp(`^:::${l}`, "m"), m = (u = p.match(h)) == null ? void 0 : u.index;
|
|
3614
|
-
return m !== void 0 ? m : -1;
|
|
3615
|
-
},
|
|
3616
|
-
tokenize(p, u, h) {
|
|
3617
|
-
var m;
|
|
3618
|
-
const f = new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), g = p.match(f);
|
|
3619
|
-
if (!g)
|
|
3620
|
-
return;
|
|
3621
|
-
const [y, b = ""] = g, w = r(b);
|
|
3622
|
-
let x = 1;
|
|
3623
|
-
const k = y.length;
|
|
3624
|
-
let S = "";
|
|
3625
|
-
const E = /^:::([\w-]*)(\s.*)?/gm, $ = p.slice(k);
|
|
3626
|
-
for (E.lastIndex = 0; ; ) {
|
|
3627
|
-
const P = E.exec($);
|
|
3628
|
-
if (P === null)
|
|
3629
|
-
break;
|
|
3630
|
-
const K = P.index, ct = P[1];
|
|
3631
|
-
if (!((m = P[2]) != null && m.endsWith(":::"))) {
|
|
3632
|
-
if (ct)
|
|
3633
|
-
x += 1;
|
|
3634
|
-
else if (x -= 1, x === 0) {
|
|
3635
|
-
const Et = $.slice(0, K);
|
|
3636
|
-
S = Et.trim();
|
|
3637
|
-
const fe = p.slice(0, k + K + P[0].length);
|
|
3638
|
-
let N = [];
|
|
3639
|
-
if (S)
|
|
3640
|
-
if (i === "block")
|
|
3641
|
-
for (N = h.blockTokens(Et), N.forEach((R) => {
|
|
3642
|
-
R.text && (!R.tokens || R.tokens.length === 0) && (R.tokens = h.inlineTokens(R.text));
|
|
3643
|
-
}); N.length > 0; ) {
|
|
3644
|
-
const R = N[N.length - 1];
|
|
3645
|
-
if (R.type === "paragraph" && (!R.text || R.text.trim() === ""))
|
|
3646
|
-
N.pop();
|
|
3647
|
-
else
|
|
3648
|
-
break;
|
|
3649
|
-
}
|
|
3650
|
-
else
|
|
3651
|
-
N = h.inlineTokens(S);
|
|
3652
|
-
return {
|
|
3653
|
-
type: e,
|
|
3654
|
-
raw: fe,
|
|
3655
|
-
attributes: w,
|
|
3656
|
-
content: S,
|
|
3657
|
-
tokens: N
|
|
3658
|
-
};
|
|
3659
|
-
}
|
|
3660
|
-
}
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
},
|
|
3664
|
-
renderMarkdown: (p, u) => {
|
|
3665
|
-
const h = d(p.attrs || {}), m = o(h), f = m ? ` {${m}}` : "", g = u.renderChildren(p.content || [], `
|
|
3666
|
-
|
|
3667
|
-
`);
|
|
3668
|
-
return `:::${l}${f}
|
|
3669
|
-
|
|
3670
|
-
${g}
|
|
3671
|
-
|
|
3672
|
-
:::`;
|
|
3673
|
-
}
|
|
3674
|
-
};
|
|
3675
|
-
}
|
|
3676
|
-
function _s(t) {
|
|
3677
|
-
if (!t.trim())
|
|
3678
|
-
return {};
|
|
3679
|
-
const e = {}, n = /(\w+)=(?:"([^"]*)"|'([^']*)')/g;
|
|
3680
|
-
let s = n.exec(t);
|
|
3681
|
-
for (; s !== null; ) {
|
|
3682
|
-
const [, r, o, c] = s;
|
|
3683
|
-
e[r] = o || c, s = n.exec(t);
|
|
3684
|
-
}
|
|
3685
|
-
return e;
|
|
3686
|
-
}
|
|
3687
|
-
function qs(t) {
|
|
3688
|
-
return Object.entries(t).filter(([, e]) => e != null).map(([e, n]) => `${e}="${n}"`).join(" ");
|
|
3689
|
-
}
|
|
3690
|
-
function Js(t) {
|
|
3691
|
-
const {
|
|
3692
|
-
nodeName: e,
|
|
3693
|
-
name: n,
|
|
3694
|
-
getContent: s,
|
|
3695
|
-
parseAttributes: r = _s,
|
|
3696
|
-
serializeAttributes: o = qs,
|
|
3697
|
-
defaultAttributes: c = {},
|
|
3698
|
-
selfClosing: i = !1,
|
|
3699
|
-
allowedAttributes: a
|
|
3700
|
-
} = t, l = n || e, d = (u) => {
|
|
3701
|
-
if (!a)
|
|
3702
|
-
return u;
|
|
3703
|
-
const h = {};
|
|
3704
|
-
return a.forEach((m) => {
|
|
3705
|
-
const f = typeof m == "string" ? m : m.name, g = typeof m == "string" ? void 0 : m.skipIfDefault;
|
|
3706
|
-
if (f in u) {
|
|
3707
|
-
const y = u[f];
|
|
3708
|
-
if (g !== void 0 && y === g)
|
|
3709
|
-
return;
|
|
3710
|
-
h[f] = y;
|
|
3711
|
-
}
|
|
3712
|
-
}), h;
|
|
3713
|
-
}, p = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3714
|
-
return {
|
|
3715
|
-
parseMarkdown: (u, h) => {
|
|
3716
|
-
const m = { ...c, ...u.attributes };
|
|
3717
|
-
if (i)
|
|
3718
|
-
return h.createNode(e, m);
|
|
3719
|
-
const f = s ? s(u) : u.content || "";
|
|
3720
|
-
return f ? h.createNode(e, m, [h.createTextNode(f)]) : h.createNode(e, m, []);
|
|
3721
|
-
},
|
|
3722
|
-
markdownTokenizer: {
|
|
3723
|
-
name: e,
|
|
3724
|
-
level: "inline",
|
|
3725
|
-
start(u) {
|
|
3726
|
-
const h = i ? new RegExp(`\\[${p}\\s*[^\\]]*\\]`) : new RegExp(`\\[${p}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${p}\\]`), m = u.match(h), f = m?.index;
|
|
3727
|
-
return f !== void 0 ? f : -1;
|
|
3728
|
-
},
|
|
3729
|
-
tokenize(u, h, m) {
|
|
3730
|
-
const f = i ? new RegExp(`^\\[${p}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${p}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${p}\\]`), g = u.match(f);
|
|
3731
|
-
if (!g)
|
|
3732
|
-
return;
|
|
3733
|
-
let y = "", b = "";
|
|
3734
|
-
if (i) {
|
|
3735
|
-
const [, x] = g;
|
|
3736
|
-
b = x;
|
|
3737
|
-
} else {
|
|
3738
|
-
const [, x, k] = g;
|
|
3739
|
-
b = x, y = k || "";
|
|
3740
|
-
}
|
|
3741
|
-
const w = r(b.trim());
|
|
3742
|
-
return {
|
|
3743
|
-
type: e,
|
|
3744
|
-
raw: g[0],
|
|
3745
|
-
content: y.trim(),
|
|
3746
|
-
attributes: w
|
|
3747
|
-
};
|
|
3748
|
-
}
|
|
3749
|
-
},
|
|
3750
|
-
renderMarkdown: (u) => {
|
|
3751
|
-
let h = "";
|
|
3752
|
-
s ? h = s(u) : u.content && u.content.length > 0 && (h = u.content.filter((y) => y.type === "text").map((y) => y.text).join(""));
|
|
3753
|
-
const m = d(u.attrs || {}), f = o(m), g = f ? ` ${f}` : "";
|
|
3754
|
-
return i ? `[${l}${g}]` : `[${l}${g}]${h}[/${l}]`;
|
|
3755
|
-
}
|
|
3756
|
-
};
|
|
3757
|
-
}
|
|
3758
|
-
function Ys(t, e, n) {
|
|
3759
|
-
var s, r, o, c;
|
|
3760
|
-
const i = t.split(`
|
|
3761
|
-
`), a = [];
|
|
3762
|
-
let l = "", d = 0;
|
|
3763
|
-
const p = e.baseIndentSize || 2;
|
|
3764
|
-
for (; d < i.length; ) {
|
|
3765
|
-
const u = i[d], h = u.match(e.itemPattern);
|
|
3766
|
-
if (!h) {
|
|
3767
|
-
if (a.length > 0)
|
|
3768
|
-
break;
|
|
3769
|
-
if (u.trim() === "") {
|
|
3770
|
-
d += 1, l = `${l}${u}
|
|
3771
|
-
`;
|
|
3772
|
-
continue;
|
|
3773
|
-
} else
|
|
3774
|
-
return;
|
|
3775
|
-
}
|
|
3776
|
-
const m = e.extractItemData(h), { indentLevel: f, mainContent: g } = m;
|
|
3777
|
-
l = `${l}${u}
|
|
3778
|
-
`;
|
|
3779
|
-
const y = [g];
|
|
3780
|
-
for (d += 1; d < i.length; ) {
|
|
3781
|
-
const k = i[d];
|
|
3782
|
-
if (k.trim() === "") {
|
|
3783
|
-
const S = i.slice(d + 1).findIndex((E) => E.trim() !== "");
|
|
3784
|
-
if (S === -1)
|
|
3785
|
-
break;
|
|
3786
|
-
if ((((r = (s = i[d + 1 + S].match(/^(\s*)/)) == null ? void 0 : s[1]) == null ? void 0 : r.length) || 0) > f) {
|
|
3787
|
-
y.push(k), l = `${l}${k}
|
|
3788
|
-
`, d += 1;
|
|
3789
|
-
continue;
|
|
3790
|
-
} else
|
|
3791
|
-
break;
|
|
3792
|
-
}
|
|
3793
|
-
if ((((c = (o = k.match(/^(\s*)/)) == null ? void 0 : o[1]) == null ? void 0 : c.length) || 0) > f)
|
|
3794
|
-
y.push(k), l = `${l}${k}
|
|
3795
|
-
`, d += 1;
|
|
3796
|
-
else
|
|
3797
|
-
break;
|
|
3798
|
-
}
|
|
3799
|
-
let b;
|
|
3800
|
-
const w = y.slice(1);
|
|
3801
|
-
if (w.length > 0) {
|
|
3802
|
-
const k = w.map((S) => S.slice(f + p)).join(`
|
|
3803
|
-
`);
|
|
3804
|
-
k.trim() && (e.customNestedParser ? b = e.customNestedParser(k) : b = n.blockTokens(k));
|
|
3805
|
-
}
|
|
3806
|
-
const x = e.createToken(m, b);
|
|
3807
|
-
a.push(x);
|
|
3808
|
-
}
|
|
3809
|
-
if (a.length !== 0)
|
|
3810
|
-
return {
|
|
3811
|
-
items: a,
|
|
3812
|
-
raw: l
|
|
3813
|
-
};
|
|
3814
|
-
}
|
|
3815
|
-
function Xs(t, e, n, s) {
|
|
3816
|
-
if (!t || !Array.isArray(t.content))
|
|
3817
|
-
return "";
|
|
3818
|
-
const r = typeof n == "function" ? n(s) : n, [o, ...c] = t.content, i = e.renderChildren([o]);
|
|
3819
|
-
let a = `${r}${i}`;
|
|
3820
|
-
return c && c.length > 0 && c.forEach((l, d) => {
|
|
3821
|
-
var p, u;
|
|
3822
|
-
const h = (u = (p = e.renderChild) == null ? void 0 : p.call(e, l, d + 1)) != null ? u : e.renderChildren([l]);
|
|
3823
|
-
if (h != null) {
|
|
3824
|
-
const m = h.split(`
|
|
3825
|
-
`).map((f) => f ? e.indent(f) : e.indent("")).join(`
|
|
3826
|
-
`);
|
|
3827
|
-
a += l.type === "paragraph" ? `
|
|
3828
|
-
|
|
3829
|
-
${m}` : `
|
|
3830
|
-
${m}`;
|
|
3831
|
-
}
|
|
3832
|
-
}), a;
|
|
3833
|
-
}
|
|
3834
|
-
function Zs(t, e, n = {}) {
|
|
3835
|
-
const { state: s } = e, { doc: r, tr: o } = s, c = t;
|
|
3836
|
-
r.descendants((i, a) => {
|
|
3837
|
-
const l = o.mapping.map(a), d = o.mapping.map(a) + i.nodeSize;
|
|
3838
|
-
let p = null;
|
|
3839
|
-
if (i.marks.forEach((h) => {
|
|
3840
|
-
if (h !== c)
|
|
3841
|
-
return !1;
|
|
3842
|
-
p = h;
|
|
3843
|
-
}), !p)
|
|
3844
|
-
return;
|
|
3845
|
-
let u = !1;
|
|
3846
|
-
if (Object.keys(n).forEach((h) => {
|
|
3847
|
-
n[h] !== p.attrs[h] && (u = !0);
|
|
3848
|
-
}), u) {
|
|
3849
|
-
const h = t.type.create({
|
|
3850
|
-
...t.attrs,
|
|
3851
|
-
...n
|
|
3852
|
-
});
|
|
3853
|
-
o.removeMark(l, d, t.type), o.addMark(l, d, h);
|
|
3854
|
-
}
|
|
3855
|
-
}), o.docChanged && e.view.dispatch(o);
|
|
3856
|
-
}
|
|
3857
|
-
var vr = class me extends xt {
|
|
3858
|
-
constructor() {
|
|
3859
|
-
super(...arguments), this.type = "node";
|
|
3860
|
-
}
|
|
3861
|
-
/**
|
|
3862
|
-
* Create a new Node instance
|
|
3863
|
-
* @param config - Node configuration object or a function that returns a configuration object
|
|
3864
|
-
*/
|
|
3865
|
-
static create(e = {}) {
|
|
3866
|
-
const n = typeof e == "function" ? e() : e;
|
|
3867
|
-
return new me(n);
|
|
3868
|
-
}
|
|
3869
|
-
configure(e) {
|
|
3870
|
-
return super.configure(e);
|
|
3871
|
-
}
|
|
3872
|
-
extend(e) {
|
|
3873
|
-
const n = typeof e == "function" ? e() : e;
|
|
3874
|
-
return super.extend(n);
|
|
3875
|
-
}
|
|
3876
|
-
};
|
|
3877
|
-
function br(t) {
|
|
3878
|
-
return new zs({
|
|
3879
|
-
find: t.find,
|
|
3880
|
-
handler: ({ state: e, range: n, match: s, pasteEvent: r }) => {
|
|
3881
|
-
const o = M(t.getAttributes, void 0, s, r);
|
|
3882
|
-
if (o === !1 || o === null)
|
|
3883
|
-
return null;
|
|
3884
|
-
const { tr: c } = e, i = s[s.length - 1], a = s[0];
|
|
3885
|
-
let l = n.to;
|
|
3886
|
-
if (i) {
|
|
3887
|
-
const d = a.search(/\S/), p = n.from + a.indexOf(i), u = p + i.length;
|
|
3888
|
-
if (Zt(n.from, n.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === t.type && m !== h.mark.type)).filter((h) => h.to > p).length)
|
|
3889
|
-
return null;
|
|
3890
|
-
u < n.to && c.delete(u, n.to), p > n.from && c.delete(n.from + d, p), l = n.from + d + i.length, c.addMark(n.from + d, l, t.type.create(o || {})), c.removeStoredMark(t.type);
|
|
3891
|
-
}
|
|
3892
|
-
}
|
|
3893
|
-
});
|
|
3894
|
-
}
|
|
3895
|
-
export {
|
|
3896
|
-
st as CommandManager,
|
|
3897
|
-
ur as Editor,
|
|
3898
|
-
xt as Extendable,
|
|
3899
|
-
O as Extension,
|
|
3900
|
-
it as InputRule,
|
|
3901
|
-
Qt as MappablePosition,
|
|
3902
|
-
Ps as Mark,
|
|
3903
|
-
vr as Node,
|
|
3904
|
-
Hs as NodePos,
|
|
3905
|
-
zs as PasteRule,
|
|
3906
|
-
gr as ResizableNodeView,
|
|
3907
|
-
M as callOrReturn,
|
|
3908
|
-
yr as canInsertNode,
|
|
3909
|
-
Wn as combineTransactionSteps,
|
|
3910
|
-
Ht as commands,
|
|
3911
|
-
Fs as createAtomBlockMarkdownSpec,
|
|
3912
|
-
Ks as createBlockMarkdownSpec,
|
|
3913
|
-
nt as createChainableState,
|
|
3914
|
-
pt as createDocument,
|
|
3915
|
-
Js as createInlineMarkdownSpec,
|
|
3916
|
-
os as createMappablePosition,
|
|
3917
|
-
U as createNodeFromContent,
|
|
3918
|
-
Vs as createStyleTag,
|
|
3919
|
-
Un as defaultBlockAt,
|
|
3920
|
-
At as deleteProps,
|
|
3921
|
-
_ as elementFromString,
|
|
3922
|
-
Bs as extensions,
|
|
3923
|
-
or as findChildrenInRange,
|
|
3924
|
-
Yn as findDuplicates,
|
|
3925
|
-
ot as findParentNode,
|
|
3926
|
-
Fn as findParentNodeClosestToPos,
|
|
3927
|
-
vt as flattenExtensions,
|
|
3928
|
-
Jn as fromString,
|
|
3929
|
-
Qn as getAttributes,
|
|
3930
|
-
qt as getAttributesFromExtensions,
|
|
3931
|
-
es as getChangedRanges,
|
|
3932
|
-
v as getExtensionField,
|
|
3933
|
-
bt as getHTMLFromFragment,
|
|
3934
|
-
Kt as getMarkAttributes,
|
|
3935
|
-
yt as getMarkRange,
|
|
3936
|
-
z as getMarkType,
|
|
3937
|
-
Zt as getMarksBetween,
|
|
3938
|
-
ar as getNodeAtPosition,
|
|
3939
|
-
Zn as getNodeAttributes,
|
|
3940
|
-
T as getNodeType,
|
|
3941
|
-
tt as getRenderedAttributes,
|
|
3942
|
-
ir as getSchema,
|
|
3943
|
-
Jt as getSchemaByResolvedExtensions,
|
|
3944
|
-
L as getSchemaTypeByName,
|
|
3945
|
-
rt as getSchemaTypeNameByName,
|
|
3946
|
-
Z as getSplittedAttributes,
|
|
3947
|
-
Xn as getText,
|
|
3948
|
-
Yt as getTextBetween,
|
|
3949
|
-
ns as getTextContentFromNodes,
|
|
3950
|
-
Xt as getTextSerializersFromSchema,
|
|
3951
|
-
rs as getUpdatedPosition,
|
|
3952
|
-
Pt as injectExtensionAttributesToParseRule,
|
|
3953
|
-
As as inputRulesPlugin,
|
|
3954
|
-
ss as isActive,
|
|
3955
|
-
Ct as isAndroid,
|
|
3956
|
-
cr as isAtEndOfNode,
|
|
3957
|
-
lr as isAtStartOfNode,
|
|
3958
|
-
Kn as isEmptyObject,
|
|
3959
|
-
Nt as isExtensionRulesEnabled,
|
|
3960
|
-
_t as isFunction,
|
|
3961
|
-
It as isList,
|
|
3962
|
-
Ft as isMacOS,
|
|
3963
|
-
ht as isMarkActive,
|
|
3964
|
-
F as isNodeActive,
|
|
3965
|
-
wt as isNodeEmpty,
|
|
3966
|
-
dr as isNodeSelection,
|
|
3967
|
-
Rs as isNumber,
|
|
3968
|
-
J as isPlainObject,
|
|
3969
|
-
gt as isRegExp,
|
|
3970
|
-
pn as isSafari,
|
|
3971
|
-
Vt as isTextSelection,
|
|
3972
|
-
G as isiOS,
|
|
3973
|
-
pr as markInputRule,
|
|
3974
|
-
br as markPasteRule,
|
|
3975
|
-
Us as markdown,
|
|
3976
|
-
qn as mergeAttributes,
|
|
3977
|
-
te as mergeDeep,
|
|
3978
|
-
D as minMax,
|
|
3979
|
-
hr as nodeInputRule,
|
|
3980
|
-
Q as objectIncludes,
|
|
3981
|
-
Mt as parseAttributes,
|
|
3982
|
-
Ys as parseIndentedBlocks,
|
|
3983
|
-
Ds as pasteRulesPlugin,
|
|
3984
|
-
Gn as removeDuplicates,
|
|
3985
|
-
Xs as renderNestedMarkdownContent,
|
|
3986
|
-
kt as resolveExtensions,
|
|
3987
|
-
Wt as resolveFocusPosition,
|
|
3988
|
-
gn as selectionToInsertionEnd,
|
|
3989
|
-
St as serializeAttributes,
|
|
3990
|
-
W as sortExtensions,
|
|
3991
|
-
H as splitExtensions,
|
|
3992
|
-
mr as textblockTypeInputRule,
|
|
3993
|
-
Zs as updateMarkViewAttributes,
|
|
3994
|
-
fr as wrappingInputRule
|
|
3995
|
-
};
|