@ones-editor/editor 2.1.1-beta.1 → 2.1.1-beta.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.1.1-beta.1",
3
+ "version": "2.1.1-beta.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,24 +0,0 @@
1
- import { AxiosResponse } from 'axios';
2
- import { BuildResourceUrlOptions } from '../../../../@ones-editor/core';
3
- import { OnProgress } from '../types';
4
- export default abstract class ShareDBClientBase {
5
- abstract apiServer(): string;
6
- abstract request<T = unknown>(url: string, opt?: any): Promise<AxiosResponse<any, T>>;
7
- abstract token(): string;
8
- abstract resourceToken(): string;
9
- abstract docId(): string;
10
- getFileUrlByHash(uploadFileUrl: string, hash: string, name: string, size: number, headers: {
11
- [index: string]: string;
12
- }): Promise<any>;
13
- getFileUrlsByHashes(resourceHashes: string[]): Promise<any[]>;
14
- uploadFile(url: string, file: File, headers: {
15
- [index: string]: string;
16
- }, onProgress: OnProgress, options?: {
17
- thumbnail?: boolean;
18
- }): Promise<string>;
19
- uploadResource(file: File, onProgress?: OnProgress, options?: {
20
- thumbnail?: boolean;
21
- }): Promise<string>;
22
- getResourceId(url: string): string;
23
- buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
24
- }
@@ -1,17 +0,0 @@
1
- import { DocObject, LocalDoc, OnesEditorUser, UploadResourceOptions, UploadResourceResult } from '../../../../@ones-editor/core';
2
- export interface ShareDBLocalDocOptions {
3
- serverUrl: string;
4
- token: string;
5
- resourceToken?: string;
6
- user: OnesEditorUser;
7
- docId: string;
8
- }
9
- export default class ShareDBLocalDoc extends LocalDoc {
10
- private _options;
11
- private _client;
12
- constructor(docObject: DocObject, _options: ShareDBLocalDocOptions);
13
- buildResourceUrl(src: string): string;
14
- getUser(): OnesEditorUser;
15
- request<T>(url: string, opt?: any): Promise<T>;
16
- uploadResource(file: File, options?: UploadResourceOptions | undefined): Promise<UploadResourceResult>;
17
- }