@dxos/shell 0.6.14-main.f49f251 → 0.6.14-staging.9e90729

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.
Files changed (44) hide show
  1. package/dist/lib/browser/meta.json +1 -1
  2. package/dist/lib/browser/testing/index.mjs +1 -39
  3. package/dist/lib/browser/testing/index.mjs.map +4 -4
  4. package/dist/lib/node/chunk-Q7SFCCGT.cjs +33 -0
  5. package/dist/lib/node/chunk-Q7SFCCGT.cjs.map +7 -0
  6. package/dist/lib/node/meta.json +1 -0
  7. package/dist/lib/node/react.cjs +4763 -0
  8. package/dist/lib/node/react.cjs.map +7 -0
  9. package/dist/lib/node/react.css +7 -0
  10. package/dist/lib/node/react.css.map +7 -0
  11. package/dist/lib/node/testing/index.cjs +181 -0
  12. package/dist/lib/node/testing/index.cjs.map +7 -0
  13. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  14. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  15. package/dist/lib/node-esm/meta.json +1 -0
  16. package/dist/lib/node-esm/react.css +7 -0
  17. package/dist/lib/node-esm/react.css.map +7 -0
  18. package/dist/lib/node-esm/react.mjs +4809 -0
  19. package/dist/lib/node-esm/react.mjs.map +7 -0
  20. package/dist/lib/node-esm/testing/index.mjs +161 -0
  21. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  22. package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js +2 -2
  23. package/dist/types/src/components/IdentityList/SpaceMemberList.stories.js.map +1 -1
  24. package/dist/types/src/components/InvitationList/InvitationList.stories.js +10 -10
  25. package/dist/types/src/components/InvitationList/InvitationList.stories.js.map +1 -1
  26. package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js +15 -15
  27. package/dist/types/src/panels/SpacePanel/SpacePanel.stories.js.map +1 -1
  28. package/dist/types/src/playwright/invitations-manager.d.ts +1 -2
  29. package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
  30. package/dist/types/src/playwright/invitations-manager.js +2 -3
  31. package/dist/types/src/playwright/invitations-manager.js.map +1 -1
  32. package/dist/types/src/playwright/invitations.spec.js +13 -9
  33. package/dist/types/src/playwright/invitations.spec.js.map +1 -1
  34. package/dist/types/src/testing/index.d.ts +0 -1
  35. package/dist/types/src/testing/index.d.ts.map +1 -1
  36. package/dist/types/src/testing/index.js +1 -1
  37. package/dist/types/src/testing/index.js.map +1 -1
  38. package/package.json +38 -27
  39. package/src/components/IdentityList/SpaceMemberList.stories.tsx +1 -1
  40. package/src/components/InvitationList/InvitationList.stories.tsx +1 -1
  41. package/src/panels/SpacePanel/SpacePanel.stories.tsx +1 -1
  42. package/src/playwright/invitations-manager.ts +2 -3
  43. package/src/playwright/invitations.spec.ts +14 -9
  44. package/src/testing/index.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
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
- __exportStar(require("./fixtures"), exports);
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,6CAA2B;AAC3B,yDAAuC;AACvC,kDAAgC"}
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-main.f49f251",
3
+ "version": "0.6.14-staging.9e90729",
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": "./dist/lib/browser/react.mjs",
14
- "./testing": "./dist/lib/browser/testing/index.mjs"
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/client-protocol": "0.6.14-main.f49f251",
46
- "@dxos/async": "0.6.14-main.f49f251",
47
- "@dxos/client-services": "0.6.14-main.f49f251",
48
- "@dxos/debug": "0.6.14-main.f49f251",
49
- "@dxos/invariant": "0.6.14-main.f49f251",
50
- "@dxos/log": "0.6.14-main.f49f251",
51
- "@dxos/display-name": "0.6.14-main.f49f251",
52
- "@dxos/protocols": "0.6.14-main.f49f251",
53
- "@dxos/rpc": "0.6.14-main.f49f251",
54
- "@dxos/react-ui-types": "0.6.14-main.f49f251",
55
- "@dxos/rpc-tunnel": "0.6.14-main.f49f251",
56
- "@dxos/util": "0.6.14-main.f49f251"
56
+ "@dxos/async": "0.6.14-staging.9e90729",
57
+ "@dxos/client-protocol": "0.6.14-staging.9e90729",
58
+ "@dxos/client-services": "0.6.14-staging.9e90729",
59
+ "@dxos/display-name": "0.6.14-staging.9e90729",
60
+ "@dxos/debug": "0.6.14-staging.9e90729",
61
+ "@dxos/invariant": "0.6.14-staging.9e90729",
62
+ "@dxos/protocols": "0.6.14-staging.9e90729",
63
+ "@dxos/react-ui-types": "0.6.14-staging.9e90729",
64
+ "@dxos/log": "0.6.14-staging.9e90729",
65
+ "@dxos/rpc": "0.6.14-staging.9e90729",
66
+ "@dxos/util": "0.6.14-staging.9e90729",
67
+ "@dxos/rpc-tunnel": "0.6.14-staging.9e90729"
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-main.f49f251",
67
- "@dxos/protocols": "0.6.14-main.f49f251",
68
- "@dxos/random": "0.6.14-main.f49f251",
69
- "@dxos/react-client": "0.6.14-main.f49f251",
70
- "@dxos/react-hooks": "0.6.14-main.f49f251",
71
- "@dxos/react-ui": "0.6.14-main.f49f251",
72
- "@dxos/react-ui-theme": "0.6.14-main.f49f251",
73
- "@dxos/storybook-utils": "0.6.14-main.f49f251",
74
- "@dxos/test-utils": "0.6.14-main.f49f251"
77
+ "@dxos/config": "0.6.14-staging.9e90729",
78
+ "@dxos/protocols": "0.6.14-staging.9e90729",
79
+ "@dxos/random": "0.6.14-staging.9e90729",
80
+ "@dxos/react-client": "0.6.14-staging.9e90729",
81
+ "@dxos/react-hooks": "0.6.14-staging.9e90729",
82
+ "@dxos/react-ui": "0.6.14-staging.9e90729",
83
+ "@dxos/react-ui-theme": "0.6.14-staging.9e90729",
84
+ "@dxos/storybook-utils": "0.6.14-staging.9e90729",
85
+ "@dxos/test-utils": "0.6.14-staging.9e90729"
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-main.f49f251",
81
- "@dxos/react-ui": "0.6.14-main.f49f251",
82
- "@dxos/react-ui-theme": "0.6.14-main.f49f251"
91
+ "@dxos/react-ui": "0.6.14-staging.9e90729",
92
+ "@dxos/react-ui-theme": "0.6.14-staging.9e90729",
93
+ "@dxos/react-client": "0.6.14-staging.9e90729"
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 ConnectionState.OFFLINE;
58
+ return 0;
60
59
  } catch {
61
- return ConnectionState.ONLINE;
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: Invitation.AuthMethod.NONE });
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(ConnectionState.OFFLINE);
163
+ expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOffline);
159
164
  await manager.toggleNetworkStatus(0);
160
- expect(await manager.getNetworkStatus(0)).toEqual(ConnectionState.ONLINE);
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: Invitation.AuthMethod.NONE });
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: Invitation.AuthMethod.NONE });
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(ConnectionState.OFFLINE);
337
+ expect(await manager.getNetworkStatus(0)).toEqual(ConnectionStateOffline);
333
338
  await manager.toggleNetworkStatus(0);
334
- expect(await manager.getNetworkStatus(0)).toEqual(ConnectionState.ONLINE);
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));
@@ -2,6 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export * from './fixtures';
5
+ // NOTE: Not exporting fixtures as they depend on esm-only packages.
6
+
6
7
  export * from './scoped-shell-manager';
7
8
  export * from './shell-manager';