@ones-editor/editor 1.1.5 → 1.1.6-bate.6
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/child-block-tracker/src/event-tracker.d.ts +3 -2
- package/@ones-editor/child-block-tracker/src/index.d.ts +3 -3
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +0 -2
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
- package/@ones-editor/drawio-embed/src/helper/index.d.ts +1 -1
- package/@ones-editor/misc/src/index.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +0 -4
- package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +0 -2
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +0 -2
- package/@ones-editor/table-block/src/table-block/chart/index.d.ts +2 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +174 -174
- package/package.json +1 -1
- package/@ones-editor/misc/src/re-auth/index.d.ts +0 -18
- package/@ones-editor/misc/src/re-auth/locale/en-us.d.ts +0 -6
- package/@ones-editor/misc/src/re-auth/locale/index.d.ts +0 -1
- package/@ones-editor/misc/src/re-auth/locale/ja-jp.d.ts +0 -6
- package/@ones-editor/misc/src/re-auth/locale/zh-cn.d.ts +0 -6
- package/@ones-editor/misc/src/re-auth/ui/toolbar.d.ts +0 -10
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import { BlockElement, OnesEditor, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
2
|
+
import { BlockElement, BlockPathComponent, OnesEditor, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
3
3
|
export type ChildBlockAction = 'text-change' | 'data-change' | 'insert' | 'remove';
|
|
4
4
|
export interface ChildBlockEvents {
|
|
5
|
-
change: (editor: OnesEditor, parentBlock: BlockElement, childBlock: BlockElement, action: ChildBlockAction) => void;
|
|
5
|
+
change: (editor: OnesEditor, target: BlockPathComponent, parentBlock: BlockElement, childBlock: BlockElement, action: ChildBlockAction) => void;
|
|
6
|
+
insert: (editor: OnesEditor, target: BlockPathComponent) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare class ChildBlockEventTracker extends TypedEmitter<ChildBlockEvents> implements OnesEditorDocCallbacks {
|
|
8
9
|
private editor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
1
|
+
import { BlockElement, BlockPathComponent, OnesEditor } from '../../../@ones-editor/core';
|
|
2
2
|
export * from './event-tracker';
|
|
3
|
-
export declare function trackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor,
|
|
4
|
-
export declare function untrackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor,
|
|
3
|
+
export declare function trackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor, target: BlockPathComponent, parentBlock?: BlockElement, childBlock?: BlockElement) => void): void;
|
|
4
|
+
export declare function untrackChildBlockEvent(editor: OnesEditor, callback: (editor: OnesEditor, target: BlockPathComponent, parentBlock?: BlockElement, childBlock?: BlockElement) => void): void;
|
|
@@ -30,6 +30,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
30
30
|
destroy(): void;
|
|
31
31
|
getInput(): HTMLInputElement;
|
|
32
32
|
focus(): void;
|
|
33
|
+
handleWindowBlur: () => void;
|
|
33
34
|
handleDocumentClick: (event: MouseEvent) => void;
|
|
34
35
|
handleDocumentSelectionChange: () => void;
|
|
35
36
|
handleEditorSelectionChanged: () => void;
|
|
@@ -109,7 +109,6 @@ export interface OnesEditorDocCallbacks {
|
|
|
109
109
|
onCustomMessage?: (msg: unknown) => void;
|
|
110
110
|
onStatusChanged?: (status: OnesEditorDocStatus) => void;
|
|
111
111
|
onError?: (error: Error) => void;
|
|
112
|
-
onAuthRecover?: () => void;
|
|
113
112
|
}
|
|
114
113
|
export interface UploadResourceOptions {
|
|
115
114
|
onProgress?: (progress: number) => void;
|
|
@@ -222,7 +221,6 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
222
221
|
recognizeLink?: (link: string) => Promise<RecognizeLinkResult>;
|
|
223
222
|
beginBatchUpdate: () => number;
|
|
224
223
|
endBatchUpdate: () => number;
|
|
225
|
-
triggerReAuth?: () => void;
|
|
226
224
|
}
|
|
227
225
|
export interface OnesEditorDocHistoryData {
|
|
228
226
|
user: {
|
|
@@ -41,7 +41,6 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
41
41
|
broadcastMessage(data: unknown): void;
|
|
42
42
|
getUser(): import("../doc").OnesEditorUser;
|
|
43
43
|
getRemoteUsers(): import("../doc").OnesEditorRemoteUsers;
|
|
44
|
-
triggerReAuth(): void | undefined;
|
|
45
44
|
destroy(): void;
|
|
46
45
|
getServerMeta(): OnesEditorDocServerMeta;
|
|
47
46
|
reset(doc: OnesEditorDoc): void;
|
|
@@ -7,7 +7,7 @@ export declare function getDrawioIframeUrl(editor: OnesEditor): string;
|
|
|
7
7
|
export declare function resizeObserver(el: HTMLElement): {
|
|
8
8
|
disconnect: () => void;
|
|
9
9
|
};
|
|
10
|
-
export declare function initializeDrawioIframe(editor: OnesEditor
|
|
10
|
+
export declare function initializeDrawioIframe(editor: OnesEditor): Promise<{
|
|
11
11
|
drawioIframe: HTMLIFrameElement;
|
|
12
12
|
exit: () => void;
|
|
13
13
|
}>;
|
|
@@ -24,9 +24,6 @@ export declare class AuthConnection {
|
|
|
24
24
|
logout(): Promise<void>;
|
|
25
25
|
init(auth: AuthMessage): Promise<void>;
|
|
26
26
|
handleAuthError(): Promise<void>;
|
|
27
|
-
reAuth: () => Promise<void>;
|
|
28
|
-
private emitPermissionError;
|
|
29
|
-
private emitAuthRecover;
|
|
30
27
|
private emitAuthError;
|
|
31
28
|
private emitRequestReloadError;
|
|
32
29
|
private emitWriteConflictError;
|
|
@@ -35,7 +32,6 @@ export declare class AuthConnection {
|
|
|
35
32
|
get(collectionName: string, documentID: string): Doc;
|
|
36
33
|
addEventListener(event: 'open' | 'close' | 'error', callback: (e: Event | Error) => void): void;
|
|
37
34
|
onAuthError(callback: (error: Error) => void): void;
|
|
38
|
-
onAuthRecover(callback: () => void): void;
|
|
39
35
|
onWriteConflictError(callback: (error: Error) => void): void;
|
|
40
36
|
onMaxUsersError(callback: () => void): void;
|
|
41
37
|
onRequestReloadError(callback: (error: Error) => void): void;
|
|
@@ -15,7 +15,6 @@ export default class ShareDBClient {
|
|
|
15
15
|
close(logout: boolean): void;
|
|
16
16
|
on(event: 'open' | 'close' | 'error', callback: (event: Event | Error) => void): void;
|
|
17
17
|
onAuthError(callback: (error: Error) => void): void;
|
|
18
|
-
onAuthRecover(callback: () => void): void;
|
|
19
18
|
onWriteConflictError(callback: (error: Error) => void): void;
|
|
20
19
|
onMaxUsersError(callback: () => void): void;
|
|
21
20
|
onRequestReloadError(callback: (error: Error) => void): void;
|
|
@@ -53,5 +52,4 @@ export default class ShareDBClient {
|
|
|
53
52
|
createVersion(tag: string, publish: boolean): Promise<any>;
|
|
54
53
|
recognizeLink(url: string): Promise<LinkDetails>;
|
|
55
54
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
56
|
-
reAuth(): void;
|
|
57
55
|
}
|
|
@@ -75,7 +75,6 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
75
75
|
onCreateComment(commentId: string, local: boolean): void;
|
|
76
76
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
77
77
|
onCustomMessage(msg: unknown): void;
|
|
78
|
-
onAuthRecover(): void;
|
|
79
78
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
80
79
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
81
80
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
@@ -107,5 +106,4 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
107
106
|
recognizeLink(url: string): Promise<import("../types").LinkDetails>;
|
|
108
107
|
parseHistoryData(historyData: OnesEditorDocHistoryData, handler: OnesEditorHistoryDataParseHandler): void;
|
|
109
108
|
getServerMeta(): OnesEditorDocServerMeta;
|
|
110
|
-
triggerReAuth(): void;
|
|
111
109
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement } from '../../../../../@ones-editor/core';
|
|
2
|
-
export declare function handleChartDebounceUpdate(editor: OnesEditor, parentBlock
|
|
1
|
+
import { OnesEditor, BlockElement, BlockPathComponent } from '../../../../../@ones-editor/core';
|
|
2
|
+
export declare function handleChartDebounceUpdate(editor: OnesEditor, target?: BlockPathComponent, parentBlock?: BlockElement): void;
|
|
3
3
|
export declare function handleChartUpdate(editor: OnesEditor, parentBlock: BlockElement): void;
|