@kdeveloper/kvark 0.17.0 → 0.18.0
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/README.md +111 -111
- package/dist/family.d.ts +12 -12
- package/dist/family.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/preact/index.d.ts +4 -4
- package/dist/preact/index.js +9 -9
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +9 -9
- package/dist/react/index.js.map +1 -1
- package/dist/{store-DSvJVL5c.js → store-CTGJpxoI.js} +45 -45
- package/dist/store-CTGJpxoI.js.map +1 -0
- package/dist/{types-CHPLxaFJ.d.ts → types-DOyqUVX8.d.ts} +26 -26
- package/dist/vue/index.d.ts +4 -4
- package/dist/vue/index.js +9 -9
- package/dist/vue/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/store-DSvJVL5c.js.map +0 -1
package/dist/family.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as atom, C as InfinityFamilyAtom, D as infinityAtom, E as InfinityAtomOptions, S as InfinityAtomFamilyOptions, T as InfiniteData, a as AtomState, b as mutation, d as StalePolicy, f as WritableAtom, h as RegisteredContext, i as AtomContext, l as MutationContext, m as Register, o as AtomValue, p as WritableAtomContext, r as AtomConfig, s as DependencyEntry, t as Atom, u as RetryDelay, v as createStore, w as infinityAtomFamily, x as InfinityAtomFamily, y as Mutation } from "./types-
|
|
1
|
+
import { A as atom, C as InfinityFamilyAtom, D as infinityAtom, E as InfinityAtomOptions, S as InfinityAtomFamilyOptions, T as InfiniteData, a as AtomState, b as mutation, d as StalePolicy, f as WritableAtom, h as RegisteredContext, i as AtomContext, l as MutationContext, m as Register, o as AtomValue, p as WritableAtomContext, r as AtomConfig, s as DependencyEntry, t as Atom, u as RetryDelay, v as createStore, w as infinityAtomFamily, x as InfinityAtomFamily, y as Mutation } from "./types-DOyqUVX8.js";
|
|
2
2
|
|
|
3
3
|
//#region src/internal/family-batch-schedulers.d.ts
|
|
4
4
|
type BatchSchedulerContext = {
|
|
@@ -30,18 +30,18 @@ type AtomFamilyBaseOptions<Param, Key = Param> = {
|
|
|
30
30
|
lruSize?: number;
|
|
31
31
|
debugLabel?: string;
|
|
32
32
|
/**
|
|
33
|
-
* If `false`, the store will not auto-invalidate the atom after a successful `
|
|
34
|
-
* Use this when the family's `
|
|
35
|
-
* `ctx.setOptimisticValue` and there is no need to re-run `
|
|
36
|
-
* Defaults to `true` (matches the typical CRUD pattern: `
|
|
37
|
-
* `
|
|
33
|
+
* If `false`, the store will not auto-invalidate the atom after a successful `write`.
|
|
34
|
+
* Use this when the family's `write` writes the authoritative next value via
|
|
35
|
+
* `ctx.setOptimisticValue` and there is no need to re-run `read` to converge.
|
|
36
|
+
* Defaults to `true` (matches the typical CRUD pattern: `write` mutates the server,
|
|
37
|
+
* `read` then refetches the canonical state).
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
invalidateAfterWrite?: boolean;
|
|
40
40
|
/**
|
|
41
41
|
* Optional function to derive a stable cache key from `param`.
|
|
42
42
|
* Use when `Param` is an object and you want equality-by-value semantics.
|
|
43
43
|
* The returned key is used for all cache operations (get, set, LRU, invalidate, remove).
|
|
44
|
-
* The original `param` is still passed to `
|
|
44
|
+
* The original `param` is still passed to `read`, `write`, and `dependencies`.
|
|
45
45
|
*
|
|
46
46
|
* For plain objects/arrays you can use `stableFamilyKey` from `@kdeveloper/kvark/family`.
|
|
47
47
|
* Treat the param object as immutable after the first call — `stableFamilyKey` memoises
|
|
@@ -51,8 +51,8 @@ type AtomFamilyBaseOptions<Param, Key = Param> = {
|
|
|
51
51
|
};
|
|
52
52
|
type AtomFamilyGetOptions<Param, Value, Deps extends Record<string, DependencyEntry>, Args extends readonly unknown[], Key = Param> = AtomFamilyBaseOptions<Param, Key> & {
|
|
53
53
|
dependencies?: (param: Param) => Deps;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
read: (param: Param) => (ctx: AtomContext<Deps>) => Promise<Value>;
|
|
55
|
+
write?: (param: Param) => (ctx: WritableAtomContext<Deps, Value>, ...args: Args) => Promise<void>;
|
|
56
56
|
batch?: never;
|
|
57
57
|
};
|
|
58
58
|
type AtomFamilyBatchOptions<Param, Value, Deps extends Record<string, DependencyEntry>, Key = Param> = AtomFamilyBaseOptions<Param, Key> & {
|
|
@@ -66,8 +66,8 @@ type AtomFamilyBatchOptions<Param, Value, Deps extends Record<string, Dependency
|
|
|
66
66
|
fetch: (input: BatchFetchInput<Param, Key, Deps>) => Promise<Map<Key, Value>>;
|
|
67
67
|
scheduler?: BatchScheduler;
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
read?: never;
|
|
70
|
+
write?: never;
|
|
71
71
|
};
|
|
72
72
|
type AtomFamilyOptions<Param, Value, Deps extends Record<string, DependencyEntry>, Args extends readonly unknown[], Key = Param> = AtomFamilyGetOptions<Param, Value, Deps, Args, Key> | AtomFamilyBatchOptions<Param, Value, Deps, Key>;
|
|
73
73
|
interface AtomFamily<Param, Value, Key = Param> {
|
package/dist/family.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as microtaskScheduler, c as infinityAtomFamily, i as maxBatchSizeScheduler, l as infinityAtom, n as mutation, o as windowScheduler, r as atomFamily, s as windowedFiniteBatchScheduler, t as createStore, u as atom } from "./store-
|
|
1
|
+
import { a as microtaskScheduler, c as infinityAtomFamily, i as maxBatchSizeScheduler, l as infinityAtom, n as mutation, o as windowScheduler, r as atomFamily, s as windowedFiniteBatchScheduler, t as createStore, u as atom } from "./store-CTGJpxoI.js";
|
|
2
2
|
//#region src/internal/stable-family-key.ts
|
|
3
3
|
/**
|
|
4
4
|
* Produces a deterministic string key for plain-object/array/primitive values.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as atom, C as InfinityFamilyAtom, D as infinityAtom, E as InfinityAtomOptions, O as SimpleAtomOptions, S as InfinityAtomFamilyOptions, T as InfiniteData, _ as StoreClient, a as AtomState, b as mutation, c as IsWritable, d as StalePolicy, f as WritableAtom, h as RegisteredContext, i as AtomContext, k as
|
|
2
|
-
export { Atom, AtomArgs, AtomConfig, AtomContext, AtomState, AtomValue, InfiniteData, InfinityAtomFamily, InfinityAtomFamilyOptions, InfinityAtomOptions, InfinityFamilyAtom, IsWritable, Mutation, MutationContext, Register, RegisteredContext, RetryDelay, SimpleAtomOptions,
|
|
1
|
+
import { A as atom, C as InfinityFamilyAtom, D as infinityAtom, E as InfinityAtomOptions, O as SimpleAtomOptions, S as InfinityAtomFamilyOptions, T as InfiniteData, _ as StoreClient, a as AtomState, b as mutation, c as IsWritable, d as StalePolicy, f as WritableAtom, h as RegisteredContext, i as AtomContext, k as SimpleAtomWriteArg, l as MutationContext, m as Register, n as AtomArgs, o as AtomValue, p as WritableAtomContext, r as AtomConfig, t as Atom, u as RetryDelay, v as createStore, w as infinityAtomFamily, x as InfinityAtomFamily, y as Mutation } from "./types-DOyqUVX8.js";
|
|
2
|
+
export { Atom, AtomArgs, AtomConfig, AtomContext, AtomState, AtomValue, InfiniteData, InfinityAtomFamily, InfinityAtomFamilyOptions, InfinityAtomOptions, InfinityFamilyAtom, IsWritable, Mutation, MutationContext, Register, RegisteredContext, RetryDelay, SimpleAtomOptions, SimpleAtomWriteArg, StalePolicy, StoreClient, WritableAtom, WritableAtomContext, atom, createStore, infinityAtom, infinityAtomFamily, mutation };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as infinityAtomFamily, l as infinityAtom, n as mutation, t as createStore, u as atom } from "./store-
|
|
1
|
+
import { c as infinityAtomFamily, l as infinityAtom, n as mutation, t as createStore, u as atom } from "./store-CTGJpxoI.js";
|
|
2
2
|
export { atom, createStore, infinityAtom, infinityAtomFamily, mutation };
|
package/dist/preact/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as StoreClient, f as WritableAtom, g as Store, t as Atom, y as Mutation } from "../types-
|
|
1
|
+
import { _ as StoreClient, f as WritableAtom, g as Store, t as Atom, y as Mutation } from "../types-DOyqUVX8.js";
|
|
2
2
|
import { ComponentChildren, VNode } from "preact";
|
|
3
3
|
|
|
4
4
|
//#region src/preact/provider.d.ts
|
|
@@ -23,8 +23,8 @@ declare function useAtomValue<V>(atom: Atom<V>, opts: {
|
|
|
23
23
|
observe: true;
|
|
24
24
|
}): ObservedValue<V>;
|
|
25
25
|
//#endregion
|
|
26
|
-
//#region src/preact/use-
|
|
27
|
-
declare function
|
|
26
|
+
//#region src/preact/use-apply-atom.d.ts
|
|
27
|
+
declare function useApplyAtom<V, A extends readonly unknown[]>(atom: WritableAtom<V, A>): (...args: A) => Promise<void>;
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/preact/use-mutation.d.ts
|
|
30
30
|
declare function useMutation<Args extends readonly unknown[]>(mutation: Mutation<Args>): (...args: Args) => Promise<void>;
|
|
@@ -38,5 +38,5 @@ declare function useAtomContext<R>(callback: (ctx: StoreClient) => Promise<R>):
|
|
|
38
38
|
//#region src/preact/use-stable-fn.d.ts
|
|
39
39
|
declare function useStableFn<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => R;
|
|
40
40
|
//#endregion
|
|
41
|
-
export { Provider, useAtom, useAtomContext, useAtomValue, useMutation,
|
|
41
|
+
export { Provider, useApplyAtom, useAtom, useAtomContext, useAtomValue, useMutation, useStableFn, useStore };
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/preact/index.js
CHANGED
|
@@ -64,10 +64,10 @@ function useAtomValue(atom, opts) {
|
|
|
64
64
|
const isInitialRender = initialRenderRef.current;
|
|
65
65
|
initialRenderRef.current = false;
|
|
66
66
|
const stalePolicy = atom[CONFIG].stalePolicy ?? "keep";
|
|
67
|
-
if (snapshot.status === "pending") throw store.
|
|
67
|
+
if (snapshot.status === "pending") throw store.read(atom);
|
|
68
68
|
if (snapshot.status === "stale") {
|
|
69
|
-
if (stalePolicy === "suspend") throw store.
|
|
70
|
-
store.
|
|
69
|
+
if (stalePolicy === "suspend") throw store.read(atom);
|
|
70
|
+
store.read(atom);
|
|
71
71
|
if (opts?.observe === true) return {
|
|
72
72
|
value: snapshot.value,
|
|
73
73
|
isStale: true,
|
|
@@ -81,7 +81,7 @@ function useAtomValue(atom, opts) {
|
|
|
81
81
|
isStale: false,
|
|
82
82
|
error: snapshot.error
|
|
83
83
|
};
|
|
84
|
-
if (isInitialRender) store.
|
|
84
|
+
if (isInitialRender) store.read(atom);
|
|
85
85
|
throw snapshot.error;
|
|
86
86
|
}
|
|
87
87
|
if (opts?.observe === true) return {
|
|
@@ -92,10 +92,10 @@ function useAtomValue(atom, opts) {
|
|
|
92
92
|
return snapshot.value;
|
|
93
93
|
}
|
|
94
94
|
//#endregion
|
|
95
|
-
//#region src/preact/use-
|
|
96
|
-
function
|
|
95
|
+
//#region src/preact/use-apply-atom.ts
|
|
96
|
+
function useApplyAtom(atom) {
|
|
97
97
|
const store = useStore();
|
|
98
|
-
return useCallback((...args) => store.
|
|
98
|
+
return useCallback((...args) => store.apply(atom, ...args), [store, atom]);
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/preact/use-mutation.ts
|
|
@@ -106,7 +106,7 @@ function useMutation(mutation) {
|
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/preact/use-atom.ts
|
|
108
108
|
function useAtom(atom) {
|
|
109
|
-
return [useAtomValue(atom),
|
|
109
|
+
return [useAtomValue(atom), useApplyAtom(atom)];
|
|
110
110
|
}
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/preact/use-atom-context.ts
|
|
@@ -115,6 +115,6 @@ function useAtomContext(callback) {
|
|
|
115
115
|
return useCallback(() => callback(store.getClient()), [store, callback]);
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
|
-
export { Provider, useAtom, useAtomContext, useAtomValue, useMutation,
|
|
118
|
+
export { Provider, useApplyAtom, useAtom, useAtomContext, useAtomValue, useMutation, useStableFn, useStore };
|
|
119
119
|
|
|
120
120
|
//# sourceMappingURL=index.js.map
|
package/dist/preact/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/preact/provider.tsx","../../src/preact/use-sync-external-store.ts","../../src/preact/use-stable-fn.ts","../../src/preact/use-atom-value.ts","../../src/preact/use-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/preact/provider.tsx","../../src/preact/use-sync-external-store.ts","../../src/preact/use-stable-fn.ts","../../src/preact/use-atom-value.ts","../../src/preact/use-apply-atom.ts","../../src/preact/use-mutation.ts","../../src/preact/use-atom.ts","../../src/preact/use-atom-context.ts"],"mappings":";;;;;;AAKA,MAAM,eAAe,cAA4B,KAAK;AAOtD,SAAgB,SAAS,EAAE,OAAO,YAAkC;CAClE,OAAO,oBAAC,aAAa,UAAd;EAAuB,OAAO;EAAQ;EAAiC,CAAA;;AAGhF,SAAgB,WAAkB;CAChC,MAAM,QAAQ,WAAW,aAAa;CACtC,IAAI,SAAS,MACX,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;;;;ACdT,SAAS,kBAAqB,MAAiC;CAC7D,IAAI;EACF,OAAO,CAAC,OAAO,GAAG,KAAK,QAAQ,KAAK,cAAc,CAAC;SAC7C;EACN,OAAO;;;AAIX,SAAgB,qBACd,WACA,aACG;CACH,MAAM,QAAQ,aAAa;CAE3B,MAAM,CAAC,EAAE,aAAa,eAAe,gBAAgB,EACnD,WAAW;EAAE,QAAQ;EAAO,cAAc;EAAa,EACxD,EAAE;CAEH,sBAAsB;EACpB,UAAU,SAAS;EACnB,UAAU,eAAe;EAEzB,IAAI,kBAAkB,UAAU,EAC9B,YAAY,EAAE,WAAW,CAAC;IAE3B;EAAC;EAAW;EAAO;EAAY,CAAC;CAEnC,gBAAgB;EACd,IAAI,kBAAkB,UAAU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/B,MAAM,QAAQ,UAAU;CACxB,OAAO,aAAa,GAAG,SAA2B,MAAM,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC,OAAO,KAAK,CAAC;;;;ACJ9F,SAAgB,YACd,UACkC;CAClC,MAAM,QAAQ,UAAU;CACxB,OAAO,aACJ,GAAG,SAA8B,MAAM,OAAO,UAAU,GAAG,KAAK,EACjE,CAAC,OAAO,SAAS,CAClB;;;;ACPH,SAAgB,QACd,MAC6C;CAG7C,OAAO,CAFO,aAAa,KAEd,EADE,aAAa,KACP,CAAC;;;;ACLxB,SAAgB,eAAkB,UAA8D;CAC9F,MAAM,QAAQ,UAAU;CACxB,OAAO,kBAA8B,SAAS,MAAM,WAAW,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as StoreClient, f as WritableAtom, g as Store, t as Atom, y as Mutation } from "../types-
|
|
1
|
+
import { _ as StoreClient, f as WritableAtom, g as Store, t as Atom, y as Mutation } from "../types-DOyqUVX8.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/react/provider.d.ts
|
|
@@ -23,8 +23,8 @@ declare function useAtomValue<V>(atom: Atom<V>, opts: {
|
|
|
23
23
|
observe: true;
|
|
24
24
|
}): ObservedValue<V>;
|
|
25
25
|
//#endregion
|
|
26
|
-
//#region src/react/use-
|
|
27
|
-
declare function
|
|
26
|
+
//#region src/react/use-apply-atom.d.ts
|
|
27
|
+
declare function useApplyAtom<V, A extends readonly unknown[]>(atom: WritableAtom<V, A>): (...args: A) => Promise<void>;
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/react/use-mutation.d.ts
|
|
30
30
|
declare function useMutation<Args extends readonly unknown[]>(mutation: Mutation<Args>): (...args: Args) => Promise<void>;
|
|
@@ -38,5 +38,5 @@ declare function useAtomContext<R>(callback: (ctx: StoreClient) => Promise<R>):
|
|
|
38
38
|
//#region src/react/use-stable-fn.d.ts
|
|
39
39
|
declare function useStableFn<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => R;
|
|
40
40
|
//#endregion
|
|
41
|
-
export { Provider, useAtom, useAtomContext, useAtomValue, useMutation,
|
|
41
|
+
export { Provider, useApplyAtom, useAtom, useAtomContext, useAtomValue, useMutation, useStableFn, useStore };
|
|
42
42
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/react/index.js
CHANGED
|
@@ -30,10 +30,10 @@ function useAtomValue(atom, opts) {
|
|
|
30
30
|
const isInitialRender = initialRenderRef.current;
|
|
31
31
|
initialRenderRef.current = false;
|
|
32
32
|
const stalePolicy = atom[CONFIG].stalePolicy ?? "keep";
|
|
33
|
-
if (snapshot.status === "pending") throw store.
|
|
33
|
+
if (snapshot.status === "pending") throw store.read(atom);
|
|
34
34
|
if (snapshot.status === "stale") {
|
|
35
|
-
if (stalePolicy === "suspend") throw store.
|
|
36
|
-
store.
|
|
35
|
+
if (stalePolicy === "suspend") throw store.read(atom);
|
|
36
|
+
store.read(atom);
|
|
37
37
|
if (opts?.observe === true) return {
|
|
38
38
|
value: snapshot.value,
|
|
39
39
|
isStale: true,
|
|
@@ -47,7 +47,7 @@ function useAtomValue(atom, opts) {
|
|
|
47
47
|
isStale: false,
|
|
48
48
|
error: snapshot.error
|
|
49
49
|
};
|
|
50
|
-
if (isInitialRender) store.
|
|
50
|
+
if (isInitialRender) store.read(atom);
|
|
51
51
|
throw snapshot.error;
|
|
52
52
|
}
|
|
53
53
|
if (opts?.observe === true) return {
|
|
@@ -58,10 +58,10 @@ function useAtomValue(atom, opts) {
|
|
|
58
58
|
return snapshot.value;
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
|
-
//#region src/react/use-
|
|
62
|
-
function
|
|
61
|
+
//#region src/react/use-apply-atom.ts
|
|
62
|
+
function useApplyAtom(atom) {
|
|
63
63
|
const store = useStore();
|
|
64
|
-
return useCallback((...args) => store.
|
|
64
|
+
return useCallback((...args) => store.apply(atom, ...args), [store, atom]);
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/react/use-mutation.ts
|
|
@@ -72,7 +72,7 @@ function useMutation(mutation) {
|
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/react/use-atom.ts
|
|
74
74
|
function useAtom(atom) {
|
|
75
|
-
return [useAtomValue(atom),
|
|
75
|
+
return [useAtomValue(atom), useApplyAtom(atom)];
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/react/use-atom-context.ts
|
|
@@ -81,6 +81,6 @@ function useAtomContext(callback) {
|
|
|
81
81
|
return useCallback(() => callback(store.getClient()), [store, callback]);
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
|
-
export { Provider, useAtom, useAtomContext, useAtomValue, useMutation,
|
|
84
|
+
export { Provider, useApplyAtom, useAtom, useAtomContext, useAtomValue, useMutation, useStableFn, useStore };
|
|
85
85
|
|
|
86
86
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/react/provider.tsx","../../src/react/use-stable-fn.ts","../../src/react/use-atom-value.ts","../../src/react/use-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/react/provider.tsx","../../src/react/use-stable-fn.ts","../../src/react/use-atom-value.ts","../../src/react/use-apply-atom.ts","../../src/react/use-mutation.ts","../../src/react/use-atom.ts","../../src/react/use-atom-context.ts"],"mappings":";;;;AAGA,MAAM,eAAe,cAA4B,KAAK;AAOtD,SAAgB,SAAS,EAAE,OAAO,YAAsC;CACtE,OAAO,oBAAC,aAAa,UAAd;EAAuB,OAAO;EAAQ;EAAiC,CAAA;;AAGhF,SAAgB,WAAkB;CAChC,MAAM,QAAQ,WAAW,aAAa;CACtC,IAAI,SAAS,MACX,MAAM,IAAI,MAAM,4CAA4C;CAE9D,OAAO;;;;ACjBT,SA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,SAAgB,YACd,UACkC;CAClC,MAAM,QAAQ,UAAU;CACxB,OAAO,aACJ,GAAG,SAA8B,MAAM,OAAO,UAAU,GAAG,KAAK,EACjE,CAAC,OAAO,SAAS,CAClB;;;;ACPH,SAAgB,QACd,MAC6C;CAG7C,OAAO,CAFO,aAAa,KAEd,EADE,aAAa,KACP,CAAC;;;;ACLxB,SAAgB,eAAkB,UAA8D;CAC9F,MAAM,QAAQ,UAAU;CACxB,OAAO,kBAA8B,SAAS,MAAM,WAAW,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC"}
|
|
@@ -5,20 +5,20 @@ function atom(configOrInitial, options) {
|
|
|
5
5
|
return fromInitialValue(configOrInitial, options);
|
|
6
6
|
}
|
|
7
7
|
function isAtomConfig(value) {
|
|
8
|
-
return typeof value === "object" && value !== null && typeof value.
|
|
8
|
+
return typeof value === "object" && value !== null && typeof value.read === "function";
|
|
9
9
|
}
|
|
10
10
|
function fromConfig(config) {
|
|
11
11
|
const internal = Object.create(null);
|
|
12
|
-
internal.
|
|
12
|
+
internal.read = config.read;
|
|
13
13
|
if (config.debugLabel != null) internal.debugLabel = config.debugLabel;
|
|
14
14
|
if (config.dependencies != null) internal.dependencies = config.dependencies;
|
|
15
15
|
if (config.stalePolicy != null) internal.stalePolicy = config.stalePolicy;
|
|
16
16
|
if (config.retry != null) internal.retry = config.retry;
|
|
17
17
|
if (config.retryDelay != null) internal.retryDelay = config.retryDelay;
|
|
18
|
-
if (config.
|
|
19
|
-
if (config.
|
|
18
|
+
if (config.invalidateAfterWrite != null) internal.invalidateAfterWrite = config.invalidateAfterWrite;
|
|
19
|
+
if (config.write != null) internal.write = config.write;
|
|
20
20
|
if (config.onMount != null) internal.onMount = config.onMount;
|
|
21
|
-
if (config.
|
|
21
|
+
if (config.write != null) return {
|
|
22
22
|
[CONFIG]: internal,
|
|
23
23
|
[WRITABLE]: [],
|
|
24
24
|
debugLabel: config.debugLabel
|
|
@@ -30,13 +30,13 @@ function fromConfig(config) {
|
|
|
30
30
|
}
|
|
31
31
|
function fromInitialValue(initialValue, options) {
|
|
32
32
|
const internal = Object.create(null);
|
|
33
|
-
internal.
|
|
33
|
+
internal.read = async (ctx) => {
|
|
34
34
|
await Promise.resolve();
|
|
35
35
|
const prev = ctx.getPreviousValue();
|
|
36
36
|
return prev === void 0 ? initialValue : prev;
|
|
37
37
|
};
|
|
38
|
-
internal.
|
|
39
|
-
internal.
|
|
38
|
+
internal.invalidateAfterWrite = false;
|
|
39
|
+
internal.write = async (ctx, ...args) => {
|
|
40
40
|
const valueOrMutate = args[0];
|
|
41
41
|
const previous = ctx.getPreviousValue();
|
|
42
42
|
const next = typeof valueOrMutate === "function" ? valueOrMutate(previous === void 0 ? initialValue : previous) : valueOrMutate;
|
|
@@ -78,8 +78,8 @@ function infinityAtom(options) {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
const config = {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
invalidateAfterWrite: false,
|
|
82
|
+
read: async (ctx) => {
|
|
83
83
|
const prev = ctx.getPreviousValue();
|
|
84
84
|
if (prev == null) return buildResult([await options.queryFn({
|
|
85
85
|
cursor: options.initialCursor,
|
|
@@ -99,7 +99,7 @@ function infinityAtom(options) {
|
|
|
99
99
|
}
|
|
100
100
|
return buildResult(pages, pageCursors);
|
|
101
101
|
},
|
|
102
|
-
|
|
102
|
+
write: async (ctx, action) => {
|
|
103
103
|
if (action !== "loadNext") return;
|
|
104
104
|
const current = ctx.getPreviousValue();
|
|
105
105
|
if (current == null || !current.hasNextPage) return;
|
|
@@ -446,34 +446,34 @@ function atomFamily(options) {
|
|
|
446
446
|
const cached = cache.get(key);
|
|
447
447
|
if (cached != null) return cached;
|
|
448
448
|
let deps;
|
|
449
|
-
let
|
|
450
|
-
let
|
|
449
|
+
let readFn;
|
|
450
|
+
let writeFn;
|
|
451
451
|
if (coordinator != null) {
|
|
452
452
|
deps = options.dependencies?.();
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
readFn = (ctx) => coordinator.enqueue(key, param, ctx, ctx.signal);
|
|
454
|
+
writeFn = void 0;
|
|
455
455
|
} else {
|
|
456
|
-
const
|
|
457
|
-
deps =
|
|
458
|
-
|
|
459
|
-
|
|
456
|
+
const readOptions = options;
|
|
457
|
+
deps = readOptions.dependencies?.(param);
|
|
458
|
+
readFn = readOptions.read(param);
|
|
459
|
+
writeFn = readOptions.write?.(param);
|
|
460
460
|
}
|
|
461
461
|
const labelSuffix = options.paramKey != null ? String(key) : String(param);
|
|
462
|
-
const created = createAtom(options.debugLabel != null ? `${options.debugLabel}(${labelSuffix})` : void 0, deps,
|
|
462
|
+
const created = createAtom(options.debugLabel != null ? `${options.debugLabel}(${labelSuffix})` : void 0, deps, readFn, writeFn);
|
|
463
463
|
attachLink(created);
|
|
464
464
|
cache.set(key, created);
|
|
465
465
|
return created;
|
|
466
466
|
}
|
|
467
|
-
function createAtom(label, deps,
|
|
468
|
-
const base = {
|
|
467
|
+
function createAtom(label, deps, readFn, writeFn) {
|
|
468
|
+
const base = { read: readFn };
|
|
469
469
|
if (label != null) base.debugLabel = label;
|
|
470
470
|
if (deps != null) base.dependencies = deps;
|
|
471
471
|
if (options.stalePolicy != null) base.stalePolicy = options.stalePolicy;
|
|
472
472
|
if (options.retry != null) base.retry = options.retry;
|
|
473
473
|
if (options.retryDelay != null) base.retryDelay = options.retryDelay;
|
|
474
|
-
if (options.
|
|
475
|
-
if (
|
|
476
|
-
base.
|
|
474
|
+
if (options.invalidateAfterWrite != null) base.invalidateAfterWrite = options.invalidateAfterWrite;
|
|
475
|
+
if (writeFn != null) {
|
|
476
|
+
base.write = writeFn;
|
|
477
477
|
return atom(base);
|
|
478
478
|
}
|
|
479
479
|
return atom(base);
|
|
@@ -534,10 +534,10 @@ var Store = class {
|
|
|
534
534
|
}
|
|
535
535
|
return entry;
|
|
536
536
|
}
|
|
537
|
-
|
|
537
|
+
read(atom) {
|
|
538
538
|
const entry = this.#getOrCreate(atom);
|
|
539
539
|
if (entry.promise != null) return entry.promise;
|
|
540
|
-
const promise = this.#
|
|
540
|
+
const promise = this.#runRead(atom).finally(() => {
|
|
541
541
|
const e = this.#atoms.get(atom);
|
|
542
542
|
if (e != null) e.promise = null;
|
|
543
543
|
});
|
|
@@ -545,7 +545,7 @@ var Store = class {
|
|
|
545
545
|
entry.promise = promise;
|
|
546
546
|
return promise;
|
|
547
547
|
}
|
|
548
|
-
async #
|
|
548
|
+
async #runRead(atom) {
|
|
549
549
|
const config = atom[CONFIG];
|
|
550
550
|
const dependencies = config.dependencies;
|
|
551
551
|
const stalePolicy = config.stalePolicy ?? "keep";
|
|
@@ -556,7 +556,7 @@ var Store = class {
|
|
|
556
556
|
if (dependencies != null) {
|
|
557
557
|
for (const [key, dep] of Object.entries(dependencies)) {
|
|
558
558
|
if (isAtomFamily(dep)) continue;
|
|
559
|
-
if (!depPromises.has(key)) depPromises.set(key, this.
|
|
559
|
+
if (!depPromises.has(key)) depPromises.set(key, this.read(dep));
|
|
560
560
|
}
|
|
561
561
|
this.#registerRdeps(atom, dependencies);
|
|
562
562
|
}
|
|
@@ -570,7 +570,7 @@ var Store = class {
|
|
|
570
570
|
}
|
|
571
571
|
try {
|
|
572
572
|
if (depPromises.size > 0) await Promise.all(depPromises.values());
|
|
573
|
-
const value = await config.
|
|
573
|
+
const value = await config.read(ctx);
|
|
574
574
|
if (ctx.signal.aborted) throw new DOMException("The operation was aborted", "AbortError");
|
|
575
575
|
entry.state = {
|
|
576
576
|
status: "fresh",
|
|
@@ -702,25 +702,25 @@ var Store = class {
|
|
|
702
702
|
this.#controllers.get(atom)?.abort();
|
|
703
703
|
const controller = new AbortController();
|
|
704
704
|
this.#controllers.set(atom, controller);
|
|
705
|
-
const
|
|
705
|
+
const read = async (key, ...rest) => {
|
|
706
706
|
const dep = deps[key];
|
|
707
707
|
if (dep == null) throw new Error(`Unknown dependency key: "${String(key)}"`);
|
|
708
708
|
if (isAtomFamily(dep)) {
|
|
709
|
-
if (rest.length === 0) throw new Error(`Dependency "${String(key)}" is an atomFamily and requires a parameter. Use ctx.
|
|
709
|
+
if (rest.length === 0) throw new Error(`Dependency "${String(key)}" is an atomFamily and requires a parameter. Use ctx.read("${String(key)}", param) instead of ctx.read("${String(key)}").`);
|
|
710
710
|
const param = rest[0];
|
|
711
711
|
const target = dep(param);
|
|
712
712
|
this.#registerSingleRdep(atom, target);
|
|
713
|
-
return this.
|
|
713
|
+
return this.read(target);
|
|
714
714
|
}
|
|
715
|
-
if (rest.length > 0) throw new Error(`Dependency "${String(key)}" is a plain atom and does not accept a parameter. Use ctx.
|
|
715
|
+
if (rest.length > 0) throw new Error(`Dependency "${String(key)}" is a plain atom and does not accept a parameter. Use ctx.read("${String(key)}") without a second argument.`);
|
|
716
716
|
const cached = depPromises?.get(key);
|
|
717
717
|
if (cached != null) return cached;
|
|
718
|
-
return this.
|
|
718
|
+
return this.read(dep);
|
|
719
719
|
};
|
|
720
720
|
return {
|
|
721
721
|
global: this.#context,
|
|
722
722
|
signal: controller.signal,
|
|
723
|
-
|
|
723
|
+
read,
|
|
724
724
|
getPreviousValue: () => {
|
|
725
725
|
return extractPreviousValue(this.#getOrCreate(atom).state);
|
|
726
726
|
}
|
|
@@ -730,7 +730,7 @@ var Store = class {
|
|
|
730
730
|
const entry = this.#getOrCreate(atom);
|
|
731
731
|
entry.listeners.add(listener);
|
|
732
732
|
this.#autoRegisterFamily(atom);
|
|
733
|
-
if ((entry.state.status === "pending" || entry.state.status === "error") && entry.promise == null) this.
|
|
733
|
+
if ((entry.state.status === "pending" || entry.state.status === "error") && entry.promise == null) this.read(atom);
|
|
734
734
|
entry.mountCount++;
|
|
735
735
|
if (entry.mountCount === 1) {
|
|
736
736
|
const config = atom[CONFIG];
|
|
@@ -775,9 +775,9 @@ var Store = class {
|
|
|
775
775
|
if (entry != null) return entry.state;
|
|
776
776
|
return PENDING_STATE;
|
|
777
777
|
}
|
|
778
|
-
async
|
|
778
|
+
async apply(atom, ...args) {
|
|
779
779
|
const config = atom[CONFIG];
|
|
780
|
-
if (config.
|
|
780
|
+
if (config.write == null) throw new Error(`Atom${atom.debugLabel != null ? ` "${atom.debugLabel}"` : ""} is not writable`);
|
|
781
781
|
const deps = config.dependencies ?? {};
|
|
782
782
|
const baseCtx = this.#makeCtx(atom, deps);
|
|
783
783
|
const entry = this.#getOrCreate(atom);
|
|
@@ -809,7 +809,7 @@ var Store = class {
|
|
|
809
809
|
invalidateMany: (targets) => this.invalidateMany(targets)
|
|
810
810
|
};
|
|
811
811
|
try {
|
|
812
|
-
await config.
|
|
812
|
+
await config.write(ctx, ...args);
|
|
813
813
|
} catch (e) {
|
|
814
814
|
const snap = optimisticSnapshot.current;
|
|
815
815
|
if (snap != null) {
|
|
@@ -820,13 +820,13 @@ var Store = class {
|
|
|
820
820
|
this.#rollbackRelatedSnapshots(relatedSnapshots);
|
|
821
821
|
throw e;
|
|
822
822
|
}
|
|
823
|
-
if (config.
|
|
823
|
+
if (config.invalidateAfterWrite !== false) this.invalidate(atom);
|
|
824
824
|
}
|
|
825
825
|
async mutate(mutation, ...args) {
|
|
826
826
|
const relatedSnapshots = /* @__PURE__ */ new Map();
|
|
827
827
|
const ctx = {
|
|
828
828
|
global: this.#context,
|
|
829
|
-
|
|
829
|
+
read: (atom) => this.read(atom),
|
|
830
830
|
writeOptimistic: (target, valueOrMutate) => {
|
|
831
831
|
this.#relatedOptimisticWrite(target, valueOrMutate, relatedSnapshots);
|
|
832
832
|
},
|
|
@@ -856,8 +856,8 @@ var Store = class {
|
|
|
856
856
|
getClient() {
|
|
857
857
|
if (this.#client != null) return this.#client;
|
|
858
858
|
this.#client = {
|
|
859
|
-
|
|
860
|
-
|
|
859
|
+
read: (atom) => this.read(atom),
|
|
860
|
+
apply: (atom, ...args) => this.apply(atom, ...args),
|
|
861
861
|
mutate: (m, ...args) => this.mutate(m, ...args),
|
|
862
862
|
write: (atom, valueOrMutate) => this.write(atom, valueOrMutate),
|
|
863
863
|
invalidate: (atom) => this.invalidate(atom),
|
|
@@ -906,4 +906,4 @@ function extractPreviousValue(state) {
|
|
|
906
906
|
//#endregion
|
|
907
907
|
export { microtaskScheduler as a, infinityAtomFamily as c, maxBatchSizeScheduler as i, infinityAtom as l, mutation as n, windowScheduler as o, atomFamily as r, windowedFiniteBatchScheduler as s, createStore as t, atom as u };
|
|
908
908
|
|
|
909
|
-
//# sourceMappingURL=store-
|
|
909
|
+
//# sourceMappingURL=store-CTGJpxoI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-CTGJpxoI.js","names":["#maxSize","#nodeMap","#valueMap","#head","#tail","#moveToMru","#insertBeforeTail","#evict","#detach","#fetch","#scheduler","#queue","#keySet","#flush","#atoms","#rdeps","#pending","#controllers","#familyUnsubs","#registeredFamilies","#context","#getOrCreate","#runRead","#registerRdeps","#makeCtx","#scheduleNotify","#markStale","#schedulePendingFlush","#flushScheduled","#flushPending","#markReverseDependentsStale","#registerSingleRdep","#autoRegisterFamily","#relatedOptimisticWrite","#rollbackRelatedSnapshots","#client"],"sources":["../src/internal/atom.ts","../src/internal/infinity-atom.ts","../src/internal/lru-cache.ts","../src/internal/infinity-atom-family.ts","../src/internal/family-batch-schedulers.ts","../src/internal/family-batch.ts","../src/internal/family.ts","../src/internal/mutation.ts","../src/internal/store.ts"],"mappings":";;AAsDA,SAAgB,KAKd,iBACA,SACa;CACb,IAAI,aAAgC,gBAAgB,EAClD,OAAO,WAAW,gBAAgB;CAEpC,OAAO,iBAAiB,iBAAiB,QAAQ;;AAGnD,SAAS,aAIP,OAAsF;CACtF,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS;;AAIlD,SAAS,WAIP,QAAoD;CACpD,MAAM,WAAsC,OAAO,OAAO,KAAK;CAC/D,SAAS,OAAO,OAAO;CAEvB,IAAI,OAAO,cAAc,MACvB,SAAS,aAAa,OAAO;CAE/B,IAAI,OAAO,gBAAgB,MACzB,SAAS,eAAe,OAAO;CAEjC,IA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