Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lightningtv/core

Package Overview
Dependencies
Maintainers
0
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningtv/core - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

48

dist/src/elementNode.js

@@ -442,17 +442,33 @@ import { renderer, createShader } from './lightningInit.js';

if (this._undoStyles || (this.style && keyExists(this.style, states))) {
this._undoStyles = this._undoStyles || [];
const stylesToUndo = {};
this._undoStyles.forEach((styleKey) => {
stylesToUndo[styleKey] = this.style[styleKey];
});
const newStyles = states.reduce((acc, state) => {
const styles = this.style[state];
if (styles) {
acc = {
...acc,
...styles,
};
}
return acc;
}, {});
let stylesToUndo;
if (this._undoStyles && this._undoStyles.length) {
stylesToUndo = {};
this._undoStyles.forEach((styleKey) => {
if (isDev) {
if (this.style[styleKey] === undefined) {
console.warn('fallback style key not found: ', styleKey);
}
}
stylesToUndo[styleKey] = this.style[styleKey];
});
}
const numStates = states.length;
if (numStates === 0) {
Object.assign(this, stylesToUndo);
this._undoStyles = [];
return;
}
let newStyles;
if (numStates === 1) {
newStyles = this.style[states[0]];
newStyles = stylesToUndo
? { ...stylesToUndo, ...newStyles }
: newStyles;
}
else {
newStyles = states.reduce((acc, state) => {
const styles = this.style[state];
return styles ? { ...acc, ...styles } : acc;
}, stylesToUndo || {});
}
this._undoStyles = Object.keys(newStyles);

@@ -464,3 +480,3 @@ // Apply transition first

// Apply the styles
Object.assign(this, stylesToUndo, newStyles);
Object.assign(this, newStyles);
}

@@ -467,0 +483,0 @@ }

{
"name": "@lightningtv/core",
"version": "2.2.3",
"version": "2.2.4",
"description": "Lightning TV Core for Universal Renderers",

@@ -5,0 +5,0 @@ "type": "module",

@@ -663,19 +663,34 @@ import { renderer, createShader } from './lightningInit.js';

if (this._undoStyles || (this.style && keyExists(this.style, states))) {
this._undoStyles = this._undoStyles || [];
const stylesToUndo: { [key: string]: any } = {};
let stylesToUndo: { [key: string]: any } | undefined;
if (this._undoStyles && this._undoStyles.length) {
stylesToUndo = {};
this._undoStyles.forEach((styleKey) => {
if (isDev) {
if (this.style[styleKey] === undefined) {
console.warn('fallback style key not found: ', styleKey);
}
}
stylesToUndo![styleKey] = this.style[styleKey];
});
}
this._undoStyles.forEach((styleKey) => {
stylesToUndo[styleKey] = this.style[styleKey];
});
const numStates = states.length;
if (numStates === 0) {
Object.assign(this, stylesToUndo);
this._undoStyles = [];
return;
}
const newStyles: Styles = states.reduce((acc, state) => {
const styles = this.style[state];
if (styles) {
acc = {
...acc,
...styles,
};
}
return acc;
}, {});
let newStyles: Styles;
if (numStates === 1) {
newStyles = this.style![states[0] as keyof Styles] as Styles;
newStyles = stylesToUndo
? { ...stylesToUndo, ...newStyles }
: newStyles;
} else {
newStyles = states.reduce((acc, state) => {
const styles = this.style![state];
return styles ? { ...acc, ...styles } : acc;
}, stylesToUndo || {});
}

@@ -690,3 +705,3 @@ this._undoStyles = Object.keys(newStyles);

// Apply the styles
Object.assign(this, stylesToUndo, newStyles);
Object.assign(this, newStyles);
}

@@ -693,0 +708,0 @@ }

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 not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc