@ones-editor/editor 0.0.3-beta.11 → 0.0.3-beta.13
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.
- package/@ones-editor/core/src/core/types.d.ts +4 -4
- package/@ones-editor/core/src/utils/file.d.ts +0 -1
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +0 -1
- package/@ones-editor/drop-target/src/drop-target.d.ts +1 -1
- package/@ones-editor/heading-collapse/src/heading-collapse-button/drop-handler.d.ts +1 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +1 -5
- package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +1 -1
- package/@ones-editor/list-block/src/drop/index.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +1 -0
- package/@ones-editor/ui-base/src/auto-suggest/index.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +110 -110
- package/package.json +1 -1
- package/@ones-editor/drop-target/src/handlers/drag-file.d.ts +0 -8
|
@@ -88,8 +88,8 @@ export interface Embed {
|
|
|
88
88
|
getOptions?: (editor: OnesEditor) => EmbedOptions;
|
|
89
89
|
handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
|
|
90
90
|
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocEmbedBlock) => boolean;
|
|
91
|
-
handleDropOver?: (editor: OnesEditor, block: BlockElement,
|
|
92
|
-
handleDrop?: (editor: OnesEditor, block: BlockElement,
|
|
91
|
+
handleDropOver?: (editor: OnesEditor, block: BlockElement, dragObject: DragObject, x: number, y: number) => DropInsertPos | undefined;
|
|
92
|
+
handleDrop?: (editor: OnesEditor, block: BlockElement, dragObject: DragObject, insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
|
|
93
93
|
convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
94
94
|
offset: number;
|
|
95
95
|
data?: DocBlockAttributes;
|
|
@@ -204,8 +204,8 @@ export interface Block {
|
|
|
204
204
|
handleContainerResized?: (editor: OnesEditor, block: BlockElement) => void;
|
|
205
205
|
handleDeleteBlock?: (editor: OnesEditor, block: BlockElement, local: boolean, options: DeleteBlockEventOptions) => void;
|
|
206
206
|
handleUpdateBlock?: (editor: OnesEditor, block: BlockElement, blockData: DocBlock) => boolean;
|
|
207
|
-
handleDropOver?: (editor: OnesEditor, block: BlockElement,
|
|
208
|
-
handleDrop?: (editor: OnesEditor, block: BlockElement,
|
|
207
|
+
handleDropOver?: (editor: OnesEditor, block: BlockElement, dragObject: DragObject, x: number, y: number) => DropInsertPos | undefined;
|
|
208
|
+
handleDrop?: (editor: OnesEditor, block: BlockElement, dragObject: DragObject, insertPos: DropInsertPos, options: DropOptions) => boolean | undefined;
|
|
209
209
|
getClientRects?: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => DOMRect[];
|
|
210
210
|
getMinWidth?: (editor: OnesEditor, block: BlockElement) => number | undefined;
|
|
211
211
|
convertFrom?: (editor: OnesEditor, srcBlock: BlockElement, options: {
|
|
@@ -4,7 +4,6 @@ interface SelectFileOptions {
|
|
|
4
4
|
export declare function selectFile<T extends SelectFileOptions = SelectFileOptions>(accept: string, options?: T): Promise<T extends {
|
|
5
5
|
multiple: true;
|
|
6
6
|
} ? File[] : File>;
|
|
7
|
-
export declare function isDraggingFiles(v: unknown): v is File[];
|
|
8
7
|
export declare function getFileExt(file: string): string;
|
|
9
8
|
export declare function requestDownload(downloadUrl: string, fileName?: string): void;
|
|
10
9
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
import DropIndicator from './drop-indicator';
|
|
3
3
|
export interface DropHandler {
|
|
4
|
-
handleDrop: (editor: OnesEditor,
|
|
4
|
+
handleDrop: (editor: OnesEditor, draggedBlock: BlockElement, targetContainer: ContainerElement, blockIndex: number) => boolean | undefined;
|
|
5
5
|
}
|
|
6
6
|
export default class OnesEditorDropTarget {
|
|
7
7
|
private editor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DropHandler } from '../../../../@ones-editor/drop-target';
|
|
2
2
|
import { OnesEditor, BlockElement, ContainerElement } from '../../../../@ones-editor/core';
|
|
3
3
|
export default class HeadingBlockDropHandler implements DropHandler {
|
|
4
|
-
handleDrop(editor: OnesEditor,
|
|
4
|
+
handleDrop(editor: OnesEditor, draggedBlock: BlockElement, targetContainer: ContainerElement, blockIndex: number): boolean | undefined;
|
|
5
5
|
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { BlockElement, DragObject, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
2
|
import { ImageDragInsertPos } from './types';
|
|
3
|
-
export declare function
|
|
4
|
-
rect: DOMRect;
|
|
5
|
-
data: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function handleDropOver(editor: OnesEditor, block: BlockElement, dragObject: DragObject | null, x: number, y: number): ImageDragInsertPos | undefined;
|
|
3
|
+
export declare function handleDropOver(editor: OnesEditor, block: BlockElement, dragObject: DragObject, x: number, y: number): ImageDragInsertPos | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BlockElement, DragObject, DropInsertPos, DropOptions, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleDrop(editor: OnesEditor, block: BlockElement,
|
|
2
|
+
export declare function handleDrop(editor: OnesEditor, block: BlockElement, dragObject: DragObject, insertPos: DropInsertPos, options: DropOptions): boolean | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OnesEditor, BlockElement, DragObject, DropInsertPos, DropOptions } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleListDrop(editor: OnesEditor, block: BlockElement,
|
|
2
|
+
export declare function handleListDrop(editor: OnesEditor, block: BlockElement, dragObject: DragObject, insertPos: DropInsertPos, options: DropOptions): boolean;
|