@ones-editor/editor 0.0.3-beta.118 → 0.0.3-beta.119

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,4 +1,5 @@
1
1
  import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
2
- import { BlockMenuItem } from '../types';
3
- export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before'): BlockMenuItem[];
2
+ import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
3
+ import type { BlockMenuItem } from '../types';
4
+ export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options?: GetAllQuickMenuItemsOptions): BlockMenuItem[];
4
5
  export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
@@ -0,0 +1,3 @@
1
+ import type { Box } from '../../types';
2
+ declare const AnchorBox: Box;
3
+ export default AnchorBox;
@@ -2,4 +2,5 @@ import TextBox from './text-box';
2
2
  import BrBox from './br-box';
3
3
  import EditorBoxes from './editor-boxes';
4
4
  import ImageBox from './image-box';
5
- export { EditorBoxes, TextBox, BrBox, ImageBox };
5
+ import AnchorBox from './anchor-box';
6
+ export { EditorBoxes, TextBox, BrBox, ImageBox, AnchorBox };
@@ -107,8 +107,9 @@ export interface DeleteBlockEventOptions {
107
107
  }
108
108
  export type CommandItemType = 'normal' | 'separator' | 'section';
109
109
  export type CommandItemState = 'disabled' | 'checked' | 'selected';
110
+ export type CloseReason = 'selectionChange' | 'clickItem' | 'clickBackground' | 'cancelBar' | 'fromHover' | 'switchItem' | null;
110
111
  export interface Closeable {
111
- close: () => void;
112
+ close: (reason: CloseReason) => void;
112
113
  click: (item: CommandItem, target: HTMLElement) => void;
113
114
  }
114
115
  export type CommandItemChildrenPlacement = 'auto' | 'top' | 'left' | 'right' | 'bottom' | 'auto-start' | 'auto-end' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
@@ -26,6 +26,7 @@ export declare class ImageObject implements ImageObjectBase {
26
26
  tryEnableResizer(): void;
27
27
  disableResizer(): void;
28
28
  private handleMouseDown;
29
+ private handleRootContainerResize;
29
30
  private handleEditorResize;
30
31
  private handleResizing;
31
32
  private handleResized;
@@ -3,8 +3,9 @@ import { ImageObject } from './image-object';
3
3
  import './image-embed-style.scss';
4
4
  import './locale';
5
5
  import EmptyImageConverterInputHandler from './empty-image-converter';
6
+ import { ImagePasteHandler } from './paste-handler';
6
7
  export * from './shortcuts';
7
8
  export * from './types';
8
- export { ImageObject };
9
+ export { ImageObject, ImagePasteHandler };
9
10
  declare const ImageEmbed: Embed;
10
11
  export { ImageEmbed, EmptyImageConverterInputHandler };