From 8435f2271d52d0dfcd4e5236e711f329c216b741 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 16 Sep 2022 01:34:50 +0000 Subject: [PATCH] chore(release): 3.7.0 # [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)) --- CHANGELOG.md | 6 ++++ package.json | 2 +- types/masonry.d.ts | 72 ++++++++++++++++++++++++++++------------------ 3 files changed, 51 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48f2c4b..575e943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/package.json b/package.json index c920919..8b92c80 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "masonic", - "version": "3.6.5", + "version": "3.7.0", "description": "", "license": "MIT", "author": "Jared Lunde (https://jaredlunde.com/)", diff --git a/types/masonry.d.ts b/types/masonry.d.ts index b5a83c0..63f0472 100644 --- a/types/masonry.d.ts +++ b/types/masonry.d.ts @@ -10,36 +10,52 @@ import type { UseScrollToIndexOptions } from "./use-scroll-to-index"; * * @param props */ -export declare function Masonry(props: MasonryProps): React.FunctionComponentElement>; +export declare function Masonry( + props: MasonryProps +): React.FunctionComponentElement>; export declare namespace Masonry { - var displayName: string; + var displayName: string; } -export interface MasonryProps extends Omit, "offset" | "width" | "height" | "containerRef" | "positioner">, Pick { - /** - * Scrolls to a given index within the grid. The grid will re-scroll - * any time the index changes. - */ - scrollToIndex?: number | { +export interface MasonryProps + extends Omit< + MasonryScrollerProps, + "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; }