@dxos/shell 0.7.5-labs.071a3e2 → 0.7.5-labs.401163d
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 +2010 -2252
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +55 -55
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +26 -22
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +18 -14
- package/dist/lib/node/react.cjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react.mjs +26 -22
- package/dist/lib/node-esm/react.mjs.map +3 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +11 -12
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +1 -0
- 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/translations/locales/en-US.d.ts +3 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +3 -1
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/package.json +26 -26
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +1 -0
- package/src/panels/IdentityPanel/IdentityPanel.tsx +27 -25
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +8 -1
- package/src/translations/locales/en-US.ts +3 -1
|
@@ -871,10 +871,10 @@ var SpaceListItem = /* @__PURE__ */ forwardRef8(({ space, onClick }, ref) => {
|
|
|
871
871
|
|
|
872
872
|
// packages/sdk/shell/src/composites/IdentityDialog/IdentityDialog.tsx
|
|
873
873
|
import React38 from "react";
|
|
874
|
-
import { Clipboard as
|
|
874
|
+
import { Clipboard as Clipboard4, Dialog, useId as useId10 } from "@dxos/react-ui";
|
|
875
875
|
|
|
876
876
|
// packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
|
|
877
|
-
import {
|
|
877
|
+
import { IdentificationCard, Plugs, PlugsConnected } from "@phosphor-icons/react";
|
|
878
878
|
import React25, { useEffect as useEffect4, useMemo as useMemo3, useState as useState5 } from "react";
|
|
879
879
|
import { generateName as generateName3 } from "@dxos/display-name";
|
|
880
880
|
import { log as log7 } from "@dxos/log";
|
|
@@ -882,7 +882,7 @@ import { useClient as useClient6 } from "@dxos/react-client";
|
|
|
882
882
|
import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
|
|
883
883
|
import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
|
|
884
884
|
import { useNetworkStatus, ConnectionState as ConnectionState2 } from "@dxos/react-client/mesh";
|
|
885
|
-
import { Avatar as Avatar6, Input as Input2, Toolbar, Tooltip as Tooltip3,
|
|
885
|
+
import { Avatar as Avatar6, Clipboard as Clipboard3, Input as Input2, Toolbar, Tooltip as Tooltip3, useId as useId6, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
886
886
|
import { EmojiPickerToolbarButton, HuePickerToolbarButton } from "@dxos/react-ui-pickers";
|
|
887
887
|
import { getSize as getSize10 } from "@dxos/react-ui-theme";
|
|
888
888
|
import { hexToEmoji as hexToEmoji4, hexToHue as hexToHue2, keyToFallback as keyToFallback3 } from "@dxos/util";
|
|
@@ -1513,15 +1513,12 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
|
|
|
1513
1513
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1514
1514
|
var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
|
|
1515
1515
|
var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
|
|
1516
|
-
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1516
|
+
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState, onManageCredentials }) => {
|
|
1517
1517
|
const fallbackValue = keyToFallback3(identity.identityKey);
|
|
1518
1518
|
const { t } = useTranslation11("os");
|
|
1519
1519
|
const [displayName, setDisplayName] = useState5(identity.profile?.displayName ?? "");
|
|
1520
1520
|
const [emoji, setEmojiDirectly] = useState5(getEmojiValue(identity));
|
|
1521
1521
|
const [hue, setHueDirectly] = useState5(getHueValue(identity));
|
|
1522
|
-
const { textValue, setTextValue } = useClipboard2();
|
|
1523
|
-
const identityHex = identity.identityKey.toHex();
|
|
1524
|
-
const publicKeyCopied = textValue === identityHex;
|
|
1525
1522
|
const setEmoji = (nextEmoji) => {
|
|
1526
1523
|
setEmojiDirectly(nextEmoji);
|
|
1527
1524
|
void onUpdateProfile?.({
|
|
@@ -1586,19 +1583,23 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1586
1583
|
hue,
|
|
1587
1584
|
onChangeHue: setHue,
|
|
1588
1585
|
classNames: "bs-[--rail-action]"
|
|
1589
|
-
}), /* @__PURE__ */ React25.createElement(
|
|
1586
|
+
}), /* @__PURE__ */ React25.createElement(Clipboard3.IconButton, {
|
|
1587
|
+
classNames: "bs-[--rail-action]",
|
|
1588
|
+
"data-testid": "update-profile-form-copy-key",
|
|
1589
|
+
label: t("copy self did label"),
|
|
1590
|
+
value: identity.did
|
|
1591
|
+
}), onManageCredentials && /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
|
|
1590
1592
|
asChild: true
|
|
1591
1593
|
}, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
|
|
1592
1594
|
classNames: "bs-[--rail-action]",
|
|
1593
|
-
|
|
1594
|
-
onClick: () => setTextValue(identityHex)
|
|
1595
|
+
onClick: onManageCredentials
|
|
1595
1596
|
}, /* @__PURE__ */ React25.createElement("span", {
|
|
1596
1597
|
className: "sr-only"
|
|
1597
|
-
}, t(
|
|
1598
|
+
}, t("manage credentials label")), /* @__PURE__ */ React25.createElement(IdentificationCard, {
|
|
1598
1599
|
className: getSize10(5)
|
|
1599
1600
|
}))), /* @__PURE__ */ React25.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React25.createElement(Tooltip3.Content, {
|
|
1600
1601
|
side: "bottom"
|
|
1601
|
-
}, t(
|
|
1602
|
+
}, t("manage credentials label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))), /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
|
|
1602
1603
|
asChild: true
|
|
1603
1604
|
}, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
|
|
1604
1605
|
classNames: [
|
|
@@ -1617,7 +1618,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1617
1618
|
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))))));
|
|
1618
1619
|
};
|
|
1619
1620
|
var IdentityPanelImpl = (props) => {
|
|
1620
|
-
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
|
|
1621
|
+
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, onManageCredentials, ...rest } = props;
|
|
1621
1622
|
const { t } = useTranslation11("os");
|
|
1622
1623
|
const title = useMemo3(() => {
|
|
1623
1624
|
switch (activeView) {
|
|
@@ -1640,7 +1641,8 @@ var IdentityPanelImpl = (props) => {
|
|
|
1640
1641
|
onDone,
|
|
1641
1642
|
onUpdateProfile,
|
|
1642
1643
|
connectionState,
|
|
1643
|
-
onChangeConnectionState
|
|
1644
|
+
onChangeConnectionState,
|
|
1645
|
+
onManageCredentials
|
|
1644
1646
|
}), /* @__PURE__ */ React25.createElement(Viewport.Root, {
|
|
1645
1647
|
activeView
|
|
1646
1648
|
}, /* @__PURE__ */ React25.createElement(Viewport.Views, null, /* @__PURE__ */ React25.createElement(Viewport.View, {
|
|
@@ -1706,7 +1708,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1706
1708
|
if (!identity) {
|
|
1707
1709
|
log7.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
1708
1710
|
F: __dxlog_file6,
|
|
1709
|
-
L:
|
|
1711
|
+
L: 258,
|
|
1710
1712
|
S: void 0,
|
|
1711
1713
|
C: (f, a) => f(...a)
|
|
1712
1714
|
});
|
|
@@ -1723,7 +1725,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1723
1725
|
const subscription = identityService.subscribe((state) => {
|
|
1724
1726
|
log7("[state]", state, {
|
|
1725
1727
|
F: __dxlog_file6,
|
|
1726
|
-
L:
|
|
1728
|
+
L: 271,
|
|
1727
1729
|
S: void 0,
|
|
1728
1730
|
C: (f, a) => f(...a)
|
|
1729
1731
|
});
|
|
@@ -3613,7 +3615,7 @@ var IdentityDialog = (props) => {
|
|
|
3613
3615
|
}, /* @__PURE__ */ React38.createElement(Dialog.Portal, null, /* @__PURE__ */ React38.createElement(Dialog.Overlay, null, /* @__PURE__ */ React38.createElement(Dialog.Content, {
|
|
3614
3616
|
"aria-labelledby": titleId,
|
|
3615
3617
|
onOpenAutoFocus: (e) => e.preventDefault()
|
|
3616
|
-
}, /* @__PURE__ */ React38.createElement(
|
|
3618
|
+
}, /* @__PURE__ */ React38.createElement(Clipboard4.Provider, null, /* @__PURE__ */ React38.createElement(IdentityPanel, {
|
|
3617
3619
|
...props,
|
|
3618
3620
|
titleId,
|
|
3619
3621
|
doneActionParent: /* @__PURE__ */ React38.createElement(Dialog.Close, {
|
|
@@ -3657,7 +3659,7 @@ import React43, { StrictMode } from "react";
|
|
|
3657
3659
|
import { createRoot } from "react-dom/client";
|
|
3658
3660
|
import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
|
|
3659
3661
|
import { AgentHostingProvider, ClientProvider, ClientServicesProxy, Config, ShellDisplay as ShellDisplay2 } from "@dxos/react-client";
|
|
3660
|
-
import { Button as Button8, Clipboard as
|
|
3662
|
+
import { Button as Button8, Clipboard as Clipboard6, Dialog as Dialog3, ThemeProvider, Tooltip as Tooltip4, useTranslation as useTranslation23 } from "@dxos/react-ui";
|
|
3661
3663
|
import { defaultTx } from "@dxos/react-ui-theme";
|
|
3662
3664
|
import { createIFramePort } from "@dxos/rpc-tunnel";
|
|
3663
3665
|
|
|
@@ -3670,7 +3672,7 @@ import { useSpace as useSpace2 } from "@dxos/react-client/echo";
|
|
|
3670
3672
|
|
|
3671
3673
|
// packages/sdk/shell/src/composites/SpaceDialog/SpaceDialog.tsx
|
|
3672
3674
|
import React40 from "react";
|
|
3673
|
-
import { Clipboard as
|
|
3675
|
+
import { Clipboard as Clipboard5, Dialog as Dialog2, useId as useId12 } from "@dxos/react-ui";
|
|
3674
3676
|
var SpaceDialog = (spacePanelProps) => {
|
|
3675
3677
|
const titleId = useId12("spaceDialog__title");
|
|
3676
3678
|
return /* @__PURE__ */ React40.createElement(Dialog2.Root, {
|
|
@@ -3678,7 +3680,7 @@ var SpaceDialog = (spacePanelProps) => {
|
|
|
3678
3680
|
onOpenChange: (open) => open || spacePanelProps.onDone?.()
|
|
3679
3681
|
}, /* @__PURE__ */ React40.createElement(Dialog2.Portal, null, /* @__PURE__ */ React40.createElement(Dialog2.Overlay, null, /* @__PURE__ */ React40.createElement(Dialog2.Content, {
|
|
3680
3682
|
"aria-labelledby": titleId
|
|
3681
|
-
}, /* @__PURE__ */ React40.createElement(
|
|
3683
|
+
}, /* @__PURE__ */ React40.createElement(Clipboard5.Provider, null, /* @__PURE__ */ React40.createElement(SpacePanel, {
|
|
3682
3684
|
...spacePanelProps,
|
|
3683
3685
|
titleId,
|
|
3684
3686
|
doneActionParent: /* @__PURE__ */ React40.createElement(Dialog2.Close, {
|
|
@@ -3993,7 +3995,7 @@ var os = {
|
|
|
3993
3995
|
"sidebar label": "DXOS sidebar",
|
|
3994
3996
|
"copy invitation code label": "Copy URL",
|
|
3995
3997
|
"copy success label": "Copied",
|
|
3996
|
-
"copy self
|
|
3998
|
+
"copy self did label": "Copy DID",
|
|
3997
3999
|
"open share panel label": "View QR code",
|
|
3998
4000
|
"joining space heading": "Joining space",
|
|
3999
4001
|
"join space heading": "Enter space invitation",
|
|
@@ -4118,6 +4120,8 @@ var os = {
|
|
|
4118
4120
|
"fuchsia label": "Fuchsia",
|
|
4119
4121
|
"pink label": "Pink",
|
|
4120
4122
|
"rose label": "Rose",
|
|
4123
|
+
"select a hue label": "Select a hue",
|
|
4124
|
+
"hue label": "Hue",
|
|
4121
4125
|
"current device tag label": "This device",
|
|
4122
4126
|
"device name placeholder": "{{platform}} on {{os}}",
|
|
4123
4127
|
"more options label": "More options",
|
|
@@ -4165,7 +4169,7 @@ var runShell = async (config = new Config()) => {
|
|
|
4165
4169
|
config,
|
|
4166
4170
|
services,
|
|
4167
4171
|
noBanner: true
|
|
4168
|
-
}, /* @__PURE__ */ React43.createElement(
|
|
4172
|
+
}, /* @__PURE__ */ React43.createElement(Clipboard6.Provider, null, /* @__PURE__ */ React43.createElement(Tooltip4.Provider, null, /* @__PURE__ */ React43.createElement(AgentHostingProvider, null, /* @__PURE__ */ React43.createElement(Shell, {
|
|
4169
4173
|
runtime
|
|
4170
4174
|
}))))))));
|
|
4171
4175
|
} catch {
|