@dxos/react-client 2.21.3-dev.33d9f475 → 2.22.1-dev.1384081e

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.21.3-dev.33d9f475",
3
+ "version": "2.22.1-dev.1384081e",
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.21.3-dev.33d9f475",
12
- "@dxos/bot-factory-client": "2.21.3-dev.33d9f475",
13
- "@dxos/client": "2.21.3-dev.33d9f475",
14
- "@dxos/config": "2.21.3-dev.33d9f475",
15
- "@dxos/credentials": "2.21.3-dev.33d9f475",
16
- "@dxos/crypto": "2.21.3-dev.33d9f475",
17
- "@dxos/debug": "2.21.3-dev.33d9f475",
18
- "@dxos/echo-db": "2.21.3-dev.33d9f475",
19
- "@dxos/util": "2.21.3-dev.33d9f475",
11
+ "@dxos/async": "2.22.1-dev.1384081e",
12
+ "@dxos/bot-factory-client": "2.22.1-dev.1384081e",
13
+ "@dxos/client": "2.22.1-dev.1384081e",
14
+ "@dxos/config": "2.22.1-dev.1384081e",
15
+ "@dxos/credentials": "2.22.1-dev.1384081e",
16
+ "@dxos/crypto": "2.22.1-dev.1384081e",
17
+ "@dxos/debug": "2.22.1-dev.1384081e",
18
+ "@dxos/echo-db": "2.22.1-dev.1384081e",
19
+ "@dxos/util": "2.22.1-dev.1384081e",
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.21.3-dev.33d9f475",
26
+ "@dxos/esbuild-plugins": "2.22.1-dev.1384081e",
27
27
  "@dxos/esbuild-server": "~1.7.4",
28
- "@dxos/toolchain-node-library": "2.21.2",
28
+ "@dxos/toolchain-node-library": "2.22.0",
29
29
  "@mui/material": "^5.0.1",
30
30
  "@testing-library/react": "^11.0.4",
31
31
  "@testing-library/react-hooks": "5.1.2",
@@ -2,10 +2,10 @@ Invoking: toolchain build:test
2
2
 
3
3
 
4
4
  typescript
5
- OK in 8026 ms
5
+ OK in 9559 ms
6
6
 
7
7
  eslint
8
- OK in 7807 ms
8
+ OK in 10217 ms
9
9
 
10
10
  mocha
11
11
  This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills
@@ -26,8 +26,8 @@ This browser doesn't support cancelAnimationFrame. Make sure that you load a pol
26
26
  ✓ should return custom client config when used properly in a context
27
27
 
28
28
 
29
- 7 passing (305ms)
29
+ 7 passing (330ms)
30
30
 
31
- OK in 2518 ms
31
+ OK in 2781 ms
32
32
 
33
- CHECK COMPLETE in 18387 ms
33
+ CHECK COMPLETE in 22578 ms
@@ -5,7 +5,7 @@
5
5
  import { useEffect, useState } from 'react';
6
6
 
7
7
  import { PartyProxy } from '@dxos/client';
8
- import { PublicKey, PublicKeyLike } from '@dxos/crypto';
8
+ import { PublicKeyLike } from '@dxos/crypto';
9
9
 
10
10
  import { useClient } from '../client';
11
11
 
@@ -14,9 +14,8 @@ import { useClient } from '../client';
14
14
  * Requires ClientContext to be set via ClientProvider.
15
15
  */
16
16
  export const useParty = (partyKey?: PublicKeyLike): PartyProxy | undefined => {
17
- const client = useClient();
18
- // TODO(wittjosiah): Not responsive to party updates?
19
- return partyKey ? client.echo.getParty(PublicKey.from(partyKey)) : undefined;
17
+ const parties = useParties();
18
+ return parties.find(party => partyKey && party.key.equals(partyKey));
20
19
  };
21
20
 
22
21
  /**