function Masonry(props) {
  const containerRef = React.useRef(null)
  const windowSize = (0, _windowSize.useWindowSize)({
    initialWidth: props.ssrWidth,
    initialHeight: props.ssrHeight,
  })
  const containerPos = (0, _useContainerPosition.useContainerPosition)(
    containerRef,
    windowSize
  )
  const nextProps = Object.assign(
    {
      offset: containerPos.offset,
      width: containerPos.width || windowSize[0],
      height: windowSize[1],
      containerRef,
    },
    props
  )
  nextProps.positioner = (0, _usePositioner.usePositioner)(nextProps)
  nextProps.resizeObserver = (0, _useResizeObserver.useResizeObserver)(
    nextProps.positioner
  )
  const scrollToIndex = (0, _useScrollToIndex.useScrollToIndex)(
    nextProps.positioner,
    {
      height: nextProps.height,
      offset: containerPos.offset,
      align:
        typeof props.scrollToIndex === 'object'
          ? props.scrollToIndex.align
          : void 0,
    }
  )
  const index =
    props.scrollToIndex &&
    (typeof props.scrollToIndex === 'number'
      ? props.scrollToIndex
      : props.scrollToIndex.index)
  React.useEffect(() => {
    if (index !== void 0) scrollToIndex(index)
  }, [index, scrollToIndex])
  return __reactCreateElement__(_masonryScroller.MasonryScroller, nextProps)
}
/**
 * A "batteries included" masonry grid which includes all of the implementation details below. This component is the
 * easiest way to get off and running in your app, before switching to more advanced implementations, if necessary.
 * It will change its column count to fit its container's width and will decide how many rows to render based upon
 * the height of the browser `window`.
 */
A "batteries included" masonry grid which includes all of the implementation details below. This component is the
easiest way to get off and running in your app, before switching to more advanced implementations, if necessary.
It will change its column count to fit its container's width and will decide how many rows to render based upon
the height of the browser `window`.
A " batteries included " masonry grid which includes all of the implementation details below . This component is the easiest way to get off and running in your app before switching to more advanced implementations if necessary . It will change its column count to fit its container ' s width and will decide how many rows to render based upon the height of the browser ` window ` .
function Masonry(props) {
  const containerRef = React.useRef(null)
  const windowSize = (0, _windowSize.useWindowSize)({
    initialWidth: props.ssrWidth,
    initialHeight: props.ssrHeight,
  })
  const containerPos = (0, _useContainerPosition.useContainerPosition)(
    containerRef,
    windowSize
  )
  const nextProps = Object.assign(
    {
      offset: containerPos.offset,
      width: containerPos.width || windowSize[0],
      height: windowSize[1],
      containerRef,
    },
    props
  )
  nextProps.positioner = (0, _usePositioner.usePositioner)(nextProps)
  nextProps.resizeObserver = (0, _useResizeObserver.useResizeObserver)(
    nextProps.positioner
  )
  const scrollToIndex = (0, _useScrollToIndex.useScrollToIndex)(
    nextProps.positioner,
    {
      height: nextProps.height,
      offset: containerPos.offset,
      align:
        typeof props.scrollToIndex === 'object'
          ? props.scrollToIndex.align
          : void 0,
    }
  )
  const index =
    props.scrollToIndex &&
    (typeof props.scrollToIndex === 'number'
      ? props.scrollToIndex
      : props.scrollToIndex.index)
  React.useEffect(() => {
    if (index !== void 0) scrollToIndex(index)
  }, [index, scrollToIndex])
  return __reactCreateElement__(_masonryScroller.MasonryScroller, nextProps)
}
function Masonry ( props ) { const containerRef = React . useRef ( null ) const windowSize = ( 0 , _windowSize . useWindowSize ) ( { initialWidth : props . ssrWidth , initialHeight : props . ssrHeight , } ) const containerPos = ( 0 , _useContainerPosition . useContainerPosition ) ( containerRef , windowSize ) const nextProps = Object . assign ( { offset : containerPos . offset , width : containerPos . width || windowSize [ 0 ] , height : windowSize [ 1 ] , containerRef , } , props ) nextProps . positioner = ( 0 , _usePositioner . usePositioner ) ( nextProps ) nextProps . resizeObserver = ( 0 , _useResizeObserver . useResizeObserver ) ( nextProps . positioner ) const scrollToIndex = ( 0 , _useScrollToIndex . useScrollToIndex ) ( nextProps . positioner , { height : nextProps . height , offset : containerPos . offset , align : typeof props . scrollToIndex === 'object' ? props . scrollToIndex . align : void 0 , } ) const index = props . scrollToIndex && ( typeof props . scrollToIndex === 'number' ? props . scrollToIndex : props . scrollToIndex . index ) React . useEffect ( ( ) => { if ( index !== void 0 ) scrollToIndex ( index ) } , [ index , scrollToIndex ] ) return __reactCreateElement__ ( _masonryScroller . MasonryScroller , nextProps ) }
A "batteries included" masonry grid which includes all of the implementation details below.
A " batteries included " masonry grid which includes all of the implementation details below .