@dxos/plugin-client 0.8.4-main.e098934 → 0.8.4-main.ead640a
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-ENKIVZWH.mjs → app-graph-builder-LUY3BJGC.mjs} +22 -21
- package/dist/lib/browser/app-graph-builder-LUY3BJGC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FOCQEA72.mjs → chunk-C7B7NM2G.mjs} +25 -25
- package/dist/lib/browser/chunk-C7B7NM2G.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-HLWIF3AW.mjs → chunk-TRA2GP4M.mjs} +3 -3
- package/dist/lib/browser/chunk-TRA2GP4M.mjs.map +7 -0
- package/dist/lib/browser/chunk-VTC4GIND.mjs +19 -0
- package/dist/lib/browser/chunk-VTC4GIND.mjs.map +7 -0
- package/dist/lib/browser/{client-F73MIXMT.mjs → client-5PWEJ3U6.mjs} +6 -6
- package/dist/lib/browser/{client-F73MIXMT.mjs.map → client-5PWEJ3U6.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +23 -19
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-LNPFUWU5.mjs → intent-resolver-L5NVP2G3.mjs} +10 -10
- package/dist/lib/browser/intent-resolver-L5NVP2G3.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-YJSO7JXY.mjs → migrations-MWQCO5KY.mjs} +5 -5
- package/dist/lib/browser/{migrations-YJSO7JXY.mjs.map → migrations-MWQCO5KY.mjs.map} +1 -1
- package/dist/lib/browser/{react-context-QBXCHNH2.mjs → react-context-S4SRYUVY.mjs} +7 -7
- package/dist/lib/browser/react-context-S4SRYUVY.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-3AH7INFU.mjs → react-surface-6PV7RVQN.mjs} +6 -6
- package/dist/lib/browser/{react-surface-3AH7INFU.mjs.map → react-surface-6PV7RVQN.mjs.map} +1 -1
- package/dist/lib/browser/{schema-defs-AMSX6T3B.mjs → schema-defs-E3USCMH3.mjs} +5 -5
- package/dist/lib/browser/{schema-defs-AMSX6T3B.mjs.map → schema-defs-E3USCMH3.mjs.map} +1 -1
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{app-graph-builder-D4XJCLPN.mjs → app-graph-builder-S3BVB3IU.mjs} +22 -21
- package/dist/lib/node-esm/app-graph-builder-S3BVB3IU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JG6AFSFU.mjs → chunk-4MPOOMDQ.mjs} +3 -3
- package/dist/lib/node-esm/chunk-4MPOOMDQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MUWDSQ65.mjs → chunk-H73VVAMA.mjs} +25 -25
- package/dist/lib/node-esm/chunk-H73VVAMA.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-UYDFBGYA.mjs +19 -0
- package/dist/lib/node-esm/chunk-UYDFBGYA.mjs.map +7 -0
- package/dist/lib/node-esm/{client-A7CNP37P.mjs → client-ODN7EBTY.mjs} +6 -6
- package/dist/lib/node-esm/{client-A7CNP37P.mjs.map → client-ODN7EBTY.mjs.map} +1 -1
- 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-C4INMPH7.mjs → intent-resolver-3JZIPI6F.mjs} +10 -10
- package/dist/lib/node-esm/intent-resolver-3JZIPI6F.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-UOEK7HB7.mjs → migrations-ARXHGBH5.mjs} +5 -5
- package/dist/lib/node-esm/{migrations-UOEK7HB7.mjs.map → migrations-ARXHGBH5.mjs.map} +1 -1
- package/dist/lib/node-esm/{react-context-JIH7YBFI.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-4TMUCPEW.mjs → react-surface-BOST4EH2.mjs} +6 -6
- package/dist/lib/node-esm/{react-surface-4TMUCPEW.mjs.map → react-surface-BOST4EH2.mjs.map} +1 -1
- package/dist/lib/node-esm/{schema-defs-4UTKKRTF.mjs → schema-defs-ATH5YBDR.mjs} +5 -5
- package/dist/lib/node-esm/{schema-defs-4UTKKRTF.mjs.map → schema-defs-ATH5YBDR.mjs.map} +1 -1
- 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.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +1 -3
- 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.stories.d.ts +0 -1
- 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 +0 -1
- 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 +1 -3
- 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 +0 -1
- 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 +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -35
- package/src/ClientPlugin.ts +55 -57
- package/src/capabilities/app-graph-builder.ts +16 -15
- package/src/capabilities/capabilities.ts +5 -5
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/react-context.tsx +2 -2
- package/src/components/DevicesContainer.stories.tsx +2 -5
- package/src/components/DevicesContainer.tsx +11 -14
- package/src/components/JoinDialog.tsx +3 -3
- package/src/components/ProfileContainer.stories.tsx +2 -4
- package/src/components/ProfileContainer.tsx +3 -3
- package/src/components/RecoveryCodeDialog.stories.tsx +2 -4
- package/src/components/RecoveryCodeDialog.tsx +3 -3
- package/src/components/RecoveryCredentialsContainer.stories.tsx +2 -5
- package/src/components/RecoveryCredentialsContainer.tsx +3 -3
- package/src/components/ResetDialog.stories.tsx +4 -6
- package/src/components/ResetDialog.tsx +3 -3
- package/src/events.ts +6 -6
- package/src/index.ts +4 -3
- package/src/meta.ts +1 -3
- package/src/types/schema.ts +1 -1
- package/dist/lib/browser/app-graph-builder-ENKIVZWH.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-FOCQEA72.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-HLWIF3AW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LNPFUWU5.mjs.map +0 -7
- package/dist/lib/browser/react-context-QBXCHNH2.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-D4XJCLPN.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-JG6AFSFU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MUWDSQ65.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/intent-resolver-C4INMPH7.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-JIH7YBFI.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.ead640a",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS Client",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -36,48 +36,47 @@
|
|
|
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/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/echo
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/log": "0.8.4-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-
|
|
53
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/shell": "0.8.4-main.e098934"
|
|
41
|
+
"@dxos/app-framework": "0.8.4-main.ead640a",
|
|
42
|
+
"@dxos/async": "0.8.4-main.ead640a",
|
|
43
|
+
"@dxos/config": "0.8.4-main.ead640a",
|
|
44
|
+
"@dxos/echo": "0.8.4-main.ead640a",
|
|
45
|
+
"@dxos/invariant": "0.8.4-main.ead640a",
|
|
46
|
+
"@dxos/local-storage": "0.8.4-main.ead640a",
|
|
47
|
+
"@dxos/log": "0.8.4-main.ead640a",
|
|
48
|
+
"@dxos/echo-signals": "0.8.4-main.ead640a",
|
|
49
|
+
"@dxos/plugin-graph": "0.8.4-main.ead640a",
|
|
50
|
+
"@dxos/react-client": "0.8.4-main.ead640a",
|
|
51
|
+
"@dxos/react-ui-pickers": "0.8.4-main.ead640a",
|
|
52
|
+
"@dxos/react-ui-stack": "0.8.4-main.ead640a",
|
|
53
|
+
"@dxos/react-ui-form": "0.8.4-main.ead640a",
|
|
54
|
+
"@dxos/plugin-observability": "0.8.4-main.ead640a",
|
|
55
|
+
"@dxos/util": "0.8.4-main.ead640a",
|
|
56
|
+
"@dxos/shell": "0.8.4-main.ead640a"
|
|
58
57
|
},
|
|
59
58
|
"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": "7.1.
|
|
68
|
-
"@dxos/live-object": "0.8.4-main.
|
|
69
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
59
|
+
"@effect-rx/rx-react": "0.42.4",
|
|
60
|
+
"@effect/platform": "0.92.1",
|
|
61
|
+
"@types/react": "~19.2.2",
|
|
62
|
+
"@types/react-dom": "~19.2.1",
|
|
63
|
+
"effect": "3.18.3",
|
|
64
|
+
"react": "~19.2.0",
|
|
65
|
+
"react-dom": "~19.2.0",
|
|
66
|
+
"vite": "7.1.9",
|
|
67
|
+
"@dxos/live-object": "0.8.4-main.ead640a",
|
|
68
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
69
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a",
|
|
70
|
+
"@dxos/storybook-utils": "0.8.4-main.ead640a"
|
|
72
71
|
},
|
|
73
72
|
"peerDependencies": {
|
|
74
73
|
"@effect-rx/rx-react": "^0.34.1",
|
|
75
74
|
"@effect/platform": "^0.80.12",
|
|
76
75
|
"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.
|
|
76
|
+
"react": "^19.0.0",
|
|
77
|
+
"react-dom": "^19.0.0",
|
|
78
|
+
"@dxos/react-ui": "0.8.4-main.ead640a",
|
|
79
|
+
"@dxos/react-ui-theme": "0.8.4-main.ead640a"
|
|
81
80
|
},
|
|
82
81
|
"publishConfig": {
|
|
83
82
|
"access": "public"
|
package/src/ClientPlugin.ts
CHANGED
|
@@ -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
|
+
);
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
7
8
|
|
|
8
9
|
import { createIntent } from '@dxos/app-framework';
|
|
9
10
|
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
11
|
import { ROOT_ID, createExtension, rxFromObservable } from '@dxos/plugin-graph';
|
|
11
12
|
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
+
import { meta } from '../meta';
|
|
14
15
|
import { Account, ClientAction } from '../types';
|
|
15
16
|
|
|
16
17
|
import { ClientCapabilities } from './capabilities';
|
|
@@ -19,22 +20,22 @@ export default (context: PluginContext) =>
|
|
|
19
20
|
contributes(
|
|
20
21
|
Capabilities.AppGraphBuilder,
|
|
21
22
|
createExtension({
|
|
22
|
-
id:
|
|
23
|
+
id: meta.id,
|
|
23
24
|
actions: (node) =>
|
|
24
25
|
Rx.make((get) =>
|
|
25
|
-
pipe(
|
|
26
|
+
Function.pipe(
|
|
26
27
|
get(node),
|
|
27
28
|
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
28
29
|
Option.map(() => {
|
|
29
30
|
return [
|
|
30
31
|
{
|
|
31
|
-
id: `${
|
|
32
|
+
id: `${meta.id}/open-user-account`,
|
|
32
33
|
data: async () => {
|
|
33
34
|
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
34
35
|
await dispatch(createIntent(ClientAction.ShareIdentity));
|
|
35
36
|
},
|
|
36
37
|
properties: {
|
|
37
|
-
label: ['open user account label', { ns:
|
|
38
|
+
label: ['open user account label', { ns: meta.id }],
|
|
38
39
|
icon: 'ph--user--regular',
|
|
39
40
|
disposition: 'menu',
|
|
40
41
|
keyBinding: {
|
|
@@ -52,7 +53,7 @@ export default (context: PluginContext) =>
|
|
|
52
53
|
),
|
|
53
54
|
connector: (node) =>
|
|
54
55
|
Rx.make((get) =>
|
|
55
|
-
pipe(
|
|
56
|
+
Function.pipe(
|
|
56
57
|
get(node),
|
|
57
58
|
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
58
59
|
Option.map(() => {
|
|
@@ -63,9 +64,9 @@ export default (context: PluginContext) =>
|
|
|
63
64
|
return [
|
|
64
65
|
{
|
|
65
66
|
id: Account.id,
|
|
66
|
-
type:
|
|
67
|
+
type: meta.id,
|
|
67
68
|
properties: {
|
|
68
|
-
label: ['account label', { ns:
|
|
69
|
+
label: ['account label', { ns: meta.id }],
|
|
69
70
|
icon: 'ph--user--regular',
|
|
70
71
|
disposition: 'user-account',
|
|
71
72
|
// NOTE: This currently needs to be the identity key because the fallback is generated from hex.
|
|
@@ -78,18 +79,18 @@ export default (context: PluginContext) =>
|
|
|
78
79
|
{
|
|
79
80
|
id: Account.Profile,
|
|
80
81
|
data: Account.Profile,
|
|
81
|
-
type:
|
|
82
|
+
type: meta.id,
|
|
82
83
|
properties: {
|
|
83
|
-
label: ['profile label', { ns:
|
|
84
|
+
label: ['profile label', { ns: meta.id }],
|
|
84
85
|
icon: 'ph--user--regular',
|
|
85
86
|
},
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
id: Account.Devices,
|
|
89
90
|
data: Account.Devices,
|
|
90
|
-
type:
|
|
91
|
+
type: meta.id,
|
|
91
92
|
properties: {
|
|
92
|
-
label: ['devices label', { ns:
|
|
93
|
+
label: ['devices label', { ns: meta.id }],
|
|
93
94
|
icon: 'ph--devices--regular',
|
|
94
95
|
testId: 'clientPlugin.devices',
|
|
95
96
|
},
|
|
@@ -97,9 +98,9 @@ export default (context: PluginContext) =>
|
|
|
97
98
|
{
|
|
98
99
|
id: Account.Security,
|
|
99
100
|
data: Account.Security,
|
|
100
|
-
type:
|
|
101
|
+
type: meta.id,
|
|
101
102
|
properties: {
|
|
102
|
-
label: ['security label', { ns:
|
|
103
|
+
label: ['security label', { ns: meta.id }],
|
|
103
104
|
icon: 'ph--key--regular',
|
|
104
105
|
},
|
|
105
106
|
},
|
|
@@ -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,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Function from 'effect/Function';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
Capabilities,
|
|
@@ -75,7 +75,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
|
|
|
75
75
|
resolve: async () => {
|
|
76
76
|
return {
|
|
77
77
|
intents: [
|
|
78
|
-
pipe(
|
|
78
|
+
Function.pipe(
|
|
79
79
|
createIntent(LayoutAction.SwitchWorkspace, {
|
|
80
80
|
part: 'workspace',
|
|
81
81
|
subject: Account.id,
|
|
@@ -7,13 +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 {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
import { ClientCapabilities } from './capabilities';
|
|
13
13
|
|
|
14
14
|
export default () =>
|
|
15
15
|
contributes(Capabilities.ReactContext, {
|
|
16
|
-
id:
|
|
16
|
+
id: meta.id,
|
|
17
17
|
context: ({ children }) => {
|
|
18
18
|
const client = useCapability(ClientCapabilities.Client);
|
|
19
19
|
return <ClientProvider client={client}>{children}</ClientProvider>;
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
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 { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
13
11
|
|
|
14
12
|
import { ClientPlugin } from '../ClientPlugin';
|
|
15
13
|
import { translations } from '../translations';
|
|
@@ -20,6 +18,7 @@ const meta = {
|
|
|
20
18
|
title: 'plugins/plugin-client/DevicesContainer',
|
|
21
19
|
component: DevicesContainer,
|
|
22
20
|
decorators: [
|
|
21
|
+
withTheme,
|
|
23
22
|
withPluginManager({
|
|
24
23
|
plugins: [
|
|
25
24
|
ClientPlugin({
|
|
@@ -30,8 +29,6 @@ const meta = {
|
|
|
30
29
|
IntentPlugin(),
|
|
31
30
|
],
|
|
32
31
|
}),
|
|
33
|
-
withTheme,
|
|
34
|
-
withLayout(),
|
|
35
32
|
],
|
|
36
33
|
parameters: {
|
|
37
34
|
layout: 'fullscreen',
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
|
|
24
24
|
import { hexToEmoji } from '@dxos/util';
|
|
25
25
|
|
|
26
|
-
import {
|
|
26
|
+
import { meta } from '../meta';
|
|
27
27
|
import { ClientAction } from '../types';
|
|
28
28
|
|
|
29
29
|
export type DevicesContainerProps = {
|
|
@@ -52,11 +52,11 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
52
52
|
<Clipboard.Provider>
|
|
53
53
|
<ControlPage>
|
|
54
54
|
<ControlSection
|
|
55
|
-
title={t('devices verbose label', { ns:
|
|
56
|
-
description={t('devices description', { ns:
|
|
55
|
+
title={t('devices verbose label', { ns: meta.id })}
|
|
56
|
+
description={t('devices description', { ns: meta.id })}
|
|
57
57
|
>
|
|
58
58
|
<ControlFrame>
|
|
59
|
-
<ControlFrameItem title={t('devices label', { ns:
|
|
59
|
+
<ControlFrameItem title={t('devices label', { ns: meta.id })}>
|
|
60
60
|
<List>
|
|
61
61
|
{devices.map((device: Device) => {
|
|
62
62
|
return (
|
|
@@ -73,21 +73,18 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
73
73
|
</ControlFrame>
|
|
74
74
|
</ControlSection>
|
|
75
75
|
<ControlSection
|
|
76
|
-
title={t('danger zone title', { ns:
|
|
77
|
-
description={t('danger zone description', { ns:
|
|
76
|
+
title={t('danger zone title', { ns: meta.id })}
|
|
77
|
+
description={t('danger zone description', { ns: meta.id })}
|
|
78
78
|
>
|
|
79
79
|
<ControlGroup>
|
|
80
|
-
<ControlItem
|
|
81
|
-
title={t('reset device label')}
|
|
82
|
-
description={t('reset device description', { ns: CLIENT_PLUGIN })}
|
|
83
|
-
>
|
|
80
|
+
<ControlItem title={t('reset device label')} description={t('reset device description', { ns: meta.id })}>
|
|
84
81
|
<Button variant='destructive' onClick={handleResetStorage} data-testid='devicesContainer.reset'>
|
|
85
82
|
{t('reset device label')}
|
|
86
83
|
</Button>
|
|
87
84
|
</ControlItem>
|
|
88
85
|
<ControlItem
|
|
89
86
|
title={t('recover identity label')}
|
|
90
|
-
description={t('recover identity description', { ns:
|
|
87
|
+
description={t('recover identity description', { ns: meta.id })}
|
|
91
88
|
>
|
|
92
89
|
<Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>
|
|
93
90
|
{t('recover identity label')}
|
|
@@ -95,7 +92,7 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
95
92
|
</ControlItem>
|
|
96
93
|
<ControlItem
|
|
97
94
|
title={t('join new identity label')}
|
|
98
|
-
description={t('join new identity description', { ns:
|
|
95
|
+
description={t('join new identity description', { ns: meta.id })}
|
|
99
96
|
>
|
|
100
97
|
<Button variant='destructive' onClick={handleJoinNewIdentity} data-testid='devicesContainer.joinExisting'>
|
|
101
98
|
{t('join new identity label')}
|
|
@@ -178,7 +175,7 @@ const InvitationSection = ({
|
|
|
178
175
|
onInvitationDone = () => {},
|
|
179
176
|
onInvitationCreate = () => {},
|
|
180
177
|
}: InvitationComponentProps) => {
|
|
181
|
-
const { t } = useTranslation(
|
|
178
|
+
const { t } = useTranslation(meta.id);
|
|
182
179
|
const activeView =
|
|
183
180
|
state < 0
|
|
184
181
|
? 'init'
|
|
@@ -225,7 +222,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
225
222
|
const emoji = hexToEmoji(id);
|
|
226
223
|
return (
|
|
227
224
|
<>
|
|
228
|
-
<p className='text-description'>{t('qr code description', { ns:
|
|
225
|
+
<p className='text-description'>{t('qr code description', { ns: meta.id })}</p>
|
|
229
226
|
<div role='group' className='grid grid-cols-[1fr_min-content] mlb-2 gap-2'>
|
|
230
227
|
<div role='none' className='is-full aspect-square relative text-description'>
|
|
231
228
|
<QR
|
|
@@ -10,14 +10,14 @@ import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
|
10
10
|
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { meta } from '../meta';
|
|
14
14
|
import { ClientAction } from '../types';
|
|
15
15
|
|
|
16
|
-
export const JOIN_DIALOG = `${
|
|
16
|
+
export const JOIN_DIALOG = `${meta.id}/JoinDialog`;
|
|
17
17
|
|
|
18
18
|
export const JoinDialog = (props: JoinPanelProps) => {
|
|
19
19
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
-
const { t } = useTranslation(
|
|
20
|
+
const { t } = useTranslation(meta.id);
|
|
21
21
|
|
|
22
22
|
const handleCancelResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ShareIdentity)), [dispatch]);
|
|
23
23
|
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
7
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
|
-
import {
|
|
8
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
9
|
|
|
12
10
|
import { translations } from '../translations';
|
|
13
11
|
|
|
@@ -16,7 +14,7 @@ import { ProfileContainer } from './ProfileContainer';
|
|
|
16
14
|
const meta = {
|
|
17
15
|
title: 'plugins/plugin-client/ProfileContainer',
|
|
18
16
|
component: ProfileContainer,
|
|
19
|
-
decorators: [withClientProvider({ createIdentity: true })
|
|
17
|
+
decorators: [withTheme, withClientProvider({ createIdentity: true })],
|
|
20
18
|
parameters: {
|
|
21
19
|
layout: 'fullscreen',
|
|
22
20
|
translations,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { debounce } from '@dxos/async';
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';
|
|
21
21
|
import { hexToEmoji, hexToHue } from '@dxos/util';
|
|
22
22
|
|
|
23
|
-
import {
|
|
23
|
+
import { meta } from '../meta';
|
|
24
24
|
|
|
25
25
|
// TODO(thure): Factor out?
|
|
26
26
|
const getDefaultHueValue = (identity: Identity | null) => hexToHue(identity?.identityKey.toHex() ?? '0');
|
|
@@ -29,7 +29,7 @@ const getHueValue = (identity: Identity | null) => identity?.profile?.data?.hue
|
|
|
29
29
|
const getEmojiValue = (identity: Identity | null) => identity?.profile?.data?.emoji || getDefaultEmojiValue(identity);
|
|
30
30
|
|
|
31
31
|
export const ProfileContainer = () => {
|
|
32
|
-
const { t } = useTranslation(
|
|
32
|
+
const { t } = useTranslation(meta.id);
|
|
33
33
|
const client = useClient();
|
|
34
34
|
const identity = useIdentity();
|
|
35
35
|
const [displayName, setDisplayNameDirectly] = useState(identity?.profile?.displayName ?? '');
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { useClient } from '@dxos/react-client';
|
|
11
9
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
12
10
|
import { AlertDialog, useAsyncEffect } from '@dxos/react-ui';
|
|
13
|
-
import {
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
|
|
15
13
|
import { translations } from '../translations';
|
|
16
14
|
|
|
@@ -37,7 +35,7 @@ const meta = {
|
|
|
37
35
|
title: 'plugins/plugin-client/RecoveryCodeDialog',
|
|
38
36
|
component: RecoveryCodeDialog as any,
|
|
39
37
|
render: DefaultStory,
|
|
40
|
-
decorators: [withClientProvider({ createIdentity: true })
|
|
38
|
+
decorators: [withTheme, withClientProvider({ createIdentity: true })],
|
|
41
39
|
parameters: {
|
|
42
40
|
layout: 'fullscreen',
|
|
43
41
|
translations,
|
|
@@ -6,16 +6,16 @@ import React, { useCallback, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { meta } from '../meta';
|
|
10
10
|
|
|
11
|
-
export const RECOVERY_CODE_DIALOG = `${
|
|
11
|
+
export const RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;
|
|
12
12
|
|
|
13
13
|
export type RecoveryCodeDialogProps = {
|
|
14
14
|
code: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
18
|
-
const { t } = useTranslation(
|
|
18
|
+
const { t } = useTranslation(meta.id);
|
|
19
19
|
const [confirmation, setConfirmation] = useState(false);
|
|
20
20
|
|
|
21
21
|
const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
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';
|
|
11
|
-
import {
|
|
9
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
10
|
|
|
13
11
|
import { ClientPlugin } from '../ClientPlugin';
|
|
14
12
|
import { translations } from '../translations';
|
|
@@ -19,6 +17,7 @@ const meta = {
|
|
|
19
17
|
title: 'plugins/plugin-client/RecoveryCredentialsContainer',
|
|
20
18
|
component: RecoveryCredentialsContainer,
|
|
21
19
|
decorators: [
|
|
20
|
+
withTheme,
|
|
22
21
|
withPluginManager({
|
|
23
22
|
plugins: [
|
|
24
23
|
ClientPlugin({
|
|
@@ -29,8 +28,6 @@ const meta = {
|
|
|
29
28
|
IntentPlugin(),
|
|
30
29
|
],
|
|
31
30
|
}),
|
|
32
|
-
withTheme,
|
|
33
|
-
withLayout(),
|
|
34
31
|
],
|
|
35
32
|
parameters: {
|
|
36
33
|
layout: 'fullscreen',
|
|
@@ -9,13 +9,13 @@ import { useCredentials } from '@dxos/react-client/halo';
|
|
|
9
9
|
import { Icon, IconButton, List, ListItem, Message, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { ControlGroup, ControlItem, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { meta } from '../meta';
|
|
13
13
|
import { ClientAction } from '../types';
|
|
14
14
|
|
|
15
|
-
export const MANAGE_CREDENTIALS_DIALOG = `${
|
|
15
|
+
export const MANAGE_CREDENTIALS_DIALOG = `${meta.id}/ManageCredentialsDialog`;
|
|
16
16
|
|
|
17
17
|
export const RecoveryCredentialsContainer = () => {
|
|
18
|
-
const { t } = useTranslation(
|
|
18
|
+
const { t } = useTranslation(meta.id);
|
|
19
19
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
20
|
const credentials = useCredentials();
|
|
21
21
|
const recoveryCredentials = credentials.filter(
|