@dxos/shell 0.4.10-main.c32f430 → 0.4.10-main.ccba876

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