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