@ones-editor/editor 1.1.5 → 1.1.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.
@@ -1,3 +1,3 @@
1
1
  import { BlockElement, OnesEditor } from '../../../types';
2
2
  import EditorSimpleSelectionRange from '../../../selection/range/simple-range';
3
- export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, x: number, y: number): EditorSimpleSelectionRange | null;
3
+ export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, xOrign: number, yOrign: number): EditorSimpleSelectionRange | null;
@@ -120,6 +120,7 @@ export interface UploadResourceResult {
120
120
  export interface BuildResourceUrlOptions {
121
121
  withToken?: boolean;
122
122
  downloadFileName?: string;
123
+ syncNewResources?: (newResourceId: string, resourceUrl: string) => void;
123
124
  }
124
125
  export type OnesEditorUserPermission = 'w' | 'r' | 'c';
125
126
  export interface OnesEditorUser {
@@ -11,7 +11,9 @@
11
11
  "license": "ISC",
12
12
  "devDependencies": {
13
13
  "@types/mime-db": "^1.43.1",
14
- "@types/pako": "^2.0.0"
14
+ "@types/pako": "^2.0.0",
15
+ "@types/lodash-es": "4.17.8",
16
+ "@types/lodash.clonedeep": "^4.5.0"
15
17
  },
16
18
  "types": "src/index.d.ts"
17
19
  }
@@ -6,7 +6,9 @@
6
6
  "devDependencies": {
7
7
  "@types/lodash.camelcase": "^4.3.7",
8
8
  "@types/mermaid": "^9.1.0",
9
- "@types/plantuml-encoder": "^1.4.0"
9
+ "@types/plantuml-encoder": "^1.4.0",
10
+ "@types/lodash-es": "4.17.8",
11
+ "@types/lodash.clonedeep": "^4.5.0"
10
12
  },
11
13
  "types": "src/index.d.ts"
12
14
  }
@@ -5,7 +5,8 @@
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
7
  "devDependencies": {
8
- "@types/lodash.debounce": "^4.0.7"
8
+ "@types/lodash.debounce": "^4.0.7",
9
+ "@types/lodash.clonedeep": "^4.5.0"
9
10
  },
10
11
  "types": "src/index.d.ts"
11
12
  }
@@ -3,5 +3,9 @@
3
3
  "version": "1.0.0",
4
4
  "main": "src/index.ts",
5
5
  "type": "module",
6
+ "devDependencies": {
7
+ "@types/lodash-es": "4.17.8",
8
+ "@types/lodash.clonedeep": "^4.5.0"
9
+ },
6
10
  "types": "src/index.d.ts"
7
11
  }
@@ -20,7 +20,7 @@ export declare class Media extends TypedEmitter<MediaEvent> {
20
20
  private renderMediaElement;
21
21
  handleUploadFile: (file: File) => Promise<void>;
22
22
  renderEmpty(blockData: MediaBlockData): void;
23
- getResourceUrl(url: string): string;
23
+ getResourceUrl(blockData: MediaBlockData, content?: BlockContentElement): string;
24
24
  setFullScreen(): void;
25
25
  removeFullScreen(): void;
26
26
  updateBlockAlign(blockData: MediaBlockData, content: BlockContentElement): void;
@@ -14,6 +14,10 @@ export declare class AuthConnection {
14
14
  events: EventEmitter;
15
15
  token: string | null;
16
16
  resourceToken: string | null;
17
+ pingOptions: {
18
+ interval: number;
19
+ timeout: number;
20
+ };
17
21
  constructor(url: string, reauthFunc?: ReauthFunc | undefined);
18
22
  getBaseURL(): string;
19
23
  getBase64BaseURL(): string;
@@ -52,6 +52,7 @@ export default class ShareDBClient {
52
52
  revertVersion(ver: number): Promise<void>;
53
53
  createVersion(tag: string, publish: boolean): Promise<any>;
54
54
  recognizeLink(url: string): Promise<LinkDetails>;
55
+ private getResourceId;
55
56
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
56
57
  reAuth(): void;
57
58
  }
@@ -3,6 +3,7 @@ declare module 'sharedb/lib/client' {
3
3
  interface Connection {
4
4
  id: string | null;
5
5
  auth: object;
6
+ _ping: number;
6
7
  lastReceiveTime?: number;
7
8
  _initializeHandshake(): void;
8
9
  send(message: object): void;