@lightningtv/core
Advanced tools
Comparing version 0.1.5 to 0.2.0
@@ -12,3 +12,3 @@ import { createShader } from './lightningInit.js'; | ||
id?: string; | ||
type: 'text'; | ||
_type: 'text'; | ||
parent?: ElementNode; | ||
@@ -23,3 +23,3 @@ text: string; | ||
debug?: boolean; | ||
type: 'element' | 'textNode'; | ||
_type: 'element' | 'textNode'; | ||
lng: INode | IntrinsicNodeProps | IntrinsicTextProps; | ||
@@ -26,0 +26,0 @@ rendered: boolean; |
@@ -97,3 +97,3 @@ import { renderer, createShader } from './lightningInit.js'; | ||
super(); | ||
this.type = name === 'text' ? NodeType.TextNode : NodeType.Element; | ||
this._type = name === 'text' ? NodeType.TextNode : NodeType.Element; | ||
this.rendered = false; | ||
@@ -209,3 +209,3 @@ this.lng = {}; | ||
isTextNode() { | ||
return this.type === NodeType.TextNode; | ||
return this._type === NodeType.TextNode; | ||
} | ||
@@ -472,3 +472,3 @@ _layoutOnLoad() { | ||
} | ||
if (node.type === NodeType.Element) { | ||
if (node._type === NodeType.Element) { | ||
// only element nodes will have children that need rendering | ||
@@ -481,3 +481,3 @@ for (let i = 0; i < node.children.length; i++) { | ||
} | ||
else if (c.text && c.type === NodeType.Text) { | ||
else if (c.text && c._type === NodeType.Text) { | ||
// Solid Show uses an empty text node as a placeholder | ||
@@ -484,0 +484,0 @@ // Vue uses comment nodes for v-if |
@@ -9,3 +9,3 @@ import { NodeType } from './nodeTypes.js'; | ||
// Filter empty text nodes which are place holders for <Show> and elements missing dimensions | ||
if (c.type === NodeType.Text) { | ||
if (c._type === NodeType.Text) { | ||
continue; | ||
@@ -18,3 +18,3 @@ } | ||
// text node hasnt loaded yet - skip layout | ||
if (c.type === NodeType.TextNode && c.text && !(c.width || c.height)) { | ||
if (c._type === NodeType.TextNode && c.text && !(c.width || c.height)) { | ||
return false; | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "@lightningtv/core", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "Lightning TV Core for Universal Renderers", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -144,3 +144,3 @@ import { renderer, createShader } from './lightningInit.js'; | ||
id?: string; | ||
type: 'text'; | ||
_type: 'text'; | ||
parent?: ElementNode; | ||
@@ -159,3 +159,3 @@ text: string; | ||
debug?: boolean; | ||
type: 'element' | 'textNode'; | ||
_type: 'element' | 'textNode'; | ||
lng: INode | IntrinsicNodeProps | IntrinsicTextProps; | ||
@@ -194,3 +194,3 @@ rendered: boolean; | ||
super(); | ||
this.type = name === 'text' ? NodeType.TextNode : NodeType.Element; | ||
this._type = name === 'text' ? NodeType.TextNode : NodeType.Element; | ||
this.rendered = false; | ||
@@ -336,3 +336,3 @@ this.lng = {}; | ||
isTextNode() { | ||
return this.type === NodeType.TextNode; | ||
return this._type === NodeType.TextNode; | ||
} | ||
@@ -660,3 +660,3 @@ | ||
if (node.type === NodeType.Element) { | ||
if (node._type === NodeType.Element) { | ||
// only element nodes will have children that need rendering | ||
@@ -668,3 +668,3 @@ for (let i = 0; i < node.children.length; i++) { | ||
c.render(); | ||
} else if (c.text && c.type === NodeType.Text) { | ||
} else if (c.text && c._type === NodeType.Text) { | ||
// Solid Show uses an empty text node as a placeholder | ||
@@ -671,0 +671,0 @@ // Vue uses comment nodes for v-if |
@@ -11,3 +11,3 @@ import { type ElementNode } from './elementNode.js'; | ||
// Filter empty text nodes which are place holders for <Show> and elements missing dimensions | ||
if (c.type === NodeType.Text) { | ||
if (c._type === NodeType.Text) { | ||
continue; | ||
@@ -22,3 +22,3 @@ } | ||
// text node hasnt loaded yet - skip layout | ||
if (c.type === NodeType.TextNode && c.text && !(c.width || c.height)) { | ||
if (c._type === NodeType.TextNode && c.text && !(c.width || c.height)) { | ||
return false; | ||
@@ -25,0 +25,0 @@ } |
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
157087