@opentui/react 0.0.0-20250908-4906ddad

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 ADDED
@@ -0,0 +1,455 @@
1
+ // @bun
2
+ // src/components/index.ts
3
+ import {
4
+ ASCIIFontRenderable,
5
+ BoxRenderable,
6
+ InputRenderable,
7
+ ScrollBoxRenderable,
8
+ SelectRenderable,
9
+ TabSelectRenderable,
10
+ TextRenderable
11
+ } from "@opentui/core";
12
+ var baseComponents = {
13
+ box: BoxRenderable,
14
+ text: TextRenderable,
15
+ input: InputRenderable,
16
+ select: SelectRenderable,
17
+ scrollbox: ScrollBoxRenderable,
18
+ "ascii-font": ASCIIFontRenderable,
19
+ "tab-select": TabSelectRenderable
20
+ };
21
+ var componentCatalogue = { ...baseComponents };
22
+ function extend(objects) {
23
+ Object.assign(componentCatalogue, objects);
24
+ }
25
+ function getComponentCatalogue() {
26
+ return componentCatalogue;
27
+ }
28
+ // src/components/app.tsx
29
+ import { createContext, useContext } from "react";
30
+ var AppContext = createContext({
31
+ keyHandler: null,
32
+ renderer: null
33
+ });
34
+ var useAppContext = () => {
35
+ return useContext(AppContext);
36
+ };
37
+ // src/hooks/use-keyboard.tsx
38
+ import { useEffect } from "react";
39
+
40
+ // src/hooks/use-event.tsx
41
+ import { useCallback, useLayoutEffect, useRef } from "react";
42
+ function useEvent(handler) {
43
+ const handlerRef = useRef(handler);
44
+ useLayoutEffect(() => {
45
+ handlerRef.current = handler;
46
+ });
47
+ return useCallback((...args) => {
48
+ const fn = handlerRef.current;
49
+ return fn(...args);
50
+ }, []);
51
+ }
52
+
53
+ // src/hooks/use-keyboard.tsx
54
+ var useKeyboard = (handler) => {
55
+ const { keyHandler } = useAppContext();
56
+ const stableHandler = useEvent(handler);
57
+ useEffect(() => {
58
+ keyHandler?.on("keypress", stableHandler);
59
+ return () => {
60
+ keyHandler?.off("keypress", stableHandler);
61
+ };
62
+ }, [keyHandler, stableHandler]);
63
+ };
64
+ // src/hooks/use-renderer.tsx
65
+ var useRenderer = () => {
66
+ const { renderer } = useAppContext();
67
+ if (!renderer) {
68
+ throw new Error("Renderer not found.");
69
+ }
70
+ return renderer;
71
+ };
72
+ // src/hooks/use-resize.tsx
73
+ import { useEffect as useEffect2 } from "react";
74
+ var useOnResize = (callback) => {
75
+ const renderer = useRenderer();
76
+ useEffect2(() => {
77
+ renderer.on("resize", callback);
78
+ return () => {
79
+ renderer.off("resize", callback);
80
+ };
81
+ }, [renderer, callback]);
82
+ return renderer;
83
+ };
84
+ // src/hooks/use-terminal-dimensions.tsx
85
+ import { useState } from "react";
86
+ var useTerminalDimensions = () => {
87
+ const renderer = useRenderer();
88
+ const [dimensions, setDimensions] = useState({
89
+ width: renderer.width,
90
+ height: renderer.height
91
+ });
92
+ const cb = (width, height) => {
93
+ setDimensions({ width, height });
94
+ };
95
+ useOnResize(cb);
96
+ return dimensions;
97
+ };
98
+ // src/reconciler/renderer.ts
99
+ import { createCliRenderer, getKeyHandler } from "@opentui/core";
100
+ import React from "react";
101
+
102
+ // src/reconciler/reconciler.ts
103
+ import ReactReconciler from "react-reconciler";
104
+ import { ConcurrentRoot } from "react-reconciler/constants";
105
+
106
+ // src/reconciler/host-config.ts
107
+ import { createContext as createContext2 } from "react";
108
+ import { DefaultEventPriority, NoEventPriority } from "react-reconciler/constants";
109
+
110
+ // src/utils/id.ts
111
+ var idCounter = new Map;
112
+ function getNextId(type) {
113
+ if (!idCounter.has(type)) {
114
+ idCounter.set(type, 0);
115
+ }
116
+ const value = idCounter.get(type) + 1;
117
+ idCounter.set(type, value);
118
+ return `${type}-${value}`;
119
+ }
120
+
121
+ // src/utils/index.ts
122
+ import {
123
+ InputRenderable as InputRenderable2,
124
+ InputRenderableEvents,
125
+ SelectRenderable as SelectRenderable2,
126
+ SelectRenderableEvents,
127
+ StyledText,
128
+ TabSelectRenderable as TabSelectRenderable2,
129
+ TabSelectRenderableEvents,
130
+ TextRenderable as TextRenderable2,
131
+ stringToStyledText
132
+ } from "@opentui/core";
133
+ function initEventListeners(instance, eventName, listener, previousListener) {
134
+ if (previousListener) {
135
+ instance.off(eventName, previousListener);
136
+ }
137
+ if (listener) {
138
+ instance.on(eventName, listener);
139
+ }
140
+ }
141
+ function handleTextChildren(textInstance, children) {
142
+ if (children == null) {
143
+ textInstance.content = stringToStyledText("");
144
+ return;
145
+ }
146
+ if (Array.isArray(children)) {
147
+ const chunks = [];
148
+ for (const child of children) {
149
+ if (typeof child === "string") {
150
+ chunks.push({
151
+ __isChunk: true,
152
+ text: new TextEncoder().encode(child),
153
+ plainText: child
154
+ });
155
+ } else if (child && typeof child === "object" && "__isChunk" in child) {
156
+ chunks.push(child);
157
+ } else if (child instanceof StyledText) {
158
+ chunks.push(...child.chunks);
159
+ } else if (child != null) {
160
+ const stringValue = String(child);
161
+ chunks.push({
162
+ __isChunk: true,
163
+ text: new TextEncoder().encode(stringValue),
164
+ plainText: stringValue
165
+ });
166
+ }
167
+ }
168
+ textInstance.content = new StyledText(chunks);
169
+ return;
170
+ }
171
+ if (typeof children === "string") {
172
+ textInstance.content = stringToStyledText(children);
173
+ } else if (children && typeof children === "object" && "__isChunk" in children) {
174
+ textInstance.content = new StyledText([children]);
175
+ } else if (children instanceof StyledText) {
176
+ textInstance.content = children;
177
+ } else {
178
+ textInstance.content = stringToStyledText(String(children));
179
+ }
180
+ }
181
+ function setStyle(instance, styles, oldStyles) {
182
+ if (styles && typeof styles === "object") {
183
+ if (oldStyles != null) {
184
+ for (const styleName in styles) {
185
+ const value = styles[styleName];
186
+ if (styles.hasOwnProperty(styleName) && oldStyles[styleName] !== value) {
187
+ instance[styleName] = value;
188
+ }
189
+ }
190
+ } else {
191
+ for (const styleName in styles) {
192
+ if (styles.hasOwnProperty(styleName)) {
193
+ const value = styles[styleName];
194
+ instance[styleName] = value;
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ function setProperty(instance, type, propKey, propValue, oldPropValue) {
201
+ switch (propKey) {
202
+ case "onChange":
203
+ if (instance instanceof InputRenderable2) {
204
+ initEventListeners(instance, InputRenderableEvents.CHANGE, propValue, oldPropValue);
205
+ } else if (instance instanceof SelectRenderable2) {
206
+ initEventListeners(instance, SelectRenderableEvents.SELECTION_CHANGED, propValue, oldPropValue);
207
+ } else if (instance instanceof TabSelectRenderable2) {
208
+ initEventListeners(instance, TabSelectRenderableEvents.SELECTION_CHANGED, propValue, oldPropValue);
209
+ }
210
+ break;
211
+ case "onInput":
212
+ if (instance instanceof InputRenderable2) {
213
+ initEventListeners(instance, InputRenderableEvents.INPUT, propValue, oldPropValue);
214
+ }
215
+ break;
216
+ case "onSubmit":
217
+ if (instance instanceof InputRenderable2) {
218
+ initEventListeners(instance, InputRenderableEvents.ENTER, propValue, oldPropValue);
219
+ }
220
+ break;
221
+ case "onSelect":
222
+ if (instance instanceof SelectRenderable2) {
223
+ initEventListeners(instance, SelectRenderableEvents.ITEM_SELECTED, propValue, oldPropValue);
224
+ } else if (instance instanceof TabSelectRenderable2) {
225
+ initEventListeners(instance, TabSelectRenderableEvents.ITEM_SELECTED, propValue, oldPropValue);
226
+ }
227
+ break;
228
+ case "focused":
229
+ if (!!propValue) {
230
+ instance.focus();
231
+ } else {
232
+ instance.blur();
233
+ }
234
+ break;
235
+ case "style":
236
+ setStyle(instance, propValue, oldPropValue);
237
+ break;
238
+ case "children":
239
+ if (type === "text" && instance instanceof TextRenderable2) {
240
+ handleTextChildren(instance, propValue);
241
+ }
242
+ break;
243
+ default:
244
+ instance[propKey] = propValue;
245
+ }
246
+ }
247
+ function setInitialProperties(instance, type, props) {
248
+ for (const propKey in props) {
249
+ if (!props.hasOwnProperty(propKey)) {
250
+ continue;
251
+ }
252
+ const propValue = props[propKey];
253
+ if (propValue == null) {
254
+ continue;
255
+ }
256
+ setProperty(instance, type, propKey, propValue);
257
+ }
258
+ }
259
+ function updateProperties(instance, type, oldProps, newProps) {
260
+ for (const propKey in oldProps) {
261
+ const oldProp = oldProps[propKey];
262
+ if (oldProps.hasOwnProperty(propKey) && oldProp != null && !newProps.hasOwnProperty(propKey)) {
263
+ setProperty(instance, type, propKey, null, oldProp);
264
+ }
265
+ }
266
+ for (const propKey in newProps) {
267
+ const newProp = newProps[propKey];
268
+ const oldProp = oldProps[propKey];
269
+ if (newProps.hasOwnProperty(propKey) && newProp !== oldProp && (newProp != null || oldProp != null)) {
270
+ setProperty(instance, type, propKey, newProp, oldProp);
271
+ }
272
+ }
273
+ }
274
+
275
+ // src/reconciler/host-config.ts
276
+ var currentUpdatePriority = NoEventPriority;
277
+ var hostConfig = {
278
+ supportsMutation: true,
279
+ supportsPersistence: false,
280
+ supportsHydration: false,
281
+ createInstance(type, props, rootContainerInstance, hostContext) {
282
+ const id = getNextId(type);
283
+ const components = getComponentCatalogue();
284
+ if (!components[type]) {
285
+ throw new Error(`[Reconciler] Unknown component type: ${type}`);
286
+ }
287
+ return new components[type](rootContainerInstance.ctx, {
288
+ id,
289
+ ...props
290
+ });
291
+ },
292
+ appendChild(parent, child) {
293
+ parent.add(child);
294
+ },
295
+ removeChild(parent, child) {
296
+ parent.remove(child.id);
297
+ },
298
+ insertBefore(parent, child, beforeChild) {
299
+ parent.insertBefore(child, beforeChild);
300
+ },
301
+ insertInContainerBefore(parent, child, beforeChild) {
302
+ parent.insertBefore(child, beforeChild);
303
+ },
304
+ removeChildFromContainer(parent, child) {
305
+ parent.remove(child.id);
306
+ },
307
+ prepareForCommit(containerInfo) {
308
+ return null;
309
+ },
310
+ resetAfterCommit(containerInfo) {
311
+ containerInfo.requestRender();
312
+ },
313
+ getRootHostContext(rootContainerInstance) {
314
+ return {};
315
+ },
316
+ getChildHostContext(parentHostContext, type, rootContainerInstance) {
317
+ return parentHostContext;
318
+ },
319
+ shouldSetTextContent(type, props) {
320
+ if (type === "text") {
321
+ return true;
322
+ }
323
+ return false;
324
+ },
325
+ createTextInstance(text, rootContainerInstance, hostContext) {
326
+ const components = getComponentCatalogue();
327
+ return new components["text"](rootContainerInstance.ctx, {
328
+ id: getNextId("text"),
329
+ content: text
330
+ });
331
+ },
332
+ scheduleTimeout: setTimeout,
333
+ cancelTimeout: clearTimeout,
334
+ noTimeout: -1,
335
+ shouldAttemptEagerTransition() {
336
+ return false;
337
+ },
338
+ finalizeInitialChildren(instance, type, props, rootContainerInstance, hostContext) {
339
+ setInitialProperties(instance, type, props);
340
+ return false;
341
+ },
342
+ commitMount(instance, type, props, internalInstanceHandle) {},
343
+ commitUpdate(instance, type, oldProps, newProps, internalInstanceHandle) {
344
+ updateProperties(instance, type, oldProps, newProps);
345
+ instance.requestRender();
346
+ },
347
+ commitTextUpdate(textInstance, oldText, newText) {
348
+ textInstance.content = newText;
349
+ textInstance.requestRender();
350
+ },
351
+ appendChildToContainer(container, child) {
352
+ container.add(child);
353
+ },
354
+ appendInitialChild(parent, child) {
355
+ parent.add(child);
356
+ },
357
+ hideInstance(instance) {
358
+ instance.visible = false;
359
+ instance.requestRender();
360
+ },
361
+ unhideInstance(instance, props) {
362
+ instance.visible = true;
363
+ instance.requestRender();
364
+ },
365
+ hideTextInstance(textInstance) {
366
+ textInstance.visible = false;
367
+ textInstance.requestRender();
368
+ },
369
+ unhideTextInstance(textInstance, text) {
370
+ textInstance.visible = true;
371
+ textInstance.requestRender();
372
+ },
373
+ clearContainer(container) {
374
+ const children = container.getChildren();
375
+ children.forEach((child) => container.remove(child.id));
376
+ },
377
+ setCurrentUpdatePriority(newPriority) {
378
+ currentUpdatePriority = newPriority;
379
+ },
380
+ getCurrentUpdatePriority: () => currentUpdatePriority,
381
+ resolveUpdatePriority() {
382
+ if (currentUpdatePriority !== NoEventPriority) {
383
+ return currentUpdatePriority;
384
+ }
385
+ return DefaultEventPriority;
386
+ },
387
+ maySuspendCommit() {
388
+ return false;
389
+ },
390
+ NotPendingTransition: null,
391
+ HostTransitionContext: createContext2(null),
392
+ resetFormInstance() {},
393
+ requestPostPaintCallback() {},
394
+ trackSchedulerEvent() {},
395
+ resolveEventType() {
396
+ return null;
397
+ },
398
+ resolveEventTimeStamp() {
399
+ return -1.1;
400
+ },
401
+ preloadInstance() {
402
+ return true;
403
+ },
404
+ startSuspendingCommit() {},
405
+ suspendInstance() {},
406
+ waitForCommitToBeReady() {
407
+ return null;
408
+ },
409
+ detachDeletedInstance(instance) {
410
+ if (!instance.parent) {
411
+ instance.destroy();
412
+ }
413
+ },
414
+ getPublicInstance(instance) {
415
+ return instance;
416
+ },
417
+ preparePortalMount(containerInfo) {},
418
+ isPrimaryRenderer: true,
419
+ getInstanceFromNode() {
420
+ return null;
421
+ },
422
+ beforeActiveInstanceBlur() {},
423
+ afterActiveInstanceBlur() {},
424
+ prepareScopeUpdate() {},
425
+ getInstanceFromScope() {
426
+ return null;
427
+ }
428
+ };
429
+
430
+ // src/reconciler/reconciler.ts
431
+ var reconciler = ReactReconciler(hostConfig);
432
+ function _render(element, root) {
433
+ const container = reconciler.createContainer(root, ConcurrentRoot, null, false, null, "", console.error, console.error, console.error, console.error, null);
434
+ reconciler.updateContainer(element, container, null, () => {});
435
+ }
436
+
437
+ // src/reconciler/renderer.ts
438
+ var keyHandler = getKeyHandler();
439
+ async function render(node, rendererConfig = {}) {
440
+ const renderer = await createCliRenderer(rendererConfig);
441
+ _render(React.createElement(AppContext.Provider, { value: { keyHandler, renderer } }, node), renderer.root);
442
+ }
443
+ export {
444
+ useTerminalDimensions,
445
+ useRenderer,
446
+ useOnResize,
447
+ useKeyboard,
448
+ useAppContext,
449
+ render,
450
+ getComponentCatalogue,
451
+ extend,
452
+ componentCatalogue,
453
+ baseComponents,
454
+ AppContext
455
+ };
@@ -0,0 +1,2 @@
1
+ export { Fragment, jsxDEV } from "react/jsx-dev-runtime"
2
+ export type * from "./jsx-namespace.d.ts"
@@ -0,0 +1 @@
1
+ export { Fragment, jsxDEV } from "react/jsx-dev-runtime"
@@ -0,0 +1,38 @@
1
+ import type * as React from "react"
2
+ import type {
3
+ AsciiFontProps,
4
+ BoxProps,
5
+ ExtendedIntrinsicElements,
6
+ InputProps,
7
+ OpenTUIComponents,
8
+ ScrollBoxProps,
9
+ SelectProps,
10
+ TabSelectProps,
11
+ TextProps,
12
+ } from "./src/types/components"
13
+
14
+ export namespace JSX {
15
+ type Element = React.ReactNode
16
+
17
+ interface ElementClass extends React.ComponentClass<any> {
18
+ render(): React.ReactNode
19
+ }
20
+
21
+ interface ElementAttributesProperty {
22
+ props: {}
23
+ }
24
+
25
+ interface ElementChildrenAttribute {
26
+ children: {}
27
+ }
28
+
29
+ interface IntrinsicElements extends React.JSX.IntrinsicElements, ExtendedIntrinsicElements<OpenTUIComponents> {
30
+ box: BoxProps
31
+ text: TextProps
32
+ input: InputProps
33
+ select: SelectProps
34
+ scrollbox: ScrollBoxProps
35
+ "ascii-font": AsciiFontProps
36
+ "tab-select": TabSelectProps
37
+ }
38
+ }
@@ -0,0 +1,2 @@
1
+ export { Fragment, jsx, jsxs } from "react/jsx-runtime"
2
+ export type * from "./jsx-namespace.d.ts"
package/jsx-runtime.js ADDED
@@ -0,0 +1 @@
1
+ export { Fragment, jsx, jsxs } from "react/jsx-runtime"
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@opentui/react",
3
+ "module": "index.js",
4
+ "main": "index.js",
5
+ "types": "src/index.d.ts",
6
+ "type": "module",
7
+ "version": "0.0.0-20250908-4906ddad",
8
+ "description": "React renderer for building terminal user interfaces using OpenTUI core",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/sst/opentui",
13
+ "directory": "packages/react"
14
+ },
15
+ "exports": {
16
+ ".": {
17
+ "types": "./src/index.d.ts",
18
+ "import": "./index.js",
19
+ "require": "./index.js"
20
+ },
21
+ "./renderer": {
22
+ "types": "./src/reconciler/renderer.d.ts",
23
+ "import": "./src/reconciler/renderer.js",
24
+ "require": "./src/reconciler/renderer.js"
25
+ },
26
+ "./jsx-runtime": {
27
+ "types": "./jsx-runtime.d.ts",
28
+ "import": "./jsx-runtime.js",
29
+ "require": "./jsx-runtime.js"
30
+ },
31
+ "./jsx-dev-runtime": {
32
+ "types": "./jsx-dev-runtime.d.ts",
33
+ "import": "./jsx-dev-runtime.js",
34
+ "require": "./jsx-dev-runtime.js"
35
+ }
36
+ },
37
+ "dependencies": {
38
+ "@opentui/core": "0.0.0-20250908-4906ddad",
39
+ "react-reconciler": "^0.32.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/bun": "latest",
43
+ "@types/react-reconciler": "^0.32.0"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=19.0.0",
47
+ "typescript": "^5"
48
+ }
49
+ }
@@ -0,0 +1,8 @@
1
+ import type { CliRenderer, KeyHandler } from "@opentui/core";
2
+ interface AppContext {
3
+ keyHandler: KeyHandler | null;
4
+ renderer: CliRenderer | null;
5
+ }
6
+ export declare const AppContext: import("react").Context<AppContext>;
7
+ export declare const useAppContext: () => AppContext;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ import { ASCIIFontRenderable, BoxRenderable, InputRenderable, ScrollBoxRenderable, SelectRenderable, TabSelectRenderable, TextRenderable } from "@opentui/core";
2
+ import type { RenderableConstructor } from "../types/components";
3
+ export declare const baseComponents: {
4
+ box: typeof BoxRenderable;
5
+ text: typeof TextRenderable;
6
+ input: typeof InputRenderable;
7
+ select: typeof SelectRenderable;
8
+ scrollbox: typeof ScrollBoxRenderable;
9
+ "ascii-font": typeof ASCIIFontRenderable;
10
+ "tab-select": typeof TabSelectRenderable;
11
+ };
12
+ type ComponentCatalogue = Record<string, RenderableConstructor>;
13
+ export declare const componentCatalogue: ComponentCatalogue;
14
+ /**
15
+ * Extend the component catalogue with new renderable components
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * // Extend with an object of components
20
+ * extend({
21
+ * consoleButton: ConsoleButtonRenderable,
22
+ * customBox: CustomBoxRenderable
23
+ * })
24
+ * ```
25
+ */
26
+ export declare function extend<T extends ComponentCatalogue>(objects: T): void;
27
+ export declare function getComponentCatalogue(): ComponentCatalogue;
28
+ export type { ExtendedComponentProps, ExtendedIntrinsicElements, RenderableConstructor } from "../types/components";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Returns a stable callback that always calls the latest version of the provided handler.
3
+ * This prevents unnecessary re-renders and effect re-runs while ensuring the callback
4
+ * always has access to the latest props and state.
5
+ *
6
+ * Useful for event handlers that need to be passed to effects with empty dependency arrays
7
+ * or memoized child components.
8
+ */
9
+ export declare function useEvent<T extends (...args: any[]) => any>(handler: T): T;
@@ -0,0 +1,2 @@
1
+ import type { ParsedKey } from "@opentui/core";
2
+ export declare const useKeyboard: (handler: (key: ParsedKey) => void) => void;
@@ -0,0 +1 @@
1
+ export declare const useRenderer: () => import("@opentui/core").CliRenderer;
@@ -0,0 +1 @@
1
+ export declare const useOnResize: (callback: (width: number, height: number) => void) => import("@opentui/core").CliRenderer;
@@ -0,0 +1,4 @@
1
+ export declare const useTerminalDimensions: () => {
2
+ width: number;
3
+ height: number;
4
+ };
package/src/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export * from "./components";
2
+ export * from "./components/app";
3
+ export * from "./hooks/use-keyboard";
4
+ export * from "./hooks/use-renderer";
5
+ export * from "./hooks/use-resize";
6
+ export * from "./hooks/use-terminal-dimensions";
7
+ export * from "./reconciler/renderer";
8
+ export * from "./types/components";
@@ -0,0 +1,9 @@
1
+ import type { HostConfig } from "react-reconciler";
2
+ import type { Container, HostContext, Instance, Props, PublicInstance, TextInstance, Type } from "../types/host";
3
+ export declare const hostConfig: HostConfig<Type, Props, Container, Instance, TextInstance, unknown, // SuspenseInstance
4
+ unknown, // HydratableInstance
5
+ unknown, // FormInstance
6
+ PublicInstance, HostContext, unknown, // ChildSet
7
+ unknown, // TimeoutHandle
8
+ unknown, // NoTimeout
9
+ unknown>;
@@ -0,0 +1,5 @@
1
+ import type { RootRenderable } from "@opentui/core";
2
+ import React from "react";
3
+ import ReactReconciler from "react-reconciler";
4
+ export declare const reconciler: ReactReconciler.Reconciler<RootRenderable, import("@opentui/core").Renderable, import("@opentui/core").TextRenderable, unknown, unknown, import("@opentui/core").Renderable>;
5
+ export declare function _render(element: React.ReactNode, root: RootRenderable): void;
@@ -0,0 +1,3 @@
1
+ import { type CliRendererConfig } from "@opentui/core";
2
+ import { type ReactNode } from "react";
3
+ export declare function render(node: ReactNode, rendererConfig?: CliRendererConfig): Promise<void>;