@yogiswara/honcho-editor-ui 2.9.1 → 2.9.2
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.
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
|
|
5
|
-
import GalleryImageItem from "./ImageItem";
|
|
3
|
+
import { Stack } from "@mui/material";
|
|
6
4
|
export const AlbumImageGallery = (props) => {
|
|
7
5
|
const { imageCollection, onToggleSelect } = props;
|
|
8
|
-
return (_jsx(Stack, { sx: { width: '100%', maxHeight: '100%', overflowY: 'auto' }
|
|
9
|
-
// This guard clause is still important for runtime safety.
|
|
10
|
-
if (!photo.key || !photo.src) {
|
|
11
|
-
console.warn("Skipping item without a key or src:", photo);
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
// NEW: Create a new object that matches the 'PhotoProps' interface.
|
|
15
|
-
// This explicitly tells TypeScript that all required fields are present.
|
|
16
|
-
const imageItemPhotoProps = {
|
|
17
|
-
key: photo.key,
|
|
18
|
-
src: photo.src,
|
|
19
|
-
width: photo.width,
|
|
20
|
-
height: photo.height,
|
|
21
|
-
alt: photo.alt,
|
|
22
|
-
// We pass the original photo object in the generic 'photo' property
|
|
23
|
-
// in case ImageItem needs it for other operations.
|
|
24
|
-
photo: photo,
|
|
25
|
-
};
|
|
26
|
-
return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index, direction: "column", onToggleSelect: () => { onToggleSelect(photo); }, data: photo }) }, photo.key));
|
|
27
|
-
}) }) }) }));
|
|
6
|
+
return (_jsx(Stack, { sx: { width: '100%', maxHeight: '100%', overflowY: 'auto' } }));
|
|
28
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yogiswara/honcho-editor-ui",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
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",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"@types/node": "^20",
|
|
36
36
|
"@types/react": "^18",
|
|
37
37
|
"@types/react-dom": "^18",
|
|
38
|
-
"react-responsive-masonry": "2.2.2",
|
|
39
38
|
"jest": "^30.0.5",
|
|
40
39
|
"jest-environment-jsdom": "^30.0.5",
|
|
41
40
|
"next": "^13.5.6 || ^14.0.0",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"keywords": [],
|
|
50
49
|
"author": "",
|
|
51
50
|
"dependencies": {
|
|
52
|
-
"iconsax-react": "^0.0.8"
|
|
53
|
-
"react-responsive-masonry": "^2.7.1"
|
|
51
|
+
"iconsax-react": "^0.0.8"
|
|
54
52
|
}
|
|
55
53
|
}
|