react-native-global-state-hooks 10.2.4 → 11.0.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.
- package/GlobalStore.js +1 -1
- package/GlobalStoreAbstract.js +1 -1
- package/asyncStorageWrapper.js +1 -1
- package/bundle.js +1 -1
- package/createContext.js +1 -1
- package/createCustomGlobalState.d.ts +1 -1
- package/createCustomGlobalState.js +1 -1
- package/createGlobalState.js +1 -1
- package/generateStackHash.js +1 -1
- package/getAsyncStorageItem.js +1 -1
- package/index.d.ts +0 -1
- package/isRecord.js +1 -1
- package/package.json +10 -7
- package/setAsyncStorageItem.js +1 -1
- package/shallowCompare.js +1 -1
- package/throwWrongKeyOnActionCollectionConfig.js +1 -1
- package/uniqueId.js +1 -1
- package/useStableState.js +1 -1
- package/webpack.config.js +0 -2
- package/uniqueSymbol.d.ts +0 -1
- package/uniqueSymbol.js +0 -1
package/GlobalStore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,e;t=this,e=(t,e,r)=>(()=>{"use strict";var n={493:e=>{e.exports=t},466:t=>{t.exports=e},413:t=>{t.exports=r}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t](r,r.exports,a),r.exports}var i={};return(()=>{var t=i;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){r=function(){return n};var t,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),c=new G(n||[]);return i(a,"_invoke",{value:E(t,r,c)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var p="suspendedStart",v="suspendedYield",g="executing",d="completed",b={};function m(){}function w(){}function S(){}var j={};f(j,u,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(R([])));O&&O!==o&&a.call(O,u)&&(j=O);var _=S.prototype=m.prototype=Object.create(j);function A(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,r){function n(o,i,c,u){var s=y(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==e(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function E(e,r,n){var o=p;return function(a,i){if(o===g)throw new Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?d:v,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=y(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function R(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function e(){for(;++o<r.length;)if(a.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=S,i(_,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:w,configurable:!0}),w.displayName=f(S,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},A(L.prototype),f(L.prototype,s,(function(){return this})),n.AsyncIterator=L,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new L(h(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(_),f(_,l,"Generator"),f(_,u,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=R,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:R(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},n}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function o(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStore=void 0;var s=a(413),l=a(493),f=a(466),h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}(h,t);var e,a,i,s=(a=h,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(a);if(i){var r=u(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return o(this,t)});function h(t){var e,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=s.call(this,t,a)).asyncStorage=null,e.getMetadata=function(){var t,r;return(null===(t=e.asyncStorage)||void 0===t?void 0:t.key)?Object.assign({isAsyncStorageReady:!1,asyncStorageKey:e.asyncStorage.key},null!==(r=e.metadata)&&void 0!==r?r:{}):e.metadata},e._onInitialize=function(t){var n,o,a,i=t.setState,u=t.getState,s=t.setMetadata;return n=c(e),o=void 0,a=r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h.isAsyncStorageAvailable(this.asyncStorage)){t.next=2;break}return t.abrupt("return");case 2:return s((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1})})),t.next=5,(0,l.getAsyncStorageItem)(this.asyncStorage);case 5:e=t.sent,s((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!0})})),null===e&&(e=u(),(0,f.setAsyncStorageItem)(e,this.asyncStorage)),i(e,{forceUpdate:!0});case 9:case"end":return t.stop()}}),t,this)})),new(o||(o=Promise))((function(t,e){function r(t){try{c(a.next(t))}catch(t){e(t)}}function i(t){try{c(a.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(r,i)}c((a=a.apply(n,[])).next())}))},e._onChange=function(t){var r=t.getState;h.isAsyncStorageAvailable(e.asyncStorage)&&(0,f.setAsyncStorageItem)(r(),e.asyncStorage)},e.onInitialize=null,e.onChange=null,e.onInit=function(t){var r;null===(r=e._onInitialize)||void 0===r||r.call(c(e),t)},e.onStateChanged=function(t){var r;null===(r=e._onChange)||void 0===r||r.call(c(e),t)},e.asyncStorage=null!==(n=a.asyncStorage)&&void 0!==n?n:null,e.setMetadata((function(t){var r,n;return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1,asyncStorageKey:null!==(n=null===(r=e.asyncStorage)||void 0===r?void 0:r.key)&&void 0!==n?n:null})})),e.constructor!==h?o(e):(e.initialize(),e)}return e=h,Object.defineProperty(e,"prototype",{writable:!1}),e}(s.GlobalStoreAbstract);t.GlobalStore=h,h.isAsyncStorageAvailable=function(t){return Boolean(null==t?void 0:t.key)},t.default=h})(),i})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./getAsyncStorageItem.js"),require("./setAsyncStorageItem.js"),require("react-hooks-global-states/GlobalStoreAbstract")):"function"==typeof define&&define.amd?define(["./getAsyncStorageItem.js","./setAsyncStorageItem.js","react-hooks-global-states/GlobalStoreAbstract"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("./getAsyncStorageItem.js"),require("./setAsyncStorageItem.js"),require("react-hooks-global-states/GlobalStoreAbstract")):t["react-native-global-state-hooks"]=e(t["./getAsyncStorageItem.js"],t["./setAsyncStorageItem.js"],t["react-hooks-global-states/GlobalStoreAbstract"]);
|
|
1
|
+
var t,e;t=this,e=(t,e,n)=>(()=>{"use strict";var r={266:e=>{e.exports=t},512:t=>{t.exports=e},868:t=>{t.exports=n}},o={};function a(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return r[t](n,n.exports,a),n.exports}var c={};return(()=>{var t=c;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(){var t,e,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.toStringTag||"@@toStringTag";function i(n,o,a,c){var i=o&&o.prototype instanceof s?o:s,l=Object.create(i.prototype);return r(l,"_invoke",function(n,r,o){var a,c,i,s=0,l=o||[],f=!1,y={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return a=e,c=0,i=t,y.n=n,u}};function p(n,r){for(c=n,i=r,e=0;!f&&s&&!o&&e<l.length;e++){var o,a=l[e],p=y.p,b=a[2];n>3?(o=b===r)&&(i=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=t):a[0]<=p&&((o=n<2&&p<a[1])?(c=0,y.v=r,y.n=a[1]):p<b&&(o=n<3||a[0]>r||r>b)&&(a[4]=n,a[5]=r,y.n=b,c=0))}if(o||n>1)return u;throw f=!0,r}return function(o,l,b){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,b),c=l,i=b;(e=c<2?t:i)||!f;){a||(c?c<3?(c>1&&(y.n=-1),p(c,i)):y.n=i:y.v=i);try{if(s=2,a){if(c||(o="next"),e=a[o]){if(!(e=e.call(a,i)))throw TypeError("iterator result is not an object");if(!e.done)return e;i=e.value,c<2&&(c=0)}else 1===c&&(e=a.return)&&e.call(a),c<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=t}else if((e=(f=y.n<0)?i:n.call(r,y))!==u)break}catch(e){a=t,c=1,i=e}finally{s=1}}return{value:e,done:f}}}(n,a,c),!0),l}var u={};function s(){}function l(){}function f(){}e=Object.getPrototypeOf;var y=[][a]?e(e([][a]())):(r(e={},a,function(){return this}),e),p=f.prototype=s.prototype=Object.create(y);function b(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,r(t,c,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=f,r(p,"constructor",f),r(f,"constructor",l),l.displayName="GeneratorFunction",r(f,c,"GeneratorFunction"),r(p),r(p,c,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:i,m:b}})()}function r(t,e,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}r=function(t,e,n,o){if(e)a?a(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n;else{var c=function(e,n){r(t,e,function(t){return this._invoke(e,n,t)})};c("next",0),c("throw",1),c("return",2)}},r(t,e,n,o)}function o(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(i=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStore=void 0;var l=a(266),f=a(512),y=a(868),p=function(t){function e(t){var r,a,c,s,l,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),c=this,l=[t,p],s=u(s=e),(r=o(c,i()?Reflect.construct(s,l||[],u(c).constructor):s.apply(c,l))).asyncStorage=null,r.getMetadata=function(){var t,e;return(null===(t=r.asyncStorage)||void 0===t?void 0:t.key)?Object.assign({isAsyncStorageReady:!1,asyncStorageKey:r.asyncStorage.key},null!==(e=r.metadata)&&void 0!==e?e:{}):r.metadata},r._onInitialize=function(t){return o=r,a=[t],i=function(t){var r=this,o=t.setState,a=t.getState,c=t.setMetadata;return n().m(function t(){var i;return n().w(function(t){for(;;)switch(t.n){case 0:if(e.isAsyncStorageAvailable(r.asyncStorage)){t.n=1;break}return t.a(2);case 1:return c(function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1})}),t.n=2,(0,f.getAsyncStorageItem)(r.asyncStorage);case 2:i=t.v,c(function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!0})}),null===i&&(i=a(),(0,y.setAsyncStorageItem)(i,r.asyncStorage)),o(i,{forceUpdate:!0});case 3:return t.a(2)}},t)})()},new((c=void 0)||(c=Promise))(function(t,e){function n(t){try{u(i.next(t))}catch(t){e(t)}}function r(t){try{u(i.throw(t))}catch(t){e(t)}}function u(e){var o;e.done?t(e.value):(o=e.value,o instanceof c?o:new c(function(t){t(o)})).then(n,r)}u((i=i.apply(o,a||[])).next())});var o,a,c,i},r._onChange=function(t){var n=t.getState;e.isAsyncStorageAvailable(r.asyncStorage)&&(0,y.setAsyncStorageItem)(n(),r.asyncStorage)},r.onInitialize=null,r.onChange=null,r.onInit=function(t){var e;null===(e=r._onInitialize)||void 0===e||e.call(r,t)},r.onStateChanged=function(t){var e;null===(e=r._onChange)||void 0===e||e.call(r,t)},r.asyncStorage=null!==(a=p.asyncStorage)&&void 0!==a?a:null,r.setMetadata(function(t){var e,n;return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1,asyncStorageKey:null!==(n=null===(e=r.asyncStorage)||void 0===e?void 0:e.key)&&void 0!==n?n:null})}),r.constructor!==e?o(r):(r.initialize(),r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(l.GlobalStoreAbstract);t.GlobalStore=p,p.isAsyncStorageAvailable=function(t){return Boolean(null==t?void 0:t.key)},t.default=p})(),c})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/GlobalStoreAbstract"),require("./getAsyncStorageItem.js"),require("./setAsyncStorageItem.js")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/GlobalStoreAbstract","./getAsyncStorageItem.js","./setAsyncStorageItem.js"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/GlobalStoreAbstract"),require("./getAsyncStorageItem.js"),require("./setAsyncStorageItem.js")):t["react-native-global-state-hooks"]=e(t["react-hooks-global-states/GlobalStoreAbstract"],t["./getAsyncStorageItem.js"],t["./setAsyncStorageItem.js"]);
|
package/GlobalStoreAbstract.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;t=t=>(()=>{"use strict";var e={
|
|
1
|
+
var t;t=t=>(()=>{"use strict";var e={778:e=>{e.exports=t}},o={};function r(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return e[t](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(o=function(){return!!t})()}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStoreAbstract=void 0;var u=function(t){function r(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),(t=function(t,r,n){return r=i(r),function(t,o){if(o&&("object"==e(o)||"function"==typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,o()?Reflect.construct(r,n||[],i(t).constructor):r.apply(t,n))}(this,r,arguments)).onInit=function(e){var o;t._onInitialize(e),null===(o=t.onInitialize)||void 0===o||o.call(t,e)},t.onStateChanged=function(e){var o;t._onInitialize(e),null===(o=t.onChange)||void 0===o||o.call(t,e)},t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(r,t),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(r(778).GlobalStore);t.GlobalStoreAbstract=u,t.default=u})(),n})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./GlobalStore.js")):"function"==typeof define&&define.amd?define(["./GlobalStore.js"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./GlobalStore.js")):this["react-native-global-state-hooks"]=t(this["./GlobalStore.js"]);
|
package/asyncStorageWrapper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;t=t=>(()=>{"use strict";var e={118:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),c=new G(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function w(){}function b(){}function x(){}var L={};l(L,u,(function(){return this}));var j=Object.getPrototypeOf,E=j&&j(j(M([])));E&&E!==r&&a.call(E,u)&&(L=E);var O=x.prototype=w.prototype=Object.create(L);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,c,u){var s=p(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==n(l)&&a.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(l).then((function(t){f.value=t,c(f)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function S(e,r,n){var o=v;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return b.prototype=x,i(O,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(h(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(O),l(O,f,"Generator"),l(O,u,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var a=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]},i=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&a(e,t,r);return i(e,t),e},u=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}u((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStorageWrapper=void 0,e.asyncStorageWrapper=function(){var t,e="pending",n=null;u(void 0,void 0,void 0,o().mark((function a(){var i,u,s,f,l;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,i=Promise.resolve().then((function(){return c(r(878))})),t=i,o.next=5,i;case 5:u=o.sent,s=u.default,f=s.getItem,l=s.setItem,f.bind(s),l.bind(s),n={getItem:f,setItem:l},e="resolved",o.next=18;break;case 14:o.prev=14,o.t0=o.catch(0),e="rejected";case 18:return o.prev=18,t=null,o.finish(18);case 21:case"end":return o.stop()}}),a,null,[[0,14,18,21]])})));var a=function(){throw new Error("[AsyncStorageManager Not Found] \n\n Please install the react-native-async-storage/async-storage to be use as the default async storage manager or\n add an AsyncStorageManager using the asyncStorageWrapper.addAsyncStorageManager method before attempting to get or set items.")},i=function(){return u(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("pending"!==e||!t){r.next=2;break}return r.abrupt("return",t);case 2:if("rejected"!==e){r.next=4;break}return r.abrupt("return",t.catch((function(t){throw t})));case 4:return n||a(),r.abrupt("return",n);case 6:case"end":return r.stop()}}),r)})))};return{getItem:function(t){return u(void 0,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i();case 2:return e.abrupt("return",n.getItem(t));case 3:case"end":return e.stop()}}),e)})))},setItem:function(t,e){return u(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i();case 2:return r.abrupt("return",n.setItem(t,e));case 3:case"end":return r.stop()}}),r)})))},addAsyncStorageManager:function(r){return u(void 0,void 0,void 0,o().mark((function a(){var i;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,"pending"!==e||!t){o.next=4;break}return o.next=4,t.catch((function(){}));case 4:return e="pending",i=r(),t=i,o.next=9,i;case 9:n=o.sent,e="resolved",o.next=18;break;case 13:throw o.prev=13,o.t0=o.catch(0),t=null,e="rejected",o.t0;case 18:case"end":return o.stop()}}),a,null,[[0,13]])})))}}}(),e.default=e.asyncStorageWrapper},878:e=>{e.exports=t}},r={};return function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={exports:{}};return e[n](a,a.exports,t),a.exports}(118)})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@react-native-async-storage/async-storage")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("@react-native-async-storage/async-storage")):this["react-native-global-state-hooks"]=t(this["@react-native-async-storage/async-storage"]);
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={463:t=>{t.exports=e},732:(e,t,n)=>{function r(){var e,t,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",c=n.toStringTag||"@@toStringTag";function i(n,r,a,c){var i=r&&r.prototype instanceof s?r:s,f=Object.create(i.prototype);return o(f,"_invoke",function(n,r,o){var a,c,i,s=0,f=o||[],l=!1,v={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,c=0,i=e,v.n=n,u}};function d(n,r){for(c=n,i=r,t=0;!l&&s&&!o&&t<f.length;t++){var o,a=f[t],d=v.p,p=a[2];n>3?(o=p===r)&&(i=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(c=0,v.v=r,v.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,v.n=p,c=0))}if(o||n>1)return u;throw l=!0,r}return function(o,f,p){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,p),c=f,i=p;(t=c<2?e:i)||!l;){a||(c?c<3?(c>1&&(v.n=-1),d(c,i)):v.n=i:v.v=i);try{if(s=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(l=v.n<0)?i:n.call(r,v))!==u)break}catch(t){a=e,c=1,i=t}finally{s=1}}return{value:t,done:l}}}(n,a,c),!0),f}var u={};function s(){}function f(){}function l(){}t=Object.getPrototypeOf;var v=[][a]?t(t([][a]())):(o(t={},a,function(){return this}),t),d=l.prototype=s.prototype=Object.create(v);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,o(e,c,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=l,o(d,"constructor",l),o(l,"constructor",f),f.displayName="GeneratorFunction",o(l,c,"GeneratorFunction"),o(d),o(d,c,"Generator"),o(d,a,function(){return this}),o(d,"toString",function(){return"[object Generator]"}),(r=function(){return{w:i,m:p}})()}function o(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}o=function(e,t,n,r){if(t)a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var c=function(t,n){o(e,t,function(e){return this._invoke(t,n,e)})};c("next",0),c("throw",1),c("return",2)}},o(e,t,n,r)}var a,c=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=(a=function(e){return a=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},a(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=a(e),r=0;r<n.length;r++)"default"!==n[r]&&c(t,e,n[r]);return i(t,e),t}),s=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function c(e){try{u(r.next(e))}catch(e){a(e)}}function i(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(c,i)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.asyncStorageWrapper=void 0,t.asyncStorageWrapper=function(){var e,t="pending",o=null;s(void 0,void 0,void 0,r().m(function a(){var c,i,s,f,l;return r().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,c=Promise.resolve().then(function(){return u(n(463))}),e=c,r.n=1,c;case 1:i=r.v,s=i.default,f=s.getItem,l=s.setItem,f.bind(s),l.bind(s),o={getItem:f,setItem:l},t="resolved",r.n=3;break;case 2:r.p=2,r.v,t="rejected";case 3:return r.p=3,e=null,r.f(3);case 4:return r.a(2)}},a,null,[[0,2,3,4]])}));var a=function(){throw new Error("[AsyncStorageManager Not Found] \n\n Please install the react-native-async-storage/async-storage to be use as the default async storage manager or\n add an AsyncStorageManager using the asyncStorageWrapper.addAsyncStorageManager method before attempting to get or set items.")},c=function(){return s(void 0,void 0,void 0,r().m(function n(){return r().w(function(n){for(;;)switch(n.n){case 0:if("pending"!==t||!e){n.n=1;break}return n.a(2,e);case 1:if("rejected"!==t){n.n=2;break}return n.a(2,e.catch(function(e){throw e}));case 2:return o||a(),n.a(2,o)}},n)}))};return{getItem:function(e){return s(void 0,void 0,void 0,r().m(function t(){return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c();case 1:return t.a(2,o.getItem(e))}},t)}))},setItem:function(e,t){return s(void 0,void 0,void 0,r().m(function n(){return r().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,c();case 1:return n.a(2,o.setItem(e,t))}},n)}))},addAsyncStorageManager:function(n){return s(void 0,void 0,void 0,r().m(function a(){var c,i;return r().w(function(r){for(;;)switch(r.n){case 0:if(r.p=0,"pending"!==t||!e){r.n=1;break}return r.n=1,e.catch(function(){});case 1:return t="pending",c=n(),e=c,r.n=2,c;case 2:o=r.v,t="resolved",r.n=4;break;case 3:throw r.p=3,i=r.v,e=null,t="rejected",i;case 4:return r.a(2)}},a,null,[[0,3]])}))}}}(),t.default=t.asyncStorageWrapper}},n={};return function e(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return t[r](a,a.exports,e),a.exports}(732)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@react-native-async-storage/async-storage")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("@react-native-async-storage/async-storage")):this["react-native-global-state-hooks"]=e(this["@react-native-async-storage/async-storage"]);
|
package/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t;e=this,t=(e,t,r,o,a,n,s,
|
|
1
|
+
var e,t;e=this,t=(e,t,r,o,a,n,s,c,l,u,i,b,j,S)=>(()=>{"use strict";var g={45:t=>{t.exports=e},78:e=>{e.exports=t},114:e=>{e.exports=r},361:e=>{e.exports=o},417:e=>{e.exports=a},487:e=>{e.exports=n},512:e=>{e.exports=s},623:e=>{e.exports=c},670:e=>{e.exports=l},673:e=>{e.exports=u},778:e=>{e.exports=i},804:e=>{e.exports=b},868:e=>{e.exports=j},923:e=>{e.exports=S}},p={};function y(e){var t=p[e];if(void 0!==t)return t.exports;var r=p[e]={exports:{}};return g[e](r,r.exports,y),r.exports}var f={};return(()=>{var e=f;Object.defineProperty(e,"__esModule",{value:!0}),e.generateStackHash=e.asyncStorageWrapper=e.setAsyncStorageItem=e.getAsyncStorageItem=e.createCustomGlobalState=e.createGlobalState=e.GlobalStoreAbstract=e.GlobalStore=e.createContext=e.useStableState=e.isRecord=e.throwWrongKeyOnActionCollectionConfig=e.uniqueId=e.shallowCompare=void 0;var t=y(673);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return t.shallowCompare}});var r=y(78);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return r.uniqueId}});var o=y(361);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return o.throwWrongKeyOnActionCollectionConfig}});var a=y(487);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return a.isRecord}});var n=y(923);Object.defineProperty(e,"useStableState",{enumerable:!0,get:function(){return n.useStableState}});var s=y(623);Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return s.createContext}});var c=y(778);Object.defineProperty(e,"GlobalStore",{enumerable:!0,get:function(){return c.GlobalStore}});var l=y(804);Object.defineProperty(e,"GlobalStoreAbstract",{enumerable:!0,get:function(){return l.GlobalStoreAbstract}});var u=y(670);Object.defineProperty(e,"createGlobalState",{enumerable:!0,get:function(){return u.createGlobalState}});var i=y(417);Object.defineProperty(e,"createCustomGlobalState",{enumerable:!0,get:function(){return i.createCustomGlobalState}});var b=y(512);Object.defineProperty(e,"getAsyncStorageItem",{enumerable:!0,get:function(){return b.getAsyncStorageItem}});var j=y(868);Object.defineProperty(e,"setAsyncStorageItem",{enumerable:!0,get:function(){return j.setAsyncStorageItem}});var S=y(114);Object.defineProperty(e,"asyncStorageWrapper",{enumerable:!0,get:function(){return S.asyncStorageWrapper}});var g=y(45);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return g.generateStackHash}})})(),f})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./asyncStorageWrapper.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./getAsyncStorageItem.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./setAsyncStorageItem.js"),require("./useStableState.js")):"function"==typeof define&&define.amd?define(["./generateStackHash.js","./uniqueId.js","./asyncStorageWrapper.js","./throwWrongKeyOnActionCollectionConfig.js","./createCustomGlobalState.js","./isRecord.js","./getAsyncStorageItem.js","./createContext.js","./createGlobalState.js","./shallowCompare.js","./GlobalStore.js","./GlobalStoreAbstract.js","./setAsyncStorageItem.js","./useStableState.js"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./generateStackHash.js"),require("./uniqueId.js"),require("./asyncStorageWrapper.js"),require("./throwWrongKeyOnActionCollectionConfig.js"),require("./createCustomGlobalState.js"),require("./isRecord.js"),require("./getAsyncStorageItem.js"),require("./createContext.js"),require("./createGlobalState.js"),require("./shallowCompare.js"),require("./GlobalStore.js"),require("./GlobalStoreAbstract.js"),require("./setAsyncStorageItem.js"),require("./useStableState.js")):e["react-native-global-state-hooks"]=t(e["./generateStackHash.js"],e["./uniqueId.js"],e["./asyncStorageWrapper.js"],e["./throwWrongKeyOnActionCollectionConfig.js"],e["./createCustomGlobalState.js"],e["./isRecord.js"],e["./getAsyncStorageItem.js"],e["./createContext.js"],e["./createGlobalState.js"],e["./shallowCompare.js"],e["./GlobalStore.js"],e["./GlobalStoreAbstract.js"],e["./setAsyncStorageItem.js"],e["./useStableState.js"]);
|
package/createContext.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={407:t=>{t.exports=e}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var s=o[e]={exports:{}};return t[e](s,s.exports,r),s.exports}var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.createContext=void 0;var t=r(407);Object.defineProperty(e,"createContext",{enumerable:!0,get:function(){return t.createContext}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),a})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/createContext")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/createContext"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/createContext")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/createContext"]);
|
|
@@ -19,5 +19,5 @@ export interface CustomCreateGlobalState<TCustomConfig extends BaseMetadata | un
|
|
|
19
19
|
asyncStorage?: AsyncStorageConfig;
|
|
20
20
|
}): StateHook<State, ActionCollectionResult<State, InheritMetadata & Metadata, ActionsConfig>, InheritMetadata & Metadata>;
|
|
21
21
|
}
|
|
22
|
-
export declare const createCustomGlobalState: <TCustomConfig extends unknown, InheritMetadata extends unknown = BaseMetadata>({ onInitialize, onChange, }: CustomGlobalHookBuilderParams<TCustomConfig, InheritMetadata>) => CustomCreateGlobalState<TCustomConfig, InheritMetadata>;
|
|
22
|
+
export declare const createCustomGlobalState: <TCustomConfig extends BaseMetadata | unknown, InheritMetadata extends BaseMetadata | unknown = BaseMetadata>({ onInitialize, onChange, }: CustomGlobalHookBuilderParams<TCustomConfig, InheritMetadata>) => CustomCreateGlobalState<TCustomConfig, InheritMetadata>;
|
|
23
23
|
export default createCustomGlobalState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={670:t=>{t.exports=e},773:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createCustomGlobalState=void 0;var a=o(670);t.createCustomGlobalState=function(e){var t=e.onInitialize,o=e.onChange;return function(e){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l.callbacks,r=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(o[a[l]]=e[a[l]])}return o}(l,["callbacks"]);return(0,a.createGlobalState)(e,Object.assign(Object.assign({},r),{callbacks:Object.assign(Object.assign({},null!=n?n:{}),{onInit:function(e){var o;null==t||t(e,null==r?void 0:r.config),null===(o=null==n?void 0:n.onInit)||void 0===o||o.call(n,e)},onStateChanged:function(e){var t;null==o||o(e,null==r?void 0:r.config),null===(t=null==n?void 0:n.onStateChanged)||void 0===t||t.call(n,e)}})}))}},t.default=t.createCustomGlobalState}},o={};return function e(a){var l=o[a];if(void 0!==l)return l.exports;var n=o[a]={exports:{}};return t[a](n,n.exports,e),n.exports}(773)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./createGlobalState.js")):"function"==typeof define&&define.amd?define(["./createGlobalState.js"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("./createGlobalState.js")):this["react-native-global-state-hooks"]=e(this["./createGlobalState.js"]);
|
package/createGlobalState.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={778:t=>{t.exports=e},840:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createGlobalState=void 0;var r=o(778);t.createGlobalState=function(e,t){return new r.GlobalStore(e,t).getHook()},t.default=t.createGlobalState}},o={};return function e(r){var a=o[r];if(void 0!==a)return a.exports;var l=o[r]={exports:{}};return t[r](l,l.exports,e),l.exports}(840)})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./GlobalStore.js")):"function"==typeof define&&define.amd?define(["./GlobalStore.js"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("./GlobalStore.js")):this["react-native-global-state-hooks"]=e(this["./GlobalStore.js"]);
|
package/generateStackHash.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={225:t=>{t.exports=e}},a={};function r(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,r),s.exports}var o={};return(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.generateStackHash=void 0;var t=r(225);Object.defineProperty(e,"generateStackHash",{enumerable:!0,get:function(){return t.generateStackHash}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),o})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/generateStackHash")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/generateStackHash"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/generateStackHash")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/generateStackHash"]);
|
package/getAsyncStorageItem.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,r;t=this,r=(t,r)=>(()=>{"use strict";var e={
|
|
1
|
+
var t,r;t=this,r=(t,r)=>(()=>{"use strict";var e={114:r=>{r.exports=t},330:t=>{t.exports=r},494:(t,r,e)=>{function o(){var t,r,e="function"==typeof Symbol?Symbol:{},a=e.iterator||"@@iterator",c=e.toStringTag||"@@toStringTag";function i(e,o,a,c){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,o,n){var a,c,i,f=0,s=n||[],p=!1,y={p:0,n:0,v:t,a:l,f:l.bind(t,4),d:function(r,e){return a=r,c=0,i=t,y.n=e,u}};function l(e,o){for(c=e,i=o,r=0;!p&&f&&!n&&r<s.length;r++){var n,a=s[r],l=y.p,v=a[2];e>3?(n=v===o)&&(i=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=t):a[0]<=l&&((n=e<2&&l<a[1])?(c=0,y.v=o,y.n=a[1]):l<v&&(n=e<3||a[0]>o||o>v)&&(a[4]=e,a[5]=o,y.n=v,c=0))}if(n||e>1)return u;throw p=!0,o}return function(n,s,v){if(f>1)throw TypeError("Generator is already running");for(p&&1===s&&l(s,v),c=s,i=v;(r=c<2?t:i)||!p;){a||(c?c<3?(c>1&&(y.n=-1),l(c,i)):y.n=i:y.v=i);try{if(f=2,a){if(c||(n="next"),r=a[n]){if(!(r=r.call(a,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,c<2&&(c=0)}else 1===c&&(r=a.return)&&r.call(a),c<2&&(i=TypeError("The iterator does not provide a '"+n+"' method"),c=1);a=t}else if((r=(p=y.n<0)?i:e.call(o,y))!==u)break}catch(r){a=t,c=1,i=r}finally{f=1}}return{value:r,done:p}}}(e,a,c),!0),s}var u={};function f(){}function s(){}function p(){}r=Object.getPrototypeOf;var y=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),l=p.prototype=f.prototype=Object.create(y);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,n(t,c,"GeneratorFunction")),t.prototype=Object.create(l),t}return s.prototype=p,n(l,"constructor",p),n(p,"constructor",s),s.displayName="GeneratorFunction",n(p,c,"GeneratorFunction"),n(l),n(l,c,"Generator"),n(l,a,function(){return this}),n(l,"toString",function(){return"[object Generator]"}),(o=function(){return{w:i,m:v}})()}function n(t,r,e,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}n=function(t,r,e,o){if(r)a?a(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e;else{var c=function(r,e){n(t,r,function(t){return this._invoke(r,e,t)})};c("next",0),c("throw",1),c("return",2)}},n(t,r,e,o)}Object.defineProperty(r,"__esModule",{value:!0}),r.getAsyncStorageItem=void 0;var a=e(114),c=e(330);r.getAsyncStorageItem=function(t){return r=void 0,e=o().m(function r(){var e,n,i,u,f;return o().w(function(r){for(;;)switch(r.n){case 0:if(e=t.key){r.n=1;break}return r.a(2,null);case 1:return n=function(){return"function"==typeof e?e():e}(),r.n=2,a.asyncStorageWrapper.getItem(n);case 2:if(null!==(i=r.v)){r.n=3;break}return r.a(2,null);case 3:return u=function(){return t.decrypt||t.encrypt?"function"==typeof t.decrypt?t.decrypt(i):atob(i):i}(),f=(0,c.formatFromStore)(u,{jsonParse:!0}),r.a(2,f)}},r)}),new(r||(r=Promise))(function(t,o){function n(t){try{c(e.next(t))}catch(t){o(t)}}function a(t){try{c(e.throw(t))}catch(t){o(t)}}function c(e){var o;e.done?t(e.value):(o=e.value,o instanceof r?o:new r(function(t){t(o)})).then(n,a)}c((e=e.apply(void 0,[])).next())});var r,e},r.default=r.getAsyncStorageItem}},o={};return function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(494)})(),"object"==typeof exports&&"object"==typeof module?module.exports=r(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatFromStore")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js","json-storage-formatter/formatFromStore"],r):"object"==typeof exports?exports["react-native-global-state-hooks"]=r(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatFromStore")):t["react-native-global-state-hooks"]=r(t["./asyncStorageWrapper.js"],t["json-storage-formatter/formatFromStore"]);
|
package/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export { shallowCompare } from "./shallowCompare";
|
|
|
7
7
|
export { uniqueId } from "./uniqueId";
|
|
8
8
|
export { throwWrongKeyOnActionCollectionConfig } from "./throwWrongKeyOnActionCollectionConfig";
|
|
9
9
|
export { isRecord } from "./isRecord";
|
|
10
|
-
export { uniqueSymbol, type UniqueSymbol } from "./uniqueSymbol";
|
|
11
10
|
export { useStableState } from "./useStableState";
|
|
12
11
|
export { type ContextProviderAPI, type ContextProvider, type ContextHook, type CreateContext, createContext, } from "./createContext";
|
|
13
12
|
export type { AsyncStorageConfig } from "./types";
|
package/isRecord.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={93:t=>{t.exports=e}},o={};function r(e){var s=o[e];if(void 0!==s)return s.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}var s={};return(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.isRecord=void 0;var t=r(93);Object.defineProperty(e,"isRecord",{enumerable:!0,get:function(){return t.isRecord}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),s})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/isRecord")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/isRecord"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/isRecord")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/isRecord"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-global-state-hooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "This is a package to easily handling global-state across your react-native-components No-redux... The library now includes @react-native-async-storage/async-storage to persist your state across sessions... if you want to keep using the old version without async-storage or react-native dependencies just use version 5.0.15 or user react-hooks-global-states instead",
|
|
5
5
|
"main": "./bundle.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -119,11 +119,13 @@
|
|
|
119
119
|
"@babel/preset-react": "^7.18.6",
|
|
120
120
|
"@babel/preset-typescript": "^7.21.0",
|
|
121
121
|
"@react-native-async-storage/async-storage": ">=1.17.11",
|
|
122
|
+
"@testing-library/dom": "^10.4.0",
|
|
123
|
+
"@testing-library/react": "^16.3.0",
|
|
122
124
|
"@types/jest": "^29.5.11",
|
|
123
125
|
"@types/lodash": "^4.14.165",
|
|
124
|
-
"@types/react": "^
|
|
125
|
-
"@types/react-dom": "^
|
|
126
|
-
"@types/react-test-renderer": "^
|
|
126
|
+
"@types/react": "^18.0.38",
|
|
127
|
+
"@types/react-dom": "^18.0.11",
|
|
128
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
127
129
|
"@typescript-eslint/eslint-plugin": "^4.9.1",
|
|
128
130
|
"@typescript-eslint/parser": "^4.9.1",
|
|
129
131
|
"babel-loader": "^9.1.2",
|
|
@@ -138,9 +140,10 @@
|
|
|
138
140
|
"jest": "^29.7.0",
|
|
139
141
|
"jest-environment-jsdom": "^29.7.0",
|
|
140
142
|
"json-storage-formatter": "^2.0.9",
|
|
141
|
-
"react": "^
|
|
143
|
+
"react": "^18.2.0",
|
|
144
|
+
"react-dom": "^18.2.0",
|
|
142
145
|
"react-native": ">=0.71.6",
|
|
143
|
-
"react-test-renderer": "^
|
|
146
|
+
"react-test-renderer": "^18.2.0",
|
|
144
147
|
"ts-jest": "^29.1.1",
|
|
145
148
|
"ts-loader": "^9.4.2",
|
|
146
149
|
"tslib": "^2.5.0",
|
|
@@ -169,6 +172,6 @@
|
|
|
169
172
|
}
|
|
170
173
|
},
|
|
171
174
|
"dependencies": {
|
|
172
|
-
"react-hooks-global-states": "^
|
|
175
|
+
"react-hooks-global-states": "^9.0.1"
|
|
173
176
|
}
|
|
174
177
|
}
|
package/setAsyncStorageItem.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t;e=this,t=(e,t)=>(()=>{"use strict";var r={
|
|
1
|
+
var e,t;e=this,t=(e,t)=>(()=>{"use strict";var r={114:t=>{t.exports=e},306:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setAsyncStorageItem=void 0;var o=r(413),a=r(114);t.setAsyncStorageItem=function(e,t){var r=t.key;if(r){var s="function"==typeof r?r():r,n=(0,o.formatToStore)(e,{stringify:!0,excludeTypes:["function"]}),p=t.encrypt?"function"==typeof t.encrypt?t.encrypt(n):btoa(n):n;a.asyncStorageWrapper.setItem(s,p)}},t.default=t.setAsyncStorageItem},413:e=>{e.exports=t}},o={};return function e(t){var a=o[t];if(void 0!==a)return a.exports;var s=o[t]={exports:{}};return r[t](s,s.exports,e),s.exports}(306)})(),"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):"function"==typeof define&&define.amd?define(["./asyncStorageWrapper.js","json-storage-formatter/formatToStore"],t):"object"==typeof exports?exports["react-native-global-state-hooks"]=t(require("./asyncStorageWrapper.js"),require("json-storage-formatter/formatToStore")):e["react-native-global-state-hooks"]=t(e["./asyncStorageWrapper.js"],e["json-storage-formatter/formatToStore"]);
|
package/shallowCompare.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var o={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var o={859:o=>{o.exports=e}},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var s=t[e]={exports:{}};return o[e](s,s.exports,r),s.exports}var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.shallowCompare=void 0;var o=r(859);Object.defineProperty(e,"shallowCompare",{enumerable:!0,get:function(){return o.shallowCompare}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=o,e&&e.__esModule?e:{default:e}).default;var e}})})(),a})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/shallowCompare")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/shallowCompare"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/shallowCompare")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/shallowCompare"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var o={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var o={637:o=>{o.exports=e}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,r),i.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.throwWrongKeyOnActionCollectionConfig=void 0;var o=r(637);Object.defineProperty(e,"throwWrongKeyOnActionCollectionConfig",{enumerable:!0,get:function(){return o.throwWrongKeyOnActionCollectionConfig}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=o,e&&e.__esModule?e:{default:e}).default;var e}})})(),n})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/throwWrongKeyOnActionCollectionConfig")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/throwWrongKeyOnActionCollectionConfig"]);
|
package/uniqueId.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={366:t=>{t.exports=e}},o={};function r(e){var u=o[e];if(void 0!==u)return u.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}var u={};return(()=>{var e=u;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.uniqueId=void 0;var t=r(366);Object.defineProperty(e,"uniqueId",{enumerable:!0,get:function(){return t.uniqueId}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),u})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/uniqueId")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/uniqueId"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/uniqueId")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/uniqueId"]);
|
package/useStableState.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={
|
|
1
|
+
var e;e=e=>(()=>{"use strict";var t={525:t=>{t.exports=e}},a={};function o(e){var r=a[e];if(void 0!==r)return r.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,o),s.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.useStableState=void 0;var t=o(525);Object.defineProperty(e,"useStableState",{enumerable:!0,get:function(){return t.useStableState}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),r})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/useStableState")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/useStableState"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/useStableState")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/useStableState"]);
|
package/webpack.config.js
CHANGED
|
@@ -13,7 +13,6 @@ const individualEntries = {
|
|
|
13
13
|
shallowCompare: "./src/shallowCompare.ts",
|
|
14
14
|
throwWrongKeyOnActionCollectionConfig: "./src/throwWrongKeyOnActionCollectionConfig.ts",
|
|
15
15
|
uniqueId: "./src/uniqueId.ts",
|
|
16
|
-
uniqueSymbol: "./src/uniqueSymbol.ts",
|
|
17
16
|
useStableState: "./src/useStableState.ts",
|
|
18
17
|
generateStackHash: "./src/generateStackHash.ts",
|
|
19
18
|
|
|
@@ -94,7 +93,6 @@ module.exports = {
|
|
|
94
93
|
presets: ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"],
|
|
95
94
|
plugins: [
|
|
96
95
|
"@babel/plugin-transform-modules-commonjs",
|
|
97
|
-
"@babel/plugin-proposal-class-properties",
|
|
98
96
|
"@babel/plugin-proposal-export-namespace-from",
|
|
99
97
|
],
|
|
100
98
|
},
|
package/uniqueSymbol.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { uniqueSymbol, UniqueSymbol, default } from "react-hooks-global-states/uniqueSymbol";
|
package/uniqueSymbol.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e;e=e=>(()=>{"use strict";var t={931:t=>{t.exports=e}},o={};function r(e){var u=o[e];if(void 0!==u)return u.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}var u={};return(()=>{var e=u;Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.uniqueSymbol=void 0;var t=r(931);Object.defineProperty(e,"uniqueSymbol",{enumerable:!0,get:function(){return t.uniqueSymbol}}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})})(),u})(),"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-hooks-global-states/uniqueSymbol")):"function"==typeof define&&define.amd?define(["react-hooks-global-states/uniqueSymbol"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("react-hooks-global-states/uniqueSymbol")):this["react-native-global-state-hooks"]=e(this["react-hooks-global-states/uniqueSymbol"]);
|