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

polythene-core

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polythene-core - npm Package Compare versions

Comparing version 1.5.4 to 1.6.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}var i="hidden",o="visible",r="exposing",a="hiding",s={getInitialState:function(e,n){var t=e.attrs;if(!t.didHide)return{};var r=t.permanent||t.show,a=n(t.permanent?o:r?o:i);return{mode:a,redrawOnUpdate:n.merge([a])}},onUpdate:function(e){var n=e.state,t=e.attrs;if(t.didHide){var s=n.mode();t.permanent?s===o&&t.show?n.mode(r):s!==r||t.show||n.mode(a):s===i&&t.show?n.mode(o):s!==o||t.show||n.mode(a)}},view:function(e,n){var r=e.state,s=e.attrs,d=n.renderer,u=d("span",{className:s.placeholderClassName});if(!s.didHide)return s.permanent||s.inactive||s.show?d(s.instance,s):u;var l=r.mode();return l!==i?d(s.instance,t({},s,{didHide:function(e){return s.didHide(e),r.mode(s.permanent?o:i)}},l===a?{show:!0,hide:!0}:void 0)):u},displayName:"Conditional"},d=function(e,n){return e[n]=1,e},u=["key","style","href","id","tabIndex","tabindex","oninit","oncreate","onupdate","onbeforeremove","onremove","onbeforeupdate"],l=function(e){return"function"==typeof e?e():e},c="undefined"!=typeof document,f=!c,m={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"},h=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 d=document.defaultView;if(d){if(void 0!==r)return r===d.getComputedStyle(s,i).getPropertyValue(o);if(void 0!==a)return-1!==d.getComputedStyle(s,i).getPropertyValue(o).indexOf(a)}return!1},p=function(e){var n=parseFloat(e)*(-1===e.indexOf("ms")?1e3:1);return isNaN(n)?0:n},v=!f&&"ontouchstart"in document.documentElement,w=v?["touchstart","click"]:["click"],g=v?["click","mouseup"]:["mouseup"],y=v?["touchstart","mousedown"]:["mousedown"],S=v?["touchmove","mousemove"]:["mousemove"],b=v?["touchend","mouseup"]:["mouseup"];if(c){var C=document.querySelector("html");C&&C.classList.add(v?"pe-touch":"pe-no-touch")}var D={},E=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c?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))}},P=function(e,n){D[e]&&D[e].forEach(function(e){return e(n)})};c&&(window.addEventListener("resize",function(e){return P("resize",e)}),window.addEventListener("scroll",function(e){return P("scroll",e)}),window.addEventListener("keydown",function(e){return P("keydown",e)}),g.forEach(function(e){return window.addEventListener(e,function(n){return P(e,n)})}));var I=function(e){var n,i=e.options,o=e.renderer,r=[],a=function(e){n||console.error("Cannot set state. Did you set a root element like Dialog to show instances?"),n(e.id),P(i.name,e)},s=function(e){var n=d(e);return r.indexOf(n)},d=function(e){for(var n=0;n<r.length;n++)if(r[n].instanceId===e)return r[n]},u=function(){r.length&&(r[0].show=!0),a({id:r.length?r[0].instanceId:null,name:"next"})},f=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.defaultId;i.queue?(r.shift(),u()):-1!==(n=s(e=t))&&(r.splice(n,1),a({id:e,name:"removeItem"}))},m=function(e,n){var t=d(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},getInitialState:function(e,t){return{current:n=t(null),redrawOnUpdate:t.merge([n])}},hide:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).id||i.defaultId,n=i.queue&&r.length?r[0]:d(e);return n&&(n.hide=!0),a({id:e,name:"hide"}),n?n.hidePromise:Promise.resolve(e)},pause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.defaultId;return m(!0,e)},remove:f,show:function(){var e,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=c.id||i.defaultId,h=function(e,n,o){var r,s,d=l(e),u=new Promise(function(e){return r=e}),c=new Promise(function(e){return s=e});return t({},i,{instanceId:n,spawn:o,attrs:e,show:!i.queue,showPromise:u,hidePromise:c,didShow:function(){return d.didShow&&d.didShow(n),a({id:n,name:"didShow"}),r(n)},didHide:function(){return d.didHide&&d.didHide(n),a({id:n,name:"didHide"}),f(n),s(n)}})}(o,m,c.spawn||i.defaultId);a({id:m,name:"show"}),i.queue?(r.push(h),1===r.length&&u()):d(m)?(e=h,-1!==(n=s(m))&&(r[n]=e)):r.push(h);return h.showPromise},unpause:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.defaultId;return m(!1,e)},view:function(e){var n=e.attrs,a=n.spawn||i.defaultId,s=r.filter(function(e){return e.show&&e.spawn===a});return i.htmlShowClass&&c&&document.documentElement&&document.documentElement.classList[s.length?"add":"remove"](i.htmlShowClass),s.length?o(i.holderSelector,{className:"container"===n.position?"pe-multiple--container":"pe-multiple--screen"},s.map(function(e){return o(i.instance,t({},l(n),{fromMultipleClear:h,spawnId:a,fromMultipleClassName:i.className,holderSelector:i.holderSelector,transitions:i.transitions,fromMultipleDidHide:e.didHide,fromMultipleDidShow:e.didShow,hide:e.hide,instanceId:e.instanceId,key:e.key,pause:e.pause,show:e.show,unpause:e.unpause},l(e.attrs)))})):o(i.placeholder)}}};I.displayName="Multi";var M=function(e){return H(e,"show")},O=function(e){return H(e,"hide")},H=function(e,n){var t=e.el;return t?new Promise(function(i){var o=t.style,r=c?window.getComputedStyle(t):{},a=e.hasDuration&&void 0!==e.duration?1e3*e.duration:p(r.transitionDuration),s=e.hasDelay&&void 0!==e.delay?1e3*e.delay:p(r.transitionDelay),d=e.timingFunction||r.transitionTimingFunction;e.transitionClass&&(e.transitionClassElement||t).classList.add(e.transitionClass);var u=function(){o.transitionDuration="0ms",o.transitionDelay="0ms",e.before&&"function"==typeof e.before&&e.before()},l=e.before&&"show"===n?u:e.before&&"hide"===n?u:null,f=function(){e.after&&"function"==typeof e.after&&e.after()},m=function(){!function(){o.transitionDuration=a+"ms",o.transitionDelay=s+"ms",d&&(o.transitionTimingFunction=d),e.showClass&&(e.showClassElement||t).classList["show"===n?"add":"remove"](e.showClass);e.transition&&e.transition()}(),setTimeout(function(){(f&&f(),e.transitionClass)&&((e.transitionClassElement||t).classList.remove(e.transitionClass),t.offsetHeight);i()},a+s)},h=function(){0===a?m():setTimeout(m,0)};l?(l(),t.offsetHeight,setTimeout(function(){h()},0)):h()}):Promise.resolve()};e.coreConditional=s,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.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?u.concat(t):u).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.unpackAttrs=l,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.getAnimationEndEvent=function(){if(c){var e=document.createElement("fakeelement");for(var n in m)if(void 0!==e.style[n])return m[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.stylePropCompare=h,e.isRTL=function(e){var n=e.element,t=void 0===n?document:n,i=e.selector;return h({element:t,selector:i,prop:"direction",equals:"rtl"})},e.styleDurationToMs=p,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.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.isClient=c,e.isServer=f,e.isTouch=v,e.pointerStartEvent=w,e.pointerEndEvent=g,e.pointerStartMoveEvent=y,e.pointerMoveEvent=S,e.pointerEndMoveEvent=b,e.Multi=I,e.show=M,e.hide=O,e.transitionComponent=function(e){var n=e.isShow,i=e.state,o=e.attrs,r=e.domElements,a=e.beforeTransition,s=e.afterTransition,d=e.showClass,u=e.transitionClass;if(i.transitioning())return Promise.resolve();i.transitioning(!0),i.visible(!!n),a&&a();var l=o[n?"showDuration":"hideDuration"],c=o[n?"showDelay":"hideDelay"],f=o[n?"showTimingFunction":"hideTimingFunction"],m=o.transitions,h=n?M:O,p=t({},o,r,{showClass:d,transitionClass:u,duration:l,delay:c,timingFunction:f}),v=t({},p,m?m[n?"show":"hide"](p):void 0);return h(t({},v,{duration:void 0!==v.duration?v.duration:.24,hasDuration:void 0!==v.duration,delay:void 0!==v.delay?v.delay:0,hasDelay:void 0!==v.delay})).then(function(){var e=i.instanceId;o[n?"fromMultipleDidShow":"fromMultipleDidHide"]?o[n?"fromMultipleDidShow":"fromMultipleDidHide"](e):o[n?"didShow":"didHide"]&&o[n?"didShow":"didHide"](e),s&&s(),i.transitioning(!1)})},e.throttle=E,e.subscribe=function(e,n,t){D[e]=D[e]||[],D[e].push(t?E(n,t):n)},e.unsubscribe=function(e,n){if(D[e]){var t=D[e].indexOf(n);t>-1&&D[e].splice(t,1)}},e.emit=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){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,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 r="hidden",a="visible",s="exposing",u="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,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},v=function(e){var n=parseFloat(e)*(-1===e.indexOf("ms")?1e3:1);return isNaN(n)?0:n},w=!m&&"ontouchstart"in document.documentElement,g=w?["touchstart","click"]:["click"],y=w?["click","mouseup"]:["mouseup"],b=w?["touchstart","mousedown"]:["mousedown"],S=w?["touchmove","mousemove"]:["mousemove"],E=w?["touchend","mouseup"]:["mouseup"];if(f){var C=document.querySelector("html");C&&C.classList.add(w?"pe-touch":"pe-no-touch")}var D={},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))}},P=function(e,n,t){D[e]=D[e]||[],D[e].push(t?O(n,t):n)},T=function(e,n){if(D[e]){var t=D[e].indexOf(n);t>-1&&D[e].splice(t,1)}},H=function(e,n){D[e]&&D[e].forEach(function(e){return e(n)})};f&&(window.addEventListener("resize",function(e){return H("resize",e)}),window.addEventListener("scroll",function(e){return H("scroll",e)}),window.addEventListener("keydown",function(e){return H("keydown",e)}),y.forEach(function(e){return window.addEventListener(e,function(n){return H(e,n)})}));var x=function(e){var n=e.options,r=[],a=function(e){H(n.name,e)},s=function(e){var n=u(e);return r.indexOf(n)},u=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=s(e=i))&&(r.splice(t,1),a({id:e,name:"removeItem"}))},m=function(e,n){var t=u(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]:u(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,s,u=l(e),d=new Promise(function(e){return r=e}),f=new Promise(function(e){return s=e});return t({},n,{instanceId:i,spawn:o,props:e,show:!n.queue,showPromise:d,hidePromise:f,didShow:function(){return u.didShow&&u.didShow(i),a({id:i,name:"didShow"}),r(i)},didHide:function(){return u.didHide&&u.didHide(i),a({id:i,name:"didHide"}),c(i),s(i)}})}(o,m,f.spawn||n.defaultId);a({id:m,name:"show"}),n.queue?(r.push(h),1===r.length&&d()):u(m)?(e=h,-1!==(i=s(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,s=e.useState,u=e.useEffect,d=i(e,["h","useState","useEffect"]),c=o(s(),2)[1];u(function(){return P(n.name,c),function(){T(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)}}};x.displayName="Multi";var I="show",k="hide",M="done",j=function(e){return L(e,"show")},A=function(e){return L(e,"hide")},L=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),s=e.hasDelay&&void 0!==e.delay?1e3*e.delay:v(r.transitionDelay),u=e.timingFunction||r.transitionTimingFunction;e.transitionClass&&(e.transitionClassElement||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=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)&&((e.transitionClassElement||t).classList.remove(e.transitionClass),t.offsetHeight);i()},a+s)},h=function(){0===a?m():setTimeout(m,0)};c?(c(),t.offsetHeight,setTimeout(function(){h()},0)):h()}):Promise.resolve()};e.Multi=x,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=s:m!==s||l.show||(e=u):m===r&&l.show?e=a:m!==a||l.show||(e=u),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===u?{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=H,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 s=a.getComputedStyle(r,i);if(s)return s.getPropertyValue(o)}}}},e.hide=A,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,isHiding:!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=y,e.pointerMoveEvent=S,e.pointerStartDownEvent=b,e.pointerStartEvent=g,e.show=j,e.styleDurationToMs=v,e.stylePropCompare=p,e.subscribe=P,e.throttle=O,e.transitionComponent=function(e){var n=e.dispatchTransitionState,i=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(i)return Promise.resolve();n(r?I:k),u&&u();var f=r?a.showDuration:a.hideDuration,m=r?a.showDelay:a.hideDelay,h=r?a.showTimingFunction:a.hideTimingFunction,p=a.transitions,v=r?j:A,w=t({},a,s,{showClass:c,transitionClass:l,duration:f,delay:m,timingFunction:h}),g=t({},w,p?(r?p.show:p.hide)(w):void 0);return v(t({},g,{duration:void 0!==g.duration?g.duration:.24,hasDuration:void 0!==g.duration,delay:void 0!==g.delay?g.delay:0,hasDelay:void 0!==g.delay})).then(function(){var e=o;d&&d(),n(M),(r?a.fromMultipleDidShow:a.fromMultipleDidHide)?(r?a.fromMultipleDidShow:a.fromMultipleDidHide)(e):(r?a.didShow:a.didHide)&&(r?a.didShow:a.didHide)(e)})},e.transitionStateReducer=function(e,n){switch(n){case I:return t({},e,{isTransitioning:!0,isVisible:!0,isHiding:!1});case k:return t({},e,{isTransitioning:!0,isHiding:!0});case M:return t({},e,{isTransitioning:!1,isVisible:!e.isHiding,isHiding:!1});default:throw new Error("Unhandled action type: ".concat(n))}},e.unpackAttrs=l,e.unsubscribe=T,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=polythene-core.js.map

@@ -62,3 +62,3 @@ import * as m from "mithril";

export const coreConditional: Partial<CoreComponentCreatorOptions>;
export const _Conditional: (options: CyanoComponentOptions & ConditionalOptions) => any;

@@ -119,3 +119,3 @@ /* Conditional.js END */

export const Multi: ({ options, renderer } : { options: object, renderer: any }) => any;
export const Multi: ({ options } : { options: object }) => any;

@@ -169,2 +169,7 @@

/**
* Test id. Gets rendered as "data-test-id=my-value"
*/
testId: string;
/**
* Generated HTML element.

@@ -319,12 +324,14 @@ * @default "div"

export interface CoreComponentCreatorOptions {
getElement: (vnode: any) => any;
getInitialState: (vnode: any, stream?:any, options?:any) => any;
onMount: (vnode: any, options?: any) => any;
onUnMount: (vnode: any) => any;
onUpdate: (vnode: any) => any;
createProps: (vnode: any, options?: any) => any;
createContent: (vnode: any, options?: any) => any;
component: any;
view: (vnode: any, options?: any) => any;
export type CyanoComponentOptions = {
h: (args:any) => any;
a?: object;
cast?: (args:any) => any;
getRef?: (args:any) => any;
useCallback?: (args:any) => any;
useEffect?: (args:any) => any;
useLayoutEffect?: (args:any) => any;
useMemo?: (args:any) => any;
useReducer?: (args:any) => any;
useRef?: (args:any) => any;
useState?: (args:any) => any;
}
{
"name": "polythene-core",
"version": "1.5.4",
"version": "1.6.0",
"description": "",

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

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

@@ -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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc