atomirx 0.0.8 → 0.1.1

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 (138) hide show
  1. package/README.md +198 -2234
  2. package/bin/cli.js +90 -0
  3. package/dist/core/derived.d.ts +2 -2
  4. package/dist/core/effect.d.ts +3 -2
  5. package/dist/core/onCreateHook.d.ts +15 -2
  6. package/dist/core/onErrorHook.d.ts +4 -1
  7. package/dist/core/pool.d.ts +78 -0
  8. package/dist/core/pool.test.d.ts +1 -0
  9. package/dist/core/select-boolean.test.d.ts +1 -0
  10. package/dist/core/select-pool.test.d.ts +1 -0
  11. package/dist/core/select.d.ts +278 -86
  12. package/dist/core/types.d.ts +233 -1
  13. package/dist/core/withAbort.d.ts +95 -0
  14. package/dist/core/withReady.d.ts +3 -3
  15. package/dist/devtools/constants.d.ts +41 -0
  16. package/dist/devtools/index.cjs +1 -0
  17. package/dist/devtools/index.d.ts +29 -0
  18. package/dist/devtools/index.js +429 -0
  19. package/dist/devtools/registry.d.ts +98 -0
  20. package/dist/devtools/registry.test.d.ts +1 -0
  21. package/dist/devtools/setup.d.ts +61 -0
  22. package/dist/devtools/types.d.ts +311 -0
  23. package/dist/index-BZEnfIcB.cjs +1 -0
  24. package/dist/index-BbPZhsDl.js +1653 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +4 -3
  27. package/dist/index.js +18 -14
  28. package/dist/onDispatchHook-C8yLzr-o.cjs +1 -0
  29. package/dist/onDispatchHook-SKbiIUaJ.js +5 -0
  30. package/dist/onErrorHook-BGGy3tqK.js +38 -0
  31. package/dist/onErrorHook-DHBASmYw.cjs +1 -0
  32. package/dist/react/index.cjs +1 -1
  33. package/dist/react/index.js +191 -151
  34. package/dist/react/onDispatchHook.d.ts +106 -0
  35. package/dist/react/useAction.d.ts +4 -1
  36. package/dist/react-devtools/DevToolsPanel.d.ts +93 -0
  37. package/dist/react-devtools/EntityDetails.d.ts +10 -0
  38. package/dist/react-devtools/EntityList.d.ts +15 -0
  39. package/dist/react-devtools/LogList.d.ts +12 -0
  40. package/dist/react-devtools/hooks.d.ts +50 -0
  41. package/dist/react-devtools/index.cjs +1 -0
  42. package/dist/react-devtools/index.d.ts +31 -0
  43. package/dist/react-devtools/index.js +1589 -0
  44. package/dist/react-devtools/styles.d.ts +148 -0
  45. package/package.json +26 -2
  46. package/skills/atomirx/SKILL.md +456 -0
  47. package/skills/atomirx/references/async-patterns.md +188 -0
  48. package/skills/atomirx/references/atom-patterns.md +238 -0
  49. package/skills/atomirx/references/deferred-loading.md +191 -0
  50. package/skills/atomirx/references/derived-patterns.md +428 -0
  51. package/skills/atomirx/references/effect-patterns.md +426 -0
  52. package/skills/atomirx/references/error-handling.md +140 -0
  53. package/skills/atomirx/references/hooks.md +322 -0
  54. package/skills/atomirx/references/pool-patterns.md +229 -0
  55. package/skills/atomirx/references/react-integration.md +411 -0
  56. package/skills/atomirx/references/rules.md +407 -0
  57. package/skills/atomirx/references/select-context.md +309 -0
  58. package/skills/atomirx/references/service-template.md +172 -0
  59. package/skills/atomirx/references/store-template.md +205 -0
  60. package/skills/atomirx/references/testing-patterns.md +431 -0
  61. package/coverage/base.css +0 -224
  62. package/coverage/block-navigation.js +0 -87
  63. package/coverage/clover.xml +0 -1440
  64. package/coverage/coverage-final.json +0 -14
  65. package/coverage/favicon.png +0 -0
  66. package/coverage/index.html +0 -131
  67. package/coverage/prettify.css +0 -1
  68. package/coverage/prettify.js +0 -2
  69. package/coverage/sort-arrow-sprite.png +0 -0
  70. package/coverage/sorter.js +0 -210
  71. package/coverage/src/core/atom.ts.html +0 -889
  72. package/coverage/src/core/batch.ts.html +0 -223
  73. package/coverage/src/core/define.ts.html +0 -805
  74. package/coverage/src/core/emitter.ts.html +0 -919
  75. package/coverage/src/core/equality.ts.html +0 -631
  76. package/coverage/src/core/hook.ts.html +0 -460
  77. package/coverage/src/core/index.html +0 -281
  78. package/coverage/src/core/isAtom.ts.html +0 -100
  79. package/coverage/src/core/isPromiseLike.ts.html +0 -133
  80. package/coverage/src/core/onCreateHook.ts.html +0 -138
  81. package/coverage/src/core/scheduleNotifyHook.ts.html +0 -94
  82. package/coverage/src/core/types.ts.html +0 -523
  83. package/coverage/src/core/withUse.ts.html +0 -253
  84. package/coverage/src/index.html +0 -116
  85. package/coverage/src/index.ts.html +0 -106
  86. package/dist/index-CBVj1kSj.js +0 -1350
  87. package/dist/index-Cxk9v0um.cjs +0 -1
  88. package/scripts/publish.js +0 -198
  89. package/src/core/atom.test.ts +0 -633
  90. package/src/core/atom.ts +0 -311
  91. package/src/core/atomState.test.ts +0 -342
  92. package/src/core/atomState.ts +0 -256
  93. package/src/core/batch.test.ts +0 -257
  94. package/src/core/batch.ts +0 -172
  95. package/src/core/define.test.ts +0 -343
  96. package/src/core/define.ts +0 -243
  97. package/src/core/derived.test.ts +0 -1215
  98. package/src/core/derived.ts +0 -450
  99. package/src/core/effect.test.ts +0 -802
  100. package/src/core/effect.ts +0 -188
  101. package/src/core/emitter.test.ts +0 -364
  102. package/src/core/emitter.ts +0 -392
  103. package/src/core/equality.test.ts +0 -392
  104. package/src/core/equality.ts +0 -182
  105. package/src/core/getAtomState.ts +0 -69
  106. package/src/core/hook.test.ts +0 -227
  107. package/src/core/hook.ts +0 -177
  108. package/src/core/isAtom.ts +0 -27
  109. package/src/core/isPromiseLike.test.ts +0 -72
  110. package/src/core/isPromiseLike.ts +0 -16
  111. package/src/core/onCreateHook.ts +0 -107
  112. package/src/core/onErrorHook.test.ts +0 -350
  113. package/src/core/onErrorHook.ts +0 -52
  114. package/src/core/promiseCache.test.ts +0 -241
  115. package/src/core/promiseCache.ts +0 -284
  116. package/src/core/scheduleNotifyHook.ts +0 -53
  117. package/src/core/select.ts +0 -729
  118. package/src/core/selector.test.ts +0 -799
  119. package/src/core/types.ts +0 -389
  120. package/src/core/withReady.test.ts +0 -534
  121. package/src/core/withReady.ts +0 -191
  122. package/src/core/withUse.test.ts +0 -249
  123. package/src/core/withUse.ts +0 -56
  124. package/src/index.test.ts +0 -80
  125. package/src/index.ts +0 -65
  126. package/src/react/index.ts +0 -21
  127. package/src/react/rx.test.tsx +0 -571
  128. package/src/react/rx.tsx +0 -531
  129. package/src/react/strictModeTest.tsx +0 -71
  130. package/src/react/useAction.test.ts +0 -987
  131. package/src/react/useAction.ts +0 -607
  132. package/src/react/useSelector.test.ts +0 -182
  133. package/src/react/useSelector.ts +0 -292
  134. package/src/react/useStable.test.ts +0 -553
  135. package/src/react/useStable.ts +0 -288
  136. package/tsconfig.json +0 -9
  137. package/v2.md +0 -725
  138. package/vite.config.ts +0 -42
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Cxk9v0um.cjs");exports.AllAtomsRejectedError=e.AllAtomsRejectedError;exports.atom=e.atom;exports.batch=e.batch;exports.define=e.define;exports.derived=e.derived;exports.effect=e.effect;exports.emitter=e.emitter;exports.getAtomState=e.getAtomState;exports.isAtom=e.isAtom;exports.isDerived=e.isDerived;exports.isFulfilled=e.isFulfilled;exports.isPending=e.isPending;exports.isRejected=e.isRejected;exports.onCreateHook=e.onCreateHook;exports.onErrorHook=e.onErrorHook;exports.promisesEqual=e.promisesEqual;exports.readonly=e.readonly;exports.select=e.select;exports.trackPromise=e.trackPromise;exports.unwrap=e.unwrap;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BZEnfIcB.cjs"),o=require("./onErrorHook-DHBASmYw.cjs");exports.AllAtomsRejectedError=e.AllAtomsRejectedError;exports.atom=e.atom;exports.batch=e.batch;exports.define=e.define;exports.derived=e.derived;exports.effect=e.effect;exports.emitter=e.emitter;exports.getAtomState=e.getAtomState;exports.isAtom=e.isAtom;exports.isDerived=e.isDerived;exports.isFulfilled=e.isFulfilled;exports.isPending=e.isPending;exports.isPool=e.isPool;exports.isRejected=e.isRejected;exports.isScopedAtom=e.isScopedAtom;exports.pool=e.pool;exports.promisesEqual=e.promisesEqual;exports.readonly=e.readonly;exports.select=e.select;exports.trackPromise=e.trackPromise;exports.unwrap=e.unwrap;exports.onCreateHook=o.onCreateHook;exports.onErrorHook=o.onErrorHook;
package/dist/index.d.ts CHANGED
@@ -5,14 +5,15 @@ export { derived, type DerivedContext } from './core/derived';
5
5
  export { effect, type EffectContext } from './core/effect';
6
6
  export { emitter } from './core/emitter';
7
7
  export { isAtom, isDerived } from './core/isAtom';
8
- export { select, AllAtomsRejectedError } from './core/select';
8
+ export { pool, isPool } from './core/pool';
9
+ export { select, AllAtomsRejectedError, isScopedAtom, type Condition, } from './core/select';
9
10
  export { getAtomState } from './core/getAtomState';
10
11
  export { isPending, isFulfilled, isRejected, trackPromise, unwrap, } from './core/promiseCache';
11
- export type { Atom, AtomMeta, AtomOptions, AtomState, AtomValue, AnyAtom, DerivedAtom, DerivedAtomMeta, DerivedOptions, EffectOptions, Equality, EqualityShorthand, Getter, KeyedResult, MutableAtom, MutableAtomMeta, Pipeable, SelectStateResult, SettledResult, } from './core/types';
12
+ export type { Atom, AtomMeta, AtomOptions, AtomState, AtomValue, AnyAtom, DerivedAtom, DerivedAtomMeta, DerivedOptions, EffectOptions, Equality, EqualityShorthand, Getter, KeyedResult, MutableAtom, MutableAtomMeta, Pipeable, Pool, PoolEvent, PoolMeta, PoolOptions, SelectStateResult, SettledResult, ScopedAtom, } from './core/types';
12
13
  export { onCreateHook } from './core/onCreateHook';
13
14
  export type { CreateInfo, MutableInfo, DerivedInfo, EffectInfo, ModuleInfo, } from './core/onCreateHook';
14
15
  export { onErrorHook } from './core/onErrorHook';
15
16
  export type { ErrorInfo } from './core/onErrorHook';
16
- export type { SelectContext, SelectResult, ReactiveSelector as ContextSelectorFn, SafeResult, } from './core/select';
17
+ export type { SelectContext, SelectOutput, SelectResult, ReactiveSelector as ContextSelectorFn, SafeResult, } from './core/select';
17
18
  export type { PromiseState, CombinedPromiseMeta } from './core/promiseCache';
18
19
  export { promisesEqual } from './core/promiseCache';
package/dist/index.js CHANGED
@@ -1,23 +1,27 @@
1
- import { A as a, c as o, e as r, f as t, g as i, h as d, j as l, l as m, i as n, k as c, n as f, m as A, o as k, q as p, v as u, x as g, d as j, s as v, p as E, u as h } from "./index-CBVj1kSj.js";
1
+ import { A as e, c as o, f as r, g as t, h as i, j as l, k as m, o as d, i as c, l as n, u as f, q as p, m as A, v as k, n as u, p as g, z as j, e as v, s as x, x as E, y as P } from "./index-BbPZhsDl.js";
2
+ import { o as q, a as y } from "./onErrorHook-BGGy3tqK.js";
2
3
  export {
3
- a as AllAtomsRejectedError,
4
+ e as AllAtomsRejectedError,
4
5
  o as atom,
5
6
  r as batch,
6
7
  t as define,
7
8
  i as derived,
8
- d as effect,
9
- l as emitter,
10
- m as getAtomState,
11
- n as isAtom,
12
- c as isDerived,
9
+ l as effect,
10
+ m as emitter,
11
+ d as getAtomState,
12
+ c as isAtom,
13
+ n as isDerived,
13
14
  f as isFulfilled,
14
- A as isPending,
15
+ p as isPending,
16
+ A as isPool,
15
17
  k as isRejected,
16
- p as onCreateHook,
17
- u as onErrorHook,
18
- g as promisesEqual,
19
- j as readonly,
20
- v as select,
18
+ u as isScopedAtom,
19
+ q as onCreateHook,
20
+ y as onErrorHook,
21
+ g as pool,
22
+ j as promisesEqual,
23
+ v as readonly,
24
+ x as select,
21
25
  E as trackPromise,
22
- h as unwrap
26
+ P as unwrap
23
27
  };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./onErrorHook-DHBASmYw.cjs"),r=o.hook();exports.onDispatchHook=r;
@@ -0,0 +1,5 @@
1
+ import { h as o } from "./onErrorHook-BGGy3tqK.js";
2
+ const t = o();
3
+ export {
4
+ t as o
5
+ };
@@ -0,0 +1,38 @@
1
+ function s(t) {
2
+ const r = Object.assign(
3
+ (e) => () => {
4
+ const o = r.current;
5
+ return r.current = e(o), () => {
6
+ r.current = o;
7
+ };
8
+ },
9
+ {
10
+ current: t,
11
+ // Override method for direct mutation using reducer
12
+ override: (e) => {
13
+ r.current = e(r.current);
14
+ },
15
+ reset: () => {
16
+ r.current = t;
17
+ }
18
+ }
19
+ );
20
+ return r;
21
+ }
22
+ function c(t, r) {
23
+ const e = [];
24
+ for (const o of t)
25
+ e.push(o());
26
+ try {
27
+ return r();
28
+ } finally {
29
+ for (const o of e.reverse())
30
+ o();
31
+ }
32
+ }
33
+ const n = Object.assign(s, { use: c }), u = n(), a = n();
34
+ export {
35
+ a,
36
+ n as h,
37
+ u as o
38
+ };
@@ -0,0 +1 @@
1
+ "use strict";function s(t){const r=Object.assign(e=>()=>{const o=r.current;return r.current=e(o),()=>{r.current=o}},{current:t,override:e=>{r.current=e(r.current)},reset:()=>{r.current=t}});return r}function c(t,r){const e=[];for(const o of t)e.push(o());try{return r()}finally{for(const o of e.reverse())o()}}const n=Object.assign(s,{use:c}),u=n(),a=n();exports.hook=n;exports.onCreateHook=u;exports.onErrorHook=a;
@@ -1 +1 @@
1
- "use strict";var C=Object.defineProperty;var O=(e,r,n)=>r in e?C(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var p=(e,r,n)=>O(e,typeof r!="symbol"?r+"":r,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),t=require("../index-Cxk9v0um.cjs"),a=require("react/jsx-runtime");function v(e,r){const n=t.isAtom(e)?({read:u})=>u(e):e,f=t.resolveEquality(r??"shallow"),d=s.useRef(n),R=s.useRef(f);d.current=n,R.current=f;const l=s.useRef(new Map),i=s.useRef(new Set),o=s.useRef({value:void 0,initialized:!1}),E=s.useCallback(()=>{const u=t.select(d.current);if(i.current=u.dependencies,u.promise!==void 0)throw u.promise;if(u.error!==void 0)throw u.error;const m=u.value;return(!o.current.initialized||!R.current(m,o.current.value))&&(o.current={value:m,initialized:!0}),o.current.value},[]),b=s.useCallback(u=>{const m=l.current,g=()=>{const S=i.current;for(const[A,c]of m)S.has(A)||(c(),m.delete(A));for(const A of S)if(!m.has(A)){const c=A.on(()=>{const h=t.select(d.current);i.current=h.dependencies,g(),u()});m.set(A,c)}};return g(),()=>{for(const S of m.values())S();m.clear()}},[]);return s.useSyncExternalStore(b,E,E)}function q(e){return e==null?"strict":Array.isArray(e)?"shallow":e instanceof Date?"deep":typeof e=="object"?"shallow":"strict"}function w(e,r){const n=s.useRef({}),f=s.useRef(null);f.current===null&&(f.current={});const d=n.current,R=f.current;for(const l of Object.keys(e)){const i=e[l],o=d[l];if(typeof i=="function"){const[m]=t.tryStabilize(o,i,()=>!1);d[l]={value:m},R[l]=m;continue}const E=r==null?void 0:r[l],b=E?t.resolveEquality(E):t.resolveEquality(q(i)),[u]=t.tryStabilize(o,i,b);d[l]={value:u},R[l]=u}for(const l of Object.keys(d))l in e||(delete d[l],delete R[l]);return R}const x={status:"idle",result:void 0,error:void 0},k={status:"loading",result:void 0,error:void 0};function D(e,r){switch(r.type){case"START":return k;case"SUCCESS":return{status:"success",result:r.result,error:void 0};case"ERROR":return{status:"error",result:void 0,error:r.error};case"RESET":return x;default:return e}}function T(e,r={}){const{lazy:n=!0,exclusive:f=!0,deps:d=[]}=r,R=n?x:k,[l,i]=s.useReducer(D,R),o=s.useRef(null),E=s.useRef(e);E.current=e;const b=s.useCallback(()=>{const c=o.current;return c?(c.abort(),o.current=null,!0):!1},[]),u=(n?[]:d??[]).filter(t.isAtom),m=v(({read:c})=>u.map(h=>c(h))),g=s.useCallback(()=>{f&&b();const c=new AbortController;o.current=c,i({type:"START"});let h;try{h=E.current(t.withUse({signal:c.signal}))}catch(j){return i({type:"ERROR",error:j}),Object.assign(Promise.reject(j),{abort:()=>c.abort()})}if(t.isPromiseLike(h)){const j=h;return j.then(y=>{o.current===c&&i({type:"SUCCESS",result:y})},y=>{if(y instanceof DOMException&&y.name==="AbortError"){(o.current===null||o.current===c)&&i({type:"ERROR",error:y});return}o.current===c&&i({type:"ERROR",error:y})}),Object.assign(j,{abort:()=>{c.abort(),o.current===c&&(o.current=null)}})}return i({type:"SUCCESS",result:h}),Object.assign(Promise.resolve(h),{abort:()=>c.abort()})},[f,b]),S=(d??[]).filter(c=>!t.isAtom(c));s.useEffect(()=>{n||g()},[n,...m,...S]),s.useEffect(()=>()=>{f&&b()},[f,b]);const A=s.useCallback(()=>{f&&b(),i({type:"RESET"})},[f,b]);return Object.assign(g,{...l,abort:b,reset:A})}function F(e,r){const n=r===void 0?void 0:typeof r=="object"&&r!==null&&!Array.isArray(r)&&("equals"in r||"loading"in r||"error"in r)?r:{equals:r};return a.jsx(U,{selectorOrAtom:e,options:n})}class z extends s.Component{constructor(){super(...arguments);p(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,f){}render(){if(this.state.error!==null&&this.props.onError)return a.jsx(a.Fragment,{children:this.props.onError({error:this.state.error})});if(this.state.error!==null)throw this.state.error;return this.props.children}}function P(e){const r=v(e.selector,e.equals);return a.jsx(a.Fragment,{children:r??null})}function I(e){return a.jsx(a.Fragment,{children:e.render()})}function H(e){return e.fallback?a.jsx(s.Suspense,{fallback:a.jsx(I,{render:e.fallback}),children:e.children}):a.jsx(a.Fragment,{children:e.children})}function L(e){return e.onError?a.jsx(z,{onError:e.onError,children:e.children}):a.jsx(a.Fragment,{children:e.children})}const U=s.memo(function(r){var i,o,E,b;const n=s.useRef(r.selectorOrAtom);n.current=r.selectorOrAtom;const f=t.isAtom(r.selectorOrAtom),d=(i=r.options)==null?void 0:i.deps,R=f?[r.selectorOrAtom,...d??[]]:d??[{}],l=s.useCallback(u=>t.isAtom(n.current)?u.read(n.current):n.current(u),R);return a.jsx(L,{onError:(o=r.options)==null?void 0:o.error,children:a.jsx(H,{fallback:(E=r.options)==null?void 0:E.loading,children:a.jsx(P,{selector:l,equals:(b=r.options)==null?void 0:b.equals})})})},(e,r)=>t.shallowEqual(e.selectorOrAtom,r.selectorOrAtom)&&t.shallowEqual(e.options,r.options));exports.AllAtomsRejectedError=t.AllAtomsRejectedError;exports.atom=t.atom;exports.batch=t.batch;exports.define=t.define;exports.derived=t.derived;exports.effect=t.effect;exports.emitter=t.emitter;exports.getAtomState=t.getAtomState;exports.isAtom=t.isAtom;exports.isDerived=t.isDerived;exports.isFulfilled=t.isFulfilled;exports.isPending=t.isPending;exports.isRejected=t.isRejected;exports.onCreateHook=t.onCreateHook;exports.onErrorHook=t.onErrorHook;exports.promisesEqual=t.promisesEqual;exports.readonly=t.readonly;exports.select=t.select;exports.trackPromise=t.trackPromise;exports.unwrap=t.unwrap;exports.rx=F;exports.useAction=T;exports.useSelector=v;exports.useStable=w;
1
+ "use strict";var F=Object.defineProperty;var z=(r,e,n)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n;var w=(r,e,n)=>z(r,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),t=require("../index-BZEnfIcB.cjs"),y=require("../onDispatchHook-C8yLzr-o.cjs"),d=require("react/jsx-runtime"),H=require("../onErrorHook-DHBASmYw.cjs");function C(r,e){const n=t.isAtom(r)?({read:p})=>p(r):r,m=t.resolveEquality(e??"shallow"),s=o.useRef(n),R=o.useRef(m);s.current=n,R.current=m;const a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef([]),b=o.useRef(new Map),l=o.useRef({value:void 0,initialized:!1}),A=o.useCallback(()=>{const{result:p}=t.select(s.current);if(u.current=p._atomDeps,b.current=p._poolDeps,p.promise!==void 0)throw p.promise;if(p.error!==void 0)throw p.error;const E=p.value;return(!l.current.initialized||!R.current(E,l.current.value))&&(l.current={value:E,initialized:!0}),l.current.value},[]),k=o.useCallback(p=>{const E=a.current,g=()=>{const{result:f}=t.select(s.current);u.current=f._atomDeps,b.current=f._poolDeps,i(),p()},i=()=>{const f=u.current,v=b.current;for(const[h,D]of E)f.has(h)||(D(),E.delete(h));for(const h of f)E.has(h)||E.set(h,h.on(g));for(const h of c.current)h();c.current=[];for(const[h,D]of v)for(const x of D)c.current.push(h._onRemove(x,g))};return i(),()=>{for(const f of E.values())f();E.clear();for(const f of c.current)f();c.current=[]}},[]);return o.useSyncExternalStore(k,A,A)}function _(r){return r==null?Object.is:Array.isArray(r)?"shallow":r instanceof Date?t.deepEqual:typeof r=="object"?t.shallowEqual:Object.is}function I(r,e){const n=o.useRef({}),m=o.useRef(null);m.current===null&&(m.current={});const s=n.current,R=m.current;for(const a of Object.keys(r)){const u=r[a],c=s[a];if(typeof u=="function"){const[k]=t.tryStabilize(c,u,()=>!1);s[a]={value:k},R[a]=k;continue}const b=e==null?void 0:e[a],l=b?t.resolveEquality(b):t.resolveEquality(_(u)),[A]=t.tryStabilize(c,u,l);s[a]={value:A},R[a]=A}for(const a of Object.keys(s))a in r||(delete s[a],delete R[a]);return R}const P={status:"idle",result:void 0,error:void 0},T={status:"loading",result:void 0,error:void 0};function L(r,e){switch(e.type){case"START":return T;case"SUCCESS":return{status:"success",result:e.result,error:void 0};case"ERROR":return{status:"error",result:void 0,error:e.error};case"RESET":return P;default:return r}}function M(r,e={}){const{lazy:n=!0,exclusive:m=!0,deps:s=[]}=e,R=n?P:T,[a,u]=o.useReducer(L,R),c=o.useRef(null),b=o.useRef(r);b.current=r;const l=o.useCallback(()=>{const i=c.current;return i?(i.abort(),c.current=null,!0):!1},[]),A=(n?[]:s??[]).filter(t.isAtom),k=C(({read:i})=>A.map(f=>i(f))),p=o.useCallback(()=>{var v,h,D,x,q,O;m&&l();const i=new AbortController;c.current=i,u({type:"START"}),(h=(v=y.onDispatchHook).current)==null||h.call(v,{type:"start",meta:e.meta,deps:s});let f;try{f=b.current(t.withUse({signal:i.signal}))}catch(j){return u({type:"ERROR",error:j}),(x=(D=y.onDispatchHook).current)==null||x.call(D,{type:"error",meta:e.meta,deps:s,error:j}),Object.assign(Promise.reject(j),{abort:()=>i.abort()})}if(t.isPromiseLike(f)){const j=f;return(O=(q=y.onDispatchHook).current)==null||O.call(q,{type:"loading",meta:e.meta,deps:s}),j.then(S=>{c.current===i&&(u({type:"SUCCESS",result:S}),y.onDispatchHook.current&&y.onDispatchHook.current({type:"resolved",meta:e.meta,deps:s}))},S=>{if(S instanceof DOMException&&S.name==="AbortError"){(c.current===null||c.current===i)&&(u({type:"ERROR",error:S}),y.onDispatchHook.current&&y.onDispatchHook.current({type:"abort",meta:e.meta,deps:s,error:S}));return}c.current===i&&(u({type:"ERROR",error:S}),y.onDispatchHook.current&&y.onDispatchHook.current({type:"rejected",meta:e.meta,deps:s,error:S}))}),Object.assign(j,{abort:()=>{i.abort(),c.current===i&&(c.current=null)}})}else y.onDispatchHook.current&&y.onDispatchHook.current({type:"success",meta:e.meta,deps:s});return u({type:"SUCCESS",result:f}),Object.assign(Promise.resolve(f),{abort:()=>i.abort()})},[m,l]),E=(s??[]).filter(i=>!t.isAtom(i));o.useEffect(()=>{n||p()},[n,...k,...E]),o.useEffect(()=>()=>{m&&l()},[m,l]);const g=o.useCallback(()=>{m&&l(),u({type:"RESET"})},[m,l]);return Object.assign(p,{...a,abort:l,reset:g})}function U(r,e){const n=e===void 0?void 0:typeof e=="object"&&e!==null&&!Array.isArray(e)&&("equals"in e||"loading"in e||"error"in e)?e:{equals:e};return d.jsx(J,{selectorOrAtom:r,options:n})}class V extends o.Component{constructor(){super(...arguments);w(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,m){}render(){if(this.state.error!==null&&this.props.onError)return d.jsx(d.Fragment,{children:this.props.onError({error:this.state.error})});if(this.state.error!==null)throw this.state.error;return this.props.children}}function W(r){const e=C(r.selector,r.equals);return d.jsx(d.Fragment,{children:e??null})}function B(r){return d.jsx(d.Fragment,{children:r.render()})}function G(r){return r.fallback?d.jsx(o.Suspense,{fallback:d.jsx(B,{render:r.fallback}),children:r.children}):d.jsx(d.Fragment,{children:r.children})}function N(r){return r.onError?d.jsx(V,{onError:r.onError,children:r.children}):d.jsx(d.Fragment,{children:r.children})}const J=o.memo(function(e){var u,c,b,l;const n=o.useRef(e.selectorOrAtom);n.current=e.selectorOrAtom;const m=t.isAtom(e.selectorOrAtom),s=(u=e.options)==null?void 0:u.deps,R=m?[e.selectorOrAtom,...s??[]]:s??[{}],a=o.useCallback(A=>t.isAtom(n.current)?A.read(n.current):n.current(A),R);return d.jsx(N,{onError:(c=e.options)==null?void 0:c.error,children:d.jsx(G,{fallback:(b=e.options)==null?void 0:b.loading,children:d.jsx(W,{selector:a,equals:(l=e.options)==null?void 0:l.equals})})})},(r,e)=>t.shallowEqual(r.selectorOrAtom,e.selectorOrAtom)&&t.shallowEqual(r.options,e.options));exports.AllAtomsRejectedError=t.AllAtomsRejectedError;exports.atom=t.atom;exports.batch=t.batch;exports.define=t.define;exports.derived=t.derived;exports.effect=t.effect;exports.emitter=t.emitter;exports.getAtomState=t.getAtomState;exports.isAtom=t.isAtom;exports.isDerived=t.isDerived;exports.isFulfilled=t.isFulfilled;exports.isPending=t.isPending;exports.isPool=t.isPool;exports.isRejected=t.isRejected;exports.isScopedAtom=t.isScopedAtom;exports.pool=t.pool;exports.promisesEqual=t.promisesEqual;exports.readonly=t.readonly;exports.select=t.select;exports.trackPromise=t.trackPromise;exports.unwrap=t.unwrap;exports.onCreateHook=H.onCreateHook;exports.onErrorHook=H.onErrorHook;exports.rx=U;exports.useAction=M;exports.useSelector=C;exports.useStable=I;
@@ -1,89 +1,97 @@
1
- var F = Object.defineProperty;
2
- var I = (r, e, t) => e in r ? F(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var w = (r, e, t) => I(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { useRef as m, useCallback as y, useSyncExternalStore as P, useReducer as L, useEffect as x, memo as U, Suspense as _, Component as V } from "react";
5
- import { i as g, r as k, s as C, t as j, w as H, a as M, b as D } from "../index-CBVj1kSj.js";
6
- import { A as ir, c as ur, e as ar, f as lr, g as fr, h as dr, j as br, l as hr, k as mr, n as Rr, m as Er, o as pr, q as Sr, v as yr, x as Ar, d as vr, p as gr, u as Or } from "../index-CBVj1kSj.js";
7
- import { jsx as d, Fragment as O } from "react/jsx-runtime";
8
- function q(r, e) {
9
- const t = g(r) ? ({ read: c }) => c(r) : r, u = k(e ?? "shallow"), a = m(t), b = m(u);
10
- a.current = t, b.current = u;
11
- const i = m(/* @__PURE__ */ new Map()), o = m(/* @__PURE__ */ new Set()), n = m({
1
+ var M = Object.defineProperty;
2
+ var V = (r, e, t) => e in r ? M(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var _ = (r, e, t) => V(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { useRef as p, useCallback as D, useSyncExternalStore as W, useReducer as B, useEffect as P, memo as G, Suspense as N, Component as J } from "react";
5
+ import { i as O, r as w, s as F, t as I, d as K, a as q, w as Q, b as X } from "../index-BbPZhsDl.js";
6
+ import { A as he, c as Re, f as Ee, g as ye, h as Se, j as Ae, k as ve, o as ge, l as De, u as Oe, q as je, m as ke, v as xe, n as Ce, p as we, z as qe, e as Te, x as ze, y as _e } from "../index-BbPZhsDl.js";
7
+ import { o as E } from "../onDispatchHook-SKbiIUaJ.js";
8
+ import { jsx as b, Fragment as j } from "react/jsx-runtime";
9
+ import { o as Fe, a as Ie } from "../onErrorHook-BGGy3tqK.js";
10
+ function L(r, e) {
11
+ const t = O(r) ? ({ read: f }) => f(r) : r, l = w(e ?? "shallow"), n = p(t), h = p(l);
12
+ n.current = t, h.current = l;
13
+ const u = p(/* @__PURE__ */ new Map()), s = p(/* @__PURE__ */ new Set()), o = p([]), m = p(/* @__PURE__ */ new Map()), a = p({
12
14
  value: void 0,
13
15
  initialized: !1
14
- }), h = y(() => {
15
- const c = C(a.current);
16
- if (o.current = c.dependencies, c.promise !== void 0)
17
- throw c.promise;
18
- if (c.error !== void 0)
19
- throw c.error;
20
- const f = c.value;
21
- return (!n.current.initialized || !b.current(f, n.current.value)) && (n.current = { value: f, initialized: !0 }), n.current.value;
22
- }, []), l = y((c) => {
23
- const f = i.current, A = () => {
24
- const p = o.current;
25
- for (const [E, s] of f)
26
- p.has(E) || (s(), f.delete(E));
27
- for (const E of p)
28
- if (!f.has(E)) {
29
- const s = E.on(() => {
30
- const R = C(a.current);
31
- o.current = R.dependencies, A(), c();
32
- });
33
- f.set(E, s);
34
- }
16
+ }), y = D(() => {
17
+ const { result: f } = F(n.current);
18
+ if (s.current = f._atomDeps, m.current = f._poolDeps, f.promise !== void 0)
19
+ throw f.promise;
20
+ if (f.error !== void 0)
21
+ throw f.error;
22
+ const R = f.value;
23
+ return (!a.current.initialized || !h.current(R, a.current.value)) && (a.current = { value: R, initialized: !0 }), a.current.value;
24
+ }, []), A = D((f) => {
25
+ const R = u.current, k = () => {
26
+ const { result: i } = F(n.current);
27
+ s.current = i._atomDeps, m.current = i._poolDeps, c(), f();
28
+ }, c = () => {
29
+ const i = s.current, x = m.current;
30
+ for (const [d, v] of R)
31
+ i.has(d) || (v(), R.delete(d));
32
+ for (const d of i)
33
+ R.has(d) || R.set(d, d.on(k));
34
+ for (const d of o.current)
35
+ d();
36
+ o.current = [];
37
+ for (const [d, v] of x)
38
+ for (const C of v)
39
+ o.current.push(d._onRemove(C, k));
35
40
  };
36
- return A(), () => {
37
- for (const p of f.values())
38
- p();
39
- f.clear();
41
+ return c(), () => {
42
+ for (const i of R.values())
43
+ i();
44
+ R.clear();
45
+ for (const i of o.current)
46
+ i();
47
+ o.current = [];
40
48
  };
41
49
  }, []);
42
- return P(l, h, h);
50
+ return W(A, y, y);
43
51
  }
44
- function W(r) {
45
- return r == null ? "strict" : Array.isArray(r) ? "shallow" : r instanceof Date ? "deep" : typeof r == "object" ? "shallow" : "strict";
52
+ function Y(r) {
53
+ return r == null ? Object.is : Array.isArray(r) ? "shallow" : r instanceof Date ? K : typeof r == "object" ? q : Object.is;
46
54
  }
47
- function tr(r, e) {
48
- const t = m({}), u = m(null);
49
- u.current === null && (u.current = {});
50
- const a = t.current, b = u.current;
51
- for (const i of Object.keys(r)) {
52
- const o = r[i], n = a[i];
53
- if (typeof o == "function") {
54
- const [f] = j(
55
- n,
55
+ function fe(r, e) {
56
+ const t = p({}), l = p(null);
57
+ l.current === null && (l.current = {});
58
+ const n = t.current, h = l.current;
59
+ for (const u of Object.keys(r)) {
60
+ const s = r[u], o = n[u];
61
+ if (typeof s == "function") {
62
+ const [A] = I(
56
63
  o,
64
+ s,
57
65
  () => !1
58
66
  // Equality doesn't matter for functions
59
67
  );
60
- a[i] = { value: f }, b[i] = f;
68
+ n[u] = { value: A }, h[u] = A;
61
69
  continue;
62
70
  }
63
- const h = e == null ? void 0 : e[i], l = h ? k(h) : k(W(o)), [c] = j(
64
- n,
71
+ const m = e == null ? void 0 : e[u], a = m ? w(m) : w(Y(s)), [y] = I(
65
72
  o,
66
- l
73
+ s,
74
+ a
67
75
  );
68
- a[i] = { value: c }, b[i] = c;
76
+ n[u] = { value: y }, h[u] = y;
69
77
  }
70
- for (const i of Object.keys(a))
71
- i in r || (delete a[i], delete b[i]);
72
- return b;
78
+ for (const u of Object.keys(n))
79
+ u in r || (delete n[u], delete h[u]);
80
+ return h;
73
81
  }
74
- const T = {
82
+ const U = {
75
83
  status: "idle",
76
84
  result: void 0,
77
85
  error: void 0
78
- }, z = {
86
+ }, H = {
79
87
  status: "loading",
80
88
  result: void 0,
81
89
  error: void 0
82
90
  };
83
- function B(r, e) {
91
+ function Z(r, e) {
84
92
  switch (e.type) {
85
93
  case "START":
86
- return z;
94
+ return H;
87
95
  case "SUCCESS":
88
96
  return {
89
97
  status: "success",
@@ -97,147 +105,179 @@ function B(r, e) {
97
105
  error: e.error
98
106
  };
99
107
  case "RESET":
100
- return T;
108
+ return U;
101
109
  default:
102
110
  return r;
103
111
  }
104
112
  }
105
- function nr(r, e = {}) {
106
- const { lazy: t = !0, exclusive: u = !0, deps: a = [] } = e, b = t ? T : z, [i, o] = L(
107
- B,
108
- b
109
- ), n = m(null), h = m(r);
110
- h.current = r;
111
- const l = y(() => {
112
- const s = n.current;
113
- return s ? (s.abort(), n.current = null, !0) : !1;
114
- }, []), c = (t ? [] : a ?? []).filter(g), f = q(({ read: s }) => c.map((R) => s(R))), A = y(() => {
115
- u && l();
116
- const s = new AbortController();
117
- n.current = s, o({ type: "START" });
118
- let R;
113
+ function de(r, e = {}) {
114
+ const { lazy: t = !0, exclusive: l = !0, deps: n = [] } = e, h = t ? U : H, [u, s] = B(
115
+ Z,
116
+ h
117
+ ), o = p(null), m = p(r);
118
+ m.current = r;
119
+ const a = D(() => {
120
+ const c = o.current;
121
+ return c ? (c.abort(), o.current = null, !0) : !1;
122
+ }, []), y = (t ? [] : n ?? []).filter(O), A = L(({ read: c }) => y.map((i) => c(i))), f = D(() => {
123
+ var x, d, v, C, T, z;
124
+ l && a();
125
+ const c = new AbortController();
126
+ o.current = c, s({ type: "START" }), (d = (x = E).current) == null || d.call(x, { type: "start", meta: e.meta, deps: n });
127
+ let i;
119
128
  try {
120
- R = h.current(H({ signal: s.signal }));
121
- } catch (v) {
122
- return o({ type: "ERROR", error: v }), Object.assign(Promise.reject(v), {
123
- abort: () => s.abort()
129
+ i = m.current(Q({ signal: c.signal }));
130
+ } catch (g) {
131
+ return s({ type: "ERROR", error: g }), (C = (v = E).current) == null || C.call(v, {
132
+ type: "error",
133
+ meta: e.meta,
134
+ deps: n,
135
+ error: g
136
+ }), Object.assign(Promise.reject(g), {
137
+ abort: () => c.abort()
124
138
  });
125
139
  }
126
- if (M(R)) {
127
- const v = R;
128
- return v.then(
140
+ if (X(i)) {
141
+ const g = i;
142
+ return (z = (T = E).current) == null || z.call(T, {
143
+ type: "loading",
144
+ meta: e.meta,
145
+ deps: n
146
+ }), g.then(
129
147
  (S) => {
130
- n.current === s && o({ type: "SUCCESS", result: S });
148
+ o.current === c && (s({ type: "SUCCESS", result: S }), E.current && E.current({
149
+ type: "resolved",
150
+ meta: e.meta,
151
+ deps: n
152
+ }));
131
153
  },
132
154
  (S) => {
133
155
  if (S instanceof DOMException && S.name === "AbortError") {
134
- (n.current === null || n.current === s) && o({ type: "ERROR", error: S });
156
+ (o.current === null || o.current === c) && (s({ type: "ERROR", error: S }), E.current && E.current({
157
+ type: "abort",
158
+ meta: e.meta,
159
+ deps: n,
160
+ error: S
161
+ }));
135
162
  return;
136
163
  }
137
- n.current === s && o({ type: "ERROR", error: S });
164
+ o.current === c && (s({ type: "ERROR", error: S }), E.current && E.current({
165
+ type: "rejected",
166
+ meta: e.meta,
167
+ deps: n,
168
+ error: S
169
+ }));
138
170
  }
139
- ), Object.assign(v, {
171
+ ), Object.assign(g, {
140
172
  abort: () => {
141
- s.abort(), n.current === s && (n.current = null);
173
+ c.abort(), o.current === c && (o.current = null);
142
174
  }
143
175
  });
144
- }
145
- return o({ type: "SUCCESS", result: R }), Object.assign(Promise.resolve(R), {
146
- abort: () => s.abort()
176
+ } else
177
+ E.current && E.current({
178
+ type: "success",
179
+ meta: e.meta,
180
+ deps: n
181
+ });
182
+ return s({ type: "SUCCESS", result: i }), Object.assign(Promise.resolve(i), {
183
+ abort: () => c.abort()
147
184
  });
148
- }, [u, l]), p = (a ?? []).filter((s) => !g(s));
149
- x(() => {
150
- t || A();
151
- }, [t, ...f, ...p]), x(() => () => {
152
- u && l();
153
- }, [u, l]);
154
- const E = y(() => {
155
- u && l(), o({ type: "RESET" });
156
- }, [u, l]);
157
- return Object.assign(A, {
158
- ...i,
159
- abort: l,
160
- reset: E
185
+ }, [l, a]), R = (n ?? []).filter((c) => !O(c));
186
+ P(() => {
187
+ t || f();
188
+ }, [t, ...A, ...R]), P(() => () => {
189
+ l && a();
190
+ }, [l, a]);
191
+ const k = D(() => {
192
+ l && a(), s({ type: "RESET" });
193
+ }, [l, a]);
194
+ return Object.assign(f, {
195
+ ...u,
196
+ abort: a,
197
+ reset: k
161
198
  });
162
199
  }
163
- function sr(r, e) {
200
+ function me(r, e) {
164
201
  const t = e === void 0 ? void 0 : typeof e == "object" && e !== null && !Array.isArray(e) && ("equals" in e || "loading" in e || "error" in e) ? e : { equals: e };
165
- return /* @__PURE__ */ d(
166
- X,
202
+ return /* @__PURE__ */ b(
203
+ oe,
167
204
  {
168
205
  selectorOrAtom: r,
169
206
  options: t
170
207
  }
171
208
  );
172
209
  }
173
- class G extends V {
210
+ class $ extends J {
174
211
  constructor() {
175
212
  super(...arguments);
176
- w(this, "state", { error: null });
213
+ _(this, "state", { error: null });
177
214
  }
178
215
  static getDerivedStateFromError(t) {
179
216
  return { error: t };
180
217
  }
181
218
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
182
- componentDidCatch(t, u) {
219
+ componentDidCatch(t, l) {
183
220
  }
184
221
  render() {
185
222
  if (this.state.error !== null && this.props.onError)
186
- return /* @__PURE__ */ d(O, { children: this.props.onError({ error: this.state.error }) });
223
+ return /* @__PURE__ */ b(j, { children: this.props.onError({ error: this.state.error }) });
187
224
  if (this.state.error !== null)
188
225
  throw this.state.error;
189
226
  return this.props.children;
190
227
  }
191
228
  }
192
- function N(r) {
193
- const e = q(r.selector, r.equals);
194
- return /* @__PURE__ */ d(O, { children: e ?? null });
229
+ function ee(r) {
230
+ const e = L(r.selector, r.equals);
231
+ return /* @__PURE__ */ b(j, { children: e ?? null });
195
232
  }
196
- function J(r) {
197
- return /* @__PURE__ */ d(O, { children: r.render() });
233
+ function re(r) {
234
+ return /* @__PURE__ */ b(j, { children: r.render() });
198
235
  }
199
- function K(r) {
200
- return r.fallback ? /* @__PURE__ */ d(_, { fallback: /* @__PURE__ */ d(J, { render: r.fallback }), children: r.children }) : /* @__PURE__ */ d(O, { children: r.children });
236
+ function te(r) {
237
+ return r.fallback ? /* @__PURE__ */ b(N, { fallback: /* @__PURE__ */ b(re, { render: r.fallback }), children: r.children }) : /* @__PURE__ */ b(j, { children: r.children });
201
238
  }
202
- function Q(r) {
203
- return r.onError ? /* @__PURE__ */ d(G, { onError: r.onError, children: r.children }) : /* @__PURE__ */ d(O, { children: r.children });
239
+ function ne(r) {
240
+ return r.onError ? /* @__PURE__ */ b($, { onError: r.onError, children: r.children }) : /* @__PURE__ */ b(j, { children: r.children });
204
241
  }
205
- const X = U(
242
+ const oe = G(
206
243
  function(e) {
207
- var o, n, h, l;
208
- const t = m(e.selectorOrAtom);
244
+ var s, o, m, a;
245
+ const t = p(e.selectorOrAtom);
209
246
  t.current = e.selectorOrAtom;
210
- const u = g(e.selectorOrAtom), a = (o = e.options) == null ? void 0 : o.deps, b = u ? [e.selectorOrAtom, ...a ?? []] : a ?? [{}], i = y(
211
- (c) => g(t.current) ? c.read(t.current) : t.current(c),
212
- b
247
+ const l = O(e.selectorOrAtom), n = (s = e.options) == null ? void 0 : s.deps, h = l ? [e.selectorOrAtom, ...n ?? []] : n ?? [{}], u = D(
248
+ (y) => O(t.current) ? y.read(t.current) : t.current(y),
249
+ h
213
250
  );
214
- return /* @__PURE__ */ d(Q, { onError: (n = e.options) == null ? void 0 : n.error, children: /* @__PURE__ */ d(K, { fallback: (h = e.options) == null ? void 0 : h.loading, children: /* @__PURE__ */ d(N, { selector: i, equals: (l = e.options) == null ? void 0 : l.equals }) }) });
251
+ return /* @__PURE__ */ b(ne, { onError: (o = e.options) == null ? void 0 : o.error, children: /* @__PURE__ */ b(te, { fallback: (m = e.options) == null ? void 0 : m.loading, children: /* @__PURE__ */ b(ee, { selector: u, equals: (a = e.options) == null ? void 0 : a.equals }) }) });
215
252
  },
216
- (r, e) => D(r.selectorOrAtom, e.selectorOrAtom) && D(r.options, e.options)
253
+ (r, e) => q(r.selectorOrAtom, e.selectorOrAtom) && q(r.options, e.options)
217
254
  );
218
255
  export {
219
- ir as AllAtomsRejectedError,
220
- ur as atom,
221
- ar as batch,
222
- lr as define,
223
- fr as derived,
224
- dr as effect,
225
- br as emitter,
226
- hr as getAtomState,
227
- g as isAtom,
228
- mr as isDerived,
229
- Rr as isFulfilled,
230
- Er as isPending,
231
- pr as isRejected,
232
- Sr as onCreateHook,
233
- yr as onErrorHook,
234
- Ar as promisesEqual,
235
- vr as readonly,
236
- sr as rx,
237
- C as select,
238
- gr as trackPromise,
239
- Or as unwrap,
240
- nr as useAction,
241
- q as useSelector,
242
- tr as useStable
256
+ he as AllAtomsRejectedError,
257
+ Re as atom,
258
+ Ee as batch,
259
+ ye as define,
260
+ Se as derived,
261
+ Ae as effect,
262
+ ve as emitter,
263
+ ge as getAtomState,
264
+ O as isAtom,
265
+ De as isDerived,
266
+ Oe as isFulfilled,
267
+ je as isPending,
268
+ ke as isPool,
269
+ xe as isRejected,
270
+ Ce as isScopedAtom,
271
+ Fe as onCreateHook,
272
+ Ie as onErrorHook,
273
+ we as pool,
274
+ qe as promisesEqual,
275
+ Te as readonly,
276
+ me as rx,
277
+ F as select,
278
+ ze as trackPromise,
279
+ _e as unwrap,
280
+ de as useAction,
281
+ L as useSelector,
282
+ fe as useStable
243
283
  };