@yogiswara/honcho-editor-ui 2.1.16 → 2.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,27 +7,27 @@ const AlbumImageGallery = (props) => {
7
7
  const { imageCollection, isSelectedMode, isHiddenGallery, enableEditor, // Destructure the new prop
8
8
  onPreview, onSelectedMode, onToggleSelect, } = props;
9
9
  console.log("imageCollection: ", imageCollection);
10
- return (_jsx("section", { children: _jsx(ResponsiveMasonry, { columnsCountBreakPoints: { 750: 2, 900: 4 }, children: _jsx(Masonry, { children: imageCollection.map((photo, index) => {
11
- // This guard clause is still important for runtime safety.
12
- if (!photo.key || !photo.src) {
13
- console.warn("Skipping item without a key or src:", photo);
14
- return null;
15
- }
16
- // NEW: Create a new object that matches the 'PhotoProps' interface.
17
- // This explicitly tells TypeScript that all required fields are present.
18
- const imageItemPhotoProps = {
19
- key: photo.key,
20
- src: photo.src,
21
- width: photo.width,
22
- height: photo.height,
23
- alt: photo.alt,
24
- // We pass the original photo object in the generic 'photo' property
25
- // in case ImageItem needs it for other operations.
26
- photo: photo,
27
- };
28
- return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index,
29
- // UPDATED: Pass the new, correctly-typed object.
30
- photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery, onPreview: onPreview(photo), onSelectedMode: onSelectedMode, onToggleSelect: onToggleSelect(photo), enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame, data: photo }) }, photo.key));
31
- }) }) }) }));
10
+ return (_jsx(ResponsiveMasonry, { columnsCountBreakPoints: { 750: 2, 900: 4 }, children: _jsx(Masonry, { children: imageCollection.map((photo, index) => {
11
+ // This guard clause is still important for runtime safety.
12
+ if (!photo.key || !photo.src) {
13
+ console.warn("Skipping item without a key or src:", photo);
14
+ return null;
15
+ }
16
+ // NEW: Create a new object that matches the 'PhotoProps' interface.
17
+ // This explicitly tells TypeScript that all required fields are present.
18
+ const imageItemPhotoProps = {
19
+ key: photo.key,
20
+ src: photo.src,
21
+ width: photo.width,
22
+ height: photo.height,
23
+ alt: photo.alt,
24
+ // We pass the original photo object in the generic 'photo' property
25
+ // in case ImageItem needs it for other operations.
26
+ photo: photo,
27
+ };
28
+ return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index,
29
+ // UPDATED: Pass the new, correctly-typed object.
30
+ photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery, onPreview: onPreview(photo), onSelectedMode: onSelectedMode, onToggleSelect: onToggleSelect(photo), enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame, data: photo }) }, photo.key));
31
+ }) }) }));
32
32
  };
33
33
  export default AlbumImageGallery;
@@ -140,7 +140,7 @@ const GalleryImageItem = (props) => {
140
140
  margin,
141
141
  props.isSelected,
142
142
  ]);
143
- return (_jsxs(Box, { id: "Box_image", className: "image", children: [!props.isHiddenGallery &&
143
+ return (_jsxs(Box, { id: "Box_image", sx: boxOuterSx, className: "image", children: [!props.isHiddenGallery &&
144
144
  (hasAdjustments && isSelected ? (_jsx(Box, { color: "primary.dark1", onClick: handleImageSelectedIconClick, sx: {
145
145
  position: "absolute",
146
146
  // width: "19px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yogiswara/honcho-editor-ui",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "A complete UI component library for the Honcho photo editor.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",