@dxos/shell 0.8.2-main.5885341 → 0.8.2-main.600d381

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.
Files changed (82) hide show
  1. package/dist/bundle/shell.js +3862 -3810
  2. package/dist/bundle/shell.js.map +1 -1
  3. package/dist/bundle/shell.umd.cjs +33 -32
  4. package/dist/bundle/shell.umd.cjs.map +1 -1
  5. package/dist/bundle/style.css +1 -1
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/react.mjs +36 -33
  8. package/dist/lib/browser/react.mjs.map +3 -3
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/react.cjs +32 -29
  11. package/dist/lib/node/react.cjs.map +3 -3
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/react.mjs +36 -33
  14. package/dist/lib/node-esm/react.mjs.map +3 -3
  15. package/dist/types/src/components/AgentConfig.d.ts.map +1 -1
  16. package/dist/types/src/components/AgentConfig.js +4 -9
  17. package/dist/types/src/components/AgentConfig.js.map +1 -1
  18. package/dist/types/src/components/AuthCode.d.ts.map +1 -1
  19. package/dist/types/src/components/CompoundButton/CompoundButton.d.ts.map +1 -1
  20. package/dist/types/src/components/DeviceList/DeviceList.d.ts.map +1 -1
  21. package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
  22. package/dist/types/src/components/IdentityList/SpaceMemberList.stories.d.ts.map +1 -1
  23. package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
  24. package/dist/types/src/components/InvitationList/InvitationList.stories.js +1 -1
  25. package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
  26. package/dist/types/src/components/InvitationList/InvitationListContainer.d.ts.map +1 -1
  27. package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
  28. package/dist/types/src/components/InvitationList/InvitationListItem.js +8 -18
  29. package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
  30. package/dist/types/src/components/Panel/CloseButton.d.ts.map +1 -1
  31. package/dist/types/src/components/Panel/Emoji.d.ts.map +1 -1
  32. package/dist/types/src/components/Panel/Input.d.ts.map +1 -1
  33. package/dist/types/src/components/Panel/Label.d.ts.map +1 -1
  34. package/dist/types/src/components/Panel/Panel.stories.d.ts.map +1 -1
  35. package/dist/types/src/components/StorybookDialog.d.ts.map +1 -1
  36. package/dist/types/src/composites/IdentityDialog/IdentityDialog.d.ts.map +1 -1
  37. package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
  38. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  39. package/dist/types/src/composites/Shell/ShellContext.d.ts.map +1 -1
  40. package/dist/types/src/composites/Shell/run-shell.d.ts.map +1 -1
  41. package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +1 -1
  42. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  43. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +8 -18
  44. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  45. package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
  46. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  47. package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
  48. package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -1
  49. package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.d.ts.map +1 -1
  50. package/dist/types/src/panels/IdentityPanel/useKubeAgentHandlers.d.ts.map +1 -1
  51. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
  52. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
  53. package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.d.ts.map +1 -1
  54. package/dist/types/src/panels/JoinPanel/steps/IdentityAdded.d.ts.map +1 -1
  55. package/dist/types/src/panels/JoinPanel/steps/IdentityInput.d.ts.map +1 -1
  56. package/dist/types/src/panels/JoinPanel/steps/InvitationAccepted.d.ts.map +1 -1
  57. package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
  58. package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
  59. package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.d.ts.map +1 -1
  60. package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
  61. package/dist/types/src/panels/SpacePanel/spaceMachine.d.ts.map +1 -1
  62. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
  63. package/dist/types/src/panels/StatusPanel/StatusPanel.d.ts.map +1 -1
  64. package/dist/types/src/steps/ConfirmReset.d.ts.map +1 -1
  65. package/dist/types/src/steps/InvitationManager.d.ts.map +1 -1
  66. package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
  67. package/dist/types/src/stories/Invitations.e2e-stories.js +1 -5
  68. package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
  69. package/dist/types/src/styles/invitationStatusStyles.d.ts.map +1 -1
  70. package/dist/types/src/testing/fixtures/invitations.d.ts.map +1 -1
  71. package/dist/types/src/translations/locales/en-US.d.ts +2 -0
  72. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  73. package/dist/types/src/translations/locales/en-US.js +2 -0
  74. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  75. package/dist/types/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +26 -26
  77. package/src/components/AgentConfig.tsx +14 -18
  78. package/src/components/InvitationList/InvitationList.stories.tsx +1 -1
  79. package/src/components/InvitationList/InvitationListItem.tsx +30 -40
  80. package/src/panels/IdentityPanel/IdentityPanel.tsx +14 -32
  81. package/src/stories/Invitations.e2e-stories.tsx +1 -5
  82. package/src/translations/locales/en-US.ts +2 -0
@@ -4,9 +4,9 @@ import {
4
4
  } from "./chunk-HSLMI22Q.mjs";
5
5
 
6
6
  // packages/sdk/shell/src/components/AgentConfig.tsx
7
- import { ArrowsClockwise, Plus, Power } from "@phosphor-icons/react";
7
+ import { ArrowsClockwise, Plus } from "@phosphor-icons/react";
8
8
  import React from "react";
9
- import { Avatar, Button, Link, Tooltip, Trans, useTranslation } from "@dxos/react-ui";
9
+ import { Avatar, Button, IconButton, Link, Tooltip, Trans, useTranslation } from "@dxos/react-ui";
10
10
  import { descriptionText, getSize, mx, valenceColorText } from "@dxos/react-ui-theme";
11
11
  var AgentConfig = ({ agentStatus, validationMessage, onAgentDestroy, onAgentCreate, onAgentRefresh }) => {
12
12
  const { t } = useTranslation("os");
@@ -32,20 +32,20 @@ var AgentConfig = ({ agentStatus, validationMessage, onAgentDestroy, onAgentCrea
32
32
  icon: "ph--database--duotone"
33
33
  }), /* @__PURE__ */ React.createElement(Avatar.Label, {
34
34
  classNames: "flex-1 text-sm truncate"
35
- }, t(agentStatus === "created" ? "agent requested label" : agentStatus === "creating" ? "creating agent label" : agentStatus === "destroying" ? "destroying agent label" : "getting agent label"))), agentStatus === "created" && /* @__PURE__ */ React.createElement(Tooltip.Root, null, /* @__PURE__ */ React.createElement(Tooltip.Trigger, {
36
- asChild: true
37
- }, /* @__PURE__ */ React.createElement(Button, {
35
+ }, t(agentStatus === "created" ? "agent requested label" : agentStatus === "creating" ? "creating agent label" : agentStatus === "destroying" ? "destroying agent label" : "getting agent label"))), agentStatus === "created" && /* @__PURE__ */ React.createElement(Tooltip.Trigger, {
36
+ asChild: true,
37
+ content: t("destroy agent label"),
38
+ side: "bottom"
39
+ }, /* @__PURE__ */ React.createElement(IconButton, {
40
+ iconOnly: true,
38
41
  variant: "ghost",
39
42
  classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
40
43
  "data-testid": "agent.destroy",
44
+ label: t("destroy agent label"),
45
+ icon: "ph--power--regular",
46
+ size: 5,
41
47
  onClick: onAgentDestroy
42
- }, /* @__PURE__ */ React.createElement("span", {
43
- className: "sr-only"
44
- }, t("destroy agent label")), /* @__PURE__ */ React.createElement(Power, {
45
- className: getSize(5)
46
- }))), /* @__PURE__ */ React.createElement(Tooltip.Portal, null, /* @__PURE__ */ React.createElement(Tooltip.Content, {
47
- side: "bottom"
48
- }, t("destroy agent label"))))), agentStatus === "created" && /* @__PURE__ */ React.createElement("p", {
48
+ }))), agentStatus === "created" && /* @__PURE__ */ React.createElement("p", {
49
49
  id: "devices-panel.create-agent.description",
50
50
  className: mx(descriptionText, "mlb-2")
51
51
  }, t("agent requested description"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, {
@@ -205,7 +205,7 @@ import { Button as Button3, List as List2, useTranslation as useTranslation4 } f
205
205
  import { descriptionText as descriptionText4, getSize as getSize3, mx as mx5 } from "@dxos/react-ui-theme";
206
206
 
207
207
  // packages/sdk/shell/src/components/DeviceList/DeviceListItem.tsx
208
- import { DotsThree, ShareFat, Power as Power2, FirstAidKit } from "@phosphor-icons/react";
208
+ import { DotsThree, ShareFat, Power, FirstAidKit } from "@phosphor-icons/react";
209
209
  import React5, { forwardRef as forwardRef2 } from "react";
210
210
  import { generateName as generateName2 } from "@dxos/display-name";
211
211
  import { Device, DeviceType, DeviceKind } from "@dxos/react-client/halo";
@@ -273,7 +273,7 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
273
273
  }), t("choose recover identity label")), onClickReset && /* @__PURE__ */ React5.createElement(DropdownMenu.Item, {
274
274
  "data-testid": "device-list-item-current.reset",
275
275
  onClick: onClickReset
276
- }, /* @__PURE__ */ React5.createElement(Power2, {
276
+ }, /* @__PURE__ */ React5.createElement(Power, {
277
277
  className: getSize2(5)
278
278
  }), t("reset device label")))))));
279
279
  });
@@ -452,8 +452,10 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
452
452
  status: avatarStatus,
453
453
  animation: avatarAnimation,
454
454
  reverseEffects
455
- }), /* @__PURE__ */ React8.createElement(Tooltip2.Root, null, /* @__PURE__ */ React8.createElement(Avatar4.Root, null, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
456
- asChild: true
455
+ }), /* @__PURE__ */ React8.createElement(Avatar4.Root, null, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
456
+ asChild: true,
457
+ content: t(multiUse ? "invite many qr label" : "invite one qr label"),
458
+ side: "left"
457
459
  }, /* @__PURE__ */ React8.createElement(Avatar4.Content, {
458
460
  ...avatarProps,
459
461
  animation: avatarAnimation,
@@ -464,10 +466,11 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
464
466
  focusRing,
465
467
  "relative rounded-full place-self-center"
466
468
  ]
467
- }))), /* @__PURE__ */ React8.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React8.createElement(Tooltip2.Content, {
468
- side: "left"
469
- }, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React8.createElement(Tooltip2.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React8.createElement(Tooltip2.Root, null, /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
470
- asChild: true
469
+ }))), showShare && invitationUrl ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Tooltip2.Trigger, {
470
+ asChild: true,
471
+ content: invitationHasLifetime ? t("expires label", {
472
+ timeLeft: invitationTimeLeft
473
+ }) : t("no expiration label")
471
474
  }, /* @__PURE__ */ React8.createElement(Button4, {
472
475
  variant: "ghost",
473
476
  classNames: "grow justify-start font-medium",
@@ -479,9 +482,7 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
479
482
  }, /* @__PURE__ */ React8.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React8.createElement(Clipboard.IconButton, {
480
483
  variant: "ghost",
481
484
  value: invitationUrl
482
- })), /* @__PURE__ */ React8.createElement(Tooltip2.Portal, null, /* @__PURE__ */ React8.createElement(Tooltip2.Content, {
483
- side: "left"
484
- }, invitationHasLifetime && /* @__PURE__ */ React8.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React8.createElement(AuthCode, {
485
+ })) : showAuthCode ? /* @__PURE__ */ React8.createElement(AuthCode, {
485
486
  code: authCode,
486
487
  classNames: "grow"
487
488
  }) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React8.createElement("span", {
@@ -1584,8 +1585,10 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1584
1585
  "data-testid": "update-profile-form-copy-key",
1585
1586
  label: t("copy self did label"),
1586
1587
  value: identity.did
1587
- }), onManageCredentials && /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
1588
- asChild: true
1588
+ }), onManageCredentials && /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
1589
+ asChild: true,
1590
+ content: t("manage credentials label"),
1591
+ side: "bottom"
1589
1592
  }, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
1590
1593
  classNames: "bs-[--rail-action]",
1591
1594
  onClick: onManageCredentials
@@ -1593,10 +1596,10 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1593
1596
  className: "sr-only"
1594
1597
  }, t("manage credentials label")), /* @__PURE__ */ React25.createElement(IdentificationCard, {
1595
1598
  className: getSize10(5)
1596
- }))), /* @__PURE__ */ React25.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React25.createElement(Tooltip3.Content, {
1599
+ }))), /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
1600
+ asChild: true,
1601
+ content: t(isConnected ? "disconnect label" : "connect label"),
1597
1602
  side: "bottom"
1598
- }, t("manage credentials label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))), /* @__PURE__ */ React25.createElement(Tooltip3.Root, null, /* @__PURE__ */ React25.createElement(Tooltip3.Trigger, {
1599
- asChild: true
1600
1603
  }, /* @__PURE__ */ React25.createElement(Toolbar.Button, {
1601
1604
  classNames: [
1602
1605
  "bs-[--rail-action]",
@@ -1609,9 +1612,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1609
1612
  className: getSize10(5)
1610
1613
  }) : /* @__PURE__ */ React25.createElement(Plugs, {
1611
1614
  className: getSize10(5)
1612
- }))), /* @__PURE__ */ React25.createElement(Tooltip3.Portal, null, /* @__PURE__ */ React25.createElement(Tooltip3.Content, {
1613
- side: "bottom"
1614
- }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React25.createElement(Tooltip3.Arrow, null)))))));
1615
+ }))))));
1615
1616
  };
1616
1617
  var IdentityPanelImpl = (props) => {
1617
1618
  const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, onManageCredentials, ...rest } = props;
@@ -1704,7 +1705,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1704
1705
  if (!identity) {
1705
1706
  log7.error("IdentityPanel rendered with no active identity.", void 0, {
1706
1707
  F: __dxlog_file6,
1707
- L: 283,
1708
+ L: 265,
1708
1709
  S: void 0,
1709
1710
  C: (f, a) => f(...a)
1710
1711
  });
@@ -1721,7 +1722,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
1721
1722
  const subscription = identityService.subscribe((state) => {
1722
1723
  log7("[state]", state, {
1723
1724
  F: __dxlog_file6,
1724
- L: 296,
1725
+ L: 278,
1725
1726
  S: void 0,
1726
1727
  C: (f, a) => f(...a)
1727
1728
  });
@@ -4100,6 +4101,8 @@ var os = {
4100
4101
  "select emoji label": "Avatar emoji",
4101
4102
  "select hue label": "Avatar background color",
4102
4103
  "resetting message": "One moment while the device is reset\u2026",
4104
+ "expires label": "Expires {{timeLeft}}",
4105
+ "no expiration label": "Doesn\u2019t expire",
4103
4106
  // TODO(burdon): Factor out.
4104
4107
  "red label": "Red",
4105
4108
  "orange label": "Orange",