@dxos/shell 0.6.14-main.f49f251 → 0.6.14-staging.027949b
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 +5168 -5065
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +57 -57
- 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 +50 -53
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/lib/browser/testing/index.mjs +3 -39
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node/chunk-Q7SFCCGT.cjs +33 -0
- package/dist/lib/node/chunk-Q7SFCCGT.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/react.cjs +4760 -0
- package/dist/lib/node/react.cjs.map +7 -0
- package/dist/lib/node/react.css +7 -0
- package/dist/lib/node/react.css.map +7 -0
- package/dist/lib/node/testing/index.cjs +183 -0
- package/dist/lib/node/testing/index.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react.css +7 -0
- package/dist/lib/node-esm/react.css.map +7 -0
- package/dist/lib/node-esm/react.mjs +4806 -0
- package/dist/lib/node-esm/react.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +163 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/types/src/components/DeviceList/DeviceListItem.d.ts.map +1 -1
- package/dist/types/src/components/DeviceList/DeviceListItem.js +4 -10
- package/dist/types/src/components/DeviceList/DeviceListItem.js.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.stories.js +10 -10
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/components/Panel/Action.d.ts +2 -0
- package/dist/types/src/components/Panel/Action.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Action.js +16 -14
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +3 -3
- 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/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +2 -2
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +15 -15
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts +1 -0
- package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +5 -3
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/playwright/invitations-manager.d.ts +1 -2
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/playwright/invitations-manager.js +11 -4
- package/dist/types/src/playwright/invitations-manager.js.map +1 -1
- package/dist/types/src/playwright/invitations.spec.js +13 -9
- package/dist/types/src/playwright/invitations.spec.js.map +1 -1
- package/dist/types/src/testing/index.d.ts +0 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/index.js +1 -1
- package/dist/types/src/testing/index.js.map +1 -1
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
- package/dist/types/src/testing/shell-manager.js +2 -0
- package/dist/types/src/testing/shell-manager.js.map +1 -1
- package/package.json +38 -27
- package/src/components/DeviceList/DeviceListItem.tsx +38 -42
- package/src/components/IdentityList/SpaceMemberList.stories.tsx +1 -1
- package/src/components/InvitationList/InvitationList.stories.tsx +1 -1
- package/src/components/Panel/Action.tsx +40 -31
- package/src/panels/IdentityPanel/IdentityPanel.tsx +13 -3
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +1 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +5 -3
- package/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts +7 -0
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +1 -1
- package/src/panels/SpacePanel/SpacePanel.tsx +2 -1
- package/src/panels/SpacePanel/SpacePanelProps.ts +1 -0
- package/src/panels/SpacePanel/steps/SpaceManager.tsx +5 -3
- package/src/playwright/invitations-manager.ts +10 -4
- package/src/playwright/invitations.spec.ts +14 -9
- package/src/testing/index.ts +2 -1
- package/src/testing/shell-manager.ts +2 -0
|
@@ -576,7 +576,7 @@ import React9, { forwardRef as forwardRef2 } from "react";
|
|
|
576
576
|
import { generateName as generateName2 } from "@dxos/display-name";
|
|
577
577
|
import { Device, DeviceType, DeviceKind } from "@dxos/react-client/halo";
|
|
578
578
|
import { ConnectionState } from "@dxos/react-client/mesh";
|
|
579
|
-
import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation6, DropdownMenu as DropdownMenu2, Button as Button5
|
|
579
|
+
import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation6, DropdownMenu as DropdownMenu2, Button as Button5 } from "@dxos/react-ui";
|
|
580
580
|
import { getSize as getSize5 } from "@dxos/react-ui-theme";
|
|
581
581
|
import { keyToFallback as keyToFallback2 } from "@dxos/util";
|
|
582
582
|
var iconProps = {
|
|
@@ -586,7 +586,7 @@ var iconProps = {
|
|
|
586
586
|
x: 8,
|
|
587
587
|
y: 8
|
|
588
588
|
};
|
|
589
|
-
var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, classNames, connectionState, onAgentDestroy, ...props }, forwardedRef) => {
|
|
589
|
+
var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, classNames, connectionState, onAgentDestroy: _, ...props }, forwardedRef) => {
|
|
590
590
|
const { t } = useTranslation6("os");
|
|
591
591
|
const fallbackValue = keyToFallback2(device.deviceKey);
|
|
592
592
|
const labelId = useId3("identityListItem__label");
|
|
@@ -620,21 +620,7 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
|
|
|
620
620
|
classNames: "flex-1 text-sm truncate"
|
|
621
621
|
}, displayName), isCurrent && /* @__PURE__ */ React9.createElement(Tag, {
|
|
622
622
|
color: "primary"
|
|
623
|
-
}, t("current device tag label")), device.
|
|
624
|
-
asChild: true
|
|
625
|
-
}, /* @__PURE__ */ React9.createElement(Button5, {
|
|
626
|
-
variant: "ghost",
|
|
627
|
-
classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
|
|
628
|
-
"data-testid": "agent.destroy",
|
|
629
|
-
onClick: onAgentDestroy
|
|
630
|
-
}, /* @__PURE__ */ React9.createElement("span", {
|
|
631
|
-
className: "sr-only"
|
|
632
|
-
}, t("destroy agent label")), /* @__PURE__ */ React9.createElement(Power2, {
|
|
633
|
-
className: getSize5(5)
|
|
634
|
-
}))), /* @__PURE__ */ React9.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React9.createElement(Tooltip5.Content, {
|
|
635
|
-
side: "bottom",
|
|
636
|
-
classNames: "z-50"
|
|
637
|
-
}, t("destroy agent label")))) : device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
|
|
623
|
+
}, t("current device tag label")), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
|
|
638
624
|
asChild: true
|
|
639
625
|
}, /* @__PURE__ */ React9.createElement(Button5, {
|
|
640
626
|
variant: "ghost",
|
|
@@ -702,7 +688,7 @@ import { X } from "@phosphor-icons/react";
|
|
|
702
688
|
import { formatDistanceToNow } from "date-fns";
|
|
703
689
|
import React12, { useCallback as useCallback2 } from "react";
|
|
704
690
|
import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
|
|
705
|
-
import { Button as Button7, ListItem as ListItem3, useTranslation as useTranslation8, Avatar as Avatar4, useThemeContext as useThemeContext4, Tooltip as
|
|
691
|
+
import { Button as Button7, ListItem as ListItem3, useTranslation as useTranslation8, Avatar as Avatar4, useThemeContext as useThemeContext4, Tooltip as Tooltip5 } from "@dxos/react-ui";
|
|
706
692
|
import { focusRing, getSize as getSize7, mx as mx9 } from "@dxos/react-ui-theme";
|
|
707
693
|
import { hexToEmoji } from "@dxos/util";
|
|
708
694
|
|
|
@@ -833,11 +819,11 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
833
819
|
status: avatarStatus,
|
|
834
820
|
animation: avatarAnimation,
|
|
835
821
|
reverseEffects
|
|
836
|
-
}), /* @__PURE__ */ React12.createElement(
|
|
822
|
+
}), /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(Avatar4.Root, {
|
|
837
823
|
...avatarProps,
|
|
838
824
|
animation: avatarAnimation,
|
|
839
825
|
status: avatarStatus
|
|
840
|
-
}, /* @__PURE__ */ React12.createElement(
|
|
826
|
+
}, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
|
|
841
827
|
asChild: true
|
|
842
828
|
}, /* @__PURE__ */ React12.createElement(Avatar4.Frame, {
|
|
843
829
|
tabIndex: 0,
|
|
@@ -847,10 +833,10 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
847
833
|
]
|
|
848
834
|
}, /* @__PURE__ */ React12.createElement(Avatar4.Fallback, {
|
|
849
835
|
text: hexToEmoji(invitationId)
|
|
850
|
-
})))), /* @__PURE__ */ React12.createElement(
|
|
836
|
+
})))), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
|
|
851
837
|
side: "left",
|
|
852
838
|
classNames: "z-[70]"
|
|
853
|
-
}, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React12.createElement(
|
|
839
|
+
}, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React12.createElement(Tooltip5.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
|
|
854
840
|
asChild: true
|
|
855
841
|
}, /* @__PURE__ */ React12.createElement(Button7, {
|
|
856
842
|
variant: "ghost",
|
|
@@ -863,7 +849,7 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
863
849
|
}, /* @__PURE__ */ React12.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React12.createElement(CopyButtonIconOnly, {
|
|
864
850
|
variant: "ghost",
|
|
865
851
|
value: invitationUrl
|
|
866
|
-
})), /* @__PURE__ */ React12.createElement(
|
|
852
|
+
})), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
|
|
867
853
|
side: "left",
|
|
868
854
|
classNames: "z-[70]"
|
|
869
855
|
}, invitationHasLifetime && /* @__PURE__ */ React12.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React12.createElement(AuthCode, {
|
|
@@ -960,7 +946,8 @@ var defaultActions = {
|
|
|
960
946
|
}
|
|
961
947
|
};
|
|
962
948
|
var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
963
|
-
const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, ...rest } = props;
|
|
949
|
+
const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, "data-testid": testId, ...rest } = props;
|
|
950
|
+
const dropdownTestId = testId && `${testId}.more`;
|
|
964
951
|
const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] = useControllableState3({
|
|
965
952
|
prop: propsActiveAction,
|
|
966
953
|
onChange: onChangeActiveAction,
|
|
@@ -979,6 +966,7 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
979
966
|
],
|
|
980
967
|
ref: forwardedRef,
|
|
981
968
|
variant,
|
|
969
|
+
"data-testid": testId,
|
|
982
970
|
onClick: activeAction.onClick
|
|
983
971
|
}, activeAction.icon && /* @__PURE__ */ React15.createElement(activeAction.icon, {
|
|
984
972
|
className: getSize8(5)
|
|
@@ -988,19 +976,21 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
988
976
|
classNames: [
|
|
989
977
|
"bs-11 flex-none rounded-is-none",
|
|
990
978
|
classNames
|
|
991
|
-
]
|
|
979
|
+
],
|
|
980
|
+
"data-testid": dropdownTestId
|
|
992
981
|
}, /* @__PURE__ */ React15.createElement("span", {
|
|
993
982
|
className: "sr-only"
|
|
994
983
|
}, t("invite options label")), /* @__PURE__ */ React15.createElement(CaretDown3, {
|
|
995
984
|
className: getSize8(4)
|
|
996
|
-
}))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
|
|
985
|
+
}))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Portal, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
|
|
997
986
|
return /* @__PURE__ */ React15.createElement(DropdownMenu3.CheckboxItem, {
|
|
998
987
|
key: id,
|
|
999
988
|
"aria-labelledby": `${id}__label`,
|
|
1000
989
|
"aria-describedby": `${id}__description`,
|
|
1001
990
|
checked: activeActionKey2 === id,
|
|
1002
991
|
onCheckedChange: (checked) => checked && setActiveAction(id),
|
|
1003
|
-
classNames: "gap-2"
|
|
992
|
+
classNames: "gap-2",
|
|
993
|
+
"data-testid": action.testId
|
|
1004
994
|
}, action.icon && /* @__PURE__ */ React15.createElement(action.icon, {
|
|
1005
995
|
className: getSize8(5)
|
|
1006
996
|
}), /* @__PURE__ */ React15.createElement("div", {
|
|
@@ -1017,7 +1007,7 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
|
1017
1007
|
weight: "bold",
|
|
1018
1008
|
className: getSize8(4)
|
|
1019
1009
|
})));
|
|
1020
|
-
})), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null))));
|
|
1010
|
+
})), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null)))));
|
|
1021
1011
|
});
|
|
1022
1012
|
var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
|
|
1023
1013
|
const { children, classNames, variant, isFull = true, ...rest } = props;
|
|
@@ -1252,7 +1242,7 @@ import { useClient as useClient6 } from "@dxos/react-client";
|
|
|
1252
1242
|
import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
|
|
1253
1243
|
import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
|
|
1254
1244
|
import { useNetworkStatus, ConnectionState as ConnectionState2 } from "@dxos/react-client/mesh";
|
|
1255
|
-
import { Avatar as Avatar6, Input as Input2, Toolbar as Toolbar3, Tooltip as
|
|
1245
|
+
import { Avatar as Avatar6, Input as Input2, Toolbar as Toolbar3, Tooltip as Tooltip6, useId as useId6, useTranslation as useTranslation14 } from "@dxos/react-ui";
|
|
1256
1246
|
import { getSize as getSize13 } from "@dxos/react-ui-theme";
|
|
1257
1247
|
import { hexToEmoji as hexToEmoji4, hexToHue as hexToHue2, keyToFallback as keyToFallback3 } from "@dxos/util";
|
|
1258
1248
|
|
|
@@ -1420,7 +1410,7 @@ var IdentityActionChooser = (props) => {
|
|
|
1420
1410
|
});
|
|
1421
1411
|
};
|
|
1422
1412
|
var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }) => {
|
|
1423
|
-
const
|
|
1413
|
+
const edgeDeviceAvailable = devices.find((device) => device.profile?.type === DeviceType2.AGENT_MANAGED && device.profile?.os?.toUpperCase() === "EDGE");
|
|
1424
1414
|
return /* @__PURE__ */ React25.createElement("div", {
|
|
1425
1415
|
role: "none",
|
|
1426
1416
|
className: "bs-40 grow overflow-y-auto overflow-x-hidden"
|
|
@@ -1429,10 +1419,10 @@ var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled
|
|
|
1429
1419
|
connectionState,
|
|
1430
1420
|
onClickAdd,
|
|
1431
1421
|
onClickJoinExisting,
|
|
1432
|
-
onClickRecover,
|
|
1422
|
+
onClickRecover: agentProps.agentStatus === "created" ? onClickRecover : void 0,
|
|
1433
1423
|
onClickReset,
|
|
1434
1424
|
onAgentDestroy: agentProps.onAgentDestroy
|
|
1435
|
-
}), !
|
|
1425
|
+
}), !edgeDeviceAvailable && agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, agentProps));
|
|
1436
1426
|
};
|
|
1437
1427
|
|
|
1438
1428
|
// packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
|
|
@@ -1448,6 +1438,7 @@ import { useClient as useClient5 } from "@dxos/react-client";
|
|
|
1448
1438
|
import { useEffect as useEffect2, useState as useState6 } from "react";
|
|
1449
1439
|
import { invariant } from "@dxos/invariant";
|
|
1450
1440
|
import { QueryAgentStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
|
|
1441
|
+
import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
|
|
1451
1442
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
1452
1443
|
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts";
|
|
1453
1444
|
var useEdgeAgentHandlers = ({ identity }) => {
|
|
@@ -1484,7 +1475,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1484
1475
|
const onAgentCreate = async () => {
|
|
1485
1476
|
invariant(identity, "Identity not found", {
|
|
1486
1477
|
F: __dxlog_file3,
|
|
1487
|
-
L:
|
|
1478
|
+
L: 58,
|
|
1488
1479
|
S: void 0,
|
|
1489
1480
|
A: [
|
|
1490
1481
|
"identity",
|
|
@@ -1506,6 +1497,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
|
|
|
1506
1497
|
setValidationMessage("");
|
|
1507
1498
|
try {
|
|
1508
1499
|
await service.createAgent();
|
|
1500
|
+
await Promise.all(client.spaces.get().map((space) => space?.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED)));
|
|
1509
1501
|
setAgentStatus("created");
|
|
1510
1502
|
} catch (err) {
|
|
1511
1503
|
setAgentStatus("error");
|
|
@@ -1870,7 +1862,7 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
|
|
|
1870
1862
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1871
1863
|
var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
|
|
1872
1864
|
var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
|
|
1873
|
-
var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1865
|
+
var IdentityHeading = ({ titleId, title, identity, hideRecover, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
|
|
1874
1866
|
const client = useClient6();
|
|
1875
1867
|
const fallbackValue = keyToFallback3(identity.identityKey);
|
|
1876
1868
|
const { t } = useTranslation14("os");
|
|
@@ -1903,7 +1895,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1903
1895
|
const handleRecoveryCode = async () => {
|
|
1904
1896
|
invariant3(client.services.services.IdentityService, "IdentityService not available", {
|
|
1905
1897
|
F: __dxlog_file6,
|
|
1906
|
-
L:
|
|
1898
|
+
L: 77,
|
|
1907
1899
|
S: void 0,
|
|
1908
1900
|
A: [
|
|
1909
1901
|
"client.services.services.IdentityService",
|
|
@@ -1914,7 +1906,6 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1914
1906
|
void setTextValue(seedphrase);
|
|
1915
1907
|
};
|
|
1916
1908
|
const isConnected = connectionState === ConnectionState2.ONLINE;
|
|
1917
|
-
const isProduction = client.config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production";
|
|
1918
1909
|
return /* @__PURE__ */ React29.createElement(Heading, {
|
|
1919
1910
|
titleId,
|
|
1920
1911
|
title,
|
|
@@ -1958,7 +1949,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1958
1949
|
hue,
|
|
1959
1950
|
onChangeHue: setHue,
|
|
1960
1951
|
classNames: "bs-[--rail-action]"
|
|
1961
|
-
}), /* @__PURE__ */ React29.createElement(
|
|
1952
|
+
}), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
|
|
1962
1953
|
asChild: true
|
|
1963
1954
|
}, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
|
|
1964
1955
|
classNames: "bs-[--rail-action]",
|
|
@@ -1968,20 +1959,20 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1968
1959
|
className: "sr-only"
|
|
1969
1960
|
}, t(publicKeyCopied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React29.createElement(Key, {
|
|
1970
1961
|
className: getSize13(5)
|
|
1971
|
-
}))), /* @__PURE__ */ React29.createElement(
|
|
1962
|
+
}))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
|
|
1972
1963
|
side: "bottom",
|
|
1973
1964
|
classNames: "z-50"
|
|
1974
|
-
}, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(
|
|
1965
|
+
}, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), !hideRecover && /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
|
|
1975
1966
|
asChild: true
|
|
1976
1967
|
}, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
|
|
1977
1968
|
classNames: "bs-[--rail-action]",
|
|
1978
1969
|
onClick: handleRecoveryCode
|
|
1979
1970
|
}, /* @__PURE__ */ React29.createElement(FirstAidKit2, {
|
|
1980
1971
|
className: getSize13(5)
|
|
1981
|
-
}))), /* @__PURE__ */ React29.createElement(
|
|
1972
|
+
}))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
|
|
1982
1973
|
side: "bottom",
|
|
1983
1974
|
classNames: "z-50"
|
|
1984
|
-
}, t("create recovery code label"), /* @__PURE__ */ React29.createElement(
|
|
1975
|
+
}, t("create recovery code label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
|
|
1985
1976
|
asChild: true
|
|
1986
1977
|
}, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
|
|
1987
1978
|
classNames: [
|
|
@@ -1995,10 +1986,10 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
|
|
|
1995
1986
|
className: getSize13(5)
|
|
1996
1987
|
}) : /* @__PURE__ */ React29.createElement(Plugs, {
|
|
1997
1988
|
className: getSize13(5)
|
|
1998
|
-
}))), /* @__PURE__ */ React29.createElement(
|
|
1989
|
+
}))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
|
|
1999
1990
|
side: "bottom",
|
|
2000
1991
|
classNames: "z-50"
|
|
2001
|
-
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(
|
|
1992
|
+
}, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))))));
|
|
2002
1993
|
};
|
|
2003
1994
|
var IdentityPanelImpl = (props) => {
|
|
2004
1995
|
const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
|
|
@@ -2015,10 +2006,12 @@ var IdentityPanelImpl = (props) => {
|
|
|
2015
2006
|
t
|
|
2016
2007
|
]);
|
|
2017
2008
|
const onCancelReset = () => rest.send?.("unchooseAction");
|
|
2009
|
+
const hideRecover = rest.agentStatus !== "created";
|
|
2018
2010
|
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(IdentityHeading, {
|
|
2019
2011
|
identity,
|
|
2020
2012
|
titleId,
|
|
2021
2013
|
title,
|
|
2014
|
+
hideRecover,
|
|
2022
2015
|
onDone,
|
|
2023
2016
|
onUpdateProfile,
|
|
2024
2017
|
connectionState,
|
|
@@ -2088,7 +2081,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
2088
2081
|
if (!identity) {
|
|
2089
2082
|
log6.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
2090
2083
|
F: __dxlog_file6,
|
|
2091
|
-
L:
|
|
2084
|
+
L: 288,
|
|
2092
2085
|
S: void 0,
|
|
2093
2086
|
C: (f, a) => f(...a)
|
|
2094
2087
|
});
|
|
@@ -2105,7 +2098,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
2105
2098
|
const subscription = identityService.subscribe((state) => {
|
|
2106
2099
|
log6("[state]", state, {
|
|
2107
2100
|
F: __dxlog_file6,
|
|
2108
|
-
L:
|
|
2101
|
+
L: 301,
|
|
2109
2102
|
S: void 0,
|
|
2110
2103
|
C: (f, a) => f(...a)
|
|
2111
2104
|
});
|
|
@@ -3775,6 +3768,7 @@ var SpaceManager = (props) => {
|
|
|
3775
3768
|
label: t("invite one label"),
|
|
3776
3769
|
description: t("invite one description"),
|
|
3777
3770
|
icon: UserPlus,
|
|
3771
|
+
testId: "spaces-panel.invite-one",
|
|
3778
3772
|
onClick: useCallback7(() => {
|
|
3779
3773
|
const invitation = space.share?.({
|
|
3780
3774
|
type: Invitation8.Type.INTERACTIVE,
|
|
@@ -3786,13 +3780,15 @@ var SpaceManager = (props) => {
|
|
|
3786
3780
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
3787
3781
|
}
|
|
3788
3782
|
}, [
|
|
3789
|
-
space
|
|
3783
|
+
space,
|
|
3784
|
+
target
|
|
3790
3785
|
])
|
|
3791
3786
|
},
|
|
3792
3787
|
inviteMany: {
|
|
3793
3788
|
label: t("invite many label"),
|
|
3794
3789
|
description: t("invite many description"),
|
|
3795
3790
|
icon: UsersThree,
|
|
3791
|
+
testId: "spaces-panel.invite-many",
|
|
3796
3792
|
onClick: useCallback7(() => {
|
|
3797
3793
|
const invitation = space.share?.({
|
|
3798
3794
|
type: Invitation8.Type.DELEGATED,
|
|
@@ -3804,7 +3800,8 @@ var SpaceManager = (props) => {
|
|
|
3804
3800
|
const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
|
|
3805
3801
|
}
|
|
3806
3802
|
}, [
|
|
3807
|
-
space
|
|
3803
|
+
space,
|
|
3804
|
+
target
|
|
3808
3805
|
])
|
|
3809
3806
|
}
|
|
3810
3807
|
};
|
|
@@ -3827,7 +3824,7 @@ var SpaceManagerImpl = (props) => {
|
|
|
3827
3824
|
}
|
|
3828
3825
|
}
|
|
3829
3826
|
};
|
|
3830
|
-
const [activeAction, setInternalActiveAction] = useState13(localStorage.getItem(activeActionKey) ?? "
|
|
3827
|
+
const [activeAction, setInternalActiveAction] = useState13(localStorage.getItem(activeActionKey) ?? "inviteMany");
|
|
3831
3828
|
const setActiveAction = (nextAction) => {
|
|
3832
3829
|
setInternalActiveAction(nextAction);
|
|
3833
3830
|
localStorage.setItem(activeActionKey, nextAction);
|
|
@@ -3886,8 +3883,8 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
|
|
|
3886
3883
|
}, name ?? space.key.truncate())));
|
|
3887
3884
|
};
|
|
3888
3885
|
var SpacePanelImpl = (props) => {
|
|
3889
|
-
const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
|
|
3890
|
-
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
|
|
3886
|
+
const { titleId, activeView, space, hideHeading, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
|
|
3887
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, !hideHeading && /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
|
|
3891
3888
|
...rest,
|
|
3892
3889
|
titleId,
|
|
3893
3890
|
space
|
|
@@ -3929,7 +3926,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
|
|
|
3929
3926
|
const subscription = spaceService.subscribe((state) => {
|
|
3930
3927
|
log13("[state]", state, {
|
|
3931
3928
|
F: __dxlog_file13,
|
|
3932
|
-
L:
|
|
3929
|
+
L: 95,
|
|
3933
3930
|
S: void 0,
|
|
3934
3931
|
C: (f, a) => f(...a)
|
|
3935
3932
|
});
|
|
@@ -4034,7 +4031,7 @@ import React47, { StrictMode } from "react";
|
|
|
4034
4031
|
import { createRoot } from "react-dom/client";
|
|
4035
4032
|
import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
|
|
4036
4033
|
import { AgentHostingProvider, ClientProvider, ClientServicesProxy, Config, ShellDisplay as ShellDisplay2 } from "@dxos/react-client";
|
|
4037
|
-
import { Button as Button11, Dialog as Dialog3, ThemeProvider, Tooltip as
|
|
4034
|
+
import { Button as Button11, Dialog as Dialog3, ThemeProvider, Tooltip as Tooltip7, useTranslation as useTranslation26 } from "@dxos/react-ui";
|
|
4038
4035
|
import { defaultTx } from "@dxos/react-ui-theme";
|
|
4039
4036
|
import { createIFramePort } from "@dxos/rpc-tunnel";
|
|
4040
4037
|
|
|
@@ -4538,7 +4535,7 @@ var runShell = async (config = new Config()) => {
|
|
|
4538
4535
|
config,
|
|
4539
4536
|
services,
|
|
4540
4537
|
noBanner: true
|
|
4541
|
-
}, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(
|
|
4538
|
+
}, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(AgentHostingProvider, null, /* @__PURE__ */ React47.createElement(Shell, {
|
|
4542
4539
|
runtime
|
|
4543
4540
|
}))))))));
|
|
4544
4541
|
} catch {
|