@dxos/plugin-client 0.8.1-staging.391c573 → 0.8.1-staging.97aedb1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs +119 -0
- package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OLUST5AO.mjs → chunk-4PLF3BEB.mjs} +2 -2
- package/dist/lib/browser/{chunk-7DPLXOMO.mjs → chunk-AN7FJKIJ.mjs} +21 -4
- package/dist/lib/browser/{chunk-7DPLXOMO.mjs.map → chunk-AN7FJKIJ.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-XK4HM5M7.mjs → chunk-BGY6BSUC.mjs} +3 -2
- package/dist/lib/browser/{chunk-XK4HM5M7.mjs.map → chunk-BGY6BSUC.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-NHIL4T3L.mjs → chunk-MCEXD5XH.mjs} +1 -1
- package/dist/lib/browser/{chunk-NHIL4T3L.mjs.map → chunk-MCEXD5XH.mjs.map} +2 -2
- package/dist/lib/browser/chunk-XZ4TQC56.mjs +619 -0
- package/dist/lib/browser/chunk-XZ4TQC56.mjs.map +7 -0
- package/dist/lib/browser/{client-UUGITHCW.mjs → client-LV67Q3R7.mjs} +5 -5
- package/dist/lib/browser/{client-UUGITHCW.mjs.map → client-LV67Q3R7.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +51 -22
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/{intent-resolver-AIUHL34E.mjs → intent-resolver-NCISOZW4.mjs} +65 -27
- package/dist/lib/browser/intent-resolver-NCISOZW4.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{migrations-XODC625X.mjs → migrations-3DWFOL5Q.mjs} +3 -3
- package/dist/lib/browser/{react-context-JBD7Y3SN.mjs → react-context-WEH7SL4I.mjs} +3 -3
- package/dist/lib/browser/react-surface-J7SZR2J6.mjs +66 -0
- package/dist/lib/browser/react-surface-J7SZR2J6.mjs.map +7 -0
- package/dist/lib/browser/{schema-Y7ZNXYSL.mjs → schema-JQAT6Q7S.mjs} +3 -3
- package/dist/lib/browser/types.mjs +4 -2
- package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs +130 -0
- package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs.map +7 -0
- package/dist/lib/node/chunk-3JE5BFCT.cjs +644 -0
- package/dist/lib/node/chunk-3JE5BFCT.cjs.map +7 -0
- package/dist/lib/node/{chunk-OIFPM5ZW.cjs → chunk-DJKWB5L6.cjs} +4 -4
- package/dist/lib/node/{chunk-OIFPM5ZW.cjs.map → chunk-DJKWB5L6.cjs.map} +2 -2
- package/dist/lib/node/{chunk-TREVKZCJ.cjs → chunk-FROKBEVH.cjs} +25 -7
- package/dist/lib/node/chunk-FROKBEVH.cjs.map +7 -0
- package/dist/lib/node/{chunk-FR2K56EV.cjs → chunk-W64EOF2B.cjs} +10 -10
- package/dist/lib/node/{chunk-T4K27K2F.cjs → chunk-ZVQIICEN.cjs} +9 -8
- package/dist/lib/node/{chunk-T4K27K2F.cjs.map → chunk-ZVQIICEN.cjs.map} +3 -3
- package/dist/lib/node/{client-5BHSU35T.cjs → client-BKTGRBYM.cjs} +9 -9
- package/dist/lib/node/{client-5BHSU35T.cjs.map → client-BKTGRBYM.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +70 -41
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/{intent-resolver-PWCHHNV3.cjs → intent-resolver-U2576ALY.cjs} +81 -44
- package/dist/lib/node/intent-resolver-U2576ALY.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{migrations-YCBZUPWO.cjs → migrations-TGNI4FVL.cjs} +8 -8
- package/dist/lib/node/{react-context-MPHNGZHT.cjs → react-context-SF3M3YLR.cjs} +8 -8
- package/dist/lib/node/{react-surface-TPISDIHR.cjs → react-surface-BSTIXMER.cjs} +34 -26
- package/dist/lib/node/react-surface-BSTIXMER.cjs.map +7 -0
- package/dist/lib/node/{schema-NMMCMK64.cjs → schema-INQ72F54.cjs} +8 -8
- package/dist/lib/node/types.cjs +5 -3
- package/dist/lib/node/types.cjs.map +2 -2
- package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs +120 -0
- package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QJMF2MWP.mjs → chunk-AD5W5QCQ.mjs} +21 -4
- package/dist/lib/node-esm/{chunk-QJMF2MWP.mjs.map → chunk-AD5W5QCQ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-XLLNVLWU.mjs → chunk-BP56BGZR.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-HO7WDE7C.mjs → chunk-HM7VB4ZV.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-HO7WDE7C.mjs.map → chunk-HM7VB4ZV.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-3OU2ZXLK.mjs → chunk-K3KGGSJZ.mjs} +3 -2
- package/dist/lib/node-esm/{chunk-3OU2ZXLK.mjs.map → chunk-K3KGGSJZ.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs +620 -0
- package/dist/lib/node-esm/chunk-LZN2UNN7.mjs.map +7 -0
- package/dist/lib/node-esm/{client-ZDGFGLX4.mjs → client-QQD6WFOB.mjs} +5 -5
- package/dist/lib/node-esm/{client-ZDGFGLX4.mjs.map → client-QQD6WFOB.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +51 -22
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/{intent-resolver-FIXGPH7C.mjs → intent-resolver-G25U4UGI.mjs} +65 -27
- package/dist/lib/node-esm/intent-resolver-G25U4UGI.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{migrations-VIEIPYJW.mjs → migrations-IVGATGZR.mjs} +3 -3
- package/dist/lib/node-esm/{react-context-KUEOXWWK.mjs → react-context-EAKKTE5A.mjs} +3 -3
- package/dist/lib/node-esm/react-surface-ZPI7T4EM.mjs +67 -0
- package/dist/lib/node-esm/react-surface-ZPI7T4EM.mjs.map +7 -0
- package/dist/lib/node-esm/{schema-NE5IYLMD.mjs → schema-OK7HY3JJ.mjs} +3 -3
- package/dist/lib/node-esm/types.mjs +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +4 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -3
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/DevicesContainer.d.ts +5 -0
- package/dist/types/src/components/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/components/DevicesContainer.stories.d.ts +8 -0
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProfileContainer.d.ts +3 -0
- package/dist/types/src/components/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/components/ProfileContainer.stories.d.ts +8 -0
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/RecoveryCodeDialog.d.ts +1 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts +4 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +8 -0
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResetDialog.d.ts +7 -0
- package/dist/types/src/components/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/components/ResetDialog.stories.d.ts +10 -0
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +17 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +26 -19
- package/src/ClientPlugin.ts +2 -2
- package/src/capabilities/app-graph-builder.ts +62 -6
- package/src/capabilities/capabilities.ts +1 -0
- package/src/capabilities/client.ts +1 -1
- package/src/capabilities/intent-resolver.ts +68 -23
- package/src/capabilities/react-surface.tsx +32 -24
- package/src/components/DevicesContainer.stories.tsx +45 -0
- package/src/components/DevicesContainer.tsx +270 -0
- package/src/components/ProfileContainer.stories.tsx +29 -0
- package/src/components/ProfileContainer.tsx +163 -0
- package/src/components/RecoveryCodeDialog.stories.tsx +2 -2
- package/src/components/RecoveryCodeDialog.tsx +1 -2
- package/src/components/{ManageCredentialsDialog.stories.tsx → RecoveryCredentialsContainer.stories.tsx} +4 -17
- package/src/components/RecoveryCredentialsContainer.tsx +74 -0
- package/src/components/ResetDialog.stories.tsx +47 -0
- package/src/components/ResetDialog.tsx +49 -0
- package/src/components/index.ts +4 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +45 -9
- package/src/types.ts +20 -1
- package/dist/lib/browser/app-graph-builder-ON64R7SO.mjs +0 -44
- package/dist/lib/browser/app-graph-builder-ON64R7SO.mjs.map +0 -7
- package/dist/lib/browser/chunk-HNJZ74DZ.mjs +0 -281
- package/dist/lib/browser/chunk-HNJZ74DZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AIUHL34E.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QGPWIUFR.mjs +0 -57
- package/dist/lib/browser/react-surface-QGPWIUFR.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-RW7ESEX3.cjs +0 -58
- package/dist/lib/node/app-graph-builder-RW7ESEX3.cjs.map +0 -7
- package/dist/lib/node/chunk-TREVKZCJ.cjs.map +0 -7
- package/dist/lib/node/chunk-UTG3UR3N.cjs +0 -309
- package/dist/lib/node/chunk-UTG3UR3N.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-PWCHHNV3.cjs.map +0 -7
- package/dist/lib/node/react-surface-TPISDIHR.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-TDYRWNI7.mjs +0 -45
- package/dist/lib/node-esm/app-graph-builder-TDYRWNI7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SHJBU4QR.mjs +0 -282
- package/dist/lib/node-esm/chunk-SHJBU4QR.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FIXGPH7C.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBROL4VH.mjs +0 -58
- package/dist/lib/node-esm/react-surface-KBROL4VH.mjs.map +0 -7
- package/dist/types/src/components/IdentityDialog.d.ts +0 -5
- package/dist/types/src/components/IdentityDialog.d.ts.map +0 -1
- package/dist/types/src/components/ManageCredentialsDialog.d.ts +0 -4
- package/dist/types/src/components/ManageCredentialsDialog.d.ts.map +0 -1
- package/dist/types/src/components/ManageCredentialsDialog.stories.d.ts +0 -8
- package/dist/types/src/components/ManageCredentialsDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoverySetupDialog.d.ts +0 -4
- package/dist/types/src/components/RecoverySetupDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoverySetupDialog.stories.d.ts +0 -8
- package/dist/types/src/components/RecoverySetupDialog.stories.d.ts.map +0 -1
- package/src/components/IdentityDialog.tsx +0 -75
- package/src/components/ManageCredentialsDialog.tsx +0 -64
- package/src/components/RecoverySetupDialog.stories.tsx +0 -77
- package/src/components/RecoverySetupDialog.tsx +0 -52
- /package/dist/lib/browser/{chunk-OLUST5AO.mjs.map → chunk-4PLF3BEB.mjs.map} +0 -0
- /package/dist/lib/browser/{migrations-XODC625X.mjs.map → migrations-3DWFOL5Q.mjs.map} +0 -0
- /package/dist/lib/browser/{react-context-JBD7Y3SN.mjs.map → react-context-WEH7SL4I.mjs.map} +0 -0
- /package/dist/lib/browser/{schema-Y7ZNXYSL.mjs.map → schema-JQAT6Q7S.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-FR2K56EV.cjs.map → chunk-W64EOF2B.cjs.map} +0 -0
- /package/dist/lib/node/{migrations-YCBZUPWO.cjs.map → migrations-TGNI4FVL.cjs.map} +0 -0
- /package/dist/lib/node/{react-context-MPHNGZHT.cjs.map → react-context-SF3M3YLR.cjs.map} +0 -0
- /package/dist/lib/node/{schema-NMMCMK64.cjs.map → schema-INQ72F54.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-XLLNVLWU.mjs.map → chunk-BP56BGZR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{migrations-VIEIPYJW.mjs.map → migrations-IVGATGZR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-context-KUEOXWWK.mjs.map → react-context-EAKKTE5A.mjs.map} +0 -0
- /package/dist/lib/node-esm/{schema-NE5IYLMD.mjs.map → schema-OK7HY3JJ.mjs.map} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
+
import { useClient } from '@dxos/react-client';
|
|
9
|
+
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { ConfirmReset, type ConfirmResetProps } from '@dxos/shell/react';
|
|
11
|
+
|
|
12
|
+
import { CLIENT_PLUGIN } from '../meta';
|
|
13
|
+
import { type ClientPluginOptions } from '../types';
|
|
14
|
+
|
|
15
|
+
export const RESET_DIALOG = `${CLIENT_PLUGIN}/ResetDialog`;
|
|
16
|
+
|
|
17
|
+
export type ResetDialogProps = Pick<ConfirmResetProps, 'mode'> & Pick<ClientPluginOptions, 'onReset'>;
|
|
18
|
+
|
|
19
|
+
export const ResetDialog = ({ mode, onReset }: ResetDialogProps) => {
|
|
20
|
+
const { t } = useTranslation(CLIENT_PLUGIN);
|
|
21
|
+
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
22
|
+
const client = useClient();
|
|
23
|
+
|
|
24
|
+
const handleReset = useCallback(async () => {
|
|
25
|
+
await client.reset();
|
|
26
|
+
const target =
|
|
27
|
+
mode === 'join new identity' ? 'deviceInvitation' : mode === 'recover' ? 'recoverIdentity' : undefined;
|
|
28
|
+
await onReset?.({ target });
|
|
29
|
+
}, [dispatch, client, mode, onReset]);
|
|
30
|
+
|
|
31
|
+
const handleCancel = useCallback(() => {
|
|
32
|
+
void dispatch(
|
|
33
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
34
|
+
part: 'dialog',
|
|
35
|
+
options: { state: false },
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
}, [dispatch]);
|
|
39
|
+
|
|
40
|
+
// TODO(wittjosiah): Add the sr-only translations.
|
|
41
|
+
// TODO(wittjosiah): Add missing descriptions to other dialogs.
|
|
42
|
+
return (
|
|
43
|
+
<Dialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>
|
|
44
|
+
<Dialog.Title classNames='sr-only'>{t('reset dialog title')}</Dialog.Title>
|
|
45
|
+
<Dialog.Description classNames='sr-only'>{t('reset dialog description')}</Dialog.Description>
|
|
46
|
+
<ConfirmReset active mode={mode} onConfirm={handleReset} onCancel={handleCancel} />
|
|
47
|
+
</Dialog.Content>
|
|
48
|
+
);
|
|
49
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './DevicesContainer';
|
|
6
6
|
export * from './JoinDialog';
|
|
7
|
+
export * from './ProfileContainer';
|
|
7
8
|
export * from './RecoveryCodeDialog';
|
|
8
|
-
export * from './
|
|
9
|
+
export * from './RecoveryCredentialsContainer';
|
|
10
|
+
export * from './ResetDialog';
|
package/src/meta.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -8,23 +8,59 @@ export default [
|
|
|
8
8
|
{
|
|
9
9
|
'en-US': {
|
|
10
10
|
[CLIENT_PLUGIN]: {
|
|
11
|
-
'
|
|
11
|
+
'account label': 'User Account',
|
|
12
|
+
'profile label': 'Profile',
|
|
13
|
+
'profile description': 'You can adjust how you’re represented in Composer here.',
|
|
14
|
+
'devices label': 'Devices',
|
|
15
|
+
'devices verbose label': 'Manage devices',
|
|
16
|
+
'add device description':
|
|
17
|
+
'Authenticating another device is a two-step process. To get started, create a code using the button below.',
|
|
18
|
+
'devices description':
|
|
19
|
+
'You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.',
|
|
20
|
+
'create device invitation label': 'Create code',
|
|
21
|
+
'qr code description':
|
|
22
|
+
'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',
|
|
23
|
+
'security label': 'Security',
|
|
24
|
+
'reset device description': 'Log out from this device, erasing all the data on this device.',
|
|
25
|
+
'join new identity description':
|
|
26
|
+
'Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log in.',
|
|
27
|
+
'recover identity description':
|
|
28
|
+
'Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log in.',
|
|
29
|
+
'danger zone title': 'Log out',
|
|
30
|
+
'danger zone description':
|
|
31
|
+
'Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you’d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer device invitation above.',
|
|
32
|
+
'display name label': 'Display name',
|
|
33
|
+
'display name description': 'Your name as it appears in the app.',
|
|
34
|
+
'display name input placeholder': 'Enter a name',
|
|
35
|
+
'icon label': 'Avatar',
|
|
36
|
+
'icon description': 'The emoji used to represent you in the app.',
|
|
37
|
+
'hue label': 'Color',
|
|
38
|
+
'hue description':
|
|
39
|
+
'The color used to represent you in the app, including as your avatar’s background, your cursor as it appears to others, and the messages you send in group threads.',
|
|
40
|
+
'did label': 'DID',
|
|
41
|
+
'did description': 'Your unique ID.',
|
|
42
|
+
'open user account label': 'Open user account',
|
|
12
43
|
'manage credentials dialog title': 'Manage Account Recovery',
|
|
13
|
-
'
|
|
44
|
+
'credentials list label': 'Recovery credentials',
|
|
45
|
+
'no credentials title': 'There’s no way to recover your account yet.',
|
|
46
|
+
'no credentials message': 'Create a recovery credential above to secure your account.',
|
|
47
|
+
'recovery setup dialog title': 'Account Security',
|
|
14
48
|
'recovery setup dialog description':
|
|
15
|
-
'In order to
|
|
49
|
+
'In order to maintain access to 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.',
|
|
16
50
|
'create passkey label': 'Create Passkey',
|
|
51
|
+
// TODO(wittjosiah): At link to user-focused passkey information.
|
|
52
|
+
// Something like https://www.tomsguide.com/news/what-are-passkeys.
|
|
17
53
|
'create passkey description':
|
|
18
|
-
'A passkey is a secure and easy to use credential that can be used to recover your
|
|
54
|
+
'A passkey is a secure and easy to use credential that can be used to recover your account.',
|
|
19
55
|
'create recovery code label': 'Create Recovery Code',
|
|
20
|
-
'create recovery code description': 'A recovery code is 12 word phrase representing a private
|
|
56
|
+
'create recovery code description': 'A recovery code is 12 word phrase representing a private key.',
|
|
21
57
|
'recovery code dialog title': 'Recovery Code',
|
|
22
58
|
'recovery code dialog description':
|
|
23
|
-
'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
|
|
24
|
-
'recovery code dialog warning 1': 'NOTE: This code will not be displayed
|
|
59
|
+
'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.',
|
|
60
|
+
'recovery code dialog warning 1': 'NOTE: This code will not be displayed again.',
|
|
25
61
|
'recovery code dialog warning 2':
|
|
26
|
-
'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your
|
|
27
|
-
'recovery code confirmation label': 'Please confirm you have saved the
|
|
62
|
+
'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',
|
|
63
|
+
'recovery code confirmation label': 'Please confirm you have saved the code.',
|
|
28
64
|
'continue label': 'Continue',
|
|
29
65
|
},
|
|
30
66
|
},
|
package/src/types.ts
CHANGED
|
@@ -50,7 +50,7 @@ export namespace ClientAction {
|
|
|
50
50
|
|
|
51
51
|
export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {
|
|
52
52
|
input: S.Struct({
|
|
53
|
-
|
|
53
|
+
mode: S.optional(S.String),
|
|
54
54
|
}),
|
|
55
55
|
output: S.Void,
|
|
56
56
|
}) {}
|
|
@@ -74,6 +74,13 @@ export namespace ClientAction {
|
|
|
74
74
|
input: S.Void,
|
|
75
75
|
output: S.Void,
|
|
76
76
|
}) {}
|
|
77
|
+
|
|
78
|
+
export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {
|
|
79
|
+
input: S.Struct({
|
|
80
|
+
token: S.String,
|
|
81
|
+
}),
|
|
82
|
+
output: S.Void,
|
|
83
|
+
}) {}
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
export type ClientPluginOptions = ClientOptions & {
|
|
@@ -97,3 +104,15 @@ export type ClientPluginOptions = ClientOptions & {
|
|
|
97
104
|
*/
|
|
98
105
|
onReset?: (params: { target?: string }) => MaybePromise<void>;
|
|
99
106
|
};
|
|
107
|
+
|
|
108
|
+
export namespace Account {
|
|
109
|
+
// TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.
|
|
110
|
+
const _id = 'dxos.org.plugin.client.account';
|
|
111
|
+
// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
|
|
112
|
+
// Ideally this should be worked into the data model in a generic way.
|
|
113
|
+
export const id = `!${_id}`;
|
|
114
|
+
|
|
115
|
+
export const Profile = `${_id}.profile`;
|
|
116
|
+
export const Devices = `${_id}.devices`;
|
|
117
|
+
export const Security = `${_id}.security`;
|
|
118
|
+
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ClientAction
|
|
3
|
-
} from "./chunk-7DPLXOMO.mjs";
|
|
4
|
-
import {
|
|
5
|
-
CLIENT_PLUGIN
|
|
6
|
-
} from "./chunk-NHIL4T3L.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-client/src/capabilities/app-graph-builder.ts
|
|
9
|
-
import { createIntent } from "@dxos/app-framework";
|
|
10
|
-
import { Capabilities, contributes } from "@dxos/app-framework";
|
|
11
|
-
import { createExtension } from "@dxos/plugin-graph";
|
|
12
|
-
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
13
|
-
id: CLIENT_PLUGIN,
|
|
14
|
-
filter: (node) => node.id === "root",
|
|
15
|
-
actions: () => [
|
|
16
|
-
{
|
|
17
|
-
id: `${CLIENT_PLUGIN}/open-shell`,
|
|
18
|
-
data: async () => {
|
|
19
|
-
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
20
|
-
await dispatch(createIntent(ClientAction.ShareIdentity));
|
|
21
|
-
},
|
|
22
|
-
properties: {
|
|
23
|
-
label: [
|
|
24
|
-
"open shell label",
|
|
25
|
-
{
|
|
26
|
-
ns: CLIENT_PLUGIN
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
icon: "ph--address-book--regular",
|
|
30
|
-
keyBinding: {
|
|
31
|
-
macos: "meta+shift+.",
|
|
32
|
-
// TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
|
|
33
|
-
windows: "alt+shift+.",
|
|
34
|
-
linux: "alt+shift+>"
|
|
35
|
-
},
|
|
36
|
-
testId: "clientPlugin.openShell"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}));
|
|
41
|
-
export {
|
|
42
|
-
app_graph_builder_default as default
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=app-graph-builder-ON64R7SO.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\n\nimport { CLIENT_PLUGIN } from '../meta';\nimport { ClientAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: `${CLIENT_PLUGIN}/open-shell`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\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"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,cAAcC,mBAAwC;AAC/D,SAASC,uBAAkC;AAK3C,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAI,GAAGC,aAAAA;MACPI,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,aAAaY,gBAAgB;AAC7F,cAAMF,SAASG,aAAaC,aAAaC,aAAa,CAAA;MACxD;MACAC,YAAY;QACVC,OAAO;UAAC;UAAoB;YAAEC,IAAId;UAAc;;QAChDe,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;QACAC,QAAQ;MACV;IACF;;AAEJ,CAAA,CAAA;",
|
|
6
|
-
"names": ["createIntent", "Capabilities", "contributes", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId"]
|
|
7
|
-
}
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ClientAction
|
|
3
|
-
} from "./chunk-7DPLXOMO.mjs";
|
|
4
|
-
import {
|
|
5
|
-
CLIENT_PLUGIN
|
|
6
|
-
} from "./chunk-NHIL4T3L.mjs";
|
|
7
|
-
|
|
8
|
-
// packages/plugins/plugin-client/src/components/ManageCredentialsDialog.tsx
|
|
9
|
-
import { Receipt, Key } from "@phosphor-icons/react";
|
|
10
|
-
import React, { useMemo } from "react";
|
|
11
|
-
import { createIntent, useIntentDispatcher } from "@dxos/app-framework";
|
|
12
|
-
import { useCredentials } from "@dxos/react-client/halo";
|
|
13
|
-
import { Dialog, Icon, List, ListItem, useTranslation } from "@dxos/react-ui";
|
|
14
|
-
import { BifurcatedAction } from "@dxos/shell/react";
|
|
15
|
-
var MANAGE_CREDENTIALS_DIALOG = `${CLIENT_PLUGIN}/ManageCredentialsDialog`;
|
|
16
|
-
var ManageCredentialsDialog = () => {
|
|
17
|
-
const { t } = useTranslation(CLIENT_PLUGIN);
|
|
18
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
19
|
-
const credentials = useCredentials();
|
|
20
|
-
const recoveryCredentials = credentials.filter((credential) => credential.subject.assertion["@type"] === "dxos.halo.credentials.IdentityRecovery");
|
|
21
|
-
const actions = useMemo(() => ({
|
|
22
|
-
createPasskey: {
|
|
23
|
-
label: t("create passkey label"),
|
|
24
|
-
description: t("create passkey description"),
|
|
25
|
-
// TODO(wittjosiah): Ideally this would be a `user-key` icon.
|
|
26
|
-
icon: Key,
|
|
27
|
-
onClick: () => dispatch(createIntent(ClientAction.CreatePasskey))
|
|
28
|
-
},
|
|
29
|
-
createRecoveryCode: {
|
|
30
|
-
label: t("create recovery code label"),
|
|
31
|
-
description: t("create recovery code description"),
|
|
32
|
-
icon: Receipt,
|
|
33
|
-
onClick: () => dispatch(createIntent(ClientAction.CreateRecoveryCode))
|
|
34
|
-
}
|
|
35
|
-
}), [
|
|
36
|
-
t
|
|
37
|
-
]);
|
|
38
|
-
return /* @__PURE__ */ React.createElement(Dialog.Content, {
|
|
39
|
-
classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[25rem] overflow-hidden"
|
|
40
|
-
}, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("manage credentials dialog title")), /* @__PURE__ */ React.createElement(List, {
|
|
41
|
-
classNames: "py-4"
|
|
42
|
-
}, recoveryCredentials.map((credential) => /* @__PURE__ */ React.createElement(ListItem.Root, {
|
|
43
|
-
key: credential.id?.toHex()
|
|
44
|
-
}, /* @__PURE__ */ React.createElement(ListItem.Endcap, null, /* @__PURE__ */ React.createElement(Icon, {
|
|
45
|
-
icon: "ph--key--regular",
|
|
46
|
-
size: 5
|
|
47
|
-
})), /* @__PURE__ */ React.createElement(ListItem.Heading, null, credential.issuanceDate.toLocaleString())))), /* @__PURE__ */ React.createElement("div", {
|
|
48
|
-
className: "grow"
|
|
49
|
-
}), /* @__PURE__ */ React.createElement(BifurcatedAction, {
|
|
50
|
-
actions
|
|
51
|
-
}));
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// packages/plugins/plugin-client/src/components/IdentityDialog.tsx
|
|
55
|
-
import React2, { useCallback } from "react";
|
|
56
|
-
import { createIntent as createIntent2, LayoutAction, useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework";
|
|
57
|
-
import { useClient } from "@dxos/react-client";
|
|
58
|
-
import { Clipboard, Dialog as Dialog2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
59
|
-
import { IdentityPanel } from "@dxos/shell/react";
|
|
60
|
-
var IDENTITY_DIALOG = `${CLIENT_PLUGIN}/IdentityDialog`;
|
|
61
|
-
var IdentityDialog = (props) => {
|
|
62
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher2();
|
|
63
|
-
const client = useClient();
|
|
64
|
-
const { t } = useTranslation2(CLIENT_PLUGIN);
|
|
65
|
-
const handleDone = useCallback(() => dispatch(createIntent2(LayoutAction.UpdateDialog, {
|
|
66
|
-
part: "dialog",
|
|
67
|
-
options: {
|
|
68
|
-
state: false
|
|
69
|
-
}
|
|
70
|
-
})), [
|
|
71
|
-
dispatch
|
|
72
|
-
]);
|
|
73
|
-
const handleResetStorage = useCallback(async () => {
|
|
74
|
-
await client.reset();
|
|
75
|
-
await dispatch(createIntent2(ClientAction.ResetStorage));
|
|
76
|
-
}, [
|
|
77
|
-
dispatch
|
|
78
|
-
]);
|
|
79
|
-
const handleRecover = useCallback(async () => {
|
|
80
|
-
await client.reset();
|
|
81
|
-
await dispatch(createIntent2(ClientAction.ResetStorage, {
|
|
82
|
-
target: "recoverIdentity"
|
|
83
|
-
}));
|
|
84
|
-
}, [
|
|
85
|
-
dispatch
|
|
86
|
-
]);
|
|
87
|
-
const handleJoinNewIdentity = useCallback(async () => {
|
|
88
|
-
await client.reset();
|
|
89
|
-
await dispatch(createIntent2(ClientAction.ResetStorage, {
|
|
90
|
-
target: "deviceInvitation"
|
|
91
|
-
}));
|
|
92
|
-
}, [
|
|
93
|
-
dispatch
|
|
94
|
-
]);
|
|
95
|
-
const handleManageCredentials = useCallback(async () => {
|
|
96
|
-
await dispatch(createIntent2(LayoutAction.UpdateDialog, {
|
|
97
|
-
part: "dialog",
|
|
98
|
-
subject: MANAGE_CREDENTIALS_DIALOG,
|
|
99
|
-
options: {
|
|
100
|
-
state: true,
|
|
101
|
-
blockAlign: "start"
|
|
102
|
-
}
|
|
103
|
-
}));
|
|
104
|
-
}, [
|
|
105
|
-
dispatch
|
|
106
|
-
]);
|
|
107
|
-
return /* @__PURE__ */ React2.createElement(Dialog2.Content, null, /* @__PURE__ */ React2.createElement(Dialog2.Title, {
|
|
108
|
-
classNames: "sr-only"
|
|
109
|
-
}, t("manage profile label", {
|
|
110
|
-
ns: "os"
|
|
111
|
-
})), /* @__PURE__ */ React2.createElement(Clipboard.Provider, null, /* @__PURE__ */ React2.createElement(IdentityPanel, {
|
|
112
|
-
...props,
|
|
113
|
-
doneActionParent: /* @__PURE__ */ React2.createElement(Dialog2.Close, {
|
|
114
|
-
asChild: true
|
|
115
|
-
}),
|
|
116
|
-
onDone: handleDone,
|
|
117
|
-
onResetStorage: handleResetStorage,
|
|
118
|
-
onRecover: handleRecover,
|
|
119
|
-
onJoinNewIdentity: handleJoinNewIdentity,
|
|
120
|
-
onManageCredentials: handleManageCredentials
|
|
121
|
-
})));
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// packages/plugins/plugin-client/src/components/JoinDialog.tsx
|
|
125
|
-
import React3, { useCallback as useCallback2 } from "react";
|
|
126
|
-
import { createIntent as createIntent3, LayoutAction as LayoutAction2, useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework";
|
|
127
|
-
import { ObservabilityAction } from "@dxos/plugin-observability/types";
|
|
128
|
-
import { Dialog as Dialog3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
129
|
-
import { JoinPanel } from "@dxos/shell/react";
|
|
130
|
-
var JOIN_DIALOG = `${CLIENT_PLUGIN}/JoinDialog`;
|
|
131
|
-
var JoinDialog = (props) => {
|
|
132
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher3();
|
|
133
|
-
const { t } = useTranslation3(CLIENT_PLUGIN);
|
|
134
|
-
const handleCancelResetStorage = useCallback2(() => dispatch(createIntent3(ClientAction.ShareIdentity)), [
|
|
135
|
-
dispatch
|
|
136
|
-
]);
|
|
137
|
-
const handleDone = useCallback2(async (result) => {
|
|
138
|
-
if (result?.identityKey) {
|
|
139
|
-
await Promise.all([
|
|
140
|
-
dispatch(createIntent3(LayoutAction2.UpdateDialog, {
|
|
141
|
-
part: "dialog",
|
|
142
|
-
options: {
|
|
143
|
-
state: false
|
|
144
|
-
}
|
|
145
|
-
})),
|
|
146
|
-
dispatch(createIntent3(ObservabilityAction.SendEvent, {
|
|
147
|
-
name: props.initialDisposition === "recover-identity" ? "identity.recover" : "identity.join"
|
|
148
|
-
}))
|
|
149
|
-
]);
|
|
150
|
-
}
|
|
151
|
-
}, [
|
|
152
|
-
dispatch
|
|
153
|
-
]);
|
|
154
|
-
return /* @__PURE__ */ React3.createElement(Dialog3.Content, null, /* @__PURE__ */ React3.createElement(Dialog3.Title, {
|
|
155
|
-
classNames: "sr-only"
|
|
156
|
-
}, t("join space label", {
|
|
157
|
-
ns: "os"
|
|
158
|
-
})), /* @__PURE__ */ React3.createElement(JoinPanel, {
|
|
159
|
-
mode: "halo-only",
|
|
160
|
-
...props,
|
|
161
|
-
exitActionParent: /* @__PURE__ */ React3.createElement(Dialog3.Close, {
|
|
162
|
-
asChild: true
|
|
163
|
-
}),
|
|
164
|
-
doneActionParent: /* @__PURE__ */ React3.createElement(Dialog3.Close, {
|
|
165
|
-
asChild: true
|
|
166
|
-
}),
|
|
167
|
-
onCancelResetStorage: handleCancelResetStorage,
|
|
168
|
-
onDone: handleDone
|
|
169
|
-
}));
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// packages/plugins/plugin-client/src/components/RecoveryCodeDialog.tsx
|
|
173
|
-
import React4, { useCallback as useCallback3, useState } from "react";
|
|
174
|
-
import { AlertDialog, Button, Clipboard as Clipboard2, Input, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
175
|
-
var RECOVER_CODE_DIALOG = `${CLIENT_PLUGIN}/RecoveryCodeDialog`;
|
|
176
|
-
var RecoveryCodeDialog = ({ code }) => {
|
|
177
|
-
const { t } = useTranslation4(CLIENT_PLUGIN);
|
|
178
|
-
const [confirmation, setConfirmation] = useState(false);
|
|
179
|
-
const handleConfirmation = useCallback3((checked) => setConfirmation(checked), []);
|
|
180
|
-
return /* @__PURE__ */ React4.createElement(AlertDialog.Content, {
|
|
181
|
-
classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
|
|
182
|
-
}, /* @__PURE__ */ React4.createElement(AlertDialog.Title, null, t("recovery code dialog title")), /* @__PURE__ */ React4.createElement("p", {
|
|
183
|
-
className: "py-4"
|
|
184
|
-
}, t("recovery code dialog description")), /* @__PURE__ */ React4.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React4.createElement(Code, {
|
|
185
|
-
code
|
|
186
|
-
})), /* @__PURE__ */ React4.createElement("div", {
|
|
187
|
-
className: "flex flex-col py-4 gap-2"
|
|
188
|
-
}, /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 1")), /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 2"))), /* @__PURE__ */ React4.createElement("div", {
|
|
189
|
-
className: "flex items-center gap-2 pbe-4"
|
|
190
|
-
}, /* @__PURE__ */ React4.createElement(Input.Root, null, /* @__PURE__ */ React4.createElement(Input.Checkbox, {
|
|
191
|
-
"data-testid": "recoveryCode.confirm",
|
|
192
|
-
checked: confirmation,
|
|
193
|
-
onCheckedChange: handleConfirmation
|
|
194
|
-
}), /* @__PURE__ */ React4.createElement(Input.Label, null, t("recovery code confirmation label")))), /* @__PURE__ */ React4.createElement("div", {
|
|
195
|
-
className: "flex justify-end"
|
|
196
|
-
}, /* @__PURE__ */ React4.createElement(AlertDialog.Action, {
|
|
197
|
-
asChild: true
|
|
198
|
-
}, /* @__PURE__ */ React4.createElement(Button, {
|
|
199
|
-
"data-testid": "recoveryCode.continue",
|
|
200
|
-
variant: "primary",
|
|
201
|
-
disabled: !confirmation
|
|
202
|
-
}, t("continue label")))));
|
|
203
|
-
};
|
|
204
|
-
var Code = ({ code }) => {
|
|
205
|
-
const words = code.split(" ");
|
|
206
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
207
|
-
className: "relative p-2 border border-separator rounded group"
|
|
208
|
-
}, /* @__PURE__ */ React4.createElement(Clipboard2.IconButton, {
|
|
209
|
-
value: code,
|
|
210
|
-
classNames: "absolute top-2 right-2 invisible group-hover:visible"
|
|
211
|
-
}), /* @__PURE__ */ React4.createElement("div", {
|
|
212
|
-
className: "grid grid-cols-4"
|
|
213
|
-
}, words.map((word, i) => /* @__PURE__ */ React4.createElement("div", {
|
|
214
|
-
key: i,
|
|
215
|
-
className: "flex items-center p-2 gap-2"
|
|
216
|
-
}, /* @__PURE__ */ React4.createElement("div", {
|
|
217
|
-
className: "w-4 text-xs text-center text-subdued"
|
|
218
|
-
}, i + 1), /* @__PURE__ */ React4.createElement("div", {
|
|
219
|
-
className: "text-sm"
|
|
220
|
-
}, word)))));
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
// packages/plugins/plugin-client/src/components/RecoverySetupDialog.tsx
|
|
224
|
-
import { Key as Key2, Receipt as Receipt2 } from "@phosphor-icons/react";
|
|
225
|
-
import React5, { useMemo as useMemo2 } from "react";
|
|
226
|
-
import { createIntent as createIntent4, LayoutAction as LayoutAction3, useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework";
|
|
227
|
-
import { AlertDialog as AlertDialog2, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
228
|
-
import { BifurcatedAction as BifurcatedAction2 } from "@dxos/shell/react";
|
|
229
|
-
var RECOVER_SETUP_DIALOG = `${CLIENT_PLUGIN}/RecoverySetupDialog`;
|
|
230
|
-
var RecoverySetupDialog = () => {
|
|
231
|
-
const { t } = useTranslation5(CLIENT_PLUGIN);
|
|
232
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher4();
|
|
233
|
-
const actions = useMemo2(() => ({
|
|
234
|
-
createPasskey: {
|
|
235
|
-
label: t("create passkey label"),
|
|
236
|
-
description: t("create passkey description"),
|
|
237
|
-
// TODO(wittjosiah): Ideally this would be a `user-key` icon.
|
|
238
|
-
icon: Key2,
|
|
239
|
-
onClick: async () => {
|
|
240
|
-
await dispatch(createIntent4(ClientAction.CreatePasskey));
|
|
241
|
-
await dispatch(createIntent4(LayoutAction3.UpdateDialog, {
|
|
242
|
-
part: "dialog",
|
|
243
|
-
options: {
|
|
244
|
-
state: false
|
|
245
|
-
}
|
|
246
|
-
}));
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
createRecoveryCode: {
|
|
250
|
-
label: t("create recovery code label"),
|
|
251
|
-
description: t("create recovery code description"),
|
|
252
|
-
icon: Receipt2,
|
|
253
|
-
onClick: () => dispatch(createIntent4(ClientAction.CreateRecoveryCode))
|
|
254
|
-
}
|
|
255
|
-
}), [
|
|
256
|
-
t
|
|
257
|
-
]);
|
|
258
|
-
return /* @__PURE__ */ React5.createElement(AlertDialog2.Content, {
|
|
259
|
-
classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[25rem] overflow-hidden"
|
|
260
|
-
}, /* @__PURE__ */ React5.createElement(AlertDialog2.Title, null, t("recovery setup dialog title")), /* @__PURE__ */ React5.createElement("p", {
|
|
261
|
-
className: "py-4"
|
|
262
|
-
}, t("recovery setup dialog description")), /* @__PURE__ */ React5.createElement("div", {
|
|
263
|
-
className: "grow"
|
|
264
|
-
}), /* @__PURE__ */ React5.createElement(BifurcatedAction2, {
|
|
265
|
-
actions
|
|
266
|
-
}));
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export {
|
|
270
|
-
MANAGE_CREDENTIALS_DIALOG,
|
|
271
|
-
ManageCredentialsDialog,
|
|
272
|
-
IDENTITY_DIALOG,
|
|
273
|
-
IdentityDialog,
|
|
274
|
-
JOIN_DIALOG,
|
|
275
|
-
JoinDialog,
|
|
276
|
-
RECOVER_CODE_DIALOG,
|
|
277
|
-
RecoveryCodeDialog,
|
|
278
|
-
RECOVER_SETUP_DIALOG,
|
|
279
|
-
RecoverySetupDialog
|
|
280
|
-
};
|
|
281
|
-
//# sourceMappingURL=chunk-HNJZ74DZ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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,SAASA,SAASC,WAAW;AAC7B,OAAOC,SAASC,eAAe;AAE/B,SAASC,cAAcC,2BAA2B;AAClD,SAASC,sBAAsB;AAC/B,SAASC,QAAQC,MAAMC,MAAMC,UAAUC,sBAAsB;AAC7D,SAASC,wBAA6C;AAK/C,IAAMC,4BAA4B,GAAGC,aAAAA;AAGrC,IAAMC,0BAA0B,MAAA;AACrC,QAAM,EAAEC,EAAC,IAAKC,eAAeH,aAAAA;AAC7B,QAAM,EAAEI,iBAAiBC,SAAQ,IAAKC,oBAAAA;AACtC,QAAMC,cAAcC,eAAAA;AACpB,QAAMC,sBAAsBF,YAAYG,OACtC,CAACC,eAAeA,WAAWC,QAAQC,UAAU,OAAA,MAAa,wCAAA;AAI5D,QAAMC,UAA0CC,QAC9C,OAAO;IACLC,eAAe;MACbC,OAAOf,EAAE,sBAAA;MACTgB,aAAahB,EAAE,4BAAA;;MAEfiB,MAAMC;MACNC,SAAS,MAAMhB,SAASiB,aAAaC,aAAaC,aAAa,CAAA;IACjE;IACAC,oBAAoB;MAClBR,OAAOf,EAAE,4BAAA;MACTgB,aAAahB,EAAE,kCAAA;MACfiB,MAAMO;MACNL,SAAS,MAAMhB,SAASiB,aAAaC,aAAaI,kBAAkB,CAAA;IACtE;EACF,IACA;IAACzB;GAAE;AAGL,SACE,sBAAA,cAAC0B,OAAOC,SAAO;IAACC,YAAW;KACzB,sBAAA,cAACF,OAAOG,OAAK,MAAE7B,EAAE,iCAAA,CAAA,GACjB,sBAAA,cAAC8B,MAAAA;IAAKF,YAAW;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", "useIntentDispatcher", "useCredentials", "Dialog", "Icon", "List", "ListItem", "useTranslation", "BifurcatedAction", "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", "Dialog", "Content", "classNames", "Title", "List", "map", "ListItem", "Root", "key", "id", "toHex", "Endcap", "Icon", "size", "Heading", "issuanceDate", "toLocaleString", "div", "className", "BifurcatedAction", "React", "useCallback", "createIntent", "LayoutAction", "useIntentDispatcher", "useClient", "Clipboard", "Dialog", "useTranslation", "IdentityPanel", "IDENTITY_DIALOG", "CLIENT_PLUGIN", "IdentityDialog", "props", "dispatchPromise", "dispatch", "useIntentDispatcher", "client", "useClient", "t", "useTranslation", "handleDone", "useCallback", "createIntent", "LayoutAction", "UpdateDialog", "part", "options", "state", "handleResetStorage", "reset", "ClientAction", "ResetStorage", "handleRecover", "target", "handleJoinNewIdentity", "handleManageCredentials", "subject", "MANAGE_CREDENTIALS_DIALOG", "blockAlign", "React", "Dialog", "Content", "Title", "classNames", "ns", "Clipboard", "Provider", "IdentityPanel", "doneActionParent", "Close", "asChild", "onDone", "onResetStorage", "onRecover", "onJoinNewIdentity", "onManageCredentials", "React", "useCallback", "createIntent", "LayoutAction", "useIntentDispatcher", "ObservabilityAction", "Dialog", "useTranslation", "JoinPanel", "JOIN_DIALOG", "CLIENT_PLUGIN", "JoinDialog", "props", "dispatchPromise", "dispatch", "useIntentDispatcher", "t", "useTranslation", "handleCancelResetStorage", "useCallback", "createIntent", "ClientAction", "ShareIdentity", "handleDone", "result", "identityKey", "Promise", "all", "LayoutAction", "UpdateDialog", "part", "options", "state", "ObservabilityAction", "SendEvent", "name", "initialDisposition", "React", "Dialog", "Content", "Title", "classNames", "ns", "JoinPanel", "mode", "exitActionParent", "Close", "asChild", "doneActionParent", "onCancelResetStorage", "onDone", "React", "useCallback", "useState", "AlertDialog", "Button", "Clipboard", "Input", "useTranslation", "RECOVER_CODE_DIALOG", "CLIENT_PLUGIN", "RecoveryCodeDialog", "code", "t", "useTranslation", "confirmation", "setConfirmation", "useState", "handleConfirmation", "useCallback", "checked", "React", "AlertDialog", "Content", "classNames", "Title", "p", "className", "Clipboard", "Provider", "Code", "div", "Input", "Root", "Checkbox", "data-testid", "onCheckedChange", "Label", "Action", "asChild", "Button", "variant", "disabled", "words", "split", "IconButton", "value", "map", "word", "i", "key", "Key", "Receipt", "React", "useMemo", "createIntent", "LayoutAction", "useIntentDispatcher", "AlertDialog", "useTranslation", "BifurcatedAction", "RECOVER_SETUP_DIALOG", "CLIENT_PLUGIN", "RecoverySetupDialog", "t", "useTranslation", "dispatchPromise", "dispatch", "useIntentDispatcher", "actions", "useMemo", "createPasskey", "label", "description", "icon", "Key", "onClick", "createIntent", "ClientAction", "CreatePasskey", "LayoutAction", "UpdateDialog", "part", "options", "state", "createRecoveryCode", "Receipt", "CreateRecoveryCode", "React", "AlertDialog", "Content", "classNames", "Title", "p", "className", "div", "BifurcatedAction"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n Capabilities,\n contributes,\n createIntent,\n createResolver,\n LayoutAction,\n type PluginsContext,\n} from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { ObservabilityAction } from '@dxos/plugin-observability/types';\nimport { PublicKey } from '@dxos/react-client';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport { ClientCapabilities } from './capabilities';\nimport { IDENTITY_DIALOG, JOIN_DIALOG, RECOVER_CODE_DIALOG } from '../components';\nimport { ClientEvents } from '../events';\nimport { ClientAction, type ClientPluginOptions } from '../types';\n\ntype IntentResolverOptions = Pick<ClientPluginOptions, 'onReset'> & {\n context: PluginsContext;\n appName?: string;\n};\n\nexport default ({ context, appName = 'Composer', onReset }: IntentResolverOptions) =>\n contributes(Capabilities.IntentResolver, [\n createResolver({\n intent: ClientAction.CreateIdentity,\n resolve: async () => {\n const manager = context.requestCapability(Capabilities.PluginManager);\n const client = context.requestCapability(ClientCapabilities.Client);\n const data = await client.halo.createIdentity();\n await manager.activate(ClientEvents.IdentityCreated);\n return { data, intents: [createIntent(ObservabilityAction.SendEvent, { name: 'identity.create' })] };\n },\n }),\n createResolver({\n intent: ClientAction.JoinIdentity,\n resolve: async (data) => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: JOIN_DIALOG,\n options: {\n blockAlign: 'start',\n props: {\n initialInvitationCode: data.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n },\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.ShareIdentity,\n resolve: async () => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: IDENTITY_DIALOG,\n options: {\n blockAlign: 'start',\n },\n }),\n createIntent(ObservabilityAction.SendEvent, { name: 'identity.share' }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.RecoverIdentity,\n resolve: async () => {\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: JOIN_DIALOG,\n options: {\n blockAlign: 'start',\n props: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.ResetStorage,\n resolve: async (data) => {\n await onReset?.({ target: data.target });\n },\n }),\n createResolver({\n intent: ClientAction.CreateAgent,\n resolve: async () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');\n await client.services.services.EdgeAgentService.createAgent(null as any, { timeout: 10_000 });\n },\n }),\n createResolver({\n intent: ClientAction.CreateRecoveryCode,\n resolve: async () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n // TODO(wittjosiah): This needs a proper api.\n const { recoveryCode } = await client.services.services.IdentityService.createRecoveryCredential({});\n return {\n intents: [\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: RECOVER_CODE_DIALOG,\n options: {\n blockAlign: 'start',\n type: 'alert',\n props: { code: recoveryCode },\n },\n }),\n ],\n };\n },\n }),\n createResolver({\n intent: ClientAction.CreatePasskey,\n resolve: async () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n // TODO(wittjosiah): Consider factoring out passkey creation to the halo api.\n const lookupKey = PublicKey.random();\n const credential = await navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: appName },\n user: {\n id: lookupKey.asUint8Array(),\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 }, // Ed25519 (not yet supported across all browsers)\n { type: 'public-key', alg: -7 }, // ES256\n ],\n // https://web.dev/articles/webauthn-discoverable-credentials#resident-key\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n });\n\n invariant(credential, 'Credential not available');\n const recoveryKey = PublicKey.from(new Uint8Array((credential as any).response.getPublicKey()));\n const algorithm = (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519';\n\n // TODO(wittjosiah): This needs a proper api.\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n await client.services.services.IdentityService.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n });\n },\n }),\n createResolver({\n intent: ClientAction.RedeemPasskey,\n resolve: async () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n // TODO(wittjosiah): This needs a proper api.\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { deviceKey, controlFeedKey, challenge } =\n await client.services.services.IdentityService.requestRecoveryChallenge();\n const credential = await navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n });\n const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));\n await client.services.services.IdentityService.recoverIdentity({\n external: {\n lookupKey,\n deviceKey,\n controlFeedKey,\n signature: Buffer.from((credential as any).response.signature),\n clientDataJson: Buffer.from((credential as any).response.clientDataJSON),\n authenticatorData: Buffer.from((credential as any).response.authenticatorData),\n },\n });\n },\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAIA,SACEA,cACAC,aACAC,cACAC,gBACAC,oBAEK;AACP,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AACpC,SAASC,iBAAiB;;AAa1B,IAAA,0BAAe,CAAC,EAAEC,SAASC,UAAU,YAAYC,QAAO,MACtDC,YAAYC,aAAaC,gBAAgB;EACvCC,eAAe;IACbC,QAAQC,aAAaC;IACrBC,SAAS,YAAA;AACP,YAAMC,UAAUX,QAAQY,kBAAkBR,aAAaS,aAAa;AACpE,YAAMC,SAASd,QAAQY,kBAAkBG,mBAAmBC,MAAM;AAClE,YAAMC,OAAO,MAAMH,OAAOI,KAAKC,eAAc;AAC7C,YAAMR,QAAQS,SAASC,aAAaC,eAAe;AACnD,aAAO;QAAEL;QAAMM,SAAS;UAACC,aAAaC,oBAAoBC,WAAW;YAAEC,MAAM;UAAkB,CAAA;;MAAI;IACrG;EACF,CAAA;EACArB,eAAe;IACbC,QAAQC,aAAaoB;IACrBlB,SAAS,OAAOO,SAAAA;AACd,aAAO;QACLM,SAAS;UACPC,aAAaK,aAAaC,cAAc;YACtCC,MAAM;YACNC,SAASC;YACTC,SAAS;cACPC,YAAY;cACZC,OAAO;gBACLC,uBAAuBpB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F,SAAS,YAAA;AACP,YAAMI,SAASd,QAAQY,kBAAkBG,mBAAmBC,MAAM;AAElE8B,gBAAUhC,OAAOiC,SAASA,SAASK,iBAAiB,iCAAA;;;;;;;;;AACpD,YAAM,EAAEwC,WAAWC,gBAAgBxB,UAAS,IAC1C,MAAMvD,OAAOiC,SAASA,SAASK,gBAAgB0C,yBAAwB;AACzE,YAAM9B,aAAa,MAAMC,UAAUC,YAAYN,IAAI;QACjDQ,WAAW;UACTC,WAAW0B,OAAOT,KAAKjB,WAAW,QAAA;UAClC2B,MAAMvB,SAASC;UACfuB,kBAAkB;QACpB;MACF,CAAA;AACA,YAAMpC,YAAYC,UAAUwB,KAAK,IAAIhB,WAAYN,WAAmBuB,SAASW,UAAU,CAAA;AACvF,YAAMpF,OAAOiC,SAASA,SAASK,gBAAgB+C,gBAAgB;QAC7DC,UAAU;UACRvC;UACA+B;UACAC;UACAQ,WAAWN,OAAOT,KAAMtB,WAAmBuB,SAASc,SAAS;UAC7DC,gBAAgBP,OAAOT,KAAMtB,WAAmBuB,SAASgB,cAAc;UACvEC,mBAAmBT,OAAOT,KAAMtB,WAAmBuB,SAASiB,iBAAiB;QAC/E;MACF,CAAA;IACF;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["Capabilities", "contributes", "createIntent", "createResolver", "LayoutAction", "invariant", "ObservabilityAction", "PublicKey", "context", "appName", "onReset", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "ClientAction", "CreateIdentity", "resolve", "manager", "requestCapability", "PluginManager", "client", "ClientCapabilities", "Client", "data", "halo", "createIdentity", "activate", "ClientEvents", "IdentityCreated", "intents", "createIntent", "ObservabilityAction", "SendEvent", "name", "JoinIdentity", "LayoutAction", "UpdateDialog", "part", "subject", "JOIN_DIALOG", "options", "blockAlign", "props", "initialInvitationCode", "invitationCode", "initialDisposition", "ShareIdentity", "IDENTITY_DIALOG", "RecoverIdentity", "ResetStorage", "target", "CreateAgent", "invariant", "services", "EdgeAgentService", "createAgent", "timeout", "CreateRecoveryCode", "IdentityService", "recoveryCode", "createRecoveryCredential", "RECOVER_CODE_DIALOG", "type", "code", "CreatePasskey", "identity", "get", "lookupKey", "PublicKey", "random", "credential", "navigator", "credentials", "create", "publicKey", "challenge", "Uint8Array", "rp", "id", "location", "hostname", "user", "asUint8Array", "did", "displayName", "profile", "pubKeyCredParams", "alg", "authenticatorSelection", "residentKey", "requireResidentKey", "recoveryKey", "from", "response", "getPublicKey", "algorithm", "getPublicKeyAlgorithm", "RedeemPasskey", "deviceKey", "controlFeedKey", "requestRecoveryChallenge", "Buffer", "rpId", "userVerification", "userHandle", "recoverIdentity", "external", "signature", "clientDataJson", "clientDataJSON", "authenticatorData"]
|
|
7
|
-
}
|