@opentui/react 0.4.1 → 0.4.3

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.
@@ -166,7 +166,7 @@ import { TextNodeRenderable as TextNodeRenderable2 } from "@opentui/core";
166
166
  // package.json
167
167
  var package_default = {
168
168
  name: "@opentui/react",
169
- version: "0.4.1",
169
+ version: "0.4.3",
170
170
  description: "React renderer for building terminal user interfaces using OpenTUI core",
171
171
  license: "MIT",
172
172
  repository: {
@@ -400,7 +400,9 @@ var hostConfig = {
400
400
  parent.add(child);
401
401
  },
402
402
  removeChild(parent, child) {
403
- parent.remove(child.id);
403
+ if (!child.parent)
404
+ return;
405
+ parent.remove(child);
404
406
  },
405
407
  insertBefore(parent, child, beforeChild) {
406
408
  parent.insertBefore(child, beforeChild);
@@ -409,7 +411,9 @@ var hostConfig = {
409
411
  parent.insertBefore(child, beforeChild);
410
412
  },
411
413
  removeChildFromContainer(parent, child) {
412
- parent.remove(child.id);
414
+ if (!child.parent)
415
+ return;
416
+ parent.remove(child);
413
417
  },
414
418
  prepareForCommit(containerInfo) {
415
419
  return null;
@@ -470,7 +474,7 @@ var hostConfig = {
470
474
  },
471
475
  clearContainer(container) {
472
476
  const children = container.getChildren();
473
- children.forEach((child) => container.remove(child.id));
477
+ children.forEach((child) => container.remove(child));
474
478
  },
475
479
  setCurrentUpdatePriority(newPriority) {
476
480
  currentUpdatePriority = newPriority;
package/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  getComponentCatalogue,
12
12
  jsxDEV,
13
13
  useAppContext
14
- } from "./chunk-fm0c65gm.js";
14
+ } from "./chunk-rm53pqj2.js";
15
15
  import"./chunk-2mx7fq49.js";
16
16
  // src/hooks/use-blur.ts
17
17
  import { useEffect } from "react";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "type": "module",
7
- "version": "0.4.1",
7
+ "version": "0.4.3",
8
8
  "description": "React renderer for building terminal user interfaces using OpenTUI core",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@opentui/core": "0.4.1",
55
+ "@opentui/core": "0.4.3",
56
56
  "react-reconciler": "^0.33.0"
57
57
  },
58
58
  "devDependencies": {
package/test-utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  createRoot
4
- } from "./chunk-fm0c65gm.js";
4
+ } from "./chunk-rm53pqj2.js";
5
5
  import"./chunk-2mx7fq49.js";
6
6
 
7
7
  // src/test-utils.ts