@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,2 @@
|
|
|
1
|
+
var N=Object.defineProperty;var n=(i,r)=>N(i,"name",{value:r,configurable:!0});import{N as O,H as P,P as S,T as Y,G as m,E as A,z as L}from"./erase-DKKNxHZ_.js";import{o as U,h as y,g as M,e as $}from"./mode-BOIU4Roy.js";import{terminalSize as j,Renderer as k}from"./Renderer-DJXooAsp.js";var B=Object.defineProperty,o=n((i,r)=>B(i,"name",{value:r,configurable:!0}),"r");const g=U(2026),D=y(g),H=M(g),q=y($),C=M($);function F(i,r={}){const h=r.rows??10,x=r.fps??60,z=r.onExit??"preserve";let l=null,a=null,p=null,f=80,s=10,E=0,c=1;function e(t){a.writeRaw(t)}n(e,"e"),o(e,"write");function d(){p.fill(0),i(p,f,s,E++),e(D);try{a.render(p)}finally{e(H)}}n(d,"u"),o(d,"tick");function w(t){c=t-s,e(O(s)+P),a.setRowOffset(c),d(),l=setInterval(()=>{d()},Math.round(1e3/x))}n(w,"E$1"),o(w,"startRendering");function I(){const t=j();f=t.cols;const G=t.rows;s=Math.min(h,G),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding("utf8"),a=new k(f,s),p=new Uint32Array(f*s*2),e(S),e(q),e(`
|
|
2
|
+
`.repeat(s)),e(Y),process.on("SIGINT",u);let v="";const R=o(b=>{v+=b;const T=v.match(/\u001B\[(\d+);(\d+)R/);T&&(process.stdin.off("data",R),w(Number.parseInt(T[1],10)))},"onData");process.stdin.on("data",R)}n(I,"P$1"),o(I,"start");function u(){if(l&&(clearInterval(l),l=null),a){if(z==="destroy"){for(let t=0;t<s;t++)e(m(c+1+t,1)+A);e(m(c+1,1))}else e(m(c+s+1,1));e(C),e(L)}process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause(),process.exit(0)}return n(u,"f"),o(u,"stop"),{start:I,stop:u}}n(F,"createInlineLoop");o(F,"createInlineLoop");export{F as createInlineLoop};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var u=Object.defineProperty;var n=(t,r)=>u(t,"name",{value:r,configurable:!0});import{s}from"./strip-C6HQYmlg.js";var c=Object.defineProperty,i=n((t,r)=>c(t,"name",{value:r,configurable:!0}),"e");const m=i((t,r)=>{const a=i(e=>e===void 0?"":s(e),"clean");return{contains(e){return this.text().includes(e)},frames(){return r.map(e=>s(e))},line(e){return this.text().split(`
|
|
2
|
+
`)[e]??""},lines(){return this.text().split(`
|
|
3
|
+
`).filter(e=>e.trim()!=="")},matches(e){return e.test(this.text())},rawFrames(){return[...r]},rawText(){return t()??""},text(){return a(t())}}},"createScreen");export{m as createScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as o}from"react";const t=o({setCursorPosition(){}});t.displayName="InternalCursorContext";export{t as o};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type CursorPosition = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Declarative cursor shape, mapped to DECSCUSR (`CSI Ps SP q`).
|
|
7
|
+
*
|
|
8
|
+
* `"default"` restores the terminal's user-configured shape (`Ps=0`).
|
|
9
|
+
* Steady variants are non-blinking; `blinking-*` variants opt into blink.
|
|
10
|
+
*/
|
|
11
|
+
type CursorShape = "bar" | "blinking-bar" | "blinking-block" | "blinking-underline" | "block" | "default" | "underline";
|
|
12
|
+
export { CursorShape as C, CursorPosition as a };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var he=Object.defineProperty;var b=(e,t)=>he(e,"name",{value:t,configurable:!0});import fe from"yoga-layout";import{e as V}from"./measure-text-D-jVetsl.js";import pe from"./squashTextNodesWithMap-DCdi3SZ2.js";import{o as B,k as G,G as q,h as K,N as P,m as me,l as E,i as D,d as H,F as ge,b as xe,s as L,t as ve,a as ye}from"./get-string-width-CbMPWEJO.js";var Be=Object.defineProperty,ee=b((e,t)=>Be(e,"name",{value:t,configurable:!0}),"i"),Ne=Object.defineProperty,te=ee((e,t)=>Ne(e,"name",{value:t,configurable:!0}),"r"),be=Object.defineProperty,we=te((e,t)=>be(e,"name",{value:t,configurable:!0}),"c");class ke{static{b(this,"l")}static{ee(this,"y")}static{te(this,"s")}static{we(this,"LRUCache")}capacity;cache;keyOrder;constructor(t){this.capacity=t,this.cache=new Map,this.keyOrder=[]}get(t){if(this.cache.has(t))return this.keyOrder=this.keyOrder.filter(i=>i!==t),this.keyOrder.push(t),this.cache.get(t)}has(t){return this.cache.has(t)}set(t,i){if(this.cache.has(t))this.keyOrder=this.keyOrder.filter(s=>s!==t);else if(this.cache.size>=this.capacity){const s=this.keyOrder.shift();s!==void 0&&this.cache.delete(s)}this.cache.set(t,i),this.keyOrder.push(t)}delete(t){this.cache.delete(t),this.keyOrder=this.keyOrder.filter(i=>i!==t)}clear(){this.cache.clear(),this.keyOrder=[]}size(){return this.cache.size}}var Se=Object.defineProperty,Ae=b((e,t)=>Se(e,"name",{value:t,configurable:!0}),"S$1"),Ee=Object.defineProperty,$e=Ae((e,t)=>Ee(e,"name",{value:t,configurable:!0}),"w"),We=Object.defineProperty,$=$e((e,t)=>We(e,"name",{value:t,configurable:!0}),"y");const z=new ke(100),Oe=new Intl.Segmenter("en",{granularity:"grapheme"}),Re=/^[\u0000-\u007F]*$/,Te=new Set(["0","22","23","24","27","28","29","39","49"]),Ce=new Set(["1","3","4","7","8","9"]),U=new Map([["22","1"],["23","3"],["24","4"],["27","7"],["28","8"],["29","9"]]),W=$(e=>e>="30"&&e<="37"||e>="90"&&e<="97"||e.startsWith("38;"),"isForegroundColor"),O=$(e=>e>="40"&&e<="47"||e>="100"&&e<="107"||e.startsWith("48;"),"isBackgroundColor"),Fe=[{close:"\x1B[22m",open:"\x1B[1m"},{close:"\x1B[23m",open:"\x1B[3m"},{close:"\x1B[24m",open:"\x1B[4m"},{close:"\x1B[27m",open:"\x1B[7m"},{close:"\x1B[28m",open:"\x1B[8m"},{close:"\x1B[29m",open:"\x1B[9m"}],Y=$((e,t)=>{let i=-1;for(const s of t){const o=e.indexOf(s);o!==-1&&(i===-1||o<i)&&(i=o)}return i},"findFirstPositionOfAny"),_e=$((e,t)=>{if(!e.includes("\x1B"))return[{after:"",before:"",content:e,visibleLength:B(e,t.width)}];const i=z.get(e);if(i)return i;const s=[],o=[];let n=0,a;for(K.lastIndex=0;(a=K.exec(e))!==null;){const c=a[0];s.push(e.slice(n,a.index)),o.push(c),n=a.index+c.length}n<e.length&&s.push(e.slice(n));const l=[];for(const c of o){if(c==="\x1B[0m"||c==="\x1B]8;;\x07"){l.push(c);continue}if(c.startsWith("\x1B[")&&c.endsWith("m")){const u=c.slice(2,-1);if(Te.has(u)){l.push(c);continue}}}const r=new Set,d=[];for(const[c,u]of s.entries()){if(c>0&&o[c-1]){const p=o[c-1];if(p==="\x1B[0m")r.clear();else if(p==="\x1B]8;;\x07"){for(const f of r)if(f.startsWith("\x1B]8;;")&&!f.endsWith("\x1B]8;;\x07")){r.delete(f);break}}else if(p.startsWith("\x1B[")&&p.endsWith("m")){const f=p.slice(2,-1);if(f==="39"){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(W(g)){r.delete(h);break}}}else if(f==="49"){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(O(g)){r.delete(h);break}}}else if(U.has(f)){const h=U.get(f);for(const g of r)if(g===`\x1B[${h}m`){r.delete(g);break}}else{if(W(f)){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(W(g)){r.delete(h);break}}}else if(O(f)){for(const h of r)if(h.startsWith("\x1B[")&&h.endsWith("m")){const g=h.slice(2,-1);if(O(g)){r.delete(h);break}}}else if(Ce.has(f)){const h=`\x1B[${f}m`;r.has(h)&&r.delete(h)}r.add(p)}}else if(p.startsWith("\x1B]8;;")&&!p.endsWith("\x1B]8;;\x07")){for(const f of r)if(f.startsWith("\x1B]8;;")&&!f.endsWith("\x1B]8;;\x07")){r.delete(f);break}r.add(p)}}if(u==="")continue;let m="";if(r.size>0)if(l.includes("\x1B[0m"))m="\x1B[0m";else{const p=[];let f=!1;for(const v of r)if(v.startsWith("\x1B]8;;")&&!v.endsWith("\x1B]8;;\x07")){f=!0;break}f&&l.includes("\x1B]8;;\x07")&&p.push("\x1B]8;;\x07");let h=!1,g=!1;for(const v of r)if(v.startsWith("\x1B[")&&v.endsWith("m")){const N=v.slice(2,-1);W(N)?h=!0:O(N)&&(g=!0)}if(h&&g){const v=Y(e,["\x1B[3","\x1B[9","\x1B[38;"]),N=Y(e,["\x1B[4","\x1B[10","\x1B[48;"]);v>=0&&N>=0?v>N?p.push("\x1B[39m","\x1B[49m"):p.push("\x1B[49m","\x1B[39m"):p.push("\x1B[39m","\x1B[49m")}else h&&p.push("\x1B[39m"),g&&p.push("\x1B[49m");h&&g&&e.includes("\x1B[39m")&&e.includes("\x1B[49m")&&(e.indexOf("\x1B[39m")<e.indexOf("\x1B[49m")?(p.length-=2,p.push("\x1B[39m","\x1B[49m")):e.indexOf("\x1B[49m")<e.indexOf("\x1B[39m")&&(p.length-=2,p.push("\x1B[49m","\x1B[39m")));const j=Fe.filter(v=>r.has(v.open)).map(v=>({position:e.indexOf(v.open),style:v})).filter(v=>v.position>=0).toSorted((v,N)=>N.position-v.position);for(const v of j){const N=v;l.includes(N.style.close)&&p.push(N.style.close)}m=p.join("")}const x=[...r].join("");d.push({after:m,before:x,content:u,visibleLength:B(u,{fullWidth:1,wideWidth:1})})}return z.set(e,d),d},"processIntoStyledSegments"),je=$((e,t,i,s)=>{const o=[...s.segmenter.segment(e)],n=[];let a=0,l=!1;for(const r of o){const d=B(r.segment,s.width),c=a,u=a+d;if(!l)if(c<t){a=u;continue}else l=!0;if(c>=i||u>i)break;n.push(r.segment),a=u}return n.join("")},"fastSlice"),w=$((e,t=0,i=Number.MAX_SAFE_INTEGER,s={})=>{const o={segmenter:Oe,...s};if(t>=i||e==="")return"";const n=B(e,o.width);if(t===0&&i>=n)return e;if(t<0||i<0)throw new RangeError("Negative indices aren't supported");if(!e.includes("\x1B"))return Re.test(e)?e.slice(t,i):je(e,t,i,o);if(G.lastIndex=0,q.lastIndex=0,!G.test(e)&&!q.test(e))return e;const a=_e(e,o);if(a.length===0)return"";let l=0;const r=[];for(const[u,m]of a.entries()){const x=l,p=l+m.visibleLength;if(p>t&&x<i){const f=Math.max(0,t-x),h=Math.min(m.visibleLength,i-x);r.push({end:h,index:u,segment:m,start:f})}l=p}if(r.length===0)return"";const d=[],c=r[0].segment;d.push(c.before);for(let u=0;u<r.length;u++){const{end:m,segment:x,start:p}=r[u];if(p===0&&m===x.visibleLength)d.push(x.content);else{const f=[...o.segmenter.segment(x.content)];d.push(f.slice(p,m).map(h=>h.segment).join(""))}if(u<r.length-1){const f=r[u+1].segment,h=x.after,g=f.before;h!==g&&(h||g)&&d.push(h,g)}}return d.push(r.at(-1).segment.after),d.join("")},"slice");var Ie=Object.defineProperty,Pe=b((e,t)=>Ie(e,"name",{value:t,configurable:!0}),"x"),Le=Object.defineProperty,De=Pe((e,t)=>Le(e,"name",{value:t,configurable:!0}),"T"),He=Object.defineProperty,_=De((e,t)=>He(e,"name",{value:t,configurable:!0}),"f");const X="…",Me=3,R=_((e,t,i=!1)=>{if(e.charAt(t)===" ")return t;const s=i?1:-1,o=Math.min(Me,i?e.length-t:t);for(let n=1;n<=o;n++){const a=t+n*s;if(e.charAt(a)===" ")return a}return t},"findNearestSpace"),T=_((e,t,i)=>P(e,{...i,ellipsis:"",ellipsisWidth:0,limit:t}).index,"widthToIndex"),C=_((e,t,i)=>B(e.slice(0,t),i),"indexToWidth"),Ve=_((e,t,i={})=>{if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`limit\` to be a number, got ${typeof t}`);if(e===""||t<=0)return"";const s=e.normalize("NFC"),{ellipsis:o=X,position:n="end",preferTruncationOnSpace:a=!1}=i;let l=i.ellipsisWidth??o===X?1:void 0;l??=P(o,{...i.width,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width;const{width:r}=P(s,{...i.width,ellipsis:o,ellipsisWidth:l});if(r<=t)return s;switch(n){case"end":{if(a){const d=t-l,c=T(s,d,i.width),u=R(s,c),m=C(s,u,i.width);return w(s,0,m,{width:i.width})+o}return w(s,0,t-l,{width:i.width})+o}case"middle":{const d=Math.floor(t/2),c=Math.max(0,t-l),u=Math.min(d,c),m=Math.max(0,c-u);if(a){const x=T(s,u,i.width),p=R(s,x),f=C(s,p,i.width),h=r-m,g=T(s,h,i.width),j=R(s,g,!0),v=C(s,j,i.width);return w(s,0,f,{width:i.width})+o+w(s,v,r,{width:i.width}).trim()}return w(s,0,u,{width:i.width})+o+w(s,r-m,r,{width:i.width})}case"start":{if(a){const d=r-t+l,c=T(s,d,i.width),u=R(s,c,!0),m=C(s,u,i.width);return o+w(s,m,r,{width:i.width}).trim()}return o+w(s,r-t+l,r,{width:i.width})}default:throw new Error(`Invalid position: expected 'start', 'middle' or 'end', got '${n}'`)}},"truncate");var Ge=Object.defineProperty,ie=b((e,t)=>Ge(e,"name",{value:t,configurable:!0}),"b"),qe=Object.defineProperty,A=ie((e,t)=>qe(e,"name",{value:t,configurable:!0}),"d"),Ke=Object.defineProperty,ze=A((e,t)=>Ke(e,"name",{value:t,configurable:!0}),"a");const Ue=/\x1B\[(\d+)m/;let se=class{static{b(this,"T")}static{ie(this,"T")}static{A(this,"d")}static{ze(this,"AnsiStateTracker")}activeForeground=void 0;activeBackground=void 0;activeFormatting=[];processEscape(t){const i=Ue.exec(t);if(!i)return;const s=Number.parseInt(i[1],10);switch(s){case 0:{this.activeForeground=void 0,this.activeBackground=void 0,this.activeFormatting=[];break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}default:if(s>=30&&s<=37||s>=90&&s<=97)this.activeForeground=t;else if(s>=40&&s<=47||s>=100&&s<=107)this.activeBackground=t;else if([1,2,3,4,7,8,9].includes(s))this.activeFormatting.push(t);else if([22,23,24,27,28,29].includes(s)){const o={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[s];o&&(this.activeFormatting=this.activeFormatting.filter(n=>!n.includes(o)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const t=[];if(this.activeFormatting.length>0){const i={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].toReversed().forEach(s=>{const o=i[s];o&&t.push(o)})}return this.activeForeground&&t.push("\x1B[39m"),this.activeBackground&&t.push("\x1B[49m"),t.join("")}};var Ye=Object.defineProperty,re=A((e,t)=>Ye(e,"name",{value:t,configurable:!0}),"o");const ne=re((e,t)=>{if(!E.has(e[t]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const i=!0,s=e.slice(t+1,t+1+L.length).join("")===L;return{isInsideEscape:i,isInsideLinkEscape:s}},"checkEscapeSequence"),Xe=re((e,t={})=>{const i=new se;let s="",o=!1,n="",a="",l=!1;const r=[...e];for(let d=0;d<r.length;d++){const c=r[d];if(c&&E.has(c)){if(s){const f=t.getWidth?.(s)??0,h={isEscapeSequence:!1,isGrapheme:!0,text:s,width:f};if(l&&(h.isHyperlink=!0,h.hyperlinkUrl=a),t.onSegment?.(h,i)===!1)return;s=""}o=!0,n=c;const x=ne(r,d),{isInsideLinkEscape:p}=x;if(p){let f=d+1;for(a="";f<r.length;){const g=r[f];if(g===D)break;a+=g,f+=1}a=a.slice(4);const h={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(t.onSegment?.(h,i)===!1)return;d=f,l=!0,o=!1,n="";continue}if(d+1<r.length&&r[d+1]==="\\"&&l){const f={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(t.onSegment?.(f,i)===!1)return;l=!1,a="",d+=1,o=!1,n="";continue}}if(o){if(n!==c&&(n+=c),c===H){o=!1,i.processEscape(n);const x={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};if(t.onSegment?.(x,i)===!1)return;n=""}continue}s+=c;const u=t.getWidth?.(s)??0,m={isEscapeSequence:!1,isGrapheme:!0,text:s,width:u};if(l&&(m.isHyperlink=!0,m.hyperlinkUrl=a),t.onSegment?.(m,i)===!1)return;s=""}if(s){const d=t.getWidth?.(s)??0,c={isEscapeSequence:!1,isGrapheme:!0,text:s,width:d};l&&(c.isHyperlink=!0,c.hyperlinkUrl=a),t.onSegment?.(c,i)}if(n){const d={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};t.onSegment?.(d,i)}},"processAnsiString");var Ze=Object.defineProperty,Je=A((e,t)=>Ze(e,"name",{value:t,configurable:!0}),"t$1");const Z=Je(e=>`${E.values().next().value}${ve}${String(e)}${H}`,"wrapAnsiCode");var Qe=Object.defineProperty,et=A((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"s");const J=et(e=>`${E.values().next().value}${L}${e}${D}`,"wrapAnsiHyperlink");var tt=Object.defineProperty,it=A((e,t)=>tt(e,"name",{value:t,configurable:!0}),"l");const st=it(e=>{if(e.length===0)return"";if(e.length===1)return e[0];let t="",i,s;const o=e.join(`
|
|
2
|
+
`),n=[...o];let a=0;for(const[l,r]of n.entries()){if(t+=r,E.has(r)){const c=ge.exec(o.slice(a))?.groups??{};if(c.code!==void 0){const u=Number.parseFloat(c.code);i=u===ye?void 0:u}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const d=xe.get(Number(i));n[l+1]===`
|
|
3
|
+
`?(s&&(t+=J("")),i&&d&&(t+=Z(d))):r===`
|
|
4
|
+
`&&(i&&d&&(t+=Z(i)),s&&(t+=J(s))),a+=r.length}return t},"preserveAnsi");var rt=Object.defineProperty,k=A((e,t)=>rt(e,"name",{value:t,configurable:!0}),"f");const oe=/(?=\s)|(?<=\s)/,ae=/^\s+$/,I=k(e=>{if(!e.includes("\x1B"))return e;let t=e;return e.includes("\x1B[30m")&&(t+="\x1B[39m"),e.includes("\x1B[42m")&&(t+="\x1B[49m"),t},"resetAnsiAtLineBreak"),S=k(e=>{const t=e.split(" ");let i=t.length;for(;i>0&&B(t[i-1])===0;)i--;return i===t.length?e:t.slice(0,i).join(" ")+t.slice(i).join("")},"stringVisibleTrimSpacesRight"),ce=k((e,t,i)=>{if(e.length===0)return[""];if(t<=0)return[e];const s=[],o=new se;let n="",a=0,l=!1,r=!1,d="",c=0;for(;c<e.length;){const u=e[c];if(E.has(u)){l=!0,d=u,n+=u,r=ne([...e],c).isInsideLinkEscape,c+=1;continue}if(l){d+=u,n+=u,r?u===D&&(l=r=!1):u===H&&(l=!1,o.processEscape(d)),c+=1;continue}const m=B(u),x=u===" ";if(m===0){n+=u,c+=1;continue}if(a+m>t&&(n&&s.push(n+o.getEndEscapesForAllActiveAttributes()),n=o.getStartEscapesForAllActiveAttributes(),a=B(n),x&&i)){for(;c<e.length&&e[c]===" ";)c+=1;continue}if(n+=u,a+=m,a===t&&c<e.length-1&&(s.push(n+o.getEndEscapesForAllActiveAttributes()),n=o.getStartEscapesForAllActiveAttributes(),a=B(n),c+1<e.length&&e[c+1]===" "&&i)){for(c+=1;c<e.length&&e[c]===" ";)c+=1;continue}c+=1}return n&&s.push(n+o.getEndEscapesForAllActiveAttributes()),i?s.map(u=>S(u)):s},"wrapWithBreakAtWidth"),nt=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=[];let n="",a=0;return Xe(s,{getWidth:B,onSegment:k((l,r)=>{const d=l.text??"";if(l.isEscapeSequence)n+=d;else{const c=d===" ";if(l.width===0)return n+=d,!0;if(a+l.width>t&&(n&&o.push(n),n=r.getStartEscapesForAllActiveAttributes(),a=0,c))return i||o.push(r.getStartEscapesForAllActiveAttributes()+d),!0;n+=d,a+=l.width}return!0},"onSegment")}),n&&o.push(n),i?o.map(l=>S(l)):o},"wrapCharByChar"),ot=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=s.split(oe),n=[];let a="",l=0,r=0;for(;r<o.length;){const d=o[r],c=ae.test(d),u=B(d);if(d.length===0){r+=1;continue}if(i&&c&&l===0){r+=1;continue}if(l+u>t&&l>0){i?n.push(S(a)):n.push(a),a="",l=0;continue}a+=d,l+=u,r+=1}return a&&(i?n.push(S(a)):n.push(a)),n},"wrapWithWordBoundaries"),at=k((e,t,i)=>{if(e.length===0)return[];const s=i?e.trim():e;if(s.length===0)return[];const o=s.split(oe),n=[];let a="",l=0,r=0;for(;r<o.length;){const d=o[r],c=ae.test(d),u=B(d);if(d.length===0){r+=1;continue}if(i&&c&&l===0){r+=1;continue}if(u>t){a&&n.push(I(i?S(a):a));const m=ce(d,t,i);if(m.length>0){for(let x=0;x<m.length-1;x+=1)n.push(m[x]);a=m.at(-1),l=B(a)}else a="",l=0;r+=1;continue}if(l+u>t&&l>0&&(n.push(I(i?S(a):a)),a="",l=0,i&&c)){r+=1;continue}a+=d,l+=u,r+=1}return a&&n.push(I(i?S(a):a)),n},"wrapAndBreakWords"),F={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},ct=k((e,t={})=>{const{removeZeroWidthCharacters:i=!0,trim:s=!0,width:o=80,wrapMode:n=F.PRESERVE_WORDS}=t;if(s&&e.trim()==="")return"";let a=e.normalize("NFC").replaceAll(`\r
|
|
5
|
+
`,`
|
|
6
|
+
`);return i&&(a=a.replaceAll(me,"")),a.split(`
|
|
7
|
+
`).map(l=>{if(s&&l.trim()==="")return"";let r;switch(n){case F.BREAK_AT_CHARACTERS:{r=nt(l,o,s);break}case F.BREAK_WORDS:{r=at(l,o,s);break}case F.STRICT_WIDTH:{r=ce(l,o,s);break}default:r=ot(l,o,s)}return st(r)}).join(`
|
|
8
|
+
`)},"wordWrap");var lt=Object.defineProperty,dt=b((e,t)=>lt(e,"name",{value:t,configurable:!0}),"R");const Q={},ut={hard:"STRICT_WIDTH",wrap:"BREAK_WORDS","wrap-anywhere":"BREAK_AT_CHARACTERS","wrap-preserve-words":"PRESERVE_WORDS","wrap-strict":"STRICT_WIDTH"},ht=dt((e,t,i)=>{const s=e+String(t)+String(i),o=Q[s];if(o)return o;let n=e;const a=ut[i];if(a)n=ct(e,{trim:!1,width:t,wrapMode:a}).replace(/\n$/,"");else if(i.startsWith("truncate")){let l="end";i==="truncate-middle"&&(l="middle"),i==="truncate-start"&&(l="start"),n=Ve(e,t,{position:l})}return Q[s]=n,n},"wrapText");var ft=Object.defineProperty,y=b((e,t)=>ft(e,"name",{value:t,configurable:!0}),"n");let pt=0;const wt=y(e=>{const t={attributes:{},childNodes:[],internal_accessibility:{},internal_id:pt++,nodeName:e,parentNode:void 0,style:{},yogaNode:e==="ink-virtual-text"||e==="ink-cursor"?void 0:fe.Node.create()};return e==="ink-text"&&t.yogaNode?.setMeasureFunc(mt.bind(null,t)),t},"createNode"),M=y(e=>{ue(e.nodeName==="ink-static-render"&&e.cachedRender?e.parentNode:e)},"markNodeAndParentIfStaticAsDirty"),kt=y((e,t)=>{t.parentNode&&le(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),M(e)},"appendChildNode"),St=y((e,t,i)=>{t.parentNode&&le(t.parentNode,t),t.parentNode=e;const s=e.childNodes.indexOf(i);if(s===-1)e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount());else if(e.childNodes.splice(s,0,t),t.yogaNode){const o=e.childNodes.slice(0,s).filter(n=>!!n.yogaNode).length;e.yogaNode?.insertChild(t.yogaNode,o)}M(e)},"insertBeforeNode"),le=y((e,t)=>{if(t.yogaNode){const s=t.yogaNode.getParent();s&&s.removeChild(t.yogaNode)}t.parentNode=void 0;const i=e.childNodes.indexOf(t);i!==-1&&e.childNodes.splice(i,1),M(e)},"removeChildNode"),At=y((e,t,i)=>{if(t==="internal_accessibility"){e.internal_accessibility=i;return}e.attributes[t]=i},"setAttribute"),Et=y((e,t)=>{e.style=t??{}},"setStyle"),$t=y(e=>{const t={nodeName:"#text",nodeValue:e,parentNode:void 0,style:{},yogaNode:void 0};return gt(t,e),t},"createTextNode"),mt=y(function(e,t){const i=e.nodeName==="#text"?e.nodeValue:pe(e),s=V(i);if(s.width<=t||s.width>=1&&t>0&&t<1)return s;const o=e.style?.textWrap??"wrap",n=ht(i,Math.floor(t),o);return V(n)},"measureTextNode"),de=y(e=>{if(e?.parentNode)return e.yogaNode??de(e.parentNode)},"findClosestYogaNode"),ue=y(e=>{(e?.nodeName==="#text"||e?.nodeName==="ink-text"||e?.nodeName==="ink-virtual-text")&&de(e)?.markDirty();let t=e;for(;t;){if((t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&(t.internal_textCache=void 0),"childNodes"in t){if(t!==e&&t.nodeName==="ink-static-render"&&t.cachedRender)break;t.cachedRender=void 0}t=t.parentNode}},"markNodeAsDirty"),gt=y((e,t)=>{typeof t!="string"&&(t=String(t)),e.nodeValue=t,ue(e)},"setTextNodeValue"),Wt=y((e,t)=>e.nodeName!=="ink-root"?()=>{}:(e.internal_layoutListeners??=new Set,e.internal_layoutListeners.add(t),()=>{e.internal_layoutListeners?.delete(t)}),"addLayoutListener"),Ot=y(e=>{if(!(e.nodeName!=="ink-root"||!e.internal_layoutListeners))for(const t of e.internal_layoutListeners)t()},"emitLayoutListeners"),Rt=y((e,t)=>{if(e.cachedRender=t,e.yogaNode){for(e.yogaNode.setWidth(t.width),e.yogaNode.setHeight(t.height);e.yogaNode.getChildCount()>0;)e.yogaNode.removeChild(e.yogaNode.getChild(0));e.isYogaTreeDetached=!0}},"setCachedRender"),Tt=y(e=>{const t=[];let i=e;for(;i;)t.unshift(i),i=i.parentNode;return t},"getPathToRoot"),Ct=y(e=>{let t=e;for(;t;){const{userSelect:i}=t.style;if(i==="none")return!1;if(i==="text"||i==="all")return!0;t=t.parentNode}return!0},"isNodeSelectable");export{ht as T,Wt as a,St as b,wt as c,kt as d,Ot as e,$t as f,Tt as g,Et as h,Ct as i,At as j,ct as k,Rt as l,ue as m,le as r,gt as s};
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { Node } from 'yoga-layout';
|
|
2
|
+
import { C as CursorShape } from "./cursor-helpers.d-BONB9tky.js";
|
|
3
|
+
import { S as Styles } from "./styles.d-CLJdt-kg.js";
|
|
4
|
+
type StyleSpan = {
|
|
5
|
+
bgColor?: string;
|
|
6
|
+
fgColor?: string;
|
|
7
|
+
formatFlags: number;
|
|
8
|
+
length: number;
|
|
9
|
+
link?: string;
|
|
10
|
+
};
|
|
11
|
+
declare class StyledLine {
|
|
12
|
+
length: number;
|
|
13
|
+
private static readonly emptyCache;
|
|
14
|
+
private text;
|
|
15
|
+
private charData;
|
|
16
|
+
private spans;
|
|
17
|
+
private _cachedTrimmedLength?;
|
|
18
|
+
static empty(length: number): StyledLine;
|
|
19
|
+
getValue(index: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get the raw text for a range of characters as a single string slice.
|
|
22
|
+
* Much faster than calling getValue() per character.
|
|
23
|
+
*/
|
|
24
|
+
getTextRange(start: number, end: number): string;
|
|
25
|
+
getSpan(index: number): StyleSpan | undefined;
|
|
26
|
+
getFullWidth(index: number): boolean;
|
|
27
|
+
hasStyles(index: number): boolean;
|
|
28
|
+
getFormatFlags(index: number): number;
|
|
29
|
+
getFgColor(index: number): string | undefined;
|
|
30
|
+
getBgColor(index: number): string | undefined;
|
|
31
|
+
getLink(index: number): string | undefined;
|
|
32
|
+
setInverted(index: number, inverted: boolean): void;
|
|
33
|
+
setBackgroundColor(index: number, color: string | undefined): void;
|
|
34
|
+
setForegroundColor(index: number, color: string | undefined): void;
|
|
35
|
+
setChar(index: number, value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Optimized setChar for same-length single-byte replacement.
|
|
38
|
+
* Skips string rebuild and offset adjustment when old and new values
|
|
39
|
+
* have the same byte length (the common case for ASCII overwrites on empty lines).
|
|
40
|
+
*/
|
|
41
|
+
setCharFast(index: number, value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Overwrite a range of this line with content from a source StyledLine.
|
|
44
|
+
* More efficient than calling setChar() per character because it does
|
|
45
|
+
* a single span split + rebuild instead of per-character span manipulation.
|
|
46
|
+
* @param destinationStart — start index in this line
|
|
47
|
+
* @param source — the StyledLine to copy from
|
|
48
|
+
* @param srcStart — start index in source (default 0)
|
|
49
|
+
* @param count — number of characters to copy (default: source.length)
|
|
50
|
+
*/
|
|
51
|
+
writeFrom(destinationStart: number, source: StyledLine, srcStart?: number, count?: number): void;
|
|
52
|
+
pushChar(value: string, formatFlags: number, fgColor?: string, bgColor?: string, link?: string): void;
|
|
53
|
+
clone(): StyledLine;
|
|
54
|
+
slice(start: number, end?: number): StyledLine;
|
|
55
|
+
combine(...others: StyledLine[]): StyledLine;
|
|
56
|
+
getTrimmedLength(): number;
|
|
57
|
+
trimEnd(): StyledLine;
|
|
58
|
+
equals(other: StyledLine): boolean;
|
|
59
|
+
getText(): string;
|
|
60
|
+
getSpans(): StyleSpan[];
|
|
61
|
+
getValues(): string[];
|
|
62
|
+
[Symbol.iterator](): Iterator<{
|
|
63
|
+
bgColor?: string;
|
|
64
|
+
fgColor?: string;
|
|
65
|
+
formatFlags: number;
|
|
66
|
+
fullWidth: boolean;
|
|
67
|
+
hasStyles: boolean;
|
|
68
|
+
link?: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Split the span at `index` into a single-char span, apply the updater,
|
|
73
|
+
* then merge adjacent spans. Shared by setInverted/setBackgroundColor/setForegroundColor.
|
|
74
|
+
*/
|
|
75
|
+
private updateSpanAt;
|
|
76
|
+
/**
|
|
77
|
+
* Grow the line to at least `minWidth` columns, filling new cells with
|
|
78
|
+
* empty strings (zero-width placeholders). This matches the behavior of
|
|
79
|
+
* sparse JS arrays in the original ink Output where out-of-bounds writes
|
|
80
|
+
* created gaps that produced no visible output.
|
|
81
|
+
*/
|
|
82
|
+
ensureWidth(minWidth: number): void;
|
|
83
|
+
private ensureInitialized;
|
|
84
|
+
private splitSpansAt;
|
|
85
|
+
/**
|
|
86
|
+
* Try to apply a single-char style at `index` by matching or merging
|
|
87
|
+
* with an adjacent span, avoiding splitSpansAt + mergeSpans.
|
|
88
|
+
*
|
|
89
|
+
* Returns true if the style was applied (or was already correct),
|
|
90
|
+
* false if the caller must fall through to the split/update/merge path.
|
|
91
|
+
*
|
|
92
|
+
* Ported from jacob314/ink PR #123 (Google LLC, Apache-2.0).
|
|
93
|
+
*/
|
|
94
|
+
private trySetStyleAtIndex;
|
|
95
|
+
private mergeSpans;
|
|
96
|
+
}
|
|
97
|
+
type Region = {
|
|
98
|
+
backgroundColor?: string;
|
|
99
|
+
borderBottom?: number;
|
|
100
|
+
borderTop?: number;
|
|
101
|
+
cachedStickyHeaders?: StickyHeader$1[]; /** Child regions (nested content areas) */
|
|
102
|
+
children: Region[];
|
|
103
|
+
/** Cursor position within this region */
|
|
104
|
+
cursorPosition?: {
|
|
105
|
+
col: number;
|
|
106
|
+
row: number;
|
|
107
|
+
};
|
|
108
|
+
height: number; /** Unique identifier for this region (used for dirty tracking) */
|
|
109
|
+
id: number | string;
|
|
110
|
+
isHorizontallyScrollable?: boolean; /** Whether this region supports scrolling */
|
|
111
|
+
isScrollable: boolean;
|
|
112
|
+
isVerticallyScrollable?: boolean; /** Content buffer — StyledLine per row, relative to (0,0) of this region */
|
|
113
|
+
readonly lines: ReadonlyArray<StyledLine>;
|
|
114
|
+
marginBottom?: number;
|
|
115
|
+
marginRight?: number; /** DOM node reference for debugging/caching */
|
|
116
|
+
nodeId?: number;
|
|
117
|
+
opaque?: boolean; /** Layout properties */
|
|
118
|
+
overflowToBackbuffer?: boolean;
|
|
119
|
+
scrollbarThumbColor?: string;
|
|
120
|
+
scrollbarVisible?: boolean;
|
|
121
|
+
scrollHeight?: number;
|
|
122
|
+
scrollLeft?: number; /** Scroll state */
|
|
123
|
+
scrollTop?: number;
|
|
124
|
+
scrollWidth?: number; /** Selectable text spans for text selection */
|
|
125
|
+
selectableSpans: SelectableSpan[];
|
|
126
|
+
selectableText?: string; /** Whether the scrollback position is stable */
|
|
127
|
+
stableScrollback?: boolean;
|
|
128
|
+
/** Sticky headers for this region */
|
|
129
|
+
stickyHeaders: StickyHeader$1[];
|
|
130
|
+
/** Trimmed output (trailing spaces removed) for final rendering */
|
|
131
|
+
readonly styledOutput: ReadonlyArray<StyledLine>;
|
|
132
|
+
/** Dimensions */
|
|
133
|
+
width: number;
|
|
134
|
+
/** Position relative to parent region */
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
};
|
|
138
|
+
type SelectableSpan = {
|
|
139
|
+
endX: number;
|
|
140
|
+
startX: number;
|
|
141
|
+
text: string;
|
|
142
|
+
y: number;
|
|
143
|
+
};
|
|
144
|
+
type StickyHeader$1 = {
|
|
145
|
+
/** Lines in the natural (scrolling) position */
|
|
146
|
+
lines: ReadonlyArray<StyledLine>;
|
|
147
|
+
/** Height of the header in lines */
|
|
148
|
+
maxHeaderHeight: number;
|
|
149
|
+
/** Natural row offset relative to content start */
|
|
150
|
+
naturalRow: number;
|
|
151
|
+
/** Node ID for identification */
|
|
152
|
+
nodeId: number;
|
|
153
|
+
/** Lines in the stuck (fixed) position */
|
|
154
|
+
stuckLines?: ReadonlyArray<StyledLine>;
|
|
155
|
+
/** Stuck X position relative to region */
|
|
156
|
+
x: number;
|
|
157
|
+
/** Stuck Y position relative to region */
|
|
158
|
+
y: number;
|
|
159
|
+
};
|
|
160
|
+
type OutputTransformer = (s: string, index: number) => string;
|
|
161
|
+
type ResizeObserverCallback = (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;
|
|
162
|
+
declare class ResizeObserverEntry {
|
|
163
|
+
readonly target: DOMElement;
|
|
164
|
+
readonly contentRect: Readonly<{
|
|
165
|
+
height: number;
|
|
166
|
+
width: number;
|
|
167
|
+
}>;
|
|
168
|
+
constructor(target: DOMElement, contentRect: Readonly<{
|
|
169
|
+
height: number;
|
|
170
|
+
width: number;
|
|
171
|
+
}>);
|
|
172
|
+
}
|
|
173
|
+
declare class ResizeObserver {
|
|
174
|
+
private readonly callback;
|
|
175
|
+
private readonly observedElements;
|
|
176
|
+
constructor(callback: ResizeObserverCallback);
|
|
177
|
+
observe(element: DOMElement): void;
|
|
178
|
+
unobserve(element: DOMElement): void;
|
|
179
|
+
disconnect(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Internal method called by the layout engine after computing layout.
|
|
182
|
+
*/
|
|
183
|
+
internalTrigger(entries: ResizeObserverEntry[]): void;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Measure a node and collect resize observer entries for it.
|
|
187
|
+
* Used by both the main render loop and static render processing.
|
|
188
|
+
*/
|
|
189
|
+
type ScrollState = {
|
|
190
|
+
actualScrollHeight: number;
|
|
191
|
+
clientHeight: number;
|
|
192
|
+
clientWidth: number;
|
|
193
|
+
scrollHeight: number;
|
|
194
|
+
scrollLeft: number;
|
|
195
|
+
scrollTop: number;
|
|
196
|
+
scrollWidth: number;
|
|
197
|
+
};
|
|
198
|
+
declare const getScrollHeight: (node: DOMElement) => number;
|
|
199
|
+
declare const getScrollWidth: (node: DOMElement) => number;
|
|
200
|
+
declare const calculateScroll: (node: DOMElement) => void;
|
|
201
|
+
/**
|
|
202
|
+
* Get the effective scroll top position from the pre-computed scroll state.
|
|
203
|
+
* Falls back to computing from style if scroll state hasn't been calculated yet.
|
|
204
|
+
*/
|
|
205
|
+
declare const getScrollTop: (node: DOMElement) => number;
|
|
206
|
+
/**
|
|
207
|
+
* Get the effective scroll left position from the pre-computed scroll state.
|
|
208
|
+
* Falls back to computing from style if scroll state hasn't been calculated yet.
|
|
209
|
+
*/
|
|
210
|
+
declare const getScrollLeft: (node: DOMElement) => number;
|
|
211
|
+
type InkNode = {
|
|
212
|
+
internal_static?: boolean;
|
|
213
|
+
parentNode: DOMElement | undefined;
|
|
214
|
+
style: Styles;
|
|
215
|
+
yogaNode?: Node;
|
|
216
|
+
};
|
|
217
|
+
type LayoutListener = () => void;
|
|
218
|
+
type TextName = "#text";
|
|
219
|
+
type ElementNames = "ink-root" | "ink-box" | "ink-text" | "ink-cursor" | "ink-virtual-text" | "ink-static-render";
|
|
220
|
+
/**
|
|
221
|
+
* Describes a sticky header that should be composited on top of scrolled content.
|
|
222
|
+
* Ported from jacob314/ink fork (Google LLC, Apache-2.0).
|
|
223
|
+
*/
|
|
224
|
+
type StickyHeader = {
|
|
225
|
+
/** Content-relative end row. */
|
|
226
|
+
endRow: number;
|
|
227
|
+
/** Height in rows. */
|
|
228
|
+
height?: number;
|
|
229
|
+
/** If true, natural 'lines' are already in background content. */
|
|
230
|
+
isStuckOnly: boolean;
|
|
231
|
+
/** Lines rendered in the natural (scrolling) position. */
|
|
232
|
+
lines: ReadonlyArray<StyledLine>;
|
|
233
|
+
/** Natural row offset relative to content start. */
|
|
234
|
+
naturalRow: number;
|
|
235
|
+
/** Reference to the DOM node for this header. */
|
|
236
|
+
node?: DOMElement;
|
|
237
|
+
/** Unique ID of the sticky node. */
|
|
238
|
+
nodeId: number;
|
|
239
|
+
/** ID of the scroll container this header belongs to. */
|
|
240
|
+
scrollContainerId: number | string;
|
|
241
|
+
/** Content-relative start row. */
|
|
242
|
+
startRow: number;
|
|
243
|
+
/** Lines rendered in the stuck (pinned) position, if different. */
|
|
244
|
+
stuckLines?: ReadonlyArray<StyledLine>;
|
|
245
|
+
/** Sticky type: top-pinned or bottom-pinned. */
|
|
246
|
+
type?: "top" | "bottom";
|
|
247
|
+
/** Stuck X position relative to region. */
|
|
248
|
+
x: number;
|
|
249
|
+
/** Stuck Y position relative to region. */
|
|
250
|
+
y: number;
|
|
251
|
+
};
|
|
252
|
+
type NodeNames = ElementNames | TextName;
|
|
253
|
+
type CursorAnchorRef = {
|
|
254
|
+
readonly current: DOMElement | undefined | null;
|
|
255
|
+
};
|
|
256
|
+
type CursorMarker = {
|
|
257
|
+
anchorRef?: CursorAnchorRef;
|
|
258
|
+
inline?: boolean;
|
|
259
|
+
shape?: CursorShape;
|
|
260
|
+
x: number;
|
|
261
|
+
y: number;
|
|
262
|
+
};
|
|
263
|
+
type DOMElement = InkNode & {
|
|
264
|
+
attributes: Record<string, DOMNodeAttribute>;
|
|
265
|
+
/**
|
|
266
|
+
* Cached render result (a Region). When set, the entire subtree is
|
|
267
|
+
* skipped during rendering and the cached region is composited directly.
|
|
268
|
+
* Set by setCachedRender(), cleared on unmount by cleanupNodeTree().
|
|
269
|
+
*/
|
|
270
|
+
cachedRender?: Region;
|
|
271
|
+
childNodes: DOMNode[];
|
|
272
|
+
internal_accessibility?: {
|
|
273
|
+
role?: "button" | "checkbox" | "combobox" | "list" | "listbox" | "listitem" | "menu" | "menuitem" | "option" | "progressbar" | "radio" | "radiogroup" | "tab" | "tablist" | "table" | "textbox" | "timer" | "toolbar";
|
|
274
|
+
state?: {
|
|
275
|
+
busy?: boolean;
|
|
276
|
+
checked?: boolean;
|
|
277
|
+
disabled?: boolean;
|
|
278
|
+
expanded?: boolean;
|
|
279
|
+
multiline?: boolean;
|
|
280
|
+
multiselectable?: boolean;
|
|
281
|
+
readonly?: boolean;
|
|
282
|
+
required?: boolean;
|
|
283
|
+
selected?: boolean;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
internal_cursor?: CursorMarker;
|
|
287
|
+
internal_hidden?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Auto-incrementing unique identifier for this node.
|
|
290
|
+
*/
|
|
291
|
+
internal_id: number;
|
|
292
|
+
/**
|
|
293
|
+
* Whether this element's scrollback buffer is dirty (needs recalculation).
|
|
294
|
+
*/
|
|
295
|
+
internal_isScrollbackDirty?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Last measured size for ResizeObserver tracking.
|
|
298
|
+
*/
|
|
299
|
+
internal_lastMeasuredSize?: {
|
|
300
|
+
height: number;
|
|
301
|
+
width: number;
|
|
302
|
+
};
|
|
303
|
+
internal_layoutListeners?: Set<LayoutListener>;
|
|
304
|
+
/**
|
|
305
|
+
* Highest scrollTop whose scrolled-off lines have already been flushed
|
|
306
|
+
* into the terminal's real scrollback history. Monotonic; used by the
|
|
307
|
+
* `overflowToBackbuffer` emission path so a given line is pushed exactly
|
|
308
|
+
* once and scrolling back up never re-emits.
|
|
309
|
+
*/
|
|
310
|
+
internal_maxPushedScrollTop?: number;
|
|
311
|
+
/**
|
|
312
|
+
* Maximum scrollTop ever reached, used with stableScrollback.
|
|
313
|
+
*/
|
|
314
|
+
internal_maxScrollTop?: number;
|
|
315
|
+
/**
|
|
316
|
+
* Callback invoked after prepareYogaTree() caches the render output for
|
|
317
|
+
* an ink-static-render node. StaticRender uses this to set `isRendered`
|
|
318
|
+
* state, which prevents React from re-reconciling children once cached.
|
|
319
|
+
*/
|
|
320
|
+
internal_onRendered?: () => void;
|
|
321
|
+
/**
|
|
322
|
+
* Whether this element is opaque (prevents rendering of covered content beneath it).
|
|
323
|
+
*/
|
|
324
|
+
internal_opaque?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Whether the scrollbar should be rendered for this scrollable element.
|
|
327
|
+
* Defaults to true for elements with overflow: 'scroll'.
|
|
328
|
+
*/
|
|
329
|
+
internal_scrollbar?: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Scroll state computed by calculateScroll() for elements with overflow: 'scroll'.
|
|
332
|
+
*/
|
|
333
|
+
internal_scrollState?: ScrollState;
|
|
334
|
+
/**
|
|
335
|
+
* Whether this element is sticky (pinned during scroll).
|
|
336
|
+
* - `true` or `'top'`: pinned to the top of the scroll container
|
|
337
|
+
* - `'bottom'`: pinned to the bottom of the scroll container
|
|
338
|
+
*/
|
|
339
|
+
internal_sticky?: boolean | "top" | "bottom";
|
|
340
|
+
/**
|
|
341
|
+
* Whether this element is the alternate (stuck) version of a sticky header.
|
|
342
|
+
* The stuck version is rendered when the header is pinned.
|
|
343
|
+
*/
|
|
344
|
+
internal_stickyAlternate?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Whether this element should receive the terminal cursor focus.
|
|
347
|
+
*/
|
|
348
|
+
internal_terminalCursorFocus?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Terminal cursor position offset within this element.
|
|
351
|
+
*/
|
|
352
|
+
internal_terminalCursorPosition?: number;
|
|
353
|
+
/**
|
|
354
|
+
* Cached text squash result for this node's subtree.
|
|
355
|
+
* Invalidated by markNodeAsDirty() when children change.
|
|
356
|
+
*/
|
|
357
|
+
internal_textCache?: {
|
|
358
|
+
map: Map<DOMNode, {
|
|
359
|
+
end: number;
|
|
360
|
+
start: number;
|
|
361
|
+
}>;
|
|
362
|
+
text: string;
|
|
363
|
+
};
|
|
364
|
+
internal_transform?: OutputTransformer;
|
|
365
|
+
isStaticDirty?: boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Whether the Yoga subtree has been detached (children removed from Yoga layout)
|
|
368
|
+
* because a cachedRender was set. When cachedRender is invalidated,
|
|
369
|
+
* prepareYogaTree() re-attaches the children before the next layout pass.
|
|
370
|
+
*/
|
|
371
|
+
isYogaTreeDetached?: boolean;
|
|
372
|
+
nodeName: ElementNames;
|
|
373
|
+
onComputeLayout?: () => void;
|
|
374
|
+
onImmediateRender?: () => void;
|
|
375
|
+
onRender?: () => void;
|
|
376
|
+
onStaticChange?: () => void;
|
|
377
|
+
/**
|
|
378
|
+
* Tracks the previous commit's `staticNode` so the reconciler can detect identity changes
|
|
379
|
+
* (first mount, last unmount, key-driven remount) and reset accumulated `fullStaticOutput`.
|
|
380
|
+
*/
|
|
381
|
+
previousStaticNode?: DOMElement;
|
|
382
|
+
/**
|
|
383
|
+
* Set of ResizeObservers attached to this element.
|
|
384
|
+
*/
|
|
385
|
+
resizeObservers?: Set<ResizeObserver>;
|
|
386
|
+
staticNode?: DOMElement;
|
|
387
|
+
};
|
|
388
|
+
type TextNode = InkNode & {
|
|
389
|
+
nodeName: TextName;
|
|
390
|
+
nodeValue: string;
|
|
391
|
+
};
|
|
392
|
+
type DOMNode<T = {
|
|
393
|
+
nodeName: NodeNames;
|
|
394
|
+
}> = T extends {
|
|
395
|
+
nodeName: infer U;
|
|
396
|
+
} ? U extends "#text" ? TextNode : DOMElement : never;
|
|
397
|
+
type DOMNodeAttribute = boolean | string | number;
|
|
398
|
+
/**
|
|
399
|
+
* Get the path from the root to this node (inclusive).
|
|
400
|
+
* Returns an array starting with the root and ending with the node.
|
|
401
|
+
*
|
|
402
|
+
* Ported from jacob314/ink fork (Google LLC, Apache-2.0).
|
|
403
|
+
*/
|
|
404
|
+
declare const getPathToRoot: (node: DOMNode) => DOMNode[];
|
|
405
|
+
/**
|
|
406
|
+
* Check if a node is selectable by walking up the tree checking `userSelect` style.
|
|
407
|
+
* Returns true by default unless an ancestor has `userSelect: 'none'`.
|
|
408
|
+
*
|
|
409
|
+
* Ported from jacob314/ink fork (Google LLC, Apache-2.0).
|
|
410
|
+
*/
|
|
411
|
+
declare const isNodeSelectable: (node: DOMElement) => boolean;
|
|
412
|
+
export { DOMElement as D, ResizeObserver as R, StyledLine as S, DOMNode as a, ResizeObserverCallback as b, ResizeObserverEntry as c, ScrollState as d, StickyHeader as e, calculateScroll as f, getPathToRoot as g, getScrollHeight as h, getScrollLeft as i, getScrollTop as j, getScrollWidth as k, isNodeSelectable as l };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l=Object.defineProperty;var c=(r,e)=>l(r,"name",{value:e,configurable:!0});import{a as n,o as s}from"./constants-D12jy2Zh-RSfxu1eM.js";var g=Object.defineProperty,u=c((r,e)=>g(r,"name",{value:e,configurable:!0}),"t"),S=Object.defineProperty,d=u((r,e)=>S(r,"name",{value:e,configurable:!0}),"t");const b=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,v=/^(?:msys|cygwin)$/,H=!b&&(process.platform==="win32"||v.test(process.env.OSTYPE));var B=Object.defineProperty,t=d((r,e)=>B(r,"name",{value:e,configurable:!0}),"n");const U=`${n}6n`,f=t((r=1)=>`${n}${String(r)}D`,"cursorBackward"),C=t((r=1)=>`${n}${String(r)}B`,"cursorDown");t((r=1)=>`${n}${String(r)}C`,"cursorForward");const F=`${n}?25l`,y=`${n}G`;t((r=1)=>f(r),"cursorLeft");const T=t((r=1)=>`${n}${String(r)}G`,"cursorHorizontalAbsolute");t((r,e)=>{let o="";return r<0?o+=`${n}${String(-r)}D`:r>0&&(o+=`${n}${String(r)}C`),e<0?o+=`${n}${String(-e)}A`:e>0&&(o+=`${n}${String(e)}B`),o},"cursorMove");const z=t((r=1)=>`${n}${String(r)}E`,"cursorNextLine");t((r=1)=>`${n}${String(r)}F`,"cursorPreviousLine");const G=`${n}?25h`,x=t((r,e)=>e===void 0?T(r+1):`${n}${String(e+1)}${s}${String(r+1)}H`,"cursorTo"),I=t((r,e)=>e===void 0?`${n}${String(r)}H`:`${n}${String(r)}${s}${String(e)}H`,"cursorPosition");t((r=1)=>`${n}${String(r)}I`,"cursorHorizontalForwardTab");t((r=1)=>`${n}${String(r)}Z`,"cursorBackwardTab");t((r=1)=>`${n}${String(r)}X`,"eraseCharacter");t((r=1)=>`${n}${String(r)}d`,"cursorVerticalAbsolute");const p=t((r=1)=>`${n}${String(r)}A`,"cursorUp");var k=(r=>(r[r.Default=0]="Default",r[r.BlinkingBlock=1]="BlinkingBlock",r[r.SteadyBlock=2]="SteadyBlock",r[r.BlinkingUnderline=3]="BlinkingUnderline",r[r.SteadyUnderline=4]="SteadyUnderline",r[r.BlinkingBar=5]="BlinkingBar",r[r.SteadyBar=6]="SteadyBar",r))(k||{});const N=t(r=>`${n}${String(r)} q`,"setCursorStyle");var E=Object.defineProperty,m=c((r,e)=>E(r,"name",{value:e,configurable:!0}),"o"),w=Object.defineProperty,P=m((r,e)=>w(r,"name",{value:e,configurable:!0}),"s"),j=Object.defineProperty,$=P((r,e)=>j(r,"name",{value:e,configurable:!0}),"o"),L=(r=>(r[r.ToEnd=0]="ToEnd",r[r.ToBeginning=1]="ToBeginning",r[r.EntireScreen=2]="EntireScreen",r[r.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",r))(L||{});const i=$(r=>{const e=r>=0&&r<=3?r:0;return`${n}${e===0?"":String(e)}J`},"eraseDisplay");var O=(r=>(r[r.ToEnd=0]="ToEnd",r[r.ToBeginning=1]="ToBeginning",r[r.EntireLine=2]="EntireLine",r))(O||{});const a=$(r=>{const e=r>=0&&r<=2?r:0;return`${n}${e===0?"":String(e)}K`},"eraseInLine");i(0);const h=a(2),V=a(0);a(1);const q=$(r=>{if(r<=0)return"";let e="";for(let o=0;o<r;o+=1)e+=h,o<r-1&&(e+=p());return e+=y,e},"eraseLines");i(2);i(1);i(3);export{h as E,x as F,I as G,y as H,p as N,F as P,U as T,N as V,a,H as b,L as c,q as d,z as e,V as f,C as h,O as l,i as r,G as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e}from"react";const o=e({activate(){},activeId:void 0,add(){},deactivate(){},disableFocus(){},enableFocus(){},focus(){},focusNext(){},focusPrevious(){},remove(){}});o.displayName="InternalFocusContext";export{o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var r=(a,t)=>i(a,"name",{value:t,configurable:!0});var S=Object.defineProperty,f=r((a,t)=>S(a,"name",{value:t,configurable:!0}),"S");function p(a){const t=Math.max(0,Math.floor(a/1e3)),o=Math.floor(t/3600),n=Math.floor(t%3600/60),e=t%60;return o>0?`${String(o).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(e).padStart(2,"0")}`:`${String(n).padStart(2,"0")}:${String(e).padStart(2,"0")}`}r(p,"formatDuration");f(p,"formatDuration");export{p as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var X=Object.defineProperty;var h=(e,i)=>X(e,"name",{value:i,configurable:!0});var e1=Object.defineProperty,C=h((e,i)=>e1(e,"name",{value:i,configurable:!0}),"u$1"),i1=Object.defineProperty,y=C((e,i)=>i1(e,"name",{value:i,configurable:!0}),"l");const r1=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],t1=12288,n1=65510,a1=[12288,12288,65281,65376,65504,65510],u1=8361,l1=65518,o1=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],d1=32,s1=10630,c1=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],h1=4352,f1=262141,q=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var w1=Object.defineProperty,b1=y((e,i)=>w1(e,"name",{value:i,configurable:!0}),"r$1");const p=b1((e,i)=>{let r=0,a=Math.floor(e.length/2)-1;for(;r<=a;){const u=Math.floor((r+a)/2),l=u*2;if(i<e[l])a=u-1;else if(i>e[l+1])r=u+1;else return!0}return!1},"isInRange");var g1=Object.defineProperty,b=y((e,i)=>g1(e,"name",{value:i,configurable:!0}),"r");const _=19968,[m1,p1]=E(q);function E(e){let i=e[0],r=e[1];for(let a=0;a<e.length;a+=2){const u=e[a],l=e[a+1];if(_>=u&&_<=l)return[u,l];l-u>r-i&&(i=u,r=l)}return[i,r]}h(E,"c$1");C(E,"f");y(E,"k");b(E,"findWideFastPathRange");const D=b(e=>e<161||e>1114109?!1:p(r1,e),"isAmbiguous"),G=b(e=>e<t1||e>n1?!1:p(a1,e),"isFullWidth"),$1=b(e=>e<u1||e>l1?!1:p(o1,e),"isHalfWidth"),W1=b(e=>e<d1||e>s1?!1:p(c1,e),"isNarrow"),Z=b(e=>e>=m1&&e<=p1?!0:e<h1||e>f1?!1:p(q,e),"isWide");function O(e){return D(e)?"ambiguous":G(e)?"fullwidth":$1(e)?"halfwidth":W1(e)?"narrow":Z(e)?"wide":"neutral"}h(O,"g$3");C(O,"S");y(O,"getCategory");b(O,"getCategory");var v1=Object.defineProperty,P=h((e,i)=>v1(e,"name",{value:i,configurable:!0}),"i$2"),I1=Object.defineProperty,k=P((e,i)=>I1(e,"name",{value:i,configurable:!0}),"a"),x1=Object.defineProperty,S=k((e,i)=>x1(e,"name",{value:i,configurable:!0}),"e");function $(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}h($,"s$1");P($,"s");k($,"r");S($,"validate");function W(e){return $(e),O(e)}h(W,"r$2");P(W,"p");k(W,"eastAsianWidthType");S(W,"eastAsianWidthType");function T(e,{ambiguousAsWide:i=!1}={}){return $(e),G(e)||Z(e)||i&&D(e)?2:1}h(T,"o$2");P(T,"W");k(T,"eastAsianWidth");S(T,"eastAsianWidth");var j1=Object.defineProperty,y1=h((e,i)=>j1(e,"name",{value:i,configurable:!0}),"p$1"),E1=Object.defineProperty,J=y1((e,i)=>E1(e,"name",{value:i,configurable:!0}),"e"),O1=Object.defineProperty,P1=J((e,i)=>O1(e,"name",{value:i,configurable:!0}),"E");const K=String.raw,H=K`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,k1=P1(()=>new RegExp(K`\p{RI}{2}|(?)${H}(?:\u200D${H})*`,"gu"),"default");var F1=Object.defineProperty,B1=J((e,i)=>F1(e,"name",{value:i,configurable:!0}),"p");const K1=new Set(["\x1B",""]),M1="\x07",N1="[",L1="m",A1="]8;;",Q1=39,U1=/[\u200B\uFEFF\u2060-\u2064]/g,X1=new RegExp(`(?:\\${N1}(?<code>\\d+)m|\\${A1}(?<uri>.*)${M1})`),e2=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),m=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,i2=/\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g,r2=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g,v=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,x=k1();B1(e=>e.replace(x,""),"stripEmoji");var C1=Object.defineProperty,S1=h((e,i)=>C1(e,"name",{value:i,configurable:!0}),"E"),T1=Object.defineProperty,R1=S1((e,i)=>T1(e,"name",{value:i,configurable:!0}),"A"),z1=Object.defineProperty,F=R1((e,i)=>z1(e,"name",{value:i,configurable:!0}),"d");const Y=new Map,I=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,j=F(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","getCharType"),V1=F((e,i)=>{const r=Math.floor(e/65536),a=e%65536;let u=Y.get(r);if(u||(u=new Map,Y.set(r,u)),u.has(a))return u.get(a);let l;if(j(e)==="latin")l=i.width.regular;else if(j(e)==="control")l=i.width.control;else if(j(e)==="wide")l=i.width.wide;else switch(W(e)){case"ambiguous":{l=i.width.ambiguousIsNarrow?i.width.regular:i.width.wide;break}case"fullwidth":{l=i.width.fullWidth;break}case"wide":{l=i.width.wide;break}default:l=i.width.regular}return u.set(a,l),l},"getCachedCharWidth"),_1=F(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"isCombiningCharacter"),A=F((e,i={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:i.countAnsiEscapeCodes??!1,ellipsis:i.ellipsis??"",ellipsisWidth:i.ellipsisWidth??(i.ellipsis?A(i.ellipsis,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:i.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:i.ambiguousIsNarrow??!1,ansi:i.ansiWidth??0,control:i.controlWidth??0,emoji:i.emojiWidth??2,fullWidth:i.fullWidth??2,halfWidth:i.halfWidth??1,regular:i.regularWidth??1,tab:i.tabWidth??8,wide:i.wideWidth??2}},a=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:u}=e,l=u>1e4;let t=0,n=0,o=u,d=!1;const L=e.includes("\x1B")||e.includes("");for(;t<u;){if(L&&(e[t]==="\x1B"||e[t]==="")){if(e.startsWith("\x1B]8;;",t)){const c="\x1B]8;;\x07",w=c.length,B=e.indexOf("\x07",t+5);if(B!==-1){const M=e.indexOf(c,B+1);if(M!==-1){const Q=M+w,U=e.slice(B+1,M).replace(m,""),V=A(U,{ambiguousIsNarrow:r.width.ambiguousIsNarrow,ansiWidth:r.width.ansi,controlWidth:r.width.control,countAnsiEscapeCodes:!1,ellipsis:r.truncation.ellipsis,ellipsisWidth:r.truncation.ellipsisWidth,emojiWidth:r.width.emoji,fullWidth:r.width.fullWidth,halfWidth:r.width.halfWidth,limit:Math.max(0,a-n),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),N=V.width;if(V.truncated)d=!0,o=Math.min(o,t);else if(n+N>a&&(o=Math.min(o,t),d=!0,n+N>r.truncation.limit))break;if(n+=N,t=Q,d&&n>=r.truncation.limit)break;continue}}}if(m.lastIndex=t,m.test(e)){const c=m.lastIndex-t,w=r.truncation.countAnsiEscapeCodes?c:r.width.ansi;if(n+w>a&&(o=Math.min(o,t),n+w>r.truncation.limit)){d=!0;break}n+=w,t=m.lastIndex;continue}}const f=e.codePointAt(t);if(f===8203||f===65279||f>=8288&&f<=8292){t+=1;continue}if(f===9){if(n+r.width.tab>a&&(o=Math.min(o,t),n+r.width.tab>r.truncation.limit)){d=!0;break}n+=r.width.tab,t+=1;continue}if(I.lastIndex=t,I.test(e)){const c=(I.lastIndex-t)*r.width.regular;if(n+c>a){const w=Math.floor((a-n)/r.width.regular);if(o=Math.min(o,t+w),n+c>r.truncation.limit){d=!0;break}}n+=c,t=I.lastIndex;continue}if((f<=31||f>=127&&f<=159)&&(v.lastIndex=t,v.test(e))){const c=(v.lastIndex-t)*r.width.control;if(n+c>a&&(o=Math.min(o,t+Math.floor((a-n)/r.width.control)),n+c>r.truncation.limit)){d=!0;break}n+=c,t=v.lastIndex;continue}if(x.lastIndex=t,x.test(e)){if(n+r.width.emoji>a&&(o=Math.min(o,t),n+r.width.emoji>r.truncation.limit)){d=!0;break}n+=r.width.emoji,t=x.lastIndex;continue}const g=e.codePointAt(t)??0;if(_1(g)){t+=g>65535?2:1;continue}let s;if(l)s=V1(g,r);else switch(j(g)){case"control":{s=r.width.control;break}case"latin":{s=r.width.regular;break}case"wide":{s=r.width.wide;break}case"zero":{s=0;break}default:switch(W(g)){case"ambiguous":{s=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{s=r.width.fullWidth;break}case"wide":{s=r.width.wide;break}default:s=r.width.regular}}if(n+s>a&&(o=Math.min(o,t),n+s>r.truncation.limit)){d=!0;break}n+=s,t+=g>65535?2:1}let R=n,z=!1;return d&&r.truncation.limit>=r.truncation.ellipsisWidth&&(R=r.truncation.limit,z=!0),{ellipsed:z,index:d?o:u,truncated:d,width:R}},"getStringTruncatedWidth");var H1=Object.defineProperty,Y1=h((e,i)=>H1(e,"name",{value:i,configurable:!0}),"i"),q1=Object.defineProperty,D1=Y1((e,i)=>q1(e,"name",{value:i,configurable:!0}),"e"),G1=Object.defineProperty,Z1=D1((e,i)=>G1(e,"name",{value:i,configurable:!0}),"r");const t2=Z1((e,i={})=>A(e,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");export{X1 as F,r2 as G,A as N,Q1 as a,e2 as b,Z as c,L1 as d,m as h,M1 as i,i2 as k,K1 as l,U1 as m,t2 as o,A1 as s,N1 as t,G as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"yoga-layout";import"./measure-text-D-jVetsl.js";import"./squashTextNodesWithMap-DCdi3SZ2.js";import{a as r,d,c as i,f as m,e as N,g as l,b as p,i as c,m as h,r as n,j as u,l as y,h as L,s as b}from"./dom-CW6KYzFK.js";export{r as addLayoutListener,d as appendChildNode,i as createNode,m as createTextNode,N as emitLayoutListeners,l as getPathToRoot,p as insertBeforeNode,c as isNodeSelectable,h as markNodeAsDirty,n as removeChildNode,u as setAttribute,y as setCachedRender,L as setStyle,b as setTextNodeValue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=Object.defineProperty;var u=(t,e)=>p(t,"name",{value:e,configurable:!0});import l from"yoga-layout";var E=Object.defineProperty,n=u((t,e)=>E(t,"name",{value:e,configurable:!0}),"a");const S=n(t=>{const{yogaNode:e}=t;if(!e)return{scrollHeight:0,scrollWidth:0};const a=e.getComputedBorder(l.EDGE_TOP),s=e.getComputedBorder(l.EDGE_LEFT);let c=a,r=e.getComputedPadding(l.EDGE_LEFT);for(let i=0;i<e.getChildCount();i++){const o=e.getChild(i),d=o.getComputedTop()+o.getComputedHeight()+o.getComputedMargin(l.EDGE_BOTTOM);d>c&&(c=d);const g=o.getComputedLeft()+o.getComputedWidth()+o.getComputedMargin(l.EDGE_RIGHT);g>r&&(r=g)}const m=c-a+e.getComputedPadding(l.EDGE_BOTTOM),h=r-s+e.getComputedPadding(l.EDGE_RIGHT);return{scrollHeight:Math.round(m),scrollWidth:Math.round(h)}},"calculateScrollDimensions"),_=n(t=>Math.round(t.internal_scrollState?.scrollHeight??0),"getScrollHeight"),C=n(t=>Math.round(t.internal_scrollState?.scrollWidth??0),"getScrollWidth"),f=n(t=>{const{yogaNode:e}=t;if(!e)return;const{scrollHeight:a,scrollWidth:s}=S(t);let c=a;const r=Math.max(0,e.getComputedHeight()-e.getComputedBorder(l.EDGE_TOP)-e.getComputedBorder(l.EDGE_BOTTOM));if(t.style.stableScrollback&&t.style.overflowToBackbuffer){const o=Math.max(0,a-r);if(t.internal_isScrollbackDirty)t.internal_maxScrollTop=o,t.internal_isScrollbackDirty=!1;else{const d=Math.max(t.internal_maxScrollTop??0,o),{maxScrollbackLength:g}=t.style;t.internal_maxScrollTop=g===void 0?d:Math.min(d,o+Math.max(0,g))}c=Math.max(a,(t.internal_maxScrollTop??0)+r)}const m=Math.max(0,Math.min(t.style.scrollTop??0,c-r)),h=Math.max(0,e.getComputedWidth()-e.getComputedBorder(l.EDGE_LEFT)-e.getComputedBorder(l.EDGE_RIGHT)),i=Math.max(0,Math.min(t.style.scrollLeft??0,s-h));t.internal_scrollState={actualScrollHeight:a,clientHeight:r,clientWidth:h,scrollHeight:c,scrollLeft:i,scrollTop:m,scrollWidth:s}},"calculateScroll"),x=n(t=>Math.round(t.internal_scrollState?.scrollTop??0),"getScrollTop"),D=n(t=>Math.round(t.internal_scrollState?.scrollLeft??0),"getScrollLeft");export{f as calculateScroll,_ as getScrollHeight,D as getScrollLeft,x as getScrollTop,C as getScrollWidth};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var V=Object.defineProperty;var i=(t,q)=>V(t,"name",{value:q,configurable:!0});import"./_commonjsHelpers-CHNfUHCT.js";var M={},O;function X(){return O||(O=1,(function(t){var q=Object.defineProperty,o=i((e,n)=>q(e,"name",{value:n,configurable:!0}),"l");/**
|
|
2
|
+
* @license React
|
|
3
|
+
* scheduler.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/function w(e,n){var r=e.length;e.push(n);e:for(;0<r;){var l=r-1>>>1,a=e[l];if(0<k(a,n))e[l]=n,e[r]=a,r=l;else break e}}i(w,"push"),o(w,"push");function c(e){return e.length===0?null:e[0]}i(c,"peek"),o(c,"peek");function h(e){if(e.length===0)return null;var n=e[0],r=e.pop();if(r!==n){e[0]=r;e:for(var l=0,a=e.length,C=a>>>1;l<C;){var S=2*(l+1)-1,L=e[S],m=S+1,W=e[m];if(0>k(L,r))m<a&&0>k(W,L)?(e[l]=W,e[m]=r,l=m):(e[l]=L,e[S]=r,l=S);else if(m<a&&0>k(W,r))e[l]=W,e[m]=r,l=m;else break e}}return n}i(h,"pop"),o(h,"pop");function k(e,n){var r=e.sortIndex-n.sortIndex;return r!==0?r:e.id-n.id}if(i(k,"compare"),o(k,"compare"),t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var A=performance;t.unstable_now=function(){return A.now()}}else{var j=Date,G=j.now();t.unstable_now=function(){return j.now()-G}}var f=[],d=[],J=1,s=null,u=3,D=!1,y=!1,p=!1,U=!1,Y=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function T(e){for(var n=c(d);n!==null;){if(n.callback===null)h(d);else if(n.startTime<=e)h(d),n.sortIndex=n.expirationTime,w(f,n);else break;n=c(d)}}i(T,"advanceTimers"),o(T,"advanceTimers");function g(e){if(p=!1,T(e),!y)if(c(f)!==null)y=!0,b||(b=!0,v());else{var n=c(d);n!==null&&I(g,n.startTime-e)}}i(g,"handleTimeout"),o(g,"handleTimeout");var b=!1,_=-1,B=5,E=-1;function H(){return U?!0:!(t.unstable_now()-E<B)}i(H,"shouldYieldToHost"),o(H,"shouldYieldToHost");function P(){if(U=!1,b){var e=t.unstable_now();E=e;var n=!0;try{e:{y=!1,p&&(p=!1,F(_),_=-1),D=!0;var r=u;try{n:{for(T(e),s=c(f);s!==null&&!(s.expirationTime>e&&H());){var l=s.callback;if(typeof l=="function"){s.callback=null,u=s.priorityLevel;var a=l(s.expirationTime<=e);if(e=t.unstable_now(),typeof a=="function"){s.callback=a,T(e),n=!0;break n}s===c(f)&&h(f),T(e)}else h(f);s=c(f)}if(s!==null)n=!0;else{var C=c(d);C!==null&&I(g,C.startTime-e),n=!1}}break e}finally{s=null,u=r,D=!1}n=void 0}}finally{n?v():b=!1}}}i(P,"performWorkUntilDeadline"),o(P,"performWorkUntilDeadline");var v;if(typeof Q=="function")v=o(function(){Q(P)},"schedulePerformWorkUntilDeadline");else if(typeof MessageChannel<"u"){var N=new MessageChannel,K=N.port2;N.port1.onmessage=P,v=o(function(){K.postMessage(null)},"schedulePerformWorkUntilDeadline")}else v=o(function(){Y(P,0)},"schedulePerformWorkUntilDeadline");function I(e,n){_=Y(function(){e(t.unstable_now())},n)}i(I,"requestHostTimeout"),o(I,"requestHostTimeout"),t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return u},t.unstable_next=function(e){switch(u){case 1:case 2:case 3:var n=3;break;default:n=u}var r=u;u=n;try{return e()}finally{u=r}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=u;u=e;try{return n()}finally{u=r}},t.unstable_scheduleCallback=function(e,n,r){var l=t.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?l+r:l):r=l,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,e={id:J++,callback:n,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>l?(e.sortIndex=r,w(d,e),c(f)===null&&e===c(d)&&(p?(F(_),_=-1):p=!0,I(g,r-l))):(e.sortIndex=a,w(f,e),y||D||(y=!0,b||(b=!0,v()))),e},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(e){var n=u;return function(){var r=u;u=n;try{return e.apply(this,arguments)}finally{u=r}}}})(M)),M}i(X,"requireScheduler_production");var R,z;function Z(){return z||(z=1,R=X()),R}i(Z,"requireScheduler");var ee=Z();export{ee as s};
|