@dxos/plugin-client 0.8.4-main.fffef41 → 0.9.0
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AccountContainer-FZ3IC6H4.mjs +182 -0
- package/dist/lib/neutral/AccountContainer-FZ3IC6H4.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.mjs +72 -0
- package/dist/lib/neutral/ClientPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs +1049 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs +262 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs.map +7 -0
- package/dist/lib/neutral/InvitationsContainer-ME722VKS.mjs +132 -0
- package/dist/lib/neutral/InvitationsContainer-ME722VKS.mjs.map +7 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs +53 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs.map +7 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs +168 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCodeDialog-EWHB6U5T.mjs +59 -0
- package/dist/lib/neutral/RecoveryCodeDialog-EWHB6U5T.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs +51 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs.map +7 -0
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs +57 -0
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs.map +7 -0
- package/dist/lib/neutral/account-cache-4EKGEUJI.mjs +43 -0
- package/dist/lib/neutral/account-cache-4EKGEUJI.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-A74W7C36.mjs +145 -0
- package/dist/lib/neutral/app-graph-builder-A74W7C36.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +34 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +21 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-D6HPCLTS.mjs +185 -0
- package/dist/lib/neutral/chunk-D6HPCLTS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-JEF2FQGB.mjs +27 -0
- package/dist/lib/neutral/chunk-JEF2FQGB.mjs.map +7 -0
- package/dist/lib/{browser/chunk-ZRVMXLDR.mjs → neutral/chunk-JOCCVODY.mjs} +11 -5
- package/dist/lib/neutral/chunk-JOCCVODY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NTVDGDQ3.mjs +8 -0
- package/dist/lib/neutral/chunk-NTVDGDQ3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TUK3ELUU.mjs +135 -0
- package/dist/lib/neutral/chunk-TUK3ELUU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs +13 -0
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs.map +7 -0
- package/dist/lib/neutral/client-7I5Y5SOA.mjs +62 -0
- package/dist/lib/neutral/client-7I5Y5SOA.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -0
- package/dist/lib/neutral/containers/index.mjs +23 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-agent-6HLW4D3A.mjs +26 -0
- package/dist/lib/neutral/create-agent-6HLW4D3A.mjs.map +7 -0
- package/dist/lib/neutral/create-identity-JIWAR5GW.mjs +42 -0
- package/dist/lib/neutral/create-identity-JIWAR5GW.mjs.map +7 -0
- package/dist/lib/neutral/create-passkey-FOXEMXGF.mjs +81 -0
- package/dist/lib/neutral/create-passkey-FOXEMXGF.mjs.map +7 -0
- package/dist/lib/neutral/create-recovery-code-ZWDKLPH4.mjs +36 -0
- package/dist/lib/neutral/create-recovery-code-ZWDKLPH4.mjs.map +7 -0
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs +19 -0
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +23 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/join-identity-QEQFAE2S.mjs +27 -0
- package/dist/lib/neutral/join-identity-QEQFAE2S.mjs.map +7 -0
- package/dist/lib/neutral/layer-specs-CQLXQBQJ.mjs +61 -0
- package/dist/lib/neutral/layer-specs-CQLXQBQJ.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs +23 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs.map +7 -0
- package/dist/lib/neutral/navigation-handler-LU26CDFR.mjs +46 -0
- package/dist/lib/neutral/navigation-handler-LU26CDFR.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs +13 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +12 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +17 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs +23 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-DEKGWTCD.mjs +70 -0
- package/dist/lib/neutral/react-surface-DEKGWTCD.mjs.map +7 -0
- package/dist/lib/neutral/recover-identity-JNFKLCUD.mjs +26 -0
- package/dist/lib/neutral/recover-identity-JNFKLCUD.mjs.map +7 -0
- package/dist/lib/neutral/redeem-passkey-4SBAI4AG.mjs +66 -0
- package/dist/lib/neutral/redeem-passkey-4SBAI4AG.mjs.map +7 -0
- package/dist/lib/neutral/redeem-token-POBD6TMN.mjs +29 -0
- package/dist/lib/neutral/redeem-token-POBD6TMN.mjs.map +7 -0
- package/dist/lib/neutral/reset-storage-LQKUV5RA.mjs +26 -0
- package/dist/lib/neutral/reset-storage-LQKUV5RA.mjs.map +7 -0
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs +51 -0
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs.map +7 -0
- package/dist/lib/neutral/share-identity-KNQ2XNXV.mjs +31 -0
- package/dist/lib/neutral/share-identity-KNQ2XNXV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +25 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +101 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ClientPlugin.d.ts +4 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/ClientPlugin.node.d.ts +5 -0
- package/dist/types/src/ClientPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.test.d.ts +2 -0
- package/dist/types/src/ClientPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/account-cache.d.ts +35 -0
- package/dist/types/src/capabilities/account-cache.d.ts.map +1 -0
- 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/hub-http-client.d.ts +6 -0
- package/dist/types/src/capabilities/hub-http-client.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +61 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +6 -0
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
- 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 +26 -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/commands/config/index.d.ts +5 -0
- package/dist/types/src/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/commands/config/view.d.ts +5 -0
- package/dist/types/src/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/commands/device/index.d.ts +7 -0
- package/dist/types/src/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/device/util.d.ts +16 -0
- package/dist/types/src/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/commands/edge/index.d.ts +5 -0
- package/dist/types/src/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/commands/edge/status.d.ts +7 -0
- package/dist/types/src/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/index.d.ts +3 -0
- package/dist/types/src/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/util.d.ts +10 -0
- package/dist/types/src/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts +6 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/create.d.ts +10 -0
- package/dist/types/src/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/commands/profile/import.d.ts +17 -0
- package/dist/types/src/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/commands/profile/index.d.ts +19 -0
- package/dist/types/src/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/commands/profile/list.d.ts +6 -0
- package/dist/types/src/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/commands/profile/util.d.ts +24 -0
- package/dist/types/src/commands/profile/util.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 +5 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts +3 -0
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts.map +1 -0
- package/dist/types/src/containers/AccountContainer/index.d.ts +2 -0
- package/dist/types/src/containers/AccountContainer/index.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/containers/InvitationsContainer/InvitationsContainer.d.ts +3 -0
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/InvitationsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/InvitationsContainer/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.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 +14 -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 +12 -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 -2
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/state/account-cache.d.ts +42 -0
- package/dist/types/src/state/account-cache.d.ts.map +1 -0
- package/dist/types/src/state/use-hub-http.d.ts +8 -0
- package/dist/types/src/state/use-hub-http.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +14 -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 +43 -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 +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +55 -33
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +134 -53
- package/src/ClientPlugin.node.ts +42 -0
- package/src/ClientPlugin.test.ts +29 -0
- package/src/ClientPlugin.ts +70 -59
- package/src/ClientPlugin.workerd.ts +16 -0
- package/src/capabilities/account-cache.ts +25 -0
- package/src/capabilities/app-graph-builder.ts +104 -104
- package/src/capabilities/client.ts +67 -30
- package/src/capabilities/hub-http-client.ts +21 -0
- package/src/capabilities/index.ts +17 -10
- package/src/capabilities/layer-specs.ts +92 -0
- 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 +21 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +17 -14
- package/src/capabilities/react-surface.tsx +64 -49
- package/src/capabilities/schema-defs.ts +52 -25
- package/src/commands/config/index.ts +12 -0
- package/src/commands/config/view.ts +29 -0
- package/src/commands/device/index.ts +14 -0
- package/src/commands/device/info/index.ts +5 -0
- package/src/commands/device/info/info.test.ts +28 -0
- package/src/commands/device/info/info.ts +48 -0
- package/src/commands/device/list/index.ts +5 -0
- package/src/commands/device/list/list.test.ts +30 -0
- package/src/commands/device/list/list.ts +28 -0
- package/src/commands/device/update/index.ts +5 -0
- package/src/commands/device/update/update.ts +68 -0
- package/src/commands/device/util.ts +55 -0
- package/src/commands/edge/index.ts +12 -0
- package/src/commands/edge/status.ts +46 -0
- package/src/commands/halo/create/create.test.ts +53 -0
- package/src/commands/halo/create/create.ts +82 -0
- package/src/commands/halo/create/index.ts +5 -0
- package/src/commands/halo/credential/add/add.ts +97 -0
- package/src/commands/halo/credential/add/index.ts +5 -0
- package/src/commands/halo/credential/index.ts +13 -0
- package/src/commands/halo/credential/list/index.ts +5 -0
- package/src/commands/halo/credential/list/list.test.ts +27 -0
- package/src/commands/halo/credential/list/list.ts +115 -0
- package/src/commands/halo/identity/identity.test.ts +40 -0
- package/src/commands/halo/identity/identity.ts +45 -0
- package/src/commands/halo/identity/index.ts +5 -0
- package/src/commands/halo/index.ts +21 -0
- package/src/commands/halo/join/index.ts +5 -0
- package/src/commands/halo/join/join.test.ts +10 -0
- package/src/commands/halo/join/join.ts +87 -0
- package/src/commands/halo/keys/index.ts +5 -0
- package/src/commands/halo/keys/keys.test.ts +29 -0
- package/src/commands/halo/keys/keys.ts +40 -0
- package/src/commands/halo/recover/index.ts +5 -0
- package/src/commands/halo/recover/recover.test.ts +10 -0
- package/src/commands/halo/recover/recover.ts +44 -0
- package/src/commands/halo/seed/index.ts +5 -0
- package/src/commands/halo/seed/seed.ts +36 -0
- package/src/commands/halo/share/index.ts +5 -0
- package/src/commands/halo/share/share.ts +97 -0
- package/src/commands/halo/update/index.ts +5 -0
- package/src/commands/halo/update/update.test.ts +28 -0
- package/src/commands/halo/update/update.ts +67 -0
- package/src/commands/halo/util.ts +15 -0
- package/src/commands/index.ts +9 -0
- package/src/commands/profile/create.ts +90 -0
- package/src/commands/profile/delete.ts +36 -0
- package/src/commands/profile/import.ts +101 -0
- package/src/commands/profile/index.ts +17 -0
- package/src/commands/profile/inspect.ts +64 -0
- package/src/commands/profile/list.ts +55 -0
- package/src/commands/profile/reset.ts +45 -0
- package/src/commands/profile/util.ts +48 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +11 -0
- package/src/containers/AccountContainer/AccountContainer.tsx +179 -0
- package/src/containers/AccountContainer/index.ts +5 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +14 -10
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +85 -91
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +137 -0
- package/src/containers/InvitationsContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +66 -55
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +14 -10
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +73 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +62 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +17 -0
- package/src/index.ts +2 -5
- package/src/meta.ts +7 -4
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +37 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +115 -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/plugin.ts +11 -0
- package/src/state/account-cache.ts +33 -0
- package/src/state/use-hub-http.ts +32 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/initializeIdentity.ts +30 -0
- package/src/translations.ts +89 -44
- package/src/types/capabilities.ts +23 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +33 -22
- package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs +0 -124
- package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs.map +0 -7
- package/dist/lib/browser/chunk-4G4YWIUQ.mjs +0 -686
- package/dist/lib/browser/chunk-4G4YWIUQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs +0 -19
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5UR2HOE.mjs +0 -18
- package/dist/lib/browser/chunk-N5UR2HOE.mjs.map +0 -7
- package/dist/lib/browser/chunk-RDIG75CA.mjs +0 -110
- package/dist/lib/browser/chunk-RDIG75CA.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZRVMXLDR.mjs.map +0 -7
- package/dist/lib/browser/client-O7U3MQ6J.mjs +0 -43
- package/dist/lib/browser/client-O7U3MQ6J.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -156
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs +0 -305
- package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/migrations-RUAKBBTF.mjs +0 -23
- package/dist/lib/browser/migrations-RUAKBBTF.mjs.map +0 -7
- package/dist/lib/browser/react-context-PCT5C3BN.mjs +0 -25
- package/dist/lib/browser/react-context-PCT5C3BN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RCXEA65V.mjs +0 -66
- package/dist/lib/browser/react-surface-RCXEA65V.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-UNNBAEFW.mjs +0 -25
- package/dist/lib/browser/schema-defs-UNNBAEFW.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs +0 -125
- package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs +0 -19
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs +0 -20
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs +0 -687
- package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs +0 -17
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VENKFPBC.mjs +0 -111
- package/dist/lib/node-esm/chunk-VENKFPBC.mjs.map +0 -7
- package/dist/lib/node-esm/client-6MTNT7M6.mjs +0 -44
- package/dist/lib/node-esm/client-6MTNT7M6.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -157
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/migrations-ASF2SAUR.mjs +0 -24
- package/dist/lib/node-esm/migrations-ASF2SAUR.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-F4QOBWSP.mjs +0 -26
- package/dist/lib/node-esm/react-context-F4QOBWSP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs +0 -67
- package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts +0 -9
- 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 -227
- 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 -60
- 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 -62
- 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 +0 -60
- 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 -65
- 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/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/intent-resolver.ts +0 -251
- package/src/components/JoinDialog.tsx +0 -54
- package/src/components/RecoveryCredentialsContainer.tsx +0 -69
- package/src/components/ResetDialog.stories.tsx +0 -52
- package/src/components/ResetDialog.tsx +0 -50
- package/src/events.ts +0 -15
- /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/components}/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
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "./chunk-NTVDGDQ3.mjs";
|
|
2
|
+
import {
|
|
3
|
+
definitions_exports
|
|
4
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
5
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
6
|
+
|
|
7
|
+
// src/capabilities/navigation-handler/navigation-handler.ts
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
10
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
11
|
+
import { Operation } from "@dxos/compute";
|
|
12
|
+
import { log } from "@dxos/log";
|
|
13
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/navigation-handler/navigation-handler.ts";
|
|
14
|
+
var navigation_handler_default = Capability.makeModule(Effect.fnUntraced(function* ({ invitationProp = "deviceInvitationCode", tokenProp = "token", tokenTypeProp = "type" } = {}) {
|
|
15
|
+
const capabilities = yield* Capability.Service;
|
|
16
|
+
const operationService = yield* Capability.get(Capabilities.OperationInvoker);
|
|
17
|
+
const handler = (url) => Effect.gen(function* () {
|
|
18
|
+
const token = url.searchParams.get(tokenProp);
|
|
19
|
+
const tokenType = url.searchParams.get(tokenTypeProp);
|
|
20
|
+
const invitationCode = url.searchParams.get(invitationProp);
|
|
21
|
+
if (token && tokenType === "login") {
|
|
22
|
+
log("login token received via navigation", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 21, S: this });
|
|
23
|
+
removeQueryParam(tokenProp);
|
|
24
|
+
removeQueryParam(tokenTypeProp);
|
|
25
|
+
yield* Operation.invoke(definitions_exports.RedeemToken, {
|
|
26
|
+
token
|
|
27
|
+
});
|
|
28
|
+
} else if (invitationCode) {
|
|
29
|
+
log("device invitation received via navigation", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 28, S: this });
|
|
30
|
+
removeQueryParam(invitationProp);
|
|
31
|
+
yield* Operation.invoke(definitions_exports.JoinIdentity, {
|
|
32
|
+
invitationCode
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}).pipe(Effect.provideService(Capability.Service, capabilities), Effect.provideService(Operation.Service, operationService), Effect.orDie);
|
|
36
|
+
return Capability.contributes(AppCapabilities.NavigationHandler, handler);
|
|
37
|
+
}));
|
|
38
|
+
var removeQueryParam = (key) => {
|
|
39
|
+
const current = new URL(window.location.href);
|
|
40
|
+
current.searchParams.delete(key);
|
|
41
|
+
history.replaceState(null, "", current.pathname + current.search);
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
navigation_handler_default as default
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=navigation-handler-LU26CDFR.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/navigation-handler/navigation-handler.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { log } from '@dxos/log';\n\nimport { ClientOperation } from '../../operations';\n\nexport type NavigationHandlerOptions = {\n invitationProp?: string;\n tokenProp?: string;\n tokenTypeProp?: string;\n};\n\n/**\n * NavigationHandler for auth-related URL params.\n * Handles login tokens and device invitation codes.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({\n invitationProp = 'deviceInvitationCode',\n tokenProp = 'token',\n tokenTypeProp = 'type',\n }: NavigationHandlerOptions = {}) {\n const capabilities = yield* Capability.Service;\n const operationService = yield* Capability.get(Capabilities.OperationInvoker);\n\n const handler: AppCapabilities.NavigationHandler = (url: URL) =>\n Effect.gen(function* () {\n const token = url.searchParams.get(tokenProp);\n const tokenType = url.searchParams.get(tokenTypeProp);\n const invitationCode = url.searchParams.get(invitationProp);\n\n if (token && tokenType === 'login') {\n log('login token received via navigation');\n removeQueryParam(tokenProp);\n removeQueryParam(tokenTypeProp);\n yield* Operation.invoke(ClientOperation.RedeemToken, { token });\n } else if (invitationCode) {\n log('device invitation received via navigation');\n removeQueryParam(invitationProp);\n yield* Operation.invoke(ClientOperation.JoinIdentity, { invitationCode });\n }\n }).pipe(\n Effect.provideService(Capability.Service, capabilities),\n Effect.provideService(Operation.Service, operationService),\n Effect.orDie,\n );\n\n return Capability.contributes(AppCapabilities.NavigationHandler, handler);\n }),\n);\n\n/** Remove a query param from the current browser URL. */\nconst removeQueryParam = (key: string) => {\n const current = new URL(window.location.href);\n current.searchParams.delete(key);\n history.replaceState(null, '', current.pathname + current.search);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AAUpB,IAAA,eAAA;AAWI,IAAMC,6BAAAA,WAAmB,WAAkBC,kBAAIC,WAAaC,EAAAA,iBAAgB,wBAAA,YAAA,SAAA,gBAAA,OAAA,IAAA,CAAA,GAAA;AAE5E,QAAMC,eAA8CC,OAClDC,WAAW;2BACKD,OAAIE,WAAiBC,IAAAA,aAAAA,gBAAAA;kBAC7BC,CAAAA,QAAgBF,WAAAA,aAAgB;AACtC,UAAMG,QAAAA,IAAAA,aAAqBH,IAAAA,SAAiBI;AAE5C,UAAIC,YAASH,IAAAA,aAAc,IAAS,aAAA;UAClCI,iBAAI,IAAA,aAAA,IAAA,cAAA;QACJC,SAAAA,cAAiBN,SAAAA;AACjBM,UAAAA,uCAAiBC,QAAAA,EAAAA,YAAAA,YAAAA,GAAAA,cAAAA,GAAAA,IAAAA,GAAAA,KAAAA,CAAAA;AACjB,uBAAiBC,SAAOC;uBAA+BL,aAAAA;AAAM,aAAA,UAAA,OAAA,oBAAA,aAAA;QACxD;MACLC,CAAAA;eACAC,gBAAiBH;AACjB,UAAA,6CAAwCO,QAAc,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;uBAAER,cAAAA;AAAe,aAAA,UAAA,OAAA,oBAAA,cAAA;QACzE;MAEAJ,CAAAA;IAKGa;EAET,CAAA,EAAA,KAAA,sBAAA,WAAA,SAAA,YAAA,GAAA,sBAAA,UAAA,SAAA,gBAAA,GAAA,YAAA;AAEF,SAAA,WAAA,YAAA,gBAAA,mBACML,OAAAA;;AAEwBM,IAAAA,mBAAAA,CAAAA,QAAAA;AAC5BC,QAAAA,UAAQC,IAAY,IAAC,OAAUC,SAAQC,IAAAA;AACzC,UAAA,aAAA,OAAA,GAAA;;;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "Operation", "log", "operationService", "get", "Capabilities", "OperationInvoker", "handler", "url", "Effect", "searchParams", "tokenProp", "tokenType", "invitationCode", "invitationProp", "token", "log", "removeQueryParam", "tokenTypeProp", "invoke", "ClientOperation", "JoinIdentity", "Capability", "key", "history", "replaceState", "current", "pathname"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/operation-handler.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
6
|
+
import { ClientOperationHandlerSet } from "#operations";
|
|
7
|
+
var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
8
|
+
return Capability.contributes(Capabilities.OperationHandler, ClientOperationHandlerSet);
|
|
9
|
+
}));
|
|
10
|
+
export {
|
|
11
|
+
operation_handler_default as default
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=operation-handler-E3HB7E2T.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/operation-handler.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { ClientOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, ClientOperationHandlerSet);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AAGzC,SAASC,iCAAiC;AAE1C,IAAA,4BAAeD,WAAWE,WACjBC,kBAAW,aAAA;AAChB,SAAOH,WAAWI,YAAYL,aAAaM,kBAAkBJ,yBAAAA;AAC/D,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "ClientOperationHandlerSet", "makeModule", "fnUntraced", "contributes", "OperationHandler"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClientOperationHandlerSet
|
|
3
|
+
} from "../chunk-NTVDGDQ3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
definitions_exports
|
|
6
|
+
} from "../chunk-D6HPCLTS.mjs";
|
|
7
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
definitions_exports as ClientOperation,
|
|
10
|
+
ClientOperationHandlerSet
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-JOCCVODY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ClientOperationHandlerSet
|
|
6
|
+
} from "./chunk-NTVDGDQ3.mjs";
|
|
7
|
+
import "./chunk-D6HPCLTS.mjs";
|
|
8
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
9
|
+
|
|
10
|
+
// src/plugin.ts
|
|
11
|
+
import { Plugin } from "@dxos/app-framework";
|
|
12
|
+
var ClientPlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
13
|
+
export {
|
|
14
|
+
ClientOperationHandlerSet,
|
|
15
|
+
ClientPlugin
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const ClientPlugin = Plugin.lazy(meta, () => import('#plugin'));\n\nexport { ClientOperationHandlerSet } from './operations';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,eAAeC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "ClientPlugin", "Plugin", "lazy", "meta"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/react-context.tsx
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
7
|
+
import { useCapability } from "@dxos/app-framework/ui";
|
|
8
|
+
import { ClientProvider } from "@dxos/react-client";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
import { ClientCapabilities } from "#types";
|
|
11
|
+
var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactContext, {
|
|
12
|
+
id: meta.id,
|
|
13
|
+
context: ({ children }) => {
|
|
14
|
+
const client = useCapability(ClientCapabilities.Client);
|
|
15
|
+
return /* @__PURE__ */ React.createElement(ClientProvider, {
|
|
16
|
+
client
|
|
17
|
+
}, children);
|
|
18
|
+
}
|
|
19
|
+
})));
|
|
20
|
+
export {
|
|
21
|
+
react_context_default as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=react-context-B5LXMHVM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-context.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { ReactNode } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { ClientProvider } from '@dxos/react-client';\n\nimport { meta } from '#meta';\nimport { ClientCapabilities } from '#types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactContext, {\n id: meta.id,\n context: ({ children }: { children?: ReactNode }) => {\n const client = useCapability(ClientCapabilities.Client);\n return <ClientProvider client={client}>{children}</ClientProvider>;\n },\n }),\n ),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAA0B;AAEjC,SAASC,cAAcC,kBAAkB;AACzC,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAE/B,SAASC,YAAY;AACrB,SAASC,0BAA0B;AAEnC,IAAA,wBAAeJ,WAAWK,WAAW,MAC5BC,eACLN,WAAWO,YAAYR,aAAaS,cAAc;EAChDC,IAAIN,KAAKM;EACTC,SAAS,CAAC,EAAEC,SAAQ,MAA4B;AAC9C,UAAMC,SAASX,cAAcG,mBAAmBS,MAAM;AACtD,WAAO,sBAAA,cAACX,gBAAAA;MAAeU;OAAiBD,QAAAA;EAC1C;AACF,CAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "useCapability", "ClientProvider", "meta", "ClientCapabilities", "makeModule", "succeed", "contributes", "ReactContext", "id", "context", "children", "client", "Client"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
JOIN_DIALOG,
|
|
3
|
+
RECOVERY_CODE_DIALOG,
|
|
4
|
+
RESET_DIALOG
|
|
5
|
+
} from "./chunk-WWCVZG3K.mjs";
|
|
6
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
7
|
+
|
|
8
|
+
// src/capabilities/react-surface.tsx
|
|
9
|
+
import * as Effect from "effect/Effect";
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
12
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
13
|
+
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
14
|
+
import { AccountContainer, DevicesContainer, InvitationsContainer, JoinDialog, ProfileContainer, RecoveryCodeDialog, RecoveryCredentialsContainer, ResetDialog } from "#containers";
|
|
15
|
+
import { Account } from "#types";
|
|
16
|
+
var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({ createInvitationUrl, onReset }) {
|
|
17
|
+
const capabilityManager = yield* Capability.Service;
|
|
18
|
+
return Capability.contributes(Capabilities.ReactSurface, [
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: Account.Profile,
|
|
21
|
+
filter: AppSurface.literal(AppSurface.Article, Account.Profile),
|
|
22
|
+
component: () => /* @__PURE__ */ React.createElement(ProfileContainer, null)
|
|
23
|
+
}),
|
|
24
|
+
Surface.create({
|
|
25
|
+
id: Account.Devices,
|
|
26
|
+
filter: AppSurface.literal(AppSurface.Article, Account.Devices),
|
|
27
|
+
component: () => /* @__PURE__ */ React.createElement(DevicesContainer, {
|
|
28
|
+
createInvitationUrl
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
Surface.create({
|
|
32
|
+
id: Account.Security,
|
|
33
|
+
filter: AppSurface.literal(AppSurface.Article, Account.Security),
|
|
34
|
+
component: () => /* @__PURE__ */ React.createElement(RecoveryCredentialsContainer, null)
|
|
35
|
+
}),
|
|
36
|
+
Surface.create({
|
|
37
|
+
id: Account.Account,
|
|
38
|
+
filter: AppSurface.literal(AppSurface.Article, Account.Account),
|
|
39
|
+
component: () => /* @__PURE__ */ React.createElement(AccountContainer, null)
|
|
40
|
+
}),
|
|
41
|
+
Surface.create({
|
|
42
|
+
id: Account.Invitations,
|
|
43
|
+
filter: AppSurface.literal(AppSurface.Article, Account.Invitations),
|
|
44
|
+
component: () => /* @__PURE__ */ React.createElement(InvitationsContainer, null)
|
|
45
|
+
}),
|
|
46
|
+
Surface.create({
|
|
47
|
+
id: JOIN_DIALOG,
|
|
48
|
+
filter: AppSurface.component(AppSurface.Dialog, JOIN_DIALOG),
|
|
49
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(JoinDialog, data.props)
|
|
50
|
+
}),
|
|
51
|
+
Surface.create({
|
|
52
|
+
id: RECOVERY_CODE_DIALOG,
|
|
53
|
+
filter: AppSurface.component(AppSurface.Dialog, RECOVERY_CODE_DIALOG),
|
|
54
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(RecoveryCodeDialog, data.props)
|
|
55
|
+
}),
|
|
56
|
+
Surface.create({
|
|
57
|
+
id: RESET_DIALOG,
|
|
58
|
+
filter: AppSurface.component(AppSurface.Dialog, RESET_DIALOG),
|
|
59
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(ResetDialog, {
|
|
60
|
+
...data.props,
|
|
61
|
+
onReset,
|
|
62
|
+
capabilityManager
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
]);
|
|
66
|
+
}));
|
|
67
|
+
export {
|
|
68
|
+
react_surface_default as default
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=react-surface-DEKGWTCD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { type ComponentProps } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\n\nimport {\n AccountContainer,\n DevicesContainer,\n InvitationsContainer,\n JoinDialog,\n ProfileContainer,\n RecoveryCodeDialog,\n RecoveryCredentialsContainer,\n ResetDialog,\n} from '#containers';\nimport { Account, type ClientPluginOptions } from '#types';\n\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../constants';\n\ntype ReactSurfaceOptions = Pick<ClientPluginOptions, 'onReset'> & {\n createInvitationUrl: (invitationCode: string) => string;\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ createInvitationUrl, onReset }: ReactSurfaceOptions) {\n const capabilityManager = yield* Capability.Service;\n\n return Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: Account.Profile,\n filter: AppSurface.literal(AppSurface.Article, Account.Profile),\n component: () => <ProfileContainer />,\n }),\n Surface.create({\n id: Account.Devices,\n filter: AppSurface.literal(AppSurface.Article, Account.Devices),\n component: () => <DevicesContainer createInvitationUrl={createInvitationUrl} />,\n }),\n Surface.create({\n id: Account.Security,\n filter: AppSurface.literal(AppSurface.Article, Account.Security),\n component: () => <RecoveryCredentialsContainer />,\n }),\n Surface.create({\n id: Account.Account,\n filter: AppSurface.literal(AppSurface.Article, Account.Account),\n component: () => <AccountContainer />,\n }),\n Surface.create({\n id: Account.Invitations,\n filter: AppSurface.literal(AppSurface.Article, Account.Invitations),\n component: () => <InvitationsContainer />,\n }),\n Surface.create({\n id: JOIN_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof JoinDialog>>(AppSurface.Dialog, JOIN_DIALOG),\n component: ({ data }) => <JoinDialog {...data.props} />,\n }),\n Surface.create({\n id: RECOVERY_CODE_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof RecoveryCodeDialog>>(\n AppSurface.Dialog,\n RECOVERY_CODE_DIALOG,\n ),\n component: ({ data }) => <RecoveryCodeDialog {...data.props} />,\n }),\n Surface.create({\n id: RESET_DIALOG,\n filter: AppSurface.component<Pick<ComponentProps<typeof ResetDialog>, 'mode'>>(AppSurface.Dialog, RESET_DIALOG),\n component: ({ data }) => (\n <ResetDialog {...data.props} onReset={onReset} capabilityManager={capabilityManager} />\n ),\n }),\n ]);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAoC;AAE3C,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAE3B,SACEC,kBACAC,kBACAC,sBACAC,YACAC,kBACAC,oBACAC,8BACAC,mBACK;AACP,SAASC,eAAyC;AAQlD,IAAA,wBAAeC,WAAWC,WACjBC,kBAAW,WAAW,EAAEC,qBAAqBC,QAAO,GAAuB;AAChF,QAAMC,oBAAoB,OAAOL,WAAWM;AAE5C,SAAON,WAAWO,YAAYC,aAAaC,cAAc;IACvDC,QAAQC,OAAO;MACbC,IAAIC,QAAQC;MACZC,QAAQC,WAAWC,QAAQD,WAAWE,SAASL,QAAQC,OAAO;MAC9DK,WAAW,MAAM,sBAAA,cAACC,kBAAAA,IAAAA;IACpB,CAAA;IACAV,QAAQC,OAAO;MACbC,IAAIC,QAAQQ;MACZN,QAAQC,WAAWC,QAAQD,WAAWE,SAASL,QAAQQ,OAAO;MAC9DF,WAAW,MAAM,sBAAA,cAACG,kBAAAA;QAAiBnB;;IACrC,CAAA;IACAO,QAAQC,OAAO;MACbC,IAAIC,QAAQU;MACZR,QAAQC,WAAWC,QAAQD,WAAWE,SAASL,QAAQU,QAAQ;MAC/DJ,WAAW,MAAM,sBAAA,cAACK,8BAAAA,IAAAA;IACpB,CAAA;IACAd,QAAQC,OAAO;MACbC,IAAIC,QAAQA;MACZE,QAAQC,WAAWC,QAAQD,WAAWE,SAASL,QAAQA,OAAO;MAC9DM,WAAW,MAAM,sBAAA,cAACM,kBAAAA,IAAAA;IACpB,CAAA;IACAf,QAAQC,OAAO;MACbC,IAAIC,QAAQa;MACZX,QAAQC,WAAWC,QAAQD,WAAWE,SAASL,QAAQa,WAAW;MAClEP,WAAW,MAAM,sBAAA,cAACQ,sBAAAA,IAAAA;IACpB,CAAA;IACAjB,QAAQC,OAAO;MACbC,IAAIgB;MACJb,QAAQC,WAAWG,UAA6CH,WAAWa,QAAQD,WAAAA;MACnFT,WAAW,CAAC,EAAEW,KAAI,MAAO,sBAAA,cAACC,YAAeD,KAAKE,KAAK;IACrD,CAAA;IACAtB,QAAQC,OAAO;MACbC,IAAIqB;MACJlB,QAAQC,WAAWG,UACjBH,WAAWa,QACXI,oBAAAA;MAEFd,WAAW,CAAC,EAAEW,KAAI,MAAO,sBAAA,cAACI,oBAAuBJ,KAAKE,KAAK;IAC7D,CAAA;IACAtB,QAAQC,OAAO;MACbC,IAAIuB;MACJpB,QAAQC,WAAWG,UAA4DH,WAAWa,QAAQM,YAAAA;MAClGhB,WAAW,CAAC,EAAEW,KAAI,MAChB,sBAAA,cAACM,aAAAA;QAAa,GAAGN,KAAKE;QAAO5B;QAAkBC;;IAEnD,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "AccountContainer", "DevicesContainer", "InvitationsContainer", "JoinDialog", "ProfileContainer", "RecoveryCodeDialog", "RecoveryCredentialsContainer", "ResetDialog", "Account", "Capability", "makeModule", "fnUntraced", "createInvitationUrl", "onReset", "capabilityManager", "Service", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "Account", "Profile", "filter", "AppSurface", "literal", "Article", "component", "ProfileContainer", "Devices", "DevicesContainer", "Security", "RecoveryCredentialsContainer", "AccountContainer", "Invitations", "InvitationsContainer", "JOIN_DIALOG", "Dialog", "data", "JoinDialog", "props", "RECOVERY_CODE_DIALOG", "RecoveryCodeDialog", "RESET_DIALOG", "ResetDialog"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
JOIN_DIALOG
|
|
3
|
+
} from "./chunk-WWCVZG3K.mjs";
|
|
4
|
+
import {
|
|
5
|
+
RecoverIdentity
|
|
6
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/operations/recover-identity.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
12
|
+
import { Operation } from "@dxos/compute";
|
|
13
|
+
var handler = RecoverIdentity.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
14
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
15
|
+
subject: JOIN_DIALOG,
|
|
16
|
+
blockAlign: "start",
|
|
17
|
+
props: {
|
|
18
|
+
initialDisposition: "recover-identity"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
})));
|
|
22
|
+
var recover_identity_default = handler;
|
|
23
|
+
export {
|
|
24
|
+
recover_identity_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=recover-identity-JNFKLCUD.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/recover-identity.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport type { JoinPanelProps } from '@dxos/shell/react';\n\nimport { JOIN_DIALOG } from '../constants';\nimport { RecoverIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof RecoverIdentity> = RecoverIdentity.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n yield* Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAM1B,IAAMC,UAAyDC,gBAAgBC,KAC7EC,UAAUC,YACDC,kBAAW,aAAA;AAChB,SAAOF,UAAUG,OAAOC,gBAAgBC,cAAc;IACpDC,SAASC;IACTC,YAAY;IACZC,OAAO;MACLC,oBAAoB;IACtB;EACF,CAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,2BAAeb;",
|
|
6
|
+
"names": ["Effect", "LayoutOperation", "Operation", "handler", "RecoverIdentity", "pipe", "Operation", "withHandler", "fnUntraced", "invoke", "LayoutOperation", "UpdateDialog", "subject", "JOIN_DIALOG", "blockAlign", "props", "initialDisposition"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RedeemPasskey
|
|
3
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ClientCapabilities
|
|
6
|
+
} from "./chunk-TUK3ELUU.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/operations/redeem-passkey.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import * as Match from "effect/Match";
|
|
12
|
+
import { Capability } from "@dxos/app-framework";
|
|
13
|
+
import { decodeUrlSafeBase64, supportsNativePasskeys, loginNativePasskey } from "@dxos/app-toolkit";
|
|
14
|
+
import { PublicKey } from "@dxos/client";
|
|
15
|
+
import { Operation } from "@dxos/compute";
|
|
16
|
+
import { invariant } from "@dxos/invariant";
|
|
17
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/redeem-passkey.ts";
|
|
18
|
+
var handler = RedeemPasskey.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
19
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
20
|
+
invariant(client.services.services.IdentityService, "IdentityService not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 15, S: this, A: ["client.services.services.IdentityService", "'IdentityService not available'"] });
|
|
21
|
+
const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() => client.services.services.IdentityService.requestRecoveryChallenge());
|
|
22
|
+
const { lookupKey, signature, clientDataJson, authenticatorData } = yield* Match.value(supportsNativePasskeys()).pipe(Match.when(true, () => Effect.gen(function* () {
|
|
23
|
+
const result = yield* Effect.promise(() => loginNativePasskey({
|
|
24
|
+
challenge: Uint8Array.from(Buffer.from(challenge, "base64"))
|
|
25
|
+
}));
|
|
26
|
+
invariant(result, "Native passkey login returned no result", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 21, S: this, A: ["result", "'Native passkey login returned no result'"] });
|
|
27
|
+
return {
|
|
28
|
+
lookupKey: PublicKey.from(decodeUrlSafeBase64(result.user_handle)),
|
|
29
|
+
signature: Buffer.from(decodeUrlSafeBase64(result.signature)),
|
|
30
|
+
clientDataJson: Buffer.from(decodeUrlSafeBase64(result.client_data_json)),
|
|
31
|
+
authenticatorData: Buffer.from(decodeUrlSafeBase64(result.authenticator_data))
|
|
32
|
+
};
|
|
33
|
+
})), Match.orElse(() => Effect.gen(function* () {
|
|
34
|
+
const credential = yield* Effect.promise(() => navigator.credentials.get({
|
|
35
|
+
publicKey: {
|
|
36
|
+
challenge: Buffer.from(challenge, "base64"),
|
|
37
|
+
rpId: location.hostname,
|
|
38
|
+
userVerification: "required"
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
return {
|
|
42
|
+
lookupKey: PublicKey.from(new Uint8Array(credential.response.userHandle)),
|
|
43
|
+
signature: Buffer.from(credential.response.signature),
|
|
44
|
+
clientDataJson: Buffer.from(credential.response.clientDataJSON),
|
|
45
|
+
authenticatorData: Buffer.from(credential.response.authenticatorData)
|
|
46
|
+
};
|
|
47
|
+
})));
|
|
48
|
+
yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
|
|
49
|
+
external: {
|
|
50
|
+
lookupKey,
|
|
51
|
+
deviceKey,
|
|
52
|
+
controlFeedKey,
|
|
53
|
+
signature,
|
|
54
|
+
clientDataJson,
|
|
55
|
+
authenticatorData
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
timeout: RECOVER_IDENTITY_RPC_TIMEOUT
|
|
59
|
+
}));
|
|
60
|
+
})));
|
|
61
|
+
var redeem_passkey_default = handler;
|
|
62
|
+
var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
|
|
63
|
+
export {
|
|
64
|
+
redeem_passkey_default as default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=redeem-passkey-4SBAI4AG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/redeem-passkey.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\n\nimport { Capability } from '@dxos/app-framework';\nimport { decodeUrlSafeBase64, supportsNativePasskeys, loginNativePasskey } from '@dxos/app-toolkit';\nimport { PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { RedeemPasskey } from './definitions';\n\nconst handler: Operation.WithHandler<typeof RedeemPasskey> = RedeemPasskey.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.requestRecoveryChallenge(),\n );\n\n const { lookupKey, signature, clientDataJson, authenticatorData } = yield* Match.value(\n supportsNativePasskeys(),\n ).pipe(\n Match.when(true, () =>\n Effect.gen(function* () {\n const result = yield* Effect.promise(() =>\n loginNativePasskey({ challenge: Uint8Array.from(Buffer.from(challenge, 'base64')) }),\n );\n invariant(result, 'Native passkey login returned no result');\n return {\n lookupKey: PublicKey.from(decodeUrlSafeBase64(result.user_handle)),\n signature: Buffer.from(decodeUrlSafeBase64(result.signature)),\n clientDataJson: Buffer.from(decodeUrlSafeBase64(result.client_data_json)),\n authenticatorData: Buffer.from(decodeUrlSafeBase64(result.authenticator_data)),\n };\n }),\n ),\n Match.orElse(() =>\n Effect.gen(function* () {\n const credential = yield* Effect.promise(() =>\n navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n }),\n );\n return {\n lookupKey: PublicKey.from(new Uint8Array((credential as any).response.userHandle)),\n signature: Buffer.from((credential as any).response.signature),\n clientDataJson: Buffer.from((credential as any).response.clientDataJSON),\n authenticatorData: Buffer.from((credential as any).response.authenticatorData),\n };\n }),\n ),\n );\n\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n {\n external: {\n lookupKey,\n deviceKey,\n controlFeedKey,\n signature,\n clientDataJson,\n authenticatorData,\n },\n },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n ),\n);\n\nexport default handler;\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,kBAAkB;AAC3B,SAASC,qBAAqBC,wBAAwBC,0BAA0B;AAChF,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAK1B,IAAA,eAA6DC;IAIvDC,UAAUC,cAAgBC,KAAAA,UAASC,YAAiB,kBAAA,aAAA;AACpD,QAAM,SAAEC,OAAWC,WAAc,IAAEC,mBAAqBC,MAAAA;AAIxD,YAAQC,OAAS,SAAEC,SAAWC,iBAAgBC,iCAAmCC,EAAAA,YAC/EC,YAAAA,GAAAA,cAEAC,GAAMC,IAAAA,GAAK,MAAA,GAAM,CAAA,4CACJ,iCAAA,EAAA,CAAA;UACT,WAAMC,gBAAgBT,UAAe,IACnCU,OAAAA,eAAmB,MAAA,OAAA,SAAA,SAAA,gBAAA,yBAAA,CAAA;qBAAEX,WAAWY,gBAAgBC,kBAAYb,IAAW,OAAA,YAAA,uBAAA,CAAA,EAAA,KAAA,WAAA,MAAA,MAAA,WAAA,aAAA;UAAW,SAAA,OAAA,eAAA,MAAA,mBAAA;MAEpFN,WAAkB,WAAA,KAAA,OAAA,KAAA,WAAA,QAAA,CAAA;IAClB,CAAA,CAAA;cACEQ,QAAWY,2CAA0CC,EAAAA,YAAW,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,UAAA,2CAAA,EAAA,CAAA;WAChEZ;MACAC,WAAAA,UAAgBS,KAAOG,oBAAKC,OAAoBP,WAAOQ,CAAAA;MACvDb,WAAAA,OAAAA,KAAmBQ,oBAAYI,OAAAA,SAA2BE,CAAAA;MAC5D,gBAAA,OAAA,KAAA,oBAAA,OAAA,gBAAA,CAAA;MAGJX,mBACEP,OAAW,KAAA,oBAAA,OAAA,kBAAA,CAAA;IACT;oBAEImB,MAAW,WAAA,aAAA;uBACTpB,OAAkBgB,eAAKhB,MAAAA,UAAW,YAAA,IAAA;iBAC5BqB;QACNC,WAAAA,OAAkB,KAAA,WAAA,QAAA;QACpB,MAAA,SAAA;QACF,kBAAA;MAEK;IACLpB,CAAAA,CAAAA;WACAC;MACAC,WAAAA,UAAgBS,KAAOG,IAAMO,WAAmBC,WAASC,SAAAA,UAAc,CAAA;MACvEpB,WAAAA,OAAAA,KAAmBQ,WAAaU,SAAmBC,SAASnB;MAC9D,gBAAA,OAAA,KAAA,WAAA,SAAA,cAAA;MACF,mBAAA,OAAA,KAAA,WAAA,SAAA,iBAAA;IAIGJ;;SAICC,eAAAA,MAAAA,OAAAA,SAAAA,SAAAA,gBAAAA,gBAAAA;cACAJ;MACAC;MACAI;MACAC;MACAC;MACF;MAEF;IAAEqB;EAAsC,GAAA;IAG9C,SAAA;EAIJ,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Match", "Capability", "decodeUrlSafeBase64", "supportsNativePasskeys", "loginNativePasskey", "PublicKey", "Operation", "invariant", "RedeemPasskey", "invariant", "client", "services", "IdentityService", "deviceKey", "controlFeedKey", "challenge", "Effect", "lookupKey", "signature", "clientDataJson", "authenticatorData", "value", "supportsNativePasskeys", "Match", "when", "result", "loginNativePasskey", "Uint8Array", "Buffer", "PublicKey", "user_handle", "from", "decodeUrlSafeBase64", "client_data_json", "authenticator_data", "publicKey", "location", "userVerification", "credential", "response", "clientDataJSON", "timeout"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RedeemToken
|
|
3
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ClientCapabilities
|
|
6
|
+
} from "./chunk-TUK3ELUU.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/operations/redeem-token.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { Capability } from "@dxos/app-framework";
|
|
12
|
+
import { Operation } from "@dxos/compute";
|
|
13
|
+
import { invariant } from "@dxos/invariant";
|
|
14
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/redeem-token.ts";
|
|
15
|
+
var handler = RedeemToken.pipe(Operation.withHandler(Effect.fnUntraced(function* (data) {
|
|
16
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
17
|
+
invariant(client.services.services.IdentityService, "IdentityService not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 12, S: this, A: ["client.services.services.IdentityService", "'IdentityService not available'"] });
|
|
18
|
+
yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
|
|
19
|
+
token: data.token
|
|
20
|
+
}, {
|
|
21
|
+
timeout: RECOVER_IDENTITY_RPC_TIMEOUT
|
|
22
|
+
}));
|
|
23
|
+
})));
|
|
24
|
+
var redeem_token_default = handler;
|
|
25
|
+
var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
|
|
26
|
+
export {
|
|
27
|
+
redeem_token_default as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=redeem-token-POBD6TMN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/redeem-token.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { RedeemToken } from './definitions';\n\nconst handler: Operation.WithHandler<typeof RedeemToken> = RedeemToken.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (data) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n { token: data.token },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n ),\n);\n\nexport default handler;\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAK1B,IAAA,eAA2DC;IAIrDC,UAAUC,YAAOC,KAASA,UAASC,YAAiB,kBAAA,WAAA,MAAA;AACpD,QAAA,SAAcC,OAAQ,WACbF,IAAAA,mBAAkBC,MAAAA;YACrBE,OAAOC,SAAU,SAAA,iBAAA,iCAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,4CAAA,iCAAA,EAAA,CAAA;SACnB,eAAA,MAAA,OAAA,SAAA,SAAA,gBAAA,gBAAA;IAAEC,OAAAA,KAASC;EAA6B,GAAA;IAG9C,SAAA;EAIJ,CAAA,CAAA;AAEA,CAAA,CAAA,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Capability", "Operation", "invariant", "RedeemToken", "invariant", "client", "services", "IdentityService", "promise", "token", "data", "timeout", "RECOVER_IDENTITY_RPC_TIMEOUT"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RESET_DIALOG
|
|
3
|
+
} from "./chunk-WWCVZG3K.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ResetStorage
|
|
6
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/operations/reset-storage.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
12
|
+
import { Operation } from "@dxos/compute";
|
|
13
|
+
var handler = ResetStorage.pipe(Operation.withHandler(Effect.fnUntraced(function* (data) {
|
|
14
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
15
|
+
subject: RESET_DIALOG,
|
|
16
|
+
blockAlign: "start",
|
|
17
|
+
props: {
|
|
18
|
+
mode: data.mode ?? "reset-storage"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
})));
|
|
22
|
+
var reset_storage_default = handler;
|
|
23
|
+
export {
|
|
24
|
+
reset_storage_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=reset-storage-LQKUV5RA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/reset-storage.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { RESET_DIALOG } from '../constants';\nimport { ResetStorage } from './definitions';\n\nconst handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: RESET_DIALOG,\n blockAlign: 'start',\n props: {\n mode: data.mode ?? 'reset-storage',\n },\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAK1B,IAAMC,UAAsDC,aAAaC,KACvEC,UAAUC,YACDC,kBAAW,WAAWC,MAAI;AAC/B,SAAOH,UAAUI,OAAOC,gBAAgBC,cAAc;IACpDC,SAASC;IACTC,YAAY;IACZC,OAAO;MACLC,MAAMR,KAAKQ,QAAQ;IACrB;EACF,CAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,wBAAed;",
|
|
6
|
+
"names": ["Effect", "LayoutOperation", "Operation", "handler", "ResetStorage", "pipe", "Operation", "withHandler", "fnUntraced", "data", "invoke", "LayoutOperation", "UpdateDialog", "subject", "RESET_DIALOG", "blockAlign", "props", "mode"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/schema-defs.ts
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
6
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
7
|
+
import { Type } from "@dxos/echo";
|
|
8
|
+
import { log } from "@dxos/log";
|
|
9
|
+
import { ClientCapabilities } from "#types";
|
|
10
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/schema-defs.ts";
|
|
11
|
+
var schema_defs_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
12
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
13
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
14
|
+
const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);
|
|
15
|
+
let previousDxns = /* @__PURE__ */ new Set();
|
|
16
|
+
const cancel = registry.subscribe(schemasAtom, async (schemas) => {
|
|
17
|
+
const seenSchemaDxns = /* @__PURE__ */ new Set();
|
|
18
|
+
const batch = [];
|
|
19
|
+
for (const schema of schemas.flat()) {
|
|
20
|
+
const uri = Type.getURI(schema);
|
|
21
|
+
if (!uri) {
|
|
22
|
+
log.warn("skipping schema without uri", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 22, S: this });
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const key = uri.toString();
|
|
26
|
+
if (seenSchemaDxns.has(key)) {
|
|
27
|
+
log("skipping duplicate schema for echo registration", {
|
|
28
|
+
uri: key
|
|
29
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 27, S: this });
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
seenSchemaDxns.add(key);
|
|
33
|
+
batch.push({
|
|
34
|
+
schema,
|
|
35
|
+
dxnKey: key
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const toRegister = batch.filter(({ dxnKey }) => !previousDxns.has(dxnKey));
|
|
39
|
+
await client.addTypes(toRegister.map(({ schema }) => schema));
|
|
40
|
+
for (const { dxnKey } of toRegister) {
|
|
41
|
+
previousDxns.add(dxnKey);
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
immediate: true
|
|
45
|
+
});
|
|
46
|
+
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));
|
|
47
|
+
}));
|
|
48
|
+
export {
|
|
49
|
+
schema_defs_default as default
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=schema-defs-IHBCKTMM.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/schema-defs.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Type } from '@dxos/echo';\nimport { log } from '@dxos/log';\n\nimport { ClientCapabilities } from '#types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);\n\n // TODO(wittjosiah): Unregister schemas when they are disabled.\n let previousDxns = new Set<string>();\n const cancel = registry.subscribe(\n schemasAtom,\n async (schemas) => {\n const seenSchemaDxns = new Set<string>();\n const batch: { schema: Type.AnyEntity; dxnKey: string }[] = [];\n for (const schema of schemas.flat()) {\n const uri = Type.getURI(schema);\n if (!uri) {\n log.warn('skipping schema without uri');\n continue;\n }\n\n const key = uri.toString();\n if (seenSchemaDxns.has(key)) {\n log('skipping duplicate schema for echo registration', { uri: key });\n continue;\n }\n\n seenSchemaDxns.add(key);\n batch.push({ schema, dxnKey: key });\n }\n\n const toRegister = batch.filter(({ dxnKey }) => !previousDxns.has(dxnKey));\n\n await client.addTypes(toRegister.map(({ schema }) => schema));\n for (const { dxnKey } of toRegister) {\n previousDxns.add(dxnKey);\n }\n },\n { immediate: true },\n );\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,YAAY;AACrB,SAASC,WAAW;AAEpB,SAASC,0BAA0B;AAEnC,IAAA,eAAeJ;IAGX,sBAAMK,WAAgBL,WAAeI,kBAAAA,aAAyB;AAC9D,QAAME,WAAAA,OAAc,WAAON,IAAWO,aAAKN,YAAgBO;AAE3D,QAAA,SAAA,OAAA,WAAA,IAAA,mBAAA,MAAA;AACA,QAAIC,cAAe,OAAIC,WAAAA,KAAAA,gBAAAA,MAAAA;MAInB,eAAMC,oBAAAA,IAAiB;QACvB,SAAMC,SAAwD,UAAA,aAAA,OAAA,YAAA;AAC9D,UAAK,iBAAgBC,oBAAAA,IAAQC;UAC3B,QAAMC,CAAAA;eACDA,UAAK,QAAA,KAAA,GAAA;YACRZ,MAAQ,KAAC,OAAA,MAAA;UACT,CAAA,KAAA;AACF,YAAA,KAAA,+BAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;AAEA;MACA;YACEA,MAAI,IAAA,SAAA;yBAA0Da,IAAAA,GAAAA,GAAAA;AAAI,YAAA,mDAAA;UAClE,KAAA;QACF,GAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,KAAA,CAAA;AAEAL;MACAC;qBAAaK,IAAAA,GAAAA;YAAQC,KAAAA;QAAY;QACnC,QAAA;MAEA,CAAA;IAEA;AACA,UAAK,aAAc,MAAMC,OAAAA,CAAAA,EAAAA,OAAY,MAAA,CAAA,aAAA,IAAA,MAAA,CAAA;UACnCV,OAAAA,SAAiBS,WAAAA,IAAAA,CAAAA,EAAAA,OAAAA,MAAAA,MAAAA,CAAAA;AACnB,eAAA,EAAA,OAAA,KAAA,YAAA;AAEF,mBAAA,IAAA,MAAA;IAAEE;EAAgB,GAAA;IAGpB,WAAOpB;EAET,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "Type", "log", "ClientCapabilities", "client", "schemasAtom", "atom", "Schema", "previousDxns", "Set", "seenSchemaDxns", "batch", "schemas", "flat", "uri", "key", "schema", "dxnKey", "toRegister", "immediate"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShareIdentity
|
|
3
|
+
} from "./chunk-D6HPCLTS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Account
|
|
6
|
+
} from "./chunk-TUK3ELUU.mjs";
|
|
7
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
8
|
+
|
|
9
|
+
// src/operations/share-identity.ts
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { LayoutOperation, getSpacePath } from "@dxos/app-toolkit";
|
|
12
|
+
import { Operation } from "@dxos/compute";
|
|
13
|
+
import { ObservabilityOperation } from "@dxos/plugin-observability";
|
|
14
|
+
var handler = ShareIdentity.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
15
|
+
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, {
|
|
16
|
+
subject: getSpacePath(Account.id)
|
|
17
|
+
});
|
|
18
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
19
|
+
subject: [
|
|
20
|
+
`${getSpacePath(Account.id)}/${Account.Profile}`
|
|
21
|
+
]
|
|
22
|
+
});
|
|
23
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
24
|
+
name: "identity.share"
|
|
25
|
+
});
|
|
26
|
+
})));
|
|
27
|
+
var share_identity_default = handler;
|
|
28
|
+
export {
|
|
29
|
+
share_identity_default as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=share-identity-KNQ2XNXV.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/share-identity.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation, getSpacePath } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { ObservabilityOperation } from '@dxos/plugin-observability';\n\nimport { Account } from '../types';\nimport { ShareIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof ShareIdentity> = ShareIdentity.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(Account.id) });\n yield* Operation.invoke(LayoutOperation.Open, {\n subject: [`${getSpacePath(Account.id)}/${Account.Profile}`],\n });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiBC,oBAAoB;AAC9C,SAASC,iBAAiB;AAC1B,SAASC,8BAA8B;AAKvC,IAAMC,UAAuDC,cAAcC,KACzEC,UAAUC,YACDC,kBAAW,aAAA;AAChB,SAAOF,UAAUG,OAAOC,gBAAgBC,iBAAiB;IAAEC,SAASC,aAAaC,QAAQC,EAAE;EAAE,CAAA;AAC7F,SAAOT,UAAUG,OAAOC,gBAAgBM,MAAM;IAC5CJ,SAAS;MAAC,GAAGC,aAAaC,QAAQC,EAAE,CAAA,IAAKD,QAAQG,OAAO;;EAC1D,CAAA;AACA,SAAOX,UAAUY,SAASC,uBAAuBC,WAAW;IAAEC,MAAM;EAAiB,CAAA;AACvF,CAAA,CAAA,CAAA;AAIJ,IAAA,yBAAelB;",
|
|
6
|
+
"names": ["Effect", "LayoutOperation", "getSpacePath", "Operation", "ObservabilityOperation", "handler", "ShareIdentity", "pipe", "Operation", "withHandler", "fnUntraced", "invoke", "LayoutOperation", "SwitchWorkspace", "subject", "getSpacePath", "Account", "id", "Open", "Profile", "schedule", "ObservabilityOperation", "SendEvent", "name"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/testing/index.ts
|
|
4
|
+
export * from "#plugin";
|
|
5
|
+
|
|
6
|
+
// src/testing/initializeIdentity.ts
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import { PERSONAL_SPACE_TAG } from "@dxos/app-toolkit";
|
|
9
|
+
var initializeIdentity = (client) => Effect.gen(function* () {
|
|
10
|
+
const identity = yield* Effect.promise(() => client.halo.createIdentity());
|
|
11
|
+
const personalSpace = yield* Effect.promise(() => client.spaces.create({}, {
|
|
12
|
+
tags: [
|
|
13
|
+
PERSONAL_SPACE_TAG
|
|
14
|
+
]
|
|
15
|
+
}));
|
|
16
|
+
yield* Effect.promise(() => personalSpace.waitUntilReady());
|
|
17
|
+
return {
|
|
18
|
+
identity,
|
|
19
|
+
personalSpace
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
initializeIdentity
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/testing/index.ts", "../../../../src/testing/initializeIdentity.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nexport * from '#plugin';\nexport { initializeIdentity } from './initializeIdentity';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { PERSONAL_SPACE_TAG } from '@dxos/app-toolkit';\nimport { type Client } from '@dxos/client';\nimport { type Space } from '@dxos/client-protocol';\nimport { type Identity } from '@dxos/protocols/proto/dxos/client/services';\n\nexport type InitializeIdentityResult = {\n identity: Identity;\n personalSpace: Space;\n};\n\n/**\n * Create an identity and a personal space.\n * Returns the identity and space for further setup.\n */\nexport const initializeIdentity = (client: Client): Effect.Effect<InitializeIdentityResult, never, never> =>\n Effect.gen(function* () {\n const identity = yield* Effect.promise(() => client.halo.createIdentity());\n const personalSpace = yield* Effect.promise(() => client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG] }));\n yield* Effect.promise(() => personalSpace.waitUntilReady());\n return {\n identity,\n personalSpace,\n };\n });\n"],
|
|
5
|
+
"mappings": ";;;AAIA,cAAc;;;ACAd,YAAYA,YAAY;AAExB,SAASC,0BAA0B;AAc5B,IAAMC,qBAAqB,CAACC,WAC1BC,WAAI,aAAA;AACT,QAAMC,WAAW,OAAcC,eAAQ,MAAMH,OAAOI,KAAKC,eAAc,CAAA;AACvE,QAAMC,gBAAgB,OAAcH,eAAQ,MAAMH,OAAOO,OAAOC,OAAO,CAAC,GAAG;IAAEC,MAAM;MAACX;;EAAoB,CAAA,CAAA;AACxG,SAAcK,eAAQ,MAAMG,cAAcI,eAAc,CAAA;AACxD,SAAO;IACLR;IACAI;EACF;AACF,CAAA;",
|
|
6
|
+
"names": ["Effect", "PERSONAL_SPACE_TAG", "initializeIdentity", "client", "gen", "identity", "promise", "halo", "createIdentity", "personalSpace", "spaces", "create", "tags", "waitUntilReady"]
|
|
7
|
+
}
|