@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.
@@ -93,7 +93,6 @@ export interface EmbedOptions {
93
93
  }
94
94
  export interface Embed {
95
95
  embedType: string;
96
- adjustableMinHeight?: number;
97
96
  createEmbedContent: (editor: OnesEditor, content: BlockContentElement, block: DocEmbedBlock, path: BlockPath, container: ContainerElement, blockElement: BlockElement) => void;
98
97
  convertTo?: (editor: OnesEditor, blockData: DocEmbedBlock, doc: DocObject, type: 'text' | 'html' | 'markdown') => string;
99
98
  getBlockProperties?: (editor: OnesEditor, block: BlockElement) => BlockProperties;
@@ -729,7 +728,7 @@ export interface OnesEditorCommandProvider {
729
728
  id: string;
730
729
  groupIndex?: number;
731
730
  getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
732
- getInsertCommands?: (editor: OnesEditor, containerId: string) => CommandItem[];
731
+ getInsertCommands?: (editor: OnesEditor, containerId: string, params?: CommandParams) => CommandItem[];
733
732
  executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
734
733
  executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
735
734
  executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
@@ -751,7 +750,7 @@ export interface OnesEditorCommandProviders {
751
750
  registerCommandProvider: (provider: OnesEditorCommandProvider) => void;
752
751
  getCommandProviders: () => OnesEditorCommandProvider[];
753
752
  getCommandProvider: (id: string) => OnesEditorCommandProvider;
754
- getCommands: (range: SelectionRange) => CommandItemWithSource[];
753
+ getCommands: (range: SelectionRange, params?: CommandParams) => CommandItemWithSource[];
755
754
  executeCommand: (range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => {
756
755
  [index: string]: CommandResult;
757
756
  };
@@ -1,5 +1,9 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
2
2
  import { BlockResizer } from '../../../../@ones-editor/block-resizer';
3
+ interface EmbedBlockResizerOptions {
4
+ maxHeight?: number;
5
+ minHeight?: number;
6
+ }
3
7
  export declare class EmbedBlockResizer {
4
8
  private editor;
5
9
  private resizing;
@@ -13,5 +17,6 @@ export declare class EmbedBlockResizer {
13
17
  tryEnableResizer(block: BlockElement): void;
14
18
  disableResizer(): void;
15
19
  static get(editor: OnesEditor): EmbedBlockResizer;
16
- static register(editor: OnesEditor, block: BlockElement): EmbedBlockResizer;
20
+ static register(editor: OnesEditor, block: BlockElement, options?: EmbedBlockResizerOptions): EmbedBlockResizer;
17
21
  }
22
+ export {};
@@ -1,6 +1,9 @@
1
- import { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider } from '../../../@ones-editor/ui';
1
+ import { AddMenuCommand, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandParams, QuickMenuCommandProvider } from '../../../@ones-editor/ui';
2
2
  import { CommandItem, OnesEditor } from '../../../@ones-editor/core';
3
3
  export declare class GraphCommandProvider implements QuickMenuCommandProvider {
4
- getCommands: (editor: OnesEditor) => CommandItem[];
4
+ id: string;
5
+ name: string;
6
+ getCommands: (editor: OnesEditor, params?: QuickMenuCommandParams) => CommandItem[];
7
+ checkCommandId: (id: string) => boolean;
5
8
  executeCommand: (editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand) => Promise<null>;
6
9
  }