@ones-editor/editor 1.0.5 → 1.0.6-bate.2
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 +0 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +0 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -1
- package/@ones-editor/core/src/local-doc/index.d.ts +0 -1
- package/@ones-editor/sharedb-doc/src/doc/sharedb-client.d.ts +0 -4
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +0 -1
- package/dist/index.js +178 -178
- package/package.json +1 -1
|
@@ -213,7 +213,6 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
213
213
|
}[]) => void;
|
|
214
214
|
localDeleteChildContainers: (containerIds: string[]) => void;
|
|
215
215
|
addResources: (resourceIds: string[]) => Promise<string[]>;
|
|
216
|
-
patchSyncResources: (resourceIds: string[]) => Promise<string[]>;
|
|
217
216
|
uploadResource: (file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
|
|
218
217
|
request: <T = unknown>(url: string, options?: unknown) => Promise<T>;
|
|
219
218
|
broadcastMessage: (data: unknown) => void;
|
|
@@ -36,7 +36,6 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
36
36
|
onError(error: Error): void;
|
|
37
37
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
38
38
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
39
|
-
patchSyncResources(resourceIds: string[]): Promise<string[]>;
|
|
40
39
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
41
40
|
request<T = unknown>(url: string, options?: unknown): Promise<T>;
|
|
42
41
|
broadcastMessage(data: unknown): void;
|
|
@@ -97,6 +97,7 @@ export interface Embed {
|
|
|
97
97
|
data?: DocBlockAttributes;
|
|
98
98
|
}) => ConvertBlockResult | null;
|
|
99
99
|
toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject, path: BlockPath) => Promise<DocObject | undefined>;
|
|
100
|
+
getResources?: (editor: OnesEditor, blockData: DocBlock) => string[];
|
|
100
101
|
}
|
|
101
102
|
export interface ConvertBlockResult {
|
|
102
103
|
blockData: DocBlock;
|
|
@@ -226,7 +227,7 @@ export interface Block {
|
|
|
226
227
|
toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject) => Promise<DocObject | undefined>;
|
|
227
228
|
getBlockStyles?: (editor: OnesEditor, block: BlockElement) => BlockStyles;
|
|
228
229
|
blockToDoc?: (srcDoc: DocObject, srcBlockData: DocBlock, childBlockConverter: (srcDoc: DocObject, srcBlockData: DocBlock) => DocObject) => DocObject;
|
|
229
|
-
getResources?: (data: DocBlock) => string[];
|
|
230
|
+
getResources?: (editor: OnesEditor, data: DocBlock) => string[];
|
|
230
231
|
replaceResources?: (data: DocBlock, resources: Map<string, string>) => void;
|
|
231
232
|
}
|
|
232
233
|
export type TextStyles = {
|
|
@@ -24,7 +24,6 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
|
|
|
24
24
|
localDeleteChildContainers(containerIds: string[]): void;
|
|
25
25
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
26
26
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
27
|
-
patchSyncResources(resourceIds: string[]): Promise<string[]>;
|
|
28
27
|
buildResourceUrl(src: string): string;
|
|
29
28
|
request<T>(url: string, opt?: any): Promise<T>;
|
|
30
29
|
broadcastMessage(data: unknown): void;
|
|
@@ -30,11 +30,7 @@ export default class ShareDBClient {
|
|
|
30
30
|
getFileUrlByHash(uploadFileUrl: string, hash: string, name: string, size: number, headers: {
|
|
31
31
|
[index: string]: string;
|
|
32
32
|
}): Promise<any>;
|
|
33
|
-
patchSyncResourceByHash(uploadFileUrl: string, hash: string[], headers: {
|
|
34
|
-
[index: string]: string;
|
|
35
|
-
}): Promise<any[]>;
|
|
36
33
|
getFileUrlsByHashes(resourceHashes: string[]): Promise<any[]>;
|
|
37
|
-
patchSyncResourceByHashes(resourceHashes: string[]): Promise<any[]>;
|
|
38
34
|
uploadFile(url: string, file: File, headers: {
|
|
39
35
|
[index: string]: string;
|
|
40
36
|
}, onProgress: OnProgress, options?: {
|
|
@@ -76,7 +76,6 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
76
76
|
onUpdateComment(commentId: string, local: boolean): void;
|
|
77
77
|
onCustomMessage(msg: unknown): void;
|
|
78
78
|
addResources(resourceIds: string[]): Promise<string[]>;
|
|
79
|
-
patchSyncResources(resourceIds: string[]): Promise<any[]>;
|
|
80
79
|
uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
|
|
81
80
|
buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
|
|
82
81
|
request<T = unknown>(url: string, options?: unknown): Promise<T>;
|