@dxos/shell 0.4.7-next.f4b92be → 0.4.8-main.ac78619
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/shell.mjs +63103 -62927
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +78 -77
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +116 -81
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/types/src/components/InvitationList/InvitationListItem.d.ts.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationListItem.js +15 -4
- package/dist/types/src/components/InvitationList/InvitationListItem.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +3 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +2 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -1
- package/dist/types/src/panels/Panels.stories.d.ts.map +1 -1
- package/dist/types/src/panels/Panels.stories.js +1 -3
- package/dist/types/src/panels/Panels.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +18 -1
- package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.d.ts.map +1 -1
- package/dist/types/src/stories/Invitations.e2e-stories.js +3 -2
- package/dist/types/src/stories/Invitations.e2e-stories.js.map +1 -1
- package/package.json +21 -20
- package/src/components/InvitationList/InvitationListItem.tsx +25 -11
- package/src/panels/IdentityPanel/IdentityPanel.tsx +1 -1
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +3 -1
- package/src/panels/IdentityPanel/useAgentHandlers.ts +2 -1
- package/src/panels/Panels.stories.tsx +1 -3
- package/src/panels/SpacePanel/steps/SpaceManager.tsx +18 -1
- package/src/stories/Invitations.e2e-stories.tsx +3 -2
|
@@ -385,6 +385,7 @@ var SpaceMemberListImpl = ({ members, onSelect }) => {
|
|
|
385
385
|
|
|
386
386
|
// packages/sdk/shell/src/components/InvitationList/InvitationListItem.tsx
|
|
387
387
|
import { X } from "@phosphor-icons/react";
|
|
388
|
+
import { formatDistanceToNow } from "date-fns";
|
|
388
389
|
import React10, { useCallback as useCallback2 } from "react";
|
|
389
390
|
import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
|
|
390
391
|
import { Button as Button4, ListItem as ListItem2, useTranslation as useTranslation6, Avatar as Avatar2, useThemeContext as useThemeContext3, Tooltip as Tooltip4 } from "@dxos/react-ui";
|
|
@@ -471,6 +472,10 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
471
472
|
]);
|
|
472
473
|
const invitationUrl = invitationCode && createInvitationUrl(invitationCode);
|
|
473
474
|
const invitationId = invitation?.get().invitationId;
|
|
475
|
+
const invitationHasLifetime = invitation?.get().lifetime;
|
|
476
|
+
const invitationTimeLeft = invitation?.expiry ? formatDistanceToNow(invitation?.expiry, {
|
|
477
|
+
addSuffix: true
|
|
478
|
+
}) : void 0;
|
|
474
479
|
const avatarAnimation = [
|
|
475
480
|
Invitation.State.INIT,
|
|
476
481
|
Invitation.State.CONNECTING,
|
|
@@ -520,7 +525,9 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
520
525
|
})))), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
|
|
521
526
|
side: "left",
|
|
522
527
|
classNames: "z-[70]"
|
|
523
|
-
}, t(type === Invitation.Type.MULTIUSE ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React10.createElement(Tooltip4.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
528
|
+
}, t(type === Invitation.Type.MULTIUSE ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React10.createElement(Tooltip4.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React10.createElement(Tooltip4.Root, null, /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Tooltip4.Trigger, {
|
|
529
|
+
asChild: true
|
|
530
|
+
}, /* @__PURE__ */ React10.createElement(Button4, {
|
|
524
531
|
variant: "ghost",
|
|
525
532
|
classNames: "grow justify-start font-medium",
|
|
526
533
|
onClick: () => send({
|
|
@@ -528,10 +535,13 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
|
|
|
528
535
|
invitation
|
|
529
536
|
}),
|
|
530
537
|
"data-testid": "show-qrcode"
|
|
531
|
-
}, /* @__PURE__ */ React10.createElement("span", null, t("open share panel label"))), /* @__PURE__ */ React10.createElement(CopyButtonIconOnly, {
|
|
538
|
+
}, /* @__PURE__ */ React10.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React10.createElement(CopyButtonIconOnly, {
|
|
532
539
|
variant: "ghost",
|
|
533
540
|
value: invitationUrl
|
|
534
|
-
}))
|
|
541
|
+
})), /* @__PURE__ */ React10.createElement(Tooltip4.Portal, null, /* @__PURE__ */ React10.createElement(Tooltip4.Content, {
|
|
542
|
+
side: "left",
|
|
543
|
+
classNames: "z-[70]"
|
|
544
|
+
}, invitationHasLifetime && /* @__PURE__ */ React10.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React10.createElement(AuthCode, {
|
|
535
545
|
code: authCode,
|
|
536
546
|
classNames: "grow"
|
|
537
547
|
}) : invitationStatus === Invitation.State.CONNECTING ? /* @__PURE__ */ React10.createElement("span", {
|
|
@@ -908,7 +918,7 @@ import { Dialog, useId as useId9 } from "@dxos/react-ui";
|
|
|
908
918
|
// packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
|
|
909
919
|
import React29, { useEffect as useEffect3, useMemo as useMemo3 } from "react";
|
|
910
920
|
import { generateName as generateName3 } from "@dxos/display-name";
|
|
911
|
-
import { log as
|
|
921
|
+
import { log as log5 } from "@dxos/log";
|
|
912
922
|
import { useClient as useClient3 } from "@dxos/react-client";
|
|
913
923
|
import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
|
|
914
924
|
import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
|
|
@@ -1098,11 +1108,13 @@ var DeviceManager = ({ devices, active, send }) => {
|
|
|
1098
1108
|
// packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx
|
|
1099
1109
|
import { CaretRight, Devices, Plus, Power, UserGear, HardDrive } from "@phosphor-icons/react";
|
|
1100
1110
|
import React25, { useCallback as useCallback4 } from "react";
|
|
1111
|
+
import { log as log2 } from "@dxos/log";
|
|
1101
1112
|
import { useAgentHostingProviderClient, useClient as useClient2 } from "@dxos/react-client";
|
|
1102
1113
|
import { useHaloInvitations } from "@dxos/react-client/halo";
|
|
1103
1114
|
import { Invitation as Invitation2, InvitationEncoder } from "@dxos/react-client/invitations";
|
|
1104
1115
|
import { DensityProvider, useTranslation as useTranslation11 } from "@dxos/react-ui";
|
|
1105
1116
|
import { getSize as getSize8 } from "@dxos/react-ui-theme";
|
|
1117
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx";
|
|
1106
1118
|
var IdentityActionChooser = (props) => {
|
|
1107
1119
|
const { send } = props;
|
|
1108
1120
|
const client = useClient2();
|
|
@@ -1111,10 +1123,15 @@ var IdentityActionChooser = (props) => {
|
|
|
1111
1123
|
const onInvitationEvent = useCallback4((invitation) => {
|
|
1112
1124
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
1113
1125
|
if (invitation.state === Invitation2.State.CONNECTING) {
|
|
1114
|
-
|
|
1126
|
+
log2.info(JSON.stringify({
|
|
1115
1127
|
invitationCode,
|
|
1116
1128
|
authCode: invitation.authCode
|
|
1117
|
-
})
|
|
1129
|
+
}), void 0, {
|
|
1130
|
+
F: __dxlog_file2,
|
|
1131
|
+
L: 28,
|
|
1132
|
+
S: void 0,
|
|
1133
|
+
C: (f, a) => f(...a)
|
|
1134
|
+
});
|
|
1118
1135
|
}
|
|
1119
1136
|
}, []);
|
|
1120
1137
|
const createInvitation = (e) => {
|
|
@@ -1216,18 +1233,18 @@ var IdentityActionChooserImpl = ({ onCreateInvitationClick, active, send, onDone
|
|
|
1216
1233
|
|
|
1217
1234
|
// packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
|
|
1218
1235
|
import React26, { useState as useState4 } from "react";
|
|
1219
|
-
import { log as
|
|
1236
|
+
import { log as log3 } from "@dxos/log";
|
|
1220
1237
|
import { useTranslation as useTranslation12 } from "@dxos/react-ui";
|
|
1221
1238
|
import { hexToEmoji as hexToEmoji2, hexToHue } from "@dxos/util";
|
|
1222
|
-
var
|
|
1239
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx";
|
|
1223
1240
|
var ProfileForm = (props) => {
|
|
1224
1241
|
const { onUpdateProfile } = props;
|
|
1225
1242
|
const { t } = useTranslation12("os");
|
|
1226
1243
|
const [validationMessage, setValidationMessage] = useState4("");
|
|
1227
1244
|
const handleUpdateProfile = async (profile) => {
|
|
1228
1245
|
await onUpdateProfile?.(profile).catch((error) => {
|
|
1229
|
-
|
|
1230
|
-
F:
|
|
1246
|
+
log3.catch(error, void 0, {
|
|
1247
|
+
F: __dxlog_file3,
|
|
1231
1248
|
L: 33,
|
|
1232
1249
|
S: void 0,
|
|
1233
1250
|
C: (f, a) => f(...a)
|
|
@@ -1363,9 +1380,10 @@ var SignOutChooserImpl = ({ disabled, onResetDevice, onJoinNewIdentity, onBack }
|
|
|
1363
1380
|
// packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts
|
|
1364
1381
|
import { useCallback as useCallback5, useEffect as useEffect2, useState as useState5 } from "react";
|
|
1365
1382
|
import { invariant } from "@dxos/invariant";
|
|
1383
|
+
import { log as log4 } from "@dxos/log";
|
|
1366
1384
|
import { useAgentHostingProviderClient as useAgentHostingProviderClient2 } from "@dxos/react-client";
|
|
1367
1385
|
import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
|
|
1368
|
-
var
|
|
1386
|
+
var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useAgentHandlers.ts";
|
|
1369
1387
|
var useAgentHandlers = ({ client, invitations, identity }) => {
|
|
1370
1388
|
const [validationMessage, setValidationMessage] = useState5("");
|
|
1371
1389
|
const [agentStatus, setAgentStatus] = useState5("");
|
|
@@ -1391,14 +1409,19 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
|
|
|
1391
1409
|
const handleAgentCreate = useCallback5(async (invitation) => {
|
|
1392
1410
|
const invitationCode = InvitationEncoder2.encode(invitation);
|
|
1393
1411
|
if (invitation.state === Invitation3.State.CONNECTING) {
|
|
1394
|
-
|
|
1412
|
+
log4.info(JSON.stringify({
|
|
1395
1413
|
invitationCode,
|
|
1396
1414
|
authCode: invitation.authCode
|
|
1397
|
-
})
|
|
1398
|
-
|
|
1399
|
-
F: __dxlog_file3,
|
|
1415
|
+
}), void 0, {
|
|
1416
|
+
F: __dxlog_file4,
|
|
1400
1417
|
L: 50,
|
|
1401
1418
|
S: void 0,
|
|
1419
|
+
C: (f, a) => f(...a)
|
|
1420
|
+
});
|
|
1421
|
+
invariant(identity, "Identity not found", {
|
|
1422
|
+
F: __dxlog_file4,
|
|
1423
|
+
L: 51,
|
|
1424
|
+
S: void 0,
|
|
1402
1425
|
A: [
|
|
1403
1426
|
"identity",
|
|
1404
1427
|
"'Identity not found'"
|
|
@@ -1427,8 +1450,8 @@ var useAgentHandlers = ({ client, invitations, identity }) => {
|
|
|
1427
1450
|
const onAgentDestroy = async () => {
|
|
1428
1451
|
const identity2 = client.halo.identity.get();
|
|
1429
1452
|
invariant(identity2, "Identity not found", {
|
|
1430
|
-
F:
|
|
1431
|
-
L:
|
|
1453
|
+
F: __dxlog_file4,
|
|
1454
|
+
L: 77,
|
|
1432
1455
|
S: void 0,
|
|
1433
1456
|
A: [
|
|
1434
1457
|
"identity",
|
|
@@ -1581,7 +1604,7 @@ var InvitationManager = ({ invitationUrl, active, send, status, type, authCode,
|
|
|
1581
1604
|
};
|
|
1582
1605
|
|
|
1583
1606
|
// packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx
|
|
1584
|
-
var
|
|
1607
|
+
var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/IdentityPanel.tsx";
|
|
1585
1608
|
var viewStyles = "pbs-1 pbe-3 pli-3";
|
|
1586
1609
|
var IdentityHeading = ({ titleId, title, identity, onDone }) => {
|
|
1587
1610
|
const fallbackValue = keyToFallback2(identity.identityKey);
|
|
@@ -1693,14 +1716,19 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1693
1716
|
invitations
|
|
1694
1717
|
});
|
|
1695
1718
|
if (!identity) {
|
|
1696
|
-
|
|
1719
|
+
log5.error("IdentityPanel rendered with no active identity.", void 0, {
|
|
1720
|
+
F: __dxlog_file5,
|
|
1721
|
+
L: 132,
|
|
1722
|
+
S: void 0,
|
|
1723
|
+
C: (f, a) => f(...a)
|
|
1724
|
+
});
|
|
1697
1725
|
return null;
|
|
1698
1726
|
}
|
|
1699
1727
|
const [identityState, identitySend, identityService] = useIdentityMachine(client);
|
|
1700
1728
|
useEffect3(() => {
|
|
1701
1729
|
const subscription = identityService.subscribe((state) => {
|
|
1702
|
-
|
|
1703
|
-
F:
|
|
1730
|
+
log5("[state]", state, {
|
|
1731
|
+
F: __dxlog_file5,
|
|
1704
1732
|
L: 139,
|
|
1705
1733
|
S: void 0,
|
|
1706
1734
|
C: (f, a) => f(...a)
|
|
@@ -1769,7 +1797,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
|
|
|
1769
1797
|
|
|
1770
1798
|
// packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
|
|
1771
1799
|
import React39, { useCallback as useCallback7, useEffect as useEffect5, useMemo as useMemo4 } from "react";
|
|
1772
|
-
import { log as
|
|
1800
|
+
import { log as log10 } from "@dxos/log";
|
|
1773
1801
|
import { useClient as useClient6, useMulticastObservable } from "@dxos/react-client";
|
|
1774
1802
|
import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
|
|
1775
1803
|
import { DensityProvider as DensityProvider3, useId as useId7, useThemeContext as useThemeContext4 } from "@dxos/react-ui";
|
|
@@ -1811,13 +1839,13 @@ var JoinHeading = /* @__PURE__ */ forwardRef8(({ mode, titleId, onExit, exitActi
|
|
|
1811
1839
|
import { useMachine as useMachine2 } from "@xstate/react";
|
|
1812
1840
|
import { useCallback as useCallback6 } from "react";
|
|
1813
1841
|
import { assign as assign2, createMachine as createMachine2 } from "xstate";
|
|
1814
|
-
import { log as
|
|
1842
|
+
import { log as log6 } from "@dxos/log";
|
|
1815
1843
|
import { AlreadyJoinedError } from "@dxos/react-client";
|
|
1816
1844
|
import { Invitation as Invitation6, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
|
|
1817
|
-
var
|
|
1845
|
+
var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
|
|
1818
1846
|
var getInvitationSubscribable = (Kind, invitation) => {
|
|
1819
|
-
|
|
1820
|
-
F:
|
|
1847
|
+
log6("[subscribing to invitation]", invitation, {
|
|
1848
|
+
F: __dxlog_file6,
|
|
1821
1849
|
L: 88,
|
|
1822
1850
|
S: void 0,
|
|
1823
1851
|
C: (f, a) => f(...a)
|
|
@@ -1826,11 +1854,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1826
1854
|
subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
|
|
1827
1855
|
switch (invitation2.state) {
|
|
1828
1856
|
case Invitation6.State.CONNECTING: {
|
|
1829
|
-
|
|
1857
|
+
log6("[invitation connecting]", {
|
|
1830
1858
|
Kind,
|
|
1831
1859
|
invitation: invitation2
|
|
1832
1860
|
}, {
|
|
1833
|
-
F:
|
|
1861
|
+
F: __dxlog_file6,
|
|
1834
1862
|
L: 99,
|
|
1835
1863
|
S: void 0,
|
|
1836
1864
|
C: (f, a) => f(...a)
|
|
@@ -1841,11 +1869,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1841
1869
|
});
|
|
1842
1870
|
}
|
|
1843
1871
|
case Invitation6.State.CONNECTED: {
|
|
1844
|
-
|
|
1872
|
+
log6("[invitation connected]", {
|
|
1845
1873
|
Kind,
|
|
1846
1874
|
invitation: invitation2
|
|
1847
1875
|
}, {
|
|
1848
|
-
F:
|
|
1876
|
+
F: __dxlog_file6,
|
|
1849
1877
|
L: 104,
|
|
1850
1878
|
S: void 0,
|
|
1851
1879
|
C: (f, a) => f(...a)
|
|
@@ -1856,11 +1884,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1856
1884
|
});
|
|
1857
1885
|
}
|
|
1858
1886
|
case Invitation6.State.READY_FOR_AUTHENTICATION: {
|
|
1859
|
-
|
|
1887
|
+
log6("[invitation ready for authentication]", {
|
|
1860
1888
|
Kind,
|
|
1861
1889
|
invitation: invitation2
|
|
1862
1890
|
}, {
|
|
1863
|
-
F:
|
|
1891
|
+
F: __dxlog_file6,
|
|
1864
1892
|
L: 109,
|
|
1865
1893
|
S: void 0,
|
|
1866
1894
|
C: (f, a) => f(...a)
|
|
@@ -1871,11 +1899,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1871
1899
|
});
|
|
1872
1900
|
}
|
|
1873
1901
|
case Invitation6.State.AUTHENTICATING: {
|
|
1874
|
-
|
|
1902
|
+
log6("[invitation authenticating]", {
|
|
1875
1903
|
Kind,
|
|
1876
1904
|
invitation: invitation2
|
|
1877
1905
|
}, {
|
|
1878
|
-
F:
|
|
1906
|
+
F: __dxlog_file6,
|
|
1879
1907
|
L: 114,
|
|
1880
1908
|
S: void 0,
|
|
1881
1909
|
C: (f, a) => f(...a)
|
|
@@ -1886,11 +1914,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1886
1914
|
});
|
|
1887
1915
|
}
|
|
1888
1916
|
case Invitation6.State.SUCCESS: {
|
|
1889
|
-
|
|
1917
|
+
log6("[invitation success]", {
|
|
1890
1918
|
Kind,
|
|
1891
1919
|
invitation: invitation2
|
|
1892
1920
|
}, {
|
|
1893
|
-
F:
|
|
1921
|
+
F: __dxlog_file6,
|
|
1894
1922
|
L: 119,
|
|
1895
1923
|
S: void 0,
|
|
1896
1924
|
C: (f, a) => f(...a)
|
|
@@ -1902,10 +1930,10 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1902
1930
|
return complete?.();
|
|
1903
1931
|
}
|
|
1904
1932
|
case Invitation6.State.CANCELLED: {
|
|
1905
|
-
|
|
1933
|
+
log6.warn("[invitation cancelled]", {
|
|
1906
1934
|
Kind
|
|
1907
1935
|
}, {
|
|
1908
|
-
F:
|
|
1936
|
+
F: __dxlog_file6,
|
|
1909
1937
|
L: 125,
|
|
1910
1938
|
S: void 0,
|
|
1911
1939
|
C: (f, a) => f(...a)
|
|
@@ -1916,10 +1944,10 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1916
1944
|
});
|
|
1917
1945
|
}
|
|
1918
1946
|
case Invitation6.State.TIMEOUT: {
|
|
1919
|
-
|
|
1947
|
+
log6.error("[invitation timeout]", {
|
|
1920
1948
|
Kind
|
|
1921
1949
|
}, {
|
|
1922
|
-
F:
|
|
1950
|
+
F: __dxlog_file6,
|
|
1923
1951
|
L: 130,
|
|
1924
1952
|
S: void 0,
|
|
1925
1953
|
C: (f, a) => f(...a)
|
|
@@ -1932,11 +1960,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1932
1960
|
}
|
|
1933
1961
|
}, (error) => {
|
|
1934
1962
|
if (error instanceof AlreadyJoinedError) {
|
|
1935
|
-
|
|
1963
|
+
log6("[already joined]", {
|
|
1936
1964
|
Kind,
|
|
1937
1965
|
error
|
|
1938
1966
|
}, {
|
|
1939
|
-
F:
|
|
1967
|
+
F: __dxlog_file6,
|
|
1940
1968
|
L: 137,
|
|
1941
1969
|
S: void 0,
|
|
1942
1970
|
C: (f, a) => f(...a)
|
|
@@ -1947,11 +1975,11 @@ var getInvitationSubscribable = (Kind, invitation) => {
|
|
|
1947
1975
|
});
|
|
1948
1976
|
return complete?.();
|
|
1949
1977
|
}
|
|
1950
|
-
|
|
1978
|
+
log6.error("[invitation errored]", {
|
|
1951
1979
|
Kind,
|
|
1952
1980
|
error
|
|
1953
1981
|
}, {
|
|
1954
|
-
F:
|
|
1982
|
+
F: __dxlog_file6,
|
|
1955
1983
|
L: 142,
|
|
1956
1984
|
S: void 0,
|
|
1957
1985
|
C: (f, a) => f(...a)
|
|
@@ -2271,12 +2299,12 @@ var joinMachine = createMachine2({
|
|
|
2271
2299
|
} : context.space
|
|
2272
2300
|
}),
|
|
2273
2301
|
log: (context, event) => {
|
|
2274
|
-
|
|
2302
|
+
log6("[transition]", {
|
|
2275
2303
|
event,
|
|
2276
2304
|
haloInvitation: context.halo.invitation,
|
|
2277
2305
|
spaceInvitation: context.space.invitation
|
|
2278
2306
|
}, {
|
|
2279
|
-
F:
|
|
2307
|
+
F: __dxlog_file6,
|
|
2280
2308
|
L: 406,
|
|
2281
2309
|
S: void 0,
|
|
2282
2310
|
C: (f, a) => f(...a)
|
|
@@ -2289,8 +2317,8 @@ var defaultCodeFromUrl = (invitationType, text) => {
|
|
|
2289
2317
|
const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
|
|
2290
2318
|
return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
|
|
2291
2319
|
} catch (err) {
|
|
2292
|
-
|
|
2293
|
-
F:
|
|
2320
|
+
log6.catch(err, void 0, {
|
|
2321
|
+
F: __dxlog_file6,
|
|
2294
2322
|
L: 433,
|
|
2295
2323
|
S: void 0,
|
|
2296
2324
|
C: (f, a) => f(...a)
|
|
@@ -2310,8 +2338,8 @@ var useJoinMachine = (client, options) => {
|
|
|
2310
2338
|
invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
|
|
2311
2339
|
};
|
|
2312
2340
|
} catch (err) {
|
|
2313
|
-
|
|
2314
|
-
F:
|
|
2341
|
+
log6.error("Could not redeem device invitation code", err, {
|
|
2342
|
+
F: __dxlog_file6,
|
|
2315
2343
|
L: 454,
|
|
2316
2344
|
S: void 0,
|
|
2317
2345
|
C: (f, a) => f(...a)
|
|
@@ -2335,8 +2363,8 @@ var useJoinMachine = (client, options) => {
|
|
|
2335
2363
|
invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
|
|
2336
2364
|
};
|
|
2337
2365
|
} catch (err) {
|
|
2338
|
-
|
|
2339
|
-
F:
|
|
2366
|
+
log6.error("Could not redeem space invitation code", err, {
|
|
2367
|
+
F: __dxlog_file6,
|
|
2340
2368
|
L: 476,
|
|
2341
2369
|
S: void 0,
|
|
2342
2370
|
C: (f, a) => f(...a)
|
|
@@ -2501,10 +2529,10 @@ var IdentityAdded = (props) => {
|
|
|
2501
2529
|
|
|
2502
2530
|
// packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
|
|
2503
2531
|
import React33, { useState as useState6 } from "react";
|
|
2504
|
-
import { log as
|
|
2532
|
+
import { log as log7 } from "@dxos/log";
|
|
2505
2533
|
import { useClient as useClient4 } from "@dxos/react-client";
|
|
2506
2534
|
import { useTranslation as useTranslation19 } from "@dxos/react-ui";
|
|
2507
|
-
var
|
|
2535
|
+
var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
|
|
2508
2536
|
var IdentityInput = (props) => {
|
|
2509
2537
|
const { send, method } = props;
|
|
2510
2538
|
const isRecover = method === "recover identity";
|
|
@@ -2520,8 +2548,8 @@ var IdentityInput = (props) => {
|
|
|
2520
2548
|
identity
|
|
2521
2549
|
});
|
|
2522
2550
|
}, (error) => {
|
|
2523
|
-
|
|
2524
|
-
F:
|
|
2551
|
+
log7.catch(error, void 0, {
|
|
2552
|
+
F: __dxlog_file7,
|
|
2525
2553
|
L: 37,
|
|
2526
2554
|
S: void 0,
|
|
2527
2555
|
C: (f, a) => f(...a)
|
|
@@ -2590,17 +2618,17 @@ var InvitationAccepted = (props) => {
|
|
|
2590
2618
|
|
|
2591
2619
|
// packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
|
|
2592
2620
|
import React35, { useState as useState7, useEffect as useEffect4, cloneElement as cloneElement4 } from "react";
|
|
2593
|
-
import { log as
|
|
2621
|
+
import { log as log8 } from "@dxos/log";
|
|
2594
2622
|
import { useTranslation as useTranslation21 } from "@dxos/react-ui";
|
|
2595
|
-
var
|
|
2623
|
+
var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
|
|
2596
2624
|
var invitationCodeFromUrl = (text) => {
|
|
2597
2625
|
try {
|
|
2598
2626
|
const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
|
|
2599
2627
|
const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
|
|
2600
2628
|
return invitation ?? text;
|
|
2601
2629
|
} catch (err) {
|
|
2602
|
-
|
|
2603
|
-
F:
|
|
2630
|
+
log8.catch(err, void 0, {
|
|
2631
|
+
F: __dxlog_file8,
|
|
2604
2632
|
L: 25,
|
|
2605
2633
|
S: void 0,
|
|
2606
2634
|
C: (f, a) => f(...a)
|
|
@@ -2784,10 +2812,10 @@ var InvitationAuthenticator = ({ failed, Kind, active, pending, invitationId, on
|
|
|
2784
2812
|
|
|
2785
2813
|
// packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx
|
|
2786
2814
|
import React38, { useState as useState9 } from "react";
|
|
2787
|
-
import { log as
|
|
2815
|
+
import { log as log9 } from "@dxos/log";
|
|
2788
2816
|
import { useClient as useClient5 } from "@dxos/react-client";
|
|
2789
2817
|
import { useTranslation as useTranslation24 } from "@dxos/react-ui";
|
|
2790
|
-
var
|
|
2818
|
+
var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/ResetIdentity.tsx";
|
|
2791
2819
|
var ResetIdentity = ({ send, active }) => {
|
|
2792
2820
|
const client = useClient5();
|
|
2793
2821
|
const { t } = useTranslation24("os");
|
|
@@ -2798,8 +2826,8 @@ var ResetIdentity = ({ send, active }) => {
|
|
|
2798
2826
|
void client.reset().then(() => send?.({
|
|
2799
2827
|
type: "resetIdentity"
|
|
2800
2828
|
}), (error) => {
|
|
2801
|
-
|
|
2802
|
-
F:
|
|
2829
|
+
log9.catch(error, void 0, {
|
|
2830
|
+
F: __dxlog_file9,
|
|
2803
2831
|
L: 35,
|
|
2804
2832
|
S: void 0,
|
|
2805
2833
|
C: (f, a) => f(...a)
|
|
@@ -2865,7 +2893,7 @@ var resolvedBgColor = (status) => status === Invitation7.State.ERROR ? errorBgCo
|
|
|
2865
2893
|
var resolvedTextColor = (status) => status === Invitation7.State.ERROR ? errorTextColor : status === Invitation7.State.CANCELLED || status === Invitation7.State.TIMEOUT ? cancelledTextColor : successTextColor;
|
|
2866
2894
|
|
|
2867
2895
|
// packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
|
|
2868
|
-
var
|
|
2896
|
+
var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx";
|
|
2869
2897
|
var JoinPanelImpl = (props) => {
|
|
2870
2898
|
const { titleId, send, activeView, failed, mode, unredeemedCodes, invitationStates, succeededKeys, failReasons, onExit, onHaloDone, onSpaceDone, exitActionParent, doneActionParent, onHaloInvitationCancel, onSpaceInvitationCancel, onHaloInvitationAuthenticate, onSpaceInvitationAuthenticate, IdentityInput: IdentityInputComponent = IdentityInput, ResetIdentity: ResetIdentityComponent = ResetIdentity } = props;
|
|
2871
2899
|
return /* @__PURE__ */ React39.createElement(DensityProvider3, {
|
|
@@ -3024,8 +3052,8 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
|
|
|
3024
3052
|
});
|
|
3025
3053
|
useEffect5(() => {
|
|
3026
3054
|
const subscription = joinService.subscribe((state) => {
|
|
3027
|
-
|
|
3028
|
-
F:
|
|
3055
|
+
log10("[state]", state, {
|
|
3056
|
+
F: __dxlog_file10,
|
|
3029
3057
|
L: 198,
|
|
3030
3058
|
S: void 0,
|
|
3031
3059
|
C: (f, a) => f(...a)
|
|
@@ -3278,15 +3306,15 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialInvitationCod
|
|
|
3278
3306
|
// packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
|
|
3279
3307
|
import { Planet } from "@phosphor-icons/react";
|
|
3280
3308
|
import React41, { useEffect as useEffect6, useMemo as useMemo5 } from "react";
|
|
3281
|
-
import { log as
|
|
3309
|
+
import { log as log13 } from "@dxos/log";
|
|
3282
3310
|
import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
|
|
3283
3311
|
import { DensityProvider as DensityProvider4, useId as useId8, useTranslation as useTranslation26 } from "@dxos/react-ui";
|
|
3284
3312
|
|
|
3285
3313
|
// packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
|
|
3286
3314
|
import { useMachine as useMachine3 } from "@xstate/react";
|
|
3287
3315
|
import { assign as assign3, createMachine as createMachine3 } from "xstate";
|
|
3288
|
-
import { log as
|
|
3289
|
-
var
|
|
3316
|
+
import { log as log11 } from "@dxos/log";
|
|
3317
|
+
var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
|
|
3290
3318
|
var spaceMachine = createMachine3({
|
|
3291
3319
|
id: "space",
|
|
3292
3320
|
predictableActionArguments: true,
|
|
@@ -3323,11 +3351,11 @@ var spaceMachine = createMachine3({
|
|
|
3323
3351
|
invitation: () => void 0
|
|
3324
3352
|
}),
|
|
3325
3353
|
log: (context, event) => {
|
|
3326
|
-
|
|
3354
|
+
log11("[transition]", {
|
|
3327
3355
|
event,
|
|
3328
3356
|
context
|
|
3329
3357
|
}, {
|
|
3330
|
-
F:
|
|
3358
|
+
F: __dxlog_file11,
|
|
3331
3359
|
L: 53,
|
|
3332
3360
|
S: void 0,
|
|
3333
3361
|
C: (f, a) => f(...a)
|
|
@@ -3347,11 +3375,13 @@ var useSpaceMachine = (options) => {
|
|
|
3347
3375
|
// packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
|
|
3348
3376
|
import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
|
|
3349
3377
|
import React40, { useCallback as useCallback8, useState as useState10 } from "react";
|
|
3378
|
+
import { log as log12 } from "@dxos/log";
|
|
3350
3379
|
import { useConfig } from "@dxos/react-client";
|
|
3351
3380
|
import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
|
|
3352
3381
|
import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
|
|
3353
3382
|
import { ScrollArea, useTranslation as useTranslation25 } from "@dxos/react-ui";
|
|
3354
3383
|
import { descriptionText as descriptionText10, mx as mx22 } from "@dxos/react-ui-theme";
|
|
3384
|
+
var __dxlog_file12 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx";
|
|
3355
3385
|
var activeActionKey = "dxos:react-shell/space-manager/active-action";
|
|
3356
3386
|
var SpaceManager = (props) => {
|
|
3357
3387
|
const { space, target } = props;
|
|
@@ -3361,10 +3391,15 @@ var SpaceManager = (props) => {
|
|
|
3361
3391
|
const onInvitationEvent = useCallback8((invitation) => {
|
|
3362
3392
|
const invitationCode = InvitationEncoder4.encode(invitation);
|
|
3363
3393
|
if (invitation.state === Invitation8.State.CONNECTING) {
|
|
3364
|
-
|
|
3394
|
+
log12.info(JSON.stringify({
|
|
3365
3395
|
invitationCode,
|
|
3366
3396
|
authCode: invitation.authCode
|
|
3367
|
-
})
|
|
3397
|
+
}), void 0, {
|
|
3398
|
+
F: __dxlog_file12,
|
|
3399
|
+
L: 49,
|
|
3400
|
+
S: void 0,
|
|
3401
|
+
C: (f, a) => f(...a)
|
|
3402
|
+
});
|
|
3368
3403
|
}
|
|
3369
3404
|
}, []);
|
|
3370
3405
|
const inviteActions = {
|
|
@@ -3459,7 +3494,7 @@ var SpaceManagerImpl = (props) => {
|
|
|
3459
3494
|
};
|
|
3460
3495
|
|
|
3461
3496
|
// packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
|
|
3462
|
-
var
|
|
3497
|
+
var __dxlog_file13 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx";
|
|
3463
3498
|
var SpacePanelHeading = ({ titleId, space, onDone }) => {
|
|
3464
3499
|
const { t } = useTranslation26("os");
|
|
3465
3500
|
const name = space.properties.name;
|
|
@@ -3524,8 +3559,8 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
|
|
|
3524
3559
|
});
|
|
3525
3560
|
useEffect6(() => {
|
|
3526
3561
|
const subscription = spaceService.subscribe((state) => {
|
|
3527
|
-
|
|
3528
|
-
F:
|
|
3562
|
+
log13("[state]", state, {
|
|
3563
|
+
F: __dxlog_file13,
|
|
3529
3564
|
L: 94,
|
|
3530
3565
|
S: void 0,
|
|
3531
3566
|
C: (f, a) => f(...a)
|
|
@@ -3623,7 +3658,7 @@ import { createIFramePort } from "@dxos/rpc-tunnel";
|
|
|
3623
3658
|
|
|
3624
3659
|
// packages/sdk/shell/src/composites/Shell/Shell.tsx
|
|
3625
3660
|
import React45, { useEffect as useEffect7, useState as useState11 } from "react";
|
|
3626
|
-
import { log as
|
|
3661
|
+
import { log as log14 } from "@dxos/log";
|
|
3627
3662
|
import { ShellDisplay, ShellLayout, useClient as useClient7 } from "@dxos/react-client";
|
|
3628
3663
|
import { useSpace as useSpace2 } from "@dxos/react-client/echo";
|
|
3629
3664
|
|
|
@@ -3647,7 +3682,7 @@ var SpaceDialog = (spacePanelProps) => {
|
|
|
3647
3682
|
};
|
|
3648
3683
|
|
|
3649
3684
|
// packages/sdk/shell/src/composites/Shell/Shell.tsx
|
|
3650
|
-
var
|
|
3685
|
+
var __dxlog_file14 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/composites/Shell/Shell.tsx";
|
|
3651
3686
|
var Shell = ({ runtime, origin }) => {
|
|
3652
3687
|
const [{ layout, invitationCode, spaceKey, target }, setLayout] = useState11({
|
|
3653
3688
|
layout: runtime.layout,
|
|
@@ -3664,8 +3699,8 @@ var Shell = ({ runtime, origin }) => {
|
|
|
3664
3699
|
]);
|
|
3665
3700
|
useEffect7(() => {
|
|
3666
3701
|
if (layout === ShellLayout.SPACE && !space) {
|
|
3667
|
-
|
|
3668
|
-
F:
|
|
3702
|
+
log14.warn("No space found for shell space invitations.", void 0, {
|
|
3703
|
+
F: __dxlog_file14,
|
|
3669
3704
|
L: 32,
|
|
3670
3705
|
S: void 0,
|
|
3671
3706
|
C: (f, a) => f(...a)
|