@hocuspocus/provider 2.10.0 → 2.11.0

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.
@@ -45,7 +45,7 @@ export declare class TiptapCollabProvider extends HocuspocusProvider {
45
45
  private getThreadIndex;
46
46
  getThread<Data, CommentData>(id: string): TCollabThread<Data, CommentData> | null;
47
47
  private getYThread;
48
- createThread(data: Omit<TCollabThread, '_id' | 'createdAt' | 'updatedAt' | 'comments'>): TCollabThread | null;
48
+ createThread(data: Omit<TCollabThread, 'id' | 'createdAt' | 'updatedAt' | 'comments'>): TCollabThread | null;
49
49
  updateThread(id: TCollabThread['id'], data: Partial<Pick<TCollabThread, 'data' | 'resolvedAt'>>): TCollabThread | null;
50
50
  deleteThread(id: TCollabThread['id']): void;
51
51
  getThreadComments(threadId: TCollabThread['id']): TCollabComment[] | null;
@@ -87,7 +87,7 @@ export declare class Document extends Doc {
87
87
  /**
88
88
  * Broadcast stateless message to all connections
89
89
  */
90
- broadcastStateless(payload: string): void;
90
+ broadcastStateless(payload: string, filter?: (conn: Connection) => boolean): void;
91
91
  destroy(): void;
92
92
  }
93
93
  export default Document;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hocuspocus/provider",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "hocuspocus provider",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@hocuspocus/common": "^2.10.0",
32
+ "@hocuspocus/common": "^2.11.0",
33
33
  "@lifeomic/attempt": "^3.0.2",
34
34
  "lib0": "^0.2.87",
35
35
  "ws": "^8.14.2"
@@ -141,7 +141,7 @@ export class TiptapCollabProvider extends HocuspocusProvider {
141
141
  return this.getYThreads().get(index)
142
142
  }
143
143
 
144
- createThread(data: Omit<TCollabThread, '_id' | 'createdAt' | 'updatedAt' | 'comments'>) {
144
+ createThread(data: Omit<TCollabThread, 'id' | 'createdAt' | 'updatedAt' | 'comments'>) {
145
145
  const thread = new Y.Map()
146
146
  thread.set('id', uuidv4())
147
147
  thread.set('createdAt', (new Date()).toISOString())