@dxos/plugin-client 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
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-WAS4YZNA.mjs +119 -0
- package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OLUST5AO.mjs → chunk-4PLF3BEB.mjs} +2 -2
- package/dist/lib/browser/{chunk-7DPLXOMO.mjs → chunk-AN7FJKIJ.mjs} +21 -4
- package/dist/lib/browser/{chunk-7DPLXOMO.mjs.map → chunk-AN7FJKIJ.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-XK4HM5M7.mjs → chunk-BGY6BSUC.mjs} +3 -2
- package/dist/lib/browser/{chunk-XK4HM5M7.mjs.map → chunk-BGY6BSUC.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-NHIL4T3L.mjs → chunk-MCEXD5XH.mjs} +1 -1
- package/dist/lib/browser/{chunk-NHIL4T3L.mjs.map → chunk-MCEXD5XH.mjs.map} +2 -2
- package/dist/lib/browser/chunk-XZ4TQC56.mjs +619 -0
- package/dist/lib/browser/chunk-XZ4TQC56.mjs.map +7 -0
- package/dist/lib/browser/{client-UUGITHCW.mjs → client-LV67Q3R7.mjs} +5 -5
- package/dist/lib/browser/{client-UUGITHCW.mjs.map → client-LV67Q3R7.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +51 -22
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-AIUHL34E.mjs → intent-resolver-NCISOZW4.mjs} +65 -27
- package/dist/lib/browser/intent-resolver-NCISOZW4.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-XODC625X.mjs → migrations-3DWFOL5Q.mjs} +3 -3
- package/dist/lib/browser/{react-context-JBD7Y3SN.mjs → react-context-WEH7SL4I.mjs} +3 -3
- package/dist/lib/browser/react-surface-J7SZR2J6.mjs +66 -0
- package/dist/lib/browser/react-surface-J7SZR2J6.mjs.map +7 -0
- package/dist/lib/browser/{schema-Y7ZNXYSL.mjs → schema-JQAT6Q7S.mjs} +3 -3
- package/dist/lib/browser/types.mjs +4 -2
- package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs +130 -0
- package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs.map +7 -0
- package/dist/lib/node/chunk-3JE5BFCT.cjs +644 -0
- package/dist/lib/node/chunk-3JE5BFCT.cjs.map +7 -0
- package/dist/lib/node/{chunk-OIFPM5ZW.cjs → chunk-DJKWB5L6.cjs} +4 -4
- package/dist/lib/node/{chunk-OIFPM5ZW.cjs.map → chunk-DJKWB5L6.cjs.map} +2 -2
- package/dist/lib/node/{chunk-TREVKZCJ.cjs → chunk-FROKBEVH.cjs} +25 -7
- package/dist/lib/node/chunk-FROKBEVH.cjs.map +7 -0
- package/dist/lib/node/{chunk-FR2K56EV.cjs → chunk-W64EOF2B.cjs} +10 -10
- package/dist/lib/node/{chunk-T4K27K2F.cjs → chunk-ZVQIICEN.cjs} +9 -8
- package/dist/lib/node/{chunk-T4K27K2F.cjs.map → chunk-ZVQIICEN.cjs.map} +3 -3
- package/dist/lib/node/{client-5BHSU35T.cjs → client-BKTGRBYM.cjs} +9 -9
- package/dist/lib/node/{client-5BHSU35T.cjs.map → client-BKTGRBYM.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +70 -41
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/{intent-resolver-PWCHHNV3.cjs → intent-resolver-U2576ALY.cjs} +81 -44
- package/dist/lib/node/intent-resolver-U2576ALY.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{migrations-YCBZUPWO.cjs → migrations-TGNI4FVL.cjs} +8 -8
- package/dist/lib/node/{react-context-MPHNGZHT.cjs → react-context-SF3M3YLR.cjs} +8 -8
- package/dist/lib/node/{react-surface-TPISDIHR.cjs → react-surface-BSTIXMER.cjs} +34 -26
- package/dist/lib/node/react-surface-BSTIXMER.cjs.map +7 -0
- package/dist/lib/node/{schema-NMMCMK64.cjs → schema-INQ72F54.cjs} +8 -8
- package/dist/lib/node/types.cjs +5 -3
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs +120 -0
- package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QJMF2MWP.mjs → chunk-AD5W5QCQ.mjs} +21 -4
- package/dist/lib/node-esm/{chunk-QJMF2MWP.mjs.map → chunk-AD5W5QCQ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-XLLNVLWU.mjs → chunk-BP56BGZR.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-HO7WDE7C.mjs → chunk-HM7VB4ZV.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-HO7WDE7C.mjs.map → chunk-HM7VB4ZV.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-3OU2ZXLK.mjs → chunk-K3KGGSJZ.mjs} +3 -2
- package/dist/lib/node-esm/{chunk-3OU2ZXLK.mjs.map → chunk-K3KGGSJZ.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs +620 -0
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs.map +7 -0
- package/dist/lib/node-esm/{client-ZDGFGLX4.mjs → client-QQD6WFOB.mjs} +5 -5
- package/dist/lib/node-esm/{client-ZDGFGLX4.mjs.map → client-QQD6WFOB.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +51 -22
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/{intent-resolver-FIXGPH7C.mjs → intent-resolver-G25U4UGI.mjs} +65 -27
- package/dist/lib/node-esm/intent-resolver-G25U4UGI.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-VIEIPYJW.mjs → migrations-IVGATGZR.mjs} +3 -3
- package/dist/lib/node-esm/{react-context-KUEOXWWK.mjs → react-context-EAKKTE5A.mjs} +3 -3
- package/dist/lib/node-esm/react-surface-ZPI7T4EM.mjs +67 -0
- package/dist/lib/node-esm/react-surface-ZPI7T4EM.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-NE5IYLMD.mjs → schema-OK7HY3JJ.mjs} +3 -3
- package/dist/lib/node-esm/types.mjs +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +4 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -3
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.d.ts +5 -0
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/components/DevicesContainer.stories.d.ts +8 -0
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProfileContainer.d.ts +3 -0
- package/dist/types/src/components/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/components/ProfileContainer.stories.d.ts +8 -0
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -0
- 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/RecoveryCredentialsContainer.d.ts +4 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +8 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResetDialog.d.ts +7 -0
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/components/ResetDialog.stories.d.ts +10 -0
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +17 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +26 -19
- package/src/ClientPlugin.ts +2 -2
- package/src/capabilities/app-graph-builder.ts +62 -6
- package/src/capabilities/capabilities.ts +1 -0
- package/src/capabilities/client.ts +1 -1
- package/src/capabilities/intent-resolver.ts +68 -23
- package/src/capabilities/react-surface.tsx +32 -24
- package/src/components/DevicesContainer.stories.tsx +45 -0
- package/src/components/DevicesContainer.tsx +270 -0
- package/src/components/ProfileContainer.stories.tsx +29 -0
- package/src/components/ProfileContainer.tsx +163 -0
- package/src/components/RecoveryCodeDialog.stories.tsx +2 -2
- package/src/components/RecoveryCodeDialog.tsx +1 -2
- package/src/components/{ManageCredentialsDialog.stories.tsx → RecoveryCredentialsContainer.stories.tsx} +4 -17
- package/src/components/RecoveryCredentialsContainer.tsx +74 -0
- package/src/components/ResetDialog.stories.tsx +47 -0
- package/src/components/ResetDialog.tsx +49 -0
- package/src/components/index.ts +4 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +45 -9
- package/src/types.ts +20 -1
- package/dist/lib/browser/app-graph-builder-ON64R7SO.mjs +0 -44
- package/dist/lib/browser/app-graph-builder-ON64R7SO.mjs.map +0 -7
- package/dist/lib/browser/chunk-HNJZ74DZ.mjs +0 -281
- package/dist/lib/browser/chunk-HNJZ74DZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AIUHL34E.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QGPWIUFR.mjs +0 -57
- package/dist/lib/browser/react-surface-QGPWIUFR.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-RW7ESEX3.cjs +0 -58
- package/dist/lib/node/app-graph-builder-RW7ESEX3.cjs.map +0 -7
- package/dist/lib/node/chunk-TREVKZCJ.cjs.map +0 -7
- package/dist/lib/node/chunk-UTG3UR3N.cjs +0 -309
- package/dist/lib/node/chunk-UTG3UR3N.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-PWCHHNV3.cjs.map +0 -7
- package/dist/lib/node/react-surface-TPISDIHR.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TDYRWNI7.mjs +0 -45
- package/dist/lib/node-esm/app-graph-builder-TDYRWNI7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SHJBU4QR.mjs +0 -282
- package/dist/lib/node-esm/chunk-SHJBU4QR.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FIXGPH7C.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBROL4VH.mjs +0 -58
- package/dist/lib/node-esm/react-surface-KBROL4VH.mjs.map +0 -7
- package/dist/types/src/components/IdentityDialog.d.ts +0 -5
- package/dist/types/src/components/IdentityDialog.d.ts.map +0 -1
- package/dist/types/src/components/ManageCredentialsDialog.d.ts +0 -4
- package/dist/types/src/components/ManageCredentialsDialog.d.ts.map +0 -1
- package/dist/types/src/components/ManageCredentialsDialog.stories.d.ts +0 -8
- package/dist/types/src/components/ManageCredentialsDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoverySetupDialog.d.ts +0 -4
- package/dist/types/src/components/RecoverySetupDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoverySetupDialog.stories.d.ts +0 -8
- package/dist/types/src/components/RecoverySetupDialog.stories.d.ts.map +0 -1
- package/src/components/IdentityDialog.tsx +0 -75
- package/src/components/ManageCredentialsDialog.tsx +0 -64
- package/src/components/RecoverySetupDialog.stories.tsx +0 -77
- package/src/components/RecoverySetupDialog.tsx +0 -52
- /package/dist/lib/browser/{chunk-OLUST5AO.mjs.map → chunk-4PLF3BEB.mjs.map} +0 -0
- /package/dist/lib/browser/{migrations-XODC625X.mjs.map → migrations-3DWFOL5Q.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-JBD7Y3SN.mjs.map → react-context-WEH7SL4I.mjs.map} +0 -0
- /package/dist/lib/browser/{schema-Y7ZNXYSL.mjs.map → schema-JQAT6Q7S.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-FR2K56EV.cjs.map → chunk-W64EOF2B.cjs.map} +0 -0
- /package/dist/lib/node/{migrations-YCBZUPWO.cjs.map → migrations-TGNI4FVL.cjs.map} +0 -0
- /package/dist/lib/node/{react-context-MPHNGZHT.cjs.map → react-context-SF3M3YLR.cjs.map} +0 -0
- /package/dist/lib/node/{schema-NMMCMK64.cjs.map → schema-INQ72F54.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-XLLNVLWU.mjs.map → chunk-BP56BGZR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{migrations-VIEIPYJW.mjs.map → migrations-IVGATGZR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-context-KUEOXWWK.mjs.map → react-context-EAKKTE5A.mjs.map} +0 -0
- /package/dist/lib/node-esm/{schema-NE5IYLMD.mjs.map → schema-OK7HY3JJ.mjs.map} +0 -0
|
@@ -26,49 +26,57 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var react_surface_BSTIXMER_exports = {};
|
|
30
|
+
__export(react_surface_BSTIXMER_exports, {
|
|
31
31
|
default: () => react_surface_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(react_surface_BSTIXMER_exports);
|
|
34
|
+
var import_chunk_3JE5BFCT = require("./chunk-3JE5BFCT.cjs");
|
|
35
|
+
var import_chunk_FROKBEVH = require("./chunk-FROKBEVH.cjs");
|
|
36
|
+
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_app_framework = require("@dxos/app-framework");
|
|
39
|
-
var react_surface_default = ({ createInvitationUrl }) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
39
|
+
var react_surface_default = ({ createInvitationUrl, onReset }) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.ReactSurface, [
|
|
40
40
|
(0, import_app_framework.createSurface)({
|
|
41
|
-
id:
|
|
42
|
-
role: "
|
|
43
|
-
filter: (data) => data.
|
|
44
|
-
component: (
|
|
45
|
-
|
|
41
|
+
id: import_chunk_FROKBEVH.Account.Profile,
|
|
42
|
+
role: "article",
|
|
43
|
+
filter: (data) => data.subject === import_chunk_FROKBEVH.Account.Profile,
|
|
44
|
+
component: () => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.ProfileContainer, null)
|
|
45
|
+
}),
|
|
46
|
+
(0, import_app_framework.createSurface)({
|
|
47
|
+
id: import_chunk_FROKBEVH.Account.Devices,
|
|
48
|
+
role: "article",
|
|
49
|
+
filter: (data) => data.subject === import_chunk_FROKBEVH.Account.Devices,
|
|
50
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.DevicesContainer, {
|
|
46
51
|
createInvitationUrl
|
|
47
52
|
})
|
|
48
53
|
}),
|
|
49
54
|
(0, import_app_framework.createSurface)({
|
|
50
|
-
id:
|
|
51
|
-
role: "
|
|
52
|
-
filter: (data) => data.
|
|
53
|
-
component: (
|
|
55
|
+
id: import_chunk_FROKBEVH.Account.Security,
|
|
56
|
+
role: "article",
|
|
57
|
+
filter: (data) => data.subject === import_chunk_FROKBEVH.Account.Security,
|
|
58
|
+
component: () => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.RecoveryCredentialsContainer, null)
|
|
54
59
|
}),
|
|
55
60
|
(0, import_app_framework.createSurface)({
|
|
56
|
-
id:
|
|
61
|
+
id: import_chunk_3JE5BFCT.JOIN_DIALOG,
|
|
57
62
|
role: "dialog",
|
|
58
|
-
filter: (data) => data.component ===
|
|
59
|
-
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
filter: (data) => data.component === import_chunk_3JE5BFCT.JOIN_DIALOG,
|
|
64
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.JoinDialog, data.props)
|
|
60
65
|
}),
|
|
61
66
|
(0, import_app_framework.createSurface)({
|
|
62
|
-
id:
|
|
67
|
+
id: import_chunk_3JE5BFCT.RECOVERY_CODE_DIALOG,
|
|
63
68
|
role: "dialog",
|
|
64
|
-
filter: (data) => data.component ===
|
|
65
|
-
component: () => /* @__PURE__ */ import_react.default.createElement(
|
|
69
|
+
filter: (data) => data.component === import_chunk_3JE5BFCT.RECOVERY_CODE_DIALOG,
|
|
70
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.RecoveryCodeDialog, data.props)
|
|
66
71
|
}),
|
|
67
72
|
(0, import_app_framework.createSurface)({
|
|
68
|
-
id:
|
|
73
|
+
id: import_chunk_3JE5BFCT.RESET_DIALOG,
|
|
69
74
|
role: "dialog",
|
|
70
|
-
filter: (data) => data.component ===
|
|
71
|
-
component: () => /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
filter: (data) => data.component === import_chunk_3JE5BFCT.RESET_DIALOG,
|
|
76
|
+
component: ({ data }) => /* @__PURE__ */ import_react.default.createElement(import_chunk_3JE5BFCT.ResetDialog, {
|
|
77
|
+
...data.props,
|
|
78
|
+
onReset
|
|
79
|
+
})
|
|
72
80
|
})
|
|
73
81
|
]);
|
|
74
|
-
//# sourceMappingURL=react-surface-
|
|
82
|
+
//# sourceMappingURL=react-surface-BSTIXMER.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, Capabilities, contributes } from '@dxos/app-framework';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport {\n DevicesContainer,\n JOIN_DIALOG,\n JoinDialog,\n ProfileContainer,\n RECOVERY_CODE_DIALOG,\n RecoveryCodeDialog,\n RecoveryCredentialsContainer,\n RESET_DIALOG,\n ResetDialog,\n type ResetDialogProps,\n type RecoveryCodeDialogProps,\n} from '../components';\nimport { Account, type ClientPluginOptions } from '../types';\n\ntype ReactSurfaceOptions = Pick<ClientPluginOptions, 'onReset'> & {\n createInvitationUrl: (invitationCode: string) => string;\n};\n\nexport default ({ createInvitationUrl, onReset }: ReactSurfaceOptions) =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: Account.Profile,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Profile,\n component: () => <ProfileContainer />,\n }),\n createSurface({\n id: Account.Devices,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Devices,\n component: ({ data }) => <DevicesContainer createInvitationUrl={createInvitationUrl} />,\n }),\n createSurface({\n id: Account.Security,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Security,\n component: () => <RecoveryCredentialsContainer />,\n }),\n createSurface({\n id: JOIN_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: JoinPanelProps } => data.component === JOIN_DIALOG,\n component: ({ data }) => <JoinDialog {...data.props} />,\n }),\n createSurface({\n id: RECOVERY_CODE_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: RecoveryCodeDialogProps } => data.component === RECOVERY_CODE_DIALOG,\n component: ({ data }) => <RecoveryCodeDialog {...data.props} />,\n }),\n createSurface({\n id: RESET_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: ResetDialogProps } => data.component === RESET_DIALOG,\n component: ({ data }) => <ResetDialog {...data.props} onReset={onReset} />,\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAAyD;AAsBzD,IAAA,wBAAe,CAAC,EAAEA,qBAAqBC,QAAO,UAC5CC,kCAAYC,kCAAaC,cAAc;MACrCC,oCAAc;IACZC,IAAIC,8BAAQC;IACZC,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,8BAAQC;IACxDK,WAAW,MAAM,6BAAAC,QAAA,cAACC,wCAAAA,IAAAA;EACpB,CAAA;MACAV,oCAAc;IACZC,IAAIC,8BAAQS;IACZP,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,8BAAQS;IACxDH,WAAW,CAAC,EAAEF,KAAI,MAAO,6BAAAG,QAAA,cAACG,wCAAAA;MAAiBjB;;EAC7C,CAAA;MACAK,oCAAc;IACZC,IAAIC,8BAAQW;IACZT,MAAM;IACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,8BAAQW;IACxDL,WAAW,MAAM,6BAAAC,QAAA,cAACK,oDAAAA,IAAAA;EACpB,CAAA;MACAd,oCAAc;IACZC,IAAIc;IACJX,MAAM;IACNC,QAAQ,CAACC,SAA4CA,KAAKE,cAAcO;IACxEP,WAAW,CAAC,EAAEF,KAAI,MAAO,6BAAAG,QAAA,cAACO,kCAAeV,KAAKW,KAAK;EACrD,CAAA;MACAjB,oCAAc;IACZC,IAAIiB;IACJd,MAAM;IACNC,QAAQ,CAACC,SAAqDA,KAAKE,cAAcU;IACjFV,WAAW,CAAC,EAAEF,KAAI,MAAO,6BAAAG,QAAA,cAACU,0CAAuBb,KAAKW,KAAK;EAC7D,CAAA;MACAjB,oCAAc;IACZC,IAAImB;IACJhB,MAAM;IACNC,QAAQ,CAACC,SAA8CA,KAAKE,cAAcY;IAC1EZ,WAAW,CAAC,EAAEF,KAAI,MAAO,6BAAAG,QAAA,cAACY,mCAAAA;MAAa,GAAGf,KAAKW;MAAOrB;;EACxD,CAAA;CACD;",
|
|
6
|
+
"names": ["createInvitationUrl", "onReset", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "Account", "Profile", "role", "filter", "data", "subject", "component", "React", "ProfileContainer", "Devices", "DevicesContainer", "Security", "RecoveryCredentialsContainer", "JOIN_DIALOG", "JoinDialog", "props", "RECOVERY_CODE_DIALOG", "RecoveryCodeDialog", "RESET_DIALOG", "ResetDialog"]
|
|
7
|
+
}
|
|
@@ -16,24 +16,24 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var schema_INQ72F54_exports = {};
|
|
20
|
+
__export(schema_INQ72F54_exports, {
|
|
21
21
|
default: () => schema_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(schema_INQ72F54_exports);
|
|
24
|
+
var import_chunk_ZVQIICEN = require("./chunk-ZVQIICEN.cjs");
|
|
25
|
+
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
26
26
|
var import_signals_core = require("@preact/signals-core");
|
|
27
27
|
var import_app_framework = require("@dxos/app-framework");
|
|
28
28
|
var schema_default = (context) => {
|
|
29
|
-
const client = context.requestCapability(
|
|
29
|
+
const client = context.requestCapability(import_chunk_ZVQIICEN.ClientCapabilities.Client);
|
|
30
30
|
let previous = [];
|
|
31
31
|
const unsubscribe = (0, import_signals_core.effect)(() => {
|
|
32
|
-
const schemas = Array.from(new Set(context.requestCapabilities(
|
|
32
|
+
const schemas = Array.from(new Set(context.requestCapabilities(import_chunk_ZVQIICEN.ClientCapabilities.Schema).flat()));
|
|
33
33
|
const newSchemas = schemas.filter((schema) => !previous.includes(schema));
|
|
34
34
|
previous = schemas;
|
|
35
35
|
client.addTypes(newSchemas);
|
|
36
36
|
});
|
|
37
37
|
return (0, import_app_framework.contributes)(import_app_framework.Capabilities.Null, null, () => unsubscribe());
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=schema-
|
|
39
|
+
//# sourceMappingURL=schema-INQ72F54.cjs.map
|
package/dist/lib/node/types.cjs
CHANGED
|
@@ -18,13 +18,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var types_exports = {};
|
|
20
20
|
__export(types_exports, {
|
|
21
|
-
|
|
21
|
+
Account: () => import_chunk_FROKBEVH.Account,
|
|
22
|
+
ClientAction: () => import_chunk_FROKBEVH.ClientAction
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(types_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_FROKBEVH = require("./chunk-FROKBEVH.cjs");
|
|
26
|
+
var import_chunk_DJKWB5L6 = require("./chunk-DJKWB5L6.cjs");
|
|
26
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
28
|
0 && (module.exports = {
|
|
29
|
+
Account,
|
|
28
30
|
ClientAction
|
|
29
31
|
});
|
|
30
32
|
//# sourceMappingURL=types.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["types.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n ClientAction\n} from \"./chunk-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n Account,\n ClientAction\n} from \"./chunk-FROKBEVH.cjs\";\nimport \"./chunk-DJKWB5L6.cjs\";\nexport {\n Account,\n ClientAction\n};\n//# sourceMappingURL=types.cjs.map\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAGO;AACP,4BAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ClientCapabilities
|
|
4
|
+
} from "./chunk-K3KGGSJZ.mjs";
|
|
5
|
+
import {
|
|
6
|
+
Account,
|
|
7
|
+
ClientAction
|
|
8
|
+
} from "./chunk-AD5W5QCQ.mjs";
|
|
9
|
+
import {
|
|
10
|
+
CLIENT_PLUGIN
|
|
11
|
+
} from "./chunk-HM7VB4ZV.mjs";
|
|
12
|
+
|
|
13
|
+
// packages/plugins/plugin-client/src/capabilities/app-graph-builder.ts
|
|
14
|
+
import { createIntent } from "@dxos/app-framework";
|
|
15
|
+
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
16
|
+
import { createExtension, toSignal } from "@dxos/plugin-graph";
|
|
17
|
+
import { ConnectionState } from "@dxos/react-client/mesh";
|
|
18
|
+
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
19
|
+
id: CLIENT_PLUGIN,
|
|
20
|
+
filter: (node) => node.id === "root",
|
|
21
|
+
actions: () => [
|
|
22
|
+
{
|
|
23
|
+
id: `${CLIENT_PLUGIN}/open-user-account`,
|
|
24
|
+
data: async () => {
|
|
25
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
26
|
+
await dispatch(createIntent(ClientAction.ShareIdentity));
|
|
27
|
+
},
|
|
28
|
+
properties: {
|
|
29
|
+
label: [
|
|
30
|
+
"open user account label",
|
|
31
|
+
{
|
|
32
|
+
ns: CLIENT_PLUGIN
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
icon: "ph--user--regular",
|
|
36
|
+
keyBinding: {
|
|
37
|
+
macos: "meta+shift+.",
|
|
38
|
+
// TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
|
|
39
|
+
windows: "alt+shift+.",
|
|
40
|
+
linux: "alt+shift+>"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
connector: () => {
|
|
46
|
+
const client = context.requestCapability(ClientCapabilities.Client);
|
|
47
|
+
const identity = client.halo.identity.get();
|
|
48
|
+
const status = toSignal((onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe, () => client.mesh.networkStatus.get());
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
id: Account.id,
|
|
52
|
+
type: CLIENT_PLUGIN,
|
|
53
|
+
properties: {
|
|
54
|
+
label: [
|
|
55
|
+
"account label",
|
|
56
|
+
{
|
|
57
|
+
ns: CLIENT_PLUGIN
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
icon: "ph--user--regular",
|
|
61
|
+
disposition: "user-account",
|
|
62
|
+
// NOTE: This currently needs to be the identity key because the fallback is generated from hex.
|
|
63
|
+
userId: identity?.identityKey.toHex(),
|
|
64
|
+
hue: identity?.profile?.data?.hue,
|
|
65
|
+
emoji: identity?.profile?.data?.emoji,
|
|
66
|
+
status: status?.swarm === ConnectionState.OFFLINE ? "error" : "active"
|
|
67
|
+
},
|
|
68
|
+
nodes: [
|
|
69
|
+
{
|
|
70
|
+
id: Account.Profile,
|
|
71
|
+
data: Account.Profile,
|
|
72
|
+
type: CLIENT_PLUGIN,
|
|
73
|
+
properties: {
|
|
74
|
+
label: [
|
|
75
|
+
"profile label",
|
|
76
|
+
{
|
|
77
|
+
ns: CLIENT_PLUGIN
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
icon: "ph--user--regular"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: Account.Devices,
|
|
85
|
+
data: Account.Devices,
|
|
86
|
+
type: CLIENT_PLUGIN,
|
|
87
|
+
properties: {
|
|
88
|
+
label: [
|
|
89
|
+
"devices label",
|
|
90
|
+
{
|
|
91
|
+
ns: CLIENT_PLUGIN
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
icon: "ph--devices--regular",
|
|
95
|
+
testId: "clientPlugin.devices"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: Account.Security,
|
|
100
|
+
data: Account.Security,
|
|
101
|
+
type: CLIENT_PLUGIN,
|
|
102
|
+
properties: {
|
|
103
|
+
label: [
|
|
104
|
+
"security label",
|
|
105
|
+
{
|
|
106
|
+
ns: CLIENT_PLUGIN
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
icon: "ph--key--regular"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
}));
|
|
117
|
+
export {
|
|
118
|
+
app_graph_builder_default as default
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=app-graph-builder-KIN6NWFI.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, toSignal, type Node } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { ClientCapabilities } from './capabilities';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: `${CLIENT_PLUGIN}/open-user-account`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\n },\n properties: {\n label: ['open user account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ],\n connector: () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n const status = toSignal(\n (onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe,\n () => client.mesh.networkStatus.get(),\n );\n\n return [\n {\n id: Account.id,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status?.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['profile label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['devices label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['security label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n },\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,cAAcC,mBAAwC;AAC/D,SAASC,iBAAiBC,gBAA2B;AACrD,SAASC,uBAAuB;AAMhC,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAI,GAAGC,aAAAA;MACPI,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,aAAaY,gBAAgB;AAC7F,cAAMF,SAASG,aAAaC,aAAaC,aAAa,CAAA;MACxD;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAId;UAAc;;QACvDe,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;MACF;IACF;;EAEFC,WAAW,MAAA;AACT,UAAMC,SAAS3B,QAAQa,kBAAkBe,mBAAmBC,MAAM;AAClE,UAAMC,WAAWH,OAAOI,KAAKD,SAASE,IAAG;AACzC,UAAMC,SAASC,SACb,CAACC,aAAaR,OAAOS,KAAKC,cAAcC,UAAU,MAAMH,SAAAA,CAAAA,EAAYI,aACpE,MAAMZ,OAAOS,KAAKC,cAAcL,IAAG,CAAA;AAGrC,WAAO;MACL;QACE3B,IAAImC,QAAQnC;QACZoC,MAAMnC;QACNY,YAAY;UACVC,OAAO;YAAC;YAAiB;cAAEC,IAAId;YAAc;;UAC7Ce,MAAM;UACNqB,aAAa;;UAEbC,QAAQb,UAAUc,YAAYC,MAAAA;UAC9BC,KAAKhB,UAAUiB,SAASrC,MAAMoC;UAC9BE,OAAOlB,UAAUiB,SAASrC,MAAMsC;UAChCf,QAAQA,QAAQgB,UAAUC,gBAAgBC,UAAU,UAAU;QAChE;QACAC,OAAO;UACL;YACE/C,IAAImC,QAAQa;YACZ3C,MAAM8B,QAAQa;YACdZ,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;YACR;UACF;UACA;YACEhB,IAAImC,QAAQc;YACZ5C,MAAM8B,QAAQc;YACdb,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;cACNkC,QAAQ;YACV;UACF;UACA;YACElD,IAAImC,QAAQgB;YACZ9C,MAAM8B,QAAQgB;YACdf,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAId;gBAAc;;cAC9Ce,MAAM;YACR;UACF;;MAEJ;;EAEJ;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["createIntent", "Capabilities", "contributes", "createExtension", "toSignal", "ConnectionState", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "connector", "client", "ClientCapabilities", "Client", "identity", "halo", "get", "status", "toSignal", "onChange", "mesh", "networkStatus", "subscribe", "unsubscribe", "Account", "type", "disposition", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
CLIENT_PLUGIN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HM7VB4ZV.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-client/src/types.ts
|
|
7
7
|
import { S } from "@dxos/echo-schema";
|
|
@@ -51,7 +51,7 @@ var ClientAction;
|
|
|
51
51
|
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
52
52
|
class ResetStorage extends S.TaggedClass()(`${CLIENT_ACTION}/reset-storage`, {
|
|
53
53
|
input: S.Struct({
|
|
54
|
-
|
|
54
|
+
mode: S.optional(S.String)
|
|
55
55
|
}),
|
|
56
56
|
output: S.Void
|
|
57
57
|
}) {
|
|
@@ -81,9 +81,26 @@ var ClientAction;
|
|
|
81
81
|
}) {
|
|
82
82
|
}
|
|
83
83
|
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
84
|
+
class RedeemToken extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-token`, {
|
|
85
|
+
input: S.Struct({
|
|
86
|
+
token: S.String
|
|
87
|
+
}),
|
|
88
|
+
output: S.Void
|
|
89
|
+
}) {
|
|
90
|
+
}
|
|
91
|
+
ClientAction2.RedeemToken = RedeemToken;
|
|
84
92
|
})(ClientAction || (ClientAction = {}));
|
|
93
|
+
var Account;
|
|
94
|
+
(function(Account2) {
|
|
95
|
+
const _id = "dxos.org.plugin.client.account";
|
|
96
|
+
Account2.id = `!${_id}`;
|
|
97
|
+
Account2.Profile = `${_id}.profile`;
|
|
98
|
+
Account2.Devices = `${_id}.devices`;
|
|
99
|
+
Account2.Security = `${_id}.security`;
|
|
100
|
+
})(Account || (Account = {}));
|
|
85
101
|
|
|
86
102
|
export {
|
|
87
|
-
ClientAction
|
|
103
|
+
ClientAction,
|
|
104
|
+
Account
|
|
88
105
|
};
|
|
89
|
-
//# sourceMappingURL=chunk-
|
|
106
|
+
//# sourceMappingURL=chunk-AD5W5QCQ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n
|
|
5
|
-
"mappings": ";;;;;;AAKA,SAASA,SAAS;AAClB,SAAsBC,iBAAqC;AAM3D,IAAMC,iBAAiBC,EAAEC,OAAO;EAC9BC,aAAaF,EAAEG,WAAWC,SAAAA;EAC1BC,UAAUL,EAAEM,SAASN,EAAEG,WAAWC,SAAAA,CAAAA;EAClCG,SAASP,EAAEM,SACTN,EAAEC,OAAO;IACPO,aAAaR,EAAEM,SAASN,EAAES,MAAM;IAChCC,WAAWV,EAAEM,SAASN,EAAES,MAAM;IAC9BE,MAAMX,EAAEM,SAASN,EAAEY,OAAO;MAAEC,KAAKb,EAAES;MAAQK,OAAOd,EAAEe;IAAI,CAAA,CAAA;EAC1D,CAAA,CAAA;AAEJ,CAAA;AAEA,IAAMC,gBAAgB,GAAGC,aAAAA;;UACRC,eAAAA;EACR,MAAMC,uBAAuBnB,EAAEoB,YAAW,EAAmB,GAAGJ,aAAAA,oBAAiC;IACtGK,OAAOrB,EAAEC,OAAO;MACdO,aAAaR,EAAEM,SAASN,EAAES,MAAM;IAClC,CAAA;IACAa,QAAQvB;EACV,CAAA,EAAA;EAAI;gBALSoB,iBAAAA;EAON,MAAMI,qBAAqBvB,EAAEoB,YAAW,EAAiB,GAAGJ,aAAAA,kBAA+B;IAChGK,OAAOrB,EAAEC,OAAO;MACduB,gBAAgBxB,EAAEM,SAASN,EAAES,MAAM;IACrC,CAAA;IACAa,QAAQtB,EAAEyB;EACZ,CAAA,EAAA;EAAI;gBALSF,eAAAA;EAON,MAAMG,sBAAsB1B,EAAEoB,YAAW,EAAkB,GAAGJ,aAAAA,mBAAgC;IACnGK,OAAOrB,EAAEyB;IACTH,QAAQtB,EAAEyB;EACZ,CAAA,EAAA;EAAI;gBAHSC,gBAAAA;EAKN,MAAMC,wBAAwB3B,EAAEoB,YAAW,EAAoB,GAAGJ,aAAAA,qBAAkC;IACzGK,OAAOrB,EAAEyB;IACTH,QAAQtB,EAAEyB;EACZ,CAAA,EAAA;EAAI;gBAHSE,kBAAAA;EAKN,MAAMC,qBAAqB5B,EAAEoB,YAAW,EAAiB,GAAGJ,aAAAA,kBAA+B;IAChGK,OAAOrB,EAAEC,OAAO;MACd4B,
|
|
6
|
-
"names": ["S", "PublicKey", "IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["S", "PublicKey", "IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
CLIENT_PLUGIN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HM7VB4ZV.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-client/src/events.ts
|
|
7
7
|
import { defineEvent } from "@dxos/app-framework";
|
|
@@ -17,4 +17,4 @@ var ClientEvents;
|
|
|
17
17
|
export {
|
|
18
18
|
ClientEvents
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-BP56BGZR.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CLIENT_PLUGIN = 'dxos.org/plugin/client';\n\nexport const meta = {\n id: CLIENT_PLUGIN,\n name: 'Client',\n}
|
|
5
|
-
"mappings": ";;;AAMO,IAAMA,gBAAgB;AAEtB,IAAMC,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CLIENT_PLUGIN = 'dxos.org/plugin/client';\n\nexport const meta: PluginMeta = {\n id: CLIENT_PLUGIN,\n name: 'Client',\n};\n"],
|
|
5
|
+
"mappings": ";;;AAMO,IAAMA,gBAAgB;AAEtB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;AACR;",
|
|
6
6
|
"names": ["CLIENT_PLUGIN", "meta", "id", "name"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
CLIENT_PLUGIN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HM7VB4ZV.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-client/src/capabilities/capabilities.ts
|
|
7
7
|
import { defineCapability } from "@dxos/app-framework";
|
|
@@ -9,10 +9,11 @@ var ClientCapabilities;
|
|
|
9
9
|
(function(ClientCapabilities2) {
|
|
10
10
|
ClientCapabilities2.Client = defineCapability(`${CLIENT_PLUGIN}/capability/client`);
|
|
11
11
|
ClientCapabilities2.Schema = defineCapability(`${CLIENT_PLUGIN}/capability/schema`);
|
|
12
|
+
ClientCapabilities2.SchemaWhiteList = defineCapability(`${CLIENT_PLUGIN}/capability/schema-whitelist`);
|
|
12
13
|
ClientCapabilities2.Migration = defineCapability(`${CLIENT_PLUGIN}/capability/migration`);
|
|
13
14
|
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
14
15
|
|
|
15
16
|
export {
|
|
16
17
|
ClientCapabilities
|
|
17
18
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-K3KGGSJZ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type TypedObject } from '@dxos/echo-schema';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = defineCapability<Client>(`${CLIENT_PLUGIN}/capability/client`);\n export const Schema = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema`);\n export const Migration = defineCapability<ObjectMigration[]>(`${CLIENT_PLUGIN}/capability/migration`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,wBAAwB;;UAOhBC,qBAAAA;sBACFC,SAASC,iBAAyB,GAAGC,aAAAA,oBAAiC;sBACtEC,SAASF,iBAAgC,GAAGC,aAAAA,oBAAiC;sBAC7EE,
|
|
6
|
-
"names": ["defineCapability", "ClientCapabilities", "Client", "defineCapability", "CLIENT_PLUGIN", "Schema", "Migration"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type TypedObject } from '@dxos/echo-schema';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = defineCapability<Client>(`${CLIENT_PLUGIN}/capability/client`);\n export const Schema = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema`);\n export const SchemaWhiteList = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema-whitelist`);\n export const Migration = defineCapability<ObjectMigration[]>(`${CLIENT_PLUGIN}/capability/migration`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,SAASA,wBAAwB;;UAOhBC,qBAAAA;sBACFC,SAASC,iBAAyB,GAAGC,aAAAA,oBAAiC;sBACtEC,SAASF,iBAAgC,GAAGC,aAAAA,oBAAiC;sBAC7EE,kBAAkBH,iBAAgC,GAAGC,aAAAA,8BAA2C;sBAChGG,YAAYJ,iBAAoC,GAAGC,aAAAA,uBAAoC;AACtG,GALiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["defineCapability", "ClientCapabilities", "Client", "defineCapability", "CLIENT_PLUGIN", "Schema", "SchemaWhiteList", "Migration"]
|
|
7
7
|
}
|