You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@lightningtv/core

Package Overview
Dependencies
Maintainers
0
Versions
174
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

to
2.5.4

4

dist/src/elementNode.d.ts

@@ -6,3 +6,3 @@ import { createShader } from './lightningInit.js';

import './focusManager.js';
export type RendererNode = AddColorString<Partial<Omit<INodeProps, 'parent' | 'shader'>>>;
export type RendererNode = AddColorString<Partial<Omit<INodeProps, 'parent' | 'shader' | 'src'>>>;
export interface ElementNode extends RendererNode {

@@ -145,2 +145,4 @@ [key: string]: unknown;

get hasChildren(): boolean;
set src(src: string | null | undefined);
get src(): string | null | undefined;
getChildById(id: string): ElementNode | ElementText | undefined;

@@ -147,0 +149,0 @@ searchChildrenById(id: string): ElementNode | undefined;

@@ -121,3 +121,2 @@ import { renderer, createShader } from './lightningInit.js';

'scrollY',
'src',
'srcHeight',

@@ -353,2 +352,16 @@ 'srcWidth',

}
set src(src) {
if (typeof src === 'string') {
this.lng.src = src;
if (!this.color) {
this.color = 0xffffffff;
}
}
else {
this.color = 0x00000000;
}
}
get src() {
return this.lng.src;
}
getChildById(id) {

@@ -355,0 +368,0 @@ return this.children.find((c) => c.id === id);

@@ -49,3 +49,3 @@ import { type FadeOutEffectProps, type GlitchEffectProps, type GrayscaleEffectProps, type AnimationSettings as RendererAnimationSettings, type LinearGradientEffectProps, type RadialGradientEffectProps, type RadialProgressEffectProps, type ITextNodeProps, type HolePunchEffectProps, type IAnimationController } from '@lightningjs/renderer';

/** Node text, children of a ElementNode of type TextNode */
export interface ElementText extends NewOmit<ElementNode, '_type' | 'parent' | 'children'>, NewOmit<RendererText, 'x' | 'y' | 'width' | 'height'> {
export interface ElementText extends NewOmit<ElementNode, '_type' | 'parent' | 'children' | 'src'>, NewOmit<RendererText, 'x' | 'y' | 'width' | 'height'> {
_type: 'textNode';

@@ -52,0 +52,0 @@ parent?: ElementNode;

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

@@ -48,16 +48,16 @@ "type": "module",

"devDependencies": {
"@eslint/js": "^9.11.1",
"@eslint/js": "^9.15.0",
"@types/eslint__js": "^8.42.3",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"eslint": "^9.11.1",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.10.0",
"globals": "^15.12.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0",
"vite": "^5.4.8"
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0",
"vite": "^5.4.11"
},

@@ -64,0 +64,0 @@ "lint-staged": {

@@ -179,3 +179,2 @@ import { renderer, createShader } from './lightningInit.js';

'scrollY',
'src',
'srcHeight',

@@ -197,3 +196,3 @@ 'srcWidth',

export type RendererNode = AddColorString<
Partial<Omit<INodeProps, 'parent' | 'shader'>>
Partial<Omit<INodeProps, 'parent' | 'shader' | 'src'>>
>;

@@ -602,2 +601,17 @@ export interface ElementNode extends RendererNode {

set src(src) {
if (typeof src === 'string') {
this.lng.src = src;
if (!this.color) {
this.color = 0xffffffff;
}
} else {
this.color = 0x00000000;
}
}
get src(): string | null | undefined {
return this.lng.src;
}
getChildById(id: string) {

@@ -604,0 +618,0 @@ return this.children.find((c) => c.id === id);

@@ -96,3 +96,3 @@ import {

export interface ElementText
extends NewOmit<ElementNode, '_type' | 'parent' | 'children'>,
extends NewOmit<ElementNode, '_type' | 'parent' | 'children' | 'src'>,
NewOmit<RendererText, 'x' | 'y' | 'width' | 'height'> {

@@ -99,0 +99,0 @@ _type: 'textNode';

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

Sorry, the diff of this file is not supported yet