@dxos/shell 0.4.4-main.c5da621 → 0.4.4-main.d035bb3
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 +7671 -7616
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +73 -73
- 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 +56 -30
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/types/src/components/Clipboard/CopyButton.js +5 -5
- 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/IdentityPanel/IdentityPanel.js +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +10 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.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/translations/locales/en-US.d.ts +2 -1
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +2 -1
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/package.json +19 -19
- package/src/components/Clipboard/CopyButton.tsx +5 -5
- 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/IdentityPanel/IdentityPanel.tsx +1 -1
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +21 -5
- package/src/panels/SpacePanel/SpacePanel.tsx +1 -1
- package/src/react.ts +1 -0
- package/src/translations/locales/en-US.ts +2 -1
|
@@ -50,17 +50,15 @@ 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",
|
|
58
57
|
className: mx("flex gap-1 items-center", !isCopied && inactiveLabelStyles)
|
|
59
58
|
}, /* @__PURE__ */ React2.createElement("span", {
|
|
60
59
|
className: "pli-1"
|
|
61
|
-
}, t("copy
|
|
62
|
-
className: getSize(
|
|
63
|
-
weight: "bold",
|
|
60
|
+
}, t("copy success label")), /* @__PURE__ */ React2.createElement(Check, {
|
|
61
|
+
className: getSize(5),
|
|
64
62
|
...iconProps
|
|
65
63
|
})));
|
|
66
64
|
};
|
|
@@ -68,7 +66,7 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
68
66
|
const { t } = useTranslation("os");
|
|
69
67
|
const { textValue, setTextValue } = useClipboardContext();
|
|
70
68
|
const isCopied = textValue === value;
|
|
71
|
-
const label = isCopied ? t("copy
|
|
69
|
+
const label = isCopied ? t("copy success label") : t("copy invitation code label");
|
|
72
70
|
const [open, setOpen] = useState2(false);
|
|
73
71
|
return /* @__PURE__ */ React2.createElement(Tooltip.Root, {
|
|
74
72
|
delayDuration: 1500,
|
|
@@ -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) => {
|
|
@@ -1143,10 +1153,14 @@ var ProfileForm = (props) => {
|
|
|
1143
1153
|
});
|
|
1144
1154
|
};
|
|
1145
1155
|
var ProfileFormImpl = (props) => {
|
|
1146
|
-
const { active,
|
|
1156
|
+
const { active, identity, send, onUpdateProfile, validationMessage } = props;
|
|
1157
|
+
const profile = identity?.profile;
|
|
1147
1158
|
const disabled = !active;
|
|
1148
1159
|
const { t } = useTranslation10("os");
|
|
1149
1160
|
const [inputValue, setInputValue] = useState3(profile?.displayName ?? "");
|
|
1161
|
+
const { textValue, setTextValue } = useClipboardContext();
|
|
1162
|
+
const identityHex = identity?.identityKey.toHex();
|
|
1163
|
+
const copied = textValue === identityHex;
|
|
1150
1164
|
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", {
|
|
1151
1165
|
role: "none",
|
|
1152
1166
|
className: "grow flex flex-col justify-center"
|
|
@@ -1162,6 +1176,15 @@ var ProfileFormImpl = (props) => {
|
|
|
1162
1176
|
displayName: inputValue
|
|
1163
1177
|
})
|
|
1164
1178
|
})), /* @__PURE__ */ React24.createElement(Actions, null, /* @__PURE__ */ React24.createElement(Action, {
|
|
1179
|
+
variant: "ghost",
|
|
1180
|
+
disabled,
|
|
1181
|
+
onClick: () => {
|
|
1182
|
+
if (identityHex) {
|
|
1183
|
+
void setTextValue(identityHex);
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"data-testid": "update-profile-form-copy-key"
|
|
1187
|
+
}, t(copied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React24.createElement(Action, {
|
|
1165
1188
|
variant: "ghost",
|
|
1166
1189
|
disabled,
|
|
1167
1190
|
onClick: () => send?.({
|
|
@@ -1476,7 +1499,7 @@ var IdentityPanelImpl = (props) => {
|
|
|
1476
1499
|
}, /* @__PURE__ */ React27.createElement(ProfileForm, {
|
|
1477
1500
|
send: rest.send,
|
|
1478
1501
|
active: activeView === "update profile form",
|
|
1479
|
-
|
|
1502
|
+
identity,
|
|
1480
1503
|
onUpdateProfile
|
|
1481
1504
|
})), /* @__PURE__ */ React27.createElement(Viewport.View, {
|
|
1482
1505
|
classNames: viewStyles,
|
|
@@ -3292,7 +3315,8 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
|
|
|
3292
3315
|
role: "none",
|
|
3293
3316
|
className: "flex gap-4 items-center justify-center mlb-4"
|
|
3294
3317
|
}, /* @__PURE__ */ React39.createElement(Planet, {
|
|
3295
|
-
size: 32
|
|
3318
|
+
size: 32,
|
|
3319
|
+
weight: "light"
|
|
3296
3320
|
}), /* @__PURE__ */ React39.createElement("div", {
|
|
3297
3321
|
className: "block text-start font-light text-xl"
|
|
3298
3322
|
}, name ?? space.key.truncate())));
|
|
@@ -3592,7 +3616,8 @@ var os = {
|
|
|
3592
3616
|
"identity offline description": "Offline",
|
|
3593
3617
|
"sidebar label": "DXOS sidebar",
|
|
3594
3618
|
"copy invitation code label": "Copy URL",
|
|
3595
|
-
"copy
|
|
3619
|
+
"copy success label": "Copied",
|
|
3620
|
+
"copy self public key label": "Copy public key",
|
|
3596
3621
|
"open share panel label": "View QR code",
|
|
3597
3622
|
"joining space heading": "Joining space",
|
|
3598
3623
|
"join space heading": "Enter space invitation",
|
|
@@ -3897,6 +3922,7 @@ export {
|
|
|
3897
3922
|
InvitationListContainer,
|
|
3898
3923
|
InvitationListItem,
|
|
3899
3924
|
InvitationListItemImpl,
|
|
3925
|
+
InvitationManager,
|
|
3900
3926
|
JoinDialog,
|
|
3901
3927
|
JoinPanel,
|
|
3902
3928
|
JoinPanelImpl,
|