@dxos/shell 0.4.4-main.fb26545 → 0.4.4-next.e0df51e
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 +754 -721
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +27 -27
- 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 +37 -25
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/types/src/components/Clipboard/CopyButton.js +3 -3
- package/dist/types/src/components/Clipboard/CopyButton.js.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +3 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.js +3 -3
- package/dist/types/src/components/IdentityList/IdentityListItem.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts +8 -5
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.js +10 -10
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/components/Panel/Action.js +3 -3
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
- package/dist/types/src/react.d.ts +1 -0
- package/dist/types/src/react.d.ts.map +1 -1
- package/dist/types/src/react.js +1 -0
- package/dist/types/src/react.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +1 -1
- package/package.json +19 -19
- package/src/components/Clipboard/CopyButton.tsx +3 -3
- package/src/components/IdentityList/IdentityListItem.tsx +28 -26
- package/src/components/InvitationList/InvitationListItem.tsx +42 -15
- package/src/components/Panel/Action.tsx +3 -3
- package/src/panels/SpacePanel/SpacePanel.tsx +1 -1
- package/src/react.ts +1 -0
- package/src/stories/Invitations.e2e-stories.tsx +1 -1
|
@@ -50,8 +50,7 @@ var CopyButton = ({ value, classNames, iconProps, ...props }) => {
|
|
|
50
50
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
51
51
|
className: "pli-1"
|
|
52
52
|
}, t("copy invitation code label")), /* @__PURE__ */ React2.createElement(Copy, {
|
|
53
|
-
className: getSize(
|
|
54
|
-
weight: "bold",
|
|
53
|
+
className: getSize(5),
|
|
55
54
|
...iconProps
|
|
56
55
|
})), /* @__PURE__ */ React2.createElement("div", {
|
|
57
56
|
role: "none",
|
|
@@ -59,8 +58,7 @@ var CopyButton = ({ value, classNames, iconProps, ...props }) => {
|
|
|
59
58
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
60
59
|
className: "pli-1"
|
|
61
60
|
}, t("copy invitation code success label")), /* @__PURE__ */ React2.createElement(Check, {
|
|
62
|
-
className: getSize(
|
|
63
|
-
weight: "bold",
|
|
61
|
+
className: getSize(5),
|
|
64
62
|
...iconProps
|
|
65
63
|
})));
|
|
66
64
|
};
|
|
@@ -92,7 +90,6 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
92
90
|
]
|
|
93
91
|
}, /* @__PURE__ */ React2.createElement(Copy, {
|
|
94
92
|
className: getSize(5),
|
|
95
|
-
weight: "bold",
|
|
96
93
|
...iconProps
|
|
97
94
|
}))));
|
|
98
95
|
};
|
|
@@ -154,13 +151,14 @@ import { generateName } from "@dxos/display-name";
|
|
|
154
151
|
import { SpaceMember } from "@dxos/react-client/echo";
|
|
155
152
|
import { ListItem, Avatar, useJdenticonHref, useId as useId2 } from "@dxos/react-ui";
|
|
156
153
|
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
157
|
-
var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick }, forwardedRef) => {
|
|
154
|
+
var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick, classNames, ...props }, forwardedRef) => {
|
|
158
155
|
const fallbackValue = identity.identityKey.toHex();
|
|
159
156
|
const labelId = useId2("identityListItem__label");
|
|
160
157
|
const jdenticon = useJdenticonHref(fallbackValue ?? "", 12);
|
|
161
158
|
const displayName = identity.profile?.displayName ?? generateName(identity.identityKey.toHex());
|
|
162
159
|
return /* @__PURE__ */ React4.createElement(ListItem.Root, {
|
|
163
|
-
|
|
160
|
+
...props,
|
|
161
|
+
classNames: mx3("flex gap-2 pis-3 pie-1 items-center", onClick && "cursor-pointer", classNames),
|
|
164
162
|
onClick: () => onClick?.(),
|
|
165
163
|
"data-testid": "identity-list-item",
|
|
166
164
|
labelId,
|
|
@@ -168,7 +166,9 @@ var IdentityListItem = /* @__PURE__ */ forwardRef(({ identity, presence, onClick
|
|
|
168
166
|
}, /* @__PURE__ */ React4.createElement(Avatar.Root, {
|
|
169
167
|
status: presence === SpaceMember.PresenceState.ONLINE ? "active" : "inactive",
|
|
170
168
|
labelId
|
|
171
|
-
}, /* @__PURE__ */ React4.createElement(Avatar.Frame,
|
|
169
|
+
}, /* @__PURE__ */ React4.createElement(Avatar.Frame, {
|
|
170
|
+
classNames: "place-self-center"
|
|
171
|
+
}, /* @__PURE__ */ React4.createElement(Avatar.Fallback, {
|
|
172
172
|
href: jdenticon
|
|
173
173
|
})), /* @__PURE__ */ React4.createElement(Avatar.Label, {
|
|
174
174
|
classNames: "text-sm truncate pli-2"
|
|
@@ -335,11 +335,11 @@ var avatarProps = {
|
|
|
335
335
|
size: 10,
|
|
336
336
|
variant: "circle"
|
|
337
337
|
};
|
|
338
|
-
var AvatarStackEffect = ({ animation, status }) => {
|
|
338
|
+
var AvatarStackEffect = ({ animation, status, reverseEffects }) => {
|
|
339
339
|
const { tx } = useThemeContext2();
|
|
340
340
|
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("span", {
|
|
341
341
|
role: "none",
|
|
342
|
-
className: mx7("absolute inline-
|
|
342
|
+
className: mx7("absolute inline-end-auto opacity-20", reverseEffects ? "inline-start-3" : "inline-start-1", getSize2(avatarProps.size))
|
|
343
343
|
}, /* @__PURE__ */ React8.createElement("span", {
|
|
344
344
|
role: "none",
|
|
345
345
|
className: tx("avatar.ring", "avatar__ring", {
|
|
@@ -352,7 +352,7 @@ var AvatarStackEffect = ({ animation, status }) => {
|
|
|
352
352
|
}
|
|
353
353
|
})), /* @__PURE__ */ React8.createElement("span", {
|
|
354
354
|
role: "none",
|
|
355
|
-
className: mx7("absolute inline-
|
|
355
|
+
className: mx7("absolute inline-end-auto opacity-50", reverseEffects ? "inline-start-2" : "inline-start-2", getSize2(avatarProps.size))
|
|
356
356
|
}, /* @__PURE__ */ React8.createElement("span", {
|
|
357
357
|
role: "none",
|
|
358
358
|
className: tx("avatar.ring", "avatar__ring", {
|
|
@@ -365,7 +365,7 @@ var AvatarStackEffect = ({ animation, status }) => {
|
|
|
365
365
|
}
|
|
366
366
|
})));
|
|
367
367
|
};
|
|
368
|
-
var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl }) => {
|
|
368
|
+
var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationStatus, send, onClickRemove, createInvitationUrl, reverseEffects, ...props }) => {
|
|
369
369
|
const { t } = useTranslation4("os");
|
|
370
370
|
const { cancel, status: invitationStatus, invitationCode, authCode, type } = propsInvitationStatus;
|
|
371
371
|
const isCancellable = !([
|
|
@@ -406,12 +406,17 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
406
406
|
const avatarStatus = avatarError ? "error" : avatarGreen ? "active" : "inactive";
|
|
407
407
|
return /* @__PURE__ */ React8.createElement(ListItem2.Root, {
|
|
408
408
|
id: invitationCode,
|
|
409
|
-
|
|
409
|
+
...props,
|
|
410
|
+
classNames: [
|
|
411
|
+
"flex gap-2 pis-3 pie-1 items-center relative",
|
|
412
|
+
props.classNames
|
|
413
|
+
]
|
|
410
414
|
}, /* @__PURE__ */ React8.createElement(ListItem2.Heading, {
|
|
411
415
|
classNames: "sr-only"
|
|
412
416
|
}, t(type === Invitation2.Type.MULTIUSE ? "invite many list item label" : "invite one list item label")), type === Invitation2.Type.MULTIUSE && /* @__PURE__ */ React8.createElement(AvatarStackEffect, {
|
|
413
417
|
status: avatarStatus,
|
|
414
|
-
animation: avatarAnimation
|
|
418
|
+
animation: avatarAnimation,
|
|
419
|
+
reverseEffects
|
|
415
420
|
}), /* @__PURE__ */ React8.createElement(Tooltip2.Root, null, /* @__PURE__ */ React8.createElement(Avatar2.Root, {
|
|
416
421
|
...avatarProps,
|
|
417
422
|
animation: avatarAnimation,
|
|
@@ -422,7 +427,7 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
422
427
|
tabIndex: 0,
|
|
423
428
|
classNames: [
|
|
424
429
|
focusRing,
|
|
425
|
-
"relative rounded-full"
|
|
430
|
+
"relative rounded-full place-self-center"
|
|
426
431
|
]
|
|
427
432
|
}, /* @__PURE__ */ React8.createElement(Avatar2.Fallback, {
|
|
428
433
|
text: toEmoji(invitationId)
|
|
@@ -457,24 +462,22 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
457
462
|
className: "grow"
|
|
458
463
|
}, " "), isCancellable ? /* @__PURE__ */ React8.createElement(Button2, {
|
|
459
464
|
variant: "ghost",
|
|
460
|
-
classNames: "flex gap-1",
|
|
465
|
+
classNames: "flex gap-1 pli-0",
|
|
461
466
|
onClick: cancel,
|
|
462
467
|
"data-testid": "cancel-invitation"
|
|
463
468
|
}, /* @__PURE__ */ React8.createElement("span", {
|
|
464
469
|
className: "sr-only"
|
|
465
470
|
}, t("cancel invitation label")), /* @__PURE__ */ React8.createElement(X, {
|
|
466
|
-
className: getSize2(
|
|
467
|
-
weight: "bold"
|
|
471
|
+
className: getSize2(4)
|
|
468
472
|
})) : /* @__PURE__ */ React8.createElement(Button2, {
|
|
469
473
|
variant: "ghost",
|
|
470
|
-
classNames: "flex gap-1",
|
|
474
|
+
classNames: "flex gap-1 pli-0",
|
|
471
475
|
onClick: handleClickRemove,
|
|
472
476
|
"data-testid": "remove-invitation"
|
|
473
477
|
}, /* @__PURE__ */ React8.createElement("span", {
|
|
474
478
|
className: "sr-only"
|
|
475
479
|
}, t("remove invitation label")), /* @__PURE__ */ React8.createElement(X, {
|
|
476
|
-
className: getSize2(
|
|
477
|
-
weight: "bold"
|
|
480
|
+
className: getSize2(4)
|
|
478
481
|
})));
|
|
479
482
|
};
|
|
480
483
|
|
|
@@ -554,7 +557,9 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
|
|
|
554
557
|
ref: forwardedRef,
|
|
555
558
|
variant,
|
|
556
559
|
onClick: activeAction.onClick
|
|
557
|
-
}, activeAction.icon && /* @__PURE__ */ React11.createElement(activeAction.icon,
|
|
560
|
+
}, activeAction.icon && /* @__PURE__ */ React11.createElement(activeAction.icon, {
|
|
561
|
+
className: getSize3(5)
|
|
562
|
+
}), /* @__PURE__ */ React11.createElement("span", null, activeAction.label)), /* @__PURE__ */ React11.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React11.createElement(DropdownMenu.Trigger, {
|
|
558
563
|
asChild: true
|
|
559
564
|
}, /* @__PURE__ */ React11.createElement(Button3, {
|
|
560
565
|
classNames: [
|
|
@@ -563,7 +568,9 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
|
|
|
563
568
|
]
|
|
564
569
|
}, /* @__PURE__ */ React11.createElement("span", {
|
|
565
570
|
className: "sr-only"
|
|
566
|
-
}, t("invite options label")), /* @__PURE__ */ React11.createElement(CaretDown,
|
|
571
|
+
}, t("invite options label")), /* @__PURE__ */ React11.createElement(CaretDown, {
|
|
572
|
+
className: getSize3(4)
|
|
573
|
+
}))), /* @__PURE__ */ React11.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React11.createElement(DropdownMenu.Viewport, null, Object.entries(actions).map(([id, action]) => {
|
|
567
574
|
return /* @__PURE__ */ React11.createElement(DropdownMenu.CheckboxItem, {
|
|
568
575
|
key: id,
|
|
569
576
|
"aria-labelledby": `${id}__label`,
|
|
@@ -583,7 +590,10 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
|
|
|
583
590
|
className: descriptionText4
|
|
584
591
|
}, action.description)), /* @__PURE__ */ React11.createElement(DropdownMenu.ItemIndicator, {
|
|
585
592
|
asChild: true
|
|
586
|
-
}, /* @__PURE__ */ React11.createElement(Check2,
|
|
593
|
+
}, /* @__PURE__ */ React11.createElement(Check2, {
|
|
594
|
+
weight: "bold",
|
|
595
|
+
className: getSize3(4)
|
|
596
|
+
})));
|
|
587
597
|
})), /* @__PURE__ */ React11.createElement(DropdownMenu.Arrow, null))));
|
|
588
598
|
});
|
|
589
599
|
var Action = /* @__PURE__ */ forwardRef2((props, forwardedRef) => {
|
|
@@ -3292,7 +3302,8 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
|
|
|
3292
3302
|
role: "none",
|
|
3293
3303
|
className: "flex gap-4 items-center justify-center mlb-4"
|
|
3294
3304
|
}, /* @__PURE__ */ React39.createElement(Planet, {
|
|
3295
|
-
size: 32
|
|
3305
|
+
size: 32,
|
|
3306
|
+
weight: "light"
|
|
3296
3307
|
}), /* @__PURE__ */ React39.createElement("div", {
|
|
3297
3308
|
className: "block text-start font-light text-xl"
|
|
3298
3309
|
}, name ?? space.key.truncate())));
|
|
@@ -3897,6 +3908,7 @@ export {
|
|
|
3897
3908
|
InvitationListContainer,
|
|
3898
3909
|
InvitationListItem,
|
|
3899
3910
|
InvitationListItemImpl,
|
|
3911
|
+
InvitationManager,
|
|
3900
3912
|
JoinDialog,
|
|
3901
3913
|
JoinPanel,
|
|
3902
3914
|
JoinPanelImpl,
|