virtua 0.50.6 → 0.51.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.
package/README.md CHANGED
@@ -28,7 +28,12 @@ https://inokawa.github.io/virtua/
28
28
  npm install virtua
29
29
  ```
30
30
 
31
- If you use this lib in [legacy browsers which does not have ResizeObserver](https://caniuse.com/?search=resizeobserver), you should use [polyfill](https://github.com/juggle/resize-observer#switching-between-native-and-polyfilled-versions).
31
+ If you want to support legacy browsers, you need polyfills.
32
+
33
+ - [ResizeObserver](https://caniuse.com/?search=resizeobserver) is always required (e.g. [@juggle/resize-observer](https://github.com/juggle/resize-observer#switching-between-native-and-polyfilled-versions)).
34
+ - [Scroll methods on elements](https://caniuse.com/element-scroll-methods) are always required (e.g. [element-scroll-polyfill](https://github.com/idmadj/element-scroll-polyfill)).
35
+ - [CSS scroll-behavior](https://caniuse.com/?search=scroll-behavior) is required only if you call `scrollToIndex` with `smooth: true` (e.g. [scroll-behavior-polyfill](https://github.com/wessberg/scroll-behavior-polyfill)).
36
+ - [CSS inset-inline-start](https://caniuse.com/mdn-css_properties_inset-inline-start) is required only if you set `horizontal: true`. It cannot be polyfilled so use `virtua@<=0.50` instead.
32
37
 
33
38
  ## Getting started
34
39
 
@@ -11,7 +11,7 @@ export interface VirtualizerHandle {
11
11
  */
12
12
  readonly cache: CacheSnapshot;
13
13
  /**
14
- * Get current scrollTop, or scrollLeft if horizontal: true.
14
+ * Get current scrollTop, or scrollLeft if horizontal: true. Always positive even in RTL.
15
15
  */
16
16
  readonly scrollOffset: number;
17
17
  /**
@@ -19,7 +19,7 @@ export interface VirtualizerHandle {
19
19
  */
20
20
  readonly scrollSize: number;
21
21
  /**
22
- * Get current offsetHeight, or offsetWidth if horizontal: true.
22
+ * Get current clientHeight, or clientWidth if horizontal: true.
23
23
  */
24
24
  readonly viewportSize: number;
25
25
  /**
@@ -10,11 +10,11 @@ export interface WindowVirtualizerHandle {
10
10
  */
11
11
  readonly cache: CacheSnapshot;
12
12
  /**
13
- * Get current scrollTop, or scrollLeft if horizontal: true.
13
+ * Get current scrollTop, or scrollLeft if horizontal: true. Always positive even in RTL.
14
14
  */
15
15
  readonly scrollOffset: number;
16
16
  /**
17
- * Get current offsetHeight, or offsetWidth if horizontal: true.
17
+ * Get current clientHeight of the document, or clientWidth if horizontal: true.
18
18
  */
19
19
  readonly viewportSize: number;
20
20
  /**