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

skatejs-named-slots

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skatejs-named-slots - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

4

dist/index.js

@@ -189,3 +189,2 @@ (function (global, factory) {

}
findSlots(childNode, slots);

@@ -1089,2 +1088,3 @@ }

if (canPatchNativeAccessors) {
nodeToParentNodeMap.set(refNode, null);
return this.__removeChild(refNode);

@@ -1103,2 +1103,4 @@ }

break;
default:
break;
}

@@ -1105,0 +1107,0 @@ return refNode;

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.skatejsNamedSlots=e.skatejsNamedSlots||{})}(this,function(e){function t(e,t){if(e)for(var n=e.childNodes,i=n.length,r=0;r<i;r++){var o=t(n[r],r,n);if("undefined"!=typeof o)return o}}function n(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,i=n.length,r=0;r<i;r++)t(n[r],r);else t(e,0)}function i(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}function r(e,t){e instanceof Node&&(e=B);var n=i(e,t);if(n){var r=n.get,o=n.set,s={configurable:!0,enumerable:!0};if(r)return s.get=r,s.set=o,s;if("function"==typeof e[t])return s.value=e[t],s}var u=Object.getOwnPropertyDescriptor(e,t);if(u&&u.get)return u}function o(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e){return e.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(e){return e.text||"<!--"+e.textContent+"-->"}function a(e){return"SLOT"===e.tagName}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=e.childNodes;if(!n||e.nodeType!==Node.ELEMENT_NODE)return t;for(var i=n.length,r=0;r<i;r++){var o=n[r];a(o)&&t.push(o),l(o,t)}return t}function d(e){return"_SHADOW_ROOT_"===e.tagName}function c(e){var t=document.createElement("div");if(R)return t.__innerHTML=e,t;for(var n=ve.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var i=n.firstChild;n.removeChild(i),t.appendChild(i)}return document.importNode(t,!0)}function h(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function f(e){return this[e]}function v(e){return e.item=f,e}function p(e){return!!ue.get(e)}function _(e){return p(e)?"host":a(e)?"slot":d(e)?"root":"node"}function g(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function m(e){return e.getAttribute&&e.getAttribute("name")||"default"}function N(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function C(e,t,n){if((3!==t.nodeType||!t.textContent||0!==t.textContent.trim().length)&&re.indexOf(t.nodeType)!==-1){var i=e.assignedNodes(),r=0===i.length,o=i.indexOf(n);de.set(t,e),r&&V.call(e.childNodes,function(t){return e.__removeChild(t)}),o>-1?(e.__insertBefore(t,void 0!==n?n:null),i.splice(o,0,t)):(e.__appendChild(t),i.push(t)),e.____triggerSlotChangeEvent()}}function y(e){var t=e.assignedSlot;if(t){var n=t.assignedNodes(),i=n.indexOf(e);if(i>-1){var r=1===n.length;n.splice(i,1),de.set(e,null),t.__removeChild(e),r&&V.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function b(e,t){for(var n=e.childNodes,i=n.length,r=0;r<i;r++)if(n[r]===t)return r;return-1}function E(e,t,i,r){var o=b(e,i);n(t,function(t,n){r(t,n),R?le.set(t,e):h(t,"parentNode",e),o>-1?U.splice.call(e.childNodes,o+n,0,t):U.push.call(e.childNodes,t)})}function w(e,t,n){var i=b(e,t);i>-1&&(n(t,0),R?le.set(t,null):h(t,"parentNode",null),U.splice.call(e.childNodes,i,1))}function O(e,t,n){E(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function T(e,t,n){E(e,t,n,function(t){var i=ue.get(e),r=he.get(i),o=r[N(t)];o&&C(o,t,n)})}function x(e,n){var i=m(n);R||n.childNodes.push||h(n,"childNodes",[].concat(Q(n.childNodes))),he.get(e)[i]=n,fe.has(n)||fe.set(n,e),t(ce.get(e),function(e){e.assignedSlot||i!==N(e)||C(n,e)})}function M(e,t,i){n(t,function(t){if(a(t))x(e,t);else{var n=l(t);if(n)for(var i=n.length,r=0;r<i;r++)x(e,n[r])}}),O(e,t,i)}function L(e,t,n){var i=0===e.assignedNodes().length;E(e,t,n,function(t){i&&e.__insertBefore(t,void 0!==n?n:null)})}function j(e,t){var n=0===e.assignedNodes().length;w(e,t,function(){n&&e.__removeChild(t)})}function S(e,t){w(e,t,function(){e.__removeChild(t)})}function k(e,t){w(e,t,function(){y(t)})}function P(e,t){t.assignedNodes().forEach(y),delete he.get(e)[m(t)],fe["delete"](t)}function D(e,t){w(e,t,function(){if(a(t))P(e,t);else{var n=l(t);if(n)for(var i=0;i<n.length;i++)P(e,n[i])}e.__removeChild(t)})}function A(e){if(d(e))return e;if(e.parentNode)return A(e.parentNode)}function W(e,t,n){var i=_(e),r=t.parentNode,o=A(e);return R||e.childNodes.push||h(e,"childNodes",[].concat(Q(e.childNodes))),o&&"slot"===_(t)&&x(o,t),r&&"host"===_(r)&&(R?le.set(t,null):h(t,"parentNode",null)),"node"===i?R?(le.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):O(e,t,n):"slot"===i?L(e,t,n):"host"===i?T(e,t,n):"root"===i?M(e,t,n):void 0}function H(e){if(R&&"slot"===_(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);V.call(e.__childNodes,function(t){return e.appendChild(t)})}}var B=document.createElement("div"),F=r(Element.prototype,"innerHTML"),R=!!F,I=o(function(e){function t(){return(new Date).getTime()}e.exports=Date.now||t}),X=I&&"object"==typeof I&&"default"in I?I["default"]:I,Y=o(function(e){var t=X;e.exports=function(e,n,i){function r(){var d=t()-a;d<n&&d>0?o=setTimeout(r,n-d):(o=null,i||(l=e.apply(u,s),o||(u=s=null)))}var o,s,u,a,l;return null==n&&(n=100),function(){u=this,s=arguments,a=t();var d=i&&!o;return o||(o=setTimeout(r,n)),d&&(l=e.apply(u,s),u=s=null),l}}}),q=Y&&"object"==typeof Y&&"default"in Y?Y["default"]:Y,z="0.0.1";"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var i=t[this.name];return i&&i[0]===t?i[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}();try{var G=new window.CustomEvent("test",{bubbles:!1,cancelable:!0,detail:{x:"y"}});if(G.preventDefault(),G.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(J){var K=function(e,t){var n;t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);var i=n.preventDefault;return n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};K.prototype=window.Event.prototype,window.CustomEvent=K}var Q=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},U=Array.prototype,V=U.forEach,Z="_shadow_root_",$=["childNodes","parentNode"],ee=["textContent"],te=["assignedSlot"],ne=["textContent"],ie=[],re=[Node.ELEMENT_NODE,Node.TEXT_NODE],oe=new WeakMap,se=new WeakMap,ue=new WeakMap,ae=new WeakMap,le=new WeakMap,de=new WeakMap,ce=new WeakMap,he=new WeakMap,fe=new WeakMap,ve=new DOMParser,pe={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:q(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&a(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return W(this,e),e}},assignedSlot:{get:function(){var e=de.get(this);if(!e)return null;var t=fe.get(e),n=ce.get(t),i=se.get(n);return"open"===i?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var i=ue.get(this);if(i)return i;var r=v([].slice.call(this.childNodes)),o=document.createElement(e.polyfillShadowRootTagName||Z);return se.set(this,n),ue.set(this,o),ce.set(o,this),he.set(o,{}),R?ae.set(this,r):h(this,"childNodes",r),r.forEach(function(e){t.__removeChild(e),R?le.set(e,t):h(e,"parentNode",t)}),this.__appendChild(o)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(R&&"node"===_(this))return this.__childNodes;var e=ae.get(this);return e||ae.set(this,e=v([])),e}},children:{get:function(){var e=[];return t(this,function(t){1===t.nodeType&&e.push(t)}),v(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if(a(this)){var e=oe.get(this);return e||oe.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){var e="",n=function(e){return e.outerHTML},i={1:n,3:s,8:u};return t(this,function(t){var r=i[t.nodeType]||n;e+=r(t)}),e},set:function(e){for(var t=c(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=l(t);for(V.call(n,function(e){return H(e)});t.hasChildNodes();){var i=t.firstChild;t.removeChild(i),this.appendChild(i)}}},insertBefore:{value:function(e,t){return W(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}},nextSibling:{get:function(){var e=this;return t(this.parentNode,function(t,n,i){if(e===t)return i[n+1]||null})}},nextElementSibling:{get:function(){var e=this,n=void 0;return t(this.parentNode,function(t){return n&&1===t.nodeType?t:void(e===t&&(n=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=c(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!R)throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return g(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return le.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return t(this.parentNode,function(t,n,i){if(e===t)return i[n-1]||null})}},previousElementSibling:{get:function(){var e=this,n=void 0;return t(this.parentNode,function(t){return n&&e===t?n:void(1===t.nodeType&&(n=t))})}},removeChild:{value:function(e){var t=_(this);switch(t){case"node":if(R)return this.__removeChild(e);S(this,e);break;case"slot":j(this,e);break;case"host":k(this,e);break;case"root":D(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&a(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},shadowRoot:{get:function(){return"open"===se.get(this)?ue.get(this):null}},textContent:{get:function(){var e="";return t(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};"attachShadow"in document.createElement("div")||!function(){var e=HTMLElement.prototype,t=Text.prototype,n=Comment.prototype,i=document.createTextNode(""),o=document.createComment("");Object.keys(pe).forEach(function(s){var u=pe[s];if(u.configurable=!0,u.hasOwnProperty("value")&&(u.writable=!0),R||$.indexOf(s)===-1){var a=r(e,s),l=r(t,s),d=r(n,s),c=s in i&&ee.indexOf(s)===-1||~te.indexOf(s),h=s in o&&ne.indexOf(s)===-1||~ie.indexOf(s),f="__"+s;Object.defineProperty(e,s,u),a&&Object.defineProperty(e,f,a),c&&Object.defineProperty(t,s,u),c&&l&&Object.defineProperty(t,f,l),h&&Object.defineProperty(n,s,u),h&&d&&Object.defineProperty(n,f,d)}})}(),e["default"]=z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.skatejsNamedSlots=e.skatejsNamedSlots||{})}(this,function(e){function t(e,t){if(e)for(var n=e.childNodes,i=n.length,r=0;r<i;r++){var o=t(n[r],r,n);if("undefined"!=typeof o)return o}}function n(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,i=n.length,r=0;r<i;r++)t(n[r],r);else t(e,0)}function i(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}function r(e,t){e instanceof Node&&(e=B);var n=i(e,t);if(n){var r=n.get,o=n.set,s={configurable:!0,enumerable:!0};if(r)return s.get=r,s.set=o,s;if("function"==typeof e[t])return s.value=e[t],s}var u=Object.getOwnPropertyDescriptor(e,t);if(u&&u.get)return u}function o(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e){return e.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(e){return e.text||"<!--"+e.textContent+"-->"}function a(e){return"SLOT"===e.tagName}function l(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=e.childNodes;if(!n||e.nodeType!==Node.ELEMENT_NODE)return t;for(var i=n.length,r=0;r<i;r++){var o=n[r];a(o)&&t.push(o),l(o,t)}return t}function d(e){return"_SHADOW_ROOT_"===e.tagName}function c(e){var t=document.createElement("div");if(R)return t.__innerHTML=e,t;for(var n=ve.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var i=n.firstChild;n.removeChild(i),t.appendChild(i)}return document.importNode(t,!0)}function h(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function f(e){return this[e]}function v(e){return e.item=f,e}function p(e){return!!ue.get(e)}function _(e){return p(e)?"host":a(e)?"slot":d(e)?"root":"node"}function g(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function m(e){return e.getAttribute&&e.getAttribute("name")||"default"}function N(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function C(e,t,n){if((3!==t.nodeType||!t.textContent||0!==t.textContent.trim().length)&&re.indexOf(t.nodeType)!==-1){var i=e.assignedNodes(),r=0===i.length,o=i.indexOf(n);de.set(t,e),r&&V.call(e.childNodes,function(t){return e.__removeChild(t)}),o>-1?(e.__insertBefore(t,void 0!==n?n:null),i.splice(o,0,t)):(e.__appendChild(t),i.push(t)),e.____triggerSlotChangeEvent()}}function y(e){var t=e.assignedSlot;if(t){var n=t.assignedNodes(),i=n.indexOf(e);if(i>-1){var r=1===n.length;n.splice(i,1),de.set(e,null),t.__removeChild(e),r&&V.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function b(e,t){for(var n=e.childNodes,i=n.length,r=0;r<i;r++)if(n[r]===t)return r;return-1}function E(e,t,i,r){var o=b(e,i);n(t,function(t,n){r(t,n),R?le.set(t,e):h(t,"parentNode",e),o>-1?U.splice.call(e.childNodes,o+n,0,t):U.push.call(e.childNodes,t)})}function w(e,t,n){var i=b(e,t);i>-1&&(n(t,0),R?le.set(t,null):h(t,"parentNode",null),U.splice.call(e.childNodes,i,1))}function O(e,t,n){E(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function T(e,t,n){E(e,t,n,function(t){var i=ue.get(e),r=he.get(i),o=r[N(t)];o&&C(o,t,n)})}function x(e,n){var i=m(n);R||n.childNodes.push||h(n,"childNodes",[].concat(Q(n.childNodes))),he.get(e)[i]=n,fe.has(n)||fe.set(n,e),t(ce.get(e),function(e){e.assignedSlot||i!==N(e)||C(n,e)})}function M(e,t,i){n(t,function(t){if(a(t))x(e,t);else{var n=l(t);if(n)for(var i=n.length,r=0;r<i;r++)x(e,n[r])}}),O(e,t,i)}function L(e,t,n){var i=0===e.assignedNodes().length;E(e,t,n,function(t){i&&e.__insertBefore(t,void 0!==n?n:null)})}function j(e,t){var n=0===e.assignedNodes().length;w(e,t,function(){n&&e.__removeChild(t)})}function S(e,t){w(e,t,function(){e.__removeChild(t)})}function k(e,t){w(e,t,function(){y(t)})}function P(e,t){t.assignedNodes().forEach(y),delete he.get(e)[m(t)],fe["delete"](t)}function D(e,t){w(e,t,function(){if(a(t))P(e,t);else{var n=l(t);if(n)for(var i=0;i<n.length;i++)P(e,n[i])}e.__removeChild(t)})}function A(e){if(d(e))return e;if(e.parentNode)return A(e.parentNode)}function W(e,t,n){var i=_(e),r=t.parentNode,o=A(e);return R||e.childNodes.push||h(e,"childNodes",[].concat(Q(e.childNodes))),o&&"slot"===_(t)&&x(o,t),r&&"host"===_(r)&&(R?le.set(t,null):h(t,"parentNode",null)),"node"===i?R?(le.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):O(e,t,n):"slot"===i?L(e,t,n):"host"===i?T(e,t,n):"root"===i?M(e,t,n):void 0}function H(e){if(R&&"slot"===_(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);V.call(e.__childNodes,function(t){return e.appendChild(t)})}}var B=document.createElement("div"),F=r(Element.prototype,"innerHTML"),R=!!F,I=o(function(e){function t(){return(new Date).getTime()}e.exports=Date.now||t}),X=I&&"object"==typeof I&&"default"in I?I["default"]:I,Y=o(function(e){var t=X;e.exports=function(e,n,i){function r(){var d=t()-a;d<n&&d>0?o=setTimeout(r,n-d):(o=null,i||(l=e.apply(u,s),o||(u=s=null)))}var o,s,u,a,l;return null==n&&(n=100),function(){u=this,s=arguments,a=t();var d=i&&!o;return o||(o=setTimeout(r,n)),d&&(l=e.apply(u,s),u=s=null),l}}}),q=Y&&"object"==typeof Y&&"default"in Y?Y["default"]:Y,z="0.0.1";"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var i=t[this.name];return i&&i[0]===t?i[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}();try{var G=new window.CustomEvent("test",{bubbles:!1,cancelable:!0,detail:{x:"y"}});if(G.preventDefault(),G.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(J){var K=function(e,t){var n;t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail);var i=n.preventDefault;return n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};K.prototype=window.Event.prototype,window.CustomEvent=K}var Q=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},U=Array.prototype,V=U.forEach,Z="_shadow_root_",$=["childNodes","parentNode"],ee=["textContent"],te=["assignedSlot"],ne=["textContent"],ie=[],re=[Node.ELEMENT_NODE,Node.TEXT_NODE],oe=new WeakMap,se=new WeakMap,ue=new WeakMap,ae=new WeakMap,le=new WeakMap,de=new WeakMap,ce=new WeakMap,he=new WeakMap,fe=new WeakMap,ve=new DOMParser,pe={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:q(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&a(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return W(this,e),e}},assignedSlot:{get:function(){var e=de.get(this);if(!e)return null;var t=fe.get(e),n=ce.get(t),i=se.get(n);return"open"===i?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var i=ue.get(this);if(i)return i;var r=v([].slice.call(this.childNodes)),o=document.createElement(e.polyfillShadowRootTagName||Z);return se.set(this,n),ue.set(this,o),ce.set(o,this),he.set(o,{}),R?ae.set(this,r):h(this,"childNodes",r),r.forEach(function(e){t.__removeChild(e),R?le.set(e,t):h(e,"parentNode",t)}),this.__appendChild(o)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(R&&"node"===_(this))return this.__childNodes;var e=ae.get(this);return e||ae.set(this,e=v([])),e}},children:{get:function(){var e=[];return t(this,function(t){1===t.nodeType&&e.push(t)}),v(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if(a(this)){var e=oe.get(this);return e||oe.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){var e="",n=function(e){return e.outerHTML},i={1:n,3:s,8:u};return t(this,function(t){var r=i[t.nodeType]||n;e+=r(t)}),e},set:function(e){for(var t=c(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=l(t);for(V.call(n,function(e){return H(e)});t.hasChildNodes();){var i=t.firstChild;t.removeChild(i),this.appendChild(i)}}},insertBefore:{value:function(e,t){return W(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}},nextSibling:{get:function(){var e=this;return t(this.parentNode,function(t,n,i){if(e===t)return i[n+1]||null})}},nextElementSibling:{get:function(){var e=this,n=void 0;return t(this.parentNode,function(t){return n&&1===t.nodeType?t:void(e===t&&(n=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=c(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!R)throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return g(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return le.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return t(this.parentNode,function(t,n,i){if(e===t)return i[n-1]||null})}},previousElementSibling:{get:function(){var e=this,n=void 0;return t(this.parentNode,function(t){return n&&e===t?n:void(1===t.nodeType&&(n=t))})}},removeChild:{value:function(e){var t=_(this);switch(t){case"node":if(R)return le.set(e,null),this.__removeChild(e);S(this,e);break;case"slot":j(this,e);break;case"host":k(this,e);break;case"root":D(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&a(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},shadowRoot:{get:function(){return"open"===se.get(this)?ue.get(this):null}},textContent:{get:function(){var e="";return t(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};"attachShadow"in document.createElement("div")||!function(){var e=HTMLElement.prototype,t=Text.prototype,n=Comment.prototype,i=document.createTextNode(""),o=document.createComment("");Object.keys(pe).forEach(function(s){var u=pe[s];if(u.configurable=!0,u.hasOwnProperty("value")&&(u.writable=!0),R||$.indexOf(s)===-1){var a=r(e,s),l=r(t,s),d=r(n,s),c=s in i&&ee.indexOf(s)===-1||~te.indexOf(s),h=s in o&&ne.indexOf(s)===-1||~ie.indexOf(s),f="__"+s;Object.defineProperty(e,s,u),a&&Object.defineProperty(e,f,a),c&&Object.defineProperty(t,s,u),c&&l&&Object.defineProperty(t,f,l),h&&Object.defineProperty(n,s,u),h&&d&&Object.defineProperty(n,f,d)}})}(),e["default"]=z,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=index.min.js.map

@@ -50,3 +50,3 @@ {

},
"version": "0.2.6"
"version": "0.2.7"
}

@@ -779,2 +779,3 @@ import { eachChildNode, eachNodeOrFragmentNodes } from './util/each';

if (canPatchNativeAccessors) {
nodeToParentNodeMap.set(refNode, null);
return this.__removeChild(refNode);

@@ -793,2 +794,4 @@ }

break;
default:
break;
}

@@ -795,0 +798,0 @@ return refNode;

import isSlotNode from './is-slot-node';
export default function findSlots (root, slots = []) {
export default function findSlots(root, slots = []) {
const { childNodes } = root;

@@ -18,3 +18,2 @@

}
findSlots(childNode, slots);

@@ -21,0 +20,0 @@ }

Sorry, the diff of this file is not supported yet

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