@dxos/plugin-client 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
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-ELAYKIQU.mjs +12 -0
- package/dist/lib/browser/chunk-ELAYKIQU.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs +175 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +7 -0
- package/dist/lib/browser/chunk-WNJRYPGG.mjs +131 -0
- package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1060 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs +34 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +7 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs +30 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs +105 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs +44 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +119 -128
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-identity-2BP4G2SD.mjs +27 -0
- package/dist/lib/browser/join-identity-2BP4G2SD.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-LS6B5INB.mjs +26 -0
- package/dist/lib/browser/recover-identity-LS6B5INB.mjs.map +7 -0
- package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs +82 -0
- package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs.map +7 -0
- package/dist/lib/browser/redeem-token-6BCRGKV6.mjs +37 -0
- package/dist/lib/browser/redeem-token-6BCRGKV6.mjs.map +7 -0
- package/dist/lib/browser/reset-storage-QJLTL7J3.mjs +26 -0
- package/dist/lib/browser/reset-storage-QJLTL7J3.mjs.map +7 -0
- package/dist/lib/browser/share-identity-YJEBJTPA.mjs +31 -0
- package/dist/lib/browser/share-identity-YJEBJTPA.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/types/index.mjs +14 -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-GDJMDBWM.mjs → chunk-IT5LAIV3.mjs} +39 -18
- package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1061 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs +35 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs +31 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs +106 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs +45 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +119 -128
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-identity-75JCKQHM.mjs +28 -0
- package/dist/lib/node-esm/join-identity-75JCKQHM.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-AKGNTUJI.mjs +27 -0
- package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs +83 -0
- package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs +38 -0
- package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs.map +7 -0
- package/dist/lib/node-esm/reset-storage-S5MJITI3.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-S5MJITI3.mjs.map +7 -0
- package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs +32 -0
- package/dist/lib/node-esm/share-identity-QZLY3VHE.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/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 -45
- package/src/ClientPlugin.ts +57 -64
- 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 +83 -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 +42 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +27 -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 +10 -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 +72 -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 -43
- 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,121 +2,97 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Check, X } from '@phosphor-icons/react';
|
|
6
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
7
6
|
import { QR } from 'react-qr-rounded';
|
|
8
7
|
|
|
9
|
-
import {
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
9
|
import { log } from '@dxos/log';
|
|
11
10
|
import { useClient, useMulticastObservable } from '@dxos/react-client';
|
|
12
11
|
import { type Device, useDevices } from '@dxos/react-client/halo';
|
|
13
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
14
13
|
import { useNetworkStatus } from '@dxos/react-client/mesh';
|
|
15
|
-
import { Button, Clipboard, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
17
|
-
ControlFrame,
|
|
18
|
-
ControlFrameItem,
|
|
19
|
-
ControlGroup,
|
|
20
|
-
ControlItem,
|
|
21
|
-
ControlPage,
|
|
22
|
-
ControlSection,
|
|
23
|
-
} from '@dxos/react-ui-form';
|
|
24
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
25
|
-
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
14
|
+
import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
15
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
26
16
|
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
|
|
17
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
27
18
|
import { hexToEmoji } from '@dxos/util';
|
|
28
19
|
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
20
|
+
import { meta } from '#meta';
|
|
21
|
+
import { ClientOperation } from '#operations';
|
|
31
22
|
|
|
32
23
|
export type DevicesContainerProps = {
|
|
33
24
|
createInvitationUrl?: (invitationCode: string) => string;
|
|
34
25
|
};
|
|
35
26
|
|
|
36
27
|
export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps) => {
|
|
37
|
-
const { t } = useTranslation(
|
|
38
|
-
const {
|
|
28
|
+
const { t } = useTranslation(meta.id);
|
|
29
|
+
const { invokePromise } = useOperationInvoker();
|
|
39
30
|
const devices = useDevices();
|
|
40
31
|
const { swarm: connectionState } = useNetworkStatus();
|
|
41
32
|
|
|
42
|
-
const handleResetStorage = useCallback(() =>
|
|
33
|
+
const handleResetStorage = useCallback(() => invokePromise(ClientOperation.ResetStorage, {}), [invokePromise]);
|
|
43
34
|
|
|
44
35
|
const handleRecover = useCallback(
|
|
45
|
-
() =>
|
|
46
|
-
[
|
|
36
|
+
() => invokePromise(ClientOperation.ResetStorage, { mode: 'recover' }),
|
|
37
|
+
[invokePromise],
|
|
47
38
|
);
|
|
48
39
|
|
|
49
40
|
const handleJoinNewIdentity = useCallback(
|
|
50
|
-
() =>
|
|
51
|
-
[
|
|
41
|
+
() => invokePromise(ClientOperation.ResetStorage, { mode: 'join-new-identity' }),
|
|
42
|
+
[invokePromise],
|
|
52
43
|
);
|
|
53
44
|
|
|
54
45
|
return (
|
|
55
46
|
<Clipboard.Provider>
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
<Settings.Viewport>
|
|
48
|
+
<Settings.Section
|
|
49
|
+
title={t('devices-verbose.label', { ns: meta.id })}
|
|
50
|
+
description={t('devices.description', { ns: meta.id })}
|
|
51
|
+
>
|
|
52
|
+
<Settings.Panel>
|
|
53
|
+
<div role='group' className='min-w-0'>
|
|
54
|
+
<h3 className='text-lg mb-2'>{t('devices.label', { ns: meta.id })}</h3>
|
|
55
|
+
<List>
|
|
56
|
+
{devices.map((device: Device) => (
|
|
57
|
+
<DeviceListItem key={device.deviceKey.toHex()} device={device} connectionState={connectionState} />
|
|
58
|
+
))}
|
|
59
|
+
</List>
|
|
60
|
+
</div>
|
|
61
|
+
{createInvitationUrl && (
|
|
62
|
+
<div role='group' className='min-w-0'>
|
|
63
|
+
<h3 className='text-lg mb-2'>{t('add-device.label')}</h3>
|
|
64
|
+
<DeviceInvitation createInvitationUrl={createInvitationUrl} />
|
|
65
|
+
</div>
|
|
66
|
+
)}
|
|
67
|
+
</Settings.Panel>
|
|
68
|
+
</Settings.Section>
|
|
69
|
+
<Settings.Section
|
|
70
|
+
title={t('danger-zone.title', { ns: meta.id })}
|
|
71
|
+
description={t('danger-zone.description', { ns: meta.id })}
|
|
72
|
+
>
|
|
73
|
+
<Settings.Item title={t('reset-device.label')} description={t('reset-device.description', { ns: meta.id })}>
|
|
74
|
+
<Button variant='destructive' onClick={handleResetStorage} data-testid='devicesContainer.reset'>
|
|
75
|
+
{t('reset-device.label')}
|
|
76
|
+
</Button>
|
|
77
|
+
</Settings.Item>
|
|
78
|
+
<Settings.Item
|
|
79
|
+
title={t('recover-identity.label')}
|
|
80
|
+
description={t('recover-identity.description', { ns: meta.id })}
|
|
61
81
|
>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
device={device}
|
|
70
|
-
connectionState={connectionState}
|
|
71
|
-
/>
|
|
72
|
-
);
|
|
73
|
-
})}
|
|
74
|
-
</List>
|
|
75
|
-
</ControlFrameItem>
|
|
76
|
-
{createInvitationUrl && (
|
|
77
|
-
<ControlFrameItem title='Add device'>
|
|
78
|
-
<DeviceInvitation createInvitationUrl={createInvitationUrl} />
|
|
79
|
-
</ControlFrameItem>
|
|
80
|
-
)}
|
|
81
|
-
</ControlFrame>
|
|
82
|
-
</ControlSection>
|
|
83
|
-
<ControlSection
|
|
84
|
-
title={t('danger zone title', { ns: CLIENT_PLUGIN })}
|
|
85
|
-
description={t('danger zone description', { ns: CLIENT_PLUGIN })}
|
|
82
|
+
<Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>
|
|
83
|
+
{t('recover-identity.label')}
|
|
84
|
+
</Button>
|
|
85
|
+
</Settings.Item>
|
|
86
|
+
<Settings.Item
|
|
87
|
+
title={t('join-new-identity.label')}
|
|
88
|
+
description={t('join-new-identity.description', { ns: meta.id })}
|
|
86
89
|
>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{t('reset device label')}
|
|
94
|
-
</Button>
|
|
95
|
-
</ControlItem>
|
|
96
|
-
<ControlItem
|
|
97
|
-
title={t('recover identity label')}
|
|
98
|
-
description={t('recover identity description', { ns: CLIENT_PLUGIN })}
|
|
99
|
-
>
|
|
100
|
-
<Button variant='destructive' onClick={handleRecover} data-testid='devicesContainer.recover'>
|
|
101
|
-
{t('recover identity label')}
|
|
102
|
-
</Button>
|
|
103
|
-
</ControlItem>
|
|
104
|
-
<ControlItem
|
|
105
|
-
title={t('join new identity label')}
|
|
106
|
-
description={t('join new identity description', { ns: CLIENT_PLUGIN })}
|
|
107
|
-
>
|
|
108
|
-
<Button
|
|
109
|
-
variant='destructive'
|
|
110
|
-
onClick={handleJoinNewIdentity}
|
|
111
|
-
data-testid='devicesContainer.joinExisting'
|
|
112
|
-
>
|
|
113
|
-
{t('join new identity label')}
|
|
114
|
-
</Button>
|
|
115
|
-
</ControlItem>
|
|
116
|
-
</ControlGroup>
|
|
117
|
-
</ControlSection>
|
|
118
|
-
</ControlPage>
|
|
119
|
-
</StackItem.Content>
|
|
90
|
+
<Button variant='destructive' onClick={handleJoinNewIdentity} data-testid='devicesContainer.joinExisting'>
|
|
91
|
+
{t('join-new-identity.label')}
|
|
92
|
+
</Button>
|
|
93
|
+
</Settings.Item>
|
|
94
|
+
</Settings.Section>
|
|
95
|
+
</Settings.Viewport>
|
|
120
96
|
</Clipboard.Provider>
|
|
121
97
|
);
|
|
122
98
|
};
|
|
@@ -191,7 +167,7 @@ const InvitationSection = ({
|
|
|
191
167
|
onInvitationDone = () => {},
|
|
192
168
|
onInvitationCreate = () => {},
|
|
193
169
|
}: InvitationComponentProps) => {
|
|
194
|
-
const { t } = useTranslation(
|
|
170
|
+
const { t } = useTranslation(meta.id);
|
|
195
171
|
const activeView =
|
|
196
172
|
state < 0
|
|
197
173
|
? 'init'
|
|
@@ -200,14 +176,15 @@ const InvitationSection = ({
|
|
|
200
176
|
: state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode
|
|
201
177
|
? 'auth-code'
|
|
202
178
|
: 'qr-code';
|
|
179
|
+
|
|
203
180
|
return activeView === 'init' ? (
|
|
204
181
|
<>
|
|
205
|
-
<p className='text-description
|
|
182
|
+
<p className='text-description mb-2'>{t('add-device.description')}</p>
|
|
206
183
|
<IconButton
|
|
207
184
|
icon='ph--plus--regular'
|
|
208
|
-
label={t('create
|
|
185
|
+
label={t('create-device-invitation.label')}
|
|
209
186
|
disabled={state >= 0}
|
|
210
|
-
classNames='
|
|
187
|
+
classNames='w-full'
|
|
211
188
|
data-testid='devicesContainer.createInvitation'
|
|
212
189
|
onClick={onInvitationCreate}
|
|
213
190
|
/>
|
|
@@ -233,30 +210,32 @@ const InvitationSection = ({
|
|
|
233
210
|
};
|
|
234
211
|
|
|
235
212
|
const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel: () => void }) => {
|
|
236
|
-
const { t } = useTranslation(
|
|
213
|
+
const { t } = useTranslation(osTranslations);
|
|
237
214
|
const qrLabel = useId('devices-container__qr-code');
|
|
238
215
|
const emoji = hexToEmoji(id);
|
|
239
216
|
return (
|
|
240
217
|
<>
|
|
241
|
-
<p className='text-description'>{t('qr
|
|
242
|
-
<div role='group' className='grid grid-cols-[1fr_min-content]
|
|
243
|
-
<div
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<
|
|
256
|
-
|
|
218
|
+
<p className='text-description'>{t('qr-code.description', { ns: meta.id })}</p>
|
|
219
|
+
<div role='group' className='grid grid-cols-[1fr_min-content]'>
|
|
220
|
+
<div className='flex justify-center py-4'>
|
|
221
|
+
<div role='none' className='w-full md:max-w-80 aspect-square relative text-description'>
|
|
222
|
+
<QR
|
|
223
|
+
rounding={100}
|
|
224
|
+
backgroundColor='transparent'
|
|
225
|
+
color='currentColor'
|
|
226
|
+
aria-labelledby={qrLabel}
|
|
227
|
+
errorCorrectionLevel='Q'
|
|
228
|
+
cutout={true}
|
|
229
|
+
>
|
|
230
|
+
{url ?? 'never'}
|
|
231
|
+
</QR>
|
|
232
|
+
<Centered>
|
|
233
|
+
<Emoji text={emoji} />
|
|
234
|
+
</Centered>
|
|
235
|
+
</div>
|
|
257
236
|
</div>
|
|
258
237
|
<span id={qrLabel} className='sr-only'>
|
|
259
|
-
{t('qr
|
|
238
|
+
{t('qr.label')}
|
|
260
239
|
</span>
|
|
261
240
|
</div>
|
|
262
241
|
{/* TODO(burdon): Factor out button bar */}
|
|
@@ -264,7 +243,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
264
243
|
<div className='flex gap-2'>
|
|
265
244
|
<Clipboard.Button value={url ?? 'never'} />
|
|
266
245
|
<Button variant='ghost' onClick={onCancel}>
|
|
267
|
-
{t('cancel
|
|
246
|
+
{t('cancel.label')}
|
|
268
247
|
</Button>
|
|
269
248
|
</div>
|
|
270
249
|
</div>
|
|
@@ -273,22 +252,26 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
273
252
|
};
|
|
274
253
|
|
|
275
254
|
const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string; onCancel: () => void }) => {
|
|
276
|
-
const { t } = useTranslation(
|
|
255
|
+
const { t } = useTranslation(osTranslations);
|
|
277
256
|
const emoji = hexToEmoji(id);
|
|
278
257
|
|
|
279
258
|
return (
|
|
280
259
|
<>
|
|
281
|
-
<p className='text-description'>{t('auth
|
|
282
|
-
{emoji && <Emoji text={emoji} className='
|
|
283
|
-
<p className='text-description'>{t('auth
|
|
284
|
-
<AuthCode code={code} large classNames='
|
|
260
|
+
<p className='text-description'>{t('auth-other-device-emoji.message')}</p>
|
|
261
|
+
{emoji && <Emoji text={emoji} className='mx-auto my-2 text-center' />}
|
|
262
|
+
<p className='text-description'>{t('auth-code.message')}</p>
|
|
263
|
+
<AuthCode code={code} large classNames='mx-auto my-2 text-center grow' />
|
|
285
264
|
<Button variant='ghost' onClick={onCancel}>
|
|
286
|
-
{t('cancel
|
|
265
|
+
{t('cancel.label')}
|
|
287
266
|
</Button>
|
|
288
267
|
</>
|
|
289
268
|
);
|
|
290
269
|
};
|
|
291
270
|
|
|
292
271
|
const InvitationComplete = ({ statusValue }: { statusValue: number }) => {
|
|
293
|
-
return statusValue > 0 ?
|
|
272
|
+
return statusValue > 0 ? (
|
|
273
|
+
<Icon icon='ph--check--regular' size={6} classNames='m-1.5' />
|
|
274
|
+
) : (
|
|
275
|
+
<Icon icon='ph--x--regular' size={6} classNames='m-1.5' />
|
|
276
|
+
);
|
|
294
277
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
10
|
+
import { Dialog } from '@dxos/react-ui';
|
|
11
|
+
|
|
12
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
13
|
+
import { translations } from '../../translations';
|
|
14
|
+
import { JoinDialog } from './JoinDialog';
|
|
15
|
+
|
|
16
|
+
const DefaultStory = () => (
|
|
17
|
+
<Dialog.Root defaultOpen>
|
|
18
|
+
<Dialog.Overlay>
|
|
19
|
+
<JoinDialog />
|
|
20
|
+
</Dialog.Overlay>
|
|
21
|
+
</Dialog.Root>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const meta = {
|
|
25
|
+
title: 'plugins/plugin-client/containers/JoinDialog',
|
|
26
|
+
component: JoinDialog,
|
|
27
|
+
render: DefaultStory,
|
|
28
|
+
decorators: [
|
|
29
|
+
withPluginManager({
|
|
30
|
+
plugins: [...corePlugins(), ClientPlugin({})],
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
parameters: {
|
|
34
|
+
translations,
|
|
35
|
+
},
|
|
36
|
+
} satisfies Meta<typeof JoinDialog>;
|
|
37
|
+
|
|
38
|
+
export default meta;
|
|
39
|
+
|
|
40
|
+
type Story = StoryObj<typeof meta>;
|
|
41
|
+
|
|
42
|
+
export const Default: Story = {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback } from 'react';
|
|
6
|
+
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
10
|
+
import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
11
|
+
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';
|
|
13
|
+
import { osTranslations } from '@dxos/ui-theme';
|
|
14
|
+
|
|
15
|
+
import { meta } from '#meta';
|
|
16
|
+
import { ClientOperation } from '#operations';
|
|
17
|
+
|
|
18
|
+
export const JoinDialog = (props: JoinPanelProps) => {
|
|
19
|
+
const { invokePromise } = useOperationInvoker();
|
|
20
|
+
const { t } = useTranslation(meta.id);
|
|
21
|
+
|
|
22
|
+
const handleCancelResetStorage = useCallback(() => invokePromise(ClientOperation.ShareIdentity), [invokePromise]);
|
|
23
|
+
|
|
24
|
+
const handleDone = useCallback(
|
|
25
|
+
async (result: InvitationResult | null) => {
|
|
26
|
+
if (result?.identityKey) {
|
|
27
|
+
await Promise.all([
|
|
28
|
+
invokePromise(LayoutOperation.UpdateDialog, { state: false }),
|
|
29
|
+
invokePromise(ObservabilityOperation.SendEvent, {
|
|
30
|
+
name: props.initialDisposition === 'recover-identity' ? 'identity.recover' : 'identity.join',
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
[invokePromise],
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// TODO(burdon): Move JoinHeading into Dialog.Heading.
|
|
39
|
+
return (
|
|
40
|
+
<Dialog.Content>
|
|
41
|
+
<Dialog.Header>
|
|
42
|
+
<Dialog.Title classNames='sr-only'>{t('join-space.label', { ns: osTranslations })}</Dialog.Title>
|
|
43
|
+
</Dialog.Header>
|
|
44
|
+
<Dialog.Body>
|
|
45
|
+
<JoinPanel
|
|
46
|
+
{...props}
|
|
47
|
+
mode='halo-only'
|
|
48
|
+
exitActionParent={<Dialog.Close asChild />}
|
|
49
|
+
doneActionParent={<Dialog.Close asChild />}
|
|
50
|
+
onCancelResetStorage={handleCancelResetStorage}
|
|
51
|
+
onDone={handleDone}
|
|
52
|
+
/>
|
|
53
|
+
</Dialog.Body>
|
|
54
|
+
</Dialog.Content>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
|
|
10
|
+
import { translations } from '../../translations';
|
|
11
|
+
import { ProfileContainer } from './ProfileContainer';
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'plugins/plugin-client/containers/ProfileContainer',
|
|
15
|
+
component: ProfileContainer,
|
|
16
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'fullscreen',
|
|
19
|
+
translations,
|
|
20
|
+
},
|
|
21
|
+
} satisfies Meta<typeof ProfileContainer>;
|
|
22
|
+
|
|
23
|
+
export default meta;
|
|
24
|
+
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {};
|