Comparing version 0.2.4 to 0.3.0
@@ -1,3 +0,3 @@ | ||
self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const a=e=>{const{$:t,r:n,h:s}=e;i(n)&&(r.get(s).delete(e),n()),i(e.r=t())&&r.get(s).add(e)},c=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},r=new WeakMap,u=[],o=[];function l(e,t){return e!==this[t]}const h=()=>n,i=e=>"function"==typeof e,f=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return s;function s(){const s=n;n=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=s,u.length&&p.then(u.forEach.bind(u.splice(0),a)),o.length&&o.splice(0).forEach(a)}}},p=new t((e=>e()));function d(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const y=(e,t)=>{const n=h(),{i:s,s:a}=n;return s!==a.length&&t&&!t.some(l,a[s]._)||(a[s]={$:e(),_:t}),a[n.i++].$},w=e=>(t,n)=>{const s=h(),{i:a,s:c,h:u}=s,o=a===c.length;s.i++,o&&(r.has(u)||r.set(u,new Set),c[a]={$:t,_:n,r:null,h:u}),(o||!n||n.some(l,c[a]._))&&e.push(c[a]),c[a].$=t,c[a]._=n},g=w(u),E=w(o),$=(e,t)=>i(t)?t(e):t,_=(e,t,n)=>{const a=h(),{i:r,s:u}=a;r===u.length&&u.push({$:i(n)?n(t):$(void 0,t),set:t=>{u[r].$=e(u[r].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),p.then(c))})(a)}});const{$:o,set:l}=u[a.i++];return[o,l]},v=new WeakMap,k=e=>{const t=f(e);return v.set(n,t),n;async function n(){return await t.apply(this,arguments)}}; | ||
self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const a=e=>{const{$:t,r:n,h:s}=e;i(n)&&(r.get(s).delete(e),n()),i(e.r=t())&&r.get(s).add(e)},c=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},r=new WeakMap,u=[],o=[];function l(e,t){return e!==this[t]}const h=()=>n,i=e=>"function"==typeof e,f=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return s;function s(){const s=n;n=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=s,u.length&&p.then(u.forEach.bind(u.splice(0),a)),o.length&&o.splice(0).forEach(a)}}},p=new t((e=>e()));function d(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const y=(e,t)=>{const n=h(),{i:s,s:a}=n;return s!==a.length&&t&&!t.some(l,a[s]._)||(a[s]={$:e(),_:t}),a[n.i++].$},w=e=>(t,n)=>{const s=h(),{i:a,s:c,h:u}=s,o=a===c.length;s.i++,o&&(r.has(u)||r.set(u,new Set),c[a]={$:t,_:n,r:null,d:!1,h:u}),(o||!n||c[a].d||n.some(l,c[a]._))&&e.push(c[a]),c[a].$=t,c[a]._=n},g=w(u),E=w(o),$=(e,t)=>i(t)?t(e):t,_=(e,t,n)=>{const a=h(),{i:r,s:u}=a;r===u.length&&u.push({$:i(n)?n(t):$(void 0,t),set:t=>{u[r].$=e(u[r].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),p.then(c))})(a)}});const{$:o,set:l}=u[a.i++];return[o,l]},v=new WeakMap,k=e=>{const t=f(e);return v.set(n,t),n;async function n(){return await t.apply(this,arguments)}}; | ||
/*! (c) Andrea Giammarchi - ISC */ | ||
let S=null,M=null,m=null;const W=new WeakMap,C=new WeakMap,b=(e,t,n,s)=>{const a=a=>{W.has(e)||(W.set(e,0),p.then((()=>{W.delete(e),e.apply(t,n)}))),s(a)};return C.set(s,a),a},x=(e,t,n,s)=>e?[s[0],C.get(s[1])||b(e,t,n,s[1])]:s;return e.createContext=e=>({_:new Set,provide:d,value:e}),e.dropEffect=e=>(e=>{const t=r.get(e);t&&p.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))})(v.get(e)),e.hasEffect=e=>(e=>r.has(e))(v.get(e)),e.hooked=(e,t)=>{const n=k(t?async function(){const[t,s,a]=[S,M,m];[S,M,m]=[n,this,arguments];try{return await e.apply(M,m)}finally{[S,M,m]=[t,s,a]}}:e);return n},e.useCallback=(e,t)=>y((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(h()),t),e.useEffect=g,e.useLayoutEffect=E,e.useMemo=y,e.useReducer=(e,t,n)=>x(S,M,m,_(e,t,n)),e.useRef=e=>{const t=h(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>x(S,M,m,(e=>_($,e))(e)),e.wait=p,e}({}); | ||
let S=null,M=null,m=null;const W=new WeakMap,C=new WeakMap,b=(e,t,n,s)=>{const a=a=>{W.has(e)||(W.set(e,0),p.then((()=>{W.delete(e),e.apply(t,n)}))),s(a)};return C.set(s,a),a},x=(e,t,n,s)=>e?[s[0],C.get(s[1])||b(e,t,n,s[1])]:s;return e.createContext=e=>({_:new Set,provide:d,value:e}),e.dropEffect=e=>(e=>{const t=r.get(e);t&&p.then((()=>{t.forEach((e=>{e.r(),e.r=null,e.d=!0})),t.clear()}))})(v.get(e)),e.hasEffect=e=>(e=>r.has(e))(v.get(e)),e.hooked=(e,t)=>{const n=k(t?async function(){const[t,s,a]=[S,M,m];[S,M,m]=[n,this,arguments];try{return await e.apply(M,m)}finally{[S,M,m]=[t,s,a]}}:e);return n},e.useCallback=(e,t)=>y((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(h()),t),e.useEffect=g,e.useLayoutEffect=E,e.useMemo=y,e.useReducer=(e,t,n)=>x(S,M,m,_(e,t,n)),e.useRef=e=>{const t=h(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>x(S,M,m,(e=>_($,e))(e)),e.wait=p,e}({}); |
@@ -1,3 +0,3 @@ | ||
self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const c=e=>{const{$:t,r:n,h:s}=e;i(n)&&(o.get(s).delete(e),n()),i(e.r=t())&&o.get(s).add(e)},l=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},o=new WeakMap,u=[],a=[];function r(e,t){return e!==this[t]}const h=()=>n,i=e=>"function"==typeof e,f=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return s;function s(){const s=n;n=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=s,u.length&&p.then(u.forEach.bind(u.splice(0),c)),a.length&&a.splice(0).forEach(c)}}},p=new t((e=>e()));function d(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const y=(e,t)=>{const n=h(),{i:s,s:c}=n;return s!==c.length&&t&&!t.some(r,c[s]._)||(c[s]={$:e(),_:t}),c[n.i++].$},g=e=>(t,n)=>{const s=h(),{i:c,s:l,h:u}=s,a=c===l.length;s.i++,a&&(o.has(u)||o.set(u,new Set),l[c]={$:t,_:n,r:null,h:u}),(a||!n||n.some(r,l[c]._))&&e.push(l[c]),l[c].$=t,l[c]._=n},w=g(u),E=g(a),$=(e,t)=>i(t)?t(e):t,_=(e,t,n)=>{const c=h(),{i:o,s:u}=c;o===u.length&&u.push({$:i(n)?n(t):$(void 0,t),set:t=>{u[o].$=e(u[o].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),p.then(l))})(c)}});const{$:a,set:r}=u[c.i++];return[a,r]}; | ||
self.uhooksFX=function(e){"use strict";var t=Promise;let n=null,s=new Set;const c=e=>{const{$:t,r:n,h:s}=e;i(n)&&(o.get(s).delete(e),n()),i(e.r=t())&&o.get(s).add(e)},l=()=>{const e=s;s=new Set,e.forEach((({h:e,c:t,a:n,e:s})=>{s&&e.apply(t,n)}))},o=new WeakMap,u=[],a=[];function r(e,t){return e!==this[t]}const h=()=>n,i=e=>"function"==typeof e,f=e=>{const t={h:s,c:null,a:null,e:0,i:0,s:[]};return s;function s(){const s=n;n=t,t.e=t.i=0;try{return e.apply(t.c=this,t.a=arguments)}finally{n=s,u.length&&p.then(u.forEach.bind(u.splice(0),c)),a.length&&a.splice(0).forEach(c)}}},p=new t((e=>e()));function d(e){const{_:t,value:n}=this;n!==e&&(this._=new Set,this.value=e,t.forEach((({h:e,c:t,a:n})=>{e.apply(t,n)})))}const y=(e,t)=>{const n=h(),{i:s,s:c}=n;return s!==c.length&&t&&!t.some(r,c[s]._)||(c[s]={$:e(),_:t}),c[n.i++].$},g=e=>(t,n)=>{const s=h(),{i:c,s:l,h:u}=s,a=c===l.length;s.i++,a&&(o.has(u)||o.set(u,new Set),l[c]={$:t,_:n,r:null,d:!1,h:u}),(a||!n||l[c].d||n.some(r,l[c]._))&&e.push(l[c]),l[c].$=t,l[c]._=n},w=g(u),E=g(a),$=(e,t)=>i(t)?t(e):t,_=(e,t,n)=>{const c=h(),{i:o,s:u}=c;o===u.length&&u.push({$:i(n)?n(t):$(void 0,t),set:t=>{u[o].$=e(u[o].$,t),(e=>{s.has(e)||(e.e=1,s.add(e),p.then(l))})(c)}});const{$:a,set:r}=u[c.i++];return[a,r]}; | ||
/*! (c) Andrea Giammarchi - ISC */ | ||
let v=null,k=null,S=null;const m=new WeakMap,M=new WeakMap,C=(e,t,n,s)=>{const c=c=>{m.has(e)||(m.set(e,0),p.then((()=>{m.delete(e),e.apply(t,n)}))),s(c)};return M.set(s,c),c},W=(e,t,n,s)=>e?[s[0],M.get(s[1])||C(e,t,n,s[1])]:s;return e.createContext=e=>({_:new Set,provide:d,value:e}),e.dropEffect=e=>{const t=o.get(e);t&&p.then((()=>{t.forEach((e=>{e.r(),e.r=null})),t.clear()}))},e.hasEffect=e=>o.has(e),e.hooked=(e,t)=>{const n=f(t?function(){const[t,s,c]=[v,k,S];[v,k,S]=[n,this,arguments];try{return e.apply(k,S)}finally{[v,k,S]=[t,s,c]}}:e);return n},e.useCallback=(e,t)=>y((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(h()),t),e.useEffect=w,e.useLayoutEffect=E,e.useMemo=y,e.useReducer=(e,t,n)=>W(v,k,S,_(e,t,n)),e.useRef=e=>{const t=h(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>W(v,k,S,(e=>_($,e))(e)),e.wait=p,e}({}); | ||
let v=null,k=null,S=null;const m=new WeakMap,M=new WeakMap,C=(e,t,n,s)=>{const c=c=>{m.has(e)||(m.set(e,0),p.then((()=>{m.delete(e),e.apply(t,n)}))),s(c)};return M.set(s,c),c},W=(e,t,n,s)=>e?[s[0],M.get(s[1])||C(e,t,n,s[1])]:s;return e.createContext=e=>({_:new Set,provide:d,value:e}),e.dropEffect=e=>{const t=o.get(e);t&&p.then((()=>{t.forEach((e=>{e.r(),e.r=null,e.d=!0})),t.clear()}))},e.hasEffect=e=>o.has(e),e.hooked=(e,t)=>{const n=f(t?function(){const[t,s,c]=[v,k,S];[v,k,S]=[n,this,arguments];try{return e.apply(k,S)}finally{[v,k,S]=[t,s,c]}}:e);return n},e.useCallback=(e,t)=>y((()=>e),t),e.useContext=({_:e,value:t})=>(e.add(h()),t),e.useEffect=w,e.useLayoutEffect=E,e.useMemo=y,e.useReducer=(e,t,n)=>W(v,k,S,_(e,t,n)),e.useRef=e=>{const t=h(),{i:n,s:s}=t;return n===s.length&&s.push({current:e}),s[t.i++]},e.useState=e=>W(v,k,S,(e=>_($,e))(e)),e.wait=p,e}({}); |
52
index.js
@@ -31,7 +31,7 @@ self.uhooksFX = (function (exports) { | ||
if (isFunction(r)) { | ||
fx.get(h)["delete"](effect); | ||
fx$1.get(h)["delete"](effect); | ||
r(); | ||
} | ||
if (isFunction(effect.r = $())) fx.get(h).add(effect); | ||
if (isFunction(effect.r = $())) fx$1.get(h).add(effect); | ||
}; | ||
@@ -53,3 +53,3 @@ | ||
var fx = new WeakMap(); | ||
var fx$1 = new WeakMap(); | ||
var effects = []; | ||
@@ -61,3 +61,3 @@ var layoutEffects = []; | ||
var dropEffect = function dropEffect(hook) { | ||
var effects = fx.get(hook); | ||
var effects = fx$1.get(hook); | ||
if (effects) wait.then(function () { | ||
@@ -67,2 +67,3 @@ effects.forEach(function (effect) { | ||
effect.r = null; | ||
effect.d = true; | ||
}); | ||
@@ -76,3 +77,3 @@ effects.clear(); | ||
var hasEffect = function hasEffect(hook) { | ||
return fx.has(hook); | ||
return fx$1.has(hook); | ||
}; | ||
@@ -82,3 +83,3 @@ var isFunction = function isFunction(f) { | ||
}; | ||
var hooked = function hooked(callback) { | ||
var hooked$1 = function hooked(callback) { | ||
var current = { | ||
@@ -178,3 +179,3 @@ h: hook, | ||
if (call) { | ||
if (!fx.has(h)) fx.set(h, new Set()); | ||
if (!fx$1.has(h)) fx$1.set(h, new Set()); | ||
s[i] = { | ||
@@ -184,2 +185,3 @@ $: callback, | ||
r: null, | ||
d: false, | ||
h: h | ||
@@ -189,3 +191,3 @@ }; | ||
if (call || !guards || guards.some(different, s[i]._)) stack.push(s[i]); | ||
if (call || !guards || s[i].d || guards.some(different, s[i]._)) stack.push(s[i]); | ||
s[i].$ = callback; | ||
@@ -203,3 +205,3 @@ s[i]._ = guards; | ||
var useReducer = function useReducer(reducer, value, init) { | ||
var useReducer$1 = function useReducer(reducer, value, init) { | ||
var info = getInfo(); | ||
@@ -220,4 +222,4 @@ var i = info.i, | ||
}; | ||
var useState = function useState(value) { | ||
return useReducer(getValue, value); | ||
var useState$1 = function useState(value) { | ||
return useReducer$1(getValue, value); | ||
}; | ||
@@ -239,3 +241,3 @@ | ||
a = null; | ||
var fx$1 = new WeakMap(); | ||
var fx = new WeakMap(); | ||
var states = new WeakMap(); | ||
@@ -245,6 +247,6 @@ | ||
var wrap = function wrap(value) { | ||
if (!fx$1.has(h)) { | ||
fx$1.set(h, 0); | ||
if (!fx.has(h)) { | ||
fx.set(h, 0); | ||
wait.then(function () { | ||
fx$1["delete"](h); | ||
fx["delete"](h); | ||
h.apply(c, a); | ||
@@ -265,4 +267,4 @@ }); | ||
var hooked$1 = function hooked$1(callback, outer) { | ||
var hook = hooked(outer ? | ||
var hooked = function hooked(callback, outer) { | ||
var hook = hooked$1(outer ? | ||
/*async*/ | ||
@@ -290,7 +292,7 @@ function () { | ||
}; | ||
var useReducer$1 = function useReducer$1(reducer, value, init) { | ||
return wrap(h, c, a, useReducer(reducer, value, init)); | ||
var useReducer = function useReducer(reducer, value, init) { | ||
return wrap(h, c, a, useReducer$1(reducer, value, init)); | ||
}; | ||
var useState$1 = function useState$1(value) { | ||
return wrap(h, c, a, useState(value)); | ||
var useState = function useState(value) { | ||
return wrap(h, c, a, useState$1(value)); | ||
}; | ||
@@ -301,3 +303,3 @@ | ||
exports.hasEffect = hasEffect; | ||
exports.hooked = hooked$1; | ||
exports.hooked = hooked; | ||
exports.useCallback = useCallback; | ||
@@ -308,5 +310,5 @@ exports.useContext = useContext; | ||
exports.useMemo = useMemo; | ||
exports.useReducer = useReducer$1; | ||
exports.useReducer = useReducer; | ||
exports.useRef = useRef; | ||
exports.useState = useState$1; | ||
exports.useState = useState; | ||
exports.wait = wait; | ||
@@ -316,2 +318,2 @@ | ||
}({})); | ||
})({}); |
@@ -1,1 +0,1 @@ | ||
self.uhooksFX=function(n){"use strict";var t="function"==typeof Promise?Promise:function(n){var t,e=[],u=0;return n((function(n){t=n,u=1,e.splice(0).forEach(r)})),{then:r};function r(n){return u?setTimeout(n,0,t):e.push(n),this}},e=null,u=new Set,r=function(n){var t=n.$,e=n.r,u=n.h;l(e)&&(o.get(u).delete(n),e()),l(n.r=t())&&o.get(u).add(n)},i=function(){var n=u;u=new Set,n.forEach((function(n){var t=n.h,e=n.c,u=n.a;n.e&&t.apply(e,u)}))},o=new WeakMap,c=[],a=[];function f(n,t){return n!==this[t]}var s=function(){return e},l=function(n){return"function"==typeof n},h=new t((function(n){return n()}));function v(n){var t=this._;this.value!==n&&(this._=new Set,this.value=n,t.forEach((function(n){var t=n.h,e=n.c,u=n.a;t.apply(e,u)})))}var p=function(n,t){var e=s(),u=e.i,r=e.s;return u!==r.length&&t&&!t.some(f,r[u]._)||(r[u]={$:n(),_:t}),r[e.i++].$},d=function(n){return function(t,e){var u=s(),r=u.i,i=u.s,c=u.h,a=r===i.length;u.i++,a&&(o.has(c)||o.set(c,new Set),i[r]={$:t,_:e,r:null,h:c}),(a||!e||e.some(f,i[r]._))&&n.push(i[r]),i[r].$=t,i[r]._=e}},y=d(c),g=d(a),w=function(n,t){return l(t)?t(n):t},E=function(n,t,e){var r=s(),o=r.i,c=r.s;o===c.length&&c.push({$:l(e)?e(t):w(void 0,t),set:function(t){c[o].$=n(c[o].$,t),function(n){u.has(n)||(n.e=1,u.add(n),h.then(i))}(r)}});var a=c[r.i++];return[a.$,a.set]},$=null,_=null,k=null,m=new WeakMap,S=new WeakMap,M=function(n,t,e,u){var r=function(r){m.has(n)||(m.set(n,0),h.then((function(){m.delete(n),n.apply(t,e)}))),u(r)};return S.set(u,r),r},C=function(n,t,e,u){return n?[u[0],S.get(u[1])||M(n,t,e,u[1])]:u};return n.createContext=function(n){return{_:new Set,provide:v,value:n}},n.dropEffect=function(n){var t=o.get(n);t&&h.then((function(){t.forEach((function(n){n.r(),n.r=null})),t.clear()}))},n.hasEffect=function(n){return o.has(n)},n.hooked=function(n,t){var u=function(n){var t={h:u,c:null,a:null,e:0,i:0,s:[]};return u;function u(){var u=e;e=t,t.e=t.i=0;try{return n.apply(t.c=this,t.a=arguments)}finally{e=u,c.length&&h.then(c.forEach.bind(c.splice(0),r)),a.length&&a.splice(0).forEach(r)}}}(t?function(){var t=$,e=_,r=k;$=u,_=this,k=arguments;try{return n.apply(_,k)}finally{$=t,_=e,k=r}}:n);return u},n.useCallback=function(n,t){return p((function(){return n}),t)},n.useContext=function(n){var t=n._,e=n.value;return t.add(s()),e},n.useEffect=y,n.useLayoutEffect=g,n.useMemo=p,n.useReducer=function(n,t,e){return C($,_,k,E(n,t,e))},n.useRef=function(n){var t=s(),e=t.i,u=t.s;return e===u.length&&u.push({current:n}),u[t.i++]},n.useState=function(n){return C($,_,k,function(n){return E(w,n)}(n))},n.wait=h,n}({}); | ||
self.uhooksFX=function(n){"use strict";var t="function"==typeof Promise?Promise:function(n){var t,e=[],u=0;return n((function(n){t=n,u=1,e.splice(0).forEach(r)})),{then:r};function r(n){return u?setTimeout(n,0,t):e.push(n),this}},e=null,u=new Set,r=function(n){var t=n.$,e=n.r,u=n.h;l(e)&&(o.get(u).delete(n),e()),l(n.r=t())&&o.get(u).add(n)},i=function(){var n=u;u=new Set,n.forEach((function(n){var t=n.h,e=n.c,u=n.a;n.e&&t.apply(e,u)}))},o=new WeakMap,c=[],a=[];function f(n,t){return n!==this[t]}var s=function(){return e},l=function(n){return"function"==typeof n},h=new t((function(n){return n()}));function v(n){var t=this._;this.value!==n&&(this._=new Set,this.value=n,t.forEach((function(n){var t=n.h,e=n.c,u=n.a;t.apply(e,u)})))}var p=function(n,t){var e=s(),u=e.i,r=e.s;return u!==r.length&&t&&!t.some(f,r[u]._)||(r[u]={$:n(),_:t}),r[e.i++].$},d=function(n){return function(t,e){var u=s(),r=u.i,i=u.s,c=u.h,a=r===i.length;u.i++,a&&(o.has(c)||o.set(c,new Set),i[r]={$:t,_:e,r:null,d:!1,h:c}),(a||!e||i[r].d||e.some(f,i[r]._))&&n.push(i[r]),i[r].$=t,i[r]._=e}},y=d(c),g=d(a),w=function(n,t){return l(t)?t(n):t},E=function(n,t,e){var r=s(),o=r.i,c=r.s;o===c.length&&c.push({$:l(e)?e(t):w(void 0,t),set:function(t){c[o].$=n(c[o].$,t),function(n){u.has(n)||(n.e=1,u.add(n),h.then(i))}(r)}});var a=c[r.i++];return[a.$,a.set]},$=null,_=null,k=null,m=new WeakMap,S=new WeakMap,M=function(n,t,e,u){var r=function(r){m.has(n)||(m.set(n,0),h.then((function(){m.delete(n),n.apply(t,e)}))),u(r)};return S.set(u,r),r},C=function(n,t,e,u){return n?[u[0],S.get(u[1])||M(n,t,e,u[1])]:u};return n.createContext=function(n){return{_:new Set,provide:v,value:n}},n.dropEffect=function(n){var t=o.get(n);t&&h.then((function(){t.forEach((function(n){n.r(),n.r=null,n.d=!0})),t.clear()}))},n.hasEffect=function(n){return o.has(n)},n.hooked=function(n,t){var u=function(n){var t={h:u,c:null,a:null,e:0,i:0,s:[]};return u;function u(){var u=e;e=t,t.e=t.i=0;try{return n.apply(t.c=this,t.a=arguments)}finally{e=u,c.length&&h.then(c.forEach.bind(c.splice(0),r)),a.length&&a.splice(0).forEach(r)}}}(t?function(){var t=$,e=_,r=k;$=u,_=this,k=arguments;try{return n.apply(_,k)}finally{$=t,_=e,k=r}}:n);return u},n.useCallback=function(n,t){return p((function(){return n}),t)},n.useContext=function(n){var t=n._,e=n.value;return t.add(s()),e},n.useEffect=y,n.useLayoutEffect=g,n.useMemo=p,n.useReducer=function(n,t,e){return C($,_,k,E(n,t,e))},n.useRef=function(n){var t=s(),e=t.i,u=t.s;return e===u.length&&u.push({current:n}),u[t.i++]},n.useState=function(n){return C($,_,k,function(n){return E(w,n)}(n))},n.wait=h,n}({}); |
{ | ||
"name": "uhooks-fx", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "uhooks with propagated states", | ||
@@ -28,12 +28,12 @@ "main": "./cjs/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.12.17", | ||
"@babel/preset-env": "^7.12.17", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-node-resolve": "^11.2.0", | ||
"@ungap/degap": "^0.2.4", | ||
"@babel/core": "^7.17.10", | ||
"@babel/preset-env": "^7.17.10", | ||
"@rollup/plugin-babel": "^5.3.1", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@ungap/degap": "^0.2.8", | ||
"ascjs": "^5.0.1", | ||
"rollup": "^2.39.0", | ||
"rollup": "^2.72.0", | ||
"rollup-plugin-includepaths": "^0.2.4", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"terser": "^5.6.0" | ||
"terser": "^5.13.1" | ||
}, | ||
@@ -55,3 +55,3 @@ "module": "./esm/index.js", | ||
"dependencies": { | ||
"uhooks": "^0.2.6" | ||
"uhooks": "^0.3.0" | ||
}, | ||
@@ -58,0 +58,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24743
538
+ Addeduhooks@0.3.0(transitive)
- Removeduhooks@0.2.8(transitive)
Updateduhooks@^0.3.0