v2.0.0
2.0.0 (2022-12-09)
Upgrading from v1?
Review the v2 Breaking Changes
Bug Fixes
- add explicit root entrypoint to package exports map (7fc1930)
- fix componentsProps.imageProps type (e8547d9)
- make RenderContainerProps.containerRef required (88f65d0)
- replace 'require' export with 'default' (d3ec23d)
Code Refactoring
- refactor types (07e40d3)
Features
- add loading="lazy" and decoding="async" image attributes (4e70cb5)
- drop instrumentation (e2c6866)
- improve client-side rendering (936af66)
- improve onClick callback DX (8f5a15c)
- overhaul package bundle (85b7514)
- refactor TypeScript types (ac8f702)
- remove deprecated ForwardRefExoticComponent option from renderContainer prop (b527cd4)
- remove resizeObserverProvider prop (b3798ca)
- render empty columns when there aren't enough photos (237d481)
Reverts
- chore: remove assets from GitHub releases (7d11200)
- fix: add explicit root entrypoint to package exports map (d055386)
BREAKING CHANGES
- rename RowContainerProps type to RenderRowContainerProps
- rename ColumnContainerProps type to RenderColumnContainerProps
- delete ContainerProps type
- rename PhotoProps type to RenderPhotoProps
- instrumentation prop is no longer supported
- remove defaultContainerWidth default value
- PhotoAlbum renders empty markup in SSR if defaultContainerWidth is not defined
- containerWidth parameter in the componentsProps functional supplier is now optional
- layoutOptions prop is replaced with layout prop in custom renderContainer function
- viewportWidth prop is no longer provided as part of the layoutOptions object
- RenderContainer, ContainerProps and RenderContainerProps are no longer generic
- columnConstraints prop is no longer supported
- change onClick callback method signature
- resizeObserverProvider is no longer supported
- renderContainer prop no longer accepts React.forwardRef
- rename ESM bundle from index.esm.js to index.mjs
- rename CJS bundle from index.cjs.js to index.js
- switch JSX runtime back to React.createElement