@dxos/shell 0.4.10-main.ec8b427 → 0.4.10-main.f68a1ca

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 (121) hide show
  1. package/dist/bundle/shell.mjs +10460 -10175
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +65 -62
  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 +434 -333
  8. package/dist/lib/browser/react.mjs.map +4 -4
  9. package/dist/types/src/components/EmojiPicker.d.ts.map +1 -1
  10. package/dist/types/src/components/EmojiPicker.js +2 -1
  11. package/dist/types/src/components/EmojiPicker.js.map +1 -1
  12. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +1 -1
  13. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
  14. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  15. package/dist/types/src/composites/Shell/Shell.js +18 -6
  16. package/dist/types/src/composites/Shell/Shell.js.map +1 -1
  17. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +2 -0
  18. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -0
  19. package/dist/types/src/composites/StatusDialog/StatusDialog.js +22 -0
  20. package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -0
  21. package/dist/types/src/composites/StatusDialog/index.d.ts +2 -0
  22. package/dist/types/src/composites/StatusDialog/index.d.ts.map +1 -0
  23. package/dist/types/src/composites/StatusDialog/index.js +21 -0
  24. package/dist/types/src/composites/StatusDialog/index.js.map +1 -0
  25. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +1 -1
  26. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  27. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +15 -8
  28. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  29. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +5 -3
  30. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  31. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +3 -1
  32. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  33. package/dist/types/src/panels/IdentityPanel/identityMachine.js +15 -2
  34. package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
  35. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  36. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +9 -5
  37. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  38. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +4 -1
  39. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
  40. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +0 -1
  41. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
  42. package/dist/types/src/panels/IdentityPanel/steps/index.js +0 -1
  43. package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
  44. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +1 -1
  45. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
  46. package/dist/types/src/panels/JoinPanel/JoinPanel.js +12 -5
  47. package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
  48. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +1 -1
  49. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
  50. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +2 -1
  51. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
  52. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +8 -3
  53. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
  54. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +3 -2
  55. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
  56. package/dist/types/src/panels/JoinPanel/joinMachine.js +7 -0
  57. package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
  58. package/dist/types/src/panels/JoinPanel/steps/index.d.ts +0 -1
  59. package/dist/types/src/panels/JoinPanel/steps/index.d.ts.map +1 -1
  60. package/dist/types/src/panels/JoinPanel/steps/index.js +0 -1
  61. package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -1
  62. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +4 -0
  63. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -0
  64. package/dist/types/src/panels/StatusPanel/StatusPanel.js +19 -0
  65. package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -0
  66. package/dist/types/src/panels/StatusPanel/index.d.ts +2 -0
  67. package/dist/types/src/panels/StatusPanel/index.d.ts.map +1 -0
  68. package/dist/types/src/panels/StatusPanel/index.js +21 -0
  69. package/dist/types/src/panels/StatusPanel/index.js.map +1 -0
  70. package/dist/types/src/panels/index.d.ts +1 -0
  71. package/dist/types/src/panels/index.d.ts.map +1 -1
  72. package/dist/types/src/panels/index.js +1 -0
  73. package/dist/types/src/panels/index.js.map +1 -1
  74. package/dist/types/src/steps/ConfirmReset.d.ts +16 -0
  75. package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -0
  76. package/dist/types/src/steps/ConfirmReset.js +70 -0
  77. package/dist/types/src/steps/ConfirmReset.js.map +1 -0
  78. package/dist/types/src/steps/StepProps.d.ts +4 -1
  79. package/dist/types/src/steps/StepProps.d.ts.map +1 -1
  80. package/dist/types/src/steps/index.d.ts +1 -0
  81. package/dist/types/src/steps/index.d.ts.map +1 -1
  82. package/dist/types/src/steps/index.js +1 -0
  83. package/dist/types/src/steps/index.js.map +1 -1
  84. package/dist/types/src/translations/locales/en-US.d.ts +4 -1
  85. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  86. package/dist/types/src/translations/locales/en-US.js +8 -5
  87. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  88. package/package.json +19 -19
  89. package/src/components/EmojiPicker.tsx +3 -1
  90. package/src/composites/IdentityDialog/IdentityDialog.tsx +1 -1
  91. package/src/composites/Shell/Shell.tsx +23 -4
  92. package/src/composites/StatusDialog/StatusDialog.tsx +24 -0
  93. package/src/composites/StatusDialog/index.ts +5 -0
  94. package/src/panels/IdentityPanel/IdentityPanel.tsx +31 -14
  95. package/src/panels/IdentityPanel/IdentityPanelProps.ts +7 -3
  96. package/src/panels/IdentityPanel/identityMachine.ts +25 -3
  97. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +16 -7
  98. package/src/panels/IdentityPanel/steps/ProfileForm.tsx +6 -1
  99. package/src/panels/IdentityPanel/steps/index.ts +0 -1
  100. package/src/panels/JoinPanel/JoinPanel.stories.tsx +3 -2
  101. package/src/panels/JoinPanel/JoinPanel.tsx +21 -5
  102. package/src/panels/JoinPanel/JoinPanelProps.ts +9 -3
  103. package/src/panels/JoinPanel/joinMachine.ts +12 -2
  104. package/src/panels/JoinPanel/steps/index.ts +0 -1
  105. package/src/panels/StatusPanel/StatusPanel.tsx +19 -0
  106. package/src/panels/StatusPanel/index.ts +5 -0
  107. package/src/panels/index.ts +1 -0
  108. package/src/steps/ConfirmReset.tsx +111 -0
  109. package/src/steps/StepProps.ts +2 -1
  110. package/src/steps/index.ts +1 -0
  111. package/src/translations/locales/en-US.ts +9 -5
  112. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts +0 -16
  113. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts.map +0 -1
  114. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js +0 -40
  115. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js.map +0 -1
  116. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +0 -13
  117. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +0 -1
  118. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +0 -66
  119. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +0 -1
  120. package/src/panels/IdentityPanel/steps/SignOutChooser.tsx +0 -84
  121. package/src/panels/JoinPanel/steps/ResetIdentity.tsx +0 -80
@@ -145,10 +145,13 @@ import EmojiMart from "@emoji-mart/react";
145
145
  import { ArrowCounterClockwise, CaretDown } from "@phosphor-icons/react";
146
146
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
147
147
  import React4, { useState as useState3 } from "react";
148
- import { Button as Button2, Popover, useTranslation as useTranslation2, Tooltip as Tooltip2 } from "@dxos/react-ui";
148
+ import { Button as Button2, Popover, useTranslation as useTranslation2, Tooltip as Tooltip2, useMediaQuery } from "@dxos/react-ui";
149
149
  import { getSize as getSize2 } from "@dxos/react-ui-theme";
150
150
  var EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear }) => {
151
151
  const { t } = useTranslation2("os");
152
+ const [isMd] = useMediaQuery("md", {
153
+ ssr: false
154
+ });
152
155
  const [emojiValue, setEmojiValue] = useControllableState({
153
156
  prop: emoji,
154
157
  onChange: onChangeEmoji,
@@ -172,6 +175,7 @@ var EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear
172
175
  className: getSize2(4)
173
176
  }))), /* @__PURE__ */ React4.createElement(Popover.Content, {
174
177
  side: "right",
178
+ sideOffset: isMd ? 0 : -310,
175
179
  onKeyDownCapture: (event) => {
176
180
  if (event.key === "Escape") {
177
181
  event.stopPropagation();
@@ -918,7 +922,7 @@ import { Dialog, useId as useId9 } from "@dxos/react-ui";
918
922
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
919
923
  import React29, { useEffect as useEffect3, useMemo as useMemo3 } from "react";
920
924
  import { generateName as generateName3 } from "@dxos/display-name";
921
- import { log as log5 } from "@dxos/log";
925
+ import { log as log6 } from "@dxos/log";
922
926
  import { useClient as useClient3 } from "@dxos/react-client";
923
927
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
924
928
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
@@ -942,6 +946,24 @@ var identityMachine = createMachine({
942
946
  src: (context) => context.identitySubscribable
943
947
  },
944
948
  states: {
949
+ unknown: {
950
+ always: [
951
+ {
952
+ cond: "initiallyManagingDeviceInvitation",
953
+ target: "managingDeviceInvitation",
954
+ actions: "log"
955
+ },
956
+ {
957
+ cond: "initiallyManagingProfile",
958
+ target: "managingProfile",
959
+ actions: "log"
960
+ },
961
+ {
962
+ target: "choosingAction",
963
+ actions: "log"
964
+ }
965
+ ]
966
+ },
945
967
  choosingAction: {},
946
968
  managingDeviceInvitation: {},
947
969
  managingAgent: {
@@ -972,7 +994,8 @@ var identityMachine = createMachine({
972
994
  }
973
995
  }
974
996
  },
975
- signingOut: {}
997
+ confirmingResetStorage: {},
998
+ confirmingJoinNewIdentity: {}
976
999
  },
977
1000
  on: {
978
1001
  unchooseAction: {
@@ -1004,8 +1027,12 @@ var identityMachine = createMachine({
1004
1027
  target: ".managingProfile",
1005
1028
  actions: "log"
1006
1029
  },
1007
- chooseSignOut: {
1008
- target: ".signingOut",
1030
+ chooseJoinNewIdentity: {
1031
+ target: ".confirmingJoinNewIdentity",
1032
+ actions: "log"
1033
+ },
1034
+ chooseResetStorage: {
1035
+ target: ".confirmingResetStorage",
1009
1036
  actions: "log"
1010
1037
  },
1011
1038
  chooseAgent: {
@@ -1014,6 +1041,10 @@ var identityMachine = createMachine({
1014
1041
  }
1015
1042
  }
1016
1043
  }, {
1044
+ guards: {
1045
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation",
1046
+ initiallyManagingProfile: ({ initialDisposition }, _event) => initialDisposition === "manage-profile"
1047
+ },
1017
1048
  actions: {
1018
1049
  setIdentity: assign({
1019
1050
  identity: (context, event) => event?.identity ?? null
@@ -1030,7 +1061,7 @@ var identityMachine = createMachine({
1030
1061
  context
1031
1062
  }, {
1032
1063
  F: __dxlog_file,
1033
- L: 104,
1064
+ L: 126,
1034
1065
  S: void 0,
1035
1066
  C: (f, a) => f(...a)
1036
1067
  });
@@ -1106,7 +1137,7 @@ var DeviceManager = ({ devices, active, send }) => {
1106
1137
  };
1107
1138
 
1108
1139
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1109
- import { CaretRight, Devices, Plus, Power, UserGear, HardDrive } from "@phosphor-icons/react";
1140
+ import { CaretRight, Devices, Plus, Power, UserGear, HardDrive, Intersect } from "@phosphor-icons/react";
1110
1141
  import React25, { useCallback as useCallback4 } from "react";
1111
1142
  import { log as log2 } from "@dxos/log";
1112
1143
  import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
@@ -1164,7 +1195,20 @@ var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone
1164
1195
  density: "coarse"
1165
1196
  }, /* @__PURE__ */ React25.createElement("div", {
1166
1197
  className: "grow justify-center flex flex-col gap-1"
1167
- }, agentHostingEnabled && /* @__PURE__ */ React25.createElement(Action, {
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, {
1168
1212
  "data-testid": "manage-agent",
1169
1213
  onClick: () => send?.({
1170
1214
  type: "chooseAgent"
@@ -1190,35 +1234,35 @@ var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone
1190
1234
  weight: "bold",
1191
1235
  className: getSize8(4)
1192
1236
  })), /* @__PURE__ */ React25.createElement(Action, {
1193
- "data-testid": "manage-devices",
1237
+ "data-testid": "devices-panel.join-new-identity",
1194
1238
  onClick: () => send?.({
1195
- type: "chooseDevices"
1239
+ type: "chooseJoinNewIdentity"
1196
1240
  }),
1197
1241
  classNames: "plb-4"
1198
- }, /* @__PURE__ */ React25.createElement(Devices, {
1242
+ }, /* @__PURE__ */ React25.createElement(Intersect, {
1199
1243
  className: getSize8(6)
1200
1244
  }), /* @__PURE__ */ React25.createElement("span", {
1201
1245
  className: "grow mli-3"
1202
- }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1246
+ }, t("choose join new identity label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1203
1247
  weight: "bold",
1204
1248
  className: getSize8(4)
1205
1249
  })), /* @__PURE__ */ React25.createElement(Action, {
1206
- "data-testid": "manage-profile",
1250
+ "data-testid": "manage-devices",
1207
1251
  onClick: () => send?.({
1208
- type: "chooseProfile"
1252
+ type: "chooseDevices"
1209
1253
  }),
1210
1254
  classNames: "plb-4"
1211
- }, /* @__PURE__ */ React25.createElement(UserGear, {
1255
+ }, /* @__PURE__ */ React25.createElement(Devices, {
1212
1256
  className: getSize8(6)
1213
1257
  }), /* @__PURE__ */ React25.createElement("span", {
1214
1258
  className: "grow mli-3"
1215
- }, t("choose profile label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1259
+ }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1216
1260
  weight: "bold",
1217
1261
  className: getSize8(4)
1218
1262
  })), /* @__PURE__ */ React25.createElement(Action, {
1219
1263
  "data-testid": "devices-panel.sign-out",
1220
1264
  onClick: () => send?.({
1221
- type: "chooseSignOut"
1265
+ type: "chooseResetStorage"
1222
1266
  }),
1223
1267
  classNames: "plb-4"
1224
1268
  }, /* @__PURE__ */ React25.createElement(Power, {
@@ -1319,64 +1363,24 @@ var ProfileFormImpl = (props) => {
1319
1363
  variant: "primary",
1320
1364
  disabled,
1321
1365
  onClick: () => onUpdateProfile?.({
1322
- displayName,
1323
- data: {
1324
- emoji,
1325
- hue
1366
+ ...displayName && {
1367
+ displayName
1368
+ },
1369
+ ...(emoji || hue) && {
1370
+ data: {
1371
+ ...emoji && {
1372
+ emoji
1373
+ },
1374
+ ...hue && {
1375
+ hue
1376
+ }
1377
+ }
1326
1378
  }
1327
1379
  }),
1328
1380
  "data-testid": "update-profile-form-continue"
1329
1381
  }, t("done label"))));
1330
1382
  };
1331
1383
 
1332
- // packages/sdk/shell/src/panels/IdentityPanel/steps/SignOutChooser.tsx
1333
- import { Warning } from "@phosphor-icons/react";
1334
- import React27 from "react";
1335
- import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1336
- import { getSize as getSize9, mx as mx18 } from "@dxos/react-ui-theme";
1337
- var SignOutChooser = (props) => {
1338
- const { t } = useTranslation13("os");
1339
- const onResetDevice = () => {
1340
- if (window.confirm(t("reset device confirm message"))) {
1341
- void props.onResetDevice?.();
1342
- }
1343
- };
1344
- return /* @__PURE__ */ React27.createElement(SignOutChooserImpl, {
1345
- disabled: !props.active,
1346
- onBack: () => props.send?.({
1347
- type: "unchooseAction"
1348
- }),
1349
- onResetDevice,
1350
- onJoinNewIdentity: props.onJoinNewIdentity
1351
- });
1352
- };
1353
- var SignOutChooserImpl = ({ disabled, onResetDevice, onJoinNewIdentity, onBack }) => {
1354
- const { t } = useTranslation13("os");
1355
- return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("div", {
1356
- role: "none",
1357
- className: "grow flex flex-col justify-center"
1358
- }, /* @__PURE__ */ React27.createElement(Message.Root, {
1359
- valence: "error"
1360
- }, /* @__PURE__ */ React27.createElement(Message.Title, null, /* @__PURE__ */ React27.createElement(Warning, {
1361
- className: mx18(getSize9(6), "inline mie-2")
1362
- }), t("sign out chooser title")), /* @__PURE__ */ React27.createElement(Message.Body, null, t("sign out chooser message")))), /* @__PURE__ */ React27.createElement(Actions, null, /* @__PURE__ */ React27.createElement(Action, {
1363
- disabled,
1364
- onClick: onBack
1365
- }, t("back label")), /* @__PURE__ */ React27.createElement(Action, {
1366
- variant: "primary",
1367
- "data-testid": "sign-out.join-new-identity",
1368
- classNames: "!bg-error-500 hover:!bg-error-550",
1369
- disabled,
1370
- onClick: onJoinNewIdentity
1371
- }, t("join new identity label")), /* @__PURE__ */ React27.createElement(Action, {
1372
- variant: "primary",
1373
- "data-testid": "sign-out.reset-device",
1374
- classNames: "!bg-error-500 hover:!bg-error-550",
1375
- disabled,
1376
- onClick: onResetDevice
1377
- }, t("reset device label"))));
1378
- };
1379
-
1380
1384
  // packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
1381
1385
  import { useCallback as useCallback5, useEffect as useEffect2, useState as useState5 } from "react";
1382
1386
  import { invariant } from "@dxos/invariant";
@@ -1478,11 +1482,11 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1478
1482
 
1479
1483
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1480
1484
  import { Check as Check4, X as X3 } from "@phosphor-icons/react";
1481
- import React28, { useMemo as useMemo2 } from "react";
1485
+ import React27, { useMemo as useMemo2 } from "react";
1482
1486
  import { QR } from "react-qr-rounded";
1483
1487
  import { Invitation as Invitation5 } from "@dxos/react-client/invitations";
1484
- import { useId as useId4, useTranslation as useTranslation14 } from "@dxos/react-ui";
1485
- import { descriptionText as descriptionText7, getSize as getSize10, mx as mx19 } from "@dxos/react-ui-theme";
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";
1486
1490
  import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
1487
1491
 
1488
1492
  // packages/sdk/shell/src/util/invitationStatusValue.ts
@@ -1528,13 +1532,13 @@ var invitationStatusValue = /* @__PURE__ */ new Map([
1528
1532
 
1529
1533
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1530
1534
  var InvitationManagerView = ({ children, ...props }) => {
1531
- return /* @__PURE__ */ React28.createElement(Viewport.View, {
1535
+ return /* @__PURE__ */ React27.createElement(Viewport.View, {
1532
1536
  ...props,
1533
1537
  classNames: "grow flex flex-col justify-around items-center"
1534
1538
  }, children);
1535
1539
  };
1536
1540
  var InvitationManager = ({ invitationUrl, active, send, status, type, authCode, id = "0" }) => {
1537
- const { t } = useTranslation14("os");
1541
+ const { t } = useTranslation13("os");
1538
1542
  const qrLabel = useId4("invitation-manager__qr-code");
1539
1543
  const statusValue = type === Invitation5.Type.MULTIUSE ? 0 : invitationStatusValue.get(status) ?? 0;
1540
1544
  const showAuthCode = statusValue === 3;
@@ -1552,50 +1556,50 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1552
1556
  }, [
1553
1557
  statusValue
1554
1558
  ]);
1555
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Viewport.Root, {
1559
+ return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(Viewport.Root, {
1556
1560
  activeView,
1557
1561
  classNames: "grow plb-1"
1558
- }, /* @__PURE__ */ React28.createElement(Viewport.Views, null, /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1562
+ }, /* @__PURE__ */ React27.createElement(Viewport.Views, null, /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1559
1563
  id: "showing qr",
1560
1564
  emoji
1561
- }, /* @__PURE__ */ React28.createElement("p", {
1565
+ }, /* @__PURE__ */ React27.createElement("p", {
1562
1566
  className: "text-sm mlb-1 font-normal text-center"
1563
- }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React28.createElement("div", {
1567
+ }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1564
1568
  role: "none",
1565
- className: mx19(descriptionText7, "is-full max-is-[14rem] relative")
1566
- }, /* @__PURE__ */ React28.createElement(QR, {
1569
+ className: mx18(descriptionText7, "is-full max-is-[14rem] relative")
1570
+ }, /* @__PURE__ */ React27.createElement(QR, {
1567
1571
  rounding: 100,
1568
1572
  backgroundColor: "transparent",
1569
1573
  color: "currentColor",
1570
- className: mx19("is-full bs-full p-2", showAuthCode && "invisible"),
1574
+ className: mx18("is-full bs-full p-2", showAuthCode && "invisible"),
1571
1575
  "aria-labelledby": qrLabel,
1572
1576
  errorCorrectionLevel: "Q",
1573
1577
  cutout: true
1574
- }, invitationUrl ?? "never"), /* @__PURE__ */ React28.createElement(Centered, null, /* @__PURE__ */ React28.createElement(Emoji, {
1578
+ }, invitationUrl ?? "never"), /* @__PURE__ */ React27.createElement(Centered, null, /* @__PURE__ */ React27.createElement(Emoji, {
1575
1579
  text: emoji
1576
- }))), /* @__PURE__ */ React28.createElement("span", {
1580
+ }))), /* @__PURE__ */ React27.createElement("span", {
1577
1581
  id: qrLabel,
1578
1582
  className: "sr-only"
1579
- }, t("qr label")), /* @__PURE__ */ React28.createElement(CopyButton, {
1583
+ }, t("qr label")), /* @__PURE__ */ React27.createElement(CopyButton, {
1580
1584
  variant: "ghost",
1581
1585
  value: invitationUrl ?? "never"
1582
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1586
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1583
1587
  id: "showing auth code"
1584
- }, /* @__PURE__ */ React28.createElement(Label, null, t("auth code message")), /* @__PURE__ */ React28.createElement(AuthCode, {
1588
+ }, /* @__PURE__ */ React27.createElement(Label, null, t("auth code message")), /* @__PURE__ */ React27.createElement(AuthCode, {
1585
1589
  code: authCode,
1586
1590
  large: true,
1587
1591
  classNames: "text-black dark:text-white"
1588
- }), /* @__PURE__ */ React28.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React28.createElement(Emoji, {
1592
+ }), /* @__PURE__ */ React27.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React27.createElement(Emoji, {
1589
1593
  text: emoji
1590
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1594
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1591
1595
  id: "showing final"
1592
- }, statusValue > 0 ? /* @__PURE__ */ React28.createElement(Check4, {
1593
- className: mx19("m-1.5", getSize10(6))
1594
- }) : /* @__PURE__ */ React28.createElement(X3, {
1595
- className: mx19("m-1.5", getSize10(6))
1596
- })))), /* @__PURE__ */ React28.createElement(Actions, {
1596
+ }, statusValue > 0 ? /* @__PURE__ */ React27.createElement(Check4, {
1597
+ className: mx18("m-1.5", getSize9(6))
1598
+ }) : /* @__PURE__ */ React27.createElement(X3, {
1599
+ className: mx18("m-1.5", getSize9(6))
1600
+ })))), /* @__PURE__ */ React27.createElement(Actions, {
1597
1601
  classNames: "mbs-4"
1598
- }, /* @__PURE__ */ React28.createElement(Action, {
1602
+ }, /* @__PURE__ */ React27.createElement(Action, {
1599
1603
  disabled: !active,
1600
1604
  onClick: () => send?.({
1601
1605
  type: "deselectInvitation"
@@ -1603,8 +1607,75 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1603
1607
  }, t("back label"))));
1604
1608
  };
1605
1609
 
1610
+ // packages/sdk/shell/src/steps/ConfirmReset.tsx
1611
+ import { Warning } from "@phosphor-icons/react";
1612
+ import React28, { useState as useState6 } from "react";
1613
+ import { log as log5 } from "@dxos/log";
1614
+ import { Message, useTranslation as useTranslation14 } from "@dxos/react-ui";
1615
+ import { getSize as getSize10, mx as mx19 } from "@dxos/react-ui-theme";
1616
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
1617
+ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1618
+ const { t } = useTranslation14("os");
1619
+ const [validationMessage, setValidationMessage] = useState6("");
1620
+ const [pending, setPending] = useState6(false);
1621
+ const processReset = async () => {
1622
+ setPending(true);
1623
+ return onConfirm?.().then(() => setPending(false), (error) => {
1624
+ log5.catch(error, void 0, {
1625
+ F: __dxlog_file5,
1626
+ L: 38,
1627
+ S: void 0,
1628
+ C: (f, a) => f(...a)
1629
+ });
1630
+ setValidationMessage(t("failed to reset identity message"));
1631
+ setPending(false);
1632
+ });
1633
+ };
1634
+ return /* @__PURE__ */ React28.createElement(ConfirmResetImpl, {
1635
+ disabled: !active,
1636
+ pending,
1637
+ validationMessage,
1638
+ onConfirm: processReset,
1639
+ onCancel,
1640
+ mode
1641
+ });
1642
+ };
1643
+ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCancel, mode }) => {
1644
+ const { t } = useTranslation14("os");
1645
+ const confirmationValue = t("confirmation value");
1646
+ const [inputValue, setInputValue] = useState6("");
1647
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("div", {
1648
+ role: "none",
1649
+ className: "grow flex flex-col gap-2 justify-center"
1650
+ }, /* @__PURE__ */ React28.createElement(Message.Root, {
1651
+ valence: "error"
1652
+ }, /* @__PURE__ */ React28.createElement(Message.Title, null, /* @__PURE__ */ React28.createElement(Warning, {
1653
+ className: mx19(getSize10(6), "inline mie-2")
1654
+ }), t("sign out chooser title")), /* @__PURE__ */ React28.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React28.createElement(Input, {
1655
+ validationMessage,
1656
+ label: /* @__PURE__ */ React28.createElement(StepHeading, {
1657
+ className: "text-start mlb-2"
1658
+ }, t(mode === "join new identity" ? "join new identity input label" : "reset storage input label", {
1659
+ confirmationValue
1660
+ })),
1661
+ disabled,
1662
+ "data-testid": "reset-identity-input",
1663
+ placeholder: confirmationValue,
1664
+ onChange: ({ target: { value } }) => setInputValue(value)
1665
+ })), /* @__PURE__ */ React28.createElement(Actions, null, onCancel && /* @__PURE__ */ React28.createElement(Action, {
1666
+ disabled,
1667
+ onClick: onCancel,
1668
+ "data-testid": "reset-identity-input-cancel"
1669
+ }, t("cancel label")), onConfirm && /* @__PURE__ */ React28.createElement(Action, {
1670
+ variant: "destructive",
1671
+ disabled: disabled || pending || inputValue !== confirmationValue,
1672
+ onClick: onConfirm,
1673
+ "data-testid": "reset-identity-input-confirm"
1674
+ }, pending ? t("reset in progress label") : t("reset device label"))));
1675
+ };
1676
+
1606
1677
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
1607
- var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1678
+ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
1608
1679
  var viewStyles = "pbs-1 pbe-3 pli-3";
1609
1680
  var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1610
1681
  const fallbackValue = keyToFallback2(identity.identityKey);
@@ -1629,7 +1700,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1629
1700
  }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex()))));
1630
1701
  };
1631
1702
  var IdentityPanelImpl = (props) => {
1632
- const { identity, titleId, activeView, onUpdateProfile, onResetDevice, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1703
+ const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1633
1704
  const { t } = useTranslation15("os");
1634
1705
  const title = useMemo3(() => {
1635
1706
  switch (activeView) {
@@ -1644,6 +1715,7 @@ var IdentityPanelImpl = (props) => {
1644
1715
  activeView,
1645
1716
  t
1646
1717
  ]);
1718
+ const onCancelReset = () => rest.send?.("unchooseAction");
1647
1719
  return /* @__PURE__ */ React29.createElement(DensityProvider2, {
1648
1720
  density: "fine"
1649
1721
  }, /* @__PURE__ */ React29.createElement(IdentityHeading, {
@@ -1680,14 +1752,6 @@ var IdentityPanelImpl = (props) => {
1680
1752
  active: activeView === "update profile form",
1681
1753
  identity,
1682
1754
  onUpdateProfile
1683
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1684
- classNames: viewStyles,
1685
- id: "signing out"
1686
- }, /* @__PURE__ */ React29.createElement(SignOutChooser, {
1687
- send: rest.send,
1688
- active: activeView === "signing out",
1689
- onResetDevice,
1690
- onJoinNewIdentity
1691
1755
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1692
1756
  classNames: viewStyles,
1693
1757
  id: "agent manager"
@@ -1695,6 +1759,24 @@ var IdentityPanelImpl = (props) => {
1695
1759
  send: rest.send,
1696
1760
  active: activeView === "agent manager",
1697
1761
  ...rest
1762
+ })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1763
+ classNames: viewStyles,
1764
+ id: "confirm join new identity"
1765
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1766
+ active: activeView === "confirm join new identity",
1767
+ ...rest,
1768
+ mode: "join new identity",
1769
+ onConfirm: onJoinNewIdentity,
1770
+ onCancel: onCancelReset
1771
+ })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1772
+ classNames: viewStyles,
1773
+ id: "confirm reset storage"
1774
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1775
+ active: activeView === "confirm reset storage",
1776
+ ...rest,
1777
+ mode: "reset storage",
1778
+ onConfirm: onResetStorage,
1779
+ onCancel: onCancelReset
1698
1780
  })))));
1699
1781
  };
1700
1782
  var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
@@ -1704,7 +1786,7 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1704
1786
  ...invitationStatus
1705
1787
  });
1706
1788
  };
1707
- var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
1789
+ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1708
1790
  const titleId = useId5("identityPanel__heading", propsTitleId);
1709
1791
  const client = useClient3();
1710
1792
  const devices = useDevices();
@@ -1716,20 +1798,24 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1716
1798
  invitations
1717
1799
  });
1718
1800
  if (!identity) {
1719
- log5.error("IdentityPanel rendered with no active identity.", void 0, {
1720
- F: __dxlog_file5,
1721
- L: 132,
1801
+ log6.error("IdentityPanel rendered with no active identity.", void 0, {
1802
+ F: __dxlog_file6,
1803
+ L: 145,
1722
1804
  S: void 0,
1723
1805
  C: (f, a) => f(...a)
1724
1806
  });
1725
1807
  return null;
1726
1808
  }
1727
- const [identityState, identitySend, identityService] = useIdentityMachine(client);
1809
+ const [identityState, identitySend, identityService] = useIdentityMachine(client, {
1810
+ context: {
1811
+ initialDisposition
1812
+ }
1813
+ });
1728
1814
  useEffect3(() => {
1729
1815
  const subscription = identityService.subscribe((state) => {
1730
- log5("[state]", state, {
1731
- F: __dxlog_file5,
1732
- L: 139,
1816
+ log6("[state]", state, {
1817
+ F: __dxlog_file6,
1818
+ L: 154,
1733
1819
  S: void 0,
1734
1820
  C: (f, a) => f(...a)
1735
1821
  });
@@ -1755,8 +1841,10 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1755
1841
  }
1756
1842
  ].some(identityState.matches):
1757
1843
  return "update profile form";
1758
- case identityState.matches("signingOut"):
1759
- return "signing out";
1844
+ case identityState.matches("confirmingResetStorage"):
1845
+ return "confirm reset storage";
1846
+ case identityState.matches("confirmingJoinNewIdentity"):
1847
+ return "confirm join new identity";
1760
1848
  case [
1761
1849
  {
1762
1850
  managingAgent: "idle"
@@ -1796,9 +1884,9 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1796
1884
  };
1797
1885
 
1798
1886
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
1799
- import React39, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1887
+ import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1800
1888
  import { log as log10 } from "@dxos/log";
1801
- import { useClient as useClient6, useMulticastObservable } from "@dxos/react-client";
1889
+ import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1802
1890
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1803
1891
  import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1804
1892
 
@@ -1839,14 +1927,14 @@ var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActi
1839
1927
  import { useMachine as useMachine2 } from "@xstate/react";
1840
1928
  import { useCallback as useCallback6 } from "react";
1841
1929
  import { assign as assign2, createMachine as createMachine2 } from "xstate";
1842
- import { log as log6 } from "@dxos/log";
1930
+ import { log as log7 } from "@dxos/log";
1843
1931
  import { AlreadyJoinedError } from "@dxos/react-client";
1844
1932
  import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1845
- var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1933
+ var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
1846
1934
  var getInvitationSubscribable = (Kind, invitation) => {
1847
- log6("[subscribing to invitation]", invitation, {
1848
- F: __dxlog_file6,
1849
- L: 88,
1935
+ log7("[subscribing to invitation]", invitation, {
1936
+ F: __dxlog_file7,
1937
+ L: 90,
1850
1938
  S: void 0,
1851
1939
  C: (f, a) => f(...a)
1852
1940
  });
@@ -1854,12 +1942,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1854
1942
  subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
1855
1943
  switch (invitation2.state) {
1856
1944
  case Invitation6.State.CONNECTING: {
1857
- log6("[invitation connecting]", {
1945
+ log7("[invitation connecting]", {
1858
1946
  Kind,
1859
1947
  invitation: invitation2
1860
1948
  }, {
1861
- F: __dxlog_file6,
1862
- L: 99,
1949
+ F: __dxlog_file7,
1950
+ L: 101,
1863
1951
  S: void 0,
1864
1952
  C: (f, a) => f(...a)
1865
1953
  });
@@ -1869,12 +1957,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1869
1957
  });
1870
1958
  }
1871
1959
  case Invitation6.State.CONNECTED: {
1872
- log6("[invitation connected]", {
1960
+ log7("[invitation connected]", {
1873
1961
  Kind,
1874
1962
  invitation: invitation2
1875
1963
  }, {
1876
- F: __dxlog_file6,
1877
- L: 104,
1964
+ F: __dxlog_file7,
1965
+ L: 106,
1878
1966
  S: void 0,
1879
1967
  C: (f, a) => f(...a)
1880
1968
  });
@@ -1884,12 +1972,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1884
1972
  });
1885
1973
  }
1886
1974
  case Invitation6.State.READY_FOR_AUTHENTICATION: {
1887
- log6("[invitation ready for authentication]", {
1975
+ log7("[invitation ready for authentication]", {
1888
1976
  Kind,
1889
1977
  invitation: invitation2
1890
1978
  }, {
1891
- F: __dxlog_file6,
1892
- L: 109,
1979
+ F: __dxlog_file7,
1980
+ L: 111,
1893
1981
  S: void 0,
1894
1982
  C: (f, a) => f(...a)
1895
1983
  });
@@ -1899,12 +1987,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1899
1987
  });
1900
1988
  }
1901
1989
  case Invitation6.State.AUTHENTICATING: {
1902
- log6("[invitation authenticating]", {
1990
+ log7("[invitation authenticating]", {
1903
1991
  Kind,
1904
1992
  invitation: invitation2
1905
1993
  }, {
1906
- F: __dxlog_file6,
1907
- L: 114,
1994
+ F: __dxlog_file7,
1995
+ L: 116,
1908
1996
  S: void 0,
1909
1997
  C: (f, a) => f(...a)
1910
1998
  });
@@ -1914,12 +2002,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1914
2002
  });
1915
2003
  }
1916
2004
  case Invitation6.State.SUCCESS: {
1917
- log6("[invitation success]", {
2005
+ log7("[invitation success]", {
1918
2006
  Kind,
1919
2007
  invitation: invitation2
1920
2008
  }, {
1921
- F: __dxlog_file6,
1922
- L: 119,
2009
+ F: __dxlog_file7,
2010
+ L: 121,
1923
2011
  S: void 0,
1924
2012
  C: (f, a) => f(...a)
1925
2013
  });
@@ -1930,11 +2018,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
1930
2018
  return complete?.();
1931
2019
  }
1932
2020
  case Invitation6.State.CANCELLED: {
1933
- log6.warn("[invitation cancelled]", {
2021
+ log7.warn("[invitation cancelled]", {
1934
2022
  Kind
1935
2023
  }, {
1936
- F: __dxlog_file6,
1937
- L: 125,
2024
+ F: __dxlog_file7,
2025
+ L: 127,
1938
2026
  S: void 0,
1939
2027
  C: (f, a) => f(...a)
1940
2028
  });
@@ -1944,11 +2032,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
1944
2032
  });
1945
2033
  }
1946
2034
  case Invitation6.State.TIMEOUT: {
1947
- log6.error("[invitation timeout]", {
2035
+ log7.error("[invitation timeout]", {
1948
2036
  Kind
1949
2037
  }, {
1950
- F: __dxlog_file6,
1951
- L: 130,
2038
+ F: __dxlog_file7,
2039
+ L: 132,
1952
2040
  S: void 0,
1953
2041
  C: (f, a) => f(...a)
1954
2042
  });
@@ -1960,12 +2048,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1960
2048
  }
1961
2049
  }, (error) => {
1962
2050
  if (error instanceof AlreadyJoinedError) {
1963
- log6("[already joined]", {
2051
+ log7("[already joined]", {
1964
2052
  Kind,
1965
2053
  error
1966
2054
  }, {
1967
- F: __dxlog_file6,
1968
- L: 137,
2055
+ F: __dxlog_file7,
2056
+ L: 139,
1969
2057
  S: void 0,
1970
2058
  C: (f, a) => f(...a)
1971
2059
  });
@@ -1975,12 +2063,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1975
2063
  });
1976
2064
  return complete?.();
1977
2065
  }
1978
- log6.error("[invitation errored]", {
2066
+ log7.error("[invitation errored]", {
1979
2067
  Kind,
1980
2068
  error
1981
2069
  }, {
1982
- F: __dxlog_file6,
1983
- L: 142,
2070
+ F: __dxlog_file7,
2071
+ L: 144,
1984
2072
  S: void 0,
1985
2073
  C: (f, a) => f(...a)
1986
2074
  });
@@ -2152,6 +2240,7 @@ var joinMachine = createMachine2({
2152
2240
  id: "join",
2153
2241
  predictableActionArguments: true,
2154
2242
  context: {
2243
+ initialDisposition: "default",
2155
2244
  mode: "default",
2156
2245
  identity: null,
2157
2246
  halo: {},
@@ -2166,6 +2255,11 @@ var joinMachine = createMachine2({
2166
2255
  target: "resettingIdentity",
2167
2256
  actions: "log"
2168
2257
  },
2258
+ {
2259
+ cond: "initiallyAcceptingHaloInvitation",
2260
+ target: "#join.choosingIdentity.acceptingHaloInvitation",
2261
+ actions: "log"
2262
+ },
2169
2263
  {
2170
2264
  cond: "noSelectedIdentity",
2171
2265
  target: "choosingIdentity",
@@ -2248,6 +2342,7 @@ var joinMachine = createMachine2({
2248
2342
  guards: {
2249
2343
  existingIdentity: ({ identity, mode }, _event) => mode === "halo-only" && !!identity,
2250
2344
  noSelectedIdentity: ({ identity }, _event) => !identity,
2345
+ initiallyAcceptingHaloInvitation: ({ identity, initialDisposition }, _event) => !identity && initialDisposition === "accept-halo-invitation",
2251
2346
  hasHaloUnredeemedCode: ({ halo }, _event) => !!halo.unredeemedCode,
2252
2347
  noSpaceInvitation: ({ space }, _event) => !space.invitation && !space.unredeemedCode
2253
2348
  },
@@ -2299,13 +2394,13 @@ var joinMachine = createMachine2({
2299
2394
  } : context.space
2300
2395
  }),
2301
2396
  log: (context, event) => {
2302
- log6("[transition]", {
2397
+ log7("[transition]", {
2303
2398
  event,
2304
2399
  haloInvitation: context.halo.invitation,
2305
2400
  spaceInvitation: context.space.invitation
2306
2401
  }, {
2307
- F: __dxlog_file6,
2308
- L: 406,
2402
+ F: __dxlog_file7,
2403
+ L: 416,
2309
2404
  S: void 0,
2310
2405
  C: (f, a) => f(...a)
2311
2406
  });
@@ -2317,9 +2412,9 @@ var defaultCodeFromUrl = (invitationType, text) => {
2317
2412
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2318
2413
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2319
2414
  } catch (err) {
2320
- log6.catch(err, void 0, {
2321
- F: __dxlog_file6,
2322
- L: 433,
2415
+ log7.catch(err, void 0, {
2416
+ F: __dxlog_file7,
2417
+ L: 443,
2323
2418
  S: void 0,
2324
2419
  C: (f, a) => f(...a)
2325
2420
  });
@@ -2338,9 +2433,9 @@ var useJoinMachine = (client, options) => {
2338
2433
  invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
2339
2434
  };
2340
2435
  } catch (err) {
2341
- log6.error("Could not redeem device invitation code", err, {
2342
- F: __dxlog_file6,
2343
- L: 454,
2436
+ log7.error("Could not redeem device invitation code", err, {
2437
+ F: __dxlog_file7,
2438
+ L: 464,
2344
2439
  S: void 0,
2345
2440
  C: (f, a) => f(...a)
2346
2441
  });
@@ -2363,9 +2458,9 @@ var useJoinMachine = (client, options) => {
2363
2458
  invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
2364
2459
  };
2365
2460
  } catch (err) {
2366
- log6.error("Could not redeem space invitation code", err, {
2367
- F: __dxlog_file6,
2368
- L: 476,
2461
+ log7.error("Could not redeem space invitation code", err, {
2462
+ F: __dxlog_file7,
2463
+ L: 486,
2369
2464
  S: void 0,
2370
2465
  C: (f, a) => f(...a)
2371
2466
  });
@@ -2528,17 +2623,17 @@ var IdentityAdded = (props) => {
2528
2623
  };
2529
2624
 
2530
2625
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2531
- import React33, { useState as useState6 } from "react";
2532
- import { log as log7 } from "@dxos/log";
2626
+ import React33, { useState as useState7 } from "react";
2627
+ import { log as log8 } from "@dxos/log";
2533
2628
  import { useClient as useClient4 } from "@dxos/react-client";
2534
2629
  import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2535
- var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2630
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2536
2631
  var IdentityInput = (props) => {
2537
2632
  const { send, method } = props;
2538
2633
  const isRecover = method === "recover identity";
2539
2634
  const client = useClient4();
2540
2635
  const { t } = useTranslation19("os");
2541
- const [validationMessage, setValidationMessage] = useState6("");
2636
+ const [validationMessage, setValidationMessage] = useState7("");
2542
2637
  const createIdentity = (displayName) => {
2543
2638
  void client.halo.createIdentity({
2544
2639
  [isRecover ? "seedphrase" : "displayName"]: displayName
@@ -2548,8 +2643,8 @@ var IdentityInput = (props) => {
2548
2643
  identity
2549
2644
  });
2550
2645
  }, (error) => {
2551
- log7.catch(error, void 0, {
2552
- F: __dxlog_file7,
2646
+ log8.catch(error, void 0, {
2647
+ F: __dxlog_file8,
2553
2648
  L: 37,
2554
2649
  S: void 0,
2555
2650
  C: (f, a) => f(...a)
@@ -2567,7 +2662,7 @@ var IdentityInputImpl = (props) => {
2567
2662
  const { method, send, active, onDisplayNameConfirm, validationMessage } = props;
2568
2663
  const disabled = !active;
2569
2664
  const { t } = useTranslation19("os");
2570
- const [inputValue, setInputValue] = useState6("");
2665
+ const [inputValue, setInputValue] = useState7("");
2571
2666
  const isRecover = method === "recover identity";
2572
2667
  return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
2573
2668
  role: "none",
@@ -2617,18 +2712,18 @@ var InvitationAccepted = (props) => {
2617
2712
  };
2618
2713
 
2619
2714
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2620
- import React35, { useState as useState7, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2621
- import { log as log8 } from "@dxos/log";
2715
+ import React35, { useState as useState8, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2716
+ import { log as log9 } from "@dxos/log";
2622
2717
  import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2623
- var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2718
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2624
2719
  var invitationCodeFromUrl = (text) => {
2625
2720
  try {
2626
2721
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2627
2722
  const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
2628
2723
  return invitation ?? text;
2629
2724
  } catch (err) {
2630
- log8.catch(err, void 0, {
2631
- F: __dxlog_file8,
2725
+ log9.catch(err, void 0, {
2726
+ F: __dxlog_file9,
2632
2727
  L: 25,
2633
2728
  S: void 0,
2634
2729
  C: (f, a) => f(...a)
@@ -2640,7 +2735,7 @@ var InvitationInput = (props) => {
2640
2735
  const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
2641
2736
  const disabled = !active;
2642
2737
  const { t } = useTranslation21("os");
2643
- const [inputValue, setInputValue] = useState7(unredeemedCode ?? "");
2738
+ const [inputValue, setInputValue] = useState8(unredeemedCode ?? "");
2644
2739
  useEffect4(() => {
2645
2740
  unredeemedCode && setInputValue(unredeemedCode ?? "");
2646
2741
  }, [
@@ -2759,7 +2854,7 @@ var InvitationRescuer = (props) => {
2759
2854
  };
2760
2855
 
2761
2856
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
2762
- import React37, { useState as useState8 } from "react";
2857
+ import React37, { useState as useState9 } from "react";
2763
2858
  import { Input as Input2, useTranslation as useTranslation23 } from "@dxos/react-ui";
2764
2859
  import { hexToEmoji as hexToEmoji4 } from "@dxos/util";
2765
2860
  var pinLength = 6;
@@ -2767,7 +2862,7 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2767
2862
  const disabled = !active || pending;
2768
2863
  const { t } = useTranslation23("os");
2769
2864
  const invitationType = Kind.toLowerCase();
2770
- const [authCode, setAuthCode] = useState8("");
2865
+ const [authCode, setAuthCode] = useState9("");
2771
2866
  const onChange = ({ target: { value } }) => {
2772
2867
  setAuthCode(value);
2773
2868
  if (value.length === pinLength) {
@@ -2810,64 +2905,6 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2810
2905
  }, t("next label"))));
2811
2906
  };
2812
2907
 
2813
- // packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx
2814
- import React38, { useState as useState9 } from "react";
2815
- import { log as log9 } from "@dxos/log";
2816
- import { useClient as useClient5 } from "@dxos/react-client";
2817
- import { useTranslation as useTranslation24 } from "@dxos/react-ui";
2818
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx";
2819
- var ResetIdentity = ({ send, active }) => {
2820
- const client = useClient5();
2821
- const { t } = useTranslation24("os");
2822
- const [validationMessage, setValidationMessage] = useState9("");
2823
- const [pending, setPending] = useState9(false);
2824
- const resetIdentity = () => {
2825
- setPending(true);
2826
- void client.reset().then(() => send?.({
2827
- type: "resetIdentity"
2828
- }), (error) => {
2829
- log9.catch(error, void 0, {
2830
- F: __dxlog_file9,
2831
- L: 35,
2832
- S: void 0,
2833
- C: (f, a) => f(...a)
2834
- });
2835
- setValidationMessage(t("failed to reset identity message"));
2836
- setPending(false);
2837
- });
2838
- };
2839
- return /* @__PURE__ */ React38.createElement(ResetIdentityImpl, {
2840
- disabled: !active,
2841
- pending,
2842
- validationMessage,
2843
- onConfirm: () => resetIdentity()
2844
- });
2845
- };
2846
- var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm }) => {
2847
- const { t } = useTranslation24("os");
2848
- const confirmationValue = t("confirmation value");
2849
- const [inputValue, setInputValue] = useState9("");
2850
- return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("div", {
2851
- role: "none",
2852
- className: "grow flex flex-col justify-center"
2853
- }, /* @__PURE__ */ React38.createElement(Input, {
2854
- validationMessage,
2855
- label: /* @__PURE__ */ React38.createElement(StepHeading, null, t("reset identity input label", {
2856
- confirmationValue
2857
- })),
2858
- disabled,
2859
- "data-testid": "reset-identity-input",
2860
- placeholder: confirmationValue,
2861
- onChange: ({ target: { value } }) => setInputValue(value)
2862
- })), /* @__PURE__ */ React38.createElement(Actions, null, /* @__PURE__ */ React38.createElement(Action, {
2863
- // TODO(wittjosiah): Probably make this red?
2864
- variant: "primary",
2865
- disabled: disabled || pending || inputValue !== confirmationValue,
2866
- onClick: () => onConfirm?.(),
2867
- "data-testid": "reset-identity-input-confirm"
2868
- }, pending ? t("reset in progress label") : t("confirm label"))));
2869
- };
2870
-
2871
2908
  // packages/sdk/shell/src/styles/panelStyles.ts
2872
2909
  var stepStyles = "pbs-1 pbe-3 pli-3";
2873
2910
 
@@ -2895,48 +2932,49 @@ var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTe
2895
2932
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2896
2933
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2897
2934
  var JoinPanelImpl = (props) => {
2898
- const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
2899
- return /* @__PURE__ */ React39.createElement(DensityProvider3, {
2935
+ 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;
2936
+ return /* @__PURE__ */ React38.createElement(DensityProvider3, {
2900
2937
  density: "fine"
2901
- }, mode !== "halo-only" && /* @__PURE__ */ React39.createElement(JoinHeading, {
2938
+ }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
2902
2939
  titleId,
2903
2940
  mode,
2904
2941
  onExit,
2905
2942
  exitActionParent
2906
- }), /* @__PURE__ */ React39.createElement(Viewport.Root, {
2943
+ }), /* @__PURE__ */ React38.createElement(Viewport.Root, {
2907
2944
  focusManaged: true,
2908
2945
  activeView
2909
- }, /* @__PURE__ */ React39.createElement(Viewport.Views, null, /* @__PURE__ */ React39.createElement(Viewport.View, {
2946
+ }, /* @__PURE__ */ React38.createElement(Viewport.Views, null, /* @__PURE__ */ React38.createElement(Viewport.View, {
2910
2947
  classNames: stepStyles,
2911
2948
  id: "addition method chooser"
2912
- }, /* @__PURE__ */ React39.createElement(AdditionMethodChooser, {
2949
+ }, /* @__PURE__ */ React38.createElement(AdditionMethodChooser, {
2913
2950
  send,
2914
2951
  active: activeView === "addition method chooser"
2915
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2952
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2916
2953
  classNames: stepStyles,
2917
- id: "reset identity confirmation"
2918
- }, /* @__PURE__ */ React39.createElement(ResetIdentityComponent, {
2954
+ id: "reset storage confirmation"
2955
+ }, /* @__PURE__ */ React38.createElement(ConfirmResetComponent, {
2919
2956
  send,
2920
- method: "reset identity",
2921
- active: activeView === "reset identity confirmation"
2922
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2957
+ active: activeView === "reset identity confirmation",
2958
+ onCancel: onCancelResetStorage,
2959
+ onConfirm: onConfirmResetStorage
2960
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2923
2961
  classNames: stepStyles,
2924
2962
  id: "create identity input"
2925
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2963
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2926
2964
  send,
2927
2965
  method: "create identity",
2928
2966
  active: activeView === "create identity input"
2929
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2967
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2930
2968
  classNames: stepStyles,
2931
2969
  id: "recover identity input"
2932
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2970
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2933
2971
  send,
2934
2972
  method: "recover identity",
2935
2973
  active: activeView === "recover identity input"
2936
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2974
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2937
2975
  classNames: stepStyles,
2938
2976
  id: "halo invitation input"
2939
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
2977
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
2940
2978
  send,
2941
2979
  Kind: "Halo",
2942
2980
  active: activeView === "halo invitation input",
@@ -2946,20 +2984,20 @@ var JoinPanelImpl = (props) => {
2946
2984
  ...succeededKeys?.Halo && {
2947
2985
  succeededKeys: succeededKeys.Halo
2948
2986
  }
2949
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2987
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2950
2988
  classNames: stepStyles,
2951
2989
  id: "halo invitation rescuer"
2952
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
2990
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
2953
2991
  send,
2954
2992
  Kind: "Halo",
2955
2993
  active: activeView === "halo invitation rescuer",
2956
2994
  invitationState: invitationStates?.Halo,
2957
2995
  onInvitationCancel: onHaloInvitationCancel,
2958
2996
  failReason: failReasons?.Halo
2959
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2997
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2960
2998
  classNames: stepStyles,
2961
2999
  id: "halo invitation authenticator"
2962
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3000
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
2963
3001
  send,
2964
3002
  Kind: "Halo",
2965
3003
  active: activeView === "halo invitation authenticator",
@@ -2968,28 +3006,28 @@ var JoinPanelImpl = (props) => {
2968
3006
  ...failed.has("Halo") && {
2969
3007
  failed: true
2970
3008
  }
2971
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3009
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2972
3010
  classNames: stepStyles,
2973
3011
  id: "halo invitation accepted"
2974
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3012
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
2975
3013
  send,
2976
3014
  Kind: "Halo",
2977
3015
  active: activeView === "halo invitation accepted",
2978
3016
  doneActionParent,
2979
3017
  onDone: onHaloDone
2980
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3018
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2981
3019
  classNames: stepStyles,
2982
3020
  id: "identity added"
2983
- }, /* @__PURE__ */ React39.createElement(IdentityAdded, {
3021
+ }, /* @__PURE__ */ React38.createElement(IdentityAdded, {
2984
3022
  send,
2985
3023
  mode,
2986
3024
  active: activeView === "identity added",
2987
3025
  doneActionParent,
2988
3026
  onDone: onHaloDone
2989
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3027
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2990
3028
  classNames: stepStyles,
2991
3029
  id: "space invitation input"
2992
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
3030
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
2993
3031
  send,
2994
3032
  Kind: "Space",
2995
3033
  active: activeView === "space invitation input",
@@ -3001,20 +3039,20 @@ var JoinPanelImpl = (props) => {
3001
3039
  },
3002
3040
  onExit,
3003
3041
  exitActionParent
3004
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3042
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3005
3043
  classNames: stepStyles,
3006
3044
  id: "space invitation rescuer"
3007
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
3045
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
3008
3046
  send,
3009
3047
  Kind: "Space",
3010
3048
  active: activeView === "space invitation rescuer",
3011
3049
  invitationState: invitationStates?.Space,
3012
3050
  onInvitationCancel: onSpaceInvitationCancel,
3013
3051
  failReason: failReasons?.Space
3014
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3052
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3015
3053
  classNames: stepStyles,
3016
3054
  id: "space invitation authenticator"
3017
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3055
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
3018
3056
  send,
3019
3057
  Kind: "Space",
3020
3058
  active: activeView === "space invitation authenticator",
@@ -3023,10 +3061,10 @@ var JoinPanelImpl = (props) => {
3023
3061
  ...failed.has("Space") && {
3024
3062
  failed: true
3025
3063
  }
3026
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3064
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3027
3065
  classNames: stepStyles,
3028
3066
  id: "space invitation accepted"
3029
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3067
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
3030
3068
  send,
3031
3069
  Kind: "Space",
3032
3070
  active: activeView === "space invitation accepted",
@@ -3034,14 +3072,15 @@ var JoinPanelImpl = (props) => {
3034
3072
  onDone: onSpaceDone
3035
3073
  })))));
3036
3074
  };
3037
- var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone }) => {
3038
- const client = useClient6();
3075
+ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetStorage }) => {
3076
+ const client = useClient5();
3039
3077
  const identity = useIdentity2();
3040
3078
  const { hasIosKeyboard } = useThemeContext4();
3041
3079
  const titleId = useId7("joinPanel__heading", propsTitleId);
3042
3080
  const [joinState, joinSend, joinService] = useJoinMachine(client, {
3043
3081
  context: {
3044
3082
  mode,
3083
+ initialDisposition,
3045
3084
  identity,
3046
3085
  ...initialInvitationCode && {
3047
3086
  [mode === "halo-only" ? "halo" : "space"]: {
@@ -3054,7 +3093,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3054
3093
  const subscription = joinService.subscribe((state) => {
3055
3094
  log10("[state]", state, {
3056
3095
  F: __dxlog_file10,
3057
- L: 198,
3096
+ L: 204,
3058
3097
  S: void 0,
3059
3098
  C: (f, a) => f(...a)
3060
3099
  });
@@ -3266,7 +3305,15 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3266
3305
  joinState,
3267
3306
  propsOnDone
3268
3307
  ]);
3269
- return /* @__PURE__ */ React39.createElement(JoinPanelImpl, {
3308
+ const onConfirmResetStorage = useCallback7(() => client.reset().then(() => {
3309
+ joinSend({
3310
+ type: "resetIdentity"
3311
+ });
3312
+ }), [
3313
+ client,
3314
+ joinSend
3315
+ ]);
3316
+ return /* @__PURE__ */ React38.createElement(JoinPanelImpl, {
3270
3317
  titleId,
3271
3318
  mode,
3272
3319
  send: joinSend,
@@ -3299,16 +3346,18 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3299
3346
  type: "authenticateSpaceVerificationCode"
3300
3347
  });
3301
3348
  return joinState.context.space.invitationObservable?.authenticate(authCode);
3302
- }
3349
+ },
3350
+ onConfirmResetStorage,
3351
+ onCancelResetStorage
3303
3352
  });
3304
3353
  };
3305
3354
 
3306
3355
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3307
3356
  import { Planet } from "@phosphor-icons/react";
3308
- import React41, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3357
+ import React40, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3309
3358
  import { log as log13 } from "@dxos/log";
3310
3359
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3311
- import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation26 } from "@dxos/react-ui";
3360
+ import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation25 } from "@dxos/react-ui";
3312
3361
 
3313
3362
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3314
3363
  import { useMachine as useMachine3 } from "@xstate/react";
@@ -3374,18 +3423,18 @@ var useSpaceMachine = (options) => {
3374
3423
 
3375
3424
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3376
3425
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3377
- import React40, { useCallback as useCallback8, useState as useState10 } from "react";
3426
+ import React39, { useCallback as useCallback8, useState as useState10 } from "react";
3378
3427
  import { log as log12 } from "@dxos/log";
3379
3428
  import { useConfig } from "@dxos/react-client";
3380
3429
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3381
3430
  import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3382
- import { ScrollArea, useTranslation as useTranslation25 } from "@dxos/react-ui";
3431
+ import { ScrollArea, useTranslation as useTranslation24 } from "@dxos/react-ui";
3383
3432
  import { descriptionText as descriptionText10, mx as mx22 } from "@dxos/react-ui-theme";
3384
3433
  var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3385
3434
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
3386
3435
  var SpaceManager = (props) => {
3387
3436
  const { space, target } = props;
3388
- const { t } = useTranslation25("os");
3437
+ const { t } = useTranslation24("os");
3389
3438
  const config = useConfig();
3390
3439
  const invitations = useSpaceInvitations2(space?.key);
3391
3440
  const onInvitationEvent = useCallback8((invitation) => {
@@ -3438,7 +3487,7 @@ var SpaceManager = (props) => {
3438
3487
  ])
3439
3488
  }
3440
3489
  };
3441
- return /* @__PURE__ */ React40.createElement(SpaceManagerImpl, {
3490
+ return /* @__PURE__ */ React39.createElement(SpaceManagerImpl, {
3442
3491
  ...props,
3443
3492
  invitations,
3444
3493
  inviteActions
@@ -3447,7 +3496,7 @@ var SpaceManager = (props) => {
3447
3496
  var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
3448
3497
  var SpaceManagerImpl = (props) => {
3449
3498
  const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
3450
- const { t } = useTranslation25("os");
3499
+ const { t } = useTranslation24("os");
3451
3500
  const inviteActions = propsInviteActions ?? {
3452
3501
  noopInvite: {
3453
3502
  label: t("create space invitation label"),
@@ -3465,26 +3514,26 @@ var SpaceManagerImpl = (props) => {
3465
3514
  const visibleInvitations = showInactiveInvitations ? invitations : invitations?.filter((invitation) => ![
3466
3515
  Invitation8.State.CANCELLED
3467
3516
  ].includes(invitation.get().state));
3468
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(ScrollArea.Root, {
3517
+ return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(ScrollArea.Root, {
3469
3518
  classNames: "grow shrink basis-28 -mli-2"
3470
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Viewport, {
3519
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3471
3520
  classNames: "is-full pie-2"
3472
- }, !!visibleInvitations?.length && /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement("h3", {
3521
+ }, !!visibleInvitations?.length && /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("h3", {
3473
3522
  className: mx22(headingFragment, descriptionText10)
3474
- }, t("invitation list heading")), /* @__PURE__ */ React40.createElement(InvitationListComponent, {
3523
+ }, t("invitation list heading")), /* @__PURE__ */ React39.createElement(InvitationListComponent, {
3475
3524
  className: "mb-2",
3476
3525
  send,
3477
3526
  invitations: visibleInvitations ?? [],
3478
3527
  onClickRemove: (invitation) => invitation.cancel(),
3479
3528
  createInvitationUrl
3480
- }), /* @__PURE__ */ React40.createElement("h3", {
3529
+ }), /* @__PURE__ */ React39.createElement("h3", {
3481
3530
  className: mx22(headingFragment, descriptionText10, "mbs-2")
3482
- }, t("space member list heading"))), /* @__PURE__ */ React40.createElement(SpaceMemberListComponent, {
3531
+ }, t("space member list heading"))), /* @__PURE__ */ React39.createElement(SpaceMemberListComponent, {
3483
3532
  spaceKey: space.key,
3484
3533
  includeSelf: true
3485
- })), /* @__PURE__ */ React40.createElement(ScrollArea.Scrollbar, {
3534
+ })), /* @__PURE__ */ React39.createElement(ScrollArea.Scrollbar, {
3486
3535
  orientation: "vertical"
3487
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React40.createElement(Actions, null, /* @__PURE__ */ React40.createElement(BifurcatedAction, {
3536
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React39.createElement(Actions, null, /* @__PURE__ */ React39.createElement(BifurcatedAction, {
3488
3537
  disabled: !active,
3489
3538
  actions: inviteActions,
3490
3539
  activeAction,
@@ -3496,47 +3545,47 @@ var SpaceManagerImpl = (props) => {
3496
3545
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3497
3546
  var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3498
3547
  var SpacePanelHeading = ({ titleId, space, onDone }) => {
3499
- const { t } = useTranslation26("os");
3548
+ const { t } = useTranslation25("os");
3500
3549
  const name = space.properties.name;
3501
- return /* @__PURE__ */ React41.createElement(Heading, {
3550
+ return /* @__PURE__ */ React40.createElement(Heading, {
3502
3551
  titleId,
3503
3552
  title: t("space panel heading"),
3504
- corner: /* @__PURE__ */ React41.createElement(CloseButton, {
3553
+ corner: /* @__PURE__ */ React40.createElement(CloseButton, {
3505
3554
  "data-testid": "identity-panel-done",
3506
3555
  onDone
3507
3556
  })
3508
- }, /* @__PURE__ */ React41.createElement("div", {
3557
+ }, /* @__PURE__ */ React40.createElement("div", {
3509
3558
  role: "none",
3510
3559
  className: "flex gap-4 items-center justify-center mlb-4"
3511
- }, /* @__PURE__ */ React41.createElement(Planet, {
3560
+ }, /* @__PURE__ */ React40.createElement(Planet, {
3512
3561
  size: 32,
3513
3562
  weight: "light"
3514
- }), /* @__PURE__ */ React41.createElement("div", {
3563
+ }), /* @__PURE__ */ React40.createElement("div", {
3515
3564
  className: "block text-start font-light text-xl"
3516
3565
  }, name ?? space.key.truncate())));
3517
3566
  };
3518
3567
  var SpacePanelImpl = (props) => {
3519
3568
  const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3520
- return /* @__PURE__ */ React41.createElement(DensityProvider4, {
3569
+ return /* @__PURE__ */ React40.createElement(DensityProvider4, {
3521
3570
  density: "fine"
3522
- }, /* @__PURE__ */ React41.createElement(SpacePanelHeading, {
3571
+ }, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3523
3572
  ...rest,
3524
3573
  titleId,
3525
3574
  space
3526
- }), /* @__PURE__ */ React41.createElement(Viewport.Root, {
3575
+ }), /* @__PURE__ */ React40.createElement(Viewport.Root, {
3527
3576
  activeView
3528
- }, /* @__PURE__ */ React41.createElement(Viewport.Views, null, /* @__PURE__ */ React41.createElement(Viewport.View, {
3577
+ }, /* @__PURE__ */ React40.createElement(Viewport.Views, null, /* @__PURE__ */ React40.createElement(Viewport.View, {
3529
3578
  id: "space manager",
3530
3579
  classNames: stepStyles
3531
- }, /* @__PURE__ */ React41.createElement(SpaceManagerComponent, {
3580
+ }, /* @__PURE__ */ React40.createElement(SpaceManagerComponent, {
3532
3581
  active: activeView === "space manager",
3533
3582
  space,
3534
3583
  target,
3535
3584
  ...rest
3536
- })), /* @__PURE__ */ React41.createElement(Viewport.View, {
3585
+ })), /* @__PURE__ */ React40.createElement(Viewport.View, {
3537
3586
  id: "space invitation manager",
3538
3587
  classNames: stepStyles
3539
- }, /* @__PURE__ */ React41.createElement(InvitationManagerComponent, {
3588
+ }, /* @__PURE__ */ React40.createElement(InvitationManagerComponent, {
3540
3589
  active: activeView === "space invitation manager",
3541
3590
  ...rest,
3542
3591
  invitationUrl: props.invitationUrl
@@ -3544,7 +3593,7 @@ var SpacePanelImpl = (props) => {
3544
3593
  };
3545
3594
  var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
3546
3595
  const invitationStatus = useInvitationStatus3(invitation);
3547
- return /* @__PURE__ */ React41.createElement(SpacePanelImpl, {
3596
+ return /* @__PURE__ */ React40.createElement(SpacePanelImpl, {
3548
3597
  ...props,
3549
3598
  ...invitationStatus,
3550
3599
  invitationUrl: props.createInvitationUrl(invitationStatus.invitationCode)
@@ -3591,16 +3640,31 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3591
3640
  };
3592
3641
  return spaceState.context.invitation ? (
3593
3642
  // TODO(wittjosiah): Unused? Remove?
3594
- /* @__PURE__ */ React41.createElement(SpacePanelWithInvitationImpl, {
3643
+ /* @__PURE__ */ React40.createElement(SpacePanelWithInvitationImpl, {
3595
3644
  ...implProps,
3596
3645
  invitation: spaceState.context.invitation
3597
3646
  })
3598
- ) : /* @__PURE__ */ React41.createElement(SpacePanelImpl, implProps);
3647
+ ) : /* @__PURE__ */ React40.createElement(SpacePanelImpl, implProps);
3648
+ };
3649
+
3650
+ // packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
3651
+ import React41 from "react";
3652
+ import { Status, useTranslation as useTranslation26 } from "@dxos/react-ui";
3653
+ var StatusPanel = ({ titleId }) => {
3654
+ const { t } = useTranslation26("os");
3655
+ return /* @__PURE__ */ React41.createElement("div", {
3656
+ className: "grid place-items-center p-2 gap-2"
3657
+ }, /* @__PURE__ */ React41.createElement("p", {
3658
+ id: titleId,
3659
+ className: "font-medium text-center"
3660
+ }, t("resetting message")), /* @__PURE__ */ React41.createElement(Status, {
3661
+ indeterminate: true
3662
+ }, t("resetting message")));
3599
3663
  };
3600
3664
 
3601
3665
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
3602
3666
  var IdentityDialog = (props) => {
3603
- const titleId = useId9("spaceDialog__title");
3667
+ const titleId = useId9("identityDialog__title", props.title);
3604
3668
  return /* @__PURE__ */ React42.createElement(Dialog.Root, {
3605
3669
  defaultOpen: true,
3606
3670
  onOpenChange: (open) => open || props.onDone?.()
@@ -3647,7 +3711,7 @@ var JoinDialog = (joinPanelProps) => {
3647
3711
  };
3648
3712
 
3649
3713
  // packages/sdk/shell/src/composites/Shell/run-shell.tsx
3650
- import React46, { StrictMode } from "react";
3714
+ import React47, { StrictMode } from "react";
3651
3715
  import { createRoot } from "react-dom/client";
3652
3716
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3653
3717
  import { ShellRuntimeImpl } from "@dxos/client-services";
@@ -3657,9 +3721,9 @@ import { defaultTx } from "@dxos/react-ui-theme";
3657
3721
  import { createIFramePort } from "@dxos/rpc-tunnel";
3658
3722
 
3659
3723
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3660
- import React45, { useEffect as useEffect7, useState as useState11 } from "react";
3724
+ import React46, { useEffect as useEffect7, useState as useState11 } from "react";
3661
3725
  import { log as log14 } from "@dxos/log";
3662
- import { ShellDisplay, ShellLayout, useClient as useClient7 } from "@dxos/react-client";
3726
+ import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3663
3727
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3664
3728
 
3665
3729
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
@@ -3681,6 +3745,20 @@ var SpaceDialog = (spacePanelProps) => {
3681
3745
  }))))));
3682
3746
  };
3683
3747
 
3748
+ // packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
3749
+ import React45 from "react";
3750
+ import { AlertDialog as AlertDialog2, useId as useId12 } from "@dxos/react-ui";
3751
+ var StatusDialog = () => {
3752
+ const titleId = useId12("statusDialog__title");
3753
+ return /* @__PURE__ */ React45.createElement(AlertDialog2.Root, {
3754
+ open: true
3755
+ }, /* @__PURE__ */ React45.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Content, {
3756
+ "aria-labelledby": titleId
3757
+ }, /* @__PURE__ */ React45.createElement(StatusPanel, {
3758
+ titleId
3759
+ })))));
3760
+ };
3761
+
3684
3762
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3685
3763
  var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3686
3764
  var Shell = ({ runtime, origin }) => {
@@ -3690,7 +3768,7 @@ var Shell = ({ runtime, origin }) => {
3690
3768
  spaceKey: runtime.spaceKey,
3691
3769
  target: runtime.target
3692
3770
  });
3693
- const client = useClient7();
3771
+ const client = useClient6();
3694
3772
  const space = useSpace2(spaceKey);
3695
3773
  useEffect7(() => {
3696
3774
  return runtime.layoutUpdate.on((request) => setLayout(request));
@@ -3701,7 +3779,7 @@ var Shell = ({ runtime, origin }) => {
3701
3779
  if (layout === ShellLayout.SPACE && !space) {
3702
3780
  log14.warn("No space found for shell space invitations.", void 0, {
3703
3781
  F: __dxlog_file14,
3704
- L: 32,
3782
+ L: 33,
3705
3783
  S: void 0,
3706
3784
  C: (f, a) => f(...a)
3707
3785
  });
@@ -3721,10 +3799,17 @@ var Shell = ({ runtime, origin }) => {
3721
3799
  space
3722
3800
  ]);
3723
3801
  switch (layout) {
3802
+ case ShellLayout.STATUS:
3803
+ return /* @__PURE__ */ React46.createElement(StatusDialog, null);
3724
3804
  case ShellLayout.INITIALIZE_IDENTITY:
3725
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3805
+ case ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION:
3806
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3726
3807
  mode: "halo-only",
3808
+ initialDisposition: layout === ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION ? "accept-halo-invitation" : "default",
3727
3809
  initialInvitationCode: invitationCode,
3810
+ onCancelResetStorage: () => runtime.setLayout({
3811
+ layout: ShellLayout.IDENTITY
3812
+ }),
3728
3813
  onDone: () => {
3729
3814
  void runtime.setAppContext({
3730
3815
  display: ShellDisplay.NONE
@@ -3737,18 +3822,27 @@ var Shell = ({ runtime, origin }) => {
3737
3822
  case ShellLayout.IDENTITY:
3738
3823
  case ShellLayout.SHARE_IDENTITY:
3739
3824
  case ShellLayout.EDIT_PROFILE:
3740
- return /* @__PURE__ */ React45.createElement(IdentityDialog, {
3825
+ return /* @__PURE__ */ React46.createElement(IdentityDialog, {
3741
3826
  createInvitationUrl: (invitationCode2) => `${origin}?deviceInvitationCode=${invitationCode2}`,
3742
- onResetDevice: async () => {
3827
+ onResetStorage: async () => {
3828
+ runtime.setLayout({
3829
+ layout: ShellLayout.STATUS
3830
+ });
3743
3831
  await client.reset();
3744
- await runtime.setAppContext({
3832
+ return runtime.setAppContext({
3745
3833
  display: ShellDisplay.NONE,
3746
3834
  reload: true
3747
3835
  });
3748
3836
  },
3749
- onJoinNewIdentity: () => runtime.setLayout({
3750
- layout: ShellLayout.INITIALIZE_IDENTITY
3751
- }),
3837
+ onJoinNewIdentity: async () => {
3838
+ runtime.setLayout({
3839
+ layout: ShellLayout.STATUS
3840
+ });
3841
+ await client.reset();
3842
+ return runtime.setLayout({
3843
+ layout: ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION
3844
+ });
3845
+ },
3752
3846
  onDone: async () => {
3753
3847
  await runtime.setAppContext({
3754
3848
  display: ShellDisplay.NONE
@@ -3756,10 +3850,11 @@ var Shell = ({ runtime, origin }) => {
3756
3850
  runtime.setLayout({
3757
3851
  layout: ShellLayout.DEFAULT
3758
3852
  });
3759
- }
3853
+ },
3854
+ initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : layout === ShellLayout.EDIT_PROFILE ? "manage-profile" : "default"
3760
3855
  });
3761
3856
  case ShellLayout.SPACE:
3762
- return space ? /* @__PURE__ */ React45.createElement(SpaceDialog, {
3857
+ return space ? /* @__PURE__ */ React46.createElement(SpaceDialog, {
3763
3858
  space,
3764
3859
  target,
3765
3860
  createInvitationUrl: (invitationCode2) => `${origin}?spaceInvitationCode=${invitationCode2}`,
@@ -3773,7 +3868,7 @@ var Shell = ({ runtime, origin }) => {
3773
3868
  }
3774
3869
  }) : null;
3775
3870
  case ShellLayout.JOIN_SPACE:
3776
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3871
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3777
3872
  initialInvitationCode: invitationCode,
3778
3873
  onDone: async (result) => {
3779
3874
  const target2 = result?.target ?? void 0;
@@ -3876,7 +3971,8 @@ var os = {
3876
3971
  "choose add device label": "Add device",
3877
3972
  "choose devices label": "Manage devices",
3878
3973
  "choose profile label": "Edit profile",
3879
- "choose sign out label": "Sign out",
3974
+ "choose sign out label": "Reset storage",
3975
+ "choose join new identity label": "Join existing device",
3880
3976
  "empty space members message": "There is nobody in this space yet.",
3881
3977
  "back to all invitations label": "Back to all invitations",
3882
3978
  "invitation heading": "Invitation",
@@ -3900,18 +3996,20 @@ var os = {
3900
3996
  "invite options label": "Change the active invite option.",
3901
3997
  "reset in progress label": "Resetting...",
3902
3998
  "confirm label": "Confirm",
3903
- "reset identity input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
3999
+ "reset storage input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4000
+ "join new identity input label": "In order to join an existing device, storage on this device must be cleared first. Type {{confirmationValue}} to continue.",
3904
4001
  "failed to reset identity message": "Failed to reset identity.",
3905
4002
  "confirmation value": "CONFIRM",
3906
- "sign out chooser title": "DANGER ZONE",
3907
- "sign out chooser message": "Proceeding with either action below will erase all data on this device.",
4003
+ "sign out chooser title": "Danger zone",
4004
+ "sign out chooser message": "Proceeding with the action below will erase all data on this device.",
3908
4005
  "join new identity label": "Join a new identity",
3909
- "reset device label": "Reset device",
4006
+ "reset device label": "Reset storage",
3910
4007
  "reset device confirm message": "Are you sure you want to reset your device? All data will be lost.",
3911
4008
  "emoji and color label": "Emoji and color",
3912
4009
  "clear label": "Use default",
3913
4010
  "select emoji label": "Choose an emoji to use in your avatar",
3914
4011
  "select hue label": "Choose a hue to use in your avatar",
4012
+ "resetting message": "One moment while things are reset\u2026",
3915
4013
  "red label": "Red",
3916
4014
  "orange label": "Orange",
3917
4015
  "amber label": "Amber",
@@ -3952,25 +4050,25 @@ var runShell = async (config = new Config()) => {
3952
4050
  runtime.open(),
3953
4051
  client.initialize()
3954
4052
  ]);
3955
- createRoot(document.getElementById("root")).render(/* @__PURE__ */ React46.createElement(StrictMode, null, /* @__PURE__ */ React46.createElement(ThemeProvider, {
4053
+ createRoot(document.getElementById("root")).render(/* @__PURE__ */ React47.createElement(StrictMode, null, /* @__PURE__ */ React47.createElement(ThemeProvider, {
3956
4054
  tx: defaultTx,
3957
4055
  resourceExtensions: [
3958
4056
  osTranslations
3959
4057
  ]
3960
- }, /* @__PURE__ */ React46.createElement(ClientContext.Provider, {
4058
+ }, /* @__PURE__ */ React47.createElement(ClientContext.Provider, {
3961
4059
  value: {
3962
4060
  client,
3963
4061
  status: SystemStatus.ACTIVE
3964
4062
  }
3965
- }, /* @__PURE__ */ React46.createElement(ClipboardProvider, null, /* @__PURE__ */ React46.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React46.createElement(Shell, {
4063
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
3966
4064
  runtime,
3967
4065
  origin: location.origin
3968
4066
  })))))));
3969
4067
  };
3970
4068
 
3971
4069
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
3972
- import React47, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
3973
- import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient8 } from "@dxos/react-client";
4070
+ import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
4071
+ import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
3974
4072
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
3975
4073
  import { mx as mx23 } from "@dxos/react-ui-theme";
3976
4074
 
@@ -4008,7 +4106,7 @@ var MemoryShellRuntime = class {
4008
4106
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4009
4107
  var ShellContext = /* @__PURE__ */ createContext2({});
4010
4108
  var useShell = () => {
4011
- const client = useClient8();
4109
+ const client = useClient7();
4012
4110
  const { runtime, setDisplay } = useContext2(ShellContext);
4013
4111
  const setLayout = async (layout, options) => {
4014
4112
  if (runtime) {
@@ -4029,7 +4127,7 @@ var useShell = () => {
4029
4127
  };
4030
4128
  };
4031
4129
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4032
- const client = useClient8();
4130
+ const client = useClient7();
4033
4131
  const identity = useIdentity3();
4034
4132
  const [display, setDisplay] = useState12(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4035
4133
  const shellRuntime = useMemo6(() => {
@@ -4101,12 +4199,12 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4101
4199
  }, [
4102
4200
  shellRuntime
4103
4201
  ]);
4104
- return /* @__PURE__ */ React47.createElement(React47.Fragment, null, shellRuntime && /* @__PURE__ */ React47.createElement("div", {
4202
+ return /* @__PURE__ */ React48.createElement(React48.Fragment, null, shellRuntime && /* @__PURE__ */ React48.createElement("div", {
4105
4203
  className: mx23(display === ShellDisplay2.NONE ? "hidden" : "")
4106
- }, /* @__PURE__ */ React47.createElement(Shell, {
4204
+ }, /* @__PURE__ */ React48.createElement(Shell, {
4107
4205
  runtime: shellRuntime,
4108
4206
  origin: window.location.origin
4109
- })), /* @__PURE__ */ React47.createElement(ShellContext.Provider, {
4207
+ })), /* @__PURE__ */ React48.createElement(ShellContext.Provider, {
4110
4208
  value: {
4111
4209
  runtime: shellRuntime,
4112
4210
  setDisplay
@@ -4123,6 +4221,8 @@ export {
4123
4221
  ClipboardProvider,
4124
4222
  CloseButton,
4125
4223
  CompoundButton,
4224
+ ConfirmReset,
4225
+ ConfirmResetImpl,
4126
4226
  CopyButton,
4127
4227
  CopyButtonIconOnly,
4128
4228
  DeviceList,
@@ -4153,6 +4253,7 @@ export {
4153
4253
  SpaceMemberListImpl,
4154
4254
  SpacePanel,
4155
4255
  SpacePanelImpl,
4256
+ StatusPanel,
4156
4257
  StepHeading,
4157
4258
  Viewport,
4158
4259
  activeBgColor,