@lightningtv/core
Advanced tools
Comparing version 1.0.5 to 1.0.6
import { createShader } from './lightningInit.js'; | ||
import { type IntrinsicCommonProps, type IntrinsicNodeProps, type IntrinsicTextProps, type StyleEffects, type NodeStyles, type TextStyles, type IntrinsicTextStyleCommonProps, AddColorString } from './intrinsicTypes.js'; | ||
import { type IntrinsicCommonProps, type IntrinsicNodeProps, type IntrinsicTextProps, type StyleEffects, type NodeStyles, type TextStyles, type IntrinsicTextStyleCommonProps, type AnimationSettingsWithDisabled, AddColorString } from './intrinsicTypes.js'; | ||
import { type ITextNode } from '@lightningjs/renderer'; | ||
@@ -41,8 +41,8 @@ import Children from './children.js'; | ||
_events?: Array<[string, (target: ElementNode, event?: Event) => void]>; | ||
_animationSettings?: Partial<AnimationSettings>; | ||
_animationSettings?: AnimationSettingsWithDisabled; | ||
_animationQueue: Array<{ | ||
props: Partial<INodeAnimateProps>; | ||
animationSettings?: Partial<AnimationSettings>; | ||
animationSettings?: AnimationSettingsWithDisabled; | ||
}> | undefined; | ||
_animationQueueSettings: Partial<AnimationSettings> | undefined; | ||
_animationQueueSettings: AnimationSettingsWithDisabled | undefined; | ||
_animationRunning?: boolean; | ||
@@ -59,3 +59,3 @@ children: Children; | ||
_sendToLightningAnimatable(name: string, value: number): IAnimationController | undefined; | ||
animate(props: Partial<INodeAnimateProps>, animationSettings?: Partial<AnimationSettings>): IAnimationController; | ||
animate(props: Partial<INodeAnimateProps>, animationSettings?: AnimationSettingsWithDisabled): IAnimationController; | ||
chain(props: Partial<INodeAnimateProps>, animationSettings?: Partial<AnimationSettings>): this; | ||
@@ -62,0 +62,0 @@ start(): Promise<void>; |
@@ -132,3 +132,5 @@ import { renderer, createShader } from './lightningInit.js'; | ||
Config.animationsEnabled && | ||
(this.transition === true || this.transition[name])) { | ||
(this.transition === true || | ||
this.transition[name] === true || | ||
(this.transition[name] && !this.transition[name].disabled))) { | ||
const animationSettings = this.transition === true || this.transition[name] === true | ||
@@ -135,0 +137,0 @@ ? undefined |
@@ -1,2 +0,2 @@ | ||
import { type IAnimationController, type AnimationSettings, type Dimensions, type FadeOutEffectProps, type GlitchEffectProps, type GrayscaleEffectProps, type INode, type ITextNodeProps, type LinearGradientEffectProps, type NodeFailedPayload, type NodeLoadedPayload, type RadialGradientEffectProps, type RadialProgressEffectProps, INodeProps } from '@lightningjs/renderer'; | ||
import { type IAnimationController, type Dimensions, type FadeOutEffectProps, type GlitchEffectProps, type GrayscaleEffectProps, type INode, type ITextNodeProps, type LinearGradientEffectProps, type NodeFailedPayload, type NodeLoadedPayload, type RadialGradientEffectProps, type RadialProgressEffectProps, INodeProps, AnimationSettings } from '@lightningjs/renderer'; | ||
import { type ElementNode } from './elementNode.js'; | ||
@@ -14,2 +14,5 @@ import { type NodeStates } from './states.js'; | ||
} | ||
export type AnimationSettingsWithDisabled = Partial<AnimationSettings> & { | ||
disabled?: boolean; | ||
}; | ||
export type BorderStyle = number | BorderStyleObject; | ||
@@ -43,3 +46,3 @@ export type BorderRadius = number | number[]; | ||
export interface IntrinsicNodeCommonProps { | ||
animationSettings?: Partial<AnimationSettings>; | ||
animationSettings?: AnimationSettingsWithDisabled; | ||
autofocus?: boolean; | ||
@@ -82,3 +85,3 @@ forwardStates?: boolean; | ||
marginTop?: number; | ||
transition?: Record<string, Partial<AnimationSettings> | true | false> | true | false; | ||
transition?: Record<string, AnimationSettingsWithDisabled | true | false> | true | false; | ||
} | ||
@@ -85,0 +88,0 @@ export interface IntrinsicTextStyleCommonProps { |
{ | ||
"name": "@lightningtv/core", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Lightning TV Core for Universal Renderers", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -12,2 +12,3 @@ import { renderer, createShader } from './lightningInit.js'; | ||
type IntrinsicTextStyleCommonProps, | ||
type AnimationSettingsWithDisabled, | ||
AddColorString, | ||
@@ -188,10 +189,10 @@ } from './intrinsicTypes.js'; | ||
_events?: Array<[string, (target: ElementNode, event?: Event) => void]>; | ||
_animationSettings?: Partial<AnimationSettings>; | ||
_animationSettings?: AnimationSettingsWithDisabled; | ||
_animationQueue: | ||
| Array<{ | ||
props: Partial<INodeAnimateProps>; | ||
animationSettings?: Partial<AnimationSettings>; | ||
animationSettings?: AnimationSettingsWithDisabled; | ||
}> | ||
| undefined; | ||
_animationQueueSettings: Partial<AnimationSettings> | undefined; | ||
_animationQueueSettings: AnimationSettingsWithDisabled | undefined; | ||
_animationRunning?: boolean; | ||
@@ -248,3 +249,5 @@ children: Children; | ||
Config.animationsEnabled && | ||
(this.transition === true || this.transition[name]) | ||
(this.transition === true || | ||
this.transition[name] === true || | ||
(this.transition[name] && !this.transition[name].disabled)) | ||
) { | ||
@@ -281,3 +284,3 @@ const animationSettings = | ||
props: Partial<INodeAnimateProps>, | ||
animationSettings?: Partial<AnimationSettings>, | ||
animationSettings?: AnimationSettingsWithDisabled, | ||
): IAnimationController { | ||
@@ -284,0 +287,0 @@ assertTruthy(this.rendered, 'Node must be rendered before animating'); |
import { | ||
type IAnimationController, | ||
type AnimationSettings, | ||
type Dimensions, | ||
@@ -16,2 +15,3 @@ type FadeOutEffectProps, | ||
INodeProps, | ||
AnimationSettings, | ||
} from '@lightningjs/renderer'; | ||
@@ -34,2 +34,6 @@ import { type ElementNode } from './elementNode.js'; | ||
export type AnimationSettingsWithDisabled = Partial<AnimationSettings> & { | ||
disabled?: boolean; | ||
}; | ||
export type BorderStyle = number | BorderStyleObject; | ||
@@ -67,3 +71,3 @@ export type BorderRadius = number | number[]; | ||
export interface IntrinsicNodeCommonProps { | ||
animationSettings?: Partial<AnimationSettings>; | ||
animationSettings?: AnimationSettingsWithDisabled; | ||
autofocus?: boolean; | ||
@@ -133,3 +137,3 @@ forwardStates?: boolean; | ||
transition?: | ||
| Record<string, Partial<AnimationSettings> | true | false> | ||
| Record<string, AnimationSettingsWithDisabled | true | false> | ||
| true | ||
@@ -136,0 +140,0 @@ | false; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
163101
2441