UNPKG

28.2 kBTypeScriptView Raw
1import { IChangedArgs } from '@jupyterlab/coreutils';
2import { IObservableList } from '@jupyterlab/observables';
3import { IDisposable } from '@lumino/disposable';
4import { Message } from '@lumino/messaging';
5import { ISignal, Signal } from '@lumino/signaling';
6import { PanelLayout, Widget } from '@lumino/widgets';
7/**
8 * Windowed list abstract model.
9 */
10export declare abstract class WindowedListModel implements WindowedList.IModel {
11 /**
12 * Constructor
13 *
14 * @param options Constructor options
15 */
16 constructor(options?: WindowedList.IModelOptions);
17 /**
18 * Provide a best guess for the widget size at position index
19 *
20 * #### Notes
21 *
22 * This function should be very light to compute especially when
23 * returning the default size.
24 * The default value should be constant (i.e. two calls with `null` should
25 * return the same value). But it can change for a given `index`.
26 *
27 * @param index Widget position
28 * @returns Estimated widget size
29 */
30 abstract estimateWidgetSize: (index: number) => number;
31 /**
32 * Widget factory for the list items.
33 *
34 * Caching the resulting widgets should be done by the callee.
35 *
36 * @param index List index
37 * @returns The widget at the given position
38 */
39 abstract widgetRenderer: (index: number) => Widget;
40 /**
41 * The overlap threshold used to decide whether to scroll down to an item
42 * below the viewport (smart mode). If the item overlap with the viewport
43 * is greater or equal this threshold the item is considered sufficiently
44 * visible and will not be scrolled to. The value is the number of pixels
45 * in overlap if greater than one, or otherwise a fraction of item height.
46 * By default the item is scrolled to if not full visible in the viewport.
47 */
48 readonly scrollDownThreshold: number;
49 /**
50 * The underlap threshold used to decide whether to scroll up to an item
51 * above the viewport (smart mode). If the item part outside the viewport
52 * (underlap) is greater than this threshold then the item is considered
53 * not sufficiently visible and will be scrolled to.
54 * The value is the number of pixels in underlap if greater than one, or
55 * otherwise a fraction of the item height.
56 * By default the item is scrolled to if not full visible in the viewport.
57 */
58 readonly scrollUpThreshold: number;
59 /**
60 * Top padding of the the outer window node.
61 */
62 paddingTop: number;
63 /**
64 * List widget height
65 */
66 get height(): number;
67 set height(h: number);
68 /**
69 * Test whether the model is disposed.
70 */
71 get isDisposed(): boolean;
72 /**
73 * Items list to be rendered
74 */
75 get itemsList(): IObservableList<any> | null;
76 set itemsList(v: IObservableList<any> | null);
77 /**
78 * Number of widgets to render in addition to those
79 * visible in the viewport.
80 */
81 get overscanCount(): number;
82 set overscanCount(newValue: number);
83 /**
84 * Viewport scroll offset.
85 */
86 get scrollOffset(): number;
87 set scrollOffset(offset: number);
88 /**
89 * Total number of widgets in the list
90 */
91 get widgetCount(): number;
92 set widgetCount(newValue: number);
93 /**
94 * Whether windowing is active or not.
95 *
96 * This is true by default.
97 */
98 get windowingActive(): boolean;
99 set windowingActive(newValue: boolean);
100 /**
101 * A signal emitted when any model state changes.
102 */
103 get stateChanged(): ISignal<WindowedListModel, IChangedArgs<any, any, 'count' | 'index' | 'list' | 'overscanCount' | 'windowingActive'>>;
104 /**
105 * Dispose the model.
106 */
107 dispose(): void;
108 /**
109 * Get the total list size.
110 *
111 * @returns Total estimated size
112 */
113 getEstimatedTotalSize(): number;
114 /**
115 * Get the scroll offset to display an item in the viewport.
116 *
117 * By default, the list will scroll as little as possible to ensure the item is fully visible (`auto`).
118 * You can control the alignment of the item though by specifying a second alignment parameter.
119 * Acceptable values are:
120 *
121 * auto - Automatically align with the top or bottom minimising the amount scrolled,
122 * If `alignPreference` is given, follow such preferred alignment.
123 * If item is smaller than the viewport and fully visible, do not scroll at all.
124 * smart - If the item is significantly visible, don't scroll at all (regardless of whether it fits in the viewport).
125 * If the item is less than one viewport away, scroll so that it becomes fully visible (following the `auto` heuristics).
126 * If the item is more than one viewport away, scroll so that it is centered within the viewport (`center` if smaller than viewport, `top-center` otherwise).
127 * center - Align the middle of the item with the middle of the viewport (it only works well for items smaller than the viewport).
128 * top-center - Align the top of the item with the middle of the viewport (works well for items larger than the viewport).
129 * end - Align the bottom of the item to the bottom of the list.
130 * start - Align the top of item to the top of the list.
131 *
132 * An item is considered significantly visible if:
133 * - it overlaps with the viewport by the amount specified by `scrollDownThreshold` when below the viewport
134 * - it exceeds the viewport by the amount less than specified by `scrollUpThreshold` when above the viewport.
135 *
136 * @param index Item index
137 * @param align Where to align the item in the viewport
138 * @param margin The proportion of viewport to add when aligning with the top/bottom of the list.
139 * @param precomputed Precomputed values to use when windowing is disabled.
140 * @param alignPreference Allows to override the alignment of item when the `auto` heuristic decides that the item needs to be scrolled into view.
141 * @returns The needed scroll offset
142 */
143 getOffsetForIndexAndAlignment(index: number, align?: WindowedList.ScrollToAlign, margin?: number, precomputed?: {
144 totalSize: number;
145 itemMetadata: WindowedList.ItemMetadata;
146 currentOffset: number;
147 }, alignPreference?: WindowedList.BaseScrollToAlignment): number;
148 /**
149 * Compute the items range to display.
150 *
151 * It returns ``null`` if the range does not need to be updated.
152 *
153 * @returns The current items range to display
154 */
155 getRangeToRender(): WindowedList.WindowIndex | null;
156 /**
157 * Return the viewport top position and height for range spanning from
158 * ``startIndex`` to ``stopIndex``.
159 *
160 * @param startIndex First item in viewport index
161 * @param stopIndex Last item in viewport index
162 * @returns The viewport top position and its height
163 */
164 getSpan(startIndex: number, stopIndex: number): [number, number];
165 /**
166 * WindowedListModel caches offsets and measurements for each index for performance purposes.
167 * This method clears that cached data for all items after (and including) the specified index.
168 *
169 * The list will automatically re-render after the index is reset.
170 *
171 * @param index
172 */
173 resetAfterIndex(index: number): void;
174 /**
175 * Update item sizes.
176 *
177 * This should be called when the real item sizes has been
178 * measured.
179 *
180 * @param sizes New sizes per item index
181 * @returns Whether some sizes changed or not
182 */
183 setWidgetSize(sizes: {
184 index: number;
185 size: number;
186 }[]): boolean;
187 /**
188 * Callback on list changes
189 *
190 * @param list List items
191 * @param changes List change
192 */
193 protected onListChanged(list: IObservableList<Widget>, changes: IObservableList.IChangedArgs<Widget>): void;
194 private _getItemMetadata;
195 private _findNearestItem;
196 private _findNearestItemBinarySearch;
197 private _findNearestItemExponentialSearch;
198 private _getRangeToRender;
199 private _getStartIndexForOffset;
200 private _getStopIndexForStartIndex;
201 /**
202 * Default widget size estimation
203 */
204 protected _estimatedWidgetSize: number;
205 protected _stateChanged: Signal<WindowedListModel, IChangedArgs<any, any, "list" | "index" | "count" | "overscanCount" | "windowingActive">>;
206 private _currentWindow;
207 private _height;
208 private _isDisposed;
209 private _itemsList;
210 private _lastMeasuredIndex;
211 private _overscanCount;
212 private _scrollOffset;
213 private _widgetCount;
214 private _widgetSizers;
215 private _windowingActive;
216}
217/**
218 * Windowed list widget
219 */
220export declare class WindowedList<T extends WindowedList.IModel = WindowedList.IModel, U = any> extends Widget {
221 /**
222 * Default widget size
223 */
224 static readonly DEFAULT_WIDGET_SIZE = 50;
225 /**
226 * Constructor
227 *
228 * @param options Constructor options
229 */
230 constructor(options: WindowedList.IOptions<T, U>);
231 /**
232 * Whether the parent is hidden or not.
233 *
234 * This should be set externally if a container is hidden to
235 * stop updating the widget size when hidden.
236 */
237 get isParentHidden(): boolean;
238 set isParentHidden(v: boolean);
239 /**
240 * Widget layout
241 */
242 get layout(): WindowedLayout;
243 /**
244 * The outer container of the windowed list.
245 */
246 get outerNode(): HTMLElement;
247 /**
248 * Viewport
249 */
250 get viewportNode(): HTMLElement;
251 /**
252 * Flag to enable virtual scrollbar.
253 */
254 get scrollbar(): boolean;
255 set scrollbar(enabled: boolean);
256 /**
257 * The renderer for this windowed list. Set at instantiation.
258 */
259 protected renderer: WindowedList.IRenderer<U>;
260 /**
261 * Windowed list view model
262 */
263 protected get viewModel(): T;
264 /**
265 * Dispose the windowed list.
266 */
267 dispose(): void;
268 /**
269 * Callback on event.
270 *
271 * @param event Event
272 */
273 handleEvent(event: Event): void;
274 /**
275 * Scroll to the specified offset `scrollTop`.
276 *
277 * @param scrollOffset Offset to scroll
278 *
279 * @deprecated since v4 This is an internal helper. Prefer calling `scrollToItem`.
280 */
281 scrollTo(scrollOffset: number): void;
282 /**
283 * Scroll to the specified item.
284 *
285 * By default, the list will scroll as little as possible to ensure the item is fully visible (`auto`).
286 * You can control the alignment of the item though by specifying a second alignment parameter.
287 * Acceptable values are:
288 *
289 * auto - Automatically align with the top or bottom minimising the amount scrolled,
290 * If `alignPreference` is given, follow such preferred alignment.
291 * If item is smaller than the viewport and fully visible, do not scroll at all.
292 * smart - If the item is significantly visible, don't scroll at all (regardless of whether it fits in the viewport).
293 * If the item is less than one viewport away, scroll so that it becomes fully visible (following the `auto` heuristics).
294 * If the item is more than one viewport away, scroll so that it is centered within the viewport (`center` if smaller than viewport, `top-center` otherwise).
295 * center - Align the middle of the item with the middle of the viewport (it only works well for items smaller than the viewport).
296 * top-center - Align the top of the item with the middle of the viewport (works well for items larger than the viewport).
297 * end - Align the bottom of the item to the bottom of the list.
298 * start - Align the top of item to the top of the list.
299 *
300 * @param index Item index to scroll to
301 * @param align Type of alignment
302 * @param margin In 'smart' mode the viewport proportion to add
303 * @param alignPreference Allows to override the alignment of item when the `auto` heuristic decides that the item needs to be scrolled into view.
304 */
305 scrollToItem(index: number, align?: WindowedList.ScrollToAlign, margin?: number, alignPreference?: WindowedList.BaseScrollToAlignment): Promise<void>;
306 /**
307 * A message handler invoked on an `'after-attach'` message.
308 */
309 protected onAfterAttach(msg: Message): void;
310 /**
311 * A message handler invoked on an `'before-detach'` message.
312 */
313 protected onBeforeDetach(msg: Message): void;
314 /**
315 * Callback on scroll event
316 *
317 * @param event Scroll event
318 */
319 protected onScroll(event: Event): void;
320 /**
321 * A message handler invoked on an `'resize-request'` message.
322 */
323 protected onResize(msg: Widget.ResizeMessage): void;
324 /**
325 * Callback on view model change
326 *
327 * @param model Windowed list model
328 * @param changes Change
329 */
330 protected onStateChanged(model: WindowedList.IModel, changes: IChangedArgs<number | boolean, number | boolean, string>): void;
331 /**
332 * A message handler invoked on an `'update-request'` message.
333 *
334 * #### Notes
335 * The default implementation of this handler is a no-op.
336 */
337 protected onUpdateRequest(msg: Message): void;
338 /**
339 * A signal that emits the index when the virtual scrollbar jumps to an item.
340 */
341 protected jumped: Signal<this, number>;
342 private _adjustDimensionsForScrollbar;
343 /**
344 * Add listeners for viewport, contents and the virtual scrollbar.
345 */
346 private _addListeners;
347 /**
348 * Turn off windowing related styles in the viewport.
349 */
350 private _applyNoWindowingStyles;
351 /**
352 * Turn on windowing related styles in the viewport.
353 */
354 private _applyWindowingStyles;
355 /**
356 * Remove listeners for viewport and contents (but not the virtual scrollbar).
357 */
358 private _removeListeners;
359 /**
360 * Update viewport and DOM state.
361 */
362 private _update;
363 /**
364 * Handle viewport area resize.
365 */
366 private _onAreaResize;
367 /**
368 * Handle viewport content (i.e. items) resize.
369 */
370 private _onItemResize;
371 /**
372 * Scroll to the item which was most recently requested.
373 *
374 * This method ensures that the app scrolls to the item even if a resize event
375 * occurs shortly after the scroll. Consider the following sequence of events:
376 *
377 * 1. User is at the nth cell, presses Shift+Enter (run current cell and
378 * advance to next)
379 * 2. App scrolls to the next (n+1) cell
380 * 3. The nth cell finishes running and renders the output, pushing the
381 * (n+1) cell down out of view
382 * 4. This triggers the resize observer, which calls this method and scrolls
383 * the (n+1) cell back into view
384 *
385 * On implementation level, this is ensured by scrolling to `this._scrollToItem`
386 * which is cleared after a short timeout once the scrolling settles
387 * (see `this._resetScrollToItem()`).
388 */
389 private _scrollBackToItemOnResize;
390 /**
391 * Clear any outstanding timeout and enqueue scrolling to a new item.
392 */
393 private _resetScrollToItem;
394 /**
395 * Render virtual scrollbar.
396 */
397 private _renderScrollbar;
398 /**
399 * Handle `pointerdown` events on the virtual scrollbar.
400 */
401 private _evtPointerDown;
402 private _innerElement;
403 private _isParentHidden;
404 private _isScrolling;
405 private _needsUpdate;
406 private _outerElement;
407 private _resetScrollToItemTimeout;
408 private _areaResizeObserver;
409 private _itemsResizeObserver;
410 private _scrollbarElement;
411 private _scrollbarResizeObserver;
412 private _scrollRepaint;
413 private _scrollToItem;
414 private _scrollUpdateWasRequested;
415 private _updater;
416 private _viewModel;
417 private _viewport;
418}
419/**
420 * Customized layout for windowed list container.
421 */
422export declare class WindowedLayout extends PanelLayout {
423 /**
424 * Constructor
425 */
426 constructor();
427 /**
428 * Specialized parent type definition
429 */
430 get parent(): WindowedList | null;
431 set parent(value: WindowedList | null);
432 /**
433 * Attach a widget to the parent's DOM node.
434 *
435 * @param index - The current index of the widget in the layout.
436 *
437 * @param widget - The widget to attach to the parent.
438 *
439 * #### Notes
440 * This method is called automatically by the panel layout at the
441 * appropriate time. It should not be called directly by user code.
442 *
443 * The default implementation adds the widgets's node to the parent's
444 * node at the proper location, and sends the appropriate attach
445 * messages to the widget if the parent is attached to the DOM.
446 *
447 * Subclasses may reimplement this method to control how the widget's
448 * node is added to the parent's node.
449 */
450 protected attachWidget(index: number, widget: Widget): void;
451 /**
452 * Detach a widget from the parent's DOM node.
453 *
454 * @param index - The previous index of the widget in the layout.
455 *
456 * @param widget - The widget to detach from the parent.
457 *
458 * #### Notes
459 * This method is called automatically by the panel layout at the
460 * appropriate time. It should not be called directly by user code.
461 *
462 * The default implementation removes the widget's node from the
463 * parent's node, and sends the appropriate detach messages to the
464 * widget if the parent is attached to the DOM.
465 *
466 * Subclasses may reimplement this method to control how the widget's
467 * node is removed from the parent's node.
468 */
469 protected detachWidget(index: number, widget: Widget): void;
470 /**
471 * Move a widget in the parent's DOM node.
472 *
473 * @param fromIndex - The previous index of the widget in the layout.
474 *
475 * @param toIndex - The current index of the widget in the layout.
476 *
477 * @param widget - The widget to move in the parent.
478 *
479 * #### Notes
480 * This method is called automatically by the panel layout at the
481 * appropriate time. It should not be called directly by user code.
482 *
483 * The default implementation moves the widget's node to the proper
484 * location in the parent's node and sends the appropriate attach and
485 * detach messages to the widget if the parent is attached to the DOM.
486 *
487 * Subclasses may reimplement this method to control how the widget's
488 * node is moved in the parent's node.
489 */
490 protected moveWidget(fromIndex: number, toIndex: number, widget: Widget): void;
491 /**
492 * A message handler invoked on an `'update-request'` message.
493 *
494 * #### Notes
495 * This is a reimplementation of the base class method,
496 * and is a no-op.
497 */
498 protected onUpdateRequest(msg: Message): void;
499}
500/**
501 * A namespace for windowed list
502 */
503export declare namespace WindowedList {
504 /**
505 * The default renderer class for windowed lists.
506 */
507 class Renderer<T = any> implements IRenderer<T> {
508 /**
509 * Create the outer, root element of the windowed list.
510 */
511 createOuter(): HTMLElement;
512 /**
513 * Create the virtual scrollbar element.
514 */
515 createScrollbar(): HTMLOListElement;
516 /**
517 * Create an individual item rendered in the scrollbar.
518 */
519 createScrollbarItem(_: WindowedList, index: number): HTMLLIElement;
520 /**
521 * Create the viewport element into which virtualized children are added.
522 */
523 createViewport(): HTMLElement;
524 }
525 /**
526 * The default renderer for windowed lists.
527 */
528 const defaultRenderer: Renderer<any>;
529 /**
530 * Windowed list model interface
531 */
532 interface IModel<T = any> extends IDisposable {
533 /**
534 * Provide a best guess for the widget size at position index
535 *
536 * #### Notes
537 *
538 * This function should be very light to compute especially when
539 * returning the default size.
540 * The default value should be constant (i.e. two calls with `null` should
541 * return the same value). But it can change for a given `index`.
542 *
543 * @param index Widget position
544 * @returns Estimated widget size
545 */
546 estimateWidgetSize: (index: number) => number;
547 /**
548 * Get the total list size.
549 *
550 * @returns Total estimated size
551 */
552 getEstimatedTotalSize(): number;
553 /**
554 * Get the scroll offset to display an item in the viewport.
555 *
556 * By default, the list will scroll as little as possible to ensure the item is fully visible (`auto`).
557 * You can control the alignment of the item though by specifying a second alignment parameter.
558 * Acceptable values are:
559 *
560 * auto - Automatically align with the top or bottom minimising the amount scrolled,
561 * If `alignPreference` is given, follow such preferred alignment.
562 * If item is smaller than the viewport and fully visible, do not scroll at all.
563 * smart - If the item is significantly visible, don't scroll at all (regardless of whether it fits in the viewport).
564 * If the item is less than one viewport away, scroll so that it becomes fully visible (following the `auto` heuristics).
565 * If the item is more than one viewport away, scroll so that it is centered within the viewport (`center` if smaller than viewport, `top-center` otherwise).
566 * center - Align the middle of the item with the middle of the viewport (it only works well for items smaller than the viewport).
567 * top-center - Align the top of the item with the middle of the viewport (works well for items larger than the viewport).
568 * end - Align the bottom of the item to the bottom of the list.
569 * start - Align the top of item to the top of the list.
570 *
571 * @param index Item index
572 * @param align Where to align the item in the viewport
573 * @param margin In 'smart' mode the viewport proportion to add
574 * @param precomputed Precomputed values to use when windowing is disabled.
575 * @param alignPreference Allows to override the alignment of item when the `auto` heuristic decides that the item needs to be scrolled into view.
576 * @returns The needed scroll offset
577 */
578 getOffsetForIndexAndAlignment(index: number, align?: ScrollToAlign, margin?: number, precomputed?: {
579 totalSize: number;
580 itemMetadata: WindowedList.ItemMetadata;
581 currentOffset: number;
582 }, alignPreference?: WindowedList.BaseScrollToAlignment): number;
583 /**
584 * Compute the items range to display.
585 *
586 * It returns ``null`` if the range does not need to be updated.
587 *
588 * @returns The current items range to display
589 */
590 getRangeToRender(): WindowIndex | null;
591 /**
592 * Return the viewport top position and height for range spanning from
593 * ``startIndex`` to ``stopIndex``.
594 *
595 * @param start First item in viewport index
596 * @param stop Last item in viewport index
597 * @returns The viewport top position and its height
598 */
599 getSpan(start: number, stop: number): [number, number];
600 /**
601 * List widget height
602 */
603 height: number;
604 /**
605 * Top padding of the the outer window node.
606 */
607 paddingTop?: number;
608 /**
609 * Items list to be rendered
610 */
611 itemsList: {
612 get?: (index: number) => T;
613 length: number;
614 changed: ISignal<any, IObservableList.IChangedArgs<any>>;
615 } | null;
616 /**
617 * Number of widgets to render in addition to those
618 * visible in the viewport.
619 */
620 overscanCount: number;
621 /**
622 * WindowedListModel caches offsets and measurements for each index for performance purposes.
623 * This method clears that cached data for all items after (and including) the specified index.
624 *
625 * The list will automatically re-render after the index is reset.
626 *
627 * @param index
628 */
629 resetAfterIndex(index: number): void;
630 /**
631 * Viewport scroll offset.
632 */
633 scrollOffset: number;
634 /**
635 * Update item sizes.
636 *
637 * This should be called when the real item sizes has been
638 * measured.
639 *
640 * @param sizes New sizes per item index
641 * @returns Whether some sizes changed or not
642 */
643 setWidgetSize(sizes: {
644 index: number;
645 size: number;
646 }[]): boolean;
647 /**
648 * A signal emitted when any model state changes.
649 */
650 readonly stateChanged: ISignal<IModel, IChangedArgs<any, any, 'count' | 'index' | 'list' | 'overscanCount' | 'windowingActive'>>;
651 /**
652 * Total number of widgets in the list
653 */
654 widgetCount: number;
655 /**
656 * Whether windowing is active or not.
657 */
658 windowingActive: boolean;
659 /**
660 * Widget factory for the list items.
661 *
662 * Caching the resulting widgets should be done by the callee.
663 *
664 * @param index List index
665 * @returns The widget at the given position
666 */
667 widgetRenderer: (index: number) => Widget;
668 }
669 /**
670 * Windowed list model constructor options
671 */
672 interface IModelOptions {
673 /**
674 * Total number of widgets in the list.
675 *
676 * #### Notes
677 * If an observable list is provided this will be ignored.
678 */
679 count?: number;
680 /**
681 * Dynamic list of items
682 */
683 itemsList?: IObservableList<any>;
684 /**
685 * Number of widgets to render in addition to those
686 * visible in the viewport.
687 */
688 overscanCount?: number;
689 /**
690 * Whether windowing is active or not.
691 *
692 * This is true by default.
693 */
694 windowingActive?: boolean;
695 }
696 /**
697 * Windowed list view constructor options
698 */
699 interface IOptions<T extends WindowedList.IModel = WindowedList.IModel, U = any> {
700 /**
701 * Windowed list model to display
702 */
703 model: T;
704 /**
705 * Windowed list layout
706 */
707 layout?: WindowedLayout;
708 /**
709 * A renderer for the elements of the windowed list.
710 */
711 renderer?: IRenderer<U>;
712 /**
713 * Whether the windowed list should display a scrollbar UI.
714 */
715 scrollbar?: boolean;
716 }
717 /**
718 * A windowed list element renderer.
719 */
720 interface IRenderer<T = any> {
721 /**
722 * Create the outer, root element of the windowed list.
723 */
724 createOuter(): HTMLElement;
725 /**
726 * Create the virtual scrollbar element.
727 */
728 createScrollbar(): HTMLElement;
729 /**
730 * Create an individual item rendered in the scrollbar.
731 */
732 createScrollbarItem(list: WindowedList, index: number, item: T | undefined): HTMLElement;
733 /**
734 * Create the viewport element into which virtualized children are added.
735 */
736 createViewport(): HTMLElement;
737 }
738 /**
739 * Item list metadata
740 */
741 type ItemMetadata = {
742 /**
743 * Item vertical offset in the container
744 */
745 offset: number;
746 /**
747 * Item height
748 */
749 size: number;
750 /**
751 * Whether the size is an estimation or a measurement.
752 */
753 measured?: boolean;
754 };
755 /**
756 * Basic type of scroll alignment
757 */
758 type BaseScrollToAlignment = 'center' | 'top-center' | 'start' | 'end';
759 /**
760 * Type of scroll alignment including `auto` and `smart`
761 */
762 type ScrollToAlign = 'auto' | 'smart' | BaseScrollToAlignment;
763 /**
764 * Widget range in view port
765 */
766 type WindowIndex = [number, number, number, number];
767}