@hocuspocus/extension-database 2.13.0 → 2.13.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.
@@ -89,7 +89,7 @@ export declare class HocuspocusProvider extends EventEmitter {
89
89
  isConnected: boolean;
90
90
  constructor(configuration: HocuspocusProviderConfiguration);
91
91
  boundBroadcastChannelSubscriber: (data: ArrayBuffer) => void;
92
- boundPageUnload: () => void;
92
+ boundPageHide: () => void;
93
93
  boundOnOpen: (event: Event) => Promise<void>;
94
94
  boundOnClose: (event: CloseEvent) => void;
95
95
  boundOnStatus: ({ status }: onStatusParameters) => void;
@@ -103,10 +103,11 @@ export declare class HocuspocusProvider extends EventEmitter {
103
103
  get document(): Y.Doc;
104
104
  get awareness(): Awareness | null;
105
105
  get hasUnsyncedChanges(): boolean;
106
+ private resetUnsyncedChanges;
106
107
  incrementUnsyncedChanges(): void;
107
108
  decrementUnsyncedChanges(): void;
108
109
  forceSync(): void;
109
- pageUnload(): void;
110
+ pageHide(): void;
110
111
  registerEventListeners(): void;
111
112
  sendStateless(payload: string): void;
112
113
  documentUpdateHandler(update: Uint8Array, origin: any): void;
@@ -89,7 +89,7 @@ export declare class Hocuspocus {
89
89
  */
90
90
  createDocument(documentName: string, request: Partial<Pick<IncomingMessage, 'headers' | 'url'>>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise<Document>;
91
91
  loadDocument(documentName: string, request: Partial<Pick<IncomingMessage, 'headers' | 'url'>>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise<Document>;
92
- storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): Promise<void>;
92
+ storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload, immediately?: boolean): any;
93
93
  /**
94
94
  * Run the given hook on all configured extensions.
95
95
  * Runs the given callback after each hook.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hocuspocus/extension-database",
3
3
  "description": "a generic Hocuspocus persistence driver for the database",
4
- "version": "2.13.0",
4
+ "version": "2.13.2",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
7
7
  "hocuspocus",
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@hocuspocus/server": "^2.13.0"
30
+ "@hocuspocus/server": "^2.13.2"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "yjs": "^13.6.8"