Skip to content

Commit 8435f22

Browse files
chore(release): 3.7.0
# [3.7.0](v3.6.5...v3.7.0) (2022-09-16) ### Features * **use-positioner:** add maxColumnCount property ([#132](#132)) ([dbec4ff](dbec4ff))
1 parent dbec4ff commit 8435f22

File tree

3 files changed

+51
-29
lines changed

3 files changed

+51
-29
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# [3.7.0](https://github.com/jaredLunde/masonic/compare/v3.6.5...v3.7.0) (2022-09-16)
2+
3+
### Features
4+
5+
- **use-positioner:** add maxColumnCount property ([#132](https://github.com/jaredLunde/masonic/issues/132)) ([dbec4ff](https://github.com/jaredLunde/masonic/commit/dbec4ff86e869b303d7648bebb3e28faa7adc7b3))
6+
17
## [3.6.5](https://github.com/jaredLunde/masonic/compare/v3.6.4...v3.6.5) (2022-04-28)
28

39
### Bug Fixes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "masonic",
3-
"version": "3.6.5",
3+
"version": "3.7.0",
44
"description": "",
55
"license": "MIT",
66
"author": "Jared Lunde <jared.lunde@gmail.com> (https://jaredlunde.com/)",

types/masonry.d.ts

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -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>>;
1416
export 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

Comments
 (0)