@dxos/plugin-client 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33
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-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-M37DHX5L.mjs +131 -0
- package/dist/lib/browser/chunk-M37DHX5L.mjs.map +7 -0
- package/dist/lib/browser/chunk-RPMM5NKJ.mjs +175 -0
- package/dist/lib/browser/chunk-RPMM5NKJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-VAIJSQYA.mjs +12 -0
- package/dist/lib/browser/chunk-VAIJSQYA.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1027 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-agent-JV3EM3TV.mjs +26 -0
- package/dist/lib/browser/create-agent-JV3EM3TV.mjs.map +7 -0
- package/dist/lib/browser/create-identity-ZITQKEVZ.mjs +30 -0
- package/dist/lib/browser/create-identity-ZITQKEVZ.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-NCP4XA7C.mjs +81 -0
- package/dist/lib/browser/create-passkey-NCP4XA7C.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-L5LA3GAP.mjs +36 -0
- package/dist/lib/browser/create-recovery-code-L5LA3GAP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +62 -141
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-identity-3W6PJLKN.mjs +27 -0
- package/dist/lib/browser/join-identity-3W6PJLKN.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/recover-identity-KL6QY4GI.mjs +26 -0
- package/dist/lib/browser/recover-identity-KL6QY4GI.mjs.map +7 -0
- package/dist/lib/browser/redeem-passkey-NDEWSJTM.mjs +66 -0
- package/dist/lib/browser/redeem-passkey-NDEWSJTM.mjs.map +7 -0
- package/dist/lib/browser/redeem-token-YLWAVFXD.mjs +29 -0
- package/dist/lib/browser/redeem-token-YLWAVFXD.mjs.map +7 -0
- package/dist/lib/browser/reset-storage-OBHEGA6Z.mjs +26 -0
- package/dist/lib/browser/reset-storage-OBHEGA6Z.mjs.map +7 -0
- package/dist/lib/browser/share-identity-FTFHFSZQ.mjs +31 -0
- package/dist/lib/browser/share-identity-FTFHFSZQ.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +22 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +74 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +14 -0
- package/dist/lib/node-esm/chunk-G77YYPR6.mjs +176 -0
- package/dist/lib/node-esm/chunk-G77YYPR6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OHKM7GJW.mjs +14 -0
- package/dist/lib/node-esm/chunk-OHKM7GJW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GDJMDBWM.mjs → chunk-UBY7FBQ7.mjs} +39 -18
- package/dist/lib/node-esm/chunk-UBY7FBQ7.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1028 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-agent-Y4BPVDV7.mjs +27 -0
- package/dist/lib/node-esm/create-agent-Y4BPVDV7.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-367SQSX6.mjs +31 -0
- package/dist/lib/node-esm/create-identity-367SQSX6.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-WMWK2ETT.mjs +82 -0
- package/dist/lib/node-esm/create-passkey-WMWK2ETT.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-VJGE5HJL.mjs +37 -0
- package/dist/lib/node-esm/create-recovery-code-VJGE5HJL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +62 -141
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-identity-IRIRO2VT.mjs +28 -0
- package/dist/lib/node-esm/join-identity-IRIRO2VT.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/recover-identity-LJCY4BCJ.mjs +27 -0
- package/dist/lib/node-esm/recover-identity-LJCY4BCJ.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-passkey-PT7QWFJE.mjs +67 -0
- package/dist/lib/node-esm/redeem-passkey-PT7QWFJE.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-token-BHKHEXJM.mjs +30 -0
- package/dist/lib/node-esm/redeem-token-BHKHEXJM.mjs.map +7 -0
- package/dist/lib/node-esm/reset-storage-VPUZJOUV.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-VPUZJOUV.mjs.map +7 -0
- package/dist/lib/node-esm/share-identity-SZ3REIRC.mjs +32 -0
- package/dist/lib/node-esm/share-identity-SZ3REIRC.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +23 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +75 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +15 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/ClientPlugin.d.ts +3 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +6 -7
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +28 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +3 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +21 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +4 -3
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +3 -2
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/cli/commands/config/index.d.ts +5 -0
- package/dist/types/src/cli/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/view.d.ts +5 -0
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/index.d.ts +7 -0
- package/dist/types/src/cli/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/util.d.ts +16 -0
- package/dist/types/src/cli/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/index.d.ts +5 -0
- package/dist/types/src/cli/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/status.d.ts +7 -0
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/index.d.ts +3 -0
- package/dist/types/src/cli/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/util.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +6 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/create.d.ts +10 -0
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/import.d.ts +17 -0
- package/dist/types/src/cli/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/index.d.ts +19 -0
- package/dist/types/src/cli/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/list.d.ts +6 -0
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/util.d.ts +24 -0
- package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/testing/test-console.d.ts +37 -0
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +4 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts +16 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +9 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +19 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +5 -0
- package/dist/types/src/operations/create-agent.d.ts.map +1 -0
- package/dist/types/src/operations/create-identity.d.ts +5 -0
- package/dist/types/src/operations/create-identity.d.ts.map +1 -0
- package/dist/types/src/operations/create-passkey.d.ts +5 -0
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +36 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/join-identity.d.ts +5 -0
- package/dist/types/src/operations/join-identity.d.ts.map +1 -0
- package/dist/types/src/operations/recover-identity.d.ts +5 -0
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-token.d.ts +5 -0
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
- package/dist/types/src/operations/reset-storage.d.ts +5 -0
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
- package/dist/types/src/operations/share-identity.d.ts +5 -0
- package/dist/types/src/operations/share-identity.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -48
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +9 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +42 -31
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +95 -51
- package/src/ClientPlugin.ts +57 -65
- package/src/capabilities/app-graph-builder.ts +87 -103
- package/src/capabilities/client.ts +71 -33
- package/src/capabilities/index.ts +14 -10
- package/src/capabilities/migrations.ts +22 -17
- package/src/capabilities/navigation-handler/index.ts +9 -0
- package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +17 -12
- package/src/capabilities/react-surface.tsx +52 -49
- package/src/capabilities/schema-defs.ts +28 -21
- package/src/cli/commands/config/index.ts +12 -0
- package/src/cli/commands/config/view.ts +29 -0
- package/src/cli/commands/device/index.ts +14 -0
- package/src/cli/commands/device/info/index.ts +5 -0
- package/src/cli/commands/device/info/info.test.ts +28 -0
- package/src/cli/commands/device/info/info.ts +48 -0
- package/src/cli/commands/device/list/index.ts +5 -0
- package/src/cli/commands/device/list/list.test.ts +30 -0
- package/src/cli/commands/device/list/list.ts +28 -0
- package/src/cli/commands/device/update/index.ts +5 -0
- package/src/cli/commands/device/update/update.ts +68 -0
- package/src/cli/commands/device/util.ts +55 -0
- package/src/cli/commands/edge/index.ts +12 -0
- package/src/cli/commands/edge/status.ts +46 -0
- package/src/cli/commands/halo/create/create.test.ts +51 -0
- package/src/cli/commands/halo/create/create.ts +82 -0
- package/src/cli/commands/halo/create/index.ts +5 -0
- package/src/cli/commands/halo/credential/add/add.ts +97 -0
- package/src/cli/commands/halo/credential/add/index.ts +5 -0
- package/src/cli/commands/halo/credential/index.ts +13 -0
- package/src/cli/commands/halo/credential/list/index.ts +5 -0
- package/src/cli/commands/halo/credential/list/list.test.ts +27 -0
- package/src/cli/commands/halo/credential/list/list.ts +115 -0
- package/src/cli/commands/halo/identity/identity.test.ts +40 -0
- package/src/cli/commands/halo/identity/identity.ts +45 -0
- package/src/cli/commands/halo/identity/index.ts +5 -0
- package/src/cli/commands/halo/index.ts +21 -0
- package/src/cli/commands/halo/join/index.ts +5 -0
- package/src/cli/commands/halo/join/join.test.ts +10 -0
- package/src/cli/commands/halo/join/join.ts +87 -0
- package/src/cli/commands/halo/keys/index.ts +5 -0
- package/src/cli/commands/halo/keys/keys.test.ts +29 -0
- package/src/cli/commands/halo/keys/keys.ts +40 -0
- package/src/cli/commands/halo/recover/index.ts +5 -0
- package/src/cli/commands/halo/recover/recover.test.ts +10 -0
- package/src/cli/commands/halo/recover/recover.ts +44 -0
- package/src/cli/commands/halo/seed/index.ts +5 -0
- package/src/cli/commands/halo/seed/seed.ts +36 -0
- package/src/cli/commands/halo/share/index.ts +5 -0
- package/src/cli/commands/halo/share/share.ts +97 -0
- package/src/cli/commands/halo/update/index.ts +5 -0
- package/src/cli/commands/halo/update/update.test.ts +28 -0
- package/src/cli/commands/halo/update/update.ts +67 -0
- package/src/cli/commands/halo/util.ts +18 -0
- package/src/cli/commands/index.ts +9 -0
- package/src/cli/commands/profile/create.ts +90 -0
- package/src/cli/commands/profile/delete.ts +36 -0
- package/src/cli/commands/profile/import.ts +101 -0
- package/src/cli/commands/profile/index.ts +17 -0
- package/src/cli/commands/profile/inspect.ts +64 -0
- package/src/cli/commands/profile/list.ts +55 -0
- package/src/cli/commands/profile/reset.ts +45 -0
- package/src/cli/commands/profile/util.ts +48 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +31 -0
- package/src/cli/testing/test-console.ts +87 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +9 -0
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +52 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +97 -114
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +28 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +70 -67
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +11 -12
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +47 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +73 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +52 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +2 -5
- package/src/meta.ts +8 -5
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +29 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +107 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +28 -0
- package/src/operations/recover-identity.ts +28 -0
- package/src/operations/redeem-passkey.ts +85 -0
- package/src/operations/redeem-token.ts +31 -0
- package/src/operations/reset-storage.ts +27 -0
- package/src/operations/share-identity.ts +26 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +57 -44
- package/src/types/capabilities.ts +16 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +7 -0
- package/src/{types.ts → types/schema.ts} +29 -22
- package/dist/lib/browser/app-graph-builder-3EILEBWW.mjs +0 -123
- package/dist/lib/browser/app-graph-builder-3EILEBWW.mjs.map +0 -7
- package/dist/lib/browser/chunk-64ANQXYZ.mjs +0 -693
- package/dist/lib/browser/chunk-64ANQXYZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-AWXKL4UR.mjs +0 -18
- package/dist/lib/browser/chunk-AWXKL4UR.mjs.map +0 -7
- package/dist/lib/browser/chunk-CAF2COXW.mjs +0 -19
- package/dist/lib/browser/chunk-CAF2COXW.mjs.map +0 -7
- package/dist/lib/browser/chunk-GS3LDHYD.mjs +0 -12
- package/dist/lib/browser/chunk-GS3LDHYD.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q7TFRFHI.mjs +0 -111
- package/dist/lib/browser/chunk-Q7TFRFHI.mjs.map +0 -7
- package/dist/lib/browser/client-JFNMEFOK.mjs +0 -37
- package/dist/lib/browser/client-JFNMEFOK.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-YGAQVXI2.mjs +0 -305
- package/dist/lib/browser/intent-resolver-YGAQVXI2.mjs.map +0 -7
- package/dist/lib/browser/migrations-5COKGS4E.mjs +0 -23
- package/dist/lib/browser/migrations-5COKGS4E.mjs.map +0 -7
- package/dist/lib/browser/react-context-GBNYT5QK.mjs +0 -24
- package/dist/lib/browser/react-context-GBNYT5QK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YKQAUE2M.mjs +0 -66
- package/dist/lib/browser/react-surface-YKQAUE2M.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-6L7W2RHL.mjs +0 -25
- package/dist/lib/browser/schema-defs-6L7W2RHL.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node-esm/app-graph-builder-GINHOE7A.mjs +0 -124
- package/dist/lib/node-esm/app-graph-builder-GINHOE7A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3BUB64JB.mjs +0 -19
- package/dist/lib/node-esm/chunk-3BUB64JB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GDJMDBWM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K4PIKBQQ.mjs +0 -694
- package/dist/lib/node-esm/chunk-K4PIKBQQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs +0 -14
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs +0 -20
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs.map +0 -7
- package/dist/lib/node-esm/client-XDYQARBL.mjs +0 -38
- package/dist/lib/node-esm/client-XDYQARBL.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-IN7YG7N7.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-IN7YG7N7.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-FE4PDX6W.mjs +0 -24
- package/dist/lib/node-esm/migrations-FE4PDX6W.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-UCK43H3Z.mjs +0 -25
- package/dist/lib/node-esm/react-context-UCK43H3Z.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-HDHC6XHQ.mjs +0 -67
- package/dist/lib/node-esm/react-surface-HDHC6XHQ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-GZIVMHLW.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-GZIVMHLW.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -8
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts +0 -8
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -8
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts +0 -4
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -8
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts +0 -7
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +0 -10
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -17
- package/src/capabilities/intent-resolver.ts +0 -250
- package/src/components/DevicesContainer.stories.tsx +0 -49
- package/src/components/JoinDialog.tsx +0 -53
- package/src/components/ProfileContainer.stories.tsx +0 -29
- package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -44
- package/src/components/RecoveryCredentialsContainer.tsx +0 -73
- package/src/components/ResetDialog.stories.tsx +0 -53
- package/src/components/ResetDialog.tsx +0 -49
- package/src/events.ts +0 -15
- /package/dist/lib/browser/{types.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types.mjs.map → browser/types/index.mjs.map} +0 -0
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
|
@@ -2,35 +2,38 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { debounce } from '@dxos/async';
|
|
9
9
|
import { useClient } from '@dxos/react-client';
|
|
10
10
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
11
11
|
import { ButtonGroup, Clipboard, Input, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import {
|
|
13
|
-
Form,
|
|
14
|
-
type InputComponent,
|
|
15
|
-
ControlItem,
|
|
16
|
-
ControlItemInput,
|
|
17
|
-
ControlSection,
|
|
18
|
-
ControlPage,
|
|
19
|
-
} from '@dxos/react-ui-form';
|
|
12
|
+
import { Form, type FormFieldMap, type FormUpdateMeta, Settings } from '@dxos/react-ui-form';
|
|
20
13
|
import { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';
|
|
21
|
-
import {
|
|
22
|
-
import { hexToHue, hexToEmoji } from '@dxos/util';
|
|
14
|
+
import { hexToEmoji, hexToHue } from '@dxos/util';
|
|
23
15
|
|
|
24
|
-
import {
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
|
|
18
|
+
// TOOD(burdon): Factor out?
|
|
19
|
+
// TODO(wittjosiah): Integrate annotations with translations.
|
|
20
|
+
const UserProfile = Schema.Struct({
|
|
21
|
+
did: Schema.String.annotations({ title: 'DID' }),
|
|
22
|
+
displayName: Schema.String.annotations({ title: 'Display name' }),
|
|
23
|
+
emoji: Schema.String.annotations({ title: 'Avatar' }),
|
|
24
|
+
hue: Schema.String.annotations({ title: 'Color' }),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
type UserProfile = Schema.Schema.Type<typeof UserProfile>;
|
|
25
28
|
|
|
26
29
|
// TODO(thure): Factor out?
|
|
27
30
|
const getDefaultHueValue = (identity: Identity | null) => hexToHue(identity?.identityKey.toHex() ?? '0');
|
|
28
|
-
const getDefaultEmojiValue = (identity: Identity | null) => hexToEmoji(identity?.identityKey.toHex() ?? '0');
|
|
29
31
|
const getHueValue = (identity: Identity | null) => identity?.profile?.data?.hue || getDefaultHueValue(identity);
|
|
32
|
+
const getDefaultEmojiValue = (identity: Identity | null) => hexToEmoji(identity?.identityKey.toHex() ?? '0');
|
|
30
33
|
const getEmojiValue = (identity: Identity | null) => identity?.profile?.data?.emoji || getDefaultEmojiValue(identity);
|
|
31
34
|
|
|
32
35
|
export const ProfileContainer = () => {
|
|
33
|
-
const { t } = useTranslation(
|
|
36
|
+
const { t } = useTranslation(meta.id);
|
|
34
37
|
const client = useClient();
|
|
35
38
|
const identity = useIdentity();
|
|
36
39
|
const [displayName, setDisplayNameDirectly] = useState(identity?.profile?.displayName ?? '');
|
|
@@ -40,7 +43,7 @@ export const ProfileContainer = () => {
|
|
|
40
43
|
const updateProfile = useMemo(
|
|
41
44
|
() =>
|
|
42
45
|
debounce(
|
|
43
|
-
(profile: Partial<
|
|
46
|
+
(profile: Partial<UserProfile>) =>
|
|
44
47
|
client.halo.updateProfile({
|
|
45
48
|
displayName: profile.displayName,
|
|
46
49
|
data: {
|
|
@@ -53,43 +56,59 @@ export const ProfileContainer = () => {
|
|
|
53
56
|
[],
|
|
54
57
|
);
|
|
55
58
|
|
|
56
|
-
const
|
|
57
|
-
(profile:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
const handleChange = useCallback(
|
|
60
|
+
(profile: Partial<UserProfile>, meta: FormUpdateMeta<UserProfile>) => {
|
|
61
|
+
for (const [path, changed] of Object.entries(meta.changed)) {
|
|
62
|
+
if (changed) {
|
|
63
|
+
switch (path) {
|
|
64
|
+
case 'displayName':
|
|
65
|
+
setDisplayNameDirectly(profile.displayName ?? '');
|
|
66
|
+
break;
|
|
67
|
+
case 'emoji':
|
|
68
|
+
setEmojiDirectly(profile.emoji ?? getDefaultEmojiValue(identity));
|
|
69
|
+
break;
|
|
70
|
+
case 'hue':
|
|
71
|
+
setHueDirectly(profile.hue ?? getDefaultHueValue(identity));
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void updateProfile(profile);
|
|
62
80
|
},
|
|
63
81
|
[identity],
|
|
64
82
|
);
|
|
65
83
|
|
|
66
84
|
const values = useMemo(
|
|
67
85
|
() => ({
|
|
86
|
+
did: identity?.did,
|
|
68
87
|
displayName,
|
|
69
88
|
emoji,
|
|
70
89
|
hue,
|
|
71
|
-
did: identity?.did,
|
|
72
90
|
}),
|
|
73
91
|
[identity, displayName, emoji, hue],
|
|
74
92
|
);
|
|
75
93
|
|
|
76
94
|
// TODO(wittjosiah): Integrate descriptions with the form schema.
|
|
77
|
-
const
|
|
95
|
+
const fieldMap = useMemo<FormFieldMap>(
|
|
78
96
|
() => ({
|
|
79
97
|
displayName: ({ type, label, getValue, onValueChange }) => {
|
|
80
98
|
const handleChange = useCallback(
|
|
81
99
|
({ target: { value } }: ChangeEvent<HTMLInputElement>) => onValueChange(type, value),
|
|
82
100
|
[onValueChange, type],
|
|
83
101
|
);
|
|
102
|
+
|
|
84
103
|
return (
|
|
85
|
-
<
|
|
104
|
+
<Settings.Item title={label} description={t('display-name.description')}>
|
|
86
105
|
<Input.TextInput
|
|
87
106
|
value={getValue()}
|
|
88
107
|
onChange={handleChange}
|
|
89
|
-
placeholder={t('display
|
|
90
|
-
classNames='min-
|
|
108
|
+
placeholder={t('display-name-input.placeholder')}
|
|
109
|
+
classNames='min-w-64'
|
|
91
110
|
/>
|
|
92
|
-
</
|
|
111
|
+
</Settings.Item>
|
|
93
112
|
);
|
|
94
113
|
},
|
|
95
114
|
emoji: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -98,8 +117,9 @@ export const ProfileContainer = () => {
|
|
|
98
117
|
() => onValueChange(type, getDefaultEmojiValue(identity)),
|
|
99
118
|
[onValueChange, type],
|
|
100
119
|
);
|
|
120
|
+
|
|
101
121
|
return (
|
|
102
|
-
<
|
|
122
|
+
<Settings.Item title={label} description={t('icon.description')}>
|
|
103
123
|
<EmojiPickerBlock
|
|
104
124
|
triggerVariant='default'
|
|
105
125
|
emoji={getValue()}
|
|
@@ -107,7 +127,7 @@ export const ProfileContainer = () => {
|
|
|
107
127
|
onClickClear={handleEmojiReset}
|
|
108
128
|
classNames='justify-self-end'
|
|
109
129
|
/>
|
|
110
|
-
</
|
|
130
|
+
</Settings.Item>
|
|
111
131
|
);
|
|
112
132
|
},
|
|
113
133
|
hue: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -116,26 +136,24 @@ export const ProfileContainer = () => {
|
|
|
116
136
|
() => onValueChange(type, getDefaultHueValue(identity)),
|
|
117
137
|
[onValueChange, type],
|
|
118
138
|
);
|
|
139
|
+
|
|
119
140
|
return (
|
|
120
|
-
<
|
|
121
|
-
<
|
|
122
|
-
value={getValue()}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
classNames='[--hue-preview-size:1.5rem] justify-self-end'
|
|
126
|
-
/>
|
|
127
|
-
</ControlItem>
|
|
141
|
+
<Settings.Item title={label} description={t('hue.description')}>
|
|
142
|
+
<div role='none' className='flex justify-self-end'>
|
|
143
|
+
<HuePicker value={getValue()} onChange={handleChange} onReset={handleHueReset} />
|
|
144
|
+
</div>
|
|
145
|
+
</Settings.Item>
|
|
128
146
|
);
|
|
129
147
|
},
|
|
130
148
|
// TODO(wittjosiah): We need text input annotations for disabled and copyable.
|
|
131
149
|
did: ({ label, getValue }) => {
|
|
132
150
|
return (
|
|
133
|
-
<
|
|
134
|
-
<ButtonGroup>
|
|
135
|
-
<Input.TextInput value={getValue()} disabled classNames='min-
|
|
151
|
+
<Settings.Item title={label} description={t('did.description')}>
|
|
152
|
+
<ButtonGroup classNames='w-full'>
|
|
153
|
+
<Input.TextInput value={getValue()} disabled classNames='min-w-64' />
|
|
136
154
|
<Clipboard.IconButton value={getValue() ?? ''} />
|
|
137
155
|
</ButtonGroup>
|
|
138
|
-
</
|
|
156
|
+
</Settings.Item>
|
|
139
157
|
);
|
|
140
158
|
},
|
|
141
159
|
}),
|
|
@@ -143,31 +161,16 @@ export const ProfileContainer = () => {
|
|
|
143
161
|
);
|
|
144
162
|
|
|
145
163
|
return (
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
<
|
|
149
|
-
<
|
|
150
|
-
<Form
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
outerSpacing={false}
|
|
158
|
-
/>
|
|
159
|
-
</ControlSection>
|
|
160
|
-
</Clipboard.Provider>
|
|
161
|
-
</ControlPage>
|
|
162
|
-
</StackItem.Content>
|
|
164
|
+
<Clipboard.Provider>
|
|
165
|
+
<Settings.Viewport>
|
|
166
|
+
<Settings.Section title={t('profile.label')} description={t('profile.description')}>
|
|
167
|
+
<Form.Root schema={UserProfile} values={values} fieldMap={fieldMap} onValuesChanged={handleChange}>
|
|
168
|
+
<Form.Content classNames='gap-form-gap'>
|
|
169
|
+
<Form.FieldSet />
|
|
170
|
+
</Form.Content>
|
|
171
|
+
</Form.Root>
|
|
172
|
+
</Settings.Section>
|
|
173
|
+
</Settings.Viewport>
|
|
174
|
+
</Clipboard.Provider>
|
|
163
175
|
);
|
|
164
176
|
};
|
|
165
|
-
|
|
166
|
-
// TODO(wittjosiah): Integrate annotations with translations.
|
|
167
|
-
const ProfileSchema = Schema.Struct({
|
|
168
|
-
displayName: Schema.String.annotations({ title: 'Display name' }),
|
|
169
|
-
emoji: Schema.String.annotations({ title: 'Avatar' }),
|
|
170
|
-
hue: Schema.String.annotations({ title: 'Color' }),
|
|
171
|
-
did: Schema.String.annotations({ title: 'DID' }),
|
|
172
|
-
});
|
|
173
|
-
type Profile = Schema.Schema.Type<typeof ProfileSchema>;
|
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { useClient } from '@dxos/react-client';
|
|
11
9
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
12
10
|
import { AlertDialog, useAsyncEffect } from '@dxos/react-ui';
|
|
13
|
-
import {
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
12
|
+
|
|
13
|
+
import { translations } from '#translations';
|
|
14
14
|
|
|
15
|
-
import { RecoveryCodeDialog
|
|
16
|
-
import { translations } from '../translations';
|
|
15
|
+
import { RecoveryCodeDialog } from './RecoveryCodeDialog';
|
|
17
16
|
|
|
18
17
|
const DefaultStory = () => {
|
|
19
18
|
const client = useClient();
|
|
@@ -32,19 +31,19 @@ const DefaultStory = () => {
|
|
|
32
31
|
);
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
const meta
|
|
36
|
-
title: 'plugins/plugin-client/RecoveryCodeDialog',
|
|
37
|
-
component: RecoveryCodeDialog,
|
|
34
|
+
const meta = {
|
|
35
|
+
title: 'plugins/plugin-client/containers/RecoveryCodeDialog',
|
|
36
|
+
component: RecoveryCodeDialog as any,
|
|
38
37
|
render: DefaultStory,
|
|
39
|
-
decorators: [
|
|
38
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
40
39
|
parameters: {
|
|
41
40
|
layout: 'fullscreen',
|
|
42
41
|
translations,
|
|
43
42
|
},
|
|
44
|
-
}
|
|
43
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
45
44
|
|
|
46
45
|
export default meta;
|
|
47
46
|
|
|
48
|
-
type Story = StoryObj<
|
|
47
|
+
type Story = StoryObj<typeof meta>;
|
|
49
48
|
|
|
50
49
|
export const Default: Story = {};
|
|
@@ -6,48 +6,49 @@ import React, { useCallback, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export const RECOVERY_CODE_DIALOG = `${CLIENT_PLUGIN}/RecoveryCodeDialog`;
|
|
9
|
+
import { meta } from '#meta';
|
|
12
10
|
|
|
13
11
|
export type RecoveryCodeDialogProps = {
|
|
14
12
|
code: string;
|
|
15
13
|
};
|
|
16
14
|
|
|
15
|
+
// TODO(burdon): Should have cancel button.
|
|
17
16
|
export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
18
|
-
const { t } = useTranslation(
|
|
17
|
+
const { t } = useTranslation(meta.id);
|
|
19
18
|
const [confirmation, setConfirmation] = useState(false);
|
|
20
19
|
|
|
21
20
|
const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);
|
|
22
21
|
|
|
23
22
|
return (
|
|
24
|
-
<AlertDialog.Content classNames='
|
|
25
|
-
<AlertDialog.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<
|
|
36
|
-
<Input.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
23
|
+
<AlertDialog.Content size='md' classNames='min-h-[15rem]'>
|
|
24
|
+
<AlertDialog.Body>
|
|
25
|
+
<AlertDialog.Title>{t('recovery-code-dialog.title')}</AlertDialog.Title>
|
|
26
|
+
<p className='py-4'>{t('recovery-code-dialog.description')}</p>
|
|
27
|
+
<Clipboard.Provider>
|
|
28
|
+
<Code code={code} />
|
|
29
|
+
</Clipboard.Provider>
|
|
30
|
+
<div className='flex flex-col py-4 gap-2'>
|
|
31
|
+
<p>{t('recovery-code-dialog-warning-1.message')}</p>
|
|
32
|
+
<p>{t('recovery-code-dialog-warning-2.message')}</p>
|
|
33
|
+
</div>
|
|
34
|
+
<div className='flex items-center gap-2 pb-4'>
|
|
35
|
+
<Input.Root>
|
|
36
|
+
<Input.Checkbox
|
|
37
|
+
data-testid='recoveryCode.confirm'
|
|
38
|
+
checked={confirmation}
|
|
39
|
+
onCheckedChange={handleConfirmation}
|
|
40
|
+
/>
|
|
41
|
+
<Input.Label>{t('recovery-code-confirmation.label')}</Input.Label>
|
|
42
|
+
</Input.Root>
|
|
43
|
+
</div>
|
|
44
|
+
</AlertDialog.Body>
|
|
45
|
+
<AlertDialog.ActionBar>
|
|
45
46
|
<AlertDialog.Action asChild>
|
|
46
47
|
<Button data-testid='recoveryCode.continue' variant='primary' disabled={!confirmation}>
|
|
47
|
-
{t('continue
|
|
48
|
+
{t('continue.label')}
|
|
48
49
|
</Button>
|
|
49
50
|
</AlertDialog.Action>
|
|
50
|
-
</
|
|
51
|
+
</AlertDialog.ActionBar>
|
|
51
52
|
</AlertDialog.Content>
|
|
52
53
|
);
|
|
53
54
|
};
|
|
@@ -55,7 +56,7 @@ export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
|
55
56
|
const Code = ({ code }: { code: string }) => {
|
|
56
57
|
const words = code.split(' ');
|
|
57
58
|
return (
|
|
58
|
-
<div className='relative p-2 border border-separator rounded group'>
|
|
59
|
+
<div className='relative p-2 border border-separator rounded-sm group'>
|
|
59
60
|
<Clipboard.IconButton value={code} classNames='absolute top-2 right-2 invisible group-hover:visible' />
|
|
60
61
|
<div className='grid grid-cols-4'>
|
|
61
62
|
{words.map((word, i) => (
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
|
+
|
|
12
|
+
import { initializeIdentity } from '#testing';
|
|
13
|
+
import { translations } from '#translations';
|
|
14
|
+
|
|
15
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
16
|
+
import { RecoveryCredentialsContainer } from './RecoveryCredentialsContainer';
|
|
17
|
+
|
|
18
|
+
const meta = {
|
|
19
|
+
title: 'plugins/plugin-client/containers/RecoveryCredentialsContainer',
|
|
20
|
+
component: RecoveryCredentialsContainer,
|
|
21
|
+
decorators: [
|
|
22
|
+
withTheme(),
|
|
23
|
+
withLayout({ layout: 'fullscreen' }),
|
|
24
|
+
withPluginManager({
|
|
25
|
+
plugins: [
|
|
26
|
+
ClientPlugin({
|
|
27
|
+
onClientInitialized: ({ client }) =>
|
|
28
|
+
Effect.gen(function* () {
|
|
29
|
+
yield* initializeIdentity(client);
|
|
30
|
+
}),
|
|
31
|
+
}),
|
|
32
|
+
OperationPlugin(),
|
|
33
|
+
RuntimePlugin(),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
],
|
|
37
|
+
parameters: {
|
|
38
|
+
layout: 'fullscreen',
|
|
39
|
+
translations,
|
|
40
|
+
},
|
|
41
|
+
} satisfies Meta<typeof RecoveryCredentialsContainer>;
|
|
42
|
+
|
|
43
|
+
export default meta;
|
|
44
|
+
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
|
|
47
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { useCredentials } from '@dxos/react-client/halo';
|
|
9
|
+
import { Icon, IconButton, List, ListItem, Message, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { ClientOperation } from '#operations';
|
|
14
|
+
|
|
15
|
+
export const MANAGE_CREDENTIALS_DIALOG = `${meta.id}.ManageCredentialsDialog`;
|
|
16
|
+
|
|
17
|
+
export const RecoveryCredentialsContainer = () => {
|
|
18
|
+
const { t } = useTranslation(meta.id);
|
|
19
|
+
const { invokePromise } = useOperationInvoker();
|
|
20
|
+
const credentials = useCredentials();
|
|
21
|
+
const recoveryCredentials = credentials.filter(
|
|
22
|
+
(credential) => credential.subject.assertion['@type'] === 'dxos.halo.credentials.IdentityRecovery',
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Settings.Viewport>
|
|
27
|
+
<Settings.Section title={t('recovery-setup-dialog.title')} description={t('recovery-setup-dialog.description')}>
|
|
28
|
+
<Settings.Item title={t('create-passkey.label')} description={t('create-passkey.description')}>
|
|
29
|
+
<IconButton
|
|
30
|
+
label={t('create-passkey.label')}
|
|
31
|
+
icon='ph--key--duotone'
|
|
32
|
+
variant='primary'
|
|
33
|
+
onClick={() => invokePromise(ClientOperation.CreatePasskey)}
|
|
34
|
+
/>
|
|
35
|
+
</Settings.Item>
|
|
36
|
+
<Settings.Item title={t('create-recovery-code.label')} description={t('create-recovery-code.description')}>
|
|
37
|
+
<IconButton
|
|
38
|
+
label={t('create-recovery-code.label')}
|
|
39
|
+
icon='ph--receipt--duotone'
|
|
40
|
+
variant='default'
|
|
41
|
+
onClick={() => invokePromise(ClientOperation.CreateRecoveryCode)}
|
|
42
|
+
/>
|
|
43
|
+
</Settings.Item>
|
|
44
|
+
</Settings.Section>
|
|
45
|
+
<Settings.Section title={t('credentials-list.label')}>
|
|
46
|
+
{recoveryCredentials.length < 1 ? (
|
|
47
|
+
<Message.Root valence='error'>
|
|
48
|
+
<Message.Title icon='ph--shield-warning--duotone'>{t('no-credentials.title')}</Message.Title>
|
|
49
|
+
<Message.Content>{t('no-credentials.message')}</Message.Content>
|
|
50
|
+
</Message.Root>
|
|
51
|
+
) : (
|
|
52
|
+
<List>
|
|
53
|
+
{recoveryCredentials.map((credential) => (
|
|
54
|
+
<ListItem.Root key={credential.id?.toHex()}>
|
|
55
|
+
<ListItem.Endcap>
|
|
56
|
+
<Icon icon='ph--key--regular' />
|
|
57
|
+
</ListItem.Endcap>
|
|
58
|
+
<ListItem.Heading>{credential.issuanceDate.toLocaleString()}</ListItem.Heading>
|
|
59
|
+
</ListItem.Root>
|
|
60
|
+
))}
|
|
61
|
+
</List>
|
|
62
|
+
)}
|
|
63
|
+
</Settings.Section>
|
|
64
|
+
</Settings.Viewport>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
10
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
+
import { usePluginManager } from '@dxos/app-framework/ui';
|
|
12
|
+
import { Dialog } from '@dxos/react-ui';
|
|
13
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
|
+
|
|
15
|
+
import { translations } from '#translations';
|
|
16
|
+
|
|
17
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
18
|
+
import { ResetDialog, type ResetDialogProps } from './ResetDialog';
|
|
19
|
+
|
|
20
|
+
const DefaultStory = (props: Omit<ResetDialogProps, 'capabilityManager'>) => {
|
|
21
|
+
const manager = usePluginManager();
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Dialog.Root open>
|
|
25
|
+
<Dialog.Overlay>
|
|
26
|
+
<ResetDialog
|
|
27
|
+
capabilityManager={manager.capabilities}
|
|
28
|
+
onReset={() => Effect.sync(() => console.log('reset'))}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
</Dialog.Overlay>
|
|
32
|
+
</Dialog.Root>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const meta = {
|
|
37
|
+
title: 'plugins/plugin-client/containers/ResetDialog',
|
|
38
|
+
component: ResetDialog,
|
|
39
|
+
render: DefaultStory,
|
|
40
|
+
decorators: [
|
|
41
|
+
withTheme(),
|
|
42
|
+
withLayout({ layout: 'fullscreen' }),
|
|
43
|
+
withPluginManager({
|
|
44
|
+
plugins: [RuntimePlugin(), OperationPlugin(), ClientPlugin({})],
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
parameters: {
|
|
48
|
+
layout: 'fullscreen',
|
|
49
|
+
translations,
|
|
50
|
+
},
|
|
51
|
+
} satisfies Meta<typeof ResetDialog>;
|
|
52
|
+
|
|
53
|
+
export default meta;
|
|
54
|
+
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
export const Default: Story = {
|
|
58
|
+
args: {
|
|
59
|
+
mode: 'reset-storage' as const,
|
|
60
|
+
} as any,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const JoinNewIdentity: Story = {
|
|
64
|
+
args: {
|
|
65
|
+
mode: 'join-new-identity' as const,
|
|
66
|
+
} as any,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Recover: Story = {
|
|
70
|
+
args: {
|
|
71
|
+
mode: 'recover' as const,
|
|
72
|
+
} as any,
|
|
73
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capability, type CapabilityManager } from '@dxos/app-framework';
|
|
9
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
11
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
12
|
+
import { useClient } from '@dxos/react-client';
|
|
13
|
+
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { ConfirmReset, type ConfirmResetProps, translationKey } from '@dxos/shell/react';
|
|
15
|
+
|
|
16
|
+
import { type ClientPluginOptions } from '#types';
|
|
17
|
+
|
|
18
|
+
export type ResetDialogProps = Pick<ConfirmResetProps, 'mode'> &
|
|
19
|
+
Pick<ClientPluginOptions, 'onReset'> & {
|
|
20
|
+
capabilityManager: CapabilityManager.CapabilityManager;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const ResetDialog = ({ mode, onReset, capabilityManager }: ResetDialogProps) => {
|
|
24
|
+
const { t } = useTranslation(translationKey);
|
|
25
|
+
const { invokePromise } = useOperationInvoker();
|
|
26
|
+
const client = useClient();
|
|
27
|
+
|
|
28
|
+
const handleReset = useCallback(async () => {
|
|
29
|
+
await client.reset();
|
|
30
|
+
const target =
|
|
31
|
+
mode === 'join-new-identity' ? 'deviceInvitation' : mode === 'recover' ? 'recoverIdentity' : undefined;
|
|
32
|
+
if (onReset) {
|
|
33
|
+
await runAndForwardErrors(onReset({ target }).pipe(Effect.provideService(Capability.Service, capabilityManager)));
|
|
34
|
+
}
|
|
35
|
+
}, [client, mode, onReset, capabilityManager]);
|
|
36
|
+
|
|
37
|
+
const handleCancel = useCallback(() => {
|
|
38
|
+
void invokePromise(LayoutOperation.UpdateDialog, { state: false });
|
|
39
|
+
}, [invokePromise]);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Dialog.Content>
|
|
43
|
+
<Dialog.Header>
|
|
44
|
+
<Dialog.Title>{t('reset-dialog.title')}</Dialog.Title>
|
|
45
|
+
</Dialog.Header>
|
|
46
|
+
<Dialog.Body>
|
|
47
|
+
<Dialog.Description classNames='sr-only'>{t('reset-dialog.description')}</Dialog.Description>
|
|
48
|
+
<ConfirmReset active mode={mode} onConfirm={handleReset} onCancel={handleCancel} />
|
|
49
|
+
</Dialog.Body>
|
|
50
|
+
</Dialog.Content>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
export { type RecoveryCodeDialogProps } from './RecoveryCodeDialog';
|
|
8
|
+
export { type ResetDialogProps } from './ResetDialog';
|
|
9
|
+
|
|
10
|
+
export const DevicesContainer: ComponentType<any> = lazy(() => import('./DevicesContainer'));
|
|
11
|
+
export const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));
|
|
12
|
+
export const ProfileContainer: ComponentType<any> = lazy(() => import('./ProfileContainer'));
|
|
13
|
+
export const RecoveryCodeDialog: ComponentType<any> = lazy(() => import('./RecoveryCodeDialog'));
|
|
14
|
+
export const RecoveryCredentialsContainer: ComponentType<any> = lazy(() => import('./RecoveryCredentialsContainer'));
|
|
15
|
+
export const ResetDialog: ComponentType<any> = lazy(() => import('./ResetDialog'));
|