@yorkie-js/react 0.7.11 → 0.7.12-rc
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,3 +1,4 @@
|
|
|
1
|
+
import { Client } from '@yorkie-js/sdk';
|
|
1
2
|
import { ClientOptions } from '@yorkie-js/sdk';
|
|
2
3
|
import { Counter } from '@yorkie-js/sdk';
|
|
3
4
|
import { default as default_2 } from 'react';
|
|
@@ -314,6 +315,16 @@ export declare const useRoot: <R>() => {
|
|
|
314
315
|
root: R;
|
|
315
316
|
};
|
|
316
317
|
|
|
318
|
+
/**
|
|
319
|
+
* `useYorkie` is a custom hook that returns the Yorkie client and its loading state.
|
|
320
|
+
* @returns
|
|
321
|
+
*/
|
|
322
|
+
export declare const useYorkie: () => {
|
|
323
|
+
client: Client | undefined;
|
|
324
|
+
loading: boolean;
|
|
325
|
+
error: Error | undefined;
|
|
326
|
+
};
|
|
327
|
+
|
|
317
328
|
/**
|
|
318
329
|
* `useYorkieDoc` is a custom hook that initializes a Yorkie Client and a
|
|
319
330
|
* document in a single hook.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useMemo, useState, useEffect,
|
|
2
|
+
import { createContext, useMemo, useContext, useState, useEffect, useRef, useSyncExternalStore, useCallback } from "react";
|
|
3
3
|
var Code$1;
|
|
4
4
|
(function(Code2) {
|
|
5
5
|
Code2[Code2["Canceled"] = 1] = "Canceled";
|
|
@@ -21450,7 +21450,7 @@ function createAuthInterceptor(apiKey, token) {
|
|
|
21450
21450
|
};
|
|
21451
21451
|
}
|
|
21452
21452
|
const name$1 = "@yorkie-js/sdk";
|
|
21453
|
-
const version$1 = "0.7.
|
|
21453
|
+
const version$1 = "0.7.12-rc";
|
|
21454
21454
|
const pkg$1 = {
|
|
21455
21455
|
name: name$1,
|
|
21456
21456
|
version: version$1
|
|
@@ -23534,7 +23534,7 @@ if (typeof globalThis !== "undefined") {
|
|
|
23534
23534
|
};
|
|
23535
23535
|
}
|
|
23536
23536
|
const name = "@yorkie-js/react";
|
|
23537
|
-
const version = "0.7.
|
|
23537
|
+
const version = "0.7.12-rc";
|
|
23538
23538
|
const pkg = {
|
|
23539
23539
|
name,
|
|
23540
23540
|
version
|
|
@@ -24262,6 +24262,7 @@ export {
|
|
|
24262
24262
|
usePresences,
|
|
24263
24263
|
useRevisions,
|
|
24264
24264
|
useRoot,
|
|
24265
|
+
useYorkie,
|
|
24265
24266
|
useYorkieDoc
|
|
24266
24267
|
};
|
|
24267
24268
|
//# sourceMappingURL=yorkie-js-react.es.js.map
|
package/dist/yorkie-js-react.js
CHANGED
|
@@ -21452,7 +21452,7 @@
|
|
|
21452
21452
|
};
|
|
21453
21453
|
}
|
|
21454
21454
|
const name$1 = "@yorkie-js/sdk";
|
|
21455
|
-
const version$1 = "0.7.
|
|
21455
|
+
const version$1 = "0.7.12-rc";
|
|
21456
21456
|
const pkg$1 = {
|
|
21457
21457
|
name: name$1,
|
|
21458
21458
|
version: version$1
|
|
@@ -23536,7 +23536,7 @@
|
|
|
23536
23536
|
};
|
|
23537
23537
|
}
|
|
23538
23538
|
const name = "@yorkie-js/react";
|
|
23539
|
-
const version = "0.7.
|
|
23539
|
+
const version = "0.7.12-rc";
|
|
23540
23540
|
const pkg = {
|
|
23541
23541
|
name,
|
|
23542
23542
|
version
|
|
@@ -24263,6 +24263,7 @@
|
|
|
24263
24263
|
exports2.usePresences = usePresences;
|
|
24264
24264
|
exports2.useRevisions = useRevisions;
|
|
24265
24265
|
exports2.useRoot = useRoot;
|
|
24266
|
+
exports2.useYorkie = useYorkie;
|
|
24266
24267
|
exports2.useYorkieDoc = useYorkieDoc;
|
|
24267
24268
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
24268
24269
|
}));
|