@raketa-builder/support 0.12.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.12.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.30 KB
11
- CJS ⚡️ Build success in 83ms
10
+ CJS dist/index.js 21.32 KB
11
+ CJS ⚡️ Build success in 39ms
package/dist/index.js CHANGED
@@ -77,8 +77,8 @@ var getWebp = (url) => {
77
77
  var getDimensions = (src, variant) => {
78
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 = src.width;
81
- const height = src.height;
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") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/support",
3
- "version": "0.12.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.width;
15
- const height = src.height;
14
+ const width = src.width || null;
15
+ const height = src.height || null;
16
16
 
17
17
  return [width, height];
18
18
  }
@@ -38,7 +38,7 @@ const getAlt = (src) => {
38
38
  const imageObj = src.image || src;
39
39
 
40
40
  const altSetting = (imageObj?.settings || []).find(
41
- (setting) => setting.key === "alt",
41
+ (setting) => setting.key === "alt"
42
42
  );
43
43
 
44
44
  if (altSetting) {