Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

onek

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onek - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

dist/types/core/classes/common.d.ts

2

dist/onek.js

@@ -1,2 +0,2 @@

var t=require("react"),n=null;function i(t){var i=n;return n=t,i}var r=100,o=new Set,s=new Set,u=[],f=!1,e=function(t){Promise.resolve().then(t,h)},h=function(t){console.error("Reaction exception:",t)};function c(){try{for(var t=r;u.length||s.size;){for(s.forEach(function(t){t.t()}),s.clear();u.length&&--t;){var n=u;u=[],n.forEach(function(t){try{t.i()}catch(t){h(t)}})}if(!t)throw new Error("Infinite reactions loop")}}finally{f=!1,u=[],o.forEach(function(t){t.o()}),o.clear()}}var a=0;function v(t,n){void 0===n&&(n=null);var r=i(n);a+=1;try{return t()}finally{a-=1,i(r),p()}}function l(t){return function(){var n=i(null);try{return t.apply(this,arguments)}finally{i(n)}}}function p(){a||!f&&(u.length||s.size||o.size)&&(f=!0,e(c))}var w=Object.prototype.hasOwnProperty;function y(t){return t.constructor===Object||null===t.constructor}function d(t,n){if(t===n)return!0;if(Array.isArray(t)&&Array.isArray(n)){var i=t.length;if(i!==n.length)return!1;for(;i--;)if(t[i]!==n[i])return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n&&y(t)&&y(n)){var r=Object.keys(t),o=r.length;if(Object.keys(n).length!==o)return!1;for(;o-- >0;){var s=r[o];if(!w.call(n,s)||t[s]!==n[s])return!1}return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;var u=!0;return t.forEach(function(t){n.has(t)||(u=!1)}),u}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;var f=!0;return t.forEach(function(t,i){n.get(i)!==t&&(f=!1)}),f}return!1}var x=l(d),Revision=function(){};function b(t){var n=!1;return t.forEach(function(t,i){n||(n=i.revision()!==t)}),n}function S(t,n){t.forEach(function(t,i){i.u(n)})}function j(t,n){t.forEach(function(t,i){i.h(n)})}function M(t,n,i){t.forEach(function(t){t.v(n,i)})}var Computed=/*#__PURE__*/function(){function Computed(t,n){this.l=void 0,this.p=new Revision,this.S=new Set,this.j=new Map,this.M=0,this.O=t,this.R=n?"function"==typeof n?l(n):x:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.M&&t.h(this),this.j.set(t,t.revision())},t.h=function(t){this.S.add(t),6===this.M&&this._()},t.u=function(t){this.S.delete(t),this.g()},t.o=function(){this.S.size||6===this.M||this.m()},t.v=function(t,n){var i=this.M;i!==t&&(this.R?3===i&&this.A(4):this.A(t),this.M=t,5===t&&this.q())},t.t=function(t){if(void 0===t&&(t=!1),(6!==this.M||b(this.j))&&(4===this.M&&(this.j.forEach(function(n,i){i.t(t)}),4===this.M&&(this.M=3)),3!==this.M)){var n=this.M,r=0!==n,o=t||r&&6!==n;this.j.clear(),this.M=o?1:2;var s=i(this);try{var u=this.O();if(this.M=o?3:6,this.R&&r){if(this.R(this.l,u))return;this.A(5)}this.l=u,this.p=new Revision}catch(t){throw this.destroy(),t}finally{i(s)}}},t.revision=function(){return this.t(),this.p},t.destroy=function(){this.q(),this.j.clear(),this.M=0,this.l=void 0},t.get=function(t){if(void 0===t&&(t=n),1===this.M||2===this.M)throw new Error("Recursive computed call");var i=!!t;return this.t(i),i&&t.addSubscription(this),this.l},t.g=function(){this.S.size||6===this.M||function(t){o.add(t)}(this)},t.B=function(){j(this.j,this)},t.q=function(){S(this.j,this)},t.A=function(t){M(this.S,t,this)},t.m=function(){this.q(),this.M=6},t._=function(){this.B(),this.M=3},Computed}();function O(t,n){var i=new Computed(t,n),r=i.get.bind(i);return r.instance=i,r.destroy=i.destroy.bind(i),r.revision=i.revision.bind(i),r}O.box=function(t,n){return new Computed(t,n)},O.prop=function(t,n){return new Computed(t,n)};var Observable=/*#__PURE__*/function(){function Observable(t,n){this.p=new Revision,this.S=new Set,this.l=t,this.R=n?"function"==typeof n?l(n):x:void 0}var t=Observable.prototype;return t.h=function(t){this.S.add(t)},t.u=function(t){this.S.delete(t)},t.t=function(){},t.revision=function(){return this.p},t.get=function(t){return void 0===t&&(t=n),t&&t.addSubscription(this),this.l},t.set=function(t,i){if(n&&n instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||i||(t=t(this.l)),this.R&&this.R(this.l,t))return;this.l=t}this.notify()},t.notify=function(){this.p=new Revision,M(this.S,5,this),p()},Observable}();function R(t,n){var i=new Observable(t,n),r=i.get.bind(i),o=i.set.bind(i);return r.instance=i,r.revision=i.revision.bind(i),[r,o]}R.box=function(t,n){return new Observable(t,n)},R.prop=function(t,n){return new Observable(t,n)};var Reaction=/*#__PURE__*/function(){function Reaction(t,n){var i=this;this.O=void 0,this.C=void 0,this.shouldSubscribe=!0,this.j=new Map,this.I=null,this.M=2,this.P=function(){i.I=i.O()},this.O=t,this.C=n}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.h(this),this.j.set(t,t.revision())},t.v=function(t,n){3===t?function(t){s.add(t)}(n):2===this.M&&(this.M=4,u.push(this))},t.i=function(){6!==this.M&&(this.C?this.C():this.run())},t.subscribe=function(){j(this.j,this)},t.unsubscribe=function(){S(this.j,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.j.clear(),this.I&&this.I(),this.I=null,this.M=2},t.missedRun=function(){return b(this.j)},t.destroy=function(){this.unsubscribeAndCleanup(),this.M=6},t.run=function(){this.unsubscribeAndCleanup(),v(this.P,this)},Reaction}(),_="undefined"!=typeof window,g=[],m=function(){},E=function(t){return t()};E.addSubscription=m,exports.Computed=Computed,exports.Observable=Observable,exports.Reaction=Reaction,exports.Revision=Revision,exports.action=function(t){return function(){var n=i(null);a+=1;try{return t.apply(this,arguments)}finally{a-=1,i(n),p()}}},exports.computed=O,exports.configure=function(t){void 0!==t.reactionScheduler&&(e=t.reactionScheduler),void 0!==t.reactionExceptionHandler&&(h=t.reactionExceptionHandler)},exports.observable=R,exports.reaction=function(t,n){var i=new Reaction(t,n),r=i.destroy.bind(i);return r.run=i.run.bind(i),i.run(),r},exports.setSubscriber=i,exports.shallowEquals=d,exports.tx=function(t){a+=1;try{t()}finally{a-=1,p()}},exports.untracked=function(t){var n=i(null);try{return t()}finally{i(n)}},exports.useObserver=function(){if(!_)return E;var n=t.useMemo(function(){var t=new Revision,n=new Set,r=new Reaction(m,function(){t=new Revision,n.forEach(function(t){t()})});r.shouldSubscribe=!1;var o=function(t){var n=i(r);try{return t()}finally{i(n)}};return o.addSubscription=r.addSubscription.bind(r),{B:function(t){return n.add(t),r.shouldSubscribe=!0,r.subscribe(),r.missedRun()&&t(),function(){n.delete(t),n.size||(r.unsubscribe(),r.shouldSubscribe=!1)}},k:function(){return t},D:function(){r.unsubscribeAndCleanup()},F:o}},g);return t.useSyncExternalStore(n.B,n.k),n.D(),n.F},exports.utx=v,exports.withUntracked=l;
var t=100,i=new Set,n=new Set,r=[],s=!1,o=function(t){Promise.resolve().then(t).catch(h)},h=function(t){console.error("Reaction exception:",t)};function u(){try{for(var o=t;r.length||n.size;){for(n.forEach(function(t){t.t(!1)}),n.clear();r.length&&--o;){var u=r;r=[],u.forEach(function(t){try{t.runManager()}catch(t){h(t)}})}if(!o)throw new Error("Infinite reactions loop")}}finally{s=!1,r=[],i.forEach(function(t){t.i()}),i.clear()}}var f=null;function e(t){var i=f;return f=t,i}var c=0;function a(t,i){void 0===i&&(i=null);var n=e(i);c+=1;try{return t()}finally{c-=1,e(n),l()}}function v(t){return function(){var i=e(null);try{return t.apply(this,arguments)}finally{e(i)}}}function l(){c||!s&&(r.length||n.size||i.size)&&(s=!0,o(u))}var p=Object.prototype.hasOwnProperty;function w(t){return t.constructor===Object||null===t.constructor}function y(t,i){if(t===i)return!0;if(Array.isArray(t)&&Array.isArray(i)){var n=t.length;if(n!==i.length)return!1;for(;n--;)if(t[n]!==i[n])return!1;return!0}if(t&&i&&"object"==typeof t&&"object"==typeof i&&w(t)&&w(i)){var r=Object.keys(t),s=r.length;if(Object.keys(i).length!==s)return!1;for(;s-- >0;){var o=r[s];if(!p.call(i,o)||t[o]!==i[o])return!1}return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;var h=!0;return t.forEach(function(t){i.has(t)||(h=!1)}),h}if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;var u=!0;return t.forEach(function(t,n){i.get(n)!==t&&(u=!1)}),u}return!1}var x=v(y),Revision=function(){};function d(t){var i=!1;return t.forEach(function(t,n){i||(i=n.revision()!==t)}),i}function b(t,i){t.forEach(function(t,n){n.o(i)})}function j(t,i){t.forEach(function(t,n){n.h(i)})}function S(t,i){t.forEach(function(t){t.u(i)})}var Computed=/*#__PURE__*/function(){function Computed(t,i){this.v=void 0,this.l=new Revision,this.p=new Set,this.j=new Map,this.S=0,this.M=t,this.O=i?"function"==typeof i?v(i):x:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.S&&t.h(this),this.j.set(t,t.revision())},t.h=function(t){this.p.add(t),6===this.S&&this.m()},t.o=function(t){this.p.delete(t),this.p.size||6===this.S||function(t){i.add(t)}(this)},t.i=function(){this.p.size||6===this.S||this.g()},t.u=function(t){var i=this.S;i!==t&&5!==i&&(this.O?(function(t){n.add(t)}(this),3===i&&this.A(4)):this.A(t),this.S=t,5===t&&this.R())},t.t=function(t){if((6!==this.S||d(this.j))&&(4===this.S&&(this.j.forEach(function(i,n){n.t(t)}),4===this.S&&(this.S=3)),3!==this.S)){var i=this.S,n=0!==i,r=t||n&&6!==i;this.j.clear(),this.S=r?1:2;var s=e(this);try{var o=this.M();if(this.S=r?3:6,this.O&&n){if(this.O(this.v,o))return;this.A(5)}this.v=o,this.l=new Revision}catch(t){throw this.destroy(),t}finally{e(s)}}},t.revision=function(){return this.t(!1),this.l},t.destroy=function(){this.R(),this.j.clear(),this.S=0,this.v=void 0},t.get=function(t){if(void 0===t&&(t=f),1===this.S||2===this.S)throw new Error("Recursive computed call");return this.t(null!==f),t&&t.addSubscription(this),this.v},t.C=function(){j(this.j,this)},t.R=function(){b(this.j,this)},t.A=function(t){S(this.p,t)},t.g=function(){this.R(),this.S=6},t.m=function(){this.C(),this.S=3},Computed}();function M(t,i){var n=new Computed(t,i),r=n.get.bind(n);return r.instance=n,r.destroy=n.destroy.bind(n),r.revision=n.revision.bind(n),r}M.box=function(t,i){return new Computed(t,i)},M.prop=function(t,i){return new Computed(t,i)};var Observable=/*#__PURE__*/function(){function Observable(t,i){this.l=new Revision,this.p=new Set,this.v=t,this.O=i?"function"==typeof i?v(i):x:void 0}var t=Observable.prototype;return t.h=function(t){this.p.add(t)},t.o=function(t){this.p.delete(t)},t.t=function(){},t.revision=function(){return this.l},t.get=function(t){return void 0===t&&(t=f),t&&t.addSubscription(this),this.v},t.set=function(t,i){if(f&&f instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||i||(t=t(this.v)),this.O&&this.O(this.v,t))return;this.v=t}this.notify()},t.notify=function(){this.l=new Revision,S(this.p,5),l()},Observable}();function O(t,i){var n=new Observable(t,i),r=n.get.bind(n),s=n.set.bind(n);return r.instance=n,r.revision=n.revision.bind(n),[r,s]}O.box=function(t,i){return new Observable(t,i)},O.prop=function(t,i){return new Observable(t,i)};var Reaction=/*#__PURE__*/function(){function Reaction(t,i){var n=this;this.M=void 0,this.I=void 0,this.shouldSubscribe=!0,this.j=new Map,this.P=null,this.S=3,this.k=function(){n.P=n.M()},this.M=t,this.I=i}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.h(this),this.j.set(t,t.revision())},t.u=function(t){4!==t&&3===this.S&&(this.S=5,r.push(this))},t.runManager=function(){7!==this.S&&(this.I?this.I():this.run())},t.subscribe=function(){j(this.j,this)},t.unsubscribe=function(){b(this.j,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.j.clear(),this.P&&this.P(),this.P=null,this.S=3},t.missedRun=function(){return d(this.j)},t.destroy=function(){this.unsubscribeAndCleanup(),this.S=7},t.run=function(){this.unsubscribeAndCleanup(),a(this.k,this)},t.updateRevisions=function(){var t=this;this.j.forEach(function(i,n){t.j.set(n,n.revision())})},Reaction}();exports.Computed=Computed,exports.Observable=Observable,exports.Reaction=Reaction,exports.Revision=Revision,exports.action=function(t){return function(){var i=e(null);c+=1;try{return t.apply(this,arguments)}finally{c-=1,e(i),l()}}},exports.computed=M,exports.configure=function(t){t.reactionScheduler&&(o=t.reactionScheduler),t.reactionExceptionHandler&&(h=t.reactionExceptionHandler)},exports.observable=O,exports.reaction=function(t,i){var n=new Reaction(t,i),r=n.destroy.bind(n);return r.run=n.run.bind(n),n.run(),r},exports.setSubscriber=e,exports.shallowEquals=y,exports.tx=function(t){c+=1;try{t()}finally{c-=1,l()}},exports.untracked=function(t){var i=e(null);try{return t()}finally{e(i)}},exports.utx=a,exports.withUntracked=v;
//# sourceMappingURL=onek.js.map

@@ -1,2 +0,2 @@

import{useMemo as t,useSyncExternalStore as n}from"react";var i=null;function r(t){var n=i;return i=t,n}var u=100,o=new Set,f=new Set,s=[],h=!1,e=function(t){Promise.resolve().then(t,c)},c=function(t){console.error("Reaction exception:",t)};function a(t){void 0!==t.reactionScheduler&&(e=t.reactionScheduler),void 0!==t.reactionExceptionHandler&&(c=t.reactionExceptionHandler)}function v(){try{for(var t=u;s.length||f.size;){for(f.forEach(function(t){t.t()}),f.clear();s.length&&--t;){var n=s;s=[],n.forEach(function(t){try{t.i()}catch(t){c(t)}})}if(!t)throw new Error("Infinite reactions loop")}}finally{h=!1,s=[],o.forEach(function(t){t.u()}),o.clear()}}var l=0;function w(t){l+=1;try{t()}finally{l-=1,S()}}function y(t,n){void 0===n&&(n=null);var i=r(n);l+=1;try{return t()}finally{l-=1,r(i),S()}}function d(t){var n=r(null);try{return t()}finally{r(n)}}function p(t){return function(){var n=r(null);try{return t.apply(this,arguments)}finally{r(n)}}}function b(t){return function(){var n=r(null);l+=1;try{return t.apply(this,arguments)}finally{l-=1,r(n),S()}}}function S(){l||!h&&(s.length||f.size||o.size)&&(h=!0,e(v))}var j=Object.prototype.hasOwnProperty;function m(t){return t.constructor===Object||null===t.constructor}function M(t,n){if(t===n)return!0;if(Array.isArray(t)&&Array.isArray(n)){var i=t.length;if(i!==n.length)return!1;for(;i--;)if(t[i]!==n[i])return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n&&m(t)&&m(n)){var r=Object.keys(t),u=r.length;if(Object.keys(n).length!==u)return!1;for(;u-- >0;){var o=r[u];if(!j.call(n,o)||t[o]!==n[o])return!1}return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;var f=!0;return t.forEach(function(t){n.has(t)||(f=!1)}),f}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;var s=!0;return t.forEach(function(t,i){n.get(i)!==t&&(s=!1)}),s}return!1}var O=p(M),Revision=function(){};function R(t){var n=!1;return t.forEach(function(t,i){n||(n=i.revision()!==t)}),n}function _(t,n){t.forEach(function(t,i){i.o(n)})}function g(t,n){t.forEach(function(t,i){i.h(n)})}function E(t,n,i){t.forEach(function(t){t.v(n,i)})}var Computed=/*#__PURE__*/function(){function Computed(t,n){this.l=void 0,this.p=new Revision,this.S=new Set,this.j=new Map,this.m=0,this.M=t,this.O=n?"function"==typeof n?p(n):O:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.m&&t.h(this),this.j.set(t,t.revision())},t.h=function(t){this.S.add(t),6===this.m&&this.R()},t.o=function(t){this.S.delete(t),this._()},t.u=function(){this.S.size||6===this.m||this.g()},t.v=function(t,n){var i=this.m;i!==t&&(this.O?3===i&&this.A(4):this.A(t),this.m=t,5===t&&this.B())},t.t=function(t){if(void 0===t&&(t=!1),(6!==this.m||R(this.j))&&(4===this.m&&(this.j.forEach(function(n,i){i.t(t)}),4===this.m&&(this.m=3)),3!==this.m)){var n=this.m,i=0!==n,u=t||i&&6!==n;this.j.clear(),this.m=u?1:2;var o=r(this);try{var f=this.M();if(this.m=u?3:6,this.O&&i){if(this.O(this.l,f))return;this.A(5)}this.l=f,this.p=new Revision}catch(t){throw this.destroy(),t}finally{r(o)}}},t.revision=function(){return this.t(),this.p},t.destroy=function(){this.B(),this.j.clear(),this.m=0,this.l=void 0},t.get=function(t){if(void 0===t&&(t=i),1===this.m||2===this.m)throw new Error("Recursive computed call");var n=!!t;return this.t(n),n&&t.addSubscription(this),this.l},t._=function(){this.S.size||6===this.m||function(t){o.add(t)}(this)},t.C=function(){g(this.j,this)},t.B=function(){_(this.j,this)},t.A=function(t){E(this.S,t,this)},t.g=function(){this.B(),this.m=6},t.R=function(){this.C(),this.m=3},Computed}();function x(t,n){var i=new Computed(t,n),r=i.get.bind(i);return r.instance=i,r.destroy=i.destroy.bind(i),r.revision=i.revision.bind(i),r}x.box=function(t,n){return new Computed(t,n)},x.prop=function(t,n){return new Computed(t,n)};var Observable=/*#__PURE__*/function(){function Observable(t,n){this.p=new Revision,this.S=new Set,this.l=t,this.O=n?"function"==typeof n?p(n):O:void 0}var t=Observable.prototype;return t.h=function(t){this.S.add(t)},t.o=function(t){this.S.delete(t)},t.t=function(){},t.revision=function(){return this.p},t.get=function(t){return void 0===t&&(t=i),t&&t.addSubscription(this),this.l},t.set=function(t,n){if(i&&i instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||n||(t=t(this.l)),this.O&&this.O(this.l,t))return;this.l=t}this.notify()},t.notify=function(){this.p=new Revision,E(this.S,5,this),S()},Observable}();function A(t,n){var i=new Observable(t,n),r=i.get.bind(i),u=i.set.bind(i);return r.instance=i,r.revision=i.revision.bind(i),[r,u]}A.box=function(t,n){return new Observable(t,n)},A.prop=function(t,n){return new Observable(t,n)};var Reaction=/*#__PURE__*/function(){function Reaction(t,n){var i=this;this.M=void 0,this.I=void 0,this.shouldSubscribe=!0,this.j=new Map,this.P=null,this.m=3,this.k=function(){i.P=i.M()},this.M=t,this.I=n}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.h(this),this.j.set(t,t.revision())},t.v=function(t,n){4===t?function(t){f.add(t)}(n):3===this.m&&(this.m=5,function(t){s.push(t)}(this))},t.i=function(){7!==this.m&&(this.I?this.I():this.run())},t.subscribe=function(){g(this.j,this)},t.unsubscribe=function(){_(this.j,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.j.clear(),this.P&&this.P(),this.P=null,this.m=3},t.missedRun=function(){return R(this.j)},t.destroy=function(){this.unsubscribeAndCleanup(),this.m=7},t.run=function(){this.unsubscribeAndCleanup(),y(this.k,this)},Reaction}();function B(t,n){var i=new Reaction(t,n),r=i.destroy.bind(i);return r.run=i.run.bind(i),i.run(),r}var C="undefined"!=typeof window,I=[],P=function(){},k=function(t){return t()};function q(){if(!C)return k;var i=t(function(){var t=new Revision,n=new Set,i=new Reaction(P,function(){t=new Revision,n.forEach(function(t){t()})});i.shouldSubscribe=!1;var u=function(t){var n=r(i);try{return t()}finally{r(n)}};return u.addSubscription=i.addSubscription.bind(i),{C:function(t){return n.add(t),i.shouldSubscribe=!0,i.subscribe(),i.missedRun()&&t(),function(){n.delete(t),n.size||(i.unsubscribe(),i.shouldSubscribe=!1)}},q:function(){return t},D:function(){i.unsubscribeAndCleanup()},F:u}},I);return n(i.C,i.q),i.D(),i.F}k.addSubscription=P;export{Computed,Observable,Reaction,Revision,b as action,x as computed,a as configure,A as observable,B as reaction,r as setSubscriber,M as shallowEquals,w as tx,d as untracked,q as useObserver,y as utx,p as withUntracked};
var t=100,n=new Set,i=new Set,r=[],s=!1,u=function(t){Promise.resolve().then(t).catch(h)},h=function(t){console.error("Reaction exception:",t)};function o(){try{for(var u=t;r.length||i.size;){for(i.forEach(function(t){t.t(!1)}),i.clear();r.length&&--u;){var o=r;r=[],o.forEach(function(t){try{t.runManager()}catch(t){h(t)}})}if(!u)throw new Error("Infinite reactions loop")}}finally{s=!1,r=[],n.forEach(function(t){t.i()}),n.clear()}}function f(t){t.reactionScheduler&&(u=t.reactionScheduler),t.reactionExceptionHandler&&(h=t.reactionExceptionHandler)}var c=null;function e(t){var n=c;return c=t,n}var a=0;function v(t){a+=1;try{t()}finally{a-=1,d()}}function l(t,n){void 0===n&&(n=null);var i=e(n);a+=1;try{return t()}finally{a-=1,e(i),d()}}function w(t){var n=e(null);try{return t()}finally{e(n)}}function y(t){return function(){var n=e(null);try{return t.apply(this,arguments)}finally{e(n)}}}function p(t){return function(){var n=e(null);a+=1;try{return t.apply(this,arguments)}finally{a-=1,e(n),d()}}}function d(){a||!s&&(r.length||i.size||n.size)&&(s=!0,u(o))}var b=Object.prototype.hasOwnProperty;function j(t){return t.constructor===Object||null===t.constructor}function S(t,n){if(t===n)return!0;if(Array.isArray(t)&&Array.isArray(n)){var i=t.length;if(i!==n.length)return!1;for(;i--;)if(t[i]!==n[i])return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n&&j(t)&&j(n)){var r=Object.keys(t),s=r.length;if(Object.keys(n).length!==s)return!1;for(;s-- >0;){var u=r[s];if(!b.call(n,u)||t[u]!==n[u])return!1}return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;var h=!0;return t.forEach(function(t){n.has(t)||(h=!1)}),h}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;var o=!0;return t.forEach(function(t,i){n.get(i)!==t&&(o=!1)}),o}return!1}var M=y(S),Revision=function(){};function O(t){var n=!1;return t.forEach(function(t,i){n||(n=i.revision()!==t)}),n}function m(t,n){t.forEach(function(t,i){i.u(n)})}function E(t,n){t.forEach(function(t,i){i.h(n)})}function g(t,n){t.forEach(function(t){t.o(n)})}var Computed=/*#__PURE__*/function(){function Computed(t,n){this.v=void 0,this.l=new Revision,this.p=new Set,this.j=new Map,this.S=0,this.M=t,this.O=n?"function"==typeof n?y(n):M:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.S&&t.h(this),this.j.set(t,t.revision())},t.h=function(t){this.p.add(t),6===this.S&&this.m()},t.u=function(t){this.p.delete(t),this.p.size||6===this.S||function(t){n.add(t)}(this)},t.i=function(){this.p.size||6===this.S||this.g()},t.o=function(t){var n=this.S;n!==t&&5!==n&&(this.O?(function(t){i.add(t)}(this),3===n&&this.A(4)):this.A(t),this.S=t,5===t&&this.R())},t.t=function(t){if((6!==this.S||O(this.j))&&(4===this.S&&(this.j.forEach(function(n,i){i.t(t)}),4===this.S&&(this.S=3)),3!==this.S)){var n=this.S,i=0!==n,r=t||i&&6!==n;this.j.clear(),this.S=r?1:2;var s=e(this);try{var u=this.M();if(this.S=r?3:6,this.O&&i){if(this.O(this.v,u))return;this.A(5)}this.v=u,this.l=new Revision}catch(t){throw this.destroy(),t}finally{e(s)}}},t.revision=function(){return this.t(!1),this.l},t.destroy=function(){this.R(),this.j.clear(),this.S=0,this.v=void 0},t.get=function(t){if(void 0===t&&(t=c),1===this.S||2===this.S)throw new Error("Recursive computed call");return this.t(null!==c),t&&t.addSubscription(this),this.v},t.C=function(){E(this.j,this)},t.R=function(){m(this.j,this)},t.A=function(t){g(this.p,t)},t.g=function(){this.R(),this.S=6},t.m=function(){this.C(),this.S=3},Computed}();function x(t,n){var i=new Computed(t,n),r=i.get.bind(i);return r.instance=i,r.destroy=i.destroy.bind(i),r.revision=i.revision.bind(i),r}x.box=function(t,n){return new Computed(t,n)},x.prop=function(t,n){return new Computed(t,n)};var Observable=/*#__PURE__*/function(){function Observable(t,n){this.l=new Revision,this.p=new Set,this.v=t,this.O=n?"function"==typeof n?y(n):M:void 0}var t=Observable.prototype;return t.h=function(t){this.p.add(t)},t.u=function(t){this.p.delete(t)},t.t=function(){},t.revision=function(){return this.l},t.get=function(t){return void 0===t&&(t=c),t&&t.addSubscription(this),this.v},t.set=function(t,n){if(c&&c instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||n||(t=t(this.v)),this.O&&this.O(this.v,t))return;this.v=t}this.notify()},t.notify=function(){this.l=new Revision,g(this.p,5),d()},Observable}();function A(t,n){var i=new Observable(t,n),r=i.get.bind(i),s=i.set.bind(i);return r.instance=i,r.revision=i.revision.bind(i),[r,s]}A.box=function(t,n){return new Observable(t,n)},A.prop=function(t,n){return new Observable(t,n)};var Reaction=/*#__PURE__*/function(){function Reaction(t,n){var i=this;this.M=void 0,this.I=void 0,this.shouldSubscribe=!0,this.j=new Map,this.P=null,this.S=3,this.k=function(){i.P=i.M()},this.M=t,this.I=n}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.h(this),this.j.set(t,t.revision())},t.o=function(t){4!==t&&3===this.S&&(this.S=5,function(t){r.push(t)}(this))},t.runManager=function(){7!==this.S&&(this.I?this.I():this.run())},t.subscribe=function(){E(this.j,this)},t.unsubscribe=function(){m(this.j,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.j.clear(),this.P&&this.P(),this.P=null,this.S=3},t.missedRun=function(){return O(this.j)},t.destroy=function(){this.unsubscribeAndCleanup(),this.S=7},t.run=function(){this.unsubscribeAndCleanup(),l(this.k,this)},t.updateRevisions=function(){var t=this;this.j.forEach(function(n,i){t.j.set(i,i.revision())})},Reaction}();function R(t,n){var i=new Reaction(t,n),r=i.destroy.bind(i);return r.run=i.run.bind(i),i.run(),r}export{Computed,Observable,Reaction,Revision,p as action,x as computed,f as configure,A as observable,R as reaction,e as setSubscriber,S as shallowEquals,v as tx,w as untracked,l as utx,y as withUntracked};
//# sourceMappingURL=onek.module.js.map

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t||self).onek={},t.react)}(this,function(t,n){var i=null;function r(t){var n=i;return i=t,n}var o=100,u=new Set,f=new Set,s=[],e=!1,h=function(t){Promise.resolve().then(t,c)},c=function(t){console.error("Reaction exception:",t)};function a(){try{for(var t=o;s.length||f.size;){for(f.forEach(function(t){t.t()}),f.clear();s.length&&--t;){var n=s;s=[],n.forEach(function(t){try{t.i()}catch(t){c(t)}})}if(!t)throw new Error("Infinite reactions loop")}}finally{e=!1,s=[],u.forEach(function(t){t.o()}),u.clear()}}var v=0;function l(t,n){void 0===n&&(n=null);var i=r(n);v+=1;try{return t()}finally{v-=1,r(i),y()}}function w(t){return function(){var n=r(null);try{return t.apply(this,arguments)}finally{r(n)}}}function y(){v||!e&&(s.length||f.size||u.size)&&(e=!0,h(a))}var d=Object.prototype.hasOwnProperty;function p(t){return t.constructor===Object||null===t.constructor}function b(t,n){if(t===n)return!0;if(Array.isArray(t)&&Array.isArray(n)){var i=t.length;if(i!==n.length)return!1;for(;i--;)if(t[i]!==n[i])return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n&&p(t)&&p(n)){var r=Object.keys(t),o=r.length;if(Object.keys(n).length!==o)return!1;for(;o-- >0;){var u=r[o];if(!d.call(n,u)||t[u]!==n[u])return!1}return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;var f=!0;return t.forEach(function(t){n.has(t)||(f=!1)}),f}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;var s=!0;return t.forEach(function(t,i){n.get(i)!==t&&(s=!1)}),s}return!1}var j=w(b),Revision=function(){};function S(t){var n=!1;return t.forEach(function(t,i){n||(n=i.revision()!==t)}),n}function g(t,n){t.forEach(function(t,i){i.u(n)})}function m(t,n){t.forEach(function(t,i){i.h(n)})}function x(t,n,i){t.forEach(function(t){t.v(n,i)})}var Computed=/*#__PURE__*/function(){function Computed(t,n){this.l=void 0,this.p=new Revision,this.j=new Set,this.S=new Map,this.g=0,this.m=t,this.M=n?"function"==typeof n?w(n):j:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.g&&t.h(this),this.S.set(t,t.revision())},t.h=function(t){this.j.add(t),6===this.g&&this.O()},t.u=function(t){this.j.delete(t),this.R()},t.o=function(){this.j.size||6===this.g||this._()},t.v=function(t,n){var i=this.g;i!==t&&(this.M?3===i&&this.A(4):this.A(t),this.g=t,5===t&&this.T())},t.t=function(t){if(void 0===t&&(t=!1),(6!==this.g||S(this.S))&&(4===this.g&&(this.S.forEach(function(n,i){i.t(t)}),4===this.g&&(this.g=3)),3!==this.g)){var n=this.g,i=0!==n,o=t||i&&6!==n;this.S.clear(),this.g=o?1:2;var u=r(this);try{var f=this.m();if(this.g=o?3:6,this.M&&i){if(this.M(this.l,f))return;this.A(5)}this.l=f,this.p=new Revision}catch(t){throw this.destroy(),t}finally{r(u)}}},t.revision=function(){return this.t(),this.p},t.destroy=function(){this.T(),this.S.clear(),this.g=0,this.l=void 0},t.get=function(t){if(void 0===t&&(t=i),1===this.g||2===this.g)throw new Error("Recursive computed call");var n=!!t;return this.t(n),n&&t.addSubscription(this),this.l},t.R=function(){this.j.size||6===this.g||function(t){u.add(t)}(this)},t.q=function(){m(this.S,this)},t.T=function(){g(this.S,this)},t.A=function(t){x(this.j,t,this)},t._=function(){this.T(),this.g=6},t.O=function(){this.q(),this.g=3},Computed}();function M(t,n){var i=new Computed(t,n),r=i.get.bind(i);return r.instance=i,r.destroy=i.destroy.bind(i),r.revision=i.revision.bind(i),r}M.box=function(t,n){return new Computed(t,n)},M.prop=function(t,n){return new Computed(t,n)};var Observable=/*#__PURE__*/function(){function Observable(t,n){this.p=new Revision,this.j=new Set,this.l=t,this.M=n?"function"==typeof n?w(n):j:void 0}var t=Observable.prototype;return t.h=function(t){this.j.add(t)},t.u=function(t){this.j.delete(t)},t.t=function(){},t.revision=function(){return this.p},t.get=function(t){return void 0===t&&(t=i),t&&t.addSubscription(this),this.l},t.set=function(t,n){if(i&&i instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||n||(t=t(this.l)),this.M&&this.M(this.l,t))return;this.l=t}this.notify()},t.notify=function(){this.p=new Revision,x(this.j,5,this),y()},Observable}();function O(t,n){var i=new Observable(t,n),r=i.get.bind(i),o=i.set.bind(i);return r.instance=i,r.revision=i.revision.bind(i),[r,o]}O.box=function(t,n){return new Observable(t,n)},O.prop=function(t,n){return new Observable(t,n)};var Reaction=/*#__PURE__*/function(){function Reaction(t,n){var i=this;this.m=void 0,this.B=void 0,this.shouldSubscribe=!0,this.S=new Map,this.C=null,this.g=3,this.I=function(){i.C=i.m()},this.m=t,this.B=n}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.h(this),this.S.set(t,t.revision())},t.v=function(t,n){4===t?function(t){f.add(t)}(n):3===this.g&&(this.g=5,s.push(this))},t.i=function(){7!==this.g&&(this.B?this.B():this.run())},t.subscribe=function(){m(this.S,this)},t.unsubscribe=function(){g(this.S,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.S.clear(),this.C&&this.C(),this.C=null,this.g=3},t.missedRun=function(){return S(this.S)},t.destroy=function(){this.unsubscribeAndCleanup(),this.g=7},t.run=function(){this.unsubscribeAndCleanup(),l(this.I,this)},Reaction}(),R="undefined"!=typeof window,_=[],E=function(){},A=function(t){return t()};A.addSubscription=E,t.Computed=Computed,t.Observable=Observable,t.Reaction=Reaction,t.Revision=Revision,t.action=function(t){return function(){var n=r(null);v+=1;try{return t.apply(this,arguments)}finally{v-=1,r(n),y()}}},t.computed=M,t.configure=function(t){void 0!==t.reactionScheduler&&(h=t.reactionScheduler),void 0!==t.reactionExceptionHandler&&(c=t.reactionExceptionHandler)},t.observable=O,t.reaction=function(t,n){var i=new Reaction(t,n),r=i.destroy.bind(i);return r.run=i.run.bind(i),i.run(),r},t.setSubscriber=r,t.shallowEquals=b,t.tx=function(t){v+=1;try{t()}finally{v-=1,y()}},t.untracked=function(t){var n=r(null);try{return t()}finally{r(n)}},t.useObserver=function(){if(!R)return A;var t=n.useMemo(function(){var t=new Revision,n=new Set,i=new Reaction(E,function(){t=new Revision,n.forEach(function(t){t()})});i.shouldSubscribe=!1;var o=function(t){var n=r(i);try{return t()}finally{r(n)}};return o.addSubscription=i.addSubscription.bind(i),{q:function(t){return n.add(t),i.shouldSubscribe=!0,i.subscribe(),i.missedRun()&&t(),function(){n.delete(t),n.size||(i.unsubscribe(),i.shouldSubscribe=!1)}},P:function(){return t},k:function(){i.unsubscribeAndCleanup()},D:o}},_);return n.useSyncExternalStore(t.q,t.P),t.k(),t.D},t.utx=l,t.withUntracked=w});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t||self).onek={})}(this,function(t){var n=100,i=new Set,r=new Set,s=[],o=!1,u=function(t){Promise.resolve().then(t).catch(f)},f=function(t){console.error("Reaction exception:",t)};function h(){try{for(var t=n;s.length||r.size;){for(r.forEach(function(t){t.t(!1)}),r.clear();s.length&&--t;){var u=s;s=[],u.forEach(function(t){try{t.runManager()}catch(t){f(t)}})}if(!t)throw new Error("Infinite reactions loop")}}finally{o=!1,s=[],i.forEach(function(t){t.i()}),i.clear()}}var e=null;function c(t){var n=e;return e=t,n}var a=0;function v(t,n){void 0===n&&(n=null);var i=c(n);a+=1;try{return t()}finally{a-=1,c(i),y()}}function l(t){return function(){var n=c(null);try{return t.apply(this,arguments)}finally{c(n)}}}function y(){a||!o&&(s.length||r.size||i.size)&&(o=!0,u(h))}var w=Object.prototype.hasOwnProperty;function d(t){return t.constructor===Object||null===t.constructor}function p(t,n){if(t===n)return!0;if(Array.isArray(t)&&Array.isArray(n)){var i=t.length;if(i!==n.length)return!1;for(;i--;)if(t[i]!==n[i])return!1;return!0}if(t&&n&&"object"==typeof t&&"object"==typeof n&&d(t)&&d(n)){var r=Object.keys(t),s=r.length;if(Object.keys(n).length!==s)return!1;for(;s-- >0;){var o=r[s];if(!w.call(n,o)||t[o]!==n[o])return!1}return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;var u=!0;return t.forEach(function(t){n.has(t)||(u=!1)}),u}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;var f=!0;return t.forEach(function(t,i){n.get(i)!==t&&(f=!1)}),f}return!1}var b=l(p),Revision=function(){};function j(t){var n=!1;return t.forEach(function(t,i){n||(n=i.revision()!==t)}),n}function S(t,n){t.forEach(function(t,i){i.o(n)})}function g(t,n){t.forEach(function(t,i){i.u(n)})}function m(t,n){t.forEach(function(t){t.h(n)})}var Computed=/*#__PURE__*/function(){function Computed(t,n){this.v=void 0,this.l=new Revision,this.p=new Set,this.j=new Map,this.S=0,this.g=t,this.m=n?"function"==typeof n?l(n):b:void 0}var t=Computed.prototype;return t.addSubscription=function(t){2!==this.S&&t.u(this),this.j.set(t,t.revision())},t.u=function(t){this.p.add(t),6===this.S&&this.M()},t.o=function(t){this.p.delete(t),this.p.size||6===this.S||function(t){i.add(t)}(this)},t.i=function(){this.p.size||6===this.S||this.O()},t.h=function(t){var n=this.S;n!==t&&5!==n&&(this.m?(function(t){r.add(t)}(this),3===n&&this.A(4)):this.A(t),this.S=t,5===t&&this.R())},t.t=function(t){if((6!==this.S||j(this.j))&&(4===this.S&&(this.j.forEach(function(n,i){i.t(t)}),4===this.S&&(this.S=3)),3!==this.S)){var n=this.S,i=0!==n,r=t||i&&6!==n;this.j.clear(),this.S=r?1:2;var s=c(this);try{var o=this.g();if(this.S=r?3:6,this.m&&i){if(this.m(this.v,o))return;this.A(5)}this.v=o,this.l=new Revision}catch(t){throw this.destroy(),t}finally{c(s)}}},t.revision=function(){return this.t(!1),this.l},t.destroy=function(){this.R(),this.j.clear(),this.S=0,this.v=void 0},t.get=function(t){if(void 0===t&&(t=e),1===this.S||2===this.S)throw new Error("Recursive computed call");return this.t(null!==e),t&&t.addSubscription(this),this.v},t.T=function(){g(this.j,this)},t.R=function(){S(this.j,this)},t.A=function(t){m(this.p,t)},t.O=function(){this.R(),this.S=6},t.M=function(){this.T(),this.S=3},Computed}();function x(t,n){var i=new Computed(t,n),r=i.get.bind(i);return r.instance=i,r.destroy=i.destroy.bind(i),r.revision=i.revision.bind(i),r}x.box=function(t,n){return new Computed(t,n)},x.prop=function(t,n){return new Computed(t,n)};var Observable=/*#__PURE__*/function(){function Observable(t,n){this.l=new Revision,this.p=new Set,this.v=t,this.m=n?"function"==typeof n?l(n):b:void 0}var t=Observable.prototype;return t.u=function(t){this.p.add(t)},t.o=function(t){this.p.delete(t)},t.t=function(){},t.revision=function(){return this.l},t.get=function(t){return void 0===t&&(t=e),t&&t.addSubscription(this),this.v},t.set=function(t,n){if(e&&e instanceof Computed)throw new Error("Changing observable inside of computed");if(arguments.length>0){if("function"!=typeof t||n||(t=t(this.v)),this.m&&this.m(this.v,t))return;this.v=t}this.notify()},t.notify=function(){this.l=new Revision,m(this.p,5),y()},Observable}();function M(t,n){var i=new Observable(t,n),r=i.get.bind(i),s=i.set.bind(i);return r.instance=i,r.revision=i.revision.bind(i),[r,s]}M.box=function(t,n){return new Observable(t,n)},M.prop=function(t,n){return new Observable(t,n)};var Reaction=/*#__PURE__*/function(){function Reaction(t,n){var i=this;this.g=void 0,this.C=void 0,this.shouldSubscribe=!0,this.j=new Map,this.I=null,this.S=3,this.P=function(){i.I=i.g()},this.g=t,this.C=n}var t=Reaction.prototype;return t.addSubscription=function(t){this.shouldSubscribe&&t.u(this),this.j.set(t,t.revision())},t.h=function(t){4!==t&&3===this.S&&(this.S=5,s.push(this))},t.runManager=function(){7!==this.S&&(this.C?this.C():this.run())},t.subscribe=function(){g(this.j,this)},t.unsubscribe=function(){S(this.j,this)},t.unsubscribeAndCleanup=function(){this.unsubscribe(),this.j.clear(),this.I&&this.I(),this.I=null,this.S=3},t.missedRun=function(){return j(this.j)},t.destroy=function(){this.unsubscribeAndCleanup(),this.S=7},t.run=function(){this.unsubscribeAndCleanup(),v(this.P,this)},t.updateRevisions=function(){var t=this;this.j.forEach(function(n,i){t.j.set(i,i.revision())})},Reaction}();t.Computed=Computed,t.Observable=Observable,t.Reaction=Reaction,t.Revision=Revision,t.action=function(t){return function(){var n=c(null);a+=1;try{return t.apply(this,arguments)}finally{a-=1,c(n),y()}}},t.computed=x,t.configure=function(t){t.reactionScheduler&&(u=t.reactionScheduler),t.reactionExceptionHandler&&(f=t.reactionExceptionHandler)},t.observable=M,t.reaction=function(t,n){var i=new Reaction(t,n),r=i.destroy.bind(i);return r.run=i.run.bind(i),i.run(),r},t.setSubscriber=c,t.shallowEquals=p,t.tx=function(t){a+=1;try{t()}finally{a-=1,y()}},t.untracked=function(t){var n=c(null);try{return t()}finally{c(n)}},t.utx=v,t.withUntracked=l});
//# sourceMappingURL=onek.umd.js.map

@@ -9,6 +9,6 @@ {

"unpkg": "./dist/index.umd.js",
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"browser": "./dist/index.module.js",

@@ -15,0 +15,0 @@ "umd": "./dist/index.umd.js",

{
"name": "onek",
"version": "0.1.5",
"version": "0.1.6",
"description": "⚡️1.8KB full-featured state management inspired by MobX and Solid, batteries included ⚡️",

@@ -14,6 +14,6 @@ "repository": {

"unpkg": "./dist/onek.umd.js",
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"types": "./dist/types/index.d.ts",
"browser": "./dist/onek.module.js",

@@ -24,11 +24,18 @@ "umd": "./dist/onek.umd.js",

},
"./compat": {
"types": "./compat/types/index.d.ts",
"browser": "./compat/dist/index.module.js",
"umd": "./compat/dist/index.umd.js",
"import": "./compat/dist/index.mjs",
"require": "./compat/dist/index.js"
"./react": {
"types": "./react/dist/types/index.d.ts",
"browser": "./react/dist/index.module.js",
"umd": "./react/dist/index.umd.js",
"import": "./react/dist/index.mjs",
"require": "./react/dist/index.js"
},
"./react-compat": {
"types": "./react-compat/dist/types/index.d.ts",
"browser": "./react-compat/dist/index.module.js",
"umd": "./react-compat/dist/index.umd.js",
"import": "./react-compat/dist/index.mjs",
"require": "./react-compat/dist/index.js"
},
"./mobx": {
"types": "./mobx/types/index.d.ts",
"types": "./mobx/dist/types/index.d.ts",
"browser": "./mobx/dist/index.module.js",

@@ -42,12 +49,10 @@ "umd": "./mobx/dist/index.umd.js",

"scripts": {
"build": "yarn run build:onek && yarn run build:compat && yarn run build:mobx",
"build:full": "yarn run build:onek --no-compress && yarn run build:compat --no-compress && yarn run build:mobx --no-compress",
"build:onek": "yarn exec microbundle",
"build:compat": "cd ./compat && yarn exec microbundle --external='onek'",
"build:mobx": "cd ./mobx && yarn exec microbundle --external='onek'",
"build": "yarn run build:onek && yarn run build:react && yarn run build:react-compat && yarn run build:mobx",
"build:full": "yarn run build:onek --no-compress && yarn run build:react --no-compress && yarn run build:react-compat --no-compress && yarn run build:mobx --no-compress",
"build:onek": "yarn exec rimraf ./dist/ && yarn exec microbundle",
"build:react": "cd react && yarn exec rimraf ./dist/ && yarn exec microbundle --external='onek'",
"build:react-compat": "cd react-compat && yarn exec rimraf ./dist/ && yarn exec microbundle --external='onek'",
"build:mobx": "cd ./mobx && yarn exec rimraf ./dist/ && yarn exec microbundle --external='onek'",
"test": "node --expose-gc $(yarn bin jest)"
},
"peerDependencies": {
"react": ">=18.0.0"
},
"devDependencies": {

@@ -67,3 +72,4 @@ "@testing-library/react": "^14.0.0",

"react-test-renderer": "^18.2.0",
"ts-jest": "^29.0.5",
"rimraf": "^5.0.1",
"ts-jest": "latest",
"ts-node": "^10.9.1",

@@ -74,8 +80,11 @@ "typescript": "^5.0.0"

"dist/",
"types/",
"compat/dist/",
"compat/types/",
"compat/package.json",
"src/",
"react/dist/",
"react/src",
"react/package.json",
"react-compat/dist/",
"react-compat/src",
"react-compat/package.json",
"mobx/dist/",
"mobx/types/",
"mobx/src",
"mobx/package.json",

@@ -82,0 +91,0 @@ "LICENSE",

@@ -815,6 +815,6 @@ <p align="center">

type Subscriber = ComputedImpl | ReactionImpl;
type ISubscriber = ComputedImpl | ReactionImpl;
interface Getter<T> {
(subscriber?: Subscriber): T;
(subscriber?: ISubscriber): T;
}

@@ -853,3 +853,3 @@

The getter is a function that can accept a `Subscriber` - return value of `useObserver` hook or the
The getter is a function that can accept a `ISubscriber` - return value of `useObserver` hook or the
value of `instance`attribute of a computed getter.

@@ -917,3 +917,3 @@

```ts
function useObserver(): Subscriber | undefined;
function useObserver(): ISubscriber | undefined;
```

@@ -920,0 +920,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc