@ones-editor/editor 2.2.14-beta.2 → 2.2.14-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@ones-editor/core/src/core/types.d.ts +2 -3
- package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +6 -1
- package/@ones-editor/graph-embed/src/command.d.ts +5 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/providers/insert-menu.d.ts +2 -2
- package/@ones-editor/ui/src/providers/utils/add-section.d.ts +9 -0
- package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
- package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +3 -3
- package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -2
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +1 -0
- package/dist/index.js +1488 -1431
- package/package.json +1 -1
|
@@ -9,8 +9,8 @@ export default class InsertMenuProvider extends ProxyProvider {
|
|
|
9
9
|
providers: OnesEditorCommandProvider[];
|
|
10
10
|
quickProviders: QuickMenuCommandProvider[];
|
|
11
11
|
constructor(editor: OnesEditor, options?: CommandParams | undefined);
|
|
12
|
-
getInsertCommands: (editor: OnesEditor, containerId: string) => CommandItem[];
|
|
13
|
-
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
|
|
12
|
+
getInsertCommands: (editor: OnesEditor, containerId: string, params?: CommandParams) => CommandItem[];
|
|
13
|
+
getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
|
|
14
14
|
executeInsertCommand: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
15
15
|
executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean;
|
|
16
16
|
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import { CommandItem } from '../../../../../@ones-editor/core';
|
|
2
|
+
declare const GroupOrder: {
|
|
3
|
+
basics: number;
|
|
4
|
+
system: number;
|
|
5
|
+
common: number;
|
|
6
|
+
thirdParty: number;
|
|
7
|
+
};
|
|
8
|
+
type GroupType = keyof typeof GroupOrder;
|
|
2
9
|
export declare const addSection: (items: CommandItem[]) => CommandItem[];
|
|
10
|
+
export declare const createSectionByGroup: (item: CommandItem, before: GroupType) => CommandItem;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AbstractProvider, CommandItemWithSource, OnesEditor, OnesEditorCommandProviders, SelectionRange } from '../../../../@ones-editor/core';
|
|
1
|
+
import { AbstractProvider, CommandItemWithSource, CommandParams, OnesEditor, OnesEditorCommandProviders, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare class QuickCommandProviders extends AbstractProvider implements OnesEditorCommandProviders {
|
|
3
3
|
protected editor: OnesEditor;
|
|
4
4
|
id: string;
|
|
5
5
|
constructor(editor: OnesEditor);
|
|
6
|
-
getCommands(range: SelectionRange): CommandItemWithSource[];
|
|
7
|
-
executeCommand: (range: SelectionRange, item: CommandItemWithSource) => {};
|
|
6
|
+
getCommands(range: SelectionRange, params?: CommandParams): CommandItemWithSource[];
|
|
7
|
+
executeCommand: (range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => {};
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CommandItem, BlockOptions, OnesEditor, BlockElement, SelectionRange } from '../../../../@ones-editor/core';
|
|
1
|
+
import { CommandItem, BlockOptions, OnesEditor, BlockElement, SelectionRange, CommandParams } from '../../../../@ones-editor/core';
|
|
2
2
|
export interface QuickMenuItem extends CommandItem {
|
|
3
3
|
itemType: 'insert-block';
|
|
4
4
|
blockType?: string;
|
|
5
5
|
blockOptions?: BlockOptions;
|
|
6
6
|
commandProvider?: QuickMenuCommandProvider;
|
|
7
7
|
}
|
|
8
|
-
export interface QuickMenuCommandParams {
|
|
8
|
+
export interface QuickMenuCommandParams extends CommandParams {
|
|
9
9
|
from: 'block-menu' | 'quick-menu' | 'add-block-menu';
|
|
10
10
|
}
|
|
11
11
|
export interface QuickMenuCommandInline extends QuickMenuCommandParams {
|
|
@@ -27,6 +27,7 @@ export default class AutoSuggestMenu {
|
|
|
27
27
|
menu: ManualMenu | MobileBottomMenu;
|
|
28
28
|
private currentText;
|
|
29
29
|
handleSearchText: (text: string) => void;
|
|
30
|
+
get searchText(): string;
|
|
30
31
|
constructor(options: AutoSuggestMenuOptions);
|
|
31
32
|
private setItems;
|
|
32
33
|
popup(anchor: HTMLElement, options?: {
|