@opentui/react 0.0.0-20260106-bb82df43 → 0.0.0-20260107-eacc730b
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 +10 -11
- package/package.json +2 -2
- package/src/reconciler/renderer.js +10 -11
- package/src/test-utils/test-utils.js +10 -11
package/index.js
CHANGED
|
@@ -207,7 +207,7 @@ var useTimeline = (options = {}) => {
|
|
|
207
207
|
return timeline;
|
|
208
208
|
};
|
|
209
209
|
// src/reconciler/renderer.ts
|
|
210
|
-
import {
|
|
210
|
+
import { engine as engine2 } from "@opentui/core";
|
|
211
211
|
import React2 from "react";
|
|
212
212
|
|
|
213
213
|
// src/components/error-boundary.tsx
|
|
@@ -248,7 +248,7 @@ import { TextNodeRenderable as TextNodeRenderable2 } from "@opentui/core";
|
|
|
248
248
|
// package.json
|
|
249
249
|
var package_default = {
|
|
250
250
|
name: "@opentui/react",
|
|
251
|
-
version: "0.0.0-
|
|
251
|
+
version: "0.0.0-20260107-eacc730b",
|
|
252
252
|
description: "React renderer for building terminal user interfaces using OpenTUI core",
|
|
253
253
|
license: "MIT",
|
|
254
254
|
repository: {
|
|
@@ -634,20 +634,19 @@ var flushSync = _r.flushSyncFromReconciler ?? _r.flushSync;
|
|
|
634
634
|
var { createPortal } = reconciler;
|
|
635
635
|
function createRoot(renderer) {
|
|
636
636
|
let container = null;
|
|
637
|
-
const cleanup = () => {
|
|
638
|
-
if (container) {
|
|
639
|
-
reconciler.updateContainer(null, container, null, () => {});
|
|
640
|
-
reconciler.flushSyncWork();
|
|
641
|
-
container = null;
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
renderer.once(CliRenderEvents.DESTROY, cleanup);
|
|
645
637
|
return {
|
|
646
638
|
render: (node) => {
|
|
647
639
|
engine2.attach(renderer);
|
|
648
640
|
container = _render(React2.createElement(AppContext.Provider, { value: { keyHandler: renderer.keyInput, renderer } }, React2.createElement(ErrorBoundary, null, node)), renderer.root);
|
|
649
641
|
},
|
|
650
|
-
unmount:
|
|
642
|
+
unmount: () => {
|
|
643
|
+
if (!container) {
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
reconciler.updateContainer(null, container, null, () => {});
|
|
647
|
+
reconciler.flushSyncWork();
|
|
648
|
+
container = null;
|
|
649
|
+
}
|
|
651
650
|
};
|
|
652
651
|
}
|
|
653
652
|
|
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.0.0-
|
|
7
|
+
"version": "0.0.0-20260107-eacc730b",
|
|
8
8
|
"description": "React renderer for building terminal user interfaces using OpenTUI core",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@opentui/core": "0.0.0-
|
|
43
|
+
"@opentui/core": "0.0.0-20260107-eacc730b",
|
|
44
44
|
"react-reconciler": "^0.32.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-e11q5a3p.js";
|
|
6
6
|
|
|
7
7
|
// src/reconciler/renderer.ts
|
|
8
|
-
import {
|
|
8
|
+
import { engine } from "@opentui/core";
|
|
9
9
|
import React2 from "react";
|
|
10
10
|
|
|
11
11
|
// src/components/app.tsx
|
|
@@ -53,7 +53,7 @@ import { TextNodeRenderable as TextNodeRenderable2 } from "@opentui/core";
|
|
|
53
53
|
// package.json
|
|
54
54
|
var package_default = {
|
|
55
55
|
name: "@opentui/react",
|
|
56
|
-
version: "0.0.0-
|
|
56
|
+
version: "0.0.0-20260107-eacc730b",
|
|
57
57
|
description: "React renderer for building terminal user interfaces using OpenTUI core",
|
|
58
58
|
license: "MIT",
|
|
59
59
|
repository: {
|
|
@@ -545,20 +545,19 @@ var flushSync = _r.flushSyncFromReconciler ?? _r.flushSync;
|
|
|
545
545
|
var { createPortal } = reconciler;
|
|
546
546
|
function createRoot(renderer) {
|
|
547
547
|
let container = null;
|
|
548
|
-
const cleanup = () => {
|
|
549
|
-
if (container) {
|
|
550
|
-
reconciler.updateContainer(null, container, null, () => {});
|
|
551
|
-
reconciler.flushSyncWork();
|
|
552
|
-
container = null;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
renderer.once(CliRenderEvents.DESTROY, cleanup);
|
|
556
548
|
return {
|
|
557
549
|
render: (node) => {
|
|
558
550
|
engine.attach(renderer);
|
|
559
551
|
container = _render(React2.createElement(AppContext.Provider, { value: { keyHandler: renderer.keyInput, renderer } }, React2.createElement(ErrorBoundary, null, node)), renderer.root);
|
|
560
552
|
},
|
|
561
|
-
unmount:
|
|
553
|
+
unmount: () => {
|
|
554
|
+
if (!container) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
reconciler.updateContainer(null, container, null, () => {});
|
|
558
|
+
reconciler.flushSyncWork();
|
|
559
|
+
container = null;
|
|
560
|
+
}
|
|
562
561
|
};
|
|
563
562
|
}
|
|
564
563
|
export {
|
|
@@ -9,7 +9,7 @@ import { createTestRenderer } from "@opentui/core/testing";
|
|
|
9
9
|
import { act } from "react";
|
|
10
10
|
|
|
11
11
|
// src/reconciler/renderer.ts
|
|
12
|
-
import {
|
|
12
|
+
import { engine } from "@opentui/core";
|
|
13
13
|
import React2 from "react";
|
|
14
14
|
|
|
15
15
|
// src/components/app.tsx
|
|
@@ -57,7 +57,7 @@ import { TextNodeRenderable as TextNodeRenderable2 } from "@opentui/core";
|
|
|
57
57
|
// package.json
|
|
58
58
|
var package_default = {
|
|
59
59
|
name: "@opentui/react",
|
|
60
|
-
version: "0.0.0-
|
|
60
|
+
version: "0.0.0-20260107-eacc730b",
|
|
61
61
|
description: "React renderer for building terminal user interfaces using OpenTUI core",
|
|
62
62
|
license: "MIT",
|
|
63
63
|
repository: {
|
|
@@ -548,20 +548,19 @@ var _r = reconciler;
|
|
|
548
548
|
var flushSync = _r.flushSyncFromReconciler ?? _r.flushSync;
|
|
549
549
|
function createRoot(renderer) {
|
|
550
550
|
let container = null;
|
|
551
|
-
const cleanup = () => {
|
|
552
|
-
if (container) {
|
|
553
|
-
reconciler.updateContainer(null, container, null, () => {});
|
|
554
|
-
reconciler.flushSyncWork();
|
|
555
|
-
container = null;
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
renderer.once(CliRenderEvents.DESTROY, cleanup);
|
|
559
551
|
return {
|
|
560
552
|
render: (node) => {
|
|
561
553
|
engine.attach(renderer);
|
|
562
554
|
container = _render(React2.createElement(AppContext.Provider, { value: { keyHandler: renderer.keyInput, renderer } }, React2.createElement(ErrorBoundary, null, node)), renderer.root);
|
|
563
555
|
},
|
|
564
|
-
unmount:
|
|
556
|
+
unmount: () => {
|
|
557
|
+
if (!container) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
reconciler.updateContainer(null, container, null, () => {});
|
|
561
|
+
reconciler.flushSyncWork();
|
|
562
|
+
container = null;
|
|
563
|
+
}
|
|
565
564
|
};
|
|
566
565
|
}
|
|
567
566
|
|