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