@neuronet.io/vido
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "@neuronet.io/vido", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"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 s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:$,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>(u.debug&&(console.group("destroying component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.destroyComponent(e)),update:()=>(u.debug&&(console.group("updating component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.updateTemplate()),change(t){u.debug&&(console.group("changing component"),console.log(t,e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),o[e].change(t)},html:(t={})=>o[e].update(t)}}(n);const r=[];const a=[];const l=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)}),c={instance:n,vidoInstance:l,destroy(){for(const e of r)e()},update:e(l,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return o[n]=c,o[n].change(t),this.debug&&(console.group("component created"),console.log(n,e,t,o),console.groupEnd()),i},destroyComponent(e){"function"==typeof o[e].destroy&&o[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 o[e],this.debug&&(console.group("component destroyed"),console.log(`Instance id: ${e}`),console.groupEnd())},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0,this.debug&&console.log("templates updated"))}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[i].update(),r),u.executeActions()}};return u} | ||
*/export default function(e,n){let s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:$,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>(u.debug&&(console.group("destroying component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.destroyComponent(e)),update:()=>(u.debug&&(console.group("updating component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.updateTemplate()),change(t){u.debug&&(console.group("changing component"),console.log(t,e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),o[e].change(t)},html:(t={})=>o[e].update(t)}}(n);const r=[];const a=[];const l=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)}),c={instance:n,vidoInstance:l,destroy(){for(const e of r)e()},update:e(l,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return o[n]=c,o[n].change(t),u.debug&&(console.group("component created"),console.log(n,e,t,o),console.groupEnd()),i},destroyComponent(e){"function"==typeof o[e].destroy&&o[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 o[e],u.debug&&(console.group("component destroyed"),console.log(`Instance id: ${e}`),console.groupEnd())},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0,u.debug&&console.log("templates updated"))}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[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 s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:$,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>(u.debug&&(console.group("destroying component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.destroyComponent(e)),update:()=>(u.debug&&(console.group("updating component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.updateTemplate()),change(t){u.debug&&(console.group("changing component"),console.log(t,e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),o[e].change(t)},html:(t={})=>o[e].update(t)}}(n);const r=[];const a=[];const l=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)}),c={instance:n,vidoInstance:l,destroy(){for(const e of r)e()},update:e(l,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return o[n]=c,o[n].change(t),this.debug&&(console.group("component created"),console.log(n,e,t,o),console.groupEnd()),i},destroyComponent(e){"function"==typeof o[e].destroy&&o[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 o[e],this.debug&&(console.group("component destroyed"),console.log(`Instance id: ${e}`),console.groupEnd())},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0,this.debug&&console.log("templates updated"))}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[i].update(),r),u.executeActions()}};return u}})); | ||
*/return function(e,n){let s=0;const o={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(s){const o=s.committer.element;for(const s of t)if("function"==typeof s){const t=a.find(t=>t.instance===e&&t.componentAction.create===s&&t.element===o);if(t)t.props=n;else{void 0!==o.__vido__&&delete o.__vido__;const t={create:s,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:o,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:$,svg:R,directive:t,asyncAppend:B,asyncReplace:j,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:se,styleMap:ie,unsafeHTML:ae,until:ce,actions(e,t){},onDestroy(){},onChange(e){},createComponent(e,t){const n=s++,i=function(e){return{instance:e,destroy:()=>(u.debug&&(console.group("destroying component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.destroyComponent(e)),update:()=>(u.debug&&(console.group("updating component"),console.log(e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),u.updateTemplate()),change(t){u.debug&&(console.group("changing component"),console.log(t,e,o[e],o),console.log(`Instance id: ${e}`),console.groupEnd()),o[e].change(t)},html:(t={})=>o[e].update(t)}}(n);const r=[];const a=[];const l=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate()},onDestroy:function(e){r.push(e)},onChange:function(e){a.push(e)},instance:n,actions:d(n)}),c={instance:n,vidoInstance:l,destroy(){for(const e of r)e()},update:e(l,t),change(e){for(const n in t)if(e[n]===t[n])return;for(const t of a)t(e)}};return o[n]=c,o[n].change(t),u.debug&&(console.group("component created"),console.log(n,e,t,o),console.groupEnd()),i},destroyComponent(e){"function"==typeof o[e].destroy&&o[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 o[e],u.debug&&(console.group("component destroyed"),console.log(`Instance id: ${e}`),console.groupEnd())},updateTemplate(){const e=++l,t=this;c.then((function(){e===l&&(t.render(),l=0,u.debug&&console.log("templates updated"))}))},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);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);for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){H(o[i].update(),r),u.executeActions()}};return u}})); | ||
//# sourceMappingURL=vido.min.js.map |
@@ -104,3 +104,3 @@ import { render, html, directive, svg } from 'lit-html'; | ||
components[instance].change(props); | ||
if (this.debug) { | ||
if (vido.debug) { | ||
console.group('component created'); | ||
@@ -124,3 +124,3 @@ console.log(instance, component, props, components); | ||
delete components[instance]; | ||
if (this.debug) { | ||
if (vido.debug) { | ||
console.group('component destroyed'); | ||
@@ -140,3 +140,3 @@ console.log(`Instance id: ${instance}`); | ||
shouldUpdateCount = 0; | ||
if (this.debug) { | ||
if (vido.debug) { | ||
console.log('templates updated'); | ||
@@ -143,0 +143,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
861585