@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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { Placeholder, UserPlus, UsersThree } from '@phosphor-icons/react';
|
|
6
6
|
import React, { type Dispatch, type SetStateAction, useCallback, useState } from 'react';
|
|
7
7
|
|
|
8
|
+
import { log } from '@dxos/log';
|
|
8
9
|
import { useConfig } from '@dxos/react-client';
|
|
9
10
|
import { useSpaceInvitations } from '@dxos/react-client/echo';
|
|
10
11
|
import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
|
|
@@ -45,7 +46,7 @@ export const SpaceManager = (props: SpaceManagerProps) => {
|
|
|
45
46
|
const onInvitationEvent = useCallback((invitation: Invitation) => {
|
|
46
47
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
47
48
|
if (invitation.state === Invitation.State.CONNECTING) {
|
|
48
|
-
|
|
49
|
+
log.info(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
49
50
|
}
|
|
50
51
|
}, []);
|
|
51
52
|
|
|
@@ -80,6 +81,22 @@ export const SpaceManager = (props: SpaceManagerProps) => {
|
|
|
80
81
|
}
|
|
81
82
|
}, [space]),
|
|
82
83
|
},
|
|
84
|
+
// inviteNonPersistent: {
|
|
85
|
+
// label: 'Invite one (nonpersistent)',
|
|
86
|
+
// description: 'Only one user may join. Invitation does not resume if client is restarted.',
|
|
87
|
+
// icon: UserPlus,
|
|
88
|
+
// onClick: useCallback(() => {
|
|
89
|
+
// const invitation = space.share?.({
|
|
90
|
+
// type: Invitation.Type.INTERACTIVE,
|
|
91
|
+
// authMethod: Invitation.AuthMethod.SHARED_SECRET,
|
|
92
|
+
// persistent: false,
|
|
93
|
+
// target,
|
|
94
|
+
// });
|
|
95
|
+
// if (invitation && config.values.runtime?.app?.env?.DX_ENVIRONMENT !== 'production') {
|
|
96
|
+
// invitation.subscribe(onInvitationEvent);
|
|
97
|
+
// }
|
|
98
|
+
// }, [space]),
|
|
99
|
+
// },
|
|
83
100
|
};
|
|
84
101
|
|
|
85
102
|
return <SpaceManagerImpl {...props} invitations={invitations} inviteActions={inviteActions} />;
|
|
@@ -7,6 +7,7 @@ import '@dxosTheme';
|
|
|
7
7
|
import { Laptop, Planet, Plus, PlusCircle, SignIn, QrCode, WifiHigh, WifiSlash } from '@phosphor-icons/react';
|
|
8
8
|
import React, { useMemo, useState } from 'react';
|
|
9
9
|
|
|
10
|
+
import { log } from '@dxos/log';
|
|
10
11
|
import { faker } from '@dxos/random';
|
|
11
12
|
import { useClient } from '@dxos/react-client';
|
|
12
13
|
import { type Space, type SpaceMember, SpaceProxy, useSpaces } from '@dxos/react-client/echo';
|
|
@@ -42,7 +43,7 @@ const Panel = ({ id, panel, setPanel }: { id: number; panel?: PanelType; setPane
|
|
|
42
43
|
invitation.subscribe((invitation) => {
|
|
43
44
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
44
45
|
if (invitation.state === Invitation.State.CONNECTING) {
|
|
45
|
-
|
|
46
|
+
log.info(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
};
|
|
@@ -126,7 +127,7 @@ const Invitations = (args: { id: number; count: number }) => {
|
|
|
126
127
|
invitation.subscribe((invitation) => {
|
|
127
128
|
const invitationCode = InvitationEncoder.encode(invitation);
|
|
128
129
|
if (invitation.state === Invitation.State.CONNECTING) {
|
|
129
|
-
|
|
130
|
+
log.info(JSON.stringify({ invitationCode, authCode: invitation.authCode }));
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
};
|