@opentui/solid 0.1.19-snapshot5-5ed8b651 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +16 -8
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -214,7 +214,7 @@ class TextNode {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
textParent.content = styledText;
|
|
217
|
-
textParent.visible =
|
|
217
|
+
textParent.visible = textParent.textLength !== 0;
|
|
218
218
|
this.parent = parent;
|
|
219
219
|
}
|
|
220
220
|
remove(parent) {
|
|
@@ -235,7 +235,13 @@ class TextNode {
|
|
|
235
235
|
this.textParent.content = styledText;
|
|
236
236
|
} else {
|
|
237
237
|
this.parent?.remove(this.textParent.id);
|
|
238
|
-
|
|
238
|
+
process.nextTick(() => {
|
|
239
|
+
if (!this.textParent)
|
|
240
|
+
return;
|
|
241
|
+
if (!this.textParent.parent) {
|
|
242
|
+
this.textParent.destroyRecursively();
|
|
243
|
+
}
|
|
244
|
+
});
|
|
239
245
|
}
|
|
240
246
|
}
|
|
241
247
|
}
|
|
@@ -277,7 +283,7 @@ var logId = (node) => {
|
|
|
277
283
|
if (!node)
|
|
278
284
|
return;
|
|
279
285
|
if (isTextChunk(node)) {
|
|
280
|
-
return node.
|
|
286
|
+
return node.text;
|
|
281
287
|
}
|
|
282
288
|
return node.id;
|
|
283
289
|
};
|
|
@@ -336,15 +342,18 @@ function _removeNode(parent, node) {
|
|
|
336
342
|
}
|
|
337
343
|
if (parent instanceof Renderable2 && node instanceof Renderable2) {
|
|
338
344
|
parent.remove(node.id);
|
|
339
|
-
|
|
345
|
+
process.nextTick(() => {
|
|
346
|
+
if (!node.parent) {
|
|
347
|
+
node.destroyRecursively();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
340
350
|
}
|
|
341
351
|
}
|
|
342
352
|
function _createTextNode(value) {
|
|
343
353
|
log("Creating text node:", value);
|
|
344
354
|
const chunk = value && isTextChunk(value) ? value : {
|
|
345
355
|
__isChunk: true,
|
|
346
|
-
text:
|
|
347
|
-
plainText: `${value}`
|
|
356
|
+
text: `${value}`
|
|
348
357
|
};
|
|
349
358
|
const textNode = new TextNode(chunk);
|
|
350
359
|
return textNode;
|
|
@@ -389,8 +398,7 @@ var {
|
|
|
389
398
|
}
|
|
390
399
|
const newChunk = {
|
|
391
400
|
__isChunk: true,
|
|
392
|
-
text:
|
|
393
|
-
plainText: value
|
|
401
|
+
text: value
|
|
394
402
|
};
|
|
395
403
|
textNode.replaceText(newChunk);
|
|
396
404
|
},
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.1.19
|
|
7
|
+
"version": "0.1.19",
|
|
8
8
|
"description": "SolidJS renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"./jsx-dev-runtime": "./jsx-runtime.d.ts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentui/core": "0.1.19
|
|
28
|
+
"@opentui/core": "0.1.19",
|
|
29
29
|
"babel-plugin-module-resolver": "5.0.2",
|
|
30
30
|
"@babel/core": "7.28.0",
|
|
31
31
|
"@babel/preset-typescript": "7.27.1",
|