@dxos/shell 0.4.10-main.eedd150 → 0.4.10-main.f15a546

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 (145) hide show
  1. package/dist/bundle/index-AqScakhe.mjs +110 -0
  2. package/dist/bundle/index-AqScakhe.mjs.map +1 -0
  3. package/dist/bundle/index-ClYj8no6.mjs +96625 -0
  4. package/dist/bundle/index-ClYj8no6.mjs.map +1 -0
  5. package/dist/bundle/shell.mjs +9 -81813
  6. package/dist/bundle/shell.mjs.map +1 -1
  7. package/dist/bundle/shell.umd.js +152 -89
  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 +864 -821
  12. package/dist/lib/browser/react.mjs.map +4 -4
  13. package/dist/lib/browser/testing/index.mjs +7 -4
  14. package/dist/lib/browser/testing/index.mjs.map +3 -3
  15. package/dist/types/src/components/AgentConfig.d.ts +3 -0
  16. package/dist/types/src/components/AgentConfig.d.ts.map +1 -0
  17. package/dist/types/src/components/AgentConfig.js +37 -0
  18. package/dist/types/src/components/AgentConfig.js.map +1 -0
  19. package/dist/types/src/components/DeviceList/DeviceList.d.ts +3 -0
  20. package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -0
  21. package/dist/types/src/components/DeviceList/DeviceList.js +29 -0
  22. package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -0
  23. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts +6 -0
  24. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts.map +1 -0
  25. package/dist/types/src/components/DeviceList/DeviceListItem.js +72 -0
  26. package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -0
  27. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts +27 -0
  28. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts.map +1 -0
  29. package/dist/types/src/components/DeviceList/DeviceListProps.js +6 -0
  30. package/dist/types/src/components/DeviceList/DeviceListProps.js.map +1 -0
  31. package/dist/types/src/components/DeviceList/index.d.ts +3 -0
  32. package/dist/types/src/components/DeviceList/index.d.ts.map +1 -0
  33. package/dist/types/src/components/DeviceList/index.js +22 -0
  34. package/dist/types/src/components/DeviceList/index.js.map +1 -0
  35. package/dist/types/src/components/EmojiPicker.d.ts +10 -4
  36. package/dist/types/src/components/EmojiPicker.d.ts.map +1 -1
  37. package/dist/types/src/components/EmojiPicker.js +57 -3
  38. package/dist/types/src/components/EmojiPicker.js.map +1 -1
  39. package/dist/types/src/components/HuePicker.d.ts +10 -4
  40. package/dist/types/src/components/HuePicker.d.ts.map +1 -1
  41. package/dist/types/src/components/HuePicker.js +75 -6
  42. package/dist/types/src/components/HuePicker.js.map +1 -1
  43. package/dist/types/src/components/IdentityList/index.d.ts +0 -1
  44. package/dist/types/src/components/IdentityList/index.d.ts.map +1 -1
  45. package/dist/types/src/components/IdentityList/index.js +0 -1
  46. package/dist/types/src/components/IdentityList/index.js.map +1 -1
  47. package/dist/types/src/components/InvitationList/InvitationListItem.js +5 -5
  48. package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
  49. package/dist/types/src/components/Panel/Action.d.ts +2 -2
  50. package/dist/types/src/components/Viewport/Viewport.d.ts +1 -1
  51. package/dist/types/src/components/index.d.ts +2 -0
  52. package/dist/types/src/components/index.d.ts.map +1 -1
  53. package/dist/types/src/components/index.js +2 -0
  54. package/dist/types/src/components/index.js.map +1 -1
  55. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  56. package/dist/types/src/composites/Shell/Shell.js +1 -5
  57. package/dist/types/src/composites/Shell/Shell.js.map +1 -1
  58. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  59. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +85 -40
  60. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  61. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +0 -3
  62. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
  63. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +1 -43
  64. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
  65. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +8 -11
  66. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  67. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +1 -1
  68. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  69. package/dist/types/src/panels/IdentityPanel/identityMachine.js +0 -24
  70. package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
  71. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +4 -4
  72. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  73. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +9 -43
  74. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  75. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -1
  76. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
  77. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +2 -2
  78. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
  79. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +0 -2
  80. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
  81. package/dist/types/src/panels/IdentityPanel/steps/index.js +0 -2
  82. package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
  83. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -1
  84. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +5 -1
  85. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
  86. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
  87. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +3 -1
  88. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
  89. package/dist/types/src/playwright/invitations.spec.js +3 -1
  90. package/dist/types/src/playwright/invitations.spec.js.map +1 -1
  91. package/dist/types/src/steps/InvitationManager.d.ts +1 -1
  92. package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
  93. package/dist/types/src/steps/InvitationManager.js +3 -4
  94. package/dist/types/src/steps/InvitationManager.js.map +1 -1
  95. package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
  96. package/dist/types/src/stories/Invitations.e2e-stories.js +5 -2
  97. package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
  98. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  99. package/dist/types/src/testing/shell-manager.js +7 -4
  100. package/dist/types/src/testing/shell-manager.js.map +1 -1
  101. package/dist/types/src/translations/locales/en-US.d.ts +12 -2
  102. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  103. package/dist/types/src/translations/locales/en-US.js +12 -2
  104. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  105. package/package.json +22 -21
  106. package/src/components/AgentConfig.tsx +66 -0
  107. package/src/components/DeviceList/DeviceList.tsx +54 -0
  108. package/src/components/DeviceList/DeviceListItem.tsx +120 -0
  109. package/src/components/DeviceList/DeviceListProps.ts +33 -0
  110. package/src/components/DeviceList/index.ts +6 -0
  111. package/src/components/EmojiPicker.tsx +102 -5
  112. package/src/components/HuePicker.tsx +100 -6
  113. package/src/components/IdentityList/index.ts +0 -1
  114. package/src/components/InvitationList/InvitationListItem.tsx +5 -5
  115. package/src/components/index.ts +2 -0
  116. package/src/composites/Shell/Shell.tsx +1 -7
  117. package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +0 -63
  118. package/src/panels/IdentityPanel/IdentityPanel.tsx +129 -34
  119. package/src/panels/IdentityPanel/IdentityPanelProps.ts +10 -14
  120. package/src/panels/IdentityPanel/identityMachine.ts +1 -31
  121. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +23 -76
  122. package/src/panels/IdentityPanel/steps/ProfileForm.tsx +12 -4
  123. package/src/panels/IdentityPanel/steps/index.ts +0 -2
  124. package/src/panels/IdentityPanel/useAgentHandlers.ts +5 -1
  125. package/src/panels/SpacePanel/steps/SpaceManager.tsx +3 -1
  126. package/src/playwright/invitations.spec.ts +3 -1
  127. package/src/steps/InvitationManager.tsx +4 -4
  128. package/src/stories/Invitations.e2e-stories.tsx +6 -3
  129. package/src/testing/shell-manager.ts +7 -4
  130. package/src/translations/locales/en-US.ts +13 -2
  131. package/dist/types/src/components/IdentityList/DeviceList.d.ts +0 -7
  132. package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +0 -1
  133. package/dist/types/src/components/IdentityList/DeviceList.js +0 -34
  134. package/dist/types/src/components/IdentityList/DeviceList.js.map +0 -1
  135. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts +0 -3
  136. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts.map +0 -1
  137. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js +0 -26
  138. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js.map +0 -1
  139. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts +0 -10
  140. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts.map +0 -1
  141. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js +0 -23
  142. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js.map +0 -1
  143. package/src/components/IdentityList/DeviceList.tsx +0 -49
  144. package/src/panels/IdentityPanel/steps/AgentForm.tsx +0 -61
  145. package/src/panels/IdentityPanel/steps/DeviceManager.tsx +0 -41
@@ -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");
236
360
  const [hueValue, setHueValue] = useControllableState2({
237
361
  prop: hue,
238
362
  onChange: onChangeHue,
239
363
  defaultProp: defaultHue
240
364
  });
241
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Root, {
365
+ const [huePickerOpen, setHuePickerOpen] = useState4(false);
366
+ const suppressNextTooltip = useRef2(false);
367
+ const [triggerTooltipOpen, setTriggerTooltipOpen] = useState4(false);
368
+ return /* @__PURE__ */ React6.createElement(Tooltip4.Root, {
369
+ open: triggerTooltipOpen,
370
+ onOpenChange: (nextOpen) => {
371
+ if (suppressNextTooltip.current) {
372
+ setTriggerTooltipOpen(false);
373
+ suppressNextTooltip.current = false;
374
+ } else {
375
+ setTriggerTooltipOpen(nextOpen);
376
+ }
377
+ }
378
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
379
+ modal: false,
380
+ open: huePickerOpen,
381
+ onOpenChange: (nextOpen) => {
382
+ setHuePickerOpen(nextOpen);
383
+ suppressNextTooltip.current = true;
384
+ }
385
+ }, /* @__PURE__ */ React6.createElement(Tooltip4.Trigger, {
386
+ asChild: true
387
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Trigger, {
388
+ asChild: true
389
+ }, /* @__PURE__ */ React6.createElement(Toolbar2.Button, {
390
+ classNames: mx4("gap-2 plb-1", classNames),
391
+ disabled
392
+ }, /* @__PURE__ */ React6.createElement("span", {
393
+ className: "sr-only"
394
+ }, t("select hue label")), /* @__PURE__ */ React6.createElement(Palette, {
395
+ className: getSize4(5)
396
+ })))), /* @__PURE__ */ React6.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React6.createElement(Tooltip4.Content, {
397
+ side: "bottom",
398
+ classNames: "z-50"
399
+ }, t("select hue label"), /* @__PURE__ */ React6.createElement(Tooltip4.Arrow, null))), /* @__PURE__ */ React6.createElement(DropdownMenu.Content, {
400
+ side: "bottom"
401
+ }, /* @__PURE__ */ React6.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
402
+ return /* @__PURE__ */ React6.createElement(DropdownMenu.CheckboxItem, {
403
+ key: hue2,
404
+ checked: hue2 === hueValue,
405
+ onCheckedChange: () => setHueValue(hue2)
406
+ }, /* @__PURE__ */ React6.createElement(HuePreview, {
407
+ hue: hue2
408
+ }), /* @__PURE__ */ React6.createElement("span", {
409
+ className: "grow"
410
+ }, t(`${hue2} label`)), /* @__PURE__ */ React6.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React6.createElement(Check2, null)));
411
+ })), /* @__PURE__ */ React6.createElement(DropdownMenu.Arrow, null))));
412
+ };
413
+ var HuePickerBlock = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
414
+ const { t } = useTranslation4("os");
415
+ const [hueValue, setHueValue] = useControllableState2({
416
+ prop: hue,
417
+ onChange: onChangeHue,
418
+ defaultProp: defaultHue
419
+ });
420
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
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
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";
@@ -953,11 +1210,6 @@ var identityMachine = createMachine({
953
1210
  target: "managingDeviceInvitation",
954
1211
  actions: "log"
955
1212
  },
956
- {
957
- cond: "initiallyManagingProfile",
958
- target: "managingProfile",
959
- actions: "log"
960
- },
961
1213
  {
962
1214
  target: "choosingAction",
963
1215
  actions: "log"
@@ -966,34 +1218,6 @@ var identityMachine = createMachine({
966
1218
  },
967
1219
  choosingAction: {},
968
1220
  managingDeviceInvitation: {},
969
- managingAgent: {
970
- initial: "idle",
971
- states: {
972
- idle: {},
973
- pending: {}
974
- }
975
- },
976
- managingDevices: {},
977
- managingProfile: {
978
- initial: "idle",
979
- states: {
980
- idle: {},
981
- pending: {}
982
- },
983
- on: {
984
- setIdentity: {
985
- target: "choosingAction",
986
- actions: [
987
- "setIdentity",
988
- "log"
989
- ]
990
- },
991
- updateProfile: {
992
- target: ".pending",
993
- actions: "log"
994
- }
995
- }
996
- },
997
1221
  confirmingResetStorage: {},
998
1222
  confirmingJoinNewIdentity: {}
999
1223
  },
@@ -1019,14 +1243,6 @@ var identityMachine = createMachine({
1019
1243
  "log"
1020
1244
  ]
1021
1245
  },
1022
- chooseDevices: {
1023
- target: ".managingDevices",
1024
- actions: "log"
1025
- },
1026
- chooseProfile: {
1027
- target: ".managingProfile",
1028
- actions: "log"
1029
- },
1030
1246
  chooseJoinNewIdentity: {
1031
1247
  target: ".confirmingJoinNewIdentity",
1032
1248
  actions: "log"
@@ -1034,16 +1250,11 @@ var identityMachine = createMachine({
1034
1250
  chooseResetStorage: {
1035
1251
  target: ".confirmingResetStorage",
1036
1252
  actions: "log"
1037
- },
1038
- chooseAgent: {
1039
- target: ".managingAgent",
1040
- actions: "log"
1041
1253
  }
1042
1254
  }
1043
1255
  }, {
1044
1256
  guards: {
1045
- initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation",
1046
- initiallyManagingProfile: ({ initialDisposition }, _event) => initialDisposition === "manage-profile"
1257
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation"
1047
1258
  },
1048
1259
  actions: {
1049
1260
  setIdentity: assign({
@@ -1061,7 +1272,7 @@ var identityMachine = createMachine({
1061
1272
  context
1062
1273
  }, {
1063
1274
  F: __dxlog_file,
1064
- L: 126,
1275
+ L: 96,
1065
1276
  S: void 0,
1066
1277
  C: (f, a) => f(...a)
1067
1278
  });
@@ -1082,69 +1293,12 @@ var useIdentityMachine = (client, options) => {
1082
1293
  });
1083
1294
  };
1084
1295
 
1085
- // packages/sdk/shell/src/panels/IdentityPanel/steps/AgentForm.tsx
1086
- import React23 from "react";
1087
- import { useTranslation as useTranslation9 } from "@dxos/react-ui";
1088
- var AgentForm = (props) => {
1089
- const { active, onAgentCreate, onAgentDestroy, send, validationMessage, agentStatus, agentActive, agentProviderDisabled } = props;
1090
- const disabled = !active;
1091
- const { t } = useTranslation9("os");
1092
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("div", {
1093
- role: "none",
1094
- className: "grow flex flex-col justify-center"
1095
- }, /* @__PURE__ */ React23.createElement(Input, {
1096
- validationMessage,
1097
- label: /* @__PURE__ */ React23.createElement(StepHeading, null, "Agent Status"),
1098
- disabled,
1099
- "data-testid": "agent-status",
1100
- value: agentStatus
1101
- })), /* @__PURE__ */ React23.createElement(Actions, null, /* @__PURE__ */ React23.createElement(Action, {
1102
- disabled: agentActive || agentProviderDisabled,
1103
- onClick: () => onAgentCreate?.(),
1104
- "data-testid": "create-agent"
1105
- }, "Create Agent"), /* @__PURE__ */ React23.createElement(Action, {
1106
- disabled: !agentActive || agentProviderDisabled,
1107
- onClick: () => onAgentDestroy?.(),
1108
- "data-testid": "destroy-agent"
1109
- }, "Destroy Agent"), /* @__PURE__ */ React23.createElement(Action, {
1110
- disabled,
1111
- onClick: () => send?.({
1112
- type: "unchooseAction"
1113
- }),
1114
- "data-testid": "update-profile-form-back"
1115
- }, t("back label"))));
1116
- };
1117
-
1118
- // packages/sdk/shell/src/panels/IdentityPanel/steps/DeviceManager.tsx
1119
- import React24 from "react";
1120
- import { useTranslation as useTranslation10 } from "@dxos/react-ui";
1121
- var DeviceManager = ({ devices, active, send }) => {
1122
- const { t } = useTranslation10("os");
1123
- const disabled = !active;
1124
- return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", {
1125
- role: "none",
1126
- className: "grow"
1127
- }, /* @__PURE__ */ React24.createElement(DeviceList, {
1128
- devices
1129
- })), /* @__PURE__ */ React24.createElement(Actions, null, /* @__PURE__ */ React24.createElement(Action, {
1130
- variant: "ghost",
1131
- disabled,
1132
- onClick: () => send?.({
1133
- type: "unchooseAction"
1134
- }),
1135
- "data-testid": "manage-devices-back"
1136
- }, t("back label"))));
1137
- };
1138
-
1139
1296
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1140
- import { CaretRight, Devices, Plus, Power, UserGear, HardDrive, Intersect } from "@phosphor-icons/react";
1141
1297
  import React25, { useCallback as useCallback4 } from "react";
1142
1298
  import { log as log2 } from "@dxos/log";
1143
1299
  import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
1144
1300
  import { useHaloInvitations } from "@dxos/react-client/halo";
1145
1301
  import { Invitation as Invitation2, InvitationEncoder } from "@dxos/react-client/invitations";
1146
- import { DensityProvider, useTranslation as useTranslation11 } from "@dxos/react-ui";
1147
- import { getSize as getSize8 } from "@dxos/react-ui-theme";
1148
1302
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx";
1149
1303
  var IdentityActionChooser = (props) => {
1150
1304
  const { send } = props;
@@ -1159,19 +1313,15 @@ var IdentityActionChooser = (props) => {
1159
1313
  authCode: invitation.authCode
1160
1314
  }), void 0, {
1161
1315
  F: __dxlog_file2,
1162
- L: 28,
1316
+ L: 25,
1163
1317
  S: void 0,
1164
1318
  C: (f, a) => f(...a)
1165
1319
  });
1166
1320
  }
1167
1321
  }, []);
1168
- const createInvitation = (e) => {
1169
- const testing = e.altKey && e.shiftKey;
1322
+ const createInvitation = () => {
1170
1323
  invitations.forEach((invitation2) => invitation2.cancel());
1171
- const invitation = client.halo.share(testing ? {
1172
- type: Invitation2.Type.MULTIUSE,
1173
- authMethod: Invitation2.AuthMethod.NONE
1174
- } : void 0);
1324
+ const invitation = client.halo.share();
1175
1325
  if (true) {
1176
1326
  invitation.subscribe(onInvitationEvent);
1177
1327
  }
@@ -1182,216 +1332,45 @@ var IdentityActionChooser = (props) => {
1182
1332
  };
1183
1333
  return /* @__PURE__ */ React25.createElement(IdentityActionChooserImpl, {
1184
1334
  ...props,
1185
- onCreateInvitationClick: (e) => createInvitation(e),
1335
+ onCreateInvitationClick: createInvitation,
1186
1336
  agentHostingEnabled: !!agentHostingProviderClient
1187
1337
  });
1188
1338
  };
1189
- var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone, doneActionParent, agentHostingEnabled }) => {
1190
- const { t } = useTranslation11("os");
1191
- return /* @__PURE__ */ React25.createElement("div", {
1192
- role: "none",
1193
- className: "grow flex flex-col gap-1"
1194
- }, /* @__PURE__ */ React25.createElement(DensityProvider, {
1195
- density: "coarse"
1196
- }, /* @__PURE__ */ React25.createElement("div", {
1197
- className: "grow justify-center flex flex-col gap-1"
1198
- }, /* @__PURE__ */ React25.createElement(Action, {
1199
- "data-testid": "manage-profile",
1200
- onClick: () => send?.({
1201
- type: "chooseProfile"
1202
- }),
1203
- classNames: "plb-4"
1204
- }, /* @__PURE__ */ React25.createElement(UserGear, {
1205
- className: getSize8(6)
1206
- }), /* @__PURE__ */ React25.createElement("span", {
1207
- className: "grow mli-3"
1208
- }, t("choose profile label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1209
- weight: "bold",
1210
- className: getSize8(4)
1211
- })), agentHostingEnabled && /* @__PURE__ */ React25.createElement(Action, {
1212
- "data-testid": "manage-agent",
1213
- onClick: () => send?.({
1214
- type: "chooseAgent"
1215
- }),
1216
- classNames: "plb-4"
1217
- }, /* @__PURE__ */ React25.createElement(HardDrive, {
1218
- className: getSize8(6)
1219
- }), /* @__PURE__ */ React25.createElement("span", {
1220
- className: "grow mli-3"
1221
- }, "Manage Agent"), /* @__PURE__ */ React25.createElement(CaretRight, {
1222
- weight: "bold",
1223
- className: getSize8(4)
1224
- })), /* @__PURE__ */ React25.createElement(Action, {
1225
- disabled: !active,
1226
- "data-testid": "devices-panel.create-invitation",
1227
- onClick: onCreateInvitationClick,
1228
- classNames: "plb-4"
1229
- }, /* @__PURE__ */ React25.createElement(Plus, {
1230
- className: getSize8(6)
1231
- }), /* @__PURE__ */ React25.createElement("span", {
1232
- className: "grow mli-3"
1233
- }, t("choose add device label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1234
- weight: "bold",
1235
- className: getSize8(4)
1236
- })), /* @__PURE__ */ React25.createElement(Action, {
1237
- "data-testid": "devices-panel.join-new-identity",
1238
- onClick: () => send?.({
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?.({
1239
1344
  type: "chooseJoinNewIdentity"
1240
1345
  }),
1241
- classNames: "plb-4"
1242
- }, /* @__PURE__ */ React25.createElement(Intersect, {
1243
- className: getSize8(6)
1244
- }), /* @__PURE__ */ React25.createElement("span", {
1245
- className: "grow mli-3"
1246
- }, t("choose join new identity label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1247
- weight: "bold",
1248
- className: getSize8(4)
1249
- })), /* @__PURE__ */ React25.createElement(Action, {
1250
- "data-testid": "manage-devices",
1251
- onClick: () => send?.({
1252
- type: "chooseDevices"
1253
- }),
1254
- classNames: "plb-4"
1255
- }, /* @__PURE__ */ React25.createElement(Devices, {
1256
- className: getSize8(6)
1257
- }), /* @__PURE__ */ React25.createElement("span", {
1258
- className: "grow mli-3"
1259
- }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1260
- weight: "bold",
1261
- className: getSize8(4)
1262
- })), /* @__PURE__ */ React25.createElement(Action, {
1263
- "data-testid": "devices-panel.sign-out",
1264
- onClick: () => send?.({
1346
+ onClickReset: () => send?.({
1265
1347
  type: "chooseResetStorage"
1266
- }),
1267
- classNames: "plb-4"
1268
- }, /* @__PURE__ */ React25.createElement(Power, {
1269
- className: getSize8(6)
1270
- }), /* @__PURE__ */ React25.createElement("span", {
1271
- className: "grow mli-3"
1272
- }, t("choose sign out label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1273
- weight: "bold",
1274
- className: getSize8(4)
1275
- })))));
1348
+ })
1349
+ }), agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, {
1350
+ agentActive,
1351
+ agentStatus,
1352
+ onAgentDestroy,
1353
+ onAgentCreate
1354
+ }));
1276
1355
  };
1277
1356
 
1278
1357
  // packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
1279
- import React26, { useState as useState4 } from "react";
1358
+ import React26, { useState as useState5 } from "react";
1280
1359
  import { log as log3 } from "@dxos/log";
1281
- import { useTranslation as useTranslation12 } from "@dxos/react-ui";
1360
+ import { useTranslation as useTranslation11 } from "@dxos/react-ui";
1282
1361
  import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
1283
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx";
1284
- var ProfileForm = (props) => {
1285
- const { onUpdateProfile } = props;
1286
- const { t } = useTranslation12("os");
1287
- const [validationMessage, setValidationMessage] = useState4("");
1288
- const handleUpdateProfile = async (profile) => {
1289
- await onUpdateProfile?.(profile).catch((error) => {
1290
- log3.catch(error, void 0, {
1291
- F: __dxlog_file3,
1292
- L: 33,
1293
- S: void 0,
1294
- C: (f, a) => f(...a)
1295
- });
1296
- setValidationMessage(t("failed to update profile message"));
1297
- });
1298
- };
1299
- return /* @__PURE__ */ React26.createElement(ProfileFormImpl, {
1300
- ...props,
1301
- onUpdateProfile: handleUpdateProfile,
1302
- validationMessage
1303
- });
1304
- };
1305
- var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue(identity?.identityKey.toHex() ?? "0");
1306
- var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji2(identity?.identityKey.toHex() ?? "0");
1307
- var ProfileFormImpl = (props) => {
1308
- const { active, identity, send, onUpdateProfile, validationMessage } = props;
1309
- const profile = identity?.profile;
1310
- const disabled = !active;
1311
- const { t } = useTranslation12("os");
1312
- const [displayName, setDisplayName] = useState4(profile?.displayName ?? "");
1313
- const [hue, setHue] = useState4(getHueValue(identity));
1314
- const [emoji, setEmoji] = useState4(getEmojiValue(identity));
1315
- const { textValue, setTextValue } = useClipboardContext();
1316
- const identityHex = identity?.identityKey.toHex();
1317
- const copied = textValue === identityHex;
1318
- return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement("div", {
1319
- role: "none",
1320
- className: "grow flex flex-col justify-center"
1321
- }, /* @__PURE__ */ React26.createElement(Input, {
1322
- validationMessage,
1323
- label: /* @__PURE__ */ React26.createElement(StepHeading, {
1324
- className: "m-0"
1325
- }, t("display name input label")),
1326
- disabled,
1327
- "data-testid": "display-name-input",
1328
- placeholder: t("display name input placeholder"),
1329
- value: displayName,
1330
- onChange: ({ target: { value } }) => setDisplayName(value)
1331
- }), /* @__PURE__ */ React26.createElement(StepHeading, {
1332
- className: "mbe-2"
1333
- }, t("emoji and color label")), /* @__PURE__ */ React26.createElement("div", {
1334
- role: "none",
1335
- className: "grid grid-cols-[1fr_min-content] gap-y-2"
1336
- }, /* @__PURE__ */ React26.createElement(EmojiPicker, {
1337
- emoji,
1338
- onChangeEmoji: setEmoji,
1339
- disabled,
1340
- onClickClear: () => setEmoji(getEmojiValue(identity))
1341
- }), /* @__PURE__ */ React26.createElement(HuePicker, {
1342
- hue,
1343
- onChangeHue: setHue,
1344
- disabled,
1345
- onClickClear: () => setHue(getHueValue(identity))
1346
- }))), /* @__PURE__ */ React26.createElement(Actions, null, /* @__PURE__ */ React26.createElement(Action, {
1347
- variant: "ghost",
1348
- disabled,
1349
- onClick: () => {
1350
- if (identityHex) {
1351
- void setTextValue(identityHex);
1352
- }
1353
- },
1354
- "data-testid": "update-profile-form-copy-key"
1355
- }, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React26.createElement(Action, {
1356
- variant: "ghost",
1357
- disabled,
1358
- onClick: () => send?.({
1359
- type: "unchooseAction"
1360
- }),
1361
- "data-testid": "update-profile-form-back"
1362
- }, t("back label")), /* @__PURE__ */ React26.createElement(Action, {
1363
- variant: "primary",
1364
- disabled,
1365
- onClick: () => onUpdateProfile?.({
1366
- ...displayName && {
1367
- displayName
1368
- },
1369
- ...(emoji || hue) && {
1370
- data: {
1371
- ...emoji && {
1372
- emoji
1373
- },
1374
- ...hue && {
1375
- hue
1376
- }
1377
- }
1378
- }
1379
- }),
1380
- "data-testid": "update-profile-form-continue"
1381
- }, t("done label"))));
1382
- };
1383
1362
 
1384
1363
  // packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
1385
- 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";
1386
1365
  import { invariant } from "@dxos/invariant";
1387
1366
  import { log as log4 } from "@dxos/log";
1388
1367
  import { useAgentHostingProviderClient as useAgentHostingProviderClient2 } from "@dxos/react-client";
1389
1368
  import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
1390
- 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";
1391
1370
  var useAgentHandlers = ({ client, invitations, identity }) => {
1392
- const [validationMessage, setValidationMessage] = useState5("");
1393
- const [agentStatus, setAgentStatus] = useState5("");
1394
- const [agentActive, setAgentActive] = useState5(false);
1371
+ const [validationMessage, setValidationMessage] = useState6("");
1372
+ const [agentStatus, setAgentStatus] = useState6("");
1373
+ const [agentActive, setAgentActive] = useState6(false);
1395
1374
  const agentHostingProviderClient = useAgentHostingProviderClient2(client.config);
1396
1375
  useEffect2(() => {
1397
1376
  const fetchAgentStatus = async () => {
@@ -1417,13 +1396,13 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1417
1396
  invitationCode,
1418
1397
  authCode: invitation.authCode
1419
1398
  }), void 0, {
1420
- F: __dxlog_file4,
1399
+ F: __dxlog_file3,
1421
1400
  L: 50,
1422
1401
  S: void 0,
1423
1402
  C: (f, a) => f(...a)
1424
1403
  });
1425
1404
  invariant(identity, "Identity not found", {
1426
- F: __dxlog_file4,
1405
+ F: __dxlog_file3,
1427
1406
  L: 51,
1428
1407
  S: void 0,
1429
1408
  A: [
@@ -1446,16 +1425,17 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1446
1425
  const onAgentCreate = async () => {
1447
1426
  invitations.forEach((invitation2) => invitation2.cancel());
1448
1427
  const invitation = client.halo.share({
1449
- type: Invitation3.Type.MULTIUSE,
1450
- authMethod: Invitation3.AuthMethod.NONE
1428
+ type: Invitation3.Type.INTERACTIVE,
1429
+ authMethod: Invitation3.AuthMethod.NONE,
1430
+ multiUse: true
1451
1431
  });
1452
1432
  invitation.subscribe(handleAgentCreate);
1453
1433
  };
1454
1434
  const onAgentDestroy = async () => {
1455
1435
  const identity2 = client.halo.identity.get();
1456
1436
  invariant(identity2, "Identity not found", {
1457
- F: __dxlog_file4,
1458
- L: 77,
1437
+ F: __dxlog_file3,
1438
+ L: 81,
1459
1439
  S: void 0,
1460
1440
  A: [
1461
1441
  "identity",
@@ -1484,9 +1464,8 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1484
1464
  import { Check as Check4, X as X3 } from "@phosphor-icons/react";
1485
1465
  import React27, { useMemo as useMemo2 } from "react";
1486
1466
  import { QR } from "react-qr-rounded";
1487
- import { Invitation as Invitation5 } from "@dxos/react-client/invitations";
1488
- import { useId as useId4, useTranslation as useTranslation13 } from "@dxos/react-ui";
1489
- import { descriptionText as descriptionText7, getSize as getSize9, mx as mx18 } 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";
1490
1469
  import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
1491
1470
 
1492
1471
  // packages/sdk/shell/src/util/invitationStatusValue.ts
@@ -1537,10 +1516,10 @@ var InvitationManagerView = ({ children, ...props }) => {
1537
1516
  classNames: "grow flex flex-col justify-around items-center"
1538
1517
  }, children);
1539
1518
  };
1540
- var InvitationManager = ({ invitationUrl, active, send, status, type, authCode, id = "0" }) => {
1541
- const { t } = useTranslation13("os");
1542
- const qrLabel = useId4("invitation-manager__qr-code");
1543
- 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;
1544
1523
  const showAuthCode = statusValue === 3;
1545
1524
  const emoji = hexToEmoji3(id);
1546
1525
  const activeView = useMemo2(() => {
@@ -1564,14 +1543,14 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1564
1543
  emoji
1565
1544
  }, /* @__PURE__ */ React27.createElement("p", {
1566
1545
  className: "text-sm mlb-1 font-normal text-center"
1567
- }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1546
+ }, t(multiUse ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1568
1547
  role: "none",
1569
- className: mx18(descriptionText7, "is-full max-is-[14rem] relative")
1548
+ className: mx20(descriptionText8, "is-full max-is-[14rem] relative")
1570
1549
  }, /* @__PURE__ */ React27.createElement(QR, {
1571
1550
  rounding: 100,
1572
1551
  backgroundColor: "transparent",
1573
1552
  color: "currentColor",
1574
- className: mx18("is-full bs-full p-2", showAuthCode && "invisible"),
1553
+ className: mx20("is-full bs-full p-2", showAuthCode && "invisible"),
1575
1554
  "aria-labelledby": qrLabel,
1576
1555
  errorCorrectionLevel: "Q",
1577
1556
  cutout: true
@@ -1594,9 +1573,9 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1594
1573
  })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1595
1574
  id: "showing final"
1596
1575
  }, statusValue > 0 ? /* @__PURE__ */ React27.createElement(Check4, {
1597
- className: mx18("m-1.5", getSize9(6))
1576
+ className: mx20("m-1.5", getSize11(6))
1598
1577
  }) : /* @__PURE__ */ React27.createElement(X3, {
1599
- className: mx18("m-1.5", getSize9(6))
1578
+ className: mx20("m-1.5", getSize11(6))
1600
1579
  })))), /* @__PURE__ */ React27.createElement(Actions, {
1601
1580
  classNames: "mbs-4"
1602
1581
  }, /* @__PURE__ */ React27.createElement(Action, {
@@ -1609,20 +1588,20 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1609
1588
 
1610
1589
  // packages/sdk/shell/src/steps/ConfirmReset.tsx
1611
1590
  import { Warning } from "@phosphor-icons/react";
1612
- import React28, { useState as useState6 } from "react";
1591
+ import React28, { useState as useState7 } from "react";
1613
1592
  import { log as log5 } from "@dxos/log";
1614
- import { Message, useTranslation as useTranslation14 } from "@dxos/react-ui";
1615
- import { getSize as getSize10, mx as mx19 } from "@dxos/react-ui-theme";
1616
- var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
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";
1617
1596
  var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1618
- const { t } = useTranslation14("os");
1619
- const [validationMessage, setValidationMessage] = useState6("");
1620
- const [pending, setPending] = useState6(false);
1597
+ const { t } = useTranslation13("os");
1598
+ const [validationMessage, setValidationMessage] = useState7("");
1599
+ const [pending, setPending] = useState7(false);
1621
1600
  const processReset = async () => {
1622
1601
  setPending(true);
1623
1602
  return onConfirm?.().then(() => setPending(false), (error) => {
1624
1603
  log5.catch(error, void 0, {
1625
- F: __dxlog_file5,
1604
+ F: __dxlog_file4,
1626
1605
  L: 38,
1627
1606
  S: void 0,
1628
1607
  C: (f, a) => f(...a)
@@ -1641,9 +1620,9 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1641
1620
  });
1642
1621
  };
1643
1622
  var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCancel, mode }) => {
1644
- const { t } = useTranslation14("os");
1623
+ const { t } = useTranslation13("os");
1645
1624
  const confirmationValue = t("confirmation value");
1646
- const [inputValue, setInputValue] = useState6("");
1625
+ const [inputValue, setInputValue] = useState7("");
1647
1626
  const testIdAffix = mode === "join new identity" ? "join-new-identity" : "reset-storage";
1648
1627
  return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("div", {
1649
1628
  role: "none",
@@ -1651,7 +1630,7 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
1651
1630
  }, /* @__PURE__ */ React28.createElement(Message.Root, {
1652
1631
  valence: "error"
1653
1632
  }, /* @__PURE__ */ React28.createElement(Message.Title, null, /* @__PURE__ */ React28.createElement(Warning, {
1654
- className: mx19(getSize10(6), "inline mie-2")
1633
+ className: mx21(getSize12(6), "inline mie-2")
1655
1634
  }), t("sign out chooser title")), /* @__PURE__ */ React28.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React28.createElement(Input, {
1656
1635
  validationMessage,
1657
1636
  label: /* @__PURE__ */ React28.createElement(StepHeading, {
@@ -1676,37 +1655,120 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
1676
1655
  };
1677
1656
 
1678
1657
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
1679
- var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1658
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1680
1659
  var viewStyles = "pbs-1 pbe-3 pli-3";
1681
- var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1682
- const fallbackValue = keyToFallback2(identity.identityKey);
1660
+ var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
1661
+ var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
1662
+ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
1663
+ const fallbackValue = keyToFallback3(identity.identityKey);
1664
+ const { t } = useTranslation14("os");
1665
+ const [displayName, setDisplayName] = useState8(identity.profile?.displayName ?? "");
1666
+ const [emoji, setEmojiDirectly] = useState8(getEmojiValue(identity));
1667
+ const [hue, setHueDirectly] = useState8(getHueValue(identity));
1668
+ const { textValue, setTextValue } = useClipboardContext();
1669
+ const identityHex = identity.identityKey.toHex();
1670
+ const copied = textValue === identityHex;
1671
+ const handleUpdateProfile = async () => {
1672
+ const nextProfile = {
1673
+ ...displayName && {
1674
+ displayName
1675
+ },
1676
+ ...(emoji || hue) && {
1677
+ data: {
1678
+ ...emoji && {
1679
+ emoji
1680
+ },
1681
+ ...hue && {
1682
+ hue
1683
+ }
1684
+ }
1685
+ }
1686
+ };
1687
+ return onUpdateProfile?.(nextProfile);
1688
+ };
1689
+ const setEmoji = (nextEmoji) => {
1690
+ setEmojiDirectly(nextEmoji);
1691
+ void handleUpdateProfile();
1692
+ };
1693
+ const setHue = (nextHue) => {
1694
+ setHueDirectly(nextHue);
1695
+ void handleUpdateProfile();
1696
+ };
1697
+ const isConnected = connectionState === ConnectionState.ONLINE;
1683
1698
  return /* @__PURE__ */ React29.createElement(Heading, {
1684
1699
  titleId,
1685
1700
  title,
1686
1701
  corner: /* @__PURE__ */ React29.createElement(CloseButton, {
1687
1702
  onDone
1688
1703
  })
1689
- }, /* @__PURE__ */ React29.createElement(Avatar4.Root, {
1690
- size: 12,
1704
+ }, /* @__PURE__ */ React29.createElement(Avatar6.Root, {
1705
+ size: 16,
1691
1706
  variant: "circle",
1692
- status: "active",
1693
- hue: identity.profile?.data?.hue || fallbackValue.hue
1694
- }, /* @__PURE__ */ React29.createElement(Avatar4.Frame, {
1695
- classNames: "block mbs-4 mbe-2 mli-auto chromatic-ignore"
1696
- }, /* @__PURE__ */ React29.createElement(Avatar4.Fallback, {
1697
- text: identity.profile?.data?.emoji || fallbackValue.emoji
1698
- })), /* @__PURE__ */ React29.createElement(Avatar4.Label, {
1699
- classNames: "block text-center font-light text-xl",
1707
+ status: isConnected ? "active" : "error",
1708
+ hue: hue || fallbackValue.hue
1709
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Root, {
1710
+ classNames: "grid grid-cols-[1fr_var(--rail-action)_min-content_var(--rail-action)_1fr] items-center gap-2"
1711
+ }, /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1712
+ asChild: true
1713
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1714
+ classNames: "bs-[--rail-action] is-[--rail-action] justify-self-end",
1715
+ onClick: () => onChangeConnectionState?.(isConnected ? ConnectionState.OFFLINE : ConnectionState.ONLINE)
1716
+ }, /* @__PURE__ */ React29.createElement("span", {
1717
+ className: "sr-only"
1718
+ }, t(isConnected ? "disconnect label" : "connect label")), isConnected ? /* @__PURE__ */ React29.createElement(PlugsConnected, {
1719
+ className: getSize13(5)
1720
+ }) : /* @__PURE__ */ React29.createElement(Plugs, {
1721
+ className: getSize13(5)
1722
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1723
+ side: "bottom",
1724
+ classNames: "z-50"
1725
+ }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), /* @__PURE__ */ React29.createElement(EmojiPickerToolbarButton, {
1726
+ emoji,
1727
+ onChangeEmoji: setEmoji,
1728
+ classNames: "bs-[--rail-action]"
1729
+ }), /* @__PURE__ */ React29.createElement(Avatar6.Frame, {
1730
+ classNames: "relative z-[2] -mli-4 chromatic-ignore"
1731
+ }, /* @__PURE__ */ React29.createElement(Avatar6.Fallback, {
1732
+ text: emoji || fallbackValue.emoji
1733
+ })), /* @__PURE__ */ React29.createElement(HuePickerToolbarButton, {
1734
+ hue,
1735
+ onChangeHue: setHue,
1736
+ classNames: "bs-[--rail-action]"
1737
+ }), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1738
+ asChild: true
1739
+ }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1740
+ classNames: "bs-[--rail-action] justify-self-start",
1741
+ "data-testid": "update-profile-form-copy-key",
1742
+ onClick: () => setTextValue(identityHex)
1743
+ }, /* @__PURE__ */ React29.createElement("span", {
1744
+ className: "sr-only"
1745
+ }, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React29.createElement(CopySimple, {
1746
+ className: getSize13(5)
1747
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1748
+ side: "bottom",
1749
+ classNames: "z-50"
1750
+ }, t(copied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null))))), /* @__PURE__ */ React29.createElement(Avatar6.Label, {
1751
+ classNames: "sr-only",
1700
1752
  "data-testid": "identityHeading.displayName"
1701
- }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex()))));
1753
+ }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex())), /* @__PURE__ */ React29.createElement(Input2.Root, null, /* @__PURE__ */ React29.createElement(Input2.Label, {
1754
+ srOnly: true
1755
+ }, t("display name input label")), /* @__PURE__ */ React29.createElement(Input2.TextInput, {
1756
+ variant: "subdued",
1757
+ "data-testid": "display-name-input",
1758
+ placeholder: t("display name input placeholder"),
1759
+ classNames: "mbs-2 text-center font-light text-xl",
1760
+ value: displayName,
1761
+ onChange: ({ target: { value } }) => {
1762
+ setDisplayName(value);
1763
+ },
1764
+ onBlur: handleUpdateProfile
1765
+ }))));
1702
1766
  };
1703
1767
  var IdentityPanelImpl = (props) => {
1704
- const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1705
- const { t } = useTranslation15("os");
1768
+ const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
1769
+ const { t } = useTranslation14("os");
1706
1770
  const title = useMemo3(() => {
1707
1771
  switch (activeView) {
1708
- case "agent manager":
1709
- return "Manage Agent";
1710
1772
  case "device invitation manager":
1711
1773
  return t("choose add device label");
1712
1774
  default:
@@ -1717,13 +1779,16 @@ var IdentityPanelImpl = (props) => {
1717
1779
  t
1718
1780
  ]);
1719
1781
  const onCancelReset = () => rest.send?.("unchooseAction");
1720
- return /* @__PURE__ */ React29.createElement(DensityProvider2, {
1782
+ return /* @__PURE__ */ React29.createElement(DensityProvider, {
1721
1783
  density: "fine"
1722
1784
  }, /* @__PURE__ */ React29.createElement(IdentityHeading, {
1723
1785
  identity,
1724
1786
  titleId,
1725
1787
  title,
1726
- onDone
1788
+ onDone,
1789
+ onUpdateProfile,
1790
+ connectionState,
1791
+ onChangeConnectionState
1727
1792
  }), /* @__PURE__ */ React29.createElement(Viewport.Root, {
1728
1793
  activeView
1729
1794
  }, /* @__PURE__ */ React29.createElement(Viewport.Views, null, /* @__PURE__ */ React29.createElement(Viewport.View, {
@@ -1739,27 +1804,6 @@ var IdentityPanelImpl = (props) => {
1739
1804
  active: activeView === "device invitation manager",
1740
1805
  ...rest,
1741
1806
  invitationUrl: rest.createInvitationUrl(rest.invitationCode)
1742
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1743
- id: "device manager",
1744
- classNames: viewStyles
1745
- }, /* @__PURE__ */ React29.createElement(DeviceManager, {
1746
- active: activeView === "device manager",
1747
- ...rest
1748
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1749
- classNames: viewStyles,
1750
- id: "update profile form"
1751
- }, /* @__PURE__ */ React29.createElement(ProfileForm, {
1752
- send: rest.send,
1753
- active: activeView === "update profile form",
1754
- identity,
1755
- onUpdateProfile
1756
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1757
- classNames: viewStyles,
1758
- id: "agent manager"
1759
- }, /* @__PURE__ */ React29.createElement(AgentForm, {
1760
- send: rest.send,
1761
- active: activeView === "agent manager",
1762
- ...rest
1763
1807
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1764
1808
  classNames: viewStyles,
1765
1809
  id: "confirm join new identity"
@@ -1788,7 +1832,7 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1788
1832
  });
1789
1833
  };
1790
1834
  var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1791
- const titleId = useId5("identityPanel__heading", propsTitleId);
1835
+ const titleId = useId6("identityPanel__heading", propsTitleId);
1792
1836
  const client = useClient3();
1793
1837
  const devices = useDevices();
1794
1838
  const identity = useIdentity();
@@ -1800,8 +1844,8 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1800
1844
  });
1801
1845
  if (!identity) {
1802
1846
  log6.error("IdentityPanel rendered with no active identity.", void 0, {
1803
- F: __dxlog_file6,
1804
- L: 145,
1847
+ F: __dxlog_file5,
1848
+ L: 240,
1805
1849
  S: void 0,
1806
1850
  C: (f, a) => f(...a)
1807
1851
  });
@@ -1812,11 +1856,13 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1812
1856
  initialDisposition
1813
1857
  }
1814
1858
  });
1859
+ const { swarm: connectionState } = useNetworkStatus();
1860
+ const handleChangeConnectionState = async (nextState) => client?.mesh.updateConfig(nextState);
1815
1861
  useEffect3(() => {
1816
1862
  const subscription = identityService.subscribe((state) => {
1817
1863
  log6("[state]", state, {
1818
- F: __dxlog_file6,
1819
- L: 154,
1864
+ F: __dxlog_file5,
1865
+ L: 253,
1820
1866
  S: void 0,
1821
1867
  C: (f, a) => f(...a)
1822
1868
  });
@@ -1831,30 +1877,10 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1831
1877
  return "identity action chooser";
1832
1878
  case identityState.matches("managingDeviceInvitation"):
1833
1879
  return "device invitation manager";
1834
- case identityState.matches("managingDevices"):
1835
- return "device manager";
1836
- case [
1837
- {
1838
- managingProfile: "idle"
1839
- },
1840
- {
1841
- managingProfile: "pending"
1842
- }
1843
- ].some(identityState.matches):
1844
- return "update profile form";
1845
1880
  case identityState.matches("confirmingResetStorage"):
1846
1881
  return "confirm reset storage";
1847
1882
  case identityState.matches("confirmingJoinNewIdentity"):
1848
1883
  return "confirm join new identity";
1849
- case [
1850
- {
1851
- managingAgent: "idle"
1852
- },
1853
- {
1854
- managingAgent: "pending"
1855
- }
1856
- ].some(identityState.matches):
1857
- return "agent manager";
1858
1884
  default:
1859
1885
  return "identity action chooser";
1860
1886
  }
@@ -1876,6 +1902,8 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1876
1902
  titleId,
1877
1903
  createInvitationUrl,
1878
1904
  onUpdateProfile,
1905
+ connectionState,
1906
+ onChangeConnectionState: handleChangeConnectionState,
1879
1907
  ...agentProps
1880
1908
  };
1881
1909
  return identityState.context.invitation ? /* @__PURE__ */ React29.createElement(IdentityPanelWithInvitationImpl, {
@@ -1889,25 +1917,25 @@ import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo
1889
1917
  import { log as log10 } from "@dxos/log";
1890
1918
  import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1891
1919
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1892
- import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1920
+ import { DensityProvider as DensityProvider2, useId as useId8, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1893
1921
 
1894
1922
  // packages/sdk/shell/src/panels/JoinPanel/JoinHeading.tsx
1895
1923
  import { X as X4 } from "@phosphor-icons/react";
1896
- import React30, { cloneElement, forwardRef as forwardRef8 } from "react";
1897
- import { Button as Button7, useTranslation as useTranslation16 } from "@dxos/react-ui";
1898
- import { descriptionText as descriptionText8, getSize as getSize11, mx as mx20 } from "@dxos/react-ui-theme";
1899
- var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActionParent }, forwardedRef) => {
1900
- const { t } = useTranslation16("os");
1901
- const exitButton = /* @__PURE__ */ React30.createElement(Button7, {
1924
+ import React30, { cloneElement, forwardRef as forwardRef9 } from "react";
1925
+ import { Button as Button10, useTranslation as useTranslation15 } from "@dxos/react-ui";
1926
+ import { descriptionText as descriptionText9, getSize as getSize14, mx as mx22 } from "@dxos/react-ui-theme";
1927
+ var JoinHeading = /* @__PURE__ */ forwardRef9(({ mode, titleId, onExit, exitActionParent }, forwardedRef) => {
1928
+ const { t } = useTranslation15("os");
1929
+ const exitButton = /* @__PURE__ */ React30.createElement(Button10, {
1902
1930
  variant: "ghost",
1903
1931
  ...onExit && {
1904
1932
  onClick: onExit
1905
1933
  },
1906
- classNames: mx20(descriptionText8, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1934
+ classNames: mx22(descriptionText9, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1907
1935
  "data-testid": "join-exit"
1908
1936
  }, /* @__PURE__ */ React30.createElement(X4, {
1909
1937
  weight: "bold",
1910
- className: getSize11(4)
1938
+ className: getSize14(4)
1911
1939
  }), /* @__PURE__ */ React30.createElement("span", {
1912
1940
  className: "sr-only"
1913
1941
  }, t("exit label")));
@@ -1930,11 +1958,11 @@ import { useCallback as useCallback6 } from "react";
1930
1958
  import { assign as assign2, createMachine as createMachine2 } from "xstate";
1931
1959
  import { log as log7 } from "@dxos/log";
1932
1960
  import { AlreadyJoinedError } from "@dxos/react-client";
1933
- import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1934
- var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1961
+ import { Invitation as Invitation5, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1962
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1935
1963
  var getInvitationSubscribable = (Kind, invitation) => {
1936
1964
  log7("[subscribing to invitation]", invitation, {
1937
- F: __dxlog_file7,
1965
+ F: __dxlog_file6,
1938
1966
  L: 90,
1939
1967
  S: void 0,
1940
1968
  C: (f, a) => f(...a)
@@ -1942,12 +1970,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1942
1970
  return {
1943
1971
  subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
1944
1972
  switch (invitation2.state) {
1945
- case Invitation6.State.CONNECTING: {
1973
+ case Invitation5.State.CONNECTING: {
1946
1974
  log7("[invitation connecting]", {
1947
1975
  Kind,
1948
1976
  invitation: invitation2
1949
1977
  }, {
1950
- F: __dxlog_file7,
1978
+ F: __dxlog_file6,
1951
1979
  L: 101,
1952
1980
  S: void 0,
1953
1981
  C: (f, a) => f(...a)
@@ -1957,12 +1985,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1957
1985
  invitation: invitation2
1958
1986
  });
1959
1987
  }
1960
- case Invitation6.State.CONNECTED: {
1988
+ case Invitation5.State.CONNECTED: {
1961
1989
  log7("[invitation connected]", {
1962
1990
  Kind,
1963
1991
  invitation: invitation2
1964
1992
  }, {
1965
- F: __dxlog_file7,
1993
+ F: __dxlog_file6,
1966
1994
  L: 106,
1967
1995
  S: void 0,
1968
1996
  C: (f, a) => f(...a)
@@ -1972,12 +2000,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1972
2000
  invitation: invitation2
1973
2001
  });
1974
2002
  }
1975
- case Invitation6.State.READY_FOR_AUTHENTICATION: {
2003
+ case Invitation5.State.READY_FOR_AUTHENTICATION: {
1976
2004
  log7("[invitation ready for authentication]", {
1977
2005
  Kind,
1978
2006
  invitation: invitation2
1979
2007
  }, {
1980
- F: __dxlog_file7,
2008
+ F: __dxlog_file6,
1981
2009
  L: 111,
1982
2010
  S: void 0,
1983
2011
  C: (f, a) => f(...a)
@@ -1987,12 +2015,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1987
2015
  invitation: invitation2
1988
2016
  });
1989
2017
  }
1990
- case Invitation6.State.AUTHENTICATING: {
2018
+ case Invitation5.State.AUTHENTICATING: {
1991
2019
  log7("[invitation authenticating]", {
1992
2020
  Kind,
1993
2021
  invitation: invitation2
1994
2022
  }, {
1995
- F: __dxlog_file7,
2023
+ F: __dxlog_file6,
1996
2024
  L: 116,
1997
2025
  S: void 0,
1998
2026
  C: (f, a) => f(...a)
@@ -2002,12 +2030,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
2002
2030
  invitation: invitation2
2003
2031
  });
2004
2032
  }
2005
- case Invitation6.State.SUCCESS: {
2033
+ case Invitation5.State.SUCCESS: {
2006
2034
  log7("[invitation success]", {
2007
2035
  Kind,
2008
2036
  invitation: invitation2
2009
2037
  }, {
2010
- F: __dxlog_file7,
2038
+ F: __dxlog_file6,
2011
2039
  L: 121,
2012
2040
  S: void 0,
2013
2041
  C: (f, a) => f(...a)
@@ -2018,11 +2046,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
2018
2046
  });
2019
2047
  return complete?.();
2020
2048
  }
2021
- case Invitation6.State.CANCELLED: {
2049
+ case Invitation5.State.CANCELLED: {
2022
2050
  log7.warn("[invitation cancelled]", {
2023
2051
  Kind
2024
2052
  }, {
2025
- F: __dxlog_file7,
2053
+ F: __dxlog_file6,
2026
2054
  L: 127,
2027
2055
  S: void 0,
2028
2056
  C: (f, a) => f(...a)
@@ -2032,11 +2060,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
2032
2060
  reason: "cancelled"
2033
2061
  });
2034
2062
  }
2035
- case Invitation6.State.TIMEOUT: {
2063
+ case Invitation5.State.TIMEOUT: {
2036
2064
  log7.error("[invitation timeout]", {
2037
2065
  Kind
2038
2066
  }, {
2039
- F: __dxlog_file7,
2067
+ F: __dxlog_file6,
2040
2068
  L: 132,
2041
2069
  S: void 0,
2042
2070
  C: (f, a) => f(...a)
@@ -2053,7 +2081,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2053
2081
  Kind,
2054
2082
  error
2055
2083
  }, {
2056
- F: __dxlog_file7,
2084
+ F: __dxlog_file6,
2057
2085
  L: 139,
2058
2086
  S: void 0,
2059
2087
  C: (f, a) => f(...a)
@@ -2068,7 +2096,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2068
2096
  Kind,
2069
2097
  error
2070
2098
  }, {
2071
- F: __dxlog_file7,
2099
+ F: __dxlog_file6,
2072
2100
  L: 144,
2073
2101
  S: void 0,
2074
2102
  C: (f, a) => f(...a)
@@ -2131,7 +2159,7 @@ var acceptingInvitationTemplate = (Kind, successTarget) => {
2131
2159
  {
2132
2160
  cond: (context) => {
2133
2161
  const invitation = context[Kind.toLowerCase()].invitation;
2134
- return !invitation || invitation?.state === Invitation6.State.CONNECTING;
2162
+ return !invitation || invitation?.state === Invitation5.State.CONNECTING;
2135
2163
  },
2136
2164
  target: `connecting${Kind}Invitation`,
2137
2165
  actions: "log"
@@ -2400,7 +2428,7 @@ var joinMachine = createMachine2({
2400
2428
  haloInvitation: context.halo.invitation,
2401
2429
  spaceInvitation: context.space.invitation
2402
2430
  }, {
2403
- F: __dxlog_file7,
2431
+ F: __dxlog_file6,
2404
2432
  L: 416,
2405
2433
  S: void 0,
2406
2434
  C: (f, a) => f(...a)
@@ -2414,7 +2442,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
2414
2442
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2415
2443
  } catch (err) {
2416
2444
  log7.catch(err, void 0, {
2417
- F: __dxlog_file7,
2445
+ F: __dxlog_file6,
2418
2446
  L: 443,
2419
2447
  S: void 0,
2420
2448
  C: (f, a) => f(...a)
@@ -2435,7 +2463,7 @@ var useJoinMachine = (client, options) => {
2435
2463
  };
2436
2464
  } catch (err) {
2437
2465
  log7.error("Could not redeem device invitation code", err, {
2438
- F: __dxlog_file7,
2466
+ F: __dxlog_file6,
2439
2467
  L: 464,
2440
2468
  S: void 0,
2441
2469
  C: (f, a) => f(...a)
@@ -2460,7 +2488,7 @@ var useJoinMachine = (client, options) => {
2460
2488
  };
2461
2489
  } catch (err) {
2462
2490
  log7.error("Could not redeem space invitation code", err, {
2463
- F: __dxlog_file7,
2491
+ F: __dxlog_file6,
2464
2492
  L: 486,
2465
2493
  S: void 0,
2466
2494
  C: (f, a) => f(...a)
@@ -2520,18 +2548,18 @@ var useJoinMachine = (client, options) => {
2520
2548
  };
2521
2549
 
2522
2550
  // packages/sdk/shell/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx
2523
- import { CaretRight as CaretRight2, Plus as Plus2, QrCode, Textbox } from "@phosphor-icons/react";
2551
+ import { CaretRight as CaretRight2, Plus as Plus3, QrCode, Textbox } from "@phosphor-icons/react";
2524
2552
  import React31 from "react";
2525
- import { useTranslation as useTranslation17 } from "@dxos/react-ui";
2526
- import { getSize as getSize12 } from "@dxos/react-ui-theme";
2553
+ import { useTranslation as useTranslation16 } from "@dxos/react-ui";
2554
+ import { getSize as getSize15 } from "@dxos/react-ui-theme";
2527
2555
  var AdditionMethodChooser = (viewStateProps) => {
2528
2556
  const disabled = !viewStateProps.active;
2529
2557
  const { send } = viewStateProps;
2530
- const { t } = useTranslation17("os");
2558
+ const { t } = useTranslation16("os");
2531
2559
  const sharedButtonProps = {
2532
2560
  disabled,
2533
2561
  after: /* @__PURE__ */ React31.createElement(CaretRight2, {
2534
- className: getSize12(4),
2562
+ className: getSize15(4),
2535
2563
  weight: "bold"
2536
2564
  }),
2537
2565
  slots: {
@@ -2546,8 +2574,8 @@ var AdditionMethodChooser = (viewStateProps) => {
2546
2574
  }, /* @__PURE__ */ React31.createElement(CompoundButton, {
2547
2575
  ...sharedButtonProps,
2548
2576
  description: t("create identity description"),
2549
- before: /* @__PURE__ */ React31.createElement(Plus2, {
2550
- className: getSize12(6)
2577
+ before: /* @__PURE__ */ React31.createElement(Plus3, {
2578
+ className: getSize15(6)
2551
2579
  }),
2552
2580
  onClick: () => send({
2553
2581
  type: "createIdentity"
@@ -2558,7 +2586,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2558
2586
  ...sharedButtonProps,
2559
2587
  description: t("join identity description"),
2560
2588
  before: /* @__PURE__ */ React31.createElement(QrCode, {
2561
- className: getSize12(6)
2589
+ className: getSize15(6)
2562
2590
  }),
2563
2591
  onClick: () => send({
2564
2592
  type: "acceptHaloInvitation"
@@ -2570,7 +2598,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2570
2598
  disabled: true,
2571
2599
  description: t("recover identity description"),
2572
2600
  before: /* @__PURE__ */ React31.createElement(Textbox, {
2573
- className: getSize12(6)
2601
+ className: getSize15(6)
2574
2602
  }),
2575
2603
  onClick: () => send({
2576
2604
  type: "recoverIdentity"
@@ -2582,16 +2610,16 @@ var AdditionMethodChooser = (viewStateProps) => {
2582
2610
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityAdded.tsx
2583
2611
  import React32, { cloneElement as cloneElement2 } from "react";
2584
2612
  import { generateName as generateName4 } from "@dxos/display-name";
2585
- import { Avatar as Avatar5, useId as useId6, useTranslation as useTranslation18 } from "@dxos/react-ui";
2586
- import { mx as mx21 } from "@dxos/react-ui-theme";
2613
+ import { Avatar as Avatar7, useId as useId7, useTranslation as useTranslation17 } from "@dxos/react-ui";
2614
+ import { mx as mx23 } from "@dxos/react-ui-theme";
2587
2615
  import { hexToFallback } from "@dxos/util";
2588
2616
  var IdentityAdded = (props) => {
2589
2617
  const { mode, addedIdentity, active, send, onDone, doneActionParent } = props;
2590
2618
  const disabled = !active;
2591
- const { t } = useTranslation18("os");
2619
+ const { t } = useTranslation17("os");
2592
2620
  const addedIdentityHex = addedIdentity?.identityKey.toHex() ?? "0";
2593
2621
  const fallbackValue = hexToFallback(addedIdentityHex);
2594
- const labelId = useId6("identityListItem__label");
2622
+ const labelId = useId7("identityListItem__label");
2595
2623
  const displayName = addedIdentity?.profile?.displayName ?? (addedIdentity && generateName4(addedIdentityHex));
2596
2624
  const doneAction = /* @__PURE__ */ React32.createElement(Action, {
2597
2625
  ...onDone && {
@@ -2604,14 +2632,14 @@ var IdentityAdded = (props) => {
2604
2632
  return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StepHeading, null, t("identity added label")), /* @__PURE__ */ React32.createElement("div", {
2605
2633
  role: "none",
2606
2634
  className: "grow flex flex-col items-center justify-center text-center gap-2"
2607
- }, /* @__PURE__ */ React32.createElement(Avatar5.Root, {
2635
+ }, /* @__PURE__ */ React32.createElement(Avatar7.Root, {
2608
2636
  status: "active",
2609
2637
  labelId,
2610
2638
  hue: addedIdentity?.profile?.data?.hue || fallbackValue.hue
2611
- }, /* @__PURE__ */ React32.createElement(Avatar5.Frame, null, /* @__PURE__ */ React32.createElement(Avatar5.Fallback, {
2639
+ }, /* @__PURE__ */ React32.createElement(Avatar7.Frame, null, /* @__PURE__ */ React32.createElement(Avatar7.Fallback, {
2612
2640
  text: addedIdentity?.profile?.data?.emoji || fallbackValue.emoji
2613
- })), /* @__PURE__ */ React32.createElement(Avatar5.Label, {
2614
- classNames: mx21("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2641
+ })), /* @__PURE__ */ React32.createElement(Avatar7.Label, {
2642
+ classNames: mx23("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2615
2643
  }, displayName))), /* @__PURE__ */ React32.createElement(Actions, null, mode === "halo-only" ? doneActionParent ? /* @__PURE__ */ cloneElement2(doneActionParent, {}, doneAction) : doneAction : /* @__PURE__ */ React32.createElement(Action, {
2616
2644
  variant: "primary",
2617
2645
  disabled: disabled || !addedIdentity,
@@ -2624,17 +2652,17 @@ var IdentityAdded = (props) => {
2624
2652
  };
2625
2653
 
2626
2654
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2627
- import React33, { useState as useState7 } from "react";
2655
+ import React33, { useState as useState9 } from "react";
2628
2656
  import { log as log8 } from "@dxos/log";
2629
2657
  import { useClient as useClient4 } from "@dxos/react-client";
2630
- import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2631
- var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2658
+ import { useTranslation as useTranslation18 } from "@dxos/react-ui";
2659
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2632
2660
  var IdentityInput = (props) => {
2633
2661
  const { send, method } = props;
2634
2662
  const isRecover = method === "recover identity";
2635
2663
  const client = useClient4();
2636
- const { t } = useTranslation19("os");
2637
- const [validationMessage, setValidationMessage] = useState7("");
2664
+ const { t } = useTranslation18("os");
2665
+ const [validationMessage, setValidationMessage] = useState9("");
2638
2666
  const createIdentity = (displayName) => {
2639
2667
  void client.halo.createIdentity({
2640
2668
  [isRecover ? "seedphrase" : "displayName"]: displayName
@@ -2645,7 +2673,7 @@ var IdentityInput = (props) => {
2645
2673
  });
2646
2674
  }, (error) => {
2647
2675
  log8.catch(error, void 0, {
2648
- F: __dxlog_file8,
2676
+ F: __dxlog_file7,
2649
2677
  L: 37,
2650
2678
  S: void 0,
2651
2679
  C: (f, a) => f(...a)
@@ -2662,8 +2690,8 @@ var IdentityInput = (props) => {
2662
2690
  var IdentityInputImpl = (props) => {
2663
2691
  const { method, send, active, onDisplayNameConfirm, validationMessage } = props;
2664
2692
  const disabled = !active;
2665
- const { t } = useTranslation19("os");
2666
- const [inputValue, setInputValue] = useState7("");
2693
+ const { t } = useTranslation18("os");
2694
+ const [inputValue, setInputValue] = useState9("");
2667
2695
  const isRecover = method === "recover identity";
2668
2696
  return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
2669
2697
  role: "none",
@@ -2692,11 +2720,11 @@ var IdentityInputImpl = (props) => {
2692
2720
 
2693
2721
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAccepted.tsx
2694
2722
  import React34, { cloneElement as cloneElement3 } from "react";
2695
- import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2723
+ import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2696
2724
  var InvitationAccepted = (props) => {
2697
2725
  const { active, Kind, doneActionParent, onDone } = props;
2698
2726
  const disabled = !active;
2699
- const { t } = useTranslation20("os");
2727
+ const { t } = useTranslation19("os");
2700
2728
  const doneAction = /* @__PURE__ */ React34.createElement(Action, {
2701
2729
  variant: "primary",
2702
2730
  onClick: onDone,
@@ -2713,10 +2741,10 @@ var InvitationAccepted = (props) => {
2713
2741
  };
2714
2742
 
2715
2743
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2716
- import React35, { useState as useState8, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2744
+ import React35, { useState as useState10, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2717
2745
  import { log as log9 } from "@dxos/log";
2718
- import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2719
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2746
+ import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2747
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2720
2748
  var invitationCodeFromUrl = (text) => {
2721
2749
  try {
2722
2750
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
@@ -2724,7 +2752,7 @@ var invitationCodeFromUrl = (text) => {
2724
2752
  return invitation ?? text;
2725
2753
  } catch (err) {
2726
2754
  log9.catch(err, void 0, {
2727
- F: __dxlog_file9,
2755
+ F: __dxlog_file8,
2728
2756
  L: 25,
2729
2757
  S: void 0,
2730
2758
  C: (f, a) => f(...a)
@@ -2735,8 +2763,8 @@ var invitationCodeFromUrl = (text) => {
2735
2763
  var InvitationInput = (props) => {
2736
2764
  const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
2737
2765
  const disabled = !active;
2738
- const { t } = useTranslation21("os");
2739
- const [inputValue, setInputValue] = useState8(unredeemedCode ?? "");
2766
+ const { t } = useTranslation20("os");
2767
+ const [inputValue, setInputValue] = useState10(unredeemedCode ?? "");
2740
2768
  useEffect4(() => {
2741
2769
  unredeemedCode && setInputValue(unredeemedCode ?? "");
2742
2770
  }, [
@@ -2794,8 +2822,8 @@ var InvitationInput = (props) => {
2794
2822
 
2795
2823
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationRescuer.tsx
2796
2824
  import React36 from "react";
2797
- import { useTranslation as useTranslation22 } from "@dxos/react-ui";
2798
- import { descriptionText as descriptionText9 } from "@dxos/react-ui-theme";
2825
+ import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2826
+ import { descriptionText as descriptionText10 } from "@dxos/react-ui-theme";
2799
2827
  var InvitationActions = ({
2800
2828
  // `invitationState` does report correct state, but here we evaluate whether `failReason` is a better source of truth
2801
2829
  // for the UI in particular.
@@ -2806,10 +2834,10 @@ var InvitationActions = ({
2806
2834
  Kind,
2807
2835
  failReason
2808
2836
  }) => {
2809
- const { t } = useTranslation22("os");
2837
+ const { t } = useTranslation21("os");
2810
2838
  if (failReason) {
2811
2839
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2812
- className: descriptionText9
2840
+ className: descriptionText10
2813
2841
  }, t(failReason === "timeout" ? "timeout status label" : failReason === "cancelled" ? "cancelled status label" : "error status label")), /* @__PURE__ */ React36.createElement("div", {
2814
2842
  role: "none",
2815
2843
  className: "grow"
@@ -2822,7 +2850,7 @@ var InvitationActions = ({
2822
2850
  }, t("reset label"))));
2823
2851
  } else {
2824
2852
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2825
- className: descriptionText9
2853
+ className: descriptionText10
2826
2854
  }, t("connecting status label")), /* @__PURE__ */ React36.createElement("div", {
2827
2855
  role: "none",
2828
2856
  className: "grow"
@@ -2839,12 +2867,12 @@ var InvitationActions = ({
2839
2867
  };
2840
2868
  var InvitationRescuer = (props) => {
2841
2869
  const { Kind, invitationState, active, send } = props;
2842
- const { t } = useTranslation22("os");
2870
+ const { t } = useTranslation21("os");
2843
2871
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, typeof invitationState === "undefined" ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", {
2844
2872
  role: "none",
2845
2873
  className: "grow flex flex-col justify-center"
2846
2874
  }, /* @__PURE__ */ React36.createElement(StepHeading, {
2847
- className: descriptionText9
2875
+ className: descriptionText10
2848
2876
  }, "There was a problem joining the space")), /* @__PURE__ */ React36.createElement(Actions, null, /* @__PURE__ */ React36.createElement(Action, {
2849
2877
  disabled: !active,
2850
2878
  "data-testid": "invitation-rescuer-blank-reset",
@@ -2855,15 +2883,15 @@ var InvitationRescuer = (props) => {
2855
2883
  };
2856
2884
 
2857
2885
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
2858
- import React37, { useState as useState9 } from "react";
2859
- import { Input as Input2, useTranslation as useTranslation23 } from "@dxos/react-ui";
2860
- import { hexToEmoji as hexToEmoji4 } from "@dxos/util";
2886
+ import React37, { useState as useState11 } from "react";
2887
+ import { Input as Input3, useTranslation as useTranslation22 } from "@dxos/react-ui";
2888
+ import { hexToEmoji as hexToEmoji5 } from "@dxos/util";
2861
2889
  var pinLength = 6;
2862
2890
  var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel }) => {
2863
2891
  const disabled = !active || pending;
2864
- const { t } = useTranslation23("os");
2892
+ const { t } = useTranslation22("os");
2865
2893
  const invitationType = Kind.toLowerCase();
2866
- const [authCode, setAuthCode] = useState9("");
2894
+ const [authCode, setAuthCode] = useState11("");
2867
2895
  const onChange = ({ target: { value } }) => {
2868
2896
  setAuthCode(value);
2869
2897
  if (value.length === pinLength) {
@@ -2874,12 +2902,12 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2874
2902
  role: "none",
2875
2903
  className: "grow flex flex-col justify-center"
2876
2904
  }, invitationId && /* @__PURE__ */ React37.createElement(Emoji, {
2877
- text: hexToEmoji4(invitationId)
2878
- }), /* @__PURE__ */ React37.createElement(Input2.Root, failed && {
2905
+ text: hexToEmoji5(invitationId)
2906
+ }), /* @__PURE__ */ React37.createElement(Input3.Root, failed && {
2879
2907
  validationValence: "error"
2880
- }, /* @__PURE__ */ React37.createElement(Input2.Label, {
2908
+ }, /* @__PURE__ */ React37.createElement(Input3.Label, {
2881
2909
  asChild: true
2882
- }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input2.PinInput, {
2910
+ }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input3.PinInput, {
2883
2911
  disabled,
2884
2912
  length: pinLength,
2885
2913
  onChange,
@@ -2890,9 +2918,9 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2890
2918
  "data-prevent-ios-autofocus": true,
2891
2919
  "data-testid": `${invitationType}-auth-code-input`,
2892
2920
  "data-1p-ignore": true
2893
- }), failed && /* @__PURE__ */ React37.createElement(Input2.DescriptionAndValidation, {
2921
+ }), failed && /* @__PURE__ */ React37.createElement(Input3.DescriptionAndValidation, {
2894
2922
  classNames: "text-center"
2895
- }, /* @__PURE__ */ React37.createElement(Input2.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2923
+ }, /* @__PURE__ */ React37.createElement(Input3.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2896
2924
  variant: "ghost",
2897
2925
  disabled,
2898
2926
  onClick: () => onInvitationCancel?.(),
@@ -2910,7 +2938,7 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2910
2938
  var stepStyles = "pbs-1 pbe-3 pli-3";
2911
2939
 
2912
2940
  // packages/sdk/shell/src/styles/invitationStatusStyles.ts
2913
- import { Invitation as Invitation7 } from "@dxos/react-client/invitations";
2941
+ import { Invitation as Invitation6 } from "@dxos/react-client/invitations";
2914
2942
  var inactiveBgColor = "bg-neutral-100 dark:bg-neutral-600";
2915
2943
  var activeBgColor = "bg-primary-500 dark:bg-primary-400";
2916
2944
  var successBgColor = "bg-success-500 dark:bg-success-400";
@@ -2926,15 +2954,15 @@ var activeStrokeColor = "stroke-primary-400 dark:stroke-primary-150";
2926
2954
  var successStrokeColor = "stroke-success-300 dark:stroke-primary-400";
2927
2955
  var errorStrokeColor = "stroke-error-300 dark:stroke-error-500";
2928
2956
  var cancelledStrokeColor = "stroke-warning-300 dark:stroke-warning-500";
2929
- var resolvedStrokeColor = (status) => status === Invitation7.State.ERROR ? errorStrokeColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledStrokeColor : successStrokeColor;
2930
- var resolvedBgColor = (status) => status === Invitation7.State.ERROR ? errorBgColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledBgColor : successBgColor;
2931
- var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTextColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledTextColor : successTextColor;
2957
+ var resolvedStrokeColor = (status) => status === Invitation6.State.ERROR ? errorStrokeColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledStrokeColor : successStrokeColor;
2958
+ var resolvedBgColor = (status) => status === Invitation6.State.ERROR ? errorBgColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledBgColor : successBgColor;
2959
+ var resolvedTextColor = (status) => status === Invitation6.State.ERROR ? errorTextColor : status === Invitation6.State.CANCELLED || status === Invitation6.State.TIMEOUT ? cancelledTextColor : successTextColor;
2932
2960
 
2933
2961
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2934
- var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2962
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2935
2963
  var JoinPanelImpl = (props) => {
2936
2964
  const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetStorage, onConfirmResetStorage, IdentityInput: IdentityInputComponent = IdentityInput, ConfirmReset: ConfirmResetComponent = ConfirmReset } = props;
2937
- return /* @__PURE__ */ React38.createElement(DensityProvider3, {
2965
+ return /* @__PURE__ */ React38.createElement(DensityProvider2, {
2938
2966
  density: "fine"
2939
2967
  }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
2940
2968
  titleId,
@@ -3077,7 +3105,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3077
3105
  const client = useClient5();
3078
3106
  const identity = useIdentity2();
3079
3107
  const { hasIosKeyboard } = useThemeContext4();
3080
- const titleId = useId7("joinPanel__heading", propsTitleId);
3108
+ const titleId = useId8("joinPanel__heading", propsTitleId);
3081
3109
  const [joinState, joinSend, joinService] = useJoinMachine(client, {
3082
3110
  context: {
3083
3111
  mode,
@@ -3093,7 +3121,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3093
3121
  useEffect5(() => {
3094
3122
  const subscription = joinService.subscribe((state) => {
3095
3123
  log10("[state]", state, {
3096
- F: __dxlog_file10,
3124
+ F: __dxlog_file9,
3097
3125
  L: 204,
3098
3126
  S: void 0,
3099
3127
  C: (f, a) => f(...a)
@@ -3358,13 +3386,13 @@ import { Planet } from "@phosphor-icons/react";
3358
3386
  import React40, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3359
3387
  import { log as log13 } from "@dxos/log";
3360
3388
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3361
- import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation25 } from "@dxos/react-ui";
3389
+ import { DensityProvider as DensityProvider3, useId as useId9, useTranslation as useTranslation24 } from "@dxos/react-ui";
3362
3390
 
3363
3391
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3364
3392
  import { useMachine as useMachine3 } from "@xstate/react";
3365
3393
  import { assign as assign3, createMachine as createMachine3 } from "xstate";
3366
3394
  import { log as log11 } from "@dxos/log";
3367
- var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3395
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3368
3396
  var spaceMachine = createMachine3({
3369
3397
  id: "space",
3370
3398
  predictableActionArguments: true,
@@ -3405,7 +3433,7 @@ var spaceMachine = createMachine3({
3405
3433
  event,
3406
3434
  context
3407
3435
  }, {
3408
- F: __dxlog_file11,
3436
+ F: __dxlog_file10,
3409
3437
  L: 53,
3410
3438
  S: void 0,
3411
3439
  C: (f, a) => f(...a)
@@ -3424,28 +3452,28 @@ var useSpaceMachine = (options) => {
3424
3452
 
3425
3453
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3426
3454
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3427
- import React39, { useCallback as useCallback8, useState as useState10 } from "react";
3455
+ import React39, { useCallback as useCallback8, useState as useState12 } from "react";
3428
3456
  import { log as log12 } from "@dxos/log";
3429
3457
  import { useConfig } from "@dxos/react-client";
3430
3458
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3431
- import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3432
- import { ScrollArea, useTranslation as useTranslation24 } from "@dxos/react-ui";
3433
- import { descriptionText as descriptionText10, mx as mx22 } from "@dxos/react-ui-theme";
3434
- var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3459
+ import { Invitation as Invitation7, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3460
+ import { ScrollArea, useTranslation as useTranslation23 } from "@dxos/react-ui";
3461
+ import { descriptionText as descriptionText11, mx as mx24 } from "@dxos/react-ui-theme";
3462
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3435
3463
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
3436
3464
  var SpaceManager = (props) => {
3437
3465
  const { space, target } = props;
3438
- const { t } = useTranslation24("os");
3466
+ const { t } = useTranslation23("os");
3439
3467
  const config = useConfig();
3440
3468
  const invitations = useSpaceInvitations2(space?.key);
3441
3469
  const onInvitationEvent = useCallback8((invitation) => {
3442
3470
  const invitationCode = InvitationEncoder4.encode(invitation);
3443
- if (invitation.state === Invitation8.State.CONNECTING) {
3471
+ if (invitation.state === Invitation7.State.CONNECTING) {
3444
3472
  log12.info(JSON.stringify({
3445
3473
  invitationCode,
3446
3474
  authCode: invitation.authCode
3447
3475
  }), void 0, {
3448
- F: __dxlog_file12,
3476
+ F: __dxlog_file11,
3449
3477
  L: 49,
3450
3478
  S: void 0,
3451
3479
  C: (f, a) => f(...a)
@@ -3459,8 +3487,9 @@ var SpaceManager = (props) => {
3459
3487
  icon: UserPlus,
3460
3488
  onClick: useCallback8(() => {
3461
3489
  const invitation = space.share?.({
3462
- type: Invitation8.Type.INTERACTIVE,
3463
- authMethod: Invitation8.AuthMethod.SHARED_SECRET,
3490
+ type: Invitation7.Type.INTERACTIVE,
3491
+ authMethod: Invitation7.AuthMethod.SHARED_SECRET,
3492
+ multiUse: false,
3464
3493
  target
3465
3494
  });
3466
3495
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
@@ -3476,8 +3505,9 @@ var SpaceManager = (props) => {
3476
3505
  icon: UsersThree,
3477
3506
  onClick: useCallback8(() => {
3478
3507
  const invitation = space.share?.({
3479
- type: Invitation8.Type.MULTIUSE,
3480
- authMethod: Invitation8.AuthMethod.NONE,
3508
+ type: Invitation7.Type.INTERACTIVE,
3509
+ authMethod: Invitation7.AuthMethod.NONE,
3510
+ multiUse: true,
3481
3511
  target
3482
3512
  });
3483
3513
  if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== "production") {
@@ -3497,7 +3527,7 @@ var SpaceManager = (props) => {
3497
3527
  var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
3498
3528
  var SpaceManagerImpl = (props) => {
3499
3529
  const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
3500
- const { t } = useTranslation24("os");
3530
+ const { t } = useTranslation23("os");
3501
3531
  const inviteActions = propsInviteActions ?? {
3502
3532
  noopInvite: {
3503
3533
  label: t("create space invitation label"),
@@ -3507,20 +3537,20 @@ var SpaceManagerImpl = (props) => {
3507
3537
  }
3508
3538
  }
3509
3539
  };
3510
- const [activeAction, setInternalActiveAction] = useState10(localStorage.getItem(activeActionKey) ?? "inviteOne");
3540
+ const [activeAction, setInternalActiveAction] = useState12(localStorage.getItem(activeActionKey) ?? "inviteOne");
3511
3541
  const setActiveAction = (nextAction) => {
3512
3542
  setInternalActiveAction(nextAction);
3513
3543
  localStorage.setItem(activeActionKey, nextAction);
3514
3544
  };
3515
3545
  const visibleInvitations = showInactiveInvitations ? invitations : invitations?.filter((invitation) => ![
3516
- Invitation8.State.CANCELLED
3546
+ Invitation7.State.CANCELLED
3517
3547
  ].includes(invitation.get().state));
3518
3548
  return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(ScrollArea.Root, {
3519
3549
  classNames: "grow shrink basis-28 -mli-2"
3520
3550
  }, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3521
3551
  classNames: "is-full pie-2"
3522
3552
  }, !!visibleInvitations?.length && /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("h3", {
3523
- className: mx22(headingFragment, descriptionText10)
3553
+ className: mx24(headingFragment, descriptionText11)
3524
3554
  }, t("invitation list heading")), /* @__PURE__ */ React39.createElement(InvitationListComponent, {
3525
3555
  className: "mb-2",
3526
3556
  send,
@@ -3528,7 +3558,7 @@ var SpaceManagerImpl = (props) => {
3528
3558
  onClickRemove: (invitation) => invitation.cancel(),
3529
3559
  createInvitationUrl
3530
3560
  }), /* @__PURE__ */ React39.createElement("h3", {
3531
- className: mx22(headingFragment, descriptionText10, "mbs-2")
3561
+ className: mx24(headingFragment, descriptionText11, "mbs-2")
3532
3562
  }, t("space member list heading"))), /* @__PURE__ */ React39.createElement(SpaceMemberListComponent, {
3533
3563
  spaceKey: space.key,
3534
3564
  includeSelf: true
@@ -3544,9 +3574,9 @@ var SpaceManagerImpl = (props) => {
3544
3574
  };
3545
3575
 
3546
3576
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3547
- var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3577
+ var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3548
3578
  var SpacePanelHeading = ({ titleId, space, onDone }) => {
3549
- const { t } = useTranslation25("os");
3579
+ const { t } = useTranslation24("os");
3550
3580
  const name = space.properties.name;
3551
3581
  return /* @__PURE__ */ React40.createElement(Heading, {
3552
3582
  titleId,
@@ -3567,7 +3597,7 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
3567
3597
  };
3568
3598
  var SpacePanelImpl = (props) => {
3569
3599
  const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3570
- return /* @__PURE__ */ React40.createElement(DensityProvider4, {
3600
+ return /* @__PURE__ */ React40.createElement(DensityProvider3, {
3571
3601
  density: "fine"
3572
3602
  }, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3573
3603
  ...rest,
@@ -3601,7 +3631,7 @@ var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
3601
3631
  });
3602
3632
  };
3603
3633
  var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
3604
- const titleId = useId8("spacePanel__heading", propsTitleId);
3634
+ const titleId = useId9("spacePanel__heading", propsTitleId);
3605
3635
  const [spaceState, spaceSend, spaceService] = useSpaceMachine({
3606
3636
  context: {
3607
3637
  space: props.space
@@ -3610,7 +3640,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3610
3640
  useEffect6(() => {
3611
3641
  const subscription = spaceService.subscribe((state) => {
3612
3642
  log13("[state]", state, {
3613
- F: __dxlog_file13,
3643
+ F: __dxlog_file12,
3614
3644
  L: 94,
3615
3645
  S: void 0,
3616
3646
  C: (f, a) => f(...a)
@@ -3650,9 +3680,9 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3650
3680
 
3651
3681
  // packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
3652
3682
  import React41 from "react";
3653
- import { Status, useTranslation as useTranslation26 } from "@dxos/react-ui";
3683
+ import { Status, useTranslation as useTranslation25 } from "@dxos/react-ui";
3654
3684
  var StatusPanel = ({ titleId }) => {
3655
- const { t } = useTranslation26("os");
3685
+ const { t } = useTranslation25("os");
3656
3686
  return /* @__PURE__ */ React41.createElement("div", {
3657
3687
  className: "grid place-items-center p-2 gap-2"
3658
3688
  }, /* @__PURE__ */ React41.createElement("p", {
@@ -3665,7 +3695,7 @@ var StatusPanel = ({ titleId }) => {
3665
3695
 
3666
3696
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
3667
3697
  var IdentityDialog = (props) => {
3668
- const titleId = useId9("identityDialog__title", props.title);
3698
+ const titleId = useId10("identityDialog__title", props.title);
3669
3699
  return /* @__PURE__ */ React42.createElement(Dialog.Root, {
3670
3700
  defaultOpen: true,
3671
3701
  onOpenChange: (open) => open || props.onDone?.()
@@ -3683,9 +3713,9 @@ var IdentityDialog = (props) => {
3683
3713
 
3684
3714
  // packages/sdk/shell/src/composites/JoinDialog/JoinDialog.tsx
3685
3715
  import React43 from "react";
3686
- import { AlertDialog, useId as useId10, useVisualViewport } from "@dxos/react-ui";
3716
+ import { AlertDialog, useId as useId11, useVisualViewport } from "@dxos/react-ui";
3687
3717
  var JoinDialog = (joinPanelProps) => {
3688
- const titleId = useId10("joinDialog__title");
3718
+ const titleId = useId11("joinDialog__title");
3689
3719
  const { height } = useVisualViewport();
3690
3720
  return /* @__PURE__ */ React43.createElement(AlertDialog.Root, {
3691
3721
  defaultOpen: true,
@@ -3717,21 +3747,21 @@ import { createRoot } from "react-dom/client";
3717
3747
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3718
3748
  import { ShellRuntimeImpl } from "@dxos/client-services";
3719
3749
  import { Client, ClientContext, ClientServicesProxy, Config, SystemStatus } from "@dxos/react-client";
3720
- import { ThemeProvider, Tooltip as Tooltip5 } from "@dxos/react-ui";
3750
+ import { ThemeProvider, Tooltip as Tooltip7 } from "@dxos/react-ui";
3721
3751
  import { defaultTx } from "@dxos/react-ui-theme";
3722
3752
  import { createIFramePort } from "@dxos/rpc-tunnel";
3723
3753
 
3724
3754
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3725
- import React46, { useEffect as useEffect7, useState as useState11 } from "react";
3755
+ import React46, { useEffect as useEffect7, useState as useState13 } from "react";
3726
3756
  import { log as log14 } from "@dxos/log";
3727
3757
  import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3728
3758
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3729
3759
 
3730
3760
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
3731
3761
  import React44 from "react";
3732
- import { Dialog as Dialog2, useId as useId11 } from "@dxos/react-ui";
3762
+ import { Dialog as Dialog2, useId as useId12 } from "@dxos/react-ui";
3733
3763
  var SpaceDialog = (spacePanelProps) => {
3734
- const titleId = useId11("spaceDialog__title");
3764
+ const titleId = useId12("spaceDialog__title");
3735
3765
  return /* @__PURE__ */ React44.createElement(Dialog2.Root, {
3736
3766
  defaultOpen: true,
3737
3767
  onOpenChange: (open) => open || spacePanelProps.onDone?.()
@@ -3748,9 +3778,9 @@ var SpaceDialog = (spacePanelProps) => {
3748
3778
 
3749
3779
  // packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
3750
3780
  import React45 from "react";
3751
- import { AlertDialog as AlertDialog2, useId as useId12 } from "@dxos/react-ui";
3781
+ import { AlertDialog as AlertDialog2, useId as useId13 } from "@dxos/react-ui";
3752
3782
  var StatusDialog = () => {
3753
- const titleId = useId12("statusDialog__title");
3783
+ const titleId = useId13("statusDialog__title");
3754
3784
  return /* @__PURE__ */ React45.createElement(AlertDialog2.Root, {
3755
3785
  open: true
3756
3786
  }, /* @__PURE__ */ React45.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Content, {
@@ -3761,9 +3791,9 @@ var StatusDialog = () => {
3761
3791
  };
3762
3792
 
3763
3793
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3764
- var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3794
+ var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3765
3795
  var Shell = ({ runtime, origin }) => {
3766
- const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState11({
3796
+ const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState13({
3767
3797
  layout: runtime.layout,
3768
3798
  invitationCode: runtime.invitationCode,
3769
3799
  spaceKey: runtime.spaceKey,
@@ -3779,7 +3809,7 @@ var Shell = ({ runtime, origin }) => {
3779
3809
  useEffect7(() => {
3780
3810
  if (layout === ShellLayout.SPACE && !space) {
3781
3811
  log14.warn("No space found for shell space invitations.", void 0, {
3782
- F: __dxlog_file14,
3812
+ F: __dxlog_file13,
3783
3813
  L: 33,
3784
3814
  S: void 0,
3785
3815
  C: (f, a) => f(...a)
@@ -3852,7 +3882,7 @@ var Shell = ({ runtime, origin }) => {
3852
3882
  layout: ShellLayout.DEFAULT
3853
3883
  });
3854
3884
  },
3855
- initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : layout === ShellLayout.EDIT_PROFILE ? "manage-profile" : "default"
3885
+ initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : "default"
3856
3886
  });
3857
3887
  case ShellLayout.SPACE:
3858
3888
  return space ? /* @__PURE__ */ React46.createElement(SpaceDialog, {
@@ -3944,8 +3974,6 @@ var os = {
3944
3974
  "connected status label": "Enter confirmation PIN",
3945
3975
  "authenticating status label": "Enter confirmation PIN",
3946
3976
  "success status label": "Success",
3947
- "connect label": "Connect",
3948
- "reconnect label": "Reconnect",
3949
3977
  "cancel label": "Cancel",
3950
3978
  "done label": "Done",
3951
3979
  "reset label": "Start over",
@@ -4027,7 +4055,19 @@ var os = {
4027
4055
  "purple label": "Purple",
4028
4056
  "fuchsia label": "Fuchsia",
4029
4057
  "pink label": "Pink",
4030
- "rose label": "Rose"
4058
+ "rose label": "Rose",
4059
+ "current device tag label": "This device",
4060
+ "device name placeholder": "{{platform}} on {{os}}",
4061
+ "more options label": "More options",
4062
+ "disconnect label": "Currently online. Click to go offline.",
4063
+ "connect label": "Currently offline. Click to go online.",
4064
+ "edit device label": "Edit device name & avatar",
4065
+ "agent heading": "Agent",
4066
+ "agent message title": "About creating an agent",
4067
+ "agent message body": "Creating an agent helps keep your devices and peers in-sync. An agent is like any other device, but since it\u2019s always online your changes will sync even when all your physical devices are\xA0asleep.",
4068
+ "create agent label": "Start an agent",
4069
+ "destroy agent label": "Shut down agent",
4070
+ "agent device label": "Your agent"
4031
4071
  };
4032
4072
 
4033
4073
  // packages/sdk/shell/src/translations/index.ts
@@ -4061,17 +4101,17 @@ var runShell = async (config = new Config()) => {
4061
4101
  client,
4062
4102
  status: SystemStatus.ACTIVE
4063
4103
  }
4064
- }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
4104
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
4065
4105
  runtime,
4066
4106
  origin: location.origin
4067
4107
  })))))));
4068
4108
  };
4069
4109
 
4070
4110
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4071
- import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
4111
+ import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState14 } from "react";
4072
4112
  import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
4073
4113
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
4074
- import { mx as mx23 } from "@dxos/react-ui-theme";
4114
+ import { mx as mx25 } from "@dxos/react-ui-theme";
4075
4115
 
4076
4116
  // packages/sdk/shell/src/composites/Shell/memory-shell-runtime.ts
4077
4117
  import { Event } from "@dxos/async";
@@ -4130,7 +4170,7 @@ var useShell = () => {
4130
4170
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4131
4171
  const client = useClient7();
4132
4172
  const identity = useIdentity3();
4133
- const [display, setDisplay] = useState12(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4173
+ const [display, setDisplay] = useState14(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4134
4174
  const shellRuntime = useMemo6(() => {
4135
4175
  if (client.config.get("runtime.app.env.DX_VAULT") !== "false") {
4136
4176
  return;
@@ -4201,7 +4241,7 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4201
4241
  shellRuntime
4202
4242
  ]);
4203
4243
  return /* @__PURE__ */ React48.createElement(React48.Fragment, null, shellRuntime && /* @__PURE__ */ React48.createElement("div", {
4204
- className: mx23(display === ShellDisplay2.NONE ? "hidden" : "")
4244
+ className: mx25(display === ShellDisplay2.NONE ? "hidden" : "")
4205
4245
  }, /* @__PURE__ */ React48.createElement(Shell, {
4206
4246
  runtime: shellRuntime,
4207
4247
  origin: window.location.origin
@@ -4215,6 +4255,7 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4215
4255
  export {
4216
4256
  Action,
4217
4257
  Actions,
4258
+ AgentConfig,
4218
4259
  AuthCode,
4219
4260
  BifurcatedAction,
4220
4261
  Centered,
@@ -4228,9 +4269,11 @@ export {
4228
4269
  CopyButtonIconOnly,
4229
4270
  DeviceList,
4230
4271
  Emoji,
4231
- EmojiPicker,
4272
+ EmojiPickerBlock,
4273
+ EmojiPickerToolbarButton,
4232
4274
  Heading,
4233
- HuePicker,
4275
+ HuePickerBlock,
4276
+ HuePickerToolbarButton,
4234
4277
  IdentityDialog,
4235
4278
  IdentityListItem,
4236
4279
  IdentityPanel,