@visulima/tui 1.0.0-alpha.9 → 1.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 +650 -0
- package/LICENSE.md +2414 -187
- package/README.md +49 -4
- package/dist/components/accordion.d.ts +59 -0
- package/dist/components/accordion.js +1 -0
- package/dist/components/alert.d.ts +26 -0
- package/dist/components/alert.js +1 -0
- package/dist/components/animate-presence.d.ts +18 -0
- package/dist/components/animate-presence.js +1 -0
- package/dist/components/approval-prompt.d.ts +65 -0
- package/dist/components/approval-prompt.js +1 -0
- package/dist/components/area-chart.d.ts +66 -0
- package/dist/components/area-chart.js +1 -0
- package/dist/components/badge.d.ts +22 -0
- package/dist/components/badge.js +1 -0
- package/dist/components/bar-chart.d.ts +67 -0
- package/dist/components/bar-chart.js +1 -0
- package/dist/components/big-text.d.ts +81 -0
- package/dist/components/big-text.js +1 -0
- package/dist/components/blink-dot.d.ts +36 -0
- package/dist/components/blink-dot.js +1 -0
- package/dist/components/box.d.ts +62 -0
- package/dist/components/box.js +1 -0
- package/dist/components/breadcrumb.d.ts +33 -0
- package/dist/components/breadcrumb.js +1 -0
- package/dist/components/button.d.ts +45 -0
- package/dist/components/button.js +1 -0
- package/dist/components/calendar.d.ts +72 -0
- package/dist/components/calendar.js +1 -0
- package/dist/components/canvas.d.ts +44 -0
- package/dist/components/canvas.js +1 -0
- package/dist/components/card.d.ts +57 -0
- package/dist/components/card.js +1 -0
- package/dist/components/checkbox.d.ts +48 -0
- package/dist/components/checkbox.js +1 -0
- package/dist/components/code.d.ts +48 -0
- package/dist/components/code.js +2 -0
- package/dist/components/collapsible.d.ts +53 -0
- package/dist/components/collapsible.js +1 -0
- package/dist/components/command-block.d.ts +47 -0
- package/dist/components/command-block.js +4 -0
- package/dist/components/command-palette.d.ts +82 -0
- package/dist/components/command-palette.js +1 -0
- package/dist/components/confirm-dialog.d.ts +75 -0
- package/dist/components/confirm-dialog.js +1 -0
- package/dist/components/confirm-input.d.ts +38 -0
- package/dist/components/confirm-input.js +1 -0
- package/dist/components/console-overlay.d.ts +54 -0
- package/dist/components/console-overlay.js +1 -0
- package/dist/components/content-switcher.d.ts +57 -0
- package/dist/components/content-switcher.js +1 -0
- package/dist/components/controlled-scroll-view.d.ts +61 -0
- package/dist/components/controlled-scroll-view.js +1 -0
- package/dist/components/cursor.d.ts +62 -0
- package/dist/components/cursor.js +1 -0
- package/dist/components/date-picker.d.ts +65 -0
- package/dist/components/date-picker.js +1 -0
- package/dist/components/definition-list.d.ts +44 -0
- package/dist/components/definition-list.js +1 -0
- package/dist/components/dialog.d.ts +117 -0
- package/dist/components/dialog.js +1 -0
- package/dist/components/diff-view.d.ts +85 -0
- package/dist/components/diff-view.js +1 -0
- package/dist/components/divider.d.ts +49 -0
- package/dist/components/divider.js +1 -0
- package/dist/components/file-picker-entry.d.ts +104 -0
- package/dist/components/file-picker-entry.js +1 -0
- package/dist/components/form.d.ts +81 -0
- package/dist/components/form.js +1 -0
- package/dist/components/gauge.d.ts +87 -0
- package/dist/components/gauge.js +1 -0
- package/dist/components/gradient.d.ts +42 -0
- package/dist/components/gradient.js +1 -0
- package/dist/components/heading.d.ts +33 -0
- package/dist/components/heading.js +1 -0
- package/dist/components/heatmap.d.ts +62 -0
- package/dist/components/heatmap.js +1 -0
- package/dist/components/help.d.ts +52 -0
- package/dist/components/help.js +1 -0
- package/dist/components/histogram.d.ts +62 -0
- package/dist/components/histogram.js +1 -0
- package/dist/components/kbd.d.ts +31 -0
- package/dist/components/kbd.js +1 -0
- package/dist/components/line-chart.d.ts +109 -0
- package/dist/components/line-chart.js +1 -0
- package/dist/components/link.d.ts +38 -0
- package/dist/components/link.js +1 -0
- package/dist/components/loading-indicator.d.ts +29 -0
- package/dist/components/loading-indicator.js +1 -0
- package/dist/components/markdown.d.ts +40 -0
- package/dist/components/markdown.js +1 -0
- package/dist/components/masked-input.d.ts +50 -0
- package/dist/components/masked-input.js +1 -0
- package/dist/components/menu.d.ts +78 -0
- package/dist/components/menu.js +1 -0
- package/dist/components/message-bubble.d.ts +43 -0
- package/dist/components/message-bubble.js +1 -0
- package/dist/components/model-badge.d.ts +39 -0
- package/dist/components/model-badge.js +1 -0
- package/dist/components/multi-select.d.ts +65 -0
- package/dist/components/multi-select.js +1 -0
- package/dist/components/newline.d.ts +15 -0
- package/dist/components/newline.js +2 -0
- package/dist/components/operation-tree.d.ts +49 -0
- package/dist/components/operation-tree.js +1 -0
- package/dist/components/option-list.d.ts +47 -0
- package/dist/components/option-list.js +1 -0
- package/dist/components/ordered-list.d.ts +24 -0
- package/dist/components/ordered-list.js +1 -0
- package/dist/components/paginator.d.ts +69 -0
- package/dist/components/paginator.js +1 -0
- package/dist/components/paragraph.d.ts +38 -0
- package/dist/components/paragraph.js +1 -0
- package/dist/components/placeholder.d.ts +55 -0
- package/dist/components/placeholder.js +1 -0
- package/dist/components/progress-bar.d.ts +56 -0
- package/dist/components/progress-bar.js +1 -0
- package/dist/components/radio-group.d.ts +74 -0
- package/dist/components/radio-group.js +1 -0
- package/dist/components/scatter-plot.d.ts +35 -0
- package/dist/components/scatter-plot.js +1 -0
- package/dist/components/scroll-bar-box.d.ts +37 -0
- package/dist/components/scroll-bar-box.js +1 -0
- package/dist/components/scroll-bar.d.ts +25 -0
- package/dist/components/scroll-bar.js +1 -0
- package/dist/components/scroll-list.d.ts +20 -0
- package/dist/components/scroll-list.js +1 -0
- package/dist/components/scroll-view.d.ts +10 -0
- package/dist/components/scroll-view.js +1 -0
- package/dist/components/search-input.d.ts +55 -0
- package/dist/components/search-input.js +1 -0
- package/dist/components/select-input-indicator.d.ts +32 -0
- package/dist/components/select-input-indicator.js +1 -0
- package/dist/components/select-input-item.d.ts +41 -0
- package/dist/components/select-input-item.js +1 -0
- package/dist/components/select-input.d.ts +110 -0
- package/dist/components/select-input.js +1 -0
- package/dist/components/shimmer-text.d.ts +47 -0
- package/dist/components/shimmer-text.js +1 -0
- package/dist/components/slider.d.ts +103 -0
- package/dist/components/slider.js +1 -0
- package/dist/components/spacer.d.ts +8 -0
- package/dist/components/spacer.js +1 -0
- package/dist/components/sparkline.d.ts +35 -0
- package/dist/components/sparkline.js +1 -0
- package/dist/components/spinner.d.ts +17 -0
- package/dist/components/spinner.js +1 -0
- package/dist/components/static-render.d.ts +55 -0
- package/dist/components/static-render.js +1 -0
- package/dist/components/static.d.ts +29 -0
- package/dist/components/static.js +1 -0
- package/dist/components/status-line.d.ts +37 -0
- package/dist/components/status-line.js +1 -0
- package/dist/components/status-message.d.ts +21 -0
- package/dist/components/status-message.js +1 -0
- package/dist/components/stepper.d.ts +48 -0
- package/dist/components/stepper.js +1 -0
- package/dist/components/stopwatch.d.ts +49 -0
- package/dist/components/stopwatch.js +1 -0
- package/dist/components/streaming-text.d.ts +46 -0
- package/dist/components/streaming-text.js +1 -0
- package/dist/components/switch.d.ts +55 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/tab.d.ts +19 -0
- package/dist/components/tab.js +1 -0
- package/dist/components/table.d.ts +119 -0
- package/dist/components/table.js +1 -0
- package/dist/components/tabs.d.ts +107 -0
- package/dist/components/tabs.js +1 -0
- package/dist/components/tag.d.ts +35 -0
- package/dist/components/tag.js +1 -0
- package/dist/components/text-input.d.ts +48 -0
- package/dist/components/text-input.js +1 -0
- package/dist/components/text.d.ts +79 -0
- package/dist/components/text.js +1 -0
- package/dist/components/textarea.d.ts +68 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/timer.d.ts +59 -0
- package/dist/components/timer.js +1 -0
- package/dist/components/toast.d.ts +49 -0
- package/dist/components/toast.js +1 -0
- package/dist/components/tooltip.d.ts +43 -0
- package/dist/components/tooltip.js +1 -0
- package/dist/components/transform.d.ts +21 -0
- package/dist/components/transform.js +1 -0
- package/dist/components/transition.d.ts +74 -0
- package/dist/components/transition.js +1 -0
- package/dist/components/tree-view-entry.d.ts +357 -0
- package/dist/components/tree-view-entry.js +1 -0
- package/dist/components/unordered-list.d.ts +30 -0
- package/dist/components/unordered-list.js +1 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/ink/hooks/use-animation.d.ts +41 -0
- package/dist/ink/hooks/use-animation.js +1 -0
- package/dist/ink/hooks/use-app.d.ts +38 -0
- package/dist/ink/hooks/use-app.js +1 -0
- package/dist/ink/hooks/use-box-metrics.d.ts +66 -0
- package/dist/ink/hooks/use-box-metrics.js +1 -0
- package/dist/ink/hooks/use-clipboard.d.ts +30 -0
- package/dist/ink/hooks/use-clipboard.js +1 -0
- package/dist/ink/hooks/use-color-blindness.d.ts +33 -0
- package/dist/ink/hooks/use-color-blindness.js +1 -0
- package/dist/ink/hooks/use-console-capture.d.ts +43 -0
- package/dist/ink/hooks/use-console-capture.js +1 -0
- package/dist/ink/hooks/use-cursor.d.ts +13 -0
- package/dist/ink/hooks/use-cursor.js +1 -0
- package/dist/ink/hooks/use-focus-manager.d.ts +57 -0
- package/dist/ink/hooks/use-focus-manager.js +1 -0
- package/dist/ink/hooks/use-focus.d.ts +34 -0
- package/dist/ink/hooks/use-focus.js +1 -0
- package/dist/ink/hooks/use-form.d.ts +68 -0
- package/dist/ink/hooks/use-form.js +1 -0
- package/dist/ink/hooks/use-hotkey.d.ts +37 -0
- package/dist/ink/hooks/use-hotkey.js +1 -0
- package/dist/ink/hooks/use-input.d.ts +149 -0
- package/dist/ink/hooks/use-input.js +2 -0
- package/dist/ink/hooks/use-interval.d.ts +25 -0
- package/dist/ink/hooks/use-interval.js +1 -0
- package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +6 -0
- package/dist/ink/hooks/use-is-screen-reader-enabled.js +1 -0
- package/dist/ink/hooks/use-key-bindings.d.ts +59 -0
- package/dist/ink/hooks/use-key-bindings.js +1 -0
- package/dist/ink/hooks/use-key-chord.d.ts +25 -0
- package/dist/ink/hooks/use-key-chord.js +1 -0
- package/dist/ink/hooks/use-linked-scroll.d.ts +49 -0
- package/dist/ink/hooks/use-linked-scroll.js +1 -0
- package/dist/ink/hooks/use-paste.d.ts +45 -0
- package/dist/ink/hooks/use-paste.js +1 -0
- package/dist/ink/hooks/use-persistent-state.d.ts +65 -0
- package/dist/ink/hooks/use-persistent-state.js +2 -0
- package/dist/ink/hooks/use-scroll-acceleration.d.ts +47 -0
- package/dist/ink/hooks/use-scroll-acceleration.js +1 -0
- package/dist/ink/hooks/use-scroll-input.d.ts +34 -0
- package/dist/ink/hooks/use-scroll-input.js +1 -0
- package/dist/ink/hooks/use-stderr.d.ts +16 -0
- package/dist/ink/hooks/use-stderr.js +1 -0
- package/dist/ink/hooks/use-stdin.d.ts +30 -0
- package/dist/ink/hooks/use-stdin.js +1 -0
- package/dist/ink/hooks/use-stdout.d.ts +16 -0
- package/dist/ink/hooks/use-stdout.js +1 -0
- package/dist/ink/hooks/use-stopwatch.d.ts +39 -0
- package/dist/ink/hooks/use-stopwatch.js +1 -0
- package/dist/ink/hooks/use-terminal-palette.d.ts +20 -0
- package/dist/ink/hooks/use-terminal-palette.js +1 -0
- package/dist/ink/hooks/use-text-buffer.d.ts +42 -0
- package/dist/ink/hooks/use-text-buffer.js +4 -0
- package/dist/ink/hooks/use-text-selection.d.ts +45 -0
- package/dist/ink/hooks/use-text-selection.js +1 -0
- package/dist/ink/hooks/use-timeout.d.ts +24 -0
- package/dist/ink/hooks/use-timeout.js +1 -0
- package/dist/ink/hooks/use-timer.d.ts +48 -0
- package/dist/ink/hooks/use-timer.js +1 -0
- package/dist/ink/hooks/use-window-size.d.ts +18 -0
- package/dist/ink/hooks/use-window-size.js +1 -0
- package/dist/ink/index.d.ts +30 -6251
- package/dist/ink/index.js +1 -1
- package/dist/ink/mouse/use-element-position.d.ts +31 -0
- package/dist/ink/mouse/use-element-position.js +1 -0
- package/dist/ink/mouse/use-mouse-action.d.ts +5 -0
- package/dist/ink/mouse/use-mouse-action.js +1 -0
- package/dist/ink/mouse/use-mouse-position.d.ts +5 -0
- package/dist/ink/mouse/use-mouse-position.js +1 -0
- package/dist/ink/mouse/use-mouse.d.ts +5 -0
- package/dist/ink/mouse/use-mouse.js +1 -0
- package/dist/ink/mouse/use-on-mouse-click.d.ts +16 -0
- package/dist/ink/mouse/use-on-mouse-click.js +1 -0
- package/dist/ink/mouse/use-on-mouse-hover.d.ts +10 -0
- package/dist/ink/mouse/use-on-mouse-hover.js +1 -0
- package/dist/ink/mouse/use-on-mouse-state.d.ts +13 -0
- package/dist/ink/mouse/use-on-mouse-state.js +1 -0
- package/dist/packem_chunks/devtools.js +1 -1
- package/dist/packem_shared/COLOR_BLINDNESS_COMPENSATION-Ilnoyeqc.js +1 -0
- package/dist/packem_shared/ControlledScrollView-Cn4byU2n.js +1 -0
- package/dist/packem_shared/DevTools-k6uiVzqv.js +1 -0
- package/dist/packem_shared/FilePicker-BLS9nOPz.js +1 -0
- package/dist/packem_shared/FocusContext-C2Sosxa4.js +1 -0
- package/dist/packem_shared/Fullscreen-BRhuBLBh.js +1 -0
- package/dist/packem_shared/IMECompositionBuffer-VhC9HRCv.js +1 -0
- package/dist/packem_shared/InputParser-CtwkCbrQ.js +2 -0
- package/dist/packem_shared/KEY-C--kOw41.js +1 -0
- package/dist/packem_shared/LayoutNode-LPYsuzBg.js +1 -0
- package/dist/packem_shared/MouseProvider-DUqQ3Eaa.js +1 -0
- package/dist/packem_shared/NAMED_COLORS-82DpREQV.js +1 -0
- package/dist/packem_shared/Range-BsVYNWtg.js +1 -0
- package/dist/packem_shared/Renderer-DsskdkUd.js +1 -0
- package/dist/packem_shared/ResizeObserver-BI9bDy-j.js +1 -0
- package/dist/packem_shared/ScrollBar-qa1IzDDv.js +1 -0
- package/dist/packem_shared/ScrollBarBox-DchESZWv.js +1 -0
- package/dist/packem_shared/ScrollList-BBAnRsrC.js +1 -0
- package/dist/packem_shared/ScrollView-CHAo7Epj.js +1 -0
- package/dist/packem_shared/Static-DSzsElz4.js +1 -0
- package/dist/packem_shared/TreeNodeMap-cJlYqckB.js +1 -0
- package/dist/packem_shared/TreeView-BsvLCsf0.js +1 -0
- package/dist/packem_shared/TuiApp-BPL8v1i1.js +1 -0
- package/dist/packem_shared/TuiContext-BNmP0lMY.js +3 -0
- package/dist/packem_shared/ansi-parser-DlgLtOYO.js +1 -0
- package/dist/packem_shared/ansi-tokenizer-BU67A126.js +1 -0
- package/dist/packem_shared/braille-ch3O5D7I.js +1 -0
- package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +39 -0
- package/dist/packem_shared/calculateScroll-D4Y_JR4H.js +1 -0
- package/dist/packem_shared/{measureElement-DA8WqFP_.js → calculateScrollbarLayout-Lf6i24c9.js} +1 -1
- package/dist/packem_shared/clearOsc52-BUpnQOav.js +1 -0
- package/dist/packem_shared/clearStringWidthCache-DKFjfJuB.js +1 -0
- package/dist/packem_shared/clipboard.d-D6lZTQ21.d.ts +23 -0
- package/dist/packem_shared/color-matrix.d-DSXLsB64.d.ts +50 -0
- package/dist/packem_shared/colorize-DU4YZkp3.js +1 -0
- package/dist/packem_shared/controlled-scroll-view-BVg7ywNW.js +1 -0
- package/dist/packem_shared/createInlineLoop-BT40Wpmx.js +2 -0
- package/dist/packem_shared/createScreen-DoYpyL0V.js +3 -0
- package/dist/packem_shared/cursor-helpers.d-BONB9tky.d.ts +12 -0
- package/dist/packem_shared/dom-rphpG0kf.js +1 -0
- package/dist/packem_shared/dom.d-B4kXbaVY.d.ts +449 -0
- package/dist/packem_shared/format-time-fjoQHMxD.js +1 -0
- package/dist/packem_shared/{getPathToRoot-B2tKmx3i.js → getPathToRoot-PDJeqiEH.js} +1 -1
- package/dist/packem_shared/input-utils-BSWCb4F_.js +1 -0
- package/dist/packem_shared/{input.d-Bfq7oc06.d.ts → input.d-CgxV2e8U.d.ts} +1 -1
- package/dist/packem_shared/isIntersecting-Bo2npvMR.js +1 -0
- package/dist/packem_shared/isTerminalPaletteQuerySupported-BYzmqq9-.js +1 -0
- package/dist/packem_shared/kittyFlags-g8ALyoCU.js +1 -0
- package/dist/packem_shared/line-chart-C7CUrvVs.js +1 -0
- package/dist/packem_shared/load-native-root-binding-DDikxNox.js +1 -0
- package/dist/packem_shared/measure-element-D4M9iSYp.js +1 -0
- package/dist/packem_shared/measure-text-B7juNq4Y.js +3 -0
- package/dist/packem_shared/mouse-context.d-BfL9xGk_.d.ts +30 -0
- package/dist/packem_shared/parseSgrMouse-bUrqPrh-.js +1 -0
- package/dist/packem_shared/processLayout-I83k6vXE.js +2 -0
- package/dist/packem_shared/reconciler-CFyBVf7l.js +1 -0
- package/dist/packem_shared/reconciler-ClpU7Y-V.js +1 -0
- package/dist/packem_shared/render-CuQecTAs.js +24 -0
- package/dist/packem_shared/render-DFZ8NHlG.js +1 -0
- package/dist/packem_shared/render.d-CBnYBDk2.d.ts +417 -0
- package/dist/packem_shared/renderToString-DwXFY8Qh.js +4 -0
- package/dist/packem_shared/renderToString-L_bpw4OQ.js +2 -0
- package/dist/packem_shared/renderTreeToBuffer-C8lS0lJ2.js +2 -0
- package/dist/packem_shared/renderer-k-xShm1P.js +17 -0
- package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +119 -0
- package/dist/packem_shared/selection.d-CI3_p8wg.d.ts +62 -0
- package/dist/packem_shared/squashTextNodesWithMap-BmUSBPfc.js +1 -0
- package/dist/packem_shared/stderr-context-Bvnik0hL.js +1 -0
- package/dist/packem_shared/stdin-context-88AhuztD.js +1 -0
- package/dist/packem_shared/styles.d-cMo36xQz.d.ts +396 -0
- package/dist/packem_shared/terminal-palette.d-D2SQjfn-.d.ts +19 -0
- package/dist/packem_shared/text-width-e49vlbQH.js +2 -0
- package/dist/packem_shared/token-to-elements-D6J6-P2A.js +1 -0
- package/dist/packem_shared/treeViewTheme-Dq3ekRAC.js +1 -0
- package/dist/packem_shared/useTreeView-D5ifGwG3.js +1 -0
- package/dist/packem_shared/useTreeViewState-BiTJakkh.js +1 -0
- package/dist/packem_shared/utils-Bup8lyK8.js +1 -0
- package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
- package/dist/packem_shared/waitFor-CTAki32d.js +4 -0
- package/dist/packem_shared/wrapOrTruncateStyledLine-46W8bTtv.js +3 -0
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/dist/testing/index.d.ts +5 -1
- package/dist/testing/index.js +1 -1
- package/index.js +65 -156
- package/package.json +601 -47
- package/dist/packem_shared/Accordion-BXsqchV-.js +0 -1
- package/dist/packem_shared/Alert-BhYVMHtR.js +0 -1
- package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +0 -1
- package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +0 -1
- package/dist/packem_shared/AreaChart-Chy-frI7.js +0 -1
- package/dist/packem_shared/Badge-B8WPyRsK.js +0 -1
- package/dist/packem_shared/BarChart-rpZtlMcF.js +0 -1
- package/dist/packem_shared/BigText-CRpwUzrt.js +0 -1
- package/dist/packem_shared/BlinkDot-BvnRuWP8.js +0 -1
- package/dist/packem_shared/Box-BwqSvWuq.js +0 -1
- package/dist/packem_shared/Breadcrumb-D0hClbRV.js +0 -1
- package/dist/packem_shared/Button-B89Yvbc6.js +0 -1
- package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +0 -1
- package/dist/packem_shared/Calendar-Dmflvm2S.js +0 -1
- package/dist/packem_shared/Canvas-CKg6WV47.js +0 -1
- package/dist/packem_shared/Card-B_9fXdtU.js +0 -1
- package/dist/packem_shared/Checkbox-BN71eCWU.js +0 -1
- package/dist/packem_shared/Code-HhevcyiH.js +0 -2
- package/dist/packem_shared/Collapsible-u6uf_FdV.js +0 -1
- package/dist/packem_shared/CommandBlock-B-nslpCv.js +0 -4
- package/dist/packem_shared/CommandPalette-CEFdaURo.js +0 -1
- package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +0 -1
- package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +0 -1
- package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +0 -1
- package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +0 -1
- package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +0 -1
- package/dist/packem_shared/Cursor-BoLFIMol.js +0 -1
- package/dist/packem_shared/DatePicker-CnSrFFAE.js +0 -1
- package/dist/packem_shared/DefinitionList-v8RDuF_R.js +0 -1
- package/dist/packem_shared/DevTools-O8EbCfHa.js +0 -1
- package/dist/packem_shared/Dialog-CTaL8pn0.js +0 -1
- package/dist/packem_shared/DiffView-BUIFqUB0.js +0 -1
- package/dist/packem_shared/Divider-C47bKmqu.js +0 -1
- package/dist/packem_shared/FilePicker-CUo7R5Qb.js +0 -1
- package/dist/packem_shared/FocusContext-Xy0cwJpO.js +0 -1
- package/dist/packem_shared/FormField-af3aUpRL.js +0 -1
- package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +0 -1
- package/dist/packem_shared/Gauge-Dz-usH__.js +0 -1
- package/dist/packem_shared/Gradient-DYNc0GZA.js +0 -1
- package/dist/packem_shared/Heading-mwEYza3Y.js +0 -1
- package/dist/packem_shared/Heatmap-ChL97U1-.js +0 -1
- package/dist/packem_shared/Help-Zcelyw_U.js +0 -1
- package/dist/packem_shared/Histogram-FIf2F83d.js +0 -1
- package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +0 -1
- package/dist/packem_shared/InputParser-rZKjY_7Y.js +0 -2
- package/dist/packem_shared/KEY-Bk8B-3h_.js +0 -1
- package/dist/packem_shared/Kbd-DpkPp4jB.js +0 -1
- package/dist/packem_shared/LayoutNode-rxblE317.js +0 -1
- package/dist/packem_shared/LineChart-BXE_girm.js +0 -1
- package/dist/packem_shared/Link-i2o2EG4-.js +0 -1
- package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +0 -1
- package/dist/packem_shared/Markdown-R1XqK63D.js +0 -1
- package/dist/packem_shared/MaskedInput-J01phOZs.js +0 -1
- package/dist/packem_shared/Menu-CfrH4ymk.js +0 -1
- package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +0 -1
- package/dist/packem_shared/ModelBadge-D3wrXncu.js +0 -1
- package/dist/packem_shared/MouseProvider-pjza-lpc.js +0 -1
- package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +0 -1
- package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +0 -1
- package/dist/packem_shared/Newline-BSG4iUqp.js +0 -2
- package/dist/packem_shared/OperationTree-DksxjMIV.js +0 -1
- package/dist/packem_shared/OptionList-CNx7r9yN.js +0 -1
- package/dist/packem_shared/OrderedList-BeDy035w.js +0 -1
- package/dist/packem_shared/Paginator-B56s6bhS.js +0 -1
- package/dist/packem_shared/Paragraph-BqJlH0R-.js +0 -1
- package/dist/packem_shared/Placeholder-GMpHRGC8.js +0 -1
- package/dist/packem_shared/ProgressBar-Bj3fmORR.js +0 -1
- package/dist/packem_shared/RadioGroup-Br8BeEwS.js +0 -1
- package/dist/packem_shared/Renderer-DJXooAsp.js +0 -1
- package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +0 -1
- package/dist/packem_shared/ScatterPlot-OhfYco5l.js +0 -1
- package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +0 -1
- package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +0 -1
- package/dist/packem_shared/ScrollList-DiVGyEjv.js +0 -1
- package/dist/packem_shared/ScrollView-BojONotI.js +0 -1
- package/dist/packem_shared/SearchInput-BoPTRbhV.js +0 -1
- package/dist/packem_shared/SelectInput-CAJ7SCBq.js +0 -1
- package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +0 -1
- package/dist/packem_shared/SelectInputItem-BEkbmobs.js +0 -1
- package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +0 -1
- package/dist/packem_shared/Slider-Cg_tJpKa.js +0 -1
- package/dist/packem_shared/Spacer-eT3HOrXk.js +0 -1
- package/dist/packem_shared/Sparkline-T6_FPVET.js +0 -1
- package/dist/packem_shared/Spinner-B0-A50pu.js +0 -1
- package/dist/packem_shared/Static-DLynr5pn.js +0 -1
- package/dist/packem_shared/Static-jzLPaHJF.js +0 -1
- package/dist/packem_shared/StaticRender-BgD61E7x.js +0 -1
- package/dist/packem_shared/StatusLine-Ch4jjef1.js +0 -1
- package/dist/packem_shared/StatusMessage-B1qfKeMM.js +0 -1
- package/dist/packem_shared/Stepper-CNPAqxiU.js +0 -1
- package/dist/packem_shared/Stopwatch-CAx2EWwq.js +0 -1
- package/dist/packem_shared/StreamingText-BYOKSB2T.js +0 -1
- package/dist/packem_shared/Switch-DzSpKYu7.js +0 -1
- package/dist/packem_shared/Tab-BcXzSUdj.js +0 -1
- package/dist/packem_shared/Table-DJp1TLrR.js +0 -1
- package/dist/packem_shared/Tabs-D68z0SOt.js +0 -1
- package/dist/packem_shared/Tag-BvLHnYRn.js +0 -1
- package/dist/packem_shared/Text-mTAve9R2.js +0 -1
- package/dist/packem_shared/TextInput-C_gYQlnF.js +0 -1
- package/dist/packem_shared/Textarea-C2ET_oMb.js +0 -2
- package/dist/packem_shared/Timer-CI3aQX65.js +0 -1
- package/dist/packem_shared/Toast-Drvc8XfG.js +0 -1
- package/dist/packem_shared/Tooltip-C5UnQlLd.js +0 -1
- package/dist/packem_shared/Transform-fYmcdqRT.js +0 -1
- package/dist/packem_shared/Transition-CJDBKYUB.js +0 -1
- package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +0 -1
- package/dist/packem_shared/TreeView-DjhacGJ5.js +0 -1
- package/dist/packem_shared/TuiApp-DrjI_i-R.js +0 -1
- package/dist/packem_shared/TuiContext-BoJvG3NN.js +0 -3
- package/dist/packem_shared/UnorderedList-BnfqexZs.js +0 -1
- package/dist/packem_shared/ansi-parser-B6uXaq65.js +0 -1
- package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +0 -1
- package/dist/packem_shared/boxes-DyY_LXCi.js +0 -1
- package/dist/packem_shared/braille-BBjIoaN0.js +0 -1
- package/dist/packem_shared/colorize-DbTZMrJO.js +0 -1
- package/dist/packem_shared/comparePoints-C85EsmNz.js +0 -1
- package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +0 -1
- package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +0 -2
- package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +0 -1
- package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +0 -2
- package/dist/packem_shared/createScreen-CrLrxA6t.js +0 -3
- package/dist/packem_shared/dom-4y__5fWB.js +0 -1
- package/dist/packem_shared/format-time-C7Q-hQZq.js +0 -1
- package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +0 -1
- package/dist/packem_shared/input-utils-fAxzSlNh.js +0 -1
- package/dist/packem_shared/isIntersecting-B3KbKTmu.js +0 -1
- package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +0 -1
- package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +0 -1
- package/dist/packem_shared/kittyFlags-C3rZLbcK.js +0 -1
- package/dist/packem_shared/line-chart-DrM8PwnI.js +0 -1
- package/dist/packem_shared/measure-element-DSp7YDus.js +0 -2
- package/dist/packem_shared/measure-text-DDjHT1jD.js +0 -3
- package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +0 -1
- package/dist/packem_shared/processLayout-DXDfFb_d.js +0 -1
- package/dist/packem_shared/reconciler-BuOP-TZ6.js +0 -1
- package/dist/packem_shared/reconciler-DSYCrIZs.js +0 -1
- package/dist/packem_shared/render-DDqtMAFN.js +0 -1
- package/dist/packem_shared/render-_r0K9K11.js +0 -28
- package/dist/packem_shared/render.d-CNIzVQTh.d.ts +0 -1257
- package/dist/packem_shared/renderToString-DeqOWRP8.js +0 -4
- package/dist/packem_shared/renderToString-IYYPyASm.js +0 -2
- package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +0 -2
- package/dist/packem_shared/renderer-D2p6av2X.js +0 -17
- package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +0 -1
- package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.js +0 -1
- package/dist/packem_shared/stderr-context-BzEaUICS.js +0 -1
- package/dist/packem_shared/stdin-context-BTaaFagk.js +0 -1
- package/dist/packem_shared/text-width-CZ9vPvM0.js +0 -2
- package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +0 -1
- package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +0 -1
- package/dist/packem_shared/useAnimation-B9we6ZzL.js +0 -1
- package/dist/packem_shared/useApp-B6fvM42d.js +0 -1
- package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +0 -1
- package/dist/packem_shared/useClipboard-CBxy0hT8.js +0 -1
- package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +0 -1
- package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +0 -1
- package/dist/packem_shared/useCursor-CPu8T5Db.js +0 -1
- package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +0 -1
- package/dist/packem_shared/useFocus-DSmziO_x.js +0 -1
- package/dist/packem_shared/useFocusManager-Uapn3LQo.js +0 -1
- package/dist/packem_shared/useForm-CzV-Oext.js +0 -1
- package/dist/packem_shared/useHotkey-D0dGey14.js +0 -1
- package/dist/packem_shared/useInput-D1_jG26Z.js +0 -2
- package/dist/packem_shared/useInterval-AobjZT3u.js +0 -1
- package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +0 -1
- package/dist/packem_shared/useKeyBindings-zabkEJQs.js +0 -1
- package/dist/packem_shared/useKeyChord-CICQIxXj.js +0 -1
- package/dist/packem_shared/useMouseAction-2dRfU1vE.js +0 -1
- package/dist/packem_shared/useMouseContext-C746G7kY.js +0 -1
- package/dist/packem_shared/useMousePosition-BTWfV4JK.js +0 -1
- package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +0 -1
- package/dist/packem_shared/useOnMouseHover-D3DczIol.js +0 -1
- package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +0 -1
- package/dist/packem_shared/usePaste-CKKB9H-Z.js +0 -1
- package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +0 -1
- package/dist/packem_shared/useScrollInput-Caghtn-Q.js +0 -1
- package/dist/packem_shared/useStderr-BDZb6InG.js +0 -1
- package/dist/packem_shared/useStdin-DKa4h35k.js +0 -1
- package/dist/packem_shared/useStdout-B-2lX4C5.js +0 -1
- package/dist/packem_shared/useStopwatch-DffK7iMh.js +0 -1
- package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +0 -1
- package/dist/packem_shared/useTextBuffer-DekkGLxI.js +0 -4
- package/dist/packem_shared/useTextSelection-CGT0GLDR.js +0 -1
- package/dist/packem_shared/useTimeout-7LEFYTnG.js +0 -1
- package/dist/packem_shared/useTimer-DyoqSyGi.js +0 -1
- package/dist/packem_shared/useTreeView-8UlTK6sW.js +0 -1
- package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +0 -1
- package/dist/packem_shared/useWindowSize-yDZsXF8z.js +0 -1
- package/dist/packem_shared/utils-THUhYKG2.js +0 -1
- package/dist/packem_shared/waitFor-Dj5zfL5s.js +0 -4
- package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var P=Object.defineProperty;var p=(e,t)=>P(e,"name",{value:t,configurable:!0});import{createRequire as b}from"node:module";import{version as O,createContext as F}from"react";import G from"react-reconciler";import{NoEventPriority as L,DefaultEventPriority as v}from"react-reconciler/constants.js";import{unstable_shouldYield as w,unstable_scheduleCallback as k,unstable_now as B,unstable_cancelCallback as W}from"scheduler";import n from"yoga-layout";import{b as h,d as g,s as E,m as _,e as M,r as I,f as H,c as U,h as C,j as N}from"./dom-4y__5fWB.js";const re=b(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,S=D;var Y=Object.defineProperty,u=p((e,t)=>Y(e,"name",{value:t,configurable:!0}),"t");const j=[["top",n.EDGE_TOP],["right",n.EDGE_RIGHT],["bottom",n.EDGE_BOTTOM],["left",n.EDGE_LEFT]],X=u((e,t)=>{if("position"in t){let r=n.POSITION_TYPE_RELATIVE;t.position==="absolute"?r=n.POSITION_TYPE_ABSOLUTE:t.position==="static"&&(r=n.POSITION_TYPE_STATIC),e.setPositionType(r)}for(const[r,s]of j){if(!(r in t))continue;const l=t[r];if(typeof l=="string"){e.setPositionPercent(s,Number.parseFloat(l));continue}e.setPosition(s,l)}},"applyPositionStyles"),V=u((e,t)=>{"margin"in t&&e.setMargin(n.EDGE_ALL,t.margin??0),"marginX"in t&&e.setMargin(n.EDGE_HORIZONTAL,t.marginX??0),"marginY"in t&&e.setMargin(n.EDGE_VERTICAL,t.marginY??0),"marginLeft"in t&&e.setMargin(n.EDGE_START,t.marginLeft||0),"marginRight"in t&&e.setMargin(n.EDGE_END,t.marginRight||0),"marginTop"in t&&e.setMargin(n.EDGE_TOP,t.marginTop||0),"marginBottom"in t&&e.setMargin(n.EDGE_BOTTOM,t.marginBottom||0)},"applyMarginStyles"),J=u((e,t)=>{"padding"in t&&e.setPadding(n.EDGE_ALL,t.padding??0),"paddingX"in t&&e.setPadding(n.EDGE_HORIZONTAL,t.paddingX??0),"paddingY"in t&&e.setPadding(n.EDGE_VERTICAL,t.paddingY??0),"paddingLeft"in t&&e.setPadding(n.EDGE_LEFT,t.paddingLeft||0),"paddingRight"in t&&e.setPadding(n.EDGE_RIGHT,t.paddingRight||0),"paddingTop"in t&&e.setPadding(n.EDGE_TOP,t.paddingTop||0),"paddingBottom"in t&&e.setPadding(n.EDGE_BOTTOM,t.paddingBottom||0)},"applyPaddingStyles"),q=u((e,t)=>{"flexGrow"in t&&e.setFlexGrow(t.flexGrow??0),"flexShrink"in t&&e.setFlexShrink(typeof t.flexShrink=="number"?t.flexShrink:1),"flexWrap"in t&&(t.flexWrap==="nowrap"&&e.setFlexWrap(n.WRAP_NO_WRAP),t.flexWrap==="wrap"&&e.setFlexWrap(n.WRAP_WRAP),t.flexWrap==="wrap-reverse"&&e.setFlexWrap(n.WRAP_WRAP_REVERSE)),"flexDirection"in t&&(t.flexDirection==="row"&&e.setFlexDirection(n.FLEX_DIRECTION_ROW),t.flexDirection==="row-reverse"&&e.setFlexDirection(n.FLEX_DIRECTION_ROW_REVERSE),t.flexDirection==="column"&&e.setFlexDirection(n.FLEX_DIRECTION_COLUMN),t.flexDirection==="column-reverse"&&e.setFlexDirection(n.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in t&&(typeof t.flexBasis=="number"?e.setFlexBasis(t.flexBasis):typeof t.flexBasis=="string"?e.setFlexBasisPercent(Number.parseInt(t.flexBasis,10)):e.setFlexBasis(Number.NaN)),"alignItems"in t&&((t.alignItems==="stretch"||!t.alignItems)&&e.setAlignItems(n.ALIGN_STRETCH),t.alignItems==="flex-start"&&e.setAlignItems(n.ALIGN_FLEX_START),t.alignItems==="center"&&e.setAlignItems(n.ALIGN_CENTER),t.alignItems==="flex-end"&&e.setAlignItems(n.ALIGN_FLEX_END),t.alignItems==="baseline"&&e.setAlignItems(n.ALIGN_BASELINE)),"alignSelf"in t&&((t.alignSelf==="auto"||!t.alignSelf)&&e.setAlignSelf(n.ALIGN_AUTO),t.alignSelf==="flex-start"&&e.setAlignSelf(n.ALIGN_FLEX_START),t.alignSelf==="center"&&e.setAlignSelf(n.ALIGN_CENTER),t.alignSelf==="flex-end"&&e.setAlignSelf(n.ALIGN_FLEX_END),t.alignSelf==="stretch"&&e.setAlignSelf(n.ALIGN_STRETCH),t.alignSelf==="baseline"&&e.setAlignSelf(n.ALIGN_BASELINE)),"alignContent"in t&&((t.alignContent==="flex-start"||!t.alignContent)&&e.setAlignContent(n.ALIGN_FLEX_START),t.alignContent==="center"&&e.setAlignContent(n.ALIGN_CENTER),t.alignContent==="flex-end"&&e.setAlignContent(n.ALIGN_FLEX_END),t.alignContent==="space-between"&&e.setAlignContent(n.ALIGN_SPACE_BETWEEN),t.alignContent==="space-around"&&e.setAlignContent(n.ALIGN_SPACE_AROUND),t.alignContent==="space-evenly"&&e.setAlignContent(n.ALIGN_SPACE_EVENLY),t.alignContent==="stretch"&&e.setAlignContent(n.ALIGN_STRETCH)),"justifyContent"in t&&((t.justifyContent==="flex-start"||!t.justifyContent)&&e.setJustifyContent(n.JUSTIFY_FLEX_START),t.justifyContent==="center"&&e.setJustifyContent(n.JUSTIFY_CENTER),t.justifyContent==="flex-end"&&e.setJustifyContent(n.JUSTIFY_FLEX_END),t.justifyContent==="space-between"&&e.setJustifyContent(n.JUSTIFY_SPACE_BETWEEN),t.justifyContent==="space-around"&&e.setJustifyContent(n.JUSTIFY_SPACE_AROUND),t.justifyContent==="space-evenly"&&e.setJustifyContent(n.JUSTIFY_SPACE_EVENLY))},"applyFlexStyles"),$=u((e,t)=>{"width"in t&&(typeof t.width=="number"?e.setWidth(t.width):typeof t.width=="string"?e.setWidthPercent(Number.parseInt(t.width,10)):e.setWidthAuto()),"height"in t&&(typeof t.height=="number"?e.setHeight(t.height):typeof t.height=="string"?e.setHeightPercent(Number.parseInt(t.height,10)):e.setHeightAuto()),"minWidth"in t&&(typeof t.minWidth=="string"?e.setMinWidthPercent(Number.parseInt(t.minWidth,10)):e.setMinWidth(t.minWidth??0)),"minHeight"in t&&(typeof t.minHeight=="string"?e.setMinHeightPercent(Number.parseInt(t.minHeight,10)):e.setMinHeight(t.minHeight??0)),"maxWidth"in t&&(typeof t.maxWidth=="string"?e.setMaxWidthPercent(Number.parseInt(t.maxWidth,10)):e.setMaxWidth(t.maxWidth)),"maxHeight"in t&&(typeof t.maxHeight=="string"?e.setMaxHeightPercent(Number.parseInt(t.maxHeight,10)):e.setMaxHeight(t.maxHeight)),"aspectRatio"in t&&e.setAspectRatio(t.aspectRatio)},"applyDimensionStyles"),z=u((e,t)=>{"display"in t&&e.setDisplay(t.display==="flex"?n.DISPLAY_FLEX:n.DISPLAY_NONE)},"applyDisplayStyles"),Z=u((e,t,r)=>{if(!("borderStyle"in t||"borderTop"in t||"borderBottom"in t||"borderLeft"in t||"borderRight"in t))return;const s=r.borderStyle?1:0;e.setBorder(n.EDGE_TOP,r.borderTop===!1?0:s),e.setBorder(n.EDGE_BOTTOM,r.borderBottom===!1?0:s),e.setBorder(n.EDGE_LEFT,r.borderLeft===!1?0:s),e.setBorder(n.EDGE_RIGHT,r.borderRight===!1?0:s)},"applyBorderStyles"),K=u((e,t)=>{"gap"in t&&e.setGap(n.GUTTER_ALL,t.gap??0),"columnGap"in t&&e.setGap(n.GUTTER_COLUMN,t.columnGap??0),"rowGap"in t&&e.setGap(n.GUTTER_ROW,t.rowGap??0)},"applyGapStyles"),Q=u((e,t)=>{const r=t.overflow??"visible",s=t.overflowX??r,l=t.overflowY??r;s==="scroll"||l==="scroll"?e.setOverflow(n.OVERFLOW_SCROLL):s==="hidden"||l==="hidden"?e.setOverflow(n.OVERFLOW_HIDDEN):e.setOverflow(n.OVERFLOW_VISIBLE)},"applyOverflowStyles"),x=u((e,t={},r=t)=>{X(e,t),V(e,t),J(e,t),q(e,t),$(e,t),z(e,t),Z(e,t,r),K(e,t),Q(e,r)},"styles");var ee=Object.defineProperty,c=p((e,t)=>ee(e,"name",{value:t,configurable:!0}),"l");if(S.env.DEV==="true"){let e=!1;try{import.meta.resolve("react-devtools-core"),e=!0}catch{}e&&await import("../packem_chunks/devtools.js")}const A=c((e,t)=>{if(e===t)return;if(!e)return t;const r={};let s=!1;for(const l of Object.keys(e))(!t||!Object.hasOwn(t,l))&&(r[l]=void 0,s=!0);if(t)for(const l of Object.keys(t))t[l]!==e[l]&&(r[l]=t[l],s=!0);return s?r:void 0},"diff"),y=c(e=>{if(e){if(e.yogaNode?.unsetMeasureFunc(),"resizeObservers"in e&&e.resizeObservers?.clear(),"childNodes"in e&&e.childNodes)for(const t of e.childNodes)y(t);e.yogaNode?.free(),"cachedRender"in e&&(e.cachedRender=void 0),"childNodes"in e&&(e.childNodes=[]),e.parentNode=void 0}},"cleanupNodeTree");let m=L,T;async function R(){const e=(await import("node:fs")).readFileSync(new URL("../package.json",import.meta.url),"utf8"),t=JSON.parse(e);return{name:t?.name,version:t?.version}}p(R,"B");c(R,"loadPackageJson");let f={name:"ink",version:O};if(S.env.DEV==="true")try{const e=await R();f={name:e.name||f.name,version:e.version||f.version}}catch(e){console.warn("Failed to load package.json in development mode. Falling back to default renderer metadata.",e)}const de=G({afterActiveInstanceBlur(){},appendChild:g,appendChildToContainer:g,appendInitialChild:g,beforeActiveInstanceBlur(){},cancelCallback:W,cancelTimeout:clearTimeout,clearContainer:c(()=>!1,"clearContainer"),commitTextUpdate(e,t,r){E(e,r)},commitUpdate(e,t,r,s){T&&e.internal_static&&(T.isStaticDirty=!0);const l=A(r,s),a=A(r.style,s.style);if(!l&&!a)return;let i=!!a;if(l){for(const[o,d]of Object.entries(l))if(o!=="children"){if(o==="style"){C(e,d);continue}if(o==="internal_transform"){e.internal_transform=d,i=!0;continue}if(o==="internal_cursor"){e.internal_cursor=d,i=!0;continue}if(o==="internal_static"){e.internal_static=!0,i=!0;continue}if(o==="sticky"){e.internal_sticky=d,i=!0;continue}if(o==="internalStickyAlternate"){e.internal_stickyAlternate=d,i=!0;continue}if(o==="opaque"){e.internal_opaque=d,i=!0;continue}if(o==="scrollbar"){e.internal_scrollbar=d,i=!0;continue}if(o==="internal_terminalCursorFocus"){e.internal_terminalCursorFocus=d,i=!0;continue}if(o==="internal_terminalCursorPosition"){e.internal_terminalCursorPosition=d,i=!0;continue}if(o==="cachedRender"){e.cachedRender=d,i=!0;continue}N(e,o,d),i=!0}}a&&e.yogaNode&&x(e.yogaNode,a,s.style??{}),i&&_(e)},createInstance(e,t,r,s){if(s.isInsideText&&e==="ink-box")throw new Error("<Box> can’t be nested inside <Text> component");if(s.isInsideText&&e==="ink-cursor")throw new Error("<Cursor> can’t be nested inside <Text> component");const l=e==="ink-text"&&s.isInsideText?"ink-virtual-text":e,a=U(l);for(const[i,o]of Object.entries(t))if(i!=="children"){if(i==="style"){C(a,o),a.yogaNode&&x(a.yogaNode,o);continue}if(i==="internal_transform"){a.internal_transform=o;continue}if(i==="internal_cursor"){a.internal_cursor=o;continue}if(i==="internal_static"){T=r,a.internal_static=!0,r.isStaticDirty=!0,r.staticNode=a;continue}if(i==="sticky"){a.internal_sticky=o;continue}if(i==="internalStickyAlternate"){a.internal_stickyAlternate=o;continue}if(i==="opaque"){a.internal_opaque=o;continue}if(i==="scrollbar"){a.internal_scrollbar=o;continue}if(i==="internal_terminalCursorFocus"){a.internal_terminalCursorFocus=o;continue}if(i==="internal_terminalCursorPosition"){a.internal_terminalCursorPosition=o;continue}if(i==="internal_static"){a.internal_static=!0;continue}if(i==="cachedRender"){a.cachedRender=o;continue}N(a,i,o)}return a},createTextInstance(e,t,r){if(!r.isInsideText)throw new Error(`Text string "${e}" must be rendered inside <Text> component`);return H(e)},detachDeletedInstance(){},finalizeInitialChildren(){return!1},getChildHostContext(e,t){const r=e.isInsideText,s=t==="ink-text"||t==="ink-virtual-text";return r===s?e:{isInsideText:s}},getCurrentUpdatePriority:c(()=>m,"getCurrentUpdatePriority"),getInstanceFromNode:c(()=>null,"getInstanceFromNode"),getInstanceFromScope:c(()=>null,"getInstanceFromScope"),getPublicInstance:c(e=>e,"getPublicInstance"),getRootHostContext:c(()=>({isInsideText:!1}),"getRootHostContext"),hideInstance(e){e.internal_hidden=!0,e.yogaNode?.setDisplay(n.DISPLAY_NONE),_(e)},hideTextInstance(e){E(e,"")},HostTransitionContext:F(null),insertBefore:h,insertInContainerBefore:h,isPrimaryRenderer:!0,maySuspendCommit(){return!0},noTimeout:-1,NotPendingTransition:void 0,now:B,preloadInstance(){return!0},prepareForCommit:c(()=>null,"prepareForCommit"),preparePortalMount:c(()=>null,"preparePortalMount"),prepareScopeUpdate(){},removeChild(e,t){I(e,t),y(t)},removeChildFromContainer(e,t){I(e,t),y(t)},rendererPackageName:f.name,rendererVersion:f.version,requestPostPaintCallback(){},resetAfterCommit(e){if(typeof e.onComputeLayout=="function"&&e.onComputeLayout(),M(e),e.isStaticDirty){e.isStaticDirty=!1,typeof e.onImmediateRender=="function"&&e.onImmediateRender();return}typeof e.onRender=="function"&&e.onRender()},resetFormInstance(){},resetTextContent(){},resolveEventTimeStamp(){return-1.1},resolveEventType(){return null},resolveUpdatePriority(){return m!==L?m:v},scheduleCallback:k,scheduleMicrotask:queueMicrotask,scheduleTimeout:setTimeout,setCurrentUpdatePriority(e){m=e},shouldAttemptEagerTransition(){return!1},shouldSetTextContent:c(()=>!1,"shouldSetTextContent"),shouldYield:w,startSuspendingCommit(){},supportsHydration:!1,supportsMicrotasks:!0,supportsMutation:!0,supportsPersistence:!1,suspendInstance(){},trackSchedulerEvent(){},unhideInstance(e){e.internal_hidden=!1,e.yogaNode?.setDisplay(n.DISPLAY_FLEX),_(e)},unhideTextInstance(e,t){E(e,t)},waitForCommitToBeReady(){return null}});export{de as L,x as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var y=Object.defineProperty;var c=(e,t)=>y(e,"name",{value:t,configurable:!0});import{createContext as b}from"react";import T from"react-reconciler";import{NoEventPriority as C,DefaultEventPriority as I,DiscreteEventPriority as P}from"react-reconciler/constants.js";import{unstable_shouldYield as k,unstable_scheduleCallback as x,unstable_now as S,unstable_cancelCallback as E}from"scheduler";import{LayoutNode as f}from"./LayoutNode-rxblE317.js";import{applyStyles as h,resolveColor as g}from"./NAMED_COLORS-B9fJsYdg.js";import{g as N}from"./text-width-CZ9vPvM0.js";var A=Object.defineProperty,n=c((e,t)=>A(e,"name",{value:t,configurable:!0}),"o");let m=null;function _(e){m=e}c(_,"setOnAfterCommit");n(_,"setOnAfterCommit");let u=C;function p(e){const t=g(e.fg===void 0?e.color===void 0?void 0:e.color:e.fg),o=g(e.bg===void 0?e.backgroundColor===void 0?void 0:e.backgroundColor:e.bg);let r;return e.styles===void 0?(r=0,e.bold&&(r|=1),(e.dim||e.dimColor)&&(r|=2),e.italic&&(r|=4),e.underline&&(r|=8),e.blink&&(r|=16),e.inverse&&(r|=32),e.hidden&&(r|=64),e.strikethrough&&(r|=128)):r=e.styles,{bg:o,fg:t,styles:r}}c(p,"m");n(p,"resolveNodeColors");const U={afterActiveInstanceBlur:n(()=>{},"afterActiveInstanceBlur"),appendChild(e,t){e.insertChild(t,e.children.length)},appendChildToContainer(e,t){e.insertChild(t,e.children.length)},appendInitialChild(e,t){e.insertChild(t,e.children.length)},beforeActiveInstanceBlur:n(()=>{},"beforeActiveInstanceBlur"),cancelCallback:E,cancelTimeout:clearTimeout,clearContainer(e){},commitTextUpdate(e,t,o){e.text=o,e.yogaNode.markDirty()},commitUpdate(e,t,o,r,a){h(e.yogaNode,r);const{bg:i,fg:s,styles:d}=p(r);e.fg=s,e.bg=i,e.styles=d,e._style=r,e.transform=typeof r.transform=="function"?r.transform:void 0},createInstance(e,t,o,r,a){const i=new f,s={...t};s.flexDirection===void 0&&(s.flexDirection="row"),s.flexShrink===void 0&&(s.flexShrink=1),h(i.yogaNode,s);const{bg:d,fg:l,styles:v}=p(t);return i.fg=l,i.bg=d,i.styles=v,i._style=t,typeof t.transform=="function"&&(i.transform=t.transform),i},createTextInstance(e,t,o,r){const a=new f;return a.text=e,a.yogaNode.setWidth(N(e)),a.yogaNode.setHeight(1),a},detachDeletedInstance:n(e=>{e.destroy()},"detachDeletedInstance"),finalizeInitialChildren(e,t,o,r,a){return!1},getChildHostContext(e,t,o){return{isInsideText:t==="text"}},getCurrentEventPriority:n(()=>P,"getCurrentEventPriority"),getCurrentUpdatePriority:n(()=>u,"getCurrentUpdatePriority"),getInstanceFromNode:n(()=>null,"getInstanceFromNode"),getPublicInstance(e){return e},getRootHostContext(e){return{isInsideText:!1}},hideInstance(e){e._hidden=!0},hideTextInstance(e){e._hidden=!0},HostTransitionContext:b(null),insertBefore(e,t,o){t.parent&&t.remove();const r=e.children.indexOf(o);e.insertChild(t,r)},isPrimaryRenderer:!0,maySuspendCommit:n(()=>!0,"maySuspendCommit"),noTimeout:-1,NotPendingTransition:void 0,now:S,preloadInstance:n(()=>!0,"preloadInstance"),prepareForCommit(e){return null},preparePortalMount:n(()=>{},"preparePortalMount"),prepareScopeUpdate:n(()=>{},"prepareScopeUpdate"),prepareUpdate(e,t,o,r,a,i){const s=Object.keys(o).filter(l=>l!=="children"),d=Object.keys(r).filter(l=>l!=="children");if(s.length!==d.length)return!0;for(const l of d)if(o[l]!==r[l])return!0;return null},removeChild(e,t){t.remove()},removeChildFromContainer(e,t){t.remove()},requestPostPaintCallback:n(()=>{},"requestPostPaintCallback"),resetAfterCommit(e){typeof m=="function"&&m()},resolveEventTimeStamp:n(()=>-1.1,"resolveEventTimeStamp"),resolveEventType:n(()=>null,"resolveEventType"),resolveUpdatePriority(){return u!==C?u:I},scheduleCallback:x,scheduleMicrotask:queueMicrotask,scheduleTimeout:setTimeout,setCurrentUpdatePriority(e){u=e},shouldAttemptEagerTransition:n(()=>!1,"shouldAttemptEagerTransition"),shouldSetTextContent(e,t){return!1},shouldYield:k,startSuspendingCommit:n(()=>{},"startSuspendingCommit"),supportsHydration:!1,supportsMicrotasks:!0,supportsMutation:!0,supportsPersistence:!1,suspendInstance:n(()=>{},"suspendInstance"),trackSchedulerEvent:n(()=>{},"trackSchedulerEvent"),unhideInstance(e,t){e._hidden=!1},unhideTextInstance(e,t){e._hidden=!1},waitForCommitToBeReady:n(()=>null,"waitForCommitToBeReady"),warnsIfNotActing:!0},j=T(U);export{j as T,_ as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var W=Object.defineProperty;var v=(r,s)=>W(r,"name",{value:s,configurable:!0});import l from"react";import{FocusProvider as C,useFocusManager as z}from"./FocusContext-Xy0cwJpO.js";import{TuiContext as T,useInput as B}from"./TuiContext-BoJvG3NN.js";import{LayoutNode as b}from"./LayoutNode-rxblE317.js";import{T as f,s as P}from"./reconciler-DSYCrIZs.js";import{renderTreeToBuffer as F}from"./renderTreeToBuffer-DPkoCgP2.js";import{TuiApp as j}from"./TuiApp-DrjI_i-R.js";import{InputParser as H}from"./InputParser-rZKjY_7Y.js";import{terminalSize as q}from"./Renderer-DJXooAsp.js";import{createInlineLoop as G}from"./createInlineLoop-DRNZ7jqH.js";var M=Object.defineProperty,e=v((r,s)=>M(r,"name",{value:s,configurable:!0}),"e");const R=e(r=>l.createElement("box",r,r.children),"_Box"),ee=e(r=>l.createElement("text",r,r.children),"_Text"),te=e(()=>l.createElement(R,{flexGrow:1}),"_Spacer"),L=e(({children:r})=>{const{disableFocus:s,enableFocus:t,focusNext:c,focusPrevious:i}=z();return B((h,a)=>{a.tab&&!a.shift&&c(),a.tab&&a.shift&&i(),a.escape&&(s(),t())}),l.createElement(l.Fragment,null,r)},"TabHandler");function A(r,s){const t=new j,c=new H(process.stdin),i=new b,{height:h,width:a}=t.getSize();i.yogaNode.setWidth(a),i.yogaNode.setHeight(h);const p=f.createContainer(i,0,null,!1,null,"",o=>console.error(o),null),d=e(o=>l.createElement(T.Provider,{value:{app:t,input:c,writeStderr:e(u=>t.writeStderr(u),"writeStderr"),writeStdout:e(u=>t.writeStdout(u),"writeStdout")}},l.createElement(C,null,l.createElement(L,null,o))),"wrap");f.updateContainer(d(r),p,null,()=>{});const x=e((o,u)=>i.calculateLayout(o,u),"calcLayout"),S=e((o,u,_)=>F(i,o,u,_),"renderBuf"),g=e(()=>t.paintNow(x,S),"paintNow");let E=!1;P(()=>{E=!0});const m=Math.round(1e3/(s?.maxFps??60)),y=setInterval(()=>{E&&(E=!1,g())},m);let N;const n=new Promise(o=>{N=o}),w=e(()=>{clearInterval(y),f.updateContainer(null,p,null,()=>{}),i.destroy(),t.stop(),c.stop(),process.off("SIGWINCH",I),N()},"cleanup");c.on("exit",()=>{w(),process.exit(0)}),t.on("quit",()=>{w(),process.exit(0)}),c.start(),t.start();const I=e(()=>{const o=process.stdout.columns||80,u=process.stdout.rows||24;t.resize(o,u),i.yogaNode.setWidth(o),i.yogaNode.setHeight(u),t.emit("resize"),g()},"onSigwinch");return process.on("SIGWINCH",I),g(),{app:t,input:c,rerender(o){f.updateContainer(d(o),p,null,()=>{})},unmount(){w()},waitUntilExit(){return n}}}v(A,"render");e(A,"render");function O(r,s){const t=q(),c=s?.rows??10,{cols:i}=t,h=Math.min(c,t.rows),a=new H(process.stdin),p=new b;p.yogaNode.setWidth(i),p.yogaNode.setHeight(h);const d=[],x=[],S={quit:e(()=>m.stop(),"quit"),writeStderr:e(n=>x.push(n),"writeStderr"),writeStdout:e(n=>d.push(n),"writeStdout")},g=f.createContainer(p,0,null,!1,null,"",n=>console.error(n),null),E=e(n=>l.createElement(T.Provider,{value:{app:S,input:a,writeStderr:S.writeStderr,writeStdout:S.writeStdout}},l.createElement(C,null,l.createElement(L,null,n))),"wrap");f.updateContainer(E(r),g,null,()=>{}),P(()=>{});const m=G((n,w,I)=>{p.calculateLayout(w,I),F(p,n,w,I)},{...s,fps:s?.maxFps??s?.fps??60,rows:h});a.on("exit",()=>m.stop());let y;const N=new Promise(n=>{y=n});return process.on("exit",()=>{d.length>0&&process.stdout.write(d.join("")),x.length>0&&process.stderr.write(x.join("")),y()}),m.start(),a.start(),{unmount(){m.stop()},waitUntilExit(){return N}}}v(O,"renderInline");e(O,"renderInline");export{R as _Box,te as _Spacer,ee as _Text,A as render,O as renderInline};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var Ge=Object.defineProperty;var m=(e,t)=>Ge(e,"name",{value:t,configurable:!0});import{createRequire as Ye}from"node:module";import{jsxs as D,jsx as C}from"react/jsx-runtime";import{setMode as ve,BracketedPasteMode as ye,resetMode as we,cursorShow as pt,cursorUp as Lt,cursorTo as Wt,cursorDown as Xe,cursorHide as Z,eraseLines as X,cursorNextLine as Ze,eraseLineEnd as Je,createDecMode as tr,ALT_SCREEN_ON as er,clearScreenAndHomeCursor as rr,ALT_SCREEN_OFF as ir}from"@visulima/ansi";import{wordWrap as sr}from"@visulima/string";import nr from"patch-console";import{ConcurrentRoot as or,LegacyRoot as ar}from"react-reconciler/constants.js";import ie from"yoga-layout";import{a as ur}from"./accessibility-context-DDyHTwmA.js";import{PureComponent as cr,useState as yt,useRef as F,useCallback as T,useEffect as Et,useMemo as V}from"react";import{e as dr}from"./animation-context-DW3p-vpk.js";import{t as hr}from"./app-context-BVpKlG1z.js";import{o as pr}from"./cursor-context-CFviBqPX.js";import K from"./Box-BwqSvWuq.js";import H from"./Text-mTAve9R2.js";import{o as vr}from"./focus-context-CsT69klR.js";import{t as yr}from"./stderr-context-BzEaUICS.js";import{e as wr}from"./stdin-context-BTaaFagk.js";import{t as br}from"./stdout-context-BnblEPez.js";import{c as xr}from"./dom-4y__5fWB.js";import{resolveFlags as Tr}from"./kittyFlags-C3rZLbcK.js";import{a as Sr}from"./measure-text-DDjHT1jD.js";import{L as U,u as Rr}from"./reconciler-BuOP-TZ6.js";import{r as Cr,R as Er}from"./renderer-D2p6av2X.js";import{measureAndExtractObservers as Or}from"./ResizeObserverEntry-Dq0dk8Kq.js";import{calculateScroll as Pr}from"./getScrollHeight-BTEY8ewu.js";import{g as et}from"./utils-THUhYKG2.js";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
-
const ze=Ye(import.meta.url),it=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,at=m(e=>{if(typeof it<"u"&&it.versions&&it.versions.node){const[t,r]=it.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return it.getBuiltinModule(e)}return ze(e)},"__cjs_getBuiltinModule"),W=it,{env:Ct,cwd:ge}=W,{Stream:Ve}=at("node:stream"),{Buffer:re}=at("node:buffer"),{Console:Qe}=at("node:console"),{EventEmitter:lr}=at("node:events"),{existsSync:fr,readFileSync:mr}=at("node:fs"),gr=at("module");var Nr=Object.defineProperty,Y=m((e,t)=>Nr(e,"name",{value:t,configurable:!0}),"n$3");function be(e,t,{signal:r,edges:i}={}){let s,l=null;const u=i!=null&&i.includes("leading"),n=i==null||i.includes("trailing"),a=Y(()=>{l!==null&&(e.apply(s,l),s=void 0,l=null)},"invoke"),f=Y(()=>{n&&a(),d()},"onTimerEnd");let y=null;const c=Y(()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,f()},t)},"schedule"),o=Y(()=>{y!==null&&(clearTimeout(y),y=null)},"cancelTimer"),d=Y(()=>{o(),s=void 0,l=null},"cancel"),g=Y(()=>{a()},"flush"),w=Y(function(...p){if(r?.aborted)return;s=this,l=p;const P=y==null;c(),u&&P&&a()},"debounced");return w.schedule=c,w.cancel=d,w.flush=g,r?.addEventListener("abort",d,{once:!0}),w}m(be,"E$2");Y(be,"debounce");var $r=Object.defineProperty,_t=m((e,t)=>$r(e,"name",{value:t,configurable:!0}),"c$7");function xe(e,t=0,r={}){typeof r!="object"&&(r={});const{leading:i=!1,trailing:s=!0,maxWait:l}=r,u=Array(2);i&&(u[0]="leading"),s&&(u[1]="trailing");let n,a=null;const f=be(function(...o){n=e.apply(this,o),a=null},t,{edges:u}),y=_t(function(...o){return l!=null&&(a===null&&(a=Date.now()),Date.now()-a>=l)?(n=e.apply(this,o),a=Date.now(),f.cancel(),f.schedule(),n):(f.apply(this,o),n)},"debounced"),c=_t(()=>(f.flush(),n),"flush");return y.cancel=f.cancel,y.flush=c,y}m(xe,"g$2");_t(xe,"debounce");var Ir=Object.defineProperty,kr=m((e,t)=>Ir(e,"name",{value:t,configurable:!0}),"e$2");function jt(e,t=0,r={}){const{leading:i=!0,trailing:s=!0}=r;return xe(e,t,{leading:i,maxWait:t,trailing:s})}m(jt,"c$6");kr(jt,"throttle");var Lr=Object.defineProperty,_r=m((e,t)=>Lr(e,"name",{value:t,configurable:!0}),"t$4");const se=_r(e=>e in Ct&&Ct[e]!=="0"&&Ct[e]!=="false","check"),Te=se("CI")||se("CONTINUOUS_INTEGRATION"),st=[];st.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&st.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&st.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var jr=Object.defineProperty,ut=m((e,t)=>jr(e,"name",{value:t,configurable:!0}),"r$2");const bt=ut(e=>!!e&&!0&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function","processOk"),Ot=Symbol.for("signal-exit emitter"),Pt=globalThis,Ar=Object.defineProperty.bind(Object);let Dr=class{static{m(this,"y")}static{ut(this,"Emitter")}emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Pt[Ot])return Pt[Ot];Ar(Pt,Ot,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){const i=this.listeners[t],s=i.indexOf(r);s!==-1&&(s===0&&i.length===1?i.length=0:i.splice(s,1))}emit(t,r,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(const l of this.listeners[t])s=l(r,i)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,i)||s),s}},Se=class{static{m(this,"c")}static{ut(this,"SignalExitBase")}};const Ur=ut(e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),"signalExitWrap");class Wr extends Se{static{m(this,"_")}static{ut(this,"SignalExitFallback")}onExit(){return()=>{}}load(){}unload(){}}let Mr=class extends Se{static{m(this,"p")}static{ut(this,"SignalExit")}#o=At.platform==="win32"?"SIGINT":"SIGHUP";#e=new Dr;#t;#s;#n;#i={};#r=!1;constructor(t){super(),this.#t=t,this.#i={};for(const r of st)this.#i[r]=()=>{const i=this.#t.listeners(r);let{count:s}=this.#e;const l=t;if(typeof l.__signal_exit_emitter__=="object"&&typeof l.__signal_exit_emitter__.count=="number"&&(s+=l.__signal_exit_emitter__.count),i.length===s){this.unload();const u=this.#e.emit("exit",null,r),n=r==="SIGHUP"?this.#o:r;u||t.kill(t.pid,n)}};this.#n=t.reallyExit,this.#s=t.emit}onExit(t,r){if(!bt(this.#t))return()=>{};this.#r===!1&&this.load();const i=r?.alwaysLast?"afterExit":"exit";return this.#e.on(i,t),()=>{this.#e.removeListener(i,t),this.#e.listeners.exit.length===0&&this.#e.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#e.count+=1;for(const t of st)try{const r=this.#i[t];r&&this.#t.on(t,r)}catch{}this.#t.emit=(t,...r)=>this.#u(t,...r),this.#t.reallyExit=t=>this.#a(t)}}unload(){this.#r&&(this.#r=!1,st.forEach(t=>{const r=this.#i[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#t.removeListener(t,r)}catch{}}),this.#t.emit=this.#s,this.#t.reallyExit=this.#n,this.#e.count-=1)}#a(t){return bt(this.#t)?(this.#t.exitCode=t||0,this.#e.emit("exit",this.#t.exitCode,null),this.#n.call(this.#t,this.#t.exitCode)):0}#u(t,...r){const i=this.#s;if(t==="exit"&&bt(this.#t)){typeof r[0]=="number"&&(this.#t.exitCode=r[0]);const s=i.call(this.#t,t,...r);return this.#e.emit("exit",this.#t.exitCode,null),s}else return i.call(this.#t,t,...r)}};const At=globalThis.process,{onExit:Br}=Ur(bt(At)?new Mr(At):new Wr);var Hr=Object.defineProperty,A=m((e,t)=>Hr(e,"name",{value:t,configurable:!0}),"i$3");const Re="\x1B[200~",ne="\x1B[201~",Fr=A(e=>e>=48&&e<=63,"isCsiParameterByte"),Kr=A(e=>e>=32&&e<=47,"isCsiIntermediateByte"),Ce=A(e=>e>=64&&e<=126,"isCsiFinalByte"),qr=A((e,t,r)=>{const i=t+r+1;let s=i;for(;s<e.length;s++){const l=e.codePointAt(s);if(l===void 0)return"pending";if(!(Fr(l)||Kr(l))&&!(l===91&&s===i))return Ce(l)?{nextIndex:s+1,sequence:e.slice(t,s+1)}:void 0}return"pending"},"parseCsiSequence"),Gr=A((e,t,r)=>{const i=t+r+2;if(i>e.length)return"pending";const s=e.codePointAt(i-1);if(!(s===void 0||!Ce(s)))return{nextIndex:i,sequence:e.slice(t,i)}},"parseSs3Sequence"),oe=A((e,t,r)=>{const i=e[t+r];if(i===void 0)return"pending";if(i==="[")return qr(e,t,r);if(i==="O")return Gr(e,t,r)},"parseControlSequence"),Yr=A((e,t)=>{const r=e.codePointAt(t+1),i=r!==void 0&&r>65535?2:1,s=t+1+i;return{nextIndex:s,sequence:e.slice(t,s)}},"parseEscapedCodePoint"),zr=A((e,t)=>{if(t===e.length-1)return"pending";if(e[t+1]==="\x1B"){if(t+2>=e.length)return"pending";const i=oe(e,t,2);return i==="pending"?"pending":i||{nextIndex:t+2,sequence:e.slice(t,t+2)}}const r=oe(e,t,1);return r==="pending"?"pending":r||Yr(e,t)},"parseEscapeSequence"),ae=A((e,t)=>{let r=0;for(let i=0;i<e.length;i++){const s=e[i];(s===""||s==="\b")&&(i>r&&t.push(e.slice(r,i)),t.push(s),r=i+1)}r<e.length&&t.push(e.slice(r))},"splitDeleteAndBackspace"),Vr=A(e=>{const t=[];let r=0;const i=A(s=>({events:t,pending:e.slice(s)}),"pendingFrom");for(;r<e.length;){const s=e.indexOf("\x1B",r);if(s===-1)return ae(e.slice(r),t),{events:t,pending:""};s>r&&ae(e.slice(r,s),t);const l=zr(e,s);if(l==="pending")return i(s);if(l.sequence===Re){const u=l.nextIndex,n=e.indexOf(ne,u);if(n===-1)return i(s);t.push({paste:e.slice(u,n)}),r=n+ne.length;continue}t.push(l.sequence),r=l.nextIndex}return{events:t,pending:""}},"parseKeypresses"),Qr=A(()=>{let e="";return{flushPendingEscape(){if(!e.startsWith("\x1B"))return;const t=e;return e="",t},hasPendingEscape(){return e.startsWith("\x1B")&&!e.startsWith(Re)&&e!=="\x1B[200"},push(t){const r=Vr(e+t);return e=r.pending,r.events},reset(){e=""}}},"createInputParser");var Xr=Object.defineProperty,Zr=m((e,t)=>Xr(e,"name",{value:t,configurable:!0}),"r$1");const Jr=Zr((e,t=2)=>e.replace(/^\t+/gm,r=>" ".repeat(r.length*t)),"convertToSpaces");var ti=Object.defineProperty,Ee=m((e,t)=>ti(e,"name",{value:t,configurable:!0}),"i$2");const ei=Ee((e,t)=>{const r=[],i=e-t,s=e+t;for(let l=i;l<=s;l++)r.push(l);return r},"generateLineNumbers"),ri=Ee((e,t,r={})=>{var i;if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");const s=Jr(e).split(/\r?\n/);if(!(t>s.length))return ei(t,(i=r.around)!==null&&i!==void 0?i:3).filter(l=>s[l-1]!==void 0).map(l=>({line:l,value:s[l-1]}))},"codeExcerpt");var ii=Object.defineProperty,ot=m((e,t)=>ii(e,"name",{value:t,configurable:!0}),"t$3");function Oe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(Oe,"getDefaultExportFromCjs");ot(Oe,"getDefaultExportFromCjs");function si(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(si,"getDefaultExportFromNamespaceIfPresent");ot(si,"getDefaultExportFromNamespaceIfPresent");function ni(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}m(ni,"getDefaultExportFromNamespaceIfNotNamed");ot(ni,"getDefaultExportFromNamespaceIfNotNamed");function oi(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=ot(m(function i(){var s=!1;try{s=this instanceof i}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:ot(function(){return e[i]},"get")})}),r}m(oi,"getAugmentedNamespace");ot(oi,"getAugmentedNamespace");var Nt,ue;function ai(){if(ue)return Nt;ue=1;const e=/[|\\{}()[\]^$+*?.-]/g;return Nt=m(t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(e,"\\$&")},"escapeStringRegexp"),Nt}m(ai,"requireEscapeStringRegexp");var $t,le;function ui(){if(le)return $t;le=1;var e=Object.defineProperty,t=m((y,c)=>e(y,"name",{value:c,configurable:!0}),"h");const r=ai(),i=process&&typeof process.cwd=="function"?process.cwd():".",s=[].concat(gr.builtinModules,"bootstrap_node","node").map(y=>new RegExp(`(?:\\((?:node:)?${y}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${y}(?:\\.js)?:\\d+:\\d+$)`));s.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);class l{static{m(this,"StackUtils")}static{t(this,"StackUtils")}constructor(c){c={ignoredPackages:[],...c},"internals"in c||(c.internals=l.nodeInternals()),"cwd"in c||(c.cwd=i),this._cwd=c.cwd.replace(/\\/g,"/"),this._internals=[].concat(c.internals,n(c.ignoredPackages)),this._wrapCallSite=c.wrapCallSite||!1}static nodeInternals(){return[...s]}clean(c,o=0){o=" ".repeat(o),Array.isArray(c)||(c=c.split(`
|
|
4
|
-
`)),!/^\s*at /.test(c[0])&&/^\s*at /.test(c[1])&&(c=c.slice(1));let d=!1,g=null;const w=[];return c.forEach(p=>{if(p=p.replace(/\\/g,"/"),this._internals.some(E=>E.test(p)))return;const P=/^\s*at /.test(p);d?p=p.trimEnd().replace(/^(\s+)at /,"$1"):(p=p.trim(),P&&(p=p.slice(3))),p=p.replace(`${this._cwd}/`,""),p&&(P?(g&&(w.push(g),g=null),w.push(p)):(d=!0,g=p))}),w.map(p=>`${o}${p}
|
|
5
|
-
`).join("")}captureString(c,o=this.captureString){typeof c=="function"&&(o=c,c=1/0);const{stackTraceLimit:d}=Error;c&&(Error.stackTraceLimit=c);const g={};Error.captureStackTrace(g,o);const{stack:w}=g;return Error.stackTraceLimit=d,this.clean(w)}capture(c,o=this.capture){typeof c=="function"&&(o=c,c=1/0);const{prepareStackTrace:d,stackTraceLimit:g}=Error;Error.prepareStackTrace=(P,E)=>this._wrapCallSite?E.map(this._wrapCallSite):E,c&&(Error.stackTraceLimit=c);const w={};Error.captureStackTrace(w,o);const{stack:p}=w;return Object.assign(Error,{prepareStackTrace:d,stackTraceLimit:g}),p}at(c=this.at){const[o]=this.capture(1,c);if(!o)return{};const d={line:o.getLineNumber(),column:o.getColumnNumber()};u(d,o.getFileName(),this._cwd),o.isConstructor()&&Object.defineProperty(d,"constructor",{value:!0,configurable:!0}),o.isEval()&&(d.evalOrigin=o.getEvalOrigin()),o.isNative()&&(d.native=!0);let g;try{g=o.getTypeName()}catch{}g&&g!=="Object"&&g!=="[object Object]"&&(d.type=g);const w=o.getFunctionName();w&&(d.function=w);const p=o.getMethodName();return p&&w!==p&&(d.method=p),d}parseLine(c){const o=c&&c.match(a);if(!o)return null;const d=o[1]==="new";let g=o[2];const w=o[3],p=o[4],P=Number(o[5]),E=Number(o[6]);let S=o[7];const N=o[8],k=o[9],I=o[10]==="native",$=o[11]===")";let L;const O={};if(N&&(O.line=Number(N)),k&&(O.column=Number(k)),$&&S){let M=0;for(let B=S.length-1;B>0;B--)if(S.charAt(B)===")")M++;else if(S.charAt(B)==="("&&S.charAt(B-1)===" "&&(M--,M===-1&&S.charAt(B-1)===" ")){const q=S.slice(0,B-1);S=S.slice(B+1),g+=` (${q}`;break}}if(g){const M=g.match(f);M&&(g=M[1],L=M[2])}return u(O,S,this._cwd),d&&Object.defineProperty(O,"constructor",{value:!0,configurable:!0}),w&&(O.evalOrigin=w,O.evalLine=P,O.evalColumn=E,O.evalFile=p&&p.replace(/\\/g,"/")),I&&(O.native=!0),g&&(O.function=g),L&&g!==L&&(O.method=L),O}}function u(y,c,o){c&&(c=c.replace(/\\/g,"/"),c.startsWith(`${o}/`)&&(c=c.slice(o.length+1)),y.file=c)}m(u,"setFile"),t(u,"setFile");function n(y){if(y.length===0)return[];const c=y.map(o=>r(o));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${c.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}m(n,"ignoredPackagesRegExp"),t(n,"ignoredPackagesRegExp");const a=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),f=/^(.*?) \[as (.*?)\]$/;return $t=l,$t}m(ui,"requireStackUtils");var li=ui();const ce=Oe(li);var ci=Object.defineProperty,Pe=m((e,t)=>ci(e,"name",{value:t,configurable:!0}),"p$1");const It=Pe(e=>e?.replace(`file://${ge()}/`,""),"cleanupPath"),de=new ce({cwd:ge(),internals:ce.nodeInternals()});function Ne({error:e}){const t=e.stack?e.stack.split(`
|
|
6
|
-
`).slice(1):void 0,r=t?de.parseLine(t[0]):void 0,i=It(r?.file);let s,l=0;if(i&&r?.line&&fr(i)){const u=mr(i,"utf8");if(s=ri(u,r.line),s)for(const{line:n}of s)l=Math.max(l,String(n).length)}return D(K,{flexDirection:"column",padding:1,children:[D(K,{children:[D(H,{backgroundColor:"red",color:"white",children:[" ","ERROR"," "]}),D(H,{children:[" ",e.message]})]}),r&&i?C(K,{marginTop:1,children:D(H,{dimColor:!0,children:[i,":",r.line,":",r.column]})}):null,r&&s?C(K,{flexDirection:"column",marginTop:1,children:s.map(({line:u,value:n})=>D(K,{children:[C(K,{width:l+1,children:D(H,{"aria-label":u===r.line?`Line ${u}, error`:`Line ${u}`,backgroundColor:u===r.line?"red":void 0,color:u===r.line?"white":void 0,dimColor:u!==r.line,children:[String(u).padStart(l," "),":"]})}),C(H,{backgroundColor:u===r.line?"red":void 0,color:u===r.line?"white":void 0,children:` ${n}`},u)]},u))}):null,t?C(K,{flexDirection:"column",marginTop:1,children:t.map(u=>{const n=de.parseLine(u);return n?D(K,{children:[C(H,{dimColor:!0,children:"- "}),C(H,{bold:!0,dimColor:!0,children:n.function}),D(H,{"aria-label":`at ${It(n.file)??""} line ${n.line} column ${n.column}`,color:"gray",dimColor:!0,children:[" ","(",It(n.file)??"",":",n.line,":",n.column,")"]})]},u):D(K,{children:[C(H,{dimColor:!0,children:"- "}),D(H,{bold:!0,dimColor:!0,children:[u,"\\t"," "]})]},u)})}):null]})}m(Ne,"B");Pe(Ne,"ErrorOverview");var di=Object.defineProperty,hi=m((e,t)=>di(e,"name",{value:t,configurable:!0}),"o$1");let pi=class extends cr{static{m(this,"i")}static{hi(this,"ErrorBoundary")}static displayName="InternalErrorBoundary";static getDerivedStateFromError(t){return{error:t}}state={error:void 0};componentDidCatch(t){this.props.onError(t)}render(){return this.state.error?C(Ne,{error:this.state.error}):this.props.children}};var fi=Object.defineProperty,he=m((e,t)=>fi(e,"name",{value:t,configurable:!0}),"V$1");const mi=" ",gi="\x1B[Z",vi="\x1B",yi=ve(ye),pe=we(ye),$e=he(({children:e,exitOnCtrlC:t,interactive:r,onExit:i,onWaitUntilRenderFlush:s,renderThrottleMs:l,setCursorPosition:u,stderr:n,stdin:a,stdout:f,writeToStderr:y,writeToStdout:c})=>{const[o,d]=yt(!0),[g,w]=yt(void 0),[,p]=yt([]),P=F(0),E=F(new Map),S=F(void 0),N=F(0),k=F(0),[I]=yt(()=>{const h=new lr;return h.setMaxListeners(1/0),h}),$=F(void 0),L=F(void 0);L.current??=Qr();const O=F(void 0),M=F(!1),B=20,q=T(()=>{O.current&&(clearTimeout(O.current),O.current=void 0)},[]),J=T(()=>{S.current&&(clearTimeout(S.current),S.current=void 0)},[]),mt=T(()=>{if(J(),E.current.size===0)return;let h=Number.POSITIVE_INFINITY;for(const v of E.current.values())h=Math.min(h,v.nextDueTime);const b=Math.max(0,h-performance.now());S.current=setTimeout(()=>{S.current=void 0;const v=performance.now(),R=[...E.current.values()];for(const _ of R){if(v<_.nextDueTime)continue;_.callback(v);const Ke=v-_.startTime,qe=Math.floor(Ke/_.interval)+1;_.nextDueTime=_.startTime+qe*_.interval}mt()},b)},[J]),Bt=T((h,b)=>{const v=performance.now();return E.current.set(h,{callback:h,interval:b,nextDueTime:v+b,startTime:v}),mt(),{startTime:v,unsubscribe(){if(E.current.delete(h),E.current.size===0){J();return}mt()}}},[J,mt]);Et(()=>()=>{J()},[J]);const G=a.isTTY,Ht=T(()=>{$.current&&(a.removeListener("readable",$.current),$.current=void 0)},[a]),tt=T(()=>{a.setRawMode(!1),Ht(),a.unref(),N.current=0,L.current?.reset(),q()},[a,Ht,q]),lt=T(h=>{G&&N.current>0&&tt(),i(h)},[G,tt,i]),Ft=T(h=>{if(h.includes("")&&t){lt();return}h===vi&&w(b=>{if(!b)return b})},[t,lt]),ct=T(h=>{Ft(h),I.emit("input",h)},[Ft,I]),Kt=T(()=>{q(),O.current=setTimeout(()=>{O.current=void 0;const h=L.current.flushPendingEscape();h&&ct(h)},B)},[q,ct]),Rt=T(()=>{q();let h;for(;(h=a.read())!==null;){const b=L.current.push(h);for(const v of b)if(typeof v=="string")ct(v);else{if(I.listenerCount("paste")===0){M.current||(M.current=!0,y(`Warning: useInput() received bracketed paste because no usePaste() handler is active. This fallback is deprecated and will be removed in the next major version. Migrate paste handling to usePaste().
|
|
7
|
-
`)),ct(v.paste);continue}I.emit("paste",v.paste)}}L.current.hasPendingEscape()&&Kt()},[a,ct,q,Kt,y,I]),qt=T(h=>{if(!G)throw a===W.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
8
|
-
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
9
|
-
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(a.setEncoding("utf8"),h){N.current===0&&(a.ref(),a.setRawMode(!0),$.current=Rt,a.addListener("readable",Rt)),N.current++;return}N.current!==0&&--N.current===0&&tt()},[G,a,Rt,tt]),Gt=T(h=>{if(f.isTTY){if(h){k.current===0&&f.write(yi),k.current++;return}k.current!==0&&--k.current===0&&f.write(pe)}},[f]),Yt=T((h,b)=>{const v=h.findIndex(R=>R.id===b);for(let R=v+1;R<h.length;R++){const _=h[R];if(_?.isActive)return _.id}},[]),zt=T((h,b)=>{const v=h.findIndex(R=>R.id===b);for(let R=v-1;R>=0;R--){const _=h[R];if(_?.isActive)return _.id}},[]),gt=T(()=>{p(h=>(w(b=>{const v=h.find(R=>R.isActive)?.id;return Yt(h,b)??v}),h))},[Yt]),vt=T(()=>{p(h=>(w(b=>{const v=h.findLast(R=>R.isActive)?.id;return zt(h,b)??v}),h))},[zt]);Et(()=>{const h=he(v=>{!o||P.current===0||(v===mi&>(),v===gi&&vt())},"handleTabNavigation");I.on("input",h);const b=I;return()=>{b.off("input",h)}},[o,gt,vt,I]);const Vt=T(()=>{d(!0)},[]),Qt=T(()=>{d(!1)},[]),Xt=T(h=>{p(b=>(b.some(v=>v?.id===h)&&w(h),b))},[]),Zt=T((h,{autoFocus:b})=>{p(v=>(P.current=v.length+1,[...v,{id:h,isActive:!0}])),b&&w(v=>v||h)},[]),Jt=T(h=>{w(b=>{if(b!==h)return b}),p(b=>{const v=b.filter(R=>R.id!==h);return P.current=v.length,v})},[]),te=T(h=>{p(b=>b.map(v=>v.id!==h?v:{id:h,isActive:!0}))},[]),ee=T(h=>{w(b=>{if(b!==h)return b}),p(b=>b.map(v=>v.id!==h?v:{id:h,isActive:!1}))},[]);Et(()=>()=>{const h=!f.destroyed&&!f.writableEnded;r&&h&&f.write(pt),G&&N.current>0&&tt(),k.current>0&&(f.isTTY&&h&&f.write(pe),k.current=0)},[f,G,tt,r]);const De=V(()=>({exit:lt,waitUntilRenderFlush:s}),[lt,s]),Ue=V(()=>({internal_eventEmitter:I,internal_exitOnCtrlC:t,isRawModeSupported:G,setBracketedPasteMode:Gt,setRawMode:qt,stdin:a}),[a,qt,Gt,G,t,I]),We=V(()=>({stdout:f,write:c}),[f,c]),Me=V(()=>({stderr:n,write:y}),[n,y]),Be=V(()=>({setCursorPosition:u}),[u]),He=V(()=>({activate:te,activeId:g,add:Zt,deactivate:ee,disableFocus:Qt,enableFocus:Vt,focus:Xt,focusNext:gt,focusPrevious:vt,remove:Jt}),[g,Zt,Jt,te,ee,Vt,Qt,gt,vt,Xt]),Fe=V(()=>({renderThrottleMs:l,subscribe:Bt}),[Bt,l]);return C(hr.Provider,{value:De,children:C(wr.Provider,{value:Ue,children:C(br.Provider,{value:We,children:C(yr.Provider,{value:Me,children:C(vr.Provider,{value:He,children:C(dr.Provider,{value:Fe,children:C(pr.Provider,{value:Be,children:C(pi,{onError:lt,children:e})})})})})})})})},"App");$e.displayName="InternalApp";const Dt=new WeakMap;var wi=Object.defineProperty,ft=m((e,t)=>wi(e,"name",{value:t,configurable:!0}),"e");const xt=ft((e,t)=>e?.x!==t?.x||e?.y!==t?.y,"cursorPositionChanged"),nt=ft((e,t)=>{if(!t)return"";const r=e-t.y;return(r>0?Lt(r):"")+Wt(t.x)+pt},"buildCursorSuffix"),Ie=ft((e,t)=>{if(!t)return"";const r=e-1-t.y;return(r>0?Xe(r):"")+Wt(0)},"buildReturnToBottom"),ke=ft(e=>{const t=e.cursorWasShown?Z:"",r=Ie(e.previousLineCount,e.previousCursorPosition),i=nt(e.visibleLineCount,e.cursorPosition);return t+r+i},"buildCursorOnlySequence"),Tt=ft((e,t,r)=>e?Z+Ie(t,r):"","buildReturnToBottomPrefix");var bi=Object.defineProperty,j=m((e,t)=>bi(e,"name",{value:t,configurable:!0}),"c$2");const ht=j((e,t)=>t.endsWith(`
|
|
10
|
-
`)?e.length-1:e.length,"visibleLineCount"),Le=j(e=>e.rows||1/0,"getViewportRows"),St=j((e,t)=>Math.min(e,Le(t)),"clampToViewport"),xi=j((e,{showCursor:t=!1}={})=>{let r=0,i="",s=!1,l,u=!1,n,a=!1;const f=j(()=>u?l:void 0,"getActiveCursor"),y=j((o,d)=>{const g=xt(d,n);return o!==i||g},"hasChanges"),c=j(o=>{!t&&!s&&(e.write(Z),s=!0);const d=f();u=!1;const g=xt(d,n);if(!y(o,d))return!1;const w=o.split(`
|
|
11
|
-
`),p=ht(w,o),P=nt(p,d);if(o===i&&g)e.write(ke({cursorPosition:d,cursorWasShown:a,previousCursorPosition:n,previousLineCount:r,visibleLineCount:p}));else{i=o;const E=Tt(a,r,n);e.write(E+X(St(r,e))+o+P),r=w.length}return n=d?{...d}:void 0,a=d!==void 0,!0},"render");return c.clear=()=>{const o=Tt(a,r,n);e.write(o+X(St(r,e))),i="",r=0,n=void 0,a=!1},c.done=()=>{i="",r=0,n=void 0,a=!1,t||(e.write(pt),s=!1)},c.reset=()=>{i="",r=0,n=void 0,a=!1},c.sync=o=>{const d=u?l:void 0;u=!1;const g=o.split(`
|
|
12
|
-
`);i=o,r=g.length,!d&&a&&e.write(Z),d&&e.write(nt(ht(g,o),d)),n=d?{...d}:void 0,a=d!==void 0},c.setCursorPosition=o=>{l=o,u=!0},c.isCursorDirty=()=>u,c.willRender=o=>y(o,f()),c},"createStandard"),Ti=j((e,{showCursor:t=!1}={})=>{let r=[],i="",s=!1,l,u=!1,n,a=!1;const f=j(()=>u?l:void 0,"getActiveCursor"),y=j((o,d)=>{const g=xt(d,n);return o!==i||g},"hasChanges"),c=j(o=>{!t&&!s&&(e.write(Z),s=!0);const d=f();u=!1;const g=xt(d,n);if(!y(o,d))return!1;const w=o.split(`
|
|
13
|
-
`),p=ht(w,o),P=ht(r,i);if(o===i&&g)return e.write(ke({cursorPosition:d,cursorWasShown:a,previousCursorPosition:n,previousLineCount:r.length,visibleLineCount:p})),n=d?{...d}:void 0,a=d!==void 0,!0;const E=Tt(a,r.length,n);if(o===`
|
|
14
|
-
`||i.length===0){const $=nt(p,d);return e.write(E+X(St(r.length,e))+o+$),a=d!==void 0,n=d?{...d}:void 0,i=o,r=w,!0}const S=o.endsWith(`
|
|
15
|
-
`),N=[E],k=Le(e);if(p<P){const $=i.endsWith(`
|
|
16
|
-
`)?1:0;N.push(X(Math.min(P-p+$,k)),Lt(Math.min(p,k-1)))}else N.push(Lt(Math.min(P-1,k-1)));for(let $=0;$<p;$++){const L=$===p-1;if(w[$]===r[$]){(!L||S)&&N.push(Ze());continue}N.push(Wt(0)+w[$]+Je+(L&&!S?"":`
|
|
17
|
-
`))}const I=nt(p,d);return N.push(I),e.write(N.join("")),a=d!==void 0,n=d?{...d}:void 0,i=o,r=w,!0},"render");return c.clear=()=>{const o=Tt(a,r.length,n);e.write(o+X(St(r.length,e))),i="",r=[],n=void 0,a=!1},c.done=()=>{i="",r=[],n=void 0,a=!1,t||(e.write(pt),s=!1)},c.reset=()=>{i="",r=[],n=void 0,a=!1},c.sync=o=>{const d=u?l:void 0;u=!1;const g=o.split(`
|
|
18
|
-
`);i=o,r=g,!d&&a&&e.write(Z),d&&e.write(nt(ht(g,o),d)),n=d?{...d}:void 0,a=d!==void 0},c.setCursorPosition=o=>{l=o,u=!0},c.isCursorDirty=()=>u,c.willRender=o=>y(o,f()),c},"createIncremental"),Si=j((e,{incremental:t=!1,showCursor:r=!1}={})=>t?Ti(e,{showCursor:r}):xi(e,{showCursor:r}),"create"),Ri={create:Si};var Ci=Object.defineProperty,Ei=m((e,t)=>Ci(e,"name",{value:t,configurable:!0}),"t");const _e=tr(2026),Q=ve(_e),z=we(_e);function je(e,t){return"isTTY"in e&&e.isTTY&&(t??!Te)}m(je,"shouldSynchronize");Ei(je,"shouldSynchronize");var Oi=Object.defineProperty,Ut=m((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"o");let rt;const Pi=Ut(()=>{if(rt!==!1){if(rt!==void 0)return rt;try{return rt=require("../../index.js").Renderer,rt}catch{rt=!1;return}}},"getRendererClass"),Ni=Ut(e=>{const t=Pi();if(!t)return;let r,i=0,s=0;const l=Ut((u,n)=>{(!r||i!==u||s!==n)&&(r?r.resize(u,n):r=new t(u,n),i=u,s=n)},"ensureRenderer");return{clear(){if(r){const u=new Uint32Array(i*s*2),n=65535;for(let a=0;a<u.length;a+=2)u[a]=32,u[a+1]=n;r.render(u)}},destroy(){r=void 0},render(u,n,a){if(l(n,a),!!r){e.isTTY&&r.writeRaw(Q);try{r.render(u)}finally{e.isTTY&&r.writeRaw(z)}}},resize(u,n){l(u,n)}}},"createNative");var $i=Object.defineProperty,x=m((e,t)=>$i(e,"name",{value:t,configurable:!0}),"n");console.Console||(console.Console=Qe);const dt=x(()=>{},"noop"),fe=x(async()=>new Promise(e=>{setImmediate(e)}),"yieldImmediate"),Ii=27,ki=91,Li=63,_i=117,ji=48,Ai=57,Di=x(e=>e>=ji&&e<=Ai,"isDigitByte"),Ae=x((e,t)=>{if(e[t]!==Ii||e[t+1]!==ki||e[t+2]!==Li)return;let r=t+3;const i=r;for(;r<e.length&&Di(e[r]);)r++;if(r!==i){if(r===e.length)return{state:"partial"};if(e[r]===_i)return{endIndex:r,state:"complete"}}},"matchKittyQueryResponse"),Ui=x(e=>{for(let t=0;t<e.length;t++)if(Ae(e,t)?.state==="complete")return!0;return!1},"hasCompleteKittyQueryResponse"),Wi=x(e=>{const t=[];let r=0;for(;r<e.length;){const i=Ae(e,r);if(i?.state==="complete"){r=i.endIndex+1;continue}if(i?.state==="partial")break;t.push(e[r]),r++}return t},"stripKittyQueryResponsesAndTrailingPartial"),Mi=x(({isTty:e,isUnmounting:t,nextOutputHeight:r,previousOutputHeight:i,viewportRows:s})=>{if(!e)return!1;const l=i>0,u=i>=s,n=i>s,a=r>s,f=u&&r<s;return n||a&&l||f||t&&u},"shouldClearTerminalForFrame"),kt=x(e=>e instanceof Error||Object.prototype.toString.call(e)==="[object Error]","isErrorInput"),me=x(e=>{const t=!e.destroyed&&!e.writableEnded&&(e.writable??!0),r=e._writableState!==void 0||e.writableLength!==void 0;return{canWriteToStdout:t,hasWritableState:r}},"getWritableStreamState"),wt=x((e,t)=>{if(!e||typeof e.flush!="function")return;const r=e;t?r.flush():typeof r.cancel=="function"&&r.cancel()},"settleThrottle");class Bi{static{m(this,"ft")}static{x(this,"Ink")}isConcurrent;options;log;manualCursorPosition;renderedCursorPosition;renderedCursorRequested;throttledLog;isScreenReaderEnabled;interactive;renderThrottleMs;alternateScreen;isUnmounted;isUnmounting;lastOutput;lastOutputToRender;lastOutputHeight;lastTerminalWidth;nativeLog;useNativeRenderer;container;rootNode;fullStaticOutput;exitPromise;exitResult;beforeExitHandler;restoreConsole;unsubscribeResize;throttledOnRender;hasPendingThrottledRender=!1;kittyProtocolEnabled=!1;cancelKittyDetection;nextRenderCommit;deferredInitDone=!1;constructor(t){this.options=t,this.rootNode=xr("ink-root"),this.rootNode.onComputeLayout=this.calculateLayout,this.isScreenReaderEnabled=t.isScreenReaderEnabled??W.env.INK_SCREEN_READER==="true",this.interactive=this.resolveInteractiveOption(t.interactive),this.alternateScreen=!1;const r=t.debug||this.isScreenReaderEnabled,i=t.maxFps??30,s=i>0?Math.max(1,Math.ceil(1e3/i)):0;this.renderThrottleMs=r?0:s;const l=r?this.onRender:(()=>{const n=jt(this.onRender,s,{leading:!0,trailing:!0});return this.throttledOnRender=n,()=>{this.hasPendingThrottledRender=!0,n()}})();if(r&&(this.throttledOnRender=void 0),t.standardReactLayoutTiming){let n=!1;const a=x(()=>{n||(n=!0,queueMicrotask(()=>{n=!1,this.onRender()}))},"deferredRender");this.rootNode.onRender=a,this.rootNode.onImmediateRender=a}else this.rootNode.onRender=l,this.rootNode.onImmediateRender=this.onRender;this.log=Ri.create(t.stdout,{incremental:t.incrementalRendering}),this.useNativeRenderer=t.useNativeRenderer??!1,this.useNativeRenderer&&(this.nativeLog=Ni(t.stdout),this.nativeLog||(this.useNativeRenderer=!1)),this.manualCursorPosition=void 0,this.renderedCursorPosition=void 0,this.renderedCursorRequested=!1,this.throttledLog=r?this.log:jt(n=>{const a=this.log.willRender(n),f=this.shouldSync();f&&a&&this.options.stdout.write(Q),this.log(n),f&&a&&this.options.stdout.write(z)},void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.isUnmounting=!1,this.isConcurrent=t.concurrent??!1,this.lastOutput="",this.lastOutputToRender="",this.lastOutputHeight=0,this.lastTerminalWidth=et(this.options.stdout).columns,this.fullStaticOutput="";const u=t.concurrent?or:ar;this.container=U.createContainer(this.rootNode,u,null,!1,null,"id",()=>{},()=>{},()=>{},()=>{}),this.unsubscribeExit=Br(this.unmount,{alwaysLast:!1}),this.setAlternateScreen(!!t.alternateScreen),t.patchConsole&&this.patchConsole(),this.interactive&&(t.stdout.on("resize",this.resized),this.unsubscribeResize=()=>{t.stdout.off("resize",this.resized)}),this.initImmediateKittyKeyboard(),W.env.DEV==="true"&&U.injectIntoDevTools(),this.exitPromise=new Promise((n,a)=>{this.resolveExitPromise=n,this.rejectExitPromise=a}),this.exitPromise.catch(dt)}runDeferredInit(){this.deferredInitDone||(this.deferredInitDone=!0,this.initDeferredKittyKeyboard())}resized=x(()=>{const t=et(this.options.stdout).columns;t<this.lastTerminalWidth&&(this.log.clear(),this.lastOutput="",this.lastOutputToRender=""),Sr(),this.calculateLayout(),this.onRender(),this.lastTerminalWidth=t},"resized");resolveExitPromise=x(()=>{},"resolveExitPromise");rejectExitPromise=x(()=>{},"rejectExitPromise");unsubscribeExit=x(()=>{},"unsubscribeExit");handleAppExit=x(t=>{if(!(this.isUnmounted||this.isUnmounting)){if(kt(t)){this.unmount(t);return}this.exitResult=t,this.unmount()}},"handleAppExit");getActiveCursorPosition=x(()=>this.renderedCursorRequested?this.renderedCursorPosition:this.manualCursorPosition,"getActiveCursorPosition");setCursorPosition=x(t=>{this.manualCursorPosition=t,this.log.setCursorPosition(this.getActiveCursorPosition())},"setCursorPosition");restoreLastOutput=x(()=>{this.interactive&&(this.log.setCursorPosition(this.getActiveCursorPosition()),this.log(this.lastOutputToRender||`${this.lastOutput}
|
|
19
|
-
`))},"restoreLastOutput");calculateLayout=x(()=>{const t=x(i=>{const s=new Map;this.calculateScrollAndTriggerObservers(i,s);for(const[l,u]of s)l.internalTrigger(u)},"flushLayoutObservers");this.prepareYogaTree(this.rootNode,t);const r=et(this.options.stdout).columns;this.rootNode.yogaNode.setWidth(r),this.rootNode.yogaNode.calculateLayout(void 0,void 0,ie.DIRECTION_LTR),t(this.rootNode)},"calculateLayout");calculateScrollAndTriggerObservers(t,r){if(t.nodeName==="ink-box"){const{style:i}=t,s=i.overflow??"visible",l=i.overflowX??s,u=i.overflowY??s;l==="scroll"||u==="scroll"?Pr(t):t.internal_scrollState&&delete t.internal_scrollState}if(Or(t,r),!t.internal_static)for(const i of t.childNodes)i.nodeName!=="#text"&&this.calculateScrollAndTriggerObservers(i,r)}recalculateLayout(){this.markAllTextNodesDirty(this.rootNode),this.calculateLayout(),this.onRender()}prepareYogaTree(t,r){if(t.isYogaTreeDetached&&!t.cachedRender&&t.yogaNode){for(t.yogaNode.setWidthAuto(),t.yogaNode.setHeightAuto(),Rr(t.yogaNode,t.style);t.yogaNode.getChildCount()>0;)t.yogaNode.getChild(0).remove();let i=0;for(const s of t.childNodes){const l=s;s.nodeName!=="#text"&&l.yogaNode&&(t.yogaNode.insertChild(l.yogaNode,i),i++)}t.isYogaTreeDetached=!1,this.markAllTextNodesDirty(t)}for(const i of t.childNodes)i.nodeName!=="#text"&&this.prepareYogaTree(i,r);if(t.nodeName==="ink-static-render"&&!t.cachedRender){const i=et(this.options.stdout).columns,{width:s}=t.style;t.yogaNode&&(t.yogaNode.setWidth(typeof s=="number"?s:i),t.yogaNode.calculateLayout(void 0,void 0,ie.DIRECTION_LTR)),r(t),Cr(t,{skipStaticElements:!1,trackSelection:this.options.trackSelection}),t.internal_onRendered?.()}}markAllTextNodesDirty(t){if(!t.cachedRender){t.nodeName==="ink-text"&&t.yogaNode&&t.yogaNode.markDirty();for(const r of t.childNodes)r.nodeName!=="#text"&&this.markAllTextNodesDirty(r)}}onRender=x(()=>{if(this.hasPendingThrottledRender=!1,this.isUnmounted)return;this.deferredInitDone||this.runDeferredInit(),this.nextRenderCommit&&(this.nextRenderCommit.resolve(),this.nextRenderCommit=void 0);const t=Er(this.rootNode,this.isScreenReaderEnabled,{useNativeRenderer:this.useNativeRenderer}),{cursorPosition:r,cursorRequested:i,output:s,outputBuffer:l,outputHeight:u,outputWidth:n,staticOutput:a}=t;if(this.renderedCursorRequested=i,this.renderedCursorPosition=r,this.useNativeRenderer&&this.nativeLog&&l&&n){a&&a!==`
|
|
20
|
-
`&&this.options.stdout.write(a),this.nativeLog.render(l,n,u),this.lastOutputHeight=u;return}i&&this.log.setCursorPosition(this.getActiveCursorPosition());const f=a&&a!==`
|
|
21
|
-
`;if(this.options.debug){f&&(this.fullStaticOutput+=a),this.lastOutput=s,this.lastOutputToRender=s,this.lastOutputHeight=u,this.options.stdout.write(this.fullStaticOutput+s);return}if(!this.interactive){f&&this.options.stdout.write(a),this.lastOutput=s,this.lastOutputToRender=`${s}
|
|
22
|
-
`,this.lastOutputHeight=u;return}if(this.isScreenReaderEnabled){const y=this.shouldSync();if(y&&this.options.stdout.write(Q),f){const d=this.lastOutputHeight>0?X(this.lastOutputHeight):"";this.options.stdout.write(d+a),this.lastOutputHeight=0}if(s===this.lastOutput&&!f){y&&this.options.stdout.write(z);return}const c=et(this.options.stdout).columns,o=sr(s,{trim:!1,width:c,wrapMode:"BREAK_WORDS"}).replace(/\n$/,"");if(f)this.options.stdout.write(o);else{const d=this.lastOutputHeight>0?X(this.lastOutputHeight):"";this.options.stdout.write(d+o)}this.lastOutput=s,this.lastOutputToRender=o,this.lastOutputHeight=o===""?0:o.split(`
|
|
23
|
-
`).length,y&&this.options.stdout.write(z);return}f&&(this.fullStaticOutput+=a),this.renderInteractiveFrame(s,u,f?a:"")},"onRender");accessibilityContextValue;render(t){this.accessibilityContextValue??={isScreenReaderEnabled:this.isScreenReaderEnabled};const r=C(ur.Provider,{value:this.accessibilityContextValue,children:C($e,{exitOnCtrlC:this.options.exitOnCtrlC,interactive:this.interactive,onExit:this.handleAppExit,onWaitUntilRenderFlush:this.waitUntilRenderFlush,renderThrottleMs:this.renderThrottleMs,setCursorPosition:this.setCursorPosition,stderr:this.options.stderr,stdin:this.options.stdin,stdout:this.options.stdout,writeToStderr:this.writeToStderr,writeToStdout:this.writeToStdout,children:t})});this.options.concurrent?U.updateContainer(r,this.container,null,dt):(U.updateContainerSync(r,this.container,null,dt),U.flushSyncWork())}writeToStdout=x(t=>{if(this.isUnmounted)return;if(this.options.debug){this.options.stdout.write(t+this.fullStaticOutput+this.lastOutput);return}if(!this.interactive){this.options.stdout.write(t);return}const r=this.shouldSync();r&&this.options.stdout.write(Q),this.log.clear(),this.options.stdout.write(t),this.restoreLastOutput(),r&&this.options.stdout.write(z)},"writeToStdout");writeToStderr=x(t=>{if(this.isUnmounted)return;if(this.options.debug){this.options.stderr.write(t),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(!this.interactive){this.options.stderr.write(t);return}const r=this.shouldSync();r&&this.options.stdout.write(Q),this.log.clear(),this.options.stderr.write(t),this.restoreLastOutput(),r&&this.options.stdout.write(z)},"writeToStderr");unmount=x(t=>{if(this.isUnmounted||this.isUnmounting)return;this.isUnmounting=!0,this.beforeExitHandler&&(W.off("beforeExit",this.beforeExitHandler),this.beforeExitHandler=void 0);const r=this.options.stdout,{canWriteToStdout:i,hasWritableState:s}=me(r);wt(this.throttledOnRender,i),i&&!this.alternateScreen&&(!this.throttledOnRender||!this.hasPendingThrottledRender&&this.fullStaticOutput==="")&&(this.calculateLayout(),this.onRender()),this.isUnmounted=!0,this.unsubscribeExit(),wt(this.throttledLog,i),typeof this.restoreConsole=="function"&&this.restoreConsole();const l=x(()=>{typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),this.cancelKittyDetection&&this.cancelKittyDetection(),i&&(this.kittyProtocolEnabled&&this.writeBestEffort(this.options.stdout,"\x1B[<u"),this.alternateScreen?(this.log.clear(),this.log.done(),this.lastOutput="",this.lastOutputToRender="",this.lastOutputHeight=0,this.fullStaticOutput="",this.writeBestEffort(this.options.stdout,ir),this.writeBestEffort(this.options.stdout,pt),this.alternateScreen=!1):this.interactive?this.options.debug||this.log.done():this.options.stdout.write(this.options.debug?`
|
|
24
|
-
`:`${this.lastOutput}
|
|
25
|
-
`)),this.kittyProtocolEnabled=!1,Dt.delete(this.options.stdout);const{exitResult:n}=this,a=x(()=>{kt(t)?this.rejectExitPromise(t):this.resolveExitPromise(n)},"resolveOrReject");t!==void 0&&!kt(t)?a():i&&s?this.options.stdout.write("",a):setImmediate(a)},"finishUnmount"),u=U;this.options.concurrent?(U.updateContainerSync(null,this.container,null,dt),U.flushSyncWork(),u.flushPassiveEffects?.(),l()):(U.updateContainerSync(null,this.container,null,dt),U.flushSyncWork(),l())},"unmount");async waitUntilExit(){return this.beforeExitHandler||(this.beforeExitHandler=()=>{this.unmount()},W.on("beforeExit",this.beforeExitHandler)),this.exitPromise}async waitUntilRenderFlush(){if(this.isUnmounted||this.isUnmounting){await this.awaitExit();return}if(await fe(),this.isUnmounted||this.isUnmounting){await this.awaitExit();return}if(this.isConcurrent&&this.hasPendingConcurrentWork()&&(await Promise.race([this.awaitNextRender(),this.awaitExit()]),this.isUnmounted||this.isUnmounting)){this.nextRenderCommit=void 0,await this.awaitExit();return}U.flushSyncWork();const t=this.options.stdout,{canWriteToStdout:r,hasWritableState:i}=me(t);if(wt(this.throttledOnRender,r),wt(this.throttledLog,r),r&&i){await new Promise(s=>{this.options.stdout.write("",()=>{s()})});return}await fe()}clear(){this.interactive&&!this.options.debug&&(this.log.clear(),this.log.sync(this.lastOutputToRender||`${this.lastOutput}
|
|
26
|
-
`))}patchConsole(){this.options.debug||(this.restoreConsole=nr((t,r)=>{t==="stdout"&&this.writeToStdout(r),t==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}setAlternateScreen(t){this.alternateScreen=this.resolveAlternateScreenOption(t,this.interactive),this.alternateScreen&&(this.writeBestEffort(this.options.stdout,er),this.writeBestEffort(this.options.stdout,Z))}resolveInteractiveOption(t){return t??(!Te&&!!this.options.stdout.isTTY)}resolveAlternateScreenOption(t,r){return!!t&&r&&!!this.options.stdout.isTTY}shouldSync(){return je(this.options.stdout,this.interactive)}writeBestEffort(t,r){try{t.write(r)}catch{}}async awaitExit(){try{await this.exitPromise}catch{}}hasPendingConcurrentWork(){const t=this.container;return(t.pendingLanes??0)!==0&&t.callbackNode!==void 0&&t.callbackNode!==null}async awaitNextRender(){if(!this.nextRenderCommit){let t;const r=new Promise(i=>{t=i});this.nextRenderCommit={promise:r,resolve:t}}return this.nextRenderCommit.promise}renderInteractiveFrame(t,r,i){const s=i!=="",l=this.options.stdout.isTTY,u=l?et(this.options.stdout).rows:24,n=l&&r>=u?t:`${t}
|
|
27
|
-
`;if(Mi({isTty:l,isUnmounting:this.isUnmounting,nextOutputHeight:r,previousOutputHeight:this.lastOutputHeight,viewportRows:u})){if(this.options.incrementalRendering){s&&(this.log.clear(),this.options.stdout.write(i)),(t!==this.lastOutput||this.log.isCursorDirty()||s)&&this.throttledLog(n),this.lastOutput=t,this.lastOutputToRender=n,this.lastOutputHeight=r;return}const a=this.shouldSync();a&&this.options.stdout.write(Q),this.options.stdout.write(rr+this.fullStaticOutput+t),this.lastOutput=t,this.lastOutputToRender=n,this.lastOutputHeight=r,this.log.sync(n),a&&this.options.stdout.write(z);return}if(s){const a=this.shouldSync();a&&this.options.stdout.write(Q),this.log.clear(),this.options.stdout.write(i),this.log(n),a&&this.options.stdout.write(z)}else(t!==this.lastOutput||this.log.isCursorDirty())&&this.throttledLog(n);this.lastOutput=t,this.lastOutputToRender=n,this.lastOutputHeight=r}initImmediateKittyKeyboard(){if(!this.options.kittyKeyboard)return;const t=this.options.kittyKeyboard;if((t.mode??"auto")!=="enabled")return;const r=t.flags??["disambiguateEscapeCodes"];this.options.stdin.isTTY&&this.options.stdout.isTTY&&this.enableKittyProtocol(r)}initDeferredKittyKeyboard(){if(!this.options.kittyKeyboard)return;const t=this.options.kittyKeyboard;if((t.mode??"auto")!=="auto")return;const r=t.flags??["disambiguateEscapeCodes"];!this.interactive||!this.options.stdin.isTTY||!this.options.stdout.isTTY||this.confirmKittySupport(r)}confirmKittySupport(t){const{stdin:r,stdout:i}=this.options;let s=[];const l=x(()=>{this.cancelKittyDetection=void 0,clearTimeout(n),r.removeListener("data",u);const a=Wi(s);s=[],a.length>0&&r.unshift(re.from(a))},"cleanup"),u=x(a=>{const f=typeof a=="string"?re.from(a):a;for(const y of f)s.push(y);Ui(s)&&(l(),this.isUnmounted||this.enableKittyProtocol(t))},"onData");r.on("data",u);const n=setTimeout(l,200);this.cancelKittyDetection=l,i.write("\x1B[?u")}enableKittyProtocol(t){this.options.stdout.write(`\x1B[>${Tr(t)}u`),this.kittyProtocolEnabled=!0}}var Hi=Object.defineProperty,Mt=m((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"i");const Ts=Mt((e,t)=>{const r={alternateScreen:!1,concurrent:!1,debug:!1,exitOnCtrlC:!0,incrementalRendering:!1,maxFps:30,patchConsole:!0,stderr:W.stderr,stdin:W.stdin,stdout:W.stdout,...Fi(t)},i=Ki(r.stdout,()=>new Bi(r));return i.render(e),{cleanup(){i.unmount()},clear(){i.clear()},rerender(s){i.render(s)},rootNode:i.rootNode,unmount(){i.unmount()},waitUntilExit(){return i.waitUntilExit()},waitUntilRenderFlush(){return i.waitUntilRenderFlush()}}},"render"),Fi=Mt((e={})=>e instanceof Ve?{stdin:W.stdin,stdout:e}:e,"getOptions"),Ki=Mt((e,t)=>{const r=Dt.get(e);if(r===void 0){const i=t();return Dt.set(e,i),i}return W.stderr.write(`Warning: render() was called again for the same stdout before the previous Ink instance was unmounted. Reusing stdout across multiple render() calls is unsupported. Call unmount() first.
|
|
28
|
-
`),r},"getInstance");export{Ts as default};
|