Socket
Socket
Sign inDemoInstall

polythene-core

Package Overview
Dependencies
0
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.5 to 1.7.0

2

dist/polythene-core.js

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).polythene={})}(this,function(e){"use strict";function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},o=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),o.forEach(function(t){n(e,t,i[t])})}return e}function i(e,n){if(null==e)return{};var t,i,o=function(e,n){if(null==e)return{};var t,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function o(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],i=!0,o=!1,r=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done)&&(t.push(a.value),!n||t.length!==n);i=!0);}catch(e){o=!0,r=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw r}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var r="hidden",a="visible",u="exposing",s="hiding",d=function(e,n){return e[n]=1,e},c=["key","style","href","id","data-index","tabIndex","tabindex","oninit","oncreate","onupdate","onbeforeremove","onremove","onbeforeupdate"],l=function(e){return"function"==typeof e?e():e},f="undefined"!=typeof document,m=!f,h={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},p=function(e){var n=e.element,t=e.selector,i=e.pseudoSelector,o=e.prop,r=e.equals,a=e.contains,u=t?n.querySelector(t):n;if(!u)return!1;var s=document.defaultView;if(s){if(void 0!==r)return r===s.getComputedStyle(u,i).getPropertyValue(o);if(void 0!==a)return-1!==s.getComputedStyle(u,i).getPropertyValue(o).indexOf(a)}return!1},v=function(e){var n=parseFloat(e)*(-1===e.indexOf("ms")?1e3:1);return isNaN(n)?0:n},w=!m&&"ontouchstart"in document.documentElement,y=w?["touchstart","click"]:["click"],g=w?["click","mouseup"]:["mouseup"],b=w?["touchstart","mousedown"]:["mousedown"],S=w?["touchmove","mousemove"]:["mousemove"],E=w?["touchend","mouseup"]:["mouseup"];if(f){var D=document.querySelector("html");D&&D.classList.add(w?"pe-touch":"pe-no-touch")}var C={},O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f?window:{},i=!1;return function(){for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];i||(e.apply(t,r),i=!0,setTimeout(function(){return i=!1},n))}},T=function(e,n,t){C[e]=C[e]||[],C[e].push(t?O(n,t):n)},P=function(e,n){if(C[e]){var t=C[e].indexOf(n);t>-1&&C[e].splice(t,1)}},x=function(e,n){C[e]&&C[e].forEach(function(e){return e(n)})};f&&(window.addEventListener("resize",function(e){return x("resize",e)}),window.addEventListener("scroll",function(e){return x("scroll",e)}),window.addEventListener("keydown",function(e){return x("keydown",e)}),g.forEach(function(e){return window.addEventListener(e,function(n){return x(e,n)})}));var I=function(e){var n=e.options,r=[],a=function(e){x(n.name,e)},u=function(e){var n=s(e);return r.indexOf(n)},s=function(e){for(var n=0;n<r.length;n++)if(r[n].instanceId===e)return r[n]},d=function(){r.length&&(r[0].show=!0),a({id:r.length?r[0].instanceId:null,name:"next"})},c=function(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;n.queue?(r.shift(),d()):-1!==(t=u(e=i))&&(r.splice(t,1),a({id:e,name:"removeItem"}))},m=function(e,n){var t=s(n);t&&(t.pause=e,t.unpause=!e,a({id:n,name:e?"pause":"unpause"}))},h=function(){r.length=0,a({id:null,name:"removeAll"})};return{clear:h,count:function(){return r.length},hide:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id||n.defaultId,t=n.queue&&r.length?r[0]:s(e);return t&&(t.hide=!0),a({id:e,name:"hide"}),t?t.hidePromise:Promise.resolve(e)},pause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;return m(!0,e)},remove:c,show:function(){var e,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=f.id||n.defaultId,h=function(e,i,o){var r,u,s=l(e),d=new Promise(function(e){return r=e}),f=new Promise(function(e){return u=e});return t({},n,{instanceId:i,spawn:o,props:e,show:!n.queue,showPromise:d,hidePromise:f,didShow:function(){return s.didShow&&s.didShow(i),a({id:i,name:"didShow"}),r(i)},didHide:function(){return s.didHide&&s.didHide(i),a({id:i,name:"didHide"}),c(i),u(i)}})}(o,m,f.spawn||n.defaultId);a({id:m,name:"show"}),n.queue?(r.push(h),1===r.length&&d()):s(m)?(e=h,-1!==(i=u(m))&&(r[i]=e)):r.push(h);return h.showPromise},unpause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;return m(!1,e)},render:function(e){var a=e.h,u=e.useState,s=e.useEffect,d=i(e,["h","useState","useEffect"]),c=o(u(),2)[1];s(function(){return T(n.name,c),function(){P(n.name,c)}},[]);var m=d.spawn||n.defaultId,p=r.filter(function(e){return e.show&&e.spawn===m});return n.htmlShowClass&&f&&document.documentElement&&document.documentElement.classList[p.length?"add":"remove"](n.htmlShowClass),p.length?a(n.holderSelector,{className:"container"===d.position?"pe-multiple--container":"pe-multiple--screen"},p.map(function(e){return a(n.instance,t({},l(d),{fromMultipleClear:h,spawnId:m,fromMultipleClassName:n.className,holderSelector:n.holderSelector,transitions:n.transitions,fromMultipleDidHide:e.didHide,fromMultipleDidShow:e.didShow,hide:e.hide,instanceId:e.instanceId,key:void 0!==e.key?e.key:e.keyId,pause:e.pause,show:e.show,unpause:e.unpause},l(e.props)))})):a(n.placeholder)}}};I.displayName="Multi";var k="show",M="hide",H="show-done",j="hide-done",A=function(e){return q(e,"show")},L=function(e){return q(e,"hide")},q=function(e,n){var t=e.el;return t?new Promise(function(i){var o=t.style,r=f?window.getComputedStyle(t):{},a=e.hasDuration&&void 0!==e.duration?1e3*e.duration:v(r.transitionDuration),u=e.hasDelay&&void 0!==e.delay?1e3*e.delay:v(r.transitionDelay),s=e.timingFunction||r.transitionTimingFunction;e.transitionClass&&t.classList.add(e.transitionClass);var d=function(){o.transitionDuration="0ms",o.transitionDelay="0ms",e.before&&"function"==typeof e.before&&e.before()},c=e.before&&"show"===n?d:e.before&&"hide"===n?d:null,l=function(){e.after&&"function"==typeof e.after&&e.after()},m=function(){!function(){o.transitionDuration=a+"ms",o.transitionDelay=u+"ms",s&&(o.transitionTimingFunction=s),e.showClass&&(e.showClassElement||t).classList["show"===n?"add":"remove"](e.showClass);e.transition&&e.transition()}(),setTimeout(function(){l&&l(),e.transitionClass&&(t.classList.remove(e.transitionClass),t.offsetHeight),i()},a+u)},h=function(){0===a?m():setTimeout(m,0)};c?(c(),t.offsetHeight,setTimeout(function(){h()},0)):h()}):Promise.resolve()};e.Multi=I,e._Conditional=function(e){var n=e.h,d=e.useState,c=e.useEffect,l=i(e,["h","useState","useEffect"]),f=o(d(l.permanent?a:l.permanent||l.show?a:r),2),m=f[0],h=f[1];c(function(){var e=m;l.permanent?m===a&&l.show?e=u:m!==u||l.show||(e=s):m===r&&l.show?e=a:m!==a||l.show||(e=s),e!==m&&h(e)},[l]);var p=n("span",{className:l.placeholderClassName});return l.didHide?m!==r?n(l.instance,t({},l,{didHide:function(e){return l.didHide(e),h(l.permanent?a:r)}},m===s?{show:!0,hide:!0}:void 0)):p:l.permanent||l.inactive||l.show?n(l.instance,l):p},e.classForSize=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"regular";return function(e){return{small:e.small,regular:e.regular,medium:e.medium,large:e.large,fab:e.fab}}(e)[n]},e.deprecation=function(e,n){var t=n.option,i=n.newOption,o=n.newComponent,r=n.since,a=r?"Since version ".concat(r,"."):"";return t&&console.warn("".concat(e,": option '").concat(t,"' is deprecated and will be removed in later versions. Use '").concat(i,"' instead. ").concat(a)),o&&!i&&console.warn("".concat(e,": this component is deprecated and will be removed in later versions. Use component '").concat(o,"' instead. ").concat(a)),o&&i&&console.warn("".concat(e,": this component is deprecated and will be removed in later versions. Use component '").concat(o,"' with option '").concat(i,"' instead. ").concat(a))},e.emit=x,e.filterSupportedAttributes=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.add,i=n.remove,o=i?i.reduce(d,{}):{},r=(t?c.concat(t):c).filter(function(e){return!o[e]}).reduce(d,{});return Object.keys(e).reduce(function(n,t){return r[t]&&(n[t]=e[t]),n},{})},e.getAnimationEndEvent=function(){if(f){var e=document.createElement("fakeelement");for(var n in h)if(void 0!==e.style[n])return h[n]}},e.getStyle=function(e){var n=e.element,t=e.selector,i=e.pseudoSelector,o=e.prop,r=t?n.querySelector(t):n;if(r){if(r.currentStyle)return r.currentStyle;if(window.getComputedStyle){var a=document.defaultView;if(a){var u=a.getComputedStyle(r,i);if(u)return u.getPropertyValue(o)}}}},e.hide=L,e.iconDropdownDown='<svg xmlns="http://www.w3.org/2000/svg" id="dd-down-svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>',e.iconDropdownUp='<svg xmlns="http://www.w3.org/2000/svg" id="dd-up-svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 14l5-5 5 5z"/></svg>',e.initialTransitionState={isVisible:!1,isTransitioning:!1},e.isClient=f,e.isRTL=function(e){var n=e.element,t=void 0===n?document:n,i=e.selector;return p({element:t,selector:i,prop:"direction",equals:"rtl"})},e.isServer=m,e.isTouch=w,e.pointerEndDownEvent=E,e.pointerEndEvent=g,e.pointerMoveEvent=S,e.pointerStartDownEvent=b,e.pointerStartEvent=y,e.show=A,e.styleDurationToMs=v,e.stylePropCompare=p,e.subscribe=T,e.throttle=O,e.transitionComponent=function(e){var n=e.dispatchTransitionState,i=e.isTransitioning,o=e.instanceId,r=e.isShow,a=e.props,u=e.domElements,s=e.beforeTransition,d=e.afterTransition,c=e.showClass,l=e.transitionClass;e.referrer;if(i)return Promise.resolve();n(r?k:M),s&&s();var f=r?a.showDuration:a.hideDuration,m=r?a.showDelay:a.hideDelay,h=r?a.showTimingFunction:a.hideTimingFunction,p=a.transitions,v=r?A:L,w=t({},a,u,{showClass:c,transitionClass:l,duration:f,delay:m,timingFunction:h}),y=t({},w,p?(r?p.show:p.hide)(w):void 0);return v(t({},y,{duration:void 0!==y.duration?y.duration:.24,hasDuration:void 0!==y.duration,delay:void 0!==y.delay?y.delay:0,hasDelay:void 0!==y.delay})).then(function(){var e=o;d&&d(),(r?a.fromMultipleDidShow:a.fromMultipleDidHide)?(r?a.fromMultipleDidShow:a.fromMultipleDidHide)(e):(r?a.didShow:a.didHide)&&(r?a.didShow:a.didHide)(e),n(r?H:j)})},e.transitionStateReducer=function(e,n){switch(n){case k:return t({},e,{isTransitioning:!0,isVisible:!0});case M:return t({},e,{isTransitioning:!0});case H:return t({},e,{isTransitioning:!1,isVisible:!0});case j:return t({},e,{isTransitioning:!1,isVisible:!1});default:throw new Error("Unhandled action type: ".concat(n))}},e.unpackAttrs=l,e.unsubscribe=P,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).polythene={})}(this,function(e){"use strict";function n(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function i(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(o,!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(o).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function o(e,n){if(null==e)return{};var t,i,o=function(e,n){if(null==e)return{};var t,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],i=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(t.push(a.value),!n||t.length!==n);i=!0);}catch(e){o=!0,r=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a="hidden",s="visible",u="exposing",d="hiding",c=function(e,n){return e[n]=1,e},l=["key","style","href","id","data-index","tabIndex","tabindex","oninit","oncreate","onupdate","onbeforeremove","onremove","onbeforeupdate"],f=function(e){return"function"==typeof e?e():e},m=function(e){return{small:e.small,regular:e.regular,medium:e.medium,large:e.large,fab:e.fab}},p="undefined"!=typeof document,h=!p,v={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},w=function(e){var n=e.element,t=e.selector,i=e.pseudoSelector,o=e.prop,r=e.equals,a=e.contains,s=t?n.querySelector(t):n;if(!s)return!1;var u=document.defaultView;if(u){if(void 0!==r)return r===u.getComputedStyle(s,i).getPropertyValue(o);if(void 0!==a)return-1!==u.getComputedStyle(s,i).getPropertyValue(o).indexOf(a)}return!1},y=function(e){var n=parseFloat(e)*(-1===e.indexOf("ms")?1e3:1);return isNaN(n)?0:n},g=!h&&"ontouchstart"in document.documentElement,b=g?["touchstart","click"]:["click"],S=g?["click","mouseup"]:["mouseup"],E=g?["touchstart","mousedown"]:["mousedown"],O=g?["touchmove","mousemove"]:["mousemove"],D=g?["touchend","mouseup"]:["mouseup"];if(p){var C=document.querySelector("html");C&&C.classList.add(g?"pe-touch":"pe-no-touch")}var P={},T=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p?window:{},i=!1;return function(){for(var o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];var s=function(){return e.apply(t,r)};i||(s(),i=!0,setTimeout(function(){return i=!1},n))}},x=function(e,n,t){P[e]=P[e]||[],P[e].push(t?T(n,t):n)},I=function(e,n){if(P[e]){var t=P[e].indexOf(n);t>-1&&P[e].splice(t,1)}},j=function(e,n){P[e]&&P[e].forEach(function(e){return e(n)})};p&&(window.addEventListener("resize",function(e){return j("resize",e)}),window.addEventListener("scroll",function(e){return j("scroll",e)}),window.addEventListener("keydown",function(e){return j("keydown",e)}),S.forEach(function(e){return window.addEventListener(e,function(n){return j(e,n)})}));var k=function(e){var n=e.options,t=[],a=function(e){j(n.name,e)},s=function(e){var n=c(e);return t.indexOf(n)},u=function(e){var n=s(e);-1!==n&&(t.splice(n,1),a({id:e,name:"removeItem"}))},d=function(e,n){var i=s(e);-1!==i&&(t[i]=n)},c=function(e){for(var n=0;n<t.length;n++)if(t[n].instanceId===e)return t[n]},l=function(){t.length&&(t[0].show=!0),a({id:t.length?t[0].instanceId:null,name:"next"})},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;n.queue?(t.shift(),l()):u(e)},h=function(e,n){var t=c(n);t&&(t.pause=e,t.unpause=!e,a({id:n,name:e?"pause":"unpause"}))},v=function(e,t,o){var r,s,u=f(e),d=new Promise(function(e){return r=e}),c=new Promise(function(e){return s=e});return i({},n,{instanceId:t,spawn:o,props:e,show:!n.queue,showPromise:d,hidePromise:c,didShow:function(){return u.didShow&&u.didShow(t),a({id:t,name:"didShow"}),r(t)},didHide:function(){return u.didHide&&u.didHide(t),a({id:t,name:"didHide"}),m(t),s(t)}})},w=function(){t.length=0,a({id:null,name:"removeAll"})};return{clear:w,count:function(){return t.length},hide:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.id||n.defaultId,o=n.queue&&t.length?t[0]:c(i);return o&&(o.hide=!0),a({id:i,name:"hide"}),o?o.hidePromise:Promise.resolve(i)},pause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;return h(!0,e)},remove:m,show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.id||n.defaultId,r=i.spawn||n.defaultId,s=v(e,o,r);if(a({id:o,name:"show"}),n.queue)t.push(s),1===t.length&&l();else{var u=c(o);u?d(o,s):t.push(s)}return s.showPromise},unpause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.defaultId;return h(!1,e)},render:function(e){var a=e.h,s=e.useState,u=e.useEffect,d=o(e,["h","useState","useEffect"]),c=r(s(),2)[1];u(function(){return x(n.name,c),function(){I(n.name,c)}},[]);var l=d.spawn||n.defaultId,m=t.filter(function(e){return e.show&&e.spawn===l});return n.htmlShowClass&&p&&document.documentElement&&document.documentElement.classList[m.length?"add":"remove"](n.htmlShowClass),m.length?a(n.holderSelector,{className:"container"===d.position?"pe-multiple--container":"pe-multiple--screen"},m.map(function(e){return a(n.instance,i({},f(d),{fromMultipleClear:w,spawnId:l,fromMultipleClassName:n.className,holderSelector:n.holderSelector,transitions:n.transitions,fromMultipleDidHide:e.didHide,fromMultipleDidShow:e.didShow,hide:e.hide,instanceId:e.instanceId,key:void 0!==e.key?e.key:e.keyId,pause:e.pause,show:e.show,unpause:e.unpause},f(e.props)))})):a(n.placeholder)}}};k.displayName="Multi";var M="show",H="hide",A="show-done",L="hide-done",q=function(e){return F(e,"show")},V=function(e){return F(e,"hide")},F=function(e,n){var t=e.el;return t?new Promise(function(i){var o=t.style,r=p?window.getComputedStyle(t):{},a=e.hasDuration&&void 0!==e.duration?1e3*e.duration:y(r.transitionDuration),s=e.hasDelay&&void 0!==e.delay?1e3*e.delay:y(r.transitionDelay),u=e.timingFunction||r.transitionTimingFunction;e.transitionClass&&t.classList.add(e.transitionClass);var d=function(){o.transitionDuration="0ms",o.transitionDelay="0ms",e.before&&"function"==typeof e.before&&e.before()},c=e.before&&"show"===n?d:e.before&&"hide"===n?d:null,l=function(){e.after&&"function"==typeof e.after&&e.after()},f=function(){!function(){o.transitionDuration=a+"ms",o.transitionDelay=s+"ms",u&&(o.transitionTimingFunction=u),e.showClass&&(e.showClassElement||t).classList["show"===n?"add":"remove"](e.showClass);e.transition&&e.transition()}(),setTimeout(function(){l&&l(),e.transitionClass&&(t.classList.remove(e.transitionClass),t.offsetHeight),i()},a+s)},m=function(){0===a?f():setTimeout(f,0)};c?(c(),t.offsetHeight,setTimeout(function(){m()},0)):m()}):Promise.resolve()};e.Multi=k,e._Conditional=function(e){var n=e.h,t=e.useState,c=e.useEffect,l=o(e,["h","useState","useEffect"]),f=r(t(l.permanent?s:l.permanent||l.show?s:a),2),m=f[0],p=f[1];c(function(){var e=m;l.permanent?m===s&&l.show?e=u:m!==u||l.show||(e=d):m===a&&l.show?e=s:m!==s||l.show||(e=d),e!==m&&p(e)},[l]);var h=n("span",{className:l.placeholderClassName});return l.didHide?m!==a?n(l.instance,i({},l,{didHide:function(e){return l.didHide(e),p(l.permanent?s:a)}},m===d?{show:!0,hide:!0}:void 0)):h:l.permanent||l.inactive||l.show?n(l.instance,l):h},e.classForSize=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"regular";return m(e)[n]},e.deprecation=function(e,n){var t=n.option,i=n.newOption,o=n.newComponent,r=n.since,a=r?"Since version ".concat(r,"."):"";return t&&console.warn("".concat(e,": option '").concat(t,"' is deprecated and will be removed in later versions. Use '").concat(i,"' instead. ").concat(a)),o&&!i&&console.warn("".concat(e,": this component is deprecated and will be removed in later versions. Use component '").concat(o,"' instead. ").concat(a)),o&&i&&console.warn("".concat(e,": this component is deprecated and will be removed in later versions. Use component '").concat(o,"' with option '").concat(i,"' instead. ").concat(a))},e.emit=j,e.filterSupportedAttributes=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.add,i=n.remove,o=i?i.reduce(c,{}):{},r=t?l.concat(t):l,a=r.filter(function(e){return!o[e]}).reduce(c,{});return Object.keys(e).reduce(function(n,t){return a[t]&&(n[t]=e[t]),n},{})},e.getAnimationEndEvent=function(){if(p){var e=document.createElement("fakeelement");for(var n in v)if(void 0!==e.style[n])return v[n]}},e.getStyle=function(e){var n=e.element,t=e.selector,i=e.pseudoSelector,o=e.prop,r=t?n.querySelector(t):n;if(r){if(r.currentStyle)return r.currentStyle;if(window.getComputedStyle){var a=document.defaultView;if(a){var s=a.getComputedStyle(r,i);if(s)return s.getPropertyValue(o)}}}},e.hide=V,e.iconDropdownDown='<svg xmlns="http://www.w3.org/2000/svg" id="dd-down-svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>',e.iconDropdownUp='<svg xmlns="http://www.w3.org/2000/svg" id="dd-up-svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 14l5-5 5 5z"/></svg>',e.initialTransitionState={isVisible:!1,isTransitioning:!1},e.isClient=p,e.isRTL=function(e){var n=e.element,t=void 0===n?document:n,i=e.selector;return w({element:t,selector:i,prop:"direction",equals:"rtl"})},e.isServer=h,e.isTouch=g,e.pointerEndDownEvent=D,e.pointerEndEvent=S,e.pointerMoveEvent=O,e.pointerStartDownEvent=E,e.pointerStartEvent=b,e.show=q,e.styleDurationToMs=y,e.stylePropCompare=w,e.subscribe=x,e.throttle=T,e.transitionComponent=function(e){var n=e.dispatchTransitionState,t=e.isTransitioning,o=e.instanceId,r=e.isShow,a=e.props,s=e.domElements,u=e.beforeTransition,d=e.afterTransition,c=e.showClass,l=e.transitionClass;e.referrer;if(t)return Promise.resolve();n(r?M:H),u&&u();var f=r?a.showDuration:a.hideDuration,m=r?a.showDelay:a.hideDelay,p=r?a.showTimingFunction:a.hideTimingFunction,h=a.transitions,v=r?q:V,w=i({},a,{},s,{showClass:c,transitionClass:l,duration:f,delay:m,timingFunction:p}),y=i({},w,{},h?(r?h.show:h.hide)(w):void 0);return v(i({},y,{},{duration:void 0!==y.duration?y.duration:.24,hasDuration:void 0!==y.duration,delay:void 0!==y.delay?y.delay:0,hasDelay:void 0!==y.delay})).then(function(){var e=o;d&&d(),(r?a.fromMultipleDidShow:a.fromMultipleDidHide)?(r?a.fromMultipleDidShow:a.fromMultipleDidHide)(e):(r?a.didShow:a.didHide)&&(r?a.didShow:a.didHide)(e),n(r?A:L)})},e.transitionStateReducer=function(e,n){switch(n){case M:return i({},e,{isTransitioning:!0,isVisible:!0});case H:return i({},e,{isTransitioning:!0});case A:return i({},e,{isTransitioning:!1,isVisible:!0});case L:return i({},e,{isTransitioning:!1,isVisible:!1});default:throw new Error("Unhandled action type: ".concat(n))}},e.unpackAttrs=f,e.unsubscribe=I,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=polythene-core.js.map
{
"name": "polythene-core",
"version": "1.6.5",
"version": "1.7.0",
"description": "",

@@ -20,3 +20,3 @@ "main": "dist/polythene-core",

"devDependencies": {
"@types/mithril": "^1.1.16"
"@types/mithril": "^2.0.0"
},

@@ -23,0 +23,0 @@ "author": "Arthur Clemens <arthurclemens@gmail.com> (http://arthurclemens.com)",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc