@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,4 +0,0 @@
|
|
|
1
|
-
import 'yoga-layout';
|
|
2
|
-
export { c as calculateScrollbarLayout, a as calculateScrollbarThumb, b as collectSortedFragments, m as default, g as getAddedScrollHeight, d as getBoundingBox, e as getHorizontalScrollbarBoundingBox, f as getInnerHeight, h as getInnerWidth, i as getRelativeLeft, j as getRelativeTop, k as getText, l as getVerticalScrollbarBoundingBox } from './measure-element-Bc6PEaIe.js';
|
|
3
|
-
import './getScrollHeight-Cz3CDQN2.js';
|
|
4
|
-
import './squashTextNodesWithMap-iqm6OMMT.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { p as parseSgrMouse } from './ansi-parser-BOP8fNdT.js';
|
|
@@ -1,696 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
4
|
-
|
|
5
|
-
const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
|
|
6
|
-
|
|
7
|
-
const process = __cjs_getProcess;
|
|
8
|
-
import { version, createContext } from 'react';
|
|
9
|
-
import createReconciler from 'react-reconciler';
|
|
10
|
-
import { NoEventPriority, DefaultEventPriority } from 'react-reconciler/constants.js';
|
|
11
|
-
import { unstable_shouldYield, unstable_scheduleCallback, unstable_now, unstable_cancelCallback } from 'scheduler';
|
|
12
|
-
import Yoga from 'yoga-layout';
|
|
13
|
-
import { b as insertBeforeNode, d as appendChildNode, s as setTextNodeValue, m as markNodeAsDirty, e as emitLayoutListeners, r as removeChildNode, f as createTextNode, c as createNode, h as setStyle, j as setAttribute } from './dom-CrbpQgat.js';
|
|
14
|
-
|
|
15
|
-
const positionEdges = [
|
|
16
|
-
["top", Yoga.EDGE_TOP],
|
|
17
|
-
["right", Yoga.EDGE_RIGHT],
|
|
18
|
-
["bottom", Yoga.EDGE_BOTTOM],
|
|
19
|
-
["left", Yoga.EDGE_LEFT]
|
|
20
|
-
];
|
|
21
|
-
const applyPositionStyles = (node, style) => {
|
|
22
|
-
if ("position" in style) {
|
|
23
|
-
let positionType = Yoga.POSITION_TYPE_RELATIVE;
|
|
24
|
-
if (style.position === "absolute") {
|
|
25
|
-
positionType = Yoga.POSITION_TYPE_ABSOLUTE;
|
|
26
|
-
} else if (style.position === "static") {
|
|
27
|
-
positionType = Yoga.POSITION_TYPE_STATIC;
|
|
28
|
-
}
|
|
29
|
-
node.setPositionType(positionType);
|
|
30
|
-
}
|
|
31
|
-
for (const [property, edge] of positionEdges) {
|
|
32
|
-
if (!(property in style)) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const value = style[property];
|
|
36
|
-
if (typeof value === "string") {
|
|
37
|
-
node.setPositionPercent(edge, Number.parseFloat(value));
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
node.setPosition(edge, value);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const applyMarginStyles = (node, style) => {
|
|
44
|
-
if ("margin" in style) {
|
|
45
|
-
node.setMargin(Yoga.EDGE_ALL, style.margin ?? 0);
|
|
46
|
-
}
|
|
47
|
-
if ("marginX" in style) {
|
|
48
|
-
node.setMargin(Yoga.EDGE_HORIZONTAL, style.marginX ?? 0);
|
|
49
|
-
}
|
|
50
|
-
if ("marginY" in style) {
|
|
51
|
-
node.setMargin(Yoga.EDGE_VERTICAL, style.marginY ?? 0);
|
|
52
|
-
}
|
|
53
|
-
if ("marginLeft" in style) {
|
|
54
|
-
node.setMargin(Yoga.EDGE_START, style.marginLeft || 0);
|
|
55
|
-
}
|
|
56
|
-
if ("marginRight" in style) {
|
|
57
|
-
node.setMargin(Yoga.EDGE_END, style.marginRight || 0);
|
|
58
|
-
}
|
|
59
|
-
if ("marginTop" in style) {
|
|
60
|
-
node.setMargin(Yoga.EDGE_TOP, style.marginTop || 0);
|
|
61
|
-
}
|
|
62
|
-
if ("marginBottom" in style) {
|
|
63
|
-
node.setMargin(Yoga.EDGE_BOTTOM, style.marginBottom || 0);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
const applyPaddingStyles = (node, style) => {
|
|
67
|
-
if ("padding" in style) {
|
|
68
|
-
node.setPadding(Yoga.EDGE_ALL, style.padding ?? 0);
|
|
69
|
-
}
|
|
70
|
-
if ("paddingX" in style) {
|
|
71
|
-
node.setPadding(Yoga.EDGE_HORIZONTAL, style.paddingX ?? 0);
|
|
72
|
-
}
|
|
73
|
-
if ("paddingY" in style) {
|
|
74
|
-
node.setPadding(Yoga.EDGE_VERTICAL, style.paddingY ?? 0);
|
|
75
|
-
}
|
|
76
|
-
if ("paddingLeft" in style) {
|
|
77
|
-
node.setPadding(Yoga.EDGE_LEFT, style.paddingLeft || 0);
|
|
78
|
-
}
|
|
79
|
-
if ("paddingRight" in style) {
|
|
80
|
-
node.setPadding(Yoga.EDGE_RIGHT, style.paddingRight || 0);
|
|
81
|
-
}
|
|
82
|
-
if ("paddingTop" in style) {
|
|
83
|
-
node.setPadding(Yoga.EDGE_TOP, style.paddingTop || 0);
|
|
84
|
-
}
|
|
85
|
-
if ("paddingBottom" in style) {
|
|
86
|
-
node.setPadding(Yoga.EDGE_BOTTOM, style.paddingBottom || 0);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const applyFlexStyles = (node, style) => {
|
|
90
|
-
if ("flexGrow" in style) {
|
|
91
|
-
node.setFlexGrow(style.flexGrow ?? 0);
|
|
92
|
-
}
|
|
93
|
-
if ("flexShrink" in style) {
|
|
94
|
-
node.setFlexShrink(typeof style.flexShrink === "number" ? style.flexShrink : 1);
|
|
95
|
-
}
|
|
96
|
-
if ("flexWrap" in style) {
|
|
97
|
-
if (style.flexWrap === "nowrap") {
|
|
98
|
-
node.setFlexWrap(Yoga.WRAP_NO_WRAP);
|
|
99
|
-
}
|
|
100
|
-
if (style.flexWrap === "wrap") {
|
|
101
|
-
node.setFlexWrap(Yoga.WRAP_WRAP);
|
|
102
|
-
}
|
|
103
|
-
if (style.flexWrap === "wrap-reverse") {
|
|
104
|
-
node.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if ("flexDirection" in style) {
|
|
108
|
-
if (style.flexDirection === "row") {
|
|
109
|
-
node.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
|
110
|
-
}
|
|
111
|
-
if (style.flexDirection === "row-reverse") {
|
|
112
|
-
node.setFlexDirection(Yoga.FLEX_DIRECTION_ROW_REVERSE);
|
|
113
|
-
}
|
|
114
|
-
if (style.flexDirection === "column") {
|
|
115
|
-
node.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN);
|
|
116
|
-
}
|
|
117
|
-
if (style.flexDirection === "column-reverse") {
|
|
118
|
-
node.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if ("flexBasis" in style) {
|
|
122
|
-
if (typeof style.flexBasis === "number") {
|
|
123
|
-
node.setFlexBasis(style.flexBasis);
|
|
124
|
-
} else if (typeof style.flexBasis === "string") {
|
|
125
|
-
node.setFlexBasisPercent(Number.parseInt(style.flexBasis, 10));
|
|
126
|
-
} else {
|
|
127
|
-
node.setFlexBasis(Number.NaN);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if ("alignItems" in style) {
|
|
131
|
-
if (style.alignItems === "stretch" || !style.alignItems) {
|
|
132
|
-
node.setAlignItems(Yoga.ALIGN_STRETCH);
|
|
133
|
-
}
|
|
134
|
-
if (style.alignItems === "flex-start") {
|
|
135
|
-
node.setAlignItems(Yoga.ALIGN_FLEX_START);
|
|
136
|
-
}
|
|
137
|
-
if (style.alignItems === "center") {
|
|
138
|
-
node.setAlignItems(Yoga.ALIGN_CENTER);
|
|
139
|
-
}
|
|
140
|
-
if (style.alignItems === "flex-end") {
|
|
141
|
-
node.setAlignItems(Yoga.ALIGN_FLEX_END);
|
|
142
|
-
}
|
|
143
|
-
if (style.alignItems === "baseline") {
|
|
144
|
-
node.setAlignItems(Yoga.ALIGN_BASELINE);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if ("alignSelf" in style) {
|
|
148
|
-
if (style.alignSelf === "auto" || !style.alignSelf) {
|
|
149
|
-
node.setAlignSelf(Yoga.ALIGN_AUTO);
|
|
150
|
-
}
|
|
151
|
-
if (style.alignSelf === "flex-start") {
|
|
152
|
-
node.setAlignSelf(Yoga.ALIGN_FLEX_START);
|
|
153
|
-
}
|
|
154
|
-
if (style.alignSelf === "center") {
|
|
155
|
-
node.setAlignSelf(Yoga.ALIGN_CENTER);
|
|
156
|
-
}
|
|
157
|
-
if (style.alignSelf === "flex-end") {
|
|
158
|
-
node.setAlignSelf(Yoga.ALIGN_FLEX_END);
|
|
159
|
-
}
|
|
160
|
-
if (style.alignSelf === "stretch") {
|
|
161
|
-
node.setAlignSelf(Yoga.ALIGN_STRETCH);
|
|
162
|
-
}
|
|
163
|
-
if (style.alignSelf === "baseline") {
|
|
164
|
-
node.setAlignSelf(Yoga.ALIGN_BASELINE);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if ("alignContent" in style) {
|
|
168
|
-
if (style.alignContent === "flex-start" || !style.alignContent) {
|
|
169
|
-
node.setAlignContent(Yoga.ALIGN_FLEX_START);
|
|
170
|
-
}
|
|
171
|
-
if (style.alignContent === "center") {
|
|
172
|
-
node.setAlignContent(Yoga.ALIGN_CENTER);
|
|
173
|
-
}
|
|
174
|
-
if (style.alignContent === "flex-end") {
|
|
175
|
-
node.setAlignContent(Yoga.ALIGN_FLEX_END);
|
|
176
|
-
}
|
|
177
|
-
if (style.alignContent === "space-between") {
|
|
178
|
-
node.setAlignContent(Yoga.ALIGN_SPACE_BETWEEN);
|
|
179
|
-
}
|
|
180
|
-
if (style.alignContent === "space-around") {
|
|
181
|
-
node.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
|
|
182
|
-
}
|
|
183
|
-
if (style.alignContent === "space-evenly") {
|
|
184
|
-
node.setAlignContent(Yoga.ALIGN_SPACE_EVENLY);
|
|
185
|
-
}
|
|
186
|
-
if (style.alignContent === "stretch") {
|
|
187
|
-
node.setAlignContent(Yoga.ALIGN_STRETCH);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if ("justifyContent" in style) {
|
|
191
|
-
if (style.justifyContent === "flex-start" || !style.justifyContent) {
|
|
192
|
-
node.setJustifyContent(Yoga.JUSTIFY_FLEX_START);
|
|
193
|
-
}
|
|
194
|
-
if (style.justifyContent === "center") {
|
|
195
|
-
node.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
|
196
|
-
}
|
|
197
|
-
if (style.justifyContent === "flex-end") {
|
|
198
|
-
node.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
|
199
|
-
}
|
|
200
|
-
if (style.justifyContent === "space-between") {
|
|
201
|
-
node.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
|
|
202
|
-
}
|
|
203
|
-
if (style.justifyContent === "space-around") {
|
|
204
|
-
node.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
|
|
205
|
-
}
|
|
206
|
-
if (style.justifyContent === "space-evenly") {
|
|
207
|
-
node.setJustifyContent(Yoga.JUSTIFY_SPACE_EVENLY);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
const applyDimensionStyles = (node, style) => {
|
|
212
|
-
if ("width" in style) {
|
|
213
|
-
if (typeof style.width === "number") {
|
|
214
|
-
node.setWidth(style.width);
|
|
215
|
-
} else if (typeof style.width === "string") {
|
|
216
|
-
node.setWidthPercent(Number.parseInt(style.width, 10));
|
|
217
|
-
} else {
|
|
218
|
-
node.setWidthAuto();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if ("height" in style) {
|
|
222
|
-
if (typeof style.height === "number") {
|
|
223
|
-
node.setHeight(style.height);
|
|
224
|
-
} else if (typeof style.height === "string") {
|
|
225
|
-
node.setHeightPercent(Number.parseInt(style.height, 10));
|
|
226
|
-
} else {
|
|
227
|
-
node.setHeightAuto();
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
if ("minWidth" in style) {
|
|
231
|
-
if (typeof style.minWidth === "string") {
|
|
232
|
-
node.setMinWidthPercent(Number.parseInt(style.minWidth, 10));
|
|
233
|
-
} else {
|
|
234
|
-
node.setMinWidth(style.minWidth ?? 0);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
if ("minHeight" in style) {
|
|
238
|
-
if (typeof style.minHeight === "string") {
|
|
239
|
-
node.setMinHeightPercent(Number.parseInt(style.minHeight, 10));
|
|
240
|
-
} else {
|
|
241
|
-
node.setMinHeight(style.minHeight ?? 0);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
if ("maxWidth" in style) {
|
|
245
|
-
if (typeof style.maxWidth === "string") {
|
|
246
|
-
node.setMaxWidthPercent(Number.parseInt(style.maxWidth, 10));
|
|
247
|
-
} else {
|
|
248
|
-
node.setMaxWidth(style.maxWidth);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
if ("maxHeight" in style) {
|
|
252
|
-
if (typeof style.maxHeight === "string") {
|
|
253
|
-
node.setMaxHeightPercent(Number.parseInt(style.maxHeight, 10));
|
|
254
|
-
} else {
|
|
255
|
-
node.setMaxHeight(style.maxHeight);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
if ("aspectRatio" in style) {
|
|
259
|
-
node.setAspectRatio(style.aspectRatio);
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
const applyDisplayStyles = (node, style) => {
|
|
263
|
-
if ("display" in style) {
|
|
264
|
-
node.setDisplay(style.display === "flex" ? Yoga.DISPLAY_FLEX : Yoga.DISPLAY_NONE);
|
|
265
|
-
}
|
|
266
|
-
};
|
|
267
|
-
const applyBorderStyles = (node, style, currentStyle) => {
|
|
268
|
-
const hasBorderChanges = "borderStyle" in style || "borderTop" in style || "borderBottom" in style || "borderLeft" in style || "borderRight" in style;
|
|
269
|
-
if (!hasBorderChanges) {
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
const borderWidth = currentStyle.borderStyle ? 1 : 0;
|
|
273
|
-
node.setBorder(Yoga.EDGE_TOP, currentStyle.borderTop === false ? 0 : borderWidth);
|
|
274
|
-
node.setBorder(Yoga.EDGE_BOTTOM, currentStyle.borderBottom === false ? 0 : borderWidth);
|
|
275
|
-
node.setBorder(Yoga.EDGE_LEFT, currentStyle.borderLeft === false ? 0 : borderWidth);
|
|
276
|
-
node.setBorder(Yoga.EDGE_RIGHT, currentStyle.borderRight === false ? 0 : borderWidth);
|
|
277
|
-
};
|
|
278
|
-
const applyGapStyles = (node, style) => {
|
|
279
|
-
if ("gap" in style) {
|
|
280
|
-
node.setGap(Yoga.GUTTER_ALL, style.gap ?? 0);
|
|
281
|
-
}
|
|
282
|
-
if ("columnGap" in style) {
|
|
283
|
-
node.setGap(Yoga.GUTTER_COLUMN, style.columnGap ?? 0);
|
|
284
|
-
}
|
|
285
|
-
if ("rowGap" in style) {
|
|
286
|
-
node.setGap(Yoga.GUTTER_ROW, style.rowGap ?? 0);
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
const applyOverflowStyles = (node, style) => {
|
|
290
|
-
const overflow = style.overflow ?? "visible";
|
|
291
|
-
const overflowX = style.overflowX ?? overflow;
|
|
292
|
-
const overflowY = style.overflowY ?? overflow;
|
|
293
|
-
if (overflowX === "scroll" || overflowY === "scroll") {
|
|
294
|
-
node.setOverflow(Yoga.OVERFLOW_SCROLL);
|
|
295
|
-
} else if (overflowX === "hidden" || overflowY === "hidden") {
|
|
296
|
-
node.setOverflow(Yoga.OVERFLOW_HIDDEN);
|
|
297
|
-
} else {
|
|
298
|
-
node.setOverflow(Yoga.OVERFLOW_VISIBLE);
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
const styles = (node, style = {}, currentStyle = style) => {
|
|
302
|
-
applyPositionStyles(node, style);
|
|
303
|
-
applyMarginStyles(node, style);
|
|
304
|
-
applyPaddingStyles(node, style);
|
|
305
|
-
applyFlexStyles(node, style);
|
|
306
|
-
applyDimensionStyles(node, style);
|
|
307
|
-
applyDisplayStyles(node, style);
|
|
308
|
-
applyBorderStyles(node, style, currentStyle);
|
|
309
|
-
applyGapStyles(node, style);
|
|
310
|
-
applyOverflowStyles(node, currentStyle);
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
if (process.env["DEV"] === "true") {
|
|
314
|
-
let isDevtoolsInstalled = false;
|
|
315
|
-
try {
|
|
316
|
-
import.meta.resolve("react-devtools-core");
|
|
317
|
-
isDevtoolsInstalled = true;
|
|
318
|
-
} catch {
|
|
319
|
-
}
|
|
320
|
-
if (isDevtoolsInstalled) {
|
|
321
|
-
await import('../packem_chunks/devtools.js');
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const diff = (before, after) => {
|
|
325
|
-
if (before === after) {
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
if (!before) {
|
|
329
|
-
return after;
|
|
330
|
-
}
|
|
331
|
-
const changed = {};
|
|
332
|
-
let isChanged = false;
|
|
333
|
-
for (const key of Object.keys(before)) {
|
|
334
|
-
const isDeleted = after ? !Object.hasOwn(after, key) : true;
|
|
335
|
-
if (isDeleted) {
|
|
336
|
-
changed[key] = void 0;
|
|
337
|
-
isChanged = true;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
if (after) {
|
|
341
|
-
for (const key of Object.keys(after)) {
|
|
342
|
-
if (after[key] !== before[key]) {
|
|
343
|
-
changed[key] = after[key];
|
|
344
|
-
isChanged = true;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
return isChanged ? changed : void 0;
|
|
349
|
-
};
|
|
350
|
-
const cleanupNodeTree = (node) => {
|
|
351
|
-
if (!node) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
node.yogaNode?.unsetMeasureFunc();
|
|
355
|
-
if ("resizeObservers" in node) {
|
|
356
|
-
node.resizeObservers?.clear();
|
|
357
|
-
}
|
|
358
|
-
if ("childNodes" in node && node.childNodes) {
|
|
359
|
-
for (const child of node.childNodes) {
|
|
360
|
-
cleanupNodeTree(child);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
node.yogaNode?.free();
|
|
364
|
-
if ("cachedRender" in node) {
|
|
365
|
-
node.cachedRender = void 0;
|
|
366
|
-
}
|
|
367
|
-
if ("childNodes" in node) {
|
|
368
|
-
node.childNodes = [];
|
|
369
|
-
}
|
|
370
|
-
node.parentNode = void 0;
|
|
371
|
-
};
|
|
372
|
-
let currentUpdatePriority = NoEventPriority;
|
|
373
|
-
let currentRootNode;
|
|
374
|
-
async function loadPackageJson() {
|
|
375
|
-
const fs = await import('node:fs');
|
|
376
|
-
const content = fs.readFileSync(new URL("../package.json", import.meta.url), "utf8");
|
|
377
|
-
const parsedContent = JSON.parse(content);
|
|
378
|
-
return {
|
|
379
|
-
name: parsedContent?.name,
|
|
380
|
-
version: parsedContent?.version
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
let packageInfo = {
|
|
384
|
-
name: "ink",
|
|
385
|
-
version: version
|
|
386
|
-
};
|
|
387
|
-
if (process.env["DEV"] === "true") {
|
|
388
|
-
try {
|
|
389
|
-
const loaded = await loadPackageJson();
|
|
390
|
-
packageInfo = {
|
|
391
|
-
name: loaded.name || packageInfo.name,
|
|
392
|
-
version: loaded.version || packageInfo.version
|
|
393
|
-
};
|
|
394
|
-
} catch (error) {
|
|
395
|
-
console.warn("Failed to load package.json in development mode. Falling back to default renderer metadata.", error);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
const reconcilerInstance = createReconciler({
|
|
399
|
-
afterActiveInstanceBlur() {
|
|
400
|
-
},
|
|
401
|
-
appendChild: appendChildNode,
|
|
402
|
-
appendChildToContainer: appendChildNode,
|
|
403
|
-
appendInitialChild: appendChildNode,
|
|
404
|
-
beforeActiveInstanceBlur() {
|
|
405
|
-
},
|
|
406
|
-
// @ts-expect-error cancelCallback is not in @types/react-reconciler but required at runtime
|
|
407
|
-
cancelCallback: unstable_cancelCallback,
|
|
408
|
-
cancelTimeout: clearTimeout,
|
|
409
|
-
clearContainer: () => false,
|
|
410
|
-
commitTextUpdate(node, _oldText, newText) {
|
|
411
|
-
setTextNodeValue(node, newText);
|
|
412
|
-
},
|
|
413
|
-
commitUpdate(node, _type, oldProps, newProps) {
|
|
414
|
-
if (currentRootNode && node.internal_static) {
|
|
415
|
-
currentRootNode.isStaticDirty = true;
|
|
416
|
-
}
|
|
417
|
-
const props = diff(oldProps, newProps);
|
|
418
|
-
const style = diff(oldProps["style"], newProps["style"]);
|
|
419
|
-
if (!props && !style) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
let shouldMarkDirty = Boolean(style);
|
|
423
|
-
if (props) {
|
|
424
|
-
for (const [key, value] of Object.entries(props)) {
|
|
425
|
-
if (key === "children") {
|
|
426
|
-
continue;
|
|
427
|
-
}
|
|
428
|
-
if (key === "style") {
|
|
429
|
-
setStyle(node, value);
|
|
430
|
-
continue;
|
|
431
|
-
}
|
|
432
|
-
if (key === "internal_transform") {
|
|
433
|
-
node.internal_transform = value;
|
|
434
|
-
shouldMarkDirty = true;
|
|
435
|
-
continue;
|
|
436
|
-
}
|
|
437
|
-
if (key === "internal_cursor") {
|
|
438
|
-
node.internal_cursor = value;
|
|
439
|
-
shouldMarkDirty = true;
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
if (key === "internal_static") {
|
|
443
|
-
node.internal_static = true;
|
|
444
|
-
shouldMarkDirty = true;
|
|
445
|
-
continue;
|
|
446
|
-
}
|
|
447
|
-
if (key === "sticky") {
|
|
448
|
-
node.internal_sticky = value;
|
|
449
|
-
shouldMarkDirty = true;
|
|
450
|
-
continue;
|
|
451
|
-
}
|
|
452
|
-
if (key === "internalStickyAlternate") {
|
|
453
|
-
node.internal_stickyAlternate = value;
|
|
454
|
-
shouldMarkDirty = true;
|
|
455
|
-
continue;
|
|
456
|
-
}
|
|
457
|
-
if (key === "opaque") {
|
|
458
|
-
node.internal_opaque = value;
|
|
459
|
-
shouldMarkDirty = true;
|
|
460
|
-
continue;
|
|
461
|
-
}
|
|
462
|
-
if (key === "scrollbar") {
|
|
463
|
-
node.internal_scrollbar = value;
|
|
464
|
-
shouldMarkDirty = true;
|
|
465
|
-
continue;
|
|
466
|
-
}
|
|
467
|
-
if (key === "internal_terminalCursorFocus") {
|
|
468
|
-
node.internal_terminalCursorFocus = value;
|
|
469
|
-
shouldMarkDirty = true;
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
if (key === "internal_terminalCursorPosition") {
|
|
473
|
-
node.internal_terminalCursorPosition = value;
|
|
474
|
-
shouldMarkDirty = true;
|
|
475
|
-
continue;
|
|
476
|
-
}
|
|
477
|
-
if (key === "cachedRender") {
|
|
478
|
-
node.cachedRender = value;
|
|
479
|
-
shouldMarkDirty = true;
|
|
480
|
-
continue;
|
|
481
|
-
}
|
|
482
|
-
setAttribute(node, key, value);
|
|
483
|
-
shouldMarkDirty = true;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
if (style && node.yogaNode) {
|
|
487
|
-
styles(node.yogaNode, style, newProps["style"] ?? {});
|
|
488
|
-
}
|
|
489
|
-
if (shouldMarkDirty) {
|
|
490
|
-
markNodeAsDirty(node);
|
|
491
|
-
}
|
|
492
|
-
},
|
|
493
|
-
createInstance(originalType, newProps, rootNode, hostContext) {
|
|
494
|
-
if (hostContext.isInsideText && originalType === "ink-box") {
|
|
495
|
-
throw new Error(`<Box> can’t be nested inside <Text> component`);
|
|
496
|
-
}
|
|
497
|
-
if (hostContext.isInsideText && originalType === "ink-cursor") {
|
|
498
|
-
throw new Error(`<Cursor> can’t be nested inside <Text> component`);
|
|
499
|
-
}
|
|
500
|
-
const type = originalType === "ink-text" && hostContext.isInsideText ? "ink-virtual-text" : originalType;
|
|
501
|
-
const node = createNode(type);
|
|
502
|
-
for (const [key, value] of Object.entries(newProps)) {
|
|
503
|
-
if (key === "children") {
|
|
504
|
-
continue;
|
|
505
|
-
}
|
|
506
|
-
if (key === "style") {
|
|
507
|
-
setStyle(node, value);
|
|
508
|
-
if (node.yogaNode) {
|
|
509
|
-
styles(node.yogaNode, value);
|
|
510
|
-
}
|
|
511
|
-
continue;
|
|
512
|
-
}
|
|
513
|
-
if (key === "internal_transform") {
|
|
514
|
-
node.internal_transform = value;
|
|
515
|
-
continue;
|
|
516
|
-
}
|
|
517
|
-
if (key === "internal_cursor") {
|
|
518
|
-
node.internal_cursor = value;
|
|
519
|
-
continue;
|
|
520
|
-
}
|
|
521
|
-
if (key === "internal_static") {
|
|
522
|
-
currentRootNode = rootNode;
|
|
523
|
-
node.internal_static = true;
|
|
524
|
-
rootNode.isStaticDirty = true;
|
|
525
|
-
rootNode.staticNode = node;
|
|
526
|
-
continue;
|
|
527
|
-
}
|
|
528
|
-
if (key === "sticky") {
|
|
529
|
-
node.internal_sticky = value;
|
|
530
|
-
continue;
|
|
531
|
-
}
|
|
532
|
-
if (key === "internalStickyAlternate") {
|
|
533
|
-
node.internal_stickyAlternate = value;
|
|
534
|
-
continue;
|
|
535
|
-
}
|
|
536
|
-
if (key === "opaque") {
|
|
537
|
-
node.internal_opaque = value;
|
|
538
|
-
continue;
|
|
539
|
-
}
|
|
540
|
-
if (key === "scrollbar") {
|
|
541
|
-
node.internal_scrollbar = value;
|
|
542
|
-
continue;
|
|
543
|
-
}
|
|
544
|
-
if (key === "internal_terminalCursorFocus") {
|
|
545
|
-
node.internal_terminalCursorFocus = value;
|
|
546
|
-
continue;
|
|
547
|
-
}
|
|
548
|
-
if (key === "internal_terminalCursorPosition") {
|
|
549
|
-
node.internal_terminalCursorPosition = value;
|
|
550
|
-
continue;
|
|
551
|
-
}
|
|
552
|
-
if (key === "internal_static") {
|
|
553
|
-
node.internal_static = true;
|
|
554
|
-
continue;
|
|
555
|
-
}
|
|
556
|
-
if (key === "cachedRender") {
|
|
557
|
-
node.cachedRender = value;
|
|
558
|
-
continue;
|
|
559
|
-
}
|
|
560
|
-
setAttribute(node, key, value);
|
|
561
|
-
}
|
|
562
|
-
return node;
|
|
563
|
-
},
|
|
564
|
-
createTextInstance(text, _root, hostContext) {
|
|
565
|
-
if (!hostContext.isInsideText) {
|
|
566
|
-
throw new Error(`Text string "${text}" must be rendered inside <Text> component`);
|
|
567
|
-
}
|
|
568
|
-
return createTextNode(text);
|
|
569
|
-
},
|
|
570
|
-
detachDeletedInstance() {
|
|
571
|
-
},
|
|
572
|
-
finalizeInitialChildren() {
|
|
573
|
-
return false;
|
|
574
|
-
},
|
|
575
|
-
getChildHostContext(parentHostContext, type) {
|
|
576
|
-
const previousIsInsideText = parentHostContext.isInsideText;
|
|
577
|
-
const isInsideText = type === "ink-text" || type === "ink-virtual-text";
|
|
578
|
-
if (previousIsInsideText === isInsideText) {
|
|
579
|
-
return parentHostContext;
|
|
580
|
-
}
|
|
581
|
-
return { isInsideText };
|
|
582
|
-
},
|
|
583
|
-
getCurrentUpdatePriority: () => currentUpdatePriority,
|
|
584
|
-
getInstanceFromNode: () => null,
|
|
585
|
-
getInstanceFromScope: () => null,
|
|
586
|
-
getPublicInstance: (instance) => instance,
|
|
587
|
-
getRootHostContext: () => {
|
|
588
|
-
return {
|
|
589
|
-
isInsideText: false
|
|
590
|
-
};
|
|
591
|
-
},
|
|
592
|
-
hideInstance(node) {
|
|
593
|
-
node.internal_hidden = true;
|
|
594
|
-
node.yogaNode?.setDisplay(Yoga.DISPLAY_NONE);
|
|
595
|
-
markNodeAsDirty(node);
|
|
596
|
-
},
|
|
597
|
-
hideTextInstance(node) {
|
|
598
|
-
setTextNodeValue(node, "");
|
|
599
|
-
},
|
|
600
|
-
HostTransitionContext: createContext(null),
|
|
601
|
-
insertBefore: insertBeforeNode,
|
|
602
|
-
insertInContainerBefore: insertBeforeNode,
|
|
603
|
-
isPrimaryRenderer: true,
|
|
604
|
-
maySuspendCommit() {
|
|
605
|
-
return true;
|
|
606
|
-
},
|
|
607
|
-
noTimeout: -1,
|
|
608
|
-
NotPendingTransition: void 0,
|
|
609
|
-
now: unstable_now,
|
|
610
|
-
preloadInstance() {
|
|
611
|
-
return true;
|
|
612
|
-
},
|
|
613
|
-
prepareForCommit: () => null,
|
|
614
|
-
preparePortalMount: () => null,
|
|
615
|
-
prepareScopeUpdate() {
|
|
616
|
-
},
|
|
617
|
-
removeChild(node, removeNode) {
|
|
618
|
-
removeChildNode(node, removeNode);
|
|
619
|
-
cleanupNodeTree(removeNode);
|
|
620
|
-
},
|
|
621
|
-
removeChildFromContainer(node, removeNode) {
|
|
622
|
-
removeChildNode(node, removeNode);
|
|
623
|
-
cleanupNodeTree(removeNode);
|
|
624
|
-
},
|
|
625
|
-
rendererPackageName: packageInfo.name,
|
|
626
|
-
rendererVersion: packageInfo.version,
|
|
627
|
-
requestPostPaintCallback() {
|
|
628
|
-
},
|
|
629
|
-
resetAfterCommit(rootNode) {
|
|
630
|
-
if (typeof rootNode.onComputeLayout === "function") {
|
|
631
|
-
rootNode.onComputeLayout();
|
|
632
|
-
}
|
|
633
|
-
emitLayoutListeners(rootNode);
|
|
634
|
-
if (rootNode.isStaticDirty) {
|
|
635
|
-
rootNode.isStaticDirty = false;
|
|
636
|
-
if (typeof rootNode.onImmediateRender === "function") {
|
|
637
|
-
rootNode.onImmediateRender();
|
|
638
|
-
}
|
|
639
|
-
return;
|
|
640
|
-
}
|
|
641
|
-
if (typeof rootNode.onRender === "function") {
|
|
642
|
-
rootNode.onRender();
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
resetFormInstance() {
|
|
646
|
-
},
|
|
647
|
-
resetTextContent() {
|
|
648
|
-
},
|
|
649
|
-
resolveEventTimeStamp() {
|
|
650
|
-
return -1.1;
|
|
651
|
-
},
|
|
652
|
-
resolveEventType() {
|
|
653
|
-
return null;
|
|
654
|
-
},
|
|
655
|
-
resolveUpdatePriority() {
|
|
656
|
-
if (currentUpdatePriority !== NoEventPriority) {
|
|
657
|
-
return currentUpdatePriority;
|
|
658
|
-
}
|
|
659
|
-
return DefaultEventPriority;
|
|
660
|
-
},
|
|
661
|
-
scheduleCallback: unstable_scheduleCallback,
|
|
662
|
-
scheduleMicrotask: queueMicrotask,
|
|
663
|
-
scheduleTimeout: setTimeout,
|
|
664
|
-
setCurrentUpdatePriority(newPriority) {
|
|
665
|
-
currentUpdatePriority = newPriority;
|
|
666
|
-
},
|
|
667
|
-
shouldAttemptEagerTransition() {
|
|
668
|
-
return false;
|
|
669
|
-
},
|
|
670
|
-
shouldSetTextContent: () => false,
|
|
671
|
-
shouldYield: unstable_shouldYield,
|
|
672
|
-
startSuspendingCommit() {
|
|
673
|
-
},
|
|
674
|
-
supportsHydration: false,
|
|
675
|
-
// Scheduler integration for concurrent mode
|
|
676
|
-
supportsMicrotasks: true,
|
|
677
|
-
supportsMutation: true,
|
|
678
|
-
supportsPersistence: false,
|
|
679
|
-
suspendInstance() {
|
|
680
|
-
},
|
|
681
|
-
trackSchedulerEvent() {
|
|
682
|
-
},
|
|
683
|
-
unhideInstance(node) {
|
|
684
|
-
node.internal_hidden = false;
|
|
685
|
-
node.yogaNode?.setDisplay(Yoga.DISPLAY_FLEX);
|
|
686
|
-
markNodeAsDirty(node);
|
|
687
|
-
},
|
|
688
|
-
unhideTextInstance(node, text) {
|
|
689
|
-
setTextNodeValue(node, text);
|
|
690
|
-
},
|
|
691
|
-
waitForCommitToBeReady() {
|
|
692
|
-
return null;
|
|
693
|
-
}
|
|
694
|
-
});
|
|
695
|
-
|
|
696
|
-
export { reconcilerInstance as r, styles as s };
|