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

inferno-hydrate

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno-hydrate - npm Package Compare versions

Comparing version 6.0.0-alpha.1 to 6.0.0-alpha.2

24

dist/index.cjs.js

@@ -18,5 +18,2 @@ 'use strict';

}
function isString(o) {
return typeof o === 'string';
}
function isNull(o) {

@@ -164,12 +161,3 @@ return o === null;

}
if (isFunction(ref)) {
inferno._MR(dom, ref);
}
else {
{
if (isString(ref)) {
throwError('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.');
}
}
}
inferno._MR(ref, dom);
}

@@ -224,11 +212,11 @@ return vNode.dom;

}
function hydrate(input, parentDom, callback) {
var dom = parentDom.firstChild;
function hydrate(input, parentDOM, callback) {
var dom = parentDOM.firstChild;
if (!isNull(dom)) {
if (!isInvalid(input)) {
dom = hydrateVNode(input, parentDom, dom, {}, false);
dom = hydrateVNode(input, parentDOM, dom, {}, false);
}
// clear any other DOM nodes, there should be only a single entry for the root
while (dom && (dom = dom.nextSibling)) {
parentDom.removeChild(dom);
parentDOM.removeChild(dom);
}

@@ -242,3 +230,3 @@ }

}
parentDom.$V = input;
parentDOM.$V = input;
if (isFunction(callback)) {

@@ -245,0 +233,0 @@ callback();

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var v=require("inferno"),n="a runtime error occured! Use Inferno in development environment to find the error.",e=!("undefined"==typeof window||!window.document);function a(e){return t(e)||g(e)}function l(e){return g(e)||!1===e||r(e)||t(e)}function f(e){return"function"==typeof e}function g(e){return null===e}function r(e){return!0===e}function t(e){return void 0===e}function i(e){throw e||(e=n),new Error("Inferno Error: "+e)}function o(e,n){var r=document.createElement("i");return r.innerHTML=n,r.innerHTML===e.innerHTML}function p(e,n){return Boolean(n&&n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html&&o(e,n.dangerouslySetInnerHTML.__html))}function u(e,n,r,t,o,l){var i,u=e.type,d=e.ref,a=e.props||{};if(l){var f=v._CI(e,u,a,t);i=C(f.$LI,n,r,f.$CX,o),v._MCCC(d,f),f.$UPD=!1}else{var s=v._HI(u(a,t));i=C(s,n,r,t,o),e.children=s,v._MFCC(a,d,e)}return i}function s(e,n,r,t,o){var l=e.childFlags,i=e.children,u=e.props,d=e.flags;if(1!==l){var a;if(2===l)g(r)?v._M(i,n,t,o,null):(a=r.nextSibling,r=(r=C(i,n,r,t,o))?r.nextSibling:a);else if(16===l)g(r)?n.appendChild(document.createTextNode(i)):1!==n.childNodes.length||3!==r.nodeType?n.textContent=i:r.nodeValue!==i&&(r.nodeValue=i),r=null;else if(12&l)for(var f=!1,s=0,c=i.length;s<c;s++){var m=i[s];g(r)||f&&0<(16&m.flags)?v._M(m,n,t,o,r):(a=r.nextSibling,r=(r=C(m,n,r,t,o))?r.nextSibling:a),f=0<(16&m.flags)}if(0==(8192&d))for(var h=null;r;)h=r.nextSibling,n.removeChild(r),r=h}else g(n.firstChild)||p(n,u)||(n.textContent="",448&d&&(n.defaultValue=""))}function d(e,n,r,t,o){var l=e.props,i=e.className,u=e.flags,d=e.ref;return o=o||0<(32&u),1!==r.nodeType||r.tagName.toLowerCase()!==e.type?(v._ME(e,null,t,o,null),n.replaceChild(e.dom,r)):(e.dom=r,s(e,r,r.firstChild,t,o),g(l)||v._MP(e,u,l,r,o),a(i)?""!==r.className&&r.removeAttribute("class"):o?r.setAttribute("class",i):r.className=i,f(d)&&v._MR(r,d)),e.dom}function c(e,n,r){if(3!==r.nodeType)v._MT(e,null,null),n.replaceChild(e.dom,r);else{var t=e.children;r.nodeValue!==t&&(r.nodeValue=t),e.dom=r}return e.dom}function m(e,n,r,t,o){var l=e.children;return 2===e.childFlags?(c(l,n,r),e.dom=l.dom):(s(e,n,r,t,o),e.dom=l[l.length-1].dom)}function C(e,n,r,t,o){var l=e.flags|=16384;return 14&l?u(e,n,r,t,o,0<(4&l)):481&l?d(e,n,r,t,o):16&l?c(e,n,r):512&l?e.dom=r:8192&l?m(e,n,r,t,o):(i(),null)}function h(e,n,r){var t=n.firstChild;if(!g(t))for(l(e)||(t=C(e,n,t,{},!1));t&&(t=t.nextSibling);)n.removeChild(t);if(0<v._L.length)for(var o;void 0!==(o=v._L.shift());)o();n.$V=e,f(r)&&r()}exports.hydrate=h;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var v=require("inferno"),n="a runtime error occured! Use Inferno in development environment to find the error.",e=!("undefined"==typeof window||!window.document);function a(e){return t(e)||g(e)}function l(e){return g(e)||!1===e||r(e)||t(e)}function i(e){return"function"==typeof e}function g(e){return null===e}function r(e){return!0===e}function t(e){return void 0===e}function u(e){throw e||(e=n),new Error("Inferno Error: "+e)}function o(e,n){var r=document.createElement("i");return r.innerHTML=n,r.innerHTML===e.innerHTML}function p(e,n){return Boolean(n&&n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html&&o(e,n.dangerouslySetInnerHTML.__html))}function d(e,n,r,t,o,l){var i,u=e.type,d=e.ref,a=e.props||{};if(l){var f=v._CI(e,u,a,t);i=C(f.$LI,n,r,f.$CX,o),v._MCCC(d,f),f.$UPD=!1}else{var s=v._HI(u(a,t));i=C(s,n,r,t,o),e.children=s,v._MFCC(a,d,e)}return i}function f(e,n,r,t,o){var l=e.childFlags,i=e.children,u=e.props,d=e.flags;if(1!==l){var a;if(2===l)g(r)?v._M(i,n,t,o,null):(a=r.nextSibling,r=(r=C(i,n,r,t,o))?r.nextSibling:a);else if(16===l)g(r)?n.appendChild(document.createTextNode(i)):1!==n.childNodes.length||3!==r.nodeType?n.textContent=i:r.nodeValue!==i&&(r.nodeValue=i),r=null;else if(12&l)for(var f=!1,s=0,c=i.length;s<c;s++){var m=i[s];g(r)||f&&0<(16&m.flags)?v._M(m,n,t,o,r):(a=r.nextSibling,r=(r=C(m,n,r,t,o))?r.nextSibling:a),f=0<(16&m.flags)}if(0==(8192&d))for(var h=null;r;)h=r.nextSibling,n.removeChild(r),r=h}else g(n.firstChild)||p(n,u)||(n.textContent="",448&d&&(n.defaultValue=""))}function s(e,n,r,t,o){var l=e.props,i=e.className,u=e.flags,d=e.ref;return o=o||0<(32&u),1!==r.nodeType||r.tagName.toLowerCase()!==e.type?(v._ME(e,null,t,o,null),n.replaceChild(e.dom,r)):(e.dom=r,f(e,r,r.firstChild,t,o),g(l)||v._MP(e,u,l,r,o),a(i)?""!==r.className&&r.removeAttribute("class"):o?r.setAttribute("class",i):r.className=i,v._MR(d,r)),e.dom}function c(e,n,r){if(3!==r.nodeType)v._MT(e,null,null),n.replaceChild(e.dom,r);else{var t=e.children;r.nodeValue!==t&&(r.nodeValue=t),e.dom=r}return e.dom}function m(e,n,r,t,o){var l=e.children;return 2===e.childFlags?(c(l,n,r),e.dom=l.dom):(f(e,n,r,t,o),e.dom=l[l.length-1].dom)}function C(e,n,r,t,o){var l=e.flags|=16384;return 14&l?d(e,n,r,t,o,0<(4&l)):481&l?s(e,n,r,t,o):16&l?c(e,n,r):512&l?e.dom=r:8192&l?m(e,n,r,t,o):(u(),null)}function h(e,n,r){var t=n.firstChild;if(!g(t))for(l(e)||(t=C(e,n,t,{},!1));t&&(t=t.nextSibling);)n.removeChild(t);if(0<v._L.length)for(var o;void 0!==(o=v._L.shift());)o();n.$V=e,i(r)&&r()}exports.hydrate=h;

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

export declare function hydrate(input: any, parentDom: Element, callback?: Function): void;
export declare function hydrate(input: any, parentDOM: Element, callback?: Function): void;

@@ -14,5 +14,2 @@ import { _CI, _HI, _L, _MT, _M, _MCCC, _ME, _MFCC, _MR, _MP } from 'inferno';

}
function isString(o) {
return typeof o === 'string';
}
function isNull(o) {

@@ -160,12 +157,3 @@ return o === null;

}
if (isFunction(ref)) {
_MR(dom, ref);
}
else {
{
if (isString(ref)) {
throwError('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.');
}
}
}
_MR(ref, dom);
}

@@ -220,11 +208,11 @@ return vNode.dom;

}
function hydrate(input, parentDom, callback) {
var dom = parentDom.firstChild;
function hydrate(input, parentDOM, callback) {
var dom = parentDOM.firstChild;
if (!isNull(dom)) {
if (!isInvalid(input)) {
dom = hydrateVNode(input, parentDom, dom, {}, false);
dom = hydrateVNode(input, parentDOM, dom, {}, false);
}
// clear any other DOM nodes, there should be only a single entry for the root
while (dom && (dom = dom.nextSibling)) {
parentDom.removeChild(dom);
parentDOM.removeChild(dom);
}

@@ -238,3 +226,3 @@ }

}
parentDom.$V = input;
parentDOM.$V = input;
if (isFunction(callback)) {

@@ -241,0 +229,0 @@ callback();

@@ -149,5 +149,3 @@ import { _CI, _HI, _L, _MT, _M, _MCCC, _ME, _MFCC, _MR, _MP } from 'inferno';

}
if (isFunction(ref)) {
_MR(dom, ref);
}
_MR(ref, dom);
}

@@ -199,11 +197,11 @@ return vNode.dom;

}
function hydrate(input, parentDom, callback) {
var dom = parentDom.firstChild;
function hydrate(input, parentDOM, callback) {
var dom = parentDOM.firstChild;
if (!isNull(dom)) {
if (!isInvalid(input)) {
dom = hydrateVNode(input, parentDom, dom, {}, false);
dom = hydrateVNode(input, parentDOM, dom, {}, false);
}
// clear any other DOM nodes, there should be only a single entry for the root
while (dom && (dom = dom.nextSibling)) {
parentDom.removeChild(dom);
parentDOM.removeChild(dom);
}

@@ -217,3 +215,3 @@ }

}
parentDom.$V = input;
parentDOM.$V = input;
if (isFunction(callback)) {

@@ -220,0 +218,0 @@ callback();

@@ -149,5 +149,3 @@ import { _CI, _HI, _L, _MT, _M, _MCCC, _ME, _MFCC, _MR, _MP } from 'inferno';

}
if (isFunction(ref)) {
_MR(dom, ref);
}
_MR(ref, dom);
}

@@ -199,11 +197,11 @@ return vNode.dom;

}
function hydrate(input, parentDom, callback) {
let dom = parentDom.firstChild;
function hydrate(input, parentDOM, callback) {
let dom = parentDOM.firstChild;
if (!isNull(dom)) {
if (!isInvalid(input)) {
dom = hydrateVNode(input, parentDom, dom, {}, false);
dom = hydrateVNode(input, parentDOM, dom, {}, false);
}
// clear any other DOM nodes, there should be only a single entry for the root
while (dom && (dom = dom.nextSibling)) {
parentDom.removeChild(dom);
parentDOM.removeChild(dom);
}

@@ -217,3 +215,3 @@ }

}
parentDom.$V = input;
parentDOM.$V = input;
if (isFunction(callback)) {

@@ -220,0 +218,0 @@ callback();

@@ -18,5 +18,2 @@ (function (global, factory) {

}
function isString(o) {
return typeof o === 'string';
}
function isNull(o) {

@@ -164,12 +161,3 @@ return o === null;

}
if (isFunction(ref)) {
inferno._MR(dom, ref);
}
else {
{
if (isString(ref)) {
throwError('string "refs" are not supported in Inferno 1.0. Use callback "refs" instead.');
}
}
}
inferno._MR(ref, dom);
}

@@ -224,11 +212,11 @@ return vNode.dom;

}
function hydrate(input, parentDom, callback) {
var dom = parentDom.firstChild;
function hydrate(input, parentDOM, callback) {
var dom = parentDOM.firstChild;
if (!isNull(dom)) {
if (!isInvalid(input)) {
dom = hydrateVNode(input, parentDom, dom, {}, false);
dom = hydrateVNode(input, parentDOM, dom, {}, false);
}
// clear any other DOM nodes, there should be only a single entry for the root
while (dom && (dom = dom.nextSibling)) {
parentDom.removeChild(dom);
parentDOM.removeChild(dom);
}

@@ -242,3 +230,3 @@ }

}
parentDom.$V = input;
parentDOM.$V = input;
if (isFunction(callback)) {

@@ -245,0 +233,0 @@ callback();

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("inferno")):"function"==typeof define&&define.amd?define(["exports","inferno"],n):n(e.Inferno=e.Inferno||{},e.Inferno)}(this,function(e,x){"use strict";var I="a runtime error occured! Use Inferno in development environment to find the error.";function T(e){return"function"==typeof e}function b(e){return null===e}function L(e){return void 0===e}function S(e,n,r,o,t){var l,i,d,f,u,a=e.childFlags,s=e.children,c=e.props,m=e.flags;if(1!==a){var h;if(2===a)b(r)?x._M(s,n,o,t,null):(h=r.nextSibling,r=(r=H(s,n,r,o,t))?r.nextSibling:h);else if(16===a)b(r)?n.appendChild(document.createTextNode(s)):1!==n.childNodes.length||3!==r.nodeType?n.textContent=s:r.nodeValue!==s&&(r.nodeValue=s),r=null;else if(12&a)for(var p=!1,g=0,v=s.length;g<v;g++){var C=s[g];b(r)||p&&0<(16&C.flags)?x._M(C,n,o,t,r):(h=r.nextSibling,r=(r=H(C,n,r,o,t))?r.nextSibling:h),p=0<(16&C.flags)}if(0==(8192&m))for(var _=null;r;)_=r.nextSibling,n.removeChild(r),r=_}else b(n.firstChild)||(l=n,i=c,Boolean(i&&i.dangerouslySetInnerHTML&&i.dangerouslySetInnerHTML.__html&&(d=l,f=i.dangerouslySetInnerHTML.__html,(u=document.createElement("i")).innerHTML=f,u.innerHTML===d.innerHTML)))||(n.textContent="",448&m&&(n.defaultValue=""))}function w(e,n,r){if(3!==r.nodeType)x._MT(e,null,null),n.replaceChild(e.dom,r);else{var o=e.children;r.nodeValue!==o&&(r.nodeValue=o),e.dom=r}return e.dom}function H(e,n,r,o,t){var l,i,d,f,u,a,s,c,m,h,p,g,v,C,_,y,M=e.flags|=16384;return 14&M?function(e,n,r,o,t,l){var i,d=e.type,f=e.ref,u=e.props||{};if(l){var a=x._CI(e,d,u,o);i=H(a.$LI,n,r,a.$CX,t),x._MCCC(f,a),a.$UPD=!1}else{var s=x._HI(d(u,o));i=H(s,n,r,o,t),e.children=s,x._MFCC(u,f,e)}return i}(e,n,r,o,t,0<(4&M)):481&M?(c=n,m=r,h=o,p=t,v=(s=e).props,C=s.className,_=s.flags,y=s.ref,p=p||0<(32&_),1!==m.nodeType||m.tagName.toLowerCase()!==s.type?(x._ME(s,null,h,p,null),c.replaceChild(s.dom,m)):(s.dom=m,S(s,m,m.firstChild,h,p),b(v)||x._MP(s,_,v,m,p),L(g=C)||b(g)?""!==m.className&&m.removeAttribute("class"):p?m.setAttribute("class",C):m.className=C,T(y)&&x._MR(m,y)),s.dom):16&M?w(e,n,r):512&M?e.dom=r:8192&M?(i=n,d=r,f=o,u=t,a=(l=e).children,2===l.childFlags?(w(a,i,d),l.dom=a.dom):(S(l,i,d,f,u),l.dom=a[a.length-1].dom)):(function(e){throw e||(e=I),new Error("Inferno Error: "+e)}(),null)}"undefined"==typeof window||window.document,e.hydrate=function(e,n,r){var o,t=n.firstChild;if(!b(t))for(b(o=e)||!1===o||!0===o||L(o)||(t=H(e,n,t,{},!1));t&&(t=t.nextSibling);)n.removeChild(t);if(0<x._L.length)for(var l;void 0!==(l=x._L.shift());)l();n.$V=e,T(r)&&r()},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("inferno")):"function"==typeof define&&define.amd?define(["exports","inferno"],n):n(e.Inferno=e.Inferno||{},e.Inferno)}(this,function(e,x){"use strict";var I="a runtime error occured! Use Inferno in development environment to find the error.";function T(e){return null===e}function b(e){return void 0===e}function L(e,n,r,o,t){var l,i,d,f,a,u=e.childFlags,s=e.children,c=e.props,m=e.flags;if(1!==u){var h;if(2===u)T(r)?x._M(s,n,o,t,null):(h=r.nextSibling,r=(r=w(s,n,r,o,t))?r.nextSibling:h);else if(16===u)T(r)?n.appendChild(document.createTextNode(s)):1!==n.childNodes.length||3!==r.nodeType?n.textContent=s:r.nodeValue!==s&&(r.nodeValue=s),r=null;else if(12&u)for(var p=!1,g=0,v=s.length;g<v;g++){var C=s[g];T(r)||p&&0<(16&C.flags)?x._M(C,n,o,t,r):(h=r.nextSibling,r=(r=w(C,n,r,o,t))?r.nextSibling:h),p=0<(16&C.flags)}if(0==(8192&m))for(var _=null;r;)_=r.nextSibling,n.removeChild(r),r=_}else T(n.firstChild)||(l=n,i=c,Boolean(i&&i.dangerouslySetInnerHTML&&i.dangerouslySetInnerHTML.__html&&(d=l,f=i.dangerouslySetInnerHTML.__html,(a=document.createElement("i")).innerHTML=f,a.innerHTML===d.innerHTML)))||(n.textContent="",448&m&&(n.defaultValue=""))}function S(e,n,r){if(3!==r.nodeType)x._MT(e,null,null),n.replaceChild(e.dom,r);else{var o=e.children;r.nodeValue!==o&&(r.nodeValue=o),e.dom=r}return e.dom}function w(e,n,r,o,t){var l,i,d,f,a,u,s,c,m,h,p,g,v,C,_,y,M=e.flags|=16384;return 14&M?function(e,n,r,o,t,l){var i,d=e.type,f=e.ref,a=e.props||{};if(l){var u=x._CI(e,d,a,o);i=w(u.$LI,n,r,u.$CX,t),x._MCCC(f,u),u.$UPD=!1}else{var s=x._HI(d(a,o));i=w(s,n,r,o,t),e.children=s,x._MFCC(a,f,e)}return i}(e,n,r,o,t,0<(4&M)):481&M?(c=n,m=r,h=o,p=t,v=(s=e).props,C=s.className,_=s.flags,y=s.ref,p=p||0<(32&_),1!==m.nodeType||m.tagName.toLowerCase()!==s.type?(x._ME(s,null,h,p,null),c.replaceChild(s.dom,m)):(s.dom=m,L(s,m,m.firstChild,h,p),T(v)||x._MP(s,_,v,m,p),b(g=C)||T(g)?""!==m.className&&m.removeAttribute("class"):p?m.setAttribute("class",C):m.className=C,x._MR(y,m)),s.dom):16&M?S(e,n,r):512&M?e.dom=r:8192&M?(i=n,d=r,f=o,a=t,u=(l=e).children,2===l.childFlags?(S(u,i,d),l.dom=u.dom):(L(l,i,d,f,a),l.dom=u[u.length-1].dom)):(function(e){throw e||(e=I),new Error("Inferno Error: "+e)}(),null)}"undefined"==typeof window||window.document,e.hydrate=function(e,n,r){var o,t=n.firstChild;if(!T(t))for(T(o=e)||!1===o||!0===o||b(o)||(t=w(e,n,t,{},!1));t&&(t=t.nextSibling);)n.removeChild(t);if(0<x._L.length)for(var l;void 0!==(l=x._L.shift());)l();n.$V=e,"function"==typeof r&&r()},Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "inferno-hydrate",
"version": "6.0.0-alpha.1",
"version": "6.0.0-alpha.2",
"license": "MIT",

@@ -29,7 +29,7 @@ "description": "Hydrate plugin to inferno. This package can be used to reuse server side rendered html",

"dependencies": {
"inferno": "^6.0.0-alpha.1"
"inferno": "^6.0.0-alpha.2"
},
"devDependencies": {
"inferno-shared": "^6.0.0-alpha.1",
"inferno-vnode-flags": "^6.0.0-alpha.1"
"inferno-shared": "^6.0.0-alpha.2",
"inferno-vnode-flags": "^6.0.0-alpha.2"
},

@@ -46,3 +46,3 @@ "rollup": {

},
"gitHead": "49db2a53f514a5ed187c6bee6dd162a0bd173154"
"gitHead": "c1a292c16678ce01bdc3fc9a8783e6bc9986e83f"
}
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