@ikas/storefront 0.0.54 → 0.0.55
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/build/components/image/index.d.ts +33 -1
- package/build/index.es.js +9 -7
- package/build/index.js +9 -7
- package/package.json +3 -3
|
@@ -1,3 +1,35 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ImageLoader } from "next/image";
|
|
3
|
+
import { IkasImage } from "../../models/index";
|
|
3
4
|
export declare const Image: React.FC<ImageProps>;
|
|
5
|
+
declare const VALID_LAYOUT_VALUES: readonly [
|
|
6
|
+
"fill",
|
|
7
|
+
"fixed",
|
|
8
|
+
"intrinsic",
|
|
9
|
+
"responsive",
|
|
10
|
+
undefined
|
|
11
|
+
];
|
|
12
|
+
declare type LayoutValue = typeof VALID_LAYOUT_VALUES[number];
|
|
13
|
+
declare type ImgElementStyle = NonNullable<JSX.IntrinsicElements["img"]["style"]>;
|
|
14
|
+
declare type ImageProps = Omit<JSX.IntrinsicElements["img"], "src" | "srcSet" | "ref" | "width" | "height" | "loading" | "style"> & {
|
|
15
|
+
loader?: ImageLoader;
|
|
16
|
+
priority?: boolean;
|
|
17
|
+
loading?: "lazy" | "eager" | undefined;
|
|
18
|
+
objectFit?: ImgElementStyle["objectFit"];
|
|
19
|
+
objectPosition?: ImgElementStyle["objectPosition"];
|
|
20
|
+
image: IkasImage;
|
|
21
|
+
sizes: string;
|
|
22
|
+
} & ({
|
|
23
|
+
width?: never;
|
|
24
|
+
height?: never;
|
|
25
|
+
unsized: true;
|
|
26
|
+
} | {
|
|
27
|
+
width?: never;
|
|
28
|
+
height?: never;
|
|
29
|
+
layout: "fill";
|
|
30
|
+
} | {
|
|
31
|
+
width: number | string;
|
|
32
|
+
height: number | string;
|
|
33
|
+
layout?: Exclude<LayoutValue, "fill">;
|
|
34
|
+
});
|
|
35
|
+
export {};
|
package/build/index.es.js
CHANGED
|
@@ -12356,17 +12356,14 @@ var IkasImage = /** @class */ (function () {
|
|
|
12356
12356
|
});
|
|
12357
12357
|
Object.defineProperty(IkasImage.prototype, "src", {
|
|
12358
12358
|
get: function () {
|
|
12359
|
-
return this.getSrc(
|
|
12359
|
+
return this.getSrc(1080);
|
|
12360
12360
|
},
|
|
12361
12361
|
enumerable: false,
|
|
12362
12362
|
configurable: true
|
|
12363
12363
|
});
|
|
12364
12364
|
Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
|
|
12365
12365
|
get: function () {
|
|
12366
|
-
|
|
12367
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
|
|
12368
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12369
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
|
|
12366
|
+
return this.getSrc(180);
|
|
12370
12367
|
},
|
|
12371
12368
|
enumerable: false,
|
|
12372
12369
|
configurable: true
|
|
@@ -27152,8 +27149,13 @@ var pageStyle$1 = {
|
|
|
27152
27149
|
justifyContent: "space-between",
|
|
27153
27150
|
};
|
|
27154
27151
|
|
|
27155
|
-
var Image = function (
|
|
27156
|
-
|
|
27152
|
+
var Image = function (_a) {
|
|
27153
|
+
var image = _a.image, others = __rest(_a, ["image"]);
|
|
27154
|
+
var loader = function (_a) {
|
|
27155
|
+
var width = _a.width;
|
|
27156
|
+
return image.getSrc(width);
|
|
27157
|
+
};
|
|
27158
|
+
return (createElement(Image$1, __assign({}, others, { loader: loader, quality: 100, src: image.src })));
|
|
27157
27159
|
};
|
|
27158
27160
|
|
|
27159
27161
|
var GTMHead = function (_a) {
|
package/build/index.js
CHANGED
|
@@ -12368,17 +12368,14 @@ var IkasImage = /** @class */ (function () {
|
|
|
12368
12368
|
});
|
|
12369
12369
|
Object.defineProperty(IkasImage.prototype, "src", {
|
|
12370
12370
|
get: function () {
|
|
12371
|
-
return this.getSrc(
|
|
12371
|
+
return this.getSrc(1080);
|
|
12372
12372
|
},
|
|
12373
12373
|
enumerable: false,
|
|
12374
12374
|
configurable: true
|
|
12375
12375
|
});
|
|
12376
12376
|
Object.defineProperty(IkasImage.prototype, "thumbnailSrc", {
|
|
12377
12377
|
get: function () {
|
|
12378
|
-
|
|
12379
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + this.id + "/128/128/img.webp";
|
|
12380
|
-
var merchantId = decodeBase64(this.editorApiKey || IkasStorefrontConfig.config.apiKey || "");
|
|
12381
|
-
return "" + process.env.NEXT_PUBLIC_IMG_BASE_URL + merchantId + "/" + this.id + "/128/128/img.webp";
|
|
12378
|
+
return this.getSrc(180);
|
|
12382
12379
|
},
|
|
12383
12380
|
enumerable: false,
|
|
12384
12381
|
configurable: true
|
|
@@ -27130,8 +27127,13 @@ var pageStyle$1 = {
|
|
|
27130
27127
|
justifyContent: "space-between",
|
|
27131
27128
|
};
|
|
27132
27129
|
|
|
27133
|
-
var Image = function (
|
|
27134
|
-
|
|
27130
|
+
var Image = function (_a) {
|
|
27131
|
+
var image = _a.image, others = __rest(_a, ["image"]);
|
|
27132
|
+
var loader = function (_a) {
|
|
27133
|
+
var width = _a.width;
|
|
27134
|
+
return image.getSrc(width);
|
|
27135
|
+
};
|
|
27136
|
+
return (React.createElement(Image__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src })));
|
|
27135
27137
|
};
|
|
27136
27138
|
|
|
27137
27139
|
var GTMHead = function (_a) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"main": "./build/index.js",
|
|
5
5
|
"module": "./build/index.es.js",
|
|
6
6
|
"author": "Umut Ozan Yıldırım",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"mobx": "^6.1.3",
|
|
20
20
|
"mobx-react-lite": "^3.1.5",
|
|
21
|
-
"next": "10.0.
|
|
21
|
+
"next": "10.0.6",
|
|
22
22
|
"react": "17.0.1",
|
|
23
23
|
"react-dom": "17.0.1"
|
|
24
24
|
},
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"jest": "^26.4.2",
|
|
69
69
|
"mobx": "^6.1.3",
|
|
70
70
|
"mobx-react-lite": "^3.1.5",
|
|
71
|
-
"next": "10.0.
|
|
71
|
+
"next": "10.0.6",
|
|
72
72
|
"node-sass": "^5.0.0",
|
|
73
73
|
"postcss": "^8.2.4",
|
|
74
74
|
"prettier": "^2.2.1",
|