@yorkie-js/react 0.7.12-rc → 0.7.13

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.
@@ -99,7 +99,7 @@ declare type DocumentContextType<R, P extends Indexable = Indexable> = {
99
99
  * This component must be under a `YorkieProvider` component to initialize the
100
100
  * Yorkie client properly.
101
101
  */
102
- export declare const DocumentProvider: <R, P extends Indexable = Indexable>({ docKey, initialRoot, initialPresence, enableDevtools, syncMode, documentPollInterval, disableGC, children, }: {
102
+ export declare const DocumentProvider: <R, P extends Indexable = Indexable>({ docKey, initialRoot, initialPresence, enableDevtools, syncMode, documentPollInterval, disableGC, disablePresence, children, }: {
103
103
  docKey: string;
104
104
  initialRoot?: R;
105
105
  initialPresence?: P;
@@ -121,6 +121,15 @@ export declare const DocumentProvider: <R, P extends Indexable = Indexable>({ do
121
121
  * GC behavior on this client.
122
122
  */
123
123
  disableGC?: boolean;
124
+ /**
125
+ * `disablePresence` declares that this document does not use presence.
126
+ * Forwarded to both `new Document(...)` and `client.attach(...)`. The
127
+ * server fixates the value on first attach — subsequent attaches
128
+ * inherit the server's value regardless of what this prop carries.
129
+ * Useful for counter-only documents where the per-client presence
130
+ * map would otherwise leak memory.
131
+ */
132
+ disablePresence?: boolean;
124
133
  children?: default_2.ReactNode;
125
134
  }) => JSX.Element;
126
135
 
@@ -290,6 +299,16 @@ export declare const usePresences: <P extends Indexable = Indexable>() => Array<
290
299
  presence: P;
291
300
  }>;
292
301
 
302
+ /**
303
+ * `useRemoveDocument` returns a function that removes the current document
304
+ * from the server via `client.remove` (as opposed to `client.detach`).
305
+ * After it resolves the document is gone for every client and the key can
306
+ * be reattached as a fresh document. The returned function rejects until
307
+ * the document is attached, and the removal error is propagated to the
308
+ * caller. This hook must be used within a `DocumentProvider`.
309
+ */
310
+ export declare const useRemoveDocument: <R, P extends Indexable = Indexable>() => () => Promise<void>;
311
+
293
312
  /**
294
313
  * `useRevisions` is a custom hook that provides revision management methods
295
314
  * for the current document. It wraps the client's revision API methods
@@ -342,6 +361,13 @@ export declare function useYorkieDoc<R, P extends Indexable = Indexable>(apiKey:
342
361
  * GC behavior on this client.
343
362
  */
344
363
  disableGC?: boolean;
364
+ /**
365
+ * `disablePresence` declares that this document does not use presence.
366
+ * Forwarded to both `new Document(...)` and `client.attach(...)`. The
367
+ * server fixates the value on first attach — subsequent attaches
368
+ * inherit the server's value regardless of what this option carries.
369
+ */
370
+ disablePresence?: boolean;
345
371
  }): {
346
372
  root: R;
347
373
  presences: Array<{