Comparing version 10.8.0 to 10.8.1
@@ -1,2 +0,2 @@ | ||
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.0",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}; | ||
var n=require("preact");"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.1",n.options,{Fragment:n.Fragment,Component:n.Component}),exports.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}; | ||
//# sourceMappingURL=devtools.js.map |
@@ -1,2 +0,2 @@ | ||
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.0",n,{Fragment:o,Component:e});export{t as addHookName}; | ||
import{options as n,Fragment as o,Component as e}from"preact";function t(o,e){return n.__a&&n.__a(e),o}"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.1",n,{Fragment:o,Component:e});export{t as addHookName}; | ||
//# sourceMappingURL=devtools.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.0",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],n):n(e.preactDevtools={},e.preact)}(this,function(e,n){"undefined"!=typeof window&&window.__PREACT_DEVTOOLS__&&window.__PREACT_DEVTOOLS__.attachPreact("10.8.1",n.options,{Fragment:n.Fragment,Component:n.Component}),e.addHookName=function(e,o){return n.options.__a&&n.options.__a(o),e}}); | ||
//# sourceMappingURL=devtools.umd.js.map |
@@ -5,3 +5,3 @@ import { options, Fragment, Component } from 'preact'; | ||
if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) { | ||
window.__PREACT_DEVTOOLS__.attachPreact('10.8.0', options, { | ||
window.__PREACT_DEVTOOLS__.attachPreact('10.8.1', options, { | ||
Fragment, | ||
@@ -8,0 +8,0 @@ Component |
@@ -1,2 +0,2 @@ | ||
var n,t,r,u,o=require("preact"),i=0,c=[],e=o.options.__b,f=o.options.__r,a=o.options.diffed,v=o.options.__c,l=o.options.unmount;function p(n,r){o.options.__h&&o.options.__h(t,n,i||r),i=0;var u=t.__H||(t.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function s(n){return i=1,x(F,n)}function x(r,u,o){var i=p(n++,2);return i.t=r,i.__c||(i.__=[o?o(u):F(void 0,u),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=t),i.__}function m(r,u){var i=p(n++,4);!o.options.__s&&A(i.__H,u)&&(i.__=r,i.__H=u,t.__h.push(i))}function y(t,r){var u=p(n++,7);return A(u.__H,r)&&(u.__=t(),u.__H=r,u.__h=t),u.__}function d(){for(var n;n=c.shift();)if(n.__P)try{n.__H.__h.forEach(_),n.__H.__h.forEach(q),n.__H.__h=[]}catch(t){n.__H.__h=[],o.options.__e(t,n.__v)}}o.options.__b=function(n){t=null,e&&e(n)},o.options.__r=function(u){f&&f(u),n=0;var o=(t=u.__c).__H;o&&(r===t?(o.__h=[],t.__h=[],o.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(o.__h.forEach(_),o.__h.forEach(q),o.__h=[])),r=t},o.options.diffed=function(n){a&&a(n);var i=n.__c;i&&i.__H&&i.__H.__h.length&&(1!==c.push(i)&&u===o.options.requestAnimationFrame||((u=o.options.requestAnimationFrame)||function(n){var t,r=function(){clearTimeout(u),h&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);h&&(t=requestAnimationFrame(r))})(d)),t=null,r=null},o.options.__c=function(n,t){t.some(function(n){try{n.__h.forEach(_),n.__h=n.__h.filter(function(n){return!n.__||q(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],o.options.__e(r,n.__v)}}),v&&v(n,t)},o.options.unmount=function(n){l&&l(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{_(n)}catch(n){t=n}}),t&&o.options.__e(t,r.__v))};var h="function"==typeof requestAnimationFrame;function _(n){var r=t,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),t=r}function q(n){var r=t;n.__c=n.__(),t=r}function A(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function F(n,t){return"function"==typeof t?t(n):t}exports.useState=s,exports.useReducer=x,exports.useEffect=function(r,u){var i=p(n++,3);!o.options.__s&&A(i.__H,u)&&(i.__=r,i.__H=u,t.__H.__h.push(i))},exports.useLayoutEffect=m,exports.useRef=function(n){return i=5,y(function(){return{current:n}},[])},exports.useImperativeHandle=function(n,t,r){i=6,m(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))},exports.useMemo=y,exports.useCallback=function(n,t){return i=8,y(function(){return n},t)},exports.useContext=function(r){var u=t.context[r.__c],o=p(n++,9);return o.c=r,u?(null==o.__&&(o.__=!0,u.sub(t)),u.props.value):r.__},exports.useDebugValue=function(n,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(n):n)},exports.useErrorBoundary=function(r){var u=p(n++,10),o=s();return u.__=r,t.componentDidCatch||(t.componentDidCatch=function(n){u.__&&u.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}; | ||
var n,t,r,u,o=require("preact"),i=0,c=[],e=o.options.__b,f=o.options.__r,a=o.options.diffed,v=o.options.__c,l=o.options.unmount;function p(n,r){o.options.__h&&o.options.__h(t,n,i||r),i=0;var u=t.__H||(t.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function s(n){return i=1,x(F,n)}function x(r,u,o){var i=p(n++,2);return i.t=r,i.__c||(i.__=[o?o(u):F(void 0,u),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=t),i.__}function m(r,u){var i=p(n++,4);!o.options.__s&&A(i.__H,u)&&(i.__=r,i.u=u,t.__h.push(i))}function d(t,r){var u=p(n++,7);return A(u.__H,r)?(u.o=t(),u.u=r,u.__h=t,u.o):u.__}function y(){for(var n;n=c.shift();)if(n.__P)try{n.__H.__h.forEach(_),n.__H.__h.forEach(q),n.__H.__h=[]}catch(t){n.__H.__h=[],o.options.__e(t,n.__v)}}o.options.__b=function(n){t=null,e&&e(n)},o.options.__r=function(u){f&&f(u),n=0;var o=(t=u.__c).__H;o&&(r===t?(o.__h=[],t.__h=[],o.__.forEach(function(n){n.o=n.u=void 0})):(o.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),o.__h.forEach(_),o.__h.forEach(q),o.__h=[])),r=t},o.options.diffed=function(n){a&&a(n);var i=n.__c;i&&i.__H&&i.__H.__h.length&&(1!==c.push(i)&&u===o.options.requestAnimationFrame||((u=o.options.requestAnimationFrame)||function(n){var t,r=function(){clearTimeout(u),h&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);h&&(t=requestAnimationFrame(r))})(y)),t=null,r=null},o.options.__c=function(n,t){t.some(function(n){try{n.__H&&n.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),n.__h.forEach(_),n.__h=n.__h.filter(function(n){return!n.__||q(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],o.options.__e(r,n.__v)}}),v&&v(n,t)},o.options.unmount=function(n){l&&l(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{_(n)}catch(n){t=n}}),t&&o.options.__e(t,r.__v))};var h="function"==typeof requestAnimationFrame;function _(n){var r=t,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),t=r}function q(n){var r=t;n.__c=n.__(),t=r}function A(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function F(n,t){return"function"==typeof t?t(n):t}exports.useState=s,exports.useReducer=x,exports.useEffect=function(r,u){var i=p(n++,3);!o.options.__s&&A(i.__H,u)&&(i.__=r,i.u=u,t.__H.__h.push(i))},exports.useLayoutEffect=m,exports.useRef=function(n){return i=5,d(function(){return{current:n}},[])},exports.useImperativeHandle=function(n,t,r){i=6,m(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))},exports.useMemo=d,exports.useCallback=function(n,t){return i=8,d(function(){return n},t)},exports.useContext=function(r){var u=t.context[r.__c],o=p(n++,9);return o.c=r,u?(null==o.__&&(o.__=!0,u.sub(t)),u.props.value):r.__},exports.useDebugValue=function(n,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(n):n)},exports.useErrorBoundary=function(r){var u=p(n++,10),o=s();return u.__=r,t.componentDidCatch||(t.componentDidCatch=function(n){u.__&&u.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}; | ||
//# sourceMappingURL=hooks.js.map |
@@ -1,2 +0,2 @@ | ||
import{options as n}from"preact";var t,u,r,o,i=0,c=[],f=n.__b,e=n.__r,a=n.diffed,v=n.__c,l=n.unmount;function m(t,r){n.__h&&n.__h(u,t,i||r),i=0;var o=u.__H||(u.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function p(n){return i=1,y(z,n)}function y(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):z(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function d(r,o){var i=m(t++,3);!n.__s&&w(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function h(r,o){var i=m(t++,4);!n.__s&&w(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function s(n){return i=5,A(function(){return{current:n}},[])}function _(n,t,u){i=6,h(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==u?u:u.concat(n))}function A(n,u){var r=m(t++,7);return w(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function F(n,t){return i=8,A(function(){return n},t)}function T(n){var r=u.context[n.__c],o=m(t++,9);return o.c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function q(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function x(n){var r=m(t++,10),o=p();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function b(){for(var t;t=c.shift();)if(t.__P)try{t.__H.__h.forEach(j),t.__H.__h.forEach(k),t.__H.__h=[]}catch(u){t.__H.__h=[],n.__e(u,t.__v)}}n.__b=function(n){u=null,f&&f(n)},n.__r=function(n){e&&e(n),t=0;var o=(u=n.__c).__H;o&&(r===u?(o.__h=[],u.__h=[],o.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(o.__h.forEach(j),o.__h.forEach(k),o.__h=[])),r=u},n.diffed=function(t){a&&a(t);var i=t.__c;i&&i.__H&&i.__H.__h.length&&(1!==c.push(i)&&o===n.requestAnimationFrame||((o=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),g&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);g&&(t=requestAnimationFrame(u))})(b)),u=null,r=null},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(j),t.__h=t.__h.filter(function(n){return!n.__||k(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),v&&v(t,u)},n.unmount=function(t){l&&l(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{j(n)}catch(n){u=n}}),u&&n.__e(u,r.__v))};var g="function"==typeof requestAnimationFrame;function j(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t}function k(n){var t=u;n.__c=n.__(),u=t}function w(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function z(n,t){return"function"==typeof t?t(n):t}export{p as useState,y as useReducer,d as useEffect,h as useLayoutEffect,s as useRef,_ as useImperativeHandle,A as useMemo,F as useCallback,T as useContext,q as useDebugValue,x as useErrorBoundary}; | ||
import{options as n}from"preact";var t,u,r,o,i=0,c=[],f=n.__b,e=n.__r,a=n.diffed,v=n.__c,l=n.unmount;function m(t,r){n.__h&&n.__h(u,t,i||r),i=0;var o=u.__H||(u.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function d(n){return i=1,p(z,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):z(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=m(t++,3);!n.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__H.__h.push(i))}function h(r,o){var i=m(t++,4);!n.__s&&w(i.__H,o)&&(i.__=r,i.u=o,u.__h.push(i))}function s(n){return i=5,A(function(){return{current:n}},[])}function _(n,t,u){i=6,h(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==u?u:u.concat(n))}function A(n,u){var r=m(t++,7);return w(r.__H,u)?(r.o=n(),r.u=u,r.__h=n,r.o):r.__}function F(n,t){return i=8,A(function(){return n},t)}function T(n){var r=u.context[n.__c],o=m(t++,9);return o.c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function q(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function x(n){var r=m(t++,10),o=d();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function b(){for(var t;t=c.shift();)if(t.__P)try{t.__H.__h.forEach(j),t.__H.__h.forEach(k),t.__H.__h=[]}catch(u){t.__H.__h=[],n.__e(u,t.__v)}}n.__b=function(n){u=null,f&&f(n)},n.__r=function(n){e&&e(n),t=0;var o=(u=n.__c).__H;o&&(r===u?(o.__h=[],u.__h=[],o.__.forEach(function(n){n.o=n.u=void 0})):(o.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),o.__h.forEach(j),o.__h.forEach(k),o.__h=[])),r=u},n.diffed=function(t){a&&a(t);var i=t.__c;i&&i.__H&&i.__H.__h.length&&(1!==c.push(i)&&o===n.requestAnimationFrame||((o=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),g&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);g&&(t=requestAnimationFrame(u))})(b)),u=null,r=null},n.__c=function(t,u){u.some(function(t){try{t.__H&&t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),t.__h.forEach(j),t.__h=t.__h.filter(function(n){return!n.__||k(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),v&&v(t,u)},n.unmount=function(t){l&&l(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{j(n)}catch(n){u=n}}),u&&n.__e(u,r.__v))};var g="function"==typeof requestAnimationFrame;function j(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t}function k(n){var t=u;n.__c=n.__(),u=t}function w(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function z(n,t){return"function"==typeof t?t(n):t}export{d as useState,p as useReducer,y as useEffect,h as useLayoutEffect,s as useRef,_ as useImperativeHandle,A as useMemo,F as useCallback,T as useContext,q as useDebugValue,x as useErrorBoundary}; | ||
//# sourceMappingURL=hooks.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t(n.preactHooks={},n.preact)}(this,function(n,t){var u,r,o,i,c=0,f=[],e=t.options.__b,a=t.options.__r,v=t.options.diffed,l=t.options.__c,p=t.options.unmount;function d(n,u){t.options.__h&&t.options.__h(r,n,c||u),c=0;var o=r.__H||(r.__H={__:[],__h:[]});return n>=o.__.length&&o.__.push({}),o.__[n]}function m(n){return c=1,y(T,n)}function y(n,t,o){var i=d(u++,2);return i.t=n,i.__c||(i.__=[o?o(t):T(void 0,t),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=r),i.__}function s(n,o){var i=d(u++,4);!t.options.__s&&F(i.__H,o)&&(i.__=n,i.__H=o,r.__h.push(i))}function h(n,t){var r=d(u++,7);return F(r.__H,t)&&(r.__=n(),r.__H=t,r.__h=n),r.__}function _(){for(var n;n=f.shift();)if(n.__P)try{n.__H.__h.forEach(x),n.__H.__h.forEach(A),n.__H.__h=[]}catch(u){n.__H.__h=[],t.options.__e(u,n.__v)}}t.options.__b=function(n){r=null,e&&e(n)},t.options.__r=function(n){a&&a(n),u=0;var t=(r=n.__c).__H;t&&(o===r?(t.__h=[],r.__h=[],t.__.forEach(function(n){n.__H&&(n.__H=void 0)})):(t.__h.forEach(x),t.__h.forEach(A),t.__h=[])),o=r},t.options.diffed=function(n){v&&v(n);var u=n.__c;u&&u.__H&&u.__H.__h.length&&(1!==f.push(u)&&i===t.options.requestAnimationFrame||((i=t.options.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),q&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);q&&(t=requestAnimationFrame(u))})(_)),r=null,o=null},t.options.__c=function(n,u){u.some(function(n){try{n.__h.forEach(x),n.__h=n.__h.filter(function(n){return!n.__||A(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],t.options.__e(r,n.__v)}}),l&&l(n,u)},t.options.unmount=function(n){p&&p(n);var u,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{x(n)}catch(n){u=n}}),u&&t.options.__e(u,r.__v))};var q="function"==typeof requestAnimationFrame;function x(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t}function A(n){var t=r;n.__c=n.__(),r=t}function F(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function T(n,t){return"function"==typeof t?t(n):t}n.useState=m,n.useReducer=y,n.useEffect=function(n,o){var i=d(u++,3);!t.options.__s&&F(i.__H,o)&&(i.__=n,i.__H=o,r.__H.__h.push(i))},n.useLayoutEffect=s,n.useRef=function(n){return c=5,h(function(){return{current:n}},[])},n.useImperativeHandle=function(n,t,u){c=6,s(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==u?u:u.concat(n))},n.useMemo=h,n.useCallback=function(n,t){return c=8,h(function(){return n},t)},n.useContext=function(n){var t=r.context[n.__c],o=d(u++,9);return o.c=n,t?(null==o.__&&(o.__=!0,t.sub(r)),t.props.value):n.__},n.useDebugValue=function(n,u){t.options.useDebugValue&&t.options.useDebugValue(u?u(n):n)},n.useErrorBoundary=function(n){var t=d(u++,10),o=m();return t.__=n,r.componentDidCatch||(r.componentDidCatch=function(n){t.__&&t.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("preact")):"function"==typeof define&&define.amd?define(["exports","preact"],t):t(n.preactHooks={},n.preact)}(this,function(n,t){var u,o,i,r,c=0,f=[],e=t.options.__b,a=t.options.__r,v=t.options.diffed,l=t.options.__c,d=t.options.unmount;function p(n,u){t.options.__h&&t.options.__h(o,n,c||u),c=0;var i=o.__H||(o.__H={__:[],__h:[]});return n>=i.__.length&&i.__.push({}),i.__[n]}function m(n){return c=1,y(T,n)}function y(n,t,i){var r=p(u++,2);return r.t=n,r.__c||(r.__=[i?i(t):T(void 0,t),function(n){var t=r.t(r.__[0],n);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=o),r.__}function s(n,i){var r=p(u++,4);!t.options.__s&&F(r.__H,i)&&(r.__=n,r.u=i,o.__h.push(r))}function h(n,t){var o=p(u++,7);return F(o.__H,t)?(o.o=n(),o.u=t,o.__h=n,o.o):o.__}function _(){for(var n;n=f.shift();)if(n.__P)try{n.__H.__h.forEach(x),n.__H.__h.forEach(A),n.__H.__h=[]}catch(u){n.__H.__h=[],t.options.__e(u,n.__v)}}t.options.__b=function(n){o=null,e&&e(n)},t.options.__r=function(n){a&&a(n),u=0;var t=(o=n.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach(function(n){n.o=n.u=void 0})):(t.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),t.__h.forEach(x),t.__h.forEach(A),t.__h=[])),i=o},t.options.diffed=function(n){v&&v(n);var u=n.__c;u&&u.__H&&u.__H.__h.length&&(1!==f.push(u)&&r===t.options.requestAnimationFrame||((r=t.options.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(o),q&&cancelAnimationFrame(t),setTimeout(n)},o=setTimeout(u,100);q&&(t=requestAnimationFrame(u))})(_)),o=null,i=null},t.options.__c=function(n,u){u.some(function(n){try{n.__H&&n.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.o&&(n.__=n.o),n.o=n.u=void 0}),n.__h.forEach(x),n.__h=n.__h.filter(function(n){return!n.__||A(n)})}catch(o){u.some(function(n){n.__h&&(n.__h=[])}),u=[],t.options.__e(o,n.__v)}}),l&&l(n,u)},t.options.unmount=function(n){d&&d(n);var u,o=n.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{x(n)}catch(n){u=n}}),u&&t.options.__e(u,o.__v))};var q="function"==typeof requestAnimationFrame;function x(n){var t=o,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),o=t}function A(n){var t=o;n.__c=n.__(),o=t}function F(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function T(n,t){return"function"==typeof t?t(n):t}n.useState=m,n.useReducer=y,n.useEffect=function(n,i){var r=p(u++,3);!t.options.__s&&F(r.__H,i)&&(r.__=n,r.u=i,o.__H.__h.push(r))},n.useLayoutEffect=s,n.useRef=function(n){return c=5,h(function(){return{current:n}},[])},n.useImperativeHandle=function(n,t,u){c=6,s(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==u?u:u.concat(n))},n.useMemo=h,n.useCallback=function(n,t){return c=8,h(function(){return n},t)},n.useContext=function(n){var t=o.context[n.__c],i=p(u++,9);return i.c=n,t?(null==i.__&&(i.__=!0,t.sub(o)),t.props.value):n.__},n.useDebugValue=function(n,u){t.options.useDebugValue&&t.options.useDebugValue(u?u(n):n)},n.useErrorBoundary=function(n){var t=p(u++,10),i=m();return t.__=n,o.componentDidCatch||(o.componentDidCatch=function(n){t.__&&t.__(n),i[1](n)}),[i[0],function(){i[1](void 0)}]}}); | ||
//# sourceMappingURL=hooks.umd.js.map |
@@ -44,5 +44,14 @@ import { options } from 'preact'; | ||
hooks._list.forEach(hookItem => { | ||
if (hookItem._args) hookItem._args = undefined; | ||
hookItem._pendingValue = hookItem._pendingArgs = undefined; | ||
}); | ||
} else { | ||
hooks._list.forEach(hookItem => { | ||
if (hookItem._pendingArgs) { | ||
hookItem._args = hookItem._pendingArgs; | ||
} | ||
if (hookItem._pendingValue) { | ||
hookItem._value = hookItem._pendingValue; | ||
} | ||
hookItem._pendingValue = hookItem._pendingArgs = undefined; | ||
}); | ||
hooks._pendingEffects.forEach(invokeCleanup); | ||
@@ -70,2 +79,14 @@ hooks._pendingEffects.forEach(invokeEffect); | ||
try { | ||
if (component.__hooks) { | ||
component.__hooks._list.forEach(hookItem => { | ||
if (hookItem._pendingArgs) { | ||
hookItem._args = hookItem._pendingArgs; | ||
} | ||
if (hookItem._pendingValue) { | ||
hookItem._value = hookItem._pendingValue; | ||
} | ||
hookItem._pendingValue = hookItem._pendingArgs = undefined; | ||
}); | ||
} | ||
component._renderCallbacks.forEach(invokeCleanup); | ||
@@ -180,3 +201,3 @@ component._renderCallbacks = component._renderCallbacks.filter(cb => | ||
state._value = callback; | ||
state._args = args; | ||
state._pendingArgs = args; | ||
@@ -196,3 +217,3 @@ currentComponent.__hooks._pendingEffects.push(state); | ||
state._value = callback; | ||
state._args = args; | ||
state._pendingArgs = args; | ||
@@ -237,5 +258,6 @@ currentComponent._renderCallbacks.push(state); | ||
if (argsChanged(state._args, args)) { | ||
state._value = factory(); | ||
state._args = args; | ||
state._pendingValue = factory(); | ||
state._pendingArgs = args; | ||
state._factory = factory; | ||
return state._pendingValue; | ||
} | ||
@@ -242,0 +264,0 @@ |
@@ -52,2 +52,3 @@ import { | ||
_args?: any[]; | ||
_pendingArgs?: any[]; | ||
_cleanup?: Cleanup | void; | ||
@@ -58,3 +59,5 @@ } | ||
_value?: any; | ||
_pendingValue?: any; | ||
_args?: any[]; | ||
_pendingArgs?: any[]; | ||
_factory?: () => any; | ||
@@ -61,0 +64,0 @@ } |
{ | ||
"name": "preact", | ||
"amdName": "preact", | ||
"version": "10.8.0", | ||
"version": "10.8.1", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "description": "Fast 3kb React-compatible Virtual DOM library.", |
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
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
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
923048
6102