@lightningjs/solid
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -28,8 +28,2 @@ /* | ||
function convertColor(key, value) { | ||
return { | ||
[key]: key.startsWith('color') ? normalizeColor(value) : value, | ||
}; | ||
} | ||
function convertEffectsToShader(styleEffects) { | ||
@@ -136,3 +130,5 @@ const effects = []; | ||
this[`_${key}`] = v; | ||
if (!isArray(v)) { | ||
if (isArray(v)) { | ||
v[0] = normalizeColor(v[0]); | ||
} else { | ||
v = normalizeColor(v); | ||
@@ -177,2 +173,20 @@ } | ||
}); | ||
Object.defineProperties(this, { | ||
linearGradient: { | ||
set(props) { | ||
this._linearGradient = props; | ||
if (props.colors) { | ||
props.colors = props.colors.map((c) => normalizeColor(c)); | ||
} | ||
this.effects = { | ||
...(this.effects || {}), | ||
...{ linearGradient: props }, | ||
}; | ||
}, | ||
get() { | ||
return this._linearGradient; | ||
}, | ||
}, | ||
}); | ||
} | ||
@@ -216,4 +230,3 @@ | ||
if (isArray(value)) { | ||
let prop = convertColor(name, value[0]); | ||
return this.animate(prop, value[1]).start(); | ||
return this.animate({ [name]: value[0] }, value[1]).start(); | ||
} | ||
@@ -227,2 +240,6 @@ | ||
} else { | ||
// Need to render before animating | ||
if (isArray(value)) { | ||
value = value[0]; | ||
} | ||
this._renderProps[name] = value; | ||
@@ -229,0 +246,0 @@ } |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
77225
1675
1