@dxos/plugin-client 0.7.3-staging.cc8dd3e → 0.7.3
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-VCPHSTE7.mjs → chunk-FGUXUNOK.mjs} +3 -1
- package/dist/lib/browser/{chunk-VCPHSTE7.mjs.map → chunk-FGUXUNOK.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +111 -9
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/node/{chunk-JYQZCE2U.cjs → chunk-XYLDQWFV.cjs} +6 -4
- package/dist/lib/node/{chunk-JYQZCE2U.cjs.map → chunk-XYLDQWFV.cjs.map} +2 -2
- package/dist/lib/node/index.cjs +123 -23
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.cjs +5 -5
- package/dist/lib/node/meta.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/{chunk-4FDLD5H4.mjs → chunk-C6X363FK.mjs} +3 -1
- package/dist/lib/node-esm/{chunk-4FDLD5H4.mjs.map → chunk-C6X363FK.mjs.map} +2 -2
- package/dist/lib/node-esm/index.mjs +111 -9
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/meta.mjs +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/components/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts +6 -0
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/ClientPlugin.tsx +34 -1
- package/src/components/IdentityDialog.tsx +4 -4
- package/src/components/RecoveryCodeDialog.tsx +58 -0
- package/src/components/index.ts +1 -0
- package/src/meta.ts +2 -0
- package/src/translations.ts +7 -0
package/dist/lib/node/index.cjs
CHANGED
|
@@ -33,11 +33,12 @@ __export(node_exports, {
|
|
|
33
33
|
parseClientPlugin: () => parseClientPlugin
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(node_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_XYLDQWFV = require("./chunk-XYLDQWFV.cjs");
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_app_framework = require("@dxos/app-framework");
|
|
39
39
|
var import_config = require("@dxos/config");
|
|
40
40
|
var import_react2 = require("@dxos/echo-signals/react");
|
|
41
|
+
var import_invariant = require("@dxos/invariant");
|
|
41
42
|
var import_plugin_graph = require("@dxos/plugin-graph");
|
|
42
43
|
var import_react_client = require("@dxos/react-client");
|
|
43
44
|
var import_react3 = __toESM(require("react"));
|
|
@@ -49,6 +50,8 @@ var import_react5 = __toESM(require("react"));
|
|
|
49
50
|
var import_app_framework3 = require("@dxos/app-framework");
|
|
50
51
|
var import_react_ui2 = require("@dxos/react-ui");
|
|
51
52
|
var import_react6 = require("@dxos/shell/react");
|
|
53
|
+
var import_react7 = __toESM(require("react"));
|
|
54
|
+
var import_react_ui3 = require("@dxos/react-ui");
|
|
52
55
|
var IdentityDialog = (props) => {
|
|
53
56
|
const dispatch = (0, import_app_framework2.useIntentDispatcher)();
|
|
54
57
|
const client = (0, import_react_client2.useClient)();
|
|
@@ -64,7 +67,7 @@ var IdentityDialog = (props) => {
|
|
|
64
67
|
const handleResetStorage = (0, import_react3.useCallback)(async () => {
|
|
65
68
|
await client.reset();
|
|
66
69
|
await dispatch({
|
|
67
|
-
action:
|
|
70
|
+
action: import_chunk_XYLDQWFV.ClientAction.RESET_STORAGE
|
|
68
71
|
});
|
|
69
72
|
}, [
|
|
70
73
|
dispatch
|
|
@@ -72,7 +75,7 @@ var IdentityDialog = (props) => {
|
|
|
72
75
|
const handleRecover = (0, import_react3.useCallback)(async () => {
|
|
73
76
|
await client.reset();
|
|
74
77
|
await dispatch({
|
|
75
|
-
action:
|
|
78
|
+
action: import_chunk_XYLDQWFV.ClientAction.RESET_STORAGE,
|
|
76
79
|
data: {
|
|
77
80
|
target: "recoverIdentity"
|
|
78
81
|
}
|
|
@@ -83,7 +86,7 @@ var IdentityDialog = (props) => {
|
|
|
83
86
|
const handleJoinNewIdentity = (0, import_react3.useCallback)(async () => {
|
|
84
87
|
await client.reset();
|
|
85
88
|
await dispatch({
|
|
86
|
-
action:
|
|
89
|
+
action: import_chunk_XYLDQWFV.ClientAction.RESET_STORAGE,
|
|
87
90
|
data: {
|
|
88
91
|
target: "deviceInvitation"
|
|
89
92
|
}
|
|
@@ -91,7 +94,7 @@ var IdentityDialog = (props) => {
|
|
|
91
94
|
}, [
|
|
92
95
|
dispatch
|
|
93
96
|
]);
|
|
94
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Dialog.Content, null, /* @__PURE__ */ import_react3.default.createElement(
|
|
97
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Dialog.Content, null, /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Clipboard.Provider, null, /* @__PURE__ */ import_react3.default.createElement(import_react4.IdentityPanel, {
|
|
95
98
|
...props,
|
|
96
99
|
doneActionParent: /* @__PURE__ */ import_react3.default.createElement(import_react_ui.Dialog.Close, {
|
|
97
100
|
asChild: true
|
|
@@ -105,8 +108,8 @@ var IdentityDialog = (props) => {
|
|
|
105
108
|
var JoinDialog = (props) => {
|
|
106
109
|
const dispatch = (0, import_app_framework3.useIntentDispatcher)();
|
|
107
110
|
const handleCancelResetStorage = (0, import_react5.useCallback)(() => dispatch({
|
|
108
|
-
plugin:
|
|
109
|
-
action:
|
|
111
|
+
plugin: import_chunk_XYLDQWFV.CLIENT_PLUGIN,
|
|
112
|
+
action: import_chunk_XYLDQWFV.ClientAction.SHARE_IDENTITY
|
|
110
113
|
}), [
|
|
111
114
|
dispatch
|
|
112
115
|
]);
|
|
@@ -121,7 +124,7 @@ var JoinDialog = (props) => {
|
|
|
121
124
|
}
|
|
122
125
|
}),
|
|
123
126
|
dispatch({
|
|
124
|
-
action:
|
|
127
|
+
action: import_chunk_XYLDQWFV.OBSERVABILITY_ACTION,
|
|
125
128
|
data: {
|
|
126
129
|
name: props.initialDisposition === "recover-identity" ? "identity.recover" : "identity.join"
|
|
127
130
|
}
|
|
@@ -144,15 +147,61 @@ var JoinDialog = (props) => {
|
|
|
144
147
|
onDone: handleDone
|
|
145
148
|
}));
|
|
146
149
|
};
|
|
150
|
+
var RecoveryCodeDialog = ({ code }) => {
|
|
151
|
+
const { t } = (0, import_react_ui3.useTranslation)(import_chunk_XYLDQWFV.CLIENT_PLUGIN);
|
|
152
|
+
const [confirmation, setConfirmation] = (0, import_react7.useState)(false);
|
|
153
|
+
const handleConfirmation = (0, import_react7.useCallback)((checked) => setConfirmation(checked), []);
|
|
154
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.AlertDialog.Content, {
|
|
155
|
+
classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
|
|
156
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.AlertDialog.Title, {
|
|
157
|
+
classNames: ""
|
|
158
|
+
}, t("recovery code dialog title")), /* @__PURE__ */ import_react7.default.createElement("p", {
|
|
159
|
+
className: "py-4"
|
|
160
|
+
}, t("recovery code dialog description")), /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Clipboard.Provider, null, /* @__PURE__ */ import_react7.default.createElement(Code, {
|
|
161
|
+
value: code
|
|
162
|
+
})), /* @__PURE__ */ import_react7.default.createElement("p", {
|
|
163
|
+
className: "py-4"
|
|
164
|
+
}, t("recovery code dialog warning")), /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
165
|
+
className: "flex items-center gap-2 pbe-4"
|
|
166
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Input.Root, null, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Input.Checkbox, {
|
|
167
|
+
"data-testid": "recoveryCode.confirm",
|
|
168
|
+
checked: confirmation,
|
|
169
|
+
onCheckedChange: handleConfirmation
|
|
170
|
+
}), /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Input.Label, null, t("recovery code confirmation label")))), /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
171
|
+
className: "flex justify-end"
|
|
172
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.AlertDialog.Action, {
|
|
173
|
+
asChild: true
|
|
174
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Button, {
|
|
175
|
+
"data-testid": "recoveryCode.continue",
|
|
176
|
+
variant: "primary",
|
|
177
|
+
disabled: !confirmation
|
|
178
|
+
}, t("continue label")))));
|
|
179
|
+
};
|
|
180
|
+
var Code = ({ value }) => {
|
|
181
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", {
|
|
182
|
+
className: "relative p-2 border border-separator rounded group"
|
|
183
|
+
}, /* @__PURE__ */ import_react7.default.createElement(import_react_ui3.Clipboard.IconButton, {
|
|
184
|
+
value,
|
|
185
|
+
classNames: "absolute top-2 right-2 invisible group-hover:visible"
|
|
186
|
+
}), /* @__PURE__ */ import_react7.default.createElement("code", {
|
|
187
|
+
className: "whitespace-pre-wrap"
|
|
188
|
+
}, value));
|
|
189
|
+
};
|
|
147
190
|
var translations_default = [
|
|
148
191
|
{
|
|
149
192
|
"en-US": {
|
|
150
|
-
[
|
|
151
|
-
"open shell label": "Open HALO"
|
|
193
|
+
[import_chunk_XYLDQWFV.CLIENT_PLUGIN]: {
|
|
194
|
+
"open shell label": "Open HALO",
|
|
195
|
+
"recovery code dialog title": "Recovery Code",
|
|
196
|
+
"recovery code dialog description": "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.",
|
|
197
|
+
"recovery code dialog warning": "Please note: This code will not be displayed again and cannot be replaced. It is your private key for recovering DXOS data. Anyone with this key will also be able to gain access to your account.",
|
|
198
|
+
"recovery code confirmation label": "Confirm the code has been saved",
|
|
199
|
+
"continue label": "Continue"
|
|
152
200
|
}
|
|
153
201
|
}
|
|
154
202
|
}
|
|
155
203
|
];
|
|
204
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-client/src/ClientPlugin.tsx";
|
|
156
205
|
var parseClientPlugin = (plugin) => (plugin?.provides).client instanceof import_react_client.Client ? plugin : void 0;
|
|
157
206
|
var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitationParam = "deviceInvitationCode", onClientInitialized, onReady, onReset, ...options }) => {
|
|
158
207
|
(0, import_react2.registerSignalsRuntime)();
|
|
@@ -164,7 +213,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
164
213
|
return baseUrl.toString();
|
|
165
214
|
};
|
|
166
215
|
return {
|
|
167
|
-
meta:
|
|
216
|
+
meta: import_chunk_XYLDQWFV.meta_default,
|
|
168
217
|
initialize: async () => {
|
|
169
218
|
const config = new import_config.Config(await (0, import_config.Storage)(), (0, import_config.Envs)(), (0, import_config.Local)(), (0, import_config.Defaults)());
|
|
170
219
|
client = new import_react_client.Client({
|
|
@@ -213,6 +262,8 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
213
262
|
});
|
|
214
263
|
} else if (data.component === "dxos.org/plugin/client/JoinDialog") {
|
|
215
264
|
return /* @__PURE__ */ import_react.default.createElement(JoinDialog, data.subject);
|
|
265
|
+
} else if (data.component === "dxos.org/plugin/client/RecoveryCodeDialog") {
|
|
266
|
+
return /* @__PURE__ */ import_react.default.createElement(RecoveryCodeDialog, data.subject);
|
|
216
267
|
}
|
|
217
268
|
break;
|
|
218
269
|
}
|
|
@@ -222,9 +273,9 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
222
273
|
graph: {
|
|
223
274
|
builder: (plugins) => {
|
|
224
275
|
const intentPlugin = (0, import_app_framework.resolvePlugin)(plugins, import_app_framework.parseIntentPlugin);
|
|
225
|
-
const id = `${
|
|
276
|
+
const id = `${import_chunk_XYLDQWFV.CLIENT_PLUGIN}/open-shell`;
|
|
226
277
|
return (0, import_plugin_graph.createExtension)({
|
|
227
|
-
id:
|
|
278
|
+
id: import_chunk_XYLDQWFV.CLIENT_PLUGIN,
|
|
228
279
|
filter: (node) => node.id === "root",
|
|
229
280
|
actions: () => [
|
|
230
281
|
{
|
|
@@ -232,8 +283,8 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
232
283
|
data: async () => {
|
|
233
284
|
await intentPlugin?.provides.intent.dispatch([
|
|
234
285
|
{
|
|
235
|
-
plugin:
|
|
236
|
-
action:
|
|
286
|
+
plugin: import_chunk_XYLDQWFV.CLIENT_PLUGIN,
|
|
287
|
+
action: import_chunk_XYLDQWFV.ClientAction.SHARE_IDENTITY
|
|
237
288
|
}
|
|
238
289
|
]);
|
|
239
290
|
},
|
|
@@ -241,7 +292,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
241
292
|
label: [
|
|
242
293
|
"open shell label",
|
|
243
294
|
{
|
|
244
|
-
ns:
|
|
295
|
+
ns: import_chunk_XYLDQWFV.CLIENT_PLUGIN
|
|
245
296
|
}
|
|
246
297
|
],
|
|
247
298
|
icon: "ph--address-book--regular",
|
|
@@ -261,14 +312,14 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
261
312
|
intent: {
|
|
262
313
|
resolver: async (intent) => {
|
|
263
314
|
switch (intent.action) {
|
|
264
|
-
case
|
|
315
|
+
case import_chunk_XYLDQWFV.ClientAction.CREATE_IDENTITY: {
|
|
265
316
|
const data = await client.halo.createIdentity();
|
|
266
317
|
return {
|
|
267
318
|
data,
|
|
268
319
|
intents: [
|
|
269
320
|
[
|
|
270
321
|
{
|
|
271
|
-
action:
|
|
322
|
+
action: import_chunk_XYLDQWFV.OBSERVABILITY_ACTION,
|
|
272
323
|
data: {
|
|
273
324
|
name: "identity.create"
|
|
274
325
|
}
|
|
@@ -277,7 +328,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
277
328
|
]
|
|
278
329
|
};
|
|
279
330
|
}
|
|
280
|
-
case
|
|
331
|
+
case import_chunk_XYLDQWFV.ClientAction.JOIN_IDENTITY: {
|
|
281
332
|
return {
|
|
282
333
|
data: true,
|
|
283
334
|
intents: [
|
|
@@ -298,7 +349,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
298
349
|
]
|
|
299
350
|
};
|
|
300
351
|
}
|
|
301
|
-
case
|
|
352
|
+
case import_chunk_XYLDQWFV.ClientAction.SHARE_IDENTITY: {
|
|
302
353
|
return {
|
|
303
354
|
data: true,
|
|
304
355
|
intents: [
|
|
@@ -314,7 +365,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
314
365
|
],
|
|
315
366
|
[
|
|
316
367
|
{
|
|
317
|
-
action:
|
|
368
|
+
action: import_chunk_XYLDQWFV.OBSERVABILITY_ACTION,
|
|
318
369
|
data: {
|
|
319
370
|
name: "identity.share"
|
|
320
371
|
}
|
|
@@ -323,7 +374,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
323
374
|
]
|
|
324
375
|
};
|
|
325
376
|
}
|
|
326
|
-
case
|
|
377
|
+
case import_chunk_XYLDQWFV.ClientAction.RECOVER_IDENTITY: {
|
|
327
378
|
return {
|
|
328
379
|
data: true,
|
|
329
380
|
intents: [
|
|
@@ -343,7 +394,7 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
343
394
|
]
|
|
344
395
|
};
|
|
345
396
|
}
|
|
346
|
-
case
|
|
397
|
+
case import_chunk_XYLDQWFV.ClientAction.RESET_STORAGE: {
|
|
347
398
|
await onReset?.({
|
|
348
399
|
target: intent.data?.target
|
|
349
400
|
});
|
|
@@ -351,6 +402,55 @@ var ClientPlugin = ({ appKey, invitationUrl = window.location.origin, invitation
|
|
|
351
402
|
data: true
|
|
352
403
|
};
|
|
353
404
|
}
|
|
405
|
+
case import_chunk_XYLDQWFV.ClientAction.CREATE_AGENT: {
|
|
406
|
+
(0, import_invariant.invariant)(client.services.services.EdgeAgentService, "Missing EdgeAgentService", {
|
|
407
|
+
F: __dxlog_file,
|
|
408
|
+
L: 283,
|
|
409
|
+
S: void 0,
|
|
410
|
+
A: [
|
|
411
|
+
"client.services.services.EdgeAgentService",
|
|
412
|
+
"'Missing EdgeAgentService'"
|
|
413
|
+
]
|
|
414
|
+
});
|
|
415
|
+
await client.services.services.EdgeAgentService.createAgent(null, {
|
|
416
|
+
timeout: 1e4
|
|
417
|
+
});
|
|
418
|
+
return {
|
|
419
|
+
data: true
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
case import_chunk_XYLDQWFV.ClientAction.CREATE_RECOVERY_CODE: {
|
|
423
|
+
(0, import_invariant.invariant)(client.services.services.IdentityService, "IdentityService not available", {
|
|
424
|
+
F: __dxlog_file,
|
|
425
|
+
L: 289,
|
|
426
|
+
S: void 0,
|
|
427
|
+
A: [
|
|
428
|
+
"client.services.services.IdentityService",
|
|
429
|
+
"'IdentityService not available'"
|
|
430
|
+
]
|
|
431
|
+
});
|
|
432
|
+
const { seedphrase } = await client.services.services.IdentityService.createRecoveryPhrase();
|
|
433
|
+
return {
|
|
434
|
+
data: true,
|
|
435
|
+
intents: [
|
|
436
|
+
[
|
|
437
|
+
{
|
|
438
|
+
action: import_app_framework.LayoutAction.SET_LAYOUT,
|
|
439
|
+
data: {
|
|
440
|
+
element: "dialog",
|
|
441
|
+
dialogBlockAlign: "start",
|
|
442
|
+
dialogType: "alert",
|
|
443
|
+
state: true,
|
|
444
|
+
component: "dxos.org/plugin/client/RecoveryCodeDialog",
|
|
445
|
+
subject: {
|
|
446
|
+
code: seedphrase
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
]
|
|
452
|
+
};
|
|
453
|
+
}
|
|
354
454
|
}
|
|
355
455
|
}
|
|
356
456
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ClientPlugin.tsx", "../../../src/components/IdentityDialog.tsx", "../../../src/components/JoinDialog.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n LayoutAction,\n parseIntentPlugin,\n resolvePlugin,\n type SurfaceProvides,\n type GraphBuilderProvides,\n type IntentResolverProvides,\n type Plugin,\n type PluginDefinition,\n type TranslationsProvides,\n} from '@dxos/app-framework';\nimport { Config, Defaults, Envs, Local, Storage } from '@dxos/config';\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { Client, type ClientOptions, ClientProvider } from '@dxos/react-client';\nimport { type IdentityPanelProps, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { IdentityDialog, JoinDialog } from './components';\nimport meta, { CLIENT_PLUGIN, ClientAction, OBSERVABILITY_ACTION } from './meta';\nimport translations from './translations';\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Used to track app-specific state in spaces.\n */\n appKey: string;\n\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?: (client: Client) => Promise<void>;\n\n /**\n * Run after the identity has been successfully initialized.\n * Run with client during plugin ready phase.\n */\n onReady?: (client: Client, plugins: Plugin[]) => Promise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => Promise<void>;\n};\n\nexport type ClientPluginProvides = IntentResolverProvides &\n GraphBuilderProvides &\n SurfaceProvides &\n TranslationsProvides & {\n client: Client;\n };\n\nexport const parseClientPlugin = (plugin?: Plugin) =>\n (plugin?.provides as any).client instanceof Client ? (plugin as Plugin<ClientPluginProvides>) : undefined;\n\nexport const ClientPlugin = ({\n appKey,\n invitationUrl = window.location.origin,\n invitationParam = 'deviceInvitationCode',\n onClientInitialized,\n onReady,\n onReset,\n ...options\n}: ClientPluginOptions): PluginDefinition<\n Omit<ClientPluginProvides, 'client'>,\n Pick<ClientPluginProvides, 'client'>\n> => {\n registerSignalsRuntime();\n\n let client: Client;\n let error: unknown = null;\n\n const createDeviceInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationUrl);\n baseUrl.searchParams.set(invitationParam, invitationCode);\n return baseUrl.toString();\n };\n\n return {\n meta,\n initialize: async () => {\n const config = new Config(await Storage(), Envs(), Local(), Defaults());\n client = new Client({ config, ...options });\n\n try {\n await client.initialize();\n await onClientInitialized?.(client);\n\n // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.\n client.reloaded.on(() => {\n client.halo.identity.subscribe(async (identity) => {\n if (identity) {\n window.location.href = window.location.origin;\n }\n });\n });\n } catch (err) {\n error = err;\n }\n\n return {\n client,\n context: ({ children }) => <ClientProvider client={client}>{children}</ClientProvider>,\n };\n },\n ready: async (plugins) => {\n if (error) {\n throw error;\n }\n\n await onReady?.(client, plugins);\n },\n unload: async () => {\n await client.destroy();\n },\n provides: {\n translations,\n surface: {\n component: ({ data, role, ...rest }) => {\n switch (role) {\n case 'dialog':\n if (data.component === 'dxos.org/plugin/client/IdentityDialog') {\n return (\n <IdentityDialog\n {...(data.subject as IdentityPanelProps)}\n createInvitationUrl={createDeviceInvitationUrl}\n />\n );\n } else if (data.component === 'dxos.org/plugin/client/JoinDialog') {\n return <JoinDialog {...(data.subject as JoinPanelProps)} />;\n }\n break;\n }\n\n return null;\n },\n },\n graph: {\n builder: (plugins) => {\n const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n const id = `${CLIENT_PLUGIN}/open-shell`;\n\n return createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id,\n data: async () => {\n await intentPlugin?.provides.intent.dispatch([\n { plugin: CLIENT_PLUGIN, action: ClientAction.SHARE_IDENTITY },\n ]);\n },\n properties: {\n label: ['open shell label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--address-book--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 testId: 'clientPlugin.openShell',\n },\n },\n ],\n });\n },\n },\n intent: {\n resolver: async (intent) => {\n switch (intent.action) {\n case ClientAction.CREATE_IDENTITY: {\n const data = await client.halo.createIdentity();\n return {\n data,\n intents: [\n [\n {\n action: OBSERVABILITY_ACTION,\n data: {\n name: 'identity.create',\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.JOIN_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/JoinDialog',\n dialogBlockAlign: 'start',\n subject: {\n initialInvitationCode: intent.data?.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n } satisfies Partial<JoinPanelProps>,\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.SHARE_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/IdentityDialog',\n dialogBlockAlign: 'start',\n },\n },\n ],\n [\n {\n action: OBSERVABILITY_ACTION,\n data: {\n name: 'identity.share',\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.RECOVER_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/JoinDialog',\n dialogBlockAlign: 'start',\n subject: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.RESET_STORAGE: {\n await onReset?.({ target: intent.data?.target });\n return { data: true };\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { useClient } from '@dxos/react-client';\nimport { Dialog } from '@dxos/react-ui';\nimport { ClipboardProvider, IdentityPanel, type IdentityPanelProps } from '@dxos/shell/react';\n\nimport { ClientAction } from '../meta';\n\nexport const IdentityDialog = (props: IdentityPanelProps) => {\n const dispatch = useIntentDispatcher();\n const client = useClient();\n\n const handleDone = useCallback(\n () =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n state: false,\n },\n }),\n [dispatch],\n );\n\n const handleResetStorage = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE });\n }, [dispatch]);\n\n const handleRecover = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE, data: { target: 'recoverIdentity' } });\n }, [dispatch]);\n\n const handleJoinNewIdentity = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE, data: { target: 'deviceInvitation' } });\n }, [dispatch]);\n\n return (\n <Dialog.Content>\n <ClipboardProvider>\n <IdentityPanel\n {...props}\n doneActionParent={<Dialog.Close asChild />}\n onDone={handleDone}\n onResetStorage={handleResetStorage}\n onRecover={handleRecover}\n onJoinNewIdentity={handleJoinNewIdentity}\n />\n </ClipboardProvider>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { type InvitationResult } from '@dxos/react-client/invitations';\nimport { Dialog } from '@dxos/react-ui';\nimport { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN, ClientAction, OBSERVABILITY_ACTION } from '../meta';\n\nexport const JoinDialog = (props: JoinPanelProps) => {\n const dispatch = useIntentDispatcher();\n\n const handleCancelResetStorage = useCallback(\n () => dispatch({ plugin: CLIENT_PLUGIN, action: ClientAction.SHARE_IDENTITY }),\n [dispatch],\n );\n\n const handleDone = useCallback(\n async (result: InvitationResult | null) => {\n if (result?.identityKey) {\n await Promise.all([\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n state: false,\n },\n }),\n dispatch({\n action: OBSERVABILITY_ACTION,\n data: {\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 <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 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 },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ClientPlugin } from './ClientPlugin';\n\nexport default ClientPlugin;\n\nexport * from './ClientPlugin';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAUO;AACP,oBAAuD;AACvD,IAAAA,gBAAuC;AACvC,0BAA2C;AAC3C,0BAA2D;
|
|
6
|
-
"names": ["import_react", "import_app_framework", "import_react_client", "import_react_ui", "IdentityDialog", "props", "dispatch", "useIntentDispatcher", "client", "useClient", "handleDone", "useCallback", "action", "LayoutAction", "SET_LAYOUT", "data", "element", "state", "handleResetStorage", "reset", "ClientAction", "RESET_STORAGE", "handleRecover", "target", "handleJoinNewIdentity", "React", "Dialog", "Content", "
|
|
3
|
+
"sources": ["../../../src/ClientPlugin.tsx", "../../../src/components/IdentityDialog.tsx", "../../../src/components/JoinDialog.tsx", "../../../src/components/RecoveryCodeDialog.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n LayoutAction,\n parseIntentPlugin,\n resolvePlugin,\n type SurfaceProvides,\n type GraphBuilderProvides,\n type IntentResolverProvides,\n type Plugin,\n type PluginDefinition,\n type TranslationsProvides,\n} from '@dxos/app-framework';\nimport { Config, Defaults, Envs, Local, Storage } from '@dxos/config';\nimport { registerSignalsRuntime } from '@dxos/echo-signals/react';\nimport { invariant } from '@dxos/invariant';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { Client, type ClientOptions, ClientProvider } from '@dxos/react-client';\nimport { type IdentityPanelProps, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { IdentityDialog, JoinDialog, RecoveryCodeDialog, type RecoveryCodeDialogProps } from './components';\nimport meta, { CLIENT_PLUGIN, ClientAction, OBSERVABILITY_ACTION } from './meta';\nimport translations from './translations';\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Used to track app-specific state in spaces.\n */\n appKey: string;\n\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?: (client: Client) => Promise<void>;\n\n /**\n * Run after the identity has been successfully initialized.\n * Run with client during plugin ready phase.\n */\n onReady?: (client: Client, plugins: Plugin[]) => Promise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => Promise<void>;\n};\n\nexport type ClientPluginProvides = IntentResolverProvides &\n GraphBuilderProvides &\n SurfaceProvides &\n TranslationsProvides & {\n client: Client;\n };\n\nexport const parseClientPlugin = (plugin?: Plugin) =>\n (plugin?.provides as any).client instanceof Client ? (plugin as Plugin<ClientPluginProvides>) : undefined;\n\nexport const ClientPlugin = ({\n appKey,\n invitationUrl = window.location.origin,\n invitationParam = 'deviceInvitationCode',\n onClientInitialized,\n onReady,\n onReset,\n ...options\n}: ClientPluginOptions): PluginDefinition<\n Omit<ClientPluginProvides, 'client'>,\n Pick<ClientPluginProvides, 'client'>\n> => {\n registerSignalsRuntime();\n\n let client: Client;\n let error: unknown = null;\n\n const createDeviceInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationUrl);\n baseUrl.searchParams.set(invitationParam, invitationCode);\n return baseUrl.toString();\n };\n\n return {\n meta,\n initialize: async () => {\n const config = new Config(await Storage(), Envs(), Local(), Defaults());\n client = new Client({ config, ...options });\n\n try {\n await client.initialize();\n await onClientInitialized?.(client);\n\n // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.\n client.reloaded.on(() => {\n client.halo.identity.subscribe(async (identity) => {\n if (identity) {\n window.location.href = window.location.origin;\n }\n });\n });\n } catch (err) {\n error = err;\n }\n\n return {\n client,\n context: ({ children }) => <ClientProvider client={client}>{children}</ClientProvider>,\n };\n },\n ready: async (plugins) => {\n if (error) {\n throw error;\n }\n\n await onReady?.(client, plugins);\n },\n unload: async () => {\n await client.destroy();\n },\n provides: {\n translations,\n surface: {\n component: ({ data, role, ...rest }) => {\n switch (role) {\n case 'dialog':\n if (data.component === 'dxos.org/plugin/client/IdentityDialog') {\n return (\n <IdentityDialog\n {...(data.subject as IdentityPanelProps)}\n createInvitationUrl={createDeviceInvitationUrl}\n />\n );\n } else if (data.component === 'dxos.org/plugin/client/JoinDialog') {\n return <JoinDialog {...(data.subject as JoinPanelProps)} />;\n } else if (data.component === 'dxos.org/plugin/client/RecoveryCodeDialog') {\n return <RecoveryCodeDialog {...(data.subject as RecoveryCodeDialogProps)} />;\n }\n break;\n }\n\n return null;\n },\n },\n graph: {\n builder: (plugins) => {\n const intentPlugin = resolvePlugin(plugins, parseIntentPlugin);\n const id = `${CLIENT_PLUGIN}/open-shell`;\n\n return createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id,\n data: async () => {\n await intentPlugin?.provides.intent.dispatch([\n { plugin: CLIENT_PLUGIN, action: ClientAction.SHARE_IDENTITY },\n ]);\n },\n properties: {\n label: ['open shell label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--address-book--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 testId: 'clientPlugin.openShell',\n },\n },\n ],\n });\n },\n },\n intent: {\n resolver: async (intent) => {\n switch (intent.action) {\n case ClientAction.CREATE_IDENTITY: {\n const data = await client.halo.createIdentity();\n return {\n data,\n intents: [\n [\n {\n action: OBSERVABILITY_ACTION,\n data: {\n name: 'identity.create',\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.JOIN_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/JoinDialog',\n dialogBlockAlign: 'start',\n subject: {\n initialInvitationCode: intent.data?.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n } satisfies Partial<JoinPanelProps>,\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.SHARE_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/IdentityDialog',\n dialogBlockAlign: 'start',\n },\n },\n ],\n [\n {\n action: OBSERVABILITY_ACTION,\n data: {\n name: 'identity.share',\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.RECOVER_IDENTITY: {\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n component: 'dxos.org/plugin/client/JoinDialog',\n dialogBlockAlign: 'start',\n subject: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n },\n },\n ],\n ],\n };\n }\n\n case ClientAction.RESET_STORAGE: {\n await onReset?.({ target: intent.data?.target });\n return { data: true };\n }\n\n case ClientAction.CREATE_AGENT: {\n invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');\n await client.services.services.EdgeAgentService.createAgent(null as any, { timeout: 10_000 });\n return { data: true };\n }\n\n case ClientAction.CREATE_RECOVERY_CODE: {\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n // TODO(wittjosiah): This needs a proper api. Rename property.\n const { seedphrase } = await client.services.services.IdentityService.createRecoveryPhrase();\n return {\n data: true,\n intents: [\n [\n {\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n dialogBlockAlign: 'start',\n dialogType: 'alert',\n state: true,\n component: 'dxos.org/plugin/client/RecoveryCodeDialog',\n subject: { code: seedphrase },\n },\n },\n ],\n ],\n };\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { useClient } from '@dxos/react-client';\nimport { Clipboard, Dialog } from '@dxos/react-ui';\nimport { IdentityPanel, type IdentityPanelProps } from '@dxos/shell/react';\n\nimport { ClientAction } from '../meta';\n\nexport const IdentityDialog = (props: IdentityPanelProps) => {\n const dispatch = useIntentDispatcher();\n const client = useClient();\n\n const handleDone = useCallback(\n () =>\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n state: false,\n },\n }),\n [dispatch],\n );\n\n const handleResetStorage = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE });\n }, [dispatch]);\n\n const handleRecover = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE, data: { target: 'recoverIdentity' } });\n }, [dispatch]);\n\n const handleJoinNewIdentity = useCallback(async () => {\n await client.reset();\n await dispatch({ action: ClientAction.RESET_STORAGE, data: { target: 'deviceInvitation' } });\n }, [dispatch]);\n\n return (\n <Dialog.Content>\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 />\n </Clipboard.Provider>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { type InvitationResult } from '@dxos/react-client/invitations';\nimport { Dialog } from '@dxos/react-ui';\nimport { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';\n\nimport { CLIENT_PLUGIN, ClientAction, OBSERVABILITY_ACTION } from '../meta';\n\nexport const JoinDialog = (props: JoinPanelProps) => {\n const dispatch = useIntentDispatcher();\n\n const handleCancelResetStorage = useCallback(\n () => dispatch({ plugin: CLIENT_PLUGIN, action: ClientAction.SHARE_IDENTITY }),\n [dispatch],\n );\n\n const handleDone = useCallback(\n async (result: InvitationResult | null) => {\n if (result?.identityKey) {\n await Promise.all([\n dispatch({\n action: LayoutAction.SET_LAYOUT,\n data: {\n element: 'dialog',\n state: false,\n },\n }),\n dispatch({\n action: OBSERVABILITY_ACTION,\n data: {\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 <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 type RecoveryCodeDialogProps = {\n code: string;\n};\n\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 classNames=''>{t('recovery code dialog title')}</AlertDialog.Title>\n <p className='py-4'>{t('recovery code dialog description')}</p>\n <Clipboard.Provider>\n <Code value={code} />\n </Clipboard.Provider>\n <p className='py-4'>{t('recovery code dialog warning')}</p>\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\n// TODO(wittjosiah): Factor out.\nconst Code = ({ value }: { value: string }) => {\n return (\n <div className='relative p-2 border border-separator rounded group'>\n <Clipboard.IconButton value={value} classNames='absolute top-2 right-2 invisible group-hover:visible' />\n <code className='whitespace-pre-wrap'>{value}</code>\n </div>\n );\n};\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 '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':\n 'Please note: This code will not be displayed again and cannot be replaced. It is your private key for recovering DXOS data. Anyone with this key will also be able to gain access to your account.',\n 'recovery code confirmation label': 'Confirm the code has been saved',\n 'continue label': 'Continue',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ClientPlugin } from './ClientPlugin';\n\nexport default ClientPlugin;\n\nexport * from './ClientPlugin';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAkB;AAElB,2BAUO;AACP,oBAAuD;AACvD,IAAAA,gBAAuC;AACvC,uBAA0B;AAC1B,0BAA2C;AAC3C,0BAA2D;ACjB3D,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAkD;AAClD,IAAAC,uBAA0B;AAC1B,sBAAkC;AAClC,IAAAF,gBAAuD;ACLvD,IAAAA,gBAAmC;AAEnC,IAAAC,wBAAkD;AAElD,IAAAE,mBAAuB;AACvB,IAAAH,gBAA+C;ACL/C,IAAAA,gBAA6C;AAE7C,IAAAG,mBAAsE;AFO/D,IAAMC,iBAAiB,CAACC,UAAAA;AAC7B,QAAMC,eAAWC,2CAAAA;AACjB,QAAMC,aAASC,gCAAAA;AAEf,QAAMC,iBAAaC,2BACjB,MACEL,SAAS;IACPM,QAAQC,mCAAaC;IACrBC,MAAM;MACJC,SAAS;MACTC,OAAO;IACT;EACF,CAAA,GACF;IAACX;GAAS;AAGZ,QAAMY,yBAAqBP,2BAAY,YAAA;AACrC,UAAMH,OAAOW,MAAK;AAClB,UAAMb,SAAS;MAAEM,QAAQQ,mCAAaC;IAAc,CAAA;EACtD,GAAG;IAACf;GAAS;AAEb,QAAMgB,oBAAgBX,2BAAY,YAAA;AAChC,UAAMH,OAAOW,MAAK;AAClB,UAAMb,SAAS;MAAEM,QAAQQ,mCAAaC;MAAeN,MAAM;QAAEQ,QAAQ;MAAkB;IAAE,CAAA;EAC3F,GAAG;IAACjB;GAAS;AAEb,QA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H,WAAW;wBACX8B,kBAAkB;wBAClB3B,SAAS;0BACPpF,oBAAoB;wBACtB;sBACF;oBACF;;;cAGN;YACF;YAEA,KAAK7B,mCAAaC,eAAe;AAC/B,oBAAM0E,UAAU;gBAAExE,QAAQ0H,OAAOlI,MAAMQ;cAAO,CAAA;AAC9C,qBAAO;gBAAER,MAAM;cAAK;YACtB;YAEA,KAAKK,mCAAa+I,cAAc;AAC9BC,8CAAU5J,OAAO6J,SAASA,SAASC,kBAAkB,4BAAA;;;;;;;;;AACrD,oBAAM9J,OAAO6J,SAASA,SAASC,iBAAiBC,YAAY,MAAa;gBAAEC,SAAS;cAAO,CAAA;AAC3F,qBAAO;gBAAEzJ,MAAM;cAAK;YACtB;YAEA,KAAKK,mCAAaqJ,sBAAsB;AACtCL,8CAAU5J,OAAO6J,SAASA,SAASK,iBAAiB,iCAAA;;;;;;;;;AAEpD,oBAAM,EAAEC,WAAU,IAAK,MAAMnK,OAAO6J,SAASA,SAASK,gBAAgBE,qBAAoB;AAC1F,qBAAO;gBACL7J,MAAM;gBACN+I,SAAS;kBACP;oBACE;sBACElJ,QAAQC,qBAAAA,aAAaC;sBACrBC,MAAM;wBACJC,SAAS;wBACTgJ,kBAAkB;wBAClBa,YAAY;wBACZ5J,OAAO;wBACPiH,WAAW;wBACXG,SAAS;0BAAE9E,MAAMoH;wBAAW;sBAC9B;oBACF;;;cAGN;YACF;UACF;QACF;MACF;IACF;EACF;AACF;AKrTA,IAAA,cAAerF;",
|
|
6
|
+
"names": ["import_react", "import_app_framework", "import_react_client", "import_react_ui", "IdentityDialog", "props", "dispatch", "useIntentDispatcher", "client", "useClient", "handleDone", "useCallback", "action", "LayoutAction", "SET_LAYOUT", "data", "element", "state", "handleResetStorage", "reset", "ClientAction", "RESET_STORAGE", "handleRecover", "target", "handleJoinNewIdentity", "React", "Dialog", "Content", "Clipboard", "Provider", "IdentityPanel", "doneActionParent", "Close", "asChild", "onDone", "onResetStorage", "onRecover", "onJoinNewIdentity", "JoinDialog", "handleCancelResetStorage", "plugin", "CLIENT_PLUGIN", "SHARE_IDENTITY", "result", "identityKey", "Promise", "all", "OBSERVABILITY_ACTION", "name", "initialDisposition", "JoinPanel", "mode", "exitActionParent", "onCancelResetStorage", "RecoveryCodeDialog", "code", "t", "useTranslation", "confirmation", "setConfirmation", "useState", "handleConfirmation", "checked", "AlertDialog", "classNames", "Title", "p", "className", "Code", "value", "div", "Input", "Root", "Checkbox", "data-testid", "onCheckedChange", "Label", "Action", "Button", "variant", "disabled", "IconButton", "parseClientPlugin", "provides", "Client", "undefined", "ClientPlugin", "appKey", "invitationUrl", "window", "location", "origin", "invitationParam", "onClientInitialized", "onReady", "onReset", "options", "registerSignalsRuntime", "error", "createDeviceInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "meta", "initialize", "config", "Config", "Storage", "Envs", "Local", "Defaults", "reloaded", "on", "halo", "identity", "subscribe", "href", "err", "context", "children", "ClientProvider", "ready", "plugins", "unload", "destroy", "translations", "surface", "component", "role", "rest", "subject", "createInvitationUrl", "graph", "builder", "intentPlugin", "resolvePlugin", "parseIntentPlugin", "id", "createExtension", "filter", "node", "actions", "intent", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId", "resolver", "CREATE_IDENTITY", "createIdentity", "intents", "JOIN_IDENTITY", "dialogBlockAlign", "initialInvitationCode", "RECOVER_IDENTITY", "CREATE_AGENT", "invariant", "services", "EdgeAgentService", "createAgent", "timeout", "CREATE_RECOVERY_CODE", "IdentityService", "seedphrase", "createRecoveryPhrase", "dialogType"]
|
|
7
7
|
}
|
package/dist/lib/node/meta.cjs
CHANGED
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var meta_exports = {};
|
|
20
20
|
__export(meta_exports, {
|
|
21
|
-
CLIENT_PLUGIN: () =>
|
|
22
|
-
ClientAction: () =>
|
|
23
|
-
OBSERVABILITY_ACTION: () =>
|
|
24
|
-
default: () =>
|
|
21
|
+
CLIENT_PLUGIN: () => import_chunk_XYLDQWFV.CLIENT_PLUGIN,
|
|
22
|
+
ClientAction: () => import_chunk_XYLDQWFV.ClientAction,
|
|
23
|
+
OBSERVABILITY_ACTION: () => import_chunk_XYLDQWFV.OBSERVABILITY_ACTION,
|
|
24
|
+
default: () => import_chunk_XYLDQWFV.meta_default
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(meta_exports);
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_XYLDQWFV = require("./chunk-XYLDQWFV.cjs");
|
|
28
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
29
29
|
0 && (module.exports = {
|
|
30
30
|
CLIENT_PLUGIN,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["meta.cjs"],
|
|
4
|
-
"sourcesContent": ["import {\n CLIENT_PLUGIN,\n ClientAction,\n OBSERVABILITY_ACTION,\n meta_default\n} from \"./chunk-
|
|
4
|
+
"sourcesContent": ["import {\n CLIENT_PLUGIN,\n ClientAction,\n OBSERVABILITY_ACTION,\n meta_default\n} from \"./chunk-XYLDQWFV.cjs\";\nexport {\n CLIENT_PLUGIN,\n ClientAction,\n OBSERVABILITY_ACTION,\n meta_default as default\n};\n//# sourceMappingURL=meta.cjs.map\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-client/src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-client/src/meta.ts":{"bytes":3419,"imports":[],"format":"esm"},"packages/plugins/plugin-client/src/components/IdentityDialog.tsx":{"bytes":6572,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/shell/react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-client/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-client/src/components/JoinDialog.tsx":{"bytes":6031,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/shell/react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-client/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-client/src/components/RecoveryCodeDialog.tsx":{"bytes":7403,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-client/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-client/src/components/index.ts":{"bytes":739,"imports":[{"path":"packages/plugins/plugin-client/src/components/IdentityDialog.tsx","kind":"import-statement","original":"./IdentityDialog"},{"path":"packages/plugins/plugin-client/src/components/JoinDialog.tsx","kind":"import-statement","original":"./JoinDialog"},{"path":"packages/plugins/plugin-client/src/components/RecoveryCodeDialog.tsx","kind":"import-statement","original":"./RecoveryCodeDialog"}],"format":"esm"},"packages/plugins/plugin-client/src/translations.ts":{"bytes":2616,"imports":[{"path":"packages/plugins/plugin-client/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-client/src/ClientPlugin.tsx":{"bytes":35879,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/config","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-client/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-client/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-client/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"packages/plugins/plugin-client/src/index.ts":{"bytes":782,"imports":[{"path":"packages/plugins/plugin-client/src/ClientPlugin.tsx","kind":"import-statement","original":"./ClientPlugin"},{"path":"packages/plugins/plugin-client/src/ClientPlugin.tsx","kind":"import-statement","original":"./ClientPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-client/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27352},"packages/plugins/plugin-client/dist/lib/node/index.cjs":{"imports":[{"path":"packages/plugins/plugin-client/dist/lib/node/chunk-XYLDQWFV.cjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/config","kind":"import-statement","external":true},{"path":"@dxos/echo-signals/react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/shell/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/shell/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["ClientPlugin","default","parseClientPlugin"],"entryPoint":"packages/plugins/plugin-client/src/index.ts","inputs":{"packages/plugins/plugin-client/src/ClientPlugin.tsx":{"bytesInOutput":9038},"packages/plugins/plugin-client/src/components/IdentityDialog.tsx":{"bytesInOutput":1642},"packages/plugins/plugin-client/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-client/src/components/JoinDialog.tsx":{"bytesInOutput":1474},"packages/plugins/plugin-client/src/components/RecoveryCodeDialog.tsx":{"bytesInOutput":2208},"packages/plugins/plugin-client/src/translations.ts":{"bytesInOutput":735},"packages/plugins/plugin-client/src/index.ts":{"bytesInOutput":32}},"bytes":15772},"packages/plugins/plugin-client/dist/lib/node/meta.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-client/dist/lib/node/meta.cjs":{"imports":[{"path":"packages/plugins/plugin-client/dist/lib/node/chunk-XYLDQWFV.cjs","kind":"import-statement"}],"exports":["CLIENT_PLUGIN","ClientAction","OBSERVABILITY_ACTION","default"],"entryPoint":"packages/plugins/plugin-client/src/meta.ts","inputs":{},"bytes":241},"packages/plugins/plugin-client/dist/lib/node/chunk-XYLDQWFV.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1464},"packages/plugins/plugin-client/dist/lib/node/chunk-XYLDQWFV.cjs":{"imports":[],"exports":["CLIENT_PLUGIN","ClientAction","OBSERVABILITY_ACTION","meta_default"],"inputs":{"packages/plugins/plugin-client/src/meta.ts":{"bytesInOutput":1062}},"bytes":1237}}}
|
|
@@ -14,6 +14,8 @@ var ClientAction;
|
|
|
14
14
|
ClientAction2[ClientAction2["SHARE_IDENTITY"] = `${CLIENT_ACTION}/SHARE_IDENTITY`] = "SHARE_IDENTITY";
|
|
15
15
|
ClientAction2[ClientAction2["RECOVER_IDENTITY"] = `${CLIENT_ACTION}/RECOVER_IDENTITY`] = "RECOVER_IDENTITY";
|
|
16
16
|
ClientAction2[ClientAction2["RESET_STORAGE"] = `${CLIENT_ACTION}/RESET_STORAGE`] = "RESET_STORAGE";
|
|
17
|
+
ClientAction2[ClientAction2["CREATE_AGENT"] = `${CLIENT_ACTION}/CREATE_AGENT`] = "CREATE_AGENT";
|
|
18
|
+
ClientAction2[ClientAction2["CREATE_RECOVERY_CODE"] = `${CLIENT_ACTION}/CREATE_RECOVERY_CODE`] = "CREATE_RECOVERY_CODE";
|
|
17
19
|
})(ClientAction || (ClientAction = {}));
|
|
18
20
|
var OBSERVABILITY_ACTION = "dxos.org/plugin/observability/send-event";
|
|
19
21
|
|
|
@@ -23,4 +25,4 @@ export {
|
|
|
23
25
|
ClientAction,
|
|
24
26
|
OBSERVABILITY_ACTION
|
|
25
27
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-C6X363FK.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 default {\n id: CLIENT_PLUGIN,\n name: 'Client',\n} satisfies PluginMeta;\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport enum ClientAction {\n CREATE_IDENTITY = `${CLIENT_ACTION}/CREATE_IDENTITY`,\n JOIN_IDENTITY = `${CLIENT_ACTION}/JOIN_IDENTITY`,\n SHARE_IDENTITY = `${CLIENT_ACTION}/SHARE_IDENTITY`,\n RECOVER_IDENTITY = `${CLIENT_ACTION}/RECOVER_IDENTITY`,\n RESET_STORAGE = `${CLIENT_ACTION}/RESET_STORAGE`,\n}\n\n// NOTE: This action is hardcoded to avoid circular dependency with observability plugin.\nexport const OBSERVABILITY_ACTION = 'dxos.org/plugin/observability/send-event';\n"],
|
|
5
|
-
"mappings": ";;;AAMO,IAAMA,gBAAgB;AAE7B,IAAA,eAAe;EACbC,IAAID;EACJE,MAAM;AACR;AAEA,IAAMC,gBAAgB,GAAGH,aAAAA;;UACbI,eAAAA;mDACQ,GAAGD,aAAAA,kBAA+B,IAAA;iDACpC,GAAGA,aAAAA,gBAA6B,IAAA;kDAC/B,GAAGA,aAAAA,iBAA8B,IAAA;oDAC/B,GAAGA,aAAAA,mBAAgC,IAAA;iDACtC,GAAGA,aAAAA,gBAA6B,IAAA;
|
|
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 default {\n id: CLIENT_PLUGIN,\n name: 'Client',\n} satisfies PluginMeta;\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport enum ClientAction {\n CREATE_IDENTITY = `${CLIENT_ACTION}/CREATE_IDENTITY`,\n JOIN_IDENTITY = `${CLIENT_ACTION}/JOIN_IDENTITY`,\n SHARE_IDENTITY = `${CLIENT_ACTION}/SHARE_IDENTITY`,\n RECOVER_IDENTITY = `${CLIENT_ACTION}/RECOVER_IDENTITY`,\n RESET_STORAGE = `${CLIENT_ACTION}/RESET_STORAGE`,\n CREATE_AGENT = `${CLIENT_ACTION}/CREATE_AGENT`,\n CREATE_RECOVERY_CODE = `${CLIENT_ACTION}/CREATE_RECOVERY_CODE`,\n}\n\n// NOTE: This action is hardcoded to avoid circular dependency with observability plugin.\nexport const OBSERVABILITY_ACTION = 'dxos.org/plugin/observability/send-event';\n"],
|
|
5
|
+
"mappings": ";;;AAMO,IAAMA,gBAAgB;AAE7B,IAAA,eAAe;EACbC,IAAID;EACJE,MAAM;AACR;AAEA,IAAMC,gBAAgB,GAAGH,aAAAA;;UACbI,eAAAA;mDACQ,GAAGD,aAAAA,kBAA+B,IAAA;iDACpC,GAAGA,aAAAA,gBAA6B,IAAA;kDAC/B,GAAGA,aAAAA,iBAA8B,IAAA;oDAC/B,GAAGA,aAAAA,mBAAgC,IAAA;iDACtC,GAAGA,aAAAA,gBAA6B,IAAA;gDACjC,GAAGA,aAAAA,eAA4B,IAAA;wDACvB,GAAGA,aAAAA,uBAAoC,IAAA;GAPpDC,iBAAAA,eAAAA,CAAAA,EAAAA;AAWL,IAAMC,uBAAuB;",
|
|
6
6
|
"names": ["CLIENT_PLUGIN", "id", "name", "CLIENT_ACTION", "ClientAction", "OBSERVABILITY_ACTION"]
|
|
7
7
|
}
|