@dxos/shell 0.3.11-main.1caa3af
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,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Default = void 0;
|
|
30
|
+
require("@dxosTheme");
|
|
31
|
+
const faker_1 = require("@faker-js/faker");
|
|
32
|
+
const react_1 = require("@phosphor-icons/react");
|
|
33
|
+
const react_2 = __importStar(require("react"));
|
|
34
|
+
const react_client_1 = require("@dxos/react-client");
|
|
35
|
+
const echo_1 = require("@dxos/react-client/echo");
|
|
36
|
+
const halo_1 = require("@dxos/react-client/halo");
|
|
37
|
+
const invitations_1 = require("@dxos/react-client/invitations");
|
|
38
|
+
const mesh_1 = require("@dxos/react-client/mesh");
|
|
39
|
+
const testing_1 = require("@dxos/react-client/testing");
|
|
40
|
+
const react_ui_1 = require("@dxos/react-ui");
|
|
41
|
+
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
42
|
+
const storybook_utils_1 = require("@dxos/storybook-utils");
|
|
43
|
+
const components_1 = require("../components");
|
|
44
|
+
const panels_1 = require("../panels");
|
|
45
|
+
const translations_1 = require("../translations");
|
|
46
|
+
exports.default = {
|
|
47
|
+
title: 'Invitations',
|
|
48
|
+
};
|
|
49
|
+
const createInvitationUrl = (invitation) => invitation;
|
|
50
|
+
const Panel = ({ id, panel, setPanel }) => {
|
|
51
|
+
const client = (0, react_client_1.useClient)();
|
|
52
|
+
const spaces = (0, echo_1.useSpaces)();
|
|
53
|
+
(0, react_2.useMemo)(() => {
|
|
54
|
+
if (panel instanceof echo_1.SpaceProxy) {
|
|
55
|
+
window[`peer${id}CreateSpaceInvitation`] = (options) => {
|
|
56
|
+
const invitation = panel.share(options);
|
|
57
|
+
invitation.subscribe((invitation) => {
|
|
58
|
+
const invitationCode = invitations_1.InvitationEncoder.encode(invitation);
|
|
59
|
+
if (invitation.state === invitations_1.Invitation.State.CONNECTING) {
|
|
60
|
+
console.log(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}, [panel]);
|
|
66
|
+
if (panel instanceof echo_1.SpaceProxy) {
|
|
67
|
+
return react_2.default.createElement(panels_1.SpacePanel, { space: panel, createInvitationUrl: createInvitationUrl });
|
|
68
|
+
}
|
|
69
|
+
switch (panel) {
|
|
70
|
+
case 'identity': {
|
|
71
|
+
return react_2.default.createElement(panels_1.JoinPanel, { mode: 'halo-only', onDone: () => setPanel(undefined), onExit: () => setPanel(undefined) });
|
|
72
|
+
}
|
|
73
|
+
case 'devices': {
|
|
74
|
+
return react_2.default.createElement(panels_1.IdentityPanel, { createInvitationUrl: createInvitationUrl, onDone: () => setPanel(undefined) });
|
|
75
|
+
}
|
|
76
|
+
case 'join': {
|
|
77
|
+
return react_2.default.createElement(panels_1.JoinPanel, { onDone: () => setPanel(undefined), onExit: () => setPanel(undefined) });
|
|
78
|
+
}
|
|
79
|
+
default: {
|
|
80
|
+
// TODO(wittjosiah): Tooltips make playwright (webkit) flakier.
|
|
81
|
+
const controls = (react_2.default.createElement(react_ui_1.ButtonGroup, { classNames: 'mbe-4' },
|
|
82
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => client.spaces.create({ name: faker_1.faker.animal.bird() }), "data-testid": 'invitations.create-space' },
|
|
83
|
+
react_2.default.createElement(react_1.PlusCircle, { className: (0, react_ui_theme_1.getSize)(6) })),
|
|
84
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => setPanel('join'), "data-testid": 'invitations.open-join-space' },
|
|
85
|
+
react_2.default.createElement(react_1.SignIn, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) }))));
|
|
86
|
+
const header = (react_2.default.createElement("div", { className: 'flex' },
|
|
87
|
+
"Spaces",
|
|
88
|
+
react_2.default.createElement("span", { className: 'grow' }),
|
|
89
|
+
controls));
|
|
90
|
+
return (react_2.default.createElement("div", null,
|
|
91
|
+
react_2.default.createElement("h1", null, header),
|
|
92
|
+
spaces.length > 0 ? (react_2.default.createElement(react_ui_1.List, null, spaces.map((space) => (react_2.default.createElement(components_1.SpaceListItem, { key: space.key.toHex(), space: space, onClick: () => setPanel(space) }))))) : (react_2.default.createElement("div", { className: 'text-center' }, "No spaces"))));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
const Invitations = (args) => {
|
|
97
|
+
const { id } = args;
|
|
98
|
+
const client = (0, react_client_1.useClient)();
|
|
99
|
+
const networkStatus = (0, mesh_1.useNetworkStatus)().swarm;
|
|
100
|
+
const identity = (0, halo_1.useIdentity)();
|
|
101
|
+
const [panel, setPanel] = (0, react_2.useState)();
|
|
102
|
+
(0, react_2.useMemo)(() => {
|
|
103
|
+
window[`peer${id}CreateHaloInvitation`] = (options) => {
|
|
104
|
+
const invitation = client.halo.share(options);
|
|
105
|
+
invitation.subscribe((invitation) => {
|
|
106
|
+
const invitationCode = invitations_1.InvitationEncoder.encode(invitation);
|
|
107
|
+
if (invitation.state === invitations_1.Invitation.State.CONNECTING) {
|
|
108
|
+
console.log(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
}, [client]);
|
|
113
|
+
// TODO(wittjosiah): Tooltips make playwright (webkit) flakier.
|
|
114
|
+
const controls = (react_2.default.createElement(react_ui_1.ButtonGroup, { classNames: 'mbe-4' },
|
|
115
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => client.halo.createIdentity({ displayName: faker_1.faker.person.firstName() }), disabled: Boolean(identity), "data-testid": 'invitations.create-identity' },
|
|
116
|
+
react_2.default.createElement(react_1.Plus, { className: (0, react_ui_theme_1.getSize)(6) })),
|
|
117
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => setPanel('identity'), disabled: panel === 'identity', "data-testid": 'invitations.open-join-identity' },
|
|
118
|
+
react_2.default.createElement(react_1.QrCode, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) })),
|
|
119
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => setPanel('devices'), disabled: !identity || panel === 'devices', "data-testid": 'invitations.open-devices' },
|
|
120
|
+
react_2.default.createElement(react_1.Laptop, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) })),
|
|
121
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => setPanel(undefined), disabled: !panel, "data-testid": 'invitations.list-spaces' },
|
|
122
|
+
react_2.default.createElement(react_1.Planet, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) })),
|
|
123
|
+
react_2.default.createElement(react_ui_1.Button, { onClick: () => client.mesh.updateConfig(networkStatus === mesh_1.ConnectionState.ONLINE ? mesh_1.ConnectionState.OFFLINE : mesh_1.ConnectionState.ONLINE), "data-testid": 'invitations.toggle-network' }, networkStatus === mesh_1.ConnectionState.ONLINE ? (react_2.default.createElement(react_1.WifiHigh, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) })) : (react_2.default.createElement(react_1.WifiSlash, { weight: 'fill', className: (0, react_ui_theme_1.getSize)(6) })))));
|
|
124
|
+
const header = (react_2.default.createElement("div", { className: 'flex', "data-testid": 'invitations.identity-header' },
|
|
125
|
+
"Identity",
|
|
126
|
+
react_2.default.createElement("span", { className: 'grow' }),
|
|
127
|
+
controls));
|
|
128
|
+
return (react_2.default.createElement("div", { className: 'flex flex-col m-4 flex-1 min-w-0', "data-testid": `peer-${id}` },
|
|
129
|
+
react_2.default.createElement("div", { className: `${react_ui_theme_1.groupSurface} rounded p-2 mbe-2` },
|
|
130
|
+
react_2.default.createElement("h1", null, header),
|
|
131
|
+
identity ? (react_2.default.createElement(react_ui_1.List, null,
|
|
132
|
+
react_2.default.createElement(components_1.IdentityListItem, { identity: identity, presence: networkStatus }))) : (react_2.default.createElement("div", { className: 'text-center' }, "No identity"))),
|
|
133
|
+
identity || panel ? (react_2.default.createElement("div", { className: `${react_ui_theme_1.groupSurface} rounded p-2` },
|
|
134
|
+
react_2.default.createElement(Panel, { id: id, panel: panel, setPanel: setPanel }))) : null));
|
|
135
|
+
};
|
|
136
|
+
exports.Default = {
|
|
137
|
+
render: (args) => (react_2.default.createElement(components_1.ClipboardProvider, null,
|
|
138
|
+
react_2.default.createElement(react_ui_1.Tooltip.Provider, null,
|
|
139
|
+
react_2.default.createElement(testing_1.ClientRepeater, { Component: Invitations, count: 3 })))),
|
|
140
|
+
decorators: [storybook_utils_1.withTheme],
|
|
141
|
+
parameters: {
|
|
142
|
+
chromatic: { disableSnapshot: true },
|
|
143
|
+
translations: [translations_1.osTranslations],
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=Invitations.e2e-stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Invitations.e2e-stories.js","sourceRoot":"","sources":["../../../../src/stories/Invitations.e2e-stories.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,sBAAoB;AAEpB,2CAAwC;AACxC,iDAA8G;AAC9G,+CAAiD;AAEjD,qDAA+C;AAC/C,kDAA8F;AAC9F,kDAAsD;AACtD,gEAA+E;AAC/E,kDAA4E;AAC5E,wDAA4D;AAC5D,6CAAoE;AACpE,yDAA6D;AAC7D,2DAAkD;AAElD,8CAAmF;AACnF,sCAAiE;AACjE,kDAAiD;AAEjD,kBAAe;IACb,KAAK,EAAE,aAAa;CACrB,CAAC;AAIF,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,UAAU,CAAC;AAE/D,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAA4E,EAAE,EAAE;IAClH,MAAM,MAAM,GAAG,IAAA,wBAAS,GAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAA,gBAAS,GAAE,CAAC;IAE3B,I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BAAS,CAAC;IACvB,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;QACpC,YAAY,EAAE,CAAC,6BAAc,CAAC;KAC/B;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/styles/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./panelStyles"), exports);
|
|
21
|
+
__exportStar(require("./invitationStatusStyles"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/styles/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,gDAA8B;AAC9B,2DAAyC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Invitation } from '@dxos/react-client/invitations';
|
|
2
|
+
export declare const inactiveBgColor = "bg-neutral-100 dark:bg-neutral-600";
|
|
3
|
+
export declare const activeBgColor = "bg-primary-500 dark:bg-primary-400";
|
|
4
|
+
export declare const successBgColor = "bg-success-500 dark:bg-success-400";
|
|
5
|
+
export declare const errorBgColor = "bg-error-500 dark:bg-error-400";
|
|
6
|
+
export declare const cancelledBgColor = "bg-warning-500 dark:bg-warning-400";
|
|
7
|
+
export declare const inactiveTextColor = "text-neutral-100 dark:text-neutral-600";
|
|
8
|
+
export declare const activeTextColor = "text-primary-400 dark:text-primary-500";
|
|
9
|
+
export declare const successTextColor = "text-success-400 dark:text-success-500";
|
|
10
|
+
export declare const errorTextColor = "text-error-400 dark:text-error-500";
|
|
11
|
+
export declare const cancelledTextColor = "text-warning-400 dark:text-warning-500";
|
|
12
|
+
export declare const inactiveStrokeColor = "stroke-neutral-100 dark:stroke-neutral-700";
|
|
13
|
+
export declare const activeStrokeColor = "stroke-primary-400 dark:stroke-primary-150";
|
|
14
|
+
export declare const successStrokeColor = "stroke-success-300 dark:stroke-primary-400";
|
|
15
|
+
export declare const errorStrokeColor = "stroke-error-300 dark:stroke-error-500";
|
|
16
|
+
export declare const cancelledStrokeColor = "stroke-warning-300 dark:stroke-warning-500";
|
|
17
|
+
export declare const resolvedStrokeColor: (status: Invitation.State) => "stroke-success-300 dark:stroke-primary-400" | "stroke-error-300 dark:stroke-error-500" | "stroke-warning-300 dark:stroke-warning-500";
|
|
18
|
+
export declare const resolvedBgColor: (status: Invitation.State) => "bg-success-500 dark:bg-success-400" | "bg-error-500 dark:bg-error-400" | "bg-warning-500 dark:bg-warning-400";
|
|
19
|
+
export declare const resolvedTextColor: (status: Invitation.State) => "text-success-400 dark:text-success-500" | "text-error-400 dark:text-error-500" | "text-warning-400 dark:text-warning-500";
|
|
20
|
+
//# sourceMappingURL=invitationStatusStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitationStatusStyles.d.ts","sourceRoot":"","sources":["../../../../src/styles/invitationStatusStyles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,eAAO,MAAM,eAAe,uCAAuC,CAAC;AACpE,eAAO,MAAM,aAAa,uCAAuC,CAAC;AAClE,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,eAAO,MAAM,YAAY,mCAAmC,CAAC;AAC7D,eAAO,MAAM,gBAAgB,uCAAuC,CAAC;AAErE,eAAO,MAAM,iBAAiB,2CAA2C,CAAC;AAC1E,eAAO,MAAM,eAAe,2CAA2C,CAAC;AACxE,eAAO,MAAM,gBAAgB,2CAA2C,CAAC;AACzE,eAAO,MAAM,cAAc,uCAAuC,CAAC;AACnE,eAAO,MAAM,kBAAkB,2CAA2C,CAAC;AAE3E,eAAO,MAAM,mBAAmB,+CAA+C,CAAC;AAChF,eAAO,MAAM,iBAAiB,+CAA+C,CAAC;AAC9E,eAAO,MAAM,kBAAkB,+CAA+C,CAAC;AAC/E,eAAO,MAAM,gBAAgB,2CAA2C,CAAC;AACzE,eAAO,MAAM,oBAAoB,+CAA+C,CAAC;AAEjF,eAAO,MAAM,mBAAmB,WAAY,WAAW,KAAK,2IAKpC,CAAC;AACzB,eAAO,MAAM,eAAe,WAAY,WAAW,KAAK,mHAKpC,CAAC;AACrB,eAAO,MAAM,iBAAiB,WAAY,WAAW,KAAK,+HAKpC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.resolvedTextColor = exports.resolvedBgColor = exports.resolvedStrokeColor = exports.cancelledStrokeColor = exports.errorStrokeColor = exports.successStrokeColor = exports.activeStrokeColor = exports.inactiveStrokeColor = exports.cancelledTextColor = exports.errorTextColor = exports.successTextColor = exports.activeTextColor = exports.inactiveTextColor = exports.cancelledBgColor = exports.errorBgColor = exports.successBgColor = exports.activeBgColor = exports.inactiveBgColor = void 0;
|
|
7
|
+
const invitations_1 = require("@dxos/react-client/invitations");
|
|
8
|
+
exports.inactiveBgColor = 'bg-neutral-100 dark:bg-neutral-600';
|
|
9
|
+
exports.activeBgColor = 'bg-primary-500 dark:bg-primary-400';
|
|
10
|
+
exports.successBgColor = 'bg-success-500 dark:bg-success-400';
|
|
11
|
+
exports.errorBgColor = 'bg-error-500 dark:bg-error-400';
|
|
12
|
+
exports.cancelledBgColor = 'bg-warning-500 dark:bg-warning-400';
|
|
13
|
+
exports.inactiveTextColor = 'text-neutral-100 dark:text-neutral-600';
|
|
14
|
+
exports.activeTextColor = 'text-primary-400 dark:text-primary-500';
|
|
15
|
+
exports.successTextColor = 'text-success-400 dark:text-success-500';
|
|
16
|
+
exports.errorTextColor = 'text-error-400 dark:text-error-500';
|
|
17
|
+
exports.cancelledTextColor = 'text-warning-400 dark:text-warning-500';
|
|
18
|
+
exports.inactiveStrokeColor = 'stroke-neutral-100 dark:stroke-neutral-700';
|
|
19
|
+
exports.activeStrokeColor = 'stroke-primary-400 dark:stroke-primary-150';
|
|
20
|
+
exports.successStrokeColor = 'stroke-success-300 dark:stroke-primary-400';
|
|
21
|
+
exports.errorStrokeColor = 'stroke-error-300 dark:stroke-error-500';
|
|
22
|
+
exports.cancelledStrokeColor = 'stroke-warning-300 dark:stroke-warning-500';
|
|
23
|
+
const resolvedStrokeColor = (status) => status === invitations_1.Invitation.State.ERROR
|
|
24
|
+
? exports.errorStrokeColor
|
|
25
|
+
: status === invitations_1.Invitation.State.CANCELLED || status === invitations_1.Invitation.State.TIMEOUT
|
|
26
|
+
? exports.cancelledStrokeColor
|
|
27
|
+
: exports.successStrokeColor;
|
|
28
|
+
exports.resolvedStrokeColor = resolvedStrokeColor;
|
|
29
|
+
const resolvedBgColor = (status) => status === invitations_1.Invitation.State.ERROR
|
|
30
|
+
? exports.errorBgColor
|
|
31
|
+
: status === invitations_1.Invitation.State.CANCELLED || status === invitations_1.Invitation.State.TIMEOUT
|
|
32
|
+
? exports.cancelledBgColor
|
|
33
|
+
: exports.successBgColor;
|
|
34
|
+
exports.resolvedBgColor = resolvedBgColor;
|
|
35
|
+
const resolvedTextColor = (status) => status === invitations_1.Invitation.State.ERROR
|
|
36
|
+
? exports.errorTextColor
|
|
37
|
+
: status === invitations_1.Invitation.State.CANCELLED || status === invitations_1.Invitation.State.TIMEOUT
|
|
38
|
+
? exports.cancelledTextColor
|
|
39
|
+
: exports.successTextColor;
|
|
40
|
+
exports.resolvedTextColor = resolvedTextColor;
|
|
41
|
+
//# sourceMappingURL=invitationStatusStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitationStatusStyles.js","sourceRoot":"","sources":["../../../../src/styles/invitationStatusStyles.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,gEAA4D;AAE/C,QAAA,eAAe,GAAG,oCAAoC,CAAC;AACvD,QAAA,aAAa,GAAG,oCAAoC,CAAC;AACrD,QAAA,cAAc,GAAG,oCAAoC,CAAC;AACtD,QAAA,YAAY,GAAG,gCAAgC,CAAC;AAChD,QAAA,gBAAgB,GAAG,oCAAoC,CAAC;AAExD,QAAA,iBAAiB,GAAG,wCAAwC,CAAC;AAC7D,QAAA,eAAe,GAAG,wCAAwC,CAAC;AAC3D,QAAA,gBAAgB,GAAG,wCAAwC,CAAC;AAC5D,QAAA,cAAc,GAAG,oCAAoC,CAAC;AACtD,QAAA,kBAAkB,GAAG,wCAAwC,CAAC;AAE9D,QAAA,mBAAmB,GAAG,4CAA4C,CAAC;AACnE,QAAA,iBAAiB,GAAG,4CAA4C,CAAC;AACjE,QAAA,kBAAkB,GAAG,4CAA4C,CAAC;AAClE,QAAA,gB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+
{"version":3,"file":"panelStyles.js","sourceRoot":"","sources":["../../../../src/styles/panelStyles.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEW,QAAA,UAAU,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../../../../src/testing/fixtures/identities.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,eAAO,MAAM,KAAK,EAAE,WAQnB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.alice = void 0;
|
|
7
|
+
const react_client_1 = require("@dxos/react-client");
|
|
8
|
+
const echo_1 = require("@dxos/react-client/echo");
|
|
9
|
+
exports.alice = {
|
|
10
|
+
identity: {
|
|
11
|
+
identityKey: react_client_1.PublicKey.random(),
|
|
12
|
+
profile: {
|
|
13
|
+
displayName: 'Alice',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
presence: echo_1.SpaceMember.PresenceState.ONLINE,
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=identities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../../../../src/testing/fixtures/identities.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,qDAA+C;AAC/C,kDAAsD;AAEzC,QAAA,KAAK,GAAgB;IAChC,QAAQ,EAAE;QACR,WAAW,EAAE,wBAAS,CAAC,MAAM,EAAE;QAC/B,OAAO,EAAE;YACP,WAAW,EAAE,OAAO;SACrB;KACF;IACD,QAAQ,EAAE,kBAAW,CAAC,aAAa,CAAC,MAAM;CAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/fixtures/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./identities"), exports);
|
|
21
|
+
__exportStar(require("./invitations"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/testing/fixtures/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,+CAA6B;AAC7B,gDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../../../../../src/testing/fixtures/invitations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAE7F,eAAO,MAAM,eAAe,UAAW,WAAW,KAAK,oCAenD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.inviteWithState = void 0;
|
|
7
|
+
const react_client_1 = require("@dxos/react-client");
|
|
8
|
+
const invitations_1 = require("@dxos/react-client/invitations");
|
|
9
|
+
const inviteWithState = (state) => new invitations_1.CancellableInvitationObservable({
|
|
10
|
+
initialInvitation: {
|
|
11
|
+
state,
|
|
12
|
+
invitationId: Math.random().toString(16).slice(2),
|
|
13
|
+
kind: invitations_1.Invitation.Kind.SPACE,
|
|
14
|
+
authMethod: invitations_1.Invitation.AuthMethod.NONE,
|
|
15
|
+
swarmKey: react_client_1.PublicKey.random(),
|
|
16
|
+
type: invitations_1.Invitation.Type.INTERACTIVE,
|
|
17
|
+
authCode: [invitations_1.Invitation.State.READY_FOR_AUTHENTICATION, invitations_1.Invitation.State.AUTHENTICATING].includes(state)
|
|
18
|
+
? '123456'
|
|
19
|
+
: '',
|
|
20
|
+
},
|
|
21
|
+
subscriber: () => { },
|
|
22
|
+
onCancel: async () => { },
|
|
23
|
+
});
|
|
24
|
+
exports.inviteWithState = inviteWithState;
|
|
25
|
+
//# sourceMappingURL=invitations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../../../../../src/testing/fixtures/invitations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;AAEF,qDAA+C;AAC/C,gEAA6F;AAEtF,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAE,EAAE,CACzD,IAAI,6CAA+B,CAAC;IAClC,iBAAiB,EAAE;QACjB,KAAK;QACL,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,IAAI,EAAE,wBAAU,CAAC,IAAI,CAAC,KAAK;QAC3B,UAAU,EAAE,wBAAU,CAAC,UAAU,CAAC,IAAI;QACtC,QAAQ,EAAE,wBAAS,CAAC,MAAM,EAAE;QAC5B,IAAI,EAAE,wBAAU,CAAC,IAAI,CAAC,WAAW;QACjC,QAAQ,EAAE,CAAC,wBAAU,CAAC,KAAK,CAAC,wBAAwB,EAAE,wBAAU,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;YACpG,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,EAAE;KACP;IACD,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,QAAQ,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC;CACzB,CAAC,CAAC;AAfQ,QAAA,eAAe,mBAevB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./fixtures"), exports);
|
|
21
|
+
__exportStar(require("./scoped-shell-manager"), exports);
|
|
22
|
+
__exportStar(require("./shell-manager"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,6CAA2B;AAC3B,yDAAuC;AACvC,kDAAgC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Locator, Page, FrameLocator } from '@playwright/test';
|
|
2
|
+
type Scope = Locator | FrameLocator | Page;
|
|
3
|
+
export declare class ScopedShellManager {
|
|
4
|
+
page: Page;
|
|
5
|
+
authenticatorIsVisible(type: 'device' | 'space', scope?: Scope): Promise<boolean>;
|
|
6
|
+
invitationFailed(scope?: Scope, timeout?: number): Promise<boolean>;
|
|
7
|
+
inputInvitation(type: 'device' | 'space', invitation: string, scope?: Scope): Promise<void>;
|
|
8
|
+
invitationInputContinue(type: 'device' | 'space', scope?: Scope): Promise<void>;
|
|
9
|
+
cancelInvitation(type: 'device' | 'space', kind: 'host' | 'guest', scope?: Scope): Promise<void>;
|
|
10
|
+
readyToAuthenticate(type: 'device' | 'space', scope?: Scope, timeout?: number): Promise<boolean>;
|
|
11
|
+
authenticateInvitation(type: 'device' | 'space', authCode: string, scope?: Scope): Promise<void>;
|
|
12
|
+
clearAuthCode(type: 'device' | 'space', scope?: Scope): Promise<void>;
|
|
13
|
+
resetInvitation(scope?: Scope): Promise<void>;
|
|
14
|
+
doneInvitation(type: 'device' | 'space', scope?: Scope): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=scoped-shell-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scoped-shell-manager.d.ts","sourceRoot":"","sources":["../../../../src/testing/scoped-shell-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpE,KAAK,KAAK,GAAG,OAAO,GAAG,YAAY,GAAG,IAAI,CAAC;AAE3C,qBAAa,kBAAkB;IAC7B,IAAI,EAAG,IAAI,CAAC;IAEZ,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;IAIxD,gBAAgB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,SAAO;IAU9C,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;IAK3E,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;IAI/D,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;IAUhF,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,SAAO;IAY3E,sBAAsB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;IAOhF,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;IAMrD,eAAe,CAAC,KAAK,CAAC,EAAE,KAAK;IAI7B,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAK7D"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
//
|
|
3
|
+
// Copyright 2023 DXOS.org
|
|
4
|
+
//
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScopedShellManager = void 0;
|
|
7
|
+
class ScopedShellManager {
|
|
8
|
+
authenticatorIsVisible(type, scope) {
|
|
9
|
+
return (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).isVisible();
|
|
10
|
+
}
|
|
11
|
+
async invitationFailed(scope, timeout = 3000) {
|
|
12
|
+
const peer = scope || this.page;
|
|
13
|
+
try {
|
|
14
|
+
await peer.locator('[data-testid=invitation-rescuer-reset]:not([disabled])').waitFor({ timeout });
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
catch (_a) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async inputInvitation(type, invitation, scope) {
|
|
22
|
+
await (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-input`).fill(invitation);
|
|
23
|
+
await this.page.keyboard.press('Enter');
|
|
24
|
+
}
|
|
25
|
+
async invitationInputContinue(type, scope) {
|
|
26
|
+
await (scope || this.page).getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-input-continue`).click();
|
|
27
|
+
}
|
|
28
|
+
async cancelInvitation(type, kind, scope) {
|
|
29
|
+
if (kind === 'guest') {
|
|
30
|
+
await (scope || this.page)
|
|
31
|
+
.getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-authenticator-cancel`)
|
|
32
|
+
.click();
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
await (scope || this.page).getByTestId('cancel-invitation').nth(0).click();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async readyToAuthenticate(type, scope, timeout = 3000) {
|
|
39
|
+
const peer = scope || this.page;
|
|
40
|
+
try {
|
|
41
|
+
await peer
|
|
42
|
+
.locator(`[data-testid=${type === 'device' ? 'halo' : 'space'}-auth-code-input]:not([disabled])`)
|
|
43
|
+
.waitFor({ timeout });
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch (_a) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async authenticateInvitation(type, authCode, scope) {
|
|
51
|
+
const peer = scope || this.page;
|
|
52
|
+
// TODO(wittjosiah): Update ids.
|
|
53
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).fill(authCode);
|
|
54
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-invitation-authenticator-next`).click();
|
|
55
|
+
}
|
|
56
|
+
async clearAuthCode(type, scope) {
|
|
57
|
+
const peer = scope || this.page;
|
|
58
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).fill('');
|
|
59
|
+
await peer.getByTestId(`${type === 'device' ? 'halo' : 'space'}-auth-code-input`).focus();
|
|
60
|
+
}
|
|
61
|
+
async resetInvitation(scope) {
|
|
62
|
+
await (scope || this.page).getByTestId('invitation-rescuer-reset').click();
|
|
63
|
+
}
|
|
64
|
+
async doneInvitation(type, scope) {
|
|
65
|
+
await (scope || this.page)
|
|
66
|
+
.getByTestId(type === 'device' ? 'halo-invitation-accepted-done' : 'space-invitation-accepted-done')
|
|
67
|
+
.click();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.ScopedShellManager = ScopedShellManager;
|
|
71
|
+
//# sourceMappingURL=scoped-shell-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scoped-shell-manager.js","sourceRoot":"","sources":["../../../../src/test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,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,gCAAgC,CAAC,CAAC,KAAK,EAAE,CAAC;IAC1G,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAwB,EAAE,KAAa;QACzD,MAAM,IAAI,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;QAChC,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3F,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,KAAK,EAAE,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAa;QACjC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC,CAAC,KAAK,EAAE,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAAwB,EAAE,KAAa;QAC1D,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;aACvB,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,gCAAgC,CAAC;aACnG,KAAK,EAAE,CAAC;IACb,CAAC;CACF;AAtED,gDAsEC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Page } from '@playwright/test';
|
|
2
|
+
import { ScopedShellManager } from './scoped-shell-manager';
|
|
3
|
+
export declare class ShellManager extends ScopedShellManager {
|
|
4
|
+
readonly page: Page;
|
|
5
|
+
readonly inIFrame: boolean;
|
|
6
|
+
private _invitationCode;
|
|
7
|
+
private _authCode;
|
|
8
|
+
constructor(page: Page, inIFrame?: boolean);
|
|
9
|
+
get shell(): import("@playwright/test").FrameLocator | Page;
|
|
10
|
+
isCurrentSpaceViewVisible(): Promise<boolean>;
|
|
11
|
+
isSpaceListViewVisible(): Promise<boolean>;
|
|
12
|
+
createIdentity(name: string): Promise<void>;
|
|
13
|
+
closeShell(): Promise<void>;
|
|
14
|
+
openCurrentSpace(): Promise<void>;
|
|
15
|
+
openSpaceList(): Promise<void>;
|
|
16
|
+
showAllSpaces(): Promise<void>;
|
|
17
|
+
showCurrentSpace(): Promise<void>;
|
|
18
|
+
createSpaceInvitation(): Promise<string>;
|
|
19
|
+
acceptSpaceInvitation(invitationCode: string): Promise<void>;
|
|
20
|
+
getAuthCode(): Promise<string>;
|
|
21
|
+
authenticate(authCode: string): Promise<void>;
|
|
22
|
+
private _onConsoleMessage;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=shell-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-manager.d.ts","sourceRoot":"","sources":["../../../../src/testing/shell-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,qBAAa,YAAa,SAAQ,kBAAkB;aAM9B,IAAI,EAAE,IAAI;IAC5B,QAAQ,CAAC,QAAQ;IANnB,OAAO,CAAC,eAAe,CAAyB;IAChD,OAAO,CAAC,SAAS,CAAyB;gBAItB,IAAI,EAAE,IAAI,EACnB,QAAQ,UAAO;IAM1B,IAAI,KAAK,mDAER;IAIK,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC;IAI7C,sBAAsB,IAAI,OAAO,CAAC,OAAO,CAAC;IAM1C,cAAc,CAAC,IAAI,EAAE,MAAM;IAO3B,UAAU;IAKV,gBAAgB;IAIhB,aAAa;IAIb,aAAa;IAIb,gBAAgB;IAIhB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAQxC,qBAAqB,CAAC,cAAc,EAAE,MAAM;IAI5C,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9B,YAAY,CAAC,QAAQ,EAAE,MAAM;YAOrB,iBAAiB;CAWhC"}
|