@dxos/react-client 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055

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 (107) hide show
  1. package/.storybook/main.mts +2 -4
  2. package/.storybook/preview.mts +2 -2
  3. package/dist/lib/browser/chunk-5UKA2BMA.mjs +179 -0
  4. package/dist/lib/browser/chunk-5UKA2BMA.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-PFF63FPR.mjs +16 -0
  6. package/dist/lib/browser/chunk-PFF63FPR.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-TSF6Y5VB.mjs +8 -0
  8. package/dist/lib/browser/chunk-TSF6Y5VB.mjs.map +7 -0
  9. package/dist/lib/browser/devtools/index.mjs +2 -1
  10. package/dist/lib/browser/devtools/index.mjs.map +1 -1
  11. package/dist/lib/browser/echo/index.mjs +51 -114
  12. package/dist/lib/browser/echo/index.mjs.map +4 -4
  13. package/dist/lib/browser/halo/index.mjs +2 -1
  14. package/dist/lib/browser/halo/index.mjs.map +1 -1
  15. package/dist/lib/browser/index.mjs +114 -12
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/mesh/index.mjs +2 -1
  18. package/dist/lib/browser/mesh/index.mjs.map +1 -1
  19. package/dist/lib/browser/meta.json +1 -1
  20. package/dist/lib/browser/testing/index.mjs +83 -112
  21. package/dist/lib/browser/testing/index.mjs.map +3 -3
  22. package/dist/lib/node-esm/chunk-373DPHEQ.mjs +10 -0
  23. package/dist/lib/node-esm/chunk-373DPHEQ.mjs.map +7 -0
  24. package/dist/lib/node-esm/chunk-NETTSER2.mjs +17 -0
  25. package/dist/lib/node-esm/chunk-NETTSER2.mjs.map +7 -0
  26. package/dist/lib/node-esm/chunk-T3QTQHBD.mjs +180 -0
  27. package/dist/lib/node-esm/chunk-T3QTQHBD.mjs.map +7 -0
  28. package/dist/lib/node-esm/devtools/index.mjs +2 -1
  29. package/dist/lib/node-esm/devtools/index.mjs.map +1 -1
  30. package/dist/lib/node-esm/echo/index.mjs +51 -114
  31. package/dist/lib/node-esm/echo/index.mjs.map +4 -4
  32. package/dist/lib/node-esm/halo/index.mjs +2 -1
  33. package/dist/lib/node-esm/halo/index.mjs.map +1 -1
  34. package/dist/lib/node-esm/index.mjs +114 -12
  35. package/dist/lib/node-esm/index.mjs.map +4 -4
  36. package/dist/lib/node-esm/mesh/index.mjs +2 -1
  37. package/dist/lib/node-esm/mesh/index.mjs.map +1 -1
  38. package/dist/lib/node-esm/meta.json +1 -1
  39. package/dist/lib/node-esm/testing/index.mjs +83 -112
  40. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  41. package/dist/types/src/client/ClientProvider.d.ts +0 -10
  42. package/dist/types/src/client/ClientProvider.d.ts.map +1 -1
  43. package/dist/types/src/echo/index.d.ts +2 -2
  44. package/dist/types/src/echo/index.d.ts.map +1 -1
  45. package/dist/types/src/echo/useMembers.d.ts +2 -2
  46. package/dist/types/src/echo/useMembers.d.ts.map +1 -1
  47. package/dist/types/src/echo/useQueue.d.ts +3 -2
  48. package/dist/types/src/echo/useQueue.d.ts.map +1 -1
  49. package/dist/types/src/echo/useSpaceInvitations.d.ts +3 -2
  50. package/dist/types/src/echo/useSpaceInvitations.d.ts.map +1 -1
  51. package/dist/types/src/echo/useSpaceProperties.d.ts +13 -0
  52. package/dist/types/src/echo/useSpaceProperties.d.ts.map +1 -0
  53. package/dist/types/src/echo/useSpaces.d.ts +18 -9
  54. package/dist/types/src/echo/useSpaces.d.ts.map +1 -1
  55. package/dist/types/src/echo/useSyncState.d.ts.map +1 -1
  56. package/dist/types/src/testing/ClientRepeater.d.ts +5 -4
  57. package/dist/types/src/testing/ClientRepeater.d.ts.map +1 -1
  58. package/dist/types/src/testing/ClientRepeater.stories.d.ts.map +1 -1
  59. package/dist/types/src/testing/context.d.ts +4 -2
  60. package/dist/types/src/testing/context.d.ts.map +1 -1
  61. package/dist/types/src/testing/util.d.ts.map +1 -1
  62. package/dist/types/src/testing/withClientProvider.d.ts +0 -3
  63. package/dist/types/src/testing/withClientProvider.d.ts.map +1 -1
  64. package/dist/types/src/testing/withClientProvider.stories.d.ts +2 -1
  65. package/dist/types/src/testing/withClientProvider.stories.d.ts.map +1 -1
  66. package/dist/types/tsconfig.tsbuildinfo +1 -1
  67. package/docs/README.md +38 -38
  68. package/moon.yml +2 -5
  69. package/package.json +35 -32
  70. package/src/client/ClientProvider.tsx +12 -26
  71. package/src/echo/index.ts +2 -2
  72. package/src/echo/useMembers.ts +5 -3
  73. package/src/echo/useQueue.ts +3 -2
  74. package/src/echo/useSpaceInvitations.ts +9 -4
  75. package/src/echo/useSpaceProperties.ts +28 -0
  76. package/src/echo/useSpaces.test.tsx +7 -13
  77. package/src/echo/useSpaces.ts +33 -27
  78. package/src/echo/useSyncState.ts +4 -3
  79. package/src/halo/Passkey.stories.tsx +3 -3
  80. package/src/testing/ClientRepeater.stories.tsx +9 -4
  81. package/src/testing/ClientRepeater.tsx +9 -12
  82. package/src/testing/context.tsx +4 -3
  83. package/src/testing/util.tsx +0 -1
  84. package/src/testing/withClientProvider.stories.tsx +12 -6
  85. package/src/testing/withClientProvider.tsx +62 -81
  86. package/tsconfig.json +3 -3
  87. package/typedoc.json +1 -1
  88. package/vitest.config.ts +1 -3
  89. package/dist/lib/browser/chunk-TA2HGRAF.mjs +0 -309
  90. package/dist/lib/browser/chunk-TA2HGRAF.mjs.map +0 -7
  91. package/dist/lib/node-esm/chunk-ZJMNF7GC.mjs +0 -311
  92. package/dist/lib/node-esm/chunk-ZJMNF7GC.mjs.map +0 -7
  93. package/dist/types/src/echo/useQuery.d.ts +0 -11
  94. package/dist/types/src/echo/useQuery.d.ts.map +0 -1
  95. package/dist/types/src/echo/useQuery.test.d.ts +0 -2
  96. package/dist/types/src/echo/useQuery.test.d.ts.map +0 -1
  97. package/dist/types/src/echo/useSchema.d.ts +0 -8
  98. package/dist/types/src/echo/useSchema.d.ts.map +0 -1
  99. package/dist/types/src/playwright/playwright.config.d.ts +0 -3
  100. package/dist/types/src/playwright/playwright.config.d.ts.map +0 -1
  101. package/dist/types/src/playwright/smoke.spec.d.ts +0 -2
  102. package/dist/types/src/playwright/smoke.spec.d.ts.map +0 -1
  103. package/src/echo/useQuery.test.tsx +0 -129
  104. package/src/echo/useQuery.ts +0 -64
  105. package/src/echo/useSchema.ts +0 -54
  106. package/src/playwright/playwright.config.ts +0 -17
  107. package/src/playwright/smoke.spec.ts +0 -24
@@ -5,6 +5,7 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
+ import { Obj } from '@dxos/echo';
8
9
  import { Input } from '@dxos/react-ui';
9
10
  import { withTheme } from '@dxos/react-ui/testing';
10
11
  import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
@@ -16,7 +17,7 @@ import { type ClientRepeatedComponentProps, ClientRepeater } from './ClientRepea
16
17
 
17
18
  const meta = {
18
19
  title: 'sdk/react-client/ClientRepeater',
19
- decorators: [withTheme],
20
+ decorators: [withTheme()],
20
21
  } satisfies Meta<typeof Input>;
21
22
 
22
23
  export default meta;
@@ -32,9 +33,9 @@ const ClientStory = () => {
32
33
  return <JsonPanel value={client.toJSON()} />;
33
34
  };
34
35
 
35
- const ClientSpace = ({ spaceKey }: ClientRepeatedComponentProps) => {
36
+ const ClientSpace = ({ spaceId }: ClientRepeatedComponentProps) => {
36
37
  const client = useClient();
37
- const space = useSpace(spaceKey);
38
+ const space = useSpace(spaceId);
38
39
  if (!space?.isOpen) {
39
40
  return null;
40
41
  }
@@ -45,7 +46,11 @@ const ClientSpace = ({ spaceKey }: ClientRepeatedComponentProps) => {
45
46
  <Input.TextInput
46
47
  placeholder='Name'
47
48
  value={space.properties.name}
48
- onChange={(event) => (space.properties.name = event.target.value)}
49
+ onChange={(event) =>
50
+ Obj.change(space.properties, (obj) => {
51
+ obj.name = event.target.value;
52
+ })
53
+ }
49
54
  />
50
55
  </Input.Root>
51
56
  <JsonPanel value={client.toJSON()} />
@@ -2,20 +2,20 @@
2
2
  // Copyright 2022 DXOS.org
3
3
  //
4
4
 
5
- import React, { type FC, useEffect, useRef, useState } from 'react';
5
+ import React, { type FC, useRef, useState } from 'react';
6
6
 
7
- import { Client, type PublicKey } from '@dxos/client';
7
+ import { Client } from '@dxos/client';
8
8
  import { TestBuilder, performInvitation } from '@dxos/client/testing';
9
- import { type TypedObject } from '@dxos/echo/internal';
10
- import { registerSignalsRuntime } from '@dxos/echo-signals/react';
9
+ import { type Type } from '@dxos/echo';
11
10
  import { faker } from '@dxos/random';
12
11
  import { useAsyncEffect } from '@dxos/react-hooks';
13
12
 
14
13
  import { ClientProvider } from '../client';
14
+ import { type SpaceId } from '../echo';
15
15
 
16
16
  import { type WithClientProviderProps } from './withClientProvider';
17
17
 
18
- export type ClientRepeatedComponentProps = { id: number; count: number; spaceKey?: PublicKey };
18
+ export type ClientRepeatedComponentProps = { id: number; count: number; spaceId?: SpaceId };
19
19
 
20
20
  export type ClientRepeaterControlsProps = { clients: Client[] };
21
21
 
@@ -26,7 +26,7 @@ export type ClientRepeaterProps<P extends ClientRepeatedComponentProps> = {
26
26
  controls?: FC<ClientRepeaterControlsProps>;
27
27
  count?: number;
28
28
  clients?: Client[];
29
- types?: TypedObject[];
29
+ types?: Type.AnyObj[];
30
30
  args?: Omit<P, 'id' | 'count'>;
31
31
  } & Pick<WithClientProviderProps, 'createIdentity' | 'createSpace' | 'onCreateSpace'>;
32
32
 
@@ -50,12 +50,9 @@ export const ClientRepeater = <P extends ClientRepeatedComponentProps>(props: Cl
50
50
  createSpace,
51
51
  onCreateSpace,
52
52
  } = props;
53
- useEffect(() => {
54
- registerSignalsRuntime();
55
- }, []);
56
53
 
57
54
  const [clients, setClients] = useState(props.clients ?? []);
58
- const [spaceKey, setSpaceKey] = useState<PublicKey>();
55
+ const [spaceId, setSpaceId] = useState<SpaceId>();
59
56
 
60
57
  const testBuilder = useRef(new TestBuilder());
61
58
  useAsyncEffect(async () => {
@@ -71,7 +68,7 @@ export const ClientRepeater = <P extends ClientRepeatedComponentProps>(props: Cl
71
68
  if (createSpace) {
72
69
  const client = clients[0];
73
70
  const space = await client.spaces.create({ name: faker.commerce.productName() });
74
- setSpaceKey(space.key);
71
+ setSpaceId(space.id);
75
72
  await onCreateSpace?.({ client, space }, {});
76
73
  await Promise.all(clients.slice(1).flatMap((client) => performInvitation({ host: space, guest: client.spaces })));
77
74
  }
@@ -88,7 +85,7 @@ export const ClientRepeater = <P extends ClientRepeatedComponentProps>(props: Cl
88
85
  {Controls && <Controls clients={clients} />}
89
86
  {clients.map((client, index) => (
90
87
  <ClientProvider key={index} client={client}>
91
- <Component id={index} count={clients.length} spaceKey={spaceKey} {...{ ...props.args }} />
88
+ <Component id={index} count={clients.length} spaceId={spaceId} {...{ ...props.args }} />
92
89
  </ClientProvider>
93
90
  ))}
94
91
  </>
@@ -4,16 +4,17 @@
4
4
 
5
5
  import { createContext, useContext } from 'react';
6
6
 
7
- import { type Space } from '@dxos/client/echo';
7
+ import { type Space, type SpaceId } from '@dxos/client/echo';
8
8
  import { raise } from '@dxos/debug';
9
9
 
10
10
  export type ClientStory = {
11
+ index?: number;
12
+ spaceId?: SpaceId;
11
13
  space?: Space;
12
14
  };
13
15
 
14
- // TODO(wittjosiah): Add to multi-client as well.
15
16
  export const ClientStory = createContext<ClientStory | undefined>(undefined);
16
17
 
17
- export const useClientProvider = (): ClientStory => {
18
+ export const useClientStory = (): ClientStory => {
18
19
  return useContext(ClientStory) ?? raise(new Error('Missing ClientStory'));
19
20
  };
@@ -24,7 +24,6 @@ export const createClient = async ({
24
24
  let space: Space | undefined;
25
25
  if (createSpace) {
26
26
  space = await client.spaces.create();
27
- await client.spaces.waitUntilReady();
28
27
  }
29
28
 
30
29
  return { client, space };
@@ -4,11 +4,11 @@
4
4
 
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
+ import { expect, within } from 'storybook/test';
7
8
 
8
9
  import { log } from '@dxos/log';
9
- import { withLayout, withTheme } from '@dxos/react-ui/testing';
10
+ import { withLayout, withTheme, Loading } from '@dxos/react-ui/testing';
10
11
  import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
11
- import { render } from '@dxos/storybook-utils';
12
12
 
13
13
  import { useClient } from '../client';
14
14
  import { type Space, useSpaces } from '../echo';
@@ -24,7 +24,7 @@ const DefaultStory = () => {
24
24
  const client = useClient();
25
25
  const spaces = useSpaces();
26
26
  if (!client) {
27
- return null;
27
+ return <Loading data={{ client: !!client }} />;
28
28
  }
29
29
 
30
30
  return (
@@ -39,8 +39,9 @@ const DefaultStory = () => {
39
39
 
40
40
  const meta = {
41
41
  title: 'sdk/react-client/withClientProvider',
42
- render: render(DefaultStory),
43
- decorators: [withTheme],
42
+ render: DefaultStory,
43
+ decorators: [withTheme()],
44
+ tags: ['test'],
44
45
  } satisfies Meta<typeof DefaultStory>;
45
46
 
46
47
  export default meta;
@@ -63,11 +64,16 @@ export const Default: Story = {
63
64
  parameters: {
64
65
  layout: 'centered',
65
66
  },
67
+ play: async ({ canvasElement }) => {
68
+ const canvas = within(canvasElement);
69
+ const initializedText = await canvas.findByText(/"initialized": true/i, {}, { timeout: 30_000 });
70
+ await expect(initializedText).toBeVisible();
71
+ },
66
72
  };
67
73
 
68
74
  export const Multiple: Story = {
69
75
  decorators: [
70
- withTheme,
76
+ withTheme(),
71
77
  withLayout({ classNames: 'grid grid-cols-3' }),
72
78
  withMultiClientProvider({ ...clientProps, numClients: 3 }),
73
79
  ],
@@ -3,14 +3,14 @@
3
3
  //
4
4
 
5
5
  import { type Decorator, type StoryContext } from '@storybook/react';
6
- import React, { type PropsWithChildren, createContext, useContext, useEffect, useRef, useState } from 'react';
7
- import { type FallbackProps, ErrorBoundary as NaturalErrorBoundary } from 'react-error-boundary';
6
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
8
7
 
9
8
  import { Trigger } from '@dxos/async';
10
9
  import { type Client } from '@dxos/client';
11
- import { type Space } from '@dxos/client/echo';
10
+ import { type Space, type SpaceId } from '@dxos/client/echo';
12
11
  import { TestBuilder, performInvitation } from '@dxos/client/testing';
13
12
  import { log } from '@dxos/log';
13
+ import { ErrorBoundary } from '@dxos/react-ui';
14
14
  import { type MaybePromise } from '@dxos/util';
15
15
 
16
16
  import { ClientProvider, type ClientProviderProps } from '../client';
@@ -39,8 +39,6 @@ const initializeClient = async (
39
39
  if (createIdentity || createSpace) {
40
40
  if (!client.halo.identity.get()) {
41
41
  await client.halo.createIdentity();
42
- await client.spaces.waitUntilReady();
43
- await client.spaces.default.waitUntilReady();
44
42
  await onCreateIdentity?.({ client }, context);
45
43
  }
46
44
  }
@@ -52,7 +50,7 @@ const initializeClient = async (
52
50
  await onCreateSpace?.({ client, space }, context);
53
51
  }
54
52
 
55
- return { space };
53
+ return { space, spaceId: space?.id };
56
54
  };
57
55
 
58
56
  export type WithClientProviderProps = InitializeProps & Omit<ClientProviderProps, 'onInitialized'>;
@@ -87,7 +85,7 @@ export const withClientProvider = ({
87
85
  };
88
86
 
89
87
  return (
90
- <ErrorBoundary>
88
+ <ErrorBoundary name='client-provider'>
91
89
  <ClientProvider onInitialized={handleInitialized} {...props}>
92
90
  <ClientStory.Provider value={data}>
93
91
  <Story />
@@ -104,10 +102,6 @@ export const withClientProvider = ({
104
102
  export type WithMultiClientProviderProps = InitializeProps &
105
103
  Omit<ClientProviderProps, 'onInitialized'> & { numClients?: number };
106
104
 
107
- const MultiClientContext = createContext<{ id: number }>({ id: 0 });
108
-
109
- export const useMultiClient = () => useContext(MultiClientContext);
110
-
111
105
  /**
112
106
  * Decorator that creates a scaffold for multiple clients.
113
107
  * Orchestrates invitations between a randomly selected host and the remaining clients.
@@ -122,86 +116,73 @@ export const withMultiClientProvider = ({
122
116
  ...props
123
117
  }: WithMultiClientProviderProps): Decorator => {
124
118
  return (Story, context) => {
125
- const builder = useRef(new TestBuilder());
126
- const hostRef = useRef<Client>(null);
127
119
  const spaceReady = useRef(new Trigger<Space | undefined>());
120
+ const [spaceId, setSpaceId] = useState<SpaceId>();
121
+
122
+ const clients = useMemo(() => {
123
+ const buidler = new TestBuilder();
124
+ return Array.from({ length: numClients }).map(() => {
125
+ return {
126
+ services: buidler.createLocalClientServices(),
127
+ };
128
+ });
129
+ }, [numClients]);
128
130
 
129
131
  // Handle invitations.
130
132
  // NOTE: The zeroth client isn't necessarily the first to be initialized.
131
- const handleInitialized = async (client: Client, index: number) => {
132
- log.info('initialized', { index });
133
- if (createSpace) {
134
- if (!hostRef.current) {
135
- hostRef.current = client;
136
- const { space } = await initializeClient(
137
- client,
138
- {
139
- createIdentity,
140
- createSpace,
141
- onCreateSpace,
142
- onCreateIdentity,
143
- onInitialized,
144
- },
145
- context,
133
+ const handleInitialized = useCallback(async (client: Client, index: number) => {
134
+ if (index === 0) {
135
+ // Initialize host.
136
+ const { space } = await initializeClient(
137
+ client,
138
+ {
139
+ createIdentity,
140
+ createSpace,
141
+ onCreateSpace,
142
+ onCreateIdentity,
143
+ onInitialized,
144
+ },
145
+ context,
146
+ );
147
+
148
+ log.info('inviting', { index, spaceId: space?.id });
149
+ setSpaceId(space?.id);
150
+ spaceReady.current.wake(space);
151
+ } else {
152
+ // Initialize guest.
153
+ await initializeClient(client, { createIdentity, onInitialized }, context);
154
+
155
+ log.info('waiting', { index });
156
+ const space = await spaceReady.current.wait();
157
+ if (space) {
158
+ log.info('joining', { index, spaceId: space.id });
159
+ await Promise.all(
160
+ performInvitation({
161
+ host: space,
162
+ guest: client.spaces,
163
+ }),
146
164
  );
147
-
148
- spaceReady.current.wake(space);
149
- log.info('inviting', { index });
150
- } else {
151
- await initializeClient(client, { createIdentity, onInitialized }, context);
152
- const space = await spaceReady.current.wait();
153
- if (space) {
154
- log.info('joining', { index });
155
- await Promise.all(performInvitation({ host: space, guest: client.spaces }));
156
- }
157
165
  }
158
166
  }
159
- };
167
+ }, []);
160
168
 
161
169
  return (
162
- <ErrorBoundary>
163
- {Array.from({ length: numClients }).map((_, index) => (
164
- <MultiClientContext.Provider key={index} value={{ id: index }}>
165
- <ClientProvider
166
- services={builder.current.createLocalClientServices()}
167
- onInitialized={(client) => handleInitialized(client, index)}
168
- {...props}
169
- >
170
- <Story />
171
- </ClientProvider>
172
- </MultiClientContext.Provider>
170
+ <div className='absolute inset-0 grid grid-flow-col auto-cols-fr gap-4 overflow-hidden'>
171
+ {clients.map((client, index) => (
172
+ <ClientProvider
173
+ key={index}
174
+ services={client.services}
175
+ onInitialized={(client) => handleInitialized(client, index)}
176
+ {...props}
177
+ >
178
+ <ClientStory.Provider value={{ index, spaceId }}>
179
+ <ErrorBoundary name='client-provider'>
180
+ <Story />
181
+ </ErrorBoundary>
182
+ </ClientStory.Provider>
183
+ </ClientProvider>
173
184
  ))}
174
- </ErrorBoundary>
185
+ </div>
175
186
  );
176
187
  };
177
188
  };
178
-
179
- const ErrorBoundary = ({ children }: PropsWithChildren) => {
180
- const [error, setError] = useState<Error>();
181
- useEffect(() => {
182
- const handleError = (event: PromiseRejectionEvent) => {
183
- setError(event.reason);
184
- };
185
-
186
- window.addEventListener('unhandledrejection', handleError);
187
- return () => window.removeEventListener('unhandledrejection', handleError);
188
- }, []);
189
-
190
- if (error) {
191
- return <ErrorFallback error={error} resetErrorBoundary={() => setError(undefined)} />;
192
- }
193
-
194
- return <NaturalErrorBoundary FallbackComponent={ErrorFallback}>{children}</NaturalErrorBoundary>;
195
- };
196
-
197
- const ErrorFallback = ({ error }: FallbackProps) => {
198
- const { name, message, stack } =
199
- error instanceof Error ? error : { name: 'Error', message: String(error), stack: undefined };
200
- return (
201
- <div role='alert' className='flex flex-col p-4 gap-4 overflow-auto'>
202
- <h1 className='text-xl text-red-500'>{name}</h1>
203
- <div className='text-lg'>{message}</div>
204
- {stack && <pre className='whitespace-pre-wrap text-sm text-subdued'>{stack}</pre>}
205
- </div>
206
- );
207
- };
package/tsconfig.json CHANGED
@@ -45,13 +45,13 @@
45
45
  "path": "../../core/echo/echo"
46
46
  },
47
47
  {
48
- "path": "../../core/echo/echo-signals"
48
+ "path": "../../core/echo/echo-react"
49
49
  },
50
50
  {
51
51
  "path": "../../core/protocols"
52
52
  },
53
53
  {
54
- "path": "../../ui/primitives/react-hooks"
54
+ "path": "../../ui/react-primitives/react-hooks"
55
55
  },
56
56
  {
57
57
  "path": "../../ui/react-ui"
@@ -60,7 +60,7 @@
60
60
  "path": "../../ui/react-ui-syntax-highlighter"
61
61
  },
62
62
  {
63
- "path": "../../ui/react-ui-theme"
63
+ "path": "../../ui/ui-theme"
64
64
  },
65
65
  {
66
66
  "path": "../client"
package/typedoc.json CHANGED
@@ -9,4 +9,4 @@
9
9
  "src/mesh/index.ts",
10
10
  "src/worker.ts"
11
11
  ]
12
- }
12
+ }
package/vitest.config.ts CHANGED
@@ -10,9 +10,7 @@ import { createConfig } from '../../../vitest.base.config';
10
10
  export default createConfig({
11
11
  dirname: typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url)),
12
12
  node: {
13
- environment: 'jsdom',
14
- // TODO(dmaretskyi): Enabled because client tests were flaky. Remove when that's not the case.
15
- retry: 2,
13
+ environment: 'happy-dom',
16
14
  },
17
15
  storybook: true,
18
16
  });