@yogiswara/honcho-editor-ui 3.6.2 → 3.6.4
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/components/editor/HImageEditorSkeleton.d.ts +1 -0
- package/dist/components/editor/HImageEditorSkeleton.js +71 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +55 -55
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -10
- package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -81
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HImageEditorSkeleton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Paper, Skeleton, Box } from "@mui/material";
|
|
3
|
+
import { alpha } from '@mui/material/styles';
|
|
4
|
+
import useColors from '../../themes/colors';
|
|
5
|
+
import useIsMobile from "../../utils/isMobile";
|
|
6
|
+
export default function HImageEditorSkeleton() {
|
|
7
|
+
const colors = useColors();
|
|
8
|
+
const isMobile = useIsMobile();
|
|
9
|
+
return (_jsxs(Stack, { direction: "column", justifyContent: "center", sx: {
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: isMobile ? '100%' : '100vh',
|
|
12
|
+
background: 'black',
|
|
13
|
+
pl: isMobile ? 0 : "24px",
|
|
14
|
+
pr: isMobile ? 0 : "0px"
|
|
15
|
+
}, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", width: "100%", sx: {
|
|
16
|
+
pr: !isMobile ? "24px" : "6px",
|
|
17
|
+
pt: !isMobile ? "20px" : "15px",
|
|
18
|
+
pb: "12px"
|
|
19
|
+
}, children: [_jsx(Stack, { direction: "row", justifyContent: "flex-start", sx: { pl: !isMobile ? "0px" : "14px" } }), _jsx(Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 0.1, children: _jsx(Skeleton, { variant: "rounded", width: "131px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.1) } }) })] }), _jsxs(Stack, { direction: isMobile ? "column" : "row", justifyContent: "space-between", alignItems: "stretch", sx: { width: '100%', flexGrow: 1, overflow: 'hidden', height: '100dvh' }, children: [_jsx(Box, { sx: {
|
|
20
|
+
flexGrow: 1,
|
|
21
|
+
display: 'flex',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
position: 'relative',
|
|
25
|
+
p: isMobile ? 2 : 4,
|
|
26
|
+
} }), !isMobile && (_jsx(Paper, { elevation: 3, sx: {
|
|
27
|
+
position: 'inherit',
|
|
28
|
+
right: '40px',
|
|
29
|
+
top: '55px',
|
|
30
|
+
width: '250px',
|
|
31
|
+
pt: '12px',
|
|
32
|
+
height: 'calc(100vh - 70px)',
|
|
33
|
+
zIndex: 1200,
|
|
34
|
+
backgroundColor: '#000000',
|
|
35
|
+
overflow: 'hidden',
|
|
36
|
+
}, children: _jsxs(Stack, { direction: "row", sx: { height: '100%', p: "0px" }, children: [_jsxs(Stack, { direction: "column", sx: { height: '95%' }, children: [_jsx(Box, { sx: { display: 'flex', flexDirection: 'column', p: "0px", pt: "8px" }, children: _jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', py: "6px", gap: "8px" }, children: [_jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.1) } }), _jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.07) } })] }) }), _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', p: "0px", pt: "8px" }, children: _jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', py: "6px", gap: "8px" }, children: [_jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.1) } }), _jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.07) } })] }) }), _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', p: "0px", pt: "8px" }, children: _jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', py: "6px", gap: "8px" }, children: [_jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.1) } }), _jsx(Skeleton, { variant: "rounded", width: "178px", height: "18px", sx: { bgcolor: alpha(colors.background, 0.7) } })] }) })] }), _jsxs(Stack, { justifyContent: "flex-start",
|
|
37
|
+
// spacing={"15px"}
|
|
38
|
+
sx: {
|
|
39
|
+
width: '10px',
|
|
40
|
+
flexShrink: 0,
|
|
41
|
+
pt: "0px",
|
|
42
|
+
pl: "9px",
|
|
43
|
+
}, children: [_jsx(Box, { sx: {
|
|
44
|
+
width: "50px",
|
|
45
|
+
height: "52px",
|
|
46
|
+
py: "17px",
|
|
47
|
+
px: "16px",
|
|
48
|
+
}, children: _jsx(Skeleton, { variant: "circular", width: 18, height: 18, sx: { bgcolor: alpha(colors.background, 0.1) } }) }), _jsx(Box, { sx: {
|
|
49
|
+
width: "50px",
|
|
50
|
+
height: "52px",
|
|
51
|
+
pt: "30px",
|
|
52
|
+
pb: "17px",
|
|
53
|
+
px: "16px",
|
|
54
|
+
}, children: _jsx(Skeleton, { variant: "circular", width: 18, height: 18, sx: { bgcolor: alpha(colors.background, 0.1) } }) })] })] }) })), isMobile && (_jsx(Paper, { elevation: 0, sx: {
|
|
55
|
+
position: 'fixed',
|
|
56
|
+
bottom: 0,
|
|
57
|
+
left: 0,
|
|
58
|
+
right: 0,
|
|
59
|
+
zIndex: 1300,
|
|
60
|
+
backgroundColor: 'transparent',
|
|
61
|
+
}, children: _jsxs(Paper, { sx: { backgroundColor: colors.onBackground, borderRadius: "0px" }, elevation: 3, children: [_jsx(Stack, { direction: "row", justifyContent: "center", alignItems: "center", sx: {
|
|
62
|
+
py: "12px",
|
|
63
|
+
// px: "143px",
|
|
64
|
+
gap: "10px"
|
|
65
|
+
}, children: _jsx(Skeleton, { variant: "rounded", width: "156px", height: 18, sx: { bgcolor: alpha(colors.background, 0.1) } }) }), _jsx(Stack, { direction: "row", justifyContent: "center", alignItems: "center", sx: {
|
|
66
|
+
pt: "6px",
|
|
67
|
+
pb: "12px",
|
|
68
|
+
px: "16px",
|
|
69
|
+
gap: "24px"
|
|
70
|
+
}, children: _jsx(Skeleton, { variant: "rounded", width: 74, height: 18, sx: { bgcolor: alpha(colors.background, 0.1) } }) })] }) }))] })] }));
|
|
71
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as HImageEditorMobile } from './components/editor/HImageEditorM
|
|
|
16
16
|
export { default as HImageEditorDesktop } from './components/editor/HImageEditorDekstop';
|
|
17
17
|
export { default as HImageEditorBulkDekstop } from './components/editor/HImageEditorBulkDekstop';
|
|
18
18
|
export { default as HImageEditorBulkMobile } from './components/editor/HImageEditorBulkMobile';
|
|
19
|
+
export { default as HImageEditorSkeleton } from './components/editor/HImageEditorSkeleton';
|
|
19
20
|
export { default as HBulkAccordionColorAdjustment } from './components/editor/HBulkAccordionColorAdjustment';
|
|
20
21
|
export { default as HBulkPreset } from './components/editor/HBulkPreset';
|
|
21
22
|
export { default as HModalEditorDekstop } from './components/editor/HModalEditorDekstop';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { default as HImageEditorMobile } from './components/editor/HImageEditorM
|
|
|
18
18
|
export { default as HImageEditorDesktop } from './components/editor/HImageEditorDekstop';
|
|
19
19
|
export { default as HImageEditorBulkDekstop } from './components/editor/HImageEditorBulkDekstop';
|
|
20
20
|
export { default as HImageEditorBulkMobile } from './components/editor/HImageEditorBulkMobile';
|
|
21
|
+
export { default as HImageEditorSkeleton } from './components/editor/HImageEditorSkeleton';
|
|
21
22
|
export { default as HBulkAccordionColorAdjustment } from './components/editor/HBulkAccordionColorAdjustment';
|
|
22
23
|
export { default as HBulkPreset } from './components/editor/HBulkPreset';
|
|
23
24
|
export { default as HModalEditorDekstop } from './components/editor/HModalEditorDekstop';
|
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@yogiswara/honcho-editor-ui",
|
|
3
|
-
"version": "3.6.
|
|
4
|
-
"description": "A complete UI component library for the Honcho photo editor.",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"module": "./dist/index.mjs",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"public"
|
|
11
|
-
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsc",
|
|
14
|
-
"test": "jest",
|
|
15
|
-
"test:watch": "jest --watch",
|
|
16
|
-
"test:coverage": "jest --coverage"
|
|
17
|
-
},
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"@emotion/react": "^11.11.1",
|
|
20
|
-
"@emotion/styled": "^11.11.0",
|
|
21
|
-
"@mui/icons-material": "^6.1.2",
|
|
22
|
-
"@mui/material": "^6.1.2",
|
|
23
|
-
"next": "^13.5.6 || ^14.0.0",
|
|
24
|
-
"react": "^18",
|
|
25
|
-
"react-dom": "^18"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@emotion/react": "^11.11.1",
|
|
29
|
-
"@emotion/styled": "^11.11.0",
|
|
30
|
-
"@mui/icons-material": "^6.1.2",
|
|
31
|
-
"@mui/material": "^6.1.2",
|
|
32
|
-
"@testing-library/jest-dom": "^6.6.4",
|
|
33
|
-
"@testing-library/react": "^16.3.0",
|
|
34
|
-
"@types/jest": "^30.0.0",
|
|
35
|
-
"@types/node": "^20",
|
|
36
|
-
"@types/react": "^18",
|
|
37
|
-
"@types/react-dom": "^18",
|
|
38
|
-
"jest": "^30.0.5",
|
|
39
|
-
"jest-environment-jsdom": "^30.0.5",
|
|
40
|
-
"next": "^13.5.6 || ^14.0.0",
|
|
41
|
-
"react": "^18",
|
|
42
|
-
"react-dom": "^18",
|
|
43
|
-
"ts-jest": "^29.4.1",
|
|
44
|
-
"tsup": "^8.0.0",
|
|
45
|
-
"typescript": "^5"
|
|
46
|
-
},
|
|
47
|
-
"license": "ISC",
|
|
48
|
-
"keywords": [],
|
|
49
|
-
"author": "",
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@egjs/react-infinitegrid": "^4.12.0",
|
|
52
|
-
"iconsax-react": "^0.0.8",
|
|
53
|
-
"pino": "^9.9.5"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@yogiswara/honcho-editor-ui",
|
|
3
|
+
"version": "3.6.4",
|
|
4
|
+
"description": "A complete UI component library for the Honcho photo editor.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"public"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"test:coverage": "jest --coverage"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@emotion/react": "^11.11.1",
|
|
20
|
+
"@emotion/styled": "^11.11.0",
|
|
21
|
+
"@mui/icons-material": "^6.1.2",
|
|
22
|
+
"@mui/material": "^6.1.2",
|
|
23
|
+
"next": "^13.5.6 || ^14.0.0",
|
|
24
|
+
"react": "^18",
|
|
25
|
+
"react-dom": "^18"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@emotion/react": "^11.11.1",
|
|
29
|
+
"@emotion/styled": "^11.11.0",
|
|
30
|
+
"@mui/icons-material": "^6.1.2",
|
|
31
|
+
"@mui/material": "^6.1.2",
|
|
32
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
33
|
+
"@testing-library/react": "^16.3.0",
|
|
34
|
+
"@types/jest": "^30.0.0",
|
|
35
|
+
"@types/node": "^20",
|
|
36
|
+
"@types/react": "^18",
|
|
37
|
+
"@types/react-dom": "^18",
|
|
38
|
+
"jest": "^30.0.5",
|
|
39
|
+
"jest-environment-jsdom": "^30.0.5",
|
|
40
|
+
"next": "^13.5.6 || ^14.0.0",
|
|
41
|
+
"react": "^18",
|
|
42
|
+
"react-dom": "^18",
|
|
43
|
+
"ts-jest": "^29.4.1",
|
|
44
|
+
"tsup": "^8.0.0",
|
|
45
|
+
"typescript": "^5"
|
|
46
|
+
},
|
|
47
|
+
"license": "ISC",
|
|
48
|
+
"keywords": [],
|
|
49
|
+
"author": "",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@egjs/react-infinitegrid": "^4.12.0",
|
|
52
|
+
"iconsax-react": "^0.0.8",
|
|
53
|
+
"pino": "^9.9.5"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PhotoData } from "../../../hooks/editor/useHonchoEditorBulk";
|
|
2
|
-
interface Props {
|
|
3
|
-
margin?: any;
|
|
4
|
-
index: number;
|
|
5
|
-
data: PhotoData;
|
|
6
|
-
direction: "row" | "column";
|
|
7
|
-
onToggleSelect: () => void;
|
|
8
|
-
}
|
|
9
|
-
declare const GalleryImageItem: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default GalleryImageItem;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { Box, CardMedia, useTheme } from "@mui/material";
|
|
4
|
-
import { neutral } from "../../../color";
|
|
5
|
-
const initialAdjustments = {
|
|
6
|
-
temperature: 0, tint: 0, saturation: 0, vibrance: 0, exposure: 0, contrast: 0,
|
|
7
|
-
highlights: 0, shadows: 0, whites: 0, blacks: 0, clarity: 0, sharpness: 0,
|
|
8
|
-
};
|
|
9
|
-
const imgStyle = {
|
|
10
|
-
transition: "transform .135s cubic-bezier(0.0,0.0,0.2,1),opacity linear .15s",
|
|
11
|
-
width: "100%",
|
|
12
|
-
// objectFit: "contain",
|
|
13
|
-
//height: "100%",
|
|
14
|
-
};
|
|
15
|
-
const selectedImgStyle = {
|
|
16
|
-
borderRadius: "8px",
|
|
17
|
-
transform: "translateZ(0px) scale3d(1, 1, 1)",
|
|
18
|
-
// transition: "transform .135s cubic-bezier(0.0,0.0,0.2,1),opacity linear .15s"
|
|
19
|
-
};
|
|
20
|
-
const GalleryImageItem = (props) => {
|
|
21
|
-
const { margin, data } = props;
|
|
22
|
-
const theme = useTheme();
|
|
23
|
-
const imageData = data;
|
|
24
|
-
const commonStyle = useMemo(() => {
|
|
25
|
-
return {
|
|
26
|
-
backgroundColor: neutral.white,
|
|
27
|
-
overflow: "hidden",
|
|
28
|
-
position: "relative",
|
|
29
|
-
width: "100%",
|
|
30
|
-
aspectRatio: `${imageData.width}/${imageData.height}`,
|
|
31
|
-
};
|
|
32
|
-
}, [props.direction, imageData]);
|
|
33
|
-
const imageSx = useMemo(() => {
|
|
34
|
-
const baseStyles = imageData.isSelected ? {
|
|
35
|
-
...imgStyle,
|
|
36
|
-
...selectedImgStyle,
|
|
37
|
-
aspectRatio: `${imageData.width}/${imageData.height}`,
|
|
38
|
-
} : {
|
|
39
|
-
...imgStyle,
|
|
40
|
-
};
|
|
41
|
-
return {
|
|
42
|
-
...baseStyles,
|
|
43
|
-
opacity: 1, // Previously depended on isProcessingComplete
|
|
44
|
-
transition: 'opacity 0.3s ease-in-out',
|
|
45
|
-
};
|
|
46
|
-
}, [props.data.isSelected, imageData.width, imageData.height]);
|
|
47
|
-
const boxNotSelected = useMemo(() => ({
|
|
48
|
-
margin,
|
|
49
|
-
// height: photo.height,
|
|
50
|
-
...commonStyle,
|
|
51
|
-
transition: ".3s",
|
|
52
|
-
// "&:hover": { padding: "12px", backgroundColor: "primary.light1" },
|
|
53
|
-
"&:-webkit-transition": { transition: ".3s" },
|
|
54
|
-
"&:hover > .checkbox": { display: "block" },
|
|
55
|
-
cursor: "pointer",
|
|
56
|
-
backgroundColor: "transparent",
|
|
57
|
-
}), [margin, commonStyle]);
|
|
58
|
-
const boxSelected = useMemo(() => ({
|
|
59
|
-
margin,
|
|
60
|
-
// height: photo.height,
|
|
61
|
-
...commonStyle,
|
|
62
|
-
cursor: "pointer",
|
|
63
|
-
transition: ".3s",
|
|
64
|
-
"&:-webkit-transition": { transition: ".3s" },
|
|
65
|
-
padding: { xs: "13px 12px", sm: "21.31px 25.56px 21.32px 27.68px" },
|
|
66
|
-
}), [
|
|
67
|
-
margin,
|
|
68
|
-
commonStyle,
|
|
69
|
-
theme.palette.light,
|
|
70
|
-
]);
|
|
71
|
-
const boxOuterSx = useMemo(() => {
|
|
72
|
-
if (props.data.isSelected) {
|
|
73
|
-
return { ...boxSelected };
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
return { ...boxNotSelected };
|
|
77
|
-
}
|
|
78
|
-
}, [imageData.height, imageData.width, commonStyle, boxSelected, boxNotSelected, margin]);
|
|
79
|
-
return (_jsx(Box, { id: "Box_image", sx: boxOuterSx, className: "image", children: _jsx(CardMedia, { id: "card_media", component: "img", className: "image", loading: "lazy", alt: imageData.alt ?? "Image", sx: imageSx, src: imageData.src, width: "100%", onClick: props.onToggleSelect }) }, imageData.key));
|
|
80
|
-
};
|
|
81
|
-
export default GalleryImageItem;
|