@dxos/shell 0.4.10-main.d4e372f → 0.4.10-main.d658471

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 (123) hide show
  1. package/dist/bundle/shell.mjs +11679 -10893
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +64 -59
  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 +414 -332
  8. package/dist/lib/browser/react.mjs.map +4 -4
  9. package/dist/lib/browser/testing/index.mjs +5 -7
  10. package/dist/lib/browser/testing/index.mjs.map +3 -3
  11. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +1 -1
  12. package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
  13. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  14. package/dist/types/src/composites/Shell/Shell.js +18 -6
  15. package/dist/types/src/composites/Shell/Shell.js.map +1 -1
  16. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +2 -0
  17. package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -0
  18. package/dist/types/src/composites/StatusDialog/StatusDialog.js +22 -0
  19. package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -0
  20. package/dist/types/src/composites/StatusDialog/index.d.ts +2 -0
  21. package/dist/types/src/composites/StatusDialog/index.d.ts.map +1 -0
  22. package/dist/types/src/composites/StatusDialog/index.js +21 -0
  23. package/dist/types/src/composites/StatusDialog/index.js.map +1 -0
  24. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +1 -1
  25. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  26. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +15 -8
  27. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  28. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +5 -3
  29. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  30. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +3 -1
  31. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  32. package/dist/types/src/panels/IdentityPanel/identityMachine.js +15 -2
  33. package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
  34. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  35. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +9 -5
  36. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  37. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +0 -1
  38. package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
  39. package/dist/types/src/panels/IdentityPanel/steps/index.js +0 -1
  40. package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
  41. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +1 -1
  42. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
  43. package/dist/types/src/panels/JoinPanel/JoinPanel.js +11 -5
  44. package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
  45. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +1 -1
  46. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
  47. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +2 -1
  48. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
  49. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +8 -5
  50. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
  51. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +3 -2
  52. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
  53. package/dist/types/src/panels/JoinPanel/joinMachine.js +7 -0
  54. package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
  55. package/dist/types/src/panels/JoinPanel/steps/index.d.ts +0 -1
  56. package/dist/types/src/panels/JoinPanel/steps/index.d.ts.map +1 -1
  57. package/dist/types/src/panels/JoinPanel/steps/index.js +0 -1
  58. package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -1
  59. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +4 -0
  60. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -0
  61. package/dist/types/src/panels/StatusPanel/StatusPanel.js +19 -0
  62. package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -0
  63. package/dist/types/src/panels/StatusPanel/index.d.ts +2 -0
  64. package/dist/types/src/panels/StatusPanel/index.d.ts.map +1 -0
  65. package/dist/types/src/panels/StatusPanel/index.js +21 -0
  66. package/dist/types/src/panels/StatusPanel/index.js.map +1 -0
  67. package/dist/types/src/panels/index.d.ts +1 -0
  68. package/dist/types/src/panels/index.d.ts.map +1 -1
  69. package/dist/types/src/panels/index.js +1 -0
  70. package/dist/types/src/panels/index.js.map +1 -1
  71. package/dist/types/src/steps/ConfirmReset.d.ts +16 -0
  72. package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -0
  73. package/dist/types/src/steps/ConfirmReset.js +71 -0
  74. package/dist/types/src/steps/ConfirmReset.js.map +1 -0
  75. package/dist/types/src/steps/StepProps.d.ts +4 -1
  76. package/dist/types/src/steps/StepProps.d.ts.map +1 -1
  77. package/dist/types/src/steps/index.d.ts +1 -0
  78. package/dist/types/src/steps/index.d.ts.map +1 -1
  79. package/dist/types/src/steps/index.js +1 -0
  80. package/dist/types/src/steps/index.js.map +1 -1
  81. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  82. package/dist/types/src/testing/shell-manager.js +5 -7
  83. package/dist/types/src/testing/shell-manager.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/dist/types/src/types/index.js +1 -0
  89. package/dist/types/src/types/index.js.map +1 -1
  90. package/package.json +20 -20
  91. package/src/composites/IdentityDialog/IdentityDialog.tsx +1 -1
  92. package/src/composites/Shell/Shell.tsx +23 -5
  93. package/src/composites/StatusDialog/StatusDialog.tsx +24 -0
  94. package/src/composites/StatusDialog/index.ts +5 -0
  95. package/src/panels/IdentityPanel/IdentityPanel.tsx +31 -14
  96. package/src/panels/IdentityPanel/IdentityPanelProps.ts +7 -3
  97. package/src/panels/IdentityPanel/identityMachine.ts +25 -3
  98. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +16 -7
  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 -9
  102. package/src/panels/JoinPanel/JoinPanelProps.ts +9 -5
  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 +112 -0
  109. package/src/steps/StepProps.ts +2 -1
  110. package/src/steps/index.ts +1 -0
  111. package/src/testing/shell-manager.ts +5 -7
  112. package/src/translations/locales/en-US.ts +9 -5
  113. package/src/types/index.ts +2 -0
  114. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts +0 -16
  115. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.d.ts.map +0 -1
  116. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js +0 -40
  117. package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js.map +0 -1
  118. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +0 -15
  119. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +0 -1
  120. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +0 -67
  121. package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +0 -1
  122. package/src/panels/IdentityPanel/steps/SignOutChooser.tsx +0 -77
  123. package/src/panels/JoinPanel/steps/ResetIdentity.tsx +0 -92
@@ -922,7 +922,7 @@ import { Dialog, useId as useId9 } from "@dxos/react-ui";
922
922
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
923
923
  import React29, { useEffect as useEffect3, useMemo as useMemo3 } from "react";
924
924
  import { generateName as generateName3 } from "@dxos/display-name";
925
- import { log as log5 } from "@dxos/log";
925
+ import { log as log6 } from "@dxos/log";
926
926
  import { useClient as useClient3 } from "@dxos/react-client";
927
927
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
928
928
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
@@ -946,6 +946,24 @@ var identityMachine = createMachine({
946
946
  src: (context) => context.identitySubscribable
947
947
  },
948
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
+ },
949
967
  choosingAction: {},
950
968
  managingDeviceInvitation: {},
951
969
  managingAgent: {
@@ -976,7 +994,8 @@ var identityMachine = createMachine({
976
994
  }
977
995
  }
978
996
  },
979
- signingOut: {}
997
+ confirmingResetStorage: {},
998
+ confirmingJoinNewIdentity: {}
980
999
  },
981
1000
  on: {
982
1001
  unchooseAction: {
@@ -1008,8 +1027,12 @@ var identityMachine = createMachine({
1008
1027
  target: ".managingProfile",
1009
1028
  actions: "log"
1010
1029
  },
1011
- chooseSignOut: {
1012
- target: ".signingOut",
1030
+ chooseJoinNewIdentity: {
1031
+ target: ".confirmingJoinNewIdentity",
1032
+ actions: "log"
1033
+ },
1034
+ chooseResetStorage: {
1035
+ target: ".confirmingResetStorage",
1013
1036
  actions: "log"
1014
1037
  },
1015
1038
  chooseAgent: {
@@ -1018,6 +1041,10 @@ var identityMachine = createMachine({
1018
1041
  }
1019
1042
  }
1020
1043
  }, {
1044
+ guards: {
1045
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) => initialDisposition === "manage-device-invitation",
1046
+ initiallyManagingProfile: ({ initialDisposition }, _event) => initialDisposition === "manage-profile"
1047
+ },
1021
1048
  actions: {
1022
1049
  setIdentity: assign({
1023
1050
  identity: (context, event) => event?.identity ?? null
@@ -1034,7 +1061,7 @@ var identityMachine = createMachine({
1034
1061
  context
1035
1062
  }, {
1036
1063
  F: __dxlog_file,
1037
- L: 104,
1064
+ L: 126,
1038
1065
  S: void 0,
1039
1066
  C: (f, a) => f(...a)
1040
1067
  });
@@ -1110,7 +1137,7 @@ var DeviceManager = ({ devices, active, send }) => {
1110
1137
  };
1111
1138
 
1112
1139
  // packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
1113
- import { CaretRight, Devices, Plus, Power, UserGear, HardDrive } from "@phosphor-icons/react";
1140
+ import { CaretRight, Devices, Plus, Power, UserGear, HardDrive, Intersect } from "@phosphor-icons/react";
1114
1141
  import React25, { useCallback as useCallback4 } from "react";
1115
1142
  import { log as log2 } from "@dxos/log";
1116
1143
  import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
@@ -1168,7 +1195,20 @@ var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone
1168
1195
  density: "coarse"
1169
1196
  }, /* @__PURE__ */ React25.createElement("div", {
1170
1197
  className: "grow justify-center flex flex-col gap-1"
1171
- }, 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, {
1172
1212
  "data-testid": "manage-agent",
1173
1213
  onClick: () => send?.({
1174
1214
  type: "chooseAgent"
@@ -1194,35 +1234,35 @@ var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone
1194
1234
  weight: "bold",
1195
1235
  className: getSize8(4)
1196
1236
  })), /* @__PURE__ */ React25.createElement(Action, {
1197
- "data-testid": "manage-devices",
1237
+ "data-testid": "devices-panel.join-new-identity",
1198
1238
  onClick: () => send?.({
1199
- type: "chooseDevices"
1239
+ type: "chooseJoinNewIdentity"
1200
1240
  }),
1201
1241
  classNames: "plb-4"
1202
- }, /* @__PURE__ */ React25.createElement(Devices, {
1242
+ }, /* @__PURE__ */ React25.createElement(Intersect, {
1203
1243
  className: getSize8(6)
1204
1244
  }), /* @__PURE__ */ React25.createElement("span", {
1205
1245
  className: "grow mli-3"
1206
- }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1246
+ }, t("choose join new identity label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1207
1247
  weight: "bold",
1208
1248
  className: getSize8(4)
1209
1249
  })), /* @__PURE__ */ React25.createElement(Action, {
1210
- "data-testid": "manage-profile",
1250
+ "data-testid": "manage-devices",
1211
1251
  onClick: () => send?.({
1212
- type: "chooseProfile"
1252
+ type: "chooseDevices"
1213
1253
  }),
1214
1254
  classNames: "plb-4"
1215
- }, /* @__PURE__ */ React25.createElement(UserGear, {
1255
+ }, /* @__PURE__ */ React25.createElement(Devices, {
1216
1256
  className: getSize8(6)
1217
1257
  }), /* @__PURE__ */ React25.createElement("span", {
1218
1258
  className: "grow mli-3"
1219
- }, t("choose profile label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1259
+ }, t("choose devices label")), /* @__PURE__ */ React25.createElement(CaretRight, {
1220
1260
  weight: "bold",
1221
1261
  className: getSize8(4)
1222
1262
  })), /* @__PURE__ */ React25.createElement(Action, {
1223
1263
  "data-testid": "devices-panel.sign-out",
1224
1264
  onClick: () => send?.({
1225
- type: "chooseSignOut"
1265
+ type: "chooseResetStorage"
1226
1266
  }),
1227
1267
  classNames: "plb-4"
1228
1268
  }, /* @__PURE__ */ React25.createElement(Power, {
@@ -1341,52 +1381,6 @@ var ProfileFormImpl = (props) => {
1341
1381
  }, t("done label"))));
1342
1382
  };
1343
1383
 
1344
- // packages/sdk/shell/src/panels/IdentityPanel/steps/SignOutChooser.tsx
1345
- import { Warning } from "@phosphor-icons/react";
1346
- import React27 from "react";
1347
- import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1348
- import { getSize as getSize9, mx as mx18 } from "@dxos/react-ui-theme";
1349
- var SignOutChooser = (props) => {
1350
- const { t } = useTranslation13("os");
1351
- const onResetDevice = () => {
1352
- if (window.confirm(t("reset device confirm message"))) {
1353
- void props.onResetDevice?.();
1354
- }
1355
- };
1356
- return /* @__PURE__ */ React27.createElement(SignOutChooserImpl, {
1357
- disabled: !props.active,
1358
- onBack: () => props.send?.({
1359
- type: "unchooseAction"
1360
- }),
1361
- onResetDevice,
1362
- onJoinNewIdentity: props.onJoinNewIdentity
1363
- });
1364
- };
1365
- var SignOutChooserImpl = ({ disabled, onResetDevice, onJoinNewIdentity, onBack }) => {
1366
- const { t } = useTranslation13("os");
1367
- return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("div", {
1368
- role: "none",
1369
- className: "grow flex flex-col justify-center"
1370
- }, /* @__PURE__ */ React27.createElement(Message.Root, {
1371
- valence: "error"
1372
- }, /* @__PURE__ */ React27.createElement(Message.Title, null, /* @__PURE__ */ React27.createElement(Warning, {
1373
- className: mx18(getSize9(6), "inline mie-2")
1374
- }), t("sign out chooser title")), /* @__PURE__ */ React27.createElement(Message.Body, null, t("sign out chooser message")))), /* @__PURE__ */ React27.createElement(Actions, null, /* @__PURE__ */ React27.createElement(Action, {
1375
- disabled,
1376
- onClick: onBack
1377
- }, t("back label")), /* @__PURE__ */ React27.createElement(Action, {
1378
- variant: "destructive",
1379
- "data-testid": "sign-out.join-new-identity",
1380
- disabled,
1381
- onClick: onJoinNewIdentity
1382
- }, t("join new identity label")), /* @__PURE__ */ React27.createElement(Action, {
1383
- variant: "destructive",
1384
- "data-testid": "sign-out.reset-device",
1385
- disabled,
1386
- onClick: onResetDevice
1387
- }, t("reset device label"))));
1388
- };
1389
-
1390
1384
  // packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
1391
1385
  import { useCallback as useCallback5, useEffect as useEffect2, useState as useState5 } from "react";
1392
1386
  import { invariant } from "@dxos/invariant";
@@ -1488,11 +1482,11 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
1488
1482
 
1489
1483
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1490
1484
  import { Check as Check4, X as X3 } from "@phosphor-icons/react";
1491
- import React28, { useMemo as useMemo2 } from "react";
1485
+ import React27, { useMemo as useMemo2 } from "react";
1492
1486
  import { QR } from "react-qr-rounded";
1493
1487
  import { Invitation as Invitation5 } from "@dxos/react-client/invitations";
1494
- import { useId as useId4, useTranslation as useTranslation14 } from "@dxos/react-ui";
1495
- import { descriptionText as descriptionText7, getSize as getSize10, mx as mx19 } from "@dxos/react-ui-theme";
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";
1496
1490
  import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
1497
1491
 
1498
1492
  // packages/sdk/shell/src/util/invitationStatusValue.ts
@@ -1538,13 +1532,13 @@ var invitationStatusValue = /* @__PURE__ */ new Map([
1538
1532
 
1539
1533
  // packages/sdk/shell/src/steps/InvitationManager.tsx
1540
1534
  var InvitationManagerView = ({ children, ...props }) => {
1541
- return /* @__PURE__ */ React28.createElement(Viewport.View, {
1535
+ return /* @__PURE__ */ React27.createElement(Viewport.View, {
1542
1536
  ...props,
1543
1537
  classNames: "grow flex flex-col justify-around items-center"
1544
1538
  }, children);
1545
1539
  };
1546
1540
  var InvitationManager = ({ invitationUrl, active, send, status, type, authCode, id = "0" }) => {
1547
- const { t } = useTranslation14("os");
1541
+ const { t } = useTranslation13("os");
1548
1542
  const qrLabel = useId4("invitation-manager__qr-code");
1549
1543
  const statusValue = type === Invitation5.Type.MULTIUSE ? 0 : invitationStatusValue.get(status) ?? 0;
1550
1544
  const showAuthCode = statusValue === 3;
@@ -1562,50 +1556,50 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1562
1556
  }, [
1563
1557
  statusValue
1564
1558
  ]);
1565
- 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, {
1566
1560
  activeView,
1567
1561
  classNames: "grow plb-1"
1568
- }, /* @__PURE__ */ React28.createElement(Viewport.Views, null, /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1562
+ }, /* @__PURE__ */ React27.createElement(Viewport.Views, null, /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1569
1563
  id: "showing qr",
1570
1564
  emoji
1571
- }, /* @__PURE__ */ React28.createElement("p", {
1565
+ }, /* @__PURE__ */ React27.createElement("p", {
1572
1566
  className: "text-sm mlb-1 font-normal text-center"
1573
- }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React28.createElement("div", {
1567
+ }, t(type === Invitation5.Type.MULTIUSE ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React27.createElement("div", {
1574
1568
  role: "none",
1575
- className: mx19(descriptionText7, "is-full max-is-[14rem] relative")
1576
- }, /* @__PURE__ */ React28.createElement(QR, {
1569
+ className: mx18(descriptionText7, "is-full max-is-[14rem] relative")
1570
+ }, /* @__PURE__ */ React27.createElement(QR, {
1577
1571
  rounding: 100,
1578
1572
  backgroundColor: "transparent",
1579
1573
  color: "currentColor",
1580
- className: mx19("is-full bs-full p-2", showAuthCode && "invisible"),
1574
+ className: mx18("is-full bs-full p-2", showAuthCode && "invisible"),
1581
1575
  "aria-labelledby": qrLabel,
1582
1576
  errorCorrectionLevel: "Q",
1583
1577
  cutout: true
1584
- }, invitationUrl ?? "never"), /* @__PURE__ */ React28.createElement(Centered, null, /* @__PURE__ */ React28.createElement(Emoji, {
1578
+ }, invitationUrl ?? "never"), /* @__PURE__ */ React27.createElement(Centered, null, /* @__PURE__ */ React27.createElement(Emoji, {
1585
1579
  text: emoji
1586
- }))), /* @__PURE__ */ React28.createElement("span", {
1580
+ }))), /* @__PURE__ */ React27.createElement("span", {
1587
1581
  id: qrLabel,
1588
1582
  className: "sr-only"
1589
- }, t("qr label")), /* @__PURE__ */ React28.createElement(CopyButton, {
1583
+ }, t("qr label")), /* @__PURE__ */ React27.createElement(CopyButton, {
1590
1584
  variant: "ghost",
1591
1585
  value: invitationUrl ?? "never"
1592
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1586
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1593
1587
  id: "showing auth code"
1594
- }, /* @__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, {
1595
1589
  code: authCode,
1596
1590
  large: true,
1597
1591
  classNames: "text-black dark:text-white"
1598
- }), /* @__PURE__ */ React28.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React28.createElement(Emoji, {
1592
+ }), /* @__PURE__ */ React27.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React27.createElement(Emoji, {
1599
1593
  text: emoji
1600
- })), /* @__PURE__ */ React28.createElement(InvitationManagerView, {
1594
+ })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1601
1595
  id: "showing final"
1602
- }, statusValue > 0 ? /* @__PURE__ */ React28.createElement(Check4, {
1603
- className: mx19("m-1.5", getSize10(6))
1604
- }) : /* @__PURE__ */ React28.createElement(X3, {
1605
- className: mx19("m-1.5", getSize10(6))
1606
- })))), /* @__PURE__ */ React28.createElement(Actions, {
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, {
1607
1601
  classNames: "mbs-4"
1608
- }, /* @__PURE__ */ React28.createElement(Action, {
1602
+ }, /* @__PURE__ */ React27.createElement(Action, {
1609
1603
  disabled: !active,
1610
1604
  onClick: () => send?.({
1611
1605
  type: "deselectInvitation"
@@ -1613,8 +1607,76 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
1613
1607
  }, t("back label"))));
1614
1608
  };
1615
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
+ const testIdAffix = mode === "join new identity" ? "join-new-identity" : "reset-storage";
1648
+ return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement("div", {
1649
+ role: "none",
1650
+ className: "grow flex flex-col gap-2 justify-center"
1651
+ }, /* @__PURE__ */ React28.createElement(Message.Root, {
1652
+ valence: "error"
1653
+ }, /* @__PURE__ */ React28.createElement(Message.Title, null, /* @__PURE__ */ React28.createElement(Warning, {
1654
+ className: mx19(getSize10(6), "inline mie-2")
1655
+ }), t("sign out chooser title")), /* @__PURE__ */ React28.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React28.createElement(Input, {
1656
+ validationMessage,
1657
+ label: /* @__PURE__ */ React28.createElement(StepHeading, {
1658
+ className: "text-start mlb-2"
1659
+ }, t(mode === "join new identity" ? "join new identity input label" : "reset storage input label", {
1660
+ confirmationValue
1661
+ })),
1662
+ disabled,
1663
+ "data-testid": `${testIdAffix}.reset-identity-input`,
1664
+ placeholder: confirmationValue,
1665
+ onChange: ({ target: { value } }) => setInputValue(value)
1666
+ })), /* @__PURE__ */ React28.createElement(Actions, null, onCancel && /* @__PURE__ */ React28.createElement(Action, {
1667
+ disabled,
1668
+ onClick: onCancel,
1669
+ "data-testid": `${testIdAffix}.reset-identity-cancel`
1670
+ }, t("cancel label")), onConfirm && /* @__PURE__ */ React28.createElement(Action, {
1671
+ variant: "destructive",
1672
+ disabled: disabled || pending || inputValue !== confirmationValue,
1673
+ onClick: onConfirm,
1674
+ "data-testid": `${testIdAffix}.reset-identity-confirm`
1675
+ }, pending ? t("reset in progress label") : t("reset device label"))));
1676
+ };
1677
+
1616
1678
  // packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
1617
- 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";
1618
1680
  var viewStyles = "pbs-1 pbe-3 pli-3";
1619
1681
  var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1620
1682
  const fallbackValue = keyToFallback2(identity.identityKey);
@@ -1639,7 +1701,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone }) => {
1639
1701
  }, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex()))));
1640
1702
  };
1641
1703
  var IdentityPanelImpl = (props) => {
1642
- const { identity, titleId, activeView, onUpdateProfile, onResetDevice, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1704
+ const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, onDone, ...rest } = props;
1643
1705
  const { t } = useTranslation15("os");
1644
1706
  const title = useMemo3(() => {
1645
1707
  switch (activeView) {
@@ -1654,6 +1716,7 @@ var IdentityPanelImpl = (props) => {
1654
1716
  activeView,
1655
1717
  t
1656
1718
  ]);
1719
+ const onCancelReset = () => rest.send?.("unchooseAction");
1657
1720
  return /* @__PURE__ */ React29.createElement(DensityProvider2, {
1658
1721
  density: "fine"
1659
1722
  }, /* @__PURE__ */ React29.createElement(IdentityHeading, {
@@ -1690,14 +1753,6 @@ var IdentityPanelImpl = (props) => {
1690
1753
  active: activeView === "update profile form",
1691
1754
  identity,
1692
1755
  onUpdateProfile
1693
- })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1694
- classNames: viewStyles,
1695
- id: "signing out"
1696
- }, /* @__PURE__ */ React29.createElement(SignOutChooser, {
1697
- send: rest.send,
1698
- active: activeView === "signing out",
1699
- onResetDevice,
1700
- onJoinNewIdentity
1701
1756
  })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1702
1757
  classNames: viewStyles,
1703
1758
  id: "agent manager"
@@ -1705,6 +1760,24 @@ var IdentityPanelImpl = (props) => {
1705
1760
  send: rest.send,
1706
1761
  active: activeView === "agent manager",
1707
1762
  ...rest
1763
+ })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1764
+ classNames: viewStyles,
1765
+ id: "confirm join new identity"
1766
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1767
+ active: activeView === "confirm join new identity",
1768
+ ...rest,
1769
+ mode: "join new identity",
1770
+ onConfirm: onJoinNewIdentity,
1771
+ onCancel: onCancelReset
1772
+ })), /* @__PURE__ */ React29.createElement(Viewport.View, {
1773
+ classNames: viewStyles,
1774
+ id: "confirm reset storage"
1775
+ }, /* @__PURE__ */ React29.createElement(ConfirmReset, {
1776
+ active: activeView === "confirm reset storage",
1777
+ ...rest,
1778
+ mode: "reset storage",
1779
+ onConfirm: onResetStorage,
1780
+ onCancel: onCancelReset
1708
1781
  })))));
1709
1782
  };
1710
1783
  var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
@@ -1714,7 +1787,7 @@ var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
1714
1787
  ...invitationStatus
1715
1788
  });
1716
1789
  };
1717
- var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, ...props }) => {
1790
+ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = "default", ...props }) => {
1718
1791
  const titleId = useId5("identityPanel__heading", propsTitleId);
1719
1792
  const client = useClient3();
1720
1793
  const devices = useDevices();
@@ -1726,20 +1799,24 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1726
1799
  invitations
1727
1800
  });
1728
1801
  if (!identity) {
1729
- log5.error("IdentityPanel rendered with no active identity.", void 0, {
1730
- F: __dxlog_file5,
1731
- L: 132,
1802
+ log6.error("IdentityPanel rendered with no active identity.", void 0, {
1803
+ F: __dxlog_file6,
1804
+ L: 145,
1732
1805
  S: void 0,
1733
1806
  C: (f, a) => f(...a)
1734
1807
  });
1735
1808
  return null;
1736
1809
  }
1737
- const [identityState, identitySend, identityService] = useIdentityMachine(client);
1810
+ const [identityState, identitySend, identityService] = useIdentityMachine(client, {
1811
+ context: {
1812
+ initialDisposition
1813
+ }
1814
+ });
1738
1815
  useEffect3(() => {
1739
1816
  const subscription = identityService.subscribe((state) => {
1740
- log5("[state]", state, {
1741
- F: __dxlog_file5,
1742
- L: 139,
1817
+ log6("[state]", state, {
1818
+ F: __dxlog_file6,
1819
+ L: 154,
1743
1820
  S: void 0,
1744
1821
  C: (f, a) => f(...a)
1745
1822
  });
@@ -1765,8 +1842,10 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1765
1842
  }
1766
1843
  ].some(identityState.matches):
1767
1844
  return "update profile form";
1768
- case identityState.matches("signingOut"):
1769
- return "signing out";
1845
+ case identityState.matches("confirmingResetStorage"):
1846
+ return "confirm reset storage";
1847
+ case identityState.matches("confirmingJoinNewIdentity"):
1848
+ return "confirm join new identity";
1770
1849
  case [
1771
1850
  {
1772
1851
  managingAgent: "idle"
@@ -1806,9 +1885,9 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1806
1885
  };
1807
1886
 
1808
1887
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
1809
- import React39, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1888
+ import React38, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
1810
1889
  import { log as log10 } from "@dxos/log";
1811
- import { useClient as useClient6, useMulticastObservable } from "@dxos/react-client";
1890
+ import { useClient as useClient5, useMulticastObservable } from "@dxos/react-client";
1812
1891
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
1813
1892
  import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
1814
1893
 
@@ -1849,14 +1928,14 @@ var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActi
1849
1928
  import { useMachine as useMachine2 } from "@xstate/react";
1850
1929
  import { useCallback as useCallback6 } from "react";
1851
1930
  import { assign as assign2, createMachine as createMachine2 } from "xstate";
1852
- import { log as log6 } from "@dxos/log";
1931
+ import { log as log7 } from "@dxos/log";
1853
1932
  import { AlreadyJoinedError } from "@dxos/react-client";
1854
1933
  import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
1855
- 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";
1856
1935
  var getInvitationSubscribable = (Kind, invitation) => {
1857
- log6("[subscribing to invitation]", invitation, {
1858
- F: __dxlog_file6,
1859
- L: 88,
1936
+ log7("[subscribing to invitation]", invitation, {
1937
+ F: __dxlog_file7,
1938
+ L: 90,
1860
1939
  S: void 0,
1861
1940
  C: (f, a) => f(...a)
1862
1941
  });
@@ -1864,12 +1943,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1864
1943
  subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
1865
1944
  switch (invitation2.state) {
1866
1945
  case Invitation6.State.CONNECTING: {
1867
- log6("[invitation connecting]", {
1946
+ log7("[invitation connecting]", {
1868
1947
  Kind,
1869
1948
  invitation: invitation2
1870
1949
  }, {
1871
- F: __dxlog_file6,
1872
- L: 99,
1950
+ F: __dxlog_file7,
1951
+ L: 101,
1873
1952
  S: void 0,
1874
1953
  C: (f, a) => f(...a)
1875
1954
  });
@@ -1879,12 +1958,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1879
1958
  });
1880
1959
  }
1881
1960
  case Invitation6.State.CONNECTED: {
1882
- log6("[invitation connected]", {
1961
+ log7("[invitation connected]", {
1883
1962
  Kind,
1884
1963
  invitation: invitation2
1885
1964
  }, {
1886
- F: __dxlog_file6,
1887
- L: 104,
1965
+ F: __dxlog_file7,
1966
+ L: 106,
1888
1967
  S: void 0,
1889
1968
  C: (f, a) => f(...a)
1890
1969
  });
@@ -1894,12 +1973,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1894
1973
  });
1895
1974
  }
1896
1975
  case Invitation6.State.READY_FOR_AUTHENTICATION: {
1897
- log6("[invitation ready for authentication]", {
1976
+ log7("[invitation ready for authentication]", {
1898
1977
  Kind,
1899
1978
  invitation: invitation2
1900
1979
  }, {
1901
- F: __dxlog_file6,
1902
- L: 109,
1980
+ F: __dxlog_file7,
1981
+ L: 111,
1903
1982
  S: void 0,
1904
1983
  C: (f, a) => f(...a)
1905
1984
  });
@@ -1909,12 +1988,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1909
1988
  });
1910
1989
  }
1911
1990
  case Invitation6.State.AUTHENTICATING: {
1912
- log6("[invitation authenticating]", {
1991
+ log7("[invitation authenticating]", {
1913
1992
  Kind,
1914
1993
  invitation: invitation2
1915
1994
  }, {
1916
- F: __dxlog_file6,
1917
- L: 114,
1995
+ F: __dxlog_file7,
1996
+ L: 116,
1918
1997
  S: void 0,
1919
1998
  C: (f, a) => f(...a)
1920
1999
  });
@@ -1924,12 +2003,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1924
2003
  });
1925
2004
  }
1926
2005
  case Invitation6.State.SUCCESS: {
1927
- log6("[invitation success]", {
2006
+ log7("[invitation success]", {
1928
2007
  Kind,
1929
2008
  invitation: invitation2
1930
2009
  }, {
1931
- F: __dxlog_file6,
1932
- L: 119,
2010
+ F: __dxlog_file7,
2011
+ L: 121,
1933
2012
  S: void 0,
1934
2013
  C: (f, a) => f(...a)
1935
2014
  });
@@ -1940,11 +2019,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
1940
2019
  return complete?.();
1941
2020
  }
1942
2021
  case Invitation6.State.CANCELLED: {
1943
- log6.warn("[invitation cancelled]", {
2022
+ log7.warn("[invitation cancelled]", {
1944
2023
  Kind
1945
2024
  }, {
1946
- F: __dxlog_file6,
1947
- L: 125,
2025
+ F: __dxlog_file7,
2026
+ L: 127,
1948
2027
  S: void 0,
1949
2028
  C: (f, a) => f(...a)
1950
2029
  });
@@ -1954,11 +2033,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
1954
2033
  });
1955
2034
  }
1956
2035
  case Invitation6.State.TIMEOUT: {
1957
- log6.error("[invitation timeout]", {
2036
+ log7.error("[invitation timeout]", {
1958
2037
  Kind
1959
2038
  }, {
1960
- F: __dxlog_file6,
1961
- L: 130,
2039
+ F: __dxlog_file7,
2040
+ L: 132,
1962
2041
  S: void 0,
1963
2042
  C: (f, a) => f(...a)
1964
2043
  });
@@ -1970,12 +2049,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1970
2049
  }
1971
2050
  }, (error) => {
1972
2051
  if (error instanceof AlreadyJoinedError) {
1973
- log6("[already joined]", {
2052
+ log7("[already joined]", {
1974
2053
  Kind,
1975
2054
  error
1976
2055
  }, {
1977
- F: __dxlog_file6,
1978
- L: 137,
2056
+ F: __dxlog_file7,
2057
+ L: 139,
1979
2058
  S: void 0,
1980
2059
  C: (f, a) => f(...a)
1981
2060
  });
@@ -1985,12 +2064,12 @@ var getInvitationSubscribable = (Kind, invitation) => {
1985
2064
  });
1986
2065
  return complete?.();
1987
2066
  }
1988
- log6.error("[invitation errored]", {
2067
+ log7.error("[invitation errored]", {
1989
2068
  Kind,
1990
2069
  error
1991
2070
  }, {
1992
- F: __dxlog_file6,
1993
- L: 142,
2071
+ F: __dxlog_file7,
2072
+ L: 144,
1994
2073
  S: void 0,
1995
2074
  C: (f, a) => f(...a)
1996
2075
  });
@@ -2162,6 +2241,7 @@ var joinMachine = createMachine2({
2162
2241
  id: "join",
2163
2242
  predictableActionArguments: true,
2164
2243
  context: {
2244
+ initialDisposition: "default",
2165
2245
  mode: "default",
2166
2246
  identity: null,
2167
2247
  halo: {},
@@ -2176,6 +2256,11 @@ var joinMachine = createMachine2({
2176
2256
  target: "resettingIdentity",
2177
2257
  actions: "log"
2178
2258
  },
2259
+ {
2260
+ cond: "initiallyAcceptingHaloInvitation",
2261
+ target: "#join.choosingIdentity.acceptingHaloInvitation",
2262
+ actions: "log"
2263
+ },
2179
2264
  {
2180
2265
  cond: "noSelectedIdentity",
2181
2266
  target: "choosingIdentity",
@@ -2258,6 +2343,7 @@ var joinMachine = createMachine2({
2258
2343
  guards: {
2259
2344
  existingIdentity: ({ identity, mode }, _event) => mode === "halo-only" && !!identity,
2260
2345
  noSelectedIdentity: ({ identity }, _event) => !identity,
2346
+ initiallyAcceptingHaloInvitation: ({ identity, initialDisposition }, _event) => !identity && initialDisposition === "accept-halo-invitation",
2261
2347
  hasHaloUnredeemedCode: ({ halo }, _event) => !!halo.unredeemedCode,
2262
2348
  noSpaceInvitation: ({ space }, _event) => !space.invitation && !space.unredeemedCode
2263
2349
  },
@@ -2309,13 +2395,13 @@ var joinMachine = createMachine2({
2309
2395
  } : context.space
2310
2396
  }),
2311
2397
  log: (context, event) => {
2312
- log6("[transition]", {
2398
+ log7("[transition]", {
2313
2399
  event,
2314
2400
  haloInvitation: context.halo.invitation,
2315
2401
  spaceInvitation: context.space.invitation
2316
2402
  }, {
2317
- F: __dxlog_file6,
2318
- L: 406,
2403
+ F: __dxlog_file7,
2404
+ L: 416,
2319
2405
  S: void 0,
2320
2406
  C: (f, a) => f(...a)
2321
2407
  });
@@ -2327,9 +2413,9 @@ var defaultCodeFromUrl = (invitationType, text) => {
2327
2413
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2328
2414
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2329
2415
  } catch (err) {
2330
- log6.catch(err, void 0, {
2331
- F: __dxlog_file6,
2332
- L: 433,
2416
+ log7.catch(err, void 0, {
2417
+ F: __dxlog_file7,
2418
+ L: 443,
2333
2419
  S: void 0,
2334
2420
  C: (f, a) => f(...a)
2335
2421
  });
@@ -2348,9 +2434,9 @@ var useJoinMachine = (client, options) => {
2348
2434
  invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
2349
2435
  };
2350
2436
  } catch (err) {
2351
- log6.error("Could not redeem device invitation code", err, {
2352
- F: __dxlog_file6,
2353
- L: 454,
2437
+ log7.error("Could not redeem device invitation code", err, {
2438
+ F: __dxlog_file7,
2439
+ L: 464,
2354
2440
  S: void 0,
2355
2441
  C: (f, a) => f(...a)
2356
2442
  });
@@ -2373,9 +2459,9 @@ var useJoinMachine = (client, options) => {
2373
2459
  invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
2374
2460
  };
2375
2461
  } catch (err) {
2376
- log6.error("Could not redeem space invitation code", err, {
2377
- F: __dxlog_file6,
2378
- L: 476,
2462
+ log7.error("Could not redeem space invitation code", err, {
2463
+ F: __dxlog_file7,
2464
+ L: 486,
2379
2465
  S: void 0,
2380
2466
  C: (f, a) => f(...a)
2381
2467
  });
@@ -2538,17 +2624,17 @@ var IdentityAdded = (props) => {
2538
2624
  };
2539
2625
 
2540
2626
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2541
- import React33, { useState as useState6 } from "react";
2542
- import { log as log7 } from "@dxos/log";
2627
+ import React33, { useState as useState7 } from "react";
2628
+ import { log as log8 } from "@dxos/log";
2543
2629
  import { useClient as useClient4 } from "@dxos/react-client";
2544
2630
  import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2545
- var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2631
+ var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
2546
2632
  var IdentityInput = (props) => {
2547
2633
  const { send, method } = props;
2548
2634
  const isRecover = method === "recover identity";
2549
2635
  const client = useClient4();
2550
2636
  const { t } = useTranslation19("os");
2551
- const [validationMessage, setValidationMessage] = useState6("");
2637
+ const [validationMessage, setValidationMessage] = useState7("");
2552
2638
  const createIdentity = (displayName) => {
2553
2639
  void client.halo.createIdentity({
2554
2640
  [isRecover ? "seedphrase" : "displayName"]: displayName
@@ -2558,8 +2644,8 @@ var IdentityInput = (props) => {
2558
2644
  identity
2559
2645
  });
2560
2646
  }, (error) => {
2561
- log7.catch(error, void 0, {
2562
- F: __dxlog_file7,
2647
+ log8.catch(error, void 0, {
2648
+ F: __dxlog_file8,
2563
2649
  L: 37,
2564
2650
  S: void 0,
2565
2651
  C: (f, a) => f(...a)
@@ -2577,7 +2663,7 @@ var IdentityInputImpl = (props) => {
2577
2663
  const { method, send, active, onDisplayNameConfirm, validationMessage } = props;
2578
2664
  const disabled = !active;
2579
2665
  const { t } = useTranslation19("os");
2580
- const [inputValue, setInputValue] = useState6("");
2666
+ const [inputValue, setInputValue] = useState7("");
2581
2667
  const isRecover = method === "recover identity";
2582
2668
  return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
2583
2669
  role: "none",
@@ -2627,18 +2713,18 @@ var InvitationAccepted = (props) => {
2627
2713
  };
2628
2714
 
2629
2715
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2630
- import React35, { useState as useState7, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2631
- import { log as log8 } from "@dxos/log";
2716
+ import React35, { useState as useState8, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
2717
+ import { log as log9 } from "@dxos/log";
2632
2718
  import { useTranslation as useTranslation21 } from "@dxos/react-ui";
2633
- var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2719
+ var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2634
2720
  var invitationCodeFromUrl = (text) => {
2635
2721
  try {
2636
2722
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2637
2723
  const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
2638
2724
  return invitation ?? text;
2639
2725
  } catch (err) {
2640
- log8.catch(err, void 0, {
2641
- F: __dxlog_file8,
2726
+ log9.catch(err, void 0, {
2727
+ F: __dxlog_file9,
2642
2728
  L: 25,
2643
2729
  S: void 0,
2644
2730
  C: (f, a) => f(...a)
@@ -2650,7 +2736,7 @@ var InvitationInput = (props) => {
2650
2736
  const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
2651
2737
  const disabled = !active;
2652
2738
  const { t } = useTranslation21("os");
2653
- const [inputValue, setInputValue] = useState7(unredeemedCode ?? "");
2739
+ const [inputValue, setInputValue] = useState8(unredeemedCode ?? "");
2654
2740
  useEffect4(() => {
2655
2741
  unredeemedCode && setInputValue(unredeemedCode ?? "");
2656
2742
  }, [
@@ -2769,7 +2855,7 @@ var InvitationRescuer = (props) => {
2769
2855
  };
2770
2856
 
2771
2857
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
2772
- import React37, { useState as useState8 } from "react";
2858
+ import React37, { useState as useState9 } from "react";
2773
2859
  import { Input as Input2, useTranslation as useTranslation23 } from "@dxos/react-ui";
2774
2860
  import { hexToEmoji as hexToEmoji4 } from "@dxos/util";
2775
2861
  var pinLength = 6;
@@ -2777,7 +2863,7 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2777
2863
  const disabled = !active || pending;
2778
2864
  const { t } = useTranslation23("os");
2779
2865
  const invitationType = Kind.toLowerCase();
2780
- const [authCode, setAuthCode] = useState8("");
2866
+ const [authCode, setAuthCode] = useState9("");
2781
2867
  const onChange = ({ target: { value } }) => {
2782
2868
  setAuthCode(value);
2783
2869
  if (value.length === pinLength) {
@@ -2820,69 +2906,6 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2820
2906
  }, t("next label"))));
2821
2907
  };
2822
2908
 
2823
- // packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx
2824
- import React38, { useState as useState9 } from "react";
2825
- import { log as log9 } from "@dxos/log";
2826
- import { useClient as useClient5 } from "@dxos/react-client";
2827
- import { useTranslation as useTranslation24 } from "@dxos/react-ui";
2828
- var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx";
2829
- var ResetIdentity = ({ send, active, onCancelResetIdentity }) => {
2830
- const client = useClient5();
2831
- const { t } = useTranslation24("os");
2832
- const [validationMessage, setValidationMessage] = useState9("");
2833
- const [pending, setPending] = useState9(false);
2834
- const resetIdentity = () => {
2835
- setPending(true);
2836
- void client.reset().then(() => send?.({
2837
- type: "resetIdentity"
2838
- }), (error) => {
2839
- log9.catch(error, void 0, {
2840
- F: __dxlog_file9,
2841
- L: 37,
2842
- S: void 0,
2843
- C: (f, a) => f(...a)
2844
- });
2845
- setValidationMessage(t("failed to reset identity message"));
2846
- setPending(false);
2847
- });
2848
- };
2849
- return /* @__PURE__ */ React38.createElement(ResetIdentityImpl, {
2850
- disabled: !active,
2851
- pending,
2852
- validationMessage,
2853
- onConfirm: () => resetIdentity(),
2854
- onCancelResetIdentity
2855
- });
2856
- };
2857
- var ResetIdentityImpl = ({ disabled, pending, validationMessage, onConfirm, onCancelResetIdentity }) => {
2858
- const { t } = useTranslation24("os");
2859
- const confirmationValue = t("confirmation value");
2860
- const [inputValue, setInputValue] = useState9("");
2861
- return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement("div", {
2862
- role: "none",
2863
- className: "grow flex flex-col justify-center"
2864
- }, /* @__PURE__ */ React38.createElement(Input, {
2865
- validationMessage,
2866
- label: /* @__PURE__ */ React38.createElement(StepHeading, null, t("reset identity input label", {
2867
- confirmationValue
2868
- })),
2869
- disabled,
2870
- "data-testid": "reset-identity-input",
2871
- placeholder: confirmationValue,
2872
- onChange: ({ target: { value } }) => setInputValue(value)
2873
- })), /* @__PURE__ */ React38.createElement(Actions, null, /* @__PURE__ */ React38.createElement(Action, {
2874
- disabled,
2875
- onClick: () => onCancelResetIdentity?.(),
2876
- "data-testid": "reset-identity-input-cancel"
2877
- }, t("cancel label")), /* @__PURE__ */ React38.createElement(Action, {
2878
- // TODO(wittjosiah): Probably make this red?
2879
- variant: "destructive",
2880
- disabled: disabled || pending || inputValue !== confirmationValue,
2881
- onClick: () => onConfirm?.(),
2882
- "data-testid": "reset-identity-input-confirm"
2883
- }, pending ? t("reset in progress label") : t("confirm label"))));
2884
- };
2885
-
2886
2909
  // packages/sdk/shell/src/styles/panelStyles.ts
2887
2910
  var stepStyles = "pbs-1 pbe-3 pli-3";
2888
2911
 
@@ -2910,49 +2933,49 @@ var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTe
2910
2933
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2911
2934
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2912
2935
  var JoinPanelImpl = (props) => {
2913
- const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetIdentity, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
2914
- return /* @__PURE__ */ React39.createElement(DensityProvider3, {
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;
2937
+ return /* @__PURE__ */ React38.createElement(DensityProvider3, {
2915
2938
  density: "fine"
2916
- }, mode !== "halo-only" && /* @__PURE__ */ React39.createElement(JoinHeading, {
2939
+ }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
2917
2940
  titleId,
2918
2941
  mode,
2919
2942
  onExit,
2920
2943
  exitActionParent
2921
- }), /* @__PURE__ */ React39.createElement(Viewport.Root, {
2944
+ }), /* @__PURE__ */ React38.createElement(Viewport.Root, {
2922
2945
  focusManaged: true,
2923
2946
  activeView
2924
- }, /* @__PURE__ */ React39.createElement(Viewport.Views, null, /* @__PURE__ */ React39.createElement(Viewport.View, {
2947
+ }, /* @__PURE__ */ React38.createElement(Viewport.Views, null, /* @__PURE__ */ React38.createElement(Viewport.View, {
2925
2948
  classNames: stepStyles,
2926
2949
  id: "addition method chooser"
2927
- }, /* @__PURE__ */ React39.createElement(AdditionMethodChooser, {
2950
+ }, /* @__PURE__ */ React38.createElement(AdditionMethodChooser, {
2928
2951
  send,
2929
2952
  active: activeView === "addition method chooser"
2930
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2953
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2931
2954
  classNames: stepStyles,
2932
- id: "reset identity confirmation"
2933
- }, /* @__PURE__ */ React39.createElement(ResetIdentityComponent, {
2955
+ id: "reset storage confirmation"
2956
+ }, /* @__PURE__ */ React38.createElement(ConfirmResetComponent, {
2934
2957
  send,
2935
- method: "reset identity",
2936
2958
  active: activeView === "reset identity confirmation",
2937
- onCancelResetIdentity
2938
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2959
+ onCancel: onCancelResetStorage,
2960
+ onConfirm: onConfirmResetStorage
2961
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2939
2962
  classNames: stepStyles,
2940
2963
  id: "create identity input"
2941
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2964
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2942
2965
  send,
2943
2966
  method: "create identity",
2944
2967
  active: activeView === "create identity input"
2945
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2968
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2946
2969
  classNames: stepStyles,
2947
2970
  id: "recover identity input"
2948
- }, /* @__PURE__ */ React39.createElement(IdentityInputComponent, {
2971
+ }, /* @__PURE__ */ React38.createElement(IdentityInputComponent, {
2949
2972
  send,
2950
2973
  method: "recover identity",
2951
2974
  active: activeView === "recover identity input"
2952
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2975
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2953
2976
  classNames: stepStyles,
2954
2977
  id: "halo invitation input"
2955
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
2978
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
2956
2979
  send,
2957
2980
  Kind: "Halo",
2958
2981
  active: activeView === "halo invitation input",
@@ -2962,20 +2985,20 @@ var JoinPanelImpl = (props) => {
2962
2985
  ...succeededKeys?.Halo && {
2963
2986
  succeededKeys: succeededKeys.Halo
2964
2987
  }
2965
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2988
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2966
2989
  classNames: stepStyles,
2967
2990
  id: "halo invitation rescuer"
2968
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
2991
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
2969
2992
  send,
2970
2993
  Kind: "Halo",
2971
2994
  active: activeView === "halo invitation rescuer",
2972
2995
  invitationState: invitationStates?.Halo,
2973
2996
  onInvitationCancel: onHaloInvitationCancel,
2974
2997
  failReason: failReasons?.Halo
2975
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
2998
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2976
2999
  classNames: stepStyles,
2977
3000
  id: "halo invitation authenticator"
2978
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3001
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
2979
3002
  send,
2980
3003
  Kind: "Halo",
2981
3004
  active: activeView === "halo invitation authenticator",
@@ -2984,28 +3007,28 @@ var JoinPanelImpl = (props) => {
2984
3007
  ...failed.has("Halo") && {
2985
3008
  failed: true
2986
3009
  }
2987
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3010
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2988
3011
  classNames: stepStyles,
2989
3012
  id: "halo invitation accepted"
2990
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3013
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
2991
3014
  send,
2992
3015
  Kind: "Halo",
2993
3016
  active: activeView === "halo invitation accepted",
2994
3017
  doneActionParent,
2995
3018
  onDone: onHaloDone
2996
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3019
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
2997
3020
  classNames: stepStyles,
2998
3021
  id: "identity added"
2999
- }, /* @__PURE__ */ React39.createElement(IdentityAdded, {
3022
+ }, /* @__PURE__ */ React38.createElement(IdentityAdded, {
3000
3023
  send,
3001
3024
  mode,
3002
3025
  active: activeView === "identity added",
3003
3026
  doneActionParent,
3004
3027
  onDone: onHaloDone
3005
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3028
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3006
3029
  classNames: stepStyles,
3007
3030
  id: "space invitation input"
3008
- }, /* @__PURE__ */ React39.createElement(InvitationInput, {
3031
+ }, /* @__PURE__ */ React38.createElement(InvitationInput, {
3009
3032
  send,
3010
3033
  Kind: "Space",
3011
3034
  active: activeView === "space invitation input",
@@ -3017,20 +3040,20 @@ var JoinPanelImpl = (props) => {
3017
3040
  },
3018
3041
  onExit,
3019
3042
  exitActionParent
3020
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3043
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3021
3044
  classNames: stepStyles,
3022
3045
  id: "space invitation rescuer"
3023
- }, /* @__PURE__ */ React39.createElement(InvitationRescuer, {
3046
+ }, /* @__PURE__ */ React38.createElement(InvitationRescuer, {
3024
3047
  send,
3025
3048
  Kind: "Space",
3026
3049
  active: activeView === "space invitation rescuer",
3027
3050
  invitationState: invitationStates?.Space,
3028
3051
  onInvitationCancel: onSpaceInvitationCancel,
3029
3052
  failReason: failReasons?.Space
3030
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3053
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3031
3054
  classNames: stepStyles,
3032
3055
  id: "space invitation authenticator"
3033
- }, /* @__PURE__ */ React39.createElement(InvitationAuthenticator, {
3056
+ }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
3034
3057
  send,
3035
3058
  Kind: "Space",
3036
3059
  active: activeView === "space invitation authenticator",
@@ -3039,10 +3062,10 @@ var JoinPanelImpl = (props) => {
3039
3062
  ...failed.has("Space") && {
3040
3063
  failed: true
3041
3064
  }
3042
- })), /* @__PURE__ */ React39.createElement(Viewport.View, {
3065
+ })), /* @__PURE__ */ React38.createElement(Viewport.View, {
3043
3066
  classNames: stepStyles,
3044
3067
  id: "space invitation accepted"
3045
- }, /* @__PURE__ */ React39.createElement(InvitationAccepted, {
3068
+ }, /* @__PURE__ */ React38.createElement(InvitationAccepted, {
3046
3069
  send,
3047
3070
  Kind: "Space",
3048
3071
  active: activeView === "space invitation accepted",
@@ -3050,14 +3073,15 @@ var JoinPanelImpl = (props) => {
3050
3073
  onDone: onSpaceDone
3051
3074
  })))));
3052
3075
  };
3053
- var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetIdentity }) => {
3054
- const client = useClient6();
3076
+ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetStorage }) => {
3077
+ const client = useClient5();
3055
3078
  const identity = useIdentity2();
3056
3079
  const { hasIosKeyboard } = useThemeContext4();
3057
3080
  const titleId = useId7("joinPanel__heading", propsTitleId);
3058
3081
  const [joinState, joinSend, joinService] = useJoinMachine(client, {
3059
3082
  context: {
3060
3083
  mode,
3084
+ initialDisposition,
3061
3085
  identity,
3062
3086
  ...initialInvitationCode && {
3063
3087
  [mode === "halo-only" ? "halo" : "space"]: {
@@ -3070,7 +3094,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3070
3094
  const subscription = joinService.subscribe((state) => {
3071
3095
  log10("[state]", state, {
3072
3096
  F: __dxlog_file10,
3073
- L: 201,
3097
+ L: 204,
3074
3098
  S: void 0,
3075
3099
  C: (f, a) => f(...a)
3076
3100
  });
@@ -3282,7 +3306,15 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3282
3306
  joinState,
3283
3307
  propsOnDone
3284
3308
  ]);
3285
- return /* @__PURE__ */ React39.createElement(JoinPanelImpl, {
3309
+ const onConfirmResetStorage = useCallback7(() => client.reset().then(() => {
3310
+ joinSend({
3311
+ type: "resetIdentity"
3312
+ });
3313
+ }), [
3314
+ client,
3315
+ joinSend
3316
+ ]);
3317
+ return /* @__PURE__ */ React38.createElement(JoinPanelImpl, {
3286
3318
  titleId,
3287
3319
  mode,
3288
3320
  send: joinSend,
@@ -3316,16 +3348,17 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
3316
3348
  });
3317
3349
  return joinState.context.space.invitationObservable?.authenticate(authCode);
3318
3350
  },
3319
- onCancelResetIdentity
3351
+ onConfirmResetStorage,
3352
+ onCancelResetStorage
3320
3353
  });
3321
3354
  };
3322
3355
 
3323
3356
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3324
3357
  import { Planet } from "@phosphor-icons/react";
3325
- import React41, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3358
+ import React40, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
3326
3359
  import { log as log13 } from "@dxos/log";
3327
3360
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3328
- import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation26 } from "@dxos/react-ui";
3361
+ import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation25 } from "@dxos/react-ui";
3329
3362
 
3330
3363
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3331
3364
  import { useMachine as useMachine3 } from "@xstate/react";
@@ -3391,18 +3424,18 @@ var useSpaceMachine = (options) => {
3391
3424
 
3392
3425
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3393
3426
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3394
- import React40, { useCallback as useCallback8, useState as useState10 } from "react";
3427
+ import React39, { useCallback as useCallback8, useState as useState10 } from "react";
3395
3428
  import { log as log12 } from "@dxos/log";
3396
3429
  import { useConfig } from "@dxos/react-client";
3397
3430
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3398
3431
  import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
3399
- import { ScrollArea, useTranslation as useTranslation25 } from "@dxos/react-ui";
3432
+ import { ScrollArea, useTranslation as useTranslation24 } from "@dxos/react-ui";
3400
3433
  import { descriptionText as descriptionText10, mx as mx22 } from "@dxos/react-ui-theme";
3401
3434
  var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
3402
3435
  var activeActionKey = "dxos:react-shell/space-manager/active-action";
3403
3436
  var SpaceManager = (props) => {
3404
3437
  const { space, target } = props;
3405
- const { t } = useTranslation25("os");
3438
+ const { t } = useTranslation24("os");
3406
3439
  const config = useConfig();
3407
3440
  const invitations = useSpaceInvitations2(space?.key);
3408
3441
  const onInvitationEvent = useCallback8((invitation) => {
@@ -3455,7 +3488,7 @@ var SpaceManager = (props) => {
3455
3488
  ])
3456
3489
  }
3457
3490
  };
3458
- return /* @__PURE__ */ React40.createElement(SpaceManagerImpl, {
3491
+ return /* @__PURE__ */ React39.createElement(SpaceManagerImpl, {
3459
3492
  ...props,
3460
3493
  invitations,
3461
3494
  inviteActions
@@ -3464,7 +3497,7 @@ var SpaceManager = (props) => {
3464
3497
  var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
3465
3498
  var SpaceManagerImpl = (props) => {
3466
3499
  const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
3467
- const { t } = useTranslation25("os");
3500
+ const { t } = useTranslation24("os");
3468
3501
  const inviteActions = propsInviteActions ?? {
3469
3502
  noopInvite: {
3470
3503
  label: t("create space invitation label"),
@@ -3482,26 +3515,26 @@ var SpaceManagerImpl = (props) => {
3482
3515
  const visibleInvitations = showInactiveInvitations ? invitations : invitations?.filter((invitation) => ![
3483
3516
  Invitation8.State.CANCELLED
3484
3517
  ].includes(invitation.get().state));
3485
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(ScrollArea.Root, {
3518
+ return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(ScrollArea.Root, {
3486
3519
  classNames: "grow shrink basis-28 -mli-2"
3487
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Viewport, {
3520
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Viewport, {
3488
3521
  classNames: "is-full pie-2"
3489
- }, !!visibleInvitations?.length && /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement("h3", {
3522
+ }, !!visibleInvitations?.length && /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement("h3", {
3490
3523
  className: mx22(headingFragment, descriptionText10)
3491
- }, t("invitation list heading")), /* @__PURE__ */ React40.createElement(InvitationListComponent, {
3524
+ }, t("invitation list heading")), /* @__PURE__ */ React39.createElement(InvitationListComponent, {
3492
3525
  className: "mb-2",
3493
3526
  send,
3494
3527
  invitations: visibleInvitations ?? [],
3495
3528
  onClickRemove: (invitation) => invitation.cancel(),
3496
3529
  createInvitationUrl
3497
- }), /* @__PURE__ */ React40.createElement("h3", {
3530
+ }), /* @__PURE__ */ React39.createElement("h3", {
3498
3531
  className: mx22(headingFragment, descriptionText10, "mbs-2")
3499
- }, t("space member list heading"))), /* @__PURE__ */ React40.createElement(SpaceMemberListComponent, {
3532
+ }, t("space member list heading"))), /* @__PURE__ */ React39.createElement(SpaceMemberListComponent, {
3500
3533
  spaceKey: space.key,
3501
3534
  includeSelf: true
3502
- })), /* @__PURE__ */ React40.createElement(ScrollArea.Scrollbar, {
3535
+ })), /* @__PURE__ */ React39.createElement(ScrollArea.Scrollbar, {
3503
3536
  orientation: "vertical"
3504
- }, /* @__PURE__ */ React40.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React40.createElement(Actions, null, /* @__PURE__ */ React40.createElement(BifurcatedAction, {
3537
+ }, /* @__PURE__ */ React39.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React39.createElement(Actions, null, /* @__PURE__ */ React39.createElement(BifurcatedAction, {
3505
3538
  disabled: !active,
3506
3539
  actions: inviteActions,
3507
3540
  activeAction,
@@ -3513,47 +3546,47 @@ var SpaceManagerImpl = (props) => {
3513
3546
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3514
3547
  var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
3515
3548
  var SpacePanelHeading = ({ titleId, space, onDone }) => {
3516
- const { t } = useTranslation26("os");
3549
+ const { t } = useTranslation25("os");
3517
3550
  const name = space.properties.name;
3518
- return /* @__PURE__ */ React41.createElement(Heading, {
3551
+ return /* @__PURE__ */ React40.createElement(Heading, {
3519
3552
  titleId,
3520
3553
  title: t("space panel heading"),
3521
- corner: /* @__PURE__ */ React41.createElement(CloseButton, {
3554
+ corner: /* @__PURE__ */ React40.createElement(CloseButton, {
3522
3555
  "data-testid": "identity-panel-done",
3523
3556
  onDone
3524
3557
  })
3525
- }, /* @__PURE__ */ React41.createElement("div", {
3558
+ }, /* @__PURE__ */ React40.createElement("div", {
3526
3559
  role: "none",
3527
3560
  className: "flex gap-4 items-center justify-center mlb-4"
3528
- }, /* @__PURE__ */ React41.createElement(Planet, {
3561
+ }, /* @__PURE__ */ React40.createElement(Planet, {
3529
3562
  size: 32,
3530
3563
  weight: "light"
3531
- }), /* @__PURE__ */ React41.createElement("div", {
3564
+ }), /* @__PURE__ */ React40.createElement("div", {
3532
3565
  className: "block text-start font-light text-xl"
3533
3566
  }, name ?? space.key.truncate())));
3534
3567
  };
3535
3568
  var SpacePanelImpl = (props) => {
3536
3569
  const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3537
- return /* @__PURE__ */ React41.createElement(DensityProvider4, {
3570
+ return /* @__PURE__ */ React40.createElement(DensityProvider4, {
3538
3571
  density: "fine"
3539
- }, /* @__PURE__ */ React41.createElement(SpacePanelHeading, {
3572
+ }, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3540
3573
  ...rest,
3541
3574
  titleId,
3542
3575
  space
3543
- }), /* @__PURE__ */ React41.createElement(Viewport.Root, {
3576
+ }), /* @__PURE__ */ React40.createElement(Viewport.Root, {
3544
3577
  activeView
3545
- }, /* @__PURE__ */ React41.createElement(Viewport.Views, null, /* @__PURE__ */ React41.createElement(Viewport.View, {
3578
+ }, /* @__PURE__ */ React40.createElement(Viewport.Views, null, /* @__PURE__ */ React40.createElement(Viewport.View, {
3546
3579
  id: "space manager",
3547
3580
  classNames: stepStyles
3548
- }, /* @__PURE__ */ React41.createElement(SpaceManagerComponent, {
3581
+ }, /* @__PURE__ */ React40.createElement(SpaceManagerComponent, {
3549
3582
  active: activeView === "space manager",
3550
3583
  space,
3551
3584
  target,
3552
3585
  ...rest
3553
- })), /* @__PURE__ */ React41.createElement(Viewport.View, {
3586
+ })), /* @__PURE__ */ React40.createElement(Viewport.View, {
3554
3587
  id: "space invitation manager",
3555
3588
  classNames: stepStyles
3556
- }, /* @__PURE__ */ React41.createElement(InvitationManagerComponent, {
3589
+ }, /* @__PURE__ */ React40.createElement(InvitationManagerComponent, {
3557
3590
  active: activeView === "space invitation manager",
3558
3591
  ...rest,
3559
3592
  invitationUrl: props.invitationUrl
@@ -3561,7 +3594,7 @@ var SpacePanelImpl = (props) => {
3561
3594
  };
3562
3595
  var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
3563
3596
  const invitationStatus = useInvitationStatus3(invitation);
3564
- return /* @__PURE__ */ React41.createElement(SpacePanelImpl, {
3597
+ return /* @__PURE__ */ React40.createElement(SpacePanelImpl, {
3565
3598
  ...props,
3566
3599
  ...invitationStatus,
3567
3600
  invitationUrl: props.createInvitationUrl(invitationStatus.invitationCode)
@@ -3608,16 +3641,31 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3608
3641
  };
3609
3642
  return spaceState.context.invitation ? (
3610
3643
  // TODO(wittjosiah): Unused? Remove?
3611
- /* @__PURE__ */ React41.createElement(SpacePanelWithInvitationImpl, {
3644
+ /* @__PURE__ */ React40.createElement(SpacePanelWithInvitationImpl, {
3612
3645
  ...implProps,
3613
3646
  invitation: spaceState.context.invitation
3614
3647
  })
3615
- ) : /* @__PURE__ */ React41.createElement(SpacePanelImpl, implProps);
3648
+ ) : /* @__PURE__ */ React40.createElement(SpacePanelImpl, implProps);
3649
+ };
3650
+
3651
+ // packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
3652
+ import React41 from "react";
3653
+ import { Status, useTranslation as useTranslation26 } from "@dxos/react-ui";
3654
+ var StatusPanel = ({ titleId }) => {
3655
+ const { t } = useTranslation26("os");
3656
+ return /* @__PURE__ */ React41.createElement("div", {
3657
+ className: "grid place-items-center p-2 gap-2"
3658
+ }, /* @__PURE__ */ React41.createElement("p", {
3659
+ id: titleId,
3660
+ className: "font-medium text-center"
3661
+ }, t("resetting message")), /* @__PURE__ */ React41.createElement(Status, {
3662
+ indeterminate: true
3663
+ }, t("resetting message")));
3616
3664
  };
3617
3665
 
3618
3666
  // packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
3619
3667
  var IdentityDialog = (props) => {
3620
- const titleId = useId9("spaceDialog__title");
3668
+ const titleId = useId9("identityDialog__title", props.title);
3621
3669
  return /* @__PURE__ */ React42.createElement(Dialog.Root, {
3622
3670
  defaultOpen: true,
3623
3671
  onOpenChange: (open) => open || props.onDone?.()
@@ -3664,7 +3712,7 @@ var JoinDialog = (joinPanelProps) => {
3664
3712
  };
3665
3713
 
3666
3714
  // packages/sdk/shell/src/composites/Shell/run-shell.tsx
3667
- import React46, { StrictMode } from "react";
3715
+ import React47, { StrictMode } from "react";
3668
3716
  import { createRoot } from "react-dom/client";
3669
3717
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
3670
3718
  import { ShellRuntimeImpl } from "@dxos/client-services";
@@ -3674,9 +3722,9 @@ import { defaultTx } from "@dxos/react-ui-theme";
3674
3722
  import { createIFramePort } from "@dxos/rpc-tunnel";
3675
3723
 
3676
3724
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3677
- import React45, { useEffect as useEffect7, useState as useState11 } from "react";
3725
+ import React46, { useEffect as useEffect7, useState as useState11 } from "react";
3678
3726
  import { log as log14 } from "@dxos/log";
3679
- import { ShellDisplay, ShellLayout, useClient as useClient7 } from "@dxos/react-client";
3727
+ import { ShellDisplay, ShellLayout, useClient as useClient6 } from "@dxos/react-client";
3680
3728
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
3681
3729
 
3682
3730
  // packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
@@ -3698,6 +3746,20 @@ var SpaceDialog = (spacePanelProps) => {
3698
3746
  }))))));
3699
3747
  };
3700
3748
 
3749
+ // packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
3750
+ import React45 from "react";
3751
+ import { AlertDialog as AlertDialog2, useId as useId12 } from "@dxos/react-ui";
3752
+ var StatusDialog = () => {
3753
+ const titleId = useId12("statusDialog__title");
3754
+ return /* @__PURE__ */ React45.createElement(AlertDialog2.Root, {
3755
+ open: true
3756
+ }, /* @__PURE__ */ React45.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React45.createElement(AlertDialog2.Content, {
3757
+ "aria-labelledby": titleId
3758
+ }, /* @__PURE__ */ React45.createElement(StatusPanel, {
3759
+ titleId
3760
+ })))));
3761
+ };
3762
+
3701
3763
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
3702
3764
  var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
3703
3765
  var Shell = ({ runtime, origin }) => {
@@ -3707,7 +3769,7 @@ var Shell = ({ runtime, origin }) => {
3707
3769
  spaceKey: runtime.spaceKey,
3708
3770
  target: runtime.target
3709
3771
  });
3710
- const client = useClient7();
3772
+ const client = useClient6();
3711
3773
  const space = useSpace2(spaceKey);
3712
3774
  useEffect7(() => {
3713
3775
  return runtime.layoutUpdate.on((request) => setLayout(request));
@@ -3718,7 +3780,7 @@ var Shell = ({ runtime, origin }) => {
3718
3780
  if (layout === ShellLayout.SPACE && !space) {
3719
3781
  log14.warn("No space found for shell space invitations.", void 0, {
3720
3782
  F: __dxlog_file14,
3721
- L: 32,
3783
+ L: 33,
3722
3784
  S: void 0,
3723
3785
  C: (f, a) => f(...a)
3724
3786
  });
@@ -3738,11 +3800,15 @@ var Shell = ({ runtime, origin }) => {
3738
3800
  space
3739
3801
  ]);
3740
3802
  switch (layout) {
3803
+ case ShellLayout.STATUS:
3804
+ return /* @__PURE__ */ React46.createElement(StatusDialog, null);
3741
3805
  case ShellLayout.INITIALIZE_IDENTITY:
3742
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3806
+ case ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION:
3807
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3743
3808
  mode: "halo-only",
3809
+ initialDisposition: layout === ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION ? "accept-halo-invitation" : "default",
3744
3810
  initialInvitationCode: invitationCode,
3745
- onCancelResetIdentity: () => runtime.setLayout({
3811
+ onCancelResetStorage: () => runtime.setLayout({
3746
3812
  layout: ShellLayout.IDENTITY
3747
3813
  }),
3748
3814
  onDone: () => {
@@ -3757,18 +3823,27 @@ var Shell = ({ runtime, origin }) => {
3757
3823
  case ShellLayout.IDENTITY:
3758
3824
  case ShellLayout.SHARE_IDENTITY:
3759
3825
  case ShellLayout.EDIT_PROFILE:
3760
- return /* @__PURE__ */ React45.createElement(IdentityDialog, {
3826
+ return /* @__PURE__ */ React46.createElement(IdentityDialog, {
3761
3827
  createInvitationUrl: (invitationCode2) => `${origin}?deviceInvitationCode=${invitationCode2}`,
3762
- onResetDevice: async () => {
3828
+ onResetStorage: async () => {
3829
+ runtime.setLayout({
3830
+ layout: ShellLayout.STATUS
3831
+ });
3763
3832
  await client.reset();
3764
- await runtime.setAppContext({
3833
+ return runtime.setAppContext({
3765
3834
  display: ShellDisplay.NONE,
3766
3835
  reload: true
3767
3836
  });
3768
3837
  },
3769
- onJoinNewIdentity: () => runtime.setLayout({
3770
- layout: ShellLayout.INITIALIZE_IDENTITY
3771
- }),
3838
+ onJoinNewIdentity: async () => {
3839
+ runtime.setLayout({
3840
+ layout: ShellLayout.STATUS
3841
+ });
3842
+ await client.reset();
3843
+ return runtime.setLayout({
3844
+ layout: ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION
3845
+ });
3846
+ },
3772
3847
  onDone: async () => {
3773
3848
  await runtime.setAppContext({
3774
3849
  display: ShellDisplay.NONE
@@ -3776,10 +3851,11 @@ var Shell = ({ runtime, origin }) => {
3776
3851
  runtime.setLayout({
3777
3852
  layout: ShellLayout.DEFAULT
3778
3853
  });
3779
- }
3854
+ },
3855
+ initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : layout === ShellLayout.EDIT_PROFILE ? "manage-profile" : "default"
3780
3856
  });
3781
3857
  case ShellLayout.SPACE:
3782
- return space ? /* @__PURE__ */ React45.createElement(SpaceDialog, {
3858
+ return space ? /* @__PURE__ */ React46.createElement(SpaceDialog, {
3783
3859
  space,
3784
3860
  target,
3785
3861
  createInvitationUrl: (invitationCode2) => `${origin}?spaceInvitationCode=${invitationCode2}`,
@@ -3793,7 +3869,7 @@ var Shell = ({ runtime, origin }) => {
3793
3869
  }
3794
3870
  }) : null;
3795
3871
  case ShellLayout.JOIN_SPACE:
3796
- return /* @__PURE__ */ React45.createElement(JoinDialog, {
3872
+ return /* @__PURE__ */ React46.createElement(JoinDialog, {
3797
3873
  initialInvitationCode: invitationCode,
3798
3874
  onDone: async (result) => {
3799
3875
  const target2 = result?.target ?? void 0;
@@ -3896,7 +3972,8 @@ var os = {
3896
3972
  "choose add device label": "Add device",
3897
3973
  "choose devices label": "Manage devices",
3898
3974
  "choose profile label": "Edit profile",
3899
- "choose sign out label": "Sign out",
3975
+ "choose sign out label": "Reset storage",
3976
+ "choose join new identity label": "Join existing device",
3900
3977
  "empty space members message": "There is nobody in this space yet.",
3901
3978
  "back to all invitations label": "Back to all invitations",
3902
3979
  "invitation heading": "Invitation",
@@ -3920,18 +3997,20 @@ var os = {
3920
3997
  "invite options label": "Change the active invite option.",
3921
3998
  "reset in progress label": "Resetting...",
3922
3999
  "confirm label": "Confirm",
3923
- "reset identity input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4000
+ "reset storage input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4001
+ "join new identity input label": "In order to join an existing device, storage on this device must be cleared first. Type {{confirmationValue}} to continue.",
3924
4002
  "failed to reset identity message": "Failed to reset identity.",
3925
4003
  "confirmation value": "CONFIRM",
3926
- "sign out chooser title": "DANGER ZONE",
3927
- "sign out chooser message": "Proceeding with either action below will erase all data on this device.",
4004
+ "sign out chooser title": "Danger zone",
4005
+ "sign out chooser message": "Proceeding with the action below will erase all data on this device.",
3928
4006
  "join new identity label": "Join a new identity",
3929
- "reset device label": "Reset device",
4007
+ "reset device label": "Reset storage",
3930
4008
  "reset device confirm message": "Are you sure you want to reset your device? All data will be lost.",
3931
4009
  "emoji and color label": "Emoji and color",
3932
4010
  "clear label": "Use default",
3933
4011
  "select emoji label": "Choose an emoji to use in your avatar",
3934
4012
  "select hue label": "Choose a hue to use in your avatar",
4013
+ "resetting message": "One moment while things are reset\u2026",
3935
4014
  "red label": "Red",
3936
4015
  "orange label": "Orange",
3937
4016
  "amber label": "Amber",
@@ -3972,25 +4051,25 @@ var runShell = async (config = new Config()) => {
3972
4051
  runtime.open(),
3973
4052
  client.initialize()
3974
4053
  ]);
3975
- createRoot(document.getElementById("root")).render(/* @__PURE__ */ React46.createElement(StrictMode, null, /* @__PURE__ */ React46.createElement(ThemeProvider, {
4054
+ createRoot(document.getElementById("root")).render(/* @__PURE__ */ React47.createElement(StrictMode, null, /* @__PURE__ */ React47.createElement(ThemeProvider, {
3976
4055
  tx: defaultTx,
3977
4056
  resourceExtensions: [
3978
4057
  osTranslations
3979
4058
  ]
3980
- }, /* @__PURE__ */ React46.createElement(ClientContext.Provider, {
4059
+ }, /* @__PURE__ */ React47.createElement(ClientContext.Provider, {
3981
4060
  value: {
3982
4061
  client,
3983
4062
  status: SystemStatus.ACTIVE
3984
4063
  }
3985
- }, /* @__PURE__ */ React46.createElement(ClipboardProvider, null, /* @__PURE__ */ React46.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React46.createElement(Shell, {
4064
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip5.Provider, null, /* @__PURE__ */ React47.createElement(Shell, {
3986
4065
  runtime,
3987
4066
  origin: location.origin
3988
4067
  })))))));
3989
4068
  };
3990
4069
 
3991
4070
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
3992
- import React47, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
3993
- import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient8 } from "@dxos/react-client";
4071
+ import React48, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useEffect as useEffect8, useMemo as useMemo6, useState as useState12 } from "react";
4072
+ import { ShellDisplay as ShellDisplay2, ShellLayout as ShellLayout3, useClient as useClient7 } from "@dxos/react-client";
3994
4073
  import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
3995
4074
  import { mx as mx23 } from "@dxos/react-ui-theme";
3996
4075
 
@@ -4028,7 +4107,7 @@ var MemoryShellRuntime = class {
4028
4107
  // packages/sdk/shell/src/composites/Shell/ShellContext.tsx
4029
4108
  var ShellContext = /* @__PURE__ */ createContext2({});
4030
4109
  var useShell = () => {
4031
- const client = useClient8();
4110
+ const client = useClient7();
4032
4111
  const { runtime, setDisplay } = useContext2(ShellContext);
4033
4112
  const setLayout = async (layout, options) => {
4034
4113
  if (runtime) {
@@ -4049,7 +4128,7 @@ var useShell = () => {
4049
4128
  };
4050
4129
  };
4051
4130
  var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
4052
- const client = useClient8();
4131
+ const client = useClient7();
4053
4132
  const identity = useIdentity3();
4054
4133
  const [display, setDisplay] = useState12(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay2.FULLSCREEN : ShellDisplay2.NONE);
4055
4134
  const shellRuntime = useMemo6(() => {
@@ -4121,12 +4200,12 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
4121
4200
  }, [
4122
4201
  shellRuntime
4123
4202
  ]);
4124
- return /* @__PURE__ */ React47.createElement(React47.Fragment, null, shellRuntime && /* @__PURE__ */ React47.createElement("div", {
4203
+ return /* @__PURE__ */ React48.createElement(React48.Fragment, null, shellRuntime && /* @__PURE__ */ React48.createElement("div", {
4125
4204
  className: mx23(display === ShellDisplay2.NONE ? "hidden" : "")
4126
- }, /* @__PURE__ */ React47.createElement(Shell, {
4205
+ }, /* @__PURE__ */ React48.createElement(Shell, {
4127
4206
  runtime: shellRuntime,
4128
4207
  origin: window.location.origin
4129
- })), /* @__PURE__ */ React47.createElement(ShellContext.Provider, {
4208
+ })), /* @__PURE__ */ React48.createElement(ShellContext.Provider, {
4130
4209
  value: {
4131
4210
  runtime: shellRuntime,
4132
4211
  setDisplay
@@ -4143,6 +4222,8 @@ export {
4143
4222
  ClipboardProvider,
4144
4223
  CloseButton,
4145
4224
  CompoundButton,
4225
+ ConfirmReset,
4226
+ ConfirmResetImpl,
4146
4227
  CopyButton,
4147
4228
  CopyButtonIconOnly,
4148
4229
  DeviceList,
@@ -4173,6 +4254,7 @@ export {
4173
4254
  SpaceMemberListImpl,
4174
4255
  SpacePanel,
4175
4256
  SpacePanelImpl,
4257
+ StatusPanel,
4176
4258
  StepHeading,
4177
4259
  Viewport,
4178
4260
  activeBgColor,