@neuronet.io/vido
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "@neuronet.io/vido", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "Compilation-less and eval free frontend framework for fast scalable apps.", | ||
@@ -5,0 +5,0 @@ "main": "vido.js", |
@@ -147,3 +147,3 @@ /** | ||
* http://polymer.github.io/PATENTS.txt | ||
*/export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=o++;let i;const r=[];const a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),s[e].change(n,t)},html:(n={})=>s[e].update(n,t)}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)})),c={instance:n,vidoInstance:i,destroy(){for(const e of r)e()},update:e(i,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.groupEnd()),l},destroyComponent(e,t){"function"==typeof s[e].destroy&&s[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u} | ||
*/export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=o++;let i;const r=[];const a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),s[e].change(n,t)},html:(n={})=>s[e].update(n,t)}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)})),c={instance:n,vidoInstance:i,destroy(){for(const e of r)e()},update:e(i,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.trace(),console.groupEnd()),l},destroyComponent(e,t){"function"==typeof s[e].destroy&&s[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u} | ||
//# sourceMappingURL=vido.esm.min.js.map |
@@ -147,3 +147,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vido=t()}(this,(function(){"use strict"; | ||
* http://polymer.github.io/PATENTS.txt | ||
*/return function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=o++;let i;const r=[];const a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),s[e].change(n,t)},html:(n={})=>s[e].update(n,t)}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)})),c={instance:n,vidoInstance:i,destroy(){for(const e of r)e()},update:e(i,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.groupEnd()),l},destroyComponent(e,t){"function"==typeof s[e].destroy&&s[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u}})); | ||
*/return function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:H,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=o++;let i;const r=[];const a=[];const l=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(e,s[e],s),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(n,e,s[e],s),console.trace(),console.groupEnd()),s[e].change(n,t)},html:(n={})=>s[e].update(n,t)}}(n,i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)})),c={instance:n,vidoInstance:i,destroy(){for(const e of r)e()},update:e(i,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return s[n]=c,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(n,e,t,s),console.trace(),console.groupEnd()),l},destroyComponent(e,t){"function"==typeof s[e].destroy&&s[e].destroy(),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(e),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){W(s[i].update(),r),u.executeActions()}};return u}})); | ||
//# sourceMappingURL=vido.min.js.map |
@@ -108,2 +108,3 @@ import { render, html, directive, svg } from 'lit-html'; | ||
console.log(instance, component, props, components); | ||
console.trace(); | ||
console.groupEnd(); | ||
@@ -110,0 +111,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
869969
5590