@dxos/plugin-client 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe
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-J5LGTIGS.mjs.map +7 -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 +92 -80
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- 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 +90 -93
- 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 +4 -5
- 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-IT5LAIV3.mjs +133 -0
- 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 +92 -80
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- 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 +90 -93
- 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 +4 -5
- package/dist/types/src/ClientPlugin.d.ts +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client.d.ts +8 -0
- package/dist/types/src/capabilities/client.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +32 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- 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/{client/index.d.ts → node.d.ts} +7 -3
- 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/react-context.d.ts → react-context.d.ts} +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +9 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs.d.ts +5 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/info/info.d.ts +2 -2
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/list/list.d.ts +2 -2
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/create/create.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +1 -1
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/create.d.ts +2 -1
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -1
- 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/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/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.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/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -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.map +1 -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/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
- 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/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.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -175
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -36
- package/src/ClientPlugin.ts +37 -24
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +22 -20
- package/src/capabilities/{client/client.ts → client.ts} +16 -12
- package/src/capabilities/index.ts +15 -7
- package/src/capabilities/{migrations/migrations.ts → migrations.ts} +4 -4
- 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/react-context.tsx → react-context.tsx} +7 -7
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +21 -22
- package/src/capabilities/{schema-defs/schema-defs.ts → schema-defs.ts} +8 -7
- package/src/cli/commands/config/view.ts +4 -1
- package/src/cli/commands/device/info/info.test.ts +0 -1
- package/src/cli/commands/device/info/info.ts +0 -2
- package/src/cli/commands/device/list/list.test.ts +0 -1
- package/src/cli/commands/device/list/list.ts +0 -2
- package/src/cli/commands/device/update/update.ts +0 -2
- package/src/cli/commands/edge/status.ts +3 -2
- package/src/cli/commands/halo/create/create.test.ts +0 -1
- package/src/cli/commands/halo/create/create.ts +14 -6
- package/src/cli/commands/halo/credential/list/list.test.ts +0 -1
- package/src/cli/commands/halo/credential/list/list.ts +4 -7
- package/src/cli/commands/halo/identity/identity.ts +0 -1
- package/src/cli/commands/halo/keys/keys.ts +0 -2
- package/src/cli/commands/halo/seed/seed.ts +0 -2
- package/src/cli/commands/halo/update/update.test.ts +0 -1
- package/src/cli/commands/halo/update/update.ts +0 -2
- package/src/cli/commands/profile/create.ts +9 -6
- package/src/cli/commands/profile/delete.ts +5 -2
- package/src/cli/commands/profile/list.ts +12 -11
- package/src/cli/plugin.ts +11 -13
- package/src/cli/testing/test-console.ts +1 -2
- package/src/components/index.ts +0 -7
- package/src/constants.ts +4 -4
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +10 -7
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +77 -84
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
- package/src/{components → containers/JoinDialog}/JoinDialog.tsx +20 -15
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -5
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +22 -30
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -5
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -26
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +10 -7
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -15
- package/src/{components → containers/ResetDialog}/ResetDialog.tsx +15 -13
- 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 +1 -1
- 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 +53 -42
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +6 -6
- package/src/types/schema.ts +18 -123
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs +0 -118
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4BZGRIFS.mjs +0 -293
- package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs +0 -18
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs.map +0 -7
- package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
- package/dist/lib/browser/chunk-G7C3S2BE.mjs.map +0 -7
- package/dist/lib/browser/client-IX5LMWV4.mjs +0 -86
- package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
- package/dist/lib/browser/migrations-3EBTAW3N.mjs +0 -24
- package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs +0 -298
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
- package/dist/lib/browser/react-context-4UABG3GP.mjs +0 -24
- package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-O7VLP745.mjs +0 -26
- package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs +0 -119
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs +0 -20
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs +0 -295
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs.map +0 -7
- package/dist/lib/node-esm/client-FFPK5UFP.mjs +0 -87
- package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs +0 -25
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs +0 -299
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs +0 -25
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/client.d.ts +0 -8
- package/dist/types/src/capabilities/client/client.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/index.d.ts +0 -3
- package/dist/types/src/capabilities/migrations/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/migrations.d.ts +0 -5
- package/dist/types/src/capabilities/migrations/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -9
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/index.d.ts +0 -3
- package/dist/types/src/capabilities/schema-defs/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +0 -5
- package/dist/types/src/capabilities/schema-defs/schema-defs.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 -181
- 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.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client/index.ts +0 -7
- package/src/capabilities/migrations/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -248
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/schema-defs/index.ts +0 -7
- package/src/components/RecoveryCredentialsContainer.tsx +0 -68
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
|
@@ -5,35 +5,27 @@
|
|
|
5
5
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
6
6
|
import { QR } from 'react-qr-rounded';
|
|
7
7
|
|
|
8
|
-
import { useOperationInvoker } from '@dxos/app-framework/
|
|
8
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
10
|
import { useClient, useMulticastObservable } from '@dxos/react-client';
|
|
11
11
|
import { type Device, useDevices } from '@dxos/react-client/halo';
|
|
12
12
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
13
13
|
import { useNetworkStatus } from '@dxos/react-client/mesh';
|
|
14
14
|
import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
|
|
15
|
-
import {
|
|
16
|
-
ControlFrame,
|
|
17
|
-
ControlFrameItem,
|
|
18
|
-
ControlGroup,
|
|
19
|
-
ControlItem,
|
|
20
|
-
ControlPage,
|
|
21
|
-
ControlSection,
|
|
22
|
-
} from '@dxos/react-ui-form';
|
|
23
|
-
import { translationKey } from '@dxos/shell/react';
|
|
15
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
24
16
|
import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
|
|
25
17
|
import { osTranslations } from '@dxos/ui-theme';
|
|
26
18
|
import { hexToEmoji } from '@dxos/util';
|
|
27
19
|
|
|
28
|
-
import { meta } from '
|
|
29
|
-
import { ClientOperation } from '
|
|
20
|
+
import { meta } from '#meta';
|
|
21
|
+
import { ClientOperation } from '#operations';
|
|
30
22
|
|
|
31
23
|
export type DevicesContainerProps = {
|
|
32
24
|
createInvitationUrl?: (invitationCode: string) => string;
|
|
33
25
|
};
|
|
34
26
|
|
|
35
27
|
export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps) => {
|
|
36
|
-
const { t } = useTranslation(
|
|
28
|
+
const { t } = useTranslation(meta.id);
|
|
37
29
|
const { invokePromise } = useOperationInvoker();
|
|
38
30
|
const devices = useDevices();
|
|
39
31
|
const { swarm: connectionState } = useNetworkStatus();
|
|
@@ -46,63 +38,61 @@ export const DevicesContainer = ({ createInvitationUrl }: DevicesContainerProps)
|
|
|
46
38
|
);
|
|
47
39
|
|
|
48
40
|
const handleJoinNewIdentity = useCallback(
|
|
49
|
-
() => invokePromise(ClientOperation.ResetStorage, { mode: 'join
|
|
41
|
+
() => invokePromise(ClientOperation.ResetStorage, { mode: 'join-new-identity' }),
|
|
50
42
|
[invokePromise],
|
|
51
43
|
);
|
|
52
44
|
|
|
53
45
|
return (
|
|
54
46
|
<Clipboard.Provider>
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
title={t('devices
|
|
58
|
-
description={t('devices
|
|
47
|
+
<Settings.Viewport>
|
|
48
|
+
<Settings.Section
|
|
49
|
+
title={t('devices-verbose.label', { ns: meta.id })}
|
|
50
|
+
description={t('devices.description', { ns: meta.id })}
|
|
59
51
|
>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
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>
|
|
62
55
|
<List>
|
|
63
|
-
{devices.map((device: Device) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
67
|
-
})}
|
|
56
|
+
{devices.map((device: Device) => (
|
|
57
|
+
<DeviceListItem key={device.deviceKey.toHex()} device={device} connectionState={connectionState} />
|
|
58
|
+
))}
|
|
68
59
|
</List>
|
|
69
|
-
</
|
|
60
|
+
</div>
|
|
70
61
|
{createInvitationUrl && (
|
|
71
|
-
<
|
|
62
|
+
<div role='group' className='min-w-0'>
|
|
63
|
+
<h3 className='text-lg mb-2'>{t('add-device.label')}</h3>
|
|
72
64
|
<DeviceInvitation createInvitationUrl={createInvitationUrl} />
|
|
73
|
-
</
|
|
65
|
+
</div>
|
|
74
66
|
)}
|
|
75
|
-
</
|
|
76
|
-
</
|
|
77
|
-
<
|
|
78
|
-
title={t('danger
|
|
79
|
-
description={t('danger
|
|
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 })}
|
|
80
72
|
>
|
|
81
|
-
<
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</ControlSection>
|
|
105
|
-
</ControlPage>
|
|
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 })}
|
|
81
|
+
>
|
|
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 })}
|
|
89
|
+
>
|
|
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>
|
|
106
96
|
</Clipboard.Provider>
|
|
107
97
|
);
|
|
108
98
|
};
|
|
@@ -186,14 +176,15 @@ const InvitationSection = ({
|
|
|
186
176
|
: state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode
|
|
187
177
|
? 'auth-code'
|
|
188
178
|
: 'qr-code';
|
|
179
|
+
|
|
189
180
|
return activeView === 'init' ? (
|
|
190
181
|
<>
|
|
191
|
-
<p className='text-description
|
|
182
|
+
<p className='text-description mb-2'>{t('add-device.description')}</p>
|
|
192
183
|
<IconButton
|
|
193
184
|
icon='ph--plus--regular'
|
|
194
|
-
label={t('create
|
|
185
|
+
label={t('create-device-invitation.label')}
|
|
195
186
|
disabled={state >= 0}
|
|
196
|
-
classNames='
|
|
187
|
+
classNames='w-full'
|
|
197
188
|
data-testid='devicesContainer.createInvitation'
|
|
198
189
|
onClick={onInvitationCreate}
|
|
199
190
|
/>
|
|
@@ -224,25 +215,27 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
224
215
|
const emoji = hexToEmoji(id);
|
|
225
216
|
return (
|
|
226
217
|
<>
|
|
227
|
-
<p className='text-description'>{t('qr
|
|
228
|
-
<div role='group' className='grid grid-cols-[1fr_min-content]
|
|
229
|
-
<div
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<
|
|
242
|
-
|
|
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>
|
|
243
236
|
</div>
|
|
244
237
|
<span id={qrLabel} className='sr-only'>
|
|
245
|
-
{t('qr
|
|
238
|
+
{t('qr.label')}
|
|
246
239
|
</span>
|
|
247
240
|
</div>
|
|
248
241
|
{/* TODO(burdon): Factor out button bar */}
|
|
@@ -250,7 +243,7 @@ const InvitationQR = ({ id, url, onCancel }: { id: string; url: string; onCancel
|
|
|
250
243
|
<div className='flex gap-2'>
|
|
251
244
|
<Clipboard.Button value={url ?? 'never'} />
|
|
252
245
|
<Button variant='ghost' onClick={onCancel}>
|
|
253
|
-
{t('cancel
|
|
246
|
+
{t('cancel.label')}
|
|
254
247
|
</Button>
|
|
255
248
|
</div>
|
|
256
249
|
</div>
|
|
@@ -264,12 +257,12 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
|
|
|
264
257
|
|
|
265
258
|
return (
|
|
266
259
|
<>
|
|
267
|
-
<p className='text-description'>{t('auth
|
|
268
|
-
{emoji && <Emoji text={emoji} className='
|
|
269
|
-
<p className='text-description'>{t('auth
|
|
270
|
-
<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' />
|
|
271
264
|
<Button variant='ghost' onClick={onCancel}>
|
|
272
|
-
{t('cancel
|
|
265
|
+
{t('cancel.label')}
|
|
273
266
|
</Button>
|
|
274
267
|
</>
|
|
275
268
|
);
|
|
@@ -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 = {};
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/
|
|
7
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
10
10
|
import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
11
11
|
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
import { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';
|
|
13
13
|
import { osTranslations } from '@dxos/ui-theme';
|
|
14
14
|
|
|
15
|
-
import { meta } from '
|
|
16
|
-
import { ClientOperation } from '
|
|
15
|
+
import { meta } from '#meta';
|
|
16
|
+
import { ClientOperation } from '#operations';
|
|
17
17
|
|
|
18
18
|
export const JoinDialog = (props: JoinPanelProps) => {
|
|
19
19
|
const { invokePromise } = useOperationInvoker();
|
|
@@ -25,7 +25,7 @@ export const JoinDialog = (props: JoinPanelProps) => {
|
|
|
25
25
|
async (result: InvitationResult | null) => {
|
|
26
26
|
if (result?.identityKey) {
|
|
27
27
|
await Promise.all([
|
|
28
|
-
invokePromise(
|
|
28
|
+
invokePromise(LayoutOperation.UpdateDialog, { state: false }),
|
|
29
29
|
invokePromise(ObservabilityOperation.SendEvent, {
|
|
30
30
|
name: props.initialDisposition === 'recover-identity' ? 'identity.recover' : 'identity.join',
|
|
31
31
|
}),
|
|
@@ -35,17 +35,22 @@ export const JoinDialog = (props: JoinPanelProps) => {
|
|
|
35
35
|
[invokePromise],
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
+
// TODO(burdon): Move JoinHeading into Dialog.Heading.
|
|
38
39
|
return (
|
|
39
40
|
<Dialog.Content>
|
|
40
|
-
<Dialog.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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>
|
|
49
54
|
</Dialog.Content>
|
|
50
55
|
);
|
|
51
56
|
};
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
|
|
7
7
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
8
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
|
-
|
|
10
|
-
import { translations } from '../translations';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
9
|
|
|
10
|
+
import { translations } from '../../translations';
|
|
12
11
|
import { ProfileContainer } from './ProfileContainer';
|
|
13
12
|
|
|
14
13
|
const meta = {
|
|
15
|
-
title: 'plugins/plugin-client/ProfileContainer',
|
|
14
|
+
title: 'plugins/plugin-client/containers/ProfileContainer',
|
|
16
15
|
component: ProfileContainer,
|
|
17
|
-
decorators: [withTheme, withClientProvider({ createIdentity: true })],
|
|
16
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
18
17
|
parameters: {
|
|
19
18
|
layout: 'fullscreen',
|
|
20
19
|
translations,
|
|
@@ -9,19 +9,11 @@ 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
|
-
ControlItem,
|
|
14
|
-
ControlItemInput,
|
|
15
|
-
ControlPage,
|
|
16
|
-
ControlSection,
|
|
17
|
-
Form,
|
|
18
|
-
type FormFieldMap,
|
|
19
|
-
type FormUpdateMeta,
|
|
20
|
-
} from '@dxos/react-ui-form';
|
|
12
|
+
import { Form, type FormFieldMap, type FormUpdateMeta, Settings } from '@dxos/react-ui-form';
|
|
21
13
|
import { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';
|
|
22
14
|
import { hexToEmoji, hexToHue } from '@dxos/util';
|
|
23
15
|
|
|
24
|
-
import { meta } from '
|
|
16
|
+
import { meta } from '#meta';
|
|
25
17
|
|
|
26
18
|
// TOOD(burdon): Factor out?
|
|
27
19
|
// TODO(wittjosiah): Integrate annotations with translations.
|
|
@@ -109,14 +101,14 @@ export const ProfileContainer = () => {
|
|
|
109
101
|
);
|
|
110
102
|
|
|
111
103
|
return (
|
|
112
|
-
<
|
|
104
|
+
<Settings.Item title={label} description={t('display-name.description')}>
|
|
113
105
|
<Input.TextInput
|
|
114
106
|
value={getValue()}
|
|
115
107
|
onChange={handleChange}
|
|
116
|
-
placeholder={t('display
|
|
117
|
-
classNames='min-
|
|
108
|
+
placeholder={t('display-name-input.placeholder')}
|
|
109
|
+
classNames='min-w-64'
|
|
118
110
|
/>
|
|
119
|
-
</
|
|
111
|
+
</Settings.Item>
|
|
120
112
|
);
|
|
121
113
|
},
|
|
122
114
|
emoji: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -127,7 +119,7 @@ export const ProfileContainer = () => {
|
|
|
127
119
|
);
|
|
128
120
|
|
|
129
121
|
return (
|
|
130
|
-
<
|
|
122
|
+
<Settings.Item title={label} description={t('icon.description')}>
|
|
131
123
|
<EmojiPickerBlock
|
|
132
124
|
triggerVariant='default'
|
|
133
125
|
emoji={getValue()}
|
|
@@ -135,7 +127,7 @@ export const ProfileContainer = () => {
|
|
|
135
127
|
onClickClear={handleEmojiReset}
|
|
136
128
|
classNames='justify-self-end'
|
|
137
129
|
/>
|
|
138
|
-
</
|
|
130
|
+
</Settings.Item>
|
|
139
131
|
);
|
|
140
132
|
},
|
|
141
133
|
hue: ({ type, label, getValue, onValueChange }) => {
|
|
@@ -146,22 +138,22 @@ export const ProfileContainer = () => {
|
|
|
146
138
|
);
|
|
147
139
|
|
|
148
140
|
return (
|
|
149
|
-
<
|
|
141
|
+
<Settings.Item title={label} description={t('hue.description')}>
|
|
150
142
|
<div role='none' className='flex justify-self-end'>
|
|
151
143
|
<HuePicker value={getValue()} onChange={handleChange} onReset={handleHueReset} />
|
|
152
144
|
</div>
|
|
153
|
-
</
|
|
145
|
+
</Settings.Item>
|
|
154
146
|
);
|
|
155
147
|
},
|
|
156
148
|
// TODO(wittjosiah): We need text input annotations for disabled and copyable.
|
|
157
149
|
did: ({ label, getValue }) => {
|
|
158
150
|
return (
|
|
159
|
-
<
|
|
160
|
-
<ButtonGroup>
|
|
161
|
-
<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' />
|
|
162
154
|
<Clipboard.IconButton value={getValue() ?? ''} />
|
|
163
155
|
</ButtonGroup>
|
|
164
|
-
</
|
|
156
|
+
</Settings.Item>
|
|
165
157
|
);
|
|
166
158
|
},
|
|
167
159
|
}),
|
|
@@ -169,16 +161,16 @@ export const ProfileContainer = () => {
|
|
|
169
161
|
);
|
|
170
162
|
|
|
171
163
|
return (
|
|
172
|
-
<
|
|
173
|
-
<
|
|
174
|
-
<
|
|
164
|
+
<Clipboard.Provider>
|
|
165
|
+
<Settings.Viewport>
|
|
166
|
+
<Settings.Section title={t('profile.label')} description={t('profile.description')}>
|
|
175
167
|
<Form.Root schema={UserProfile} values={values} fieldMap={fieldMap} onValuesChanged={handleChange}>
|
|
176
|
-
<Form.Content>
|
|
177
|
-
<Form.FieldSet
|
|
168
|
+
<Form.Content classNames='gap-form-gap'>
|
|
169
|
+
<Form.FieldSet />
|
|
178
170
|
</Form.Content>
|
|
179
171
|
</Form.Root>
|
|
180
|
-
</
|
|
181
|
-
</
|
|
182
|
-
</
|
|
172
|
+
</Settings.Section>
|
|
173
|
+
</Settings.Viewport>
|
|
174
|
+
</Clipboard.Provider>
|
|
183
175
|
);
|
|
184
176
|
};
|
|
@@ -8,10 +8,9 @@ import React, { useState } from 'react';
|
|
|
8
8
|
import { useClient } from '@dxos/react-client';
|
|
9
9
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
10
10
|
import { AlertDialog, useAsyncEffect } from '@dxos/react-ui';
|
|
11
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
|
-
|
|
13
|
-
import { translations } from '../translations';
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
|
|
13
|
+
import { translations } from '../../translations';
|
|
15
14
|
import { RecoveryCodeDialog } from './RecoveryCodeDialog';
|
|
16
15
|
|
|
17
16
|
const DefaultStory = () => {
|
|
@@ -32,10 +31,10 @@ const DefaultStory = () => {
|
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
const meta = {
|
|
35
|
-
title: 'plugins/plugin-client/RecoveryCodeDialog',
|
|
34
|
+
title: 'plugins/plugin-client/containers/RecoveryCodeDialog',
|
|
36
35
|
component: RecoveryCodeDialog as any,
|
|
37
36
|
render: DefaultStory,
|
|
38
|
-
decorators: [withTheme, withClientProvider({ createIdentity: true })],
|
|
37
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
39
38
|
parameters: {
|
|
40
39
|
layout: 'fullscreen',
|
|
41
40
|
translations,
|
|
@@ -6,12 +6,13 @@ import React, { useCallback, useState } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import { meta } from '
|
|
9
|
+
import { meta } from '#meta';
|
|
10
10
|
|
|
11
11
|
export type RecoveryCodeDialogProps = {
|
|
12
12
|
code: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
// TODO(burdon): Should have cancel button.
|
|
15
16
|
export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
16
17
|
const { t } = useTranslation(meta.id);
|
|
17
18
|
const [confirmation, setConfirmation] = useState(false);
|
|
@@ -19,33 +20,35 @@ export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
|
19
20
|
const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
|
-
<AlertDialog.Content classNames='
|
|
23
|
-
<AlertDialog.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
<Input.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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>
|
|
43
46
|
<AlertDialog.Action asChild>
|
|
44
47
|
<Button data-testid='recoveryCode.continue' variant='primary' disabled={!confirmation}>
|
|
45
|
-
{t('continue
|
|
48
|
+
{t('continue.label')}
|
|
46
49
|
</Button>
|
|
47
50
|
</AlertDialog.Action>
|
|
48
|
-
</
|
|
51
|
+
</AlertDialog.ActionBar>
|
|
49
52
|
</AlertDialog.Content>
|
|
50
53
|
);
|
|
51
54
|
};
|
|
@@ -53,12 +56,12 @@ export const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {
|
|
|
53
56
|
const Code = ({ code }: { code: string }) => {
|
|
54
57
|
const words = code.split(' ');
|
|
55
58
|
return (
|
|
56
|
-
<div className='relative p-2 border border-separator rounded group'>
|
|
59
|
+
<div className='relative p-2 border border-separator rounded-sm group'>
|
|
57
60
|
<Clipboard.IconButton value={code} classNames='absolute top-2 right-2 invisible group-hover:visible' />
|
|
58
61
|
<div className='grid grid-cols-4'>
|
|
59
62
|
{words.map((word, i) => (
|
|
60
63
|
<div key={i} className='flex items-center p-2 gap-2'>
|
|
61
|
-
<div className='
|
|
64
|
+
<div className='w-4 text-xs text-center text-subdued'>{i + 1}</div>
|
|
62
65
|
<div className='text-sm'>{word}</div>
|
|
63
66
|
</div>
|
|
64
67
|
))}
|