@livestore/react 0.4.0-dev.2 → 0.4.0-dev.21

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 (96) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/LiveStoreContext.d.ts +27 -0
  3. package/dist/LiveStoreContext.d.ts.map +1 -1
  4. package/dist/LiveStoreContext.js +18 -0
  5. package/dist/LiveStoreContext.js.map +1 -1
  6. package/dist/LiveStoreProvider.d.ts +14 -8
  7. package/dist/LiveStoreProvider.d.ts.map +1 -1
  8. package/dist/LiveStoreProvider.js +40 -24
  9. package/dist/LiveStoreProvider.js.map +1 -1
  10. package/dist/LiveStoreProvider.test.js +7 -7
  11. package/dist/LiveStoreProvider.test.js.map +1 -1
  12. package/dist/__tests__/fixture.d.ts +34 -12
  13. package/dist/__tests__/fixture.d.ts.map +1 -1
  14. package/dist/__tests__/fixture.js +13 -5
  15. package/dist/__tests__/fixture.js.map +1 -1
  16. package/dist/experimental/components/LiveList.js +1 -1
  17. package/dist/experimental/mod.d.ts +1 -0
  18. package/dist/experimental/mod.d.ts.map +1 -1
  19. package/dist/experimental/mod.js +1 -0
  20. package/dist/experimental/mod.js.map +1 -1
  21. package/dist/experimental/multi-store/StoreRegistry.d.ts +105 -0
  22. package/dist/experimental/multi-store/StoreRegistry.d.ts.map +1 -0
  23. package/dist/experimental/multi-store/StoreRegistry.js +184 -0
  24. package/dist/experimental/multi-store/StoreRegistry.js.map +1 -0
  25. package/dist/experimental/multi-store/StoreRegistry.test.d.ts +2 -0
  26. package/dist/experimental/multi-store/StoreRegistry.test.d.ts.map +1 -0
  27. package/dist/experimental/multi-store/StoreRegistry.test.js +381 -0
  28. package/dist/experimental/multi-store/StoreRegistry.test.js.map +1 -0
  29. package/dist/experimental/multi-store/StoreRegistryContext.d.ts +10 -0
  30. package/dist/experimental/multi-store/StoreRegistryContext.d.ts.map +1 -0
  31. package/dist/experimental/multi-store/StoreRegistryContext.js +15 -0
  32. package/dist/experimental/multi-store/StoreRegistryContext.js.map +1 -0
  33. package/dist/experimental/multi-store/mod.d.ts +6 -0
  34. package/dist/experimental/multi-store/mod.d.ts.map +1 -0
  35. package/dist/experimental/multi-store/mod.js +6 -0
  36. package/dist/experimental/multi-store/mod.js.map +1 -0
  37. package/dist/experimental/multi-store/storeOptions.d.ts +4 -0
  38. package/dist/experimental/multi-store/storeOptions.d.ts.map +1 -0
  39. package/dist/experimental/multi-store/storeOptions.js +4 -0
  40. package/dist/experimental/multi-store/storeOptions.js.map +1 -0
  41. package/dist/experimental/multi-store/types.d.ts +25 -0
  42. package/dist/experimental/multi-store/types.d.ts.map +1 -0
  43. package/dist/experimental/multi-store/types.js +2 -0
  44. package/dist/experimental/multi-store/types.js.map +1 -0
  45. package/dist/experimental/multi-store/useStore.d.ts +11 -0
  46. package/dist/experimental/multi-store/useStore.d.ts.map +1 -0
  47. package/dist/experimental/multi-store/useStore.js +16 -0
  48. package/dist/experimental/multi-store/useStore.js.map +1 -0
  49. package/dist/experimental/multi-store/useStore.test.d.ts +2 -0
  50. package/dist/experimental/multi-store/useStore.test.d.ts.map +1 -0
  51. package/dist/experimental/multi-store/useStore.test.js +198 -0
  52. package/dist/experimental/multi-store/useStore.test.js.map +1 -0
  53. package/dist/mod.d.ts +1 -1
  54. package/dist/mod.d.ts.map +1 -1
  55. package/dist/mod.js.map +1 -1
  56. package/dist/useClientDocument.d.ts +43 -13
  57. package/dist/useClientDocument.d.ts.map +1 -1
  58. package/dist/useClientDocument.js +4 -5
  59. package/dist/useClientDocument.js.map +1 -1
  60. package/dist/useClientDocument.test.js +29 -7
  61. package/dist/useClientDocument.test.js.map +1 -1
  62. package/dist/useQuery.d.ts +28 -6
  63. package/dist/useQuery.d.ts.map +1 -1
  64. package/dist/useQuery.js +63 -18
  65. package/dist/useQuery.js.map +1 -1
  66. package/dist/useQuery.test.js +35 -11
  67. package/dist/useQuery.test.js.map +1 -1
  68. package/dist/useRcResource.test.js +1 -1
  69. package/dist/useStore.d.ts +53 -1
  70. package/dist/useStore.d.ts.map +1 -1
  71. package/dist/useStore.js +52 -1
  72. package/dist/useStore.js.map +1 -1
  73. package/package.json +14 -14
  74. package/src/LiveStoreContext.ts +27 -0
  75. package/src/LiveStoreProvider.test.tsx +7 -7
  76. package/src/LiveStoreProvider.tsx +67 -45
  77. package/src/__snapshots__/useClientDocument.test.tsx.snap +208 -100
  78. package/src/__snapshots__/useQuery.test.tsx.snap +400 -128
  79. package/src/__tests__/fixture.tsx +23 -24
  80. package/src/experimental/components/LiveList.tsx +1 -1
  81. package/src/experimental/mod.ts +1 -0
  82. package/src/experimental/multi-store/StoreRegistry.test.ts +518 -0
  83. package/src/experimental/multi-store/StoreRegistry.ts +253 -0
  84. package/src/experimental/multi-store/StoreRegistryContext.tsx +23 -0
  85. package/src/experimental/multi-store/mod.ts +5 -0
  86. package/src/experimental/multi-store/storeOptions.ts +8 -0
  87. package/src/experimental/multi-store/types.ts +37 -0
  88. package/src/experimental/multi-store/useStore.test.tsx +269 -0
  89. package/src/experimental/multi-store/useStore.ts +26 -0
  90. package/src/mod.ts +2 -1
  91. package/src/useClientDocument.test.tsx +105 -75
  92. package/src/useClientDocument.ts +58 -13
  93. package/src/useQuery.test.tsx +62 -11
  94. package/src/useQuery.ts +98 -27
  95. package/src/useRcResource.test.tsx +1 -1
  96. package/src/useStore.ts +55 -3
@@ -0,0 +1,381 @@
1
+ import { makeInMemoryAdapter } from '@livestore/adapter-web';
2
+ import { UnknownError } from '@livestore/common';
3
+ import { StoreInternalsSymbol } from '@livestore/livestore';
4
+ import { sleep } from '@livestore/utils';
5
+ import { Effect } from '@livestore/utils/effect';
6
+ import { describe, expect, it } from 'vitest';
7
+ import { schema } from "../../__tests__/fixture.js";
8
+ import { StoreRegistry } from "./StoreRegistry.js";
9
+ import { storeOptions } from "./storeOptions.js";
10
+ describe('StoreRegistry', () => {
11
+ it('returns a promise when the store is loading', async () => {
12
+ const registry = new StoreRegistry();
13
+ const result = registry.getOrLoadPromise(testStoreOptions());
14
+ expect(result).toBeInstanceOf(Promise);
15
+ // Clean up
16
+ const store = await result;
17
+ await store.shutdownPromise();
18
+ });
19
+ it('returns cached store synchronously after first load resolves', async () => {
20
+ const registry = new StoreRegistry();
21
+ const initial = registry.getOrLoadPromise(testStoreOptions());
22
+ expect(initial).toBeInstanceOf(Promise);
23
+ const store = await initial;
24
+ const cached = registry.getOrLoadPromise(testStoreOptions());
25
+ expect(cached).toBe(store);
26
+ expect(cached).not.toBeInstanceOf(Promise);
27
+ // Clean up
28
+ await store.shutdownPromise();
29
+ });
30
+ it('reuses the same promise for concurrent getOrLoadPromise calls while loading', async () => {
31
+ const registry = new StoreRegistry();
32
+ const options = testStoreOptions();
33
+ const first = registry.getOrLoadPromise(options);
34
+ const second = registry.getOrLoadPromise(options);
35
+ // Both should be the same promise
36
+ expect(first).toBe(second);
37
+ expect(first).toBeInstanceOf(Promise);
38
+ const store = await first;
39
+ // Both promises should resolve to the same store
40
+ expect(await second).toBe(store);
41
+ // Clean up
42
+ await store.shutdownPromise();
43
+ });
44
+ it('throws synchronously and rethrows on subsequent calls for sync failures', () => {
45
+ const registry = new StoreRegistry();
46
+ const badOptions = testStoreOptions({
47
+ // @ts-expect-error - intentionally passing invalid adapter to trigger error
48
+ adapter: null,
49
+ });
50
+ // First call throws synchronously
51
+ expect(() => registry.getOrLoadPromise(badOptions)).toThrow();
52
+ // Subsequent call should also throw synchronously (cached error)
53
+ expect(() => registry.getOrLoadPromise(badOptions)).toThrow();
54
+ });
55
+ it('caches and rethrows rejection on subsequent calls for async failures', async () => {
56
+ const registry = new StoreRegistry();
57
+ // Create an adapter that fails asynchronously (after yielding to the event loop)
58
+ const failingAdapter = () => Effect.gen(function* () {
59
+ yield* Effect.sleep(0); // Force async execution
60
+ return yield* UnknownError.make({ cause: new Error('Async failure') });
61
+ });
62
+ const badOptions = testStoreOptions({
63
+ adapter: failingAdapter,
64
+ });
65
+ // First call returns a promise that rejects
66
+ await expect(registry.getOrLoadPromise(badOptions)).rejects.toThrow();
67
+ // Subsequent call should throw the cached error synchronously (RcMap caches failures)
68
+ expect(() => registry.getOrLoadPromise(badOptions)).toThrow();
69
+ });
70
+ it('throws the same error instance on multiple calls after failure', async () => {
71
+ const registry = new StoreRegistry();
72
+ // Create an adapter that fails asynchronously
73
+ const failingAdapter = () => Effect.gen(function* () {
74
+ yield* Effect.sleep(0); // Force async execution
75
+ return yield* UnknownError.make({ cause: new Error('Async failure') });
76
+ });
77
+ const badOptions = testStoreOptions({
78
+ adapter: failingAdapter,
79
+ });
80
+ // Wait for the first failure
81
+ await expect(registry.getOrLoadPromise(badOptions)).rejects.toThrow();
82
+ // Capture the errors from subsequent calls
83
+ let error1;
84
+ let error2;
85
+ try {
86
+ registry.getOrLoadPromise(badOptions);
87
+ }
88
+ catch (err) {
89
+ error1 = err;
90
+ }
91
+ try {
92
+ registry.getOrLoadPromise(badOptions);
93
+ }
94
+ catch (err) {
95
+ error2 = err;
96
+ }
97
+ // Both should be the exact same error instance (cached)
98
+ expect(error1).toBeDefined();
99
+ expect(error1).toBe(error2);
100
+ });
101
+ it('disposes store after unusedCacheTime expires', async () => {
102
+ const unusedCacheTime = 25;
103
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
104
+ const options = testStoreOptions();
105
+ const store = await registry.getOrLoadPromise(options);
106
+ // Store should be cached
107
+ expect(registry.getOrLoadPromise(options)).toBe(store);
108
+ // Wait for disposal
109
+ await sleep(unusedCacheTime + 50);
110
+ // After disposal, store should be removed
111
+ // The store is removed from cache, so next getOrLoadStore creates a new one
112
+ const nextStore = await registry.getOrLoadPromise(options);
113
+ // Should be a different store instance
114
+ expect(nextStore).not.toBe(store);
115
+ expect(nextStore[StoreInternalsSymbol].clientSession.debugInstanceId).toBeDefined();
116
+ // Clean up the second store (first one was disposed)
117
+ await nextStore.shutdownPromise();
118
+ });
119
+ it('does not dispose when unusedCacheTime is Infinity', async () => {
120
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime: Number.POSITIVE_INFINITY } });
121
+ const options = testStoreOptions();
122
+ const store = await registry.getOrLoadPromise(options);
123
+ // Store should be cached
124
+ expect(registry.getOrLoadPromise(options)).toBe(store);
125
+ // Wait a reasonable duration to verify no disposal
126
+ await sleep(100);
127
+ // Store should still be cached (not disposed)
128
+ expect(registry.getOrLoadPromise(options)).toBe(store);
129
+ // Clean up manually
130
+ await store.shutdownPromise();
131
+ });
132
+ it('schedules disposal if store becomes unused during loading', async () => {
133
+ const unusedCacheTime = 50;
134
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
135
+ const options = testStoreOptions();
136
+ // Start loading without any retain
137
+ const storePromise = registry.getOrLoadPromise(options);
138
+ // Wait for store to load (no retain registered)
139
+ const store = await storePromise;
140
+ // Since there were no retain when loading completed, disposal should be scheduled
141
+ await sleep(unusedCacheTime + 50);
142
+ // Store should be disposed
143
+ const nextStore = await registry.getOrLoadPromise(options);
144
+ expect(nextStore).not.toBe(store);
145
+ await nextStore.shutdownPromise();
146
+ });
147
+ // This test is skipped because Effect doesn't yet support different `idleTimeToLive` values for each resource in `RcMap`
148
+ // See https://github.com/livestorejs/livestore/issues/917
149
+ it.skip('allows call-site options to override default options', async () => {
150
+ const registry = new StoreRegistry({
151
+ defaultOptions: {
152
+ unusedCacheTime: 1000, // Default is long
153
+ },
154
+ });
155
+ const options = testStoreOptions({
156
+ unusedCacheTime: 10, // Override with shorter time
157
+ });
158
+ const store = await registry.getOrLoadPromise(options);
159
+ // Wait for the override time (10ms)
160
+ await sleep(10);
161
+ // Should be disposed according to the override time, not default
162
+ const nextStore = await registry.getOrLoadPromise(options);
163
+ expect(nextStore).not.toBe(store);
164
+ await nextStore.shutdownPromise();
165
+ });
166
+ // This test is skipped because we don't yet support dynamic `unusedCacheTime` updates for cached stores.
167
+ // See https://github.com/livestorejs/livestore/issues/918
168
+ it.skip('keeps the longest unusedCacheTime seen for a store when options vary across calls', async () => {
169
+ const registry = new StoreRegistry();
170
+ const options = testStoreOptions({ unusedCacheTime: 10 });
171
+ const release = registry.retain(options);
172
+ const store = await registry.getOrLoadPromise(options);
173
+ // Call with longer unusedCacheTime
174
+ await registry.getOrLoadPromise(testStoreOptions({ unusedCacheTime: 100 }));
175
+ release();
176
+ // After 99ms, store should still be alive (100ms unusedCacheTime used)
177
+ await sleep(99);
178
+ // Store should still be cached
179
+ expect(registry.getOrLoadPromise(options)).toBe(store);
180
+ // After the full 100ms, store should be disposed
181
+ await sleep(1);
182
+ // Next getOrLoadStore should create a new store
183
+ const nextStore = await registry.getOrLoadPromise(options);
184
+ expect(nextStore).not.toBe(store);
185
+ // Clean up the second store (first one was disposed)
186
+ await nextStore.shutdownPromise();
187
+ });
188
+ it('preload does not throw', async () => {
189
+ const registry = new StoreRegistry();
190
+ // Create invalid options that would cause an error
191
+ const badOptions = testStoreOptions({
192
+ // @ts-expect-error - intentionally passing invalid adapter to trigger error
193
+ adapter: null,
194
+ });
195
+ // preload should not throw
196
+ await expect(registry.preload(badOptions)).resolves.toBeUndefined();
197
+ // But subsequent getOrLoadStore should throw the cached error
198
+ expect(() => registry.getOrLoadPromise(badOptions)).toThrow();
199
+ });
200
+ it('handles rapid retain/release cycles without errors', async () => {
201
+ const unusedCacheTime = 50;
202
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
203
+ const options = testStoreOptions();
204
+ const store = await registry.getOrLoadPromise(options);
205
+ // Rapidly retain and release multiple times
206
+ for (let i = 0; i < 10; i++) {
207
+ const release = registry.retain(options);
208
+ release();
209
+ }
210
+ // Wait for disposal to trigger
211
+ await sleep(unusedCacheTime + 50);
212
+ // Store should be disposed after the last release
213
+ const nextStore = await registry.getOrLoadPromise(options);
214
+ expect(nextStore).not.toBe(store);
215
+ await nextStore.shutdownPromise();
216
+ });
217
+ it('cancels disposal when new retain', async () => {
218
+ const unusedCacheTime = 50;
219
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
220
+ const options = testStoreOptions();
221
+ const store = await registry.getOrLoadPromise(options);
222
+ // Wait almost to disposal threshold
223
+ await sleep(unusedCacheTime - 5);
224
+ // Add a new retain before disposal triggers
225
+ const release = registry.retain(options);
226
+ // Complete the original unusedCacheTime
227
+ await sleep(5);
228
+ // Store should not have been disposed because we added a retain
229
+ expect(registry.getOrLoadPromise(options)).toBe(store);
230
+ // Clean up
231
+ release();
232
+ await sleep(unusedCacheTime + 50);
233
+ // Now it should be disposed
234
+ const nextStore = await registry.getOrLoadPromise(options);
235
+ expect(nextStore).not.toBe(store);
236
+ await nextStore.shutdownPromise();
237
+ });
238
+ it('aborts loading when disposal fires while store is still loading', async () => {
239
+ const unusedCacheTime = 10;
240
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
241
+ const options = testStoreOptions();
242
+ // Retain briefly to trigger getOrLoadStore and then release
243
+ const release = registry.retain(options);
244
+ // Start loading
245
+ const loadPromise = registry.getOrLoadPromise(options);
246
+ // Attach a catch handler to prevent unhandled rejection when the load is aborted
247
+ const abortedPromise = loadPromise.catch(() => {
248
+ // Expected: load was aborted by disposal
249
+ });
250
+ // Release immediately, which schedules disposal
251
+ release();
252
+ // Wait for disposal to trigger
253
+ await sleep(unusedCacheTime + 50);
254
+ // Wait for the abort to complete
255
+ await abortedPromise;
256
+ // After abort, a new getOrLoadStore should start a fresh load
257
+ const freshLoadPromise = registry.getOrLoadPromise(options);
258
+ // This should be a new promise (not the aborted one)
259
+ expect(freshLoadPromise).toBeInstanceOf(Promise);
260
+ expect(freshLoadPromise).not.toBe(loadPromise);
261
+ // Wait for fresh load to complete
262
+ const store = await freshLoadPromise;
263
+ expect(store).toBeDefined();
264
+ await store.shutdownPromise();
265
+ });
266
+ it('retain keeps store alive past unusedCacheTime', async () => {
267
+ const unusedCacheTime = 50;
268
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
269
+ const options = testStoreOptions();
270
+ // Load the store
271
+ const store = await registry.getOrLoadPromise(options);
272
+ // Retain the store before disposal could fire
273
+ const release = registry.retain(options);
274
+ // Wait past the unusedCacheTime
275
+ await sleep(unusedCacheTime + 50);
276
+ // Store should still be cached because retain keeps it alive
277
+ const cachedStore = registry.getOrLoadPromise(options);
278
+ expect(cachedStore).toBe(store);
279
+ release();
280
+ await store.shutdownPromise();
281
+ });
282
+ it('manages multiple stores with different IDs independently', async () => {
283
+ const unusedCacheTime = 50;
284
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
285
+ const options1 = testStoreOptions({ storeId: 'store-1' });
286
+ const options2 = testStoreOptions({ storeId: 'store-2' });
287
+ const store1 = await registry.getOrLoadPromise(options1);
288
+ const store2 = await registry.getOrLoadPromise(options2);
289
+ // Should be different store instances
290
+ expect(store1).not.toBe(store2);
291
+ // Both should be cached independently
292
+ expect(registry.getOrLoadPromise(options1)).toBe(store1);
293
+ expect(registry.getOrLoadPromise(options2)).toBe(store2);
294
+ // Wait for both stores to be disposed
295
+ await sleep(unusedCacheTime + 50);
296
+ // Both stores should be disposed, so next getOrLoadStore creates new ones
297
+ const newStore1 = await registry.getOrLoadPromise(options1);
298
+ expect(newStore1).not.toBe(store1);
299
+ const newStore2 = await registry.getOrLoadPromise(options2);
300
+ expect(newStore2).not.toBe(store2);
301
+ // Clean up
302
+ await newStore1.shutdownPromise();
303
+ await newStore2.shutdownPromise();
304
+ });
305
+ it('applies default options from constructor', async () => {
306
+ const registry = new StoreRegistry({
307
+ defaultOptions: {
308
+ unusedCacheTime: 100,
309
+ },
310
+ });
311
+ const options = testStoreOptions();
312
+ const store = await registry.getOrLoadPromise(options);
313
+ // Verify the store loads successfully
314
+ expect(store).toBeDefined();
315
+ expect(store[StoreInternalsSymbol].clientSession.debugInstanceId).toBeDefined();
316
+ // Verify configured default unusedCacheTime is applied by checking disposal doesn't happen before it
317
+ await sleep(50);
318
+ // Store should still be cached after 50ms (default is 100ms)
319
+ expect(registry.getOrLoadPromise(options)).toBe(store);
320
+ await store.shutdownPromise();
321
+ });
322
+ it('prevents getOrLoadStore from returning a dying store', async () => {
323
+ const unusedCacheTime = 25;
324
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
325
+ const options = testStoreOptions();
326
+ // Load the store and wait for it to be ready
327
+ const originalStore = await registry.getOrLoadPromise(options);
328
+ // Verify store is cached
329
+ expect(registry.getOrLoadPromise(options)).toBe(originalStore);
330
+ // Wait for disposal to trigger
331
+ await sleep(unusedCacheTime + 50);
332
+ // After disposal, the cache should be cleared
333
+ // Calling getOrLoadStore should start a fresh load (return Promise)
334
+ const storeOrPromise = registry.getOrLoadPromise(options);
335
+ if (!(storeOrPromise instanceof Promise)) {
336
+ expect.fail('getOrLoadStore returned dying store synchronously instead of starting fresh load');
337
+ }
338
+ const freshStore = await storeOrPromise;
339
+ // A fresh load was triggered because cache was cleared
340
+ expect(freshStore).not.toBe(originalStore);
341
+ await freshStore.shutdownPromise();
342
+ });
343
+ it('warms the cache so subsequent getOrLoadStore is synchronous after preload', async () => {
344
+ const registry = new StoreRegistry();
345
+ const options = testStoreOptions();
346
+ // Preload the store
347
+ await registry.preload(options);
348
+ // Subsequent getOrLoadStore should return synchronously (not a Promise)
349
+ const store = registry.getOrLoadPromise(options);
350
+ expect(store).not.toBeInstanceOf(Promise);
351
+ // TypeScript doesn't narrow the type, so we need to assert
352
+ if (store instanceof Promise) {
353
+ throw new Error('Expected store, got Promise');
354
+ }
355
+ // Clean up
356
+ await store.shutdownPromise();
357
+ });
358
+ it('schedules disposal after preload if no retainers are added', async () => {
359
+ const unusedCacheTime = 50;
360
+ const registry = new StoreRegistry({ defaultOptions: { unusedCacheTime } });
361
+ const options = testStoreOptions();
362
+ // Preload without retaining
363
+ await registry.preload(options);
364
+ // Get the store
365
+ const store = registry.getOrLoadPromise(options);
366
+ expect(store).not.toBeInstanceOf(Promise);
367
+ // Wait for disposal to trigger
368
+ await sleep(unusedCacheTime + 50);
369
+ // Store should be disposed since no retainers were added
370
+ const nextStore = await registry.getOrLoadPromise(options);
371
+ expect(nextStore).not.toBe(store);
372
+ await nextStore.shutdownPromise();
373
+ });
374
+ });
375
+ const testStoreOptions = (overrides = {}) => storeOptions({
376
+ storeId: 'test-store',
377
+ schema,
378
+ adapter: makeInMemoryAdapter(),
379
+ ...overrides,
380
+ });
381
+ //# sourceMappingURL=StoreRegistry.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreRegistry.test.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/StoreRegistry.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA6B,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,QAAQ,GAAG,IAAI,aAAa,EAAE,CAAA;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAA;QAE5D,MAAM,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QAEtC,WAAW;QACX,MAAM,KAAK,GAAG,MAAM,MAAM,CAAA;QAC1B,MAAM,KAAK,CAAC,eAAe,EAAE,CAAA;IAC/B,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8DAA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rB,MAAM;IACN,OAAO,EAAE,mBAAmB,EAAE;IAC9B,GAAG,SAAS;CACb,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import type { StoreRegistry } from './StoreRegistry.ts';
3
+ export declare const StoreRegistryContext: React.Context<StoreRegistry | undefined>;
4
+ export type StoreRegistryProviderProps = {
5
+ storeRegistry: StoreRegistry;
6
+ children: React.ReactNode;
7
+ };
8
+ export declare const StoreRegistryProvider: ({ storeRegistry, children }: StoreRegistryProviderProps) => React.JSX.Element;
9
+ export declare const useStoreRegistry: (override?: StoreRegistry) => StoreRegistry;
10
+ //# sourceMappingURL=StoreRegistryContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreRegistryContext.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/StoreRegistryContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,eAAO,MAAM,oBAAoB,0CAA4D,CAAA;AAE7F,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,aAAa,CAAA;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,6BAA6B,0BAA0B,KAAG,KAAK,CAAC,GAAG,CAAC,OAEzG,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,WAAW,aAAa,kBAQxD,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ export const StoreRegistryContext = React.createContext(undefined);
4
+ export const StoreRegistryProvider = ({ storeRegistry, children }) => {
5
+ return _jsx(StoreRegistryContext, { value: storeRegistry, children: children });
6
+ };
7
+ export const useStoreRegistry = (override) => {
8
+ if (override)
9
+ return override;
10
+ const storeRegistry = React.use(StoreRegistryContext);
11
+ if (!storeRegistry)
12
+ throw new Error('useStoreRegistry() must be used within <StoreRegistryProvider>');
13
+ return storeRegistry;
14
+ };
15
+ //# sourceMappingURL=StoreRegistryContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreRegistryContext.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/StoreRegistryContext.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAA4B,SAAS,CAAC,CAAA;AAO7F,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,aAAa,EAAE,QAAQ,EAA8B,EAAqB,EAAE;IAClH,OAAO,KAAC,oBAAoB,IAAC,KAAK,EAAE,aAAa,YAAG,QAAQ,GAAwB,CAAA;AACtF,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAwB,EAAE,EAAE;IAC3D,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE7B,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;IAErD,IAAI,CAAC,aAAa;QAAE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAA;IAErG,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './StoreRegistry.ts';
2
+ export * from './StoreRegistryContext.tsx';
3
+ export * from './storeOptions.ts';
4
+ export * from './types.ts';
5
+ export * from './useStore.ts';
6
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/mod.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from "./StoreRegistry.js";
2
+ export * from "./StoreRegistryContext.js";
3
+ export * from "./storeOptions.js";
4
+ export * from "./types.js";
5
+ export * from "./useStore.js";
6
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/mod.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,2BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { LiveStoreSchema } from '@livestore/common/schema';
2
+ import type { CachedStoreOptions } from './types.ts';
3
+ export declare function storeOptions<TSchema extends LiveStoreSchema>(options: CachedStoreOptions<TSchema>): CachedStoreOptions<TSchema>;
4
+ //# sourceMappingURL=storeOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeOptions.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/storeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,wBAAgB,YAAY,CAAC,OAAO,SAAS,eAAe,EAC1D,OAAO,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACnC,kBAAkB,CAAC,OAAO,CAAC,CAE7B"}
@@ -0,0 +1,4 @@
1
+ export function storeOptions(options) {
2
+ return options;
3
+ }
4
+ //# sourceMappingURL=storeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeOptions.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/storeOptions.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,YAAY,CAC1B,OAAoC;IAEpC,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { LiveStoreSchema } from '@livestore/common/schema';
2
+ import type { CreateStoreOptions, OtelOptions } from '@livestore/livestore';
3
+ export type CachedStoreOptions<TSchema extends LiveStoreSchema = LiveStoreSchema.Any, TContext = {}> = Pick<CreateStoreOptions<TSchema, TContext>, 'storeId' | 'schema' | 'adapter' | 'boot' | 'batchUpdates' | 'disableDevtools' | 'confirmUnsavedChanges' | 'syncPayload' | 'debug' | 'shutdownDeferred'> & {
4
+ signal?: AbortSignal;
5
+ otelOptions?: Partial<OtelOptions>;
6
+ /**
7
+ * The time in milliseconds that this store should remain
8
+ * in memory after becoming unused. When this store becomes
9
+ * unused (no active retentions), it will be disposed after this duration.
10
+ *
11
+ * Stores transition to the unused state as soon as they have no
12
+ * active retentions, so when all components which use that store
13
+ * have unmounted.
14
+ *
15
+ * @remarks
16
+ * - When different `unusedCacheTime` values are used for the same store, the longest one will be used.
17
+ * - If set to `Infinity`, will disable automatic disposal
18
+ * - The maximum allowed time is about {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#maximum_delay_value | 24 days}
19
+ *
20
+ * @defaultValue `60_000` (60 seconds) or `Infinity` during SSR to avoid
21
+ * disposing stores before server render completes.
22
+ */
23
+ unusedCacheTime?: number;
24
+ };
25
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAE3E,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,eAAe,GAAG,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,EAAE,IAAI,IAAI,CACzG,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,EACnC,SAAS,GACT,QAAQ,GACR,SAAS,GACT,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,uBAAuB,GACvB,aAAa,GACb,OAAO,GACP,kBAAkB,CACrB,GAAG;IACF,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAClC;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { LiveStoreSchema } from '@livestore/common/schema';
2
+ import type { Store } from '@livestore/livestore';
3
+ import type { ReactApi } from '../../LiveStoreContext.ts';
4
+ import type { CachedStoreOptions } from './types.ts';
5
+ /**
6
+ * Suspense and Error Boundary friendly hook.
7
+ * - Returns data or throws (Promise|Error).
8
+ * - No loading or error states are returned.
9
+ */
10
+ export declare const useStore: <TSchema extends LiveStoreSchema>(options: CachedStoreOptions<TSchema>) => Store<TSchema> & ReactApi;
11
+ //# sourceMappingURL=useStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/useStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAGzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,eAAe,EACtD,SAAS,kBAAkB,CAAC,OAAO,CAAC,KACnC,KAAK,CAAC,OAAO,CAAC,GAAG,QAUnB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { withReactApi } from "../../useStore.js";
3
+ import { useStoreRegistry } from "./StoreRegistryContext.js";
4
+ /**
5
+ * Suspense and Error Boundary friendly hook.
6
+ * - Returns data or throws (Promise|Error).
7
+ * - No loading or error states are returned.
8
+ */
9
+ export const useStore = (options) => {
10
+ const storeRegistry = useStoreRegistry();
11
+ React.useEffect(() => storeRegistry.retain(options), [storeRegistry, options]);
12
+ const storeOrPromise = React.useMemo(() => storeRegistry.getOrLoadPromise(options), [storeRegistry, options]);
13
+ const store = storeOrPromise instanceof Promise ? React.use(storeOrPromise) : storeOrPromise;
14
+ return withReactApi(store);
15
+ };
16
+ //# sourceMappingURL=useStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStore.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/useStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA4B,CAAA;AAG7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAAoC,EACT,EAAE;IAC7B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IAExC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAA;IAE9E,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAA;IAE7G,MAAM,KAAK,GAAG,cAAc,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAA;IAE5F,OAAO,YAAY,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useStore.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStore.test.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/useStore.test.tsx"],"names":[],"mappings":""}