@dxos/shell 0.7.5-main.9d2a38b → 0.7.5-main.e94eead
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/dist/bundle/{shell.mjs → shell.js} +20830 -21849
- package/dist/bundle/shell.js.map +1 -0
- package/dist/bundle/shell.umd.cjs +1045 -0
- package/dist/bundle/shell.umd.cjs.map +1 -0
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +556 -804
- package/dist/lib/browser/react.mjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +656 -904
- package/dist/lib/node/react.cjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react.mjs +556 -804
- package/dist/lib/node-esm/react.mjs.map +4 -4
- package/dist/types/src/components/AgentConfig.d.ts +1 -2
- package/dist/types/src/components/AgentConfig.d.ts.map +1 -1
- package/dist/types/src/components/AgentConfig.js +20 -50
- package/dist/types/src/components/AgentConfig.js.map +1 -1
- package/dist/types/src/components/AuthCode.d.ts +2 -2
- package/dist/types/src/components/AuthCode.d.ts.map +1 -1
- package/dist/types/src/components/AuthCode.js +6 -44
- package/dist/types/src/components/AuthCode.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts +2 -2
- package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.js +9 -24
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +8 -9
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +17 -25
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -1
- package/dist/types/src/components/CompoundButton/index.js +1 -17
- package/dist/types/src/components/CompoundButton/index.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts +1 -2
- package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.js +10 -24
- package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.d.ts +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +18 -73
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListProps.js +0 -2
- package/dist/types/src/components/DeviceList/DeviceListProps.js.map +1 -1
- package/dist/types/src/components/DeviceList/index.js +2 -18
- package/dist/types/src/components/DeviceList/index.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +12 -51
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +2 -3
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +17 -55
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +3 -4
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +10 -17
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
- package/dist/types/src/components/IdentityList/index.js +2 -18
- package/dist/types/src/components/IdentityList/index.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.d.ts +2 -2
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.js +10 -20
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +3 -4
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +20 -27
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +1 -2
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +9 -45
- package/dist/types/src/components/InvitationList/InvitationListContainer.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +3 -3
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.js +32 -99
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListProps.js +0 -2
- package/dist/types/src/components/InvitationList/index.js +3 -19
- package/dist/types/src/components/InvitationList/index.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +15 -68
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/components/Panel/Actions.js +6 -41
- package/dist/types/src/components/Panel/Actions.js.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts +1 -2
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.js +7 -16
- package/dist/types/src/components/Panel/CloseButton.js.map +1 -1
- package/dist/types/src/components/Panel/Emoji.d.ts +3 -3
- package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Emoji.js +6 -19
- package/dist/types/src/components/Panel/Emoji.js.map +1 -1
- package/dist/types/src/components/Panel/Heading.js +5 -44
- package/dist/types/src/components/Panel/Heading.js.map +1 -1
- package/dist/types/src/components/Panel/Input.d.ts +2 -2
- package/dist/types/src/components/Panel/Input.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Input.js +4 -17
- package/dist/types/src/components/Panel/Input.js.map +1 -1
- package/dist/types/src/components/Panel/Label.d.ts +2 -2
- package/dist/types/src/components/Panel/Label.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Label.js +4 -14
- package/dist/types/src/components/Panel/Label.js.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.d.ts +4 -5
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.js +15 -35
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -1
- package/dist/types/src/components/Panel/StepHeading.js +5 -40
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -1
- package/dist/types/src/components/Panel/index.js +8 -24
- package/dist/types/src/components/Panel/index.js.map +1 -1
- package/dist/types/src/components/SpaceListItem.js +10 -49
- package/dist/types/src/components/SpaceListItem.js.map +1 -1
- package/dist/types/src/components/StorybookDialog.d.ts +2 -2
- package/dist/types/src/components/StorybookDialog.d.ts.map +1 -1
- package/dist/types/src/components/StorybookDialog.js +5 -18
- package/dist/types/src/components/StorybookDialog.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.d.ts +2 -2
- package/dist/types/src/components/Viewport/Viewport.js +18 -55
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +2 -3
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.js +12 -37
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -1
- package/dist/types/src/components/Viewport/index.js +1 -17
- package/dist/types/src/components/Viewport/index.js.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/index.js +9 -27
- package/dist/types/src/components/index.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +1 -2
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +7 -22
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/index.js +1 -17
- package/dist/types/src/composites/IdentityDialog/index.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +1 -2
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +9 -23
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/index.js +1 -17
- package/dist/types/src/composites/JoinDialog/index.js.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +1 -2
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.js +54 -90
- package/dist/types/src/composites/Shell/Shell.js.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.d.ts +2 -2
- package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/ShellContext.js +32 -72
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -1
- package/dist/types/src/composites/Shell/index.js +3 -19
- package/dist/types/src/composites/Shell/index.js.map +1 -1
- package/dist/types/src/composites/Shell/memory-shell-runtime.js +7 -11
- package/dist/types/src/composites/Shell/memory-shell-runtime.js.map +1 -1
- package/dist/types/src/composites/Shell/run-shell.js +18 -67
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
- package/dist/types/src/composites/Shell/shell-runtime.js +13 -17
- package/dist/types/src/composites/Shell/shell-runtime.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +1 -2
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +7 -22
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/index.js +1 -17
- package/dist/types/src/composites/SpaceDialog/index.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +1 -2
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.js +6 -20
- package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/index.js +1 -17
- package/dist/types/src/composites/StatusDialog/index.js.map +1 -1
- package/dist/types/src/composites/index.js +4 -20
- package/dist/types/src/composites/index.js.map +1 -1
- package/dist/types/src/index.js +2 -6
- package/dist/types/src/index.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +2 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +63 -137
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +11 -12
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +39 -54
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +2 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js +0 -2
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/identityMachine.js +10 -14
- package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/index.js +2 -18
- package/dist/types/src/panels/IdentityPanel/index.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +2 -3
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +16 -29
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -2
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +27 -72
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.js +2 -18
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +7 -11
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js +19 -23
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useKubeAgentHandlers.js +19 -23
- package/dist/types/src/panels/IdentityPanel/useKubeAgentHandlers.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +11 -48
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +2 -3
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +38 -100
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +15 -16
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +25 -45
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js +0 -2
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/index.js +2 -18
- package/dist/types/src/panels/JoinPanel/index.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.js +49 -54
- package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +9 -21
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +14 -58
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +2 -3
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +20 -61
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts +2 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js +8 -47
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +22 -73
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +18 -59
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +1 -2
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +14 -37
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/index.js +7 -23
- package/dist/types/src/panels/JoinPanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +4 -4
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +13 -58
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +2 -3
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +25 -72
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +18 -19
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +96 -121
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js +0 -2
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/index.js +2 -18
- package/dist/types/src/panels/SpacePanel/index.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/spaceMachine.js +9 -13
- package/dist/types/src/panels/SpacePanel/spaceMachine.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts +3 -3
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +33 -81
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/index.js +1 -17
- package/dist/types/src/panels/SpacePanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +1 -2
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.js +5 -17
- package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/index.js +1 -17
- package/dist/types/src/panels/StatusPanel/index.js.map +1 -1
- package/dist/types/src/panels/index.js +4 -20
- package/dist/types/src/panels/index.js.map +1 -1
- package/dist/types/src/playwright/invitations-manager.js +11 -15
- package/dist/types/src/playwright/invitations-manager.js.map +1 -1
- package/dist/types/src/playwright/invitations.spec.js +64 -66
- package/dist/types/src/playwright/invitations.spec.js.map +1 -1
- package/dist/types/src/react.js +6 -22
- package/dist/types/src/react.js.map +1 -1
- package/dist/types/src/steps/ConfirmReset.d.ts +2 -3
- package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -1
- package/dist/types/src/steps/ConfirmReset.js +23 -70
- package/dist/types/src/steps/ConfirmReset.js.map +1 -1
- package/dist/types/src/steps/InvitationManager.d.ts +1 -2
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
- package/dist/types/src/steps/InvitationManager.js +17 -71
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/steps/StepProps.js +0 -2
- package/dist/types/src/steps/StepProps.js.map +1 -1
- package/dist/types/src/steps/index.js +3 -19
- package/dist/types/src/steps/index.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +2 -3
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +50 -113
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/dist/types/src/styles/index.js +2 -18
- package/dist/types/src/styles/index.js.map +1 -1
- package/dist/types/src/styles/invitationStatusStyles.js +31 -37
- package/dist/types/src/styles/invitationStatusStyles.js.map +1 -1
- package/dist/types/src/styles/panelStyles.js +1 -4
- package/dist/types/src/styles/panelStyles.js.map +1 -1
- package/dist/types/src/testing/fixtures/identities.d.ts.map +1 -1
- package/dist/types/src/testing/fixtures/identities.js +8 -9
- package/dist/types/src/testing/fixtures/identities.js.map +1 -1
- package/dist/types/src/testing/fixtures/index.js +2 -18
- package/dist/types/src/testing/fixtures/index.js.map +1 -1
- package/dist/types/src/testing/fixtures/invitations.js +8 -12
- package/dist/types/src/testing/fixtures/invitations.js.map +1 -1
- package/dist/types/src/testing/index.js +2 -18
- package/dist/types/src/testing/index.js.map +1 -1
- package/dist/types/src/testing/scoped-shell-manager.js +1 -5
- package/dist/types/src/testing/scoped-shell-manager.js.map +1 -1
- package/dist/types/src/testing/shell-manager.js +11 -15
- package/dist/types/src/testing/shell-manager.js.map +1 -1
- package/dist/types/src/translations/index.js +2 -38
- package/dist/types/src/translations/index.js.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +5 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +9 -7
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/dist/types/src/types/FailReason.js +0 -2
- package/dist/types/src/types/FailReason.js.map +1 -1
- package/dist/types/src/types/IInvitation.js +0 -2
- package/dist/types/src/types/IInvitation.js.map +1 -1
- package/dist/types/src/types/index.js +2 -18
- package/dist/types/src/types/index.js.map +1 -1
- package/dist/types/src/util/index.js +1 -17
- package/dist/types/src/util/index.js.map +1 -1
- package/dist/types/src/util/invitationStatusValue.js +11 -14
- package/dist/types/src/util/invitationStatusValue.js.map +1 -1
- package/package.json +36 -31
- package/src/components/AgentConfig.tsx +1 -1
- package/src/components/DeviceList/DeviceList.tsx +1 -1
- package/src/components/index.ts +0 -2
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +3 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +50 -33
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +8 -1
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +3 -7
- package/src/panels/JoinPanel/steps/IdentityInput.tsx +1 -1
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +6 -1
- package/src/testing/fixtures/identities.ts +2 -0
- package/src/translations/locales/en-US.ts +10 -3
- package/dist/bundle/shell.mjs.map +0 -1
- package/dist/bundle/shell.umd.js +0 -1043
- package/dist/bundle/shell.umd.js.map +0 -1
- package/dist/lib/browser/react.css +0 -7
- package/dist/lib/browser/react.css.map +0 -7
- package/dist/lib/node/react.css +0 -7
- package/dist/lib/node/react.css.map +0 -7
- package/dist/lib/node-esm/react.css +0 -7
- package/dist/lib/node-esm/react.css.map +0 -7
- package/dist/types/src/components/EmojiPicker.d.ts +0 -19
- package/dist/types/src/components/EmojiPicker.d.ts.map +0 -1
- package/dist/types/src/components/EmojiPicker.js +0 -146
- package/dist/types/src/components/EmojiPicker.js.map +0 -1
- package/dist/types/src/components/HuePicker.d.ts +0 -18
- package/dist/types/src/components/HuePicker.d.ts.map +0 -1
- package/dist/types/src/components/HuePicker.js +0 -133
- package/dist/types/src/components/HuePicker.js.map +0 -1
- package/dist/types/src/playwright/playwright.config.d.ts +0 -3
- package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
- package/dist/types/src/playwright/playwright.config.js +0 -18
- package/dist/types/src/playwright/playwright.config.js.map +0 -1
- package/src/components/EmojiPicker.tsx +0 -187
- package/src/components/HuePicker.tsx +0 -182
- package/src/components/emoji.css +0 -25
- /package/src/playwright/{playwright.config.ts → playwright.config.cts} +0 -0
|
@@ -56,7 +56,7 @@ var AgentConfig = ({ agentStatus, validationMessage, onAgentDestroy, onAgentCrea
|
|
|
56
56
|
className: mx(descriptionText, "mlb-2")
|
|
57
57
|
}, t("agent requested description"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, {
|
|
58
58
|
variant: "ghost",
|
|
59
|
-
classNames: "mlb-2 is-full justify-start gap-2
|
|
59
|
+
classNames: "mlb-2 is-full justify-start gap-2 pis-0 pie-3",
|
|
60
60
|
"data-testid": agentStatus === "creatable" ? "devices-panel.create-agent" : "devices-panel.agent-error",
|
|
61
61
|
onClick: agentStatus === "creatable" ? onAgentCreate : onAgentRefresh,
|
|
62
62
|
"aria-describedby": "devices-panel.create-agent.description"
|
|
@@ -136,351 +136,89 @@ var CompoundButton = ({ children, description, before, after, variant = "default
|
|
|
136
136
|
}, after));
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
// packages/sdk/shell/src/components/EmojiPicker.tsx
|
|
140
|
-
import emojiData from "@emoji-mart/data";
|
|
141
|
-
import EmojiMart from "@emoji-mart/react";
|
|
142
|
-
import { ArrowCounterClockwise, CaretDown, UserCircle } from "@phosphor-icons/react";
|
|
143
|
-
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
144
|
-
import React3, { useRef, useState } from "react";
|
|
145
|
-
import { Button as Button2, Popover, Toolbar, Tooltip as Tooltip2, useMediaQuery, useThemeContext as useThemeContext2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
146
|
-
import { getSize as getSize2 } from "@dxos/react-ui-theme";
|
|
147
|
-
var EmojiPickerToolbarButton = ({ disabled, defaultEmoji, emoji, onChangeEmoji, classNames }) => {
|
|
148
|
-
const { t } = useTranslation2("os");
|
|
149
|
-
const { themeMode } = useThemeContext2();
|
|
150
|
-
const [_emojiValue, setEmojiValue] = useControllableState({
|
|
151
|
-
prop: emoji,
|
|
152
|
-
onChange: onChangeEmoji,
|
|
153
|
-
defaultProp: defaultEmoji
|
|
154
|
-
});
|
|
155
|
-
const [emojiPickerOpen, setEmojiPickerOpen] = useState(false);
|
|
156
|
-
const suppressNextTooltip = useRef(false);
|
|
157
|
-
const [triggerTooltipOpen, setTriggerTooltipOpen] = useState(false);
|
|
158
|
-
return /* @__PURE__ */ React3.createElement(Tooltip2.Root, {
|
|
159
|
-
open: triggerTooltipOpen,
|
|
160
|
-
onOpenChange: (nextOpen) => {
|
|
161
|
-
if (suppressNextTooltip.current) {
|
|
162
|
-
setTriggerTooltipOpen(false);
|
|
163
|
-
suppressNextTooltip.current = false;
|
|
164
|
-
} else {
|
|
165
|
-
setTriggerTooltipOpen(nextOpen);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}, /* @__PURE__ */ React3.createElement(Popover.Root, {
|
|
169
|
-
open: emojiPickerOpen,
|
|
170
|
-
onOpenChange: (nextOpen) => {
|
|
171
|
-
setEmojiPickerOpen(nextOpen);
|
|
172
|
-
suppressNextTooltip.current = true;
|
|
173
|
-
}
|
|
174
|
-
}, /* @__PURE__ */ React3.createElement(Tooltip2.Trigger, {
|
|
175
|
-
asChild: true
|
|
176
|
-
}, /* @__PURE__ */ React3.createElement(Popover.Trigger, {
|
|
177
|
-
asChild: true
|
|
178
|
-
}, /* @__PURE__ */ React3.createElement(Toolbar.Button, {
|
|
179
|
-
classNames: [
|
|
180
|
-
"gap-2 text-2xl plb-1",
|
|
181
|
-
classNames
|
|
182
|
-
],
|
|
183
|
-
disabled
|
|
184
|
-
}, /* @__PURE__ */ React3.createElement("span", {
|
|
185
|
-
className: "sr-only"
|
|
186
|
-
}, t("select emoji label")), /* @__PURE__ */ React3.createElement(UserCircle, {
|
|
187
|
-
className: getSize2(5)
|
|
188
|
-
})))), /* @__PURE__ */ React3.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React3.createElement(Tooltip2.Content, {
|
|
189
|
-
side: "bottom"
|
|
190
|
-
}, t("select emoji label"), /* @__PURE__ */ React3.createElement(Tooltip2.Arrow, null))), /* @__PURE__ */ React3.createElement(Popover.Content, {
|
|
191
|
-
side: "bottom",
|
|
192
|
-
onKeyDownCapture: (event) => {
|
|
193
|
-
if (event.key === "Escape") {
|
|
194
|
-
event.stopPropagation();
|
|
195
|
-
setEmojiPickerOpen(false);
|
|
196
|
-
suppressNextTooltip.current = true;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}, /* @__PURE__ */ React3.createElement(EmojiMart, {
|
|
200
|
-
data: emojiData,
|
|
201
|
-
onEmojiSelect: ({ native }) => {
|
|
202
|
-
if (native) {
|
|
203
|
-
setEmojiValue(native);
|
|
204
|
-
setEmojiPickerOpen(false);
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
autoFocus: true,
|
|
208
|
-
maxFrequentRows: 0,
|
|
209
|
-
noCountryFlags: true,
|
|
210
|
-
theme: themeMode
|
|
211
|
-
}), /* @__PURE__ */ React3.createElement(Popover.Arrow, null))));
|
|
212
|
-
};
|
|
213
|
-
var EmojiPickerBlock = ({ disabled, defaultEmoji, emoji, onChangeEmoji, onClickClear }) => {
|
|
214
|
-
const { t } = useTranslation2("os");
|
|
215
|
-
const [isMd] = useMediaQuery("md", {
|
|
216
|
-
ssr: false
|
|
217
|
-
});
|
|
218
|
-
const [emojiValue, setEmojiValue] = useControllableState({
|
|
219
|
-
prop: emoji,
|
|
220
|
-
onChange: onChangeEmoji,
|
|
221
|
-
defaultProp: defaultEmoji
|
|
222
|
-
});
|
|
223
|
-
const [emojiPickerOpen, setEmojiPickerOpen] = useState(false);
|
|
224
|
-
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Popover.Root, {
|
|
225
|
-
open: emojiPickerOpen,
|
|
226
|
-
onOpenChange: setEmojiPickerOpen
|
|
227
|
-
}, /* @__PURE__ */ React3.createElement(Popover.Trigger, {
|
|
228
|
-
asChild: true
|
|
229
|
-
}, /* @__PURE__ */ React3.createElement(Button2, {
|
|
230
|
-
variant: "ghost",
|
|
231
|
-
classNames: "gap-2 text-2xl plb-1",
|
|
232
|
-
disabled
|
|
233
|
-
}, /* @__PURE__ */ React3.createElement("span", {
|
|
234
|
-
className: "sr-only"
|
|
235
|
-
}, t("select emoji label")), /* @__PURE__ */ React3.createElement("span", {
|
|
236
|
-
className: "grow pis-14"
|
|
237
|
-
}, emojiValue), /* @__PURE__ */ React3.createElement(CaretDown, {
|
|
238
|
-
className: getSize2(4)
|
|
239
|
-
}))), /* @__PURE__ */ React3.createElement(Popover.Content, {
|
|
240
|
-
side: "right",
|
|
241
|
-
sideOffset: isMd ? 0 : -310,
|
|
242
|
-
onKeyDownCapture: (event) => {
|
|
243
|
-
if (event.key === "Escape") {
|
|
244
|
-
event.stopPropagation();
|
|
245
|
-
setEmojiPickerOpen(false);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}, /* @__PURE__ */ React3.createElement(EmojiMart, {
|
|
249
|
-
data: emojiData,
|
|
250
|
-
onEmojiSelect: ({ native }) => {
|
|
251
|
-
if (native) {
|
|
252
|
-
setEmojiValue(native);
|
|
253
|
-
setEmojiPickerOpen(false);
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
autoFocus: true,
|
|
257
|
-
maxFrequentRows: 0,
|
|
258
|
-
noCountryFlags: true
|
|
259
|
-
}), /* @__PURE__ */ React3.createElement(Popover.Arrow, null))), /* @__PURE__ */ React3.createElement(Tooltip2.Root, null, /* @__PURE__ */ React3.createElement(Tooltip2.Trigger, {
|
|
260
|
-
asChild: true
|
|
261
|
-
}, /* @__PURE__ */ React3.createElement(Button2, {
|
|
262
|
-
variant: "ghost",
|
|
263
|
-
onClick: onClickClear,
|
|
264
|
-
disabled
|
|
265
|
-
}, /* @__PURE__ */ React3.createElement("span", {
|
|
266
|
-
className: "sr-only"
|
|
267
|
-
}, t("clear label")), /* @__PURE__ */ React3.createElement(ArrowCounterClockwise, null))), /* @__PURE__ */ React3.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React3.createElement(Tooltip2.Content, {
|
|
268
|
-
side: "right"
|
|
269
|
-
}, t("clear label"), /* @__PURE__ */ React3.createElement(Tooltip2.Arrow, null)))));
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// packages/sdk/shell/src/components/HuePicker.tsx
|
|
273
|
-
import { ArrowCounterClockwise as ArrowCounterClockwise2, CaretDown as CaretDown2, Check, Palette } from "@phosphor-icons/react";
|
|
274
|
-
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
275
|
-
import React4, { useRef as useRef2, useState as useState2 } from "react";
|
|
276
|
-
import { Button as Button3, DropdownMenu, Toolbar as Toolbar2, Tooltip as Tooltip3, useThemeContext as useThemeContext3, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
277
|
-
import { getSize as getSize3, hueTokenThemes, mx as mx3 } from "@dxos/react-ui-theme";
|
|
278
|
-
var HuePreview = ({ hue }) => {
|
|
279
|
-
const { tx } = useThemeContext3();
|
|
280
|
-
const size = 20;
|
|
281
|
-
return /* @__PURE__ */ React4.createElement("svg", {
|
|
282
|
-
width: size,
|
|
283
|
-
height: size,
|
|
284
|
-
viewBox: `0 0 ${size} ${size}`
|
|
285
|
-
}, /* @__PURE__ */ React4.createElement("rect", {
|
|
286
|
-
x: 0,
|
|
287
|
-
y: 0,
|
|
288
|
-
width: size,
|
|
289
|
-
height: size,
|
|
290
|
-
className: tx("hue.fill", "select--hue__preview", {
|
|
291
|
-
hue
|
|
292
|
-
})
|
|
293
|
-
}));
|
|
294
|
-
};
|
|
295
|
-
var hueTokens = Object.keys(hueTokenThemes).slice(0, 16);
|
|
296
|
-
var HuePickerToolbarButton = ({ disabled, hue, onChangeHue, classNames, defaultHue }) => {
|
|
297
|
-
const { t } = useTranslation3("os");
|
|
298
|
-
const [hueValue, setHueValue] = useControllableState2({
|
|
299
|
-
prop: hue,
|
|
300
|
-
onChange: onChangeHue,
|
|
301
|
-
defaultProp: defaultHue
|
|
302
|
-
});
|
|
303
|
-
const [huePickerOpen, setHuePickerOpen] = useState2(false);
|
|
304
|
-
const suppressNextTooltip = useRef2(false);
|
|
305
|
-
const [triggerTooltipOpen, setTriggerTooltipOpen] = useState2(false);
|
|
306
|
-
return /* @__PURE__ */ React4.createElement(Tooltip3.Root, {
|
|
307
|
-
open: triggerTooltipOpen,
|
|
308
|
-
onOpenChange: (nextOpen) => {
|
|
309
|
-
if (suppressNextTooltip.current) {
|
|
310
|
-
setTriggerTooltipOpen(false);
|
|
311
|
-
suppressNextTooltip.current = false;
|
|
312
|
-
} else {
|
|
313
|
-
setTriggerTooltipOpen(nextOpen);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Root, {
|
|
317
|
-
modal: false,
|
|
318
|
-
open: huePickerOpen,
|
|
319
|
-
onOpenChange: (nextOpen) => {
|
|
320
|
-
setHuePickerOpen(nextOpen);
|
|
321
|
-
suppressNextTooltip.current = true;
|
|
322
|
-
}
|
|
323
|
-
}, /* @__PURE__ */ React4.createElement(Tooltip3.Trigger, {
|
|
324
|
-
asChild: true
|
|
325
|
-
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Trigger, {
|
|
326
|
-
asChild: true
|
|
327
|
-
}, /* @__PURE__ */ React4.createElement(Toolbar2.Button, {
|
|
328
|
-
classNames: mx3("gap-2 plb-1", classNames),
|
|
329
|
-
disabled
|
|
330
|
-
}, /* @__PURE__ */ React4.createElement("span", {
|
|
331
|
-
className: "sr-only"
|
|
332
|
-
}, t("select hue label")), /* @__PURE__ */ React4.createElement(Palette, {
|
|
333
|
-
className: getSize3(5)
|
|
334
|
-
})))), /* @__PURE__ */ React4.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React4.createElement(Tooltip3.Content, {
|
|
335
|
-
side: "bottom"
|
|
336
|
-
}, t("select hue label"), /* @__PURE__ */ React4.createElement(Tooltip3.Arrow, null))), /* @__PURE__ */ React4.createElement(DropdownMenu.Content, {
|
|
337
|
-
side: "bottom",
|
|
338
|
-
classNames: "!w-40"
|
|
339
|
-
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Viewport, {
|
|
340
|
-
classNames: "grid grid-cols-4"
|
|
341
|
-
}, hueTokens.map((hue2) => {
|
|
342
|
-
return /* @__PURE__ */ React4.createElement(DropdownMenu.CheckboxItem, {
|
|
343
|
-
key: hue2,
|
|
344
|
-
checked: hue2 === hueValue,
|
|
345
|
-
onCheckedChange: () => setHueValue(hue2),
|
|
346
|
-
classNames: "px-0 py-2 items-center justify-center"
|
|
347
|
-
}, /* @__PURE__ */ React4.createElement(HuePreview, {
|
|
348
|
-
hue: hue2
|
|
349
|
-
}));
|
|
350
|
-
})))));
|
|
351
|
-
};
|
|
352
|
-
var HuePickerBlock = ({ disabled, hue, onChangeHue, defaultHue, onClickClear }) => {
|
|
353
|
-
const { t } = useTranslation3("os");
|
|
354
|
-
const [hueValue, setHueValue] = useControllableState2({
|
|
355
|
-
prop: hue,
|
|
356
|
-
onChange: onChangeHue,
|
|
357
|
-
defaultProp: defaultHue
|
|
358
|
-
});
|
|
359
|
-
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(DropdownMenu.Root, {
|
|
360
|
-
modal: false
|
|
361
|
-
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Trigger, {
|
|
362
|
-
asChild: true
|
|
363
|
-
}, /* @__PURE__ */ React4.createElement(Button3, {
|
|
364
|
-
variant: "ghost",
|
|
365
|
-
classNames: "gap-2 plb-1",
|
|
366
|
-
disabled
|
|
367
|
-
}, /* @__PURE__ */ React4.createElement("span", {
|
|
368
|
-
className: "sr-only"
|
|
369
|
-
}, t("select hue label")), /* @__PURE__ */ React4.createElement("div", {
|
|
370
|
-
role: "none",
|
|
371
|
-
className: "pis-14 grow flex items-center justify-center gap-2"
|
|
372
|
-
}, /* @__PURE__ */ React4.createElement(HuePreview, {
|
|
373
|
-
hue: hueValue
|
|
374
|
-
}), /* @__PURE__ */ React4.createElement("span", null, t(`${hueValue} label`))), /* @__PURE__ */ React4.createElement(CaretDown2, {
|
|
375
|
-
className: getSize3(4)
|
|
376
|
-
}))), /* @__PURE__ */ React4.createElement(DropdownMenu.Content, {
|
|
377
|
-
side: "right"
|
|
378
|
-
}, /* @__PURE__ */ React4.createElement(DropdownMenu.Viewport, null, Object.keys(hueTokenThemes).map((hue2) => {
|
|
379
|
-
return /* @__PURE__ */ React4.createElement(DropdownMenu.CheckboxItem, {
|
|
380
|
-
key: hue2,
|
|
381
|
-
checked: hue2 === hueValue,
|
|
382
|
-
onCheckedChange: () => setHueValue(hue2)
|
|
383
|
-
}, /* @__PURE__ */ React4.createElement(HuePreview, {
|
|
384
|
-
hue: hue2
|
|
385
|
-
}), /* @__PURE__ */ React4.createElement("span", {
|
|
386
|
-
className: "grow"
|
|
387
|
-
}, t(`${hue2} label`)), /* @__PURE__ */ React4.createElement(DropdownMenu.ItemIndicator, null, /* @__PURE__ */ React4.createElement(Check, null)));
|
|
388
|
-
})), /* @__PURE__ */ React4.createElement(DropdownMenu.Arrow, null))), /* @__PURE__ */ React4.createElement(Tooltip3.Root, null, /* @__PURE__ */ React4.createElement(Tooltip3.Trigger, {
|
|
389
|
-
asChild: true
|
|
390
|
-
}, /* @__PURE__ */ React4.createElement(Button3, {
|
|
391
|
-
variant: "ghost",
|
|
392
|
-
onClick: onClickClear,
|
|
393
|
-
disabled
|
|
394
|
-
}, /* @__PURE__ */ React4.createElement("span", {
|
|
395
|
-
className: "sr-only"
|
|
396
|
-
}, t("clear label")), /* @__PURE__ */ React4.createElement(ArrowCounterClockwise2, null))), /* @__PURE__ */ React4.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React4.createElement(Tooltip3.Content, {
|
|
397
|
-
side: "right"
|
|
398
|
-
}, t("clear label"), /* @__PURE__ */ React4.createElement(Tooltip3.Arrow, null)))));
|
|
399
|
-
};
|
|
400
|
-
|
|
401
139
|
// packages/sdk/shell/src/components/IdentityList/IdentityListItem.tsx
|
|
402
|
-
import
|
|
140
|
+
import React3, { forwardRef } from "react";
|
|
403
141
|
import { generateName } from "@dxos/display-name";
|
|
404
142
|
import { SpaceMember } from "@dxos/react-client/echo";
|
|
405
143
|
import { ListItem, Avatar as Avatar2, useId as useId2 } from "@dxos/react-ui";
|
|
406
|
-
import { mx as
|
|
144
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
407
145
|
import { keyToFallback } from "@dxos/util";
|
|
408
146
|
var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick, classNames, ...props }, forwardedRef) => {
|
|
409
147
|
const fallbackValue = keyToFallback(identity.identityKey);
|
|
410
148
|
const labelId = useId2("identityListItem__label");
|
|
411
149
|
const displayName = identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
412
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ React3.createElement(ListItem.Root, {
|
|
413
151
|
...props,
|
|
414
|
-
classNames:
|
|
152
|
+
classNames: mx3("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
|
|
415
153
|
onClick: () => onClick?.(),
|
|
416
154
|
"data-testid": "identity-list-item",
|
|
417
155
|
labelId,
|
|
418
156
|
ref: forwardedRef
|
|
419
|
-
}, /* @__PURE__ */
|
|
157
|
+
}, /* @__PURE__ */ React3.createElement(Avatar2.Root, {
|
|
420
158
|
status: presence === SpaceMember.PresenceState.ONLINE ? "active" : "inactive",
|
|
421
159
|
labelId,
|
|
422
160
|
hue: identity.profile?.data?.hue || fallbackValue.hue
|
|
423
|
-
}, /* @__PURE__ */
|
|
161
|
+
}, /* @__PURE__ */ React3.createElement(Avatar2.Frame, {
|
|
424
162
|
classNames: "place-self-center"
|
|
425
|
-
}, /* @__PURE__ */
|
|
163
|
+
}, /* @__PURE__ */ React3.createElement(Avatar2.Fallback, {
|
|
426
164
|
text: identity.profile?.data?.emoji || fallbackValue.emoji
|
|
427
|
-
})), /* @__PURE__ */
|
|
165
|
+
})), /* @__PURE__ */ React3.createElement(Avatar2.Label, {
|
|
428
166
|
classNames: "text-sm truncate pli-2"
|
|
429
167
|
}, displayName)));
|
|
430
168
|
});
|
|
431
169
|
|
|
432
170
|
// packages/sdk/shell/src/components/IdentityList/SpaceMemberList.tsx
|
|
433
|
-
import
|
|
171
|
+
import React4, { useMemo } from "react";
|
|
434
172
|
import { useClient } from "@dxos/react-client";
|
|
435
173
|
import { useMembers } from "@dxos/react-client/echo";
|
|
436
|
-
import { useTranslation as
|
|
437
|
-
import { descriptionText as descriptionText3, mx as
|
|
174
|
+
import { useTranslation as useTranslation2, List } from "@dxos/react-ui";
|
|
175
|
+
import { descriptionText as descriptionText3, mx as mx4 } from "@dxos/react-ui-theme";
|
|
438
176
|
var SpaceMemberList = ({ spaceKey, includeSelf, onSelect }) => {
|
|
439
177
|
const client = useClient();
|
|
440
178
|
const allUnsortedMembers = useMembers(spaceKey);
|
|
441
179
|
const members = useMemo(() => includeSelf ? allUnsortedMembers.sort((member) => member.identity.identityKey.equals(client.halo.identity.get().identityKey) ? -1 : 1) : allUnsortedMembers.filter((member) => !member.identity.identityKey.equals(client.halo.identity.get().identityKey)), [
|
|
442
180
|
allUnsortedMembers
|
|
443
181
|
]);
|
|
444
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ React4.createElement(SpaceMemberListImpl, {
|
|
445
183
|
members,
|
|
446
184
|
onSelect
|
|
447
185
|
});
|
|
448
186
|
};
|
|
449
187
|
var SpaceMemberListImpl = ({ members, onSelect }) => {
|
|
450
|
-
const { t } =
|
|
188
|
+
const { t } = useTranslation2("os");
|
|
451
189
|
const visibleMembers = members.filter((member) => member.identity);
|
|
452
|
-
return visibleMembers.length > 0 ? /* @__PURE__ */
|
|
190
|
+
return visibleMembers.length > 0 ? /* @__PURE__ */ React4.createElement(List, {
|
|
453
191
|
classNames: "flex flex-col gap-2",
|
|
454
192
|
"data-testid": "space-members-list"
|
|
455
193
|
}, visibleMembers.map((member) => {
|
|
456
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ React4.createElement(IdentityListItem, {
|
|
457
195
|
key: member.identity.identityKey.toHex(),
|
|
458
196
|
identity: member.identity,
|
|
459
197
|
presence: member.presence,
|
|
460
198
|
onClick: onSelect && (() => onSelect(member))
|
|
461
199
|
});
|
|
462
|
-
})) : /* @__PURE__ */
|
|
200
|
+
})) : /* @__PURE__ */ React4.createElement("div", {
|
|
463
201
|
role: "none",
|
|
464
202
|
className: "grow flex items-center p-2"
|
|
465
|
-
}, /* @__PURE__ */
|
|
466
|
-
className:
|
|
203
|
+
}, /* @__PURE__ */ React4.createElement("p", {
|
|
204
|
+
className: mx4(descriptionText3, "text-center is-full mlb-2")
|
|
467
205
|
}, t("empty space members message")));
|
|
468
206
|
};
|
|
469
207
|
|
|
470
208
|
// packages/sdk/shell/src/components/DeviceList/DeviceList.tsx
|
|
471
209
|
import { CaretRight, Plus as Plus2 } from "@phosphor-icons/react";
|
|
472
|
-
import
|
|
473
|
-
import { Button as
|
|
474
|
-
import { descriptionText as descriptionText4, getSize as
|
|
210
|
+
import React6 from "react";
|
|
211
|
+
import { Button as Button3, List as List2, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
212
|
+
import { descriptionText as descriptionText4, getSize as getSize3, mx as mx5 } from "@dxos/react-ui-theme";
|
|
475
213
|
|
|
476
214
|
// packages/sdk/shell/src/components/DeviceList/DeviceListItem.tsx
|
|
477
215
|
import { Compass, Desktop, DeviceMobile, Devices, DotsThree, ShareFat, Power as Power2, Robot, Database as Database2, FirstAidKit } from "@phosphor-icons/react";
|
|
478
|
-
import
|
|
216
|
+
import React5, { forwardRef as forwardRef2 } from "react";
|
|
479
217
|
import { generateName as generateName2 } from "@dxos/display-name";
|
|
480
218
|
import { Device, DeviceType, DeviceKind } from "@dxos/react-client/halo";
|
|
481
219
|
import { ConnectionState } from "@dxos/react-client/mesh";
|
|
482
|
-
import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as
|
|
483
|
-
import { getSize as
|
|
220
|
+
import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation3, DropdownMenu, Button as Button2 } from "@dxos/react-ui";
|
|
221
|
+
import { getSize as getSize2 } from "@dxos/react-ui-theme";
|
|
484
222
|
import { keyToFallback as keyToFallback2 } from "@dxos/util";
|
|
485
223
|
var iconProps = {
|
|
486
224
|
weight: "duotone",
|
|
@@ -490,7 +228,7 @@ var iconProps = {
|
|
|
490
228
|
y: 8
|
|
491
229
|
};
|
|
492
230
|
var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, classNames, connectionState, onAgentDestroy: _, ...props }, forwardedRef) => {
|
|
493
|
-
const { t } =
|
|
231
|
+
const { t } = useTranslation3("os");
|
|
494
232
|
const fallbackValue = keyToFallback2(device.deviceKey);
|
|
495
233
|
const labelId = useId3("identityListItem__label");
|
|
496
234
|
const displayName = device.profile ? t("device name placeholder", {
|
|
@@ -498,7 +236,7 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
|
|
|
498
236
|
platform: device.profile.platform
|
|
499
237
|
}) : generateName2(device.deviceKey.toHex());
|
|
500
238
|
const isCurrent = device.kind === DeviceKind.CURRENT;
|
|
501
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ React5.createElement(ListItem2.Root, {
|
|
502
240
|
...props,
|
|
503
241
|
classNames: [
|
|
504
242
|
"flex gap-2 items-center mlb-2",
|
|
@@ -507,60 +245,60 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
|
|
|
507
245
|
"data-testid": `device-list-item${isCurrent ? "-current" : ""}`,
|
|
508
246
|
labelId,
|
|
509
247
|
ref: forwardedRef
|
|
510
|
-
}, /* @__PURE__ */
|
|
248
|
+
}, /* @__PURE__ */ React5.createElement(Avatar3.Root, {
|
|
511
249
|
status: isCurrent && connectionState === ConnectionState.OFFLINE ? "error" : device.presence === Device.PresenceState.ONLINE ? "active" : "inactive",
|
|
512
250
|
labelId,
|
|
513
251
|
hue: fallbackValue.hue,
|
|
514
252
|
variant: "square"
|
|
515
|
-
}, /* @__PURE__ */
|
|
253
|
+
}, /* @__PURE__ */ React5.createElement(Avatar3.Frame, {
|
|
516
254
|
classNames: "place-self-center"
|
|
517
|
-
}, device.profile?.type ? device.profile.type === DeviceType.AGENT_MANAGED ? /* @__PURE__ */
|
|
255
|
+
}, device.profile?.type ? device.profile.type === DeviceType.AGENT_MANAGED ? /* @__PURE__ */ React5.createElement(Database2, iconProps) : device.profile.type === DeviceType.BROWSER ? /* @__PURE__ */ React5.createElement(Compass, iconProps) : device.profile.type === DeviceType.NATIVE ? /* @__PURE__ */ React5.createElement(Desktop, iconProps) : [
|
|
518
256
|
DeviceType.AGENT,
|
|
519
257
|
DeviceType.AGENT_MANAGED
|
|
520
|
-
].includes(device.profile.type) ? /* @__PURE__ */
|
|
258
|
+
].includes(device.profile.type) ? /* @__PURE__ */ React5.createElement(Robot, iconProps) : device.profile.type === DeviceType.MOBILE ? /* @__PURE__ */ React5.createElement(DeviceMobile, iconProps) : /* @__PURE__ */ React5.createElement(Devices, iconProps) : /* @__PURE__ */ React5.createElement(Avatar3.Fallback, {
|
|
521
259
|
text: fallbackValue.emoji
|
|
522
|
-
})), /* @__PURE__ */
|
|
260
|
+
})), /* @__PURE__ */ React5.createElement(Avatar3.Label, {
|
|
523
261
|
classNames: "flex-1 text-sm truncate"
|
|
524
|
-
}, displayName), isCurrent && /* @__PURE__ */
|
|
262
|
+
}, displayName), isCurrent && /* @__PURE__ */ React5.createElement(Tag, {
|
|
525
263
|
color: "primary"
|
|
526
|
-
}, t("current device tag label")), device.kind === DeviceKind.CURRENT && /* @__PURE__ */
|
|
264
|
+
}, t("current device tag label")), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React5.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Trigger, {
|
|
527
265
|
asChild: true
|
|
528
|
-
}, /* @__PURE__ */
|
|
266
|
+
}, /* @__PURE__ */ React5.createElement(Button2, {
|
|
529
267
|
variant: "ghost",
|
|
530
268
|
classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
|
|
531
269
|
"data-testid": `device-list-item${isCurrent ? "-current" : ""}.options`
|
|
532
|
-
}, /* @__PURE__ */
|
|
270
|
+
}, /* @__PURE__ */ React5.createElement("span", {
|
|
533
271
|
className: "sr-only"
|
|
534
|
-
}, t("more options label")), /* @__PURE__ */
|
|
535
|
-
className:
|
|
536
|
-
}))), /* @__PURE__ */
|
|
272
|
+
}, t("more options label")), /* @__PURE__ */ React5.createElement(DotsThree, {
|
|
273
|
+
className: getSize2(5)
|
|
274
|
+
}))), /* @__PURE__ */ React5.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Viewport, null, /* @__PURE__ */ React5.createElement(DropdownMenu.Item, {
|
|
537
275
|
"data-testid": "device-list-item-current.join-existing",
|
|
538
276
|
onClick: onClickJoinExisting
|
|
539
|
-
}, /* @__PURE__ */
|
|
540
|
-
className:
|
|
541
|
-
}), t("choose join new identity label")), onClickRecover && /* @__PURE__ */
|
|
277
|
+
}, /* @__PURE__ */ React5.createElement(ShareFat, {
|
|
278
|
+
className: getSize2(5)
|
|
279
|
+
}), t("choose join new identity label")), onClickRecover && /* @__PURE__ */ React5.createElement(DropdownMenu.Item, {
|
|
542
280
|
"data-testid": "device-list-item-current.recover",
|
|
543
281
|
onClick: onClickRecover
|
|
544
|
-
}, /* @__PURE__ */
|
|
545
|
-
className:
|
|
546
|
-
}), t("choose recover identity label")), /* @__PURE__ */
|
|
282
|
+
}, /* @__PURE__ */ React5.createElement(FirstAidKit, {
|
|
283
|
+
className: getSize2(5)
|
|
284
|
+
}), t("choose recover identity label")), /* @__PURE__ */ React5.createElement(DropdownMenu.Item, {
|
|
547
285
|
"data-testid": "device-list-item-current.reset",
|
|
548
286
|
onClick: onClickReset
|
|
549
|
-
}, /* @__PURE__ */
|
|
550
|
-
className:
|
|
287
|
+
}, /* @__PURE__ */ React5.createElement(Power2, {
|
|
288
|
+
className: getSize2(5)
|
|
551
289
|
}), t("reset device label")))))));
|
|
552
290
|
});
|
|
553
291
|
|
|
554
292
|
// packages/sdk/shell/src/components/DeviceList/DeviceList.tsx
|
|
555
293
|
var DeviceList = ({ devices, connectionState, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, onAgentDestroy }) => {
|
|
556
|
-
const { t } =
|
|
557
|
-
return /* @__PURE__ */
|
|
294
|
+
const { t } = useTranslation4("os");
|
|
295
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
558
296
|
role: "none",
|
|
559
297
|
className: "p-1"
|
|
560
|
-
}, /* @__PURE__ */
|
|
561
|
-
className:
|
|
562
|
-
}, t("devices heading")), devices.length > 0 && /* @__PURE__ */
|
|
563
|
-
return /* @__PURE__ */
|
|
298
|
+
}, /* @__PURE__ */ React6.createElement("h2", {
|
|
299
|
+
className: mx5(descriptionText4, "text-center mbs-2")
|
|
300
|
+
}, t("devices heading")), devices.length > 0 && /* @__PURE__ */ React6.createElement(List2, null, devices.map((device) => {
|
|
301
|
+
return /* @__PURE__ */ React6.createElement(DeviceListItem, {
|
|
564
302
|
key: device.deviceKey.toHex(),
|
|
565
303
|
device,
|
|
566
304
|
onClickEdit: () => onClickEdit?.(device),
|
|
@@ -570,43 +308,43 @@ var DeviceList = ({ devices, connectionState, onClickAdd, onClickEdit, onClickRe
|
|
|
570
308
|
connectionState,
|
|
571
309
|
onAgentDestroy
|
|
572
310
|
});
|
|
573
|
-
})), /* @__PURE__ */
|
|
311
|
+
})), /* @__PURE__ */ React6.createElement(Button3, {
|
|
574
312
|
variant: "ghost",
|
|
575
|
-
classNames: "justify-start gap-2
|
|
313
|
+
classNames: "justify-start gap-2 pis-0 pie-3 is-full",
|
|
576
314
|
"data-testid": "devices-panel.create-invitation",
|
|
577
315
|
onClick: onClickAdd
|
|
578
|
-
}, /* @__PURE__ */
|
|
316
|
+
}, /* @__PURE__ */ React6.createElement("div", {
|
|
579
317
|
role: "img",
|
|
580
|
-
className:
|
|
581
|
-
}, /* @__PURE__ */
|
|
318
|
+
className: mx5(getSize3(8), "m-1 rounded-sm bg-input grid place-items-center")
|
|
319
|
+
}, /* @__PURE__ */ React6.createElement(Plus2, {
|
|
582
320
|
weight: "light",
|
|
583
|
-
className:
|
|
584
|
-
})), /* @__PURE__ */
|
|
321
|
+
className: getSize3(6)
|
|
322
|
+
})), /* @__PURE__ */ React6.createElement("span", {
|
|
585
323
|
className: "grow font-medium text-start"
|
|
586
|
-
}, t("choose add device label")), /* @__PURE__ */
|
|
324
|
+
}, t("choose add device label")), /* @__PURE__ */ React6.createElement(CaretRight, {
|
|
587
325
|
weight: "bold",
|
|
588
|
-
className:
|
|
326
|
+
className: getSize3(4)
|
|
589
327
|
})));
|
|
590
328
|
};
|
|
591
329
|
|
|
592
330
|
// packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
|
|
593
331
|
import { X } from "@phosphor-icons/react";
|
|
594
332
|
import { formatDistanceToNow } from "date-fns";
|
|
595
|
-
import
|
|
333
|
+
import React8, { useCallback } from "react";
|
|
596
334
|
import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
|
|
597
|
-
import { Button as
|
|
598
|
-
import { focusRing, getSize as
|
|
335
|
+
import { Button as Button4, Clipboard, ListItem as ListItem3, useTranslation as useTranslation5, Avatar as Avatar4, useThemeContext as useThemeContext2, Tooltip as Tooltip2 } from "@dxos/react-ui";
|
|
336
|
+
import { focusRing, getSize as getSize4, mx as mx7 } from "@dxos/react-ui-theme";
|
|
599
337
|
import { hexToEmoji } from "@dxos/util";
|
|
600
338
|
|
|
601
339
|
// packages/sdk/shell/src/components/AuthCode.tsx
|
|
602
|
-
import
|
|
603
|
-
import { mx as
|
|
340
|
+
import React7, { useRef } from "react";
|
|
341
|
+
import { mx as mx6 } from "@dxos/react-ui-theme";
|
|
604
342
|
var AuthCode = (props) => {
|
|
605
343
|
const { code, large, classNames } = props;
|
|
606
344
|
const l = code?.length ?? 0;
|
|
607
345
|
const left = code?.slice(0, l / 2);
|
|
608
346
|
const right = code?.slice(l / 2);
|
|
609
|
-
const codeRef =
|
|
347
|
+
const codeRef = useRef(null);
|
|
610
348
|
const handleClick = () => {
|
|
611
349
|
if (codeRef.current) {
|
|
612
350
|
const selection = window.getSelection();
|
|
@@ -617,20 +355,20 @@ var AuthCode = (props) => {
|
|
|
617
355
|
}
|
|
618
356
|
void navigator.clipboard.writeText(code ?? "");
|
|
619
357
|
};
|
|
620
|
-
return /* @__PURE__ */
|
|
621
|
-
className:
|
|
358
|
+
return /* @__PURE__ */ React7.createElement("span", {
|
|
359
|
+
className: mx6(large ? "text-6xl" : "text-2xl", "font-mono pli-2.5 rounded cursor-pointer", classNames),
|
|
622
360
|
onClick: handleClick,
|
|
623
361
|
ref: codeRef
|
|
624
|
-
}, /* @__PURE__ */
|
|
362
|
+
}, /* @__PURE__ */ React7.createElement("span", {
|
|
625
363
|
className: "mie-[0.4em]"
|
|
626
|
-
}, left), /* @__PURE__ */
|
|
364
|
+
}, left), /* @__PURE__ */ React7.createElement("span", null, right));
|
|
627
365
|
};
|
|
628
366
|
|
|
629
367
|
// packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
|
|
630
368
|
var InvitationListItem = (props) => {
|
|
631
369
|
const { invitation } = props;
|
|
632
370
|
const invitationStatus = useInvitationStatus(invitation);
|
|
633
|
-
return /* @__PURE__ */
|
|
371
|
+
return /* @__PURE__ */ React8.createElement(InvitationListItemImpl, {
|
|
634
372
|
...props,
|
|
635
373
|
invitationStatus
|
|
636
374
|
});
|
|
@@ -640,11 +378,11 @@ var avatarProps = {
|
|
|
640
378
|
variant: "circle"
|
|
641
379
|
};
|
|
642
380
|
var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
|
|
643
|
-
const { tx } =
|
|
644
|
-
return /* @__PURE__ */
|
|
381
|
+
const { tx } = useThemeContext2();
|
|
382
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("span", {
|
|
645
383
|
role: "none",
|
|
646
|
-
className:
|
|
647
|
-
}, /* @__PURE__ */
|
|
384
|
+
className: mx7("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize4(avatarProps.size))
|
|
385
|
+
}, /* @__PURE__ */ React8.createElement("span", {
|
|
648
386
|
role: "none",
|
|
649
387
|
className: tx("avatar.ring", "avatar__ring", {
|
|
650
388
|
...avatarProps,
|
|
@@ -654,10 +392,10 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
|
|
|
654
392
|
style: {
|
|
655
393
|
animationDelay: "400ms"
|
|
656
394
|
}
|
|
657
|
-
})), /* @__PURE__ */
|
|
395
|
+
})), /* @__PURE__ */ React8.createElement("span", {
|
|
658
396
|
role: "none",
|
|
659
|
-
className:
|
|
660
|
-
}, /* @__PURE__ */
|
|
397
|
+
className: mx7("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize4(avatarProps.size))
|
|
398
|
+
}, /* @__PURE__ */ React8.createElement("span", {
|
|
661
399
|
role: "none",
|
|
662
400
|
className: tx("avatar.ring", "avatar__ring", {
|
|
663
401
|
...avatarProps,
|
|
@@ -670,7 +408,7 @@ var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
|
|
|
670
408
|
})));
|
|
671
409
|
};
|
|
672
410
|
var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }) => {
|
|
673
|
-
const { t } =
|
|
411
|
+
const { t } = useTranslation5("os");
|
|
674
412
|
const { cancel, status: invitationStatus, invitationCode, authCode, multiUse, shareable } = propsInvitationStatus;
|
|
675
413
|
const isCancellable = !([
|
|
676
414
|
Invitation.State.ERROR,
|
|
@@ -712,38 +450,38 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
712
450
|
Invitation.State.SUCCESS
|
|
713
451
|
].includes(invitationStatus);
|
|
714
452
|
const avatarStatus = avatarError ? "error" : avatarGreen ? "active" : "inactive";
|
|
715
|
-
return /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ React8.createElement(ListItem3.Root, {
|
|
716
454
|
id: invitationCode,
|
|
717
455
|
...props,
|
|
718
456
|
classNames: [
|
|
719
457
|
"flex gap-2 pis-3 pie-1 items-center relative",
|
|
720
458
|
props.classNames
|
|
721
459
|
]
|
|
722
|
-
}, /* @__PURE__ */
|
|
460
|
+
}, /* @__PURE__ */ React8.createElement(ListItem3.Heading, {
|
|
723
461
|
classNames: "sr-only"
|
|
724
|
-
}, t(multiUse ? "invite many list item label" : "invite one list item label")), multiUse && /* @__PURE__ */
|
|
462
|
+
}, t(multiUse ? "invite many list item label" : "invite one list item label")), multiUse && /* @__PURE__ */ React8.createElement(AvatarStackEffect, {
|
|
725
463
|
status: avatarStatus,
|
|
726
464
|
animation: avatarAnimation,
|
|
727
465
|
reverseEffects
|
|
728
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ React8.createElement(Tooltip2.Root, null, /* @__PURE__ */ React8.createElement(Avatar4.Root, {
|
|
729
467
|
...avatarProps,
|
|
730
468
|
animation: avatarAnimation,
|
|
731
469
|
status: avatarStatus
|
|
732
|
-
}, /* @__PURE__ */
|
|
470
|
+
}, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
|
|
733
471
|
asChild: true
|
|
734
|
-
}, /* @__PURE__ */
|
|
472
|
+
}, /* @__PURE__ */ React8.createElement(Avatar4.Frame, {
|
|
735
473
|
tabIndex: 0,
|
|
736
474
|
classNames: [
|
|
737
475
|
focusRing,
|
|
738
476
|
"relative rounded-full place-self-center"
|
|
739
477
|
]
|
|
740
|
-
}, /* @__PURE__ */
|
|
478
|
+
}, /* @__PURE__ */ React8.createElement(Avatar4.Fallback, {
|
|
741
479
|
text: hexToEmoji(invitationId)
|
|
742
|
-
})))), /* @__PURE__ */
|
|
480
|
+
})))), /* @__PURE__ */ React8.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React8.createElement(Tooltip2.Content, {
|
|
743
481
|
side: "left"
|
|
744
|
-
}, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */
|
|
482
|
+
}, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React8.createElement(Tooltip2.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React8.createElement(Tooltip2.Root, null, /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
|
|
745
483
|
asChild: true
|
|
746
|
-
}, /* @__PURE__ */
|
|
484
|
+
}, /* @__PURE__ */ React8.createElement(Button4, {
|
|
747
485
|
variant: "ghost",
|
|
748
486
|
classNames: "grow justify-start font-medium",
|
|
749
487
|
onClick: () => send({
|
|
@@ -751,64 +489,64 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
751
489
|
invitation
|
|
752
490
|
}),
|
|
753
491
|
"data-testid": "show-qrcode"
|
|
754
|
-
}, /* @__PURE__ */
|
|
492
|
+
}, /* @__PURE__ */ React8.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React8.createElement(Clipboard.IconButton, {
|
|
755
493
|
variant: "ghost",
|
|
756
494
|
value: invitationUrl
|
|
757
|
-
})), /* @__PURE__ */
|
|
495
|
+
})), /* @__PURE__ */ React8.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React8.createElement(Tooltip2.Content, {
|
|
758
496
|
side: "left"
|
|
759
|
-
}, invitationHasLifetime && /* @__PURE__ */
|
|
497
|
+
}, invitationHasLifetime && /* @__PURE__ */ React8.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React8.createElement(AuthCode, {
|
|
760
498
|
code: authCode,
|
|
761
499
|
classNames: "grow"
|
|
762
|
-
}) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */
|
|
500
|
+
}) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React8.createElement("span", {
|
|
763
501
|
className: "pli-2 grow text-neutral-500"
|
|
764
|
-
}, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */
|
|
502
|
+
}, "Connecting...") : invitationStatus === Invitation.State.AUTHENTICATING ? /* @__PURE__ */ React8.createElement("span", {
|
|
765
503
|
className: "pli-2 grow text-neutral-500"
|
|
766
|
-
}, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */
|
|
504
|
+
}, "Authenticating...") : invitationStatus === Invitation.State.ERROR || invitationStatus === Invitation.State.TIMEOUT ? /* @__PURE__ */ React8.createElement("span", {
|
|
767
505
|
className: "pli-2 grow text-neutral-500"
|
|
768
|
-
}, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */
|
|
506
|
+
}, "Failed") : invitationStatus === Invitation.State.CANCELLED ? /* @__PURE__ */ React8.createElement("span", {
|
|
769
507
|
className: "pli-2 grow text-neutral-500"
|
|
770
|
-
}, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */
|
|
508
|
+
}, "Cancelled") : invitationStatus === Invitation.State.SUCCESS ? /* @__PURE__ */ React8.createElement("span", {
|
|
771
509
|
className: "pli-2 grow truncate"
|
|
772
|
-
}, "User joined") : !shareable ? /* @__PURE__ */
|
|
510
|
+
}, "User joined") : !shareable ? /* @__PURE__ */ React8.createElement("span", {
|
|
773
511
|
className: "pli-2 grow text-neutral-500"
|
|
774
|
-
}, "Pending Invitation") : /* @__PURE__ */
|
|
512
|
+
}, "Pending Invitation") : /* @__PURE__ */ React8.createElement("span", {
|
|
775
513
|
className: "grow"
|
|
776
|
-
}, " "), isCancellable ? /* @__PURE__ */
|
|
514
|
+
}, " "), isCancellable ? /* @__PURE__ */ React8.createElement(Button4, {
|
|
777
515
|
variant: "ghost",
|
|
778
516
|
classNames: "flex gap-1 pli-0",
|
|
779
517
|
onClick: cancel,
|
|
780
518
|
"data-testid": "cancel-invitation"
|
|
781
|
-
}, /* @__PURE__ */
|
|
519
|
+
}, /* @__PURE__ */ React8.createElement("span", {
|
|
782
520
|
className: "sr-only"
|
|
783
|
-
}, t("cancel invitation label")), /* @__PURE__ */
|
|
784
|
-
className:
|
|
785
|
-
})) : /* @__PURE__ */
|
|
521
|
+
}, t("cancel invitation label")), /* @__PURE__ */ React8.createElement(X, {
|
|
522
|
+
className: getSize4(4)
|
|
523
|
+
})) : /* @__PURE__ */ React8.createElement(Button4, {
|
|
786
524
|
variant: "ghost",
|
|
787
525
|
classNames: "flex gap-1 pli-0",
|
|
788
526
|
onClick: handleClickRemove,
|
|
789
527
|
"data-testid": "remove-invitation"
|
|
790
|
-
}, /* @__PURE__ */
|
|
528
|
+
}, /* @__PURE__ */ React8.createElement("span", {
|
|
791
529
|
className: "sr-only"
|
|
792
|
-
}, t("remove invitation label")), /* @__PURE__ */
|
|
793
|
-
className:
|
|
530
|
+
}, t("remove invitation label")), /* @__PURE__ */ React8.createElement(X, {
|
|
531
|
+
className: getSize4(4)
|
|
794
532
|
})));
|
|
795
533
|
};
|
|
796
534
|
|
|
797
535
|
// packages/sdk/shell/src/components/InvitationList/InvitationListContainer.tsx
|
|
798
|
-
import
|
|
536
|
+
import React10, { useCallback as useCallback2 } from "react";
|
|
799
537
|
import { useSpace, useSpaceInvitations } from "@dxos/react-client/echo";
|
|
800
538
|
|
|
801
539
|
// packages/sdk/shell/src/components/InvitationList/InvitationList.tsx
|
|
802
|
-
import
|
|
540
|
+
import React9 from "react";
|
|
803
541
|
import { List as List3 } from "@dxos/react-ui";
|
|
804
|
-
import { mx as
|
|
542
|
+
import { mx as mx8 } from "@dxos/react-ui-theme";
|
|
805
543
|
var InvitationList = ({ invitations, send, ...invitationProps }) => {
|
|
806
544
|
const { className, InvitationListItem: Item = InvitationListItem } = invitationProps;
|
|
807
|
-
return /* @__PURE__ */
|
|
808
|
-
classNames:
|
|
545
|
+
return /* @__PURE__ */ React9.createElement(List3, {
|
|
546
|
+
classNames: mx8("flex flex-col gap-2", className)
|
|
809
547
|
}, invitations.map((invitation) => {
|
|
810
548
|
const value = invitation.get().invitationId;
|
|
811
|
-
return /* @__PURE__ */
|
|
549
|
+
return /* @__PURE__ */ React9.createElement(Item, {
|
|
812
550
|
key: value,
|
|
813
551
|
send,
|
|
814
552
|
invitation,
|
|
@@ -826,7 +564,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
|
|
|
826
564
|
}, [
|
|
827
565
|
space
|
|
828
566
|
]);
|
|
829
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ React10.createElement(InvitationList, {
|
|
830
568
|
invitations,
|
|
831
569
|
onClickRemove: handleClickRemove,
|
|
832
570
|
createInvitationUrl,
|
|
@@ -835,11 +573,11 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl, send }) => {
|
|
|
835
573
|
};
|
|
836
574
|
|
|
837
575
|
// packages/sdk/shell/src/components/Panel/Action.tsx
|
|
838
|
-
import { CaretDown
|
|
839
|
-
import { useControllableState
|
|
840
|
-
import
|
|
841
|
-
import { Button as
|
|
842
|
-
import { descriptionText as descriptionText5, getSize as
|
|
576
|
+
import { CaretDown, Check, Placeholder } from "@phosphor-icons/react";
|
|
577
|
+
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
578
|
+
import React11, { forwardRef as forwardRef3 } from "react";
|
|
579
|
+
import { Button as Button5, DropdownMenu as DropdownMenu2, useTranslation as useTranslation6 } from "@dxos/react-ui";
|
|
580
|
+
import { descriptionText as descriptionText5, getSize as getSize5, mx as mx9 } from "@dxos/react-ui-theme";
|
|
843
581
|
var defaultActions = {
|
|
844
582
|
noopAction: {
|
|
845
583
|
label: "No-op",
|
|
@@ -852,17 +590,17 @@ var defaultActions = {
|
|
|
852
590
|
var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
853
591
|
const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, "data-testid": testId, ...rest } = props;
|
|
854
592
|
const dropdownTestId = testId && `${testId}.more`;
|
|
855
|
-
const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] =
|
|
593
|
+
const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] = useControllableState({
|
|
856
594
|
prop: propsActiveAction,
|
|
857
595
|
onChange: onChangeActiveAction,
|
|
858
596
|
defaultProp: defaultActiveAction
|
|
859
597
|
});
|
|
860
598
|
const activeAction = actions[activeActionKey2] ?? {};
|
|
861
|
-
const { t } =
|
|
862
|
-
return /* @__PURE__ */
|
|
599
|
+
const { t } = useTranslation6("os");
|
|
600
|
+
return /* @__PURE__ */ React11.createElement("div", {
|
|
863
601
|
role: "none",
|
|
864
|
-
className:
|
|
865
|
-
}, /* @__PURE__ */
|
|
602
|
+
className: mx9("mbs-2 flex gap-px items-center", isFull && "is-full")
|
|
603
|
+
}, /* @__PURE__ */ React11.createElement(Button5, {
|
|
866
604
|
...rest,
|
|
867
605
|
classNames: [
|
|
868
606
|
"bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",
|
|
@@ -872,22 +610,22 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
872
610
|
variant,
|
|
873
611
|
"data-testid": testId,
|
|
874
612
|
onClick: activeAction.onClick
|
|
875
|
-
}, activeAction.icon && /* @__PURE__ */
|
|
876
|
-
className:
|
|
877
|
-
}), /* @__PURE__ */
|
|
613
|
+
}, activeAction.icon && /* @__PURE__ */ React11.createElement(activeAction.icon, {
|
|
614
|
+
className: getSize5(5)
|
|
615
|
+
}), /* @__PURE__ */ React11.createElement("span", null, activeAction.label)), /* @__PURE__ */ React11.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Trigger, {
|
|
878
616
|
asChild: true
|
|
879
|
-
}, /* @__PURE__ */
|
|
617
|
+
}, /* @__PURE__ */ React11.createElement(Button5, {
|
|
880
618
|
classNames: [
|
|
881
619
|
"bs-11 flex-none rounded-is-none",
|
|
882
620
|
classNames
|
|
883
621
|
],
|
|
884
622
|
"data-testid": dropdownTestId
|
|
885
|
-
}, /* @__PURE__ */
|
|
623
|
+
}, /* @__PURE__ */ React11.createElement("span", {
|
|
886
624
|
className: "sr-only"
|
|
887
|
-
}, t("invite options label")), /* @__PURE__ */
|
|
888
|
-
className:
|
|
889
|
-
}))), /* @__PURE__ */
|
|
890
|
-
return /* @__PURE__ */
|
|
625
|
+
}, t("invite options label")), /* @__PURE__ */ React11.createElement(CaretDown, {
|
|
626
|
+
className: getSize5(4)
|
|
627
|
+
}))), /* @__PURE__ */ React11.createElement(DropdownMenu2.Portal, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Content, null, /* @__PURE__ */ React11.createElement(DropdownMenu2.Viewport, null, Object.entries(actions).map(([id, action]) => {
|
|
628
|
+
return /* @__PURE__ */ React11.createElement(DropdownMenu2.CheckboxItem, {
|
|
891
629
|
key: id,
|
|
892
630
|
"aria-labelledby": `${id}__label`,
|
|
893
631
|
"aria-describedby": `${id}__description`,
|
|
@@ -895,27 +633,27 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
895
633
|
onCheckedChange: (checked) => checked && setActiveAction(id),
|
|
896
634
|
classNames: "gap-2",
|
|
897
635
|
"data-testid": action.testId
|
|
898
|
-
}, action.icon && /* @__PURE__ */
|
|
899
|
-
className:
|
|
900
|
-
}), /* @__PURE__ */
|
|
636
|
+
}, action.icon && /* @__PURE__ */ React11.createElement(action.icon, {
|
|
637
|
+
className: getSize5(5)
|
|
638
|
+
}), /* @__PURE__ */ React11.createElement("div", {
|
|
901
639
|
role: "none",
|
|
902
640
|
className: "flex-1 min-is-0 space-b-1"
|
|
903
|
-
}, /* @__PURE__ */
|
|
641
|
+
}, /* @__PURE__ */ React11.createElement("p", {
|
|
904
642
|
id: `${id}__label`
|
|
905
|
-
}, action.label), action.description && /* @__PURE__ */
|
|
643
|
+
}, action.label), action.description && /* @__PURE__ */ React11.createElement("p", {
|
|
906
644
|
id: `${id}__description`,
|
|
907
645
|
className: descriptionText5
|
|
908
|
-
}, action.description)), /* @__PURE__ */
|
|
646
|
+
}, action.description)), /* @__PURE__ */ React11.createElement(DropdownMenu2.ItemIndicator, {
|
|
909
647
|
asChild: true
|
|
910
|
-
}, /* @__PURE__ */
|
|
648
|
+
}, /* @__PURE__ */ React11.createElement(Check, {
|
|
911
649
|
weight: "bold",
|
|
912
|
-
className:
|
|
650
|
+
className: getSize5(4)
|
|
913
651
|
})));
|
|
914
|
-
})), /* @__PURE__ */
|
|
652
|
+
})), /* @__PURE__ */ React11.createElement(DropdownMenu2.Arrow, null)))));
|
|
915
653
|
});
|
|
916
654
|
var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
917
655
|
const { children, classNames, variant, isFull = true, ...rest } = props;
|
|
918
|
-
return /* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ React11.createElement(Button5, {
|
|
919
657
|
...rest,
|
|
920
658
|
classNames: [
|
|
921
659
|
isFull && "is-full",
|
|
@@ -928,49 +666,49 @@ var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
928
666
|
});
|
|
929
667
|
|
|
930
668
|
// packages/sdk/shell/src/components/Panel/Actions.tsx
|
|
931
|
-
import
|
|
932
|
-
import { mx as
|
|
669
|
+
import React12, { forwardRef as forwardRef4 } from "react";
|
|
670
|
+
import { mx as mx10 } from "@dxos/react-ui-theme";
|
|
933
671
|
var Actions = /* @__PURE__ */ forwardRef4(({ classNames, children, ...props }, forwardedRef) => {
|
|
934
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ React12.createElement("div", {
|
|
935
673
|
...props,
|
|
936
|
-
className:
|
|
674
|
+
className: mx10("flex flex-col gap-2 mbs-2", Array.isArray(children) && children.length > 1 ? "justify-between" : "justify-center", classNames),
|
|
937
675
|
ref: forwardedRef
|
|
938
676
|
}, children);
|
|
939
677
|
});
|
|
940
678
|
|
|
941
679
|
// packages/sdk/shell/src/components/Panel/CloseButton.tsx
|
|
942
680
|
import { X as X2 } from "@phosphor-icons/react";
|
|
943
|
-
import
|
|
944
|
-
import { Button as
|
|
945
|
-
import { getSize as
|
|
681
|
+
import React13 from "react";
|
|
682
|
+
import { Button as Button6, useTranslation as useTranslation7 } from "@dxos/react-ui";
|
|
683
|
+
import { getSize as getSize6, mx as mx11 } from "@dxos/react-ui-theme";
|
|
946
684
|
var CloseButton = ({ onDone, ...props }) => {
|
|
947
|
-
const { t } =
|
|
948
|
-
return /* @__PURE__ */
|
|
685
|
+
const { t } = useTranslation7("os");
|
|
686
|
+
return /* @__PURE__ */ React13.createElement(Button6, {
|
|
949
687
|
variant: "ghost",
|
|
950
|
-
classNames:
|
|
688
|
+
classNames: mx11("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
|
|
951
689
|
onClick: () => onDone?.(),
|
|
952
690
|
...props
|
|
953
|
-
}, /* @__PURE__ */
|
|
691
|
+
}, /* @__PURE__ */ React13.createElement(X2, {
|
|
954
692
|
weight: "bold",
|
|
955
|
-
className:
|
|
956
|
-
}), /* @__PURE__ */
|
|
693
|
+
className: getSize6(4)
|
|
694
|
+
}), /* @__PURE__ */ React13.createElement("span", {
|
|
957
695
|
className: "sr-only"
|
|
958
696
|
}, t("exit label")));
|
|
959
697
|
};
|
|
960
698
|
|
|
961
699
|
// packages/sdk/shell/src/components/Panel/Emoji.tsx
|
|
962
|
-
import
|
|
963
|
-
import { mx as
|
|
700
|
+
import React14 from "react";
|
|
701
|
+
import { mx as mx12, getSize as getSize7 } from "@dxos/react-ui-theme";
|
|
964
702
|
var Emoji = ({ text, className }) => {
|
|
965
703
|
const size = 14;
|
|
966
|
-
return /* @__PURE__ */
|
|
704
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
967
705
|
role: "none",
|
|
968
|
-
className:
|
|
969
|
-
}, /* @__PURE__ */
|
|
706
|
+
className: mx12(getSize7(size), "rounded relative pointer-events-none", className)
|
|
707
|
+
}, /* @__PURE__ */ React14.createElement("svg", {
|
|
970
708
|
viewBox: `0 0 ${size * 4} ${size * 4}`,
|
|
971
709
|
width: size * 4,
|
|
972
710
|
height: size * 4
|
|
973
|
-
}, /* @__PURE__ */
|
|
711
|
+
}, /* @__PURE__ */ React14.createElement("text", {
|
|
974
712
|
x: "50%",
|
|
975
713
|
y: "50%",
|
|
976
714
|
textAnchor: "middle",
|
|
@@ -981,57 +719,57 @@ var Emoji = ({ text, className }) => {
|
|
|
981
719
|
};
|
|
982
720
|
var Centered = (props) => {
|
|
983
721
|
const { children } = props;
|
|
984
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
985
723
|
role: "none",
|
|
986
724
|
className: "absolute inset-0 flex items-center justify-center"
|
|
987
725
|
}, children);
|
|
988
726
|
};
|
|
989
727
|
|
|
990
728
|
// packages/sdk/shell/src/components/Panel/Heading.tsx
|
|
991
|
-
import
|
|
992
|
-
import { descriptionText as descriptionText6, mx as
|
|
729
|
+
import React15, { forwardRef as forwardRef5 } from "react";
|
|
730
|
+
import { descriptionText as descriptionText6, mx as mx13 } from "@dxos/react-ui-theme";
|
|
993
731
|
var Heading = /* @__PURE__ */ forwardRef5(({ titleId, title, titleSrOnly, children, corner }, forwardedRef) => {
|
|
994
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ React15.createElement("div", {
|
|
995
733
|
role: "none",
|
|
996
734
|
className: "pbe-2 relative",
|
|
997
735
|
ref: forwardedRef
|
|
998
|
-
}, corner, /* @__PURE__ */
|
|
736
|
+
}, corner, /* @__PURE__ */ React15.createElement("h1", {
|
|
999
737
|
...!titleSrOnly && {
|
|
1000
738
|
id: titleId
|
|
1001
739
|
},
|
|
1002
|
-
className:
|
|
1003
|
-
}, title), titleSrOnly && /* @__PURE__ */
|
|
740
|
+
className: mx13(descriptionText6, "text-center mlb-2", titleSrOnly && "invisible")
|
|
741
|
+
}, title), titleSrOnly && /* @__PURE__ */ React15.createElement("span", {
|
|
1004
742
|
id: titleId
|
|
1005
743
|
}, title), children);
|
|
1006
744
|
});
|
|
1007
745
|
|
|
1008
746
|
// packages/sdk/shell/src/components/Panel/Label.tsx
|
|
1009
|
-
import
|
|
1010
|
-
import { descriptionText as descriptionText7, mx as
|
|
747
|
+
import React16 from "react";
|
|
748
|
+
import { descriptionText as descriptionText7, mx as mx14 } from "@dxos/react-ui-theme";
|
|
1011
749
|
var Label = (props) => {
|
|
1012
750
|
const { children } = props;
|
|
1013
|
-
return /* @__PURE__ */
|
|
1014
|
-
className:
|
|
751
|
+
return /* @__PURE__ */ React16.createElement("span", {
|
|
752
|
+
className: mx14(descriptionText7, "text-center mli-6 whitespace-normal")
|
|
1015
753
|
}, children);
|
|
1016
754
|
};
|
|
1017
755
|
|
|
1018
756
|
// packages/sdk/shell/src/components/Panel/Input.tsx
|
|
1019
|
-
import
|
|
757
|
+
import React17 from "react";
|
|
1020
758
|
import { Input as UiInput } from "@dxos/react-ui";
|
|
1021
759
|
var Input = ({ validationMessage, label, ...props }) => {
|
|
1022
|
-
return /* @__PURE__ */
|
|
760
|
+
return /* @__PURE__ */ React17.createElement(UiInput.Root, null, /* @__PURE__ */ React17.createElement(UiInput.Label, null, label), /* @__PURE__ */ React17.createElement(UiInput.TextInput, {
|
|
1023
761
|
...props,
|
|
1024
762
|
classNames: "plb-3 mbs-2 text-center"
|
|
1025
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ React17.createElement(UiInput.DescriptionAndValidation, null, validationMessage && /* @__PURE__ */ React17.createElement(UiInput.Validation, null, validationMessage)));
|
|
1026
764
|
};
|
|
1027
765
|
|
|
1028
766
|
// packages/sdk/shell/src/components/Panel/StepHeading.tsx
|
|
1029
|
-
import
|
|
1030
|
-
import { mx as
|
|
767
|
+
import React18, { forwardRef as forwardRef6 } from "react";
|
|
768
|
+
import { mx as mx15 } from "@dxos/react-ui-theme";
|
|
1031
769
|
var StepHeading = /* @__PURE__ */ forwardRef6(({ children, className, ...props }, forwardedRef) => {
|
|
1032
|
-
return /* @__PURE__ */
|
|
770
|
+
return /* @__PURE__ */ React18.createElement("h2", {
|
|
1033
771
|
...props,
|
|
1034
|
-
className:
|
|
772
|
+
className: mx15("font-normal text-sm mbe-4 mli-1 text-center", className),
|
|
1035
773
|
ref: forwardedRef
|
|
1036
774
|
}, children);
|
|
1037
775
|
});
|
|
@@ -1039,31 +777,31 @@ var StepHeading = /* @__PURE__ */ forwardRef6(({ children, className, ...props }
|
|
|
1039
777
|
// packages/sdk/shell/src/components/Viewport/Viewport.tsx
|
|
1040
778
|
import { useFocusFinders } from "@fluentui/react-tabster";
|
|
1041
779
|
import { createContextScope } from "@radix-ui/react-context";
|
|
1042
|
-
import { useControllableState as
|
|
1043
|
-
import
|
|
780
|
+
import { useControllableState as useControllableState2 } from "@radix-ui/react-use-controllable-state";
|
|
781
|
+
import React19, { forwardRef as forwardRef7, useEffect } from "react";
|
|
1044
782
|
import { useForwardedRef } from "@dxos/react-ui";
|
|
1045
|
-
import { mx as
|
|
783
|
+
import { mx as mx16 } from "@dxos/react-ui-theme";
|
|
1046
784
|
var VIEWPORT_NAME = "Viewport";
|
|
1047
785
|
var VIEWS_NAME = "ViewportViews";
|
|
1048
786
|
var VIEW_NAME = "ViewportView";
|
|
1049
787
|
var [createViewportContext, createViewportScope] = createContextScope(VIEWPORT_NAME, []);
|
|
1050
788
|
var [ViewportProvider, useViewportContext] = createViewportContext(VIEWPORT_NAME);
|
|
1051
789
|
var ViewportRoot = ({ __viewportScope, classNames, children, defaultActiveView, activeView: propsActiveView, focusManaged = false, onActiveViewChange, ...props }) => {
|
|
1052
|
-
const [activeView = "never", setActiveView] =
|
|
790
|
+
const [activeView = "never", setActiveView] = useControllableState2({
|
|
1053
791
|
prop: propsActiveView,
|
|
1054
792
|
defaultProp: defaultActiveView,
|
|
1055
793
|
onChange: onActiveViewChange
|
|
1056
794
|
});
|
|
1057
|
-
return /* @__PURE__ */
|
|
795
|
+
return /* @__PURE__ */ React19.createElement(ViewportProvider, {
|
|
1058
796
|
focusManaged,
|
|
1059
797
|
activeView,
|
|
1060
798
|
setActiveView,
|
|
1061
799
|
scope: __viewportScope
|
|
1062
|
-
}, /* @__PURE__ */
|
|
800
|
+
}, /* @__PURE__ */ React19.createElement("div", {
|
|
1063
801
|
role: "region",
|
|
1064
802
|
"aria-live": "polite",
|
|
1065
803
|
...props,
|
|
1066
|
-
className:
|
|
804
|
+
className: mx16("is-full overflow-hidden", classNames)
|
|
1067
805
|
}, children));
|
|
1068
806
|
};
|
|
1069
807
|
ViewportRoot.displayName = VIEWPORT_NAME;
|
|
@@ -1071,11 +809,11 @@ var ViewportViews = ({ classNames, children, ...props }) => {
|
|
|
1071
809
|
const size = {
|
|
1072
810
|
inlineSize: `${Math.ceil(children.length) * 100}%`
|
|
1073
811
|
};
|
|
1074
|
-
return /* @__PURE__ */
|
|
812
|
+
return /* @__PURE__ */ React19.createElement("div", {
|
|
1075
813
|
role: "none",
|
|
1076
814
|
style: size,
|
|
1077
815
|
...props,
|
|
1078
|
-
className:
|
|
816
|
+
className: mx16("flex", classNames)
|
|
1079
817
|
}, children);
|
|
1080
818
|
};
|
|
1081
819
|
ViewportViews.displayName = VIEWS_NAME;
|
|
@@ -1093,12 +831,12 @@ var ViewportView = /* @__PURE__ */ forwardRef7(({ __viewportScope, classNames, c
|
|
|
1093
831
|
ref.current,
|
|
1094
832
|
isActive
|
|
1095
833
|
]);
|
|
1096
|
-
return /* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ React19.createElement("section", {
|
|
1097
835
|
...props,
|
|
1098
836
|
...!isActive && {
|
|
1099
837
|
"aria-hidden": true
|
|
1100
838
|
},
|
|
1101
|
-
className:
|
|
839
|
+
className: mx16("min-is-0 flex-1 flex flex-col", isActive ? "order-2" : "order-4 invisible", classNames),
|
|
1102
840
|
ref
|
|
1103
841
|
}, children);
|
|
1104
842
|
});
|
|
@@ -1110,43 +848,45 @@ var Viewport = {
|
|
|
1110
848
|
};
|
|
1111
849
|
|
|
1112
850
|
// packages/sdk/shell/src/components/SpaceListItem.tsx
|
|
1113
|
-
import
|
|
851
|
+
import React20, { forwardRef as forwardRef8 } from "react";
|
|
1114
852
|
import { Avatar as Avatar5, useId as useId4 } from "@dxos/react-ui";
|
|
1115
|
-
import { mx as
|
|
853
|
+
import { mx as mx17 } from "@dxos/react-ui-theme";
|
|
1116
854
|
import { humanize, keyToEmoji } from "@dxos/util";
|
|
1117
855
|
var SpaceListItem = /* @__PURE__ */ forwardRef8(({ space, onClick }, ref) => {
|
|
1118
856
|
const fallbackValue = keyToEmoji(space.key);
|
|
1119
857
|
const labelId = useId4("identityListItem__label");
|
|
1120
858
|
const displayName = space.properties.name ?? humanize(space.key.toHex());
|
|
1121
|
-
return /* @__PURE__ */
|
|
1122
|
-
className:
|
|
859
|
+
return /* @__PURE__ */ React20.createElement("li", {
|
|
860
|
+
className: mx17("flex gap-2 items-center mbe-2", onClick && "cursor-pointer"),
|
|
1123
861
|
onClick: () => onClick?.(),
|
|
1124
862
|
ref,
|
|
1125
863
|
"data-testid": "space-list-item"
|
|
1126
|
-
}, /* @__PURE__ */
|
|
864
|
+
}, /* @__PURE__ */ React20.createElement(Avatar5.Root, {
|
|
1127
865
|
labelId
|
|
1128
|
-
}, /* @__PURE__ */
|
|
866
|
+
}, /* @__PURE__ */ React20.createElement(Avatar5.Frame, null, /* @__PURE__ */ React20.createElement(Avatar5.Fallback, {
|
|
1129
867
|
text: fallbackValue
|
|
1130
|
-
})), /* @__PURE__ */
|
|
868
|
+
})), /* @__PURE__ */ React20.createElement(Avatar5.Label, {
|
|
1131
869
|
classNames: "text-sm truncate"
|
|
1132
870
|
}, displayName)));
|
|
1133
871
|
});
|
|
1134
872
|
|
|
1135
873
|
// packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
|
|
1136
|
-
import
|
|
1137
|
-
import { Clipboard as
|
|
874
|
+
import React38 from "react";
|
|
875
|
+
import { Clipboard as Clipboard4, Dialog, useId as useId10 } from "@dxos/react-ui";
|
|
1138
876
|
|
|
1139
877
|
// packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
|
|
1140
|
-
import {
|
|
1141
|
-
import
|
|
878
|
+
import { IdentificationCard, Plugs, PlugsConnected } from "@phosphor-icons/react";
|
|
879
|
+
import React25, { useEffect as useEffect4, useMemo as useMemo3, useState as useState5 } from "react";
|
|
880
|
+
import { debounce } from "@dxos/async";
|
|
1142
881
|
import { generateName as generateName3 } from "@dxos/display-name";
|
|
1143
882
|
import { log as log7 } from "@dxos/log";
|
|
1144
883
|
import { useClient as useClient6 } from "@dxos/react-client";
|
|
1145
884
|
import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
|
|
1146
885
|
import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
|
|
1147
886
|
import { useNetworkStatus, ConnectionState as ConnectionState2 } from "@dxos/react-client/mesh";
|
|
1148
|
-
import { Avatar as Avatar6,
|
|
1149
|
-
import {
|
|
887
|
+
import { Avatar as Avatar6, Clipboard as Clipboard3, Input as Input2, Toolbar, Tooltip as Tooltip3, useId as useId6, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
888
|
+
import { EmojiPickerToolbarButton, HuePicker as HuePicker2 } from "@dxos/react-ui-pickers";
|
|
889
|
+
import { errorText, getSize as getSize10 } from "@dxos/react-ui-theme";
|
|
1150
890
|
import { hexToEmoji as hexToEmoji4, hexToHue as hexToHue2, keyToFallback as keyToFallback3 } from "@dxos/util";
|
|
1151
891
|
|
|
1152
892
|
// packages/sdk/shell/src/panels/IdentityPanel/identityMachine.ts
|
|
@@ -1262,7 +1002,7 @@ var useIdentityMachine = (client, options) => {
|
|
|
1262
1002
|
};
|
|
1263
1003
|
|
|
1264
1004
|
// packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
|
|
1265
|
-
import
|
|
1005
|
+
import React21 from "react";
|
|
1266
1006
|
import { log as log2 } from "@dxos/log";
|
|
1267
1007
|
import { useClient as useClient2 } from "@dxos/react-client";
|
|
1268
1008
|
import { useHaloInvitations, DeviceType as DeviceType2 } from "@dxos/react-client/halo";
|
|
@@ -1298,7 +1038,7 @@ var IdentityActionChooser = (props) => {
|
|
|
1298
1038
|
});
|
|
1299
1039
|
};
|
|
1300
1040
|
const isProduction = client.config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production";
|
|
1301
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ React21.createElement(IdentityActionChooserImpl, {
|
|
1302
1042
|
...props,
|
|
1303
1043
|
onClickAdd: createInvitation,
|
|
1304
1044
|
onClickJoinExisting: () => send?.({
|
|
@@ -1314,10 +1054,10 @@ var IdentityActionChooser = (props) => {
|
|
|
1314
1054
|
};
|
|
1315
1055
|
var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }) => {
|
|
1316
1056
|
const edgeDeviceAvailable = devices.find((device) => device.profile?.type === DeviceType2.AGENT_MANAGED && device.profile?.os?.toUpperCase() === "EDGE");
|
|
1317
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ React21.createElement("div", {
|
|
1318
1058
|
role: "none",
|
|
1319
1059
|
className: "bs-40 grow overflow-y-auto"
|
|
1320
|
-
}, /* @__PURE__ */
|
|
1060
|
+
}, /* @__PURE__ */ React21.createElement(DeviceList, {
|
|
1321
1061
|
devices,
|
|
1322
1062
|
connectionState,
|
|
1323
1063
|
onClickAdd,
|
|
@@ -1325,20 +1065,21 @@ var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled
|
|
|
1325
1065
|
onClickRecover: agentProps.agentStatus === "created" ? onClickRecover : void 0,
|
|
1326
1066
|
onClickReset,
|
|
1327
1067
|
onAgentDestroy: agentProps.onAgentDestroy
|
|
1328
|
-
}), !edgeDeviceAvailable && agentHostingEnabled && /* @__PURE__ */
|
|
1068
|
+
}), !edgeDeviceAvailable && agentHostingEnabled && /* @__PURE__ */ React21.createElement(AgentConfig, agentProps));
|
|
1329
1069
|
};
|
|
1330
1070
|
|
|
1331
1071
|
// packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
|
|
1332
|
-
import
|
|
1072
|
+
import React22, { useState } from "react";
|
|
1333
1073
|
import { log as log3 } from "@dxos/log";
|
|
1334
|
-
import { useClipboard, useTranslation as
|
|
1074
|
+
import { useClipboard, useTranslation as useTranslation8 } from "@dxos/react-ui";
|
|
1075
|
+
import { EmojiPickerBlock, HuePicker } from "@dxos/react-ui-pickers";
|
|
1335
1076
|
import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
|
|
1336
1077
|
|
|
1337
1078
|
// packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
|
|
1338
1079
|
import { useClient as useClient5 } from "@dxos/react-client";
|
|
1339
1080
|
|
|
1340
1081
|
// packages/sdk/shell/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts
|
|
1341
|
-
import { useEffect as useEffect2, useState as
|
|
1082
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
1342
1083
|
import { invariant } from "@dxos/invariant";
|
|
1343
1084
|
import { log as log4 } from "@dxos/log";
|
|
1344
1085
|
import { QueryAgentStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
@@ -1346,9 +1087,9 @@ import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata
|
|
|
1346
1087
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
1347
1088
|
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts";
|
|
1348
1089
|
var useEdgeAgentHandlers = ({ identity }) => {
|
|
1349
|
-
const [validationMessage, setValidationMessage] =
|
|
1350
|
-
const [lastReceivedStatus, setLastReceivedStatus] =
|
|
1351
|
-
const [agentStatus, setAgentStatus] =
|
|
1090
|
+
const [validationMessage, setValidationMessage] = useState2("");
|
|
1091
|
+
const [lastReceivedStatus, setLastReceivedStatus] = useState2(QueryAgentStatusResponse.AgentStatus.UNKNOWN);
|
|
1092
|
+
const [agentStatus, setAgentStatus] = useState2("getting");
|
|
1352
1093
|
const client = useClient3();
|
|
1353
1094
|
const agentHostingEnabled = Boolean(client.config.values.runtime?.client?.edgeFeatures?.agents);
|
|
1354
1095
|
const handleStatus = (status) => {
|
|
@@ -1434,15 +1175,15 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1434
1175
|
};
|
|
1435
1176
|
|
|
1436
1177
|
// packages/sdk/shell/src/panels/IdentityPanel/useKubeAgentHandlers.ts
|
|
1437
|
-
import { useCallback as useCallback3, useEffect as useEffect3, useState as
|
|
1178
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useState as useState3 } from "react";
|
|
1438
1179
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
1439
1180
|
import { log as log5 } from "@dxos/log";
|
|
1440
1181
|
import { useClient as useClient4, useAgentHostingClient } from "@dxos/react-client";
|
|
1441
1182
|
import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
|
|
1442
1183
|
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useKubeAgentHandlers.ts";
|
|
1443
1184
|
var useKubeAgentHandlers = ({ invitations, identity }) => {
|
|
1444
|
-
const [validationMessage, setValidationMessage] =
|
|
1445
|
-
const [agentStatus, setAgentStatus] =
|
|
1185
|
+
const [validationMessage, setValidationMessage] = useState3("");
|
|
1186
|
+
const [agentStatus, setAgentStatus] = useState3("getting");
|
|
1446
1187
|
const agentHostingProviderClient = useAgentHostingClient();
|
|
1447
1188
|
const client = useClient4();
|
|
1448
1189
|
const updateAgentStatus = async () => {
|
|
@@ -1571,11 +1312,11 @@ var useAgentHandlers = (params) => {
|
|
|
1571
1312
|
};
|
|
1572
1313
|
|
|
1573
1314
|
// packages/sdk/shell/src/steps/InvitationManager.tsx
|
|
1574
|
-
import { Check as
|
|
1575
|
-
import
|
|
1315
|
+
import { Check as Check2, X as X3 } from "@phosphor-icons/react";
|
|
1316
|
+
import React23, { useMemo as useMemo2 } from "react";
|
|
1576
1317
|
import { QR } from "react-qr-rounded";
|
|
1577
|
-
import { Clipboard as Clipboard2, useId as useId5, useTranslation as
|
|
1578
|
-
import { descriptionText as descriptionText8, getSize as
|
|
1318
|
+
import { Clipboard as Clipboard2, useId as useId5, useTranslation as useTranslation9 } from "@dxos/react-ui";
|
|
1319
|
+
import { descriptionText as descriptionText8, getSize as getSize8, mx as mx18 } from "@dxos/react-ui-theme";
|
|
1579
1320
|
import { hexToEmoji as hexToEmoji3 } from "@dxos/util";
|
|
1580
1321
|
|
|
1581
1322
|
// packages/sdk/shell/src/util/invitationStatusValue.ts
|
|
@@ -1621,13 +1362,13 @@ var invitationStatusValue = /* @__PURE__ */ new Map([
|
|
|
1621
1362
|
|
|
1622
1363
|
// packages/sdk/shell/src/steps/InvitationManager.tsx
|
|
1623
1364
|
var InvitationManagerView = ({ children, ...props }) => {
|
|
1624
|
-
return /* @__PURE__ */
|
|
1365
|
+
return /* @__PURE__ */ React23.createElement(Viewport.View, {
|
|
1625
1366
|
...props,
|
|
1626
1367
|
classNames: "grow flex flex-col justify-around items-center"
|
|
1627
1368
|
}, children);
|
|
1628
1369
|
};
|
|
1629
1370
|
var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCode, id = "0" }) => {
|
|
1630
|
-
const { t } =
|
|
1371
|
+
const { t } = useTranslation9("os");
|
|
1631
1372
|
const qrLabel = useId5("invitation-manager__qr-code");
|
|
1632
1373
|
const statusValue = multiUse ? 0 : invitationStatusValue.get(status) ?? 0;
|
|
1633
1374
|
const showAuthCode = statusValue === 3;
|
|
@@ -1648,50 +1389,50 @@ var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCo
|
|
|
1648
1389
|
}, [
|
|
1649
1390
|
statusValue
|
|
1650
1391
|
]);
|
|
1651
|
-
return /* @__PURE__ */
|
|
1392
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Viewport.Root, {
|
|
1652
1393
|
activeView,
|
|
1653
1394
|
classNames: "grow plb-1"
|
|
1654
|
-
}, /* @__PURE__ */
|
|
1395
|
+
}, /* @__PURE__ */ React23.createElement(Viewport.Views, null, /* @__PURE__ */ React23.createElement(InvitationManagerView, {
|
|
1655
1396
|
id: "showing qr",
|
|
1656
1397
|
emoji
|
|
1657
|
-
}, /* @__PURE__ */
|
|
1398
|
+
}, /* @__PURE__ */ React23.createElement("p", {
|
|
1658
1399
|
className: "text-sm mlb-1 font-normal text-center"
|
|
1659
|
-
}, t(multiUse ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */
|
|
1400
|
+
}, t(multiUse ? "invite many qr label" : "invite one qr label")), /* @__PURE__ */ React23.createElement("div", {
|
|
1660
1401
|
role: "none",
|
|
1661
|
-
className:
|
|
1662
|
-
}, /* @__PURE__ */
|
|
1402
|
+
className: mx18(descriptionText8, "is-full max-is-[14rem] relative")
|
|
1403
|
+
}, /* @__PURE__ */ React23.createElement(QR, {
|
|
1663
1404
|
rounding: 100,
|
|
1664
1405
|
backgroundColor: "transparent",
|
|
1665
1406
|
color: "currentColor",
|
|
1666
|
-
className:
|
|
1407
|
+
className: mx18("is-full bs-full p-2", showAuthCode && "invisible"),
|
|
1667
1408
|
"aria-labelledby": qrLabel,
|
|
1668
1409
|
errorCorrectionLevel: "Q",
|
|
1669
1410
|
cutout: true
|
|
1670
|
-
}, invitationUrl ?? "never"), /* @__PURE__ */
|
|
1411
|
+
}, invitationUrl ?? "never"), /* @__PURE__ */ React23.createElement(Centered, null, /* @__PURE__ */ React23.createElement(Emoji, {
|
|
1671
1412
|
text: emoji
|
|
1672
|
-
}))), /* @__PURE__ */
|
|
1413
|
+
}))), /* @__PURE__ */ React23.createElement("span", {
|
|
1673
1414
|
id: qrLabel,
|
|
1674
1415
|
className: "sr-only"
|
|
1675
|
-
}, t("qr label")), /* @__PURE__ */
|
|
1416
|
+
}, t("qr label")), /* @__PURE__ */ React23.createElement(Clipboard2.Button, {
|
|
1676
1417
|
variant: "ghost",
|
|
1677
1418
|
value: invitationUrl ?? "never"
|
|
1678
|
-
})), /* @__PURE__ */
|
|
1419
|
+
})), /* @__PURE__ */ React23.createElement(InvitationManagerView, {
|
|
1679
1420
|
id: "showing auth code"
|
|
1680
|
-
}, /* @__PURE__ */
|
|
1421
|
+
}, /* @__PURE__ */ React23.createElement(Label, null, t("auth code message")), /* @__PURE__ */ React23.createElement(AuthCode, {
|
|
1681
1422
|
code: authCode,
|
|
1682
1423
|
large: true,
|
|
1683
1424
|
classNames: "text-black dark:text-white"
|
|
1684
|
-
}), /* @__PURE__ */
|
|
1425
|
+
}), /* @__PURE__ */ React23.createElement(Label, null, t("auth other device emoji message")), emoji && /* @__PURE__ */ React23.createElement(Emoji, {
|
|
1685
1426
|
text: emoji
|
|
1686
|
-
})), /* @__PURE__ */
|
|
1427
|
+
})), /* @__PURE__ */ React23.createElement(InvitationManagerView, {
|
|
1687
1428
|
id: "showing final"
|
|
1688
|
-
}, statusValue > 0 ? /* @__PURE__ */
|
|
1689
|
-
className:
|
|
1690
|
-
}) : /* @__PURE__ */
|
|
1691
|
-
className:
|
|
1692
|
-
})))), /* @__PURE__ */
|
|
1429
|
+
}, statusValue > 0 ? /* @__PURE__ */ React23.createElement(Check2, {
|
|
1430
|
+
className: mx18("m-1.5", getSize8(6))
|
|
1431
|
+
}) : /* @__PURE__ */ React23.createElement(X3, {
|
|
1432
|
+
className: mx18("m-1.5", getSize8(6))
|
|
1433
|
+
})))), /* @__PURE__ */ React23.createElement(Actions, {
|
|
1693
1434
|
classNames: "mbs-4"
|
|
1694
|
-
}, /* @__PURE__ */
|
|
1435
|
+
}, /* @__PURE__ */ React23.createElement(Action, {
|
|
1695
1436
|
disabled: !active,
|
|
1696
1437
|
onClick: () => send?.({
|
|
1697
1438
|
type: "deselectInvitation"
|
|
@@ -1701,15 +1442,15 @@ var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCo
|
|
|
1701
1442
|
|
|
1702
1443
|
// packages/sdk/shell/src/steps/ConfirmReset.tsx
|
|
1703
1444
|
import { Warning } from "@phosphor-icons/react";
|
|
1704
|
-
import
|
|
1445
|
+
import React24, { useState as useState4 } from "react";
|
|
1705
1446
|
import { log as log6 } from "@dxos/log";
|
|
1706
|
-
import { Message, useTranslation as
|
|
1707
|
-
import { getSize as
|
|
1447
|
+
import { Message, useTranslation as useTranslation10 } from "@dxos/react-ui";
|
|
1448
|
+
import { getSize as getSize9, mx as mx19 } from "@dxos/react-ui-theme";
|
|
1708
1449
|
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
|
|
1709
1450
|
var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
|
|
1710
|
-
const { t } =
|
|
1711
|
-
const [validationMessage, setValidationMessage] =
|
|
1712
|
-
const [pending, setPending] =
|
|
1451
|
+
const { t } = useTranslation10("os");
|
|
1452
|
+
const [validationMessage, setValidationMessage] = useState4("");
|
|
1453
|
+
const [pending, setPending] = useState4(false);
|
|
1713
1454
|
const processReset = async () => {
|
|
1714
1455
|
setPending(true);
|
|
1715
1456
|
return onConfirm?.().then(() => setPending(false), (error) => {
|
|
@@ -1723,7 +1464,7 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
|
|
|
1723
1464
|
setPending(false);
|
|
1724
1465
|
});
|
|
1725
1466
|
};
|
|
1726
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ React24.createElement(ConfirmResetImpl, {
|
|
1727
1468
|
disabled: !active,
|
|
1728
1469
|
pending,
|
|
1729
1470
|
validationMessage,
|
|
@@ -1733,20 +1474,20 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
|
|
|
1733
1474
|
});
|
|
1734
1475
|
};
|
|
1735
1476
|
var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCancel, mode }) => {
|
|
1736
|
-
const { t } =
|
|
1477
|
+
const { t } = useTranslation10("os");
|
|
1737
1478
|
const confirmationValue = t("confirmation value");
|
|
1738
|
-
const [inputValue, setInputValue] =
|
|
1479
|
+
const [inputValue, setInputValue] = useState4("");
|
|
1739
1480
|
const testIdAffix = mode === "join new identity" ? "join-new-identity" : mode === "recover" ? "recover" : "reset-storage";
|
|
1740
|
-
return /* @__PURE__ */
|
|
1481
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", {
|
|
1741
1482
|
role: "none",
|
|
1742
1483
|
className: "grow flex flex-col gap-2 justify-center"
|
|
1743
|
-
}, /* @__PURE__ */
|
|
1484
|
+
}, /* @__PURE__ */ React24.createElement(Message.Root, {
|
|
1744
1485
|
valence: "error"
|
|
1745
|
-
}, /* @__PURE__ */
|
|
1746
|
-
className:
|
|
1747
|
-
}), t("sign out chooser title")), /* @__PURE__ */
|
|
1486
|
+
}, /* @__PURE__ */ React24.createElement(Message.Title, null, /* @__PURE__ */ React24.createElement(Warning, {
|
|
1487
|
+
className: mx19(getSize9(6), "inline mie-2")
|
|
1488
|
+
}), t("sign out chooser title")), /* @__PURE__ */ React24.createElement(Message.Body, null, t("sign out chooser message"))), /* @__PURE__ */ React24.createElement(Input, {
|
|
1748
1489
|
validationMessage,
|
|
1749
|
-
label: /* @__PURE__ */
|
|
1490
|
+
label: /* @__PURE__ */ React24.createElement(StepHeading, {
|
|
1750
1491
|
className: "text-start mlb-2"
|
|
1751
1492
|
}, t(mode === "join new identity" ? "join new identity input label" : mode === "recover" ? "recover reset input label" : "reset storage input label", {
|
|
1752
1493
|
confirmationValue
|
|
@@ -1757,11 +1498,11 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
|
|
|
1757
1498
|
confirmationValue
|
|
1758
1499
|
}),
|
|
1759
1500
|
onChange: ({ target: { value } }) => setInputValue(value)
|
|
1760
|
-
})), /* @__PURE__ */
|
|
1501
|
+
})), /* @__PURE__ */ React24.createElement(Actions, null, onCancel && /* @__PURE__ */ React24.createElement(Action, {
|
|
1761
1502
|
disabled,
|
|
1762
1503
|
onClick: onCancel,
|
|
1763
1504
|
"data-testid": `${testIdAffix}.reset-identity-cancel`
|
|
1764
|
-
}, t("cancel label")), onConfirm && /* @__PURE__ */
|
|
1505
|
+
}, t("cancel label")), onConfirm && /* @__PURE__ */ React24.createElement(Action, {
|
|
1765
1506
|
variant: "destructive",
|
|
1766
1507
|
disabled: disabled || pending || inputValue !== confirmationValue,
|
|
1767
1508
|
onClick: onConfirm,
|
|
@@ -1774,15 +1515,23 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
|
|
|
1774
1515
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1775
1516
|
var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
|
|
1776
1517
|
var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
|
|
1777
|
-
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1518
|
+
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState, onManageCredentials }) => {
|
|
1778
1519
|
const fallbackValue = keyToFallback3(identity.identityKey);
|
|
1779
|
-
const { t } =
|
|
1780
|
-
const [displayName,
|
|
1781
|
-
const [emoji, setEmojiDirectly] =
|
|
1782
|
-
const [hue, setHueDirectly] =
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1785
|
-
|
|
1520
|
+
const { t } = useTranslation11("os");
|
|
1521
|
+
const [displayName, setDisplayNameDirectly] = useState5(identity.profile?.displayName ?? "");
|
|
1522
|
+
const [emoji, setEmojiDirectly] = useState5(getEmojiValue(identity));
|
|
1523
|
+
const [hue, setHueDirectly] = useState5(getHueValue(identity));
|
|
1524
|
+
const updateDisplayName = useMemo3(() => debounce((nextDisplayName) => onUpdateProfile?.({
|
|
1525
|
+
...identity.profile,
|
|
1526
|
+
displayName: nextDisplayName
|
|
1527
|
+
}), 3e3), [
|
|
1528
|
+
onUpdateProfile,
|
|
1529
|
+
identity.profile
|
|
1530
|
+
]);
|
|
1531
|
+
const setDisplayName = (nextDisplayName) => {
|
|
1532
|
+
setDisplayNameDirectly(nextDisplayName);
|
|
1533
|
+
updateDisplayName(nextDisplayName);
|
|
1534
|
+
};
|
|
1786
1535
|
const setEmoji = (nextEmoji) => {
|
|
1787
1536
|
setEmojiDirectly(nextEmoji);
|
|
1788
1537
|
void onUpdateProfile?.({
|
|
@@ -1804,82 +1553,83 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1804
1553
|
});
|
|
1805
1554
|
};
|
|
1806
1555
|
const isConnected = connectionState === ConnectionState2.ONLINE;
|
|
1807
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ React25.createElement(Heading, {
|
|
1808
1557
|
titleId,
|
|
1809
1558
|
title,
|
|
1810
|
-
corner: /* @__PURE__ */
|
|
1559
|
+
corner: /* @__PURE__ */ React25.createElement(CloseButton, {
|
|
1811
1560
|
onDone
|
|
1812
1561
|
})
|
|
1813
|
-
}, /* @__PURE__ */
|
|
1562
|
+
}, /* @__PURE__ */ React25.createElement(Avatar6.Root, {
|
|
1814
1563
|
size: 16,
|
|
1815
1564
|
variant: "circle",
|
|
1816
1565
|
status: isConnected ? "active" : "error",
|
|
1817
1566
|
hue: hue || fallbackValue.hue
|
|
1818
|
-
}, /* @__PURE__ */
|
|
1567
|
+
}, /* @__PURE__ */ React25.createElement(Toolbar.Root, {
|
|
1819
1568
|
classNames: "flex justify-center"
|
|
1820
|
-
}, /* @__PURE__ */
|
|
1569
|
+
}, /* @__PURE__ */ React25.createElement(Avatar6.Frame, {
|
|
1821
1570
|
classNames: "relative z-[2] -mli-4 chromatic-ignore"
|
|
1822
|
-
}, /* @__PURE__ */
|
|
1571
|
+
}, /* @__PURE__ */ React25.createElement(Avatar6.Fallback, {
|
|
1823
1572
|
text: emoji || fallbackValue.emoji
|
|
1824
|
-
}))), /* @__PURE__ */
|
|
1573
|
+
}))), /* @__PURE__ */ React25.createElement(Avatar6.Label, {
|
|
1825
1574
|
classNames: "sr-only",
|
|
1826
1575
|
"data-testid": "identityHeading.displayName"
|
|
1827
|
-
}, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex())), /* @__PURE__ */
|
|
1576
|
+
}, identity.profile?.displayName ?? generateName3(identity.identityKey.toHex())), /* @__PURE__ */ React25.createElement(Input2.Root, null, /* @__PURE__ */ React25.createElement(Input2.Label, {
|
|
1828
1577
|
srOnly: true
|
|
1829
|
-
}, t("display name input label")), /* @__PURE__ */
|
|
1578
|
+
}, t("display name input label")), /* @__PURE__ */ React25.createElement(Input2.TextInput, {
|
|
1830
1579
|
variant: "subdued",
|
|
1831
1580
|
"data-testid": "display-name-input",
|
|
1832
1581
|
placeholder: t("display name input placeholder"),
|
|
1833
1582
|
classNames: "mbs-2 text-center font-light text-xl",
|
|
1834
1583
|
value: displayName,
|
|
1835
|
-
onChange: ({ target: { value } }) => setDisplayName(value)
|
|
1836
|
-
|
|
1837
|
-
...identity.profile,
|
|
1838
|
-
displayName: value
|
|
1839
|
-
})
|
|
1840
|
-
})), /* @__PURE__ */ React27.createElement(Toolbar3.Root, {
|
|
1584
|
+
onChange: ({ target: { value } }) => setDisplayName(value)
|
|
1585
|
+
})), /* @__PURE__ */ React25.createElement(Toolbar.Root, {
|
|
1841
1586
|
classNames: "flex justify-center items-center gap-1 pt-3"
|
|
1842
|
-
}, /* @__PURE__ */
|
|
1587
|
+
}, /* @__PURE__ */ React25.createElement(EmojiPickerToolbarButton, {
|
|
1843
1588
|
emoji,
|
|
1844
1589
|
onChangeEmoji: setEmoji,
|
|
1845
1590
|
classNames: "bs-[--rail-action]"
|
|
1846
|
-
}), /* @__PURE__ */
|
|
1847
|
-
hue,
|
|
1848
|
-
|
|
1591
|
+
}), /* @__PURE__ */ React25.createElement(HuePicker2, {
|
|
1592
|
+
value: hue,
|
|
1593
|
+
onChange: setHue,
|
|
1594
|
+
onReset: () => setHue(void 0),
|
|
1849
1595
|
classNames: "bs-[--rail-action]"
|
|
1850
|
-
}), /* @__PURE__ */
|
|
1851
|
-
asChild: true
|
|
1852
|
-
}, /* @__PURE__ */ React27.createElement(Toolbar3.Button, {
|
|
1596
|
+
}), /* @__PURE__ */ React25.createElement(Clipboard3.IconButton, {
|
|
1853
1597
|
classNames: "bs-[--rail-action]",
|
|
1854
1598
|
"data-testid": "update-profile-form-copy-key",
|
|
1855
|
-
|
|
1856
|
-
|
|
1599
|
+
label: t("copy self did label"),
|
|
1600
|
+
value: identity.did
|
|
1601
|
+
}), onManageCredentials && /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
|
|
1602
|
+
asChild: true
|
|
1603
|
+
}, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
|
|
1604
|
+
classNames: "bs-[--rail-action]",
|
|
1605
|
+
onClick: onManageCredentials
|
|
1606
|
+
}, /* @__PURE__ */ React25.createElement("span", {
|
|
1857
1607
|
className: "sr-only"
|
|
1858
|
-
}, t(
|
|
1859
|
-
className:
|
|
1860
|
-
}))), /* @__PURE__ */
|
|
1608
|
+
}, t("manage credentials label")), /* @__PURE__ */ React25.createElement(IdentificationCard, {
|
|
1609
|
+
className: getSize10(5)
|
|
1610
|
+
}))), /* @__PURE__ */ React25.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React25.createElement(Tooltip3.Content, {
|
|
1861
1611
|
side: "bottom"
|
|
1862
|
-
}, t(
|
|
1612
|
+
}, t("manage credentials label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))), /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
|
|
1863
1613
|
asChild: true
|
|
1864
|
-
}, /* @__PURE__ */
|
|
1614
|
+
}, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
|
|
1865
1615
|
classNames: [
|
|
1866
1616
|
"bs-[--rail-action]",
|
|
1867
|
-
!isConnected &&
|
|
1617
|
+
!isConnected && errorText
|
|
1868
1618
|
],
|
|
1869
1619
|
onClick: () => onChangeConnectionState?.(isConnected ? ConnectionState2.OFFLINE : ConnectionState2.ONLINE)
|
|
1870
|
-
}, /* @__PURE__ */
|
|
1620
|
+
}, /* @__PURE__ */ React25.createElement("span", {
|
|
1871
1621
|
className: "sr-only"
|
|
1872
|
-
}, t(isConnected ? "disconnect label" : "connect label")), isConnected ? /* @__PURE__ */
|
|
1873
|
-
className:
|
|
1874
|
-
}) : /* @__PURE__ */
|
|
1875
|
-
className:
|
|
1876
|
-
}))), /* @__PURE__ */
|
|
1622
|
+
}, t(isConnected ? "disconnect label" : "connect label")), isConnected ? /* @__PURE__ */ React25.createElement(PlugsConnected, {
|
|
1623
|
+
className: getSize10(5)
|
|
1624
|
+
}) : /* @__PURE__ */ React25.createElement(Plugs, {
|
|
1625
|
+
className: getSize10(5)
|
|
1626
|
+
}))), /* @__PURE__ */ React25.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React25.createElement(Tooltip3.Content, {
|
|
1877
1627
|
side: "bottom"
|
|
1878
|
-
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */
|
|
1628
|
+
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))))));
|
|
1879
1629
|
};
|
|
1880
1630
|
var IdentityPanelImpl = (props) => {
|
|
1881
|
-
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
|
|
1882
|
-
const { t } =
|
|
1631
|
+
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, onManageCredentials, ...rest } = props;
|
|
1632
|
+
const { t } = useTranslation11("os");
|
|
1883
1633
|
const title = useMemo3(() => {
|
|
1884
1634
|
switch (activeView) {
|
|
1885
1635
|
case "device invitation manager":
|
|
@@ -1893,7 +1643,7 @@ var IdentityPanelImpl = (props) => {
|
|
|
1893
1643
|
]);
|
|
1894
1644
|
const onCancelReset = () => rest.send?.("unchooseAction");
|
|
1895
1645
|
const hideRecover = rest.agentStatus !== "created";
|
|
1896
|
-
return /* @__PURE__ */
|
|
1646
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(IdentityHeading, {
|
|
1897
1647
|
identity,
|
|
1898
1648
|
titleId,
|
|
1899
1649
|
title,
|
|
@@ -1901,45 +1651,46 @@ var IdentityPanelImpl = (props) => {
|
|
|
1901
1651
|
onDone,
|
|
1902
1652
|
onUpdateProfile,
|
|
1903
1653
|
connectionState,
|
|
1904
|
-
onChangeConnectionState
|
|
1905
|
-
|
|
1654
|
+
onChangeConnectionState,
|
|
1655
|
+
onManageCredentials
|
|
1656
|
+
}), /* @__PURE__ */ React25.createElement(Viewport.Root, {
|
|
1906
1657
|
activeView
|
|
1907
|
-
}, /* @__PURE__ */
|
|
1658
|
+
}, /* @__PURE__ */ React25.createElement(Viewport.Views, null, /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
1908
1659
|
id: "identity action chooser",
|
|
1909
1660
|
classNames: viewStyles
|
|
1910
|
-
}, /* @__PURE__ */
|
|
1661
|
+
}, /* @__PURE__ */ React25.createElement(IdentityActionChooserComponent, {
|
|
1911
1662
|
active: activeView === "identity action chooser",
|
|
1912
1663
|
...rest,
|
|
1913
1664
|
connectionState
|
|
1914
|
-
})), /* @__PURE__ */
|
|
1665
|
+
})), /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
1915
1666
|
id: "device invitation manager",
|
|
1916
1667
|
classNames: viewStyles
|
|
1917
|
-
}, /* @__PURE__ */
|
|
1668
|
+
}, /* @__PURE__ */ React25.createElement(InvitationManagerComponent, {
|
|
1918
1669
|
active: activeView === "device invitation manager",
|
|
1919
1670
|
...rest,
|
|
1920
1671
|
invitationUrl: rest.createInvitationUrl(rest.invitationCode)
|
|
1921
|
-
})), /* @__PURE__ */
|
|
1672
|
+
})), /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
1922
1673
|
classNames: viewStyles,
|
|
1923
1674
|
id: "confirm join new identity"
|
|
1924
|
-
}, /* @__PURE__ */
|
|
1675
|
+
}, /* @__PURE__ */ React25.createElement(ConfirmReset, {
|
|
1925
1676
|
active: activeView === "confirm join new identity",
|
|
1926
1677
|
...rest,
|
|
1927
1678
|
mode: "join new identity",
|
|
1928
1679
|
onConfirm: onJoinNewIdentity,
|
|
1929
1680
|
onCancel: onCancelReset
|
|
1930
|
-
})), /* @__PURE__ */
|
|
1681
|
+
})), /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
1931
1682
|
classNames: viewStyles,
|
|
1932
1683
|
id: "confirm recover"
|
|
1933
|
-
}, /* @__PURE__ */
|
|
1684
|
+
}, /* @__PURE__ */ React25.createElement(ConfirmReset, {
|
|
1934
1685
|
active: activeView === "confirm recover",
|
|
1935
1686
|
...rest,
|
|
1936
1687
|
mode: "recover",
|
|
1937
1688
|
onConfirm: onRecover,
|
|
1938
1689
|
onCancel: onCancelReset
|
|
1939
|
-
})), /* @__PURE__ */
|
|
1690
|
+
})), /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
1940
1691
|
classNames: viewStyles,
|
|
1941
1692
|
id: "confirm reset storage"
|
|
1942
|
-
}, /* @__PURE__ */
|
|
1693
|
+
}, /* @__PURE__ */ React25.createElement(ConfirmReset, {
|
|
1943
1694
|
active: activeView === "confirm reset storage",
|
|
1944
1695
|
...rest,
|
|
1945
1696
|
mode: "reset storage",
|
|
@@ -1949,7 +1700,7 @@ var IdentityPanelImpl = (props) => {
|
|
|
1949
1700
|
};
|
|
1950
1701
|
var IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
|
|
1951
1702
|
const invitationStatus = useInvitationStatus2(invitation);
|
|
1952
|
-
return /* @__PURE__ */
|
|
1703
|
+
return /* @__PURE__ */ React25.createElement(IdentityPanelImpl, {
|
|
1953
1704
|
...props,
|
|
1954
1705
|
...invitationStatus
|
|
1955
1706
|
});
|
|
@@ -1967,7 +1718,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1967
1718
|
if (!identity) {
|
|
1968
1719
|
log7.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
1969
1720
|
F: __dxlog_file6,
|
|
1970
|
-
L:
|
|
1721
|
+
L: 272,
|
|
1971
1722
|
S: void 0,
|
|
1972
1723
|
C: (f, a) => f(...a)
|
|
1973
1724
|
});
|
|
@@ -1984,7 +1735,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1984
1735
|
const subscription = identityService.subscribe((state) => {
|
|
1985
1736
|
log7("[state]", state, {
|
|
1986
1737
|
F: __dxlog_file6,
|
|
1987
|
-
L:
|
|
1738
|
+
L: 285,
|
|
1988
1739
|
S: void 0,
|
|
1989
1740
|
C: (f, a) => f(...a)
|
|
1990
1741
|
});
|
|
@@ -2030,40 +1781,40 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
2030
1781
|
onChangeConnectionState: handleChangeConnectionState,
|
|
2031
1782
|
...agentProps
|
|
2032
1783
|
};
|
|
2033
|
-
return identityState.context.invitation ? /* @__PURE__ */
|
|
1784
|
+
return identityState.context.invitation ? /* @__PURE__ */ React25.createElement(IdentityPanelWithInvitationImpl, {
|
|
2034
1785
|
...implProps,
|
|
2035
1786
|
invitation: identityState.context.invitation
|
|
2036
|
-
}) : /* @__PURE__ */
|
|
1787
|
+
}) : /* @__PURE__ */ React25.createElement(IdentityPanelImpl, implProps);
|
|
2037
1788
|
};
|
|
2038
1789
|
|
|
2039
1790
|
// packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
|
|
2040
|
-
import
|
|
1791
|
+
import React34, { useCallback as useCallback6, useEffect as useEffect6, useMemo as useMemo4 } from "react";
|
|
2041
1792
|
import { log as log11 } from "@dxos/log";
|
|
2042
1793
|
import { useClient as useClient8, useMulticastObservable } from "@dxos/react-client";
|
|
2043
1794
|
import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
|
|
2044
|
-
import { useId as useId8, useThemeContext as
|
|
1795
|
+
import { useId as useId8, useThemeContext as useThemeContext3 } from "@dxos/react-ui";
|
|
2045
1796
|
|
|
2046
1797
|
// packages/sdk/shell/src/panels/JoinPanel/JoinHeading.tsx
|
|
2047
1798
|
import { X as X4 } from "@phosphor-icons/react";
|
|
2048
|
-
import
|
|
2049
|
-
import { Button as
|
|
2050
|
-
import { descriptionText as descriptionText9, getSize as
|
|
1799
|
+
import React26, { cloneElement, forwardRef as forwardRef9 } from "react";
|
|
1800
|
+
import { Button as Button7, useTranslation as useTranslation12 } from "@dxos/react-ui";
|
|
1801
|
+
import { descriptionText as descriptionText9, getSize as getSize11, mx as mx20 } from "@dxos/react-ui-theme";
|
|
2051
1802
|
var JoinHeading = /* @__PURE__ */ forwardRef9(({ mode, titleId, exitActionParent, onExit }, forwardedRef) => {
|
|
2052
|
-
const { t } =
|
|
2053
|
-
const exitButton = /* @__PURE__ */
|
|
1803
|
+
const { t } = useTranslation12("os");
|
|
1804
|
+
const exitButton = /* @__PURE__ */ React26.createElement(Button7, {
|
|
2054
1805
|
variant: "ghost",
|
|
2055
1806
|
...onExit && {
|
|
2056
1807
|
onClick: onExit
|
|
2057
1808
|
},
|
|
2058
|
-
classNames:
|
|
1809
|
+
classNames: mx20(descriptionText9, "plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),
|
|
2059
1810
|
"data-testid": "join-exit"
|
|
2060
|
-
}, /* @__PURE__ */
|
|
1811
|
+
}, /* @__PURE__ */ React26.createElement(X4, {
|
|
2061
1812
|
weight: "bold",
|
|
2062
|
-
className:
|
|
2063
|
-
}), /* @__PURE__ */
|
|
1813
|
+
className: getSize11(4)
|
|
1814
|
+
}), /* @__PURE__ */ React26.createElement("span", {
|
|
2064
1815
|
className: "sr-only"
|
|
2065
1816
|
}, t("exit label")));
|
|
2066
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ React26.createElement(Heading, {
|
|
2067
1818
|
ref: forwardedRef,
|
|
2068
1819
|
titleId,
|
|
2069
1820
|
title: t(mode === "halo-only" ? "selecting identity heading" : "joining space heading"),
|
|
@@ -2681,17 +2432,17 @@ var useJoinMachine = (client, options) => {
|
|
|
2681
2432
|
|
|
2682
2433
|
// packages/sdk/shell/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx
|
|
2683
2434
|
import { CaretRight as CaretRight2, Plus as Plus3, QrCode, Textbox } from "@phosphor-icons/react";
|
|
2684
|
-
import
|
|
2685
|
-
import { useTranslation as
|
|
2686
|
-
import { getSize as
|
|
2435
|
+
import React27 from "react";
|
|
2436
|
+
import { useTranslation as useTranslation13 } from "@dxos/react-ui";
|
|
2437
|
+
import { getSize as getSize12 } from "@dxos/react-ui-theme";
|
|
2687
2438
|
var AdditionMethodChooser = (viewStateProps) => {
|
|
2688
2439
|
const disabled = !viewStateProps.active;
|
|
2689
2440
|
const { send } = viewStateProps;
|
|
2690
|
-
const { t } =
|
|
2441
|
+
const { t } = useTranslation13("os");
|
|
2691
2442
|
const sharedButtonProps = {
|
|
2692
2443
|
disabled,
|
|
2693
|
-
after: /* @__PURE__ */
|
|
2694
|
-
className:
|
|
2444
|
+
after: /* @__PURE__ */ React27.createElement(CaretRight2, {
|
|
2445
|
+
className: getSize12(4),
|
|
2695
2446
|
weight: "bold"
|
|
2696
2447
|
}),
|
|
2697
2448
|
slots: {
|
|
@@ -2700,35 +2451,35 @@ var AdditionMethodChooser = (viewStateProps) => {
|
|
|
2700
2451
|
}
|
|
2701
2452
|
}
|
|
2702
2453
|
};
|
|
2703
|
-
return /* @__PURE__ */
|
|
2454
|
+
return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(StepHeading, null, t("addition method chooser title")), /* @__PURE__ */ React27.createElement("div", {
|
|
2704
2455
|
role: "none",
|
|
2705
2456
|
className: "flex flex-col gap-1 grow"
|
|
2706
|
-
}, /* @__PURE__ */
|
|
2457
|
+
}, /* @__PURE__ */ React27.createElement(CompoundButton, {
|
|
2707
2458
|
...sharedButtonProps,
|
|
2708
2459
|
description: t("create identity description"),
|
|
2709
|
-
before: /* @__PURE__ */
|
|
2710
|
-
className:
|
|
2460
|
+
before: /* @__PURE__ */ React27.createElement(Plus3, {
|
|
2461
|
+
className: getSize12(6)
|
|
2711
2462
|
}),
|
|
2712
2463
|
onClick: () => send({
|
|
2713
2464
|
type: "createIdentity"
|
|
2714
2465
|
}),
|
|
2715
2466
|
"data-autofocus": "choosingAuthMethod",
|
|
2716
2467
|
"data-testid": "identity-chooser.create-identity"
|
|
2717
|
-
}, t("create identity label")), /* @__PURE__ */
|
|
2468
|
+
}, t("create identity label")), /* @__PURE__ */ React27.createElement(CompoundButton, {
|
|
2718
2469
|
...sharedButtonProps,
|
|
2719
2470
|
description: t("join identity description"),
|
|
2720
|
-
before: /* @__PURE__ */
|
|
2721
|
-
className:
|
|
2471
|
+
before: /* @__PURE__ */ React27.createElement(QrCode, {
|
|
2472
|
+
className: getSize12(6)
|
|
2722
2473
|
}),
|
|
2723
2474
|
onClick: () => send({
|
|
2724
2475
|
type: "acceptHaloInvitation"
|
|
2725
2476
|
}),
|
|
2726
2477
|
"data-testid": "identity-chooser.join-identity"
|
|
2727
|
-
}, t("join identity label")), /* @__PURE__ */
|
|
2478
|
+
}, t("join identity label")), /* @__PURE__ */ React27.createElement(CompoundButton, {
|
|
2728
2479
|
...sharedButtonProps,
|
|
2729
2480
|
description: t("recover identity description"),
|
|
2730
|
-
before: /* @__PURE__ */
|
|
2731
|
-
className:
|
|
2481
|
+
before: /* @__PURE__ */ React27.createElement(Textbox, {
|
|
2482
|
+
className: getSize12(6)
|
|
2732
2483
|
}),
|
|
2733
2484
|
onClick: () => send({
|
|
2734
2485
|
type: "recoverIdentity"
|
|
@@ -2738,39 +2489,39 @@ var AdditionMethodChooser = (viewStateProps) => {
|
|
|
2738
2489
|
};
|
|
2739
2490
|
|
|
2740
2491
|
// packages/sdk/shell/src/panels/JoinPanel/steps/IdentityAdded.tsx
|
|
2741
|
-
import
|
|
2492
|
+
import React28, { cloneElement as cloneElement2 } from "react";
|
|
2742
2493
|
import { generateName as generateName4 } from "@dxos/display-name";
|
|
2743
|
-
import { Avatar as Avatar7, useId as useId7, useTranslation as
|
|
2744
|
-
import { mx as
|
|
2494
|
+
import { Avatar as Avatar7, useId as useId7, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
2495
|
+
import { mx as mx21 } from "@dxos/react-ui-theme";
|
|
2745
2496
|
import { hexToFallback } from "@dxos/util";
|
|
2746
2497
|
var IdentityAdded = (props) => {
|
|
2747
2498
|
const { mode, addedIdentity, active, send, onDone, doneActionParent } = props;
|
|
2748
2499
|
const disabled = !active;
|
|
2749
|
-
const { t } =
|
|
2500
|
+
const { t } = useTranslation14("os");
|
|
2750
2501
|
const addedIdentityHex = addedIdentity?.identityKey.toHex() ?? "0";
|
|
2751
2502
|
const fallbackValue = hexToFallback(addedIdentityHex);
|
|
2752
2503
|
const labelId = useId7("identityListItem__label");
|
|
2753
2504
|
const displayName = addedIdentity?.profile?.displayName ?? (addedIdentity && generateName4(addedIdentityHex));
|
|
2754
|
-
const doneAction = /* @__PURE__ */
|
|
2505
|
+
const doneAction = /* @__PURE__ */ React28.createElement(Action, {
|
|
2755
2506
|
...onDone && {
|
|
2756
2507
|
onClick: () => onDone(null)
|
|
2757
2508
|
},
|
|
2758
2509
|
disabled,
|
|
2759
2510
|
"data-autofocus": "confirmingAddedIdentity",
|
|
2760
2511
|
"data-testid": "identity-added-done"
|
|
2761
|
-
}, /* @__PURE__ */
|
|
2762
|
-
return /* @__PURE__ */
|
|
2512
|
+
}, /* @__PURE__ */ React28.createElement("span", null, t("done label")));
|
|
2513
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(StepHeading, null, t("identity added label")), /* @__PURE__ */ React28.createElement("div", {
|
|
2763
2514
|
role: "none",
|
|
2764
2515
|
className: "grow flex flex-col items-center justify-center text-center gap-2"
|
|
2765
|
-
}, /* @__PURE__ */
|
|
2516
|
+
}, /* @__PURE__ */ React28.createElement(Avatar7.Root, {
|
|
2766
2517
|
status: "active",
|
|
2767
2518
|
labelId,
|
|
2768
2519
|
hue: addedIdentity?.profile?.data?.hue || fallbackValue.hue
|
|
2769
|
-
}, /* @__PURE__ */
|
|
2520
|
+
}, /* @__PURE__ */ React28.createElement(Avatar7.Frame, null, /* @__PURE__ */ React28.createElement(Avatar7.Fallback, {
|
|
2770
2521
|
text: addedIdentity?.profile?.data?.emoji || fallbackValue.emoji
|
|
2771
|
-
})), /* @__PURE__ */
|
|
2772
|
-
classNames:
|
|
2773
|
-
}, displayName))), /* @__PURE__ */
|
|
2522
|
+
})), /* @__PURE__ */ React28.createElement(Avatar7.Label, {
|
|
2523
|
+
classNames: mx21("text-lg truncate", !addedIdentity?.profile?.displayName && "font-mono")
|
|
2524
|
+
}, displayName))), /* @__PURE__ */ React28.createElement(Actions, null, mode === "halo-only" ? doneActionParent ? /* @__PURE__ */ cloneElement2(doneActionParent, {}, doneAction) : doneAction : /* @__PURE__ */ React28.createElement(Action, {
|
|
2774
2525
|
variant: "primary",
|
|
2775
2526
|
disabled: disabled || !addedIdentity,
|
|
2776
2527
|
onClick: () => addedIdentity && send({
|
|
@@ -2782,21 +2533,21 @@ var IdentityAdded = (props) => {
|
|
|
2782
2533
|
};
|
|
2783
2534
|
|
|
2784
2535
|
// packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
|
|
2785
|
-
import
|
|
2536
|
+
import React29, { useCallback as useCallback5, useState as useState6 } from "react";
|
|
2786
2537
|
import { log as log9 } from "@dxos/log";
|
|
2787
2538
|
import { useClient as useClient7 } from "@dxos/react-client";
|
|
2788
|
-
import { useTranslation as
|
|
2539
|
+
import { useTranslation as useTranslation15 } from "@dxos/react-ui";
|
|
2789
2540
|
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
|
|
2790
2541
|
var IdentityInput = (props) => {
|
|
2791
2542
|
const { send, method } = props;
|
|
2792
2543
|
const isRecover = method === "recover identity";
|
|
2793
2544
|
const client = useClient7();
|
|
2794
|
-
const { t } =
|
|
2795
|
-
const [validationMessage, setValidationMessage] =
|
|
2545
|
+
const { t } = useTranslation15("os");
|
|
2546
|
+
const [validationMessage, setValidationMessage] = useState6("");
|
|
2796
2547
|
const handleConfirm = async (value) => {
|
|
2797
2548
|
if (isRecover) {
|
|
2798
2549
|
await client.halo.recoverIdentity({
|
|
2799
|
-
|
|
2550
|
+
recoveryCode: value
|
|
2800
2551
|
}).then((identity) => {
|
|
2801
2552
|
send?.({
|
|
2802
2553
|
type: "selectIdentity",
|
|
@@ -2830,7 +2581,7 @@ var IdentityInput = (props) => {
|
|
|
2830
2581
|
});
|
|
2831
2582
|
}
|
|
2832
2583
|
};
|
|
2833
|
-
return /* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ React29.createElement(IdentityInputImpl, {
|
|
2834
2585
|
...props,
|
|
2835
2586
|
onConfirm: handleConfirm,
|
|
2836
2587
|
validationMessage
|
|
@@ -2838,9 +2589,9 @@ var IdentityInput = (props) => {
|
|
|
2838
2589
|
};
|
|
2839
2590
|
var IdentityInputImpl = (props) => {
|
|
2840
2591
|
const { method, active, onConfirm, validationMessage } = props;
|
|
2841
|
-
const { t } =
|
|
2842
|
-
const [inputValue, setInputValue] =
|
|
2843
|
-
const [pending, setPending] =
|
|
2592
|
+
const { t } = useTranslation15("os");
|
|
2593
|
+
const [inputValue, setInputValue] = useState6("");
|
|
2594
|
+
const [pending, setPending] = useState6(false);
|
|
2844
2595
|
const disabled = !active || pending;
|
|
2845
2596
|
const isRecover = method === "recover identity";
|
|
2846
2597
|
const handleConfirm = useCallback5(async () => {
|
|
@@ -2851,17 +2602,17 @@ var IdentityInputImpl = (props) => {
|
|
|
2851
2602
|
onConfirm,
|
|
2852
2603
|
inputValue
|
|
2853
2604
|
]);
|
|
2854
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement("div", {
|
|
2855
2606
|
role: "none",
|
|
2856
2607
|
className: "grow flex flex-col justify-center"
|
|
2857
|
-
}, /* @__PURE__ */
|
|
2608
|
+
}, /* @__PURE__ */ React29.createElement(Input, {
|
|
2858
2609
|
validationMessage,
|
|
2859
|
-
label: /* @__PURE__ */
|
|
2610
|
+
label: /* @__PURE__ */ React29.createElement(StepHeading, null, t(isRecover ? "recover identity input label" : "new identity input label")),
|
|
2860
2611
|
disabled,
|
|
2861
2612
|
"data-testid": "identity-input",
|
|
2862
2613
|
placeholder: isRecover ? t("recovery code placeholder") : t("display name placeholder"),
|
|
2863
2614
|
onChange: ({ target: { value } }) => setInputValue(value)
|
|
2864
|
-
})), /* @__PURE__ */
|
|
2615
|
+
})), /* @__PURE__ */ React29.createElement(Actions, null, /* @__PURE__ */ React29.createElement(Action, {
|
|
2865
2616
|
variant: "primary",
|
|
2866
2617
|
disabled: disabled || inputValue.trim().length === 0,
|
|
2867
2618
|
onClick: handleConfirm,
|
|
@@ -2870,13 +2621,13 @@ var IdentityInputImpl = (props) => {
|
|
|
2870
2621
|
};
|
|
2871
2622
|
|
|
2872
2623
|
// packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAccepted.tsx
|
|
2873
|
-
import
|
|
2874
|
-
import { useTranslation as
|
|
2624
|
+
import React30, { cloneElement as cloneElement3 } from "react";
|
|
2625
|
+
import { useTranslation as useTranslation16 } from "@dxos/react-ui";
|
|
2875
2626
|
|
|
2876
2627
|
// packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
|
|
2877
|
-
import
|
|
2628
|
+
import React31, { useState as useState7, useEffect as useEffect5, cloneElement as cloneElement4 } from "react";
|
|
2878
2629
|
import { log as log10 } from "@dxos/log";
|
|
2879
|
-
import { useTranslation as
|
|
2630
|
+
import { useTranslation as useTranslation17 } from "@dxos/react-ui";
|
|
2880
2631
|
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
|
|
2881
2632
|
var invitationCodeFromUrl = (text) => {
|
|
2882
2633
|
try {
|
|
@@ -2896,8 +2647,8 @@ var invitationCodeFromUrl = (text) => {
|
|
|
2896
2647
|
var InvitationInput = (props) => {
|
|
2897
2648
|
const { Kind, active, send, unredeemedCode, onExit, exitActionParent, onDone, doneActionParent, succeededKeys } = props;
|
|
2898
2649
|
const disabled = !active;
|
|
2899
|
-
const { t } =
|
|
2900
|
-
const [inputValue, setInputValue] =
|
|
2650
|
+
const { t } = useTranslation17("os");
|
|
2651
|
+
const [inputValue, setInputValue] = useState7(unredeemedCode ?? "");
|
|
2901
2652
|
useEffect5(() => {
|
|
2902
2653
|
unredeemedCode && setInputValue(unredeemedCode ?? "");
|
|
2903
2654
|
}, [
|
|
@@ -2915,7 +2666,7 @@ var InvitationInput = (props) => {
|
|
|
2915
2666
|
}
|
|
2916
2667
|
});
|
|
2917
2668
|
};
|
|
2918
|
-
const exitAction = /* @__PURE__ */
|
|
2669
|
+
const exitAction = /* @__PURE__ */ React31.createElement(Action, {
|
|
2919
2670
|
variant: "ghost",
|
|
2920
2671
|
disabled,
|
|
2921
2672
|
...onExit ? {
|
|
@@ -2925,11 +2676,11 @@ var InvitationInput = (props) => {
|
|
|
2925
2676
|
},
|
|
2926
2677
|
"data-testid": "join-exit"
|
|
2927
2678
|
}, t("cancel label"));
|
|
2928
|
-
return /* @__PURE__ */
|
|
2679
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement("div", {
|
|
2929
2680
|
role: "none",
|
|
2930
2681
|
className: "grow flex flex-col justify-center"
|
|
2931
|
-
}, /* @__PURE__ */
|
|
2932
|
-
label: /* @__PURE__ */
|
|
2682
|
+
}, /* @__PURE__ */ React31.createElement(Input, {
|
|
2683
|
+
label: /* @__PURE__ */ React31.createElement(StepHeading, null, t("invitation input label")),
|
|
2933
2684
|
placeholder: t("invitation input placeholder"),
|
|
2934
2685
|
disabled,
|
|
2935
2686
|
value: inputValue,
|
|
@@ -2937,7 +2688,7 @@ var InvitationInput = (props) => {
|
|
|
2937
2688
|
"data-autofocus": `inputting${Kind}InvitationCode`,
|
|
2938
2689
|
"data-testid": `${Kind.toLowerCase()}-invitation-input`,
|
|
2939
2690
|
onKeyUp: ({ key }) => key === "Enter" && handleNext()
|
|
2940
|
-
})), /* @__PURE__ */
|
|
2691
|
+
})), /* @__PURE__ */ React31.createElement(Actions, null, Kind === "Halo" ? null : exitActionParent ? /* @__PURE__ */ cloneElement4(exitActionParent, {}, exitAction) : doneActionParent ? /* @__PURE__ */ cloneElement4(doneActionParent, {}, exitAction) : exitAction, /* @__PURE__ */ React31.createElement(Action, {
|
|
2941
2692
|
variant: "primary",
|
|
2942
2693
|
disabled: disabled || inputValue.trim().length === 0,
|
|
2943
2694
|
onClick: handleNext,
|
|
@@ -2946,8 +2697,8 @@ var InvitationInput = (props) => {
|
|
|
2946
2697
|
};
|
|
2947
2698
|
|
|
2948
2699
|
// packages/sdk/shell/src/panels/JoinPanel/steps/InvitationRescuer.tsx
|
|
2949
|
-
import
|
|
2950
|
-
import { useTranslation as
|
|
2700
|
+
import React32 from "react";
|
|
2701
|
+
import { useTranslation as useTranslation18 } from "@dxos/react-ui";
|
|
2951
2702
|
import { descriptionText as descriptionText10 } from "@dxos/react-ui-theme";
|
|
2952
2703
|
var InvitationActions = ({
|
|
2953
2704
|
// `invitationState` does report correct state, but here we evaluate whether `failReason` is a better source of truth
|
|
@@ -2959,14 +2710,14 @@ var InvitationActions = ({
|
|
|
2959
2710
|
Kind,
|
|
2960
2711
|
failReason
|
|
2961
2712
|
}) => {
|
|
2962
|
-
const { t } =
|
|
2713
|
+
const { t } = useTranslation18("os");
|
|
2963
2714
|
if (failReason) {
|
|
2964
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StepHeading, {
|
|
2965
2716
|
className: descriptionText10
|
|
2966
|
-
}, t(failReason === "timeout" ? "timeout status label" : failReason === "cancelled" ? "cancelled status label" : "error status label")), /* @__PURE__ */
|
|
2717
|
+
}, t(failReason === "timeout" ? "timeout status label" : failReason === "cancelled" ? "cancelled status label" : "error status label")), /* @__PURE__ */ React32.createElement("div", {
|
|
2967
2718
|
role: "none",
|
|
2968
2719
|
className: "grow"
|
|
2969
|
-
}), /* @__PURE__ */
|
|
2720
|
+
}), /* @__PURE__ */ React32.createElement(Actions, null, /* @__PURE__ */ React32.createElement(Action, {
|
|
2970
2721
|
disabled: !active,
|
|
2971
2722
|
onClick: () => send({
|
|
2972
2723
|
type: `reset${Kind}Invitation`
|
|
@@ -2974,16 +2725,16 @@ var InvitationActions = ({
|
|
|
2974
2725
|
"data-testid": "invitation-rescuer-reset"
|
|
2975
2726
|
}, t("reset label"))));
|
|
2976
2727
|
} else {
|
|
2977
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StepHeading, {
|
|
2978
2729
|
className: descriptionText10
|
|
2979
|
-
}, t("connecting status label")), /* @__PURE__ */
|
|
2730
|
+
}, t("connecting status label")), /* @__PURE__ */ React32.createElement("div", {
|
|
2980
2731
|
role: "none",
|
|
2981
2732
|
className: "grow"
|
|
2982
|
-
}), /* @__PURE__ */
|
|
2733
|
+
}), /* @__PURE__ */ React32.createElement(Actions, null, /* @__PURE__ */ React32.createElement(Action, {
|
|
2983
2734
|
disabled: true,
|
|
2984
2735
|
classNames: "order-2",
|
|
2985
2736
|
"data-testid": "next"
|
|
2986
|
-
}, t("next label")), /* @__PURE__ */
|
|
2737
|
+
}, t("next label")), /* @__PURE__ */ React32.createElement(Action, {
|
|
2987
2738
|
disabled: !active,
|
|
2988
2739
|
onClick: onInvitationCancel,
|
|
2989
2740
|
"data-testid": "invitation-rescuer-cancel"
|
|
@@ -2992,52 +2743,52 @@ var InvitationActions = ({
|
|
|
2992
2743
|
};
|
|
2993
2744
|
var InvitationRescuer = (props) => {
|
|
2994
2745
|
const { Kind, invitationState, active, send } = props;
|
|
2995
|
-
const { t } =
|
|
2996
|
-
return /* @__PURE__ */
|
|
2746
|
+
const { t } = useTranslation18("os");
|
|
2747
|
+
return /* @__PURE__ */ React32.createElement(React32.Fragment, null, typeof invitationState === "undefined" ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement("div", {
|
|
2997
2748
|
role: "none",
|
|
2998
2749
|
className: "grow flex flex-col justify-center"
|
|
2999
|
-
}, /* @__PURE__ */
|
|
2750
|
+
}, /* @__PURE__ */ React32.createElement(StepHeading, {
|
|
3000
2751
|
className: descriptionText10
|
|
3001
|
-
}, "There was a problem joining the space")), /* @__PURE__ */
|
|
2752
|
+
}, "There was a problem joining the space")), /* @__PURE__ */ React32.createElement(Actions, null, /* @__PURE__ */ React32.createElement(Action, {
|
|
3002
2753
|
disabled: !active,
|
|
3003
2754
|
"data-testid": "invitation-rescuer-blank-reset",
|
|
3004
2755
|
onClick: () => send({
|
|
3005
2756
|
type: `reset${Kind}Invitation`
|
|
3006
2757
|
})
|
|
3007
|
-
}, t("reset label")))) : /* @__PURE__ */
|
|
2758
|
+
}, t("reset label")))) : /* @__PURE__ */ React32.createElement(InvitationActions, props));
|
|
3008
2759
|
};
|
|
3009
2760
|
|
|
3010
2761
|
// packages/sdk/shell/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx
|
|
3011
|
-
import
|
|
2762
|
+
import React33, { useState as useState8 } from "react";
|
|
3012
2763
|
import { Invitation as Invitation6 } from "@dxos/react-client/invitations";
|
|
3013
|
-
import { Input as Input3, useTranslation as
|
|
2764
|
+
import { Input as Input3, useTranslation as useTranslation19 } from "@dxos/react-ui";
|
|
3014
2765
|
import { descriptionText as descriptionText11 } from "@dxos/react-ui-theme";
|
|
3015
2766
|
import { hexToEmoji as hexToEmoji5 } from "@dxos/util";
|
|
3016
2767
|
var pinLength = 6;
|
|
3017
2768
|
var InvitationAuthenticator = ({ failed, Kind, authMethod, active, pending, invitationId, onInvitationAuthenticate, onInvitationCancel }) => {
|
|
3018
2769
|
const disabled = !active || pending;
|
|
3019
|
-
const { t } =
|
|
2770
|
+
const { t } = useTranslation19("os");
|
|
3020
2771
|
const invitationType = Kind.toLowerCase();
|
|
3021
|
-
const [authCode, setAuthCode] =
|
|
2772
|
+
const [authCode, setAuthCode] = useState8("");
|
|
3022
2773
|
const onChange = ({ target: { value } }) => {
|
|
3023
2774
|
setAuthCode(value);
|
|
3024
2775
|
if (value.length === pinLength) {
|
|
3025
2776
|
document.querySelector(`[data-autofocus-pinlength="${invitationType}"]`)?.focus();
|
|
3026
2777
|
}
|
|
3027
2778
|
};
|
|
3028
|
-
return /* @__PURE__ */
|
|
2779
|
+
return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("div", {
|
|
3029
2780
|
role: "none",
|
|
3030
2781
|
className: "grow flex flex-col justify-center gap-4"
|
|
3031
|
-
}, /* @__PURE__ */
|
|
2782
|
+
}, /* @__PURE__ */ React33.createElement(Input3.Root, failed && {
|
|
3032
2783
|
validationValence: "error"
|
|
3033
|
-
}, /* @__PURE__ */
|
|
2784
|
+
}, /* @__PURE__ */ React33.createElement(Input3.Label, {
|
|
3034
2785
|
asChild: true
|
|
3035
|
-
}, authMethod === Invitation6.AuthMethod.SHARED_SECRET ? /* @__PURE__ */
|
|
2786
|
+
}, authMethod === Invitation6.AuthMethod.SHARED_SECRET ? /* @__PURE__ */ React33.createElement(StepHeading, null, t("auth code input label")) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(StepHeading, {
|
|
3036
2787
|
className: descriptionText11
|
|
3037
|
-
}, t("authenticating label")), /* @__PURE__ */
|
|
2788
|
+
}, t("authenticating label")), /* @__PURE__ */ React33.createElement("div", {
|
|
3038
2789
|
role: "none",
|
|
3039
2790
|
className: "grow"
|
|
3040
|
-
}))), authMethod === Invitation6.AuthMethod.SHARED_SECRET && /* @__PURE__ */
|
|
2791
|
+
}))), authMethod === Invitation6.AuthMethod.SHARED_SECRET && /* @__PURE__ */ React33.createElement(Input3.PinInput, {
|
|
3041
2792
|
disabled,
|
|
3042
2793
|
length: pinLength,
|
|
3043
2794
|
onChange,
|
|
@@ -3048,18 +2799,18 @@ var InvitationAuthenticator = ({ failed, Kind, authMethod, active, pending, invi
|
|
|
3048
2799
|
"data-prevent-ios-autofocus": true,
|
|
3049
2800
|
"data-testid": `${invitationType}-auth-code-input`,
|
|
3050
2801
|
"data-1p-ignore": true
|
|
3051
|
-
}), failed && /* @__PURE__ */
|
|
2802
|
+
}), failed && /* @__PURE__ */ React33.createElement(Input3.DescriptionAndValidation, {
|
|
3052
2803
|
classNames: "text-center"
|
|
3053
|
-
}, /* @__PURE__ */
|
|
2804
|
+
}, /* @__PURE__ */ React33.createElement(Input3.Validation, null, t("failed to authenticate message")))), invitationId && authMethod === Invitation6.AuthMethod.SHARED_SECRET && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Label, null, t("auth other device emoji message")), /* @__PURE__ */ React33.createElement("div", {
|
|
3054
2805
|
className: "flex justify-center"
|
|
3055
|
-
}, /* @__PURE__ */
|
|
2806
|
+
}, /* @__PURE__ */ React33.createElement(Emoji, {
|
|
3056
2807
|
text: hexToEmoji5(invitationId)
|
|
3057
|
-
})))), /* @__PURE__ */
|
|
2808
|
+
})))), /* @__PURE__ */ React33.createElement(Actions, null, /* @__PURE__ */ React33.createElement(Action, {
|
|
3058
2809
|
variant: "ghost",
|
|
3059
2810
|
disabled,
|
|
3060
2811
|
onClick: () => onInvitationCancel?.(),
|
|
3061
2812
|
"data-testid": `${invitationType}-invitation-authenticator-cancel`
|
|
3062
|
-
}, t("cancel label")), /* @__PURE__ */
|
|
2813
|
+
}, t("cancel label")), /* @__PURE__ */ React33.createElement(Action, {
|
|
3063
2814
|
variant: "primary",
|
|
3064
2815
|
disabled,
|
|
3065
2816
|
onClick: () => onInvitationAuthenticate?.(authCode),
|
|
@@ -3121,46 +2872,46 @@ var JoinPanelImpl = (props) => {
|
|
|
3121
2872
|
IdentityInput: IdentityInputComponent = IdentityInput,
|
|
3122
2873
|
ConfirmReset: ConfirmResetComponent = ConfirmReset
|
|
3123
2874
|
} = props;
|
|
3124
|
-
return /* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ React34.createElement(React34.Fragment, null, mode !== "halo-only" && /* @__PURE__ */ React34.createElement(JoinHeading, {
|
|
3125
2876
|
titleId,
|
|
3126
2877
|
mode,
|
|
3127
2878
|
onExit,
|
|
3128
2879
|
exitActionParent
|
|
3129
|
-
}), /* @__PURE__ */
|
|
2880
|
+
}), /* @__PURE__ */ React34.createElement(Viewport.Root, {
|
|
3130
2881
|
focusManaged: true,
|
|
3131
2882
|
activeView
|
|
3132
|
-
}, /* @__PURE__ */
|
|
2883
|
+
}, /* @__PURE__ */ React34.createElement(Viewport.Views, null, /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3133
2884
|
classNames: stepStyles,
|
|
3134
2885
|
id: "addition method chooser"
|
|
3135
|
-
}, /* @__PURE__ */
|
|
2886
|
+
}, /* @__PURE__ */ React34.createElement(AdditionMethodChooser, {
|
|
3136
2887
|
send,
|
|
3137
2888
|
active: activeView === "addition method chooser"
|
|
3138
|
-
})), /* @__PURE__ */
|
|
2889
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3139
2890
|
classNames: stepStyles,
|
|
3140
2891
|
id: "reset storage confirmation"
|
|
3141
|
-
}, /* @__PURE__ */
|
|
2892
|
+
}, /* @__PURE__ */ React34.createElement(ConfirmResetComponent, {
|
|
3142
2893
|
send,
|
|
3143
2894
|
active: activeView === "reset storage confirmation",
|
|
3144
2895
|
onCancel: onCancelResetStorage,
|
|
3145
2896
|
onConfirm: onConfirmResetStorage
|
|
3146
|
-
})), /* @__PURE__ */
|
|
2897
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3147
2898
|
classNames: stepStyles,
|
|
3148
2899
|
id: "create identity input"
|
|
3149
|
-
}, /* @__PURE__ */
|
|
2900
|
+
}, /* @__PURE__ */ React34.createElement(IdentityInputComponent, {
|
|
3150
2901
|
send,
|
|
3151
2902
|
method: "create identity",
|
|
3152
2903
|
active: activeView === "create identity input"
|
|
3153
|
-
})), /* @__PURE__ */
|
|
2904
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3154
2905
|
classNames: stepStyles,
|
|
3155
2906
|
id: "recover identity input"
|
|
3156
|
-
}, /* @__PURE__ */
|
|
2907
|
+
}, /* @__PURE__ */ React34.createElement(IdentityInputComponent, {
|
|
3157
2908
|
send,
|
|
3158
2909
|
method: "recover identity",
|
|
3159
2910
|
active: activeView === "recover identity input"
|
|
3160
|
-
})), /* @__PURE__ */
|
|
2911
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3161
2912
|
classNames: stepStyles,
|
|
3162
2913
|
id: "halo invitation input"
|
|
3163
|
-
}, /* @__PURE__ */
|
|
2914
|
+
}, /* @__PURE__ */ React34.createElement(InvitationInput, {
|
|
3164
2915
|
send,
|
|
3165
2916
|
Kind: "Halo",
|
|
3166
2917
|
active: activeView === "halo invitation input",
|
|
@@ -3170,20 +2921,20 @@ var JoinPanelImpl = (props) => {
|
|
|
3170
2921
|
...succeededKeys?.Halo && {
|
|
3171
2922
|
succeededKeys: succeededKeys.Halo
|
|
3172
2923
|
}
|
|
3173
|
-
})), /* @__PURE__ */
|
|
2924
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3174
2925
|
classNames: stepStyles,
|
|
3175
2926
|
id: "halo invitation rescuer"
|
|
3176
|
-
}, /* @__PURE__ */
|
|
2927
|
+
}, /* @__PURE__ */ React34.createElement(InvitationRescuer, {
|
|
3177
2928
|
send,
|
|
3178
2929
|
Kind: "Halo",
|
|
3179
2930
|
active: activeView === "halo invitation rescuer",
|
|
3180
2931
|
invitationState: invitationStates?.Halo,
|
|
3181
2932
|
onInvitationCancel: onHaloInvitationCancel,
|
|
3182
2933
|
failReason: failReasons?.Halo
|
|
3183
|
-
})), /* @__PURE__ */
|
|
2934
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3184
2935
|
classNames: stepStyles,
|
|
3185
2936
|
id: "halo invitation authenticator"
|
|
3186
|
-
}, /* @__PURE__ */
|
|
2937
|
+
}, /* @__PURE__ */ React34.createElement(InvitationAuthenticator, {
|
|
3187
2938
|
send,
|
|
3188
2939
|
Kind: "Halo",
|
|
3189
2940
|
invitationId: invitationIds?.Halo,
|
|
@@ -3194,19 +2945,19 @@ var JoinPanelImpl = (props) => {
|
|
|
3194
2945
|
...failed.has("Halo") && {
|
|
3195
2946
|
failed: true
|
|
3196
2947
|
}
|
|
3197
|
-
})), /* @__PURE__ */
|
|
2948
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3198
2949
|
classNames: stepStyles,
|
|
3199
2950
|
id: "identity added"
|
|
3200
|
-
}, /* @__PURE__ */
|
|
2951
|
+
}, /* @__PURE__ */ React34.createElement(IdentityAdded, {
|
|
3201
2952
|
send,
|
|
3202
2953
|
mode,
|
|
3203
2954
|
active: activeView === "identity added",
|
|
3204
2955
|
doneActionParent,
|
|
3205
2956
|
onDone: onHaloDone
|
|
3206
|
-
})), /* @__PURE__ */
|
|
2957
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3207
2958
|
classNames: stepStyles,
|
|
3208
2959
|
id: "space invitation input"
|
|
3209
|
-
}, /* @__PURE__ */
|
|
2960
|
+
}, /* @__PURE__ */ React34.createElement(InvitationInput, {
|
|
3210
2961
|
send,
|
|
3211
2962
|
Kind: "Space",
|
|
3212
2963
|
active: activeView === "space invitation input",
|
|
@@ -3218,20 +2969,20 @@ var JoinPanelImpl = (props) => {
|
|
|
3218
2969
|
},
|
|
3219
2970
|
onExit,
|
|
3220
2971
|
exitActionParent
|
|
3221
|
-
})), /* @__PURE__ */
|
|
2972
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3222
2973
|
classNames: stepStyles,
|
|
3223
2974
|
id: "space invitation rescuer"
|
|
3224
|
-
}, /* @__PURE__ */
|
|
2975
|
+
}, /* @__PURE__ */ React34.createElement(InvitationRescuer, {
|
|
3225
2976
|
send,
|
|
3226
2977
|
Kind: "Space",
|
|
3227
2978
|
active: activeView === "space invitation rescuer",
|
|
3228
2979
|
invitationState: invitationStates?.Space,
|
|
3229
2980
|
onInvitationCancel: onSpaceInvitationCancel,
|
|
3230
2981
|
failReason: failReasons?.Space
|
|
3231
|
-
})), /* @__PURE__ */
|
|
2982
|
+
})), /* @__PURE__ */ React34.createElement(Viewport.View, {
|
|
3232
2983
|
classNames: stepStyles,
|
|
3233
2984
|
id: "space invitation authenticator"
|
|
3234
|
-
}, /* @__PURE__ */
|
|
2985
|
+
}, /* @__PURE__ */ React34.createElement(InvitationAuthenticator, {
|
|
3235
2986
|
send,
|
|
3236
2987
|
Kind: "Space",
|
|
3237
2988
|
invitationId: invitationIds?.Space,
|
|
@@ -3247,7 +2998,7 @@ var JoinPanelImpl = (props) => {
|
|
|
3247
2998
|
var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition = "default", initialInvitationCode, exitActionParent, onExit, doneActionParent, onDone: propsOnDone, onCancelResetStorage }) => {
|
|
3248
2999
|
const client = useClient8();
|
|
3249
3000
|
const identity = useIdentity2();
|
|
3250
|
-
const { hasIosKeyboard } =
|
|
3001
|
+
const { hasIosKeyboard } = useThemeContext3();
|
|
3251
3002
|
const titleId = useId8("joinPanel__heading", propsTitleId);
|
|
3252
3003
|
const [joinState, joinSend, joinService] = useJoinMachine(client, {
|
|
3253
3004
|
context: {
|
|
@@ -3509,7 +3260,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
|
|
|
3509
3260
|
client,
|
|
3510
3261
|
joinSend
|
|
3511
3262
|
]);
|
|
3512
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ React34.createElement(JoinPanelImpl, {
|
|
3513
3264
|
titleId,
|
|
3514
3265
|
mode,
|
|
3515
3266
|
send: joinSend,
|
|
@@ -3552,10 +3303,10 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
|
|
|
3552
3303
|
|
|
3553
3304
|
// packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
|
|
3554
3305
|
import { Planet } from "@phosphor-icons/react";
|
|
3555
|
-
import
|
|
3306
|
+
import React36, { useEffect as useEffect7, useMemo as useMemo5 } from "react";
|
|
3556
3307
|
import { log as log14 } from "@dxos/log";
|
|
3557
3308
|
import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
|
|
3558
|
-
import { useId as useId9, useTranslation as
|
|
3309
|
+
import { useId as useId9, useTranslation as useTranslation21 } from "@dxos/react-ui";
|
|
3559
3310
|
|
|
3560
3311
|
// packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
|
|
3561
3312
|
import { useMachine as useMachine3 } from "@xstate/react";
|
|
@@ -3621,13 +3372,13 @@ var useSpaceMachine = (options) => {
|
|
|
3621
3372
|
|
|
3622
3373
|
// packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
|
|
3623
3374
|
import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
|
|
3624
|
-
import
|
|
3375
|
+
import React35, { useCallback as useCallback7, useState as useState9 } from "react";
|
|
3625
3376
|
import { log as log13 } from "@dxos/log";
|
|
3626
3377
|
import { useConfig } from "@dxos/react-client";
|
|
3627
3378
|
import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
|
|
3628
3379
|
import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
|
|
3629
|
-
import { ScrollArea, useTranslation as
|
|
3630
|
-
import { descriptionText as descriptionText12, mx as
|
|
3380
|
+
import { ScrollArea, useTranslation as useTranslation20 } from "@dxos/react-ui";
|
|
3381
|
+
import { descriptionText as descriptionText12, mx as mx22 } from "@dxos/react-ui-theme";
|
|
3631
3382
|
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
|
|
3632
3383
|
var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
3633
3384
|
var handleInvitationEvent = (invitation, subscription) => {
|
|
@@ -3647,7 +3398,7 @@ var handleInvitationEvent = (invitation, subscription) => {
|
|
|
3647
3398
|
};
|
|
3648
3399
|
var SpaceManager = (props) => {
|
|
3649
3400
|
const { space, target } = props;
|
|
3650
|
-
const { t } =
|
|
3401
|
+
const { t } = useTranslation20("os");
|
|
3651
3402
|
const config = useConfig();
|
|
3652
3403
|
const invitations = useSpaceInvitations2(space?.key);
|
|
3653
3404
|
const inviteActions = {
|
|
@@ -3692,7 +3443,7 @@ var SpaceManager = (props) => {
|
|
|
3692
3443
|
])
|
|
3693
3444
|
}
|
|
3694
3445
|
};
|
|
3695
|
-
return /* @__PURE__ */
|
|
3446
|
+
return /* @__PURE__ */ React35.createElement(SpaceManagerImpl, {
|
|
3696
3447
|
...props,
|
|
3697
3448
|
invitations,
|
|
3698
3449
|
inviteActions
|
|
@@ -3701,7 +3452,7 @@ var SpaceManager = (props) => {
|
|
|
3701
3452
|
var headingFragment = "pis-3 pie-1 plb-1 mbe-1 font-medium";
|
|
3702
3453
|
var SpaceManagerImpl = (props) => {
|
|
3703
3454
|
const { active, space, createInvitationUrl, send, inviteActions: propsInviteActions, invitations, showInactiveInvitations, SpaceMemberList: SpaceMemberListComponent = SpaceMemberList, InvitationList: InvitationListComponent = InvitationList } = props;
|
|
3704
|
-
const { t } =
|
|
3455
|
+
const { t } = useTranslation20("os");
|
|
3705
3456
|
const inviteActions = propsInviteActions ?? {
|
|
3706
3457
|
noopInvite: {
|
|
3707
3458
|
label: t("create space invitation label"),
|
|
@@ -3711,7 +3462,7 @@ var SpaceManagerImpl = (props) => {
|
|
|
3711
3462
|
}
|
|
3712
3463
|
}
|
|
3713
3464
|
};
|
|
3714
|
-
const [activeAction, setInternalActiveAction] =
|
|
3465
|
+
const [activeAction, setInternalActiveAction] = useState9(localStorage.getItem(activeActionKey) ?? "inviteMany");
|
|
3715
3466
|
const setActiveAction = (nextAction) => {
|
|
3716
3467
|
setInternalActiveAction(nextAction);
|
|
3717
3468
|
localStorage.setItem(activeActionKey, nextAction);
|
|
@@ -3719,26 +3470,26 @@ var SpaceManagerImpl = (props) => {
|
|
|
3719
3470
|
const visibleInvitations = showInactiveInvitations ? invitations : invitations?.filter((invitation) => ![
|
|
3720
3471
|
Invitation8.State.CANCELLED
|
|
3721
3472
|
].includes(invitation.get().state));
|
|
3722
|
-
return /* @__PURE__ */
|
|
3473
|
+
return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(ScrollArea.Root, {
|
|
3723
3474
|
classNames: "grow shrink basis-28 -mli-2"
|
|
3724
|
-
}, /* @__PURE__ */
|
|
3475
|
+
}, /* @__PURE__ */ React35.createElement(ScrollArea.Viewport, {
|
|
3725
3476
|
classNames: "is-full pie-2"
|
|
3726
|
-
}, !!visibleInvitations?.length && /* @__PURE__ */
|
|
3727
|
-
className:
|
|
3728
|
-
}, t("invitation list heading")), /* @__PURE__ */
|
|
3477
|
+
}, !!visibleInvitations?.length && /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement("h3", {
|
|
3478
|
+
className: mx22(headingFragment, descriptionText12)
|
|
3479
|
+
}, t("invitation list heading")), /* @__PURE__ */ React35.createElement(InvitationListComponent, {
|
|
3729
3480
|
className: "mb-2",
|
|
3730
3481
|
send,
|
|
3731
3482
|
invitations: visibleInvitations ?? [],
|
|
3732
3483
|
onClickRemove: (invitation) => invitation.cancel(),
|
|
3733
3484
|
createInvitationUrl
|
|
3734
|
-
}), /* @__PURE__ */
|
|
3735
|
-
className:
|
|
3736
|
-
}, t("space member list heading"))), /* @__PURE__ */
|
|
3485
|
+
}), /* @__PURE__ */ React35.createElement("h3", {
|
|
3486
|
+
className: mx22(headingFragment, descriptionText12, "mbs-2")
|
|
3487
|
+
}, t("space member list heading"))), /* @__PURE__ */ React35.createElement(SpaceMemberListComponent, {
|
|
3737
3488
|
spaceKey: space.key,
|
|
3738
3489
|
includeSelf: true
|
|
3739
|
-
})), /* @__PURE__ */
|
|
3490
|
+
})), /* @__PURE__ */ React35.createElement(ScrollArea.Scrollbar, {
|
|
3740
3491
|
orientation: "vertical"
|
|
3741
|
-
}, /* @__PURE__ */
|
|
3492
|
+
}, /* @__PURE__ */ React35.createElement(ScrollArea.Thumb, null))), /* @__PURE__ */ React35.createElement(Actions, null, /* @__PURE__ */ React35.createElement(BifurcatedAction, {
|
|
3742
3493
|
disabled: !active,
|
|
3743
3494
|
actions: inviteActions,
|
|
3744
3495
|
activeAction,
|
|
@@ -3750,45 +3501,45 @@ var SpaceManagerImpl = (props) => {
|
|
|
3750
3501
|
// packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
|
|
3751
3502
|
var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
|
|
3752
3503
|
var SpacePanelHeading = ({ titleId, space, onDone }) => {
|
|
3753
|
-
const { t } =
|
|
3504
|
+
const { t } = useTranslation21("os");
|
|
3754
3505
|
const name = space.properties.name;
|
|
3755
|
-
return /* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ React36.createElement(Heading, {
|
|
3756
3507
|
titleId,
|
|
3757
3508
|
title: t("space panel heading"),
|
|
3758
|
-
corner: /* @__PURE__ */
|
|
3509
|
+
corner: /* @__PURE__ */ React36.createElement(CloseButton, {
|
|
3759
3510
|
"data-testid": "identity-panel-done",
|
|
3760
3511
|
onDone
|
|
3761
3512
|
})
|
|
3762
|
-
}, /* @__PURE__ */
|
|
3513
|
+
}, /* @__PURE__ */ React36.createElement("div", {
|
|
3763
3514
|
role: "none",
|
|
3764
3515
|
className: "flex gap-4 items-center justify-center mlb-4"
|
|
3765
|
-
}, /* @__PURE__ */
|
|
3516
|
+
}, /* @__PURE__ */ React36.createElement(Planet, {
|
|
3766
3517
|
size: 32,
|
|
3767
3518
|
weight: "light"
|
|
3768
|
-
}), /* @__PURE__ */
|
|
3519
|
+
}), /* @__PURE__ */ React36.createElement("div", {
|
|
3769
3520
|
className: "block text-start font-light text-xl"
|
|
3770
3521
|
}, name ?? space.key.truncate())));
|
|
3771
3522
|
};
|
|
3772
3523
|
var SpacePanelImpl = (props) => {
|
|
3773
3524
|
const { titleId, activeView, space, hideHeading, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
|
|
3774
|
-
return /* @__PURE__ */
|
|
3525
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, !hideHeading && /* @__PURE__ */ React36.createElement(SpacePanelHeading, {
|
|
3775
3526
|
...rest,
|
|
3776
3527
|
titleId,
|
|
3777
3528
|
space
|
|
3778
|
-
}), /* @__PURE__ */
|
|
3529
|
+
}), /* @__PURE__ */ React36.createElement(Viewport.Root, {
|
|
3779
3530
|
activeView
|
|
3780
|
-
}, /* @__PURE__ */
|
|
3531
|
+
}, /* @__PURE__ */ React36.createElement(Viewport.Views, null, /* @__PURE__ */ React36.createElement(Viewport.View, {
|
|
3781
3532
|
id: "space manager",
|
|
3782
3533
|
classNames: stepStyles
|
|
3783
|
-
}, /* @__PURE__ */
|
|
3534
|
+
}, /* @__PURE__ */ React36.createElement(SpaceManagerComponent, {
|
|
3784
3535
|
active: activeView === "space manager",
|
|
3785
3536
|
space,
|
|
3786
3537
|
target,
|
|
3787
3538
|
...rest
|
|
3788
|
-
})), /* @__PURE__ */
|
|
3539
|
+
})), /* @__PURE__ */ React36.createElement(Viewport.View, {
|
|
3789
3540
|
id: "space invitation manager",
|
|
3790
3541
|
classNames: stepStyles
|
|
3791
|
-
}, /* @__PURE__ */
|
|
3542
|
+
}, /* @__PURE__ */ React36.createElement(InvitationManagerComponent, {
|
|
3792
3543
|
active: activeView === "space invitation manager",
|
|
3793
3544
|
...rest,
|
|
3794
3545
|
invitationUrl: props.invitationUrl
|
|
@@ -3796,7 +3547,7 @@ var SpacePanelImpl = (props) => {
|
|
|
3796
3547
|
};
|
|
3797
3548
|
var SpacePanelWithInvitationImpl = ({ invitation, ...props }) => {
|
|
3798
3549
|
const invitationStatus = useInvitationStatus3(invitation);
|
|
3799
|
-
return /* @__PURE__ */
|
|
3550
|
+
return /* @__PURE__ */ React36.createElement(SpacePanelImpl, {
|
|
3800
3551
|
...props,
|
|
3801
3552
|
...invitationStatus,
|
|
3802
3553
|
invitationUrl: props.createInvitationUrl(invitationStatus.invitationCode)
|
|
@@ -3843,24 +3594,24 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
|
|
|
3843
3594
|
};
|
|
3844
3595
|
return spaceState.context.invitation ? (
|
|
3845
3596
|
// TODO(wittjosiah): Unused? Remove?
|
|
3846
|
-
/* @__PURE__ */
|
|
3597
|
+
/* @__PURE__ */ React36.createElement(SpacePanelWithInvitationImpl, {
|
|
3847
3598
|
...implProps,
|
|
3848
3599
|
invitation: spaceState.context.invitation
|
|
3849
3600
|
})
|
|
3850
|
-
) : /* @__PURE__ */
|
|
3601
|
+
) : /* @__PURE__ */ React36.createElement(SpacePanelImpl, implProps);
|
|
3851
3602
|
};
|
|
3852
3603
|
|
|
3853
3604
|
// packages/sdk/shell/src/panels/StatusPanel/StatusPanel.tsx
|
|
3854
|
-
import
|
|
3855
|
-
import { Status, useTranslation as
|
|
3605
|
+
import React37 from "react";
|
|
3606
|
+
import { Status, useTranslation as useTranslation22 } from "@dxos/react-ui";
|
|
3856
3607
|
var StatusPanel = ({ titleId }) => {
|
|
3857
|
-
const { t } =
|
|
3858
|
-
return /* @__PURE__ */
|
|
3608
|
+
const { t } = useTranslation22("os");
|
|
3609
|
+
return /* @__PURE__ */ React37.createElement("div", {
|
|
3859
3610
|
className: "grid place-items-center p-2 gap-2"
|
|
3860
|
-
}, /* @__PURE__ */
|
|
3611
|
+
}, /* @__PURE__ */ React37.createElement("p", {
|
|
3861
3612
|
id: titleId,
|
|
3862
3613
|
className: "font-medium text-center"
|
|
3863
|
-
}, t("resetting message")), /* @__PURE__ */
|
|
3614
|
+
}, t("resetting message")), /* @__PURE__ */ React37.createElement(Status, {
|
|
3864
3615
|
indeterminate: true
|
|
3865
3616
|
}, t("resetting message")));
|
|
3866
3617
|
};
|
|
@@ -3868,96 +3619,96 @@ var StatusPanel = ({ titleId }) => {
|
|
|
3868
3619
|
// packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
|
|
3869
3620
|
var IdentityDialog = (props) => {
|
|
3870
3621
|
const titleId = useId10("identityDialog__title", props.title);
|
|
3871
|
-
return /* @__PURE__ */
|
|
3622
|
+
return /* @__PURE__ */ React38.createElement(Dialog.Root, {
|
|
3872
3623
|
defaultOpen: true,
|
|
3873
3624
|
onOpenChange: (open) => open || props.onDone?.()
|
|
3874
|
-
}, /* @__PURE__ */
|
|
3625
|
+
}, /* @__PURE__ */ React38.createElement(Dialog.Portal, null, /* @__PURE__ */ React38.createElement(Dialog.Overlay, null, /* @__PURE__ */ React38.createElement(Dialog.Content, {
|
|
3875
3626
|
"aria-labelledby": titleId,
|
|
3876
3627
|
onOpenAutoFocus: (e) => e.preventDefault()
|
|
3877
|
-
}, /* @__PURE__ */
|
|
3628
|
+
}, /* @__PURE__ */ React38.createElement(Clipboard4.Provider, null, /* @__PURE__ */ React38.createElement(IdentityPanel, {
|
|
3878
3629
|
...props,
|
|
3879
3630
|
titleId,
|
|
3880
|
-
doneActionParent: /* @__PURE__ */
|
|
3631
|
+
doneActionParent: /* @__PURE__ */ React38.createElement(Dialog.Close, {
|
|
3881
3632
|
asChild: true
|
|
3882
3633
|
})
|
|
3883
3634
|
}))))));
|
|
3884
3635
|
};
|
|
3885
3636
|
|
|
3886
3637
|
// packages/sdk/shell/src/composites/JoinDialog/JoinDialog.tsx
|
|
3887
|
-
import
|
|
3638
|
+
import React39 from "react";
|
|
3888
3639
|
import { AlertDialog, useId as useId11, useVisualViewport } from "@dxos/react-ui";
|
|
3889
3640
|
var JoinDialog = (joinPanelProps) => {
|
|
3890
3641
|
const titleId = useId11("joinDialog__title");
|
|
3891
3642
|
const { height } = useVisualViewport();
|
|
3892
|
-
return /* @__PURE__ */
|
|
3643
|
+
return /* @__PURE__ */ React39.createElement(AlertDialog.Root, {
|
|
3893
3644
|
defaultOpen: true,
|
|
3894
3645
|
onOpenChange: (open) => open || (joinPanelProps.onExit ? joinPanelProps.onExit() : joinPanelProps.onDone?.(null))
|
|
3895
|
-
}, /* @__PURE__ */
|
|
3646
|
+
}, /* @__PURE__ */ React39.createElement(AlertDialog.Portal, null, /* @__PURE__ */ React39.createElement(AlertDialog.Overlay, {
|
|
3896
3647
|
classNames: "backdrop-blur",
|
|
3897
3648
|
...height && {
|
|
3898
3649
|
style: {
|
|
3899
3650
|
blockSize: `${height}px`
|
|
3900
3651
|
}
|
|
3901
3652
|
}
|
|
3902
|
-
}, /* @__PURE__ */
|
|
3653
|
+
}, /* @__PURE__ */ React39.createElement(AlertDialog.Content, {
|
|
3903
3654
|
"aria-labelledby": titleId
|
|
3904
|
-
}, /* @__PURE__ */
|
|
3655
|
+
}, /* @__PURE__ */ React39.createElement(JoinPanel, {
|
|
3905
3656
|
...joinPanelProps,
|
|
3906
3657
|
titleId,
|
|
3907
|
-
exitActionParent: /* @__PURE__ */
|
|
3658
|
+
exitActionParent: /* @__PURE__ */ React39.createElement(AlertDialog.Cancel, {
|
|
3908
3659
|
asChild: true
|
|
3909
3660
|
}),
|
|
3910
|
-
doneActionParent: /* @__PURE__ */
|
|
3661
|
+
doneActionParent: /* @__PURE__ */ React39.createElement(AlertDialog.Action, {
|
|
3911
3662
|
asChild: true
|
|
3912
3663
|
})
|
|
3913
3664
|
})))));
|
|
3914
3665
|
};
|
|
3915
3666
|
|
|
3916
3667
|
// packages/sdk/shell/src/composites/Shell/run-shell.tsx
|
|
3917
|
-
import
|
|
3668
|
+
import React43, { StrictMode } from "react";
|
|
3918
3669
|
import { createRoot } from "react-dom/client";
|
|
3919
3670
|
import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
|
|
3920
3671
|
import { AgentHostingProvider, ClientProvider, ClientServicesProxy, Config, ShellDisplay as ShellDisplay2 } from "@dxos/react-client";
|
|
3921
|
-
import { Button as
|
|
3672
|
+
import { Button as Button8, Clipboard as Clipboard6, Dialog as Dialog3, ThemeProvider, Tooltip as Tooltip4, useTranslation as useTranslation23 } from "@dxos/react-ui";
|
|
3922
3673
|
import { defaultTx } from "@dxos/react-ui-theme";
|
|
3923
3674
|
import { createIFramePort } from "@dxos/rpc-tunnel";
|
|
3924
3675
|
|
|
3925
3676
|
// packages/sdk/shell/src/composites/Shell/Shell.tsx
|
|
3926
|
-
import
|
|
3677
|
+
import React42, { useEffect as useEffect8, useState as useState10 } from "react";
|
|
3927
3678
|
import { log as log15 } from "@dxos/log";
|
|
3928
3679
|
import { useClient as useClient9 } from "@dxos/react-client";
|
|
3929
3680
|
import { ShellDisplay, ShellLayout } from "@dxos/react-client";
|
|
3930
3681
|
import { useSpace as useSpace2 } from "@dxos/react-client/echo";
|
|
3931
3682
|
|
|
3932
3683
|
// packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
|
|
3933
|
-
import
|
|
3934
|
-
import { Clipboard as
|
|
3684
|
+
import React40 from "react";
|
|
3685
|
+
import { Clipboard as Clipboard5, Dialog as Dialog2, useId as useId12 } from "@dxos/react-ui";
|
|
3935
3686
|
var SpaceDialog = (spacePanelProps) => {
|
|
3936
3687
|
const titleId = useId12("spaceDialog__title");
|
|
3937
|
-
return /* @__PURE__ */
|
|
3688
|
+
return /* @__PURE__ */ React40.createElement(Dialog2.Root, {
|
|
3938
3689
|
defaultOpen: true,
|
|
3939
3690
|
onOpenChange: (open) => open || spacePanelProps.onDone?.()
|
|
3940
|
-
}, /* @__PURE__ */
|
|
3691
|
+
}, /* @__PURE__ */ React40.createElement(Dialog2.Portal, null, /* @__PURE__ */ React40.createElement(Dialog2.Overlay, null, /* @__PURE__ */ React40.createElement(Dialog2.Content, {
|
|
3941
3692
|
"aria-labelledby": titleId
|
|
3942
|
-
}, /* @__PURE__ */
|
|
3693
|
+
}, /* @__PURE__ */ React40.createElement(Clipboard5.Provider, null, /* @__PURE__ */ React40.createElement(SpacePanel, {
|
|
3943
3694
|
...spacePanelProps,
|
|
3944
3695
|
titleId,
|
|
3945
|
-
doneActionParent: /* @__PURE__ */
|
|
3696
|
+
doneActionParent: /* @__PURE__ */ React40.createElement(Dialog2.Close, {
|
|
3946
3697
|
asChild: true
|
|
3947
3698
|
})
|
|
3948
3699
|
}))))));
|
|
3949
3700
|
};
|
|
3950
3701
|
|
|
3951
3702
|
// packages/sdk/shell/src/composites/StatusDialog/StatusDialog.tsx
|
|
3952
|
-
import
|
|
3703
|
+
import React41 from "react";
|
|
3953
3704
|
import { AlertDialog as AlertDialog2, useId as useId13 } from "@dxos/react-ui";
|
|
3954
3705
|
var StatusDialog = () => {
|
|
3955
3706
|
const titleId = useId13("statusDialog__title");
|
|
3956
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ React41.createElement(AlertDialog2.Root, {
|
|
3957
3708
|
open: true
|
|
3958
|
-
}, /* @__PURE__ */
|
|
3709
|
+
}, /* @__PURE__ */ React41.createElement(AlertDialog2.Portal, null, /* @__PURE__ */ React41.createElement(AlertDialog2.Overlay, null, /* @__PURE__ */ React41.createElement(AlertDialog2.Content, {
|
|
3959
3710
|
"aria-labelledby": titleId
|
|
3960
|
-
}, /* @__PURE__ */
|
|
3711
|
+
}, /* @__PURE__ */ React41.createElement(StatusPanel, {
|
|
3961
3712
|
titleId
|
|
3962
3713
|
})))));
|
|
3963
3714
|
};
|
|
@@ -3966,14 +3717,14 @@ var StatusDialog = () => {
|
|
|
3966
3717
|
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
|
|
3967
3718
|
var blurActiveElement = () => document.activeElement?.blur?.();
|
|
3968
3719
|
var Shell = ({ runtime }) => {
|
|
3969
|
-
const [{ layout, invitationCode, spaceKey, spaceId, target }, setLayout] =
|
|
3720
|
+
const [{ layout, invitationCode, spaceKey, spaceId, target }, setLayout] = useState10({
|
|
3970
3721
|
layout: runtime.layout,
|
|
3971
3722
|
invitationCode: runtime.invitationCode,
|
|
3972
3723
|
spaceKey: runtime.spaceKey,
|
|
3973
3724
|
spaceId: runtime.spaceId,
|
|
3974
3725
|
target: runtime.target
|
|
3975
3726
|
});
|
|
3976
|
-
const [{ invitationUrl, deviceInvitationParam, spaceInvitationParam }, setInvitationUrl] =
|
|
3727
|
+
const [{ invitationUrl, deviceInvitationParam, spaceInvitationParam }, setInvitationUrl] = useState10({
|
|
3977
3728
|
invitationUrl: runtime.invitationUrl,
|
|
3978
3729
|
deviceInvitationParam: runtime.deviceInvitationParam,
|
|
3979
3730
|
spaceInvitationParam: runtime.spaceInvitationParam
|
|
@@ -4025,11 +3776,11 @@ var Shell = ({ runtime }) => {
|
|
|
4025
3776
|
]);
|
|
4026
3777
|
switch (layout) {
|
|
4027
3778
|
case ShellLayout.STATUS:
|
|
4028
|
-
return /* @__PURE__ */
|
|
3779
|
+
return /* @__PURE__ */ React42.createElement(StatusDialog, null);
|
|
4029
3780
|
case ShellLayout.INITIALIZE_IDENTITY:
|
|
4030
3781
|
case ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION:
|
|
4031
3782
|
case ShellLayout.INITIALIZE_IDENTITY_FROM_RECOVERY:
|
|
4032
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ React42.createElement(JoinDialog, {
|
|
4033
3784
|
mode: "halo-only",
|
|
4034
3785
|
initialDisposition: layout === ShellLayout.INITIALIZE_IDENTITY_FROM_RECOVERY ? "recover-identity" : layout === ShellLayout.INITIALIZE_IDENTITY_FROM_INVITATION ? "accept-halo-invitation" : "default",
|
|
4035
3786
|
initialInvitationCode: invitationCode,
|
|
@@ -4049,7 +3800,7 @@ var Shell = ({ runtime }) => {
|
|
|
4049
3800
|
case ShellLayout.IDENTITY:
|
|
4050
3801
|
case ShellLayout.SHARE_IDENTITY:
|
|
4051
3802
|
case ShellLayout.EDIT_PROFILE:
|
|
4052
|
-
return /* @__PURE__ */
|
|
3803
|
+
return /* @__PURE__ */ React42.createElement(IdentityDialog, {
|
|
4053
3804
|
createInvitationUrl: createDeviceInvitationUrl,
|
|
4054
3805
|
onResetStorage: async () => {
|
|
4055
3806
|
runtime.setLayout({
|
|
@@ -4095,7 +3846,7 @@ var Shell = ({ runtime }) => {
|
|
|
4095
3846
|
initialDisposition: layout === ShellLayout.SHARE_IDENTITY ? "manage-device-invitation" : "default"
|
|
4096
3847
|
});
|
|
4097
3848
|
case ShellLayout.SPACE:
|
|
4098
|
-
return space ? /* @__PURE__ */
|
|
3849
|
+
return space ? /* @__PURE__ */ React42.createElement(SpaceDialog, {
|
|
4099
3850
|
space,
|
|
4100
3851
|
target,
|
|
4101
3852
|
createInvitationUrl: createSpaceInvitationUrl,
|
|
@@ -4110,7 +3861,7 @@ var Shell = ({ runtime }) => {
|
|
|
4110
3861
|
}
|
|
4111
3862
|
}) : null;
|
|
4112
3863
|
case ShellLayout.JOIN_SPACE:
|
|
4113
|
-
return /* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ React42.createElement(JoinDialog, {
|
|
4114
3865
|
initialInvitationCode: invitationCode,
|
|
4115
3866
|
onDone: async (result) => {
|
|
4116
3867
|
blurActiveElement();
|
|
@@ -4254,8 +4005,9 @@ var os = {
|
|
|
4254
4005
|
"sidebar label": "DXOS sidebar",
|
|
4255
4006
|
"copy invitation code label": "Copy URL",
|
|
4256
4007
|
"copy success label": "Copied",
|
|
4257
|
-
"copy self
|
|
4008
|
+
"copy self did label": "Copy DID",
|
|
4258
4009
|
"open share panel label": "View QR code",
|
|
4010
|
+
"manage credentials label": "Manage credentials",
|
|
4259
4011
|
"joining space heading": "Joining space",
|
|
4260
4012
|
"join space heading": "Enter space invitation",
|
|
4261
4013
|
"halo heading": "Initialize device identity",
|
|
@@ -4362,6 +4114,7 @@ var os = {
|
|
|
4362
4114
|
"select emoji label": "Avatar emoji",
|
|
4363
4115
|
"select hue label": "Avatar background color",
|
|
4364
4116
|
"resetting message": "One moment while the device is reset\u2026",
|
|
4117
|
+
// TODO(burdon): Factor out.
|
|
4365
4118
|
"red label": "Red",
|
|
4366
4119
|
"orange label": "Orange",
|
|
4367
4120
|
"amber label": "Amber",
|
|
@@ -4379,11 +4132,14 @@ var os = {
|
|
|
4379
4132
|
"fuchsia label": "Fuchsia",
|
|
4380
4133
|
"pink label": "Pink",
|
|
4381
4134
|
"rose label": "Rose",
|
|
4135
|
+
"select a hue label": "Select color",
|
|
4136
|
+
"hue label": "Hue",
|
|
4137
|
+
"icon label": "Icon",
|
|
4382
4138
|
"current device tag label": "This device",
|
|
4383
4139
|
"device name placeholder": "{{platform}} on {{os}}",
|
|
4384
4140
|
"more options label": "More options",
|
|
4385
|
-
"disconnect label": "Go offline
|
|
4386
|
-
"connect label": "Go online
|
|
4141
|
+
"disconnect label": "Go offline",
|
|
4142
|
+
"connect label": "Go online",
|
|
4387
4143
|
"edit device label": "Edit device name & avatar",
|
|
4388
4144
|
"agent heading": "Agent",
|
|
4389
4145
|
"create agent clickwrap": 'By creating an agent, you agree to our <tosLink href="https://dxos.org/tos">Terms of\xA0Service</tosLink>.',
|
|
@@ -4417,25 +4173,25 @@ var runShell = async (config = new Config()) => {
|
|
|
4417
4173
|
const services = new ClientServicesProxy(createIFramePort({
|
|
4418
4174
|
channel: DEFAULT_CLIENT_CHANNEL
|
|
4419
4175
|
}));
|
|
4420
|
-
createRoot(document.getElementById("root")).render(/* @__PURE__ */
|
|
4176
|
+
createRoot(document.getElementById("root")).render(/* @__PURE__ */ React43.createElement(StrictMode, null, /* @__PURE__ */ React43.createElement(ThemeProvider, {
|
|
4421
4177
|
tx: defaultTx,
|
|
4422
4178
|
resourceExtensions: [
|
|
4423
4179
|
osTranslations
|
|
4424
4180
|
]
|
|
4425
|
-
}, /* @__PURE__ */
|
|
4181
|
+
}, /* @__PURE__ */ React43.createElement(ClientProvider, {
|
|
4426
4182
|
config,
|
|
4427
4183
|
services,
|
|
4428
4184
|
noBanner: true
|
|
4429
|
-
}, /* @__PURE__ */
|
|
4185
|
+
}, /* @__PURE__ */ React43.createElement(Clipboard6.Provider, null, /* @__PURE__ */ React43.createElement(Tooltip4.Provider, null, /* @__PURE__ */ React43.createElement(AgentHostingProvider, null, /* @__PURE__ */ React43.createElement(Shell, {
|
|
4430
4186
|
runtime
|
|
4431
4187
|
}))))))));
|
|
4432
4188
|
} catch {
|
|
4433
|
-
createRoot(document.getElementById("root")).render(/* @__PURE__ */
|
|
4189
|
+
createRoot(document.getElementById("root")).render(/* @__PURE__ */ React43.createElement(StrictMode, null, /* @__PURE__ */ React43.createElement(ThemeProvider, {
|
|
4434
4190
|
tx: defaultTx,
|
|
4435
4191
|
resourceExtensions: [
|
|
4436
4192
|
osTranslations
|
|
4437
4193
|
]
|
|
4438
|
-
}, /* @__PURE__ */
|
|
4194
|
+
}, /* @__PURE__ */ React43.createElement(Fallback, {
|
|
4439
4195
|
onClose: () => runtime.setAppContext({
|
|
4440
4196
|
display: ShellDisplay2.NONE
|
|
4441
4197
|
})
|
|
@@ -4443,24 +4199,24 @@ var runShell = async (config = new Config()) => {
|
|
|
4443
4199
|
}
|
|
4444
4200
|
};
|
|
4445
4201
|
var Fallback = ({ onClose }) => {
|
|
4446
|
-
const { t } =
|
|
4447
|
-
return /* @__PURE__ */
|
|
4202
|
+
const { t } = useTranslation23("os");
|
|
4203
|
+
return /* @__PURE__ */ React43.createElement(Dialog3.Root, {
|
|
4448
4204
|
modal: true,
|
|
4449
4205
|
open: true,
|
|
4450
4206
|
onOpenChange: () => onClose?.()
|
|
4451
|
-
}, /* @__PURE__ */
|
|
4207
|
+
}, /* @__PURE__ */ React43.createElement(Dialog3.Overlay, null, /* @__PURE__ */ React43.createElement(Dialog3.Content, null, /* @__PURE__ */ React43.createElement(Dialog3.Title, null, t("shell fallback title")), /* @__PURE__ */ React43.createElement(Dialog3.Close, {
|
|
4452
4208
|
asChild: true,
|
|
4453
4209
|
onClick: () => onClose?.()
|
|
4454
|
-
}, /* @__PURE__ */
|
|
4210
|
+
}, /* @__PURE__ */ React43.createElement(Button8, {
|
|
4455
4211
|
variant: "primary"
|
|
4456
4212
|
}, t("close label"))))));
|
|
4457
4213
|
};
|
|
4458
4214
|
|
|
4459
4215
|
// packages/sdk/shell/src/composites/Shell/ShellContext.tsx
|
|
4460
|
-
import
|
|
4216
|
+
import React44, { createContext, useCallback as useCallback8, useContext, useEffect as useEffect9, useMemo as useMemo6, useState as useState11 } from "react";
|
|
4461
4217
|
import { useClient as useClient10, ShellDisplay as ShellDisplay3, ShellLayout as ShellLayout4 } from "@dxos/react-client";
|
|
4462
4218
|
import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
|
|
4463
|
-
import { mx as
|
|
4219
|
+
import { mx as mx23 } from "@dxos/react-ui-theme";
|
|
4464
4220
|
|
|
4465
4221
|
// packages/sdk/shell/src/composites/Shell/memory-shell-runtime.ts
|
|
4466
4222
|
import { Event as Event2 } from "@dxos/async";
|
|
@@ -4538,7 +4294,7 @@ var useShell = () => {
|
|
|
4538
4294
|
var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoinedSpace, children }) => {
|
|
4539
4295
|
const client = useClient10();
|
|
4540
4296
|
const identity = useIdentity3();
|
|
4541
|
-
const [display, setDisplay] =
|
|
4297
|
+
const [display, setDisplay] = useState11(!identity || spaceInvitationCode || deviceInvitationCode ? ShellDisplay3.FULLSCREEN : ShellDisplay3.NONE);
|
|
4542
4298
|
const shellRuntime = useMemo6(() => {
|
|
4543
4299
|
if (client.config.get("runtime.app.env.DX_VAULT") !== "false") {
|
|
4544
4300
|
return;
|
|
@@ -4608,11 +4364,11 @@ var ShellProvider = ({ space, deviceInvitationCode, spaceInvitationCode, onJoine
|
|
|
4608
4364
|
}, [
|
|
4609
4365
|
shellRuntime
|
|
4610
4366
|
]);
|
|
4611
|
-
return /* @__PURE__ */
|
|
4612
|
-
className:
|
|
4613
|
-
}, /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, shellRuntime && /* @__PURE__ */ React44.createElement("div", {
|
|
4368
|
+
className: mx23(display === ShellDisplay3.NONE ? "hidden" : "")
|
|
4369
|
+
}, /* @__PURE__ */ React44.createElement(Shell, {
|
|
4614
4370
|
runtime: shellRuntime
|
|
4615
|
-
})), /* @__PURE__ */
|
|
4371
|
+
})), /* @__PURE__ */ React44.createElement(ShellContext.Provider, {
|
|
4616
4372
|
value: {
|
|
4617
4373
|
runtime: shellRuntime,
|
|
4618
4374
|
setDisplay
|
|
@@ -4632,11 +4388,7 @@ export {
|
|
|
4632
4388
|
ConfirmResetImpl,
|
|
4633
4389
|
DeviceList,
|
|
4634
4390
|
Emoji,
|
|
4635
|
-
EmojiPickerBlock,
|
|
4636
|
-
EmojiPickerToolbarButton,
|
|
4637
4391
|
Heading,
|
|
4638
|
-
HuePickerBlock,
|
|
4639
|
-
HuePickerToolbarButton,
|
|
4640
4392
|
IdentityDialog,
|
|
4641
4393
|
IdentityListItem,
|
|
4642
4394
|
IdentityPanel,
|