@ones-editor/editor 2.2.14-beta.1 → 2.2.14-beta.3

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.
Files changed (39) hide show
  1. package/@ones-editor/core/src/core/types.d.ts +2 -3
  2. package/@ones-editor/core/src/utils/dom.d.ts +1 -0
  3. package/@ones-editor/embed-block-helper/src/block-resizer/index.d.ts +6 -1
  4. package/@ones-editor/graph-embed/src/command.d.ts +9 -0
  5. package/@ones-editor/graph-embed/src/config/index.d.ts +9 -1
  6. package/@ones-editor/graph-embed/src/flowchart/flowchart-embed.d.ts +1 -1
  7. package/@ones-editor/graph-embed/src/flowchart/flowchart-helper.d.ts +2 -1
  8. package/@ones-editor/graph-embed/src/flowchart/flowchart.d.ts +11 -3
  9. package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +25 -23
  10. package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +3 -4
  11. package/@ones-editor/graph-embed/src/helper/graph-dom/code-editor.d.ts +2 -0
  12. package/@ones-editor/graph-embed/src/helper/graph-dom/draw-dom.d.ts +16 -0
  13. package/@ones-editor/graph-embed/src/helper/graph-dom/layout-dom.d.ts +25 -0
  14. package/@ones-editor/graph-embed/src/helper/graph-dom/view-select.d.ts +22 -0
  15. package/@ones-editor/graph-embed/src/helper/graph-quick-commands.d.ts +3 -0
  16. package/@ones-editor/graph-embed/src/index.d.ts +3 -2
  17. package/@ones-editor/graph-embed/src/lang/en-us.d.ts +11 -6
  18. package/@ones-editor/graph-embed/src/lang/ja-jp.d.ts +11 -6
  19. package/@ones-editor/graph-embed/src/lang/zh-cn.d.ts +11 -6
  20. package/@ones-editor/graph-embed/src/mermaid/mermaid-embed.d.ts +1 -1
  21. package/@ones-editor/graph-embed/src/mermaid/mermaid-helper.d.ts +1 -0
  22. package/@ones-editor/graph-embed/src/mermaid/mermaid.d.ts +11 -4
  23. package/@ones-editor/graph-embed/src/plantuml/plantuml-embed.d.ts +1 -1
  24. package/@ones-editor/graph-embed/src/plantuml/plantuml-helper.d.ts +2 -1
  25. package/@ones-editor/graph-embed/src/plantuml/plantuml.d.ts +11 -3
  26. package/@ones-editor/graph-embed/src/types.d.ts +38 -0
  27. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  28. package/@ones-editor/ui/src/providers/insert-menu.d.ts +2 -2
  29. package/@ones-editor/ui/src/providers/utils/add-section.d.ts +9 -0
  30. package/@ones-editor/ui/src/providers/utils/index.d.ts +2 -0
  31. package/@ones-editor/ui/src/quick-menu/index.d.ts +2 -1
  32. package/@ones-editor/ui/src/quick-menu/quick-command-providers.d.ts +3 -3
  33. package/@ones-editor/ui/src/quick-menu/types.d.ts +2 -2
  34. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +3 -0
  35. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +2 -0
  36. package/dist/index.js +6333 -5906
  37. package/package.json +1 -2
  38. package/@ones-editor/graph-embed/assets/index.d.ts +0 -2
  39. package/@ones-editor/graph-embed/types/index.d.ts +0 -16
@@ -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,2 +1,4 @@
1
1
  import { OnesEditor } from '../../../../../@ones-editor/core';
2
+ import { createSectionByGroup } from './add-section';
2
3
  export declare const isSelectedTitleBlock: (editor: OnesEditor) => boolean;
4
+ export { createSectionByGroup };
@@ -1,4 +1,4 @@
1
- import { OnesEditor, CommandItem, CommandFilterId, CommandFilter } from '../../../../@ones-editor/core';
1
+ import { OnesEditor, CommandItem, CommandItemWithSource, CommandFilterId, CommandFilter } from '../../../../@ones-editor/core';
2
2
  import { OnesEditorAutoSuggest } from '../../../../@ones-editor/ui-base';
3
3
  import { QuickMenuOptions } from './types';
4
4
  export default class OnesEditorQuickMenu {
@@ -12,6 +12,7 @@ export default class OnesEditorQuickMenu {
12
12
  get menu(): import("@ones-editor/ui-base").ManualMenu | import("@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu").MobileBottomMenu;
13
13
  addFilter(id: CommandFilterId, filter: CommandFilter): void;
14
14
  destroy(): void;
15
+ filterItems: (items: CommandItemWithSource[], search: string) => CommandItemWithSource[];
15
16
  queryItems: (suggest: unknown, text: string) => Promise<CommandItem[]>;
16
17
  onClose: () => void;
17
18
  onShow: (suggest: OnesEditorAutoSuggest, containerId: string, blockIndex: number, offset: number) => boolean;
@@ -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 {
@@ -17,6 +17,7 @@ export interface AutoSuggestMenuOptions {
17
17
  onClose?: () => void;
18
18
  onShow?: (menu: AutoSuggestMenu) => boolean | undefined;
19
19
  onShown?: (menu: AutoSuggestMenu) => void;
20
+ onSubBarShown?: (menu: AutoSuggestMenu) => void;
20
21
  onClickItem: (menu: AutoSuggestMenu, item: CommandItem) => void;
21
22
  queryItems: (menu: AutoSuggestMenu, text: string) => Promise<CommandItem[]>;
22
23
  renderMenuItem?: (menu: AutoSuggestMenu, item: CommandItem) => HTMLElement | undefined;
@@ -26,6 +27,7 @@ export default class AutoSuggestMenu {
26
27
  menu: ManualMenu | MobileBottomMenu;
27
28
  private currentText;
28
29
  handleSearchText: (text: string) => void;
30
+ get searchText(): string;
29
31
  constructor(options: AutoSuggestMenuOptions);
30
32
  private setItems;
31
33
  popup(anchor: HTMLElement, options?: {
@@ -45,4 +47,5 @@ export default class AutoSuggestMenu {
45
47
  handleClose: () => void;
46
48
  handleKeydown: (event: KeyboardEvent) => boolean;
47
49
  protected highlightText(search: string, items?: CommandItem[]): void;
50
+ handleSubBarShown: () => void;
48
51
  }
@@ -27,6 +27,7 @@ export interface AutoSuggestOptions {
27
27
  queryItems: (menu: OnesEditorAutoSuggest, text: string) => Promise<CommandItem[]>;
28
28
  renderMenuItem?: (menu: OnesEditorAutoSuggest, item: CommandItem) => HTMLElement | undefined;
29
29
  onShown?: (menu: OnesEditorAutoSuggest) => void;
30
+ onSubBarShown?: (menu: OnesEditorAutoSuggest) => void;
30
31
  }
31
32
  declare class OnesEditorAutoSuggest implements OnesEditorInputHandler {
32
33
  private editor;
@@ -48,6 +49,7 @@ declare class OnesEditorAutoSuggest implements OnesEditorInputHandler {
48
49
  private onClose;
49
50
  private onShow;
50
51
  private onShown;
52
+ private onSubBarShown;
51
53
  private onClickItem;
52
54
  private queryItems;
53
55
  private renderMenuItem;