@dxos/shell 0.5.1-next.ed1615e → 0.5.2-main.16cd857

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 (56) hide show
  1. package/dist/bundle/shell.mjs +8386 -8342
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +68 -68
  4. package/dist/bundle/shell.umd.js.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/react.mjs +35 -20
  7. package/dist/lib/browser/react.mjs.map +3 -3
  8. package/dist/lib/browser/testing/index.mjs +3 -2
  9. package/dist/lib/browser/testing/index.mjs.map +3 -3
  10. package/dist/types/src/components/DeviceList/DeviceListItem.js +1 -1
  11. package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
  12. package/dist/types/src/composites/Shell/Shell.d.ts.map +1 -1
  13. package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
  14. package/dist/types/src/panels/JoinPanel/JoinPanel.js +11 -3
  15. package/dist/types/src/panels/JoinPanel/JoinPanel.js.map +1 -1
  16. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts +13 -78
  17. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.d.ts.map +1 -1
  18. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js +28 -45
  19. package/dist/types/src/panels/JoinPanel/JoinPanel.stories.js.map +1 -1
  20. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +4 -0
  21. package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
  22. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +1 -0
  23. package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
  24. package/dist/types/src/panels/JoinPanel/joinMachine.js +4 -3
  25. package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
  26. package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.d.ts.map +1 -1
  27. package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js +6 -3
  28. package/dist/types/src/panels/JoinPanel/steps/InvitationAuthenticator.js.map +1 -1
  29. package/dist/types/src/panels/Panels.stories.d.ts +3 -0
  30. package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
  31. package/dist/types/src/panels/Panels.stories.js +2 -1
  32. package/dist/types/src/panels/Panels.stories.js.map +1 -1
  33. package/dist/types/src/steps/ConfirmReset.js +1 -1
  34. package/dist/types/src/steps/ConfirmReset.js.map +1 -1
  35. package/dist/types/src/steps/InvitationManager.js +1 -1
  36. package/dist/types/src/steps/InvitationManager.js.map +1 -1
  37. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  38. package/dist/types/src/testing/shell-manager.js +3 -2
  39. package/dist/types/src/testing/shell-manager.js.map +1 -1
  40. package/dist/types/src/translations/locales/en-US.d.ts +2 -0
  41. package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
  42. package/dist/types/src/translations/locales/en-US.js +9 -7
  43. package/dist/types/src/translations/locales/en-US.js.map +1 -1
  44. package/package.json +21 -21
  45. package/src/components/DeviceList/DeviceListItem.tsx +1 -1
  46. package/src/composites/Shell/Shell.tsx +1 -1
  47. package/src/panels/JoinPanel/JoinPanel.stories.tsx +16 -44
  48. package/src/panels/JoinPanel/JoinPanel.tsx +12 -0
  49. package/src/panels/JoinPanel/JoinPanelProps.ts +4 -0
  50. package/src/panels/JoinPanel/joinMachine.ts +1 -1
  51. package/src/panels/JoinPanel/steps/InvitationAuthenticator.tsx +11 -3
  52. package/src/panels/Panels.stories.tsx +2 -1
  53. package/src/steps/ConfirmReset.tsx +1 -1
  54. package/src/steps/InvitationManager.tsx +1 -1
  55. package/src/testing/shell-manager.ts +4 -2
  56. package/src/translations/locales/en-US.ts +9 -7
@@ -582,11 +582,11 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
582
582
  DeviceType.AGENT_MANAGED
583
583
  ].includes(device.profile.type) ? /* @__PURE__ */ React9.createElement(Robot, iconProps) : device.profile.type === DeviceType.MOBILE ? /* @__PURE__ */ React9.createElement(DeviceMobile, iconProps) : /* @__PURE__ */ React9.createElement(Devices, iconProps) : /* @__PURE__ */ React9.createElement(Avatar3.Fallback, {
584
584
  text: fallbackValue.emoji
585
- })), isCurrent && /* @__PURE__ */ React9.createElement(Tag, {
586
- color: "primary"
587
- }, t("current device tag label")), /* @__PURE__ */ React9.createElement(Avatar3.Label, {
585
+ })), /* @__PURE__ */ React9.createElement(Avatar3.Label, {
588
586
  classNames: "flex-1 text-sm truncate"
589
- }, displayName), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
587
+ }, displayName), isCurrent && /* @__PURE__ */ React9.createElement(Tag, {
588
+ color: "primary"
589
+ }, t("current device tag label")), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
590
590
  asChild: true
591
591
  }, /* @__PURE__ */ React9.createElement(Button5, {
592
592
  variant: "ghost",
@@ -1572,7 +1572,7 @@ var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCo
1572
1572
  code: authCode,
1573
1573
  large: true,
1574
1574
  classNames: "text-black dark:text-white"
1575
- }), /* @__PURE__ */ React27.createElement(Label, null, "Be sure the other device is showing this symbol:"), emoji && /* @__PURE__ */ React27.createElement(Emoji, {
1575
+ }), /* @__PURE__ */ React27.createElement(Label, null, t("auth other device emoji message")), emoji && /* @__PURE__ */ React27.createElement(Emoji, {
1576
1576
  text: emoji
1577
1577
  })), /* @__PURE__ */ React27.createElement(InvitationManagerView, {
1578
1578
  id: "showing final"
@@ -1644,7 +1644,9 @@ var ConfirmResetImpl = ({ disabled, pending, validationMessage, onConfirm, onCan
1644
1644
  })),
1645
1645
  disabled,
1646
1646
  "data-testid": `${testIdAffix}.reset-identity-input`,
1647
- placeholder: confirmationValue,
1647
+ placeholder: t("confirmation placeholder", {
1648
+ confirmationValue
1649
+ }),
1648
1650
  onChange: ({ target: { value } }) => setInputValue(value)
1649
1651
  })), /* @__PURE__ */ React28.createElement(Actions, null, onCancel && /* @__PURE__ */ React28.createElement(Action, {
1650
1652
  disabled,
@@ -2903,10 +2905,8 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2903
2905
  };
2904
2906
  return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement("div", {
2905
2907
  role: "none",
2906
- className: "grow flex flex-col justify-center"
2907
- }, invitationId && /* @__PURE__ */ React37.createElement(Emoji, {
2908
- text: hexToEmoji5(invitationId)
2909
- }), /* @__PURE__ */ React37.createElement(Input3.Root, failed && {
2908
+ className: "grow flex flex-col justify-center gap-4"
2909
+ }, /* @__PURE__ */ React37.createElement(Input3.Root, failed && {
2910
2910
  validationValence: "error"
2911
2911
  }, /* @__PURE__ */ React37.createElement(Input3.Label, {
2912
2912
  asChild: true
@@ -2923,7 +2923,11 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
2923
2923
  "data-1p-ignore": true
2924
2924
  }), failed && /* @__PURE__ */ React37.createElement(Input3.DescriptionAndValidation, {
2925
2925
  classNames: "text-center"
2926
- }, /* @__PURE__ */ React37.createElement(Input3.Validation, null, t("failed to authenticate message"))))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2926
+ }, /* @__PURE__ */ React37.createElement(Input3.Validation, null, t("failed to authenticate message")))), invitationId && /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(Label, null, t("auth other device emoji message")), /* @__PURE__ */ React37.createElement("div", {
2927
+ className: "flex justify-center"
2928
+ }, /* @__PURE__ */ React37.createElement(Emoji, {
2929
+ text: hexToEmoji5(invitationId)
2930
+ })))), /* @__PURE__ */ React37.createElement(Actions, null, /* @__PURE__ */ React37.createElement(Action, {
2927
2931
  variant: "ghost",
2928
2932
  disabled,
2929
2933
  onClick: () => onInvitationCancel?.(),
@@ -2964,7 +2968,7 @@ var resolvedTextColor = (status) => status === Invitation6.State.ERROR ? errorTe
2964
2968
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2965
2969
  var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
2966
2970
  var JoinPanelImpl = (props) => {
2967
- const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetStorage, onConfirmResetStorage, IdentityInput: IdentityInputComponent = IdentityInput, ConfirmReset: ConfirmResetComponent = ConfirmReset } = props;
2971
+ const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationIds, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, onCancelResetStorage, onConfirmResetStorage, IdentityInput: IdentityInputComponent = IdentityInput, ConfirmReset: ConfirmResetComponent = ConfirmReset } = props;
2968
2972
  return /* @__PURE__ */ React38.createElement(DensityProvider2, {
2969
2973
  density: "fine"
2970
2974
  }, mode !== "halo-only" && /* @__PURE__ */ React38.createElement(JoinHeading, {
@@ -3032,6 +3036,7 @@ var JoinPanelImpl = (props) => {
3032
3036
  }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
3033
3037
  send,
3034
3038
  Kind: "Halo",
3039
+ invitationId: invitationIds?.Halo,
3035
3040
  active: activeView === "halo invitation authenticator",
3036
3041
  onInvitationCancel: onHaloInvitationCancel,
3037
3042
  onInvitationAuthenticate: onHaloInvitationAuthenticate,
@@ -3087,6 +3092,7 @@ var JoinPanelImpl = (props) => {
3087
3092
  }, /* @__PURE__ */ React38.createElement(InvitationAuthenticator, {
3088
3093
  send,
3089
3094
  Kind: "Space",
3095
+ invitationId: invitationIds?.Space,
3090
3096
  active: activeView === "space invitation authenticator",
3091
3097
  onInvitationCancel: onSpaceInvitationCancel,
3092
3098
  onInvitationAuthenticate: onSpaceInvitationAuthenticate,
@@ -3125,7 +3131,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3125
3131
  const subscription = joinService.subscribe((state) => {
3126
3132
  log10("[state]", state, {
3127
3133
  F: __dxlog_file9,
3128
- L: 204,
3134
+ L: 207,
3129
3135
  S: void 0,
3130
3136
  C: (f, a) => f(...a)
3131
3137
  });
@@ -3309,6 +3315,12 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3309
3315
  }), [
3310
3316
  joinState
3311
3317
  ]);
3318
+ const invitationIds = useMemo4(() => ({
3319
+ Halo: joinState.context.halo.invitationObservable?.get().invitationId,
3320
+ Space: joinState.context.space.invitationObservable?.get().invitationId
3321
+ }), [
3322
+ joinState
3323
+ ]);
3312
3324
  const failReasons = useMemo4(() => ({
3313
3325
  Halo: joinState.context.halo.failReason,
3314
3326
  Space: joinState.context.space.failReason
@@ -3357,6 +3369,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3357
3369
  "authenticating"
3358
3370
  ].some((str) => joinState?.configuration[0].id.includes(str)),
3359
3371
  unredeemedCodes,
3372
+ invitationIds,
3360
3373
  invitationStates,
3361
3374
  succeededKeys,
3362
3375
  identity,
@@ -4035,23 +4048,25 @@ var os = {
4035
4048
  "space member list heading": "Members",
4036
4049
  "space panel heading": "Space membership",
4037
4050
  "auth code message": "Enter the following auth code on the joining device.",
4051
+ "auth other device emoji message": "Be sure the other device shows the following symbol:",
4038
4052
  "display name input label": "Display name",
4039
4053
  "display name input placeholder": "Enter a display name",
4040
4054
  "invite one label": "Single-use invitation",
4041
4055
  "invite one description": "Only one user may join.",
4042
4056
  "invite one qr label": "Single-use invitation",
4043
4057
  "invite one list item label": "Active single-use invitation",
4044
- "invite many label": "Standing invitation",
4058
+ "invite many label": "Multi-use invitation",
4045
4059
  "invite many description": "Anyone with the link can join.",
4046
- "invite many qr label": "Standing invitation",
4047
- "invite many list item label": "Active standing invitation",
4060
+ "invite many qr label": "Multi-use invitation",
4061
+ "invite many list item label": "Active multi-use invitation",
4048
4062
  "invite options label": "Change the active invite option.",
4049
4063
  "reset in progress label": "Resetting...",
4050
4064
  "confirm label": "Confirm",
4051
- "reset storage input label": "This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.",
4052
- "join new identity input label": "In order to join an existing device, storage on this device must be cleared first. Type {{confirmationValue}} to continue.",
4065
+ "reset storage input label": "WARNING: This will delete all data on this device. Type {{confirmationValue}} to continue.",
4066
+ "join new identity input label": "WARNING: To join an existing device all data on this device will be deleted. Type {{confirmationValue}} to continue.",
4053
4067
  "failed to reset identity message": "Failed to reset identity.",
4054
- "confirmation value": "CONFIRM",
4068
+ "confirmation value": "RESET",
4069
+ "confirmation placeholder": "Enter {{confirmationValue}} to continue.",
4055
4070
  "sign out chooser title": "Danger zone",
4056
4071
  "sign out chooser message": "Proceeding with the action below will erase all data on this device.",
4057
4072
  "join new identity label": "Join a new identity",
@@ -4061,7 +4076,7 @@ var os = {
4061
4076
  "clear label": "Use default",
4062
4077
  "select emoji label": "Choose an emoji to use in your avatar",
4063
4078
  "select hue label": "Choose a hue to use in your avatar",
4064
- "resetting message": "One moment while things are reset\u2026",
4079
+ "resetting message": "One moment while the device is reset\u2026",
4065
4080
  "red label": "Red",
4066
4081
  "orange label": "Orange",
4067
4082
  "amber label": "Amber",