Skip to content

Commit

Permalink
chore(release): 3.7.0
Browse files Browse the repository at this point in the history
# [3.7.0](v3.6.5...v3.7.0) (2022-09-16)

### Features

* **use-positioner:** add maxColumnCount property ([#132](#132)) ([dbec4ff](dbec4ff))
  • Loading branch information
semantic-release-bot committed Sep 16, 2022
1 parent dbec4ff commit 8435f22
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [3.7.0](https://github.com/jaredLunde/masonic/compare/v3.6.5...v3.7.0) (2022-09-16)

### Features

- **use-positioner:** add maxColumnCount property ([#132](https://github.com/jaredLunde/masonic/issues/132)) ([dbec4ff](https://github.com/jaredLunde/masonic/commit/dbec4ff86e869b303d7648bebb3e28faa7adc7b3))

## [3.6.5](https://github.com/jaredLunde/masonic/compare/v3.6.4...v3.6.5) (2022-04-28)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "masonic",
"version": "3.6.5",
"version": "3.7.0",
"description": "",
"license": "MIT",
"author": "Jared Lunde <[email protected]> (https://jaredlunde.com/)",
Expand Down
72 changes: 44 additions & 28 deletions types/masonry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,52 @@ import type { UseScrollToIndexOptions } from "./use-scroll-to-index";
*
* @param props
*/
export declare function Masonry<Item>(props: MasonryProps<Item>): React.FunctionComponentElement<MasonryScrollerProps<unknown>>;
export declare function Masonry<Item>(
props: MasonryProps<Item>
): React.FunctionComponentElement<MasonryScrollerProps<unknown>>;
export declare namespace Masonry {
var displayName: string;
var displayName: string;
}
export interface MasonryProps<Item> extends Omit<MasonryScrollerProps<Item>, "offset" | "width" | "height" | "containerRef" | "positioner">, Pick<UsePositionerOptions, "columnWidth" | "columnGutter" | "rowGutter" | "columnCount"> {
/**
* Scrolls to a given index within the grid. The grid will re-scroll
* any time the index changes.
*/
scrollToIndex?: number | {
export interface MasonryProps<Item>
extends Omit<
MasonryScrollerProps<Item>,
"offset" | "width" | "height" | "containerRef" | "positioner"
>,
Pick<
UsePositionerOptions,
| "columnWidth"
| "columnGutter"
| "rowGutter"
| "columnCount"
| "maxColumnCount"
> {
/**
* Scrolls to a given index within the grid. The grid will re-scroll
* any time the index changes.
*/
scrollToIndex?:
| number
| {
index: number;
align: UseScrollToIndexOptions["align"];
};
/**
* This is the width that will be used for the browser `window` when rendering this component in SSR.
* This prop isn't relevant for client-side only apps.
*/
ssrWidth?: number;
/**
* This is the height that will be used for the browser `window` when rendering this component in SSR.
* This prop isn't relevant for client-side only apps.
*/
ssrHeight?: number;
/**
* This determines how often (in frames per second) to update the scroll position of the
* browser `window` in state, and as a result the rate the masonry grid recalculates its visible cells.
* The default value of `12` has been very reasonable in my own testing, but if you have particularly
* heavy `render` components it may be prudent to reduce this number.
*
* @default 12
*/
scrollFps?: number;
};
/**
* This is the width that will be used for the browser `window` when rendering this component in SSR.
* This prop isn't relevant for client-side only apps.
*/
ssrWidth?: number;
/**
* This is the height that will be used for the browser `window` when rendering this component in SSR.
* This prop isn't relevant for client-side only apps.
*/
ssrHeight?: number;
/**
* This determines how often (in frames per second) to update the scroll position of the
* browser `window` in state, and as a result the rate the masonry grid recalculates its visible cells.
* The default value of `12` has been very reasonable in my own testing, but if you have particularly
* heavy `render` components it may be prudent to reduce this number.
*
* @default 12
*/
scrollFps?: number;
}

0 comments on commit 8435f22

Please sign in to comment.