@raketa-builder/support 0.13.0 → 0.14.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @raketa-builder/support@0.13.0 build
2
+ > @raketa-builder/support@0.14.0 build
3
3
  > tsup src/index.js --format cjs --loader ".js=jsx"
4
4
 
5
5
  CLI Building entry: src/index.js
@@ -7,5 +7,5 @@ CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v6.5.0
8
8
  CLI Target: es6
9
9
  CJS Build start
10
- CJS dist/index.js 21.44 KB
11
- CJS ⚡️ Build success in 48ms
10
+ CJS dist/index.js 21.32 KB
11
+ CJS ⚡️ Build success in 39ms
package/dist/index.js CHANGED
@@ -75,15 +75,15 @@ var getWebp = (url) => {
75
75
  return segments.join(".");
76
76
  };
77
77
  var getDimensions = (src, variant) => {
78
- var _a, _b, _c, _d, _e;
78
+ var _a, _b, _c;
79
79
  if (typeof src === "object" && ((_a = src == null ? void 0 : src.name) == null ? void 0 : _a.includes(".svg"))) {
80
- const width = ((_b = src.sizes[variant]) == null ? void 0 : _b.width) || src.width || null;
81
- const height = ((_c = src.sizes[variant]) == null ? void 0 : _c.height) || src.height || null;
80
+ const width = src.width || null;
81
+ const height = src.height || null;
82
82
  return [width, height];
83
83
  }
84
84
  if (typeof src === "object") {
85
- const width = ((_d = src.sizes[variant]) == null ? void 0 : _d.width) || null;
86
- const height = ((_e = src.sizes[variant]) == null ? void 0 : _e.height) || null;
85
+ const width = ((_b = src.sizes[variant]) == null ? void 0 : _b.width) || null;
86
+ const height = ((_c = src.sizes[variant]) == null ? void 0 : _c.height) || null;
87
87
  return [width, height];
88
88
  }
89
89
  return [null, null];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/support",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
package/src/Image.js CHANGED
@@ -11,8 +11,8 @@ const getWebp = (url) => {
11
11
 
12
12
  const getDimensions = (src, variant) => {
13
13
  if (typeof src === "object" && src?.name?.includes(".svg")) {
14
- const width = src.sizes[variant]?.width || src.width || null;
15
- const height = src.sizes[variant]?.height || src.height || null;
14
+ const width = src.width || null;
15
+ const height = src.height || null;
16
16
 
17
17
  return [width, height];
18
18
  }