@dxos/shell 0.4.10-main.93fda5f → 0.4.10-main.94f946a

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 (223) hide show
  1. package/dist/bundle/index-Ba9TfOfV.mjs +110 -0
  2. package/dist/bundle/index-Ba9TfOfV.mjs.map +1 -0
  3. package/dist/bundle/index-DaiI_12x.mjs +96628 -0
  4. package/dist/bundle/index-DaiI_12x.mjs.map +1 -0
  5. package/dist/bundle/shell.mjs +9 -80814
  6. package/dist/bundle/shell.mjs.map +1 -1
  7. package/dist/bundle/shell.umd.js +156 -85
  8. package/dist/bundle/shell.umd.js.map +1 -1
  9. package/dist/bundle/style.css +1 -1
  10. package/dist/lib/browser/meta.json +1 -1
  11. package/dist/lib/browser/react.mjs +1181 -1036
  12. package/dist/lib/browser/react.mjs.map +4 -4
  13. package/dist/lib/browser/testing/index.mjs +10 -9
  14. package/dist/lib/browser/testing/index.mjs.map +3 -3
  15. package/dist/types/src/components/AgentConfig.d.ts +3 -0
  16. package/dist/types/src/components/AgentConfig.d.ts.map +1 -0
  17. package/dist/types/src/components/AgentConfig.js +37 -0
  18. package/dist/types/src/components/AgentConfig.js.map +1 -0
  19. package/dist/types/src/components/DeviceList/DeviceList.d.ts +3 -0
  20. package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -0
  21. package/dist/types/src/components/DeviceList/DeviceList.js +29 -0
  22. package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -0
  23. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts +6 -0
  24. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts.map +1 -0
  25. package/dist/types/src/components/DeviceList/DeviceListItem.js +72 -0
  26. package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -0
  27. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts +27 -0
  28. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts.map +1 -0
  29. package/dist/types/src/components/DeviceList/DeviceListProps.js +6 -0
  30. package/dist/types/src/components/DeviceList/DeviceListProps.js.map +1 -0
  31. package/dist/types/src/components/DeviceList/index.d.ts +3 -0
  32. package/dist/types/src/components/DeviceList/index.d.ts.map +1 -0
  33. package/dist/types/src/components/DeviceList/index.js +22 -0
  34. package/dist/types/src/components/DeviceList/index.js.map +1 -0
  35. package/dist/types/src/components/EmojiPicker.d.ts +10 -4
  36. package/dist/types/src/components/EmojiPicker.d.ts.map +1 -1
  37. package/dist/types/src/components/EmojiPicker.js +59 -4
  38. package/dist/types/src/components/EmojiPicker.js.map +1 -1
  39. package/dist/types/src/components/HuePicker.d.ts +10 -4
  40. package/dist/types/src/components/HuePicker.d.ts.map +1 -1
  41. package/dist/types/src/components/HuePicker.js +75 -6
  42. package/dist/types/src/components/HuePicker.js.map +1 -1
  43. package/dist/types/src/components/IdentityList/index.d.ts +0 -1
  44. package/dist/types/src/components/IdentityList/index.d.ts.map +1 -1
  45. package/dist/types/src/components/IdentityList/index.js +0 -1
  46. package/dist/types/src/components/IdentityList/index.js.map +1 -1
  47. package/dist/types/src/components/InvitationList/InvitationListItem.js +5 -5
  48. package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
  49. package/dist/types/src/components/Panel/Action.d.ts +2 -2
  50. package/dist/types/src/components/Viewport/Viewport.d.ts +1 -1
  51. package/dist/types/src/components/index.d.ts +2 -0
  52. package/dist/types/src/components/index.d.ts.map +1 -1
  53. package/dist/types/src/components/index.js +2 -0
  54. package/dist/types/src/components/index.js.map +1 -1
  55. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +1 -1
  56. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
  57. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  58. package/dist/types/src/composites/Shell/Shell.js +14 -6
  59. package/dist/types/src/composites/Shell/Shell.js.map +1 -1
  60. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +2 -0
  61. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -0
  62. package/dist/types/src/composites/StatusDialog/StatusDialog.js +22 -0
  63. package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -0
  64. package/dist/types/src/composites/StatusDialog/index.d.ts +2 -0
  65. package/dist/types/src/composites/StatusDialog/index.d.ts.map +1 -0
  66. package/dist/types/src/composites/StatusDialog/index.js +21 -0
  67. package/dist/types/src/composites/StatusDialog/index.js.map +1 -0
  68. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +1 -1
  69. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  70. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +94 -42
  71. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  72. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +0 -3
  73. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
  74. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +1 -43
  75. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
  76. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +11 -12
  77. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  78. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +3 -1
  79. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  80. package/dist/types/src/panels/IdentityPanel/identityMachine.js +13 -24
  81. package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
  82. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +4 -4
  83. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  84. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +9 -39
  85. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  86. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -1
  87. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
  88. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +6 -3
  89. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
  90. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +0 -3
  91. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
  92. package/dist/types/src/panels/IdentityPanel/steps/index.js +0 -3
  93. package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
  94. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -1
  95. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +5 -1
  96. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
  97. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +1 -1
  98. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
  99. package/dist/types/src/panels/JoinPanel/JoinPanel.js +12 -5
  100. package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
  101. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +1 -1
  102. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
  103. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +2 -1
  104. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
  105. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +8 -3
  106. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
  107. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +3 -2
  108. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
  109. package/dist/types/src/panels/JoinPanel/joinMachine.js +7 -0
  110. package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
  111. package/dist/types/src/panels/JoinPanel/steps/index.d.ts +0 -1
  112. package/dist/types/src/panels/JoinPanel/steps/index.d.ts.map +1 -1
  113. package/dist/types/src/panels/JoinPanel/steps/index.js +0 -1
  114. package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -1
  115. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
  116. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +3 -1
  117. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
  118. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +4 -0
  119. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -0
  120. package/dist/types/src/panels/StatusPanel/StatusPanel.js +19 -0
  121. package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -0
  122. package/dist/types/src/panels/StatusPanel/index.d.ts +2 -0
  123. package/dist/types/src/panels/StatusPanel/index.d.ts.map +1 -0
  124. package/dist/types/src/panels/StatusPanel/index.js +21 -0
  125. package/dist/types/src/panels/StatusPanel/index.js.map +1 -0
  126. package/dist/types/src/panels/index.d.ts +1 -0
  127. package/dist/types/src/panels/index.d.ts.map +1 -1
  128. package/dist/types/src/panels/index.js +1 -0
  129. package/dist/types/src/panels/index.js.map +1 -1
  130. package/dist/types/src/playwright/invitations.spec.js +3 -1
  131. package/dist/types/src/playwright/invitations.spec.js.map +1 -1
  132. package/dist/types/src/steps/ConfirmReset.d.ts +16 -0
  133. package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -0
  134. package/dist/types/src/steps/ConfirmReset.js +71 -0
  135. package/dist/types/src/steps/ConfirmReset.js.map +1 -0
  136. package/dist/types/src/steps/InvitationManager.d.ts +1 -1
  137. package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
  138. package/dist/types/src/steps/InvitationManager.js +3 -4
  139. package/dist/types/src/steps/InvitationManager.js.map +1 -1
  140. package/dist/types/src/steps/StepProps.d.ts +4 -1
  141. package/dist/types/src/steps/StepProps.d.ts.map +1 -1
  142. package/dist/types/src/steps/index.d.ts +1 -0
  143. package/dist/types/src/steps/index.d.ts.map +1 -1
  144. package/dist/types/src/steps/index.js +1 -0
  145. package/dist/types/src/steps/index.js.map +1 -1
  146. package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
  147. package/dist/types/src/stories/Invitations.e2e-stories.js +5 -2
  148. package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
  149. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  150. package/dist/types/src/testing/shell-manager.js +10 -9
  151. package/dist/types/src/testing/shell-manager.js.map +1 -1
  152. package/dist/types/src/translations/locales/en-US.d.ts +16 -3
  153. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  154. package/dist/types/src/translations/locales/en-US.js +20 -7
  155. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  156. package/dist/types/src/types/index.js +1 -0
  157. package/dist/types/src/types/index.js.map +1 -1
  158. package/package.json +22 -21
  159. package/src/components/AgentConfig.tsx +66 -0
  160. package/src/components/DeviceList/DeviceList.tsx +54 -0
  161. package/src/components/DeviceList/DeviceListItem.tsx +120 -0
  162. package/src/components/DeviceList/DeviceListProps.ts +33 -0
  163. package/src/components/DeviceList/index.ts +6 -0
  164. package/src/components/EmojiPicker.tsx +104 -5
  165. package/src/components/HuePicker.tsx +100 -6
  166. package/src/components/IdentityList/index.ts +0 -1
  167. package/src/components/InvitationList/InvitationListItem.tsx +5 -5
  168. package/src/components/index.ts +2 -0
  169. package/src/composites/IdentityDialog/IdentityDialog.tsx +1 -1
  170. package/src/composites/Shell/Shell.tsx +17 -4
  171. package/src/composites/StatusDialog/StatusDialog.tsx +24 -0
  172. package/src/composites/StatusDialog/index.ts +5 -0
  173. package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +0 -63
  174. package/src/panels/IdentityPanel/IdentityPanel.tsx +155 -43
  175. package/src/panels/IdentityPanel/IdentityPanelProps.ts +15 -15
  176. package/src/panels/IdentityPanel/identityMachine.ts +17 -25
  177. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +23 -67
  178. package/src/panels/IdentityPanel/steps/ProfileForm.tsx +18 -5
  179. package/src/panels/IdentityPanel/steps/index.ts +0 -3
  180. package/src/panels/IdentityPanel/useAgentHandlers.ts +5 -1
  181. package/src/panels/JoinPanel/JoinPanel.stories.tsx +3 -2
  182. package/src/panels/JoinPanel/JoinPanel.tsx +21 -5
  183. package/src/panels/JoinPanel/JoinPanelProps.ts +9 -3
  184. package/src/panels/JoinPanel/joinMachine.ts +12 -2
  185. package/src/panels/JoinPanel/steps/index.ts +0 -1
  186. package/src/panels/SpacePanel/steps/SpaceManager.tsx +3 -1
  187. package/src/panels/StatusPanel/StatusPanel.tsx +19 -0
  188. package/src/panels/StatusPanel/index.ts +5 -0
  189. package/src/panels/index.ts +1 -0
  190. package/src/playwright/invitations.spec.ts +3 -1
  191. package/src/steps/ConfirmReset.tsx +112 -0
  192. package/src/steps/InvitationManager.tsx +4 -4
  193. package/src/steps/StepProps.ts +2 -1
  194. package/src/steps/index.ts +1 -0
  195. package/src/stories/Invitations.e2e-stories.tsx +6 -3
  196. package/src/testing/shell-manager.ts +10 -9
  197. package/src/translations/locales/en-US.ts +22 -7
  198. package/src/types/index.ts +2 -0
  199. package/dist/types/src/components/IdentityList/DeviceList.d.ts +0 -7
  200. package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +0 -1
  201. package/dist/types/src/components/IdentityList/DeviceList.js +0 -34
  202. package/dist/types/src/components/IdentityList/DeviceList.js.map +0 -1
  203. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts +0 -3
  204. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts.map +0 -1
  205. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js +0 -26
  206. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js.map +0 -1
  207. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts +0 -10
  208. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts.map +0 -1
  209. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js +0 -23
  210. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js.map +0 -1
  211. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts +0 -16
  212. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts.map +0 -1
  213. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js +0 -40
  214. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js.map +0 -1
  215. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +0 -13
  216. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +0 -1
  217. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +0 -66
  218. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +0 -1
  219. package/src/components/IdentityList/DeviceList.tsx +0 -49
  220. package/src/panels/IdentityPanel/steps/AgentForm.tsx +0 -61
  221. package/src/panels/IdentityPanel/steps/DeviceManager.tsx +0 -41
  222. package/src/panels/IdentityPanel/steps/SignOutChooser.tsx +0 -84
  223. package/src/panels/JoinPanel/steps/ResetIdentity.tsx +0 -80
@@ -2,14 +2,73 @@ import {
2
2
  __export
3
3
  } from "./chunk-ZSTKOCBT.mjs";
4
4
 
5
+ // packages/sdk/shell/src/components/AgentConfig.tsx
6
+ import { Database, Plus, Power } from "@phosphor-icons/react";
7
+ import React from "react";
8
+ import { Avatar, Button, Tooltip, useTranslation } from "@dxos/react-ui";
9
+ import { descriptionText, getSize, mx } from "@dxos/react-ui-theme";
10
+ var AgentConfig = ({ agentActive, agentStatus, onAgentDestroy, onAgentCreate }) => {
11
+ const { t } = useTranslation("os");
12
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h2", {
13
+ className: mx(descriptionText, "text-center mbs-4")
14
+ }, t("agent heading")), agentActive ? /* @__PURE__ */ React.createElement("div", {
15
+ role: "group",
16
+ className: "flex gap-2 items-center"
17
+ }, /* @__PURE__ */ React.createElement(Avatar.Root, {
18
+ status: agentStatus ? "active" : "inactive",
19
+ variant: "square"
20
+ }, /* @__PURE__ */ React.createElement(Avatar.Frame, {
21
+ classNames: "place-self-center"
22
+ }, /* @__PURE__ */ React.createElement(Database, {
23
+ weight: "duotone",
24
+ width: 24,
25
+ height: 24,
26
+ x: 8,
27
+ y: 8
28
+ })), /* @__PURE__ */ React.createElement(Avatar.Label, {
29
+ classNames: "flex-1 text-sm truncate"
30
+ }, t("agent device label"))), /* @__PURE__ */ React.createElement(Tooltip.Root, null, /* @__PURE__ */ React.createElement(Tooltip.Trigger, {
31
+ asChild: true
32
+ }, /* @__PURE__ */ React.createElement(Button, {
33
+ variant: "ghost",
34
+ classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
35
+ "data-testid": "agent.destroy",
36
+ onClick: onAgentDestroy
37
+ }, /* @__PURE__ */ React.createElement("span", {
38
+ className: "sr-only"
39
+ }, t("destroy agent label")), /* @__PURE__ */ React.createElement(Power, {
40
+ className: getSize(5)
41
+ }))), /* @__PURE__ */ React.createElement(Tooltip.Portal, null, /* @__PURE__ */ React.createElement(Tooltip.Content, {
42
+ side: "bottom",
43
+ classNames: "z-50"
44
+ }, t("destroy agent label"))))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, {
45
+ variant: "ghost",
46
+ classNames: "mlb-2 is-full justify-start gap-2 !pis-0 !pie-3",
47
+ "data-testid": "devices-panel.create-agent",
48
+ onClick: onAgentCreate,
49
+ "aria-describedby": "devices-panel.create-agent.description"
50
+ }, /* @__PURE__ */ React.createElement("div", {
51
+ role: "img",
52
+ className: mx(getSize(8), "m-1 rounded-sm surface-input grid place-items-center")
53
+ }, /* @__PURE__ */ React.createElement(Plus, {
54
+ weight: "light",
55
+ className: getSize(6)
56
+ })), /* @__PURE__ */ React.createElement("span", {
57
+ className: "grow font-medium text-start"
58
+ }, t("create agent label"))), /* @__PURE__ */ React.createElement("p", {
59
+ id: "devices-panel.create-agent.description",
60
+ className: descriptionText
61
+ }, t("agent message body"))));
62
+ };
63
+
5
64
  // packages/sdk/shell/src/components/Clipboard/CopyButton.tsx
6
65
  import { Check, Copy } from "@phosphor-icons/react";
7
- import React2, { useState as useState2 } from "react";
8
- import { Button, Tooltip, useTranslation } from "@dxos/react-ui";
9
- import { getSize, mx } from "@dxos/react-ui-theme";
66
+ import React3, { useState as useState2 } from "react";
67
+ import { Button as Button2, Tooltip as Tooltip2, useTranslation as useTranslation2 } from "@dxos/react-ui";
68
+ import { getSize as getSize2, mx as mx2 } from "@dxos/react-ui-theme";
10
69
 
11
70
  // packages/sdk/shell/src/components/Clipboard/ClipboardProvider.tsx
12
- import React, { createContext, useCallback, useContext, useState } from "react";
71
+ import React2, { createContext, useCallback, useContext, useState } from "react";
13
72
  var ClipboardContext = /* @__PURE__ */ createContext({
14
73
  textValue: "",
15
74
  setTextValue: async (_) => {
@@ -22,7 +81,7 @@ var ClipboardProvider = ({ children }) => {
22
81
  await navigator.clipboard.writeText(nextValue);
23
82
  return setInternalTextValue(nextValue);
24
83
  }, []);
25
- return /* @__PURE__ */ React.createElement(ClipboardContext.Provider, {
84
+ return /* @__PURE__ */ React2.createElement(ClipboardContext.Provider, {
26
85
  value: {
27
86
  textValue,
28
87
  setTextValue
@@ -32,11 +91,11 @@ var ClipboardProvider = ({ children }) => {
32
91
 
33
92
  // packages/sdk/shell/src/components/Clipboard/CopyButton.tsx
34
93
  var inactiveLabelStyles = "invisible bs-px -mbe-px overflow-hidden";
35
- var CopyButton = ({ value, classNames, iconProps, ...props }) => {
36
- const { t } = useTranslation("os");
94
+ var CopyButton = ({ value, classNames, iconProps: iconProps2, ...props }) => {
95
+ const { t } = useTranslation2("os");
37
96
  const { textValue, setTextValue } = useClipboardContext();
38
97
  const isCopied = textValue === value;
39
- return /* @__PURE__ */ React2.createElement(Button, {
98
+ return /* @__PURE__ */ React3.createElement(Button2, {
40
99
  ...props,
41
100
  classNames: [
42
101
  "inline-flex flex-col justify-center",
@@ -44,60 +103,60 @@ var CopyButton = ({ value, classNames, iconProps, ...props }) => {
44
103
  ],
45
104
  onClick: () => setTextValue(value),
46
105
  "data-testid": "copy-invitation"
47
- }, /* @__PURE__ */ React2.createElement("div", {
106
+ }, /* @__PURE__ */ React3.createElement("div", {
48
107
  role: "none",
49
- className: mx("flex gap-1 items-center", isCopied && inactiveLabelStyles)
50
- }, /* @__PURE__ */ React2.createElement("span", {
108
+ className: mx2("flex gap-1 items-center", isCopied && inactiveLabelStyles)
109
+ }, /* @__PURE__ */ React3.createElement("span", {
51
110
  className: "pli-1"
52
- }, t("copy invitation code label")), /* @__PURE__ */ React2.createElement(Copy, {
53
- className: getSize(5),
54
- ...iconProps
55
- })), /* @__PURE__ */ React2.createElement("div", {
111
+ }, t("copy invitation code label")), /* @__PURE__ */ React3.createElement(Copy, {
112
+ className: getSize2(5),
113
+ ...iconProps2
114
+ })), /* @__PURE__ */ React3.createElement("div", {
56
115
  role: "none",
57
- className: mx("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
58
- }, /* @__PURE__ */ React2.createElement("span", {
116
+ className: mx2("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
117
+ }, /* @__PURE__ */ React3.createElement("span", {
59
118
  className: "pli-1"
60
- }, t("copy success label")), /* @__PURE__ */ React2.createElement(Check, {
61
- className: getSize(5),
62
- ...iconProps
119
+ }, t("copy success label")), /* @__PURE__ */ React3.createElement(Check, {
120
+ className: getSize2(5),
121
+ ...iconProps2
63
122
  })));
64
123
  };
65
- var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) => {
66
- const { t } = useTranslation("os");
124
+ var CopyButtonIconOnly = ({ value, classNames, iconProps: iconProps2, variant, ...props }) => {
125
+ const { t } = useTranslation2("os");
67
126
  const { textValue, setTextValue } = useClipboardContext();
68
127
  const isCopied = textValue === value;
69
128
  const label = isCopied ? t("copy success label") : t("copy invitation code label");
70
129
  const [open, setOpen] = useState2(false);
71
- return /* @__PURE__ */ React2.createElement(Tooltip.Root, {
130
+ return /* @__PURE__ */ React3.createElement(Tooltip2.Root, {
72
131
  delayDuration: 1500,
73
132
  open,
74
133
  onOpenChange: setOpen
75
- }, /* @__PURE__ */ React2.createElement(Tooltip.Portal, null, /* @__PURE__ */ React2.createElement(Tooltip.Content, {
134
+ }, /* @__PURE__ */ React3.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React3.createElement(Tooltip2.Content, {
76
135
  side: "bottom",
77
136
  sideOffset: 12,
78
137
  classNames: "z-30"
79
- }, /* @__PURE__ */ React2.createElement("span", null, label), /* @__PURE__ */ React2.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React2.createElement(Tooltip.Trigger, {
138
+ }, /* @__PURE__ */ React3.createElement("span", null, label), /* @__PURE__ */ React3.createElement(Tooltip2.Arrow, null))), /* @__PURE__ */ React3.createElement(Tooltip2.Trigger, {
80
139
  "aria-label": label,
81
140
  ...props,
82
141
  onClick: () => setTextValue(value).then(() => setOpen(true)),
83
142
  "data-testid": "copy-invitation",
84
143
  asChild: true
85
- }, /* @__PURE__ */ React2.createElement(Button, {
144
+ }, /* @__PURE__ */ React3.createElement(Button2, {
86
145
  variant,
87
146
  classNames: [
88
147
  "inline-flex flex-col justify-center",
89
148
  classNames
90
149
  ]
91
- }, /* @__PURE__ */ React2.createElement(Copy, {
92
- className: getSize(5),
93
- ...iconProps
150
+ }, /* @__PURE__ */ React3.createElement(Copy, {
151
+ className: getSize2(5),
152
+ ...iconProps2
94
153
  }))));
95
154
  };
96
155
 
97
156
  // packages/sdk/shell/src/components/CompoundButton/CompoundButton.tsx
98
- import React3 from "react";
157
+ import React4 from "react";
99
158
  import { useId, useThemeContext, useElevationContext } from "@dxos/react-ui";
100
- import { descriptionText, descriptionTextPrimary, mx as mx2 } from "@dxos/react-ui-theme";
159
+ import { descriptionText as descriptionText2, descriptionTextPrimary, mx as mx3 } from "@dxos/react-ui-theme";
101
160
  var CompoundButton = ({ children, description, before, after, variant = "default", elevation: propsElevation, slots = {}, ...buttonProps }) => {
102
161
  const labelId = useId("compoundButton-label");
103
162
  const descriptionId = useId("compoundButton-description");
@@ -110,7 +169,7 @@ var CompoundButton = ({ children, description, before, after, variant = "default
110
169
  textWrap: true
111
170
  };
112
171
  const buttonClassName = tx("button.root", "button button--compound", styleProps, "flex items-center gap-4 plb-2.5", slots.root?.className);
113
- return /* @__PURE__ */ React3.createElement("button", {
172
+ return /* @__PURE__ */ React4.createElement("button", {
114
173
  ...buttonProps,
115
174
  ...slots.root,
116
175
  className: buttonClassName,
@@ -118,22 +177,22 @@ var CompoundButton = ({ children, description, before, after, variant = "default
118
177
  ...description && {
119
178
  "aria-describedby": descriptionId
120
179
  }
121
- }, before && /* @__PURE__ */ React3.createElement("div", {
180
+ }, before && /* @__PURE__ */ React4.createElement("div", {
122
181
  role: "none",
123
182
  className: "grow-0"
124
- }, before), /* @__PURE__ */ React3.createElement("div", {
183
+ }, before), /* @__PURE__ */ React4.createElement("div", {
125
184
  role: "none",
126
185
  ...slots.middle,
127
- className: mx2("grow whitespace-normal flex flex-col gap-1 text-left", slots.middle?.className)
128
- }, /* @__PURE__ */ React3.createElement("p", {
186
+ className: mx3("grow whitespace-normal flex flex-col gap-1 text-left", slots.middle?.className)
187
+ }, /* @__PURE__ */ React4.createElement("p", {
129
188
  ...slots.label,
130
189
  id: labelId,
131
- className: mx2(slots.label?.className)
132
- }, children), description && /* @__PURE__ */ React3.createElement("p", {
190
+ className: mx3(slots.label?.className)
191
+ }, children), description && /* @__PURE__ */ React4.createElement("p", {
133
192
  id: descriptionId,
134
193
  ...slots.description,
135
- className: mx2("text-xs mbe-1 font-normal", variant === "primary" ? descriptionTextPrimary : descriptionText, slots.description?.className)
136
- }, description)), after && /* @__PURE__ */ React3.createElement("div", {
194
+ className: mx3("text-xs mbe-1 font-normal", variant === "primary" ? descriptionTextPrimary : descriptionText2, slots.description?.className)
195
+ }, description)), after && /* @__PURE__ */ React4.createElement("div", {
137
196
  role: "none",
138
197
  className: "grow-0"
139
198
  }, after));
@@ -142,43 +201,112 @@ var CompoundButton = ({ children, description, before, after, variant = "default
142
201
  // packages/sdk/shell/src/components/EmojiPicker.tsx
143
202
  import emojiData from "@emoji-mart/data";
144
203
  import EmojiMart from "@emoji-mart/react";
145
- import { ArrowCounterClockwise, CaretDown } from "@phosphor-icons/react";
204
+ import { ArrowCounterClockwise, CaretDown, ImageSquare } from "@phosphor-icons/react";
146
205
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
147
- import React4, { useState as useState3 } from "react";
148
- import { Button as Button2, Popover, useTranslation as useTranslation2, Tooltip as Tooltip2 } from "@dxos/react-ui";
149
- import { getSize as getSize2 } from "@dxos/react-ui-theme";
150
- var EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear }) => {
151
- const { t } = useTranslation2("os");
206
+ import React5, { useRef, useState as useState3 } from "react";
207
+ import { Button as Button3, Popover, useTranslation as useTranslation3, Tooltip as Tooltip3, Toolbar, useMediaQuery } from "@dxos/react-ui";
208
+ import { getSize as getSize3 } from "@dxos/react-ui-theme";
209
+ var EmojiPickerToolbarButton = ({ disabled, defaultEmoji, emoji, onChangeEmoji, classNames }) => {
210
+ const { t } = useTranslation3("os");
211
+ const [_emojiValue, setEmojiValue] = useControllableState({
212
+ prop: emoji,
213
+ onChange: onChangeEmoji,
214
+ defaultProp: defaultEmoji
215
+ });
216
+ const [emojiPickerOpen, setEmojiPickerOpen] = useState3(false);
217
+ const suppressNextTooltip = useRef(false);
218
+ const [triggerTooltipOpen, setTriggerTooltipOpen] = useState3(false);
219
+ return /* @__PURE__ */ React5.createElement(Tooltip3.Root, {
220
+ open: triggerTooltipOpen,
221
+ onOpenChange: (nextOpen) => {
222
+ if (suppressNextTooltip.current) {
223
+ setTriggerTooltipOpen(false);
224
+ suppressNextTooltip.current = false;
225
+ } else {
226
+ setTriggerTooltipOpen(nextOpen);
227
+ }
228
+ }
229
+ }, /* @__PURE__ */ React5.createElement(Popover.Root, {
230
+ open: emojiPickerOpen,
231
+ onOpenChange: (nextOpen) => {
232
+ setEmojiPickerOpen(nextOpen);
233
+ suppressNextTooltip.current = true;
234
+ }
235
+ }, /* @__PURE__ */ React5.createElement(Tooltip3.Trigger, {
236
+ asChild: true
237
+ }, /* @__PURE__ */ React5.createElement(Popover.Trigger, {
238
+ asChild: true
239
+ }, /* @__PURE__ */ React5.createElement(Toolbar.Button, {
240
+ classNames: [
241
+ "gap-2 text-2xl plb-1",
242
+ classNames
243
+ ],
244
+ disabled
245
+ }, /* @__PURE__ */ React5.createElement("span", {
246
+ className: "sr-only"
247
+ }, t("select emoji label")), /* @__PURE__ */ React5.createElement(ImageSquare, {
248
+ className: getSize3(5)
249
+ })))), /* @__PURE__ */ React5.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React5.createElement(Tooltip3.Content, {
250
+ side: "bottom",
251
+ classNames: "z-50"
252
+ }, t("select emoji label"), /* @__PURE__ */ React5.createElement(Tooltip3.Arrow, null))), /* @__PURE__ */ React5.createElement(Popover.Content, {
253
+ side: "bottom",
254
+ onKeyDownCapture: (event) => {
255
+ if (event.key === "Escape") {
256
+ event.stopPropagation();
257
+ setEmojiPickerOpen(false);
258
+ suppressNextTooltip.current = true;
259
+ }
260
+ }
261
+ }, /* @__PURE__ */ React5.createElement(EmojiMart, {
262
+ data: emojiData,
263
+ onEmojiSelect: ({ native }) => {
264
+ if (native) {
265
+ setEmojiValue(native);
266
+ setEmojiPickerOpen(false);
267
+ }
268
+ },
269
+ autoFocus: true,
270
+ maxFrequentRows: 0,
271
+ noCountryFlags: true
272
+ }), /* @__PURE__ */ React5.createElement(Popover.Arrow, null))));
273
+ };
274
+ var EmojiPickerBlock = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear }) => {
275
+ const { t } = useTranslation3("os");
276
+ const [isMd] = useMediaQuery("md", {
277
+ ssr: false
278
+ });
152
279
  const [emojiValue, setEmojiValue] = useControllableState({
153
280
  prop: emoji,
154
281
  onChange: onChangeEmoji,
155
282
  defaultProp: defaultEmoji
156
283
  });
157
284
  const [emojiPickerOpen, setEmojiPickerOpen] = useState3(false);
158
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Popover.Root, {
285
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Popover.Root, {
159
286
  open: emojiPickerOpen,
160
287
  onOpenChange: setEmojiPickerOpen
161
- }, /* @__PURE__ */ React4.createElement(Popover.Trigger, {
288
+ }, /* @__PURE__ */ React5.createElement(Popover.Trigger, {
162
289
  asChild: true
163
- }, /* @__PURE__ */ React4.createElement(Button2, {
290
+ }, /* @__PURE__ */ React5.createElement(Button3, {
164
291
  variant: "ghost",
165
292
  classNames: "gap-2 text-2xl plb-1",
166
293
  disabled
167
- }, /* @__PURE__ */ React4.createElement("span", {
294
+ }, /* @__PURE__ */ React5.createElement("span", {
168
295
  className: "sr-only"
169
- }, t("select emoji label")), /* @__PURE__ */ React4.createElement("span", {
296
+ }, t("select emoji label")), /* @__PURE__ */ React5.createElement("span", {
170
297
  className: "grow pis-14"
171
- }, emojiValue), /* @__PURE__ */ React4.createElement(CaretDown, {
172
- className: getSize2(4)
173
- }))), /* @__PURE__ */ React4.createElement(Popover.Content, {
298
+ }, emojiValue), /* @__PURE__ */ React5.createElement(CaretDown, {
299
+ className: getSize3(4)
300
+ }))), /* @__PURE__ */ React5.createElement(Popover.Content, {
174
301
  side: "right",
302
+ sideOffset: isMd ? 0 : -310,
175
303
  onKeyDownCapture: (event) => {
176
304
  if (event.key === "Escape") {
177
305
  event.stopPropagation();
178
306
  setEmojiPickerOpen(false);
179
307
  }
180
308
  }
181
- }, /* @__PURE__ */ React4.createElement(EmojiMart, {
309
+ }, /* @__PURE__ */ React5.createElement(EmojiMart, {
182
310
  data: emojiData,
183
311
  onEmojiSelect: ({ native }) => {
184
312
  if (native) {
@@ -189,35 +317,35 @@ var EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear
189
317
  autoFocus: true,
190
318
  maxFrequentRows: 0,
191
319
  noCountryFlags: true
192
- }), /* @__PURE__ */ React4.createElement(Popover.Arrow, null))), /* @__PURE__ */ React4.createElement(Tooltip2.Root, null, /* @__PURE__ */ React4.createElement(Tooltip2.Trigger, {
320
+ }), /* @__PURE__ */ React5.createElement(Popover.Arrow, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Root, null, /* @__PURE__ */ React5.createElement(Tooltip3.Trigger, {
193
321
  asChild: true
194
- }, /* @__PURE__ */ React4.createElement(Button2, {
322
+ }, /* @__PURE__ */ React5.createElement(Button3, {
195
323
  variant: "ghost",
196
324
  onClick: onClickClear,
197
325
  disabled
198
- }, /* @__PURE__ */ React4.createElement("span", {
326
+ }, /* @__PURE__ */ React5.createElement("span", {
199
327
  className: "sr-only"
200
- }, t("clear label")), /* @__PURE__ */ React4.createElement(ArrowCounterClockwise, null))), /* @__PURE__ */ React4.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React4.createElement(Tooltip2.Content, {
328
+ }, t("clear label")), /* @__PURE__ */ React5.createElement(ArrowCounterClockwise, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React5.createElement(Tooltip3.Content, {
201
329
  style: {
202
330
  zIndex: 70
203
331
  },
204
332
  side: "right"
205
- }, t("clear label"), /* @__PURE__ */ React4.createElement(Tooltip2.Arrow, null)))));
333
+ }, t("clear label"), /* @__PURE__ */ React5.createElement(Tooltip3.Arrow, null)))));
206
334
  };
207
335
 
208
336
  // packages/sdk/shell/src/components/HuePicker.tsx
209
- import { ArrowCounterClockwise as ArrowCounterClockwise2, CaretDown as CaretDown2, Check as Check2 } from "@phosphor-icons/react";
337
+ import { ArrowCounterClockwise as ArrowCounterClockwise2, CaretDown as CaretDown2, Check as Check2, Palette } from "@phosphor-icons/react";
210
338
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
211
- import React5 from "react";
212
- import { Button as Button3, useTranslation as useTranslation3, Tooltip as Tooltip3, DropdownMenu, useThemeContext as useThemeContext2 } from "@dxos/react-ui";
213
- import { getSize as getSize3, hueTokenThemes } from "@dxos/react-ui-theme";
339
+ import React6, { useRef as useRef2, useState as useState4 } from "react";
340
+ import { Button as Button4, useTranslation as useTranslation4, Tooltip as Tooltip4, DropdownMenu, useThemeContext as useThemeContext2, Toolbar as Toolbar2 } from "@dxos/react-ui";
341
+ import { getSize as getSize4, hueTokenThemes, mx as mx4 } from "@dxos/react-ui-theme";
214
342
  var HuePreview = ({ hue }) => {
215
343
  const { tx } = useThemeContext2();
216
- return /* @__PURE__ */ React5.createElement("svg", {
344
+ return /* @__PURE__ */ React6.createElement("svg", {
217
345
  width: 12,
218
346
  height: 12,
219
347
  viewBox: "0 0 12 12"
220
- }, /* @__PURE__ */ React5.createElement("rect", {
348
+ }, /* @__PURE__ */ React6.createElement("rect", {
221
349
  x: 0,
222
350
  y: 0,
223
351
  width: 12,
@@ -227,130 +355,150 @@ var HuePreview = ({ hue }) => {
227
355
  })
228
356
  }));
229
357
  };
230
- var HuePicker = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
231
- const { t } = useTranslation3("os");
358
+ var HuePickerToolbarButton = ({ disabled, hue, onChangeHue, classNames, defaultHue }) => {
359
+ const { t } = useTranslation4("os");
232
360
  const [hueValue, setHueValue] = useControllableState2({
233
361
  prop: hue,
234
362
  onChange: onChangeHue,
235
363
  defaultProp: defaultHue
236
364
  });
237
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Root, {
365
+ const [huePickerOpen, setHuePickerOpen] = useState4(false);
366
+ const suppressNextTooltip = useRef2(false);
367
+ const [triggerTooltipOpen, setTriggerTooltipOpen] = useState4(false);
368
+ return /* @__PURE__ */ React6.createElement(Tooltip4.Root, {
369
+ open: triggerTooltipOpen,
370
+ onOpenChange: (nextOpen) => {
371
+ if (suppressNextTooltip.current) {
372
+ setTriggerTooltipOpen(false);
373
+ suppressNextTooltip.current = false;
374
+ } else {
375
+ setTriggerTooltipOpen(nextOpen);
376
+ }
377
+ }
378
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
379
+ modal: false,
380
+ open: huePickerOpen,
381
+ onOpenChange: (nextOpen) => {
382
+ setHuePickerOpen(nextOpen);
383
+ suppressNextTooltip.current = true;
384
+ }
385
+ }, /* @__PURE__ */ React6.createElement(Tooltip4.Trigger, {
386
+ asChild: true
387
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Trigger, {
388
+ asChild: true
389
+ }, /* @__PURE__ */ React6.createElement(Toolbar2.Button, {
390
+ classNames: mx4("gap-2 plb-1", classNames),
391
+ disabled
392
+ }, /* @__PURE__ */ React6.createElement("span", {
393
+ className: "sr-only"
394
+ }, t("select hue label")), /* @__PURE__ */ React6.createElement(Palette, {
395
+ className: getSize4(5)
396
+ })))), /* @__PURE__ */ React6.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React6.createElement(Tooltip4.Content, {
397
+ side: "bottom",
398
+ classNames: "z-50"
399
+ }, t("select hue label"), /* @__PURE__ */ React6.createElement(Tooltip4.Arrow, null))), /* @__PURE__ */ React6.createElement(DropdownMenu.Content, {
400
+ side: "bottom"
401
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
402
+ return /* @__PURE__ */ React6.createElement(DropdownMenu.CheckboxItem, {
403
+ key: hue2,
404
+ checked: hue2 === hueValue,
405
+ onCheckedChange: () => setHueValue(hue2)
406
+ }, /* @__PURE__ */ React6.createElement(HuePreview, {
407
+ hue: hue2
408
+ }), /* @__PURE__ */ React6.createElement("span", {
409
+ className: "grow"
410
+ }, t(`${hue2} label`)), /* @__PURE__ */ React6.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React6.createElement(Check2, null)));
411
+ })), /* @__PURE__ */ React6.createElement(DropdownMenu.Arrow, null))));
412
+ };
413
+ var HuePickerBlock = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
414
+ const { t } = useTranslation4("os");
415
+ const [hueValue, setHueValue] = useControllableState2({
416
+ prop: hue,
417
+ onChange: onChangeHue,
418
+ defaultProp: defaultHue
419
+ });
420
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
238
421
  modal: false
239
- }, /* @__PURE__ */ React5.createElement(DropdownMenu.Trigger, {
422
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Trigger, {
240
423
  asChild: true
241
- }, /* @__PURE__ */ React5.createElement(Button3, {
424
+ }, /* @__PURE__ */ React6.createElement(Button4, {
242
425
  variant: "ghost",
243
426
  classNames: "gap-2 plb-1",
244
427
  disabled
245
- }, /* @__PURE__ */ React5.createElement("span", {
428
+ }, /* @__PURE__ */ React6.createElement("span", {
246
429
  className: "sr-only"
247
- }, t("select hue label")), /* @__PURE__ */ React5.createElement("div", {
430
+ }, t("select hue label")), /* @__PURE__ */ React6.createElement("div", {
248
431
  role: "none",
249
432
  className: "pis-14 grow flex items-center justify-center gap-2"
250
- }, /* @__PURE__ */ React5.createElement(HuePreview, {
433
+ }, /* @__PURE__ */ React6.createElement(HuePreview, {
251
434
  hue: hueValue
252
- }), /* @__PURE__ */ React5.createElement("span", null, t(`${hueValue} label`))), /* @__PURE__ */ React5.createElement(CaretDown2, {
253
- className: getSize3(4)
254
- }))), /* @__PURE__ */ React5.createElement(DropdownMenu.Content, {
435
+ }), /* @__PURE__ */ React6.createElement("span", null, t(`${hueValue} label`))), /* @__PURE__ */ React6.createElement(CaretDown2, {
436
+ className: getSize4(4)
437
+ }))), /* @__PURE__ */ React6.createElement(DropdownMenu.Content, {
255
438
  side: "right"
256
- }, /* @__PURE__ */ React5.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
257
- return /* @__PURE__ */ React5.createElement(DropdownMenu.CheckboxItem, {
439
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
440
+ return /* @__PURE__ */ React6.createElement(DropdownMenu.CheckboxItem, {
258
441
  key: hue2,
259
442
  checked: hue2 === hueValue,
260
443
  onCheckedChange: () => setHueValue(hue2)
261
- }, /* @__PURE__ */ React5.createElement(HuePreview, {
444
+ }, /* @__PURE__ */ React6.createElement(HuePreview, {
262
445
  hue: hue2
263
- }), /* @__PURE__ */ React5.createElement("span", {
446
+ }), /* @__PURE__ */ React6.createElement("span", {
264
447
  className: "grow"
265
- }, t(`${hue2} label`)), /* @__PURE__ */ React5.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React5.createElement(Check2, null)));
266
- })), /* @__PURE__ */ React5.createElement(DropdownMenu.Arrow, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Root, null, /* @__PURE__ */ React5.createElement(Tooltip3.Trigger, {
448
+ }, t(`${hue2} label`)), /* @__PURE__ */ React6.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React6.createElement(Check2, null)));
449
+ })), /* @__PURE__ */ React6.createElement(DropdownMenu.Arrow, null))), /* @__PURE__ */ React6.createElement(Tooltip4.Root, null, /* @__PURE__ */ React6.createElement(Tooltip4.Trigger, {
267
450
  asChild: true
268
- }, /* @__PURE__ */ React5.createElement(Button3, {
451
+ }, /* @__PURE__ */ React6.createElement(Button4, {
269
452
  variant: "ghost",
270
453
  onClick: onClickClear,
271
454
  disabled
272
- }, /* @__PURE__ */ React5.createElement("span", {
455
+ }, /* @__PURE__ */ React6.createElement("span", {
273
456
  className: "sr-only"
274
- }, t("clear label")), /* @__PURE__ */ React5.createElement(ArrowCounterClockwise2, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React5.createElement(Tooltip3.Content, {
457
+ }, t("clear label")), /* @__PURE__ */ React6.createElement(ArrowCounterClockwise2, null))), /* @__PURE__ */ React6.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React6.createElement(Tooltip4.Content, {
275
458
  style: {
276
459
  zIndex: 70
277
460
  },
278
461
  side: "right"
279
- }, t("clear label"), /* @__PURE__ */ React5.createElement(Tooltip3.Arrow, null)))));
462
+ }, t("clear label"), /* @__PURE__ */ React6.createElement(Tooltip4.Arrow, null)))));
280
463
  };
281
464
 
282
- // packages/sdk/shell/src/components/IdentityList/DeviceList.tsx
283
- import React7 from "react";
284
- import { generateName as generateName2 } from "@dxos/display-name";
285
- import { DeviceType } from "@dxos/react-client/halo";
286
- import { List, useTranslation as useTranslation4 } from "@dxos/react-ui";
287
- import { descriptionText as descriptionText2, mx as mx4 } from "@dxos/react-ui-theme";
288
-
289
465
  // packages/sdk/shell/src/components/IdentityList/IdentityListItem.tsx
290
- import React6, { forwardRef } from "react";
466
+ import React7, { forwardRef } from "react";
291
467
  import { generateName } from "@dxos/display-name";
292
468
  import { SpaceMember } from "@dxos/react-client/echo";
293
- import { ListItem, Avatar, useId as useId2 } from "@dxos/react-ui";
294
- import { mx as mx3 } from "@dxos/react-ui-theme";
469
+ import { ListItem, Avatar as Avatar2, useId as useId2 } from "@dxos/react-ui";
470
+ import { mx as mx5 } from "@dxos/react-ui-theme";
295
471
  import { keyToFallback } from "@dxos/util";
296
472
  var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick, classNames, ...props }, forwardedRef) => {
297
473
  const fallbackValue = keyToFallback(identity.identityKey);
298
474
  const labelId = useId2("identityListItem__label");
299
475
  const displayName = identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
300
- return /* @__PURE__ */ React6.createElement(ListItem.Root, {
476
+ return /* @__PURE__ */ React7.createElement(ListItem.Root, {
301
477
  ...props,
302
- classNames: mx3("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
478
+ classNames: mx5("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
303
479
  onClick: () => onClick?.(),
304
480
  "data-testid": "identity-list-item",
305
481
  labelId,
306
482
  ref: forwardedRef
307
- }, /* @__PURE__ */ React6.createElement(Avatar.Root, {
483
+ }, /* @__PURE__ */ React7.createElement(Avatar2.Root, {
308
484
  status: presence === SpaceMember.PresenceState.ONLINE ? "active" : "inactive",
309
485
  labelId,
310
486
  hue: identity.profile?.data?.hue || fallbackValue.hue
311
- }, /* @__PURE__ */ React6.createElement(Avatar.Frame, {
487
+ }, /* @__PURE__ */ React7.createElement(Avatar2.Frame, {
312
488
  classNames: "place-self-center"
313
- }, /* @__PURE__ */ React6.createElement(Avatar.Fallback, {
489
+ }, /* @__PURE__ */ React7.createElement(Avatar2.Fallback, {
314
490
  text: identity.profile?.data?.emoji || fallbackValue.emoji
315
- })), /* @__PURE__ */ React6.createElement(Avatar.Label, {
491
+ })), /* @__PURE__ */ React7.createElement(Avatar2.Label, {
316
492
  classNames: "text-sm truncate pli-2"
317
493
  }, displayName)));
318
494
  });
319
495
 
320
- // packages/sdk/shell/src/components/IdentityList/DeviceList.tsx
321
- var DeviceList = ({ devices, onSelect }) => {
322
- const { t } = useTranslation4("os");
323
- return devices.length > 0 ? /* @__PURE__ */ React7.createElement(List, {
324
- classNames: "flex flex-col gap-2"
325
- }, devices.map((device) => {
326
- const deviceType = device.profile?.type || DeviceType.UNKNOWN;
327
- const displayName = device.profile?.label ? `${device.profile.label} (${DeviceType[deviceType]})` : generateName2(device.deviceKey.toHex());
328
- const identity = {
329
- identityKey: device.deviceKey,
330
- profile: {
331
- displayName
332
- }
333
- };
334
- return /* @__PURE__ */ React7.createElement(IdentityListItem, {
335
- key: device.deviceKey.toHex(),
336
- identity,
337
- presence: device.presence,
338
- onClick: onSelect && (() => onSelect(device))
339
- });
340
- })) : /* @__PURE__ */ React7.createElement("div", {
341
- role: "none",
342
- className: "grow flex items-center p-2"
343
- }, /* @__PURE__ */ React7.createElement("p", {
344
- className: mx4(descriptionText2, "text-center is-full")
345
- }, t("empty device list message")));
346
- };
347
-
348
496
  // packages/sdk/shell/src/components/IdentityList/SpaceMemberList.tsx
349
497
  import React8, { useMemo } from "react";
350
498
  import { useClient } from "@dxos/react-client";
351
499
  import { useMembers } from "@dxos/react-client/echo";
352
- import { useTranslation as useTranslation5, List as List2 } from "@dxos/react-ui";
353
- import { descriptionText as descriptionText3, mx as mx5 } from "@dxos/react-ui-theme";
500
+ import { useTranslation as useTranslation5, List } from "@dxos/react-ui";
501
+ import { descriptionText as descriptionText3, mx as mx6 } from "@dxos/react-ui-theme";
354
502
  var SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
355
503
  const client = useClient();
356
504
  const allUnsortedMembers = useMembers(spaceKey);
@@ -365,7 +513,7 @@ var SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
365
513
  var SpaceMemberListImpl = ({ members, onSelect }) => {
366
514
  const { t } = useTranslation5("os");
367
515
  const visibleMembers = members.filter((member) => member.identity);
368
- return visibleMembers.length > 0 ? /* @__PURE__ */ React8.createElement(List2, {
516
+ return visibleMembers.length > 0 ? /* @__PURE__ */ React8.createElement(List, {
369
517
  classNames: "flex flex-col gap-2",
370
518
  "data-testid": "space-members-list"
371
519
  }, visibleMembers.map((member) => {
@@ -379,22 +527,132 @@ var SpaceMemberListImpl = ({ members, onSelect }) => {
379
527
  role: "none",
380
528
  className: "grow flex items-center p-2"
381
529
  }, /* @__PURE__ */ React8.createElement("p", {
382
- className: mx5(descriptionText3, "text-center is-full mlb-2")
530
+ className: mx6(descriptionText3, "text-center is-full mlb-2")
383
531
  }, t("empty space members message")));
384
532
  };
385
533
 
534
+ // packages/sdk/shell/src/components/DeviceList/DeviceList.tsx
535
+ import { CaretRight, Plus as Plus2 } from "@phosphor-icons/react";
536
+ import React10 from "react";
537
+ import { Button as Button6, List as List2, useTranslation as useTranslation7 } from "@dxos/react-ui";
538
+ import { descriptionText as descriptionText4, getSize as getSize6, mx as mx7 } from "@dxos/react-ui-theme";
539
+
540
+ // packages/sdk/shell/src/components/DeviceList/DeviceListItem.tsx
541
+ import { Compass, Desktop, DeviceMobile, Devices, DotsThree, Intersect, Power as Power2, Robot } from "@phosphor-icons/react";
542
+ import React9, { forwardRef as forwardRef2 } from "react";
543
+ import { generateName as generateName2 } from "@dxos/display-name";
544
+ import { Device, DeviceType, DeviceKind } from "@dxos/react-client/halo";
545
+ import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation6, DropdownMenu as DropdownMenu2, Button as Button5 } from "@dxos/react-ui";
546
+ import { getSize as getSize5 } from "@dxos/react-ui-theme";
547
+ import { keyToFallback as keyToFallback2 } from "@dxos/util";
548
+ var iconProps = {
549
+ weight: "duotone",
550
+ width: 24,
551
+ height: 24,
552
+ x: 8,
553
+ y: 8
554
+ };
555
+ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickJoinExisting, classNames, ...props }, forwardedRef) => {
556
+ const { t } = useTranslation6("os");
557
+ const fallbackValue = keyToFallback2(device.deviceKey);
558
+ const labelId = useId3("identityListItem__label");
559
+ const displayName = device.profile ? t("device name placeholder", {
560
+ os: device.profile.os,
561
+ platform: device.profile.platform
562
+ }) : generateName2(device.deviceKey.toHex());
563
+ const isCurrent = device.kind === DeviceKind.CURRENT;
564
+ return /* @__PURE__ */ React9.createElement(ListItem2.Root, {
565
+ ...props,
566
+ classNames: [
567
+ "flex gap-2 items-center mlb-2",
568
+ classNames
569
+ ],
570
+ "data-testid": `device-list-item${isCurrent ? "-current" : ""}`,
571
+ labelId,
572
+ ref: forwardedRef
573
+ }, /* @__PURE__ */ React9.createElement(Avatar3.Root, {
574
+ status: device.presence === Device.PresenceState.ONLINE ? "active" : "inactive",
575
+ labelId,
576
+ hue: fallbackValue.hue,
577
+ variant: "square"
578
+ }, /* @__PURE__ */ React9.createElement(Avatar3.Frame, {
579
+ classNames: "place-self-center"
580
+ }, device.profile?.type ? device.profile.type === DeviceType.BROWSER ? /* @__PURE__ */ React9.createElement(Compass, iconProps) : device.profile.type === DeviceType.NATIVE ? /* @__PURE__ */ React9.createElement(Desktop, iconProps) : [
581
+ DeviceType.AGENT,
582
+ DeviceType.AGENT_MANAGED
583
+ ].includes(device.profile.type) ? /* @__PURE__ */ React9.createElement(Robot, iconProps) : device.profile.type === DeviceType.MOBILE ? /* @__PURE__ */ React9.createElement(DeviceMobile, iconProps) : /* @__PURE__ */ React9.createElement(Devices, iconProps) : /* @__PURE__ */ React9.createElement(Avatar3.Fallback, {
584
+ text: fallbackValue.emoji
585
+ })), isCurrent && /* @__PURE__ */ React9.createElement(Tag, {
586
+ color: "primary"
587
+ }, t("current device tag label")), /* @__PURE__ */ React9.createElement(Avatar3.Label, {
588
+ classNames: "flex-1 text-sm truncate"
589
+ }, displayName), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
590
+ asChild: true
591
+ }, /* @__PURE__ */ React9.createElement(Button5, {
592
+ variant: "ghost",
593
+ classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
594
+ "data-testid": `device-list-item${isCurrent ? "-current" : ""}.options`
595
+ }, /* @__PURE__ */ React9.createElement("span", {
596
+ className: "sr-only"
597
+ }, t("more options label")), /* @__PURE__ */ React9.createElement(DotsThree, {
598
+ className: getSize5(5)
599
+ }))), /* @__PURE__ */ React9.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Viewport, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Item, {
600
+ "data-testid": "device-list-item-current.join-existing",
601
+ onClick: onClickJoinExisting
602
+ }, /* @__PURE__ */ React9.createElement(Intersect, {
603
+ className: getSize5(5)
604
+ }), t("choose join new identity label")), /* @__PURE__ */ React9.createElement(DropdownMenu2.Item, {
605
+ "data-testid": "device-list-item-current.reset",
606
+ onClick: onClickReset
607
+ }, /* @__PURE__ */ React9.createElement(Power2, {
608
+ className: getSize5(5)
609
+ }), t("reset device label")))))));
610
+ });
611
+
612
+ // packages/sdk/shell/src/components/DeviceList/DeviceList.tsx
613
+ var DeviceList = ({ devices, onClickAdd, onClickEdit, onClickReset, onClickJoinExisting }) => {
614
+ const { t } = useTranslation7("os");
615
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("h2", {
616
+ className: mx7(descriptionText4, "text-center mbs-4")
617
+ }, t("devices heading")), devices.length > 0 && /* @__PURE__ */ React10.createElement(List2, null, devices.map((device) => {
618
+ return /* @__PURE__ */ React10.createElement(DeviceListItem, {
619
+ key: device.deviceKey.toHex(),
620
+ device,
621
+ onClickEdit: () => onClickEdit?.(device),
622
+ onClickReset,
623
+ onClickJoinExisting
624
+ });
625
+ })), /* @__PURE__ */ React10.createElement(Button6, {
626
+ variant: "ghost",
627
+ classNames: "justify-start gap-2 !pis-0 !pie-3",
628
+ "data-testid": "devices-panel.create-invitation",
629
+ onClick: onClickAdd
630
+ }, /* @__PURE__ */ React10.createElement("div", {
631
+ role: "img",
632
+ className: mx7(getSize6(8), "m-1 rounded-sm surface-input grid place-items-center")
633
+ }, /* @__PURE__ */ React10.createElement(Plus2, {
634
+ weight: "light",
635
+ className: getSize6(6)
636
+ })), /* @__PURE__ */ React10.createElement("span", {
637
+ className: "grow font-medium text-start"
638
+ }, t("choose add device label")), /* @__PURE__ */ React10.createElement(CaretRight, {
639
+ weight: "bold",
640
+ className: getSize6(4)
641
+ })));
642
+ };
643
+
386
644
  // packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
387
645
  import { X } from "@phosphor-icons/react";
388
646
  import { formatDistanceToNow } from "date-fns";
389
- import React10, { useCallback as useCallback2 } from "react";
647
+ import React12, { useCallback as useCallback2 } from "react";
390
648
  import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
391
- import { Button as Button4, ListItem as ListItem2, useTranslation as useTranslation6, Avatar as Avatar2, useThemeContext as useThemeContext3, Tooltip as Tooltip4 } from "@dxos/react-ui";
392
- import { focusRing, getSize as getSize4, mx as mx7 } from "@dxos/react-ui-theme";
649
+ import { Button as Button7, ListItem as ListItem3, useTranslation as useTranslation8, Avatar as Avatar4, useThemeContext as useThemeContext3, Tooltip as Tooltip5 } from "@dxos/react-ui";
650
+ import { focusRing, getSize as getSize7, mx as mx9 } from "@dxos/react-ui-theme";
393
651
  import { hexToEmoji } from "@dxos/util";
394
652
 
395
653
  // packages/sdk/shell/src/components/AuthCode.tsx
396
- import React9 from "react";
397
- import { mx as mx6 } from "@dxos/react-ui-theme";
654
+ import React11 from "react";
655
+ import { mx as mx8 } from "@dxos/react-ui-theme";
398
656
  var AuthCode = (props) => {
399
657
  const { code, large, classNames } = props;
400
658
  const l = code?.length ?? 0;
@@ -403,17 +661,17 @@ var AuthCode = (props) => {
403
661
  const handleCopy = () => {
404
662
  void navigator.clipboard.writeText(code ?? "");
405
663
  };
406
- return /* @__PURE__ */ React9.createElement("span", {
407
- className: mx6(large ? "text-6xl" : "text-2xl", "font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer", classNames),
664
+ return /* @__PURE__ */ React11.createElement("span", {
665
+ className: mx8(large ? "text-6xl" : "text-2xl", "font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer", classNames),
408
666
  onClick: handleCopy
409
- }, /* @__PURE__ */ React9.createElement("span", null, left), /* @__PURE__ */ React9.createElement("span", null, right));
667
+ }, /* @__PURE__ */ React11.createElement("span", null, left), /* @__PURE__ */ React11.createElement("span", null, right));
410
668
  };
411
669
 
412
670
  // packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
413
671
  var InvitationListItem = (props) => {
414
672
  const { invitation } = props;
415
673
  const invitationStatus = useInvitationStatus(invitation);
416
- return /* @__PURE__ */ React10.createElement(InvitationListItemImpl, {
674
+ return /* @__PURE__ */ React12.createElement(InvitationListItemImpl, {
417
675
  ...props,
418
676
  invitationStatus
419
677
  });
@@ -424,10 +682,10 @@ var avatarProps = {
424
682
  };
425
683
  var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
426
684
  const { tx } = useThemeContext3();
427
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("span", {
685
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("span", {
428
686
  role: "none",
429
- className: mx7("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize4(avatarProps.size))
430
- }, /* @__PURE__ */ React10.createElement("span", {
687
+ className: mx9("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize7(avatarProps.size))
688
+ }, /* @__PURE__ */ React12.createElement("span", {
431
689
  role: "none",
432
690
  className: tx("avatar.ring", "avatar__ring", {
433
691
  ...avatarProps,
@@ -437,10 +695,10 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
437
695
  style: {
438
696
  animationDelay: "400ms"
439
697
  }
440
- })), /* @__PURE__ */ React10.createElement("span", {
698
+ })), /* @__PURE__ */ React12.createElement("span", {
441
699
  role: "none",
442
- className: mx7("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize4(avatarProps.size))
443
- }, /* @__PURE__ */ React10.createElement("span", {
700
+ className: mx9("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize7(avatarProps.size))
701
+ }, /* @__PURE__ */ React12.createElement("span", {
444
702
  role: "none",
445
703
  className: tx("avatar.ring", "avatar__ring", {
446
704
  ...avatarProps,
@@ -453,14 +711,14 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
453
711
  })));
454
712
  };
455
713
  var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }) => {
456
- const { t } = useTranslation6("os");
457
- const { cancel, status: invitationStatus, invitationCode, authCode, type } = propsInvitationStatus;
714
+ const { t } = useTranslation8("os");
715
+ const { cancel, status: invitationStatus, invitationCode, authCode, multiUse } = propsInvitationStatus;
458
716
  const isCancellable = !([
459
717
  Invitation.State.ERROR,
460
718
  Invitation.State.TIMEOUT,
461
719
  Invitation.State.CANCELLED
462
720
  ].indexOf(invitationStatus) >= 0);
463
- const showShare = type === Invitation.Type.MULTIUSE || [
721
+ const showShare = multiUse || [
464
722
  Invitation.State.INIT,
465
723
  Invitation.State.CONNECTING,
466
724
  Invitation.State.CONNECTED
@@ -495,39 +753,39 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
495
753
  Invitation.State.SUCCESS
496
754
  ].includes(invitationStatus);
497
755
  const avatarStatus = avatarError ? "error" : avatarGreen ? "active" : "inactive";
498
- return /* @__PURE__ */ React10.createElement(ListItem2.Root, {
756
+ return /* @__PURE__ */ React12.createElement(ListItem3.Root, {
499
757
  id: invitationCode,
500
758
  ...props,
501
759
  classNames: [
502
760
  "flex gap-2 pis-3 pie-1 items-center relative",
503
761
  props.classNames
504
762
  ]
505
- }, /* @__PURE__ */ React10.createElement(ListItem2.Heading, {
763
+ }, /* @__PURE__ */ React12.createElement(ListItem3.Heading, {
506
764
  classNames: "sr-only"
507
- }, t(type === Invitation.Type.MULTIUSE ? "invite many list item label" : "invite one list item label")), type === Invitation.Type.MULTIUSE && /* @__PURE__ */ React10.createElement(AvatarStackEffect, {
765
+ }, t(multiUse ? "invite many list item label" : "invite one list item label")), multiUse && /* @__PURE__ */ React12.createElement(AvatarStackEffect, {
508
766
  status: avatarStatus,
509
767
  animation: avatarAnimation,
510
768
  reverseEffects
511
- }), /* @__PURE__ */ React10.createElement(Tooltip4.Root, null, /* @__PURE__ */ React10.createElement(Avatar2.Root, {
769
+ }), /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(Avatar4.Root, {
512
770
  ...avatarProps,
513
771
  animation: avatarAnimation,
514
772
  status: avatarStatus
515
- }, /* @__PURE__ */ React10.createElement(Tooltip4.Trigger, {
773
+ }, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
516
774
  asChild: true
517
- }, /* @__PURE__ */ React10.createElement(Avatar2.Frame, {
775
+ }, /* @__PURE__ */ React12.createElement(Avatar4.Frame, {
518
776
  tabIndex: 0,
519
777
  classNames: [
520
778
  focusRing,
521
779
  "relative rounded-full place-self-center"
522
780
  ]
523
- }, /* @__PURE__ */ React10.createElement(Avatar2.Fallback, {
781
+ }, /* @__PURE__ */ React12.createElement(Avatar4.Fallback, {
524
782
  text: hexToEmoji(invitationId)
525
- })))), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
783
+ })))), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
526
784
  side: "left",
527
785
  classNames: "z-[70]"
528
- }, t(type === Invitation.Type.MULTIUSE ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React10.createElement(Tooltip4.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React10.createElement(Tooltip4.Root, null, /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Tooltip4.Trigger, {
786
+ }, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React12.createElement(Tooltip5.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
529
787
  asChild: true
530
- }, /* @__PURE__ */ React10.createElement(Button4, {
788
+ }, /* @__PURE__ */ React12.createElement(Button7, {
531
789
  variant: "ghost",
532
790
  classNames: "grow justify-start font-medium",
533
791
  onClick: () => send({
@@ -535,63 +793,63 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
535
793
  invitation
536
794
  }),
537
795
  "data-testid": "show-qrcode"
538
- }, /* @__PURE__ */ React10.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React10.createElement(CopyButtonIconOnly, {
796
+ }, /* @__PURE__ */ React12.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React12.createElement(CopyButtonIconOnly, {
539
797
  variant: "ghost",
540
798
  value: invitationUrl
541
- })), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
799
+ })), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
542
800
  side: "left",
543
801
  classNames: "z-[70]"
544
- }, invitationHasLifetime && /* @__PURE__ */ React10.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React10.createElement(AuthCode, {
802
+ }, invitationHasLifetime && /* @__PURE__ */ React12.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React12.createElement(AuthCode, {
545
803
  code: authCode,
546
804
  classNames: "grow"
547
- }) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React10.createElement("span", {
805
+ }) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React12.createElement("span", {
548
806
  className: "pli-2 grow text-neutral-500"
549
- }, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */ React10.createElement("span", {
807
+ }, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */ React12.createElement("span", {
550
808
  className: "pli-2 grow text-neutral-500"
551
- }, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */ React10.createElement("span", {
809
+ }, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */ React12.createElement("span", {
552
810
  className: "pli-2 grow text-neutral-500"
553
- }, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */ React10.createElement("span", {
811
+ }, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */ React12.createElement("span", {
554
812
  className: "pli-2 grow text-neutral-500"
555
- }, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */ React10.createElement("span", {
813
+ }, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */ React12.createElement("span", {
556
814
  className: "pli-2 grow truncate"
557
- }, "User joined") : /* @__PURE__ */ React10.createElement("span", {
815
+ }, "User joined") : /* @__PURE__ */ React12.createElement("span", {
558
816
  className: "grow"
559
- }, " "), isCancellable ? /* @__PURE__ */ React10.createElement(Button4, {
817
+ }, " "), isCancellable ? /* @__PURE__ */ React12.createElement(Button7, {
560
818
  variant: "ghost",
561
819
  classNames: "flex gap-1 pli-0",
562
820
  onClick: cancel,
563
821
  "data-testid": "cancel-invitation"
564
- }, /* @__PURE__ */ React10.createElement("span", {
822
+ }, /* @__PURE__ */ React12.createElement("span", {
565
823
  className: "sr-only"
566
- }, t("cancel invitation label")), /* @__PURE__ */ React10.createElement(X, {
567
- className: getSize4(4)
568
- })) : /* @__PURE__ */ React10.createElement(Button4, {
824
+ }, t("cancel invitation label")), /* @__PURE__ */ React12.createElement(X, {
825
+ className: getSize7(4)
826
+ })) : /* @__PURE__ */ React12.createElement(Button7, {
569
827
  variant: "ghost",
570
828
  classNames: "flex gap-1 pli-0",
571
829
  onClick: handleClickRemove,
572
830
  "data-testid": "remove-invitation"
573
- }, /* @__PURE__ */ React10.createElement("span", {
831
+ }, /* @__PURE__ */ React12.createElement("span", {
574
832
  className: "sr-only"
575
- }, t("remove invitation label")), /* @__PURE__ */ React10.createElement(X, {
576
- className: getSize4(4)
833
+ }, t("remove invitation label")), /* @__PURE__ */ React12.createElement(X, {
834
+ className: getSize7(4)
577
835
  })));
578
836
  };
579
837
 
580
838
  // packages/sdk/shell/src/components/InvitationList/InvitationListContainer.tsx
581
- import React12, { useCallback as useCallback3 } from "react";
839
+ import React14, { useCallback as useCallback3 } from "react";
582
840
  import { useSpace, useSpaceInvitations } from "@dxos/react-client/echo";
583
841
 
584
842
  // packages/sdk/shell/src/components/InvitationList/InvitationList.tsx
585
- import React11 from "react";
843
+ import React13 from "react";
586
844
  import { List as List3 } from "@dxos/react-ui";
587
- import { mx as mx8 } from "@dxos/react-ui-theme";
845
+ import { mx as mx10 } from "@dxos/react-ui-theme";
588
846
  var InvitationList = ({ invitations, send, ...invitationProps }) => {
589
847
  const { className, InvitationListItem: Item = InvitationListItem } = invitationProps;
590
- return /* @__PURE__ */ React11.createElement(List3, {
591
- classNames: mx8("flex flex-col gap-2", className)
848
+ return /* @__PURE__ */ React13.createElement(List3, {
849
+ classNames: mx10("flex flex-col gap-2", className)
592
850
  }, invitations.map((invitation) => {
593
851
  const value = invitation.get().invitationId;
594
- return /* @__PURE__ */ React11.createElement(Item, {
852
+ return /* @__PURE__ */ React13.createElement(Item, {
595
853
  key: value,
596
854
  send,
597
855
  invitation,
@@ -609,7 +867,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
609
867
  }, [
610
868
  space
611
869
  ]);
612
- return /* @__PURE__ */ React12.createElement(InvitationList, {
870
+ return /* @__PURE__ */ React14.createElement(InvitationList, {
613
871
  invitations,
614
872
  onClickRemove,
615
873
  createInvitationUrl,
@@ -620,9 +878,9 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
620
878
  // packages/sdk/shell/src/components/Panel/Action.tsx
621
879
  import { CaretDown as CaretDown3, Check as Check3, Placeholder } from "@phosphor-icons/react";
622
880
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
623
- import React13, { forwardRef as forwardRef2 } from "react";
624
- import { Button as Button5, DropdownMenu as DropdownMenu2, useTranslation as useTranslation7 } from "@dxos/react-ui";
625
- import { descriptionText as descriptionText4, getSize as getSize5, mx as mx9 } from "@dxos/react-ui-theme";
881
+ import React15, { forwardRef as forwardRef3 } from "react";
882
+ import { Button as Button8, DropdownMenu as DropdownMenu3, useTranslation as useTranslation9 } from "@dxos/react-ui";
883
+ import { descriptionText as descriptionText5, getSize as getSize8, mx as mx11 } from "@dxos/react-ui-theme";
626
884
  var defaultActions = {
627
885
  noopAction: {
628
886
  label: "No-op",
@@ -632,7 +890,7 @@ var defaultActions = {
632
890
  }
633
891
  }
634
892
  };
635
- var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
893
+ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
636
894
  const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, ...rest } = props;
637
895
  const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] = useControllableState3({
638
896
  prop: propsActiveAction,
@@ -640,11 +898,11 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
640
898
  defaultProp: defaultActiveAction
641
899
  });
642
900
  const activeAction = actions[activeActionKey2] ?? {};
643
- const { t } = useTranslation7("os");
644
- return /* @__PURE__ */ React13.createElement("div", {
901
+ const { t } = useTranslation9("os");
902
+ return /* @__PURE__ */ React15.createElement("div", {
645
903
  role: "none",
646
- className: mx9("mbs-2 flex gap-px items-center", isFull && "is-full")
647
- }, /* @__PURE__ */ React13.createElement(Button5, {
904
+ className: mx11("mbs-2 flex gap-px items-center", isFull && "is-full")
905
+ }, /* @__PURE__ */ React15.createElement(Button8, {
648
906
  ...rest,
649
907
  classNames: [
650
908
  "bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",
@@ -653,48 +911,48 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
653
911
  ref: forwardedRef,
654
912
  variant,
655
913
  onClick: activeAction.onClick
656
- }, activeAction.icon && /* @__PURE__ */ React13.createElement(activeAction.icon, {
657
- className: getSize5(5)
658
- }), /* @__PURE__ */ React13.createElement("span", null, activeAction.label)), /* @__PURE__ */ React13.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React13.createElement(DropdownMenu2.Trigger, {
914
+ }, activeAction.icon && /* @__PURE__ */ React15.createElement(activeAction.icon, {
915
+ className: getSize8(5)
916
+ }), /* @__PURE__ */ React15.createElement("span", null, activeAction.label)), /* @__PURE__ */ React15.createElement(DropdownMenu3.Root, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Trigger, {
659
917
  asChild: true
660
- }, /* @__PURE__ */ React13.createElement(Button5, {
918
+ }, /* @__PURE__ */ React15.createElement(Button8, {
661
919
  classNames: [
662
920
  "bs-11 flex-none rounded-is-none",
663
921
  classNames
664
922
  ]
665
- }, /* @__PURE__ */ React13.createElement("span", {
923
+ }, /* @__PURE__ */ React15.createElement("span", {
666
924
  className: "sr-only"
667
- }, t("invite options label")), /* @__PURE__ */ React13.createElement(CaretDown3, {
668
- className: getSize5(4)
669
- }))), /* @__PURE__ */ React13.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React13.createElement(DropdownMenu2.Viewport, null, Object.entries(actions).map(([id, action]) => {
670
- return /* @__PURE__ */ React13.createElement(DropdownMenu2.CheckboxItem, {
925
+ }, t("invite options label")), /* @__PURE__ */ React15.createElement(CaretDown3, {
926
+ className: getSize8(4)
927
+ }))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
928
+ return /* @__PURE__ */ React15.createElement(DropdownMenu3.CheckboxItem, {
671
929
  key: id,
672
930
  "aria-labelledby": `${id}__label`,
673
931
  "aria-describedby": `${id}__description`,
674
932
  checked: activeActionKey2 === id,
675
933
  onCheckedChange: (checked) => checked && setActiveAction(id),
676
934
  classNames: "gap-2"
677
- }, action.icon && /* @__PURE__ */ React13.createElement(action.icon, {
678
- className: getSize5(5)
679
- }), /* @__PURE__ */ React13.createElement("div", {
935
+ }, action.icon && /* @__PURE__ */ React15.createElement(action.icon, {
936
+ className: getSize8(5)
937
+ }), /* @__PURE__ */ React15.createElement("div", {
680
938
  role: "none",
681
939
  className: "flex-1 min-is-0 space-b-1"
682
- }, /* @__PURE__ */ React13.createElement("p", {
940
+ }, /* @__PURE__ */ React15.createElement("p", {
683
941
  id: `${id}__label`
684
- }, action.label), action.description && /* @__PURE__ */ React13.createElement("p", {
942
+ }, action.label), action.description && /* @__PURE__ */ React15.createElement("p", {
685
943
  id: `${id}__description`,
686
- className: descriptionText4
687
- }, action.description)), /* @__PURE__ */ React13.createElement(DropdownMenu2.ItemIndicator, {
944
+ className: descriptionText5
945
+ }, action.description)), /* @__PURE__ */ React15.createElement(DropdownMenu3.ItemIndicator, {
688
946
  asChild: true
689
- }, /* @__PURE__ */ React13.createElement(Check3, {
947
+ }, /* @__PURE__ */ React15.createElement(Check3, {
690
948
  weight: "bold",
691
- className: getSize5(4)
949
+ className: getSize8(4)
692
950
  })));
693
- })), /* @__PURE__ */ React13.createElement(DropdownMenu2.Arrow, null))));
951
+ })), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null))));
694
952
  });
695
- var Action = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
953
+ var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
696
954
  const { children, classNames, variant, isFull = true, ...rest } = props;
697
- return /* @__PURE__ */ React13.createElement(Button5, {
955
+ return /* @__PURE__ */ React15.createElement(Button8, {
698
956
  ...rest,
699
957
  classNames: [
700
958
  isFull && "is-full",
@@ -707,49 +965,49 @@ var Action = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
707
965
  });
708
966
 
709
967
  // packages/sdk/shell/src/components/Panel/Actions.tsx
710
- import React14, { forwardRef as forwardRef3 } from "react";
711
- import { mx as mx10 } from "@dxos/react-ui-theme";
712
- var Actions = /* @__PURE__ */ forwardRef3(({ classNames, children, ...props }, forwardedRef) => {
713
- return /* @__PURE__ */ React14.createElement("div", {
968
+ import React16, { forwardRef as forwardRef4 } from "react";
969
+ import { mx as mx12 } from "@dxos/react-ui-theme";
970
+ var Actions = /* @__PURE__ */ forwardRef4(({ classNames, children, ...props }, forwardedRef) => {
971
+ return /* @__PURE__ */ React16.createElement("div", {
714
972
  ...props,
715
- className: mx10("flex flex-col gap-2 mbs-2", Array.isArray(children) && children.length > 1 ? "justify-between" : "justify-center", classNames),
973
+ className: mx12("flex flex-col gap-2 mbs-2", Array.isArray(children) && children.length > 1 ? "justify-between" : "justify-center", classNames),
716
974
  ref: forwardedRef
717
975
  }, children);
718
976
  });
719
977
 
720
978
  // packages/sdk/shell/src/components/Panel/CloseButton.tsx
721
979
  import { X as X2 } from "@phosphor-icons/react";
722
- import React15 from "react";
723
- import { Button as Button6, useTranslation as useTranslation8 } from "@dxos/react-ui";
724
- import { getSize as getSize6, mx as mx11 } from "@dxos/react-ui-theme";
980
+ import React17 from "react";
981
+ import { Button as Button9, useTranslation as useTranslation10 } from "@dxos/react-ui";
982
+ import { getSize as getSize9, mx as mx13 } from "@dxos/react-ui-theme";
725
983
  var CloseButton = ({ onDone, ...props }) => {
726
- const { t } = useTranslation8("os");
727
- return /* @__PURE__ */ React15.createElement(Button6, {
984
+ const { t } = useTranslation10("os");
985
+ return /* @__PURE__ */ React17.createElement(Button9, {
728
986
  variant: "ghost",
729
- classNames: mx11("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
987
+ classNames: mx13("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
730
988
  onClick: () => onDone?.(),
731
989
  ...props
732
- }, /* @__PURE__ */ React15.createElement(X2, {
990
+ }, /* @__PURE__ */ React17.createElement(X2, {
733
991
  weight: "bold",
734
- className: getSize6(4)
735
- }), /* @__PURE__ */ React15.createElement("span", {
992
+ className: getSize9(4)
993
+ }), /* @__PURE__ */ React17.createElement("span", {
736
994
  className: "sr-only"
737
995
  }, t("exit label")));
738
996
  };
739
997
 
740
998
  // packages/sdk/shell/src/components/Panel/Emoji.tsx
741
- import React16 from "react";
742
- import { mx as mx12, getSize as getSize7 } from "@dxos/react-ui-theme";
999
+ import React18 from "react";
1000
+ import { mx as mx14, getSize as getSize10 } from "@dxos/react-ui-theme";
743
1001
  var Emoji = ({ text, className }) => {
744
1002
  const size = 14;
745
- return /* @__PURE__ */ React16.createElement("div", {
1003
+ return /* @__PURE__ */ React18.createElement("div", {
746
1004
  role: "none",
747
- className: mx12(getSize7(size), "rounded relative pointer-events-none", className)
748
- }, /* @__PURE__ */ React16.createElement("svg", {
1005
+ className: mx14(getSize10(size), "rounded relative pointer-events-none", className)
1006
+ }, /* @__PURE__ */ React18.createElement("svg", {
749
1007
  viewBox: `0 0 ${size * 4} ${size * 4}`,
750
1008
  width: size * 4,
751
1009
  height: size * 4
752
- }, /* @__PURE__ */ React16.createElement("text", {
1010
+ }, /* @__PURE__ */ React18.createElement("text", {
753
1011
  x: "50%",
754
1012
  y: "50%",
755
1013
  textAnchor: "middle",
@@ -760,57 +1018,57 @@ var Emoji = ({ text, className }) => {
760
1018
  };
761
1019
  var Centered = (props) => {
762
1020
  const { children } = props;
763
- return /* @__PURE__ */ React16.createElement("div", {
1021
+ return /* @__PURE__ */ React18.createElement("div", {
764
1022
  role: "none",
765
1023
  className: "absolute inset-0 flex items-center justify-center"
766
1024
  }, children);
767
1025
  };
768
1026
 
769
1027
  // packages/sdk/shell/src/components/Panel/Heading.tsx
770
- import React17, { forwardRef as forwardRef4 } from "react";
771
- import { descriptionText as descriptionText5, mx as mx13 } from "@dxos/react-ui-theme";
772
- var Heading = /* @__PURE__ */ forwardRef4(({ titleId, title, titleSrOnly, children, corner }, forwardedRef) => {
773
- return /* @__PURE__ */ React17.createElement("div", {
1028
+ import React19, { forwardRef as forwardRef5 } from "react";
1029
+ import { descriptionText as descriptionText6, mx as mx15 } from "@dxos/react-ui-theme";
1030
+ var Heading = /* @__PURE__ */ forwardRef5(({ titleId, title, titleSrOnly, children, corner }, forwardedRef) => {
1031
+ return /* @__PURE__ */ React19.createElement("div", {
774
1032
  role: "none",
775
1033
  className: "pbe-2 relative",
776
1034
  ref: forwardedRef
777
- }, corner, /* @__PURE__ */ React17.createElement("h1", {
1035
+ }, corner, /* @__PURE__ */ React19.createElement("h1", {
778
1036
  ...!titleSrOnly && {
779
1037
  id: titleId
780
1038
  },
781
- className: mx13(descriptionText5, "text-center mlb-2", titleSrOnly && "invisible")
782
- }, title), titleSrOnly && /* @__PURE__ */ React17.createElement("span", {
1039
+ className: mx15(descriptionText6, "text-center mlb-2", titleSrOnly && "invisible")
1040
+ }, title), titleSrOnly && /* @__PURE__ */ React19.createElement("span", {
783
1041
  id: titleId
784
1042
  }, title), children);
785
1043
  });
786
1044
 
787
1045
  // packages/sdk/shell/src/components/Panel/Label.tsx
788
- import React18 from "react";
789
- import { descriptionText as descriptionText6, mx as mx14 } from "@dxos/react-ui-theme";
1046
+ import React20 from "react";
1047
+ import { descriptionText as descriptionText7, mx as mx16 } from "@dxos/react-ui-theme";
790
1048
  var Label = (props) => {
791
1049
  const { children } = props;
792
- return /* @__PURE__ */ React18.createElement("span", {
793
- className: mx14(descriptionText6, "text-center mli-6 whitespace-normal")
1050
+ return /* @__PURE__ */ React20.createElement("span", {
1051
+ className: mx16(descriptionText7, "text-center mli-6 whitespace-normal")
794
1052
  }, children);
795
1053
  };
796
1054
 
797
1055
  // packages/sdk/shell/src/components/Panel/Input.tsx
798
- import React19 from "react";
1056
+ import React21 from "react";
799
1057
  import { Input as UiInput } from "@dxos/react-ui";
800
1058
  var Input = ({ validationMessage, label, ...props }) => {
801
- return /* @__PURE__ */ React19.createElement(UiInput.Root, null, /* @__PURE__ */ React19.createElement(UiInput.Label, null, label), /* @__PURE__ */ React19.createElement(UiInput.TextInput, {
1059
+ return /* @__PURE__ */ React21.createElement(UiInput.Root, null, /* @__PURE__ */ React21.createElement(UiInput.Label, null, label), /* @__PURE__ */ React21.createElement(UiInput.TextInput, {
802
1060
  ...props,
803
1061
  classNames: "plb-3 mbs-2 text-center"
804
- }), /* @__PURE__ */ React19.createElement(UiInput.DescriptionAndValidation, null, validationMessage && /* @__PURE__ */ React19.createElement(UiInput.Validation, null, validationMessage)));
1062
+ }), /* @__PURE__ */ React21.createElement(UiInput.DescriptionAndValidation, null, validationMessage && /* @__PURE__ */ React21.createElement(UiInput.Validation, null, validationMessage)));
805
1063
  };
806
1064
 
807
1065
  // packages/sdk/shell/src/components/Panel/StepHeading.tsx
808
- import React20, { forwardRef as forwardRef5 } from "react";
809
- import { mx as mx15 } from "@dxos/react-ui-theme";
810
- var StepHeading = /* @__PURE__ */ forwardRef5(({ children, className, ...props }, forwardedRef) => {
811
- return /* @__PURE__ */ React20.createElement("h2", {
1066
+ import React22, { forwardRef as forwardRef6 } from "react";
1067
+ import { mx as mx17 } from "@dxos/react-ui-theme";
1068
+ var StepHeading = /* @__PURE__ */ forwardRef6(({ children, className, ...props }, forwardedRef) => {
1069
+ return /* @__PURE__ */ React22.createElement("h2", {
812
1070
  ...props,
813
- className: mx15("font-normal text-sm mbe-4 mli-1 text-center", className),
1071
+ className: mx17("font-normal text-sm mbe-4 mli-1 text-center", className),
814
1072
  ref: forwardedRef
815
1073
  }, children);
816
1074
  });
@@ -819,9 +1077,9 @@ var StepHeading = /* @__PURE__ */ forwardRef5(({ children, className, ...props }
819
1077
  import { useFocusFinders } from "@fluentui/react-tabster";
820
1078
  import { createContextScope } from "@radix-ui/react-context";
821
1079
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
822
- import React21, { forwardRef as forwardRef6, useEffect } from "react";
1080
+ import React23, { forwardRef as forwardRef7, useEffect } from "react";
823
1081
  import { useForwardedRef } from "@dxos/react-ui";
824
- import { mx as mx16 } from "@dxos/react-ui-theme";
1082
+ import { mx as mx18 } from "@dxos/react-ui-theme";
825
1083
  var VIEWPORT_NAME = "Viewport";
826
1084
  var VIEWS_NAME = "ViewportViews";
827
1085
  var VIEW_NAME = "ViewportView";
@@ -833,16 +1091,16 @@ var ViewportRoot = ({ __viewportScope, classNames, children, defaultActiveView,
833
1091
  defaultProp: defaultActiveView,
834
1092
  onChange: onActiveViewChange
835
1093
  });
836
- return /* @__PURE__ */ React21.createElement(ViewportProvider, {
1094
+ return /* @__PURE__ */ React23.createElement(ViewportProvider, {
837
1095
  focusManaged,
838
1096
  activeView,
839
1097
  setActiveView,
840
1098
  scope: __viewportScope
841
- }, /* @__PURE__ */ React21.createElement("div", {
1099
+ }, /* @__PURE__ */ React23.createElement("div", {
842
1100
  role: "region",
843
1101
  "aria-live": "polite",
844
1102
  ...props,
845
- className: mx16("is-full overflow-hidden", classNames)
1103
+ className: mx18("is-full overflow-hidden", classNames)
846
1104
  }, children));
847
1105
  };
848
1106
  ViewportRoot.displayName = VIEWPORT_NAME;
@@ -850,15 +1108,15 @@ var ViewportViews = ({ classNames, children, ...props }) => {
850
1108
  const size = {
851
1109
  inlineSize: `${Math.ceil(children.length) * 100}%`
852
1110
  };
853
- return /* @__PURE__ */ React21.createElement("div", {
1111
+ return /* @__PURE__ */ React23.createElement("div", {
854
1112
  role: "none",
855
1113
  style: size,
856
1114
  ...props,
857
- className: mx16("flex", classNames)
1115
+ className: mx18("flex", classNames)
858
1116
  }, children);
859
1117
  };
860
1118
  ViewportViews.displayName = VIEWS_NAME;
861
- var ViewportView = /* @__PURE__ */ forwardRef6(({ __viewportScope, classNames, children, id, ...props }, forwardedRef) => {
1119
+ var ViewportView = /* @__PURE__ */ forwardRef7(({ __viewportScope, classNames, children, id, ...props }, forwardedRef) => {
862
1120
  const { activeView, focusManaged } = useViewportContext(VIEW_NAME, __viewportScope);
863
1121
  const isActive = id === activeView;
864
1122
  const ref = useForwardedRef(forwardedRef);
@@ -872,12 +1130,12 @@ var ViewportView = /* @__PURE__ */ forwardRef6(({ __viewportScope, classNames, c
872
1130
  ref.current,
873
1131
  isActive
874
1132
  ]);
875
- return /* @__PURE__ */ React21.createElement("section", {
1133
+ return /* @__PURE__ */ React23.createElement("section", {
876
1134
  ...props,
877
1135
  ...!isActive && {
878
1136
  "aria-hidden": true
879
1137
  },
880
- className: mx16("min-is-0 flex-1 flex flex-col", isActive ? "order-2" : "order-4 invisible", classNames),
1138
+ className: mx18("min-is-0 flex-1 flex flex-col", isActive ? "order-2" : "order-4 invisible", classNames),
881
1139
  ref
882
1140
  }, children);
883
1141
  });
@@ -889,41 +1147,44 @@ var Viewport = {
889
1147
  };
890
1148
 
891
1149
  // packages/sdk/shell/src/components/SpaceListItem.tsx
892
- import React22, { forwardRef as forwardRef7 } from "react";
893
- import { Avatar as Avatar3, useId as useId3 } from "@dxos/react-ui";
894
- import { mx as mx17 } from "@dxos/react-ui-theme";
1150
+ import React24, { forwardRef as forwardRef8 } from "react";
1151
+ import { Avatar as Avatar5, useId as useId4 } from "@dxos/react-ui";
1152
+ import { mx as mx19 } from "@dxos/react-ui-theme";
895
1153
  import { humanize, keyToEmoji } from "@dxos/util";
896
- var SpaceListItem = /* @__PURE__ */ forwardRef7(({ space, onClick }, ref) => {
1154
+ var SpaceListItem = /* @__PURE__ */ forwardRef8(({ space, onClick }, ref) => {
897
1155
  const fallbackValue = keyToEmoji(space.key);
898
- const labelId = useId3("identityListItem__label");
1156
+ const labelId = useId4("identityListItem__label");
899
1157
  const displayName = space.properties.name ?? humanize(space.key.toHex());
900
- return /* @__PURE__ */ React22.createElement("li", {
901
- className: mx17("flex gap-2 items-center mbe-2", onClick && "cursor-pointer"),
1158
+ return /* @__PURE__ */ React24.createElement("li", {
1159
+ className: mx19("flex gap-2 items-center mbe-2", onClick && "cursor-pointer"),
902
1160
  onClick: () => onClick?.(),
903
1161
  ref,
904
1162
  "data-testid": "space-list-item"
905
- }, /* @__PURE__ */ React22.createElement(Avatar3.Root, {
1163
+ }, /* @__PURE__ */ React24.createElement(Avatar5.Root, {
906
1164
  labelId
907
- }, /* @__PURE__ */ React22.createElement(Avatar3.Frame, null, /* @__PURE__ */ React22.createElement(Avatar3.Fallback, {
1165
+ }, /* @__PURE__ */ React24.createElement(Avatar5.Frame, null, /* @__PURE__ */ React24.createElement(Avatar5.Fallback, {
908
1166
  text: fallbackValue
909
- })), /* @__PURE__ */ React22.createElement(Avatar3.Label, {
1167
+ })), /* @__PURE__ */ React24.createElement(Avatar5.Label, {
910
1168
  classNames: "text-sm truncate"
911
1169
  }, displayName)));
912
1170
  });
913
1171
 
914
1172
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
915
1173
  import React42 from "react";
916
- import { Dialog, useId as useId9 } from "@dxos/react-ui";
1174
+ import { Dialog, useId as useId10 } from "@dxos/react-ui";
917
1175
 
918
1176
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
919
- import React29, { useEffect as useEffect3, useMemo as useMemo3 } from "react";
1177
+ import { CopySimple, Plugs, PlugsConnected } from "@phosphor-icons/react";
1178
+ import React29, { useEffect as useEffect3, useMemo as useMemo3, useState as useState8 } from "react";
920
1179
  import { generateName as generateName3 } from "@dxos/display-name";
921
- import { log as log5 } from "@dxos/log";
1180
+ import { log as log6 } from "@dxos/log";
922
1181
  import { useClient as useClient3 } from "@dxos/react-client";
923
1182
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
924
1183
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
925
- import { Avatar as Avatar4, DensityProvider as DensityProvider2, useId as useId5, useTranslation as useTranslation15 } from "@dxos/react-ui";
926
- import { keyToFallback as keyToFallback2 } from "@dxos/util";
1184
+ import { useNetworkStatus, ConnectionState } from "@dxos/react-client/mesh";
1185
+ import { Avatar as Avatar6, DensityProvider, Input as Input2, Toolbar as Toolbar3, Tooltip as Tooltip6, useId as useId6, useTranslation as useTranslation14 } from "@dxos/react-ui";
1186
+ import { getSize as getSize13 } from "@dxos/react-ui-theme";
1187
+ import { hexToEmoji as hexToEmoji4, hexToHue as hexToHue2, keyToFallback as keyToFallback3 } from "@dxos/util";
927
1188
 
928
1189
  // packages/sdk/shell/src/panels/IdentityPanel/identityMachine.ts
929
1190
  import { useMachine } from "@xstate/react";
@@ -942,37 +1203,23 @@ var identityMachine = createMachine({
942
1203
  src: (context) => context.identitySubscribable
943
1204
  },
944
1205
  states: {
945
- choosingAction: {},
946
- managingDeviceInvitation: {},
947
- managingAgent: {
948
- initial: "idle",
949
- states: {
950
- idle: {},
951
- pending: {}
952
- }
953
- },
954
- managingDevices: {},
955
- managingProfile: {
956
- initial: "idle",
957
- states: {
958
- idle: {},
959
- pending: {}
960
- },
961
- on: {
962
- setIdentity: {
963
- target: "choosingAction",
964
- actions: [
965
- "setIdentity",
966
- "log"
967
- ]
1206
+ unknown: {
1207
+ always: [
1208
+ {
1209
+ cond: "initiallyManagingDeviceInvitation",
1210
+ target: "managingDeviceInvitation",
1211
+ actions: "log"
968
1212
  },
969
- updateProfile: {
970
- target: ".pending",
1213
+ {
1214
+ target: "choosingAction",
971
1215
  actions: "log"
972
1216
  }
973
- }
1217
+ ]
974
1218
  },
975
- signingOut: {}
1219
+ choosingAction: {},
1220
+ managingDeviceInvitation: {},
1221
+ confirmingResetStorage: {},
1222
+ confirmingJoinNewIdentity: {}
976
1223
  },
977
1224
  on: {
978
1225
  unchooseAction: {
@@ -996,24 +1243,19 @@ var identityMachine = createMachine({
996
1243
  "log"
997
1244
  ]
998
1245
  },
999
- chooseDevices: {
1000
- target: ".managingDevices",
1001
- actions: "log"
1002
- },
1003
- chooseProfile: {
1004
- target: ".managingProfile",
1005
- actions: "log"
1006
- },
1007
- chooseSignOut: {
1008
- target: ".signingOut",
1246
+ chooseJoinNewIdentity: {
1247
+ target: ".confirmingJoinNewIdentity",
1009
1248
  actions: "log"
1010
1249
  },
1011
- chooseAgent: {
1012
- target: ".managingAgent",
1250
+ chooseResetStorage: {
1251
+ target: ".confirmingResetStorage",
1013
1252
  actions: "log"
1014
1253
  }
1015
1254
  }
1016
1255
  }, {
1256
+ guards: {
1257
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation"
1258
+ },
1017
1259
  actions: {
1018
1260
  setIdentity: assign({
1019
1261
  identity: (context, event) => event?.identity ?? null
@@ -1030,7 +1272,7 @@ var identityMachine = createMachine({
1030
1272
  context
1031
1273
  }, {
1032
1274
  F: __dxlog_file,
1033
- L: 104,
1275
+ L: 96,
1034
1276
  S: void 0,
1035
1277
  C: (f, a) => f(...a)
1036
1278
  });
@@ -1051,69 +1293,12 @@ var useIdentityMachine = (client, options) => {
1051
1293
  });
1052
1294
  };
1053
1295
 
1054
- // packages/sdk/shell/src/panels/IdentityPanel/steps/AgentForm.tsx
1055
- import React23 from "react";
1056
- import { useTranslation as useTranslation9 } from "@dxos/react-ui";
1057
- var AgentForm = (props) => {
1058
- const { active, onAgentCreate, onAgentDestroy, send, validationMessage, agentStatus, agentActive, agentProviderDisabled } = props;
1059
- const disabled = !active;
1060
- const { t } = useTranslation9("os");
1061
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", {
1062
- role: "none",
1063
- className: "grow flex flex-col justify-center"
1064
- }, /* @__PURE__ */ React23.createElement(Input, {
1065
- validationMessage,
1066
- label: /* @__PURE__ */ React23.createElement(StepHeading, null, "Agent Status"),
1067
- disabled,
1068
- "data-testid": "agent-status",
1069
- value: agentStatus
1070
- })), /* @__PURE__ */ React23.createElement(Actions, null, /* @__PURE__ */ React23.createElement(Action, {
1071
- disabled: agentActive || agentProviderDisabled,
1072
- onClick: () => onAgentCreate?.(),
1073
- "data-testid": "create-agent"
1074
- }, "Create Agent"), /* @__PURE__ */ React23.createElement(Action, {
1075
- disabled: !agentActive || agentProviderDisabled,
1076
- onClick: () => onAgentDestroy?.(),
1077
- "data-testid": "destroy-agent"
1078
- }, "Destroy Agent"), /* @__PURE__ */ React23.createElement(Action, {
1079
- disabled,
1080
- onClick: () => send?.({
1081
- type: "unchooseAction"
1082
- }),
1083
- "data-testid": "update-profile-form-back"
1084
- }, t("back label"))));
1085
- };
1086
-
1087
- // packages/sdk/shell/src/panels/IdentityPanel/steps/DeviceManager.tsx
1088
- import React24 from "react";
1089
- import { useTranslation as useTranslation10 } from "@dxos/react-ui";
1090
- var DeviceManager = ({ devices, active, send }) => {
1091
- const { t } = useTranslation10("os");
1092
- const disabled = !active;
1093
- return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", {
1094
- role: "none",
1095
- className: "grow"
1096
- }, /* @__PURE__ */ React24.createElement(DeviceList, {
1097
- devices
1098
- })), /* @__PURE__ */ React24.createElement(Actions, null, /* @__PURE__ */ React24.createElement(Action, {
1099
- variant: "ghost",
1100
- disabled,
1101
- onClick: () => send?.({
1102
- type: "unchooseAction"
1103
- }),
1104
- "data-testid": "manage-devices-back"
1105
- }, t("back label"))));
1106
- };
1107
-
1108
1296
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1109
- import { CaretRight, Devices, Plus, Power, UserGear, HardDrive } from "@phosphor-icons/react";
1110
1297
  import React25, { useCallback as useCallback4 } from "react";
1111
1298
  import { log as log2 } from "@dxos/log";
1112
1299
  import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
1113
1300
  import { useHaloInvitations } from "@dxos/react-client/halo";
1114
1301
  import { Invitation as Invitation2, InvitationEncoder } from "@dxos/react-client/invitations";
1115
- import { DensityProvider, useTranslation as useTranslation11 } from "@dxos/react-ui";
1116
- import { getSize as getSize8 } from "@dxos/react-ui-theme";
1117
1302
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx";
1118
1303
  var IdentityActionChooser = (props) => {
1119
1304
  const { send } = props;
@@ -1125,269 +1310,67 @@ var IdentityActionChooser = (props) => {
1125
1310
  if (invitation.state === Invitation2.State.CONNECTING) {
1126
1311
  log2.info(JSON.stringify({
1127
1312
  invitationCode,
1128
- authCode: invitation.authCode
1129
- }), void 0, {
1130
- F: __dxlog_file2,
1131
- L: 28,
1132
- S: void 0,
1133
- C: (f, a) => f(...a)
1134
- });
1135
- }
1136
- }, []);
1137
- const createInvitation = (e) => {
1138
- const testing = e.altKey && e.shiftKey;
1139
- invitations.forEach((invitation2) => invitation2.cancel());
1140
- const invitation = client.halo.share(testing ? {
1141
- type: Invitation2.Type.MULTIUSE,
1142
- authMethod: Invitation2.AuthMethod.NONE
1143
- } : void 0);
1144
- if (true) {
1145
- invitation.subscribe(onInvitationEvent);
1146
- }
1147
- send?.({
1148
- type: "selectInvitation",
1149
- invitation
1150
- });
1151
- };
1152
- return /* @__PURE__ */ React25.createElement(IdentityActionChooserImpl, {
1153
- ...props,
1154
- onCreateInvitationClick: (e) => createInvitation(e),
1155
- agentHostingEnabled: !!agentHostingProviderClient
1156
- });
1157
- };
1158
- var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone, doneActionParent, agentHostingEnabled }) => {
1159
- const { t } = useTranslation11("os");
1160
- return /* @__PURE__ */ React25.createElement("div", {
1161
- role: "none",
1162
- className: "grow flex flex-col gap-1"
1163
- }, /* @__PURE__ */ React25.createElement(DensityProvider, {
1164
- density: "coarse"
1165
- }, /* @__PURE__ */ React25.createElement("div", {
1166
- className: "grow justify-center flex flex-col gap-1"
1167
- }, agentHostingEnabled && /* @__PURE__ */ React25.createElement(Action, {
1168
- "data-testid": "manage-agent",
1169
- onClick: () => send?.({
1170
- type: "chooseAgent"
1171
- }),
1172
- classNames: "plb-4"
1173
- }, /* @__PURE__ */ React25.createElement(HardDrive, {
1174
- className: getSize8(6)
1175
- }), /* @__PURE__ */ React25.createElement("span", {
1176
- className: "grow mli-3"
1177
- }, "Manage Agent"), /* @__PURE__ */ React25.createElement(CaretRight, {
1178
- weight: "bold",
1179
- className: getSize8(4)
1180
- })), /* @__PURE__ */ React25.createElement(Action, {
1181
- disabled: !active,
1182
- "data-testid": "devices-panel.create-invitation",
1183
- onClick: onCreateInvitationClick,
1184
- classNames: "plb-4"
1185
- }, /* @__PURE__ */ React25.createElement(Plus, {
1186
- className: getSize8(6)
1187
- }), /* @__PURE__ */ React25.createElement("span", {
1188
- className: "grow mli-3"
1189
- }, t("choose add device label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1190
- weight: "bold",
1191
- className: getSize8(4)
1192
- })), /* @__PURE__ */ React25.createElement(Action, {
1193
- "data-testid": "manage-devices",
1194
- onClick: () => send?.({
1195
- type: "chooseDevices"
1196
- }),
1197
- classNames: "plb-4"
1198
- }, /* @__PURE__ */ React25.createElement(Devices, {
1199
- className: getSize8(6)
1200
- }), /* @__PURE__ */ React25.createElement("span", {
1201
- className: "grow mli-3"
1202
- }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1203
- weight: "bold",
1204
- className: getSize8(4)
1205
- })), /* @__PURE__ */ React25.createElement(Action, {
1206
- "data-testid": "manage-profile",
1207
- onClick: () => send?.({
1208
- type: "chooseProfile"
1209
- }),
1210
- classNames: "plb-4"
1211
- }, /* @__PURE__ */ React25.createElement(UserGear, {
1212
- className: getSize8(6)
1213
- }), /* @__PURE__ */ React25.createElement("span", {
1214
- className: "grow mli-3"
1215
- }, t("choose profile label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1216
- weight: "bold",
1217
- className: getSize8(4)
1218
- })), /* @__PURE__ */ React25.createElement(Action, {
1219
- "data-testid": "devices-panel.sign-out",
1220
- onClick: () => send?.({
1221
- type: "chooseSignOut"
1222
- }),
1223
- classNames: "plb-4"
1224
- }, /* @__PURE__ */ React25.createElement(Power, {
1225
- className: getSize8(6)
1226
- }), /* @__PURE__ */ React25.createElement("span", {
1227
- className: "grow mli-3"
1228
- }, t("choose sign out label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1229
- weight: "bold",
1230
- className: getSize8(4)
1231
- })))));
1232
- };
1233
-
1234
- // packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
1235
- import React26, { useState as useState4 } from "react";
1236
- import { log as log3 } from "@dxos/log";
1237
- import { useTranslation as useTranslation12 } from "@dxos/react-ui";
1238
- import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
1239
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx";
1240
- var ProfileForm = (props) => {
1241
- const { onUpdateProfile } = props;
1242
- const { t } = useTranslation12("os");
1243
- const [validationMessage, setValidationMessage] = useState4("");
1244
- const handleUpdateProfile = async (profile) => {
1245
- await onUpdateProfile?.(profile).catch((error) => {
1246
- log3.catch(error, void 0, {
1247
- F: __dxlog_file3,
1248
- L: 33,
1249
- S: void 0,
1250
- C: (f, a) => f(...a)
1251
- });
1252
- setValidationMessage(t("failed to update profile message"));
1253
- });
1254
- };
1255
- return /* @__PURE__ */ React26.createElement(ProfileFormImpl, {
1256
- ...props,
1257
- onUpdateProfile: handleUpdateProfile,
1258
- validationMessage
1259
- });
1260
- };
1261
- var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue(identity?.identityKey.toHex() ?? "0");
1262
- var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji2(identity?.identityKey.toHex() ?? "0");
1263
- var ProfileFormImpl = (props) => {
1264
- const { active, identity, send, onUpdateProfile, validationMessage } = props;
1265
- const profile = identity?.profile;
1266
- const disabled = !active;
1267
- const { t } = useTranslation12("os");
1268
- const [displayName, setDisplayName] = useState4(profile?.displayName ?? "");
1269
- const [hue, setHue] = useState4(getHueValue(identity));
1270
- const [emoji, setEmoji] = useState4(getEmojiValue(identity));
1271
- const { textValue, setTextValue } = useClipboardContext();
1272
- const identityHex = identity?.identityKey.toHex();
1273
- const copied = textValue === identityHex;
1274
- return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement("div", {
1275
- role: "none",
1276
- className: "grow flex flex-col justify-center"
1277
- }, /* @__PURE__ */ React26.createElement(Input, {
1278
- validationMessage,
1279
- label: /* @__PURE__ */ React26.createElement(StepHeading, {
1280
- className: "m-0"
1281
- }, t("display name input label")),
1282
- disabled,
1283
- "data-testid": "display-name-input",
1284
- placeholder: t("display name input placeholder"),
1285
- value: displayName,
1286
- onChange: ({ target: { value } }) => setDisplayName(value)
1287
- }), /* @__PURE__ */ React26.createElement(StepHeading, {
1288
- className: "mbe-2"
1289
- }, t("emoji and color label")), /* @__PURE__ */ React26.createElement("div", {
1290
- role: "none",
1291
- className: "grid grid-cols-[1fr_min-content] gap-y-2"
1292
- }, /* @__PURE__ */ React26.createElement(EmojiPicker, {
1293
- emoji,
1294
- onChangeEmoji: setEmoji,
1295
- disabled,
1296
- onClickClear: () => setEmoji(getEmojiValue(identity))
1297
- }), /* @__PURE__ */ React26.createElement(HuePicker, {
1298
- hue,
1299
- onChangeHue: setHue,
1300
- disabled,
1301
- onClickClear: () => setHue(getHueValue(identity))
1302
- }))), /* @__PURE__ */ React26.createElement(Actions, null, /* @__PURE__ */ React26.createElement(Action, {
1303
- variant: "ghost",
1304
- disabled,
1305
- onClick: () => {
1306
- if (identityHex) {
1307
- void setTextValue(identityHex);
1308
- }
1309
- },
1310
- "data-testid": "update-profile-form-copy-key"
1311
- }, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React26.createElement(Action, {
1312
- variant: "ghost",
1313
- disabled,
1314
- onClick: () => send?.({
1315
- type: "unchooseAction"
1316
- }),
1317
- "data-testid": "update-profile-form-back"
1318
- }, t("back label")), /* @__PURE__ */ React26.createElement(Action, {
1319
- variant: "primary",
1320
- disabled,
1321
- onClick: () => onUpdateProfile?.({
1322
- displayName,
1323
- data: {
1324
- emoji,
1325
- hue
1326
- }
1327
- }),
1328
- "data-testid": "update-profile-form-continue"
1329
- }, t("done label"))));
1330
- };
1331
-
1332
- // packages/sdk/shell/src/panels/IdentityPanel/steps/SignOutChooser.tsx
1333
- import { Warning } from "@phosphor-icons/react";
1334
- import React27 from "react";
1335
- import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1336
- import { getSize as getSize9, mx as mx18 } from "@dxos/react-ui-theme";
1337
- var SignOutChooser = (props) => {
1338
- const { t } = useTranslation13("os");
1339
- const onResetDevice = () => {
1340
- if (window.confirm(t("reset device confirm message"))) {
1341
- void props.onResetDevice?.();
1313
+ authCode: invitation.authCode
1314
+ }), void 0, {
1315
+ F: __dxlog_file2,
1316
+ L: 25,
1317
+ S: void 0,
1318
+ C: (f, a) => f(...a)
1319
+ });
1320
+ }
1321
+ }, []);
1322
+ const createInvitation = () => {
1323
+ invitations.forEach((invitation2) => invitation2.cancel());
1324
+ const invitation = client.halo.share();
1325
+ if (true) {
1326
+ invitation.subscribe(onInvitationEvent);
1342
1327
  }
1328
+ send?.({
1329
+ type: "selectInvitation",
1330
+ invitation
1331
+ });
1343
1332
  };
1344
- return /* @__PURE__ */ React27.createElement(SignOutChooserImpl, {
1345
- disabled: !props.active,
1346
- onBack: () => props.send?.({
1347
- type: "unchooseAction"
1348
- }),
1349
- onResetDevice,
1350
- onJoinNewIdentity: props.onJoinNewIdentity
1333
+ return /* @__PURE__ */ React25.createElement(IdentityActionChooserImpl, {
1334
+ ...props,
1335
+ onCreateInvitationClick: createInvitation,
1336
+ agentHostingEnabled: !!agentHostingProviderClient
1351
1337
  });
1352
1338
  };
1353
- var SignOutChooserImpl = ({ disabled, onResetDevice, onJoinNewIdentity, onBack }) => {
1354
- const { t } = useTranslation13("os");
1355
- return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("div", {
1356
- role: "none",
1357
- className: "grow flex flex-col justify-center"
1358
- }, /* @__PURE__ */ React27.createElement(Message.Root, {
1359
- valence: "error"
1360
- }, /* @__PURE__ */ React27.createElement(Message.Title, null, /* @__PURE__ */ React27.createElement(Warning, {
1361
- className: mx18(getSize9(6), "inline mie-2")
1362
- }), t("sign out chooser title")), /* @__PURE__ */ React27.createElement(Message.Body, null, t("sign out chooser message")))), /* @__PURE__ */ React27.createElement(Actions, null, /* @__PURE__ */ React27.createElement(Action, {
1363
- disabled,
1364
- onClick: onBack
1365
- }, t("back label")), /* @__PURE__ */ React27.createElement(Action, {
1366
- variant: "primary",
1367
- "data-testid": "sign-out.join-new-identity",
1368
- classNames: "!bg-error-500 hover:!bg-error-550",
1369
- disabled,
1370
- onClick: onJoinNewIdentity
1371
- }, t("join new identity label")), /* @__PURE__ */ React27.createElement(Action, {
1372
- variant: "primary",
1373
- "data-testid": "sign-out.reset-device",
1374
- classNames: "!bg-error-500 hover:!bg-error-550",
1375
- disabled,
1376
- onClick: onResetDevice
1377
- }, t("reset device label"))));
1339
+ var IdentityActionChooserImpl = ({ send, onCreateInvitationClick, devices, onAgentDestroy, onAgentCreate, agentStatus, agentActive, agentHostingEnabled }) => {
1340
+ return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(DeviceList, {
1341
+ devices,
1342
+ onClickAdd: onCreateInvitationClick,
1343
+ onClickJoinExisting: () => send?.({
1344
+ type: "chooseJoinNewIdentity"
1345
+ }),
1346
+ onClickReset: () => send?.({
1347
+ type: "chooseResetStorage"
1348
+ })
1349
+ }), agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, {
1350
+ agentActive,
1351
+ agentStatus,
1352
+ onAgentDestroy,
1353
+ onAgentCreate
1354
+ }));
1378
1355
  };
1379
1356
 
1357
+ // packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
1358
+ import React26, { useState as useState5 } from "react";
1359
+ import { log as log3 } from "@dxos/log";
1360
+ import { useTranslation as useTranslation11 } from "@dxos/react-ui";
1361
+ import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
1362
+
1380
1363
  // packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
1381
- import { useCallback as useCallback5, useEffect as useEffect2, useState as useState5 } from "react";
1364
+ import { useCallback as useCallback5, useEffect as useEffect2, useState as useState6 } from "react";
1382
1365
  import { invariant } from "@dxos/invariant";
1383
1366
  import { log as log4 } from "@dxos/log";
1384
1367
  import { useAgentHostingProviderClient as useAgentHostingProviderClient2 } from "@dxos/react-client";
1385
1368
  import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
1386
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
1369
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
1387
1370
  var useAgentHandlers = ({ client, invitations, identity }) => {
1388
- const [validationMessage, setValidationMessage] = useState5("");
1389
- const [agentStatus, setAgentStatus] = useState5("");
1390
- const [agentActive, setAgentActive] = useState5(false);
1371
+ const [validationMessage, setValidationMessage] = useState6("");
1372
+ const [agentStatus, setAgentStatus] = useState6("");
1373
+ const [agentActive, setAgentActive] = useState6(false);
1391
1374
  const agentHostingProviderClient = useAgentHostingProviderClient2(client.config);
1392
1375
  useEffect2(() => {
1393
1376
  const fetchAgentStatus = async () => {
@@ -1413,13 +1396,13 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1413
1396
  invitationCode,
1414
1397
  authCode: invitation.authCode
1415
1398
  }), void 0, {
1416
- F: __dxlog_file4,
1399
+ F: __dxlog_file3,
1417
1400
  L: 50,
1418
1401
  S: void 0,
1419
1402
  C: (f, a) => f(...a)
1420
1403
  });
1421
1404
  invariant(identity, "Identity not found", {
1422
- F: __dxlog_file4,
1405
+ F: __dxlog_file3,
1423
1406
  L: 51,
1424
1407
  S: void 0,
1425
1408
  A: [
@@ -1442,16 +1425,17 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1442
1425
  const onAgentCreate = async () => {
1443
1426
  invitations.forEach((invitation2) => invitation2.cancel());
1444
1427
  const invitation = client.halo.share({
1445
- type: Invitation3.Type.MULTIUSE,
1446
- authMethod: Invitation3.AuthMethod.NONE
1428
+ type: Invitation3.Type.INTERACTIVE,
1429
+ authMethod: Invitation3.AuthMethod.NONE,
1430
+ multiUse: true
1447
1431
  });
1448
1432
  invitation.subscribe(handleAgentCreate);
1449
1433
  };
1450
1434
  const onAgentDestroy = async () => {
1451
1435
  const identity2 = client.halo.identity.get();
1452
1436
  invariant(identity2, "Identity not found", {
1453
- F: __dxlog_file4,
1454
- L: 77,
1437
+ F: __dxlog_file3,
1438
+ L: 81,
1455
1439
  S: void 0,
1456
1440
  A: [
1457
1441
  "identity",
@@ -1478,11 +1462,10 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1478
1462
 
1479
1463
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1480
1464
  import { Check as Check4, X as X3 } from "@phosphor-icons/react";
1481
- import React28, { useMemo as useMemo2 } from "react";
1465
+ import React27, { useMemo as useMemo2 } from "react";
1482
1466
  import { QR } from "react-qr-rounded";
1483
- import { Invitation as Invitation5 } from "@dxos/react-client/invitations";
1484
- import { useId as useId4, useTranslation as useTranslation14 } from "@dxos/react-ui";
1485
- import { descriptionText as descriptionText7, getSize as getSize10, mx as mx19 } from "@dxos/react-ui-theme";
1467
+ import { useId as useId5, useTranslation as useTranslation12 } from "@dxos/react-ui";
1468
+ import { descriptionText as descriptionText8, getSize as getSize11, mx as mx20 } from "@dxos/react-ui-theme";
1486
1469
  import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
1487
1470
 
1488
1471
  // packages/sdk/shell/src/util/invitationStatusValue.ts
@@ -1528,15 +1511,15 @@ var invitationStatusValue = /* @__PURE__ */ new Map([
1528
1511
 
1529
1512
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1530
1513
  var InvitationManagerView = ({ children, ...props }) => {
1531
- return /* @__PURE__ */ React28.createElement(Viewport.View, {
1514
+ return /* @__PURE__ */ React27.createElement(Viewport.View, {
1532
1515
  ...props,
1533
1516
  classNames: "grow flex flex-col justify-around items-center"
1534
1517
  }, children);
1535
1518
  };
1536
- var InvitationManager = ({ invitationUrl, active, send, status, type, authCode, id = "0" }) => {
1537
- const { t } = useTranslation14("os");
1538
- const qrLabel = useId4("invitation-manager__qr-code");
1539
- const statusValue = type === Invitation5.Type.MULTIUSE ? 0 : invitationStatusValue.get(status) ?? 0;
1519
+ var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCode, id = "0" }) => {
1520
+ const { t } = useTranslation12("os");
1521
+ const qrLabel = useId5("invitation-manager__qr-code");
1522
+ const statusValue = multiUse ? 0 : invitationStatusValue.get(status) ?? 0;
1540
1523
  const showAuthCode = statusValue === 3;
1541
1524
  const emoji = hexToEmoji3(id);
1542
1525
  const activeView = useMemo2(() => {
@@ -1552,50 +1535,50 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1552
1535
  }, [
1553
1536
  statusValue
1554
1537
  ]);
1555
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Viewport.Root, {
1538
+ return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(Viewport.Root, {
1556
1539
  activeView,
1557
1540
  classNames: "grow plb-1"
1558
- }, /* @__PURE__ */ React28.createElement(Viewport.Views, null, /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1541
+ }, /* @__PURE__ */ React27.createElement(Viewport.Views, null, /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1559
1542
  id: "showing qr",
1560
1543
  emoji
1561
- }, /* @__PURE__ */ React28.createElement("p", {
1544
+ }, /* @__PURE__ */ React27.createElement("p", {
1562
1545
  className: "text-sm mlb-1 font-normal text-center"
1563
- }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React28.createElement("div", {
1546
+ }, t(multiUse ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1564
1547
  role: "none",
1565
- className: mx19(descriptionText7, "is-full max-is-[14rem] relative")
1566
- }, /* @__PURE__ */ React28.createElement(QR, {
1548
+ className: mx20(descriptionText8, "is-full max-is-[14rem] relative")
1549
+ }, /* @__PURE__ */ React27.createElement(QR, {
1567
1550
  rounding: 100,
1568
1551
  backgroundColor: "transparent",
1569
1552
  color: "currentColor",
1570
- className: mx19("is-full bs-full p-2", showAuthCode && "invisible"),
1553
+ className: mx20("is-full bs-full p-2", showAuthCode && "invisible"),
1571
1554
  "aria-labelledby": qrLabel,
1572
1555
  errorCorrectionLevel: "Q",
1573
1556
  cutout: true
1574
- }, invitationUrl ?? "never"), /* @__PURE__ */ React28.createElement(Centered, null, /* @__PURE__ */ React28.createElement(Emoji, {
1557
+ }, invitationUrl ?? "never"), /* @__PURE__ */ React27.createElement(Centered, null, /* @__PURE__ */ React27.createElement(Emoji, {
1575
1558
  text: emoji
1576
- }))), /* @__PURE__ */ React28.createElement("span", {
1559
+ }))), /* @__PURE__ */ React27.createElement("span", {
1577
1560
  id: qrLabel,
1578
1561
  className: "sr-only"
1579
- }, t("qr label")), /* @__PURE__ */ React28.createElement(CopyButton, {
1562
+ }, t("qr label")), /* @__PURE__ */ React27.createElement(CopyButton, {
1580
1563
  variant: "ghost",
1581
1564
  value: invitationUrl ?? "never"
1582
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1565
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1583
1566
  id: "showing auth code"
1584
- }, /* @__PURE__ */ React28.createElement(Label, null, t("auth code message")), /* @__PURE__ */ React28.createElement(AuthCode, {
1567
+ }, /* @__PURE__ */ React27.createElement(Label, null, t("auth code message")), /* @__PURE__ */ React27.createElement(AuthCode, {
1585
1568
  code: authCode,
1586
1569
  large: true,
1587
1570
  classNames: "text-black dark:text-white"
1588
- }), /* @__PURE__ */ React28.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React28.createElement(Emoji, {
1571
+ }), /* @__PURE__ */ React27.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React27.createElement(Emoji, {
1589
1572
  text: emoji
1590
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1573
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1591
1574
  id: "showing final"
1592
- }, statusValue > 0 ? /* @__PURE__ */ React28.createElement(Check4, {
1593
- className: mx19("m-1.5", getSize10(6))
1594
- }) : /* @__PURE__ */ React28.createElement(X3, {
1595
- className: mx19("m-1.5", getSize10(6))
1596
- })))), /* @__PURE__ */ React28.createElement(Actions, {
1575
+ }, statusValue > 0 ? /* @__PURE__ */ React27.createElement(Check4, {
1576
+ className: mx20("m-1.5", getSize11(6))
1577
+ }) : /* @__PURE__ */ React27.createElement(X3, {
1578
+ className: mx20("m-1.5", getSize11(6))
1579
+ })))), /* @__PURE__ */ React27.createElement(Actions, {
1597
1580
  classNames: "mbs-4"
1598
- }, /* @__PURE__ */ React28.createElement(Action, {
1581
+ }, /* @__PURE__ */ React27.createElement(Action, {
1599
1582
  disabled: !active,
1600
1583
  onClick: () => send?.({
1601
1584
  type: "deselectInvitation"
@@ -1603,38 +1586,189 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1603
1586
  }, t("back label"))));
1604
1587
  };
1605
1588
 
1589
+ // packages/sdk/shell/src/steps/ConfirmReset.tsx
1590
+ import { Warning } from "@phosphor-icons/react";
1591
+ import React28, { useState as useState7 } from "react";
1592
+ import { log as log5 } from "@dxos/log";
1593
+ import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1594
+ import { getSize as getSize12, mx as mx21 } from "@dxos/react-ui-theme";
1595
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
1596
+ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1597
+ const { t } = useTranslation13("os");
1598
+ const [validationMessage, setValidationMessage] = useState7("");
1599
+ const [pending, setPending] = useState7(false);
1600
+ const processReset = async () => {
1601
+ setPending(true);
1602
+ return onConfirm?.().then(() => setPending(false), (error) => {
1603
+ log5.catch(error, void 0, {
1604
+ F: __dxlog_file4,
1605
+ L: 38,
1606
+ S: void 0,
1607
+ C: (f, a) => f(...a)
1608
+ });
1609
+ setValidationMessage(t("failed to reset identity message"));
1610
+ setPending(false);
1611
+ });
1612
+ };
1613
+ return /* @__PURE__ */ React28.createElement(ConfirmResetImpl, {
1614
+ disabled: !active,
1615
+ pending,
1616
+ validationMessage,
1617
+ onConfirm: processReset,
1618
+ onCancel,
1619
+ mode
1620
+ });
1621
+ };
1622
+ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCancel, mode }) => {
1623
+ const { t } = useTranslation13("os");
1624
+ const confirmationValue = t("confirmation value");
1625
+ const [inputValue, setInputValue] = useState7("");
1626
+ const testIdAffix = mode === "join new identity" ? "join-new-identity" : "reset-storage";
1627
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("div", {
1628
+ role: "none",
1629
+ className: "grow flex flex-col gap-2 justify-center"
1630
+ }, /* @__PURE__ */ React28.createElement(Message.Root, {
1631
+ valence: "error"
1632
+ }, /* @__PURE__ */ React28.createElement(Message.Title, null, /* @__PURE__ */ React28.createElement(Warning, {
1633
+ className: mx21(getSize12(6), "inline mie-2")
1634
+ }), t("sign out chooser title")), /* @__PURE__ */ React28.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React28.createElement(Input, {
1635
+ validationMessage,
1636
+ label: /* @__PURE__ */ React28.createElement(StepHeading, {
1637
+ className: "text-start mlb-2"
1638
+ }, t(mode === "join new identity" ? "join new identity input label" : "reset storage input label", {
1639
+ confirmationValue
1640
+ })),
1641
+ disabled,
1642
+ "data-testid": `${testIdAffix}.reset-identity-input`,
1643
+ placeholder: confirmationValue,
1644
+ onChange: ({ target: { value } }) => setInputValue(value)
1645
+ })), /* @__PURE__ */ React28.createElement(Actions, null, onCancel && /* @__PURE__ */ React28.createElement(Action, {
1646
+ disabled,
1647
+ onClick: onCancel,
1648
+ "data-testid": `${testIdAffix}.reset-identity-cancel`
1649
+ }, t("cancel label")), onConfirm && /* @__PURE__ */ React28.createElement(Action, {
1650
+ variant: "destructive",
1651
+ disabled: disabled || pending || inputValue !== confirmationValue,
1652
+ onClick: onConfirm,
1653
+ "data-testid": `${testIdAffix}.reset-identity-confirm`
1654
+ }, pending ? t("reset in progress label") : t("reset device label"))));
1655
+ };
1656
+
1606
1657
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
1607
1658
  var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1608
1659
  var viewStyles = "pbs-1 pbe-3 pli-3";
1609
- var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1610
- const fallbackValue = keyToFallback2(identity.identityKey);
1660
+ var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
1661
+ var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
1662
+ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
1663
+ const fallbackValue = keyToFallback3(identity.identityKey);
1664
+ const { t } = useTranslation14("os");
1665
+ const [displayName, setDisplayName] = useState8(identity.profile?.displayName ?? "");
1666
+ const [emoji, setEmojiDirectly] = useState8(getEmojiValue(identity));
1667
+ const [hue, setHueDirectly] = useState8(getHueValue(identity));
1668
+ const { textValue, setTextValue } = useClipboardContext();
1669
+ const identityHex = identity.identityKey.toHex();
1670
+ const copied = textValue === identityHex;
1671
+ const handleUpdateProfile = async () => {
1672
+ const nextProfile = {
1673
+ ...displayName && {
1674
+ displayName
1675
+ },
1676
+ ...(emoji || hue) && {
1677
+ data: {
1678
+ ...emoji && {
1679
+ emoji
1680
+ },
1681
+ ...hue && {
1682
+ hue
1683
+ }
1684
+ }
1685
+ }
1686
+ };
1687
+ return onUpdateProfile?.(nextProfile);
1688
+ };
1689
+ const setEmoji = (nextEmoji) => {
1690
+ setEmojiDirectly(nextEmoji);
1691
+ void handleUpdateProfile();
1692
+ };
1693
+ const setHue = (nextHue) => {
1694
+ setHueDirectly(nextHue);
1695
+ void handleUpdateProfile();
1696
+ };
1697
+ const isConnected = connectionState === ConnectionState.ONLINE;
1611
1698
  return /* @__PURE__ */ React29.createElement(Heading, {
1612
1699
  titleId,
1613
1700
  title,
1614
1701
  corner: /* @__PURE__ */ React29.createElement(CloseButton, {
1615
1702
  onDone
1616
1703
  })
1617
- }, /* @__PURE__ */ React29.createElement(Avatar4.Root, {
1618
- size: 12,
1704
+ }, /* @__PURE__ */ React29.createElement(Avatar6.Root, {
1705
+ size: 16,
1619
1706
  variant: "circle",
1620
- status: "active",
1621
- hue: identity.profile?.data?.hue || fallbackValue.hue
1622
- }, /* @__PURE__ */ React29.createElement(Avatar4.Frame, {
1623
- classNames: "block mbs-4 mbe-2 mli-auto chromatic-ignore"
1624
- }, /* @__PURE__ */ React29.createElement(Avatar4.Fallback, {
1625
- text: identity.profile?.data?.emoji || fallbackValue.emoji
1626
- })), /* @__PURE__ */ React29.createElement(Avatar4.Label, {
1627
- classNames: "block text-center font-light text-xl",
1707
+ status: isConnected ? "active" : "error",
1708
+ hue: hue || fallbackValue.hue
1709
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Root, {
1710
+ classNames: "grid grid-cols-[1fr_var(--rail-action)_min-content_var(--rail-action)_1fr] items-center gap-2"
1711
+ }, /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1712
+ asChild: true
1713
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1714
+ classNames: "bs-[--rail-action] is-[--rail-action] justify-self-end",
1715
+ onClick: () => onChangeConnectionState?.(isConnected ? ConnectionState.OFFLINE : ConnectionState.ONLINE)
1716
+ }, /* @__PURE__ */ React29.createElement("span", {
1717
+ className: "sr-only"
1718
+ }, t(isConnected ? "disconnect label" : "connect label")), isConnected ? /* @__PURE__ */ React29.createElement(PlugsConnected, {
1719
+ className: getSize13(5)
1720
+ }) : /* @__PURE__ */ React29.createElement(Plugs, {
1721
+ className: getSize13(5)
1722
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1723
+ side: "bottom",
1724
+ classNames: "z-50"
1725
+ }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), /* @__PURE__ */ React29.createElement(EmojiPickerToolbarButton, {
1726
+ emoji,
1727
+ onChangeEmoji: setEmoji,
1728
+ classNames: "bs-[--rail-action]"
1729
+ }), /* @__PURE__ */ React29.createElement(Avatar6.Frame, {
1730
+ classNames: "relative z-[2] -mli-4 chromatic-ignore"
1731
+ }, /* @__PURE__ */ React29.createElement(Avatar6.Fallback, {
1732
+ text: emoji || fallbackValue.emoji
1733
+ })), /* @__PURE__ */ React29.createElement(HuePickerToolbarButton, {
1734
+ hue,
1735
+ onChangeHue: setHue,
1736
+ classNames: "bs-[--rail-action]"
1737
+ }), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1738
+ asChild: true
1739
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1740
+ classNames: "bs-[--rail-action] justify-self-start",
1741
+ "data-testid": "update-profile-form-copy-key",
1742
+ onClick: () => setTextValue(identityHex)
1743
+ }, /* @__PURE__ */ React29.createElement("span", {
1744
+ className: "sr-only"
1745
+ }, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React29.createElement(CopySimple, {
1746
+ className: getSize13(5)
1747
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1748
+ side: "bottom",
1749
+ classNames: "z-50"
1750
+ }, t(copied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null))))), /* @__PURE__ */ React29.createElement(Avatar6.Label, {
1751
+ classNames: "sr-only",
1628
1752
  "data-testid": "identityHeading.displayName"
1629
- }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex()))));
1753
+ }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex())), /* @__PURE__ */ React29.createElement(Input2.Root, null, /* @__PURE__ */ React29.createElement(Input2.Label, {
1754
+ srOnly: true
1755
+ }, t("display name input label")), /* @__PURE__ */ React29.createElement(Input2.TextInput, {
1756
+ variant: "subdued",
1757
+ "data-testid": "display-name-input",
1758
+ placeholder: t("display name input placeholder"),
1759
+ classNames: "mbs-2 text-center font-light text-xl",
1760
+ value: displayName,
1761
+ onChange: ({ target: { value } }) => {
1762
+ setDisplayName(value);
1763
+ },
1764
+ onBlur: handleUpdateProfile
1765
+ }))));
1630
1766
  };
1631
1767
  var IdentityPanelImpl = (props) => {
1632
- const { identity, titleId, activeView, onUpdateProfile, onResetDevice, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1633
- const { t } = useTranslation15("os");
1768
+ const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
1769
+ const { t } = useTranslation14("os");
1634
1770
  const title = useMemo3(() => {
1635
1771
  switch (activeView) {
1636
- case "agent manager":
1637
- return "Manage Agent";
1638
1772
  case "device invitation manager":
1639
1773
  return t("choose add device label");
1640
1774
  default:
@@ -1644,13 +1778,17 @@ var IdentityPanelImpl = (props) => {
1644
1778
  activeView,
1645
1779
  t
1646
1780
  ]);
1647
- return /* @__PURE__ */ React29.createElement(DensityProvider2, {
1781
+ const onCancelReset = () => rest.send?.("unchooseAction");
1782
+ return /* @__PURE__ */ React29.createElement(DensityProvider, {
1648
1783
  density: "fine"
1649
1784
  }, /* @__PURE__ */ React29.createElement(IdentityHeading, {
1650
1785
  identity,
1651
1786
  titleId,
1652
1787
  title,
1653
- onDone
1788
+ onDone,
1789
+ onUpdateProfile,
1790
+ connectionState,
1791
+ onChangeConnectionState
1654
1792
  }), /* @__PURE__ */ React29.createElement(Viewport.Root, {
1655
1793
  activeView
1656
1794
  }, /* @__PURE__ */ React29.createElement(Viewport.Views, null, /* @__PURE__ */ React29.createElement(Viewport.View, {
@@ -1666,35 +1804,24 @@ var IdentityPanelImpl = (props) => {
1666
1804
  active: activeView === "device invitation manager",
1667
1805
  ...rest,
1668
1806
  invitationUrl: rest.createInvitationUrl(rest.invitationCode)
1669
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1670
- id: "device manager",
1671
- classNames: viewStyles
1672
- }, /* @__PURE__ */ React29.createElement(DeviceManager, {
1673
- active: activeView === "device manager",
1674
- ...rest
1675
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1676
- classNames: viewStyles,
1677
- id: "update profile form"
1678
- }, /* @__PURE__ */ React29.createElement(ProfileForm, {
1679
- send: rest.send,
1680
- active: activeView === "update profile form",
1681
- identity,
1682
- onUpdateProfile
1683
1807
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1684
1808
  classNames: viewStyles,
1685
- id: "signing out"
1686
- }, /* @__PURE__ */ React29.createElement(SignOutChooser, {
1687
- send: rest.send,
1688
- active: activeView === "signing out",
1689
- onResetDevice,
1690
- onJoinNewIdentity
1809
+ id: "confirm join new identity"
1810
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1811
+ active: activeView === "confirm join new identity",
1812
+ ...rest,
1813
+ mode: "join new identity",
1814
+ onConfirm: onJoinNewIdentity,
1815
+ onCancel: onCancelReset
1691
1816
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1692
1817
  classNames: viewStyles,
1693
- id: "agent manager"
1694
- }, /* @__PURE__ */ React29.createElement(AgentForm, {
1695
- send: rest.send,
1696
- active: activeView === "agent manager",
1697
- ...rest
1818
+ id: "confirm reset storage"
1819
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1820
+ active: activeView === "confirm reset storage",
1821
+ ...rest,
1822
+ mode: "reset storage",
1823
+ onConfirm: onResetStorage,
1824
+ onCancel: onCancelReset
1698
1825
  })))));
1699
1826
  };
1700
1827
  var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
@@ -1704,8 +1831,8 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1704
1831
  ...invitationStatus
1705
1832
  });
1706
1833
  };
1707
- var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
1708
- const titleId = useId5("identityPanel__heading", propsTitleId);
1834
+ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1835
+ const titleId = useId6("identityPanel__heading", propsTitleId);
1709
1836
  const client = useClient3();
1710
1837
  const devices = useDevices();
1711
1838
  const identity = useIdentity();
@@ -1716,20 +1843,26 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1716
1843
  invitations
1717
1844
  });
1718
1845
  if (!identity) {
1719
- log5.error("IdentityPanel rendered with no active identity.", void 0, {
1846
+ log6.error("IdentityPanel rendered with no active identity.", void 0, {
1720
1847
  F: __dxlog_file5,
1721
- L: 132,
1848
+ L: 240,
1722
1849
  S: void 0,
1723
1850
  C: (f, a) => f(...a)
1724
1851
  });
1725
1852
  return null;
1726
1853
  }
1727
- const [identityState, identitySend, identityService] = useIdentityMachine(client);
1854
+ const [identityState, identitySend, identityService] = useIdentityMachine(client, {
1855
+ context: {
1856
+ initialDisposition
1857
+ }
1858
+ });
1859
+ const { swarm: connectionState } = useNetworkStatus();
1860
+ const handleChangeConnectionState = async (nextState) => client?.mesh.updateConfig(nextState);
1728
1861
  useEffect3(() => {
1729
1862
  const subscription = identityService.subscribe((state) => {
1730
- log5("[state]", state, {
1863
+ log6("[state]", state, {
1731
1864
  F: __dxlog_file5,
1732
- L: 139,
1865
+ L: 253,
1733
1866
  S: void 0,
1734
1867
  C: (f, a) => f(...a)
1735
1868
  });
@@ -1744,28 +1877,10 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1744
1877
  return "identity action chooser";
1745
1878
  case identityState.matches("managingDeviceInvitation"):
1746
1879
  return "device invitation manager";
1747
- case identityState.matches("managingDevices"):
1748
- return "device manager";
1749
- case [
1750
- {
1751
- managingProfile: "idle"
1752
- },
1753
- {
1754
- managingProfile: "pending"
1755
- }
1756
- ].some(identityState.matches):
1757
- return "update profile form";
1758
- case identityState.matches("signingOut"):
1759
- return "signing out";
1760
- case [
1761
- {
1762
- managingAgent: "idle"
1763
- },
1764
- {
1765
- managingAgent: "pending"
1766
- }
1767
- ].some(identityState.matches):
1768
- return "agent manager";
1880
+ case identityState.matches("confirmingResetStorage"):
1881
+ return "confirm reset storage";
1882
+ case identityState.matches("confirmingJoinNewIdentity"):
1883
+ return "confirm join new identity";
1769
1884
  default:
1770
1885
  return "identity action chooser";
1771
1886
  }
@@ -1787,6 +1902,8 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1787
1902
  titleId,
1788
1903
  createInvitationUrl,
1789
1904
  onUpdateProfile,
1905
+ connectionState,
1906
+ onChangeConnectionState: handleChangeConnectionState,
1790
1907
  ...agentProps
1791
1908
  };
1792
1909
  return identityState.context.invitation ? /* @__PURE__ */ React29.createElement(IdentityPanelWithInvitationImpl, {
@@ -1796,29 +1913,29 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1796
1913
  };
1797
1914
 
1798
1915
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
1799
- import React39, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1916
+ import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1800
1917
  import { log as log10 } from "@dxos/log";
1801
- import { useClient as useClient6, useMulticastObservable } from "@dxos/react-client";
1918
+ import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1802
1919
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1803
- import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1920
+ import { DensityProvider as DensityProvider2, useId as useId8, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1804
1921
 
1805
1922
  // packages/sdk/shell/src/panels/JoinPanel/JoinHeading.tsx
1806
1923
  import { X as X4 } from "@phosphor-icons/react";
1807
- import React30, { cloneElement, forwardRef as forwardRef8 } from "react";
1808
- import { Button as Button7, useTranslation as useTranslation16 } from "@dxos/react-ui";
1809
- import { descriptionText as descriptionText8, getSize as getSize11, mx as mx20 } from "@dxos/react-ui-theme";
1810
- var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActionParent }, forwardedRef) => {
1811
- const { t } = useTranslation16("os");
1812
- const exitButton = /* @__PURE__ */ React30.createElement(Button7, {
1924
+ import React30, { cloneElement, forwardRef as forwardRef9 } from "react";
1925
+ import { Button as Button10, useTranslation as useTranslation15 } from "@dxos/react-ui";
1926
+ import { descriptionText as descriptionText9, getSize as getSize14, mx as mx22 } from "@dxos/react-ui-theme";
1927
+ var JoinHeading = /* @__PURE__ */ forwardRef9(({ mode, titleId, onExit, exitActionParent }, forwardedRef) => {
1928
+ const { t } = useTranslation15("os");
1929
+ const exitButton = /* @__PURE__ */ React30.createElement(Button10, {
1813
1930
  variant: "ghost",
1814
1931
  ...onExit && {
1815
1932
  onClick: onExit
1816
1933
  },
1817
- classNames: mx20(descriptionText8, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1934
+ classNames: mx22(descriptionText9, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1818
1935
  "data-testid": "join-exit"
1819
1936
  }, /* @__PURE__ */ React30.createElement(X4, {
1820
1937
  weight: "bold",
1821
- className: getSize11(4)
1938
+ className: getSize14(4)
1822
1939
  }), /* @__PURE__ */ React30.createElement("span", {
1823
1940
  className: "sr-only"
1824
1941
  }, t("exit label")));
@@ -1839,27 +1956,27 @@ var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActi
1839
1956
  import { useMachine as useMachine2 } from "@xstate/react";
1840
1957
  import { useCallback as useCallback6 } from "react";
1841
1958
  import { assign as assign2, createMachine as createMachine2 } from "xstate";
1842
- import { log as log6 } from "@dxos/log";
1959
+ import { log as log7 } from "@dxos/log";
1843
1960
  import { AlreadyJoinedError } from "@dxos/react-client";
1844
- import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1961
+ import { Invitation as Invitation5, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1845
1962
  var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1846
1963
  var getInvitationSubscribable = (Kind, invitation) => {
1847
- log6("[subscribing to invitation]", invitation, {
1964
+ log7("[subscribing to invitation]", invitation, {
1848
1965
  F: __dxlog_file6,
1849
- L: 88,
1966
+ L: 90,
1850
1967
  S: void 0,
1851
1968
  C: (f, a) => f(...a)
1852
1969
  });
1853
1970
  return {
1854
1971
  subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
1855
1972
  switch (invitation2.state) {
1856
- case Invitation6.State.CONNECTING: {
1857
- log6("[invitation connecting]", {
1973
+ case Invitation5.State.CONNECTING: {
1974
+ log7("[invitation connecting]", {
1858
1975
  Kind,
1859
1976
  invitation: invitation2
1860
1977
  }, {
1861
1978
  F: __dxlog_file6,
1862
- L: 99,
1979
+ L: 101,
1863
1980
  S: void 0,
1864
1981
  C: (f, a) => f(...a)
1865
1982
  });
@@ -1868,13 +1985,13 @@ var getInvitationSubscribable = (Kind, invitation) => {
1868
1985
  invitation: invitation2
1869
1986
  });
1870
1987
  }
1871
- case Invitation6.State.CONNECTED: {
1872
- log6("[invitation connected]", {
1988
+ case Invitation5.State.CONNECTED: {
1989
+ log7("[invitation connected]", {
1873
1990
  Kind,
1874
1991
  invitation: invitation2
1875
1992
  }, {
1876
1993
  F: __dxlog_file6,
1877
- L: 104,
1994
+ L: 106,
1878
1995
  S: void 0,
1879
1996
  C: (f, a) => f(...a)
1880
1997
  });
@@ -1883,13 +2000,13 @@ var getInvitationSubscribable = (Kind, invitation) => {
1883
2000
  invitation: invitation2
1884
2001
  });
1885
2002
  }
1886
- case Invitation6.State.READY_FOR_AUTHENTICATION: {
1887
- log6("[invitation ready for authentication]", {
2003
+ case Invitation5.State.READY_FOR_AUTHENTICATION: {
2004
+ log7("[invitation ready for authentication]", {
1888
2005
  Kind,
1889
2006
  invitation: invitation2
1890
2007
  }, {
1891
2008
  F: __dxlog_file6,
1892
- L: 109,
2009
+ L: 111,
1893
2010
  S: void 0,
1894
2011
  C: (f, a) => f(...a)
1895
2012
  });
@@ -1898,13 +2015,13 @@ var getInvitationSubscribable = (Kind, invitation) => {
1898
2015
  invitation: invitation2
1899
2016
  });
1900
2017
  }
1901
- case Invitation6.State.AUTHENTICATING: {
1902
- log6("[invitation authenticating]", {
2018
+ case Invitation5.State.AUTHENTICATING: {
2019
+ log7("[invitation authenticating]", {
1903
2020
  Kind,
1904
2021
  invitation: invitation2
1905
2022
  }, {
1906
2023
  F: __dxlog_file6,
1907
- L: 114,
2024
+ L: 116,
1908
2025
  S: void 0,
1909
2026
  C: (f, a) => f(...a)
1910
2027
  });
@@ -1913,13 +2030,13 @@ var getInvitationSubscribable = (Kind, invitation) => {
1913
2030
  invitation: invitation2
1914
2031
  });
1915
2032
  }
1916
- case Invitation6.State.SUCCESS: {
1917
- log6("[invitation success]", {
2033
+ case Invitation5.State.SUCCESS: {
2034
+ log7("[invitation success]", {
1918
2035
  Kind,
1919
2036
  invitation: invitation2
1920
2037
  }, {
1921
2038
  F: __dxlog_file6,
1922
- L: 119,
2039
+ L: 121,
1923
2040
  S: void 0,
1924
2041
  C: (f, a) => f(...a)
1925
2042
  });
@@ -1929,12 +2046,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1929
2046
  });
1930
2047
  return complete?.();
1931
2048
  }
1932
- case Invitation6.State.CANCELLED: {
1933
- log6.warn("[invitation cancelled]", {
2049
+ case Invitation5.State.CANCELLED: {
2050
+ log7.warn("[invitation cancelled]", {
1934
2051
  Kind
1935
2052
  }, {
1936
2053
  F: __dxlog_file6,
1937
- L: 125,
2054
+ L: 127,
1938
2055
  S: void 0,
1939
2056
  C: (f, a) => f(...a)
1940
2057
  });
@@ -1943,12 +2060,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1943
2060
  reason: "cancelled"
1944
2061
  });
1945
2062
  }
1946
- case Invitation6.State.TIMEOUT: {
1947
- log6.error("[invitation timeout]", {
2063
+ case Invitation5.State.TIMEOUT: {
2064
+ log7.error("[invitation timeout]", {
1948
2065
  Kind
1949
2066
  }, {
1950
2067
  F: __dxlog_file6,
1951
- L: 130,
2068
+ L: 132,
1952
2069
  S: void 0,
1953
2070
  C: (f, a) => f(...a)
1954
2071
  });
@@ -1960,12 +2077,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1960
2077
  }
1961
2078
  }, (error) => {
1962
2079
  if (error instanceof AlreadyJoinedError) {
1963
- log6("[already joined]", {
2080
+ log7("[already joined]", {
1964
2081
  Kind,
1965
2082
  error
1966
2083
  }, {
1967
2084
  F: __dxlog_file6,
1968
- L: 137,
2085
+ L: 139,
1969
2086
  S: void 0,
1970
2087
  C: (f, a) => f(...a)
1971
2088
  });
@@ -1975,12 +2092,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1975
2092
  });
1976
2093
  return complete?.();
1977
2094
  }
1978
- log6.error("[invitation errored]", {
2095
+ log7.error("[invitation errored]", {
1979
2096
  Kind,
1980
2097
  error
1981
2098
  }, {
1982
2099
  F: __dxlog_file6,
1983
- L: 142,
2100
+ L: 144,
1984
2101
  S: void 0,
1985
2102
  C: (f, a) => f(...a)
1986
2103
  });
@@ -2042,7 +2159,7 @@ var acceptingInvitationTemplate = (Kind, successTarget) => {
2042
2159
  {
2043
2160
  cond: (context) => {
2044
2161
  const invitation = context[Kind.toLowerCase()].invitation;
2045
- return !invitation || invitation?.state === Invitation6.State.CONNECTING;
2162
+ return !invitation || invitation?.state === Invitation5.State.CONNECTING;
2046
2163
  },
2047
2164
  target: `connecting${Kind}Invitation`,
2048
2165
  actions: "log"
@@ -2152,6 +2269,7 @@ var joinMachine = createMachine2({
2152
2269
  id: "join",
2153
2270
  predictableActionArguments: true,
2154
2271
  context: {
2272
+ initialDisposition: "default",
2155
2273
  mode: "default",
2156
2274
  identity: null,
2157
2275
  halo: {},
@@ -2166,6 +2284,11 @@ var joinMachine = createMachine2({
2166
2284
  target: "resettingIdentity",
2167
2285
  actions: "log"
2168
2286
  },
2287
+ {
2288
+ cond: "initiallyAcceptingHaloInvitation",
2289
+ target: "#join.choosingIdentity.acceptingHaloInvitation",
2290
+ actions: "log"
2291
+ },
2169
2292
  {
2170
2293
  cond: "noSelectedIdentity",
2171
2294
  target: "choosingIdentity",
@@ -2248,6 +2371,7 @@ var joinMachine = createMachine2({
2248
2371
  guards: {
2249
2372
  existingIdentity: ({ identity, mode }, _event) => mode === "halo-only" && !!identity,
2250
2373
  noSelectedIdentity: ({ identity }, _event) => !identity,
2374
+ initiallyAcceptingHaloInvitation: ({ identity, initialDisposition }, _event) => !identity && initialDisposition === "accept-halo-invitation",
2251
2375
  hasHaloUnredeemedCode: ({ halo }, _event) => !!halo.unredeemedCode,
2252
2376
  noSpaceInvitation: ({ space }, _event) => !space.invitation && !space.unredeemedCode
2253
2377
  },
@@ -2299,13 +2423,13 @@ var joinMachine = createMachine2({
2299
2423
  } : context.space
2300
2424
  }),
2301
2425
  log: (context, event) => {
2302
- log6("[transition]", {
2426
+ log7("[transition]", {
2303
2427
  event,
2304
2428
  haloInvitation: context.halo.invitation,
2305
2429
  spaceInvitation: context.space.invitation
2306
2430
  }, {
2307
2431
  F: __dxlog_file6,
2308
- L: 406,
2432
+ L: 416,
2309
2433
  S: void 0,
2310
2434
  C: (f, a) => f(...a)
2311
2435
  });
@@ -2317,9 +2441,9 @@ var defaultCodeFromUrl = (invitationType, text) => {
2317
2441
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2318
2442
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2319
2443
  } catch (err) {
2320
- log6.catch(err, void 0, {
2444
+ log7.catch(err, void 0, {
2321
2445
  F: __dxlog_file6,
2322
- L: 433,
2446
+ L: 443,
2323
2447
  S: void 0,
2324
2448
  C: (f, a) => f(...a)
2325
2449
  });
@@ -2338,9 +2462,9 @@ var useJoinMachine = (client, options) => {
2338
2462
  invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
2339
2463
  };
2340
2464
  } catch (err) {
2341
- log6.error("Could not redeem device invitation code", err, {
2465
+ log7.error("Could not redeem device invitation code", err, {
2342
2466
  F: __dxlog_file6,
2343
- L: 454,
2467
+ L: 464,
2344
2468
  S: void 0,
2345
2469
  C: (f, a) => f(...a)
2346
2470
  });
@@ -2363,9 +2487,9 @@ var useJoinMachine = (client, options) => {
2363
2487
  invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
2364
2488
  };
2365
2489
  } catch (err) {
2366
- log6.error("Could not redeem space invitation code", err, {
2490
+ log7.error("Could not redeem space invitation code", err, {
2367
2491
  F: __dxlog_file6,
2368
- L: 476,
2492
+ L: 486,
2369
2493
  S: void 0,
2370
2494
  C: (f, a) => f(...a)
2371
2495
  });
@@ -2424,18 +2548,18 @@ var useJoinMachine = (client, options) => {
2424
2548
  };
2425
2549
 
2426
2550
  // packages/sdk/shell/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx
2427
- import { CaretRight as CaretRight2, Plus as Plus2, QrCode, Textbox } from "@phosphor-icons/react";
2551
+ import { CaretRight as CaretRight2, Plus as Plus3, QrCode, Textbox } from "@phosphor-icons/react";
2428
2552
  import React31 from "react";
2429
- import { useTranslation as useTranslation17 } from "@dxos/react-ui";
2430
- import { getSize as getSize12 } from "@dxos/react-ui-theme";
2553
+ import { useTranslation as useTranslation16 } from "@dxos/react-ui";
2554
+ import { getSize as getSize15 } from "@dxos/react-ui-theme";
2431
2555
  var AdditionMethodChooser = (viewStateProps) => {
2432
2556
  const disabled = !viewStateProps.active;
2433
2557
  const { send } = viewStateProps;
2434
- const { t } = useTranslation17("os");
2558
+ const { t } = useTranslation16("os");
2435
2559
  const sharedButtonProps = {
2436
2560
  disabled,
2437
2561
  after: /* @__PURE__ */ React31.createElement(CaretRight2, {
2438
- className: getSize12(4),
2562
+ className: getSize15(4),
2439
2563
  weight: "bold"
2440
2564
  }),
2441
2565
  slots: {
@@ -2450,8 +2574,8 @@ var AdditionMethodChooser = (viewStateProps) => {
2450
2574
  }, /* @__PURE__ */ React31.createElement(CompoundButton, {
2451
2575
  ...sharedButtonProps,
2452
2576
  description: t("create identity description"),
2453
- before: /* @__PURE__ */ React31.createElement(Plus2, {
2454
- className: getSize12(6)
2577
+ before: /* @__PURE__ */ React31.createElement(Plus3, {
2578
+ className: getSize15(6)
2455
2579
  }),
2456
2580
  onClick: () => send({
2457
2581
  type: "createIdentity"
@@ -2462,7 +2586,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2462
2586
  ...sharedButtonProps,
2463
2587
  description: t("join identity description"),
2464
2588
  before: /* @__PURE__ */ React31.createElement(QrCode, {
2465
- className: getSize12(6)
2589
+ className: getSize15(6)
2466
2590
  }),
2467
2591
  onClick: () => send({
2468
2592
  type: "acceptHaloInvitation"
@@ -2474,7 +2598,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2474
2598
  disabled: true,
2475
2599
  description: t("recover identity description"),
2476
2600
  before: /* @__PURE__ */ React31.createElement(Textbox, {
2477
- className: getSize12(6)
2601
+ className: getSize15(6)
2478
2602
  }),
2479
2603
  onClick: () => send({
2480
2604
  type: "recoverIdentity"
@@ -2486,16 +2610,16 @@ var AdditionMethodChooser = (viewStateProps) => {
2486
2610
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityAdded.tsx
2487
2611
  import React32, { cloneElement as cloneElement2 } from "react";
2488
2612
  import { generateName as generateName4 } from "@dxos/display-name";
2489
- import { Avatar as Avatar5, useId as useId6, useTranslation as useTranslation18 } from "@dxos/react-ui";
2490
- import { mx as mx21 } from "@dxos/react-ui-theme";
2613
+ import { Avatar as Avatar7, useId as useId7, useTranslation as useTranslation17 } from "@dxos/react-ui";
2614
+ import { mx as mx23 } from "@dxos/react-ui-theme";
2491
2615
  import { hexToFallback } from "@dxos/util";
2492
2616
  var IdentityAdded = (props) => {
2493
2617
  const { mode, addedIdentity, active, send, onDone, doneActionParent } = props;
2494
2618
  const disabled = !active;
2495
- const { t } = useTranslation18("os");
2619
+ const { t } = useTranslation17("os");
2496
2620
  const addedIdentityHex = addedIdentity?.identityKey.toHex() ?? "0";
2497
2621
  const fallbackValue = hexToFallback(addedIdentityHex);
2498
- const labelId = useId6("identityListItem__label");
2622
+ const labelId = useId7("identityListItem__label");
2499
2623
  const displayName = addedIdentity?.profile?.displayName ?? (addedIdentity && generateName4(addedIdentityHex));
2500
2624
  const doneAction = /* @__PURE__ */ React32.createElement(Action, {
2501
2625
  ...onDone && {
@@ -2508,14 +2632,14 @@ var IdentityAdded = (props) => {
2508
2632
  return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StepHeading, null, t("identity added label")), /* @__PURE__ */ React32.createElement("div", {
2509
2633
  role: "none",
2510
2634
  className: "grow flex flex-col items-center justify-center text-center gap-2"
2511
- }, /* @__PURE__ */ React32.createElement(Avatar5.Root, {
2635
+ }, /* @__PURE__ */ React32.createElement(Avatar7.Root, {
2512
2636
  status: "active",
2513
2637
  labelId,
2514
2638
  hue: addedIdentity?.profile?.data?.hue || fallbackValue.hue
2515
- }, /* @__PURE__ */ React32.createElement(Avatar5.Frame, null, /* @__PURE__ */ React32.createElement(Avatar5.Fallback, {
2639
+ }, /* @__PURE__ */ React32.createElement(Avatar7.Frame, null, /* @__PURE__ */ React32.createElement(Avatar7.Fallback, {
2516
2640
  text: addedIdentity?.profile?.data?.emoji || fallbackValue.emoji
2517
- })), /* @__PURE__ */ React32.createElement(Avatar5.Label, {
2518
- classNames: mx21("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2641
+ })), /* @__PURE__ */ React32.createElement(Avatar7.Label, {
2642
+ classNames: mx23("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2519
2643
  }, displayName))), /* @__PURE__ */ React32.createElement(Actions, null, mode === "halo-only" ? doneActionParent ? /* @__PURE__ */ cloneElement2(doneActionParent, {}, doneAction) : doneAction : /* @__PURE__ */ React32.createElement(Action, {
2520
2644
  variant: "primary",
2521
2645
  disabled: disabled || !addedIdentity,
@@ -2528,17 +2652,17 @@ var IdentityAdded = (props) => {
2528
2652
  };
2529
2653
 
2530
2654
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2531
- import React33, { useState as useState6 } from "react";
2532
- import { log as log7 } from "@dxos/log";
2655
+ import React33, { useState as useState9 } from "react";
2656
+ import { log as log8 } from "@dxos/log";
2533
2657
  import { useClient as useClient4 } from "@dxos/react-client";
2534
- import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2658
+ import { useTranslation as useTranslation18 } from "@dxos/react-ui";
2535
2659
  var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2536
2660
  var IdentityInput = (props) => {
2537
2661
  const { send, method } = props;
2538
2662
  const isRecover = method === "recover identity";
2539
2663
  const client = useClient4();
2540
- const { t } = useTranslation19("os");
2541
- const [validationMessage, setValidationMessage] = useState6("");
2664
+ const { t } = useTranslation18("os");
2665
+ const [validationMessage, setValidationMessage] = useState9("");
2542
2666
  const createIdentity = (displayName) => {
2543
2667
  void client.halo.createIdentity({
2544
2668
  [isRecover ? "seedphrase" : "displayName"]: displayName
@@ -2548,7 +2672,7 @@ var IdentityInput = (props) => {
2548
2672
  identity
2549
2673
  });
2550
2674
  }, (error) => {
2551
- log7.catch(error, void 0, {
2675
+ log8.catch(error, void 0, {
2552
2676
  F: __dxlog_file7,
2553
2677
  L: 37,
2554
2678
  S: void 0,
@@ -2566,8 +2690,8 @@ var IdentityInput = (props) => {
2566
2690
  var IdentityInputImpl = (props) => {
2567
2691
  const { method, send, active, onDisplayNameConfirm, validationMessage } = props;
2568
2692
  const disabled = !active;
2569
- const { t } = useTranslation19("os");
2570
- const [inputValue, setInputValue] = useState6("");
2693
+ const { t } = useTranslation18("os");
2694
+ const [inputValue, setInputValue] = useState9("");
2571
2695
  const isRecover = method === "recover identity";
2572
2696
  return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
2573
2697
  role: "none",
@@ -2596,11 +2720,11 @@ var IdentityInputImpl = (props) => {
2596
2720
 
2597
2721
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAccepted.tsx
2598
2722
  import React34, { cloneElement as cloneElement3 } from "react";
2599
- import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2723
+ import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2600
2724
  var InvitationAccepted = (props) => {
2601
2725
  const { active, Kind, doneActionParent, onDone } = props;
2602
2726
  const disabled = !active;
2603
- const { t } = useTranslation20("os");
2727
+ const { t } = useTranslation19("os");
2604
2728
  const doneAction = /* @__PURE__ */ React34.createElement(Action, {
2605
2729
  variant: "primary",
2606
2730
  onClick: onDone,
@@ -2617,9 +2741,9 @@ var InvitationAccepted = (props) => {
2617
2741
  };
2618
2742
 
2619
2743
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2620
- import React35, { useState as useState7, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2621
- import { log as log8 } from "@dxos/log";
2622
- import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2744
+ import React35, { useState as useState10, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2745
+ import { log as log9 } from "@dxos/log";
2746
+ import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2623
2747
  var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2624
2748
  var invitationCodeFromUrl = (text) => {
2625
2749
  try {
@@ -2627,7 +2751,7 @@ var invitationCodeFromUrl = (text) => {
2627
2751
  const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
2628
2752
  return invitation ?? text;
2629
2753
  } catch (err) {
2630
- log8.catch(err, void 0, {
2754
+ log9.catch(err, void 0, {
2631
2755
  F: __dxlog_file8,
2632
2756
  L: 25,
2633
2757
  S: void 0,
@@ -2639,8 +2763,8 @@ var invitationCodeFromUrl = (text) => {
2639
2763
  var InvitationInput = (props) => {
2640
2764
  const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
2641
2765
  const disabled = !active;
2642
- const { t } = useTranslation21("os");
2643
- const [inputValue, setInputValue] = useState7(unredeemedCode ?? "");
2766
+ const { t } = useTranslation20("os");
2767
+ const [inputValue, setInputValue] = useState10(unredeemedCode ?? "");
2644
2768
  useEffect4(() => {
2645
2769
  unredeemedCode && setInputValue(unredeemedCode ?? "");
2646
2770
  }, [
@@ -2698,8 +2822,8 @@ var InvitationInput = (props) => {
2698
2822
 
2699
2823
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationRescuer.tsx
2700
2824
  import React36 from "react";
2701
- import { useTranslation as useTranslation22 } from "@dxos/react-ui";
2702
- import { descriptionText as descriptionText9 } from "@dxos/react-ui-theme";
2825
+ import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2826
+ import { descriptionText as descriptionText10 } from "@dxos/react-ui-theme";
2703
2827
  var InvitationActions = ({
2704
2828
  // `invitationState` does report correct state, but here we evaluate whether `failReason` is a better source of truth
2705
2829
  // for the UI in particular.
@@ -2710,10 +2834,10 @@ var InvitationActions = ({
2710
2834
  Kind,
2711
2835
  failReason
2712
2836
  }) => {
2713
- const { t } = useTranslation22("os");
2837
+ const { t } = useTranslation21("os");
2714
2838
  if (failReason) {
2715
2839
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2716
- className: descriptionText9
2840
+ className: descriptionText10
2717
2841
  }, t(failReason === "timeout" ? "timeout status label" : failReason === "cancelled" ? "cancelled status label" : "error status label")), /* @__PURE__ */ React36.createElement("div", {
2718
2842
  role: "none",
2719
2843
  className: "grow"
@@ -2726,7 +2850,7 @@ var InvitationActions = ({
2726
2850
  }, t("reset label"))));
2727
2851
  } else {
2728
2852
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2729
- className: descriptionText9
2853
+ className: descriptionText10
2730
2854
  }, t("connecting status label")), /* @__PURE__ */ React36.createElement("div", {
2731
2855
  role: "none",
2732
2856
  className: "grow"
@@ -2743,12 +2867,12 @@ var InvitationActions = ({
2743
2867
  };
2744
2868
  var InvitationRescuer = (props) => {
2745
2869
  const { Kind, invitationState, active, send } = props;
2746
- const { t } = useTranslation22("os");
2870
+ const { t } = useTranslation21("os");
2747
2871
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, typeof invitationState === "undefined" ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", {
2748
2872
  role: "none",
2749
2873
  className: "grow flex flex-col justify-center"
2750
2874
  }, /* @__PURE__ */ React36.createElement(StepHeading, {
2751
- className: descriptionText9
2875
+ className: descriptionText10
2752
2876
  }, "There was a problem joining the space")), /* @__PURE__ */ React36.createElement(Actions, null, /* @__PURE__ */ React36.createElement(Action, {
2753
2877
  disabled: !active,
2754
2878
  "data-testid": "invitation-rescuer-blank-reset",
@@ -2759,15 +2883,15 @@ var InvitationRescuer = (props) => {
2759
2883
  };
2760
2884
 
2761
2885
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
2762
- import React37, { useState as useState8 } from "react";
2763
- import { Input as Input2, useTranslation as useTranslation23 } from "@dxos/react-ui";
2764
- import { hexToEmoji as hexToEmoji4 } from "@dxos/util";
2886
+ import React37, { useState as useState11 } from "react";
2887
+ import { Input as Input3, useTranslation as useTranslation22 } from "@dxos/react-ui";
2888
+ import { hexToEmoji as hexToEmoji5 } from "@dxos/util";
2765
2889
  var pinLength = 6;
2766
2890
  var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel }) => {
2767
2891
  const disabled = !active || pending;
2768
- const { t } = useTranslation23("os");
2892
+ const { t } = useTranslation22("os");
2769
2893
  const invitationType = Kind.toLowerCase();
2770
- const [authCode, setAuthCode] = useState8("");
2894
+ const [authCode, setAuthCode] = useState11("");
2771
2895
  const onChange = ({ target: { value } }) => {
2772
2896
  setAuthCode(value);
2773
2897
  if (value.length === pinLength) {
@@ -2778,12 +2902,12 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2778
2902
  role: "none",
2779
2903
  className: "grow flex flex-col justify-center"
2780
2904
  }, invitationId && /* @__PURE__ */ React37.createElement(Emoji, {
2781
- text: hexToEmoji4(invitationId)
2782
- }), /* @__PURE__ */ React37.createElement(Input2.Root, failed && {
2905
+ text: hexToEmoji5(invitationId)
2906
+ }), /* @__PURE__ */ React37.createElement(Input3.Root, failed && {
2783
2907
  validationValence: "error"
2784
- }, /* @__PURE__ */ React37.createElement(Input2.Label, {
2908
+ }, /* @__PURE__ */ React37.createElement(Input3.Label, {
2785
2909
  asChild: true
2786
- }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input2.PinInput, {
2910
+ }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input3.PinInput, {
2787
2911
  disabled,
2788
2912
  length: pinLength,
2789
2913
  onChange,
@@ -2794,9 +2918,9 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2794
2918
  "data-prevent-ios-autofocus": true,
2795
2919
  "data-testid": `${invitationType}-auth-code-input`,
2796
2920
  "data-1p-ignore": true
2797
- }), failed && /* @__PURE__ */ React37.createElement(Input2.DescriptionAndValidation, {
2921
+ }), failed && /* @__PURE__ */ React37.createElement(Input3.DescriptionAndValidation, {
2798
2922
  classNames: "text-center"
2799
- }, /* @__PURE__ */ React37.createElement(Input2.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2923
+ }, /* @__PURE__ */ React37.createElement(Input3.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2800
2924
  variant: "ghost",
2801
2925
  disabled,
2802
2926
  onClick: () => onInvitationCancel?.(),
@@ -2810,69 +2934,11 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2810
2934
  }, t("next label"))));
2811
2935
  };
2812
2936
 
2813
- // packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx
2814
- import React38, { useState as useState9 } from "react";
2815
- import { log as log9 } from "@dxos/log";
2816
- import { useClient as useClient5 } from "@dxos/react-client";
2817
- import { useTranslation as useTranslation24 } from "@dxos/react-ui";
2818
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx";
2819
- var ResetIdentity = ({ send, active }) => {
2820
- const client = useClient5();
2821
- const { t } = useTranslation24("os");
2822
- const [validationMessage, setValidationMessage] = useState9("");
2823
- const [pending, setPending] = useState9(false);
2824
- const resetIdentity = () => {
2825
- setPending(true);
2826
- void client.reset().then(() => send?.({
2827
- type: "resetIdentity"
2828
- }), (error) => {
2829
- log9.catch(error, void 0, {
2830
- F: __dxlog_file9,
2831
- L: 35,
2832
- S: void 0,
2833
- C: (f, a) => f(...a)
2834
- });
2835
- setValidationMessage(t("failed to reset identity message"));
2836
- setPending(false);
2837
- });
2838
- };
2839
- return /* @__PURE__ */ React38.createElement(ResetIdentityImpl, {
2840
- disabled: !active,
2841
- pending,
2842
- validationMessage,
2843
- onConfirm: () => resetIdentity()
2844
- });
2845
- };
2846
- var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm }) => {
2847
- const { t } = useTranslation24("os");
2848
- const confirmationValue = t("confirmation value");
2849
- const [inputValue, setInputValue] = useState9("");
2850
- return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("div", {
2851
- role: "none",
2852
- className: "grow flex flex-col justify-center"
2853
- }, /* @__PURE__ */ React38.createElement(Input, {
2854
- validationMessage,
2855
- label: /* @__PURE__ */ React38.createElement(StepHeading, null, t("reset identity input label", {
2856
- confirmationValue
2857
- })),
2858
- disabled,
2859
- "data-testid": "reset-identity-input",
2860
- placeholder: confirmationValue,
2861
- onChange: ({ target: { value } }) => setInputValue(value)
2862
- })), /* @__PURE__ */ React38.createElement(Actions, null, /* @__PURE__ */ React38.createElement(Action, {
2863
- // TODO(wittjosiah): Probably make this red?
2864
- variant: "primary",
2865
- disabled: disabled || pending || inputValue !== confirmationValue,
2866
- onClick: () => onConfirm?.(),
2867
- "data-testid": "reset-identity-input-confirm"
2868
- }, pending ? t("reset in progress label") : t("confirm label"))));
2869
- };
2870
-
2871
2937
  // packages/sdk/shell/src/styles/panelStyles.ts
2872
2938
  var stepStyles = "pbs-1 pbe-3 pli-3";
2873
2939
 
2874
2940
  // packages/sdk/shell/src/styles/invitationStatusStyles.ts
2875
- import { Invitation as Invitation7 } from "@dxos/react-client/invitations";
2941
+ import { Invitation as Invitation6 } from "@dxos/react-client/invitations";
2876
2942
  var inactiveBgColor = "bg-neutral-100 dark:bg-neutral-600";
2877
2943
  var activeBgColor = "bg-primary-500 dark:bg-primary-400";
2878
2944
  var successBgColor = "bg-success-500 dark:bg-success-400";
@@ -2888,55 +2954,56 @@ var activeStrokeColor = "stroke-primary-400 dark:stroke-primary-150";
2888
2954
  var successStrokeColor = "stroke-success-300 dark:stroke-primary-400";
2889
2955
  var errorStrokeColor = "stroke-error-300 dark:stroke-error-500";
2890
2956
  var cancelledStrokeColor = "stroke-warning-300 dark:stroke-warning-500";
2891
- var resolvedStrokeColor = (status) => status === Invitation7.State.ERROR ? errorStrokeColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledStrokeColor : successStrokeColor;
2892
- var resolvedBgColor = (status) => status === Invitation7.State.ERROR ? errorBgColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledBgColor : successBgColor;
2893
- var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTextColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledTextColor : successTextColor;
2957
+ var resolvedStrokeColor = (status) => status === Invitation6.State.ERROR ? errorStrokeColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledStrokeColor : successStrokeColor;
2958
+ var resolvedBgColor = (status) => status === Invitation6.State.ERROR ? errorBgColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledBgColor : successBgColor;
2959
+ var resolvedTextColor = (status) => status === Invitation6.State.ERROR ? errorTextColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledTextColor : successTextColor;
2894
2960
 
2895
2961
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2896
- var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2962
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2897
2963
  var JoinPanelImpl = (props) => {
2898
- const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
2899
- return /* @__PURE__ */ React39.createElement(DensityProvider3, {
2964
+ const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetStorage, onConfirmResetStorage, IdentityInput: IdentityInputComponent = IdentityInput, ConfirmReset: ConfirmResetComponent = ConfirmReset } = props;
2965
+ return /* @__PURE__ */ React38.createElement(DensityProvider2, {
2900
2966
  density: "fine"
2901
- }, mode !== "halo-only" && /* @__PURE__ */ React39.createElement(JoinHeading, {
2967
+ }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
2902
2968
  titleId,
2903
2969
  mode,
2904
2970
  onExit,
2905
2971
  exitActionParent
2906
- }), /* @__PURE__ */ React39.createElement(Viewport.Root, {
2972
+ }), /* @__PURE__ */ React38.createElement(Viewport.Root, {
2907
2973
  focusManaged: true,
2908
2974
  activeView
2909
- }, /* @__PURE__ */ React39.createElement(Viewport.Views, null, /* @__PURE__ */ React39.createElement(Viewport.View, {
2975
+ }, /* @__PURE__ */ React38.createElement(Viewport.Views, null, /* @__PURE__ */ React38.createElement(Viewport.View, {
2910
2976
  classNames: stepStyles,
2911
2977
  id: "addition method chooser"
2912
- }, /* @__PURE__ */ React39.createElement(AdditionMethodChooser, {
2978
+ }, /* @__PURE__ */ React38.createElement(AdditionMethodChooser, {
2913
2979
  send,
2914
2980
  active: activeView === "addition method chooser"
2915
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2981
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2916
2982
  classNames: stepStyles,
2917
- id: "reset identity confirmation"
2918
- }, /* @__PURE__ */ React39.createElement(ResetIdentityComponent, {
2983
+ id: "reset storage confirmation"
2984
+ }, /* @__PURE__ */ React38.createElement(ConfirmResetComponent, {
2919
2985
  send,
2920
- method: "reset identity",
2921
- active: activeView === "reset identity confirmation"
2922
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2986
+ active: activeView === "reset identity confirmation",
2987
+ onCancel: onCancelResetStorage,
2988
+ onConfirm: onConfirmResetStorage
2989
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2923
2990
  classNames: stepStyles,
2924
2991
  id: "create identity input"
2925
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2992
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2926
2993
  send,
2927
2994
  method: "create identity",
2928
2995
  active: activeView === "create identity input"
2929
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2996
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2930
2997
  classNames: stepStyles,
2931
2998
  id: "recover identity input"
2932
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2999
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2933
3000
  send,
2934
3001
  method: "recover identity",
2935
3002
  active: activeView === "recover identity input"
2936
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3003
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2937
3004
  classNames: stepStyles,
2938
3005
  id: "halo invitation input"
2939
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
3006
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
2940
3007
  send,
2941
3008
  Kind: "Halo",
2942
3009
  active: activeView === "halo invitation input",
@@ -2946,20 +3013,20 @@ var JoinPanelImpl = (props) => {
2946
3013
  ...succeededKeys?.Halo && {
2947
3014
  succeededKeys: succeededKeys.Halo
2948
3015
  }
2949
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3016
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2950
3017
  classNames: stepStyles,
2951
3018
  id: "halo invitation rescuer"
2952
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
3019
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
2953
3020
  send,
2954
3021
  Kind: "Halo",
2955
3022
  active: activeView === "halo invitation rescuer",
2956
3023
  invitationState: invitationStates?.Halo,
2957
3024
  onInvitationCancel: onHaloInvitationCancel,
2958
3025
  failReason: failReasons?.Halo
2959
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3026
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2960
3027
  classNames: stepStyles,
2961
3028
  id: "halo invitation authenticator"
2962
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3029
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
2963
3030
  send,
2964
3031
  Kind: "Halo",
2965
3032
  active: activeView === "halo invitation authenticator",
@@ -2968,28 +3035,28 @@ var JoinPanelImpl = (props) => {
2968
3035
  ...failed.has("Halo") && {
2969
3036
  failed: true
2970
3037
  }
2971
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3038
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2972
3039
  classNames: stepStyles,
2973
3040
  id: "halo invitation accepted"
2974
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3041
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
2975
3042
  send,
2976
3043
  Kind: "Halo",
2977
3044
  active: activeView === "halo invitation accepted",
2978
3045
  doneActionParent,
2979
3046
  onDone: onHaloDone
2980
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3047
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2981
3048
  classNames: stepStyles,
2982
3049
  id: "identity added"
2983
- }, /* @__PURE__ */ React39.createElement(IdentityAdded, {
3050
+ }, /* @__PURE__ */ React38.createElement(IdentityAdded, {
2984
3051
  send,
2985
3052
  mode,
2986
3053
  active: activeView === "identity added",
2987
3054
  doneActionParent,
2988
3055
  onDone: onHaloDone
2989
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3056
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2990
3057
  classNames: stepStyles,
2991
3058
  id: "space invitation input"
2992
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
3059
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
2993
3060
  send,
2994
3061
  Kind: "Space",
2995
3062
  active: activeView === "space invitation input",
@@ -3001,20 +3068,20 @@ var JoinPanelImpl = (props) => {
3001
3068
  },
3002
3069
  onExit,
3003
3070
  exitActionParent
3004
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3071
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3005
3072
  classNames: stepStyles,
3006
3073
  id: "space invitation rescuer"
3007
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
3074
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
3008
3075
  send,
3009
3076
  Kind: "Space",
3010
3077
  active: activeView === "space invitation rescuer",
3011
3078
  invitationState: invitationStates?.Space,
3012
3079
  onInvitationCancel: onSpaceInvitationCancel,
3013
3080
  failReason: failReasons?.Space
3014
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3081
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3015
3082
  classNames: stepStyles,
3016
3083
  id: "space invitation authenticator"
3017
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3084
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
3018
3085
  send,
3019
3086
  Kind: "Space",
3020
3087
  active: activeView === "space invitation authenticator",
@@ -3023,10 +3090,10 @@ var JoinPanelImpl = (props) => {
3023
3090
  ...failed.has("Space") && {
3024
3091
  failed: true
3025
3092
  }
3026
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3093
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3027
3094
  classNames: stepStyles,
3028
3095
  id: "space invitation accepted"
3029
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3096
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
3030
3097
  send,
3031
3098
  Kind: "Space",
3032
3099
  active: activeView === "space invitation accepted",
@@ -3034,14 +3101,15 @@ var JoinPanelImpl = (props) => {
3034
3101
  onDone: onSpaceDone
3035
3102
  })))));
3036
3103
  };
3037
- var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone }) => {
3038
- const client = useClient6();
3104
+ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetStorage }) => {
3105
+ const client = useClient5();
3039
3106
  const identity = useIdentity2();
3040
3107
  const { hasIosKeyboard } = useThemeContext4();
3041
- const titleId = useId7("joinPanel__heading", propsTitleId);
3108
+ const titleId = useId8("joinPanel__heading", propsTitleId);
3042
3109
  const [joinState, joinSend, joinService] = useJoinMachine(client, {
3043
3110
  context: {
3044
3111
  mode,
3112
+ initialDisposition,
3045
3113
  identity,
3046
3114
  ...initialInvitationCode && {
3047
3115
  [mode === "halo-only" ? "halo" : "space"]: {
@@ -3053,8 +3121,8 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3053
3121
  useEffect5(() => {
3054
3122
  const subscription = joinService.subscribe((state) => {
3055
3123
  log10("[state]", state, {
3056
- F: __dxlog_file10,
3057
- L: 198,
3124
+ F: __dxlog_file9,
3125
+ L: 204,
3058
3126
  S: void 0,
3059
3127
  C: (f, a) => f(...a)
3060
3128
  });
@@ -3266,7 +3334,15 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3266
3334
  joinState,
3267
3335
  propsOnDone
3268
3336
  ]);
3269
- return /* @__PURE__ */ React39.createElement(JoinPanelImpl, {
3337
+ const onConfirmResetStorage = useCallback7(() => client.reset().then(() => {
3338
+ joinSend({
3339
+ type: "resetIdentity"
3340
+ });
3341
+ }), [
3342
+ client,
3343
+ joinSend
3344
+ ]);
3345
+ return /* @__PURE__ */ React38.createElement(JoinPanelImpl, {
3270
3346
  titleId,
3271
3347
  mode,
3272
3348
  send: joinSend,
@@ -3299,22 +3375,24 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3299
3375
  type: "authenticateSpaceVerificationCode"
3300
3376
  });
3301
3377
  return joinState.context.space.invitationObservable?.authenticate(authCode);
3302
- }
3378
+ },
3379
+ onConfirmResetStorage,
3380
+ onCancelResetStorage
3303
3381
  });
3304
3382
  };
3305
3383
 
3306
3384
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3307
3385
  import { Planet } from "@phosphor-icons/react";
3308
- import React41, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3386
+ import React40, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3309
3387
  import { log as log13 } from "@dxos/log";
3310
3388
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3311
- import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation26 } from "@dxos/react-ui";
3389
+ import { DensityProvider as DensityProvider3, useId as useId9, useTranslation as useTranslation24 } from "@dxos/react-ui";
3312
3390
 
3313
3391
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3314
3392
  import { useMachine as useMachine3 } from "@xstate/react";
3315
3393
  import { assign as assign3, createMachine as createMachine3 } from "xstate";
3316
3394
  import { log as log11 } from "@dxos/log";
3317
- var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3395
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3318
3396
  var spaceMachine = createMachine3({
3319
3397
  id: "space",
3320
3398
  predictableActionArguments: true,
@@ -3355,7 +3433,7 @@ var spaceMachine = createMachine3({
3355
3433
  event,
3356
3434
  context
3357
3435
  }, {
3358
- F: __dxlog_file11,
3436
+ F: __dxlog_file10,
3359
3437
  L: 53,
3360
3438
  S: void 0,
3361
3439
  C: (f, a) => f(...a)
@@ -3374,28 +3452,28 @@ var useSpaceMachine = (options) => {
3374
3452
 
3375
3453
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3376
3454
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3377
- import React40, { useCallback as useCallback8, useState as useState10 } from "react";
3455
+ import React39, { useCallback as useCallback8, useState as useState12 } from "react";
3378
3456
  import { log as log12 } from "@dxos/log";
3379
3457
  import { useConfig } from "@dxos/react-client";
3380
3458
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3381
- import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3382
- import { ScrollArea, useTranslation as useTranslation25 } from "@dxos/react-ui";
3383
- import { descriptionText as descriptionText10, mx as mx22 } from "@dxos/react-ui-theme";
3384
- var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3459
+ import { Invitation as Invitation7, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3460
+ import { ScrollArea, useTranslation as useTranslation23 } from "@dxos/react-ui";
3461
+ import { descriptionText as descriptionText11, mx as mx24 } from "@dxos/react-ui-theme";
3462
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3385
3463
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
3386
3464
  var SpaceManager = (props) => {
3387
3465
  const { space, target } = props;
3388
- const { t } = useTranslation25("os");
3466
+ const { t } = useTranslation23("os");
3389
3467
  const config = useConfig();
3390
3468
  const invitations = useSpaceInvitations2(space?.key);
3391
3469
  const onInvitationEvent = useCallback8((invitation) => {
3392
3470
  const invitationCode = InvitationEncoder4.encode(invitation);
3393
- if (invitation.state === Invitation8.State.CONNECTING) {
3471
+ if (invitation.state === Invitation7.State.CONNECTING) {
3394
3472
  log12.info(JSON.stringify({
3395
3473
  invitationCode,
3396
3474
  authCode: invitation.authCode
3397
3475
  }), void 0, {
3398
- F: __dxlog_file12,
3476
+ F: __dxlog_file11,
3399
3477
  L: 49,
3400
3478
  S: void 0,
3401
3479
  C: (f, a) => f(...a)
@@ -3409,8 +3487,9 @@ var SpaceManager = (props) => {
3409
3487
  icon: UserPlus,
3410
3488
  onClick: useCallback8(() => {
3411
3489
  const invitation = space.share?.({
3412
- type: Invitation8.Type.INTERACTIVE,
3413
- authMethod: Invitation8.AuthMethod.SHARED_SECRET,
3490
+ type: Invitation7.Type.INTERACTIVE,
3491
+ authMethod: Invitation7.AuthMethod.SHARED_SECRET,
3492
+ multiUse: false,
3414
3493
  target
3415
3494
  });
3416
3495
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
@@ -3426,8 +3505,9 @@ var SpaceManager = (props) => {
3426
3505
  icon: UsersThree,
3427
3506
  onClick: useCallback8(() => {
3428
3507
  const invitation = space.share?.({
3429
- type: Invitation8.Type.MULTIUSE,
3430
- authMethod: Invitation8.AuthMethod.NONE,
3508
+ type: Invitation7.Type.INTERACTIVE,
3509
+ authMethod: Invitation7.AuthMethod.NONE,
3510
+ multiUse: true,
3431
3511
  target
3432
3512
  });
3433
3513
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
@@ -3438,7 +3518,7 @@ var SpaceManager = (props) => {
3438
3518
  ])
3439
3519
  }
3440
3520
  };
3441
- return /* @__PURE__ */ React40.createElement(SpaceManagerImpl, {
3521
+ return /* @__PURE__ */ React39.createElement(SpaceManagerImpl, {
3442
3522
  ...props,
3443
3523
  invitations,
3444
3524
  inviteActions
@@ -3447,7 +3527,7 @@ var SpaceManager = (props) => {
3447
3527
  var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
3448
3528
  var SpaceManagerImpl = (props) => {
3449
3529
  const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
3450
- const { t } = useTranslation25("os");
3530
+ const { t } = useTranslation23("os");
3451
3531
  const inviteActions = propsInviteActions ?? {
3452
3532
  noopInvite: {
3453
3533
  label: t("create space invitation label"),
@@ -3457,34 +3537,34 @@ var SpaceManagerImpl = (props) => {
3457
3537
  }
3458
3538
  }
3459
3539
  };
3460
- const [activeAction, setInternalActiveAction] = useState10(localStorage.getItem(activeActionKey) ?? "inviteOne");
3540
+ const [activeAction, setInternalActiveAction] = useState12(localStorage.getItem(activeActionKey) ?? "inviteOne");
3461
3541
  const setActiveAction = (nextAction) => {
3462
3542
  setInternalActiveAction(nextAction);
3463
3543
  localStorage.setItem(activeActionKey, nextAction);
3464
3544
  };
3465
3545
  const visibleInvitations = showInactiveInvitations ? invitations : invitations?.filter((invitation) => ![
3466
- Invitation8.State.CANCELLED
3546
+ Invitation7.State.CANCELLED
3467
3547
  ].includes(invitation.get().state));
3468
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(ScrollArea.Root, {
3548
+ return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(ScrollArea.Root, {
3469
3549
  classNames: "grow shrink basis-28 -mli-2"
3470
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Viewport, {
3550
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3471
3551
  classNames: "is-full pie-2"
3472
- }, !!visibleInvitations?.length && /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement("h3", {
3473
- className: mx22(headingFragment, descriptionText10)
3474
- }, t("invitation list heading")), /* @__PURE__ */ React40.createElement(InvitationListComponent, {
3552
+ }, !!visibleInvitations?.length && /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("h3", {
3553
+ className: mx24(headingFragment, descriptionText11)
3554
+ }, t("invitation list heading")), /* @__PURE__ */ React39.createElement(InvitationListComponent, {
3475
3555
  className: "mb-2",
3476
3556
  send,
3477
3557
  invitations: visibleInvitations ?? [],
3478
3558
  onClickRemove: (invitation) => invitation.cancel(),
3479
3559
  createInvitationUrl
3480
- }), /* @__PURE__ */ React40.createElement("h3", {
3481
- className: mx22(headingFragment, descriptionText10, "mbs-2")
3482
- }, t("space member list heading"))), /* @__PURE__ */ React40.createElement(SpaceMemberListComponent, {
3560
+ }), /* @__PURE__ */ React39.createElement("h3", {
3561
+ className: mx24(headingFragment, descriptionText11, "mbs-2")
3562
+ }, t("space member list heading"))), /* @__PURE__ */ React39.createElement(SpaceMemberListComponent, {
3483
3563
  spaceKey: space.key,
3484
3564
  includeSelf: true
3485
- })), /* @__PURE__ */ React40.createElement(ScrollArea.Scrollbar, {
3565
+ })), /* @__PURE__ */ React39.createElement(ScrollArea.Scrollbar, {
3486
3566
  orientation: "vertical"
3487
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React40.createElement(Actions, null, /* @__PURE__ */ React40.createElement(BifurcatedAction, {
3567
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React39.createElement(Actions, null, /* @__PURE__ */ React39.createElement(BifurcatedAction, {
3488
3568
  disabled: !active,
3489
3569
  actions: inviteActions,
3490
3570
  activeAction,
@@ -3494,49 +3574,49 @@ var SpaceManagerImpl = (props) => {
3494
3574
  };
3495
3575
 
3496
3576
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3497
- var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3577
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3498
3578
  var SpacePanelHeading = ({ titleId, space, onDone }) => {
3499
- const { t } = useTranslation26("os");
3579
+ const { t } = useTranslation24("os");
3500
3580
  const name = space.properties.name;
3501
- return /* @__PURE__ */ React41.createElement(Heading, {
3581
+ return /* @__PURE__ */ React40.createElement(Heading, {
3502
3582
  titleId,
3503
3583
  title: t("space panel heading"),
3504
- corner: /* @__PURE__ */ React41.createElement(CloseButton, {
3584
+ corner: /* @__PURE__ */ React40.createElement(CloseButton, {
3505
3585
  "data-testid": "identity-panel-done",
3506
3586
  onDone
3507
3587
  })
3508
- }, /* @__PURE__ */ React41.createElement("div", {
3588
+ }, /* @__PURE__ */ React40.createElement("div", {
3509
3589
  role: "none",
3510
3590
  className: "flex gap-4 items-center justify-center mlb-4"
3511
- }, /* @__PURE__ */ React41.createElement(Planet, {
3591
+ }, /* @__PURE__ */ React40.createElement(Planet, {
3512
3592
  size: 32,
3513
3593
  weight: "light"
3514
- }), /* @__PURE__ */ React41.createElement("div", {
3594
+ }), /* @__PURE__ */ React40.createElement("div", {
3515
3595
  className: "block text-start font-light text-xl"
3516
3596
  }, name ?? space.key.truncate())));
3517
3597
  };
3518
3598
  var SpacePanelImpl = (props) => {
3519
3599
  const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3520
- return /* @__PURE__ */ React41.createElement(DensityProvider4, {
3600
+ return /* @__PURE__ */ React40.createElement(DensityProvider3, {
3521
3601
  density: "fine"
3522
- }, /* @__PURE__ */ React41.createElement(SpacePanelHeading, {
3602
+ }, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3523
3603
  ...rest,
3524
3604
  titleId,
3525
3605
  space
3526
- }), /* @__PURE__ */ React41.createElement(Viewport.Root, {
3606
+ }), /* @__PURE__ */ React40.createElement(Viewport.Root, {
3527
3607
  activeView
3528
- }, /* @__PURE__ */ React41.createElement(Viewport.Views, null, /* @__PURE__ */ React41.createElement(Viewport.View, {
3608
+ }, /* @__PURE__ */ React40.createElement(Viewport.Views, null, /* @__PURE__ */ React40.createElement(Viewport.View, {
3529
3609
  id: "space manager",
3530
3610
  classNames: stepStyles
3531
- }, /* @__PURE__ */ React41.createElement(SpaceManagerComponent, {
3611
+ }, /* @__PURE__ */ React40.createElement(SpaceManagerComponent, {
3532
3612
  active: activeView === "space manager",
3533
3613
  space,
3534
3614
  target,
3535
3615
  ...rest
3536
- })), /* @__PURE__ */ React41.createElement(Viewport.View, {
3616
+ })), /* @__PURE__ */ React40.createElement(Viewport.View, {
3537
3617
  id: "space invitation manager",
3538
3618
  classNames: stepStyles
3539
- }, /* @__PURE__ */ React41.createElement(InvitationManagerComponent, {
3619
+ }, /* @__PURE__ */ React40.createElement(InvitationManagerComponent, {
3540
3620
  active: activeView === "space invitation manager",
3541
3621
  ...rest,
3542
3622
  invitationUrl: props.invitationUrl
@@ -3544,14 +3624,14 @@ var SpacePanelImpl = (props) => {
3544
3624
  };
3545
3625
  var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
3546
3626
  const invitationStatus = useInvitationStatus3(invitation);
3547
- return /* @__PURE__ */ React41.createElement(SpacePanelImpl, {
3627
+ return /* @__PURE__ */ React40.createElement(SpacePanelImpl, {
3548
3628
  ...props,
3549
3629
  ...invitationStatus,
3550
3630
  invitationUrl: props.createInvitationUrl(invitationStatus.invitationCode)
3551
3631
  });
3552
3632
  };
3553
3633
  var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
3554
- const titleId = useId8("spacePanel__heading", propsTitleId);
3634
+ const titleId = useId9("spacePanel__heading", propsTitleId);
3555
3635
  const [spaceState, spaceSend, spaceService] = useSpaceMachine({
3556
3636
  context: {
3557
3637
  space: props.space
@@ -3560,7 +3640,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3560
3640
  useEffect6(() => {
3561
3641
  const subscription = spaceService.subscribe((state) => {
3562
3642
  log13("[state]", state, {
3563
- F: __dxlog_file13,
3643
+ F: __dxlog_file12,
3564
3644
  L: 94,
3565
3645
  S: void 0,
3566
3646
  C: (f, a) => f(...a)
@@ -3591,16 +3671,31 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3591
3671
  };
3592
3672
  return spaceState.context.invitation ? (
3593
3673
  // TODO(wittjosiah): Unused? Remove?
3594
- /* @__PURE__ */ React41.createElement(SpacePanelWithInvitationImpl, {
3674
+ /* @__PURE__ */ React40.createElement(SpacePanelWithInvitationImpl, {
3595
3675
  ...implProps,
3596
3676
  invitation: spaceState.context.invitation
3597
3677
  })
3598
- ) : /* @__PURE__ */ React41.createElement(SpacePanelImpl, implProps);
3678
+ ) : /* @__PURE__ */ React40.createElement(SpacePanelImpl, implProps);
3679
+ };
3680
+
3681
+ // packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
3682
+ import React41 from "react";
3683
+ import { Status, useTranslation as useTranslation25 } from "@dxos/react-ui";
3684
+ var StatusPanel = ({ titleId }) => {
3685
+ const { t } = useTranslation25("os");
3686
+ return /* @__PURE__ */ React41.createElement("div", {
3687
+ className: "grid place-items-center p-2 gap-2"
3688
+ }, /* @__PURE__ */ React41.createElement("p", {
3689
+ id: titleId,
3690
+ className: "font-medium text-center"
3691
+ }, t("resetting message")), /* @__PURE__ */ React41.createElement(Status, {
3692
+ indeterminate: true
3693
+ }, t("resetting message")));
3599
3694
  };
3600
3695
 
3601
3696
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
3602
3697
  var IdentityDialog = (props) => {
3603
- const titleId = useId9("spaceDialog__title");
3698
+ const titleId = useId10("identityDialog__title", props.title);
3604
3699
  return /* @__PURE__ */ React42.createElement(Dialog.Root, {
3605
3700
  defaultOpen: true,
3606
3701
  onOpenChange: (open) => open || props.onDone?.()
@@ -3618,9 +3713,9 @@ var IdentityDialog = (props) => {
3618
3713
 
3619
3714
  // packages/sdk/shell/src/composites/JoinDialog/JoinDialog.tsx
3620
3715
  import React43 from "react";
3621
- import { AlertDialog, useId as useId10, useVisualViewport } from "@dxos/react-ui";
3716
+ import { AlertDialog, useId as useId11, useVisualViewport } from "@dxos/react-ui";
3622
3717
  var JoinDialog = (joinPanelProps) => {
3623
- const titleId = useId10("joinDialog__title");
3718
+ const titleId = useId11("joinDialog__title");
3624
3719
  const { height } = useVisualViewport();
3625
3720
  return /* @__PURE__ */ React43.createElement(AlertDialog.Root, {
3626
3721
  defaultOpen: true,
@@ -3647,26 +3742,26 @@ var JoinDialog = (joinPanelProps) => {
3647
3742
  };
3648
3743
 
3649
3744
  // packages/sdk/shell/src/composites/Shell/run-shell.tsx
3650
- import React46, { StrictMode } from "react";
3745
+ import React47, { StrictMode } from "react";
3651
3746
  import { createRoot } from "react-dom/client";
3652
3747
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3653
3748
  import { ShellRuntimeImpl } from "@dxos/client-services";
3654
3749
  import { Client, ClientContext, ClientServicesProxy, Config, SystemStatus } from "@dxos/react-client";
3655
- import { ThemeProvider, Tooltip as Tooltip5 } from "@dxos/react-ui";
3750
+ import { ThemeProvider, Tooltip as Tooltip7 } from "@dxos/react-ui";
3656
3751
  import { defaultTx } from "@dxos/react-ui-theme";
3657
3752
  import { createIFramePort } from "@dxos/rpc-tunnel";
3658
3753
 
3659
3754
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3660
- import React45, { useEffect as useEffect7, useState as useState11 } from "react";
3755
+ import React46, { useEffect as useEffect7, useState as useState13 } from "react";
3661
3756
  import { log as log14 } from "@dxos/log";
3662
- import { ShellDisplay, ShellLayout, useClient as useClient7 } from "@dxos/react-client";
3757
+ import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3663
3758
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3664
3759
 
3665
3760
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
3666
3761
  import React44 from "react";
3667
- import { Dialog as Dialog2, useId as useId11 } from "@dxos/react-ui";
3762
+ import { Dialog as Dialog2, useId as useId12 } from "@dxos/react-ui";
3668
3763
  var SpaceDialog = (spacePanelProps) => {
3669
- const titleId = useId11("spaceDialog__title");
3764
+ const titleId = useId12("spaceDialog__title");
3670
3765
  return /* @__PURE__ */ React44.createElement(Dialog2.Root, {
3671
3766
  defaultOpen: true,
3672
3767
  onOpenChange: (open) => open || spacePanelProps.onDone?.()
@@ -3681,16 +3776,30 @@ var SpaceDialog = (spacePanelProps) => {
3681
3776
  }))))));
3682
3777
  };
3683
3778
 
3779
+ // packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
3780
+ import React45 from "react";
3781
+ import { AlertDialog as AlertDialog2, useId as useId13 } from "@dxos/react-ui";
3782
+ var StatusDialog = () => {
3783
+ const titleId = useId13("statusDialog__title");
3784
+ return /* @__PURE__ */ React45.createElement(AlertDialog2.Root, {
3785
+ open: true
3786
+ }, /* @__PURE__ */ React45.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Content, {
3787
+ "aria-labelledby": titleId
3788
+ }, /* @__PURE__ */ React45.createElement(StatusPanel, {
3789
+ titleId
3790
+ })))));
3791
+ };
3792
+
3684
3793
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3685
- var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3794
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3686
3795
  var Shell = ({ runtime, origin }) => {
3687
- const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState11({
3796
+ const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState13({
3688
3797
  layout: runtime.layout,
3689
3798
  invitationCode: runtime.invitationCode,
3690
3799
  spaceKey: runtime.spaceKey,
3691
3800
  target: runtime.target
3692
3801
  });
3693
- const client = useClient7();
3802
+ const client = useClient6();
3694
3803
  const space = useSpace2(spaceKey);
3695
3804
  useEffect7(() => {
3696
3805
  return runtime.layoutUpdate.on((request) => setLayout(request));
@@ -3700,8 +3809,8 @@ var Shell = ({ runtime, origin }) => {
3700
3809
  useEffect7(() => {
3701
3810
  if (layout === ShellLayout.SPACE && !space) {
3702
3811
  log14.warn("No space found for shell space invitations.", void 0, {
3703
- F: __dxlog_file14,
3704
- L: 32,
3812
+ F: __dxlog_file13,
3813
+ L: 33,
3705
3814
  S: void 0,
3706
3815
  C: (f, a) => f(...a)
3707
3816
  });
@@ -3721,10 +3830,17 @@ var Shell = ({ runtime, origin }) => {
3721
3830
  space
3722
3831
  ]);
3723
3832
  switch (layout) {
3833
+ case ShellLayout.STATUS:
3834
+ return /* @__PURE__ */ React46.createElement(StatusDialog, null);
3724
3835
  case ShellLayout.INITIALIZE_IDENTITY:
3725
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3836
+ case ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION:
3837
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3726
3838
  mode: "halo-only",
3839
+ initialDisposition: layout === ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION ? "accept-halo-invitation" : "default",
3727
3840
  initialInvitationCode: invitationCode,
3841
+ onCancelResetStorage: () => runtime.setLayout({
3842
+ layout: ShellLayout.IDENTITY
3843
+ }),
3728
3844
  onDone: () => {
3729
3845
  void runtime.setAppContext({
3730
3846
  display: ShellDisplay.NONE
@@ -3737,18 +3853,27 @@ var Shell = ({ runtime, origin }) => {
3737
3853
  case ShellLayout.IDENTITY:
3738
3854
  case ShellLayout.SHARE_IDENTITY:
3739
3855
  case ShellLayout.EDIT_PROFILE:
3740
- return /* @__PURE__ */ React45.createElement(IdentityDialog, {
3856
+ return /* @__PURE__ */ React46.createElement(IdentityDialog, {
3741
3857
  createInvitationUrl: (invitationCode2) => `${origin}?deviceInvitationCode=${invitationCode2}`,
3742
- onResetDevice: async () => {
3858
+ onResetStorage: async () => {
3859
+ runtime.setLayout({
3860
+ layout: ShellLayout.STATUS
3861
+ });
3743
3862
  await client.reset();
3744
- await runtime.setAppContext({
3863
+ return runtime.setAppContext({
3745
3864
  display: ShellDisplay.NONE,
3746
3865
  reload: true
3747
3866
  });
3748
3867
  },
3749
- onJoinNewIdentity: () => runtime.setLayout({
3750
- layout: ShellLayout.INITIALIZE_IDENTITY
3751
- }),
3868
+ onJoinNewIdentity: async () => {
3869
+ runtime.setLayout({
3870
+ layout: ShellLayout.STATUS
3871
+ });
3872
+ await client.reset();
3873
+ return runtime.setLayout({
3874
+ layout: ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION
3875
+ });
3876
+ },
3752
3877
  onDone: async () => {
3753
3878
  await runtime.setAppContext({
3754
3879
  display: ShellDisplay.NONE
@@ -3756,10 +3881,11 @@ var Shell = ({ runtime, origin }) => {
3756
3881
  runtime.setLayout({
3757
3882
  layout: ShellLayout.DEFAULT
3758
3883
  });
3759
- }
3884
+ },
3885
+ initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : "default"
3760
3886
  });
3761
3887
  case ShellLayout.SPACE:
3762
- return space ? /* @__PURE__ */ React45.createElement(SpaceDialog, {
3888
+ return space ? /* @__PURE__ */ React46.createElement(SpaceDialog, {
3763
3889
  space,
3764
3890
  target,
3765
3891
  createInvitationUrl: (invitationCode2) => `${origin}?spaceInvitationCode=${invitationCode2}`,
@@ -3773,7 +3899,7 @@ var Shell = ({ runtime, origin }) => {
3773
3899
  }
3774
3900
  }) : null;
3775
3901
  case ShellLayout.JOIN_SPACE:
3776
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3902
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3777
3903
  initialInvitationCode: invitationCode,
3778
3904
  onDone: async (result) => {
3779
3905
  const target2 = result?.target ?? void 0;
@@ -3848,8 +3974,6 @@ var os = {
3848
3974
  "connected status label": "Enter confirmation PIN",
3849
3975
  "authenticating status label": "Enter confirmation PIN",
3850
3976
  "success status label": "Success",
3851
- "connect label": "Connect",
3852
- "reconnect label": "Reconnect",
3853
3977
  "cancel label": "Cancel",
3854
3978
  "done label": "Done",
3855
3979
  "reset label": "Start over",
@@ -3876,7 +4000,8 @@ var os = {
3876
4000
  "choose add device label": "Add device",
3877
4001
  "choose devices label": "Manage devices",
3878
4002
  "choose profile label": "Edit profile",
3879
- "choose sign out label": "Sign out",
4003
+ "choose sign out label": "Reset storage",
4004
+ "choose join new identity label": "Join existing device",
3880
4005
  "empty space members message": "There is nobody in this space yet.",
3881
4006
  "back to all invitations label": "Back to all invitations",
3882
4007
  "invitation heading": "Invitation",
@@ -3900,18 +4025,20 @@ var os = {
3900
4025
  "invite options label": "Change the active invite option.",
3901
4026
  "reset in progress label": "Resetting...",
3902
4027
  "confirm label": "Confirm",
3903
- "reset identity input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4028
+ "reset storage input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4029
+ "join new identity input label": "In order to join an existing device, storage on this device must be cleared first. Type {{confirmationValue}} to continue.",
3904
4030
  "failed to reset identity message": "Failed to reset identity.",
3905
4031
  "confirmation value": "CONFIRM",
3906
- "sign out chooser title": "DANGER ZONE",
3907
- "sign out chooser message": "Proceeding with either action below will erase all data on this device.",
4032
+ "sign out chooser title": "Danger zone",
4033
+ "sign out chooser message": "Proceeding with the action below will erase all data on this device.",
3908
4034
  "join new identity label": "Join a new identity",
3909
- "reset device label": "Reset device",
4035
+ "reset device label": "Reset storage",
3910
4036
  "reset device confirm message": "Are you sure you want to reset your device? All data will be lost.",
3911
4037
  "emoji and color label": "Emoji and color",
3912
4038
  "clear label": "Use default",
3913
4039
  "select emoji label": "Choose an emoji to use in your avatar",
3914
4040
  "select hue label": "Choose a hue to use in your avatar",
4041
+ "resetting message": "One moment while things are reset\u2026",
3915
4042
  "red label": "Red",
3916
4043
  "orange label": "Orange",
3917
4044
  "amber label": "Amber",
@@ -3928,7 +4055,19 @@ var os = {
3928
4055
  "purple label": "Purple",
3929
4056
  "fuchsia label": "Fuchsia",
3930
4057
  "pink label": "Pink",
3931
- "rose label": "Rose"
4058
+ "rose label": "Rose",
4059
+ "current device tag label": "This device",
4060
+ "device name placeholder": "{{platform}} on {{os}}",
4061
+ "more options label": "More options",
4062
+ "disconnect label": "Currently online. Click to go offline.",
4063
+ "connect label": "Currently offline. Click to go online.",
4064
+ "edit device label": "Edit device name & avatar",
4065
+ "agent heading": "Agent",
4066
+ "agent message title": "About creating an agent",
4067
+ "agent message body": "Creating an agent helps keep your devices and peers in-sync. An agent is like any other device, but since it\u2019s always online your changes will sync even when all your physical devices are\xA0asleep.",
4068
+ "create agent label": "Start an agent",
4069
+ "destroy agent label": "Shut down agent",
4070
+ "agent device label": "Your agent"
3932
4071
  };
3933
4072
 
3934
4073
  // packages/sdk/shell/src/translations/index.ts
@@ -3952,27 +4091,27 @@ var runShell = async (config = new Config()) => {
3952
4091
  runtime.open(),
3953
4092
  client.initialize()
3954
4093
  ]);
3955
- createRoot(document.getElementById("root")).render(/* @__PURE__ */ React46.createElement(StrictMode, null, /* @__PURE__ */ React46.createElement(ThemeProvider, {
4094
+ createRoot(document.getElementById("root")).render(/* @__PURE__ */ React47.createElement(StrictMode, null, /* @__PURE__ */ React47.createElement(ThemeProvider, {
3956
4095
  tx: defaultTx,
3957
4096
  resourceExtensions: [
3958
4097
  osTranslations
3959
4098
  ]
3960
- }, /* @__PURE__ */ React46.createElement(ClientContext.Provider, {
4099
+ }, /* @__PURE__ */ React47.createElement(ClientContext.Provider, {
3961
4100
  value: {
3962
4101
  client,
3963
4102
  status: SystemStatus.ACTIVE
3964
4103
  }
3965
- }, /* @__PURE__ */ React46.createElement(ClipboardProvider, null, /* @__PURE__ */ React46.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React46.createElement(Shell, {
4104
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
3966
4105
  runtime,
3967
4106
  origin: location.origin
3968
4107
  })))))));
3969
4108
  };
3970
4109
 
3971
4110
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
3972
- import React47, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
3973
- import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient8 } from "@dxos/react-client";
4111
+ import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState14 } from "react";
4112
+ import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
3974
4113
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
3975
- import { mx as mx23 } from "@dxos/react-ui-theme";
4114
+ import { mx as mx25 } from "@dxos/react-ui-theme";
3976
4115
 
3977
4116
  // packages/sdk/shell/src/composites/Shell/memory-shell-runtime.ts
3978
4117
  import { Event } from "@dxos/async";
@@ -4008,7 +4147,7 @@ var MemoryShellRuntime = class {
4008
4147
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4009
4148
  var ShellContext = /* @__PURE__ */ createContext2({});
4010
4149
  var useShell = () => {
4011
- const client = useClient8();
4150
+ const client = useClient7();
4012
4151
  const { runtime, setDisplay } = useContext2(ShellContext);
4013
4152
  const setLayout = async (layout, options) => {
4014
4153
  if (runtime) {
@@ -4029,9 +4168,9 @@ var useShell = () => {
4029
4168
  };
4030
4169
  };
4031
4170
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4032
- const client = useClient8();
4171
+ const client = useClient7();
4033
4172
  const identity = useIdentity3();
4034
- const [display, setDisplay] = useState12(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4173
+ const [display, setDisplay] = useState14(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4035
4174
  const shellRuntime = useMemo6(() => {
4036
4175
  if (client.config.get("runtime.app.env.DX_VAULT") !== "false") {
4037
4176
  return;
@@ -4101,12 +4240,12 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4101
4240
  }, [
4102
4241
  shellRuntime
4103
4242
  ]);
4104
- return /* @__PURE__ */ React47.createElement(React47.Fragment, null, shellRuntime && /* @__PURE__ */ React47.createElement("div", {
4105
- className: mx23(display === ShellDisplay2.NONE ? "hidden" : "")
4106
- }, /* @__PURE__ */ React47.createElement(Shell, {
4243
+ return /* @__PURE__ */ React48.createElement(React48.Fragment, null, shellRuntime && /* @__PURE__ */ React48.createElement("div", {
4244
+ className: mx25(display === ShellDisplay2.NONE ? "hidden" : "")
4245
+ }, /* @__PURE__ */ React48.createElement(Shell, {
4107
4246
  runtime: shellRuntime,
4108
4247
  origin: window.location.origin
4109
- })), /* @__PURE__ */ React47.createElement(ShellContext.Provider, {
4248
+ })), /* @__PURE__ */ React48.createElement(ShellContext.Provider, {
4110
4249
  value: {
4111
4250
  runtime: shellRuntime,
4112
4251
  setDisplay
@@ -4116,6 +4255,7 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4116
4255
  export {
4117
4256
  Action,
4118
4257
  Actions,
4258
+ AgentConfig,
4119
4259
  AuthCode,
4120
4260
  BifurcatedAction,
4121
4261
  Centered,
@@ -4123,13 +4263,17 @@ export {
4123
4263
  ClipboardProvider,
4124
4264
  CloseButton,
4125
4265
  CompoundButton,
4266
+ ConfirmReset,
4267
+ ConfirmResetImpl,
4126
4268
  CopyButton,
4127
4269
  CopyButtonIconOnly,
4128
4270
  DeviceList,
4129
4271
  Emoji,
4130
- EmojiPicker,
4272
+ EmojiPickerBlock,
4273
+ EmojiPickerToolbarButton,
4131
4274
  Heading,
4132
- HuePicker,
4275
+ HuePickerBlock,
4276
+ HuePickerToolbarButton,
4133
4277
  IdentityDialog,
4134
4278
  IdentityListItem,
4135
4279
  IdentityPanel,
@@ -4153,6 +4297,7 @@ export {
4153
4297
  SpaceMemberListImpl,
4154
4298
  SpacePanel,
4155
4299
  SpacePanelImpl,
4300
+ StatusPanel,
4156
4301
  StepHeading,
4157
4302
  Viewport,
4158
4303
  activeBgColor,