@yorkie-js/react 0.6.47 → 0.6.49

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.
@@ -7,6 +7,7 @@ import { JSONObject } from '@yorkie-js/sdk';
7
7
  import { JSX } from 'react/jsx-dev-runtime';
8
8
  import { Presence } from '@yorkie-js/sdk';
9
9
  import { PropsWithChildren } from 'react';
10
+ import { RevisionSummary } from '@yorkie-js/sdk';
10
11
  import { StreamConnectionStatus } from '@yorkie-js/sdk';
11
12
 
12
13
  /**
@@ -79,6 +80,8 @@ export { JSONArray }
79
80
 
80
81
  export { JSONObject }
81
82
 
83
+ export { RevisionSummary }
84
+
82
85
  /**
83
86
  * Performs a shallow equality check between two values.
84
87
  */
@@ -145,6 +148,23 @@ export declare const usePresences: <P extends Indexable = Indexable>() => Array<
145
148
  presence: P;
146
149
  }>;
147
150
 
151
+ /**
152
+ * `useRevisions` is a custom hook that provides revision management methods
153
+ * for the current document. It wraps the client's revision API methods
154
+ * and automatically binds the current client and document.
155
+ * This hook must be used within a `DocumentProvider`.
156
+ */
157
+ export declare const useRevisions: <R, P extends Indexable = Indexable>() => {
158
+ createRevision: (label: string, description?: string) => Promise<RevisionSummary>;
159
+ listRevisions: (options?: {
160
+ pageSize?: number;
161
+ offset?: number;
162
+ isForward?: boolean;
163
+ }) => Promise<Array<RevisionSummary>>;
164
+ getRevision: (revisionID: string) => Promise<RevisionSummary>;
165
+ restoreRevision: (revisionID: string) => Promise<void>;
166
+ };
167
+
148
168
  /**
149
169
  * `useRoot` is a custom hook that returns the root object of the document.
150
170
  * This hook must be used within a `DocumentProvider`.