Skip to content

Commit

Permalink
With vastly quicker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsware committed Apr 14, 2021
1 parent d74ebde commit 5794f97
Show file tree
Hide file tree
Showing 17 changed files with 1,389 additions and 1,389 deletions.
8 changes: 4 additions & 4 deletions inferno-clone-vnode/index.esnext.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { createComponentVNode, EMPTY_OBJ, createTextVNode, createFragment, normalizeProps, createVNode } from 'inferno';

function combineFrom(first, second) {
var out = {};
const out = {};
if (first) {
for (var key in first) {
for (const key in first) {
out[key] = first[key];
}
}
if (second) {
for (var key$1 in second) {
out[key$1] = second[key$1];
for (const key in second) {
out[key] = second[key];
}
}
return out;
Expand Down
2 changes: 1 addition & 1 deletion inferno-compat/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ declare const _default: {
options: {
componentComparator: ((lastVNode: VNode, nextVNode: VNode) => boolean) | null;
createVNode: ((vNode: VNode) => void) | null;
renderComplete: ((rootInput: VNode | InfernoNode, parentDOM: Element | Node | SVGAElement | DocumentFragment | ShadowRoot | HTMLElement) => void) | null;
renderComplete: ((rootInput: InfernoNode | VNode, parentDOM: Element | Node | HTMLElement | SVGAElement | ShadowRoot | DocumentFragment) => void) | null;
reactStyles?: boolean | undefined;
};
render: typeof render;
Expand Down
2 changes: 1 addition & 1 deletion inferno-compat/index.esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export { createElement } from 'inferno-create-element';
import { findDOMNode } from 'inferno-extras';
export { findDOMNode } from 'inferno-extras';

var isArray = Array.isArray;
const isArray = Array.isArray;
function isNullOrUndef(o) {
return o === void 0 || o === null;
}
Expand Down
4 changes: 2 additions & 2 deletions inferno-create-class/index.esnext.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Component } from 'inferno';

var ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
const ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
function isFunction(o) {
return typeof o === 'function';
}
function throwError(message) {
if (!message) {
message = ERROR_MSG;
}
throw new Error(("Inferno Error: " + message));
throw new Error(`Inferno Error: ${message}`);
}

// don't autobind these methods since they already have guaranteed context.
Expand Down
8 changes: 4 additions & 4 deletions inferno-devtools/index.esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ function isInvalid(o) {
return o === null || o === false || o === true || o === void 0;
}
function combineFrom(first, second) {
var out = {};
const out = {};
if (first) {
for (var key in first) {
for (const key in first) {
out[key] = first[key];
}
}
if (second) {
for (var key$1 in second) {
out[key$1] = second[key$1];
for (const key in second) {
out[key] = second[key];
}
}
return out;
Expand Down
122 changes: 61 additions & 61 deletions inferno-extras/inferno-extras.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('inferno')) :
typeof define === 'function' && define.amd ? define(['exports', 'inferno'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Inferno = global.Inferno || {}, global.Inferno));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('inferno')) :
typeof define === 'function' && define.amd ? define(['exports', 'inferno'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Inferno = global.Inferno || {}, global.Inferno));
}(this, (function (exports, inferno) { 'use strict';

function isDOMinsideVNode(DOM, vNode) {
var stack = [vNode];
var _vNode;
var flags;
var children;
while (stack.length > 0) {
_vNode = stack.pop();
if (_vNode.dom === DOM) {
return true;
}
flags = _vNode.flags;
children = _vNode.children;
if (flags & 4 /* ComponentClass */) {
stack.push(children.$LI);
}
else if (flags & 8 /* ComponentFunction */) {
stack.push(children);
}
else {
flags = _vNode.childFlags;
if (flags & 12 /* MultipleChildren */) {
var i = children.length;
while (i--) {
stack.push(children[i]);
}
}
else if (flags & 2 /* HasVNodeChildren */) {
stack.push(children);
}
}
}
return false;
}
function isDOMinsideComponent(DOM, instance) {
if (instance.$UN) {
return false;
}
return isDOMinsideVNode(DOM, instance.$LI);
}
function isDOMinsideVNode(DOM, vNode) {
var stack = [vNode];
var _vNode;
var flags;
var children;
while (stack.length > 0) {
_vNode = stack.pop();
if (_vNode.dom === DOM) {
return true;
}
flags = _vNode.flags;
children = _vNode.children;
if (flags & 4 /* ComponentClass */) {
stack.push(children.$LI);
}
else if (flags & 8 /* ComponentFunction */) {
stack.push(children);
}
else {
flags = _vNode.childFlags;
if (flags & 12 /* MultipleChildren */) {
var i = children.length;
while (i--) {
stack.push(children[i]);
}
}
else if (flags & 2 /* HasVNodeChildren */) {
stack.push(children);
}
}
}
return false;
}
function isDOMinsideComponent(DOM, instance) {
if (instance.$UN) {
return false;
}
return isDOMinsideVNode(DOM, instance.$LI);
}

function findDOMNode(ref) {
if (ref && ref.nodeType) {
return ref;
}
if (!ref || ref.$UN) {
return null;
}
if (ref.$LI) {
return inferno.findDOMfromVNode(ref.$LI, true);
}
if (ref.flags) {
return inferno.findDOMfromVNode(ref, true);
}
return null;
}
function findDOMNode(ref) {
if (ref && ref.nodeType) {
return ref;
}
if (!ref || ref.$UN) {
return null;
}
if (ref.$LI) {
return inferno.findDOMfromVNode(ref.$LI, true);
}
if (ref.flags) {
return inferno.findDOMfromVNode(ref, true);
}
return null;
}

exports.findDOMNode = findDOMNode;
exports.isDOMinsideComponent = isDOMinsideComponent;
exports.isDOMinsideVNode = isDOMinsideVNode;
exports.findDOMNode = findDOMNode;
exports.isDOMinsideComponent = isDOMinsideComponent;
exports.isDOMinsideVNode = isDOMinsideVNode;

Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });

})));
4 changes: 2 additions & 2 deletions inferno-hydrate/index.esnext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, AnimationQueues, EMPTY_OBJ, _CI, _MCCC, _HI, _RFC, _MFCC, _ME, _MP, _MR, _M } from 'inferno';

var ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
const ERROR_MSG = 'a runtime error occured! Use Inferno in development environment to find the error.';
function isNullOrUndef(o) {
return o === void 0 || o === null;
}
Expand All @@ -17,7 +17,7 @@ function throwError(message) {
if (!message) {
message = ERROR_MSG;
}
throw new Error(("Inferno Error: " + message));
throw new Error(`Inferno Error: ${message}`);
}

function isSameInnerHTML(dom, innerHTML) {
Expand Down
4 changes: 2 additions & 2 deletions inferno-hyperscript/index.esnext.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getFlagsForElementVnode, createFragment, createVNode, createComponentVNode, Fragment } from 'inferno';

var isArray = Array.isArray;
const isArray = Array.isArray;
function isStringOrNumber(o) {
var type = typeof o;
const type = typeof o;
return type === 'string' || type === 'number';
}
function isString(o) {
Expand Down
Loading

0 comments on commit 5794f97

Please sign in to comment.