@visulima/tui 1.0.0-alpha.6 → 1.0.0-alpha.7
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 +19 -0
- package/dist/core/index.js +1 -5
- package/dist/ink/index.d.ts +15 -34
- package/dist/ink/index.js +1 -155
- package/dist/packem_chunks/devtools.js +3 -26
- package/dist/packem_shared/Accordion-BXsqchV-.js +1 -0
- package/dist/packem_shared/Alert-BhYVMHtR.js +1 -0
- package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +1 -0
- package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +1 -0
- package/dist/packem_shared/AreaChart-Chy-frI7.js +1 -0
- package/dist/packem_shared/Badge-B8WPyRsK.js +1 -0
- package/dist/packem_shared/BarChart-rpZtlMcF.js +1 -0
- package/dist/packem_shared/BigText-CRpwUzrt.js +1 -0
- package/dist/packem_shared/BlinkDot-BvnRuWP8.js +1 -0
- package/dist/packem_shared/Box-BwqSvWuq.js +1 -0
- package/dist/packem_shared/Breadcrumb-D0hClbRV.js +1 -0
- package/dist/packem_shared/Button-B89Yvbc6.js +1 -0
- package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-DqErf7XX.js +1 -0
- package/dist/packem_shared/Calendar-Dmflvm2S.js +1 -0
- package/dist/packem_shared/Canvas-CKg6WV47.js +1 -0
- package/dist/packem_shared/Card-B_9fXdtU.js +1 -0
- package/dist/packem_shared/Cell-BrXn3jxY.js +1 -0
- package/dist/packem_shared/Checkbox-BN71eCWU.js +1 -0
- package/dist/packem_shared/Code-HhevcyiH.js +2 -0
- package/dist/packem_shared/Collapsible-u6uf_FdV.js +1 -0
- package/dist/packem_shared/CommandBlock-B-nslpCv.js +4 -0
- package/dist/packem_shared/CommandPalette-CEFdaURo.js +1 -0
- package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +1 -0
- package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +1 -0
- package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +1 -0
- package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +1 -0
- package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +1 -0
- package/dist/packem_shared/Cursor-BoLFIMol.js +1 -0
- package/dist/packem_shared/DatePicker-CnSrFFAE.js +1 -0
- package/dist/packem_shared/DefinitionList-v8RDuF_R.js +1 -0
- package/dist/packem_shared/DevTools-O8EbCfHa.js +1 -0
- package/dist/packem_shared/Dialog-CTaL8pn0.js +1 -0
- package/dist/packem_shared/DiffView-BUIFqUB0.js +1 -0
- package/dist/packem_shared/Divider-C47bKmqu.js +1 -0
- package/dist/packem_shared/FilePicker-CUo7R5Qb.js +1 -0
- package/dist/packem_shared/FocusContext-Xy0cwJpO.js +1 -0
- package/dist/packem_shared/FormField-af3aUpRL.js +1 -0
- package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +1 -0
- package/dist/packem_shared/Gauge-Dz-usH__.js +1 -0
- package/dist/packem_shared/Gradient-DYNc0GZA.js +1 -0
- package/dist/packem_shared/Heading-mwEYza3Y.js +1 -0
- package/dist/packem_shared/Heatmap-ChL97U1-.js +1 -0
- package/dist/packem_shared/Help-Zcelyw_U.js +1 -0
- package/dist/packem_shared/Histogram-FIf2F83d.js +1 -0
- package/dist/packem_shared/IMECompositionBuffer-C89PhiOu.js +1 -0
- package/dist/packem_shared/InputParser-rZKjY_7Y.js +2 -0
- package/dist/packem_shared/KEY-Bk8B-3h_.js +1 -0
- package/dist/packem_shared/Kbd-DpkPp4jB.js +1 -0
- package/dist/packem_shared/LayoutNode-rxblE317.js +1 -0
- package/dist/packem_shared/LineChart-BXE_girm.js +1 -0
- package/dist/packem_shared/Link-i2o2EG4-.js +1 -0
- package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +1 -0
- package/dist/packem_shared/Markdown-R1XqK63D.js +1 -0
- package/dist/packem_shared/MaskedInput-J01phOZs.js +1 -0
- package/dist/packem_shared/Menu-CfrH4ymk.js +1 -0
- package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +1 -0
- package/dist/packem_shared/ModelBadge-D3wrXncu.js +1 -0
- package/dist/packem_shared/MouseProvider-pjza-lpc.js +1 -0
- package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +1 -0
- package/dist/packem_shared/NAMED_COLORS-B9fJsYdg.js +1 -0
- package/dist/packem_shared/Newline-BSG4iUqp.js +2 -0
- package/dist/packem_shared/OperationTree-DksxjMIV.js +1 -0
- package/dist/packem_shared/OptionList-CNx7r9yN.js +1 -0
- package/dist/packem_shared/OrderedList-BeDy035w.js +1 -0
- package/dist/packem_shared/Paginator-B56s6bhS.js +1 -0
- package/dist/packem_shared/Paragraph-BqJlH0R-.js +1 -0
- package/dist/packem_shared/Placeholder-GMpHRGC8.js +1 -0
- package/dist/packem_shared/ProgressBar-Bj3fmORR.js +1 -0
- package/dist/packem_shared/RadioGroup-Br8BeEwS.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/ScatterPlot-OhfYco5l.js +1 -0
- package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +1 -0
- package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +1 -0
- package/dist/packem_shared/ScrollList-DiVGyEjv.js +1 -0
- package/dist/packem_shared/ScrollView-BojONotI.js +1 -0
- package/dist/packem_shared/SearchInput-BoPTRbhV.js +1 -0
- package/dist/packem_shared/SelectInput-CAJ7SCBq.js +1 -0
- package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +1 -0
- package/dist/packem_shared/SelectInputItem-BEkbmobs.js +1 -0
- package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +1 -0
- package/dist/packem_shared/Slider-Cg_tJpKa.js +1 -0
- package/dist/packem_shared/Spacer-eT3HOrXk.js +1 -0
- package/dist/packem_shared/Sparkline-T6_FPVET.js +1 -0
- package/dist/packem_shared/Spinner-B0-A50pu.js +1 -0
- package/dist/packem_shared/Static-DLynr5pn.js +1 -0
- package/dist/packem_shared/Static-jzLPaHJF.js +1 -0
- package/dist/packem_shared/StaticRender-BgD61E7x.js +1 -0
- package/dist/packem_shared/StatusLine-Ch4jjef1.js +1 -0
- package/dist/packem_shared/StatusMessage-B1qfKeMM.js +1 -0
- package/dist/packem_shared/Stepper-CNPAqxiU.js +1 -0
- package/dist/packem_shared/Stopwatch-CAx2EWwq.js +1 -0
- package/dist/packem_shared/StreamingText-BYOKSB2T.js +1 -0
- package/dist/packem_shared/Switch-DzSpKYu7.js +1 -0
- package/dist/packem_shared/Tab-BcXzSUdj.js +1 -0
- package/dist/packem_shared/Table-DJp1TLrR.js +1 -0
- package/dist/packem_shared/Tabs-D68z0SOt.js +1 -0
- package/dist/packem_shared/Tag-BvLHnYRn.js +1 -0
- package/dist/packem_shared/Text-mTAve9R2.js +1 -0
- package/dist/packem_shared/TextInput-C_gYQlnF.js +1 -0
- package/dist/packem_shared/Textarea-C2ET_oMb.js +2 -0
- package/dist/packem_shared/Timer-CI3aQX65.js +1 -0
- package/dist/packem_shared/Toast-Drvc8XfG.js +1 -0
- package/dist/packem_shared/Tooltip-C5UnQlLd.js +1 -0
- package/dist/packem_shared/Transform-fYmcdqRT.js +1 -0
- package/dist/packem_shared/Transition-CJDBKYUB.js +1 -0
- package/dist/packem_shared/TreeNodeMap-CspqSCpb.js +1 -0
- package/dist/packem_shared/TreeView-DjhacGJ5.js +1 -0
- package/dist/packem_shared/TuiApp-DrjI_i-R.js +1 -0
- package/dist/packem_shared/TuiContext-BoJvG3NN.js +3 -0
- package/dist/packem_shared/UnorderedList-BnfqexZs.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-B6uXaq65.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/colorize-DbTZMrJO.js +1 -0
- package/dist/packem_shared/comparePoints-C85EsmNz.js +1 -0
- package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +1 -0
- package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +2 -0
- package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +1 -0
- package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +2 -0
- package/dist/packem_shared/createScreen-CrLrxA6t.js +3 -0
- package/dist/packem_shared/cursor-context-CFviBqPX.js +1 -0
- package/dist/packem_shared/dom-4y__5fWB.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/getPathToRoot-B2tKmx3i.js +1 -0
- package/dist/packem_shared/getScrollHeight-BTEY8ewu.js +1 -0
- package/dist/packem_shared/input-utils-fAxzSlNh.js +1 -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/line-chart-DrM8PwnI.js +1 -0
- package/dist/packem_shared/measure-element-DSp7YDus.js +2 -0
- package/dist/packem_shared/measure-text-DDjHT1jD.js +3 -0
- package/dist/packem_shared/measureElement-DA8WqFP_.js +1 -0
- package/dist/packem_shared/mouse-context-DaARgUu1.js +1 -0
- package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +1 -0
- package/dist/packem_shared/processLayout-DXDfFb_d.js +1 -0
- package/dist/packem_shared/reconciler-BuOP-TZ6.js +1 -0
- package/dist/packem_shared/reconciler-DSYCrIZs.js +1 -0
- package/dist/packem_shared/render-DDqtMAFN.js +1 -0
- package/dist/packem_shared/render-_r0K9K11.js +28 -0
- package/dist/packem_shared/renderToString-DeqOWRP8.js +4 -0
- package/dist/packem_shared/renderToString-IYYPyASm.js +2 -0
- package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +2 -0
- package/dist/packem_shared/renderer-D2p6av2X.js +17 -0
- package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +1 -0
- package/dist/packem_shared/squashTextNodesWithMap-Cpqmc45i.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/text-width-CZ9vPvM0.js +2 -0
- package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +1 -0
- package/dist/packem_shared/treeViewTheme-1RIZyB4M.js +1 -0
- package/dist/packem_shared/useAnimation-B9we6ZzL.js +1 -0
- package/dist/packem_shared/useApp-B6fvM42d.js +1 -0
- package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +1 -0
- package/dist/packem_shared/useClipboard-CBxy0hT8.js +1 -0
- package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +1 -0
- package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +1 -0
- package/dist/packem_shared/useCursor-CPu8T5Db.js +1 -0
- package/dist/packem_shared/useElementDimensions-qJ_WXFZ9.js +1 -0
- package/dist/packem_shared/useFocus-DSmziO_x.js +1 -0
- package/dist/packem_shared/useFocusManager-Uapn3LQo.js +1 -0
- package/dist/packem_shared/useForm-CzV-Oext.js +1 -0
- package/dist/packem_shared/useHotkey-D0dGey14.js +1 -0
- package/dist/packem_shared/useInput-D1_jG26Z.js +2 -0
- package/dist/packem_shared/useInterval-AobjZT3u.js +1 -0
- package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +1 -0
- package/dist/packem_shared/useKeyBindings-zabkEJQs.js +1 -0
- package/dist/packem_shared/useKeyChord-CICQIxXj.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/usePaste-CKKB9H-Z.js +1 -0
- package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +1 -0
- package/dist/packem_shared/useScrollInput-Caghtn-Q.js +1 -0
- package/dist/packem_shared/useStderr-BDZb6InG.js +1 -0
- package/dist/packem_shared/useStdin-DKa4h35k.js +1 -0
- package/dist/packem_shared/useStdout-B-2lX4C5.js +1 -0
- package/dist/packem_shared/useStopwatch-DffK7iMh.js +1 -0
- package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +1 -0
- package/dist/packem_shared/useTextBuffer-DekkGLxI.js +4 -0
- package/dist/packem_shared/useTextSelection-CGT0GLDR.js +1 -0
- package/dist/packem_shared/useTimeout-7LEFYTnG.js +1 -0
- package/dist/packem_shared/useTimer-DyoqSyGi.js +1 -0
- package/dist/packem_shared/useTreeView-8UlTK6sW.js +1 -0
- package/dist/packem_shared/useTreeViewState-CRPCUWrb.js +1 -0
- package/dist/packem_shared/useWindowSize-yDZsXF8z.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/waitFor-Dj5zfL5s.js +4 -0
- package/dist/packem_shared/wrapOrTruncateStyledLine-BZ00SM8i.js +3 -0
- package/dist/react/index.js +1 -9
- package/dist/testing/index.js +1 -152
- package/package.json +9 -9
- package/dist/packem_shared/Accordion-BG-yfIkV.js +0 -80
- package/dist/packem_shared/Alert-BLcwIW8V.js +0 -17
- package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +0 -98
- package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +0 -104
- package/dist/packem_shared/AreaChart-CmTcxLum.js +0 -116
- package/dist/packem_shared/Badge-CUfbXwAB.js +0 -13
- package/dist/packem_shared/BarChart-DWRae67P.js +0 -87
- package/dist/packem_shared/BigText-CVq2X7B5.js +0 -24
- package/dist/packem_shared/BlinkDot-CrbHMR3L.js +0 -11
- package/dist/packem_shared/Box-W1w_NGin.js +0 -71
- package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +0 -26
- package/dist/packem_shared/Button-CBmTbJ_D.js +0 -57
- package/dist/packem_shared/COLOR_BLINDNESS_SIMULATION-BsMy5Ewl.js +0 -81
- package/dist/packem_shared/Calendar-C2Qxt-LA.js +0 -139
- package/dist/packem_shared/Canvas-COttmLPX.js +0 -246
- package/dist/packem_shared/Card-D3tGkNCm.js +0 -24
- package/dist/packem_shared/Cell-DCg1kJY-.js +0 -48
- package/dist/packem_shared/Checkbox-Dpy_4Lws.js +0 -49
- package/dist/packem_shared/Code-CwzzbsLx.js +0 -53
- package/dist/packem_shared/Collapsible-BMDrXf5C.js +0 -45
- package/dist/packem_shared/CommandBlock-jdOGJPjY.js +0 -80
- package/dist/packem_shared/CommandPalette-B5IfUQwi.js +0 -146
- package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +0 -67
- package/dist/packem_shared/ConfirmInput-CxUS0XAA.js +0 -44
- package/dist/packem_shared/ConsoleOverlay-BvnCEgjG.js +0 -57
- package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +0 -81
- package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +0 -5
- package/dist/packem_shared/Cursor-DiW7YoSK.js +0 -18
- package/dist/packem_shared/DatePicker-CPejKoqS.js +0 -73
- package/dist/packem_shared/DefinitionList-BAwr0l5J.js +0 -18
- package/dist/packem_shared/DevTools-BdxRSkhL.js +0 -63
- package/dist/packem_shared/Dialog-S9r7Izff.js +0 -71
- package/dist/packem_shared/DiffView-BR4T6-Sj.js +0 -329
- package/dist/packem_shared/Divider-DocXIqNn.js +0 -30
- package/dist/packem_shared/FilePicker-BZ55oF_n.js +0 -261
- package/dist/packem_shared/FocusContext-D5wFxSRz.js +0 -153
- package/dist/packem_shared/FormField-BSG16cnA.js +0 -29
- package/dist/packem_shared/Fullscreen-DO7voOq5.js +0 -11
- package/dist/packem_shared/Gauge-CKXUXxft.js +0 -122
- package/dist/packem_shared/Gradient-Dg0NezWc.js +0 -136
- package/dist/packem_shared/Heading-BnR7McmP.js +0 -29
- package/dist/packem_shared/Heatmap-_jqISOU0.js +0 -79
- package/dist/packem_shared/Help-0yZ_IcQg.js +0 -105
- package/dist/packem_shared/Histogram-CB6XcmZW.js +0 -92
- package/dist/packem_shared/IMECompositionBuffer-Dl3S0KnF.js +0 -55
- package/dist/packem_shared/InputParser-BlsfeY9J.js +0 -158
- package/dist/packem_shared/KEY-STOdi-nc.js +0 -74
- package/dist/packem_shared/Kbd-BNDXQgey.js +0 -19
- package/dist/packem_shared/LayoutNode-DAkKg9TE.js +0 -129
- package/dist/packem_shared/LineChart-ef3HF816.js +0 -7
- package/dist/packem_shared/Link-DZ2Tiq1m.js +0 -66
- package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +0 -13
- package/dist/packem_shared/Markdown-33bpCUoe.js +0 -212
- package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +0 -119
- package/dist/packem_shared/Menu-CeKxhEix.js +0 -112
- package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +0 -26
- package/dist/packem_shared/ModelBadge-CNIxPs7v.js +0 -40
- package/dist/packem_shared/MouseProvider-CekPbXCh.js +0 -136
- package/dist/packem_shared/MultiSelect-yz7-w0Zv.js +0 -129
- package/dist/packem_shared/NAMED_COLORS-DcI3erCu.js +0 -300
- package/dist/packem_shared/Newline-DBtYEg8x.js +0 -7
- package/dist/packem_shared/OperationTree-Dudx5o1o.js +0 -67
- package/dist/packem_shared/OptionList-CTyqQaZ1.js +0 -24
- package/dist/packem_shared/OrderedList-VsvSmHUC.js +0 -26
- package/dist/packem_shared/Paginator-DmGogvEI.js +0 -104
- package/dist/packem_shared/Paragraph-CNNhfepo.js +0 -9
- package/dist/packem_shared/Placeholder-DkM69Q8Z.js +0 -29
- package/dist/packem_shared/ProgressBar-B7cS4uQm.js +0 -22
- package/dist/packem_shared/RadioGroup-B4F9PUyL.js +0 -108
- package/dist/packem_shared/Renderer-zZ5O3vxc.js +0 -31
- package/dist/packem_shared/ResizeObserverEntry-Vr8GZ74x.js +0 -102
- package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +0 -63
- package/dist/packem_shared/ScrollBar-DFeWH43I.js +0 -106
- package/dist/packem_shared/ScrollBarBox-C7VL6Izd.js +0 -72
- package/dist/packem_shared/ScrollList-DRcr_RrN.js +0 -227
- package/dist/packem_shared/ScrollView-C6rdlGwU.js +0 -196
- package/dist/packem_shared/SearchInput-cB8zFhSg.js +0 -32
- package/dist/packem_shared/SelectInput-WzZSqp72.js +0 -260
- package/dist/packem_shared/SelectInputIndicator-DKeN6v5Z.js +0 -9
- package/dist/packem_shared/SelectInputItem-CxFL3spM.js +0 -8
- package/dist/packem_shared/ShimmerText-B2VbPUSB.js +0 -34
- package/dist/packem_shared/Slider-BOrNTOQe.js +0 -116
- package/dist/packem_shared/Spacer-DhmXyTb8.js +0 -8
- package/dist/packem_shared/Sparkline-BSbjPrwK.js +0 -44
- package/dist/packem_shared/Spinner-BcO5BCAa.js +0 -1942
- package/dist/packem_shared/Static-DpTd6Eed.js +0 -22
- package/dist/packem_shared/Static-xmD9giJj.js +0 -18
- package/dist/packem_shared/StaticRender-C3XWvJdC.js +0 -69
- package/dist/packem_shared/StatusLine-DQNUstN9.js +0 -22
- package/dist/packem_shared/StatusMessage-BYTL6Pl-.js +0 -14
- package/dist/packem_shared/Stepper-CmUPRK3z.js +0 -60
- package/dist/packem_shared/Stopwatch-zqLQAxXC.js +0 -21
- package/dist/packem_shared/StreamingText-BmuoJtGu.js +0 -38
- package/dist/packem_shared/Switch-DcPdy8nm.js +0 -59
- package/dist/packem_shared/Tab-C6r5q4hR.js +0 -7
- package/dist/packem_shared/Table-Bgxo87Df.js +0 -88
- package/dist/packem_shared/Tabs-DubuHdYV.js +0 -164
- package/dist/packem_shared/Tag-CCqM7Ee9.js +0 -35
- package/dist/packem_shared/Text-CtUwV89_.js +0 -65
- package/dist/packem_shared/TextInput-C9r7zT0U.js +0 -137
- package/dist/packem_shared/Textarea-CGmgt-Nl.js +0 -272
- package/dist/packem_shared/Timer-D7ZZ0_wz.js +0 -20
- package/dist/packem_shared/Toast-DXSCXFPY.js +0 -37
- package/dist/packem_shared/Tooltip-SvVjj-2k.js +0 -32
- package/dist/packem_shared/Transform-Cfyva2wd.js +0 -14
- package/dist/packem_shared/Transition-CbNfKhaj.js +0 -108
- package/dist/packem_shared/TreeNodeMap-CtJUvBnd.js +0 -155
- package/dist/packem_shared/TreeView-DGlZeSsK.js +0 -148
- package/dist/packem_shared/TuiApp-DtdgNRWa.js +0 -122
- package/dist/packem_shared/TuiContext-lXmJFd-x.js +0 -418
- package/dist/packem_shared/UnorderedList-D8RPaEAW.js +0 -33
- package/dist/packem_shared/accessibility-context-BLelHhNU.js +0 -7
- package/dist/packem_shared/animation-context-BcJg8Jr6.js +0 -15
- package/dist/packem_shared/ansi-parser-BOP8fNdT.js +0 -43
- package/dist/packem_shared/ansi-tokenizer-LHq2LUWA.js +0 -307
- package/dist/packem_shared/app-context-CP0U6H7O.js +0 -11
- package/dist/packem_shared/background-context-BAUaxfOb.js +0 -5
- package/dist/packem_shared/boxes-oi3WUbyR.js +0 -92
- package/dist/packem_shared/braille-BoEWoH2I.js +0 -93
- package/dist/packem_shared/colorize-88_Vk8cn.js +0 -48
- package/dist/packem_shared/comparePoints-CAAlhiMS.js +0 -287
- package/dist/packem_shared/controlled-scroll-view-DJXfdWMm.js +0 -286
- package/dist/packem_shared/createInlineLoop-Dnfm1ZSJ.js +0 -99
- package/dist/packem_shared/createLinkedScrollGroup-Djw4Ceo0.js +0 -44
- package/dist/packem_shared/createMemoryStorage-esFJ61La.js +0 -115
- package/dist/packem_shared/createScreen-Dh0sZlQ0.js +0 -38
- package/dist/packem_shared/cursor-context-JxRzlqAx.js +0 -9
- package/dist/packem_shared/dom-CrbpQgat.js +0 -228
- package/dist/packem_shared/focus-context-CWkYtgcm.js +0 -26
- package/dist/packem_shared/format-time-BGmnDukX.js +0 -12
- package/dist/packem_shared/getPathToRoot-BbvlppLC.js +0 -4
- package/dist/packem_shared/getScrollHeight-Cz3CDQN2.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/line-chart-VGU2l7pu.js +0 -139
- package/dist/packem_shared/measure-element-Bc6PEaIe.js +0 -405
- package/dist/packem_shared/measure-text-BdOhbOeh.js +0 -1256
- package/dist/packem_shared/measureElement-DTELRaij.js +0 -4
- package/dist/packem_shared/mouse-context-BUHWKEIe.js +0 -6
- package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +0 -1
- package/dist/packem_shared/processLayout-B0Coz0Ua.js +0 -2
- package/dist/packem_shared/reconciler-Dd7Z0A97.js +0 -696
- package/dist/packem_shared/reconciler-mzMwSOft.js +0 -221
- package/dist/packem_shared/render-Bm9Oa1sG.js +0 -2799
- package/dist/packem_shared/render-CjlKdg4m.js +0 -199
- package/dist/packem_shared/renderToString-CWYS1ZXE.js +0 -86
- package/dist/packem_shared/renderToString-DB3ILWFm.js +0 -62
- package/dist/packem_shared/renderTreeToBuffer-CDDTGyZn.js +0 -311
- package/dist/packem_shared/renderer-GE9OLNNM.js +0 -1437
- package/dist/packem_shared/setEnableStyledLineCache-D5f4favX.js +0 -2
- package/dist/packem_shared/squashTextNodesWithMap-iqm6OMMT.js +0 -100
- package/dist/packem_shared/stderr-context-Bj4Mf7v7.js +0 -17
- package/dist/packem_shared/stdin-context-Bq_GNJ3z.js +0 -38
- package/dist/packem_shared/stdout-context-CgjWeCdO.js +0 -17
- package/dist/packem_shared/text-width-Db-AxMea.js +0 -43
- package/dist/packem_shared/token-to-elements-CK4s8MJd.js +0 -249
- package/dist/packem_shared/treeViewTheme-BpSw9TMf.js +0 -52
- package/dist/packem_shared/useAnimation-DV22qxiJ.js +0 -62
- package/dist/packem_shared/useApp-Cbi788rV.js +0 -6
- package/dist/packem_shared/useBoxMetrics-_5icypir.js +0 -54
- package/dist/packem_shared/useClipboard-MNj6MNR-.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-DS6LjIgv.js +0 -19
- package/dist/packem_shared/useElementDimensions-CAoKitVD.js +0 -67
- package/dist/packem_shared/useFocus-DLoGQJd9.js +0 -37
- package/dist/packem_shared/useFocusManager-UeZWtnNc.js +0 -16
- package/dist/packem_shared/useForm-sQENbEuv.js +0 -88
- package/dist/packem_shared/useHotkey-D9giUX3q.js +0 -112
- package/dist/packem_shared/useInput-DKZbqMRc.js +0 -594
- package/dist/packem_shared/useInterval-CSXM8c2I.js +0 -32
- package/dist/packem_shared/useIsScreenReaderEnabled-BeoVqo1R.js +0 -9
- package/dist/packem_shared/useKeyBindings-S4fSIEAk.js +0 -66
- package/dist/packem_shared/useKeyChord-BmXGNuEO.js +0 -114
- 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-png73gvT.js +0 -35
- package/dist/packem_shared/useScrollAcceleration-R9LfrPVG.js +0 -73
- package/dist/packem_shared/useScrollInput-DfzRGQFe.js +0 -72
- package/dist/packem_shared/useStderr-BSWerMZ7.js +0 -6
- package/dist/packem_shared/useStdin-Rf0zPzVA.js +0 -7
- package/dist/packem_shared/useStdout-B5yRcg9N.js +0 -6
- package/dist/packem_shared/useStopwatch-C__Zu6hd.js +0 -33
- package/dist/packem_shared/useTerminalPalette-CtFG2JTq.js +0 -38
- package/dist/packem_shared/useTextBuffer-C8fEe9Ly.js +0 -398
- package/dist/packem_shared/useTextSelection-ChrYZXsn.js +0 -50
- package/dist/packem_shared/useTimeout-DuCqgWPX.js +0 -34
- package/dist/packem_shared/useTimer-DnBtbhB5.js +0 -46
- package/dist/packem_shared/useTreeView-mkN5Di7w.js +0 -101
- package/dist/packem_shared/useTreeViewState-BpS_KZ-K.js +0 -502
- package/dist/packem_shared/useWindowSize-D3UU41mv.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/waitFor-Cv9M2jKA.js +0 -39
- package/dist/packem_shared/wrapOrTruncateStyledLine-49Mne3t3.js +0 -147
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRef, useMemo, Fragment } from 'react';
|
|
3
|
-
import { c as colorize } from './colorize-88_Vk8cn.js';
|
|
4
|
-
import Box from './Box-W1w_NGin.js';
|
|
5
|
-
import Text from './Text-CtUwV89_.js';
|
|
6
|
-
|
|
7
|
-
const STYLE_BOLD = Math.trunc(1);
|
|
8
|
-
const STYLE_DIM = 1 << 1;
|
|
9
|
-
const SPACE_CODEPOINT = 32;
|
|
10
|
-
const EMPTY_COLOR = 0;
|
|
11
|
-
const createColorCoders = () => {
|
|
12
|
-
const encoded = /* @__PURE__ */ new Map();
|
|
13
|
-
const decoded = [void 0];
|
|
14
|
-
return {
|
|
15
|
-
decode: (id) => decoded[id],
|
|
16
|
-
encode: (color) => {
|
|
17
|
-
if (color === void 0 || color === null) {
|
|
18
|
-
return EMPTY_COLOR;
|
|
19
|
-
}
|
|
20
|
-
const key = typeof color === "number" ? `n:${color}` : `s:${color}`;
|
|
21
|
-
const existing = encoded.get(key);
|
|
22
|
-
if (existing !== void 0) {
|
|
23
|
-
return existing;
|
|
24
|
-
}
|
|
25
|
-
const next = decoded.length;
|
|
26
|
-
decoded.push(color);
|
|
27
|
-
encoded.set(key, next);
|
|
28
|
-
return next;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
const V_BAR_GLYPHS = [9601, 9602, 9603, 9604, 9605, 9606, 9607, 9608];
|
|
33
|
-
const H_BAR_GLYPHS = [9615, 9614, 9613, 9612, 9611, 9610, 9609, 9608];
|
|
34
|
-
const FULL_BLOCK = 9608;
|
|
35
|
-
const flagsFromStyle = (style) => {
|
|
36
|
-
if (!style) {
|
|
37
|
-
return 0;
|
|
38
|
-
}
|
|
39
|
-
let flags = 0;
|
|
40
|
-
if (style.bold) {
|
|
41
|
-
flags |= STYLE_BOLD;
|
|
42
|
-
}
|
|
43
|
-
if (style.dim) {
|
|
44
|
-
flags |= STYLE_DIM;
|
|
45
|
-
}
|
|
46
|
-
return flags;
|
|
47
|
-
};
|
|
48
|
-
const toCodepoint = (char) => {
|
|
49
|
-
if (typeof char === "number") {
|
|
50
|
-
return char;
|
|
51
|
-
}
|
|
52
|
-
return char.codePointAt(0) ?? SPACE_CODEPOINT;
|
|
53
|
-
};
|
|
54
|
-
const createCanvasBuffer = (width, height) => {
|
|
55
|
-
const cells = Math.max(0, width * height);
|
|
56
|
-
const chars = new Uint32Array(cells);
|
|
57
|
-
const styles = new Uint32Array(cells);
|
|
58
|
-
const fg = new Int32Array(cells);
|
|
59
|
-
const bg = new Int32Array(cells);
|
|
60
|
-
const dirty = new Uint8Array(height);
|
|
61
|
-
const { decode, encode } = createColorCoders();
|
|
62
|
-
chars.fill(SPACE_CODEPOINT);
|
|
63
|
-
const markDirty = (y) => {
|
|
64
|
-
if (y >= 0 && y < height) {
|
|
65
|
-
dirty[y] = 1;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const setCellImpl = (x, y, char, style) => {
|
|
69
|
-
if (x < 0 || x >= width || y < 0 || y >= height) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const index = y * width + x;
|
|
73
|
-
const codepoint = toCodepoint(char);
|
|
74
|
-
const fgId = encode(style?.color);
|
|
75
|
-
const bgId = encode(style?.background);
|
|
76
|
-
const flags = flagsFromStyle(style);
|
|
77
|
-
if (chars[index] === codepoint && styles[index] === flags && fg[index] === fgId && bg[index] === bgId) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
chars[index] = codepoint;
|
|
81
|
-
styles[index] = flags;
|
|
82
|
-
fg[index] = fgId;
|
|
83
|
-
bg[index] = bgId;
|
|
84
|
-
dirty[y] = 1;
|
|
85
|
-
};
|
|
86
|
-
const context = {
|
|
87
|
-
clear: () => {
|
|
88
|
-
chars.fill(SPACE_CODEPOINT);
|
|
89
|
-
styles.fill(0);
|
|
90
|
-
fg.fill(0);
|
|
91
|
-
bg.fill(0);
|
|
92
|
-
dirty.fill(1);
|
|
93
|
-
},
|
|
94
|
-
drawHBar: (x, y, w, fillRatio, style) => {
|
|
95
|
-
if (w <= 0 || y < 0 || y >= height) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const ratio = Math.max(0, Math.min(1, fillRatio));
|
|
99
|
-
const total = w * H_BAR_GLYPHS.length;
|
|
100
|
-
const filled = Math.round(ratio * total);
|
|
101
|
-
const fullChars = Math.floor(filled / H_BAR_GLYPHS.length);
|
|
102
|
-
const remainder = filled % H_BAR_GLYPHS.length;
|
|
103
|
-
for (let column = 0; column < w; column += 1) {
|
|
104
|
-
const px = x + column;
|
|
105
|
-
if (column < fullChars) {
|
|
106
|
-
setCellImpl(px, y, FULL_BLOCK, style);
|
|
107
|
-
} else if (column === fullChars && remainder > 0) {
|
|
108
|
-
setCellImpl(px, y, H_BAR_GLYPHS[remainder - 1], style);
|
|
109
|
-
} else {
|
|
110
|
-
setCellImpl(px, y, SPACE_CODEPOINT, style);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
markDirty(y);
|
|
114
|
-
},
|
|
115
|
-
drawRect: (x, y, w, h, char, style) => {
|
|
116
|
-
if (w <= 0 || h <= 0) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const codepoint = toCodepoint(char);
|
|
120
|
-
for (let dy = 0; dy < h; dy += 1) {
|
|
121
|
-
for (let dx = 0; dx < w; dx += 1) {
|
|
122
|
-
setCellImpl(x + dx, y + dy, codepoint, style);
|
|
123
|
-
}
|
|
124
|
-
markDirty(y + dy);
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
drawText: (x, y, text, style) => {
|
|
128
|
-
if (y < 0 || y >= height || text.length === 0) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
let column = 0;
|
|
132
|
-
for (const char of text) {
|
|
133
|
-
setCellImpl(x + column, y, char, style);
|
|
134
|
-
column += 1;
|
|
135
|
-
}
|
|
136
|
-
markDirty(y);
|
|
137
|
-
},
|
|
138
|
-
drawVBar: (x, y, h, fillRatio, style) => {
|
|
139
|
-
if (h <= 0 || x < 0 || x >= width) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const ratio = Math.max(0, Math.min(1, fillRatio));
|
|
143
|
-
const total = h * V_BAR_GLYPHS.length;
|
|
144
|
-
const filled = Math.round(ratio * total);
|
|
145
|
-
const fullRows = Math.floor(filled / V_BAR_GLYPHS.length);
|
|
146
|
-
const remainder = filled % V_BAR_GLYPHS.length;
|
|
147
|
-
for (let row = 0; row < h; row += 1) {
|
|
148
|
-
const distanceFromBottom = h - row - 1;
|
|
149
|
-
const py = y + row;
|
|
150
|
-
if (distanceFromBottom < fullRows) {
|
|
151
|
-
setCellImpl(x, py, FULL_BLOCK, style);
|
|
152
|
-
} else if (distanceFromBottom === fullRows && remainder > 0) {
|
|
153
|
-
setCellImpl(x, py, V_BAR_GLYPHS[remainder - 1], style);
|
|
154
|
-
} else {
|
|
155
|
-
setCellImpl(x, py, SPACE_CODEPOINT, style);
|
|
156
|
-
}
|
|
157
|
-
markDirty(py);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
height,
|
|
161
|
-
setCell: setCellImpl,
|
|
162
|
-
width
|
|
163
|
-
};
|
|
164
|
-
return {
|
|
165
|
-
bg,
|
|
166
|
-
chars,
|
|
167
|
-
colorDecoder: decode,
|
|
168
|
-
context,
|
|
169
|
-
dirty,
|
|
170
|
-
fg,
|
|
171
|
-
height,
|
|
172
|
-
styles,
|
|
173
|
-
width
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
const serializeRow = (buffer, row) => {
|
|
177
|
-
const { bg, chars, colorDecoder, fg, styles, width } = buffer;
|
|
178
|
-
const base = row * width;
|
|
179
|
-
let output = "";
|
|
180
|
-
let spanStart = 0;
|
|
181
|
-
let spanStyles = styles[base];
|
|
182
|
-
let spanFg = fg[base];
|
|
183
|
-
let spanBg = bg[base];
|
|
184
|
-
const flush = (end) => {
|
|
185
|
-
let text = "";
|
|
186
|
-
for (let index = spanStart; index < end; index += 1) {
|
|
187
|
-
text += String.fromCodePoint(chars[base + index]);
|
|
188
|
-
}
|
|
189
|
-
const fgColor = colorDecoder(spanFg);
|
|
190
|
-
const bgColor = colorDecoder(spanBg);
|
|
191
|
-
let rendered = text;
|
|
192
|
-
if (fgColor !== void 0 && fgColor !== null) {
|
|
193
|
-
rendered = colorize(rendered, typeof fgColor === "number" ? String(fgColor) : fgColor, "foreground");
|
|
194
|
-
}
|
|
195
|
-
if (bgColor !== void 0 && bgColor !== null) {
|
|
196
|
-
rendered = colorize(rendered, typeof bgColor === "number" ? String(bgColor) : bgColor, "background");
|
|
197
|
-
}
|
|
198
|
-
if ((spanStyles & STYLE_BOLD) !== 0) {
|
|
199
|
-
rendered = `\x1B[1m${rendered}\x1B[22m`;
|
|
200
|
-
}
|
|
201
|
-
if ((spanStyles & STYLE_DIM) !== 0) {
|
|
202
|
-
rendered = `\x1B[2m${rendered}\x1B[22m`;
|
|
203
|
-
}
|
|
204
|
-
output += rendered;
|
|
205
|
-
};
|
|
206
|
-
for (let column = 1; column < width; column += 1) {
|
|
207
|
-
const nextStyles = styles[base + column];
|
|
208
|
-
const nextFg = fg[base + column];
|
|
209
|
-
const nextBg = bg[base + column];
|
|
210
|
-
if (nextStyles !== spanStyles || nextFg !== spanFg || nextBg !== spanBg) {
|
|
211
|
-
flush(column);
|
|
212
|
-
spanStart = column;
|
|
213
|
-
spanStyles = nextStyles;
|
|
214
|
-
spanFg = nextFg;
|
|
215
|
-
spanBg = nextBg;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
flush(width);
|
|
219
|
-
return output;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
function Canvas({ draw, height, version, width }) {
|
|
223
|
-
const bufferRef = useRef(void 0);
|
|
224
|
-
const rowCacheRef = useRef(void 0);
|
|
225
|
-
if (bufferRef.current?.width !== width || bufferRef.current.height !== height) {
|
|
226
|
-
bufferRef.current = createCanvasBuffer(width, height);
|
|
227
|
-
rowCacheRef.current = { hasRendered: false, lines: new Array(height).fill("") };
|
|
228
|
-
}
|
|
229
|
-
const buffer = bufferRef.current;
|
|
230
|
-
const cache = rowCacheRef.current;
|
|
231
|
-
const rows = useMemo(() => {
|
|
232
|
-
draw(buffer.context);
|
|
233
|
-
for (let row = 0; row < buffer.height; row += 1) {
|
|
234
|
-
if (cache.hasRendered && buffer.dirty[row] === 0) {
|
|
235
|
-
continue;
|
|
236
|
-
}
|
|
237
|
-
cache.lines[row] = serializeRow(buffer, row);
|
|
238
|
-
buffer.dirty[row] = 0;
|
|
239
|
-
}
|
|
240
|
-
cache.hasRendered = true;
|
|
241
|
-
return [...cache.lines];
|
|
242
|
-
}, [version, width, height]);
|
|
243
|
-
return jsx(Box, { flexDirection: "column", flexShrink: 0, height, width, children: rows.map((line, index) => jsx(Fragment, { children: jsx(Text, { wrap: "truncate-end", children: line }) }, index)) });
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export { Canvas as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import Box from './Box-W1w_NGin.js';
|
|
3
|
-
import Divider from './Divider-DocXIqNn.js';
|
|
4
|
-
import Text from './Text-CtUwV89_.js';
|
|
5
|
-
|
|
6
|
-
function Card({ borderColor, borderStyle = "round", children, footer, headerRight, subtitle, title, titleColor, width }) {
|
|
7
|
-
const hasHeader = title !== void 0 || subtitle !== void 0 || headerRight !== void 0;
|
|
8
|
-
return jsxs(Box, { borderColor, borderStyle, flexDirection: "column", paddingX: 1, width, children: [
|
|
9
|
-
hasHeader ? jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
|
|
10
|
-
jsxs(Box, { justifyContent: "space-between", children: [
|
|
11
|
-
jsx(Box, { children: title === void 0 ? void 0 : jsx(Text, { bold: true, color: titleColor, children: title }) }),
|
|
12
|
-
headerRight === void 0 ? void 0 : jsx(Box, { children: headerRight })
|
|
13
|
-
] }),
|
|
14
|
-
subtitle === void 0 ? void 0 : jsx(Text, { dimColor: true, children: subtitle })
|
|
15
|
-
] }) : void 0,
|
|
16
|
-
jsx(Box, { flexDirection: "column", children }),
|
|
17
|
-
footer === void 0 ? void 0 : jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
18
|
-
jsx(Divider, { dimColor: true, length: typeof width === "number" ? Math.max(1, width - 4) : void 0 }),
|
|
19
|
-
jsx(Box, { marginTop: 1, children: footer })
|
|
20
|
-
] })
|
|
21
|
-
] });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { Card as default };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const Cell = {
|
|
2
|
-
/** Read bg color from an attr slot value (buffer[idx*2+1]) — bits 15:8 */
|
|
3
|
-
getBg(attributeSlot) {
|
|
4
|
-
return attributeSlot >> 8 & 255;
|
|
5
|
-
},
|
|
6
|
-
/** Read the char character from a raw char slot value (buffer[idx*2]) */
|
|
7
|
-
getChar(charSlot) {
|
|
8
|
-
if (charSlot === 0) {
|
|
9
|
-
return " ";
|
|
10
|
-
}
|
|
11
|
-
if (charSlot > 1114111) {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
return String.fromCodePoint(charSlot);
|
|
15
|
-
},
|
|
16
|
-
/** Read fg color from an attr slot value (buffer[idx*2+1]) — bits 7:0 */
|
|
17
|
-
getFg(attributeSlot) {
|
|
18
|
-
return attributeSlot & 255;
|
|
19
|
-
},
|
|
20
|
-
/** Read styles bitmask from an attr slot value (buffer[idx*2+1]) — bits 23:16 */
|
|
21
|
-
getStyles(attributeSlot) {
|
|
22
|
-
return attributeSlot >> 16 & 255;
|
|
23
|
-
},
|
|
24
|
-
/**
|
|
25
|
-
* Pack a cell into a [charCode, attrCode] tuple.
|
|
26
|
-
* charCode = char.codePointAt(0)
|
|
27
|
-
* attrCode = (styles & 0xFF) << 16 | (bg & 0xFF) << 8 | (fg & 0xFF)
|
|
28
|
-
*
|
|
29
|
-
* Write to buffer as: buffer[idx*2] = charCode; buffer[idx*2+1] = attrCode
|
|
30
|
-
*/
|
|
31
|
-
pack(char, fg = 255, bg = 255, styles = 0) {
|
|
32
|
-
const charCode = char.codePointAt(0) ?? 32;
|
|
33
|
-
const attributeCode = (styles & 255) << 16 | (bg & 255) << 8 | fg & 255;
|
|
34
|
-
return [charCode, attributeCode];
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const StyleMasks = {
|
|
38
|
-
BLINK: 16,
|
|
39
|
-
BOLD: 1,
|
|
40
|
-
DIM: 2,
|
|
41
|
-
HIDDEN: 64,
|
|
42
|
-
INVERT: 32,
|
|
43
|
-
ITALIC: 4,
|
|
44
|
-
STRIKETHROUGH: 128,
|
|
45
|
-
UNDERLINE: 8
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { Cell, StyleMasks };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useCallback } from 'react';
|
|
3
|
-
import useFocus from './useFocus-DLoGQJd9.js';
|
|
4
|
-
import useInput from './useInput-DKZbqMRc.js';
|
|
5
|
-
import Box from './Box-W1w_NGin.js';
|
|
6
|
-
import Text from './Text-CtUwV89_.js';
|
|
7
|
-
|
|
8
|
-
const CHECKED_ICON = "☒";
|
|
9
|
-
const UNCHECKED_ICON = "☐";
|
|
10
|
-
function Checkbox({
|
|
11
|
-
accentColor = "blue",
|
|
12
|
-
autoFocus = false,
|
|
13
|
-
children,
|
|
14
|
-
defaultChecked = false,
|
|
15
|
-
isChecked,
|
|
16
|
-
isDisabled = false,
|
|
17
|
-
onChange
|
|
18
|
-
}) {
|
|
19
|
-
const { isFocused } = useFocus({ autoFocus, isActive: !isDisabled });
|
|
20
|
-
const [internalChecked, setInternalChecked] = useState(defaultChecked);
|
|
21
|
-
const checked = isChecked ?? internalChecked;
|
|
22
|
-
useInput(
|
|
23
|
-
useCallback(
|
|
24
|
-
(input, key) => {
|
|
25
|
-
if (!isFocused) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (key.return || input === " ") {
|
|
29
|
-
const next = !checked;
|
|
30
|
-
if (isChecked === void 0) {
|
|
31
|
-
setInternalChecked(next);
|
|
32
|
-
}
|
|
33
|
-
onChange?.(next);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
[isFocused, checked, isChecked, onChange]
|
|
37
|
-
),
|
|
38
|
-
{ isActive: !isDisabled && isFocused }
|
|
39
|
-
);
|
|
40
|
-
return jsxs(Box, { gap: 1, children: [
|
|
41
|
-
jsxs(Text, { color: isFocused ? accentColor : void 0, dimColor: isDisabled, children: [
|
|
42
|
-
isFocused ? "▸ " : " ",
|
|
43
|
-
checked ? CHECKED_ICON : UNCHECKED_ICON
|
|
44
|
-
] }),
|
|
45
|
-
children === void 0 ? void 0 : jsx(Text, { color: isFocused ? accentColor : void 0, dimColor: isDisabled, children })
|
|
46
|
-
] });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { Checkbox as default };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { r as resolveLanguage, i as isLanguageSupported, g as getHighlighter, a as getCachedTokens, t as tokenLinesToElements } from './token-to-elements-CK4s8MJd.js';
|
|
4
|
-
import Box from './Box-W1w_NGin.js';
|
|
5
|
-
import Text from './Text-CtUwV89_.js';
|
|
6
|
-
|
|
7
|
-
function Code({ code, highlightLines, language, showLineNumbers = false, startLine = 1, theme = "github-dark-default" }) {
|
|
8
|
-
const [tokens, setTokens] = useState(null);
|
|
9
|
-
const cancelledRef = useRef(false);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
cancelledRef.current = false;
|
|
12
|
-
const lang = language ? resolveLanguage(language) : "text";
|
|
13
|
-
if (lang !== "text" && !isLanguageSupported(lang)) {
|
|
14
|
-
setTokens(null);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
void (async () => {
|
|
18
|
-
try {
|
|
19
|
-
const highlighter = await getHighlighter(lang === "text" ? [] : [lang], theme);
|
|
20
|
-
const result = getCachedTokens(highlighter, code, lang, theme);
|
|
21
|
-
if (!cancelledRef.current) {
|
|
22
|
-
setTokens(result.tokens);
|
|
23
|
-
}
|
|
24
|
-
} catch {
|
|
25
|
-
if (!cancelledRef.current) {
|
|
26
|
-
setTokens(null);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
})();
|
|
30
|
-
return () => {
|
|
31
|
-
cancelledRef.current = true;
|
|
32
|
-
};
|
|
33
|
-
}, [code, language, theme]);
|
|
34
|
-
const renderOptions = { highlightLines, showLineNumbers, startLine };
|
|
35
|
-
if (tokens) {
|
|
36
|
-
return tokenLinesToElements(tokens, renderOptions);
|
|
37
|
-
}
|
|
38
|
-
const lines = code.split("\n");
|
|
39
|
-
const gutterWidth = showLineNumbers ? String(startLine + lines.length - 1).length : 0;
|
|
40
|
-
return jsx(Box, { flexDirection: "column", children: lines.map((line, index) => {
|
|
41
|
-
const lineNumber = startLine + index;
|
|
42
|
-
const isHighlighted = highlightLines?.has(lineNumber) ?? false;
|
|
43
|
-
return jsxs(Box, { children: [
|
|
44
|
-
showLineNumbers ? jsxs(Text, { color: isHighlighted ? "yellow" : void 0, dimColor: !isHighlighted, children: [
|
|
45
|
-
String(lineNumber).padStart(gutterWidth),
|
|
46
|
-
" "
|
|
47
|
-
] }) : void 0,
|
|
48
|
-
jsx(Text, { children: line })
|
|
49
|
-
] }, index);
|
|
50
|
-
}) });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { Code as default };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useCallback } from 'react';
|
|
3
|
-
import useFocus from './useFocus-DLoGQJd9.js';
|
|
4
|
-
import useInput from './useInput-DKZbqMRc.js';
|
|
5
|
-
import Box from './Box-W1w_NGin.js';
|
|
6
|
-
import Text from './Text-CtUwV89_.js';
|
|
7
|
-
|
|
8
|
-
function Collapsible({
|
|
9
|
-
accentColor = "blue",
|
|
10
|
-
autoFocus = false,
|
|
11
|
-
children,
|
|
12
|
-
defaultOpen = false,
|
|
13
|
-
isDisabled = false,
|
|
14
|
-
isOpen,
|
|
15
|
-
onToggle,
|
|
16
|
-
title
|
|
17
|
-
}) {
|
|
18
|
-
const { isFocused } = useFocus({ autoFocus, isActive: !isDisabled });
|
|
19
|
-
const [internal, setInternal] = useState(defaultOpen);
|
|
20
|
-
const open = isOpen ?? internal;
|
|
21
|
-
useInput(
|
|
22
|
-
useCallback(
|
|
23
|
-
(input, key) => {
|
|
24
|
-
if (key.return || input === " ") {
|
|
25
|
-
const next = !open;
|
|
26
|
-
if (isOpen === void 0) {
|
|
27
|
-
setInternal(next);
|
|
28
|
-
}
|
|
29
|
-
onToggle?.(next);
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
[open, isOpen, onToggle]
|
|
33
|
-
),
|
|
34
|
-
{ isActive: !isDisabled && isFocused }
|
|
35
|
-
);
|
|
36
|
-
return jsxs(Box, { flexDirection: "column", children: [
|
|
37
|
-
jsxs(Box, { children: [
|
|
38
|
-
jsx(Text, { color: isFocused ? accentColor : void 0, dimColor: isDisabled, children: open ? "▼ " : "▶ " }),
|
|
39
|
-
jsx(Text, { bold: isFocused, color: isFocused ? accentColor : void 0, dimColor: isDisabled, children: title })
|
|
40
|
-
] }),
|
|
41
|
-
open ? jsx(Box, { flexDirection: "column", marginLeft: 2, children }) : void 0
|
|
42
|
-
] });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { Collapsible as default };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import Box from './Box-W1w_NGin.js';
|
|
3
|
-
import Spinner from './Spinner-BcO5BCAa.js';
|
|
4
|
-
import Text from './Text-CtUwV89_.js';
|
|
5
|
-
|
|
6
|
-
const STATUS_COLOR = {
|
|
7
|
-
error: "red",
|
|
8
|
-
idle: "gray",
|
|
9
|
-
running: "cyan",
|
|
10
|
-
success: "green"
|
|
11
|
-
};
|
|
12
|
-
const formatDuration = (ms) => {
|
|
13
|
-
if (ms < 1e3) {
|
|
14
|
-
return `${Math.round(ms)}ms`;
|
|
15
|
-
}
|
|
16
|
-
return `${(ms / 1e3).toFixed(2)}s`;
|
|
17
|
-
};
|
|
18
|
-
const resolveStatusIcon = (status) => {
|
|
19
|
-
if (status === "running") {
|
|
20
|
-
return jsx(Spinner, { type: "dots" });
|
|
21
|
-
}
|
|
22
|
-
const ICONS = {
|
|
23
|
-
error: "✖",
|
|
24
|
-
idle: "$",
|
|
25
|
-
success: "✔"
|
|
26
|
-
};
|
|
27
|
-
return ICONS[status];
|
|
28
|
-
};
|
|
29
|
-
const truncateOutput = (output, maxRows) => {
|
|
30
|
-
if (!Number.isFinite(maxRows)) {
|
|
31
|
-
return output;
|
|
32
|
-
}
|
|
33
|
-
const rows = output.split("\n");
|
|
34
|
-
if (rows.length <= maxRows) {
|
|
35
|
-
return output;
|
|
36
|
-
}
|
|
37
|
-
const kept = rows.slice(0, maxRows).join("\n");
|
|
38
|
-
const hidden = rows.length - maxRows;
|
|
39
|
-
return `${kept}
|
|
40
|
-
… ${hidden} more line${hidden === 1 ? "" : "s"}`;
|
|
41
|
-
};
|
|
42
|
-
function CommandBlock({ command, cwd, durationMs, exitCode, maxOutputRows = 12, output, status = "idle" }) {
|
|
43
|
-
const color = STATUS_COLOR[status];
|
|
44
|
-
const statusIcon = resolveStatusIcon(status);
|
|
45
|
-
const trailing = [];
|
|
46
|
-
if (durationMs !== void 0) {
|
|
47
|
-
trailing.push(
|
|
48
|
-
jsxs(Text, { dimColor: true, children: [
|
|
49
|
-
" ",
|
|
50
|
-
formatDuration(durationMs)
|
|
51
|
-
] }, "duration")
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
if (exitCode !== void 0 && status !== "running") {
|
|
55
|
-
trailing.push(
|
|
56
|
-
jsxs(Text, { color: exitCode === 0 ? "green" : "red", children: [
|
|
57
|
-
" ",
|
|
58
|
-
"exit",
|
|
59
|
-
" ",
|
|
60
|
-
exitCode
|
|
61
|
-
] }, "exit")
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
return jsxs(Box, { borderColor: color, borderStyle: "round", flexDirection: "column", paddingX: 1, children: [
|
|
65
|
-
jsxs(Box, { children: [
|
|
66
|
-
jsx(Text, { color, children: statusIcon }),
|
|
67
|
-
jsx(Text, { children: " " }),
|
|
68
|
-
jsx(Box, { flexGrow: 1, flexShrink: 1, minWidth: 0, children: jsx(Text, { bold: true, wrap: "truncate-end", children: command }) }),
|
|
69
|
-
cwd === void 0 ? void 0 : jsxs(Text, { dimColor: true, children: [
|
|
70
|
-
" ",
|
|
71
|
-
"@",
|
|
72
|
-
cwd
|
|
73
|
-
] }),
|
|
74
|
-
trailing.length === 0 ? void 0 : jsx(Box, { flexShrink: 0, children: trailing })
|
|
75
|
-
] }),
|
|
76
|
-
output === void 0 ? void 0 : jsx(Box, { flexDirection: "column", marginTop: 1, children: typeof output === "string" ? jsx(Text, { children: truncateOutput(output, maxOutputRows) }) : output })
|
|
77
|
-
] });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { CommandBlock as default };
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
3
|
-
import useFocus from './useFocus-DLoGQJd9.js';
|
|
4
|
-
import useInput from './useInput-DKZbqMRc.js';
|
|
5
|
-
import { i as isInsertableInput } from './input-utils-ViAEXa0Z.js';
|
|
6
|
-
import Box from './Box-W1w_NGin.js';
|
|
7
|
-
import Text from './Text-CtUwV89_.js';
|
|
8
|
-
|
|
9
|
-
const scoreCommand = (query, command) => {
|
|
10
|
-
if (query.length === 0) {
|
|
11
|
-
return 1;
|
|
12
|
-
}
|
|
13
|
-
const haystacks = [command.label, command.description ?? "", ...command.keywords ?? []].map((text) => text.toLowerCase()).filter((text) => text.length > 0);
|
|
14
|
-
const needle = query.toLowerCase();
|
|
15
|
-
let best = 0;
|
|
16
|
-
for (const haystack of haystacks) {
|
|
17
|
-
if (haystack.includes(needle)) {
|
|
18
|
-
const index = haystack.indexOf(needle);
|
|
19
|
-
best = Math.max(best, 100 - index);
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
let haystackIndex = 0;
|
|
23
|
-
let matched = 0;
|
|
24
|
-
for (const char of needle) {
|
|
25
|
-
const found = haystack.indexOf(char, haystackIndex);
|
|
26
|
-
if (found === -1) {
|
|
27
|
-
matched = 0;
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
matched += 1;
|
|
31
|
-
haystackIndex = found + 1;
|
|
32
|
-
}
|
|
33
|
-
if (matched === needle.length) {
|
|
34
|
-
best = Math.max(best, 20);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return best;
|
|
38
|
-
};
|
|
39
|
-
function CommandPalette({
|
|
40
|
-
accentColor = "cyan",
|
|
41
|
-
autoFocus = true,
|
|
42
|
-
commands,
|
|
43
|
-
emptyText = "No results",
|
|
44
|
-
limit = 8,
|
|
45
|
-
onCancel,
|
|
46
|
-
onSelect,
|
|
47
|
-
placeholder = "Type a command or search..."
|
|
48
|
-
}) {
|
|
49
|
-
const { isFocused } = useFocus({ autoFocus });
|
|
50
|
-
const [query, setQuery] = useState("");
|
|
51
|
-
const [focusedIndex, setFocusedIndex] = useState(0);
|
|
52
|
-
const focusedIndexRef = useRef(focusedIndex);
|
|
53
|
-
focusedIndexRef.current = focusedIndex;
|
|
54
|
-
const filtered = useMemo(() => {
|
|
55
|
-
const scored = commands.map((command) => {
|
|
56
|
-
return { command, score: scoreCommand(query, command) };
|
|
57
|
-
}).filter(({ score }) => score > 0);
|
|
58
|
-
scored.sort((a, b) => b.score - a.score);
|
|
59
|
-
return scored.slice(0, limit).map(({ command }) => command);
|
|
60
|
-
}, [commands, query, limit]);
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
const maxIndex = Math.max(0, filtered.length - 1);
|
|
63
|
-
if (focusedIndexRef.current > maxIndex) {
|
|
64
|
-
focusedIndexRef.current = maxIndex;
|
|
65
|
-
setFocusedIndex(maxIndex);
|
|
66
|
-
}
|
|
67
|
-
}, [filtered]);
|
|
68
|
-
useInput(
|
|
69
|
-
useCallback(
|
|
70
|
-
(input, key) => {
|
|
71
|
-
if (!isFocused) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (key.escape) {
|
|
75
|
-
onCancel?.();
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (key.downArrow) {
|
|
79
|
-
if (filtered.length === 0) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
setFocusedIndex((previous) => Math.min(filtered.length - 1, previous + 1));
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (key.upArrow) {
|
|
86
|
-
setFocusedIndex((previous) => Math.max(0, previous - 1));
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (key.return) {
|
|
90
|
-
const target = filtered[focusedIndexRef.current];
|
|
91
|
-
if (target) {
|
|
92
|
-
onSelect(target.id, query);
|
|
93
|
-
}
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (key.backspace || key.delete) {
|
|
97
|
-
setQuery((previous) => previous.slice(0, -1));
|
|
98
|
-
setFocusedIndex(0);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
if (isInsertableInput(input, key)) {
|
|
102
|
-
setQuery((previous) => previous + input);
|
|
103
|
-
setFocusedIndex(0);
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
[isFocused, filtered, query, onSelect, onCancel]
|
|
107
|
-
),
|
|
108
|
-
{ isActive: isFocused }
|
|
109
|
-
);
|
|
110
|
-
return jsxs(Box, { borderColor: accentColor, borderStyle: "round", flexDirection: "column", paddingX: 1, children: [
|
|
111
|
-
jsxs(Box, { children: [
|
|
112
|
-
jsx(Text, { color: accentColor, children: "❯" }),
|
|
113
|
-
jsxs(Text, { children: [
|
|
114
|
-
" ",
|
|
115
|
-
query.length === 0 ? jsx(Text, { dimColor: true, children: placeholder }) : query
|
|
116
|
-
] }),
|
|
117
|
-
jsx(Text, { inverse: true, children: " " })
|
|
118
|
-
] }),
|
|
119
|
-
jsx(Box, { marginTop: 1, children: jsxs(Text, { dimColor: true, children: [
|
|
120
|
-
filtered.length,
|
|
121
|
-
" of ",
|
|
122
|
-
commands.length
|
|
123
|
-
] }) }),
|
|
124
|
-
jsx(Box, { flexDirection: "column", marginTop: 1, children: filtered.length === 0 ? jsx(Text, { dimColor: true, children: emptyText }) : filtered.map((command, index) => {
|
|
125
|
-
const isRowFocused = index === focusedIndex;
|
|
126
|
-
const color = isRowFocused ? accentColor : void 0;
|
|
127
|
-
return jsxs(Box, { flexDirection: "column", children: [
|
|
128
|
-
jsxs(Box, { children: [
|
|
129
|
-
jsx(Text, { color, children: isRowFocused ? "▸ " : " " }),
|
|
130
|
-
command.icon === void 0 ? void 0 : jsxs(Text, { color, children: [
|
|
131
|
-
command.icon,
|
|
132
|
-
" "
|
|
133
|
-
] }),
|
|
134
|
-
jsx(Box, { flexGrow: 1, flexShrink: 1, minWidth: 0, children: jsx(Text, { bold: isRowFocused, color, wrap: "truncate-end", children: command.label }) }),
|
|
135
|
-
command.hotkey === void 0 ? void 0 : jsx(Box, { flexShrink: 0, children: jsxs(Text, { dimColor: true, children: [
|
|
136
|
-
" ",
|
|
137
|
-
command.hotkey
|
|
138
|
-
] }) })
|
|
139
|
-
] }),
|
|
140
|
-
command.description === void 0 ? void 0 : jsx(Box, { marginLeft: 2, children: jsx(Text, { dimColor: true, wrap: "truncate-end", children: command.description }) })
|
|
141
|
-
] }, command.id);
|
|
142
|
-
}) })
|
|
143
|
-
] });
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export { CommandPalette as default };
|