@ones-editor/editor 0.0.3-beta.9 → 0.0.3-beta.91
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/index.d.ts +1 -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/items/block-command-items.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- 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/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 +3 -0
- package/@ones-editor/code-block/src/locale/ja-jp.d.ts +10 -0
- package/@ones-editor/code-block/src/locale/zh-cn.d.ts +3 -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-item/comment-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments/comments.d.ts +4 -4
- 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 +2 -10
- package/@ones-editor/comments/src/comments-list/group-item.d.ts +1 -0
- package/@ones-editor/comments/src/comments-list/group-list.d.ts +4 -2
- 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/types.d.ts +11 -4
- 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/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 +6 -2
- 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-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 +36 -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 +36 -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 +1 -0
- package/@ones-editor/core/src/utils/logger/index.d.ts +9 -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/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 +2 -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 +5 -0
- package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
- package/@ones-editor/file/src/file-embed/card/index.d.ts +3 -3
- package/@ones-editor/file/src/index.d.ts +1 -0
- package/@ones-editor/file/src/types.d.ts +1 -0
- package/@ones-editor/find-dialog/src/find-dialog.d.ts +1 -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 +3 -2
- 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 +7 -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 +1 -1
- package/@ones-editor/image-embed/src/image-dom/image-item.d.ts +3 -1
- package/@ones-editor/image-embed/src/image-file.d.ts +5 -0
- package/@ones-editor/image-embed/src/image-object.d.ts +3 -0
- 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/shortcuts/copy-image.d.ts +2 -0
- 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/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 +1 -1
- 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 +7 -4
- package/@ones-editor/media-embed/src/utils/file.d.ts +1 -1
- 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/mention.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/sharedb-client.d.ts +3 -3
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +6 -1
- 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-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-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-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 +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +4 -3
- package/@ones-editor/ui/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +2 -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 -10
- package/@ones-editor/ui/src/quick-menu/index.d.ts +6 -0
- package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -14
- 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 +4 -1
- package/@ones-editor/ui/src/tooltips/index.d.ts +4 -0
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +4 -1
- 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 +4 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +6 -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/index.d.ts +1 -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/zh-cn.d.ts +1 -0
- package/@ones-editor/versions/src/types.d.ts +1 -0
- package/@ones-editor/versions/src/version-dialog/index.d.ts +3 -1
- 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 -7
- package/dist/comments/local-doc-comments-provider.d.ts +18 -0
- package/dist/comments/{comments-provider.d.ts → sharedb-doc-comments-provider.d.ts} +3 -6
- package/dist/index.d.ts +16 -3
- package/dist/index.js +246 -292
- package/dist/lang/en-us.d.ts +14 -0
- package/dist/lang/index.d.ts +1 -0
- package/dist/lang/zh-cn.d.ts +14 -0
- package/dist/types.d.ts +36 -2
- package/package.json +6 -4
- package/@ones-editor/e2e/cypress/support/commands.d.ts +0 -19
- package/@ones-editor/e2e/cypress/support/e2e.d.ts +0 -1
- package/@ones-editor/e2e/cypress.config.d.ts +0 -3
- package/@ones-editor/e2e/package.json +0 -13
- package/@ones-editor/e2e/src/block-menu/menu-list.cy.d.ts +0 -0
- package/@ones-editor/e2e/src/data.d.ts +0 -106
- package/@ones-editor/e2e/src/input-handlers/case.d.ts +0 -10
- package/@ones-editor/e2e/src/input-handlers/shortcut.cy.d.ts +0 -1
- package/@ones-editor/e2e/src/list-block/case.d.ts +0 -8
- package/@ones-editor/e2e/src/list-block/list.cy.d.ts +0 -1
- package/@ones-editor/e2e/src/toc/case.d.ts +0 -5
- package/@ones-editor/e2e/src/toc/toc.cy.d.ts +0 -1
- package/@ones-editor/list-block/src/command/covert-to-list.d.ts +0 -3
- /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
import { DocDetailsBlock } from './types';
|
|
3
|
+
export declare function createEmptyDetailsData(editor: OnesEditor, options?: {
|
|
4
|
+
title?: string;
|
|
5
|
+
}): {
|
|
6
|
+
blockData: DocDetailsBlock;
|
|
7
|
+
focusBlockId: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BlockContentElement, BlockElement, BlockPath, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
import { DocDetailsBlock } from './types';
|
|
3
|
+
export declare function createDetails(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocDetailsBlock): BlockContentElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../@ones-editor/core';
|
|
2
|
+
export default class DetailsObject implements OnesEditorCustom {
|
|
3
|
+
private editor;
|
|
4
|
+
private blockId;
|
|
5
|
+
private _expanded;
|
|
6
|
+
constructor(editor: OnesEditor, blockId: string);
|
|
7
|
+
destroy(): void;
|
|
8
|
+
get expanded(): boolean;
|
|
9
|
+
set expanded(value: boolean);
|
|
10
|
+
static get(editor: OnesEditor, block: BlockElement | string): DetailsObject;
|
|
11
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare function getDetailsContainer(block: BlockElement): ContainerElement;
|
|
3
|
+
export declare function updateExpanded(editor: OnesEditor, block: BlockElement, expanded: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnesEditor,
|
|
1
|
+
import type { OnesEditor, BlockElement } from '../../../../@ones-editor/core';
|
|
2
2
|
import { type EmbedElement, DrawIoData, GraphDataType, XmlData, XmlSvgData, SrcData, DrawIoOptions } from '../../types';
|
|
3
3
|
import '../../types/window.d';
|
|
4
4
|
export declare function getDrawioOptions(editor: OnesEditor): DrawIoOptions;
|
|
@@ -11,8 +11,8 @@ export declare function initializeDrawioIframe(editor: OnesEditor): Promise<{
|
|
|
11
11
|
drawioIframe: HTMLIFrameElement;
|
|
12
12
|
exit: () => void;
|
|
13
13
|
}>;
|
|
14
|
-
export declare function contactWithIframe(editor: OnesEditor, block:
|
|
15
|
-
export declare function editGraph(editor: OnesEditor, block:
|
|
14
|
+
export declare function contactWithIframe(editor: OnesEditor, block: BlockElement, drawIoData: DrawIoData, iframe: HTMLIFrameElement, loaded: () => void, exit: () => void, isInitializationCompleted: boolean): void;
|
|
15
|
+
export declare function editGraph(editor: OnesEditor, block: BlockElement, data: DrawIoData, isInitializationCompleted: boolean): Promise<void>;
|
|
16
16
|
export declare function initDrawIo(editor: OnesEditor): Promise<void>;
|
|
17
17
|
export declare function removeDrawioEmptyStatus(el: HTMLElement): void;
|
|
18
18
|
export declare function addDrawioEmptyStatus(el: HTMLElement): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OnesEditor,
|
|
1
|
+
import { type OnesEditor, BlockElement } from '@ones-editor/core';
|
|
2
2
|
export type WithNull<T> = T | null;
|
|
3
3
|
export type EmbedElement = HTMLElement & {
|
|
4
4
|
__neverUse: 'EmbedElement';
|
|
@@ -7,7 +7,7 @@ export interface DrawIoData {
|
|
|
7
7
|
xml?: string;
|
|
8
8
|
xmlSvg?: string;
|
|
9
9
|
src?: string;
|
|
10
|
-
|
|
10
|
+
height?: number;
|
|
11
11
|
}
|
|
12
12
|
export type UpdateFnTypes<T> = (data: T, embed: EmbedElement, editor?: OnesEditor) => void;
|
|
13
13
|
export interface XmlData {
|
|
@@ -34,6 +34,6 @@ export interface DrawIoOptions {
|
|
|
34
34
|
onError?: (editor: OnesEditor, error: Error) => void;
|
|
35
35
|
onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
|
|
36
36
|
onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
|
|
37
|
-
onBeginInitDrawIo?: (editor: OnesEditor, block:
|
|
37
|
+
onBeginInitDrawIo?: (editor: OnesEditor, block: BlockElement) => void;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
import DropIndicator from './drop-indicator';
|
|
3
3
|
export interface DropHandler {
|
|
4
|
-
handleDrop: (editor: OnesEditor,
|
|
4
|
+
handleDrop: (editor: OnesEditor, dragData: BlockElement | File[], targetContainer: ContainerElement, blockIndex: number) => boolean | undefined;
|
|
5
5
|
}
|
|
6
6
|
export default class OnesEditorDropTarget {
|
|
7
7
|
private editor;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OnesEditor, ContainerElement, BlockElement } from '../../../../@ones-editor/core';
|
|
2
|
+
import type { DropHandler } from '../drop-target';
|
|
3
|
+
export declare class DropFileHandler implements DropHandler {
|
|
4
|
+
private editor;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
handleDrop: (editor: OnesEditor, dragData: BlockElement | File[], targetContainer: ContainerElement, blockIndex: number) => boolean;
|
|
7
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import OnesEditorDropTarget from './drop-target';
|
|
2
2
|
import type { DropHandler } from './drop-target';
|
|
3
|
+
import { patchInsertFile } from './handlers/patch-insert-file';
|
|
3
4
|
export * from './drag-object';
|
|
4
|
-
export { OnesEditorDropTarget, DropHandler };
|
|
5
|
+
export { OnesEditorDropTarget, DropHandler, patchInsertFile };
|
|
@@ -8,10 +8,11 @@ export interface StandardEmbedBlockProperties<T = PresetCommandId> {
|
|
|
8
8
|
export declare function addCommentToBlock(editor: OnesEditor, block: BlockElement): boolean;
|
|
9
9
|
export declare class StandardEmbedBlockCommands<T = PresetCommandId> implements BlockCommands {
|
|
10
10
|
protected editor: OnesEditor;
|
|
11
|
+
protected block: BlockElement;
|
|
11
12
|
protected properties?: StandardEmbedBlockProperties<T> | undefined;
|
|
12
13
|
group: string;
|
|
14
|
+
constructor(editor: OnesEditor, block: BlockElement, properties?: StandardEmbedBlockProperties<T> | undefined);
|
|
13
15
|
_commands: CommandItem[];
|
|
14
|
-
constructor(editor: OnesEditor, properties?: StandardEmbedBlockProperties<T> | undefined);
|
|
15
16
|
get commands(): CommandItem[];
|
|
16
17
|
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
17
18
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { BlockResizer } from '../../../../@ones-editor/block-resizer';
|
|
3
|
+
export declare class EmbedBlockResizer {
|
|
4
|
+
private editor;
|
|
5
|
+
blockResizer: BlockResizer;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
handleResizing: (resizer: BlockResizer, rect: DOMRect) => void;
|
|
8
|
+
destroy(): void;
|
|
9
|
+
handleHoveringBlockChange: (block: BlockElement | null, old: BlockElement | null) => void;
|
|
10
|
+
tryEnableResizer(block: BlockElement): void;
|
|
11
|
+
disableResizer(): void;
|
|
12
|
+
static get(editor: OnesEditor): EmbedBlockResizer;
|
|
13
|
+
static register(editor: OnesEditor, block: BlockElement): EmbedBlockResizer;
|
|
14
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { OnesEditor } from 'packages/core/src';
|
|
2
|
+
import { ExcalidrawSvgMetadata } from '../types';
|
|
3
|
+
export declare function downloadDataFromUrl(url: string): Promise<ExcalidrawSvgMetadata | null>;
|
|
4
|
+
export declare function uploadSvg(editor: OnesEditor, svg: SVGSVGElement, metadata: ExcalidrawSvgMetadata): Promise<import("packages/core/src").UploadResourceResult>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlockElement, BlockPath, ContainerElement, DocBlock, OnesEditor, OnesEditorBlockHook } from '../../../@ones-editor/core';
|
|
2
|
+
export default class BlockExclusiveHook implements OnesEditorBlockHook {
|
|
3
|
+
writable(editor: OnesEditor, blockElement: BlockElement): boolean | undefined;
|
|
4
|
+
create(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
5
|
+
update(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor, OnesEditorCustom, OnesEditorDocCallbacks, OnesEditorUser } from '../../../@ones-editor/core';
|
|
2
|
+
import { ExclusiveBlockMessage } from './types';
|
|
3
|
+
export declare class OnesEditorExclusiveBlock implements OnesEditorCustom, OnesEditorDocCallbacks {
|
|
4
|
+
private editor;
|
|
5
|
+
exclusiveBlockIds: Set<string>;
|
|
6
|
+
exclusiveBlockTimer: number;
|
|
7
|
+
remoteExclusiveBlockIds: Map<string, ExclusiveBlockMessage>;
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
onCustomMessage(msg: unknown): void;
|
|
11
|
+
handleUserChanged: (users: OnesEditorUser[]) => void;
|
|
12
|
+
getExclusiveMessage(blockId: string): ExclusiveBlockMessage | undefined;
|
|
13
|
+
broadcastExclusiveBlockMessage(blocks: BlockElement[], exclusive: boolean): void;
|
|
14
|
+
exclusiveBlock(block: BlockElement): void;
|
|
15
|
+
unexclusiveBlock(block: BlockElement): void;
|
|
16
|
+
startExclusiveBlockTimer(): void;
|
|
17
|
+
stopExclusiveBlockTimer(): void;
|
|
18
|
+
static get(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
19
|
+
static register(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
20
|
+
}
|
|
21
|
+
export declare function exclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
22
|
+
export declare function unexclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare function addExclusiveStyle(block: BlockElement, userId: string, displayName: string): void;
|
|
3
|
+
export declare function removeExclusiveStyle(block: BlockElement): void;
|
|
4
|
+
export declare function updateBlockExclusive(editor: OnesEditor, block: BlockElement, exclusive: boolean, userId: string, displayName: string): void;
|
|
5
|
+
export declare function isExclusiveBlock(block: BlockElement): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditorExclusiveBlock } from './exclusive-block';
|
|
2
|
+
import BlockExclusiveHook from './exclusive-block-hook';
|
|
3
|
+
import './exclusive-block-styles.scss';
|
|
4
|
+
export { exclusiveBlock, unexclusiveBlock } from './exclusive-block';
|
|
5
|
+
export { BlockExclusiveHook, OnesEditorExclusiveBlock };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BlockContentElement } from '../../../../../@ones-editor/core';
|
|
1
|
+
import { OnesEditor, BlockContentElement } from '../../../../../@ones-editor/core';
|
|
2
2
|
import { FileEmbedData } from '../../types';
|
|
3
|
-
export declare function renderFileCard(content: BlockContentElement, data: FileEmbedData): {
|
|
3
|
+
export declare function renderFileCard(editor: OnesEditor, content: BlockContentElement, data: FileEmbedData): Promise<{
|
|
4
4
|
card: HTMLDivElement;
|
|
5
5
|
downloadButton: HTMLButtonElement;
|
|
6
|
-
}
|
|
6
|
+
}>;
|
|
@@ -19,4 +19,5 @@ export interface FileEmbedData extends DocEmbedData, FileData {
|
|
|
19
19
|
export interface FileOptions {
|
|
20
20
|
onClick?: (editor: OnesEditor, elem: BlockElement | BoxElement, event: MouseEvent) => void;
|
|
21
21
|
onDownloadFile?: (editor: OnesEditor, data: FileData) => void;
|
|
22
|
+
renderFileCardIcon?: (editor: OnesEditor, blockData: FileEmbedData) => Promise<false | HTMLImageElement>;
|
|
22
23
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { BlockProperties } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { OnesEditor, BlockContentElement, DocEmbedBlock, Logger } from '../../../../@ones-editor/core';
|
|
2
|
+
import type { OnesEditor, BlockContentElement, DocEmbedBlock, BlockElement, Logger } from '../../../../@ones-editor/core';
|
|
3
3
|
import type { GraphType, GraphEmbedBlockProperties } from './graph-block-commands';
|
|
4
4
|
export default abstract class GraphBase {
|
|
5
5
|
private graphType;
|
|
6
6
|
private codeEmbedDataKey;
|
|
7
7
|
protected editor: OnesEditor;
|
|
8
8
|
logger: Logger;
|
|
9
|
+
editing: boolean;
|
|
9
10
|
constructor(editor: OnesEditor, graphType: GraphType, codeEmbedDataKey: string);
|
|
10
11
|
protected abstract code2ObjectUrl(code: string): Promise<string>;
|
|
11
12
|
protected abstract code2ResourceId(code: string): Promise<string>;
|
|
@@ -18,6 +19,6 @@ export default abstract class GraphBase {
|
|
|
18
19
|
protected updateImage(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, err: Error | null): Promise<void>;
|
|
19
20
|
protected updateClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
|
|
20
21
|
editGraph(content: BlockContentElement): void;
|
|
21
|
-
getBlockProperties(properties?: GraphEmbedBlockProperties): BlockProperties;
|
|
22
|
+
getBlockProperties(block: BlockElement, properties?: GraphEmbedBlockProperties): BlockProperties;
|
|
22
23
|
private hasChanged;
|
|
23
24
|
}
|
|
@@ -6,14 +6,15 @@ export type GraphType = 'mermaid' | 'flowchart' | 'plantuml';
|
|
|
6
6
|
export type GraphEmbedBlockProperties = StandardEmbedBlockProperties<PresetCommandId>;
|
|
7
7
|
declare class GraphBlockCommands extends StandardEmbedBlockCommands<PresetCommandId> {
|
|
8
8
|
editor: OnesEditor;
|
|
9
|
+
block: BlockElement;
|
|
9
10
|
graphType: GraphType;
|
|
10
11
|
properties?: GraphEmbedBlockProperties | undefined;
|
|
11
12
|
group: string;
|
|
12
13
|
_commands: CommandItem[];
|
|
13
|
-
constructor(editor: OnesEditor, graphType: GraphType, properties?: GraphEmbedBlockProperties | undefined);
|
|
14
|
+
constructor(editor: OnesEditor, block: BlockElement, graphType: GraphType, properties?: GraphEmbedBlockProperties | undefined);
|
|
14
15
|
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
15
16
|
}
|
|
16
|
-
export declare function getGraphEmbedBlockProperties(editor: OnesEditor, type: 'mermaid' | 'flowchart' | 'plantuml', properties?: GraphEmbedBlockProperties): {
|
|
17
|
+
export declare function getGraphEmbedBlockProperties(editor: OnesEditor, block: BlockElement, type: 'mermaid' | 'flowchart' | 'plantuml', properties?: GraphEmbedBlockProperties): {
|
|
17
18
|
blockCommands: {
|
|
18
19
|
'hovering-toolbar': GraphBlockCommands;
|
|
19
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DropHandler } from '../../../../@ones-editor/drop-target';
|
|
2
2
|
import { OnesEditor, BlockElement, ContainerElement } from '../../../../@ones-editor/core';
|
|
3
3
|
export default class HeadingBlockDropHandler implements DropHandler {
|
|
4
|
-
handleDrop(editor: OnesEditor,
|
|
4
|
+
handleDrop(editor: OnesEditor, dragData: BlockElement | File[], targetContainer: ContainerElement, blockIndex: number): boolean | undefined;
|
|
5
5
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DocObject, OnesEditor, OnesEditorCustom, OnesEditorInputHandler } from '../../../@ones-editor/core';
|
|
2
|
+
export declare class ImageCopyHandler implements OnesEditorInputHandler, OnesEditorCustom {
|
|
3
|
+
private editor;
|
|
4
|
+
constructor(editor: OnesEditor);
|
|
5
|
+
handleBeforeCopy(editor: OnesEditor, event: ClipboardEvent, doc: DocObject): boolean | DocObject | undefined;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
export default class OnesEditorImageDragHandler {
|
|
3
3
|
private editor;
|
|
4
|
+
img: HTMLImageElement;
|
|
5
|
+
private dragContainer;
|
|
6
|
+
private startPosition;
|
|
4
7
|
constructor(editor: OnesEditor);
|
|
5
8
|
destroy(): void;
|
|
6
9
|
handleDragStart: (event: DragEvent) => Promise<void>;
|
|
10
|
+
handleDrag: (e: DragEvent) => void;
|
|
7
11
|
handleDragEnd: () => void;
|
|
8
12
|
}
|
|
9
13
|
declare global {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { BlockElement, DragObject, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
import { ImageDragInsertPos } from './types';
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getDragInsertPos(editor: OnesEditor, block: BlockElement, images: HTMLElement[], x: number, y?: number): {
|
|
4
|
+
rect: DOMRect;
|
|
5
|
+
data: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function handleDropOver(editor: OnesEditor, block: BlockElement, dragObject: DragObject | DataTransferItemList | null, x: number, y: number): ImageDragInsertPos | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BlockElement, DragObject, DropInsertPos, DropOptions, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleDrop(editor: OnesEditor, block: BlockElement,
|
|
2
|
+
export declare function handleDrop(editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions): boolean | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditor, OnesEditorInputHandler } from '../../../@ones-editor/core';
|
|
2
|
+
declare class EmptyImageConverterInputHandler implements OnesEditorInputHandler {
|
|
3
|
+
handleAfterInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): boolean;
|
|
4
|
+
}
|
|
5
|
+
export default EmptyImageConverterInputHandler;
|
|
@@ -7,5 +7,5 @@ export declare function getImages(data: ImageEmbedData): ImageItemData[];
|
|
|
7
7
|
export declare function getWidthPercent(blockData: DocEmbedBlock): number;
|
|
8
8
|
export declare function calImageBlockStyleWidth(editor: OnesEditor, blockData: DocEmbedBlock): string;
|
|
9
9
|
export declare function toImageEmbedData(images: ImageItemData[], widthPercent: number): ImageEmbedData;
|
|
10
|
-
export declare function calBlockHeight(editor: OnesEditor, imageData: DocEmbedBlock, parentContainerElement: ContainerElement): number;
|
|
10
|
+
export declare function calBlockHeight(editor: OnesEditor, imageData: DocEmbedBlock, parentContainerElement: ContainerElement): number | "";
|
|
11
11
|
export declare function getTotalFlex(images: ImageItemData[]): number;
|
|
@@ -4,7 +4,9 @@ export declare function getImageContainers(eventTarget: EventTarget | null): HTM
|
|
|
4
4
|
export declare function getParentImageContainer(target: EventTarget | null): HTMLElement | null;
|
|
5
5
|
export declare function getParentImageIndex(target: EventTarget | null): number;
|
|
6
6
|
export declare function handleUploadError(editor: OnesEditor, block: BlockElement, index: number, err: Error, file: File): void;
|
|
7
|
-
export declare function createImageEmbedContent(editor: OnesEditor, block: BlockElement, blockContent: BlockContentElement, images: ImageItemData[], selectedIndex: number
|
|
7
|
+
export declare function createImageEmbedContent(editor: OnesEditor, block: BlockElement, blockContent: BlockContentElement, images: ImageItemData[], selectedIndex: number, options: {
|
|
8
|
+
autoFix: boolean;
|
|
9
|
+
}): HTMLDivElement;
|
|
8
10
|
export declare function updateImageItem(editor: OnesEditor, block: BlockElement, imageData: ImageItemData, index: number, selectedIndex: number, images: ImageItemData[]): void;
|
|
9
11
|
export declare function getImageContainer(block: BlockElement, index: number): HTMLElement;
|
|
10
12
|
export declare function reloadImageItem(editor: OnesEditor, eventTarget: EventTarget | null): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare function getAccepts(editor: OnesEditor): string;
|
|
3
|
+
export declare function getFileExt(file: File): string;
|
|
4
|
+
export declare function verifyFile(editor: OnesEditor, file: File): void;
|
|
5
|
+
export declare function isImageFile(fileType: string): boolean;
|
|
@@ -9,8 +9,11 @@ export declare class ImageObject implements ImageObjectBase {
|
|
|
9
9
|
blockResizer: BlockResizer;
|
|
10
10
|
private resizing;
|
|
11
11
|
private parentContainerResizerObserver;
|
|
12
|
+
private autoFix;
|
|
12
13
|
constructor(editor: OnesEditor, blockData: DocEmbedBlock);
|
|
13
14
|
destroy(): void;
|
|
15
|
+
setAutoFix(autoFix: boolean): void;
|
|
16
|
+
isAutoFix(): boolean;
|
|
14
17
|
createContent(parentContainer: ContainerElement, block: BlockElement, blockContent: BlockContentElement): void;
|
|
15
18
|
getImages(): ImageItemData[];
|
|
16
19
|
getWidthPercent(): number;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
export default class ImageResizer {
|
|
3
3
|
private editor;
|
|
4
|
+
currentResizer: BlockElement | null;
|
|
4
5
|
constructor(editor: OnesEditor);
|
|
5
6
|
destroy(): void;
|
|
7
|
+
disable(block: BlockElement): void;
|
|
8
|
+
enable(block: BlockElement): void;
|
|
6
9
|
handleHoveringBlockChange: (block: BlockElement | null, old: BlockElement | null) => void;
|
|
7
10
|
}
|
|
@@ -2,8 +2,9 @@ import { Embed } from '../../../@ones-editor/core';
|
|
|
2
2
|
import { ImageObject } from './image-object';
|
|
3
3
|
import './image-embed-style.scss';
|
|
4
4
|
import './locale';
|
|
5
|
+
import EmptyImageConverterInputHandler from './empty-image-converter';
|
|
5
6
|
export * from './shortcuts';
|
|
6
7
|
export * from './types';
|
|
7
8
|
export { ImageObject };
|
|
8
9
|
declare const ImageEmbed: Embed;
|
|
9
|
-
export { ImageEmbed };
|
|
10
|
+
export { ImageEmbed, EmptyImageConverterInputHandler };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { DocEmbedData, OnesEditorCustom, TextAlign } from '../../../@ones-editor/core';
|
|
1
|
+
import { DocEmbedData, OnesEditor, OnesEditorCustom, TextAlign } from '../../../@ones-editor/core';
|
|
2
2
|
export interface ImageOptions {
|
|
3
3
|
defaultAlign?: TextAlign;
|
|
4
|
+
allowedMedias?: string[];
|
|
5
|
+
maxSize?: number;
|
|
6
|
+
callbacks?: {
|
|
7
|
+
onError?: (editor: OnesEditor, error: Error) => void;
|
|
8
|
+
};
|
|
4
9
|
}
|
|
5
10
|
export interface ImageEmbedData extends DocEmbedData {
|
|
6
11
|
src: string | string[];
|
|
@@ -26,4 +31,6 @@ export interface ImageObjectBase extends OnesEditorCustom {
|
|
|
26
31
|
requestUploadImage: (index: number) => Promise<void>;
|
|
27
32
|
setResizing: (resizing: boolean) => void;
|
|
28
33
|
resetFlex: () => void;
|
|
34
|
+
setAutoFix: (val: boolean) => void;
|
|
35
|
+
isAutoFix: () => boolean;
|
|
29
36
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { DocListBlock, ListBlockType } from '../types';
|
|
3
|
+
type ConvertToListData = {
|
|
4
|
+
listType?: ListBlockType;
|
|
5
|
+
};
|
|
6
|
+
export declare function findNearestList(srcBlock: BlockElement, type: ListBlockType): BlockElement | null;
|
|
7
|
+
export declare function convertToList(editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
8
|
+
offset: number;
|
|
9
|
+
data?: ConvertToListData;
|
|
10
|
+
}): {
|
|
11
|
+
blockData: DocListBlock;
|
|
12
|
+
onConverted: (editor: OnesEditor, block: BlockElement) => void;
|
|
13
|
+
} | null;
|
|
14
|
+
export {};
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type ConvertToListData = {
|
|
4
|
-
listType?: ListBlockType;
|
|
5
|
-
};
|
|
6
|
-
export declare function findNearestList(srcBlock: BlockElement, type: ListBlockType): BlockElement | null;
|
|
7
|
-
export declare function convertToList(editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
8
|
-
offset: number;
|
|
9
|
-
data?: ConvertToListData;
|
|
10
|
-
}): {
|
|
11
|
-
blockData: DocListBlock;
|
|
12
|
-
onConverted: (editor: OnesEditor, block: BlockElement) => void;
|
|
13
|
-
} | null;
|
|
14
|
-
export {};
|
|
1
|
+
export * from './convert-to-list';
|
|
2
|
+
export * from './convert-list-to';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OnesEditor, BlockElement, DragObject, DropInsertPos, DropOptions } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleListDrop(editor: OnesEditor, block: BlockElement,
|
|
2
|
+
export declare function handleListDrop(editor: OnesEditor, block: BlockElement, dragData: DragObject | File[], insertPos: DropInsertPos, options: DropOptions): boolean;
|
|
@@ -2,8 +2,9 @@ import { TextKindBlock } from '../../../@ones-editor/core';
|
|
|
2
2
|
import OnesEditorListMindmap from './mindmap';
|
|
3
3
|
import './lang';
|
|
4
4
|
import './style.scss';
|
|
5
|
+
import { getListAllNextBrothers } from './utils/list-brother';
|
|
6
|
+
import { resetListStart } from './start/reset-list-start';
|
|
5
7
|
export { type ListOptions } from './types';
|
|
6
8
|
declare const ListBlock: TextKindBlock;
|
|
7
|
-
export * from './command/covert-to-list';
|
|
8
9
|
export * from './keyboard/to-text-block';
|
|
9
|
-
export { ListBlock, OnesEditorListMindmap, };
|
|
10
|
+
export { ListBlock, OnesEditorListMindmap, resetListStart, getListAllNextBrothers, };
|