@dxos/react-ui 0.1.25-next.3c6b542 → 0.1.26
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/lib/browser/index.mjs +452 -1092
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts +1 -2
- package/dist/types/src/components/IdentityList/IdentityListItem.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/IdentityListItem.stories.d.ts +1 -2
- package/dist/types/src/components/IdentityList/IdentityListItem.stories.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts +2 -3
- package/dist/types/src/components/IdentityList/SpaceMemberList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberListContainer.d.ts +1 -3
- package/dist/types/src/components/IdentityList/SpaceMemberListContainer.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/index.d.ts +0 -1
- package/dist/types/src/components/IdentityList/index.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.d.ts +1 -6
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationStatusAvatar.stories.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/composites/JoinDialog/JoinDialog.stories.d.ts +2 -2
- package/dist/types/src/composites/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/composites/index.d.ts +0 -2
- package/dist/types/src/composites/index.d.ts.map +1 -1
- package/dist/types/src/layouts/PanelAlertDialog/PanelAlertDialog.d.ts.map +1 -1
- package/dist/types/src/layouts/index.d.ts +0 -1
- package/dist/types/src/layouts/index.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts +0 -3
- package/dist/types/src/panels/JoinPanel/JoinHeading.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanel.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts +3 -4
- package/dist/types/src/panels/JoinPanel/JoinPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/AdditionMethodSelector.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/AdditionMethodSelector.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentityAdded.d.ts +2 -10
- package/dist/types/src/panels/JoinPanel/view-states/IdentityAdded.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentityInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentitySelector.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/IdentitySelector.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationAccepted.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationAuthenticator.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/view-states/InvitationRescuer.d.ts.map +1 -1
- package/dist/types/src/panels/index.d.ts +0 -2
- package/dist/types/src/panels/index.d.ts.map +1 -1
- package/dist/types/src/styles/index.d.ts +0 -1
- package/dist/types/src/styles/index.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +1 -12
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/package.json +11 -12
- package/src/components/IdentityList/IdentityListItem.tsx +3 -15
- package/src/components/IdentityList/SpaceMemberList.tsx +8 -10
- package/src/components/IdentityList/SpaceMemberListContainer.tsx +4 -5
- package/src/components/IdentityList/index.ts +0 -1
- package/src/components/InvitationList/InvitationList.tsx +2 -6
- package/src/components/InvitationList/InvitationListItem.tsx +25 -36
- package/src/components/InvitationList/InvitationStatusAvatar.tsx +5 -10
- package/src/components/index.ts +0 -1
- package/src/composites/JoinDialog/JoinDialog.stories.tsx +58 -59
- package/src/composites/JoinDialog/JoinDialog.tsx +1 -3
- package/src/composites/index.ts +0 -3
- package/src/layouts/PanelAlertDialog/PanelAlertDialog.tsx +8 -4
- package/src/layouts/PanelSidebar/PanelSidebar.tsx +1 -1
- package/src/layouts/index.ts +0 -1
- package/src/panels/JoinPanel/JoinHeading.tsx +16 -44
- package/src/panels/JoinPanel/JoinPanel.tsx +11 -32
- package/src/panels/JoinPanel/JoinPanelProps.ts +8 -4
- package/src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx +1 -5
- package/src/panels/JoinPanel/view-states/IdentityAdded.tsx +24 -63
- package/src/panels/JoinPanel/view-states/IdentityInput.tsx +1 -8
- package/src/panels/JoinPanel/view-states/IdentitySelector.tsx +1 -4
- package/src/panels/JoinPanel/view-states/InvitationAccepted.tsx +0 -1
- package/src/panels/JoinPanel/view-states/InvitationAuthenticator.tsx +1 -4
- package/src/panels/JoinPanel/view-states/InvitationInput.tsx +1 -8
- package/src/panels/JoinPanel/view-states/InvitationRescuer.tsx +1 -4
- package/src/panels/index.ts +0 -2
- package/src/styles/index.ts +0 -1
- package/src/translations/locales/en-US.ts +3 -14
- package/dist/types/src/components/IdentityList/DeviceList.d.ts +0 -7
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +0 -1
- package/dist/types/src/components/SpaceList/SpaceListItem.d.ts +0 -7
- package/dist/types/src/components/SpaceList/SpaceListItem.d.ts.map +0 -1
- package/dist/types/src/components/SpaceList/index.d.ts +0 -2
- package/dist/types/src/components/SpaceList/index.d.ts.map +0 -1
- package/dist/types/src/composites/DevicesDialog/DevicesDialog.d.ts +0 -6
- package/dist/types/src/composites/DevicesDialog/DevicesDialog.d.ts.map +0 -1
- package/dist/types/src/composites/DevicesDialog/index.d.ts +0 -2
- package/dist/types/src/composites/DevicesDialog/index.d.ts.map +0 -1
- package/dist/types/src/composites/Shell/Shell.d.ts +0 -6
- package/dist/types/src/composites/Shell/Shell.d.ts.map +0 -1
- package/dist/types/src/composites/Shell/index.d.ts +0 -2
- package/dist/types/src/composites/Shell/index.d.ts.map +0 -1
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts +0 -6
- package/dist/types/src/composites/SpaceDialog/SpaceDialog.d.ts.map +0 -1
- package/dist/types/src/composites/SpaceDialog/index.d.ts +0 -2
- package/dist/types/src/composites/SpaceDialog/index.d.ts.map +0 -1
- package/dist/types/src/layouts/PanelDialog/PanelDialog.d.ts +0 -14
- package/dist/types/src/layouts/PanelDialog/PanelDialog.d.ts.map +0 -1
- package/dist/types/src/layouts/PanelDialog/index.d.ts +0 -2
- package/dist/types/src/layouts/PanelDialog/index.d.ts.map +0 -1
- package/dist/types/src/panels/DevicesPanel/DevicesPanel.d.ts +0 -10
- package/dist/types/src/panels/DevicesPanel/DevicesPanel.d.ts.map +0 -1
- package/dist/types/src/panels/DevicesPanel/index.d.ts +0 -2
- package/dist/types/src/panels/DevicesPanel/index.d.ts.map +0 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts +0 -18
- package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +0 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts +0 -9
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.d.ts.map +0 -1
- package/dist/types/src/panels/SpacePanel/index.d.ts +0 -2
- package/dist/types/src/panels/SpacePanel/index.d.ts.map +0 -1
- package/dist/types/src/styles/dialogStyles.d.ts +0 -3
- package/dist/types/src/styles/dialogStyles.d.ts.map +0 -1
- package/src/components/IdentityList/DeviceList.tsx +0 -31
- package/src/components/SpaceList/SpaceListItem.tsx +0 -32
- package/src/components/SpaceList/index.ts +0 -5
- package/src/composites/DevicesDialog/DevicesDialog.tsx +0 -38
- package/src/composites/DevicesDialog/index.ts +0 -5
- package/src/composites/Shell/Shell.tsx +0 -92
- package/src/composites/Shell/index.ts +0 -5
- package/src/composites/SpaceDialog/SpaceDialog.tsx +0 -38
- package/src/composites/SpaceDialog/index.ts +0 -5
- package/src/layouts/PanelDialog/PanelDialog.tsx +0 -39
- package/src/layouts/PanelDialog/index.ts +0 -5
- package/src/panels/DevicesPanel/DevicesPanel.tsx +0 -98
- package/src/panels/DevicesPanel/index.ts +0 -5
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +0 -53
- package/src/panels/SpacePanel/SpacePanel.tsx +0 -174
- package/src/panels/SpacePanel/index.ts +0 -5
- package/src/styles/dialogStyles.ts +0 -8
|
@@ -4,13 +4,10 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// packages/apps/patterns/react-ui/src/components/IdentityList/DeviceList.tsx
|
|
8
|
-
import React2 from "react";
|
|
9
|
-
|
|
10
7
|
// packages/apps/patterns/react-ui/src/components/IdentityList/IdentityListItem.tsx
|
|
11
8
|
import React from "react";
|
|
12
9
|
import { SpaceMember } from "@dxos/client";
|
|
13
|
-
import { Avatar,
|
|
10
|
+
import { Avatar, useTranslation } from "@dxos/react-components";
|
|
14
11
|
function _extends() {
|
|
15
12
|
_extends = Object.assign || function(target) {
|
|
16
13
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -25,13 +22,11 @@ function _extends() {
|
|
|
25
22
|
};
|
|
26
23
|
return _extends.apply(this, arguments);
|
|
27
24
|
}
|
|
28
|
-
var IdentityListItem = ({ identity, presence
|
|
25
|
+
var IdentityListItem = ({ identity, presence }) => {
|
|
29
26
|
var _a;
|
|
30
27
|
const { t } = useTranslation("os");
|
|
31
28
|
return /* @__PURE__ */ React.createElement("li", {
|
|
32
|
-
className:
|
|
33
|
-
onClick: () => onClick == null ? void 0 : onClick(),
|
|
34
|
-
"data-testid": "identity-list-item"
|
|
29
|
+
className: "flex gap-2 items-center"
|
|
35
30
|
}, /* @__PURE__ */ React.createElement(Avatar, _extends({}, {
|
|
36
31
|
variant: "circle",
|
|
37
32
|
size: 9,
|
|
@@ -59,61 +54,38 @@ var IdentityListItem = ({ identity, presence, onClick }) => {
|
|
|
59
54
|
})));
|
|
60
55
|
};
|
|
61
56
|
|
|
62
|
-
// packages/apps/patterns/react-ui/src/components/IdentityList/
|
|
63
|
-
|
|
57
|
+
// packages/apps/patterns/react-ui/src/components/IdentityList/SpaceMemberList.tsx
|
|
58
|
+
import React2 from "react";
|
|
59
|
+
var SpaceMemberList = ({ spaceMembers }) => {
|
|
64
60
|
return /* @__PURE__ */ React2.createElement("ul", {
|
|
65
61
|
className: "flex flex-col gap-2"
|
|
66
|
-
},
|
|
67
|
-
const identity = {
|
|
68
|
-
identityKey: device.publicKey,
|
|
69
|
-
displayName: device.displayName
|
|
70
|
-
};
|
|
62
|
+
}, spaceMembers.filter((spaceMember) => spaceMember.profile).map((spaceMember) => {
|
|
71
63
|
return /* @__PURE__ */ React2.createElement(IdentityListItem, {
|
|
72
|
-
key:
|
|
73
|
-
identity,
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// packages/apps/patterns/react-ui/src/components/IdentityList/SpaceMemberList.tsx
|
|
80
|
-
import React3 from "react";
|
|
81
|
-
var SpaceMemberList = ({ members, onSelect }) => {
|
|
82
|
-
return /* @__PURE__ */ React3.createElement("ul", {
|
|
83
|
-
className: "flex flex-col gap-2"
|
|
84
|
-
}, members.filter((member) => member.profile).map((member) => {
|
|
85
|
-
return /* @__PURE__ */ React3.createElement(IdentityListItem, {
|
|
86
|
-
key: member.identityKey.toHex(),
|
|
87
|
-
identity: member.profile,
|
|
88
|
-
presence: member.presence,
|
|
89
|
-
onClick: onSelect && (() => onSelect(member))
|
|
64
|
+
key: spaceMember.identityKey.toHex(),
|
|
65
|
+
identity: spaceMember.profile,
|
|
66
|
+
presence: spaceMember.presence
|
|
90
67
|
});
|
|
91
68
|
}));
|
|
92
69
|
};
|
|
93
70
|
|
|
94
71
|
// packages/apps/patterns/react-ui/src/components/IdentityList/SpaceMemberListContainer.tsx
|
|
95
|
-
import
|
|
72
|
+
import React3, { useMemo } from "react";
|
|
96
73
|
import { useClient, useMembers } from "@dxos/react-client";
|
|
97
|
-
var SpaceMemberListContainer = ({ spaceKey, includeSelf
|
|
74
|
+
var SpaceMemberListContainer = ({ spaceKey, includeSelf }) => {
|
|
98
75
|
const client = useClient();
|
|
99
76
|
const allUnsortedMembers = useMembers(spaceKey);
|
|
100
|
-
const
|
|
77
|
+
const spaceMembers = useMemo(() => includeSelf ? allUnsortedMembers.sort((a) => a.identityKey.equals(client.halo.profile.identityKey) ? -1 : 1) : allUnsortedMembers.filter((member) => !member.identityKey.equals(client.halo.profile.identityKey)), [
|
|
101
78
|
allUnsortedMembers
|
|
102
79
|
]);
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
onSelect
|
|
80
|
+
return /* @__PURE__ */ React3.createElement(SpaceMemberList, {
|
|
81
|
+
spaceMembers
|
|
106
82
|
});
|
|
107
83
|
};
|
|
108
84
|
|
|
109
85
|
// packages/apps/patterns/react-ui/src/components/InvitationList/InvitationStatusAvatar.tsx
|
|
110
|
-
import
|
|
86
|
+
import React4 from "react";
|
|
111
87
|
import { Invitation as Invitation3 } from "@dxos/client";
|
|
112
|
-
import { getSize
|
|
113
|
-
|
|
114
|
-
// packages/apps/patterns/react-ui/src/styles/dialogStyles.ts
|
|
115
|
-
var defaultOverlay = "fixed inset-0 backdrop-blur z-50 overflow-auto grid place-items-center p-2 md:p-4 lg:p-8";
|
|
116
|
-
var defaultDialogContent = "is-full min-is-[260px] max-is-[320px] rounded-md shadow-md backdrop-blur-md";
|
|
88
|
+
import { getSize } from "@dxos/react-components";
|
|
117
89
|
|
|
118
90
|
// packages/apps/patterns/react-ui/src/styles/panelStyles.ts
|
|
119
91
|
var defaultSurface = "bg-neutral-50/[.72] dark:bg-neutral-950/[.72]";
|
|
@@ -194,7 +166,7 @@ function _extends2() {
|
|
|
194
166
|
return _extends2.apply(this, arguments);
|
|
195
167
|
}
|
|
196
168
|
var svgSize = 32;
|
|
197
|
-
var strokeWidth =
|
|
169
|
+
var strokeWidth = 4;
|
|
198
170
|
var radius = (svgSize - strokeWidth) / 2;
|
|
199
171
|
var circumference = Math.PI * 2 * radius;
|
|
200
172
|
var gap = circumference / 12;
|
|
@@ -207,20 +179,19 @@ var circleProps = {
|
|
|
207
179
|
cx: svgSize / 2,
|
|
208
180
|
cy: svgSize / 2,
|
|
209
181
|
r: radius,
|
|
210
|
-
strokeWidth,
|
|
182
|
+
strokeWidth: 4,
|
|
211
183
|
strokeDasharray: `${segment - gap} ${2 * segment + gap}`
|
|
212
184
|
};
|
|
213
|
-
var InvitationStatusAvatar = ({ size = 10, status, haltedAt
|
|
214
|
-
var _a;
|
|
185
|
+
var InvitationStatusAvatar = ({ size = 10, status, haltedAt }) => {
|
|
215
186
|
const resolvedColor = resolvedStrokeColor(status);
|
|
216
187
|
const halted = status === Invitation3.State.CANCELLED || status === Invitation3.State.TIMEOUT || status === Invitation3.State.ERROR;
|
|
217
188
|
const cursor = invitationStatusValue.get(halted ? haltedAt : status);
|
|
218
|
-
return /* @__PURE__ */
|
|
189
|
+
return /* @__PURE__ */ React4.createElement("svg", {
|
|
219
190
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
220
|
-
className:
|
|
221
|
-
}
|
|
191
|
+
className: getSize(size)
|
|
192
|
+
}, [
|
|
222
193
|
...Array(nSegments)
|
|
223
|
-
].map((_, index) => /* @__PURE__ */
|
|
194
|
+
].map((_, index) => /* @__PURE__ */ React4.createElement("circle", _extends2({
|
|
224
195
|
key: index
|
|
225
196
|
}, circleProps, {
|
|
226
197
|
strokeDashoffset: index * segment + baseOffset,
|
|
@@ -232,9 +203,9 @@ var InvitationStatusAvatar = ({ size = 10, status, haltedAt, slots = {} }) => {
|
|
|
232
203
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
233
204
|
import { Copy, ProhibitInset, QrCode, X } from "phosphor-react";
|
|
234
205
|
import { QRCodeSVG } from "qrcode.react";
|
|
235
|
-
import
|
|
206
|
+
import React5, { useCallback } from "react";
|
|
236
207
|
import { useInvitationStatus } from "@dxos/react-client";
|
|
237
|
-
import { Button, getSize as getSize2, mx
|
|
208
|
+
import { Button, getSize as getSize2, mx, useTranslation as useTranslation2 } from "@dxos/react-components";
|
|
238
209
|
function _extends3() {
|
|
239
210
|
_extends3 = Object.assign || function(target) {
|
|
240
211
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -252,98 +223,85 @@ function _extends3() {
|
|
|
252
223
|
var InvitationListItem = ({ invitation, value, onClickRemove, createInvitationUrl }) => {
|
|
253
224
|
var _a;
|
|
254
225
|
const { t } = useTranslation2("os");
|
|
255
|
-
const qrLabel = useId("qrLabel");
|
|
256
226
|
const { cancel, status, haltedAt, invitationCode, authenticationCode } = useInvitationStatus(invitation);
|
|
257
227
|
const statusValue = (_a = invitationStatusValue.get(status)) != null ? _a : 0;
|
|
258
228
|
const isCancellable = statusValue < 4 && statusValue >= 0;
|
|
259
229
|
const showShare = statusValue < 3 && statusValue >= 0;
|
|
260
|
-
const
|
|
230
|
+
const showPin = statusValue === 3;
|
|
261
231
|
const handleClickRemove = useCallback(() => onClickRemove(invitation), [
|
|
262
232
|
invitation,
|
|
263
233
|
onClickRemove
|
|
264
234
|
]);
|
|
265
235
|
const invitationUrl = invitationCode && createInvitationUrl(invitationCode);
|
|
266
|
-
const
|
|
236
|
+
const handleCLickCopy = useCallback(() => {
|
|
267
237
|
if (invitationUrl) {
|
|
268
238
|
void navigator.clipboard.writeText(invitationUrl);
|
|
269
239
|
}
|
|
270
240
|
}, [
|
|
271
241
|
invitationUrl
|
|
272
242
|
]);
|
|
273
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ React5.createElement(AccordionPrimitive.Item, {
|
|
274
244
|
value
|
|
275
|
-
}, /* @__PURE__ */
|
|
245
|
+
}, /* @__PURE__ */ React5.createElement(AccordionPrimitive.Header, {
|
|
276
246
|
className: "flex gap-2 items-center"
|
|
277
|
-
}, /* @__PURE__ */
|
|
247
|
+
}, /* @__PURE__ */ React5.createElement(InvitationStatusAvatar, _extends3({}, {
|
|
278
248
|
status,
|
|
279
|
-
haltedAt
|
|
280
|
-
|
|
281
|
-
})), showShare && invitationUrl ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(AccordionPrimitive.Trigger, {
|
|
249
|
+
haltedAt
|
|
250
|
+
})), showShare && invitationUrl ? /* @__PURE__ */ React5.createElement(AccordionPrimitive.Trigger, {
|
|
282
251
|
asChild: true
|
|
283
|
-
}, /* @__PURE__ */
|
|
284
|
-
className: "grow flex gap-1"
|
|
285
|
-
|
|
286
|
-
}, /* @__PURE__ */ React6.createElement("span", null, t("open share panel label")), /* @__PURE__ */ React6.createElement(QrCode, {
|
|
252
|
+
}, /* @__PURE__ */ React5.createElement(Button, {
|
|
253
|
+
className: "grow flex gap-1"
|
|
254
|
+
}, /* @__PURE__ */ React5.createElement("span", null, t("open share panel label")), /* @__PURE__ */ React5.createElement(QrCode, {
|
|
287
255
|
className: getSize2(4),
|
|
288
256
|
weight: "bold"
|
|
289
|
-
})))
|
|
290
|
-
className: "flex gap-1",
|
|
291
|
-
onClick: handleClickCopy,
|
|
292
|
-
"data-testid": "copy-invitation"
|
|
293
|
-
}, /* @__PURE__ */ React6.createElement("span", {
|
|
294
|
-
className: "pli-1"
|
|
295
|
-
}, t("copy invitation code label")), /* @__PURE__ */ React6.createElement(Copy, {
|
|
296
|
-
className: getSize2(4),
|
|
297
|
-
weight: "bold"
|
|
298
|
-
}))) : showAuthCode ? /* @__PURE__ */ React6.createElement("p", {
|
|
257
|
+
}))) : showPin ? /* @__PURE__ */ React5.createElement("p", {
|
|
299
258
|
className: "grow text-xl text-center text-success-500 dark:text-success-300 font-mono"
|
|
300
|
-
}, authenticationCode) : /* @__PURE__ */
|
|
259
|
+
}, authenticationCode) : /* @__PURE__ */ React5.createElement("span", {
|
|
301
260
|
role: "none",
|
|
302
261
|
className: "grow"
|
|
303
|
-
}), isCancellable ? /* @__PURE__ */
|
|
262
|
+
}), isCancellable ? /* @__PURE__ */ React5.createElement(Button, {
|
|
304
263
|
variant: "ghost",
|
|
305
264
|
compact: true,
|
|
306
265
|
className: "flex gap-1",
|
|
307
|
-
onClick: cancel
|
|
308
|
-
|
|
309
|
-
}, /* @__PURE__ */ React6.createElement("span", {
|
|
266
|
+
onClick: cancel
|
|
267
|
+
}, /* @__PURE__ */ React5.createElement("span", {
|
|
310
268
|
className: "sr-only"
|
|
311
|
-
}, t("cancel invitation label")), /* @__PURE__ */
|
|
269
|
+
}, t("cancel invitation label")), /* @__PURE__ */ React5.createElement(ProhibitInset, {
|
|
312
270
|
className: getSize2(4),
|
|
313
271
|
weight: "bold"
|
|
314
|
-
})) : /* @__PURE__ */
|
|
272
|
+
})) : /* @__PURE__ */ React5.createElement(Button, {
|
|
315
273
|
variant: "ghost",
|
|
316
274
|
compact: true,
|
|
317
275
|
className: "flex gap-1",
|
|
318
|
-
onClick: handleClickRemove
|
|
319
|
-
|
|
320
|
-
}, /* @__PURE__ */ React6.createElement("span", {
|
|
276
|
+
onClick: handleClickRemove
|
|
277
|
+
}, /* @__PURE__ */ React5.createElement("span", {
|
|
321
278
|
className: "sr-only"
|
|
322
|
-
}, t("remove invitation label")), /* @__PURE__ */
|
|
279
|
+
}, t("remove invitation label")), /* @__PURE__ */ React5.createElement(X, {
|
|
323
280
|
className: getSize2(4),
|
|
324
281
|
weight: "bold"
|
|
325
|
-
}))), showShare && invitationUrl && /* @__PURE__ */
|
|
326
|
-
className: "flex gap-2 is-full
|
|
327
|
-
|
|
282
|
+
}))), showShare && invitationUrl && /* @__PURE__ */ React5.createElement(AccordionPrimitive.Content, null, /* @__PURE__ */ React5.createElement(Button, {
|
|
283
|
+
className: "flex gap-2 is-full p-2",
|
|
284
|
+
onClick: handleCLickCopy
|
|
285
|
+
}, /* @__PURE__ */ React5.createElement(QRCodeSVG, {
|
|
328
286
|
bgColor: "transparent",
|
|
329
287
|
fgColor: "currentColor",
|
|
330
288
|
value: invitationUrl,
|
|
331
|
-
className:
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
289
|
+
className: mx("grow aspect-square is-24 bs-auto")
|
|
290
|
+
}), /* @__PURE__ */ React5.createElement("span", {
|
|
291
|
+
className: "pli-1"
|
|
292
|
+
}, t("copy invitation code label"), /* @__PURE__ */ React5.createElement(Copy, {
|
|
293
|
+
className: mx(getSize2(4), "inline mis-1"),
|
|
294
|
+
weight: "bold"
|
|
295
|
+
})))));
|
|
337
296
|
};
|
|
338
297
|
|
|
339
298
|
// packages/apps/patterns/react-ui/src/components/InvitationList/InvitationListContainer.tsx
|
|
340
|
-
import
|
|
299
|
+
import React7, { useCallback as useCallback2 } from "react";
|
|
341
300
|
import { useSpace, useSpaceInvitations } from "@dxos/react-client";
|
|
342
301
|
|
|
343
302
|
// packages/apps/patterns/react-ui/src/components/InvitationList/InvitationList.tsx
|
|
344
303
|
import { Root as AccordionRoot } from "@radix-ui/react-accordion";
|
|
345
|
-
import
|
|
346
|
-
import { defaultDescription, mx as mx4, useTranslation as useTranslation3 } from "@dxos/react-components";
|
|
304
|
+
import React6 from "react";
|
|
347
305
|
function _extends4() {
|
|
348
306
|
_extends4 = Object.assign || function(target) {
|
|
349
307
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -359,22 +317,18 @@ function _extends4() {
|
|
|
359
317
|
return _extends4.apply(this, arguments);
|
|
360
318
|
}
|
|
361
319
|
var InvitationList = ({ invitations, ...invitationProps }) => {
|
|
362
|
-
|
|
363
|
-
return invitations.length ? /* @__PURE__ */ React7.createElement(AccordionRoot, {
|
|
320
|
+
return /* @__PURE__ */ React6.createElement(AccordionRoot, {
|
|
364
321
|
type: "single",
|
|
365
|
-
collapsible: true
|
|
366
|
-
className: "flex flex-col gap-1"
|
|
322
|
+
collapsible: true
|
|
367
323
|
}, invitations.map((invitation, index) => {
|
|
368
324
|
var _a, _b;
|
|
369
325
|
const value = (_b = (_a = invitation.invitation) == null ? void 0 : _a.invitationId) != null ? _b : `inv_${index}`;
|
|
370
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ React6.createElement(InvitationListItem, _extends4({
|
|
371
327
|
key: value,
|
|
372
328
|
value,
|
|
373
329
|
invitation
|
|
374
330
|
}, invitationProps));
|
|
375
|
-
}))
|
|
376
|
-
className: mx4(defaultDescription, "text-center p-2")
|
|
377
|
-
}, t("empty invitations message"));
|
|
331
|
+
}));
|
|
378
332
|
};
|
|
379
333
|
|
|
380
334
|
// packages/apps/patterns/react-ui/src/components/InvitationList/InvitationListContainer.tsx
|
|
@@ -400,7 +354,7 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl }) => {
|
|
|
400
354
|
}, [
|
|
401
355
|
space
|
|
402
356
|
]);
|
|
403
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ React7.createElement(InvitationList, _extends5({
|
|
404
358
|
invitations
|
|
405
359
|
}, {
|
|
406
360
|
onClickRemove,
|
|
@@ -409,8 +363,8 @@ var InvitationListContainer = ({ spaceKey, createInvitationUrl }) => {
|
|
|
409
363
|
};
|
|
410
364
|
|
|
411
365
|
// packages/apps/patterns/react-ui/src/components/PanelSeparator/PanelSeparator.tsx
|
|
412
|
-
import
|
|
413
|
-
import { mx as
|
|
366
|
+
import React8 from "react";
|
|
367
|
+
import { mx as mx2 } from "@dxos/react-components";
|
|
414
368
|
function _extends6() {
|
|
415
369
|
_extends6 = Object.assign || function(target) {
|
|
416
370
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -426,65 +380,22 @@ function _extends6() {
|
|
|
426
380
|
return _extends6.apply(this, arguments);
|
|
427
381
|
}
|
|
428
382
|
var PanelSeparator = ({ className, ...props }) => {
|
|
429
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ React8.createElement("span", _extends6({
|
|
430
384
|
role: "none"
|
|
431
385
|
}, props, {
|
|
432
|
-
className:
|
|
386
|
+
className: mx2("block bs-px mlb-1 bg-neutral-800/10 dark:bg-neutral-200/10", className)
|
|
433
387
|
}));
|
|
434
388
|
};
|
|
435
389
|
|
|
436
|
-
// packages/apps/patterns/react-ui/src/components/SpaceList/SpaceListItem.tsx
|
|
437
|
-
import React10, { forwardRef } from "react";
|
|
438
|
-
import { Avatar as Avatar2, mx as mx6 } from "@dxos/react-components";
|
|
439
|
-
import { humanize } from "@dxos/util";
|
|
440
|
-
function _extends7() {
|
|
441
|
-
_extends7 = Object.assign || function(target) {
|
|
442
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
443
|
-
var source = arguments[i];
|
|
444
|
-
for (var key in source) {
|
|
445
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
446
|
-
target[key] = source[key];
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
return target;
|
|
451
|
-
};
|
|
452
|
-
return _extends7.apply(this, arguments);
|
|
453
|
-
}
|
|
454
|
-
var SpaceListItem = /* @__PURE__ */ forwardRef(({ space, onClick }, ref) => {
|
|
455
|
-
var _a;
|
|
456
|
-
return /* @__PURE__ */ React10.createElement("li", {
|
|
457
|
-
className: mx6("flex gap-2 items-center", onClick && "cursor-pointer"),
|
|
458
|
-
onClick: () => onClick == null ? void 0 : onClick(),
|
|
459
|
-
ref,
|
|
460
|
-
"data-testid": "space-list-item"
|
|
461
|
-
}, /* @__PURE__ */ React10.createElement(Avatar2, _extends7({}, {
|
|
462
|
-
variant: "circle",
|
|
463
|
-
size: 9,
|
|
464
|
-
fallbackValue: space.key.toHex(),
|
|
465
|
-
label: /* @__PURE__ */ React10.createElement("p", {
|
|
466
|
-
className: "text-sm truncate"
|
|
467
|
-
}, (_a = space.properties.name) != null ? _a : humanize(space.key)),
|
|
468
|
-
slots: {
|
|
469
|
-
labels: {
|
|
470
|
-
className: "block shrink overflow-hidden"
|
|
471
|
-
},
|
|
472
|
-
root: {
|
|
473
|
-
className: "shrink-0"
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
})));
|
|
477
|
-
});
|
|
478
|
-
|
|
479
390
|
// packages/apps/patterns/react-ui/src/composites/IdentityPopover/IdentityPopover.tsx
|
|
480
|
-
import
|
|
481
|
-
import { Avatar as
|
|
391
|
+
import React24 from "react";
|
|
392
|
+
import { Avatar as Avatar7, mx as mx16 } from "@dxos/react-components";
|
|
482
393
|
|
|
483
394
|
// packages/apps/patterns/react-ui/src/layouts/PanelPopover/PanelPopover.tsx
|
|
484
|
-
import
|
|
485
|
-
import { mx as
|
|
486
|
-
function
|
|
487
|
-
|
|
395
|
+
import React9 from "react";
|
|
396
|
+
import { mx as mx3, Popover } from "@dxos/react-components";
|
|
397
|
+
function _extends7() {
|
|
398
|
+
_extends7 = Object.assign || function(target) {
|
|
488
399
|
for (var i = 1; i < arguments.length; i++) {
|
|
489
400
|
var source = arguments[i];
|
|
490
401
|
for (var key in source) {
|
|
@@ -495,25 +406,25 @@ function _extends8() {
|
|
|
495
406
|
}
|
|
496
407
|
return target;
|
|
497
408
|
};
|
|
498
|
-
return
|
|
409
|
+
return _extends7.apply(this, arguments);
|
|
499
410
|
}
|
|
500
411
|
var PanelPopover = ({ slots, children, ...popoverProps }) => {
|
|
501
412
|
var _a, _b, _c;
|
|
502
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ React9.createElement(Popover, _extends7({
|
|
503
414
|
slots: {
|
|
504
415
|
arrow: {
|
|
505
416
|
...slots == null ? void 0 : slots.arrow,
|
|
506
|
-
className:
|
|
417
|
+
className: mx3(defaultArrow, (_a = slots == null ? void 0 : slots.arrow) == null ? void 0 : _a.className)
|
|
507
418
|
},
|
|
508
419
|
content: {
|
|
509
420
|
collisionPadding: 8,
|
|
510
421
|
sideOffset: 4,
|
|
511
422
|
...slots == null ? void 0 : slots.content,
|
|
512
|
-
className:
|
|
423
|
+
className: mx3(defaultSurface, (_b = slots == null ? void 0 : slots.content) == null ? void 0 : _b.className)
|
|
513
424
|
},
|
|
514
425
|
trigger: {
|
|
515
426
|
...slots == null ? void 0 : slots.trigger,
|
|
516
|
-
className:
|
|
427
|
+
className: mx3("", (_c = slots == null ? void 0 : slots.trigger) == null ? void 0 : _c.className)
|
|
517
428
|
},
|
|
518
429
|
...slots
|
|
519
430
|
}
|
|
@@ -522,10 +433,10 @@ var PanelPopover = ({ slots, children, ...popoverProps }) => {
|
|
|
522
433
|
|
|
523
434
|
// packages/apps/patterns/react-ui/src/layouts/PanelSidebar/PanelSidebar.tsx
|
|
524
435
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
525
|
-
import
|
|
526
|
-
import { defaultOverlay
|
|
527
|
-
function
|
|
528
|
-
|
|
436
|
+
import React10, { createContext, useCallback as useCallback3, useContext, useState } from "react";
|
|
437
|
+
import { defaultOverlay, mx as mx4, useMediaQuery, useTranslation as useTranslation3 } from "@dxos/react-components";
|
|
438
|
+
function _extends8() {
|
|
439
|
+
_extends8 = Object.assign || function(target) {
|
|
529
440
|
for (var i = 1; i < arguments.length; i++) {
|
|
530
441
|
var source = arguments[i];
|
|
531
442
|
for (var key in source) {
|
|
@@ -536,7 +447,7 @@ function _extends9() {
|
|
|
536
447
|
}
|
|
537
448
|
return target;
|
|
538
449
|
};
|
|
539
|
-
return
|
|
450
|
+
return _extends8.apply(this, arguments);
|
|
540
451
|
}
|
|
541
452
|
var PanelSidebarContext = /* @__PURE__ */ createContext({
|
|
542
453
|
displayState: "hide",
|
|
@@ -553,7 +464,7 @@ var useTogglePanelSidebar = () => {
|
|
|
553
464
|
};
|
|
554
465
|
var PanelSidebarProvider = ({ children, slots }) => {
|
|
555
466
|
var _a, _b, _c;
|
|
556
|
-
const { t } =
|
|
467
|
+
const { t } = useTranslation3("os");
|
|
557
468
|
const [isLg] = useMediaQuery("lg", {
|
|
558
469
|
ssr: false
|
|
559
470
|
});
|
|
@@ -576,37 +487,37 @@ var PanelSidebarProvider = ({ children, slots }) => {
|
|
|
576
487
|
}, 0);
|
|
577
488
|
};
|
|
578
489
|
const setDisplayState = (displayState2) => displayState2 === "show" ? internalShow() : internalHide();
|
|
579
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ React10.createElement(PanelSidebarContext.Provider, {
|
|
580
491
|
value: {
|
|
581
492
|
setDisplayState,
|
|
582
493
|
displayState
|
|
583
494
|
}
|
|
584
|
-
}, /* @__PURE__ */
|
|
495
|
+
}, /* @__PURE__ */ React10.createElement(DialogPrimitive.Root, {
|
|
585
496
|
open: domShow,
|
|
586
497
|
modal: !isLg
|
|
587
|
-
}, /* @__PURE__ */
|
|
498
|
+
}, /* @__PURE__ */ React10.createElement(DialogPrimitive.Content, _extends8({
|
|
588
499
|
onOpenAutoFocus: (event) => isLg && event.preventDefault(),
|
|
589
500
|
onCloseAutoFocus: (event) => isLg && event.preventDefault()
|
|
590
501
|
}, slots == null ? void 0 : slots.content, {
|
|
591
|
-
className:
|
|
592
|
-
}), /* @__PURE__ */
|
|
502
|
+
className: mx4("fixed block-start-0 block-end-0 is-sidebar z-50 overscroll-contain overflow-x-hidden overflow-y-auto", "transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out", transitionShow ? "inline-start-0" : "-inline-start-sidebar", (_a = slots == null ? void 0 : slots.content) == null ? void 0 : _a.className)
|
|
503
|
+
}), /* @__PURE__ */ React10.createElement(DialogPrimitive.Title, {
|
|
593
504
|
className: "sr-only"
|
|
594
|
-
}, t("sidebar label")), (_b = slots == null ? void 0 : slots.content) == null ? void 0 : _b.children), !isLg && /* @__PURE__ */
|
|
595
|
-
className:
|
|
505
|
+
}, t("sidebar label")), (_b = slots == null ? void 0 : slots.content) == null ? void 0 : _b.children), !isLg && /* @__PURE__ */ React10.createElement(DialogPrimitive.Overlay, {
|
|
506
|
+
className: mx4(defaultOverlay, "transition-opacity duration-200 ease-in-out", transitionShow ? "opacity-100" : "opacity-0"),
|
|
596
507
|
onClick: internalHide
|
|
597
|
-
}), /* @__PURE__ */
|
|
508
|
+
}), /* @__PURE__ */ React10.createElement("div", _extends8({
|
|
598
509
|
role: "none"
|
|
599
510
|
}, slots == null ? void 0 : slots.main, {
|
|
600
|
-
className:
|
|
511
|
+
className: mx4("transition-[padding-inline-start] duration-200 ease-in-out", isLg && isOpen ? "pis-sidebar" : "pis-0", (_c = slots == null ? void 0 : slots.main) == null ? void 0 : _c.className)
|
|
601
512
|
}), children)));
|
|
602
513
|
};
|
|
603
514
|
|
|
604
515
|
// packages/apps/patterns/react-ui/src/layouts/PanelAlertDialog/PanelAlertDialog.tsx
|
|
605
516
|
import * as AlertDialog from "@radix-ui/react-alert-dialog";
|
|
606
|
-
import
|
|
607
|
-
import { mx as
|
|
608
|
-
function
|
|
609
|
-
|
|
517
|
+
import React11 from "react";
|
|
518
|
+
import { mx as mx5 } from "@dxos/react-components";
|
|
519
|
+
function _extends9() {
|
|
520
|
+
_extends9 = Object.assign || function(target) {
|
|
610
521
|
for (var i = 1; i < arguments.length; i++) {
|
|
611
522
|
var source = arguments[i];
|
|
612
523
|
for (var key in source) {
|
|
@@ -617,162 +528,47 @@ function _extends10() {
|
|
|
617
528
|
}
|
|
618
529
|
return target;
|
|
619
530
|
};
|
|
620
|
-
return
|
|
531
|
+
return _extends9.apply(this, arguments);
|
|
621
532
|
}
|
|
622
533
|
var PanelAlertDialog = ({ titleId, slots = {}, children }) => {
|
|
623
534
|
var _a, _b;
|
|
624
|
-
return /* @__PURE__ */
|
|
535
|
+
return /* @__PURE__ */ React11.createElement(AlertDialog.Root, _extends9({
|
|
625
536
|
defaultOpen: true
|
|
626
|
-
}, slots.root), slots.trigger && /* @__PURE__ */
|
|
627
|
-
className:
|
|
628
|
-
}), /* @__PURE__ */
|
|
537
|
+
}, slots.root), slots.trigger && /* @__PURE__ */ React11.createElement(AlertDialog.Trigger, _extends9({}, slots.trigger)), /* @__PURE__ */ React11.createElement(AlertDialog.Overlay, _extends9({}, slots.overlay, {
|
|
538
|
+
className: mx5("fixed inset-0 backdrop-blur z-50 overflow-auto grid place-items-center p-2 md:p-4 lg:p-8", (_a = slots.overlay) == null ? void 0 : _a.className)
|
|
539
|
+
}), /* @__PURE__ */ React11.createElement(AlertDialog.Content, _extends9({
|
|
629
540
|
onEscapeKeyDown: (event) => event.preventDefault()
|
|
630
541
|
}, slots.content, {
|
|
631
542
|
"aria-labelledby": titleId,
|
|
632
|
-
className:
|
|
633
|
-
}), children)));
|
|
634
|
-
};
|
|
635
|
-
|
|
636
|
-
// packages/apps/patterns/react-ui/src/layouts/PanelDialog/PanelDialog.tsx
|
|
637
|
-
import * as Dialog from "@radix-ui/react-dialog";
|
|
638
|
-
import React14 from "react";
|
|
639
|
-
import { mx as mx10 } from "@dxos/react-components";
|
|
640
|
-
function _extends11() {
|
|
641
|
-
_extends11 = Object.assign || function(target) {
|
|
642
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
643
|
-
var source = arguments[i];
|
|
644
|
-
for (var key in source) {
|
|
645
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
646
|
-
target[key] = source[key];
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
return target;
|
|
651
|
-
};
|
|
652
|
-
return _extends11.apply(this, arguments);
|
|
653
|
-
}
|
|
654
|
-
var PanelDialog = ({ titleId, slots = {}, children }) => {
|
|
655
|
-
var _a, _b;
|
|
656
|
-
return /* @__PURE__ */ React14.createElement(Dialog.Root, _extends11({
|
|
657
|
-
defaultOpen: true
|
|
658
|
-
}, slots.root), slots.trigger && /* @__PURE__ */ React14.createElement(Dialog.Trigger, _extends11({}, slots.trigger)), /* @__PURE__ */ React14.createElement(Dialog.Overlay, _extends11({}, slots.overlay, {
|
|
659
|
-
className: mx10(defaultOverlay, "z-40", (_a = slots.overlay) == null ? void 0 : _a.className)
|
|
660
|
-
}), /* @__PURE__ */ React14.createElement(Dialog.Content, _extends11({}, slots.content, {
|
|
661
|
-
"aria-labelledby": titleId,
|
|
662
|
-
className: mx10(defaultDialogContent, (_b = slots.content) == null ? void 0 : _b.className)
|
|
543
|
+
className: mx5("is-full min-is-[260px] max-is-[320px] shadow-md backdrop-blur-md", (_b = slots.content) == null ? void 0 : _b.className)
|
|
663
544
|
}), children)));
|
|
664
545
|
};
|
|
665
546
|
|
|
666
|
-
// packages/apps/patterns/react-ui/src/panels/DevicesPanel/DevicesPanel.tsx
|
|
667
|
-
import { UserPlus, X as X2 } from "phosphor-react";
|
|
668
|
-
import React15, { cloneElement, useReducer } from "react";
|
|
669
|
-
import { useClient as useClient2, useDevices, useHaloInvitations, useIdentity } from "@dxos/react-client";
|
|
670
|
-
import { Button as Button2, getSize as getSize3, mx as mx11, Tooltip, useTranslation as useTranslation5 } from "@dxos/react-components";
|
|
671
|
-
function _extends12() {
|
|
672
|
-
_extends12 = Object.assign || function(target) {
|
|
673
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
674
|
-
var source = arguments[i];
|
|
675
|
-
for (var key in source) {
|
|
676
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
677
|
-
target[key] = source[key];
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return target;
|
|
682
|
-
};
|
|
683
|
-
return _extends12.apply(this, arguments);
|
|
684
|
-
}
|
|
685
|
-
var DeviceListView = ({ createInvitationUrl, titleId, onDone, doneActionParent }) => {
|
|
686
|
-
const { t } = useTranslation5("os");
|
|
687
|
-
const client = useClient2();
|
|
688
|
-
const identity = useIdentity();
|
|
689
|
-
const devices = useDevices();
|
|
690
|
-
const invitations = useHaloInvitations();
|
|
691
|
-
const displayName = identity == null ? void 0 : identity.displayName;
|
|
692
|
-
if (!identity) {
|
|
693
|
-
return null;
|
|
694
|
-
}
|
|
695
|
-
const doneButton = /* @__PURE__ */ React15.createElement(Button2, {
|
|
696
|
-
compact: true,
|
|
697
|
-
variant: "ghost",
|
|
698
|
-
onClick: () => onDone == null ? void 0 : onDone(),
|
|
699
|
-
"data-testid": "show-all-spaces"
|
|
700
|
-
}, /* @__PURE__ */ React15.createElement(X2, {
|
|
701
|
-
className: getSize3(4),
|
|
702
|
-
weight: "bold"
|
|
703
|
-
}));
|
|
704
|
-
return /* @__PURE__ */ React15.createElement("div", {
|
|
705
|
-
role: "none",
|
|
706
|
-
className: "flex flex-col"
|
|
707
|
-
}, /* @__PURE__ */ React15.createElement("div", {
|
|
708
|
-
role: "none",
|
|
709
|
-
className: mx11(subduedSurface, "rounded-bs-md flex items-center p-2 gap-2")
|
|
710
|
-
}, /* @__PURE__ */ React15.createElement("h2", {
|
|
711
|
-
id: titleId,
|
|
712
|
-
className: mx11("grow font-system-medium", !displayName && "font-mono")
|
|
713
|
-
}, displayName != null ? displayName : identity.identityKey.truncate()), /* @__PURE__ */ React15.createElement(Tooltip, {
|
|
714
|
-
content: t("close label"),
|
|
715
|
-
zIndex: "z-50"
|
|
716
|
-
}, doneActionParent ? /* @__PURE__ */ cloneElement(doneActionParent, {}, doneButton) : doneButton)), /* @__PURE__ */ React15.createElement("div", {
|
|
717
|
-
role: "region",
|
|
718
|
-
className: mx11(defaultSurface, "rounded-be-md p-2")
|
|
719
|
-
}, /* @__PURE__ */ React15.createElement(InvitationList, {
|
|
720
|
-
invitations,
|
|
721
|
-
onClickRemove: ({ invitation }) => invitation && client.halo.removeInvitation(invitation.invitationId),
|
|
722
|
-
createInvitationUrl
|
|
723
|
-
}), /* @__PURE__ */ React15.createElement(Button2, {
|
|
724
|
-
className: "is-full flex gap-2 mbs-2",
|
|
725
|
-
compact: true,
|
|
726
|
-
onClick: () => client.halo.createInvitation(),
|
|
727
|
-
"data-testid": "create-space-invitation"
|
|
728
|
-
}, /* @__PURE__ */ React15.createElement("span", null, t("create space invitation label")), /* @__PURE__ */ React15.createElement(UserPlus, {
|
|
729
|
-
className: getSize3(4),
|
|
730
|
-
weight: "bold"
|
|
731
|
-
})), /* @__PURE__ */ React15.createElement(PanelSeparator, null), /* @__PURE__ */ React15.createElement(DeviceList, {
|
|
732
|
-
devices
|
|
733
|
-
})));
|
|
734
|
-
};
|
|
735
|
-
var DevicesPanel = (props) => {
|
|
736
|
-
const reducer = (state, action) => {
|
|
737
|
-
const nextState = {
|
|
738
|
-
...state
|
|
739
|
-
};
|
|
740
|
-
switch (action.type) {
|
|
741
|
-
case null:
|
|
742
|
-
}
|
|
743
|
-
return nextState;
|
|
744
|
-
};
|
|
745
|
-
const [panelState] = useReducer(reducer, {
|
|
746
|
-
activeView: "device list"
|
|
747
|
-
});
|
|
748
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, panelState.activeView === "device list" ? /* @__PURE__ */ React15.createElement(DeviceListView, _extends12({}, props)) : null);
|
|
749
|
-
};
|
|
750
|
-
|
|
751
547
|
// packages/apps/patterns/react-ui/src/panels/IdentityPanel/IdentityPanel.tsx
|
|
752
|
-
import
|
|
753
|
-
import { useClient as
|
|
754
|
-
import { Avatar as
|
|
548
|
+
import React12 from "react";
|
|
549
|
+
import { useClient as useClient2 } from "@dxos/react-client";
|
|
550
|
+
import { Avatar as Avatar2, Button as Button2, ThemeContext, useTranslation as useTranslation4 } from "@dxos/react-components";
|
|
755
551
|
var IdentityPanel = ({ identity, onClickManageProfile }) => {
|
|
756
552
|
var _a;
|
|
757
|
-
const { t } =
|
|
758
|
-
const client =
|
|
553
|
+
const { t } = useTranslation4("os");
|
|
554
|
+
const client = useClient2();
|
|
759
555
|
const defaultManageProfile = () => {
|
|
760
556
|
const remoteSource = new URL((client == null ? void 0 : client.config.get("runtime.client.remoteSource")) || "https://halo.dxos.org");
|
|
761
557
|
const tab = window.open(remoteSource.origin, "_blank");
|
|
762
558
|
tab == null ? void 0 : tab.focus();
|
|
763
559
|
};
|
|
764
|
-
return /* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ React12.createElement(ThemeContext.Provider, {
|
|
765
561
|
value: {
|
|
766
562
|
themeVariant: "os"
|
|
767
563
|
}
|
|
768
|
-
}, /* @__PURE__ */
|
|
564
|
+
}, /* @__PURE__ */ React12.createElement("div", {
|
|
769
565
|
className: "flex flex-col gap-2 justify-center items-center"
|
|
770
|
-
}, /* @__PURE__ */
|
|
566
|
+
}, /* @__PURE__ */ React12.createElement(Avatar2, {
|
|
771
567
|
size: 16,
|
|
772
568
|
variant: "circle",
|
|
773
569
|
fallbackValue: identity.identityKey.toHex(),
|
|
774
570
|
label: (_a = identity.displayName) != null ? _a : ""
|
|
775
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ React12.createElement(Button2, {
|
|
776
572
|
compact: true,
|
|
777
573
|
onClick: onClickManageProfile != null ? onClickManageProfile : defaultManageProfile,
|
|
778
574
|
className: "is-full"
|
|
@@ -780,19 +576,19 @@ var IdentityPanel = ({ identity, onClickManageProfile }) => {
|
|
|
780
576
|
};
|
|
781
577
|
|
|
782
578
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/JoinPanel.tsx
|
|
783
|
-
import
|
|
579
|
+
import React23, { useEffect, useReducer } from "react";
|
|
784
580
|
import { InvitationEncoder as InvitationEncoder2 } from "@dxos/client";
|
|
785
581
|
import { log } from "@dxos/log";
|
|
786
|
-
import { useClient as
|
|
787
|
-
import { useId as
|
|
582
|
+
import { useClient as useClient5, useIdentity } from "@dxos/react-client";
|
|
583
|
+
import { useId as useId3 } from "@dxos/react-components";
|
|
788
584
|
|
|
789
585
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/JoinHeading.tsx
|
|
790
586
|
import { ProhibitInset as ProhibitInset2 } from "phosphor-react";
|
|
791
|
-
import
|
|
587
|
+
import React13, { cloneElement, forwardRef } from "react";
|
|
792
588
|
import { useSpace as useSpace2 } from "@dxos/react-client";
|
|
793
|
-
import { Avatar as
|
|
794
|
-
function
|
|
795
|
-
|
|
589
|
+
import { Avatar as Avatar3, Button as Button3, getSize as getSize3, Heading, mx as mx6, Trans, useId, useTranslation as useTranslation5 } from "@dxos/react-components";
|
|
590
|
+
function _extends10() {
|
|
591
|
+
_extends10 = Object.assign || function(target) {
|
|
796
592
|
for (var i = 1; i < arguments.length; i++) {
|
|
797
593
|
var source = arguments[i];
|
|
798
594
|
for (var key in source) {
|
|
@@ -803,77 +599,70 @@ function _extends13() {
|
|
|
803
599
|
}
|
|
804
600
|
return target;
|
|
805
601
|
};
|
|
806
|
-
return
|
|
602
|
+
return _extends10.apply(this, arguments);
|
|
807
603
|
}
|
|
808
|
-
var JoinHeading = /* @__PURE__ */
|
|
809
|
-
var _a, _b, _c, _d, _e
|
|
810
|
-
const { t } =
|
|
604
|
+
var JoinHeading = /* @__PURE__ */ forwardRef(({ titleId, invitation, onExit, exitActionParent }, ref) => {
|
|
605
|
+
var _a, _b, _c, _d, _e;
|
|
606
|
+
const { t } = useTranslation5("os");
|
|
811
607
|
const space = useSpace2((_a = invitation == null ? void 0 : invitation.invitation) == null ? void 0 : _a.spaceKey);
|
|
812
|
-
const
|
|
813
|
-
const nameId =
|
|
814
|
-
const
|
|
815
|
-
const exitButton = /* @__PURE__ */ React17.createElement(Button4, _extends13({
|
|
608
|
+
const spaceTitle = (_b = space == null ? void 0 : space.properties.name) != null ? _b : "(Space not available)";
|
|
609
|
+
const nameId = useId("spaceDisplayName");
|
|
610
|
+
const exitButton = /* @__PURE__ */ React13.createElement(Button3, _extends10({
|
|
816
611
|
compact: true,
|
|
817
612
|
variant: "ghost"
|
|
818
613
|
}, onExit && {
|
|
819
614
|
onClick: onExit
|
|
820
615
|
}, {
|
|
821
|
-
className: "grow-0 shrink-0"
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
}), /* @__PURE__ */ React17.createElement("span", {
|
|
616
|
+
className: "grow-0 shrink-0"
|
|
617
|
+
}), /* @__PURE__ */ React13.createElement(ProhibitInset2, {
|
|
618
|
+
className: getSize3(5)
|
|
619
|
+
}), /* @__PURE__ */ React13.createElement("span", {
|
|
826
620
|
className: "sr-only"
|
|
827
621
|
}, t("exit label")));
|
|
828
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ React13.createElement("div", {
|
|
829
623
|
role: "none",
|
|
830
|
-
className:
|
|
624
|
+
className: mx6(subduedSurface, "p-2 rounded-bs-md"),
|
|
831
625
|
ref
|
|
832
|
-
}, /* @__PURE__ */
|
|
626
|
+
}, /* @__PURE__ */ React13.createElement("div", {
|
|
833
627
|
role: "group",
|
|
834
628
|
className: "flex items-center gap-2"
|
|
835
|
-
},
|
|
836
|
-
fallbackValue:
|
|
629
|
+
}, /* @__PURE__ */ React13.createElement(Avatar3, {
|
|
630
|
+
fallbackValue: (_e = (_d = (_c = invitation == null ? void 0 : invitation.invitation) == null ? void 0 : _c.spaceKey) == null ? void 0 : _d.toHex()) != null ? _e : "",
|
|
837
631
|
labelId: nameId
|
|
838
|
-
})
|
|
839
|
-
role: "none",
|
|
840
|
-
className: mx12(getSize4(10), "bg-neutral-300 dark:bg-neutral-700 rounded-full")
|
|
841
|
-
}), /* @__PURE__ */ React17.createElement(Heading, {
|
|
632
|
+
}), /* @__PURE__ */ React13.createElement(Heading, {
|
|
842
633
|
level: 1,
|
|
843
634
|
className: "font-body font-normal text-base grow",
|
|
844
635
|
id: titleId
|
|
845
|
-
},
|
|
846
|
-
defaults: t("
|
|
636
|
+
}, /* @__PURE__ */ React13.createElement(Trans, _extends10({}, {
|
|
637
|
+
defaults: t("join space heading"),
|
|
847
638
|
components: {
|
|
848
|
-
small: /* @__PURE__ */
|
|
639
|
+
small: /* @__PURE__ */ React13.createElement("span", {
|
|
849
640
|
className: "block leading-none mbe-1 font-system-medium text-sm"
|
|
850
641
|
}),
|
|
851
|
-
large: /* @__PURE__ */
|
|
642
|
+
large: /* @__PURE__ */ React13.createElement("span", {
|
|
852
643
|
className: "block leading-none",
|
|
853
644
|
id: nameId
|
|
854
645
|
})
|
|
855
646
|
},
|
|
856
647
|
values: {
|
|
857
|
-
|
|
648
|
+
spaceTitle
|
|
858
649
|
}
|
|
859
|
-
}))
|
|
860
|
-
className: "block leading-none font-system-medium text-sm"
|
|
861
|
-
}, mode === "halo-only" ? t("halo heading") : t("join space heading"))), !preventExit && mode !== "halo-only" && (exitActionParent ? /* @__PURE__ */ cloneElement2(exitActionParent, {}, exitButton) : exitButton)));
|
|
650
|
+
}))), exitActionParent ? /* @__PURE__ */ cloneElement(exitActionParent, {}, exitButton) : exitButton));
|
|
862
651
|
});
|
|
863
652
|
|
|
864
653
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx
|
|
865
654
|
import { CaretLeft, CaretRight, Plus, QrCode as QrCode2, Textbox } from "phosphor-react";
|
|
866
|
-
import
|
|
867
|
-
import { Button as
|
|
655
|
+
import React15 from "react";
|
|
656
|
+
import { Button as Button4, CompoundButton, getSize as getSize5, mx as mx8, useTranslation as useTranslation7 } from "@dxos/react-components";
|
|
868
657
|
|
|
869
658
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/ViewState.tsx
|
|
870
|
-
import { CheckCircle, HourglassSimple, X as
|
|
871
|
-
import
|
|
659
|
+
import { CheckCircle, HourglassSimple, X as X2 } from "phosphor-react";
|
|
660
|
+
import React14, { useMemo as useMemo2 } from "react";
|
|
872
661
|
import { Invitation as Invitation4 } from "@dxos/client";
|
|
873
662
|
import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client";
|
|
874
|
-
import { mx as
|
|
875
|
-
function
|
|
876
|
-
|
|
663
|
+
import { mx as mx7, useTranslation as useTranslation6, Trans as Trans2, Avatar as Avatar4, useId as useId2, getSize as getSize4, strongShimmer } from "@dxos/react-components";
|
|
664
|
+
function _extends11() {
|
|
665
|
+
_extends11 = Object.assign || function(target) {
|
|
877
666
|
for (var i = 1; i < arguments.length; i++) {
|
|
878
667
|
var source = arguments[i];
|
|
879
668
|
for (var key in source) {
|
|
@@ -884,39 +673,39 @@ function _extends14() {
|
|
|
884
673
|
}
|
|
885
674
|
return target;
|
|
886
675
|
};
|
|
887
|
-
return
|
|
676
|
+
return _extends11.apply(this, arguments);
|
|
888
677
|
}
|
|
889
|
-
var stripe =
|
|
678
|
+
var stripe = mx7("rounded-full grow", getSize4(3));
|
|
890
679
|
var ViewStateHeading = ({ children, className, ...props }) => {
|
|
891
|
-
return /* @__PURE__ */
|
|
892
|
-
className:
|
|
680
|
+
return /* @__PURE__ */ React14.createElement("h2", _extends11({}, props, {
|
|
681
|
+
className: mx7("font-system-medium text-sm md:text-base mbe-1 mli-1 text-center", className)
|
|
893
682
|
}), children);
|
|
894
683
|
};
|
|
895
684
|
var PureViewStateInvitation = ({ halted, cursor, label, resolvedColor }) => {
|
|
896
|
-
const labelId =
|
|
897
|
-
return /* @__PURE__ */
|
|
685
|
+
const labelId = useId2("invitationState");
|
|
686
|
+
return /* @__PURE__ */ React14.createElement("div", {
|
|
898
687
|
role: "none",
|
|
899
|
-
className:
|
|
900
|
-
}, /* @__PURE__ */
|
|
688
|
+
className: mx7(defaultSurface, "pli-2 pbs-2")
|
|
689
|
+
}, /* @__PURE__ */ React14.createElement("div", {
|
|
901
690
|
role: "status",
|
|
902
691
|
"aria-labelledby": labelId,
|
|
903
692
|
className: "flex gap-2 items-center mlb-1"
|
|
904
|
-
}, /* @__PURE__ */
|
|
693
|
+
}, /* @__PURE__ */ React14.createElement("div", {
|
|
905
694
|
role: "none",
|
|
906
|
-
className:
|
|
907
|
-
}), /* @__PURE__ */
|
|
695
|
+
className: mx7(stripe, !halted && cursor === 1 && strongShimmer, cursor === 2 ? halted ? resolvedColor : activeBgColor : cursor > 1 ? resolvedColor : inactiveBgColor)
|
|
696
|
+
}), /* @__PURE__ */ React14.createElement("div", {
|
|
908
697
|
role: "none",
|
|
909
|
-
className:
|
|
910
|
-
}), /* @__PURE__ */
|
|
698
|
+
className: mx7(stripe, !halted && cursor === 3 && strongShimmer, cursor === 3 ? halted ? resolvedColor : activeBgColor : cursor > 3 ? resolvedColor : inactiveBgColor)
|
|
699
|
+
}), /* @__PURE__ */ React14.createElement("div", {
|
|
911
700
|
role: "none",
|
|
912
|
-
className:
|
|
913
|
-
})), /* @__PURE__ */
|
|
701
|
+
className: mx7(stripe, cursor > 3 ? halted ? resolvedColor : resolvedColor : inactiveBgColor)
|
|
702
|
+
})), /* @__PURE__ */ React14.createElement(ViewStateHeading, {
|
|
914
703
|
id: labelId,
|
|
915
704
|
className: "mbs-2 flex justify-center items-center gap-2"
|
|
916
705
|
}, label));
|
|
917
706
|
};
|
|
918
707
|
var ViewStateInvitationStatus = ({ activeInvitation }) => {
|
|
919
|
-
const { t } =
|
|
708
|
+
const { t } = useTranslation6("os");
|
|
920
709
|
const { status, haltedAt } = useInvitationStatus2(activeInvitation);
|
|
921
710
|
const halted = status === Invitation4.State.CANCELLED || status === Invitation4.State.TIMEOUT || status === Invitation4.State.ERROR;
|
|
922
711
|
const cursor = invitationStatusValue.get(halted ? haltedAt : status);
|
|
@@ -924,24 +713,24 @@ var ViewStateInvitationStatus = ({ activeInvitation }) => {
|
|
|
924
713
|
const statusLabelMap = useMemo2(() => /* @__PURE__ */ new Map([
|
|
925
714
|
[
|
|
926
715
|
Invitation4.State.ERROR,
|
|
927
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(X2, {
|
|
928
717
|
weight: "bold",
|
|
929
|
-
className:
|
|
930
|
-
}), /* @__PURE__ */
|
|
718
|
+
className: mx7(getSize4(4), "text-error-600 dark:text-error-400")
|
|
719
|
+
}), /* @__PURE__ */ React14.createElement("span", null, t("error status label")))
|
|
931
720
|
],
|
|
932
721
|
[
|
|
933
722
|
Invitation4.State.TIMEOUT,
|
|
934
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(HourglassSimple, {
|
|
935
724
|
weight: "fill",
|
|
936
|
-
className:
|
|
937
|
-
}), /* @__PURE__ */
|
|
725
|
+
className: mx7(getSize4(4), "text-warning-600 dark:text-warning-400")
|
|
726
|
+
}), /* @__PURE__ */ React14.createElement("span", null, t("timeout status label")))
|
|
938
727
|
],
|
|
939
728
|
[
|
|
940
729
|
Invitation4.State.CANCELLED,
|
|
941
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(X2, {
|
|
942
731
|
weight: "bold",
|
|
943
|
-
className:
|
|
944
|
-
}), /* @__PURE__ */
|
|
732
|
+
className: mx7(getSize4(4), "text-warning-600 dark:text-warning-400")
|
|
733
|
+
}), /* @__PURE__ */ React14.createElement("span", null, t("cancelled status label")))
|
|
945
734
|
],
|
|
946
735
|
[
|
|
947
736
|
Invitation4.State.INIT,
|
|
@@ -961,15 +750,15 @@ var ViewStateInvitationStatus = ({ activeInvitation }) => {
|
|
|
961
750
|
],
|
|
962
751
|
[
|
|
963
752
|
Invitation4.State.SUCCESS,
|
|
964
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(CheckCircle, {
|
|
965
754
|
weight: "fill",
|
|
966
|
-
className:
|
|
967
|
-
}), /* @__PURE__ */
|
|
755
|
+
className: mx7(getSize4(4), "text-success-600 dark:text-success-400")
|
|
756
|
+
}), /* @__PURE__ */ React14.createElement("span", null, t("success status label")))
|
|
968
757
|
]
|
|
969
758
|
]), [
|
|
970
759
|
t
|
|
971
760
|
]);
|
|
972
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ React14.createElement(PureViewStateInvitation, _extends11({}, {
|
|
973
762
|
label: statusLabelMap.get(status),
|
|
974
763
|
resolvedColor,
|
|
975
764
|
cursor,
|
|
@@ -978,29 +767,29 @@ var ViewStateInvitationStatus = ({ activeInvitation }) => {
|
|
|
978
767
|
};
|
|
979
768
|
var ViewState = ({ active, children, className, dispatch, selectedIdentity, activeInvitation, ...props }) => {
|
|
980
769
|
var _a;
|
|
981
|
-
const { t } =
|
|
982
|
-
const identityLabel =
|
|
983
|
-
return /* @__PURE__ */
|
|
770
|
+
const { t } = useTranslation6("os");
|
|
771
|
+
const identityLabel = useId2("selectedIdentityLabel");
|
|
772
|
+
return /* @__PURE__ */ React14.createElement("div", _extends11({
|
|
984
773
|
role: "none"
|
|
985
774
|
}, props, !active && {
|
|
986
775
|
"aria-hidden": true
|
|
987
776
|
}, {
|
|
988
|
-
className:
|
|
989
|
-
}), selectedIdentity && /* @__PURE__ */
|
|
777
|
+
className: mx7("is-[50%] flex flex-col", active ? "order-2" : "order-4", className)
|
|
778
|
+
}), selectedIdentity && /* @__PURE__ */ React14.createElement("div", {
|
|
990
779
|
role: "none",
|
|
991
|
-
className:
|
|
992
|
-
}, /* @__PURE__ */
|
|
780
|
+
className: mx7(subduedSurface, "flex-none flex items-center gap-1 pli-2 pbe-1.5")
|
|
781
|
+
}, /* @__PURE__ */ React14.createElement(Trans2, _extends11({}, {
|
|
993
782
|
defaults: t("join space as identity heading"),
|
|
994
783
|
components: {
|
|
995
|
-
icon: /* @__PURE__ */
|
|
784
|
+
icon: /* @__PURE__ */ React14.createElement(Avatar4, {
|
|
996
785
|
size: 4,
|
|
997
786
|
fallbackValue: selectedIdentity === true ? "" : selectedIdentity.identityKey.toHex(),
|
|
998
787
|
labelId: identityLabel
|
|
999
788
|
}),
|
|
1000
|
-
label: /* @__PURE__ */
|
|
789
|
+
label: /* @__PURE__ */ React14.createElement("span", {
|
|
1001
790
|
id: identityLabel
|
|
1002
791
|
}),
|
|
1003
|
-
part: /* @__PURE__ */
|
|
792
|
+
part: /* @__PURE__ */ React14.createElement("span", {
|
|
1004
793
|
role: "none",
|
|
1005
794
|
className: "flex items-center gap-1 leading-none"
|
|
1006
795
|
})
|
|
@@ -1008,23 +797,23 @@ var ViewState = ({ active, children, className, dispatch, selectedIdentity, acti
|
|
|
1008
797
|
values: {
|
|
1009
798
|
labelValue: selectedIdentity === true ? "\xA0" : (_a = selectedIdentity.displayName) != null ? _a : selectedIdentity.identityKey.truncate()
|
|
1010
799
|
}
|
|
1011
|
-
}))), activeInvitation && (activeInvitation === true ? /* @__PURE__ */
|
|
800
|
+
}))), activeInvitation && (activeInvitation === true ? /* @__PURE__ */ React14.createElement(PureViewStateInvitation, _extends11({}, {
|
|
1012
801
|
halted: false,
|
|
1013
802
|
status: Invitation4.State.INIT,
|
|
1014
803
|
label: t("invitation input label"),
|
|
1015
804
|
cursor: 0,
|
|
1016
805
|
resolvedColor: inactiveBgColor
|
|
1017
|
-
})) : /* @__PURE__ */
|
|
806
|
+
})) : /* @__PURE__ */ React14.createElement(ViewStateInvitationStatus, _extends11({}, {
|
|
1018
807
|
activeInvitation
|
|
1019
|
-
}))), /* @__PURE__ */
|
|
808
|
+
}))), /* @__PURE__ */ React14.createElement("div", {
|
|
1020
809
|
role: "region",
|
|
1021
|
-
className:
|
|
810
|
+
className: mx7(defaultSurface, "rounded-be-md grow shrink-0 flex flex-col gap-1 p-2")
|
|
1022
811
|
}, children));
|
|
1023
812
|
};
|
|
1024
813
|
|
|
1025
814
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/AdditionMethodSelector.tsx
|
|
1026
|
-
function
|
|
1027
|
-
|
|
815
|
+
function _extends12() {
|
|
816
|
+
_extends12 = Object.assign || function(target) {
|
|
1028
817
|
for (var i = 1; i < arguments.length; i++) {
|
|
1029
818
|
var source = arguments[i];
|
|
1030
819
|
for (var key in source) {
|
|
@@ -1035,16 +824,16 @@ function _extends15() {
|
|
|
1035
824
|
}
|
|
1036
825
|
return target;
|
|
1037
826
|
};
|
|
1038
|
-
return
|
|
827
|
+
return _extends12.apply(this, arguments);
|
|
1039
828
|
}
|
|
1040
829
|
var AdditionMethodSelector = ({ availableIdentities, ...viewStateProps }) => {
|
|
1041
830
|
const disabled = !viewStateProps.active;
|
|
1042
831
|
const { dispatch } = viewStateProps;
|
|
1043
|
-
const { t } =
|
|
832
|
+
const { t } = useTranslation7("os");
|
|
1044
833
|
const sharedButtonProps = {
|
|
1045
834
|
disabled,
|
|
1046
|
-
after: /* @__PURE__ */
|
|
1047
|
-
className:
|
|
835
|
+
after: /* @__PURE__ */ React15.createElement(CaretRight, {
|
|
836
|
+
className: getSize5(4),
|
|
1048
837
|
weight: "bold"
|
|
1049
838
|
}),
|
|
1050
839
|
slots: {
|
|
@@ -1053,63 +842,59 @@ var AdditionMethodSelector = ({ availableIdentities, ...viewStateProps }) => {
|
|
|
1053
842
|
}
|
|
1054
843
|
}
|
|
1055
844
|
};
|
|
1056
|
-
return /* @__PURE__ */
|
|
845
|
+
return /* @__PURE__ */ React15.createElement(ViewState, _extends12({}, viewStateProps), /* @__PURE__ */ React15.createElement(ViewStateHeading, null, t("addition method selector title")), /* @__PURE__ */ React15.createElement("div", {
|
|
1057
846
|
role: "none",
|
|
1058
847
|
className: "flex flex-col gap-1 grow"
|
|
1059
|
-
}, /* @__PURE__ */
|
|
848
|
+
}, /* @__PURE__ */ React15.createElement(CompoundButton, _extends12({}, sharedButtonProps, {
|
|
1060
849
|
description: t("create identity description"),
|
|
1061
|
-
before: /* @__PURE__ */
|
|
1062
|
-
className:
|
|
850
|
+
before: /* @__PURE__ */ React15.createElement(Plus, {
|
|
851
|
+
className: getSize5(6)
|
|
1063
852
|
}),
|
|
1064
853
|
onClick: () => dispatch({
|
|
1065
854
|
type: "select addition method",
|
|
1066
855
|
method: "create identity"
|
|
1067
856
|
}),
|
|
1068
|
-
"data-autofocus": "addition method selector"
|
|
1069
|
-
|
|
1070
|
-
}), t("create identity label")), /* @__PURE__ */ React19.createElement(CompoundButton, _extends15({}, sharedButtonProps, {
|
|
857
|
+
"data-autofocus": "addition method selector"
|
|
858
|
+
}), t("create identity label")), /* @__PURE__ */ React15.createElement(CompoundButton, _extends12({}, sharedButtonProps, {
|
|
1071
859
|
description: t("join identity description"),
|
|
1072
|
-
before: /* @__PURE__ */
|
|
1073
|
-
className:
|
|
860
|
+
before: /* @__PURE__ */ React15.createElement(QrCode2, {
|
|
861
|
+
className: getSize5(6)
|
|
1074
862
|
}),
|
|
1075
863
|
onClick: () => dispatch({
|
|
1076
864
|
type: "select addition method",
|
|
1077
865
|
method: "accept device invitation"
|
|
1078
|
-
})
|
|
1079
|
-
|
|
1080
|
-
}), t("join identity label")), /* @__PURE__ */ React19.createElement(CompoundButton, _extends15({}, sharedButtonProps, {
|
|
866
|
+
})
|
|
867
|
+
}), t("join identity label")), /* @__PURE__ */ React15.createElement(CompoundButton, _extends12({}, sharedButtonProps, {
|
|
1081
868
|
description: t("recover identity description"),
|
|
1082
|
-
before: /* @__PURE__ */
|
|
1083
|
-
className:
|
|
869
|
+
before: /* @__PURE__ */ React15.createElement(Textbox, {
|
|
870
|
+
className: getSize5(6)
|
|
1084
871
|
}),
|
|
1085
872
|
onClick: () => dispatch({
|
|
1086
873
|
type: "select addition method",
|
|
1087
874
|
method: "recover identity"
|
|
1088
|
-
})
|
|
1089
|
-
|
|
1090
|
-
}), t("recover identity label"))), /* @__PURE__ */ React19.createElement(Button5, {
|
|
875
|
+
})
|
|
876
|
+
}), t("recover identity label"))), /* @__PURE__ */ React15.createElement(Button4, {
|
|
1091
877
|
disabled: disabled || availableIdentities.length < 1,
|
|
1092
878
|
onClick: () => dispatch({
|
|
1093
879
|
type: "deselect identity"
|
|
1094
|
-
})
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
className: getSize6(4),
|
|
880
|
+
})
|
|
881
|
+
}, /* @__PURE__ */ React15.createElement(CaretLeft, {
|
|
882
|
+
className: getSize5(4),
|
|
1098
883
|
weight: "bold"
|
|
1099
|
-
}), /* @__PURE__ */
|
|
884
|
+
}), /* @__PURE__ */ React15.createElement("span", {
|
|
1100
885
|
className: "grow"
|
|
1101
|
-
}, t("deselect identity label")), /* @__PURE__ */
|
|
1102
|
-
className:
|
|
886
|
+
}, t("deselect identity label")), /* @__PURE__ */ React15.createElement(CaretRight, {
|
|
887
|
+
className: mx8(getSize5(4), "invisible"),
|
|
1103
888
|
weight: "bold"
|
|
1104
889
|
})));
|
|
1105
890
|
};
|
|
1106
891
|
|
|
1107
892
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/IdentityAdded.tsx
|
|
1108
|
-
import { CaretLeft as CaretLeft2, CaretRight as CaretRight2
|
|
1109
|
-
import
|
|
1110
|
-
import { Avatar as
|
|
1111
|
-
function
|
|
1112
|
-
|
|
893
|
+
import { CaretLeft as CaretLeft2, CaretRight as CaretRight2 } from "phosphor-react";
|
|
894
|
+
import React16 from "react";
|
|
895
|
+
import { Avatar as Avatar5, Button as Button5, getSize as getSize6, mx as mx9, useTranslation as useTranslation8 } from "@dxos/react-components";
|
|
896
|
+
function _extends13() {
|
|
897
|
+
_extends13 = Object.assign || function(target) {
|
|
1113
898
|
for (var i = 1; i < arguments.length; i++) {
|
|
1114
899
|
var source = arguments[i];
|
|
1115
900
|
for (var key in source) {
|
|
@@ -1120,51 +905,27 @@ function _extends16() {
|
|
|
1120
905
|
}
|
|
1121
906
|
return target;
|
|
1122
907
|
};
|
|
1123
|
-
return
|
|
908
|
+
return _extends13.apply(this, arguments);
|
|
1124
909
|
}
|
|
1125
|
-
var
|
|
1126
|
-
const disabled = !active;
|
|
1127
|
-
const { t } = useTranslation10("os");
|
|
1128
|
-
const doneButton = /* @__PURE__ */ React20.createElement(Button6, _extends16({}, onDone && {
|
|
1129
|
-
onClick: () => onDone(null)
|
|
1130
|
-
}, {
|
|
1131
|
-
disabled,
|
|
1132
|
-
className: "grow flex items-center gap-2 pli-2",
|
|
1133
|
-
"data-autofocus": "identity added",
|
|
1134
|
-
"data-testid": "identity-added-done"
|
|
1135
|
-
}), /* @__PURE__ */ React20.createElement(CaretLeft2, {
|
|
1136
|
-
weight: "bold",
|
|
1137
|
-
className: mx15(getSize7(2), "invisible")
|
|
1138
|
-
}), /* @__PURE__ */ React20.createElement("span", {
|
|
1139
|
-
className: "grow"
|
|
1140
|
-
}, t("done label")), /* @__PURE__ */ React20.createElement(Check, {
|
|
1141
|
-
weight: "bold",
|
|
1142
|
-
className: getSize7(4)
|
|
1143
|
-
}));
|
|
1144
|
-
return doneActionParent ? /* @__PURE__ */ cloneElement3(doneActionParent, {}, doneButton) : doneButton;
|
|
1145
|
-
};
|
|
1146
|
-
var IdentityAdded = ({ mode, addedIdentity, onDone, doneActionParent, ...viewStateProps }) => {
|
|
910
|
+
var IdentityAdded = ({ addedIdentity, ...viewStateProps }) => {
|
|
1147
911
|
var _a, _b, _c;
|
|
1148
912
|
const disabled = !viewStateProps.active;
|
|
1149
913
|
const { dispatch } = viewStateProps;
|
|
1150
|
-
const { t } =
|
|
1151
|
-
return /* @__PURE__ */
|
|
914
|
+
const { t } = useTranslation8("os");
|
|
915
|
+
return /* @__PURE__ */ React16.createElement(ViewState, _extends13({}, viewStateProps), /* @__PURE__ */ React16.createElement(ViewStateHeading, null, t("identity added label")), /* @__PURE__ */ React16.createElement("div", {
|
|
1152
916
|
role: "none",
|
|
1153
917
|
className: "grow flex flex-col items-center justify-center text-center gap-2"
|
|
1154
|
-
}, /* @__PURE__ */
|
|
918
|
+
}, /* @__PURE__ */ React16.createElement(Avatar5, {
|
|
1155
919
|
size: 20,
|
|
1156
920
|
fallbackValue: (_a = addedIdentity == null ? void 0 : addedIdentity.identityKey.toHex()) != null ? _a : "",
|
|
1157
|
-
label: /* @__PURE__ */
|
|
1158
|
-
className:
|
|
921
|
+
label: /* @__PURE__ */ React16.createElement("p", {
|
|
922
|
+
className: mx9("text-lg", !(addedIdentity == null ? void 0 : addedIdentity.displayName) && "font-mono")
|
|
1159
923
|
}, (_c = (_b = addedIdentity == null ? void 0 : addedIdentity.displayName) != null ? _b : addedIdentity == null ? void 0 : addedIdentity.identityKey.truncate()) != null ? _c : "\xA0"),
|
|
1160
924
|
variant: "circle",
|
|
1161
925
|
status: "active"
|
|
1162
|
-
})),
|
|
1163
|
-
onDone,
|
|
1164
|
-
doneActionParent
|
|
1165
|
-
}, viewStateProps)) : /* @__PURE__ */ React20.createElement("div", {
|
|
926
|
+
})), /* @__PURE__ */ React16.createElement("div", {
|
|
1166
927
|
className: "flex gap-2"
|
|
1167
|
-
}, /* @__PURE__ */
|
|
928
|
+
}, /* @__PURE__ */ React16.createElement(Button5, {
|
|
1168
929
|
disabled: disabled || !addedIdentity,
|
|
1169
930
|
className: "grow flex items-center gap-2 pli-2 order-2",
|
|
1170
931
|
onClick: () => addedIdentity && dispatch({
|
|
@@ -1172,33 +933,33 @@ var IdentityAdded = ({ mode, addedIdentity, onDone, doneActionParent, ...viewSta
|
|
|
1172
933
|
identity: addedIdentity
|
|
1173
934
|
}),
|
|
1174
935
|
"data-autofocus": "identity added"
|
|
1175
|
-
}, /* @__PURE__ */
|
|
936
|
+
}, /* @__PURE__ */ React16.createElement(CaretLeft2, {
|
|
1176
937
|
weight: "bold",
|
|
1177
|
-
className:
|
|
1178
|
-
}), /* @__PURE__ */
|
|
938
|
+
className: mx9(getSize6(2), "invisible")
|
|
939
|
+
}), /* @__PURE__ */ React16.createElement("span", {
|
|
1179
940
|
className: "grow"
|
|
1180
|
-
}, t("continue label")), /* @__PURE__ */
|
|
941
|
+
}, t("continue label")), /* @__PURE__ */ React16.createElement(CaretRight2, {
|
|
1181
942
|
weight: "bold",
|
|
1182
|
-
className:
|
|
1183
|
-
})), /* @__PURE__ */
|
|
943
|
+
className: getSize6(4)
|
|
944
|
+
})), /* @__PURE__ */ React16.createElement(Button5, {
|
|
1184
945
|
disabled,
|
|
1185
946
|
onClick: () => dispatch({
|
|
1186
947
|
type: "deselect identity"
|
|
1187
948
|
}),
|
|
1188
949
|
className: "flex items-center gap-2 pis-2 pie-4"
|
|
1189
|
-
}, /* @__PURE__ */
|
|
950
|
+
}, /* @__PURE__ */ React16.createElement(CaretLeft2, {
|
|
1190
951
|
weight: "bold",
|
|
1191
|
-
className:
|
|
1192
|
-
}), /* @__PURE__ */
|
|
952
|
+
className: getSize6(4)
|
|
953
|
+
}), /* @__PURE__ */ React16.createElement("span", null, t("deselect identity label")))));
|
|
1193
954
|
};
|
|
1194
955
|
|
|
1195
956
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/IdentitySelector.tsx
|
|
1196
957
|
import * as RadioGroup from "@radix-ui/react-radio-group";
|
|
1197
|
-
import { CaretLeft as CaretLeft3, CaretRight as CaretRight3, UserPlus
|
|
1198
|
-
import
|
|
1199
|
-
import { Avatar as
|
|
1200
|
-
function
|
|
1201
|
-
|
|
958
|
+
import { CaretLeft as CaretLeft3, CaretRight as CaretRight3, UserPlus } from "phosphor-react";
|
|
959
|
+
import React17, { useCallback as useCallback4, useState as useState2 } from "react";
|
|
960
|
+
import { Avatar as Avatar6, Button as Button6, themeVariantFocus, getSize as getSize7, mx as mx10, useTranslation as useTranslation9 } from "@dxos/react-components";
|
|
961
|
+
function _extends14() {
|
|
962
|
+
_extends14 = Object.assign || function(target) {
|
|
1202
963
|
for (var i = 1; i < arguments.length; i++) {
|
|
1203
964
|
var source = arguments[i];
|
|
1204
965
|
for (var key in source) {
|
|
@@ -1209,17 +970,17 @@ function _extends17() {
|
|
|
1209
970
|
}
|
|
1210
971
|
return target;
|
|
1211
972
|
};
|
|
1212
|
-
return
|
|
973
|
+
return _extends14.apply(this, arguments);
|
|
1213
974
|
}
|
|
1214
975
|
var IdentitySelector = ({ availableIdentities, ...viewStateProps }) => {
|
|
1215
976
|
const { dispatch } = viewStateProps;
|
|
1216
977
|
const disabled = !viewStateProps.active;
|
|
1217
|
-
const { t } =
|
|
978
|
+
const { t } = useTranslation9("os");
|
|
1218
979
|
const [activeIdentity, setActiveIdentity] = useState2(availableIdentities[0]);
|
|
1219
980
|
const onValueChange = useCallback4((nextHex) => setActiveIdentity(availableIdentities.find((identity) => identity.identityKey.toHex() === nextHex) || activeIdentity), [
|
|
1220
981
|
availableIdentities
|
|
1221
982
|
]);
|
|
1222
|
-
return /* @__PURE__ */
|
|
983
|
+
return /* @__PURE__ */ React17.createElement(ViewState, _extends14({}, viewStateProps), /* @__PURE__ */ React17.createElement(ViewStateHeading, null, t("identity selector title")), /* @__PURE__ */ React17.createElement(RadioGroup.Root, {
|
|
1223
984
|
disabled,
|
|
1224
985
|
value: activeIdentity == null ? void 0 : activeIdentity.identityKey.toHex(),
|
|
1225
986
|
onValueChange,
|
|
@@ -1231,65 +992,62 @@ var IdentitySelector = ({ availableIdentities, ...viewStateProps }) => {
|
|
|
1231
992
|
const hex = identityKey.toHex();
|
|
1232
993
|
const inputId = `identitySelector__item--${hex}`;
|
|
1233
994
|
const labelId = `identitySelector__itemLabel--${hex}`;
|
|
1234
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ React17.createElement("label", {
|
|
1235
996
|
htmlFor: inputId,
|
|
1236
997
|
key: hex,
|
|
1237
998
|
className: "flex items-center mbe-2 gap-2 cursor-pointer"
|
|
1238
|
-
}, /* @__PURE__ */
|
|
999
|
+
}, /* @__PURE__ */ React17.createElement(RadioGroup.Item, {
|
|
1239
1000
|
id: inputId,
|
|
1240
1001
|
"aria-labelledby": labelId,
|
|
1241
1002
|
value: hex,
|
|
1242
|
-
className:
|
|
1243
|
-
|
|
1244
|
-
}, /* @__PURE__ */ React21.createElement(RadioGroup.Indicator, {
|
|
1003
|
+
className: mx10("peer relative w-4 h-4 rounded-full", "border border-transparent text-white", "radix-state-checked:bg-primary-600", "radix-state-unchecked:bg-neutral-100 dark:radix-state-unchecked:bg-neutral-900", themeVariantFocus("os"))
|
|
1004
|
+
}, /* @__PURE__ */ React17.createElement(RadioGroup.Indicator, {
|
|
1245
1005
|
className: "absolute inset-0 flex items-center justify-center leading-0"
|
|
1246
|
-
}, /* @__PURE__ */
|
|
1006
|
+
}, /* @__PURE__ */ React17.createElement("div", {
|
|
1247
1007
|
className: "w-1.5 h-1.5 rounded-full bg-white"
|
|
1248
|
-
}))), /* @__PURE__ */
|
|
1008
|
+
}))), /* @__PURE__ */ React17.createElement(Avatar6, {
|
|
1249
1009
|
fallbackValue: hex,
|
|
1250
1010
|
labelId,
|
|
1251
1011
|
variant: "circle"
|
|
1252
|
-
}), /* @__PURE__ */
|
|
1012
|
+
}), /* @__PURE__ */ React17.createElement("span", {
|
|
1253
1013
|
id: labelId,
|
|
1254
|
-
className:
|
|
1014
|
+
className: mx10(!displayName && "font-mono")
|
|
1255
1015
|
}, (_a = displayName != null ? displayName : identityKey.truncate()) != null ? _a : ""));
|
|
1256
|
-
})), /* @__PURE__ */
|
|
1016
|
+
})), /* @__PURE__ */ React17.createElement(Button6, {
|
|
1257
1017
|
disabled,
|
|
1258
1018
|
compact: true,
|
|
1259
1019
|
onClick: () => dispatch({
|
|
1260
1020
|
type: "add identity"
|
|
1261
1021
|
}),
|
|
1262
|
-
className: "flex items-center gap-2 pli-2"
|
|
1263
|
-
|
|
1264
|
-
}, /* @__PURE__ */ React21.createElement("span", null, t("add identity label")), /* @__PURE__ */ React21.createElement(UserPlus2, {
|
|
1022
|
+
className: "flex items-center gap-2 pli-2"
|
|
1023
|
+
}, /* @__PURE__ */ React17.createElement("span", null, t("add identity label")), /* @__PURE__ */ React17.createElement(UserPlus, {
|
|
1265
1024
|
weight: "bold",
|
|
1266
|
-
className:
|
|
1267
|
-
})), /* @__PURE__ */
|
|
1025
|
+
className: getSize7(3.5)
|
|
1026
|
+
})), /* @__PURE__ */ React17.createElement(Button6, {
|
|
1268
1027
|
disabled: disabled || !activeIdentity,
|
|
1269
1028
|
className: "flex items-center gap-2 pli-2",
|
|
1270
1029
|
onClick: () => dispatch({
|
|
1271
1030
|
type: "select identity",
|
|
1272
1031
|
identity: activeIdentity
|
|
1273
|
-
})
|
|
1274
|
-
|
|
1275
|
-
}, /* @__PURE__ */ React21.createElement(CaretLeft3, {
|
|
1032
|
+
})
|
|
1033
|
+
}, /* @__PURE__ */ React17.createElement(CaretLeft3, {
|
|
1276
1034
|
weight: "bold",
|
|
1277
|
-
className:
|
|
1278
|
-
}), /* @__PURE__ */
|
|
1035
|
+
className: mx10(getSize7(4), "invisible")
|
|
1036
|
+
}), /* @__PURE__ */ React17.createElement("span", {
|
|
1279
1037
|
className: "grow"
|
|
1280
|
-
}, t("continue label")), /* @__PURE__ */
|
|
1038
|
+
}, t("continue label")), /* @__PURE__ */ React17.createElement(CaretRight3, {
|
|
1281
1039
|
weight: "bold",
|
|
1282
|
-
className:
|
|
1040
|
+
className: getSize7(4)
|
|
1283
1041
|
})));
|
|
1284
1042
|
};
|
|
1285
1043
|
|
|
1286
1044
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/IdentityInput.tsx
|
|
1287
1045
|
import { CaretLeft as CaretLeft4, CaretRight as CaretRight4 } from "phosphor-react";
|
|
1288
|
-
import
|
|
1289
|
-
import { useClient as
|
|
1290
|
-
import { Button as
|
|
1291
|
-
function
|
|
1292
|
-
|
|
1046
|
+
import React18, { useState as useState3 } from "react";
|
|
1047
|
+
import { useClient as useClient3 } from "@dxos/react-client";
|
|
1048
|
+
import { Button as Button7, getSize as getSize8, Input, mx as mx11, useTranslation as useTranslation10 } from "@dxos/react-components";
|
|
1049
|
+
function _extends15() {
|
|
1050
|
+
_extends15 = Object.assign || function(target) {
|
|
1293
1051
|
for (var i = 1; i < arguments.length; i++) {
|
|
1294
1052
|
var source = arguments[i];
|
|
1295
1053
|
for (var key in source) {
|
|
@@ -1300,14 +1058,14 @@ function _extends18() {
|
|
|
1300
1058
|
}
|
|
1301
1059
|
return target;
|
|
1302
1060
|
};
|
|
1303
|
-
return
|
|
1061
|
+
return _extends15.apply(this, arguments);
|
|
1304
1062
|
}
|
|
1305
1063
|
var IdentityInput = ({ method, ...viewStateProps }) => {
|
|
1306
1064
|
const disabled = !viewStateProps.active;
|
|
1307
1065
|
const { dispatch } = viewStateProps;
|
|
1308
|
-
const { t } =
|
|
1066
|
+
const { t } = useTranslation10("os");
|
|
1309
1067
|
const [inputValue, setInputValue] = useState3("");
|
|
1310
|
-
const client =
|
|
1068
|
+
const client = useClient3();
|
|
1311
1069
|
const [validationMessage, setValidationMessage] = useState3("");
|
|
1312
1070
|
const isRecover = method === "recover identity";
|
|
1313
1071
|
const handleNext = () => {
|
|
@@ -1322,9 +1080,9 @@ var IdentityInput = ({ method, ...viewStateProps }) => {
|
|
|
1322
1080
|
setValidationMessage(t(isRecover ? "failed to recover identity message" : "failed to create identity message"));
|
|
1323
1081
|
});
|
|
1324
1082
|
};
|
|
1325
|
-
return /* @__PURE__ */
|
|
1083
|
+
return /* @__PURE__ */ React18.createElement(ViewState, _extends15({}, viewStateProps), /* @__PURE__ */ React18.createElement(Input, _extends15({
|
|
1326
1084
|
disabled,
|
|
1327
|
-
label: /* @__PURE__ */
|
|
1085
|
+
label: /* @__PURE__ */ React18.createElement(ViewStateHeading, null, t(isRecover ? "recover identity input label" : "new identity input label")),
|
|
1328
1086
|
onChange: ({ target: { value } }) => setInputValue(value),
|
|
1329
1087
|
slots: {
|
|
1330
1088
|
root: {
|
|
@@ -1338,46 +1096,42 @@ var IdentityInput = ({ method, ...viewStateProps }) => {
|
|
|
1338
1096
|
}, validationMessage.length && {
|
|
1339
1097
|
validationValence: "error",
|
|
1340
1098
|
validationMessage
|
|
1341
|
-
}, {
|
|
1342
|
-
"data-testid": "identity-input"
|
|
1343
|
-
})), /* @__PURE__ */ React22.createElement("div", {
|
|
1099
|
+
})), /* @__PURE__ */ React18.createElement("div", {
|
|
1344
1100
|
role: "none",
|
|
1345
1101
|
className: "grow"
|
|
1346
|
-
}), /* @__PURE__ */
|
|
1102
|
+
}), /* @__PURE__ */ React18.createElement("div", {
|
|
1347
1103
|
className: "flex gap-2"
|
|
1348
|
-
}, /* @__PURE__ */
|
|
1104
|
+
}, /* @__PURE__ */ React18.createElement(Button7, {
|
|
1349
1105
|
disabled,
|
|
1350
1106
|
className: "grow flex items-center gap-2 pli-2 order-2",
|
|
1351
|
-
onClick: handleNext
|
|
1352
|
-
|
|
1353
|
-
}, /* @__PURE__ */ React22.createElement(CaretLeft4, {
|
|
1107
|
+
onClick: handleNext
|
|
1108
|
+
}, /* @__PURE__ */ React18.createElement(CaretLeft4, {
|
|
1354
1109
|
weight: "bold",
|
|
1355
|
-
className:
|
|
1356
|
-
}), /* @__PURE__ */
|
|
1110
|
+
className: mx11(getSize8(2), "invisible")
|
|
1111
|
+
}), /* @__PURE__ */ React18.createElement("span", {
|
|
1357
1112
|
className: "grow"
|
|
1358
|
-
}, t("continue label")), /* @__PURE__ */
|
|
1113
|
+
}, t("continue label")), /* @__PURE__ */ React18.createElement(CaretRight4, {
|
|
1359
1114
|
weight: "bold",
|
|
1360
|
-
className:
|
|
1361
|
-
})), /* @__PURE__ */
|
|
1115
|
+
className: getSize8(4)
|
|
1116
|
+
})), /* @__PURE__ */ React18.createElement(Button7, {
|
|
1362
1117
|
disabled,
|
|
1363
1118
|
onClick: () => dispatch({
|
|
1364
1119
|
type: "add identity"
|
|
1365
1120
|
}),
|
|
1366
|
-
className: "flex items-center gap-2 pis-2 pie-4"
|
|
1367
|
-
|
|
1368
|
-
}, /* @__PURE__ */ React22.createElement(CaretLeft4, {
|
|
1121
|
+
className: "flex items-center gap-2 pis-2 pie-4"
|
|
1122
|
+
}, /* @__PURE__ */ React18.createElement(CaretLeft4, {
|
|
1369
1123
|
weight: "bold",
|
|
1370
|
-
className:
|
|
1371
|
-
}), /* @__PURE__ */
|
|
1124
|
+
className: getSize8(4)
|
|
1125
|
+
}), /* @__PURE__ */ React18.createElement("span", null, t("back label")))));
|
|
1372
1126
|
};
|
|
1373
1127
|
|
|
1374
1128
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/InvitationAccepted.tsx
|
|
1375
|
-
import { CaretLeft as CaretLeft5, Check
|
|
1376
|
-
import
|
|
1129
|
+
import { CaretLeft as CaretLeft5, Check } from "phosphor-react";
|
|
1130
|
+
import React19, { cloneElement as cloneElement2 } from "react";
|
|
1377
1131
|
import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client";
|
|
1378
|
-
import { Button as
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1132
|
+
import { Button as Button8, getSize as getSize9, mx as mx12, useTranslation as useTranslation11 } from "@dxos/react-components";
|
|
1133
|
+
function _extends16() {
|
|
1134
|
+
_extends16 = Object.assign || function(target) {
|
|
1381
1135
|
for (var i = 1; i < arguments.length; i++) {
|
|
1382
1136
|
var source = arguments[i];
|
|
1383
1137
|
for (var key in source) {
|
|
@@ -1388,51 +1142,50 @@ function _extends19() {
|
|
|
1388
1142
|
}
|
|
1389
1143
|
return target;
|
|
1390
1144
|
};
|
|
1391
|
-
return
|
|
1145
|
+
return _extends16.apply(this, arguments);
|
|
1392
1146
|
}
|
|
1393
1147
|
var PureInvitationAcceptedContent = ({ onDone, result, invitationType, doneActionParent, active }) => {
|
|
1394
1148
|
const disabled = !active;
|
|
1395
|
-
const { t } =
|
|
1396
|
-
const doneButton = /* @__PURE__ */
|
|
1149
|
+
const { t } = useTranslation11("os");
|
|
1150
|
+
const doneButton = /* @__PURE__ */ React19.createElement(Button8, _extends16({}, onDone && {
|
|
1397
1151
|
onClick: () => onDone(result)
|
|
1398
1152
|
}, {
|
|
1399
1153
|
disabled,
|
|
1400
1154
|
className: "grow flex items-center gap-2 pli-2",
|
|
1401
|
-
"data-autofocus": `${invitationType} invitation acceptor; invitation accepted
|
|
1402
|
-
|
|
1403
|
-
}), /* @__PURE__ */ React23.createElement(CaretLeft5, {
|
|
1155
|
+
"data-autofocus": `${invitationType} invitation acceptor; invitation accepted`
|
|
1156
|
+
}), /* @__PURE__ */ React19.createElement(CaretLeft5, {
|
|
1404
1157
|
weight: "bold",
|
|
1405
|
-
className:
|
|
1406
|
-
}), /* @__PURE__ */
|
|
1158
|
+
className: mx12(getSize9(2), "invisible")
|
|
1159
|
+
}), /* @__PURE__ */ React19.createElement("span", {
|
|
1407
1160
|
className: "grow"
|
|
1408
|
-
}, t("done label")), /* @__PURE__ */
|
|
1161
|
+
}, t("done label")), /* @__PURE__ */ React19.createElement(Check, {
|
|
1409
1162
|
weight: "bold",
|
|
1410
|
-
className:
|
|
1163
|
+
className: getSize9(4)
|
|
1411
1164
|
}));
|
|
1412
|
-
return doneActionParent ? /* @__PURE__ */
|
|
1165
|
+
return doneActionParent ? /* @__PURE__ */ cloneElement2(doneActionParent, {}, doneButton) : doneButton;
|
|
1413
1166
|
};
|
|
1414
1167
|
var InvitationAcceptedContent = (props) => {
|
|
1415
1168
|
const { result } = useInvitationStatus3(props.activeInvitation);
|
|
1416
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ React19.createElement(PureInvitationAcceptedContent, _extends16({}, props, {
|
|
1417
1170
|
result
|
|
1418
1171
|
}));
|
|
1419
1172
|
};
|
|
1420
1173
|
var InvitationAccepted = (props) => {
|
|
1421
1174
|
const { invitationType: _invitationType, doneActionParent: _doneActionParent, onDone: _onDone, ...viewStateProps } = props;
|
|
1422
1175
|
const { activeInvitation } = viewStateProps;
|
|
1423
|
-
return /* @__PURE__ */
|
|
1176
|
+
return /* @__PURE__ */ React19.createElement(ViewState, _extends16({}, viewStateProps), !activeInvitation || activeInvitation === true ? /* @__PURE__ */ React19.createElement(PureInvitationAcceptedContent, _extends16({}, props, {
|
|
1424
1177
|
result: null
|
|
1425
|
-
})) : /* @__PURE__ */
|
|
1178
|
+
})) : /* @__PURE__ */ React19.createElement(InvitationAcceptedContent, _extends16({}, props)));
|
|
1426
1179
|
};
|
|
1427
1180
|
|
|
1428
1181
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/InvitationInput.tsx
|
|
1429
1182
|
import { CaretLeft as CaretLeft6, CaretRight as CaretRight5 } from "phosphor-react";
|
|
1430
|
-
import
|
|
1183
|
+
import React20, { useState as useState4 } from "react";
|
|
1431
1184
|
import { InvitationEncoder } from "@dxos/client";
|
|
1432
|
-
import { useClient as
|
|
1433
|
-
import { Button as
|
|
1434
|
-
function
|
|
1435
|
-
|
|
1185
|
+
import { useClient as useClient4 } from "@dxos/react-client";
|
|
1186
|
+
import { Button as Button9, getSize as getSize10, Input as Input2, mx as mx13, useTranslation as useTranslation12 } from "@dxos/react-components";
|
|
1187
|
+
function _extends17() {
|
|
1188
|
+
_extends17 = Object.assign || function(target) {
|
|
1436
1189
|
for (var i = 1; i < arguments.length; i++) {
|
|
1437
1190
|
var source = arguments[i];
|
|
1438
1191
|
for (var key in source) {
|
|
@@ -1443,22 +1196,22 @@ function _extends20() {
|
|
|
1443
1196
|
}
|
|
1444
1197
|
return target;
|
|
1445
1198
|
};
|
|
1446
|
-
return
|
|
1199
|
+
return _extends17.apply(this, arguments);
|
|
1447
1200
|
}
|
|
1448
1201
|
var InvitationInput = ({ invitationType, ...viewStateProps }) => {
|
|
1449
|
-
const client =
|
|
1202
|
+
const client = useClient4();
|
|
1450
1203
|
const disabled = !viewStateProps.active;
|
|
1451
1204
|
const { dispatch } = viewStateProps;
|
|
1452
|
-
const { t } =
|
|
1205
|
+
const { t } = useTranslation12("os");
|
|
1453
1206
|
const [inputValue, setInputValue] = useState4("");
|
|
1454
1207
|
const handleNext = () => dispatch({
|
|
1455
1208
|
type: "connecting invitation",
|
|
1456
1209
|
from: invitationType,
|
|
1457
1210
|
invitation: client[invitationType === "halo" ? "halo" : "echo"].acceptInvitation(InvitationEncoder.decode(inputValue))
|
|
1458
1211
|
});
|
|
1459
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ React20.createElement(ViewState, _extends17({}, viewStateProps), /* @__PURE__ */ React20.createElement(Input2, {
|
|
1460
1213
|
disabled,
|
|
1461
|
-
label: /* @__PURE__ */
|
|
1214
|
+
label: /* @__PURE__ */ React20.createElement(ViewStateHeading, null, t("invitation input label")),
|
|
1462
1215
|
onChange: ({ target: { value } }) => setInputValue(value),
|
|
1463
1216
|
slots: {
|
|
1464
1217
|
root: {
|
|
@@ -1471,47 +1224,44 @@ var InvitationInput = ({ invitationType, ...viewStateProps }) => {
|
|
|
1471
1224
|
"data-autofocus": `${invitationType} invitation acceptor; invitation input`,
|
|
1472
1225
|
onKeyUp: ({ key }) => key === "Enter" && handleNext()
|
|
1473
1226
|
}
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
}), /* @__PURE__ */ React24.createElement("div", {
|
|
1227
|
+
}
|
|
1228
|
+
}), /* @__PURE__ */ React20.createElement("div", {
|
|
1477
1229
|
role: "none",
|
|
1478
1230
|
className: "grow"
|
|
1479
|
-
}), /* @__PURE__ */
|
|
1231
|
+
}), /* @__PURE__ */ React20.createElement("div", {
|
|
1480
1232
|
className: "flex gap-2"
|
|
1481
|
-
}, /* @__PURE__ */
|
|
1233
|
+
}, /* @__PURE__ */ React20.createElement(Button9, {
|
|
1482
1234
|
disabled,
|
|
1483
1235
|
className: "grow flex items-center gap-2 pli-2 order-2",
|
|
1484
|
-
onClick: handleNext
|
|
1485
|
-
|
|
1486
|
-
}, /* @__PURE__ */ React24.createElement(CaretLeft6, {
|
|
1236
|
+
onClick: handleNext
|
|
1237
|
+
}, /* @__PURE__ */ React20.createElement(CaretLeft6, {
|
|
1487
1238
|
weight: "bold",
|
|
1488
|
-
className:
|
|
1489
|
-
}), /* @__PURE__ */
|
|
1239
|
+
className: mx13(getSize10(2), "invisible")
|
|
1240
|
+
}), /* @__PURE__ */ React20.createElement("span", {
|
|
1490
1241
|
className: "grow"
|
|
1491
|
-
}, t("continue label")), /* @__PURE__ */
|
|
1242
|
+
}, t("continue label")), /* @__PURE__ */ React20.createElement(CaretRight5, {
|
|
1492
1243
|
weight: "bold",
|
|
1493
|
-
className:
|
|
1494
|
-
})), /* @__PURE__ */
|
|
1244
|
+
className: getSize10(4)
|
|
1245
|
+
})), /* @__PURE__ */ React20.createElement(Button9, {
|
|
1495
1246
|
disabled,
|
|
1496
1247
|
onClick: () => dispatch({
|
|
1497
1248
|
type: "add identity"
|
|
1498
1249
|
}),
|
|
1499
|
-
className: "flex items-center gap-2 pis-2 pie-4"
|
|
1500
|
-
|
|
1501
|
-
}, /* @__PURE__ */ React24.createElement(CaretLeft6, {
|
|
1250
|
+
className: "flex items-center gap-2 pis-2 pie-4"
|
|
1251
|
+
}, /* @__PURE__ */ React20.createElement(CaretLeft6, {
|
|
1502
1252
|
weight: "bold",
|
|
1503
|
-
className:
|
|
1504
|
-
}), /* @__PURE__ */
|
|
1253
|
+
className: getSize10(4)
|
|
1254
|
+
}), /* @__PURE__ */ React20.createElement("span", null, t("back label")))));
|
|
1505
1255
|
};
|
|
1506
1256
|
|
|
1507
1257
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/InvitationRescuer.tsx
|
|
1508
1258
|
import { ArrowsClockwise, CaretLeft as CaretLeft7, CaretRight as CaretRight6 } from "phosphor-react";
|
|
1509
|
-
import
|
|
1259
|
+
import React21 from "react";
|
|
1510
1260
|
import { Invitation as Invitation5 } from "@dxos/client";
|
|
1511
1261
|
import { useInvitationStatus as useInvitationStatus4 } from "@dxos/react-client";
|
|
1512
|
-
import { Button as
|
|
1513
|
-
function
|
|
1514
|
-
|
|
1262
|
+
import { Button as Button10, getSize as getSize11, mx as mx14, useTranslation as useTranslation13 } from "@dxos/react-components";
|
|
1263
|
+
function _extends18() {
|
|
1264
|
+
_extends18 = Object.assign || function(target) {
|
|
1515
1265
|
for (var i = 1; i < arguments.length; i++) {
|
|
1516
1266
|
var source = arguments[i];
|
|
1517
1267
|
for (var key in source) {
|
|
@@ -1522,82 +1272,78 @@ function _extends21() {
|
|
|
1522
1272
|
}
|
|
1523
1273
|
return target;
|
|
1524
1274
|
};
|
|
1525
|
-
return
|
|
1275
|
+
return _extends18.apply(this, arguments);
|
|
1526
1276
|
}
|
|
1527
1277
|
var InvitationActions = ({ activeInvitation, disabled, dispatch, invitationType }) => {
|
|
1528
1278
|
const { status, cancel } = useInvitationStatus4(activeInvitation);
|
|
1529
|
-
const { t } =
|
|
1279
|
+
const { t } = useTranslation13("os");
|
|
1530
1280
|
switch (status) {
|
|
1531
1281
|
case Invitation5.State.CONNECTING:
|
|
1532
|
-
return /* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", {
|
|
1533
1283
|
role: "none",
|
|
1534
1284
|
className: "grow"
|
|
1535
|
-
}), /* @__PURE__ */
|
|
1285
|
+
}), /* @__PURE__ */ React21.createElement("div", {
|
|
1536
1286
|
className: "flex gap-2"
|
|
1537
|
-
}, /* @__PURE__ */
|
|
1287
|
+
}, /* @__PURE__ */ React21.createElement(Button10, {
|
|
1538
1288
|
disabled: true,
|
|
1539
|
-
className: "grow flex items-center gap-2 pli-2 order-2"
|
|
1540
|
-
|
|
1541
|
-
}, /* @__PURE__ */ React25.createElement(CaretLeft7, {
|
|
1289
|
+
className: "grow flex items-center gap-2 pli-2 order-2"
|
|
1290
|
+
}, /* @__PURE__ */ React21.createElement(CaretLeft7, {
|
|
1542
1291
|
weight: "bold",
|
|
1543
|
-
className:
|
|
1544
|
-
}), /* @__PURE__ */
|
|
1292
|
+
className: mx14(getSize11(2), "invisible")
|
|
1293
|
+
}), /* @__PURE__ */ React21.createElement("span", {
|
|
1545
1294
|
className: "grow"
|
|
1546
|
-
}, t("next label")), /* @__PURE__ */
|
|
1295
|
+
}, t("next label")), /* @__PURE__ */ React21.createElement(CaretRight6, {
|
|
1547
1296
|
weight: "bold",
|
|
1548
|
-
className:
|
|
1549
|
-
})), /* @__PURE__ */
|
|
1297
|
+
className: getSize11(4)
|
|
1298
|
+
})), /* @__PURE__ */ React21.createElement(Button10, {
|
|
1550
1299
|
disabled,
|
|
1551
1300
|
className: "flex items-center gap-2 pis-2 pie-4",
|
|
1552
1301
|
onClick: cancel,
|
|
1553
|
-
"data-autofocus": `${invitationType} invitation acceptor; invitation rescuer
|
|
1554
|
-
|
|
1555
|
-
}, /* @__PURE__ */ React25.createElement(CaretLeft7, {
|
|
1302
|
+
"data-autofocus": `${invitationType} invitation acceptor; invitation rescuer`
|
|
1303
|
+
}, /* @__PURE__ */ React21.createElement(CaretLeft7, {
|
|
1556
1304
|
weight: "bold",
|
|
1557
|
-
className:
|
|
1558
|
-
}), /* @__PURE__ */
|
|
1305
|
+
className: getSize11(4)
|
|
1306
|
+
}), /* @__PURE__ */ React21.createElement("span", null, t("cancel label")))));
|
|
1559
1307
|
case Invitation5.State.TIMEOUT:
|
|
1560
1308
|
case Invitation5.State.CANCELLED:
|
|
1561
1309
|
case Invitation5.State.ERROR:
|
|
1562
1310
|
default:
|
|
1563
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ React21.createElement(Button10, {
|
|
1564
1312
|
disabled,
|
|
1565
1313
|
className: "grow flex items-center gap-2 pli-2",
|
|
1566
1314
|
onClick: () => dispatch({
|
|
1567
1315
|
type: "reset invitation",
|
|
1568
1316
|
from: invitationType
|
|
1569
1317
|
}),
|
|
1570
|
-
"data-autofocus": `${invitationType} invitation acceptor; invitation rescuer
|
|
1571
|
-
|
|
1572
|
-
}, /* @__PURE__ */ React25.createElement(CaretLeft7, {
|
|
1318
|
+
"data-autofocus": `${invitationType} invitation acceptor; invitation rescuer`
|
|
1319
|
+
}, /* @__PURE__ */ React21.createElement(CaretLeft7, {
|
|
1573
1320
|
weight: "bold",
|
|
1574
|
-
className:
|
|
1575
|
-
}), /* @__PURE__ */
|
|
1321
|
+
className: mx14(getSize11(5), "invisible")
|
|
1322
|
+
}), /* @__PURE__ */ React21.createElement("span", {
|
|
1576
1323
|
className: "grow"
|
|
1577
|
-
}, t("reset label")), /* @__PURE__ */
|
|
1324
|
+
}, t("reset label")), /* @__PURE__ */ React21.createElement(ArrowsClockwise, {
|
|
1578
1325
|
weight: "bold",
|
|
1579
|
-
className:
|
|
1326
|
+
className: getSize11(5)
|
|
1580
1327
|
}));
|
|
1581
1328
|
}
|
|
1582
1329
|
};
|
|
1583
1330
|
var InvitationRescuer = ({ invitationType, ...viewStateProps }) => {
|
|
1584
1331
|
const disabled = !viewStateProps.active;
|
|
1585
1332
|
const { dispatch, activeInvitation } = viewStateProps;
|
|
1586
|
-
const { t } =
|
|
1587
|
-
return /* @__PURE__ */
|
|
1333
|
+
const { t } = useTranslation13("os");
|
|
1334
|
+
return /* @__PURE__ */ React21.createElement(ViewState, _extends18({}, viewStateProps), activeInvitation === true || !activeInvitation ? /* @__PURE__ */ React21.createElement(Button10, {
|
|
1588
1335
|
disabled,
|
|
1589
1336
|
className: "grow flex items-center gap-2 pli-2",
|
|
1590
|
-
"data-autofocus": "space invitation acceptor; invitation rescuer"
|
|
1591
|
-
|
|
1592
|
-
}, /* @__PURE__ */ React25.createElement(CaretLeft7, {
|
|
1337
|
+
"data-autofocus": "space invitation acceptor; invitation rescuer"
|
|
1338
|
+
}, /* @__PURE__ */ React21.createElement(CaretLeft7, {
|
|
1593
1339
|
weight: "bold",
|
|
1594
|
-
className:
|
|
1595
|
-
}), /* @__PURE__ */
|
|
1340
|
+
className: mx14(getSize11(5), "invisible")
|
|
1341
|
+
}), /* @__PURE__ */ React21.createElement("span", {
|
|
1596
1342
|
className: "grow"
|
|
1597
|
-
}, t("connect label")), /* @__PURE__ */
|
|
1343
|
+
}, t("connect label")), /* @__PURE__ */ React21.createElement(ArrowsClockwise, {
|
|
1598
1344
|
weight: "bold",
|
|
1599
|
-
className:
|
|
1600
|
-
})) : /* @__PURE__ */
|
|
1345
|
+
className: getSize11(5)
|
|
1346
|
+
})) : /* @__PURE__ */ React21.createElement(InvitationActions, _extends18({}, {
|
|
1601
1347
|
activeInvitation,
|
|
1602
1348
|
disabled,
|
|
1603
1349
|
dispatch,
|
|
@@ -1607,11 +1353,11 @@ var InvitationRescuer = ({ invitationType, ...viewStateProps }) => {
|
|
|
1607
1353
|
|
|
1608
1354
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/view-states/InvitationAuthenticator.tsx
|
|
1609
1355
|
import { CaretLeft as CaretLeft8, CaretRight as CaretRight7 } from "phosphor-react";
|
|
1610
|
-
import
|
|
1356
|
+
import React22, { useCallback as useCallback5, useState as useState5 } from "react";
|
|
1611
1357
|
import { useInvitationStatus as useInvitationStatus5 } from "@dxos/react-client";
|
|
1612
|
-
import { Button as
|
|
1613
|
-
function
|
|
1614
|
-
|
|
1358
|
+
import { Button as Button11, getSize as getSize12, Input as Input3, mx as mx15, useTranslation as useTranslation14 } from "@dxos/react-components";
|
|
1359
|
+
function _extends19() {
|
|
1360
|
+
_extends19 = Object.assign || function(target) {
|
|
1615
1361
|
for (var i = 1; i < arguments.length; i++) {
|
|
1616
1362
|
var source = arguments[i];
|
|
1617
1363
|
for (var key in source) {
|
|
@@ -1622,13 +1368,13 @@ function _extends22() {
|
|
|
1622
1368
|
}
|
|
1623
1369
|
return target;
|
|
1624
1370
|
};
|
|
1625
|
-
return
|
|
1371
|
+
return _extends19.apply(this, arguments);
|
|
1626
1372
|
}
|
|
1627
1373
|
var pinLength = 6;
|
|
1628
1374
|
var PureInvitationAuthenticatorContent = ({ disabled, failed, dispatch, invitationType, onChange, onAuthenticate }) => {
|
|
1629
|
-
const { t } =
|
|
1630
|
-
return /* @__PURE__ */
|
|
1631
|
-
label: t("
|
|
1375
|
+
const { t } = useTranslation14("os");
|
|
1376
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Input3, _extends19({
|
|
1377
|
+
label: t("pin input label"),
|
|
1632
1378
|
size: "pin",
|
|
1633
1379
|
length: pinLength,
|
|
1634
1380
|
onChange,
|
|
@@ -1653,39 +1399,35 @@ var PureInvitationAuthenticatorContent = ({ disabled, failed, dispatch, invitati
|
|
|
1653
1399
|
}, failed && {
|
|
1654
1400
|
validationValence: "error",
|
|
1655
1401
|
validationMessage: t("failed to authenticate message")
|
|
1656
|
-
}, {
|
|
1657
|
-
"data-testid": "auth-code-input"
|
|
1658
|
-
})), /* @__PURE__ */ React26.createElement("div", {
|
|
1402
|
+
})), /* @__PURE__ */ React22.createElement("div", {
|
|
1659
1403
|
role: "none",
|
|
1660
1404
|
className: "grow"
|
|
1661
|
-
}), /* @__PURE__ */
|
|
1405
|
+
}), /* @__PURE__ */ React22.createElement("div", {
|
|
1662
1406
|
className: "flex gap-2"
|
|
1663
|
-
}, /* @__PURE__ */
|
|
1407
|
+
}, /* @__PURE__ */ React22.createElement(Button11, {
|
|
1664
1408
|
disabled,
|
|
1665
1409
|
className: "grow flex items-center gap-2 pli-2 order-2",
|
|
1666
1410
|
onClick: onAuthenticate,
|
|
1667
|
-
"data-autofocus-pinlength": invitationType
|
|
1668
|
-
|
|
1669
|
-
}, /* @__PURE__ */ React26.createElement(CaretLeft8, {
|
|
1411
|
+
"data-autofocus-pinlength": invitationType
|
|
1412
|
+
}, /* @__PURE__ */ React22.createElement(CaretLeft8, {
|
|
1670
1413
|
weight: "bold",
|
|
1671
|
-
className:
|
|
1672
|
-
}), /* @__PURE__ */
|
|
1414
|
+
className: mx15(getSize12(2), "invisible")
|
|
1415
|
+
}), /* @__PURE__ */ React22.createElement("span", {
|
|
1673
1416
|
className: "grow"
|
|
1674
|
-
}, t("next label")), /* @__PURE__ */
|
|
1417
|
+
}, t("next label")), /* @__PURE__ */ React22.createElement(CaretRight7, {
|
|
1675
1418
|
weight: "bold",
|
|
1676
|
-
className:
|
|
1677
|
-
})), /* @__PURE__ */
|
|
1419
|
+
className: getSize12(4)
|
|
1420
|
+
})), /* @__PURE__ */ React22.createElement(Button11, {
|
|
1678
1421
|
disabled,
|
|
1679
1422
|
className: "flex items-center gap-2 pis-2 pie-4",
|
|
1680
1423
|
onClick: () => dispatch({
|
|
1681
1424
|
type: "cancel invitation",
|
|
1682
1425
|
from: invitationType
|
|
1683
|
-
})
|
|
1684
|
-
|
|
1685
|
-
}, /* @__PURE__ */ React26.createElement(CaretLeft8, {
|
|
1426
|
+
})
|
|
1427
|
+
}, /* @__PURE__ */ React22.createElement(CaretLeft8, {
|
|
1686
1428
|
weight: "bold",
|
|
1687
|
-
className:
|
|
1688
|
-
}), /* @__PURE__ */
|
|
1429
|
+
className: getSize12(4)
|
|
1430
|
+
}), /* @__PURE__ */ React22.createElement("span", null, t("cancel label")))));
|
|
1689
1431
|
};
|
|
1690
1432
|
var InvitationAuthenticatorContent = ({ disabled, invitation, dispatch, invitationType, failed }) => {
|
|
1691
1433
|
const [pinValue, setPinValue] = useState5("");
|
|
@@ -1712,7 +1454,7 @@ var InvitationAuthenticatorContent = ({ disabled, invitation, dispatch, invitati
|
|
|
1712
1454
|
authenticate,
|
|
1713
1455
|
pinValue
|
|
1714
1456
|
]);
|
|
1715
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ React22.createElement(PureInvitationAuthenticatorContent, _extends19({}, {
|
|
1716
1458
|
disabled,
|
|
1717
1459
|
failed,
|
|
1718
1460
|
dispatch,
|
|
@@ -1724,7 +1466,7 @@ var InvitationAuthenticatorContent = ({ disabled, invitation, dispatch, invitati
|
|
|
1724
1466
|
var InvitationAuthenticator = ({ invitationType, failed, ...viewStateProps }) => {
|
|
1725
1467
|
const disabled = !viewStateProps.active;
|
|
1726
1468
|
const { activeInvitation, dispatch } = viewStateProps;
|
|
1727
|
-
return /* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ React22.createElement(ViewState, _extends19({}, viewStateProps), !activeInvitation || activeInvitation === true ? /* @__PURE__ */ React22.createElement(PureInvitationAuthenticatorContent, _extends19({}, {
|
|
1728
1470
|
disabled,
|
|
1729
1471
|
failed,
|
|
1730
1472
|
dispatch,
|
|
@@ -1733,7 +1475,7 @@ var InvitationAuthenticator = ({ invitationType, failed, ...viewStateProps }) =>
|
|
|
1733
1475
|
},
|
|
1734
1476
|
onAuthenticate: () => {
|
|
1735
1477
|
}
|
|
1736
|
-
})) : /* @__PURE__ */
|
|
1478
|
+
})) : /* @__PURE__ */ React22.createElement(InvitationAuthenticatorContent, _extends19({}, {
|
|
1737
1479
|
disabled,
|
|
1738
1480
|
failed,
|
|
1739
1481
|
invitation: activeInvitation,
|
|
@@ -1743,8 +1485,8 @@ var InvitationAuthenticator = ({ invitationType, failed, ...viewStateProps }) =>
|
|
|
1743
1485
|
};
|
|
1744
1486
|
|
|
1745
1487
|
// packages/apps/patterns/react-ui/src/panels/JoinPanel/JoinPanel.tsx
|
|
1746
|
-
function
|
|
1747
|
-
|
|
1488
|
+
function _extends20() {
|
|
1489
|
+
_extends20 = Object.assign || function(target) {
|
|
1748
1490
|
for (var i = 1; i < arguments.length; i++) {
|
|
1749
1491
|
var source = arguments[i];
|
|
1750
1492
|
for (var key in source) {
|
|
@@ -1755,14 +1497,13 @@ function _extends23() {
|
|
|
1755
1497
|
}
|
|
1756
1498
|
return target;
|
|
1757
1499
|
};
|
|
1758
|
-
return
|
|
1500
|
+
return _extends20.apply(this, arguments);
|
|
1759
1501
|
}
|
|
1760
|
-
var JoinPanel = ({
|
|
1761
|
-
const client =
|
|
1762
|
-
const internalTitleId =
|
|
1502
|
+
var JoinPanel = ({ initialInvitationCode, titleId: propsTitleId, exitActionParent, onExit, doneActionParent, onDone }) => {
|
|
1503
|
+
const client = useClient5();
|
|
1504
|
+
const internalTitleId = useId3("joinPanel__title");
|
|
1763
1505
|
const titleId = propsTitleId != null ? propsTitleId : internalTitleId;
|
|
1764
|
-
const identity =
|
|
1765
|
-
const [prevIdentity, setPrevIdentity] = useState6(identity);
|
|
1506
|
+
const identity = useIdentity();
|
|
1766
1507
|
const availableIdentities = identity ? [
|
|
1767
1508
|
identity
|
|
1768
1509
|
] : [];
|
|
@@ -1783,7 +1524,7 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
1783
1524
|
if (action.method === "accept device invitation") {
|
|
1784
1525
|
nextState.activeView = "halo invitation acceptor";
|
|
1785
1526
|
if (state.unredeemedHaloInvitationCode) {
|
|
1786
|
-
nextState.haloInvitation = client.
|
|
1527
|
+
nextState.haloInvitation = client.echo.acceptInvitation(InvitationEncoder2.decode(state.unredeemedHaloInvitationCode));
|
|
1787
1528
|
nextState.unredeemedHaloInvitationCode = void 0;
|
|
1788
1529
|
nextState.haloViewState = "invitation authenticator";
|
|
1789
1530
|
} else {
|
|
@@ -1847,21 +1588,20 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
1847
1588
|
nextState[action.from === "halo" ? "haloViewState" : "spaceViewState"] = "invitation input";
|
|
1848
1589
|
break;
|
|
1849
1590
|
}
|
|
1850
|
-
log("[join panel reducer]", {
|
|
1591
|
+
log.debug("[join panel reducer]", {
|
|
1851
1592
|
action,
|
|
1852
1593
|
nextState
|
|
1853
1594
|
}, {
|
|
1854
1595
|
file: "JoinPanel.tsx",
|
|
1855
|
-
line:
|
|
1596
|
+
line: 123,
|
|
1856
1597
|
scope: void 0,
|
|
1857
1598
|
callSite: (f, a) => f(...a)
|
|
1858
1599
|
});
|
|
1859
1600
|
return nextState;
|
|
1860
1601
|
};
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
unredeemedSpaceInvitationCode: mode === "halo-only" ? void 0 : initialInvitationCode,
|
|
1602
|
+
const [joinState, dispatch] = useReducer(reducer, {
|
|
1603
|
+
unredeemedHaloInvitationCode: void 0,
|
|
1604
|
+
unredeemedSpaceInvitationCode: initialInvitationCode,
|
|
1865
1605
|
spaceInvitation: void 0,
|
|
1866
1606
|
haloInvitation: void 0,
|
|
1867
1607
|
activeView: availableIdentities.length > 0 ? "identity selector" : "addition method selector",
|
|
@@ -1870,30 +1610,13 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
1870
1610
|
spaceViewState: "invitation input",
|
|
1871
1611
|
haloViewState: "invitation input"
|
|
1872
1612
|
});
|
|
1873
|
-
if (identity !== prevIdentity) {
|
|
1874
|
-
setPrevIdentity(identity);
|
|
1875
|
-
identity && !prevIdentity && dispatch({
|
|
1876
|
-
type: "added identity",
|
|
1877
|
-
identity
|
|
1878
|
-
});
|
|
1879
|
-
}
|
|
1880
|
-
useEffect(() => {
|
|
1881
|
-
if (unredeemedHaloInvitationCode) {
|
|
1882
|
-
dispatch({
|
|
1883
|
-
type: "select addition method",
|
|
1884
|
-
method: "accept device invitation"
|
|
1885
|
-
});
|
|
1886
|
-
}
|
|
1887
|
-
}, [
|
|
1888
|
-
unredeemedHaloInvitationCode
|
|
1889
|
-
]);
|
|
1890
1613
|
useEffect(() => {
|
|
1891
1614
|
const attrValue = joinState.activeView === "identity input" ? `${joinState.activeView}; ${joinState.additionMethod}` : joinState.activeView === "space invitation acceptor" ? `${joinState.activeView}; ${joinState.spaceViewState}` : joinState.activeView === "halo invitation acceptor" ? `${joinState.activeView}; ${joinState.haloViewState}` : joinState.activeView;
|
|
1892
|
-
log("[autofocus value]", {
|
|
1615
|
+
log.debug("[autofocus value]", {
|
|
1893
1616
|
attrValue
|
|
1894
1617
|
}, {
|
|
1895
1618
|
file: "JoinPanel.tsx",
|
|
1896
|
-
line:
|
|
1619
|
+
line: 149,
|
|
1897
1620
|
scope: void 0,
|
|
1898
1621
|
callSite: (f, a) => f(...a)
|
|
1899
1622
|
});
|
|
@@ -1968,47 +1691,45 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
1968
1691
|
}, [
|
|
1969
1692
|
joinState.haloInvitation
|
|
1970
1693
|
]);
|
|
1971
|
-
return /* @__PURE__ */
|
|
1972
|
-
mode,
|
|
1694
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(JoinHeading, _extends20({}, {
|
|
1973
1695
|
titleId,
|
|
1974
1696
|
invitation: joinState.spaceInvitation,
|
|
1975
1697
|
onExit,
|
|
1976
|
-
exitActionParent
|
|
1977
|
-
|
|
1978
|
-
})), /* @__PURE__ */ React27.createElement("div", {
|
|
1698
|
+
exitActionParent
|
|
1699
|
+
})), /* @__PURE__ */ React23.createElement("div", {
|
|
1979
1700
|
role: "none",
|
|
1980
1701
|
className: "is-full overflow-hidden"
|
|
1981
|
-
}, /* @__PURE__ */
|
|
1702
|
+
}, /* @__PURE__ */ React23.createElement("div", {
|
|
1982
1703
|
role: "none",
|
|
1983
1704
|
className: "flex is-[1300%]",
|
|
1984
1705
|
"aria-live": "polite"
|
|
1985
|
-
}, /* @__PURE__ */
|
|
1706
|
+
}, /* @__PURE__ */ React23.createElement(IdentitySelector, _extends20({}, {
|
|
1986
1707
|
dispatch,
|
|
1987
1708
|
availableIdentities,
|
|
1988
1709
|
active: joinState.activeView === "identity selector"
|
|
1989
|
-
})), /* @__PURE__ */
|
|
1710
|
+
})), /* @__PURE__ */ React23.createElement(AdditionMethodSelector, _extends20({}, {
|
|
1990
1711
|
dispatch,
|
|
1991
1712
|
availableIdentities,
|
|
1992
1713
|
active: joinState.activeView === "addition method selector"
|
|
1993
|
-
})), /* @__PURE__ */
|
|
1714
|
+
})), /* @__PURE__ */ React23.createElement(IdentityInput, _extends20({}, {
|
|
1994
1715
|
dispatch,
|
|
1995
1716
|
active: joinState.activeView === "identity input" && joinState.additionMethod === "create identity",
|
|
1996
1717
|
method: "create identity"
|
|
1997
|
-
})), /* @__PURE__ */
|
|
1718
|
+
})), /* @__PURE__ */ React23.createElement(IdentityInput, _extends20({}, {
|
|
1998
1719
|
dispatch,
|
|
1999
1720
|
active: joinState.activeView === "identity input" && joinState.additionMethod === "recover identity",
|
|
2000
1721
|
method: "recover identity"
|
|
2001
|
-
})), /* @__PURE__ */
|
|
1722
|
+
})), /* @__PURE__ */ React23.createElement(InvitationInput, _extends20({}, {
|
|
2002
1723
|
dispatch,
|
|
2003
1724
|
activeInvitation: joinState.haloInvitation || true,
|
|
2004
1725
|
active: joinState.activeView === "halo invitation acceptor" && joinState.haloViewState === "invitation input",
|
|
2005
1726
|
invitationType: "halo"
|
|
2006
|
-
})), /* @__PURE__ */
|
|
1727
|
+
})), /* @__PURE__ */ React23.createElement(InvitationRescuer, _extends20({}, {
|
|
2007
1728
|
dispatch,
|
|
2008
1729
|
activeInvitation: joinState.haloInvitation || true,
|
|
2009
1730
|
active: joinState.activeView === "halo invitation acceptor" && joinState.haloViewState === "invitation rescuer",
|
|
2010
1731
|
invitationType: "halo"
|
|
2011
|
-
})), /* @__PURE__ */
|
|
1732
|
+
})), /* @__PURE__ */ React23.createElement(InvitationAuthenticator, _extends20({}, {
|
|
2012
1733
|
dispatch,
|
|
2013
1734
|
activeInvitation: joinState.haloInvitation || true,
|
|
2014
1735
|
active: joinState.activeView === "halo invitation acceptor" && joinState.haloViewState === "invitation authenticator",
|
|
@@ -2016,33 +1737,28 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
2016
1737
|
...joinState.spaceInvitationAnnotation === "authentication failed" && {
|
|
2017
1738
|
failed: true
|
|
2018
1739
|
}
|
|
2019
|
-
})), /* @__PURE__ */
|
|
1740
|
+
})), /* @__PURE__ */ React23.createElement(InvitationAccepted, _extends20({}, {
|
|
2020
1741
|
dispatch,
|
|
2021
1742
|
activeInvitation: joinState.haloInvitation || true,
|
|
2022
1743
|
active: joinState.activeView === "halo invitation acceptor" && joinState.haloViewState === "invitation accepted",
|
|
2023
|
-
invitationType: "halo"
|
|
2024
|
-
|
|
2025
|
-
onDone
|
|
2026
|
-
})), /* @__PURE__ */ React27.createElement(IdentityAdded, _extends23({}, {
|
|
2027
|
-
mode,
|
|
1744
|
+
invitationType: "halo"
|
|
1745
|
+
})), /* @__PURE__ */ React23.createElement(IdentityAdded, _extends20({}, {
|
|
2028
1746
|
dispatch,
|
|
2029
1747
|
addedIdentity: joinState.selectedIdentity,
|
|
2030
|
-
active: joinState.activeView === "identity added"
|
|
2031
|
-
|
|
2032
|
-
onDone
|
|
2033
|
-
})), /* @__PURE__ */ React27.createElement(InvitationInput, _extends23({}, {
|
|
1748
|
+
active: joinState.activeView === "identity added"
|
|
1749
|
+
})), /* @__PURE__ */ React23.createElement(InvitationInput, _extends20({}, {
|
|
2034
1750
|
dispatch,
|
|
2035
1751
|
activeInvitation: joinState.spaceInvitation || true,
|
|
2036
1752
|
selectedIdentity: joinState.selectedIdentity,
|
|
2037
1753
|
active: joinState.activeView === "space invitation acceptor" && joinState.spaceViewState === "invitation input",
|
|
2038
1754
|
invitationType: "space"
|
|
2039
|
-
})), /* @__PURE__ */
|
|
1755
|
+
})), /* @__PURE__ */ React23.createElement(InvitationRescuer, _extends20({}, {
|
|
2040
1756
|
dispatch,
|
|
2041
1757
|
activeInvitation: joinState.spaceInvitation || true,
|
|
2042
1758
|
selectedIdentity: joinState.selectedIdentity,
|
|
2043
1759
|
active: joinState.activeView === "space invitation acceptor" && joinState.spaceViewState === "invitation rescuer",
|
|
2044
1760
|
invitationType: "space"
|
|
2045
|
-
})), /* @__PURE__ */
|
|
1761
|
+
})), /* @__PURE__ */ React23.createElement(InvitationAuthenticator, _extends20({}, {
|
|
2046
1762
|
dispatch,
|
|
2047
1763
|
activeInvitation: joinState.spaceInvitation || true,
|
|
2048
1764
|
selectedIdentity: joinState.selectedIdentity,
|
|
@@ -2051,7 +1767,7 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
2051
1767
|
...joinState.spaceInvitationAnnotation === "authentication failed" && {
|
|
2052
1768
|
failed: true
|
|
2053
1769
|
}
|
|
2054
|
-
})), /* @__PURE__ */
|
|
1770
|
+
})), /* @__PURE__ */ React23.createElement(InvitationAccepted, _extends20({}, {
|
|
2055
1771
|
dispatch,
|
|
2056
1772
|
activeInvitation: joinState.spaceInvitation || true,
|
|
2057
1773
|
selectedIdentity: joinState.selectedIdentity,
|
|
@@ -2062,167 +1778,9 @@ var JoinPanel = ({ mode, initialInvitationCode, titleId: propsTitleId, exitActio
|
|
|
2062
1778
|
})))));
|
|
2063
1779
|
};
|
|
2064
1780
|
|
|
2065
|
-
// packages/apps/patterns/react-ui/src/panels/SpacePanel/SpacePanel.tsx
|
|
2066
|
-
import { CaretLeft as CaretLeft9, CaretRight as CaretRight8, Intersect, PlusCircle, UserPlus as UserPlus3 } from "phosphor-react";
|
|
2067
|
-
import React28, { cloneElement as cloneElement5, useReducer as useReducer3 } from "react";
|
|
2068
|
-
import { useClient as useClient7, useSpaceInvitations as useSpaceInvitations2, useSpaces } from "@dxos/react-client";
|
|
2069
|
-
import { Button as Button13, getSize as getSize14, mx as mx22, Tooltip as Tooltip2, useTranslation as useTranslation17 } from "@dxos/react-components";
|
|
2070
|
-
function _extends24() {
|
|
2071
|
-
_extends24 = Object.assign || function(target) {
|
|
2072
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2073
|
-
var source = arguments[i];
|
|
2074
|
-
for (var key in source) {
|
|
2075
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2076
|
-
target[key] = source[key];
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
return target;
|
|
2081
|
-
};
|
|
2082
|
-
return _extends24.apply(this, arguments);
|
|
2083
|
-
}
|
|
2084
|
-
var CurrentSpaceView = ({ space, createInvitationUrl, onClickMember, onShowAll, titleId }) => {
|
|
2085
|
-
const { t } = useTranslation17("os");
|
|
2086
|
-
const invitations = useSpaceInvitations2(space == null ? void 0 : space.key);
|
|
2087
|
-
const name = space == null ? void 0 : space.properties.name;
|
|
2088
|
-
if (!space) {
|
|
2089
|
-
return null;
|
|
2090
|
-
}
|
|
2091
|
-
return /* @__PURE__ */ React28.createElement("div", {
|
|
2092
|
-
role: "none",
|
|
2093
|
-
className: "flex flex-col"
|
|
2094
|
-
}, /* @__PURE__ */ React28.createElement("div", {
|
|
2095
|
-
role: "none",
|
|
2096
|
-
className: mx22(subduedSurface, "rounded-bs-md flex items-center p-2 gap-2")
|
|
2097
|
-
}, /* @__PURE__ */ React28.createElement(Tooltip2, {
|
|
2098
|
-
content: t("show all spaces label"),
|
|
2099
|
-
zIndex: "z-50"
|
|
2100
|
-
}, /* @__PURE__ */ React28.createElement(Button13, {
|
|
2101
|
-
compact: true,
|
|
2102
|
-
variant: "ghost",
|
|
2103
|
-
onClick: onShowAll,
|
|
2104
|
-
"data-testid": "show-all-spaces"
|
|
2105
|
-
}, /* @__PURE__ */ React28.createElement(CaretLeft9, {
|
|
2106
|
-
className: getSize14(4),
|
|
2107
|
-
weight: "bold"
|
|
2108
|
-
}))), /* @__PURE__ */ React28.createElement("h2", {
|
|
2109
|
-
id: titleId,
|
|
2110
|
-
className: mx22("grow font-system-medium", !name && "font-mono")
|
|
2111
|
-
}, name != null ? name : space.key.truncate())), /* @__PURE__ */ React28.createElement("div", {
|
|
2112
|
-
role: "region",
|
|
2113
|
-
className: mx22(defaultSurface, "rounded-be-md p-2")
|
|
2114
|
-
}, /* @__PURE__ */ React28.createElement(InvitationList, {
|
|
2115
|
-
invitations,
|
|
2116
|
-
onClickRemove: ({ invitation }) => invitation && (space == null ? void 0 : space.removeInvitation(invitation.invitationId)),
|
|
2117
|
-
createInvitationUrl
|
|
2118
|
-
}), /* @__PURE__ */ React28.createElement(Button13, {
|
|
2119
|
-
className: "is-full flex gap-2 mbs-2",
|
|
2120
|
-
compact: true,
|
|
2121
|
-
onClick: () => space == null ? void 0 : space.createInvitation(),
|
|
2122
|
-
"data-testid": "create-space-invitation"
|
|
2123
|
-
}, /* @__PURE__ */ React28.createElement("span", null, t("create space invitation label")), /* @__PURE__ */ React28.createElement(UserPlus3, {
|
|
2124
|
-
className: getSize14(4),
|
|
2125
|
-
weight: "bold"
|
|
2126
|
-
})), /* @__PURE__ */ React28.createElement(PanelSeparator, null), /* @__PURE__ */ React28.createElement(SpaceMemberListContainer, {
|
|
2127
|
-
spaceKey: space.key,
|
|
2128
|
-
includeSelf: true,
|
|
2129
|
-
onSelect: onClickMember
|
|
2130
|
-
})));
|
|
2131
|
-
};
|
|
2132
|
-
var SpaceListView = ({ doneActionParent, onDone, onClickJoinSpace, onShowCurrent, titleId }) => {
|
|
2133
|
-
const { t } = useTranslation17("os");
|
|
2134
|
-
const client = useClient7();
|
|
2135
|
-
const spaces = useSpaces();
|
|
2136
|
-
const handleCreateSpace = async () => {
|
|
2137
|
-
const space = await client.echo.createSpace();
|
|
2138
|
-
onDone == null ? void 0 : onDone(space);
|
|
2139
|
-
};
|
|
2140
|
-
return /* @__PURE__ */ React28.createElement("div", {
|
|
2141
|
-
role: "none",
|
|
2142
|
-
className: "flex flex-col"
|
|
2143
|
-
}, /* @__PURE__ */ React28.createElement("div", {
|
|
2144
|
-
role: "none",
|
|
2145
|
-
className: mx22(subduedSurface, "rounded-bs-md flex items-center p-2 gap-2")
|
|
2146
|
-
}, /* @__PURE__ */ React28.createElement("h2", {
|
|
2147
|
-
id: titleId,
|
|
2148
|
-
className: "grow font-system-medium"
|
|
2149
|
-
}, t("all spaces label")), /* @__PURE__ */ React28.createElement(Tooltip2, {
|
|
2150
|
-
content: t("show current space label"),
|
|
2151
|
-
zIndex: "z-50"
|
|
2152
|
-
}, /* @__PURE__ */ React28.createElement(Button13, {
|
|
2153
|
-
compact: true,
|
|
2154
|
-
variant: "ghost",
|
|
2155
|
-
onClick: onShowCurrent,
|
|
2156
|
-
"data-testid": "show-current-space"
|
|
2157
|
-
}, /* @__PURE__ */ React28.createElement(CaretRight8, {
|
|
2158
|
-
className: getSize14(4),
|
|
2159
|
-
weight: "bold"
|
|
2160
|
-
})))), /* @__PURE__ */ React28.createElement("div", {
|
|
2161
|
-
role: "region",
|
|
2162
|
-
className: mx22(defaultSurface, "rounded-be-md p-2")
|
|
2163
|
-
}, /* @__PURE__ */ React28.createElement("ul", {
|
|
2164
|
-
className: "flex flex-col gap-2"
|
|
2165
|
-
}, spaces.map((space) => {
|
|
2166
|
-
const key = space.key.toHex();
|
|
2167
|
-
const listItem = /* @__PURE__ */ React28.createElement(SpaceListItem, {
|
|
2168
|
-
key,
|
|
2169
|
-
space,
|
|
2170
|
-
onClick: () => onDone == null ? void 0 : onDone(space)
|
|
2171
|
-
});
|
|
2172
|
-
return doneActionParent ? /* @__PURE__ */ cloneElement5(doneActionParent, {
|
|
2173
|
-
key
|
|
2174
|
-
}, listItem) : listItem;
|
|
2175
|
-
})), /* @__PURE__ */ React28.createElement(Button13, {
|
|
2176
|
-
className: "is-full flex gap-2 mbs-2",
|
|
2177
|
-
compact: true,
|
|
2178
|
-
onClick: handleCreateSpace,
|
|
2179
|
-
"data-testid": "create-space"
|
|
2180
|
-
}, /* @__PURE__ */ React28.createElement("span", null, t("create space label")), /* @__PURE__ */ React28.createElement(PlusCircle, {
|
|
2181
|
-
className: getSize14(4),
|
|
2182
|
-
weight: "bold"
|
|
2183
|
-
})), onClickJoinSpace && /* @__PURE__ */ React28.createElement(Button13, {
|
|
2184
|
-
className: "is-full flex gap-2 mbs-2",
|
|
2185
|
-
compact: true,
|
|
2186
|
-
onClick: () => onClickJoinSpace == null ? void 0 : onClickJoinSpace(),
|
|
2187
|
-
"data-testid": "join-space"
|
|
2188
|
-
}, /* @__PURE__ */ React28.createElement("span", null, t("join space label")), /* @__PURE__ */ React28.createElement(Intersect, {
|
|
2189
|
-
className: getSize14(4),
|
|
2190
|
-
weight: "bold"
|
|
2191
|
-
}))));
|
|
2192
|
-
};
|
|
2193
|
-
var SpacePanel = (props) => {
|
|
2194
|
-
var _a;
|
|
2195
|
-
const reducer = (state, action) => {
|
|
2196
|
-
const nextState = {
|
|
2197
|
-
...state
|
|
2198
|
-
};
|
|
2199
|
-
switch (action.type) {
|
|
2200
|
-
case "deselect space":
|
|
2201
|
-
nextState.activeView = "space list";
|
|
2202
|
-
break;
|
|
2203
|
-
case "select space":
|
|
2204
|
-
nextState.activeView = "current space";
|
|
2205
|
-
break;
|
|
2206
|
-
}
|
|
2207
|
-
return nextState;
|
|
2208
|
-
};
|
|
2209
|
-
const [panelState, dispatch] = useReducer3(reducer, {
|
|
2210
|
-
activeView: (_a = props.initialState) != null ? _a : "current space"
|
|
2211
|
-
});
|
|
2212
|
-
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, panelState.activeView === "current space" ? /* @__PURE__ */ React28.createElement(CurrentSpaceView, _extends24({}, props, {
|
|
2213
|
-
onShowAll: () => dispatch({
|
|
2214
|
-
type: "deselect space"
|
|
2215
|
-
})
|
|
2216
|
-
})) : /* @__PURE__ */ React28.createElement(SpaceListView, _extends24({}, props, {
|
|
2217
|
-
onShowCurrent: () => dispatch({
|
|
2218
|
-
type: "select space"
|
|
2219
|
-
})
|
|
2220
|
-
})));
|
|
2221
|
-
};
|
|
2222
|
-
|
|
2223
1781
|
// packages/apps/patterns/react-ui/src/composites/IdentityPopover/IdentityPopover.tsx
|
|
2224
|
-
function
|
|
2225
|
-
|
|
1782
|
+
function _extends21() {
|
|
1783
|
+
_extends21 = Object.assign || function(target) {
|
|
2226
1784
|
for (var i = 1; i < arguments.length; i++) {
|
|
2227
1785
|
var source = arguments[i];
|
|
2228
1786
|
for (var key in source) {
|
|
@@ -2233,12 +1791,12 @@ function _extends25() {
|
|
|
2233
1791
|
}
|
|
2234
1792
|
return target;
|
|
2235
1793
|
};
|
|
2236
|
-
return
|
|
1794
|
+
return _extends21.apply(this, arguments);
|
|
2237
1795
|
}
|
|
2238
1796
|
var IdentityPopover = ({ identity, openTrigger, slots, triggerIsInToolbar = true, onClickManageProfile, ...popoverProps }) => {
|
|
2239
1797
|
var _a, _b;
|
|
2240
|
-
return /* @__PURE__ */
|
|
2241
|
-
openTrigger: openTrigger != null ? openTrigger : /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ React24.createElement(PanelPopover, _extends21({}, popoverProps, {
|
|
1799
|
+
openTrigger: openTrigger != null ? openTrigger : /* @__PURE__ */ React24.createElement(Avatar7, {
|
|
2242
1800
|
size: 10,
|
|
2243
1801
|
variant: "circle",
|
|
2244
1802
|
fallbackValue: identity.identityKey.toHex(),
|
|
@@ -2248,11 +1806,11 @@ var IdentityPopover = ({ identity, openTrigger, slots, triggerIsInToolbar = true
|
|
|
2248
1806
|
...slots,
|
|
2249
1807
|
trigger: {
|
|
2250
1808
|
...slots == null ? void 0 : slots.trigger,
|
|
2251
|
-
className:
|
|
1809
|
+
className: mx16("flex justify-self-end pointer-events-auto bg-white dark:bg-neutral-700 p-0.5 button-elevation rounded-full", (_b = slots == null ? void 0 : slots.trigger) == null ? void 0 : _b.className)
|
|
2252
1810
|
}
|
|
2253
1811
|
},
|
|
2254
1812
|
triggerIsInToolbar
|
|
2255
|
-
}), /* @__PURE__ */
|
|
1813
|
+
}), /* @__PURE__ */ React24.createElement(IdentityPanel, _extends21({}, {
|
|
2256
1814
|
identity,
|
|
2257
1815
|
onClickManageProfile
|
|
2258
1816
|
})));
|
|
@@ -2260,10 +1818,10 @@ var IdentityPopover = ({ identity, openTrigger, slots, triggerIsInToolbar = true
|
|
|
2260
1818
|
|
|
2261
1819
|
// packages/apps/patterns/react-ui/src/composites/JoinDialog/JoinDialog.tsx
|
|
2262
1820
|
import { Action, Cancel } from "@radix-ui/react-alert-dialog";
|
|
2263
|
-
import
|
|
2264
|
-
import { ThemeContext as ThemeContext2, useId as
|
|
2265
|
-
function
|
|
2266
|
-
|
|
1821
|
+
import React25 from "react";
|
|
1822
|
+
import { ThemeContext as ThemeContext2, useId as useId4 } from "@dxos/react-components";
|
|
1823
|
+
function _extends22() {
|
|
1824
|
+
_extends22 = Object.assign || function(target) {
|
|
2267
1825
|
for (var i = 1; i < arguments.length; i++) {
|
|
2268
1826
|
var source = arguments[i];
|
|
2269
1827
|
for (var key in source) {
|
|
@@ -2274,207 +1832,29 @@ function _extends26() {
|
|
|
2274
1832
|
}
|
|
2275
1833
|
return target;
|
|
2276
1834
|
};
|
|
2277
|
-
return
|
|
1835
|
+
return _extends22.apply(this, arguments);
|
|
2278
1836
|
}
|
|
2279
1837
|
var JoinDialog = ({ slots, ...joinPanelProps }) => {
|
|
2280
|
-
const titleId =
|
|
2281
|
-
return /* @__PURE__ */
|
|
1838
|
+
const titleId = useId4("joinDialog__title");
|
|
1839
|
+
return /* @__PURE__ */ React25.createElement(PanelAlertDialog, _extends22({}, {
|
|
2282
1840
|
slots,
|
|
2283
1841
|
titleId
|
|
2284
|
-
}), /* @__PURE__ */
|
|
1842
|
+
}), /* @__PURE__ */ React25.createElement(ThemeContext2.Provider, {
|
|
2285
1843
|
value: {
|
|
2286
1844
|
themeVariant: "os"
|
|
2287
1845
|
}
|
|
2288
|
-
}, /* @__PURE__ */
|
|
1846
|
+
}, /* @__PURE__ */ React25.createElement(JoinPanel, _extends22({}, {
|
|
2289
1847
|
...joinPanelProps,
|
|
2290
1848
|
titleId,
|
|
2291
|
-
exitActionParent: /* @__PURE__ */
|
|
1849
|
+
exitActionParent: /* @__PURE__ */ React25.createElement(Cancel, {
|
|
2292
1850
|
asChild: true
|
|
2293
1851
|
}),
|
|
2294
|
-
doneActionParent: /* @__PURE__ */
|
|
1852
|
+
doneActionParent: /* @__PURE__ */ React25.createElement(Action, {
|
|
2295
1853
|
asChild: true
|
|
2296
1854
|
})
|
|
2297
1855
|
}))));
|
|
2298
1856
|
};
|
|
2299
1857
|
|
|
2300
|
-
// packages/apps/patterns/react-ui/src/composites/Shell/Shell.tsx
|
|
2301
|
-
import React33, { useEffect as useEffect2, useState as useState7 } from "react";
|
|
2302
|
-
import { ShellDisplay, ShellLayout } from "@dxos/protocols/proto/dxos/iframe";
|
|
2303
|
-
import { useClient as useClient8, useSpace as useSpace3, useSpaces as useSpaces2 } from "@dxos/react-client";
|
|
2304
|
-
|
|
2305
|
-
// packages/apps/patterns/react-ui/src/composites/DevicesDialog/DevicesDialog.tsx
|
|
2306
|
-
import { Close } from "@radix-ui/react-dialog";
|
|
2307
|
-
import React31 from "react";
|
|
2308
|
-
import { ThemeContext as ThemeContext3, useId as useId6 } from "@dxos/react-components";
|
|
2309
|
-
function _extends27() {
|
|
2310
|
-
_extends27 = Object.assign || function(target) {
|
|
2311
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2312
|
-
var source = arguments[i];
|
|
2313
|
-
for (var key in source) {
|
|
2314
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2315
|
-
target[key] = source[key];
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
return target;
|
|
2320
|
-
};
|
|
2321
|
-
return _extends27.apply(this, arguments);
|
|
2322
|
-
}
|
|
2323
|
-
var DevicesDialog = ({ slots, ...devicesDialogProps }) => {
|
|
2324
|
-
const titleId = useId6("spaceDialog__title");
|
|
2325
|
-
return /* @__PURE__ */ React31.createElement(PanelDialog, _extends27({}, {
|
|
2326
|
-
slots: {
|
|
2327
|
-
...slots,
|
|
2328
|
-
root: {
|
|
2329
|
-
onOpenChange: (open) => {
|
|
2330
|
-
var _a;
|
|
2331
|
-
return open || ((_a = devicesDialogProps.onDone) == null ? void 0 : _a.call(devicesDialogProps));
|
|
2332
|
-
},
|
|
2333
|
-
...slots == null ? void 0 : slots.root
|
|
2334
|
-
}
|
|
2335
|
-
},
|
|
2336
|
-
titleId
|
|
2337
|
-
}), /* @__PURE__ */ React31.createElement(ThemeContext3.Provider, {
|
|
2338
|
-
value: {
|
|
2339
|
-
themeVariant: "os"
|
|
2340
|
-
}
|
|
2341
|
-
}, /* @__PURE__ */ React31.createElement(DevicesPanel, _extends27({}, {
|
|
2342
|
-
...devicesDialogProps,
|
|
2343
|
-
titleId,
|
|
2344
|
-
doneActionParent: /* @__PURE__ */ React31.createElement(Close, {
|
|
2345
|
-
asChild: true
|
|
2346
|
-
})
|
|
2347
|
-
}))));
|
|
2348
|
-
};
|
|
2349
|
-
|
|
2350
|
-
// packages/apps/patterns/react-ui/src/composites/SpaceDialog/SpaceDialog.tsx
|
|
2351
|
-
import { Close as Close2 } from "@radix-ui/react-dialog";
|
|
2352
|
-
import React32 from "react";
|
|
2353
|
-
import { ThemeContext as ThemeContext4, useId as useId7 } from "@dxos/react-components";
|
|
2354
|
-
function _extends28() {
|
|
2355
|
-
_extends28 = Object.assign || function(target) {
|
|
2356
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2357
|
-
var source = arguments[i];
|
|
2358
|
-
for (var key in source) {
|
|
2359
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2360
|
-
target[key] = source[key];
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
return target;
|
|
2365
|
-
};
|
|
2366
|
-
return _extends28.apply(this, arguments);
|
|
2367
|
-
}
|
|
2368
|
-
var SpaceDialog = ({ slots, ...spacePanelProps }) => {
|
|
2369
|
-
const titleId = useId7("spaceDialog__title");
|
|
2370
|
-
return /* @__PURE__ */ React32.createElement(PanelDialog, _extends28({}, {
|
|
2371
|
-
slots: {
|
|
2372
|
-
...slots,
|
|
2373
|
-
root: {
|
|
2374
|
-
onOpenChange: (open) => {
|
|
2375
|
-
var _a;
|
|
2376
|
-
return open || ((_a = spacePanelProps.onDone) == null ? void 0 : _a.call(spacePanelProps, null));
|
|
2377
|
-
},
|
|
2378
|
-
...slots == null ? void 0 : slots.root
|
|
2379
|
-
}
|
|
2380
|
-
},
|
|
2381
|
-
titleId
|
|
2382
|
-
}), /* @__PURE__ */ React32.createElement(ThemeContext4.Provider, {
|
|
2383
|
-
value: {
|
|
2384
|
-
themeVariant: "os"
|
|
2385
|
-
}
|
|
2386
|
-
}, /* @__PURE__ */ React32.createElement(SpacePanel, _extends28({}, {
|
|
2387
|
-
...spacePanelProps,
|
|
2388
|
-
titleId,
|
|
2389
|
-
doneActionParent: /* @__PURE__ */ React32.createElement(Close2, {
|
|
2390
|
-
asChild: true
|
|
2391
|
-
})
|
|
2392
|
-
}))));
|
|
2393
|
-
};
|
|
2394
|
-
|
|
2395
|
-
// packages/apps/patterns/react-ui/src/composites/Shell/Shell.tsx
|
|
2396
|
-
var Shell = ({ runtime, origin }) => {
|
|
2397
|
-
const [{ layout, invitationCode, spaceKey }, setLayout] = useState7({
|
|
2398
|
-
layout: runtime.layout,
|
|
2399
|
-
invitationCode: runtime.invitationCode,
|
|
2400
|
-
spaceKey: runtime.spaceKey
|
|
2401
|
-
});
|
|
2402
|
-
const client = useClient8();
|
|
2403
|
-
const spaces = useSpaces2();
|
|
2404
|
-
const space = useSpace3(spaceKey);
|
|
2405
|
-
useEffect2(() => {
|
|
2406
|
-
return runtime.layoutUpdate.on((request) => setLayout(request));
|
|
2407
|
-
}, []);
|
|
2408
|
-
switch (layout) {
|
|
2409
|
-
case ShellLayout.AUTH:
|
|
2410
|
-
return /* @__PURE__ */ React33.createElement(JoinDialog, {
|
|
2411
|
-
mode: "halo-only",
|
|
2412
|
-
initialInvitationCode: invitationCode,
|
|
2413
|
-
onDone: async () => {
|
|
2414
|
-
var _a;
|
|
2415
|
-
const space2 = (_a = spaces[0]) != null ? _a : await client.echo.createSpace();
|
|
2416
|
-
await runtime.setAppContext({
|
|
2417
|
-
display: ShellDisplay.NONE,
|
|
2418
|
-
spaceKey: space2.key
|
|
2419
|
-
});
|
|
2420
|
-
runtime.setLayout(ShellLayout.DEFAULT);
|
|
2421
|
-
}
|
|
2422
|
-
});
|
|
2423
|
-
case ShellLayout.CURRENT_SPACE:
|
|
2424
|
-
case ShellLayout.SPACE_LIST:
|
|
2425
|
-
return /* @__PURE__ */ React33.createElement(SpaceDialog, {
|
|
2426
|
-
space,
|
|
2427
|
-
initialState: layout === ShellLayout.SPACE_LIST ? "space list" : "current space",
|
|
2428
|
-
createInvitationUrl: (invitationCode2) => `${origin}?spaceInvitationCode=${invitationCode2}`,
|
|
2429
|
-
onClickJoinSpace: () => runtime.setLayout(ShellLayout.JOIN_SPACE, {
|
|
2430
|
-
spaceKey: space == null ? void 0 : space.key
|
|
2431
|
-
}),
|
|
2432
|
-
onClickMember: () => runtime.setLayout(ShellLayout.DEVICES_LIST, {
|
|
2433
|
-
spaceKey: space == null ? void 0 : space.key
|
|
2434
|
-
}),
|
|
2435
|
-
onDone: async (space2) => {
|
|
2436
|
-
await runtime.setAppContext({
|
|
2437
|
-
display: ShellDisplay.NONE,
|
|
2438
|
-
spaceKey: space2 ? space2.key : spaceKey
|
|
2439
|
-
});
|
|
2440
|
-
runtime.setLayout(ShellLayout.DEFAULT);
|
|
2441
|
-
}
|
|
2442
|
-
});
|
|
2443
|
-
case ShellLayout.JOIN_SPACE:
|
|
2444
|
-
return /* @__PURE__ */ React33.createElement(JoinDialog, {
|
|
2445
|
-
initialInvitationCode: invitationCode,
|
|
2446
|
-
onDone: async (result) => {
|
|
2447
|
-
var _a;
|
|
2448
|
-
await runtime.setAppContext({
|
|
2449
|
-
display: ShellDisplay.NONE,
|
|
2450
|
-
spaceKey: (_a = result == null ? void 0 : result.spaceKey) != null ? _a : void 0
|
|
2451
|
-
});
|
|
2452
|
-
runtime.setLayout(ShellLayout.DEFAULT);
|
|
2453
|
-
},
|
|
2454
|
-
onExit: async () => {
|
|
2455
|
-
await runtime.setAppContext({
|
|
2456
|
-
display: ShellDisplay.NONE,
|
|
2457
|
-
spaceKey: runtime.spaceKey
|
|
2458
|
-
});
|
|
2459
|
-
runtime.setLayout(ShellLayout.DEFAULT);
|
|
2460
|
-
}
|
|
2461
|
-
});
|
|
2462
|
-
case ShellLayout.DEVICES_LIST:
|
|
2463
|
-
return /* @__PURE__ */ React33.createElement(DevicesDialog, {
|
|
2464
|
-
createInvitationUrl: (invitationCode2) => `${origin}?haloInvitationCode=${invitationCode2}`,
|
|
2465
|
-
onDone: async () => {
|
|
2466
|
-
await runtime.setAppContext({
|
|
2467
|
-
display: ShellDisplay.NONE,
|
|
2468
|
-
spaceKey: runtime.spaceKey
|
|
2469
|
-
});
|
|
2470
|
-
runtime.setLayout(ShellLayout.DEFAULT);
|
|
2471
|
-
}
|
|
2472
|
-
});
|
|
2473
|
-
default:
|
|
2474
|
-
return null;
|
|
2475
|
-
}
|
|
2476
|
-
};
|
|
2477
|
-
|
|
2478
1858
|
// packages/apps/patterns/react-ui/src/translations/locales/en-US.ts
|
|
2479
1859
|
var en_US_exports = {};
|
|
2480
1860
|
__export(en_US_exports, {
|
|
@@ -2486,9 +1866,7 @@ var os = {
|
|
|
2486
1866
|
"sidebar label": "DXOS sidebar",
|
|
2487
1867
|
"copy invitation code label": "Copy",
|
|
2488
1868
|
"open share panel label": "Share",
|
|
2489
|
-
"
|
|
2490
|
-
"join space heading": "Join a space",
|
|
2491
|
-
"halo heading": "Initialize device identity",
|
|
1869
|
+
"join space heading": "<small>Joining</small><large>{{spaceTitle}}</large>",
|
|
2492
1870
|
"exit label": "Exit",
|
|
2493
1871
|
"identity selector title": "Join as",
|
|
2494
1872
|
"identity radio group title": "Select an identity you\u2019ve associated with this device already",
|
|
@@ -2496,7 +1874,6 @@ var os = {
|
|
|
2496
1874
|
"continue label": "Continue",
|
|
2497
1875
|
"back label": "Back",
|
|
2498
1876
|
"next label": "Next",
|
|
2499
|
-
"close label": "Close",
|
|
2500
1877
|
"auth choices label": "Choose an identity",
|
|
2501
1878
|
"create identity label": "Create an identity",
|
|
2502
1879
|
"create identity description": "Create a new identity.",
|
|
@@ -2526,16 +1903,8 @@ var os = {
|
|
|
2526
1903
|
"cancel label": "Cancel",
|
|
2527
1904
|
"done label": "Done",
|
|
2528
1905
|
"reset label": "Start over",
|
|
2529
|
-
"
|
|
2530
|
-
"invitation input label": "Paste an invitation code or URL"
|
|
2531
|
-
"create space invitation label": "Invite",
|
|
2532
|
-
"qr label": "Scan to accept invitation",
|
|
2533
|
-
"empty invitations message": "No pending invitations",
|
|
2534
|
-
"show all spaces label": "All spaces",
|
|
2535
|
-
"all spaces label": "All spaces",
|
|
2536
|
-
"create space label": "Create a new space",
|
|
2537
|
-
"join space label": "Join a space",
|
|
2538
|
-
"show current space label": "Current space"
|
|
1906
|
+
"pin input label": "The PIN provided by the invitation sender",
|
|
1907
|
+
"invitation input label": "Paste an invitation code or URL"
|
|
2539
1908
|
};
|
|
2540
1909
|
|
|
2541
1910
|
// packages/apps/patterns/react-ui/src/translations/index.ts
|
|
@@ -2543,8 +1912,6 @@ var osTranslations = {
|
|
|
2543
1912
|
"en-US": en_US_exports
|
|
2544
1913
|
};
|
|
2545
1914
|
export {
|
|
2546
|
-
DeviceList,
|
|
2547
|
-
DevicesPanel,
|
|
2548
1915
|
IdentityListItem,
|
|
2549
1916
|
IdentityPanel,
|
|
2550
1917
|
IdentityPopover,
|
|
@@ -2555,17 +1922,12 @@ export {
|
|
|
2555
1922
|
JoinDialog,
|
|
2556
1923
|
JoinPanel,
|
|
2557
1924
|
PanelAlertDialog,
|
|
2558
|
-
PanelDialog,
|
|
2559
1925
|
PanelPopover,
|
|
2560
1926
|
PanelSeparator,
|
|
2561
1927
|
PanelSidebarContext,
|
|
2562
1928
|
PanelSidebarProvider,
|
|
2563
|
-
Shell,
|
|
2564
|
-
SpaceDialog,
|
|
2565
|
-
SpaceListItem,
|
|
2566
1929
|
SpaceMemberList,
|
|
2567
1930
|
SpaceMemberListContainer,
|
|
2568
|
-
SpacePanel,
|
|
2569
1931
|
activeBgColor,
|
|
2570
1932
|
activeStrokeColor,
|
|
2571
1933
|
activeTextColor,
|
|
@@ -2573,8 +1935,6 @@ export {
|
|
|
2573
1935
|
cancelledStrokeColor,
|
|
2574
1936
|
cancelledTextColor,
|
|
2575
1937
|
defaultArrow,
|
|
2576
|
-
defaultDialogContent,
|
|
2577
|
-
defaultOverlay,
|
|
2578
1938
|
defaultSurface,
|
|
2579
1939
|
errorBgColor,
|
|
2580
1940
|
errorStrokeColor,
|