@yogiswara/honcho-editor-ui 1.0.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.
Files changed (91) hide show
  1. package/dist/components/editor/HAccordionAspectRatio.d.ts +14 -0
  2. package/dist/components/editor/HAccordionAspectRatio.js +102 -0
  3. package/dist/components/editor/HAccordionColor.d.ts +12 -0
  4. package/dist/components/editor/HAccordionColor.js +234 -0
  5. package/dist/components/editor/HAccordionColorAdjustment.d.ts +31 -0
  6. package/dist/components/editor/HAccordionColorAdjustment.js +37 -0
  7. package/dist/components/editor/HAccordionDetails.d.ts +8 -0
  8. package/dist/components/editor/HAccordionDetails.js +133 -0
  9. package/dist/components/editor/HAccordionLight.d.ts +16 -0
  10. package/dist/components/editor/HAccordionLight.js +342 -0
  11. package/dist/components/editor/HAccordionPreset.d.ts +23 -0
  12. package/dist/components/editor/HAccordionPreset.js +59 -0
  13. package/dist/components/editor/HAlertBox.d.ts +7 -0
  14. package/dist/components/editor/HAlertBox.js +46 -0
  15. package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
  16. package/dist/components/editor/HAspectRatioMobile.js +1 -0
  17. package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +55 -0
  18. package/dist/components/editor/HBulkAccordionColorAdjustment.js +31 -0
  19. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +20 -0
  20. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +121 -0
  21. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +12 -0
  22. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +65 -0
  23. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +28 -0
  24. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +177 -0
  25. package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +53 -0
  26. package/dist/components/editor/HBulkColorAdjustmentMobile.js +16 -0
  27. package/dist/components/editor/HBulkColorMobile.d.ts +20 -0
  28. package/dist/components/editor/HBulkColorMobile.js +121 -0
  29. package/dist/components/editor/HBulkDetailsMobile.d.ts +12 -0
  30. package/dist/components/editor/HBulkDetailsMobile.js +65 -0
  31. package/dist/components/editor/HBulkLightMobile.d.ts +28 -0
  32. package/dist/components/editor/HBulkLightMobile.js +192 -0
  33. package/dist/components/editor/HBulkPreset.d.ts +24 -0
  34. package/dist/components/editor/HBulkPreset.js +33 -0
  35. package/dist/components/editor/HBulkPresetMobile.d.ts +15 -0
  36. package/dist/components/editor/HBulkPresetMobile.js +26 -0
  37. package/dist/components/editor/HDialogBox.d.ts +18 -0
  38. package/dist/components/editor/HDialogBox.js +51 -0
  39. package/dist/components/editor/HDialogCopy.d.ts +40 -0
  40. package/dist/components/editor/HDialogCopy.js +80 -0
  41. package/dist/components/editor/HFooter.d.ts +12 -0
  42. package/dist/components/editor/HFooter.js +24 -0
  43. package/dist/components/editor/HHeaderEditor.d.ts +17 -0
  44. package/dist/components/editor/HHeaderEditor.js +27 -0
  45. package/dist/components/editor/HImageEditorBulkDekstop.d.ts +15 -0
  46. package/dist/components/editor/HImageEditorBulkDekstop.js +26 -0
  47. package/dist/components/editor/HImageEditorBulkMobile.d.ts +72 -0
  48. package/dist/components/editor/HImageEditorBulkMobile.js +81 -0
  49. package/dist/components/editor/HImageEditorDekstop.d.ts +15 -0
  50. package/dist/components/editor/HImageEditorDekstop.js +29 -0
  51. package/dist/components/editor/HImageEditorMobile.d.ts +47 -0
  52. package/dist/components/editor/HImageEditorMobile.js +91 -0
  53. package/dist/components/editor/HImageEditorMobileLayout.d.ts +14 -0
  54. package/dist/components/editor/HImageEditorMobileLayout.js +57 -0
  55. package/dist/components/editor/HImageEditorPage.d.ts +1 -0
  56. package/dist/components/editor/HImageEditorPage.js +187 -0
  57. package/dist/components/editor/HModalEditorDekstop.d.ts +13 -0
  58. package/dist/components/editor/HModalEditorDekstop.js +22 -0
  59. package/dist/components/editor/HModalMobile.d.ts +12 -0
  60. package/dist/components/editor/HModalMobile.js +7 -0
  61. package/dist/components/editor/HPresetOptionMenu.d.ts +11 -0
  62. package/dist/components/editor/HPresetOptionMenu.js +20 -0
  63. package/dist/components/editor/HSliderColorMobile.d.ts +12 -0
  64. package/dist/components/editor/HSliderColorMobile.js +222 -0
  65. package/dist/components/editor/HSliderDetailsMobile.d.ts +8 -0
  66. package/dist/components/editor/HSliderDetailsMobile.js +130 -0
  67. package/dist/components/editor/HSliderLightMobile.d.ts +16 -0
  68. package/dist/components/editor/HSliderLightMobile.js +342 -0
  69. package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
  70. package/dist/components/editor/HTabAspectRatioMobile.js +1 -0
  71. package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +29 -0
  72. package/dist/components/editor/HTabColorAdjustmentMobile.js +16 -0
  73. package/dist/components/editor/HTabPresetMobile.d.ts +14 -0
  74. package/dist/components/editor/HTabPresetMobile.js +10 -0
  75. package/dist/components/editor/HTextField.d.ts +14 -0
  76. package/dist/components/editor/HTextField.js +51 -0
  77. package/dist/components/editor/HWatermarkView.d.ts +6 -0
  78. package/dist/components/editor/HWatermarkView.js +16 -0
  79. package/dist/hooks/editor/useHonchoEditor.d.ts +272 -0
  80. package/dist/hooks/editor/useHonchoEditor.js +1203 -0
  81. package/dist/index.d.ts +23 -0
  82. package/dist/index.js +23 -0
  83. package/dist/lib/editor/honcho-editor.d.ts +324 -0
  84. package/dist/lib/editor/honcho-editor.js +825 -0
  85. package/dist/themes/colors.d.ts +12 -0
  86. package/dist/themes/colors.js +12 -0
  87. package/dist/themes/honchoTheme.d.ts +25 -0
  88. package/dist/themes/honchoTheme.js +94 -0
  89. package/dist/utils/isMobile.d.ts +1 -0
  90. package/dist/utils/isMobile.js +5 -0
  91. package/package.json +41 -0
@@ -0,0 +1,91 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BottomNavigation, BottomNavigationAction, Box, CardMedia, Paper, Stack } from "@mui/material";
3
+ import useColors from "@/colors";
4
+ import useHonchoTypography from "@/honchoTheme";
5
+ import HTabColorAdjustmentMobile from "./HTabColorAdjustmentMobile";
6
+ import HTabPresetMobile from "./HTabPresetMobile";
7
+ // Data structure for the sub-navigation tabs
8
+ const subTabs = {
9
+ colorAdjustment: [
10
+ { value: "color", label: "Color", inactiveIcon: "/v1/svg/white-balance-inactive-mobile.svg", activeIcon: "/v1/svg/white-balance-active-mobile.svg" },
11
+ { value: "light", label: "Light", inactiveIcon: "/v1/svg/light-inactive-mobile.svg", activeIcon: "/v1/svg/light-active-mobile.svg" },
12
+ { value: "details", label: "Details", inactiveIcon: "/v1/svg/details-inactive-mobile.svg", activeIcon: "/v1/svg/details-active-mobile.svg" },
13
+ ],
14
+ aspectRatio: [
15
+ { value: "portrait", label: "Portrait" },
16
+ { value: "square", label: "Square" },
17
+ { value: "wide", label: "Wide" },
18
+ ],
19
+ preset: [
20
+ { value: "Preset", label: "Preset", inactiveIcon: "/v1/svg/preset-inactive-mobile.svg", activeIcon: "/v1/svg/preset-active-mobile.svg" },
21
+ ],
22
+ };
23
+ export default function HImageEditorMobile(props) {
24
+ const typography = useHonchoTypography();
25
+ const colors = useColors();
26
+ const handleChange = (event, newValue) => {
27
+ props.setActivePanel(newValue);
28
+ };
29
+ const currentSubTabs = subTabs[props.activePanel];
30
+ // Helper function to render the correct content inside the draggable panel
31
+ const renderPanelContent = () => {
32
+ switch (props.activePanel) {
33
+ case 'colorAdjustment':
34
+ return _jsx(HTabColorAdjustmentMobile, { ...props });
35
+ case 'preset':
36
+ return _jsx(HTabPresetMobile, { ...props });
37
+ default:
38
+ return null;
39
+ }
40
+ };
41
+ return (_jsx(Paper, { elevation: 0, sx: {
42
+ position: 'fixed',
43
+ bottom: 0,
44
+ left: 0,
45
+ right: 0,
46
+ zIndex: 1300,
47
+ backgroundColor: 'transparent',
48
+ }, children: _jsxs(Stack, { direction: "column", children: [props.activeSubPanel && (_jsxs(Paper, { ref: props.panelRef, elevation: 3, className: "draggable-panel MuiPaper-transition", sx: {
49
+ height: `${props.panelHeight}px`,
50
+ maxHeight: '80vh',
51
+ backgroundColor: 'rgba(40, 40, 40, 0.85)',
52
+ overflow: 'hidden',
53
+ borderRadius: "0px",
54
+ '&.MuiPaper-transition': {
55
+ transition: 'height 0.5s ease-in-out',
56
+ },
57
+ }, children: [_jsx(Box, { onMouseDown: props.handleDragStart, onTouchStart: props.handleDragStart, sx: {
58
+ display: 'flex',
59
+ justifyContent: 'center',
60
+ alignItems: 'center',
61
+ pt: '5px',
62
+ pb: '12px',
63
+ cursor: 'ns-resize',
64
+ touchAction: 'none',
65
+ }, children: _jsx(Box, { sx: { width: 40, height: 5, borderRadius: '2.5px', backgroundColor: 'rgba(255, 255, 255, 0.5)' } }) }), _jsx(Box, { ref: props.contentRef, sx: {
66
+ paddingX: "8px",
67
+ paddingBottom: 3,
68
+ height: 'calc(100% - 30px)',
69
+ overflowY: 'auto',
70
+ scrollbarWidth: 'none',
71
+ '&::-webkit-scrollbar': { display: 'none' },
72
+ }, children: renderPanelContent() })] })), currentSubTabs && (_jsx(Paper, { sx: {
73
+ backgroundColor: colors.onBackground,
74
+ paddingTop: "10px",
75
+ pb: "0px",
76
+ mb: "0px",
77
+ px: "44px",
78
+ borderRadius: "0px",
79
+ }, elevation: 3, children: _jsx(BottomNavigation, { showLabels: true, sx: { backgroundColor: colors.onBackground, gap: '10px' }, children: currentSubTabs.map((tab) => {
80
+ const isActive = props.activeSubPanel === tab.value;
81
+ const iconSrc = isActive ? tab.activeIcon : tab.inactiveIcon;
82
+ return (_jsx(BottomNavigationAction, { label: tab.label, value: tab.value, onClick: () => props.setActiveSubPanel(isActive ? '' : tab.value), icon: iconSrc && _jsx(CardMedia, { component: "img", image: iconSrc, sx: { width: "20px", height: "20px", mb: "5px" } }), sx: {
83
+ color: isActive ? colors.surface : colors.onSurfaceVariant1,
84
+ minWidth: 'auto', p: 0,
85
+ '& .MuiBottomNavigationAction-label': {
86
+ ...typography.labelSmall,
87
+ color: isActive ? colors.surface : colors.onSurfaceVariant1,
88
+ }
89
+ } }, tab.value));
90
+ }) }) })), _jsx(Paper, { sx: { backgroundColor: colors.onBackground, borderRadius: "0px" }, elevation: 3, children: _jsx(Stack, { direction: "row", justifyContent: "center", alignItems: "center", sx: { pt: "0px", pb: "0px", mb: "0px", mr: "0px", ml: "0px" }, children: _jsxs(BottomNavigation, { value: props.activePanel, onChange: handleChange, sx: { backgroundColor: colors.onBackground }, children: [_jsx(BottomNavigationAction, { value: "colorAdjustment", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'colorAdjustment' ? "/v1/svg/color-adjustment-active-mobile.svg" : "/v1/svg/color-adjustment-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(BottomNavigationAction, { value: "preset", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'preset' ? "/v1/svg/preset-and-watermark-active-mobile.svg" : "/v1/svg/preset-and-watermark-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) })] }) }) })] }) }));
91
+ }
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ activePanel: string;
5
+ activeSubPanel: string;
6
+ setActivePanel: (tab: string) => void;
7
+ setActiveSubPanel: (subTab: string) => void;
8
+ panelRef: React.RefObject<HTMLDivElement>;
9
+ contentRef: React.RefObject<HTMLDivElement | null>;
10
+ panelHeight: number;
11
+ handleDragStart: (e: React.MouseEvent | React.TouchEvent) => void;
12
+ }
13
+ export default function HImageEditorMobileLayout(props: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BottomNavigation, BottomNavigationAction, Box, CardMedia, Paper, Stack } from "@mui/material";
3
+ import useColors from "@/colors";
4
+ import useHonchoTypography from "@/honchoTheme";
5
+ // Data structure for the sub-navigation tabs
6
+ const subTabs = {
7
+ colorAdjustment: [
8
+ { value: "color", label: "Color", inactiveIcon: "/v1/svg/white-balance-inactive-mobile.svg", activeIcon: "/v1/svg/white-balance-active-mobile.svg" },
9
+ { value: "light", label: "Light", inactiveIcon: "/v1/svg/light-inactive-mobile.svg", activeIcon: "/v1/svg/light-active-mobile.svg" },
10
+ { value: "details", label: "Details", inactiveIcon: "/v1/svg/details-inactive-mobile.svg", activeIcon: "/v1/svg/details-active-mobile.svg" },
11
+ ],
12
+ aspectRatio: [
13
+ { value: "portrait", label: "Portrait" },
14
+ { value: "square", label: "Square" },
15
+ { value: "wide", label: "Wide" },
16
+ ],
17
+ preset: [
18
+ { value: "Preset", label: "Preset", inactiveIcon: "/v1/svg/preset-inactive-mobile.svg", activeIcon: "/v1/svg/preset-active-mobile.svg" },
19
+ ],
20
+ };
21
+ export default function HImageEditorMobileLayout(props) {
22
+ const typography = useHonchoTypography();
23
+ const colors = useColors();
24
+ const handleChange = (event, newValue) => {
25
+ props.setActivePanel(newValue);
26
+ };
27
+ const currentSubTabs = subTabs[props.activePanel];
28
+ return (_jsx(Paper, { elevation: 0, sx: {
29
+ position: 'fixed',
30
+ bottom: 0,
31
+ left: 0,
32
+ right: 0,
33
+ zIndex: 1300,
34
+ backgroundColor: 'transparent',
35
+ }, children: _jsxs(Stack, { direction: "column", children: [props.activeSubPanel && (_jsxs(Paper, { ref: props.panelRef, elevation: 3, className: "draggable-panel MuiPaper-transition", sx: {
36
+ height: `${props.panelHeight}px`, maxHeight: '60vh',
37
+ backgroundColor: 'rgba(40, 40, 40, 0.85)', overflow: 'hidden', borderRadius: "0px",
38
+ '&.MuiPaper-transition': { transition: 'height 0.5s ease-in-out' },
39
+ }, children: [_jsx(Box, { onMouseDown: props.handleDragStart, onTouchStart: props.handleDragStart, sx: {
40
+ display: 'flex', justifyContent: 'center', alignItems: 'center',
41
+ pt: '5px', pb: '12px', cursor: 'ns-resize', touchAction: 'none',
42
+ }, children: _jsx(Box, { sx: { width: 40, height: 5, borderRadius: '2.5px', backgroundColor: 'rgba(255, 255, 255, 0.5)' } }) }), _jsx(Box, { ref: props.contentRef, sx: {
43
+ paddingX: "8px", paddingBottom: 3, height: 'calc(100% - 30px)',
44
+ overflowY: 'auto', scrollbarWidth: 'none', '&::-webkit-scrollbar': { display: 'none' },
45
+ }, children: props.children })] })), currentSubTabs && (_jsx(Paper, { sx: { backgroundColor: colors.onBackground, paddingTop: "10px", px: "44px", borderRadius: "0px" }, elevation: 3, children: _jsx(BottomNavigation, { showLabels: true, sx: { backgroundColor: colors.onBackground, gap: '10px' }, children: currentSubTabs.map((tab) => {
46
+ const isActive = props.activeSubPanel === tab.value;
47
+ const iconSrc = isActive ? tab.activeIcon : tab.inactiveIcon;
48
+ return (_jsx(BottomNavigationAction, { label: tab.label, value: tab.value, onClick: () => props.setActiveSubPanel(isActive ? '' : tab.value), icon: iconSrc && _jsx(CardMedia, { component: "img", image: iconSrc, sx: { width: "20px", height: "20px", mb: "5px" } }), sx: {
49
+ color: isActive ? colors.surface : colors.onSurfaceVariant1,
50
+ minWidth: 'auto', p: 0,
51
+ '& .MuiBottomNavigationAction-label': {
52
+ ...typography.labelSmall,
53
+ color: isActive ? colors.surface : colors.onSurfaceVariant1,
54
+ }
55
+ } }, tab.value));
56
+ }) }) })), _jsx(Paper, { sx: { backgroundColor: colors.onBackground, borderRadius: "0px", pb: "0px", mb: "0px" }, elevation: 3, children: _jsx(Stack, { direction: "row", justifyContent: "center", alignItems: "center", sx: { pt: "4px", mb: "0px", mr: "0px", ml: "0px" }, children: _jsxs(BottomNavigation, { value: props.activePanel, onChange: handleChange, sx: { backgroundColor: colors.onBackground }, children: [_jsx(BottomNavigationAction, { value: "colorAdjustment", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'colorAdjustment' ? "/v1/svg/color-adjustment-active-mobile.svg" : "/v1/svg/color-adjustment-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(BottomNavigationAction, { value: "aspectRatio", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'aspectRatio' ? "/v1/svg/aspect-ratio-inactive-mobile.svg" : "/v1/svg/aspect-ratio-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) }), _jsx(BottomNavigationAction, { value: "preset", sx: { px: '12px', py: '0px', minWidth: 'auto' }, icon: _jsx(CardMedia, { component: "img", image: props.activePanel === 'preset' ? "/v1/svg/preset-and-watermark-active-mobile.svg" : "/v1/svg/preset-and-watermark-inactive-mobile.svg", sx: { width: "20px", height: "20px" } }) })] }) }) })] }) }));
57
+ }
@@ -0,0 +1 @@
1
+ export default function HImageEditorPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,187 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useState, useMemo, Suspense } from "react";
4
+ import { Box, Stack, CircularProgress, Typography, Checkbox, Paper } from "@mui/material";
5
+ import useColors from "@/colors";
6
+ import AutoFixHighIcon from '@mui/icons-material/AutoFixHigh'; // Magic Wand Icon
7
+ import Script from "next/script";
8
+ import useIsMobile from "@/utils/isMobile";
9
+ // Components
10
+ import HHeaderEditor from "@/components/editor/HHeaderEditor";
11
+ import HAccordionColorAdjustment from "@/components/editor/HAccordionColorAdjustment";
12
+ import HAccordionPreset from "@/components/editor/HAccordionPreset";
13
+ import { HBaseDialog } from "@/components/editor/HDialogBox";
14
+ import { HDialogCopy, HDialogPreset } from "@/components/editor/HDialogCopy";
15
+ import HImageEditorMobile from "@/components/editor/HImageEditorMobile";
16
+ import HImageEditorDesktop from "@/components/editor/HImageEditorDekstop";
17
+ import HImageEditorBulkDekstop from "@/components/editor/HImageEditorBulkDekstop";
18
+ import HImageEditorBulkMobile from "@/components/editor/HImageEditorBulkMobile";
19
+ import HBulkAccordionColorAdjustment from "@/components/editor/HBulkAccordionColorAdjustment";
20
+ import HBulkPreset from "@/components/editor/HBulkPreset";
21
+ import HModalEditorDekstop from "@/components/editor/HModalEditorDekstop";
22
+ import HFooter from "@/components/editor/HFooter";
23
+ import { HTextField } from "@/components/editor/HTextField";
24
+ import HWatermarkView from "@/components/editor/HWatermarkView";
25
+ import HModalMobile from "@/components/editor/HModalMobile";
26
+ import HPresetOptionsMenu from "@/components/editor/HPresetOptionMenu";
27
+ import { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox } from "@/components/editor/HAlertBox";
28
+ // Hooks
29
+ import { useHonchoEditor } from "@/hooks/editor/useHonchoEditor";
30
+ const initialAdjustments = {
31
+ tempScore: 0, tintScore: 0, vibranceScore: 0, exposureScore: 0, highlightsScore: 0, shadowsScore: 0,
32
+ whitesScore: 0, blacksScore: 0, saturationScore: 0, contrastScore: 0, clarityScore: 0, sharpnessScore: 0,
33
+ };
34
+ // Helper to check if an image has any edits
35
+ const hasAdjustments = (state) => {
36
+ if (!state)
37
+ return false;
38
+ return Object.values(state).some(value => value !== 0);
39
+ };
40
+ function HImageEditorClient() {
41
+ const localController = useMemo(() => ({
42
+ /**
43
+ * The handleBack logic is now defined directly inside the page component.
44
+ */
45
+ handleBack: function () {
46
+ if (window.webkit?.messageHandlers?.nativeHandler) {
47
+ window.webkit.messageHandlers.nativeHandler.postMessage("back");
48
+ console.log("Sent 'back' message to iOS native handler.");
49
+ }
50
+ else if (window.Android?.goBack) {
51
+ console.log("Android environment detected. Calling goBack().");
52
+ window.Android.goBack();
53
+ }
54
+ else {
55
+ console.log("Standard web browser detected. Navigating back in history.");
56
+ window.history.back();
57
+ }
58
+ },
59
+ // --- Provide placeholder implementations for other required methods ---
60
+ // These are necessary to satisfy the Controller interface contract.
61
+ onGetImage: async (imageID) => {
62
+ console.log("onGetImage called with:", imageID);
63
+ // Return a placeholder or the actual web implementation
64
+ const imageUrl = `https://d2cxumz3vt1s04.cloudfront.net/staging/gallery-photo/67ee6b55b8e4273707f68978/preview/${imageID}.jpeg`;
65
+ return imageUrl;
66
+ },
67
+ getImageList: async () => { return []; },
68
+ syncConfig: async () => { },
69
+ getPresets: async () => { return []; },
70
+ createPreset: async () => { return null; },
71
+ deletePreset: async () => { },
72
+ renamePreset: async () => { },
73
+ }), []);
74
+ const editor = useHonchoEditor(localController);
75
+ const isMobile = useIsMobile();
76
+ const colors = useColors();
77
+ const [displayedToken, setDisplayedToken] = useState(null);
78
+ const [displayedImageId, setDisplayedImageId] = useState(null);
79
+ // Dummy/placeholder handlers that remain in the component
80
+ const handleScale = (event) => editor.setAnchorMenuZoom(event.currentTarget);
81
+ const handleBeforeAfter = () => console.log("Before/After toggled!");
82
+ // const handleZoomMenuClose = () => editor.setAnchorMenuZoom(null);
83
+ // const handleZoomAction = (level: string) => { console.log(`Zoom: ${level}`); handleZoomMenuClose(); };
84
+ const renderActivePanelBulk = () => {
85
+ // MARK: Dekstop Bulk Editor panels
86
+ switch (editor.activePanel) {
87
+ case 'colorAdjustment':
88
+ return (_jsx(HBulkAccordionColorAdjustment
89
+ // Adjustments Colors
90
+ , {
91
+ // Adjustments Colors
92
+ onTempDecreaseMax: editor.handleBulkTempDecreaseMax, onTempDecrease: editor.handleBulkTempDecrease, onTempIncrease: editor.handleBulkTempIncrease, onTempIncreaseMax: editor.handleBulkTempIncreaseMax, onTintDecreaseMax: editor.handleBulkTintDecreaseMax, onTintDecrease: editor.handleBulkTintDecrease, onTintIncrease: editor.handleBulkTintIncrease, onTintIncreaseMax: editor.handleBulkTintIncreaseMax, onVibranceDecreaseMax: editor.handleBulkVibranceDecreaseMax, onVibranceDecrease: editor.handleBulkVibranceDecrease, onVibranceIncrease: editor.handleBulkVibranceIncrease, onVibranceIncreaseMax: editor.handleBulkVibranceIncreaseMax, onSaturationDecreaseMax: editor.handleBulkSaturationDecreaseMax, onSaturationDecrease: editor.handleBulkSaturationDecrease, onSaturationIncrease: editor.handleBulkSaturationIncrease, onSaturationIncreaseMax: editor.handleBulkSaturationIncreaseMax,
93
+ // Adjustments Light
94
+ onExposureDecreaseMax: editor.handleBulkExposureDecreaseMax, onExposureDecrease: editor.handleBulkExposureDecrease, onExposureIncrease: editor.handleBulkExposureIncrease, onExposureIncreaseMax: editor.handleBulkExposureIncreaseMax, onContrastDecreaseMax: editor.handleBulkContrastDecreaseMax, onContrastDecrease: editor.handleBulkContrastDecrease, onContrastIncrease: editor.handleBulkContrastIncrease, onContrastIncreaseMax: editor.handleBulkContrastIncreaseMax, onHighlightsDecreaseMax: editor.handleBulkHighlightsDecreaseMax, onHighlightsDecrease: editor.handleBulkHighlightsDecrease, onHighlightsIncrease: editor.handleBulkHighlightsIncrease, onHighlightsIncreaseMax: editor.handleBulkHighlightsIncreaseMax, onShadowsDecreaseMax: editor.handleBulkShadowsDecreaseMax, onShadowsDecrease: editor.handleBulkShadowsDecrease, onShadowsIncrease: editor.handleBulkShadowsIncrease, onShadowsIncreaseMax: editor.handleBulkShadowsIncreaseMax, onWhitesDecreaseMax: editor.handleBulkWhitesDecreaseMax, onWhitesDecrease: editor.handleBulkWhitesDecrease, onWhitesIncrease: editor.handleBulkWhitesIncrease, onWhitesIncreaseMax: editor.handleBulkWhitesIncreaseMax, onBlacksDecreaseMax: editor.handleBulkBlacksDecreaseMax, onBlacksDecrease: editor.handleBulkBlacksDecrease, onBlacksIncrease: editor.handleBulkBlacksIncrease, onBlacksIncreaseMax: editor.handleBulkBlacksIncreaseMax,
95
+ // Adjustments Details
96
+ onClarityDecreaseMax: editor.handleBulkClarityDecreaseMax, onClarityDecrease: editor.handleBulkClarityDecrease, onClarityIncrease: editor.handleBulkClarityIncrease, onClarityIncreaseMax: editor.handleBulkClarityIncreaseMax, onSharpnessDecreaseMax: editor.handleBulkSharpnessDecreaseMax, onSharpnessDecrease: editor.handleBulkSharpnessDecrease, onSharpnessIncrease: editor.handleBulkSharpnessIncrease, onSharpnessIncreaseMax: editor.handleBulkSharpnessIncreaseMax,
97
+ // Panels Management
98
+ expandedPanels: editor.colorAdjustmentExpandedPanels, onPanelChange: editor.handleColorAccordionChange }));
99
+ case 'preset':
100
+ return (_jsx(HBulkPreset, { presets: editor.presets, selectedPreset: editor.selectedBulkPreset, onSelectPreset: editor.handleSelectBulkPreset, expandedPanels: editor.presetExpandedPanels, onPanelChange: editor.handlePresetAccordionChange, presetMenuAnchorEl: editor.presetMenuAnchorEl, activePresetMenuId: editor.activePresetMenuId, isMenuOpen: Boolean(editor.presetMenuAnchorEl), onPresetMenuClick: editor.handlePresetMenuClick, onPresetMenuClose: editor.handlePresetMenuClose, onRemovePreset: editor.handleRemovePreset, onRenamePreset: editor.handleOpenRenameModal, onDeletePreset: editor.handleDeletePreset, onOpenPresetModal: editor.handleOpenPresetModal }));
101
+ default: return null;
102
+ }
103
+ };
104
+ const renderActivePanel = () => {
105
+ // MARK: Dekstop Editor panels
106
+ switch (editor.activePanel) {
107
+ case 'colorAdjustment':
108
+ return (_jsx(HAccordionColorAdjustment, { tempScore: editor.tempScore, setTempScore: editor.setTempScore, tintScore: editor.tintScore, setTintScore: editor.setTintScore, vibranceScore: editor.vibranceScore, setVibranceScore: editor.setVibranceScore, saturationScore: editor.saturationScore, setSaturationScore: editor.setSaturationScore, exposureScore: editor.exposureScore, setExposureScore: editor.setExposureScore, HighlightsScore: editor.highlightsScore, setHighlightsScore: editor.setHighlightsScore, shadowsScore: editor.shadowsScore, setShadowsScore: editor.setShadowsScore, whitesScore: editor.whitesScore, setWhitesScore: editor.setWhitesScore, blacksScore: editor.blacksScore, setBlacksScore: editor.setBlacksScore, contrastScore: editor.contrastScore, setContrastScore: editor.setContrastScore, clarityScore: editor.clarityScore, setClarityScore: editor.setClarityScore, sharpnessScore: editor.sharpnessScore, setSharpnessScore: editor.setSharpnessScore, expandedPanels: editor.colorAdjustmentExpandedPanels, onPanelChange: editor.handleColorAccordionChange }));
109
+ case 'preset':
110
+ return (_jsx(HAccordionPreset, { presets: editor.presets, expandedPanels: editor.presetExpandedPanels, onChange: editor.handlePresetAccordionChange, onOpenPresetModal: editor.handleOpenPresetModal, onOpenWatermarkView: editor.handleOpenWatermarkView, selectedPreset: editor.selectedDesktopPreset, onSelectPreset: editor.handleSelectDesktopPreset, presetMenuAnchorEl: editor.presetMenuAnchorEl, onPresetMenuClick: editor.handlePresetMenuClick, onPresetMenuClose: editor.handlePresetMenuClose, activePresetMenuId: editor.activePresetMenuId, onRemovePreset: editor.handleRemovePreset, onRenamePreset: editor.handleOpenRenameModal, onDeletePreset: editor.handleDeletePreset }));
111
+ default: return null;
112
+ }
113
+ };
114
+ if (editor.isCreatingWatermark) {
115
+ return (_jsx(HWatermarkView, { onSaveWatermark: editor.handleSaveWatermark, onCancelWatermark: editor.handleCancelWatermark }));
116
+ }
117
+ return (_jsxs(_Fragment, { children: [_jsx(Script, { src: "/honcho-photo-editor.js", strategy: "lazyOnload", onReady: () => {
118
+ editor.handleScriptReady();
119
+ } }), _jsxs(Stack, { direction: "column", justifyContent: "center", sx: { width: '100%', height: isMobile ? '100%' : '100vh', background: 'black', pl: isMobile ? 0 : "24px", pr: isMobile ? 0 : "0px" }, children: [editor.isConnectionSlow && _jsx(HAlertInternetConnectionBox, { onClose: editor.handleAlertClose }), !editor.isOnline && _jsx(HAlertInternetBox, {}), editor.isPresetCreated && !isMobile && _jsx(HAlertInternetBox, {}), editor.showCopyAlert && _jsx(HAlertCopyBox, {}), displayedToken && (_jsx(Box, { sx: { p: 1, mx: 2, backgroundColor: 'grey.900', borderRadius: 1, mt: 1 }, children: _jsxs(Typography, { variant: "caption", sx: { color: 'lime', fontFamily: 'monospace', wordBreak: 'break-all' }, children: [_jsx("strong", { children: "Token Received:" }), " ", displayedToken] }) })), displayedImageId && (_jsx(Box, { sx: { p: 1, mx: 2, backgroundColor: 'grey.900', borderRadius: 1, mt: 1 }, children: _jsxs(Typography, { variant: "caption", sx: { color: 'white', fontFamily: 'monospace', wordBreak: 'break-all' }, children: [_jsx("strong", { children: "Image ID:" }), " ", displayedImageId] }) })), _jsx(HHeaderEditor, { onBack: editor.handleBack, onUndo: editor.handleUndo, onRedo: editor.handleRedo, onRevert: editor.handleRevert, onCopyEdit: editor.handleOpenCopyDialog, onPasteEdit: editor.handlePasteEdit, isPasteEnabled: editor.isPasteAvailable, anchorEl: editor.headerMenuAnchorEl, onMenuClick: editor.handleHeaderMenuClick, onMenuClose: editor.handleHeaderMenuClose, onSelectButton: editor.toggleBulkEditing, valueSelect: editor.selectedImages }), _jsxs(Stack, { direction: isMobile ? "column" : "row", justifyContent: "space-between", alignItems: "stretch", sx: { width: '100%', flexGrow: 1, overflow: 'hidden' }, children: [_jsxs(Box, { sx: {
120
+ flexGrow: 1,
121
+ display: 'flex',
122
+ justifyContent: 'center',
123
+ alignItems: 'center', // This will now work correctly on mobile
124
+ position: 'relative',
125
+ p: isMobile ? 2 : 4,
126
+ minHeight: 720
127
+ }, children: [_jsx("input", { type: "file", ref: editor.fileInputRef, onChange: editor.handleFileChange, multiple: true, accept: "image/*", style: { display: 'none' } }), !editor.isImageLoaded ? (_jsxs(Box, { onClick: () => editor.fileInputRef.current?.click(), sx: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', border: '2px dashed grey', borderRadius: 2, p: 4, cursor: editor.isEditorReady ? 'pointer' : 'default', textAlign: 'center', color: 'grey.500', width: '100%', height: '300px' }, children: [!editor.isEditorReady && _jsx(CircularProgress, { color: "inherit", sx: { mb: 2 } }), _jsx(Typography, { variant: "h6", children: editor.editorStatus })] })) : (editor.isBulkEditing ? (
128
+ // Responsive Image Grid for Bulk Edit
129
+ _jsx(Box, { sx: {
130
+ display: 'grid',
131
+ gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
132
+ gap: 2,
133
+ width: '100%',
134
+ height: '100%',
135
+ p: 1
136
+ }, children: editor.imageList.map(image => {
137
+ const imageAdjustments = editor.adjustmentsMap.get(image.id) || initialAdjustments;
138
+ const isEdited = hasAdjustments(imageAdjustments);
139
+ return (_jsxs(Paper, { elevation: 3, sx: {
140
+ position: 'relative',
141
+ overflow: 'hidden',
142
+ aspectRatio: '1 / 1',
143
+ '& img': {
144
+ width: '100%',
145
+ height: '100%',
146
+ objectFit: 'cover',
147
+ display: 'block',
148
+ transition: 'opacity 0.2s ease-in-out',
149
+ opacity: editor.selectedImageIds.has(image.id) ? 1 : 0.4,
150
+ }
151
+ }, children: [_jsx("img", { src: image.url, alt: image.name }), _jsx(Checkbox, { checked: editor.selectedImageIds.has(image.id), onChange: () => editor.handleToggleImageSelection(image.id), sx: {
152
+ position: 'absolute', top: 4, left: 4, color: 'common.white',
153
+ '&.Mui-checked': { color: '#1976d2' },
154
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
155
+ '&:hover': { backgroundColor: 'rgba(0, 0, 0, 0.7)' }
156
+ } }), isEdited && (_jsx(AutoFixHighIcon, { fontSize: "small", sx: {
157
+ position: 'absolute',
158
+ bottom: 8,
159
+ right: 8,
160
+ color: 'white',
161
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
162
+ borderRadius: '50%',
163
+ padding: '2px'
164
+ } }))] }, image.id));
165
+ }) })) : (
166
+ // Canvas for Single Edit
167
+ _jsx("canvas", { ref: editor.canvasRef, style: { display: 'block', maxWidth: '100%', maxHeight: '100%', width: 'auto', height: 'auto' } })))] }), !isMobile && !editor.isBulkEditing && (_jsx(HImageEditorDesktop, { activePanel: editor.activePanel, setActivePanel: editor.setActivePanel, onScale: handleScale, onBeforeAfter: handleBeforeAfter, isPanelOpen: !isMobile, anchorElZoom: editor.anchorMenuZoom, onZoomMenuClose: () => editor.setAnchorMenuZoom(null), onZoomAction: editor.handleZoomAction, footer: _jsx(HFooter, { anchorElZoom: editor.anchorMenuZoom, onScale: (event) => editor.setAnchorMenuZoom(event.currentTarget), onShowOriginal: editor.handleShowOriginal, onShowEdited: editor.handleShowEdited, onZoomMenuClose: () => editor.setAnchorMenuZoom(null), onZoomAction: editor.handleZoomAction, zoomLevelText: editor.zoomLevelText }), children: renderActivePanel() })), !isMobile && editor.isBulkEditing && (_jsx(HImageEditorBulkDekstop, { activePanel: editor.activePanel, setActivePanel: editor.setActivePanel, onScale: handleScale, onBeforeAfter: handleBeforeAfter, isPanelOpen: !isMobile, anchorElZoom: editor.anchorMenuZoom, onZoomMenuClose: () => editor.setAnchorMenuZoom(null), onZoomAction: editor.handleZoomAction, footer: _jsx(HFooter, { anchorElZoom: editor.anchorMenuZoom, onScale: (event) => editor.setAnchorMenuZoom(event.currentTarget), onShowOriginal: editor.handleShowOriginal, onShowEdited: editor.handleShowEdited, onZoomMenuClose: () => editor.setAnchorMenuZoom(null), onZoomAction: editor.handleZoomAction, zoomLevelText: editor.zoomLevelText }), children: renderActivePanelBulk() })), isMobile && !editor.isBulkEditing && (_jsx(HImageEditorMobile, { presets: editor.presets, contentRef: editor.contentRef, panelRef: editor.panelRef, panelHeight: editor.panelHeight, handleDragStart: editor.handleDragStart, onContentHeightChange: editor.handleContentHeightChange, activePanel: editor.activePanel, setActivePanel: (panel) => { editor.setActivePanel(panel); editor.setActiveSubPanel(''); }, activeSubPanel: editor.activeSubPanel, setActiveSubPanel: editor.setActiveSubPanel,
168
+ // Color Adjustments
169
+ tempScore: editor.tempScore, onTempChange: editor.setTempScore, tintScore: editor.tintScore, onTintChange: editor.setTintScore, vibranceScore: editor.vibranceScore, onVibranceChange: editor.setVibranceScore, saturationScore: editor.saturationScore, onSaturationChange: editor.setSaturationScore,
170
+ // Adjustments Light
171
+ exposureScore: editor.exposureScore, onExposureChange: editor.setExposureScore, contrastScore: editor.contrastScore, onContrastChange: editor.setContrastScore, highlightsScore: editor.highlightsScore, onHighlightsChange: editor.setHighlightsScore, shadowScore: editor.shadowsScore, onShadowsChange: editor.setShadowsScore, whiteScore: editor.whitesScore, onWhitesChange: editor.setWhitesScore, blackScore: editor.blacksScore, onBlacksChange: editor.setBlacksScore,
172
+ // Adjustments Details
173
+ clarityScore: editor.clarityScore, onClarityChange: editor.setClarityScore, sharpnessScore: editor.sharpnessScore, onSharpnessChange: editor.setSharpnessScore,
174
+ // Modal Management
175
+ onOpenPresetModal: editor.handleOpenPresetModalMobile, presetOptionModal: editor.handlePresetMenuClick, selectedPreset: editor.selectedMobilePreset, onSelectPreset: editor.handleSelectMobilePreset })), isMobile && editor.isBulkEditing && (_jsx(HImageEditorBulkMobile, { presets: editor.presets, contentRef: editor.contentRef, panelRef: editor.panelRef, panelHeight: editor.panelHeight, handleDragStart: editor.handleDragStart, onContentHeightChange: editor.handleContentHeightChange, activePanel: editor.activePanel, setActivePanel: (panel) => { editor.setActivePanel(panel); editor.setActiveSubPanel(''); }, activeSubPanel: editor.activeSubPanel, setActiveSubPanel: editor.setActiveSubPanel,
176
+ // Color Adjustments
177
+ onTempDecreaseMax: editor.handleBulkTempDecreaseMax, onTempDecrease: editor.handleBulkTempDecrease, onTempIncrease: editor.handleBulkTempIncrease, onTempIncreaseMax: editor.handleBulkTempIncreaseMax, onTintDecreaseMax: editor.handleBulkTintDecreaseMax, onTintDecrease: editor.handleBulkTintDecrease, onTintIncrease: editor.handleBulkTintIncrease, onTintIncreaseMax: editor.handleBulkTintIncreaseMax, onVibranceDecreaseMax: editor.handleBulkVibranceDecreaseMax, onVibranceDecrease: editor.handleBulkVibranceDecrease, onVibranceIncrease: editor.handleBulkVibranceIncrease, onVibranceIncreaseMax: editor.handleBulkVibranceIncreaseMax, onSaturationDecreaseMax: editor.handleBulkSaturationDecreaseMax, onSaturationDecrease: editor.handleBulkSaturationDecrease, onSaturationIncrease: editor.handleBulkSaturationIncrease, onSaturationIncreaseMax: editor.handleBulkSaturationIncreaseMax,
178
+ // Adjustments Light
179
+ onExposureDecreaseMax: editor.handleBulkExposureDecreaseMax, onExposureDecrease: editor.handleBulkExposureDecrease, onExposureIncrease: editor.handleBulkExposureIncrease, onExposureIncreaseMax: editor.handleBulkExposureIncreaseMax, onContrastDecreaseMax: editor.handleBulkContrastDecreaseMax, onContrastDecrease: editor.handleBulkContrastDecrease, onContrastIncrease: editor.handleBulkContrastIncrease, onContrastIncreaseMax: editor.handleBulkContrastIncreaseMax, onHighlightsDecreaseMax: editor.handleBulkHighlightsDecreaseMax, onHighlightsDecrease: editor.handleBulkHighlightsDecrease, onHighlightsIncrease: editor.handleBulkHighlightsIncrease, onHighlightsIncreaseMax: editor.handleBulkHighlightsIncreaseMax, onShadowsDecreaseMax: editor.handleBulkShadowsDecreaseMax, onShadowsDecrease: editor.handleBulkShadowsDecrease, onShadowsIncrease: editor.handleBulkShadowsIncrease, onShadowsIncreaseMax: editor.handleBulkShadowsIncreaseMax, onWhitesDecreaseMax: editor.handleBulkWhitesDecreaseMax, onWhitesDecrease: editor.handleBulkWhitesDecrease, onWhitesIncrease: editor.handleBulkWhitesIncrease, onWhitesIncreaseMax: editor.handleBulkWhitesIncreaseMax, onBlacksDecreaseMax: editor.handleBulkBlacksDecreaseMax, onBlacksDecrease: editor.handleBulkBlacksDecrease, onBlacksIncrease: editor.handleBulkBlacksIncrease, onBlacksIncreaseMax: editor.handleBulkBlacksIncreaseMax,
180
+ // Adjustments Details
181
+ onClarityDecreaseMax: editor.handleBulkClarityDecreaseMax, onClarityDecrease: editor.handleBulkClarityDecrease, onClarityIncrease: editor.handleBulkClarityIncrease, onClarityIncreaseMax: editor.handleBulkClarityIncreaseMax, onSharpnessDecreaseMax: editor.handleBulkSharpnessDecreaseMax, onSharpnessDecrease: editor.handleBulkSharpnessDecrease, onSharpnessIncrease: editor.handleBulkSharpnessIncrease, onSharpnessIncreaseMax: editor.handleBulkSharpnessIncreaseMax, selectedPresetBulk: editor.selectedBulkPreset, onOpenPresetModalBulk: editor.handleOpenPresetModalMobile, onSelectPresetBulk: editor.handleSelectBulkPreset, onPresetMenuClickBulk: editor.handlePresetMenuClick })), _jsx(HPresetOptionsMenu, { anchorEl: editor.presetMenuAnchorEl, isOpen: Boolean(editor.presetMenuAnchorEl), onClose: editor.handlePresetMenuClose, onRemove: editor.handleRemovePreset, onRename: editor.handleOpenRenameModal, onDelete: editor.handleDeletePreset, isPresetSelected: (editor.isBulkEditing ? editor.selectedBulkPreset : editor.selectedDesktopPreset) === editor.activePresetMenuId }), _jsx(HModalEditorDekstop, { modalName: "preset", modalOpen: editor.isPresetModalOpen, modalTitle: "Create Preset", modalInformation: "Choose settings to include in preset", action: _jsx(HDialogPreset, { colorChecks: editor.copyColorChecks, lightChecks: editor.copyLightChecks, detailsChecks: editor.copyDetailsChecks, setColorChecks: editor.setCopyColorChecks, setLightChecks: editor.setCopyLightChecks, setDetailsChecks: editor.setCopyDetailsChecks, expanded: editor.copyDialogExpanded, onParentChange: editor.handleCopyParentChange, onChildChange: editor.handleCopyChildChange, onToggleExpand: editor.handleToggleCopyDialogExpand }), modalClose: editor.handleClosePresetModal, onConfirm: editor.handleCreatePreset, children: _jsx(HTextField, { valueName: editor.presetName, setName: editor.handleNameChange }) }), _jsx(HModalMobile, { modalName: "preset", modalOpen: editor.isPresetModalOpenMobile, modalTitle: "Create Preset", modalInformation: "Create a preset with the current Light, Colour and Details settings", modalClose: editor.handleClosePresetModalMobile, onConfirm: editor.handleCreatePresetMobile, children: _jsx(HTextField, { valueName: editor.presetName, setName: editor.handleNameChange }) })] })] }), editor.isCopyDialogOpen && (_jsx(HBaseDialog, { open: editor.isCopyDialogOpen, title: "Copy Edits", onClose: editor.handleCloseCopyDialog, action: _jsx(HDialogCopy, { onCopyEdit: editor.handleConfirmCopy, colorChecks: editor.copyColorChecks, lightChecks: editor.copyLightChecks, detailsChecks: editor.copyDetailsChecks, setColorChecks: editor.setCopyColorChecks, setLightChecks: editor.setCopyLightChecks, setDetailsChecks: editor.setCopyDetailsChecks, expanded: editor.copyDialogExpanded, onParentChange: editor.handleCopyParentChange, onChildChange: editor.handleCopyChildChange, onToggleExpand: editor.handleToggleCopyDialogExpand }) }))] }));
182
+ }
183
+ export default function HImageEditorPage() {
184
+ const colors = useColors();
185
+ const fallbackUI = (_jsx(Stack, { sx: { width: '100%', height: '100vh', alignItems: 'center', justifyContent: 'center', background: 'black' }, children: _jsx(CircularProgress, { sx: { color: colors.onSurfaceVariant } }) }));
186
+ return (_jsx(Suspense, { fallback: fallbackUI, children: _jsx(HImageEditorClient, {}) }));
187
+ }
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface Props {
3
+ modalName: string;
4
+ modalOpen: boolean;
5
+ modalTitle: string;
6
+ modalInformation: string;
7
+ children: React.ReactNode;
8
+ action?: React.ReactNode;
9
+ modalClose: () => void;
10
+ onConfirm: () => void;
11
+ }
12
+ export default function HModalEditorDekstop(props: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Modal, Box, Typography, Button, Stack } from "@mui/material";
3
+ import useColors from "@/colors";
4
+ import useHonchoTypography from "@/honchoTheme";
5
+ // Create modal for any usage coverage
6
+ export default function HModalEditorDekstop(props) {
7
+ const colors = useColors();
8
+ const typography = useHonchoTypography();
9
+ const style = {
10
+ position: 'absolute',
11
+ top: '50%',
12
+ left: '50%',
13
+ transform: 'translate(-50%, -50%)',
14
+ width: 500,
15
+ bgcolor: 'background.paper',
16
+ boxShadow: 24,
17
+ p: 4,
18
+ borderRadius: 6,
19
+ spacing: 6,
20
+ };
21
+ return (_jsx(_Fragment, { children: _jsx(Modal, { open: props.modalOpen, onClose: props.modalClose, children: _jsxs(Box, { sx: style, children: [_jsx(Typography, { variant: "h6", color: "initial", children: props.modalTitle }), _jsx(Box, { sx: { mt: 2 }, children: props.children }), _jsx(Typography, { color: "initial", children: props.modalInformation }), _jsx(Stack, { children: props.action }), _jsxs(Stack, { direction: "row", spacing: 2, sx: { mt: 3, justifyContent: 'flex-end' }, children: [_jsx(Button, { sx: { ...typography.labelMedium, color: colors.onSurface, backgroundColor: colors.surface, }, onClick: props.modalClose, children: "Cancel" }), _jsx(Button, { sx: { ...typography.labelMedium, color: colors.onSurface, backgroundColor: colors.surface, }, onClick: props.onConfirm, children: "Save" })] })] }) }) }));
22
+ }
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ interface Props {
3
+ modalName: string;
4
+ modalOpen: boolean;
5
+ modalTitle: string;
6
+ modalInformation: string;
7
+ children: React.ReactNode;
8
+ modalClose: () => void;
9
+ onConfirm: () => void;
10
+ }
11
+ export default function HModalMobile(props: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Modal, Box, Typography, Button, Stack, IconButton, CardMedia } from "@mui/material";
3
+ import useColors from "@/colors";
4
+ export default function HModalMobile(props) {
5
+ const colors = useColors();
6
+ return (_jsx(_Fragment, { children: _jsx(Modal, { open: props.modalOpen, onClose: props.modalClose, children: _jsxs(Stack, { direction: "column", spacing: 2, height: "100%", sx: { p: "10px", backgroundColor: colors.surface }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [_jsxs(Stack, { direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1, children: [_jsx(IconButton, { "aria-label": "close", onClick: props.modalClose, children: _jsx(CardMedia, { component: "img", image: "/v1/svg/exit-button-modal-mobile.svg" }) }), _jsx(Typography, { variant: "h6", color: "initial", children: props.modalTitle })] }), _jsx(Button, { onClick: props.onConfirm, children: "Save" })] }), _jsx(Typography, { variant: "inherit", color: "initial", children: props.modalInformation }), _jsx(Box, { sx: { mt: 2 }, children: props.children })] }) }) }));
7
+ }
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ anchorEl: null | HTMLElement;
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ isPresetSelected: boolean;
6
+ onRemove: () => void;
7
+ onRename: () => void;
8
+ onDelete: () => void;
9
+ }
10
+ export default function HPresetOptionsMenu(props: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Menu, MenuItem, ListItemText, CardMedia, Stack } from "@mui/material";
3
+ import useHonchoTypography from "@/honchoTheme";
4
+ import useColors from "@/colors";
5
+ export default function HPresetOptionsMenu(props) {
6
+ const typography = useHonchoTypography();
7
+ const colors = useColors();
8
+ return (_jsxs(Menu, { id: "preset-options-menu", anchorEl: props.anchorEl, open: props.isOpen, onClose: props.onClose, transformOrigin: { horizontal: 'right', vertical: 'top' }, anchorOrigin: { horizontal: 'right', vertical: 'bottom' }, slotProps: {
9
+ paper: {
10
+ sx: {
11
+ backgroundColor: colors.onBackground,
12
+ color: colors.surface,
13
+ border: `1px solid ${colors.onSurfaceVariant1}`,
14
+ '& .MuiMenuItem-root:hover': {
15
+ backgroundColor: 'rgba(255, 255, 255, 0.08)',
16
+ },
17
+ },
18
+ },
19
+ }, children: [props.isPresetSelected && (_jsx(MenuItem, { onClick: props.onRemove, children: _jsxs(Stack, { direction: "row", spacing: "10px", children: [_jsx(CardMedia, { component: "img", image: "/v1/svg/remove-preset-menu-button.svg", sx: { width: '20px', height: '20px' } }), _jsx(ListItemText, { sx: { ...typography.bodyMedium }, children: "Remove Preset" })] }) })), _jsx(MenuItem, { onClick: props.onRename, children: _jsxs(Stack, { direction: "row", spacing: "10px", children: [_jsx(CardMedia, { component: "img", image: "/v1/svg/rename-menu-button.svg", sx: { width: '20px', height: '20px' } }), _jsx(ListItemText, { sx: { ...typography.bodyMedium }, children: "Rename" })] }) }), _jsx(MenuItem, { onClick: props.onDelete, children: _jsxs(Stack, { direction: "row", spacing: "10px", children: [_jsx(CardMedia, { component: "img", image: "/v1/svg/delete-menu-button.svg", sx: { width: '20px', height: '20px' } }), _jsx(ListItemText, { sx: { ...typography.bodyMedium, color: colors.error }, children: "Delete" })] }) })] }));
20
+ }
@@ -0,0 +1,12 @@
1
+ interface Props {
2
+ tempScore: number;
3
+ tintScore: number;
4
+ saturationScore: number;
5
+ vibranceScore: number;
6
+ onTempChange: (value: number) => void;
7
+ onTintChange: (value: number) => void;
8
+ onVibranceChange: (value: number) => void;
9
+ onSaturationChange: (value: number) => void;
10
+ }
11
+ export default function HSliderColorMobile(props: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};