@ones-editor/editor 1.1.0-beta.7 → 1.1.0-beta.8
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/containers/children.d.ts +1 -0
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +6 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +173 -173
- package/package.json +1 -1
|
@@ -4,3 +4,4 @@ export declare function getFirstChildBlock(container: ContainerElement): BlockEl
|
|
|
4
4
|
export declare function getLastChildBlock(container: ContainerElement): BlockElement;
|
|
5
5
|
export declare function getChildBlockCount(container: ContainerElement): number;
|
|
6
6
|
export declare function getBlockByIndex(container: ContainerElement, blockIndex: number): BlockElement;
|
|
7
|
+
export declare function findBlockByIndex(container: ContainerElement, blockIndex: number): BlockElement | null;
|
|
@@ -505,6 +505,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
505
505
|
getBlockById: (id: string) => BlockElement;
|
|
506
506
|
getBoxById: (id: string) => BoxElement;
|
|
507
507
|
getBlockByIndex: (containerId: string, blockIndex: number) => BlockElement;
|
|
508
|
+
findBlockByIndex: (containerId: string, blockIndex: number) => BlockElement | null;
|
|
508
509
|
getBlockIndex: (block: BlockElement | string) => number;
|
|
509
510
|
getContainerById: (id: string) => ContainerElement;
|
|
510
511
|
getParentContainer: (block: BlockElement) => ContainerElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuildResourceUrlOptions, DocObject, DocVersion, EventCallbacks, OnesEditorDocHistoryData, OnesEditorDocServer, OnesEditorDocServerMeta, OnesEditorDocVersionExtra, OnesEditorDocVersionHelper, OnesEditorHistoryDataParseHandler, RemoteUsers } from '../../../../@ones-editor/core';
|
|
2
|
-
import { ShareDBDocCallbacks, ShareDBDocOptions } from '../types';
|
|
2
|
+
import { AuthMessage, ShareDBDocCallbacks, ShareDBDocOptions } from '../types';
|
|
3
3
|
import ShareDBSimpleClient from './simple-client';
|
|
4
4
|
export default class ShareDBServer extends EventCallbacks<ShareDBDocCallbacks> implements OnesEditorDocServer, OnesEditorDocVersionHelper {
|
|
5
5
|
private options;
|
|
@@ -26,4 +26,9 @@ export default class ShareDBServer extends EventCallbacks<ShareDBDocCallbacks> i
|
|
|
26
26
|
createVersion(tag: string, publish: boolean): Promise<DocVersion>;
|
|
27
27
|
parseHistoryData(historyData: OnesEditorDocHistoryData, handler: OnesEditorHistoryDataParseHandler): void;
|
|
28
28
|
getServerMeta(): OnesEditorDocServerMeta;
|
|
29
|
+
static auth(auth: AuthMessage, serverUrl: string): Promise<{
|
|
30
|
+
read: string;
|
|
31
|
+
user: string;
|
|
32
|
+
}>;
|
|
33
|
+
static load(options: ShareDBDocOptions): Promise<ShareDBServer>;
|
|
29
34
|
}
|