@yogiswara/honcho-editor-ui 2.0.7 → 2.1.0
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.
- package/dist/color.d.ts +9 -0
- package/dist/color.js +9 -0
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +18 -0
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +32 -52
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +28 -0
- package/dist/components/editor/GalleryAlbum/ImageItem.js +165 -246
- package/dist/components/editor/svg/Tick.d.ts +2 -0
- package/dist/components/editor/svg/Tick.js +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -1
package/dist/color.d.ts
ADDED
package/dist/color.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { GallerySetup } from "../../../hooks/editor/type";
|
|
3
|
+
import { AdjustmentValues } from "../../../lib/editor/honcho-editor";
|
|
4
|
+
interface PhotoData extends GallerySetup {
|
|
5
|
+
adjustments?: Partial<AdjustmentValues>;
|
|
6
|
+
frame?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ImageGalleryProps {
|
|
9
|
+
imageCollection: PhotoData[];
|
|
10
|
+
isSelectedMode: boolean;
|
|
11
|
+
isHiddenGallery: boolean;
|
|
12
|
+
enableEditor: boolean;
|
|
13
|
+
onPreview: (photo: PhotoData) => () => void;
|
|
14
|
+
onSelectedMode: () => void;
|
|
15
|
+
onToggleSelect: (photo: PhotoData) => () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const AlbumImageGallery: React.FC<ImageGalleryProps>;
|
|
18
|
+
export default AlbumImageGallery;
|
|
@@ -1,52 +1,32 @@
|
|
|
1
|
-
"use
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// index={index}
|
|
34
|
-
// photo={photo}
|
|
35
|
-
// direction="column"
|
|
36
|
-
// isFullScreenMode={false}
|
|
37
|
-
// isSelected={photo.isSelected}
|
|
38
|
-
// isSelectedMode={isSelectedMode}
|
|
39
|
-
// isHiddenGallery={isHiddenGallery}
|
|
40
|
-
// onPreview={onPreview(photo)}
|
|
41
|
-
// onSelectedMode={onSelectedMode}
|
|
42
|
-
// onToggleSelect={onToggleSelect(photo)}
|
|
43
|
-
// frame={photo.frame}
|
|
44
|
-
// />
|
|
45
|
-
// </Box>
|
|
46
|
-
// ))}
|
|
47
|
-
// </Masonry>
|
|
48
|
-
// </ResponsiveMasonry>
|
|
49
|
-
// </section>
|
|
50
|
-
// );
|
|
51
|
-
// };
|
|
52
|
-
// export default AlbumImageGallery;
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
|
|
5
|
+
import GalleryImageItem from "./ImageItem";
|
|
6
|
+
const AlbumImageGallery = (props) => {
|
|
7
|
+
const { imageCollection, isSelectedMode, isHiddenGallery, enableEditor, // Destructure the new prop
|
|
8
|
+
onPreview, onSelectedMode, onToggleSelect, } = props;
|
|
9
|
+
return (_jsx("section", { children: _jsx(ResponsiveMasonry, { columnsCountBreakPoints: { 750: 2, 900: 4 }, children: _jsx(Masonry, { children: imageCollection.map((photo, index) => {
|
|
10
|
+
// This guard clause is still important for runtime safety.
|
|
11
|
+
if (!photo.key || !photo.src) {
|
|
12
|
+
console.warn("Skipping item without a key or src:", photo);
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
// NEW: Create a new object that matches the 'PhotoProps' interface.
|
|
16
|
+
// This explicitly tells TypeScript that all required fields are present.
|
|
17
|
+
const imageItemPhotoProps = {
|
|
18
|
+
key: photo.key,
|
|
19
|
+
src: photo.src,
|
|
20
|
+
width: photo.width,
|
|
21
|
+
height: photo.height,
|
|
22
|
+
alt: photo.alt,
|
|
23
|
+
// We pass the original photo object in the generic 'photo' property
|
|
24
|
+
// in case ImageItem needs it for other operations.
|
|
25
|
+
photo: photo,
|
|
26
|
+
};
|
|
27
|
+
return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index,
|
|
28
|
+
// UPDATED: Pass the new, correctly-typed object.
|
|
29
|
+
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 }) }, photo.key));
|
|
30
|
+
}) }) }) }));
|
|
31
|
+
};
|
|
32
|
+
export default AlbumImageGallery;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AdjustmentValues } from "../../../lib/editor/honcho-editor";
|
|
2
|
+
import { GallerySetup } from "../../../hooks/editor/type";
|
|
3
|
+
interface PhotoProps<T> {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
key: string;
|
|
9
|
+
photo?: T;
|
|
10
|
+
}
|
|
11
|
+
interface Props {
|
|
12
|
+
margin?: any;
|
|
13
|
+
index: number;
|
|
14
|
+
photo: PhotoProps<GallerySetup>;
|
|
15
|
+
direction: "row" | "column";
|
|
16
|
+
isSelectedMode: boolean;
|
|
17
|
+
isFullScreenMode: boolean;
|
|
18
|
+
isSelected?: boolean;
|
|
19
|
+
isHiddenGallery: boolean;
|
|
20
|
+
onToggleSelect: () => void;
|
|
21
|
+
onPreview: () => void;
|
|
22
|
+
onSelectedMode: () => void;
|
|
23
|
+
enableEditor?: boolean;
|
|
24
|
+
adjustments?: Partial<AdjustmentValues>;
|
|
25
|
+
frame?: string | null;
|
|
26
|
+
}
|
|
27
|
+
declare const GalleryImageItem: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export default GalleryImageItem;
|
|
@@ -1,246 +1,165 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// margin,
|
|
167
|
-
// width: "100%",
|
|
168
|
-
// ...commonStyle,
|
|
169
|
-
// };
|
|
170
|
-
// } else {
|
|
171
|
-
// if (props.isSelected) {
|
|
172
|
-
// return { ...boxSelected };
|
|
173
|
-
// } else {
|
|
174
|
-
// return { ...boxNotSelected };
|
|
175
|
-
// }
|
|
176
|
-
// }
|
|
177
|
-
// }, [
|
|
178
|
-
// props.isFullScreenMode,
|
|
179
|
-
// photo.height,
|
|
180
|
-
// photo.width,
|
|
181
|
-
// commonStyle,
|
|
182
|
-
// boxSelected,
|
|
183
|
-
// boxNotSelected,
|
|
184
|
-
// margin,
|
|
185
|
-
// props.isSelected,
|
|
186
|
-
// ]);
|
|
187
|
-
// return (
|
|
188
|
-
// <Box id={"Box_image"} key={photo.key} sx={boxOuterSx} className={"image"}>
|
|
189
|
-
// {!props.isHiddenGallery &&
|
|
190
|
-
// (props.isSelected ? (
|
|
191
|
-
// <Box
|
|
192
|
-
// color={"primary.dark1"}
|
|
193
|
-
// onClick={handleImageSelectedIconClick}
|
|
194
|
-
// sx={{
|
|
195
|
-
// position: "absolute",
|
|
196
|
-
// width: "19px",
|
|
197
|
-
// height: "19px",
|
|
198
|
-
// zIndex: "2",
|
|
199
|
-
// left: "5px",
|
|
200
|
-
// top: "5px",
|
|
201
|
-
// borderRadius: { xs: "50%", sm: 0 },
|
|
202
|
-
// }}
|
|
203
|
-
// className={"checkbox"}
|
|
204
|
-
// >
|
|
205
|
-
// <CustomTickIcon />
|
|
206
|
-
// </Box>
|
|
207
|
-
// ) : (
|
|
208
|
-
// <Box
|
|
209
|
-
// color={"neutral.light2"}
|
|
210
|
-
// onClick={handleImageSelectedIconClick}
|
|
211
|
-
// sx={{
|
|
212
|
-
// position: "absolute",
|
|
213
|
-
// width: "19px",
|
|
214
|
-
// height: "19px",
|
|
215
|
-
// zIndex: "1",
|
|
216
|
-
// left: "5px",
|
|
217
|
-
// top: "5px",
|
|
218
|
-
// display: "none",
|
|
219
|
-
// visibility: {
|
|
220
|
-
// xs: props.isSelectedMode ? "visible" : "hidden",
|
|
221
|
-
// sm: "visible",
|
|
222
|
-
// },
|
|
223
|
-
// }}
|
|
224
|
-
// className={"checkbox"}
|
|
225
|
-
// >
|
|
226
|
-
// <TickCircle
|
|
227
|
-
// style={{ width: "24px", height: "24px" }}
|
|
228
|
-
// color="white"
|
|
229
|
-
// />
|
|
230
|
-
// </Box>
|
|
231
|
-
// ))}
|
|
232
|
-
// <CardMedia
|
|
233
|
-
// id="card_media"
|
|
234
|
-
// component="img"
|
|
235
|
-
// className="image"
|
|
236
|
-
// loading="lazy"
|
|
237
|
-
// alt={photo.alt}
|
|
238
|
-
// sx={imageSx}
|
|
239
|
-
// src={processedImageSrc}
|
|
240
|
-
// width="100%"
|
|
241
|
-
// onClick={handleImageClick}
|
|
242
|
-
// />
|
|
243
|
-
// </Box>
|
|
244
|
-
// );
|
|
245
|
-
// };
|
|
246
|
-
// export default ImageItem;
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Box, CardMedia, useTheme } from "@mui/material";
|
|
4
|
+
import { TickCircle } from "iconsax-react";
|
|
5
|
+
import CustomTickIcon from "../svg/Tick";
|
|
6
|
+
import { neutral } from "../../../color";
|
|
7
|
+
const initialAdjustments = {
|
|
8
|
+
temperature: 0, tint: 0, saturation: 0, vibrance: 0, exposure: 0, contrast: 0,
|
|
9
|
+
highlights: 0, shadows: 0, whites: 0, blacks: 0, clarity: 0, sharpness: 0,
|
|
10
|
+
};
|
|
11
|
+
const imgStyle = {
|
|
12
|
+
transition: "transform .135s cubic-bezier(0.0,0.0,0.2,1),opacity linear .15s",
|
|
13
|
+
width: "100%",
|
|
14
|
+
// objectFit: "contain",
|
|
15
|
+
//height: "100%",
|
|
16
|
+
};
|
|
17
|
+
const selectedImgStyle = {
|
|
18
|
+
borderRadius: "8px",
|
|
19
|
+
transform: "translateZ(0px) scale3d(1, 1, 1)",
|
|
20
|
+
// transition: "transform .135s cubic-bezier(0.0,0.0,0.2,1),opacity linear .15s"
|
|
21
|
+
};
|
|
22
|
+
const GalleryImageItem = (props) => {
|
|
23
|
+
const { photo, margin, adjustments, isSelected = false } = props;
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
const hasAdjustments = useMemo(() => {
|
|
26
|
+
if (!adjustments)
|
|
27
|
+
return false;
|
|
28
|
+
return Object.keys(initialAdjustments).some(key => adjustments[key] !== initialAdjustments[key]);
|
|
29
|
+
}, [adjustments]);
|
|
30
|
+
const styleHiddenGallery = useMemo(() => {
|
|
31
|
+
if (props.isHiddenGallery) {
|
|
32
|
+
return { filter: "blur(20px)", pointerEvents: "none" };
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
}, [props.isHiddenGallery]);
|
|
38
|
+
const commonStyle = useMemo(() => {
|
|
39
|
+
return {
|
|
40
|
+
backgroundColor: neutral.white,
|
|
41
|
+
overflow: "hidden",
|
|
42
|
+
position: "relative",
|
|
43
|
+
width: "100%",
|
|
44
|
+
aspectRatio: `${photo.width}/${photo.height}`,
|
|
45
|
+
};
|
|
46
|
+
}, [props.direction, props.photo]);
|
|
47
|
+
const handleImageClick = () => {
|
|
48
|
+
console.debug({
|
|
49
|
+
isFullMode: props.isFullScreenMode,
|
|
50
|
+
isShowGallery: props.isHiddenGallery,
|
|
51
|
+
}, "handleImageClick");
|
|
52
|
+
if (!props.isFullScreenMode && !props.isHiddenGallery) {
|
|
53
|
+
if (props.isSelectedMode) {
|
|
54
|
+
console.debug("handleImageClick with toggle select");
|
|
55
|
+
props.onToggleSelect();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
console.debug("handleImageClick with preview");
|
|
59
|
+
props.onPreview();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleImageSelectedIconClick = () => {
|
|
64
|
+
console.debug("handleImageSelectedIconClick");
|
|
65
|
+
if (!props.isFullScreenMode) {
|
|
66
|
+
if (!props.isSelectedMode) {
|
|
67
|
+
props.onSelectedMode();
|
|
68
|
+
}
|
|
69
|
+
props.onToggleSelect();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const imageSx = useMemo(() => {
|
|
73
|
+
const baseStyles = isSelected ? {
|
|
74
|
+
...imgStyle,
|
|
75
|
+
...selectedImgStyle,
|
|
76
|
+
...styleHiddenGallery,
|
|
77
|
+
aspectRatio: `${photo.width}/${photo.height}`,
|
|
78
|
+
} : {
|
|
79
|
+
...imgStyle,
|
|
80
|
+
...styleHiddenGallery,
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
...baseStyles,
|
|
84
|
+
opacity: 1, // Previously depended on isProcessingComplete
|
|
85
|
+
transition: 'opacity 0.3s ease-in-out',
|
|
86
|
+
};
|
|
87
|
+
}, [isSelected, styleHiddenGallery, photo.width, photo.height]);
|
|
88
|
+
const boxNotSelected = useMemo(() => ({
|
|
89
|
+
margin,
|
|
90
|
+
// height: photo.height,
|
|
91
|
+
...commonStyle,
|
|
92
|
+
transition: ".3s",
|
|
93
|
+
// "&:hover": { padding: "12px", backgroundColor: "primary.light1" },
|
|
94
|
+
"&:-webkit-transition": { transition: ".3s" },
|
|
95
|
+
"&:hover > .checkbox": { display: props.isHiddenGallery ? "" : "block" },
|
|
96
|
+
cursor: props.isFullScreenMode || props.isHiddenGallery ? "inherit" : "pointer",
|
|
97
|
+
backgroundColor: props.isFullScreenMode
|
|
98
|
+
? "rgba(0,0,0,0.1)"
|
|
99
|
+
: "transparent",
|
|
100
|
+
}), [margin, commonStyle, props.isHiddenGallery, props.isFullScreenMode]);
|
|
101
|
+
const boxSelected = useMemo(() => ({
|
|
102
|
+
margin,
|
|
103
|
+
// height: photo.height,
|
|
104
|
+
...commonStyle,
|
|
105
|
+
cursor: props.isFullScreenMode || props.isHiddenGallery ? "inherit" : "pointer",
|
|
106
|
+
transition: ".3s",
|
|
107
|
+
"&:-webkit-transition": { transition: ".3s" },
|
|
108
|
+
padding: { xs: "13px 12px", sm: "21.31px 25.56px 21.32px 27.68px" },
|
|
109
|
+
backgroundColor: theme.palette.light["Surface-Variant-2"],
|
|
110
|
+
}), [
|
|
111
|
+
margin,
|
|
112
|
+
commonStyle,
|
|
113
|
+
theme.palette.light,
|
|
114
|
+
props.isFullScreenMode,
|
|
115
|
+
props.isHiddenGallery,
|
|
116
|
+
]);
|
|
117
|
+
const boxOuterSx = useMemo(() => {
|
|
118
|
+
if (props.isFullScreenMode) {
|
|
119
|
+
return {
|
|
120
|
+
margin,
|
|
121
|
+
...commonStyle,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (props.isSelected) {
|
|
126
|
+
return { ...boxSelected };
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return { ...boxNotSelected };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, [
|
|
133
|
+
props.isFullScreenMode,
|
|
134
|
+
photo.height,
|
|
135
|
+
photo.width,
|
|
136
|
+
commonStyle,
|
|
137
|
+
boxSelected,
|
|
138
|
+
boxNotSelected,
|
|
139
|
+
margin,
|
|
140
|
+
props.isSelected,
|
|
141
|
+
]);
|
|
142
|
+
return (_jsxs(Box, { id: "Box_image", sx: boxOuterSx, className: "image", children: [!props.isHiddenGallery &&
|
|
143
|
+
(hasAdjustments && isSelected ? (_jsx(Box, { color: "primary.dark1", onClick: handleImageSelectedIconClick, sx: {
|
|
144
|
+
position: "absolute",
|
|
145
|
+
width: "19px",
|
|
146
|
+
height: "19px",
|
|
147
|
+
zIndex: "2",
|
|
148
|
+
left: "5px",
|
|
149
|
+
top: "5px",
|
|
150
|
+
borderRadius: { xs: "50%", sm: 0 },
|
|
151
|
+
}, className: "checkbox", children: _jsx(CustomTickIcon, {}) })) : (_jsx(Box, { color: "neutral.light2", onClick: handleImageSelectedIconClick, sx: {
|
|
152
|
+
position: "absolute",
|
|
153
|
+
width: "19px",
|
|
154
|
+
height: "19px",
|
|
155
|
+
zIndex: "1",
|
|
156
|
+
left: "5px",
|
|
157
|
+
top: "5px",
|
|
158
|
+
display: "none",
|
|
159
|
+
visibility: {
|
|
160
|
+
xs: props.isSelectedMode ? "visible" : "hidden",
|
|
161
|
+
sm: "visible",
|
|
162
|
+
},
|
|
163
|
+
}, className: "checkbox", children: _jsx(TickCircle, { style: { width: "24px", height: "24px" }, color: "white" }) }))), _jsx(CardMedia, { id: "card_media", component: "img", className: "image", loading: "lazy", alt: photo.alt ?? "Image", sx: imageSx, src: photo.src, width: "100%", onClick: handleImageClick })] }, photo.key));
|
|
164
|
+
};
|
|
165
|
+
export default GalleryImageItem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon } from "@mui/material";
|
|
3
|
+
const Tick = () => {
|
|
4
|
+
return (_jsx(SvgIcon, { style: { width: "29px", height: "29px" }, children: _jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "5", y: "5", width: "22", height: "22", rx: "11", fill: "black" }), _jsx("path", { d: "M20 13L14.5 18.5L12 16", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }) }));
|
|
5
|
+
};
|
|
6
|
+
export default Tick;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
|
20
20
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
21
21
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
22
22
|
export { useHonchoEditorBulk } from './hooks/editor/useHonchoEditorBulk';
|
|
23
|
+
export { default as AlbumImageGallery } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
24
|
+
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
23
25
|
export { useAdjustmentHistory, type UseAdjustmentHistoryReturn, type HistoryInfo, type HistoryActions, type HistoryConfig } from './hooks/useAdjustmentHistory';
|
|
24
26
|
export { useAdjustmentHistoryBatch, type UseAdjustmentHistoryBatchReturn, type BatchAdjustmentState, type ImageAdjustmentConfig, type BatchHistoryInfo, type BatchHistoryActions, type BatchHistoryConfig } from './hooks/useAdjustmentHistoryBatch';
|
|
25
27
|
export { default as useColors } from './themes/colors';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,8 @@ export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
|
18
18
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
19
19
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
20
20
|
export { useHonchoEditorBulk } from './hooks/editor/useHonchoEditorBulk';
|
|
21
|
+
export { default as AlbumImageGallery } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
22
|
+
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
21
23
|
// --- History Hooks ---
|
|
22
24
|
export { useAdjustmentHistory } from './hooks/useAdjustmentHistory';
|
|
23
25
|
export { useAdjustmentHistoryBatch } from './hooks/useAdjustmentHistoryBatch';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yogiswara/honcho-editor-ui",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"keywords": [],
|
|
50
50
|
"author": "",
|
|
51
51
|
"dependencies": {
|
|
52
|
+
"iconsax-react": "^0.0.8",
|
|
52
53
|
"react-responsive-masonry": "^2.7.1"
|
|
53
54
|
}
|
|
54
55
|
}
|