@dxos/shell 0.3.11-main.0e40963
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.
- package/LICENSE +8 -0
- package/README.md +21 -0
- package/dist/lib/browser/chunk-ZSTKOCBT.mjs +10 -0
- package/dist/lib/browser/chunk-ZSTKOCBT.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react.mjs +3617 -0
- package/dist/lib/browser/react.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +179 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/types/src/components/AuthCode.d.ts +8 -0
- package/dist/types/src/components/AuthCode.d.ts.map +1 -0
- package/dist/types/src/components/AuthCode.js +26 -0
- package/dist/types/src/components/AuthCode.js.map +1 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts +9 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.js +46 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.js.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +9 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.js +65 -0
- package/dist/types/src/components/Clipboard/CopyButton.js.map +1 -0
- package/dist/types/src/components/Clipboard/index.d.ts +3 -0
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/index.js +22 -0
- package/dist/types/src/components/Clipboard/index.js.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +17 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.js +29 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +35 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +45 -0
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -0
- package/dist/types/src/components/CompoundButton/index.d.ts +2 -0
- package/dist/types/src/components/CompoundButton/index.d.ts.map +1 -0
- package/dist/types/src/components/CompoundButton/index.js +21 -0
- package/dist/types/src/components/CompoundButton/index.js.map +1 -0
- package/dist/types/src/components/IdentityList/DeviceList.d.ts +7 -0
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/DeviceList.js +29 -0
- package/dist/types/src/components/IdentityList/DeviceList.js.map +1 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +11 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.js +47 -0
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +13 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +54 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +17 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +26 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -0
- package/dist/types/src/components/IdentityList/index.d.ts +4 -0
- package/dist/types/src/components/IdentityList/index.d.ts.map +1 -0
- package/dist/types/src/components/IdentityList/index.js +23 -0
- package/dist/types/src/components/IdentityList/index.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.d.ts +11 -0
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.js +22 -0
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +17 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +39 -0
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +7 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +42 -0
- package/dist/types/src/components/InvitationList/InvitationListContainer.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +12 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.js +103 -0
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.d.ts +9 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.js +3 -0
- package/dist/types/src/components/InvitationList/InvitationListProps.js.map +1 -0
- package/dist/types/src/components/InvitationList/index.d.ts +4 -0
- package/dist/types/src/components/InvitationList/index.d.ts.map +1 -0
- package/dist/types/src/components/InvitationList/index.js +23 -0
- package/dist/types/src/components/InvitationList/index.js.map +1 -0
- package/dist/types/src/components/Panel/Action.d.ts +20 -0
- package/dist/types/src/components/Panel/Action.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Action.js +93 -0
- package/dist/types/src/components/Panel/Action.js.map +1 -0
- package/dist/types/src/components/Panel/Actions.d.ts +11 -0
- package/dist/types/src/components/Panel/Actions.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Actions.js +36 -0
- package/dist/types/src/components/Panel/Actions.js.map +1 -0
- package/dist/types/src/components/Panel/CloseButton.d.ts +5 -0
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -0
- package/dist/types/src/components/Panel/CloseButton.js +21 -0
- package/dist/types/src/components/Panel/CloseButton.js.map +1 -0
- package/dist/types/src/components/Panel/Emoji.d.ts +7 -0
- package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Emoji.js +24 -0
- package/dist/types/src/components/Panel/Emoji.js.map +1 -0
- package/dist/types/src/components/Panel/Heading.d.ts +16 -0
- package/dist/types/src/components/Panel/Heading.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Heading.js +39 -0
- package/dist/types/src/components/Panel/Heading.js.map +1 -0
- package/dist/types/src/components/Panel/Input.d.ts +11 -0
- package/dist/types/src/components/Panel/Input.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Input.js +19 -0
- package/dist/types/src/components/Panel/Input.js.map +1 -0
- package/dist/types/src/components/Panel/Label.d.ts +4 -0
- package/dist/types/src/components/Panel/Label.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Label.js +17 -0
- package/dist/types/src/components/Panel/Label.js.map +1 -0
- package/dist/types/src/components/Panel/Panel.stories.d.ts +13 -0
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/components/Panel/Panel.stories.js +44 -0
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -0
- package/dist/types/src/components/Panel/StepHeading.d.ts +5 -0
- package/dist/types/src/components/Panel/StepHeading.d.ts.map +1 -0
- package/dist/types/src/components/Panel/StepHeading.js +35 -0
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -0
- package/dist/types/src/components/Panel/index.d.ts +9 -0
- package/dist/types/src/components/Panel/index.d.ts.map +1 -0
- package/dist/types/src/components/Panel/index.js +28 -0
- package/dist/types/src/components/Panel/index.js.map +1 -0
- package/dist/types/src/components/SpaceListItem.d.ts +7 -0
- package/dist/types/src/components/SpaceListItem.d.ts.map +1 -0
- package/dist/types/src/components/SpaceListItem.js +46 -0
- package/dist/types/src/components/SpaceListItem.js.map +1 -0
- package/dist/types/src/components/StorybookDialog.d.ts +6 -0
- package/dist/types/src/components/StorybookDialog.d.ts.map +1 -0
- package/dist/types/src/components/StorybookDialog.js +23 -0
- package/dist/types/src/components/StorybookDialog.js.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.d.ts +39 -0
- package/dist/types/src/components/Viewport/Viewport.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.js +73 -0
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +17 -0
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/Viewport.stories.js +51 -0
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -0
- package/dist/types/src/components/Viewport/index.d.ts +2 -0
- package/dist/types/src/components/Viewport/index.d.ts.map +1 -0
- package/dist/types/src/components/Viewport/index.js +21 -0
- package/dist/types/src/components/Viewport/index.js.map +1 -0
- package/dist/types/src/components/index.d.ts +9 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/components/index.js +28 -0
- package/dist/types/src/components/index.js.map +1 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +7 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +26 -0
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -0
- package/dist/types/src/composites/IdentityDialog/index.d.ts +2 -0
- package/dist/types/src/composites/IdentityDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/IdentityDialog/index.js +21 -0
- package/dist/types/src/composites/IdentityDialog/index.js.map +1 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +6 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +27 -0
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -0
- package/dist/types/src/composites/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/composites/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/JoinDialog/index.js +21 -0
- package/dist/types/src/composites/JoinDialog/index.js.map +1 -0
- package/dist/types/src/composites/Shell/Shell.d.ts +6 -0
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/Shell.js +90 -0
- package/dist/types/src/composites/Shell/Shell.js.map +1 -0
- package/dist/types/src/composites/Shell/ShellContext.d.ts +30 -0
- package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/ShellContext.js +129 -0
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -0
- package/dist/types/src/composites/Shell/index.d.ts +4 -0
- package/dist/types/src/composites/Shell/index.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/index.js +23 -0
- package/dist/types/src/composites/Shell/index.js.map +1 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.d.ts +16 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.js +38 -0
- package/dist/types/src/composites/Shell/memory-shell-runtime.js.map +1 -0
- package/dist/types/src/composites/Shell/run-shell.d.ts +3 -0
- package/dist/types/src/composites/Shell/run-shell.d.ts.map +1 -0
- package/dist/types/src/composites/Shell/run-shell.js +54 -0
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +6 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +26 -0
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts +2 -0
- package/dist/types/src/composites/SpaceDialog/index.d.ts.map +1 -0
- package/dist/types/src/composites/SpaceDialog/index.js +21 -0
- package/dist/types/src/composites/SpaceDialog/index.js.map +1 -0
- package/dist/types/src/composites/index.d.ts +5 -0
- package/dist/types/src/composites/index.d.ts.map +1 -0
- package/dist/types/src/composites/index.js +24 -0
- package/dist/types/src/composites/index.js.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/index.js +10 -0
- package/dist/types/src/index.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +4 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +124 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +22 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +86 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +27 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js +6 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts +46 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.js +79 -0
- package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts +3 -0
- package/dist/types/src/panels/IdentityPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/index.js +22 -0
- package/dist/types/src/panels/IdentityPanel/index.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +9 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +85 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +15 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +62 -0
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +3 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.js +22 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts +10 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +45 -0
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +4 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +293 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +92 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +74 -0
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +91 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js +6 -0
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/index.d.ts +3 -0
- package/dist/types/src/panels/JoinPanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/index.js +22 -0
- package/dist/types/src/panels/JoinPanel/index.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +87 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.js +402 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +4 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +34 -0
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +8 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +56 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +12 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +67 -0
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts +9 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js +44 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +11 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +72 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +8 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +68 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +11 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +49 -0
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts +12 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +63 -0
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/index.d.ts +9 -0
- package/dist/types/src/panels/JoinPanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/JoinPanel/steps/index.js +28 -0
- package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/Panels.stories.d.ts +22 -0
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -0
- package/dist/types/src/panels/Panels.stories.js +71 -0
- package/dist/types/src/panels/Panels.stories.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +4 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +93 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +30 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +183 -0
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts +30 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js +6 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts +3 -0
- package/dist/types/src/panels/SpacePanel/index.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/index.js +22 -0
- package/dist/types/src/panels/SpacePanel/index.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.d.ts +35 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.js +46 -0
- package/dist/types/src/panels/SpacePanel/spaceMachine.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts +15 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +120 -0
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/index.d.ts +2 -0
- package/dist/types/src/panels/SpacePanel/steps/index.d.ts.map +1 -0
- package/dist/types/src/panels/SpacePanel/steps/index.js +21 -0
- package/dist/types/src/panels/SpacePanel/steps/index.js.map +1 -0
- package/dist/types/src/panels/index.d.ts +4 -0
- package/dist/types/src/panels/index.d.ts.map +1 -0
- package/dist/types/src/panels/index.js +23 -0
- package/dist/types/src/panels/index.js.map +1 -0
- package/dist/types/src/playwright/invitations-manager.d.ts +26 -0
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -0
- package/dist/types/src/playwright/invitations-manager.js +142 -0
- package/dist/types/src/playwright/invitations-manager.js.map +1 -0
- package/dist/types/src/playwright/invitations.spec.d.ts +2 -0
- package/dist/types/src/playwright/invitations.spec.d.ts.map +1 -0
- package/dist/types/src/playwright/invitations.spec.js +298 -0
- package/dist/types/src/playwright/invitations.spec.js.map +1 -0
- package/dist/types/src/playwright/playwright.config.d.ts +3 -0
- package/dist/types/src/playwright/playwright.config.d.ts.map +1 -0
- package/dist/types/src/playwright/playwright.config.js +8 -0
- package/dist/types/src/playwright/playwright.config.js.map +1 -0
- package/dist/types/src/react.d.ts +6 -0
- package/dist/types/src/react.d.ts.map +1 -0
- package/dist/types/src/react.js +25 -0
- package/dist/types/src/react.js.map +1 -0
- package/dist/types/src/steps/InvitationManager.d.ts +7 -0
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -0
- package/dist/types/src/steps/InvitationManager.js +80 -0
- package/dist/types/src/steps/InvitationManager.js.map +1 -0
- package/dist/types/src/steps/StepProps.d.ts +14 -0
- package/dist/types/src/steps/StepProps.d.ts.map +1 -0
- package/dist/types/src/steps/StepProps.js +6 -0
- package/dist/types/src/steps/StepProps.js.map +1 -0
- package/dist/types/src/steps/index.d.ts +3 -0
- package/dist/types/src/steps/index.d.ts.map +1 -0
- package/dist/types/src/steps/index.js +22 -0
- package/dist/types/src/steps/index.js.map +1 -0
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +22 -0
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -0
- package/dist/types/src/stories/Invitations.e2e-stories.js +146 -0
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -0
- package/dist/types/src/styles/index.d.ts +3 -0
- package/dist/types/src/styles/index.d.ts.map +1 -0
- package/dist/types/src/styles/index.js +22 -0
- package/dist/types/src/styles/index.js.map +1 -0
- package/dist/types/src/styles/invitationStatusStyles.d.ts +20 -0
- package/dist/types/src/styles/invitationStatusStyles.d.ts.map +1 -0
- package/dist/types/src/styles/invitationStatusStyles.js +41 -0
- package/dist/types/src/styles/invitationStatusStyles.js.map +1 -0
- package/dist/types/src/styles/panelStyles.d.ts +2 -0
- package/dist/types/src/styles/panelStyles.d.ts.map +1 -0
- package/dist/types/src/styles/panelStyles.js +8 -0
- package/dist/types/src/styles/panelStyles.js.map +1 -0
- package/dist/types/src/testing/fixtures/identities.d.ts +3 -0
- package/dist/types/src/testing/fixtures/identities.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/identities.js +18 -0
- package/dist/types/src/testing/fixtures/identities.js.map +1 -0
- package/dist/types/src/testing/fixtures/index.d.ts +3 -0
- package/dist/types/src/testing/fixtures/index.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/index.js +22 -0
- package/dist/types/src/testing/fixtures/index.js.map +1 -0
- package/dist/types/src/testing/fixtures/invitations.d.ts +3 -0
- package/dist/types/src/testing/fixtures/invitations.d.ts.map +1 -0
- package/dist/types/src/testing/fixtures/invitations.js +25 -0
- package/dist/types/src/testing/fixtures/invitations.js.map +1 -0
- package/dist/types/src/testing/index.d.ts +4 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/index.js +23 -0
- package/dist/types/src/testing/index.js.map +1 -0
- package/dist/types/src/testing/scoped-shell-manager.d.ts +17 -0
- package/dist/types/src/testing/scoped-shell-manager.d.ts.map +1 -0
- package/dist/types/src/testing/scoped-shell-manager.js +71 -0
- package/dist/types/src/testing/scoped-shell-manager.js.map +1 -0
- package/dist/types/src/testing/shell-manager.d.ts +24 -0
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -0
- package/dist/types/src/testing/shell-manager.js +85 -0
- package/dist/types/src/testing/shell-manager.js.map +1 -0
- package/dist/types/src/translations/index.d.ts +5 -0
- package/dist/types/src/translations/index.d.ts.map +1 -0
- package/dist/types/src/translations/index.js +32 -0
- package/dist/types/src/translations/index.js.map +1 -0
- package/dist/types/src/translations/locales/en-US.d.ts +97 -0
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -0
- package/dist/types/src/translations/locales/en-US.js +103 -0
- package/dist/types/src/translations/locales/en-US.js.map +1 -0
- package/dist/types/src/types/FailReason.d.ts +2 -0
- package/dist/types/src/types/FailReason.d.ts.map +1 -0
- package/dist/types/src/types/FailReason.js +6 -0
- package/dist/types/src/types/FailReason.js.map +1 -0
- package/dist/types/src/types/IInvitation.d.ts +7 -0
- package/dist/types/src/types/IInvitation.d.ts.map +1 -0
- package/dist/types/src/types/IInvitation.js +6 -0
- package/dist/types/src/types/IInvitation.js.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/index.js +22 -0
- package/dist/types/src/types/index.js.map +1 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/index.js +22 -0
- package/dist/types/src/util/index.js.map +1 -0
- package/dist/types/src/util/invitationStatusValue.d.ts +8 -0
- package/dist/types/src/util/invitationStatusValue.d.ts.map +1 -0
- package/dist/types/src/util/invitationStatusValue.js +24 -0
- package/dist/types/src/util/invitationStatusValue.js.map +1 -0
- package/dist/types/src/util/toEmoji.d.ts +2 -0
- package/dist/types/src/util/toEmoji.d.ts.map +1 -0
- package/dist/types/src/util/toEmoji.js +26 -0
- package/dist/types/src/util/toEmoji.js.map +1 -0
- package/package.json +79 -0
- package/src/components/AuthCode.tsx +36 -0
- package/src/components/Clipboard/ClipboardProvider.tsx +26 -0
- package/src/components/Clipboard/CopyButton.tsx +70 -0
- package/src/components/Clipboard/index.ts +6 -0
- package/src/components/CompoundButton/CompoundButton.stories.tsx +49 -0
- package/src/components/CompoundButton/CompoundButton.tsx +89 -0
- package/src/components/CompoundButton/index.ts +5 -0
- package/src/components/IdentityList/DeviceList.tsx +45 -0
- package/src/components/IdentityList/IdentityListItem.tsx +42 -0
- package/src/components/IdentityList/SpaceMemberList.stories.tsx +24 -0
- package/src/components/IdentityList/SpaceMemberList.tsx +65 -0
- package/src/components/IdentityList/index.ts +7 -0
- package/src/components/InvitationList/InvitationList.stories.tsx +44 -0
- package/src/components/InvitationList/InvitationList.tsx +31 -0
- package/src/components/InvitationList/InvitationListContainer.tsx +27 -0
- package/src/components/InvitationList/InvitationListItem.tsx +183 -0
- package/src/components/InvitationList/InvitationListProps.ts +9 -0
- package/src/components/InvitationList/index.ts +7 -0
- package/src/components/Panel/Action.tsx +142 -0
- package/src/components/Panel/Actions.tsx +31 -0
- package/src/components/Panel/CloseButton.tsx +24 -0
- package/src/components/Panel/Emoji.tsx +36 -0
- package/src/components/Panel/Heading.tsx +32 -0
- package/src/components/Panel/Input.tsx +27 -0
- package/src/components/Panel/Label.tsx +14 -0
- package/src/components/Panel/Panel.stories.tsx +52 -0
- package/src/components/Panel/StepHeading.tsx +17 -0
- package/src/components/Panel/index.ts +12 -0
- package/src/components/SpaceListItem.tsx +35 -0
- package/src/components/StorybookDialog.tsx +33 -0
- package/src/components/Viewport/Viewport.stories.tsx +66 -0
- package/src/components/Viewport/Viewport.tsx +120 -0
- package/src/components/Viewport/index.tsx +5 -0
- package/src/components/index.ts +12 -0
- package/src/composites/IdentityDialog/IdentityDialog.tsx +39 -0
- package/src/composites/IdentityDialog/index.ts +5 -0
- package/src/composites/JoinDialog/JoinDialog.tsx +40 -0
- package/src/composites/JoinDialog/index.ts +5 -0
- package/src/composites/Shell/Shell.tsx +98 -0
- package/src/composites/Shell/ShellContext.tsx +163 -0
- package/src/composites/Shell/index.ts +7 -0
- package/src/composites/Shell/memory-shell-runtime.ts +50 -0
- package/src/composites/Shell/run-shell.tsx +38 -0
- package/src/composites/SpaceDialog/SpaceDialog.tsx +37 -0
- package/src/composites/SpaceDialog/index.ts +5 -0
- package/src/composites/index.ts +8 -0
- package/src/index.ts +7 -0
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +113 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +158 -0
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +36 -0
- package/src/panels/IdentityPanel/identityMachine.ts +131 -0
- package/src/panels/IdentityPanel/index.ts +6 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +96 -0
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +79 -0
- package/src/panels/IdentityPanel/steps/index.ts +6 -0
- package/src/panels/JoinPanel/JoinHeading.tsx +49 -0
- package/src/panels/JoinPanel/JoinPanel.stories.tsx +91 -0
- package/src/panels/JoinPanel/JoinPanel.tsx +415 -0
- package/src/panels/JoinPanel/JoinPanelProps.ts +132 -0
- package/src/panels/JoinPanel/index.ts +6 -0
- package/src/panels/JoinPanel/joinMachine.ts +536 -0
- package/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx +65 -0
- package/src/panels/JoinPanel/steps/IdentityAdded.tsx +75 -0
- package/src/panels/JoinPanel/steps/IdentityInput.tsx +86 -0
- package/src/panels/JoinPanel/steps/InvitationAccepted.tsx +43 -0
- package/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx +99 -0
- package/src/panels/JoinPanel/steps/InvitationInput.tsx +102 -0
- package/src/panels/JoinPanel/steps/InvitationRescuer.tsx +102 -0
- package/src/panels/JoinPanel/steps/ResetIdentity.tsx +71 -0
- package/src/panels/JoinPanel/steps/index.ts +12 -0
- package/src/panels/Panels.stories.tsx +61 -0
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +328 -0
- package/src/panels/SpacePanel/SpacePanel.tsx +122 -0
- package/src/panels/SpacePanel/SpacePanelProps.ts +40 -0
- package/src/panels/SpacePanel/index.ts +6 -0
- package/src/panels/SpacePanel/spaceMachine.ts +72 -0
- package/src/panels/SpacePanel/steps/SpaceManager.tsx +157 -0
- package/src/panels/SpacePanel/steps/index.ts +5 -0
- package/src/panels/index.ts +7 -0
- package/src/playwright/invitations-manager.ts +168 -0
- package/src/playwright/invitations.spec.ts +364 -0
- package/src/playwright/playwright.config.ts +7 -0
- package/src/react.ts +9 -0
- package/src/steps/InvitationManager.tsx +116 -0
- package/src/steps/StepProps.ts +17 -0
- package/src/steps/index.ts +6 -0
- package/src/stories/Invitations.e2e-stories.tsx +231 -0
- package/src/styles/index.ts +6 -0
- package/src/styles/invitationStatusStyles.ts +42 -0
- package/src/styles/panelStyles.ts +5 -0
- package/src/testing/fixtures/identities.ts +16 -0
- package/src/testing/fixtures/index.ts +6 -0
- package/src/testing/fixtures/invitations.ts +23 -0
- package/src/testing/index.ts +7 -0
- package/src/testing/scoped-shell-manager.ts +79 -0
- package/src/testing/shell-manager.ts +102 -0
- package/src/translations/index.ts +7 -0
- package/src/translations/locales/en-US.ts +101 -0
- package/src/types/FailReason.ts +5 -0
- package/src/types/IInvitation.ts +14 -0
- package/src/types/index.ts +6 -0
- package/src/util/index.ts +6 -0
- package/src/util/invitationStatusValue.ts +22 -0
- package/src/util/toEmoji.ts +22 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxosTheme';
|
|
6
|
+
|
|
7
|
+
import { faker } from '@faker-js/faker';
|
|
8
|
+
import { Laptop, Planet, Plus, PlusCircle, SignIn, QrCode, WifiHigh, WifiSlash } from '@phosphor-icons/react';
|
|
9
|
+
import React, { useMemo, useState } from 'react';
|
|
10
|
+
|
|
11
|
+
import { useClient } from '@dxos/react-client';
|
|
12
|
+
import { type Space, type SpaceMember, SpaceProxy, useSpaces } from '@dxos/react-client/echo';
|
|
13
|
+
import { useIdentity } from '@dxos/react-client/halo';
|
|
14
|
+
import { Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
15
|
+
import { ConnectionState, useNetworkStatus } from '@dxos/react-client/mesh';
|
|
16
|
+
import { ClientRepeater } from '@dxos/react-client/testing';
|
|
17
|
+
import { Button, ButtonGroup, List, Tooltip } from '@dxos/react-ui';
|
|
18
|
+
import { getSize, groupSurface } from '@dxos/react-ui-theme';
|
|
19
|
+
import { withTheme } from '@dxos/storybook-utils';
|
|
20
|
+
|
|
21
|
+
import { ClipboardProvider, IdentityListItem, SpaceListItem } from '../components';
|
|
22
|
+
import { IdentityPanel, JoinPanel, SpacePanel } from '../panels';
|
|
23
|
+
import { osTranslations } from '../translations';
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
title: 'Invitations',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type PanelType = Space | 'identity' | 'devices' | 'join';
|
|
30
|
+
|
|
31
|
+
const createInvitationUrl = (invitation: string) => invitation;
|
|
32
|
+
|
|
33
|
+
const Panel = ({ id, panel, setPanel }: { id: number; panel?: PanelType; setPanel: (panel?: PanelType) => void }) => {
|
|
34
|
+
const client = useClient();
|
|
35
|
+
const spaces = useSpaces();
|
|
36
|
+
|
|
37
|
+
useMemo(() => {
|
|
38
|
+
if (panel instanceof SpaceProxy) {
|
|
39
|
+
(window as any)[`peer${id}CreateSpaceInvitation`] = (options?: Partial<Invitation>) => {
|
|
40
|
+
const invitation = panel.share(options);
|
|
41
|
+
|
|
42
|
+
invitation.subscribe((invitation) => {
|
|
43
|
+
const invitationCode = InvitationEncoder.encode(invitation);
|
|
44
|
+
if (invitation.state === Invitation.State.CONNECTING) {
|
|
45
|
+
console.log(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}, [panel]);
|
|
51
|
+
|
|
52
|
+
if (panel instanceof SpaceProxy) {
|
|
53
|
+
return <SpacePanel space={panel} createInvitationUrl={createInvitationUrl} />;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
switch (panel) {
|
|
57
|
+
case 'identity': {
|
|
58
|
+
return <JoinPanel mode='halo-only' onDone={() => setPanel(undefined)} onExit={() => setPanel(undefined)} />;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
case 'devices': {
|
|
62
|
+
return <IdentityPanel createInvitationUrl={createInvitationUrl} onDone={() => setPanel(undefined)} />;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
case 'join': {
|
|
66
|
+
return <JoinPanel onDone={() => setPanel(undefined)} onExit={() => setPanel(undefined)} />;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
default: {
|
|
70
|
+
// TODO(wittjosiah): Tooltips make playwright (webkit) flakier.
|
|
71
|
+
const controls = (
|
|
72
|
+
<ButtonGroup classNames='mbe-4'>
|
|
73
|
+
{/* <Tooltip content='Create Space'> */}
|
|
74
|
+
<Button
|
|
75
|
+
onClick={() => client.spaces.create({ name: faker.animal.bird() })}
|
|
76
|
+
data-testid='invitations.create-space'
|
|
77
|
+
>
|
|
78
|
+
<PlusCircle className={getSize(6)} />
|
|
79
|
+
</Button>
|
|
80
|
+
{/* </Tooltip>
|
|
81
|
+
<Tooltip content='Join Space'> */}
|
|
82
|
+
<Button onClick={() => setPanel('join')} data-testid='invitations.open-join-space'>
|
|
83
|
+
<SignIn weight='fill' className={getSize(6)} />
|
|
84
|
+
</Button>
|
|
85
|
+
{/* </Tooltip> */}
|
|
86
|
+
</ButtonGroup>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const header = (
|
|
90
|
+
<div className='flex'>
|
|
91
|
+
Spaces
|
|
92
|
+
<span className='grow' />
|
|
93
|
+
{controls}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<div>
|
|
99
|
+
<h1>{header}</h1>
|
|
100
|
+
{spaces.length > 0 ? (
|
|
101
|
+
<List>
|
|
102
|
+
{spaces.map((space) => (
|
|
103
|
+
<SpaceListItem key={space.key.toHex()} space={space} onClick={() => setPanel(space)} />
|
|
104
|
+
))}
|
|
105
|
+
</List>
|
|
106
|
+
) : (
|
|
107
|
+
<div className='text-center'>No spaces</div>
|
|
108
|
+
)}
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const Invitations = (args: { id: number; count: number }) => {
|
|
116
|
+
const { id }: { id: number } = args;
|
|
117
|
+
const client = useClient();
|
|
118
|
+
const networkStatus = useNetworkStatus().swarm;
|
|
119
|
+
const identity = useIdentity();
|
|
120
|
+
const [panel, setPanel] = useState<PanelType>();
|
|
121
|
+
|
|
122
|
+
useMemo(() => {
|
|
123
|
+
(window as any)[`peer${id}CreateHaloInvitation`] = (options?: Partial<Invitation>) => {
|
|
124
|
+
const invitation = client.halo.share(options);
|
|
125
|
+
|
|
126
|
+
invitation.subscribe((invitation) => {
|
|
127
|
+
const invitationCode = InvitationEncoder.encode(invitation);
|
|
128
|
+
if (invitation.state === Invitation.State.CONNECTING) {
|
|
129
|
+
console.log(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
}, [client]);
|
|
134
|
+
|
|
135
|
+
// TODO(wittjosiah): Tooltips make playwright (webkit) flakier.
|
|
136
|
+
const controls = (
|
|
137
|
+
<ButtonGroup classNames='mbe-4'>
|
|
138
|
+
{/* <Tooltip content='Create Identity'> */}
|
|
139
|
+
<Button
|
|
140
|
+
onClick={() => client.halo.createIdentity({ displayName: faker.person.firstName() })}
|
|
141
|
+
disabled={Boolean(identity)}
|
|
142
|
+
data-testid='invitations.create-identity'
|
|
143
|
+
>
|
|
144
|
+
<Plus className={getSize(6)} />
|
|
145
|
+
</Button>
|
|
146
|
+
{/* </Tooltip>
|
|
147
|
+
<Tooltip content='Join Existing Identity'> */}
|
|
148
|
+
<Button
|
|
149
|
+
onClick={() => setPanel('identity')}
|
|
150
|
+
disabled={panel === 'identity'}
|
|
151
|
+
data-testid='invitations.open-join-identity'
|
|
152
|
+
>
|
|
153
|
+
<QrCode weight='fill' className={getSize(6)} />
|
|
154
|
+
</Button>
|
|
155
|
+
{/* </Tooltip>
|
|
156
|
+
<Tooltip content='Devices'> */}
|
|
157
|
+
<Button
|
|
158
|
+
onClick={() => setPanel('devices')}
|
|
159
|
+
disabled={!identity || panel === 'devices'}
|
|
160
|
+
data-testid='invitations.open-devices'
|
|
161
|
+
>
|
|
162
|
+
<Laptop weight='fill' className={getSize(6)} />
|
|
163
|
+
</Button>
|
|
164
|
+
{/* </Tooltip>
|
|
165
|
+
<Tooltip content='List Spaces'> */}
|
|
166
|
+
<Button onClick={() => setPanel(undefined)} disabled={!panel} data-testid='invitations.list-spaces'>
|
|
167
|
+
<Planet weight='fill' className={getSize(6)} />
|
|
168
|
+
</Button>
|
|
169
|
+
{/* </Tooltip> */}
|
|
170
|
+
{/* <ToolTip content='Toggle Network'> */}
|
|
171
|
+
<Button
|
|
172
|
+
onClick={() =>
|
|
173
|
+
client.mesh.updateConfig(
|
|
174
|
+
networkStatus === ConnectionState.ONLINE ? ConnectionState.OFFLINE : ConnectionState.ONLINE,
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
data-testid='invitations.toggle-network'
|
|
178
|
+
>
|
|
179
|
+
{networkStatus === ConnectionState.ONLINE ? (
|
|
180
|
+
<WifiHigh weight='fill' className={getSize(6)} />
|
|
181
|
+
) : (
|
|
182
|
+
<WifiSlash weight='fill' className={getSize(6)} />
|
|
183
|
+
)}
|
|
184
|
+
</Button>
|
|
185
|
+
{/* </ToolTip> */}
|
|
186
|
+
</ButtonGroup>
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
const header = (
|
|
190
|
+
<div className='flex' data-testid='invitations.identity-header'>
|
|
191
|
+
Identity
|
|
192
|
+
<span className='grow' />
|
|
193
|
+
{controls}
|
|
194
|
+
</div>
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<div className={'flex flex-col m-4 flex-1 min-w-0'} data-testid={`peer-${id}`}>
|
|
199
|
+
<div className={`${groupSurface} rounded p-2 mbe-2`}>
|
|
200
|
+
<h1>{header}</h1>
|
|
201
|
+
{identity ? (
|
|
202
|
+
<List>
|
|
203
|
+
<IdentityListItem identity={identity} presence={networkStatus as unknown as SpaceMember.PresenceState} />
|
|
204
|
+
</List>
|
|
205
|
+
) : (
|
|
206
|
+
<div className='text-center'>No identity</div>
|
|
207
|
+
)}
|
|
208
|
+
</div>
|
|
209
|
+
{identity || panel ? (
|
|
210
|
+
<div className={`${groupSurface} rounded p-2`}>
|
|
211
|
+
<Panel id={id} panel={panel} setPanel={setPanel} />
|
|
212
|
+
</div>
|
|
213
|
+
) : null}
|
|
214
|
+
</div>
|
|
215
|
+
);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export const Default = {
|
|
219
|
+
render: (args: { id: number }) => (
|
|
220
|
+
<ClipboardProvider>
|
|
221
|
+
<Tooltip.Provider>
|
|
222
|
+
<ClientRepeater Component={Invitations} count={3} />
|
|
223
|
+
</Tooltip.Provider>
|
|
224
|
+
</ClipboardProvider>
|
|
225
|
+
),
|
|
226
|
+
decorators: [withTheme],
|
|
227
|
+
parameters: {
|
|
228
|
+
chromatic: { disableSnapshot: true },
|
|
229
|
+
translations: [osTranslations],
|
|
230
|
+
},
|
|
231
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Invitation } from '@dxos/react-client/invitations';
|
|
6
|
+
|
|
7
|
+
export const inactiveBgColor = 'bg-neutral-100 dark:bg-neutral-600';
|
|
8
|
+
export const activeBgColor = 'bg-primary-500 dark:bg-primary-400';
|
|
9
|
+
export const successBgColor = 'bg-success-500 dark:bg-success-400';
|
|
10
|
+
export const errorBgColor = 'bg-error-500 dark:bg-error-400';
|
|
11
|
+
export const cancelledBgColor = 'bg-warning-500 dark:bg-warning-400';
|
|
12
|
+
|
|
13
|
+
export const inactiveTextColor = 'text-neutral-100 dark:text-neutral-600';
|
|
14
|
+
export const activeTextColor = 'text-primary-400 dark:text-primary-500';
|
|
15
|
+
export const successTextColor = 'text-success-400 dark:text-success-500';
|
|
16
|
+
export const errorTextColor = 'text-error-400 dark:text-error-500';
|
|
17
|
+
export const cancelledTextColor = 'text-warning-400 dark:text-warning-500';
|
|
18
|
+
|
|
19
|
+
export const inactiveStrokeColor = 'stroke-neutral-100 dark:stroke-neutral-700';
|
|
20
|
+
export const activeStrokeColor = 'stroke-primary-400 dark:stroke-primary-150';
|
|
21
|
+
export const successStrokeColor = 'stroke-success-300 dark:stroke-primary-400';
|
|
22
|
+
export const errorStrokeColor = 'stroke-error-300 dark:stroke-error-500';
|
|
23
|
+
export const cancelledStrokeColor = 'stroke-warning-300 dark:stroke-warning-500';
|
|
24
|
+
|
|
25
|
+
export const resolvedStrokeColor = (status: Invitation.State) =>
|
|
26
|
+
status === Invitation.State.ERROR
|
|
27
|
+
? errorStrokeColor
|
|
28
|
+
: status === Invitation.State.CANCELLED || status === Invitation.State.TIMEOUT
|
|
29
|
+
? cancelledStrokeColor
|
|
30
|
+
: successStrokeColor;
|
|
31
|
+
export const resolvedBgColor = (status: Invitation.State) =>
|
|
32
|
+
status === Invitation.State.ERROR
|
|
33
|
+
? errorBgColor
|
|
34
|
+
: status === Invitation.State.CANCELLED || status === Invitation.State.TIMEOUT
|
|
35
|
+
? cancelledBgColor
|
|
36
|
+
: successBgColor;
|
|
37
|
+
export const resolvedTextColor = (status: Invitation.State) =>
|
|
38
|
+
status === Invitation.State.ERROR
|
|
39
|
+
? errorTextColor
|
|
40
|
+
: status === Invitation.State.CANCELLED || status === Invitation.State.TIMEOUT
|
|
41
|
+
? cancelledTextColor
|
|
42
|
+
: successTextColor;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { PublicKey } from '@dxos/react-client';
|
|
6
|
+
import { SpaceMember } from '@dxos/react-client/echo';
|
|
7
|
+
|
|
8
|
+
export const alice: SpaceMember = {
|
|
9
|
+
identity: {
|
|
10
|
+
identityKey: PublicKey.random(),
|
|
11
|
+
profile: {
|
|
12
|
+
displayName: 'Alice',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
presence: SpaceMember.PresenceState.ONLINE,
|
|
16
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { PublicKey } from '@dxos/react-client';
|
|
6
|
+
import { Invitation, CancellableInvitationObservable } from '@dxos/react-client/invitations';
|
|
7
|
+
|
|
8
|
+
export const inviteWithState = (state: Invitation.State) =>
|
|
9
|
+
new CancellableInvitationObservable({
|
|
10
|
+
initialInvitation: {
|
|
11
|
+
state,
|
|
12
|
+
invitationId: Math.random().toString(16).slice(2),
|
|
13
|
+
kind: Invitation.Kind.SPACE,
|
|
14
|
+
authMethod: Invitation.AuthMethod.NONE,
|
|
15
|
+
swarmKey: PublicKey.random(),
|
|
16
|
+
type: Invitation.Type.INTERACTIVE,
|
|
17
|
+
authCode: [Invitation.State.READY_FOR_AUTHENTICATION, Invitation.State.AUTHENTICATING].includes(state)
|
|
18
|
+
? '123456'
|
|
19
|
+
: '',
|
|
20
|
+
},
|
|
21
|
+
subscriber: () => {},
|
|
22
|
+
onCancel: async () => {},
|
|
23
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { Locator, Page, FrameLocator } from '@playwright/test';
|
|
6
|
+
|
|
7
|
+
type Scope = Locator | FrameLocator | Page;
|
|
8
|
+
|
|
9
|
+
export class ScopedShellManager {
|
|
10
|
+
page!: Page;
|
|
11
|
+
|
|
12
|
+
authenticatorIsVisible(type: 'device' | 'space', scope?: Scope) {
|
|
13
|
+
return (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).isVisible();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async invitationFailed(scope?: Scope, timeout = 3000) {
|
|
17
|
+
const peer = scope || this.page;
|
|
18
|
+
try {
|
|
19
|
+
await peer.locator('[data-testid=invitation-rescuer-reset]:not([disabled])').waitFor({ timeout });
|
|
20
|
+
return true;
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async inputInvitation(type: 'device' | 'space', invitation: string, scope?: Scope) {
|
|
27
|
+
await (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-input`).fill(invitation);
|
|
28
|
+
await this.page.keyboard.press('Enter');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async invitationInputContinue(type: 'device' | 'space', scope?: Scope) {
|
|
32
|
+
await (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-input-continue`).click();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async cancelInvitation(type: 'device' | 'space', kind: 'host' | 'guest', scope?: Scope) {
|
|
36
|
+
if (kind === 'guest') {
|
|
37
|
+
await (scope || this.page)
|
|
38
|
+
.getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-authenticator-cancel`)
|
|
39
|
+
.click();
|
|
40
|
+
} else {
|
|
41
|
+
await (scope || this.page).getByTestId('cancel-invitation').nth(0).click();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async readyToAuthenticate(type: 'device' | 'space', scope?: Scope, timeout = 3000) {
|
|
46
|
+
const peer = scope || this.page;
|
|
47
|
+
try {
|
|
48
|
+
await peer
|
|
49
|
+
.locator(`[data-testid=${type === 'device' ? 'halo' : 'space'}-auth-code-input]:not([disabled])`)
|
|
50
|
+
.waitFor({ timeout });
|
|
51
|
+
return true;
|
|
52
|
+
} catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async authenticateInvitation(type: 'device' | 'space', authCode: string, scope?: Scope) {
|
|
58
|
+
const peer = scope || this.page;
|
|
59
|
+
// TODO(wittjosiah): Update ids.
|
|
60
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).fill(authCode);
|
|
61
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-authenticator-next`).click();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async clearAuthCode(type: 'device' | 'space', scope?: Scope) {
|
|
65
|
+
const peer = scope || this.page;
|
|
66
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).fill('');
|
|
67
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).focus();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async resetInvitation(scope?: Scope) {
|
|
71
|
+
await (scope || this.page).getByTestId('invitation-rescuer-reset').click();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async doneInvitation(type: 'device' | 'space', scope?: Scope) {
|
|
75
|
+
await (scope || this.page)
|
|
76
|
+
.getByTestId(type === 'device' ? 'halo-invitation-accepted-done' : 'space-invitation-accepted-done')
|
|
77
|
+
.click();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type { ConsoleMessage, Page } from '@playwright/test';
|
|
6
|
+
|
|
7
|
+
import { sleep, Trigger } from '@dxos/async';
|
|
8
|
+
|
|
9
|
+
import { ScopedShellManager } from './scoped-shell-manager';
|
|
10
|
+
|
|
11
|
+
export class ShellManager extends ScopedShellManager {
|
|
12
|
+
private _invitationCode = new Trigger<string>();
|
|
13
|
+
private _authCode = new Trigger<string>();
|
|
14
|
+
|
|
15
|
+
// prettier-ignore
|
|
16
|
+
constructor(
|
|
17
|
+
override readonly page: Page,
|
|
18
|
+
readonly inIFrame = true,
|
|
19
|
+
) {
|
|
20
|
+
super();
|
|
21
|
+
this.page.on('console', (message) => this._onConsoleMessage(message));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get shell() {
|
|
25
|
+
return this.inIFrame ? this.page.frameLocator('data-testid=dxos-shell') : this.page;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Getters
|
|
29
|
+
|
|
30
|
+
async isCurrentSpaceViewVisible(): Promise<boolean> {
|
|
31
|
+
return await this.shell.getByTestId('current-space-view').isVisible();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async isSpaceListViewVisible(): Promise<boolean> {
|
|
35
|
+
return await this.shell.getByTestId('space-list-view').isVisible();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Actions
|
|
39
|
+
|
|
40
|
+
async createIdentity(name: string) {
|
|
41
|
+
await this.shell.getByTestId('create-identity').click();
|
|
42
|
+
await this.page.keyboard.type(name);
|
|
43
|
+
await this.shell.getByTestId('create-identity-input-continue').click();
|
|
44
|
+
await this.shell.getByTestId('halo-invitation-accepted-done').click();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async closeShell() {
|
|
48
|
+
await this.page.keyboard.press('Escape');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// TODO(wittjosiah): These shortcuts are no longer within the SDK so these commands should live elsewhere.
|
|
52
|
+
async openCurrentSpace() {
|
|
53
|
+
await this.page.keyboard.press('Meta+.');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async openSpaceList() {
|
|
57
|
+
await this.page.keyboard.press('Meta+Shift+>');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async showAllSpaces() {
|
|
61
|
+
await this.shell.getByTestId('show-all-spaces').click();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async showCurrentSpace() {
|
|
65
|
+
await this.shell.getByTestId('show-current-space').click();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async createSpaceInvitation(): Promise<string> {
|
|
69
|
+
await this.openCurrentSpace();
|
|
70
|
+
this._invitationCode = new Trigger<string>();
|
|
71
|
+
this._authCode = new Trigger<string>();
|
|
72
|
+
await this.shell.getByTestId('spaces-panel.create-invitation').click();
|
|
73
|
+
return await this._invitationCode.wait();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async acceptSpaceInvitation(invitationCode: string) {
|
|
77
|
+
await this.inputInvitation('space', invitationCode, this.shell);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async getAuthCode(): Promise<string> {
|
|
81
|
+
return await this._authCode.wait();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async authenticate(authCode: string) {
|
|
85
|
+
// Wait for focus to shift before typing.
|
|
86
|
+
await sleep(1500);
|
|
87
|
+
await this.authenticateInvitation('space', authCode, this.shell);
|
|
88
|
+
await this.doneInvitation('space', this.shell);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private async _onConsoleMessage(message: ConsoleMessage) {
|
|
92
|
+
try {
|
|
93
|
+
const json = JSON.parse(message.text());
|
|
94
|
+
if (json.invitationCode) {
|
|
95
|
+
this._invitationCode.wake(json.invitationCode);
|
|
96
|
+
}
|
|
97
|
+
if (json.authCode) {
|
|
98
|
+
this._authCode.wake(json.authCode);
|
|
99
|
+
}
|
|
100
|
+
} catch {}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export const os = {
|
|
6
|
+
'manage profile label': 'Manage identity',
|
|
7
|
+
'identity offline description': 'Offline',
|
|
8
|
+
'sidebar label': 'DXOS sidebar',
|
|
9
|
+
'copy invitation code label': 'Copy URL',
|
|
10
|
+
'copy invitation code success label': 'Copied',
|
|
11
|
+
'open share panel label': 'View QR code',
|
|
12
|
+
'joining space heading': 'Joining space',
|
|
13
|
+
'join space heading': 'Enter space invitation',
|
|
14
|
+
'halo heading': 'Initialize device identity',
|
|
15
|
+
'exit label': 'Exit',
|
|
16
|
+
'identity selector title': 'Join as',
|
|
17
|
+
'identity radio group title': 'Select an identity you’ve associated with this device already',
|
|
18
|
+
'add identity label': 'Add',
|
|
19
|
+
'continue label': 'Continue',
|
|
20
|
+
'back label': 'Back',
|
|
21
|
+
'next label': 'Next',
|
|
22
|
+
'close label': 'Close',
|
|
23
|
+
'auth choices label': 'Choose an identity',
|
|
24
|
+
'create identity label': 'Create an identity',
|
|
25
|
+
'create identity description': 'Create a new identity.',
|
|
26
|
+
'recover identity label': 'Use a seed phrase',
|
|
27
|
+
'recover identity description': 'Enter your seed phrase to log in manually.',
|
|
28
|
+
'join identity label': 'Use another device',
|
|
29
|
+
'join identity description': 'Add this device to an identity you’re already logged into on another device.',
|
|
30
|
+
'deselect identity label': 'Back to identities',
|
|
31
|
+
'addition method chooser title': 'An identity is required to continue',
|
|
32
|
+
'new identity input label': 'Set display name',
|
|
33
|
+
'recover identity input label': 'Type or paste your seed phrase',
|
|
34
|
+
'failed to create identity message': 'Failed to create an identity.',
|
|
35
|
+
'failed to recover identity message': 'Failed to recover an identity from the provided seed phrase.',
|
|
36
|
+
'failed to authenticate message': 'Incorrect PIN.',
|
|
37
|
+
'identity added label': 'Created identity & added to this device:',
|
|
38
|
+
'join space as identity heading': '<part>as </part><part><icon/><label>{{labelValue}}</label></part>',
|
|
39
|
+
'error status label': 'Failed',
|
|
40
|
+
'timeout status label': 'Timed out',
|
|
41
|
+
'cancelled status label': 'Cancelled',
|
|
42
|
+
'init status label': 'Ready to connect',
|
|
43
|
+
'connecting status label': 'Connecting…',
|
|
44
|
+
'connected status label': 'Enter confirmation PIN',
|
|
45
|
+
'authenticating status label': 'Enter confirmation PIN',
|
|
46
|
+
'success status label': 'Success',
|
|
47
|
+
'connect label': 'Connect',
|
|
48
|
+
'reconnect label': 'Reconnect',
|
|
49
|
+
'cancel label': 'Cancel',
|
|
50
|
+
'done label': 'Done',
|
|
51
|
+
'reset label': 'Start over',
|
|
52
|
+
'auth code input label': 'Enter the verification code',
|
|
53
|
+
'invitation input label': 'Paste an invitation code or URL',
|
|
54
|
+
'create device invitation label': 'Add device',
|
|
55
|
+
'create space invitation label': 'Invite',
|
|
56
|
+
'qr label': 'Scan to accept invitation',
|
|
57
|
+
'empty invitations message': 'No pending invitations',
|
|
58
|
+
'empty device list message': 'No devices authenticated other than this device.',
|
|
59
|
+
'show all spaces label': 'All spaces',
|
|
60
|
+
'all spaces label': 'All spaces',
|
|
61
|
+
'create space label': 'Create a new space',
|
|
62
|
+
'join space label': 'Join a space',
|
|
63
|
+
'show current space label': 'Current space',
|
|
64
|
+
'view space invitations label': 'View space invitations',
|
|
65
|
+
'toggle sidebar label': 'Open/close sidebar',
|
|
66
|
+
'open sidebar label': 'Open sidebar',
|
|
67
|
+
'close sidebar label': 'Close sidebar',
|
|
68
|
+
'welcome message': 'Welcome',
|
|
69
|
+
'selecting identity heading': 'Selecting identity',
|
|
70
|
+
'devices heading': 'Devices',
|
|
71
|
+
'identity heading': 'Profile settings',
|
|
72
|
+
'choose devices label': 'Add device',
|
|
73
|
+
'choose profile label': 'Edit profile',
|
|
74
|
+
'choose sign out label': 'Sign out',
|
|
75
|
+
'empty space members message': 'There is nobody in this space yet.',
|
|
76
|
+
'back to all invitations label': 'Back to all invitations',
|
|
77
|
+
'invitation heading': 'Invitation',
|
|
78
|
+
'invitation list heading': 'Invitations',
|
|
79
|
+
'device invitation list heading': 'Pending device invitations',
|
|
80
|
+
'space invitation list heading': 'Pending invitations',
|
|
81
|
+
'device list heading': 'Devices',
|
|
82
|
+
'space member list heading': 'Members',
|
|
83
|
+
'space panel heading': 'Space membership',
|
|
84
|
+
'auth code message': 'Enter the following auth code on the joining device.',
|
|
85
|
+
'display name input label': 'Display name',
|
|
86
|
+
'display name input placeholder': 'Enter a display name',
|
|
87
|
+
'invite one label': 'Invite one',
|
|
88
|
+
'invite one description': 'Only one user may join.',
|
|
89
|
+
'invite one qr label': 'Single-use',
|
|
90
|
+
'invite one list item label': 'Active single-use invitation',
|
|
91
|
+
'invite many label': 'Invite many',
|
|
92
|
+
'invite many description': 'Anyone with the link can join.',
|
|
93
|
+
'invite many qr label': 'Multiple-use',
|
|
94
|
+
'invite many list item label': 'Active multiple-use invitation',
|
|
95
|
+
'invite options label': 'Change the active invite option.',
|
|
96
|
+
'confirm label': 'Confirm',
|
|
97
|
+
'reset identity input label':
|
|
98
|
+
'This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.',
|
|
99
|
+
'failed to reset identity message': 'Failed to reset identity.',
|
|
100
|
+
'confirmation value': 'CONFIRM',
|
|
101
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type InvitationStatus } from '@dxos/react-client/invitations';
|
|
6
|
+
|
|
7
|
+
export type IInvitation = Pick<
|
|
8
|
+
InvitationStatus,
|
|
9
|
+
'id' | 'invitationCode' | 'authCode' | 'authMethod' | 'status' | 'haltedAt' | 'result' | 'error'
|
|
10
|
+
> & {
|
|
11
|
+
onCancel: InvitationStatus['cancel'];
|
|
12
|
+
statusValue: number;
|
|
13
|
+
createInvitationUrl: (code: InvitationStatus['invitationCode']) => string;
|
|
14
|
+
};
|