@visulima/tui-kit 1.0.0 → 1.0.1

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.
Files changed (123) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/accordion.d.ts +25 -32
  3. package/dist/alert.d.ts +9 -13
  4. package/dist/animate-presence.d.ts +9 -11
  5. package/dist/approval-prompt.d.ts +28 -38
  6. package/dist/area-chart.d.ts +29 -39
  7. package/dist/badge.d.ts +8 -11
  8. package/dist/bar-chart.d.ts +29 -38
  9. package/dist/big-text.d.ts +42 -52
  10. package/dist/blink-dot.d.ts +16 -21
  11. package/dist/breadcrumb.d.ts +11 -15
  12. package/dist/button.d.ts +18 -25
  13. package/dist/calendar.d.ts +31 -43
  14. package/dist/card.d.ts +22 -32
  15. package/dist/checkbox-group.d.ts +21 -30
  16. package/dist/checkbox.d.ts +19 -27
  17. package/dist/code.d.ts +24 -31
  18. package/dist/collapsible.d.ts +21 -30
  19. package/dist/color-picker.d.ts +29 -41
  20. package/dist/command-block.d.ts +19 -27
  21. package/dist/command-palette.d.ts +36 -45
  22. package/dist/confirm-dialog.d.ts +35 -47
  23. package/dist/confirm-input.d.ts +17 -23
  24. package/dist/console-overlay.d.ts +28 -35
  25. package/dist/content-switcher.d.ts +22 -30
  26. package/dist/controlled-scroll-view.d.ts +1 -1
  27. package/dist/data-grid.d.ts +18 -24
  28. package/dist/date-picker.d.ts +27 -38
  29. package/dist/definition-list.d.ts +16 -22
  30. package/dist/dialog.d.ts +58 -74
  31. package/dist/diff-view.d.ts +41 -54
  32. package/dist/digits.d.ts +13 -17
  33. package/dist/directory-tree.d.ts +20 -27
  34. package/dist/divider.d.ts +20 -28
  35. package/dist/drawer.d.ts +24 -32
  36. package/dist/file-change.d.ts +18 -24
  37. package/dist/file-picker-entry.d.ts +1 -1
  38. package/dist/form.d.ts +34 -41
  39. package/dist/gauge.d.ts +40 -51
  40. package/dist/gradient.d.ts +21 -25
  41. package/dist/grid.d.ts +19 -25
  42. package/dist/heading.d.ts +12 -17
  43. package/dist/heatmap.d.ts +27 -37
  44. package/dist/help.d.ts +27 -34
  45. package/dist/histogram.d.ts +27 -37
  46. package/dist/image.d.ts +11 -14
  47. package/dist/index.d.ts +6 -6
  48. package/dist/json.d.ts +23 -30
  49. package/dist/kbd.d.ts +14 -18
  50. package/dist/line-chart.d.ts +40 -49
  51. package/dist/link.d.ts +24 -28
  52. package/dist/loading-indicator.d.ts +11 -15
  53. package/dist/log.d.ts +14 -19
  54. package/dist/markdown.d.ts +22 -27
  55. package/dist/masked-input.d.ts +23 -31
  56. package/dist/menu.d.ts +32 -40
  57. package/dist/message-bubble.d.ts +16 -23
  58. package/dist/model-badge.d.ts +16 -22
  59. package/dist/model-selector.d.ts +19 -26
  60. package/dist/multi-progress.d.ts +22 -29
  61. package/dist/multi-select.d.ts +25 -35
  62. package/dist/notification-badge.d.ts +21 -28
  63. package/dist/number-input.d.ts +38 -52
  64. package/dist/operation-tree.d.ts +22 -25
  65. package/dist/option-list.d.ts +17 -23
  66. package/dist/ordered-list.d.ts +9 -11
  67. package/dist/packem_shared/{controlled-scroll-view.d-vF4wevEJ.d.ts → controlled-scroll-view.d-D3kZZzjI.d.ts} +8 -19
  68. package/dist/packem_shared/file-picker.d-CH7pccC7.d.ts +92 -0
  69. package/dist/packem_shared/{scroll-bar-box.d-DSBbBsRc.d.ts → scroll-bar-box.d-CpTYEcTZ.d.ts} +1 -18
  70. package/dist/packem_shared/{scroll-list.d-BP0UZSY4.d.ts → scroll-list.d-CPCF0RwC.d.ts} +1 -1
  71. package/dist/packem_shared/scroll-view.d-GZcgAHl4.d.ts +98 -0
  72. package/dist/packem_shared/{use-tree-view.d-dXTKoDPM.d.ts → use-tree-view.d-DeMQ6G2r.d.ts} +115 -151
  73. package/dist/paginator.d.ts +28 -38
  74. package/dist/paragraph.d.ts +15 -21
  75. package/dist/path-input.d.ts +29 -40
  76. package/dist/pie-chart.d.ts +21 -27
  77. package/dist/placeholder.d.ts +26 -34
  78. package/dist/popover.d.ts +20 -27
  79. package/dist/progress-bar.d.ts +25 -33
  80. package/dist/progress-circle.d.ts +27 -36
  81. package/dist/qr-code.d.ts +21 -27
  82. package/dist/radio-group.d.ts +30 -41
  83. package/dist/scatter-plot.d.ts +5 -16
  84. package/dist/scroll-bar-box.d.ts +1 -1
  85. package/dist/scroll-list.d.ts +2 -2
  86. package/dist/scroll-view.d.ts +1 -1
  87. package/dist/search-input.d.ts +23 -32
  88. package/dist/select-input-indicator.d.ts +15 -19
  89. package/dist/select-input-item.d.ts +18 -24
  90. package/dist/select-input.d.ts +49 -62
  91. package/dist/shimmer-text.d.ts +24 -30
  92. package/dist/sidebar.d.ts +21 -28
  93. package/dist/slider.d.ts +50 -66
  94. package/dist/sparkline.d.ts +19 -25
  95. package/dist/spinner.d.ts +7 -9
  96. package/dist/status-line.d.ts +14 -20
  97. package/dist/status-message.d.ts +7 -10
  98. package/dist/stepper.d.ts +18 -24
  99. package/dist/stopwatch.d.ts +24 -31
  100. package/dist/streaming-text.d.ts +20 -27
  101. package/dist/switch.d.ts +23 -32
  102. package/dist/tab.d.ts +8 -10
  103. package/dist/table.d.ts +40 -41
  104. package/dist/tabs.d.ts +50 -61
  105. package/dist/tag-input.d.ts +30 -42
  106. package/dist/tag.d.ts +14 -19
  107. package/dist/text-input.d.ts +21 -29
  108. package/dist/textarea.d.ts +32 -43
  109. package/dist/thinking-block.d.ts +25 -34
  110. package/dist/time-picker.d.ts +27 -37
  111. package/dist/timer.d.ts +28 -37
  112. package/dist/toast.d.ts +20 -28
  113. package/dist/token-usage.d.ts +23 -30
  114. package/dist/tool-call.d.ts +14 -19
  115. package/dist/tooltip.d.ts +19 -25
  116. package/dist/transition.d.ts +40 -48
  117. package/dist/tree-select.d.ts +25 -35
  118. package/dist/tree-view-entry.d.ts +1 -1
  119. package/dist/unordered-list.d.ts +12 -15
  120. package/dist/use-linked-scroll.d.ts +27 -27
  121. package/package.json +2 -2
  122. package/dist/packem_shared/file-picker.d-Cie6aAMD.d.ts +0 -104
  123. package/dist/packem_shared/scroll-view.d-BqKpI-F-.d.ts +0 -119
@@ -1,119 +0,0 @@
1
- import { Props } from '@visulima/tui/components/box';
2
- import React, { ReactNode, Ref } from 'react';
3
- interface ScrollViewProps extends Props {
4
- children?: ReactNode;
5
- debug?: boolean;
6
- /**
7
- * Auto-scroll to bottom when content grows and user is at/near the bottom.
8
- * Pauses when user scrolls away from bottom; resumes when they return.
9
- * @default false
10
- */
11
- followOutput?: boolean;
12
- /**
13
- * Number of lines from bottom that still counts as "at bottom" for followOutput.
14
- * @default 3
15
- */
16
- followThreshold?: number;
17
- /**
18
- * Enable built-in keyboard navigation (arrows, page up/down, home/end, ctrl+u/d).
19
- * When enabled, the component becomes focusable.
20
- * @default false
21
- */
22
- keyboard?: boolean;
23
- onContentHeightChange?: (height: number, previousHeight: number) => void;
24
- onItemHeightChange?: (index: number, height: number, previousHeight: number) => void;
25
- /**
26
- * Fires when scrolled within `reachThreshold` lines of the end.
27
- * Only fires once per entry into the threshold zone.
28
- */
29
- onReachEnd?: () => void;
30
- /**
31
- * Fires when scrolled within `reachThreshold` lines of the start.
32
- * Only fires once per entry into the threshold zone.
33
- */
34
- onReachStart?: () => void;
35
- onScroll?: (scrollOffset: number) => void;
36
- onViewportSizeChange?: (size: {
37
- height: number;
38
- width: number;
39
- }, previousSize: {
40
- height: number;
41
- width: number;
42
- }) => void;
43
- /**
44
- * Number of extra items to render above/below the viewport when virtualized.
45
- * @default 3
46
- */
47
- overscan?: number;
48
- /**
49
- * Distance in lines from the edge to trigger onReachEnd/onReachStart.
50
- * @default 5
51
- */
52
- reachThreshold?: number;
53
- /**
54
- * Show a scrollbar track when content overflows the viewport.
55
- * @default false
56
- */
57
- scrollbar?: boolean;
58
- /**
59
- * Color of the scrollbar thumb and track.
60
- */
61
- scrollbarColor?: string;
62
- /**
63
- * Scrollbar visual style.
64
- * @default "line"
65
- */
66
- scrollbarStyle?: "arrow" | "block" | "bold" | "classic" | "dots" | "double" | "doubleSingle" | "line" | "round" | "single" | "singleDouble" | "thick";
67
- /**
68
- * Enable vim-style keybindings (j/k/g/G/u/d). Requires `keyboard` to be true.
69
- * @default false
70
- */
71
- vimBindings?: boolean;
72
- /**
73
- * Only render items visible in the viewport plus overscan. Requires items to be measured first.
74
- * @default false
75
- */
76
- virtualize?: boolean;
77
- }
78
- interface ScrollViewRef {
79
- getBottomOffset: () => number;
80
- getContentHeight: () => number;
81
- getItemHeight: (index: number) => number;
82
- getItemPosition: (index: number) => {
83
- height: number;
84
- top: number;
85
- } | null;
86
- getScrollOffset: () => number;
87
- getViewportHeight: () => number;
88
- remeasure: () => void;
89
- remeasureItem: (index: number) => void;
90
- scrollBy: (delta: number) => void;
91
- scrollTo: (offset: number) => void;
92
- scrollToBottom: () => void;
93
- scrollToTop: () => void;
94
- }
95
- declare const ScrollView: ({
96
- children,
97
- debug,
98
- followOutput,
99
- followThreshold,
100
- keyboard,
101
- onContentHeightChange,
102
- onItemHeightChange,
103
- onReachEnd,
104
- onReachStart,
105
- onScroll,
106
- onViewportSizeChange,
107
- overscan,
108
- reachThreshold,
109
- ref,
110
- scrollbar,
111
- scrollbarColor,
112
- scrollbarStyle: scrollbarStyleProp,
113
- vimBindings,
114
- virtualize,
115
- ...boxProps
116
- }: ScrollViewProps & {
117
- ref?: Ref<ScrollViewRef>;
118
- }) => React.JSX.Element;
119
- export { ScrollView as S, ScrollViewProps as a, ScrollViewRef as b };