@yogiswara/honcho-editor-ui 3.3.4 → 3.4.1
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/GalleryAlbum/AlbumImageGallery.d.ts +14 -7
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +207 -5
- package/dist/components/editor/GalleryAlbum/ImageItemComponents.d.ts +25 -0
- package/dist/components/editor/GalleryAlbum/ImageItemComponents.js +179 -0
- package/dist/components/editor/GalleryAlbum/colorsGallery.d.ts +9 -0
- package/dist/components/editor/GalleryAlbum/colorsGallery.js +9 -0
- package/dist/components/editor/GalleryAlbum/svg/Tick.d.ts +2 -0
- package/dist/components/editor/GalleryAlbum/svg/Tick.js +6 -0
- package/dist/components/editor/HBulkAccordionColorAdjustment.js +1 -2
- package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +1 -1
- package/dist/components/editor/HBulkPreset.d.ts +3 -7
- package/dist/components/editor/HBulkPreset.js +21 -22
- package/dist/components/editor/HBulkPresetMobile.d.ts +2 -2
- package/dist/components/editor/HBulkPresetMobile.js +2 -2
- package/dist/components/editor/HImageEditorBulkMobile.d.ts +2 -2
- package/dist/hooks/demo/HonchoEditorBulkDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorBulkDemo.js +770 -411
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.js +882 -354
- package/dist/hooks/demo/index.d.ts +0 -2
- package/dist/hooks/demo/index.js +3 -2
- package/dist/hooks/editor/type.d.ts +15 -13
- package/dist/hooks/editor/useHonchoEditorBulk.d.ts +47 -5
- package/dist/hooks/editor/useHonchoEditorBulk.js +252 -133
- package/dist/hooks/useAdjustmentHistory.js +12 -12
- package/dist/hooks/useAdjustmentHistoryBatch.d.ts +33 -31
- package/dist/hooks/useAdjustmentHistoryBatch.js +703 -170
- package/dist/hooks/usePreset.js +12 -12
- package/dist/index.d.ts +5 -7
- package/dist/index.js +5 -4
- package/dist/services/type.d.ts +14 -0
- package/dist/utils/adjustment.d.ts +1 -1
- package/dist/utils/adjustment.js +15 -14
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.js +11 -0
- package/package.json +4 -2
package/dist/hooks/usePreset.js
CHANGED
|
@@ -138,18 +138,18 @@ export function usePreset(controller, firebaseUid, options = {}) {
|
|
|
138
138
|
id: `temp-${Date.now()}`, // Use a temporary ID
|
|
139
139
|
name: name,
|
|
140
140
|
is_default: false,
|
|
141
|
-
temperature: settings.tempScore,
|
|
142
|
-
tint: settings.tintScore,
|
|
143
|
-
saturation: settings.saturationScore,
|
|
144
|
-
vibrance: settings.vibranceScore,
|
|
145
|
-
exposure: settings.exposureScore,
|
|
146
|
-
contrast: settings.contrastScore,
|
|
147
|
-
highlights: settings.highlightsScore,
|
|
148
|
-
shadows: settings.shadowsScore,
|
|
149
|
-
whites: settings.whitesScore,
|
|
150
|
-
blacks: settings.blacksScore,
|
|
151
|
-
clarity: settings.clarityScore,
|
|
152
|
-
sharpness: settings.sharpnessScore,
|
|
141
|
+
temperature: settings.tempScore || 0,
|
|
142
|
+
tint: settings.tintScore || 0,
|
|
143
|
+
saturation: settings.saturationScore || 0,
|
|
144
|
+
vibrance: settings.vibranceScore || 0,
|
|
145
|
+
exposure: settings.exposureScore || 0,
|
|
146
|
+
contrast: settings.contrastScore || 0,
|
|
147
|
+
highlights: settings.highlightsScore || 0,
|
|
148
|
+
shadows: settings.shadowsScore || 0,
|
|
149
|
+
whites: settings.whitesScore || 0,
|
|
150
|
+
blacks: settings.blacksScore || 0,
|
|
151
|
+
clarity: settings.clarityScore || 0,
|
|
152
|
+
sharpness: settings.sharpnessScore || 0,
|
|
153
153
|
};
|
|
154
154
|
// Add the new preset to the local state immediately
|
|
155
155
|
setPresets(prev => [...prev, newPreset]);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { HonchoEditorBulkDemo } from './hooks/demo/HonchoEditorBulkDemo';
|
|
2
|
-
export { HonchoEditorSingleCleanDemo } from './hooks/demo/HonchoEditorSingleCleanDemo';
|
|
3
1
|
export { useHonchoEditorSingle } from './hooks/editor/useHonchoEditorSingle';
|
|
4
2
|
export { useHonchoEditorBulk } from './hooks/editor/useHonchoEditorBulk';
|
|
5
|
-
export type { Controller, AdjustmentState, Preset, ImageItem, ColorAdjustment, CreateEditorTaskRequest, EditorHistoryEntry, GetGalleryUpdateTimestampResponse, GetHistoryResponse, } from './hooks/editor/type';
|
|
3
|
+
export type { Controller, AdjustmentState, Preset, ImageItem, ColorAdjustment, CreateEditorTaskRequest, EditorHistoryEntry, GetGalleryUpdateTimestampResponse, GetHistoryResponse, EditorConfig, GallerySetup, ResponseGalleryPaging, Gallery, Content } from './hooks/editor/type';
|
|
6
4
|
export type { PhotoData } from './hooks/editor/useHonchoEditorBulk';
|
|
7
|
-
export
|
|
5
|
+
export { default as AlbumImageGalleryInfinite } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
6
|
+
export { default as ImageItemComponents } from './components/editor/GalleryAlbum/ImageItemComponents';
|
|
8
7
|
export { partialAdjustmentStateToAdjustmentState, mapAdjustmentStateToAdjustmentEditor, mapColorAdjustmentToAdjustmentState, mapAdjustmentStateToColorAdjustment } from './utils/adjustment';
|
|
9
8
|
export { default as HHeaderEditor } from './components/editor/HHeaderEditor';
|
|
10
9
|
export { default as HFooter } from './components/editor/HFooter';
|
|
@@ -24,8 +23,7 @@ export { default as HWatermarkView } from './components/editor/HWatermarkView';
|
|
|
24
23
|
export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
25
24
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
26
25
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
27
|
-
export {
|
|
28
|
-
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
26
|
+
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItemComponents';
|
|
29
27
|
export { EditorProvider, useEditorContext } from './lib/context/EditorContext';
|
|
30
28
|
export { useImageProcessor } from './lib/hooks/useImageProcessor';
|
|
31
29
|
export { useEditorHeadless } from './lib/hooks/useEditorHeadless';
|
|
@@ -36,7 +34,7 @@ export { default as HModalRename } from './components/modal/HModalRename';
|
|
|
36
34
|
export { default as HTabColorAdjustmentMobile } from './components/editor/HTabColorAdjustmentMobile';
|
|
37
35
|
export { default as HTabPresetMobile } from './components/editor/HTabPresetMobile';
|
|
38
36
|
export { useAdjustmentHistory, type UseAdjustmentHistoryReturn, type HistoryInfo, type HistoryActions, type HistoryConfig } from './hooks/useAdjustmentHistory';
|
|
39
|
-
export { useAdjustmentHistoryBatch, type UseAdjustmentHistoryBatchReturn, type BatchAdjustmentState, type ImageAdjustmentConfig, type
|
|
37
|
+
export { useAdjustmentHistoryBatch, type UseAdjustmentHistoryBatchReturn, type BatchAdjustmentState, type ImageAdjustmentConfig, type BatchHistoryActions, type BatchHistoryState, type HistoryAdjustmentBatch, type HistoryAdjustmentEntry } from './hooks/useAdjustmentHistoryBatch';
|
|
40
38
|
export { usePreset, type UsePresetReturn, type PresetInfo, type PresetActions, type PresetOptions } from './hooks/usePreset';
|
|
41
39
|
export { usePaging, type UsePagingReturn, type PagingInfo, type PagingActions, type PagingOptions } from './hooks/usePaging';
|
|
42
40
|
export { default as useColors } from './themes/colors';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// START: delete later
|
|
2
|
-
export { HonchoEditorBulkDemo } from './hooks/demo/HonchoEditorBulkDemo';
|
|
3
|
-
export { HonchoEditorSingleCleanDemo } from './hooks/demo/HonchoEditorSingleCleanDemo';
|
|
2
|
+
// export { HonchoEditorBulkDemo } from './hooks/demo/HonchoEditorBulkDemo';
|
|
3
|
+
// export { HonchoEditorSingleCleanDemo } from './hooks/demo/HonchoEditorSingleCleanDemo';
|
|
4
4
|
// END
|
|
5
5
|
export { useHonchoEditorSingle } from './hooks/editor/useHonchoEditorSingle';
|
|
6
6
|
export { useHonchoEditorBulk } from './hooks/editor/useHonchoEditorBulk';
|
|
7
|
+
export { default as AlbumImageGalleryInfinite } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
8
|
+
export { default as ImageItemComponents } from './components/editor/GalleryAlbum/ImageItemComponents';
|
|
7
9
|
export { partialAdjustmentStateToAdjustmentState, mapAdjustmentStateToAdjustmentEditor, mapColorAdjustmentToAdjustmentState, mapAdjustmentStateToColorAdjustment } from './utils/adjustment';
|
|
8
10
|
export { default as HHeaderEditor } from './components/editor/HHeaderEditor';
|
|
9
11
|
export { default as HFooter } from './components/editor/HFooter';
|
|
@@ -23,8 +25,7 @@ export { default as HWatermarkView } from './components/editor/HWatermarkView';
|
|
|
23
25
|
export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
24
26
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
25
27
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
26
|
-
export {
|
|
27
|
-
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
28
|
+
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItemComponents';
|
|
28
29
|
export { EditorProvider, useEditorContext } from './lib/context/EditorContext';
|
|
29
30
|
export { useImageProcessor } from './lib/hooks/useImageProcessor';
|
|
30
31
|
export { useEditorHeadless } from './lib/hooks/useEditorHeadless';
|
package/dist/services/type.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AdjustmentValues } from "../lib/editor/honcho-editor";
|
|
1
2
|
export interface Content {
|
|
2
3
|
key: string;
|
|
3
4
|
path: string;
|
|
@@ -154,6 +155,19 @@ export interface ResponseGalleryPaging {
|
|
|
154
155
|
next_page: number;
|
|
155
156
|
sum_of_image?: number;
|
|
156
157
|
}
|
|
158
|
+
export interface GallerySetup {
|
|
159
|
+
src: string;
|
|
160
|
+
original: string;
|
|
161
|
+
srcSet?: string | string[] | undefined;
|
|
162
|
+
sizes?: string | string[] | undefined;
|
|
163
|
+
width: number;
|
|
164
|
+
height: number;
|
|
165
|
+
alt: string;
|
|
166
|
+
key: string;
|
|
167
|
+
frame?: string | null;
|
|
168
|
+
isSelected?: boolean | undefined;
|
|
169
|
+
adjustments?: Partial<AdjustmentValues>;
|
|
170
|
+
}
|
|
157
171
|
export interface ResponseSlideShow {
|
|
158
172
|
gallery: Gallery[];
|
|
159
173
|
limit: number;
|
|
@@ -2,6 +2,6 @@ import { ColorAdjustment } from "../hooks/editor/type";
|
|
|
2
2
|
import { AdjustmentState } from "../hooks/editor/type";
|
|
3
3
|
import { AdjustmentValues } from "../lib/editor/honcho-editor";
|
|
4
4
|
export declare function mapAdjustmentStateToAdjustmentEditor(state: AdjustmentState): AdjustmentValues;
|
|
5
|
-
export declare function mapColorAdjustmentToAdjustmentState(colors: ColorAdjustment): AdjustmentState;
|
|
5
|
+
export declare function mapColorAdjustmentToAdjustmentState(colors: ColorAdjustment, preset_id?: string): AdjustmentState;
|
|
6
6
|
export declare function mapAdjustmentStateToColorAdjustment(state: AdjustmentState): ColorAdjustment;
|
|
7
7
|
export declare function partialAdjustmentStateToAdjustmentState(partial: Partial<AdjustmentState>): AdjustmentState;
|
package/dist/utils/adjustment.js
CHANGED
|
@@ -14,7 +14,7 @@ export function mapAdjustmentStateToAdjustmentEditor(state) {
|
|
|
14
14
|
sharpness: state.sharpnessScore,
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
export function mapColorAdjustmentToAdjustmentState(colors) {
|
|
17
|
+
export function mapColorAdjustmentToAdjustmentState(colors, preset_id) {
|
|
18
18
|
return {
|
|
19
19
|
tempScore: colors.temperature,
|
|
20
20
|
tintScore: colors.tint,
|
|
@@ -27,23 +27,24 @@ export function mapColorAdjustmentToAdjustmentState(colors) {
|
|
|
27
27
|
blacksScore: colors.blacks,
|
|
28
28
|
contrastScore: colors.contrast,
|
|
29
29
|
clarityScore: colors.clarity,
|
|
30
|
-
sharpnessScore: colors.sharpness
|
|
30
|
+
sharpnessScore: colors.sharpness,
|
|
31
|
+
preset_id: preset_id
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
export function mapAdjustmentStateToColorAdjustment(state) {
|
|
34
35
|
return {
|
|
35
|
-
temperature: state.tempScore,
|
|
36
|
-
tint: state.tintScore,
|
|
37
|
-
vibrance: state.vibranceScore,
|
|
38
|
-
saturation: state.saturationScore,
|
|
39
|
-
exposure: state.exposureScore,
|
|
40
|
-
contrast: state.contrastScore,
|
|
41
|
-
highlights: state.highlightsScore,
|
|
42
|
-
shadows: state.shadowsScore,
|
|
43
|
-
whites: state.whitesScore,
|
|
44
|
-
blacks: state.blacksScore,
|
|
45
|
-
clarity: state.clarityScore,
|
|
46
|
-
sharpness: state.sharpnessScore
|
|
36
|
+
temperature: state.tempScore || 0,
|
|
37
|
+
tint: state.tintScore || 0,
|
|
38
|
+
vibrance: state.vibranceScore || 0,
|
|
39
|
+
saturation: state.saturationScore || 0,
|
|
40
|
+
exposure: state.exposureScore || 0,
|
|
41
|
+
contrast: state.contrastScore || 0,
|
|
42
|
+
highlights: state.highlightsScore || 0,
|
|
43
|
+
shadows: state.shadowsScore || 0,
|
|
44
|
+
whites: state.whitesScore || 0,
|
|
45
|
+
blacks: state.blacksScore || 0,
|
|
46
|
+
clarity: state.clarityScore || 0,
|
|
47
|
+
sharpness: state.sharpnessScore || 0
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
export function partialAdjustmentStateToAdjustmentState(partial) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import pino from 'pino';
|
|
2
|
+
// if you want to upload the log to stream change this config
|
|
3
|
+
const log = pino({
|
|
4
|
+
level: process.env.NEXT_PUBLIC_LOG_LEVEL || 'warn',
|
|
5
|
+
formatters: {
|
|
6
|
+
level: (label) => {
|
|
7
|
+
return { level: label.toUpperCase() };
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
export { log };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yogiswara/honcho-editor-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
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",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"keywords": [],
|
|
49
49
|
"author": "",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"
|
|
51
|
+
"@egjs/react-infinitegrid": "^4.12.0",
|
|
52
|
+
"iconsax-react": "^0.0.8",
|
|
53
|
+
"pino": "^9.9.5"
|
|
52
54
|
}
|
|
53
55
|
}
|