@ones-editor/editor 1.1.8 → 1.1.10
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/standard-block-actions/hook.d.ts +2 -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 +1 -1
- package/@ones-editor/core/src/core/command-providers/commands/range-commands.d.ts +1 -1
- package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +1 -1
- package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +2 -1
- package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +4 -3
- package/@ones-editor/core/src/core/editor/index.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/ensure-block-visible.d.ts +2 -0
- package/@ones-editor/core/src/core/types.d.ts +8 -2
- package/@ones-editor/core/src/utils/animate-scroll.d.ts +4 -0
- package/@ones-editor/heading-collapse/src/doc-event/collapse-handler.d.ts +3 -0
- package/@ones-editor/heading-collapse/src/heading-collapse-button/collapse-heading-block.d.ts +2 -0
- package/@ones-editor/heading-collapse/src/heading-collapse-button/index.d.ts +3 -1
- package/@ones-editor/heading-collapse/src/heading-collapse-button/paste-handler.d.ts +8 -0
- package/@ones-editor/table-block/src/index.d.ts +2 -2
- package/@ones-editor/table-block/src/table-block/index.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/table-dom.d.ts +1 -0
- package/@ones-editor/table-block/src/types.d.ts +1 -0
- package/@ones-editor/to-docx/src/doc2other/image.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/types.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/types.d.ts +7 -2
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
- package/dist/index.js +195 -195
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
2
|
import OnesEditorToolbar from './toolbar/toolbar-handler';
|
|
3
|
-
import OnesEditorQuickMenu, { getAllQuickMenuItems, getHeadingMenuOptions, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, BasicCommands, GetAllQuickMenuItemsOptions } from './quick-menu';
|
|
3
|
+
import OnesEditorQuickMenu, { getAllQuickMenuItems, getHeadingMenuOptions, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, BasicCommands, GetAllQuickMenuItemsOptions, AddMenuCommand } from './quick-menu';
|
|
4
4
|
import OnesEditorTooltip from './tooltips';
|
|
5
5
|
import TextStyleShortcuts from './shortcuts';
|
|
6
6
|
import { editLink } from './link-popup';
|
|
@@ -12,7 +12,7 @@ import { InlineBoxCommandProvider } from './quick-menu/inline-box-items';
|
|
|
12
12
|
import './locale';
|
|
13
13
|
import type { OnesEditorToolbarBase } from './toolbar/types';
|
|
14
14
|
import type { QuickMenuItem } from './quick-menu';
|
|
15
|
-
export type { QuickMenuCommandProvider, QuickMenuCommandBetween, QuickMenuCommandInline, GetAllQuickMenuItemsOptions, OnesEditorToolbarBase };
|
|
15
|
+
export type { QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, GetAllQuickMenuItemsOptions, OnesEditorToolbarBase };
|
|
16
16
|
export { OnesEditorToolbar, OnesEditorQuickMenu, OnesEditorTooltip, getAllQuickMenuItems, QuickMenuItem, editLink, TextStyleShortcuts, getToolbar, getHeadingMenuOptions, BasicCommands, GroupOrder, isSelectBoxOnly, InlineBoxCommandProvider, getReferenceClientRect, };
|
|
17
17
|
export { createTextButton } from './text-button';
|
|
18
18
|
export { mergeCommands } from './toolbar/merge-commands';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockElement } from '../../../../@ones-editor/core';
|
|
2
2
|
import type { BlockOptions, CommandItem, OnesEditor, InsertEmptyBlockOptions } from '../../../../@ones-editor/core';
|
|
3
|
-
import type { QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
|
|
3
|
+
import type { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
|
|
4
4
|
export declare function addQuickMenuItemFields(item: CommandItem, options: BlockOptions): void;
|
|
5
5
|
export declare function getPlainTextMenuOptions(): BlockOptions;
|
|
6
6
|
export declare function getHeadingMenuOptions(start?: number): BlockOptions;
|
|
@@ -12,5 +12,5 @@ export declare class BasicCommandProvider implements QuickMenuCommandProvider {
|
|
|
12
12
|
updateBlock(editor: OnesEditor, containerId: string, block: BlockElement, item: CommandItem): null;
|
|
13
13
|
handleUpdateBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
|
|
14
14
|
handleInsertEmptyBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<null>;
|
|
15
|
-
executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween): Promise<BlockElement | null>;
|
|
15
|
+
executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand): Promise<BlockElement | null>;
|
|
16
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InsertEmptyBlockOptions, OnesEditor, BlockElement, CommandItem } from '../../../../@ones-editor/core';
|
|
2
|
-
import { QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
|
|
2
|
+
import { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from './types';
|
|
3
3
|
export declare class InlineBoxCommandProvider implements QuickMenuCommandProvider {
|
|
4
4
|
getCommands(): CommandItem[];
|
|
5
5
|
handleUpdateBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<void | BlockElement | null>;
|
|
6
6
|
handleInsertEmptyBlockCore(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<BlockElement | null>;
|
|
7
|
-
executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween): Promise<BlockElement | null>;
|
|
7
|
+
executeCommand(editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand): Promise<BlockElement | null>;
|
|
8
8
|
}
|
|
@@ -5,13 +5,18 @@ export interface QuickMenuItem extends CommandItem {
|
|
|
5
5
|
commandProvider?: QuickMenuCommandProvider;
|
|
6
6
|
}
|
|
7
7
|
export interface QuickMenuCommandParams {
|
|
8
|
-
from: 'block-menu' | 'quick-menu';
|
|
8
|
+
from: 'block-menu' | 'quick-menu' | 'add-block-menu';
|
|
9
9
|
}
|
|
10
10
|
export interface QuickMenuCommandInline extends QuickMenuCommandParams {
|
|
11
11
|
from: 'quick-menu';
|
|
12
12
|
blockId: string;
|
|
13
13
|
offset: number;
|
|
14
14
|
}
|
|
15
|
+
export interface AddMenuCommand extends QuickMenuCommandParams {
|
|
16
|
+
from: 'add-block-menu';
|
|
17
|
+
blockId: string;
|
|
18
|
+
offset: number;
|
|
19
|
+
}
|
|
15
20
|
export interface QuickMenuCommandBetween extends QuickMenuCommandParams {
|
|
16
21
|
from: 'block-menu';
|
|
17
22
|
containerId: string;
|
|
@@ -19,7 +24,7 @@ export interface QuickMenuCommandBetween extends QuickMenuCommandParams {
|
|
|
19
24
|
}
|
|
20
25
|
export interface QuickMenuCommandProvider {
|
|
21
26
|
getCommands: (editor: OnesEditor) => CommandItem[];
|
|
22
|
-
executeCommand: (editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween) => Promise<BlockElement | null>;
|
|
27
|
+
executeCommand: (editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand) => Promise<BlockElement | null>;
|
|
23
28
|
}
|
|
24
29
|
export interface QuickMenuOptions {
|
|
25
30
|
id?: string;
|
|
@@ -5,6 +5,7 @@ import { OnesEditorToolbarBase } from './types';
|
|
|
5
5
|
export type ShowToolbarReason = 'click' | 'selectionChange';
|
|
6
6
|
export default class OnesEditorToolbar implements OnesEditorHoveringBlockFilter, OnesEditorToolbarBase {
|
|
7
7
|
private editor;
|
|
8
|
+
private id;
|
|
8
9
|
private toolbar;
|
|
9
10
|
private toolbarType;
|
|
10
11
|
private mouseDown;
|