cyano-mithril
Advanced tools
Comparing version 0.3.0 to 0.4.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"},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})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mithril")):"function"==typeof define&&define.amd?define(["exports","mithril"],t):t((e=e||self)["cyano-mithril"]=e["cyano-mithril"]||{},e.m)}(this,function(e,t){"use strict";function n(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a;t=t&&t.hasOwnProperty("default")?t.default:t;var s=Function.prototype.call.bind(Function.prototype.call),c=function(){return t.redraw()},i=function(e){var t=a,n=t.depsIndex++,r=t.depsStates[n]||[],o=void 0===e||!!Array.isArray(e)&&(e.length>0?!e.every(function(e,t){return e===r[t]}):!t.setup);return t.depsStates[n]=e,o},u=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,n){var r=a;if(i(n)){var o=function(){var e=t();"function"==typeof e&&(r.teardowns.set(t,e),r.teardowns.set("_",c))};r.updates.push(e?function(){return new Promise(function(e){return requestAnimationFrame(e)}).then(o)}:o)}}},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=a,r=n.statesIndex++;return n.setup||(n.states[r]=e),[n.states[r],function(e){var o=n.states[r],a=t(e,r);n.states[r]=a,a!==o&&c()}]},d=u(!0),p=u(),f=function(e,t){var n=a,r=i(t),s=o(n.setup?l():l(e()),2),c=s[0],u=s[1];return n.setup&&r&&u(e()),c},m=function(e,t){var o=function(e){var t=a;a=e.state;try{e.state.updates.forEach(s)}finally{Object.assign(e.state,{setup:!0,updates:[],depsIndex:0,statesIndex:0}),a=t}};return{oninit:function(e){Object.assign(e.state,{setup:!1,states:[],statesIndex:0,depsStates:[],depsIndex:0,updates:[],teardowns:new Map})},oncreate:o,onupdate:o,view:function(n){var o=a;a=n.state;try{return e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}({},t,n.attrs,{vnode:n,children:n.children}))}catch(e){console.error(e)}finally{a=o}},onremove:function(e){var t=a;a=e.state;try{n(e.state.teardowns.values()).forEach(s)}finally{a=t}}}},h={accept:"accept",acceptcharset:"acceptcharset",accesskey:"accesskey",action:"action",allowfullscreen:"allowfullscreen",allowtransparency:"allowtransparency",alt:"alt",async:"async",autocomplete:"autocomplete",autofocus:"autofocus",autoplay:"autoplay",capture:"capture",cellpadding:"cellpadding",cellspacing:"cellspacing",challenge:"challenge",charset:"charset",checked:"checked",class:"className",classid:"classid",classname:"className",className:"className",colspan:"colspan",cols:"cols",content:"content",contenteditable:"contenteditable",contextmenu:"contextmenu",controls:"controls",coords:"coords",crossorigin:"crossorigin",data:"data",datetime:"datetime",default:"default",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",enctype:"enctype",form:"form",formaction:"formaction",formenctype:"formenctype",formmethod:"formmethod",formnovalidate:"formnovalidate",formtarget:"formtarget",frameborder:"frameborder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hreflang",htmlfor:"htmlfor",httpequiv:"httpequiv",icon:"icon",id:"id",inputmode:"inputmode",integrity:"integrity",is:"is",keyparams:"keyparams",keytype:"keytype",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginheight:"marginheight",marginwidth:"marginwidth",max:"max",maxlength:"maxlength",media:"media",mediagroup:"mediagroup",method:"method",min:"min",minlength:"minlength",multiple:"multiple",muted:"muted",name:"name",novalidate:"novalidate",nonce:"nonce",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",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",poster:"poster",preload:"preload",radiogroup:"radiogroup",readonly:"readonly",rel:"rel",required:"required",reversed:"reversed",role:"role",rowspan:"rowspan",rows:"rows",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellcheck",src:"src",srcdoc:"srcdoc",srclang:"srclang",srcset:"srcset",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabindex",target:"target",title:"title",type:"type",usemap:"usemap",value:"value",width:"width",wmode:"wmode",wrap:"wrap"},y=t,g=y.trust;y.trust=function(e,n){return n?t(n,g(e)):g(e)},y.displayName="mithril";var v=t;e.a=h,e.cast=function(e,t){return m(e,t)},e.getDom=function(e){return{oncreate:function(t){return e(t.dom)}}},e.h=y,e.jsx=v,e.useCallback=function(e,t){return f(function(){return e},t)},e.useEffect=d,e.useLayoutEffect=p,e.useMemo=f,e.useReducer=function(e,t,n){var r=!a.setup&&n?n(t):t,s=o(l(r),2),c=s[0],i=s[1];return[c,function(t){return i(e(c,t))}]},e.useRef=function(e){return o(l({current:e}),1)[0]},e.useState=function(e){var t=a;return l(e,function(e,n){return"function"==typeof e?e(t.states[n]):e})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=cyano-mithril.js.map |
{ | ||
"name": "cyano-mithril", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Takes a base component and returns a Mithril component", | ||
@@ -22,3 +22,3 @@ "main": "dist/cyano-mithril", | ||
"dependencies": { | ||
"mithril-hookup": "^0.2.7" | ||
"mithril-hooks": "^0.5.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "peerDependencies": { |
@@ -1,3 +0,3 @@ | ||
# Cyano | ||
# Cyano for Mithril | ||
[Documentation](../../README.md) | ||
[Documentation](https://github.com/ArthurClemens/cyano) |
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
37101
385
+ Addedmithril-hooks@^0.5.1
+ Addedmithril@2.2.10(transitive)
+ Addedmithril-hooks@0.5.6(transitive)
- Removedmithril-hookup@^0.2.7
- Removedmithril-hookup@0.2.7(transitive)