@hpcc-js/preact-shim
Advanced tools
Comparing version 2.18.0 to 3.0.0
@@ -1,30 +0,2 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/preact-shim"] = {})); | ||
})(this, (function (exports) { 'use strict'; | ||
var PKG_NAME = "@hpcc-js/preact-shim"; | ||
var PKG_VERSION = "2.18.0"; | ||
var BUILD_VERSION = "2.107.0"; | ||
var n,l$1,u$1,i$1,o$1,r$1,f$1,e$1,c$1,s$1,h$1={},v$1=[],p$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y$1=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function b(n){return n.children}function k$1(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(P);}function P(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$1(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,p,y,d,w,_=t&&t.__k||v$1,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&(p=-1===y.__i?h$1:_[y.__i]||h$1,y.__i=a,O(n,y,p,i,o,r,f,e,c,s),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&N(p.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||p.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=l[t])&&"boolean"!=typeof i&&"function"!=typeof i?(r=t+a,(i=n.__k[t]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g(null,i,null,null,null):y$1(i)?g(b,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=n,i.__b=n.__b+1,o=null,-1!==(f=i.__i=L(i,u,r,s))&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a--:f==r+1?a++:(f>r?a--:a++,i.__u|=65536))):i=n.__k[t]=null;if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function L(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||p$1.test(l)?u:u+"px";}function A(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O(n,u,t,i,o,r,f,e,c,s){var a,h,v,p,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new k$1(m,M),h.constructor=T,h.render=q$1),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,v=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,T.getDerivedStateFromProps(m,h.__s))),p=h.props,w=h.state,h.__v=u,v)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(p,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),x&&!v&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(p,w)),S(n,y$1(L=null!=a&&a.type===b&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$1(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$1(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$1(u,t,i,o,r,f,e,c,s){var a,v,p,d,_,g,m,b=i.props,k=t.props,C=t.type;if("svg"===C?r="http://www.w3.org/2000/svg":"math"===C?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=f)for(a=0;a<f.length;a++)if((_=f[a])&&"setAttribute"in _==!!C&&(C?_.localName===C:3===_.nodeType)){u=_,f[a]=null;break}if(null==u){if(null===C)return document.createTextNode(k);u=document.createElementNS(r,C,k.is&&k),c&&(l$1.__m&&l$1.__m(t,f),c=!1),f=null;}if(null===C)b===k||c&&u.data===k||(u.data=k);else {if(f=f&&n.call(u.childNodes),b=i.props||h$1,!c&&null!=f)for(b={},a=0;a<u.attributes.length;a++)b[(_=u.attributes[a]).name]=_.value;for(a in b)if(_=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=_;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;A(u,a,null,_,r);}for(a in k)_=k[a],"children"==a?d=_:"dangerouslySetInnerHTML"==a?v=_:"value"==a?g=_:"checked"==a?m=_:c&&"function"!=typeof _||b[a]===_||A(u,a,_,b[a],r);if(v)c||p&&(v.__html===p.__html||v.__html===u.innerHTML)||(u.innerHTML=v.__html),t.__k=[];else if(p&&(u.innerHTML=""),S(u,y$1(d)?d:[d],t,i,o,"foreignObject"===C?"http://www.w3.org/1999/xhtml":r,f,e,f?f[0]:i.__k&&x(i,0),c,s),null!=f)for(a=f.length;a--;)w$1(f[a]);c||(a="value","progress"===C&&null==g?u.removeAttribute("value"):void 0!==g&&(g!==u[a]||"progress"===C&&!g||"option"===C&&g!==b[a])&&A(u,a,g,b[a],r),a="checked",void 0!==m&&m!==u[a]&&A(u,a,m,b[a],r));}return u}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V(i[o],u,t||"function"!=typeof n.type);t||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q$1(n,l,u){return this.constructor(n,u)}function B$1(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O(t,u=(!o&&i||t).__k=_(b,null,[u]),r||h$1,h$1,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$1(f,u,e);}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,k$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this));},k$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this));},k$1.prototype.render=b,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,e$1=0,c$1=F(!1),s$1=F(!0); | ||
var t,r,u,i,o=0,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function d(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function h(n){return o=1,p(D,n)}function p(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function y(n,u){var i=d(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i));}function T(n,r){var u=d(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return !n.__||B(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B(n){var t=r;n.__c=n.__(),r=t;}function C(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return "function"==typeof t?t(n):t} | ||
exports.BUILD_VERSION = BUILD_VERSION; | ||
exports.Component = k$1; | ||
exports.Fragment = b; | ||
exports.PKG_NAME = PKG_NAME; | ||
exports.PKG_VERSION = PKG_VERSION; | ||
exports.createElement = _; | ||
exports.h = _; | ||
exports.render = B$1; | ||
exports.useCallback = q; | ||
exports.useEffect = y; | ||
exports.useMemo = T; | ||
exports.useReducer = p; | ||
exports.useState = h; | ||
})); | ||
var S_=Object.defineProperty;var a=(e,_)=>S_(e,"name",{value:_,configurable:!0});var q_="@hpcc-js/preact-shim",O_="3.0.0",j_="3.2.0";var V,d,i_,N_,E,t_,u_,O,G,j,z,U_,D={},l_=[],D_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,K=Array.isArray;function H(e,_){for(var t in _)e[t]=_[t];return e}a(H,"d");function c_(e){e&&e.parentNode&&e.parentNode.removeChild(e)}a(c_,"w");function J(e,_,t){var n,o,i,s={};for(i in _)i=="key"?n=_[i]:i=="ref"?o=_[i]:s[i]=_[i];if(arguments.length>2&&(s.children=arguments.length>3?V.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return W(e,s,n,o,null)}a(J,"_");function W(e,_,t,n,o){var i={type:e,props:_,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++i_,__i:-1,__u:0};return o==null&&d.vnode!=null&&d.vnode(i),i}a(W,"g");function T(e){return e.children}a(T,"b");function U(e,_){this.props=e,this.context=_}a(U,"k");function P(e,_){if(_==null)return e.__?P(e.__,e.__i+1):null;for(var t;_<e.__k.length;_++)if((t=e.__k[_])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?P(e):null}a(P,"x");function s_(e){var _,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,_=0;_<e.__k.length;_++)if((t=e.__k[_])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return s_(e)}}a(s_,"C");function n_(e){(!e.__d&&(e.__d=!0)&&E.push(e)&&!R.__r++||t_!==d.debounceRendering)&&((t_=d.debounceRendering)||u_)(R)}a(n_,"S");function R(){var e,_,t,n,o,i,s,l;for(E.sort(O);e=E.shift();)e.__d&&(_=E.length,n=void 0,i=(o=(t=e).__v).__e,s=[],l=[],t.__P&&((n=H({},o)).__v=o.__v+1,d.vnode&&d.vnode(n),Q(t.__P,n,o,t.__n,t.__P.namespaceURI,32&o.__u?[i]:null,s,i??P(o),!!(32&o.__u),l),n.__v=o.__v,n.__.__k[n.__i]=n,p_(s,n,l),n.__e!=i&&s_(n)),E.length>_&&E.sort(O));R.__r=0}a(R,"M");function f_(e,_,t,n,o,i,s,l,f,u,p){var r,h,c,b,x,k=n&&n.__k||l_,v=_.length;for(t.__d=f,T_(t,_,k),f=t.__d,r=0;r<v;r++)(c=t.__k[r])!=null&&(h=c.__i===-1?D:k[c.__i]||D,c.__i=r,Q(e,c,h,o,i,s,l,f,u,p),b=c.__e,c.ref&&h.ref!=c.ref&&(h.ref&&X(h.ref,null,c),p.push(c.ref,c.__c||b,c)),x==null&&b!=null&&(x=b),65536&c.__u||h.__k===c.__k?f=a_(c,f,e):typeof c.type=="function"&&c.__d!==void 0?f=c.__d:b&&(f=b.nextSibling),c.__d=void 0,c.__u&=-196609);t.__d=f,t.__e=x}a(f_,"P");function T_(e,_,t){var n,o,i,s,l,f=_.length,u=t.length,p=u,r=0;for(e.__k=[],n=0;n<f;n++)(o=_[n])!=null&&typeof o!="boolean"&&typeof o!="function"?(s=n+r,(o=e.__k[n]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?W(null,o,null,null,null):K(o)?W(T,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?W(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,i=null,(l=o.__i=F_(o,t,s,p))!==-1&&(p--,(i=t[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&r--,typeof o.type!="function"&&(o.__u|=65536)):l!==s&&(l==s-1?r--:l==s+1?r++:(l>s?r--:r++,o.__u|=65536))):o=e.__k[n]=null;if(p)for(n=0;n<u;n++)(i=t[n])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=P(i)),h_(i,i))}a(T_,"$");function a_(e,_,t){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,_=a_(n[o],_,t));return _}e.__e!=_&&(_&&e.type&&!t.contains(_)&&(_=P(e)),t.insertBefore(e.__e,_||null),_=e.__e);do _=_&&_.nextSibling;while(_!=null&&_.nodeType===8);return _}a(a_,"I");function F_(e,_,t,n){var o=e.key,i=e.type,s=t-1,l=t+1,f=_[t];if(f===null||f&&o==f.key&&i===f.type&&!(131072&f.__u))return t;if(n>(f!=null&&!(131072&f.__u)?1:0))for(;s>=0||l<_.length;){if(s>=0){if((f=_[s])&&!(131072&f.__u)&&o==f.key&&i===f.type)return s;s--}if(l<_.length){if((f=_[l])&&!(131072&f.__u)&&o==f.key&&i===f.type)return l;l++}}return-1}a(F_,"L");function o_(e,_,t){_[0]==="-"?e.setProperty(_,t??""):e[_]=t==null?"":typeof t!="number"||D_.test(_)?t:t+"px"}a(o_,"T");function I(e,_,t,n,o){var i;_:if(_==="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(_ in n)t&&_ in t||o_(e.style,_,"");if(t)for(_ in t)n&&t[_]===n[_]||o_(e.style,_,t[_])}else if(_[0]==="o"&&_[1]==="n")i=_!==(_=_.replace(/(PointerCapture)$|Capture$/i,"$1")),_=_.toLowerCase()in e||_==="onFocusOut"||_==="onFocusIn"?_.toLowerCase().slice(2):_.slice(2),e.l||(e.l={}),e.l[_+i]=t,t?n?t.u=n.u:(t.u=G,e.addEventListener(_,i?z:j,i)):e.removeEventListener(_,i?z:j,i);else{if(o=="http://www.w3.org/2000/svg")_=_.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(_!="width"&&_!="height"&&_!="href"&&_!="list"&&_!="form"&&_!="tabIndex"&&_!="download"&&_!="rowSpan"&&_!="colSpan"&&_!="role"&&_!="popover"&&_ in e)try{e[_]=t??"";break _}catch{}typeof t=="function"||(t==null||t===!1&&_[4]!=="-"?e.removeAttribute(_):e.setAttribute(_,_=="popover"&&t==1?"":t))}}a(I,"A");function r_(e){return function(_){if(this.l){var t=this.l[_.type+e];if(_.t==null)_.t=G++;else if(_.t<t.u)return;return t(d.event?d.event(_):_)}}}a(r_,"F");function Q(e,_,t,n,o,i,s,l,f,u){var p,r,h,c,b,x,k,v,m,S,w,M,N,e_,A,q,C=_.type;if(_.constructor!==void 0)return null;128&t.__u&&(f=!!(32&t.__u),i=[l=_.__e=t.__e]),(p=d.__b)&&p(_);_:if(typeof C=="function")try{if(v=_.props,m="prototype"in C&&C.prototype.render,S=(p=C.contextType)&&n[p.__c],w=p?S?S.props.value:p.__:n,t.__c?k=(r=_.__c=t.__c).__=r.__E:(m?_.__c=r=new C(v,w):(_.__c=r=new U(v,w),r.constructor=C,r.render=A_),S&&S.sub(r),r.props=v,r.state||(r.state={}),r.context=w,r.__n=n,h=r.__d=!0,r.__h=[],r._sb=[]),m&&r.__s==null&&(r.__s=r.state),m&&C.getDerivedStateFromProps!=null&&(r.__s==r.state&&(r.__s=H({},r.__s)),H(r.__s,C.getDerivedStateFromProps(v,r.__s))),c=r.props,b=r.state,r.__v=_,h)m&&C.getDerivedStateFromProps==null&&r.componentWillMount!=null&&r.componentWillMount(),m&&r.componentDidMount!=null&&r.__h.push(r.componentDidMount);else{if(m&&C.getDerivedStateFromProps==null&&v!==c&&r.componentWillReceiveProps!=null&&r.componentWillReceiveProps(v,w),!r.__e&&(r.shouldComponentUpdate!=null&&r.shouldComponentUpdate(v,r.__s,w)===!1||_.__v===t.__v)){for(_.__v!==t.__v&&(r.props=v,r.state=r.__s,r.__d=!1),_.__e=t.__e,_.__k=t.__k,_.__k.some(function(L){L&&(L.__=_)}),M=0;M<r._sb.length;M++)r.__h.push(r._sb[M]);r._sb=[],r.__h.length&&s.push(r);break _}r.componentWillUpdate!=null&&r.componentWillUpdate(v,r.__s,w),m&&r.componentDidUpdate!=null&&r.__h.push(function(){r.componentDidUpdate(c,b,x)})}if(r.context=w,r.props=v,r.__P=e,r.__e=!1,N=d.__r,e_=0,m){for(r.state=r.__s,r.__d=!1,N&&N(_),p=r.render(r.props,r.state,r.context),A=0;A<r._sb.length;A++)r.__h.push(r._sb[A]);r._sb=[]}else do r.__d=!1,N&&N(_),p=r.render(r.props,r.state,r.context),r.state=r.__s;while(r.__d&&++e_<25);r.state=r.__s,r.getChildContext!=null&&(n=H(H({},n),r.getChildContext())),m&&!h&&r.getSnapshotBeforeUpdate!=null&&(x=r.getSnapshotBeforeUpdate(c,b)),f_(e,K(q=p!=null&&p.type===T&&p.key==null?p.props.children:p)?q:[q],_,t,n,o,i,s,l,f,u),r.base=_.__e,_.__u&=-161,r.__h.length&&s.push(r),k&&(r.__E=r.__=null)}catch(L){if(_.__v=null,f||i!=null){for(_.__u|=f?160:128;l&&l.nodeType===8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,_.__e=l}else _.__e=t.__e,_.__k=t.__k;d.__e(L,_,t)}else i==null&&_.__v===t.__v?(_.__k=t.__k,_.__e=t.__e):_.__e=M_(t.__e,_,t,n,o,i,s,f,u);(p=d.diffed)&&p(_)}a(Q,"O");function p_(e,_,t){_.__d=void 0;for(var n=0;n<t.length;n++)X(t[n],t[++n],t[++n]);d.__c&&d.__c(_,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){d.__e(i,o.__v)}})}a(p_,"j");function M_(e,_,t,n,o,i,s,l,f){var u,p,r,h,c,b,x,k=t.props,v=_.props,m=_.type;if(m==="svg"?o="http://www.w3.org/2000/svg":m==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((c=i[u])&&"setAttribute"in c==!!m&&(m?c.localName===m:c.nodeType===3)){e=c,i[u]=null;break}}if(e==null){if(m===null)return document.createTextNode(v);e=document.createElementNS(o,m,v.is&&v),l&&(d.__m&&d.__m(_,i),l=!1),i=null}if(m===null)k===v||l&&e.data===v||(e.data=v);else{if(i=i&&V.call(e.childNodes),k=t.props||D,!l&&i!=null)for(k={},u=0;u<e.attributes.length;u++)k[(c=e.attributes[u]).name]=c.value;for(u in k)if(c=k[u],u!="children"){if(u=="dangerouslySetInnerHTML")r=c;else if(!(u in v)){if(u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v)continue;I(e,u,null,c,o)}}for(u in v)c=v[u],u=="children"?h=c:u=="dangerouslySetInnerHTML"?p=c:u=="value"?b=c:u=="checked"?x=c:l&&typeof c!="function"||k[u]===c||I(e,u,c,k[u],o);if(p)l||r&&(p.__html===r.__html||p.__html===e.innerHTML)||(e.innerHTML=p.__html),_.__k=[];else if(r&&(e.innerHTML=""),f_(e,K(h)?h:[h],_,t,n,m==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:t.__k&&P(t,0),l,f),i!=null)for(u=i.length;u--;)c_(i[u]);l||(u="value",m==="progress"&&b==null?e.removeAttribute("value"):b!==void 0&&(b!==e[u]||m==="progress"&&!b||m==="option"&&b!==k[u])&&I(e,u,b,k[u],o),u="checked",x!==void 0&&x!==e[u]&&I(e,u,x,k[u],o))}return e}a(M_,"z");function X(e,_,t){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&_==null||(e.__u=e(_))}else e.current=_}catch(o){d.__e(o,t)}}a(X,"N");function h_(e,_,t){var n,o;if(d.unmount&&d.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||X(n,null,_)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){d.__e(i,_)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&h_(n[o],_,t||typeof e.type!="function");t||c_(e.__e),e.__c=e.__=e.__e=e.__d=void 0}a(h_,"V");function A_(e,_,t){return this.constructor(e,t)}a(A_,"q");function L_(e,_,t){var n,o,i,s;d.__&&d.__(e,_),o=(n=typeof t=="function")?null:t&&t.__k||_.__k,i=[],s=[],Q(_,e=(!n&&t||_).__k=J(T,null,[e]),o||D,D,_.namespaceURI,!n&&t?[t]:o?null:_.firstChild?V.call(_.childNodes):null,i,!n&&t?t:o?o.__e:_.firstChild,n,s),p_(i,e,s)}a(L_,"B");V=l_.slice,d={__e:a(function(e,_,t,n){for(var o,i,s;_=_.__;)if((o=_.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e},"__e")},i_=0,N_=a(function(e){return e!=null&&e.constructor==null},"t"),U.prototype.setState=function(e,_){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=H({},this.state),typeof e=="function"&&(e=e(H({},t),this.props)),e&&H(t,e),e!=null&&this.__v&&(_&&this._sb.push(_),n_(this))},U.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),n_(this))},U.prototype.render=T,E=[],u_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,O=a(function(e,_){return e.__v.__b-_.__v.__b},"f"),R.__r=0,G=0,j=r_(!1),z=r_(!0),U_=0;var F,y,Y,d_,$=0,C_=[],g=d,v_=g.__b,m_=g.__r,y_=g.diffed,g_=g.__c,b_=g.unmount,k_=g.__;function __(e,_){g.__h&&g.__h(y,e,$||_),$=0;var t=y.__H||(y.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}a(__,"d");function I_(e){return $=1,w_(P_,e)}a(I_,"h");function w_(e,_,t){var n=__(F++,2);if(n.t=e,!n.__c&&(n.__=[t?t(_):P_(void 0,_),function(l){var f=n.__N?n.__N[0]:n.__[0],u=n.t(f,l);f!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=y,!y.u)){var o=a(function(l,f,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(h){return!!h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,l,f,u);var r=!1;return p.forEach(function(h){if(h.__N){var c=h.__[0];h.__=h.__N,h.__N=void 0,c!==h.__[0]&&(r=!0)}}),!(!r&&n.__c.props===l)&&(!i||i.call(this,l,f,u))},"f");y.u=!0;var i=y.shouldComponentUpdate,s=y.componentWillUpdate;y.componentWillUpdate=function(l,f,u){if(this.__e){var p=i;i=void 0,o(l,f,u),i=p}s&&s.call(this,l,f,u)},y.shouldComponentUpdate=o}return n.__N||n.__}a(w_,"p");function W_(e,_){var t=__(F++,3);!g.__s&&E_(t.__H,_)&&(t.__=e,t.i=_,y.__H.__h.push(t))}a(W_,"y");function H_(e,_){var t=__(F++,7);return E_(t.__H,_)&&(t.__=e(),t.__H=_,t.__h=e),t.__}a(H_,"T");function R_(e,_){return $=8,H_(function(){return e},_)}a(R_,"q");function V_(){for(var e;e=C_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(B),e.__H.__h.forEach(Z),e.__H.__h=[]}catch(_){e.__H.__h=[],g.__e(_,e.__v)}}a(V_,"j");g.__b=function(e){y=null,v_&&v_(e)},g.__=function(e,_){e&&_.__k&&_.__k.__m&&(e.__m=_.__k.__m),k_&&k_(e,_)},g.__r=function(e){m_&&m_(e),F=0;var _=(y=e.__c).__H;_&&(Y===y?(_.__h=[],y.__h=[],_.__.forEach(function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0})):(_.__h.forEach(B),_.__h.forEach(Z),_.__h=[],F=0)),Y=y},g.diffed=function(e){y_&&y_(e);var _=e.__c;_&&_.__H&&(_.__H.__h.length&&(C_.push(_)!==1&&d_===g.requestAnimationFrame||((d_=g.requestAnimationFrame)||B_)(V_)),_.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.i=void 0})),Y=y=null},g.__c=function(e,_){_.some(function(t){try{t.__h.forEach(B),t.__h=t.__h.filter(function(n){return!n.__||Z(n)})}catch(n){_.some(function(o){o.__h&&(o.__h=[])}),_=[],g.__e(n,t.__v)}}),g_&&g_(e,_)},g.unmount=function(e){b_&&b_(e);var _,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{B(n)}catch(o){_=o}}),t.__H=void 0,_&&g.__e(_,t.__v))};var x_=typeof requestAnimationFrame=="function";function B_(e){var _,t=a(function(){clearTimeout(n),x_&&cancelAnimationFrame(_),setTimeout(e)},"r"),n=setTimeout(t,100);x_&&(_=requestAnimationFrame(t))}a(B_,"w");function B(e){var _=y,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),y=_}a(B,"z");function Z(e){var _=y;e.__c=e.__(),y=_}a(Z,"B");function E_(e,_){return!e||e.length!==_.length||_.some(function(t,n){return t!==e[n]})}a(E_,"C");function P_(e,_){return typeof _=="function"?_(e):_}a(P_,"D");export{j_ as BUILD_VERSION,U as Component,T as Fragment,q_ as PKG_NAME,O_ as PKG_VERSION,J as createElement,J as h,L_ as render,R_ as useCallback,W_ as useEffect,H_ as useMemo,w_ as useReducer,I_ as useState}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@hpcc-js/preact-shim", | ||
"version": "2.18.0", | ||
"version": "3.0.0", | ||
"description": "hpcc-js - preact shim", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es6", | ||
"unpkg": "dist/index.min.js", | ||
"jsdelivr": "dist/index.min.js", | ||
"types": "types/index.d.ts", | ||
"typesVersions": { | ||
"<3.8": { | ||
"*": [ | ||
"types-3.4/index.d.ts" | ||
] | ||
} | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./types/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"./dist/*": "./dist/*" | ||
}, | ||
"module": "./dist/index.js", | ||
"browser": "./dist/index.js", | ||
"types": "./types/index.d.ts", | ||
"files": [ | ||
"dist/*", | ||
"types/*", | ||
"types-3.4/*", | ||
"src/*" | ||
"src/*", | ||
"types/*" | ||
], | ||
"scripts": { | ||
"clean": "rimraf --glob lib* types dist *.tsbuildinfo", | ||
"compile-es6": "tsc --module es6 --outDir ./lib-es6", | ||
"compile-es6-watch": "npm run compile-es6 -- -w", | ||
"compile-umd": "tsc --module umd --outDir ./lib-umd", | ||
"compile-umd-watch": "npm run compile-umd -- -w", | ||
"bundle": "rollup -c", | ||
"bundle-watch": "npm run bundle -- -w", | ||
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js", | ||
"gen-legacy-types": "downlevel-dts ./types ./types-3.4", | ||
"build": "npm run compile-es6 && npm run bundle", | ||
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", | ||
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", | ||
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", | ||
"bundle": "node esbuild.js", | ||
"bundle-watch": "npm run bundle -- --development --watch", | ||
"gen-types": "tsc --project tsconfig.json", | ||
"gen-types-watch": "npm run gen-types -- --watch", | ||
"build": "run-p gen-types bundle", | ||
"lint": "eslint ./src", | ||
"lint-fix": "eslint --fix src/**/*.ts", | ||
"docs": "typedoc --options tdoptions.json .", | ||
"update": "npx --yes npm-check-updates -u -t minor" | ||
"update": "npx --yes npm-check-updates -u -t minor", | ||
"update-major": "npx --yes npm-check-updates -u" | ||
}, | ||
"dependencies": { | ||
"preact": "10.24.0" | ||
}, | ||
"devDependencies": { | ||
"@hpcc-js/bundle": "^2.12.0" | ||
"@hpcc-js/esbuild-plugins": "^1.2.0", | ||
"preact": "10.24.3" | ||
}, | ||
@@ -57,3 +49,3 @@ "repository": { | ||
"homepage": "https://github.com/hpcc-systems/Visualization", | ||
"gitHead": "fbbef050700b0e9d76ef99714856383d95155149" | ||
"gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2" | ||
} |
export const PKG_NAME = "@hpcc-js/preact-shim"; | ||
export const PKG_VERSION = "2.18.0"; | ||
export const BUILD_VERSION = "2.107.0"; | ||
export const PKG_VERSION = "3.0.0"; | ||
export const BUILD_VERSION = "3.2.0"; |
@@ -1,4 +0,27 @@ | ||
export * from "./__package__"; | ||
export * from "./__package__.ts"; | ||
export { createElement, Component, Fragment, h, render } from "preact"; | ||
export type { FunctionComponent } from "preact"; | ||
export { useCallback, useEffect, useMemo, useReducer, useState } from "preact/hooks"; | ||
/* | ||
* A Preact 11+ implementation of the `replaceNode` parameter from Preact 10. | ||
* | ||
* This creates a "Persistent Fragment" (a fake DOM element) containing one or more | ||
* DOM nodes, which can then be passed as the `parent` argument to Preact's `render()` method. | ||
export function createRootFragment(parent, replaceNode) { | ||
replaceNode = [].concat(replaceNode); | ||
var s = replaceNode[replaceNode.length - 1].nextSibling; | ||
function insert(c, r) { parent.insertBefore(c, r || s); } | ||
return parent.__k = { | ||
nodeType: 1, | ||
parentNode: parent, | ||
firstChild: replaceNode[0], | ||
childNodes: replaceNode, | ||
insertBefore: insert, | ||
appendChild: insert, | ||
contains: function (c) { return parent.contains(c); }, | ||
removeChild: function (c) { parent.removeChild(c); } | ||
}; | ||
} | ||
*/ |
export declare const PKG_NAME = "@hpcc-js/preact-shim"; | ||
export declare const PKG_VERSION = "2.18.0"; | ||
export declare const BUILD_VERSION = "2.107.0"; | ||
//# sourceMappingURL=__package__.d.ts.map | ||
export declare const PKG_VERSION = "3.0.0"; | ||
export declare const BUILD_VERSION = "3.1.2"; |
@@ -1,5 +0,4 @@ | ||
export * from "./__package__"; | ||
export * from "./__package__.ts"; | ||
export { createElement, Component, Fragment, h, render } from "preact"; | ||
export type { FunctionComponent } from "preact"; | ||
export { useCallback, useEffect, useMemo, useReducer, useState } from "preact/hooks"; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
Yes
127947
2
8
88
- Removedpreact@10.24.0
- Removedpreact@10.24.0(transitive)