@visulima/tui 1.0.0-alpha.2 → 1.0.0-alpha.3
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 +53 -0
- package/LICENSE.md +63 -9
- package/README.md +3 -3
- package/dist/core/index.js +3 -3
- package/dist/ink/canvas/braille.d.ts +22 -0
- package/dist/ink/canvas/buffer.d.ts +67 -0
- package/dist/ink/components/accordion.d.ts +52 -0
- package/dist/ink/components/animate-presence.d.ts +15 -0
- package/dist/ink/components/approval-prompt.d.ts +55 -0
- package/dist/ink/components/area-chart.d.ts +54 -0
- package/dist/ink/components/bar-chart.d.ts +57 -0
- package/dist/ink/components/blink-dot.d.ts +30 -0
- package/dist/ink/components/breadcrumb.d.ts +28 -0
- package/dist/ink/components/button.d.ts +38 -0
- package/dist/ink/components/calendar.d.ts +60 -0
- package/dist/ink/components/canvas.d.ts +38 -0
- package/dist/ink/components/card.d.ts +46 -0
- package/dist/ink/components/chart-utils.d.ts +54 -0
- package/dist/ink/components/checkbox.d.ts +39 -0
- package/dist/ink/components/collapsible.d.ts +43 -0
- package/dist/ink/components/command-block.d.ts +38 -0
- package/dist/ink/components/command-palette.d.ts +72 -0
- package/dist/ink/components/confirm-dialog.d.ts +63 -0
- package/dist/ink/components/content-switcher.d.ts +49 -0
- package/dist/ink/components/date-picker.d.ts +53 -0
- package/dist/ink/components/definition-list.d.ts +37 -0
- package/dist/ink/components/divider.d.ts +40 -0
- package/dist/ink/components/file-picker/{FilePicker.d.ts → file-picker.d.ts} +2 -19
- package/dist/ink/components/file-picker/types.d.ts +1 -4
- package/dist/ink/components/file-picker/use-file-system.d.ts +1 -1
- package/dist/ink/components/form.d.ts +74 -0
- package/dist/ink/components/gauge.d.ts +75 -0
- package/dist/ink/components/heading.d.ts +27 -0
- package/dist/ink/components/heatmap.d.ts +51 -0
- package/dist/ink/components/{Help.d.ts → help.d.ts} +4 -9
- package/dist/ink/components/histogram.d.ts +52 -0
- package/dist/ink/components/kbd.d.ts +27 -0
- package/dist/ink/components/line-chart.d.ts +94 -0
- package/dist/ink/components/loading-indicator.d.ts +24 -0
- package/dist/ink/components/masked-input.d.ts +41 -0
- package/dist/ink/components/menu.d.ts +70 -0
- package/dist/ink/components/message-bubble.d.ts +35 -0
- package/dist/ink/components/model-badge.d.ts +32 -0
- package/dist/ink/components/operation-tree.d.ts +46 -0
- package/dist/ink/components/option-list.d.ts +41 -0
- package/dist/ink/components/{Paginator.d.ts → paginator.d.ts} +4 -20
- package/dist/ink/components/paragraph.d.ts +31 -0
- package/dist/ink/components/placeholder.d.ts +47 -0
- package/dist/ink/components/{ProgressBar.d.ts → progress-bar.d.ts} +1 -1
- package/dist/ink/components/radio-group.d.ts +62 -0
- package/dist/ink/components/scatter-plot.d.ts +23 -0
- package/dist/ink/components/scroll/{ControlledScrollView.d.ts → controlled-scroll-view.d.ts} +1 -1
- package/dist/ink/components/scroll/index.d.ts +10 -10
- package/dist/ink/components/scroll/{ScrollBarBox.d.ts → scroll-bar-box.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollBar.d.ts → scroll-bar.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollList.d.ts → scroll-list.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollView.d.ts → scroll-view.d.ts} +1 -1
- package/dist/ink/components/search-input.d.ts +46 -0
- package/dist/ink/components/{SelectInput.d.ts → select-input.d.ts} +2 -2
- package/dist/ink/components/shimmer-text.d.ts +39 -0
- package/dist/ink/components/sparkline.d.ts +30 -0
- package/dist/ink/components/{Spinner.d.ts → spinner.d.ts} +2 -4
- package/dist/ink/components/{StaticRender.d.ts → static-render.d.ts} +14 -2
- package/dist/ink/components/status-line.d.ts +30 -0
- package/dist/ink/components/stepper.d.ts +42 -0
- package/dist/ink/components/{Stopwatch.d.ts → stopwatch.d.ts} +5 -7
- package/dist/ink/components/streaming-text.d.ts +38 -0
- package/dist/ink/components/switch.d.ts +46 -0
- package/dist/ink/components/{Tabs.d.ts → tabs.d.ts} +1 -1
- package/dist/ink/components/tag.d.ts +30 -0
- package/dist/ink/components/{Timer.d.ts → timer.d.ts} +5 -7
- package/dist/ink/components/toast.d.ts +41 -0
- package/dist/ink/components/tooltip.d.ts +36 -0
- package/dist/ink/components/transition.d.ts +53 -0
- package/dist/ink/components/tree-view/theme.d.ts +2 -2
- package/dist/ink/cursor-helpers.d.ts +0 -3
- package/dist/ink/dom.d.ts +9 -8
- package/dist/ink/hooks/use-animation.d.ts +0 -2
- package/dist/ink/hooks/use-app.d.ts +1 -1
- package/dist/ink/hooks/use-focus-manager.d.ts +1 -1
- package/dist/ink/hooks/use-form.d.ts +70 -0
- package/dist/ink/hooks/use-hotkey.d.ts +37 -0
- package/dist/ink/hooks/use-interval.d.ts +25 -0
- package/dist/ink/hooks/use-key-bindings.d.ts +4 -6
- package/dist/ink/hooks/use-key-chord.d.ts +26 -0
- package/dist/ink/hooks/use-linked-scroll.d.ts +1 -1
- package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
- package/dist/ink/hooks/use-stderr.d.ts +1 -1
- package/dist/ink/hooks/use-stdin.d.ts +1 -1
- package/dist/ink/hooks/use-stdout.d.ts +1 -1
- package/dist/ink/hooks/use-stopwatch.d.ts +1 -3
- package/dist/ink/hooks/use-timeout.d.ts +24 -0
- package/dist/ink/hooks/use-timer.d.ts +0 -2
- package/dist/ink/index.d.ts +228 -92
- package/dist/ink/index.js +132 -77
- package/dist/ink/ink.d.ts +7 -6
- package/dist/ink/mouse/constants.d.ts +5 -50
- package/dist/ink/mouse/index.d.ts +2 -2
- package/dist/ink/output.d.ts +2 -1
- package/dist/ink/styled-line.d.ts +10 -0
- package/dist/ink/write-synchronized.d.ts +2 -2
- package/dist/packem_shared/Accordion-BG-yfIkV.js +80 -0
- package/dist/packem_shared/{Alert-Dr3s_LD9.js → Alert-BLcwIW8V.js} +2 -2
- package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +98 -0
- package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +104 -0
- package/dist/packem_shared/AreaChart-CmTcxLum.js +116 -0
- package/dist/packem_shared/{Badge-Dk7EGGM6.js → Badge-CUfbXwAB.js} +1 -1
- package/dist/packem_shared/BarChart-DWRae67P.js +87 -0
- package/dist/packem_shared/{BigText-CjMdY63X.js → BigText-CVq2X7B5.js} +1 -1
- package/dist/packem_shared/BlinkDot-CrbHMR3L.js +11 -0
- package/dist/packem_shared/{Box-D_pSJ9Jp.js → Box-W1w_NGin.js} +4 -6
- package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +26 -0
- package/dist/packem_shared/Button-CBmTbJ_D.js +57 -0
- package/dist/packem_shared/Calendar-C2Qxt-LA.js +139 -0
- package/dist/packem_shared/Canvas-COttmLPX.js +246 -0
- package/dist/packem_shared/Card-D3tGkNCm.js +24 -0
- package/dist/packem_shared/Checkbox-Dpy_4Lws.js +49 -0
- package/dist/packem_shared/{Code-DjQvPBD9.js → Code-CwzzbsLx.js} +3 -3
- package/dist/packem_shared/Collapsible-BMDrXf5C.js +45 -0
- package/dist/packem_shared/CommandBlock-jdOGJPjY.js +80 -0
- package/dist/packem_shared/CommandPalette-B5IfUQwi.js +146 -0
- package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +67 -0
- package/dist/packem_shared/{ConfirmInput-85Y4kRQW.js → ConfirmInput-CxUS0XAA.js} +3 -3
- package/dist/packem_shared/{ConsoleOverlay-DBNa4vtj.js → ConsoleOverlay-BvnCEgjG.js} +2 -2
- package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +81 -0
- package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +5 -0
- package/dist/packem_shared/DatePicker-CPejKoqS.js +73 -0
- package/dist/packem_shared/DefinitionList-BAwr0l5J.js +18 -0
- package/dist/packem_shared/{DevTools-aMPIsaHx.js → DevTools-BdxRSkhL.js} +6 -4
- package/dist/packem_shared/{Dialog-DsSNAVgC.js → Dialog-S9r7Izff.js} +5 -5
- package/dist/packem_shared/{DiffView-hqaw-2S6.js → DiffView-BR4T6-Sj.js} +4 -4
- package/dist/packem_shared/Divider-DocXIqNn.js +30 -0
- package/dist/packem_shared/{FilePicker-DNwFxRhq.js → FilePicker-BZ55oF_n.js} +39 -32
- package/dist/packem_shared/FormField-BSG16cnA.js +29 -0
- package/dist/packem_shared/{Fullscreen-DrElAE1o.js → Fullscreen-DO7voOq5.js} +2 -2
- package/dist/packem_shared/Gauge-CKXUXxft.js +122 -0
- package/dist/packem_shared/{Gradient-Ql5P0GUd.js → Gradient-Dg0NezWc.js} +3 -3
- package/dist/packem_shared/Heading-BnR7McmP.js +29 -0
- package/dist/packem_shared/Heatmap-_jqISOU0.js +79 -0
- package/dist/packem_shared/{Help-6wanGG38.js → Help-0yZ_IcQg.js} +4 -11
- package/dist/packem_shared/Histogram-cgAjY5AJ.js +92 -0
- package/dist/packem_shared/{InputParser-BKHpWfvN.js → InputParser-BlsfeY9J.js} +8 -6
- package/dist/packem_shared/KEY-STOdi-nc.js +74 -0
- package/dist/packem_shared/Kbd-BNDXQgey.js +19 -0
- package/dist/packem_shared/{LayoutNode-Cjnsodiy.js → LayoutNode-DAkKg9TE.js} +5 -7
- package/dist/packem_shared/LineChart-ef3HF816.js +7 -0
- package/dist/packem_shared/{Link-COcKYfGT.js → Link-DZ2Tiq1m.js} +2 -2
- package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +13 -0
- package/dist/packem_shared/{Markdown-y1ISztof.js → Markdown-33bpCUoe.js} +8 -8
- package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +119 -0
- package/dist/packem_shared/Menu-CeKxhEix.js +112 -0
- package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +26 -0
- package/dist/packem_shared/ModelBadge-CNIxPs7v.js +40 -0
- package/dist/packem_shared/{MouseProvider-Y9TSSEGl.js → MouseProvider-CekPbXCh.js} +3 -3
- package/dist/packem_shared/{MultiSelect-ChoLUcDI.js → MultiSelect-yz7-w0Zv.js} +4 -4
- package/dist/packem_shared/{NAMED_COLORS-a4QBvb5r.js → NAMED_COLORS-DcI3erCu.js} +79 -41
- package/dist/packem_shared/OperationTree-Dudx5o1o.js +67 -0
- package/dist/packem_shared/OptionList-CTyqQaZ1.js +24 -0
- package/dist/packem_shared/{OrderedList-Cp7pXr6m.js → OrderedList-VsvSmHUC.js} +2 -2
- package/dist/packem_shared/{Paginator-D1AuD-kj.js → Paginator-DmGogvEI.js} +44 -44
- package/dist/packem_shared/Paragraph-CNNhfepo.js +9 -0
- package/dist/packem_shared/Placeholder-DkM69Q8Z.js +29 -0
- package/dist/packem_shared/{ProgressBar-DOfpVagn.js → ProgressBar-B7cS4uQm.js} +2 -2
- package/dist/packem_shared/RadioGroup-B4F9PUyL.js +108 -0
- package/dist/packem_shared/{ResizeObserverEntry-Br4seLeQ.js → ResizeObserverEntry-Vr8GZ74x.js} +4 -4
- package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +63 -0
- package/dist/packem_shared/{ScrollBar-EWAs2Uc7.js → ScrollBar-DFeWH43I.js} +2 -2
- package/dist/packem_shared/{ScrollBarBox-DTNNlh7R.js → ScrollBarBox-C7VL6Izd.js} +2 -2
- package/dist/packem_shared/{ScrollList-DCeIFL8M.js → ScrollList-DRcr_RrN.js} +2 -2
- package/dist/packem_shared/{ScrollView-v3MCNIyX.js → ScrollView-C6rdlGwU.js} +4 -4
- package/dist/packem_shared/SearchInput-cB8zFhSg.js +32 -0
- package/dist/packem_shared/{SelectInput-BN2TMyxp.js → SelectInput-WzZSqp72.js} +6 -6
- package/dist/packem_shared/{SelectInputIndicator-DkRMoH_b.js → SelectInputIndicator-DKeN6v5Z.js} +2 -2
- package/dist/packem_shared/{SelectInputItem-BF9LQgKu.js → SelectInputItem-CxFL3spM.js} +1 -1
- package/dist/packem_shared/ShimmerText-B2VbPUSB.js +34 -0
- package/dist/packem_shared/{Slider-BWD7xZX6.js → Slider-BOrNTOQe.js} +3 -3
- package/dist/packem_shared/{Spacer-Bs4ER-HK.js → Spacer-DhmXyTb8.js} +1 -1
- package/dist/packem_shared/Sparkline-BSbjPrwK.js +44 -0
- package/dist/packem_shared/Spinner-BcO5BCAa.js +1942 -0
- package/dist/packem_shared/StaticRender-C3XWvJdC.js +69 -0
- package/dist/packem_shared/StatusLine-DQNUstN9.js +22 -0
- package/dist/packem_shared/{StatusMessage-BtSYxzwb.js → StatusMessage-BYTL6Pl-.js} +2 -2
- package/dist/packem_shared/Stepper-CmUPRK3z.js +60 -0
- package/dist/packem_shared/Stopwatch-zqLQAxXC.js +21 -0
- package/dist/packem_shared/StreamingText-BmuoJtGu.js +38 -0
- package/dist/packem_shared/Switch-DcPdy8nm.js +59 -0
- package/dist/packem_shared/{Table-D-rSVlzb.js → Table-Bgxo87Df.js} +11 -5
- package/dist/packem_shared/{Tabs-hki-KRnx.js → Tabs-DubuHdYV.js} +30 -19
- package/dist/packem_shared/Tag-CCqM7Ee9.js +35 -0
- package/dist/packem_shared/{Text-DvAUdZcK.js → Text-CtUwV89_.js} +2 -2
- package/dist/packem_shared/{TextInput-C79WEQ5U.js → TextInput-C9r7zT0U.js} +3 -3
- package/dist/packem_shared/{Textarea-Dj06R6Zd.js → Textarea-CGmgt-Nl.js} +5 -5
- package/dist/packem_shared/Timer-D7ZZ0_wz.js +20 -0
- package/dist/packem_shared/Toast-DXSCXFPY.js +37 -0
- package/dist/packem_shared/Tooltip-SvVjj-2k.js +32 -0
- package/dist/packem_shared/{Transform-BHxY_dAM.js → Transform-Cfyva2wd.js} +1 -1
- package/dist/packem_shared/Transition-CbNfKhaj.js +108 -0
- package/dist/packem_shared/{TreeView-C2062dtj.js → TreeView-DGlZeSsK.js} +4 -4
- package/dist/packem_shared/{TuiApp-DfxOnXqi.js → TuiApp-DtdgNRWa.js} +4 -2
- package/dist/packem_shared/{TuiContext-CqEjMyXd.js → TuiContext-lXmJFd-x.js} +6 -3
- package/dist/packem_shared/{UnorderedList-DhnadWjX.js → UnorderedList-D8RPaEAW.js} +2 -2
- package/dist/packem_shared/{ansi-parser-0BdVTKho.js → ansi-parser-BOP8fNdT.js} +6 -4
- package/dist/packem_shared/braille-BoEWoH2I.js +93 -0
- package/dist/packem_shared/{comparePoints-CGMDnd3_.js → comparePoints-CAAlhiMS.js} +2 -2
- package/dist/packem_shared/{ControlledScrollView-BlOaxcsN.js → controlled-scroll-view-DJXfdWMm.js} +2 -2
- package/dist/packem_shared/{createInlineLoop-BxMmcq9D.js → createInlineLoop-Dnfm1ZSJ.js} +19 -13
- package/dist/packem_shared/createMemoryStorage-esFJ61La.js +115 -0
- package/dist/packem_shared/createScreen-Dh0sZlQ0.js +38 -0
- package/dist/packem_shared/{dom-DvzhsAez.js → dom-CrbpQgat.js} +17 -14
- package/dist/packem_shared/{getPathToRoot-a1wbwxfL.js → getPathToRoot-BbvlppLC.js} +2 -2
- package/dist/packem_shared/{getScrollHeight-BubfU_df.js → getScrollHeight-Cz3CDQN2.js} +5 -5
- package/dist/packem_shared/line-chart-VGU2l7pu.js +139 -0
- package/dist/packem_shared/{measure-element-Reza_yfC.js → measure-element-Bc6PEaIe.js} +26 -17
- package/dist/packem_shared/{measure-text-DItZYotK.js → measure-text-BdOhbOeh.js} +74 -7
- package/dist/packem_shared/{measureElement-CTgFCmKd.js → measureElement-DTELRaij.js} +2 -2
- package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +1 -0
- package/dist/packem_shared/{processLayout-BQ9kXfd3.js → processLayout-B0Coz0Ua.js} +1 -1
- package/dist/packem_shared/{reconciler-gfmqURLy.js → reconciler-Dd7Z0A97.js} +21 -5
- package/dist/packem_shared/{reconciler-BXf6miSS.js → reconciler-mzMwSOft.js} +23 -13
- package/dist/packem_shared/{render-BAwdjfki.js → render-Bm9Oa1sG.js} +72 -79
- package/dist/packem_shared/{render-Bpjhf0lD.js → render-CjlKdg4m.js} +15 -11
- package/dist/packem_shared/{renderToString-ClIaXgrC.js → renderToString-CWYS1ZXE.js} +4 -4
- package/dist/packem_shared/{renderToString-Cfg55DRD.js → renderToString-DB3ILWFm.js} +4 -4
- package/dist/packem_shared/{renderTreeToBuffer-D3mo7M7m.js → renderTreeToBuffer-CDDTGyZn.js} +8 -5
- package/dist/packem_shared/{renderer-B3wROkeg.js → renderer-GE9OLNNM.js} +47 -41
- package/dist/packem_shared/{setEnableStyledLineCache-BpskngSJ.js → setEnableStyledLineCache-D5f4favX.js} +1 -1
- package/dist/packem_shared/{text-width-DhuarWcB.js → text-width-Db-AxMea.js} +2 -1
- package/dist/packem_shared/{token-to-elements-BRFl_rzw.js → token-to-elements-CK4s8MJd.js} +2 -2
- package/dist/packem_shared/{useAnimation-kj31sA-T.js → useAnimation-DV22qxiJ.js} +2 -2
- package/dist/packem_shared/{useApp-DPQlRzi5.js → useApp-Cbi788rV.js} +1 -1
- package/dist/packem_shared/{useBoxMetrics-rBjKc-g4.js → useBoxMetrics-_5icypir.js} +2 -2
- package/dist/packem_shared/{useClipboard-B_9-adw1.js → useClipboard-MNj6MNR-.js} +1 -1
- package/dist/packem_shared/{useCursor-BIJzc8k9.js → useCursor-DS6LjIgv.js} +1 -1
- package/dist/packem_shared/{useFocus-CNl5QHHf.js → useFocus-DLoGQJd9.js} +2 -2
- package/dist/packem_shared/{useFocusManager-BPYaUuKQ.js → useFocusManager-UeZWtnNc.js} +1 -1
- package/dist/packem_shared/useForm-sQENbEuv.js +88 -0
- package/dist/packem_shared/useHotkey-D9giUX3q.js +112 -0
- package/dist/packem_shared/{useInput-Cfp5zB2s.js → useInput-DKZbqMRc.js} +2 -2
- package/dist/packem_shared/useInterval-CSXM8c2I.js +32 -0
- package/dist/packem_shared/{useIsScreenReaderEnabled-CnGKCe0f.js → useIsScreenReaderEnabled-BeoVqo1R.js} +1 -1
- package/dist/packem_shared/{useKeyBindings-B78l1E1n.js → useKeyBindings-S4fSIEAk.js} +2 -2
- package/dist/packem_shared/useKeyChord-BmXGNuEO.js +114 -0
- package/dist/packem_shared/{usePaste-Ct8J4AGR.js → usePaste-png73gvT.js} +2 -2
- package/dist/packem_shared/{useScrollInput-D3CpBq_a.js → useScrollInput-DfzRGQFe.js} +2 -2
- package/dist/packem_shared/{useStderr-CAOVUh4E.js → useStderr-BSWerMZ7.js} +1 -1
- package/dist/packem_shared/{useStdin-X-O0kd-n.js → useStdin-Rf0zPzVA.js} +1 -1
- package/dist/packem_shared/{useStdout-DyF6DSH0.js → useStdout-B5yRcg9N.js} +1 -1
- package/dist/packem_shared/{useStopwatch-qC4Beai4.js → useStopwatch-C__Zu6hd.js} +2 -2
- package/dist/packem_shared/{useTerminalPalette-BaWO2c4Q.js → useTerminalPalette-CtFG2JTq.js} +2 -2
- package/dist/packem_shared/{useTextSelection-mXtxgsPK.js → useTextSelection-ChrYZXsn.js} +2 -2
- package/dist/packem_shared/useTimeout-DuCqgWPX.js +34 -0
- package/dist/packem_shared/{useTimer-CPQ7j827.js → useTimer-DnBtbhB5.js} +1 -1
- package/dist/packem_shared/{useTreeView-BT57P3Kx.js → useTreeView-mkN5Di7w.js} +1 -1
- package/dist/packem_shared/{useWindowSize-ugEmGZJm.js → useWindowSize-D3UU41mv.js} +1 -1
- package/dist/packem_shared/waitFor-Cv9M2jKA.js +39 -0
- package/dist/packem_shared/{wrapOrTruncateStyledLine-DN3Nogoc.js → wrapOrTruncateStyledLine-49Mne3t3.js} +1 -1
- package/dist/react/index.js +7 -7
- package/dist/react/layout.d.ts +0 -2
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.js +6 -114
- package/dist/testing/wait-for.d.ts +0 -1
- package/index.js +691 -539
- package/package.json +17 -17
- package/dist/ink/components/file-picker/index.d.ts +0 -3
- package/dist/ink/components/tree-view/index.d.ts +0 -11
- package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
- package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
- package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
- package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
- package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
- package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
- /package/dist/ink/components/{AccessibilityContext.d.ts → accessibility-context.d.ts} +0 -0
- /package/dist/ink/components/{Alert.d.ts → alert.d.ts} +0 -0
- /package/dist/ink/components/{AnimationContext.d.ts → animation-context.d.ts} +0 -0
- /package/dist/ink/components/{AppContext.d.ts → app-context.d.ts} +0 -0
- /package/dist/ink/components/{App.d.ts → app.d.ts} +0 -0
- /package/dist/ink/components/{BackgroundContext.d.ts → background-context.d.ts} +0 -0
- /package/dist/ink/components/{Badge.d.ts → badge.d.ts} +0 -0
- /package/dist/ink/components/{BigText.d.ts → big-text.d.ts} +0 -0
- /package/dist/ink/components/{Box.d.ts → box.d.ts} +0 -0
- /package/dist/ink/components/{Code.d.ts → code.d.ts} +0 -0
- /package/dist/ink/components/{ConfirmInput.d.ts → confirm-input.d.ts} +0 -0
- /package/dist/ink/components/{ConsoleOverlay.d.ts → console-overlay.d.ts} +0 -0
- /package/dist/ink/components/{CursorContext.d.ts → cursor-context.d.ts} +0 -0
- /package/dist/ink/components/{Cursor.d.ts → cursor.d.ts} +0 -0
- /package/dist/ink/components/{Dialog.d.ts → dialog.d.ts} +0 -0
- /package/dist/ink/components/{DiffView.d.ts → diff-view.d.ts} +0 -0
- /package/dist/ink/components/{ErrorBoundary.d.ts → error-boundary.d.ts} +0 -0
- /package/dist/ink/components/{ErrorOverview.d.ts → error-overview.d.ts} +0 -0
- /package/dist/ink/components/{FocusContext.d.ts → focus-context.d.ts} +0 -0
- /package/dist/ink/components/{Gradient.d.ts → gradient.d.ts} +0 -0
- /package/dist/ink/components/{Link.d.ts → link.d.ts} +0 -0
- /package/dist/ink/components/{Markdown.d.ts → markdown.d.ts} +0 -0
- /package/dist/ink/components/{MultiSelect.d.ts → multi-select.d.ts} +0 -0
- /package/dist/ink/components/{Newline.d.ts → newline.d.ts} +0 -0
- /package/dist/ink/components/{OrderedList.d.ts → ordered-list.d.ts} +0 -0
- /package/dist/ink/components/{SelectInputIndicator.d.ts → select-input-indicator.d.ts} +0 -0
- /package/dist/ink/components/{SelectInputItem.d.ts → select-input-item.d.ts} +0 -0
- /package/dist/ink/components/{Slider.d.ts → slider.d.ts} +0 -0
- /package/dist/ink/components/{Spacer.d.ts → spacer.d.ts} +0 -0
- /package/dist/ink/components/{Static.d.ts → static.d.ts} +0 -0
- /package/dist/ink/components/{StatusMessage.d.ts → status-message.d.ts} +0 -0
- /package/dist/ink/components/{StderrContext.d.ts → stderr-context.d.ts} +0 -0
- /package/dist/ink/components/{StdinContext.d.ts → stdin-context.d.ts} +0 -0
- /package/dist/ink/components/{StdoutContext.d.ts → stdout-context.d.ts} +0 -0
- /package/dist/ink/components/{Tab.d.ts → tab.d.ts} +0 -0
- /package/dist/ink/components/{Table.d.ts → table.d.ts} +0 -0
- /package/dist/ink/components/{TextInput.d.ts → text-input.d.ts} +0 -0
- /package/dist/ink/components/{Text.d.ts → text.d.ts} +0 -0
- /package/dist/ink/components/{Textarea.d.ts → textarea.d.ts} +0 -0
- /package/dist/ink/components/{Transform.d.ts → transform.d.ts} +0 -0
- /package/dist/ink/components/tree-view/{TreeViewNode.d.ts → tree-view-node.d.ts} +0 -0
- /package/dist/ink/components/tree-view/{TreeView.d.ts → tree-view.d.ts} +0 -0
- /package/dist/ink/components/{UnorderedList.d.ts → unordered-list.d.ts} +0 -0
- /package/dist/ink/mouse/{Fullscreen.d.ts → fullscreen.d.ts} +0 -0
- /package/dist/ink/mouse/{MouseProvider.d.ts → mouse-provider.d.ts} +0 -0
- /package/dist/packem_shared/{AccessibilityContext-BLelHhNU.js → accessibility-context-BLelHhNU.js} +0 -0
- /package/dist/packem_shared/{AnimationContext-BcJg8Jr6.js → animation-context-BcJg8Jr6.js} +0 -0
- /package/dist/packem_shared/{AppContext-CP0U6H7O.js → app-context-CP0U6H7O.js} +0 -0
- /package/dist/packem_shared/{BackgroundContext-BAUaxfOb.js → background-context-BAUaxfOb.js} +0 -0
- /package/dist/packem_shared/{CursorContext-JxRzlqAx.js → cursor-context-JxRzlqAx.js} +0 -0
- /package/dist/packem_shared/{FocusContext-CWkYtgcm.js → focus-context-CWkYtgcm.js} +0 -0
- /package/dist/packem_shared/{StderrContext-Bj4Mf7v7.js → stderr-context-Bj4Mf7v7.js} +0 -0
- /package/dist/packem_shared/{StdinContext-Bq_GNJ3z.js → stdin-context-Bq_GNJ3z.js} +0 -0
- /package/dist/packem_shared/{StdoutContext-CgjWeCdO.js → stdout-context-CgjWeCdO.js} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type FormFieldProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The input element (TextInput, Checkbox, Select, …).
|
|
7
|
+
*/
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Optional helper text rendered beneath the input.
|
|
11
|
+
*/
|
|
12
|
+
readonly description?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Validation error — dimmed red below the input.
|
|
15
|
+
*/
|
|
16
|
+
readonly error?: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, the field's label and description are dim.
|
|
19
|
+
*/
|
|
20
|
+
readonly isDisabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Label rendered above the input.
|
|
23
|
+
*/
|
|
24
|
+
readonly label: string;
|
|
25
|
+
/**
|
|
26
|
+
* Mark the field as required (adds a trailing `*`).
|
|
27
|
+
*/
|
|
28
|
+
readonly required?: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Standard form field wrapper: label + input + helper/error.
|
|
32
|
+
*/
|
|
33
|
+
export declare const FormField: ({ children, description, error, isDisabled, label, required }: FormFieldProps) => ReactElement;
|
|
34
|
+
export type Props = {
|
|
35
|
+
/**
|
|
36
|
+
* Accent color for the form chrome.
|
|
37
|
+
* @default "blue"
|
|
38
|
+
*/
|
|
39
|
+
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
40
|
+
/**
|
|
41
|
+
* Render a border around the form.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
readonly bordered?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Fields composed via `<FormField />`.
|
|
47
|
+
*/
|
|
48
|
+
readonly children: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Optional description rendered under the title.
|
|
51
|
+
*/
|
|
52
|
+
readonly description?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Optional footer rendered below the fields (buttons, hints, summary).
|
|
55
|
+
*/
|
|
56
|
+
readonly footer?: ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Optional heading rendered at the top.
|
|
59
|
+
*/
|
|
60
|
+
readonly title?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Fixed width.
|
|
63
|
+
*/
|
|
64
|
+
readonly width?: number;
|
|
65
|
+
};
|
|
66
|
+
type FormComponent = ((props: Props) => ReactElement) & {
|
|
67
|
+
Field: typeof FormField;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Stateless form layout. Pair with the `useForm` hook for state management
|
|
71
|
+
* and `FormField` for consistent label/error styling.
|
|
72
|
+
*/
|
|
73
|
+
declare const Form: FormComponent;
|
|
74
|
+
export default Form;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type GaugeThreshold = {
|
|
5
|
+
/**
|
|
6
|
+
* Color used for the arc segment and, when the current value falls into
|
|
7
|
+
* this segment, for the value readout.
|
|
8
|
+
*/
|
|
9
|
+
readonly color: LiteralUnion<AnsiColors, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Optional label used by the legend under the gauge.
|
|
12
|
+
*/
|
|
13
|
+
readonly label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Upper bound of this threshold segment (inclusive). Segments are sorted
|
|
16
|
+
* ascending and painted in order.
|
|
17
|
+
*/
|
|
18
|
+
readonly max: number;
|
|
19
|
+
};
|
|
20
|
+
export type GaugeSize = "large" | "medium" | "small";
|
|
21
|
+
export type Props = {
|
|
22
|
+
/**
|
|
23
|
+
* Color of the arc background (the portion beyond `value`).
|
|
24
|
+
* @default "gray"
|
|
25
|
+
*/
|
|
26
|
+
readonly backgroundColor?: LiteralUnion<AnsiColors, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Format for the numeric readout. Defaults to rounding to an integer.
|
|
29
|
+
*/
|
|
30
|
+
readonly formatValue?: (value: number) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional label rendered above the readout.
|
|
33
|
+
*/
|
|
34
|
+
readonly label?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Upper bound of the range.
|
|
37
|
+
* @default 100
|
|
38
|
+
*/
|
|
39
|
+
readonly max?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Lower bound of the range.
|
|
42
|
+
* @default 0
|
|
43
|
+
*/
|
|
44
|
+
readonly min?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Show a legend listing thresholds below the gauge.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
readonly showLegend?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Show a numeric readout in the middle of the gauge.
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
readonly showValue?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Overall dimension preset.
|
|
57
|
+
* @default "medium"
|
|
58
|
+
*/
|
|
59
|
+
readonly size?: GaugeSize;
|
|
60
|
+
/**
|
|
61
|
+
* Color threshold ramp. When provided, segments of the arc are painted in
|
|
62
|
+
* the corresponding colors and the value readout picks up the color for
|
|
63
|
+
* the segment `value` lands in.
|
|
64
|
+
*/
|
|
65
|
+
readonly thresholds?: ReadonlyArray<GaugeThreshold>;
|
|
66
|
+
/**
|
|
67
|
+
* Current value. Clamped into the `[min, max]` range.
|
|
68
|
+
*/
|
|
69
|
+
readonly value: number;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Semi-circular gauge rendered at 2x4 sub-cell resolution. Supports colored
|
|
73
|
+
* threshold segments and an optional needle.
|
|
74
|
+
*/
|
|
75
|
+
export default function Gauge({ backgroundColor, formatValue, label, max, min, showLegend, showValue, size, thresholds, value, }: Props): ReactElement;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
export type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Heading content.
|
|
8
|
+
*/
|
|
9
|
+
readonly children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Explicit color. By default the color is derived from the level.
|
|
12
|
+
*/
|
|
13
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Heading level controls decoration and color.
|
|
16
|
+
* @default 1
|
|
17
|
+
*/
|
|
18
|
+
readonly level?: HeadingLevel;
|
|
19
|
+
/**
|
|
20
|
+
* When true, renders an underline on a second line.
|
|
21
|
+
*/
|
|
22
|
+
readonly underline?: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Semantic heading with level-based styling.
|
|
26
|
+
*/
|
|
27
|
+
export default function Heading({ children, color, level, underline }: Props): ReactElement;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type HeatmapProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Width of each cell in character columns.
|
|
7
|
+
* @default 2
|
|
8
|
+
*/
|
|
9
|
+
readonly cellWidth?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Character used to paint each heatmap cell. Defaults to `█` so the
|
|
12
|
+
* background color fills the cell.
|
|
13
|
+
* @default "█"
|
|
14
|
+
*/
|
|
15
|
+
readonly character?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Column labels rendered below the grid.
|
|
18
|
+
*/
|
|
19
|
+
readonly columnLabels?: ReadonlyArray<string>;
|
|
20
|
+
/**
|
|
21
|
+
* 2D matrix, rows × cols.
|
|
22
|
+
*/
|
|
23
|
+
readonly data: ReadonlyArray<ReadonlyArray<number>>;
|
|
24
|
+
/**
|
|
25
|
+
* Fixed maximum (for consistent scales across multiple heatmaps).
|
|
26
|
+
*/
|
|
27
|
+
readonly max?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Fixed minimum.
|
|
30
|
+
*/
|
|
31
|
+
readonly min?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Color palette, lowest-to-highest intensity. Values are mapped into the
|
|
34
|
+
* palette by their position in the [min, max] range.
|
|
35
|
+
* @default ["#0b1e4f", "#1f3b96", "#3258c8", "#4e84ec", "#78b0ff"]
|
|
36
|
+
*/
|
|
37
|
+
readonly palette?: ReadonlyArray<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Row labels rendered to the left of the grid.
|
|
40
|
+
*/
|
|
41
|
+
readonly rowLabels?: ReadonlyArray<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Foreground color override (rarely needed since the character is a full block).
|
|
44
|
+
*/
|
|
45
|
+
readonly textColor?: LiteralUnion<AnsiColors, string>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 2D heatmap. Each cell's background color is derived from its value's
|
|
49
|
+
* position in the [min, max] range mapped into `palette`.
|
|
50
|
+
*/
|
|
51
|
+
export default function Heatmap({ cellWidth, character, columnLabels, data, max: maxOverride, min: minOverride, palette, rowLabels, textColor, }: HeatmapProps): ReactElement;
|
|
@@ -4,22 +4,19 @@ export type Props = {
|
|
|
4
4
|
/**
|
|
5
5
|
* Key bindings to display. Typically the `bindings` array returned by `useKeyBindings`.
|
|
6
6
|
*/
|
|
7
|
-
readonly bindings:
|
|
7
|
+
readonly bindings: ReadonlyArray<KeyBinding>;
|
|
8
8
|
/**
|
|
9
9
|
* Color for description text.
|
|
10
|
-
*
|
|
11
10
|
* @default undefined (uses dimColor)
|
|
12
11
|
*/
|
|
13
12
|
readonly descriptionColor?: string;
|
|
14
13
|
/**
|
|
15
14
|
* Color for key labels.
|
|
16
|
-
*
|
|
17
15
|
* @default "cyan"
|
|
18
16
|
*/
|
|
19
17
|
readonly keyColor?: string;
|
|
20
18
|
/**
|
|
21
19
|
* Maximum number of columns in full mode.
|
|
22
|
-
*
|
|
23
20
|
* @default 3
|
|
24
21
|
*/
|
|
25
22
|
readonly maxColumns?: number;
|
|
@@ -27,13 +24,11 @@ export type Props = {
|
|
|
27
24
|
* Display mode.
|
|
28
25
|
* - `"short"`: Single-line horizontal bar, truncated to terminal width.
|
|
29
26
|
* - `"full"`: Multi-column layout grouped by `group` field.
|
|
30
|
-
*
|
|
31
27
|
* @default "short"
|
|
32
28
|
*/
|
|
33
29
|
readonly mode?: "full" | "short";
|
|
34
30
|
/**
|
|
35
31
|
* Separator between key-description pairs in short mode.
|
|
36
|
-
*
|
|
37
32
|
* @default " \u00b7 "
|
|
38
33
|
*/
|
|
39
34
|
readonly separator?: string;
|
|
@@ -42,8 +37,8 @@ export type Props = {
|
|
|
42
37
|
* Renders a keybinding help bar from an array of `KeyBinding` definitions.
|
|
43
38
|
*
|
|
44
39
|
* ```tsx
|
|
45
|
-
*
|
|
46
|
-
*
|
|
40
|
+
* <Help bindings={bindings} />
|
|
41
|
+
* <Help bindings={bindings} mode="full" />
|
|
47
42
|
* ```
|
|
48
43
|
*/
|
|
49
|
-
export default function Help({ bindings, descriptionColor, keyColor, maxColumns, mode, separator
|
|
44
|
+
export default function Help({ bindings, descriptionColor, keyColor, maxColumns, mode, separator }: Props): ReactElement;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of equal-width buckets. Ignored if `thresholds` is set.
|
|
7
|
+
* @default 10
|
|
8
|
+
*/
|
|
9
|
+
readonly bins?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Bar color.
|
|
12
|
+
*/
|
|
13
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Raw values to bin.
|
|
16
|
+
*/
|
|
17
|
+
readonly data: ReadonlyArray<number>;
|
|
18
|
+
/**
|
|
19
|
+
* Plot height in character rows.
|
|
20
|
+
* @default 10
|
|
21
|
+
*/
|
|
22
|
+
readonly height?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Optional fixed maximum.
|
|
25
|
+
*/
|
|
26
|
+
readonly max?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Optional fixed minimum.
|
|
29
|
+
*/
|
|
30
|
+
readonly min?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Render a numeric count above each bucket.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
readonly showValues?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Explicit bin edges. When provided, `bins`, `min`, and `max` are ignored.
|
|
38
|
+
* Must be strictly increasing.
|
|
39
|
+
*/
|
|
40
|
+
readonly thresholds?: ReadonlyArray<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Plot width in character columns.
|
|
43
|
+
*/
|
|
44
|
+
readonly width?: number;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Histogram built on top of BarChart. Bins the raw values (via explicit
|
|
48
|
+
* thresholds or equal-width bins) and hands the counts off to BarChart.
|
|
49
|
+
* @param props See {@link Props}.
|
|
50
|
+
* @returns A `ReactElement` rendering a BarChart of bucket counts.
|
|
51
|
+
*/
|
|
52
|
+
export default function Histogram({ bins, color, data, height, max: maxOverride, min: minOverride, showValues, thresholds, width, }: Props): ReactElement;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* Key cap content.
|
|
7
|
+
*/
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Background color of the key cap.
|
|
11
|
+
* @default "gray"
|
|
12
|
+
*/
|
|
13
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
|
+
/**
|
|
15
|
+
* Visual style.
|
|
16
|
+
* - `solid` (default): background filled
|
|
17
|
+
* - `outline`: border only
|
|
18
|
+
* - `bare`: no decoration, just dimmed text
|
|
19
|
+
*/
|
|
20
|
+
readonly variant?: "bare" | "outline" | "solid";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Render a keyboard key (e.g. `<Kbd>Enter</Kbd>`).
|
|
24
|
+
* @param props See {@link Props}.
|
|
25
|
+
* @returns A `ReactElement` styled as a key cap (solid / outline / bare).
|
|
26
|
+
*/
|
|
27
|
+
export default function Kbd({ children, color, variant }: Props): ReactElement;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
import type { CanvasContext } from "../canvas/buffer.d.ts";
|
|
5
|
+
import type { Point } from "./chart-utils.d.ts";
|
|
6
|
+
export type LineSeries = {
|
|
7
|
+
/**
|
|
8
|
+
* Per-series color override. Falls back to the chart-level palette.
|
|
9
|
+
*/
|
|
10
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Numeric samples to plot. Pass either a list of y-values (x is the
|
|
13
|
+
* index) or {x, y} tuples.
|
|
14
|
+
*/
|
|
15
|
+
readonly data: ReadonlyArray<number> | ReadonlyArray<{
|
|
16
|
+
readonly x: number;
|
|
17
|
+
readonly y: number;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional label shown in the legend.
|
|
21
|
+
*/
|
|
22
|
+
readonly label?: string;
|
|
23
|
+
};
|
|
24
|
+
export type LineChartProps = {
|
|
25
|
+
/**
|
|
26
|
+
* Color for axis ticks / labels.
|
|
27
|
+
* @default "gray"
|
|
28
|
+
*/
|
|
29
|
+
readonly axisColor?: LiteralUnion<AnsiColors, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Chart body height in character rows.
|
|
32
|
+
* @default 10
|
|
33
|
+
*/
|
|
34
|
+
readonly height?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Upper bound for the y-axis. When omitted the chart auto-scales.
|
|
37
|
+
*/
|
|
38
|
+
readonly maxY?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Lower bound for the y-axis. When omitted the chart auto-scales.
|
|
41
|
+
*/
|
|
42
|
+
readonly minY?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Fallback palette cycled through when a series does not set `color`.
|
|
45
|
+
* @default ["cyan", "magenta", "yellow", "green", "blue", "red"]
|
|
46
|
+
*/
|
|
47
|
+
readonly palette?: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
|
|
48
|
+
/**
|
|
49
|
+
* One or more line series.
|
|
50
|
+
*/
|
|
51
|
+
readonly series: ReadonlyArray<LineSeries>;
|
|
52
|
+
/**
|
|
53
|
+
* Render the legend row under the plot.
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
readonly showLegend?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Chart body width in character columns.
|
|
59
|
+
* @default 40
|
|
60
|
+
*/
|
|
61
|
+
readonly width?: number;
|
|
62
|
+
};
|
|
63
|
+
type RenderConfig = {
|
|
64
|
+
readonly axisColor: LiteralUnion<AnsiColors, string>;
|
|
65
|
+
readonly palette: ReadonlyArray<LiteralUnion<AnsiColors, string>>;
|
|
66
|
+
readonly seriesList: ReadonlyArray<{
|
|
67
|
+
color: LiteralUnion<AnsiColors, string>;
|
|
68
|
+
points: ReadonlyArray<Point>;
|
|
69
|
+
series: LineSeries;
|
|
70
|
+
}>;
|
|
71
|
+
readonly xMax: number;
|
|
72
|
+
readonly xMin: number;
|
|
73
|
+
readonly yMax: number;
|
|
74
|
+
readonly yMin: number;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Project an (x, y) data point into pixel-grid coordinates for the given
|
|
78
|
+
* canvas size. Used by every chart that paints on top of a braille grid.
|
|
79
|
+
*/
|
|
80
|
+
export declare const projectPoint: (point: Point, config: Pick<RenderConfig, "xMax" | "xMin" | "yMax" | "yMin">, pixelWidth: number, pixelHeight: number) => {
|
|
81
|
+
px: number;
|
|
82
|
+
py: number;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Shared drawing path used by LineChart and ScatterPlot. AreaChart wraps
|
|
86
|
+
* this with a fill pass.
|
|
87
|
+
*/
|
|
88
|
+
export declare const drawSeriesOnCanvas: (context: CanvasContext, mode: "line" | "scatter", config: RenderConfig) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Smooth multi-series line chart rendered at 2x4 sub-cell resolution using
|
|
91
|
+
* Unicode braille patterns. Auto-scales both axes by default.
|
|
92
|
+
*/
|
|
93
|
+
export default function LineChart({ axisColor, height, maxY, minY, palette, series, showLegend, width, }: LineChartProps): ReactElement;
|
|
94
|
+
export type { RenderConfig as LineChartRenderConfig };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { SpinnerName } from "@visulima/spinner";
|
|
3
|
+
import type { ReactElement, ReactNode } from "react";
|
|
4
|
+
import type { LiteralUnion } from "type-fest";
|
|
5
|
+
export type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Optional message rendered after the spinner.
|
|
8
|
+
*/
|
|
9
|
+
readonly children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Color used for the spinner and label.
|
|
12
|
+
* @default "cyan"
|
|
13
|
+
*/
|
|
14
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Spinner preset.
|
|
17
|
+
* @default "dots"
|
|
18
|
+
*/
|
|
19
|
+
readonly type?: SpinnerName;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Compact spinner + label for loading states.
|
|
23
|
+
*/
|
|
24
|
+
export default function LoadingIndicator({ children, color, type }: Props): ReactElement;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
export type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Initial raw value (digits/characters only, without mask symbols).
|
|
5
|
+
*/
|
|
6
|
+
readonly defaultValue?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Disable input and dim the display.
|
|
9
|
+
*/
|
|
10
|
+
readonly isDisabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Mask definition. Each `#` is replaced with a user character; any other
|
|
13
|
+
* character is rendered literally. Example: `(###) ###-####`.
|
|
14
|
+
*/
|
|
15
|
+
readonly mask: string;
|
|
16
|
+
/**
|
|
17
|
+
* Called whenever the underlying raw value changes.
|
|
18
|
+
*/
|
|
19
|
+
readonly onChange?: (value: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Called when the user presses Enter with the current raw value.
|
|
22
|
+
*/
|
|
23
|
+
readonly onSubmit?: (value: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder character used in the mask for empty positions.
|
|
26
|
+
* @default "_"
|
|
27
|
+
*/
|
|
28
|
+
readonly placeholderChar?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Character used to mark editable positions.
|
|
31
|
+
* @default "#"
|
|
32
|
+
*/
|
|
33
|
+
readonly token?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Input with a fixed-width mask. The mask token (`#` by default) marks
|
|
37
|
+
* positions where the user can type; every other character is preserved.
|
|
38
|
+
* Supports ←/→ to move within the mask, Home/End to jump, and
|
|
39
|
+
* Backspace/Delete to clear characters.
|
|
40
|
+
*/
|
|
41
|
+
export default function MaskedInput({ defaultValue, isDisabled, mask, onChange, onSubmit, placeholderChar, token, }: Props): ReactElement;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type MenuItem = {
|
|
5
|
+
/**
|
|
6
|
+
* Optional hotkey rendered on the right side of the row (e.g. `"Ctrl+S"`).
|
|
7
|
+
*/
|
|
8
|
+
readonly hotkey?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional icon rendered before the label.
|
|
11
|
+
*/
|
|
12
|
+
readonly icon?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Identifier returned by `onSelect`.
|
|
15
|
+
*/
|
|
16
|
+
readonly id: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, renders the item dimmed and skips it during navigation.
|
|
19
|
+
*/
|
|
20
|
+
readonly isDisabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Human-readable label.
|
|
23
|
+
*/
|
|
24
|
+
readonly label: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
export type MenuSection = {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly items: ReadonlyArray<MenuItem>;
|
|
29
|
+
readonly title?: string;
|
|
30
|
+
};
|
|
31
|
+
export type Props = {
|
|
32
|
+
/**
|
|
33
|
+
* Accent color for the focused item.
|
|
34
|
+
* @default "blue"
|
|
35
|
+
*/
|
|
36
|
+
readonly accentColor?: LiteralUnion<AnsiColors, string>;
|
|
37
|
+
/**
|
|
38
|
+
* Auto-focus the menu on mount.
|
|
39
|
+
*/
|
|
40
|
+
readonly autoFocus?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Render a border around the menu.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
readonly bordered?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Flat list of items. Ignored if `sections` is provided.
|
|
48
|
+
*/
|
|
49
|
+
readonly items?: ReadonlyArray<MenuItem>;
|
|
50
|
+
/**
|
|
51
|
+
* Called with the item id when the user presses Enter.
|
|
52
|
+
*/
|
|
53
|
+
readonly onSelect: (id: string) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Grouped items. Takes precedence over `items`.
|
|
56
|
+
*/
|
|
57
|
+
readonly sections?: ReadonlyArray<MenuSection>;
|
|
58
|
+
/**
|
|
59
|
+
* Optional title rendered at the top of the menu.
|
|
60
|
+
*/
|
|
61
|
+
readonly title?: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Dropdown / context menu with optional sections and disabled items.
|
|
65
|
+
* Keyboard: ↑/↓ (or j/k) to navigate, Enter to select, Esc to cancel.
|
|
66
|
+
* @param props See {@link Props}.
|
|
67
|
+
* @returns A `ReactElement` rendering the menu, optionally wrapped in a
|
|
68
|
+
* rounded border when `bordered` is true.
|
|
69
|
+
*/
|
|
70
|
+
export default function Menu({ accentColor, autoFocus, bordered, items, onSelect, sections, title }: Props): ReactElement;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type MessageRole = "assistant" | "system" | "tool" | "user";
|
|
5
|
+
export type Props = {
|
|
6
|
+
/**
|
|
7
|
+
* Bubble body.
|
|
8
|
+
*/
|
|
9
|
+
readonly children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Color override.
|
|
12
|
+
*/
|
|
13
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
14
|
+
/**
|
|
15
|
+
* When true, draws the bubble without a border.
|
|
16
|
+
*/
|
|
17
|
+
readonly flat?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Text rendered above the bubble (name, model, etc.).
|
|
20
|
+
*/
|
|
21
|
+
readonly label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional metadata rendered next to the label (e.g. timestamp).
|
|
24
|
+
*/
|
|
25
|
+
readonly meta?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Determines the alignment, color, and icon of the bubble.
|
|
28
|
+
* @default "assistant"
|
|
29
|
+
*/
|
|
30
|
+
readonly role?: MessageRole;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Chat-style message bubble for AI agent UIs.
|
|
34
|
+
*/
|
|
35
|
+
export default function MessageBubble({ children, color, flat, label, meta, role }: Props): ReactElement;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AnsiColors } from "@visulima/colorize";
|
|
2
|
+
import type { ReactElement, ReactNode } from "react";
|
|
3
|
+
import type { LiteralUnion } from "type-fest";
|
|
4
|
+
export type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* Background color of the badge.
|
|
7
|
+
* @default "magenta"
|
|
8
|
+
*/
|
|
9
|
+
readonly color?: LiteralUnion<AnsiColors, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Optional icon/symbol (e.g. `✨`, `◈`) shown before the label.
|
|
12
|
+
*/
|
|
13
|
+
readonly icon?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Short model identifier, e.g. `claude-opus-4.6`.
|
|
16
|
+
*/
|
|
17
|
+
readonly model: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional provider name rendered as a separate chip before the model.
|
|
20
|
+
*/
|
|
21
|
+
readonly provider?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Visual style.
|
|
24
|
+
* @default "solid"
|
|
25
|
+
*/
|
|
26
|
+
readonly variant?: "outline" | "solid" | "subtle";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Pill-shaped chip identifying the active model / provider. Pair with
|
|
30
|
+
* `MessageBubble` to label assistant output.
|
|
31
|
+
*/
|
|
32
|
+
export default function ModelBadge({ color, icon, model, provider, variant }: Props): ReactElement;
|