@sequent-org/moodboard 1.0.16 → 1.0.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.
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ export class KeyboardManager {
|
|
|
27
27
|
this.eventBus.emit(Events.UI.PasteImage, {
|
|
28
28
|
src: uploadResult.url,
|
|
29
29
|
name: uploadResult.name,
|
|
30
|
-
imageId: uploadResult.id
|
|
30
|
+
imageId: uploadResult.imageId || uploadResult.id
|
|
31
31
|
});
|
|
32
32
|
} else {
|
|
33
33
|
// Fallback к старому способу
|
|
@@ -54,7 +54,7 @@ export class KeyboardManager {
|
|
|
54
54
|
this.eventBus.emit(Events.UI.PasteImage, {
|
|
55
55
|
src: uploadResult.url,
|
|
56
56
|
name: uploadResult.name,
|
|
57
|
-
imageId: uploadResult.id
|
|
57
|
+
imageId: uploadResult.imageId || uploadResult.id
|
|
58
58
|
});
|
|
59
59
|
} else {
|
|
60
60
|
// Fallback к старому способу: конвертируем в DataURL
|
|
@@ -50,7 +50,8 @@ export class FileUploadService {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
return {
|
|
53
|
-
id: result.data.id,
|
|
53
|
+
id: result.data.fileId || result.data.id, // Используем fileId как основное поле, id для обратной совместимости
|
|
54
|
+
fileId: result.data.fileId || result.data.id, // Добавляем fileId для явного доступа
|
|
54
55
|
url: result.data.url,
|
|
55
56
|
size: result.data.size,
|
|
56
57
|
mimeType: result.data.mime_type,
|
|
@@ -55,7 +55,8 @@ export class ImageUploadService {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return {
|
|
58
|
-
id: result.data.id,
|
|
58
|
+
id: result.data.imageId || result.data.id, // Используем imageId как основное поле, id для обратной совместимости
|
|
59
|
+
imageId: result.data.imageId || result.data.id, // Добавляем imageId для явного доступа
|
|
59
60
|
url: result.data.url,
|
|
60
61
|
width: result.data.width,
|
|
61
62
|
height: result.data.height,
|
package/src/tools/ToolManager.js
CHANGED
|
@@ -372,7 +372,7 @@ export class ToolManager {
|
|
|
372
372
|
// Пытаемся загрузить изображение на сервер
|
|
373
373
|
if (this.core && this.core.imageUploadService) {
|
|
374
374
|
const uploadResult = await this.core.imageUploadService.uploadImage(file, file.name || 'image');
|
|
375
|
-
emitAt(uploadResult.url, uploadResult.name, uploadResult.id, index++);
|
|
375
|
+
emitAt(uploadResult.url, uploadResult.name, uploadResult.imageId || uploadResult.id, index++);
|
|
376
376
|
} else {
|
|
377
377
|
// Fallback к старому способу (base64)
|
|
378
378
|
await new Promise((resolve) => {
|
|
@@ -233,7 +233,7 @@ export class PlacementTool extends BaseTool {
|
|
|
233
233
|
width: targetW,
|
|
234
234
|
height: targetH
|
|
235
235
|
},
|
|
236
|
-
imageId: uploadResult.id // Сохраняем ID изображения
|
|
236
|
+
imageId: uploadResult.imageId || uploadResult.id // Сохраняем ID изображения
|
|
237
237
|
});
|
|
238
238
|
} catch (error) {
|
|
239
239
|
console.error('Ошибка загрузки изображения:', error);
|
|
@@ -274,7 +274,7 @@ export class PlacementTool extends BaseTool {
|
|
|
274
274
|
width: props.width || 120,
|
|
275
275
|
height: props.height || 140
|
|
276
276
|
},
|
|
277
|
-
fileId: uploadResult.id // Сохраняем ID файла
|
|
277
|
+
fileId: uploadResult.fileId || uploadResult.id // Сохраняем ID файла
|
|
278
278
|
});
|
|
279
279
|
|
|
280
280
|
// Возвращаемся к инструменту выделения после создания файла
|
|
@@ -465,7 +465,7 @@ export class PlacementTool extends BaseTool {
|
|
|
465
465
|
width: props.width || 120,
|
|
466
466
|
height: props.height || 140
|
|
467
467
|
},
|
|
468
|
-
fileId: uploadResult.id // Сохраняем ID файла
|
|
468
|
+
fileId: uploadResult.fileId || uploadResult.id // Сохраняем ID файла
|
|
469
469
|
});
|
|
470
470
|
|
|
471
471
|
} catch (uploadError) {
|
|
@@ -961,7 +961,7 @@ export class PlacementTool extends BaseTool {
|
|
|
961
961
|
width: targetW,
|
|
962
962
|
height: targetH
|
|
963
963
|
},
|
|
964
|
-
imageId: uploadResult.id // Сохраняем ID изображения
|
|
964
|
+
imageId: uploadResult.imageId || uploadResult.id // Сохраняем ID изображения
|
|
965
965
|
});
|
|
966
966
|
|
|
967
967
|
} catch (uploadError) {
|
|
@@ -222,6 +222,7 @@ export class HtmlHandlesLayer {
|
|
|
222
222
|
position: 'absolute', pointerEvents: 'auto', cursor,
|
|
223
223
|
zIndex: 5, // Меньше чем у ручек (10)
|
|
224
224
|
background: 'transparent' // невидимые области
|
|
225
|
+
|
|
225
226
|
});
|
|
226
227
|
e.addEventListener('mousedown', (evt) => this._onEdgeResizeDown(evt));
|
|
227
228
|
box.appendChild(e);
|