@ones-editor/editor 0.0.3 → 0.0.4
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/@ones-editor/auto-link/package.json +8 -0
- package/@ones-editor/auto-link/src/index.d.ts +3 -0
- package/@ones-editor/block-locker/src/hook.d.ts +2 -1
- package/@ones-editor/block-locker/src/i18n/en-US.d.ts +8 -0
- package/@ones-editor/block-locker/src/i18n/index.d.ts +1 -0
- package/@ones-editor/block-locker/src/i18n/ja-JP.d.ts +8 -0
- package/@ones-editor/block-locker/src/i18n/zh-CN.d.ts +8 -0
- package/@ones-editor/block-locker/src/index.d.ts +4 -1
- package/@ones-editor/block-locker/src/paste-handler.d.ts +4 -0
- package/@ones-editor/block-menu/src/block-menu/index.d.ts +3 -1
- package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +3 -2
- package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +3 -0
- package/@ones-editor/block-menu/src/block-menu-button/drag-drop/drag-handler.d.ts +5 -4
- package/@ones-editor/block-menu/src/block-menu-button/drag-drop/find-preview-element.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu-button/drag-preview/index.d.ts +2 -2
- package/@ones-editor/block-menu/src/locale/en-us.d.ts +4 -0
- package/@ones-editor/block-menu/src/locale/ja-jp.d.ts +25 -0
- package/@ones-editor/block-menu/src/locale/zh-cn.d.ts +4 -0
- package/@ones-editor/block-resizer/src/index.d.ts +1 -0
- package/@ones-editor/code-block/src/code-block/caption/caption-input-handler.d.ts +2 -2
- package/@ones-editor/code-block/src/code-block/child-container.d.ts +2 -2
- package/@ones-editor/code-block/src/code-block/code-caret.d.ts +7 -0
- package/@ones-editor/code-block/src/code-block/code-copy.d.ts +4 -0
- package/@ones-editor/code-block/src/code-block/create-empty-code.d.ts +2 -2
- package/@ones-editor/code-block/src/code-block/index.d.ts +3 -1
- package/@ones-editor/code-block/src/code-block/settings/index.d.ts +3 -0
- package/@ones-editor/code-block/src/code-block/types.d.ts +3 -0
- package/@ones-editor/code-block/src/icons/copy.d.ts +1 -1
- package/@ones-editor/code-block/src/icons/wrap.d.ts +1 -1
- package/@ones-editor/code-block/src/index.d.ts +2 -0
- package/@ones-editor/code-block/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/code-block/src/locale/ja-jp.d.ts +12 -0
- package/@ones-editor/code-block/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/column-block/package.json +8 -0
- package/@ones-editor/column-block/src/child-containers.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-options.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-properties.d.ts +15 -0
- package/@ones-editor/column-block/src/index.d.ts +4 -0
- package/@ones-editor/column-block/src/types.d.ts +11 -0
- package/@ones-editor/comments/src/actions/add-comment-to-block.d.ts +3 -2
- package/@ones-editor/comments/src/actions/add-comment-to-text-block.d.ts +2 -1
- package/@ones-editor/comments/src/actions/editor-add-comment.d.ts +2 -0
- package/@ones-editor/comments/src/comment-input-handler/paste-handler.d.ts +5 -0
- package/@ones-editor/comments/src/comment-item/comment-item.d.ts +2 -0
- package/@ones-editor/comments/src/comment-item/mobile-comment-item/mobile-comment-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments/comments.d.ts +4 -4
- package/@ones-editor/comments/src/comments-helper/active-comment.d.ts +1 -1
- package/@ones-editor/comments/src/comments-helper/utils.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +3 -11
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-list.d.ts +6 -4
- package/@ones-editor/comments/src/comments-list/mini-comment/group-list.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +1 -4
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/group-list.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +5 -3
- package/@ones-editor/comments/src/index.d.ts +1 -0
- package/@ones-editor/comments/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/comments/src/locale/ja-jp.d.ts +3 -0
- package/@ones-editor/comments/src/locale/zh-cn.d.ts +3 -0
- package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +1 -0
- package/@ones-editor/comments/src/types.d.ts +16 -4
- package/@ones-editor/core/src/core/block-renderers/standard-block-render.d.ts +2 -0
- package/@ones-editor/core/src/core/blocks/block-anchor/create-block-anchor.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/block-dom.d.ts +2 -0
- package/@ones-editor/core/src/core/blocks/common/block-properties.d.ts +7 -1
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +4 -4
- package/@ones-editor/core/src/core/blocks/text-blocks/index.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-markdown.d.ts +3 -0
- package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +3 -0
- package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-text.d.ts +3 -0
- package/@ones-editor/core/src/core/boxes/anchor-box/index.d.ts +3 -0
- package/@ones-editor/core/src/core/boxes/editor-boxes.d.ts +1 -0
- package/@ones-editor/core/src/core/boxes/image-box/index.d.ts +3 -0
- package/@ones-editor/core/src/core/boxes/index.d.ts +3 -1
- package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +3 -2
- package/@ones-editor/core/src/core/composition/clipboard/cut.d.ts +1 -1
- package/@ones-editor/core/src/core/composition/clipboard/paste.d.ts +2 -2
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +6 -1
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -1
- package/@ones-editor/core/src/core/converter/block-to-html.d.ts +2 -2
- package/@ones-editor/core/src/core/converter/block-to-markdown.d.ts +2 -2
- package/@ones-editor/core/src/core/converter/block-to-text.d.ts +2 -2
- package/@ones-editor/core/src/core/data-converter/editor-data-converter.d.ts +4 -2
- package/@ones-editor/core/src/core/doc/doc.d.ts +18 -3
- package/@ones-editor/core/src/core/doc/rich-text/insert-text.d.ts +2 -1
- package/@ones-editor/core/src/core/doc/to-plain-text.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/actions/add-text-attribute.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/auto-insert-block.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/break-text-block.d.ts +2 -0
- package/@ones-editor/core/src/core/editor/actions/delete-block-text.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/focus-to-end.d.ts +0 -1
- package/@ones-editor/core/src/core/editor/actions/insert-block.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/insert-text.d.ts +3 -2
- package/@ones-editor/core/src/core/editor/actions/is-writable.d.ts +1 -1
- package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +2 -2
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +10 -4
- package/@ones-editor/core/src/core/index.d.ts +1 -0
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +5 -1
- package/@ones-editor/core/src/core/input-handler/remove-quoted.d.ts +2 -0
- package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -2
- package/@ones-editor/core/src/core/selection/actions/select-all.d.ts +3 -1
- package/@ones-editor/core/src/core/selection/actions/select-block.d.ts +2 -0
- package/@ones-editor/core/src/core/selection/actions/word-offset.d.ts +1 -1
- package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -2
- package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/range/simple-range.d.ts +2 -1
- package/@ones-editor/core/src/core/selection/select-handler.d.ts +5 -1
- package/@ones-editor/core/src/core/settings/index.d.ts +3 -3
- package/@ones-editor/core/src/core/types.d.ts +69 -28
- package/@ones-editor/core/src/core/undo-manager/actions/action.d.ts +4 -1
- package/@ones-editor/core/src/helper/block-helper.d.ts +1 -1
- package/@ones-editor/core/src/helper/find-block.d.ts +3 -0
- package/@ones-editor/core/src/helper/index.d.ts +1 -0
- package/@ones-editor/core/src/i18n/en-us.d.ts +3 -0
- package/@ones-editor/core/src/i18n/i18n.d.ts +63 -1
- package/@ones-editor/core/src/i18n/ja-jp.d.ts +20 -0
- package/@ones-editor/core/src/i18n/zh-cn.d.ts +3 -0
- package/@ones-editor/core/src/local-doc/index.d.ts +11 -3
- package/@ones-editor/core/src/utils/abbreviation.d.ts +27 -0
- package/@ones-editor/core/src/utils/client.d.ts +1 -0
- package/@ones-editor/core/src/utils/dom-scroll.d.ts +3 -1
- package/@ones-editor/core/src/utils/dom.d.ts +3 -0
- package/@ones-editor/core/src/utils/file.d.ts +3 -0
- package/@ones-editor/core/src/utils/index.d.ts +2 -0
- package/@ones-editor/core/src/utils/logger/index.d.ts +9 -0
- package/@ones-editor/core/src/utils/overflow-text.d.ts +1 -0
- package/@ones-editor/details-block/package.json +8 -0
- package/@ones-editor/details-block/src/auto-expand.d.ts +7 -0
- package/@ones-editor/details-block/src/create-empty-details.d.ts +8 -0
- package/@ones-editor/details-block/src/details-dom.d.ts +3 -0
- package/@ones-editor/details-block/src/details-object.d.ts +11 -0
- package/@ones-editor/details-block/src/details-options.d.ts +2 -0
- package/@ones-editor/details-block/src/index.d.ts +4 -0
- package/@ones-editor/details-block/src/types.d.ts +5 -0
- package/@ones-editor/details-block/src/update-expand.d.ts +3 -0
- package/@ones-editor/dividing-line-embed/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/dividing-line-embed/src/i18n/ja-jp.d.ts +7 -0
- package/@ones-editor/dividing-line-embed/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/drawio-embed.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/helper/index.d.ts +16 -10
- package/@ones-editor/drawio-embed/src/lang/en-us.d.ts +9 -4
- package/@ones-editor/drawio-embed/src/lang/index.d.ts +1 -1
- package/@ones-editor/drawio-embed/src/lang/ja-jp.d.ts +12 -0
- package/@ones-editor/drawio-embed/src/lang/zh-cn.d.ts +9 -4
- package/@ones-editor/drawio-embed/types/index.d.ts +4 -4
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
- package/@ones-editor/drop-target/src/drop-target.d.ts +3 -1
- package/@ones-editor/drop-target/src/handlers/drag-file.d.ts +7 -0
- package/@ones-editor/drop-target/src/handlers/patch-insert-file.d.ts +2 -0
- package/@ones-editor/drop-target/src/index.d.ts +2 -1
- package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +3 -1
- package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +14 -0
- package/@ones-editor/embed-block-helper/src/index.d.ts +2 -0
- package/@ones-editor/embed-block-helper/src/locale/en-us.d.ts +7 -0
- package/@ones-editor/embed-block-helper/src/locale/index.d.ts +1 -0
- package/@ones-editor/embed-block-helper/src/locale/ja-jp.d.ts +7 -0
- package/@ones-editor/embed-block-helper/src/locale/zh-cn.d.ts +7 -0
- package/@ones-editor/excalidraw/package.json +11 -0
- package/@ones-editor/excalidraw/src/excalidraw/block-properties.d.ts +2 -0
- package/@ones-editor/excalidraw/src/excalidraw/editor.d.ts +2 -0
- package/@ones-editor/excalidraw/src/index.d.ts +4 -0
- package/@ones-editor/excalidraw/src/types.d.ts +9 -0
- package/@ones-editor/excalidraw/src/utils/excalidraw-data.d.ts +4 -0
- package/@ones-editor/exclusive-block/package.json +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block-hook.d.ts +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block.d.ts +22 -0
- package/@ones-editor/exclusive-block/src/exclusive-dom.d.ts +5 -0
- package/@ones-editor/exclusive-block/src/handle-remote-exclusive-message.d.ts +3 -0
- package/@ones-editor/exclusive-block/src/index.d.ts +7 -0
- package/@ones-editor/exclusive-block/src/locale/en-us.d.ts +7 -0
- package/@ones-editor/exclusive-block/src/locale/index.d.ts +1 -0
- package/@ones-editor/exclusive-block/src/locale/ja-jp.d.ts +7 -0
- package/@ones-editor/exclusive-block/src/locale/zh-cn.d.ts +7 -0
- package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
- package/@ones-editor/file/package.json +8 -0
- package/@ones-editor/file/src/file-box/index.d.ts +4 -0
- package/@ones-editor/file/src/file-embed/card/file-icon.d.ts +1 -0
- package/@ones-editor/file/src/file-embed/card/index.d.ts +6 -0
- package/@ones-editor/file/src/file-embed/download-file.d.ts +2 -0
- package/@ones-editor/file/src/file-embed/index.d.ts +4 -0
- package/@ones-editor/file/src/index.d.ts +5 -0
- package/@ones-editor/file/src/locale/en-us.d.ts +12 -0
- package/@ones-editor/file/src/locale/index.d.ts +1 -0
- package/@ones-editor/file/src/locale/ja-jp.d.ts +12 -0
- package/@ones-editor/file/src/locale/zh-cn.d.ts +12 -0
- package/@ones-editor/file/src/types.d.ts +24 -0
- package/@ones-editor/find-dialog/src/doc/doc-handler.d.ts +15 -0
- package/@ones-editor/find-dialog/src/find-dialog.d.ts +4 -1
- package/@ones-editor/find-dialog/src/highlights/highligh-text.d.ts +3 -0
- package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +1 -0
- package/@ones-editor/find-dialog/src/locale/ja-jp.d.ts +13 -0
- package/@ones-editor/graph-embed/assets/index.d.ts +2 -0
- package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +9 -3
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -3
- package/@ones-editor/graph-embed/src/lang/en-us.d.ts +10 -5
- package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +13 -0
- package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +6 -3
- package/@ones-editor/heading-collapse/src/heading-collapse-button/drop-handler.d.ts +1 -1
- package/@ones-editor/heading-collapse/src/index.d.ts +1 -0
- package/@ones-editor/heading-collapse/src/locale/en-us.d.ts +7 -0
- package/@ones-editor/heading-collapse/src/locale/index.d.ts +1 -0
- package/@ones-editor/heading-collapse/src/locale/ja-jp.d.ts +7 -0
- package/@ones-editor/heading-collapse/src/locale/zh-cn.d.ts +7 -0
- package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/code.d.ts +1 -0
- package/@ones-editor/image-embed/package.json +2 -1
- package/@ones-editor/image-embed/src/copy-handler.d.ts +8 -0
- package/@ones-editor/image-embed/src/drag-drop/drag-handler.d.ts +9 -2
- package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +5 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +1 -1
- package/@ones-editor/image-embed/src/empty-image-converter.d.ts +5 -0
- package/@ones-editor/image-embed/src/image-data.d.ts +6 -4
- package/@ones-editor/image-embed/src/image-file.d.ts +4 -0
- package/@ones-editor/image-embed/src/image-object.d.ts +5 -1
- package/@ones-editor/image-embed/src/image-resizer.d.ts +3 -0
- package/@ones-editor/image-embed/src/index.d.ts +5 -2
- package/@ones-editor/image-embed/src/locale/en-us.d.ts +2 -1
- package/@ones-editor/image-embed/src/locale/ja-jp.d.ts +17 -0
- package/@ones-editor/image-embed/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/image-embed/src/paste-handler.d.ts +7 -0
- package/@ones-editor/image-embed/src/shortcuts/copy-image.d.ts +2 -0
- package/@ones-editor/image-embed/src/shortcuts/image-clipboard-data.d.ts +7 -0
- package/@ones-editor/image-embed/src/shortcuts/index.d.ts +3 -2
- package/@ones-editor/image-embed/src/types.d.ts +9 -2
- package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +11 -0
- package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/input-handlers/src/index.d.ts +2 -2
- package/@ones-editor/input-handlers/src/markdown-shortcuts/index.d.ts +2 -1
- package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-convert.d.ts +1 -0
- package/@ones-editor/input-handlers/src/markdown-shortcuts/table-converter.d.ts +2 -0
- package/@ones-editor/list-block/src/converter/convert-list-to.d.ts +2 -0
- package/@ones-editor/list-block/src/converter/convert-to-list.d.ts +14 -0
- package/@ones-editor/list-block/src/converter/index.d.ts +2 -14
- package/@ones-editor/list-block/src/drop/index.d.ts +1 -1
- package/@ones-editor/list-block/src/index.d.ts +7 -3
- package/@ones-editor/list-block/src/keyboard/shortcut.d.ts +3 -0
- package/@ones-editor/list-block/src/lang/ja-jp.d.ts +21 -0
- package/@ones-editor/list-block/src/level/change-multi-levels.d.ts +2 -0
- package/@ones-editor/list-block/src/level/decrease-level.d.ts +1 -0
- package/@ones-editor/list-block/src/marker/customize-start-dialog.d.ts +1 -0
- package/@ones-editor/list-block/src/mindmap/index.d.ts +1 -1
- package/@ones-editor/list-block/src/mindmap/to-mindmap/close-mindmap.d.ts +1 -0
- package/@ones-editor/list-block/src/mindmap/to-mindmap/index.d.ts +3 -1
- package/@ones-editor/list-block/src/start/fix-start-by-list.d.ts +9 -0
- package/@ones-editor/list-block/src/types.d.ts +2 -1
- package/@ones-editor/list-block/src/utils/list-brother.d.ts +5 -1
- package/@ones-editor/list-block/src/utils/list-parent.d.ts +1 -0
- package/@ones-editor/markdown-to-doc/src/markdown-to-doc.d.ts +1 -0
- package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/latex.d.ts +4 -0
- package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/paragraph.d.ts +1 -0
- package/@ones-editor/mathjax/package.json +3 -0
- package/@ones-editor/mathjax/src/index.d.ts +2 -1
- package/@ones-editor/mathjax/src/locale/ja-jp.d.ts +7 -0
- package/@ones-editor/mathjax/src/mathjax-box/convert-mathjax.d.ts +5 -0
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +18 -2
- package/@ones-editor/media-embed/src/core/media-embed.d.ts +4 -2
- package/@ones-editor/media-embed/src/core/media.d.ts +10 -4
- package/@ones-editor/media-embed/src/core/video-resizer.d.ts +1 -0
- package/@ones-editor/media-embed/src/locale/ja-jp.d.ts +19 -0
- package/@ones-editor/media-embed/src/utils/file.d.ts +1 -2
- package/@ones-editor/mention/src/block-mention.d.ts +1 -1
- package/@ones-editor/mention/src/dom/mention-button.d.ts +1 -1
- package/@ones-editor/mention/src/index.d.ts +1 -0
- package/@ones-editor/mention/src/locale/en-us.d.ts +6 -0
- package/@ones-editor/mention/src/locale/index.d.ts +1 -0
- package/@ones-editor/mention/src/locale/ja-jp.d.ts +6 -0
- package/@ones-editor/mention/src/locale/zh-cn.d.ts +6 -0
- package/@ones-editor/mention/src/mention.d.ts +2 -9
- package/@ones-editor/mention/src/types.d.ts +12 -1
- package/@ones-editor/misc/src/index.d.ts +2 -1
- package/@ones-editor/misc/src/is-secure-env.d.ts +1 -0
- package/@ones-editor/mobile-helper/package.json +9 -0
- package/@ones-editor/mobile-helper/src/index.d.ts +11 -0
- package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
- package/@ones-editor/paste-handler/src/text-data-converter.d.ts +2 -2
- package/@ones-editor/paste-special/src/index.d.ts +1 -0
- package/@ones-editor/paste-special/src/locale/en-us.d.ts +8 -0
- package/@ones-editor/paste-special/src/locale/index.d.ts +1 -0
- package/@ones-editor/paste-special/src/locale/ja-jp.d.ts +8 -0
- package/@ones-editor/paste-special/src/locale/zh-cn.d.ts +8 -0
- package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
- package/@ones-editor/scroll-container/src/dom-utils.d.ts +8 -0
- package/@ones-editor/scroll-container/src/index.d.ts +8 -18
- package/@ones-editor/scroll-container/src/observer/container-resize-observer.d.ts +2 -1
- package/@ones-editor/scroll-container/src/observer/locating-resize-observer.d.ts +13 -0
- package/@ones-editor/scroll-container/src/scroll-listener.d.ts +3 -0
- package/@ones-editor/scroll-container/src/types.d.ts +3 -1
- package/@ones-editor/scroll-container/src/utils.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +3 -3
- package/@ones-editor/sharedb-doc/src/doc/comments.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/op-parser/parse-handler.d.ts +25 -0
- package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +5 -4
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +14 -4
- package/@ones-editor/sharedb-doc/src/index.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/types.d.ts +3 -2
- package/@ones-editor/table-block/src/constant/index.d.ts +1 -0
- package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/ja-jp.d.ts +27 -0
- package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar-handler.d.ts +14 -1
- package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar-scroll.d.ts +2 -0
- package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar.d.ts +2 -1
- package/@ones-editor/table-block/src/table-block/border-bar/table-row-column-toolbar.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/convert-table-to.d.ts +2 -0
- package/@ones-editor/table-block/src/table-block/doc-change-handler.d.ts +2 -0
- package/@ones-editor/table-block/src/table-block/doc-table-data.d.ts +2 -2
- package/@ones-editor/table-block/src/table-block/selection-range.d.ts +2 -1
- package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
- package/@ones-editor/table-block/src/table-block/table-dom.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/table-resize/resize-gripper.d.ts +1 -1
- package/@ones-editor/table-block/src/table-block/table-scroll-events.d.ts +2 -0
- package/@ones-editor/table-block/src/types.d.ts +5 -0
- package/@ones-editor/tabs-block/package.json +8 -0
- package/@ones-editor/tabs-block/src/active-tab.d.ts +2 -0
- package/@ones-editor/tabs-block/src/create-empty-tabs.d.ts +8 -0
- package/@ones-editor/tabs-block/src/index.d.ts +4 -0
- package/@ones-editor/tabs-block/src/tabs-dom.d.ts +4 -0
- package/@ones-editor/tabs-block/src/tabs-object.d.ts +14 -0
- package/@ones-editor/tabs-block/src/tabs-options.d.ts +2 -0
- package/@ones-editor/tabs-block/src/types.d.ts +8 -0
- package/@ones-editor/templates/package.json +9 -0
- package/@ones-editor/templates/src/index.d.ts +4 -0
- package/@ones-editor/templates/src/locale/en-us.d.ts +9 -0
- package/@ones-editor/templates/src/locale/index.d.ts +1 -0
- package/@ones-editor/templates/src/locale/ja-jp.d.ts +9 -0
- package/@ones-editor/templates/src/locale/zh-cn.d.ts +9 -0
- package/@ones-editor/templates/src/templates/select-template.d.ts +7 -0
- package/@ones-editor/templates/src/templates/types.d.ts +14 -0
- package/@ones-editor/text-commands/src/index.d.ts +2 -1
- package/@ones-editor/text-commands/src/locale/en-us.d.ts +1 -14
- package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +13 -0
- package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -14
- package/@ones-editor/text-commands/src/shortcut-handler.d.ts +2 -0
- package/@ones-editor/text-commands/src/text-command-provider.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -1
- package/@ones-editor/toc/src/build-toc.d.ts +4 -2
- package/@ones-editor/toc/src/heading-scroll/index.d.ts +22 -0
- package/@ones-editor/toc/src/heading-scroll/utils.d.ts +7 -0
- package/@ones-editor/toc/src/index.d.ts +3 -0
- package/@ones-editor/toc/src/locale/en-us.d.ts +6 -0
- package/@ones-editor/toc/src/locale/index.d.ts +1 -0
- package/@ones-editor/toc/src/locale/ja-jp.d.ts +6 -0
- package/@ones-editor/toc/src/locale/zh-cn.d.ts +6 -0
- package/@ones-editor/toc/src/toc-provider.d.ts +2 -1
- package/@ones-editor/toc/src/types.d.ts +3 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +7 -3
- package/@ones-editor/ui/src/locale/en-us.d.ts +12 -20
- package/@ones-editor/ui/src/locale/ja-jp.d.ts +43 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +4 -12
- package/@ones-editor/ui/src/quick-menu/basic-commands.d.ts +5 -0
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +13 -12
- package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -6
- package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -14
- package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +4 -2
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +4 -1
- package/@ones-editor/ui/src/quick-menu/types.d.ts +24 -1
- package/@ones-editor/ui/src/toolbar/box-only.d.ts +2 -0
- package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +1 -0
- package/@ones-editor/ui/src/toolbar/helper.d.ts +1 -1
- package/@ones-editor/ui/src/toolbar/object-commands.d.ts +5 -1
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +3 -1
- package/@ones-editor/ui/src/tooltips/index.d.ts +6 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +24 -13
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +12 -2
- package/@ones-editor/ui-base/src/auto-suggest/editor-auto-suggest-menu.d.ts +12 -0
- package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/auto-suggest/should-focus-to-editor.d.ts +2 -0
- package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +9 -3
- package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +12 -0
- package/@ones-editor/ui-base/src/command-bar/index.d.ts +2 -1
- package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +6 -0
- package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +2 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +13 -2
- package/@ones-editor/ui-base/src/components/button.d.ts +1 -1
- package/@ones-editor/ui-base/src/components/checkbox.d.ts +3 -0
- package/@ones-editor/ui-base/src/components/index.d.ts +2 -0
- package/@ones-editor/ui-base/src/components/loading.d.ts +2 -0
- package/@ones-editor/ui-base/src/dialog/index.d.ts +1 -0
- package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
- package/@ones-editor/ui-base/src/dialog/types.d.ts +4 -0
- package/@ones-editor/ui-base/src/dropdown/index.d.ts +44 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +7 -1
- package/@ones-editor/ui-base/src/index.d.ts +2 -0
- package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
- package/@ones-editor/ui-base/src/item-shortcuts/index.d.ts +1 -0
- package/@ones-editor/ui-base/src/list/drop-down-filterable-list.d.ts +2 -2
- package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +12 -0
- package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +6 -5
- package/@ones-editor/versions/src/index.d.ts +1 -1
- package/@ones-editor/versions/src/locale/en-us.d.ts +29 -0
- package/@ones-editor/versions/src/locale/ja-jp.d.ts +44 -0
- package/@ones-editor/versions/src/locale/zh-cn.d.ts +29 -0
- package/@ones-editor/versions/src/types.d.ts +8 -8
- package/@ones-editor/versions/src/utils/index.d.ts +2 -2
- package/@ones-editor/versions/src/version-dialog/index.d.ts +26 -2
- package/@ones-editor/versions/src/version-dialog/play-history.d.ts +1 -2
- package/@ones-editor/versions/src/version-dialog/size-limit-textarea.d.ts +23 -0
- package/@ones-editor/versions/src/version-dialog/version-helper.d.ts +3 -0
- package/@ones-editor/versions/src/version-dialog/version-info-header.d.ts +13 -0
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +23 -9
- package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +27 -0
- package/@ones-editor/webpage-embed/src/locale/en-us.d.ts +6 -0
- package/@ones-editor/webpage-embed/src/locale/ja-jp.d.ts +27 -0
- package/@ones-editor/webpage-embed/src/locale/zh-cn.d.ts +6 -0
- package/@ones-editor/webpage-embed/src/types.d.ts +3 -0
- package/@ones-editor/webpage-embed/src/ui/dialog.d.ts +2 -2
- package/@ones-editor/webpage-embed/src/webpage-embed/webpage-items.d.ts +2 -14
- package/dist/comments/create-comment-editor.d.ts +4 -7
- package/dist/comments/local-doc-comments-provider.d.ts +19 -0
- package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +4 -6
- package/dist/index.d.ts +24 -4
- package/dist/index.js +483 -374
- package/dist/lang/en-us.d.ts +19 -0
- package/dist/lang/index.d.ts +1 -0
- package/dist/lang/ja-jp.d.ts +19 -0
- package/dist/lang/zh-cn.d.ts +19 -0
- package/dist/standard-components.d.ts +3 -0
- package/dist/types.d.ts +45 -5
- package/dist/versions/versions-provider.d.ts +1 -1
- package/package.json +7 -1
- package/@ones-editor/block-menu/src/icons/index.d.ts +0 -4
- package/@ones-editor/graph-embed/src/lang/utils.d.ts +0 -3
- package/@ones-editor/list-block/src/command/covert-to-list.d.ts +0 -3
- package/@ones-editor/versions/src/version-dialog/actions-buttons.d.ts +0 -17
- /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
|
@@ -11,15 +11,12 @@ export declare class MiniCommentsList extends TypedEmitter<MiniCommentsListEvent
|
|
|
11
11
|
private commentsProvider;
|
|
12
12
|
list: MiniGroupList;
|
|
13
13
|
root: HTMLElement;
|
|
14
|
-
|
|
15
|
-
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
|
|
14
|
+
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
|
|
16
15
|
onCreateComment(commentId: string, local: boolean): void;
|
|
17
16
|
onDeleteComment(commentId: string, local: boolean): void;
|
|
18
17
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
19
|
-
private createHeader;
|
|
20
18
|
private createList;
|
|
21
19
|
private handleListContainerClick;
|
|
22
|
-
private closeMiniComment;
|
|
23
20
|
show(): void;
|
|
24
21
|
hide(): void;
|
|
25
22
|
destroy(): void;
|
|
@@ -9,6 +9,7 @@ interface MobileCommentGroupListEvents {
|
|
|
9
9
|
export declare class MobileGroupList extends ListBase<CommentWithChildren, MobileGroupItem, unknown, MobileCommentGroupListEvents> {
|
|
10
10
|
private scroller;
|
|
11
11
|
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement, scrollElement: HTMLElement);
|
|
12
|
+
refreshScroller: () => void;
|
|
12
13
|
createItem(data: CommentWithChildren): MobileGroupItem;
|
|
13
14
|
insertItem(data: CommentWithChildren): MobileGroupItem | null;
|
|
14
15
|
deleteItem: (commonId: CommentWithChildren['id']) => boolean;
|
package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
3
3
|
import type { OnesEditorCommentsEvents, OnesEditorCommentsProvider } from '../../types';
|
|
4
|
+
import { MobileGroupList } from './group-list';
|
|
4
5
|
interface MobileCommentsListEvents {
|
|
5
6
|
onCommentListClose: () => void;
|
|
6
7
|
}
|
|
7
8
|
export declare class MobileCommentsList extends TypedEmitter<MobileCommentsListEvents> implements OnesEditorCommentsEvents {
|
|
8
9
|
private editor;
|
|
9
10
|
private commentsProvider;
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
root: HTMLDivElement;
|
|
12
|
+
list: MobileGroupList;
|
|
12
13
|
private mask;
|
|
13
14
|
private pullInfoContainer;
|
|
14
|
-
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider
|
|
15
|
+
constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider);
|
|
15
16
|
onCreateComment(commentId: string, local: boolean): void;
|
|
16
17
|
onDeleteComment(commentId: string, local: boolean): void;
|
|
17
18
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
19
|
+
private get commentOptions();
|
|
18
20
|
private handleRootClick;
|
|
19
21
|
private createPullInfo;
|
|
20
22
|
private showPullInfo;
|
|
@@ -8,3 +8,4 @@ export { OnesEditorComments };
|
|
|
8
8
|
export type { CommentItem } from './comment-item';
|
|
9
9
|
export type { CommentGroupItem } from './comments-list/group-item';
|
|
10
10
|
export { removeCommentFromBlock } from './actions/remove-comment-from-block';
|
|
11
|
+
export { editorAddComment } from './actions/editor-add-comment';
|
|
@@ -7,5 +7,6 @@ export default class CommentsCommandProvider implements OnesEditorCommandProvide
|
|
|
7
7
|
id: string;
|
|
8
8
|
constructor(provider: OnesEditorCommentsProvider, editorComments: OnesEditorComments);
|
|
9
9
|
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): BlockCommandItem[];
|
|
10
|
+
hideToolbar(editor: OnesEditor): void;
|
|
10
11
|
executeRangeCommand(editor: OnesEditor, range: SelectionRange, command: BlockCommandItemWithSource, params: CommandParams, result: CommandResult): boolean;
|
|
11
12
|
}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { DocObject, LocalDoc, OnesEditor, OnesEditorComment } from '../../../@ones-editor/core';
|
|
2
|
-
import { AuthMessage } from '../../../@ones-editor/sharedb-doc';
|
|
3
2
|
export type CommentData = {
|
|
4
3
|
[p in string]: unknown;
|
|
5
4
|
};
|
|
5
|
+
export interface OnesEditorCommentController {
|
|
6
|
+
showCommentList: () => void;
|
|
7
|
+
}
|
|
8
|
+
export type CommentRoot = {
|
|
9
|
+
container?: HTMLElement;
|
|
10
|
+
miniContainer?: HTMLElement;
|
|
11
|
+
mobileContainer?: HTMLElement;
|
|
12
|
+
};
|
|
6
13
|
export interface OnesEditorCommentOptions {
|
|
7
|
-
|
|
14
|
+
controller: OnesEditorCommentController;
|
|
8
15
|
disableReply?: boolean;
|
|
9
16
|
disableEdit?: boolean;
|
|
10
|
-
onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
|
|
11
17
|
pullThreshold?: number;
|
|
18
|
+
onUpdateLayout?: (editor: OnesEditor, data: CommentData) => void;
|
|
19
|
+
onCommentCountChange?: (count: number) => void;
|
|
20
|
+
onCommentEditorClick?: (editor: OnesEditor, event: MouseEvent) => void;
|
|
21
|
+
componentsOptions?: {
|
|
22
|
+
[index: string]: unknown;
|
|
23
|
+
};
|
|
12
24
|
}
|
|
13
25
|
export interface OnesEditorCommentsEvents {
|
|
14
26
|
onCreateComment: (commentId: string, local: boolean) => void;
|
|
@@ -16,7 +28,6 @@ export interface OnesEditorCommentsEvents {
|
|
|
16
28
|
onUpdateComment: (commentId: string, local: boolean) => void;
|
|
17
29
|
}
|
|
18
30
|
export interface OnesEditorCommentsProvider {
|
|
19
|
-
getAuth: () => AuthMessage;
|
|
20
31
|
getComments: () => OnesEditorComment[];
|
|
21
32
|
getComment: (id: string) => OnesEditorComment;
|
|
22
33
|
getCommentDoc: (commentId: string) => DocObject;
|
|
@@ -26,6 +37,7 @@ export interface OnesEditorCommentsProvider {
|
|
|
26
37
|
addListener: (callback: OnesEditorCommentsEvents) => void;
|
|
27
38
|
removeListener: (callback: OnesEditorCommentsEvents) => void;
|
|
28
39
|
createCommentEditor: (parent: HTMLElement, doc: LocalDoc) => OnesEditor;
|
|
40
|
+
allowEdit: (comment: OnesEditorComment) => boolean;
|
|
29
41
|
}
|
|
30
42
|
export interface CommentWithChildren extends OnesEditorComment {
|
|
31
43
|
children: OnesEditorComment[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import AttributeMap from 'quill-delta/dist/AttributeMap';
|
|
2
2
|
import { DocBlock } from '../doc';
|
|
3
3
|
import { BlockElement, BlockPath, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../types';
|
|
4
|
+
export type CSSCustomProperties = Record<`--${string}`, string>;
|
|
5
|
+
export type CSSStyles = Partial<CSSStyleDeclaration> & CSSCustomProperties;
|
|
4
6
|
export declare class StandardBlockRenderer implements OnesEditorBlockRenderer {
|
|
5
7
|
renderText(editor: OnesEditor, path: BlockPath, attributes: AttributeMap): OnesEditorBlockRenderResult;
|
|
6
8
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../types';
|
|
2
2
|
import './anchor.scss';
|
|
3
3
|
export declare function createBlockAnchor(editor: OnesEditor, block: BlockElement, id: string, refClientRect?: DOMRect): HTMLElement;
|
|
4
|
+
export declare function createBlockCaretAnchor(editor: OnesEditor, block: BlockElement, offset: number, id: string): HTMLElement;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { DocBlock, DocBox } from '../../doc';
|
|
2
2
|
import { BlockBackgroundElement, BlockContentElement, BlockElement, BlockPath, BlockToolsElement, BoxContentElement, BoxElement, ContainerElement, InsertionContentElement, InsertionElement, OnesEditor } from '../../types';
|
|
3
3
|
export declare function isBlock(node: Node): node is BlockElement;
|
|
4
|
+
export declare function isBlockTools(node: Node): boolean;
|
|
4
5
|
export declare function hideBlock(block: BlockElement): void;
|
|
5
6
|
export declare function showBlock(block: BlockElement): void;
|
|
6
7
|
export declare function isVisibleBlock(block: BlockElement): boolean;
|
|
7
8
|
export declare function getBlockId(block: BlockElement): string;
|
|
8
9
|
export declare function getBlockType(block: BlockElement): string;
|
|
9
10
|
export declare function getParentBlock(node: Node): BlockElement | null;
|
|
11
|
+
export declare function getParentBlockExcludeSelf(node: Node): BlockElement | null;
|
|
10
12
|
export declare function getParentContainer(block: BlockElement): ContainerElement;
|
|
11
13
|
export declare function getBlockContent(block: BlockElement): BlockContentElement;
|
|
12
14
|
export declare function getBlockTools(block: BlockElement): BlockToolsElement;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { BlockCommands, BlockElement, OnesEditor } from '../../types';
|
|
2
2
|
export declare function getBlockProperties(editor: OnesEditor, block: BlockElement): import("../../types").BlockProperties | undefined;
|
|
3
3
|
export declare function getBlockCommandsWithHook(editor: OnesEditor, block: BlockElement): Record<string, BlockCommands>;
|
|
4
|
-
export declare function getSpecialBlockCommands(editor: OnesEditor,
|
|
4
|
+
export declare function getSpecialBlockCommands(editor: OnesEditor, blockElement: BlockElement, group: string): {
|
|
5
|
+
element: import("../../types").BlockContentElement;
|
|
6
|
+
commands: import("../../types").CommandItem[];
|
|
7
|
+
} | {
|
|
8
|
+
element: null;
|
|
9
|
+
commands: never[];
|
|
10
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlockPosition } from '../../types';
|
|
2
|
-
export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement): ContainerElement[];
|
|
1
|
+
import { OnesEditor, BlockElement, BlockPosition, ContainerElement, ComplexBlockPosition, GetChildContainerOptions } from '../../types';
|
|
2
|
+
export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
|
|
3
3
|
export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
|
|
4
4
|
export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
|
|
5
|
-
export declare function complexBlockGeFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement): BlockElement | null;
|
|
6
|
-
export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement): BlockElement | null;
|
|
5
|
+
export declare function complexBlockGeFirstSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
6
|
+
export declare function complexBlockGetLastSimpleChild(editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions): BlockElement | null;
|
|
7
7
|
export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEditor, childContainer: ContainerElement): BlockElement | null;
|
|
8
8
|
export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
9
9
|
export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import TextBox from './text-box';
|
|
2
2
|
import BrBox from './br-box';
|
|
3
3
|
import EditorBoxes from './editor-boxes';
|
|
4
|
-
|
|
4
|
+
import ImageBox from './image-box';
|
|
5
|
+
import AnchorBox from './anchor-box';
|
|
6
|
+
export { EditorBoxes, TextBox, BrBox, ImageBox, AnchorBox };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DocObject } from '../../doc';
|
|
2
2
|
import { BlockElement, OnesEditor } from '../../types';
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function injectDocToHtmlFragment(htmlFragment: string, doc: DocObject): string;
|
|
4
4
|
export declare function addMetaToDoc(editor: OnesEditor, doc: DocObject): void;
|
|
5
|
-
export
|
|
5
|
+
export type BeforeCopyCallback = (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
|
|
6
|
+
export declare function editorCopy(editor: OnesEditor, event: ClipboardEvent, beforeCopy?: BeforeCopyCallback): void;
|
|
6
7
|
export declare function editorCopyWithoutEvent(editor: OnesEditor): void;
|
|
7
8
|
export declare function editorCopyBlock(editor: OnesEditor, block: BlockElement): Promise<boolean>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OnesEditor } from '../../types';
|
|
2
|
-
export declare function editorCut(editor: OnesEditor): boolean;
|
|
2
|
+
export declare function editorCut(editor: OnesEditor, event: ClipboardEvent): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorDocs } from '../../types';
|
|
1
|
+
import { CloneBlockResultInfo, OnesEditor, OnesEditorDocs } from '../../types';
|
|
2
2
|
import { DocObject } from '../../doc';
|
|
3
|
-
export declare function editorInsertDocWithResources(editor: OnesEditor, doc: DocObject): Promise<void>;
|
|
3
|
+
export declare function editorInsertDocWithResources(editor: OnesEditor, doc: DocObject, cloneDocResult?: CloneBlockResultInfo): Promise<void>;
|
|
4
4
|
export declare function getDocFromDocs(docs: OnesEditorDocs): DocObject | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditorInput, OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType } from '../types';
|
|
1
|
+
import { OnesEditorInput, OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
|
|
2
2
|
import { DocObject } from '../doc';
|
|
3
3
|
export interface EditorInputCallbacks {
|
|
4
4
|
onInsertText: (event: Event, text: string) => void;
|
|
@@ -10,6 +10,9 @@ export interface EditorInputCallbacks {
|
|
|
10
10
|
onFocus: () => void;
|
|
11
11
|
onBlur: () => void;
|
|
12
12
|
onPaste: (event: ClipboardEvent) => void;
|
|
13
|
+
onPasteText: (text: string, options?: PasteOptions) => void;
|
|
14
|
+
onCopy: (event: ClipboardEvent) => void;
|
|
15
|
+
onCut: (event: ClipboardEvent) => void;
|
|
13
16
|
addHandler: (handler: OnesEditorInputHandler) => void;
|
|
14
17
|
removeHandler: (handler: OnesEditorInputHandler) => void;
|
|
15
18
|
defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
|
|
@@ -26,6 +29,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
26
29
|
destroy(): void;
|
|
27
30
|
getInput(): HTMLInputElement;
|
|
28
31
|
focus(): void;
|
|
32
|
+
handleDocumentClick: (event: MouseEvent) => void;
|
|
29
33
|
handleDocumentSelectionChange: () => void;
|
|
30
34
|
handleEditorSelectionChanged: () => void;
|
|
31
35
|
handleReadonlyChanged: () => void;
|
|
@@ -36,6 +40,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
36
40
|
handleCopy: (event: ClipboardEvent) => void;
|
|
37
41
|
handleCut: (event: ClipboardEvent) => void;
|
|
38
42
|
handlePaste: (event: ClipboardEvent) => void;
|
|
43
|
+
handlePasteText: (text: string, options?: PasteOptions) => void;
|
|
39
44
|
handleChanged(action: OnesEditorUndoAction): void;
|
|
40
45
|
handleRemoteChanged(type: RemoteChangeType): void;
|
|
41
46
|
addHandler(handler: OnesEditorInputHandler): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { editorCopyBlock } from './clipboard/copy';
|
|
1
|
+
export { editorCopyBlock, addMetaToDoc, injectDocToHtmlFragment } from './clipboard/copy';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ResizeObserver from 'resize-observer-polyfill';
|
|
2
|
+
import { OnesEditor, ContainerElement, BlockElement } from '../types';
|
|
2
3
|
export declare class RootContainer {
|
|
3
4
|
private editor;
|
|
4
5
|
rootContainer: ContainerElement;
|
|
@@ -10,6 +11,7 @@ export declare class RootContainer {
|
|
|
10
11
|
handleContextMenu: (event: Event) => void;
|
|
11
12
|
handleResize: () => void;
|
|
12
13
|
handleClick: (event: MouseEvent) => void;
|
|
14
|
+
handleBlockClick: (event: MouseEvent, block: BlockElement, elem: Element) => void;
|
|
13
15
|
handleDblClick: (event: MouseEvent) => void;
|
|
14
16
|
handleMouseDown: (event: MouseEvent) => void;
|
|
15
17
|
handleMouseMove: (event: MouseEvent) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocBlock, DocObject } from '../doc';
|
|
2
|
-
import { OnesEditor } from '../types';
|
|
3
|
-
export declare function blockToHtml(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
|
|
2
|
+
import { BlockPath, OnesEditor } from '../types';
|
|
3
|
+
export declare function blockToHtml(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocBlock, DocObject } from '../doc';
|
|
2
|
-
import { OnesEditor } from '../types';
|
|
3
|
-
export declare function blockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
|
|
2
|
+
import { BlockPath, OnesEditor } from '../types';
|
|
3
|
+
export declare function blockToMarkdown(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DocBlock, DocObject } from '../doc';
|
|
2
|
-
import { OnesEditor } from '../types';
|
|
3
|
-
export declare function blockToText(editor: OnesEditor, blockData: DocBlock, doc: DocObject): string;
|
|
2
|
+
import { BlockPath, OnesEditor } from '../types';
|
|
3
|
+
export declare function blockToText(editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath): string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorDataConverter, OnesEditorDocs } from '../types';
|
|
1
|
+
import { OnesEditor, OnesEditorDataConverter, OnesEditorDocs, PasteOptions } from '../types';
|
|
2
2
|
export default class EditorDataConverter implements OnesEditorDataConverter {
|
|
3
3
|
private converters;
|
|
4
|
+
private converterTypes;
|
|
4
5
|
constructor();
|
|
5
|
-
|
|
6
|
+
private prepareData;
|
|
7
|
+
fromData(editor: OnesEditor, data: DataTransfer, options?: PasteOptions): Promise<OnesEditorDocs | undefined>;
|
|
6
8
|
addConverter(converter: OnesEditorDataConverter): void;
|
|
7
9
|
}
|
|
@@ -150,6 +150,9 @@ export interface OnesEditorRemoteUsers extends TypedEmitter<RemoteUsersEvents> {
|
|
|
150
150
|
getFixedUserColor: (userId: string, type: 'flag' | 'selection') => string;
|
|
151
151
|
destroy: () => void;
|
|
152
152
|
}
|
|
153
|
+
export interface OnesEditorDocVersionExtra {
|
|
154
|
+
memo?: string;
|
|
155
|
+
}
|
|
153
156
|
export interface DocVersion {
|
|
154
157
|
version: number;
|
|
155
158
|
tag?: string;
|
|
@@ -168,6 +171,8 @@ export interface DocVersion {
|
|
|
168
171
|
userId: string;
|
|
169
172
|
displayName: string;
|
|
170
173
|
};
|
|
174
|
+
tagId: string;
|
|
175
|
+
extra?: OnesEditorDocVersionExtra;
|
|
171
176
|
}
|
|
172
177
|
export interface OnesEditorDocServerMeta {
|
|
173
178
|
serverId?: string;
|
|
@@ -179,17 +184,26 @@ export interface RecognizeLinkResult {
|
|
|
179
184
|
providerName?: string;
|
|
180
185
|
url: string;
|
|
181
186
|
}
|
|
187
|
+
export interface InsertBlockOptions {
|
|
188
|
+
noScroll?: boolean;
|
|
189
|
+
noFocus?: boolean;
|
|
190
|
+
}
|
|
191
|
+
export type UpdateBlockOptions = InsertBlockOptions;
|
|
182
192
|
export interface OnesEditorDoc {
|
|
183
193
|
registerCallback: (callbacks: OnesEditorDocCallbacks) => void;
|
|
184
194
|
unregisterCallback: (callbacks: OnesEditorDocCallbacks) => void;
|
|
185
195
|
toJSON: () => DocObject;
|
|
186
196
|
getContainerBlocks: (containerId: string) => DocBlock[];
|
|
197
|
+
findContainerBlocks: (containerId: string) => DocBlock[] | null;
|
|
187
198
|
getBlockData: (containerId: string, blockIndex: number) => DocBlock;
|
|
188
|
-
localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions) => DocBlockText;
|
|
199
|
+
localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions) => DocBlockText;
|
|
189
200
|
localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange) => DocBlock;
|
|
190
|
-
localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange) => DocBlock;
|
|
201
|
+
localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions) => DocBlock;
|
|
191
202
|
localDeleteBlock: (containerId: string, blockIndex: number, newRange: OnesEditorDocRange) => DocBlock;
|
|
192
|
-
|
|
203
|
+
localInsertChildContainers: (containers: {
|
|
204
|
+
containerId: string;
|
|
205
|
+
blocks: DocBlock[];
|
|
206
|
+
}[]) => void;
|
|
193
207
|
localDeleteChildContainers: (containerIds: string[]) => void;
|
|
194
208
|
addResources: (resourceIds: string[]) => Promise<string[]>;
|
|
195
209
|
uploadResource: (file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
|
|
@@ -234,6 +248,7 @@ export interface OnesEditorDocVersionHelper {
|
|
|
234
248
|
revertVersion: (ver: number) => Promise<void>;
|
|
235
249
|
createVersion: (tag: string, publish: boolean) => Promise<DocVersion>;
|
|
236
250
|
parseHistoryData: (historyData: OnesEditorDocHistoryData, handler: OnesEditorHistoryDataParseHandler) => void;
|
|
251
|
+
updateVersionExtra: (version: number, tagId: string, extra: OnesEditorDocVersionExtra) => Promise<void>;
|
|
237
252
|
}
|
|
238
253
|
export interface OnesEditorComment {
|
|
239
254
|
id: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { DocBlockText, DocBlockTextActions, DocBlockTextAttributes } from '../doc';
|
|
1
|
+
import { DocBlockText, DocBlockTextActions, DocBlockTextAttributes, DocBox, DocBlockTextOp } from '../doc';
|
|
2
2
|
export declare function insertText(richText: DocBlockText, offset: number, text: string | DocBlockText, attributes: DocBlockTextAttributes | null): DocBlockText;
|
|
3
|
+
export declare function createBoxOp(boxData: DocBox): DocBlockTextOp;
|
|
3
4
|
export declare function createInsertOps(offset: number, text: string | DocBlockText, attributes: DocBlockTextAttributes | null): DocBlockTextActions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor, SimpleSelectionRange } from '../../types';
|
|
1
|
+
import { BlockElement, OnesEditor, SelectionRange, SimpleSelectionRange } from '../../types';
|
|
2
2
|
import { DocBlockText } from '../../doc';
|
|
3
3
|
export declare function editorRemoveTextAttribute(editor: OnesEditor, block: BlockElement, range: SimpleSelectionRange, attributeName: string): DocBlockText;
|
|
4
4
|
export declare function editorAddTextAttribute(editor: OnesEditor, block: BlockElement, range: SimpleSelectionRange, attributeName: string, value: boolean | string | number): DocBlockText;
|
|
@@ -7,4 +7,4 @@ export type SetEmptyTextBlockColor = (editor: OnesEditor, blockId: string, type:
|
|
|
7
7
|
export declare function editorRangeSetColor(editor: OnesEditor, type: 'color' | 'backgroundColor', value: number | null, emptyBlockFun: SetEmptyTextBlockColor): void;
|
|
8
8
|
export declare function editorRangeClearColor(editor: OnesEditor, value: 'clearAll' | 'clearColor' | 'clearBackground', emptyBlockFun: SetEmptyTextBlockColor): void;
|
|
9
9
|
export type GetEmptyTextBlockColor = (editor: OnesEditor, blockId: string) => [number | null, number | null];
|
|
10
|
-
export declare function editorRangeGetColor(editor: OnesEditor, emptyBlockFun: GetEmptyTextBlockColor): [number | null, number | null];
|
|
10
|
+
export declare function editorRangeGetColor(editor: OnesEditor, range: SelectionRange, emptyBlockFun: GetEmptyTextBlockColor): [number | null, number | null];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DocBlock, OnesEditorDocRange } from '../../doc';
|
|
1
|
+
import { InsertBlockOptions, DocBlock, OnesEditorDocRange } from '../../doc';
|
|
2
2
|
import { OnesEditor } from '../../types';
|
|
3
|
-
export declare function editorAutoInsertBlock(editor: OnesEditor, blockData: DocBlock, containerId?: string, blockIndex?: number, newRange?: OnesEditorDocRange): import("../../types").BlockElement;
|
|
3
|
+
export declare function editorAutoInsertBlock(editor: OnesEditor, blockData: DocBlock, containerId?: string, blockIndex?: number, newRange?: OnesEditorDocRange, insertBlockOptions?: InsertBlockOptions): import("../../types").BlockElement;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BlockElement, BreakTextOptions, OnesEditor } from '../../types';
|
|
2
|
+
import { DocBlockAttributes } from '../../doc';
|
|
2
3
|
export interface BreakTextBlockResult {
|
|
3
4
|
block: BlockElement;
|
|
4
5
|
newBlock: BlockElement;
|
|
5
6
|
}
|
|
7
|
+
export declare function copyBlockAttributes(editor: OnesEditor, block: BlockElement): DocBlockAttributes;
|
|
6
8
|
export declare function editorBreakTextBlock(editor: OnesEditor, block: BlockElement, offset: number, options?: BreakTextOptions): BreakTextBlockResult;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../types';
|
|
2
|
-
export declare function editorDeleteBlockText(editor: OnesEditor, block: BlockElement, offset: number, count: number): number;
|
|
1
|
+
import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
|
|
2
|
+
export declare function editorDeleteBlockText(editor: OnesEditor, block: BlockElement, offset: number, count: number, options?: InsertTextOptions): number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DocBlock, OnesEditorDocRange } from '../../doc';
|
|
1
|
+
import { DocBlock, InsertBlockOptions, OnesEditorDocRange } from '../../doc';
|
|
2
2
|
import { OnesEditor, BlockElement } from '../../types';
|
|
3
|
-
export declare function editorInsertBlock(editor: OnesEditor, containerId: string, blockIndex: number, blockData: DocBlock, newRange: OnesEditorDocRange): BlockElement;
|
|
3
|
+
export declare function editorInsertBlock(editor: OnesEditor, containerId: string, blockIndex: number, blockData: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): BlockElement;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../types';
|
|
1
|
+
import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBox } from '../../doc';
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getTextAttributes(editor: OnesEditor, containerId: string, blockIndex: number, offset: number): import("quill-delta/dist/AttributeMap").default | undefined;
|
|
4
|
+
export declare function editorInsertTextToBlock(editor: OnesEditor, block: BlockElement, offset: number, text: string | DocBlockText, options?: InsertTextOptions): DocBlockText;
|
|
4
5
|
export declare function editorInsertBoxToBlock(editor: OnesEditor, block: BlockElement, offset: number, boxData: DocBox): DocBlockText;
|
|
5
6
|
export declare function editorInsertTextToBlockEx(editor: OnesEditor, text: string | DocBlockText, containerId: string, blockIndex: number, offset: number): DocBlockText;
|
|
6
7
|
export declare function editorInsertText(editor: OnesEditor, text: string | DocBlockText): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../types';
|
|
2
|
-
export declare function editorIsBlockWritable(editor: OnesEditor, block: BlockElement): boolean;
|
|
2
|
+
export declare function editorIsBlockWritable(editor: OnesEditor, block: BlockElement | BlockElement[]): boolean;
|
|
3
3
|
export declare function editorIsWritable(editor: OnesEditor): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnesEditor } from '../../types';
|
|
2
|
-
export type DomEventCallback = (editor: OnesEditor, event:
|
|
2
|
+
export type DomEventCallback<T = Event> = (editor: OnesEditor, event: T, data: unknown) => void;
|
|
3
3
|
declare class DomEventHandler {
|
|
4
4
|
editor: OnesEditor;
|
|
5
5
|
dom: Element | Document | Window;
|
|
@@ -15,7 +15,7 @@ export declare class EditorDomEvents {
|
|
|
15
15
|
handlers: Map<Element | Document | Window, DomEventHandler[]>;
|
|
16
16
|
constructor(editor: OnesEditor);
|
|
17
17
|
destroy(): void;
|
|
18
|
-
addEventListener(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback
|
|
18
|
+
addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown): void;
|
|
19
19
|
removeEventListener(element: Element | Document | Window | null, eventName: string | null, eventHandler: DomEventCallback): void;
|
|
20
20
|
removeAllListeners(element: Element | Document | Window, eventName?: string): void;
|
|
21
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorDocLocalActionCallbacks, OnesEditor } from '../types';
|
|
2
|
-
import { BuildResourceUrlOptions, DocBlock, DocBlockDelta, DocBlockText, DocBlockTextActions, DocObject, OnesEditorDoc, OnesEditorDocCallbacks, OnesEditorDocRange, OnesEditorDocServerMeta, OnesEditorDocStatus, UploadResourceOptions, UploadResourceResult } from '../doc';
|
|
2
|
+
import { BuildResourceUrlOptions, InsertBlockOptions, DocBlock, DocBlockDelta, DocBlockText, DocBlockTextActions, DocObject, OnesEditorDoc, OnesEditorDocCallbacks, OnesEditorDocRange, OnesEditorDocServerMeta, OnesEditorDocStatus, UploadResourceOptions, UploadResourceResult, UpdateBlockOptions } from '../doc';
|
|
3
3
|
import { EventCallbacks } from '../../utils';
|
|
4
4
|
export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> implements OnesEditorDoc, OnesEditorDocCallbacks {
|
|
5
5
|
private editor;
|
|
@@ -12,13 +12,18 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
12
12
|
toJSON(): DocObject;
|
|
13
13
|
getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
|
|
14
14
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
15
|
+
findContainerBlocks(containerId: string): DocBlock[] | null;
|
|
15
16
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
16
|
-
|
|
17
|
+
verifyBlockWritable(containerId: string, blockIndex: number): void;
|
|
18
|
+
localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions): DocBlockText;
|
|
17
19
|
localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange): DocBlock;
|
|
18
|
-
localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange): DocBlock;
|
|
20
|
+
localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): DocBlock;
|
|
19
21
|
localDeleteBlock(containerId: string, blockIndex: number, newRange: OnesEditorDocRange): DocBlock;
|
|
20
22
|
localDeleteChildContainers(containerIds: string[]): void;
|
|
21
|
-
|
|
23
|
+
localInsertChildContainers(containers: {
|
|
24
|
+
containerId: string;
|
|
25
|
+
blocks: DocBlock[];
|
|
26
|
+
}[]): void;
|
|
22
27
|
onRequestReload(reason: string): void;
|
|
23
28
|
onUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, local: boolean): void;
|
|
24
29
|
onUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, local: boolean): void;
|
|
@@ -38,4 +43,5 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
38
43
|
getRemoteUsers(): import("../doc").OnesEditorRemoteUsers;
|
|
39
44
|
destroy(): void;
|
|
40
45
|
getServerMeta(): OnesEditorDocServerMeta;
|
|
46
|
+
reset(doc: OnesEditorDoc): void;
|
|
41
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorInputCallbacks } from '../composition/editor-input';
|
|
2
|
-
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType } from '../types';
|
|
2
|
+
import { OnesEditor, OnesEditorInputHandler, OnesEditorUndoAction, RemoteChangeType, PasteOptions } from '../types';
|
|
3
3
|
import { DocObject } from '../doc';
|
|
4
4
|
export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
5
5
|
editor: OnesEditor;
|
|
@@ -11,7 +11,10 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
|
11
11
|
onRemoteChanged(type: RemoteChangeType): void;
|
|
12
12
|
onCompositionStart(event: Event): void;
|
|
13
13
|
onUpdateCompositionText(event: Event, text: string, end: boolean): void;
|
|
14
|
+
onCopy(event: ClipboardEvent): void;
|
|
15
|
+
onCut(event: ClipboardEvent): void;
|
|
14
16
|
onPaste(event: ClipboardEvent): void;
|
|
17
|
+
onPasteText: (text: string, options?: PasteOptions) => Promise<void>;
|
|
15
18
|
onFocus(): void;
|
|
16
19
|
onBlur(): void;
|
|
17
20
|
addHandler(handler: OnesEditorInputHandler): void;
|
|
@@ -23,5 +26,6 @@ export declare class EditorInputHandlers implements EditorInputCallbacks {
|
|
|
23
26
|
defaultInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): void;
|
|
24
27
|
defaultHandleKeydown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
25
28
|
pasteDoc(doc: DocObject): Promise<void>;
|
|
29
|
+
private pasteDocs;
|
|
26
30
|
destroy(): void;
|
|
27
31
|
}
|