@sequent-org/moodboard 1.2.28 → 1.2.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequent-org/moodboard",
3
- "version": "1.2.28",
3
+ "version": "1.2.29",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -45,6 +45,22 @@ export class ApiClient {
45
45
  // Фильтруем объекты изображений и файлов - убираем избыточные данные
46
46
  const cleanedData = this._cleanObjectData(boardData);
47
47
 
48
+ // Диагностика размеров изображений перед отправкой
49
+ try {
50
+ const images = Array.isArray(cleanedData?.objects)
51
+ ? cleanedData.objects.filter(o => o && o.type === 'image')
52
+ : [];
53
+ images.forEach((o) => {
54
+ console.log('🧪 SAVE image size', {
55
+ id: o.id,
56
+ width: o.width,
57
+ height: o.height,
58
+ propWidth: o.properties?.width,
59
+ propHeight: o.properties?.height
60
+ });
61
+ });
62
+ } catch (_) {}
63
+
48
64
  const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
49
65
 
50
66
  const response = await fetch('/api/moodboard/save', {
@@ -31,6 +31,19 @@ export class DataManager {
31
31
 
32
32
  data.objects.forEach((objectData, index) => {
33
33
  try {
34
+ // Диагностика размеров изображений на загрузке до создания
35
+ if (objectData && objectData.type === 'image') {
36
+ try {
37
+ console.log('🧪 LOAD image size (before create)', {
38
+ id: objectData.id,
39
+ width: objectData.width,
40
+ height: objectData.height,
41
+ propWidth: objectData.properties?.width,
42
+ propHeight: objectData.properties?.height
43
+ });
44
+ } catch (_) {}
45
+ }
46
+
34
47
  // Используем полные данные объекта, включая ID
35
48
  const createdObject = this.coreMoodboard.createObjectFromData(objectData);
36
49