@yogiswara/honcho-editor-ui 2.7.12 → 2.7.14

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 (139) hide show
  1. package/package.json +1 -1
  2. package/dist/color.d.ts +0 -9
  3. package/dist/color.js +0 -9
  4. package/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +0 -8
  5. package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +0 -28
  6. package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -10
  7. package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -81
  8. package/dist/components/editor/HAccordionAspectRatio.d.ts +0 -14
  9. package/dist/components/editor/HAccordionAspectRatio.js +0 -102
  10. package/dist/components/editor/HAccordionColor.d.ts +0 -16
  11. package/dist/components/editor/HAccordionColor.js +0 -282
  12. package/dist/components/editor/HAccordionColorAdjustment.d.ts +0 -35
  13. package/dist/components/editor/HAccordionColorAdjustment.js +0 -31
  14. package/dist/components/editor/HAccordionDetails.d.ts +0 -12
  15. package/dist/components/editor/HAccordionDetails.js +0 -157
  16. package/dist/components/editor/HAccordionLight.d.ts +0 -20
  17. package/dist/components/editor/HAccordionLight.js +0 -414
  18. package/dist/components/editor/HAccordionPreset.d.ts +0 -23
  19. package/dist/components/editor/HAccordionPreset.js +0 -50
  20. package/dist/components/editor/HAlertBox.d.ts +0 -8
  21. package/dist/components/editor/HAlertBox.js +0 -55
  22. package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
  23. package/dist/components/editor/HAspectRatioMobile.js +0 -1
  24. package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +0 -55
  25. package/dist/components/editor/HBulkAccordionColorAdjustment.js +0 -31
  26. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +0 -20
  27. package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +0 -121
  28. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +0 -12
  29. package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +0 -65
  30. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +0 -28
  31. package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +0 -177
  32. package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +0 -53
  33. package/dist/components/editor/HBulkColorAdjustmentMobile.js +0 -16
  34. package/dist/components/editor/HBulkColorMobile.d.ts +0 -20
  35. package/dist/components/editor/HBulkColorMobile.js +0 -121
  36. package/dist/components/editor/HBulkDetailsMobile.d.ts +0 -12
  37. package/dist/components/editor/HBulkDetailsMobile.js +0 -65
  38. package/dist/components/editor/HBulkLightMobile.d.ts +0 -28
  39. package/dist/components/editor/HBulkLightMobile.js +0 -192
  40. package/dist/components/editor/HBulkPreset.d.ts +0 -24
  41. package/dist/components/editor/HBulkPreset.js +0 -43
  42. package/dist/components/editor/HBulkPresetMobile.d.ts +0 -15
  43. package/dist/components/editor/HBulkPresetMobile.js +0 -26
  44. package/dist/components/editor/HDialogBox.d.ts +0 -18
  45. package/dist/components/editor/HDialogBox.js +0 -51
  46. package/dist/components/editor/HDialogCopy.d.ts +0 -40
  47. package/dist/components/editor/HDialogCopy.js +0 -80
  48. package/dist/components/editor/HFooter.d.ts +0 -12
  49. package/dist/components/editor/HFooter.js +0 -24
  50. package/dist/components/editor/HHeaderEditor.d.ts +0 -17
  51. package/dist/components/editor/HHeaderEditor.js +0 -36
  52. package/dist/components/editor/HImageEditorBulkDekstop.d.ts +0 -15
  53. package/dist/components/editor/HImageEditorBulkDekstop.js +0 -29
  54. package/dist/components/editor/HImageEditorBulkMobile.d.ts +0 -72
  55. package/dist/components/editor/HImageEditorBulkMobile.js +0 -81
  56. package/dist/components/editor/HImageEditorDekstop.d.ts +0 -15
  57. package/dist/components/editor/HImageEditorDekstop.js +0 -29
  58. package/dist/components/editor/HImageEditorMobile.d.ts +0 -51
  59. package/dist/components/editor/HImageEditorMobile.js +0 -92
  60. package/dist/components/editor/HImageEditorMobileLayout.d.ts +0 -14
  61. package/dist/components/editor/HImageEditorMobileLayout.js +0 -58
  62. package/dist/components/editor/HModalEditorDekstop.d.ts +0 -13
  63. package/dist/components/editor/HModalEditorDekstop.js +0 -22
  64. package/dist/components/editor/HModalMobile.d.ts +0 -13
  65. package/dist/components/editor/HModalMobile.js +0 -7
  66. package/dist/components/editor/HPresetDelete.d.ts +0 -7
  67. package/dist/components/editor/HPresetDelete.js +0 -7
  68. package/dist/components/editor/HPresetOptionMenu.d.ts +0 -9
  69. package/dist/components/editor/HPresetOptionMenu.js +0 -20
  70. package/dist/components/editor/HSliderColorMobile.d.ts +0 -16
  71. package/dist/components/editor/HSliderColorMobile.js +0 -270
  72. package/dist/components/editor/HSliderDetailsMobile.d.ts +0 -12
  73. package/dist/components/editor/HSliderDetailsMobile.js +0 -154
  74. package/dist/components/editor/HSliderLightMobile.d.ts +0 -20
  75. package/dist/components/editor/HSliderLightMobile.js +0 -420
  76. package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
  77. package/dist/components/editor/HTabAspectRatioMobile.js +0 -1
  78. package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +0 -33
  79. package/dist/components/editor/HTabColorAdjustmentMobile.js +0 -16
  80. package/dist/components/editor/HTabPresetMobile.d.ts +0 -14
  81. package/dist/components/editor/HTabPresetMobile.js +0 -10
  82. package/dist/components/editor/HTextField.d.ts +0 -14
  83. package/dist/components/editor/HTextField.js +0 -51
  84. package/dist/components/editor/HWatermarkView.d.ts +0 -6
  85. package/dist/components/editor/HWatermarkView.js +0 -16
  86. package/dist/components/editor/svg/Tick.d.ts +0 -2
  87. package/dist/components/editor/svg/Tick.js +0 -6
  88. package/dist/components/modal/HModalDialog.d.ts +0 -12
  89. package/dist/components/modal/HModalDialog.js +0 -18
  90. package/dist/components/modal/HModalRename.d.ts +0 -14
  91. package/dist/components/modal/HModalRename.js +0 -35
  92. package/dist/hooks/demo/HonchoEditorBulkDemo.d.ts +0 -3
  93. package/dist/hooks/demo/HonchoEditorBulkDemo.js +0 -410
  94. package/dist/hooks/demo/HonchoEditorSingleCleanDemo.d.ts +0 -3
  95. package/dist/hooks/demo/HonchoEditorSingleCleanDemo.js +0 -354
  96. package/dist/hooks/demo/index.d.ts +0 -2
  97. package/dist/hooks/demo/index.js +0 -2
  98. package/dist/hooks/editor/type.d.ts +0 -174
  99. package/dist/hooks/editor/type.js +0 -1
  100. package/dist/hooks/editor/useHonchoEditorBulk.d.ts +0 -96
  101. package/dist/hooks/editor/useHonchoEditorBulk.js +0 -427
  102. package/dist/hooks/editor/useHonchoEditorSingle.d.ts +0 -44
  103. package/dist/hooks/editor/useHonchoEditorSingle.js +0 -162
  104. package/dist/hooks/useAdjustmentHistory.d.ts +0 -97
  105. package/dist/hooks/useAdjustmentHistory.js +0 -493
  106. package/dist/hooks/useAdjustmentHistoryBatch.d.ts +0 -177
  107. package/dist/hooks/useAdjustmentHistoryBatch.js +0 -1189
  108. package/dist/hooks/useGallerySwipe.d.ts +0 -36
  109. package/dist/hooks/useGallerySwipe.js +0 -344
  110. package/dist/hooks/usePaging.d.ts +0 -89
  111. package/dist/hooks/usePaging.js +0 -211
  112. package/dist/hooks/usePreset.d.ts +0 -82
  113. package/dist/hooks/usePreset.js +0 -344
  114. package/dist/index.d.ts +0 -41
  115. package/dist/index.js +0 -44
  116. package/dist/lib/context/EditorContext.d.ts +0 -28
  117. package/dist/lib/context/EditorContext.js +0 -60
  118. package/dist/lib/context/EditorProcessingService.d.ts +0 -36
  119. package/dist/lib/context/EditorProcessingService.js +0 -249
  120. package/dist/lib/editor/honcho-editor.d.ts +0 -324
  121. package/dist/lib/editor/honcho-editor.js +0 -825
  122. package/dist/lib/hooks/useEditor.d.ts +0 -22
  123. package/dist/lib/hooks/useEditor.js +0 -35
  124. package/dist/lib/hooks/useEditorHeadless.d.ts +0 -34
  125. package/dist/lib/hooks/useEditorHeadless.js +0 -207
  126. package/dist/lib/hooks/useImageProcessor.d.ts +0 -18
  127. package/dist/lib/hooks/useImageProcessor.js +0 -113
  128. package/dist/setupTests.d.ts +0 -1
  129. package/dist/setupTests.js +0 -1
  130. package/dist/themes/colors.d.ts +0 -12
  131. package/dist/themes/colors.js +0 -12
  132. package/dist/themes/honchoTheme.d.ts +0 -25
  133. package/dist/themes/honchoTheme.js +0 -94
  134. package/dist/utils/adjustment.d.ts +0 -6
  135. package/dist/utils/adjustment.js +0 -48
  136. package/dist/utils/imageLoader.d.ts +0 -11
  137. package/dist/utils/imageLoader.js +0 -48
  138. package/dist/utils/isMobile.d.ts +0 -1
  139. package/dist/utils/isMobile.js +0 -5
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Accordion, AccordionDetails, AccordionSummary, CardMedia, Stack, Typography } from "@mui/material";
3
- import HAccordionColor from "./HAccordionColor";
4
- import HAccordionLight from "./HAccordionLight";
5
- import HAccordionDetails from "./HAccordionDetails";
6
- import useHonchoTypography from "../../themes/honchoTheme";
7
- import useColors from '../../themes/colors';
8
- export default function HAccordionColorAdjustment(props) {
9
- const typography = useHonchoTypography();
10
- const colors = useColors();
11
- const accordionStyle = {
12
- backgroundColor: colors.onBackground,
13
- color: colors.surface,
14
- '& .MuiAccordionSummary-root': {
15
- backgroundColor: colors.onBackground,
16
- color: colors.surface,
17
- },
18
- '& .MuiAccordionDetails-root': {
19
- backgroundColor: colors.onBackground,
20
- color: colors.surface,
21
- },
22
- '& .MuiTypography-root': {
23
- color: colors.surface,
24
- },
25
- '& .MuiSvgIcon-root': {
26
- color: colors.surface,
27
- }
28
- };
29
- const isPanelExpanded = (panelName) => props.expandedPanels.includes(panelName);
30
- return (_jsx(_Fragment, { children: _jsxs(Stack, { direction: "column", sx: { accordionStyle }, children: [_jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('whiteBalance'), onChange: props.onPanelChange('whiteBalance'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: 0 }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Color" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('whiteBalance') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: "4px" }, children: _jsx(HAccordionColor, { TempScore: props.tempScore, TintScore: props.tintScore, VibranceScore: props.vibranceScore, SaturationScore: props.saturationScore, onTempChange: props.setTempScore, onTintChange: props.setTintScore, onVibranceChange: props.setVibranceScore, onSaturationChange: props.setSaturationScore, isBatchMode: props.isBatchMode, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd }) })] }), _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('light'), onChange: props.onPanelChange('light'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: 0 }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Light" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('light') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: "4px" }, children: _jsx(HAccordionLight, { ExposureScore: props.exposureScore, ContrastScore: props.contrastScore, HighlightsScore: props.HighlightsScore, ShadowsScore: props.shadowsScore, WhitesScore: props.whitesScore, BlacksScore: props.blacksScore, onExposureChange: props.setExposureScore, onContrastChange: props.setContrastScore, onHighlightsChange: props.setHighlightsScore, onShadowsChange: props.setShadowsScore, onWhitesChange: props.setWhitesScore, onBlacksChange: props.setBlacksScore, isBatchMode: props.isBatchMode, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd }) })] }), _jsxs(Accordion, { sx: accordionStyle, expanded: isPanelExpanded('details'), onChange: props.onPanelChange('details'), disableGutters: true, children: [_jsx(AccordionSummary, { sx: { pr: 0 }, children: _jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { width: '100%' }, children: [_jsx(Typography, { sx: { ...typography.titleMedium }, children: "Details" }), _jsx(CardMedia, { component: "img", image: isPanelExpanded('details') ? "/v1/svg/expanded-editor.svg" : "/v1/svg/expand-editor.svg", sx: { width: "11.67px", height: "5.83px" } })] }) }), _jsx(AccordionDetails, { sx: { pr: "4px" }, children: _jsx(HAccordionDetails, { ClarityScore: props.clarityScore, SharpnessScore: props.sharpnessScore, onClarityChange: props.setClarityScore, onSharpnessChange: props.setSharpnessScore, isBatchMode: props.isBatchMode, onDragStart: props.onDragStart, onDragEnd: props.onDragEnd }) })] })] }) }));
31
- }
@@ -1,12 +0,0 @@
1
- import { AdjustmentState } from '../../hooks/editor/type';
2
- interface Props {
3
- ClarityScore: number;
4
- SharpnessScore: number;
5
- onClarityChange: (field: keyof AdjustmentState, value: number) => void;
6
- onSharpnessChange: (field: keyof AdjustmentState, value: number) => void;
7
- onDragStart: () => void;
8
- onDragEnd: () => void;
9
- isBatchMode: boolean;
10
- }
11
- export default function HAccordionDetails(props: Props): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,157 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Stack, Slider, Typography, TextField } from "@mui/material";
3
- import useHonchoTypography from "../../themes/honchoTheme";
4
- import useColors from '../../themes/colors';
5
- export default function HAccordionDetails(props) {
6
- const typography = useHonchoTypography();
7
- const colors = useColors();
8
- const formatValue = (value) => {
9
- if (value > 0)
10
- return `+${value}`;
11
- return value.toString();
12
- };
13
- const focusedInputStyle = {
14
- backgroundColor: "#1C1B1FB2",
15
- borderRadius: '5px 5px 0px 0px',
16
- borderBottom: 'none',
17
- pl: '2px',
18
- };
19
- const handleInputChange = (event, min, max, onChange) => {
20
- const value = event.target.value;
21
- if (value === '+' || value === '-')
22
- return;
23
- let numericValue = parseInt(value, 10);
24
- if (isNaN(numericValue))
25
- numericValue = 0;
26
- const clampedValue = Math.max(min, Math.min(max, numericValue));
27
- onChange(clampedValue);
28
- };
29
- return (_jsx(_Fragment, { children: _jsxs(Stack, { children: [_jsxs(Stack, { direction: "column", gap: "4px", sx: { pt: '6px', pb: '2px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "clarity-input", sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Clarity" }), _jsx(TextField, { hiddenLabel: true, id: "clarity-input", value: formatValue(props.ClarityScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, (val) => props.onClarityChange("clarityScore", val)), sx: {
30
- width: "40px",
31
- height: "10px",
32
- alignItems: "center",
33
- textAlign: "right",
34
- display: "flex",
35
- '& .MuiFilledInput-root': {
36
- // backgroundColor: 'transparent',
37
- // border: '',
38
- '&:before': {
39
- borderBottom: 'none',
40
- },
41
- '&:after': {
42
- borderBottom: 'none',
43
- },
44
- '&:hover:not(.Mui-disabled):before': {
45
- borderBottom: 'none',
46
- },
47
- '&.Mui-focused:after': {
48
- borderBottom: 'none',
49
- },
50
- },
51
- '& .MuiFilledInput-input': {
52
- textAlign: 'right',
53
- padding: 0,
54
- pr: '4px',
55
- color: colors.surface,
56
- fontSize: "14px",
57
- },
58
- '& .Mui-focused': {
59
- '& .MuiFilledInput-input': {
60
- backgroundColor: "#1C1B1FB2",
61
- textAlign: 'right',
62
- borderRadius: '5px 5px 0px 0px',
63
- borderBottom: 'none',
64
- // pr: '8px',
65
- pl: '2px',
66
- }
67
- }
68
- } })] }), _jsx(Slider, { sx: {
69
- width: "200px",
70
- color: colors.onSurfaceVariant,
71
- '& .MuiSlider-rail': {
72
- background: colors.onSurfaceVariant,
73
- opacity: 1,
74
- },
75
- '& .MuiSlider-thumb': {
76
- background: colors.surface,
77
- opacity: 1,
78
- boxShadow: 'none',
79
- },
80
- }, size: "small", value: props.ClarityScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onClarityChange("clarityScore", newValue), onDoubleClick: () => props.onClarityChange("clarityScore", 0), onMouseDown: () => {
81
- if (!props.isBatchMode) {
82
- props.onDragStart();
83
- }
84
- }, onMouseUp: () => {
85
- props.onDragEnd();
86
- }, onTouchStart: () => {
87
- if (!props.isBatchMode) {
88
- props.onDragStart();
89
- }
90
- }, onTouchEnd: () => {
91
- props.onDragEnd();
92
- } })] }), _jsxs(Stack, { direction: "column", gap: "3px", sx: { pt: '10px', pb: '0px', px: '0px', mx: '0px', '&:focus-within .MuiFilledInput-input': focusedInputStyle, }, children: [_jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [_jsx(Typography, { component: "label", htmlFor: "sharpness-input", sx: { ...typography.bodyMedium, userSelect: 'none' }, children: "Sharpness" }), _jsx(TextField, { hiddenLabel: true, id: "sharpness-input", value: formatValue(props.SharpnessScore), variant: "filled", onChange: (e) => handleInputChange(e, -100, 100, (val) => props.onSharpnessChange("sharpnessScore", val)), sx: {
93
- width: "40px",
94
- height: "10px",
95
- alignItems: "center",
96
- textAlign: "right",
97
- display: "flex",
98
- '& .MuiFilledInput-root': {
99
- backgroundColor: 'transparent',
100
- borderRadius: "0px",
101
- border: 'none',
102
- '&:before': {
103
- borderBottom: 'none',
104
- },
105
- '&:after': {
106
- borderBottom: 'none',
107
- },
108
- '&:hover:not(.Mui-disabled):before': {
109
- borderBottom: 'none',
110
- },
111
- '&.Mui-focused:after': {
112
- borderBottom: 'none',
113
- },
114
- },
115
- '& .MuiFilledInput-input': {
116
- textAlign: 'right',
117
- padding: 0,
118
- pr: '4px',
119
- color: colors.surface,
120
- fontSize: "14px",
121
- },
122
- '& .Mui-focused': {
123
- '& .MuiFilledInput-input': {
124
- backgroundColor: "#1C1B1FB2",
125
- textAlign: 'right',
126
- borderRadius: '5px 5px 0px 0px',
127
- borderBottom: 'none',
128
- // pr: '8px',
129
- pl: '2px',
130
- }
131
- }
132
- } })] }), _jsx(Slider, { sx: {
133
- width: "200px",
134
- color: colors.onSurfaceVariant,
135
- '& .MuiSlider-rail': {
136
- background: colors.onSurfaceVariant,
137
- opacity: 1,
138
- },
139
- '& .MuiSlider-thumb': {
140
- background: colors.surface,
141
- opacity: 1,
142
- boxShadow: 'none',
143
- },
144
- }, size: "small", value: props.SharpnessScore, step: 1, min: -100, max: 100, onChange: (_event, newValue) => props.onSharpnessChange("sharpnessScore", newValue), onDoubleClick: () => props.onSharpnessChange("sharpnessScore", 0), onMouseDown: () => {
145
- if (!props.isBatchMode) {
146
- props.onDragStart();
147
- }
148
- }, onMouseUp: () => {
149
- props.onDragEnd();
150
- }, onTouchStart: () => {
151
- if (!props.isBatchMode) {
152
- props.onDragStart();
153
- }
154
- }, onTouchEnd: () => {
155
- props.onDragEnd();
156
- } })] })] }) }));
157
- }
@@ -1,20 +0,0 @@
1
- import { AdjustmentState } from '../../hooks/editor/type';
2
- interface Props {
3
- ExposureScore: number;
4
- ContrastScore: number;
5
- HighlightsScore: number;
6
- ShadowsScore: number;
7
- WhitesScore: number;
8
- BlacksScore: number;
9
- isBatchMode: boolean;
10
- onExposureChange: (field: keyof AdjustmentState, value: number) => void;
11
- onContrastChange: (field: keyof AdjustmentState, value: number) => void;
12
- onHighlightsChange: (field: keyof AdjustmentState, value: number) => void;
13
- onShadowsChange: (field: keyof AdjustmentState, value: number) => void;
14
- onWhitesChange: (field: keyof AdjustmentState, value: number) => void;
15
- onBlacksChange: (field: keyof AdjustmentState, value: number) => void;
16
- onDragStart: () => void;
17
- onDragEnd: () => void;
18
- }
19
- export default function HAccordionLight(props: Props): import("react/jsx-runtime").JSX.Element;
20
- export {};