@livestore/react 0.4.0-dev.20 → 0.4.0-dev.22
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/.tsbuildinfo +1 -1
- package/dist/StoreRegistryContext.d.ts +56 -0
- package/dist/StoreRegistryContext.d.ts.map +1 -0
- package/dist/StoreRegistryContext.js +61 -0
- package/dist/StoreRegistryContext.js.map +1 -0
- package/dist/__tests__/fixture.d.ts.map +1 -1
- package/dist/__tests__/fixture.js +1 -6
- package/dist/__tests__/fixture.js.map +1 -1
- package/dist/experimental/components/LiveList.d.ts +4 -2
- package/dist/experimental/components/LiveList.d.ts.map +1 -1
- package/dist/experimental/components/LiveList.js +6 -5
- package/dist/experimental/components/LiveList.js.map +1 -1
- package/dist/experimental/mod.d.ts +0 -1
- package/dist/experimental/mod.d.ts.map +1 -1
- package/dist/experimental/mod.js +0 -1
- package/dist/experimental/mod.js.map +1 -1
- package/dist/mod.d.ts +4 -3
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +3 -2
- package/dist/mod.js.map +1 -1
- package/dist/useClientDocument.d.ts +33 -0
- package/dist/useClientDocument.d.ts.map +1 -1
- package/dist/useClientDocument.js +1 -4
- package/dist/useClientDocument.js.map +1 -1
- package/dist/useQuery.d.ts +1 -1
- package/dist/useQuery.d.ts.map +1 -1
- package/dist/useQuery.js +2 -5
- package/dist/useQuery.js.map +1 -1
- package/dist/useStore.d.ts +62 -7
- package/dist/useStore.d.ts.map +1 -1
- package/dist/useStore.js +73 -15
- package/dist/useStore.js.map +1 -1
- package/dist/useStore.test.d.ts.map +1 -0
- package/dist/useStore.test.js +196 -0
- package/dist/useStore.test.js.map +1 -0
- package/package.json +7 -7
- package/src/StoreRegistryContext.tsx +69 -0
- package/src/__tests__/fixture.tsx +1 -13
- package/src/experimental/components/LiveList.tsx +13 -4
- package/src/experimental/mod.ts +0 -1
- package/src/mod.ts +4 -3
- package/src/useClientDocument.ts +36 -5
- package/src/useQuery.ts +2 -6
- package/src/useStore.test.tsx +271 -0
- package/src/useStore.ts +102 -23
- package/dist/LiveStoreContext.d.ts +0 -13
- package/dist/LiveStoreContext.d.ts.map +0 -1
- package/dist/LiveStoreContext.js +0 -3
- package/dist/LiveStoreContext.js.map +0 -1
- package/dist/LiveStoreProvider.d.ts +0 -66
- package/dist/LiveStoreProvider.d.ts.map +0 -1
- package/dist/LiveStoreProvider.js +0 -232
- package/dist/LiveStoreProvider.js.map +0 -1
- package/dist/LiveStoreProvider.test.d.ts +0 -2
- package/dist/LiveStoreProvider.test.d.ts.map +0 -1
- package/dist/LiveStoreProvider.test.js +0 -117
- package/dist/LiveStoreProvider.test.js.map +0 -1
- package/dist/experimental/multi-store/StoreRegistry.d.ts +0 -61
- package/dist/experimental/multi-store/StoreRegistry.d.ts.map +0 -1
- package/dist/experimental/multi-store/StoreRegistry.js +0 -275
- package/dist/experimental/multi-store/StoreRegistry.js.map +0 -1
- package/dist/experimental/multi-store/StoreRegistry.test.d.ts +0 -2
- package/dist/experimental/multi-store/StoreRegistry.test.d.ts.map +0 -1
- package/dist/experimental/multi-store/StoreRegistry.test.js +0 -464
- package/dist/experimental/multi-store/StoreRegistry.test.js.map +0 -1
- package/dist/experimental/multi-store/StoreRegistryContext.d.ts +0 -10
- package/dist/experimental/multi-store/StoreRegistryContext.d.ts.map +0 -1
- package/dist/experimental/multi-store/StoreRegistryContext.js +0 -15
- package/dist/experimental/multi-store/StoreRegistryContext.js.map +0 -1
- package/dist/experimental/multi-store/mod.d.ts +0 -6
- package/dist/experimental/multi-store/mod.d.ts.map +0 -1
- package/dist/experimental/multi-store/mod.js +0 -6
- package/dist/experimental/multi-store/mod.js.map +0 -1
- package/dist/experimental/multi-store/storeOptions.d.ts +0 -4
- package/dist/experimental/multi-store/storeOptions.d.ts.map +0 -1
- package/dist/experimental/multi-store/storeOptions.js +0 -4
- package/dist/experimental/multi-store/storeOptions.js.map +0 -1
- package/dist/experimental/multi-store/types.d.ts +0 -44
- package/dist/experimental/multi-store/types.d.ts.map +0 -1
- package/dist/experimental/multi-store/types.js +0 -2
- package/dist/experimental/multi-store/types.js.map +0 -1
- package/dist/experimental/multi-store/useStore.d.ts +0 -11
- package/dist/experimental/multi-store/useStore.d.ts.map +0 -1
- package/dist/experimental/multi-store/useStore.js +0 -21
- package/dist/experimental/multi-store/useStore.js.map +0 -1
- package/dist/experimental/multi-store/useStore.test.d.ts.map +0 -1
- package/dist/experimental/multi-store/useStore.test.js +0 -144
- package/dist/experimental/multi-store/useStore.test.js.map +0 -1
- package/src/LiveStoreContext.ts +0 -14
- package/src/LiveStoreProvider.test.tsx +0 -248
- package/src/LiveStoreProvider.tsx +0 -421
- package/src/experimental/multi-store/StoreRegistry.test.ts +0 -631
- package/src/experimental/multi-store/StoreRegistry.ts +0 -347
- package/src/experimental/multi-store/StoreRegistryContext.tsx +0 -23
- package/src/experimental/multi-store/mod.ts +0 -5
- package/src/experimental/multi-store/storeOptions.ts +0 -8
- package/src/experimental/multi-store/types.ts +0 -55
- package/src/experimental/multi-store/useStore.test.tsx +0 -197
- package/src/experimental/multi-store/useStore.ts +0 -34
- /package/dist/{experimental/multi-store/useStore.test.d.ts → useStore.test.d.ts} +0 -0
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { createStorePromise } from '@livestore/livestore';
|
|
2
|
-
/**
|
|
3
|
-
* Default time to keep unused stores in cache.
|
|
4
|
-
*
|
|
5
|
-
* - Browser: 60 seconds (60,000ms)
|
|
6
|
-
* - SSR: Infinity (disables disposal to avoid disposing stores before server render completes)
|
|
7
|
-
*
|
|
8
|
-
* @internal Exported primarily for testing purposes.
|
|
9
|
-
*/
|
|
10
|
-
export const DEFAULT_UNUSED_CACHE_TIME = typeof window === 'undefined' ? Number.POSITIVE_INFINITY : 60_000;
|
|
11
|
-
/**
|
|
12
|
-
* @typeParam TSchema - The schema for this entry's store.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
class StoreEntry {
|
|
16
|
-
#storeId;
|
|
17
|
-
#cache;
|
|
18
|
-
#state = { status: 'idle' };
|
|
19
|
-
#unusedCacheTime;
|
|
20
|
-
#disposalTimeout;
|
|
21
|
-
/**
|
|
22
|
-
* Set of subscriber callbacks to notify on state changes.
|
|
23
|
-
*/
|
|
24
|
-
#subscribers = new Set();
|
|
25
|
-
constructor(storeId, cache) {
|
|
26
|
-
this.#storeId = storeId;
|
|
27
|
-
this.#cache = cache;
|
|
28
|
-
}
|
|
29
|
-
#scheduleDisposal = () => {
|
|
30
|
-
this.#cancelDisposal();
|
|
31
|
-
const effectiveTime = this.#unusedCacheTime === undefined ? DEFAULT_UNUSED_CACHE_TIME : this.#unusedCacheTime;
|
|
32
|
-
if (effectiveTime === Number.POSITIVE_INFINITY)
|
|
33
|
-
return; // Infinity disables disposal
|
|
34
|
-
this.#disposalTimeout = setTimeout(() => {
|
|
35
|
-
this.#disposalTimeout = null;
|
|
36
|
-
// Re-check to avoid racing with a new subscription
|
|
37
|
-
if (this.#subscribers.size > 0)
|
|
38
|
-
return;
|
|
39
|
-
// Abort any in-progress loading to release resources early
|
|
40
|
-
this.#abortLoading();
|
|
41
|
-
// Transition to shutting_down state BEFORE starting async shutdown.
|
|
42
|
-
// This prevents new subscribers from receiving a store that's about to be disposed.
|
|
43
|
-
const shutdownPromise = this.#shutdown().finally(() => {
|
|
44
|
-
// Reset to idle so fresh loads can proceed, then remove from cache if still inactive
|
|
45
|
-
this.#setIdle();
|
|
46
|
-
if (this.#subscribers.size === 0)
|
|
47
|
-
this.#cache.delete(this.#storeId);
|
|
48
|
-
});
|
|
49
|
-
this.#setShuttingDown(shutdownPromise);
|
|
50
|
-
}, effectiveTime);
|
|
51
|
-
};
|
|
52
|
-
#cancelDisposal = () => {
|
|
53
|
-
if (!this.#disposalTimeout)
|
|
54
|
-
return;
|
|
55
|
-
clearTimeout(this.#disposalTimeout);
|
|
56
|
-
this.#disposalTimeout = null;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Transitions to the loading state.
|
|
60
|
-
*/
|
|
61
|
-
#setLoading(promise, abortController) {
|
|
62
|
-
if (this.#state.status === 'success' || this.#state.status === 'loading')
|
|
63
|
-
return;
|
|
64
|
-
this.#state = { status: 'loading', promise, abortController };
|
|
65
|
-
this.#notify();
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Transitions to the success state.
|
|
69
|
-
*/
|
|
70
|
-
#setStore = (store) => {
|
|
71
|
-
this.#state = { status: 'success', store };
|
|
72
|
-
this.#notify();
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Transitions to the error state.
|
|
76
|
-
*/
|
|
77
|
-
#setError = (error) => {
|
|
78
|
-
this.#state = { status: 'error', error };
|
|
79
|
-
this.#notify();
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Transitions to the shutting_down state.
|
|
83
|
-
*/
|
|
84
|
-
#setShuttingDown = (shutdownPromise) => {
|
|
85
|
-
this.#state = { status: 'shutting_down', shutdownPromise };
|
|
86
|
-
this.#notify();
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Transitions to the idle state.
|
|
90
|
-
*/
|
|
91
|
-
#setIdle = () => {
|
|
92
|
-
this.#state = { status: 'idle' };
|
|
93
|
-
// No notify needed - getOrLoad will handle the fresh load
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Notifies all subscribers of state changes.
|
|
97
|
-
*
|
|
98
|
-
* @remarks
|
|
99
|
-
* This should be called after any meaningful state change.
|
|
100
|
-
*/
|
|
101
|
-
#notify = () => {
|
|
102
|
-
for (const sub of this.#subscribers) {
|
|
103
|
-
try {
|
|
104
|
-
sub();
|
|
105
|
-
}
|
|
106
|
-
catch {
|
|
107
|
-
// Swallow to protect other listeners
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Subscribes to this entry's updates.
|
|
113
|
-
*
|
|
114
|
-
* @param listener - Callback invoked when the entry changes
|
|
115
|
-
* @returns Unsubscribe function
|
|
116
|
-
*/
|
|
117
|
-
subscribe = (listener) => {
|
|
118
|
-
this.#cancelDisposal();
|
|
119
|
-
this.#subscribers.add(listener);
|
|
120
|
-
return () => {
|
|
121
|
-
this.#subscribers.delete(listener);
|
|
122
|
-
// If no more subscribers remain, schedule disposal
|
|
123
|
-
if (this.#subscribers.size === 0)
|
|
124
|
-
this.#scheduleDisposal();
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Gets the loaded store or initiates loading if not already in progress.
|
|
129
|
-
*
|
|
130
|
-
* @param options - Store creation options
|
|
131
|
-
* @returns The loaded store if available, or a Promise that resolves to the loaded store
|
|
132
|
-
*
|
|
133
|
-
* @remarks
|
|
134
|
-
* This method handles the complete lifecycle of loading a store:
|
|
135
|
-
* - Returns the store directly if already loaded (synchronous)
|
|
136
|
-
* - Returns a Promise if loading is in progress or needs to be initiated
|
|
137
|
-
* - Transitions through loading → success/error states
|
|
138
|
-
* - Schedules disposal when loading completes without active subscribers
|
|
139
|
-
*/
|
|
140
|
-
getOrLoad = (options) => {
|
|
141
|
-
if (options.unusedCacheTime !== undefined)
|
|
142
|
-
this.#unusedCacheTime = Math.max(this.#unusedCacheTime ?? 0, options.unusedCacheTime);
|
|
143
|
-
if (this.#state.status === 'success')
|
|
144
|
-
return this.#state.store;
|
|
145
|
-
if (this.#state.status === 'loading')
|
|
146
|
-
return this.#state.promise;
|
|
147
|
-
if (this.#state.status === 'error')
|
|
148
|
-
throw this.#state.error;
|
|
149
|
-
// Wait for shutdown to complete, then recursively call to load a fresh store
|
|
150
|
-
if (this.#state.status === 'shutting_down') {
|
|
151
|
-
return this.#state.shutdownPromise.then(() => this.getOrLoad(options));
|
|
152
|
-
}
|
|
153
|
-
const abortController = new AbortController();
|
|
154
|
-
const promise = createStorePromise({ ...options, signal: abortController.signal })
|
|
155
|
-
.then((store) => {
|
|
156
|
-
this.#setStore(store);
|
|
157
|
-
return store;
|
|
158
|
-
})
|
|
159
|
-
.catch((error) => {
|
|
160
|
-
this.#setError(error);
|
|
161
|
-
throw error;
|
|
162
|
-
})
|
|
163
|
-
.finally(() => {
|
|
164
|
-
// The store entry may have become unused (no subscribers) while loading the store
|
|
165
|
-
if (this.#subscribers.size === 0)
|
|
166
|
-
this.#scheduleDisposal();
|
|
167
|
-
});
|
|
168
|
-
this.#setLoading(promise, abortController);
|
|
169
|
-
return promise;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Aborts an in-progress store load.
|
|
173
|
-
*
|
|
174
|
-
* This signals the createStorePromise to cancel, releasing resources like
|
|
175
|
-
* worker threads, SQLite connections, and network requests.
|
|
176
|
-
*/
|
|
177
|
-
#abortLoading = () => {
|
|
178
|
-
if (this.#state.status !== 'loading')
|
|
179
|
-
return;
|
|
180
|
-
this.#state.abortController.abort();
|
|
181
|
-
};
|
|
182
|
-
#shutdown = async () => {
|
|
183
|
-
if (this.#state.status !== 'success')
|
|
184
|
-
return;
|
|
185
|
-
await this.#state.store.shutdownPromise().catch((reason) => {
|
|
186
|
-
console.warn(`Store ${this.#storeId} failed to shutdown cleanly during disposal:`, reason);
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* In-memory map of {@link StoreEntry} instances keyed by {@link StoreId}.
|
|
192
|
-
*
|
|
193
|
-
* @privateRemarks
|
|
194
|
-
* The cache is intentionally small; eviction and disposal timers are coordinated by the client.
|
|
195
|
-
*
|
|
196
|
-
* @internal
|
|
197
|
-
*/
|
|
198
|
-
class StoreCache {
|
|
199
|
-
#entries = new Map();
|
|
200
|
-
get = (storeId) => {
|
|
201
|
-
return this.#entries.get(storeId);
|
|
202
|
-
};
|
|
203
|
-
ensure = (storeId) => {
|
|
204
|
-
let entry = this.#entries.get(storeId);
|
|
205
|
-
if (!entry) {
|
|
206
|
-
entry = new StoreEntry(storeId, this);
|
|
207
|
-
this.#entries.set(storeId, entry);
|
|
208
|
-
}
|
|
209
|
-
return entry;
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* Removes an entry from the cache.
|
|
213
|
-
*
|
|
214
|
-
* @param storeId - The ID of the store to remove
|
|
215
|
-
*/
|
|
216
|
-
delete = (storeId) => {
|
|
217
|
-
this.#entries.delete(storeId);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Store Registry coordinating store loading, caching, and subscription
|
|
222
|
-
*
|
|
223
|
-
* @public
|
|
224
|
-
*/
|
|
225
|
-
export class StoreRegistry {
|
|
226
|
-
#cache = new StoreCache();
|
|
227
|
-
#defaultOptions;
|
|
228
|
-
constructor({ defaultOptions = {} } = {}) {
|
|
229
|
-
this.#defaultOptions = defaultOptions;
|
|
230
|
-
}
|
|
231
|
-
#applyDefaultOptions = (options) => ({
|
|
232
|
-
...this.#defaultOptions,
|
|
233
|
-
...options,
|
|
234
|
-
});
|
|
235
|
-
/**
|
|
236
|
-
* Get or load a store, returning it directly if loaded or a promise if loading.
|
|
237
|
-
*
|
|
238
|
-
* @typeParam TSchema - The schema of the store to load
|
|
239
|
-
* @returns The loaded store if available, or a Promise that resolves to the loaded store
|
|
240
|
-
* @throws unknown loading error
|
|
241
|
-
*
|
|
242
|
-
* @remarks
|
|
243
|
-
* - Returns the store instance directly (synchronous) when already loaded
|
|
244
|
-
* - Returns a stable Promise reference when loading is in progress or needs to be initiated
|
|
245
|
-
* - Applies default options from registry config, with call-site options taking precedence
|
|
246
|
-
*/
|
|
247
|
-
getOrLoad = (options) => {
|
|
248
|
-
const optionsWithDefaults = this.#applyDefaultOptions(options);
|
|
249
|
-
const storeEntry = this.#cache.ensure(optionsWithDefaults.storeId);
|
|
250
|
-
return storeEntry.getOrLoad(optionsWithDefaults);
|
|
251
|
-
};
|
|
252
|
-
/**
|
|
253
|
-
* Warms the cache for a store without mounting a subscriber.
|
|
254
|
-
*
|
|
255
|
-
* @typeParam TSchema - The schema of the store to preload
|
|
256
|
-
* @returns A promise that resolves when the loading is complete (success or failure)
|
|
257
|
-
*
|
|
258
|
-
* @remarks
|
|
259
|
-
* - We don't return the store or throw as this is a fire-and-forget operation.
|
|
260
|
-
* - If the entry remains unused after preload resolves/rejects, it is scheduled for disposal.
|
|
261
|
-
*/
|
|
262
|
-
preload = async (options) => {
|
|
263
|
-
try {
|
|
264
|
-
await this.getOrLoad(options);
|
|
265
|
-
}
|
|
266
|
-
catch {
|
|
267
|
-
// Do nothing; preload is best-effort
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
subscribe = (storeId, listener) => {
|
|
271
|
-
const entry = this.#cache.ensure(storeId);
|
|
272
|
-
return entry.subscribe(listener);
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
//# sourceMappingURL=StoreRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StoreRegistry.js","sourceRoot":"","sources":["../../../src/experimental/multi-store/StoreRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAgC,MAAM,sBAAsB,CAAA;AAUvF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAA;AAE1G;;;GAGG;AACH,MAAM,UAAU;IACL,QAAQ,CAAS;IACjB,MAAM,CAAY;IAE3B,MAAM,GAA6B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;IAErD,gBAAgB,CAAS;IACzB,gBAAgB,CAAuC;IAEvD;;OAEG;IACM,YAAY,GAAG,IAAI,GAAG,EAAc,CAAA;IAE7C,YAAY,OAAgB,EAAE,KAAiB;QAC7C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED,iBAAiB,GAAG,GAAS,EAAE;QAC7B,IAAI,CAA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,CAAA;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,qCAAqC;QACvC,CAAC;IACH,CAAC,CAAA;IAED,SAAS,GAAG,CAAkC,OAAgB,EAAE,QAAoB,EAAe,EAAE;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAU,OAAO,CAAC,CAAA;QAElD,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAClC,CAAC,CAAA;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StoreRegistry.test.d.ts","sourceRoot":"","sources":["../../../src/experimental/multi-store/StoreRegistry.test.ts"],"names":[],"mappings":""}
|