-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,389 additions
and
1,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }); | ||
|
||
}))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.