virtua 0.24.0 → 0.25.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.
@@ -1,32 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from "react";
2
2
  import { ViewportComponentAttributes } from "./types";
3
- /**
4
- * Props of customized scrollable component.
5
- */
6
- interface CustomViewportComponentProps {
7
- /**
8
- * Renderable item elements.
9
- */
10
- children: ReactNode;
11
- /**
12
- * Attributes that should be passed to the scrollable element.
13
- */
14
- attrs: ViewportComponentAttributes;
15
- /**
16
- * Total height of items. It's undefined if component is not vertically scrollable.
17
- */
18
- height: number | undefined;
19
- /**
20
- * Total width of items. It's undefined if component is not horizontally scrollable.
21
- */
22
- width: number | undefined;
23
- /**
24
- * Currently component is scrolling or not.
25
- */
26
- scrolling: boolean;
27
- }
28
- declare const DefaultViewport: import("react").ForwardRefExoticComponent<CustomViewportComponentProps & import("react").RefAttributes<any>>;
29
- export type CustomViewportComponent = typeof DefaultViewport;
30
3
  /**
31
4
  * Props of customized cell component for {@link VGrid}.
32
5
  */
@@ -119,23 +92,12 @@ export interface VGridProps extends ViewportComponentAttributes {
119
92
  */
120
93
  initialColCount?: number;
121
94
  /**
122
- * Customized components for advanced usage.
95
+ * Component or element type for cell element. This component will get {@link CustomCellComponentProps} as props.
96
+ * @defaultValue "div"
123
97
  */
124
- components?: {
125
- /**
126
- * Component for scrollable element. This component will get {@link CustomViewportComponentProps} as props.
127
- * @defaultValue {@link DefaultViewport}
128
- */
129
- Root?: CustomViewportComponent;
130
- /**
131
- * Component or element type for cell element. This component will get {@link CustomCellComponentProps} as props.
132
- * @defaultValue "div"
133
- */
134
- Cell?: keyof JSX.IntrinsicElements | CustomCellComponent;
135
- };
98
+ item?: keyof JSX.IntrinsicElements | CustomCellComponent;
136
99
  }
137
100
  /**
138
101
  * Virtualized grid component. See {@link VGridProps} and {@link VGridHandle}.
139
102
  */
140
103
  export declare const VGrid: import("react").ForwardRefExoticComponent<VGridProps & import("react").RefAttributes<VGridHandle>>;
141
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtua",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue and Solid.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",