@ones-editor/editor 0.0.3-beta.147 → 0.0.3-beta.148

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.
@@ -1,11 +1,12 @@
1
1
  import { BlockElement, OnesEditor, CommandItem } from '../../../../@ones-editor/core';
2
+ import type { ManualShowCommandBarOptions } from '../../../../@ones-editor/ui-base';
2
3
  export default class BlockMenu {
3
4
  private editor;
4
5
  private menu;
5
6
  currentBlock: BlockElement | null;
6
7
  private commandBlock;
7
8
  constructor(editor: OnesEditor);
8
- show(target: HTMLElement): void;
9
+ show(target: HTMLElement, options?: ManualShowCommandBarOptions): void;
9
10
  isInMenu(eventTarget: EventTarget | null): boolean;
10
11
  handleShow: () => void;
11
12
  handleClose: () => void;
@@ -12,6 +12,7 @@ export default class BlockMenuButtonDragHandler {
12
12
  };
13
13
  constructor(editor: OnesEditor, button: OnesEditorBlockMenuButton);
14
14
  destroy(): void;
15
+ handleMouseDown: (event: MouseEvent) => void;
15
16
  handleDragStart: (event: MouseEvent) => void;
16
17
  handleDrag: (event: MouseEvent) => void;
17
18
  handleDragEnd: (event: MouseEvent) => void;
@@ -11,3 +11,17 @@ export declare function hashCode(str: string): number;
11
11
  * 4. 默认处理从前取
12
12
  */
13
13
  export declare function abbreviation(name: string, maxLength?: number): string;
14
+ declare enum EColor {
15
+ blue = "#338FE5",
16
+ cyan = "#34AFDE",
17
+ teal = "#2CB2AE",
18
+ green = "#24B47E",
19
+ kelly = "#8AAB3F",
20
+ yellow = "#F0A100",
21
+ orange = "#EB6414",
22
+ red = "#E52727",
23
+ fuchsia = "#BE507D",
24
+ purple = "#9678D3"
25
+ }
26
+ export declare function getColorFromContent(content: string): EColor;
27
+ export {};