@dxos/shell 0.8.0 → 0.8.1-main.a06ad20
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.js +2708 -2706
- package/dist/bundle/shell.js.map +1 -1
- package/dist/bundle/shell.umd.cjs +59 -59
- package/dist/bundle/shell.umd.cjs.map +1 -1
- package/dist/types/src/components/AgentConfig.d.ts +2 -1
- package/dist/types/src/components/AgentConfig.d.ts.map +1 -1
- package/dist/types/src/components/AgentConfig.js +38 -15
- 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 +4 -3
- 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 +10 -2
- package/dist/types/src/components/CompoundButton/CompoundButton.js.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts +8 -7
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js +9 -7
- package/dist/types/src/components/CompoundButton/CompoundButton.stories.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts +2 -1
- package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceList.js +11 -4
- package/dist/types/src/components/DeviceList/DeviceList.js.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +23 -4
- package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +6 -3
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +3 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +6 -6
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts +3 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +2 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.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 +8 -5
- package/dist/types/src/components/InvitationList/InvitationList.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts +3 -2
- package/dist/types/src/components/InvitationList/InvitationList.stories.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +2 -2
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts +2 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListContainer.js +2 -3
- 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 +34 -5
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +23 -6
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/components/Panel/Actions.js +2 -3
- package/dist/types/src/components/Panel/Actions.js.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts +2 -1
- package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -1
- package/dist/types/src/components/Panel/CloseButton.js +4 -2
- 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 +8 -3
- package/dist/types/src/components/Panel/Emoji.js.map +1 -1
- package/dist/types/src/components/Panel/Heading.js +6 -3
- 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 +8 -2
- 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 +5 -2
- package/dist/types/src/components/Panel/Label.js.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.d.ts +4 -3
- package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Panel.stories.js +15 -3
- package/dist/types/src/components/Panel/Panel.stories.js.map +1 -1
- package/dist/types/src/components/Panel/StepHeading.js +2 -3
- package/dist/types/src/components/Panel/StepHeading.js.map +1 -1
- package/dist/types/src/components/SpaceListItem.js +6 -3
- 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 +8 -2
- 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 +5 -5
- package/dist/types/src/components/Viewport/Viewport.js.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts +2 -1
- package/dist/types/src/components/Viewport/Viewport.stories.d.ts.map +1 -1
- package/dist/types/src/components/Viewport/Viewport.stories.js +22 -3
- package/dist/types/src/components/Viewport/Viewport.stories.js.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts +2 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -1
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js +11 -3
- package/dist/types/src/composites/IdentityDialog/IdentityDialog.js.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +2 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.js +11 -4
- package/dist/types/src/composites/JoinDialog/JoinDialog.js.map +1 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +2 -1
- package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
- package/dist/types/src/composites/Shell/Shell.js +6 -7
- 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 +5 -3
- package/dist/types/src/composites/Shell/ShellContext.js.map +1 -1
- package/dist/types/src/composites/Shell/run-shell.js +17 -5
- package/dist/types/src/composites/Shell/run-shell.js.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +2 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js +11 -3
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.js.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts +2 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.d.ts.map +1 -1
- package/dist/types/src/composites/StatusDialog/StatusDialog.js +9 -2
- package/dist/types/src/composites/StatusDialog/StatusDialog.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts +3 -2
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +56 -14
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +11 -10
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +5 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts +3 -2
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +8 -3
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +2 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +20 -11
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.js +5 -4
- package/dist/types/src/panels/JoinPanel/JoinHeading.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +3 -2
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.js +28 -4
- package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +15 -14
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +16 -15
- package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +8 -3
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js +11 -4
- package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts +3 -2
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/IdentityInput.js +7 -4
- 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 +6 -4
- package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +28 -14
- package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +14 -10
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts +2 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js +24 -8
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts +3 -3
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +8 -3
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +3 -2
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +15 -6
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +18 -17
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +38 -30
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.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 +14 -4
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts +2 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -1
- package/dist/types/src/panels/StatusPanel/StatusPanel.js +7 -2
- package/dist/types/src/panels/StatusPanel/StatusPanel.js.map +1 -1
- package/dist/types/src/steps/ConfirmReset.d.ts +3 -2
- package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -1
- package/dist/types/src/steps/ConfirmReset.js +19 -10
- package/dist/types/src/steps/ConfirmReset.js.map +1 -1
- package/dist/types/src/steps/InvitationManager.d.ts +2 -1
- package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
- package/dist/types/src/steps/InvitationManager.js +21 -4
- package/dist/types/src/steps/InvitationManager.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts +2 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +40 -13
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/package.json +26 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellContext.js","sourceRoot":"","sources":["../../../../../src/composites/Shell/ShellContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShellContext.js","sourceRoot":"","sources":["../../../../../src/composites/Shell/ShellContext.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,EAAE,EAEZ,aAAa,EAEb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAkB,SAAS,EAAE,YAAY,EAAE,WAAW,EAAsB,MAAM,oBAAoB,CAAC;AAE9G,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAO5D,MAAM,CAAC,MAAM,YAAY,GAA+B,aAAa,CAAoB,EAAE,CAAC,CAAC;AAI7F;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAA6B,EAAE;IACrD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IAEzD,MAAM,SAAS,GAAc,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QACrD,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,MAAM,KAAK,WAAW,CAAC,OAAO,EAAE,CAAC;gBACnC,UAAU,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gB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAClD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;IAElC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,OAAO,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC7D,IAAI,OAAO,EAAE,CAAC;gBACZ,UAAU,CAAC,OAAO,CAAC,CAAC;YACtB,CAAC;YACD,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,QAAQ,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL;QACG,YAAY,IAAI,CACf,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,oBAAC,KAAK,IAAC,OAAO,EAAE,YAAY,GAAI,CAC5B,CACP;QAED,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAG,QAAQ,CAAyB,CACtG,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
import { StrictMode } from 'react';
|
|
4
|
+
import React, { StrictMode } from 'react';
|
|
6
5
|
import { createRoot } from 'react-dom/client';
|
|
7
6
|
import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from '@dxos/client-protocol';
|
|
8
7
|
import { AgentHostingProvider, ClientProvider, ClientServicesProxy, Config, ShellDisplay } from '@dxos/react-client';
|
|
@@ -18,15 +17,28 @@ export const runShell = async (config = new Config()) => {
|
|
|
18
17
|
await runtime.open();
|
|
19
18
|
try {
|
|
20
19
|
const services = new ClientServicesProxy(createIFramePort({ channel: DEFAULT_CLIENT_CHANNEL }));
|
|
21
|
-
createRoot(document.getElementById('root')).render(
|
|
20
|
+
createRoot(document.getElementById('root')).render(React.createElement(StrictMode, null,
|
|
21
|
+
React.createElement(ThemeProvider, { tx: defaultTx, resourceExtensions: [osTranslations] },
|
|
22
|
+
React.createElement(ClientProvider, { config: config, services: services, noBanner: true },
|
|
23
|
+
React.createElement(Clipboard.Provider, null,
|
|
24
|
+
React.createElement(Tooltip.Provider, null,
|
|
25
|
+
React.createElement(AgentHostingProvider, null,
|
|
26
|
+
React.createElement(Shell, { runtime: runtime }))))))));
|
|
22
27
|
}
|
|
23
28
|
catch (_a) {
|
|
24
29
|
// If shell's client fails to initialize, ensure that the shell is still closeable.
|
|
25
|
-
createRoot(document.getElementById('root')).render(
|
|
30
|
+
createRoot(document.getElementById('root')).render(React.createElement(StrictMode, null,
|
|
31
|
+
React.createElement(ThemeProvider, { tx: defaultTx, resourceExtensions: [osTranslations] },
|
|
32
|
+
React.createElement(Fallback, { onClose: () => runtime.setAppContext({ display: ShellDisplay.NONE }) }))));
|
|
26
33
|
}
|
|
27
34
|
};
|
|
28
35
|
const Fallback = ({ onClose }) => {
|
|
29
36
|
const { t } = useTranslation('os');
|
|
30
|
-
return (
|
|
37
|
+
return (React.createElement(Dialog.Root, { modal: true, open: true, onOpenChange: () => onClose === null || onClose === void 0 ? void 0 : onClose() },
|
|
38
|
+
React.createElement(Dialog.Overlay, null,
|
|
39
|
+
React.createElement(Dialog.Content, null,
|
|
40
|
+
React.createElement(Dialog.Title, null, t('shell fallback title')),
|
|
41
|
+
React.createElement(Dialog.Close, { asChild: true, onClick: () => onClose === null || onClose === void 0 ? void 0 : onClose() },
|
|
42
|
+
React.createElement(Button, { variant: 'primary' }, t('close label')))))));
|
|
31
43
|
};
|
|
32
44
|
//# sourceMappingURL=run-shell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-shell.js","sourceRoot":"","sources":["../../../../../src/composites/Shell/run-shell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-shell.js","sourceRoot":"","sources":["../../../../../src/composites/Shell/run-shell.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAAE,SAAiB,IAAI,MAAM,EAAE,EAAE,EAAE;IAC9D,gEAAgE;IAChE,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE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C,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI;QACrD,oBAAC,MAAM,CAAC,OAAO;YACb,oBAAC,MAAM,CAAC,OAAO;gBACb,oBAAC,MAAM,CAAC,KAAK,QAAE,CAAC,CAAC,sBAAsB,CAAC,CAAgB;gBACxD,oBAAC,MAAM,CAAC,KAAK,IAAC,OAAO,QAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI;oBAC9C,oBAAC,MAAM,IAAC,OAAO,EAAC,SAAS,IAAE,CAAC,CAAC,aAAa,CAAC,CAAU,CACxC,CACA,CACF,CACL,CACf,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type DialogContentProps } from '@dxos/react-ui';
|
|
2
3
|
import { type SpacePanelProps } from '../../panels';
|
|
3
4
|
export interface SpaceDialogProps extends Omit<DialogContentProps, 'children'>, Omit<SpacePanelProps, 'doneActionParent'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const SpaceDialog: (spacePanelProps: SpaceDialogProps) =>
|
|
6
|
+
export declare const SpaceDialog: (spacePanelProps: SpaceDialogProps) => React.JSX.Element;
|
|
6
7
|
//# sourceMappingURL=SpaceDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceDialog.d.ts","sourceRoot":"","sources":["../../../../../src/composites/SpaceDialog/SpaceDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceDialog.d.ts","sourceRoot":"","sources":["../../../../../src/composites/SpaceDialog/SpaceDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,KAAK,kBAAkB,EAAS,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,EAC1C,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC;CAAG;AAEhD,eAAO,MAAM,WAAW,oBAAqB,gBAAgB,sBAqB5D,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
import React from 'react';
|
|
2
5
|
import { Clipboard, Dialog, useId } from '@dxos/react-ui';
|
|
3
6
|
import { SpacePanel } from '../../panels';
|
|
4
7
|
export const SpaceDialog = (spacePanelProps) => {
|
|
5
8
|
const titleId = useId('spaceDialog__title');
|
|
6
|
-
return (
|
|
9
|
+
return (React.createElement(Dialog.Root, { defaultOpen: true, onOpenChange: (open) => { var _a; return open || ((_a = spacePanelProps.onDone) === null || _a === void 0 ? void 0 : _a.call(spacePanelProps)); } },
|
|
10
|
+
React.createElement(Dialog.Portal, null,
|
|
11
|
+
React.createElement(Dialog.Overlay, null,
|
|
12
|
+
React.createElement(Dialog.Content, { "aria-labelledby": titleId },
|
|
13
|
+
React.createElement(Clipboard.Provider, null,
|
|
14
|
+
React.createElement(SpacePanel, { ...spacePanelProps,
|
|
7
15
|
titleId,
|
|
8
|
-
doneActionParent:
|
|
16
|
+
doneActionParent: React.createElement(Dialog.Close, { asChild: true }) })))))));
|
|
9
17
|
};
|
|
10
18
|
//# sourceMappingURL=SpaceDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceDialog.js","sourceRoot":"","sources":["../../../../../src/composites/SpaceDialog/SpaceDialog.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SpaceDialog.js","sourceRoot":"","sources":["../../../../../src/composites/SpaceDialog/SpaceDialog.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,EAA2B,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AAMhE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,eAAiC,EAAE,EAAE;IAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC5C,OAAO,CACL,oBAAC,MAAM,CAAC,IAAI,IAAC,WAAW,QAAC,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,IAAI,KAAI,MAAA,eAAe,CAAC,MAAM,+DAAI,CAAA,CAAA,EAAA;QACjF,oBAAC,MAAM,CAAC,MAAM;YACZ,oBAAC,MAAM,CAAC,OAAO;gBACb,oBAAC,MAAM,CAAC,OAAO,uBAAkB,OAAO;oBACtC,oBAAC,SAAS,CAAC,QAAQ;wBACjB,oBAAC,UAAU,IAEP,GAAG,eAAe;4BAClB,OAAO;4BACP,gBAAgB,EAAE,oBAAC,MAAM,CAAC,KAAK,IAAC,OAAO,SAAG,GAE5C,CACiB,CACN,CACF,CACH,CACJ,CACf,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDialog.d.ts","sourceRoot":"","sources":["../../../../../src/composites/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusDialog.d.ts","sourceRoot":"","sources":["../../../../../src/composites/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,YAAY,yBAaxB,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
import React from 'react';
|
|
2
5
|
import { AlertDialog, useId } from '@dxos/react-ui';
|
|
3
6
|
import { StatusPanel } from '../../panels';
|
|
4
7
|
export const StatusDialog = () => {
|
|
5
8
|
const titleId = useId('statusDialog__title');
|
|
6
|
-
return (
|
|
9
|
+
return (React.createElement(AlertDialog.Root, { open: true },
|
|
10
|
+
React.createElement(AlertDialog.Portal, null,
|
|
11
|
+
React.createElement(AlertDialog.Overlay, null,
|
|
12
|
+
React.createElement(AlertDialog.Content, { "aria-labelledby": titleId },
|
|
13
|
+
React.createElement(StatusPanel, { titleId: titleId }))))));
|
|
7
14
|
};
|
|
8
15
|
//# sourceMappingURL=StatusDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDialog.js","sourceRoot":"","sources":["../../../../../src/composites/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"StatusDialog.js","sourceRoot":"","sources":["../../../../../src/composites/StatusDialog/StatusDialog.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,WAAW,CAAC,IAAI,IAAC,IAAI;QACpB,oBAAC,WAAW,CAAC,MAAM;YACjB,oBAAC,WAAW,CAAC,OAAO;gBAClB,oBAAC,WAAW,CAAC,OAAO,uBAAkB,OAAO;oBAC3C,oBAAC,WAAW,IAAC,OAAO,EAAE,OAAO,GAAI,CACb,CACF,CACH,CACJ,CACpB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type IdentityPanelImplProps, type IdentityPanelProps } from './IdentityPanelProps';
|
|
2
|
-
export declare const IdentityPanelImpl: (props: IdentityPanelImplProps) =>
|
|
3
|
-
export declare const IdentityPanel: ({ titleId: propsTitleId, createInvitationUrl, initialDisposition, ...props }: IdentityPanelProps) =>
|
|
3
|
+
export declare const IdentityPanelImpl: (props: IdentityPanelImplProps) => React.JSX.Element;
|
|
4
|
+
export declare const IdentityPanel: ({ titleId: propsTitleId, createInvitationUrl, initialDisposition, ...props }: IdentityPanelProps) => React.JSX.Element | null;
|
|
4
5
|
//# sourceMappingURL=IdentityPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityPanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityPanel.d.ts","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAe5D,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAoI9B,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,sBA4F9D,CAAC;AAUF,eAAO,MAAM,aAAa,iFAKvB,kBAAkB,6BAoEpB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import { IdentificationCard, Plugs, PlugsConnected } from '@phosphor-icons/react';
|
|
6
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
5
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
6
|
import { debounce } from '@dxos/async';
|
|
8
7
|
import { generateName } from '@dxos/display-name';
|
|
9
8
|
import { log } from '@dxos/log';
|
|
@@ -47,7 +46,37 @@ const IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, co
|
|
|
47
46
|
void (onUpdateProfile === null || onUpdateProfile === void 0 ? void 0 : onUpdateProfile({ ...identity.profile, data: { ...(_a = identity.profile) === null || _a === void 0 ? void 0 : _a.data, hue: nextHue } }));
|
|
48
47
|
};
|
|
49
48
|
const isConnected = connectionState === ConnectionState.ONLINE;
|
|
50
|
-
return (
|
|
49
|
+
return (React.createElement(Heading, { titleId: titleId, title: title, corner: React.createElement(CloseButton, { onDone: onDone }) },
|
|
50
|
+
React.createElement(Avatar.Root, { size: 16, variant: 'circle', status: isConnected ? 'active' : 'error', hue: hue || fallbackValue.hue },
|
|
51
|
+
React.createElement(Toolbar.Root, { classNames: 'flex justify-center' },
|
|
52
|
+
React.createElement(Avatar.Frame, { classNames: 'relative z-[2] -mli-4 chromatic-ignore' },
|
|
53
|
+
React.createElement(Avatar.Fallback, { text: emoji || fallbackValue.emoji }))),
|
|
54
|
+
React.createElement(Avatar.Label, { classNames: 'sr-only', "data-testid": 'identityHeading.displayName' }, (_d = (_c = identity.profile) === null || _c === void 0 ? void 0 : _c.displayName) !== null && _d !== void 0 ? _d : generateName(identity.identityKey.toHex())),
|
|
55
|
+
React.createElement(Input.Root, null,
|
|
56
|
+
React.createElement(Input.Label, { srOnly: true }, t('display name input label')),
|
|
57
|
+
React.createElement(Input.TextInput, { variant: 'subdued', "data-testid": 'display-name-input', placeholder: t('display name input placeholder'), classNames: 'mbs-2 text-center font-light text-xl', value: displayName, onChange: ({ target: { value } }) => setDisplayName(value) })),
|
|
58
|
+
React.createElement(Toolbar.Root, { classNames: 'flex justify-center items-center gap-1 pt-3' },
|
|
59
|
+
React.createElement(EmojiPickerToolbarButton, { emoji: emoji, onChangeEmoji: setEmoji, classNames: 'bs-[--rail-action]' }),
|
|
60
|
+
React.createElement(HuePicker, { value: hue, onChange: setHue, onReset: () => setHue(undefined), classNames: 'bs-[--rail-action]' }),
|
|
61
|
+
React.createElement(Clipboard.IconButton, { classNames: 'bs-[--rail-action]', "data-testid": 'update-profile-form-copy-key', label: t('copy self did label'), value: identity.did }),
|
|
62
|
+
onManageCredentials && (React.createElement(Tooltip.Root, null,
|
|
63
|
+
React.createElement(Tooltip.Trigger, { asChild: true },
|
|
64
|
+
React.createElement(Toolbar.Button, { classNames: 'bs-[--rail-action]', onClick: onManageCredentials },
|
|
65
|
+
React.createElement("span", { className: 'sr-only' }, t('manage credentials label')),
|
|
66
|
+
React.createElement(IdentificationCard, { className: getSize(5) }))),
|
|
67
|
+
React.createElement(Tooltip.Portal, null,
|
|
68
|
+
React.createElement(Tooltip.Content, { side: 'bottom' },
|
|
69
|
+
t('manage credentials label'),
|
|
70
|
+
React.createElement(Tooltip.Arrow, null))))),
|
|
71
|
+
React.createElement(Tooltip.Root, null,
|
|
72
|
+
React.createElement(Tooltip.Trigger, { asChild: true },
|
|
73
|
+
React.createElement(Toolbar.Button, { classNames: ['bs-[--rail-action]', !isConnected && errorText], onClick: () => onChangeConnectionState === null || onChangeConnectionState === void 0 ? void 0 : onChangeConnectionState(isConnected ? ConnectionState.OFFLINE : ConnectionState.ONLINE) },
|
|
74
|
+
React.createElement("span", { className: 'sr-only' }, t(isConnected ? 'disconnect label' : 'connect label')),
|
|
75
|
+
isConnected ? React.createElement(PlugsConnected, { className: getSize(5) }) : React.createElement(Plugs, { className: getSize(5) }))),
|
|
76
|
+
React.createElement(Tooltip.Portal, null,
|
|
77
|
+
React.createElement(Tooltip.Content, { side: 'bottom' },
|
|
78
|
+
t(isConnected ? 'disconnect label' : 'connect label'),
|
|
79
|
+
React.createElement(Tooltip.Arrow, null))))))));
|
|
51
80
|
};
|
|
52
81
|
export const IdentityPanelImpl = (props) => {
|
|
53
82
|
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, onManageCredentials, ...rest } = props;
|
|
@@ -62,19 +91,32 @@ export const IdentityPanelImpl = (props) => {
|
|
|
62
91
|
}, [activeView, t]);
|
|
63
92
|
const onCancelReset = () => { var _a; return (_a = rest.send) === null || _a === void 0 ? void 0 : _a.call(rest, 'unchooseAction'); };
|
|
64
93
|
const hideRecover = rest.agentStatus !== 'created';
|
|
65
|
-
return (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
94
|
+
return (React.createElement(React.Fragment, null,
|
|
95
|
+
React.createElement(IdentityHeading, { identity,
|
|
96
|
+
titleId,
|
|
97
|
+
title,
|
|
98
|
+
hideRecover,
|
|
99
|
+
onDone,
|
|
100
|
+
onUpdateProfile,
|
|
101
|
+
connectionState,
|
|
102
|
+
onChangeConnectionState,
|
|
103
|
+
onManageCredentials }),
|
|
104
|
+
React.createElement(Viewport.Root, { activeView: activeView },
|
|
105
|
+
React.createElement(Viewport.Views, null,
|
|
106
|
+
React.createElement(Viewport.View, { id: 'identity action chooser', classNames: viewStyles },
|
|
107
|
+
React.createElement(IdentityActionChooserComponent, { active: activeView === 'identity action chooser', ...rest, connectionState: connectionState })),
|
|
108
|
+
React.createElement(Viewport.View, { id: 'device invitation manager', classNames: viewStyles },
|
|
109
|
+
React.createElement(InvitationManagerComponent, { active: activeView === 'device invitation manager', ...rest, invitationUrl: rest.createInvitationUrl(rest.invitationCode) })),
|
|
110
|
+
React.createElement(Viewport.View, { classNames: viewStyles, id: 'confirm join new identity' },
|
|
111
|
+
React.createElement(ConfirmReset, { active: activeView === 'confirm join new identity', ...rest, mode: 'join new identity', onConfirm: onJoinNewIdentity, onCancel: onCancelReset })),
|
|
112
|
+
React.createElement(Viewport.View, { classNames: viewStyles, id: 'confirm recover' },
|
|
113
|
+
React.createElement(ConfirmReset, { active: activeView === 'confirm recover', ...rest, mode: 'recover', onConfirm: onRecover, onCancel: onCancelReset })),
|
|
114
|
+
React.createElement(Viewport.View, { classNames: viewStyles, id: 'confirm reset storage' },
|
|
115
|
+
React.createElement(ConfirmReset, { active: activeView === 'confirm reset storage', ...rest, mode: 'reset storage', onConfirm: onResetStorage, onCancel: onCancelReset }))))));
|
|
74
116
|
};
|
|
75
117
|
const IdentityPanelWithInvitationImpl = ({ invitation, ...props }) => {
|
|
76
118
|
const invitationStatus = useInvitationStatus(invitation);
|
|
77
|
-
return
|
|
119
|
+
return React.createElement(IdentityPanelImpl, { ...props, ...invitationStatus });
|
|
78
120
|
};
|
|
79
121
|
export const IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code, initialDisposition = 'default', ...props }) => {
|
|
80
122
|
const titleId = useId('identityPanel__heading', propsTitleId);
|
|
@@ -131,6 +173,6 @@ export const IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (co
|
|
|
131
173
|
onChangeConnectionState: handleChangeConnectionState,
|
|
132
174
|
...agentProps,
|
|
133
175
|
};
|
|
134
|
-
return identityState.context.invitation ? (
|
|
176
|
+
return identityState.context.invitation ? (React.createElement(IdentityPanelWithInvitationImpl, { ...implProps, invitation: identityState.context.invitation })) : (React.createElement(IdentityPanelImpl, { ...implProps }));
|
|
135
177
|
};
|
|
136
178
|
//# sourceMappingURL=IdentityPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityPanel.js","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityPanel.js","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,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ACf,eAAe;QACf,uBAAuB,EAAE,2BAA2B;QACpD,GAAG,UAAU;KACmB,CAAC;IAEnC,OAAO,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CACxC,oBAAC,+BAA+B,OAAK,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,UAAU,GAAI,CACjG,CAAC,CAAC,CAAC,CACF,oBAAC,iBAAiB,OAAK,SAAS,GAAI,CACrC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
5
|
decorators: import("@storybook/react").Decorator[];
|
|
@@ -12,14 +13,14 @@ declare const _default: {
|
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
export default _default;
|
|
15
|
-
export declare const IdentityActionChooser: () =>
|
|
16
|
-
export declare const DeviceInvitationManager: () =>
|
|
17
|
-
export declare const DeviceInvitationManagerConnecting: () =>
|
|
18
|
-
export declare const DeviceInvitationManagerConnected: () =>
|
|
19
|
-
export declare const DeviceInvitationManagerReady: () =>
|
|
20
|
-
export declare const DeviceInvitationManagerAuthenticating: () =>
|
|
21
|
-
export declare const DeviceInvitationManagerSuccess: () =>
|
|
22
|
-
export declare const DeviceInvitationManagerError: () =>
|
|
23
|
-
export declare const DeviceInvitationManagerTimeout: () =>
|
|
24
|
-
export declare const DeviceInvitationManagerCancelled: () =>
|
|
16
|
+
export declare const IdentityActionChooser: () => React.JSX.Element;
|
|
17
|
+
export declare const DeviceInvitationManager: () => React.JSX.Element;
|
|
18
|
+
export declare const DeviceInvitationManagerConnecting: () => React.JSX.Element;
|
|
19
|
+
export declare const DeviceInvitationManagerConnected: () => React.JSX.Element;
|
|
20
|
+
export declare const DeviceInvitationManagerReady: () => React.JSX.Element;
|
|
21
|
+
export declare const DeviceInvitationManagerAuthenticating: () => React.JSX.Element;
|
|
22
|
+
export declare const DeviceInvitationManagerSuccess: () => React.JSX.Element;
|
|
23
|
+
export declare const DeviceInvitationManagerError: () => React.JSX.Element;
|
|
24
|
+
export declare const DeviceInvitationManagerTimeout: () => React.JSX.Element;
|
|
25
|
+
export declare const DeviceInvitationManagerCancelled: () => React.JSX.Element;
|
|
25
26
|
//# sourceMappingURL=IdentityPanel.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityPanel.stories.d.ts","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"IdentityPanel.stories.d.ts","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;;;;;AAmC1B,wBASE;AAEF,eAAO,MAAM,qBAAqB,yBAUjC,CAAC;AAaF,eAAO,MAAM,uBAAuB,yBAC0C,CAAC;AAE/E,eAAO,MAAM,iCAAiC,yBAI1C,CAAC;AAEL,eAAO,MAAM,gCAAgC,yBAIzC,CAAC;AAEL,eAAO,MAAM,4BAA4B,yBAKrC,CAAC;AAEL,eAAO,MAAM,qCAAqC,yBAI9C,CAAC;AAEL,eAAO,MAAM,8BAA8B,yBAC6B,CAAC;AAEzE,eAAO,MAAM,4BAA4B,yBAA6E,CAAC;AAEvH,eAAO,MAAM,8BAA8B,yBAC6B,CAAC;AAEzE,eAAO,MAAM,gCAAgC,yBAGzC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
4
|
import '@dxos-theme';
|
|
5
|
+
import React from 'react';
|
|
6
6
|
import { IdentityDid } from '@dxos/keys';
|
|
7
7
|
import { ConnectionState } from '@dxos/protocols/proto/dxos/client/services';
|
|
8
8
|
import { faker } from '@dxos/random';
|
|
@@ -42,9 +42,11 @@ export default {
|
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
export const IdentityActionChooser = () => {
|
|
45
|
-
return (
|
|
45
|
+
return (React.createElement(StorybookDialog, { inOverlayLayout: true },
|
|
46
|
+
React.createElement(IdentityPanelImpl, { ...noOpProps, activeView: 'identity action chooser', IdentityActionChooser: IdentityActionChooserImpl })));
|
|
46
47
|
};
|
|
47
|
-
const DeviceInvitationManagerWithState = (extraProps) => (
|
|
48
|
+
const DeviceInvitationManagerWithState = (extraProps) => (React.createElement(StorybookDialog, { inOverlayLayout: true },
|
|
49
|
+
React.createElement(IdentityPanelImpl, { ...noOpProps, activeView: 'device invitation manager', IdentityActionChooser: IdentityActionChooserImpl, InvitationManager: (props) => React.createElement(InvitationManager, { ...props, ...extraProps }) })));
|
|
48
50
|
export const DeviceInvitationManager = () => DeviceInvitationManagerWithState({ status: Invitation.State.INIT, id: '0' });
|
|
49
51
|
export const DeviceInvitationManagerConnecting = () => DeviceInvitationManagerWithState({
|
|
50
52
|
status: Invitation.State.CONNECTING,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityPanel.stories.js","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityPanel.stories.js","sourceRoot":"","sources":["../../../../../src/panels/IdentityPanel/IdentityPanel.stories.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,M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AM,EAAE,UAAU,CAAC,KAAK,CAAC,cAAc;IACvC,EAAE,EAAE,GAAG;CACR,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CACjD,gCAAgC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE,CAAC,gCAAgC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;AAEvH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CACjD,gCAAgC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,EAAE,CACnD,gCAAgC,CAAC;IAC/B,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS;CACnC,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type AgentFormProps, type DeviceListProps } from '../../../components';
|
|
2
3
|
import { type IdentityPanelStepProps } from '../IdentityPanelProps';
|
|
3
4
|
export type IdentityActionChooserProps = IdentityPanelStepProps;
|
|
4
|
-
export declare const IdentityActionChooser: (props: IdentityPanelStepProps) =>
|
|
5
|
+
export declare const IdentityActionChooser: (props: IdentityPanelStepProps) => React.JSX.Element;
|
|
5
6
|
export type IdentityActionChooserImplProps = IdentityActionChooserProps & Partial<AgentFormProps> & Pick<DeviceListProps, 'onClickAdd' | 'onClickJoinExisting' | 'onClickRecover' | 'onClickReset'>;
|
|
6
|
-
export declare const IdentityActionChooserImpl: ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }: IdentityActionChooserImplProps) =>
|
|
7
|
+
export declare const IdentityActionChooserImpl: ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }: IdentityActionChooserImplProps) => React.JSX.Element;
|
|
7
8
|
//# sourceMappingURL=IdentityActionChooser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityActionChooser.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/IdentityActionChooser.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdentityActionChooser.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/IdentityActionChooser.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAe,KAAK,cAAc,EAAc,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,UAAW,sBAAsB,sBA6BlE,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,GACrE,OAAO,CAAC,cAAc,CAAC,GACvB,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,cAAc,CAAC,CAAC;AAElG,eAAO,MAAM,yBAAyB,oIASnC,8BAA8B,sBAkBhC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
import React from 'react';
|
|
2
5
|
import { log } from '@dxos/log';
|
|
3
6
|
import { useClient } from '@dxos/react-client';
|
|
4
7
|
import { useHaloInvitations, DeviceType } from '@dxos/react-client/halo';
|
|
@@ -26,10 +29,12 @@ export const IdentityActionChooser = (props) => {
|
|
|
26
29
|
send === null || send === void 0 ? void 0 : send({ type: 'selectInvitation', invitation });
|
|
27
30
|
};
|
|
28
31
|
const isProduction = ((_c = (_b = (_a = client.config.values.runtime) === null || _a === void 0 ? void 0 : _a.app) === null || _b === void 0 ? void 0 : _b.env) === null || _c === void 0 ? void 0 : _c.DX_ENVIRONMENT) === 'production';
|
|
29
|
-
return (
|
|
32
|
+
return (React.createElement(IdentityActionChooserImpl, { ...props, onClickAdd: createInvitation, onClickJoinExisting: () => send === null || send === void 0 ? void 0 : send({ type: 'chooseJoinNewIdentity' }), onClickRecover: isProduction ? undefined : () => send === null || send === void 0 ? void 0 : send({ type: 'chooseRecoverIdentity' }), onClickReset: () => send === null || send === void 0 ? void 0 : send({ type: 'chooseResetStorage' }) }));
|
|
30
33
|
};
|
|
31
34
|
export const IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }) => {
|
|
32
35
|
const edgeDeviceAvailable = devices.find((device) => { var _a, _b, _c; return ((_a = device.profile) === null || _a === void 0 ? void 0 : _a.type) === DeviceType.AGENT_MANAGED && ((_c = (_b = device.profile) === null || _b === void 0 ? void 0 : _b.os) === null || _c === void 0 ? void 0 : _c.toUpperCase()) === 'EDGE'; });
|
|
33
|
-
return (
|
|
36
|
+
return (React.createElement("div", { role: 'none', className: 'bs-40 grow overflow-y-auto' },
|
|
37
|
+
React.createElement(DeviceList, { devices: devices, connectionState: connectionState, onClickAdd: onClickAdd, onClickJoinExisting: onClickJoinExisting, onClickRecover: agentProps.agentStatus === 'created' ? onClickRecover : undefined, onClickReset: onClickReset, onAgentDestroy: agentProps.onAgentDestroy }),
|
|
38
|
+
!edgeDeviceAvailable && agentHostingEnabled && React.createElement(AgentConfig, { ...agentProps })));
|
|
34
39
|
};
|
|
35
40
|
//# sourceMappingURL=IdentityActionChooser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityActionChooser.js","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/IdentityActionChooser.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"IdentityActionChooser.js","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/IdentityActionChooser.tsx"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,EAAE,WAAW,EAAuB,UAAU,EAAwB,MAAM,qBAAqB,CAAC;AAKzG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAE,EAAE;;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,WAAW,GAAG,kBAAkB,EAAE,CAAC;IACzC,MAAM,gBAAgB,GAAG,GAAG,EAAE;;QAC5B,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACzD,2DAA2D;QAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACvC,IAAI,CAAA,MAAA,MAAA,MAAA,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,0CAAE,GAAG,0CAAE,GAAG,0CAAE,cAAc,MAAK,YAAY,EAAE,CAAC;YAC5E,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,UAAsB,EAAE,EAAE;gBACnE,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC5D,IAAI,UAAU,CAAC,KAAK,KA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C,IAAI,CACtC,CAAC,MAAM,EAAE,EAAE,mBAAC,OAAA,CAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,IAAI,MAAK,UAAU,CAAC,aAAa,IAAI,CAAA,MAAA,MAAA,MAAM,CAAC,OAAO,0CAAE,EAAE,0CAAE,WAAW,EAAE,MAAK,MAAM,CAAA,EAAA,CAC9G,CAAC;IACF,OAAO,CACL,6BAAK,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,4BAA4B;QACrD,oBAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,cAAc,EAAE,UAAU,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EACjF,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,UAAU,CAAC,cAAe,GAC1C;QACD,CAAC,mBAAmB,IAAI,mBAAmB,IAAI,oBAAC,WAAW,OAAM,UAA6B,GAAI,CAC/F,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type Event, type SingleOrArray } from 'xstate';
|
|
2
3
|
import { type Identity } from '@dxos/react-client/halo';
|
|
3
4
|
import { type IdentityPanelStepProps } from '../IdentityPanelProps';
|
|
@@ -10,5 +11,5 @@ export interface ProfileFormProps extends Omit<IdentityPanelStepProps, 'send' |
|
|
|
10
11
|
export type ProfileFormImplProps = ProfileFormProps & {
|
|
11
12
|
validationMessage?: string;
|
|
12
13
|
};
|
|
13
|
-
export declare const ProfileForm: (props: ProfileFormProps) =>
|
|
14
|
+
export declare const ProfileForm: (props: ProfileFormProps) => React.JSX.Element;
|
|
14
15
|
//# sourceMappingURL=ProfileForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileForm.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/ProfileForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProfileForm.d.ts","sourceRoot":"","sources":["../../../../../../src/panels/IdentityPanel/steps/ProfileForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGxD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxF,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,IAAI,CAAC;IAC5D,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,gBAAgB,sBAWlD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
//
|
|
3
2
|
// Copyright 2023 DXOS.org
|
|
4
3
|
//
|
|
5
|
-
import { useState } from 'react';
|
|
4
|
+
import React, { useState } from 'react';
|
|
6
5
|
import { log } from '@dxos/log';
|
|
7
6
|
import { useClipboard, useTranslation } from '@dxos/react-ui';
|
|
8
7
|
import { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';
|
|
@@ -18,7 +17,7 @@ export const ProfileForm = (props) => {
|
|
|
18
17
|
setValidationMessage(t('failed to update profile message'));
|
|
19
18
|
}));
|
|
20
19
|
};
|
|
21
|
-
return
|
|
20
|
+
return React.createElement(ProfileFormImpl, { ...props, onUpdateProfile: handleUpdateProfile, validationMessage: validationMessage });
|
|
22
21
|
};
|
|
23
22
|
const getHueValue = (identity) => { var _a, _b, _c; return ((_b = (_a = identity === null || identity === void 0 ? void 0 : identity.profile) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.hue) || hexToHue((_c = identity === null || identity === void 0 ? void 0 : identity.identityKey.toHex()) !== null && _c !== void 0 ? _c : '0'); };
|
|
24
23
|
const getEmojiValue = (identity) => { var _a, _b, _c; return ((_b = (_a = identity === null || identity === void 0 ? void 0 : identity.profile) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.emoji) || hexToEmoji((_c = identity === null || identity === void 0 ? void 0 : identity.identityKey.toHex()) !== null && _c !== void 0 ? _c : '0'); };
|
|
@@ -35,13 +34,23 @@ const ProfileFormImpl = (props) => {
|
|
|
35
34
|
const { textValue, setTextValue } = useClipboard();
|
|
36
35
|
const identityHex = identity === null || identity === void 0 ? void 0 : identity.identityKey.toHex();
|
|
37
36
|
const copied = textValue === identityHex;
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
return (React.createElement(React.Fragment, null,
|
|
38
|
+
React.createElement("div", { role: 'none', className: 'grow flex flex-col justify-center' },
|
|
39
|
+
React.createElement(Input, { validationMessage, label: React.createElement(StepHeading, { className: 'm-0' }, t('display name input label')), disabled: disabled, "data-testid": 'display-name-input', placeholder: t('display name input placeholder'), value: displayName, onChange: ({ target: { value } }) => setDisplayName(value) }),
|
|
40
|
+
React.createElement(StepHeading, { className: 'mbe-2' }, t('emoji and color label')),
|
|
41
|
+
React.createElement("div", { role: 'none', className: 'grid grid-cols-[1fr_min-content] gap-y-2' },
|
|
42
|
+
React.createElement(EmojiPickerBlock, { emoji: emoji, onChangeEmoji: setEmoji, disabled: disabled, onClickClear: () => setEmoji(getEmojiValue(identity)) }),
|
|
43
|
+
React.createElement(HuePicker, { disabled: disabled, value: hue, onChange: setHue, onReset: () => setHue(getHueValue(identity)) }))),
|
|
44
|
+
React.createElement(Actions, null,
|
|
45
|
+
React.createElement(Action, { variant: 'ghost', disabled: disabled, onClick: () => {
|
|
46
|
+
if (identityHex) {
|
|
47
|
+
void setTextValue(identityHex);
|
|
48
|
+
}
|
|
49
|
+
}, "data-testid": 'update-profile-form-copy-key' }, t(copied ? 'copy success label' : 'copy self public key label')),
|
|
50
|
+
React.createElement(Action, { variant: 'ghost', disabled: disabled, onClick: () => send === null || send === void 0 ? void 0 : send({ type: 'unchooseAction' }), "data-testid": 'update-profile-form-back' }, t('back label')),
|
|
51
|
+
React.createElement(Action, { variant: 'primary', disabled: disabled, onClick: () => onUpdateProfile === null || onUpdateProfile === void 0 ? void 0 : onUpdateProfile({
|
|
52
|
+
...(displayName && { displayName }),
|
|
53
|
+
...((emoji || hue) && { data: { ...(emoji && { emoji }), ...(hue && { hue }) } }),
|
|
54
|
+
}), "data-testid": 'update-profile-form-continue' }, t('done label')))));
|
|
46
55
|
};
|
|
47
56
|
//# sourceMappingURL=ProfileForm.js.map
|