@dxos/plugin-client 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7

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 (222) hide show
  1. package/dist/lib/browser/DevicesContainer-3N7ANEJ7.mjs +268 -0
  2. package/dist/lib/browser/DevicesContainer-3N7ANEJ7.mjs.map +7 -0
  3. package/dist/lib/browser/JoinDialog-VTTK7NHO.mjs +59 -0
  4. package/dist/lib/browser/JoinDialog-VTTK7NHO.mjs.map +7 -0
  5. package/dist/lib/browser/ProfileContainer-XV7OXJC2.mjs +171 -0
  6. package/dist/lib/browser/ProfileContainer-XV7OXJC2.mjs.map +7 -0
  7. package/dist/lib/browser/RecoveryCodeDialog-WO34OZEJ.mjs +60 -0
  8. package/dist/lib/browser/RecoveryCodeDialog-WO34OZEJ.mjs.map +7 -0
  9. package/dist/lib/browser/RecoveryCredentialsContainer-G22FSTIX.mjs +57 -0
  10. package/dist/lib/browser/RecoveryCredentialsContainer-G22FSTIX.mjs.map +7 -0
  11. package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs +52 -0
  12. package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs.map +7 -0
  13. package/dist/lib/browser/{app-graph-builder-3FGBMLTF.mjs → app-graph-builder-GGJKFY3X.mjs} +9 -6
  14. package/dist/lib/browser/app-graph-builder-GGJKFY3X.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-4BZGRIFS.mjs → chunk-FVEKZBM7.mjs} +34 -44
  16. package/dist/lib/browser/chunk-FVEKZBM7.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-F7H2Y3Z2.mjs → chunk-GSVYEYVS.mjs} +4 -4
  18. package/dist/lib/browser/chunk-HSFDKP5D.mjs +15 -0
  19. package/dist/lib/browser/{chunk-G7C3S2BE.mjs.map → chunk-HSFDKP5D.mjs.map} +1 -1
  20. package/dist/lib/browser/chunk-JHSBBOCI.mjs +15 -0
  21. package/dist/lib/browser/chunk-JHSBBOCI.mjs.map +7 -0
  22. package/dist/lib/browser/cli/index.mjs +60 -49
  23. package/dist/lib/browser/cli/index.mjs.map +3 -3
  24. package/dist/lib/browser/{client-IX5LMWV4.mjs → client-BXCP3EUE.mjs} +11 -11
  25. package/dist/lib/browser/client-BXCP3EUE.mjs.map +7 -0
  26. package/dist/lib/browser/index.mjs +26 -23
  27. package/dist/lib/browser/index.mjs.map +3 -3
  28. package/dist/lib/browser/meta.json +1 -1
  29. package/dist/lib/browser/{migrations-3EBTAW3N.mjs → migrations-GKUA2ARL.mjs} +6 -5
  30. package/dist/lib/browser/migrations-GKUA2ARL.mjs.map +7 -0
  31. package/dist/lib/browser/{operation-resolver-2NT3ISVP.mjs → operation-resolver-VSWA74RS.mjs} +24 -23
  32. package/dist/lib/browser/operation-resolver-VSWA74RS.mjs.map +7 -0
  33. package/dist/lib/browser/{react-context-4UABG3GP.mjs → react-context-GZ3T5UON.mjs} +8 -6
  34. package/dist/lib/browser/react-context-GZ3T5UON.mjs.map +7 -0
  35. package/dist/lib/browser/react-surface-5VZP34X3.mjs +77 -0
  36. package/dist/lib/browser/react-surface-5VZP34X3.mjs.map +7 -0
  37. package/dist/lib/browser/{schema-defs-O7VLP745.mjs → schema-defs-KAG6HQMI.mjs} +8 -6
  38. package/dist/lib/browser/schema-defs-KAG6HQMI.mjs.map +7 -0
  39. package/dist/lib/browser/types/index.mjs +2 -1
  40. package/dist/lib/node-esm/DevicesContainer-V7HEUPO7.mjs +269 -0
  41. package/dist/lib/node-esm/DevicesContainer-V7HEUPO7.mjs.map +7 -0
  42. package/dist/lib/node-esm/JoinDialog-XVKW4SLT.mjs +60 -0
  43. package/dist/lib/node-esm/JoinDialog-XVKW4SLT.mjs.map +7 -0
  44. package/dist/lib/node-esm/ProfileContainer-B5LJ6TMU.mjs +172 -0
  45. package/dist/lib/node-esm/ProfileContainer-B5LJ6TMU.mjs.map +7 -0
  46. package/dist/lib/node-esm/RecoveryCodeDialog-YIRGXM7N.mjs +61 -0
  47. package/dist/lib/node-esm/RecoveryCodeDialog-YIRGXM7N.mjs.map +7 -0
  48. package/dist/lib/node-esm/RecoveryCredentialsContainer-MVJEFNXX.mjs +58 -0
  49. package/dist/lib/node-esm/RecoveryCredentialsContainer-MVJEFNXX.mjs.map +7 -0
  50. package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs +54 -0
  51. package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs.map +7 -0
  52. package/dist/lib/node-esm/{app-graph-builder-2PIYVUNC.mjs → app-graph-builder-PTNZ46NN.mjs} +9 -6
  53. package/dist/lib/node-esm/app-graph-builder-PTNZ46NN.mjs.map +7 -0
  54. package/dist/lib/node-esm/chunk-BOTJSPCT.mjs +17 -0
  55. package/dist/lib/node-esm/chunk-BOTJSPCT.mjs.map +7 -0
  56. package/dist/lib/node-esm/{chunk-JAF64TFQ.mjs → chunk-DT2ZNOGU.mjs} +33 -44
  57. package/dist/lib/node-esm/chunk-DT2ZNOGU.mjs.map +7 -0
  58. package/dist/lib/node-esm/{chunk-BCELGXRI.mjs → chunk-OFJUOKY7.mjs} +4 -4
  59. package/dist/lib/node-esm/chunk-VLNCZYIC.mjs +16 -0
  60. package/dist/lib/node-esm/{chunk-PRAFFO54.mjs.map → chunk-VLNCZYIC.mjs.map} +1 -1
  61. package/dist/lib/node-esm/cli/index.mjs +60 -49
  62. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  63. package/dist/lib/node-esm/{client-FFPK5UFP.mjs → client-EGZHGRRC.mjs} +11 -11
  64. package/dist/lib/node-esm/client-EGZHGRRC.mjs.map +7 -0
  65. package/dist/lib/node-esm/index.mjs +26 -23
  66. package/dist/lib/node-esm/index.mjs.map +3 -3
  67. package/dist/lib/node-esm/meta.json +1 -1
  68. package/dist/lib/node-esm/{migrations-WSZSFGDK.mjs → migrations-4NEKCBGU.mjs} +6 -5
  69. package/dist/lib/node-esm/migrations-4NEKCBGU.mjs.map +7 -0
  70. package/dist/lib/node-esm/{operation-resolver-VW5R2BE4.mjs → operation-resolver-4GWB3YZG.mjs} +24 -23
  71. package/dist/lib/node-esm/operation-resolver-4GWB3YZG.mjs.map +7 -0
  72. package/dist/lib/node-esm/{react-context-UVXMGPW4.mjs → react-context-T2ORT5CC.mjs} +8 -6
  73. package/dist/lib/node-esm/react-context-T2ORT5CC.mjs.map +7 -0
  74. package/dist/lib/node-esm/react-surface-B65OUZYI.mjs +78 -0
  75. package/dist/lib/node-esm/react-surface-B65OUZYI.mjs.map +7 -0
  76. package/dist/lib/node-esm/{schema-defs-QLRGBIKY.mjs → schema-defs-GXQ47JZN.mjs} +8 -6
  77. package/dist/lib/node-esm/schema-defs-GXQ47JZN.mjs.map +7 -0
  78. package/dist/lib/node-esm/types/index.mjs +2 -1
  79. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  80. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
  81. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
  82. package/dist/types/src/capabilities/client/client.d.ts +2 -2
  83. package/dist/types/src/capabilities/client/client.d.ts.map +1 -1
  84. package/dist/types/src/capabilities/client/index.d.ts +2 -1
  85. package/dist/types/src/capabilities/client/index.d.ts.map +1 -1
  86. package/dist/types/src/capabilities/migrations/migrations.d.ts +1 -1
  87. package/dist/types/src/capabilities/migrations/migrations.d.ts.map +1 -1
  88. package/dist/types/src/capabilities/operation-resolver/index.d.ts +1 -1
  89. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -1
  90. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
  91. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  92. package/dist/types/src/capabilities/react-context/react-context.d.ts +1 -1
  93. package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
  95. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
  96. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
  97. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
  98. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +1 -1
  99. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +1 -1
  100. package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -1
  101. package/dist/types/src/cli/commands/profile/create.d.ts +2 -1
  102. package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
  103. package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
  104. package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
  105. package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
  106. package/dist/types/src/cli/plugin.d.ts.map +1 -1
  107. package/dist/types/src/components/index.d.ts +0 -6
  108. package/dist/types/src/components/index.d.ts.map +1 -1
  109. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
  110. package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.stories.d.ts +9 -7
  111. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
  112. package/dist/types/src/containers/DevicesContainer/index.d.ts +3 -0
  113. package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
  114. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
  115. package/dist/types/src/containers/JoinDialog/index.d.ts +3 -0
  116. package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
  117. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
  118. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
  119. package/dist/types/src/containers/ProfileContainer/index.d.ts +3 -0
  120. package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
  121. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
  122. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
  123. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
  124. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
  125. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
  126. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
  127. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +3 -0
  128. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
  129. package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
  130. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
  131. package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
  132. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
  133. package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
  134. package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
  135. package/dist/types/src/containers/index.d.ts +10 -0
  136. package/dist/types/src/containers/index.d.ts.map +1 -0
  137. package/dist/types/src/types/capabilities.d.ts +1 -1
  138. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  139. package/dist/types/src/types/schema.d.ts +36 -32
  140. package/dist/types/src/types/schema.d.ts.map +1 -1
  141. package/dist/types/tsconfig.tsbuildinfo +1 -1
  142. package/package.json +36 -35
  143. package/src/ClientPlugin.ts +27 -19
  144. package/src/capabilities/app-graph-builder/app-graph-builder.ts +4 -3
  145. package/src/capabilities/client/client.ts +7 -5
  146. package/src/capabilities/migrations/migrations.ts +3 -3
  147. package/src/capabilities/operation-resolver/operation-resolver.ts +13 -12
  148. package/src/capabilities/react-context/react-context.tsx +3 -3
  149. package/src/capabilities/react-surface/react-surface.tsx +12 -12
  150. package/src/capabilities/schema-defs/schema-defs.ts +7 -6
  151. package/src/cli/commands/edge/status.ts +2 -2
  152. package/src/cli/commands/halo/create/create.ts +2 -2
  153. package/src/cli/commands/profile/create.ts +9 -6
  154. package/src/cli/commands/profile/delete.ts +5 -2
  155. package/src/cli/commands/profile/list.ts +13 -11
  156. package/src/cli/plugin.ts +7 -6
  157. package/src/components/index.ts +0 -7
  158. package/src/constants.ts +3 -3
  159. package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +8 -6
  160. package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +49 -57
  161. package/src/containers/DevicesContainer/index.ts +7 -0
  162. package/src/{components → containers/JoinDialog}/JoinDialog.tsx +8 -6
  163. package/src/containers/JoinDialog/index.ts +7 -0
  164. package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
  165. package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +20 -28
  166. package/src/containers/ProfileContainer/index.ts +7 -0
  167. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
  168. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +28 -25
  169. package/src/containers/RecoveryCodeDialog/index.ts +8 -0
  170. package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +8 -6
  171. package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.tsx +19 -19
  172. package/src/containers/RecoveryCredentialsContainer/index.ts +7 -0
  173. package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -14
  174. package/src/{components → containers/ResetDialog}/ResetDialog.tsx +10 -10
  175. package/src/containers/ResetDialog/index.ts +8 -0
  176. package/src/containers/index.ts +15 -0
  177. package/src/meta.ts +1 -1
  178. package/src/translations.ts +1 -1
  179. package/src/types/capabilities.ts +3 -3
  180. package/src/types/events.ts +5 -5
  181. package/src/types/schema.ts +28 -23
  182. package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
  183. package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
  184. package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
  185. package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
  186. package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
  187. package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
  188. package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
  189. package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
  190. package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
  191. package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
  192. package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
  193. package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
  194. package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
  195. package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
  196. package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
  197. package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
  198. package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
  199. package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
  200. package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
  201. package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
  202. package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
  203. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
  204. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  205. package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
  206. package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
  207. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
  208. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
  209. package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
  210. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
  211. package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
  212. package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
  213. /package/dist/lib/browser/{chunk-F7H2Y3Z2.mjs.map → chunk-GSVYEYVS.mjs.map} +0 -0
  214. /package/dist/lib/node-esm/{chunk-BCELGXRI.mjs.map → chunk-OFJUOKY7.mjs.map} +0 -0
  215. /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
  216. /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
  217. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
  218. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
  219. /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
  220. /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
  221. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
  222. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
@@ -0,0 +1,61 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ meta
4
+ } from "./chunk-BOTJSPCT.mjs";
5
+
6
+ // src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx
7
+ import React, { useCallback, useState } from "react";
8
+ import { AlertDialog, Button, Clipboard, Input, useTranslation } from "@dxos/react-ui";
9
+ var RecoveryCodeDialog = ({ code }) => {
10
+ const { t } = useTranslation(meta.id);
11
+ const [confirmation, setConfirmation] = useState(false);
12
+ const handleConfirmation = useCallback((checked) => setConfirmation(checked), []);
13
+ return /* @__PURE__ */ React.createElement(AlertDialog.Content, {
14
+ size: "md",
15
+ classNames: "min-h-[15rem]"
16
+ }, /* @__PURE__ */ React.createElement(AlertDialog.Body, null, /* @__PURE__ */ React.createElement(AlertDialog.Title, null, t("recovery code dialog title")), /* @__PURE__ */ React.createElement("p", {
17
+ className: "py-4"
18
+ }, t("recovery code dialog description")), /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Code, {
19
+ code
20
+ })), /* @__PURE__ */ React.createElement("div", {
21
+ className: "flex flex-col py-4 gap-2"
22
+ }, /* @__PURE__ */ React.createElement("p", null, t("recovery code dialog warning 1")), /* @__PURE__ */ React.createElement("p", null, t("recovery code dialog warning 2"))), /* @__PURE__ */ React.createElement("div", {
23
+ className: "flex items-center gap-2 pb-4"
24
+ }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Checkbox, {
25
+ "data-testid": "recoveryCode.confirm",
26
+ checked: confirmation,
27
+ onCheckedChange: handleConfirmation
28
+ }), /* @__PURE__ */ React.createElement(Input.Label, null, t("recovery code confirmation label"))))), /* @__PURE__ */ React.createElement(AlertDialog.ActionBar, null, /* @__PURE__ */ React.createElement(AlertDialog.Action, {
29
+ asChild: true
30
+ }, /* @__PURE__ */ React.createElement(Button, {
31
+ "data-testid": "recoveryCode.continue",
32
+ variant: "primary",
33
+ disabled: !confirmation
34
+ }, t("continue label")))));
35
+ };
36
+ var Code = ({ code }) => {
37
+ const words = code.split(" ");
38
+ return /* @__PURE__ */ React.createElement("div", {
39
+ className: "relative p-2 border border-separator rounded-sm group"
40
+ }, /* @__PURE__ */ React.createElement(Clipboard.IconButton, {
41
+ value: code,
42
+ classNames: "absolute top-2 right-2 invisible group-hover:visible"
43
+ }), /* @__PURE__ */ React.createElement("div", {
44
+ className: "grid grid-cols-4"
45
+ }, words.map((word, i) => /* @__PURE__ */ React.createElement("div", {
46
+ key: i,
47
+ className: "flex items-center p-2 gap-2"
48
+ }, /* @__PURE__ */ React.createElement("div", {
49
+ className: "w-4 text-xs text-center text-subdued"
50
+ }, i + 1), /* @__PURE__ */ React.createElement("div", {
51
+ className: "text-sm"
52
+ }, word)))));
53
+ };
54
+
55
+ // src/containers/RecoveryCodeDialog/index.ts
56
+ var RecoveryCodeDialog_default = RecoveryCodeDialog;
57
+ export {
58
+ RecoveryCodeDialog,
59
+ RecoveryCodeDialog_default as default
60
+ };
61
+ //# sourceMappingURL=RecoveryCodeDialog-YIRGXM7N.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx", "../../../src/containers/RecoveryCodeDialog/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useState } from 'react';\n\nimport { AlertDialog, Button, Clipboard, Input, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../../meta';\n\nexport type RecoveryCodeDialogProps = {\n code: string;\n};\n\n// TODO(burdon): Should have cancel button.\nexport const RecoveryCodeDialog = ({ code }: RecoveryCodeDialogProps) => {\n const { t } = useTranslation(meta.id);\n const [confirmation, setConfirmation] = useState(false);\n\n const handleConfirmation = useCallback((checked: boolean) => setConfirmation(checked), []);\n\n return (\n <AlertDialog.Content size='md' classNames='min-h-[15rem]'>\n <AlertDialog.Body>\n <AlertDialog.Title>{t('recovery code dialog title')}</AlertDialog.Title>\n <p className='py-4'>{t('recovery code dialog description')}</p>\n <Clipboard.Provider>\n <Code code={code} />\n </Clipboard.Provider>\n <div className='flex flex-col py-4 gap-2'>\n <p>{t('recovery code dialog warning 1')}</p>\n <p>{t('recovery code dialog warning 2')}</p>\n </div>\n <div className='flex items-center gap-2 pb-4'>\n <Input.Root>\n <Input.Checkbox\n data-testid='recoveryCode.confirm'\n checked={confirmation}\n onCheckedChange={handleConfirmation}\n />\n <Input.Label>{t('recovery code confirmation label')}</Input.Label>\n </Input.Root>\n </div>\n </AlertDialog.Body>\n <AlertDialog.ActionBar>\n <AlertDialog.Action asChild>\n <Button data-testid='recoveryCode.continue' variant='primary' disabled={!confirmation}>\n {t('continue label')}\n </Button>\n </AlertDialog.Action>\n </AlertDialog.ActionBar>\n </AlertDialog.Content>\n );\n};\n\nconst Code = ({ code }: { code: string }) => {\n const words = code.split(' ');\n return (\n <div className='relative p-2 border border-separator rounded-sm group'>\n <Clipboard.IconButton value={code} classNames='absolute top-2 right-2 invisible group-hover:visible' />\n <div className='grid grid-cols-4'>\n {words.map((word, i) => (\n <div key={i} className='flex items-center p-2 gap-2'>\n <div className='w-4 text-xs text-center text-subdued'>{i + 1}</div>\n <div className='text-sm'>{word}</div>\n </div>\n ))}\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { RecoveryCodeDialog } from './RecoveryCodeDialog';\n\nexport * from './RecoveryCodeDialog';\nexport default RecoveryCodeDialog;\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,SAASC,aAAaC,gBAAgB;AAE7C,SAASC,aAAaC,QAAQC,WAAWC,OAAOC,sBAAsB;AAS/D,IAAMC,qBAAqB,CAAC,EAAEC,KAAI,MAA2B;AAClE,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAM,CAACC,cAAcC,eAAAA,IAAmBC,SAAS,KAAA;AAEjD,QAAMC,qBAAqBC,YAAY,CAACC,YAAqBJ,gBAAgBI,OAAAA,GAAU,CAAA,CAAE;AAEzF,SACE,sBAAA,cAACC,YAAYC,SAAO;IAACC,MAAK;IAAKC,YAAW;KACxC,sBAAA,cAACH,YAAYI,MAAI,MACf,sBAAA,cAACJ,YAAYK,OAAK,MAAEf,EAAE,4BAAA,CAAA,GACtB,sBAAA,cAACgB,KAAAA;IAAEC,WAAU;KAAQjB,EAAE,kCAAA,CAAA,GACvB,sBAAA,cAACkB,UAAUC,UAAQ,MACjB,sBAAA,cAACC,MAAAA;IAAKrB;OAER,sBAAA,cAACsB,OAAAA;IAAIJ,WAAU;KACb,sBAAA,cAACD,KAAAA,MAAGhB,EAAE,gCAAA,CAAA,GACN,sBAAA,cAACgB,KAAAA,MAAGhB,EAAE,gCAAA,CAAA,CAAA,GAER,sBAAA,cAACqB,OAAAA;IAAIJ,WAAU;KACb,sBAAA,cAACK,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,UAAQ;IACbC,eAAY;IACZhB,SAASL;IACTsB,iBAAiBnB;MAEnB,sBAAA,cAACe,MAAMK,OAAK,MAAE3B,EAAE,kCAAA,CAAA,CAAA,CAAA,CAAA,GAItB,sBAAA,cAACU,YAAYkB,WAAS,MACpB,sBAAA,cAAClB,YAAYmB,QAAM;IAACC,SAAAA;KAClB,sBAAA,cAACC,QAAAA;IAAON,eAAY;IAAwBO,SAAQ;IAAUC,UAAU,CAAC7B;KACtEJ,EAAE,gBAAA,CAAA,CAAA,CAAA,CAAA;AAMf;AAEA,IAAMoB,OAAO,CAAC,EAAErB,KAAI,MAAoB;AACtC,QAAMmC,QAAQnC,KAAKoC,MAAM,GAAA;AACzB,SACE,sBAAA,cAACd,OAAAA;IAAIJ,WAAU;KACb,sBAAA,cAACC,UAAUkB,YAAU;IAACC,OAAOtC;IAAMc,YAAW;MAC9C,sBAAA,cAACQ,OAAAA;IAAIJ,WAAU;KACZiB,MAAMI,IAAI,CAACC,MAAMC,MAChB,sBAAA,cAACnB,OAAAA;IAAIoB,KAAKD;IAAGvB,WAAU;KACrB,sBAAA,cAACI,OAAAA;IAAIJ,WAAU;KAAwCuB,IAAI,CAAA,GAC3D,sBAAA,cAACnB,OAAAA;IAAIJ,WAAU;KAAWsB,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAMtC;;;AC/DA,IAAA,6BAAeG;",
6
+ "names": ["React", "useCallback", "useState", "AlertDialog", "Button", "Clipboard", "Input", "useTranslation", "RecoveryCodeDialog", "code", "t", "useTranslation", "meta", "id", "confirmation", "setConfirmation", "useState", "handleConfirmation", "useCallback", "checked", "AlertDialog", "Content", "size", "classNames", "Body", "Title", "p", "className", "Clipboard", "Provider", "Code", "div", "Input", "Root", "Checkbox", "data-testid", "onCheckedChange", "Label", "ActionBar", "Action", "asChild", "Button", "variant", "disabled", "words", "split", "IconButton", "value", "map", "word", "i", "key", "RecoveryCodeDialog"]
7
+ }
@@ -0,0 +1,58 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ ClientOperation
4
+ } from "./chunk-DT2ZNOGU.mjs";
5
+ import {
6
+ meta
7
+ } from "./chunk-BOTJSPCT.mjs";
8
+
9
+ // src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx
10
+ import React from "react";
11
+ import { useOperationInvoker } from "@dxos/app-framework/ui";
12
+ import { useCredentials } from "@dxos/react-client/halo";
13
+ import { Icon, IconButton, List, ListItem, Message, useTranslation } from "@dxos/react-ui";
14
+ import { Settings } from "@dxos/react-ui-form";
15
+ var MANAGE_CREDENTIALS_DIALOG = `${meta.id}.ManageCredentialsDialog`;
16
+ var RecoveryCredentialsContainer = () => {
17
+ const { t } = useTranslation(meta.id);
18
+ const { invokePromise } = useOperationInvoker();
19
+ const credentials = useCredentials();
20
+ const recoveryCredentials = credentials.filter((credential) => credential.subject.assertion["@type"] === "dxos.halo.credentials.IdentityRecovery");
21
+ return /* @__PURE__ */ React.createElement(Settings.Root, null, /* @__PURE__ */ React.createElement(Settings.Section, {
22
+ title: t("recovery setup dialog title"),
23
+ description: t("recovery setup dialog description")
24
+ }, /* @__PURE__ */ React.createElement(Settings.Group, null, /* @__PURE__ */ React.createElement(Settings.Item, {
25
+ title: t("create passkey label"),
26
+ description: t("create passkey description")
27
+ }, /* @__PURE__ */ React.createElement(IconButton, {
28
+ label: t("create passkey label"),
29
+ icon: "ph--key--duotone",
30
+ variant: "primary",
31
+ onClick: () => invokePromise(ClientOperation.CreatePasskey)
32
+ })), /* @__PURE__ */ React.createElement(Settings.Item, {
33
+ title: t("create recovery code label"),
34
+ description: t("create recovery code description")
35
+ }, /* @__PURE__ */ React.createElement(IconButton, {
36
+ label: t("create recovery code label"),
37
+ icon: "ph--receipt--duotone",
38
+ variant: "default",
39
+ onClick: () => invokePromise(ClientOperation.CreateRecoveryCode)
40
+ })))), /* @__PURE__ */ React.createElement(Settings.Section, {
41
+ title: t("credentials list label")
42
+ }, recoveryCredentials.length < 1 ? /* @__PURE__ */ React.createElement(Message.Root, {
43
+ valence: "error"
44
+ }, /* @__PURE__ */ React.createElement(Message.Title, {
45
+ icon: "ph--shield-warning--duotone"
46
+ }, t("no credentials title")), /* @__PURE__ */ React.createElement(Message.Content, null, t("no credentials message"))) : /* @__PURE__ */ React.createElement(List, null, recoveryCredentials.map((credential) => /* @__PURE__ */ React.createElement(ListItem.Root, {
47
+ key: credential.id?.toHex()
48
+ }, /* @__PURE__ */ React.createElement(ListItem.Endcap, null, /* @__PURE__ */ React.createElement(Icon, {
49
+ icon: "ph--key--regular"
50
+ })), /* @__PURE__ */ React.createElement(ListItem.Heading, null, credential.issuanceDate.toLocaleString()))))));
51
+ };
52
+
53
+ // src/containers/RecoveryCredentialsContainer/index.ts
54
+ var RecoveryCredentialsContainer_default = RecoveryCredentialsContainer;
55
+ export {
56
+ RecoveryCredentialsContainer_default as default
57
+ };
58
+ //# sourceMappingURL=RecoveryCredentialsContainer-MVJEFNXX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx", "../../../src/containers/RecoveryCredentialsContainer/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { useCredentials } from '@dxos/react-client/halo';\nimport { Icon, IconButton, List, ListItem, Message, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\n\nimport { meta } from '../../meta';\nimport { ClientOperation } from '../../types';\n\nexport const MANAGE_CREDENTIALS_DIALOG = `${meta.id}.ManageCredentialsDialog`;\n\nexport const RecoveryCredentialsContainer = () => {\n const { t } = useTranslation(meta.id);\n const { invokePromise } = useOperationInvoker();\n const credentials = useCredentials();\n const recoveryCredentials = credentials.filter(\n (credential) => credential.subject.assertion['@type'] === 'dxos.halo.credentials.IdentityRecovery',\n );\n\n return (\n <Settings.Root>\n <Settings.Section title={t('recovery setup dialog title')} description={t('recovery setup dialog description')}>\n <Settings.Group>\n <Settings.Item title={t('create passkey label')} description={t('create passkey description')}>\n <IconButton\n label={t('create passkey label')}\n icon='ph--key--duotone'\n variant='primary'\n onClick={() => invokePromise(ClientOperation.CreatePasskey)}\n />\n </Settings.Item>\n <Settings.Item title={t('create recovery code label')} description={t('create recovery code description')}>\n <IconButton\n label={t('create recovery code label')}\n icon='ph--receipt--duotone'\n variant='default'\n onClick={() => invokePromise(ClientOperation.CreateRecoveryCode)}\n />\n </Settings.Item>\n </Settings.Group>\n </Settings.Section>\n <Settings.Section title={t('credentials list label')}>\n {recoveryCredentials.length < 1 ? (\n <Message.Root valence='error'>\n <Message.Title icon='ph--shield-warning--duotone'>{t('no credentials title')}</Message.Title>\n <Message.Content>{t('no credentials message')}</Message.Content>\n </Message.Root>\n ) : (\n <List>\n {recoveryCredentials.map((credential) => (\n <ListItem.Root key={credential.id?.toHex()}>\n <ListItem.Endcap>\n <Icon icon='ph--key--regular' />\n </ListItem.Endcap>\n <ListItem.Heading>{credential.issuanceDate.toLocaleString()}</ListItem.Heading>\n </ListItem.Root>\n ))}\n </List>\n )}\n </Settings.Section>\n </Settings.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { RecoveryCredentialsContainer } from './RecoveryCredentialsContainer';\n\nexport default RecoveryCredentialsContainer;\n"],
5
+ "mappings": ";;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,2BAA2B;AACpC,SAASC,sBAAsB;AAC/B,SAASC,MAAMC,YAAYC,MAAMC,UAAUC,SAASC,sBAAsB;AAC1E,SAASC,gBAAgB;AAKlB,IAAMC,4BAA4B,GAAGC,KAAKC,EAAE;AAE5C,IAAMC,+BAA+B,MAAA;AAC1C,QAAM,EAAEC,EAAC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A;IAAKjB,MAAK;OAEb,sBAAA,cAACa,SAASK,SAAO,MAAE9B,WAAW+B,aAAaC,eAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAQzE;;;AC7DA,IAAA,uCAAeC;",
6
+ "names": ["React", "useOperationInvoker", "useCredentials", "Icon", "IconButton", "List", "ListItem", "Message", "useTranslation", "Settings", "MANAGE_CREDENTIALS_DIALOG", "meta", "id", "RecoveryCredentialsContainer", "t", "useTranslation", "invokePromise", "useOperationInvoker", "credentials", "useCredentials", "recoveryCredentials", "filter", "credential", "subject", "assertion", "Settings", "Root", "Section", "title", "description", "Group", "Item", "IconButton", "label", "icon", "variant", "onClick", "ClientOperation", "CreatePasskey", "CreateRecoveryCode", "length", "Message", "valence", "Title", "Content", "List", "map", "ListItem", "key", "toHex", "Endcap", "Icon", "Heading", "issuanceDate", "toLocaleString", "RecoveryCredentialsContainer"]
7
+ }
@@ -0,0 +1,54 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/containers/ResetDialog/ResetDialog.tsx
4
+ import * as Effect from "effect/Effect";
5
+ import React, { useCallback } from "react";
6
+ import { Capability } from "@dxos/app-framework";
7
+ import { useOperationInvoker } from "@dxos/app-framework/ui";
8
+ import { LayoutOperation } from "@dxos/app-toolkit";
9
+ import { runAndForwardErrors } from "@dxos/effect";
10
+ import { useClient } from "@dxos/react-client";
11
+ import { Dialog, useTranslation } from "@dxos/react-ui";
12
+ import { ConfirmReset, translationKey } from "@dxos/shell/react";
13
+ var ResetDialog = ({ mode, onReset, capabilityManager }) => {
14
+ const { t } = useTranslation(translationKey);
15
+ const { invokePromise } = useOperationInvoker();
16
+ const client = useClient();
17
+ const handleReset = useCallback(async () => {
18
+ await client.reset();
19
+ const target = mode === "join new identity" ? "deviceInvitation" : mode === "recover" ? "recoverIdentity" : void 0;
20
+ if (onReset) {
21
+ await runAndForwardErrors(onReset({
22
+ target
23
+ }).pipe(Effect.provideService(Capability.Service, capabilityManager)));
24
+ }
25
+ }, [
26
+ client,
27
+ mode,
28
+ onReset,
29
+ capabilityManager
30
+ ]);
31
+ const handleCancel = useCallback(() => {
32
+ void invokePromise(LayoutOperation.UpdateDialog, {
33
+ state: false
34
+ });
35
+ }, [
36
+ invokePromise
37
+ ]);
38
+ return /* @__PURE__ */ React.createElement(Dialog.Content, null, /* @__PURE__ */ React.createElement(Dialog.Header, null, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("reset dialog title"))), /* @__PURE__ */ React.createElement(Dialog.Description, {
39
+ classNames: "sr-only"
40
+ }, t("reset dialog description")), /* @__PURE__ */ React.createElement(ConfirmReset, {
41
+ active: true,
42
+ mode,
43
+ onConfirm: handleReset,
44
+ onCancel: handleCancel
45
+ }));
46
+ };
47
+
48
+ // src/containers/ResetDialog/index.ts
49
+ var ResetDialog_default = ResetDialog;
50
+ export {
51
+ ResetDialog,
52
+ ResetDialog_default as default
53
+ };
54
+ //# sourceMappingURL=ResetDialog-GGBWSQZO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/ResetDialog/ResetDialog.tsx", "../../../src/containers/ResetDialog/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback } from 'react';\n\nimport { Capability, type CapabilityManager } from '@dxos/app-framework';\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { useClient } from '@dxos/react-client';\nimport { Dialog, useTranslation } from '@dxos/react-ui';\nimport { ConfirmReset, type ConfirmResetProps, translationKey } from '@dxos/shell/react';\n\nimport { type ClientPluginOptions } from '../../types';\n\nexport type ResetDialogProps = Pick<ConfirmResetProps, 'mode'> &\n Pick<ClientPluginOptions, 'onReset'> & {\n capabilityManager: CapabilityManager.CapabilityManager;\n };\n\nexport const ResetDialog = ({ mode, onReset, capabilityManager }: ResetDialogProps) => {\n const { t } = useTranslation(translationKey);\n const { invokePromise } = useOperationInvoker();\n const client = useClient();\n\n const handleReset = useCallback(async () => {\n await client.reset();\n const target =\n mode === 'join new identity' ? 'deviceInvitation' : mode === 'recover' ? 'recoverIdentity' : undefined;\n if (onReset) {\n await runAndForwardErrors(onReset({ target }).pipe(Effect.provideService(Capability.Service, capabilityManager)));\n }\n }, [client, mode, onReset, capabilityManager]);\n\n const handleCancel = useCallback(() => {\n void invokePromise(LayoutOperation.UpdateDialog, { state: false });\n }, [invokePromise]);\n\n return (\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>{t('reset dialog title')}</Dialog.Title>\n </Dialog.Header>\n <Dialog.Description classNames='sr-only'>{t('reset dialog description')}</Dialog.Description>\n <ConfirmReset active mode={mode} onConfirm={handleReset} onCancel={handleCancel} />\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ResetDialog } from './ResetDialog';\n\nexport * from './ResetDialog';\nexport default ResetDialog;\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,kBAA0C;AACnD,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,2BAA2B;AACpC,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,sBAAsB;AACvC,SAASC,cAAsCC,sBAAsB;AAS9D,IAAMC,cAAc,CAAC,EAAEC,MAAMC,SAASC,kBAAiB,MAAoB;AAChF,QAAM,EAAEC,EAAC,IAAKC,eAAeC,cAAAA;AAC7B,QAAM,EAAEC,cAAa,IAAKC,oBAAAA;AAC1B,QAAMC,SAASC,UAAAA;AAEf,QAAMC,cAAcC,YAAY,YAAA;AAC9B,UAAMH,OAAOI,MAAK;AAClB,UAAMC,SACJb,SAAS,sBAAsB,qBAAqBA,SAAS,YAAY,oBAAoBc;AAC/F,QAAIb,SAAS;AACX,YAAMc,oBAAoBd,QAAQ;QAAEY;MAAO,CAAA,EAAGG,KAAYC,sBAAeC,WAAWC,SAASjB,iBAAAA,CAAAA,CAAAA;IAC/F;EACF,GAAG;IAACM;IAAQR;IAAMC;IAASC;GAAkB;AAE7C,QAAMkB,eAAeT,YAAY,MAAA;AAC/B,SAAKL,cAAce,gBAAgBC,cAAc;MAAEC,OAAO;IAAM,CAAA;EAClE,GAAG;IAACjB;GAAc;AAElB,SACE,sBAAA,cAACkB,OAAOC,SAAO,MACb,sBAAA,cAACD,OAAOE,QAAM,MACZ,sBAAA,cAACF,OAAOG,OAAK,MAAExB,EAAE,oBAAA,CAAA,CAAA,GAEnB,sBAAA,cAACqB,OAAOI,aAAW;IAACC,YAAW;KAAW1B,EAAE,0BAAA,CAAA,GAC5C,sBAAA,cAAC2B,cAAAA;IAAaC,QAAAA;IAAO/B;IAAYgC,WAAWtB;IAAauB,UAAUb;;AAGzE;;;AC1CA,IAAA,sBAAec;",
6
+ "names": ["Effect", "React", "useCallback", "Capability", "useOperationInvoker", "LayoutOperation", "runAndForwardErrors", "useClient", "Dialog", "useTranslation", "ConfirmReset", "translationKey", "ResetDialog", "mode", "onReset", "capabilityManager", "t", "useTranslation", "translationKey", "invokePromise", "useOperationInvoker", "client", "useClient", "handleReset", "useCallback", "reset", "target", "undefined", "runAndForwardErrors", "pipe", "provideService", "Capability", "Service", "handleCancel", "LayoutOperation", "UpdateDialog", "state", "Dialog", "Content", "Header", "Title", "Description", "classNames", "ConfirmReset", "active", "onConfirm", "onCancel", "ResetDialog"]
7
+ }
@@ -2,13 +2,16 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  Account,
4
4
  ClientCapabilities,
5
- ClientOperation,
5
+ ClientOperation
6
+ } from "./chunk-DT2ZNOGU.mjs";
7
+ import {
6
8
  meta
7
- } from "./chunk-JAF64TFQ.mjs";
9
+ } from "./chunk-BOTJSPCT.mjs";
8
10
 
9
11
  // src/capabilities/app-graph-builder/app-graph-builder.ts
10
12
  import * as Effect from "effect/Effect";
11
- import { Capability, Common } from "@dxos/app-framework";
13
+ import { Capability } from "@dxos/app-framework";
14
+ import { AppCapabilities } from "@dxos/app-toolkit";
12
15
  import { Operation } from "@dxos/operation";
13
16
  import { CreateAtom, GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
14
17
  import { ConnectionState } from "@dxos/react-client/mesh";
@@ -18,7 +21,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
18
21
  match: NodeMatcher.whenRoot,
19
22
  actions: () => Effect.succeed([
20
23
  {
21
- id: `${meta.id}/open-user-account`,
24
+ id: `${meta.id}.open-user-account`,
22
25
  data: () => Operation.invoke(ClientOperation.ShareIdentity),
23
26
  properties: {
24
27
  label: [
@@ -111,9 +114,9 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
111
114
  ];
112
115
  })
113
116
  });
114
- return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
117
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
115
118
  }));
116
119
  export {
117
120
  app_graph_builder_default as default
118
121
  };
119
- //# sourceMappingURL=app-graph-builder-2PIYVUNC.mjs.map
122
+ //# sourceMappingURL=app-graph-builder-PTNZ46NN.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/operation';\nimport { CreateAtom, GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { meta } from '../../meta';\nimport { Account, ClientCapabilities, ClientOperation } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n {\n id: `${meta.id}.open-user-account`,\n data: () => Operation.invoke(ClientOperation.ShareIdentity),\n properties: {\n label: ['open user account label', { ns: meta.id }],\n icon: 'ph--user--regular',\n disposition: 'menu',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ]),\n connector: Effect.fnUntraced(function* (node, get) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identity = get(CreateAtom.fromObservable(client.halo.identity));\n const status = get(CreateAtom.fromObservable(client.mesh.networkStatus));\n\n return [\n {\n id: Account.id,\n type: meta.id,\n properties: {\n label: ['account label', { ns: meta.id }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n testId: 'clientPlugin.account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: meta.id,\n properties: {\n label: ['profile label', { ns: meta.id }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: meta.id,\n properties: {\n label: ['devices label', { ns: meta.id }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: meta.id,\n properties: {\n label: ['security label', { ns: meta.id }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n }),\n });\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,cAAcC,mBAAmB;AACtD,SAASC,uBAAuB;AAKh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AMlC,KAAKD;cACXY,YAAY;gBACVC,OAAO;kBAAC;kBAAiB;oBAAEC,IAAIb,KAAKD;kBAAG;;gBACvCe,MAAM;gBACNqB,QAAQ;cACV;YACF;YACA;cACEpC,IAAIkC,QAAQe;cACZ1C,MAAM2B,QAAQe;cACdd,MAAMlC,KAAKD;cACXY,YAAY;gBACVC,OAAO;kBAAC;kBAAkB;oBAAEC,IAAIb,KAAKD;kBAAG;;gBACxCe,MAAM;cACR;YACF;;QAEJ;;IAEJ,CAAA;EACF,CAAA;AAEA,SAAOrB,WAAWwD,YAAYC,gBAAgBC,iBAAiBvD,UAAAA;AACjE,CAAA,CAAA;",
6
+ "names": ["Effect", "Capability", "AppCapabilities", "Operation", "CreateAtom", "GraphBuilder", "NodeMatcher", "ConnectionState", "Capability", "makeModule", "fnUntraced", "extensions", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenRoot", "actions", "succeed", "data", "Operation", "invoke", "ClientOperation", "ShareIdentity", "properties", "label", "ns", "icon", "disposition", "keyBinding", "macos", "windows", "linux", "connector", "node", "get", "client", "ClientCapabilities", "Client", "identity", "CreateAtom", "fromObservable", "halo", "status", "mesh", "networkStatus", "Account", "type", "testId", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "Security", "contributes", "AppCapabilities", "AppGraphBuilder"]
7
+ }
@@ -0,0 +1,17 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+
3
+ // src/meta.ts
4
+ import { trim } from "@dxos/util";
5
+ var meta = {
6
+ id: "org.dxos.plugin.client",
7
+ name: "Client",
8
+ description: trim`
9
+ Core client connectivity and peer-to-peer networking infrastructure.
10
+ Manages identity, authentication, and real-time synchronization across devices.
11
+ `
12
+ };
13
+
14
+ export {
15
+ meta
16
+ };
17
+ //# sourceMappingURL=chunk-BOTJSPCT.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.client',\n name: 'Client',\n description: trim`\n Core client connectivity and peer-to-peer networking infrastructure.\n Manages identity, authentication, and real-time synchronization across devices.\n `,\n};\n"],
5
+ "mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;",
6
+ "names": ["trim", "meta", "id", "name", "description", "trim"]
7
+ }
@@ -1,35 +1,25 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ meta
4
+ } from "./chunk-BOTJSPCT.mjs";
2
5
 
3
6
  // src/types/capabilities.ts
4
7
  import { Capability } from "@dxos/app-framework";
5
-
6
- // src/meta.ts
7
- import { trim } from "@dxos/util";
8
- var meta = {
9
- id: "dxos.org/plugin/client",
10
- name: "Client",
11
- description: trim`
12
- Core client connectivity and peer-to-peer networking infrastructure.
13
- Manages identity, authentication, and real-time synchronization across devices.
14
- `
15
- };
16
-
17
- // src/types/capabilities.ts
18
8
  (function(ClientCapabilities2) {
19
- ClientCapabilities2.Client = Capability.make(`${meta.id}/capability/client`);
20
- ClientCapabilities2.Schema = Capability.make(`${meta.id}/capability/schema`);
21
- ClientCapabilities2.Migration = Capability.make(`${meta.id}/capability/migration`);
9
+ ClientCapabilities2.Client = Capability.make(`${meta.id}.capability.client`);
10
+ ClientCapabilities2.Schema = Capability.make(`${meta.id}.capability.schema`);
11
+ ClientCapabilities2.Migration = Capability.make(`${meta.id}.capability.migration`);
22
12
  })(ClientCapabilities || (ClientCapabilities = {}));
23
13
  var ClientCapabilities;
24
14
 
25
15
  // src/types/events.ts
26
16
  import { ActivationEvent } from "@dxos/app-framework";
27
17
  (function(ClientEvents2) {
28
- ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}/event/client-ready`);
29
- ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}/event/setup-schema`);
30
- ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}/event/setup-migration`);
31
- ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}/event/identity-created`);
32
- ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}/event/spaces-ready`);
18
+ ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);
19
+ ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);
20
+ ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);
21
+ ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);
22
+ ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);
33
23
  })(ClientEvents || (ClientEvents = {}));
34
24
  var ClientEvents;
35
25
 
@@ -59,13 +49,13 @@ var IdentitySchema = Schema.Struct({
59
49
  value: Schema.Any
60
50
  }))
61
51
  });
62
- class CreateIdentity extends Schema.TaggedClass()(`${meta.id}/action/create-identity`, {
52
+ class CreateIdentity extends Schema.TaggedClass()(`${meta.id}.action.create-identity`, {
63
53
  input: ProfileSchema,
64
54
  output: IdentitySchema
65
55
  }) {
66
56
  }
67
57
  ClientAction2.CreateIdentity = CreateIdentity;
68
- class JoinIdentity extends Schema.TaggedClass()(`${meta.id}/action/join-identity`, {
58
+ class JoinIdentity extends Schema.TaggedClass()(`${meta.id}.action.join-identity`, {
69
59
  input: Schema.Struct({
70
60
  invitationCode: Schema.optional(Schema.String)
71
61
  }),
@@ -73,19 +63,19 @@ var IdentitySchema = Schema.Struct({
73
63
  }) {
74
64
  }
75
65
  ClientAction2.JoinIdentity = JoinIdentity;
76
- class ShareIdentity extends Schema.TaggedClass()(`${meta.id}/action/share-identity`, {
66
+ class ShareIdentity extends Schema.TaggedClass()(`${meta.id}.action.share-identity`, {
77
67
  input: Schema.Void,
78
68
  output: Schema.Void
79
69
  }) {
80
70
  }
81
71
  ClientAction2.ShareIdentity = ShareIdentity;
82
- class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}/action/recover-identity`, {
72
+ class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}.action.recover-identity`, {
83
73
  input: Schema.Void,
84
74
  output: Schema.Void
85
75
  }) {
86
76
  }
87
77
  ClientAction2.RecoverIdentity = RecoverIdentity;
88
- class ResetStorage extends Schema.TaggedClass()(`${meta.id}/action/reset-storage`, {
78
+ class ResetStorage extends Schema.TaggedClass()(`${meta.id}.action.reset-storage`, {
89
79
  input: Schema.Struct({
90
80
  mode: Schema.optional(Schema.String)
91
81
  }),
@@ -93,31 +83,31 @@ var IdentitySchema = Schema.Struct({
93
83
  }) {
94
84
  }
95
85
  ClientAction2.ResetStorage = ResetStorage;
96
- class CreateAgent extends Schema.TaggedClass()(`${meta.id}/action/create-agent`, {
86
+ class CreateAgent extends Schema.TaggedClass()(`${meta.id}.action.create-agent`, {
97
87
  input: Schema.Void,
98
88
  output: Schema.Void
99
89
  }) {
100
90
  }
101
91
  ClientAction2.CreateAgent = CreateAgent;
102
- class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}/action/create-recovery-code`, {
92
+ class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}.action.create-recovery-code`, {
103
93
  input: Schema.Void,
104
94
  output: Schema.Void
105
95
  }) {
106
96
  }
107
97
  ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
108
- class CreatePasskey extends Schema.TaggedClass()(`${meta.id}/action/create-passkey`, {
98
+ class CreatePasskey extends Schema.TaggedClass()(`${meta.id}.action.create-passkey`, {
109
99
  input: Schema.Void,
110
100
  output: Schema.Void
111
101
  }) {
112
102
  }
113
103
  ClientAction2.CreatePasskey = CreatePasskey;
114
- class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}/action/redeem-passkey`, {
104
+ class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}.action.redeem-passkey`, {
115
105
  input: Schema.Void,
116
106
  output: Schema.Void
117
107
  }) {
118
108
  }
119
109
  ClientAction2.RedeemPasskey = RedeemPasskey;
120
- class RedeemToken extends Schema.TaggedClass()(`${meta.id}/action/redeem-token`, {
110
+ class RedeemToken extends Schema.TaggedClass()(`${meta.id}.action.redeem-token`, {
121
111
  input: Schema.Struct({
122
112
  token: Schema.String
123
113
  }),
@@ -126,7 +116,7 @@ var IdentitySchema = Schema.Struct({
126
116
  }
127
117
  ClientAction2.RedeemToken = RedeemToken;
128
118
  })(ClientAction || (ClientAction = {}));
129
- var CLIENT_OPERATION = `${meta.id}/operation`;
119
+ var CLIENT_OPERATION = `${meta.id}.operation`;
130
120
  (function(ClientOperation2) {
131
121
  const ProfileSchema = Schema.Struct({
132
122
  displayName: Schema.optional(Schema.String),
@@ -138,7 +128,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
138
128
  });
139
129
  ClientOperation2.CreateIdentity = Operation.make({
140
130
  meta: {
141
- key: `${CLIENT_OPERATION}/create-identity`,
131
+ key: `${CLIENT_OPERATION}.create-identity`,
142
132
  name: "Create Identity"
143
133
  },
144
134
  services: [
@@ -151,7 +141,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
151
141
  });
152
142
  ClientOperation2.JoinIdentity = Operation.make({
153
143
  meta: {
154
- key: `${CLIENT_OPERATION}/join-identity`,
144
+ key: `${CLIENT_OPERATION}.join-identity`,
155
145
  name: "Join Identity"
156
146
  },
157
147
  services: [
@@ -166,7 +156,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
166
156
  });
167
157
  ClientOperation2.ShareIdentity = Operation.make({
168
158
  meta: {
169
- key: `${CLIENT_OPERATION}/share-identity`,
159
+ key: `${CLIENT_OPERATION}.share-identity`,
170
160
  name: "Share Identity"
171
161
  },
172
162
  services: [
@@ -179,7 +169,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
179
169
  });
180
170
  ClientOperation2.RecoverIdentity = Operation.make({
181
171
  meta: {
182
- key: `${CLIENT_OPERATION}/recover-identity`,
172
+ key: `${CLIENT_OPERATION}.recover-identity`,
183
173
  name: "Recover Identity"
184
174
  },
185
175
  services: [
@@ -192,7 +182,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
192
182
  });
193
183
  ClientOperation2.ResetStorage = Operation.make({
194
184
  meta: {
195
- key: `${CLIENT_OPERATION}/reset-storage`,
185
+ key: `${CLIENT_OPERATION}.reset-storage`,
196
186
  name: "Reset Storage"
197
187
  },
198
188
  services: [
@@ -207,7 +197,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
207
197
  });
208
198
  ClientOperation2.CreateAgent = Operation.make({
209
199
  meta: {
210
- key: `${CLIENT_OPERATION}/create-agent`,
200
+ key: `${CLIENT_OPERATION}.create-agent`,
211
201
  name: "Create Agent"
212
202
  },
213
203
  services: [
@@ -220,7 +210,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
220
210
  });
221
211
  ClientOperation2.CreateRecoveryCode = Operation.make({
222
212
  meta: {
223
- key: `${CLIENT_OPERATION}/create-recovery-code`,
213
+ key: `${CLIENT_OPERATION}.create-recovery-code`,
224
214
  name: "Create Recovery Code"
225
215
  },
226
216
  services: [
@@ -233,7 +223,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
233
223
  });
234
224
  ClientOperation2.CreatePasskey = Operation.make({
235
225
  meta: {
236
- key: `${CLIENT_OPERATION}/create-passkey`,
226
+ key: `${CLIENT_OPERATION}.create-passkey`,
237
227
  name: "Create Passkey"
238
228
  },
239
229
  services: [
@@ -246,7 +236,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
246
236
  });
247
237
  ClientOperation2.RedeemPasskey = Operation.make({
248
238
  meta: {
249
- key: `${CLIENT_OPERATION}/redeem-passkey`,
239
+ key: `${CLIENT_OPERATION}.redeem-passkey`,
250
240
  name: "Redeem Passkey"
251
241
  },
252
242
  services: [
@@ -259,7 +249,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
259
249
  });
260
250
  ClientOperation2.RedeemToken = Operation.make({
261
251
  meta: {
262
- key: `${CLIENT_OPERATION}/redeem-token`,
252
+ key: `${CLIENT_OPERATION}.redeem-token`,
263
253
  name: "Redeem Token"
264
254
  },
265
255
  services: [
@@ -285,11 +275,10 @@ var ClientOperation;
285
275
  var Account;
286
276
 
287
277
  export {
288
- meta,
289
278
  ClientCapabilities,
290
279
  ClientEvents,
291
280
  ClientAction,
292
281
  ClientOperation,
293
282
  Account
294
283
  };
295
- //# sourceMappingURL=chunk-JAF64TFQ.mjs.map
284
+ //# sourceMappingURL=chunk-DT2ZNOGU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type Type } from '@dxos/echo';\n\nimport { meta } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = Capability.make<Client>(`${meta.id}.capability.client`);\n export const Schema = Capability.make<Type.AnyEntity[]>(`${meta.id}.capability.schema`);\n export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}.capability.migration`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace ClientEvents {\n export const ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);\n export const SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);\n export const SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);\n export const IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);\n export const SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client, type ClientOptions, PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '../meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = Schema.Struct({\n identityKey: Schema.instanceOf(PublicKey),\n spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nexport namespace ClientAction {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}.action.create-identity`, {\n input: ProfileSchema,\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}.action.join-identity`, {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}.action.share-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}.action.recover-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}.action.reset-storage`, {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}.action.create-agent`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(\n `${meta.id}.action.create-recovery-code`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}.action.create-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}.action.redeem-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}.action.redeem-token`, {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n }) {}\n}\n\nconst CLIENT_OPERATION = `${meta.id}.operation`;\n\n/**\n * Operations for the Client plugin.\n */\nexport namespace ClientOperation {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export const CreateIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-identity`, name: 'Create Identity' },\n services: [Capability.Service],\n schema: {\n input: ProfileSchema,\n output: IdentitySchema,\n },\n });\n\n export const JoinIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.join-identity`, name: 'Join Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const ShareIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.share-identity`, name: 'Share Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RecoverIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.recover-identity`, name: 'Recover Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const ResetStorage = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.reset-storage`, name: 'Reset Storage' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const CreateAgent = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-agent`, name: 'Create Agent' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreateRecoveryCode = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-recovery-code`, name: 'Create Recovery Code' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreatePasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.create-passkey`, name: 'Create Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemPasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.redeem-passkey`, name: 'Redeem Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemToken = Operation.make({\n meta: { key: `${CLIENT_OPERATION}.redeem-token`, name: 'Redeem Token' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n },\n });\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base origin for the invitation link.\n */\n shareableLinkOrigin?: string;\n\n /**\n * Path for the invitation link.\n */\n invitationPath?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationProp?: string;\n\n /**\n * Run after the client has been initialized.\n * Plugin context is provided so capabilities are accessible.\n */\n onClientInitialized?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when spaces are ready.\n * Plugin context is provided so capabilities are accessible.\n */\n onSpacesReady?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when the client is reset.\n * Plugin context is provided so capabilities are accessible.\n */\n onReset?: (params: { target?: string }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
5
+ "mappings": ";;;;;;AAIA,SAASA,kBAAkB;UAOVC,qBAAAA;sBACFC,SAASC,WAAWC,KAAa,GAAGC,KAAKC,EAAE,oBAAoB;sBAC/DC,SAASJ,WAAWC,KAAuB,GAAGC,KAAKC,EAAE,oBAAoB;sBACzEE,YAAYL,WAAWC,KAAwB,GAAGC,KAAKC,EAAE,uBAAuB;AAC/F,GAJiBL,uBAAAA,qBAAAA,CAAAA,EAAAA;;;;ACPjB,SAASQ,uBAAuB;UAIfC,eAAAA;gBACFC,cAAcC,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEC,cAAcJ,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEE,iBAAiBL,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,wBAAwB;gBACxEG,kBAAkBN,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,yBAAyB;gBAC1EI,cAAcP,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;AACjF,GANiBL,iBAAAA,eAAAA,CAAAA,EAAAA;;;;ACHjB,YAAYU,YAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAA0CC,iBAAiB;AAC3D,SAASC,iBAAiB;AAK1B,IAAMC,iBAAwBC,cAAO;EACnCC,aAAoBC,kBAAWC,SAAAA;EAC/BC,UAAiBC,gBAAgBH,kBAAWC,SAAAA,CAAAA;EAC5CG,SAAgBD,gBACPL,cAAO;IACZO,aAAoBF,gBAAgBG,aAAM;IAC1CC,WAAkBJ,gBAAgBG,aAAM;IACxCE,MAAaL,gBAAgBM,cAAO;MAAEC,KAAYJ;MA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gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaS,cAAcI,UAAUC,KAAK;IACxCpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAiCI,MAAM;IAAe;IACtEC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcrB,cAAO;QACnBmC,OAAc3B;MAChB,CAAA;MACAc,QAAeG;IACjB;EACF,CAAA;AACF,GAtGiBY,oBAAAA,kBAAAA,CAAAA,EAAAA;UA2IAQ,UAAAA;AAEf,QAAMC,MAAM;WAGC1B,KAAK,IAAI0B,GAAAA;WAETC,UAAU,GAAGD,GAAAA;WACbE,UAAU,GAAGF,GAAAA;WACbG,WAAW,GAAGH,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;;;;",
6
+ "names": ["Capability", "ClientCapabilities", "Client", "Capability", "make", "meta", "id", "Schema", "Migration", "ActivationEvent", "ClientEvents", "ClientReady", "ActivationEvent", "make", "meta", "id", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady", "Schema", "Capability", "PublicKey", "Operation", "IdentitySchema", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "ClientAction", "ProfileSchema", "CreateIdentity", "TaggedClass", "meta", "id", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "CLIENT_OPERATION", "ClientOperation", "Operation", "make", "name", "services", "Capability", "Service", "schema", "Account", "_id", "Profile", "Devices", "Security"]
7
+ }
@@ -2,19 +2,19 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
 
3
3
  // src/capabilities/client/index.ts
4
4
  import { Capability } from "@dxos/app-framework";
5
- var Client = Capability.lazy("Client", () => import("./client-FFPK5UFP.mjs"));
5
+ var Client = Capability.lazy("Client", () => import("./client-EGZHGRRC.mjs"));
6
6
 
7
7
  // src/capabilities/operation-resolver/index.ts
8
8
  import { Capability as Capability2 } from "@dxos/app-framework";
9
- var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-VW5R2BE4.mjs"));
9
+ var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-4GWB3YZG.mjs"));
10
10
 
11
11
  // src/capabilities/schema-defs/index.ts
12
12
  import { Capability as Capability3 } from "@dxos/app-framework";
13
- var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-QLRGBIKY.mjs"));
13
+ var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-GXQ47JZN.mjs"));
14
14
 
15
15
  export {
16
16
  Client,
17
17
  OperationResolver,
18
18
  SchemaDefs
19
19
  };
20
- //# sourceMappingURL=chunk-BCELGXRI.mjs.map
20
+ //# sourceMappingURL=chunk-OFJUOKY7.mjs.map
@@ -0,0 +1,16 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ meta
4
+ } from "./chunk-BOTJSPCT.mjs";
5
+
6
+ // src/constants.ts
7
+ var JOIN_DIALOG = `${meta.id}.JoinDialog`;
8
+ var RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;
9
+ var RESET_DIALOG = `${meta.id}.ResetDialog`;
10
+
11
+ export {
12
+ JOIN_DIALOG,
13
+ RECOVERY_CODE_DIALOG,
14
+ RESET_DIALOG
15
+ };
16
+ //# sourceMappingURL=chunk-VLNCZYIC.mjs.map