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

rax

Package Overview
Dependencies
Maintainers
1
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

dist/rax.min.js

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

!function(){var x={n:1,t:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function v(n,t,i,r,u){return{type:n,key:t,ref:i,props:r,_owner:u}}function A(n){return null===n}function p(n){return"function"==typeof n}function u(n){return"object"==typeof n}function S(n){return Array.isArray(n)}function f(n){return"string"==typeof n}function e(n){return"number"==typeof n}function d(n){if(null==n)return n;var t=[];return function n(t,i){if(S(t))for(var r=0,u=t.length;r<u;r++)n(t[r],i);else i.push(t)}(n,t),t.length-1?t:t[0]}function _(n){throw Error("Minified error: "+n)}var m={key:!0,ref:!0};function a(n,t,i){null==n&&_(0);var r,u={},e=null,f=null,s=x.owner;if(null!=t){var o=!1;if(null!=t.ref&&(o=!0,f=t.ref),null!=t.key&&(o=!0,e=""+t.key),o)for(r in t)m[r]||(u[r]=t[r]);else u=t}var h=arguments.length-2;if(0<h)if(1!==h||S(i)){var c=i;if(1<h){c=Array(h);for(var a=0;a<h;a++)c[a]=arguments[a+2]}u.children=d(c)}else u.children=i;if(n&&n.defaultProps){var l=n.defaultProps;for(r in l)void 0===u[r]&&(u[r]=l[r])}return new v(n,e,f,u,s)}function w(n,t,i){for(var r=0,u=n&&n.length;r<u;r++)n[r].call(t,i)}var t=[],i=[],s=setTimeout;function r(n){0===t.length&&s(o),t.push(n)}function o(){var n;while(n=t.shift())n()}function l(n){0===i.length&&s(y),i.push(n)}function y(){var n;while(n=i.shift())n()}var h={}.hasOwnProperty;function b(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function C(n,t){if(b(n,t))return!0;if(!u(n)||A(n)||!u(t)||A(t))return!1;var i=Object.keys(n);if(i.length!==Object.keys(t).length)return!1;for(var r=0;r<i.length;r++)if(!h.call(t,i[r])||!b(n[i[r]],t[i[r]]))return!1;return!0}var g="_internal",D="_instance",H="_nativeNode",j="_renderedComponent";function k(){return x.owner&&x.owner[D]}function I(){var n=k();if(n)return n;_(1)}function E(n,t){if(A(t)||n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(!b(n[i],t[i]))return!1;return!0}function O(n){var r=I(),u=r.getHookID(),e=r.getHooks();if(!e[u]){p(n)&&(n=n());e[u]=[n,function(n){x.t||y();var t=e[u],i=t[2];p(n)&&(n=n(i)),b(n,i)||(t[2]=n,k()===r?r.i=!0:r.r())},n]}var t=e[u];return b(t[0],t[2])||(t[0]=t[2],r.u=!0),t}function R(n,t){c(n,t)}function c(n,t,r){var i=I(),u=i.getHookID(),e=i.getHooks();if(t=void 0===t?null:t,e[u]){var f=e[u],s=f.e,o=f.f;f.f=t,f.s=o,s.current=n}else{var h=function n(t){if(!t&&r)return l(function(){return n(!0)});var i=n.current;i&&(c.current=i(),n.current=null)},c=function n(t){if(!t&&r)return l(function(){return n(!0)});var i=n.current;i&&(i(),n.current=null)};h.current=n,e[u]={e:h,o:c,s:t,f:t},i.didMount.push(h),i.willUnmount.push(c),i.didUpdate.push(function(){var n=e[u],t=n.f,i=n.e;null!=t&&E(t,n.s)||(c(),i())})}}function P(n,t){var i=I(),r=i.getHookID(),u=i.getHooks();if(t=void 0===t?null:t,u[r]){var e=u[r][1];!A(t)&&E(t,e)||(u[r]=[n(),t])}else u[r]=[n(),t];return u[r][0]}function M(n){return S(n)?n:[n]}function N(n,t){var i;while(n&&n[g]){if(t(n)){i=n;break}n=n[g].h}return i}var n=0;function U(n,t){n.prototype=Object.create(t.prototype),(n.prototype.constructor=n).__proto__=t}var F=function(){function n(n){this.c=n}var t=n.prototype;return t.a=function(n,t,i){this._parent=n,this.h=t,this._context=i,this._mountID=x.n++},t.l=function(){this.c=this[H]=this._parent=this.h=this._context=null,this[D]&&(this[D]=this[D][g]=null)},t.v=function(n,t,i,r){this.a(n,t,i),this.d(r);var u={};return u[g]=this,u},t.unmountComponent=function(n){this[H]&&!n&&x.driver.removeChild(this[H],this._parent),this.l()},t._=function(){var n=this.c,t=n&&n.type;return t&&t.displayName||t&&t.name||t||n},t.d=function(n){var t=this.p(),i=this._parent;n?n(t,i):x.driver.appendChild(t,i)},t.p=function(){return null==this[H]?this[H]=this.m():this[H]},t.w=function(){return this.p()},n}(),L=function(n){function t(){return n.apply(this,arguments)||this}return U(t,n),t.prototype.m=function(){return x.driver.createEmpty(this)},t}(F);function T(n,t,i){var r=n?n.ref:null,u=t?t.ref:null;r!==u&&(r&&Z(n._owner,r,i),u&&V(t._owner,u,i))}function V(n,t,i){n||_(3);var r=i.w();p(t)?t(r):u(t)?t.current=r:n[D].refs[t]=r}function Z(n,t,i){if(p(t))t(null);else{var r=i.w();u(t)&&t.current===r?t.current=null:n[D].refs[t]===r&&delete n[D].refs[t]}}function $(n){var t;return u(n)&&null!==n&&n.type?t=f(n.type)?new x.y(n):new x.b(n):f(n)||e(n)?t=new x.C(n+""):void 0===n||A(n)||!1===n||!0===n?t=new x.g:S(n)?t=new x.j(n):q(),t}function q(){_(2)}function z(n,t){var i=A(n),r=A(t);return i||r?i===r:!(!S(n)||!S(t))||(f(n)||e(n)?f(t)||e(t):u(n)&&u(t)&&n.type===t.type&&n.key===t.key)}function B(n,t,i){var r=t&&t.key,u="."+i.toString(36);if(f(r)){var e="$"+r;return void 0===n[e]?e:u}return u}function G(n){var t=n;while(t=n.h&&n.h[g])if(t instanceof x.b)n=t;else{for(var i=Object.keys(t.k),r=n.I-1;0<=r;r--){var u=t.k[i[r]].p();if(!S(u))return u;if(0<u.length)return u[u.length-1]}if(!(t instanceof x.j))return null;n=t}}var J=function(){function n(n,t){this.props=n,this.context=t,this.refs={}}var t=n.prototype;return t.setState=function(n,t){this.updater.setState(this,n,t)},t.forceUpdate=function(n){this.updater.forceUpdate(this,n)},n}(),K=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).O=!0,n}return U(n,t),n}(J),Q=1,W=function(t){function n(){var n;return(n=t.call(this)||this).R=[],n.P=Q++,n}U(n,t);var i=n.prototype;return i.w=function(){return this.x().w()},i.x=function(){return this[g][j]},i.r=function(n){this.R=n,this.forceUpdate()},i.render=function(){return this.R},n}(J),X={set:function(n,t){n._r||(n._r=t).P&&(x.rootInstances[t.P]=t,x.rootComponents[t.P]=t[g])},get:function(n){return n._r},remove:function(n){var t=this.get(n);t&&(n._r=null,t.P&&(delete x.rootComponents[t.P],delete x.rootInstances[t.P]))},mount:function(n,t,i){var r=i.parent,u=i.hydrate,e=x.driver;null==t&&(t=e.createBody());var f,s={element:n,container:t,hydrate:u};if(e.beforeRender&&e.beforeRender(s),r){var o=r[g];f=o.A(o._context)}var h=this.get(t);if(h&&h.P)return f&&(h[g].S=f),h.r(n),h;var c=$(a(W)).v(t,null,f||{});return this.set(t,c),c.r(n),e.afterRender&&e.afterRender(s),c}},Y=Object.assign,nn="style",tn="children",rn=/^on[A-Z]/,un=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r){this.a(n,t,i);var u=this.c,e=u.props,f=u.type,s=e[tn],o=e.append||"tree";this.D=Y({},e[nn]);var h={type:f,props:e};return(h[g]=this)[D]=h,"tree"===o?(this.H(s,i),this.d(r)):(this.d(r),this.H(s,i)),u&&u.ref&&V(u._owner,u.ref,this),h},i.H=function(n,t){if(null==n)return n;var i=this.p();return this.M(i,M(n),t)},i.M=function(n,t,i,r){for(var u=this.k={},e=[],f=0,s=t.length;f<s;f++){var o=t[f],h=$(o);(u[B(u,o,f)]=h).I=f;var c=h.v(n,this[D],i,r);e.push(c)}return e},i.N=function(n){var t=this.k;if(t){for(var i in t){t[i].unmountComponent(n)}this.k=null}},i.unmountComponent=function(n){if(this[H]){var t=this.c.ref;t&&Z(this.c._owner,t,this),X.remove(this[H]),n||(x.driver.removeChild(this[H],this._parent),n=!0)}this.N(n),this.D=null,this.l()},i.U=function(n,t,i,r){T(n,this.c=t,this);var u=n.props,e=t.props;this.F(u,e),null==u[tn]||S(u[tn])&&0===u[tn].length?this.H(e[tn],r):this.L(e[tn],r)},i.F=function(n,t){var i,r,u,e=x.driver,f=this.p();for(i in n)if(i!==tn&&null!=n[i]&&!t.hasOwnProperty(i))if(i===nn){var s=this.D;for(r in s)(u=u||{})[r]="";this.D=null}else if(rn.test(i)){var o=n[i];p(o)&&e.removeEventListener(f,i.slice(2).toLowerCase(),o)}else e.removeAttribute(f,i,n[i]);for(i in t){var h=t[i],c=i===nn?this.D:null!=n?n[i]:void 0;if(i!==tn&&c!==h&&(null!=h||null!=c))if(i===nn)if(h?h=this.D=Y({},h):this.D=null,null!=c){for(r in c)h&&(h[r]||0===h[r])||((u=u||{})[r]="");for(r in h)c[r]!==h[r]&&((u=u||{})[r]=h[r])}else u=h;else if(rn.test(i)){var a=i.slice(2).toLowerCase();p(c)&&e.removeEventListener(f,a,c,t),p(h)&&e.addEventListener(f,a,h,t)}else null!=h?e.setAttribute(f,i,h):e.removeAttribute(f,i,n[i])}u&&e.setStyle(f,u)},i.L=function(n,t){var i=this.k,u=x.driver;if(null!=n||null!=i){var r={};if(null!=n)for(var e=0,f=(n=M(n)).length;e<f;e++){var s=n[e],o=B(r,s,e),h=i&&i[o],c=h&&h.c,a=h&&h._context;r[o]=null!=h&&z(c,s)?(c===s&&a===t||h.U(c,s,t,t),h):(h&&(h.T=!0),$(s))}var l=this.p(),v=S(l),d=null,_=null,p=!1,m=!1,w=null,y=!(!u.removeChildren||!(A(n)||n&&!n.length));if(null!=i){for(var b in i){var C=i[b],g=C.T||!r[b];d?g&&C.unmountComponent(y):(m=g,S(_=(d=C).p())&&(p=0===_.length,_=_[0]))}(v&&0===l.length||p)&&(w=G(this))}if(null!=r){var j=function(n,t){for(var i=0,r=(n=M(n)).length;i<r;i++)w?u.insertAfter(n[r-i-1],w):_?u.insertBefore(n[i],_):t&&u.appendChild(n[i],t)},k=0,I=[];for(var E in r){var O=r[E],R=i&&i[E];if(R===O){var P=R.p();R.I!==k&&j(P)}else v&&(l=this._parent),O.v(l,this[D],t,j);O.I=k++,S(w=O.p())?(I=I.concat(w),w=w[w.length-1]):I.push(w)}S(this[H])&&(this[H].length=0,Y(this[H],I))}m&&d.unmountComponent(y),y&&u.removeChildren(this[H]),this.k=r}},i.m=function(){var n=this[D],t=x.driver.createElement(n.type,n.props,this);return X.set(t,n),t},t}(F),en=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.U=function(n,t){n!==(t=""+t)&&(this.c=t,x.driver.updateText(this.p(),t))},i.m=function(){return x.driver.createText(this.c,this)},t}(F),fn=function(i){function n(n,t){var r;(r=i.call(this)||this).V=!0,r.Z=n,r.$=0,r.q=0,r.z={},r.i=!1,r.u=!1,r.B=null,r.G={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state={},n.J&&(r.K=r.J=t);var u=n.Q;return u&&(r.shouldComponentUpdate=function(n){for(var t=!0,i=u.length-1;-1<i;i--)if(t=u[i](r.props,n))break;return!t||r.K!==r.J}),r}U(n,i);var t=n.prototype;return t.getHooks=function(){return this.z},t.getHookID=function(){return++this.$},t.useContext=function(n){var t=this,i=n._contextID,r=this.G[i];function u(){return r.W?r.W.getValue():n._defaultValue}if(!r){var e=n.X(this);if(r=this.G[i]={W:e},e){var f=function(){r.Y!==u()&&(t.u=!0,t.r())};e.nn(f),this.willUnmount.push(function(){return e.tn(f)})}}return r.Y=u()},t.componentWillMount=function(){this.u=!0},t.componentDidMount=function(){w(this.didMount)},t.componentWillReceiveProps=function(){this.u=!0},t.componentDidUpdate=function(){w(this.didUpdate)},t.componentWillUnmount=function(){w(this.willUnmount)},t.r=function(){this[g].in=!0,this.setState({})},t.render=function(){this.$=0,this.q=0,this.i=!1;var n=this.Z(this.props,this.J?this.J:this.context);while(this.i)this.q++,24<this.q&&_(4),this.$=0,this.i=!1,n=this.Z(this.props,this.J?this.J:this.context);return this.u&&(this.B=n,this.u=!1),this.B},n}(J),sn=[];function on(n){return n.rn}function hn(n,t){return n.rn=t}function cn(n){return n.un}function an(n){var t=n[g];if(t){x.t=!0;var i=on(t);hn(t,null);var r=t.c,u=t._context,e=t.S||u;t.S=void 0,(cn(t)||t.in)&&t.U(r,r,u,e),w(i,n),x.t=!1}}function ln(n,t){return t[g]._mountID-n[g]._mountID}function vn(){if(x.t)return r(vn);var n,t=sn;if(0<t.length){y(),sn=[],1<t.length&&(t=t.sort(ln));while(n=t.pop())an(n)}}function dn(n,t){if(sn.indexOf(n)<0&&sn.push(n),t){if(1<sn.length)return;r(vn)}else vn()}function _n(n,t,i){var r=n[g];if(r){var u,e;i&&(e=i,(on(u=r)||hn(u,[])).push(e));var f,s,o=r[j];t?(s=t,(cn(f=r)||(f.un=[])).push(s),!r.en&&o&&dn(n,!0)):(r.in=!0,o&&dn(n))}}var pn={setState:function(n,t,i){x.t||y(),_n(n,t,i)},forceUpdate:function(n,t){_n(n,null,t)},runCallbacks:w};function mn(n,t,i){try{return n()}catch(n){i?i(n):wn(t,n)}}function wn(n,t){var i=N(n,function(n){return n.componentDidCatch});if(i){var r=i[g];if(r)(r.rn||(r.rn=[])).push(function(){return i.componentDidCatch(t)})}else s(function(){throw t},0)}var yn=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r){this.a(n,t,i);var u,e,f=this.c,s=f.type,o=f.ref,h=f.props,c=s.prototype,a=this.fn(i);try{c&&c.render?u=new s(h,a):p(s)?u=new fn(s,o):q()}catch(n){return wn(t,n)}u.props=h,u.context=a,u.refs={},u.updater=pn;var l=((u[g]=this)[D]=u).state;void 0===l&&(u.state=l=null);var v=null,d=function(n){v=n};u.componentWillMount&&mn(function(){u.componentWillMount()},u,d),null==e&&(u.state=(x.owner=this).sn(h,a),mn(function(){e=u.render()},u,d),x.owner=null),this[j]=$(e),this[j].v(this._parent,u,this.A(i),r),v&&wn(u,v),!f.type.J&&o&&V(f._owner,o,this),u.componentDidMount&&mn(function(){u.componentDidMount()},u);var _=this.rn;return _&&(this.rn=null,w(_,u)),u},i.unmountComponent=function(n){var t=this[D];if(t&&t.componentWillUnmount&&mn(function(){t.componentWillUnmount()},t),null!=this[j]){var i=this.c,r=i.ref;!i.type.J&&r&&Z(i._owner,r,this),this[j].unmountComponent(n),this[j]=null}this.un=null,this.in=!1,this.l()},i.fn=function(n){var t={},i=this.c.type.contextTypes;if(i)for(var r in i)t[r]=n[r];return t},i.A=function(n){var t=this[D],i=t.getChildContext&&t.getChildContext();return i?Y({},n,i):n},i.sn=function(n,t){var i=this[D],r=this.un;if(!r)return i.state;this.un=null;for(var u=Y({},i.state),e=0;e<r.length;e++){var f=r[e];Y(u,p(f)?f.call(i,u,n,t):f)}return u},i.U=function(n,t,i,r){var u=this[D];if(u){var e,f,s;this._context===r?f=u.context:(f=this.fn(r),e=!0),s=t.props,n!==t&&(e=!0),e&&u.componentWillReceiveProps&&(this.en=!0,mn(function(){u.componentWillReceiveProps(s,f)},u),this.en=!1),this.c.type.J?(u.K=n.ref,u.J=t.ref):T(n,t,this);var o=!0,h=u.props,c=u.state,a=this.sn(s,f);if(this.in||(u.shouldComponentUpdate?o=mn(function(){return u.shouldComponentUpdate(s,a,f)},u):u.O&&(o=!C(h,s)||!C(c,a))),o){this.in=!1;var l=u.context;u.componentWillUpdate&&mn(function(){u.componentWillUpdate(s,a,f)},u),this.c=t,this._context=r,u.props=s,u.state=a,u.context=f,this.on(r),u.componentDidUpdate&&mn(function(){u.componentDidUpdate(h,c,l)},u)}else this.c=t,this._context=r,u.props=s,u.state=a,u.context=f;var v=this.rn;v&&(this.rn=null,w(v,u))}},i.on=function(n){var t,i=this[j],r=i.c,u=this[D];if(x.owner=this,mn(function(){t=u.render()},u),x.owner=null,z(r,t)){var e=i._context,f=this.A(n);r===t&&e===f||i.U(r,t,e,f)}else{var s=null,o=i.p();S(o)&&0===o.length&&null==u.P&&(s=G(i)),i.unmountComponent(!0),this[j]=$(t),this[j].v(this._parent,u,this.A(n),function(n,t){o=M(o),n=M(n);for(var i=x.driver,r=0;r<n.length;r++){var u=n[r];o[r]?i.replaceChild(u,o[r]):s?i.insertAfter(u,s):i.appendChild(u,t),s=u}for(var e=n.length;e<o.length;e++)i.removeChild(o[e])})}},i.p=function(){var n=this[j];if(n)return n.p()},i.w=function(){var n=this[D];return n.V?null:n},t}(F),bn=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r){this.a(n,t,i);var u=this[D]={};(u[g]=this).H(this.c,i);var e=this.p();if(r)r(e,n);else for(var f=0;f<e.length;f++)x.driver.appendChild(e[f],n);return u},i.H=function(n,t){var i=this.p();return this.M(this._parent,n,t,function(n){n=M(n);for(var t=0;t<n.length;t++)i.push(n[t])})},i.unmountComponent=function(n){var t=this[H];if(t&&(X.remove(t),!n))for(var i=0,r=t.length;i<r;i++)x.driver.removeChild(t[i]);this.N(!0),this.l()},i.U=function(n,t,i,r){this.c=t,this.L(this.c,r)},i.m=function(){return[]},t}(un);var Cn={createElement:a,createContext:function(o){var h="_c"+n++;function c(n){return N(n,function(n){return n.hn===h})}return{Provider:function(){function n(){this.hn=h,this.cn=[]}var t=n.prototype;return t.nn=function(n){this.cn.push(n)},t.tn=function(t){this.cn=this.cn.filter(function(n){return n!==t})},t._getChildContext=function(){var n;return(n={})[h]=this,n},t.getValue=function(){return void 0!==this.props.value?this.props.value:o},t.componentDidUpdate=function(n){this.props.value!==n.value&&w(this.cn,null,this.getValue())},t.render=function(){return this.props.children},n}(),Consumer:function(n,t){var i=this,r=O(function(){return t[h]||c(i)})[0],u=r?r.getValue():o,e=O(u),f=e[1];if(u===e[0]){R(function(){if(r)return r.nn(f),function(){r.tn(f)}},[]);var s=M(n.children)[0];return p(s)?s(u):void 0}f(u)},_contextID:h,_defaultValue:o,X:c}},createRef:function(){return{current:null}},forwardRef:function(n){return n.J=!0,n},memo:function(n,t){return t=t||C,n.Q?n.Q.push(t):n.Q=[t],n},Fragment:function(n){return n.children},render:function(n,t,i,r){var u;p(i)&&(r=i,i=null),u=(i=i||{}).driver,x.g=L,x.y=un,x.C=en,x.j=bn,x.b=yn,(x.driver=u||x.driver)||_(5);var e=X.mount(n,t,i).w();return r&&r.call(e),e},Component:J,version:"1.0.12",shared:{Host:x,Instance:X,Element:v,flattenChildren:d},useState:O,useContext:function(n){return I().useContext(n)},useEffect:function(n,t){c(n,t,!0)},useLayoutEffect:R,useRef:function(n){var t=I(),i=t.getHookID(),r=t.getHooks();return r[i]||(r[i]={current:n}),r[i]},useCallback:function(n,t){return P(function(){return n},t)},useMemo:P,useReducer:function(n,t,i){var u=I(),e=u.getHookID(),f=u.getHooks(),r=f[e];if(!r){var s=p(i)?i(t):t;return f[e]=[s,function(n){x.t||y();var t=f[e][2];if(k()===u)t.an.push(n),u.i=!0;else{var i=t.ln,r=(0,t.vn)(i,n);if(b(r,i))return;t.ln=r,t.an.push(n),u.r()}},{an:[],vn:n,ln:s}]}var o=r[2],h=r[0];if(0<u.q)for(var c=0;c<o.an.length;c++)h=n(h,o.an[c]);else h=o.ln;return b(h,r[0])||(r[0]=h,u.u=!0),o.vn=n,o.ln=h,o.an.length=0,f[e]},useImperativeHandle:function(n,t,i){R(function(){return p(n)?(n(t()),function(){return n(null)}):null!=n?(n.current=t(),function(){n.current=null}):void 0},S(i)?i.concat([n]):null)},PureComponent:K};"undefined"!=typeof module?module.exports=Cn:self.Rax=Cn}();
!function(){var x={n:1,t:!1,driver:null,rootComponents:{},rootInstances:{},owner:null};function v(n,t,i,r,u){return{type:n,key:t,ref:i,props:r,_owner:u}}function A(n){return null===n}function m(n){return"function"==typeof n}function u(n){return"object"==typeof n}function S(n){return Array.isArray(n)}function f(n){return"string"==typeof n}function e(n){return"number"==typeof n}function d(n){if(null==n)return n;var t=[];return function n(t,i){if(S(t))for(var r=0,u=t.length;r<u;r++)n(t[r],i);else i.push(t)}(n,t),t.length-1?t:t[0]}function _(n){throw Error("Minified error: "+n)}var p={key:!0,ref:!0};function a(n,t,i){null==n&&_(0);var r,u={},e=null,f=null,s=x.owner;if(null!=t){var o=!1;if(null!=t.ref&&(o=!0,f=t.ref),null!=t.key&&(o=!0,e=""+t.key),o)for(r in t)p[r]||(u[r]=t[r]);else u=t}var h=arguments.length-2;if(0<h)if(1!==h||S(i)){var c=i;if(1<h){c=Array(h);for(var a=0;a<h;a++)c[a]=arguments[a+2]}u.children=d(c)}else u.children=i;if(n&&n.defaultProps){var l=n.defaultProps;for(r in l)void 0===u[r]&&(u[r]=l[r])}return new v(n,e,f,u,s)}function y(n,t,i){for(var r=0,u=n&&n.length;r<u;r++)n[r].call(t,i)}var t=[],i=[],s=setTimeout;function r(n){0===t.length&&s(o),t.push(n)}function o(){var n;while(n=t.shift())n()}function l(n){0===i.length&&s(w),i.push(n)}function w(){var n;while(n=i.shift())n()}var h={}.hasOwnProperty;function b(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function C(n,t){if(b(n,t))return!0;if(!u(n)||A(n)||!u(t)||A(t))return!1;var i=Object.keys(n);if(i.length!==Object.keys(t).length)return!1;for(var r=0;r<i.length;r++)if(!h.call(t,i[r])||!b(n[i[r]],t[i[r]]))return!1;return!0}var g="_internal",D="_instance",H="_nativeNode",j="_renderedComponent";function k(){return x.owner&&x.owner[D]}function I(){var n=k();if(n)return n;_(1)}function E(n,t){if(A(t)||n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(!b(n[i],t[i]))return!1;return!0}function O(n){var r=I(),u=r.getHookID(),e=r.getHooks();if(!e[u]){m(n)&&(n=n());e[u]=[n,function(n){x.t||w();var t=e[u],i=t[2];m(n)&&(n=n(i)),b(n,i)||(t[2]=n,k()===r?r.i=!0:r.r())},n]}var t=e[u];return b(t[0],t[2])||(t[0]=t[2],r.u=!0),t}function R(n,t){c(n,t)}function c(n,t,r){var i=I(),u=i.getHookID(),e=i.getHooks();if(t=void 0===t?null:t,e[u]){var f=e[u],s=f.e,o=f.f;f.f=t,f.s=o,s.current=n}else{var h=function n(t){if(!t&&r)return l(function(){return n(!0)});var i=n.current;i&&(c.current=i(),n.current=null)},c=function n(t){if(!t&&r)return l(function(){return n(!0)});var i=n.current;i&&(i(),n.current=null)};h.current=n,e[u]={e:h,o:c,s:t,f:t},i.didMount.push(h),i.willUnmount.push(c),i.didUpdate.push(function(){var n=e[u],t=n.f,i=n.e;null!=t&&E(t,n.s)||(c(),i())})}}function P(n,t){var i=I(),r=i.getHookID(),u=i.getHooks();if(t=void 0===t?null:t,u[r]){var e=u[r][1];!A(t)&&E(t,e)||(u[r]=[n(),t])}else u[r]=[n(),t];return u[r][0]}function M(n){return S(n)?n:[n]}function N(n,t){var i;while(n&&n[g]){if(t(n)){i=n;break}n=n[g].h}return i}var n=0;function U(n,t){n.prototype=Object.create(t.prototype),(n.prototype.constructor=n).__proto__=t}var F=function(){function n(n){this.c=n}var t=n.prototype;return t.a=function(n,t,i){this._parent=n,this.h=t,this._context=i,this._mountID=x.n++},t.l=function(){this.c=this[H]=this._parent=this.h=this._context=null,this[D]&&(this[D]=this[D][g]=null)},t.v=function(n,t,i,r){this.a(n,t,i),this.d(r);var u={};return u[g]=this,u},t.unmountComponent=function(n){this[H]&&!n&&x.driver.removeChild(this[H],this._parent),this.l()},t._=function(){var n=this.c,t=n&&n.type;return t&&t.displayName||t&&t.name||t||n},t.d=function(n){var t=this.p(),i=this._parent;n?n(t,i):x.driver.appendChild(t,i)},t.p=function(){return null==this[H]?this[H]=this.w():this[H]},t.m=function(){return this.p()},n}(),L=function(n){function t(){return n.apply(this,arguments)||this}return U(t,n),t.prototype.w=function(){return x.driver.createEmpty(this)},t}(F);function T(n,t,i){var r=n?n.ref:null,u=t?t.ref:null;r!==u&&(r&&Z(n._owner,r,i),u&&V(t._owner,u,i))}function V(n,t,i){n||_(3);var r=i.m();m(t)?t(r):u(t)?t.current=r:n[D].refs[t]=r}function Z(n,t,i){if(m(t))t(null);else{var r=i.m();u(t)&&t.current===r?t.current=null:n[D].refs[t]===r&&delete n[D].refs[t]}}function $(n){var t;return u(n)&&null!==n&&n.type?t=f(n.type)?new x.y(n):new x.b(n):f(n)||e(n)?t=new x.C(n+""):void 0===n||A(n)||!1===n||!0===n?t=new x.g:S(n)?t=new x.j(n):q(),t}function q(){_(2)}function z(n,t){var i=A(n),r=A(t);return i||r?i===r:!(!S(n)||!S(t))||(f(n)||e(n)?f(t)||e(t):u(n)&&u(t)&&n.type===t.type&&n.key===t.key)}function B(n,t,i){var r=t&&t.key,u="."+i.toString(36);if(f(r)){var e="$"+r;return void 0===n[e]?e:u}return u}function G(n){var t=n;while(t=n.h&&n.h[g])if(t instanceof x.b)n=t;else{for(var i=Object.keys(t.k),r=n.I-1;0<=r;r--){var u=t.k[i[r]].p();if(!S(u))return u;if(0<u.length)return u[u.length-1]}if(!(t instanceof x.j))return null;n=t}}var J=function(){function n(n,t){this.props=n,this.context=t,this.refs={}}var t=n.prototype;return t.setState=function(n,t){this.updater.setState(this,n,t)},t.forceUpdate=function(n){this.updater.forceUpdate(this,n)},n}(),K=function(t){function n(){var n;return(n=t.apply(this,arguments)||this).O=!0,n}return U(n,t),n}(J),Q=1,W=function(t){function n(){var n;return(n=t.call(this)||this).R=[],n.P=Q++,n}U(n,t);var i=n.prototype;return i.m=function(){return this.x().m()},i.x=function(){return this[g][j]},i.r=function(n){this.R=n,this.forceUpdate()},i.render=function(){return this.R},n}(J),X={set:function(n,t){n._r||(n._r=t).P&&(x.rootInstances[t.P]=t,x.rootComponents[t.P]=t[g])},get:function(n){return n._r},remove:function(n){var t=this.get(n);t&&(n._r=null,t.P&&(delete x.rootComponents[t.P],delete x.rootInstances[t.P]))},mount:function(n,t,i){var r=i.parent,u=i.hydrate,e=x.driver;null==t&&(t=e.createBody());var f,s={element:n,container:t,hydrate:u};if(e.beforeRender&&e.beforeRender(s),r){var o=r[g];f=o.A(o._context)}var h=this.get(t);if(h&&h.P)return f&&(h[g].S=f),h.r(n),h;var c=$(a(W)).v(t,null,f||{});return this.set(t,c),c.r(n),e.afterRender&&e.afterRender(s),c}},Y=Object.assign,nn="style",tn="children",rn=/^on[A-Z]/,un=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r){this.a(n,t,i);var u=this.c,e=u.props,f=u.type,s=e[tn],o=e.append||"tree";this.D=Y({},e[nn]);var h={type:f,props:e};if((h[g]=this)[D]=h,"tree"===o){var c,a=[];this.H(s,i,a),this.d(r);while(c=a.pop())c()}else this.d(r),this.H(s,i);return u&&u.ref&&V(u._owner,u.ref,this),h},i.H=function(n,t,i){if(null==n)return n;var r=this.p();return this.M(r,M(n),t,null,i)},i.M=function(n,t,i,r,u){for(var e=this.k={},f=[],s=0,o=t.length;s<o;s++){var h=t[s],c=$(h);(e[B(e,h,s)]=c).I=s;var a=c.v(n,this[D],i,r,u);f.push(a)}return f},i.N=function(n){var t=this.k;if(t){for(var i in t){t[i].unmountComponent(n)}this.k=null}},i.unmountComponent=function(n){if(this[H]){var t=this.c.ref;t&&Z(this.c._owner,t,this),X.remove(this[H]),n||x.driver.removeChild(this[H],this._parent)}this.N(!0),this.D=null,this.l()},i.U=function(n,t,i,r){T(n,this.c=t,this);var u=n.props,e=t.props;this.F(u,e),null==u[tn]||S(u[tn])&&0===u[tn].length?this.H(e[tn],r):this.L(e[tn],r)},i.F=function(n,t){var i,r,u,e=x.driver,f=this.p();for(i in n)if(i!==tn&&null!=n[i]&&!t.hasOwnProperty(i))if(i===nn){var s=this.D;for(r in s)(u=u||{})[r]="";this.D=null}else if(rn.test(i)){var o=n[i];m(o)&&e.removeEventListener(f,i.slice(2).toLowerCase(),o)}else e.removeAttribute(f,i,n[i]);for(i in t){var h=t[i],c=i===nn?this.D:null!=n?n[i]:void 0;if(i!==tn&&c!==h&&(null!=h||null!=c))if(i===nn)if(h?h=this.D=Y({},h):this.D=null,null!=c){for(r in c)h&&(h[r]||0===h[r])||((u=u||{})[r]="");for(r in h)c[r]!==h[r]&&((u=u||{})[r]=h[r])}else u=h;else if(rn.test(i)){var a=i.slice(2).toLowerCase();m(c)&&e.removeEventListener(f,a,c,t),m(h)&&e.addEventListener(f,a,h,t)}else null!=h?e.setAttribute(f,i,h):e.removeAttribute(f,i,n[i])}u&&e.setStyle(f,u)},i.L=function(n,t){var i=this.k,u=x.driver;if(null!=n||null!=i){var r={};if(null!=n)for(var e=0,f=(n=M(n)).length;e<f;e++){var s=n[e],o=B(r,s,e),h=i&&i[o],c=h&&h.c,a=h&&h._context;r[o]=null!=h&&z(c,s)?(c===s&&a===t||h.U(c,s,t,t),h):(h&&(h.T=!0),$(s))}var l=this.p(),v=S(l),d=null,_=null,p=!1,w=!1,m=null,y=!(!u.removeChildren||!(A(n)||n&&!n.length));if(null!=i){for(var b in i){var C=i[b],g=C.T||!r[b];d?g&&C.unmountComponent(y):(w=g,S(_=(d=C).p())&&(p=0===_.length,_=_[0]))}(v&&0===l.length||p)&&(m=G(this))}if(null!=r){var j=function(n,t){for(var i=0,r=(n=M(n)).length;i<r;i++)m?u.insertAfter(n[r-i-1],m):_?u.insertBefore(n[i],_):t&&u.appendChild(n[i],t)},k=0,I=[];for(var E in r){var O=r[E],R=i&&i[E];if(R===O){var P=R.p();R.I!==k&&j(P)}else v&&(l=this._parent),O.v(l,this[D],t,j);O.I=k++,S(m=O.p())?(I=I.concat(m),m=m[m.length-1]):I.push(m)}S(this[H])&&(this[H].length=0,Y(this[H],I))}w&&d.unmountComponent(y),y&&u.removeChildren(this[H]),this.k=r}},i.w=function(){var n=this[D],t=x.driver.createElement(n.type,n.props,this);return X.set(t,n),t},t}(F),en=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.U=function(n,t){n!==(t=""+t)&&(this.c=t,x.driver.updateText(this.p(),t))},i.w=function(){return x.driver.createText(this.c,this)},t}(F),fn=function(i){function n(n,t){var r;(r=i.call(this)||this).V=!0,r.Z=n,r.$=0,r.q=0,r.z={},r.i=!1,r.u=!1,r.B=null,r.G={},r.didMount=[],r.didUpdate=[],r.willUnmount=[],r.state={},n.J&&(r.K=r.J=t);var u=n.Q;return u&&(r.shouldComponentUpdate=function(n){for(var t=!0,i=u.length-1;-1<i;i--)if(t=u[i](r.props,n))break;return!t||r.K!==r.J}),r}U(n,i);var t=n.prototype;return t.getHooks=function(){return this.z},t.getHookID=function(){return++this.$},t.useContext=function(n){var t=this,i=n._contextID,r=this.G[i];function u(){return r.W?r.W.getValue():n._defaultValue}if(!r){var e=n.X(this);if(r=this.G[i]={W:e},e){var f=function(){r.Y!==u()&&(t.u=!0,t.r())};e.nn(f),this.willUnmount.push(function(){return e.tn(f)})}}return r.Y=u()},t.componentWillMount=function(){this.u=!0},t.componentDidMount=function(){y(this.didMount)},t.componentWillReceiveProps=function(){this.u=!0},t.componentDidUpdate=function(){y(this.didUpdate)},t.componentWillUnmount=function(){y(this.willUnmount)},t.r=function(){this[g].in=!0,this.setState({})},t.render=function(){this.$=0,this.q=0,this.i=!1;var n=this.Z(this.props,this.J?this.J:this.context);while(this.i)this.q++,24<this.q&&_(4),this.$=0,this.i=!1,n=this.Z(this.props,this.J?this.J:this.context);return this.u&&(this.B=n,this.u=!1),this.B},n}(J),sn=[];function on(n){return n.rn}function hn(n,t){return n.rn=t}function cn(n){return n.un}function an(n){var t=n[g];if(t){x.t=!0;var i=on(t);hn(t,null);var r=t.c,u=t._context,e=t.S||u;t.S=void 0,(cn(t)||t.in)&&t.U(r,r,u,e),y(i,n),x.t=!1}}function ln(n,t){return t[g]._mountID-n[g]._mountID}function vn(){if(x.t)return r(vn);var n,t=sn;if(0<t.length){w(),sn=[],1<t.length&&(t=t.sort(ln));while(n=t.pop())an(n)}}function dn(n,t){if(sn.indexOf(n)<0&&sn.push(n),t){if(1<sn.length)return;r(vn)}else vn()}function _n(n,t,i){var r=n[g];if(r){var u,e;i&&(e=i,(on(u=r)||hn(u,[])).push(e));var f,s,o=r[j];t?(s=t,(cn(f=r)||(f.un=[])).push(s),!r.en&&o&&dn(n,!0)):(r.in=!0,o&&dn(n))}}var pn={setState:function(n,t,i){x.t||w(),_n(n,t,i)},forceUpdate:function(n,t){_n(n,null,t)},runCallbacks:y};function wn(n,t,i){try{return n()}catch(n){i?i(n):mn(t,n)}}function mn(n,t){var i=N(n,function(n){return n.componentDidCatch});if(i){var r=i[g];if(r)(r.rn||(r.rn=[])).push(function(){return i.componentDidCatch(t)})}else s(function(){throw t},0)}var yn=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r,u){this.a(n,t,i);var e,f,s=this.c,o=s.type,h=s.ref,c=s.props,a=o.prototype,l=this.fn(i);try{a&&a.render?e=new o(c,l):m(o)?e=new fn(o,h):q()}catch(n){return mn(t,n)}e.props=c,e.context=l,e.refs={},e.updater=pn;var v=((e[g]=this)[D]=e).state;void 0===v&&(e.state=v=null);var d=null,_=function(n){d=n};if(e.componentWillMount&&wn(function(){e.componentWillMount()},e,_),null==f&&(e.state=(x.owner=this).sn(c,l),wn(function(){f=e.render()},e,_),x.owner=null),this[j]=$(f),this[j].v(this._parent,e,this.A(i),r,u),d&&mn(e,d),!s.type.J&&h&&V(s._owner,h,this),e.componentDidMount){var p=function(){wn(function(){e.componentDidMount()},e)};u?u.push(p):p()}var w=this.rn;return w&&(this.rn=null,y(w,e)),e},i.unmountComponent=function(n){var t=this[D];if(t&&t.componentWillUnmount&&wn(function(){t.componentWillUnmount()},t),null!=this[j]){var i=this.c,r=i.ref;!i.type.J&&r&&Z(i._owner,r,this),this[j].unmountComponent(n),this[j]=null}this.un=null,this.in=!1,this.l()},i.fn=function(n){var t={},i=this.c.type.contextTypes;if(i)for(var r in i)t[r]=n[r];return t},i.A=function(n){var t=this[D],i=t.getChildContext&&t.getChildContext();return i?Y({},n,i):n},i.sn=function(n,t){var i=this[D],r=this.un;if(!r)return i.state;this.un=null;for(var u=Y({},i.state),e=0;e<r.length;e++){var f=r[e];Y(u,m(f)?f.call(i,u,n,t):f)}return u},i.U=function(n,t,i,r){var u=this[D];if(u){var e,f,s;this._context===r?f=u.context:(f=this.fn(r),e=!0),s=t.props,n!==t&&(e=!0),e&&u.componentWillReceiveProps&&(this.en=!0,wn(function(){u.componentWillReceiveProps(s,f)},u),this.en=!1),this.c.type.J?(u.K=n.ref,u.J=t.ref):T(n,t,this);var o=!0,h=u.props,c=u.state,a=this.sn(s,f);if(this.in||(u.shouldComponentUpdate?o=wn(function(){return u.shouldComponentUpdate(s,a,f)},u):u.O&&(o=!C(h,s)||!C(c,a))),o){this.in=!1;var l=u.context;u.componentWillUpdate&&wn(function(){u.componentWillUpdate(s,a,f)},u),this.c=t,this._context=r,u.props=s,u.state=a,u.context=f,this.on(r),u.componentDidUpdate&&wn(function(){u.componentDidUpdate(h,c,l)},u)}else this.c=t,this._context=r,u.props=s,u.state=a,u.context=f;var v=this.rn;v&&(this.rn=null,y(v,u))}},i.on=function(n){var t,i=this[j],r=i.c,u=this[D];if(x.owner=this,wn(function(){t=u.render()},u),x.owner=null,z(r,t)){var e=i._context,f=this.A(n);r===t&&e===f||i.U(r,t,e,f)}else{var s=null,o=i.p();S(o)&&0===o.length&&null==u.P&&(s=G(i)),i.unmountComponent(!0),this[j]=$(t),this[j].v(this._parent,u,this.A(n),function(n,t){o=M(o),n=M(n);for(var i=x.driver,r=0;r<n.length;r++){var u=n[r];o[r]?i.replaceChild(u,o[r]):s?i.insertAfter(u,s):i.appendChild(u,t),s=u}for(var e=n.length;e<o.length;e++)i.removeChild(o[e])})}},i.p=function(){var n=this[j];if(n)return n.p()},i.m=function(){var n=this[D];return n.V?null:n},t}(F),bn=function(n){function t(){return n.apply(this,arguments)||this}U(t,n);var i=t.prototype;return i.v=function(n,t,i,r){this.a(n,t,i);var u=this[D]={},e=[];(u[g]=this).H(this.c,i,e);var f,s=this.p();if(r)r(s,n);else for(var o=0;o<s.length;o++)x.driver.appendChild(s[o],n);while(f=e.pop())f();return u},i.H=function(n,t,i){var r=this.p();return this.M(this._parent,n,t,function(n){n=M(n);for(var t=0;t<n.length;t++)r.push(n[t])},i)},i.unmountComponent=function(n){var t=this[H];if(t&&(X.remove(t),!n))for(var i=0,r=t.length;i<r;i++)x.driver.removeChild(t[i]);this.N(!0),this.l()},i.U=function(n,t,i,r){this.c=t,this.L(this.c,r)},i.w=function(){return[]},t}(un);var Cn={createElement:a,createContext:function(o){var h="_c"+n++;function c(n){return N(n,function(n){return n.hn===h})}return{Provider:function(){function n(){this.hn=h,this.cn=[]}var t=n.prototype;return t.nn=function(n){this.cn.push(n)},t.tn=function(t){this.cn=this.cn.filter(function(n){return n!==t})},t._getChildContext=function(){var n;return(n={})[h]=this,n},t.getValue=function(){return void 0!==this.props.value?this.props.value:o},t.componentDidUpdate=function(n){this.props.value!==n.value&&y(this.cn,null,this.getValue())},t.render=function(){return this.props.children},n}(),Consumer:function(n,t){var i=this,r=O(function(){return t[h]||c(i)})[0],u=r?r.getValue():o,e=O(u),f=e[1];if(u===e[0]){R(function(){if(r)return r.nn(f),function(){r.tn(f)}},[]);var s=M(n.children)[0];return m(s)?s(u):void 0}f(u)},_contextID:h,_defaultValue:o,X:c}},createRef:function(){return{current:null}},forwardRef:function(n){return n.J=!0,n},memo:function(n,t){return t=t||C,n.Q?n.Q.push(t):n.Q=[t],n},Fragment:function(n){return n.children},render:function(n,t,i,r){var u;m(i)&&(r=i,i=null),u=(i=i||{}).driver,x.g=L,x.y=un,x.C=en,x.j=bn,x.b=yn,(x.driver=u||x.driver)||_(5);var e=X.mount(n,t,i).m();return r&&r.call(e),e},Component:J,version:"1.0.13",shared:{Host:x,Instance:X,Element:v,flattenChildren:d},useState:O,useContext:function(n){return I().useContext(n)},useEffect:function(n,t){c(n,t,!0)},useLayoutEffect:R,useRef:function(n){var t=I(),i=t.getHookID(),r=t.getHooks();return r[i]||(r[i]={current:n}),r[i]},useCallback:function(n,t){return P(function(){return n},t)},useMemo:P,useReducer:function(n,t,i){var u=I(),e=u.getHookID(),f=u.getHooks(),r=f[e];if(!r){var s=m(i)?i(t):t;return f[e]=[s,function(n){x.t||w();var t=f[e][2];if(k()===u)t.an.push(n),u.i=!0;else{var i=t.ln,r=(0,t.vn)(i,n);if(b(r,i))return;t.ln=r,t.an.push(n),u.r()}},{an:[],vn:n,ln:s}]}var o=r[2],h=r[0];if(0<u.q)for(var c=0;c<o.an.length;c++)h=n(h,o.an[c]);else h=o.ln;return b(h,r[0])||(r[0]=h,u.u=!0),o.vn=n,o.ln=h,o.an.length=0,f[e]},useImperativeHandle:function(n,t,i){R(function(){return m(n)?(n(t()),function(){return n(null)}):null!=n?(n.current=t(),function(){n.current=null}):void 0},S(i)?i.concat([n]):null)},PureComponent:K};"undefined"!=typeof module?module.exports=Cn:self.Rax=Cn}();
//# sourceMappingURL=rax.min.js.map

@@ -106,3 +106,3 @@ "use strict";

_proto.__mountComponent = function __mountComponent(parent, parentInstance, context, nativeNodeMounter) {
_proto.__mountComponent = function __mountComponent(parent, parentInstance, context, nativeNodeMounter, didMountWorks) {
var _this = this;

@@ -201,3 +201,3 @@

this[_constant.RENDERED_COMPONENT].__mountComponent(this._parent, instance, this.__processChildContext(context), nativeNodeMounter);
this[_constant.RENDERED_COMPONENT].__mountComponent(this._parent, instance, this.__processChildContext(context), nativeNodeMounter, didMountWorks);

@@ -213,11 +213,15 @@ if (error) {

if (instance.componentDidMount) {
performInSandbox(function () {
if (process.env.NODE_ENV !== 'production') {
measureLifeCycle(function () {
var didMount = function didMount() {
performInSandbox(function () {
if (process.env.NODE_ENV !== 'production') {
measureLifeCycle(function () {
instance.componentDidMount();
}, _this._mountID, 'componentDidMount');
} else {
instance.componentDidMount();
}, _this._mountID, 'componentDidMount');
} else {
instance.componentDidMount();
}
}, instance);
}
}, instance);
};
didMountWorks ? didMountWorks.push(didMount) : didMount();
} // Trigger setState callback in componentWillMount or boundary callback after rendered

@@ -224,0 +228,0 @@

@@ -40,4 +40,6 @@ "use strict";

this.__mountChildren(this.__currentElement, context);
var didMountWorks = [];
this.__mountChildren(this.__currentElement, context, didMountWorks);
var fragment = this.__getNativeNode();

@@ -53,2 +55,8 @@

var work;
while (work = didMountWorks.pop()) {
work();
}
if (process.env.NODE_ENV !== 'production') {

@@ -63,3 +71,3 @@ this.__currentElement.type = FragmentComponent;

_proto.__mountChildren = function __mountChildren(children, context) {
_proto.__mountChildren = function __mountChildren(children, context, didMountWorks) {
var fragment = this.__getNativeNode();

@@ -73,3 +81,3 @@

}
});
}, didMountWorks);
};

@@ -76,0 +84,0 @@

@@ -73,5 +73,13 @@ "use strict";

// Should after process children when mount by tree mode
this.__mountChildren(children, context);
var didMountWorks = [];
this.__mountChildren(children, context, didMountWorks);
this.__mountNativeNode(nativeNodeMounter);
var work;
while (work = didMountWorks.pop()) {
work();
}
} else {

@@ -96,3 +104,3 @@ // Should before process children when mount by node mode

_proto.__mountChildren = function __mountChildren(children, context) {
_proto.__mountChildren = function __mountChildren(children, context, didMountWorks) {
if (children == null) return children;

@@ -102,6 +110,6 @@

return this.__mountChildrenImpl(nativeNode, (0, _toArray.default)(children), context);
return this.__mountChildrenImpl(nativeNode, (0, _toArray.default)(children), context, null, didMountWorks);
};
_proto.__mountChildrenImpl = function __mountChildrenImpl(parent, children, context, nativeNodeMounter) {
_proto.__mountChildrenImpl = function __mountChildrenImpl(parent, children, context, nativeNodeMounter, didMountWorks) {
var renderedChildren = this.__renderedChildren = {};

@@ -117,3 +125,3 @@ var renderedChildrenImage = [];

var mountImage = renderedChild.__mountComponent(parent, this[_constant.INSTANCE], context, nativeNodeMounter);
var mountImage = renderedChild.__mountComponent(parent, this[_constant.INSTANCE], context, nativeNodeMounter, didMountWorks);

@@ -150,10 +158,7 @@ renderedChildrenImage.push(mountImage);

if (!shouldNotRemoveChild) {
_host.default.driver.removeChild(this[_constant.NATIVE_NODE], this._parent); // If the parent node has been removed, child node don't need to be removed
shouldNotRemoveChild = true;
_host.default.driver.removeChild(this[_constant.NATIVE_NODE], this._parent);
}
}
this.__unmountChildren(shouldNotRemoveChild);
this.__unmountChildren(true);

@@ -160,0 +165,0 @@ this.__prevStyleCopy = null;

@@ -5,3 +5,3 @@ "use strict";

exports.default = void 0;
var _default = '1.0.12';
var _default = '1.0.13';
exports.default = _default;
{
"name": "rax",
"version": "1.0.12",
"version": "1.0.13",
"description": "A universal React-compatible render engine.",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -497,9 +497,9 @@ /* @jsx createElement */

'render1',
'componentDidMount1',
'componentWillMount2',
'render2',
'componentDidMount2',
'componentWillMount3',
'render3',
'componentDidMount3',
'componentDidMount2',
'componentDidMount1',
'componentDidMountErrorBoundary',

@@ -537,2 +537,46 @@ 'componentWillUnmount1',

it('render component that componentDidMount could get mounted DOM', () => {
let container = createNodeElement('div');
class Child extends Component {
componentDidMount() {
expect(container.childNodes[0].tagName).toBe('DIV');
}
render() {
return <div />;
}
}
class App extends Component {
render() {
return <Child />;
}
}
const instance = render(<App />, container);
jest.runAllTimers();
expect(container.childNodes[0].tagName).toBe('DIV');
});
it('render with fragment that componentDidMount could get mounted DOM', () => {
let container = createNodeElement('div');
class Child extends Component {
componentDidMount() {
expect(container.childNodes[0].tagName).toBe('DIV');
}
render() {
return <div />;
}
}
class App extends Component {
render() {
return [
<Child key="1" />
];
}
}
const instance = render(<App />, container);
jest.runAllTimers();
expect(container.childNodes[0].tagName).toBe('DIV');
});
it('schedules sync updates when inside componentDidMount/Update', () => {

@@ -539,0 +583,0 @@ let container = createNodeElement('div');

@@ -62,3 +62,3 @@ import ReactiveComponent from './reactive';

class CompositeComponent extends BaseComponent {
__mountComponent(parent, parentInstance, context, nativeNodeMounter) {
__mountComponent(parent, parentInstance, context, nativeNodeMounter, didMountWorks) {
this.__initComponent(parent, parentInstance, context);

@@ -160,3 +160,4 @@

this.__processChildContext(context),
nativeNodeMounter
nativeNodeMounter,
didMountWorks
);

@@ -173,11 +174,14 @@

if (instance.componentDidMount) {
performInSandbox(() => {
if (process.env.NODE_ENV !== 'production') {
measureLifeCycle(() => {
const didMount = () => {
performInSandbox(() => {
if (process.env.NODE_ENV !== 'production') {
measureLifeCycle(() => {
instance.componentDidMount();
}, this._mountID, 'componentDidMount');
} else {
instance.componentDidMount();
}, this._mountID, 'componentDidMount');
} else {
instance.componentDidMount();
}
}, instance);
}
}, instance);
};
didMountWorks ? didMountWorks.push(didMount) : didMount();
}

@@ -184,0 +188,0 @@

@@ -18,3 +18,4 @@ import Host from './host';

// Mount children
this.__mountChildren(this.__currentElement, context);
const didMountWorks = [];
this.__mountChildren(this.__currentElement, context, didMountWorks);

@@ -31,2 +32,7 @@ let fragment = this.__getNativeNode();

let work;
while (work = didMountWorks.pop()) {
work();
}
if (process.env.NODE_ENV !== 'production') {

@@ -40,3 +46,3 @@ this.__currentElement.type = FragmentComponent;

__mountChildren(children, context) {
__mountChildren(children, context, didMountWorks) {
let fragment = this.__getNativeNode();

@@ -49,3 +55,3 @@

}
});
}, didMountWorks);
}

@@ -52,0 +58,0 @@

@@ -45,4 +45,9 @@ import Host from './host';

// Should after process children when mount by tree mode
this.__mountChildren(children, context);
const didMountWorks = [];
this.__mountChildren(children, context, didMountWorks);
this.__mountNativeNode(nativeNodeMounter);
let work;
while (work = didMountWorks.pop()) {
work();
}
} else {

@@ -66,10 +71,10 @@ // Should before process children when mount by node mode

__mountChildren(children, context) {
__mountChildren(children, context, didMountWorks) {
if (children == null) return children;
const nativeNode = this.__getNativeNode();
return this.__mountChildrenImpl(nativeNode, toArray(children), context);
return this.__mountChildrenImpl(nativeNode, toArray(children), context, null, didMountWorks);
}
__mountChildrenImpl(parent, children, context, nativeNodeMounter) {
__mountChildrenImpl(parent, children, context, nativeNodeMounter, didMountWorks) {
let renderedChildren = this.__renderedChildren = {};

@@ -89,3 +94,4 @@

context,
nativeNodeMounter
nativeNodeMounter,
didMountWorks
);

@@ -121,9 +127,6 @@ renderedChildrenImage.push(mountImage);

Host.driver.removeChild(this[NATIVE_NODE], this._parent);
// If the parent node has been removed, child node don't need to be removed
shouldNotRemoveChild = true;
}
}
this.__unmountChildren(shouldNotRemoveChild);
this.__unmountChildren(true);

@@ -130,0 +133,0 @@ this.__prevStyleCopy = null;

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

export default '1.0.12';
export default '1.0.13';

Sorry, the diff of this file is too big to display

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 too big to display

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