@yogiswara/honcho-editor-ui 3.1.14 → 3.1.16

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.
@@ -23,7 +23,6 @@ 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}`);
27
26
  const handleChange = (event, newValue) => {
28
27
  props.setActivePanel(newValue);
29
28
  };
@@ -114,7 +114,7 @@ export default function HSliderColorMobile(props) {
114
114
  color: colors.surface,
115
115
  width: "40px", // Keep the fixed width for alignment
116
116
  textAlign: "right", // Keep the text alignment
117
- }, children: formatValue(props.tempScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%' }, children: [_jsx("div", { style: {
117
+ }, children: formatValue(props.tempScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%', pt: "5px" }, children: [_jsx("div", { style: {
118
118
  position: 'absolute',
119
119
  top: 0,
120
120
  bottom: 0,
@@ -122,7 +122,8 @@ export default function HSliderColorMobile(props) {
122
122
  left: '16px',
123
123
  right: '16px',
124
124
  zIndex: 1,
125
- }, onDoubleClick: tempInput.handleDoubleClick }), _jsx(Slider, { sx: {
125
+ touchAction: 'manipulation', // ✅ 1. Add this to make double-tap reliable on mobile
126
+ } }), _jsx(Slider, { sx: {
126
127
  width: "100%",
127
128
  color: colors.surface,
128
129
  '& .MuiSlider-rail': {
@@ -141,80 +142,124 @@ export default function HSliderColorMobile(props) {
141
142
  touchAction: 'none',
142
143
  zIndex: 2, // Thumb is on top of the overlay
143
144
  }
144
- }, slotProps: { thumb: { ref: tempSliderRef } }, size: "small", value: props.tempScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setTempScore("tempScore", newValue) })] }), _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, userSelect: 'none' }, onDoubleClick: tintInput.handleDoubleClick, children: "Tint" }), _jsx(Typography, { sx: {
145
+ }, slotProps: {
146
+ thumb: {
147
+ ref: tempSliderRef,
148
+ onDoubleClick: tempInput.handleDoubleClick
149
+ }
150
+ }, size: "small", value: props.tempScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setTempScore("tempScore", newValue) })] }), _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, userSelect: 'none' }, onDoubleClick: tintInput.handleDoubleClick, children: "Tint" }), _jsx(Typography, { sx: {
145
151
  ...typography.bodyMedium, // Use your standard typography
146
152
  color: colors.surface,
147
153
  width: "40px", // Keep the fixed width for alignment
148
154
  textAlign: "right", // Keep the text alignment
149
- }, children: formatValue(props.tintScore) })] }), _jsx(Slider, { sx: {
150
- width: "100%",
151
- color: colors.surface,
152
- '& .MuiSlider-rail': {
153
- background: tintGradient,
154
- opacity: 1,
155
- },
156
- '& .MuiSlider-track': {
157
- background: 'transparent',
158
- border: 'none',
159
- },
160
- '& .MuiSlider-thumb': {
161
- boxShadow: 'none',
162
- pointerEvents: 'auto',
163
- touchAction: 'none',
164
- }
165
- }, slotProps: {
166
- thumb: {
167
- ref: tintSliderRef
168
- }
169
- }, size: "small", value: props.tintScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setTintScore("tintScore", newValue), onDoubleClick: tintInput.handleDoubleClick }), _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, userSelect: 'none' }, onDoubleClick: vibranceInput.handleDoubleClick, children: "Vibrance" }), _jsx(Typography, { sx: {
155
+ }, children: formatValue(props.tintScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%', pt: "5px" }, children: [_jsx("div", { style: {
156
+ position: 'absolute',
157
+ top: 0,
158
+ bottom: 0,
159
+ // Offset by 16px to align with the slider's track inside the component
160
+ left: '16px',
161
+ right: '16px',
162
+ zIndex: 1,
163
+ touchAction: 'manipulation', // ✅ 1. Add this to make double-tap reliable on mobile
164
+ } }), _jsx(Slider, { sx: {
165
+ width: "100%",
166
+ color: colors.surface,
167
+ '& .MuiSlider-rail': {
168
+ background: tintGradient,
169
+ opacity: 1,
170
+ pointerEvents: 'none', // Track is not interactive
171
+ },
172
+ '& .MuiSlider-track': {
173
+ background: 'transparent',
174
+ border: 'none',
175
+ pointerEvents: 'none', // Track is not interactive
176
+ },
177
+ '& .MuiSlider-thumb': {
178
+ boxShadow: 'none',
179
+ pointerEvents: 'auto', // Thumb IS interactive
180
+ touchAction: 'none',
181
+ zIndex: 2, // Thumb is on top of the overlay
182
+ }
183
+ }, slotProps: {
184
+ thumb: {
185
+ ref: tintSliderRef,
186
+ onDoubleClick: tintInput.handleDoubleClick
187
+ }
188
+ }, size: "small", value: props.tintScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setTintScore("tintScore", newValue) })] }), _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, userSelect: 'none' }, onDoubleClick: vibranceInput.handleDoubleClick, children: "Vibrance" }), _jsx(Typography, { sx: {
170
189
  ...typography.bodyMedium, // Use your standard typography
171
190
  color: colors.surface,
172
191
  width: "40px", // Keep the fixed width for alignment
173
192
  textAlign: "right", // Keep the text alignment
174
- }, children: formatValue(props.vibranceScore) })] }), _jsx(Slider, { sx: {
175
- width: "100%",
176
- color: colors.surface,
177
- '& .MuiSlider-rail': {
178
- background: fullTrackGradient,
179
- opacity: 1,
180
- },
181
- '& .MuiSlider-track': {
182
- background: 'transparent',
183
- border: 'none',
184
- },
185
- '& .MuiSlider-thumb': {
186
- boxShadow: 'none',
187
- pointerEvents: 'auto',
188
- touchAction: 'none',
189
- }
190
- }, slotProps: {
191
- thumb: {
192
- ref: vibranceSliderRef
193
- }
194
- }, size: "small", value: props.vibranceScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setVibranceScore("vibranceScore", newValue), onDoubleClick: vibranceInput.handleDoubleClick }), _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, userSelect: 'none' }, onDoubleClick: saturationInput.handleDoubleClick, children: "Saturation" }), _jsx(Typography, { sx: {
193
+ }, children: formatValue(props.vibranceScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%', pt: "5px" }, children: [_jsx("div", { style: {
194
+ position: 'absolute',
195
+ top: 0,
196
+ bottom: 0,
197
+ // Offset by 16px to align with the slider's track inside the component
198
+ left: '16px',
199
+ right: '16px',
200
+ zIndex: 1,
201
+ touchAction: 'manipulation', // ✅ 1. Add this to make double-tap reliable on mobile
202
+ } }), _jsx(Slider, { sx: {
203
+ width: "100%",
204
+ color: colors.surface,
205
+ '& .MuiSlider-rail': {
206
+ background: fullTrackGradient,
207
+ opacity: 1,
208
+ pointerEvents: 'none', // Track is not interactive
209
+ },
210
+ '& .MuiSlider-track': {
211
+ background: 'transparent',
212
+ border: 'none',
213
+ pointerEvents: 'none', // Track is not interactive
214
+ },
215
+ '& .MuiSlider-thumb': {
216
+ boxShadow: 'none',
217
+ pointerEvents: 'auto', // Thumb IS interactive
218
+ touchAction: 'none',
219
+ zIndex: 2, // Thumb is on top of the overlay
220
+ }
221
+ }, slotProps: {
222
+ thumb: {
223
+ ref: vibranceSliderRef,
224
+ onDoubleClick: vibranceInput.handleDoubleClick
225
+ }
226
+ }, size: "small", value: props.vibranceScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setVibranceScore("vibranceScore", newValue) })] }), _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, userSelect: 'none' }, onDoubleClick: saturationInput.handleDoubleClick, children: "Saturation" }), _jsx(Typography, { sx: {
195
227
  ...typography.bodyMedium, // Use your standard typography
196
228
  color: colors.surface,
197
229
  width: "40px", // Keep the fixed width for alignment
198
230
  textAlign: "right", // Keep the text alignment
199
- }, children: formatValue(props.saturationScore) })] }), _jsx(Slider, { sx: {
200
- width: "100%",
201
- color: colors.surface,
202
- '& .MuiSlider-rail': {
203
- background: fullTrackGradient,
204
- opacity: 1,
205
- },
206
- '& .MuiSlider-track': {
207
- background: 'transparent',
208
- border: 'none',
209
- },
210
- '& .MuiSlider-thumb': {
211
- boxShadow: 'none',
212
- pointerEvents: 'auto',
213
- touchAction: 'none',
214
- }
215
- }, slotProps: {
216
- thumb: {
217
- ref: saturationSliderRef
218
- }
219
- }, size: "small", value: props.saturationScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setSaturationScore("saturationScore", newValue), onDoubleClick: saturationInput.handleDoubleClick })] }) }));
231
+ }, children: formatValue(props.saturationScore) })] }), _jsxs(Box, { sx: { position: 'relative', width: '100%', pt: "5px" }, children: [_jsx("div", { style: {
232
+ position: 'absolute',
233
+ top: 0,
234
+ bottom: 0,
235
+ // Offset by 16px to align with the slider's track inside the component
236
+ left: '16px',
237
+ right: '16px',
238
+ zIndex: 1,
239
+ touchAction: 'manipulation', // ✅ 1. Add this to make double-tap reliable on mobile
240
+ } }), _jsx(Slider, { sx: {
241
+ width: "100%",
242
+ color: colors.surface,
243
+ '& .MuiSlider-rail': {
244
+ background: fullTrackGradient,
245
+ opacity: 1,
246
+ pointerEvents: 'none',
247
+ },
248
+ '& .MuiSlider-track': {
249
+ background: 'transparent',
250
+ border: 'none',
251
+ pointerEvents: 'none',
252
+ },
253
+ '& .MuiSlider-thumb': {
254
+ boxShadow: 'none',
255
+ pointerEvents: 'auto',
256
+ touchAction: 'none',
257
+ zIndex: 2,
258
+ }
259
+ }, slotProps: {
260
+ thumb: {
261
+ ref: saturationSliderRef,
262
+ onDoubleClick: saturationInput.handleDoubleClick
263
+ }
264
+ }, size: "small", value: props.saturationScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.setSaturationScore("saturationScore", newValue) })] })] }) }));
220
265
  }
@@ -4,6 +4,5 @@ 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}`);
8
7
  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 })] }));
9
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yogiswara/honcho-editor-ui",
3
- "version": "3.1.14",
3
+ "version": "3.1.16",
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",