@dxos/plugin-client 0.8.4-main.72ec0f3 → 0.8.4-main.74a063c4e0

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.
Files changed (485) hide show
  1. package/dist/lib/browser/chunk-ELAYKIQU.mjs +12 -0
  2. package/dist/lib/browser/chunk-ELAYKIQU.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  4. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-M43LJQ5U.mjs +175 -0
  6. package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-RDIG75CA.mjs → chunk-WNJRYPGG.mjs} +36 -15
  8. package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
  9. package/dist/lib/browser/cli/index.mjs +1060 -0
  10. package/dist/lib/browser/cli/index.mjs.map +7 -0
  11. package/dist/lib/browser/create-agent-SS5SE35J.mjs +34 -0
  12. package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +7 -0
  13. package/dist/lib/browser/create-identity-PBEUEIPN.mjs +30 -0
  14. package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +7 -0
  15. package/dist/lib/browser/create-passkey-JN6I5WMM.mjs +105 -0
  16. package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +7 -0
  17. package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs +44 -0
  18. package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +120 -133
  20. package/dist/lib/browser/index.mjs.map +4 -4
  21. package/dist/lib/browser/join-identity-2BP4G2SD.mjs +27 -0
  22. package/dist/lib/browser/join-identity-2BP4G2SD.mjs.map +7 -0
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/operations/index.mjs +13 -0
  25. package/dist/lib/browser/operations/index.mjs.map +7 -0
  26. package/dist/lib/browser/recover-identity-LS6B5INB.mjs +26 -0
  27. package/dist/lib/browser/recover-identity-LS6B5INB.mjs.map +7 -0
  28. package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs +82 -0
  29. package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs.map +7 -0
  30. package/dist/lib/browser/redeem-token-6BCRGKV6.mjs +37 -0
  31. package/dist/lib/browser/redeem-token-6BCRGKV6.mjs.map +7 -0
  32. package/dist/lib/browser/reset-storage-RQHXLTZ7.mjs +26 -0
  33. package/dist/lib/browser/reset-storage-RQHXLTZ7.mjs.map +7 -0
  34. package/dist/lib/browser/share-identity-YJEBJTPA.mjs +31 -0
  35. package/dist/lib/browser/share-identity-YJEBJTPA.mjs.map +7 -0
  36. package/dist/lib/browser/testing/index.mjs +22 -0
  37. package/dist/lib/browser/testing/index.mjs.map +7 -0
  38. package/dist/lib/browser/types/index.mjs +8 -4
  39. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  40. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-VENKFPBC.mjs → chunk-IT5LAIV3.mjs} +37 -15
  42. package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
  43. package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
  44. package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
  46. package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
  47. package/dist/lib/node-esm/cli/index.mjs +1061 -0
  48. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  49. package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs +35 -0
  50. package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +7 -0
  51. package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs +31 -0
  52. package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +7 -0
  53. package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs +106 -0
  54. package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +7 -0
  55. package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs +45 -0
  56. package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +7 -0
  57. package/dist/lib/node-esm/index.mjs +120 -133
  58. package/dist/lib/node-esm/index.mjs.map +4 -4
  59. package/dist/lib/node-esm/join-identity-75JCKQHM.mjs +28 -0
  60. package/dist/lib/node-esm/join-identity-75JCKQHM.mjs.map +7 -0
  61. package/dist/lib/node-esm/meta.json +1 -1
  62. package/dist/lib/node-esm/operations/index.mjs +14 -0
  63. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  64. package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs +27 -0
  65. package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs.map +7 -0
  66. package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs +83 -0
  67. package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs.map +7 -0
  68. package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs +38 -0
  69. package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs.map +7 -0
  70. package/dist/lib/node-esm/reset-storage-OWV5UDMC.mjs +27 -0
  71. package/dist/lib/node-esm/reset-storage-OWV5UDMC.mjs.map +7 -0
  72. package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs +32 -0
  73. package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs.map +7 -0
  74. package/dist/lib/node-esm/testing/index.mjs +23 -0
  75. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  76. package/dist/lib/node-esm/types/index.mjs +8 -4
  77. package/dist/types/src/ClientPlugin.d.ts +3 -2
  78. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  80. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  81. package/dist/types/src/capabilities/client.d.ts +6 -7
  82. package/dist/types/src/capabilities/client.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/index.d.ts +28 -15
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/migrations.d.ts +3 -2
  86. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
  88. package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
  90. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/node.d.ts +21 -0
  92. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  94. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/react-context.d.ts +4 -2
  96. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/react-surface.d.ts +4 -3
  98. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/schema-defs.d.ts +3 -2
  100. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
  101. package/dist/types/src/cli/commands/config/index.d.ts +5 -0
  102. package/dist/types/src/cli/commands/config/index.d.ts.map +1 -0
  103. package/dist/types/src/cli/commands/config/view.d.ts +5 -0
  104. package/dist/types/src/cli/commands/config/view.d.ts.map +1 -0
  105. package/dist/types/src/cli/commands/device/index.d.ts +7 -0
  106. package/dist/types/src/cli/commands/device/index.d.ts.map +1 -0
  107. package/dist/types/src/cli/commands/device/info/index.d.ts +2 -0
  108. package/dist/types/src/cli/commands/device/info/index.d.ts.map +1 -0
  109. package/dist/types/src/cli/commands/device/info/info.d.ts +7 -0
  110. package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -0
  111. package/dist/types/src/cli/commands/device/info/info.test.d.ts +2 -0
  112. package/dist/types/src/cli/commands/device/info/info.test.d.ts.map +1 -0
  113. package/dist/types/src/cli/commands/device/list/index.d.ts +2 -0
  114. package/dist/types/src/cli/commands/device/list/index.d.ts.map +1 -0
  115. package/dist/types/src/cli/commands/device/list/list.d.ts +7 -0
  116. package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -0
  117. package/dist/types/src/cli/commands/device/list/list.test.d.ts +2 -0
  118. package/dist/types/src/cli/commands/device/list/list.test.d.ts.map +1 -0
  119. package/dist/types/src/cli/commands/device/update/index.d.ts +2 -0
  120. package/dist/types/src/cli/commands/device/update/index.d.ts.map +1 -0
  121. package/dist/types/src/cli/commands/device/update/update.d.ts +11 -0
  122. package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -0
  123. package/dist/types/src/cli/commands/device/util.d.ts +16 -0
  124. package/dist/types/src/cli/commands/device/util.d.ts.map +1 -0
  125. package/dist/types/src/cli/commands/edge/index.d.ts +5 -0
  126. package/dist/types/src/cli/commands/edge/index.d.ts.map +1 -0
  127. package/dist/types/src/cli/commands/edge/status.d.ts +7 -0
  128. package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -0
  129. package/dist/types/src/cli/commands/halo/create/create.d.ts +15 -0
  130. package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -0
  131. package/dist/types/src/cli/commands/halo/create/create.test.d.ts +2 -0
  132. package/dist/types/src/cli/commands/halo/create/create.test.d.ts.map +1 -0
  133. package/dist/types/src/cli/commands/halo/create/index.d.ts +2 -0
  134. package/dist/types/src/cli/commands/halo/create/index.d.ts.map +1 -0
  135. package/dist/types/src/cli/commands/halo/credential/add/add.d.ts +13 -0
  136. package/dist/types/src/cli/commands/halo/credential/add/add.d.ts.map +1 -0
  137. package/dist/types/src/cli/commands/halo/credential/add/index.d.ts +2 -0
  138. package/dist/types/src/cli/commands/halo/credential/add/index.d.ts.map +1 -0
  139. package/dist/types/src/cli/commands/halo/credential/index.d.ts +12 -0
  140. package/dist/types/src/cli/commands/halo/credential/index.d.ts.map +1 -0
  141. package/dist/types/src/cli/commands/halo/credential/list/index.d.ts +2 -0
  142. package/dist/types/src/cli/commands/halo/credential/list/index.d.ts.map +1 -0
  143. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +19 -0
  144. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -0
  145. package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts +2 -0
  146. package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts.map +1 -0
  147. package/dist/types/src/cli/commands/halo/identity/identity.d.ts +7 -0
  148. package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -0
  149. package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts +2 -0
  150. package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts.map +1 -0
  151. package/dist/types/src/cli/commands/halo/identity/index.d.ts +2 -0
  152. package/dist/types/src/cli/commands/halo/identity/index.d.ts.map +1 -0
  153. package/dist/types/src/cli/commands/halo/index.d.ts +3 -0
  154. package/dist/types/src/cli/commands/halo/index.d.ts.map +1 -0
  155. package/dist/types/src/cli/commands/halo/join/index.d.ts +2 -0
  156. package/dist/types/src/cli/commands/halo/join/index.d.ts.map +1 -0
  157. package/dist/types/src/cli/commands/halo/join/join.d.ts +8 -0
  158. package/dist/types/src/cli/commands/halo/join/join.d.ts.map +1 -0
  159. package/dist/types/src/cli/commands/halo/join/join.test.d.ts +2 -0
  160. package/dist/types/src/cli/commands/halo/join/join.test.d.ts.map +1 -0
  161. package/dist/types/src/cli/commands/halo/keys/index.d.ts +2 -0
  162. package/dist/types/src/cli/commands/halo/keys/index.d.ts.map +1 -0
  163. package/dist/types/src/cli/commands/halo/keys/keys.d.ts +7 -0
  164. package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -0
  165. package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts +2 -0
  166. package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts.map +1 -0
  167. package/dist/types/src/cli/commands/halo/recover/index.d.ts +2 -0
  168. package/dist/types/src/cli/commands/halo/recover/index.d.ts.map +1 -0
  169. package/dist/types/src/cli/commands/halo/recover/recover.d.ts +7 -0
  170. package/dist/types/src/cli/commands/halo/recover/recover.d.ts.map +1 -0
  171. package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts +2 -0
  172. package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts.map +1 -0
  173. package/dist/types/src/cli/commands/halo/seed/index.d.ts +2 -0
  174. package/dist/types/src/cli/commands/halo/seed/index.d.ts.map +1 -0
  175. package/dist/types/src/cli/commands/halo/seed/seed.d.ts +7 -0
  176. package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -0
  177. package/dist/types/src/cli/commands/halo/share/index.d.ts +2 -0
  178. package/dist/types/src/cli/commands/halo/share/index.d.ts.map +1 -0
  179. package/dist/types/src/cli/commands/halo/share/share.d.ts +15 -0
  180. package/dist/types/src/cli/commands/halo/share/share.d.ts.map +1 -0
  181. package/dist/types/src/cli/commands/halo/update/index.d.ts +2 -0
  182. package/dist/types/src/cli/commands/halo/update/index.d.ts.map +1 -0
  183. package/dist/types/src/cli/commands/halo/update/update.d.ts +11 -0
  184. package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -0
  185. package/dist/types/src/cli/commands/halo/update/update.test.d.ts +2 -0
  186. package/dist/types/src/cli/commands/halo/update/update.test.d.ts.map +1 -0
  187. package/dist/types/src/cli/commands/halo/util.d.ts +13 -0
  188. package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -0
  189. package/dist/types/src/cli/commands/index.d.ts +6 -0
  190. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  191. package/dist/types/src/cli/commands/profile/create.d.ts +10 -0
  192. package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -0
  193. package/dist/types/src/cli/commands/profile/delete.d.ts +8 -0
  194. package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -0
  195. package/dist/types/src/cli/commands/profile/import.d.ts +17 -0
  196. package/dist/types/src/cli/commands/profile/import.d.ts.map +1 -0
  197. package/dist/types/src/cli/commands/profile/index.d.ts +19 -0
  198. package/dist/types/src/cli/commands/profile/index.d.ts.map +1 -0
  199. package/dist/types/src/cli/commands/profile/inspect.d.ts +13 -0
  200. package/dist/types/src/cli/commands/profile/inspect.d.ts.map +1 -0
  201. package/dist/types/src/cli/commands/profile/list.d.ts +6 -0
  202. package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -0
  203. package/dist/types/src/cli/commands/profile/reset.d.ts +8 -0
  204. package/dist/types/src/cli/commands/profile/reset.d.ts.map +1 -0
  205. package/dist/types/src/cli/commands/profile/util.d.ts +24 -0
  206. package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -0
  207. package/dist/types/src/cli/index.d.ts +2 -0
  208. package/dist/types/src/cli/index.d.ts.map +1 -0
  209. package/dist/types/src/cli/plugin.d.ts +4 -0
  210. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  211. package/dist/types/src/cli/testing/test-console.d.ts +37 -0
  212. package/dist/types/src/cli/testing/test-console.d.ts.map +1 -0
  213. package/dist/types/src/components/index.d.ts +0 -6
  214. package/dist/types/src/components/index.d.ts.map +1 -1
  215. package/dist/types/src/constants.d.ts +4 -0
  216. package/dist/types/src/constants.d.ts.map +1 -0
  217. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
  218. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
  219. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
  220. package/dist/types/src/containers/DevicesContainer/index.d.ts +2 -0
  221. package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
  222. package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -1
  223. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
  224. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
  225. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
  226. package/dist/types/src/containers/JoinDialog/index.d.ts +2 -0
  227. package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
  228. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
  229. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +14 -0
  230. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
  231. package/dist/types/src/containers/ProfileContainer/index.d.ts +2 -0
  232. package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
  233. package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -1
  234. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
  235. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts +16 -0
  236. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
  237. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
  238. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
  239. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
  240. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +14 -0
  241. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
  242. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +2 -0
  243. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
  244. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +9 -0
  245. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
  246. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +19 -0
  247. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
  248. package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
  249. package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
  250. package/dist/types/src/containers/index.d.ts +10 -0
  251. package/dist/types/src/containers/index.d.ts.map +1 -0
  252. package/dist/types/src/index.d.ts +2 -5
  253. package/dist/types/src/index.d.ts.map +1 -1
  254. package/dist/types/src/meta.d.ts +2 -2
  255. package/dist/types/src/meta.d.ts.map +1 -1
  256. package/dist/types/src/operations/create-agent.d.ts +5 -0
  257. package/dist/types/src/operations/create-agent.d.ts.map +1 -0
  258. package/dist/types/src/operations/create-identity.d.ts +5 -0
  259. package/dist/types/src/operations/create-identity.d.ts.map +1 -0
  260. package/dist/types/src/operations/create-passkey.d.ts +5 -0
  261. package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
  262. package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
  263. package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
  264. package/dist/types/src/operations/definitions.d.ts +36 -0
  265. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  266. package/dist/types/src/operations/index.d.ts +4 -0
  267. package/dist/types/src/operations/index.d.ts.map +1 -0
  268. package/dist/types/src/operations/join-identity.d.ts +5 -0
  269. package/dist/types/src/operations/join-identity.d.ts.map +1 -0
  270. package/dist/types/src/operations/recover-identity.d.ts +5 -0
  271. package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
  272. package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
  273. package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
  274. package/dist/types/src/operations/redeem-token.d.ts +5 -0
  275. package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
  276. package/dist/types/src/operations/reset-storage.d.ts +5 -0
  277. package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
  278. package/dist/types/src/operations/share-identity.d.ts +5 -0
  279. package/dist/types/src/operations/share-identity.d.ts.map +1 -0
  280. package/dist/types/src/testing/index.d.ts +2 -0
  281. package/dist/types/src/testing/index.d.ts.map +1 -0
  282. package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
  283. package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
  284. package/dist/types/src/translations.d.ts +2 -48
  285. package/dist/types/src/translations.d.ts.map +1 -1
  286. package/dist/types/src/types/capabilities.d.ts +10 -0
  287. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  288. package/dist/types/src/types/events.d.ts +9 -0
  289. package/dist/types/src/types/events.d.ts.map +1 -0
  290. package/dist/types/src/types/index.d.ts +2 -0
  291. package/dist/types/src/types/index.d.ts.map +1 -1
  292. package/dist/types/src/types/schema.d.ts +36 -31
  293. package/dist/types/src/types/schema.d.ts.map +1 -1
  294. package/dist/types/tsconfig.tsbuildinfo +1 -1
  295. package/package.json +89 -38
  296. package/src/ClientPlugin.ts +53 -58
  297. package/src/capabilities/app-graph-builder.ts +86 -104
  298. package/src/capabilities/client.ts +66 -30
  299. package/src/capabilities/index.ts +14 -10
  300. package/src/capabilities/migrations.ts +22 -17
  301. package/src/capabilities/navigation-handler/index.ts +9 -0
  302. package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
  303. package/src/capabilities/node.ts +13 -0
  304. package/src/capabilities/operation-handler.ts +16 -0
  305. package/src/capabilities/react-context.tsx +17 -14
  306. package/src/capabilities/react-surface.tsx +54 -48
  307. package/src/capabilities/schema-defs.ts +27 -20
  308. package/src/cli/commands/config/index.ts +12 -0
  309. package/src/cli/commands/config/view.ts +29 -0
  310. package/src/cli/commands/device/index.ts +14 -0
  311. package/src/cli/commands/device/info/index.ts +5 -0
  312. package/src/cli/commands/device/info/info.test.ts +28 -0
  313. package/src/cli/commands/device/info/info.ts +48 -0
  314. package/src/cli/commands/device/list/index.ts +5 -0
  315. package/src/cli/commands/device/list/list.test.ts +30 -0
  316. package/src/cli/commands/device/list/list.ts +28 -0
  317. package/src/cli/commands/device/update/index.ts +5 -0
  318. package/src/cli/commands/device/update/update.ts +68 -0
  319. package/src/cli/commands/device/util.ts +55 -0
  320. package/src/cli/commands/edge/index.ts +12 -0
  321. package/src/cli/commands/edge/status.ts +46 -0
  322. package/src/cli/commands/halo/create/create.test.ts +51 -0
  323. package/src/cli/commands/halo/create/create.ts +83 -0
  324. package/src/cli/commands/halo/create/index.ts +5 -0
  325. package/src/cli/commands/halo/credential/add/add.ts +97 -0
  326. package/src/cli/commands/halo/credential/add/index.ts +5 -0
  327. package/src/cli/commands/halo/credential/index.ts +13 -0
  328. package/src/cli/commands/halo/credential/list/index.ts +5 -0
  329. package/src/cli/commands/halo/credential/list/list.test.ts +27 -0
  330. package/src/cli/commands/halo/credential/list/list.ts +115 -0
  331. package/src/cli/commands/halo/identity/identity.test.ts +40 -0
  332. package/src/cli/commands/halo/identity/identity.ts +45 -0
  333. package/src/cli/commands/halo/identity/index.ts +5 -0
  334. package/src/cli/commands/halo/index.ts +21 -0
  335. package/src/cli/commands/halo/join/index.ts +5 -0
  336. package/src/cli/commands/halo/join/join.test.ts +10 -0
  337. package/src/cli/commands/halo/join/join.ts +87 -0
  338. package/src/cli/commands/halo/keys/index.ts +5 -0
  339. package/src/cli/commands/halo/keys/keys.test.ts +29 -0
  340. package/src/cli/commands/halo/keys/keys.ts +40 -0
  341. package/src/cli/commands/halo/recover/index.ts +5 -0
  342. package/src/cli/commands/halo/recover/recover.test.ts +10 -0
  343. package/src/cli/commands/halo/recover/recover.ts +44 -0
  344. package/src/cli/commands/halo/seed/index.ts +5 -0
  345. package/src/cli/commands/halo/seed/seed.ts +36 -0
  346. package/src/cli/commands/halo/share/index.ts +5 -0
  347. package/src/cli/commands/halo/share/share.ts +97 -0
  348. package/src/cli/commands/halo/update/index.ts +5 -0
  349. package/src/cli/commands/halo/update/update.test.ts +28 -0
  350. package/src/cli/commands/halo/update/update.ts +67 -0
  351. package/src/cli/commands/halo/util.ts +18 -0
  352. package/src/cli/commands/index.ts +9 -0
  353. package/src/cli/commands/profile/create.ts +90 -0
  354. package/src/cli/commands/profile/delete.ts +36 -0
  355. package/src/cli/commands/profile/import.ts +101 -0
  356. package/src/cli/commands/profile/index.ts +17 -0
  357. package/src/cli/commands/profile/inspect.ts +64 -0
  358. package/src/cli/commands/profile/list.ts +55 -0
  359. package/src/cli/commands/profile/reset.ts +45 -0
  360. package/src/cli/commands/profile/util.ts +48 -0
  361. package/src/cli/index.ts +5 -0
  362. package/src/cli/plugin.ts +31 -0
  363. package/src/cli/testing/test-console.ts +87 -0
  364. package/src/components/index.ts +0 -7
  365. package/src/constants.ts +9 -0
  366. package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +15 -10
  367. package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +86 -92
  368. package/src/containers/DevicesContainer/index.ts +5 -0
  369. package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
  370. package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
  371. package/src/containers/JoinDialog/index.ts +5 -0
  372. package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -5
  373. package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +66 -55
  374. package/src/containers/ProfileContainer/index.ts +5 -0
  375. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -5
  376. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
  377. package/src/containers/RecoveryCodeDialog/index.ts +8 -0
  378. package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +47 -0
  379. package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
  380. package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
  381. package/src/containers/ResetDialog/ResetDialog.stories.tsx +72 -0
  382. package/src/containers/ResetDialog/ResetDialog.tsx +50 -0
  383. package/src/containers/ResetDialog/index.ts +8 -0
  384. package/src/containers/index.ts +15 -0
  385. package/src/index.ts +2 -6
  386. package/src/meta.ts +3 -3
  387. package/src/operations/create-agent.ts +26 -0
  388. package/src/operations/create-identity.ts +29 -0
  389. package/src/operations/create-passkey.ts +88 -0
  390. package/src/operations/create-recovery-code.ts +34 -0
  391. package/src/operations/definitions.ts +107 -0
  392. package/src/operations/index.ts +20 -0
  393. package/src/operations/join-identity.ts +28 -0
  394. package/src/operations/recover-identity.ts +28 -0
  395. package/src/operations/redeem-passkey.ts +85 -0
  396. package/src/operations/redeem-token.ts +31 -0
  397. package/src/operations/reset-storage.ts +27 -0
  398. package/src/operations/share-identity.ts +26 -0
  399. package/src/testing/index.ts +5 -0
  400. package/src/testing/initializeIdentity.ts +24 -0
  401. package/src/translations.ts +57 -43
  402. package/src/types/capabilities.ts +16 -0
  403. package/src/types/events.ts +15 -0
  404. package/src/types/index.ts +2 -0
  405. package/src/types/schema.ts +28 -20
  406. package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs +0 -124
  407. package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs.map +0 -7
  408. package/dist/lib/browser/chunk-4G4YWIUQ.mjs +0 -686
  409. package/dist/lib/browser/chunk-4G4YWIUQ.mjs.map +0 -7
  410. package/dist/lib/browser/chunk-4LRO3Y2O.mjs +0 -19
  411. package/dist/lib/browser/chunk-4LRO3Y2O.mjs.map +0 -7
  412. package/dist/lib/browser/chunk-N5UR2HOE.mjs +0 -18
  413. package/dist/lib/browser/chunk-N5UR2HOE.mjs.map +0 -7
  414. package/dist/lib/browser/chunk-RDIG75CA.mjs.map +0 -7
  415. package/dist/lib/browser/chunk-ZRVMXLDR.mjs +0 -15
  416. package/dist/lib/browser/chunk-ZRVMXLDR.mjs.map +0 -7
  417. package/dist/lib/browser/client-O7U3MQ6J.mjs +0 -43
  418. package/dist/lib/browser/client-O7U3MQ6J.mjs.map +0 -7
  419. package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs +0 -305
  420. package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs.map +0 -7
  421. package/dist/lib/browser/migrations-RUAKBBTF.mjs +0 -23
  422. package/dist/lib/browser/migrations-RUAKBBTF.mjs.map +0 -7
  423. package/dist/lib/browser/react-context-PCT5C3BN.mjs +0 -25
  424. package/dist/lib/browser/react-context-PCT5C3BN.mjs.map +0 -7
  425. package/dist/lib/browser/react-surface-RCXEA65V.mjs +0 -66
  426. package/dist/lib/browser/react-surface-RCXEA65V.mjs.map +0 -7
  427. package/dist/lib/browser/schema-defs-UNNBAEFW.mjs +0 -25
  428. package/dist/lib/browser/schema-defs-UNNBAEFW.mjs.map +0 -7
  429. package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs +0 -125
  430. package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs.map +0 -7
  431. package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs +0 -19
  432. package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs.map +0 -7
  433. package/dist/lib/node-esm/chunk-7M7VWQJW.mjs +0 -20
  434. package/dist/lib/node-esm/chunk-7M7VWQJW.mjs.map +0 -7
  435. package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs +0 -687
  436. package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs.map +0 -7
  437. package/dist/lib/node-esm/chunk-QT3EQXDU.mjs +0 -17
  438. package/dist/lib/node-esm/chunk-QT3EQXDU.mjs.map +0 -7
  439. package/dist/lib/node-esm/chunk-VENKFPBC.mjs.map +0 -7
  440. package/dist/lib/node-esm/client-6MTNT7M6.mjs +0 -44
  441. package/dist/lib/node-esm/client-6MTNT7M6.mjs.map +0 -7
  442. package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs +0 -306
  443. package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs.map +0 -7
  444. package/dist/lib/node-esm/migrations-ASF2SAUR.mjs +0 -24
  445. package/dist/lib/node-esm/migrations-ASF2SAUR.mjs.map +0 -7
  446. package/dist/lib/node-esm/react-context-F4QOBWSP.mjs +0 -26
  447. package/dist/lib/node-esm/react-context-F4QOBWSP.mjs.map +0 -7
  448. package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs +0 -67
  449. package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs.map +0 -7
  450. package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs +0 -26
  451. package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs.map +0 -7
  452. package/dist/types/src/capabilities/capabilities.d.ts +0 -9
  453. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  454. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
  455. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  456. package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
  457. package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -227
  458. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
  459. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  460. package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
  461. package/dist/types/src/components/ProfileContainer.stories.d.ts +0 -60
  462. package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
  463. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
  464. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -62
  465. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
  466. package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
  467. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -60
  468. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
  469. package/dist/types/src/components/ResetDialog.d.ts +0 -7
  470. package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
  471. package/dist/types/src/components/ResetDialog.stories.d.ts +0 -65
  472. package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
  473. package/dist/types/src/events.d.ts +0 -8
  474. package/dist/types/src/events.d.ts.map +0 -1
  475. package/src/capabilities/capabilities.ts +0 -18
  476. package/src/capabilities/intent-resolver.ts +0 -251
  477. package/src/components/JoinDialog.tsx +0 -54
  478. package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -42
  479. package/src/components/RecoveryCredentialsContainer.tsx +0 -69
  480. package/src/components/ResetDialog.stories.tsx +0 -52
  481. package/src/components/ResetDialog.tsx +0 -50
  482. package/src/events.ts +0 -15
  483. /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
  484. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
  485. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
@@ -1,686 +0,0 @@
1
- import {
2
- ClientAction
3
- } from "./chunk-RDIG75CA.mjs";
4
- import {
5
- meta
6
- } from "./chunk-ZRVMXLDR.mjs";
7
-
8
- // src/components/DevicesContainer.tsx
9
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
10
- import React, { useCallback, useEffect, useState } from "react";
11
- import { QR } from "react-qr-rounded";
12
- import { createIntent } from "@dxos/app-framework";
13
- import { useIntentDispatcher } from "@dxos/app-framework/react";
14
- import { log } from "@dxos/log";
15
- import { useClient, useMulticastObservable } from "@dxos/react-client";
16
- import { useDevices } from "@dxos/react-client/halo";
17
- import { Invitation, InvitationEncoder } from "@dxos/react-client/invitations";
18
- import { useNetworkStatus } from "@dxos/react-client/mesh";
19
- import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from "@dxos/react-ui";
20
- import { ControlFrame, ControlFrameItem, ControlGroup, ControlItem, ControlPage, ControlSection } from "@dxos/react-ui-form";
21
- import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from "@dxos/shell/react";
22
- import { hexToEmoji } from "@dxos/util";
23
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/components/DevicesContainer.tsx";
24
- var DevicesContainer = ({ createInvitationUrl }) => {
25
- var _effect = _useSignals();
26
- try {
27
- const { t } = useTranslation("os");
28
- const { dispatchPromise: dispatch } = useIntentDispatcher();
29
- const devices = useDevices();
30
- const { swarm: connectionState } = useNetworkStatus();
31
- const handleResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ResetStorage)), [
32
- dispatch
33
- ]);
34
- const handleRecover = useCallback(() => dispatch(createIntent(ClientAction.ResetStorage, {
35
- mode: "recover"
36
- })), [
37
- dispatch
38
- ]);
39
- const handleJoinNewIdentity = useCallback(() => dispatch(createIntent(ClientAction.ResetStorage, {
40
- mode: "join new identity"
41
- })), [
42
- dispatch
43
- ]);
44
- return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(ControlPage, null, /* @__PURE__ */ React.createElement(ControlSection, {
45
- title: t("devices verbose label", {
46
- ns: meta.id
47
- }),
48
- description: t("devices description", {
49
- ns: meta.id
50
- })
51
- }, /* @__PURE__ */ React.createElement(ControlFrame, null, /* @__PURE__ */ React.createElement(ControlFrameItem, {
52
- title: t("devices label", {
53
- ns: meta.id
54
- })
55
- }, /* @__PURE__ */ React.createElement(List, null, devices.map((device) => {
56
- return /* @__PURE__ */ React.createElement(DeviceListItem, {
57
- key: device.deviceKey.toHex(),
58
- device,
59
- connectionState
60
- });
61
- }))), createInvitationUrl && /* @__PURE__ */ React.createElement(ControlFrameItem, {
62
- title: "Add device"
63
- }, /* @__PURE__ */ React.createElement(DeviceInvitation, {
64
- createInvitationUrl
65
- })))), /* @__PURE__ */ React.createElement(ControlSection, {
66
- title: t("danger zone title", {
67
- ns: meta.id
68
- }),
69
- description: t("danger zone description", {
70
- ns: meta.id
71
- })
72
- }, /* @__PURE__ */ React.createElement(ControlGroup, null, /* @__PURE__ */ React.createElement(ControlItem, {
73
- title: t("reset device label"),
74
- description: t("reset device description", {
75
- ns: meta.id
76
- })
77
- }, /* @__PURE__ */ React.createElement(Button, {
78
- variant: "destructive",
79
- onClick: handleResetStorage,
80
- "data-testid": "devicesContainer.reset"
81
- }, t("reset device label"))), /* @__PURE__ */ React.createElement(ControlItem, {
82
- title: t("recover identity label"),
83
- description: t("recover identity description", {
84
- ns: meta.id
85
- })
86
- }, /* @__PURE__ */ React.createElement(Button, {
87
- variant: "destructive",
88
- onClick: handleRecover,
89
- "data-testid": "devicesContainer.recover"
90
- }, t("recover identity label"))), /* @__PURE__ */ React.createElement(ControlItem, {
91
- title: t("join new identity label"),
92
- description: t("join new identity description", {
93
- ns: meta.id
94
- })
95
- }, /* @__PURE__ */ React.createElement(Button, {
96
- variant: "destructive",
97
- onClick: handleJoinNewIdentity,
98
- "data-testid": "devicesContainer.joinExisting"
99
- }, t("join new identity label")))))));
100
- } finally {
101
- _effect.f();
102
- }
103
- };
104
- var DeviceInvitation = (props) => {
105
- var _effect = _useSignals();
106
- try {
107
- const client = useClient();
108
- const [invitation, setInvitation] = useState();
109
- const onInvitationCreate = useCallback(() => {
110
- const invitation2 = client.halo.share();
111
- if (client.config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
112
- const subscription = invitation2.subscribe((invitation3) => {
113
- const invitationCode = InvitationEncoder.encode(invitation3);
114
- if (invitation3.state === Invitation.State.CONNECTING) {
115
- log.info(JSON.stringify({
116
- invitationCode,
117
- authCode: invitation3.authCode
118
- }), void 0, {
119
- F: __dxlog_file,
120
- L: 126,
121
- S: void 0,
122
- C: (f, a) => f(...a)
123
- });
124
- subscription.unsubscribe();
125
- }
126
- });
127
- }
128
- setInvitation(invitation2);
129
- }, [
130
- client
131
- ]);
132
- const onInvitationDone = useCallback(() => {
133
- setInvitation(void 0);
134
- }, []);
135
- if (invitation) {
136
- return /* @__PURE__ */ React.createElement(DeviceInvitationImpl, {
137
- ...props,
138
- invitation,
139
- onInvitationCreate,
140
- onInvitationDone
141
- });
142
- } else {
143
- return /* @__PURE__ */ React.createElement(InvitationSection, {
144
- ...props,
145
- onInvitationCreate,
146
- onInvitationDone
147
- });
148
- }
149
- } finally {
150
- _effect.f();
151
- }
152
- };
153
- var DeviceInvitationImpl = ({ invitation: invitationObservable, createInvitationUrl, onInvitationDone, onInvitationCreate }) => {
154
- var _effect = _useSignals();
155
- try {
156
- const invitation = useMulticastObservable(invitationObservable);
157
- const url = createInvitationUrl(InvitationEncoder.encode(invitation));
158
- useEffect(() => {
159
- if (invitation.state >= Invitation.State.SUCCESS) {
160
- onInvitationDone();
161
- }
162
- }, [
163
- invitation.state
164
- ]);
165
- return /* @__PURE__ */ React.createElement(InvitationSection, {
166
- ...invitation,
167
- url,
168
- onInvitationDone,
169
- onInvitationCreate
170
- });
171
- } finally {
172
- _effect.f();
173
- }
174
- };
175
- var InvitationSection = ({ state = -1, authCode, invitationId = "never", url = "never", onInvitationDone = () => {
176
- }, onInvitationCreate = () => {
177
- } }) => {
178
- var _effect = _useSignals();
179
- try {
180
- const { t } = useTranslation(meta.id);
181
- const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
182
- return activeView === "init" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
183
- className: "text-description mbe-2"
184
- }, t("add device description")), /* @__PURE__ */ React.createElement(IconButton, {
185
- icon: "ph--plus--regular",
186
- label: t("create device invitation label"),
187
- disabled: state >= 0,
188
- classNames: "is-full",
189
- "data-testid": "devicesContainer.createInvitation",
190
- onClick: onInvitationCreate
191
- })) : /* @__PURE__ */ React.createElement(Viewport.Root, {
192
- activeView
193
- }, /* @__PURE__ */ React.createElement(Viewport.Views, null, /* @__PURE__ */ React.createElement(Viewport.View, {
194
- id: "init"
195
- }), /* @__PURE__ */ React.createElement(Viewport.View, {
196
- id: "complete"
197
- }, /* @__PURE__ */ React.createElement(InvitationComplete, {
198
- statusValue: state
199
- })), /* @__PURE__ */ React.createElement(Viewport.View, {
200
- id: "auth-code"
201
- }, /* @__PURE__ */ React.createElement(InvitationAuthCode, {
202
- id: invitationId,
203
- code: authCode ?? "never",
204
- onCancel: onInvitationDone
205
- })), /* @__PURE__ */ React.createElement(Viewport.View, {
206
- id: "qr-code"
207
- }, /* @__PURE__ */ React.createElement(InvitationQR, {
208
- id: invitationId,
209
- url,
210
- onCancel: onInvitationDone
211
- }))));
212
- } finally {
213
- _effect.f();
214
- }
215
- };
216
- var InvitationQR = ({ id, url, onCancel }) => {
217
- var _effect = _useSignals();
218
- try {
219
- const { t } = useTranslation("os");
220
- const qrLabel = useId("devices-container__qr-code");
221
- const emoji = hexToEmoji(id);
222
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
223
- className: "text-description"
224
- }, t("qr code description", {
225
- ns: meta.id
226
- })), /* @__PURE__ */ React.createElement("div", {
227
- role: "group",
228
- className: "grid grid-cols-[1fr_min-content] mlb-2 gap-2"
229
- }, /* @__PURE__ */ React.createElement("div", {
230
- role: "none",
231
- className: "is-full aspect-square relative text-description"
232
- }, /* @__PURE__ */ React.createElement(QR, {
233
- rounding: 100,
234
- backgroundColor: "transparent",
235
- color: "currentColor",
236
- "aria-labelledby": qrLabel,
237
- errorCorrectionLevel: "Q",
238
- cutout: true
239
- }, url ?? "never"), /* @__PURE__ */ React.createElement(Centered, null, /* @__PURE__ */ React.createElement(Emoji, {
240
- text: emoji
241
- }))), /* @__PURE__ */ React.createElement("span", {
242
- id: qrLabel,
243
- className: "sr-only"
244
- }, t("qr label"))), /* @__PURE__ */ React.createElement("div", {
245
- className: "flex justify-center"
246
- }, /* @__PURE__ */ React.createElement("div", {
247
- className: "flex gap-2"
248
- }, /* @__PURE__ */ React.createElement(Clipboard.Button, {
249
- value: url ?? "never"
250
- }), /* @__PURE__ */ React.createElement(Button, {
251
- variant: "ghost",
252
- onClick: onCancel
253
- }, t("cancel label")))));
254
- } finally {
255
- _effect.f();
256
- }
257
- };
258
- var InvitationAuthCode = ({ id, code, onCancel }) => {
259
- var _effect = _useSignals();
260
- try {
261
- const { t } = useTranslation("os");
262
- const emoji = hexToEmoji(id);
263
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
264
- className: "text-description"
265
- }, t("auth other device emoji message")), emoji && /* @__PURE__ */ React.createElement(Emoji, {
266
- text: emoji,
267
- className: "mli-auto mlb-2 text-center"
268
- }), /* @__PURE__ */ React.createElement("p", {
269
- className: "text-description"
270
- }, t("auth code message")), /* @__PURE__ */ React.createElement(AuthCode, {
271
- code,
272
- large: true,
273
- classNames: "mli-auto mlb-2 text-center grow"
274
- }), /* @__PURE__ */ React.createElement(Button, {
275
- variant: "ghost",
276
- onClick: onCancel
277
- }, t("cancel label")));
278
- } finally {
279
- _effect.f();
280
- }
281
- };
282
- var InvitationComplete = ({ statusValue }) => {
283
- var _effect = _useSignals();
284
- try {
285
- return statusValue > 0 ? /* @__PURE__ */ React.createElement(Icon, {
286
- icon: "ph--check--regular",
287
- size: 6,
288
- classNames: "m-1.5"
289
- }) : /* @__PURE__ */ React.createElement(Icon, {
290
- icon: "ph--x--regular",
291
- size: 6,
292
- classNames: "m-1.5"
293
- });
294
- } finally {
295
- _effect.f();
296
- }
297
- };
298
-
299
- // src/components/JoinDialog.tsx
300
- import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
301
- import React2, { useCallback as useCallback2 } from "react";
302
- import { LayoutAction, createIntent as createIntent2 } from "@dxos/app-framework";
303
- import { useIntentDispatcher as useIntentDispatcher2 } from "@dxos/app-framework/react";
304
- import { ObservabilityAction } from "@dxos/plugin-observability/types";
305
- import { Dialog, useTranslation as useTranslation2 } from "@dxos/react-ui";
306
- import { JoinPanel } from "@dxos/shell/react";
307
- var JOIN_DIALOG = `${meta.id}/JoinDialog`;
308
- var JoinDialog = (props) => {
309
- var _effect = _useSignals2();
310
- try {
311
- const { dispatchPromise: dispatch } = useIntentDispatcher2();
312
- const { t } = useTranslation2(meta.id);
313
- const handleCancelResetStorage = useCallback2(() => dispatch(createIntent2(ClientAction.ShareIdentity)), [
314
- dispatch
315
- ]);
316
- const handleDone = useCallback2(async (result) => {
317
- if (result?.identityKey) {
318
- await Promise.all([
319
- dispatch(createIntent2(LayoutAction.UpdateDialog, {
320
- part: "dialog",
321
- options: {
322
- state: false
323
- }
324
- })),
325
- dispatch(createIntent2(ObservabilityAction.SendEvent, {
326
- name: props.initialDisposition === "recover-identity" ? "identity.recover" : "identity.join"
327
- }))
328
- ]);
329
- }
330
- }, [
331
- dispatch
332
- ]);
333
- return /* @__PURE__ */ React2.createElement(Dialog.Content, null, /* @__PURE__ */ React2.createElement(Dialog.Title, {
334
- classNames: "sr-only"
335
- }, t("join space label", {
336
- ns: "os"
337
- })), /* @__PURE__ */ React2.createElement(JoinPanel, {
338
- mode: "halo-only",
339
- ...props,
340
- exitActionParent: /* @__PURE__ */ React2.createElement(Dialog.Close, {
341
- asChild: true
342
- }),
343
- doneActionParent: /* @__PURE__ */ React2.createElement(Dialog.Close, {
344
- asChild: true
345
- }),
346
- onCancelResetStorage: handleCancelResetStorage,
347
- onDone: handleDone
348
- }));
349
- } finally {
350
- _effect.f();
351
- }
352
- };
353
-
354
- // src/components/ProfileContainer.tsx
355
- import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
356
- import * as Schema from "effect/Schema";
357
- import React3, { useCallback as useCallback3, useMemo, useState as useState2 } from "react";
358
- import { debounce } from "@dxos/async";
359
- import { useClient as useClient2 } from "@dxos/react-client";
360
- import { useIdentity } from "@dxos/react-client/halo";
361
- import { ButtonGroup, Clipboard as Clipboard2, Input, useTranslation as useTranslation3 } from "@dxos/react-ui";
362
- import { ControlItem as ControlItem2, ControlItemInput, ControlPage as ControlPage2, ControlSection as ControlSection2, Form } from "@dxos/react-ui-form";
363
- import { EmojiPickerBlock, HuePicker } from "@dxos/react-ui-pickers";
364
- import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
365
- var getDefaultHueValue = (identity) => hexToHue(identity?.identityKey.toHex() ?? "0");
366
- var getDefaultEmojiValue = (identity) => hexToEmoji2(identity?.identityKey.toHex() ?? "0");
367
- var getHueValue = (identity) => identity?.profile?.data?.hue || getDefaultHueValue(identity);
368
- var getEmojiValue = (identity) => identity?.profile?.data?.emoji || getDefaultEmojiValue(identity);
369
- var ProfileContainer = () => {
370
- var _effect = _useSignals3();
371
- try {
372
- const { t } = useTranslation3(meta.id);
373
- const client = useClient2();
374
- const identity = useIdentity();
375
- const [displayName, setDisplayNameDirectly] = useState2(identity?.profile?.displayName ?? "");
376
- const [emoji, setEmojiDirectly] = useState2(getEmojiValue(identity));
377
- const [hue, setHueDirectly] = useState2(getHueValue(identity));
378
- const updateProfile = useMemo(() => debounce((profile) => client.halo.updateProfile({
379
- displayName: profile.displayName,
380
- data: {
381
- emoji: profile.emoji,
382
- hue: profile.hue
383
- }
384
- }), 2e3), []);
385
- const handleSave = useCallback3((profile) => {
386
- setDisplayNameDirectly(profile.displayName);
387
- setEmojiDirectly(profile.emoji);
388
- setHueDirectly(profile.hue);
389
- void updateProfile(profile);
390
- }, [
391
- identity
392
- ]);
393
- const values = useMemo(() => ({
394
- displayName,
395
- emoji,
396
- hue,
397
- did: identity?.did
398
- }), [
399
- identity,
400
- displayName,
401
- emoji,
402
- hue
403
- ]);
404
- const customElements = useMemo(() => ({
405
- displayName: ({ type, label, getValue, onValueChange }) => {
406
- const handleChange = useCallback3(({ target: { value } }) => onValueChange(type, value), [
407
- onValueChange,
408
- type
409
- ]);
410
- return /* @__PURE__ */ React3.createElement(ControlItemInput, {
411
- title: label,
412
- description: t("display name description")
413
- }, /* @__PURE__ */ React3.createElement(Input.TextInput, {
414
- value: getValue(),
415
- onChange: handleChange,
416
- placeholder: t("display name input placeholder"),
417
- classNames: "min-is-64"
418
- }));
419
- },
420
- emoji: ({ type, label, getValue, onValueChange }) => {
421
- const handleChange = useCallback3((nextEmoji) => onValueChange(type, nextEmoji), [
422
- onValueChange,
423
- type
424
- ]);
425
- const handleEmojiReset = useCallback3(() => onValueChange(type, getDefaultEmojiValue(identity)), [
426
- onValueChange,
427
- type
428
- ]);
429
- return /* @__PURE__ */ React3.createElement(ControlItem2, {
430
- title: label,
431
- description: t("icon description")
432
- }, /* @__PURE__ */ React3.createElement(EmojiPickerBlock, {
433
- triggerVariant: "default",
434
- emoji: getValue(),
435
- onChangeEmoji: handleChange,
436
- onClickClear: handleEmojiReset,
437
- classNames: "justify-self-end"
438
- }));
439
- },
440
- hue: ({ type, label, getValue, onValueChange }) => {
441
- const handleChange = useCallback3((nextHue) => onValueChange(type, nextHue), [
442
- onValueChange,
443
- type
444
- ]);
445
- const handleHueReset = useCallback3(() => onValueChange(type, getDefaultHueValue(identity)), [
446
- onValueChange,
447
- type
448
- ]);
449
- return /* @__PURE__ */ React3.createElement(ControlItem2, {
450
- title: label,
451
- description: t("hue description")
452
- }, /* @__PURE__ */ React3.createElement(HuePicker, {
453
- value: getValue(),
454
- onChange: handleChange,
455
- onReset: handleHueReset
456
- }));
457
- },
458
- // TODO(wittjosiah): We need text input annotations for disabled and copyable.
459
- did: ({ label, getValue }) => {
460
- return /* @__PURE__ */ React3.createElement(ControlItemInput, {
461
- title: label,
462
- description: t("did description")
463
- }, /* @__PURE__ */ React3.createElement(ButtonGroup, null, /* @__PURE__ */ React3.createElement(Input.TextInput, {
464
- value: getValue(),
465
- disabled: true,
466
- classNames: "min-is-64"
467
- }), /* @__PURE__ */ React3.createElement(Clipboard2.IconButton, {
468
- value: getValue() ?? ""
469
- })));
470
- }
471
- }), [
472
- t
473
- ]);
474
- return /* @__PURE__ */ React3.createElement(ControlPage2, null, /* @__PURE__ */ React3.createElement(Clipboard2.Provider, null, /* @__PURE__ */ React3.createElement(ControlSection2, {
475
- title: t("profile label"),
476
- description: t("profile description")
477
- }, /* @__PURE__ */ React3.createElement(Form, {
478
- schema: ProfileSchema,
479
- values,
480
- autoSave: true,
481
- onSave: handleSave,
482
- Custom: customElements,
483
- classNames: "container-max-width grid grid-cols-1 md:grid-cols-[1fr_min-content]",
484
- outerSpacing: false
485
- }))));
486
- } finally {
487
- _effect.f();
488
- }
489
- };
490
- var ProfileSchema = Schema.Struct({
491
- displayName: Schema.String.annotations({
492
- title: "Display name"
493
- }),
494
- emoji: Schema.String.annotations({
495
- title: "Avatar"
496
- }),
497
- hue: Schema.String.annotations({
498
- title: "Color"
499
- }),
500
- did: Schema.String.annotations({
501
- title: "DID"
502
- })
503
- });
504
-
505
- // src/components/RecoveryCodeDialog.tsx
506
- import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
507
- import React4, { useCallback as useCallback4, useState as useState3 } from "react";
508
- import { AlertDialog, Button as Button2, Clipboard as Clipboard3, Input as Input2, useTranslation as useTranslation4 } from "@dxos/react-ui";
509
- var RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;
510
- var RecoveryCodeDialog = ({ code }) => {
511
- var _effect = _useSignals4();
512
- try {
513
- const { t } = useTranslation4(meta.id);
514
- const [confirmation, setConfirmation] = useState3(false);
515
- const handleConfirmation = useCallback4((checked) => setConfirmation(checked), []);
516
- return /* @__PURE__ */ React4.createElement(AlertDialog.Content, {
517
- classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
518
- }, /* @__PURE__ */ React4.createElement(AlertDialog.Title, null, t("recovery code dialog title")), /* @__PURE__ */ React4.createElement("p", {
519
- className: "plb-4"
520
- }, t("recovery code dialog description")), /* @__PURE__ */ React4.createElement(Clipboard3.Provider, null, /* @__PURE__ */ React4.createElement(Code, {
521
- code
522
- })), /* @__PURE__ */ React4.createElement("div", {
523
- className: "flex flex-col plb-4 gap-2"
524
- }, /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 1")), /* @__PURE__ */ React4.createElement("p", null, t("recovery code dialog warning 2"))), /* @__PURE__ */ React4.createElement("div", {
525
- className: "flex items-center gap-2 pbe-4"
526
- }, /* @__PURE__ */ React4.createElement(Input2.Root, null, /* @__PURE__ */ React4.createElement(Input2.Checkbox, {
527
- "data-testid": "recoveryCode.confirm",
528
- checked: confirmation,
529
- onCheckedChange: handleConfirmation
530
- }), /* @__PURE__ */ React4.createElement(Input2.Label, null, t("recovery code confirmation label")))), /* @__PURE__ */ React4.createElement("div", {
531
- className: "flex justify-end"
532
- }, /* @__PURE__ */ React4.createElement(AlertDialog.Action, {
533
- asChild: true
534
- }, /* @__PURE__ */ React4.createElement(Button2, {
535
- "data-testid": "recoveryCode.continue",
536
- variant: "primary",
537
- disabled: !confirmation
538
- }, t("continue label")))));
539
- } finally {
540
- _effect.f();
541
- }
542
- };
543
- var Code = ({ code }) => {
544
- var _effect = _useSignals4();
545
- try {
546
- const words = code.split(" ");
547
- return /* @__PURE__ */ React4.createElement("div", {
548
- className: "relative p-2 border border-separator rounded group"
549
- }, /* @__PURE__ */ React4.createElement(Clipboard3.IconButton, {
550
- value: code,
551
- classNames: "absolute top-2 right-2 invisible group-hover:visible"
552
- }), /* @__PURE__ */ React4.createElement("div", {
553
- className: "grid grid-cols-4"
554
- }, words.map((word, i) => /* @__PURE__ */ React4.createElement("div", {
555
- key: i,
556
- className: "flex items-center p-2 gap-2"
557
- }, /* @__PURE__ */ React4.createElement("div", {
558
- className: "is-4 text-xs text-center text-subdued"
559
- }, i + 1), /* @__PURE__ */ React4.createElement("div", {
560
- className: "text-sm"
561
- }, word)))));
562
- } finally {
563
- _effect.f();
564
- }
565
- };
566
-
567
- // src/components/RecoveryCredentialsContainer.tsx
568
- import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
569
- import React5 from "react";
570
- import { createIntent as createIntent3 } from "@dxos/app-framework";
571
- import { useIntentDispatcher as useIntentDispatcher3 } from "@dxos/app-framework/react";
572
- import { useCredentials } from "@dxos/react-client/halo";
573
- import { Icon as Icon2, IconButton as IconButton2, List as List2, ListItem, Message, useTranslation as useTranslation5 } from "@dxos/react-ui";
574
- import { ControlGroup as ControlGroup2, ControlItem as ControlItem3, ControlPage as ControlPage3, ControlSection as ControlSection3 } from "@dxos/react-ui-form";
575
- var MANAGE_CREDENTIALS_DIALOG = `${meta.id}/ManageCredentialsDialog`;
576
- var RecoveryCredentialsContainer = () => {
577
- var _effect = _useSignals5();
578
- try {
579
- const { t } = useTranslation5(meta.id);
580
- const { dispatchPromise: dispatch } = useIntentDispatcher3();
581
- const credentials = useCredentials();
582
- const recoveryCredentials = credentials.filter((credential) => credential.subject.assertion["@type"] === "dxos.halo.credentials.IdentityRecovery");
583
- return /* @__PURE__ */ React5.createElement(ControlPage3, null, /* @__PURE__ */ React5.createElement(ControlSection3, {
584
- title: t("recovery setup dialog title"),
585
- description: t("recovery setup dialog description")
586
- }, /* @__PURE__ */ React5.createElement(ControlGroup2, null, /* @__PURE__ */ React5.createElement(ControlItem3, {
587
- title: t("create passkey label"),
588
- description: t("create passkey description")
589
- }, /* @__PURE__ */ React5.createElement(IconButton2, {
590
- label: t("create passkey label"),
591
- icon: "ph--key--duotone",
592
- variant: "primary",
593
- onClick: () => dispatch(createIntent3(ClientAction.CreatePasskey))
594
- })), /* @__PURE__ */ React5.createElement(ControlItem3, {
595
- title: t("create recovery code label"),
596
- description: t("create recovery code description")
597
- }, /* @__PURE__ */ React5.createElement(IconButton2, {
598
- label: t("create recovery code label"),
599
- icon: "ph--receipt--duotone",
600
- variant: "default",
601
- onClick: () => dispatch(createIntent3(ClientAction.CreateRecoveryCode))
602
- })))), /* @__PURE__ */ React5.createElement(ControlSection3, {
603
- title: t("credentials list label")
604
- }, recoveryCredentials.length < 1 ? /* @__PURE__ */ React5.createElement(Message.Root, {
605
- valence: "error",
606
- classNames: "container-max-width"
607
- }, /* @__PURE__ */ React5.createElement(Message.Title, {
608
- icon: "ph--shield-warning--duotone"
609
- }, t("no credentials title")), /* @__PURE__ */ React5.createElement(Message.Content, null, t("no credentials message"))) : /* @__PURE__ */ React5.createElement(List2, {
610
- classNames: "container-max-width pli-2"
611
- }, recoveryCredentials.map((credential) => /* @__PURE__ */ React5.createElement(ListItem.Root, {
612
- key: credential.id?.toHex()
613
- }, /* @__PURE__ */ React5.createElement(ListItem.Endcap, null, /* @__PURE__ */ React5.createElement(Icon2, {
614
- icon: "ph--key--regular"
615
- })), /* @__PURE__ */ React5.createElement(ListItem.Heading, null, credential.issuanceDate.toLocaleString()))))));
616
- } finally {
617
- _effect.f();
618
- }
619
- };
620
-
621
- // src/components/ResetDialog.tsx
622
- import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
623
- import React6, { useCallback as useCallback5 } from "react";
624
- import { LayoutAction as LayoutAction2, createIntent as createIntent4 } from "@dxos/app-framework";
625
- import { useIntentDispatcher as useIntentDispatcher4 } from "@dxos/app-framework/react";
626
- import { useClient as useClient3 } from "@dxos/react-client";
627
- import { Dialog as Dialog2, useTranslation as useTranslation6 } from "@dxos/react-ui";
628
- import { ConfirmReset } from "@dxos/shell/react";
629
- var RESET_DIALOG = `${meta.id}/ResetDialog`;
630
- var ResetDialog = ({ mode, onReset }) => {
631
- var _effect = _useSignals6();
632
- try {
633
- const { t } = useTranslation6(meta.id);
634
- const { dispatchPromise: dispatch } = useIntentDispatcher4();
635
- const client = useClient3();
636
- const handleReset = useCallback5(async () => {
637
- await client.reset();
638
- const target = mode === "join new identity" ? "deviceInvitation" : mode === "recover" ? "recoverIdentity" : void 0;
639
- await onReset?.({
640
- target
641
- });
642
- }, [
643
- dispatch,
644
- client,
645
- mode,
646
- onReset
647
- ]);
648
- const handleCancel = useCallback5(() => {
649
- void dispatch(createIntent4(LayoutAction2.UpdateDialog, {
650
- part: "dialog",
651
- options: {
652
- state: false
653
- }
654
- }));
655
- }, [
656
- dispatch
657
- ]);
658
- return /* @__PURE__ */ React6.createElement(Dialog2.Content, {
659
- classNames: "bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden"
660
- }, /* @__PURE__ */ React6.createElement(Dialog2.Title, {
661
- classNames: "sr-only"
662
- }, t("reset dialog title")), /* @__PURE__ */ React6.createElement(Dialog2.Description, {
663
- classNames: "sr-only"
664
- }, t("reset dialog description")), /* @__PURE__ */ React6.createElement(ConfirmReset, {
665
- active: true,
666
- mode,
667
- onConfirm: handleReset,
668
- onCancel: handleCancel
669
- }));
670
- } finally {
671
- _effect.f();
672
- }
673
- };
674
-
675
- export {
676
- DevicesContainer,
677
- JOIN_DIALOG,
678
- JoinDialog,
679
- ProfileContainer,
680
- RECOVERY_CODE_DIALOG,
681
- RecoveryCodeDialog,
682
- RecoveryCredentialsContainer,
683
- RESET_DIALOG,
684
- ResetDialog
685
- };
686
- //# sourceMappingURL=chunk-4G4YWIUQ.mjs.map