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