@inditextech/weave-sdk 0.20.3 → 0.20.4

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/dist/sdk.cjs CHANGED
@@ -29196,7 +29196,7 @@ var WeaveRegisterManager = class {
29196
29196
 
29197
29197
  //#endregion
29198
29198
  //#region package.json
29199
- var version = "0.20.3";
29199
+ var version = "0.20.4";
29200
29200
 
29201
29201
  //#endregion
29202
29202
  //#region src/managers/setup.ts
@@ -31073,11 +31073,10 @@ var WeaveImageNode = class extends WeaveNode {
31073
31073
  this.imageLoaded = true;
31074
31074
  image.setAttr("width", image.width() ? image.width() : preloadImg.width);
31075
31075
  image.setAttr("height", image.height() ? image.height() : preloadImg.height);
31076
- const imageRect = image.getClientRect();
31077
31076
  image.setAttr("cropInfo", void 0);
31078
31077
  image.setAttr("uncroppedImage", {
31079
- width: imageRect.width,
31080
- height: imageRect.height
31078
+ width: image.width() ? image.width() : preloadImg.width,
31079
+ height: image.height() ? image.height() : preloadImg.height
31081
31080
  });
31082
31081
  image.setAttr("imageInfo", {
31083
31082
  width: preloadImg.width,
@@ -31165,7 +31164,7 @@ var WeaveImageNode = class extends WeaveNode {
31165
31164
  const internalImage = image.findOne(`#${imageProps.id}-image`);
31166
31165
  const imageObj = new Image();
31167
31166
  imageObj.onerror = (error) => {
31168
- console.error("Error loading image", error);
31167
+ console.error("Error loading image", imageProps.imageURL, error);
31169
31168
  imagePlaceholder?.setAttrs({ visible: true });
31170
31169
  internalImage?.setAttrs({ visible: false });
31171
31170
  };
@@ -31196,6 +31195,10 @@ var WeaveImageNode = class extends WeaveNode {
31196
31195
  width: imageObj.width,
31197
31196
  height: imageObj.height
31198
31197
  });
31198
+ image.setAttr("uncroppedImage", {
31199
+ width: imageProps.uncroppedImage ? imageProps.uncroppedImage.width : imageObj.width,
31200
+ height: imageProps.uncroppedImage ? imageProps.uncroppedImage.height : imageObj.height
31201
+ });
31199
31202
  this.updateCrop(imageProps);
31200
31203
  }
31201
31204
  };
package/dist/sdk.js CHANGED
@@ -18036,7 +18036,7 @@ var WeaveRegisterManager = class {
18036
18036
 
18037
18037
  //#endregion
18038
18038
  //#region package.json
18039
- var version = "0.20.3";
18039
+ var version = "0.20.4";
18040
18040
 
18041
18041
  //#endregion
18042
18042
  //#region src/managers/setup.ts
@@ -19913,11 +19913,10 @@ var WeaveImageNode = class extends WeaveNode {
19913
19913
  this.imageLoaded = true;
19914
19914
  image.setAttr("width", image.width() ? image.width() : preloadImg.width);
19915
19915
  image.setAttr("height", image.height() ? image.height() : preloadImg.height);
19916
- const imageRect = image.getClientRect();
19917
19916
  image.setAttr("cropInfo", void 0);
19918
19917
  image.setAttr("uncroppedImage", {
19919
- width: imageRect.width,
19920
- height: imageRect.height
19918
+ width: image.width() ? image.width() : preloadImg.width,
19919
+ height: image.height() ? image.height() : preloadImg.height
19921
19920
  });
19922
19921
  image.setAttr("imageInfo", {
19923
19922
  width: preloadImg.width,
@@ -20005,7 +20004,7 @@ var WeaveImageNode = class extends WeaveNode {
20005
20004
  const internalImage = image.findOne(`#${imageProps.id}-image`);
20006
20005
  const imageObj = new Image();
20007
20006
  imageObj.onerror = (error) => {
20008
- console.error("Error loading image", error);
20007
+ console.error("Error loading image", imageProps.imageURL, error);
20009
20008
  imagePlaceholder?.setAttrs({ visible: true });
20010
20009
  internalImage?.setAttrs({ visible: false });
20011
20010
  };
@@ -20036,6 +20035,10 @@ var WeaveImageNode = class extends WeaveNode {
20036
20035
  width: imageObj.width,
20037
20036
  height: imageObj.height
20038
20037
  });
20038
+ image.setAttr("uncroppedImage", {
20039
+ width: imageProps.uncroppedImage ? imageProps.uncroppedImage.width : imageObj.width,
20040
+ height: imageProps.uncroppedImage ? imageProps.uncroppedImage.height : imageObj.height
20041
+ });
20039
20042
  this.updateCrop(imageProps);
20040
20043
  }
20041
20044
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inditextech/weave-sdk",
3
- "version": "0.20.3",
3
+ "version": "0.20.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
@@ -43,7 +43,7 @@
43
43
  "version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
44
44
  },
45
45
  "dependencies": {
46
- "@inditextech/weave-types": "0.20.3",
46
+ "@inditextech/weave-types": "0.20.4",
47
47
  "@syncedstore/core": "0.6.0",
48
48
  "canvas": "3.1.0",
49
49
  "konva": "9.3.20",