cyano-mithril
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -1,2 +0,2 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mithril")):"function"==typeof define&&define.amd?define(["exports","mithril"],t):t((n=n||self)["cyano-mithril"]=n["cyano-mithril"]||{},n.m)}(this,function(n,t){"use strict";function e(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function r(n){return function(n){if(Array.isArray(n)){for(var t=0,e=new Array(n.length);t<n.length;t++)e[t]=n[t];return e}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function u(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.forEach(function(t){o(n,t,e[t])})}return n}function c(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=[],r=!0,o=!1,u=void 0;try{for(var c,i=n[Symbol.iterator]();!(r=(c=i.next()).done)&&(e.push(c.value),!t||e.length!==t);r=!0);}catch(n){o=!0,u=n}finally{try{r||null==i.return||i.return()}finally{if(o)throw u}}return e}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t=t&&t.hasOwnProperty("default")?t.default:t;var i=function(n,e){return function(){var o=!1,i=[],f=0,l=[],s=0,y=[],m=new Map,p=t.redraw,d=function(n){var t=s++,e=l[t]||[],r=void 0===n||!!Array.isArray(n)&&(n.length>0?!n.every(function(n,t){return n===e[t]}):!o);return l[t]=n,r},h=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,e){if(d(e)){var r=function(){var n=t();"function"==typeof n&&(m.set(t,n),m.set("_",p))};y.push(n?function(){return new Promise(function(n){return requestAnimationFrame(n)}).then(r)}:r)}}},v=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(n){return n},e=f++;return o||(i[e]=n),[i[e],function(n){var r=i[e],o=t(n,e);i[e]=o,o!==r&&p()}]},b=function(n,t){var e=d(t),r=c(o?v():v(n()),2),u=r[0],i=r[1];return o&&e&&i(n()),u},g={useState:function(n){return v(n,function(n,t){return"function"==typeof n?n(i[t]):n})},useEffect:h(!0),useLayoutEffect:h(),useReducer:function(n,t,e){var r=!o&&e?e(t):t,u=c(v(r),2),i=u[0],a=u[1];return[i,function(t){return a(n(i,t))}]},useRef:function(n){return c(v({current:n}),1)[0]},useMemo:b,useCallback:function(n,t){return b(function(){return n},t)}},w=u({},g,e&&e(g)),O=function(){y.forEach(a),y.length=0,s=0,f=0};return{view:function(t){return n(t,w)},oncreate:function(){return O(),o=!0},onupdate:O,onremove:function(){r(m.values()).forEach(a)}}}},a=Function.prototype.call.bind(Function.prototype.call),f=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n){return i(function(t,e){return n(u({},t.attrs,e,{children:t.children}))})}(function(r){var o=null!=t?t(r):{};return n(u({},r,o,e))})},l={autocomplete:"autocomplete",autofocus:"autofocus",class:"class",className:"class",enctype:"enctype",formaction:"formaction",frameborder:"frameborder",maxlength:"maxlength",minlength:"minlength",onblur:"onblur",onchange:"onchange",onclick:"onclick",onfocus:"onfocus",oninput:"oninput",onkeydown:"onkeydown",onkeyup:"onkeyup",onmousedown:"onmousedown",onmouseout:"onmouseout",onmouseover:"onmouseover",onmouseup:"onmouseup",onscroll:"onscroll",onsubmit:"onsubmit",ontouchend:"ontouchend",ontouchmove:"ontouchmove",ontouchstart:"ontouchstart",readonly:"readonly",tabindex:"tabindex"};n.createComponent=function(n){var r,o;return"function"==typeof(arguments.length<=1?void 0:arguments[1])?(r=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):o=arguments.length<=1?void 0:arguments[1],f(n,r,function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),o.forEach(function(t){e(n,t,r[t])})}return n}({h:t,a:l,getDom:function(n){return{oncreate:function(t){return n(t.dom)}}}},o||{}))},Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mithril")):"function"==typeof define&&define.amd?define(["exports","mithril"],t):t((n=n||self)["cyano-mithril"]=n["cyano-mithril"]||{},n.m)}(this,function(n,t){"use strict";function e(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function r(n){return function(n){if(Array.isArray(n)){for(var t=0,e=new Array(n.length);t<n.length;t++)e[t]=n[t];return e}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function u(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.forEach(function(t){o(n,t,e[t])})}return n}function c(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=[],r=!0,o=!1,u=void 0;try{for(var c,i=n[Symbol.iterator]();!(r=(c=i.next()).done)&&(e.push(c.value),!t||e.length!==t);r=!0);}catch(n){o=!0,u=n}finally{try{r||null==i.return||i.return()}finally{if(o)throw u}}return e}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t=t&&t.hasOwnProperty("default")?t.default:t;var i=function(n,e){return function(){var o=!1,i=[],f=0,l=[],s=0,y=[],m=new Map,p=t.redraw,d=function(n){var t=s++,e=l[t]||[],r=void 0===n||!!Array.isArray(n)&&(n.length>0?!n.every(function(n,t){return n===e[t]}):!o);return l[t]=n,r},h=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,e){if(d(e)){var r=function(){var n=t();"function"==typeof n&&(m.set(t,n),m.set("_",p))};y.push(n?function(){return new Promise(function(n){return requestAnimationFrame(n)}).then(r)}:r)}}},v=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(n){return n},e=f++;return o||(i[e]=n),[i[e],function(n){var r=i[e],o=t(n,e);i[e]=o,o!==r&&p()}]},b=function(n,t){var e=d(t),r=c(o?v():v(n()),2),u=r[0],i=r[1];return o&&e&&i(n()),u},g={useState:function(n){return v(n,function(n,t){return"function"==typeof n?n(i[t]):n})},useEffect:h(!0),useLayoutEffect:h(),useReducer:function(n,t,e){var r=!o&&e?e(t):t,u=c(v(r),2),i=u[0],a=u[1];return[i,function(t){return a(n(i,t))}]},useRef:function(n){return c(v({current:n}),1)[0]},useMemo:b,useCallback:function(n,t){return b(function(){return n},t)}},w=u({},g,e&&e(g)),O=function(){y.forEach(a),y.length=0,s=0,f=0};return{view:function(t){return n(t,w)},oncreate:function(){return O(),o=!0},onupdate:O,onremove:function(){r(m.values()).forEach(a)}}}},a=Function.prototype.call.bind(Function.prototype.call),f=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(n){return i(function(t,e){return n(u({},t.attrs,e,{children:t.children}))})}(function(r){var o=null!=t?t(r):{};return n(u({},r,o,e))})},l={autocomplete:"autocomplete",autofocus:"autofocus",class:"class",className:"class",enctype:"enctype",formaction:"formaction",frameborder:"frameborder",maxlength:"maxlength",minlength:"minlength",onblur:"onblur",onchange:"onchange",onclick:"onclick",onfocus:"onfocus",oninput:"oninput",onkeydown:"onkeydown",onkeyup:"onkeyup",onmousedown:"onmousedown",onmouseout:"onmouseout",onmouseover:"onmouseover",onmouseup:"onmouseup",onscroll:"onscroll",onsubmit:"onsubmit",ontouchend:"ontouchend",ontouchmove:"ontouchmove",ontouchstart:"ontouchstart",readonly:"readonly",tabindex:"tabindex"},s=t,y=t.trust;s.trust=function(n,e){return e?t(e,y(n)):y(n)};n.createComponent=function(n){var t,r;return"function"==typeof(arguments.length<=1?void 0:arguments[1])?(t=arguments.length<=1?void 0:arguments[1],r=arguments.length<=2?void 0:arguments[2]):r=arguments.length<=1?void 0:arguments[1],f(n,t,function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),o.forEach(function(t){e(n,t,r[t])})}return n}({h:s,a:l,getDom:function(n){return{oncreate:function(t){return n(t.dom)}}}},r||{}))},Object.defineProperty(n,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=cyano-mithril.js.map |
{ | ||
"name": "cyano-mithril", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Takes a base component and returns a Mithril component", | ||
@@ -5,0 +5,0 @@ "main": "dist/cyano-mithril", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28411
285