@dxos/shell 0.6.14-main.8b352a0 → 0.6.14-staging.54a8bab
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 +1351 -1341
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +29 -29
- 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 +11 -8
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react.cjs +11 -8
- 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 +11 -8
- 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 +13 -6
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +1 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js +5 -0
- package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js.map +1 -1
- package/package.json +25 -25
- package/src/panels/IdentityPanel/IdentityPanel.tsx +13 -3
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +1 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +1 -1
- package/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts +7 -0
package/dist/lib/node/react.cjs
CHANGED
|
@@ -225,6 +225,7 @@ var import_react_client4 = require("@dxos/react-client");
|
|
|
225
225
|
var import_react41 = require("react");
|
|
226
226
|
var import_invariant2 = require("@dxos/invariant");
|
|
227
227
|
var import_services = require("@dxos/protocols/proto/dxos/client/services");
|
|
228
|
+
var import_metadata = require("@dxos/protocols/proto/dxos/echo/metadata");
|
|
228
229
|
var import_react_client5 = require("@dxos/react-client");
|
|
229
230
|
var import_react42 = require("react");
|
|
230
231
|
var import_invariant3 = require("@dxos/invariant");
|
|
@@ -1582,7 +1583,7 @@ var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled
|
|
|
1582
1583
|
connectionState,
|
|
1583
1584
|
onClickAdd,
|
|
1584
1585
|
onClickJoinExisting,
|
|
1585
|
-
onClickRecover,
|
|
1586
|
+
onClickRecover: agentProps.agentStatus === "created" ? onClickRecover : void 0,
|
|
1586
1587
|
onClickReset,
|
|
1587
1588
|
onAgentDestroy: agentProps.onAgentDestroy
|
|
1588
1589
|
}), !managedDeviceAvailable && agentHostingEnabled && /* @__PURE__ */ import_react39.default.createElement(AgentConfig, agentProps));
|
|
@@ -1622,7 +1623,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1622
1623
|
const onAgentCreate = async () => {
|
|
1623
1624
|
(0, import_invariant2.invariant)(identity, "Identity not found", {
|
|
1624
1625
|
F: __dxlog_file3,
|
|
1625
|
-
L:
|
|
1626
|
+
L: 58,
|
|
1626
1627
|
S: void 0,
|
|
1627
1628
|
A: [
|
|
1628
1629
|
"identity",
|
|
@@ -1644,6 +1645,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1644
1645
|
setValidationMessage("");
|
|
1645
1646
|
try {
|
|
1646
1647
|
await service.createAgent();
|
|
1648
|
+
await Promise.all(client.spaces.get().map((space) => space?.internal.setEdgeReplicationPreference(import_metadata.EdgeReplicationSetting.ENABLED)));
|
|
1647
1649
|
setAgentStatus("created");
|
|
1648
1650
|
} catch (err) {
|
|
1649
1651
|
setAgentStatus("error");
|
|
@@ -1977,7 +1979,7 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
|
|
|
1977
1979
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1978
1980
|
var getHueValue = (identity) => identity?.profile?.data?.hue || (0, import_util5.hexToHue)(identity?.identityKey.toHex() ?? "0");
|
|
1979
1981
|
var getEmojiValue = (identity) => identity?.profile?.data?.emoji || (0, import_util5.hexToEmoji)(identity?.identityKey.toHex() ?? "0");
|
|
1980
|
-
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1982
|
+
var IdentityHeading = ({ titleId, title, identity, hideRecover, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1981
1983
|
const client = (0, import_react_client2.useClient)();
|
|
1982
1984
|
const fallbackValue = (0, import_util5.keyToFallback)(identity.identityKey);
|
|
1983
1985
|
const { t } = (0, import_react_ui18.useTranslation)("os");
|
|
@@ -2010,7 +2012,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
2010
2012
|
const handleRecoveryCode = async () => {
|
|
2011
2013
|
(0, import_invariant.invariant)(client.services.services.IdentityService, "IdentityService not available", {
|
|
2012
2014
|
F: __dxlog_file6,
|
|
2013
|
-
L:
|
|
2015
|
+
L: 77,
|
|
2014
2016
|
S: void 0,
|
|
2015
2017
|
A: [
|
|
2016
2018
|
"client.services.services.IdentityService",
|
|
@@ -2021,7 +2023,6 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
2021
2023
|
void setTextValue(seedphrase);
|
|
2022
2024
|
};
|
|
2023
2025
|
const isConnected = connectionState === import_mesh2.ConnectionState.ONLINE;
|
|
2024
|
-
const isProduction = client.config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production";
|
|
2025
2026
|
return /* @__PURE__ */ import_react37.default.createElement(Heading, {
|
|
2026
2027
|
titleId,
|
|
2027
2028
|
title,
|
|
@@ -2078,7 +2079,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
2078
2079
|
}))), /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Portal, null, /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Content, {
|
|
2079
2080
|
side: "bottom",
|
|
2080
2081
|
classNames: "z-50"
|
|
2081
|
-
}, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Arrow, null)))), !
|
|
2082
|
+
}, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Arrow, null)))), !hideRecover && /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Root, null, /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Tooltip.Trigger, {
|
|
2082
2083
|
asChild: true
|
|
2083
2084
|
}, /* @__PURE__ */ import_react37.default.createElement(import_react_ui18.Toolbar.Button, {
|
|
2084
2085
|
classNames: "bs-[--rail-action]",
|
|
@@ -2122,10 +2123,12 @@ var IdentityPanelImpl = (props) => {
|
|
|
2122
2123
|
t
|
|
2123
2124
|
]);
|
|
2124
2125
|
const onCancelReset = () => rest.send?.("unchooseAction");
|
|
2126
|
+
const hideRecover = rest.agentStatus !== "created";
|
|
2125
2127
|
return /* @__PURE__ */ import_react37.default.createElement(import_react37.default.Fragment, null, /* @__PURE__ */ import_react37.default.createElement(IdentityHeading, {
|
|
2126
2128
|
identity,
|
|
2127
2129
|
titleId,
|
|
2128
2130
|
title,
|
|
2131
|
+
hideRecover,
|
|
2129
2132
|
onDone,
|
|
2130
2133
|
onUpdateProfile,
|
|
2131
2134
|
connectionState,
|
|
@@ -2195,7 +2198,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
2195
2198
|
if (!identity) {
|
|
2196
2199
|
import_log.log.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
2197
2200
|
F: __dxlog_file6,
|
|
2198
|
-
L:
|
|
2201
|
+
L: 288,
|
|
2199
2202
|
S: void 0,
|
|
2200
2203
|
C: (f, a) => f(...a)
|
|
2201
2204
|
});
|
|
@@ -2212,7 +2215,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
2212
2215
|
const subscription = identityService.subscribe((state) => {
|
|
2213
2216
|
(0, import_log.log)("[state]", state, {
|
|
2214
2217
|
F: __dxlog_file6,
|
|
2215
|
-
L:
|
|
2218
|
+
L: 301,
|
|
2216
2219
|
S: void 0,
|
|
2217
2220
|
C: (f, a) => f(...a)
|
|
2218
2221
|
});
|