@ones-editor/editor 0.0.4 → 0.0.5
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 +1 -1
- package/@ones-editor/list-block/src/index.d.ts +3 -3
- package/@ones-editor/list-block/src/mindmap/mindmap.d.ts +2 -1
- package/@ones-editor/list-block/src/mindmap/utils/index.d.ts +2 -0
- package/@ones-editor/list-block/src/utils/index.d.ts +1 -0
- package/@ones-editor/paste-handler/src/paste-handler.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +147 -148
- package/package.json +1 -1
|
@@ -603,7 +603,7 @@ export interface OnesEditorInputHandler {
|
|
|
603
603
|
handleAfterKeyDown?: (editor: OnesEditor, event: KeyboardEvent) => boolean;
|
|
604
604
|
handleBeforeCopy?: (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
|
|
605
605
|
handleBeforeCut?: (editor: OnesEditor, event: ClipboardEvent) => DocObject | boolean | undefined;
|
|
606
|
-
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
606
|
+
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs, files: File[]) => Promise<boolean>;
|
|
607
607
|
handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
608
608
|
handleBeforePasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
609
609
|
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo) => Promise<boolean>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TextKindBlock } from '../../../@ones-editor/core';
|
|
2
2
|
import OnesEditorListMindmap from './mindmap';
|
|
3
3
|
import { toMindmap } from './mindmap/to-mindmap';
|
|
4
|
-
import { Mindmap } from './mindmap/mindmap';
|
|
4
|
+
import { Mindmap, isViewingAsMindmap, getLastMindmapNode, isMindmapRootBlock } from './mindmap/mindmap';
|
|
5
5
|
import ListBlockShortcuts from './keyboard/shortcut';
|
|
6
6
|
import { resetListStart } from './start/reset-list-start';
|
|
7
|
-
import { getListAllNextBrothers } from './utils/list-brother';
|
|
8
7
|
import './lang';
|
|
9
8
|
import './style.scss';
|
|
10
9
|
export { type ListOptions, type DocListBlock } from './types';
|
|
11
10
|
declare const ListBlock: TextKindBlock;
|
|
11
|
+
export * from './utils';
|
|
12
12
|
export * from './keyboard/to-text-block';
|
|
13
|
-
export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart,
|
|
13
|
+
export { ListBlock, OnesEditorListMindmap, Mindmap, resetListStart, toMindmap, isMindmapRootBlock, ListBlockShortcuts, isViewingAsMindmap, getLastMindmapNode, };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { MindmapTools } from './to-mindmap/types';
|
|
2
|
+
import { isViewingAsMindmap, getLastMindmapNode, isMindmapRootBlock } from './utils';
|
|
2
3
|
declare const Mindmap: MindmapTools;
|
|
3
|
-
export { Mindmap, };
|
|
4
|
+
export { Mindmap, isMindmapRootBlock, isViewingAsMindmap, getLastMindmapNode, };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BlockElement } from '../../../../../@ones-editor/core';
|
|
2
2
|
export declare function requestFullscreen(elem: Element): Promise<unknown>;
|
|
3
3
|
export declare function exitFullscreen(): Promise<unknown>;
|
|
4
|
+
export declare function isMindmapRootBlock(block: BlockElement): boolean;
|
|
4
5
|
export declare function isViewingAsMindmap(block: BlockElement): boolean;
|
|
5
6
|
export declare function addBlockClasses(from: BlockElement, to: BlockElement | null, styles: string[]): void;
|
|
7
|
+
export declare function getLastMindmapNode(mindmapRootNode: BlockElement): BlockElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorDocs, OnesEditorInputHandler } from '../../../@ones-editor/core';
|
|
2
2
|
export default class OnesEditorPasteHandler implements OnesEditorInputHandler {
|
|
3
3
|
constructor(editor: OnesEditor);
|
|
4
|
-
handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs): Promise<boolean>;
|
|
4
|
+
handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs, files: File[]): Promise<boolean>;
|
|
5
5
|
handleInsertImages(editor: OnesEditor, images: File[]): Promise<void>;
|
|
6
6
|
}
|