@ones-editor/editor 2.0.5-beta.5 → 2.0.5-beta.7

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,9 +1,11 @@
1
1
  import type { OnesEditorInputHandler, OnesEditor, OnesEditorCustom, DocObject } from '../../../../@ones-editor/core';
2
2
  export declare class CalloutInputHandler implements OnesEditorInputHandler, OnesEditorCustom {
3
3
  constructor(editor: OnesEditor);
4
+ private pasteHasForbidden;
4
5
  private handleBackspaceEvent;
5
6
  handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
6
7
  handleBeforePasteDoc(editor: OnesEditor, doc: DocObject): Promise<boolean>;
8
+ handleAfterPaste(): Promise<boolean>;
7
9
  destroy(): void;
8
10
  static init(editor: OnesEditor): void;
9
11
  }
@@ -1,10 +1,16 @@
1
1
  import { BlockElement, CommandItem, OnesEditor } from '../../../../../@ones-editor/core';
2
+ import { CalloutBlockPayload } from '../types';
2
3
  export type PresetId = `preset-${0 | 1}`;
4
+ type Preset = CalloutBlockPayload & {
5
+ name: string;
6
+ };
3
7
  export declare function isPresetId(id: string): id is PresetId;
4
8
  export declare function getPresetId(id: PresetId): string;
9
+ export declare function getPreset(id: PresetId): Preset;
5
10
  export declare function getPresetIcon(id: string): string;
6
11
  export declare function getPresetPayload(presetId: PresetId): {
7
12
  backgroundColor: number;
8
13
  icon: "preset-0" | "preset-1";
9
14
  };
10
15
  export declare function createPresetItem(presetId: PresetId, editor: OnesEditor, block: BlockElement): CommandItem;
16
+ export {};
@@ -6,6 +6,7 @@ export default class PasteSpecialHandler implements OnesEditorInputHandler {
6
6
  lastUndoAction: OnesEditorUndoAction | null;
7
7
  lastPos: BlockPosition | null;
8
8
  event: ClipboardEvent | null;
9
+ order: number;
9
10
  constructor(editor: OnesEditor);
10
11
  destroy(): void;
11
12
  handleChanged(editor: OnesEditor, action: OnesEditorUndoAction): void;