@fileverse-dev/ddoc 2.0.3-sync-patch-2 → 2.0.3-sync-patch-4

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,21 +1,6 @@
1
1
  import { Extension } from '@tiptap/core';
2
+ import { CollaborationCursorOptions, CollaborationCursorStorage } from '../types';
2
3
 
3
- type CollaborationCursorStorage = {
4
- users: {
5
- clientId: number;
6
- [key: string]: any;
7
- }[];
8
- };
9
- export interface CollaborationCursorOptions {
10
- provider: any;
11
- user: Record<string, any>;
12
- render(user: Record<string, any>): HTMLElement;
13
- selectionRender(user: Record<string, any>): any;
14
- onUpdate: (users: {
15
- clientId: number;
16
- [key: string]: any;
17
- }[]) => null;
18
- }
19
4
  declare module '@tiptap/core' {
20
5
  interface Commands<ReturnType> {
21
6
  collaborationCursor: {
@@ -25,4 +10,3 @@ declare module '@tiptap/core' {
25
10
  }
26
11
  }
27
12
  export declare const SyncCursor: Extension<CollaborationCursorOptions, CollaborationCursorStorage>;
28
- export {};
@@ -46,3 +46,19 @@ export interface IUser {
46
46
  color: string;
47
47
  isEns: boolean;
48
48
  }
49
+ export type CollaborationCursorStorage = {
50
+ users: {
51
+ clientId: number;
52
+ [key: string]: any;
53
+ }[];
54
+ };
55
+ export interface CollaborationCursorOptions {
56
+ provider: any;
57
+ user: Record<string, any>;
58
+ render(user: Record<string, any>): HTMLElement;
59
+ selectionRender(user: Record<string, any>): any;
60
+ onUpdate: (users: {
61
+ clientId: number;
62
+ [key: string]: any;
63
+ }[]) => null;
64
+ }
@@ -6,4 +6,5 @@ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableColl
6
6
  ref: import('react').RefObject<HTMLDivElement>;
7
7
  connect: (username: string | null | undefined, isEns?: boolean) => void;
8
8
  ydoc: import('yjs').Doc;
9
+ isCollaborationReady: boolean;
9
10
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.0.3-sync-patch-2",
5
+ "version": "2.0.3-sync-patch-4",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@_ueberdosis/prosemirror-tables": "^1.1.3",
30
30
  "@aarkue/tiptap-math-extension": "^1.3.3",
31
- "@fileverse-dev/sync": "^0.0.7",
31
+ "@fileverse-dev/sync": "^0.0.9",
32
32
  "@fileverse/ui": "^4.1.1-patch-8",
33
33
  "@radix-ui/react-focus-scope": "^1.1.0",
34
34
  "@radix-ui/react-popover": "^1.0.7",