@lightningjs/solid
Advanced tools
Comparing version 0.12.5 to 0.12.6
@@ -779,8 +779,8 @@ import { createSignal, mergeProps as mergeProps$1, createRoot, createRenderEffect, createMemo, createComponent as createComponent$1, untrack, onMount } from 'solid-js'; | ||
if (!props.width) { | ||
props.width = (parent.width || 0) - props.x - (props.marginRight || 0); | ||
props.width = (parent.width || 0) - (props.x || 0) - (props.marginRight || 0); | ||
node._width = props.width; | ||
node._autosized = true; | ||
} | ||
if (!props.height && props.contain === 'both') { | ||
props.height = (parent.height || 0) - props.y - (props.marginBottom || 0); | ||
if (props.contain === 'both' && !props.height && !props.maxLines) { | ||
props.height = (parent.height || 0) - (props.y || 0) - (props.marginBottom || 0); | ||
node._height = props.height; | ||
@@ -805,3 +805,3 @@ node._autosized = true; | ||
if (isNaN(props.width)) { | ||
props.width = (parent.width || 0) - props.x; | ||
props.width = (parent.width || 0) - (props.x || 0); | ||
node._width = props.width; | ||
@@ -811,3 +811,3 @@ node._autosized = true; | ||
if (isNaN(props.height)) { | ||
props.height = (parent.height || 0) - props.y; | ||
props.height = (parent.height || 0) - (props.y || 0); | ||
node._height = props.height; | ||
@@ -814,0 +814,0 @@ node._autosized = true; |
@@ -439,9 +439,9 @@ /* | ||
props.width = | ||
(parent.width || 0) - props.x - (props.marginRight || 0); | ||
(parent.width || 0) - (props.x || 0) - (props.marginRight || 0); | ||
node._width = props.width; | ||
node._autosized = true; | ||
} | ||
if (!props.height && props.contain === 'both') { | ||
if (props.contain === 'both' && !props.height && !props.maxLines) { | ||
props.height = | ||
(parent.height || 0) - props.y - (props.marginBottom || 0); | ||
(parent.height || 0) - (props.y || 0) - (props.marginBottom || 0); | ||
node._height = props.height; | ||
@@ -467,3 +467,3 @@ node._autosized = true; | ||
if (isNaN(props.width)) { | ||
props.width = (parent.width || 0) - props.x; | ||
props.width = (parent.width || 0) - (props.x || 0); | ||
node._width = props.width; | ||
@@ -473,3 +473,3 @@ node._autosized = true; | ||
if (isNaN(props.height)) { | ||
props.height = (parent.height || 0) - props.y; | ||
props.height = (parent.height || 0) - (props.y || 0); | ||
node._height = props.height; | ||
@@ -476,0 +476,0 @@ node._autosized = true; |
@@ -40,3 +40,3 @@ import { createShader } from '../renderer/index.js'; | ||
private _undoStates?; | ||
private _renderProps; | ||
private _renderProps?; | ||
private _effects; | ||
@@ -43,0 +43,0 @@ private _parent; |
@@ -47,3 +47,3 @@ import { type AnimationSettings, type Dimensions, type INode, type INodeWritableProps, type ITextNodeWritableProps, type NodeFailedPayload, type NodeLoadedPayload } from '@lightningjs/renderer'; | ||
marginTop?: number; | ||
transition?: Record<string, Partial<AnimationSettings> | true> | true; | ||
transition?: Record<string, Partial<AnimationSettings> | true | false> | true | false; | ||
} | ||
@@ -50,0 +50,0 @@ export interface IntrinsicTextStyleCommonProps { |
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.12.5", | ||
"version": "0.12.6", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -22,2 +22,4 @@ /* | ||
type IntrinsicCommonProps, | ||
type IntrinsicNodeProps, | ||
type IntrinsicTextProps, | ||
type NodeStyles, | ||
@@ -167,3 +169,3 @@ type TextStyles, | ||
private _undoStates?: Record<string, any>; | ||
private _renderProps: any; | ||
private _renderProps?: IntrinsicNodeProps | IntrinsicTextProps; | ||
private _effects: any; | ||
@@ -317,3 +319,3 @@ private _parent: ElementNode | undefined; | ||
} else { | ||
this._renderProps[name] = value; | ||
this._renderProps![name] = value; | ||
} | ||
@@ -326,3 +328,3 @@ } | ||
} else { | ||
this._renderProps[name] = value; | ||
this._renderProps![name] = value; | ||
} | ||
@@ -548,3 +550,3 @@ } | ||
let props = node._renderProps; | ||
let props = node._renderProps as IntrinsicNodeProps | IntrinsicTextProps; | ||
@@ -565,3 +567,3 @@ if (parent.lng) { | ||
props.width = | ||
(parent.width || 0) - props.x - (props.marginRight || 0); | ||
(parent.width || 0) - (props.x || 0) - (props.marginRight || 0); | ||
node._width = props.width; | ||
@@ -571,5 +573,5 @@ node._autosized = true; | ||
if (!props.height && props.contain === 'both') { | ||
if (props.contain === 'both' && !props.height && !props.maxLines) { | ||
props.height = | ||
(parent.height || 0) - props.y - (props.marginBottom || 0); | ||
(parent.height || 0) - (props.y || 0) - (props.marginBottom || 0); | ||
node._height = props.height; | ||
@@ -597,4 +599,4 @@ node._autosized = true; | ||
// Set width and height to parent less offset | ||
if (isNaN(props.width)) { | ||
props.width = (parent.width || 0) - props.x; | ||
if (isNaN(props.width as number)) { | ||
props.width = (parent.width || 0) - (props.x || 0); | ||
node._width = props.width; | ||
@@ -604,4 +606,4 @@ node._autosized = true; | ||
if (isNaN(props.height)) { | ||
props.height = (parent.height || 0) - props.y; | ||
if (isNaN(props.height as number)) { | ||
props.height = (parent.height || 0) - (props.y || 0); | ||
node._height = props.height; | ||
@@ -608,0 +610,0 @@ node._autosized = true; |
@@ -82,3 +82,6 @@ /* | ||
marginTop?: number; | ||
transition?: Record<string, Partial<AnimationSettings> | true> | true; | ||
transition?: | ||
| Record<string, Partial<AnimationSettings> | true | false> | ||
| true | ||
| false; | ||
} | ||
@@ -85,0 +88,0 @@ |
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
296947
4608