@visulima/tui 1.0.8 → 2.0.1
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/CHANGELOG.md +4 -0
- package/LICENSE.md +54 -2444
- package/MIGRATION-GUIDE.md +164 -0
- package/README.md +15 -12
- package/dist/components/box.d.ts +26 -27
- package/dist/components/canvas.d.ts +26 -31
- package/dist/components/canvas.js +1 -1
- package/dist/components/cursor.d.ts +40 -46
- package/dist/components/error-boundary.d.ts +16 -0
- package/dist/components/error-boundary.js +1 -0
- package/dist/components/error-overview.d.ts +6 -0
- package/dist/components/error-overview.js +1 -0
- package/dist/components/newline.d.ts +6 -8
- package/dist/components/spacer.d.ts +4 -4
- package/dist/components/static-render.d.ts +10 -42
- package/dist/components/static.d.ts +13 -14
- package/dist/components/text.d.ts +34 -48
- package/dist/components/transform.d.ts +7 -11
- package/dist/core/index.d.ts +11 -12
- package/dist/core/index.js +1 -1
- package/dist/ink/canvas/index.d.ts +24 -0
- package/dist/ink/canvas/index.js +1 -0
- package/dist/ink/hooks/use-animation.d.ts +22 -22
- package/dist/ink/hooks/use-app.d.ts +3 -34
- package/dist/ink/hooks/use-app.js +1 -1
- package/dist/ink/hooks/use-box-metrics.d.ts +17 -18
- package/dist/ink/hooks/use-clipboard.d.ts +16 -16
- package/dist/ink/hooks/use-color-blindness.d.ts +16 -16
- package/dist/ink/hooks/use-console-capture.d.ts +19 -19
- package/dist/ink/hooks/use-cursor.d.ts +7 -7
- package/dist/ink/hooks/use-focus-manager.d.ts +25 -25
- package/dist/ink/hooks/use-focus.d.ts +14 -18
- package/dist/ink/hooks/use-form.d.ts +32 -32
- package/dist/ink/hooks/use-hotkey.d.ts +17 -17
- package/dist/ink/hooks/use-input.d.ts +92 -92
- package/dist/ink/hooks/use-input.js +2 -2
- package/dist/ink/hooks/use-interval.d.ts +14 -14
- package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +3 -3
- package/dist/ink/hooks/use-key-bindings.d.ts +32 -32
- package/dist/ink/hooks/use-key-chord.d.ts +15 -15
- package/dist/ink/hooks/use-paste.d.ts +38 -38
- package/dist/ink/hooks/use-paste.js +1 -1
- package/dist/ink/hooks/use-persistent-state.d.ts +46 -46
- package/dist/ink/hooks/use-persistent-state.js +2 -2
- package/dist/ink/hooks/use-scroll-acceleration.d.ts +24 -24
- package/dist/ink/hooks/use-scroll-input.d.ts +15 -15
- package/dist/ink/hooks/use-stderr.d.ts +6 -6
- package/dist/ink/hooks/use-stderr.js +1 -1
- package/dist/ink/hooks/use-stdin.d.ts +10 -10
- package/dist/ink/hooks/use-stdin.js +1 -1
- package/dist/ink/hooks/use-stdout.d.ts +6 -6
- package/dist/ink/hooks/use-stdout.js +1 -1
- package/dist/ink/hooks/use-stopwatch.d.ts +12 -12
- package/dist/ink/hooks/use-terminal-palette.d.ts +11 -11
- package/dist/ink/hooks/use-text-buffer.d.ts +2 -2
- package/dist/ink/hooks/use-text-selection.d.ts +19 -20
- package/dist/ink/hooks/use-timeout.d.ts +11 -11
- package/dist/ink/hooks/use-timer.d.ts +19 -19
- package/dist/ink/hooks/use-window-size.d.ts +8 -8
- package/dist/ink/hooks/use-window-size.js +1 -1
- package/dist/ink/index.d.ts +110 -123
- package/dist/ink/index.js +1 -1
- package/dist/ink/mouse/use-element-position.d.ts +7 -8
- package/dist/ink/mouse/use-mouse-action.d.ts +1 -1
- package/dist/ink/mouse/use-mouse-position.d.ts +1 -1
- package/dist/ink/mouse/use-mouse.d.ts +1 -1
- package/dist/ink/mouse/use-on-mouse-click.d.ts +4 -5
- package/dist/ink/mouse/use-on-mouse-hover.d.ts +3 -4
- package/dist/ink/mouse/use-on-mouse-state.d.ts +3 -4
- package/dist/ink/public/cursor.d.ts +47 -0
- package/dist/ink/public/cursor.js +1 -0
- package/dist/ink/public/dom.d.ts +6 -0
- package/dist/ink/public/dom.js +0 -0
- package/dist/ink/public/highlighter.d.ts +44 -0
- package/dist/ink/public/highlighter.js +1 -0
- package/dist/ink/public/input.d.ts +14 -0
- package/dist/ink/public/input.js +1 -0
- package/dist/ink/public/styles.d.ts +4 -0
- package/dist/ink/public/styles.js +0 -0
- package/dist/ink/public/utils.d.ts +5 -0
- package/dist/ink/public/utils.js +1 -0
- package/dist/packem_chunks/devtools.js +1 -1
- package/dist/packem_shared/{DevTools-k6uiVzqv.js → DevTools-BxD3PYAN.js} +1 -1
- package/dist/packem_shared/InputParser-CiBitCva.js +2 -0
- package/dist/packem_shared/MouseProvider-DOcWCRVq.js +1 -0
- package/dist/packem_shared/{Renderer-DsskdkUd.js → Renderer-BeS49FNq.js} +1 -1
- package/dist/packem_shared/TuiApp-CCVaiKbf.js +1 -0
- package/dist/packem_shared/app-context-DTm1_XBA.js +1 -0
- package/dist/packem_shared/app-context.d-DMLw5Nxy.d.ts +56 -0
- package/dist/packem_shared/boxes-DyY_LXCi.js +1 -0
- package/dist/packem_shared/buffer.d-CttIC480.d.ts +67 -0
- package/dist/packem_shared/buildCursorOnlySequence-CerkmjWt.js +1 -0
- package/dist/packem_shared/clipboard.d-nDPQkZ2H.d.ts +23 -0
- package/dist/packem_shared/color-matrix.d-sTqnJ23h.d.ts +50 -0
- package/dist/packem_shared/{braille-ch3O5D7I.js → createBrailleGrid-BTOQrujS.js} +1 -1
- package/dist/packem_shared/createCanvasBuffer-CL6sAM-A.js +1 -0
- package/dist/packem_shared/{createInlineLoop-BT40Wpmx.js → createInlineLoop-DnEvE2eM.js} +1 -1
- package/dist/packem_shared/disposeHighlighter-D9OkrhwX.js +1 -0
- package/dist/packem_shared/{dom.d-B4kXbaVY.d.ts → dom.d-CLGlidfI.d.ts} +140 -154
- package/dist/packem_shared/formatDuration-Bdx4ZgRh.js +1 -0
- package/dist/packem_shared/index-Dl9I2_QH.js +75 -0
- package/dist/packem_shared/input.d-Bb8pWHvp.d.ts +172 -0
- package/dist/packem_shared/{input-utils-BSWCb4F_.js → isControlCharacter-uDgBe_32.js} +1 -1
- package/dist/packem_shared/load-native-root-binding-CxJnHcac.js +1 -0
- package/dist/packem_shared/{mouse-context.d-BfL9xGk_.d.ts → mouse-context.d-W-nszUps.d.ts} +8 -8
- package/dist/packem_shared/reconciler-DkwOtC5B.js +1 -0
- package/dist/packem_shared/render-CuCo-R-l.js +24 -0
- package/dist/packem_shared/{render-DFZ8NHlG.js → render-DtQd8qQq.js} +1 -1
- package/dist/packem_shared/render.d-DjQhFsiN.d.ts +435 -0
- package/dist/packem_shared/{renderToString-DwXFY8Qh.js → renderToString-B1LgWcJe.js} +1 -1
- package/dist/packem_shared/{renderToString-L_bpw4OQ.js → renderToString-DkTmJPaS.js} +1 -1
- package/dist/packem_shared/renderToken-DjiQ6dfv.js +1 -0
- package/dist/packem_shared/renderTreeToBuffer-BpSD0sBJ.js +2 -0
- package/dist/packem_shared/{renderer-k-xShm1P.js → renderer-Cs0KEr1o.js} +4 -4
- package/dist/packem_shared/{selection.d-CI3_p8wg.d.ts → selection.d-BSAWa4ey.d.ts} +16 -16
- package/dist/packem_shared/stderr-context-CR2LLec6.js +1 -0
- package/dist/packem_shared/stdin-context-BjMA9Sbi.js +1 -0
- package/dist/packem_shared/stdout-context-DAAlQct2.js +1 -0
- package/dist/packem_shared/styles.d-CKGQFfm4.d.ts +485 -0
- package/dist/packem_shared/{terminal-palette.d-D2SQjfn-.d.ts → terminal-palette.d-JbWHISW-.d.ts} +7 -7
- package/dist/packem_shared/utils-CVgM8kTn.js +1 -0
- package/dist/react/index.d.ts +160 -179
- package/dist/react/index.js +1 -1
- package/dist/testing/index.d.ts +152 -152
- package/dist/testing/index.js +1 -1
- package/index.js +52 -52
- package/package.json +49 -384
- package/dist/components/accordion.d.ts +0 -59
- package/dist/components/accordion.js +0 -1
- package/dist/components/alert.d.ts +0 -26
- package/dist/components/alert.js +0 -1
- package/dist/components/animate-presence.d.ts +0 -18
- package/dist/components/animate-presence.js +0 -1
- package/dist/components/approval-prompt.d.ts +0 -65
- package/dist/components/approval-prompt.js +0 -1
- package/dist/components/area-chart.d.ts +0 -66
- package/dist/components/area-chart.js +0 -1
- package/dist/components/badge.d.ts +0 -22
- package/dist/components/badge.js +0 -1
- package/dist/components/bar-chart.d.ts +0 -67
- package/dist/components/bar-chart.js +0 -1
- package/dist/components/big-text.d.ts +0 -81
- package/dist/components/big-text.js +0 -1
- package/dist/components/blink-dot.d.ts +0 -36
- package/dist/components/blink-dot.js +0 -1
- package/dist/components/breadcrumb.d.ts +0 -33
- package/dist/components/breadcrumb.js +0 -1
- package/dist/components/button.d.ts +0 -45
- package/dist/components/button.js +0 -1
- package/dist/components/calendar.d.ts +0 -72
- package/dist/components/calendar.js +0 -1
- package/dist/components/card.d.ts +0 -57
- package/dist/components/card.js +0 -1
- package/dist/components/checkbox.d.ts +0 -48
- package/dist/components/checkbox.js +0 -1
- package/dist/components/code.d.ts +0 -48
- package/dist/components/code.js +0 -2
- package/dist/components/collapsible.d.ts +0 -53
- package/dist/components/collapsible.js +0 -1
- package/dist/components/command-block.d.ts +0 -47
- package/dist/components/command-block.js +0 -4
- package/dist/components/command-palette.d.ts +0 -82
- package/dist/components/command-palette.js +0 -1
- package/dist/components/confirm-dialog.d.ts +0 -75
- package/dist/components/confirm-dialog.js +0 -1
- package/dist/components/confirm-input.d.ts +0 -38
- package/dist/components/confirm-input.js +0 -1
- package/dist/components/console-overlay.d.ts +0 -54
- package/dist/components/console-overlay.js +0 -1
- package/dist/components/content-switcher.d.ts +0 -57
- package/dist/components/content-switcher.js +0 -1
- package/dist/components/controlled-scroll-view.d.ts +0 -61
- package/dist/components/controlled-scroll-view.js +0 -1
- package/dist/components/date-picker.d.ts +0 -65
- package/dist/components/date-picker.js +0 -1
- package/dist/components/definition-list.d.ts +0 -44
- package/dist/components/definition-list.js +0 -1
- package/dist/components/dialog.d.ts +0 -117
- package/dist/components/dialog.js +0 -1
- package/dist/components/diff-view.d.ts +0 -85
- package/dist/components/diff-view.js +0 -1
- package/dist/components/divider.d.ts +0 -49
- package/dist/components/divider.js +0 -1
- package/dist/components/file-picker-entry.d.ts +0 -104
- package/dist/components/file-picker-entry.js +0 -1
- package/dist/components/form.d.ts +0 -81
- package/dist/components/form.js +0 -1
- package/dist/components/gauge.d.ts +0 -87
- package/dist/components/gauge.js +0 -1
- package/dist/components/gradient.d.ts +0 -42
- package/dist/components/gradient.js +0 -1
- package/dist/components/heading.d.ts +0 -33
- package/dist/components/heading.js +0 -1
- package/dist/components/heatmap.d.ts +0 -62
- package/dist/components/heatmap.js +0 -1
- package/dist/components/help.d.ts +0 -52
- package/dist/components/help.js +0 -1
- package/dist/components/histogram.d.ts +0 -62
- package/dist/components/histogram.js +0 -1
- package/dist/components/kbd.d.ts +0 -31
- package/dist/components/kbd.js +0 -1
- package/dist/components/line-chart.d.ts +0 -109
- package/dist/components/line-chart.js +0 -1
- package/dist/components/link.d.ts +0 -38
- package/dist/components/link.js +0 -1
- package/dist/components/loading-indicator.d.ts +0 -29
- package/dist/components/loading-indicator.js +0 -1
- package/dist/components/markdown.d.ts +0 -40
- package/dist/components/markdown.js +0 -1
- package/dist/components/masked-input.d.ts +0 -50
- package/dist/components/masked-input.js +0 -1
- package/dist/components/menu.d.ts +0 -78
- package/dist/components/menu.js +0 -1
- package/dist/components/message-bubble.d.ts +0 -43
- package/dist/components/message-bubble.js +0 -1
- package/dist/components/model-badge.d.ts +0 -39
- package/dist/components/model-badge.js +0 -1
- package/dist/components/multi-select.d.ts +0 -65
- package/dist/components/multi-select.js +0 -1
- package/dist/components/operation-tree.d.ts +0 -49
- package/dist/components/operation-tree.js +0 -1
- package/dist/components/option-list.d.ts +0 -47
- package/dist/components/option-list.js +0 -1
- package/dist/components/ordered-list.d.ts +0 -24
- package/dist/components/ordered-list.js +0 -1
- package/dist/components/paginator.d.ts +0 -69
- package/dist/components/paginator.js +0 -1
- package/dist/components/paragraph.d.ts +0 -38
- package/dist/components/paragraph.js +0 -1
- package/dist/components/placeholder.d.ts +0 -55
- package/dist/components/placeholder.js +0 -1
- package/dist/components/progress-bar.d.ts +0 -56
- package/dist/components/progress-bar.js +0 -1
- package/dist/components/radio-group.d.ts +0 -74
- package/dist/components/radio-group.js +0 -1
- package/dist/components/scatter-plot.d.ts +0 -35
- package/dist/components/scatter-plot.js +0 -1
- package/dist/components/scroll-bar-box.d.ts +0 -37
- package/dist/components/scroll-bar-box.js +0 -1
- package/dist/components/scroll-bar.d.ts +0 -25
- package/dist/components/scroll-bar.js +0 -1
- package/dist/components/scroll-list.d.ts +0 -20
- package/dist/components/scroll-list.js +0 -1
- package/dist/components/scroll-view.d.ts +0 -10
- package/dist/components/scroll-view.js +0 -1
- package/dist/components/search-input.d.ts +0 -55
- package/dist/components/search-input.js +0 -1
- package/dist/components/select-input-indicator.d.ts +0 -32
- package/dist/components/select-input-indicator.js +0 -1
- package/dist/components/select-input-item.d.ts +0 -41
- package/dist/components/select-input-item.js +0 -1
- package/dist/components/select-input.d.ts +0 -110
- package/dist/components/select-input.js +0 -1
- package/dist/components/shimmer-text.d.ts +0 -47
- package/dist/components/shimmer-text.js +0 -1
- package/dist/components/slider.d.ts +0 -103
- package/dist/components/slider.js +0 -1
- package/dist/components/sparkline.d.ts +0 -35
- package/dist/components/sparkline.js +0 -1
- package/dist/components/spinner.d.ts +0 -17
- package/dist/components/spinner.js +0 -1
- package/dist/components/status-line.d.ts +0 -37
- package/dist/components/status-line.js +0 -1
- package/dist/components/status-message.d.ts +0 -21
- package/dist/components/status-message.js +0 -1
- package/dist/components/stepper.d.ts +0 -48
- package/dist/components/stepper.js +0 -1
- package/dist/components/stopwatch.d.ts +0 -49
- package/dist/components/stopwatch.js +0 -1
- package/dist/components/streaming-text.d.ts +0 -46
- package/dist/components/streaming-text.js +0 -1
- package/dist/components/switch.d.ts +0 -55
- package/dist/components/switch.js +0 -1
- package/dist/components/tab.d.ts +0 -19
- package/dist/components/tab.js +0 -1
- package/dist/components/table.d.ts +0 -119
- package/dist/components/table.js +0 -1
- package/dist/components/tabs.d.ts +0 -107
- package/dist/components/tabs.js +0 -1
- package/dist/components/tag.d.ts +0 -35
- package/dist/components/tag.js +0 -1
- package/dist/components/text-input.d.ts +0 -48
- package/dist/components/text-input.js +0 -1
- package/dist/components/textarea.d.ts +0 -68
- package/dist/components/textarea.js +0 -2
- package/dist/components/timer.d.ts +0 -59
- package/dist/components/timer.js +0 -1
- package/dist/components/toast.d.ts +0 -49
- package/dist/components/toast.js +0 -1
- package/dist/components/tooltip.d.ts +0 -43
- package/dist/components/tooltip.js +0 -1
- package/dist/components/transition.d.ts +0 -74
- package/dist/components/transition.js +0 -1
- package/dist/components/tree-view-entry.d.ts +0 -357
- package/dist/components/tree-view-entry.js +0 -1
- package/dist/components/unordered-list.d.ts +0 -30
- package/dist/components/unordered-list.js +0 -1
- package/dist/ink/hooks/use-linked-scroll.d.ts +0 -49
- package/dist/ink/hooks/use-linked-scroll.js +0 -1
- package/dist/packem_shared/ControlledScrollView-Cn4byU2n.js +0 -1
- package/dist/packem_shared/FilePicker-BLS9nOPz.js +0 -1
- package/dist/packem_shared/InputParser-CtwkCbrQ.js +0 -2
- package/dist/packem_shared/MouseProvider-DUqQ3Eaa.js +0 -1
- package/dist/packem_shared/ScrollBar-qa1IzDDv.js +0 -1
- package/dist/packem_shared/ScrollBarBox-DchESZWv.js +0 -1
- package/dist/packem_shared/ScrollList-BBAnRsrC.js +0 -1
- package/dist/packem_shared/ScrollView-CHAo7Epj.js +0 -1
- package/dist/packem_shared/TreeNodeMap-cJlYqckB.js +0 -1
- package/dist/packem_shared/TreeView-BsvLCsf0.js +0 -1
- package/dist/packem_shared/TuiApp-BPL8v1i1.js +0 -1
- package/dist/packem_shared/app-context-BVpKlG1z.js +0 -1
- package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +0 -39
- package/dist/packem_shared/clipboard.d-D6lZTQ21.d.ts +0 -23
- package/dist/packem_shared/color-matrix.d-DSXLsB64.d.ts +0 -50
- package/dist/packem_shared/controlled-scroll-view-BVg7ywNW.js +0 -1
- package/dist/packem_shared/cursor-helpers.d-BONB9tky.d.ts +0 -12
- package/dist/packem_shared/format-time-fjoQHMxD.js +0 -1
- package/dist/packem_shared/input.d-CgxV2e8U.d.ts +0 -90
- package/dist/packem_shared/line-chart-C7CUrvVs.js +0 -1
- package/dist/packem_shared/load-native-root-binding-DDikxNox.js +0 -1
- package/dist/packem_shared/reconciler-CFyBVf7l.js +0 -1
- package/dist/packem_shared/render-CuQecTAs.js +0 -24
- package/dist/packem_shared/render.d-CBnYBDk2.d.ts +0 -417
- package/dist/packem_shared/renderTreeToBuffer-C8lS0lJ2.js +0 -2
- package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +0 -119
- package/dist/packem_shared/stderr-context-Bvnik0hL.js +0 -1
- package/dist/packem_shared/stdin-context-88AhuztD.js +0 -1
- package/dist/packem_shared/stdout-context-BnblEPez.js +0 -1
- package/dist/packem_shared/styles.d-cMo36xQz.d.ts +0 -396
- package/dist/packem_shared/token-to-elements-D6J6-P2A.js +0 -1
- package/dist/packem_shared/treeViewTheme-Dq3ekRAC.js +0 -1
- package/dist/packem_shared/useTreeView-D5ifGwG3.js +0 -1
- package/dist/packem_shared/useTreeViewState-BiTJakkh.js +0 -1
- package/dist/packem_shared/utils-Bup8lyK8.js +0 -1
- package/dist/packem_shared/variant-config-BJqpNo7H.js +0 -1
- package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +0 -2
package/dist/react/index.d.ts
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React, { Context, RefObject, ReactNode } from 'react';
|
|
2
|
-
import { M as MouseEvent, T as TuiApp, c as InputParser, a as InlineOptions } from "../packem_shared/input.d-
|
|
2
|
+
import { M as MouseEvent, T as TuiApp, c as InputParser, a as InlineOptions } from "../packem_shared/input.d-Bb8pWHvp.js";
|
|
3
3
|
import Yoga from 'yoga-layout';
|
|
4
|
-
import 'tseep';
|
|
5
4
|
interface DevToolsProps {
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
/** Show/hide the HUD without unmounting (default: true) */
|
|
8
7
|
enabled?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare const DevTools: ({
|
|
11
|
-
children,
|
|
12
|
-
enabled
|
|
13
|
-
}: DevToolsProps) => React.ReactElement;
|
|
9
|
+
declare const DevTools: ({ children, enabled }: DevToolsProps) => React.ReactElement;
|
|
14
10
|
type FocusContextProps = {
|
|
15
11
|
activate: (id: string) => void;
|
|
16
12
|
activeId: string | undefined;
|
|
@@ -38,11 +34,7 @@ type UseFocusResult = {
|
|
|
38
34
|
focus: (id: string) => void;
|
|
39
35
|
isFocused: boolean;
|
|
40
36
|
};
|
|
41
|
-
declare const useFocus: ({
|
|
42
|
-
autoFocus,
|
|
43
|
-
id: customId,
|
|
44
|
-
isActive
|
|
45
|
-
}?: UseFocusOptions) => UseFocusResult;
|
|
37
|
+
declare const useFocus: ({ autoFocus, id: customId, isActive }?: UseFocusOptions) => UseFocusResult;
|
|
46
38
|
type UseFocusManagerResult = {
|
|
47
39
|
activeId: string | undefined;
|
|
48
40
|
disableFocus: () => void;
|
|
@@ -72,13 +64,13 @@ declare class LayoutNode {
|
|
|
72
64
|
remove(): void;
|
|
73
65
|
removeChild(child: LayoutNode): void;
|
|
74
66
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
67
|
+
* Free this node's Yoga allocation. Called via detachDeletedInstance
|
|
68
|
+
* in the reconciler after React has permanently removed this node.
|
|
69
|
+
*
|
|
70
|
+
* Does NOT recurse — React calls detachDeletedInstance on every node
|
|
71
|
+
* in a deleted subtree individually, so each node frees only itself.
|
|
72
|
+
* The _destroyed guard prevents double-free if free() is also called.
|
|
73
|
+
*/
|
|
82
74
|
destroy(): void;
|
|
83
75
|
calculateLayout(width: number, height: number): void;
|
|
84
76
|
getLayout(): ReturnType<YogaNode$1["getComputedLayout"]>;
|
|
@@ -110,54 +102,54 @@ interface Key {
|
|
|
110
102
|
}
|
|
111
103
|
type InputHandler = (input: string, key: Key) => void;
|
|
112
104
|
/**
|
|
113
|
-
* Subscribes to keyboard input. Uses a stable ref so the effect runs
|
|
114
|
-
* exactly once (on mount) regardless of how often the component re-renders.
|
|
115
|
-
* Always invokes the latest handler passed by the caller.
|
|
116
|
-
*/
|
|
105
|
+
* Subscribes to keyboard input. Uses a stable ref so the effect runs
|
|
106
|
+
* exactly once (on mount) regardless of how often the component re-renders.
|
|
107
|
+
* Always invokes the latest handler passed by the caller.
|
|
108
|
+
*/
|
|
117
109
|
declare const useInput: (handler: InputHandler) => void;
|
|
118
110
|
interface UsePasteOptions {
|
|
119
111
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
112
|
+
* Enable or disable capturing pasted text.
|
|
113
|
+
* Useful when multiple components use usePaste and only one should be active.
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
124
116
|
isActive?: boolean;
|
|
125
117
|
}
|
|
126
118
|
type PasteHandler = (text: string) => void;
|
|
127
119
|
/**
|
|
128
|
-
* Subscribe to bracketed paste events.
|
|
129
|
-
*
|
|
130
|
-
* `usePaste` and `useInput` can be used together. Paste content is delivered
|
|
131
|
-
* through this hook and not forwarded to useInput while at least one paste
|
|
132
|
-
* listener is active.
|
|
133
|
-
*/
|
|
120
|
+
* Subscribe to bracketed paste events.
|
|
121
|
+
*
|
|
122
|
+
* `usePaste` and `useInput` can be used together. Paste content is delivered
|
|
123
|
+
* through this hook and not forwarded to useInput while at least one paste
|
|
124
|
+
* listener is active.
|
|
125
|
+
*/
|
|
134
126
|
declare const usePaste: (handler: PasteHandler, options?: UsePasteOptions) => void;
|
|
135
127
|
/**
|
|
136
|
-
* Raw access to the TuiContext — app instance + input parser.
|
|
137
|
-
* Useful for advanced integrations (e.g. DevTools, custom hooks).
|
|
138
|
-
*/
|
|
128
|
+
* Raw access to the TuiContext — app instance + input parser.
|
|
129
|
+
* Useful for advanced integrations (e.g. DevTools, custom hooks).
|
|
130
|
+
*/
|
|
139
131
|
declare const useTuiContext: () => TuiContextProps;
|
|
140
132
|
/**
|
|
141
|
-
* Access app controls. Returns { exit } for Ink compatibility.
|
|
142
|
-
* exit() triggers a clean shutdown (restores terminal, stops input, exits process).
|
|
143
|
-
*/
|
|
133
|
+
* Access app controls. Returns { exit } for Ink compatibility.
|
|
134
|
+
* exit() triggers a clean shutdown (restores terminal, stops input, exits process).
|
|
135
|
+
*/
|
|
144
136
|
declare const useApp: () => {
|
|
145
137
|
exit: () => void;
|
|
146
138
|
quit: () => void;
|
|
147
139
|
};
|
|
148
140
|
/**
|
|
149
|
-
* Returns current terminal dimensions and re-renders on resize (SIGWINCH).
|
|
150
|
-
* Ink-compatible: const { columns, rows } = useWindowSize()
|
|
151
|
-
*/
|
|
141
|
+
* Returns current terminal dimensions and re-renders on resize (SIGWINCH).
|
|
142
|
+
* Ink-compatible: const { columns, rows } = useWindowSize()
|
|
143
|
+
*/
|
|
152
144
|
declare const useWindowSize: () => {
|
|
153
145
|
columns: number;
|
|
154
146
|
rows: number;
|
|
155
147
|
};
|
|
156
148
|
/**
|
|
157
|
-
* Write to stdout without disturbing the TUI.
|
|
158
|
-
* Ink-compatible: const { write, stdout } = useStdout()
|
|
159
|
-
* Output is buffered while the alternate screen is active and flushed on exit.
|
|
160
|
-
*/
|
|
149
|
+
* Write to stdout without disturbing the TUI.
|
|
150
|
+
* Ink-compatible: const { write, stdout } = useStdout()
|
|
151
|
+
* Output is buffered while the alternate screen is active and flushed on exit.
|
|
152
|
+
*/
|
|
161
153
|
declare const useStdout: () => {
|
|
162
154
|
stdout: NodeJS.WriteStream & {
|
|
163
155
|
fd: 1;
|
|
@@ -165,10 +157,10 @@ declare const useStdout: () => {
|
|
|
165
157
|
write: (text: string) => void;
|
|
166
158
|
};
|
|
167
159
|
/**
|
|
168
|
-
* Write to stderr without disturbing the TUI.
|
|
169
|
-
* Ink-compatible: const { write, stderr } = useStderr()
|
|
170
|
-
* Output is buffered while the alternate screen is active and flushed on exit.
|
|
171
|
-
*/
|
|
160
|
+
* Write to stderr without disturbing the TUI.
|
|
161
|
+
* Ink-compatible: const { write, stderr } = useStderr()
|
|
162
|
+
* Output is buffered while the alternate screen is active and flushed on exit.
|
|
163
|
+
*/
|
|
172
164
|
declare const useStderr: () => {
|
|
173
165
|
stderr: NodeJS.WriteStream & {
|
|
174
166
|
fd: 2;
|
|
@@ -176,9 +168,9 @@ declare const useStderr: () => {
|
|
|
176
168
|
write: (text: string) => void;
|
|
177
169
|
};
|
|
178
170
|
/**
|
|
179
|
-
* Access raw stdin stream and raw mode controls.
|
|
180
|
-
* Ink-compatible: const { stdin, setRawMode, isRawModeSupported } = useStdin()
|
|
181
|
-
*/
|
|
171
|
+
* Access raw stdin stream and raw mode controls.
|
|
172
|
+
* Ink-compatible: const { stdin, setRawMode, isRawModeSupported } = useStdin()
|
|
173
|
+
*/
|
|
182
174
|
declare const useStdin: () => {
|
|
183
175
|
isRawModeSupported: boolean;
|
|
184
176
|
setRawMode: (value: boolean) => void;
|
|
@@ -187,11 +179,11 @@ declare const useStdin: () => {
|
|
|
187
179
|
};
|
|
188
180
|
};
|
|
189
181
|
/**
|
|
190
|
-
* Measure the dimensions of a Box element.
|
|
191
|
-
* Returns { width, height } after layout has been calculated.
|
|
192
|
-
* Returns { width: 0, height: 0 } when called during render (before layout).
|
|
193
|
-
* Ink-compatible: measureElement(ref.current)
|
|
194
|
-
*/
|
|
182
|
+
* Measure the dimensions of a Box element.
|
|
183
|
+
* Returns { width, height } after layout has been calculated.
|
|
184
|
+
* Returns { width: 0, height: 0 } when called during render (before layout).
|
|
185
|
+
* Ink-compatible: measureElement(ref.current)
|
|
186
|
+
*/
|
|
195
187
|
declare const measureElement: (node: LayoutNode | null) => {
|
|
196
188
|
height: number;
|
|
197
189
|
width: number;
|
|
@@ -206,23 +198,23 @@ interface UseBoxMetricsResult extends BoxMetrics {
|
|
|
206
198
|
readonly hasMeasured: boolean;
|
|
207
199
|
}
|
|
208
200
|
/**
|
|
209
|
-
* Returns the current layout metrics for a Box ref, updating on every render
|
|
210
|
-
* and on terminal resize.
|
|
211
|
-
* Ink-compatible: const { width, height, left, top, hasMeasured } = useBoxMetrics(ref)
|
|
212
|
-
*/
|
|
201
|
+
* Returns the current layout metrics for a Box ref, updating on every render
|
|
202
|
+
* and on terminal resize.
|
|
203
|
+
* Ink-compatible: const { width, height, left, top, hasMeasured } = useBoxMetrics(ref)
|
|
204
|
+
*/
|
|
213
205
|
declare const useBoxMetrics: (ref: RefObject<LayoutNode | null>) => UseBoxMetricsResult;
|
|
214
206
|
/**
|
|
215
|
-
* Returns whether a screen reader is enabled.
|
|
216
|
-
* Stub: always returns false — no screen reader support.
|
|
217
|
-
* Ink-compatible: const isEnabled = useIsScreenReaderEnabled()
|
|
218
|
-
*/
|
|
207
|
+
* Returns whether a screen reader is enabled.
|
|
208
|
+
* Stub: always returns false — no screen reader support.
|
|
209
|
+
* Ink-compatible: const isEnabled = useIsScreenReaderEnabled()
|
|
210
|
+
*/
|
|
219
211
|
declare const useIsScreenReaderEnabled: () => boolean;
|
|
220
212
|
/**
|
|
221
|
-
* Returns cursor positioning controls.
|
|
222
|
-
* Stub: the native renderer hides the cursor during rendering (alternate screen).
|
|
223
|
-
* setCursorPosition is a no-op — provided for Ink API compatibility only.
|
|
224
|
-
* Ink-compatible: const { setCursorPosition } = useCursor()
|
|
225
|
-
*/
|
|
213
|
+
* Returns cursor positioning controls.
|
|
214
|
+
* Stub: the native renderer hides the cursor during rendering (alternate screen).
|
|
215
|
+
* setCursorPosition is a no-op — provided for Ink API compatibility only.
|
|
216
|
+
* Ink-compatible: const { setCursorPosition } = useCursor()
|
|
217
|
+
*/
|
|
226
218
|
declare const useCursor: () => {
|
|
227
219
|
setCursorPosition: (position: {
|
|
228
220
|
x: number;
|
|
@@ -230,22 +222,22 @@ declare const useCursor: () => {
|
|
|
230
222
|
} | undefined) => void;
|
|
231
223
|
};
|
|
232
224
|
/**
|
|
233
|
-
* Scroll state for a fixed-height viewport over variable-height content.
|
|
234
|
-
*
|
|
235
|
-
* Usage:
|
|
236
|
-
* const scroll = useScrollable({ viewportHeight: 20, contentHeight: totalRows })
|
|
237
|
-
*
|
|
238
|
-
* <Box height={20}>
|
|
239
|
-
* <Box marginTop={-scroll.offset}>
|
|
240
|
-
* {items}
|
|
241
|
-
* </Box>
|
|
242
|
-
* </Box>
|
|
243
|
-
*
|
|
244
|
-
* contentHeight can be updated as content grows. The offset is automatically
|
|
245
|
-
* clamped so it never scrolls past the end.
|
|
246
|
-
*
|
|
247
|
-
* scrollToBottom() is idempotent — safe to call on every new message append.
|
|
248
|
-
*/
|
|
225
|
+
* Scroll state for a fixed-height viewport over variable-height content.
|
|
226
|
+
*
|
|
227
|
+
* Usage:
|
|
228
|
+
* const scroll = useScrollable({ viewportHeight: 20, contentHeight: totalRows })
|
|
229
|
+
*
|
|
230
|
+
* <Box height={20}>
|
|
231
|
+
* <Box marginTop={-scroll.offset}>
|
|
232
|
+
* {items}
|
|
233
|
+
* </Box>
|
|
234
|
+
* </Box>
|
|
235
|
+
*
|
|
236
|
+
* contentHeight can be updated as content grows. The offset is automatically
|
|
237
|
+
* clamped so it never scrolls past the end.
|
|
238
|
+
*
|
|
239
|
+
* scrollToBottom() is idempotent — safe to call on every new message append.
|
|
240
|
+
*/
|
|
249
241
|
interface UseScrollableOptions {
|
|
250
242
|
/** Total height of the content in rows — update as content grows */
|
|
251
243
|
contentHeight: number;
|
|
@@ -270,24 +262,21 @@ interface UseScrollableResult {
|
|
|
270
262
|
/** Scroll up one row */
|
|
271
263
|
scrollUp: () => void;
|
|
272
264
|
}
|
|
273
|
-
declare const useScrollable: ({
|
|
274
|
-
contentHeight,
|
|
275
|
-
viewportHeight
|
|
276
|
-
}: UseScrollableOptions) => UseScrollableResult;
|
|
265
|
+
declare const useScrollable: ({ contentHeight, viewportHeight }: UseScrollableOptions) => UseScrollableResult;
|
|
277
266
|
type MouseHandler = (event: MouseEvent) => void;
|
|
278
267
|
/**
|
|
279
|
-
* Subscribe to mouse events. Requires mouse tracking to be enabled (it is by
|
|
280
|
-
* default — TerminalGuard enables SGR 1006 mouse tracking on start).
|
|
281
|
-
*
|
|
282
|
-
* Usage:
|
|
283
|
-
* useMouse((event) => {
|
|
284
|
-
* if (event.button === 'left') { ... }
|
|
285
|
-
* if (event.button === 'scrollUp') { ... }
|
|
286
|
-
* // event: { x, y, button, shift, ctrl, meta }
|
|
287
|
-
* })
|
|
288
|
-
*
|
|
289
|
-
* button values: 'left' | 'right' | 'middle' | 'scrollUp' | 'scrollDown'
|
|
290
|
-
*/
|
|
268
|
+
* Subscribe to mouse events. Requires mouse tracking to be enabled (it is by
|
|
269
|
+
* default — TerminalGuard enables SGR 1006 mouse tracking on start).
|
|
270
|
+
*
|
|
271
|
+
* Usage:
|
|
272
|
+
* useMouse((event) => {
|
|
273
|
+
* if (event.button === 'left') { ... }
|
|
274
|
+
* if (event.button === 'scrollUp') { ... }
|
|
275
|
+
* // event: { x, y, button, shift, ctrl, meta }
|
|
276
|
+
* })
|
|
277
|
+
*
|
|
278
|
+
* button values: 'left' | 'right' | 'middle' | 'scrollUp' | 'scrollDown'
|
|
279
|
+
*/
|
|
291
280
|
declare const useMouse: (handler: MouseHandler) => void;
|
|
292
281
|
interface UseTextInputOptions {
|
|
293
282
|
/** Initial value (default: '') */
|
|
@@ -310,22 +299,17 @@ interface UseTextInputResult {
|
|
|
310
299
|
value: string;
|
|
311
300
|
}
|
|
312
301
|
/**
|
|
313
|
-
* Managed text input with cursor, backspace, delete, left/right navigation,
|
|
314
|
-
* home/end, bracketed paste, and submit on Enter.
|
|
315
|
-
*
|
|
316
|
-
* Usage:
|
|
317
|
-
* const { value, cursor } = useTextInput({ onSubmit: (v) => console.log(v) })
|
|
318
|
-
* <Text>{value.slice(0, cursor)}<Text inverse> </Text>{value.slice(cursor)}</Text>
|
|
319
|
-
*
|
|
320
|
-
* Renders a block cursor by inverting the character at cursor position.
|
|
321
|
-
* When cursor is at end, renders a trailing space as the cursor block.
|
|
322
|
-
*/
|
|
323
|
-
declare const useTextInput: ({
|
|
324
|
-
initialValue,
|
|
325
|
-
isActive,
|
|
326
|
-
onChange,
|
|
327
|
-
onSubmit
|
|
328
|
-
}?: UseTextInputOptions) => UseTextInputResult;
|
|
302
|
+
* Managed text input with cursor, backspace, delete, left/right navigation,
|
|
303
|
+
* home/end, bracketed paste, and submit on Enter.
|
|
304
|
+
*
|
|
305
|
+
* Usage:
|
|
306
|
+
* const { value, cursor } = useTextInput({ onSubmit: (v) => console.log(v) })
|
|
307
|
+
* <Text>{value.slice(0, cursor)}<Text inverse> </Text>{value.slice(cursor)}</Text>
|
|
308
|
+
*
|
|
309
|
+
* Renders a block cursor by inverting the character at cursor position.
|
|
310
|
+
* When cursor is at end, renders a trailing space as the cursor block.
|
|
311
|
+
*/
|
|
312
|
+
declare const useTextInput: ({ initialValue, isActive, onChange, onSubmit }?: UseTextInputOptions) => UseTextInputResult;
|
|
329
313
|
/** Ink-compat render options */
|
|
330
314
|
interface RenderOptions {
|
|
331
315
|
/** Ignored — the native renderer is always concurrent */
|
|
@@ -359,18 +343,18 @@ interface InlineInstance {
|
|
|
359
343
|
waitUntilExit: () => Promise<void>;
|
|
360
344
|
}
|
|
361
345
|
/**
|
|
362
|
-
* Render a React element inline — no alternate screen. The UI appears
|
|
363
|
-
* directly below the current shell prompt and stays in terminal scrollback
|
|
364
|
-
* on exit (or is destroyed if `onExit: 'destroy'` is set).
|
|
365
|
-
*
|
|
366
|
-
* The root Box is sized to `cols × rows`. Use `useInput` and `useApp`
|
|
367
|
-
* exactly as in a full-screen render.
|
|
368
|
-
* @example
|
|
369
|
-
* ```tsx
|
|
370
|
-
* const { waitUntilExit } = renderInline(<Picker />, { rows: 12, onExit: 'destroy' })
|
|
371
|
-
* await waitUntilExit()
|
|
372
|
-
* ```
|
|
373
|
-
*/
|
|
346
|
+
* Render a React element inline — no alternate screen. The UI appears
|
|
347
|
+
* directly below the current shell prompt and stays in terminal scrollback
|
|
348
|
+
* on exit (or is destroyed if `onExit: 'destroy'` is set).
|
|
349
|
+
*
|
|
350
|
+
* The root Box is sized to `cols × rows`. Use `useInput` and `useApp`
|
|
351
|
+
* exactly as in a full-screen render.
|
|
352
|
+
* @example
|
|
353
|
+
* ```tsx
|
|
354
|
+
* const { waitUntilExit } = renderInline(<Picker />, { rows: 12, onExit: 'destroy' })
|
|
355
|
+
* await waitUntilExit()
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
374
358
|
declare function renderInline(element: React.ReactElement, options?: InlineOptions & {
|
|
375
359
|
maxFps?: number;
|
|
376
360
|
}): InlineInstance;
|
|
@@ -381,27 +365,27 @@ interface RenderToStringOptions {
|
|
|
381
365
|
rows?: number;
|
|
382
366
|
}
|
|
383
367
|
/**
|
|
384
|
-
* Render a React element to a plain string synchronously.
|
|
385
|
-
* No TTY, no stdin, no alternate screen — pure layout + buffer read-back.
|
|
386
|
-
*
|
|
387
|
-
* Useful for testing, documentation generation, and any scenario where
|
|
388
|
-
* you need rendered output as a string without a live terminal.
|
|
389
|
-
*
|
|
390
|
-
* Notes:
|
|
391
|
-
* - Terminal hooks (useInput, useApp, useStdin, useStdout, useStderr,
|
|
392
|
-
* useFocus, useFocusManager) return safe no-op defaults — they do not throw.
|
|
393
|
-
* - useEffect callbacks run but state updates they trigger do not affect output.
|
|
394
|
-
* - useLayoutEffect callbacks fire synchronously and DO affect output.
|
|
395
|
-
*/
|
|
368
|
+
* Render a React element to a plain string synchronously.
|
|
369
|
+
* No TTY, no stdin, no alternate screen — pure layout + buffer read-back.
|
|
370
|
+
*
|
|
371
|
+
* Useful for testing, documentation generation, and any scenario where
|
|
372
|
+
* you need rendered output as a string without a live terminal.
|
|
373
|
+
*
|
|
374
|
+
* Notes:
|
|
375
|
+
* - Terminal hooks (useInput, useApp, useStdin, useStdout, useStderr,
|
|
376
|
+
* useFocus, useFocusManager) return safe no-op defaults — they do not throw.
|
|
377
|
+
* - useEffect callbacks run but state updates they trigger do not affect output.
|
|
378
|
+
* - useLayoutEffect callbacks fire synchronously and DO affect output.
|
|
379
|
+
*/
|
|
396
380
|
declare function renderToString(element: React.ReactElement, options?: RenderToStringOptions): string;
|
|
397
381
|
declare function renderTreeToBuffer(root: LayoutNode, buffer: Uint32Array, cols: number, rows: number): void;
|
|
398
382
|
type YogaNode = ReturnType<typeof Yoga.Node.create>;
|
|
399
383
|
declare const NAMED_COLORS: Record<string, number>;
|
|
400
384
|
/**
|
|
401
|
-
* Resolve a color value to an ANSI 256-color index.
|
|
402
|
-
* Accepts: number (pass-through), string name ("green"), hex ("#FF8800"),
|
|
403
|
-
* rgb() ("rgb(255,136,0)"), ansi256() ("ansi256(42)"), or undefined (→ 255 = terminal default).
|
|
404
|
-
*/
|
|
385
|
+
* Resolve a color value to an ANSI 256-color index.
|
|
386
|
+
* Accepts: number (pass-through), string name ("green"), hex ("#FF8800"),
|
|
387
|
+
* rgb() ("rgb(255,136,0)"), ansi256() ("ansi256(42)"), or undefined (→ 255 = terminal default).
|
|
388
|
+
*/
|
|
405
389
|
declare function resolveColor(color: number | string | undefined): number;
|
|
406
390
|
type Styles = {
|
|
407
391
|
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around";
|
|
@@ -433,7 +417,8 @@ type Styles = {
|
|
|
433
417
|
flexShrink?: number;
|
|
434
418
|
flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
435
419
|
gap?: number;
|
|
436
|
-
height?: number | string;
|
|
420
|
+
height?: number | string;
|
|
421
|
+
/** Internal flag for sticky header alternate nodes */
|
|
437
422
|
internalStickyAlternate?: boolean;
|
|
438
423
|
inverse?: boolean;
|
|
439
424
|
italic?: boolean;
|
|
@@ -477,43 +462,39 @@ type Styles = {
|
|
|
477
462
|
declare const applyStyles: (node: YogaNode, style?: Styles, currentStyle?: Styles) => void;
|
|
478
463
|
type StaticProps<T> = {
|
|
479
464
|
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
465
|
+
* Render function called for each item. Must assign a unique `key` to the
|
|
466
|
+
* root element returned.
|
|
467
|
+
*/
|
|
483
468
|
readonly children: (item: T, index: number) => ReactNode;
|
|
484
469
|
/**
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
470
|
+
* Array of items to render. Only newly-added items are rendered into the layout —
|
|
471
|
+
* previously rendered items are frozen (never re-rendered or cleared).
|
|
472
|
+
* Ideal for streaming output: completed tasks, log lines, test results.
|
|
473
|
+
*/
|
|
489
474
|
readonly items: T[];
|
|
490
475
|
/**
|
|
491
|
-
|
|
492
|
-
|
|
476
|
+
* Optional styles for the static container Box.
|
|
477
|
+
*/
|
|
493
478
|
readonly style?: Record<string, unknown>;
|
|
494
479
|
};
|
|
495
480
|
/**
|
|
496
|
-
* `<Static>` permanently renders its output above the dynamic UI.
|
|
497
|
-
*
|
|
498
|
-
* Items are rendered once and frozen — they are never re-rendered or cleared.
|
|
499
|
-
* New items appended to `items` are rendered incrementally and accumulate
|
|
500
|
-
* in the layout above the dynamic content.
|
|
501
|
-
*
|
|
502
|
-
* Matches the Ink `<Static>` API exactly.
|
|
503
|
-
* @example
|
|
504
|
-
* ```tsx
|
|
505
|
-
* <Static items={completedTasks}>
|
|
506
|
-
* {task => (
|
|
507
|
-
* <Box key={task.id}>
|
|
508
|
-
* <Text color="green">✔ {task.title}</Text>
|
|
509
|
-
* </Box>
|
|
510
|
-
* )}
|
|
511
|
-
* </Static>
|
|
512
|
-
* ```
|
|
513
|
-
*/
|
|
514
|
-
declare function Static<T>({
|
|
515
|
-
children: renderItem,
|
|
516
|
-
items,
|
|
517
|
-
style
|
|
518
|
-
}: StaticProps<T>): React.ReactElement;
|
|
481
|
+
* `<Static>` permanently renders its output above the dynamic UI.
|
|
482
|
+
*
|
|
483
|
+
* Items are rendered once and frozen — they are never re-rendered or cleared.
|
|
484
|
+
* New items appended to `items` are rendered incrementally and accumulate
|
|
485
|
+
* in the layout above the dynamic content.
|
|
486
|
+
*
|
|
487
|
+
* Matches the Ink `<Static>` API exactly.
|
|
488
|
+
* @example
|
|
489
|
+
* ```tsx
|
|
490
|
+
* <Static items={completedTasks}>
|
|
491
|
+
* {task => (
|
|
492
|
+
* <Box key={task.id}>
|
|
493
|
+
* <Text color="green">✔ {task.title}</Text>
|
|
494
|
+
* </Box>
|
|
495
|
+
* )}
|
|
496
|
+
* </Static>
|
|
497
|
+
* ```
|
|
498
|
+
*/
|
|
499
|
+
declare function Static<T>({ children: renderItem, items, style }: StaticProps<T>): React.ReactElement;
|
|
519
500
|
export { BoxMetrics, DevTools, DevToolsProps, FocusContext, FocusContextProps, FocusProvider, type InlineInstance, InputHandler, type Instance, Key, LayoutNode, MouseHandler, NAMED_COLORS, PasteHandler, type RenderOptions, RenderToStringOptions, Static, StaticProps, Styles, TuiContext, TuiContextProps, UseBoxMetricsResult, UseFocusManagerResult, UseFocusOptions, UseFocusResult, UsePasteOptions, UseScrollableOptions, UseScrollableResult, UseTextInputOptions, UseTextInputResult, applyStyles, measureElement, render, renderInline, renderToString, renderTreeToBuffer, resolveColor, useApp, useBoxMetrics, useCursor, useFocus, useFocusManager, useInput, useIsScreenReaderEnabled, useMouse, usePaste, useScrollable, useStderr, useStdin, useStdout, useTextInput, useTuiContext, useWindowSize };
|
package/dist/react/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DevTools as o}from"../packem_shared/DevTools-
|
|
1
|
+
import{DevTools as o}from"../packem_shared/DevTools-BxD3PYAN.js";import{FocusContext as u,FocusProvider as s,useFocus as n,useFocusManager as p}from"../packem_shared/FocusContext-C2Sosxa4.js";import{TuiContext as d,measureElement as f,useApp as l,useBoxMetrics as m,useCursor as a,useInput as i,useIsScreenReaderEnabled as S,useMouse as c,usePaste as T,useScrollable as C,useStderr as F,useStdin as I,useStdout as M,useTextInput as v,useTuiContext as y,useWindowSize as E}from"../packem_shared/TuiContext-BNmP0lMY.js";import{render as g,renderInline as A}from"../packem_shared/render-DtQd8qQq.js";import{renderToString as D}from"../packem_shared/renderToString-DkTmJPaS.js";import{Static as N}from"../packem_shared/Static-DSzsElz4.js";import{LayoutNode as P}from"../packem_shared/LayoutNode-LPYsuzBg.js";import{NAMED_COLORS as w,applyStyles as z,resolveColor as W}from"../packem_shared/NAMED_COLORS-82DpREQV.js";import{renderTreeToBuffer as h}from"../packem_shared/renderTreeToBuffer-BpSD0sBJ.js";export{o as DevTools,u as FocusContext,s as FocusProvider,P as LayoutNode,w as NAMED_COLORS,N as Static,d as TuiContext,z as applyStyles,f as measureElement,g as render,A as renderInline,D as renderToString,h as renderTreeToBuffer,W as resolveColor,l as useApp,m as useBoxMetrics,a as useCursor,n as useFocus,p as useFocusManager,i as useInput,S as useIsScreenReaderEnabled,c as useMouse,T as usePaste,C as useScrollable,F as useStderr,I as useStdin,M as useStdout,v as useTextInput,y as useTuiContext,E as useWindowSize};
|