@lightningjs/solid
Advanced tools
Comparing version 0.15.8 to 0.15.9
@@ -700,3 +700,3 @@ import { createSignal, mergeProps as mergeProps$1, createRoot, createRenderEffect, createMemo, createComponent as createComponent$1, untrack, splitProps } from 'solid-js'; | ||
if (isFunc(this.onBeforeLayout)) { | ||
changedLayout = this.onBeforeLayout.call(this, child, dimensions); | ||
changedLayout = this.onBeforeLayout.call(this, this, child, dimensions); | ||
} | ||
@@ -710,3 +710,3 @@ if (this.display === 'flex') { | ||
} | ||
isFunc(this.onLayout) && this.onLayout.call(this, child, dimensions); | ||
isFunc(this.onLayout) && this.onLayout.call(this, this, child, dimensions); | ||
} | ||
@@ -799,2 +799,4 @@ } | ||
props.text = node.getText(); | ||
// contain is either width or both | ||
if (props.contain) { | ||
@@ -806,2 +808,4 @@ if (!props.width) { | ||
props.height = (parent.height || 0) - props.y - (props.marginBottom || 0); | ||
} else if (props.maxLines === 1) { | ||
props.height = props.height || props.lineHeight || props.fontSize; | ||
} | ||
@@ -865,3 +869,3 @@ } | ||
// clean up after first render; | ||
delete this._renderProps; | ||
this._renderProps = {}; | ||
} | ||
@@ -868,0 +872,0 @@ } |
@@ -344,3 +344,3 @@ /* | ||
if (isFunc(this.onBeforeLayout)) { | ||
changedLayout = this.onBeforeLayout.call(this, child, dimensions); | ||
changedLayout = this.onBeforeLayout.call(this, this, child, dimensions); | ||
} | ||
@@ -355,3 +355,4 @@ if (this.display === 'flex') { | ||
} | ||
isFunc(this.onLayout) && this.onLayout.call(this, child, dimensions); | ||
isFunc(this.onLayout) && | ||
this.onLayout.call(this, this, child, dimensions); | ||
} | ||
@@ -441,2 +442,3 @@ } | ||
props.text = node.getText(); | ||
// contain is either width or both | ||
if (props.contain) { | ||
@@ -451,2 +453,7 @@ if (!props.width) { | ||
} | ||
else if (props.maxLines === 1) { | ||
props.height = (props.height || | ||
props.lineHeight || | ||
props.fontSize); | ||
} | ||
} | ||
@@ -510,3 +517,3 @@ log('Rendering: ', this, props); | ||
// clean up after first render; | ||
delete this._renderProps; | ||
this._renderProps = {}; | ||
} | ||
@@ -513,0 +520,0 @@ } |
@@ -44,3 +44,3 @@ import { createShader } from '../lightningInit.js'; | ||
private _undoStyles?; | ||
private _renderProps?; | ||
private _renderProps; | ||
private _effects; | ||
@@ -91,3 +91,3 @@ private _parent; | ||
set animationSettings(animationSettings: Partial<AnimationSettings>); | ||
requiresLayout(): true | ((child: ElementNode, dimensions: Dimensions) => void); | ||
requiresLayout(): true | ((this: ElementNode, target: ElementNode, child?: ElementNode, dimensions?: Dimensions) => boolean); | ||
updateLayout(child?: ElementNode, dimensions?: Dimensions): void; | ||
@@ -94,0 +94,0 @@ _stateChanged(): void; |
@@ -29,4 +29,4 @@ import { type AnimationSettings, type Dimensions, type FadeOutEffectProps, type GlitchEffectProps, type GrayscaleEffectProps, type INode, type INodeWritableProps, type ITextNodeWritableProps, type LinearGradientEffectProps, type NodeFailedPayload, type NodeLoadedPayload, type RadialGradientEffectProps, type RadialProgressEffectProps } from '@lightningjs/renderer'; | ||
onFail?: (target: INode, nodeFailedPayload: NodeFailedPayload) => void; | ||
onBeforeLayout?: (child: ElementNode, dimensions: Dimensions) => void; | ||
onLayout?: (child: ElementNode, dimensions: Dimensions) => void; | ||
onBeforeLayout?: (this: ElementNode, target: ElementNode, child?: ElementNode, dimensions?: Dimensions) => boolean; | ||
onLayout?: (this: ElementNode, target: ElementNode, child?: ElementNode, dimensions?: Dimensions) => unknown; | ||
forwardFocus?: number | ((this: ElementNode, elm: ElementNode) => boolean | void); | ||
@@ -33,0 +33,0 @@ ref?: ElementNode | ((node: ElementNode) => void) | undefined; |
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.15.8", | ||
"version": "0.15.9", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -195,3 +195,3 @@ /* | ||
private _undoStyles?: string[]; | ||
private _renderProps?: IntrinsicNodeProps | IntrinsicTextProps; | ||
private _renderProps: IntrinsicNodeProps | IntrinsicTextProps; | ||
private _effects: any; | ||
@@ -279,3 +279,3 @@ private _parent: ElementNode | undefined; | ||
} else { | ||
this._renderProps![name] = value; | ||
this._renderProps[name] = value; | ||
} | ||
@@ -288,3 +288,3 @@ } | ||
} else { | ||
this._renderProps![name] = value; | ||
this._renderProps[name] = value; | ||
} | ||
@@ -465,2 +465,3 @@ } | ||
this, | ||
this, | ||
child, | ||
@@ -479,3 +480,4 @@ dimensions, | ||
isFunc(this.onLayout) && this.onLayout.call(this, child, dimensions); | ||
isFunc(this.onLayout) && | ||
this.onLayout.call(this, this, child, dimensions); | ||
} | ||
@@ -564,3 +566,3 @@ } | ||
const props = node._renderProps as IntrinsicNodeProps | IntrinsicTextProps; | ||
const props = node._renderProps; | ||
props.x = props.x || 0; | ||
@@ -587,2 +589,3 @@ props.y = props.y || 0; | ||
// contain is either width or both | ||
if (props.contain) { | ||
@@ -597,2 +600,6 @@ if (!props.width) { | ||
(parent.height || 0) - props.y - (props.marginBottom || 0); | ||
} else if (props.maxLines === 1) { | ||
props.height = (props.height || | ||
props.lineHeight || | ||
props.fontSize) as number; | ||
} | ||
@@ -668,3 +675,3 @@ } | ||
// clean up after first render; | ||
delete this._renderProps; | ||
this._renderProps = {}; | ||
} | ||
@@ -671,0 +678,0 @@ } |
@@ -65,4 +65,14 @@ /* | ||
onFail?: (target: INode, nodeFailedPayload: NodeFailedPayload) => void; | ||
onBeforeLayout?: (child: ElementNode, dimensions: Dimensions) => void; | ||
onLayout?: (child: ElementNode, dimensions: Dimensions) => void; | ||
onBeforeLayout?: ( | ||
this: ElementNode, | ||
target: ElementNode, | ||
child?: ElementNode, | ||
dimensions?: Dimensions, | ||
) => boolean; | ||
onLayout?: ( | ||
this: ElementNode, | ||
target: ElementNode, | ||
child?: ElementNode, | ||
dimensions?: Dimensions, | ||
) => unknown; | ||
forwardFocus?: | ||
@@ -69,0 +79,0 @@ | number |
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
271796
4481