@dxos/shell 0.4.10-main.b9b4602 → 0.4.10-main.c2d5db5

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 (122) hide show
  1. package/dist/bundle/shell.mjs +81827 -10
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +89 -152
  4. package/dist/bundle/shell.umd.js.map +1 -1
  5. package/dist/bundle/style.css +1 -1
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/react.mjs +792 -831
  8. package/dist/lib/browser/react.mjs.map +4 -4
  9. package/dist/lib/browser/testing/index.mjs +2 -4
  10. package/dist/lib/browser/testing/index.mjs.map +2 -2
  11. package/dist/types/src/components/EmojiPicker.d.ts +2 -9
  12. package/dist/types/src/components/EmojiPicker.d.ts.map +1 -1
  13. package/dist/types/src/components/EmojiPicker.js +3 -57
  14. package/dist/types/src/components/EmojiPicker.js.map +1 -1
  15. package/dist/types/src/components/HuePicker.d.ts +2 -9
  16. package/dist/types/src/components/HuePicker.d.ts.map +1 -1
  17. package/dist/types/src/components/HuePicker.js +6 -75
  18. package/dist/types/src/components/HuePicker.js.map +1 -1
  19. package/dist/types/src/components/IdentityList/DeviceList.d.ts +7 -0
  20. package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -0
  21. package/dist/types/src/components/IdentityList/DeviceList.js +34 -0
  22. package/dist/types/src/components/IdentityList/DeviceList.js.map +1 -0
  23. package/dist/types/src/components/IdentityList/index.d.ts +1 -0
  24. package/dist/types/src/components/IdentityList/index.d.ts.map +1 -1
  25. package/dist/types/src/components/IdentityList/index.js +1 -0
  26. package/dist/types/src/components/IdentityList/index.js.map +1 -1
  27. package/dist/types/src/components/Panel/Action.d.ts +2 -2
  28. package/dist/types/src/components/Viewport/Viewport.d.ts +1 -1
  29. package/dist/types/src/components/index.d.ts +0 -2
  30. package/dist/types/src/components/index.d.ts.map +1 -1
  31. package/dist/types/src/components/index.js +0 -2
  32. package/dist/types/src/components/index.js.map +1 -1
  33. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  34. package/dist/types/src/composites/Shell/Shell.js +5 -1
  35. package/dist/types/src/composites/Shell/Shell.js.map +1 -1
  36. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  37. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +40 -80
  38. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  39. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +3 -0
  40. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
  41. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +43 -1
  42. package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
  43. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +11 -8
  44. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  45. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +1 -1
  46. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  47. package/dist/types/src/panels/IdentityPanel/identityMachine.js +24 -0
  48. package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
  49. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts +3 -0
  50. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts.map +1 -0
  51. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js +26 -0
  52. package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js.map +1 -0
  53. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts +10 -0
  54. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts.map +1 -0
  55. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js +23 -0
  56. package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js.map +1 -0
  57. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +4 -4
  58. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  59. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +43 -9
  60. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  61. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -1
  62. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
  63. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +2 -2
  64. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
  65. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +2 -0
  66. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
  67. package/dist/types/src/panels/IdentityPanel/steps/index.js +2 -0
  68. package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
  69. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  70. package/dist/types/src/testing/shell-manager.js +2 -4
  71. package/dist/types/src/testing/shell-manager.js.map +1 -1
  72. package/dist/types/src/translations/locales/en-US.d.ts +2 -12
  73. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  74. package/dist/types/src/translations/locales/en-US.js +2 -12
  75. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  76. package/package.json +19 -19
  77. package/src/components/EmojiPicker.tsx +4 -101
  78. package/src/components/HuePicker.tsx +5 -99
  79. package/src/components/IdentityList/DeviceList.tsx +49 -0
  80. package/src/components/IdentityList/index.ts +1 -0
  81. package/src/components/index.ts +0 -2
  82. package/src/composites/Shell/Shell.tsx +7 -1
  83. package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +63 -0
  84. package/src/panels/IdentityPanel/IdentityPanel.tsx +34 -123
  85. package/src/panels/IdentityPanel/IdentityPanelProps.ts +14 -10
  86. package/src/panels/IdentityPanel/identityMachine.ts +31 -1
  87. package/src/panels/IdentityPanel/steps/AgentForm.tsx +61 -0
  88. package/src/panels/IdentityPanel/steps/DeviceManager.tsx +41 -0
  89. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +76 -23
  90. package/src/panels/IdentityPanel/steps/ProfileForm.tsx +4 -12
  91. package/src/panels/IdentityPanel/steps/index.ts +2 -0
  92. package/src/testing/shell-manager.ts +2 -4
  93. package/src/translations/locales/en-US.ts +2 -13
  94. package/dist/bundle/index-D-K0uxrm.mjs +0 -94
  95. package/dist/bundle/index-D-K0uxrm.mjs.map +0 -1
  96. package/dist/bundle/index-DRtLjStG.mjs +0 -96550
  97. package/dist/bundle/index-DRtLjStG.mjs.map +0 -1
  98. package/dist/types/src/components/AgentConfig.d.ts +0 -3
  99. package/dist/types/src/components/AgentConfig.d.ts.map +0 -1
  100. package/dist/types/src/components/AgentConfig.js +0 -37
  101. package/dist/types/src/components/AgentConfig.js.map +0 -1
  102. package/dist/types/src/components/DeviceList/DeviceList.d.ts +0 -3
  103. package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +0 -1
  104. package/dist/types/src/components/DeviceList/DeviceList.js +0 -29
  105. package/dist/types/src/components/DeviceList/DeviceList.js.map +0 -1
  106. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts +0 -6
  107. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts.map +0 -1
  108. package/dist/types/src/components/DeviceList/DeviceListItem.js +0 -72
  109. package/dist/types/src/components/DeviceList/DeviceListItem.js.map +0 -1
  110. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts +0 -27
  111. package/dist/types/src/components/DeviceList/DeviceListProps.d.ts.map +0 -1
  112. package/dist/types/src/components/DeviceList/DeviceListProps.js +0 -6
  113. package/dist/types/src/components/DeviceList/DeviceListProps.js.map +0 -1
  114. package/dist/types/src/components/DeviceList/index.d.ts +0 -3
  115. package/dist/types/src/components/DeviceList/index.d.ts.map +0 -1
  116. package/dist/types/src/components/DeviceList/index.js +0 -22
  117. package/dist/types/src/components/DeviceList/index.js.map +0 -1
  118. package/src/components/AgentConfig.tsx +0 -66
  119. package/src/components/DeviceList/DeviceList.tsx +0 -54
  120. package/src/components/DeviceList/DeviceListItem.tsx +0 -120
  121. package/src/components/DeviceList/DeviceListProps.ts +0 -33
  122. package/src/components/DeviceList/index.ts +0 -6
@@ -2,73 +2,14 @@ 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
-
64
5
  // packages/sdk/shell/src/components/Clipboard/CopyButton.tsx
65
6
  import { Check, Copy } from "@phosphor-icons/react";
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";
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";
69
10
 
70
11
  // packages/sdk/shell/src/components/Clipboard/ClipboardProvider.tsx
71
- import React2, { createContext, useCallback, useContext, useState } from "react";
12
+ import React, { createContext, useCallback, useContext, useState } from "react";
72
13
  var ClipboardContext = /* @__PURE__ */ createContext({
73
14
  textValue: "",
74
15
  setTextValue: async (_) => {
@@ -81,7 +22,7 @@ var ClipboardProvider = ({ children }) => {
81
22
  await navigator.clipboard.writeText(nextValue);
82
23
  return setInternalTextValue(nextValue);
83
24
  }, []);
84
- return /* @__PURE__ */ React2.createElement(ClipboardContext.Provider, {
25
+ return /* @__PURE__ */ React.createElement(ClipboardContext.Provider, {
85
26
  value: {
86
27
  textValue,
87
28
  setTextValue
@@ -91,11 +32,11 @@ var ClipboardProvider = ({ children }) => {
91
32
 
92
33
  // packages/sdk/shell/src/components/Clipboard/CopyButton.tsx
93
34
  var inactiveLabelStyles = "invisible bs-px -mbe-px overflow-hidden";
94
- var CopyButton = ({ value, classNames, iconProps: iconProps2, ...props }) => {
95
- const { t } = useTranslation2("os");
35
+ var CopyButton = ({ value, classNames, iconProps, ...props }) => {
36
+ const { t } = useTranslation("os");
96
37
  const { textValue, setTextValue } = useClipboardContext();
97
38
  const isCopied = textValue === value;
98
- return /* @__PURE__ */ React3.createElement(Button2, {
39
+ return /* @__PURE__ */ React2.createElement(Button, {
99
40
  ...props,
100
41
  classNames: [
101
42
  "inline-flex flex-col justify-center",
@@ -103,60 +44,60 @@ var CopyButton = ({ value, classNames, iconProps: iconProps2, ...props }) => {
103
44
  ],
104
45
  onClick: () => setTextValue(value),
105
46
  "data-testid": "copy-invitation"
106
- }, /* @__PURE__ */ React3.createElement("div", {
47
+ }, /* @__PURE__ */ React2.createElement("div", {
107
48
  role: "none",
108
- className: mx2("flex gap-1 items-center", isCopied && inactiveLabelStyles)
109
- }, /* @__PURE__ */ React3.createElement("span", {
49
+ className: mx("flex gap-1 items-center", isCopied && inactiveLabelStyles)
50
+ }, /* @__PURE__ */ React2.createElement("span", {
110
51
  className: "pli-1"
111
- }, t("copy invitation code label")), /* @__PURE__ */ React3.createElement(Copy, {
112
- className: getSize2(5),
113
- ...iconProps2
114
- })), /* @__PURE__ */ React3.createElement("div", {
52
+ }, t("copy invitation code label")), /* @__PURE__ */ React2.createElement(Copy, {
53
+ className: getSize(5),
54
+ ...iconProps
55
+ })), /* @__PURE__ */ React2.createElement("div", {
115
56
  role: "none",
116
- className: mx2("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
117
- }, /* @__PURE__ */ React3.createElement("span", {
57
+ className: mx("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
58
+ }, /* @__PURE__ */ React2.createElement("span", {
118
59
  className: "pli-1"
119
- }, t("copy success label")), /* @__PURE__ */ React3.createElement(Check, {
120
- className: getSize2(5),
121
- ...iconProps2
60
+ }, t("copy success label")), /* @__PURE__ */ React2.createElement(Check, {
61
+ className: getSize(5),
62
+ ...iconProps
122
63
  })));
123
64
  };
124
- var CopyButtonIconOnly = ({ value, classNames, iconProps: iconProps2, variant, ...props }) => {
125
- const { t } = useTranslation2("os");
65
+ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) => {
66
+ const { t } = useTranslation("os");
126
67
  const { textValue, setTextValue } = useClipboardContext();
127
68
  const isCopied = textValue === value;
128
69
  const label = isCopied ? t("copy success label") : t("copy invitation code label");
129
70
  const [open, setOpen] = useState2(false);
130
- return /* @__PURE__ */ React3.createElement(Tooltip2.Root, {
71
+ return /* @__PURE__ */ React2.createElement(Tooltip.Root, {
131
72
  delayDuration: 1500,
132
73
  open,
133
74
  onOpenChange: setOpen
134
- }, /* @__PURE__ */ React3.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React3.createElement(Tooltip2.Content, {
75
+ }, /* @__PURE__ */ React2.createElement(Tooltip.Portal, null, /* @__PURE__ */ React2.createElement(Tooltip.Content, {
135
76
  side: "bottom",
136
77
  sideOffset: 12,
137
78
  classNames: "z-30"
138
- }, /* @__PURE__ */ React3.createElement("span", null, label), /* @__PURE__ */ React3.createElement(Tooltip2.Arrow, null))), /* @__PURE__ */ React3.createElement(Tooltip2.Trigger, {
79
+ }, /* @__PURE__ */ React2.createElement("span", null, label), /* @__PURE__ */ React2.createElement(Tooltip.Arrow, null))), /* @__PURE__ */ React2.createElement(Tooltip.Trigger, {
139
80
  "aria-label": label,
140
81
  ...props,
141
82
  onClick: () => setTextValue(value).then(() => setOpen(true)),
142
83
  "data-testid": "copy-invitation",
143
84
  asChild: true
144
- }, /* @__PURE__ */ React3.createElement(Button2, {
85
+ }, /* @__PURE__ */ React2.createElement(Button, {
145
86
  variant,
146
87
  classNames: [
147
88
  "inline-flex flex-col justify-center",
148
89
  classNames
149
90
  ]
150
- }, /* @__PURE__ */ React3.createElement(Copy, {
151
- className: getSize2(5),
152
- ...iconProps2
91
+ }, /* @__PURE__ */ React2.createElement(Copy, {
92
+ className: getSize(5),
93
+ ...iconProps
153
94
  }))));
154
95
  };
155
96
 
156
97
  // packages/sdk/shell/src/components/CompoundButton/CompoundButton.tsx
157
- import React4 from "react";
98
+ import React3 from "react";
158
99
  import { useId, useThemeContext, useElevationContext } from "@dxos/react-ui";
159
- import { descriptionText as descriptionText2, descriptionTextPrimary, mx as mx3 } from "@dxos/react-ui-theme";
100
+ import { descriptionText, descriptionTextPrimary, mx as mx2 } from "@dxos/react-ui-theme";
160
101
  var CompoundButton = ({ children, description, before, after, variant = "default", elevation: propsElevation, slots = {}, ...buttonProps }) => {
161
102
  const labelId = useId("compoundButton-label");
162
103
  const descriptionId = useId("compoundButton-description");
@@ -169,7 +110,7 @@ var CompoundButton = ({ children, description, before, after, variant = "default
169
110
  textWrap: true
170
111
  };
171
112
  const buttonClassName = tx("button.root", "button button--compound", styleProps, "flex items-center gap-4 plb-2.5", slots.root?.className);
172
- return /* @__PURE__ */ React4.createElement("button", {
113
+ return /* @__PURE__ */ React3.createElement("button", {
173
114
  ...buttonProps,
174
115
  ...slots.root,
175
116
  className: buttonClassName,
@@ -177,22 +118,22 @@ var CompoundButton = ({ children, description, before, after, variant = "default
177
118
  ...description && {
178
119
  "aria-describedby": descriptionId
179
120
  }
180
- }, before && /* @__PURE__ */ React4.createElement("div", {
121
+ }, before && /* @__PURE__ */ React3.createElement("div", {
181
122
  role: "none",
182
123
  className: "grow-0"
183
- }, before), /* @__PURE__ */ React4.createElement("div", {
124
+ }, before), /* @__PURE__ */ React3.createElement("div", {
184
125
  role: "none",
185
126
  ...slots.middle,
186
- className: mx3("grow whitespace-normal flex flex-col gap-1 text-left", slots.middle?.className)
187
- }, /* @__PURE__ */ React4.createElement("p", {
127
+ className: mx2("grow whitespace-normal flex flex-col gap-1 text-left", slots.middle?.className)
128
+ }, /* @__PURE__ */ React3.createElement("p", {
188
129
  ...slots.label,
189
130
  id: labelId,
190
- className: mx3(slots.label?.className)
191
- }, children), description && /* @__PURE__ */ React4.createElement("p", {
131
+ className: mx2(slots.label?.className)
132
+ }, children), description && /* @__PURE__ */ React3.createElement("p", {
192
133
  id: descriptionId,
193
134
  ...slots.description,
194
- className: mx3("text-xs mbe-1 font-normal", variant === "primary" ? descriptionTextPrimary : descriptionText2, slots.description?.className)
195
- }, description)), after && /* @__PURE__ */ React4.createElement("div", {
135
+ className: mx2("text-xs mbe-1 font-normal", variant === "primary" ? descriptionTextPrimary : descriptionText, slots.description?.className)
136
+ }, description)), after && /* @__PURE__ */ React3.createElement("div", {
196
137
  role: "none",
197
138
  className: "grow-0"
198
139
  }, after));
@@ -201,78 +142,13 @@ var CompoundButton = ({ children, description, before, after, variant = "default
201
142
  // packages/sdk/shell/src/components/EmojiPicker.tsx
202
143
  import emojiData from "@emoji-mart/data";
203
144
  import EmojiMart from "@emoji-mart/react";
204
- import { ArrowCounterClockwise, CaretDown, ImageSquare } from "@phosphor-icons/react";
145
+ import { ArrowCounterClockwise, CaretDown } from "@phosphor-icons/react";
205
146
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
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");
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");
276
152
  const [isMd] = useMediaQuery("md", {
277
153
  ssr: false
278
154
  });
@@ -282,22 +158,22 @@ var EmojiPickerBlock = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickC
282
158
  defaultProp: defaultEmoji
283
159
  });
284
160
  const [emojiPickerOpen, setEmojiPickerOpen] = useState3(false);
285
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Popover.Root, {
161
+ return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Popover.Root, {
286
162
  open: emojiPickerOpen,
287
163
  onOpenChange: setEmojiPickerOpen
288
- }, /* @__PURE__ */ React5.createElement(Popover.Trigger, {
164
+ }, /* @__PURE__ */ React4.createElement(Popover.Trigger, {
289
165
  asChild: true
290
- }, /* @__PURE__ */ React5.createElement(Button3, {
166
+ }, /* @__PURE__ */ React4.createElement(Button2, {
291
167
  variant: "ghost",
292
168
  classNames: "gap-2 text-2xl plb-1",
293
169
  disabled
294
- }, /* @__PURE__ */ React5.createElement("span", {
170
+ }, /* @__PURE__ */ React4.createElement("span", {
295
171
  className: "sr-only"
296
- }, t("select emoji label")), /* @__PURE__ */ React5.createElement("span", {
172
+ }, t("select emoji label")), /* @__PURE__ */ React4.createElement("span", {
297
173
  className: "grow pis-14"
298
- }, emojiValue), /* @__PURE__ */ React5.createElement(CaretDown, {
299
- className: getSize3(4)
300
- }))), /* @__PURE__ */ React5.createElement(Popover.Content, {
174
+ }, emojiValue), /* @__PURE__ */ React4.createElement(CaretDown, {
175
+ className: getSize2(4)
176
+ }))), /* @__PURE__ */ React4.createElement(Popover.Content, {
301
177
  side: "right",
302
178
  sideOffset: isMd ? 0 : -310,
303
179
  onKeyDownCapture: (event) => {
@@ -306,7 +182,7 @@ var EmojiPickerBlock = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickC
306
182
  setEmojiPickerOpen(false);
307
183
  }
308
184
  }
309
- }, /* @__PURE__ */ React5.createElement(EmojiMart, {
185
+ }, /* @__PURE__ */ React4.createElement(EmojiMart, {
310
186
  data: emojiData,
311
187
  onEmojiSelect: ({ native }) => {
312
188
  if (native) {
@@ -317,35 +193,35 @@ var EmojiPickerBlock = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickC
317
193
  autoFocus: true,
318
194
  maxFrequentRows: 0,
319
195
  noCountryFlags: true
320
- }), /* @__PURE__ */ React5.createElement(Popover.Arrow, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Root, null, /* @__PURE__ */ React5.createElement(Tooltip3.Trigger, {
196
+ }), /* @__PURE__ */ React4.createElement(Popover.Arrow, null))), /* @__PURE__ */ React4.createElement(Tooltip2.Root, null, /* @__PURE__ */ React4.createElement(Tooltip2.Trigger, {
321
197
  asChild: true
322
- }, /* @__PURE__ */ React5.createElement(Button3, {
198
+ }, /* @__PURE__ */ React4.createElement(Button2, {
323
199
  variant: "ghost",
324
200
  onClick: onClickClear,
325
201
  disabled
326
- }, /* @__PURE__ */ React5.createElement("span", {
202
+ }, /* @__PURE__ */ React4.createElement("span", {
327
203
  className: "sr-only"
328
- }, t("clear label")), /* @__PURE__ */ React5.createElement(ArrowCounterClockwise, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React5.createElement(Tooltip3.Content, {
204
+ }, t("clear label")), /* @__PURE__ */ React4.createElement(ArrowCounterClockwise, null))), /* @__PURE__ */ React4.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React4.createElement(Tooltip2.Content, {
329
205
  style: {
330
206
  zIndex: 70
331
207
  },
332
208
  side: "right"
333
- }, t("clear label"), /* @__PURE__ */ React5.createElement(Tooltip3.Arrow, null)))));
209
+ }, t("clear label"), /* @__PURE__ */ React4.createElement(Tooltip2.Arrow, null)))));
334
210
  };
335
211
 
336
212
  // packages/sdk/shell/src/components/HuePicker.tsx
337
- import { ArrowCounterClockwise as ArrowCounterClockwise2, CaretDown as CaretDown2, Check as Check2, Palette } from "@phosphor-icons/react";
213
+ import { ArrowCounterClockwise as ArrowCounterClockwise2, CaretDown as CaretDown2, Check as Check2 } from "@phosphor-icons/react";
338
214
  import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
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";
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";
342
218
  var HuePreview = ({ hue }) => {
343
219
  const { tx } = useThemeContext2();
344
- return /* @__PURE__ */ React6.createElement("svg", {
220
+ return /* @__PURE__ */ React5.createElement("svg", {
345
221
  width: 12,
346
222
  height: 12,
347
223
  viewBox: "0 0 12 12"
348
- }, /* @__PURE__ */ React6.createElement("rect", {
224
+ }, /* @__PURE__ */ React5.createElement("rect", {
349
225
  x: 0,
350
226
  y: 0,
351
227
  width: 12,
@@ -355,150 +231,130 @@ var HuePreview = ({ hue }) => {
355
231
  })
356
232
  }));
357
233
  };
358
- var HuePickerToolbarButton = ({ disabled, hue, onChangeHue, classNames, defaultHue }) => {
359
- const { t } = useTranslation4("os");
360
- const [hueValue, setHueValue] = useControllableState2({
361
- prop: hue,
362
- onChange: onChangeHue,
363
- defaultProp: defaultHue
364
- });
365
- const [huePickerOpen, setHuePickerOpen] = useState4(false);
366
- const suppressNextTooltip = useRef2(false);
367
- const [triggerTooltipOpen, setTriggerTooltipOpen] = useState4(false);
368
- return /* @__PURE__ */ React6.createElement(Tooltip4.Root, {
369
- open: triggerTooltipOpen,
370
- onOpenChange: (nextOpen) => {
371
- if (suppressNextTooltip.current) {
372
- setTriggerTooltipOpen(false);
373
- suppressNextTooltip.current = false;
374
- } else {
375
- setTriggerTooltipOpen(nextOpen);
376
- }
377
- }
378
- }, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
379
- modal: false,
380
- open: huePickerOpen,
381
- onOpenChange: (nextOpen) => {
382
- setHuePickerOpen(nextOpen);
383
- suppressNextTooltip.current = true;
384
- }
385
- }, /* @__PURE__ */ React6.createElement(Tooltip4.Trigger, {
386
- asChild: true
387
- }, /* @__PURE__ */ React6.createElement(DropdownMenu.Trigger, {
388
- asChild: true
389
- }, /* @__PURE__ */ React6.createElement(Toolbar2.Button, {
390
- classNames: mx4("gap-2 plb-1", classNames),
391
- disabled
392
- }, /* @__PURE__ */ React6.createElement("span", {
393
- className: "sr-only"
394
- }, t("select hue label")), /* @__PURE__ */ React6.createElement(Palette, {
395
- className: getSize4(5)
396
- })))), /* @__PURE__ */ React6.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React6.createElement(Tooltip4.Content, {
397
- side: "bottom",
398
- classNames: "z-50"
399
- }, t("select hue label"), /* @__PURE__ */ React6.createElement(Tooltip4.Arrow, null))), /* @__PURE__ */ React6.createElement(DropdownMenu.Content, {
400
- side: "bottom"
401
- }, /* @__PURE__ */ React6.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
402
- return /* @__PURE__ */ React6.createElement(DropdownMenu.CheckboxItem, {
403
- key: hue2,
404
- checked: hue2 === hueValue,
405
- onCheckedChange: () => setHueValue(hue2)
406
- }, /* @__PURE__ */ React6.createElement(HuePreview, {
407
- hue: hue2
408
- }), /* @__PURE__ */ React6.createElement("span", {
409
- className: "grow"
410
- }, t(`${hue2} label`)), /* @__PURE__ */ React6.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React6.createElement(Check2, null)));
411
- })), /* @__PURE__ */ React6.createElement(DropdownMenu.Arrow, null))));
412
- };
413
- var HuePickerBlock = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
414
- const { t } = useTranslation4("os");
234
+ var HuePicker = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
235
+ const { t } = useTranslation3("os");
415
236
  const [hueValue, setHueValue] = useControllableState2({
416
237
  prop: hue,
417
238
  onChange: onChangeHue,
418
239
  defaultProp: defaultHue
419
240
  });
420
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(DropdownMenu.Root, {
241
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Root, {
421
242
  modal: false
422
- }, /* @__PURE__ */ React6.createElement(DropdownMenu.Trigger, {
243
+ }, /* @__PURE__ */ React5.createElement(DropdownMenu.Trigger, {
423
244
  asChild: true
424
- }, /* @__PURE__ */ React6.createElement(Button4, {
245
+ }, /* @__PURE__ */ React5.createElement(Button3, {
425
246
  variant: "ghost",
426
247
  classNames: "gap-2 plb-1",
427
248
  disabled
428
- }, /* @__PURE__ */ React6.createElement("span", {
249
+ }, /* @__PURE__ */ React5.createElement("span", {
429
250
  className: "sr-only"
430
- }, t("select hue label")), /* @__PURE__ */ React6.createElement("div", {
251
+ }, t("select hue label")), /* @__PURE__ */ React5.createElement("div", {
431
252
  role: "none",
432
253
  className: "pis-14 grow flex items-center justify-center gap-2"
433
- }, /* @__PURE__ */ React6.createElement(HuePreview, {
254
+ }, /* @__PURE__ */ React5.createElement(HuePreview, {
434
255
  hue: hueValue
435
- }), /* @__PURE__ */ React6.createElement("span", null, t(`${hueValue} label`))), /* @__PURE__ */ React6.createElement(CaretDown2, {
436
- className: getSize4(4)
437
- }))), /* @__PURE__ */ React6.createElement(DropdownMenu.Content, {
256
+ }), /* @__PURE__ */ React5.createElement("span", null, t(`${hueValue} label`))), /* @__PURE__ */ React5.createElement(CaretDown2, {
257
+ className: getSize3(4)
258
+ }))), /* @__PURE__ */ React5.createElement(DropdownMenu.Content, {
438
259
  side: "right"
439
- }, /* @__PURE__ */ React6.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
440
- return /* @__PURE__ */ React6.createElement(DropdownMenu.CheckboxItem, {
260
+ }, /* @__PURE__ */ React5.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
261
+ return /* @__PURE__ */ React5.createElement(DropdownMenu.CheckboxItem, {
441
262
  key: hue2,
442
263
  checked: hue2 === hueValue,
443
264
  onCheckedChange: () => setHueValue(hue2)
444
- }, /* @__PURE__ */ React6.createElement(HuePreview, {
265
+ }, /* @__PURE__ */ React5.createElement(HuePreview, {
445
266
  hue: hue2
446
- }), /* @__PURE__ */ React6.createElement("span", {
267
+ }), /* @__PURE__ */ React5.createElement("span", {
447
268
  className: "grow"
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, {
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, {
450
271
  asChild: true
451
- }, /* @__PURE__ */ React6.createElement(Button4, {
272
+ }, /* @__PURE__ */ React5.createElement(Button3, {
452
273
  variant: "ghost",
453
274
  onClick: onClickClear,
454
275
  disabled
455
- }, /* @__PURE__ */ React6.createElement("span", {
276
+ }, /* @__PURE__ */ React5.createElement("span", {
456
277
  className: "sr-only"
457
- }, t("clear label")), /* @__PURE__ */ React6.createElement(ArrowCounterClockwise2, null))), /* @__PURE__ */ React6.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React6.createElement(Tooltip4.Content, {
278
+ }, t("clear label")), /* @__PURE__ */ React5.createElement(ArrowCounterClockwise2, null))), /* @__PURE__ */ React5.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React5.createElement(Tooltip3.Content, {
458
279
  style: {
459
280
  zIndex: 70
460
281
  },
461
282
  side: "right"
462
- }, t("clear label"), /* @__PURE__ */ React6.createElement(Tooltip4.Arrow, null)))));
283
+ }, t("clear label"), /* @__PURE__ */ React5.createElement(Tooltip3.Arrow, null)))));
463
284
  };
464
285
 
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
+
465
293
  // packages/sdk/shell/src/components/IdentityList/IdentityListItem.tsx
466
- import React7, { forwardRef } from "react";
294
+ import React6, { forwardRef } from "react";
467
295
  import { generateName } from "@dxos/display-name";
468
296
  import { SpaceMember } from "@dxos/react-client/echo";
469
- import { ListItem, Avatar as Avatar2, useId as useId2 } from "@dxos/react-ui";
470
- import { mx as mx5 } from "@dxos/react-ui-theme";
297
+ import { ListItem, Avatar, useId as useId2 } from "@dxos/react-ui";
298
+ import { mx as mx3 } from "@dxos/react-ui-theme";
471
299
  import { keyToFallback } from "@dxos/util";
472
300
  var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick, classNames, ...props }, forwardedRef) => {
473
301
  const fallbackValue = keyToFallback(identity.identityKey);
474
302
  const labelId = useId2("identityListItem__label");
475
303
  const displayName = identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
476
- return /* @__PURE__ */ React7.createElement(ListItem.Root, {
304
+ return /* @__PURE__ */ React6.createElement(ListItem.Root, {
477
305
  ...props,
478
- classNames: mx5("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
306
+ classNames: mx3("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
479
307
  onClick: () => onClick?.(),
480
308
  "data-testid": "identity-list-item",
481
309
  labelId,
482
310
  ref: forwardedRef
483
- }, /* @__PURE__ */ React7.createElement(Avatar2.Root, {
311
+ }, /* @__PURE__ */ React6.createElement(Avatar.Root, {
484
312
  status: presence === SpaceMember.PresenceState.ONLINE ? "active" : "inactive",
485
313
  labelId,
486
314
  hue: identity.profile?.data?.hue || fallbackValue.hue
487
- }, /* @__PURE__ */ React7.createElement(Avatar2.Frame, {
315
+ }, /* @__PURE__ */ React6.createElement(Avatar.Frame, {
488
316
  classNames: "place-self-center"
489
- }, /* @__PURE__ */ React7.createElement(Avatar2.Fallback, {
317
+ }, /* @__PURE__ */ React6.createElement(Avatar.Fallback, {
490
318
  text: identity.profile?.data?.emoji || fallbackValue.emoji
491
- })), /* @__PURE__ */ React7.createElement(Avatar2.Label, {
319
+ })), /* @__PURE__ */ React6.createElement(Avatar.Label, {
492
320
  classNames: "text-sm truncate pli-2"
493
321
  }, displayName)));
494
322
  });
495
323
 
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
+
496
352
  // packages/sdk/shell/src/components/IdentityList/SpaceMemberList.tsx
497
353
  import React8, { useMemo } from "react";
498
354
  import { useClient } from "@dxos/react-client";
499
355
  import { useMembers } from "@dxos/react-client/echo";
500
- import { useTranslation as useTranslation5, List } from "@dxos/react-ui";
501
- import { descriptionText as descriptionText3, mx as mx6 } from "@dxos/react-ui-theme";
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";
502
358
  var SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
503
359
  const client = useClient();
504
360
  const allUnsortedMembers = useMembers(spaceKey);
@@ -513,7 +369,7 @@ var SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
513
369
  var SpaceMemberListImpl = ({ members, onSelect }) => {
514
370
  const { t } = useTranslation5("os");
515
371
  const visibleMembers = members.filter((member) => member.identity);
516
- return visibleMembers.length > 0 ? /* @__PURE__ */ React8.createElement(List, {
372
+ return visibleMembers.length > 0 ? /* @__PURE__ */ React8.createElement(List2, {
517
373
  classNames: "flex flex-col gap-2",
518
374
  "data-testid": "space-members-list"
519
375
  }, visibleMembers.map((member) => {
@@ -527,132 +383,22 @@ var SpaceMemberListImpl = ({ members, onSelect }) => {
527
383
  role: "none",
528
384
  className: "grow flex items-center p-2"
529
385
  }, /* @__PURE__ */ React8.createElement("p", {
530
- className: mx6(descriptionText3, "text-center is-full mlb-2")
386
+ className: mx5(descriptionText3, "text-center is-full mlb-2")
531
387
  }, t("empty space members message")));
532
388
  };
533
389
 
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
-
644
390
  // packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
645
391
  import { X } from "@phosphor-icons/react";
646
392
  import { formatDistanceToNow } from "date-fns";
647
- import React12, { useCallback as useCallback2 } from "react";
393
+ import React10, { useCallback as useCallback2 } from "react";
648
394
  import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
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";
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";
651
397
  import { hexToEmoji } from "@dxos/util";
652
398
 
653
399
  // packages/sdk/shell/src/components/AuthCode.tsx
654
- import React11 from "react";
655
- import { mx as mx8 } from "@dxos/react-ui-theme";
400
+ import React9 from "react";
401
+ import { mx as mx6 } from "@dxos/react-ui-theme";
656
402
  var AuthCode = (props) => {
657
403
  const { code, large, classNames } = props;
658
404
  const l = code?.length ?? 0;
@@ -661,17 +407,17 @@ var AuthCode = (props) => {
661
407
  const handleCopy = () => {
662
408
  void navigator.clipboard.writeText(code ?? "");
663
409
  };
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),
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),
666
412
  onClick: handleCopy
667
- }, /* @__PURE__ */ React11.createElement("span", null, left), /* @__PURE__ */ React11.createElement("span", null, right));
413
+ }, /* @__PURE__ */ React9.createElement("span", null, left), /* @__PURE__ */ React9.createElement("span", null, right));
668
414
  };
669
415
 
670
416
  // packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
671
417
  var InvitationListItem = (props) => {
672
418
  const { invitation } = props;
673
419
  const invitationStatus = useInvitationStatus(invitation);
674
- return /* @__PURE__ */ React12.createElement(InvitationListItemImpl, {
420
+ return /* @__PURE__ */ React10.createElement(InvitationListItemImpl, {
675
421
  ...props,
676
422
  invitationStatus
677
423
  });
@@ -682,10 +428,10 @@ var avatarProps = {
682
428
  };
683
429
  var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
684
430
  const { tx } = useThemeContext3();
685
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("span", {
431
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement("span", {
686
432
  role: "none",
687
- className: mx9("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize7(avatarProps.size))
688
- }, /* @__PURE__ */ React12.createElement("span", {
433
+ className: mx7("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize4(avatarProps.size))
434
+ }, /* @__PURE__ */ React10.createElement("span", {
689
435
  role: "none",
690
436
  className: tx("avatar.ring", "avatar__ring", {
691
437
  ...avatarProps,
@@ -695,10 +441,10 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
695
441
  style: {
696
442
  animationDelay: "400ms"
697
443
  }
698
- })), /* @__PURE__ */ React12.createElement("span", {
444
+ })), /* @__PURE__ */ React10.createElement("span", {
699
445
  role: "none",
700
- className: mx9("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize7(avatarProps.size))
701
- }, /* @__PURE__ */ React12.createElement("span", {
446
+ className: mx7("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize4(avatarProps.size))
447
+ }, /* @__PURE__ */ React10.createElement("span", {
702
448
  role: "none",
703
449
  className: tx("avatar.ring", "avatar__ring", {
704
450
  ...avatarProps,
@@ -711,7 +457,7 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
711
457
  })));
712
458
  };
713
459
  var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }) => {
714
- const { t } = useTranslation8("os");
460
+ const { t } = useTranslation6("os");
715
461
  const { cancel, status: invitationStatus, invitationCode, authCode, type } = propsInvitationStatus;
716
462
  const isCancellable = !([
717
463
  Invitation.State.ERROR,
@@ -753,39 +499,39 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
753
499
  Invitation.State.SUCCESS
754
500
  ].includes(invitationStatus);
755
501
  const avatarStatus = avatarError ? "error" : avatarGreen ? "active" : "inactive";
756
- return /* @__PURE__ */ React12.createElement(ListItem3.Root, {
502
+ return /* @__PURE__ */ React10.createElement(ListItem2.Root, {
757
503
  id: invitationCode,
758
504
  ...props,
759
505
  classNames: [
760
506
  "flex gap-2 pis-3 pie-1 items-center relative",
761
507
  props.classNames
762
508
  ]
763
- }, /* @__PURE__ */ React12.createElement(ListItem3.Heading, {
509
+ }, /* @__PURE__ */ React10.createElement(ListItem2.Heading, {
764
510
  classNames: "sr-only"
765
- }, t(type === Invitation.Type.MULTIUSE ? "invite many list item label" : "invite one list item label")), type === Invitation.Type.MULTIUSE && /* @__PURE__ */ React12.createElement(AvatarStackEffect, {
511
+ }, t(type === Invitation.Type.MULTIUSE ? "invite many list item label" : "invite one list item label")), type === Invitation.Type.MULTIUSE && /* @__PURE__ */ React10.createElement(AvatarStackEffect, {
766
512
  status: avatarStatus,
767
513
  animation: avatarAnimation,
768
514
  reverseEffects
769
- }), /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(Avatar4.Root, {
515
+ }), /* @__PURE__ */ React10.createElement(Tooltip4.Root, null, /* @__PURE__ */ React10.createElement(Avatar2.Root, {
770
516
  ...avatarProps,
771
517
  animation: avatarAnimation,
772
518
  status: avatarStatus
773
- }, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
519
+ }, /* @__PURE__ */ React10.createElement(Tooltip4.Trigger, {
774
520
  asChild: true
775
- }, /* @__PURE__ */ React12.createElement(Avatar4.Frame, {
521
+ }, /* @__PURE__ */ React10.createElement(Avatar2.Frame, {
776
522
  tabIndex: 0,
777
523
  classNames: [
778
524
  focusRing,
779
525
  "relative rounded-full place-self-center"
780
526
  ]
781
- }, /* @__PURE__ */ React12.createElement(Avatar4.Fallback, {
527
+ }, /* @__PURE__ */ React10.createElement(Avatar2.Fallback, {
782
528
  text: hexToEmoji(invitationId)
783
- })))), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
529
+ })))), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
784
530
  side: "left",
785
531
  classNames: "z-[70]"
786
- }, t(type === Invitation.Type.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, {
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, {
787
533
  asChild: true
788
- }, /* @__PURE__ */ React12.createElement(Button7, {
534
+ }, /* @__PURE__ */ React10.createElement(Button4, {
789
535
  variant: "ghost",
790
536
  classNames: "grow justify-start font-medium",
791
537
  onClick: () => send({
@@ -793,63 +539,63 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
793
539
  invitation
794
540
  }),
795
541
  "data-testid": "show-qrcode"
796
- }, /* @__PURE__ */ React12.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React12.createElement(CopyButtonIconOnly, {
542
+ }, /* @__PURE__ */ React10.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React10.createElement(CopyButtonIconOnly, {
797
543
  variant: "ghost",
798
544
  value: invitationUrl
799
- })), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
545
+ })), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
800
546
  side: "left",
801
547
  classNames: "z-[70]"
802
- }, invitationHasLifetime && /* @__PURE__ */ React12.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React12.createElement(AuthCode, {
548
+ }, invitationHasLifetime && /* @__PURE__ */ React10.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React10.createElement(AuthCode, {
803
549
  code: authCode,
804
550
  classNames: "grow"
805
- }) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React12.createElement("span", {
551
+ }) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React10.createElement("span", {
806
552
  className: "pli-2 grow text-neutral-500"
807
- }, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */ React12.createElement("span", {
553
+ }, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */ React10.createElement("span", {
808
554
  className: "pli-2 grow text-neutral-500"
809
- }, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */ React12.createElement("span", {
555
+ }, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */ React10.createElement("span", {
810
556
  className: "pli-2 grow text-neutral-500"
811
- }, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */ React12.createElement("span", {
557
+ }, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */ React10.createElement("span", {
812
558
  className: "pli-2 grow text-neutral-500"
813
- }, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */ React12.createElement("span", {
559
+ }, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */ React10.createElement("span", {
814
560
  className: "pli-2 grow truncate"
815
- }, "User joined") : /* @__PURE__ */ React12.createElement("span", {
561
+ }, "User joined") : /* @__PURE__ */ React10.createElement("span", {
816
562
  className: "grow"
817
- }, " "), isCancellable ? /* @__PURE__ */ React12.createElement(Button7, {
563
+ }, " "), isCancellable ? /* @__PURE__ */ React10.createElement(Button4, {
818
564
  variant: "ghost",
819
565
  classNames: "flex gap-1 pli-0",
820
566
  onClick: cancel,
821
567
  "data-testid": "cancel-invitation"
822
- }, /* @__PURE__ */ React12.createElement("span", {
568
+ }, /* @__PURE__ */ React10.createElement("span", {
823
569
  className: "sr-only"
824
- }, t("cancel invitation label")), /* @__PURE__ */ React12.createElement(X, {
825
- className: getSize7(4)
826
- })) : /* @__PURE__ */ React12.createElement(Button7, {
570
+ }, t("cancel invitation label")), /* @__PURE__ */ React10.createElement(X, {
571
+ className: getSize4(4)
572
+ })) : /* @__PURE__ */ React10.createElement(Button4, {
827
573
  variant: "ghost",
828
574
  classNames: "flex gap-1 pli-0",
829
575
  onClick: handleClickRemove,
830
576
  "data-testid": "remove-invitation"
831
- }, /* @__PURE__ */ React12.createElement("span", {
577
+ }, /* @__PURE__ */ React10.createElement("span", {
832
578
  className: "sr-only"
833
- }, t("remove invitation label")), /* @__PURE__ */ React12.createElement(X, {
834
- className: getSize7(4)
579
+ }, t("remove invitation label")), /* @__PURE__ */ React10.createElement(X, {
580
+ className: getSize4(4)
835
581
  })));
836
582
  };
837
583
 
838
584
  // packages/sdk/shell/src/components/InvitationList/InvitationListContainer.tsx
839
- import React14, { useCallback as useCallback3 } from "react";
585
+ import React12, { useCallback as useCallback3 } from "react";
840
586
  import { useSpace, useSpaceInvitations } from "@dxos/react-client/echo";
841
587
 
842
588
  // packages/sdk/shell/src/components/InvitationList/InvitationList.tsx
843
- import React13 from "react";
589
+ import React11 from "react";
844
590
  import { List as List3 } from "@dxos/react-ui";
845
- import { mx as mx10 } from "@dxos/react-ui-theme";
591
+ import { mx as mx8 } from "@dxos/react-ui-theme";
846
592
  var InvitationList = ({ invitations, send, ...invitationProps }) => {
847
593
  const { className, InvitationListItem: Item = InvitationListItem } = invitationProps;
848
- return /* @__PURE__ */ React13.createElement(List3, {
849
- classNames: mx10("flex flex-col gap-2", className)
594
+ return /* @__PURE__ */ React11.createElement(List3, {
595
+ classNames: mx8("flex flex-col gap-2", className)
850
596
  }, invitations.map((invitation) => {
851
597
  const value = invitation.get().invitationId;
852
- return /* @__PURE__ */ React13.createElement(Item, {
598
+ return /* @__PURE__ */ React11.createElement(Item, {
853
599
  key: value,
854
600
  send,
855
601
  invitation,
@@ -867,7 +613,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
867
613
  }, [
868
614
  space
869
615
  ]);
870
- return /* @__PURE__ */ React14.createElement(InvitationList, {
616
+ return /* @__PURE__ */ React12.createElement(InvitationList, {
871
617
  invitations,
872
618
  onClickRemove,
873
619
  createInvitationUrl,
@@ -878,9 +624,9 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
878
624
  // packages/sdk/shell/src/components/Panel/Action.tsx
879
625
  import { CaretDown as CaretDown3, Check as Check3, Placeholder } from "@phosphor-icons/react";
880
626
  import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
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";
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";
884
630
  var defaultActions = {
885
631
  noopAction: {
886
632
  label: "No-op",
@@ -890,7 +636,7 @@ var defaultActions = {
890
636
  }
891
637
  }
892
638
  };
893
- var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
639
+ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
894
640
  const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, ...rest } = props;
895
641
  const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] = useControllableState3({
896
642
  prop: propsActiveAction,
@@ -898,11 +644,11 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
898
644
  defaultProp: defaultActiveAction
899
645
  });
900
646
  const activeAction = actions[activeActionKey2] ?? {};
901
- const { t } = useTranslation9("os");
902
- return /* @__PURE__ */ React15.createElement("div", {
647
+ const { t } = useTranslation7("os");
648
+ return /* @__PURE__ */ React13.createElement("div", {
903
649
  role: "none",
904
- className: mx11("mbs-2 flex gap-px items-center", isFull && "is-full")
905
- }, /* @__PURE__ */ React15.createElement(Button8, {
650
+ className: mx9("mbs-2 flex gap-px items-center", isFull && "is-full")
651
+ }, /* @__PURE__ */ React13.createElement(Button5, {
906
652
  ...rest,
907
653
  classNames: [
908
654
  "bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",
@@ -911,48 +657,48 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
911
657
  ref: forwardedRef,
912
658
  variant,
913
659
  onClick: activeAction.onClick
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, {
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, {
917
663
  asChild: true
918
- }, /* @__PURE__ */ React15.createElement(Button8, {
664
+ }, /* @__PURE__ */ React13.createElement(Button5, {
919
665
  classNames: [
920
666
  "bs-11 flex-none rounded-is-none",
921
667
  classNames
922
668
  ]
923
- }, /* @__PURE__ */ React15.createElement("span", {
669
+ }, /* @__PURE__ */ React13.createElement("span", {
924
670
  className: "sr-only"
925
- }, t("invite options label")), /* @__PURE__ */ React15.createElement(CaretDown3, {
926
- className: getSize8(4)
927
- }))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
928
- return /* @__PURE__ */ React15.createElement(DropdownMenu3.CheckboxItem, {
671
+ }, 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, {
929
675
  key: id,
930
676
  "aria-labelledby": `${id}__label`,
931
677
  "aria-describedby": `${id}__description`,
932
678
  checked: activeActionKey2 === id,
933
679
  onCheckedChange: (checked) => checked && setActiveAction(id),
934
680
  classNames: "gap-2"
935
- }, action.icon && /* @__PURE__ */ React15.createElement(action.icon, {
936
- className: getSize8(5)
937
- }), /* @__PURE__ */ React15.createElement("div", {
681
+ }, action.icon && /* @__PURE__ */ React13.createElement(action.icon, {
682
+ className: getSize5(5)
683
+ }), /* @__PURE__ */ React13.createElement("div", {
938
684
  role: "none",
939
685
  className: "flex-1 min-is-0 space-b-1"
940
- }, /* @__PURE__ */ React15.createElement("p", {
686
+ }, /* @__PURE__ */ React13.createElement("p", {
941
687
  id: `${id}__label`
942
- }, action.label), action.description && /* @__PURE__ */ React15.createElement("p", {
688
+ }, action.label), action.description && /* @__PURE__ */ React13.createElement("p", {
943
689
  id: `${id}__description`,
944
- className: descriptionText5
945
- }, action.description)), /* @__PURE__ */ React15.createElement(DropdownMenu3.ItemIndicator, {
690
+ className: descriptionText4
691
+ }, action.description)), /* @__PURE__ */ React13.createElement(DropdownMenu2.ItemIndicator, {
946
692
  asChild: true
947
- }, /* @__PURE__ */ React15.createElement(Check3, {
693
+ }, /* @__PURE__ */ React13.createElement(Check3, {
948
694
  weight: "bold",
949
- className: getSize8(4)
695
+ className: getSize5(4)
950
696
  })));
951
- })), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null))));
697
+ })), /* @__PURE__ */ React13.createElement(DropdownMenu2.Arrow, null))));
952
698
  });
953
- var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
699
+ var Action = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
954
700
  const { children, classNames, variant, isFull = true, ...rest } = props;
955
- return /* @__PURE__ */ React15.createElement(Button8, {
701
+ return /* @__PURE__ */ React13.createElement(Button5, {
956
702
  ...rest,
957
703
  classNames: [
958
704
  isFull && "is-full",
@@ -965,49 +711,49 @@ var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
965
711
  });
966
712
 
967
713
  // packages/sdk/shell/src/components/Panel/Actions.tsx
968
- import React16, { forwardRef as forwardRef4 } from "react";
969
- import { mx as mx12 } from "@dxos/react-ui-theme";
970
- var Actions = /* @__PURE__ */ forwardRef4(({ classNames, children, ...props }, forwardedRef) => {
971
- return /* @__PURE__ */ React16.createElement("div", {
714
+ 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", {
972
718
  ...props,
973
- className: mx12("flex flex-col gap-2 mbs-2", Array.isArray(children) && children.length > 1 ? "justify-between" : "justify-center", classNames),
719
+ className: mx10("flex flex-col gap-2 mbs-2", Array.isArray(children) && children.length > 1 ? "justify-between" : "justify-center", classNames),
974
720
  ref: forwardedRef
975
721
  }, children);
976
722
  });
977
723
 
978
724
  // packages/sdk/shell/src/components/Panel/CloseButton.tsx
979
725
  import { X as X2 } from "@phosphor-icons/react";
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";
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";
983
729
  var CloseButton = ({ onDone, ...props }) => {
984
- const { t } = useTranslation10("os");
985
- return /* @__PURE__ */ React17.createElement(Button9, {
730
+ const { t } = useTranslation8("os");
731
+ return /* @__PURE__ */ React15.createElement(Button6, {
986
732
  variant: "ghost",
987
- classNames: mx13("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
733
+ classNames: mx11("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
988
734
  onClick: () => onDone?.(),
989
735
  ...props
990
- }, /* @__PURE__ */ React17.createElement(X2, {
736
+ }, /* @__PURE__ */ React15.createElement(X2, {
991
737
  weight: "bold",
992
- className: getSize9(4)
993
- }), /* @__PURE__ */ React17.createElement("span", {
738
+ className: getSize6(4)
739
+ }), /* @__PURE__ */ React15.createElement("span", {
994
740
  className: "sr-only"
995
741
  }, t("exit label")));
996
742
  };
997
743
 
998
744
  // packages/sdk/shell/src/components/Panel/Emoji.tsx
999
- import React18 from "react";
1000
- import { mx as mx14, getSize as getSize10 } from "@dxos/react-ui-theme";
745
+ import React16 from "react";
746
+ import { mx as mx12, getSize as getSize7 } from "@dxos/react-ui-theme";
1001
747
  var Emoji = ({ text, className }) => {
1002
748
  const size = 14;
1003
- return /* @__PURE__ */ React18.createElement("div", {
749
+ return /* @__PURE__ */ React16.createElement("div", {
1004
750
  role: "none",
1005
- className: mx14(getSize10(size), "rounded relative pointer-events-none", className)
1006
- }, /* @__PURE__ */ React18.createElement("svg", {
751
+ className: mx12(getSize7(size), "rounded relative pointer-events-none", className)
752
+ }, /* @__PURE__ */ React16.createElement("svg", {
1007
753
  viewBox: `0 0 ${size * 4} ${size * 4}`,
1008
754
  width: size * 4,
1009
755
  height: size * 4
1010
- }, /* @__PURE__ */ React18.createElement("text", {
756
+ }, /* @__PURE__ */ React16.createElement("text", {
1011
757
  x: "50%",
1012
758
  y: "50%",
1013
759
  textAnchor: "middle",
@@ -1018,57 +764,57 @@ var Emoji = ({ text, className }) => {
1018
764
  };
1019
765
  var Centered = (props) => {
1020
766
  const { children } = props;
1021
- return /* @__PURE__ */ React18.createElement("div", {
767
+ return /* @__PURE__ */ React16.createElement("div", {
1022
768
  role: "none",
1023
769
  className: "absolute inset-0 flex items-center justify-center"
1024
770
  }, children);
1025
771
  };
1026
772
 
1027
773
  // packages/sdk/shell/src/components/Panel/Heading.tsx
1028
- import React19, { forwardRef as forwardRef5 } from "react";
1029
- import { descriptionText as descriptionText6, mx as mx15 } from "@dxos/react-ui-theme";
1030
- var Heading = /* @__PURE__ */ forwardRef5(({ titleId, title, titleSrOnly, children, corner }, forwardedRef) => {
1031
- return /* @__PURE__ */ React19.createElement("div", {
774
+ 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", {
1032
778
  role: "none",
1033
779
  className: "pbe-2 relative",
1034
780
  ref: forwardedRef
1035
- }, corner, /* @__PURE__ */ React19.createElement("h1", {
781
+ }, corner, /* @__PURE__ */ React17.createElement("h1", {
1036
782
  ...!titleSrOnly && {
1037
783
  id: titleId
1038
784
  },
1039
- className: mx15(descriptionText6, "text-center mlb-2", titleSrOnly && "invisible")
1040
- }, title), titleSrOnly && /* @__PURE__ */ React19.createElement("span", {
785
+ className: mx13(descriptionText5, "text-center mlb-2", titleSrOnly && "invisible")
786
+ }, title), titleSrOnly && /* @__PURE__ */ React17.createElement("span", {
1041
787
  id: titleId
1042
788
  }, title), children);
1043
789
  });
1044
790
 
1045
791
  // packages/sdk/shell/src/components/Panel/Label.tsx
1046
- import React20 from "react";
1047
- import { descriptionText as descriptionText7, mx as mx16 } from "@dxos/react-ui-theme";
792
+ import React18 from "react";
793
+ import { descriptionText as descriptionText6, mx as mx14 } from "@dxos/react-ui-theme";
1048
794
  var Label = (props) => {
1049
795
  const { children } = props;
1050
- return /* @__PURE__ */ React20.createElement("span", {
1051
- className: mx16(descriptionText7, "text-center mli-6 whitespace-normal")
796
+ return /* @__PURE__ */ React18.createElement("span", {
797
+ className: mx14(descriptionText6, "text-center mli-6 whitespace-normal")
1052
798
  }, children);
1053
799
  };
1054
800
 
1055
801
  // packages/sdk/shell/src/components/Panel/Input.tsx
1056
- import React21 from "react";
802
+ import React19 from "react";
1057
803
  import { Input as UiInput } from "@dxos/react-ui";
1058
804
  var Input = ({ validationMessage, label, ...props }) => {
1059
- return /* @__PURE__ */ React21.createElement(UiInput.Root, null, /* @__PURE__ */ React21.createElement(UiInput.Label, null, label), /* @__PURE__ */ React21.createElement(UiInput.TextInput, {
805
+ return /* @__PURE__ */ React19.createElement(UiInput.Root, null, /* @__PURE__ */ React19.createElement(UiInput.Label, null, label), /* @__PURE__ */ React19.createElement(UiInput.TextInput, {
1060
806
  ...props,
1061
807
  classNames: "plb-3 mbs-2 text-center"
1062
- }), /* @__PURE__ */ React21.createElement(UiInput.DescriptionAndValidation, null, validationMessage && /* @__PURE__ */ React21.createElement(UiInput.Validation, null, validationMessage)));
808
+ }), /* @__PURE__ */ React19.createElement(UiInput.DescriptionAndValidation, null, validationMessage && /* @__PURE__ */ React19.createElement(UiInput.Validation, null, validationMessage)));
1063
809
  };
1064
810
 
1065
811
  // packages/sdk/shell/src/components/Panel/StepHeading.tsx
1066
- import React22, { forwardRef as forwardRef6 } from "react";
1067
- import { mx as mx17 } from "@dxos/react-ui-theme";
1068
- var StepHeading = /* @__PURE__ */ forwardRef6(({ children, className, ...props }, forwardedRef) => {
1069
- return /* @__PURE__ */ React22.createElement("h2", {
812
+ 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", {
1070
816
  ...props,
1071
- className: mx17("font-normal text-sm mbe-4 mli-1 text-center", className),
817
+ className: mx15("font-normal text-sm mbe-4 mli-1 text-center", className),
1072
818
  ref: forwardedRef
1073
819
  }, children);
1074
820
  });
@@ -1077,9 +823,9 @@ var StepHeading = /* @__PURE__ */ forwardRef6(({ children, className, ...props }
1077
823
  import { useFocusFinders } from "@fluentui/react-tabster";
1078
824
  import { createContextScope } from "@radix-ui/react-context";
1079
825
  import { useControllableState as useControllableState4 } from "@radix-ui/react-use-controllable-state";
1080
- import React23, { forwardRef as forwardRef7, useEffect } from "react";
826
+ import React21, { forwardRef as forwardRef6, useEffect } from "react";
1081
827
  import { useForwardedRef } from "@dxos/react-ui";
1082
- import { mx as mx18 } from "@dxos/react-ui-theme";
828
+ import { mx as mx16 } from "@dxos/react-ui-theme";
1083
829
  var VIEWPORT_NAME = "Viewport";
1084
830
  var VIEWS_NAME = "ViewportViews";
1085
831
  var VIEW_NAME = "ViewportView";
@@ -1091,16 +837,16 @@ var ViewportRoot = ({ __viewportScope, classNames, children, defaultActiveView,
1091
837
  defaultProp: defaultActiveView,
1092
838
  onChange: onActiveViewChange
1093
839
  });
1094
- return /* @__PURE__ */ React23.createElement(ViewportProvider, {
840
+ return /* @__PURE__ */ React21.createElement(ViewportProvider, {
1095
841
  focusManaged,
1096
842
  activeView,
1097
843
  setActiveView,
1098
844
  scope: __viewportScope
1099
- }, /* @__PURE__ */ React23.createElement("div", {
845
+ }, /* @__PURE__ */ React21.createElement("div", {
1100
846
  role: "region",
1101
847
  "aria-live": "polite",
1102
848
  ...props,
1103
- className: mx18("is-full overflow-hidden", classNames)
849
+ className: mx16("is-full overflow-hidden", classNames)
1104
850
  }, children));
1105
851
  };
1106
852
  ViewportRoot.displayName = VIEWPORT_NAME;
@@ -1108,15 +854,15 @@ var ViewportViews = ({ classNames, children, ...props }) => {
1108
854
  const size = {
1109
855
  inlineSize: `${Math.ceil(children.length) * 100}%`
1110
856
  };
1111
- return /* @__PURE__ */ React23.createElement("div", {
857
+ return /* @__PURE__ */ React21.createElement("div", {
1112
858
  role: "none",
1113
859
  style: size,
1114
860
  ...props,
1115
- className: mx18("flex", classNames)
861
+ className: mx16("flex", classNames)
1116
862
  }, children);
1117
863
  };
1118
864
  ViewportViews.displayName = VIEWS_NAME;
1119
- var ViewportView = /* @__PURE__ */ forwardRef7(({ __viewportScope, classNames, children, id, ...props }, forwardedRef) => {
865
+ var ViewportView = /* @__PURE__ */ forwardRef6(({ __viewportScope, classNames, children, id, ...props }, forwardedRef) => {
1120
866
  const { activeView, focusManaged } = useViewportContext(VIEW_NAME, __viewportScope);
1121
867
  const isActive = id === activeView;
1122
868
  const ref = useForwardedRef(forwardedRef);
@@ -1130,12 +876,12 @@ var ViewportView = /* @__PURE__ */ forwardRef7(({ __viewportScope, classNames, c
1130
876
  ref.current,
1131
877
  isActive
1132
878
  ]);
1133
- return /* @__PURE__ */ React23.createElement("section", {
879
+ return /* @__PURE__ */ React21.createElement("section", {
1134
880
  ...props,
1135
881
  ...!isActive && {
1136
882
  "aria-hidden": true
1137
883
  },
1138
- className: mx18("min-is-0 flex-1 flex flex-col", isActive ? "order-2" : "order-4 invisible", classNames),
884
+ className: mx16("min-is-0 flex-1 flex flex-col", isActive ? "order-2" : "order-4 invisible", classNames),
1139
885
  ref
1140
886
  }, children);
1141
887
  });
@@ -1147,44 +893,41 @@ var Viewport = {
1147
893
  };
1148
894
 
1149
895
  // packages/sdk/shell/src/components/SpaceListItem.tsx
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";
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";
1153
899
  import { humanize, keyToEmoji } from "@dxos/util";
1154
- var SpaceListItem = /* @__PURE__ */ forwardRef8(({ space, onClick }, ref) => {
900
+ var SpaceListItem = /* @__PURE__ */ forwardRef7(({ space, onClick }, ref) => {
1155
901
  const fallbackValue = keyToEmoji(space.key);
1156
- const labelId = useId4("identityListItem__label");
902
+ const labelId = useId3("identityListItem__label");
1157
903
  const displayName = space.properties.name ?? humanize(space.key.toHex());
1158
- return /* @__PURE__ */ React24.createElement("li", {
1159
- className: mx19("flex gap-2 items-center mbe-2", onClick && "cursor-pointer"),
904
+ return /* @__PURE__ */ React22.createElement("li", {
905
+ className: mx17("flex gap-2 items-center mbe-2", onClick && "cursor-pointer"),
1160
906
  onClick: () => onClick?.(),
1161
907
  ref,
1162
908
  "data-testid": "space-list-item"
1163
- }, /* @__PURE__ */ React24.createElement(Avatar5.Root, {
909
+ }, /* @__PURE__ */ React22.createElement(Avatar3.Root, {
1164
910
  labelId
1165
- }, /* @__PURE__ */ React24.createElement(Avatar5.Frame, null, /* @__PURE__ */ React24.createElement(Avatar5.Fallback, {
911
+ }, /* @__PURE__ */ React22.createElement(Avatar3.Frame, null, /* @__PURE__ */ React22.createElement(Avatar3.Fallback, {
1166
912
  text: fallbackValue
1167
- })), /* @__PURE__ */ React24.createElement(Avatar5.Label, {
913
+ })), /* @__PURE__ */ React22.createElement(Avatar3.Label, {
1168
914
  classNames: "text-sm truncate"
1169
915
  }, displayName)));
1170
916
  });
1171
917
 
1172
918
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
1173
919
  import React42 from "react";
1174
- import { Dialog, useId as useId10 } from "@dxos/react-ui";
920
+ import { Dialog, useId as useId9 } from "@dxos/react-ui";
1175
921
 
1176
922
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
1177
- import { CopySimple, Plugs, PlugsConnected } from "@phosphor-icons/react";
1178
- import React29, { useEffect as useEffect3, useMemo as useMemo3, useState as useState8 } from "react";
923
+ import React29, { useEffect as useEffect3, useMemo as useMemo3 } from "react";
1179
924
  import { generateName as generateName3 } from "@dxos/display-name";
1180
925
  import { log as log6 } from "@dxos/log";
1181
926
  import { useClient as useClient3 } from "@dxos/react-client";
1182
927
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
1183
928
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
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";
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";
1188
931
 
1189
932
  // packages/sdk/shell/src/panels/IdentityPanel/identityMachine.ts
1190
933
  import { useMachine } from "@xstate/react";
@@ -1210,6 +953,11 @@ var identityMachine = createMachine({
1210
953
  target: "managingDeviceInvitation",
1211
954
  actions: "log"
1212
955
  },
956
+ {
957
+ cond: "initiallyManagingProfile",
958
+ target: "managingProfile",
959
+ actions: "log"
960
+ },
1213
961
  {
1214
962
  target: "choosingAction",
1215
963
  actions: "log"
@@ -1218,6 +966,34 @@ var identityMachine = createMachine({
1218
966
  },
1219
967
  choosingAction: {},
1220
968
  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
+ },
1221
997
  confirmingResetStorage: {},
1222
998
  confirmingJoinNewIdentity: {}
1223
999
  },
@@ -1243,6 +1019,14 @@ var identityMachine = createMachine({
1243
1019
  "log"
1244
1020
  ]
1245
1021
  },
1022
+ chooseDevices: {
1023
+ target: ".managingDevices",
1024
+ actions: "log"
1025
+ },
1026
+ chooseProfile: {
1027
+ target: ".managingProfile",
1028
+ actions: "log"
1029
+ },
1246
1030
  chooseJoinNewIdentity: {
1247
1031
  target: ".confirmingJoinNewIdentity",
1248
1032
  actions: "log"
@@ -1250,11 +1034,16 @@ var identityMachine = createMachine({
1250
1034
  chooseResetStorage: {
1251
1035
  target: ".confirmingResetStorage",
1252
1036
  actions: "log"
1037
+ },
1038
+ chooseAgent: {
1039
+ target: ".managingAgent",
1040
+ actions: "log"
1253
1041
  }
1254
1042
  }
1255
1043
  }, {
1256
1044
  guards: {
1257
- initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation"
1045
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation",
1046
+ initiallyManagingProfile: ({ initialDisposition }, _event) => initialDisposition === "manage-profile"
1258
1047
  },
1259
1048
  actions: {
1260
1049
  setIdentity: assign({
@@ -1272,7 +1061,7 @@ var identityMachine = createMachine({
1272
1061
  context
1273
1062
  }, {
1274
1063
  F: __dxlog_file,
1275
- L: 96,
1064
+ L: 126,
1276
1065
  S: void 0,
1277
1066
  C: (f, a) => f(...a)
1278
1067
  });
@@ -1293,12 +1082,69 @@ var useIdentityMachine = (client, options) => {
1293
1082
  });
1294
1083
  };
1295
1084
 
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
+
1296
1139
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1140
+ import { CaretRight, Devices, Plus, Power, UserGear, HardDrive, Intersect } from "@phosphor-icons/react";
1297
1141
  import React25, { useCallback as useCallback4 } from "react";
1298
1142
  import { log as log2 } from "@dxos/log";
1299
1143
  import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
1300
1144
  import { useHaloInvitations } from "@dxos/react-client/halo";
1301
1145
  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";
1302
1148
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx";
1303
1149
  var IdentityActionChooser = (props) => {
1304
1150
  const { send } = props;
@@ -1313,15 +1159,19 @@ var IdentityActionChooser = (props) => {
1313
1159
  authCode: invitation.authCode
1314
1160
  }), void 0, {
1315
1161
  F: __dxlog_file2,
1316
- L: 25,
1162
+ L: 28,
1317
1163
  S: void 0,
1318
1164
  C: (f, a) => f(...a)
1319
1165
  });
1320
1166
  }
1321
1167
  }, []);
1322
- const createInvitation = () => {
1168
+ const createInvitation = (e) => {
1169
+ const testing = e.altKey && e.shiftKey;
1323
1170
  invitations.forEach((invitation2) => invitation2.cancel());
1324
- const invitation = client.halo.share();
1171
+ const invitation = client.halo.share(testing ? {
1172
+ type: Invitation2.Type.MULTIUSE,
1173
+ authMethod: Invitation2.AuthMethod.NONE
1174
+ } : void 0);
1325
1175
  if (true) {
1326
1176
  invitation.subscribe(onInvitationEvent);
1327
1177
  }
@@ -1332,45 +1182,216 @@ var IdentityActionChooser = (props) => {
1332
1182
  };
1333
1183
  return /* @__PURE__ */ React25.createElement(IdentityActionChooserImpl, {
1334
1184
  ...props,
1335
- onCreateInvitationClick: createInvitation,
1185
+ onCreateInvitationClick: (e) => createInvitation(e),
1336
1186
  agentHostingEnabled: !!agentHostingProviderClient
1337
1187
  });
1338
1188
  };
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?.({
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?.({
1344
1239
  type: "chooseJoinNewIdentity"
1345
1240
  }),
1346
- onClickReset: () => send?.({
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?.({
1347
1265
  type: "chooseResetStorage"
1348
- })
1349
- }), agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, {
1350
- agentActive,
1351
- agentStatus,
1352
- onAgentDestroy,
1353
- onAgentCreate
1354
- }));
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
+ })))));
1355
1276
  };
1356
1277
 
1357
1278
  // packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
1358
- import React26, { useState as useState5 } from "react";
1279
+ import React26, { useState as useState4 } from "react";
1359
1280
  import { log as log3 } from "@dxos/log";
1360
- import { useTranslation as useTranslation11 } from "@dxos/react-ui";
1281
+ import { useTranslation as useTranslation12 } from "@dxos/react-ui";
1361
1282
  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
+ };
1362
1383
 
1363
1384
  // packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
1364
- import { useCallback as useCallback5, useEffect as useEffect2, useState as useState6 } from "react";
1385
+ import { useCallback as useCallback5, useEffect as useEffect2, useState as useState5 } from "react";
1365
1386
  import { invariant } from "@dxos/invariant";
1366
1387
  import { log as log4 } from "@dxos/log";
1367
1388
  import { useAgentHostingProviderClient as useAgentHostingProviderClient2 } from "@dxos/react-client";
1368
1389
  import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
1369
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
1390
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
1370
1391
  var useAgentHandlers = ({ client, invitations, identity }) => {
1371
- const [validationMessage, setValidationMessage] = useState6("");
1372
- const [agentStatus, setAgentStatus] = useState6("");
1373
- const [agentActive, setAgentActive] = useState6(false);
1392
+ const [validationMessage, setValidationMessage] = useState5("");
1393
+ const [agentStatus, setAgentStatus] = useState5("");
1394
+ const [agentActive, setAgentActive] = useState5(false);
1374
1395
  const agentHostingProviderClient = useAgentHostingProviderClient2(client.config);
1375
1396
  useEffect2(() => {
1376
1397
  const fetchAgentStatus = async () => {
@@ -1396,13 +1417,13 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1396
1417
  invitationCode,
1397
1418
  authCode: invitation.authCode
1398
1419
  }), void 0, {
1399
- F: __dxlog_file3,
1420
+ F: __dxlog_file4,
1400
1421
  L: 50,
1401
1422
  S: void 0,
1402
1423
  C: (f, a) => f(...a)
1403
1424
  });
1404
1425
  invariant(identity, "Identity not found", {
1405
- F: __dxlog_file3,
1426
+ F: __dxlog_file4,
1406
1427
  L: 51,
1407
1428
  S: void 0,
1408
1429
  A: [
@@ -1433,7 +1454,7 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1433
1454
  const onAgentDestroy = async () => {
1434
1455
  const identity2 = client.halo.identity.get();
1435
1456
  invariant(identity2, "Identity not found", {
1436
- F: __dxlog_file3,
1457
+ F: __dxlog_file4,
1437
1458
  L: 77,
1438
1459
  S: void 0,
1439
1460
  A: [
@@ -1464,8 +1485,8 @@ import { Check as Check4, X as X3 } from "@phosphor-icons/react";
1464
1485
  import React27, { useMemo as useMemo2 } from "react";
1465
1486
  import { QR } from "react-qr-rounded";
1466
1487
  import { Invitation as Invitation5 } from "@dxos/react-client/invitations";
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";
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";
1469
1490
  import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
1470
1491
 
1471
1492
  // packages/sdk/shell/src/util/invitationStatusValue.ts
@@ -1517,8 +1538,8 @@ var InvitationManagerView = ({ children, ...props }) => {
1517
1538
  }, children);
1518
1539
  };
1519
1540
  var InvitationManager = ({ invitationUrl, active, send, status, type, authCode, id = "0" }) => {
1520
- const { t } = useTranslation12("os");
1521
- const qrLabel = useId5("invitation-manager__qr-code");
1541
+ const { t } = useTranslation13("os");
1542
+ const qrLabel = useId4("invitation-manager__qr-code");
1522
1543
  const statusValue = type === Invitation5.Type.MULTIUSE ? 0 : invitationStatusValue.get(status) ?? 0;
1523
1544
  const showAuthCode = statusValue === 3;
1524
1545
  const emoji = hexToEmoji3(id);
@@ -1545,12 +1566,12 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1545
1566
  className: "text-sm mlb-1 font-normal text-center"
1546
1567
  }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1547
1568
  role: "none",
1548
- className: mx20(descriptionText8, "is-full max-is-[14rem] relative")
1569
+ className: mx18(descriptionText7, "is-full max-is-[14rem] relative")
1549
1570
  }, /* @__PURE__ */ React27.createElement(QR, {
1550
1571
  rounding: 100,
1551
1572
  backgroundColor: "transparent",
1552
1573
  color: "currentColor",
1553
- className: mx20("is-full bs-full p-2", showAuthCode && "invisible"),
1574
+ className: mx18("is-full bs-full p-2", showAuthCode && "invisible"),
1554
1575
  "aria-labelledby": qrLabel,
1555
1576
  errorCorrectionLevel: "Q",
1556
1577
  cutout: true
@@ -1573,9 +1594,9 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1573
1594
  })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1574
1595
  id: "showing final"
1575
1596
  }, statusValue > 0 ? /* @__PURE__ */ React27.createElement(Check4, {
1576
- className: mx20("m-1.5", getSize11(6))
1597
+ className: mx18("m-1.5", getSize9(6))
1577
1598
  }) : /* @__PURE__ */ React27.createElement(X3, {
1578
- className: mx20("m-1.5", getSize11(6))
1599
+ className: mx18("m-1.5", getSize9(6))
1579
1600
  })))), /* @__PURE__ */ React27.createElement(Actions, {
1580
1601
  classNames: "mbs-4"
1581
1602
  }, /* @__PURE__ */ React27.createElement(Action, {
@@ -1588,20 +1609,20 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1588
1609
 
1589
1610
  // packages/sdk/shell/src/steps/ConfirmReset.tsx
1590
1611
  import { Warning } from "@phosphor-icons/react";
1591
- import React28, { useState as useState7 } from "react";
1612
+ import React28, { useState as useState6 } from "react";
1592
1613
  import { log as log5 } from "@dxos/log";
1593
- import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1594
- import { getSize as getSize12, mx as mx21 } from "@dxos/react-ui-theme";
1595
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
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";
1596
1617
  var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1597
- const { t } = useTranslation13("os");
1598
- const [validationMessage, setValidationMessage] = useState7("");
1599
- const [pending, setPending] = useState7(false);
1618
+ const { t } = useTranslation14("os");
1619
+ const [validationMessage, setValidationMessage] = useState6("");
1620
+ const [pending, setPending] = useState6(false);
1600
1621
  const processReset = async () => {
1601
1622
  setPending(true);
1602
1623
  return onConfirm?.().then(() => setPending(false), (error) => {
1603
1624
  log5.catch(error, void 0, {
1604
- F: __dxlog_file4,
1625
+ F: __dxlog_file5,
1605
1626
  L: 38,
1606
1627
  S: void 0,
1607
1628
  C: (f, a) => f(...a)
@@ -1620,9 +1641,9 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1620
1641
  });
1621
1642
  };
1622
1643
  var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCancel, mode }) => {
1623
- const { t } = useTranslation13("os");
1644
+ const { t } = useTranslation14("os");
1624
1645
  const confirmationValue = t("confirmation value");
1625
- const [inputValue, setInputValue] = useState7("");
1646
+ const [inputValue, setInputValue] = useState6("");
1626
1647
  const testIdAffix = mode === "join new identity" ? "join-new-identity" : "reset-storage";
1627
1648
  return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("div", {
1628
1649
  role: "none",
@@ -1630,7 +1651,7 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
1630
1651
  }, /* @__PURE__ */ React28.createElement(Message.Root, {
1631
1652
  valence: "error"
1632
1653
  }, /* @__PURE__ */ React28.createElement(Message.Title, null, /* @__PURE__ */ React28.createElement(Warning, {
1633
- className: mx21(getSize12(6), "inline mie-2")
1654
+ className: mx19(getSize10(6), "inline mie-2")
1634
1655
  }), t("sign out chooser title")), /* @__PURE__ */ React28.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React28.createElement(Input, {
1635
1656
  validationMessage,
1636
1657
  label: /* @__PURE__ */ React28.createElement(StepHeading, {
@@ -1655,118 +1676,37 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
1655
1676
  };
1656
1677
 
1657
1678
  // 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";
1679
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1659
1680
  var viewStyles = "pbs-1 pbe-3 pli-3";
1660
- var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
1661
- var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
1662
- var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
1663
- const fallbackValue = keyToFallback3(identity.identityKey);
1664
- const { t } = useTranslation14("os");
1665
- const [displayName, setDisplayName] = useState8(identity.profile?.displayName ?? "");
1666
- const [emoji, setEmoji] = useState8(getEmojiValue(identity));
1667
- const [hue, setHue] = useState8(getHueValue(identity));
1668
- const { textValue, setTextValue } = useClipboardContext();
1669
- const identityHex = identity.identityKey.toHex();
1670
- const copied = textValue === identityHex;
1671
- const handleUpdateProfile = async () => {
1672
- const nextProfile = {
1673
- ...displayName && {
1674
- displayName
1675
- },
1676
- ...(emoji || hue) && {
1677
- data: {
1678
- ...emoji && {
1679
- emoji
1680
- },
1681
- ...hue && {
1682
- hue
1683
- }
1684
- }
1685
- }
1686
- };
1687
- return onUpdateProfile?.(nextProfile);
1688
- };
1689
- useEffect3(() => {
1690
- void handleUpdateProfile();
1691
- }, [
1692
- emoji,
1693
- hue
1694
- ]);
1695
- const isConnected = connectionState === ConnectionState.ONLINE;
1681
+ var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1682
+ const fallbackValue = keyToFallback2(identity.identityKey);
1696
1683
  return /* @__PURE__ */ React29.createElement(Heading, {
1697
1684
  titleId,
1698
1685
  title,
1699
1686
  corner: /* @__PURE__ */ React29.createElement(CloseButton, {
1700
1687
  onDone
1701
1688
  })
1702
- }, /* @__PURE__ */ React29.createElement(Avatar6.Root, {
1703
- size: 16,
1689
+ }, /* @__PURE__ */ React29.createElement(Avatar4.Root, {
1690
+ size: 12,
1704
1691
  variant: "circle",
1705
- status: isConnected ? "active" : "error",
1706
- hue: hue || fallbackValue.hue
1707
- }, /* @__PURE__ */ React29.createElement(Toolbar3.Root, {
1708
- classNames: "grid grid-cols-[1fr_var(--rail-action)_min-content_var(--rail-action)_1fr] items-center gap-2"
1709
- }, /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1710
- asChild: true
1711
- }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1712
- classNames: "bs-[--rail-action] is-[--rail-action] justify-self-end",
1713
- onClick: () => onChangeConnectionState?.(isConnected ? ConnectionState.OFFLINE : ConnectionState.ONLINE)
1714
- }, /* @__PURE__ */ React29.createElement("span", {
1715
- className: "sr-only"
1716
- }, t(isConnected ? "disconnect label" : "connect label")), isConnected ? /* @__PURE__ */ React29.createElement(PlugsConnected, {
1717
- className: getSize13(5)
1718
- }) : /* @__PURE__ */ React29.createElement(Plugs, {
1719
- className: getSize13(5)
1720
- }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1721
- side: "bottom",
1722
- classNames: "z-50"
1723
- }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), /* @__PURE__ */ React29.createElement(EmojiPickerToolbarButton, {
1724
- emoji,
1725
- onChangeEmoji: setEmoji,
1726
- classNames: "bs-[--rail-action]"
1727
- }), /* @__PURE__ */ React29.createElement(Avatar6.Frame, {
1728
- classNames: "relative z-[2] -mli-4 chromatic-ignore"
1729
- }, /* @__PURE__ */ React29.createElement(Avatar6.Fallback, {
1730
- text: emoji || fallbackValue.emoji
1731
- })), /* @__PURE__ */ React29.createElement(HuePickerToolbarButton, {
1732
- hue,
1733
- onChangeHue: setHue,
1734
- classNames: "bs-[--rail-action]"
1735
- }), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1736
- asChild: true
1737
- }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1738
- classNames: "bs-[--rail-action] justify-self-start",
1739
- "data-testid": "update-profile-form-copy-key",
1740
- onClick: () => setTextValue(identityHex)
1741
- }, /* @__PURE__ */ React29.createElement("span", {
1742
- className: "sr-only"
1743
- }, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React29.createElement(CopySimple, {
1744
- className: getSize13(5)
1745
- }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1746
- side: "bottom",
1747
- classNames: "z-50"
1748
- }, t(copied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null))))), /* @__PURE__ */ React29.createElement(Avatar6.Label, {
1749
- classNames: "sr-only",
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",
1750
1700
  "data-testid": "identityHeading.displayName"
1751
- }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex())), /* @__PURE__ */ React29.createElement(Input2.Root, null, /* @__PURE__ */ React29.createElement(Input2.Label, {
1752
- srOnly: true
1753
- }, t("display name input label")), /* @__PURE__ */ React29.createElement(Input2.TextInput, {
1754
- variant: "subdued",
1755
- "data-testid": "display-name-input",
1756
- placeholder: t("display name input placeholder"),
1757
- classNames: "mbs-2 text-center font-light text-xl",
1758
- value: displayName,
1759
- onChange: ({ target: { value } }) => {
1760
- setDisplayName(value);
1761
- },
1762
- onBlur: handleUpdateProfile
1763
- }))));
1701
+ }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex()))));
1764
1702
  };
1765
1703
  var IdentityPanelImpl = (props) => {
1766
- const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
1767
- const { t } = useTranslation14("os");
1704
+ const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1705
+ const { t } = useTranslation15("os");
1768
1706
  const title = useMemo3(() => {
1769
1707
  switch (activeView) {
1708
+ case "agent manager":
1709
+ return "Manage Agent";
1770
1710
  case "device invitation manager":
1771
1711
  return t("choose add device label");
1772
1712
  default:
@@ -1777,16 +1717,13 @@ var IdentityPanelImpl = (props) => {
1777
1717
  t
1778
1718
  ]);
1779
1719
  const onCancelReset = () => rest.send?.("unchooseAction");
1780
- return /* @__PURE__ */ React29.createElement(DensityProvider, {
1720
+ return /* @__PURE__ */ React29.createElement(DensityProvider2, {
1781
1721
  density: "fine"
1782
1722
  }, /* @__PURE__ */ React29.createElement(IdentityHeading, {
1783
1723
  identity,
1784
1724
  titleId,
1785
1725
  title,
1786
- onDone,
1787
- onUpdateProfile,
1788
- connectionState,
1789
- onChangeConnectionState
1726
+ onDone
1790
1727
  }), /* @__PURE__ */ React29.createElement(Viewport.Root, {
1791
1728
  activeView
1792
1729
  }, /* @__PURE__ */ React29.createElement(Viewport.Views, null, /* @__PURE__ */ React29.createElement(Viewport.View, {
@@ -1802,6 +1739,27 @@ var IdentityPanelImpl = (props) => {
1802
1739
  active: activeView === "device invitation manager",
1803
1740
  ...rest,
1804
1741
  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
1805
1763
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1806
1764
  classNames: viewStyles,
1807
1765
  id: "confirm join new identity"
@@ -1830,7 +1788,7 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1830
1788
  });
1831
1789
  };
1832
1790
  var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1833
- const titleId = useId6("identityPanel__heading", propsTitleId);
1791
+ const titleId = useId5("identityPanel__heading", propsTitleId);
1834
1792
  const client = useClient3();
1835
1793
  const devices = useDevices();
1836
1794
  const identity = useIdentity();
@@ -1842,8 +1800,8 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1842
1800
  });
1843
1801
  if (!identity) {
1844
1802
  log6.error("IdentityPanel rendered with no active identity.", void 0, {
1845
- F: __dxlog_file5,
1846
- L: 234,
1803
+ F: __dxlog_file6,
1804
+ L: 145,
1847
1805
  S: void 0,
1848
1806
  C: (f, a) => f(...a)
1849
1807
  });
@@ -1854,13 +1812,11 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1854
1812
  initialDisposition
1855
1813
  }
1856
1814
  });
1857
- const { swarm: connectionState } = useNetworkStatus();
1858
- const handleChangeConnectionState = async (nextState) => client?.mesh.updateConfig(nextState);
1859
1815
  useEffect3(() => {
1860
1816
  const subscription = identityService.subscribe((state) => {
1861
1817
  log6("[state]", state, {
1862
- F: __dxlog_file5,
1863
- L: 247,
1818
+ F: __dxlog_file6,
1819
+ L: 154,
1864
1820
  S: void 0,
1865
1821
  C: (f, a) => f(...a)
1866
1822
  });
@@ -1875,10 +1831,30 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1875
1831
  return "identity action chooser";
1876
1832
  case identityState.matches("managingDeviceInvitation"):
1877
1833
  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";
1878
1845
  case identityState.matches("confirmingResetStorage"):
1879
1846
  return "confirm reset storage";
1880
1847
  case identityState.matches("confirmingJoinNewIdentity"):
1881
1848
  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";
1882
1858
  default:
1883
1859
  return "identity action chooser";
1884
1860
  }
@@ -1900,8 +1876,6 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1900
1876
  titleId,
1901
1877
  createInvitationUrl,
1902
1878
  onUpdateProfile,
1903
- connectionState,
1904
- onChangeConnectionState: handleChangeConnectionState,
1905
1879
  ...agentProps
1906
1880
  };
1907
1881
  return identityState.context.invitation ? /* @__PURE__ */ React29.createElement(IdentityPanelWithInvitationImpl, {
@@ -1915,25 +1889,25 @@ import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo
1915
1889
  import { log as log10 } from "@dxos/log";
1916
1890
  import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1917
1891
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1918
- import { DensityProvider as DensityProvider2, useId as useId8, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1892
+ import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1919
1893
 
1920
1894
  // packages/sdk/shell/src/panels/JoinPanel/JoinHeading.tsx
1921
1895
  import { X as X4 } from "@phosphor-icons/react";
1922
- import React30, { cloneElement, forwardRef as forwardRef9 } from "react";
1923
- import { Button as Button10, useTranslation as useTranslation15 } from "@dxos/react-ui";
1924
- import { descriptionText as descriptionText9, getSize as getSize14, mx as mx22 } from "@dxos/react-ui-theme";
1925
- var JoinHeading = /* @__PURE__ */ forwardRef9(({ mode, titleId, onExit, exitActionParent }, forwardedRef) => {
1926
- const { t } = useTranslation15("os");
1927
- const exitButton = /* @__PURE__ */ React30.createElement(Button10, {
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, {
1928
1902
  variant: "ghost",
1929
1903
  ...onExit && {
1930
1904
  onClick: onExit
1931
1905
  },
1932
- classNames: mx22(descriptionText9, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1906
+ classNames: mx20(descriptionText8, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
1933
1907
  "data-testid": "join-exit"
1934
1908
  }, /* @__PURE__ */ React30.createElement(X4, {
1935
1909
  weight: "bold",
1936
- className: getSize14(4)
1910
+ className: getSize11(4)
1937
1911
  }), /* @__PURE__ */ React30.createElement("span", {
1938
1912
  className: "sr-only"
1939
1913
  }, t("exit label")));
@@ -1957,10 +1931,10 @@ import { assign as assign2, createMachine as createMachine2 } from "xstate";
1957
1931
  import { log as log7 } from "@dxos/log";
1958
1932
  import { AlreadyJoinedError } from "@dxos/react-client";
1959
1933
  import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1960
- var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1934
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1961
1935
  var getInvitationSubscribable = (Kind, invitation) => {
1962
1936
  log7("[subscribing to invitation]", invitation, {
1963
- F: __dxlog_file6,
1937
+ F: __dxlog_file7,
1964
1938
  L: 90,
1965
1939
  S: void 0,
1966
1940
  C: (f, a) => f(...a)
@@ -1973,7 +1947,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
1973
1947
  Kind,
1974
1948
  invitation: invitation2
1975
1949
  }, {
1976
- F: __dxlog_file6,
1950
+ F: __dxlog_file7,
1977
1951
  L: 101,
1978
1952
  S: void 0,
1979
1953
  C: (f, a) => f(...a)
@@ -1988,7 +1962,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
1988
1962
  Kind,
1989
1963
  invitation: invitation2
1990
1964
  }, {
1991
- F: __dxlog_file6,
1965
+ F: __dxlog_file7,
1992
1966
  L: 106,
1993
1967
  S: void 0,
1994
1968
  C: (f, a) => f(...a)
@@ -2003,7 +1977,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2003
1977
  Kind,
2004
1978
  invitation: invitation2
2005
1979
  }, {
2006
- F: __dxlog_file6,
1980
+ F: __dxlog_file7,
2007
1981
  L: 111,
2008
1982
  S: void 0,
2009
1983
  C: (f, a) => f(...a)
@@ -2018,7 +1992,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2018
1992
  Kind,
2019
1993
  invitation: invitation2
2020
1994
  }, {
2021
- F: __dxlog_file6,
1995
+ F: __dxlog_file7,
2022
1996
  L: 116,
2023
1997
  S: void 0,
2024
1998
  C: (f, a) => f(...a)
@@ -2033,7 +2007,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2033
2007
  Kind,
2034
2008
  invitation: invitation2
2035
2009
  }, {
2036
- F: __dxlog_file6,
2010
+ F: __dxlog_file7,
2037
2011
  L: 121,
2038
2012
  S: void 0,
2039
2013
  C: (f, a) => f(...a)
@@ -2048,7 +2022,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2048
2022
  log7.warn("[invitation cancelled]", {
2049
2023
  Kind
2050
2024
  }, {
2051
- F: __dxlog_file6,
2025
+ F: __dxlog_file7,
2052
2026
  L: 127,
2053
2027
  S: void 0,
2054
2028
  C: (f, a) => f(...a)
@@ -2062,7 +2036,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2062
2036
  log7.error("[invitation timeout]", {
2063
2037
  Kind
2064
2038
  }, {
2065
- F: __dxlog_file6,
2039
+ F: __dxlog_file7,
2066
2040
  L: 132,
2067
2041
  S: void 0,
2068
2042
  C: (f, a) => f(...a)
@@ -2079,7 +2053,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2079
2053
  Kind,
2080
2054
  error
2081
2055
  }, {
2082
- F: __dxlog_file6,
2056
+ F: __dxlog_file7,
2083
2057
  L: 139,
2084
2058
  S: void 0,
2085
2059
  C: (f, a) => f(...a)
@@ -2094,7 +2068,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2094
2068
  Kind,
2095
2069
  error
2096
2070
  }, {
2097
- F: __dxlog_file6,
2071
+ F: __dxlog_file7,
2098
2072
  L: 144,
2099
2073
  S: void 0,
2100
2074
  C: (f, a) => f(...a)
@@ -2426,7 +2400,7 @@ var joinMachine = createMachine2({
2426
2400
  haloInvitation: context.halo.invitation,
2427
2401
  spaceInvitation: context.space.invitation
2428
2402
  }, {
2429
- F: __dxlog_file6,
2403
+ F: __dxlog_file7,
2430
2404
  L: 416,
2431
2405
  S: void 0,
2432
2406
  C: (f, a) => f(...a)
@@ -2440,7 +2414,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
2440
2414
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2441
2415
  } catch (err) {
2442
2416
  log7.catch(err, void 0, {
2443
- F: __dxlog_file6,
2417
+ F: __dxlog_file7,
2444
2418
  L: 443,
2445
2419
  S: void 0,
2446
2420
  C: (f, a) => f(...a)
@@ -2461,7 +2435,7 @@ var useJoinMachine = (client, options) => {
2461
2435
  };
2462
2436
  } catch (err) {
2463
2437
  log7.error("Could not redeem device invitation code", err, {
2464
- F: __dxlog_file6,
2438
+ F: __dxlog_file7,
2465
2439
  L: 464,
2466
2440
  S: void 0,
2467
2441
  C: (f, a) => f(...a)
@@ -2486,7 +2460,7 @@ var useJoinMachine = (client, options) => {
2486
2460
  };
2487
2461
  } catch (err) {
2488
2462
  log7.error("Could not redeem space invitation code", err, {
2489
- F: __dxlog_file6,
2463
+ F: __dxlog_file7,
2490
2464
  L: 486,
2491
2465
  S: void 0,
2492
2466
  C: (f, a) => f(...a)
@@ -2546,18 +2520,18 @@ var useJoinMachine = (client, options) => {
2546
2520
  };
2547
2521
 
2548
2522
  // packages/sdk/shell/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx
2549
- import { CaretRight as CaretRight2, Plus as Plus3, QrCode, Textbox } from "@phosphor-icons/react";
2523
+ import { CaretRight as CaretRight2, Plus as Plus2, QrCode, Textbox } from "@phosphor-icons/react";
2550
2524
  import React31 from "react";
2551
- import { useTranslation as useTranslation16 } from "@dxos/react-ui";
2552
- import { getSize as getSize15 } from "@dxos/react-ui-theme";
2525
+ import { useTranslation as useTranslation17 } from "@dxos/react-ui";
2526
+ import { getSize as getSize12 } from "@dxos/react-ui-theme";
2553
2527
  var AdditionMethodChooser = (viewStateProps) => {
2554
2528
  const disabled = !viewStateProps.active;
2555
2529
  const { send } = viewStateProps;
2556
- const { t } = useTranslation16("os");
2530
+ const { t } = useTranslation17("os");
2557
2531
  const sharedButtonProps = {
2558
2532
  disabled,
2559
2533
  after: /* @__PURE__ */ React31.createElement(CaretRight2, {
2560
- className: getSize15(4),
2534
+ className: getSize12(4),
2561
2535
  weight: "bold"
2562
2536
  }),
2563
2537
  slots: {
@@ -2572,8 +2546,8 @@ var AdditionMethodChooser = (viewStateProps) => {
2572
2546
  }, /* @__PURE__ */ React31.createElement(CompoundButton, {
2573
2547
  ...sharedButtonProps,
2574
2548
  description: t("create identity description"),
2575
- before: /* @__PURE__ */ React31.createElement(Plus3, {
2576
- className: getSize15(6)
2549
+ before: /* @__PURE__ */ React31.createElement(Plus2, {
2550
+ className: getSize12(6)
2577
2551
  }),
2578
2552
  onClick: () => send({
2579
2553
  type: "createIdentity"
@@ -2584,7 +2558,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2584
2558
  ...sharedButtonProps,
2585
2559
  description: t("join identity description"),
2586
2560
  before: /* @__PURE__ */ React31.createElement(QrCode, {
2587
- className: getSize15(6)
2561
+ className: getSize12(6)
2588
2562
  }),
2589
2563
  onClick: () => send({
2590
2564
  type: "acceptHaloInvitation"
@@ -2596,7 +2570,7 @@ var AdditionMethodChooser = (viewStateProps) => {
2596
2570
  disabled: true,
2597
2571
  description: t("recover identity description"),
2598
2572
  before: /* @__PURE__ */ React31.createElement(Textbox, {
2599
- className: getSize15(6)
2573
+ className: getSize12(6)
2600
2574
  }),
2601
2575
  onClick: () => send({
2602
2576
  type: "recoverIdentity"
@@ -2608,16 +2582,16 @@ var AdditionMethodChooser = (viewStateProps) => {
2608
2582
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityAdded.tsx
2609
2583
  import React32, { cloneElement as cloneElement2 } from "react";
2610
2584
  import { generateName as generateName4 } from "@dxos/display-name";
2611
- import { Avatar as Avatar7, useId as useId7, useTranslation as useTranslation17 } from "@dxos/react-ui";
2612
- import { mx as mx23 } from "@dxos/react-ui-theme";
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
2587
  import { hexToFallback } from "@dxos/util";
2614
2588
  var IdentityAdded = (props) => {
2615
2589
  const { mode, addedIdentity, active, send, onDone, doneActionParent } = props;
2616
2590
  const disabled = !active;
2617
- const { t } = useTranslation17("os");
2591
+ const { t } = useTranslation18("os");
2618
2592
  const addedIdentityHex = addedIdentity?.identityKey.toHex() ?? "0";
2619
2593
  const fallbackValue = hexToFallback(addedIdentityHex);
2620
- const labelId = useId7("identityListItem__label");
2594
+ const labelId = useId6("identityListItem__label");
2621
2595
  const displayName = addedIdentity?.profile?.displayName ?? (addedIdentity && generateName4(addedIdentityHex));
2622
2596
  const doneAction = /* @__PURE__ */ React32.createElement(Action, {
2623
2597
  ...onDone && {
@@ -2630,14 +2604,14 @@ var IdentityAdded = (props) => {
2630
2604
  return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StepHeading, null, t("identity added label")), /* @__PURE__ */ React32.createElement("div", {
2631
2605
  role: "none",
2632
2606
  className: "grow flex flex-col items-center justify-center text-center gap-2"
2633
- }, /* @__PURE__ */ React32.createElement(Avatar7.Root, {
2607
+ }, /* @__PURE__ */ React32.createElement(Avatar5.Root, {
2634
2608
  status: "active",
2635
2609
  labelId,
2636
2610
  hue: addedIdentity?.profile?.data?.hue || fallbackValue.hue
2637
- }, /* @__PURE__ */ React32.createElement(Avatar7.Frame, null, /* @__PURE__ */ React32.createElement(Avatar7.Fallback, {
2611
+ }, /* @__PURE__ */ React32.createElement(Avatar5.Frame, null, /* @__PURE__ */ React32.createElement(Avatar5.Fallback, {
2638
2612
  text: addedIdentity?.profile?.data?.emoji || fallbackValue.emoji
2639
- })), /* @__PURE__ */ React32.createElement(Avatar7.Label, {
2640
- classNames: mx23("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2613
+ })), /* @__PURE__ */ React32.createElement(Avatar5.Label, {
2614
+ classNames: mx21("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
2641
2615
  }, displayName))), /* @__PURE__ */ React32.createElement(Actions, null, mode === "halo-only" ? doneActionParent ? /* @__PURE__ */ cloneElement2(doneActionParent, {}, doneAction) : doneAction : /* @__PURE__ */ React32.createElement(Action, {
2642
2616
  variant: "primary",
2643
2617
  disabled: disabled || !addedIdentity,
@@ -2650,17 +2624,17 @@ var IdentityAdded = (props) => {
2650
2624
  };
2651
2625
 
2652
2626
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2653
- import React33, { useState as useState9 } from "react";
2627
+ import React33, { useState as useState7 } from "react";
2654
2628
  import { log as log8 } from "@dxos/log";
2655
2629
  import { useClient as useClient4 } from "@dxos/react-client";
2656
- import { useTranslation as useTranslation18 } from "@dxos/react-ui";
2657
- var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
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
2632
  var IdentityInput = (props) => {
2659
2633
  const { send, method } = props;
2660
2634
  const isRecover = method === "recover identity";
2661
2635
  const client = useClient4();
2662
- const { t } = useTranslation18("os");
2663
- const [validationMessage, setValidationMessage] = useState9("");
2636
+ const { t } = useTranslation19("os");
2637
+ const [validationMessage, setValidationMessage] = useState7("");
2664
2638
  const createIdentity = (displayName) => {
2665
2639
  void client.halo.createIdentity({
2666
2640
  [isRecover ? "seedphrase" : "displayName"]: displayName
@@ -2671,7 +2645,7 @@ var IdentityInput = (props) => {
2671
2645
  });
2672
2646
  }, (error) => {
2673
2647
  log8.catch(error, void 0, {
2674
- F: __dxlog_file7,
2648
+ F: __dxlog_file8,
2675
2649
  L: 37,
2676
2650
  S: void 0,
2677
2651
  C: (f, a) => f(...a)
@@ -2688,8 +2662,8 @@ var IdentityInput = (props) => {
2688
2662
  var IdentityInputImpl = (props) => {
2689
2663
  const { method, send, active, onDisplayNameConfirm, validationMessage } = props;
2690
2664
  const disabled = !active;
2691
- const { t } = useTranslation18("os");
2692
- const [inputValue, setInputValue] = useState9("");
2665
+ const { t } = useTranslation19("os");
2666
+ const [inputValue, setInputValue] = useState7("");
2693
2667
  const isRecover = method === "recover identity";
2694
2668
  return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
2695
2669
  role: "none",
@@ -2718,11 +2692,11 @@ var IdentityInputImpl = (props) => {
2718
2692
 
2719
2693
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAccepted.tsx
2720
2694
  import React34, { cloneElement as cloneElement3 } from "react";
2721
- import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2695
+ import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2722
2696
  var InvitationAccepted = (props) => {
2723
2697
  const { active, Kind, doneActionParent, onDone } = props;
2724
2698
  const disabled = !active;
2725
- const { t } = useTranslation19("os");
2699
+ const { t } = useTranslation20("os");
2726
2700
  const doneAction = /* @__PURE__ */ React34.createElement(Action, {
2727
2701
  variant: "primary",
2728
2702
  onClick: onDone,
@@ -2739,10 +2713,10 @@ var InvitationAccepted = (props) => {
2739
2713
  };
2740
2714
 
2741
2715
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2742
- import React35, { useState as useState10, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2716
+ import React35, { useState as useState8, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2743
2717
  import { log as log9 } from "@dxos/log";
2744
- import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2745
- var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
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
2720
  var invitationCodeFromUrl = (text) => {
2747
2721
  try {
2748
2722
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
@@ -2750,7 +2724,7 @@ var invitationCodeFromUrl = (text) => {
2750
2724
  return invitation ?? text;
2751
2725
  } catch (err) {
2752
2726
  log9.catch(err, void 0, {
2753
- F: __dxlog_file8,
2727
+ F: __dxlog_file9,
2754
2728
  L: 25,
2755
2729
  S: void 0,
2756
2730
  C: (f, a) => f(...a)
@@ -2761,8 +2735,8 @@ var invitationCodeFromUrl = (text) => {
2761
2735
  var InvitationInput = (props) => {
2762
2736
  const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
2763
2737
  const disabled = !active;
2764
- const { t } = useTranslation20("os");
2765
- const [inputValue, setInputValue] = useState10(unredeemedCode ?? "");
2738
+ const { t } = useTranslation21("os");
2739
+ const [inputValue, setInputValue] = useState8(unredeemedCode ?? "");
2766
2740
  useEffect4(() => {
2767
2741
  unredeemedCode && setInputValue(unredeemedCode ?? "");
2768
2742
  }, [
@@ -2820,8 +2794,8 @@ var InvitationInput = (props) => {
2820
2794
 
2821
2795
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationRescuer.tsx
2822
2796
  import React36 from "react";
2823
- import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2824
- import { descriptionText as descriptionText10 } from "@dxos/react-ui-theme";
2797
+ import { useTranslation as useTranslation22 } from "@dxos/react-ui";
2798
+ import { descriptionText as descriptionText9 } from "@dxos/react-ui-theme";
2825
2799
  var InvitationActions = ({
2826
2800
  // `invitationState` does report correct state, but here we evaluate whether `failReason` is a better source of truth
2827
2801
  // for the UI in particular.
@@ -2832,10 +2806,10 @@ var InvitationActions = ({
2832
2806
  Kind,
2833
2807
  failReason
2834
2808
  }) => {
2835
- const { t } = useTranslation21("os");
2809
+ const { t } = useTranslation22("os");
2836
2810
  if (failReason) {
2837
2811
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2838
- className: descriptionText10
2812
+ className: descriptionText9
2839
2813
  }, t(failReason === "timeout" ? "timeout status label" : failReason === "cancelled" ? "cancelled status label" : "error status label")), /* @__PURE__ */ React36.createElement("div", {
2840
2814
  role: "none",
2841
2815
  className: "grow"
@@ -2848,7 +2822,7 @@ var InvitationActions = ({
2848
2822
  }, t("reset label"))));
2849
2823
  } else {
2850
2824
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StepHeading, {
2851
- className: descriptionText10
2825
+ className: descriptionText9
2852
2826
  }, t("connecting status label")), /* @__PURE__ */ React36.createElement("div", {
2853
2827
  role: "none",
2854
2828
  className: "grow"
@@ -2865,12 +2839,12 @@ var InvitationActions = ({
2865
2839
  };
2866
2840
  var InvitationRescuer = (props) => {
2867
2841
  const { Kind, invitationState, active, send } = props;
2868
- const { t } = useTranslation21("os");
2842
+ const { t } = useTranslation22("os");
2869
2843
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, typeof invitationState === "undefined" ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", {
2870
2844
  role: "none",
2871
2845
  className: "grow flex flex-col justify-center"
2872
2846
  }, /* @__PURE__ */ React36.createElement(StepHeading, {
2873
- className: descriptionText10
2847
+ className: descriptionText9
2874
2848
  }, "There was a problem joining the space")), /* @__PURE__ */ React36.createElement(Actions, null, /* @__PURE__ */ React36.createElement(Action, {
2875
2849
  disabled: !active,
2876
2850
  "data-testid": "invitation-rescuer-blank-reset",
@@ -2881,15 +2855,15 @@ var InvitationRescuer = (props) => {
2881
2855
  };
2882
2856
 
2883
2857
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
2884
- import React37, { useState as useState11 } from "react";
2885
- import { Input as Input3, useTranslation as useTranslation22 } from "@dxos/react-ui";
2886
- import { hexToEmoji as hexToEmoji5 } from "@dxos/util";
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";
2887
2861
  var pinLength = 6;
2888
2862
  var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel }) => {
2889
2863
  const disabled = !active || pending;
2890
- const { t } = useTranslation22("os");
2864
+ const { t } = useTranslation23("os");
2891
2865
  const invitationType = Kind.toLowerCase();
2892
- const [authCode, setAuthCode] = useState11("");
2866
+ const [authCode, setAuthCode] = useState9("");
2893
2867
  const onChange = ({ target: { value } }) => {
2894
2868
  setAuthCode(value);
2895
2869
  if (value.length === pinLength) {
@@ -2900,12 +2874,12 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2900
2874
  role: "none",
2901
2875
  className: "grow flex flex-col justify-center"
2902
2876
  }, invitationId && /* @__PURE__ */ React37.createElement(Emoji, {
2903
- text: hexToEmoji5(invitationId)
2904
- }), /* @__PURE__ */ React37.createElement(Input3.Root, failed && {
2877
+ text: hexToEmoji4(invitationId)
2878
+ }), /* @__PURE__ */ React37.createElement(Input2.Root, failed && {
2905
2879
  validationValence: "error"
2906
- }, /* @__PURE__ */ React37.createElement(Input3.Label, {
2880
+ }, /* @__PURE__ */ React37.createElement(Input2.Label, {
2907
2881
  asChild: true
2908
- }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input3.PinInput, {
2882
+ }, /* @__PURE__ */ React37.createElement(StepHeading, null, t("auth code input label"))), /* @__PURE__ */ React37.createElement(Input2.PinInput, {
2909
2883
  disabled,
2910
2884
  length: pinLength,
2911
2885
  onChange,
@@ -2916,9 +2890,9 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2916
2890
  "data-prevent-ios-autofocus": true,
2917
2891
  "data-testid": `${invitationType}-auth-code-input`,
2918
2892
  "data-1p-ignore": true
2919
- }), failed && /* @__PURE__ */ React37.createElement(Input3.DescriptionAndValidation, {
2893
+ }), failed && /* @__PURE__ */ React37.createElement(Input2.DescriptionAndValidation, {
2920
2894
  classNames: "text-center"
2921
- }, /* @__PURE__ */ React37.createElement(Input3.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2895
+ }, /* @__PURE__ */ React37.createElement(Input2.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2922
2896
  variant: "ghost",
2923
2897
  disabled,
2924
2898
  onClick: () => onInvitationCancel?.(),
@@ -2957,10 +2931,10 @@ var resolvedBgColor = (status) => status === Invitation7.State.ERROR ? errorBgCo
2957
2931
  var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTextColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledTextColor : successTextColor;
2958
2932
 
2959
2933
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2960
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2934
+ var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2961
2935
  var JoinPanelImpl = (props) => {
2962
2936
  const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetStorage, onConfirmResetStorage, IdentityInput: IdentityInputComponent = IdentityInput, ConfirmReset: ConfirmResetComponent = ConfirmReset } = props;
2963
- return /* @__PURE__ */ React38.createElement(DensityProvider2, {
2937
+ return /* @__PURE__ */ React38.createElement(DensityProvider3, {
2964
2938
  density: "fine"
2965
2939
  }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
2966
2940
  titleId,
@@ -3103,7 +3077,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3103
3077
  const client = useClient5();
3104
3078
  const identity = useIdentity2();
3105
3079
  const { hasIosKeyboard } = useThemeContext4();
3106
- const titleId = useId8("joinPanel__heading", propsTitleId);
3080
+ const titleId = useId7("joinPanel__heading", propsTitleId);
3107
3081
  const [joinState, joinSend, joinService] = useJoinMachine(client, {
3108
3082
  context: {
3109
3083
  mode,
@@ -3119,7 +3093,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3119
3093
  useEffect5(() => {
3120
3094
  const subscription = joinService.subscribe((state) => {
3121
3095
  log10("[state]", state, {
3122
- F: __dxlog_file9,
3096
+ F: __dxlog_file10,
3123
3097
  L: 204,
3124
3098
  S: void 0,
3125
3099
  C: (f, a) => f(...a)
@@ -3384,13 +3358,13 @@ import { Planet } from "@phosphor-icons/react";
3384
3358
  import React40, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3385
3359
  import { log as log13 } from "@dxos/log";
3386
3360
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3387
- import { DensityProvider as DensityProvider3, useId as useId9, useTranslation as useTranslation24 } from "@dxos/react-ui";
3361
+ import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation25 } from "@dxos/react-ui";
3388
3362
 
3389
3363
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3390
3364
  import { useMachine as useMachine3 } from "@xstate/react";
3391
3365
  import { assign as assign3, createMachine as createMachine3 } from "xstate";
3392
3366
  import { log as log11 } from "@dxos/log";
3393
- var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3367
+ var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3394
3368
  var spaceMachine = createMachine3({
3395
3369
  id: "space",
3396
3370
  predictableActionArguments: true,
@@ -3431,7 +3405,7 @@ var spaceMachine = createMachine3({
3431
3405
  event,
3432
3406
  context
3433
3407
  }, {
3434
- F: __dxlog_file10,
3408
+ F: __dxlog_file11,
3435
3409
  L: 53,
3436
3410
  S: void 0,
3437
3411
  C: (f, a) => f(...a)
@@ -3450,18 +3424,18 @@ var useSpaceMachine = (options) => {
3450
3424
 
3451
3425
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3452
3426
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3453
- import React39, { useCallback as useCallback8, useState as useState12 } from "react";
3427
+ import React39, { useCallback as useCallback8, useState as useState10 } from "react";
3454
3428
  import { log as log12 } from "@dxos/log";
3455
3429
  import { useConfig } from "@dxos/react-client";
3456
3430
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3457
3431
  import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3458
- import { ScrollArea, useTranslation as useTranslation23 } from "@dxos/react-ui";
3459
- import { descriptionText as descriptionText11, mx as mx24 } from "@dxos/react-ui-theme";
3460
- var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
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";
3461
3435
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
3462
3436
  var SpaceManager = (props) => {
3463
3437
  const { space, target } = props;
3464
- const { t } = useTranslation23("os");
3438
+ const { t } = useTranslation24("os");
3465
3439
  const config = useConfig();
3466
3440
  const invitations = useSpaceInvitations2(space?.key);
3467
3441
  const onInvitationEvent = useCallback8((invitation) => {
@@ -3471,7 +3445,7 @@ var SpaceManager = (props) => {
3471
3445
  invitationCode,
3472
3446
  authCode: invitation.authCode
3473
3447
  }), void 0, {
3474
- F: __dxlog_file11,
3448
+ F: __dxlog_file12,
3475
3449
  L: 49,
3476
3450
  S: void 0,
3477
3451
  C: (f, a) => f(...a)
@@ -3523,7 +3497,7 @@ var SpaceManager = (props) => {
3523
3497
  var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
3524
3498
  var SpaceManagerImpl = (props) => {
3525
3499
  const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
3526
- const { t } = useTranslation23("os");
3500
+ const { t } = useTranslation24("os");
3527
3501
  const inviteActions = propsInviteActions ?? {
3528
3502
  noopInvite: {
3529
3503
  label: t("create space invitation label"),
@@ -3533,7 +3507,7 @@ var SpaceManagerImpl = (props) => {
3533
3507
  }
3534
3508
  }
3535
3509
  };
3536
- const [activeAction, setInternalActiveAction] = useState12(localStorage.getItem(activeActionKey) ?? "inviteOne");
3510
+ const [activeAction, setInternalActiveAction] = useState10(localStorage.getItem(activeActionKey) ?? "inviteOne");
3537
3511
  const setActiveAction = (nextAction) => {
3538
3512
  setInternalActiveAction(nextAction);
3539
3513
  localStorage.setItem(activeActionKey, nextAction);
@@ -3546,7 +3520,7 @@ var SpaceManagerImpl = (props) => {
3546
3520
  }, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3547
3521
  classNames: "is-full pie-2"
3548
3522
  }, !!visibleInvitations?.length && /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("h3", {
3549
- className: mx24(headingFragment, descriptionText11)
3523
+ className: mx22(headingFragment, descriptionText10)
3550
3524
  }, t("invitation list heading")), /* @__PURE__ */ React39.createElement(InvitationListComponent, {
3551
3525
  className: "mb-2",
3552
3526
  send,
@@ -3554,7 +3528,7 @@ var SpaceManagerImpl = (props) => {
3554
3528
  onClickRemove: (invitation) => invitation.cancel(),
3555
3529
  createInvitationUrl
3556
3530
  }), /* @__PURE__ */ React39.createElement("h3", {
3557
- className: mx24(headingFragment, descriptionText11, "mbs-2")
3531
+ className: mx22(headingFragment, descriptionText10, "mbs-2")
3558
3532
  }, t("space member list heading"))), /* @__PURE__ */ React39.createElement(SpaceMemberListComponent, {
3559
3533
  spaceKey: space.key,
3560
3534
  includeSelf: true
@@ -3570,9 +3544,9 @@ var SpaceManagerImpl = (props) => {
3570
3544
  };
3571
3545
 
3572
3546
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3573
- var __dxlog_file12 = "/home/runner/work/dxos/dxos/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";
3574
3548
  var SpacePanelHeading = ({ titleId, space, onDone }) => {
3575
- const { t } = useTranslation24("os");
3549
+ const { t } = useTranslation25("os");
3576
3550
  const name = space.properties.name;
3577
3551
  return /* @__PURE__ */ React40.createElement(Heading, {
3578
3552
  titleId,
@@ -3593,7 +3567,7 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
3593
3567
  };
3594
3568
  var SpacePanelImpl = (props) => {
3595
3569
  const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3596
- return /* @__PURE__ */ React40.createElement(DensityProvider3, {
3570
+ return /* @__PURE__ */ React40.createElement(DensityProvider4, {
3597
3571
  density: "fine"
3598
3572
  }, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3599
3573
  ...rest,
@@ -3627,7 +3601,7 @@ var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
3627
3601
  });
3628
3602
  };
3629
3603
  var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
3630
- const titleId = useId9("spacePanel__heading", propsTitleId);
3604
+ const titleId = useId8("spacePanel__heading", propsTitleId);
3631
3605
  const [spaceState, spaceSend, spaceService] = useSpaceMachine({
3632
3606
  context: {
3633
3607
  space: props.space
@@ -3636,7 +3610,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3636
3610
  useEffect6(() => {
3637
3611
  const subscription = spaceService.subscribe((state) => {
3638
3612
  log13("[state]", state, {
3639
- F: __dxlog_file12,
3613
+ F: __dxlog_file13,
3640
3614
  L: 94,
3641
3615
  S: void 0,
3642
3616
  C: (f, a) => f(...a)
@@ -3676,9 +3650,9 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3676
3650
 
3677
3651
  // packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
3678
3652
  import React41 from "react";
3679
- import { Status, useTranslation as useTranslation25 } from "@dxos/react-ui";
3653
+ import { Status, useTranslation as useTranslation26 } from "@dxos/react-ui";
3680
3654
  var StatusPanel = ({ titleId }) => {
3681
- const { t } = useTranslation25("os");
3655
+ const { t } = useTranslation26("os");
3682
3656
  return /* @__PURE__ */ React41.createElement("div", {
3683
3657
  className: "grid place-items-center p-2 gap-2"
3684
3658
  }, /* @__PURE__ */ React41.createElement("p", {
@@ -3691,7 +3665,7 @@ var StatusPanel = ({ titleId }) => {
3691
3665
 
3692
3666
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
3693
3667
  var IdentityDialog = (props) => {
3694
- const titleId = useId10("identityDialog__title", props.title);
3668
+ const titleId = useId9("identityDialog__title", props.title);
3695
3669
  return /* @__PURE__ */ React42.createElement(Dialog.Root, {
3696
3670
  defaultOpen: true,
3697
3671
  onOpenChange: (open) => open || props.onDone?.()
@@ -3709,9 +3683,9 @@ var IdentityDialog = (props) => {
3709
3683
 
3710
3684
  // packages/sdk/shell/src/composites/JoinDialog/JoinDialog.tsx
3711
3685
  import React43 from "react";
3712
- import { AlertDialog, useId as useId11, useVisualViewport } from "@dxos/react-ui";
3686
+ import { AlertDialog, useId as useId10, useVisualViewport } from "@dxos/react-ui";
3713
3687
  var JoinDialog = (joinPanelProps) => {
3714
- const titleId = useId11("joinDialog__title");
3688
+ const titleId = useId10("joinDialog__title");
3715
3689
  const { height } = useVisualViewport();
3716
3690
  return /* @__PURE__ */ React43.createElement(AlertDialog.Root, {
3717
3691
  defaultOpen: true,
@@ -3743,21 +3717,21 @@ import { createRoot } from "react-dom/client";
3743
3717
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3744
3718
  import { ShellRuntimeImpl } from "@dxos/client-services";
3745
3719
  import { Client, ClientContext, ClientServicesProxy, Config, SystemStatus } from "@dxos/react-client";
3746
- import { ThemeProvider, Tooltip as Tooltip7 } from "@dxos/react-ui";
3720
+ import { ThemeProvider, Tooltip as Tooltip5 } from "@dxos/react-ui";
3747
3721
  import { defaultTx } from "@dxos/react-ui-theme";
3748
3722
  import { createIFramePort } from "@dxos/rpc-tunnel";
3749
3723
 
3750
3724
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3751
- import React46, { useEffect as useEffect7, useState as useState13 } from "react";
3725
+ import React46, { useEffect as useEffect7, useState as useState11 } from "react";
3752
3726
  import { log as log14 } from "@dxos/log";
3753
3727
  import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3754
3728
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3755
3729
 
3756
3730
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
3757
3731
  import React44 from "react";
3758
- import { Dialog as Dialog2, useId as useId12 } from "@dxos/react-ui";
3732
+ import { Dialog as Dialog2, useId as useId11 } from "@dxos/react-ui";
3759
3733
  var SpaceDialog = (spacePanelProps) => {
3760
- const titleId = useId12("spaceDialog__title");
3734
+ const titleId = useId11("spaceDialog__title");
3761
3735
  return /* @__PURE__ */ React44.createElement(Dialog2.Root, {
3762
3736
  defaultOpen: true,
3763
3737
  onOpenChange: (open) => open || spacePanelProps.onDone?.()
@@ -3774,9 +3748,9 @@ var SpaceDialog = (spacePanelProps) => {
3774
3748
 
3775
3749
  // packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
3776
3750
  import React45 from "react";
3777
- import { AlertDialog as AlertDialog2, useId as useId13 } from "@dxos/react-ui";
3751
+ import { AlertDialog as AlertDialog2, useId as useId12 } from "@dxos/react-ui";
3778
3752
  var StatusDialog = () => {
3779
- const titleId = useId13("statusDialog__title");
3753
+ const titleId = useId12("statusDialog__title");
3780
3754
  return /* @__PURE__ */ React45.createElement(AlertDialog2.Root, {
3781
3755
  open: true
3782
3756
  }, /* @__PURE__ */ React45.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Content, {
@@ -3787,9 +3761,9 @@ var StatusDialog = () => {
3787
3761
  };
3788
3762
 
3789
3763
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3790
- var __dxlog_file13 = "/home/runner/work/dxos/dxos/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";
3791
3765
  var Shell = ({ runtime, origin }) => {
3792
- const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState13({
3766
+ const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState11({
3793
3767
  layout: runtime.layout,
3794
3768
  invitationCode: runtime.invitationCode,
3795
3769
  spaceKey: runtime.spaceKey,
@@ -3805,7 +3779,7 @@ var Shell = ({ runtime, origin }) => {
3805
3779
  useEffect7(() => {
3806
3780
  if (layout === ShellLayout.SPACE && !space) {
3807
3781
  log14.warn("No space found for shell space invitations.", void 0, {
3808
- F: __dxlog_file13,
3782
+ F: __dxlog_file14,
3809
3783
  L: 33,
3810
3784
  S: void 0,
3811
3785
  C: (f, a) => f(...a)
@@ -3878,7 +3852,7 @@ var Shell = ({ runtime, origin }) => {
3878
3852
  layout: ShellLayout.DEFAULT
3879
3853
  });
3880
3854
  },
3881
- initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : "default"
3855
+ initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : layout === ShellLayout.EDIT_PROFILE ? "manage-profile" : "default"
3882
3856
  });
3883
3857
  case ShellLayout.SPACE:
3884
3858
  return space ? /* @__PURE__ */ React46.createElement(SpaceDialog, {
@@ -3970,6 +3944,8 @@ var os = {
3970
3944
  "connected status label": "Enter confirmation PIN",
3971
3945
  "authenticating status label": "Enter confirmation PIN",
3972
3946
  "success status label": "Success",
3947
+ "connect label": "Connect",
3948
+ "reconnect label": "Reconnect",
3973
3949
  "cancel label": "Cancel",
3974
3950
  "done label": "Done",
3975
3951
  "reset label": "Start over",
@@ -4051,19 +4027,7 @@ var os = {
4051
4027
  "purple label": "Purple",
4052
4028
  "fuchsia label": "Fuchsia",
4053
4029
  "pink label": "Pink",
4054
- "rose label": "Rose",
4055
- "current device tag label": "This device",
4056
- "device name placeholder": "{{platform}} on {{os}}",
4057
- "more options label": "More options",
4058
- "disconnect label": "Currently online. Click to go offline.",
4059
- "connect label": "Currently offline. Click to go online.",
4060
- "edit device label": "Edit device name & avatar",
4061
- "agent heading": "Agent",
4062
- "agent message title": "About creating an agent",
4063
- "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.",
4064
- "create agent label": "Start an agent",
4065
- "destroy agent label": "Shut down agent",
4066
- "agent device label": "Your agent"
4030
+ "rose label": "Rose"
4067
4031
  };
4068
4032
 
4069
4033
  // packages/sdk/shell/src/translations/index.ts
@@ -4097,17 +4061,17 @@ var runShell = async (config = new Config()) => {
4097
4061
  client,
4098
4062
  status: SystemStatus.ACTIVE
4099
4063
  }
4100
- }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
4064
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
4101
4065
  runtime,
4102
4066
  origin: location.origin
4103
4067
  })))))));
4104
4068
  };
4105
4069
 
4106
4070
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4107
- import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState14 } from "react";
4071
+ import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
4108
4072
  import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
4109
4073
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
4110
- import { mx as mx25 } from "@dxos/react-ui-theme";
4074
+ import { mx as mx23 } from "@dxos/react-ui-theme";
4111
4075
 
4112
4076
  // packages/sdk/shell/src/composites/Shell/memory-shell-runtime.ts
4113
4077
  import { Event } from "@dxos/async";
@@ -4166,7 +4130,7 @@ var useShell = () => {
4166
4130
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4167
4131
  const client = useClient7();
4168
4132
  const identity = useIdentity3();
4169
- const [display, setDisplay] = useState14(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4133
+ const [display, setDisplay] = useState12(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4170
4134
  const shellRuntime = useMemo6(() => {
4171
4135
  if (client.config.get("runtime.app.env.DX_VAULT") !== "false") {
4172
4136
  return;
@@ -4237,7 +4201,7 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4237
4201
  shellRuntime
4238
4202
  ]);
4239
4203
  return /* @__PURE__ */ React48.createElement(React48.Fragment, null, shellRuntime && /* @__PURE__ */ React48.createElement("div", {
4240
- className: mx25(display === ShellDisplay2.NONE ? "hidden" : "")
4204
+ className: mx23(display === ShellDisplay2.NONE ? "hidden" : "")
4241
4205
  }, /* @__PURE__ */ React48.createElement(Shell, {
4242
4206
  runtime: shellRuntime,
4243
4207
  origin: window.location.origin
@@ -4251,7 +4215,6 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4251
4215
  export {
4252
4216
  Action,
4253
4217
  Actions,
4254
- AgentConfig,
4255
4218
  AuthCode,
4256
4219
  BifurcatedAction,
4257
4220
  Centered,
@@ -4265,11 +4228,9 @@ export {
4265
4228
  CopyButtonIconOnly,
4266
4229
  DeviceList,
4267
4230
  Emoji,
4268
- EmojiPickerBlock,
4269
- EmojiPickerToolbarButton,
4231
+ EmojiPicker,
4270
4232
  Heading,
4271
- HuePickerBlock,
4272
- HuePickerToolbarButton,
4233
+ HuePicker,
4273
4234
  IdentityDialog,
4274
4235
  IdentityListItem,
4275
4236
  IdentityPanel,