@visulima/tui 1.0.0-alpha.2 → 1.0.0-alpha.20
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 +285 -0
- package/LICENSE.md +2650 -55
- package/README.md +38 -10
- 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 +61 -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 +60 -0
- package/dist/components/controlled-scroll-view.js +1 -0
- package/dist/components/cursor.d.ts +61 -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 +116 -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 +59 -0
- package/dist/components/gradient.js +4 -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 +55 -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 +36 -0
- package/dist/components/scroll-bar-box.js +1 -0
- package/dist/components/scroll-bar.d.ts +24 -0
- package/dist/components/scroll-bar.js +1 -0
- package/dist/components/scroll-list.d.ts +19 -0
- package/dist/components/scroll-list.js +1 -0
- package/dist/components/scroll-view.d.ts +9 -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 +54 -0
- package/dist/components/static-render.js +1 -0
- package/dist/components/static.d.ts +28 -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 +78 -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 +356 -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 +57 -5
- package/dist/core/index.js +1 -5
- package/dist/ink/hooks/use-animation.d.ts +37 -39
- package/dist/ink/hooks/use-animation.js +1 -0
- package/dist/ink/hooks/use-app.d.ts +36 -4
- package/dist/ink/hooks/use-app.js +1 -0
- package/dist/ink/hooks/use-box-metrics.d.ts +57 -50
- package/dist/ink/hooks/use-box-metrics.js +1 -0
- package/dist/ink/hooks/use-clipboard.d.ts +26 -25
- package/dist/ink/hooks/use-clipboard.js +1 -0
- package/dist/ink/hooks/use-color-blindness.d.ts +29 -29
- package/dist/ink/hooks/use-color-blindness.js +1 -0
- package/dist/ink/hooks/use-console-capture.d.ts +38 -38
- package/dist/ink/hooks/use-console-capture.js +1 -0
- package/dist/ink/hooks/use-cursor.d.ts +10 -9
- package/dist/ink/hooks/use-cursor.js +1 -0
- package/dist/ink/hooks/use-focus-manager.d.ts +53 -38
- package/dist/ink/hooks/use-focus-manager.js +1 -0
- package/dist/ink/hooks/use-focus.d.ts +29 -25
- 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 +142 -142
- 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 +4 -4
- package/dist/ink/hooks/use-is-screen-reader-enabled.js +1 -0
- package/dist/ink/hooks/use-key-bindings.d.ts +50 -52
- 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 +44 -37
- package/dist/ink/hooks/use-linked-scroll.js +1 -0
- package/dist/ink/hooks/use-paste.d.ts +41 -40
- package/dist/ink/hooks/use-paste.js +1 -0
- package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
- package/dist/ink/hooks/use-persistent-state.js +2 -0
- package/dist/ink/hooks/use-scroll-acceleration.d.ts +43 -43
- package/dist/ink/hooks/use-scroll-acceleration.js +1 -0
- package/dist/ink/hooks/use-scroll-input.d.ts +31 -31
- package/dist/ink/hooks/use-scroll-input.js +1 -0
- package/dist/ink/hooks/use-stderr.d.ts +14 -4
- package/dist/ink/hooks/use-stderr.js +1 -0
- package/dist/ink/hooks/use-stdin.d.ts +28 -5
- package/dist/ink/hooks/use-stdin.js +1 -0
- package/dist/ink/hooks/use-stdout.d.ts +14 -4
- package/dist/ink/hooks/use-stdout.js +1 -0
- package/dist/ink/hooks/use-stopwatch.d.ts +36 -37
- package/dist/ink/hooks/use-stopwatch.js +1 -0
- package/dist/ink/hooks/use-terminal-palette.d.ts +17 -16
- package/dist/ink/hooks/use-terminal-palette.js +1 -0
- package/dist/ink/hooks/use-text-buffer.d.ts +37 -37
- package/dist/ink/hooks/use-text-buffer.js +4 -0
- package/dist/ink/hooks/use-text-selection.d.ts +40 -41
- 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 +45 -46
- package/dist/ink/hooks/use-timer.js +1 -0
- package/dist/ink/hooks/use-window-size.d.ts +14 -14
- package/dist/ink/hooks/use-window-size.js +1 -0
- package/dist/ink/index.d.ts +397 -159
- package/dist/ink/index.js +1 -100
- package/dist/packem_chunks/devtools.js +3 -26
- package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +1 -0
- package/dist/packem_shared/Cell-BrXn3jxY.js +1 -0
- package/dist/packem_shared/ControlledScrollView-CIc-x1Cx.js +1 -0
- package/dist/packem_shared/DevTools-BR7K-5JX.js +1 -0
- package/dist/packem_shared/FilePicker-tYj_CIau.js +1 -0
- package/dist/packem_shared/FocusContext-Xy0cwJpO.js +1 -0
- package/dist/packem_shared/Fullscreen-CxLd1-Zu.js +1 -0
- package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +1 -0
- package/dist/packem_shared/InputParser-BAqciKJ6.js +2 -0
- package/dist/packem_shared/KEY-Bk8B-3h_.js +1 -0
- package/dist/packem_shared/LayoutNode-B0qeT8sl.js +1 -0
- package/dist/packem_shared/MouseProvider-CHU5DuwC.js +1 -0
- package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +1 -0
- package/dist/packem_shared/Renderer-DJXooAsp.js +1 -0
- package/dist/packem_shared/ResizeObserverEntry-Dq0dk8Kq.js +1 -0
- package/dist/packem_shared/ScrollBar-U_37hlIT.js +1 -0
- package/dist/packem_shared/ScrollBarBox-DwiCxilX.js +1 -0
- package/dist/packem_shared/ScrollList-C7nZ9ufK.js +1 -0
- package/dist/packem_shared/ScrollView-DKZ8OM-m.js +1 -0
- package/dist/packem_shared/Static-DLynr5pn.js +1 -0
- package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +1 -0
- package/dist/packem_shared/TreeView-C0Iv3et8.js +1 -0
- package/dist/packem_shared/TuiApp-CxBtziW8.js +1 -0
- package/dist/packem_shared/TuiContext-BoJvG3NN.js +3 -0
- package/dist/packem_shared/_commonjsHelpers-CHNfUHCT.js +1 -0
- package/dist/packem_shared/accessibility-context-DDyHTwmA.js +1 -0
- package/dist/packem_shared/animation-context-DW3p-vpk.js +1 -0
- package/dist/packem_shared/ansi-parser-C5JuL732.js +1 -0
- package/dist/packem_shared/ansi-tokenizer-DqX9nJuk.js +1 -0
- package/dist/packem_shared/app-context-BVpKlG1z.js +1 -0
- package/dist/packem_shared/background-context-rjOaWFki.js +1 -0
- package/dist/packem_shared/boxes-DyY_LXCi.js +1 -0
- package/dist/packem_shared/braille-BBjIoaN0.js +1 -0
- package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +39 -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-gy_cY-wC.js +2 -0
- package/dist/packem_shared/comparePoints-Dez5FkH9.js +1 -0
- package/dist/packem_shared/constants-D12jy2Zh-RSfxu1eM.js +1 -0
- package/dist/packem_shared/controlled-scroll-view-CcUS50jx.js +1 -0
- package/dist/packem_shared/createInlineLoop-D0JaKX9A.js +2 -0
- package/dist/packem_shared/createScreen-87XLHZq6.js +3 -0
- package/dist/packem_shared/cursor-context-CFviBqPX.js +1 -0
- package/dist/packem_shared/cursor-helpers.d-BONB9tky.d.ts +12 -0
- package/dist/packem_shared/dom-CW6KYzFK.js +8 -0
- package/dist/packem_shared/dom.d-DgP_exKU.d.ts +412 -0
- package/dist/packem_shared/erase-DKKNxHZ_.js +1 -0
- package/dist/packem_shared/focus-context-CsT69klR.js +1 -0
- package/dist/packem_shared/format-time-C7Q-hQZq.js +1 -0
- package/dist/packem_shared/get-string-width-CbMPWEJO.js +1 -0
- package/dist/packem_shared/getPathToRoot-B3q6OlQy.js +1 -0
- package/dist/packem_shared/getScrollHeight-ClEOyLHH.js +1 -0
- package/dist/packem_shared/index-COPEEDn3.js +9 -0
- package/dist/packem_shared/index-CqsHHJkn.js +75 -0
- package/dist/packem_shared/index.d-Bk52cbgN.d.ts +14 -0
- package/dist/packem_shared/index.server.d-eZWyC2Ku.d.ts +5 -0
- package/dist/packem_shared/input-utils-fAxzSlNh.js +1 -0
- package/dist/packem_shared/input.d-D-Yxqha8.d.ts +172 -0
- package/dist/packem_shared/isIntersecting-B3KbKTmu.js +1 -0
- package/dist/packem_shared/isOsc52Supported-DKK7Uee6.js +1 -0
- package/dist/packem_shared/isTerminalPaletteQuerySupported-Dn2hFAZ_.js +1 -0
- package/dist/packem_shared/kittyFlags-C3rZLbcK.js +1 -0
- package/dist/packem_shared/layout-BMo200nF.js +2 -0
- package/dist/packem_shared/line-chart-kf7uhR0K.js +1 -0
- package/dist/packem_shared/measure-text-D-jVetsl.js +3 -0
- package/dist/packem_shared/measureElement-BTtTFZg4.js +1 -0
- package/dist/packem_shared/mode-BOIU4Roy.js +1 -0
- package/dist/packem_shared/mouse-context-DaARgUu1.js +1 -0
- package/dist/packem_shared/parseSgrMouse-DoBY7MKw.js +1 -0
- package/dist/packem_shared/processLayout-FEKj_mWu.js +1 -0
- package/dist/packem_shared/reconciler-CGhHgXXG.js +1 -0
- package/dist/packem_shared/reconciler-ClRKkLS4.js +1 -0
- package/dist/packem_shared/render-BoukeuYD.js +1 -0
- package/dist/packem_shared/render-CBFHzIKj.js +27 -0
- package/dist/packem_shared/render.d-DarVJBG2.d.ts +417 -0
- package/dist/packem_shared/renderToString-Cx3DmmMR.js +4 -0
- package/dist/packem_shared/renderToString-nZdqfdWT.js +2 -0
- package/dist/packem_shared/renderTreeToBuffer-LnGZkEUX.js +2 -0
- package/dist/packem_shared/renderer-C2ycheBL.js +17 -0
- package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +119 -0
- package/dist/packem_shared/selection.d-WuD_83yQ.d.ts +62 -0
- package/dist/packem_shared/setEnableStyledLineCache-Cke6_ZQt.js +1 -0
- package/dist/packem_shared/squashTextNodesWithMap-DCdi3SZ2.js +1 -0
- package/dist/packem_shared/stderr-context-BzEaUICS.js +1 -0
- package/dist/packem_shared/stdin-context-BTaaFagk.js +1 -0
- package/dist/packem_shared/stdout-context-BnblEPez.js +1 -0
- package/dist/packem_shared/strip-C6HQYmlg.js +1 -0
- package/dist/packem_shared/styles.d-CLJdt-kg.d.ts +492 -0
- package/dist/packem_shared/terminal-palette.d-D2SQjfn-.d.ts +19 -0
- package/dist/packem_shared/text-width-CI9G0a-z.js +2 -0
- package/dist/packem_shared/token-to-elements-BAZpNZsu.js +1 -0
- package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +1 -0
- package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +1 -0
- package/dist/packem_shared/useMouseAction-2dRfU1vE.js +1 -0
- package/dist/packem_shared/useMouseContext-C746G7kY.js +1 -0
- package/dist/packem_shared/useMousePosition-BTWfV4JK.js +1 -0
- package/dist/packem_shared/useOnMouseClick-nY8xLZmt.js +1 -0
- package/dist/packem_shared/useOnMouseHover-D3DczIol.js +1 -0
- package/dist/packem_shared/useOnMouseState-cRK8QvzD.js +1 -0
- package/dist/packem_shared/useTreeView-BoMMeRPq.js +1 -0
- package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +1 -0
- package/dist/packem_shared/utils-THUhYKG2.js +1 -0
- package/dist/packem_shared/variant-config-BJqpNo7H.js +1 -0
- package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
- package/dist/packem_shared/waitFor-Dj5zfL5s.js +4 -0
- package/dist/packem_shared/wrapOrTruncateStyledLine-kyi6yijx.js +3 -0
- package/dist/react/index.d.ts +518 -8
- package/dist/react/index.js +1 -9
- package/dist/testing/index.d.ts +277 -135
- package/dist/testing/index.js +1 -260
- package/index.js +52 -52
- package/package.json +552 -40
- package/dist/core/app.d.ts +0 -50
- package/dist/core/cell.d.ts +0 -33
- package/dist/core/inline.d.ts +0 -22
- package/dist/core/input.d.ts +0 -18
- package/dist/core/native-binding.d.ts +0 -22
- package/dist/ink/ansi-to-cell.d.ts +0 -5
- package/dist/ink/ansi-tokenizer.d.ts +0 -38
- package/dist/ink/clipboard.d.ts +0 -29
- package/dist/ink/color-matrix.d.ts +0 -49
- package/dist/ink/color-utils.d.ts +0 -30
- package/dist/ink/colorize.d.ts +0 -4
- package/dist/ink/components/AccessibilityContext.d.ts +0 -4
- package/dist/ink/components/Alert.d.ts +0 -30
- package/dist/ink/components/AnimationContext.d.ts +0 -10
- package/dist/ink/components/App.d.ts +0 -19
- package/dist/ink/components/AppContext.d.ts +0 -38
- package/dist/ink/components/BackgroundContext.d.ts +0 -5
- package/dist/ink/components/Badge.d.ts +0 -27
- package/dist/ink/components/BigText.d.ts +0 -71
- package/dist/ink/components/Box.d.ts +0 -58
- package/dist/ink/components/Code.d.ts +0 -46
- package/dist/ink/components/ConfirmInput.d.ts +0 -40
- package/dist/ink/components/ConsoleOverlay.d.ts +0 -52
- package/dist/ink/components/Cursor.d.ts +0 -43
- package/dist/ink/components/CursorContext.d.ts +0 -12
- package/dist/ink/components/Dialog.d.ts +0 -93
- package/dist/ink/components/DiffView.d.ts +0 -71
- package/dist/ink/components/ErrorBoundary.d.ts +0 -17
- package/dist/ink/components/ErrorOverview.d.ts +0 -6
- package/dist/ink/components/FocusContext.d.ts +0 -17
- package/dist/ink/components/Gradient.d.ts +0 -38
- package/dist/ink/components/Help.d.ts +0 -49
- package/dist/ink/components/Link.d.ts +0 -34
- package/dist/ink/components/Markdown.d.ts +0 -34
- package/dist/ink/components/MultiSelect.d.ts +0 -63
- package/dist/ink/components/Newline.d.ts +0 -12
- package/dist/ink/components/OrderedList.d.ts +0 -30
- package/dist/ink/components/Paginator.d.ts +0 -75
- package/dist/ink/components/ProgressBar.d.ts +0 -51
- package/dist/ink/components/SelectInput.d.ts +0 -96
- package/dist/ink/components/SelectInputIndicator.d.ts +0 -36
- package/dist/ink/components/SelectInputItem.d.ts +0 -43
- package/dist/ink/components/Slider.d.ts +0 -92
- package/dist/ink/components/Spacer.d.ts +0 -7
- package/dist/ink/components/Spinner.d.ts +0 -42
- package/dist/ink/components/Static.d.ts +0 -24
- package/dist/ink/components/StaticRender.d.ts +0 -28
- package/dist/ink/components/StatusMessage.d.ts +0 -26
- package/dist/ink/components/StderrContext.d.ts +0 -16
- package/dist/ink/components/StdinContext.d.ts +0 -29
- package/dist/ink/components/StdoutContext.d.ts +0 -16
- package/dist/ink/components/Stopwatch.d.ts +0 -44
- package/dist/ink/components/Tab.d.ts +0 -25
- package/dist/ink/components/Table.d.ts +0 -80
- package/dist/ink/components/Tabs.d.ts +0 -104
- package/dist/ink/components/Text.d.ts +0 -63
- package/dist/ink/components/TextInput.d.ts +0 -48
- package/dist/ink/components/Textarea.d.ts +0 -62
- package/dist/ink/components/Timer.d.ts +0 -52
- package/dist/ink/components/Transform.d.ts +0 -16
- package/dist/ink/components/UnorderedList.d.ts +0 -35
- package/dist/ink/components/file-picker/FilePicker.d.ts +0 -75
- package/dist/ink/components/file-picker/index.d.ts +0 -3
- package/dist/ink/components/file-picker/types.d.ts +0 -38
- package/dist/ink/components/file-picker/use-file-system.d.ts +0 -16
- package/dist/ink/components/scroll/ControlledScrollView.d.ts +0 -43
- package/dist/ink/components/scroll/ScrollBar.d.ts +0 -20
- package/dist/ink/components/scroll/ScrollBarBox.d.ts +0 -15
- package/dist/ink/components/scroll/ScrollList.d.ts +0 -12
- package/dist/ink/components/scroll/ScrollView.d.ts +0 -98
- package/dist/ink/components/scroll/index.d.ts +0 -10
- package/dist/ink/components/scroll/use-state-ref.d.ts +0 -8
- package/dist/ink/components/tree-view/TreeView.d.ts +0 -89
- package/dist/ink/components/tree-view/TreeViewNode.d.ts +0 -29
- package/dist/ink/components/tree-view/index.d.ts +0 -11
- package/dist/ink/components/tree-view/theme.d.ts +0 -24
- package/dist/ink/components/tree-view/tree-node-map.d.ts +0 -72
- package/dist/ink/components/tree-view/types.d.ts +0 -55
- package/dist/ink/components/tree-view/use-tree-view-state.d.ts +0 -135
- package/dist/ink/components/tree-view/use-tree-view.d.ts +0 -26
- package/dist/ink/components/variant-config.d.ts +0 -10
- package/dist/ink/cursor-helpers.d.ts +0 -38
- package/dist/ink/data-limited-lru-map.d.ts +0 -21
- package/dist/ink/devtools-window-polyfill.d.ts +0 -1
- package/dist/ink/devtools.d.ts +0 -1
- package/dist/ink/dom.d.ts +0 -213
- package/dist/ink/get-max-width.d.ts +0 -3
- package/dist/ink/highlighter.d.ts +0 -28
- package/dist/ink/ime-utils.d.ts +0 -25
- package/dist/ink/ink.d.ts +0 -189
- package/dist/ink/input-parser.d.ts +0 -10
- package/dist/ink/input-utils.d.ts +0 -16
- package/dist/ink/instances.d.ts +0 -3
- package/dist/ink/kitty-keyboard.d.ts +0 -23
- package/dist/ink/layout.d.ts +0 -26
- package/dist/ink/log-update-native.d.ts +0 -14
- package/dist/ink/log-update.d.ts +0 -21
- package/dist/ink/measure-element.d.ts +0 -147
- package/dist/ink/measure-text.d.ts +0 -56
- package/dist/ink/mouse/Fullscreen.d.ts +0 -8
- package/dist/ink/mouse/MouseProvider.d.ts +0 -11
- package/dist/ink/mouse/ansi-parser.d.ts +0 -37
- package/dist/ink/mouse/constants.d.ts +0 -59
- package/dist/ink/mouse/index.d.ts +0 -20
- package/dist/ink/mouse/is-intersecting.d.ts +0 -18
- package/dist/ink/mouse/mouse-context.d.ts +0 -36
- package/dist/ink/mouse/use-element-position.d.ts +0 -29
- package/dist/ink/mouse/use-mouse-action.d.ts +0 -7
- package/dist/ink/mouse/use-mouse-position.d.ts +0 -7
- package/dist/ink/mouse/use-mouse.d.ts +0 -7
- package/dist/ink/mouse/use-on-mouse-click.d.ts +0 -14
- package/dist/ink/mouse/use-on-mouse-hover.d.ts +0 -8
- package/dist/ink/mouse/use-on-mouse-state.d.ts +0 -11
- package/dist/ink/output.d.ts +0 -74
- package/dist/ink/parse-keypress.d.ts +0 -22
- package/dist/ink/reconciler.d.ts +0 -3
- package/dist/ink/region.d.ts +0 -99
- package/dist/ink/render-background.d.ts +0 -4
- package/dist/ink/render-border.d.ts +0 -4
- package/dist/ink/render-node-to-output.d.ts +0 -38
- package/dist/ink/render-scrollbar.d.ts +0 -9
- package/dist/ink/render-sticky.d.ts +0 -44
- package/dist/ink/render-to-string.d.ts +0 -37
- package/dist/ink/render.d.ts +0 -191
- package/dist/ink/renderer.d.ts +0 -17
- package/dist/ink/resize-observer.d.ts +0 -44
- package/dist/ink/sanitize-ansi.d.ts +0 -2
- package/dist/ink/scroll.d.ts +0 -23
- package/dist/ink/selection.d.ts +0 -70
- package/dist/ink/squash-text-nodes.d.ts +0 -18
- package/dist/ink/style-flags.d.ts +0 -17
- package/dist/ink/styled-line-factory.d.ts +0 -25
- package/dist/ink/styled-line-serializer.d.ts +0 -18
- package/dist/ink/styled-line.d.ts +0 -109
- package/dist/ink/styles.d.ts +0 -369
- package/dist/ink/terminal-palette.d.ts +0 -25
- package/dist/ink/text-wrap.d.ts +0 -10
- package/dist/ink/token-to-elements.d.ts +0 -22
- package/dist/ink/utils/format-time.d.ts +0 -4
- package/dist/ink/utils.d.ts +0 -9
- package/dist/ink/wrap-text.d.ts +0 -3
- package/dist/ink/write-synchronized.d.ts +0 -4
- package/dist/packem_shared/AccessibilityContext-BLelHhNU.js +0 -7
- package/dist/packem_shared/Alert-Dr3s_LD9.js +0 -17
- package/dist/packem_shared/AnimationContext-BcJg8Jr6.js +0 -15
- package/dist/packem_shared/AppContext-CP0U6H7O.js +0 -11
- package/dist/packem_shared/BackgroundContext-BAUaxfOb.js +0 -5
- package/dist/packem_shared/Badge-Dk7EGGM6.js +0 -13
- package/dist/packem_shared/BigText-CjMdY63X.js +0 -24
- package/dist/packem_shared/Box-D_pSJ9Jp.js +0 -73
- package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-BsMy5Ewl.js +0 -81
- package/dist/packem_shared/Cell-DCg1kJY-.js +0 -48
- package/dist/packem_shared/Code-DjQvPBD9.js +0 -53
- package/dist/packem_shared/ConfirmInput-85Y4kRQW.js +0 -44
- package/dist/packem_shared/ConsoleOverlay-DBNa4vtj.js +0 -57
- package/dist/packem_shared/ControlledScrollView-BlOaxcsN.js +0 -286
- package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
- package/dist/packem_shared/Cursor-DiW7YoSK.js +0 -18
- package/dist/packem_shared/CursorContext-JxRzlqAx.js +0 -9
- package/dist/packem_shared/DevTools-aMPIsaHx.js +0 -61
- package/dist/packem_shared/Dialog-DsSNAVgC.js +0 -71
- package/dist/packem_shared/DiffView-hqaw-2S6.js +0 -329
- package/dist/packem_shared/FilePicker-DNwFxRhq.js +0 -254
- package/dist/packem_shared/FocusContext-CWkYtgcm.js +0 -26
- package/dist/packem_shared/FocusContext-D5wFxSRz.js +0 -153
- package/dist/packem_shared/Fullscreen-DrElAE1o.js +0 -11
- package/dist/packem_shared/Gradient-Ql5P0GUd.js +0 -136
- package/dist/packem_shared/Help-6wanGG38.js +0 -112
- package/dist/packem_shared/IMECompositionBuffer-Dl3S0KnF.js +0 -55
- package/dist/packem_shared/InputParser-BKHpWfvN.js +0 -156
- package/dist/packem_shared/LayoutNode-Cjnsodiy.js +0 -131
- package/dist/packem_shared/Link-COcKYfGT.js +0 -66
- package/dist/packem_shared/Markdown-y1ISztof.js +0 -212
- package/dist/packem_shared/MouseProvider-Y9TSSEGl.js +0 -136
- package/dist/packem_shared/MultiSelect-ChoLUcDI.js +0 -129
- package/dist/packem_shared/NAMED_COLORS-a4QBvb5r.js +0 -262
- package/dist/packem_shared/Newline-DBtYEg8x.js +0 -7
- package/dist/packem_shared/OrderedList-Cp7pXr6m.js +0 -26
- package/dist/packem_shared/Paginator-D1AuD-kj.js +0 -104
- package/dist/packem_shared/ProgressBar-DOfpVagn.js +0 -22
- package/dist/packem_shared/Renderer-zZ5O3vxc.js +0 -31
- package/dist/packem_shared/ResizeObserverEntry-Br4seLeQ.js +0 -102
- package/dist/packem_shared/ScrollBar-EWAs2Uc7.js +0 -106
- package/dist/packem_shared/ScrollBarBox-DTNNlh7R.js +0 -72
- package/dist/packem_shared/ScrollList-DCeIFL8M.js +0 -227
- package/dist/packem_shared/ScrollView-v3MCNIyX.js +0 -196
- package/dist/packem_shared/SelectInput-BN2TMyxp.js +0 -260
- package/dist/packem_shared/SelectInputIndicator-DkRMoH_b.js +0 -9
- package/dist/packem_shared/SelectInputItem-BF9LQgKu.js +0 -8
- package/dist/packem_shared/Slider-BWD7xZX6.js +0 -116
- package/dist/packem_shared/Spacer-Bs4ER-HK.js +0 -8
- package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
- package/dist/packem_shared/Static-DpTd6Eed.js +0 -22
- package/dist/packem_shared/Static-xmD9giJj.js +0 -18
- package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
- package/dist/packem_shared/StatusMessage-BtSYxzwb.js +0 -14
- package/dist/packem_shared/StderrContext-Bj4Mf7v7.js +0 -17
- package/dist/packem_shared/StdinContext-Bq_GNJ3z.js +0 -38
- package/dist/packem_shared/StdoutContext-CgjWeCdO.js +0 -17
- package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
- package/dist/packem_shared/Tab-C6r5q4hR.js +0 -7
- package/dist/packem_shared/Table-D-rSVlzb.js +0 -82
- package/dist/packem_shared/Tabs-hki-KRnx.js +0 -153
- package/dist/packem_shared/Text-DvAUdZcK.js +0 -65
- package/dist/packem_shared/TextInput-C79WEQ5U.js +0 -137
- package/dist/packem_shared/Textarea-Dj06R6Zd.js +0 -272
- package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
- package/dist/packem_shared/Transform-BHxY_dAM.js +0 -14
- package/dist/packem_shared/TreeNodeMap-CtJUvBnd.js +0 -155
- package/dist/packem_shared/TreeView-C2062dtj.js +0 -148
- package/dist/packem_shared/TuiApp-DfxOnXqi.js +0 -120
- package/dist/packem_shared/TuiContext-CqEjMyXd.js +0 -415
- package/dist/packem_shared/UnorderedList-DhnadWjX.js +0 -33
- package/dist/packem_shared/ansi-parser-0BdVTKho.js +0 -41
- package/dist/packem_shared/ansi-tokenizer-LHq2LUWA.js +0 -307
- package/dist/packem_shared/boxes-oi3WUbyR.js +0 -92
- package/dist/packem_shared/colorize-88_Vk8cn.js +0 -48
- package/dist/packem_shared/comparePoints-CGMDnd3_.js +0 -287
- package/dist/packem_shared/createInlineLoop-BxMmcq9D.js +0 -93
- package/dist/packem_shared/createLinkedScrollGroup-Djw4Ceo0.js +0 -44
- package/dist/packem_shared/dom-DvzhsAez.js +0 -225
- package/dist/packem_shared/format-time-BGmnDukX.js +0 -12
- package/dist/packem_shared/getPathToRoot-a1wbwxfL.js +0 -4
- package/dist/packem_shared/getScrollHeight-BubfU_df.js +0 -63
- package/dist/packem_shared/input-utils-ViAEXa0Z.js +0 -19
- package/dist/packem_shared/isIntersecting-fEXHJN5R.js +0 -10
- package/dist/packem_shared/isOsc52Supported-G0k4sXJx.js +0 -36
- package/dist/packem_shared/isTerminalPaletteQuerySupported-EeiwMKbr.js +0 -93
- package/dist/packem_shared/kittyFlags-bNNf_9kX.js +0 -26
- package/dist/packem_shared/measure-element-Reza_yfC.js +0 -396
- package/dist/packem_shared/measure-text-DItZYotK.js +0 -1189
- package/dist/packem_shared/measureElement-CTgFCmKd.js +0 -4
- package/dist/packem_shared/mouse-context-BUHWKEIe.js +0 -6
- package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
- package/dist/packem_shared/processLayout-BQ9kXfd3.js +0 -2
- package/dist/packem_shared/reconciler-BXf6miSS.js +0 -211
- package/dist/packem_shared/reconciler-gfmqURLy.js +0 -680
- package/dist/packem_shared/render-BAwdjfki.js +0 -2806
- package/dist/packem_shared/render-Bpjhf0lD.js +0 -195
- package/dist/packem_shared/renderToString-Cfg55DRD.js +0 -62
- package/dist/packem_shared/renderToString-ClIaXgrC.js +0 -86
- package/dist/packem_shared/renderTreeToBuffer-D3mo7M7m.js +0 -308
- package/dist/packem_shared/renderer-B3wROkeg.js +0 -1431
- package/dist/packem_shared/setEnableStyledLineCache-BpskngSJ.js +0 -2
- package/dist/packem_shared/squashTextNodesWithMap-iqm6OMMT.js +0 -100
- package/dist/packem_shared/text-width-DhuarWcB.js +0 -42
- package/dist/packem_shared/token-to-elements-BRFl_rzw.js +0 -249
- package/dist/packem_shared/treeViewTheme-BpSw9TMf.js +0 -52
- package/dist/packem_shared/useAnimation-kj31sA-T.js +0 -62
- package/dist/packem_shared/useApp-DPQlRzi5.js +0 -6
- package/dist/packem_shared/useBoxMetrics-rBjKc-g4.js +0 -54
- package/dist/packem_shared/useClipboard-B_9-adw1.js +0 -23
- package/dist/packem_shared/useColorBlindness-D_sTIhcb.js +0 -30
- package/dist/packem_shared/useConsoleCapture-Dvt7G1W1.js +0 -61
- package/dist/packem_shared/useCursor-BIJzc8k9.js +0 -19
- package/dist/packem_shared/useElementDimensions-CAoKitVD.js +0 -67
- package/dist/packem_shared/useFocus-CNl5QHHf.js +0 -37
- package/dist/packem_shared/useFocusManager-BPYaUuKQ.js +0 -16
- package/dist/packem_shared/useInput-Cfp5zB2s.js +0 -594
- package/dist/packem_shared/useIsScreenReaderEnabled-CnGKCe0f.js +0 -9
- package/dist/packem_shared/useKeyBindings-B78l1E1n.js +0 -66
- package/dist/packem_shared/useMouseAction-C5gZ2nj7.js +0 -29
- package/dist/packem_shared/useMouseContext-D-rFy60Q.js +0 -12
- package/dist/packem_shared/useMousePosition-BHBJ-kBk.js +0 -25
- package/dist/packem_shared/useOnMouseClick--ZIyBOBO.js +0 -35
- package/dist/packem_shared/useOnMouseHover-26diuXUC.js +0 -32
- package/dist/packem_shared/useOnMouseState-NO_Kda_C.js +0 -13
- package/dist/packem_shared/usePaste-Ct8J4AGR.js +0 -35
- package/dist/packem_shared/useScrollAcceleration-R9LfrPVG.js +0 -73
- package/dist/packem_shared/useScrollInput-D3CpBq_a.js +0 -72
- package/dist/packem_shared/useStderr-CAOVUh4E.js +0 -6
- package/dist/packem_shared/useStdin-X-O0kd-n.js +0 -7
- package/dist/packem_shared/useStdout-DyF6DSH0.js +0 -6
- package/dist/packem_shared/useStopwatch-qC4Beai4.js +0 -33
- package/dist/packem_shared/useTerminalPalette-BaWO2c4Q.js +0 -38
- package/dist/packem_shared/useTextBuffer-C8fEe9Ly.js +0 -398
- package/dist/packem_shared/useTextSelection-mXtxgsPK.js +0 -50
- package/dist/packem_shared/useTimer-CPQ7j827.js +0 -46
- package/dist/packem_shared/useTreeView-BT57P3Kx.js +0 -101
- package/dist/packem_shared/useTreeViewState-BpS_KZ-K.js +0 -502
- package/dist/packem_shared/useWindowSize-ugEmGZJm.js +0 -20
- package/dist/packem_shared/utils-BgdlrbOH.js +0 -140
- package/dist/packem_shared/variant-config-DSZoX5TM.js +0 -8
- package/dist/packem_shared/wrapOrTruncateStyledLine-DN3Nogoc.js +0 -147
- package/dist/react/devtools.d.ts +0 -27
- package/dist/react/focus.d.ts +0 -39
- package/dist/react/hooks.d.ts +0 -238
- package/dist/react/layout.d.ts +0 -35
- package/dist/react/react.d.ts +0 -57
- package/dist/react/reconciler.d.ts +0 -4
- package/dist/react/render-to-string.d.ts +0 -21
- package/dist/react/renderer.d.ts +0 -2
- package/dist/react/scene.d.ts +0 -3
- package/dist/react/static.d.ts +0 -39
- package/dist/react/styles.d.ts +0 -83
- package/dist/react/text-width.d.ts +0 -20
- package/dist/testing/keys.d.ts +0 -89
- package/dist/testing/screen.d.ts +0 -35
- package/dist/testing/wait-for.d.ts +0 -21
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var De=Object.defineProperty;var _=(o,e)=>De(o,"name",{value:e,configurable:!0});import{T as Pe,i as We}from"./dom-CW6KYzFK.js";import{o as Z}from"./get-string-width-CbMPWEJO.js";import{B as H,D as A,I,U as j,f as z,H as Y,g as q,h as de,F as V,j as ue,S as He,k as Ae,p as Fe,l as Ge}from"./measure-text-D-jVetsl.js";import T from"yoga-layout";import{j as F,i as Ie,m as ce,c as he}from"./layout-BMo200nF.js";import{a as je,d as J,g as ze}from"./colorize-gy_cY-wC.js";import{o as Ye}from"./boxes-DyY_LXCi.js";import{getScrollTop as Te}from"./getScrollHeight-ClEOyLHH.js";import xe from"./squashTextNodesWithMap-DCdi3SZ2.js";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
+
var qe=Object.defineProperty,ke=_((o,e)=>qe(o,"name",{value:e,configurable:!0}),"n$1"),Ke=Object.defineProperty,we=ke((o,e)=>Ke(o,"name",{value:e,configurable:!0}),"n"),Xe=Object.defineProperty,Ue=we((o,e)=>Xe(o,"name",{value:e,configurable:!0}),"o");function Q(o,e=1,t={}){const{indent:r=" ",includeEmptyLines:i=!1}=t;if(typeof o!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof o}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(e<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${e}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(e===0)return o;const s=i?/^/gm:/^(?!\s*$)/gm;return o.replace(s,r.repeat(e))}_(Q,"o");ke(Q,"g");we(Q,"a");Ue(Q,"indentString");const Ve=1114112;var Je=Object.defineProperty,Le=_((o,e)=>Je(o,"name",{value:e,configurable:!0}),"T$1");const Qe=1,Ze=2,et=3,tt=4,ot=7,rt=8,it=9,ge=22,fe=23,pe=24,me=27,ye=28,be=29,ve=39,Ce=49,nt="\x1B[",E=Le(o=>o.length===0?"":`${nt}${o.join(";")}m`,"sgr"),st=Le(o=>{if(o.length===0)return"";let e="",t=0,r,i,s,n=!1,d=0;const g=o.getSpans();for(const f of g){const c=f.formatFlags&127,{fgColor:l}=f,{bgColor:a}=f,{link:h}=f,u=c;if(u!==t||l!==r||a!==i||h!==s){if(h!==s&&(s&&(e+=s.startsWith("ST:")?"\x1B]8;;\x1B\\":"\x1B]8;;\x07"),h)){const m=h.startsWith("ST:");e+=`\x1B]8;;${m?h.slice(3):h}${m?"\x1B\\":"\x07"}`}const p=t&(H|A),b=u&(H|A);if(p!==b){const m=t&H&&!(u&H),y=t&A&&!(u&A);(m||y)&&(e+=E([ge])),u&H&&(!(t&H)||y)&&(e+=E([Qe])),u&A&&(!(t&A)||m)&&(e+=E([Ze]))}u&I&&!(t&I)?e+=E([et]):!(u&I)&&t&I&&(e+=E([fe])),u&j&&!(t&j)?e+=E([tt]):!(u&j)&&t&j&&(e+=E([pe])),u&z&&!(t&z)?e+=E([ot]):!(u&z)&&t&z&&(e+=E([me])),u&Y&&!(t&Y)?e+=E([rt]):!(u&Y)&&t&Y&&(e+=E([ye])),u&q&&!(t&q)?e+=E([it]):!(u&q)&&t&q&&(e+=E([be])),l!==r&&(e+=E(l?de(l,!0):[ve])),a!==i&&(e+=E(a?de(a,!1):[Ce])),n=u!==0||l!==void 0||a!==void 0,t=u,r=l,i=a,s=h}e+=o.getTextRange(d,d+f.length),d+=f.length}return n&&(t&(H|A)&&(e+=E([ge])),t&I&&(e+=E([fe])),t&j&&(e+=E([pe])),t&z&&(e+=E([me])),t&Y&&(e+=E([ye])),t&q&&(e+=E([be])),r!==void 0&&(e+=E([ve])),i!==void 0&&(e+=E([Ce]))),s&&(e+=s.startsWith("ST:")?"\x1B]8;;\x1B\\":"\x1B]8;;\x07"),e},"styledLineToString");var lt=Object.defineProperty,Re=_((o,e)=>lt(o,"name",{value:e,configurable:!0}),"v");class te{static{_(this,"OutputCaches")}static{Re(this,"OutputCaches")}widths=new Map;blockWidths=new Map;styledLines=new Map;lines=new Map;maxEntries;pruneToFactor;constructor(e={}){const{maxEntries:t=3e4,pruneToFactor:r=.8}=e;this.maxEntries=Math.max(1,t),this.pruneToFactor=Math.min(.99,Math.max(.1,r))}getStyledLine(e){let t=this.styledLines.get(e);return t===void 0&&(t=this.hasAnsiControlMarker(e)?Ae(e):Fe(e),this.setCacheEntry(this.styledLines,e,t)),t}getStringWidth(e){let t=this.widths.get(e);return t===void 0&&(t=Z(e),this.setCacheEntry(this.widths,e,t)),t}getWidestLine(e){let t=this.blockWidths.get(e);if(t===void 0){let r=0;for(const i of this.getLines(e))r=Math.max(r,this.getStringWidth(i));t=r,this.setCacheEntry(this.blockWidths,e,t)}return t}getLines(e){let t=this.lines.get(e);return t===void 0&&(t=e.split(`
|
|
4
|
+
`),this.setCacheEntry(this.lines,e,t)),t}hasAnsiControlMarker(e){for(const t of e){const r=t.codePointAt(0);if(at.has(r))return!0}return!1}setCacheEntry(e,t,r){!e.has(t)&&e.size>=this.maxEntries&&this.pruneCache(e),e.set(t,r)}pruneCache(e){const t=Math.floor(this.maxEntries*this.pruneToFactor);for(const r of e.keys())if(e.delete(r),e.size<=t)break}}const at=new Set([27,144,152,155,157,158,159]),dt=.6,ut=30;class oe{static{_(this,"A")}static{Re(this,"Output")}width;height;caches;grid;clipStack=[];previousLines=[];previousRenderedLines=[];lineMemoizationEnabled=!0;memoizationProbeCountdown=0;constructor(e){const{caches:t,height:r,width:i}=e;this.width=Math.round(i),this.height=Math.round(r),this.caches=t??new te,this.grid=this.createGrid(this.width,this.height)}reset(e,t){this.width=Math.round(e),this.height=Math.round(t),this.clipStack.length=0,this.grid=this.createGrid(this.width,this.height)}startChildRegion(e,t,r,i){const s=Math.round(e),n=Math.round(t);this.clipStack.push({x1:s,x2:s+Math.round(r),y1:n,y2:n+Math.round(i)})}endChildRegion(){this.clipStack.pop()}write(e,t,r,i){if(!r)return;const{transformers:s}=i,n=this.clipStack.at(-1),d=this.caches.getLines(r),g=s.length>0;for(const[f,c]of d.entries()){const l=t+f;if(l<0||l>=this.grid.length||n&&(l<n.y1||l>=n.y2))continue;let a=c;if(g)for(const m of s)a=m(a,f);if(a.length===0)continue;const h=this.grid[l],u=this.caches.getStyledLine(a);let p=e;const b=n?Math.min(n.x2,h.length):1/0;for(let m=0;m<u.length&&!(p>=b);m++){if(n&&(p<n.x1||p>=n.x2)){p++,u.getFullWidth(m)&&p++;continue}if(p>=0){p>=h.length&&h.ensureWidth(p+2);const y=u.getSpan(m),k=u.getFullWidth(m),w=(y?.formatFlags??0)|(k?V:0);h.setCharFast(p,u.getValue(m),w,y?.fgColor,y?.bgColor,y?.link),k&&(p++,p>=h.length&&h.ensureWidth(p+1),h.setCharFast(p,"",w&~V,y?.fgColor,y?.bgColor,y?.link))}p++}}}writeStyledLine(e,t,r){if(r.length===0||t<0||t>=this.grid.length)return;const i=this.clipStack.at(-1);i&&(t<i.y1||t>=i.y2)||this.writeStyledLineToRow(this.grid[t],e,r,this.width,i)}getRootLines(){return this.grid}getCurrentClip(){return this.clipStack.at(-1)}addRegionTree(e,t,r){for(let i=0;i<e.height;i++){const s=r+i;if(s<0||s>=this.grid.length)continue;const n=e.lines[i];if(!n)continue;const d=this.grid[s];for(let g=0;g<n.length;g++){const f=t+g;if(f<0||f>=d.length)continue;const c=n.getValue(g);(c!==" "||n.hasStyles(g))&&d.setCharFast(f,c,n.getFormatFlags(g),n.getFgColor(g),n.getBgColor(g),n.getLink(g))}}for(const i of e.children)this.addRegionTree(i,t+i.x,r+i.y)}writeStyledLineToRow(e,t,r,i,s){let n=t;const d=s?Math.min(s.x2,i):1/0;for(let g=0;g<r.length&&!(n>=d);g++){if(s&&(n<s.x1||n>=s.x2)){n++,r.getFullWidth(g)&&n++;continue}if(n>=0){n>=e.length&&e.ensureWidth(n+2);const f=r.getSpan(g),c=r.getFullWidth(g),l=(f?.formatFlags??0)|(c?V:0);e.setCharFast(n,r.getValue(g),l,f?.fgColor,f?.bgColor,f?.link),c&&(n++,n>=e.length&&e.ensureWidth(n+1),e.setCharFast(n,"",l&~V,f?.fgColor,f?.bgColor,f?.link))}n++}}get(){const e=this.grid;this.lineMemoizationEnabled||(this.memoizationProbeCountdown>0?this.memoizationProbeCountdown--:this.lineMemoizationEnabled=!0);const t=this.lineMemoizationEnabled,r=this.previousLines.length>0,i=t&&r&&this.previousLines.length===e.length&&this.previousRenderedLines.length===e.length;this.previousLines.length>e.length&&(this.previousLines.length=e.length),this.previousRenderedLines.length>e.length&&(this.previousRenderedLines.length=e.length);const s=Array.from({length:e.length});let n=0;for(const[d,g]of e.entries()){const f=g;if(i&&this.previousLines[d]?.equals(f)){s[d]=this.previousRenderedLines[d]??"";continue}n++;const c=f.trimEnd(),l=st(c);s[d]=l,t&&(this.previousRenderedLines[d]=l,this.previousLines[d]=f.clone())}return t&&i&&e.length>0&&n/e.length>dt&&this.disableLineMemoization(),{height:e.length,output:s.join(`
|
|
5
|
+
`)}}getBuffer(){const e=this.grid,t=e.length,r=new Uint32Array(this.width*t*2),i=65535;for(let s=0;s<r.length;s+=2)r[s]=32,r[s+1]=i;for(let s=0;s<t;s++){const n=e[s];for(let d=0;d<n.length&&d<this.width;d++){const g=n.getValue(d);if(g.length===0)continue;const f=g.codePointAt(0)??32,c=(s*this.width+d)*2,l=n.getSpan(d),a=l?.formatFlags??0,h=l?.fgColor,u=l?.bgColor,p=h?ue(h):255,b=u?ue(u):255,m=(a&255)<<16|(b&255)<<8|p&255;if(r[c]=f,r[c+1]=m,n.getFullWidth(d)&&d+1<this.width){const y=c+2;r[y]=Ve,r[y+1]=m,d++}}}return{buffer:r,height:t}}createGrid(e,t){const r=[];for(let i=0;i<t;i++)r.push(He.empty(e));return r}disableLineMemoization(){this.lineMemoizationEnabled=!1,this.memoizationProbeCountdown=ut,this.previousLines.length=0,this.previousRenderedLines.length=0}}var ct=Object.defineProperty,ht=_((o,e)=>ct(o,"name",{value:e,configurable:!0}),"d");const gt=ht(o=>Math.round(o.getComputedWidth()-Math.max(0,o.getComputedLeft()+o.getComputedWidth()-(o.getParent()?.getComputedWidth()??o.getComputedWidth()))-o.getComputedPadding(T.EDGE_LEFT)-o.getComputedPadding(T.EDGE_RIGHT)-o.getComputedBorder(T.EDGE_LEFT)-o.getComputedBorder(T.EDGE_RIGHT)),"getMaxWidth");var ft=Object.defineProperty,pt=_((o,e)=>ft(o,"name",{value:e,configurable:!0}),"c");const mt=pt((o,e,t,r)=>{if(!t.style.backgroundColor)return;const i=Math.round(t.yogaNode.getComputedWidth()),s=Math.round(t.yogaNode.getComputedHeight()),n=t.style.borderStyle&&t.style.borderLeft!==!1?1:0,d=t.style.borderStyle&&t.style.borderRight!==!1?1:0,g=t.style.borderStyle&&t.style.borderTop!==!1?1:0,f=t.style.borderStyle&&t.style.borderBottom!==!1?1:0,c=i-n-d,l=s-g-f;if(!(c>0&&l>0))return;const a=je(t.style.backgroundColor);if(!a)return;const h=`${a}${" ".repeat(c)}\x1B[49m`;for(let u=0;u<l;u++)r.write(o+n,e+g+u,h,{transformers:[]})},"renderBackground");var yt=Object.defineProperty,re=_((o,e)=>yt(o,"name",{value:e,configurable:!0}),"T");const D=re((o,e,t,r)=>{let i=J(o,e,"foreground");return i=J(i,t,"background"),r&&(i=ze.dim(i)),i},"stylePiece"),Ne=re((o,e,t,r,i,s,n,d)=>{if(!t&&!i)return D(o.repeat(e),s,n,d);const g=t?` ${t} `:"",f=i?` ${i} `:"",c=g.length,l=f.length,a=r??"left";if(c+l>=e){if(c>=e)return`${g.slice(0,e-1)}…`;const b=e-c;return b>3?g+f.slice(0,b):g+D(o.repeat(e-c),s,n,d)}const h=e-c-l;if(a==="left"||i)return g+D(o.repeat(h),s,n,d)+f;if(a==="right"){const b=e-c;return D(o.repeat(b),s,n,d)+g}const u=Math.floor(h/2),p=h-u;return D(o.repeat(u),s,n,d)+g+D(o.repeat(p),s,n,d)},"buildBorderWithTitle"),bt=re((o,e,t,r)=>{if(t.style.borderStyle){const i=Math.round(t.yogaNode.getComputedWidth()),s=Math.round(t.yogaNode.getComputedHeight()),n=typeof t.style.borderStyle=="string"?Ye[t.style.borderStyle]:t.style.borderStyle,d=t.style.borderTopColor??t.style.borderColor,g=t.style.borderBottomColor??t.style.borderColor,f=t.style.borderLeftColor??t.style.borderColor,c=t.style.borderRightColor??t.style.borderColor,l=t.style.borderTopBackgroundColor??t.style.borderBackgroundColor,a=t.style.borderBottomBackgroundColor??t.style.borderBackgroundColor,h=t.style.borderLeftBackgroundColor??t.style.borderBackgroundColor,u=t.style.borderRightBackgroundColor??t.style.borderBackgroundColor,p=t.style.borderTopDimColor??t.style.borderDimColor,b=t.style.borderBottomDimColor??t.style.borderDimColor,m=t.style.borderLeftDimColor??t.style.borderDimColor,y=t.style.borderRightDimColor??t.style.borderDimColor,k=t.style.borderTop!==!1,w=t.style.borderBottom!==!1,B=t.style.borderLeft!==!1,P=t.style.borderRight!==!1,v=Math.max(0,i-(B?1:0)-(P?1:0));let M;if(k){const L=B?D(n.topLeft,d,l,p):"",$=P?D(n.topRight,d,l,p):"",R=Ne(n.top,v,t.style.borderTopTitle,t.style.borderTopTitleAlignment,t.style.borderTopRightTitle,d,l,p);M=L+R+$}let C=s;k&&(C-=1),w&&(C-=1),C=Math.max(0,C);let S="";B&&(S=`${D(n.left,f,h,m)}
|
|
6
|
+
`.repeat(C));let N="";P&&(N=`${D(n.right,c,u,y)}
|
|
7
|
+
`.repeat(C));let x;if(w){const L=B?D(n.bottomLeft,g,a,b):"",$=P?D(n.bottomRight,g,a,b):"",R=Ne(n.bottom,v,t.style.borderBottomTitle,t.style.borderBottomTitleAlignment,void 0,g,a,b);x=L+R+$}const O=k?1:0;M&&r.write(o,e,M,{transformers:[]}),S&&r.write(o,e+O,S,{transformers:[]}),N&&r.write(o+i-1,e+O,N,{transformers:[]}),x&&r.write(o,e+s-1,x,{transformers:[]})}},"renderBorder");var vt=Object.defineProperty,Ct=_((o,e)=>vt(o,"name",{value:e,configurable:!0}),"m");const Se=[],Ee=Ct(({axis:o,color:e,layout:t,output:r})=>{const{thumb:{end:i,endHalf:s,start:n,startHalf:d},x:g,y:f}=t;if(o==="vertical")for(let c=n;c<i;c++){let l="█";const a=2*c>=d&&2*c<s,h=2*c+1>=d&&2*c+1<s;a&&!h?l="▀":!a&&h&&(l="▄");const u=e?J(l,e,"foreground"):l;r.write(g,f+c,u,{transformers:Se})}else for(let c=n;c<i;c++){let l="█";const a=2*c>=d&&2*c<s,h=2*c+1>=d&&2*c+1<s;a&&!h?l="▌":!a&&h&&(l="▐");const u=e?J(l,e,"foreground"):l;r.write(g+c,f,u,{transformers:Se})}},"renderScrollbar");var Nt=Object.defineProperty,ie=_((o,e)=>Nt(o,"name",{value:e,configurable:!0}),"b");const _e=ie((o,e=[])=>{for(const t of o.childNodes){if(t.nodeName==="#text")continue;const r=t;if(!r.internal_stickyAlternate)if(r.internal_sticky)e.push({node:r,type:r.internal_sticky==="bottom"?"bottom":"top"});else{const i=r.style.overflow??"visible",s=r.style.overflowX??i,n=r.style.overflowY??i;!(s==="scroll"||n==="scroll")&&r.childNodes&&_e(r,e)}}return e},"getStickyDescendants"),St=ie((o,e,t,r)=>{let i,s=-1,n,d=-1;for(const[f,c]of o.entries()){const{node:l,type:a}=c;if(!l.yogaNode)continue;const h=F(l,e)??0,u=Math.round(l.yogaNode.getComputedHeight()),p=h+u,b=l.parentNode;let m=0,y=Number.MAX_SAFE_INTEGER;b?.yogaNode&&(m=F(b,e)??0,y=Math.round(b.yogaNode.getComputedHeight())),a==="top"&&h<t&&m+y>t&&(i=c,s=f),a==="bottom"&&Math.floor(p)>Math.floor(r)&&m<r&&(n=c,d=f)}const g=[];if(i){let f;for(let c=s+1;c<o.length;c++){const l=o[c];if(l.type!=="bottom"){f=l;break}}g.push({nextStickyNodeInfo:f,stickyNode:i.node,type:"top"})}if(n){let f;for(let c=d-1;c>=0;c--){const l=o[c];if(l.type==="bottom"){f=l;break}}g.push({nextStickyNodeInfo:f,stickyNode:n.node,type:"bottom"})}return g},"identifyActiveStickyNodes"),Et=ie((o,e,t,r,i)=>{const{newTransformers:s,skipStaticElements:n,x:d,y:g}=i,{yogaNode:f}=e;if(!f)return;const c=f.getComputedBorder(T.EDGE_TOP),l=f.getComputedBorder(T.EDGE_LEFT),a=Te(e),h=e.internal_scrollState?.clientHeight??0;for(const{nextStickyNodeInfo:u,stickyNode:p,type:b}of o){if(!p.yogaNode)continue;const m=F(p,e)??0,y=Math.round(p.yogaNode.getComputedHeight()),k=d+(Ie(p,e)??0),w=p.parentNode;let B=0,P=Number.MAX_SAFE_INTEGER;w?.yogaNode&&(B=F(w,e)??0,P=Math.round(w.yogaNode.getComputedHeight()));let v;if(b==="top"){const S=w?.yogaNode?.getComputedBorder(T.EDGE_BOTTOM)??0,N=B+P-S;let x=g-a+N-y;const O=g-a+m,L=g+c;if(u?.node?.yogaNode){const $=F(u.node,e)??0,R=g-a+$-y;R<x&&(x=R)}v=Math.min(Math.max(L,O),x)}else{const S=w?.yogaNode?.getComputedBorder(T.EDGE_TOP)??0;let N=g-a+B+S;const x=g-a+m,O=g+c+h-y;if(u?.node?.yogaNode){const L=Math.round(u.node.yogaNode.getComputedHeight()),$=F(u.node,e)??0,R=g-a+$+L;R>N&&(N=R)}v=Math.max(Math.min(O,x),N)}const M=r({height:y,width:Math.round(p.yogaNode.getComputedWidth())});X(p,M,{offsetX:-Math.round(p.yogaNode.getComputedLeft()),offsetY:-Math.round(p.yogaNode.getComputedTop()),skipStaticElements:n,transformers:s});const C=M.get().output.split(`
|
|
8
|
+
`);for(const[S,N]of C.entries())N&&N.length>0&&t.write(k-(d+l),v-(g+c)+S,N,{transformers:[]})}},"renderActiveStickyNodes");var Mt=Object.defineProperty,W=_((o,e)=>Mt(o,"name",{value:e,configurable:!0}),"x");const Tt=W((o,e)=>{const t=o.childNodes[0]?.yogaNode;if(t){const r=Math.round(t.getComputedLeft()),i=Math.round(t.getComputedTop());e=`
|
|
9
|
+
`.repeat(i)+Q(e,r)}return e},"applyPaddingToText"),xt=31,kt=127,wt=128,Lt=159,Rt=W((o,e)=>{if(!Number.isFinite(e))return!1;if(e<0)return!0;let t=0;for(const r of o){if(r===`
|
|
10
|
+
`){if(t>e)return!0;t=0;continue}const i=r.codePointAt(0);if(i<=xt||i===kt||i>=wt&&i<=Lt||Ge(i)||(t++,t>e))return!0}return!1},"mightExceedWidth"),_t=W(o=>(o.internal_hidden??!1)||o.yogaNode?.getDisplay()===T.DISPLAY_NONE,"isNodeHidden"),Ot=W(o=>{let e=o;for(;e;){if(_t(e))return!0;e=e.parentNode}return!1},"isNodeOrAncestorHidden"),ee=W((o,e={})=>{if(e.skipStaticElements&&o.internal_static||o.internal_hidden||o.internal_stickyAlternate||o.yogaNode?.getDisplay()===T.DISPLAY_NONE)return"";let t="";if(o.nodeName==="ink-text")t=xe(o);else if(o.nodeName==="ink-box"||o.nodeName==="ink-root"){const r=o.style.flexDirection==="row"||o.style.flexDirection==="row-reverse"?" ":`
|
|
11
|
+
`;t=(o.style.flexDirection==="row-reverse"||o.style.flexDirection==="column-reverse"?o.childNodes.toReversed():[...o.childNodes]).map(i=>ee(i,{parentRole:o.internal_accessibility?.role,skipStaticElements:e.skipStaticElements})).filter(Boolean).join(r)}if(o.internal_accessibility){const{role:r,state:i}=o.internal_accessibility;if(i){const s=Object.keys(i).filter(n=>i[n]).join(", ");s&&(t=`(${s}) ${t}`)}r&&r!==e.parentRole&&(t=`${r}: ${t}`)}return t},"renderNodeToScreenReaderOutput"),X=W((o,e,t)=>{const{absoluteOffsetX:r,absoluteOffsetY:i,offsetX:s=0,offsetY:n=0,renderState:d,selectionMap:g,skipStaticElements:f,transformers:c=[]}=t;if(f&&o.internal_static||o.internal_hidden)return;if(o.cachedRender){const a=Math.round(s+(o.yogaNode?.getComputedLeft()??0)),h=Math.round(n+(o.yogaNode?.getComputedTop()??0));e.addRegionTree(o.cachedRender,a,h);return}if(o.nodeName==="ink-cursor"){if(!d)return;d.cursorRequested=!0;const a=o.internal_cursor;if(!a){d.cursorPosition=void 0;return}if(d.cursorShape=a.shape,a.inline){if(d.lastTextWriteEnd)d.cursorPosition={x:d.lastTextWriteEnd.x,y:d.lastTextWriteEnd.y};else{const p=o.parentNode?ce(o.parentNode):void 0;d.cursorPosition=p?{x:p.x,y:p.y}:void 0}return}const h=a.anchorRef?a.anchorRef.current:o.parentNode;if(!h){d.cursorPosition=void 0;return}if(a.anchorRef&&Ot(h)){d.cursorPosition=void 0;return}const u=ce(h);if(!u){d.cursorPosition=void 0;return}d.cursorPosition={x:u.x+a.x,y:u.y+a.y};return}const{yogaNode:l}=o;if(l){if(l.getDisplay()===T.DISPLAY_NONE)return;const a=l.getComputedLeft(),h=l.getComputedTop(),u=Math.round(s+a),p=Math.round(n+h),b=Math.round((r??s)+a),m=Math.round((i??n)+h),y=e.getCurrentClip();if(y){const v=Math.round(l.getComputedWidth()),M=Math.round(l.getComputedHeight()),C=b+v,S=m+M,N=y.x1??-1/0,x=y.x2??1/0,O=y.y1??-1/0,L=y.y2??1/0;if(C<=N||b>=x||S<=O||m>=L)return}let k=c;if(typeof o.internal_transform=="function"&&(k=[o.internal_transform,...c]),o.nodeName==="ink-text"){let v=xe(o);if(v.length>0){const M=gt(l);if(Rt(v,M)&&Math.max(...v.split(`
|
|
12
|
+
`).map(C=>Z(C)))>M){const C=o.style.textWrap??"wrap";v=Pe(v,Math.floor(M),C)}if(v=Tt(o,v),e.write(u,p,v,{transformers:k}),d){const C=v.split(`
|
|
13
|
+
`),S=C.at(-1)??"";d.lastTextWriteEnd={x:u+Z(S),y:p+C.length-1}}}return}let w=!1,B=0,P=0;if(o.nodeName==="ink-box"){mt(u,p,o,e),bt(u,p,o,e);const v=o.style.overflow??"visible",M=o.style.overflowX??v,C=o.style.overflowY??v,S=M==="hidden"||M==="scroll",N=C==="hidden"||C==="scroll";if(S||N){const x=Math.round(l.getComputedWidth()),O=Math.round(l.getComputedHeight()),L=S?u+l.getComputedBorder(T.EDGE_LEFT):u,$=S?x-l.getComputedBorder(T.EDGE_LEFT)-l.getComputedBorder(T.EDGE_RIGHT):x,R=N?p+l.getComputedBorder(T.EDGE_TOP):p,U=N?O-l.getComputedBorder(T.EDGE_TOP)-l.getComputedBorder(T.EDGE_BOTTOM):O;e.startChildRegion(L,R,Math.max(0,$),Math.max(0,U)),w=!0,C==="scroll"&&o.internal_scrollState&&(P=-o.internal_scrollState.scrollTop),M==="scroll"&&o.internal_scrollState&&(B=-o.internal_scrollState.scrollLeft)}}if(o.nodeName==="ink-root"||o.nodeName==="ink-box"||o.nodeName==="ink-static-render"){for(const v of o.childNodes)X(v,e,{absoluteOffsetX:b+B,absoluteOffsetY:m+P,offsetX:u+B,offsetY:p+P,renderState:d,selectionMap:g,skipStaticElements:f,transformers:k});if(o.nodeName==="ink-box"&&o.internal_scrollState){const v=_e(o);if(v.length>0){const M=Te(o),C=o.internal_scrollState.clientHeight,S=M+C,N=St(v,o,M,S);N.length>0&&Et(N,o,e,W(x=>new oe(x),"createOutput"),{newTransformers:k,skipStaticElements:f,x:u,y:p})}}if(o.nodeName==="ink-box"&&o.internal_scrollState){const v=o.style.overflow??"visible",M=o.style.overflowX??v,C=o.style.overflowY??v,S=l.getComputedBorder(T.EDGE_LEFT),N=l.getComputedBorder(T.EDGE_RIGHT),x=l.getComputedBorder(T.EDGE_TOP),O=l.getComputedBorder(T.EDGE_BOTTOM),L=Math.round(l.getComputedWidth()-S-N),$=Math.round(l.getComputedHeight()-x-O),{clientHeight:R,clientWidth:U,scrollHeight:ne,scrollLeft:Oe,scrollTop:Be,scrollWidth:se}=o.internal_scrollState,le=C==="scroll"&&ne>R,$e=M==="scroll"&&se>U,ae=o.internal_scrollbar!==!1;if(le&&ae){const G=he({axis:"vertical",clientDimension:R,hasOppositeScrollbar:!1,height:$,marginBottom:0,marginRight:0,scrollDimension:ne,scrollPosition:Be,width:L,x:u+S,y:p+x});G&&Ee({axis:"vertical",color:o.style.scrollbarThumbColor,layout:G,output:e})}if($e&&ae){const G=he({axis:"horizontal",clientDimension:U,hasOppositeScrollbar:le,height:$,marginBottom:0,marginRight:0,scrollDimension:se,scrollPosition:Oe,width:L,x:u+S,y:p+x});G&&Ee({axis:"horizontal",color:o.style.scrollbarThumbColor,layout:G,output:e})}}w&&e.endChildRegion()}}},"renderNodeToOutput"),Ut=W((o,e)=>{if(!o.yogaNode)return;const t=Math.round(o.yogaNode.getComputedWidth()),r=Math.round(o.yogaNode.getComputedHeight());if(t<=0||r<=0)return;const{setCachedRender:i}=require("./dom"),s=new oe({height:r,width:t});for(const d of o.childNodes)X(d,s,{skipStaticElements:e?.skipStaticElements??!1});const n={children:[],cursorPosition:void 0,height:r,id:o.internalId??"static",isScrollable:!1,lines:[...s.getRootLines()],selectableSpans:[],stickyHeaders:[],styledOutput:[...s.getRootLines()],width:t,x:0,y:0};i(o,n)},"renderToStatic");var Bt=Object.defineProperty,K=_((o,e)=>Bt(o,"name",{value:e,configurable:!0}),"N");const $t=K((o,e)=>{const t=new Map;if(e.rangeCount===0)return t;const r=e.getRangeAt(0),{endContainer:i,endOffset:s,startContainer:n,startOffset:d}=r;if(!n||!i)return t;let g=!1,f=!1;const c=K((a,h,u,p,b,m)=>{if(a.nodeName==="#text"){const{length:y}=a.nodeValue;n===a&&(b.value=!0,u.value=h.value+d),i===a&&(m.value=!0,p.value=h.value+s),h.value+=y}else if("childNodes"in a){for(const y of a.childNodes)a===n&&(b.value=!0,u.value=h.value),a===i&&(m.value=!0,p.value=h.value),c(y,h,u,p,b,m);a===n&&d===a.childNodes.length&&(b.value=!0,u.value=h.value),a===i&&s===a.childNodes.length&&(m.value=!0,p.value=h.value)}},"visitChildren"),l=K(a=>{if(a.nodeName==="ink-text"){if(!We(a))return;const h={value:0},u={value:-1},p={value:-1},b={value:!1},m={value:!1};for(const y of a.childNodes)a===n&&(b.value=!0,u.value=h.value),a===i&&(m.value=!0,p.value=h.value),c(y,h,u,p,b,m);if(a===n&&d===a.childNodes.length&&(b.value=!0,u.value=h.value),a===i&&s===a.childNodes.length&&(m.value=!0,p.value=h.value),(g||b.value)&&(!f||m.value)){const y=b.value?u.value:0,k=m.value?p.value:h.value;y!==-1&&k!==-1&&y<k&&t.set(a,{end:k,start:y})}b.value&&(g=!0),m.value&&(f=!0)}else{const{childNodes:h}=a;if(h){for(const u of h)a===n&&(g=!0),a===i&&(f=!0),l(u);a===n&&d===h.length&&(g=!0),a===i&&s===h.length&&(f=!0)}}},"visit");return l(o),t},"calculateSelectionMap"),Dt=new te,Pt=new te,Wt=new WeakMap,Ht=new WeakMap,Me=K(({caches:o,height:e,node:t,outputs:r,width:i})=>{let s=r.get(t);return s||(s=new oe({caches:o,height:e,width:i}),r.set(t,s)),s.reset(i,e),s},"getReusableOutput"),Vt=K((o,e,t)=>{if(o.yogaNode){if(e){const f=ee(o,{skipStaticElements:!0}),c=f===""?0:f.split(`
|
|
14
|
+
`).length;let l="";return o.staticNode&&(l=ee(o.staticNode,{skipStaticElements:!1})),{cursorPosition:void 0,cursorRequested:!1,cursorShape:void 0,output:f,outputHeight:c,staticOutput:l?`${l}
|
|
15
|
+
`:""}}const r=t?.selection&&t.selection.rangeCount>0?$t(o,t.selection):void 0,i=Me({caches:Dt,height:o.yogaNode.getComputedHeight(),node:o,outputs:Wt,width:o.yogaNode.getComputedWidth()}),s={cursorPosition:void 0,cursorRequested:!1,cursorShape:void 0};X(o,i,{renderState:s,selectionMap:r,skipStaticElements:!0});let n;if(o.staticNode?.yogaNode&&(n=Me({caches:Pt,height:o.staticNode.yogaNode.getComputedHeight(),node:o,outputs:Ht,width:o.staticNode.yogaNode.getComputedWidth()}),X(o.staticNode,n,{skipStaticElements:!1})),t?.useNativeRenderer){const{buffer:f,height:c}=i.getBuffer();return{cursorPosition:s.cursorPosition,cursorRequested:s.cursorRequested,cursorShape:s.cursorShape,output:"",outputBuffer:f,outputHeight:c,outputWidth:i.width,staticOutput:n?`${n.get().output}
|
|
16
|
+
`:""}}const{height:d,output:g}=i.get();return{cursorPosition:s.cursorPosition,cursorRequested:s.cursorRequested,cursorShape:s.cursorShape,output:g,outputHeight:d,staticOutput:n?`${n.get().output}
|
|
17
|
+
`:""}}return{cursorPosition:void 0,cursorRequested:!1,cursorShape:void 0,output:"",outputHeight:0,staticOutput:""}},"renderer");export{oe as A,X as B,Vt as R,Ut as r};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React, { ReactNode, Ref } from 'react';
|
|
2
|
+
import { BoxProps as Props } from "../components/box.js";
|
|
3
|
+
interface ScrollViewProps extends Props {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Auto-scroll to bottom when content grows and user is at/near the bottom.
|
|
8
|
+
* Pauses when user scrolls away from bottom; resumes when they return.
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
followOutput?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Number of lines from bottom that still counts as "at bottom" for followOutput.
|
|
14
|
+
* @default 3
|
|
15
|
+
*/
|
|
16
|
+
followThreshold?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Enable built-in keyboard navigation (arrows, page up/down, home/end, ctrl+u/d).
|
|
19
|
+
* When enabled, the component becomes focusable.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
keyboard?: boolean;
|
|
23
|
+
onContentHeightChange?: (height: number, previousHeight: number) => void;
|
|
24
|
+
onItemHeightChange?: (index: number, height: number, previousHeight: number) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Fires when scrolled within `reachThreshold` lines of the end.
|
|
27
|
+
* Only fires once per entry into the threshold zone.
|
|
28
|
+
*/
|
|
29
|
+
onReachEnd?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Fires when scrolled within `reachThreshold` lines of the start.
|
|
32
|
+
* Only fires once per entry into the threshold zone.
|
|
33
|
+
*/
|
|
34
|
+
onReachStart?: () => void;
|
|
35
|
+
onScroll?: (scrollOffset: number) => void;
|
|
36
|
+
onViewportSizeChange?: (size: {
|
|
37
|
+
height: number;
|
|
38
|
+
width: number;
|
|
39
|
+
}, previousSize: {
|
|
40
|
+
height: number;
|
|
41
|
+
width: number;
|
|
42
|
+
}) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Number of extra items to render above/below the viewport when virtualized.
|
|
45
|
+
* @default 3
|
|
46
|
+
*/
|
|
47
|
+
overscan?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Distance in lines from the edge to trigger onReachEnd/onReachStart.
|
|
50
|
+
* @default 5
|
|
51
|
+
*/
|
|
52
|
+
reachThreshold?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Show a scrollbar track when content overflows the viewport.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
scrollbar?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Color of the scrollbar thumb and track.
|
|
60
|
+
*/
|
|
61
|
+
scrollbarColor?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Scrollbar visual style.
|
|
64
|
+
* @default "line"
|
|
65
|
+
*/
|
|
66
|
+
scrollbarStyle?: "arrow" | "block" | "bold" | "classic" | "dots" | "double" | "doubleSingle" | "line" | "round" | "single" | "singleDouble" | "thick";
|
|
67
|
+
/**
|
|
68
|
+
* Enable vim-style keybindings (j/k/g/G/u/d). Requires `keyboard` to be true.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
vimBindings?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Only render items visible in the viewport plus overscan. Requires items to be measured first.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
virtualize?: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface ScrollViewRef {
|
|
79
|
+
getBottomOffset: () => number;
|
|
80
|
+
getContentHeight: () => number;
|
|
81
|
+
getItemHeight: (index: number) => number;
|
|
82
|
+
getItemPosition: (index: number) => {
|
|
83
|
+
height: number;
|
|
84
|
+
top: number;
|
|
85
|
+
} | null;
|
|
86
|
+
getScrollOffset: () => number;
|
|
87
|
+
getViewportHeight: () => number;
|
|
88
|
+
remeasure: () => void;
|
|
89
|
+
remeasureItem: (index: number) => void;
|
|
90
|
+
scrollBy: (delta: number) => void;
|
|
91
|
+
scrollTo: (offset: number) => void;
|
|
92
|
+
scrollToBottom: () => void;
|
|
93
|
+
scrollToTop: () => void;
|
|
94
|
+
}
|
|
95
|
+
declare const ScrollView: ({
|
|
96
|
+
children,
|
|
97
|
+
debug,
|
|
98
|
+
followOutput,
|
|
99
|
+
followThreshold,
|
|
100
|
+
keyboard,
|
|
101
|
+
onContentHeightChange,
|
|
102
|
+
onItemHeightChange,
|
|
103
|
+
onReachEnd,
|
|
104
|
+
onReachStart,
|
|
105
|
+
onScroll,
|
|
106
|
+
onViewportSizeChange,
|
|
107
|
+
overscan,
|
|
108
|
+
reachThreshold,
|
|
109
|
+
ref,
|
|
110
|
+
scrollbar,
|
|
111
|
+
scrollbarColor,
|
|
112
|
+
scrollbarStyle: scrollbarStyleProp,
|
|
113
|
+
vimBindings,
|
|
114
|
+
virtualize,
|
|
115
|
+
...boxProps
|
|
116
|
+
}: ScrollViewProps & {
|
|
117
|
+
ref?: Ref<ScrollViewRef>;
|
|
118
|
+
}) => React.JSX.Element;
|
|
119
|
+
export { ScrollView as S, ScrollViewProps as a, ScrollViewRef as b };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { a as DOMNode, S as StyledLine } from "./dom.d-DgP_exKU.js";
|
|
2
|
+
/**
|
|
3
|
+
* Compare the document position of two points in the DOM tree.
|
|
4
|
+
* Returns -1 if A is before B, 0 if equal, 1 if A is after B.
|
|
5
|
+
*/
|
|
6
|
+
declare const comparePoints: (nodeA: DOMNode, offsetA: number, nodeB: DOMNode, offsetB: number) => number;
|
|
7
|
+
/**
|
|
8
|
+
* A Range represents a contiguous portion of the DOM tree.
|
|
9
|
+
* Modeled after the browser's Range API.
|
|
10
|
+
*/
|
|
11
|
+
declare class Range {
|
|
12
|
+
startContainer: DOMNode | undefined;
|
|
13
|
+
startOffset: number;
|
|
14
|
+
endContainer: DOMNode | undefined;
|
|
15
|
+
endOffset: number;
|
|
16
|
+
collapsed: boolean;
|
|
17
|
+
commonAncestorContainer: DOMNode | undefined;
|
|
18
|
+
setStart(node: DOMNode, offset: number): void;
|
|
19
|
+
setEnd(node: DOMNode, offset: number): void;
|
|
20
|
+
collapse(toStart: boolean): void;
|
|
21
|
+
selectNode(node: DOMNode): void;
|
|
22
|
+
selectNodeContents(node: DOMNode): void;
|
|
23
|
+
toString(): string;
|
|
24
|
+
private updateCollapsed;
|
|
25
|
+
private updateCommonAncestor;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Manages multiple Range objects and provides high-level selection operations.
|
|
29
|
+
* Modeled after the browser's Selection API.
|
|
30
|
+
*/
|
|
31
|
+
declare class Selection {
|
|
32
|
+
anchorNode: DOMNode | undefined;
|
|
33
|
+
anchorOffset: number;
|
|
34
|
+
focusNode: DOMNode | undefined;
|
|
35
|
+
focusOffset: number;
|
|
36
|
+
isCollapsed: boolean;
|
|
37
|
+
rangeCount: number;
|
|
38
|
+
private ranges;
|
|
39
|
+
private readonly listeners;
|
|
40
|
+
onChange(listener: () => void): () => void;
|
|
41
|
+
toString(): string;
|
|
42
|
+
getRangeAt(index: number): Range;
|
|
43
|
+
addRange(range: Range): void;
|
|
44
|
+
removeRange(range: Range): void;
|
|
45
|
+
removeAllRanges(): void;
|
|
46
|
+
collapse(node: DOMNode, offset: number): void;
|
|
47
|
+
containsNode(node: DOMNode, allowPartialContainment?: boolean): boolean;
|
|
48
|
+
private clearState;
|
|
49
|
+
private notifyChange;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Apply selection highlighting to a range of characters in a StyledLine.
|
|
53
|
+
*
|
|
54
|
+
* Characters whose index falls within [start, end) of the selection range
|
|
55
|
+
* get the INVERSE style flag applied. Returns a new StyledLine with the
|
|
56
|
+
* selection highlighting — the original is not mutated.
|
|
57
|
+
*/
|
|
58
|
+
declare const applySelectionToStyledLine: (line: StyledLine, range: {
|
|
59
|
+
end: number;
|
|
60
|
+
start: number;
|
|
61
|
+
}) => StyledLine;
|
|
62
|
+
export { Range as R, Selection as S, applySelectionToStyledLine as a, comparePoints as c };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./get-string-width-CbMPWEJO.js";import{c as i,a as s,e as n,i as d,m as l,s as r,b as c,n as h,d as y,t as S}from"./measure-text-D-jVetsl.js";export{i as clearStringWidthCache,s as clearStyledLineCache,n as default,d as inkCharacterWidth,l as measureStyledLine,r as setEnableStyledLineCache,c as setStringWidthFunction,h as splitStyledLineByNewline,y as styledLineWidth,S as toStyledLine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var u=(e,n)=>h(e,"name",{value:n,configurable:!0});import{h as m,t as x}from"./ansi-tokenizer-DqX9nJuk.js";var p=Object.defineProperty,d=u((e,n)=>p(e,"name",{value:n,configurable:!0}),"r");const v=/^[\d:;]*$/,N="\x1B]8;",g="8;",y=d(e=>e.startsWith(N)||e.startsWith(g),"isAllowedOsc"),_=d(e=>{if(!m(e))return e;let n="";for(const t of x(e)){if(t.type==="text"){n+=t.value;continue}if(t.type==="osc"&&y(t.value)){n+=t.value;continue}t.type==="csi"&&t.finalCharacter==="m"&&t.intermediateString===""&&v.test(t.parameterString)&&(n+=t.value)}return n},"sanitizeAnsi");var C=Object.defineProperty,f=u((e,n)=>C(e,"name",{value:n,configurable:!0}),"d");const k=f(e=>{let n="";for(let t=0;t<e.childNodes.length;t++){const a=e.childNodes[t];if(a===void 0)continue;let o="";a.nodeName==="#text"?o=a.nodeValue:((a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&(o=k(a)),o.length>0&&typeof a.internal_transform=="function"&&(o=a.internal_transform(o,t))),n+=o}return _(n)},"squashTextNodes"),b=f((e,n,t)=>{if(e.internal_textCache){const{map:s,text:r}=e.internal_textCache;for(const[i,l]of s.entries())n.set(i,{end:l.end+t.current,start:l.start+t.current});return t.current+=r.length,r}let a="";const o=new Map,c={current:0};for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(r===void 0)continue;let i="";const l=c.current;r.nodeName==="#text"?(i=r.nodeValue,o.set(r,{end:l+i.length,start:l}),c.current+=i.length):((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(i=b(r,o,c),o.set(r,{end:c.current,start:l})),i.length>0&&typeof r.internal_transform=="function"&&(i=r.internal_transform(i,s))),a+=i}e.internal_textCache={map:o,text:a};for(const[s,r]of o.entries())n.set(s,{end:r.end+t.current,start:r.start+t.current});return t.current+=a.length,a},"squashTextNodesWithMap");export{k as default,b as squashTextNodesWithMap};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";import{createContext as o}from"react";const i=e(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,t=r,s=o({stderr:t.stderr,write(){}});s.displayName="InternalStderrContext";export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=Object.defineProperty;var s=(n,t)=>r(n,"name",{value:t,configurable:!0});import{createRequire as i}from"node:module";import{createContext as p}from"react";const a=i(import.meta.url),e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=s(n=>{if(typeof e<"u"&&e.versions&&e.versions.node){const[t,o]=e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return e.getBuiltinModule(n)}return a(n)},"__cjs_getBuiltinModule"),{EventEmitter:d}=c("node:events"),l=e,u=p({internal_eventEmitter:new d,internal_exitOnCtrlC:!0,isRawModeSupported:!1,setBracketedPasteMode(){},setRawMode(){},stdin:l.stdin});u.displayName="InternalStdinContext";export{u as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRequire as e}from"node:module";import{createContext as s}from"react";const i=e(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,o=t,r=s({stdout:o.stdout,write(){}});r.displayName="InternalStdoutContext";export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var a=(e,r)=>c(e,"name",{value:r,configurable:!0});var o=Object.defineProperty,t=a((e,r)=>o(e,"name",{value:r,configurable:!0}),"u"),i=Object.defineProperty,n=t((e,r)=>i(e,"name",{value:r,configurable:!0}),"u"),l=Object.defineProperty,f=n((e,r)=>l(e,"name",{value:r,configurable:!0}),"e");function u({onlyFirst:e=!1}={}){const r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}a(u,"n");t(u,"a");n(u,"t");f(u,"ansiRegex");var p=Object.defineProperty,d=n((e,r)=>p(e,"name",{value:r,configurable:!0}),"r");const v=u(),b=/\u001B\]0;.*\u0007/,g=d(e=>e.replace(b,"").replace(v,""),"strip");export{g as s};
|