@dxos/plugin-client 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77
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-JNIES5L4.mjs → app-graph-builder-VTPUWIBC.mjs} +19 -19
- package/dist/lib/browser/app-graph-builder-VTPUWIBC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SV3MHIKI.mjs → chunk-PEZKWJ62.mjs} +37 -46
- package/dist/lib/browser/chunk-PEZKWJ62.mjs.map +7 -0
- package/dist/lib/browser/chunk-PFY3EQPI.mjs +18 -0
- package/dist/lib/browser/chunk-PFY3EQPI.mjs.map +7 -0
- package/dist/lib/browser/chunk-QB3D2P4J.mjs +10 -0
- package/dist/lib/browser/chunk-QB3D2P4J.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RMHBOY3Y.mjs → chunk-V4KRRGSK.mjs} +2 -2
- package/dist/lib/browser/{chunk-RMHBOY3Y.mjs.map → chunk-V4KRRGSK.mjs.map} +2 -2
- package/dist/lib/browser/chunk-VTC4GIND.mjs +19 -0
- package/dist/lib/browser/chunk-VTC4GIND.mjs.map +7 -0
- package/dist/lib/browser/{client-SKVKXPLY.mjs → client-5PWEJ3U6.mjs} +14 -8
- package/dist/lib/browser/client-5PWEJ3U6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +23 -19
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-LNPLD5CA.mjs → intent-resolver-KHLH34SU.mjs} +16 -16
- package/dist/lib/browser/intent-resolver-KHLH34SU.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-D76RCG72.mjs → migrations-MWQCO5KY.mjs} +5 -5
- package/dist/lib/{node-esm/migrations-YISDI7LF.mjs.map → browser/migrations-MWQCO5KY.mjs.map} +2 -2
- package/dist/lib/browser/{react-context-YWVPZUMU.mjs → react-context-S4SRYUVY.mjs} +7 -7
- package/dist/lib/browser/react-context-S4SRYUVY.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-QFZTDNLS.mjs → react-surface-R4LOX36S.mjs} +7 -7
- package/dist/lib/browser/{react-surface-QFZTDNLS.mjs.map → react-surface-R4LOX36S.mjs.map} +3 -3
- package/dist/lib/browser/{schema-defs-HKW6VNZB.mjs → schema-defs-E3USCMH3.mjs} +5 -5
- package/dist/lib/{node-esm/schema-defs-5ZNI63RW.mjs.map → browser/schema-defs-E3USCMH3.mjs.map} +2 -2
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{app-graph-builder-SWFB4FID.mjs → app-graph-builder-AUWZ3ST2.mjs} +19 -19
- package/dist/lib/node-esm/app-graph-builder-AUWZ3ST2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FBYODKEL.mjs → chunk-4SRRA6RS.mjs} +37 -46
- package/dist/lib/node-esm/chunk-4SRRA6RS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-K5IFPSCL.mjs +20 -0
- package/dist/lib/node-esm/chunk-K5IFPSCL.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SZLX4BVJ.mjs → chunk-QE4LPI2A.mjs} +2 -4
- package/dist/lib/node-esm/chunk-QE4LPI2A.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-5V3RCXZV.mjs → chunk-TCOCW5ON.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-5V3RCXZV.mjs.map → chunk-TCOCW5ON.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-UYDFBGYA.mjs +19 -0
- package/dist/lib/node-esm/chunk-UYDFBGYA.mjs.map +7 -0
- package/dist/lib/node-esm/{client-SLL6GDC2.mjs → client-ODN7EBTY.mjs} +14 -8
- package/dist/lib/node-esm/client-ODN7EBTY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +23 -19
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-L7C6YRWV.mjs → intent-resolver-BJONA2UZ.mjs} +16 -16
- package/dist/lib/node-esm/intent-resolver-BJONA2UZ.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-YISDI7LF.mjs → migrations-ARXHGBH5.mjs} +5 -5
- package/dist/lib/{browser/migrations-D76RCG72.mjs.map → node-esm/migrations-ARXHGBH5.mjs.map} +2 -2
- package/dist/lib/node-esm/{react-context-EEHS4S3L.mjs → react-context-4SZYNSIS.mjs} +7 -7
- package/dist/lib/node-esm/react-context-4SZYNSIS.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-2K6W37R4.mjs → react-surface-VPJTF75H.mjs} +7 -7
- package/dist/lib/node-esm/{react-surface-2K6W37R4.mjs.map → react-surface-VPJTF75H.mjs.map} +3 -3
- package/dist/lib/node-esm/{schema-defs-5ZNI63RW.mjs → schema-defs-ATH5YBDR.mjs} +5 -5
- package/dist/lib/{browser/schema-defs-HKW6VNZB.mjs.map → node-esm/schema-defs-ATH5YBDR.mjs.map} +2 -2
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/ClientPlugin.d.ts +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- 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.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 +10 -10
- 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 +224 -5
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts +1 -1
- package/dist/types/src/components/JoinDialog.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 -5
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +59 -5
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +57 -5
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.d.ts +1 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +59 -4
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +9 -3
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -39
- package/src/ClientPlugin.ts +57 -59
- package/src/capabilities/app-graph-builder.ts +16 -15
- package/src/capabilities/capabilities.ts +5 -5
- 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 +3 -2
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/schema-defs.ts +1 -1
- package/src/components/DevicesContainer.stories.tsx +9 -11
- package/src/components/DevicesContainer.tsx +54 -68
- package/src/components/JoinDialog.tsx +4 -4
- package/src/components/ProfileContainer.stories.tsx +8 -9
- package/src/components/ProfileContainer.tsx +21 -24
- package/src/components/RecoveryCodeDialog.stories.tsx +9 -10
- package/src/components/RecoveryCodeDialog.tsx +3 -3
- package/src/components/RecoveryCredentialsContainer.stories.tsx +9 -11
- package/src/components/RecoveryCredentialsContainer.tsx +47 -50
- package/src/components/ResetDialog.stories.tsx +10 -13
- package/src/components/ResetDialog.tsx +4 -4
- package/src/events.ts +6 -6
- package/src/index.ts +4 -3
- package/src/meta.ts +1 -3
- package/src/types/schema.ts +3 -3
- package/dist/lib/browser/app-graph-builder-JNIES5L4.mjs.map +0 -7
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs +0 -18
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-CAF2COXW.mjs +0 -19
- package/dist/lib/browser/chunk-CAF2COXW.mjs.map +0 -7
- package/dist/lib/browser/chunk-GS3LDHYD.mjs +0 -12
- package/dist/lib/browser/chunk-GS3LDHYD.mjs.map +0 -7
- package/dist/lib/browser/chunk-SV3MHIKI.mjs.map +0 -7
- package/dist/lib/browser/client-SKVKXPLY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LNPLD5CA.mjs.map +0 -7
- package/dist/lib/browser/react-context-YWVPZUMU.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-SWFB4FID.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FBYODKEL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs +0 -19
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs +0 -20
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs.map +0 -7
- package/dist/lib/node-esm/client-SLL6GDC2.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-L7C6YRWV.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-EEHS4S3L.mjs.map +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-client",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.a4bbb77",
|
|
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,16 +10,16 @@
|
|
|
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
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
|
-
"source": "./src/index.ts"
|
|
16
|
+
"node": "./dist/lib/node-esm/index.mjs"
|
|
17
17
|
},
|
|
18
18
|
"./types": {
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
19
20
|
"types": "./dist/types/src/types/index.d.ts",
|
|
20
21
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
21
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
22
|
-
"source": "./src/types/index.ts"
|
|
22
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -36,48 +36,48 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@preact-signals/safe-react": "^0.9.0",
|
|
39
|
-
"@preact/signals-core": "^1.
|
|
39
|
+
"@preact/signals-core": "^1.12.1",
|
|
40
40
|
"react-qr-rounded": "^1.0.0",
|
|
41
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/echo": "0.8.4-main.
|
|
45
|
-
"@dxos/echo-schema": "0.8.4-main.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/invariant": "0.8.4-main.
|
|
48
|
-
"@dxos/plugin-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/local-storage": "0.8.4-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/react-
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/shell": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
41
|
+
"@dxos/app-framework": "0.8.4-main.a4bbb77",
|
|
42
|
+
"@dxos/async": "0.8.4-main.a4bbb77",
|
|
43
|
+
"@dxos/config": "0.8.4-main.a4bbb77",
|
|
44
|
+
"@dxos/echo": "0.8.4-main.a4bbb77",
|
|
45
|
+
"@dxos/echo-schema": "0.8.4-main.a4bbb77",
|
|
46
|
+
"@dxos/log": "0.8.4-main.a4bbb77",
|
|
47
|
+
"@dxos/invariant": "0.8.4-main.a4bbb77",
|
|
48
|
+
"@dxos/plugin-observability": "0.8.4-main.a4bbb77",
|
|
49
|
+
"@dxos/react-client": "0.8.4-main.a4bbb77",
|
|
50
|
+
"@dxos/local-storage": "0.8.4-main.a4bbb77",
|
|
51
|
+
"@dxos/react-ui-form": "0.8.4-main.a4bbb77",
|
|
52
|
+
"@dxos/react-ui-pickers": "0.8.4-main.a4bbb77",
|
|
53
|
+
"@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
|
|
54
|
+
"@dxos/echo-signals": "0.8.4-main.a4bbb77",
|
|
55
|
+
"@dxos/shell": "0.8.4-main.a4bbb77",
|
|
56
|
+
"@dxos/util": "0.8.4-main.a4bbb77",
|
|
57
|
+
"@dxos/plugin-graph": "0.8.4-main.a4bbb77"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@effect-rx/rx-react": "0.
|
|
61
|
-
"@effect/platform": "0.
|
|
62
|
-
"@types/react": "~
|
|
63
|
-
"@types/react-dom": "~
|
|
64
|
-
"effect": "3.
|
|
65
|
-
"react": "~
|
|
66
|
-
"react-dom": "~
|
|
67
|
-
"vite": "
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
71
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
60
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
61
|
+
"@effect/platform": "0.92.1",
|
|
62
|
+
"@types/react": "~19.2.0",
|
|
63
|
+
"@types/react-dom": "~19.2.0",
|
|
64
|
+
"effect": "3.18.3",
|
|
65
|
+
"react": "~19.2.0",
|
|
66
|
+
"react-dom": "~19.2.0",
|
|
67
|
+
"vite": "7.1.9",
|
|
68
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77",
|
|
69
|
+
"@dxos/live-object": "0.8.4-main.a4bbb77",
|
|
70
|
+
"@dxos/storybook-utils": "0.8.4-main.a4bbb77",
|
|
71
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@effect-rx/rx-react": "^0.34.1",
|
|
75
75
|
"@effect/platform": "^0.80.12",
|
|
76
76
|
"effect": "^3.13.3",
|
|
77
|
-
"react": "
|
|
78
|
-
"react-dom": "
|
|
79
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
80
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
77
|
+
"react": "^19.0.0",
|
|
78
|
+
"react-dom": "^19.0.0",
|
|
79
|
+
"@dxos/react-ui": "0.8.4-main.a4bbb77",
|
|
80
|
+
"@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
83
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,
|
|
@@ -18,61 +18,59 @@ import { meta } from './meta';
|
|
|
18
18
|
import { translations } from './translations';
|
|
19
19
|
import { type ClientPluginOptions } from './types';
|
|
20
20
|
|
|
21
|
-
export const ClientPlugin = (
|
|
22
|
-
|
|
23
|
-
invitationParam = 'deviceInvitationCode',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
baseUrl.searchParams.set(invitationParam, invitationCode);
|
|
30
|
-
return baseUrl.toString();
|
|
31
|
-
};
|
|
21
|
+
export const ClientPlugin = definePlugin<ClientPluginOptions>(
|
|
22
|
+
meta,
|
|
23
|
+
({ invitationUrl = window.location.origin, invitationParam = 'deviceInvitationCode', onReset, ...options }) => {
|
|
24
|
+
const createInvitationUrl = (invitationCode: string) => {
|
|
25
|
+
const baseUrl = new URL(invitationUrl);
|
|
26
|
+
baseUrl.searchParams.set(invitationParam, invitationCode);
|
|
27
|
+
return baseUrl.toString();
|
|
28
|
+
};
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
30
|
+
return [
|
|
31
|
+
defineModule({
|
|
32
|
+
id: `${meta.id}/module/client`,
|
|
33
|
+
activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),
|
|
34
|
+
activatesAfter: [ClientEvents.ClientReady],
|
|
35
|
+
activate: (context) => Client({ ...options, context }),
|
|
36
|
+
}),
|
|
37
|
+
defineModule({
|
|
38
|
+
id: `${meta.id}/module/schema`,
|
|
39
|
+
activatesOn: ClientEvents.ClientReady,
|
|
40
|
+
activatesBefore: [ClientEvents.SetupSchema],
|
|
41
|
+
activate: SchemaDefs,
|
|
42
|
+
}),
|
|
43
|
+
defineModule({
|
|
44
|
+
id: `${meta.id}/module/migration`,
|
|
45
|
+
activatesOn: ClientEvents.ClientReady,
|
|
46
|
+
activatesBefore: [ClientEvents.SetupMigration],
|
|
47
|
+
activate: Migrations,
|
|
48
|
+
}),
|
|
49
|
+
defineModule({
|
|
50
|
+
id: `${meta.id}/module/react-context`,
|
|
51
|
+
activatesOn: Events.Startup,
|
|
52
|
+
activate: ReactContext,
|
|
53
|
+
}),
|
|
54
|
+
defineModule({
|
|
55
|
+
id: `${meta.id}/module/react-surface`,
|
|
56
|
+
activatesOn: Events.SetupReactSurface,
|
|
57
|
+
activate: () => ReactSurface({ createInvitationUrl, onReset }),
|
|
58
|
+
}),
|
|
59
|
+
defineModule({
|
|
60
|
+
id: `${meta.id}/module/app-graph-builder`,
|
|
61
|
+
activatesOn: Events.SetupAppGraph,
|
|
62
|
+
activate: AppGraphBuilder,
|
|
63
|
+
}),
|
|
64
|
+
defineModule({
|
|
65
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
66
|
+
activatesOn: Events.SetupIntentResolver,
|
|
67
|
+
activate: (context) => IntentResolver({ context }),
|
|
68
|
+
}),
|
|
69
|
+
defineModule({
|
|
70
|
+
id: `${meta.id}/module/translations`,
|
|
71
|
+
activatesOn: Events.SetupTranslations,
|
|
72
|
+
activate: () => contributes(Capabilities.Translations, translations),
|
|
73
|
+
}),
|
|
74
|
+
];
|
|
75
|
+
},
|
|
76
|
+
);
|
|
@@ -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
|
},
|
|
@@ -7,12 +7,12 @@ import { type Client } from '@dxos/client';
|
|
|
7
7
|
import { type ObjectMigration } from '@dxos/client/echo';
|
|
8
8
|
import { type Type } from '@dxos/echo';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
export namespace ClientCapabilities {
|
|
13
|
-
export const Client = defineCapability<Client>(`${
|
|
14
|
-
export const Schema = defineCapability<Type.Obj.Any[]>(`${
|
|
13
|
+
export const Client = defineCapability<Client>(`${meta.id}/capability/client`);
|
|
14
|
+
export const Schema = defineCapability<Type.Obj.Any[]>(`${meta.id}/capability/schema`);
|
|
15
15
|
// TODO(wittjosiah): More descriptive name.
|
|
16
|
-
export const SchemaWhiteList = defineCapability<Type.Obj.Any[]>(`${
|
|
17
|
-
export const Migration = defineCapability<ObjectMigration[]>(`${
|
|
16
|
+
export const SchemaWhiteList = defineCapability<Type.Obj.Any[]>(`${meta.id}/capability/schema-whitelist`);
|
|
17
|
+
export const Migration = defineCapability<ObjectMigration[]>(`${meta.id}/capability/migration`);
|
|
18
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,12 +7,13 @@ 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 { meta } from '../meta';
|
|
11
|
+
|
|
10
12
|
import { ClientCapabilities } from './capabilities';
|
|
11
|
-
import { CLIENT_PLUGIN } from '../meta';
|
|
12
13
|
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactContext, {
|
|
15
|
-
id:
|
|
16
|
+
id: meta.id,
|
|
16
17
|
context: ({ children }) => {
|
|
17
18
|
const client = useCapability(ClientCapabilities.Client);
|
|
18
19
|
return <ClientProvider client={client}>{children}</ClientProvider>;
|
|
@@ -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,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
|
import { type Type } from '@dxos/echo';
|
|
7
7
|
|
|
8
8
|
import { ClientCapabilities } from './capabilities';
|
|
@@ -2,45 +2,43 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
7
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
10
8
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
10
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
12
|
-
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
13
11
|
|
|
14
|
-
import { DevicesContainer } from './DevicesContainer';
|
|
15
12
|
import { ClientPlugin } from '../ClientPlugin';
|
|
16
13
|
import { translations } from '../translations';
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
import { DevicesContainer } from './DevicesContainer';
|
|
16
|
+
|
|
17
|
+
const meta = {
|
|
19
18
|
title: 'plugins/plugin-client/DevicesContainer',
|
|
20
19
|
component: DevicesContainer,
|
|
21
20
|
decorators: [
|
|
21
|
+
withTheme,
|
|
22
22
|
withPluginManager({
|
|
23
23
|
plugins: [
|
|
24
24
|
ClientPlugin({
|
|
25
|
-
onClientInitialized: async (
|
|
25
|
+
onClientInitialized: async ({ client }) => {
|
|
26
26
|
await client.halo.createIdentity();
|
|
27
27
|
},
|
|
28
28
|
}),
|
|
29
29
|
IntentPlugin(),
|
|
30
30
|
],
|
|
31
31
|
}),
|
|
32
|
-
withTheme,
|
|
33
|
-
withLayout(),
|
|
34
32
|
],
|
|
35
33
|
parameters: {
|
|
36
34
|
layout: 'fullscreen',
|
|
37
35
|
translations: [...translations, ...shellTranslations],
|
|
38
36
|
},
|
|
39
|
-
}
|
|
37
|
+
} satisfies Meta<typeof DevicesContainer>;
|
|
40
38
|
|
|
41
39
|
export default meta;
|
|
42
40
|
|
|
43
|
-
type Story = StoryObj<typeof
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
44
42
|
|
|
45
43
|
export const Default: Story = {
|
|
46
44
|
args: {
|