@dxos/react-client 2.19.10-dev.9987f7cd → 2.19.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-client",
3
- "version": "2.19.10-dev.9987f7cd",
3
+ "version": "2.19.10",
4
4
  "description": "React client API",
5
5
  "keywords": [],
6
6
  "license": "AGPL-3.0",
@@ -8,24 +8,24 @@
8
8
  "main": "dist/src/index.js",
9
9
  "types": "dist/src/index.d.ts",
10
10
  "dependencies": {
11
- "@dxos/async": "2.19.10-dev.9987f7cd",
12
- "@dxos/bot-factory-client": "2.19.10-dev.9987f7cd",
13
- "@dxos/client": "2.19.10-dev.9987f7cd",
14
- "@dxos/config": "2.19.10-dev.9987f7cd",
15
- "@dxos/credentials": "2.19.10-dev.9987f7cd",
16
- "@dxos/crypto": "2.19.10-dev.9987f7cd",
17
- "@dxos/debug": "2.19.10-dev.9987f7cd",
18
- "@dxos/echo-db": "2.19.10-dev.9987f7cd",
19
- "@dxos/util": "2.19.10-dev.9987f7cd",
11
+ "@dxos/async": "2.19.10",
12
+ "@dxos/bot-factory-client": "2.19.10",
13
+ "@dxos/client": "2.19.10",
14
+ "@dxos/config": "2.19.10",
15
+ "@dxos/credentials": "2.19.10",
16
+ "@dxos/crypto": "2.19.10",
17
+ "@dxos/debug": "2.19.10",
18
+ "@dxos/echo-db": "2.19.10",
19
+ "@dxos/util": "2.19.10",
20
20
  "assert": "^2.0.0",
21
21
  "debug": "^4.3.3",
22
22
  "react-display-name": "^0.2.5",
23
23
  "use-subscription": "^1.4.1"
24
24
  },
25
25
  "devDependencies": {
26
- "@dxos/esbuild-plugins": "2.19.10-dev.9987f7cd",
26
+ "@dxos/esbuild-plugins": "2.19.10",
27
27
  "@dxos/esbuild-server": "~1.7.2",
28
- "@dxos/toolchain-node-library": "2.19.9",
28
+ "@dxos/toolchain-node-library": "2.19.10",
29
29
  "@mui/material": "^5.0.1",
30
30
  "@testing-library/react": "^11.0.4",
31
31
  "@testing-library/react-hooks": "5.1.2",
@@ -1,34 +0,0 @@
1
- Invoking: toolchain build:test
2
-
3
- ENOENT: no such file or directory, stat '/home/github/_work/protocols/protocols/packages/sdk/react-client/src/proto/gen'
4
-
5
- typescript
6
- OK in 10823 ms
7
-
8
- eslint
9
- OK in 13406 ms
10
-
11
- mocha
12
- This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
13
- This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
14
-
15
-
16
- ClientProvider
17
- ✓ Renders with children (41ms)
18
- ✓ Provides the client
19
-
20
- Client hook
21
- ✓ should throw when used outside a context
22
- ✓ should return client when used properly in a context
23
-
24
- Config hook
25
- ✓ should throw when used outside a context
26
- ✓ should return default client config when no config is passed in a context
27
- ✓ should return custom client config when used properly in a context
28
-
29
-
30
- 7 passing (627ms)
31
-
32
- OK in 4006 ms
33
-
34
- CHECK COMPLETE in 28246 ms
@@ -10,7 +10,7 @@ import { ClientContext } from './context';
10
10
 
11
11
  /**
12
12
  * Hook returning config object used to initialize the DXOS client instance.
13
- * Requires ClientConext to be set via ClientProvider.
13
+ * Requires ClientContext to be set via ClientProvider.
14
14
  */
15
15
  export const useConfig = () => {
16
16
  const { client } = useContext(ClientContext) ?? raise(new Error('Missing ClientContext.'));
@@ -8,7 +8,7 @@ import { useClient } from './useClient';
8
8
 
9
9
  /**
10
10
  * Hook returning DXOS user profile object.
11
- * Requires ClientConext to be set via ClientProvider.
11
+ * Requires ClientContext to be set via ClientProvider.
12
12
  */
13
13
  export const useProfile = () => {
14
14
  const client = useClient();
@@ -11,7 +11,7 @@ import { useClient } from '../client';
11
11
  /**
12
12
  * Returns all known Contacts across all Parties.
13
13
  * Contacts are known members of a common Party.
14
- * Requires ClientConext to be set via ClientProvider.
14
+ * Requires ClientContext to be set via ClientProvider.
15
15
  */
16
16
  export const useContacts = () => {
17
17
  const client = useClient();
@@ -11,7 +11,7 @@ import { useClient } from '../client';
11
11
 
12
12
  /**
13
13
  * Get a specific Party.
14
- * Requires ClientConext to be set via ClientProvider.
14
+ * Requires ClientContext to be set via ClientProvider.
15
15
  */
16
16
  export const useParty = (partyKey?: PublicKeyLike): PartyProxy | undefined => {
17
17
  const client = useClient();
@@ -21,7 +21,7 @@ export const useParty = (partyKey?: PublicKeyLike): PartyProxy | undefined => {
21
21
 
22
22
  /**
23
23
  * Get all Parties available to current user.
24
- * Requires ClientConext to be set via ClientProvider.
24
+ * Requires ClientContext to be set via ClientProvider.
25
25
  */
26
26
  export const useParties = () => {
27
27
  const client = useClient();
@@ -10,7 +10,7 @@ import { useClient } from '../client';
10
10
 
11
11
  /**
12
12
  * Get all Parties available to current user.
13
- * Requires ClientConext to be set via ClientProvider.
13
+ * Requires ClientContext to be set via ClientProvider.
14
14
  */
15
15
  export const useRemoteParties = () => {
16
16
  const client = useClient();
@@ -1,4 +0,0 @@
1
- import { InvitationRequest } from '@dxos/client';
2
- import { PublicKey } from '@dxos/crypto';
3
- export declare const usePartyInvitations: (partyKey?: PublicKey | undefined) => InvitationRequest[];
4
- //# sourceMappingURL=usePartyInvitations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePartyInvitations.d.ts","sourceRoot":"","sources":["../../../../src/hooks/invitations/usePartyInvitations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,eAAO,MAAM,mBAAmB,2DAkB/B,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- //
3
- // Copyright 2022 DXOS.org
4
- //
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.usePartyInvitations = void 0;
7
- const react_1 = require("react");
8
- const echo_queries_1 = require("../echo-queries");
9
- const usePartyInvitations = (partyKey) => {
10
- var _a;
11
- const party = (0, echo_queries_1.useParty)(partyKey);
12
- const [invitations, setInvitations] = (0, react_1.useState)((_a = party === null || party === void 0 ? void 0 : party.activeInvitations) !== null && _a !== void 0 ? _a : []);
13
- (0, react_1.useEffect)(() => {
14
- if (!party) {
15
- return;
16
- }
17
- return party.invitationsUpdate.on(() => {
18
- setInvitations([...party.activeInvitations]);
19
- });
20
- }, [party]);
21
- (0, react_1.useEffect)(() => {
22
- setInvitations([]);
23
- }, [party === null || party === void 0 ? void 0 : party.key.toHex()]);
24
- return invitations;
25
- };
26
- exports.usePartyInvitations = usePartyInvitations;
27
- //# sourceMappingURL=usePartyInvitations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePartyInvitations.js","sourceRoot":"","sources":["../../../../src/hooks/invitations/usePartyInvitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,iCAA4C;AAK5C,kDAA2C;AAEpC,MAAM,mBAAmB,GAAG,CAAC,QAAoB,EAAE,EAAE;;IAC1D,MAAM,KAAK,GAAG,IAAA,uBAAQ,EAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAsB,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,mCAAI,EAAE,CAAC,CAAC;IAEpG,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,EAAE;YACV,OAAO;SACR;QACD,OAAO,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE;YACrC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,cAAc,CAAC,EAAE,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAEzB,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAlBW,QAAA,mBAAmB,uBAkB9B"}