@ones-editor/editor 2.1.7-beta.3 → 2.1.7-beta.30
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/block-menu/src/block-menu-button/menu-button/index.d.ts +1 -1
- package/@ones-editor/block-menu/src/index.d.ts +0 -1
- package/@ones-editor/block-padding/src/index.d.ts +1 -1
- package/@ones-editor/block-resizer/src/index.d.ts +1 -0
- package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +3 -4
- package/@ones-editor/callout-block/src/index.d.ts +1 -0
- package/@ones-editor/comments/src/block-hook/block-comment-hook.d.ts +10 -0
- package/@ones-editor/comments/src/comment-quick-reply/index.d.ts +1 -0
- package/@ones-editor/comments/src/comments-helper/get-comment-abstract.d.ts +2 -1
- package/@ones-editor/comments/src/index.d.ts +2 -1
- package/@ones-editor/comments/src/text-comments/comments-command-provider.d.ts +4 -3
- package/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/execute-block-command.d.ts +2 -2
- package/@ones-editor/core/src/core/blocks/complex-blocks/complex-block-helper.d.ts +2 -5
- package/@ones-editor/core/src/core/blocks/text-blocks/base/child.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/line-breaks.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/range.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/text-offset.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/text-block/to-plain-html.d.ts +2 -2
- package/@ones-editor/core/src/core/command-providers/abstract-providers.d.ts +25 -0
- package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +16 -0
- package/@ones-editor/core/src/core/command-providers/commands/index.d.ts +2 -0
- package/@ones-editor/core/src/core/command-providers/commands/inject-source.d.ts +3 -0
- package/@ones-editor/core/src/core/command-providers/commands/merge-commands.d.ts +4 -0
- package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +2 -5
- package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +5 -14
- package/@ones-editor/core/src/core/command-providers/index.d.ts +3 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +2 -2
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -0
- package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -2
- package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
- package/@ones-editor/core/src/core/doc/rich-text/text-style.d.ts +2 -0
- package/@ones-editor/core/src/core/editor/actions/clear-selected-contents.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/index.d.ts +1 -1
- package/@ones-editor/core/src/core/input-handler/input-handler.d.ts +2 -1
- package/@ones-editor/core/src/core/insertions/editor-insertions.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/actions/index.d.ts +2 -1
- package/@ones-editor/core/src/core/selection/adjust-selection-pos.d.ts +5 -1
- package/@ones-editor/core/src/core/selection/index.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/select-handler.d.ts +3 -3
- package/@ones-editor/core/src/core/types.d.ts +45 -30
- package/@ones-editor/core/src/core/undo-manager/actions/action.d.ts +5 -1
- package/@ones-editor/core/src/core/undo-manager/actions/block-action.d.ts +1 -0
- package/@ones-editor/core/src/core/undo-manager/actions/update-block-data-action.d.ts +1 -0
- package/@ones-editor/core/src/helper/hovering-block.d.ts +3 -4
- package/@ones-editor/core/src/utils/animate-scroll.d.ts +2 -0
- package/@ones-editor/core/src/utils/dom.d.ts +4 -1
- package/@ones-editor/core/src/utils/drag-drop.d.ts +8 -3
- package/@ones-editor/embed-block-helper/src/block-properties/embed-block-properties.d.ts +6 -5
- package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +1 -0
- package/@ones-editor/excalidraw/package.json +4 -0
- package/@ones-editor/file/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/file/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/file/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +5 -19
- package/@ones-editor/html-to-doc/src/html-to-doc/normal-html/underline.d.ts +1 -0
- package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +1 -1
- package/@ones-editor/image-embed/src/image-object.d.ts +1 -0
- package/@ones-editor/image-embed/src/splitter-resizer/index.d.ts +3 -3
- package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/layout-block/src/command-filter.d.ts +6 -0
- package/@ones-editor/layout-block/src/index.d.ts +1 -0
- package/@ones-editor/list-block/src/index.d.ts +2 -1
- package/@ones-editor/list-block/src/list-data/index.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/index.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/items/comment.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/items/find.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/items/font-style.d.ts +13 -1
- package/@ones-editor/main-toolbar/src/items/index.d.ts +8 -4
- package/@ones-editor/main-toolbar/src/items/insert.d.ts +12 -0
- package/@ones-editor/main-toolbar/src/items/link.d.ts +1 -1
- package/@ones-editor/main-toolbar/src/items/list.d.ts +4 -4
- package/@ones-editor/main-toolbar/src/items/quote.d.ts +1 -1
- package/@ones-editor/main-toolbar/src/items/text-color.d.ts +39 -2
- package/@ones-editor/main-toolbar/src/items/undo.d.ts +18 -0
- package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +9 -0
- package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +9 -0
- package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +9 -0
- package/@ones-editor/markdown-to-doc/src/custom/tag.d.ts +8 -0
- package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/custom-tag.d.ts +4 -0
- package/@ones-editor/markdown-to-doc/src/tokens/inline-tokens/html.d.ts +2 -0
- package/@ones-editor/mathjax/package.json +2 -1
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +1 -0
- package/@ones-editor/mathjax/src/mathjax-state/index.d.ts +2 -0
- package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +3 -10
- package/@ones-editor/media-embed/src/utils/dom.d.ts +2 -0
- package/@ones-editor/mention/src/locale/en-us.d.ts +3 -0
- package/@ones-editor/mention/src/locale/ja-jp.d.ts +3 -0
- package/@ones-editor/mention/src/locale/zh-cn.d.ts +3 -0
- package/@ones-editor/mention/src/mention.d.ts +24 -1
- package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +15 -0
- package/@ones-editor/mobile-helper/src/embed-mask.d.ts +10 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/active-observer.d.ts +11 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/fixed-providers.d.ts +6 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +18 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/align-dropdown.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/group.d.ts +7 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +13 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert.d.ts +8 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/paragraph.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/tab-provider.d.ts +10 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/text-dropdown.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/turn-into.d.ts +8 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +15 -0
- package/@ones-editor/mobile-helper/src/index.d.ts +14 -2
- package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/locale/index.d.ts +1 -0
- package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +9 -0
- package/@ones-editor/mobile-helper/src/selection-gripper/index.d.ts +19 -0
- package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +3 -0
- package/@ones-editor/scroll-container/src/utils.d.ts +1 -1
- package/@ones-editor/sharedb-doc/src/types.d.ts +3 -3
- package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +1 -1
- package/@ones-editor/sharedb-doc/src/versions/simple-client.d.ts +1 -1
- package/@ones-editor/table-block/src/commands/index.d.ts +2 -0
- package/@ones-editor/table-block/src/commands/mobile-command-provider.d.ts +12 -0
- package/@ones-editor/table-block/src/commands/table-block-commands.d.ts +4 -3
- package/@ones-editor/table-block/src/index.d.ts +2 -1
- package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/ja-jp.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/cell-menu/table-cell-dom.d.ts +6 -0
- package/@ones-editor/table-block/src/table-block/table-resize/resize-drag-drop.d.ts +4 -4
- package/@ones-editor/text-commands/src/index.d.ts +1 -3
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/table.d.ts +1 -0
- package/@ones-editor/to-docx/src/errors.d.ts +3 -0
- package/@ones-editor/to-docx/src/index.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/block-menu/block-command-providers.d.ts +8 -0
- package/@ones-editor/{block-menu → ui}/src/block-menu/index.d.ts +3 -1
- package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
- package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
- package/@ones-editor/ui/src/index.d.ts +30 -8
- package/@ones-editor/ui/src/link-popup/mobile-link-popup.d.ts +22 -0
- package/@ones-editor/ui/src/link-popup/types.d.ts +34 -0
- package/@ones-editor/ui/src/link-popup/web-link-popup.d.ts +19 -0
- package/@ones-editor/ui/src/locale/en-us.d.ts +14 -0
- package/@ones-editor/ui/src/locale/ja-jp.d.ts +14 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +14 -0
- package/@ones-editor/ui/src/providers/align-dropdown.d.ts +10 -0
- package/@ones-editor/ui/src/providers/align.d.ts +11 -0
- package/@ones-editor/ui/src/providers/block-hook-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +20 -0
- package/@ones-editor/ui/src/providers/color-provider.d.ts +18 -0
- package/@ones-editor/ui/src/providers/edit-link-provider.d.ts +6 -0
- package/@ones-editor/ui/src/providers/heading.d.ts +13 -0
- package/@ones-editor/ui/src/providers/inline-code-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/inline-style-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/insert-above.d.ts +9 -0
- package/@ones-editor/ui/src/providers/insert-after.d.ts +9 -0
- package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +12 -0
- package/@ones-editor/ui/src/providers/insert-group.d.ts +7 -0
- package/@ones-editor/ui/src/providers/insert-menu.d.ts +16 -0
- package/@ones-editor/ui/src/providers/link.d.ts +12 -0
- package/@ones-editor/ui/src/providers/list.d.ts +13 -0
- package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +13 -0
- package/@ones-editor/ui/src/providers/paragraph.d.ts +9 -0
- package/@ones-editor/ui/src/providers/proxy-provider.d.ts +9 -0
- package/@ones-editor/ui/src/providers/quoted.d.ts +10 -0
- package/@ones-editor/ui/src/providers/script-with-dropdown.d.ts +9 -0
- package/@ones-editor/ui/src/providers/selection-provider.d.ts +9 -0
- package/@ones-editor/ui/src/providers/text-command-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/text-fixed-provider.d.ts +16 -0
- package/@ones-editor/ui/src/providers/text-script-provider.d.ts +10 -0
- package/@ones-editor/ui/src/providers/text-styles.d.ts +9 -0
- package/@ones-editor/ui/src/providers/turn-into.d.ts +9 -0
- package/@ones-editor/ui/src/providers/utils/add-section.d.ts +2 -0
- package/@ones-editor/ui/src/{quick-menu → providers/utils}/basic-commands.d.ts +1 -2
- package/@ones-editor/ui/src/providers/utils/clipboard.d.ts +6 -0
- package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
- package/@ones-editor/ui/src/providers/utils/inject-block-options.d.ts +8 -0
- package/@ones-editor/ui/src/providers/utils/text-styles.d.ts +6 -0
- package/@ones-editor/ui/src/quick-menu/index.d.ts +7 -19
- package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +8 -0
- package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -5
- package/@ones-editor/ui/src/readonly-toolbar/add-comment-to-old-doc.d.ts +2 -0
- package/@ones-editor/ui/src/readonly-toolbar/helper.d.ts +2 -0
- package/@ones-editor/ui/src/readonly-toolbar/index.d.ts +3 -2
- package/@ones-editor/ui/src/toolbar/link-commands.d.ts +4 -0
- package/@ones-editor/ui/src/toolbar/text-commands.d.ts +2 -2
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +4 -1
- package/@ones-editor/ui/src/tooltips/index.d.ts +21 -9
- package/@ones-editor/ui/src/utils/hide-toolbar.d.ts +2 -0
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +4 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -1
- package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +18 -8
- package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +7 -1
- package/@ones-editor/ui-base/src/color-palette/index.d.ts +3 -3
- package/@ones-editor/ui-base/src/command-bar/active-observer.d.ts +11 -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 +3 -1
- package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/manual-command-bar.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +7 -2
- package/@ones-editor/ui-base/src/dialog/manual-close-dialog.d.ts +1 -1
- package/@ones-editor/ui-base/src/dropdown/index.d.ts +1 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
- package/@ones-editor/ui-base/src/index.d.ts +3 -0
- package/@ones-editor/ui-base/src/input/create-input.d.ts +24 -3
- package/@ones-editor/ui-base/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/ui-base/src/mobile-command-bar/init-menu-item.d.ts +3 -0
- package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +21 -0
- package/@ones-editor/ui-base/src/mobile-command-bar/scroll-into-view.d.ts +3 -0
- package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -1
- package/@ones-editor/{ui → ui-base}/src/text-button/index.d.ts +1 -1
- package/@ones-editor/versions/package.json +3 -0
- package/@ones-editor/versions/src/constant/index.d.ts +2 -0
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +2 -2
- package/@ones-editor/versions/src/history-render/index.d.ts +15 -1
- package/@ones-editor/versions/src/history-tooltip/index.d.ts +14 -0
- package/@ones-editor/versions/src/index.d.ts +1 -0
- package/@ones-editor/versions/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/versions/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/versions/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/versions/src/types.d.ts +5 -0
- package/@ones-editor/versions/src/utils/block-text.d.ts +3 -1
- package/@ones-editor/versions/src/version-dialog/versions-dropdown.d.ts +2 -0
- package/dist/auto-new-line.d.ts +7 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.js +17895 -13051
- package/dist/lang/en-us.d.ts +1 -1
- package/dist/lang/ja-jp.d.ts +1 -1
- package/dist/lang/zh-cn.d.ts +1 -1
- package/dist/types.d.ts +15 -4
- package/package.json +3 -1
- package/@ones-editor/block-menu/src/block-menu/items/block-command-items.d.ts +0 -3
- package/@ones-editor/block-menu/src/block-menu/items/index.d.ts +0 -5
- package/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +0 -5
- package/@ones-editor/block-menu/src/block-menu/items/text-styles/text-style-item.d.ts +0 -30
- package/@ones-editor/block-menu/src/block-menu/items/types.d.ts +0 -5
- package/@ones-editor/text-commands/src/locale/en-us.d.ts +0 -13
- package/@ones-editor/text-commands/src/locale/ja-jp.d.ts +0 -13
- package/@ones-editor/text-commands/src/locale/zh-cn.d.ts +0 -13
- package/@ones-editor/text-commands/src/text-command-provider.d.ts +0 -24
- package/@ones-editor/text-commands/src/text-commands.d.ts +0 -4
- package/@ones-editor/text-commands/src/text-styles.d.ts +0 -4
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +0 -16
- package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +0 -8
- package/@ones-editor/ui/src/quick-menu/insert-empty-block.d.ts +0 -4
- package/@ones-editor/ui/src/quick-menu/order.d.ts +0 -1
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +0 -9
- package/@ones-editor/ui/src/toolbar/commands/align.d.ts +0 -10
- package/@ones-editor/ui/src/toolbar/commands/paragraph.d.ts +0 -11
- package/@ones-editor/ui/src/toolbar/commands/turn-into.d.ts +0 -10
- package/@ones-editor/ui/src/toolbar/merge-commands.d.ts +0 -2
- /package/@ones-editor/{text-commands → main-toolbar}/src/locale/index.d.ts +0 -0
- /package/@ones-editor/{block-menu → ui}/src/block-menu/standard-block-actions/hook.d.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractProvider, CommandItemWithSource, OnesEditor, OnesEditorCommandProviders, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class BlockCommandProviders extends AbstractProvider implements OnesEditorCommandProviders {
|
|
3
|
+
protected editor: OnesEditor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor, afterCommandCallback: () => void);
|
|
6
|
+
getCommands(range: SelectionRange): CommandItemWithSource[];
|
|
7
|
+
executeCommand: (range: SelectionRange, item: CommandItemWithSource) => {};
|
|
8
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor, CommandItem } from '../../../../@ones-editor/core';
|
|
1
|
+
import { BlockElement, OnesEditor, CommandFilterId, CommandFilter, CommandItem } from '../../../../@ones-editor/core';
|
|
2
2
|
import type { ManualShowCommandBarOptions } from '../../../../@ones-editor/ui-base';
|
|
3
3
|
export default class BlockMenu {
|
|
4
4
|
private editor;
|
|
5
5
|
private menu;
|
|
6
6
|
currentBlock: BlockElement | null;
|
|
7
7
|
private commandBlock;
|
|
8
|
+
private blockCommandProviders;
|
|
8
9
|
constructor(editor: OnesEditor);
|
|
10
|
+
addFilter(id: CommandFilterId, filter: CommandFilter): void;
|
|
9
11
|
show(target: HTMLElement, options?: ManualShowCommandBarOptions): void;
|
|
10
12
|
isInMenu(eventTarget: EventTarget | null): boolean;
|
|
11
13
|
handleShow: () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, BoxCommands, BoxElement, CommandItem, OnesEditor, OnesEditorCommandProvider } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class StandardBoxCommands implements BoxCommands {
|
|
3
|
+
private editor;
|
|
4
|
+
group: string;
|
|
5
|
+
providers: OnesEditorCommandProvider[];
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
get commands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, box: BoxElement, item: CommandItem): void;
|
|
9
|
+
static create(editor: OnesEditor): StandardBoxCommands;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandParams } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class StandardBoxProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, blockElement: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
executeCommand(editor: OnesEditor, blockElement: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
9
|
+
}
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
2
|
import OnesEditorToolbar from './toolbar/toolbar-handler';
|
|
3
|
-
import
|
|
3
|
+
import { QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, QuickMenuCommandParams, AddMenuCommand, QuickMenuItem, QuickMenuOptions } from './quick-menu/types';
|
|
4
|
+
import OnesEditorQuickMenu from './quick-menu';
|
|
5
|
+
import * as BasicCommands from './providers/utils/basic-commands';
|
|
4
6
|
import OnesEditorTooltip from './tooltips';
|
|
7
|
+
import type { OnesEditorTooltipCallbacks, EditorTooltipTippyInstance, OnesEditorTooltipProps } from './tooltips';
|
|
5
8
|
import TextStyleShortcuts from './shortcuts';
|
|
6
9
|
import { editLink } from './link-popup';
|
|
7
10
|
import { getToolbar } from './toolbar/helper';
|
|
8
|
-
import { GroupOrder } from './quick-menu/order';
|
|
9
11
|
import { getReferenceClientRect } from './toolbar/get-reference-client-rect';
|
|
10
12
|
import { isSelectBoxOnly } from './toolbar/box-only';
|
|
11
|
-
import { InlineBoxCommandProvider } from './quick-menu/inline-box-items';
|
|
12
13
|
import './locale';
|
|
13
14
|
import type { OnesEditorToolbarBase } from './toolbar/types';
|
|
14
|
-
import
|
|
15
|
+
import { BlockCommandProviders } from './block-menu/block-command-providers';
|
|
16
|
+
import BlockMenu from './block-menu';
|
|
17
|
+
import InlineStyleProvider from './providers/inline-style-provider';
|
|
18
|
+
import ColorStyleProvider from './providers/color-provider';
|
|
19
|
+
import ScriptDropdownProvider from './providers/script-with-dropdown';
|
|
20
|
+
import TextScriptProvider from './providers/text-script-provider';
|
|
21
|
+
import HeadingProvider from './providers/heading';
|
|
22
|
+
import { ProxyProvider } from './providers/proxy-provider';
|
|
23
|
+
import ParagraphProvider from './providers/paragraph';
|
|
24
|
+
import AlignProvider from './providers/align';
|
|
25
|
+
import { InlineBoxCommandProvider } from './providers/insert-box-provider';
|
|
26
|
+
import { LinkProvider } from './providers/link';
|
|
27
|
+
import InsertMenuProvider from './providers/insert-menu';
|
|
28
|
+
import { injectBlockOptions } from './providers/utils/inject-block-options';
|
|
29
|
+
import TextCommandProvider from './providers/text-command-provider';
|
|
30
|
+
import InlineCodeProvider from './providers/inline-code-provider';
|
|
31
|
+
import { MobileLinkProvider } from './providers/mobile-link-provider';
|
|
32
|
+
import ListProvider from './providers/list';
|
|
33
|
+
import QuotedProvider from './providers/quoted';
|
|
15
34
|
import { ReadonlyToolbar } from './readonly-toolbar';
|
|
16
35
|
import { ReadonlyToolbarCommandProvider, ReadonlyCommandOptions } from './readonly-toolbar/types';
|
|
17
36
|
import { AddCommentToOldDocCommandProvider } from './readonly-toolbar/add-comment-to-old-doc';
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export {
|
|
37
|
+
import ClipboardProvider from './providers/clipboard-provider';
|
|
38
|
+
export * from './providers/utils/clipboard';
|
|
39
|
+
export * from './providers/utils';
|
|
40
|
+
export { ClipboardProvider, ListProvider, QuotedProvider, TextCommandProvider, injectBlockOptions, LinkProvider, InlineBoxCommandProvider, AlignProvider, ParagraphProvider, ProxyProvider, InlineCodeProvider, InlineStyleProvider, ColorStyleProvider, ScriptDropdownProvider, TextScriptProvider, HeadingProvider, MobileLinkProvider, InsertMenuProvider, };
|
|
41
|
+
export type { QuickMenuCommandParams, QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, OnesEditorToolbarBase, OnesEditorTooltipCallbacks, EditorTooltipTippyInstance, OnesEditorTooltipProps, QuickMenuItem, QuickMenuOptions, ReadonlyToolbarCommandProvider, ReadonlyCommandOptions, };
|
|
42
|
+
export { BlockMenu, BlockCommandProviders, OnesEditorToolbar, OnesEditorQuickMenu, OnesEditorTooltip, editLink, TextStyleShortcuts, getToolbar, BasicCommands, isSelectBoxOnly, getReferenceClientRect, ReadonlyToolbar, AddCommentToOldDocCommandProvider, };
|
|
43
|
+
export * from './utils/hide-toolbar';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './index.scss';
|
|
2
|
+
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
3
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
4
|
+
import { LinkEditorEvents, LinkEditorOptions, LinkPopupType } from './types';
|
|
5
|
+
export declare class MobileLinkPopup extends TypedEmitter<LinkEditorEvents> implements LinkPopupType {
|
|
6
|
+
private editor;
|
|
7
|
+
private content;
|
|
8
|
+
private options;
|
|
9
|
+
private linkPopup;
|
|
10
|
+
private onShow;
|
|
11
|
+
constructor(editor: OnesEditor, content: HTMLElement, options: LinkEditorOptions);
|
|
12
|
+
close: () => void;
|
|
13
|
+
private createItems;
|
|
14
|
+
private createHeader;
|
|
15
|
+
handleOk: () => void;
|
|
16
|
+
handleClose: () => void;
|
|
17
|
+
handleShown: () => void;
|
|
18
|
+
disabledSubmit: () => void;
|
|
19
|
+
enableSubmit: () => void;
|
|
20
|
+
manualShow: () => void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Placement } from '../../../../@ones-editor/ui-base';
|
|
2
|
+
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
3
|
+
export interface FormField {
|
|
4
|
+
getInputValue: () => string;
|
|
5
|
+
setFieldError: (error: string) => void;
|
|
6
|
+
getField: () => HTMLElement;
|
|
7
|
+
}
|
|
8
|
+
export interface Form {
|
|
9
|
+
[key: string]: FormField;
|
|
10
|
+
}
|
|
11
|
+
export type OnFinished = (linkText: string, linkUrl: string) => void;
|
|
12
|
+
export type OnClose = () => void;
|
|
13
|
+
export type OnBeforeFormatUrl = (linkUrl: string) => string | false;
|
|
14
|
+
export interface LinkEditorOptions {
|
|
15
|
+
target: HTMLElement;
|
|
16
|
+
linkText: string;
|
|
17
|
+
linkUrl: string;
|
|
18
|
+
onFinished: OnFinished;
|
|
19
|
+
onClose?: OnClose;
|
|
20
|
+
onBeforeFormatUrl?: OnBeforeFormatUrl;
|
|
21
|
+
placement?: Placement;
|
|
22
|
+
}
|
|
23
|
+
export interface LinkEditorEvents {
|
|
24
|
+
show: () => void;
|
|
25
|
+
finished: () => void;
|
|
26
|
+
close: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface LinkPopupType extends TypedEmitter<LinkEditorEvents> {
|
|
29
|
+
disabledSubmit: () => void;
|
|
30
|
+
enableSubmit: () => void;
|
|
31
|
+
destroy: () => void;
|
|
32
|
+
close: () => void;
|
|
33
|
+
manualShow: () => void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
+
import { LinkEditorEvents, LinkEditorOptions, LinkPopupType } from './types';
|
|
3
|
+
import './index.scss';
|
|
4
|
+
export declare class LinkPopup extends TypedEmitter<LinkEditorEvents> implements LinkPopupType {
|
|
5
|
+
private content;
|
|
6
|
+
private options;
|
|
7
|
+
private linkPopup;
|
|
8
|
+
private onShow;
|
|
9
|
+
constructor(content: HTMLElement, options: LinkEditorOptions);
|
|
10
|
+
private createPopupContent;
|
|
11
|
+
handleOk: () => void;
|
|
12
|
+
handleClose: () => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
disabledSubmit: () => void;
|
|
15
|
+
enableSubmit: () => void;
|
|
16
|
+
manualShow: () => void;
|
|
17
|
+
static showPopup: (content: HTMLElement, options: LinkEditorOptions) => LinkPopup;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
@@ -24,6 +24,8 @@ declare const _default: {
|
|
|
24
24
|
cancelText: string;
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
|
+
title: string;
|
|
28
|
+
openLink: string;
|
|
27
29
|
};
|
|
28
30
|
commands: {
|
|
29
31
|
unordered: string;
|
|
@@ -38,6 +40,18 @@ declare const _default: {
|
|
|
38
40
|
heading: string;
|
|
39
41
|
headingGroup: string;
|
|
40
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
46
|
+
bold: string;
|
|
47
|
+
italic: string;
|
|
48
|
+
underline: string;
|
|
49
|
+
strikethrough: string;
|
|
50
|
+
code: string;
|
|
51
|
+
subscript: string;
|
|
52
|
+
superscript: string;
|
|
53
|
+
more: string;
|
|
54
|
+
selectBlock: string;
|
|
41
55
|
};
|
|
42
56
|
};
|
|
43
57
|
export default _default;
|
|
@@ -24,6 +24,8 @@ declare const _default: {
|
|
|
24
24
|
cancelText: string;
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
|
+
title: string;
|
|
28
|
+
openLink: string;
|
|
27
29
|
};
|
|
28
30
|
commands: {
|
|
29
31
|
unordered: string;
|
|
@@ -38,6 +40,18 @@ declare const _default: {
|
|
|
38
40
|
heading: string;
|
|
39
41
|
headingGroup: string;
|
|
40
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
46
|
+
bold: string;
|
|
47
|
+
italic: string;
|
|
48
|
+
underline: string;
|
|
49
|
+
strikethrough: string;
|
|
50
|
+
code: string;
|
|
51
|
+
subscript: string;
|
|
52
|
+
superscript: string;
|
|
53
|
+
more: string;
|
|
54
|
+
selectBlock: string;
|
|
41
55
|
};
|
|
42
56
|
};
|
|
43
57
|
export default _default;
|
|
@@ -24,6 +24,8 @@ declare const _default: {
|
|
|
24
24
|
cancelText: string;
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
|
+
title: string;
|
|
28
|
+
openLink: string;
|
|
27
29
|
};
|
|
28
30
|
commands: {
|
|
29
31
|
unordered: string;
|
|
@@ -38,6 +40,18 @@ declare const _default: {
|
|
|
38
40
|
heading: string;
|
|
39
41
|
headingGroup: string;
|
|
40
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
46
|
+
bold: string;
|
|
47
|
+
italic: string;
|
|
48
|
+
underline: string;
|
|
49
|
+
strikethrough: string;
|
|
50
|
+
code: string;
|
|
51
|
+
subscript: string;
|
|
52
|
+
superscript: string;
|
|
53
|
+
more: string;
|
|
54
|
+
selectBlock: string;
|
|
41
55
|
};
|
|
42
56
|
};
|
|
43
57
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class AlignDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
constructor(editor: OnesEditor);
|
|
8
|
+
getInsertCommands: () => never[];
|
|
9
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, DocBlock, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class AlignProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
isChecked(blockData: DocBlock, id: string): boolean;
|
|
7
|
+
isDisable(block: BlockElement): boolean;
|
|
8
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
9
|
+
getInsertCommands: () => never[];
|
|
10
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockCommands, BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
interface CommandWithExecute {
|
|
3
|
+
command: CommandItem;
|
|
4
|
+
executeCommand: BlockCommands['executeCommand'];
|
|
5
|
+
}
|
|
6
|
+
export declare class BlockHookProvider implements OnesEditorCommandProvider {
|
|
7
|
+
private editor;
|
|
8
|
+
id: string;
|
|
9
|
+
constructor(editor: OnesEditor);
|
|
10
|
+
commands: CommandWithExecute[];
|
|
11
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement) => CommandItem[];
|
|
12
|
+
getInsertCommands: () => CommandItem[];
|
|
13
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
14
|
+
executeInsertCommand: () => boolean;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class ClipboardProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
private options;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor, options: {
|
|
7
|
+
withPaste: boolean;
|
|
8
|
+
});
|
|
9
|
+
private clipboardPermission;
|
|
10
|
+
private isSecureContext;
|
|
11
|
+
get hasClipboardReadPermission(): boolean;
|
|
12
|
+
get hasClipboardWritePermission(): boolean;
|
|
13
|
+
clipboardSupport(): void;
|
|
14
|
+
canPaste(): Promise<boolean>;
|
|
15
|
+
createPasteElement(editor: OnesEditor): HTMLDivElement;
|
|
16
|
+
getAvailableCommands: (editor: OnesEditor, blockElement: BlockElement) => CommandItem[];
|
|
17
|
+
getInsertCommands: () => never[];
|
|
18
|
+
copyRange(editor: OnesEditor, range: SelectionRange): void;
|
|
19
|
+
executeRangeCommand(editor: OnesEditor, range: SelectionRange, command: CommandItem): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandResult, BlockAttributesHandler } from '../../../../@ones-editor/core';
|
|
2
|
+
import { TextColorItem } from '../../../../@ones-editor/ui-base';
|
|
3
|
+
export default class ColorStyleProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
colorItem: TextColorItem;
|
|
7
|
+
constructor(editor: OnesEditor);
|
|
8
|
+
get blockAttributesHandler(): BlockAttributesHandler;
|
|
9
|
+
private getEmptyTextBlockColor;
|
|
10
|
+
private setEmptyTextBlockColor;
|
|
11
|
+
private updateButtonColor;
|
|
12
|
+
private setActiveAttribute;
|
|
13
|
+
private handleChangeColor;
|
|
14
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
15
|
+
getInsertCommands(): CommandItem[];
|
|
16
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult): boolean;
|
|
17
|
+
executeInsertCommand: () => boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandParams } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class EditLinkProvider implements OnesEditorCommandProvider {
|
|
3
|
+
id: string;
|
|
4
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
5
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult) => boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class HeadingProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
private options?;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor, options?: CommandParams | undefined);
|
|
7
|
+
getHeadingIndex(): number;
|
|
8
|
+
createHeadingCommandItem(heading: number): CommandItem[];
|
|
9
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
10
|
+
getInsertCommands(): CommandItem[];
|
|
11
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, command: CommandItem) => boolean;
|
|
12
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandResult } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class InlineCodeProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult): boolean;
|
|
9
|
+
executeInsertCommand: () => boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandResult } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class InlineStyleProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult): boolean;
|
|
9
|
+
executeInsertCommand: () => boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, OnesEditor, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class InsertAboveProvider extends ProxyProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement) => CommandItem[];
|
|
8
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItemWithSource, params: CommandParams) => boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, OnesEditor, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class InsertAfterProvider extends ProxyProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement) => CommandItem[];
|
|
8
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItemWithSource, params: CommandParams) => boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export declare class InlineBoxCommandProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
create(commands: CommandItem[]): CommandItem[];
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
9
|
+
getInsertCommands: (editor: OnesEditor, containerId: string) => CommandItem[];
|
|
10
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
11
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
import { QuickMenuCommandProvider } from '../quick-menu/types';
|
|
4
|
+
export default class InsertMenuProvider extends ProxyProvider {
|
|
5
|
+
private editor;
|
|
6
|
+
private options?;
|
|
7
|
+
id: string;
|
|
8
|
+
providersMap: Map<string, OnesEditorCommandProvider>;
|
|
9
|
+
providers: OnesEditorCommandProvider[];
|
|
10
|
+
quickProviders: QuickMenuCommandProvider[];
|
|
11
|
+
constructor(editor: OnesEditor, options?: CommandParams | undefined);
|
|
12
|
+
getInsertCommands: (editor: OnesEditor, containerId: string) => CommandItem[];
|
|
13
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
14
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
15
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class LinkProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
create(): CommandItem[];
|
|
7
|
+
isDisabled: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => boolean;
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
9
|
+
getInsertCommands: () => CommandItem[];
|
|
10
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem) => boolean;
|
|
11
|
+
executeInsertCommand(editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItem): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class ListProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
createListCommandItem(block?: BlockElement): CommandItem[];
|
|
7
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
8
|
+
getInsertCommands(): CommandItem[];
|
|
9
|
+
convertToList(editor: OnesEditor, block: BlockElement, listType: 'unordered' | 'ordered' | 'unchecked'): void;
|
|
10
|
+
insertList(editor: OnesEditor, containerId: string, blockIndex: number, listType: 'unordered' | 'ordered' | 'unchecked'): void;
|
|
11
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
12
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, command: CommandItem) => boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class MobileLinkProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private options?;
|
|
4
|
+
id: string;
|
|
5
|
+
insertProvider: OnesEditorCommandProvider;
|
|
6
|
+
editProvider: OnesEditorCommandProvider;
|
|
7
|
+
constructor(editor: OnesEditor, options?: {
|
|
8
|
+
linkMode: 'insert' | 'edit';
|
|
9
|
+
} | undefined);
|
|
10
|
+
getSelectedLinkChild: (editor: OnesEditor, range: SelectionRange) => import("@ones-editor/core").TextBlockContentChild | null;
|
|
11
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
12
|
+
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class ParagraphProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
constructor(editor: OnesEditor);
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare abstract class ProxyProvider implements OnesEditorCommandProvider {
|
|
3
|
+
abstract id: string;
|
|
4
|
+
providers: OnesEditorCommandProvider[];
|
|
5
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
6
|
+
getInsertCommands: (editor: OnesEditor, containerId: string) => CommandItem[];
|
|
7
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult): boolean;
|
|
8
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class QuotedProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
9
|
+
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, command: CommandItem) => boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class ScriptDropdownProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class SelectionProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockAttributesHandler, BlockElement, CommandItem, CommandItemWithSource, CommandParams, CommandResult, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class TextCommandProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
private options?;
|
|
5
|
+
id: string;
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
private providers;
|
|
8
|
+
constructor(editor: OnesEditor, options?: CommandParams | undefined);
|
|
9
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange): CommandItem[];
|
|
10
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult): boolean;
|
|
11
|
+
get blockAttributesHandler(): BlockAttributesHandler;
|
|
12
|
+
private executeCommandOnEmptyText;
|
|
13
|
+
private setCommandsStates;
|
|
14
|
+
private static toTextCommand;
|
|
15
|
+
private static fromTextCommandId;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class TextStylesFixedProvider extends ProxyProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
private afterCommandCallback;
|
|
6
|
+
id: string;
|
|
7
|
+
constructor(editor: OnesEditor, afterCommandCallback: () => void);
|
|
8
|
+
commands: CommandItem[];
|
|
9
|
+
block: BlockElement | null;
|
|
10
|
+
range: SelectionRange | null;
|
|
11
|
+
handleClick: (editor: OnesEditor, event: Event) => void;
|
|
12
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
13
|
+
getInsertCommands: () => never[];
|
|
14
|
+
executeCommand: () => boolean;
|
|
15
|
+
executeInsertCommand: () => boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, CommandParams, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandResult } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class TextScriptProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult): boolean;
|
|
9
|
+
executeInsertCommand: () => boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnesEditor, OnesEditorCommandProvider } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class TextStylesProvider extends ProxyProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
private withPlainText;
|
|
6
|
+
id: string;
|
|
7
|
+
providers: OnesEditorCommandProvider[];
|
|
8
|
+
constructor(editor: OnesEditor, withPlainText?: boolean);
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ProxyProvider } from './proxy-provider';
|
|
3
|
+
export default class BlockTurnIntoCommandProvider extends ProxyProvider implements OnesEditorCommandProvider {
|
|
4
|
+
private editor;
|
|
5
|
+
id: string;
|
|
6
|
+
groupIndex: number;
|
|
7
|
+
constructor(editor: OnesEditor);
|
|
8
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
9
|
+
}
|