@ones-editor/editor 3.0.12-beta.2 → 3.0.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/doc/doc.d.ts +1 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -1
- package/@ones-editor/core/src/local-doc/index.d.ts +1 -1
- package/@ones-editor/drawio-embed/types/index.d.ts +0 -2
- package/@ones-editor/main-toolbar/src/items/text-color.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +5 -0
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +2 -2
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +1 -1
- package/dist/error-handler/index.d.ts +2 -1
- package/dist/index.js +83 -76
- package/package.json +1 -1
|
@@ -257,7 +257,7 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
257
257
|
endBatchUpdate: () => number;
|
|
258
258
|
triggerReAuth?: (auto?: boolean) => void;
|
|
259
259
|
rawData?: () => DocObject;
|
|
260
|
-
|
|
260
|
+
applyingRemoteOps?: () => boolean;
|
|
261
261
|
}
|
|
262
262
|
export interface OnesEditorDocHistoryData {
|
|
263
263
|
user: {
|
|
@@ -8,7 +8,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
8
8
|
constructor(editor: OnesEditor, externalDoc: OnesEditorDoc, localEvents: EditorDocLocalActionCallbacks);
|
|
9
9
|
beginBatchUpdate(): number;
|
|
10
10
|
endBatchUpdate(): number;
|
|
11
|
-
|
|
11
|
+
applyingRemoteOps(): boolean;
|
|
12
12
|
registerLocalEvents(events: EditorDocLocalActionCallbacks): void;
|
|
13
13
|
toJSON(): DocObject;
|
|
14
14
|
getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
|
|
@@ -133,7 +133,6 @@ export interface CommandItem {
|
|
|
133
133
|
order?: number;
|
|
134
134
|
type?: CommandItemType;
|
|
135
135
|
element?: HTMLElement | ((item: CommandItem) => HTMLElement);
|
|
136
|
-
useDefaultClickHandler?: boolean;
|
|
137
136
|
icon?: string;
|
|
138
137
|
childrenType?: 'menu' | 'toolbar' | 'mobile-bottom-menu';
|
|
139
138
|
children?: CommandItem[];
|
|
@@ -629,6 +628,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
629
628
|
}
|
|
630
629
|
export interface ChangeSelectionOptions {
|
|
631
630
|
noScroll?: boolean;
|
|
631
|
+
local?: boolean;
|
|
632
632
|
}
|
|
633
633
|
export interface OnesEditorSelection {
|
|
634
634
|
readonly range: SelectionRange;
|
|
@@ -11,7 +11,7 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
|
|
|
11
11
|
endBatchUpdate(): number;
|
|
12
12
|
toJSON(): DocObject;
|
|
13
13
|
rawData(): DocObject;
|
|
14
|
-
|
|
14
|
+
applyingRemoteOps(): boolean;
|
|
15
15
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
16
16
|
findContainerBlocks(containerId: string): DocBlock[];
|
|
17
17
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
@@ -31,9 +31,7 @@ export interface DrawIoOptions {
|
|
|
31
31
|
drawioJs?: string;
|
|
32
32
|
pako?: string;
|
|
33
33
|
};
|
|
34
|
-
menuItemSuffix?: (editor: OnesEditor) => Element;
|
|
35
34
|
callbacks?: {
|
|
36
|
-
onBeforeInsertDrawio?: (editor: OnesEditor) => boolean | undefined;
|
|
37
35
|
onError?: (editor: OnesEditor, error: Error) => void;
|
|
38
36
|
onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
|
|
39
37
|
onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
|
|
@@ -16,7 +16,6 @@ export declare class ColorItem extends TextColorItem implements ToolbarItem {
|
|
|
16
16
|
order?: number | undefined;
|
|
17
17
|
type?: import("@ones-editor/core").CommandItemType | undefined;
|
|
18
18
|
element?: HTMLElement | ((item: import("@ones-editor/core").CommandItem) => HTMLElement) | undefined;
|
|
19
|
-
useDefaultClickHandler?: boolean | undefined;
|
|
20
19
|
icon?: string | undefined;
|
|
21
20
|
childrenType?: "menu" | "toolbar" | "mobile-bottom-menu" | undefined;
|
|
22
21
|
children?: import("@ones-editor/core").CommandItem[] | undefined;
|
|
@@ -24,6 +24,8 @@ export declare class AuthConnection extends TypedEmitter<AutoConnectionEvents> {
|
|
|
24
24
|
private closed;
|
|
25
25
|
private connection?;
|
|
26
26
|
private ws?;
|
|
27
|
+
private visibilityListenerRegistered;
|
|
28
|
+
private connectionDisconnected;
|
|
27
29
|
private token;
|
|
28
30
|
private resourceToken;
|
|
29
31
|
private authMessage;
|
|
@@ -58,4 +60,7 @@ export declare class AuthConnection extends TypedEmitter<AutoConnectionEvents> {
|
|
|
58
60
|
private handleMessage;
|
|
59
61
|
get(collectionName: string, documentID: string): Doc;
|
|
60
62
|
end(logout: boolean): void;
|
|
63
|
+
private registerVisibilityListener;
|
|
64
|
+
private unregisterVisibilityListener;
|
|
65
|
+
private handleVisibilityChange;
|
|
61
66
|
}
|
|
@@ -16,11 +16,11 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
16
16
|
disableLogout: boolean;
|
|
17
17
|
destroyed: boolean;
|
|
18
18
|
editStatus: EditStatus;
|
|
19
|
-
|
|
19
|
+
_applyingRemoteOps: boolean;
|
|
20
20
|
constructor(options: ShareDBDocOptions, client: ShareDBClient, doc: Doc, disableLogout?: boolean);
|
|
21
21
|
beginBatchUpdate(): number;
|
|
22
22
|
endBatchUpdate(): number;
|
|
23
|
-
|
|
23
|
+
applyingRemoteOps(): boolean;
|
|
24
24
|
static load(options: ShareDBDocOptions): Promise<ShareDBDoc>;
|
|
25
25
|
private handleNothingPending;
|
|
26
26
|
private handleCreate;
|