@visulima/tui 1.0.0-alpha.6 → 1.0.0-alpha.8
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 +21 -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,116 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { c as createBrailleGrid } from './braille-BoEWoH2I.js';
|
|
4
|
-
import Box from './Box-W1w_NGin.js';
|
|
5
|
-
import Canvas from './Canvas-COttmLPX.js';
|
|
6
|
-
import { t as toPoints, p as pickSeriesColor, c as computeExtents, D as DEFAULT_CHART_PALETTE, a as projectPoint } from './line-chart-VGU2l7pu.js';
|
|
7
|
-
import Text from './Text-CtUwV89_.js';
|
|
8
|
-
|
|
9
|
-
const DEFAULT_PALETTE = DEFAULT_CHART_PALETTE;
|
|
10
|
-
const FILL_GLYPH = {
|
|
11
|
-
heavy: "▓",
|
|
12
|
-
light: "░",
|
|
13
|
-
medium: "▒"
|
|
14
|
-
};
|
|
15
|
-
function AreaChart({
|
|
16
|
-
axisColor = "gray",
|
|
17
|
-
fillDensity = "medium",
|
|
18
|
-
height = 10,
|
|
19
|
-
maxY,
|
|
20
|
-
minY,
|
|
21
|
-
palette = DEFAULT_PALETTE,
|
|
22
|
-
series,
|
|
23
|
-
showLegend = true,
|
|
24
|
-
width = 40
|
|
25
|
-
}) {
|
|
26
|
-
const prepared = useMemo(() => {
|
|
27
|
-
const list = series.map((input, index) => {
|
|
28
|
-
return {
|
|
29
|
-
color: pickSeriesColor(input, index, palette),
|
|
30
|
-
points: toPoints(input.data),
|
|
31
|
-
series: input
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const extents = computeExtents(list);
|
|
35
|
-
return {
|
|
36
|
-
list,
|
|
37
|
-
xMax: extents.xMax === Number.NEGATIVE_INFINITY ? 1 : extents.xMax,
|
|
38
|
-
xMin: extents.xMin === Number.POSITIVE_INFINITY ? 0 : extents.xMin,
|
|
39
|
-
yMax: maxY ?? (extents.yMax === Number.NEGATIVE_INFINITY ? 1 : extents.yMax),
|
|
40
|
-
yMin: minY ?? (extents.yMin === Number.POSITIVE_INFINITY ? 0 : extents.yMin)
|
|
41
|
-
};
|
|
42
|
-
}, [series, palette, minY, maxY]);
|
|
43
|
-
const glyph = FILL_GLYPH[fillDensity];
|
|
44
|
-
return jsxs(Box, { flexDirection: "column", children: [
|
|
45
|
-
jsx(
|
|
46
|
-
Canvas,
|
|
47
|
-
{
|
|
48
|
-
draw: (context) => {
|
|
49
|
-
context.clear();
|
|
50
|
-
const pixelWidth = context.width * 2;
|
|
51
|
-
const pixelHeight = context.height * 4;
|
|
52
|
-
const config = {
|
|
53
|
-
xMax: prepared.xMax,
|
|
54
|
-
xMin: prepared.xMin,
|
|
55
|
-
yMax: prepared.yMax,
|
|
56
|
-
yMin: prepared.yMin
|
|
57
|
-
};
|
|
58
|
-
for (const { color, points } of prepared.list) {
|
|
59
|
-
if (points.length === 0) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
for (let cellX = 0; cellX < context.width; cellX += 1) {
|
|
63
|
-
let sampleY;
|
|
64
|
-
for (const point of points) {
|
|
65
|
-
const { px, py } = projectPoint(point, config, pixelWidth, pixelHeight);
|
|
66
|
-
const candidateCellX = Math.floor(px / 2);
|
|
67
|
-
if (candidateCellX === cellX) {
|
|
68
|
-
const candidateCellY = Math.floor(py / 4);
|
|
69
|
-
if (sampleY === void 0 || candidateCellY < sampleY) {
|
|
70
|
-
sampleY = candidateCellY;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (sampleY === void 0) {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
for (let cellY = sampleY + 1; cellY < context.height; cellY += 1) {
|
|
78
|
-
context.setCell(cellX, cellY, glyph, { color, dim: true });
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
for (let cellX = 0; cellX < context.width; cellX += 2) {
|
|
83
|
-
context.setCell(cellX, context.height - 1, "·", { color: axisColor, dim: true });
|
|
84
|
-
}
|
|
85
|
-
for (const { color, points } of prepared.list) {
|
|
86
|
-
if (points.length === 0) {
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
const grid = createBrailleGrid(context.width, context.height);
|
|
90
|
-
let previous = projectPoint(points[0], config, pixelWidth, pixelHeight);
|
|
91
|
-
grid.plotPoint(previous.px, previous.py);
|
|
92
|
-
for (let index = 1; index < points.length; index += 1) {
|
|
93
|
-
const current = projectPoint(points[index], config, pixelWidth, pixelHeight);
|
|
94
|
-
grid.plotLine(previous.px, previous.py, current.px, current.py);
|
|
95
|
-
previous = current;
|
|
96
|
-
}
|
|
97
|
-
grid.flush(context, { bold: true, color });
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
height,
|
|
101
|
-
version: [series, width, height, minY, maxY, fillDensity, axisColor, palette],
|
|
102
|
-
width
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
showLegend ? jsx(Box, { gap: 2, marginTop: 1, children: prepared.list.map(({ color, series: input }, index) => (
|
|
106
|
-
// Composite key: series index plus label so two
|
|
107
|
-
// series sharing a label don't collide.
|
|
108
|
-
jsxs(Box, { gap: 1, children: [
|
|
109
|
-
jsx(Text, { color, children: glyph }),
|
|
110
|
-
jsx(Text, { children: input.label ?? `Series ${index + 1}` })
|
|
111
|
-
] }, `${index}:${input.label ?? ""}`)
|
|
112
|
-
)) }) : void 0
|
|
113
|
-
] });
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export { AreaChart as default };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import Text from './Text-CtUwV89_.js';
|
|
3
|
-
|
|
4
|
-
function Badge({ children, color = "magenta" }) {
|
|
5
|
-
const formattedChildren = typeof children === "string" ? children.toUpperCase() : children;
|
|
6
|
-
return jsxs(Text, { backgroundColor: color, children: [
|
|
7
|
-
" ",
|
|
8
|
-
jsx(Text, { color: "black", children: formattedChildren }),
|
|
9
|
-
" "
|
|
10
|
-
] });
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Badge as default };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import Box from './Box-W1w_NGin.js';
|
|
4
|
-
import Canvas from './Canvas-COttmLPX.js';
|
|
5
|
-
import Text from './Text-CtUwV89_.js';
|
|
6
|
-
|
|
7
|
-
const DEFAULT_PALETTE = ["cyan", "magenta", "yellow", "green", "blue", "red"];
|
|
8
|
-
const findMax = (data, userMax) => {
|
|
9
|
-
if (userMax !== void 0) {
|
|
10
|
-
return userMax;
|
|
11
|
-
}
|
|
12
|
-
if (data.length === 0) {
|
|
13
|
-
return 0;
|
|
14
|
-
}
|
|
15
|
-
let max = data[0].value;
|
|
16
|
-
for (let index = 1; index < data.length; index += 1) {
|
|
17
|
-
const { value } = data[index];
|
|
18
|
-
if (value > max) {
|
|
19
|
-
max = value;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return max;
|
|
23
|
-
};
|
|
24
|
-
const colorFor = (index, palette, datum) => datum.color ?? palette[index % palette.length] ?? "cyan";
|
|
25
|
-
function BarChart({
|
|
26
|
-
data,
|
|
27
|
-
height = 10,
|
|
28
|
-
max: maxOverride,
|
|
29
|
-
orientation = "vertical",
|
|
30
|
-
palette = DEFAULT_PALETTE,
|
|
31
|
-
showLabels = true,
|
|
32
|
-
showValues = false,
|
|
33
|
-
width: widthOverride
|
|
34
|
-
}) {
|
|
35
|
-
const computedMax = useMemo(() => findMax(data, maxOverride), [data, maxOverride]);
|
|
36
|
-
if (orientation === "horizontal") {
|
|
37
|
-
const plotWidth2 = widthOverride ?? 24;
|
|
38
|
-
return jsx(Box, { flexDirection: "column", children: data.map((datum, index) => {
|
|
39
|
-
const ratio = computedMax === 0 ? 0 : datum.value / computedMax;
|
|
40
|
-
const color = colorFor(index, palette, datum);
|
|
41
|
-
return jsxs(Box, { gap: 1, children: [
|
|
42
|
-
showLabels && datum.label !== void 0 ? jsx(Box, { flexShrink: 0, minWidth: 8, children: jsx(Text, { dimColor: true, wrap: "truncate-end", children: datum.label }) }) : void 0,
|
|
43
|
-
jsx(Box, { flexGrow: 1, flexShrink: 1, children: jsx(
|
|
44
|
-
Canvas,
|
|
45
|
-
{
|
|
46
|
-
draw: (context) => {
|
|
47
|
-
context.clear();
|
|
48
|
-
context.drawHBar(0, 0, plotWidth2, ratio, { color });
|
|
49
|
-
},
|
|
50
|
-
height: 1,
|
|
51
|
-
version: [datum.value, computedMax, color, plotWidth2],
|
|
52
|
-
width: plotWidth2
|
|
53
|
-
}
|
|
54
|
-
) }),
|
|
55
|
-
showValues ? jsx(Box, { flexShrink: 0, children: jsx(Text, { children: String(datum.value) }) }) : void 0
|
|
56
|
-
] }, index);
|
|
57
|
-
}) });
|
|
58
|
-
}
|
|
59
|
-
const barWidth = 2;
|
|
60
|
-
const gap = 1;
|
|
61
|
-
const plotWidth = widthOverride ?? Math.max(data.length * (barWidth + gap), 1);
|
|
62
|
-
return jsxs(Box, { flexDirection: "column", children: [
|
|
63
|
-
jsx(
|
|
64
|
-
Canvas,
|
|
65
|
-
{
|
|
66
|
-
draw: (context) => {
|
|
67
|
-
context.clear();
|
|
68
|
-
data.forEach((datum, index) => {
|
|
69
|
-
const ratio = computedMax === 0 ? 0 : datum.value / computedMax;
|
|
70
|
-
const color = colorFor(index, palette, datum);
|
|
71
|
-
const x = index * (barWidth + gap);
|
|
72
|
-
for (let column = 0; column < barWidth; column += 1) {
|
|
73
|
-
context.drawVBar(x + column, 0, height, ratio, { color });
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
height,
|
|
78
|
-
version: [data, computedMax, palette, barWidth, gap, height],
|
|
79
|
-
width: plotWidth
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
showValues ? jsx(Box, { children: data.map((datum, index) => jsx(Box, { width: barWidth + gap, children: jsx(Text, { dimColor: true, children: String(datum.value).padEnd(barWidth + gap, " ") }) }, index)) }) : void 0,
|
|
83
|
-
showLabels ? jsx(Box, { children: data.map((datum, index) => jsx(Box, { width: barWidth + gap, children: jsx(Text, { dimColor: true, wrap: "truncate-end", children: (datum.label ?? "").padEnd(barWidth + gap, " ") }) }, index)) }) : void 0
|
|
84
|
-
] });
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { BarChart as default };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import CFonts from 'cfonts';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
import Text from './Text-CtUwV89_.js';
|
|
5
|
-
|
|
6
|
-
const defaults = {
|
|
7
|
-
align: "left",
|
|
8
|
-
backgroundColor: "transparent",
|
|
9
|
-
colors: ["system"],
|
|
10
|
-
font: "block",
|
|
11
|
-
letterSpacing: 1,
|
|
12
|
-
lineHeight: 1,
|
|
13
|
-
maxLength: 0,
|
|
14
|
-
space: true
|
|
15
|
-
};
|
|
16
|
-
function BigText({ align, backgroundColor, colors, font, letterSpacing, lineHeight, maxLength, space, text }) {
|
|
17
|
-
const rendered = useMemo(
|
|
18
|
-
() => CFonts.render(text, { ...defaults, align, backgroundColor, colors, font, letterSpacing, lineHeight, maxLength, space }),
|
|
19
|
-
[text, align, backgroundColor, colors, font, letterSpacing, lineHeight, maxLength, space]
|
|
20
|
-
);
|
|
21
|
-
return jsx(Text, { children: rendered && rendered.string });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { BigText as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import useAnimation from './useAnimation-DV22qxiJ.js';
|
|
3
|
-
import Text from './Text-CtUwV89_.js';
|
|
4
|
-
|
|
5
|
-
function BlinkDot({ character = "●", color = "red", interval = 800, isActive = true }) {
|
|
6
|
-
const { frame } = useAnimation({ interval: Math.max(1, Math.floor(interval / 2)), isActive });
|
|
7
|
-
const visible = !isActive || frame % 2 === 0;
|
|
8
|
-
return jsx(Text, { color, children: visible ? character : " " });
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { BlinkDot as default };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { forwardRef, useContext } from 'react';
|
|
3
|
-
import { a as accessibilityContext } from './accessibility-context-BLelHhNU.js';
|
|
4
|
-
import { b as backgroundContext } from './background-context-BAUaxfOb.js';
|
|
5
|
-
|
|
6
|
-
const BOX_BASE_STYLE = {
|
|
7
|
-
flexDirection: "row",
|
|
8
|
-
flexGrow: 0,
|
|
9
|
-
flexShrink: 1,
|
|
10
|
-
flexWrap: "nowrap"
|
|
11
|
-
};
|
|
12
|
-
const Box = forwardRef(
|
|
13
|
-
({
|
|
14
|
-
"aria-hidden": ariaHidden,
|
|
15
|
-
"aria-label": ariaLabel,
|
|
16
|
-
"aria-role": role,
|
|
17
|
-
"aria-state": ariaState,
|
|
18
|
-
backgroundColor,
|
|
19
|
-
children,
|
|
20
|
-
opaque,
|
|
21
|
-
scrollbar,
|
|
22
|
-
sticky,
|
|
23
|
-
stickyChildren,
|
|
24
|
-
...style
|
|
25
|
-
}, ref) => {
|
|
26
|
-
const { isScreenReaderEnabled } = useContext(accessibilityContext);
|
|
27
|
-
const label = ariaLabel ? jsx("ink-text", { children: ariaLabel }) : void 0;
|
|
28
|
-
const accessibility = role || ariaState ? { role, state: ariaState } : void 0;
|
|
29
|
-
if (isScreenReaderEnabled && ariaHidden) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
const boxElement = jsxs(
|
|
33
|
-
"ink-box",
|
|
34
|
-
{
|
|
35
|
-
internal_accessibility: accessibility,
|
|
36
|
-
opaque,
|
|
37
|
-
ref,
|
|
38
|
-
scrollbar,
|
|
39
|
-
sticky,
|
|
40
|
-
style: {
|
|
41
|
-
...BOX_BASE_STYLE,
|
|
42
|
-
...style,
|
|
43
|
-
backgroundColor,
|
|
44
|
-
overflowX: style.overflowX ?? style.overflow ?? "visible",
|
|
45
|
-
overflowY: style.overflowY ?? style.overflow ?? "visible"
|
|
46
|
-
},
|
|
47
|
-
children: [
|
|
48
|
-
isScreenReaderEnabled && label ? label : children,
|
|
49
|
-
sticky && stickyChildren && !isScreenReaderEnabled ? jsx(
|
|
50
|
-
"ink-box",
|
|
51
|
-
{
|
|
52
|
-
internalStickyAlternate: true,
|
|
53
|
-
style: {
|
|
54
|
-
position: "absolute",
|
|
55
|
-
...style
|
|
56
|
-
},
|
|
57
|
-
children: stickyChildren
|
|
58
|
-
}
|
|
59
|
-
) : null
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
if (backgroundColor) {
|
|
64
|
-
return jsx(backgroundContext.Provider, { value: backgroundColor, children: boxElement });
|
|
65
|
-
}
|
|
66
|
-
return boxElement;
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
Box.displayName = "Box";
|
|
70
|
-
|
|
71
|
-
export { Box as default };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import Box from './Box-W1w_NGin.js';
|
|
4
|
-
import Text from './Text-CtUwV89_.js';
|
|
5
|
-
|
|
6
|
-
function Breadcrumb({ currentColor = "blue", items, separator = "›" }) {
|
|
7
|
-
return jsx(Box, { children: items.map((item, index) => {
|
|
8
|
-
const isLast = index === items.length - 1;
|
|
9
|
-
return jsxs(Fragment, { children: [
|
|
10
|
-
index > 0 ? jsxs(Text, { dimColor: true, children: [
|
|
11
|
-
" ",
|
|
12
|
-
separator,
|
|
13
|
-
" "
|
|
14
|
-
] }) : void 0,
|
|
15
|
-
jsxs(Text, { bold: isLast, color: isLast ? currentColor : void 0, dimColor: !isLast, children: [
|
|
16
|
-
item.icon === void 0 ? void 0 : jsxs(Fragment$1, { children: [
|
|
17
|
-
item.icon,
|
|
18
|
-
" "
|
|
19
|
-
] }),
|
|
20
|
-
item.label
|
|
21
|
-
] })
|
|
22
|
-
] }, item.key ?? `${index}:${item.label}`);
|
|
23
|
-
}) });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { Breadcrumb as default };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { 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 BORDER_STYLE = "round";
|
|
9
|
-
const resolveTextColor = (variant, isFocused, isDisabled, accentColor) => {
|
|
10
|
-
if (isDisabled) {
|
|
11
|
-
return void 0;
|
|
12
|
-
}
|
|
13
|
-
if (variant === "primary" && isFocused) {
|
|
14
|
-
return "black";
|
|
15
|
-
}
|
|
16
|
-
if (isFocused) {
|
|
17
|
-
return accentColor;
|
|
18
|
-
}
|
|
19
|
-
return void 0;
|
|
20
|
-
};
|
|
21
|
-
function Button({ accentColor = "blue", autoFocus = false, children, isDisabled = false, onPress, variant = "primary" }) {
|
|
22
|
-
const { isFocused } = useFocus({ autoFocus, isActive: !isDisabled });
|
|
23
|
-
useInput(
|
|
24
|
-
useCallback(
|
|
25
|
-
(input, key) => {
|
|
26
|
-
if (!isFocused) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (key.return || input === " ") {
|
|
30
|
-
onPress?.();
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
[isFocused, onPress]
|
|
34
|
-
),
|
|
35
|
-
{ isActive: !isDisabled && isFocused }
|
|
36
|
-
);
|
|
37
|
-
const textColor = resolveTextColor(variant, isFocused, isDisabled, accentColor);
|
|
38
|
-
if (variant === "ghost") {
|
|
39
|
-
return jsx(Box, { paddingX: 1, children: jsxs(Text, { bold: isFocused, color: textColor, dimColor: isDisabled, children: [
|
|
40
|
-
isFocused ? "▸ " : " ",
|
|
41
|
-
children
|
|
42
|
-
] }) });
|
|
43
|
-
}
|
|
44
|
-
const borderColor = (() => {
|
|
45
|
-
if (variant === "outline") {
|
|
46
|
-
return isFocused ? accentColor : "gray";
|
|
47
|
-
}
|
|
48
|
-
if (variant === "secondary") {
|
|
49
|
-
return accentColor;
|
|
50
|
-
}
|
|
51
|
-
return isFocused ? accentColor : void 0;
|
|
52
|
-
})();
|
|
53
|
-
const fillBackground = variant === "primary" && isFocused ? accentColor : void 0;
|
|
54
|
-
return jsx(Box, { backgroundColor: fillBackground, borderColor, borderStyle: BORDER_STYLE, paddingX: 1, children: jsx(Text, { bold: isFocused, color: textColor, dimColor: isDisabled, children }) });
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { Button as default };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const COLOR_BLINDNESS_SIMULATION = {
|
|
2
|
-
// Achromatopsia (total color blindness, rod monochromacy)
|
|
3
|
-
achromatopsia: [
|
|
4
|
-
[0.299, 0.587, 0.114],
|
|
5
|
-
[0.299, 0.587, 0.114],
|
|
6
|
-
[0.299, 0.587, 0.114]
|
|
7
|
-
],
|
|
8
|
-
// Deuteranopia (green-blind, ~1% of males)
|
|
9
|
-
deuteranopia: [
|
|
10
|
-
[0.625, 0.375, 0],
|
|
11
|
-
[0.7, 0.3, 0],
|
|
12
|
-
[0, 0.3, 0.7]
|
|
13
|
-
],
|
|
14
|
-
// Protanopia (red-blind, ~1% of males)
|
|
15
|
-
protanopia: [
|
|
16
|
-
[0.567, 0.433, 0],
|
|
17
|
-
[0.558, 0.442, 0],
|
|
18
|
-
[0, 0.242, 0.758]
|
|
19
|
-
],
|
|
20
|
-
// Tritanopia (blue-blind, ~0.003% of population)
|
|
21
|
-
tritanopia: [
|
|
22
|
-
[0.95, 0.05, 0],
|
|
23
|
-
[0, 0.433, 0.567],
|
|
24
|
-
[0, 0.475, 0.525]
|
|
25
|
-
]
|
|
26
|
-
};
|
|
27
|
-
const COLOR_BLINDNESS_COMPENSATION = {
|
|
28
|
-
// Deuteranopia: redistribute lost green info into red and blue
|
|
29
|
-
deuteranopia: [
|
|
30
|
-
[1, 0.7, 0],
|
|
31
|
-
[0, 1, 0],
|
|
32
|
-
[0, 0.7, 1]
|
|
33
|
-
],
|
|
34
|
-
// Protanopia: redistribute lost red info into green and blue
|
|
35
|
-
protanopia: [
|
|
36
|
-
[1, 0, 0],
|
|
37
|
-
[0.7, 1, 0],
|
|
38
|
-
[0.7, 0, 1]
|
|
39
|
-
],
|
|
40
|
-
// Tritanopia: redistribute lost blue info into red and green
|
|
41
|
-
tritanopia: [
|
|
42
|
-
[1, 0, 0.7],
|
|
43
|
-
[0, 1, 0.7],
|
|
44
|
-
[0, 0, 1]
|
|
45
|
-
]
|
|
46
|
-
};
|
|
47
|
-
const IDENTITY_MATRIX = [
|
|
48
|
-
[1, 0, 0],
|
|
49
|
-
[0, 1, 0],
|
|
50
|
-
[0, 0, 1]
|
|
51
|
-
];
|
|
52
|
-
const clamp = (value) => Math.max(0, Math.min(255, Math.round(value)));
|
|
53
|
-
const applyColorMatrix = (r, g, b, matrix) => [
|
|
54
|
-
clamp(matrix[0][0] * r + matrix[0][1] * g + matrix[0][2] * b),
|
|
55
|
-
clamp(matrix[1][0] * r + matrix[1][1] * g + matrix[1][2] * b),
|
|
56
|
-
clamp(matrix[2][0] * r + matrix[2][1] * g + matrix[2][2] * b)
|
|
57
|
-
];
|
|
58
|
-
const HEX_6_RE = /^#?(?<r>[\da-f]{2})(?<g>[\da-f]{2})(?<b>[\da-f]{2})$/i;
|
|
59
|
-
const HEX_3_RE = /^#?(?<r>[\da-f])(?<g>[\da-f])(?<b>[\da-f])$/i;
|
|
60
|
-
const hexToRgb = (hex) => {
|
|
61
|
-
const match6 = HEX_6_RE.exec(hex);
|
|
62
|
-
if (match6) {
|
|
63
|
-
return [Number.parseInt(match6[1], 16), Number.parseInt(match6[2], 16), Number.parseInt(match6[3], 16)];
|
|
64
|
-
}
|
|
65
|
-
const match3 = HEX_3_RE.exec(hex);
|
|
66
|
-
if (match3) {
|
|
67
|
-
return [Number.parseInt(match3[1] + match3[1], 16), Number.parseInt(match3[2] + match3[2], 16), Number.parseInt(match3[3] + match3[3], 16)];
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
};
|
|
71
|
-
const rgbToHex = (r, g, b) => `#${clamp(r).toString(16).padStart(2, "0")}${clamp(g).toString(16).padStart(2, "0")}${clamp(b).toString(16).padStart(2, "0")}`;
|
|
72
|
-
const transformHexColor = (hex, matrix) => {
|
|
73
|
-
const rgb = hexToRgb(hex);
|
|
74
|
-
if (!rgb) {
|
|
75
|
-
return hex;
|
|
76
|
-
}
|
|
77
|
-
const [r, g, b] = applyColorMatrix(rgb[0], rgb[1], rgb[2], matrix);
|
|
78
|
-
return rgbToHex(r, g, b);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export { COLOR_BLINDNESS_COMPENSATION, COLOR_BLINDNESS_SIMULATION, IDENTITY_MATRIX, applyColorMatrix, hexToRgb, rgbToHex, transformHexColor };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo, useState, useRef, 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 MONTH_NAMES = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
9
|
-
const WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
10
|
-
const startOfDay = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
11
|
-
const shiftMonth = (date, delta) => {
|
|
12
|
-
const targetYear = date.getFullYear();
|
|
13
|
-
const targetMonth = date.getMonth() + delta;
|
|
14
|
-
const lastDay = new Date(targetYear, targetMonth + 1, 0).getDate();
|
|
15
|
-
const day = Math.min(date.getDate(), lastDay);
|
|
16
|
-
return new Date(targetYear, targetMonth, day);
|
|
17
|
-
};
|
|
18
|
-
const isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
19
|
-
const isOutOfRange = (date, minDate, maxDate) => {
|
|
20
|
-
if (minDate !== void 0 && date < startOfDay(minDate)) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (maxDate !== void 0 && date > startOfDay(maxDate)) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
return false;
|
|
27
|
-
};
|
|
28
|
-
const buildWeeks = (year, month, firstDayOfWeek) => {
|
|
29
|
-
const firstOfMonth = new Date(year, month, 1);
|
|
30
|
-
const firstDow = firstOfMonth.getDay();
|
|
31
|
-
const leadingBlanks = (firstDow - firstDayOfWeek + 7) % 7;
|
|
32
|
-
const daysInMonth = new Date(year, month + 1, 0).getDate();
|
|
33
|
-
const cells = [];
|
|
34
|
-
for (let index = 0; index < leadingBlanks; index += 1) {
|
|
35
|
-
cells.push(void 0);
|
|
36
|
-
}
|
|
37
|
-
for (let day = 1; day <= daysInMonth; day += 1) {
|
|
38
|
-
cells.push(new Date(year, month, day));
|
|
39
|
-
}
|
|
40
|
-
while (cells.length % 7 !== 0) {
|
|
41
|
-
cells.push(void 0);
|
|
42
|
-
}
|
|
43
|
-
const weeks = [];
|
|
44
|
-
for (let row = 0; row < cells.length; row += 7) {
|
|
45
|
-
weeks.push(cells.slice(row, row + 7));
|
|
46
|
-
}
|
|
47
|
-
return weeks;
|
|
48
|
-
};
|
|
49
|
-
function Calendar({
|
|
50
|
-
accentColor = "blue",
|
|
51
|
-
autoFocus = false,
|
|
52
|
-
defaultValue,
|
|
53
|
-
firstDayOfWeek = 1,
|
|
54
|
-
isDisabled = false,
|
|
55
|
-
maxDate,
|
|
56
|
-
minDate,
|
|
57
|
-
onChange,
|
|
58
|
-
onSubmit,
|
|
59
|
-
selectedColor = "green",
|
|
60
|
-
value
|
|
61
|
-
}) {
|
|
62
|
-
const { isFocused } = useFocus({ autoFocus, isActive: !isDisabled });
|
|
63
|
-
const today = useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
|
|
64
|
-
const initial = startOfDay(value ?? defaultValue ?? today);
|
|
65
|
-
const [internalCursor, setInternalCursor] = useState(initial);
|
|
66
|
-
const cursor = value ? startOfDay(value) : internalCursor;
|
|
67
|
-
const cursorRef = useRef(cursor);
|
|
68
|
-
cursorRef.current = cursor;
|
|
69
|
-
const weekdayLabels = useMemo(() => [...WEEKDAYS.slice(firstDayOfWeek), ...WEEKDAYS.slice(0, firstDayOfWeek)], [firstDayOfWeek]);
|
|
70
|
-
const weeks = useMemo(() => buildWeeks(cursor.getFullYear(), cursor.getMonth(), firstDayOfWeek), [cursor, firstDayOfWeek]);
|
|
71
|
-
const moveCursor = useCallback(
|
|
72
|
-
(next) => {
|
|
73
|
-
const clamped = startOfDay(next);
|
|
74
|
-
if (isOutOfRange(clamped, minDate, maxDate)) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (value === void 0) {
|
|
78
|
-
setInternalCursor(clamped);
|
|
79
|
-
}
|
|
80
|
-
onChange?.(clamped);
|
|
81
|
-
},
|
|
82
|
-
[value, onChange, minDate, maxDate]
|
|
83
|
-
);
|
|
84
|
-
useInput(
|
|
85
|
-
useCallback(
|
|
86
|
-
(_, key) => {
|
|
87
|
-
if (!isFocused) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const { current } = cursorRef;
|
|
91
|
-
if (key.leftArrow) {
|
|
92
|
-
moveCursor(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 1));
|
|
93
|
-
} else if (key.rightArrow) {
|
|
94
|
-
moveCursor(new Date(current.getFullYear(), current.getMonth(), current.getDate() + 1));
|
|
95
|
-
} else if (key.upArrow) {
|
|
96
|
-
moveCursor(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 7));
|
|
97
|
-
} else if (key.downArrow) {
|
|
98
|
-
moveCursor(new Date(current.getFullYear(), current.getMonth(), current.getDate() + 7));
|
|
99
|
-
} else if (key.pageUp) {
|
|
100
|
-
moveCursor(shiftMonth(current, -1));
|
|
101
|
-
} else if (key.pageDown) {
|
|
102
|
-
moveCursor(shiftMonth(current, 1));
|
|
103
|
-
} else if (key.return) {
|
|
104
|
-
onSubmit?.(current);
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
[isFocused, moveCursor, onSubmit]
|
|
108
|
-
),
|
|
109
|
-
{ isActive: !isDisabled && isFocused }
|
|
110
|
-
);
|
|
111
|
-
const monthLabel = `${MONTH_NAMES[cursor.getMonth()]} ${cursor.getFullYear()}`;
|
|
112
|
-
return jsxs(Box, { borderColor: isFocused ? accentColor : void 0, borderStyle: "round", flexDirection: "column", paddingX: 1, children: [
|
|
113
|
-
jsx(Box, { justifyContent: "center", children: jsx(Text, { bold: true, color: accentColor, children: monthLabel }) }),
|
|
114
|
-
jsx(Box, { marginTop: 1, children: weekdayLabels.map((name) => jsx(Box, { width: 3, children: jsx(Text, { dimColor: true, children: name.padEnd(2, " ") }) }, name)) }),
|
|
115
|
-
weeks.map((week, weekIndex) => jsx(Box, { children: week.map((day, dayIndex) => {
|
|
116
|
-
if (day === void 0) {
|
|
117
|
-
return jsx(Box, { width: 3, children: jsx(Text, { children: " " }) }, dayIndex);
|
|
118
|
-
}
|
|
119
|
-
const isToday = isSameDay(day, today);
|
|
120
|
-
const isCursor = isSameDay(day, cursor);
|
|
121
|
-
const outOfRange = isOutOfRange(day, minDate, maxDate);
|
|
122
|
-
return jsx(Box, { width: 3, children: jsxs(
|
|
123
|
-
Text,
|
|
124
|
-
{
|
|
125
|
-
backgroundColor: isCursor && isFocused ? accentColor : void 0,
|
|
126
|
-
bold: isToday,
|
|
127
|
-
color: isCursor && isFocused ? "black" : isToday ? selectedColor : void 0,
|
|
128
|
-
dimColor: outOfRange || isDisabled,
|
|
129
|
-
children: [
|
|
130
|
-
String(day.getDate()).padStart(2, " "),
|
|
131
|
-
" "
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
) }, dayIndex);
|
|
135
|
-
}) }, weekIndex))
|
|
136
|
-
] });
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export { Calendar as default };
|