@dxos/react-ui 0.1.39 → 0.1.41-next.adfd7c6

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.
@@ -96,7 +96,8 @@ var IdentityListItem = ({ identity, presence, onClick }) => {
96
96
  ...presence === SpaceMember.PresenceState.OFFLINE && {
97
97
  status: "inactive",
98
98
  description: /* @__PURE__ */ React3.createElement("p", {
99
- className: "font-system-normal text-xs text-neutral-700 dark:text-neutral-300"
99
+ className: "font-system-normal text-xs text-neutral-700 dark:text-neutral-300",
100
+ "data-testid": "identity-list-item.description"
100
101
  }, t("identity offline description"))
101
102
  },
102
103
  ...presence === SpaceMember.PresenceState.ONLINE && {
@@ -498,8 +499,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl }) => {
498
499
  const space = useSpace(spaceKey);
499
500
  const invitations = useSpaceInvitations(spaceKey);
500
501
  const onClickRemove = useCallback3((invitation) => {
501
- const invitationId = invitation.get().invitationId;
502
- invitationId && (space == null ? void 0 : space.removeInvitation(invitationId));
502
+ void invitation.cancel();
503
503
  }, [
504
504
  space
505
505
  ]);
@@ -826,7 +826,7 @@ var DeviceListView = ({ createInvitationUrl, titleId, onDone, doneActionParent }
826
826
  className: mx13(defaultSurface, "rounded-be-md p-2")
827
827
  }, /* @__PURE__ */ React18.createElement(InvitationList, {
828
828
  invitations,
829
- onClickRemove: (invitation) => invitation.get() && client.halo.removeInvitation(invitation.get().invitationId),
829
+ onClickRemove: (invitation) => invitation.cancel(),
830
830
  createInvitationUrl
831
831
  }), /* @__PURE__ */ React18.createElement(Button3, {
832
832
  className: "is-full flex gap-2 mbs-2",
@@ -1311,18 +1311,34 @@ var joinMachine = createMachine({
1311
1311
  identity: () => null
1312
1312
  }),
1313
1313
  resetInvitation: assign({
1314
- halo: (context, event) => event.type === "resetHaloInvitation" ? {
1315
- ...context.halo,
1316
- invitation: void 0,
1317
- invitationObservable: void 0,
1318
- invitationSubscribable: void 0
1319
- } : context.halo,
1320
- space: (context, event) => event.type === "resetSpaceInvitation" ? {
1321
- ...context.space,
1322
- invitation: void 0,
1323
- invitationObservable: void 0,
1324
- invitationSubscribable: void 0
1325
- } : context.space
1314
+ halo: (context, event) => {
1315
+ if (event.type !== "resetHaloInvitation") {
1316
+ return context.halo;
1317
+ }
1318
+ if (context.halo.invitationObservable) {
1319
+ void context.halo.invitationObservable.cancel();
1320
+ }
1321
+ return {
1322
+ ...context.halo,
1323
+ invitation: void 0,
1324
+ invitationObservable: void 0,
1325
+ invitationSubscribable: void 0
1326
+ };
1327
+ },
1328
+ space: (context, event) => {
1329
+ if (event.type !== "resetSpaceInvitation") {
1330
+ return context.space;
1331
+ }
1332
+ if (context.space.invitationObservable) {
1333
+ void context.space.invitationObservable.cancel();
1334
+ }
1335
+ return {
1336
+ ...context.space,
1337
+ invitation: void 0,
1338
+ invitationObservable: void 0,
1339
+ invitationSubscribable: void 0
1340
+ };
1341
+ }
1326
1342
  }),
1327
1343
  setInvitation: assign({
1328
1344
  halo: (context, event) => event.type.includes("Halo") ? {
@@ -1341,7 +1357,7 @@ var joinMachine = createMachine({
1341
1357
  spaceInvitation: context.space.invitation
1342
1358
  }, {
1343
1359
  file: "joinMachine.ts",
1344
- line: 351,
1360
+ line: 365,
1345
1361
  scope: void 0,
1346
1362
  callSite: (f, a) => f(...a)
1347
1363
  });
@@ -1356,7 +1372,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
1356
1372
  } catch (err) {
1357
1373
  log.catch(err, {}, {
1358
1374
  file: "joinMachine.ts",
1359
- line: 377,
1375
+ line: 391,
1360
1376
  scope: void 0,
1361
1377
  callSite: (f, a) => f(...a)
1362
1378
  });
@@ -2389,7 +2405,7 @@ var CurrentSpaceView = observer(({ space, createInvitationUrl, titleId }) => {
2389
2405
  className: mx22(defaultSurface, "rounded-be-md p-2")
2390
2406
  }, /* @__PURE__ */ React30.createElement(InvitationList, {
2391
2407
  invitations,
2392
- onClickRemove: (invitation) => invitation.get() && (space == null ? void 0 : space.removeInvitation(invitation.get().invitationId)),
2408
+ onClickRemove: (invitation) => invitation.cancel(),
2393
2409
  createInvitationUrl
2394
2410
  }), /* @__PURE__ */ React30.createElement(Button12, {
2395
2411
  className: "is-full flex gap-2 mbs-2",