@visulima/tui 1.0.0-alpha.10 → 1.0.0-alpha.12
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 +35 -0
- package/LICENSE.md +2115 -72
- package/README.md +32 -4
- package/dist/components/accordion.d.ts +59 -0
- package/dist/components/accordion.js +1 -0
- package/dist/components/alert.d.ts +26 -0
- package/dist/components/alert.js +1 -0
- package/dist/components/animate-presence.d.ts +18 -0
- package/dist/components/animate-presence.js +1 -0
- package/dist/components/approval-prompt.d.ts +65 -0
- package/dist/components/approval-prompt.js +1 -0
- package/dist/components/area-chart.d.ts +66 -0
- package/dist/components/area-chart.js +1 -0
- package/dist/components/badge.d.ts +22 -0
- package/dist/components/badge.js +1 -0
- package/dist/components/bar-chart.d.ts +67 -0
- package/dist/components/bar-chart.js +1 -0
- package/dist/components/big-text.d.ts +81 -0
- package/dist/components/big-text.js +1 -0
- package/dist/components/blink-dot.d.ts +36 -0
- package/dist/components/blink-dot.js +1 -0
- package/dist/components/box.d.ts +61 -0
- package/dist/components/box.js +1 -0
- package/dist/components/breadcrumb.d.ts +33 -0
- package/dist/components/breadcrumb.js +1 -0
- package/dist/components/button.d.ts +45 -0
- package/dist/components/button.js +1 -0
- package/dist/components/calendar.d.ts +72 -0
- package/dist/components/calendar.js +1 -0
- package/dist/components/canvas.d.ts +44 -0
- package/dist/components/canvas.js +1 -0
- package/dist/components/card.d.ts +57 -0
- package/dist/components/card.js +1 -0
- package/dist/components/checkbox.d.ts +48 -0
- package/dist/components/checkbox.js +1 -0
- package/dist/components/code.d.ts +48 -0
- package/dist/components/code.js +2 -0
- package/dist/components/collapsible.d.ts +53 -0
- package/dist/components/collapsible.js +1 -0
- package/dist/components/command-block.d.ts +47 -0
- package/dist/components/command-block.js +4 -0
- package/dist/components/command-palette.d.ts +82 -0
- package/dist/components/command-palette.js +1 -0
- package/dist/components/confirm-dialog.d.ts +75 -0
- package/dist/components/confirm-dialog.js +1 -0
- package/dist/components/confirm-input.d.ts +38 -0
- package/dist/components/confirm-input.js +1 -0
- package/dist/components/console-overlay.d.ts +54 -0
- package/dist/components/console-overlay.js +1 -0
- package/dist/components/content-switcher.d.ts +57 -0
- package/dist/components/content-switcher.js +1 -0
- package/dist/components/controlled-scroll-view.d.ts +60 -0
- package/dist/components/controlled-scroll-view.js +1 -0
- package/dist/components/cursor.d.ts +52 -0
- package/dist/components/cursor.js +1 -0
- package/dist/components/date-picker.d.ts +65 -0
- package/dist/components/date-picker.js +1 -0
- package/dist/components/definition-list.d.ts +44 -0
- package/dist/components/definition-list.js +1 -0
- package/dist/components/dialog.d.ts +116 -0
- package/dist/components/dialog.js +1 -0
- package/dist/components/diff-view.d.ts +85 -0
- package/dist/components/diff-view.js +1 -0
- package/dist/components/divider.d.ts +49 -0
- package/dist/components/divider.js +1 -0
- package/dist/components/file-picker-entry.d.ts +104 -0
- package/dist/components/file-picker-entry.js +1 -0
- package/dist/components/form.d.ts +81 -0
- package/dist/components/form.js +1 -0
- package/dist/components/gauge.d.ts +87 -0
- package/dist/components/gauge.js +1 -0
- package/dist/components/gradient.d.ts +42 -0
- package/dist/components/gradient.js +1 -0
- package/dist/components/heading.d.ts +33 -0
- package/dist/components/heading.js +1 -0
- package/dist/components/heatmap.d.ts +62 -0
- package/dist/components/heatmap.js +1 -0
- package/dist/components/help.d.ts +52 -0
- package/dist/components/help.js +1 -0
- package/dist/components/histogram.d.ts +62 -0
- package/dist/components/histogram.js +1 -0
- package/dist/components/kbd.d.ts +31 -0
- package/dist/components/kbd.js +1 -0
- package/dist/components/line-chart.d.ts +109 -0
- package/dist/components/line-chart.js +1 -0
- package/dist/components/link.d.ts +38 -0
- package/dist/components/link.js +1 -0
- package/dist/components/loading-indicator.d.ts +29 -0
- package/dist/components/loading-indicator.js +1 -0
- package/dist/components/markdown.d.ts +40 -0
- package/dist/components/markdown.js +1 -0
- package/dist/components/masked-input.d.ts +50 -0
- package/dist/components/masked-input.js +1 -0
- package/dist/components/menu.d.ts +78 -0
- package/dist/components/menu.js +1 -0
- package/dist/components/message-bubble.d.ts +43 -0
- package/dist/components/message-bubble.js +1 -0
- package/dist/components/model-badge.d.ts +39 -0
- package/dist/components/model-badge.js +1 -0
- package/dist/components/multi-select.d.ts +65 -0
- package/dist/components/multi-select.js +1 -0
- package/dist/components/newline.d.ts +15 -0
- package/dist/components/newline.js +2 -0
- package/dist/components/operation-tree.d.ts +49 -0
- package/dist/components/operation-tree.js +1 -0
- package/dist/components/option-list.d.ts +47 -0
- package/dist/components/option-list.js +1 -0
- package/dist/components/ordered-list.d.ts +24 -0
- package/dist/components/ordered-list.js +1 -0
- package/dist/components/paginator.d.ts +69 -0
- package/dist/components/paginator.js +1 -0
- package/dist/components/paragraph.d.ts +38 -0
- package/dist/components/paragraph.js +1 -0
- package/dist/components/placeholder.d.ts +55 -0
- package/dist/components/placeholder.js +1 -0
- package/dist/components/progress-bar.d.ts +56 -0
- package/dist/components/progress-bar.js +1 -0
- package/dist/components/radio-group.d.ts +74 -0
- package/dist/components/radio-group.js +1 -0
- package/dist/components/scatter-plot.d.ts +35 -0
- package/dist/components/scatter-plot.js +1 -0
- package/dist/components/scroll-bar-box.d.ts +36 -0
- package/dist/components/scroll-bar-box.js +1 -0
- package/dist/components/scroll-bar.d.ts +24 -0
- package/dist/components/scroll-bar.js +1 -0
- package/dist/components/scroll-list.d.ts +19 -0
- package/dist/components/scroll-list.js +1 -0
- package/dist/components/scroll-view.d.ts +9 -0
- package/dist/components/scroll-view.js +1 -0
- package/dist/components/search-input.d.ts +55 -0
- package/dist/components/search-input.js +1 -0
- package/dist/components/select-input-indicator.d.ts +32 -0
- package/dist/components/select-input-indicator.js +1 -0
- package/dist/components/select-input-item.d.ts +41 -0
- package/dist/components/select-input-item.js +1 -0
- package/dist/components/select-input.d.ts +110 -0
- package/dist/components/select-input.js +1 -0
- package/dist/components/shimmer-text.d.ts +47 -0
- package/dist/components/shimmer-text.js +1 -0
- package/dist/components/slider.d.ts +103 -0
- package/dist/components/slider.js +1 -0
- package/dist/components/spacer.d.ts +8 -0
- package/dist/components/spacer.js +1 -0
- package/dist/components/sparkline.d.ts +35 -0
- package/dist/components/sparkline.js +1 -0
- package/dist/components/spinner.d.ts +17 -0
- package/dist/components/spinner.js +1 -0
- package/dist/components/static-render.d.ts +50 -0
- package/dist/components/static-render.js +1 -0
- package/dist/components/static.d.ts +29 -0
- package/dist/components/static.js +1 -0
- package/dist/components/status-line.d.ts +37 -0
- package/dist/components/status-line.js +1 -0
- package/dist/components/status-message.d.ts +21 -0
- package/dist/components/status-message.js +1 -0
- package/dist/components/stepper.d.ts +48 -0
- package/dist/components/stepper.js +1 -0
- package/dist/components/stopwatch.d.ts +49 -0
- package/dist/components/stopwatch.js +1 -0
- package/dist/components/streaming-text.d.ts +46 -0
- package/dist/components/streaming-text.js +1 -0
- package/dist/components/switch.d.ts +55 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/tab.d.ts +19 -0
- package/dist/components/tab.js +1 -0
- package/dist/components/table.d.ts +119 -0
- package/dist/components/table.js +1 -0
- package/dist/components/tabs.d.ts +107 -0
- package/dist/components/tabs.js +1 -0
- package/dist/components/tag.d.ts +35 -0
- package/dist/components/tag.js +1 -0
- package/dist/components/text-input.d.ts +48 -0
- package/dist/components/text-input.js +1 -0
- package/dist/components/text.d.ts +79 -0
- package/dist/components/text.js +1 -0
- package/dist/components/textarea.d.ts +68 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/timer.d.ts +59 -0
- package/dist/components/timer.js +1 -0
- package/dist/components/toast.d.ts +49 -0
- package/dist/components/toast.js +1 -0
- package/dist/components/tooltip.d.ts +43 -0
- package/dist/components/tooltip.js +1 -0
- package/dist/components/transform.d.ts +21 -0
- package/dist/components/transform.js +1 -0
- package/dist/components/transition.d.ts +74 -0
- package/dist/components/transition.js +1 -0
- package/dist/components/tree-view-entry.d.ts +356 -0
- package/dist/components/tree-view-entry.js +1 -0
- package/dist/components/unordered-list.d.ts +30 -0
- package/dist/components/unordered-list.js +1 -0
- package/dist/ink/hooks/use-animation.d.ts +41 -0
- package/dist/ink/hooks/use-animation.js +1 -0
- package/dist/ink/hooks/use-app.d.ts +38 -0
- package/dist/ink/hooks/use-app.js +1 -0
- package/dist/ink/hooks/use-box-metrics.d.ts +63 -0
- package/dist/ink/hooks/use-box-metrics.js +1 -0
- package/dist/ink/hooks/use-clipboard.d.ts +30 -0
- package/dist/ink/hooks/use-clipboard.js +1 -0
- package/dist/ink/hooks/use-color-blindness.d.ts +33 -0
- package/dist/ink/hooks/use-color-blindness.js +1 -0
- package/dist/ink/hooks/use-console-capture.d.ts +43 -0
- package/dist/ink/hooks/use-console-capture.js +1 -0
- package/dist/ink/hooks/use-cursor.d.ts +13 -0
- package/dist/ink/hooks/use-cursor.js +1 -0
- package/dist/ink/hooks/use-focus-manager.d.ts +56 -0
- package/dist/ink/hooks/use-focus-manager.js +1 -0
- package/dist/ink/hooks/use-focus.d.ts +34 -0
- package/dist/ink/hooks/use-focus.js +1 -0
- package/dist/ink/hooks/use-form.d.ts +68 -0
- package/dist/ink/hooks/use-form.js +1 -0
- package/dist/ink/hooks/use-hotkey.d.ts +37 -0
- package/dist/ink/hooks/use-hotkey.js +1 -0
- package/dist/ink/hooks/use-input.d.ts +149 -0
- package/dist/ink/hooks/use-input.js +2 -0
- package/dist/ink/hooks/use-interval.d.ts +25 -0
- package/dist/ink/hooks/use-interval.js +1 -0
- package/dist/ink/hooks/use-is-screen-reader-enabled.d.ts +6 -0
- package/dist/ink/hooks/use-is-screen-reader-enabled.js +1 -0
- package/dist/ink/hooks/use-key-bindings.d.ts +59 -0
- package/dist/ink/hooks/use-key-bindings.js +1 -0
- package/dist/ink/hooks/use-key-chord.d.ts +25 -0
- package/dist/ink/hooks/use-key-chord.js +1 -0
- package/dist/ink/hooks/use-linked-scroll.d.ts +48 -0
- package/dist/ink/hooks/use-linked-scroll.js +1 -0
- package/dist/ink/hooks/use-paste.d.ts +44 -0
- package/dist/ink/hooks/use-paste.js +1 -0
- package/dist/ink/hooks/use-persistent-state.d.ts +56 -0
- package/dist/ink/hooks/use-persistent-state.js +2 -0
- package/dist/ink/hooks/use-scroll-acceleration.d.ts +47 -0
- package/dist/ink/hooks/use-scroll-acceleration.js +1 -0
- package/dist/ink/hooks/use-scroll-input.d.ts +34 -0
- package/dist/ink/hooks/use-scroll-input.js +1 -0
- package/dist/ink/hooks/use-stderr.d.ts +16 -0
- package/dist/ink/hooks/use-stderr.js +1 -0
- package/dist/ink/hooks/use-stdin.d.ts +30 -0
- package/dist/ink/hooks/use-stdin.js +1 -0
- package/dist/ink/hooks/use-stdout.d.ts +16 -0
- package/dist/ink/hooks/use-stdout.js +1 -0
- package/dist/ink/hooks/use-stopwatch.d.ts +39 -0
- package/dist/ink/hooks/use-stopwatch.js +1 -0
- package/dist/ink/hooks/use-terminal-palette.d.ts +20 -0
- package/dist/ink/hooks/use-terminal-palette.js +1 -0
- package/dist/ink/hooks/use-text-buffer.d.ts +42 -0
- package/dist/{packem_shared/useTextBuffer-DekkGLxI.js → ink/hooks/use-text-buffer.js} +3 -3
- package/dist/ink/hooks/use-text-selection.d.ts +44 -0
- package/dist/ink/hooks/use-text-selection.js +1 -0
- package/dist/ink/hooks/use-timeout.d.ts +24 -0
- package/dist/ink/hooks/use-timeout.js +1 -0
- package/dist/ink/hooks/use-timer.d.ts +48 -0
- package/dist/ink/hooks/use-timer.js +1 -0
- package/dist/ink/hooks/use-window-size.d.ts +18 -0
- package/dist/ink/hooks/use-window-size.js +1 -0
- package/dist/ink/index.d.ts +18 -6196
- package/dist/ink/index.js +1 -1
- package/dist/packem_shared/ControlledScrollView-X_OTc-Cw.js +1 -0
- package/dist/packem_shared/{DevTools-O8EbCfHa.js → DevTools-CsxLcAu2.js} +1 -1
- package/dist/packem_shared/FilePicker-tYj_CIau.js +1 -0
- package/dist/packem_shared/Fullscreen-CxLd1-Zu.js +1 -0
- package/dist/packem_shared/{LayoutNode-rxblE317.js → LayoutNode-B8zej4dm.js} +1 -1
- package/dist/packem_shared/MouseProvider-PnIUKURs.js +1 -0
- package/dist/packem_shared/ScrollBar-U_37hlIT.js +1 -0
- package/dist/packem_shared/ScrollBarBox-DwiCxilX.js +1 -0
- package/dist/packem_shared/ScrollList-Dxgv-mhZ.js +1 -0
- package/dist/packem_shared/ScrollView-Dq2v5zJS.js +1 -0
- package/dist/packem_shared/TreeView-GkPr_VYn.js +1 -0
- package/dist/packem_shared/buffer.d-EJkZr8uH.d.ts +39 -0
- package/dist/packem_shared/clipboard.d-D6lZTQ21.d.ts +23 -0
- package/dist/packem_shared/color-matrix.d-DSXLsB64.d.ts +50 -0
- package/dist/packem_shared/controlled-scroll-view-CikQ90_V.js +1 -0
- package/dist/packem_shared/cursor-helpers.d-BIvqz0TZ.d.ts +5 -0
- package/dist/packem_shared/dom.d-ksOQhC2W.d.ts +400 -0
- package/dist/packem_shared/layout-P24eyWyL.js +2 -0
- package/dist/packem_shared/line-chart-kf7uhR0K.js +1 -0
- package/dist/packem_shared/measureElement-CRKlFSvD.js +1 -0
- package/dist/packem_shared/processLayout-Dmgf0LO6.js +1 -0
- package/dist/packem_shared/{reconciler-DSYCrIZs.js → reconciler-DIfG72R9.js} +1 -1
- package/dist/packem_shared/render-BOqty71z.js +26 -0
- package/dist/packem_shared/{render-DDqtMAFN.js → render-F9Hk9p1a.js} +1 -1
- package/dist/packem_shared/render.d-CVGLTvTq.d.ts +398 -0
- package/dist/packem_shared/{renderToString-DeqOWRP8.js → renderToString-BDk2FZEN.js} +1 -1
- package/dist/packem_shared/{renderToString-IYYPyASm.js → renderToString-BbQiRHrd.js} +1 -1
- package/dist/packem_shared/renderTreeToBuffer-CZilzyhN.js +2 -0
- package/dist/packem_shared/{renderer-D2p6av2X.js → renderer-gqplqpkQ.js} +1 -1
- package/dist/packem_shared/scroll-view.d-DtpsgHLg.d.ts +119 -0
- package/dist/packem_shared/selection.d-CHKA1ogp.d.ts +62 -0
- package/dist/packem_shared/styles.d-C1g4Iwzr.d.ts +368 -0
- package/dist/packem_shared/terminal-palette.d-D2SQjfn-.d.ts +19 -0
- package/dist/packem_shared/{text-width-CZ9vPvM0.js → text-width-BU2eeTWn.js} +1 -1
- package/dist/packem_shared/token-to-elements-BAZpNZsu.js +1 -0
- package/dist/packem_shared/useTreeView-BoMMeRPq.js +1 -0
- package/dist/packem_shared/utils-CoviI5Vm.js +1 -0
- package/dist/packem_shared/variant-config.d-D5NnrrQK.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/dist/testing/index.d.ts +5 -1
- package/dist/testing/index.js +1 -1
- package/package.json +553 -19
- package/dist/packem_shared/Accordion-BXsqchV-.js +0 -1
- package/dist/packem_shared/Alert-BhYVMHtR.js +0 -1
- package/dist/packem_shared/AnimatePresence-Eu7Z8KHc.js +0 -1
- package/dist/packem_shared/ApprovalPrompt-BSn0FT1g.js +0 -1
- package/dist/packem_shared/AreaChart-Chy-frI7.js +0 -1
- package/dist/packem_shared/Badge-B8WPyRsK.js +0 -1
- package/dist/packem_shared/BarChart-rpZtlMcF.js +0 -1
- package/dist/packem_shared/BigText-CRpwUzrt.js +0 -1
- package/dist/packem_shared/BlinkDot-BvnRuWP8.js +0 -1
- package/dist/packem_shared/Box-BwqSvWuq.js +0 -1
- package/dist/packem_shared/Breadcrumb-D0hClbRV.js +0 -1
- package/dist/packem_shared/Button-B89Yvbc6.js +0 -1
- package/dist/packem_shared/Calendar-Dmflvm2S.js +0 -1
- package/dist/packem_shared/Canvas-CKg6WV47.js +0 -1
- package/dist/packem_shared/Card-B_9fXdtU.js +0 -1
- package/dist/packem_shared/Checkbox-BN71eCWU.js +0 -1
- package/dist/packem_shared/Code-HhevcyiH.js +0 -2
- package/dist/packem_shared/Collapsible-u6uf_FdV.js +0 -1
- package/dist/packem_shared/CommandBlock-B-nslpCv.js +0 -4
- package/dist/packem_shared/CommandPalette-CEFdaURo.js +0 -1
- package/dist/packem_shared/ConfirmDialog-5Jje_Xpu.js +0 -1
- package/dist/packem_shared/ConfirmInput-D44Mb9oo.js +0 -1
- package/dist/packem_shared/ConsoleOverlay-CM3APfgP.js +0 -1
- package/dist/packem_shared/ContentSwitcher-Dm5BkrCt.js +0 -1
- package/dist/packem_shared/ControlledScrollView-DI8KZOQB.js +0 -1
- package/dist/packem_shared/Cursor-BoLFIMol.js +0 -1
- package/dist/packem_shared/DatePicker-CnSrFFAE.js +0 -1
- package/dist/packem_shared/DefinitionList-v8RDuF_R.js +0 -1
- package/dist/packem_shared/Dialog-CTaL8pn0.js +0 -1
- package/dist/packem_shared/DiffView-BUIFqUB0.js +0 -1
- package/dist/packem_shared/Divider-C47bKmqu.js +0 -1
- package/dist/packem_shared/FilePicker-CUo7R5Qb.js +0 -1
- package/dist/packem_shared/FormField-af3aUpRL.js +0 -1
- package/dist/packem_shared/Fullscreen-CuJ8y0s0.js +0 -1
- package/dist/packem_shared/Gauge-Dz-usH__.js +0 -1
- package/dist/packem_shared/Gradient-DYNc0GZA.js +0 -1
- package/dist/packem_shared/Heading-mwEYza3Y.js +0 -1
- package/dist/packem_shared/Heatmap-ChL97U1-.js +0 -1
- package/dist/packem_shared/Help-Zcelyw_U.js +0 -1
- package/dist/packem_shared/Histogram-FIf2F83d.js +0 -1
- package/dist/packem_shared/Kbd-DpkPp4jB.js +0 -1
- package/dist/packem_shared/LineChart-BXE_girm.js +0 -1
- package/dist/packem_shared/Link-i2o2EG4-.js +0 -1
- package/dist/packem_shared/LoadingIndicator-TC1Fjwyt.js +0 -1
- package/dist/packem_shared/Markdown-R1XqK63D.js +0 -1
- package/dist/packem_shared/MaskedInput-J01phOZs.js +0 -1
- package/dist/packem_shared/Menu-CfrH4ymk.js +0 -1
- package/dist/packem_shared/MessageBubble-BmBBU2Rm.js +0 -1
- package/dist/packem_shared/ModelBadge-D3wrXncu.js +0 -1
- package/dist/packem_shared/MouseProvider-pjza-lpc.js +0 -1
- package/dist/packem_shared/MultiSelect-Dqmn-bVo.js +0 -1
- package/dist/packem_shared/Newline-BSG4iUqp.js +0 -2
- package/dist/packem_shared/OperationTree-DksxjMIV.js +0 -1
- package/dist/packem_shared/OptionList-CNx7r9yN.js +0 -1
- package/dist/packem_shared/OrderedList-BeDy035w.js +0 -1
- package/dist/packem_shared/Paginator-B56s6bhS.js +0 -1
- package/dist/packem_shared/Paragraph-BqJlH0R-.js +0 -1
- package/dist/packem_shared/Placeholder-GMpHRGC8.js +0 -1
- package/dist/packem_shared/ProgressBar-Bj3fmORR.js +0 -1
- package/dist/packem_shared/RadioGroup-Br8BeEwS.js +0 -1
- package/dist/packem_shared/ScatterPlot-OhfYco5l.js +0 -1
- package/dist/packem_shared/ScrollBar-Da5Y3z7N.js +0 -1
- package/dist/packem_shared/ScrollBarBox-Dz6F-Eat.js +0 -1
- package/dist/packem_shared/ScrollList-DiVGyEjv.js +0 -1
- package/dist/packem_shared/ScrollView-BojONotI.js +0 -1
- package/dist/packem_shared/SearchInput-BoPTRbhV.js +0 -1
- package/dist/packem_shared/SelectInput-CAJ7SCBq.js +0 -1
- package/dist/packem_shared/SelectInputIndicator-N1n8ULHs.js +0 -1
- package/dist/packem_shared/SelectInputItem-BEkbmobs.js +0 -1
- package/dist/packem_shared/ShimmerText-CuGQ2NDC.js +0 -1
- package/dist/packem_shared/Slider-Cg_tJpKa.js +0 -1
- package/dist/packem_shared/Spacer-eT3HOrXk.js +0 -1
- package/dist/packem_shared/Sparkline-T6_FPVET.js +0 -1
- package/dist/packem_shared/Spinner-B0-A50pu.js +0 -1
- package/dist/packem_shared/Static-jzLPaHJF.js +0 -1
- package/dist/packem_shared/StaticRender-BgD61E7x.js +0 -1
- package/dist/packem_shared/StatusLine-Ch4jjef1.js +0 -1
- package/dist/packem_shared/StatusMessage-B1qfKeMM.js +0 -1
- package/dist/packem_shared/Stepper-CNPAqxiU.js +0 -1
- package/dist/packem_shared/Stopwatch-CAx2EWwq.js +0 -1
- package/dist/packem_shared/StreamingText-BYOKSB2T.js +0 -1
- package/dist/packem_shared/Switch-DzSpKYu7.js +0 -1
- package/dist/packem_shared/Tab-BcXzSUdj.js +0 -1
- package/dist/packem_shared/Table-DJp1TLrR.js +0 -1
- package/dist/packem_shared/Tabs-D68z0SOt.js +0 -1
- package/dist/packem_shared/Tag-BvLHnYRn.js +0 -1
- package/dist/packem_shared/Text-mTAve9R2.js +0 -1
- package/dist/packem_shared/TextInput-C_gYQlnF.js +0 -1
- package/dist/packem_shared/Textarea-C2ET_oMb.js +0 -2
- package/dist/packem_shared/Timer-CI3aQX65.js +0 -1
- package/dist/packem_shared/Toast-Drvc8XfG.js +0 -1
- package/dist/packem_shared/Tooltip-C5UnQlLd.js +0 -1
- package/dist/packem_shared/Transform-fYmcdqRT.js +0 -1
- package/dist/packem_shared/Transition-CJDBKYUB.js +0 -1
- package/dist/packem_shared/TreeView-DjhacGJ5.js +0 -1
- package/dist/packem_shared/UnorderedList-BnfqexZs.js +0 -1
- package/dist/packem_shared/boxes-DyY_LXCi.js +0 -1
- package/dist/packem_shared/controlled-scroll-view-CmrAEvJk.js +0 -1
- package/dist/packem_shared/createLinkedScrollGroup-BMTJ7rAj.js +0 -1
- package/dist/packem_shared/createMemoryStorage-QVZNXbWz.js +0 -2
- package/dist/packem_shared/line-chart-DrM8PwnI.js +0 -1
- package/dist/packem_shared/measure-element-DSp7YDus.js +0 -2
- package/dist/packem_shared/measureElement-DA8WqFP_.js +0 -1
- package/dist/packem_shared/processLayout-DXDfFb_d.js +0 -1
- package/dist/packem_shared/render-_r0K9K11.js +0 -28
- package/dist/packem_shared/render.d-BR3gA-N8.d.ts +0 -1257
- package/dist/packem_shared/renderTreeToBuffer-DPkoCgP2.js +0 -2
- package/dist/packem_shared/token-to-elements-BYxT6J_Q.js +0 -1
- package/dist/packem_shared/useAnimation-B9we6ZzL.js +0 -1
- package/dist/packem_shared/useApp-B6fvM42d.js +0 -1
- package/dist/packem_shared/useBoxMetrics-D5pkIr6P.js +0 -1
- package/dist/packem_shared/useClipboard-CBxy0hT8.js +0 -1
- package/dist/packem_shared/useColorBlindness-BvWcu2Bb.js +0 -1
- package/dist/packem_shared/useConsoleCapture-BxiG8iLJ.js +0 -1
- package/dist/packem_shared/useCursor-CPu8T5Db.js +0 -1
- package/dist/packem_shared/useFocus-DSmziO_x.js +0 -1
- package/dist/packem_shared/useFocusManager-Uapn3LQo.js +0 -1
- package/dist/packem_shared/useForm-CzV-Oext.js +0 -1
- package/dist/packem_shared/useHotkey-D0dGey14.js +0 -1
- package/dist/packem_shared/useInput-D1_jG26Z.js +0 -2
- package/dist/packem_shared/useInterval-AobjZT3u.js +0 -1
- package/dist/packem_shared/useIsScreenReaderEnabled-DjWHh-II.js +0 -1
- package/dist/packem_shared/useKeyBindings-zabkEJQs.js +0 -1
- package/dist/packem_shared/useKeyChord-CICQIxXj.js +0 -1
- package/dist/packem_shared/usePaste-CKKB9H-Z.js +0 -1
- package/dist/packem_shared/useScrollAcceleration-NrY1oVMs.js +0 -1
- package/dist/packem_shared/useScrollInput-Caghtn-Q.js +0 -1
- package/dist/packem_shared/useStderr-BDZb6InG.js +0 -1
- package/dist/packem_shared/useStdin-DKa4h35k.js +0 -1
- package/dist/packem_shared/useStdout-B-2lX4C5.js +0 -1
- package/dist/packem_shared/useStopwatch-DffK7iMh.js +0 -1
- package/dist/packem_shared/useTerminalPalette-Cv7tSduR.js +0 -1
- package/dist/packem_shared/useTextSelection-CGT0GLDR.js +0 -1
- package/dist/packem_shared/useTimeout-7LEFYTnG.js +0 -1
- package/dist/packem_shared/useTimer-DyoqSyGi.js +0 -1
- package/dist/packem_shared/useTreeView-8UlTK6sW.js +0 -1
- package/dist/packem_shared/useWindowSize-yDZsXF8z.js +0 -1
- package/dist/packem_shared/utils-THUhYKG2.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _=Object.defineProperty;var
|
|
1
|
+
var _=Object.defineProperty;var Q=(o,c)=>_(o,"name",{value:c,configurable:!0});import{useState as z,useRef as b,useCallback as u,useMemo as U}from"react";var Y=Object.defineProperty,m=Q((o,c)=>Y(o,"name",{value:c,configurable:!0}),"p");const nn=300,en=100,ln=/\S+\s*$/,j=m(o=>{const c=o.split(`
|
|
2
2
|
`);return c.length===0?[""]:c},"splitLines"),rn=m(o=>o.join(`
|
|
3
|
-
`),"joinLines"),h=m(o=>({anchor:o.anchor,cursor:{...o.cursor},lines:[...o.lines]}),"snapOf"),L=m((o,c,i)=>i?{...o,anchor:o.anchor??o.cursor,cursor:c}:{...o,anchor:null,cursor:c},"withSelection"),
|
|
4
|
-
`)},[]),
|
|
3
|
+
`),"joinLines"),h=m(o=>({anchor:o.anchor,cursor:{...o.cursor},lines:[...o.lines]}),"snapOf"),L=m((o,c,i)=>i?{...o,anchor:o.anchor??o.cursor,cursor:c}:{...o,anchor:null,cursor:c},"withSelection"),X=m((o,c)=>c.line<o.line||c.line===o.line&&c.col<o.col?{end:o,start:c}:{end:c,start:o},"getSelectionRange"),T=m(o=>{if(!o.anchor)return null;const{end:c,start:i}=X(o.cursor,o.anchor),a=[...o.lines],d=a[i.line].slice(0,i.col),f=a[c.line].slice(c.col);return a.splice(i.line,c.line-i.line+1,d+f),{anchor:null,cursor:i,lines:a}},"deleteSelectionFromState"),M=m((o,c)=>{const i=T(o)??o,a=[...i.lines],{col:d,line:f}=i.cursor,v=a[f].slice(0,d),S=a[f].slice(d),t=j(c);if(t.length===1)return a[f]=v+t[0]+S,{anchor:null,cursor:{col:d+t[0].length,line:f},lines:a};const k=v+t[0],w=t.at(-1)+S,x=t.slice(1,-1);return a.splice(f,1,k,...x,w),{anchor:null,cursor:{col:t.at(-1).length,line:f+t.length-1},lines:a}},"insertIntoState"),tn=m((o="")=>{const[c,i]=z(()=>{const n=j(o);return{anchor:null,cursor:{col:n.at(-1).length,line:n.length-1},lines:n}}),a=b([]),d=b([]),f=b(0),v=b(c.cursor.col);v.current=c.cursor.col;const S=b(c);S.current=c;const t=u(n=>{const e=Date.now();e-f.current<nn&&a.current.length>0||(a.current.push(n),a.current.length>en&&a.current.shift()),d.current=[],f.current=e},[]),k=u(()=>S.current.anchor!==null,[]),w=u(()=>{const n=S.current;if(!n.anchor)return"";const{end:e,start:l}=X(n.cursor,n.anchor);if(l.line===e.line)return n.lines[l.line].slice(l.col,e.col);const r=[];r.push(n.lines[l.line].slice(l.col));for(let s=l.line+1;s<e.line;s++)r.push(n.lines[s]);return r.push(n.lines[e.line].slice(0,e.col)),r.join(`
|
|
4
|
+
`)},[]),x=u(n=>{i(e=>(t(h(e)),M(e,n)))},[t]),B=u(()=>{i(n=>{t(h(n));const e=T(n)??n,l=[...e.lines],{col:r,line:s}=e.cursor,g=l[s].slice(0,r),p=l[s].slice(r);return l.splice(s,1,g,p),{anchor:null,cursor:{col:0,line:s+1},lines:l}})},[t]),C=u(()=>{i(n=>{if(n.anchor)return t(h(n)),T(n)??n;const{col:e,line:l}=n.cursor;if(e===0&&l===0)return n;t(h(n));const r=[...n.lines];if(e===0){const s=r[l-1],g=s.length;return r[l-1]=s+r[l],r.splice(l,1),{anchor:null,cursor:{col:g,line:l-1},lines:r}}return r[l]=r[l].slice(0,e-1)+r[l].slice(e),{anchor:null,cursor:{col:e-1,line:l},lines:r}})},[t]),E=u(()=>{i(n=>{if(n.anchor)return t(h(n)),T(n)??n;const{col:e,line:l}=n.cursor,r=n.lines[l];if(e===r.length&&l===n.lines.length-1)return n;t(h(n));const s=[...n.lines];return e===r.length?(s[l]=r+s[l+1],s.splice(l+1,1),{anchor:null,cursor:n.cursor,lines:s}):(s[l]=r.slice(0,e)+r.slice(e+1),{anchor:null,cursor:n.cursor,lines:s})})},[t]),y=u(()=>{i(n=>{t(h(n));const e=[...n.lines],{line:l}=n.cursor;if(e.length===1)return{anchor:null,cursor:{col:0,line:0},lines:[""]};e.splice(l,1);const r=Math.min(l,e.length-1);return{anchor:null,cursor:{col:Math.min(n.cursor.col,e[r].length),line:r},lines:e}})},[t]),F=u(()=>{i(n=>{t(h(n));const e=[...n.lines],{col:l,line:r}=n.cursor;return e[r]=e[r].slice(0,l),{...n,anchor:null,lines:e}})},[t]),O=u(()=>{i(n=>{t(h(n));const e=[...n.lines],{col:l,line:r}=n.cursor;return e[r]=e[r].slice(l),{anchor:null,cursor:{col:0,line:r},lines:e}})},[t]),R=u(()=>{i(n=>{if(t(h(n)),n.anchor)return T(n)??n;const{col:e,line:l}=n.cursor,r=n.lines[l].slice(0,e).replace(ln,""),s=[...n.lines];return s[l]=r+n.lines[l].slice(e),{anchor:null,cursor:{col:r.length,line:l},lines:s}})},[t]),A=u((n,e=!1)=>{i(l=>{const{col:r,line:s}=l.cursor;let g=s,p=r;switch(n){case"down":{s<l.lines.length-1&&(g=s+1,p=Math.min(v.current,l.lines[g].length));break}case"left":{r>0?p=r-1:s>0&&(g=s-1,p=l.lines[g].length);break}case"right":{const Z=l.lines[s].length;r<Z?p=r+1:s<l.lines.length-1&&(g=s+1,p=0);break}case"up":{s>0&&(g=s-1,p=Math.min(v.current,l.lines[g].length));break}}return L(l,{col:p,line:g},e)})},[]),D=u((n=!1)=>{i(e=>L(e,{col:0,line:e.cursor.line},n))},[]),I=u((n=!1)=>{i(e=>L(e,{col:e.lines[e.cursor.line].length,line:e.cursor.line},n))},[]),P=u((n=!1)=>{i(e=>L(e,{col:0,line:0},n))},[]),V=u((n=!1)=>{i(e=>{const l=e.lines.length-1;return L(e,{col:e.lines[l].length,line:l},n)})},[]),W=u(()=>{i(n=>{const e=n.lines.length-1;return{...n,anchor:{col:0,line:0},cursor:{col:n.lines[e].length,line:e}}})},[]),$=u(()=>{i(n=>n.anchor?{...n,anchor:null}:n)},[]),q=u(()=>{i(n=>n.anchor?(t(h(n)),T(n)??n):n)},[t]),G=u(n=>{i(e=>{if(!e.anchor)return t(h(e)),M(e,n);t(h(e));const l=T(e)??e;return M(l,n)})},[t]),H=u(n=>{const e=j(n);i({anchor:null,cursor:{col:e.at(-1).length,line:e.length-1},lines:e}),a.current=[],d.current=[]},[]),J=u(()=>{const n=a.current.pop();n&&(d.current.push(h(S.current)),i(n))},[]),K=u(()=>{const n=d.current.pop();n&&(a.current.push(h(S.current)),i(n))},[]),N=U(()=>rn(c.lines),[c.lines]);return U(()=>({anchor:c.anchor,clearSelection:$,cursor:c.cursor,deleteBack:C,deleteForward:E,deleteLine:y,deleteSelection:q,deleteToLineEnd:F,deleteToLineStart:O,deleteWord:R,getSelectedText:w,hasSelection:k,insert:x,lines:c.lines,moveCursor:A,moveToEnd:V,moveToLineEnd:I,moveToLineStart:D,moveToStart:P,newline:B,redo:K,replaceSelection:G,selectAll:W,setValue:H,undo:J,value:N}),[c.anchor,c.cursor,c.lines,N,$,C,E,y,q,F,O,R,w,k,x,A,V,I,D,P,B,K,G,W,H,J])},"useTextBuffer");export{tn as default,tn as useTextBuffer};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { a as DOMElement } from "../../packem_shared/dom.d-ksOQhC2W.js";
|
|
3
|
+
import { S as Selection } from "../../packem_shared/selection.d-CHKA1ogp.js";
|
|
4
|
+
import 'yoga-layout';
|
|
5
|
+
import '@visulima/colorize';
|
|
6
|
+
import 'cli-boxes';
|
|
7
|
+
import 'type-fest';
|
|
8
|
+
import "../../packem_shared/styles.d-C1g4Iwzr.js";
|
|
9
|
+
type UseTextSelectionOptions = {
|
|
10
|
+
/**
|
|
11
|
+
* Automatically copy selected text to clipboard when selection changes.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
readonly copyOnSelect?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Enable or disable text selection.
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
readonly isActive?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Called whenever the selection changes.
|
|
22
|
+
*/
|
|
23
|
+
readonly onSelectionChange?: (selectedText: string) => void;
|
|
24
|
+
};
|
|
25
|
+
type UseTextSelectionResult = {
|
|
26
|
+
/** Clear the current selection. */
|
|
27
|
+
readonly clearSelection: () => void;
|
|
28
|
+
/** Select all content within the referenced element. */
|
|
29
|
+
readonly selectAll: () => void;
|
|
30
|
+
/** The currently selected text. */
|
|
31
|
+
readonly selectedText: string;
|
|
32
|
+
/** The underlying Selection instance. */
|
|
33
|
+
readonly selection: Selection;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Hook for managing text selection on a DOM element.
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const ref = useRef(null);
|
|
40
|
+
* const { selectedText, selectAll, clearSelection } = useTextSelection(ref);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const useTextSelection: (ref: RefObject<DOMElement | null>, options?: UseTextSelectionOptions) => UseTextSelectionResult;
|
|
44
|
+
export { UseTextSelectionOptions, UseTextSelectionResult, useTextSelection as default, useTextSelection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=Object.defineProperty;var m=(n,o)=>v(n,"name",{value:o,configurable:!0});import{useRef as d,useState as x,useEffect as R,useCallback as p,useMemo as y}from"react";import{Selection as A,Range as C}from"../../packem_shared/comparePoints-C85EsmNz.js";import b from"./use-clipboard.js";var h=Object.defineProperty,T=m((n,o)=>h(n,"name",{value:o,configurable:!0}),"f");const E=T((n,o={})=>{const{copyOnSelect:c=!1,isActive:r=!0,onSelectionChange:s}=o,{copy:l}=b(),e=d(new A).current,[a,S]=x(""),u=d(s);u.current=s,R(()=>r?e.onChange(()=>{const t=e.toString();S(t),u.current?.(t),c&&t.length>0&&l(t)}):void 0,[r,e,c,l]);const i=p(()=>{const t=n.current;if(!t||!r)return;e.removeAllRanges();const g=new C;g.selectNodeContents(t),e.addRange(g)},[n,r,e]),f=p(()=>{e.removeAllRanges()},[e]);return y(()=>({clearSelection:f,selectAll:i,selectedText:a,selection:e}),[f,a,i,e])},"useTextSelection");export{E as default,E as useTextSelection};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type UseTimeoutOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* When false, the timer never starts. Flipping to true restarts it.
|
|
4
|
+
* @default true
|
|
5
|
+
*/
|
|
6
|
+
readonly isActive?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type UseTimeoutResult = {
|
|
9
|
+
/**
|
|
10
|
+
* Cancel the pending timer (no-op if already fired or never scheduled).
|
|
11
|
+
*/
|
|
12
|
+
readonly cancel: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Restart the timer from now with the current delay.
|
|
15
|
+
*/
|
|
16
|
+
readonly reset: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A React hook that fires `callback` once after `delay` ms. Changing `delay`
|
|
20
|
+
* or toggling `isActive` reschedules the timer from zero. Call `reset()` to
|
|
21
|
+
* restart on demand.
|
|
22
|
+
*/
|
|
23
|
+
declare const useTimeout: (callback: () => void, delay: number, options?: UseTimeoutOptions) => UseTimeoutResult;
|
|
24
|
+
export { UseTimeoutOptions, UseTimeoutResult, useTimeout as default, useTimeout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var o=(r,e)=>d(r,"name",{value:e,configurable:!0});import{useRef as n,useState as T,useCallback as s,useEffect as b}from"react";var p=Object.defineProperty,g=o((r,e)=>p(r,"name",{value:e,configurable:!0}),"i");const x=g((r,e,a)=>{const{isActive:c=!0}=a??{},i=n(r),t=n(void 0),[m,l]=T(0);i.current=r;const f=s(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),v=s(()=>{l(u=>u+1)},[]);return b(()=>{if(!c||e<0||!Number.isFinite(e))return;const u=setTimeout(()=>{i.current()},e);return t.current=u,()=>{clearTimeout(u),t.current=void 0}},[e,c,m]),{cancel:f,reset:v}},"useTimeout");export{x as default,x as useTimeout};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type UseTimerOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to start the timer immediately.
|
|
4
|
+
* @default false
|
|
5
|
+
*/
|
|
6
|
+
readonly autoStart?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Total countdown duration in milliseconds.
|
|
9
|
+
*/
|
|
10
|
+
readonly duration: number;
|
|
11
|
+
/**
|
|
12
|
+
* Tick interval in milliseconds.
|
|
13
|
+
* @default 1000
|
|
14
|
+
*/
|
|
15
|
+
readonly interval?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Called once when the timer reaches zero.
|
|
18
|
+
*/
|
|
19
|
+
readonly onTimeout?: () => void;
|
|
20
|
+
};
|
|
21
|
+
type UseTimerResult = {
|
|
22
|
+
/** Whether the countdown has reached zero. */
|
|
23
|
+
readonly isFinished: boolean;
|
|
24
|
+
/** Whether the timer is currently counting down. */
|
|
25
|
+
readonly isRunning: boolean;
|
|
26
|
+
/** Milliseconds remaining (clamped to >= 0). */
|
|
27
|
+
readonly remaining: number;
|
|
28
|
+
/** Reset the timer to the original duration and stop it. */
|
|
29
|
+
readonly reset: () => void;
|
|
30
|
+
/** Start the countdown. */
|
|
31
|
+
readonly start: () => void;
|
|
32
|
+
/** Stop (pause) the countdown. */
|
|
33
|
+
readonly stop: () => void;
|
|
34
|
+
/** Toggle between running and stopped. */
|
|
35
|
+
readonly toggle: () => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* A countdown timer hook built on `useAnimation`.
|
|
39
|
+
*
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const { remaining, isRunning, start, stop, reset, isFinished } = useTimer({
|
|
42
|
+
* duration: 60_000,
|
|
43
|
+
* onTimeout: () => console.log("Time's up!"),
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function useTimer(options: UseTimerOptions): UseTimerResult;
|
|
48
|
+
export { UseTimerOptions, UseTimerResult, useTimer as default, useTimer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var h=Object.defineProperty;var f=(e,t)=>h(e,"name",{value:t,configurable:!0});import{useState as x,useRef as m,useEffect as y,useCallback as u}from"react";import j from"./use-animation.js";var k=Object.defineProperty,A=f((e,t)=>k(e,"name",{value:t,configurable:!0}),"f");function C(e){const{autoStart:t=!1,duration:v,interval:g=1e3,onTimeout:o}=e,[s,r]=x(t),l=m(o);l.current=o;const i=m(!1),{reset:c,time:p}=j({interval:g,isActive:s}),n=Math.max(0,v-p),a=n<=0;y(()=>{a&&s&&(r(!1),i.current||(i.current=!0,l.current?.()))},[a,s]);const d=u(()=>{a||r(!0)},[a]),b=u(()=>{r(!1)},[]),T=u(()=>{r(S=>S?!1:n>0)},[n]),R=u(()=>{r(!1),i.current=!1,c()},[c]);return{isFinished:a,isRunning:s,remaining:n,reset:R,start:d,stop:b,toggle:T}}f(C,"c");A(C,"useTimer");export{C as default,C as useTimer};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dimensions of the terminal window.
|
|
3
|
+
*/
|
|
4
|
+
type WindowSize = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of columns (horizontal character cells).
|
|
7
|
+
*/
|
|
8
|
+
readonly columns: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of rows (vertical character cells).
|
|
11
|
+
*/
|
|
12
|
+
readonly rows: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A React hook that returns the current terminal window dimensions and re-renders the component whenever the terminal is resized.
|
|
16
|
+
*/
|
|
17
|
+
declare const useWindowSize: () => WindowSize;
|
|
18
|
+
export { WindowSize, useWindowSize as default, useWindowSize };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.defineProperty;var t=(e,o)=>u(e,"name",{value:o,configurable:!0});import{useState as a,useEffect as f}from"react";import{g as s}from"../../packem_shared/utils-CoviI5Vm.js";import m from"./use-stdout.js";var c=Object.defineProperty,i=t((e,o)=>c(e,"name",{value:o,configurable:!0}),"t");const g=i(()=>{const{stdout:e}=m(),[o,n]=a(()=>s(e));return f(()=>{const r=i(()=>{n(s(e))},"onResize");return e.on("resize",r),()=>{e.off("resize",r)}},[e]),o},"useWindowSize");export{g as default,g as useWindowSize};
|