@lightningjs/solid
Advanced tools
Comparing version 0.15.2 to 0.15.3
@@ -329,2 +329,3 @@ import { createSignal, mergeProps as mergeProps$1, createRoot, createRenderEffect, createMemo, createComponent as createComponent$1, untrack, splitProps } from 'solid-js'; | ||
const children = []; | ||
let hasOrder = false; | ||
for (let i = 0; i < node.children.length; i++) { | ||
@@ -346,4 +347,10 @@ const c = node.children[i]; | ||
} | ||
if (c.flexOrder !== undefined) { | ||
hasOrder = true; | ||
} | ||
children.push(c); | ||
} | ||
if (hasOrder) { | ||
children.sort((a, b) => (a.flexOrder || 0) - (b.flexOrder || 0)); | ||
} | ||
const numChildren = children.length; | ||
@@ -386,3 +393,3 @@ const direction = node.flexDirection || 'row'; | ||
// Update container size | ||
if (node._autosized) { | ||
if (node.flexBoundary === 'contain') { | ||
const calculatedSize = start - gap; | ||
@@ -488,3 +495,3 @@ if (calculatedSize !== node[dimension]) { | ||
const LightningRendererNumberProps = ['alpha', 'color', 'colorTop', 'colorRight', 'colorLeft', 'colorBottom', 'colorTl', 'colorTr', 'colorBl', 'colorBr', 'height', 'fontSize', 'lineHeight', 'mount', 'mountX', 'mountY', 'pivot', 'pivotX', 'pivotY', 'rotation', 'scale', 'width', 'worldX', 'worldY', 'x', 'y', 'zIndex', 'zIndexLocked']; | ||
const LightningRendererNonAnimatingProps = ['clipping', 'contain', 'fontFamily', 'fontStretch', 'fontStyle', 'fontWeight', 'letterSpacing', 'maxLines', 'offsetY', 'overflowSuffix', 'rtt', 'scrollable', 'scrollY', 'src', 'text', 'textAlign', 'textBaseline', 'textOverflow', 'texture', 'verticalAlign', 'wordWrap']; | ||
const LightningRendererNonAnimatingProps = ['autosize', 'clipping', 'contain', 'fontFamily', 'fontStretch', 'fontStyle', 'fontWeight', 'letterSpacing', 'maxLines', 'offsetY', 'overflowSuffix', 'rtt', 'scrollable', 'scrollY', 'src', 'text', 'textAlign', 'textBaseline', 'textOverflow', 'texture', 'verticalAlign', 'wordWrap']; | ||
@@ -495,2 +502,4 @@ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging | ||
class ElementNode extends Object { | ||
// default is undefined aka fixed size | ||
// Public but uses _ prefix | ||
@@ -497,0 +506,0 @@ // Public but uses _ prefix |
@@ -20,2 +20,3 @@ /* | ||
const children = []; | ||
let hasOrder = false; | ||
for (let i = 0; i < node.children.length; i++) { | ||
@@ -35,4 +36,10 @@ const c = node.children[i]; | ||
} | ||
if (c.flexOrder !== undefined) { | ||
hasOrder = true; | ||
} | ||
children.push(c); | ||
} | ||
if (hasOrder) { | ||
children.sort((a, b) => (a.flexOrder || 0) - (b.flexOrder || 0)); | ||
} | ||
const numChildren = children.length; | ||
@@ -79,3 +86,3 @@ const direction = node.flexDirection || 'row'; | ||
// Update container size | ||
if (node._autosized) { | ||
if (node.flexBoundary === 'contain') { | ||
const calculatedSize = start - gap; | ||
@@ -82,0 +89,0 @@ if (calculatedSize !== node[dimension]) { |
@@ -82,2 +82,3 @@ /* | ||
const LightningRendererNonAnimatingProps = [ | ||
'autosize', | ||
'clipping', | ||
@@ -116,2 +117,4 @@ 'contain', | ||
flexItem; | ||
flexOrder; | ||
flexBoundary; // default is undefined aka fixed size | ||
_queueDelete; | ||
@@ -118,0 +121,0 @@ forwardFocus; |
@@ -22,2 +22,3 @@ import { createShader } from '../lightningInit.js'; | ||
flexItem?: boolean; | ||
flexOrder?: number; | ||
_queueDelete?: boolean; | ||
@@ -40,2 +41,4 @@ } | ||
flexItem?: boolean; | ||
flexOrder?: number; | ||
flexBoundary?: 'contain'; | ||
_queueDelete?: boolean; | ||
@@ -42,0 +45,0 @@ forwardFocus?: number | ((this: ElementNode, elm: ElementNode) => boolean | void); |
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.15.2", | ||
"version": "0.15.3", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -66,3 +66,3 @@ "type": "module", | ||
"dependencies": { | ||
"@lightningjs/renderer": "^0.8.1", | ||
"@lightningjs/renderer": "^0.8.2", | ||
"@lightningjs/solid": "file:" | ||
@@ -69,0 +69,0 @@ }, |
@@ -22,2 +22,3 @@ /* | ||
const children = []; | ||
let hasOrder = false; | ||
for (let i = 0; i < node.children.length; i++) { | ||
@@ -40,5 +41,13 @@ const c = node.children[i]!; | ||
if (c.flexOrder !== undefined) { | ||
hasOrder = true; | ||
} | ||
children.push(c); | ||
} | ||
if (hasOrder) { | ||
children.sort((a, b) => (a.flexOrder || 0) - (b.flexOrder || 0)); | ||
} | ||
const numChildren = children.length; | ||
@@ -86,3 +95,3 @@ const direction = node.flexDirection || 'row'; | ||
// Update container size | ||
if (node._autosized) { | ||
if (node.flexBoundary === 'contain') { | ||
const calculatedSize = start - gap; | ||
@@ -89,0 +98,0 @@ if (calculatedSize !== node[dimension]) { |
@@ -121,2 +121,3 @@ /* | ||
const LightningRendererNonAnimatingProps = [ | ||
'autosize', | ||
'clipping', | ||
@@ -161,2 +162,3 @@ 'contain', | ||
flexItem?: boolean; | ||
flexOrder?: number; | ||
_queueDelete?: boolean; | ||
@@ -186,2 +188,4 @@ } | ||
flexItem?: boolean; | ||
flexOrder?: number; | ||
flexBoundary?: 'contain'; // default is undefined aka fixed size | ||
_queueDelete?: boolean; | ||
@@ -188,0 +192,0 @@ forwardFocus?: |
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
270746
4465
Updated@lightningjs/renderer@^0.8.2