@dmitryvim/form-builder 0.1.20 → 0.1.21

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.
@@ -596,7 +596,9 @@ async function renderFilePreview(container, resourceId, fileName, fileType, isRe
596
596
 
597
597
  // Use stored file from resourceIndex if available, or try getThumbnail
598
598
  const meta = state.resourceIndex.get(resourceId);
599
+ console.log(`🔧 renderFilePreview debug:`, { resourceId, meta, hasGetThumbnail: !!state.config.getThumbnail });
599
600
  if (meta && meta.file && meta.file instanceof File) {
601
+ console.log(`🔧 Using local file branch`);
600
602
  // For local files, use FileReader to display preview
601
603
  if (meta.type && meta.type.startsWith('image/')) {
602
604
  const reader = new FileReader();
@@ -632,9 +634,11 @@ async function renderFilePreview(container, resourceId, fileName, fileType, isRe
632
634
  });
633
635
  }
634
636
  } else if (state.config.getThumbnail) {
637
+ console.log(`🔧 Using getThumbnail branch for resourceId:`, resourceId);
635
638
  // Try to get thumbnail from config for uploaded files
636
639
  try {
637
640
  const thumbnailUrl = await state.config.getThumbnail(resourceId);
641
+ console.log(`📸 getThumbnail called with result:`, { resourceId, thumbnailUrl });
638
642
  if (thumbnailUrl) {
639
643
  img.src = thumbnailUrl;
640
644
  container.appendChild(img);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.20",
6
+ "version": "0.1.21",
7
7
  "description": "A reusable JSON schema form builder library",
8
8
  "main": "dist/form-builder.js",
9
9
  "files": [