@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,60 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-JHSBBOCI.mjs";
4
+
5
+ // src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx
6
+ import React, { useCallback, useState } from "react";
7
+ import { AlertDialog, Button, Clipboard, Input, useTranslation } from "@dxos/react-ui";
8
+ var RecoveryCodeDialog = ({ code }) => {
9
+ const { t } = useTranslation(meta.id);
10
+ const [confirmation, setConfirmation] = useState(false);
11
+ const handleConfirmation = useCallback((checked) => setConfirmation(checked), []);
12
+ return /* @__PURE__ */ React.createElement(AlertDialog.Content, {
13
+ size: "md",
14
+ classNames: "min-h-[15rem]"
15
+ }, /* @__PURE__ */ React.createElement(AlertDialog.Body, null, /* @__PURE__ */ React.createElement(AlertDialog.Title, null, t("recovery code dialog title")), /* @__PURE__ */ React.createElement("p", {
16
+ className: "py-4"
17
+ }, t("recovery code dialog description")), /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Code, {
18
+ code
19
+ })), /* @__PURE__ */ React.createElement("div", {
20
+ className: "flex flex-col py-4 gap-2"
21
+ }, /* @__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", {
22
+ className: "flex items-center gap-2 pb-4"
23
+ }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Checkbox, {
24
+ "data-testid": "recoveryCode.confirm",
25
+ checked: confirmation,
26
+ onCheckedChange: handleConfirmation
27
+ }), /* @__PURE__ */ React.createElement(Input.Label, null, t("recovery code confirmation label"))))), /* @__PURE__ */ React.createElement(AlertDialog.ActionBar, null, /* @__PURE__ */ React.createElement(AlertDialog.Action, {
28
+ asChild: true
29
+ }, /* @__PURE__ */ React.createElement(Button, {
30
+ "data-testid": "recoveryCode.continue",
31
+ variant: "primary",
32
+ disabled: !confirmation
33
+ }, t("continue label")))));
34
+ };
35
+ var Code = ({ code }) => {
36
+ const words = code.split(" ");
37
+ return /* @__PURE__ */ React.createElement("div", {
38
+ className: "relative p-2 border border-separator rounded-sm group"
39
+ }, /* @__PURE__ */ React.createElement(Clipboard.IconButton, {
40
+ value: code,
41
+ classNames: "absolute top-2 right-2 invisible group-hover:visible"
42
+ }), /* @__PURE__ */ React.createElement("div", {
43
+ className: "grid grid-cols-4"
44
+ }, words.map((word, i) => /* @__PURE__ */ React.createElement("div", {
45
+ key: i,
46
+ className: "flex items-center p-2 gap-2"
47
+ }, /* @__PURE__ */ React.createElement("div", {
48
+ className: "w-4 text-xs text-center text-subdued"
49
+ }, i + 1), /* @__PURE__ */ React.createElement("div", {
50
+ className: "text-sm"
51
+ }, word)))));
52
+ };
53
+
54
+ // src/containers/RecoveryCodeDialog/index.ts
55
+ var RecoveryCodeDialog_default = RecoveryCodeDialog;
56
+ export {
57
+ RecoveryCodeDialog,
58
+ RecoveryCodeDialog_default as default
59
+ };
60
+ //# sourceMappingURL=RecoveryCodeDialog-WO34OZEJ.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,57 @@
1
+ import {
2
+ ClientOperation
3
+ } from "./chunk-FVEKZBM7.mjs";
4
+ import {
5
+ meta
6
+ } from "./chunk-JHSBBOCI.mjs";
7
+
8
+ // src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx
9
+ import React from "react";
10
+ import { useOperationInvoker } from "@dxos/app-framework/ui";
11
+ import { useCredentials } from "@dxos/react-client/halo";
12
+ import { Icon, IconButton, List, ListItem, Message, useTranslation } from "@dxos/react-ui";
13
+ import { Settings } from "@dxos/react-ui-form";
14
+ var MANAGE_CREDENTIALS_DIALOG = `${meta.id}.ManageCredentialsDialog`;
15
+ var RecoveryCredentialsContainer = () => {
16
+ const { t } = useTranslation(meta.id);
17
+ const { invokePromise } = useOperationInvoker();
18
+ const credentials = useCredentials();
19
+ const recoveryCredentials = credentials.filter((credential) => credential.subject.assertion["@type"] === "dxos.halo.credentials.IdentityRecovery");
20
+ return /* @__PURE__ */ React.createElement(Settings.Root, null, /* @__PURE__ */ React.createElement(Settings.Section, {
21
+ title: t("recovery setup dialog title"),
22
+ description: t("recovery setup dialog description")
23
+ }, /* @__PURE__ */ React.createElement(Settings.Group, null, /* @__PURE__ */ React.createElement(Settings.Item, {
24
+ title: t("create passkey label"),
25
+ description: t("create passkey description")
26
+ }, /* @__PURE__ */ React.createElement(IconButton, {
27
+ label: t("create passkey label"),
28
+ icon: "ph--key--duotone",
29
+ variant: "primary",
30
+ onClick: () => invokePromise(ClientOperation.CreatePasskey)
31
+ })), /* @__PURE__ */ React.createElement(Settings.Item, {
32
+ title: t("create recovery code label"),
33
+ description: t("create recovery code description")
34
+ }, /* @__PURE__ */ React.createElement(IconButton, {
35
+ label: t("create recovery code label"),
36
+ icon: "ph--receipt--duotone",
37
+ variant: "default",
38
+ onClick: () => invokePromise(ClientOperation.CreateRecoveryCode)
39
+ })))), /* @__PURE__ */ React.createElement(Settings.Section, {
40
+ title: t("credentials list label")
41
+ }, recoveryCredentials.length < 1 ? /* @__PURE__ */ React.createElement(Message.Root, {
42
+ valence: "error"
43
+ }, /* @__PURE__ */ React.createElement(Message.Title, {
44
+ icon: "ph--shield-warning--duotone"
45
+ }, 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, {
46
+ key: credential.id?.toHex()
47
+ }, /* @__PURE__ */ React.createElement(ListItem.Endcap, null, /* @__PURE__ */ React.createElement(Icon, {
48
+ icon: "ph--key--regular"
49
+ })), /* @__PURE__ */ React.createElement(ListItem.Heading, null, credential.issuanceDate.toLocaleString()))))));
50
+ };
51
+
52
+ // src/containers/RecoveryCredentialsContainer/index.ts
53
+ var RecoveryCredentialsContainer_default = RecoveryCredentialsContainer;
54
+ export {
55
+ RecoveryCredentialsContainer_default as default
56
+ };
57
+ //# sourceMappingURL=RecoveryCredentialsContainer-G22FSTIX.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,IAAKC,eAAeJ,KAAKC,EAAE;AACpC,QAAM,EAAEI,cAAa,IAAKC,oBAAAA;AAC1B,QAAMC,c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AA,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,52 @@
1
+ // src/containers/ResetDialog/ResetDialog.tsx
2
+ import * as Effect from "effect/Effect";
3
+ import React, { useCallback } from "react";
4
+ import { Capability } from "@dxos/app-framework";
5
+ import { useOperationInvoker } from "@dxos/app-framework/ui";
6
+ import { LayoutOperation } from "@dxos/app-toolkit";
7
+ import { runAndForwardErrors } from "@dxos/effect";
8
+ import { useClient } from "@dxos/react-client";
9
+ import { Dialog, useTranslation } from "@dxos/react-ui";
10
+ import { ConfirmReset, translationKey } from "@dxos/shell/react";
11
+ var ResetDialog = ({ mode, onReset, capabilityManager }) => {
12
+ const { t } = useTranslation(translationKey);
13
+ const { invokePromise } = useOperationInvoker();
14
+ const client = useClient();
15
+ const handleReset = useCallback(async () => {
16
+ await client.reset();
17
+ const target = mode === "join new identity" ? "deviceInvitation" : mode === "recover" ? "recoverIdentity" : void 0;
18
+ if (onReset) {
19
+ await runAndForwardErrors(onReset({
20
+ target
21
+ }).pipe(Effect.provideService(Capability.Service, capabilityManager)));
22
+ }
23
+ }, [
24
+ client,
25
+ mode,
26
+ onReset,
27
+ capabilityManager
28
+ ]);
29
+ const handleCancel = useCallback(() => {
30
+ void invokePromise(LayoutOperation.UpdateDialog, {
31
+ state: false
32
+ });
33
+ }, [
34
+ invokePromise
35
+ ]);
36
+ 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, {
37
+ classNames: "sr-only"
38
+ }, t("reset dialog description")), /* @__PURE__ */ React.createElement(ConfirmReset, {
39
+ active: true,
40
+ mode,
41
+ onConfirm: handleReset,
42
+ onCancel: handleCancel
43
+ }));
44
+ };
45
+
46
+ // src/containers/ResetDialog/index.ts
47
+ var ResetDialog_default = ResetDialog;
48
+ export {
49
+ ResetDialog,
50
+ ResetDialog_default as default
51
+ };
52
+ //# sourceMappingURL=ResetDialog-W24FOWBQ.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
+ }
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  Account,
3
3
  ClientCapabilities,
4
- ClientOperation,
4
+ ClientOperation
5
+ } from "./chunk-FVEKZBM7.mjs";
6
+ import {
5
7
  meta
6
- } from "./chunk-4BZGRIFS.mjs";
8
+ } from "./chunk-JHSBBOCI.mjs";
7
9
 
8
10
  // src/capabilities/app-graph-builder/app-graph-builder.ts
9
11
  import * as Effect from "effect/Effect";
10
- import { Capability, Common } from "@dxos/app-framework";
12
+ import { Capability } from "@dxos/app-framework";
13
+ import { AppCapabilities } from "@dxos/app-toolkit";
11
14
  import { Operation } from "@dxos/operation";
12
15
  import { CreateAtom, GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
13
16
  import { ConnectionState } from "@dxos/react-client/mesh";
@@ -17,7 +20,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
17
20
  match: NodeMatcher.whenRoot,
18
21
  actions: () => Effect.succeed([
19
22
  {
20
- id: `${meta.id}/open-user-account`,
23
+ id: `${meta.id}.open-user-account`,
21
24
  data: () => Operation.invoke(ClientOperation.ShareIdentity),
22
25
  properties: {
23
26
  label: [
@@ -110,9 +113,9 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
110
113
  ];
111
114
  })
112
115
  });
113
- return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
116
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
114
117
  }));
115
118
  export {
116
119
  app_graph_builder_default as default
117
120
  };
118
- //# sourceMappingURL=app-graph-builder-3FGBMLTF.mjs.map
121
+ //# sourceMappingURL=app-graph-builder-GGJKFY3X.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;AAKhC,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOC,aAAaC,gBAAgB;IACrDC,IAAIC,KAAKD;IACTE,OAAOC,YAAYC;IACnBC,SAAS,MACAC,eAAQ;MACb;QACEN,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2B,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
+ }
@@ -1,33 +1,24 @@
1
- // src/types/capabilities.ts
2
- import { Capability } from "@dxos/app-framework";
3
-
4
- // src/meta.ts
5
- import { trim } from "@dxos/util";
6
- var meta = {
7
- id: "dxos.org/plugin/client",
8
- name: "Client",
9
- description: trim`
10
- Core client connectivity and peer-to-peer networking infrastructure.
11
- Manages identity, authentication, and real-time synchronization across devices.
12
- `
13
- };
1
+ import {
2
+ meta
3
+ } from "./chunk-JHSBBOCI.mjs";
14
4
 
15
5
  // src/types/capabilities.ts
6
+ import { Capability } from "@dxos/app-framework";
16
7
  (function(ClientCapabilities2) {
17
- ClientCapabilities2.Client = Capability.make(`${meta.id}/capability/client`);
18
- ClientCapabilities2.Schema = Capability.make(`${meta.id}/capability/schema`);
19
- ClientCapabilities2.Migration = Capability.make(`${meta.id}/capability/migration`);
8
+ ClientCapabilities2.Client = Capability.make(`${meta.id}.capability.client`);
9
+ ClientCapabilities2.Schema = Capability.make(`${meta.id}.capability.schema`);
10
+ ClientCapabilities2.Migration = Capability.make(`${meta.id}.capability.migration`);
20
11
  })(ClientCapabilities || (ClientCapabilities = {}));
21
12
  var ClientCapabilities;
22
13
 
23
14
  // src/types/events.ts
24
15
  import { ActivationEvent } from "@dxos/app-framework";
25
16
  (function(ClientEvents2) {
26
- ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}/event/client-ready`);
27
- ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}/event/setup-schema`);
28
- ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}/event/setup-migration`);
29
- ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}/event/identity-created`);
30
- ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}/event/spaces-ready`);
17
+ ClientEvents2.ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);
18
+ ClientEvents2.SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);
19
+ ClientEvents2.SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);
20
+ ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);
21
+ ClientEvents2.SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);
31
22
  })(ClientEvents || (ClientEvents = {}));
32
23
  var ClientEvents;
33
24
 
@@ -57,13 +48,13 @@ var IdentitySchema = Schema.Struct({
57
48
  value: Schema.Any
58
49
  }))
59
50
  });
60
- class CreateIdentity extends Schema.TaggedClass()(`${meta.id}/action/create-identity`, {
51
+ class CreateIdentity extends Schema.TaggedClass()(`${meta.id}.action.create-identity`, {
61
52
  input: ProfileSchema,
62
53
  output: IdentitySchema
63
54
  }) {
64
55
  }
65
56
  ClientAction2.CreateIdentity = CreateIdentity;
66
- class JoinIdentity extends Schema.TaggedClass()(`${meta.id}/action/join-identity`, {
57
+ class JoinIdentity extends Schema.TaggedClass()(`${meta.id}.action.join-identity`, {
67
58
  input: Schema.Struct({
68
59
  invitationCode: Schema.optional(Schema.String)
69
60
  }),
@@ -71,19 +62,19 @@ var IdentitySchema = Schema.Struct({
71
62
  }) {
72
63
  }
73
64
  ClientAction2.JoinIdentity = JoinIdentity;
74
- class ShareIdentity extends Schema.TaggedClass()(`${meta.id}/action/share-identity`, {
65
+ class ShareIdentity extends Schema.TaggedClass()(`${meta.id}.action.share-identity`, {
75
66
  input: Schema.Void,
76
67
  output: Schema.Void
77
68
  }) {
78
69
  }
79
70
  ClientAction2.ShareIdentity = ShareIdentity;
80
- class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}/action/recover-identity`, {
71
+ class RecoverIdentity extends Schema.TaggedClass()(`${meta.id}.action.recover-identity`, {
81
72
  input: Schema.Void,
82
73
  output: Schema.Void
83
74
  }) {
84
75
  }
85
76
  ClientAction2.RecoverIdentity = RecoverIdentity;
86
- class ResetStorage extends Schema.TaggedClass()(`${meta.id}/action/reset-storage`, {
77
+ class ResetStorage extends Schema.TaggedClass()(`${meta.id}.action.reset-storage`, {
87
78
  input: Schema.Struct({
88
79
  mode: Schema.optional(Schema.String)
89
80
  }),
@@ -91,31 +82,31 @@ var IdentitySchema = Schema.Struct({
91
82
  }) {
92
83
  }
93
84
  ClientAction2.ResetStorage = ResetStorage;
94
- class CreateAgent extends Schema.TaggedClass()(`${meta.id}/action/create-agent`, {
85
+ class CreateAgent extends Schema.TaggedClass()(`${meta.id}.action.create-agent`, {
95
86
  input: Schema.Void,
96
87
  output: Schema.Void
97
88
  }) {
98
89
  }
99
90
  ClientAction2.CreateAgent = CreateAgent;
100
- class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}/action/create-recovery-code`, {
91
+ class CreateRecoveryCode extends Schema.TaggedClass()(`${meta.id}.action.create-recovery-code`, {
101
92
  input: Schema.Void,
102
93
  output: Schema.Void
103
94
  }) {
104
95
  }
105
96
  ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
106
- class CreatePasskey extends Schema.TaggedClass()(`${meta.id}/action/create-passkey`, {
97
+ class CreatePasskey extends Schema.TaggedClass()(`${meta.id}.action.create-passkey`, {
107
98
  input: Schema.Void,
108
99
  output: Schema.Void
109
100
  }) {
110
101
  }
111
102
  ClientAction2.CreatePasskey = CreatePasskey;
112
- class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}/action/redeem-passkey`, {
103
+ class RedeemPasskey extends Schema.TaggedClass()(`${meta.id}.action.redeem-passkey`, {
113
104
  input: Schema.Void,
114
105
  output: Schema.Void
115
106
  }) {
116
107
  }
117
108
  ClientAction2.RedeemPasskey = RedeemPasskey;
118
- class RedeemToken extends Schema.TaggedClass()(`${meta.id}/action/redeem-token`, {
109
+ class RedeemToken extends Schema.TaggedClass()(`${meta.id}.action.redeem-token`, {
119
110
  input: Schema.Struct({
120
111
  token: Schema.String
121
112
  }),
@@ -124,7 +115,7 @@ var IdentitySchema = Schema.Struct({
124
115
  }
125
116
  ClientAction2.RedeemToken = RedeemToken;
126
117
  })(ClientAction || (ClientAction = {}));
127
- var CLIENT_OPERATION = `${meta.id}/operation`;
118
+ var CLIENT_OPERATION = `${meta.id}.operation`;
128
119
  (function(ClientOperation2) {
129
120
  const ProfileSchema = Schema.Struct({
130
121
  displayName: Schema.optional(Schema.String),
@@ -136,7 +127,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
136
127
  });
137
128
  ClientOperation2.CreateIdentity = Operation.make({
138
129
  meta: {
139
- key: `${CLIENT_OPERATION}/create-identity`,
130
+ key: `${CLIENT_OPERATION}.create-identity`,
140
131
  name: "Create Identity"
141
132
  },
142
133
  services: [
@@ -149,7 +140,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
149
140
  });
150
141
  ClientOperation2.JoinIdentity = Operation.make({
151
142
  meta: {
152
- key: `${CLIENT_OPERATION}/join-identity`,
143
+ key: `${CLIENT_OPERATION}.join-identity`,
153
144
  name: "Join Identity"
154
145
  },
155
146
  services: [
@@ -164,7 +155,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
164
155
  });
165
156
  ClientOperation2.ShareIdentity = Operation.make({
166
157
  meta: {
167
- key: `${CLIENT_OPERATION}/share-identity`,
158
+ key: `${CLIENT_OPERATION}.share-identity`,
168
159
  name: "Share Identity"
169
160
  },
170
161
  services: [
@@ -177,7 +168,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
177
168
  });
178
169
  ClientOperation2.RecoverIdentity = Operation.make({
179
170
  meta: {
180
- key: `${CLIENT_OPERATION}/recover-identity`,
171
+ key: `${CLIENT_OPERATION}.recover-identity`,
181
172
  name: "Recover Identity"
182
173
  },
183
174
  services: [
@@ -190,7 +181,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
190
181
  });
191
182
  ClientOperation2.ResetStorage = Operation.make({
192
183
  meta: {
193
- key: `${CLIENT_OPERATION}/reset-storage`,
184
+ key: `${CLIENT_OPERATION}.reset-storage`,
194
185
  name: "Reset Storage"
195
186
  },
196
187
  services: [
@@ -205,7 +196,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
205
196
  });
206
197
  ClientOperation2.CreateAgent = Operation.make({
207
198
  meta: {
208
- key: `${CLIENT_OPERATION}/create-agent`,
199
+ key: `${CLIENT_OPERATION}.create-agent`,
209
200
  name: "Create Agent"
210
201
  },
211
202
  services: [
@@ -218,7 +209,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
218
209
  });
219
210
  ClientOperation2.CreateRecoveryCode = Operation.make({
220
211
  meta: {
221
- key: `${CLIENT_OPERATION}/create-recovery-code`,
212
+ key: `${CLIENT_OPERATION}.create-recovery-code`,
222
213
  name: "Create Recovery Code"
223
214
  },
224
215
  services: [
@@ -231,7 +222,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
231
222
  });
232
223
  ClientOperation2.CreatePasskey = Operation.make({
233
224
  meta: {
234
- key: `${CLIENT_OPERATION}/create-passkey`,
225
+ key: `${CLIENT_OPERATION}.create-passkey`,
235
226
  name: "Create Passkey"
236
227
  },
237
228
  services: [
@@ -244,7 +235,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
244
235
  });
245
236
  ClientOperation2.RedeemPasskey = Operation.make({
246
237
  meta: {
247
- key: `${CLIENT_OPERATION}/redeem-passkey`,
238
+ key: `${CLIENT_OPERATION}.redeem-passkey`,
248
239
  name: "Redeem Passkey"
249
240
  },
250
241
  services: [
@@ -257,7 +248,7 @@ var CLIENT_OPERATION = `${meta.id}/operation`;
257
248
  });
258
249
  ClientOperation2.RedeemToken = Operation.make({
259
250
  meta: {
260
- key: `${CLIENT_OPERATION}/redeem-token`,
251
+ key: `${CLIENT_OPERATION}.redeem-token`,
261
252
  name: "Redeem Token"
262
253
  },
263
254
  services: [
@@ -283,11 +274,10 @@ var ClientOperation;
283
274
  var Account;
284
275
 
285
276
  export {
286
- meta,
287
277
  ClientCapabilities,
288
278
  ClientEvents,
289
279
  ClientAction,
290
280
  ClientOperation,
291
281
  Account
292
282
  };
293
- //# sourceMappingURL=chunk-4BZGRIFS.mjs.map
283
+ //# sourceMappingURL=chunk-FVEKZBM7.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,iBAA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AeG;IACjB;EACF,CAAA;mBAEaO,gBAAgBM,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaQ,gBAAgBK,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,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
+ }
@@ -1,18 +1,18 @@
1
1
  // src/capabilities/client/index.ts
2
2
  import { Capability } from "@dxos/app-framework";
3
- var Client = Capability.lazy("Client", () => import("./client-IX5LMWV4.mjs"));
3
+ var Client = Capability.lazy("Client", () => import("./client-BXCP3EUE.mjs"));
4
4
 
5
5
  // src/capabilities/operation-resolver/index.ts
6
6
  import { Capability as Capability2 } from "@dxos/app-framework";
7
- var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-2NT3ISVP.mjs"));
7
+ var OperationResolver = Capability2.lazy("OperationResolver", () => import("./operation-resolver-VSWA74RS.mjs"));
8
8
 
9
9
  // src/capabilities/schema-defs/index.ts
10
10
  import { Capability as Capability3 } from "@dxos/app-framework";
11
- var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-O7VLP745.mjs"));
11
+ var SchemaDefs = Capability3.lazy("SchemaDefs", () => import("./schema-defs-KAG6HQMI.mjs"));
12
12
 
13
13
  export {
14
14
  Client,
15
15
  OperationResolver,
16
16
  SchemaDefs
17
17
  };
18
- //# sourceMappingURL=chunk-F7H2Y3Z2.mjs.map
18
+ //# sourceMappingURL=chunk-GSVYEYVS.mjs.map
@@ -0,0 +1,15 @@
1
+ import {
2
+ meta
3
+ } from "./chunk-JHSBBOCI.mjs";
4
+
5
+ // src/constants.ts
6
+ var JOIN_DIALOG = `${meta.id}.JoinDialog`;
7
+ var RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;
8
+ var RESET_DIALOG = `${meta.id}.ResetDialog`;
9
+
10
+ export {
11
+ JOIN_DIALOG,
12
+ RECOVERY_CODE_DIALOG,
13
+ RESET_DIALOG
14
+ };
15
+ //# sourceMappingURL=chunk-HSFDKP5D.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { meta } from './meta';\n\nexport const JOIN_DIALOG = `${meta.id}/JoinDialog`;\nexport const RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;\nexport const RESET_DIALOG = `${meta.id}/ResetDialog`;\n"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { meta } from './meta';\n\nexport const JOIN_DIALOG = `${meta.id}.JoinDialog`;\nexport const RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;\nexport const RESET_DIALOG = `${meta.id}.ResetDialog`;\n"],
5
5
  "mappings": ";;;;;AAMO,IAAMA,cAAc,GAAGC,KAAKC,EAAE;AAC9B,IAAMC,uBAAuB,GAAGF,KAAKC,EAAE;AACvC,IAAME,eAAe,GAAGH,KAAKC,EAAE;",
6
6
  "names": ["JOIN_DIALOG", "meta", "id", "RECOVERY_CODE_DIALOG", "RESET_DIALOG"]
7
7
  }
@@ -0,0 +1,15 @@
1
+ // src/meta.ts
2
+ import { trim } from "@dxos/util";
3
+ var meta = {
4
+ id: "org.dxos.plugin.client",
5
+ name: "Client",
6
+ description: trim`
7
+ Core client connectivity and peer-to-peer networking infrastructure.
8
+ Manages identity, authentication, and real-time synchronization across devices.
9
+ `
10
+ };
11
+
12
+ export {
13
+ meta
14
+ };
15
+ //# sourceMappingURL=chunk-JHSBBOCI.mjs.map