@neuronet.io/vido
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -55,5 +55,7 @@ import { Directive, directive } from 'lit-html/directive.js'; | ||
for (const name in currentElementStyles) { | ||
if (!name) | ||
continue; | ||
const camelCase = name | ||
.split('-') | ||
.map((p, i) => (i >= 0 ? p[0].toUpperCase() + p.substring(1) : p)) | ||
.map((p, i) => (i > 0 ? p[0].toUpperCase() + p.substring(1) : p)) | ||
.join(); | ||
@@ -70,2 +72,4 @@ if (this.style[name] === undefined && this.style[camelCase] === undefined) { | ||
for (const name in this.style) { | ||
if (!name) | ||
continue; | ||
const value = this.style[name].toLowerCase().trim(); | ||
@@ -72,0 +76,0 @@ if (currentElementStyles[name] === value) { |
@@ -200,5 +200,7 @@ /** | ||
for (const name in currentElementStyles) { | ||
if (!name) | ||
continue; | ||
const camelCase = name | ||
.split('-') | ||
.map((p, i) => (i >= 0 ? p[0].toUpperCase() + p.substring(1) : p)) | ||
.map((p, i) => (i > 0 ? p[0].toUpperCase() + p.substring(1) : p)) | ||
.join(); | ||
@@ -215,2 +217,4 @@ if (this.style[name] === undefined && this.style[camelCase] === undefined) { | ||
for (const name in this.style) { | ||
if (!name) | ||
continue; | ||
const value = this.style[name].toLowerCase().trim(); | ||
@@ -217,0 +221,0 @@ if (currentElementStyles[name] === value) { |
@@ -62,3 +62,3 @@ /** | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/class wt extends O{update(t,e){return e[0].execute(t),_}render(t){return t.toString()}}class Et{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=k(wt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){this.style=t}toString(){return Object.keys(this.style).reduce(((t,e)=>{const s=this.style[e];return null==s?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}updateStyle(t,e,s){for(const t of s){if(!t)continue;let[s,n]=t.split(":");s=s.trim().toLowerCase(),n=n.trim().toLowerCase(),s&&(e[s]=n)}for(const s in e){const e=s.split("-").map(((t,e)=>e>=0?t[0].toUpperCase()+t.substring(1):t)).join();void 0===this.style[s]&&void 0===this.style[e]&&(s.includes("-")?t.removeProperty(s):delete t[s])}for(const s in this.style){const n=this.style[s].toLowerCase().trim();e[s]!==n&&(s.includes("-")?t.setProperty(s,n):t[s]=n)}}execute(t){const e=t.element.style;let s={};const n=e.cssText.split(";");this.schedule?requestAnimationFrame((()=>{this.updateStyle(e,s,n)})):this.updateStyle(e,s,n)}} | ||
*/class wt extends O{update(t,e){return e[0].execute(t),_}render(t){return t.toString()}}class Et{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=k(wt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){this.style=t}toString(){return Object.keys(this.style).reduce(((t,e)=>{const s=this.style[e];return null==s?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}updateStyle(t,e,s){for(const t of s){if(!t)continue;let[s,n]=t.split(":");s=s.trim().toLowerCase(),n=n.trim().toLowerCase(),s&&(e[s]=n)}for(const s in e){if(!s)continue;const e=s.split("-").map(((t,e)=>e>0?t[0].toUpperCase()+t.substring(1):t)).join();void 0===this.style[s]&&void 0===this.style[e]&&(s.includes("-")?t.removeProperty(s):delete t[s])}for(const s in this.style){if(!s)continue;const n=this.style[s].toLowerCase().trim();e[s]!==n&&(s.includes("-")?t.setProperty(s,n):t[s]=n)}}execute(t){const e=t.element.style;let s={};const n=e.cssText.split(";");this.schedule?requestAnimationFrame((()=>{this.updateStyle(e,s,n)})):this.updateStyle(e,s,n)}} | ||
/** | ||
@@ -65,0 +65,0 @@ * @license |
@@ -62,3 +62,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vido=e()}(this,(function(){"use strict"; | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/class Yt extends z{update(t,e){return e[0].execute(t),_}render(t){return t.toString()}}class Xt{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=W(Yt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){this.style=t}toString(){return Object.keys(this.style).reduce(((t,e)=>{const s=this.style[e];return null==s?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}updateStyle(t,e,s){for(const t of s){if(!t)continue;let[s,n]=t.split(":");s=s.trim().toLowerCase(),n=n.trim().toLowerCase(),s&&(e[s]=n)}for(const s in e){const e=s.split("-").map(((t,e)=>e>=0?t[0].toUpperCase()+t.substring(1):t)).join();void 0===this.style[s]&&void 0===this.style[e]&&(s.includes("-")?t.removeProperty(s):delete t[s])}for(const s in this.style){const n=this.style[s].toLowerCase().trim();e[s]!==n&&(s.includes("-")?t.setProperty(s,n):t[s]=n)}}execute(t){const e=t.element.style;let s={};const n=e.cssText.split(";");this.schedule?requestAnimationFrame((()=>{this.updateStyle(e,s,n)})):this.updateStyle(e,s,n)}} | ||
*/class Yt extends z{update(t,e){return e[0].execute(t),_}render(t){return t.toString()}}class Xt{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=W(Yt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){this.style=t}toString(){return Object.keys(this.style).reduce(((t,e)=>{const s=this.style[e];return null==s?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}updateStyle(t,e,s){for(const t of s){if(!t)continue;let[s,n]=t.split(":");s=s.trim().toLowerCase(),n=n.trim().toLowerCase(),s&&(e[s]=n)}for(const s in e){if(!s)continue;const e=s.split("-").map(((t,e)=>e>0?t[0].toUpperCase()+t.substring(1):t)).join();void 0===this.style[s]&&void 0===this.style[e]&&(s.includes("-")?t.removeProperty(s):delete t[s])}for(const s in this.style){if(!s)continue;const n=this.style[s].toLowerCase().trim();e[s]!==n&&(s.includes("-")?t.setProperty(s,n):t[s]=n)}}execute(t){const e=t.element.style;let s={};const n=e.cssText.split(";");this.schedule?requestAnimationFrame((()=>{this.updateStyle(e,s,n)})):this.updateStyle(e,s,n)}} | ||
/** | ||
@@ -65,0 +65,0 @@ * @license |
{ | ||
"name": "@neuronet.io/vido", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "Compilation-less and eval free frontend framework for fast scalable apps.", | ||
@@ -5,0 +5,0 @@ "main": "dist/vido.js", |
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
762849
3961