@dxos/shell 0.6.14-main.f49f251 → 0.6.14-staging.e15392e
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 +10 -10
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +1 -1
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -39
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node/chunk-Q7SFCCGT.cjs +33 -0
- package/dist/lib/node/chunk-Q7SFCCGT.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/react.cjs +4763 -0
- package/dist/lib/node/react.cjs.map +7 -0
- package/dist/lib/node/react.css +7 -0
- package/dist/lib/node/react.css.map +7 -0
- package/dist/lib/node/testing/index.cjs +181 -0
- package/dist/lib/node/testing/index.cjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react.css +7 -0
- package/dist/lib/node-esm/react.css.map +7 -0
- package/dist/lib/node-esm/react.mjs +4809 -0
- package/dist/lib/node-esm/react.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +161 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +2 -2
- package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
- package/dist/types/src/components/InvitationList/InvitationList.stories.js +10 -10
- package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +15 -15
- package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
- package/dist/types/src/playwright/invitations-manager.d.ts +1 -2
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/playwright/invitations-manager.js +2 -3
- package/dist/types/src/playwright/invitations-manager.js.map +1 -1
- package/dist/types/src/playwright/invitations.spec.js +13 -9
- package/dist/types/src/playwright/invitations.spec.js.map +1 -1
- package/dist/types/src/testing/index.d.ts +0 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/index.js +1 -1
- package/dist/types/src/testing/index.js.map +1 -1
- package/package.json +38 -27
- package/src/components/IdentityList/SpaceMemberList.stories.tsx +1 -1
- package/src/components/InvitationList/InvitationList.stories.tsx +1 -1
- package/src/panels/SpacePanel/SpacePanel.stories.tsx +1 -1
- package/src/playwright/invitations-manager.ts +2 -3
- package/src/playwright/invitations.spec.ts +14 -9
- package/src/testing/index.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAMA,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
|
|
@@ -17,7 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
|
|
20
|
+
// NOTE: Not exporting fixtures as they depend on esm-only packages.
|
|
21
21
|
__exportStar(require("./scoped-shell-manager"), exports);
|
|
22
22
|
__exportStar(require("./shell-manager"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;AAEF,oEAAoE;AAEpE,yDAAuC;AACvC,kDAAgC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/shell",
|
|
3
|
-
"version": "0.6.14-
|
|
3
|
+
"version": "0.6.14-staging.e15392e",
|
|
4
4
|
"description": "DXOS’s OS experiences",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,8 +10,19 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./dist/bundle/shell.mjs",
|
|
12
12
|
"./style.css": "./dist/bundle/style.css",
|
|
13
|
-
"./react":
|
|
14
|
-
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./dist/types/src/react.d.ts",
|
|
15
|
+
"browser": "./dist/lib/browser/react.mjs",
|
|
16
|
+
"node": "./dist/lib/node-esm/react.mjs"
|
|
17
|
+
},
|
|
18
|
+
"./testing": {
|
|
19
|
+
"types": "./dist/types/src/testing/index.d.ts",
|
|
20
|
+
"browser": "./dist/lib/browser/testing/index.mjs",
|
|
21
|
+
"node": {
|
|
22
|
+
"require": "./dist/lib/node/testing/index.cjs",
|
|
23
|
+
"default": "./dist/lib/node-esm/testing/index.mjs"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
15
26
|
},
|
|
16
27
|
"types": "dist/types/src/index.d.ts",
|
|
17
28
|
"typesVersions": {
|
|
@@ -42,18 +53,18 @@
|
|
|
42
53
|
"react-qr-rounded": "^1.0.0",
|
|
43
54
|
"url-join": "^5.0.0",
|
|
44
55
|
"xstate": "^4.37.0",
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/display-name": "0.6.14-
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/rpc-tunnel": "0.6.14-
|
|
56
|
-
"@dxos/util": "0.6.14-
|
|
56
|
+
"@dxos/async": "0.6.14-staging.e15392e",
|
|
57
|
+
"@dxos/client-services": "0.6.14-staging.e15392e",
|
|
58
|
+
"@dxos/debug": "0.6.14-staging.e15392e",
|
|
59
|
+
"@dxos/client-protocol": "0.6.14-staging.e15392e",
|
|
60
|
+
"@dxos/log": "0.6.14-staging.e15392e",
|
|
61
|
+
"@dxos/invariant": "0.6.14-staging.e15392e",
|
|
62
|
+
"@dxos/display-name": "0.6.14-staging.e15392e",
|
|
63
|
+
"@dxos/react-ui-types": "0.6.14-staging.e15392e",
|
|
64
|
+
"@dxos/protocols": "0.6.14-staging.e15392e",
|
|
65
|
+
"@dxos/rpc": "0.6.14-staging.e15392e",
|
|
66
|
+
"@dxos/rpc-tunnel": "0.6.14-staging.e15392e",
|
|
67
|
+
"@dxos/util": "0.6.14-staging.e15392e"
|
|
57
68
|
},
|
|
58
69
|
"devDependencies": {
|
|
59
70
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -63,23 +74,23 @@
|
|
|
63
74
|
"react": "~18.2.0",
|
|
64
75
|
"react-dom": "~18.2.0",
|
|
65
76
|
"vite": "5.4.7",
|
|
66
|
-
"@dxos/config": "0.6.14-
|
|
67
|
-
"@dxos/protocols": "0.6.14-
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/react-
|
|
70
|
-
"@dxos/react-
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/react-ui-theme": "0.6.14-
|
|
73
|
-
"@dxos/storybook-utils": "0.6.14-
|
|
74
|
-
"@dxos/test-utils": "0.6.14-
|
|
77
|
+
"@dxos/config": "0.6.14-staging.e15392e",
|
|
78
|
+
"@dxos/protocols": "0.6.14-staging.e15392e",
|
|
79
|
+
"@dxos/react-client": "0.6.14-staging.e15392e",
|
|
80
|
+
"@dxos/react-hooks": "0.6.14-staging.e15392e",
|
|
81
|
+
"@dxos/react-ui": "0.6.14-staging.e15392e",
|
|
82
|
+
"@dxos/random": "0.6.14-staging.e15392e",
|
|
83
|
+
"@dxos/react-ui-theme": "0.6.14-staging.e15392e",
|
|
84
|
+
"@dxos/storybook-utils": "0.6.14-staging.e15392e",
|
|
85
|
+
"@dxos/test-utils": "0.6.14-staging.e15392e"
|
|
75
86
|
},
|
|
76
87
|
"peerDependencies": {
|
|
77
88
|
"@phosphor-icons/react": "^2.1.5",
|
|
78
89
|
"react": "~18.2.0",
|
|
79
90
|
"react-dom": "~18.2.0",
|
|
80
|
-
"@dxos/react-client": "0.6.14-
|
|
81
|
-
"@dxos/react-ui": "0.6.14-
|
|
82
|
-
"@dxos/react-ui-theme": "0.6.14-
|
|
91
|
+
"@dxos/react-client": "0.6.14-staging.e15392e",
|
|
92
|
+
"@dxos/react-ui": "0.6.14-staging.e15392e",
|
|
93
|
+
"@dxos/react-ui-theme": "0.6.14-staging.e15392e"
|
|
83
94
|
},
|
|
84
95
|
"publishConfig": {
|
|
85
96
|
"access": "public"
|
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { withTheme } from '@dxos/storybook-utils';
|
|
10
10
|
|
|
11
11
|
import { SpaceMemberListImpl } from './SpaceMemberList';
|
|
12
|
-
import { alice } from '../../testing';
|
|
12
|
+
import { alice } from '../../testing/fixtures';
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: 'sdk/shell/SpaceMemberList',
|
|
@@ -10,7 +10,7 @@ import { Invitation } from '@dxos/react-client/invitations';
|
|
|
10
10
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
11
11
|
|
|
12
12
|
import { InvitationList } from './InvitationList';
|
|
13
|
-
import { inviteWithState } from '../../testing';
|
|
13
|
+
import { inviteWithState } from '../../testing/fixtures';
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
title: 'sdk/shell/InvitationList',
|
|
@@ -17,7 +17,7 @@ import { SpaceManagerImpl } from './steps';
|
|
|
17
17
|
import { InvitationListItemImpl, SpaceMemberListImpl, InvitationList } from '../../components';
|
|
18
18
|
import { StorybookDialog } from '../../components/StorybookDialog';
|
|
19
19
|
import { InvitationManager, type InvitationManagerProps } from '../../steps';
|
|
20
|
-
import { inviteWithState } from '../../testing';
|
|
20
|
+
import { inviteWithState } from '../../testing/fixtures';
|
|
21
21
|
|
|
22
22
|
const noOpProps: SpacePanelImplProps = {
|
|
23
23
|
titleId: 'storybookSpacePanel__title',
|
|
@@ -6,7 +6,6 @@ import { expect, type Browser, type ConsoleMessage } from '@playwright/test';
|
|
|
6
6
|
|
|
7
7
|
import { Trigger } from '@dxos/async';
|
|
8
8
|
import { type Invitation } from '@dxos/react-client/invitations';
|
|
9
|
-
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
10
9
|
import { setupPage } from '@dxos/test-utils/playwright';
|
|
11
10
|
|
|
12
11
|
import { ScopedShellManager } from '../testing';
|
|
@@ -56,9 +55,9 @@ export class InvitationsManager extends ScopedShellManager {
|
|
|
56
55
|
|
|
57
56
|
try {
|
|
58
57
|
await selector.waitFor({ timeout: 500 });
|
|
59
|
-
return
|
|
58
|
+
return 0;
|
|
60
59
|
} catch {
|
|
61
|
-
return
|
|
60
|
+
return 1;
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
@@ -5,11 +5,16 @@
|
|
|
5
5
|
import { expect, test } from '@playwright/test';
|
|
6
6
|
|
|
7
7
|
import { sleep } from '@dxos/async';
|
|
8
|
-
import { Invitation } from '@dxos/react-client/invitations';
|
|
9
|
-
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
10
8
|
|
|
11
9
|
import { InvitationsManager } from './invitations-manager';
|
|
12
10
|
|
|
11
|
+
// TODO(wittjosiah): Can't import these because of ESM/CJS issues.
|
|
12
|
+
// import { Invitation } from '@dxos/react-client/invitations';
|
|
13
|
+
// import { ConnectionState } from '@dxos/react-client/mesh';
|
|
14
|
+
const InvitationAuthMethodNone = 0;
|
|
15
|
+
const ConnectionStateOffline = 0;
|
|
16
|
+
const ConnectionStateOnline = 1;
|
|
17
|
+
|
|
13
18
|
test.describe('Invitations', () => {
|
|
14
19
|
let manager: InvitationsManager;
|
|
15
20
|
|
|
@@ -51,7 +56,7 @@ test.describe('Invitations', () => {
|
|
|
51
56
|
test('no auth method', async () => {
|
|
52
57
|
await manager.createIdentity(0);
|
|
53
58
|
await manager.openPanel(0, 'devices');
|
|
54
|
-
const invitation = await manager.createInvitation(0, 'device', { authMethod:
|
|
59
|
+
const invitation = await manager.createInvitation(0, 'device', { authMethod: InvitationAuthMethodNone });
|
|
55
60
|
|
|
56
61
|
await manager.openPanel(1, 'identity');
|
|
57
62
|
await manager.acceptInvitation(1, 'device', invitation);
|
|
@@ -155,9 +160,9 @@ test.describe('Invitations', () => {
|
|
|
155
160
|
await manager.acceptInvitation(1, 'device', invitation);
|
|
156
161
|
expect(await manager.readyToAuthenticate('device', manager.peer(1))).toBe(true);
|
|
157
162
|
await manager.toggleNetworkStatus(0);
|
|
158
|
-
expect(await manager.getNetworkStatus(0)).toEqual(
|
|
163
|
+
expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOffline);
|
|
159
164
|
await manager.toggleNetworkStatus(0);
|
|
160
|
-
expect(await manager.getNetworkStatus(0)).toEqual(
|
|
165
|
+
expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOnline);
|
|
161
166
|
await manager.resetInvitation(manager.peer(1));
|
|
162
167
|
await manager.invitationInputContinue('device', manager.peer(1));
|
|
163
168
|
await manager.clearAuthCode('device', manager.peer(1));
|
|
@@ -189,7 +194,7 @@ test.describe('Invitations', () => {
|
|
|
189
194
|
await manager.createIdentity(0);
|
|
190
195
|
await manager.createSpace(0);
|
|
191
196
|
await manager.openPanel(0, 1);
|
|
192
|
-
const invitation1 = await manager.createInvitation(0, 'space', { authMethod:
|
|
197
|
+
const invitation1 = await manager.createInvitation(0, 'space', { authMethod: InvitationAuthMethodNone });
|
|
193
198
|
const invitation2 = await manager.createInvitation(0, 'space');
|
|
194
199
|
|
|
195
200
|
await manager.createIdentity(1);
|
|
@@ -206,7 +211,7 @@ test.describe('Invitations', () => {
|
|
|
206
211
|
await manager.createIdentity(0);
|
|
207
212
|
await manager.createSpace(0);
|
|
208
213
|
await manager.openPanel(0, 1);
|
|
209
|
-
const invitation = await manager.createInvitation(0, 'space', { authMethod:
|
|
214
|
+
const invitation = await manager.createInvitation(0, 'space', { authMethod: InvitationAuthMethodNone });
|
|
210
215
|
|
|
211
216
|
await manager.createIdentity(1);
|
|
212
217
|
await manager.openPanel(1, 'join');
|
|
@@ -329,9 +334,9 @@ test.describe('Invitations', () => {
|
|
|
329
334
|
await manager.acceptInvitation(1, 'space', invitation);
|
|
330
335
|
expect(await manager.readyToAuthenticate('space', manager.peer(1))).toBe(true);
|
|
331
336
|
await manager.toggleNetworkStatus(0);
|
|
332
|
-
expect(await manager.getNetworkStatus(0)).toEqual(
|
|
337
|
+
expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOffline);
|
|
333
338
|
await manager.toggleNetworkStatus(0);
|
|
334
|
-
expect(await manager.getNetworkStatus(0)).toEqual(
|
|
339
|
+
expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOnline);
|
|
335
340
|
await manager.resetInvitation(manager.peer(1));
|
|
336
341
|
await manager.invitationInputContinue('space', manager.peer(1));
|
|
337
342
|
await manager.clearAuthCode('space', manager.peer(1));
|