@yogiswara/honcho-editor-ui 2.10.19 → 2.10.20
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.
|
@@ -28,7 +28,7 @@ export function HAlertCopyBox() {
|
|
|
28
28
|
}
|
|
29
29
|
export function HAlertInternetConnectionBox(props) {
|
|
30
30
|
const colors = useColors();
|
|
31
|
-
return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/
|
|
31
|
+
return (_jsx(Alert, { icon: _jsx("img", { src: "v1/svg/alert-circle-internet-problem.svg" }), sx: {
|
|
32
32
|
position: 'absolute',
|
|
33
33
|
top: '10%',
|
|
34
34
|
left: '50%',
|
|
@@ -23,6 +23,7 @@ const subTabs = {
|
|
|
23
23
|
export default function HImageEditorMobile(props) {
|
|
24
24
|
const typography = useHonchoTypography();
|
|
25
25
|
const colors = useColors();
|
|
26
|
+
console.log(`[HImageEditorMobile TEMPERATURE] Rendering with tempScore: ${props.tempScore}, isBatchMode: ${props.isBatchMode}`);
|
|
26
27
|
const handleChange = (event, newValue) => {
|
|
27
28
|
props.setActivePanel(newValue);
|
|
28
29
|
};
|
|
@@ -30,6 +30,7 @@ function useAdjustmentField(propValue, setValue, onDragStart, onDragEnd, isBatch
|
|
|
30
30
|
// start batch on first valid change
|
|
31
31
|
if (!started && !isBatchMode) {
|
|
32
32
|
onDragStart();
|
|
33
|
+
console.log("[MOBILE UI] Starting batch: ", onDragStart);
|
|
33
34
|
setStarted(true);
|
|
34
35
|
}
|
|
35
36
|
setValue(num);
|
|
@@ -41,6 +42,7 @@ function useAdjustmentField(propValue, setValue, onDragStart, onDragEnd, isBatch
|
|
|
41
42
|
setLocal("0");
|
|
42
43
|
setValue(0);
|
|
43
44
|
if (!isBatchMode) {
|
|
45
|
+
console.log("[MOBILE UI] ending batch: ", onDragEnd);
|
|
44
46
|
onDragEnd();
|
|
45
47
|
}
|
|
46
48
|
};
|
|
@@ -77,7 +79,16 @@ function useAdjustmentField(propValue, setValue, onDragStart, onDragEnd, isBatch
|
|
|
77
79
|
export default function HSliderColorMobile(props) {
|
|
78
80
|
const typography = useHonchoTypography();
|
|
79
81
|
const colors = useColors();
|
|
80
|
-
|
|
82
|
+
console.log(`[HSliderColorMobile TEMPERATURE] Received tempScore prop: ${props.tempScore}`);
|
|
83
|
+
const handleDragStartWithLog = () => {
|
|
84
|
+
console.log('[HSliderColorMobile TEMPERATURE] SLIDER onDragStart triggered.');
|
|
85
|
+
props.onDragStart();
|
|
86
|
+
};
|
|
87
|
+
const handleDragEndWithLog = () => {
|
|
88
|
+
console.log('[HSliderColorMobile TEMPERATURE] SLIDER onDragEnd triggered.');
|
|
89
|
+
props.onDragEnd();
|
|
90
|
+
};
|
|
91
|
+
const tempSliderRef = useSliderEvents(handleDragStartWithLog, handleDragEndWithLog, props.isBatchMode);
|
|
81
92
|
const tintSliderRef = useSliderEvents(props.onDragStart, props.onDragEnd, props.isBatchMode);
|
|
82
93
|
const vibranceSliderRef = useSliderEvents(props.onDragStart, props.onDragEnd, props.isBatchMode);
|
|
83
94
|
const saturationSliderRef = useSliderEvents(props.onDragStart, props.onDragEnd, props.isBatchMode);
|
|
@@ -107,21 +118,6 @@ export default function HSliderColorMobile(props) {
|
|
|
107
118
|
borderBottom: 'none',
|
|
108
119
|
pl: '2px',
|
|
109
120
|
};
|
|
110
|
-
const formatValue = (value) => {
|
|
111
|
-
if (value > 0)
|
|
112
|
-
return `+${value}`;
|
|
113
|
-
return value.toString();
|
|
114
|
-
};
|
|
115
|
-
const handleInputChange = (event, min, max, onChange) => {
|
|
116
|
-
const value = event.target.value;
|
|
117
|
-
if (value === '+' || value === '-')
|
|
118
|
-
return;
|
|
119
|
-
let numericValue = parseInt(value, 10);
|
|
120
|
-
if (isNaN(numericValue))
|
|
121
|
-
numericValue = 0;
|
|
122
|
-
const clampedValue = Math.max(min, Math.min(max, numericValue));
|
|
123
|
-
onChange(clampedValue);
|
|
124
|
-
};
|
|
125
121
|
return (_jsx(_Fragment, { children: _jsxs(Stack, { spacing: 0, direction: "column", sx: { width: '100%', paddingX: 1, m: "0px" }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { pt: '10px', pb: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle }, children: [_jsx(Typography, { sx: { ...typography.bodyMedium, color: colors.surface }, onDoubleClick: tempInput.handleDoubleClick, children: "Temperature" }), _jsx(Typography, { sx: {
|
|
126
122
|
...typography.bodyMedium, // Use your standard typography
|
|
127
123
|
color: colors.surface,
|
|
@@ -4,5 +4,6 @@ import HSliderLightMobile from "./HSliderLightMobile";
|
|
|
4
4
|
import HSliderDetailsMobile from "./HSliderDetailsMobile";
|
|
5
5
|
import { Box } from "@mui/material";
|
|
6
6
|
export default function HTabColorAdjustmentMobile(props) {
|
|
7
|
+
console.log(`[HTabColorAdjustmentMobile TEMPERATURE] Passing down tempScore: ${props.tempScore}`);
|
|
7
8
|
return (_jsxs(Box, { ref: props.innerRef, children: [props.activeSubPanel === "light" && _jsx(HSliderLightMobile, { exposureScore: props.exposureScore, contrastScore: props.contrastScore, highlightsScore: props.highlightsScore, shadowScore: props.shadowScore, whiteScore: props.whiteScore, blackScore: props.blackScore, isBatchMode: props.isBatchMode, onExposureChange: props.onExposureChange, onContrastChange: props.onContrastChange, onHighlightsChange: props.onHighlightsChange, onShadowsChange: props.onShadowsChange, onWhitesChange: props.onWhitesChange, onBlacksChange: props.onBlacksChange, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd }), props.activeSubPanel === "color" && _jsx(HSliderColorMobile, { tempScore: props.tempScore, tintScore: props.tintScore, vibranceScore: props.vibranceScore, saturationScore: props.saturationScore, isBatchMode: props.isBatchMode, setTempScore: props.setTempScore, setTintScore: props.setTintScore, setVibranceScore: props.setVibranceScore, setSaturationScore: props.setSaturationScore, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd }), props.activeSubPanel === "details" && _jsx(HSliderDetailsMobile, { clarityScore: props.clarityScore, sharpnessScore: props.sharpnessScore, isBatchMode: props.isBatchMode, onClarityChange: props.onClarityChange, onSharpnessChange: props.onSharpnessChange, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd })] }));
|
|
8
9
|
}
|