@@ -10,36 +10,52 @@ import type { UseScrollToIndexOptions } from "./use-scroll-to-index";
1010 *
1111 * @param props
1212 */
13- export declare function Masonry < Item > ( props : MasonryProps < Item > ) : React . FunctionComponentElement < MasonryScrollerProps < unknown > > ;
13+ export declare function Masonry < Item > (
14+ props : MasonryProps < Item >
15+ ) : React . FunctionComponentElement < MasonryScrollerProps < unknown > > ;
1416export declare namespace Masonry {
15- var displayName : string ;
17+ var displayName : string ;
1618}
17- export interface MasonryProps < Item > extends Omit < MasonryScrollerProps < Item > , "offset" | "width" | "height" | "containerRef" | "positioner" > , Pick < UsePositionerOptions , "columnWidth" | "columnGutter" | "rowGutter" | "columnCount" > {
18- /**
19- * Scrolls to a given index within the grid. The grid will re-scroll
20- * any time the index changes.
21- */
22- scrollToIndex ?: number | {
19+ export interface MasonryProps < Item >
20+ extends Omit <
21+ MasonryScrollerProps < Item > ,
22+ "offset" | "width" | "height" | "containerRef" | "positioner"
23+ > ,
24+ Pick <
25+ UsePositionerOptions ,
26+ | "columnWidth"
27+ | "columnGutter"
28+ | "rowGutter"
29+ | "columnCount"
30+ | "maxColumnCount"
31+ > {
32+ /**
33+ * Scrolls to a given index within the grid. The grid will re-scroll
34+ * any time the index changes.
35+ */
36+ scrollToIndex ?:
37+ | number
38+ | {
2339 index : number ;
2440 align : UseScrollToIndexOptions [ "align" ] ;
25- } ;
26- /**
27- * This is the width that will be used for the browser `window` when rendering this component in SSR.
28- * This prop isn't relevant for client-side only apps.
29- */
30- ssrWidth ?: number ;
31- /**
32- * This is the height that will be used for the browser `window` when rendering this component in SSR.
33- * This prop isn't relevant for client-side only apps.
34- */
35- ssrHeight ?: number ;
36- /**
37- * This determines how often (in frames per second) to update the scroll position of the
38- * browser `window` in state, and as a result the rate the masonry grid recalculates its visible cells.
39- * The default value of `12` has been very reasonable in my own testing, but if you have particularly
40- * heavy `render` components it may be prudent to reduce this number.
41- *
42- * @default 12
43- */
44- scrollFps ?: number ;
41+ } ;
42+ /**
43+ * This is the width that will be used for the browser `window` when rendering this component in SSR.
44+ * This prop isn't relevant for client-side only apps.
45+ */
46+ ssrWidth ?: number ;
47+ /**
48+ * This is the height that will be used for the browser `window` when rendering this component in SSR.
49+ * This prop isn't relevant for client-side only apps.
50+ */
51+ ssrHeight ?: number ;
52+ /**
53+ * This determines how often (in frames per second) to update the scroll position of the
54+ * browser `window` in state, and as a result the rate the masonry grid recalculates its visible cells.
55+ * The default value of `12` has been very reasonable in my own testing, but if you have particularly
56+ * heavy `render` components it may be prudent to reduce this number.
57+ *
58+ * @default 12
59+ */
60+ scrollFps ?: number ;
4561}
0 commit comments