@ones-editor/editor 2.0.7-beta.0 → 2.0.8-beta.1
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/context-menu/src/helper/utils.d.ts +1 -0
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +2 -2
- package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
- package/@ones-editor/core/src/core/editor/actions/update-block-data.d.ts +2 -2
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -2
- package/@ones-editor/drawio-embed/src/lang/en-us.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/lang/ja-jp.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/lang/zh-cn.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/border-bar/table-border-bar-handler.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +2 -0
- package/dist/index.js +175 -175
- package/dist/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -2,4 +2,5 @@ export declare function blobToString(blob: Blob): Promise<string>;
|
|
|
2
2
|
export declare function isClipboardEmpty(): Promise<boolean>;
|
|
3
3
|
export declare function saveAs(resourceUrl: string, resourceId: string): void;
|
|
4
4
|
export declare function blob2String(blob: Blob): Promise<string>;
|
|
5
|
+
export declare function getRandomFileName(mimeType: string, length?: number): string;
|
|
5
6
|
export declare function getClipboardData(): Promise<DataTransfer>;
|
|
@@ -27,11 +27,11 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
27
27
|
callbacks: EditorInputCallbacks;
|
|
28
28
|
inputElement: HTMLInputElement;
|
|
29
29
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
30
|
-
private
|
|
30
|
+
private isInCommandBar;
|
|
31
31
|
destroy(): void;
|
|
32
32
|
getInput(): HTMLInputElement;
|
|
33
33
|
focus(): void;
|
|
34
|
-
isInDisableScrollMask(target:
|
|
34
|
+
isInDisableScrollMask(target: Node): boolean;
|
|
35
35
|
handleWindowBlur: () => void;
|
|
36
36
|
handleWindowFocus: () => void;
|
|
37
37
|
handleDocumentClick: (event: MouseEvent) => void;
|
|
@@ -227,7 +227,7 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
227
227
|
findContainerBlocks: (containerId: string) => DocBlock[] | null;
|
|
228
228
|
getBlockData: (containerId: string, blockIndex: number) => DocBlock;
|
|
229
229
|
localUpdateBlockText: (containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions) => DocBlockText;
|
|
230
|
-
localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange) => DocBlock;
|
|
230
|
+
localUpdateBlockData: (containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange, options?: UpdateBlockOptions) => DocBlock;
|
|
231
231
|
localInsertBlock: (containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions) => DocBlock;
|
|
232
232
|
localDeleteBlock: (containerId: string, blockIndex: number, newRange: OnesEditorDocRange) => DocBlock;
|
|
233
233
|
localInsertChildContainers: (containers: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocBlock, DocBlockAttributes, DocEmbedData, OnesEditorDocRange } from '../../doc';
|
|
1
|
+
import { DocBlock, DocBlockAttributes, DocEmbedData, OnesEditorDocRange, UpdateBlockOptions } from '../../doc';
|
|
2
2
|
import { BlockElement, OnesEditor, SelectionRange } from '../../types';
|
|
3
|
-
export declare function editorUpdateBlockData(editor: OnesEditor, block: BlockElement, data: DocBlockAttributes, newRange: OnesEditorDocRange): DocBlock;
|
|
3
|
+
export declare function editorUpdateBlockData(editor: OnesEditor, block: BlockElement, data: DocBlockAttributes, newRange: OnesEditorDocRange, options?: UpdateBlockOptions): DocBlock;
|
|
4
4
|
export declare function editorUpdateEmbedData(editor: OnesEditor, block: BlockElement, data: DocEmbedData, newRange?: SelectionRange): DocBlock;
|
|
@@ -16,7 +16,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
16
16
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
17
17
|
verifyBlockWritable(containerId: string, blockIndex: number): void;
|
|
18
18
|
localUpdateBlockText(containerId: string, blockIndex: number, actions: DocBlockTextActions, options?: UpdateBlockOptions): DocBlockText;
|
|
19
|
-
localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange): DocBlock;
|
|
19
|
+
localUpdateBlockData(containerId: string, blockIndex: number, delta: DocBlockDelta, newRange: OnesEditorDocRange, options?: UpdateBlockOptions): DocBlock;
|
|
20
20
|
localInsertBlock(containerId: string, blockIndex: number, data: DocBlock, newRange: OnesEditorDocRange, options?: InsertBlockOptions): DocBlock;
|
|
21
21
|
localDeleteBlock(containerId: string, blockIndex: number, newRange: OnesEditorDocRange): DocBlock;
|
|
22
22
|
localDeleteChildContainers(containerIds: string[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange } from './doc';
|
|
2
|
+
import { DocBlock, DocBlockAttributes, DocBlocks, DocBlockText, DocBlockTextAttributes, DocBox, DocEmbedBlock, DocEmbedData, DocInsertion, DocObject, InsertBlockOptions, OnesEditorDoc, OnesEditorDocRange, UpdateBlockOptions } from './doc';
|
|
3
3
|
export type ContainerElement = HTMLDivElement & {
|
|
4
4
|
__neverUse: 'ContainerElement';
|
|
5
5
|
};
|
|
@@ -550,7 +550,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
550
550
|
insertDocAt: (container: ContainerElement, blockIndex: number, doc: DocObject, cloneDocResult?: CloneBlockResultInfo) => BlockElement[];
|
|
551
551
|
pasteDoc: (doc: DocObject) => Promise<void>;
|
|
552
552
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
553
|
-
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
553
|
+
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange, options?: UpdateBlockOptions) => DocBlock;
|
|
554
554
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
555
555
|
updateBoxData: (boxData: DocBox, options?: InsertTextOptions) => void;
|
|
556
556
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
@@ -10,6 +10,7 @@ export declare class TableBlockBorderHandler {
|
|
|
10
10
|
show(tableBlock: BlockElement): void;
|
|
11
11
|
update(): void;
|
|
12
12
|
closeToolbar(): void;
|
|
13
|
+
isInBlock: (block: BlockElement, event: MouseEvent) => boolean;
|
|
13
14
|
hide(): void;
|
|
14
15
|
}
|
|
15
16
|
export declare function handleTableBorderBar(editor: OnesEditor, type: 'create' | 'update'): void;
|