@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
package/dist/lib/node/react.cjs
CHANGED
|
@@ -1621,15 +1621,12 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
|
|
|
1621
1621
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1622
1622
|
var getHueValue = (identity) => identity?.profile?.data?.hue || (0, import_util5.hexToHue)(identity?.identityKey.toHex() ?? "0");
|
|
1623
1623
|
var getEmojiValue = (identity) => identity?.profile?.data?.emoji || (0, import_util5.hexToEmoji)(identity?.identityKey.toHex() ?? "0");
|
|
1624
|
-
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1624
|
+
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState, onManageCredentials }) => {
|
|
1625
1625
|
const fallbackValue = (0, import_util5.keyToFallback)(identity.identityKey);
|
|
1626
1626
|
const { t } = (0, import_react_ui15.useTranslation)("os");
|
|
1627
1627
|
const [displayName, setDisplayName] = (0, import_react29.useState)(identity.profile?.displayName ?? "");
|
|
1628
1628
|
const [emoji, setEmojiDirectly] = (0, import_react29.useState)(getEmojiValue(identity));
|
|
1629
1629
|
const [hue, setHueDirectly] = (0, import_react29.useState)(getHueValue(identity));
|
|
1630
|
-
const { textValue, setTextValue } = (0, import_react_ui15.useClipboard)();
|
|
1631
|
-
const identityHex = identity.identityKey.toHex();
|
|
1632
|
-
const publicKeyCopied = textValue === identityHex;
|
|
1633
1630
|
const setEmoji = (nextEmoji) => {
|
|
1634
1631
|
setEmojiDirectly(nextEmoji);
|
|
1635
1632
|
void onUpdateProfile?.({
|
|
@@ -1694,19 +1691,23 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1694
1691
|
hue,
|
|
1695
1692
|
onChangeHue: setHue,
|
|
1696
1693
|
classNames: "bs-[--rail-action]"
|
|
1697
|
-
}), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.
|
|
1694
|
+
}), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Clipboard.IconButton, {
|
|
1695
|
+
classNames: "bs-[--rail-action]",
|
|
1696
|
+
"data-testid": "update-profile-form-copy-key",
|
|
1697
|
+
label: t("copy self did label"),
|
|
1698
|
+
value: identity.did
|
|
1699
|
+
}), onManageCredentials && /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Root, null, /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Trigger, {
|
|
1698
1700
|
asChild: true
|
|
1699
1701
|
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Toolbar.Button, {
|
|
1700
1702
|
classNames: "bs-[--rail-action]",
|
|
1701
|
-
|
|
1702
|
-
onClick: () => setTextValue(identityHex)
|
|
1703
|
+
onClick: onManageCredentials
|
|
1703
1704
|
}, /* @__PURE__ */ import_react29.default.createElement("span", {
|
|
1704
1705
|
className: "sr-only"
|
|
1705
|
-
}, t(
|
|
1706
|
+
}, t("manage credentials label")), /* @__PURE__ */ import_react29.default.createElement(import_react28.IdentificationCard, {
|
|
1706
1707
|
className: (0, import_react_ui_theme19.getSize)(5)
|
|
1707
1708
|
}))), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Portal, null, /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Content, {
|
|
1708
1709
|
side: "bottom"
|
|
1709
|
-
}, t(
|
|
1710
|
+
}, t("manage credentials label"), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Arrow, null)))), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Root, null, /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Trigger, {
|
|
1710
1711
|
asChild: true
|
|
1711
1712
|
}, /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Toolbar.Button, {
|
|
1712
1713
|
classNames: [
|
|
@@ -1725,7 +1726,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1725
1726
|
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ import_react29.default.createElement(import_react_ui15.Tooltip.Arrow, null)))))));
|
|
1726
1727
|
};
|
|
1727
1728
|
var IdentityPanelImpl = (props) => {
|
|
1728
|
-
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
|
|
1729
|
+
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, onManageCredentials, ...rest } = props;
|
|
1729
1730
|
const { t } = (0, import_react_ui15.useTranslation)("os");
|
|
1730
1731
|
const title = (0, import_react29.useMemo)(() => {
|
|
1731
1732
|
switch (activeView) {
|
|
@@ -1748,7 +1749,8 @@ var IdentityPanelImpl = (props) => {
|
|
|
1748
1749
|
onDone,
|
|
1749
1750
|
onUpdateProfile,
|
|
1750
1751
|
connectionState,
|
|
1751
|
-
onChangeConnectionState
|
|
1752
|
+
onChangeConnectionState,
|
|
1753
|
+
onManageCredentials
|
|
1752
1754
|
}), /* @__PURE__ */ import_react29.default.createElement(Viewport.Root, {
|
|
1753
1755
|
activeView
|
|
1754
1756
|
}, /* @__PURE__ */ import_react29.default.createElement(Viewport.Views, null, /* @__PURE__ */ import_react29.default.createElement(Viewport.View, {
|
|
@@ -1814,7 +1816,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1814
1816
|
if (!identity) {
|
|
1815
1817
|
import_log.log.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
1816
1818
|
F: __dxlog_file6,
|
|
1817
|
-
L:
|
|
1819
|
+
L: 258,
|
|
1818
1820
|
S: void 0,
|
|
1819
1821
|
C: (f, a) => f(...a)
|
|
1820
1822
|
});
|
|
@@ -1831,7 +1833,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1831
1833
|
const subscription = identityService.subscribe((state) => {
|
|
1832
1834
|
(0, import_log.log)("[state]", state, {
|
|
1833
1835
|
F: __dxlog_file6,
|
|
1834
|
-
L:
|
|
1836
|
+
L: 271,
|
|
1835
1837
|
S: void 0,
|
|
1836
1838
|
C: (f, a) => f(...a)
|
|
1837
1839
|
});
|
|
@@ -3964,7 +3966,7 @@ var os = {
|
|
|
3964
3966
|
"sidebar label": "DXOS sidebar",
|
|
3965
3967
|
"copy invitation code label": "Copy URL",
|
|
3966
3968
|
"copy success label": "Copied",
|
|
3967
|
-
"copy self
|
|
3969
|
+
"copy self did label": "Copy DID",
|
|
3968
3970
|
"open share panel label": "View QR code",
|
|
3969
3971
|
"joining space heading": "Joining space",
|
|
3970
3972
|
"join space heading": "Enter space invitation",
|
|
@@ -4089,6 +4091,8 @@ var os = {
|
|
|
4089
4091
|
"fuchsia label": "Fuchsia",
|
|
4090
4092
|
"pink label": "Pink",
|
|
4091
4093
|
"rose label": "Rose",
|
|
4094
|
+
"select a hue label": "Select a hue",
|
|
4095
|
+
"hue label": "Hue",
|
|
4092
4096
|
"current device tag label": "This device",
|
|
4093
4097
|
"device name placeholder": "{{platform}} on {{os}}",
|
|
4094
4098
|
"more options label": "More options",
|