@box-kite/react 1.0.0 → 2.0.0

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 (179) hide show
  1. package/.claude/rules/box-kite-rules.md +23 -1
  2. package/.claude/skills/box-kite/SKILL.md +134 -427
  3. package/.claude/skills/box-kite/references/components.md +235 -0
  4. package/.claude/skills/box-kite/references/extending.md +42 -0
  5. package/.claude/skills/box-kite/references/patterns.md +27 -0
  6. package/.claude/skills/box-kite/references/styling.md +222 -0
  7. package/.cursor/rules/box-kite.mdc +73 -0
  8. package/AGENTS.md +102 -0
  9. package/BOX_AI_CONTEXT.md +1124 -153
  10. package/BOX_KITE_AI_CONTEXT.md +1124 -153
  11. package/README.md +36 -2
  12. package/a11y.cjs +1 -1
  13. package/a11y.d.ts +1 -1
  14. package/a11y.mjs +3 -2
  15. package/anchor.cjs +1 -0
  16. package/anchor.d.ts +14 -0
  17. package/anchor.mjs +3 -0
  18. package/behavior.cjs +1 -1
  19. package/behavior.mjs +118 -136
  20. package/box.cjs +1 -1
  21. package/box.mjs +1 -1
  22. package/client.cjs +1 -1
  23. package/client.mjs +15 -14
  24. package/components/accordion.cjs +1 -0
  25. package/components/accordion.d.ts +114 -0
  26. package/components/accordion.mjs +251 -0
  27. package/components/button.cjs +1 -1
  28. package/components/button.d.ts +3 -0
  29. package/components/button.mjs +1 -1
  30. package/components/chart.cjs +1 -1
  31. package/components/chart.d.ts +2 -1
  32. package/components/chart.mjs +159 -184
  33. package/components/checkbox.cjs +1 -1
  34. package/components/checkbox.d.ts +8 -0
  35. package/components/checkbox.mjs +1 -1
  36. package/components/combobox/comboboxChips.d.ts +21 -0
  37. package/components/combobox/comboboxListbox.d.ts +47 -0
  38. package/components/combobox.cjs +1 -0
  39. package/components/combobox.d.ts +121 -0
  40. package/components/combobox.mjs +563 -0
  41. package/components/dataGrid/components/dataGridAggregateValue.d.ts +10 -0
  42. package/components/dataGrid/components/dataGridCell.d.ts +2 -1
  43. package/components/dataGrid/components/dataGridCellEditor.d.ts +15 -0
  44. package/components/dataGrid/components/dataGridCellPlaceholder.d.ts +14 -0
  45. package/components/dataGrid/components/dataGridCellTree.d.ts +16 -0
  46. package/components/dataGrid/components/dataGridDataSourceError.d.ts +12 -0
  47. package/components/dataGrid/components/dataGridExport.d.ts +10 -0
  48. package/components/dataGrid/components/dataGridFooter.d.ts +11 -0
  49. package/components/dataGrid/contracts/dataGridContract.d.ts +474 -16
  50. package/components/dataGrid/export/gridExport.d.ts +10 -0
  51. package/components/dataGrid/gridNavigationContext.d.ts +9 -1
  52. package/components/dataGrid/models/aggregateCellModel.d.ts +34 -0
  53. package/components/dataGrid/models/aggregationModel.d.ts +32 -0
  54. package/components/dataGrid/models/cellKeys.d.ts +11 -0
  55. package/components/dataGrid/models/cellModel.d.ts +27 -1
  56. package/components/dataGrid/models/columnModel.d.ts +12 -2
  57. package/components/dataGrid/models/dataSourceModel.d.ts +177 -0
  58. package/components/dataGrid/models/editModel.d.ts +77 -0
  59. package/components/dataGrid/models/exportModel.d.ts +51 -0
  60. package/components/dataGrid/models/gridModel.d.ts +108 -21
  61. package/components/dataGrid/models/groupRowCellModel.d.ts +11 -3
  62. package/components/dataGrid/models/groupRowModel.d.ts +22 -2
  63. package/components/dataGrid/models/rowModel.d.ts +13 -1
  64. package/components/dataGrid/models/sourceGroupRowModel.d.ts +45 -0
  65. package/components/dataGrid/models/sourceLevel.d.ts +71 -0
  66. package/components/dataGrid/models/sourceRowModel.d.ts +29 -0
  67. package/components/dataGrid/models/sourceTreeRowModel.d.ts +23 -0
  68. package/components/dataGrid/models/treeModel.d.ts +94 -0
  69. package/components/dataGrid/models/treeRow.d.ts +22 -0
  70. package/components/dataGrid/models/treeRowModel.d.ts +50 -0
  71. package/components/dataGrid.cjs +1 -1
  72. package/components/dataGrid.d.ts +4 -2
  73. package/components/dataGrid.mjs +4484 -2755
  74. package/components/dialog.cjs +1 -0
  75. package/components/dialog.d.ts +151 -0
  76. package/components/dialog.mjs +223 -0
  77. package/components/dropdown.cjs +1 -1
  78. package/components/dropdown.d.ts +30 -0
  79. package/components/dropdown.mjs +256 -244
  80. package/components/icon.cjs +1 -1
  81. package/components/icon.d.ts +2 -1
  82. package/components/icon.mjs +3 -3
  83. package/components/menu.cjs +1 -0
  84. package/components/menu.d.ts +234 -0
  85. package/components/menu.mjs +422 -0
  86. package/components/overlay.cjs +1 -1
  87. package/components/overlay.d.ts +30 -26
  88. package/components/overlay.mjs +45 -75
  89. package/components/popover.cjs +1 -0
  90. package/components/popover.d.ts +100 -0
  91. package/components/popover.mjs +69 -0
  92. package/components/presence.d.ts +6 -0
  93. package/components/progress.cjs +1 -0
  94. package/components/progress.d.ts +47 -0
  95. package/components/progress.mjs +28 -0
  96. package/components/radioButton.cjs +1 -1
  97. package/components/radioButton.d.ts +8 -0
  98. package/components/radioButton.mjs +1 -1
  99. package/components/radioGroup.cjs +1 -1
  100. package/components/radioGroup.d.ts +15 -2
  101. package/components/radioGroup.mjs +34 -30
  102. package/components/select.d.ts +9 -0
  103. package/components/semantics.cjs +1 -1
  104. package/components/semantics.d.ts +33 -28
  105. package/components/semantics.mjs +3 -3
  106. package/components/slider.cjs +1 -0
  107. package/components/slider.d.ts +98 -0
  108. package/components/slider.mjs +250 -0
  109. package/components/svg.cjs +1 -1
  110. package/components/svg.d.ts +25 -23
  111. package/components/svg.mjs +3 -3
  112. package/components/switch.cjs +1 -1
  113. package/components/switch.d.ts +9 -0
  114. package/components/switch.mjs +1 -1
  115. package/components/tabs.cjs +1 -0
  116. package/components/tabs.d.ts +87 -0
  117. package/components/tabs.mjs +324 -0
  118. package/components/textarea.cjs +1 -1
  119. package/components/textarea.d.ts +14 -0
  120. package/components/textarea.mjs +1 -1
  121. package/components/textbox.cjs +1 -1
  122. package/components/textbox.d.ts +12 -0
  123. package/components/textbox.mjs +1 -1
  124. package/components/toaster.cjs +1 -0
  125. package/components/toaster.d.ts +106 -0
  126. package/components/toaster.mjs +295 -0
  127. package/components/tooltip.cjs +1 -1
  128. package/components/tooltip.d.ts +39 -4
  129. package/components/tooltip.mjs +56 -54
  130. package/docs/a11y.md +199 -0
  131. package/docs/anchor.md +139 -0
  132. package/docs/components.md +48 -0
  133. package/docs/index.md +11 -0
  134. package/docs/props.md +1777 -0
  135. package/effects.cjs +1 -1
  136. package/effects.mjs +1 -1
  137. package/gridExport.cjs +2 -0
  138. package/gridExport.mjs +244 -0
  139. package/identity.cjs +1 -0
  140. package/identity.mjs +12 -0
  141. package/keyboard.cjs +1 -0
  142. package/keyboard.mjs +30 -0
  143. package/layer.cjs +1 -0
  144. package/layer.mjs +127 -0
  145. package/motion.cjs +1 -1
  146. package/motion.mjs +1 -1
  147. package/package.json +134 -10
  148. package/placement.cjs +1 -0
  149. package/placement.mjs +180 -0
  150. package/platform.cjs +1 -1
  151. package/platform.mjs +18 -5
  152. package/react/anchor/useAnchorPosition.d.ts +79 -0
  153. package/react/dialog/useScrollLock.d.ts +12 -0
  154. package/react/hooks/usePortalContainer.d.ts +6 -1
  155. package/react/hooks/useVirtualization.d.ts +24 -35
  156. package/react/popover/usePopoverLayer.d.ts +87 -0
  157. package/react-shared.cjs +1 -1
  158. package/react-shared.mjs +19 -2
  159. package/rsc.cjs +1 -1
  160. package/rsc.mjs +1 -1
  161. package/utils/accordion/accordionUtils.d.ts +48 -0
  162. package/utils/anchor/anchorUtils.d.ts +79 -0
  163. package/utils/array/lazyList.d.ts +10 -0
  164. package/utils/chart/chartPalette.d.ts +15 -0
  165. package/utils/chart/chartUtils.d.ts +2 -8
  166. package/utils/combobox/comboboxUtils.d.ts +89 -0
  167. package/utils/dom/domUtils.d.ts +6 -0
  168. package/utils/environment/environmentUtils.d.ts +10 -0
  169. package/utils/export/csvUtils.d.ts +23 -0
  170. package/utils/export/downloadUtils.d.ts +12 -0
  171. package/utils/export/xlsxUtils.d.ts +56 -0
  172. package/utils/export/zipUtils.d.ts +26 -0
  173. package/utils/keyboard/typeaheadUtils.d.ts +31 -0
  174. package/utils/menu/menuUtils.d.ts +25 -0
  175. package/utils/slider/sliderUtils.d.ts +67 -0
  176. package/utils/tabs/tabsUtils.d.ts +75 -0
  177. package/utils/toast/toastStore.d.ts +73 -0
  178. package/utils/virtual/virtualUtils.d.ts +47 -0
  179. /package/react/{a11y → identity}/useIdentifier.d.ts +0 -0
@@ -0,0 +1,67 @@
1
+ /** Which axis the thumbs run along. Horizontal is the reading axis, so its arrows mirror in a right-to-left page. */
2
+ export type SliderOrientation = 'horizontal' | 'vertical';
3
+ /** What a key means on a thumb: one step, one page, or a jump to an end of the range. */
4
+ export interface SliderMove {
5
+ kind: 'step' | 'page' | 'edge';
6
+ /** `1` towards the maximum, `-1` towards the minimum. */
7
+ delta: number;
8
+ }
9
+ /** The scale a slider measures on. `step` is the grid every value but `min` and `max` lands on. */
10
+ export interface SliderScale {
11
+ min: number;
12
+ max: number;
13
+ step: number;
14
+ }
15
+ /**
16
+ * Where a thumb sits and what a pointer means, with no DOM and no React in it. The geometry is
17
+ * deliberately physical — a rectangle has no reading order — and the one place direction enters is
18
+ * `moveFor`, which is the half of a right-to-left slider no logical property can fix.
19
+ */
20
+ declare namespace SliderUtils {
21
+ /**
22
+ * How many decimals a step carries, so a value snapped onto its grid does not come back as
23
+ * `0.30000000000000004`. An exponent-form step (`1e-7`) has no readable decimals, so it snaps at the
24
+ * float's own precision instead.
25
+ */
26
+ function decimals(step: number): number;
27
+ /** Inside the scale, nothing else. */
28
+ function clamp(value: number, min: number, max: number): number;
29
+ /**
30
+ * The nearest value on the step grid, counted from `min`. A `max` that is not itself on the grid stays
31
+ * out of reach here — End is what puts a thumb on it, the way a native range input does.
32
+ */
33
+ function snap(value: number, scale: SliderScale): number;
34
+ /** Where a value sits on the scale, 0–100. A scale with no width puts everything at its start. */
35
+ function percent(value: number, min: number, max: number): number;
36
+ /** The same as a CSS length, rounded to a hundredth of a percent — finer than any screen, and short enough to compare. */
37
+ function percentage(value: number, min: number, max: number): string;
38
+ /** Whatever shape the consumer gave, as the array the component works in. */
39
+ function thumbs(value: number | readonly number[]): number[];
40
+ /** And back out again, in the shape it arrived as: a number in, a number out. */
41
+ function shaped<T extends number | number[]>(sample: T, values: readonly number[]): T;
42
+ /**
43
+ * One thumb moved, held between its neighbours. A thumb may meet the one beside it and never pass it:
44
+ * crossing would renumber the thumbs under the focus that is on one of them.
45
+ */
46
+ function move(values: readonly number[], index: number, next: number, scale: SliderScale): number[];
47
+ /** Whether two sets of thumbs say the same thing, so a drag that moved nothing costs no render. */
48
+ function same(left: readonly number[], right: readonly number[]): boolean;
49
+ /**
50
+ * Which thumb a press belongs to: the nearest, and the *last* of two equally near ones, so a pair
51
+ * sitting on top of each other at the minimum can still be pulled apart.
52
+ */
53
+ function nearest(values: readonly number[], target: number): number;
54
+ /**
55
+ * The value a pointer is over. Physical coordinates against a physical rectangle: a vertical slider
56
+ * counts up from its bottom edge, and a right-to-left one from its right.
57
+ */
58
+ function valueAt(rect: DOMRect, clientX: number, clientY: number, orientation: SliderOrientation, rtl: boolean): number;
59
+ /**
60
+ * What a key does on a thumb. Both arrow pairs work on both orientations, which is APG's rule — and
61
+ * only the sideways pair mirrors, because the block axis has no reading order to follow.
62
+ */
63
+ function moveFor(key: string, rtl?: boolean): SliderMove | undefined;
64
+ /** Where a move lands, before the neighbours have their say. An edge move ignores the grid: End is `max` itself. */
65
+ function moved(current: number, key: SliderMove, scale: SliderScale, largeStep: number): number;
66
+ }
67
+ export default SliderUtils;
@@ -0,0 +1,75 @@
1
+ /** Which way a tablist runs. Horizontal is the reading axis, so its arrows mirror in a right-to-left page. */
2
+ export type TabsOrientation = 'horizontal' | 'vertical';
3
+ /** What a key means in a tablist: a step to the neighbouring tab, or a jump to an end. */
4
+ export interface TabsMove {
5
+ kind: 'step' | 'edge';
6
+ /** `1` forward, `-1` back — and on an `edge` move, the first tab or the last. */
7
+ delta: number;
8
+ }
9
+ /** Where a tab sits inside its list, along the axis the tabs run on. Physical pixels: a measured length has no reading order. */
10
+ export interface TabsBounds {
11
+ /** From the list's own start edge — its left horizontally, its top vertically. */
12
+ start: number;
13
+ /** The tab's own length on that axis. */
14
+ size: number;
15
+ }
16
+ /**
17
+ * Which tab a tablist's keyboard lands on, read off the DOM rather than out of a registry: a tab is a real
18
+ * focusable element and its position is where it was written — including one a consumer wrapped, put
19
+ * behind a condition, or rendered from a list. The measurements the travelling indicator and the resizing
20
+ * panel container need are here for the same reason: what is on screen is the only thing that knows.
21
+ */
22
+ declare namespace TabsUtils {
23
+ const TAB_SELECTOR = "[role=\"tab\"]";
24
+ const LIST_SELECTOR = "[role=\"tablist\"]";
25
+ const PANEL_SELECTOR = "[role=\"tabpanel\"]";
26
+ /** Whether this tablist is the one a node belongs to, rather than one nested inside it. */
27
+ function owns(list: Element, node: EventTarget | null): boolean;
28
+ /** The tabs a tablist owns, in DOM order. A nested set of tabs belongs to its own list. */
29
+ function tabs(list: Element | null | undefined): HTMLElement[];
30
+ /**
31
+ * A tab no selection can land on. Skipped by every movement, unlike a disabled menu item, which APG asks
32
+ * stay reachable: selection follows focus here, so a tab focus could reach and selection could not would
33
+ * leave the pattern with no state to be in.
34
+ */
35
+ function isDisabled(tab: Element): boolean;
36
+ /** What a tab stands for. The one thing the markup has to carry for the model to work. */
37
+ function valueOf(tab: HTMLElement): string | undefined;
38
+ /**
39
+ * A value turned into an id fragment. `aria-controls` is a space-separated list and the id has to survive
40
+ * a CSS selector, so everything but a letter, a digit and a hyphen is escaped by code point rather than
41
+ * dropped — two values differing only in punctuation must not come out naming one element. The `_` that
42
+ * delimits an escape is escaped along with the rest, which is what keeps the mapping one-to-one.
43
+ */
44
+ function token(value: string): string;
45
+ /** The next selectable tab in a direction, or `undefined` when there is none. Disabled tabs are stepped over. */
46
+ function step(tabs: readonly HTMLElement[], from: number, delta: number, loop: boolean): HTMLElement | undefined;
47
+ /** The first (`delta: 1`) or last (`delta: -1`) selectable tab. */
48
+ function edge(tabs: readonly HTMLElement[], delta: number): HTMLElement | undefined;
49
+ /** Where a tab a move should start from sits, or `-1` when the node is not one of these tabs. */
50
+ function indexOf(tabs: readonly HTMLElement[], node: EventTarget | null): number;
51
+ /**
52
+ * What a key does in a tablist of this orientation. The off-axis arrows deliberately mean nothing — APG
53
+ * leaves them to the page, so a horizontal tablist does not eat Up and Down.
54
+ */
55
+ function moveFor(key: string, orientation: TabsOrientation, rtl?: boolean): TabsMove | undefined;
56
+ /** The tab a move arrives at, or `undefined` when there is nowhere to go. */
57
+ function target(tabs: readonly HTMLElement[], from: number, move: TabsMove, loop: boolean): HTMLElement | undefined;
58
+ /** The tab whose panel is showing, read off the attribute the component writes rather than matched on a value. */
59
+ function selectedTab(list: Element | null | undefined): HTMLElement | undefined;
60
+ /**
61
+ * Where the travelling indicator has to be, measured off the two rectangles rather than `offsetLeft` —
62
+ * whose origin is the nearest positioned ancestor, which need not be the list. The scroll offset is
63
+ * added back because scrolling a list that outgrows its container is the consumer's to set up (#140),
64
+ * so a list that does scroll must not drag the indicator off its tab.
65
+ */
66
+ function bounds(list: Element, tab: Element, orientation: TabsOrientation): TabsBounds;
67
+ /** Whether a fresh measurement says anything new, so a reflow that moved nothing costs no render. */
68
+ function sameBounds(left: TabsBounds | undefined, right: TabsBounds | undefined): boolean;
69
+ /**
70
+ * The panel a container is showing: the one that is not hidden, so `keepMounted` measures the panel on
71
+ * screen rather than the first one written.
72
+ */
73
+ function visiblePanel(container: Element | null | undefined): HTMLElement | undefined;
74
+ }
75
+ export default TabsUtils;
@@ -0,0 +1,73 @@
1
+ /** What a toast is saying, which is the only thing that changes its colour and its urgency. */
2
+ export type ToastKind = 'default' | 'success' | 'error' | 'warning' | 'info' | 'loading';
3
+ /** Why a toast went away — the four every dismissal reports, on the shape the rest of the library uses. */
4
+ export type ToastDismissReason = 'timeout' | 'close' | 'action' | 'imperative';
5
+ export interface ToastAction<TContent> {
6
+ label: TContent;
7
+ onClick(): void;
8
+ /** Whether pressing it also dismisses the toast. Default `true` — an action is an answer to it. */
9
+ closeOnClick?: boolean;
10
+ }
11
+ export interface ToastOptions<TContent> {
12
+ /** Reuse an id and the toast already carrying it is updated in place, which is what `toast.promise` does. */
13
+ id?: string;
14
+ kind?: ToastKind;
15
+ description?: TContent;
16
+ /** Milliseconds on screen. `Infinity` stays until something dismisses it, which is what `loading` uses. */
17
+ duration?: number;
18
+ action?: ToastAction<TContent>;
19
+ /** Whether the close button is drawn and Escape reaches it. Default `true`. */
20
+ dismissible?: boolean;
21
+ onDismiss?(reason: ToastDismissReason): void;
22
+ }
23
+ export interface Toast<TContent> {
24
+ id: string;
25
+ kind: ToastKind;
26
+ message: TContent;
27
+ description?: TContent;
28
+ duration: number;
29
+ action?: ToastAction<TContent>;
30
+ dismissible: boolean;
31
+ onDismiss?(reason: ToastDismissReason): void;
32
+ /** False from the moment it is dismissed: the entry is still rendered, because the exit is running. */
33
+ open: boolean;
34
+ /** On screen rather than waiting behind the limit. A queued toast runs no timer — see `syncTimers`. */
35
+ visible: boolean;
36
+ }
37
+ export interface ToastState<TContent> {
38
+ toasts: readonly Toast<TContent>[];
39
+ /** How many open toasts the limit is holding back, which is what the viewport's counter says. */
40
+ overflow: number;
41
+ }
42
+ export interface ToastStore<TContent> {
43
+ subscribe(listener: () => void): () => void;
44
+ getSnapshot(): ToastState<TContent>;
45
+ /** The empty state, always: nothing has been announced on a server. */
46
+ getServerSnapshot(): ToastState<TContent>;
47
+ add(message: TContent, options?: ToastOptions<TContent>): string;
48
+ /** Changes a toast already on screen. An unknown id is ignored rather than added — see `toast.promise`. */
49
+ update(id: string, message: TContent, options?: ToastOptions<TContent>): void;
50
+ /** Starts the exit. The entry stays until `remove`, which is what gives `<Presence>` something to hold. */
51
+ dismiss(id?: string, reason?: ToastDismissReason): void;
52
+ /** Drops the entry for good — what the viewport calls once the exit has finished. */
53
+ remove(id: string): void;
54
+ setLimit(limit: number): void;
55
+ setDefaultDuration(duration: number): void;
56
+ /** Every timer holds where it got to. WCAG 2.2.1: hovering or focusing the stack must stop the clock. */
57
+ pause(): void;
58
+ resume(): void;
59
+ /** Everything gone with no exit and no handler called — for a test, or a route change. */
60
+ reset(): void;
61
+ }
62
+ /**
63
+ * The queue, the timers and the subscription behind `toast()` — with no React in it, because none of that
64
+ * is a rendering question. The component reads a snapshot and draws it; every decision about what is on
65
+ * screen, what is waiting and when something leaves is made here.
66
+ *
67
+ * A toast past the limit is **queued, not dropped, and its timer has not started** — so a message cannot
68
+ * expire while it was never on screen, which is the whole reason the limit is a queue rather than a cap.
69
+ */
70
+ export default function createToastStore<TContent>(options?: {
71
+ limit?: number;
72
+ duration?: number;
73
+ }): ToastStore<TContent>;
@@ -0,0 +1,47 @@
1
+ /** The slice of a long list that is actually rendered, and where it sits in the scroll space. */
2
+ export interface VirtualWindow {
3
+ /** First row to render. */
4
+ startIndex: number;
5
+ /** One past the last row to render. */
6
+ endIndex: number;
7
+ /** How far down the slice starts, in pixels. */
8
+ offsetY: number;
9
+ /** What the whole list measures — what gives the scrollbar its range. */
10
+ totalHeight: number;
11
+ }
12
+ export interface VirtualWindowOptions {
13
+ count: number;
14
+ /** The *pitch* of a row: its height plus whatever sits between two of them. */
15
+ itemHeight: number;
16
+ /** What the scrolling element shows at once. */
17
+ viewHeight: number;
18
+ scrollTop: number;
19
+ /** Rows kept either side of what is visible, so a scroll has something to reveal. */
20
+ overscan?: number;
21
+ /** The row the keyboard is on, or `-1`. The window moves to hold it whatever the scroll says. */
22
+ activeIndex?: number;
23
+ }
24
+ /**
25
+ * Windowing with no React and no DOM in it: which rows of a long list to render for a given scroll
26
+ * position, and where to put them. Pure arithmetic, so the answers are testable in an environment that
27
+ * computes no layout — which is every environment this repo's tests run in.
28
+ */
29
+ declare namespace VirtualUtils {
30
+ /** Rows either side of the viewport. Four is about a frame of fast scrolling at this row height. */
31
+ const DEFAULT_OVERSCAN = 4;
32
+ /** Below this a window costs more than it saves: the arithmetic, the wrapper and the scroll state. */
33
+ const DEFAULT_THRESHOLD = 100;
34
+ /** What a row is taken to measure before anything has been measured — this library's own option height. */
35
+ const DEFAULT_ITEM_HEIGHT = 36;
36
+ /** What the scroller is taken to show before anything has been measured — `combobox.items`' own height. */
37
+ const DEFAULT_VIEW_HEIGHT = 248;
38
+ /** Whether a list is long enough to be worth windowing. `enabled` is the caller overruling the count. */
39
+ function shouldVirtualize(count: number, enabled?: boolean, threshold?: number): boolean;
40
+ /**
41
+ * The rows to render for a scroll position. The window is a fixed number of rows that *moves*, rather
42
+ * than one that stretches to reach the active row: Home on a ten-thousand-row list would otherwise
43
+ * render all ten thousand, which is the cost the window exists to avoid.
44
+ */
45
+ function windowFor(options: VirtualWindowOptions): VirtualWindow;
46
+ }
47
+ export default VirtualUtils;
File without changes