react-virtuoso 2.3.2 → 2.4.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.
@@ -37,13 +37,17 @@ export declare type GridListProps = Pick<ComponentPropsWithRef<'div'>, 'style' |
37
37
  /**
38
38
  * Passed to the Components.Scroller custom component
39
39
  */
40
- export declare type ScrollerProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'tabIndex' | 'ref'>;
40
+ export declare type ScrollerProps = Pick<ComponentPropsWithRef<'div'>, 'style' | 'children' | 'tabIndex' | 'ref'> & {
41
+ 'data-test-id'?: string;
42
+ };
41
43
  /**
42
44
  * Passed to the Components.ScrollSeekPlaceholder custom component
43
45
  */
44
46
  export interface ScrollSeekPlaceholderProps {
45
47
  index: number;
46
48
  height: number;
49
+ groupIndex?: number;
50
+ type: 'group' | 'item';
47
51
  }
48
52
  /**
49
53
  * Passed to the GridComponents.ScrollSeekPlaceholder custom component
@@ -4257,7 +4257,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
4257
4257
  statefulScrollTop: u.StatefulStream<number>;
4258
4258
  deviation: u.StatefulStream<number>;
4259
4259
  scrollingInProgress: u.StatefulStream<boolean>;
4260
- }>], ([{ scrollTop, scrollTo }]: [{
4260
+ }>], ([{ scrollTo, scrollContainerState }]: [{
4261
4261
  scrollContainerState: u.Stream<[number, number]>;
4262
4262
  scrollTop: u.Stream<number>;
4263
4263
  viewportHeight: u.Stream<number>;
@@ -4272,7 +4272,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
4272
4272
  scrollingInProgress: u.StatefulStream<boolean>;
4273
4273
  }]) => {
4274
4274
  useWindowScroll: u.StatefulStream<boolean>;
4275
- windowScrollTop: u.Stream<number>;
4275
+ windowScrollContainerState: u.Stream<[number, number]>;
4276
4276
  windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
4277
4277
  windowScrollTo: u.Stream<ScrollToOptions>;
4278
4278
  }>, u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[], () => {
@@ -4895,7 +4895,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
4895
4895
  paddingTopAddition: u.StatefulStream<number>;
4896
4896
  }, {
4897
4897
  useWindowScroll: u.StatefulStream<boolean>;
4898
- windowScrollTop: u.Stream<number>;
4898
+ windowScrollContainerState: u.Stream<[number, number]>;
4899
4899
  windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
4900
4900
  windowScrollTo: u.Stream<ScrollToOptions>;
4901
4901
  }, {
@@ -4903,7 +4903,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
4903
4903
  }]) => {
4904
4904
  scrollIntoView: u.Stream<import("./scrollIntoViewSystem").ScrollIntoViewLocation>;
4905
4905
  useWindowScroll: u.StatefulStream<boolean>;
4906
- windowScrollTop: u.Stream<number>;
4906
+ windowScrollContainerState: u.Stream<[number, number]>;
4907
4907
  windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
4908
4908
  windowScrollTo: u.Stream<ScrollToOptions>;
4909
4909
  alignToBottom: u.StatefulStream<boolean>;
@@ -4988,7 +4988,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
4988
4988
  }, {
4989
4989
  scrollIntoView: u.Stream<import("./scrollIntoViewSystem").ScrollIntoViewLocation>;
4990
4990
  useWindowScroll: u.StatefulStream<boolean>;
4991
- windowScrollTop: u.Stream<number>;
4991
+ windowScrollContainerState: u.Stream<[number, number]>;
4992
4992
  windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
4993
4993
  windowScrollTo: u.Stream<ScrollToOptions>;
4994
4994
  alignToBottom: u.StatefulStream<boolean>;
@@ -5028,7 +5028,7 @@ export declare const listSystem: u.SystemSpec<[u.SystemSpec<[u.SystemSpec<never[
5028
5028
  scrollingInProgress: u.StatefulStream<boolean>;
5029
5029
  scrollIntoView: u.Stream<import("./scrollIntoViewSystem").ScrollIntoViewLocation>;
5030
5030
  useWindowScroll: u.StatefulStream<boolean>;
5031
- windowScrollTop: u.Stream<number>;
5031
+ windowScrollContainerState: u.Stream<[number, number]>;
5032
5032
  windowViewportRect: u.Stream<import("./interfaces").WindowViewportInfo>;
5033
5033
  windowScrollTo: u.Stream<ScrollToOptions>;
5034
5034
  alignToBottom: u.StatefulStream<boolean>;
@@ -13,7 +13,7 @@ export declare const windowScrollerSystem: u.SystemSpec<[u.SystemSpec<never[], (
13
13
  statefulScrollTop: u.StatefulStream<number>;
14
14
  deviation: u.StatefulStream<number>;
15
15
  scrollingInProgress: u.StatefulStream<boolean>;
16
- }>], ([{ scrollTop, scrollTo }]: [{
16
+ }>], ([{ scrollTo, scrollContainerState }]: [{
17
17
  scrollContainerState: u.Stream<[number, number]>;
18
18
  scrollTop: u.Stream<number>;
19
19
  viewportHeight: u.Stream<number>;
@@ -28,7 +28,7 @@ export declare const windowScrollerSystem: u.SystemSpec<[u.SystemSpec<never[], (
28
28
  scrollingInProgress: u.StatefulStream<boolean>;
29
29
  }]) => {
30
30
  useWindowScroll: u.StatefulStream<boolean>;
31
- windowScrollTop: u.Stream<number>;
31
+ windowScrollContainerState: u.Stream<[number, number]>;
32
32
  windowViewportRect: u.Stream<WindowViewportInfo>;
33
33
  windowScrollTo: u.Stream<ScrollToOptions>;
34
34
  }>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-virtuoso",
3
3
  "author": "Petyo Ivanov",
4
4
  "sideEffects": false,
5
- "version": "2.3.2",
5
+ "version": "2.4.0",
6
6
  "homepage": "https://virtuoso.dev/",
7
7
  "license": "MIT",
8
8
  "source": "src/index.tsx",
@@ -30,10 +30,10 @@
30
30
  "start": "microbundle watch --raw --no-sourcemap --strict --no-compress --jsx React.createElement --format=cjs,esm",
31
31
  "build": "microbundle --strict --jsx React.createElement --format=cjs,esm src/index.tsx",
32
32
  "test": "jest --passWithNoTests",
33
- "e2e": "jest --config jest.e2e.config.js --run-in-band --passWithNoTests",
33
+ "e2e": "playwright test",
34
34
  "lint": "eslint src test e2e --ext .ts,.tsx",
35
35
  "typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
36
- "browse-examples": "node e2e/test-cases.mjs && parcel e2e/__examples.html",
36
+ "browse-examples": "node examples/generate-examples.mjs && parcel examples/__examples.html",
37
37
  "prepare": "yarn build && husky install",
38
38
  "semantic-release": "semantic-release"
39
39
  },
@@ -49,6 +49,7 @@
49
49
  "@commitlint/config-conventional": "^12.1.4",
50
50
  "@emotion/core": "^10.1.0",
51
51
  "@emotion/styled": "^10.0.27",
52
+ "@playwright/test": "^1.17.1",
52
53
  "@types/faker": "^5.1.4",
53
54
  "@types/jest": "^26.0.20",
54
55
  "@types/jsdom": "^16.2.3",
@@ -82,7 +83,7 @@
82
83
  "microbundle": "^0.13.0",
83
84
  "parcel": "^1.12.4",
84
85
  "parcel-bundler": "^1.12.4",
85
- "playwright": "^1.16.1",
86
+ "playwright": "^1.17.1",
86
87
  "playwright-chromium": "^1.16.1",
87
88
  "prettier": "^2.2.1",
88
89
  "react": "^16.13.1",