@dxos/plugin-client 0.8.3 → 0.8.4-main.1da679c
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/dist/lib/browser/{app-graph-builder-CBRN2DMK.mjs → app-graph-builder-MCGM4PFO.mjs} +20 -20
- package/dist/lib/browser/app-graph-builder-MCGM4PFO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PSSNS4C6.mjs → chunk-3F2Q2RKC.mjs} +3 -3
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UCVFWBKT.mjs → chunk-CAF2COXW.mjs} +3 -3
- package/dist/lib/browser/{chunk-5MC5HCIM.mjs → chunk-FOCQEA72.mjs} +34 -41
- package/dist/lib/browser/chunk-FOCQEA72.mjs.map +7 -0
- package/dist/lib/browser/{chunk-MCEXD5XH.mjs → chunk-GS3LDHYD.mjs} +2 -2
- package/dist/lib/browser/{chunk-IA3AVM4I.mjs → chunk-HLWIF3AW.mjs} +14 -15
- package/dist/lib/browser/chunk-HLWIF3AW.mjs.map +7 -0
- package/dist/lib/browser/{client-NMS3MSFP.mjs → client-H2RZI6UX.mjs} +15 -9
- package/dist/lib/browser/client-H2RZI6UX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +18 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-SLQZMO6I.mjs → intent-resolver-IE7KHWIY.mjs} +18 -18
- package/dist/lib/browser/intent-resolver-IE7KHWIY.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-QRQV6ZAM.mjs → migrations-CJY2LQHD.mjs} +6 -6
- package/dist/lib/{node-esm/migrations-AK43ZE6G.mjs.map → browser/migrations-CJY2LQHD.mjs.map} +2 -2
- package/dist/lib/browser/{react-context-IE2O2OYK.mjs → react-context-TSUCH5YS.mjs} +6 -6
- package/dist/lib/browser/{react-context-IE2O2OYK.mjs.map → react-context-TSUCH5YS.mjs.map} +2 -2
- package/dist/lib/browser/{react-surface-QFC2G27R.mjs → react-surface-WQD43JR7.mjs} +8 -8
- package/dist/lib/browser/{react-surface-QFC2G27R.mjs.map → react-surface-WQD43JR7.mjs.map} +3 -3
- package/dist/lib/browser/{schema-defs-DNRDVQQJ.mjs → schema-defs-TLXADNLY.mjs} +6 -6
- package/dist/lib/browser/schema-defs-TLXADNLY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -0
- package/dist/lib/node-esm/{app-graph-builder-OZEAAKNT.mjs → app-graph-builder-BJPS5RD7.mjs} +20 -20
- package/dist/lib/node-esm/app-graph-builder-BJPS5RD7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-37E3EI46.mjs → chunk-IOGTQFLM.mjs} +3 -3
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-STGGUFV2.mjs → chunk-JG6AFSFU.mjs} +14 -15
- package/dist/lib/node-esm/chunk-JG6AFSFU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WHKQMAO5.mjs → chunk-MUWDSQ65.mjs} +34 -41
- package/dist/lib/node-esm/chunk-MUWDSQ65.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-HM7VB4ZV.mjs → chunk-SZLX4BVJ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-FJYSQRBO.mjs → chunk-UMO3ETDV.mjs} +3 -3
- package/dist/lib/node-esm/{client-EBFQZRSF.mjs → client-AWF6PE6V.mjs} +15 -9
- package/dist/lib/node-esm/client-AWF6PE6V.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +18 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MV55C5ED.mjs → intent-resolver-ZJ4E3NNT.mjs} +18 -18
- package/dist/lib/node-esm/intent-resolver-ZJ4E3NNT.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-AK43ZE6G.mjs → migrations-X6RLWYR2.mjs} +6 -6
- package/dist/lib/{browser/migrations-QRQV6ZAM.mjs.map → node-esm/migrations-X6RLWYR2.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-context-6N7NMUJE.mjs → react-context-M6G62KT3.mjs} +6 -6
- package/dist/lib/node-esm/{react-context-6N7NMUJE.mjs.map → react-context-M6G62KT3.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-surface-JUYTGBEM.mjs → react-surface-TXSWRGX7.mjs} +8 -8
- package/dist/lib/node-esm/{react-surface-JUYTGBEM.mjs.map → react-surface-TXSWRGX7.mjs.map} +3 -3
- package/dist/lib/node-esm/{schema-defs-O2KQQXJH.mjs → schema-defs-4PGAJ4RQ.mjs} +6 -6
- package/dist/lib/node-esm/schema-defs-4PGAJ4RQ.mjs.map +7 -0
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +1 -1
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +1 -1
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +2 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +225 -4
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +1 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts +57 -4
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +59 -4
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +58 -4
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +59 -3
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +46 -46
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +30 -24
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -36
- package/src/ClientPlugin.ts +3 -3
- package/src/capabilities/app-graph-builder.ts +16 -15
- package/src/capabilities/capabilities.ts +4 -3
- package/src/capabilities/client.ts +6 -4
- package/src/capabilities/intent-resolver.ts +5 -4
- package/src/capabilities/migrations.ts +1 -1
- package/src/capabilities/react-context.tsx +2 -1
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/schema-defs.ts +3 -3
- package/src/components/DevicesContainer.stories.tsx +11 -10
- package/src/components/DevicesContainer.tsx +59 -68
- package/src/components/JoinDialog.tsx +1 -1
- package/src/components/ProfileContainer.stories.tsx +7 -6
- package/src/components/ProfileContainer.tsx +20 -23
- package/src/components/RecoveryCodeDialog.stories.tsx +9 -8
- package/src/components/RecoveryCredentialsContainer.stories.tsx +9 -8
- package/src/components/RecoveryCredentialsContainer.tsx +44 -47
- package/src/components/ResetDialog.stories.tsx +7 -6
- package/src/components/ResetDialog.tsx +1 -1
- package/src/translations.ts +6 -4
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +14 -15
- package/dist/lib/browser/app-graph-builder-CBRN2DMK.mjs.map +0 -7
- package/dist/lib/browser/chunk-5MC5HCIM.mjs.map +0 -7
- package/dist/lib/browser/chunk-IA3AVM4I.mjs.map +0 -7
- package/dist/lib/browser/chunk-PSSNS4C6.mjs.map +0 -7
- package/dist/lib/browser/client-NMS3MSFP.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SLQZMO6I.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-DNRDVQQJ.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node/app-graph-builder-BEEYM3A5.cjs +0 -134
- package/dist/lib/node/app-graph-builder-BEEYM3A5.cjs.map +0 -7
- package/dist/lib/node/chunk-BEJWU2NE.cjs +0 -718
- package/dist/lib/node/chunk-BEJWU2NE.cjs.map +0 -7
- package/dist/lib/node/chunk-BL6EBWOS.cjs +0 -131
- package/dist/lib/node/chunk-BL6EBWOS.cjs.map +0 -7
- package/dist/lib/node/chunk-CIYUKY3J.cjs +0 -37
- package/dist/lib/node/chunk-CIYUKY3J.cjs.map +0 -7
- package/dist/lib/node/chunk-DJKWB5L6.cjs +0 -35
- package/dist/lib/node/chunk-DJKWB5L6.cjs.map +0 -7
- package/dist/lib/node/chunk-DNKJCPU7.cjs +0 -38
- package/dist/lib/node/chunk-DNKJCPU7.cjs.map +0 -7
- package/dist/lib/node/client-Q3EQS4HA.cjs +0 -51
- package/dist/lib/node/client-Q3EQS4HA.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -175
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QURURONO.cjs +0 -312
- package/dist/lib/node/intent-resolver-QURURONO.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/migrations-6FEWMF7U.cjs +0 -39
- package/dist/lib/node/migrations-6FEWMF7U.cjs.map +0 -7
- package/dist/lib/node/react-context-JS7Y5ZOK.cjs +0 -48
- package/dist/lib/node/react-context-JS7Y5ZOK.cjs.map +0 -7
- package/dist/lib/node/react-surface-RGRHOPVK.cjs +0 -82
- package/dist/lib/node/react-surface-RGRHOPVK.cjs.map +0 -7
- package/dist/lib/node/schema-defs-TA52ARBO.cjs +0 -41
- package/dist/lib/node/schema-defs-TA52ARBO.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -32
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OZEAAKNT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-37E3EI46.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-STGGUFV2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WHKQMAO5.mjs.map +0 -7
- package/dist/lib/node-esm/client-EBFQZRSF.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-MV55C5ED.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-O2KQQXJH.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{chunk-UCVFWBKT.mjs.map → chunk-CAF2COXW.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-MCEXD5XH.mjs.map → chunk-GS3LDHYD.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HM7VB4ZV.mjs.map → chunk-SZLX4BVJ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-FJYSQRBO.mjs.map → chunk-UMO3ETDV.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-client",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.1da679c",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS Client",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,21 +10,23 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
20
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
21
|
+
"browser": "./dist/lib/browser/types/index.mjs",
|
|
22
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
"types": "dist/types/src/index.d.ts",
|
|
24
26
|
"typesVersions": {
|
|
25
27
|
"*": {
|
|
26
28
|
"types": [
|
|
27
|
-
"dist/types/src/types.d.ts"
|
|
29
|
+
"dist/types/src/types/index.d.ts"
|
|
28
30
|
]
|
|
29
31
|
}
|
|
30
32
|
},
|
|
@@ -35,50 +37,47 @@
|
|
|
35
37
|
"dependencies": {
|
|
36
38
|
"@preact-signals/safe-react": "^0.9.0",
|
|
37
39
|
"@preact/signals-core": "^1.9.0",
|
|
38
|
-
"effect": "3.14.21",
|
|
39
40
|
"react-qr-rounded": "^1.0.0",
|
|
40
|
-
"@dxos/app-framework": "0.8.
|
|
41
|
-
"@dxos/async": "0.8.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/echo-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/echo-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/react-client": "0.8.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/shell": "0.8.
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
41
|
+
"@dxos/app-framework": "0.8.4-main.1da679c",
|
|
42
|
+
"@dxos/async": "0.8.4-main.1da679c",
|
|
43
|
+
"@dxos/echo": "0.8.4-main.1da679c",
|
|
44
|
+
"@dxos/echo-signals": "0.8.4-main.1da679c",
|
|
45
|
+
"@dxos/config": "0.8.4-main.1da679c",
|
|
46
|
+
"@dxos/echo-schema": "0.8.4-main.1da679c",
|
|
47
|
+
"@dxos/local-storage": "0.8.4-main.1da679c",
|
|
48
|
+
"@dxos/log": "0.8.4-main.1da679c",
|
|
49
|
+
"@dxos/plugin-graph": "0.8.4-main.1da679c",
|
|
50
|
+
"@dxos/plugin-observability": "0.8.4-main.1da679c",
|
|
51
|
+
"@dxos/invariant": "0.8.4-main.1da679c",
|
|
52
|
+
"@dxos/react-client": "0.8.4-main.1da679c",
|
|
53
|
+
"@dxos/react-ui-form": "0.8.4-main.1da679c",
|
|
54
|
+
"@dxos/react-ui-stack": "0.8.4-main.1da679c",
|
|
55
|
+
"@dxos/shell": "0.8.4-main.1da679c",
|
|
56
|
+
"@dxos/util": "0.8.4-main.1da679c",
|
|
57
|
+
"@dxos/react-ui-pickers": "0.8.4-main.1da679c"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@effect-rx/rx-react": "
|
|
60
|
-
"@effect/platform": "0.
|
|
61
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
60
|
+
"@effect-rx/rx-react": "0.38.0",
|
|
61
|
+
"@effect/platform": "0.90.2",
|
|
62
62
|
"@types/react": "~18.2.0",
|
|
63
63
|
"@types/react-dom": "~18.2.0",
|
|
64
|
-
"effect": "3.
|
|
64
|
+
"effect": "3.17.7",
|
|
65
65
|
"react": "~18.2.0",
|
|
66
66
|
"react-dom": "~18.2.0",
|
|
67
|
-
"vite": "
|
|
68
|
-
"@dxos/live-object": "0.8.
|
|
69
|
-
"@dxos/react-ui": "0.8.
|
|
70
|
-
"@dxos/react-ui-theme": "0.8.
|
|
71
|
-
"@dxos/storybook-utils": "0.8.
|
|
67
|
+
"vite": "7.1.1",
|
|
68
|
+
"@dxos/live-object": "0.8.4-main.1da679c",
|
|
69
|
+
"@dxos/react-ui": "0.8.4-main.1da679c",
|
|
70
|
+
"@dxos/react-ui-theme": "0.8.4-main.1da679c",
|
|
71
|
+
"@dxos/storybook-utils": "0.8.4-main.1da679c"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@effect-rx/rx-react": "^0.34.1",
|
|
75
|
-
"@effect/platform": "0.80.12",
|
|
76
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
75
|
+
"@effect/platform": "^0.80.12",
|
|
77
76
|
"effect": "^3.13.3",
|
|
78
77
|
"react": "~18.2.0",
|
|
79
78
|
"react-dom": "~18.2.0",
|
|
80
|
-
"@dxos/react-ui": "0.8.
|
|
81
|
-
"@dxos/react-ui-theme": "0.8.
|
|
79
|
+
"@dxos/react-ui": "0.8.4-main.1da679c",
|
|
80
|
+
"@dxos/react-ui-theme": "0.8.4-main.1da679c"
|
|
82
81
|
},
|
|
83
82
|
"publishConfig": {
|
|
84
83
|
"access": "public"
|
package/src/ClientPlugin.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, defineModule, definePlugin,
|
|
5
|
+
import { Capabilities, Events, contributes, defineModule, definePlugin, oneOf } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
Client,
|
|
9
8
|
AppGraphBuilder,
|
|
9
|
+
Client,
|
|
10
10
|
IntentResolver,
|
|
11
11
|
Migrations,
|
|
12
12
|
ReactContext,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from './capabilities';
|
|
16
16
|
import { ClientEvents } from './events';
|
|
17
17
|
import { meta } from './meta';
|
|
18
|
-
import translations from './translations';
|
|
18
|
+
import { translations } from './translations';
|
|
19
19
|
import { type ClientPluginOptions } from './types';
|
|
20
20
|
|
|
21
21
|
export const ClientPlugin = ({
|
|
@@ -6,19 +6,20 @@ import { Rx } from '@effect-rx/rx-react';
|
|
|
6
6
|
import { Option, pipe } from 'effect';
|
|
7
7
|
|
|
8
8
|
import { createIntent } from '@dxos/app-framework';
|
|
9
|
-
import { Capabilities,
|
|
10
|
-
import { createExtension, rxFromObservable
|
|
9
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
|
+
import { ROOT_ID, createExtension, rxFromObservable } from '@dxos/plugin-graph';
|
|
11
11
|
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import { CLIENT_PLUGIN } from '../meta';
|
|
13
|
+
import { meta } from '../meta';
|
|
15
14
|
import { Account, ClientAction } from '../types';
|
|
16
15
|
|
|
16
|
+
import { ClientCapabilities } from './capabilities';
|
|
17
|
+
|
|
17
18
|
export default (context: PluginContext) =>
|
|
18
19
|
contributes(
|
|
19
20
|
Capabilities.AppGraphBuilder,
|
|
20
21
|
createExtension({
|
|
21
|
-
id:
|
|
22
|
+
id: meta.id,
|
|
22
23
|
actions: (node) =>
|
|
23
24
|
Rx.make((get) =>
|
|
24
25
|
pipe(
|
|
@@ -27,13 +28,13 @@ export default (context: PluginContext) =>
|
|
|
27
28
|
Option.map(() => {
|
|
28
29
|
return [
|
|
29
30
|
{
|
|
30
|
-
id: `${
|
|
31
|
+
id: `${meta.id}/open-user-account`,
|
|
31
32
|
data: async () => {
|
|
32
33
|
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
34
|
await dispatch(createIntent(ClientAction.ShareIdentity));
|
|
34
35
|
},
|
|
35
36
|
properties: {
|
|
36
|
-
label: ['open user account label', { ns:
|
|
37
|
+
label: ['open user account label', { ns: meta.id }],
|
|
37
38
|
icon: 'ph--user--regular',
|
|
38
39
|
disposition: 'menu',
|
|
39
40
|
keyBinding: {
|
|
@@ -62,9 +63,9 @@ export default (context: PluginContext) =>
|
|
|
62
63
|
return [
|
|
63
64
|
{
|
|
64
65
|
id: Account.id,
|
|
65
|
-
type:
|
|
66
|
+
type: meta.id,
|
|
66
67
|
properties: {
|
|
67
|
-
label: ['account label', { ns:
|
|
68
|
+
label: ['account label', { ns: meta.id }],
|
|
68
69
|
icon: 'ph--user--regular',
|
|
69
70
|
disposition: 'user-account',
|
|
70
71
|
// NOTE: This currently needs to be the identity key because the fallback is generated from hex.
|
|
@@ -77,18 +78,18 @@ export default (context: PluginContext) =>
|
|
|
77
78
|
{
|
|
78
79
|
id: Account.Profile,
|
|
79
80
|
data: Account.Profile,
|
|
80
|
-
type:
|
|
81
|
+
type: meta.id,
|
|
81
82
|
properties: {
|
|
82
|
-
label: ['profile label', { ns:
|
|
83
|
+
label: ['profile label', { ns: meta.id }],
|
|
83
84
|
icon: 'ph--user--regular',
|
|
84
85
|
},
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
88
|
id: Account.Devices,
|
|
88
89
|
data: Account.Devices,
|
|
89
|
-
type:
|
|
90
|
+
type: meta.id,
|
|
90
91
|
properties: {
|
|
91
|
-
label: ['devices label', { ns:
|
|
92
|
+
label: ['devices label', { ns: meta.id }],
|
|
92
93
|
icon: 'ph--devices--regular',
|
|
93
94
|
testId: 'clientPlugin.devices',
|
|
94
95
|
},
|
|
@@ -96,9 +97,9 @@ export default (context: PluginContext) =>
|
|
|
96
97
|
{
|
|
97
98
|
id: Account.Security,
|
|
98
99
|
data: Account.Security,
|
|
99
|
-
type:
|
|
100
|
+
type: meta.id,
|
|
100
101
|
properties: {
|
|
101
|
-
label: ['security label', { ns:
|
|
102
|
+
label: ['security label', { ns: meta.id }],
|
|
102
103
|
icon: 'ph--key--regular',
|
|
103
104
|
},
|
|
104
105
|
},
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
6
6
|
import { type Client } from '@dxos/client';
|
|
7
7
|
import { type ObjectMigration } from '@dxos/client/echo';
|
|
8
|
-
import { type
|
|
8
|
+
import { type Type } from '@dxos/echo';
|
|
9
9
|
|
|
10
10
|
import { CLIENT_PLUGIN } from '../meta';
|
|
11
11
|
|
|
12
12
|
export namespace ClientCapabilities {
|
|
13
13
|
export const Client = defineCapability<Client>(`${CLIENT_PLUGIN}/capability/client`);
|
|
14
|
-
export const Schema = defineCapability<
|
|
15
|
-
|
|
14
|
+
export const Schema = defineCapability<Type.Obj.Any[]>(`${CLIENT_PLUGIN}/capability/schema`);
|
|
15
|
+
// TODO(wittjosiah): More descriptive name.
|
|
16
|
+
export const SchemaWhiteList = defineCapability<Type.Obj.Any[]>(`${CLIENT_PLUGIN}/capability/schema-whitelist`);
|
|
16
17
|
export const Migration = defineCapability<ObjectMigration[]>(`${CLIENT_PLUGIN}/capability/migration`);
|
|
17
18
|
}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { Client } from '@dxos/react-client';
|
|
7
7
|
|
|
8
|
-
import { ClientCapabilities } from './capabilities';
|
|
9
8
|
import { ClientEvents } from '../events';
|
|
10
9
|
import { type ClientPluginOptions } from '../types';
|
|
11
10
|
|
|
11
|
+
import { ClientCapabilities } from './capabilities';
|
|
12
|
+
|
|
12
13
|
type ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationUrl' | 'invitationParam' | 'onReset'> & {
|
|
13
14
|
context: PluginContext;
|
|
14
15
|
};
|
|
@@ -16,7 +17,7 @@ type ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationU
|
|
|
16
17
|
export default async ({ context, onClientInitialized, onSpacesReady, ...options }: ClientCapabilityOptions) => {
|
|
17
18
|
const client = new Client(options);
|
|
18
19
|
await client.initialize();
|
|
19
|
-
await onClientInitialized?.(context, client);
|
|
20
|
+
await onClientInitialized?.({ context, client });
|
|
20
21
|
|
|
21
22
|
// TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.
|
|
22
23
|
client.reloaded.on(() => {
|
|
@@ -27,10 +28,11 @@ export default async ({ context, onClientInitialized, onSpacesReady, ...options
|
|
|
27
28
|
});
|
|
28
29
|
});
|
|
29
30
|
|
|
31
|
+
// TODO(burdon): The callback isn't called?
|
|
30
32
|
const subscription = client.spaces.isReady.subscribe(async (ready) => {
|
|
31
33
|
if (ready) {
|
|
32
34
|
await context.activatePromise(ClientEvents.SpacesReady);
|
|
33
|
-
await onSpacesReady?.(context, client);
|
|
35
|
+
await onSpacesReady?.({ context, client });
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
|
|
@@ -6,23 +6,24 @@ import { pipe } from 'effect';
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
Capabilities,
|
|
9
|
+
LayoutAction,
|
|
10
|
+
type PluginContext,
|
|
9
11
|
chain,
|
|
10
12
|
contributes,
|
|
11
13
|
createIntent,
|
|
12
14
|
createResolver,
|
|
13
|
-
LayoutAction,
|
|
14
|
-
type PluginContext,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
16
|
import { invariant } from '@dxos/invariant';
|
|
17
17
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
18
18
|
import { PublicKey } from '@dxos/react-client';
|
|
19
19
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
20
20
|
|
|
21
|
-
import { ClientCapabilities } from './capabilities';
|
|
22
21
|
import { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../components';
|
|
23
22
|
import { ClientEvents } from '../events';
|
|
24
23
|
import { Account, ClientAction } from '../types';
|
|
25
24
|
|
|
25
|
+
import { ClientCapabilities } from './capabilities';
|
|
26
|
+
|
|
26
27
|
type IntentResolverOptions = {
|
|
27
28
|
context: PluginContext;
|
|
28
29
|
appName?: string;
|
|
@@ -173,7 +174,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
|
|
|
173
174
|
challenge: new Uint8Array(),
|
|
174
175
|
rp: { id: location.hostname, name: appName },
|
|
175
176
|
user: {
|
|
176
|
-
id: lookupKey.asUint8Array()
|
|
177
|
+
id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,
|
|
177
178
|
name: identity.did,
|
|
178
179
|
displayName: identity.profile?.displayName ?? '',
|
|
179
180
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
7
|
import { ClientCapabilities } from './capabilities';
|
|
8
8
|
|
|
@@ -7,9 +7,10 @@ import React from 'react';
|
|
|
7
7
|
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { ClientProvider } from '@dxos/react-client';
|
|
9
9
|
|
|
10
|
-
import { ClientCapabilities } from './capabilities';
|
|
11
10
|
import { CLIENT_PLUGIN } from '../meta';
|
|
12
11
|
|
|
12
|
+
import { ClientCapabilities } from './capabilities';
|
|
13
|
+
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactContext, {
|
|
15
16
|
id: CLIENT_PLUGIN,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
9
9
|
|
|
10
10
|
import {
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
JoinDialog,
|
|
14
14
|
ProfileContainer,
|
|
15
15
|
RECOVERY_CODE_DIALOG,
|
|
16
|
+
RESET_DIALOG,
|
|
16
17
|
RecoveryCodeDialog,
|
|
18
|
+
type RecoveryCodeDialogProps,
|
|
17
19
|
RecoveryCredentialsContainer,
|
|
18
|
-
RESET_DIALOG,
|
|
19
20
|
ResetDialog,
|
|
20
21
|
type ResetDialogProps,
|
|
21
|
-
type RecoveryCodeDialogProps,
|
|
22
22
|
} from '../components';
|
|
23
23
|
import { Account, type ClientPluginOptions } from '../types';
|
|
24
24
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities,
|
|
6
|
-
import { type
|
|
5
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { type Type } from '@dxos/echo';
|
|
7
7
|
|
|
8
8
|
import { ClientCapabilities } from './capabilities';
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ export default (context: PluginContext) => {
|
|
|
12
12
|
const client = context.getCapability(ClientCapabilities.Client);
|
|
13
13
|
|
|
14
14
|
// TODO(wittjosiah): Unregister schemas when they are disabled.
|
|
15
|
-
let previous:
|
|
15
|
+
let previous: Type.Obj.Any[] = [];
|
|
16
16
|
const cancel = registry.subscribe(
|
|
17
17
|
context.capabilities(ClientCapabilities.Schema),
|
|
18
18
|
(_schemas) => {
|
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
|
|
9
9
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
13
13
|
|
|
14
|
-
import { DevicesContainer } from './DevicesContainer';
|
|
15
14
|
import { ClientPlugin } from '../ClientPlugin';
|
|
16
|
-
import translations from '../translations';
|
|
15
|
+
import { translations } from '../translations';
|
|
16
|
+
|
|
17
|
+
import { DevicesContainer } from './DevicesContainer';
|
|
17
18
|
|
|
18
|
-
const meta
|
|
19
|
+
const meta = {
|
|
19
20
|
title: 'plugins/plugin-client/DevicesContainer',
|
|
20
21
|
component: DevicesContainer,
|
|
21
22
|
decorators: [
|
|
22
23
|
withPluginManager({
|
|
23
24
|
plugins: [
|
|
24
25
|
ClientPlugin({
|
|
25
|
-
onClientInitialized: async (
|
|
26
|
+
onClientInitialized: async ({ client }) => {
|
|
26
27
|
await client.halo.createIdentity();
|
|
27
28
|
},
|
|
28
29
|
}),
|
|
@@ -34,13 +35,13 @@ const meta: Meta = {
|
|
|
34
35
|
],
|
|
35
36
|
parameters: {
|
|
36
37
|
layout: 'fullscreen',
|
|
37
|
-
translations: [...translations,
|
|
38
|
+
translations: [...translations, ...shellTranslations],
|
|
38
39
|
},
|
|
39
|
-
}
|
|
40
|
+
} satisfies Meta<typeof DevicesContainer>;
|
|
40
41
|
|
|
41
42
|
export default meta;
|
|
42
43
|
|
|
43
|
-
type Story = StoryObj<typeof
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
44
45
|
|
|
45
46
|
export const Default: Story = {
|
|
46
47
|
args: {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Check, X } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
import { QR } from 'react-qr-rounded';
|
|
8
7
|
|
|
@@ -12,7 +11,7 @@ import { useClient, useMulticastObservable } from '@dxos/react-client';
|
|
|
12
11
|
import { type Device, useDevices } from '@dxos/react-client/halo';
|
|
13
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
14
13
|
import { useNetworkStatus } from '@dxos/react-client/mesh';
|
|
15
|
-
import { Button, Clipboard, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
16
15
|
import {
|
|
17
16
|
ControlFrame,
|
|
18
17
|
ControlFrameItem,
|
|
@@ -21,8 +20,6 @@ import {
|
|
|
21
20
|
ControlPage,
|
|
22
21
|
ControlSection,
|
|
23
22
|
} from '@dxos/react-ui-form';
|
|
24
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
25
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
26
23
|
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
|
|
27
24
|
import { hexToEmoji } from '@dxos/util';
|
|
28
25
|
|
|
@@ -53,70 +50,60 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
53
50
|
|
|
54
51
|
return (
|
|
55
52
|
<Clipboard.Provider>
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
>
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</List>
|
|
53
|
+
<ControlPage>
|
|
54
|
+
<ControlSection
|
|
55
|
+
title={t('devices verbose label', { ns: CLIENT_PLUGIN })}
|
|
56
|
+
description={t('devices description', { ns: CLIENT_PLUGIN })}
|
|
57
|
+
>
|
|
58
|
+
<ControlFrame>
|
|
59
|
+
<ControlFrameItem title={t('devices label', { ns: CLIENT_PLUGIN })}>
|
|
60
|
+
<List>
|
|
61
|
+
{devices.map((device: Device) => {
|
|
62
|
+
return (
|
|
63
|
+
<DeviceListItem key={device.deviceKey.toHex()} device={device} connectionState={connectionState} />
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
66
|
+
</List>
|
|
67
|
+
</ControlFrameItem>
|
|
68
|
+
{createInvitationUrl && (
|
|
69
|
+
<ControlFrameItem title='Add device'>
|
|
70
|
+
<DeviceInvitation createInvitationUrl={createInvitationUrl} />
|
|
75
71
|
</ControlFrameItem>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
data-testid='devicesContainer.joinExisting'
|
|
112
|
-
>
|
|
113
|
-
{t('join new identity label')}
|
|
114
|
-
</Button>
|
|
115
|
-
</ControlItem>
|
|
116
|
-
</ControlGroup>
|
|
117
|
-
</ControlSection>
|
|
118
|
-
</ControlPage>
|
|
119
|
-
</StackItem.Content>
|
|
72
|
+
)}
|
|
73
|
+
</ControlFrame>
|
|
74
|
+
</ControlSection>
|
|
75
|
+
<ControlSection
|
|
76
|
+
title={t('danger zone title', { ns: CLIENT_PLUGIN })}
|
|
77
|
+
description={t('danger zone description', { ns: CLIENT_PLUGIN })}
|
|
78
|
+
>
|
|
79
|
+
<ControlGroup>
|
|
80
|
+
<ControlItem
|
|
81
|
+
title={t('reset device label')}
|
|
82
|
+
description={t('reset device description', { ns: CLIENT_PLUGIN })}
|
|
83
|
+
>
|
|
84
|
+
<Button variant='destructive' onClick={handleResetStorage} data-testid='devicesContainer.reset'>
|
|
85
|
+
{t('reset device label')}
|
|
86
|
+
</Button>
|
|
87
|
+
</ControlItem>
|
|
88
|
+
<ControlItem
|
|
89
|
+
title={t('recover identity label')}
|
|
90
|
+
description={t('recover identity description', { ns: CLIENT_PLUGIN })}
|
|
91
|
+
>
|
|
92
|
+
<Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>
|
|
93
|
+
{t('recover identity label')}
|
|
94
|
+
</Button>
|
|
95
|
+
</ControlItem>
|
|
96
|
+
<ControlItem
|
|
97
|
+
title={t('join new identity label')}
|
|
98
|
+
description={t('join new identity description', { ns: CLIENT_PLUGIN })}
|
|
99
|
+
>
|
|
100
|
+
<Button variant='destructive' onClick={handleJoinNewIdentity} data-testid='devicesContainer.joinExisting'>
|
|
101
|
+
{t('join new identity label')}
|
|
102
|
+
</Button>
|
|
103
|
+
</ControlItem>
|
|
104
|
+
</ControlGroup>
|
|
105
|
+
</ControlSection>
|
|
106
|
+
</ControlPage>
|
|
120
107
|
</Clipboard.Provider>
|
|
121
108
|
);
|
|
122
109
|
};
|
|
@@ -290,5 +277,9 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
|
|
|
290
277
|
};
|
|
291
278
|
|
|
292
279
|
const InvitationComplete = ({ statusValue }: { statusValue: number }) => {
|
|
293
|
-
return statusValue > 0 ?
|
|
280
|
+
return statusValue > 0 ? (
|
|
281
|
+
<Icon icon='ph--check--regular' size={6} classNames='m-1.5' />
|
|
282
|
+
) : (
|
|
283
|
+
<Icon icon='ph--x--regular' size={6} classNames='m-1.5' />
|
|
284
|
+
);
|
|
294
285
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
8
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
9
9
|
import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
10
10
|
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
|
|
9
9
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
-
import {
|
|
10
|
+
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
11
|
+
|
|
12
|
+
import { translations } from '../translations';
|
|
11
13
|
|
|
12
14
|
import { ProfileContainer } from './ProfileContainer';
|
|
13
|
-
import translations from '../translations';
|
|
14
15
|
|
|
15
|
-
const meta
|
|
16
|
+
const meta = {
|
|
16
17
|
title: 'plugins/plugin-client/ProfileContainer',
|
|
17
18
|
component: ProfileContainer,
|
|
18
19
|
decorators: [withClientProvider({ createIdentity: true }), withTheme, withLayout()],
|
|
@@ -20,10 +21,10 @@ const meta: Meta = {
|
|
|
20
21
|
layout: 'fullscreen',
|
|
21
22
|
translations,
|
|
22
23
|
},
|
|
23
|
-
}
|
|
24
|
+
} satisfies Meta<typeof ProfileContainer>;
|
|
24
25
|
|
|
25
26
|
export default meta;
|
|
26
27
|
|
|
27
|
-
type Story = StoryObj<typeof
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
28
29
|
|
|
29
30
|
export const Default: Story = {};
|