@yogiswara/honcho-editor-ui 2.7.13 → 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.
- package/package.json +1 -1
- package/dist/color.d.ts +0 -9
- package/dist/color.js +0 -9
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +0 -8
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +0 -28
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -10
- package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -81
- package/dist/components/editor/HAccordionAspectRatio.d.ts +0 -14
- package/dist/components/editor/HAccordionAspectRatio.js +0 -102
- package/dist/components/editor/HAccordionColor.d.ts +0 -16
- package/dist/components/editor/HAccordionColor.js +0 -282
- package/dist/components/editor/HAccordionColorAdjustment.d.ts +0 -35
- package/dist/components/editor/HAccordionColorAdjustment.js +0 -31
- package/dist/components/editor/HAccordionDetails.d.ts +0 -12
- package/dist/components/editor/HAccordionDetails.js +0 -157
- package/dist/components/editor/HAccordionLight.d.ts +0 -20
- package/dist/components/editor/HAccordionLight.js +0 -414
- package/dist/components/editor/HAccordionPreset.d.ts +0 -23
- package/dist/components/editor/HAccordionPreset.js +0 -50
- package/dist/components/editor/HAlertBox.d.ts +0 -8
- package/dist/components/editor/HAlertBox.js +0 -55
- package/dist/components/editor/HAspectRatioMobile.d.ts +0 -0
- package/dist/components/editor/HAspectRatioMobile.js +0 -1
- package/dist/components/editor/HBulkAccordionColorAdjustment.d.ts +0 -55
- package/dist/components/editor/HBulkAccordionColorAdjustment.js +0 -31
- package/dist/components/editor/HBulkAccordionColorAdjustmentColors.d.ts +0 -20
- package/dist/components/editor/HBulkAccordionColorAdjustmentColors.js +0 -121
- package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.d.ts +0 -12
- package/dist/components/editor/HBulkAccordionColorAdjustmentDetails.js +0 -65
- package/dist/components/editor/HBulkAccordionColorAdjustmentLight.d.ts +0 -28
- package/dist/components/editor/HBulkAccordionColorAdjustmentLight.js +0 -177
- package/dist/components/editor/HBulkColorAdjustmentMobile.d.ts +0 -53
- package/dist/components/editor/HBulkColorAdjustmentMobile.js +0 -16
- package/dist/components/editor/HBulkColorMobile.d.ts +0 -20
- package/dist/components/editor/HBulkColorMobile.js +0 -121
- package/dist/components/editor/HBulkDetailsMobile.d.ts +0 -12
- package/dist/components/editor/HBulkDetailsMobile.js +0 -65
- package/dist/components/editor/HBulkLightMobile.d.ts +0 -28
- package/dist/components/editor/HBulkLightMobile.js +0 -192
- package/dist/components/editor/HBulkPreset.d.ts +0 -24
- package/dist/components/editor/HBulkPreset.js +0 -43
- package/dist/components/editor/HBulkPresetMobile.d.ts +0 -15
- package/dist/components/editor/HBulkPresetMobile.js +0 -26
- package/dist/components/editor/HDialogBox.d.ts +0 -18
- package/dist/components/editor/HDialogBox.js +0 -51
- package/dist/components/editor/HDialogCopy.d.ts +0 -40
- package/dist/components/editor/HDialogCopy.js +0 -80
- package/dist/components/editor/HFooter.d.ts +0 -12
- package/dist/components/editor/HFooter.js +0 -24
- package/dist/components/editor/HHeaderEditor.d.ts +0 -17
- package/dist/components/editor/HHeaderEditor.js +0 -36
- package/dist/components/editor/HImageEditorBulkDekstop.d.ts +0 -15
- package/dist/components/editor/HImageEditorBulkDekstop.js +0 -29
- package/dist/components/editor/HImageEditorBulkMobile.d.ts +0 -72
- package/dist/components/editor/HImageEditorBulkMobile.js +0 -81
- package/dist/components/editor/HImageEditorDekstop.d.ts +0 -15
- package/dist/components/editor/HImageEditorDekstop.js +0 -29
- package/dist/components/editor/HImageEditorMobile.d.ts +0 -51
- package/dist/components/editor/HImageEditorMobile.js +0 -92
- package/dist/components/editor/HImageEditorMobileLayout.d.ts +0 -14
- package/dist/components/editor/HImageEditorMobileLayout.js +0 -58
- package/dist/components/editor/HModalEditorDekstop.d.ts +0 -13
- package/dist/components/editor/HModalEditorDekstop.js +0 -22
- package/dist/components/editor/HModalMobile.d.ts +0 -13
- package/dist/components/editor/HModalMobile.js +0 -7
- package/dist/components/editor/HPresetDelete.d.ts +0 -7
- package/dist/components/editor/HPresetDelete.js +0 -7
- package/dist/components/editor/HPresetOptionMenu.d.ts +0 -9
- package/dist/components/editor/HPresetOptionMenu.js +0 -20
- package/dist/components/editor/HSliderColorMobile.d.ts +0 -16
- package/dist/components/editor/HSliderColorMobile.js +0 -270
- package/dist/components/editor/HSliderDetailsMobile.d.ts +0 -12
- package/dist/components/editor/HSliderDetailsMobile.js +0 -154
- package/dist/components/editor/HSliderLightMobile.d.ts +0 -20
- package/dist/components/editor/HSliderLightMobile.js +0 -420
- package/dist/components/editor/HTabAspectRatioMobile.d.ts +0 -0
- package/dist/components/editor/HTabAspectRatioMobile.js +0 -1
- package/dist/components/editor/HTabColorAdjustmentMobile.d.ts +0 -33
- package/dist/components/editor/HTabColorAdjustmentMobile.js +0 -16
- package/dist/components/editor/HTabPresetMobile.d.ts +0 -14
- package/dist/components/editor/HTabPresetMobile.js +0 -10
- package/dist/components/editor/HTextField.d.ts +0 -14
- package/dist/components/editor/HTextField.js +0 -51
- package/dist/components/editor/HWatermarkView.d.ts +0 -6
- package/dist/components/editor/HWatermarkView.js +0 -16
- package/dist/components/editor/svg/Tick.d.ts +0 -2
- package/dist/components/editor/svg/Tick.js +0 -6
- package/dist/components/modal/HModalDialog.d.ts +0 -12
- package/dist/components/modal/HModalDialog.js +0 -18
- package/dist/components/modal/HModalRename.d.ts +0 -14
- package/dist/components/modal/HModalRename.js +0 -35
- package/dist/hooks/demo/HonchoEditorBulkDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorBulkDemo.js +0 -410
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.d.ts +0 -3
- package/dist/hooks/demo/HonchoEditorSingleCleanDemo.js +0 -354
- package/dist/hooks/demo/index.d.ts +0 -2
- package/dist/hooks/demo/index.js +0 -2
- package/dist/hooks/editor/type.d.ts +0 -174
- package/dist/hooks/editor/type.js +0 -1
- package/dist/hooks/editor/useHonchoEditorBulk.d.ts +0 -96
- package/dist/hooks/editor/useHonchoEditorBulk.js +0 -427
- package/dist/hooks/editor/useHonchoEditorSingle.d.ts +0 -44
- package/dist/hooks/editor/useHonchoEditorSingle.js +0 -162
- package/dist/hooks/useAdjustmentHistory.d.ts +0 -97
- package/dist/hooks/useAdjustmentHistory.js +0 -493
- package/dist/hooks/useAdjustmentHistoryBatch.d.ts +0 -177
- package/dist/hooks/useAdjustmentHistoryBatch.js +0 -1189
- package/dist/hooks/useGallerySwipe.d.ts +0 -36
- package/dist/hooks/useGallerySwipe.js +0 -344
- package/dist/hooks/usePaging.d.ts +0 -89
- package/dist/hooks/usePaging.js +0 -211
- package/dist/hooks/usePreset.d.ts +0 -82
- package/dist/hooks/usePreset.js +0 -344
- package/dist/index.d.ts +0 -41
- package/dist/index.js +0 -44
- package/dist/lib/context/EditorContext.d.ts +0 -28
- package/dist/lib/context/EditorContext.js +0 -60
- package/dist/lib/context/EditorProcessingService.d.ts +0 -36
- package/dist/lib/context/EditorProcessingService.js +0 -249
- package/dist/lib/editor/honcho-editor.d.ts +0 -324
- package/dist/lib/editor/honcho-editor.js +0 -825
- package/dist/lib/hooks/useEditor.d.ts +0 -22
- package/dist/lib/hooks/useEditor.js +0 -35
- package/dist/lib/hooks/useEditorHeadless.d.ts +0 -34
- package/dist/lib/hooks/useEditorHeadless.js +0 -207
- package/dist/lib/hooks/useImageProcessor.d.ts +0 -18
- package/dist/lib/hooks/useImageProcessor.js +0 -113
- package/dist/setupTests.d.ts +0 -1
- package/dist/setupTests.js +0 -1
- package/dist/themes/colors.d.ts +0 -12
- package/dist/themes/colors.js +0 -12
- package/dist/themes/honchoTheme.d.ts +0 -25
- package/dist/themes/honchoTheme.js +0 -94
- package/dist/utils/adjustment.d.ts +0 -6
- package/dist/utils/adjustment.js +0 -48
- package/dist/utils/imageLoader.d.ts +0 -11
- package/dist/utils/imageLoader.js +0 -48
- package/dist/utils/isMobile.d.ts +0 -1
- package/dist/utils/isMobile.js +0 -5
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { AdjustmentState, Controller } from './editor/type';
|
|
2
|
-
export interface HistoryAdjustmentBatch {
|
|
3
|
-
imageId: string;
|
|
4
|
-
currentHistoryEntryId: string;
|
|
5
|
-
history: HistoryAdjustmentEntry[];
|
|
6
|
-
}
|
|
7
|
-
export interface HistoryAdjustmentEntry {
|
|
8
|
-
id: string;
|
|
9
|
-
adjustment: AdjustmentState;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Configuration for image with adjustment state
|
|
13
|
-
*/
|
|
14
|
-
export interface ImageAdjustmentConfig {
|
|
15
|
-
imageId: string;
|
|
16
|
-
/** Adjustment state for this image. If not provided, uses default (all zeros) */
|
|
17
|
-
adjustment?: AdjustmentState;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Batch adjustment state - maps image IDs to their adjustment states
|
|
21
|
-
*/
|
|
22
|
-
export interface BatchAdjustmentState {
|
|
23
|
-
/** Currently selected images that are being actively adjusted */
|
|
24
|
-
currentSelection: {
|
|
25
|
-
[imageId: string]: AdjustmentState;
|
|
26
|
-
};
|
|
27
|
-
/** All images that have been selected/adjusted before (persistent state) */
|
|
28
|
-
allImages: {
|
|
29
|
-
[imageId: string]: AdjustmentState;
|
|
30
|
-
};
|
|
31
|
-
/** Track initial/baseline state for each image */
|
|
32
|
-
initialStates: {
|
|
33
|
-
[imageId: string]: AdjustmentState;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Configuration options for the batch adjustment history hook
|
|
38
|
-
*/
|
|
39
|
-
interface BatchHistoryOptions {
|
|
40
|
-
/** Maximum number of history entries to keep. Use 'unlimited' for no limit */
|
|
41
|
-
maxSize?: number | 'unlimited';
|
|
42
|
-
/** Enable development warnings for performance issues */
|
|
43
|
-
devWarnings?: boolean;
|
|
44
|
-
/** Default adjustment state for new images */
|
|
45
|
-
defaultAdjustmentState?: Partial<AdjustmentState>;
|
|
46
|
-
/** Controller for backend operations */
|
|
47
|
-
controller?: Controller;
|
|
48
|
-
/** Firebase UID for backend operations */
|
|
49
|
-
firebaseUid?: string;
|
|
50
|
-
/** Event ID for backend operations */
|
|
51
|
-
eventId?: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Information about the current batch history state
|
|
55
|
-
*/
|
|
56
|
-
export interface BatchHistoryInfo {
|
|
57
|
-
/** Whether undo operation is available for selected images */
|
|
58
|
-
canUndo: boolean;
|
|
59
|
-
/** Whether redo operation is available for selected images */
|
|
60
|
-
canRedo: boolean;
|
|
61
|
-
/** Current position in history (0-based index) */
|
|
62
|
-
currentIndex: number;
|
|
63
|
-
/** Total number of states in history */
|
|
64
|
-
totalStates: number;
|
|
65
|
-
/** Number of currently selected images */
|
|
66
|
-
selectedCount: number;
|
|
67
|
-
/** Total number of images being managed */
|
|
68
|
-
totalImages: number;
|
|
69
|
-
/** Current size of history in memory */
|
|
70
|
-
historySize: number;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Actions available for batch history management
|
|
74
|
-
*/
|
|
75
|
-
export interface BatchHistoryActions {
|
|
76
|
-
/** Apply adjustment deltas to selected images */
|
|
77
|
-
adjustSelected: (delta: Partial<AdjustmentState>) => void;
|
|
78
|
-
/** Apply preset values directly to selected images (preserves history) */
|
|
79
|
-
adjustSelectedWithPreset: (presetAdjustments: AdjustmentState) => void;
|
|
80
|
-
/** Undo last changes to selected images */
|
|
81
|
-
undo: () => void;
|
|
82
|
-
/** Redo next changes to selected images */
|
|
83
|
-
redo: () => void;
|
|
84
|
-
/** Reset selected images to default state */
|
|
85
|
-
reset: (imageIds?: string[]) => void;
|
|
86
|
-
/** Set selection with optional initial adjustments per image */
|
|
87
|
-
setSelection: (configs: ImageAdjustmentConfig[]) => void;
|
|
88
|
-
/** Sync/replace adjustment for images (clears their history) */
|
|
89
|
-
syncAdjustment: (configs: ImageAdjustmentConfig[]) => void;
|
|
90
|
-
/** Check for gallery updates and sync history for updated images */
|
|
91
|
-
syncGalleryUpdates: () => Promise<void>;
|
|
92
|
-
/** Add or remove image from selection */
|
|
93
|
-
toggleSelection: (imageId: string) => void;
|
|
94
|
-
/** Select all images */
|
|
95
|
-
selectAll: () => void;
|
|
96
|
-
/** Clear selection */
|
|
97
|
-
clearSelection: () => void;
|
|
98
|
-
/** Jump to specific index in history */
|
|
99
|
-
jumpToIndex: (index: number) => void;
|
|
100
|
-
/** Clear all history and start fresh */
|
|
101
|
-
clearHistory: () => void;
|
|
102
|
-
/** Get copy of current batch state */
|
|
103
|
-
getCurrentBatch: () => BatchAdjustmentState;
|
|
104
|
-
/** Sync entire batch state */
|
|
105
|
-
syncBatch: (newBatch: BatchAdjustmentState, targetIndex?: number) => void;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Configuration actions for runtime adjustment
|
|
109
|
-
*/
|
|
110
|
-
export interface BatchHistoryConfig {
|
|
111
|
-
/** Set maximum history size */
|
|
112
|
-
setMaxSize: (size: number | 'unlimited') => void;
|
|
113
|
-
/** Get current memory usage estimate */
|
|
114
|
-
getMemoryUsage: () => number;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Return type for the useAdjustmentHistoryBatch hook
|
|
118
|
-
*/
|
|
119
|
-
export interface UseAdjustmentHistoryBatchReturn {
|
|
120
|
-
/** Current batch adjustment state */
|
|
121
|
-
currentBatch: BatchAdjustmentState;
|
|
122
|
-
/** Currently selected image IDs */
|
|
123
|
-
selectedIds: string[];
|
|
124
|
-
/** All image IDs being managed */
|
|
125
|
-
allImageIds: string[];
|
|
126
|
-
/** Information about history state */
|
|
127
|
-
historyInfo: BatchHistoryInfo;
|
|
128
|
-
/** Available history actions */
|
|
129
|
-
actions: BatchHistoryActions;
|
|
130
|
-
/** Configuration options */
|
|
131
|
-
config: BatchHistoryConfig;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Advanced hook for managing batch AdjustmentState history with selective undo/redo functionality.
|
|
135
|
-
*
|
|
136
|
-
* **Pure State Management Design:**
|
|
137
|
-
* - Starts empty, no image loading functionality
|
|
138
|
-
* - Focus on state management and history tracking only
|
|
139
|
-
* - Selection-based operations with persistent state
|
|
140
|
-
* - Manual selection via `actions.setSelection()`
|
|
141
|
-
*
|
|
142
|
-
* **Key Features:**
|
|
143
|
-
* - **Current Selection**: Images actively being adjusted
|
|
144
|
-
* - **All Images**: Persistent state for every image touched
|
|
145
|
-
* - **Selective Operations**: Undo/redo only affects selected images
|
|
146
|
-
* - **Automatic State Persistence**: Images remain in allImages even when deselected
|
|
147
|
-
*
|
|
148
|
-
* **Typical Usage Flow:**
|
|
149
|
-
* ```typescript
|
|
150
|
-
* const { actions, currentBatch, selectedIds } = useAdjustmentHistoryBatch();
|
|
151
|
-
*
|
|
152
|
-
* // Select images (new images get default state automatically)
|
|
153
|
-
* actions.setSelection(['img1', 'img2', 'img3']);
|
|
154
|
-
*
|
|
155
|
-
* // Apply adjustments to selected images
|
|
156
|
-
* actions.adjustSelected({ exposureScore: 10 });
|
|
157
|
-
*
|
|
158
|
-
* // Change selection (img1, img2 state persists in allImages)
|
|
159
|
-
* actions.setSelection(['img3']);
|
|
160
|
-
*
|
|
161
|
-
* // Adjust only img3
|
|
162
|
-
* actions.adjustSelected({ contrastScore: 5 });
|
|
163
|
-
*
|
|
164
|
-
* // Undo affects only currently selected (img3)
|
|
165
|
-
* actions.undo();
|
|
166
|
-
* ```
|
|
167
|
-
*
|
|
168
|
-
* **State Structure:**
|
|
169
|
-
* - `currentBatch.currentSelection`: Currently selected images and their states
|
|
170
|
-
* - `currentBatch.allImages`: All images that have been selected/adjusted (persistent)
|
|
171
|
-
* - `selectedIds`: Array of currently selected image IDs
|
|
172
|
-
*
|
|
173
|
-
* @param options - Configuration options for history behavior
|
|
174
|
-
* @returns Object with current batch, selection, history info, actions, and config
|
|
175
|
-
*/
|
|
176
|
-
export declare function useAdjustmentHistoryBatch(options?: BatchHistoryOptions): UseAdjustmentHistoryBatchReturn;
|
|
177
|
-
export {};
|