@ones-editor/editor 0.0.3-beta.1 → 0.0.3-beta.100
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 +1 -0
- package/@ones-editor/block-locker/src/i18n/en-US.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 +2 -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/index.d.ts +2 -1
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +2 -2
- package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +17 -3
- 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 +1 -1
- package/@ones-editor/block-menu/src/locale/en-us.d.ts +8 -0
- package/@ones-editor/block-menu/src/locale/zh-cn.d.ts +8 -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 +1 -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/block-hook/index.d.ts +3 -1
- package/@ones-editor/comments/src/comment-editor/index.d.ts +3 -5
- package/@ones-editor/comments/src/comment-input-handler/index.d.ts +2 -10
- package/@ones-editor/comments/src/comment-input-handler/input-handler.d.ts +11 -0
- package/@ones-editor/comments/src/comment-input-handler/paste-handler.d.ts +5 -0
- package/@ones-editor/comments/src/comment-input-handler/quick-reply-input-handler.d.ts +7 -0
- package/@ones-editor/comments/src/comment-item/comment-item.d.ts +2 -0
- package/@ones-editor/comments/src/comment-item/index.d.ts +2 -0
- package/@ones-editor/comments/src/comment-item/mini-comment-item/index.d.ts +1 -0
- package/@ones-editor/comments/src/comment-item/mini-comment-item/mini-comment-item.d.ts +7 -0
- package/@ones-editor/comments/src/comment-item/mobile-comment-item/index.d.ts +1 -0
- package/@ones-editor/comments/src/comment-item/mobile-comment-item/mobile-comment-item.d.ts +18 -0
- package/@ones-editor/comments/src/comments/comments.d.ts +12 -4
- package/@ones-editor/comments/src/comments-button/index.d.ts +3 -1
- package/@ones-editor/comments/src/comments-helper/get-comments-from-doc.d.ts +3 -1
- package/@ones-editor/comments/src/comments-helper/get-mini-comment-from-doc.d.ts +7 -0
- package/@ones-editor/comments/src/comments-helper/utils.d.ts +4 -3
- package/@ones-editor/comments/src/comments-list/arrange-items.d.ts +1 -1
- package/@ones-editor/comments/src/comments-list/comments-list.d.ts +10 -12
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -3
- package/@ones-editor/comments/src/comments-list/group-list.d.ts +5 -3
- package/@ones-editor/comments/src/comments-list/handler.d.ts +0 -1
- package/@ones-editor/comments/src/comments-list/index.d.ts +2 -0
- package/@ones-editor/comments/src/comments-list/list-base.d.ts +3 -2
- package/@ones-editor/comments/src/comments-list/mini-comment/group-item.d.ts +16 -0
- package/@ones-editor/comments/src/comments-list/mini-comment/group-list.d.ts +16 -0
- package/@ones-editor/comments/src/comments-list/mini-comment/index.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/mini-comment/mini-comments-list.d.ts +24 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/children-list.d.ts +17 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/group-item.d.ts +30 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/group-list.d.ts +30 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/index.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/mobile-comments-list/mobile-comments-list.d.ts +30 -0
- package/@ones-editor/comments/src/constant/index.d.ts +1 -2
- package/@ones-editor/comments/src/index.d.ts +1 -1
- package/@ones-editor/comments/src/locale/en-us.d.ts +3 -0
- package/@ones-editor/comments/src/locale/ja-jp.d.ts +1 -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 +3 -1
- package/@ones-editor/comments/src/types.d.ts +26 -17
- package/@ones-editor/core/src/common/index.d.ts +2 -2
- 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/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 +4 -0
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +2 -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/doc/doc.d.ts +12 -2
- 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/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 +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +3 -3
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +5 -3
- package/@ones-editor/core/src/core/index.d.ts +1 -0
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +4 -0
- 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/settings/index.d.ts +3 -3
- package/@ones-editor/core/src/core/types.d.ts +51 -21
- 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/i18n.d.ts +52 -0
- package/@ones-editor/core/src/i18n/ja-jp.d.ts +17 -0
- package/@ones-editor/core/src/local-doc/index.d.ts +6 -2
- package/@ones-editor/core/src/utils/dom-scroll.d.ts +3 -1
- package/@ones-editor/core/src/utils/dom.d.ts +2 -0
- package/@ones-editor/core/src/utils/file.d.ts +3 -0
- package/@ones-editor/core/src/utils/logger/index.d.ts +9 -3
- 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/helper/default-style.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/helper/index.d.ts +3 -3
- package/@ones-editor/drawio-embed/types/index.d.ts +3 -3
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +1 -0
- package/@ones-editor/drop-target/src/drop-target.d.ts +1 -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 +1 -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 +6 -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 +4 -0
- package/@ones-editor/file/src/types.d.ts +23 -0
- package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +3 -2
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +4 -3
- package/@ones-editor/graph-embed/src/lang/en-us.d.ts +7 -5
- package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +10 -0
- package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +3 -3
- package/@ones-editor/heading-collapse/src/doc-event/index.d.ts +1 -1
- package/@ones-editor/heading-collapse/src/heading-collapse-button/drop-handler.d.ts +1 -1
- 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 +4 -0
- 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 +4 -4
- package/@ones-editor/image-embed/src/image-file.d.ts +5 -0
- package/@ones-editor/image-embed/src/image-object.d.ts +4 -1
- package/@ones-editor/image-embed/src/image-resizer.d.ts +3 -0
- package/@ones-editor/image-embed/src/index.d.ts +2 -1
- 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 +5 -0
- package/@ones-editor/image-embed/src/shortcuts/index.d.ts +3 -2
- package/@ones-editor/image-embed/src/types.d.ts +8 -1
- 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/zh-cn.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 +3 -2
- package/@ones-editor/list-block/src/lang/en-us.d.ts +3 -0
- package/@ones-editor/list-block/src/lang/zh-cn.d.ts +3 -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/list-notify.d.ts +2 -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 +3 -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 +1 -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/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/mathjax-box/convert-mathjax.d.ts +5 -0
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +2 -2
- package/@ones-editor/media-embed/src/core/media-embed.d.ts +4 -2
- package/@ones-editor/media-embed/src/core/media.d.ts +9 -4
- package/@ones-editor/media-embed/src/utils/file.d.ts +1 -1
- package/@ones-editor/mention/src/block-mention.d.ts +10 -0
- package/@ones-editor/mention/src/dom/mention-button.d.ts +2 -0
- package/@ones-editor/mention/src/index.d.ts +2 -1
- package/@ones-editor/mention/src/mention.d.ts +1 -9
- package/@ones-editor/mention/src/types.d.ts +12 -1
- package/@ones-editor/misc/src/copy-cut-property.d.ts +3 -0
- 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-special/src/paste-special-handler.d.ts +2 -2
- package/@ones-editor/scroll-container/src/dom-utils.d.ts +9 -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 +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/sharedb-client.d.ts +5 -4
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +8 -2
- 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/zh-cn.d.ts +5 -0
- package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/border-bar/table-row-column-toolbar.d.ts +2 -0
- package/@ones-editor/table-block/src/table-block/close-toolbar.d.ts +2 -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-table-data.d.ts +1 -1
- 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 +1 -0
- package/@ones-editor/table-block/src/types.d.ts +2 -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/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/locale/en-us.d.ts +1 -0
- package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/text-commands/src/text-command-provider.d.ts +1 -0
- 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 +2 -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/zh-cn.d.ts +6 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/icons/index.d.ts +1 -14
- package/@ones-editor/ui/src/index.d.ts +6 -2
- package/@ones-editor/ui/src/locale/en-us.d.ts +4 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +4 -0
- 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 +10 -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/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/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 +5 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +16 -11
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +7 -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 +5 -2
- 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/types.d.ts +8 -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 +2 -1
- package/@ones-editor/ui-base/src/dialog/types.d.ts +4 -0
- package/@ones-editor/ui-base/src/dropdown/index.d.ts +41 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +37 -12
- package/@ones-editor/ui-base/src/index.d.ts +3 -0
- package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
- package/@ones-editor/{ui/src/quick-menu/item-shortcuts.d.ts → 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 +4 -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 +4 -0
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +4 -4
- package/@ones-editor/versions/src/index.d.ts +1 -1
- package/@ones-editor/versions/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/versions/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/versions/src/types.d.ts +5 -7
- package/@ones-editor/versions/src/utils/index.d.ts +2 -2
- package/@ones-editor/versions/src/version-dialog/index.d.ts +21 -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 +21 -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 +17 -9
- package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +26 -0
- package/@ones-editor/webpage-embed/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/webpage-embed/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/webpage-embed/src/types.d.ts +2 -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 -10
- package/dist/comments/local-doc-comments-provider.d.ts +19 -0
- package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +5 -7
- package/dist/index.d.ts +18 -4
- package/dist/index.js +542 -29093
- 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 +42 -5
- package/package.json +7 -2
- 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/{core/src/utils/logger/fake-process.d.ts → block-locker/src/i18n/index.d.ts} +0 -0
- /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
|
@@ -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,15 +184,19 @@ export interface RecognizeLinkResult {
|
|
|
179
184
|
providerName?: string;
|
|
180
185
|
url: string;
|
|
181
186
|
}
|
|
187
|
+
export interface InsertBlockOptions {
|
|
188
|
+
noScroll?: boolean;
|
|
189
|
+
}
|
|
190
|
+
export type UpdateBlockOptions = InsertBlockOptions;
|
|
182
191
|
export interface OnesEditorDoc {
|
|
183
192
|
registerCallback: (callbacks: OnesEditorDocCallbacks) => void;
|
|
184
193
|
unregisterCallback: (callbacks: OnesEditorDocCallbacks) => void;
|
|
185
194
|
toJSON: () => DocObject;
|
|
186
195
|
getContainerBlocks: (containerId: string) => DocBlock[];
|
|
187
196
|
getBlockData: (containerId: string, blockIndex: number) => DocBlock;
|
|
188
|
-
localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions) => DocBlockText;
|
|
197
|
+
localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions) => DocBlockText;
|
|
189
198
|
localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange) => DocBlock;
|
|
190
|
-
localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange) => DocBlock;
|
|
199
|
+
localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions) => DocBlock;
|
|
191
200
|
localDeleteBlock: (containerId: string, blockIndex: number, newRange: OnesEditorDocRange) => DocBlock;
|
|
192
201
|
localInsertChildContainer: (containerId: string, blocks: DocBlock[]) => void;
|
|
193
202
|
localDeleteChildContainers: (containerIds: string[]) => void;
|
|
@@ -234,6 +243,7 @@ export interface OnesEditorDocVersionHelper {
|
|
|
234
243
|
revertVersion: (ver: number) => Promise<void>;
|
|
235
244
|
createVersion: (tag: string, publish: boolean) => Promise<DocVersion>;
|
|
236
245
|
parseHistoryData: (historyData: OnesEditorDocHistoryData, handler: OnesEditorHistoryDataParseHandler) => void;
|
|
246
|
+
updateVersionExtra: (version: number, tagId: string, extra: OnesEditorDocVersionExtra) => Promise<void>;
|
|
237
247
|
}
|
|
238
248
|
export interface OnesEditorComment {
|
|
239
249
|
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,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,6 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../types';
|
|
1
|
+
import { OnesEditor, BlockElement, InsertTextOptions } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBox } from '../../doc';
|
|
3
|
-
export declare function editorInsertTextToBlock(editor: OnesEditor, block: BlockElement, offset: number, text: string | DocBlockText): DocBlockText;
|
|
3
|
+
export declare function editorInsertTextToBlock(editor: OnesEditor, block: BlockElement, offset: number, text: string | DocBlockText, options?: InsertTextOptions): DocBlockText;
|
|
4
4
|
export declare function editorInsertBoxToBlock(editor: OnesEditor, block: BlockElement, offset: number, boxData: DocBox): DocBlockText;
|
|
5
5
|
export declare function editorInsertTextToBlockEx(editor: OnesEditor, text: string | DocBlockText, containerId: string, blockIndex: number, offset: number): DocBlockText;
|
|
6
6
|
export declare function editorInsertText(editor: OnesEditor, text: string | DocBlockText): void;
|
|
@@ -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;
|
|
@@ -12,10 +12,10 @@ declare class DomEventHandler {
|
|
|
12
12
|
}
|
|
13
13
|
export declare class EditorDomEvents {
|
|
14
14
|
private editor;
|
|
15
|
-
handlers: Map<
|
|
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;
|
|
@@ -13,9 +13,10 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
13
13
|
getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
|
|
14
14
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
15
15
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
16
|
-
|
|
16
|
+
verifyBlockWritable(containerId: string, blockIndex: number): void;
|
|
17
|
+
localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions): DocBlockText;
|
|
17
18
|
localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange): DocBlock;
|
|
18
|
-
localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange): DocBlock;
|
|
19
|
+
localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): DocBlock;
|
|
19
20
|
localDeleteBlock(containerId: string, blockIndex: number, newRange: OnesEditorDocRange): DocBlock;
|
|
20
21
|
localDeleteChildContainers(containerIds: string[]): void;
|
|
21
22
|
localInsertChildContainer(containerId: string, blocks: DocBlock[]): void;
|
|
@@ -38,4 +39,5 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
38
39
|
getRemoteUsers(): import("../doc").OnesEditorRemoteUsers;
|
|
39
40
|
destroy(): void;
|
|
40
41
|
getServerMeta(): OnesEditorDocServerMeta;
|
|
42
|
+
reset(doc: OnesEditorDoc): void;
|
|
41
43
|
}
|
|
@@ -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) => 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
|
}
|
|
@@ -22,5 +22,5 @@ import { editorMovePageUp } from './move-page-up';
|
|
|
22
22
|
import { editorMovePageDown } from './move-page-down';
|
|
23
23
|
import { editorSelectPageUp } from './select-page-up';
|
|
24
24
|
import { editorSelectPageDown } from './select-page-down';
|
|
25
|
-
import { editorSelectAll } from './select-all';
|
|
26
|
-
export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorSelectAll, };
|
|
25
|
+
import { editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks } from './select-all';
|
|
26
|
+
export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { OnesEditor } from '../../types';
|
|
1
|
+
import { ContainerElement, OnesEditor, SimpleSelectionRange } from '../../types';
|
|
2
|
+
export declare function isContainerSelectedAllChildBlocks(container: ContainerElement, range: SimpleSelectionRange): boolean;
|
|
2
3
|
export declare function editorSelectAll(editor: OnesEditor): boolean;
|
|
4
|
+
export declare function editorSelectContainer(editor: OnesEditor, container: ContainerElement): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { OnesEditor, SimpleBlockPosition } from '../../types';
|
|
2
2
|
export declare function editorGetWordLeftPos(editor: OnesEditor, type: 'move' | 'select'): SimpleBlockPosition | null;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function editorGetWordRightPos(editor: OnesEditor, type: 'move' | 'select'): SimpleBlockPosition | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorCaret } from '../blocks/text-blocks/caret/editor-caret';
|
|
2
|
-
import { OnesEditorSelection, BlockElement, BlockPosition, SelectionRange, OnesEditor,
|
|
2
|
+
import { OnesEditorSelection, BlockElement, BlockPosition, SelectionRange, OnesEditor, DeleteBlockEventOptions, ChangeSelectionOptions } from '../types';
|
|
3
3
|
export declare class EditorSelection implements OnesEditorSelection {
|
|
4
4
|
readonly editor: OnesEditor;
|
|
5
5
|
readonly caret: EditorCaret;
|
|
@@ -16,7 +16,7 @@ export declare class EditorSelection implements OnesEditorSelection {
|
|
|
16
16
|
getEndBlock(): BlockElement;
|
|
17
17
|
selectBlock(block: BlockElement, start: number, end?: number): void;
|
|
18
18
|
setSelection(anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions): SelectionRange;
|
|
19
|
-
setRange(range: SelectionRange): SelectionRange;
|
|
19
|
+
setRange(range: SelectionRange, options?: ChangeSelectionOptions): SelectionRange;
|
|
20
20
|
updateSelection(): void;
|
|
21
21
|
getFocusedPos(): BlockPosition;
|
|
22
22
|
getAnchorPos(): BlockPosition;
|
|
@@ -29,6 +29,7 @@ export declare class EditorSelection implements OnesEditorSelection {
|
|
|
29
29
|
private verifyPos;
|
|
30
30
|
private updateFocusedBlock;
|
|
31
31
|
verify(): void;
|
|
32
|
+
to(type: 'text' | 'markdown' | 'html'): string;
|
|
32
33
|
private removeAllBlockFocusedClass;
|
|
33
34
|
private setBlockFocused;
|
|
34
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnesEditorDocRange } from '../../doc';
|
|
2
|
-
import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement } from '../../types';
|
|
2
|
+
import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
|
|
3
3
|
import { EditorSimpleBlockPosition } from '../editor-position';
|
|
4
4
|
interface SimpleRangeOptions {
|
|
5
5
|
anchor: EditorSimpleBlockPosition;
|
|
@@ -26,5 +26,6 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
|
|
|
26
26
|
getFocusedPos(): EditorSimpleBlockPosition;
|
|
27
27
|
clone(): EditorSimpleSelectionRange;
|
|
28
28
|
toDocRange(): OnesEditorDocRange;
|
|
29
|
+
static from(editor: OnesEditor, other: SimpleSelectionRange): EditorSimpleSelectionRange;
|
|
29
30
|
}
|
|
30
31
|
export {};
|
|
@@ -3,7 +3,7 @@ export default class DefaultSettingsProvider implements OnesEditorSettingsProvid
|
|
|
3
3
|
private editor;
|
|
4
4
|
constructor(editor: OnesEditor);
|
|
5
5
|
getKey(key: string): string;
|
|
6
|
-
getItem(key: string):
|
|
7
|
-
setItem(key: string, value: string | null):
|
|
8
|
-
removeItem(key: string):
|
|
6
|
+
getItem(key: string): string | null;
|
|
7
|
+
setItem(key: string, value: string | null): void;
|
|
8
|
+
removeItem(key: string): void;
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, OnesEditorDoc, OnesEditorDocRange } from './doc';
|
|
2
|
+
import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
|
|
3
3
|
export type ContainerElement = HTMLDivElement & {
|
|
4
4
|
__neverUse: 'ContainerElement';
|
|
5
5
|
};
|
|
@@ -49,12 +49,22 @@ export interface ComplexBlockPosition {
|
|
|
49
49
|
isSimple: () => false;
|
|
50
50
|
}
|
|
51
51
|
export type BlockPosition = SimpleBlockPosition | ComplexBlockPosition;
|
|
52
|
+
export interface BoxCommands {
|
|
53
|
+
group: string;
|
|
54
|
+
commands: CommandItem[];
|
|
55
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, box: BoxElement, item: CommandItem) => unknown;
|
|
56
|
+
}
|
|
57
|
+
export interface BoxProperties {
|
|
58
|
+
boxCommands?: Record<string, BoxCommands>;
|
|
59
|
+
}
|
|
52
60
|
export interface Box {
|
|
53
61
|
boxType: string;
|
|
54
62
|
updateBoxContent: (editor: OnesEditor, boxElement: BoxElement, boxContent: BoxContentElement, boxData: DocBox) => void;
|
|
55
63
|
convertFrom?: (editor: OnesEditor, text: string) => DocBox | null;
|
|
64
|
+
convertTo?: (editor: OnesEditor, boxData: DocBox, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
|
|
56
65
|
handleClickBox?: (editor: OnesEditor, box: BoxElement, event: MouseEvent) => void;
|
|
57
66
|
toStandardText?: (editor: OnesEditor, box: DocBox) => Promise<DocBlockText | undefined>;
|
|
67
|
+
getBoxProperties?: (editor: OnesEditor, boxElement: BoxElement) => BoxProperties;
|
|
58
68
|
}
|
|
59
69
|
export interface Insertion {
|
|
60
70
|
insertionType: string;
|
|
@@ -79,12 +89,13 @@ export interface Embed {
|
|
|
79
89
|
getOptions?: (editor: OnesEditor) => EmbedOptions;
|
|
80
90
|
handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
|
|
81
91
|
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocEmbedBlock) => boolean;
|
|
82
|
-
handleDropOver?: (editor: OnesEditor, block: BlockElement,
|
|
83
|
-
handleDrop?: (editor: OnesEditor, block: BlockElement,
|
|
92
|
+
handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | DataTransferItemList | null, x: number, y: number) => DropInsertPos | undefined;
|
|
93
|
+
handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
|
|
84
94
|
convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
85
95
|
offset: number;
|
|
86
96
|
data?: DocBlockAttributes;
|
|
87
97
|
}) => ConvertBlockResult | null;
|
|
98
|
+
toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath) => Promise<DocObject | undefined>;
|
|
88
99
|
}
|
|
89
100
|
export interface ConvertBlockResult {
|
|
90
101
|
blockData: DocBlock;
|
|
@@ -109,10 +120,11 @@ export interface CommandItem {
|
|
|
109
120
|
value?: string;
|
|
110
121
|
order?: number;
|
|
111
122
|
type?: CommandItemType;
|
|
112
|
-
element?: HTMLElement;
|
|
123
|
+
element?: HTMLElement | ((item: CommandItem) => HTMLElement);
|
|
113
124
|
icon?: string;
|
|
114
125
|
childrenType?: 'menu' | 'toolbar';
|
|
115
126
|
children?: CommandItem[];
|
|
127
|
+
childrenMenuId?: string;
|
|
116
128
|
data?: unknown;
|
|
117
129
|
group?: string;
|
|
118
130
|
groupOrder?: number;
|
|
@@ -120,6 +132,10 @@ export interface CommandItem {
|
|
|
120
132
|
manualShowChildren?: boolean;
|
|
121
133
|
childrenPlacement?: CommandItemChildrenPlacement;
|
|
122
134
|
childrenOffset?: [number, number];
|
|
135
|
+
subText?: string;
|
|
136
|
+
defaultCheckedChildren?: string[];
|
|
137
|
+
disableTooltip?: boolean;
|
|
138
|
+
disableReason?: string;
|
|
123
139
|
setCloseable?: (closeable: Closeable) => void;
|
|
124
140
|
beforePopup?: (parent: unknown) => void;
|
|
125
141
|
}
|
|
@@ -188,12 +204,13 @@ export interface Block {
|
|
|
188
204
|
clearSelection: (editor: OnesEditor) => void;
|
|
189
205
|
getBlockProperties?: (editor: OnesEditor, block: BlockElement) => BlockProperties;
|
|
190
206
|
getOptions?: (editor: OnesEditor) => BlockOptions;
|
|
207
|
+
notify?: (editor: OnesEditor, command: string, params?: unknown) => unknown | undefined;
|
|
191
208
|
handleBlockElementUpdated?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => void;
|
|
192
209
|
handleContainerResized?: (editor: OnesEditor, block: BlockElement) => void;
|
|
193
210
|
handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
|
|
194
211
|
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => boolean;
|
|
195
|
-
handleDropOver?: (editor: OnesEditor, block: BlockElement,
|
|
196
|
-
handleDrop?: (editor: OnesEditor, block: BlockElement,
|
|
212
|
+
handleDropOver?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | DataTransferItemList | null, x: number, y: number) => DropInsertPos | false | undefined;
|
|
213
|
+
handleDrop?: (editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
|
|
197
214
|
getClientRects?: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => DOMRect[];
|
|
198
215
|
getMinWidth?: (editor: OnesEditor, block: BlockElement) => number | undefined;
|
|
199
216
|
convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
@@ -201,7 +218,7 @@ export interface Block {
|
|
|
201
218
|
data?: DocBlockAttributes;
|
|
202
219
|
}) => ConvertBlockResult | null;
|
|
203
220
|
selectionToDoc?: (editor: OnesEditor, selectedBlock: SelectedBlock) => DocObject;
|
|
204
|
-
convertTo?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
|
|
221
|
+
convertTo?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, type: 'text' | 'html' | 'markdown', path: BlockPath) => string;
|
|
205
222
|
toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject) => Promise<DocObject | undefined>;
|
|
206
223
|
getBlockStyles?: (editor: OnesEditor, block: BlockElement) => BlockStyles;
|
|
207
224
|
blockToDoc?: (srcDoc: DocObject, srcBlockData: DocBlock, childBlockConverter: (srcDoc: DocObject, srcBlockData: DocBlock) => DocObject) => DocObject;
|
|
@@ -217,9 +234,12 @@ export interface TextKindBlock extends Block {
|
|
|
217
234
|
export interface NextContainerOptions {
|
|
218
235
|
noWrap?: boolean;
|
|
219
236
|
}
|
|
237
|
+
export interface GetChildContainerOptions {
|
|
238
|
+
visibleOnly?: boolean;
|
|
239
|
+
}
|
|
220
240
|
export interface ComplexKindBlock extends Block {
|
|
221
241
|
enableKeyboardSelect?: boolean;
|
|
222
|
-
getChildContainers: (editor: OnesEditor, complexBlock: BlockElement) => ContainerElement[];
|
|
242
|
+
getChildContainers: (editor: OnesEditor, complexBlock: BlockElement, options?: GetChildContainerOptions) => ContainerElement[];
|
|
223
243
|
getNextContainer: (editor: OnesEditor, complexBlock: BlockElement, childContainer: ContainerElement, type: MoveDirection, options?: NextContainerOptions) => ContainerElement | null;
|
|
224
244
|
getSelectedContainers: (editor: OnesEditor, complexBlock: BlockElement, start: ComplexBlockPosition, end: ComplexBlockPosition) => ContainerElement[];
|
|
225
245
|
adjustSelectionPos?: (editor: OnesEditor, complexBlock: BlockElement, anchor: ComplexBlockPosition, focus: ComplexBlockPosition) => {
|
|
@@ -332,9 +352,10 @@ export interface OnesEditorDataConverters {
|
|
|
332
352
|
export interface BreakTextOptions {
|
|
333
353
|
forceInsertAfter?: boolean;
|
|
334
354
|
newBlockData?: DocBlock;
|
|
355
|
+
copyBlockAttributes?: boolean;
|
|
335
356
|
}
|
|
336
357
|
export interface OnesEditorEvents {
|
|
337
|
-
'docChanged': (editor: OnesEditor) => void;
|
|
358
|
+
'docChanged': (editor: OnesEditor, local: boolean) => void;
|
|
338
359
|
'readonlyChanged': (editor: OnesEditor) => void;
|
|
339
360
|
'selectionChanged': (editor: OnesEditor) => void;
|
|
340
361
|
'focusBlockChanged': (editor: OnesEditor, newBlock: BlockElement | null, oldBlock: BlockElement | null) => void;
|
|
@@ -343,15 +364,16 @@ export interface OnesEditorEvents {
|
|
|
343
364
|
'resize': (editor: OnesEditor) => void;
|
|
344
365
|
'load': (editor: OnesEditor, reload: boolean) => void;
|
|
345
366
|
'click': (editor: OnesEditor, event: MouseEvent) => void;
|
|
367
|
+
'clickLink': (editor: OnesEditor, event: MouseEvent, link: Element) => void;
|
|
346
368
|
'beforeClearSelection': (editor: OnesEditor) => void;
|
|
347
369
|
'afterClearSelection': (editor: OnesEditor) => void;
|
|
348
370
|
'blur': (editor: OnesEditor) => void;
|
|
349
371
|
'focus': (editor: OnesEditor) => void;
|
|
350
372
|
}
|
|
351
373
|
export interface OnesEditorSettingsProvider {
|
|
352
|
-
getItem: (key: string) =>
|
|
353
|
-
setItem: (key: string, value: string | null) =>
|
|
354
|
-
removeItem: (key: string) =>
|
|
374
|
+
getItem: (key: string) => string | null;
|
|
375
|
+
setItem: (key: string, value: string | null) => void;
|
|
376
|
+
removeItem: (key: string) => void;
|
|
355
377
|
}
|
|
356
378
|
export interface OnesEditorOptionalOptions {
|
|
357
379
|
shortcuts?: ShortcutRecords[];
|
|
@@ -399,7 +421,7 @@ export declare class OnesEditorCustomDataWrapper<T> {
|
|
|
399
421
|
private editor;
|
|
400
422
|
private data;
|
|
401
423
|
constructor(editor: OnesEditor, data: T);
|
|
402
|
-
getData
|
|
424
|
+
getData(): T;
|
|
403
425
|
getEditor(): OnesEditor;
|
|
404
426
|
destroy(): void;
|
|
405
427
|
}
|
|
@@ -409,10 +431,11 @@ export interface CloneBlockResultInfo {
|
|
|
409
431
|
blockIdMap: Map<string, string>;
|
|
410
432
|
}
|
|
411
433
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
412
|
-
addEventListener: (element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event:
|
|
434
|
+
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
413
435
|
removeEventListener: (element: Element | Document | Window | null, eventName: string | null, eventHandler: (editor: OnesEditor, event: Event) => void) => void;
|
|
414
436
|
removeAllListeners: (element: Element | Document | Window, eventName?: string) => void;
|
|
415
437
|
}
|
|
438
|
+
export type InsertTextOptions = InsertBlockOptions;
|
|
416
439
|
export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
417
440
|
readonly parent: HTMLElement;
|
|
418
441
|
readonly rootElement: HTMLDivElement;
|
|
@@ -445,6 +468,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
445
468
|
getCustom: <T extends OnesEditorCustom>(name: string) => T;
|
|
446
469
|
replaceCustom: <T extends OnesEditorCustom>(name: string, newCustom: T) => T;
|
|
447
470
|
findCustom: <T extends OnesEditorCustom>(name: string) => T | null;
|
|
471
|
+
findCustomByType: <T extends OnesEditorCustom>(className: new (editor: OnesEditor) => T) => T | null;
|
|
448
472
|
destroyCustom: (name: string) => void;
|
|
449
473
|
getComponentOptions: <T>(name: string) => T | null;
|
|
450
474
|
registerLocalEvents: (events: EditorDocLocalActionCallbacks) => void;
|
|
@@ -476,7 +500,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
476
500
|
contains: (node: Node) => boolean;
|
|
477
501
|
getSelectedText: () => string;
|
|
478
502
|
clearSelectedContents: () => void;
|
|
479
|
-
insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange) => BlockElement;
|
|
503
|
+
insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
|
|
480
504
|
insertEmbed: (containerId: string, blockIndex: number, embedType: string, embedData: DocEmbedData, newRange?: OnesEditorDocRange) => BlockElement;
|
|
481
505
|
deleteBlock: (block: BlockElement, newRange?: OnesEditorDocRange) => void;
|
|
482
506
|
getTextPosition: () => BlockTextPosition;
|
|
@@ -487,8 +511,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
487
511
|
getBlockText: (block: BlockElement) => DocBlockText;
|
|
488
512
|
setBlockText: (block: BlockElement, text: DocBlockText) => void;
|
|
489
513
|
getBoxData: (box: BoxElement) => DocBox;
|
|
490
|
-
deleteTextFromBlock: (block: BlockElement, offset: number, count: number) => number;
|
|
491
|
-
insertTextToBlock: (block: BlockElement, offset: number, text: string | DocBlockText) => DocBlockText;
|
|
514
|
+
deleteTextFromBlock: (block: BlockElement, offset: number, count: number, options?: InsertTextOptions) => number;
|
|
515
|
+
insertTextToBlock: (block: BlockElement, offset: number, text: string | DocBlockText, options?: InsertTextOptions) => DocBlockText;
|
|
492
516
|
insertBoxToBlock: (block: BlockElement, offset: number, boxData: DocBox) => DocBlockText;
|
|
493
517
|
mergeTextBlock: (block1: BlockElement, block2: BlockElement, options?: {
|
|
494
518
|
focus?: boolean;
|
|
@@ -496,6 +520,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
496
520
|
breakTextBlock: (block: BlockElement, offset: number, options?: BreakTextOptions) => BlockElement;
|
|
497
521
|
insertTextBlock: (text?: string | DocBlockText, containerId?: string, blockIndex?: number, options?: {
|
|
498
522
|
newRange?: OnesEditorDocRange;
|
|
523
|
+
insertBlockOptions?: InsertBlockOptions;
|
|
499
524
|
}) => BlockElement;
|
|
500
525
|
insertDoc: (block: BlockElement, offset: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => void;
|
|
501
526
|
insertDocAt: (container: ContainerElement, blockIndex: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => BlockElement[];
|
|
@@ -517,7 +542,7 @@ export interface OnesEditorSelection {
|
|
|
517
542
|
readonly startBlock: BlockElement;
|
|
518
543
|
readonly endBlock: BlockElement;
|
|
519
544
|
setSelection: (anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions) => SelectionRange;
|
|
520
|
-
setRange: (range: SelectionRange) => SelectionRange;
|
|
545
|
+
setRange: (range: SelectionRange, options?: ChangeSelectionOptions) => SelectionRange;
|
|
521
546
|
selectBlock: (block: BlockElement, start: number, end?: number) => void;
|
|
522
547
|
updateSelection: (old: SelectionRange | null) => void;
|
|
523
548
|
updateLastCaretRect: () => void;
|
|
@@ -525,6 +550,7 @@ export interface OnesEditorSelection {
|
|
|
525
550
|
getAnchorPos: () => BlockPosition;
|
|
526
551
|
getFocusedPos: () => BlockPosition;
|
|
527
552
|
scrollIntoView: () => void;
|
|
553
|
+
to: (type: 'text' | 'markdown' | 'html') => string;
|
|
528
554
|
}
|
|
529
555
|
export type RemoteChangeType = 'UpdateBlockText' | 'UpdateBlockData' | 'InsertBlock' | 'DeleteBlock' | 'InsertChildContainer' | 'DeleteChildContainer';
|
|
530
556
|
export interface OnesEditorInput {
|
|
@@ -538,6 +564,7 @@ export interface OnesEditorInput {
|
|
|
538
564
|
handleKeyDown: (event: KeyboardEvent) => void;
|
|
539
565
|
handleChanged: (action: OnesEditorUndoAction) => void;
|
|
540
566
|
handleRemoteChanged: (type: RemoteChangeType) => void;
|
|
567
|
+
handlePasteText: (text: string) => void;
|
|
541
568
|
addHandler: (handler: OnesEditorInputHandler) => void;
|
|
542
569
|
removeHandler: (handler: OnesEditorInputHandler) => void;
|
|
543
570
|
defaultInsertText: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => void;
|
|
@@ -561,10 +588,12 @@ export interface OnesEditorInputHandler {
|
|
|
561
588
|
handleAfterInsertText?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string) => boolean;
|
|
562
589
|
handleBeforeKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
563
590
|
handleAfterKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
564
|
-
|
|
565
|
-
|
|
591
|
+
handleBeforeCopy?: (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
|
|
592
|
+
handleBeforeCut?: (editor: OnesEditor, event: ClipboardEvent) => DocObject | boolean | undefined;
|
|
593
|
+
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
594
|
+
handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
566
595
|
handleBeforePasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
567
|
-
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
596
|
+
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo) => Promise<boolean>;
|
|
568
597
|
handleChanged?: (editor: OnesEditor, action: OnesEditorUndoAction) => void;
|
|
569
598
|
handleRemoteChanged?: (editor: OnesEditor, type: RemoteChangeType) => void;
|
|
570
599
|
handleCompositionStart?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number) => void;
|
|
@@ -576,6 +605,7 @@ export interface OnesEditorBlocks {
|
|
|
576
605
|
getBlockClass: (type: string) => Block;
|
|
577
606
|
createBlock: (path: BlockPath, container: ContainerElement, block: DocBlock) => BlockElement;
|
|
578
607
|
forEach: (callback: (blockClass: Block) => void) => void;
|
|
608
|
+
hasBlock: (type: string) => boolean;
|
|
579
609
|
}
|
|
580
610
|
export interface OnesEditorEmbeds {
|
|
581
611
|
registerEmbedClass: (embedClass: Embed) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockElement } from '../core';
|
|
1
|
+
import { BlockElement } from '../core/types';
|
|
2
2
|
export declare function isRootBlock(block: BlockElement): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../core/types';
|
|
2
|
+
export declare function findPrevVisibleSimpleBlock(editor: OnesEditor, block: BlockElement): BlockElement | null;
|
|
3
|
+
export declare function findNextVisibleSimpleBlock(editor: OnesEditor, block: BlockElement): BlockElement | null;
|
|
@@ -3,3 +3,4 @@ import type { OnesEditorHoveringBlockFilter, OnesEditorHoveringBlockFinder } fro
|
|
|
3
3
|
export { OnesEditorHoveringBlock, OnesEditorHoveringBlockFilter, OnesEditorHoveringBlockFinder };
|
|
4
4
|
export * from './block-helper';
|
|
5
5
|
export * from './run-once';
|
|
6
|
+
export * from './find-block';
|
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
declare const langs: {
|
|
2
|
+
'en-US': {
|
|
3
|
+
name: string;
|
|
4
|
+
date: {
|
|
5
|
+
dateFromFuture: string;
|
|
6
|
+
dateJustNow: string;
|
|
7
|
+
dateYesterday: string;
|
|
8
|
+
dateMinutesAgo: string;
|
|
9
|
+
date1HourAgo: string;
|
|
10
|
+
dateHoursAgo: string;
|
|
11
|
+
dateDaysAgo: string;
|
|
12
|
+
dateWeeksAgo: string;
|
|
13
|
+
};
|
|
14
|
+
common: {
|
|
15
|
+
cancel: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
'zh-CN': {
|
|
19
|
+
name: string;
|
|
20
|
+
date: {
|
|
21
|
+
dateFromFuture: string;
|
|
22
|
+
dateJustNow: string;
|
|
23
|
+
dateYesterday: string;
|
|
24
|
+
dateMinutesAgo: string;
|
|
25
|
+
date1HourAgo: string;
|
|
26
|
+
dateHoursAgo: string;
|
|
27
|
+
dateDaysAgo: string;
|
|
28
|
+
dateWeeksAgo: string;
|
|
29
|
+
};
|
|
30
|
+
common: {
|
|
31
|
+
cancel: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
'ja-JP': {
|
|
35
|
+
name: string;
|
|
36
|
+
date: {
|
|
37
|
+
dateFromFuture: string;
|
|
38
|
+
dateJustNow: string;
|
|
39
|
+
dateYesterday: string;
|
|
40
|
+
dateMinutesAgo: string;
|
|
41
|
+
date1HourAgo: string;
|
|
42
|
+
dateHoursAgo: string;
|
|
43
|
+
dateDaysAgo: string;
|
|
44
|
+
dateWeeksAgo: string;
|
|
45
|
+
};
|
|
46
|
+
common: {
|
|
47
|
+
cancel: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
1
51
|
export declare function setLang(lang?: string | null | undefined): void;
|
|
2
52
|
export declare function mergeLang(l: any): void;
|
|
3
53
|
export declare function t(key: string, args?: Record<string, string>): string;
|
|
54
|
+
export type LANGS = keyof typeof langs;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
date: {
|
|
4
|
+
dateFromFuture: string;
|
|
5
|
+
dateJustNow: string;
|
|
6
|
+
dateYesterday: string;
|
|
7
|
+
dateMinutesAgo: string;
|
|
8
|
+
date1HourAgo: string;
|
|
9
|
+
dateHoursAgo: string;
|
|
10
|
+
dateDaysAgo: string;
|
|
11
|
+
dateWeeksAgo: string;
|
|
12
|
+
};
|
|
13
|
+
common: {
|
|
14
|
+
cancel: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|