@dxos/plugin-client 0.7.5-main.c41020f → 0.7.5-main.d9d2d4e
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/{chunk-EYBZZHSM.mjs → chunk-HNJZ74DZ.mjs} +19 -9
- package/dist/lib/browser/chunk-HNJZ74DZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RGMLBYIF.mjs → chunk-OLUST5AO.mjs} +2 -1
- package/dist/lib/browser/{chunk-RGMLBYIF.mjs.map → chunk-OLUST5AO.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-GHEQL2E6.mjs → chunk-XK4HM5M7.mjs} +2 -1
- package/dist/lib/browser/chunk-XK4HM5M7.mjs.map +7 -0
- package/dist/lib/browser/{client-A7YSVURS.mjs → client-UUGITHCW.mjs} +3 -3
- package/dist/lib/browser/index.mjs +16 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-A6SKE7WJ.mjs → intent-resolver-AIUHL34E.mjs} +6 -6
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/migrations-XODC625X.mjs +21 -0
- package/dist/lib/browser/migrations-XODC625X.mjs.map +7 -0
- package/dist/lib/browser/{react-context-R3SG55F5.mjs → react-context-JBD7Y3SN.mjs} +2 -2
- package/dist/lib/browser/{react-surface-XGOUHVIH.mjs → react-surface-QGPWIUFR.mjs} +2 -2
- package/dist/lib/browser/{schema-J4MJIXRP.mjs → schema-Y7ZNXYSL.mjs} +2 -2
- package/dist/lib/node/{chunk-XPC4JOPP.cjs → chunk-FR2K56EV.cjs} +5 -4
- package/dist/lib/node/{chunk-XPC4JOPP.cjs.map → chunk-FR2K56EV.cjs.map} +3 -3
- package/dist/lib/node/{chunk-UHIGZJQL.cjs → chunk-T4K27K2F.cjs} +5 -4
- package/dist/lib/node/chunk-T4K27K2F.cjs.map +7 -0
- package/dist/lib/node/{chunk-7LVBFGKQ.cjs → chunk-UTG3UR3N.cjs} +16 -6
- package/dist/lib/node/chunk-UTG3UR3N.cjs.map +7 -0
- package/dist/lib/node/{client-2RQATBB6.cjs → client-5BHSU35T.cjs} +8 -8
- package/dist/lib/node/index.cjs +21 -12
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-DKQHARC2.cjs → intent-resolver-PWCHHNV3.cjs} +17 -17
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/migrations-YCBZUPWO.cjs +37 -0
- package/dist/lib/node/migrations-YCBZUPWO.cjs.map +7 -0
- package/dist/lib/node/{react-context-TD6VGBVA.cjs → react-context-MPHNGZHT.cjs} +6 -6
- package/dist/lib/node/{react-surface-IY7GXEGU.cjs → react-surface-TPISDIHR.cjs} +20 -20
- package/dist/lib/node/{schema-JXJS75HQ.cjs → schema-NMMCMK64.cjs} +7 -7
- package/dist/lib/node-esm/{chunk-T35SFKK3.mjs → chunk-3OU2ZXLK.mjs} +2 -1
- package/dist/lib/node-esm/chunk-3OU2ZXLK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CRF22MJJ.mjs → chunk-SHJBU4QR.mjs} +19 -9
- package/dist/lib/node-esm/chunk-SHJBU4QR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QR72BXJK.mjs → chunk-XLLNVLWU.mjs} +2 -1
- package/dist/lib/node-esm/{chunk-QR72BXJK.mjs.map → chunk-XLLNVLWU.mjs.map} +3 -3
- package/dist/lib/node-esm/{client-36DKBSB7.mjs → client-ZDGFGLX4.mjs} +3 -3
- package/dist/lib/node-esm/index.mjs +16 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-HFYRSXUG.mjs → intent-resolver-FIXGPH7C.mjs} +6 -6
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/migrations-VIEIPYJW.mjs +22 -0
- package/dist/lib/node-esm/migrations-VIEIPYJW.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-ZOGDOWJ2.mjs → react-context-KUEOXWWK.mjs} +2 -2
- package/dist/lib/node-esm/{react-surface-F3PDFJMV.mjs → react-surface-KBROL4VH.mjs} +2 -2
- package/dist/lib/node-esm/{schema-XM4HBLIX.mjs → schema-NE5IYLMD.mjs} +2 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +3 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +4 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/components/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -0
- package/dist/types/src/events.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/ClientPlugin.ts +15 -1
- package/src/capabilities/capabilities.ts +3 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/migrations.ts +22 -0
- package/src/components/IdentityDialog.tsx +3 -1
- package/src/components/JoinDialog.tsx +3 -1
- package/src/events.ts +1 -0
- package/dist/lib/browser/chunk-EYBZZHSM.mjs.map +0 -7
- package/dist/lib/browser/chunk-GHEQL2E6.mjs.map +0 -7
- package/dist/lib/node/chunk-7LVBFGKQ.cjs.map +0 -7
- package/dist/lib/node/chunk-UHIGZJQL.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-CRF22MJJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-T35SFKK3.mjs.map +0 -7
- /package/dist/lib/browser/{client-A7YSVURS.mjs.map → client-UUGITHCW.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-A6SKE7WJ.mjs.map → intent-resolver-AIUHL34E.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-R3SG55F5.mjs.map → react-context-JBD7Y3SN.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-XGOUHVIH.mjs.map → react-surface-QGPWIUFR.mjs.map} +0 -0
- /package/dist/lib/browser/{schema-J4MJIXRP.mjs.map → schema-Y7ZNXYSL.mjs.map} +0 -0
- /package/dist/lib/node/{client-2RQATBB6.cjs.map → client-5BHSU35T.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-DKQHARC2.cjs.map → intent-resolver-PWCHHNV3.cjs.map} +0 -0
- /package/dist/lib/node/{react-context-TD6VGBVA.cjs.map → react-context-MPHNGZHT.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-IY7GXEGU.cjs.map → react-surface-TPISDIHR.cjs.map} +0 -0
- /package/dist/lib/node/{schema-JXJS75HQ.cjs.map → schema-NMMCMK64.cjs.map} +0 -0
- /package/dist/lib/node-esm/{client-36DKBSB7.mjs.map → client-ZDGFGLX4.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-HFYRSXUG.mjs.map → intent-resolver-FIXGPH7C.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-context-ZOGDOWJ2.mjs.map → react-context-KUEOXWWK.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-F3PDFJMV.mjs.map → react-surface-KBROL4VH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{schema-XM4HBLIX.mjs.map → schema-NE5IYLMD.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ClientCapabilities
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XK4HM5M7.mjs";
|
|
4
4
|
import "./chunk-NHIL4T3L.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-client/src/capabilities/schema.ts
|
|
@@ -20,4 +20,4 @@ var schema_default = (context) => {
|
|
|
20
20
|
export {
|
|
21
21
|
schema_default as default
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=schema-
|
|
23
|
+
//# sourceMappingURL=schema-Y7ZNXYSL.mjs.map
|
|
@@ -16,17 +16,18 @@ 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 chunk_FR2K56EV_exports = {};
|
|
20
|
+
__export(chunk_FR2K56EV_exports, {
|
|
21
21
|
ClientEvents: () => ClientEvents
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_FR2K56EV_exports);
|
|
24
24
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
25
25
|
var import_app_framework = require("@dxos/app-framework");
|
|
26
26
|
var ClientEvents;
|
|
27
27
|
(function(ClientEvents2) {
|
|
28
28
|
ClientEvents2.ClientReady = (0, import_app_framework.defineEvent)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/event/client-ready`);
|
|
29
29
|
ClientEvents2.SetupSchema = (0, import_app_framework.defineEvent)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/event/setup-schema`);
|
|
30
|
+
ClientEvents2.SetupMigration = (0, import_app_framework.defineEvent)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/event/setup-migration`);
|
|
30
31
|
ClientEvents2.IdentityCreated = (0, import_app_framework.defineEvent)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/event/identity-created`);
|
|
31
32
|
ClientEvents2.SpacesReady = (0, import_app_framework.defineEvent)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/event/spaces-ready`);
|
|
32
33
|
})(ClientEvents || (ClientEvents = {}));
|
|
@@ -34,4 +35,4 @@ var ClientEvents;
|
|
|
34
35
|
0 && (module.exports = {
|
|
35
36
|
ClientEvents
|
|
36
37
|
});
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-FR2K56EV.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/events.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { CLIENT_PLUGIN } from './meta';\n\nexport namespace ClientEvents {\n export const ClientReady = defineEvent(`${CLIENT_PLUGIN}/event/client-ready`);\n export const SetupSchema = defineEvent(`${CLIENT_PLUGIN}/event/setup-schema`);\n export const IdentityCreated = defineEvent(`${CLIENT_PLUGIN}/event/identity-created`);\n export const SpacesReady = defineEvent(`${CLIENT_PLUGIN}/event/spaces-ready`);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA4B;;UAIXA,eAAAA;gBACFC,kBAAcC,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DC,kBAAcF,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DE,
|
|
6
|
-
"names": ["ClientEvents", "ClientReady", "defineEvent", "CLIENT_PLUGIN", "SetupSchema", "IdentityCreated", "SpacesReady"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineEvent } from '@dxos/app-framework';\n\nimport { CLIENT_PLUGIN } from './meta';\n\nexport namespace ClientEvents {\n export const ClientReady = defineEvent(`${CLIENT_PLUGIN}/event/client-ready`);\n export const SetupSchema = defineEvent(`${CLIENT_PLUGIN}/event/setup-schema`);\n export const SetupMigration = defineEvent(`${CLIENT_PLUGIN}/event/setup-migration`);\n export const IdentityCreated = defineEvent(`${CLIENT_PLUGIN}/event/identity-created`);\n export const SpacesReady = defineEvent(`${CLIENT_PLUGIN}/event/spaces-ready`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA4B;;UAIXA,eAAAA;gBACFC,kBAAcC,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DC,kBAAcF,kCAAY,GAAGC,mCAAAA,qBAAkC;gBAC/DE,qBAAiBH,kCAAY,GAAGC,mCAAAA,wBAAqC;gBACrEG,sBAAkBJ,kCAAY,GAAGC,mCAAAA,yBAAsC;gBACvEI,kBAAcL,kCAAY,GAAGC,mCAAAA,qBAAkC;AAC9E,GANiBH,iBAAAA,eAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["ClientEvents", "ClientReady", "defineEvent", "CLIENT_PLUGIN", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady"]
|
|
7
7
|
}
|
|
@@ -16,20 +16,21 @@ 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 chunk_T4K27K2F_exports = {};
|
|
20
|
+
__export(chunk_T4K27K2F_exports, {
|
|
21
21
|
ClientCapabilities: () => ClientCapabilities
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_T4K27K2F_exports);
|
|
24
24
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
25
25
|
var import_app_framework = require("@dxos/app-framework");
|
|
26
26
|
var ClientCapabilities;
|
|
27
27
|
(function(ClientCapabilities2) {
|
|
28
28
|
ClientCapabilities2.Client = (0, import_app_framework.defineCapability)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/capability/client`);
|
|
29
29
|
ClientCapabilities2.Schema = (0, import_app_framework.defineCapability)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/capability/schema`);
|
|
30
|
+
ClientCapabilities2.Migration = (0, import_app_framework.defineCapability)(`${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/capability/migration`);
|
|
30
31
|
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
31
32
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
33
|
0 && (module.exports = {
|
|
33
34
|
ClientCapabilities
|
|
34
35
|
});
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-T4K27K2F.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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,2BAAiC;;UAOhBA,qBAAAA;sBACFC,aAASC,uCAAyB,GAAGC,mCAAAA,oBAAiC;sBACtEC,aAASF,uCAAgC,GAAGC,mCAAAA,oBAAiC;sBAC7EE,gBAAYH,uCAAoC,GAAGC,mCAAAA,uBAAoC;AACtG,GAJiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["ClientCapabilities", "Client", "defineCapability", "CLIENT_PLUGIN", "Schema", "Migration"]
|
|
7
|
+
}
|
|
@@ -26,8 +26,8 @@ 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 chunk_UTG3UR3N_exports = {};
|
|
30
|
+
__export(chunk_UTG3UR3N_exports, {
|
|
31
31
|
IDENTITY_DIALOG: () => IDENTITY_DIALOG,
|
|
32
32
|
IdentityDialog: () => IdentityDialog,
|
|
33
33
|
JOIN_DIALOG: () => JOIN_DIALOG,
|
|
@@ -39,7 +39,7 @@ __export(chunk_7LVBFGKQ_exports, {
|
|
|
39
39
|
RecoveryCodeDialog: () => RecoveryCodeDialog,
|
|
40
40
|
RecoverySetupDialog: () => RecoverySetupDialog
|
|
41
41
|
});
|
|
42
|
-
module.exports = __toCommonJS(
|
|
42
|
+
module.exports = __toCommonJS(chunk_UTG3UR3N_exports);
|
|
43
43
|
var import_chunk_TREVKZCJ = require("./chunk-TREVKZCJ.cjs");
|
|
44
44
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
45
45
|
var import_react = require("@phosphor-icons/react");
|
|
@@ -107,6 +107,7 @@ var IDENTITY_DIALOG = `${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/IdentityDialog`;
|
|
|
107
107
|
var IdentityDialog = (props) => {
|
|
108
108
|
const { dispatchPromise: dispatch } = (0, import_app_framework2.useIntentDispatcher)();
|
|
109
109
|
const client = (0, import_react_client.useClient)();
|
|
110
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_OIFPM5ZW.CLIENT_PLUGIN);
|
|
110
111
|
const handleDone = (0, import_react4.useCallback)(() => dispatch((0, import_app_framework2.createIntent)(import_app_framework2.LayoutAction.UpdateDialog, {
|
|
111
112
|
part: "dialog",
|
|
112
113
|
options: {
|
|
@@ -149,7 +150,11 @@ var IdentityDialog = (props) => {
|
|
|
149
150
|
}, [
|
|
150
151
|
dispatch
|
|
151
152
|
]);
|
|
152
|
-
return /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Dialog.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.
|
|
153
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Dialog.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Dialog.Title, {
|
|
154
|
+
classNames: "sr-only"
|
|
155
|
+
}, t("manage profile label", {
|
|
156
|
+
ns: "os"
|
|
157
|
+
})), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Clipboard.Provider, null, /* @__PURE__ */ import_react4.default.createElement(import_react5.IdentityPanel, {
|
|
153
158
|
...props,
|
|
154
159
|
doneActionParent: /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Dialog.Close, {
|
|
155
160
|
asChild: true
|
|
@@ -164,6 +169,7 @@ var IdentityDialog = (props) => {
|
|
|
164
169
|
var JOIN_DIALOG = `${import_chunk_OIFPM5ZW.CLIENT_PLUGIN}/JoinDialog`;
|
|
165
170
|
var JoinDialog = (props) => {
|
|
166
171
|
const { dispatchPromise: dispatch } = (0, import_app_framework3.useIntentDispatcher)();
|
|
172
|
+
const { t } = (0, import_react_ui3.useTranslation)(import_chunk_OIFPM5ZW.CLIENT_PLUGIN);
|
|
167
173
|
const handleCancelResetStorage = (0, import_react6.useCallback)(() => dispatch((0, import_app_framework3.createIntent)(import_chunk_TREVKZCJ.ClientAction.ShareIdentity)), [
|
|
168
174
|
dispatch
|
|
169
175
|
]);
|
|
@@ -184,7 +190,11 @@ var JoinDialog = (props) => {
|
|
|
184
190
|
}, [
|
|
185
191
|
dispatch
|
|
186
192
|
]);
|
|
187
|
-
return /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Content, null, /* @__PURE__ */ import_react6.default.createElement(
|
|
193
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Content, null, /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Title, {
|
|
194
|
+
classNames: "sr-only"
|
|
195
|
+
}, t("join space label", {
|
|
196
|
+
ns: "os"
|
|
197
|
+
})), /* @__PURE__ */ import_react6.default.createElement(import_react7.JoinPanel, {
|
|
188
198
|
mode: "halo-only",
|
|
189
199
|
...props,
|
|
190
200
|
exitActionParent: /* @__PURE__ */ import_react6.default.createElement(import_react_ui3.Dialog.Close, {
|
|
@@ -296,4 +306,4 @@ var RecoverySetupDialog = () => {
|
|
|
296
306
|
RecoveryCodeDialog,
|
|
297
307
|
RecoverySetupDialog
|
|
298
308
|
});
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
309
|
+
//# sourceMappingURL=chunk-UTG3UR3N.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/ManageCredentialsDialog.tsx", "../../../src/components/IdentityDialog.tsx", "../../../src/components/JoinDialog.tsx", "../../../src/components/RecoveryCodeDialog.tsx", "../../../src/components/RecoverySetupDialog.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Receipt, Key } from '@phosphor-icons/react';\nimport React, { useMemo } from 'react';\n\nimport { createIntent, useIntentDispatcher } from '@dxos/app-framework';\nimport { useCredentials } from '@dxos/react-client/halo';\nimport { Dialog, Icon, List, ListItem, useTranslation } from '@dxos/react-ui';\nimport { BifurcatedAction, type ActionMenuItem } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const MANAGE_CREDENTIALS_DIALOG = `${CLIENT_PLUGIN}/ManageCredentialsDialog`;\n\n// TODO(wittjosiah): Factor panel out to @dxos/shell.\nexport const ManageCredentialsDialog = () => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const credentials = useCredentials();\n const recoveryCredentials = credentials.filter(\n (credential) => credential.subject.assertion['@type'] === 'dxos.halo.credentials.IdentityRecovery',\n );\n\n // TODO(wittjosiah): Reconsile w/ RecoverySetupDialog actions.\n const actions: Record<string, ActionMenuItem> = useMemo(\n () => ({\n createPasskey: {\n label: t('create passkey label'),\n description: t('create passkey description'),\n // TODO(wittjosiah): Ideally this would be a `user-key` icon.\n icon: Key,\n onClick: () => dispatch(createIntent(ClientAction.CreatePasskey)),\n },\n createRecoveryCode: {\n label: t('create recovery code label'),\n description: t('create recovery code description'),\n icon: Receipt,\n onClick: () => dispatch(createIntent(ClientAction.CreateRecoveryCode)),\n },\n }),\n [t],\n );\n\n return (\n <Dialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[25rem] overflow-hidden'>\n <Dialog.Title>{t('manage credentials dialog title')}</Dialog.Title>\n <List classNames='py-4'>\n {recoveryCredentials.map((credential) => (\n <ListItem.Root key={credential.id?.toHex()}>\n <ListItem.Endcap>\n <Icon icon='ph--key--regular' size={5} />\n </ListItem.Endcap>\n <ListItem.Heading>{credential.issuanceDate.toLocaleString()}</ListItem.Heading>\n </ListItem.Root>\n ))}\n </List>\n <div className='grow' />\n <BifurcatedAction actions={actions} />\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { useClient } from '@dxos/react-client';\nimport { Clipboard, Dialog, useTranslation } from '@dxos/react-ui';\nimport { IdentityPanel, type IdentityPanelProps } from '@dxos/shell/react';\n\nimport { MANAGE_CREDENTIALS_DIALOG } from './ManageCredentialsDialog';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const IDENTITY_DIALOG = `${CLIENT_PLUGIN}/IdentityDialog`;\n\nexport const IdentityDialog = (props: IdentityPanelProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const client = useClient();\n const { t } = useTranslation(CLIENT_PLUGIN);\n\n const handleDone = useCallback(\n () =>\n dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n options: { state: false },\n }),\n ),\n [dispatch],\n );\n\n const handleResetStorage = useCallback(async () => {\n await client.reset();\n await dispatch(createIntent(ClientAction.ResetStorage));\n }, [dispatch]);\n\n const handleRecover = useCallback(async () => {\n await client.reset();\n await dispatch(createIntent(ClientAction.ResetStorage, { target: 'recoverIdentity' }));\n }, [dispatch]);\n\n const handleJoinNewIdentity = useCallback(async () => {\n await client.reset();\n await dispatch(createIntent(ClientAction.ResetStorage, { target: 'deviceInvitation' }));\n }, [dispatch]);\n\n const handleManageCredentials = useCallback(async () => {\n await dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: MANAGE_CREDENTIALS_DIALOG,\n options: { state: true, blockAlign: 'start' },\n }),\n );\n }, [dispatch]);\n\n return (\n <Dialog.Content>\n <Dialog.Title classNames='sr-only'>{t('manage profile label', { ns: 'os' })}</Dialog.Title>\n <Clipboard.Provider>\n <IdentityPanel\n {...props}\n doneActionParent={<Dialog.Close asChild />}\n onDone={handleDone}\n onResetStorage={handleResetStorage}\n onRecover={handleRecover}\n onJoinNewIdentity={handleJoinNewIdentity}\n onManageCredentials={handleManageCredentials}\n />\n </Clipboard.Provider>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { type InvitationResult } from '@dxos/react-client/invitations';\nimport { Dialog, useTranslation } from '@dxos/react-ui';\nimport { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const JOIN_DIALOG = `${CLIENT_PLUGIN}/JoinDialog`;\n\nexport const JoinDialog = (props: JoinPanelProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { t } = useTranslation(CLIENT_PLUGIN);\n\n const handleCancelResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ShareIdentity)), [dispatch]);\n\n const handleDone = useCallback(\n async (result: InvitationResult | null) => {\n if (result?.identityKey) {\n await Promise.all([\n dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } })),\n dispatch(\n createIntent(ObservabilityAction.SendEvent, {\n name: props.initialDisposition === 'recover-identity' ? 'identity.recover' : 'identity.join',\n }),\n ),\n ]);\n }\n },\n [dispatch],\n );\n\n return (\n <Dialog.Content>\n <Dialog.Title classNames='sr-only'>{t('join space label', { ns: 'os' })}</Dialog.Title>\n <JoinPanel\n mode='halo-only'\n {...props}\n exitActionParent={<Dialog.Close asChild />}\n doneActionParent={<Dialog.Close asChild />}\n onCancelResetStorage={handleCancelResetStorage}\n onDone={handleDone}\n />\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';\n\nimport { CLIENT_PLUGIN } from '../meta';\n\nexport const RECOVER_CODE_DIALOG = `${CLIENT_PLUGIN}/RecoveryCodeDialog`;\n\nexport type RecoveryCodeDialogProps = {\n code: string;\n};\n\n// TODO(wittjosiah): Factor panel out to @dxos/shell.\nexport const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const [confirmation, setConfirmation] = useState(false);\n\n const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);\n\n return (\n <AlertDialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>\n <AlertDialog.Title>{t('recovery code dialog title')}</AlertDialog.Title>\n <p className='py-4'>{t('recovery code dialog description')}</p>\n <Clipboard.Provider>\n <Code code={code} />\n </Clipboard.Provider>\n <div className='flex flex-col py-4 gap-2'>\n <p>{t('recovery code dialog warning 1')}</p>\n <p>{t('recovery code dialog warning 2')}</p>\n </div>\n <div className='flex items-center gap-2 pbe-4'>\n <Input.Root>\n <Input.Checkbox\n data-testid='recoveryCode.confirm'\n checked={confirmation}\n onCheckedChange={handleConfirmation}\n />\n <Input.Label>{t('recovery code confirmation label')}</Input.Label>\n </Input.Root>\n </div>\n <div className='flex justify-end'>\n <AlertDialog.Action asChild>\n <Button data-testid='recoveryCode.continue' variant='primary' disabled={!confirmation}>\n {t('continue label')}\n </Button>\n </AlertDialog.Action>\n </div>\n </AlertDialog.Content>\n );\n};\n\nconst Code = ({ code }: { code: string }) => {\n const words = code.split(' ');\n return (\n <div className='relative p-2 border border-separator rounded group'>\n <Clipboard.IconButton value={code} classNames='absolute top-2 right-2 invisible group-hover:visible' />\n <div className='grid grid-cols-4'>\n {words.map((word, i) => (\n <div key={i} className='flex items-center p-2 gap-2'>\n <div className='w-4 text-xs text-center text-subdued'>{i + 1}</div>\n <div className='text-sm'>{word}</div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Key, Receipt } from '@phosphor-icons/react';\nimport React, { useMemo } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { AlertDialog, useTranslation } from '@dxos/react-ui';\nimport { type ActionMenuItem, BifurcatedAction } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport const RECOVER_SETUP_DIALOG = `${CLIENT_PLUGIN}/RecoverySetupDialog`;\n\n// TODO(wittjosiah): Factor panel out to @dxos/shell.\nexport const RecoverySetupDialog = () => {\n const { t } = useTranslation(CLIENT_PLUGIN);\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const actions: Record<string, ActionMenuItem> = useMemo(\n () => ({\n createPasskey: {\n label: t('create passkey label'),\n description: t('create passkey description'),\n // TODO(wittjosiah): Ideally this would be a `user-key` icon.\n icon: Key,\n onClick: async () => {\n await dispatch(createIntent(ClientAction.CreatePasskey));\n await dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } }));\n },\n },\n createRecoveryCode: {\n label: t('create recovery code label'),\n description: t('create recovery code description'),\n icon: Receipt,\n onClick: () => dispatch(createIntent(ClientAction.CreateRecoveryCode)),\n },\n }),\n [t],\n );\n\n return (\n <AlertDialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[25rem] overflow-hidden'>\n <AlertDialog.Title>{t('recovery setup dialog title')}</AlertDialog.Title>\n <p className='py-4'>{t('recovery setup dialog description')}</p>\n <div className='grow' />\n <BifurcatedAction actions={actions} />\n </AlertDialog.Content>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAA6B;AAC7B,IAAAA,gBAA+B;AAE/B,2BAAkD;AAClD,kBAA+B;AAC/B,sBAA6D;AAC7D,IAAAA,gBAAsD;ACNtD,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAgE;AAChE,0BAA0B;AAC1B,IAAAC,mBAAkD;AAClD,IAAAF,gBAAuD;ACLvD,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAgE;AAChE,mBAAoC;AAEpC,IAAAC,mBAAuC;AACvC,IAAAF,gBAA+C;ACN/C,IAAAA,gBAA6C;AAE7C,IAAAE,mBAAsE;ACFtE,IAAAF,gBAA6B;AAC7B,IAAAA,iBAA+B;AAE/B,IAAAC,wBAAgE;AAChE,IAAAC,mBAA4C;AAC5C,IAAAF,iBAAsD;AJM/C,IAAMG,4BAA4B,GAAGC,mCAAAA;AAGrC,IAAMC,0BAA0B,MAAA;AACrC,QAAM,EAAEC,EAAC,QAAKC,gCAAeH,mCAAAA;AAC7B,QAAM,EAAEI,iBAAiBC,SAAQ,QAAKC,0CAAAA;AACtC,QAAMC,kBAAcC,4BAAAA;AACpB,QAAMC,sBAAsBF,YAAYG,OACtC,CAACC,eAAeA,WAAWC,QAAQC,UAAU,OAAA,MAAa,wCAAA;AAI5D,QAAMC,cAA0CC,uBAC9C,OAAO;IACLC,eAAe;MACbC,OAAOf,EAAE,sBAAA;MACTgB,aAAahB,EAAE,4BAAA;;MAEfiB,MAAMC;MACNC,SAAS,MAAMhB,aAASiB,mCAAaC,mCAAaC,aAAa,CAAA;IACjE;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B0B,+BAAAA,QAAA,cAAC8E,KAAAA;IAAE3D,WAAU;KAAQ7C,EAAE,mCAAA,CAAA,GACvB0B,+BAAAA,QAAA,cAACkB,OAAAA;IAAIC,WAAU;MACfnB,+BAAAA,QAAA,cAACoB,eAAAA,kBAAAA;IAAiBlC;;AAGxB;",
|
|
6
|
+
"names": ["import_react", "import_app_framework", "import_react_ui", "MANAGE_CREDENTIALS_DIALOG", "CLIENT_PLUGIN", "ManageCredentialsDialog", "t", "useTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "credentials", "useCredentials", "recoveryCredentials", "filter", "credential", "subject", "assertion", "actions", "useMemo", "createPasskey", "label", "description", "icon", "Key", "onClick", "createIntent", "ClientAction", "CreatePasskey", "createRecoveryCode", "Receipt", "CreateRecoveryCode", "React", "Dialog", "Content", "classNames", "Title", "List", "map", "ListItem", "Root", "key", "id", "toHex", "Endcap", "Icon", "size", "Heading", "issuanceDate", "toLocaleString", "div", "className", "BifurcatedAction", "IDENTITY_DIALOG", "IdentityDialog", "props", "client", "useClient", "handleDone", "useCallback", "LayoutAction", "UpdateDialog", "part", "options", "state", "handleResetStorage", "reset", "ResetStorage", "handleRecover", "target", "handleJoinNewIdentity", "handleManageCredentials", "blockAlign", "ns", "Clipboard", "Provider", "IdentityPanel", "doneActionParent", "Close", "asChild", "onDone", "onResetStorage", "onRecover", "onJoinNewIdentity", "onManageCredentials", "JOIN_DIALOG", "JoinDialog", "handleCancelResetStorage", "ShareIdentity", "result", "identityKey", "Promise", "all", "ObservabilityAction", "SendEvent", "name", "initialDisposition", "JoinPanel", "mode", "exitActionParent", "onCancelResetStorage", "RECOVER_CODE_DIALOG", "RecoveryCodeDialog", "code", "confirmation", "setConfirmation", "useState", "handleConfirmation", "checked", "AlertDialog", "p", "Code", "Input", "Checkbox", "data-testid", "onCheckedChange", "Label", "Action", "Button", "variant", "disabled", "words", "split", "IconButton", "value", "word", "i", "RECOVER_SETUP_DIALOG", "RecoverySetupDialog"]
|
|
7
|
+
}
|
|
@@ -16,13 +16,13 @@ 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 client_5BHSU35T_exports = {};
|
|
20
|
+
__export(client_5BHSU35T_exports, {
|
|
21
21
|
default: () => client_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(client_5BHSU35T_exports);
|
|
24
|
+
var import_chunk_FR2K56EV = require("./chunk-FR2K56EV.cjs");
|
|
25
|
+
var import_chunk_T4K27K2F = require("./chunk-T4K27K2F.cjs");
|
|
26
26
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
27
27
|
var import_app_framework = require("@dxos/app-framework");
|
|
28
28
|
var import_react_client = require("@dxos/react-client");
|
|
@@ -39,12 +39,12 @@ var client_default = async ({ context, onClientInitialized, ...options }) => {
|
|
|
39
39
|
});
|
|
40
40
|
const subscription = client.spaces.isReady.subscribe(async (ready) => {
|
|
41
41
|
if (ready) {
|
|
42
|
-
await context.activate(
|
|
42
|
+
await context.activate(import_chunk_FR2K56EV.ClientEvents.SpacesReady);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
return (0, import_app_framework.contributes)(
|
|
45
|
+
return (0, import_app_framework.contributes)(import_chunk_T4K27K2F.ClientCapabilities.Client, client, async () => {
|
|
46
46
|
subscription.unsubscribe();
|
|
47
47
|
await client.destroy();
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=client-
|
|
50
|
+
//# sourceMappingURL=client-5BHSU35T.cjs.map
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -29,23 +29,24 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
31
|
CLIENT_PLUGIN: () => import_chunk_OIFPM5ZW.CLIENT_PLUGIN,
|
|
32
|
-
ClientCapabilities: () =>
|
|
33
|
-
ClientEvents: () =>
|
|
32
|
+
ClientCapabilities: () => import_chunk_T4K27K2F.ClientCapabilities,
|
|
33
|
+
ClientEvents: () => import_chunk_FR2K56EV.ClientEvents,
|
|
34
34
|
ClientPlugin: () => ClientPlugin,
|
|
35
35
|
meta: () => import_chunk_OIFPM5ZW.meta
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(node_exports);
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_FR2K56EV = require("./chunk-FR2K56EV.cjs");
|
|
39
|
+
var import_chunk_T4K27K2F = require("./chunk-T4K27K2F.cjs");
|
|
40
40
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
41
41
|
var import_app_framework = require("@dxos/app-framework");
|
|
42
42
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
43
43
|
var AppGraphBuilder = (0, import_app_framework2.lazy)(async () => import("./app-graph-builder-RW7ESEX3.cjs"));
|
|
44
|
-
var Client = (0, import_app_framework2.lazy)(async () => import("./client-
|
|
45
|
-
var IntentResolver = (0, import_app_framework2.lazy)(async () => import("./intent-resolver-
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
44
|
+
var Client = (0, import_app_framework2.lazy)(async () => import("./client-5BHSU35T.cjs"));
|
|
45
|
+
var IntentResolver = (0, import_app_framework2.lazy)(async () => import("./intent-resolver-PWCHHNV3.cjs"));
|
|
46
|
+
var Migrations = (0, import_app_framework2.lazy)(async () => import("./migrations-YCBZUPWO.cjs"));
|
|
47
|
+
var ReactContext = (0, import_app_framework2.lazy)(async () => import("./react-context-MPHNGZHT.cjs"));
|
|
48
|
+
var ReactSurface = (0, import_app_framework2.lazy)(async () => import("./react-surface-TPISDIHR.cjs"));
|
|
49
|
+
var Schema = (0, import_app_framework2.lazy)(async () => import("./schema-NMMCMK64.cjs"));
|
|
49
50
|
var translations_default = [
|
|
50
51
|
{
|
|
51
52
|
"en-US": {
|
|
@@ -79,7 +80,7 @@ var ClientPlugin = ({ invitationUrl = window.location.origin, invitationParam =
|
|
|
79
80
|
id: `${import_chunk_OIFPM5ZW.meta.id}/module/client`,
|
|
80
81
|
activatesOn: (0, import_app_framework.oneOf)(import_app_framework.Events.Startup, import_app_framework.Events.SetupAppGraph),
|
|
81
82
|
activatesAfter: [
|
|
82
|
-
|
|
83
|
+
import_chunk_FR2K56EV.ClientEvents.ClientReady
|
|
83
84
|
],
|
|
84
85
|
activate: (context) => Client({
|
|
85
86
|
...options,
|
|
@@ -88,12 +89,20 @@ var ClientPlugin = ({ invitationUrl = window.location.origin, invitationParam =
|
|
|
88
89
|
}),
|
|
89
90
|
(0, import_app_framework.defineModule)({
|
|
90
91
|
id: `${import_chunk_OIFPM5ZW.meta.id}/module/schema`,
|
|
91
|
-
activatesOn:
|
|
92
|
+
activatesOn: import_chunk_FR2K56EV.ClientEvents.ClientReady,
|
|
92
93
|
activatesBefore: [
|
|
93
|
-
|
|
94
|
+
import_chunk_FR2K56EV.ClientEvents.SetupSchema
|
|
94
95
|
],
|
|
95
96
|
activate: Schema
|
|
96
97
|
}),
|
|
98
|
+
(0, import_app_framework.defineModule)({
|
|
99
|
+
id: `${import_chunk_OIFPM5ZW.meta.id}/module/migration`,
|
|
100
|
+
activatesOn: import_chunk_FR2K56EV.ClientEvents.ClientReady,
|
|
101
|
+
activatesBefore: [
|
|
102
|
+
import_chunk_FR2K56EV.ClientEvents.SetupMigration
|
|
103
|
+
],
|
|
104
|
+
activate: Migrations
|
|
105
|
+
}),
|
|
97
106
|
(0, import_app_framework.defineModule)({
|
|
98
107
|
id: `${import_chunk_OIFPM5ZW.meta.id}/module/react-context`,
|
|
99
108
|
activatesOn: import_app_framework.Events.Startup,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ClientPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';\n\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqF;ACArF,IAAAA,wBAAqB;AAEd,IAAMC,sBAAkBC,4BAAK,YAAY,OAAO,kCAAA,CAAA;AAChD,IAAMC,aAASD,4BAAK,YAAY,OAAO,uBAAA,CAAA;AACvC,IAAME,qBAAiBF,4BAAK,YAAY,OAAO,gCAAA,CAAA;AAC/C,IAAMG,
|
|
6
|
-
"names": ["import_app_framework", "AppGraphBuilder", "lazy", "Client", "IntentResolver", "ReactContext", "ReactSurface", "Schema", "CLIENT_PLUGIN", "ClientPlugin", "invitationUrl", "window", "location", "origin", "invitationParam", "onReset", "options", "createInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "definePlugin", "meta", "defineModule", "id", "activatesOn", "oneOf", "Events", "Startup", "SetupAppGraph", "activatesAfter", "ClientEvents", "ClientReady", "activate", "context", "activatesBefore", "SetupSchema", "SetupReactSurface", "SetupIntentResolver", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';\n\nimport {\n Client,\n AppGraphBuilder,\n IntentResolver,\n Migrations,\n ReactContext,\n ReactSurface,\n Schema,\n} from './capabilities';\nimport { ClientEvents } from './events';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { type ClientPluginOptions } from './types';\n\nexport const ClientPlugin = ({\n invitationUrl = window.location.origin,\n invitationParam = 'deviceInvitationCode',\n onReset,\n ...options\n}: ClientPluginOptions) => {\n const createInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationUrl);\n baseUrl.searchParams.set(invitationParam, invitationCode);\n return baseUrl.toString();\n };\n\n return definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/client`,\n activatesOn: oneOf(Events.Startup, Events.SetupAppGraph),\n activatesAfter: [ClientEvents.ClientReady],\n activate: (context) => Client({ ...options, context }),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [ClientEvents.SetupSchema],\n activate: Schema,\n }),\n defineModule({\n id: `${meta.id}/module/migration`,\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n defineModule({\n id: `${meta.id}/module/react-context`,\n activatesOn: Events.Startup,\n activate: ReactContext,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () => ReactSurface({ createInvitationUrl }),\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: (context) => IntentResolver({ context, onReset }),\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n ]);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(async () => import('./app-graph-builder'));\nexport const Client = lazy(async () => import('./client'));\nexport const IntentResolver = lazy(async () => import('./intent-resolver'));\nexport const Migrations = lazy(async () => import('./migrations'));\nexport const ReactContext = lazy(async () => import('./react-context'));\nexport const ReactSurface = lazy(async () => import('./react-surface'));\nexport const Schema = lazy(async () => import('./schema'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CLIENT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [CLIENT_PLUGIN]: {\n 'open shell label': 'Open HALO',\n 'manage credentials dialog title': 'Manage Account Recovery',\n 'recovery setup dialog title': 'Account Recovery',\n 'recovery setup dialog description':\n 'In order to recover your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password manager.',\n 'create passkey label': 'Create Passkey',\n 'create passkey description':\n 'A passkey is a secure and easy to use credential that can be used to recover your account.',\n 'create recovery code label': 'Create Recovery Code',\n 'create recovery code description': 'A recovery code is 12 word phrase representing a private key.',\n 'recovery code dialog title': 'Recovery Code',\n 'recovery code dialog description':\n 'This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your devices.',\n 'recovery code dialog warning 1': 'NOTE: This code will not be displayed again.',\n 'recovery code dialog warning 2':\n 'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',\n 'recovery code confirmation label': 'Please confirm you have saved the code.',\n 'continue label': 'Continue',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAqF;ACArF,IAAAA,wBAAqB;AAEd,IAAMC,sBAAkBC,4BAAK,YAAY,OAAO,kCAAA,CAAA;AAChD,IAAMC,aAASD,4BAAK,YAAY,OAAO,uBAAA,CAAA;AACvC,IAAME,qBAAiBF,4BAAK,YAAY,OAAO,gCAAA,CAAA;AAC/C,IAAMG,iBAAaH,4BAAK,YAAY,OAAO,2BAAA,CAAA;AAC3C,IAAMI,mBAAeJ,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMK,mBAAeL,4BAAK,YAAY,OAAO,8BAAA,CAAA;AAC7C,IAAMM,aAASN,4BAAK,YAAY,OAAO,uBAAA,CAAA;ACN9C,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACO,mCAAAA,GAAgB;QACf,oBAAoB;QACpB,mCAAmC;QACnC,+BAA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E;MACpBI,UAAUpC;IACZ,CAAA;QACA0B,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOY;MACpBN,UAAU,CAACC,YAAYlC,eAAe;QAAEkC;QAAStB;MAAQ,CAAA;IAC3D,CAAA;QACAW,mCAAa;MACXC,IAAI,GAAGF,2BAAKE,EAAE;MACdC,aAAaE,4BAAOa;MACpBP,UAAU,UAAMQ,kCAAYC,kCAAaC,cAAcC,oBAAAA;IACzD,CAAA;GACD;AACH;",
|
|
6
|
+
"names": ["import_app_framework", "AppGraphBuilder", "lazy", "Client", "IntentResolver", "Migrations", "ReactContext", "ReactSurface", "Schema", "CLIENT_PLUGIN", "ClientPlugin", "invitationUrl", "window", "location", "origin", "invitationParam", "onReset", "options", "createInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "definePlugin", "meta", "defineModule", "id", "activatesOn", "oneOf", "Events", "Startup", "SetupAppGraph", "activatesAfter", "ClientEvents", "ClientReady", "activate", "context", "activatesBefore", "SetupSchema", "SetupMigration", "SetupReactSurface", "SetupIntentResolver", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations"]
|
|
7
7
|
}
|
|
@@ -16,15 +16,15 @@ 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 intent_resolver_PWCHHNV3_exports = {};
|
|
20
|
+
__export(intent_resolver_PWCHHNV3_exports, {
|
|
21
21
|
default: () => intent_resolver_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(intent_resolver_PWCHHNV3_exports);
|
|
24
|
+
var import_chunk_FR2K56EV = require("./chunk-FR2K56EV.cjs");
|
|
25
|
+
var import_chunk_T4K27K2F = require("./chunk-T4K27K2F.cjs");
|
|
26
|
+
var import_chunk_UTG3UR3N = require("./chunk-UTG3UR3N.cjs");
|
|
26
27
|
var import_chunk_TREVKZCJ = require("./chunk-TREVKZCJ.cjs");
|
|
27
|
-
var import_chunk_UHIGZJQL = require("./chunk-UHIGZJQL.cjs");
|
|
28
28
|
var import_chunk_OIFPM5ZW = require("./chunk-OIFPM5ZW.cjs");
|
|
29
29
|
var import_app_framework = require("@dxos/app-framework");
|
|
30
30
|
var import_invariant = require("@dxos/invariant");
|
|
@@ -36,9 +36,9 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
36
36
|
intent: import_chunk_TREVKZCJ.ClientAction.CreateIdentity,
|
|
37
37
|
resolve: async () => {
|
|
38
38
|
const manager = context.requestCapability(import_app_framework.Capabilities.PluginManager);
|
|
39
|
-
const client = context.requestCapability(
|
|
39
|
+
const client = context.requestCapability(import_chunk_T4K27K2F.ClientCapabilities.Client);
|
|
40
40
|
const data = await client.halo.createIdentity();
|
|
41
|
-
await manager.activate(
|
|
41
|
+
await manager.activate(import_chunk_FR2K56EV.ClientEvents.IdentityCreated);
|
|
42
42
|
return {
|
|
43
43
|
data,
|
|
44
44
|
intents: [
|
|
@@ -56,7 +56,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
56
56
|
intents: [
|
|
57
57
|
(0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
|
|
58
58
|
part: "dialog",
|
|
59
|
-
subject:
|
|
59
|
+
subject: import_chunk_UTG3UR3N.JOIN_DIALOG,
|
|
60
60
|
options: {
|
|
61
61
|
blockAlign: "start",
|
|
62
62
|
props: {
|
|
@@ -76,7 +76,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
76
76
|
intents: [
|
|
77
77
|
(0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
|
|
78
78
|
part: "dialog",
|
|
79
|
-
subject:
|
|
79
|
+
subject: import_chunk_UTG3UR3N.IDENTITY_DIALOG,
|
|
80
80
|
options: {
|
|
81
81
|
blockAlign: "start"
|
|
82
82
|
}
|
|
@@ -95,7 +95,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
95
95
|
intents: [
|
|
96
96
|
(0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
|
|
97
97
|
part: "dialog",
|
|
98
|
-
subject:
|
|
98
|
+
subject: import_chunk_UTG3UR3N.JOIN_DIALOG,
|
|
99
99
|
options: {
|
|
100
100
|
blockAlign: "start",
|
|
101
101
|
props: {
|
|
@@ -118,7 +118,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
118
118
|
(0, import_app_framework.createResolver)({
|
|
119
119
|
intent: import_chunk_TREVKZCJ.ClientAction.CreateAgent,
|
|
120
120
|
resolve: async () => {
|
|
121
|
-
const client = context.requestCapability(
|
|
121
|
+
const client = context.requestCapability(import_chunk_T4K27K2F.ClientCapabilities.Client);
|
|
122
122
|
(0, import_invariant.invariant)(client.services.services.EdgeAgentService, "Missing EdgeAgentService", {
|
|
123
123
|
F: __dxlog_file,
|
|
124
124
|
L: 106,
|
|
@@ -136,7 +136,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
136
136
|
(0, import_app_framework.createResolver)({
|
|
137
137
|
intent: import_chunk_TREVKZCJ.ClientAction.CreateRecoveryCode,
|
|
138
138
|
resolve: async () => {
|
|
139
|
-
const client = context.requestCapability(
|
|
139
|
+
const client = context.requestCapability(import_chunk_T4K27K2F.ClientCapabilities.Client);
|
|
140
140
|
(0, import_invariant.invariant)(client.services.services.IdentityService, "IdentityService not available", {
|
|
141
141
|
F: __dxlog_file,
|
|
142
142
|
L: 114,
|
|
@@ -151,7 +151,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
151
151
|
intents: [
|
|
152
152
|
(0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
|
|
153
153
|
part: "dialog",
|
|
154
|
-
subject:
|
|
154
|
+
subject: import_chunk_UTG3UR3N.RECOVER_CODE_DIALOG,
|
|
155
155
|
options: {
|
|
156
156
|
blockAlign: "start",
|
|
157
157
|
type: "alert",
|
|
@@ -167,7 +167,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
167
167
|
(0, import_app_framework.createResolver)({
|
|
168
168
|
intent: import_chunk_TREVKZCJ.ClientAction.CreatePasskey,
|
|
169
169
|
resolve: async () => {
|
|
170
|
-
const client = context.requestCapability(
|
|
170
|
+
const client = context.requestCapability(import_chunk_T4K27K2F.ClientCapabilities.Client);
|
|
171
171
|
const identity = client.halo.identity.get();
|
|
172
172
|
(0, import_invariant.invariant)(identity, "Identity not available", {
|
|
173
173
|
F: __dxlog_file,
|
|
@@ -240,7 +240,7 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
240
240
|
(0, import_app_framework.createResolver)({
|
|
241
241
|
intent: import_chunk_TREVKZCJ.ClientAction.RedeemPasskey,
|
|
242
242
|
resolve: async () => {
|
|
243
|
-
const client = context.requestCapability(
|
|
243
|
+
const client = context.requestCapability(import_chunk_T4K27K2F.ClientCapabilities.Client);
|
|
244
244
|
(0, import_invariant.invariant)(client.services.services.IdentityService, "IdentityService not available", {
|
|
245
245
|
F: __dxlog_file,
|
|
246
246
|
L: 182,
|
|
@@ -272,4 +272,4 @@ var intent_resolver_default = ({ context, appName = "Composer", onReset }) => (0
|
|
|
272
272
|
}
|
|
273
273
|
})
|
|
274
274
|
]);
|
|
275
|
-
//# sourceMappingURL=intent-resolver-
|
|
275
|
+
//# sourceMappingURL=intent-resolver-PWCHHNV3.cjs.map
|