virtual-scroller 1.16.0 → 1.16.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-scroller",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "A component for efficiently rendering large lists of variable height items",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",
package/react/as.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as React from 'react';
2
+
1
3
  // The following is an `as` property implementation
2
4
  // that was copy-pasted from https://www.benmvp.com/blog/polymorphic-react-components-typescript/
3
5
  //
@@ -7,8 +9,8 @@
7
9
  // "A more precise version of `React.ComponentPropsWithoutRef`".
8
10
  // It's not clear what exactly they meant by that.
9
11
  type PropsOf<
10
- Component extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>
11
- > = JSX.LibraryManagedAttributes<Component, React.ComponentPropsWithoutRef<Component>>
12
+ Component extends keyof React.JSX.IntrinsicElements | React.JSXElementConstructor<any>
13
+ > = React.JSX.LibraryManagedAttributes<Component, React.ComponentPropsWithoutRef<Component>>
12
14
  //
13
15
  // Combines props with any additional props.
14
16
  type CombineProps<
package/react/index.d.ts CHANGED
@@ -25,9 +25,9 @@ export interface VirtualScrollerRefValue {
25
25
  // There seems to be no requirement for such "more sophisticated" type declaration.
26
26
  // Hence, it is commented out and a simpler type of just `HTMLElement` is used.
27
27
  //
28
- // getElement(): ItemsContainerComponent extends keyof JSX.IntrinsicElements
28
+ // getElement(): ItemsContainerComponent extends keyof React.JSX.IntrinsicElements
29
29
  // ? (
30
- // JSX.IntrinsicElements[ItemsContainerComponent] extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<infer T>, T>
30
+ // React.JSX.IntrinsicElements[ItemsContainerComponent] extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<infer T>, T>
31
31
  // ? T
32
32
  // : HTMLElement
33
33
  // ) : HTMLElement;
@@ -189,7 +189,7 @@ declare function VirtualScroller<
189
189
  // and it won't be considered a "breaking change" because it doesn't affect the javascript code.
190
190
  AsComponent
191
191
  >
192
- ): JSX.Element;
192
+ ): React.JSX.Element;
193
193
 
194
194
  export default VirtualScroller;
195
195