@depup/jotai 2.18.0-depup.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/LICENSE +21 -0
- package/README.md +25 -0
- package/babel/plugin-debug-label.d.ts +5 -0
- package/babel/plugin-debug-label.js +54 -0
- package/babel/plugin-react-refresh.d.ts +5 -0
- package/babel/plugin-react-refresh.js +72 -0
- package/babel/preset.d.ts +6 -0
- package/babel/preset.js +110 -0
- package/babel/utils.d.ts +5 -0
- package/benchmarks/simple-read.d.ts +2 -0
- package/benchmarks/simple-write.d.ts +2 -0
- package/benchmarks/subscribe-write.d.ts +2 -0
- package/changes.json +5 -0
- package/esm/babel/plugin-debug-label.d.mts +5 -0
- package/esm/babel/plugin-debug-label.mjs +103 -0
- package/esm/babel/plugin-react-refresh.d.mts +5 -0
- package/esm/babel/plugin-react-refresh.mjs +121 -0
- package/esm/babel/preset.d.mts +6 -0
- package/esm/babel/preset.mjs +179 -0
- package/esm/babel/utils.d.mts +5 -0
- package/esm/index.d.mts +2 -0
- package/esm/index.mjs +2 -0
- package/esm/react/Provider.d.mts +16 -0
- package/esm/react/useAtom.d.mts +13 -0
- package/esm/react/useAtomValue.d.mts +9 -0
- package/esm/react/useSetAtom.d.mts +7 -0
- package/esm/react/utils/useAtomCallback.d.mts +5 -0
- package/esm/react/utils/useHydrateAtoms.d.mts +14 -0
- package/esm/react/utils/useReducerAtom.d.mts +14 -0
- package/esm/react/utils/useResetAtom.d.mts +6 -0
- package/esm/react/utils.d.mts +4 -0
- package/esm/react/utils.mjs +57 -0
- package/esm/react.d.mts +4 -0
- package/esm/react.mjs +182 -0
- package/esm/utils.d.mts +2 -0
- package/esm/utils.mjs +2 -0
- package/esm/vanilla/atom.d.mts +47 -0
- package/esm/vanilla/internals.d.mts +164 -0
- package/esm/vanilla/internals.mjs +715 -0
- package/esm/vanilla/store.d.mts +5 -0
- package/esm/vanilla/typeUtils.d.mts +7 -0
- package/esm/vanilla/utils/atomFamily.d.mts +55 -0
- package/esm/vanilla/utils/atomWithDefault.d.mts +6 -0
- package/esm/vanilla/utils/atomWithLazy.d.mts +2 -0
- package/esm/vanilla/utils/atomWithObservable.d.mts +32 -0
- package/esm/vanilla/utils/atomWithReducer.d.mts +3 -0
- package/esm/vanilla/utils/atomWithRefresh.d.mts +6 -0
- package/esm/vanilla/utils/atomWithReset.d.mts +8 -0
- package/esm/vanilla/utils/atomWithStorage.d.mts +50 -0
- package/esm/vanilla/utils/constants.d.mts +1 -0
- package/esm/vanilla/utils/freezeAtom.d.mts +6 -0
- package/esm/vanilla/utils/loadable.d.mts +33 -0
- package/esm/vanilla/utils/selectAtom.d.mts +2 -0
- package/esm/vanilla/utils/splitAtom.d.mts +16 -0
- package/esm/vanilla/utils/unwrap.d.mts +5 -0
- package/esm/vanilla/utils.d.mts +14 -0
- package/esm/vanilla/utils.mjs +736 -0
- package/esm/vanilla.d.mts +4 -0
- package/esm/vanilla.mjs +59 -0
- package/index.d.ts +2 -0
- package/index.js +19 -0
- package/package.json +125 -0
- package/react/Provider.d.ts +16 -0
- package/react/useAtom.d.ts +13 -0
- package/react/useAtomValue.d.ts +9 -0
- package/react/useSetAtom.d.ts +7 -0
- package/react/utils/useAtomCallback.d.ts +5 -0
- package/react/utils/useHydrateAtoms.d.ts +14 -0
- package/react/utils/useReducerAtom.d.ts +14 -0
- package/react/utils/useResetAtom.d.ts +6 -0
- package/react/utils.d.ts +4 -0
- package/react/utils.js +100 -0
- package/react.d.ts +4 -0
- package/react.js +182 -0
- package/system/babel/plugin-debug-label.development.js +113 -0
- package/system/babel/plugin-debug-label.production.js +4 -0
- package/system/babel/plugin-react-refresh.development.js +131 -0
- package/system/babel/plugin-react-refresh.production.js +11 -0
- package/system/babel/preset.development.js +189 -0
- package/system/babel/preset.production.js +14 -0
- package/system/index.development.js +27 -0
- package/system/index.production.js +1 -0
- package/system/react/utils.development.js +79 -0
- package/system/react/utils.production.js +2 -0
- package/system/react.development.js +210 -0
- package/system/react.production.js +2 -0
- package/system/utils.development.js +27 -0
- package/system/utils.production.js +1 -0
- package/system/vanilla/internals.development.js +735 -0
- package/system/vanilla/internals.production.js +1 -0
- package/system/vanilla/utils.development.js +764 -0
- package/system/vanilla/utils.production.js +1 -0
- package/system/vanilla.development.js +75 -0
- package/system/vanilla.production.js +1 -0
- package/ts3.8/babel/plugin-debug-label.d.ts +6 -0
- package/ts3.8/babel/plugin-react-refresh.d.ts +6 -0
- package/ts3.8/babel/preset.d.ts +7 -0
- package/ts3.8/babel/utils.d.ts +6 -0
- package/ts3.8/benchmarks/simple-read.d.ts +3 -0
- package/ts3.8/benchmarks/simple-write.d.ts +3 -0
- package/ts3.8/benchmarks/subscribe-write.d.ts +3 -0
- package/ts3.8/esm/babel/plugin-debug-label.d.ts +6 -0
- package/ts3.8/esm/babel/plugin-react-refresh.d.ts +6 -0
- package/ts3.8/esm/babel/preset.d.ts +7 -0
- package/ts3.8/esm/babel/utils.d.ts +6 -0
- package/ts3.8/esm/index.d.ts +3 -0
- package/ts3.8/esm/react/Provider.d.ts +17 -0
- package/ts3.8/esm/react/useAtom.d.ts +28 -0
- package/ts3.8/esm/react/useAtomValue.d.ts +10 -0
- package/ts3.8/esm/react/useSetAtom.d.ts +8 -0
- package/ts3.8/esm/react/utils/useAtomCallback.d.ts +6 -0
- package/ts3.8/esm/react/utils/useHydrateAtoms.d.ts +27 -0
- package/ts3.8/esm/react/utils/useReducerAtom.d.ts +21 -0
- package/ts3.8/esm/react/utils/useResetAtom.d.ts +9 -0
- package/ts3.8/esm/react/utils.d.ts +5 -0
- package/ts3.8/esm/react.d.ts +5 -0
- package/ts3.8/esm/utils.d.ts +3 -0
- package/ts3.8/esm/vanilla/atom.d.ts +48 -0
- package/ts3.8/esm/vanilla/internals.d.ts +165 -0
- package/ts3.8/esm/vanilla/store.d.ts +6 -0
- package/ts3.8/esm/vanilla/typeUtils.d.ts +8 -0
- package/ts3.8/esm/vanilla/utils/atomFamily.d.ts +56 -0
- package/ts3.8/esm/vanilla/utils/atomWithDefault.d.ts +11 -0
- package/ts3.8/esm/vanilla/utils/atomWithLazy.d.ts +3 -0
- package/ts3.8/esm/vanilla/utils/atomWithObservable.d.ts +37 -0
- package/ts3.8/esm/vanilla/utils/atomWithReducer.d.ts +8 -0
- package/ts3.8/esm/vanilla/utils/atomWithRefresh.d.ts +10 -0
- package/ts3.8/esm/vanilla/utils/atomWithReset.d.ts +11 -0
- package/ts3.8/esm/vanilla/utils/atomWithStorage.d.ts +53 -0
- package/ts3.8/esm/vanilla/utils/constants.d.ts +2 -0
- package/ts3.8/esm/vanilla/utils/freezeAtom.d.ts +7 -0
- package/ts3.8/esm/vanilla/utils/loadable.d.ts +34 -0
- package/ts3.8/esm/vanilla/utils/selectAtom.d.ts +3 -0
- package/ts3.8/esm/vanilla/utils/splitAtom.d.ts +21 -0
- package/ts3.8/esm/vanilla/utils/unwrap.d.ts +6 -0
- package/ts3.8/esm/vanilla/utils.d.ts +15 -0
- package/ts3.8/esm/vanilla.d.ts +5 -0
- package/ts3.8/index.d.ts +3 -0
- package/ts3.8/react/Provider.d.ts +17 -0
- package/ts3.8/react/useAtom.d.ts +28 -0
- package/ts3.8/react/useAtomValue.d.ts +10 -0
- package/ts3.8/react/useSetAtom.d.ts +8 -0
- package/ts3.8/react/utils/useAtomCallback.d.ts +6 -0
- package/ts3.8/react/utils/useHydrateAtoms.d.ts +27 -0
- package/ts3.8/react/utils/useReducerAtom.d.ts +21 -0
- package/ts3.8/react/utils/useResetAtom.d.ts +9 -0
- package/ts3.8/react/utils.d.ts +5 -0
- package/ts3.8/react.d.ts +5 -0
- package/ts3.8/utils.d.ts +3 -0
- package/ts3.8/vanilla/atom.d.ts +48 -0
- package/ts3.8/vanilla/internals.d.ts +165 -0
- package/ts3.8/vanilla/store.d.ts +6 -0
- package/ts3.8/vanilla/typeUtils.d.ts +8 -0
- package/ts3.8/vanilla/utils/atomFamily.d.ts +56 -0
- package/ts3.8/vanilla/utils/atomWithDefault.d.ts +11 -0
- package/ts3.8/vanilla/utils/atomWithLazy.d.ts +3 -0
- package/ts3.8/vanilla/utils/atomWithObservable.d.ts +37 -0
- package/ts3.8/vanilla/utils/atomWithReducer.d.ts +8 -0
- package/ts3.8/vanilla/utils/atomWithRefresh.d.ts +10 -0
- package/ts3.8/vanilla/utils/atomWithReset.d.ts +11 -0
- package/ts3.8/vanilla/utils/atomWithStorage.d.ts +53 -0
- package/ts3.8/vanilla/utils/constants.d.ts +2 -0
- package/ts3.8/vanilla/utils/freezeAtom.d.ts +7 -0
- package/ts3.8/vanilla/utils/loadable.d.ts +34 -0
- package/ts3.8/vanilla/utils/selectAtom.d.ts +3 -0
- package/ts3.8/vanilla/utils/splitAtom.d.ts +21 -0
- package/ts3.8/vanilla/utils/unwrap.d.ts +6 -0
- package/ts3.8/vanilla/utils.d.ts +15 -0
- package/ts3.8/vanilla.d.ts +5 -0
- package/ts_version_3.8_and_above_is_required.d.ts +0 -0
- package/umd/babel/plugin-debug-label.development.js +58 -0
- package/umd/babel/plugin-debug-label.production.js +1 -0
- package/umd/babel/plugin-react-refresh.development.js +76 -0
- package/umd/babel/plugin-react-refresh.production.js +1 -0
- package/umd/babel/preset.development.js +114 -0
- package/umd/babel/preset.production.js +1 -0
- package/umd/index.development.js +20 -0
- package/umd/index.production.js +1 -0
- package/umd/react/utils.development.js +101 -0
- package/umd/react/utils.production.js +1 -0
- package/umd/react.development.js +184 -0
- package/umd/react.production.js +1 -0
- package/umd/utils.development.js +20 -0
- package/umd/utils.production.js +1 -0
- package/umd/vanilla/internals.development.js +785 -0
- package/umd/vanilla/internals.production.js +1 -0
- package/umd/vanilla/utils.development.js +858 -0
- package/umd/vanilla/utils.production.js +1 -0
- package/umd/vanilla.development.js +64 -0
- package/umd/vanilla.production.js +1 -0
- package/utils.d.ts +2 -0
- package/utils.js +19 -0
- package/vanilla/atom.d.ts +47 -0
- package/vanilla/internals.d.ts +164 -0
- package/vanilla/internals.js +779 -0
- package/vanilla/store.d.ts +5 -0
- package/vanilla/typeUtils.d.ts +7 -0
- package/vanilla/utils/atomFamily.d.ts +55 -0
- package/vanilla/utils/atomWithDefault.d.ts +6 -0
- package/vanilla/utils/atomWithLazy.d.ts +2 -0
- package/vanilla/utils/atomWithObservable.d.ts +32 -0
- package/vanilla/utils/atomWithReducer.d.ts +3 -0
- package/vanilla/utils/atomWithRefresh.d.ts +6 -0
- package/vanilla/utils/atomWithReset.d.ts +8 -0
- package/vanilla/utils/atomWithStorage.d.ts +50 -0
- package/vanilla/utils/constants.d.ts +1 -0
- package/vanilla/utils/freezeAtom.d.ts +6 -0
- package/vanilla/utils/loadable.d.ts +33 -0
- package/vanilla/utils/selectAtom.d.ts +2 -0
- package/vanilla/utils/splitAtom.d.ts +16 -0
- package/vanilla/utils/unwrap.d.ts +5 -0
- package/vanilla/utils.d.ts +14 -0
- package/vanilla/utils.js +854 -0
- package/vanilla.d.ts +4 -0
- package/vanilla.js +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("jotai/vanilla")):"function"==typeof define&&define.amd?define(["exports","jotai/vanilla"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).jotaiVanillaUtils={},t.jotaiVanilla)}(this,function(t,n){"use strict";var e=Symbol("");function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function o(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,n){if(t){if("string"==typeof t)return r(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,n):void 0}}(t))||n){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},i.apply(null,arguments)}var a=function(t,n,e){return(n.has(e)?n:n.set(e,t())).get(e)},u=new WeakMap;var f=new WeakSet,c=function(t){if("object"!=typeof t||null===t)return t;Object.freeze(t);for(var n,e=o(Object.getOwnPropertyNames(t));!(n=e()).done;){var r=n.value;c(t[r])}return t};function l(t){if(f.has(t))return t;f.add(t);var n=t.read;if(t.read=function(t,e){return c(n.call(this,t,e))},"write"in t){var e=t.write;t.write=function(n,r){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return e.call.apply(e,[this,n,function(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return e[0]===t&&(e[1]=c(e[1])),r.apply(void 0,e)}].concat(i))}}return t}var v=function(t,n,e){return(n.has(e)?n:n.set(e,t())).get(e)},s=new WeakMap,d={},m=function(t){return!!t.write};var h=function(t){return"function"==typeof(null==t?void 0:t.then)};function p(t,n){var e,r;void 0===t&&(t=function(){try{return window.localStorage}catch(t){return}});var o,i={getItem:function(o,i){var a,u,f=function(t){if(e!==(t=t||"")){try{r=JSON.parse(t,null==n?void 0:n.reviver)}catch(t){return i}e=t}return r},c=null!=(a=null==(u=t())?void 0:u.getItem(o))?a:null;return h(c)?c.then(f):f(c)},setItem:function(e,r){var o;return null==(o=t())?void 0:o.setItem(e,JSON.stringify(r,null==n?void 0:n.replacer))},removeItem:function(n){var e;return null==(e=t())?void 0:e.removeItem(n)}};try{var a;o=null==(a=t())?void 0:a.subscribe}catch(t){}return!o&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(o=function(n,e){if(!(t()instanceof window.Storage))return function(){};var r=function(r){r.storageArea===t()&&r.key===n&&e(r.newValue)};return window.addEventListener("storage",r),function(){window.removeEventListener("storage",r)}}),o&&(i.subscribe=function(t){return function(n,e,r){return t(n,function(t){var n;try{n=JSON.parse(t||"")}catch(t){n=r}e(n)})}}(o)),i}var y=p();var b=function(t,n,e){return(n.has(e)?n:n.set(e,t())).get(e)},w=new WeakMap,g=function(){};function O(t,e){return void 0===e&&(e=g),r=function(){var r=new WeakMap,o=new WeakMap,i=n.atom(0),a=n.atom([]);a.INTERNAL_onInit=function(t){t.set(a,[function(){return t.set(i,function(t){return t+1})}])};var u=n.atom(function(n){var f,c;n(i);try{c=n(u)}catch(t){}var l,v=n(t);if("function"!=typeof(null==(l=v)?void 0:l.then))return{v:v};if(v!==(null==(f=c)?void 0:f.p)&&v.then(function(t){o.set(v,t),(0,n(a)[0])()},function(t){r.set(v,t),(0,n(a)[0])()}),r.has(v))throw r.get(v);return o.has(v)?{p:v,v:o.get(v)}:c&&"v"in c?{p:v,f:e(c.v),v:c.v}:{p:v,f:e()}});return u.init=void 0,n.atom(function(t){var n=t(u);return"f"in n?n.f:n.v},function(n,e){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return e.apply(void 0,[t].concat(o))})},o=e,i=b(function(){return new WeakMap},w,t),b(r,i,o);var r,o,i}var k=new WeakMap;t.RESET=e,t.atomFamily=function(t,n){var e=null,r=new Map,i=new Set,a=function(i){var f;if(void 0===n)f=r.get(i);else for(var c,l=o(r);!(c=l()).done;){var v=c.value,s=v[0],d=v[1];if(n(s,i)){f=d;break}}if(void 0!==f){if(null==e||!e(f[1],i))return f[0];a.remove(i)}var m=t(i);return r.set(i,[m,Date.now()]),u("CREATE",i,m),m},u=function(t,n,e){for(var r,a=o(i);!(r=a()).done;){(0,r.value)({type:t,param:n,atom:e})}};return a.unstable_listen=function(t){return i.add(t),function(){i.delete(t)}},a.getParams=function(){return r.keys()},a.remove=function(t){if(void 0===n){if(!r.has(t))return;var e=r.get(t)[0];r.delete(t),u("REMOVE",t,e)}else for(var i,a=o(r);!(i=a()).done;){var f=i.value,c=f[0],l=f[1][0];if(n(c,t)){r.delete(c),u("REMOVE",c,l);break}}},a.setShouldRemove=function(t){if(e=t)for(var n,i=o(r);!(n=i()).done;){var a=n.value,f=a[0],c=a[1],l=c[0],v=c[1];e(v,f)&&(r.delete(f),u("REMOVE",f,l))}},a},t.atomWithDefault=function(t){var r=Symbol(),o=n.atom(r),i=n.atom(function(n,e){var i=n(o);return i!==r?i:t(n,e)},function(t,n,a){var u="function"==typeof a?a(t(i)):a;n(o,u===e?r:u)});return i},t.atomWithLazy=function(t){var e=n.atom(void 0);return delete e.init,Object.defineProperty(e,"init",{get:function(){return t()}}),e},t.atomWithObservable=function(t,e){var r=function(t){if("e"in t)throw t.e;return t.d},o=n.atom(function(r){var o,i,a,u=t(r),f=null==(o=(i=u)[Symbol.observable])?void 0:o.call(i);f&&(u=f);var c,l,v,s,d=function(){return new Promise(function(t){a=t})},m=e&&"initialValue"in e?{d:"function"==typeof e.initialValue?e.initialValue():e.initialValue}:d(),h=function(t){l=t,null==a||a(t),null==c||c(t)},p=function(){return!c},y=function(){v&&(v.unsubscribe(),v=void 0)},b=function(){v&&(clearTimeout(s),v.unsubscribe()),v=u.subscribe({next:function(t){return h({d:t})},error:function(t){return h({e:t})},complete:function(){}}),p()&&null!=e&&e.unstable_timeout&&(s=setTimeout(y,e.unstable_timeout))};b();var w=n.atom(l||m);return w.onMount=function(t){return c=t,l&&t(l),v?clearTimeout(s):b(),function(){c=void 0,null!=e&&e.unstable_timeout?s=setTimeout(y,e.unstable_timeout):y()}},[w,u,d,b,p]});return n.atom(function(t){var n,e=t(o),i=t(e[0]);return"function"==typeof(null==(n=i)?void 0:n.then)?i.then(r):r(i)},function(t,n,e){var r=t(o),i=r[0],a=r[1],u=r[2],f=r[3],c=r[4];if(!("next"in a))throw new Error("observable is not subject");c()&&(n(i,u()),f()),a.next(e)})},t.atomWithReducer=function(t,e){return n.atom(t,function(t,n,r){n(this,e(t(this),r))})},t.atomWithRefresh=function(t,e){var r=n.atom(0);return n.atom(function(n,e){return n(r),t(n,e)},function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];if(0===i.length)n(r,function(t){return t+1});else if(e)return e.apply(void 0,[t,n].concat(i))})},t.atomWithReset=function(t){var r=n.atom(t,function(n,o,i){var a="function"==typeof i?i(n(r)):i;o(r,a===e?t:a)});return r},t.atomWithStorage=function(t,r,o,i){void 0===o&&(o=y);var a=null==i?void 0:i.getOnInit,u=n.atom(a?o.getItem(t,r):r);return u.onMount=function(n){var e;return n(o.getItem(t,r)),o.subscribe&&(e=o.subscribe(t,n,r)),e},n.atom(function(t){return t(u)},function(n,i,a){var f="function"==typeof a?a(n(u)):a;return f===e?(i(u,r),o.removeItem(t)):h(f)?f.then(function(n){return i(u,n),o.setItem(t,n)}):(i(u,f),o.setItem(t,f))})},t.createJSONStorage=p,t.freezeAtom=l,t.freezeAtomCreator=function(t){return function(){return l(t.apply(void 0,arguments))}},t.loadable=function(t){return e=function(){var e={state:"loading"},r=O(t,function(){return e});return n.atom(function(t){try{var n=t(r);return n===e?e:{state:"hasData",data:n}}catch(t){return{state:"hasError",error:t}}})},r=t,(k.has(r)?k:k.set(r,e())).get(r);var e,r},t.selectAtom=function(t,e,r){return void 0===r&&(r=Object.is),o=function(){var o=Symbol(),i=n.atom(function(n){var a=n(i);return function(t){var n=t[0],i=t[1];if(i===o)return e(n);var a=e(n,i);return r(i,a)?i:a}([n(t),a])});return i.init=o,i},i=e,f=r,c=a(function(){return new WeakMap},u,t),l=a(function(){return new WeakMap},c,i),a(o,l,f);var o,i,f,c,l},t.splitAtom=function(t,e){return r=function(){var r=new WeakMap,o=function(a,u){var f=r.get(a);if(f)return f;var c=u&&r.get(u),l=[],v=[];return a.forEach(function(r,u){var f=e?e(r):u;v[u]=f;var s=c&&c.atomList[c.keyList.indexOf(f)];if(s)l[u]=s;else{var d=function(n){var e=n(i),r=n(t),u=o(r,null==e?void 0:e.arr).keyList.indexOf(f);if(u<0||u>=r.length){var c=a[o(a).keyList.indexOf(f)];if(c)return c;throw new Error("splitAtom: index out of bounds for read")}return r[u]};l[u]=m(t)?n.atom(d,function(n,e,r){var a=n(i),u=n(t),c=o(u,null==a?void 0:a.arr).keyList.indexOf(f);if(c<0||c>=u.length)throw new Error("splitAtom: index out of bounds for write");var l="function"==typeof r?r(u[c]):r;Object.is(u[c],l)||e(t,[].concat(u.slice(0,c),[l],u.slice(c+1)))}):n.atom(d)}}),f=c&&c.keyList.length===v.length&&c.keyList.every(function(t,n){return t===v[n]})?c:{arr:a,atomList:l,keyList:v},r.set(a,f),f},i=n.atom(function(n){var e=n(i),r=n(t);return o(r,null==e?void 0:e.arr)});i.init=void 0;var a=m(t)?n.atom(function(t){return t(i).atomList},function(n,e,r){switch(r.type){case"remove":var o=n(a).indexOf(r.atom);if(o>=0){var i=n(t);e(t,[].concat(i.slice(0,o),i.slice(o+1)))}break;case"insert":var u=r.before?n(a).indexOf(r.before):n(a).length;if(u>=0){var f=n(t);e(t,[].concat(f.slice(0,u),[r.value],f.slice(u)))}break;case"move":var c=n(a).indexOf(r.atom),l=r.before?n(a).indexOf(r.before):n(a).length;if(c>=0&&l>=0){var v=n(t);e(t,c<l?[].concat(v.slice(0,c),v.slice(c+1,l),[v[c]],v.slice(l)):[].concat(v.slice(0,l),[v[c]],v.slice(l,c),v.slice(c+1)))}}}):n.atom(function(t){return t(i).atomList});return a},o=e||d,i=v(function(){return new WeakMap},s,t),v(r,i,o);var r,o,i},t.unstable_withStorageValidator=function(t){return function(n){return i({},n,{getItem:function(e,r){var o=function(n){return t(n)?n:r},i=n.getItem(e,r);return h(i)?i.then(o):o(i)}})}},t.unwrap=O});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jotai/vanilla/internals')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'jotai/vanilla/internals'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jotaiVanilla = {}, global.jotaiVanillaInternals));
|
|
5
|
+
})(this, (function (exports, internals) { 'use strict';
|
|
6
|
+
|
|
7
|
+
var keyCount = 0;
|
|
8
|
+
function atom(read, write) {
|
|
9
|
+
var key = "atom" + ++keyCount;
|
|
10
|
+
var config = {
|
|
11
|
+
toString: function toString() {
|
|
12
|
+
return this.debugLabel ? key + ':' + this.debugLabel : key;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
if (typeof read === 'function') {
|
|
16
|
+
config.read = read;
|
|
17
|
+
} else {
|
|
18
|
+
config.init = read;
|
|
19
|
+
config.read = defaultRead;
|
|
20
|
+
config.write = defaultWrite;
|
|
21
|
+
}
|
|
22
|
+
if (write) {
|
|
23
|
+
config.write = write;
|
|
24
|
+
}
|
|
25
|
+
return config;
|
|
26
|
+
}
|
|
27
|
+
function defaultRead(get) {
|
|
28
|
+
return get(this);
|
|
29
|
+
}
|
|
30
|
+
function defaultWrite(get, set, arg) {
|
|
31
|
+
return set(this, typeof arg === 'function' ? arg(get(this)) : arg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var overriddenCreateStore;
|
|
35
|
+
function INTERNAL_overrideCreateStore(fn) {
|
|
36
|
+
overriddenCreateStore = fn(overriddenCreateStore);
|
|
37
|
+
}
|
|
38
|
+
function createStore() {
|
|
39
|
+
if (overriddenCreateStore) {
|
|
40
|
+
return overriddenCreateStore();
|
|
41
|
+
}
|
|
42
|
+
return internals.INTERNAL_buildStoreRev2();
|
|
43
|
+
}
|
|
44
|
+
var defaultStore;
|
|
45
|
+
function getDefaultStore() {
|
|
46
|
+
if (!defaultStore) {
|
|
47
|
+
defaultStore = createStore();
|
|
48
|
+
{
|
|
49
|
+
var _ref;
|
|
50
|
+
(_ref = globalThis).__JOTAI_DEFAULT_STORE__ || (_ref.__JOTAI_DEFAULT_STORE__ = defaultStore);
|
|
51
|
+
if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {
|
|
52
|
+
console.warn('Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return defaultStore;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exports.INTERNAL_overrideCreateStore = INTERNAL_overrideCreateStore;
|
|
60
|
+
exports.atom = atom;
|
|
61
|
+
exports.createStore = createStore;
|
|
62
|
+
exports.getDefaultStore = getDefaultStore;
|
|
63
|
+
|
|
64
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jotai/vanilla/internals")):"function"==typeof define&&define.amd?define(["exports","jotai/vanilla/internals"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jotaiVanilla={},t.jotaiVanillaInternals)}(this,function(t,e){"use strict";var n,i,o=0;function r(t){return t(this)}function a(t,e,n){return e(this,"function"==typeof n?n(t(this)):n)}function f(){return n?n():e.INTERNAL_buildStoreRev2()}t.INTERNAL_overrideCreateStore=function(t){n=t(n)},t.atom=function(t,e){var n="atom"+ ++o,i={toString:function(){return n}};return"function"==typeof t?i.read=t:(i.init=t,i.read=r,i.write=a),e&&(i.write=e),i},t.createStore=f,t.getDefaultStore=function(){return i||(i=f()),i}});
|
package/utils.d.ts
ADDED
package/utils.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils$1 = require('jotai/vanilla/utils');
|
|
4
|
+
var utils = require('jotai/react/utils');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.keys(utils$1).forEach(function (k) {
|
|
9
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return utils$1[k]; }
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
Object.keys(utils).forEach(function (k) {
|
|
15
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return utils[k]; }
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Store } from './store';
|
|
2
|
+
type Getter = <Value>(atom: Atom<Value>) => Value;
|
|
3
|
+
type Setter = <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
4
|
+
type SetAtom<Args extends unknown[], Result> = <A extends Args>(...args: A) => Result;
|
|
5
|
+
/**
|
|
6
|
+
* setSelf is for internal use only and subject to change without notice.
|
|
7
|
+
*/
|
|
8
|
+
type Read<Value, SetSelf = never> = (get: Getter, options: {
|
|
9
|
+
readonly signal: AbortSignal;
|
|
10
|
+
readonly setSelf: SetSelf;
|
|
11
|
+
}) => Value;
|
|
12
|
+
type Write<Args extends unknown[], Result> = (get: Getter, set: Setter, ...args: Args) => Result;
|
|
13
|
+
type WithInitialValue<Value> = {
|
|
14
|
+
init: Value;
|
|
15
|
+
};
|
|
16
|
+
type OnUnmount = () => void;
|
|
17
|
+
type OnMount<Args extends unknown[], Result> = <S extends SetAtom<Args, Result>>(setAtom: S) => OnUnmount | void;
|
|
18
|
+
export interface Atom<Value> {
|
|
19
|
+
toString: () => string;
|
|
20
|
+
read: Read<Value>;
|
|
21
|
+
debugLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* To ONLY be used by Jotai libraries to mark atoms as private. Subject to change.
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
debugPrivate?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Fires after atom is referenced by the store for the first time
|
|
29
|
+
* This is an internal API and subject to change without notice.
|
|
30
|
+
*/
|
|
31
|
+
INTERNAL_onInit?: (store: Store) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface WritableAtom<Value, Args extends unknown[], Result> extends Atom<Value> {
|
|
34
|
+
read: Read<Value, SetAtom<Args, unknown>>;
|
|
35
|
+
write: Write<Args, Result>;
|
|
36
|
+
onMount?: OnMount<Args, Result>;
|
|
37
|
+
}
|
|
38
|
+
type SetStateAction<Value> = Value | ((prev: Value) => Value);
|
|
39
|
+
export type PrimitiveAtom<Value> = WritableAtom<Value, [
|
|
40
|
+
SetStateAction<Value>
|
|
41
|
+
], void>;
|
|
42
|
+
export declare function atom<Value, Args extends unknown[], Result>(read: Read<Value, SetAtom<Args, unknown>>, write: Write<Args, Result>): WritableAtom<Value, Args, Result>;
|
|
43
|
+
export declare function atom<Value>(read: Read<Value>): Atom<Value>;
|
|
44
|
+
export declare function atom<Value, Args extends unknown[], Result>(initialValue: Value, write: Write<Args, Result>): WritableAtom<Value, Args, Result> & WithInitialValue<Value>;
|
|
45
|
+
export declare function atom<Value>(): PrimitiveAtom<Value | undefined> & WithInitialValue<Value | undefined>;
|
|
46
|
+
export declare function atom<Value>(initialValue: Value): PrimitiveAtom<Value> & WithInitialValue<Value>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { Atom, WritableAtom } from './atom';
|
|
2
|
+
type AnyValue = unknown;
|
|
3
|
+
type AnyError = unknown;
|
|
4
|
+
type AnyAtom = Atom<AnyValue>;
|
|
5
|
+
type AnyWritableAtom = WritableAtom<AnyValue, unknown[], unknown>;
|
|
6
|
+
type OnUnmount = () => void;
|
|
7
|
+
type EpochNumber = number;
|
|
8
|
+
/**
|
|
9
|
+
* Mutable atom state,
|
|
10
|
+
* tracked for both mounted and unmounted atoms in a store.
|
|
11
|
+
*
|
|
12
|
+
* This should be garbage collectable.
|
|
13
|
+
* We can mutate it during atom read. (except for fields with TODO)
|
|
14
|
+
*/
|
|
15
|
+
type AtomState<Value = AnyValue> = {
|
|
16
|
+
/**
|
|
17
|
+
* Map of atoms that the atom depends on.
|
|
18
|
+
* The map value is the epoch number of the dependency.
|
|
19
|
+
*/
|
|
20
|
+
readonly d: Map<AnyAtom, EpochNumber>;
|
|
21
|
+
/**
|
|
22
|
+
* Set of atoms with pending promise that depend on the atom.
|
|
23
|
+
*
|
|
24
|
+
* This may cause memory leaks, but it's for the capability to continue promises
|
|
25
|
+
* TODO(daishi): revisit how to handle this
|
|
26
|
+
*/
|
|
27
|
+
readonly p: Set<AnyAtom>;
|
|
28
|
+
/** The epoch number of the atom. */
|
|
29
|
+
n: EpochNumber;
|
|
30
|
+
/** Atom value */
|
|
31
|
+
v?: Value;
|
|
32
|
+
/** Atom error */
|
|
33
|
+
e?: AnyError;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* State tracked for mounted atoms. An atom is considered "mounted" if it has a
|
|
37
|
+
* subscriber, or is a transitive dependency of another atom that has a
|
|
38
|
+
* subscriber.
|
|
39
|
+
* The mounted state of an atom is freed once it is no longer mounted.
|
|
40
|
+
*/
|
|
41
|
+
type Mounted = {
|
|
42
|
+
/** Set of listeners to notify when the atom value changes. */
|
|
43
|
+
readonly l: Set<() => void>;
|
|
44
|
+
/** Set of mounted atoms that the atom depends on. */
|
|
45
|
+
readonly d: Set<AnyAtom>;
|
|
46
|
+
/** Set of mounted atoms that depends on the atom. */
|
|
47
|
+
readonly t: Set<AnyAtom>;
|
|
48
|
+
/** Function to run when the atom is unmounted. */
|
|
49
|
+
u?: () => void;
|
|
50
|
+
};
|
|
51
|
+
type WeakMapLike<K extends object, V> = {
|
|
52
|
+
get(key: K): V | undefined;
|
|
53
|
+
set(key: K, value: V): void;
|
|
54
|
+
has(key: K): boolean;
|
|
55
|
+
delete(key: K): boolean;
|
|
56
|
+
};
|
|
57
|
+
type SetLike<T> = {
|
|
58
|
+
readonly size: number;
|
|
59
|
+
add(value: T): void;
|
|
60
|
+
has(value: T): boolean;
|
|
61
|
+
delete(value: T): boolean;
|
|
62
|
+
clear(): void;
|
|
63
|
+
forEach(callback: (value: T) => void): void;
|
|
64
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
65
|
+
};
|
|
66
|
+
type AtomStateMap = WeakMapLike<AnyAtom, AtomState>;
|
|
67
|
+
type MountedMap = WeakMapLike<AnyAtom, Mounted>;
|
|
68
|
+
type InvalidatedAtoms = WeakMapLike<AnyAtom, EpochNumber>;
|
|
69
|
+
type ChangedAtoms = SetLike<AnyAtom>;
|
|
70
|
+
type Callbacks = SetLike<() => void>;
|
|
71
|
+
type AtomRead = <Value>(store: Store, atom: Atom<Value>, ...params: Parameters<Atom<Value>['read']>) => Value;
|
|
72
|
+
type AtomWrite = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtom<Value, Args, Result>, ...params: Parameters<WritableAtom<Value, Args, Result>['write']>) => Result;
|
|
73
|
+
type AtomOnInit = <Value>(store: Store, atom: Atom<Value>) => void;
|
|
74
|
+
type AtomOnMount = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtom<Value, Args, Result>, setAtom: (...args: Args) => Result) => OnUnmount | void;
|
|
75
|
+
type EnsureAtomState = <Value>(store: Store, atom: Atom<Value>) => AtomState<Value>;
|
|
76
|
+
type FlushCallbacks = (store: Store) => void;
|
|
77
|
+
type RecomputeInvalidatedAtoms = (store: Store) => void;
|
|
78
|
+
type ReadAtomState = <Value>(store: Store, atom: Atom<Value>) => AtomState<Value>;
|
|
79
|
+
type InvalidateDependents = (store: Store, atom: AnyAtom) => void;
|
|
80
|
+
type WriteAtomState = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
81
|
+
type MountDependencies = (store: Store, atom: AnyAtom) => void;
|
|
82
|
+
type MountAtom = <Value>(store: Store, atom: Atom<Value>) => Mounted;
|
|
83
|
+
type UnmountAtom = <Value>(store: Store, atom: Atom<Value>) => Mounted | undefined;
|
|
84
|
+
type SetAtomStateValueOrPromise = <Value>(store: Store, atom: Atom<Value>, valueOrPromise: Value) => void;
|
|
85
|
+
type StoreGet = <Value>(store: Store, atom: Atom<Value>) => Value;
|
|
86
|
+
type StoreSet = <Value, Args extends unknown[], Result>(store: Store, atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
87
|
+
type StoreSub = (store: Store, atom: AnyAtom, listener: () => void) => () => void;
|
|
88
|
+
type EnhanceBuildingBlocks = (buildingBlocks: Readonly<BuildingBlocks>) => Readonly<BuildingBlocks>;
|
|
89
|
+
type AbortHandlersMap = WeakMapLike<PromiseLike<unknown>, Set<() => void>>;
|
|
90
|
+
type RegisterAbortHandler = <T>(store: Store, promise: PromiseLike<T>, abortHandler: () => void) => void;
|
|
91
|
+
type AbortPromise = <T>(store: Store, promise: PromiseLike<T>) => void;
|
|
92
|
+
type Store = {
|
|
93
|
+
get: <Value>(atom: Atom<Value>) => Value;
|
|
94
|
+
set: <Value, Args extends unknown[], Result>(atom: WritableAtom<Value, Args, Result>, ...args: Args) => Result;
|
|
95
|
+
sub: (atom: AnyAtom, listener: () => void) => () => void;
|
|
96
|
+
};
|
|
97
|
+
type BuildingBlocks = [
|
|
98
|
+
atomStateMap: AtomStateMap,
|
|
99
|
+
mountedMap: MountedMap,
|
|
100
|
+
invalidatedAtoms: InvalidatedAtoms,
|
|
101
|
+
changedAtoms: ChangedAtoms,
|
|
102
|
+
mountCallbacks: Callbacks,
|
|
103
|
+
unmountCallbacks: Callbacks,
|
|
104
|
+
storeHooks: StoreHooks,
|
|
105
|
+
atomRead: AtomRead,
|
|
106
|
+
atomWrite: AtomWrite,
|
|
107
|
+
atomOnInit: AtomOnInit,
|
|
108
|
+
atomOnMount: AtomOnMount,
|
|
109
|
+
ensureAtomState: EnsureAtomState,
|
|
110
|
+
flushCallbacks: FlushCallbacks,
|
|
111
|
+
recomputeInvalidatedAtoms: RecomputeInvalidatedAtoms,
|
|
112
|
+
readAtomState: ReadAtomState,
|
|
113
|
+
invalidateDependents: InvalidateDependents,
|
|
114
|
+
writeAtomState: WriteAtomState,
|
|
115
|
+
mountDependencies: MountDependencies,
|
|
116
|
+
mountAtom: MountAtom,
|
|
117
|
+
unmountAtom: UnmountAtom,
|
|
118
|
+
setAtomStateValueOrPromise: SetAtomStateValueOrPromise,
|
|
119
|
+
storeGet: StoreGet,
|
|
120
|
+
storeSet: StoreSet,
|
|
121
|
+
storeSub: StoreSub,
|
|
122
|
+
enhanceBuildingBlocks: EnhanceBuildingBlocks | undefined,
|
|
123
|
+
abortHandlersMap: AbortHandlersMap,
|
|
124
|
+
registerAbortHandler: RegisterAbortHandler,
|
|
125
|
+
abortPromise: AbortPromise
|
|
126
|
+
];
|
|
127
|
+
export type { AtomState as INTERNAL_AtomState, Mounted as INTERNAL_Mounted, AtomStateMap as INTERNAL_AtomStateMap, MountedMap as INTERNAL_MountedMap, InvalidatedAtoms as INTERNAL_InvalidatedAtoms, ChangedAtoms as INTERNAL_ChangedAtoms, Callbacks as INTERNAL_Callbacks, AtomRead as INTERNAL_AtomRead, AtomWrite as INTERNAL_AtomWrite, AtomOnInit as INTERNAL_AtomOnInit, AtomOnMount as INTERNAL_AtomOnMount, EnsureAtomState as INTERNAL_EnsureAtomState, FlushCallbacks as INTERNAL_FlushCallbacks, RecomputeInvalidatedAtoms as INTERNAL_RecomputeInvalidatedAtoms, ReadAtomState as INTERNAL_ReadAtomState, InvalidateDependents as INTERNAL_InvalidateDependents, WriteAtomState as INTERNAL_WriteAtomState, MountDependencies as INTERNAL_MountDependencies, MountAtom as INTERNAL_MountAtom, UnmountAtom as INTERNAL_UnmountAtom, Store as INTERNAL_Store, BuildingBlocks as INTERNAL_BuildingBlocks, StoreHooks as INTERNAL_StoreHooks, };
|
|
128
|
+
declare function hasInitialValue<T extends Atom<AnyValue>>(atom: T): atom is T & (T extends Atom<infer Value> ? {
|
|
129
|
+
init: Value;
|
|
130
|
+
} : never);
|
|
131
|
+
declare function isActuallyWritableAtom(atom: AnyAtom): atom is AnyWritableAtom;
|
|
132
|
+
declare function isAtomStateInitialized<Value>(atomState: AtomState<Value>): boolean;
|
|
133
|
+
declare function returnAtomValue<Value>(atomState: AtomState<Value>): Value;
|
|
134
|
+
declare function isPromiseLike(p: unknown): p is PromiseLike<unknown>;
|
|
135
|
+
declare function addPendingPromiseToDependency(atom: AnyAtom, promise: PromiseLike<AnyValue>, dependencyAtomState: AtomState): void;
|
|
136
|
+
declare function getMountedOrPendingDependents(atom: AnyAtom, atomState: AtomState, mountedMap: MountedMap): Iterable<AnyAtom>;
|
|
137
|
+
type StoreHook = {
|
|
138
|
+
(): void;
|
|
139
|
+
add(callback: () => void): () => void;
|
|
140
|
+
};
|
|
141
|
+
type StoreHookForAtoms = {
|
|
142
|
+
(atom: AnyAtom): void;
|
|
143
|
+
add(atom: AnyAtom, callback: () => void): () => void;
|
|
144
|
+
add(atom: undefined, callback: (atom: AnyAtom) => void): () => void;
|
|
145
|
+
};
|
|
146
|
+
/** StoreHooks are an experimental API. */
|
|
147
|
+
type StoreHooks = {
|
|
148
|
+
/** Listener to notify when the atom state is created. */
|
|
149
|
+
readonly i?: StoreHookForAtoms;
|
|
150
|
+
/** Listener to notify when the atom is read. */
|
|
151
|
+
readonly r?: StoreHookForAtoms;
|
|
152
|
+
/** Listener to notify when the atom value is changed. */
|
|
153
|
+
readonly c?: StoreHookForAtoms;
|
|
154
|
+
/** Listener to notify when the atom is mounted. */
|
|
155
|
+
readonly m?: StoreHookForAtoms;
|
|
156
|
+
/** Listener to notify when the atom is unmounted. */
|
|
157
|
+
readonly u?: StoreHookForAtoms;
|
|
158
|
+
/** Listener to notify when callbacks are being flushed. */
|
|
159
|
+
readonly f?: StoreHook;
|
|
160
|
+
};
|
|
161
|
+
declare function initializeStoreHooks(storeHooks: StoreHooks): Required<StoreHooks>;
|
|
162
|
+
declare function getBuildingBlocks(store: Store): Readonly<BuildingBlocks>;
|
|
163
|
+
declare function buildStore(...buildArgs: Partial<BuildingBlocks>): Store;
|
|
164
|
+
export { buildStore as INTERNAL_buildStoreRev2, getBuildingBlocks as INTERNAL_getBuildingBlocksRev2, initializeStoreHooks as INTERNAL_initializeStoreHooksRev2, hasInitialValue as INTERNAL_hasInitialValue, isActuallyWritableAtom as INTERNAL_isActuallyWritableAtom, isAtomStateInitialized as INTERNAL_isAtomStateInitialized, returnAtomValue as INTERNAL_returnAtomValue, isPromiseLike as INTERNAL_isPromiseLike, addPendingPromiseToDependency as INTERNAL_addPendingPromiseToDependency, getMountedOrPendingDependents as INTERNAL_getMountedOrPendingDependents, };
|