@visulima/tui 1.0.0-alpha.1 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/LICENSE.md +63 -9
- package/README.md +3 -3
- package/dist/core/index.js +3 -3
- package/dist/ink/canvas/braille.d.ts +22 -0
- package/dist/ink/canvas/buffer.d.ts +67 -0
- package/dist/ink/components/accordion.d.ts +52 -0
- package/dist/ink/components/animate-presence.d.ts +15 -0
- package/dist/ink/components/approval-prompt.d.ts +55 -0
- package/dist/ink/components/area-chart.d.ts +54 -0
- package/dist/ink/components/bar-chart.d.ts +57 -0
- package/dist/ink/components/blink-dot.d.ts +30 -0
- package/dist/ink/components/breadcrumb.d.ts +28 -0
- package/dist/ink/components/button.d.ts +38 -0
- package/dist/ink/components/calendar.d.ts +60 -0
- package/dist/ink/components/canvas.d.ts +38 -0
- package/dist/ink/components/card.d.ts +46 -0
- package/dist/ink/components/chart-utils.d.ts +54 -0
- package/dist/ink/components/checkbox.d.ts +39 -0
- package/dist/ink/components/collapsible.d.ts +43 -0
- package/dist/ink/components/command-block.d.ts +38 -0
- package/dist/ink/components/command-palette.d.ts +72 -0
- package/dist/ink/components/confirm-dialog.d.ts +63 -0
- package/dist/ink/components/content-switcher.d.ts +49 -0
- package/dist/ink/components/date-picker.d.ts +53 -0
- package/dist/ink/components/definition-list.d.ts +37 -0
- package/dist/ink/components/divider.d.ts +40 -0
- package/dist/ink/components/file-picker/{FilePicker.d.ts → file-picker.d.ts} +2 -19
- package/dist/ink/components/file-picker/types.d.ts +1 -4
- package/dist/ink/components/file-picker/use-file-system.d.ts +1 -1
- package/dist/ink/components/form.d.ts +74 -0
- package/dist/ink/components/gauge.d.ts +75 -0
- package/dist/ink/components/heading.d.ts +27 -0
- package/dist/ink/components/heatmap.d.ts +51 -0
- package/dist/ink/components/{Help.d.ts → help.d.ts} +4 -9
- package/dist/ink/components/histogram.d.ts +52 -0
- package/dist/ink/components/kbd.d.ts +27 -0
- package/dist/ink/components/line-chart.d.ts +94 -0
- package/dist/ink/components/loading-indicator.d.ts +24 -0
- package/dist/ink/components/masked-input.d.ts +41 -0
- package/dist/ink/components/menu.d.ts +70 -0
- package/dist/ink/components/message-bubble.d.ts +35 -0
- package/dist/ink/components/model-badge.d.ts +32 -0
- package/dist/ink/components/operation-tree.d.ts +46 -0
- package/dist/ink/components/option-list.d.ts +41 -0
- package/dist/ink/components/{Paginator.d.ts → paginator.d.ts} +4 -20
- package/dist/ink/components/paragraph.d.ts +31 -0
- package/dist/ink/components/placeholder.d.ts +47 -0
- package/dist/ink/components/{ProgressBar.d.ts → progress-bar.d.ts} +1 -1
- package/dist/ink/components/radio-group.d.ts +62 -0
- package/dist/ink/components/scatter-plot.d.ts +23 -0
- package/dist/ink/components/scroll/{ControlledScrollView.d.ts → controlled-scroll-view.d.ts} +1 -1
- package/dist/ink/components/scroll/index.d.ts +10 -10
- package/dist/ink/components/scroll/{ScrollBarBox.d.ts → scroll-bar-box.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollBar.d.ts → scroll-bar.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollList.d.ts → scroll-list.d.ts} +1 -1
- package/dist/ink/components/scroll/{ScrollView.d.ts → scroll-view.d.ts} +1 -1
- package/dist/ink/components/search-input.d.ts +46 -0
- package/dist/ink/components/{SelectInput.d.ts → select-input.d.ts} +2 -2
- package/dist/ink/components/shimmer-text.d.ts +39 -0
- package/dist/ink/components/sparkline.d.ts +30 -0
- package/dist/ink/components/{Spinner.d.ts → spinner.d.ts} +2 -4
- package/dist/ink/components/{StaticRender.d.ts → static-render.d.ts} +14 -2
- package/dist/ink/components/status-line.d.ts +30 -0
- package/dist/ink/components/stepper.d.ts +42 -0
- package/dist/ink/components/{Stopwatch.d.ts → stopwatch.d.ts} +5 -7
- package/dist/ink/components/streaming-text.d.ts +38 -0
- package/dist/ink/components/switch.d.ts +46 -0
- package/dist/ink/components/{Tabs.d.ts → tabs.d.ts} +10 -3
- package/dist/ink/components/tag.d.ts +30 -0
- package/dist/ink/components/{Timer.d.ts → timer.d.ts} +5 -7
- package/dist/ink/components/toast.d.ts +41 -0
- package/dist/ink/components/tooltip.d.ts +36 -0
- package/dist/ink/components/transition.d.ts +53 -0
- package/dist/ink/components/tree-view/theme.d.ts +2 -2
- package/dist/ink/cursor-helpers.d.ts +0 -3
- package/dist/ink/dom.d.ts +9 -8
- package/dist/ink/hooks/use-animation.d.ts +0 -2
- package/dist/ink/hooks/use-app.d.ts +1 -1
- package/dist/ink/hooks/use-focus-manager.d.ts +1 -1
- package/dist/ink/hooks/use-form.d.ts +70 -0
- package/dist/ink/hooks/use-hotkey.d.ts +37 -0
- package/dist/ink/hooks/use-interval.d.ts +25 -0
- package/dist/ink/hooks/use-key-bindings.d.ts +4 -6
- package/dist/ink/hooks/use-key-chord.d.ts +26 -0
- package/dist/ink/hooks/use-linked-scroll.d.ts +1 -1
- package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
- package/dist/ink/hooks/use-stderr.d.ts +1 -1
- package/dist/ink/hooks/use-stdin.d.ts +1 -1
- package/dist/ink/hooks/use-stdout.d.ts +1 -1
- package/dist/ink/hooks/use-stopwatch.d.ts +1 -3
- package/dist/ink/hooks/use-timeout.d.ts +24 -0
- package/dist/ink/hooks/use-timer.d.ts +0 -2
- package/dist/ink/index.d.ts +228 -92
- package/dist/ink/index.js +132 -77
- package/dist/ink/ink.d.ts +7 -6
- package/dist/ink/mouse/constants.d.ts +5 -50
- package/dist/ink/mouse/index.d.ts +2 -2
- package/dist/ink/output.d.ts +2 -1
- package/dist/ink/styled-line.d.ts +10 -0
- package/dist/ink/write-synchronized.d.ts +2 -2
- package/dist/packem_shared/Accordion-BG-yfIkV.js +80 -0
- package/dist/packem_shared/{Alert-Dr3s_LD9.js → Alert-BLcwIW8V.js} +2 -2
- package/dist/packem_shared/AnimatePresence-D8nEOr_B.js +98 -0
- package/dist/packem_shared/ApprovalPrompt-BXdPros1.js +104 -0
- package/dist/packem_shared/AreaChart-CmTcxLum.js +116 -0
- package/dist/packem_shared/{Badge-Dk7EGGM6.js → Badge-CUfbXwAB.js} +1 -1
- package/dist/packem_shared/BarChart-DWRae67P.js +87 -0
- package/dist/packem_shared/{BigText-CjMdY63X.js → BigText-CVq2X7B5.js} +1 -1
- package/dist/packem_shared/BlinkDot-CrbHMR3L.js +11 -0
- package/dist/packem_shared/{Box-D_pSJ9Jp.js → Box-W1w_NGin.js} +4 -6
- package/dist/packem_shared/Breadcrumb-CPdNxVYs.js +26 -0
- package/dist/packem_shared/Button-CBmTbJ_D.js +57 -0
- package/dist/packem_shared/Calendar-C2Qxt-LA.js +139 -0
- package/dist/packem_shared/Canvas-COttmLPX.js +246 -0
- package/dist/packem_shared/Card-D3tGkNCm.js +24 -0
- package/dist/packem_shared/Checkbox-Dpy_4Lws.js +49 -0
- package/dist/packem_shared/{Code-DjQvPBD9.js → Code-CwzzbsLx.js} +3 -3
- package/dist/packem_shared/Collapsible-BMDrXf5C.js +45 -0
- package/dist/packem_shared/CommandBlock-jdOGJPjY.js +80 -0
- package/dist/packem_shared/CommandPalette-B5IfUQwi.js +146 -0
- package/dist/packem_shared/ConfirmDialog-5XJv3Cc4.js +67 -0
- package/dist/packem_shared/{ConfirmInput-85Y4kRQW.js → ConfirmInput-CxUS0XAA.js} +3 -3
- package/dist/packem_shared/{ConsoleOverlay-DBNa4vtj.js → ConsoleOverlay-BvnCEgjG.js} +2 -2
- package/dist/packem_shared/ContentSwitcher-BHFpO5Za.js +81 -0
- package/dist/packem_shared/ControlledScrollView-C2wOOlJO.js +5 -0
- package/dist/packem_shared/DatePicker-CPejKoqS.js +73 -0
- package/dist/packem_shared/DefinitionList-BAwr0l5J.js +18 -0
- package/dist/packem_shared/{DevTools-aMPIsaHx.js → DevTools-BdxRSkhL.js} +6 -4
- package/dist/packem_shared/{Dialog-DsSNAVgC.js → Dialog-S9r7Izff.js} +5 -5
- package/dist/packem_shared/{DiffView-hqaw-2S6.js → DiffView-BR4T6-Sj.js} +4 -4
- package/dist/packem_shared/Divider-DocXIqNn.js +30 -0
- package/dist/packem_shared/{FilePicker-DNwFxRhq.js → FilePicker-BZ55oF_n.js} +39 -32
- package/dist/packem_shared/FormField-BSG16cnA.js +29 -0
- package/dist/packem_shared/{Fullscreen-DrElAE1o.js → Fullscreen-DO7voOq5.js} +2 -2
- package/dist/packem_shared/Gauge-CKXUXxft.js +122 -0
- package/dist/packem_shared/{Gradient-Ql5P0GUd.js → Gradient-Dg0NezWc.js} +3 -3
- package/dist/packem_shared/Heading-BnR7McmP.js +29 -0
- package/dist/packem_shared/Heatmap-_jqISOU0.js +79 -0
- package/dist/packem_shared/{Help-6wanGG38.js → Help-0yZ_IcQg.js} +4 -11
- package/dist/packem_shared/Histogram-cgAjY5AJ.js +92 -0
- package/dist/packem_shared/{InputParser-BKHpWfvN.js → InputParser-BlsfeY9J.js} +8 -6
- package/dist/packem_shared/KEY-STOdi-nc.js +74 -0
- package/dist/packem_shared/Kbd-BNDXQgey.js +19 -0
- package/dist/packem_shared/{LayoutNode-Cjnsodiy.js → LayoutNode-DAkKg9TE.js} +5 -7
- package/dist/packem_shared/LineChart-ef3HF816.js +7 -0
- package/dist/packem_shared/{Link-COcKYfGT.js → Link-DZ2Tiq1m.js} +2 -2
- package/dist/packem_shared/LoadingIndicator-DzbLGfyJ.js +13 -0
- package/dist/packem_shared/{Markdown-y1ISztof.js → Markdown-33bpCUoe.js} +8 -8
- package/dist/packem_shared/MaskedInput-Ctr6v2dO.js +119 -0
- package/dist/packem_shared/Menu-CeKxhEix.js +112 -0
- package/dist/packem_shared/MessageBubble-BMoU8L2Q.js +26 -0
- package/dist/packem_shared/ModelBadge-CNIxPs7v.js +40 -0
- package/dist/packem_shared/{MouseProvider-Y9TSSEGl.js → MouseProvider-CekPbXCh.js} +3 -3
- package/dist/packem_shared/{MultiSelect-ChoLUcDI.js → MultiSelect-yz7-w0Zv.js} +4 -4
- package/dist/packem_shared/{NAMED_COLORS-a4QBvb5r.js → NAMED_COLORS-DcI3erCu.js} +79 -41
- package/dist/packem_shared/OperationTree-Dudx5o1o.js +67 -0
- package/dist/packem_shared/OptionList-CTyqQaZ1.js +24 -0
- package/dist/packem_shared/{OrderedList-Cp7pXr6m.js → OrderedList-VsvSmHUC.js} +2 -2
- package/dist/packem_shared/{Paginator-D1AuD-kj.js → Paginator-DmGogvEI.js} +44 -44
- package/dist/packem_shared/Paragraph-CNNhfepo.js +9 -0
- package/dist/packem_shared/Placeholder-DkM69Q8Z.js +29 -0
- package/dist/packem_shared/{ProgressBar-DOfpVagn.js → ProgressBar-B7cS4uQm.js} +2 -2
- package/dist/packem_shared/RadioGroup-B4F9PUyL.js +108 -0
- package/dist/packem_shared/{ResizeObserverEntry-Br4seLeQ.js → ResizeObserverEntry-Vr8GZ74x.js} +4 -4
- package/dist/packem_shared/ScatterPlot-CWOg4G5h.js +63 -0
- package/dist/packem_shared/{ScrollBar-EWAs2Uc7.js → ScrollBar-DFeWH43I.js} +2 -2
- package/dist/packem_shared/{ScrollBarBox-DTNNlh7R.js → ScrollBarBox-C7VL6Izd.js} +2 -2
- package/dist/packem_shared/{ScrollList-DCeIFL8M.js → ScrollList-DRcr_RrN.js} +2 -2
- package/dist/packem_shared/{ScrollView-v3MCNIyX.js → ScrollView-C6rdlGwU.js} +4 -4
- package/dist/packem_shared/SearchInput-cB8zFhSg.js +32 -0
- package/dist/packem_shared/{SelectInput-BN2TMyxp.js → SelectInput-WzZSqp72.js} +6 -6
- package/dist/packem_shared/{SelectInputIndicator-DkRMoH_b.js → SelectInputIndicator-DKeN6v5Z.js} +2 -2
- package/dist/packem_shared/{SelectInputItem-BF9LQgKu.js → SelectInputItem-CxFL3spM.js} +1 -1
- package/dist/packem_shared/ShimmerText-B2VbPUSB.js +34 -0
- package/dist/packem_shared/{Slider-BWD7xZX6.js → Slider-BOrNTOQe.js} +3 -3
- package/dist/packem_shared/{Spacer-Bs4ER-HK.js → Spacer-DhmXyTb8.js} +1 -1
- package/dist/packem_shared/Sparkline-BSbjPrwK.js +44 -0
- package/dist/packem_shared/Spinner-BcO5BCAa.js +1942 -0
- package/dist/packem_shared/StaticRender-C3XWvJdC.js +69 -0
- package/dist/packem_shared/StatusLine-DQNUstN9.js +22 -0
- package/dist/packem_shared/{StatusMessage-BtSYxzwb.js → StatusMessage-BYTL6Pl-.js} +2 -2
- package/dist/packem_shared/Stepper-CmUPRK3z.js +60 -0
- package/dist/packem_shared/Stopwatch-zqLQAxXC.js +21 -0
- package/dist/packem_shared/StreamingText-BmuoJtGu.js +38 -0
- package/dist/packem_shared/Switch-DcPdy8nm.js +59 -0
- package/dist/packem_shared/{Table-D-rSVlzb.js → Table-Bgxo87Df.js} +11 -5
- package/dist/packem_shared/{Tabs-BXpZwLWo.js → Tabs-DubuHdYV.js} +53 -35
- package/dist/packem_shared/Tag-CCqM7Ee9.js +35 -0
- package/dist/packem_shared/{Text-DvAUdZcK.js → Text-CtUwV89_.js} +2 -2
- package/dist/packem_shared/{TextInput-C79WEQ5U.js → TextInput-C9r7zT0U.js} +3 -3
- package/dist/packem_shared/{Textarea-Dj06R6Zd.js → Textarea-CGmgt-Nl.js} +5 -5
- package/dist/packem_shared/Timer-D7ZZ0_wz.js +20 -0
- package/dist/packem_shared/Toast-DXSCXFPY.js +37 -0
- package/dist/packem_shared/Tooltip-SvVjj-2k.js +32 -0
- package/dist/packem_shared/{Transform-BHxY_dAM.js → Transform-Cfyva2wd.js} +1 -1
- package/dist/packem_shared/Transition-CbNfKhaj.js +108 -0
- package/dist/packem_shared/{TreeView-C2062dtj.js → TreeView-DGlZeSsK.js} +4 -4
- package/dist/packem_shared/{TuiApp-DfxOnXqi.js → TuiApp-DtdgNRWa.js} +4 -2
- package/dist/packem_shared/{TuiContext-CqEjMyXd.js → TuiContext-lXmJFd-x.js} +6 -3
- package/dist/packem_shared/{UnorderedList-DhnadWjX.js → UnorderedList-D8RPaEAW.js} +2 -2
- package/dist/packem_shared/{ansi-parser-0BdVTKho.js → ansi-parser-BOP8fNdT.js} +6 -4
- package/dist/packem_shared/braille-BoEWoH2I.js +93 -0
- package/dist/packem_shared/{comparePoints-CGMDnd3_.js → comparePoints-CAAlhiMS.js} +2 -2
- package/dist/packem_shared/{ControlledScrollView-BlOaxcsN.js → controlled-scroll-view-DJXfdWMm.js} +2 -2
- package/dist/packem_shared/{createInlineLoop-BxMmcq9D.js → createInlineLoop-Dnfm1ZSJ.js} +19 -13
- package/dist/packem_shared/createMemoryStorage-esFJ61La.js +115 -0
- package/dist/packem_shared/createScreen-Dh0sZlQ0.js +38 -0
- package/dist/packem_shared/{dom-DvzhsAez.js → dom-CrbpQgat.js} +17 -14
- package/dist/packem_shared/{getPathToRoot-a1wbwxfL.js → getPathToRoot-BbvlppLC.js} +2 -2
- package/dist/packem_shared/{getScrollHeight-BubfU_df.js → getScrollHeight-Cz3CDQN2.js} +5 -5
- package/dist/packem_shared/line-chart-VGU2l7pu.js +139 -0
- package/dist/packem_shared/{measure-element-Reza_yfC.js → measure-element-Bc6PEaIe.js} +26 -17
- package/dist/packem_shared/{measure-text-DItZYotK.js → measure-text-BdOhbOeh.js} +74 -7
- package/dist/packem_shared/{measureElement-CTgFCmKd.js → measureElement-DTELRaij.js} +2 -2
- package/dist/packem_shared/parseSgrMouse-4hpBJBsW.js +1 -0
- package/dist/packem_shared/{processLayout-BQ9kXfd3.js → processLayout-B0Coz0Ua.js} +1 -1
- package/dist/packem_shared/{reconciler-gfmqURLy.js → reconciler-Dd7Z0A97.js} +21 -5
- package/dist/packem_shared/{reconciler-BXf6miSS.js → reconciler-mzMwSOft.js} +23 -13
- package/dist/packem_shared/{render-BAwdjfki.js → render-Bm9Oa1sG.js} +72 -79
- package/dist/packem_shared/{render-Bpjhf0lD.js → render-CjlKdg4m.js} +15 -11
- package/dist/packem_shared/{renderToString-ClIaXgrC.js → renderToString-CWYS1ZXE.js} +4 -4
- package/dist/packem_shared/{renderToString-Cfg55DRD.js → renderToString-DB3ILWFm.js} +4 -4
- package/dist/packem_shared/{renderTreeToBuffer-D3mo7M7m.js → renderTreeToBuffer-CDDTGyZn.js} +8 -5
- package/dist/packem_shared/{renderer-B3wROkeg.js → renderer-GE9OLNNM.js} +47 -41
- package/dist/packem_shared/{setEnableStyledLineCache-BpskngSJ.js → setEnableStyledLineCache-D5f4favX.js} +1 -1
- package/dist/packem_shared/{text-width-DhuarWcB.js → text-width-Db-AxMea.js} +2 -1
- package/dist/packem_shared/{token-to-elements-BRFl_rzw.js → token-to-elements-CK4s8MJd.js} +2 -2
- package/dist/packem_shared/{useAnimation-kj31sA-T.js → useAnimation-DV22qxiJ.js} +2 -2
- package/dist/packem_shared/{useApp-DPQlRzi5.js → useApp-Cbi788rV.js} +1 -1
- package/dist/packem_shared/{useBoxMetrics-rBjKc-g4.js → useBoxMetrics-_5icypir.js} +2 -2
- package/dist/packem_shared/{useClipboard-B_9-adw1.js → useClipboard-MNj6MNR-.js} +1 -1
- package/dist/packem_shared/{useCursor-BIJzc8k9.js → useCursor-DS6LjIgv.js} +1 -1
- package/dist/packem_shared/{useFocus-CNl5QHHf.js → useFocus-DLoGQJd9.js} +2 -2
- package/dist/packem_shared/{useFocusManager-BPYaUuKQ.js → useFocusManager-UeZWtnNc.js} +1 -1
- package/dist/packem_shared/useForm-sQENbEuv.js +88 -0
- package/dist/packem_shared/useHotkey-D9giUX3q.js +112 -0
- package/dist/packem_shared/{useInput-Cfp5zB2s.js → useInput-DKZbqMRc.js} +2 -2
- package/dist/packem_shared/useInterval-CSXM8c2I.js +32 -0
- package/dist/packem_shared/{useIsScreenReaderEnabled-CnGKCe0f.js → useIsScreenReaderEnabled-BeoVqo1R.js} +1 -1
- package/dist/packem_shared/{useKeyBindings-B78l1E1n.js → useKeyBindings-S4fSIEAk.js} +2 -2
- package/dist/packem_shared/useKeyChord-BmXGNuEO.js +114 -0
- package/dist/packem_shared/{usePaste-Ct8J4AGR.js → usePaste-png73gvT.js} +2 -2
- package/dist/packem_shared/{useScrollInput-D3CpBq_a.js → useScrollInput-DfzRGQFe.js} +2 -2
- package/dist/packem_shared/{useStderr-CAOVUh4E.js → useStderr-BSWerMZ7.js} +1 -1
- package/dist/packem_shared/{useStdin-X-O0kd-n.js → useStdin-Rf0zPzVA.js} +1 -1
- package/dist/packem_shared/{useStdout-DyF6DSH0.js → useStdout-B5yRcg9N.js} +1 -1
- package/dist/packem_shared/{useStopwatch-qC4Beai4.js → useStopwatch-C__Zu6hd.js} +2 -2
- package/dist/packem_shared/{useTerminalPalette-BaWO2c4Q.js → useTerminalPalette-CtFG2JTq.js} +2 -2
- package/dist/packem_shared/{useTextSelection-mXtxgsPK.js → useTextSelection-ChrYZXsn.js} +2 -2
- package/dist/packem_shared/useTimeout-DuCqgWPX.js +34 -0
- package/dist/packem_shared/{useTimer-CPQ7j827.js → useTimer-DnBtbhB5.js} +1 -1
- package/dist/packem_shared/{useTreeView-BT57P3Kx.js → useTreeView-mkN5Di7w.js} +1 -1
- package/dist/packem_shared/{useWindowSize-ugEmGZJm.js → useWindowSize-D3UU41mv.js} +1 -1
- package/dist/packem_shared/waitFor-Cv9M2jKA.js +39 -0
- package/dist/packem_shared/{wrapOrTruncateStyledLine-DN3Nogoc.js → wrapOrTruncateStyledLine-49Mne3t3.js} +1 -1
- package/dist/react/index.js +7 -7
- package/dist/react/layout.d.ts +0 -2
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.js +6 -114
- package/dist/testing/wait-for.d.ts +0 -1
- package/index.js +691 -539
- package/package.json +17 -17
- package/dist/ink/components/file-picker/index.d.ts +0 -3
- package/dist/ink/components/tree-view/index.d.ts +0 -11
- package/dist/packem_shared/ControlledScrollView-DfAhcufF.js +0 -5
- package/dist/packem_shared/Spinner-BuI-kN4p.js +0 -1799
- package/dist/packem_shared/StaticRender-tYwH6QXl.js +0 -33
- package/dist/packem_shared/Stopwatch-DjtTCyHn.js +0 -23
- package/dist/packem_shared/Timer-wi9zuh4n.js +0 -22
- package/dist/packem_shared/parseSgrMouse-BHVBPP9G.js +0 -1
- /package/dist/ink/components/{AccessibilityContext.d.ts → accessibility-context.d.ts} +0 -0
- /package/dist/ink/components/{Alert.d.ts → alert.d.ts} +0 -0
- /package/dist/ink/components/{AnimationContext.d.ts → animation-context.d.ts} +0 -0
- /package/dist/ink/components/{AppContext.d.ts → app-context.d.ts} +0 -0
- /package/dist/ink/components/{App.d.ts → app.d.ts} +0 -0
- /package/dist/ink/components/{BackgroundContext.d.ts → background-context.d.ts} +0 -0
- /package/dist/ink/components/{Badge.d.ts → badge.d.ts} +0 -0
- /package/dist/ink/components/{BigText.d.ts → big-text.d.ts} +0 -0
- /package/dist/ink/components/{Box.d.ts → box.d.ts} +0 -0
- /package/dist/ink/components/{Code.d.ts → code.d.ts} +0 -0
- /package/dist/ink/components/{ConfirmInput.d.ts → confirm-input.d.ts} +0 -0
- /package/dist/ink/components/{ConsoleOverlay.d.ts → console-overlay.d.ts} +0 -0
- /package/dist/ink/components/{CursorContext.d.ts → cursor-context.d.ts} +0 -0
- /package/dist/ink/components/{Cursor.d.ts → cursor.d.ts} +0 -0
- /package/dist/ink/components/{Dialog.d.ts → dialog.d.ts} +0 -0
- /package/dist/ink/components/{DiffView.d.ts → diff-view.d.ts} +0 -0
- /package/dist/ink/components/{ErrorBoundary.d.ts → error-boundary.d.ts} +0 -0
- /package/dist/ink/components/{ErrorOverview.d.ts → error-overview.d.ts} +0 -0
- /package/dist/ink/components/{FocusContext.d.ts → focus-context.d.ts} +0 -0
- /package/dist/ink/components/{Gradient.d.ts → gradient.d.ts} +0 -0
- /package/dist/ink/components/{Link.d.ts → link.d.ts} +0 -0
- /package/dist/ink/components/{Markdown.d.ts → markdown.d.ts} +0 -0
- /package/dist/ink/components/{MultiSelect.d.ts → multi-select.d.ts} +0 -0
- /package/dist/ink/components/{Newline.d.ts → newline.d.ts} +0 -0
- /package/dist/ink/components/{OrderedList.d.ts → ordered-list.d.ts} +0 -0
- /package/dist/ink/components/{SelectInputIndicator.d.ts → select-input-indicator.d.ts} +0 -0
- /package/dist/ink/components/{SelectInputItem.d.ts → select-input-item.d.ts} +0 -0
- /package/dist/ink/components/{Slider.d.ts → slider.d.ts} +0 -0
- /package/dist/ink/components/{Spacer.d.ts → spacer.d.ts} +0 -0
- /package/dist/ink/components/{Static.d.ts → static.d.ts} +0 -0
- /package/dist/ink/components/{StatusMessage.d.ts → status-message.d.ts} +0 -0
- /package/dist/ink/components/{StderrContext.d.ts → stderr-context.d.ts} +0 -0
- /package/dist/ink/components/{StdinContext.d.ts → stdin-context.d.ts} +0 -0
- /package/dist/ink/components/{StdoutContext.d.ts → stdout-context.d.ts} +0 -0
- /package/dist/ink/components/{Tab.d.ts → tab.d.ts} +0 -0
- /package/dist/ink/components/{Table.d.ts → table.d.ts} +0 -0
- /package/dist/ink/components/{TextInput.d.ts → text-input.d.ts} +0 -0
- /package/dist/ink/components/{Text.d.ts → text.d.ts} +0 -0
- /package/dist/ink/components/{Textarea.d.ts → textarea.d.ts} +0 -0
- /package/dist/ink/components/{Transform.d.ts → transform.d.ts} +0 -0
- /package/dist/ink/components/tree-view/{TreeViewNode.d.ts → tree-view-node.d.ts} +0 -0
- /package/dist/ink/components/tree-view/{TreeView.d.ts → tree-view.d.ts} +0 -0
- /package/dist/ink/components/{UnorderedList.d.ts → unordered-list.d.ts} +0 -0
- /package/dist/ink/mouse/{Fullscreen.d.ts → fullscreen.d.ts} +0 -0
- /package/dist/ink/mouse/{MouseProvider.d.ts → mouse-provider.d.ts} +0 -0
- /package/dist/packem_shared/{AccessibilityContext-BLelHhNU.js → accessibility-context-BLelHhNU.js} +0 -0
- /package/dist/packem_shared/{AnimationContext-BcJg8Jr6.js → animation-context-BcJg8Jr6.js} +0 -0
- /package/dist/packem_shared/{AppContext-CP0U6H7O.js → app-context-CP0U6H7O.js} +0 -0
- /package/dist/packem_shared/{BackgroundContext-BAUaxfOb.js → background-context-BAUaxfOb.js} +0 -0
- /package/dist/packem_shared/{CursorContext-JxRzlqAx.js → cursor-context-JxRzlqAx.js} +0 -0
- /package/dist/packem_shared/{FocusContext-CWkYtgcm.js → focus-context-CWkYtgcm.js} +0 -0
- /package/dist/packem_shared/{StderrContext-Bj4Mf7v7.js → stderr-context-Bj4Mf7v7.js} +0 -0
- /package/dist/packem_shared/{StdinContext-Bq_GNJ3z.js → stdin-context-Bq_GNJ3z.js} +0 -0
- /package/dist/packem_shared/{StdoutContext-CgjWeCdO.js → stdout-context-CgjWeCdO.js} +0 -0
|
@@ -32,37 +32,37 @@ const {
|
|
|
32
32
|
const {
|
|
33
33
|
Console
|
|
34
34
|
} = __cjs_getBuiltinModule("node:console");
|
|
35
|
-
import { cursorShow, cursorUp, cursorTo, cursorDown, eraseLines,
|
|
35
|
+
import { cursorShow, setMode, BracketedPasteMode, resetMode, cursorUp, cursorTo, cursorHide, cursorDown, eraseLines, cursorNextLine, eraseLineEnd, createDecMode, ALT_SCREEN_ON, clearScreenAndHomeCursor, ALT_SCREEN_OFF } from '@visulima/ansi';
|
|
36
36
|
import { wordWrap } from '@visulima/string';
|
|
37
37
|
import patchConsole from 'patch-console';
|
|
38
38
|
import { ConcurrentRoot, LegacyRoot } from 'react-reconciler/constants.js';
|
|
39
39
|
import Yoga from 'yoga-layout';
|
|
40
|
-
import { a as accessibilityContext } from './
|
|
40
|
+
import { a as accessibilityContext } from './accessibility-context-BLelHhNU.js';
|
|
41
41
|
const {
|
|
42
42
|
EventEmitter
|
|
43
43
|
} = __cjs_getBuiltinModule("node:events");
|
|
44
44
|
import { PureComponent, useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
45
|
-
import { a as animationContext } from './
|
|
46
|
-
import { A as AppContext } from './
|
|
47
|
-
import { C as CursorContext } from './
|
|
45
|
+
import { a as animationContext } from './animation-context-BcJg8Jr6.js';
|
|
46
|
+
import { A as AppContext } from './app-context-CP0U6H7O.js';
|
|
47
|
+
import { C as CursorContext } from './cursor-context-JxRzlqAx.js';
|
|
48
48
|
const {
|
|
49
49
|
existsSync,
|
|
50
50
|
readFileSync
|
|
51
51
|
} = __cjs_getBuiltinModule("node:fs");
|
|
52
52
|
const require$$1 = __cjs_getBuiltinModule("module");
|
|
53
|
-
import Box from './Box-
|
|
54
|
-
import Text from './Text-
|
|
55
|
-
import { F as FocusContext } from './
|
|
56
|
-
import { S as StderrContext } from './
|
|
57
|
-
import { S as StdinContext } from './
|
|
58
|
-
import { S as StdoutContext } from './
|
|
59
|
-
import { c as createNode } from './dom-
|
|
53
|
+
import Box from './Box-W1w_NGin.js';
|
|
54
|
+
import Text from './Text-CtUwV89_.js';
|
|
55
|
+
import { F as FocusContext } from './focus-context-CWkYtgcm.js';
|
|
56
|
+
import { S as StderrContext } from './stderr-context-Bj4Mf7v7.js';
|
|
57
|
+
import { S as StdinContext } from './stdin-context-Bq_GNJ3z.js';
|
|
58
|
+
import { S as StdoutContext } from './stdout-context-CgjWeCdO.js';
|
|
59
|
+
import { c as createNode } from './dom-CrbpQgat.js';
|
|
60
60
|
import { resolveFlags } from './kittyFlags-bNNf_9kX.js';
|
|
61
|
-
import { a as clearStyledLineCache } from './measure-text-
|
|
62
|
-
import { r as reconcilerInstance, s as styles } from './reconciler-
|
|
63
|
-
import { a as renderToStatic, r as renderer } from './renderer-
|
|
64
|
-
import { measureAndExtractObservers } from './ResizeObserverEntry-
|
|
65
|
-
import { calculateScroll } from './getScrollHeight-
|
|
61
|
+
import { a as clearStyledLineCache } from './measure-text-BdOhbOeh.js';
|
|
62
|
+
import { r as reconcilerInstance, s as styles } from './reconciler-Dd7Z0A97.js';
|
|
63
|
+
import { a as renderToStatic, r as renderer } from './renderer-GE9OLNNM.js';
|
|
64
|
+
import { measureAndExtractObservers } from './ResizeObserverEntry-Vr8GZ74x.js';
|
|
65
|
+
import { calculateScroll } from './getScrollHeight-Cz3CDQN2.js';
|
|
66
66
|
import { g as getWindowSize } from './utils-BgdlrbOH.js';
|
|
67
67
|
|
|
68
68
|
import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
@@ -1016,6 +1016,8 @@ class ErrorBoundary extends PureComponent {
|
|
|
1016
1016
|
const tab = " ";
|
|
1017
1017
|
const shiftTab = "\x1B[Z";
|
|
1018
1018
|
const escape = "\x1B";
|
|
1019
|
+
const enableBracketedPaste = setMode(BracketedPasteMode);
|
|
1020
|
+
const disableBracketedPaste = resetMode(BracketedPasteMode);
|
|
1019
1021
|
const App = ({
|
|
1020
1022
|
children,
|
|
1021
1023
|
exitOnCtrlC,
|
|
@@ -1113,11 +1115,12 @@ const App = ({
|
|
|
1113
1115
|
},
|
|
1114
1116
|
[clearAnimationTimer, scheduleAnimationTick]
|
|
1115
1117
|
);
|
|
1116
|
-
useEffect(
|
|
1117
|
-
|
|
1118
|
+
useEffect(
|
|
1119
|
+
() => () => {
|
|
1118
1120
|
clearAnimationTimer();
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
+
},
|
|
1122
|
+
[clearAnimationTimer]
|
|
1123
|
+
);
|
|
1121
1124
|
const isRawModeSupported = stdin.isTTY;
|
|
1122
1125
|
const detachReadableListener = useCallback(() => {
|
|
1123
1126
|
if (!readableListenerRef.current) {
|
|
@@ -1245,7 +1248,7 @@ const App = ({
|
|
|
1245
1248
|
}
|
|
1246
1249
|
if (isEnabled) {
|
|
1247
1250
|
if (bracketedPasteModeEnabledCount.current === 0) {
|
|
1248
|
-
stdout.write(
|
|
1251
|
+
stdout.write(enableBracketedPaste);
|
|
1249
1252
|
}
|
|
1250
1253
|
bracketedPasteModeEnabledCount.current++;
|
|
1251
1254
|
return;
|
|
@@ -1254,7 +1257,7 @@ const App = ({
|
|
|
1254
1257
|
return;
|
|
1255
1258
|
}
|
|
1256
1259
|
if (--bracketedPasteModeEnabledCount.current === 0) {
|
|
1257
|
-
stdout.write(
|
|
1260
|
+
stdout.write(disableBracketedPaste);
|
|
1258
1261
|
}
|
|
1259
1262
|
},
|
|
1260
1263
|
[stdout]
|
|
@@ -1408,7 +1411,7 @@ const App = ({
|
|
|
1408
1411
|
}
|
|
1409
1412
|
if (bracketedPasteModeEnabledCount.current > 0) {
|
|
1410
1413
|
if (stdout.isTTY && canWriteToStdout) {
|
|
1411
|
-
stdout.write(
|
|
1414
|
+
stdout.write(disableBracketedPaste);
|
|
1412
1415
|
}
|
|
1413
1416
|
bracketedPasteModeEnabledCount.current = 0;
|
|
1414
1417
|
}
|
|
@@ -1431,32 +1434,23 @@ const App = ({
|
|
|
1431
1434
|
stdin
|
|
1432
1435
|
};
|
|
1433
1436
|
}, [stdin, handleSetRawMode, handleSetBracketedPasteMode, isRawModeSupported, exitOnCtrlC, internal_eventEmitter]);
|
|
1434
|
-
const stdoutContextValue = useMemo(
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
);
|
|
1452
|
-
const cursorContextValue = useMemo(
|
|
1453
|
-
() => {
|
|
1454
|
-
return {
|
|
1455
|
-
setCursorPosition
|
|
1456
|
-
};
|
|
1457
|
-
},
|
|
1458
|
-
[setCursorPosition]
|
|
1459
|
-
);
|
|
1437
|
+
const stdoutContextValue = useMemo(() => {
|
|
1438
|
+
return {
|
|
1439
|
+
stdout,
|
|
1440
|
+
write: writeToStdout
|
|
1441
|
+
};
|
|
1442
|
+
}, [stdout, writeToStdout]);
|
|
1443
|
+
const stderrContextValue = useMemo(() => {
|
|
1444
|
+
return {
|
|
1445
|
+
stderr,
|
|
1446
|
+
write: writeToStderr
|
|
1447
|
+
};
|
|
1448
|
+
}, [stderr, writeToStderr]);
|
|
1449
|
+
const cursorContextValue = useMemo(() => {
|
|
1450
|
+
return {
|
|
1451
|
+
setCursorPosition
|
|
1452
|
+
};
|
|
1453
|
+
}, [setCursorPosition]);
|
|
1460
1454
|
const focusContextValue = useMemo(() => {
|
|
1461
1455
|
return {
|
|
1462
1456
|
activate: activateFocusable,
|
|
@@ -1471,26 +1465,25 @@ const App = ({
|
|
|
1471
1465
|
remove: removeFocusable
|
|
1472
1466
|
};
|
|
1473
1467
|
}, [activeFocusId, addFocusable, removeFocusable, activateFocusable, deactivateFocusable, enableFocus, disableFocus, focusNext, focusPrevious, focus]);
|
|
1474
|
-
const animationContextValue = useMemo(
|
|
1475
|
-
|
|
1468
|
+
const animationContextValue = useMemo(() => {
|
|
1469
|
+
return {
|
|
1476
1470
|
renderThrottleMs,
|
|
1477
1471
|
subscribe: animationSubscribe
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
);
|
|
1472
|
+
};
|
|
1473
|
+
}, [animationSubscribe, renderThrottleMs]);
|
|
1481
1474
|
return jsx(AppContext.Provider, { value: appContextValue, children: jsx(StdinContext.Provider, { value: stdinContextValue, children: jsx(StdoutContext.Provider, { value: stdoutContextValue, children: jsx(StderrContext.Provider, { value: stderrContextValue, children: jsx(FocusContext.Provider, { value: focusContextValue, children: jsx(animationContext.Provider, { value: animationContextValue, children: jsx(CursorContext.Provider, { value: cursorContextValue, children: jsx(ErrorBoundary, { onError: handleExit, children }) }) }) }) }) }) }) });
|
|
1482
1475
|
};
|
|
1483
1476
|
App.displayName = "InternalApp";
|
|
1484
1477
|
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1478
|
+
const instances = /* @__PURE__ */ new WeakMap();
|
|
1479
|
+
|
|
1487
1480
|
const cursorPositionChanged = (a, b) => a?.x !== b?.x || a?.y !== b?.y;
|
|
1488
1481
|
const buildCursorSuffix = (visibleLineCount, cursorPosition) => {
|
|
1489
1482
|
if (!cursorPosition) {
|
|
1490
1483
|
return "";
|
|
1491
1484
|
}
|
|
1492
1485
|
const moveUp = visibleLineCount - cursorPosition.y;
|
|
1493
|
-
return (moveUp > 0 ? cursorUp(moveUp) : "") + cursorTo(cursorPosition.x) +
|
|
1486
|
+
return (moveUp > 0 ? cursorUp(moveUp) : "") + cursorTo(cursorPosition.x) + cursorShow;
|
|
1494
1487
|
};
|
|
1495
1488
|
const buildReturnToBottom = (previousLineCount, previousCursorPosition) => {
|
|
1496
1489
|
if (!previousCursorPosition) {
|
|
@@ -1500,7 +1493,7 @@ const buildReturnToBottom = (previousLineCount, previousCursorPosition) => {
|
|
|
1500
1493
|
return (down > 0 ? cursorDown(down) : "") + cursorTo(0);
|
|
1501
1494
|
};
|
|
1502
1495
|
const buildCursorOnlySequence = (input) => {
|
|
1503
|
-
const hidePrefix = input.cursorWasShown ?
|
|
1496
|
+
const hidePrefix = input.cursorWasShown ? cursorHide : "";
|
|
1504
1497
|
const returnToBottom = buildReturnToBottom(input.previousLineCount, input.previousCursorPosition);
|
|
1505
1498
|
const cursorSuffix = buildCursorSuffix(input.visibleLineCount, input.cursorPosition);
|
|
1506
1499
|
return hidePrefix + returnToBottom + cursorSuffix;
|
|
@@ -1509,11 +1502,9 @@ const buildReturnToBottomPrefix = (cursorWasShown, previousLineCount, previousCu
|
|
|
1509
1502
|
if (!cursorWasShown) {
|
|
1510
1503
|
return "";
|
|
1511
1504
|
}
|
|
1512
|
-
return
|
|
1505
|
+
return cursorHide + buildReturnToBottom(previousLineCount, previousCursorPosition);
|
|
1513
1506
|
};
|
|
1514
1507
|
|
|
1515
|
-
const instances = /* @__PURE__ */ new WeakMap();
|
|
1516
|
-
|
|
1517
1508
|
const visibleLineCount = (lines, string_) => string_.endsWith("\n") ? lines.length - 1 : lines.length;
|
|
1518
1509
|
const getViewportRows = (stream) => stream.rows || Infinity;
|
|
1519
1510
|
const clampToViewport = (lineCount, stream) => Math.min(lineCount, getViewportRows(stream));
|
|
@@ -1595,7 +1586,7 @@ const createStandard = (stream, { showCursor = false } = {}) => {
|
|
|
1595
1586
|
previousOutput = string_;
|
|
1596
1587
|
previousLineCount = lines.length;
|
|
1597
1588
|
if (!activeCursor && cursorWasShown) {
|
|
1598
|
-
stream.write(
|
|
1589
|
+
stream.write(cursorHide);
|
|
1599
1590
|
}
|
|
1600
1591
|
if (activeCursor) {
|
|
1601
1592
|
stream.write(buildCursorSuffix(visibleLineCount(lines, string_), activeCursor));
|
|
@@ -1724,7 +1715,7 @@ const createIncremental = (stream, { showCursor = false } = {}) => {
|
|
|
1724
1715
|
previousOutput = string_;
|
|
1725
1716
|
previousLines = lines;
|
|
1726
1717
|
if (!activeCursor && cursorWasShown) {
|
|
1727
|
-
stream.write(
|
|
1718
|
+
stream.write(cursorHide);
|
|
1728
1719
|
}
|
|
1729
1720
|
if (activeCursor) {
|
|
1730
1721
|
stream.write(buildCursorSuffix(visibleLineCount(lines, string_), activeCursor));
|
|
@@ -1748,6 +1739,13 @@ const create = (stream, { incremental = false, showCursor = false } = {}) => {
|
|
|
1748
1739
|
};
|
|
1749
1740
|
const logUpdate = { create };
|
|
1750
1741
|
|
|
1742
|
+
const SynchronizedOutputMode = createDecMode(2026);
|
|
1743
|
+
const bsu = setMode(SynchronizedOutputMode);
|
|
1744
|
+
const esu = resetMode(SynchronizedOutputMode);
|
|
1745
|
+
function shouldSynchronize(stream, interactive) {
|
|
1746
|
+
return "isTTY" in stream && stream.isTTY && (interactive ?? !isInCi);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1751
1749
|
let cachedRendererClass;
|
|
1752
1750
|
const getRendererClass = () => {
|
|
1753
1751
|
if (cachedRendererClass === false) {
|
|
@@ -1805,13 +1803,13 @@ const createNative = (stream) => {
|
|
|
1805
1803
|
return;
|
|
1806
1804
|
}
|
|
1807
1805
|
if (stream.isTTY) {
|
|
1808
|
-
renderer.writeRaw(
|
|
1806
|
+
renderer.writeRaw(bsu);
|
|
1809
1807
|
}
|
|
1810
1808
|
try {
|
|
1811
1809
|
renderer.render(buffer);
|
|
1812
1810
|
} finally {
|
|
1813
1811
|
if (stream.isTTY) {
|
|
1814
|
-
renderer.writeRaw(
|
|
1812
|
+
renderer.writeRaw(esu);
|
|
1815
1813
|
}
|
|
1816
1814
|
}
|
|
1817
1815
|
},
|
|
@@ -1821,12 +1819,6 @@ const createNative = (stream) => {
|
|
|
1821
1819
|
};
|
|
1822
1820
|
};
|
|
1823
1821
|
|
|
1824
|
-
const bsu = "\x1B[?2026h";
|
|
1825
|
-
const esu = "\x1B[?2026l";
|
|
1826
|
-
function shouldSynchronize(stream, interactive) {
|
|
1827
|
-
return "isTTY" in stream && stream.isTTY && (interactive ?? !isInCi);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
1822
|
if (!console.Console) {
|
|
1831
1823
|
console.Console = Console;
|
|
1832
1824
|
}
|
|
@@ -2195,9 +2187,10 @@ class Ink {
|
|
|
2195
2187
|
this.onRender();
|
|
2196
2188
|
}
|
|
2197
2189
|
/**
|
|
2198
|
-
*
|
|
2199
|
-
*
|
|
2200
|
-
* -
|
|
2190
|
+
* Walks the DOM tree before Yoga layout to handle StaticRender nodes.
|
|
2191
|
+
*
|
|
2192
|
+
* - Re-attach Yoga children if a cached render was invalidated.
|
|
2193
|
+
* - Pre-render ink-static-render nodes that don't have a cached render yet.
|
|
2201
2194
|
*/
|
|
2202
2195
|
prepareYogaTree(node, flushLayoutObservers) {
|
|
2203
2196
|
if (node.isYogaTreeDetached && !node.cachedRender && node.yogaNode) {
|
|
@@ -2205,7 +2198,7 @@ class Ink {
|
|
|
2205
2198
|
node.yogaNode.setHeightAuto();
|
|
2206
2199
|
styles(node.yogaNode, node.style);
|
|
2207
2200
|
while (node.yogaNode.getChildCount() > 0) {
|
|
2208
|
-
node.yogaNode.
|
|
2201
|
+
node.yogaNode.getChild(0).remove();
|
|
2209
2202
|
}
|
|
2210
2203
|
let yogaIndex = 0;
|
|
2211
2204
|
for (const child of node.childNodes) {
|
|
@@ -2460,7 +2453,7 @@ class Ink {
|
|
|
2460
2453
|
this.lastOutputHeight = 0;
|
|
2461
2454
|
this.fullStaticOutput = "";
|
|
2462
2455
|
this.writeBestEffort(this.options.stdout, ALT_SCREEN_OFF);
|
|
2463
|
-
this.writeBestEffort(this.options.stdout,
|
|
2456
|
+
this.writeBestEffort(this.options.stdout, cursorShow);
|
|
2464
2457
|
this.alternateScreen = false;
|
|
2465
2458
|
} else if (!this.interactive) {
|
|
2466
2459
|
this.options.stdout.write(this.options.debug ? "\n" : `${this.lastOutput}
|
|
@@ -2569,7 +2562,7 @@ class Ink {
|
|
|
2569
2562
|
this.alternateScreen = this.resolveAlternateScreenOption(enabled, this.interactive);
|
|
2570
2563
|
if (this.alternateScreen) {
|
|
2571
2564
|
this.writeBestEffort(this.options.stdout, ALT_SCREEN_ON);
|
|
2572
|
-
this.writeBestEffort(this.options.stdout,
|
|
2565
|
+
this.writeBestEffort(this.options.stdout, cursorHide);
|
|
2573
2566
|
}
|
|
2574
2567
|
}
|
|
2575
2568
|
resolveInteractiveOption(interactive) {
|
|
@@ -2642,7 +2635,7 @@ class Ink {
|
|
|
2642
2635
|
if (sync) {
|
|
2643
2636
|
this.options.stdout.write(bsu);
|
|
2644
2637
|
}
|
|
2645
|
-
this.options.stdout.write(
|
|
2638
|
+
this.options.stdout.write(clearScreenAndHomeCursor + this.fullStaticOutput + output);
|
|
2646
2639
|
this.lastOutput = output;
|
|
2647
2640
|
this.lastOutputToRender = outputToRender;
|
|
2648
2641
|
this.lastOutputHeight = outputHeight;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FocusProvider, useFocusManager } from './FocusContext-D5wFxSRz.js';
|
|
3
|
-
import { TuiContext, useInput } from './TuiContext-
|
|
4
|
-
import { LayoutNode } from './LayoutNode-
|
|
5
|
-
import { T as TuiReconciler, s as setOnAfterCommit } from './reconciler-
|
|
6
|
-
import { renderTreeToBuffer } from './renderTreeToBuffer-
|
|
7
|
-
import { TuiApp } from './TuiApp-
|
|
8
|
-
import { InputParser } from './InputParser-
|
|
3
|
+
import { TuiContext, useInput } from './TuiContext-lXmJFd-x.js';
|
|
4
|
+
import { LayoutNode } from './LayoutNode-DAkKg9TE.js';
|
|
5
|
+
import { T as TuiReconciler, s as setOnAfterCommit } from './reconciler-mzMwSOft.js';
|
|
6
|
+
import { renderTreeToBuffer } from './renderTreeToBuffer-CDDTGyZn.js';
|
|
7
|
+
import { TuiApp } from './TuiApp-DtdgNRWa.js';
|
|
8
|
+
import { InputParser } from './InputParser-BlsfeY9J.js';
|
|
9
9
|
import { terminalSize } from './Renderer-zZ5O3vxc.js';
|
|
10
|
-
import { createInlineLoop } from './createInlineLoop-
|
|
10
|
+
import { createInlineLoop } from './createInlineLoop-Dnfm1ZSJ.js';
|
|
11
11
|
|
|
12
12
|
const _Box = (props) => React.createElement("box", props, props.children);
|
|
13
13
|
const _Text = (props) => React.createElement("text", props, props.children);
|
|
@@ -15,10 +15,12 @@ const _Spacer = () => React.createElement(_Box, { flexGrow: 1 });
|
|
|
15
15
|
const TabHandler = ({ children }) => {
|
|
16
16
|
const { disableFocus, enableFocus, focusNext, focusPrevious } = useFocusManager();
|
|
17
17
|
useInput((_input, key) => {
|
|
18
|
-
if (key.tab && !key.shift)
|
|
18
|
+
if (key.tab && !key.shift) {
|
|
19
19
|
focusNext();
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
if (key.tab && key.shift) {
|
|
21
22
|
focusPrevious();
|
|
23
|
+
}
|
|
22
24
|
if (key.escape) {
|
|
23
25
|
disableFocus();
|
|
24
26
|
enableFocus();
|
|
@@ -174,10 +176,12 @@ function renderInline(element, options) {
|
|
|
174
176
|
resolveExit = r;
|
|
175
177
|
});
|
|
176
178
|
process.on("exit", () => {
|
|
177
|
-
if (stdoutLines.length > 0)
|
|
179
|
+
if (stdoutLines.length > 0) {
|
|
178
180
|
process.stdout.write(stdoutLines.join(""));
|
|
179
|
-
|
|
181
|
+
}
|
|
182
|
+
if (stderrLines.length > 0) {
|
|
180
183
|
process.stderr.write(stderrLines.join(""));
|
|
184
|
+
}
|
|
181
185
|
resolveExit();
|
|
182
186
|
});
|
|
183
187
|
loop.start();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LegacyRoot } from 'react-reconciler/constants.js';
|
|
2
2
|
import Yoga from 'yoga-layout';
|
|
3
|
-
import { c as createNode } from './dom-
|
|
4
|
-
import { r as reconcilerInstance } from './reconciler-
|
|
5
|
-
import { r as renderer } from './renderer-
|
|
6
|
-
import { calculateScroll } from './getScrollHeight-
|
|
3
|
+
import { c as createNode } from './dom-CrbpQgat.js';
|
|
4
|
+
import { r as reconcilerInstance } from './reconciler-Dd7Z0A97.js';
|
|
5
|
+
import { r as renderer } from './renderer-GE9OLNNM.js';
|
|
6
|
+
import { calculateScroll } from './getScrollHeight-Cz3CDQN2.js';
|
|
7
7
|
|
|
8
8
|
const renderToString = (node, options) => {
|
|
9
9
|
const columns = options?.columns ?? 80;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FocusProvider } from './FocusContext-D5wFxSRz.js';
|
|
3
|
-
import { TuiContext } from './TuiContext-
|
|
4
|
-
import { LayoutNode } from './LayoutNode-
|
|
5
|
-
import { T as TuiReconciler } from './reconciler-
|
|
6
|
-
import { renderTreeToBuffer } from './renderTreeToBuffer-
|
|
3
|
+
import { TuiContext } from './TuiContext-lXmJFd-x.js';
|
|
4
|
+
import { LayoutNode } from './LayoutNode-DAkKg9TE.js';
|
|
5
|
+
import { T as TuiReconciler } from './reconciler-mzMwSOft.js';
|
|
6
|
+
import { renderTreeToBuffer } from './renderTreeToBuffer-CDDTGyZn.js';
|
|
7
7
|
import { Cell } from './Cell-DCg1kJY-.js';
|
|
8
8
|
|
|
9
9
|
function renderToString(element, options) {
|
package/dist/packem_shared/{renderTreeToBuffer-D3mo7M7m.js → renderTreeToBuffer-CDDTGyZn.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as cliBoxes } from './boxes-oi3WUbyR.js';
|
|
2
|
-
import { resolveColor } from './NAMED_COLORS-
|
|
3
|
-
import { a as getCodePointWidth } from './text-width-
|
|
2
|
+
import { resolveColor } from './NAMED_COLORS-DcI3erCu.js';
|
|
3
|
+
import { a as getCodePointWidth } from './text-width-Db-AxMea.js';
|
|
4
4
|
|
|
5
5
|
const CONTINUATION_CELL_CODE = 1114112;
|
|
6
6
|
const SCROLLBAR_FULL = 9608;
|
|
@@ -165,10 +165,12 @@ function paintBorder(node, buffer, cols, rows, absX, absY, w, h, fg, bg, styles,
|
|
|
165
165
|
const yStart = showTop ? 1 : 0;
|
|
166
166
|
const yEnd = canShowBottom ? h - 1 : h;
|
|
167
167
|
for (let y = yStart; y < yEnd; y++) {
|
|
168
|
-
if (showLeft)
|
|
168
|
+
if (showLeft) {
|
|
169
169
|
writeCell(buffer, cols, rows, absX, absY + y, box.left.codePointAt(0), borderAttribute, clip);
|
|
170
|
-
|
|
170
|
+
}
|
|
171
|
+
if (showRight) {
|
|
171
172
|
writeCell(buffer, cols, rows, absX + w - 1, absY + y, box.right.codePointAt(0), borderAttribute, clip);
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
function collectText(node) {
|
|
@@ -202,8 +204,9 @@ function paintText(text, buffer, cols, rows, absX, absY, w, h, attributeCode, cl
|
|
|
202
204
|
cursorX = 0;
|
|
203
205
|
cursorY++;
|
|
204
206
|
}
|
|
205
|
-
if (cursorY >= h)
|
|
207
|
+
if (cursorY >= h) {
|
|
206
208
|
break;
|
|
209
|
+
}
|
|
207
210
|
if (charWidth > w) {
|
|
208
211
|
writeCell(buffer, cols, rows, absX + cursorX, absY + cursorY, 32, attributeCode, clip);
|
|
209
212
|
cursorX += 1;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { w as wrapText, i as isNodeSelectable } from './dom-
|
|
1
|
+
import { w as wrapText, i as isNodeSelectable } from './dom-CrbpQgat.js';
|
|
2
2
|
import { getStringWidth, isFullwidthCodePoint, indent } from '@visulima/string';
|
|
3
|
-
import { B as BOLD_MASK, D as DIM_MASK, I as ITALIC_MASK, U as UNDERLINE_MASK, e as INVERSE_MASK, H as HIDDEN_MASK, f as STRIKETHROUGH_MASK, g as colorToSgrParams, F as FULL_WIDTH_MASK, h as colorToAnsi256, S as StyledLine, j as textToStyledLine, p as plainTextToStyledLine } from './measure-text-
|
|
3
|
+
import { B as BOLD_MASK, D as DIM_MASK, I as ITALIC_MASK, U as UNDERLINE_MASK, e as INVERSE_MASK, H as HIDDEN_MASK, f as STRIKETHROUGH_MASK, g as colorToSgrParams, F as FULL_WIDTH_MASK, h as colorToAnsi256, S as StyledLine, j as textToStyledLine, p as plainTextToStyledLine } from './measure-text-BdOhbOeh.js';
|
|
4
4
|
import Yoga from 'yoga-layout';
|
|
5
|
-
import { j as getRelativeTop, i as getRelativeLeft, n as getAbsoluteContentPosition, c as calculateScrollbarLayout } from './measure-element-
|
|
5
|
+
import { j as getRelativeTop, i as getRelativeLeft, n as getAbsoluteContentPosition, c as calculateScrollbarLayout } from './measure-element-Bc6PEaIe.js';
|
|
6
6
|
import { g as getBackgroundColorEscape, c as colorize } from './colorize-88_Vk8cn.js';
|
|
7
7
|
import colorizeDefault from '@visulima/colorize';
|
|
8
8
|
import { c as cliBoxes } from './boxes-oi3WUbyR.js';
|
|
9
|
-
import { getScrollTop } from './getScrollHeight-
|
|
9
|
+
import { getScrollTop } from './getScrollHeight-Cz3CDQN2.js';
|
|
10
10
|
import squashTextNodes from './squashTextNodesWithMap-iqm6OMMT.js';
|
|
11
11
|
|
|
12
12
|
import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
13
13
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
14
|
-
const getMaxWidth = (yogaNode) =>
|
|
14
|
+
const getMaxWidth = (yogaNode) => Math.round(
|
|
15
|
+
yogaNode.getComputedWidth() - Math.max(0, yogaNode.getComputedLeft() + yogaNode.getComputedWidth() - (yogaNode.getParent()?.getComputedWidth() ?? yogaNode.getComputedWidth())) - yogaNode.getComputedPadding(Yoga.EDGE_LEFT) - yogaNode.getComputedPadding(Yoga.EDGE_RIGHT) - yogaNode.getComputedBorder(Yoga.EDGE_LEFT) - yogaNode.getComputedBorder(Yoga.EDGE_RIGHT)
|
|
16
|
+
);
|
|
15
17
|
|
|
16
18
|
const CONTINUATION_CELL_CODE = 1114112;
|
|
17
19
|
|
|
@@ -242,19 +244,21 @@ class Output {
|
|
|
242
244
|
memoizationProbeCountdown = 0;
|
|
243
245
|
constructor(options) {
|
|
244
246
|
const { caches, height, width } = options;
|
|
245
|
-
this.width = width;
|
|
246
|
-
this.height = height;
|
|
247
|
+
this.width = Math.round(width);
|
|
248
|
+
this.height = Math.round(height);
|
|
247
249
|
this.caches = caches ?? new OutputCaches();
|
|
248
|
-
this.grid = this.createGrid(width, height);
|
|
250
|
+
this.grid = this.createGrid(this.width, this.height);
|
|
249
251
|
}
|
|
250
252
|
reset(width, height) {
|
|
251
|
-
this.width = width;
|
|
252
|
-
this.height = height;
|
|
253
|
+
this.width = Math.round(width);
|
|
254
|
+
this.height = Math.round(height);
|
|
253
255
|
this.clipStack.length = 0;
|
|
254
|
-
this.grid = this.createGrid(width, height);
|
|
256
|
+
this.grid = this.createGrid(this.width, this.height);
|
|
255
257
|
}
|
|
256
258
|
startChildRegion(absX, absY, width, height) {
|
|
257
|
-
|
|
259
|
+
const x1 = Math.round(absX);
|
|
260
|
+
const y1 = Math.round(absY);
|
|
261
|
+
this.clipStack.push({ x1, x2: x1 + Math.round(width), y1, y2: y1 + Math.round(height) });
|
|
258
262
|
}
|
|
259
263
|
endChildRegion() {
|
|
260
264
|
this.clipStack.pop();
|
|
@@ -497,8 +501,8 @@ const renderBackground = (x, y, node, output) => {
|
|
|
497
501
|
if (!node.style.backgroundColor) {
|
|
498
502
|
return;
|
|
499
503
|
}
|
|
500
|
-
const width = node.yogaNode.getComputedWidth();
|
|
501
|
-
const height = node.yogaNode.getComputedHeight();
|
|
504
|
+
const width = Math.round(node.yogaNode.getComputedWidth());
|
|
505
|
+
const height = Math.round(node.yogaNode.getComputedHeight());
|
|
502
506
|
const leftBorderWidth = node.style.borderStyle && node.style.borderLeft !== false ? 1 : 0;
|
|
503
507
|
const rightBorderWidth = node.style.borderStyle && node.style.borderRight !== false ? 1 : 0;
|
|
504
508
|
const topBorderHeight = node.style.borderStyle && node.style.borderTop !== false ? 1 : 0;
|
|
@@ -559,8 +563,8 @@ const buildBorderWithTitle = (borderChar, contentWidth, title, titleAlignment, r
|
|
|
559
563
|
};
|
|
560
564
|
const renderBorder = (x, y, node, output) => {
|
|
561
565
|
if (node.style.borderStyle) {
|
|
562
|
-
const width = node.yogaNode.getComputedWidth();
|
|
563
|
-
const height = node.yogaNode.getComputedHeight();
|
|
566
|
+
const width = Math.round(node.yogaNode.getComputedWidth());
|
|
567
|
+
const height = Math.round(node.yogaNode.getComputedHeight());
|
|
564
568
|
const box = typeof node.style.borderStyle === "string" ? cliBoxes[node.style.borderStyle] : node.style.borderStyle;
|
|
565
569
|
const topBorderColor = node.style.borderTopColor ?? node.style.borderColor;
|
|
566
570
|
const bottomBorderColor = node.style.borderBottomColor ?? node.style.borderColor;
|
|
@@ -722,14 +726,14 @@ const identifyActiveStickyNodes = (stickyNodes, node, scrollTop, viewportBottom)
|
|
|
722
726
|
continue;
|
|
723
727
|
}
|
|
724
728
|
const stickyNodeTop = getRelativeTop(stickyChild, node) ?? 0;
|
|
725
|
-
const stickyNodeHeight = stickyChild.yogaNode.getComputedHeight();
|
|
729
|
+
const stickyNodeHeight = Math.round(stickyChild.yogaNode.getComputedHeight());
|
|
726
730
|
const stickyNodeBottom = stickyNodeTop + stickyNodeHeight;
|
|
727
731
|
const parent = stickyChild.parentNode;
|
|
728
732
|
let parentTop = 0;
|
|
729
733
|
let parentHeight = Number.MAX_SAFE_INTEGER;
|
|
730
734
|
if (parent?.yogaNode) {
|
|
731
735
|
parentTop = getRelativeTop(parent, node) ?? 0;
|
|
732
|
-
parentHeight = parent.yogaNode.getComputedHeight();
|
|
736
|
+
parentHeight = Math.round(parent.yogaNode.getComputedHeight());
|
|
733
737
|
}
|
|
734
738
|
if (stickyType === "top" && stickyNodeTop < scrollTop && parentTop + parentHeight > scrollTop) {
|
|
735
739
|
activeTopStickyNode = stickyNodeInfo;
|
|
@@ -788,14 +792,14 @@ const renderActiveStickyNodes = (activeStickyNodes, node, output, createOutput,
|
|
|
788
792
|
continue;
|
|
789
793
|
}
|
|
790
794
|
const stickyNodeTop = getRelativeTop(stickyNode, node) ?? 0;
|
|
791
|
-
const stickyNodeHeight = stickyNode.yogaNode.getComputedHeight();
|
|
795
|
+
const stickyNodeHeight = Math.round(stickyNode.yogaNode.getComputedHeight());
|
|
792
796
|
const stickyOffsetX = x + (getRelativeLeft(stickyNode, node) ?? 0);
|
|
793
797
|
const parent = stickyNode.parentNode;
|
|
794
798
|
let parentTop = 0;
|
|
795
799
|
let parentHeight = Number.MAX_SAFE_INTEGER;
|
|
796
800
|
if (parent?.yogaNode) {
|
|
797
801
|
parentTop = getRelativeTop(parent, node) ?? 0;
|
|
798
|
-
parentHeight = parent.yogaNode.getComputedHeight();
|
|
802
|
+
parentHeight = Math.round(parent.yogaNode.getComputedHeight());
|
|
799
803
|
}
|
|
800
804
|
let finalStickyY;
|
|
801
805
|
if (type === "top") {
|
|
@@ -819,7 +823,7 @@ const renderActiveStickyNodes = (activeStickyNodes, node, output, createOutput,
|
|
|
819
823
|
const naturalStickyY = y - currentScrollTop + stickyNodeTop;
|
|
820
824
|
const stuckStickyY = y + currentBorderTop + currentClientHeight - stickyNodeHeight;
|
|
821
825
|
if (nextStickyNodeInfo?.node?.yogaNode) {
|
|
822
|
-
const nextNodeHeight = nextStickyNodeInfo.node.yogaNode.getComputedHeight();
|
|
826
|
+
const nextNodeHeight = Math.round(nextStickyNodeInfo.node.yogaNode.getComputedHeight());
|
|
823
827
|
const nextNodeTop = getRelativeTop(nextStickyNodeInfo.node, node) ?? 0;
|
|
824
828
|
const nextNodeBottomInViewport = y - currentScrollTop + nextNodeTop + nextNodeHeight;
|
|
825
829
|
if (nextNodeBottomInViewport > minStickyTop) {
|
|
@@ -830,11 +834,11 @@ const renderActiveStickyNodes = (activeStickyNodes, node, output, createOutput,
|
|
|
830
834
|
}
|
|
831
835
|
const stickyOutput = createOutput({
|
|
832
836
|
height: stickyNodeHeight,
|
|
833
|
-
width: stickyNode.yogaNode.getComputedWidth()
|
|
837
|
+
width: Math.round(stickyNode.yogaNode.getComputedWidth())
|
|
834
838
|
});
|
|
835
839
|
renderNodeToOutput(stickyNode, stickyOutput, {
|
|
836
|
-
offsetX: -stickyNode.yogaNode.getComputedLeft(),
|
|
837
|
-
offsetY: -stickyNode.yogaNode.getComputedTop(),
|
|
840
|
+
offsetX: -Math.round(stickyNode.yogaNode.getComputedLeft()),
|
|
841
|
+
offsetY: -Math.round(stickyNode.yogaNode.getComputedTop()),
|
|
838
842
|
skipStaticElements,
|
|
839
843
|
transformers: newTransformers
|
|
840
844
|
});
|
|
@@ -853,8 +857,8 @@ const renderActiveStickyNodes = (activeStickyNodes, node, output, createOutput,
|
|
|
853
857
|
const applyPaddingToText = (node, text) => {
|
|
854
858
|
const yogaNode = node.childNodes[0]?.yogaNode;
|
|
855
859
|
if (yogaNode) {
|
|
856
|
-
const offsetX = yogaNode.getComputedLeft();
|
|
857
|
-
const offsetY = yogaNode.getComputedTop();
|
|
860
|
+
const offsetX = Math.round(yogaNode.getComputedLeft());
|
|
861
|
+
const offsetY = Math.round(yogaNode.getComputedTop());
|
|
858
862
|
text = "\n".repeat(offsetY) + indent(text, offsetX);
|
|
859
863
|
}
|
|
860
864
|
return text;
|
|
@@ -955,8 +959,8 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
955
959
|
return;
|
|
956
960
|
}
|
|
957
961
|
if (node.cachedRender) {
|
|
958
|
-
const x = offsetX + (node.yogaNode?.getComputedLeft() ?? 0);
|
|
959
|
-
const y = offsetY + (node.yogaNode?.getComputedTop() ?? 0);
|
|
962
|
+
const x = Math.round(offsetX + (node.yogaNode?.getComputedLeft() ?? 0));
|
|
963
|
+
const y = Math.round(offsetY + (node.yogaNode?.getComputedTop() ?? 0));
|
|
960
964
|
output.addRegionTree(node.cachedRender, x, y);
|
|
961
965
|
return;
|
|
962
966
|
}
|
|
@@ -1007,14 +1011,16 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
1007
1011
|
if (yogaNode.getDisplay() === Yoga.DISPLAY_NONE) {
|
|
1008
1012
|
return;
|
|
1009
1013
|
}
|
|
1010
|
-
const
|
|
1011
|
-
const
|
|
1012
|
-
const
|
|
1013
|
-
const
|
|
1014
|
+
const computedLeft = yogaNode.getComputedLeft();
|
|
1015
|
+
const computedTop = yogaNode.getComputedTop();
|
|
1016
|
+
const x = Math.round(offsetX + computedLeft);
|
|
1017
|
+
const y = Math.round(offsetY + computedTop);
|
|
1018
|
+
const absX = Math.round((absoluteOffsetX ?? offsetX) + computedLeft);
|
|
1019
|
+
const absY = Math.round((absoluteOffsetY ?? offsetY) + computedTop);
|
|
1014
1020
|
const currentClip = output.getCurrentClip();
|
|
1015
1021
|
if (currentClip) {
|
|
1016
|
-
const nodeWidth = yogaNode.getComputedWidth();
|
|
1017
|
-
const nodeHeight = yogaNode.getComputedHeight();
|
|
1022
|
+
const nodeWidth = Math.round(yogaNode.getComputedWidth());
|
|
1023
|
+
const nodeHeight = Math.round(yogaNode.getComputedHeight());
|
|
1018
1024
|
const nodeRight = absX + nodeWidth;
|
|
1019
1025
|
const nodeBottom = absY + nodeHeight;
|
|
1020
1026
|
const clipLeft = currentClip.x1 ?? -Infinity;
|
|
@@ -1037,7 +1043,7 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
1037
1043
|
const currentWidth = Math.max(...text.split("\n").map((line) => getStringWidth(line)));
|
|
1038
1044
|
if (currentWidth > maxWidth) {
|
|
1039
1045
|
const textWrap = node.style.textWrap ?? "wrap";
|
|
1040
|
-
text = wrapText(text, maxWidth, textWrap);
|
|
1046
|
+
text = wrapText(text, Math.floor(maxWidth), textWrap);
|
|
1041
1047
|
}
|
|
1042
1048
|
}
|
|
1043
1049
|
text = applyPaddingToText(node, text);
|
|
@@ -1065,8 +1071,8 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
1065
1071
|
const clipHorizontally = overflowX === "hidden" || overflowX === "scroll";
|
|
1066
1072
|
const clipVertically = overflowY === "hidden" || overflowY === "scroll";
|
|
1067
1073
|
if (clipHorizontally || clipVertically) {
|
|
1068
|
-
const nodeW = yogaNode.getComputedWidth();
|
|
1069
|
-
const nodeH = yogaNode.getComputedHeight();
|
|
1074
|
+
const nodeW = Math.round(yogaNode.getComputedWidth());
|
|
1075
|
+
const nodeH = Math.round(yogaNode.getComputedHeight());
|
|
1070
1076
|
const regionX = clipHorizontally ? x + yogaNode.getComputedBorder(Yoga.EDGE_LEFT) : x;
|
|
1071
1077
|
const regionW = clipHorizontally ? nodeW - yogaNode.getComputedBorder(Yoga.EDGE_LEFT) - yogaNode.getComputedBorder(Yoga.EDGE_RIGHT) : nodeW;
|
|
1072
1078
|
const regionY = clipVertically ? y + yogaNode.getComputedBorder(Yoga.EDGE_TOP) : y;
|
|
@@ -1119,8 +1125,8 @@ const renderNodeToOutput = (node, output, options) => {
|
|
|
1119
1125
|
const borderRight = yogaNode.getComputedBorder(Yoga.EDGE_RIGHT);
|
|
1120
1126
|
const borderTop = yogaNode.getComputedBorder(Yoga.EDGE_TOP);
|
|
1121
1127
|
const borderBottom = yogaNode.getComputedBorder(Yoga.EDGE_BOTTOM);
|
|
1122
|
-
const innerWidth = yogaNode.getComputedWidth() - borderLeft - borderRight;
|
|
1123
|
-
const innerHeight = yogaNode.getComputedHeight() - borderTop - borderBottom;
|
|
1128
|
+
const innerWidth = Math.round(yogaNode.getComputedWidth() - borderLeft - borderRight);
|
|
1129
|
+
const innerHeight = Math.round(yogaNode.getComputedHeight() - borderTop - borderBottom);
|
|
1124
1130
|
const { clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth } = node.internal_scrollState;
|
|
1125
1131
|
const isVerticalScrollable = overflowY === "scroll" && scrollHeight > clientHeight;
|
|
1126
1132
|
const isHorizontalScrollable = overflowX === "scroll" && scrollWidth > clientWidth;
|
|
@@ -1182,8 +1188,8 @@ const renderToStatic = (node, options) => {
|
|
|
1182
1188
|
if (!node.yogaNode) {
|
|
1183
1189
|
return;
|
|
1184
1190
|
}
|
|
1185
|
-
const width = node.yogaNode.getComputedWidth();
|
|
1186
|
-
const height = node.yogaNode.getComputedHeight();
|
|
1191
|
+
const width = Math.round(node.yogaNode.getComputedWidth());
|
|
1192
|
+
const height = Math.round(node.yogaNode.getComputedHeight());
|
|
1187
1193
|
if (width <= 0 || height <= 0) {
|
|
1188
1194
|
return;
|
|
1189
1195
|
}
|