@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
@@ -1,3 +1,4 @@
1
1
  export * from './InvitationManager';
2
2
  export * from './StepProps';
3
+ export * from './ConfirmReset';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/steps/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/steps/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
@@ -19,4 +19,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./InvitationManager"), exports);
21
21
  __exportStar(require("./StepProps"), exports);
22
+ __exportStar(require("./ConfirmReset"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/steps/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,sDAAoC;AACpC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/steps/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,sDAAoC;AACpC,8CAA4B;AAC5B,iDAA+B"}
@@ -70,6 +70,7 @@ export declare const os: {
70
70
  'choose devices label': string;
71
71
  'choose profile label': string;
72
72
  'choose sign out label': string;
73
+ 'choose join new identity label': string;
73
74
  'empty space members message': string;
74
75
  'back to all invitations label': string;
75
76
  'invitation heading': string;
@@ -93,7 +94,8 @@ export declare const os: {
93
94
  'invite options label': string;
94
95
  'reset in progress label': string;
95
96
  'confirm label': string;
96
- 'reset identity input label': string;
97
+ 'reset storage input label': string;
98
+ 'join new identity input label': string;
97
99
  'failed to reset identity message': string;
98
100
  'confirmation value': string;
99
101
  'sign out chooser title': string;
@@ -105,6 +107,7 @@ export declare const os: {
105
107
  'clear label': string;
106
108
  'select emoji label': string;
107
109
  'select hue label': string;
110
+ 'resetting message': string;
108
111
  'red label': string;
109
112
  'orange label': string;
110
113
  'amber label': string;
@@ -1 +1 @@
1
- {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../../src/translations/locales/en-US.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Hd,CAAC"}
1
+ {"version":3,"file":"en-US.d.ts","sourceRoot":"","sources":["../../../../../src/translations/locales/en-US.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiId,CAAC"}
@@ -75,7 +75,8 @@ exports.os = {
75
75
  'choose add device label': 'Add device',
76
76
  'choose devices label': 'Manage devices',
77
77
  'choose profile label': 'Edit profile',
78
- 'choose sign out label': 'Sign out',
78
+ 'choose sign out label': 'Reset storage',
79
+ 'choose join new identity label': 'Join existing device',
79
80
  'empty space members message': 'There is nobody in this space yet.',
80
81
  'back to all invitations label': 'Back to all invitations',
81
82
  'invitation heading': 'Invitation',
@@ -99,18 +100,20 @@ exports.os = {
99
100
  'invite options label': 'Change the active invite option.',
100
101
  'reset in progress label': 'Resetting...',
101
102
  'confirm label': 'Confirm',
102
- 'reset identity input label': 'This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.',
103
+ 'reset storage input label': 'This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.',
104
+ 'join new identity input label': 'In order to join an existing device, storage on this device must be cleared first. Type {{confirmationValue}} to continue.',
103
105
  'failed to reset identity message': 'Failed to reset identity.',
104
106
  'confirmation value': 'CONFIRM',
105
- 'sign out chooser title': 'DANGER ZONE',
106
- 'sign out chooser message': 'Proceeding with either action below will erase all data on this device.',
107
+ 'sign out chooser title': 'Danger zone',
108
+ 'sign out chooser message': 'Proceeding with the action below will erase all data on this device.',
107
109
  'join new identity label': 'Join a new identity',
108
- 'reset device label': 'Reset device',
110
+ 'reset device label': 'Reset storage',
109
111
  'reset device confirm message': 'Are you sure you want to reset your device? All data will be lost.',
110
112
  'emoji and color label': 'Emoji and color',
111
113
  'clear label': 'Use default',
112
114
  'select emoji label': 'Choose an emoji to use in your avatar',
113
115
  'select hue label': 'Choose a hue to use in your avatar',
116
+ 'resetting message': 'One moment while things are reset…',
114
117
  'red label': 'Red',
115
118
  'orange label': 'Orange',
116
119
  'amber label': 'Amber',
@@ -1 +1 @@
1
- {"version":3,"file":"en-US.js","sourceRoot":"","sources":["../../../../../src/translations/locales/en-US.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEW,QAAA,EAAE,GAAG;IAChB,sBAAsB,EAAE,iBAAiB;IACzC,8BAA8B,EAAE,SAAS;IACzC,eAAe,EAAE,cAAc;IAC/B,4BAA4B,EAAE,UAAU;IACxC,oBAAoB,EAAE,QAAQ;IAC9B,4BAA4B,EAAE,iBAAiB;IAC/C,wBAAwB,EAAE,cAAc;IACxC,uBAAuB,EAAE,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AAyB,EAAE,qBAAqB;IAChD,oBAAoB,EAAE,eAAe;IACrC,8BAA8B,EAAE,oEAAoE;IACpG,uBAAuB,EAAE,iBAAiB;IAC1C,aAAa,EAAE,aAAa;IAC5B,oBAAoB,EAAE,uCAAuC;IAC7D,kBAAkB,EAAE,oCAAoC;IACxD,mBAAmB,EAAE,oCAAoC;IACzD,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,QAAQ;IACxB,aAAa,EAAE,OAAO;IACtB,cAAc,EAAE,QAAQ;IACxB,YAAY,EAAE,MAAM;IACpB,aAAa,EAAE,OAAO;IACtB,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,MAAM;IACpB,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,QAAQ;IACxB,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,MAAM;IACpB,YAAY,EAAE,MAAM;CACrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/shell",
3
- "version": "0.4.10-main.ec8b427",
3
+ "version": "0.4.10-main.f68a1ca",
4
4
  "description": "DXOS’s OS experiences",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -42,19 +42,19 @@
42
42
  "react-qr-rounded": "^1.0.0",
43
43
  "url-join": "^5.0.0",
44
44
  "xstate": "^4.37.0",
45
- "@dxos/async": "0.4.10-main.ec8b427",
46
- "@dxos/client-protocol": "0.4.10-main.ec8b427",
47
- "@dxos/debug": "0.4.10-main.ec8b427",
48
- "@dxos/client-services": "0.4.10-main.ec8b427",
49
- "@dxos/display-name": "0.4.10-main.ec8b427",
50
- "@dxos/invariant": "0.4.10-main.ec8b427",
51
- "@dxos/log": "0.4.10-main.ec8b427",
52
- "@dxos/react-client": "0.4.10-main.ec8b427",
53
- "@dxos/react-ui": "0.4.10-main.ec8b427",
54
- "@dxos/react-ui-types": "0.4.10-main.ec8b427",
55
- "@dxos/react-ui-theme": "0.4.10-main.ec8b427",
56
- "@dxos/rpc-tunnel": "0.4.10-main.ec8b427",
57
- "@dxos/util": "0.4.10-main.ec8b427"
45
+ "@dxos/async": "0.4.10-main.f68a1ca",
46
+ "@dxos/client-services": "0.4.10-main.f68a1ca",
47
+ "@dxos/client-protocol": "0.4.10-main.f68a1ca",
48
+ "@dxos/debug": "0.4.10-main.f68a1ca",
49
+ "@dxos/display-name": "0.4.10-main.f68a1ca",
50
+ "@dxos/invariant": "0.4.10-main.f68a1ca",
51
+ "@dxos/react-client": "0.4.10-main.f68a1ca",
52
+ "@dxos/react-ui-theme": "0.4.10-main.f68a1ca",
53
+ "@dxos/log": "0.4.10-main.f68a1ca",
54
+ "@dxos/react-ui": "0.4.10-main.f68a1ca",
55
+ "@dxos/rpc-tunnel": "0.4.10-main.f68a1ca",
56
+ "@dxos/util": "0.4.10-main.f68a1ca",
57
+ "@dxos/react-ui-types": "0.4.10-main.f68a1ca"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@phosphor-icons/react": "^2.0.5",
@@ -65,11 +65,11 @@
65
65
  "react-dom": "^18.2.0",
66
66
  "vite": "^5.1.5",
67
67
  "vite-plugin-turbosnap": "^1.0.2",
68
- "@dxos/config": "0.4.10-main.ec8b427",
69
- "@dxos/react-ui-theme": "0.4.10-main.ec8b427",
70
- "@dxos/react-async": "0.4.10-main.ec8b427",
71
- "@dxos/storybook-utils": "0.4.10-main.ec8b427",
72
- "@dxos/random": "0.4.10-main.ec8b427"
68
+ "@dxos/config": "0.4.10-main.f68a1ca",
69
+ "@dxos/random": "0.4.10-main.f68a1ca",
70
+ "@dxos/storybook-utils": "0.4.10-main.f68a1ca",
71
+ "@dxos/react-async": "0.4.10-main.f68a1ca",
72
+ "@dxos/react-ui-theme": "0.4.10-main.f68a1ca"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@phosphor-icons/react": "^2.0.5",
@@ -7,7 +7,7 @@ import { ArrowCounterClockwise, CaretDown } from '@phosphor-icons/react';
7
7
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
8
8
  import React, { type Dispatch, type SetStateAction, useState } from 'react';
9
9
 
10
- import { Button, Popover, useTranslation, Tooltip, type ButtonProps } from '@dxos/react-ui';
10
+ import { Button, Popover, useTranslation, Tooltip, type ButtonProps, useMediaQuery } from '@dxos/react-ui';
11
11
  import { getSize } from '@dxos/react-ui-theme';
12
12
 
13
13
  export type EmojiPickerProps = {
@@ -20,6 +20,7 @@ export type EmojiPickerProps = {
20
20
 
21
21
  export const EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear }: EmojiPickerProps) => {
22
22
  const { t } = useTranslation('os');
23
+ const [isMd] = useMediaQuery('md', { ssr: false });
23
24
 
24
25
  const [emojiValue, setEmojiValue] = useControllableState<string>({
25
26
  prop: emoji,
@@ -41,6 +42,7 @@ export const EmojiPicker = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onCl
41
42
  </Popover.Trigger>
42
43
  <Popover.Content
43
44
  side='right'
45
+ sideOffset={isMd ? 0 : -310}
44
46
  onKeyDownCapture={(event) => {
45
47
  if (event.key === 'Escape') {
46
48
  event.stopPropagation();
@@ -16,7 +16,7 @@ export interface IdentityDialogProps
16
16
  }
17
17
 
18
18
  export const IdentityDialog = (props: IdentityDialogProps) => {
19
- const titleId = useId('spaceDialog__title');
19
+ const titleId = useId('identityDialog__title', props.title);
20
20
  return (
21
21
  <Dialog.Root defaultOpen onOpenChange={(open) => open || props.onDone?.()}>
22
22
  <Dialog.Portal>
@@ -11,6 +11,7 @@ import { useSpace } from '@dxos/react-client/echo';
11
11
  import { IdentityDialog } from '../IdentityDialog';
12
12
  import { JoinDialog } from '../JoinDialog';
13
13
  import { SpaceDialog } from '../SpaceDialog';
14
+ import { StatusDialog } from '../StatusDialog';
14
15
 
15
16
  export const Shell = ({ runtime, origin }: { runtime: ShellRuntime; origin: string }) => {
16
17
  const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState<LayoutRequest>({
@@ -41,11 +42,18 @@ export const Shell = ({ runtime, origin }: { runtime: ShellRuntime; origin: stri
41
42
  }, [runtime, layout, space]);
42
43
 
43
44
  switch (layout) {
45
+ case ShellLayout.STATUS:
46
+ return <StatusDialog />;
44
47
  case ShellLayout.INITIALIZE_IDENTITY:
48
+ case ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION:
45
49
  return (
46
50
  <JoinDialog
47
51
  mode='halo-only'
52
+ initialDisposition={
53
+ layout === ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION ? 'accept-halo-invitation' : 'default'
54
+ }
48
55
  initialInvitationCode={invitationCode}
56
+ onCancelResetStorage={() => runtime.setLayout({ layout: ShellLayout.IDENTITY })}
49
57
  onDone={() => {
50
58
  void runtime.setAppContext({ display: ShellDisplay.NONE });
51
59
  runtime.setLayout({ layout: ShellLayout.DEFAULT });
@@ -53,22 +61,33 @@ export const Shell = ({ runtime, origin }: { runtime: ShellRuntime; origin: stri
53
61
  />
54
62
  );
55
63
 
56
- // TODO(wittjosiah): Jump straight to specific step if SHARE or EDIT are specified.
57
64
  case ShellLayout.IDENTITY:
58
65
  case ShellLayout.SHARE_IDENTITY:
59
66
  case ShellLayout.EDIT_PROFILE:
60
67
  return (
61
68
  <IdentityDialog
62
69
  createInvitationUrl={(invitationCode) => `${origin}?deviceInvitationCode=${invitationCode}`}
63
- onResetDevice={async () => {
70
+ onResetStorage={async () => {
71
+ runtime.setLayout({ layout: ShellLayout.STATUS });
64
72
  await client.reset();
65
- await runtime.setAppContext({ display: ShellDisplay.NONE, reload: true });
73
+ return runtime.setAppContext({ display: ShellDisplay.NONE, reload: true });
74
+ }}
75
+ onJoinNewIdentity={async () => {
76
+ runtime.setLayout({ layout: ShellLayout.STATUS });
77
+ await client.reset();
78
+ return runtime.setLayout({ layout: ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION });
66
79
  }}
67
- onJoinNewIdentity={() => runtime.setLayout({ layout: ShellLayout.INITIALIZE_IDENTITY })}
68
80
  onDone={async () => {
69
81
  await runtime.setAppContext({ display: ShellDisplay.NONE });
70
82
  runtime.setLayout({ layout: ShellLayout.DEFAULT });
71
83
  }}
84
+ initialDisposition={
85
+ layout === ShellLayout.SHARE_IDENTITY
86
+ ? 'manage-device-invitation'
87
+ : layout === ShellLayout.EDIT_PROFILE
88
+ ? 'manage-profile'
89
+ : 'default'
90
+ }
72
91
  />
73
92
  );
74
93
 
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { AlertDialog, useId } from '@dxos/react-ui';
8
+
9
+ import { StatusPanel } from '../../panels';
10
+
11
+ export const StatusDialog = () => {
12
+ const titleId = useId('statusDialog__title');
13
+ return (
14
+ <AlertDialog.Root open>
15
+ <AlertDialog.Portal>
16
+ <AlertDialog.Overlay>
17
+ <AlertDialog.Content aria-labelledby={titleId}>
18
+ <StatusPanel titleId={titleId} />
19
+ </AlertDialog.Content>
20
+ </AlertDialog.Overlay>
21
+ </AlertDialog.Portal>
22
+ </AlertDialog.Root>
23
+ );
24
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './StatusDialog';
@@ -18,10 +18,10 @@ import {
18
18
  type IdentityPanelProps,
19
19
  } from './IdentityPanelProps';
20
20
  import { useIdentityMachine } from './identityMachine';
21
- import { AgentForm, DeviceManager, IdentityActionChooser, ProfileForm, SignOutChooser } from './steps';
21
+ import { AgentForm, DeviceManager, IdentityActionChooser, ProfileForm } from './steps';
22
22
  import { useAgentHandlers } from './useAgentHandlers';
23
23
  import { Viewport, Heading, CloseButton } from '../../components';
24
- import { InvitationManager } from '../../steps';
24
+ import { ConfirmReset, InvitationManager } from '../../steps';
25
25
 
26
26
  const viewStyles = 'pbs-1 pbe-3 pli-3';
27
27
 
@@ -47,7 +47,7 @@ export const IdentityPanelImpl = (props: IdentityPanelImplProps) => {
47
47
  titleId,
48
48
  activeView,
49
49
  onUpdateProfile,
50
- onResetDevice,
50
+ onResetStorage,
51
51
  onJoinNewIdentity,
52
52
  IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser,
53
53
  InvitationManager: InvitationManagerComponent = InvitationManager,
@@ -66,6 +66,8 @@ export const IdentityPanelImpl = (props: IdentityPanelImplProps) => {
66
66
  }
67
67
  }, [activeView, t]);
68
68
 
69
+ const onCancelReset = () => rest.send?.('unchooseAction');
70
+
69
71
  return (
70
72
  <DensityProvider density='fine'>
71
73
  <IdentityHeading {...{ identity, titleId, title, onDone }} />
@@ -92,17 +94,27 @@ export const IdentityPanelImpl = (props: IdentityPanelImplProps) => {
92
94
  onUpdateProfile={onUpdateProfile}
93
95
  />
94
96
  </Viewport.View>
95
- <Viewport.View classNames={viewStyles} id='signing out'>
96
- <SignOutChooser
97
- send={rest.send}
98
- active={activeView === 'signing out'}
99
- onResetDevice={onResetDevice}
100
- onJoinNewIdentity={onJoinNewIdentity}
101
- />
102
- </Viewport.View>
103
97
  <Viewport.View classNames={viewStyles} id='agent manager'>
104
98
  <AgentForm send={rest.send} active={activeView === 'agent manager'} {...rest} />
105
99
  </Viewport.View>
100
+ <Viewport.View classNames={viewStyles} id='confirm join new identity'>
101
+ <ConfirmReset
102
+ active={activeView === 'confirm join new identity'}
103
+ {...rest}
104
+ mode='join new identity'
105
+ onConfirm={onJoinNewIdentity}
106
+ onCancel={onCancelReset}
107
+ />
108
+ </Viewport.View>
109
+ <Viewport.View classNames={viewStyles} id='confirm reset storage'>
110
+ <ConfirmReset
111
+ active={activeView === 'confirm reset storage'}
112
+ {...rest}
113
+ mode='reset storage'
114
+ onConfirm={onResetStorage}
115
+ onCancel={onCancelReset}
116
+ />
117
+ </Viewport.View>
106
118
  </Viewport.Views>
107
119
  </Viewport.Root>
108
120
  </DensityProvider>
@@ -120,6 +132,7 @@ const IdentityPanelWithInvitationImpl = ({
120
132
  export const IdentityPanel = ({
121
133
  titleId: propsTitleId,
122
134
  createInvitationUrl = (code) => code,
135
+ initialDisposition = 'default',
123
136
  ...props
124
137
  }: IdentityPanelProps) => {
125
138
  const titleId = useId('identityPanel__heading', propsTitleId);
@@ -132,7 +145,9 @@ export const IdentityPanel = ({
132
145
  log.error('IdentityPanel rendered with no active identity.');
133
146
  return null;
134
147
  }
135
- const [identityState, identitySend, identityService] = useIdentityMachine(client);
148
+ const [identityState, identitySend, identityService] = useIdentityMachine(client, {
149
+ context: { initialDisposition },
150
+ });
136
151
 
137
152
  useEffect(() => {
138
153
  const subscription = identityService.subscribe((state) => {
@@ -152,8 +167,10 @@ export const IdentityPanel = ({
152
167
  return 'device manager';
153
168
  case [{ managingProfile: 'idle' }, { managingProfile: 'pending' }].some(identityState.matches):
154
169
  return 'update profile form';
155
- case identityState.matches('signingOut'):
156
- return 'signing out';
170
+ case identityState.matches('confirmingResetStorage'):
171
+ return 'confirm reset storage';
172
+ case identityState.matches('confirmingJoinNewIdentity'):
173
+ return 'confirm join new identity';
157
174
  case [{ managingAgent: 'idle' }, { managingAgent: 'pending' }].some(identityState.matches):
158
175
  return 'agent manager';
159
176
  default:
@@ -11,6 +11,8 @@ import type { InvitationStatus } from '@dxos/react-client/invitations';
11
11
  import type { IdentityEvent } from './identityMachine';
12
12
  import type { InvitationManagerProps } from '../../steps';
13
13
 
14
+ export type IdentityPanelInitialDisposition = 'default' | 'manage-device-invitation' | 'manage-profile';
15
+
14
16
  export type AgentFormProps = {
15
17
  onAgentCreate?: () => Promise<void>;
16
18
  onAgentDestroy?: () => Promise<void>;
@@ -28,12 +30,14 @@ export type IdentityPanelImplProps = {
28
30
  | 'update profile form'
29
31
  | 'device invitation manager'
30
32
  | 'identity action chooser'
31
- | 'signing out';
33
+ | 'confirm join new identity'
34
+ | 'confirm reset storage';
35
+ initialDisposition?: IdentityPanelInitialDisposition;
32
36
  identity: Identity;
33
37
  devices: Device[];
34
38
  onUpdateProfile?: (profile: NonNullable<Identity['profile']>) => Promise<void>;
35
- onResetDevice?: () => Promise<void>;
36
- onJoinNewIdentity?: () => void;
39
+ onResetStorage?: () => Promise<void>;
40
+ onJoinNewIdentity?: () => Promise<void>;
37
41
  createInvitationUrl: (invitationCode: string) => string;
38
42
  send?: (event: SingleOrArray<Event<IdentityEvent>>) => void;
39
43
  onDone?: () => void;
@@ -10,16 +10,24 @@ import { type Client } from '@dxos/react-client';
10
10
  import { type Identity } from '@dxos/react-client/halo';
11
11
  import { type CancellableInvitationObservable } from '@dxos/react-client/invitations';
12
12
 
13
+ import { type IdentityPanelInitialDisposition } from './IdentityPanelProps';
13
14
  import { type StepEvent } from '../../steps';
14
15
 
15
16
  type IdentityMachineContext = {
17
+ initialDisposition?: IdentityPanelInitialDisposition;
16
18
  invitation?: CancellableInvitationObservable;
17
19
  identity: Identity | null;
18
20
  identitySubscribable: Subscribable<SetIdentityEvent> | null;
19
21
  };
20
22
 
21
23
  type IdentityChooseActionEvent = {
22
- type: 'chooseDevices' | 'chooseAgent' | 'chooseProfile' | 'chooseSignOut' | 'sigingOut' | 'unchooseAction';
24
+ type:
25
+ | 'chooseDevices'
26
+ | 'chooseAgent'
27
+ | 'chooseProfile'
28
+ | 'chooseResetStorage'
29
+ | 'chooseJoinNewIdentity'
30
+ | 'unchooseAction';
23
31
  };
24
32
 
25
33
  type IdentitySelectDeviceInvitationEvent = {
@@ -56,6 +64,13 @@ const identityMachine = createMachine<IdentityMachineContext, IdentityEvent>(
56
64
  src: (context) => context.identitySubscribable!,
57
65
  },
58
66
  states: {
67
+ unknown: {
68
+ always: [
69
+ { cond: 'initiallyManagingDeviceInvitation', target: 'managingDeviceInvitation', actions: 'log' },
70
+ { cond: 'initiallyManagingProfile', target: 'managingProfile', actions: 'log' },
71
+ { target: 'choosingAction', actions: 'log' },
72
+ ],
73
+ },
59
74
  choosingAction: {},
60
75
  managingDeviceInvitation: {},
61
76
  managingAgent: {
@@ -77,7 +92,8 @@ const identityMachine = createMachine<IdentityMachineContext, IdentityEvent>(
77
92
  updateProfile: { target: '.pending', actions: 'log' },
78
93
  },
79
94
  },
80
- signingOut: {},
95
+ confirmingResetStorage: {},
96
+ confirmingJoinNewIdentity: {},
81
97
  },
82
98
  on: {
83
99
  unchooseAction: { target: '.choosingAction', actions: ['unsetInvitation', 'log'] },
@@ -85,11 +101,17 @@ const identityMachine = createMachine<IdentityMachineContext, IdentityEvent>(
85
101
  selectInvitation: { target: '.managingDeviceInvitation', actions: ['setInvitation', 'log'] },
86
102
  chooseDevices: { target: '.managingDevices', actions: 'log' },
87
103
  chooseProfile: { target: '.managingProfile', actions: 'log' },
88
- chooseSignOut: { target: '.signingOut', actions: 'log' },
104
+ chooseJoinNewIdentity: { target: '.confirmingJoinNewIdentity', actions: 'log' },
105
+ chooseResetStorage: { target: '.confirmingResetStorage', actions: 'log' },
89
106
  chooseAgent: { target: '.managingAgent', actions: 'log' },
90
107
  },
91
108
  },
92
109
  {
110
+ guards: {
111
+ initiallyManagingDeviceInvitation: ({ initialDisposition }, _event) =>
112
+ initialDisposition === 'manage-device-invitation',
113
+ initiallyManagingProfile: ({ initialDisposition }, _event) => initialDisposition === 'manage-profile',
114
+ },
93
115
  actions: {
94
116
  setIdentity: assign<IdentityMachineContext, IdentityEvent>({
95
117
  identity: (context, event) => (event as SetIdentityEvent)?.identity ?? null,
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { CaretRight, Devices, Plus, Power, UserGear, HardDrive } from '@phosphor-icons/react';
5
+ import { CaretRight, Devices, Plus, Power, UserGear, HardDrive, Intersect } from '@phosphor-icons/react';
6
6
  import React, { useCallback } from 'react';
7
7
 
8
8
  import { log } from '@dxos/log';
@@ -73,6 +73,11 @@ export const IdentityActionChooserImpl = ({
73
73
  <div role='none' className='grow flex flex-col gap-1'>
74
74
  <DensityProvider density='coarse'>
75
75
  <div className='grow justify-center flex flex-col gap-1'>
76
+ <Action data-testid='manage-profile' onClick={() => send?.({ type: 'chooseProfile' })} classNames='plb-4'>
77
+ <UserGear className={getSize(6)} />
78
+ <span className='grow mli-3'>{t('choose profile label')}</span>
79
+ <CaretRight weight='bold' className={getSize(4)} />
80
+ </Action>
76
81
  {agentHostingEnabled && (
77
82
  <Action data-testid='manage-agent' onClick={() => send?.({ type: 'chooseAgent' })} classNames='plb-4'>
78
83
  <HardDrive className={getSize(6)} />
@@ -90,19 +95,23 @@ export const IdentityActionChooserImpl = ({
90
95
  <span className='grow mli-3'>{t('choose add device label')}</span>
91
96
  <CaretRight weight='bold' className={getSize(4)} />
92
97
  </Action>
98
+ <Action
99
+ data-testid='devices-panel.join-new-identity'
100
+ onClick={() => send?.({ type: 'chooseJoinNewIdentity' })}
101
+ classNames='plb-4'
102
+ >
103
+ <Intersect className={getSize(6)} />
104
+ <span className='grow mli-3'>{t('choose join new identity label')}</span>
105
+ <CaretRight weight='bold' className={getSize(4)} />
106
+ </Action>
93
107
  <Action data-testid='manage-devices' onClick={() => send?.({ type: 'chooseDevices' })} classNames='plb-4'>
94
108
  <Devices className={getSize(6)} />
95
109
  <span className='grow mli-3'>{t('choose devices label')}</span>
96
110
  <CaretRight weight='bold' className={getSize(4)} />
97
111
  </Action>
98
- <Action data-testid='manage-profile' onClick={() => send?.({ type: 'chooseProfile' })} classNames='plb-4'>
99
- <UserGear className={getSize(6)} />
100
- <span className='grow mli-3'>{t('choose profile label')}</span>
101
- <CaretRight weight='bold' className={getSize(4)} />
102
- </Action>
103
112
  <Action
104
113
  data-testid='devices-panel.sign-out'
105
- onClick={() => send?.({ type: 'chooseSignOut' })}
114
+ onClick={() => send?.({ type: 'chooseResetStorage' })}
106
115
  classNames='plb-4'
107
116
  >
108
117
  <Power className={getSize(6)} />
@@ -106,7 +106,12 @@ const ProfileFormImpl = (props: ProfileFormImplProps) => {
106
106
  <Action
107
107
  variant='primary'
108
108
  disabled={disabled}
109
- onClick={() => onUpdateProfile?.({ displayName, data: { emoji, hue } })}
109
+ onClick={() =>
110
+ onUpdateProfile?.({
111
+ ...(displayName && { displayName }),
112
+ ...((emoji || hue) && { data: { ...(emoji && { emoji }), ...(hue && { hue }) } }),
113
+ })
114
+ }
110
115
  data-testid='update-profile-form-continue'
111
116
  >
112
117
  {t('done label')}
@@ -6,4 +6,3 @@ export * from './AgentForm';
6
6
  export * from './DeviceManager';
7
7
  export * from './IdentityActionChooser';
8
8
  export * from './ProfileForm';
9
- export * from './SignOutChooser';
@@ -10,8 +10,9 @@ import { withTheme } from '@dxos/storybook-utils';
10
10
 
11
11
  import { JoinPanelImpl } from './JoinPanel';
12
12
  import { type JoinPanelImplProps } from './JoinPanelProps';
13
- import { IdentityInputImpl, ResetIdentityImpl } from './steps';
13
+ import { IdentityInputImpl } from './steps';
14
14
  import { StorybookDialog } from '../../components/StorybookDialog';
15
+ import { ConfirmResetImpl } from '../../steps';
15
16
 
16
17
  const noOpProps: JoinPanelImplProps = {
17
18
  titleId: 'storybookJoinPanel__title',
@@ -34,7 +35,7 @@ export default {
34
35
  parameters: { chromatic: { disableSnapshot: false } },
35
36
  args: {
36
37
  IdentityInput: IdentityInputImpl,
37
- ResetIdentity: ResetIdentityImpl,
38
+ ResetIdentity: ConfirmResetImpl,
38
39
  },
39
40
  };
40
41