@dxos/react-client 2.31.8-dev.f21022f7 → 2.32.1-dev.4b8d839e
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/.rush/temp/package-deps_build.json +4 -4
- package/.rush/temp/package-deps_build:test.json +4 -4
- package/.rush/temp/package-deps_prerelease.json +4 -4
- package/.rush/temp/shrinkwrap-deps.json +23 -49
- package/dist/src/containers/ClientProvider.d.ts.map +1 -1
- package/dist/src/containers/ClientProvider.js +0 -7
- package/dist/src/containers/ClientProvider.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -16
- package/src/containers/ClientProvider.tsx +1 -9
- package/tsconfig.json +10 -10
- package/out/book/esbuild-server-book.js +0 -191091
- package/out/book/index.html +0 -14
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.1-dev.4b8d839e",
|
|
4
4
|
"description": "React client API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "DXOS.org",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"types": "dist/src/index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dxos/async": "2.
|
|
11
|
-
"@dxos/bot-factory-client": "2.
|
|
12
|
-
"@dxos/client": "2.
|
|
13
|
-
"@dxos/config": "2.
|
|
14
|
-
"@dxos/credentials": "2.
|
|
15
|
-
"@dxos/crypto": "2.
|
|
16
|
-
"@dxos/debug": "2.
|
|
17
|
-
"@dxos/echo-db": "2.
|
|
18
|
-
"@dxos/network-manager": "2.
|
|
19
|
-
"@dxos/react-async": "2.
|
|
20
|
-
"@dxos/util": "2.
|
|
10
|
+
"@dxos/async": "2.32.1-dev.4b8d839e",
|
|
11
|
+
"@dxos/bot-factory-client": "2.32.1-dev.4b8d839e",
|
|
12
|
+
"@dxos/client": "2.32.1-dev.4b8d839e",
|
|
13
|
+
"@dxos/config": "2.32.1-dev.4b8d839e",
|
|
14
|
+
"@dxos/credentials": "2.32.1-dev.4b8d839e",
|
|
15
|
+
"@dxos/crypto": "2.32.1-dev.4b8d839e",
|
|
16
|
+
"@dxos/debug": "2.32.1-dev.4b8d839e",
|
|
17
|
+
"@dxos/echo-db": "2.32.1-dev.4b8d839e",
|
|
18
|
+
"@dxos/network-manager": "2.32.1-dev.4b8d839e",
|
|
19
|
+
"@dxos/react-async": "2.32.1-dev.4b8d839e",
|
|
20
|
+
"@dxos/util": "2.32.1-dev.4b8d839e",
|
|
21
21
|
"assert": "^2.0.0",
|
|
22
22
|
"debug": "^4.3.3",
|
|
23
23
|
"use-subscription": "^1.4.1"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@dxos/esbuild-plugins": "~2.28.7",
|
|
27
27
|
"@dxos/eslint-plugin": "~1.0.27",
|
|
28
|
-
"@dxos/protocols-toolchain": "2.
|
|
28
|
+
"@dxos/protocols-toolchain": "2.32.0",
|
|
29
29
|
"@mui/material": "^5.4.2",
|
|
30
30
|
"@testing-library/react": "^11.0.4",
|
|
31
31
|
"@testing-library/react-hooks": "5.1.2",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"@types/use-subscription": "^1.0.0",
|
|
40
40
|
"eslint": "^7.12.1",
|
|
41
41
|
"expect": "~27.0.2",
|
|
42
|
-
"fork-ts-checker-webpack-plugin": "~6.2.5",
|
|
43
42
|
"level-js": "^5.0.2",
|
|
44
43
|
"raf": "^3.4.1",
|
|
45
44
|
"react": "^17.0.2",
|
|
@@ -67,6 +66,5 @@
|
|
|
67
66
|
"build:test": "toolchain build:test",
|
|
68
67
|
"lint": "toolchain lint",
|
|
69
68
|
"test": "toolchain test"
|
|
70
|
-
}
|
|
71
|
-
"readme": "# @dxos/react-client\n\nA react implementation of the DXOS Client APIs.\n\n## Install\n\n```bash\ngit clone git@github.com:dxos/protocols.git\ncd protocols\nrush update\nrush build\n\ncd packages/sdk/demos\nrushx book\n```\n\n## Usage\n\nThe snippet below illustrates a self-contained DXOS application that uses providers to create the client and instantiate a user profile.\n\n```javascript\nimport { useClient, ClientProvider, ProfileInitializer } from '@dxos/react-client';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nconst App = () => {\n const client = useClient();\n\n return (\n <pre>{JSON.stringify(client.info())}</pre>\n );\n};\n\nconst Root = () => (\n <ClientProvider>\n <ProfileInitializer>\n <App />\n </ProfileInitializer>\n </ClientProvider>\n);\n\nReactDOM.render(<Root/>, document.getElementById('root'));\n```\n\n## Storybooks\n\nThe [HALO Invitation Story](./stories/halo-invitations.stories.tsx) demonstrates multiple clients (devices) joining the same HALO.\n\nhttps://user-images.githubusercontent.com/3523355/137532718-a21f1f27-9854-4c0b-831a-e9ff92feac49.mov\n\nThe [Party Invitation Story](./stories/party-invitations.stories.tsx) demonstrates multiple clients creating and sharing parties.\n\nhttps://user-images.githubusercontent.com/3523355/137532717-e77395dc-96f9-4e4b-8f67-e6bd026a3abe.mov\n\n\n## Contributing\n\nPRs accepted.\n\n## License\n\nAGPL-3.0 © DXOS\n"
|
|
69
|
+
}
|
|
72
70
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import debug from 'debug';
|
|
6
|
-
import React, { MutableRefObject, ReactNode,
|
|
6
|
+
import React, { MutableRefObject, ReactNode, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Client, ClientOptions } from '@dxos/client';
|
|
9
9
|
import { ConfigProvider } from '@dxos/config';
|
|
@@ -90,14 +90,6 @@ export const ClientProvider = ({
|
|
|
90
90
|
}
|
|
91
91
|
}, []);
|
|
92
92
|
|
|
93
|
-
// Console debug access.
|
|
94
|
-
// TODO(burdon): Debug only.
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
if (client) {
|
|
97
|
-
(window as any).__DXOS__ = client.getDevtoolsContext();
|
|
98
|
-
}
|
|
99
|
-
}, [client]);
|
|
100
|
-
|
|
101
93
|
if (!client) {
|
|
102
94
|
return null;
|
|
103
95
|
}
|
package/tsconfig.json
CHANGED
|
@@ -15,37 +15,37 @@
|
|
|
15
15
|
],
|
|
16
16
|
"references": [
|
|
17
17
|
{
|
|
18
|
-
"path": "../../
|
|
18
|
+
"path": "../../common/async"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"path": "../../
|
|
21
|
+
"path": "../../bot/bot-factory-client"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"path": "
|
|
24
|
+
"path": "../client"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"path": "
|
|
27
|
+
"path": "../config"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"path": "../../
|
|
30
|
+
"path": "../../halo/credentials"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
"path": "../../common/
|
|
33
|
+
"path": "../../common/crypto"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
"path": "../../
|
|
36
|
+
"path": "../../common/debug"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"path": "../../
|
|
39
|
+
"path": "../../echo/echo-db"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"path": "../../mesh/network-manager"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
"path": "
|
|
45
|
+
"path": "../../common/react-async"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
"path": "
|
|
48
|
+
"path": "../../common/util"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}
|