@yogiswara/honcho-editor-ui 1.4.16 → 1.4.17

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.
@@ -169,6 +169,11 @@ export function useGallerySwipe(firebaseUid, initImageId, controller) {
169
169
  setIsLoading(true);
170
170
  setError(null);
171
171
  try {
172
+ // Debug logging
173
+ console.log("=== SWIPE NEXT DEBUG ===");
174
+ console.log("currentImageId:", currentImageId);
175
+ console.log("currentImageList length:", currentImageList.length);
176
+ console.log("currentImageList IDs:", currentImageList.map(img => img.id).join(", "));
172
177
  // Calculate current index directly to avoid stale closure issues
173
178
  const currentIndex = currentImageList.findIndex(img => img.id === currentImageId);
174
179
  console.log("Current index: ", currentIndex);
@@ -186,6 +191,7 @@ export function useGallerySwipe(firebaseUid, initImageId, controller) {
186
191
  setCurrentImageList(updatedList);
187
192
  // Navigate to first image of the new page
188
193
  const nextImage = newImages[0];
194
+ console.log("Setting currentImageId to:", nextImage.id);
189
195
  setCurrentImageId(nextImage.id);
190
196
  // Fetch complete data for the new current image
191
197
  const nextImageData = await controller.onGetImage(firebaseUid, nextImage.id);
@@ -202,6 +208,7 @@ export function useGallerySwipe(firebaseUid, initImageId, controller) {
202
208
  // Scenario 2: Navigate to next image in current list
203
209
  const nextImage = currentImageList[currentIndex + 1];
204
210
  console.log("[SCENARIO 2] Navigating to next image:", nextImage.id);
211
+ console.log("Setting currentImageId from", currentImageId, "to", nextImage.id);
205
212
  setCurrentImageId(nextImage.id);
206
213
  // Fetch complete data for the next image
207
214
  const nextImageData = await controller.onGetImage(firebaseUid, nextImage.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yogiswara/honcho-editor-ui",
3
- "version": "1.4.16",
3
+ "version": "1.4.17",
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",