@jetshop/ui 6.5.7 → 6.5.8-alpha.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.
- package/CloudflareImage/FlightImage.js +2 -1
- package/CloudflareImage/FlightImage.js.map +1 -1
- package/CloudflareImage/FlightImage.test.js +36 -7
- package/CloudflareImage/useConstructImage.d.ts +9 -2
- package/CloudflareImage/useConstructImage.js +7 -4
- package/CloudflareImage/useConstructImage.js.map +1 -1
- package/Image/FlightImage.js +2 -1
- package/Image/FlightImage.js.map +1 -1
- package/Image/FlightImage.test.js +36 -7
- package/Image/useConstructImage.d.ts +9 -2
- package/Image/useConstructImage.js +7 -4
- package/Image/useConstructImage.js.map +1 -1
- package/package.json +2 -2
|
@@ -32,7 +32,7 @@ function Error() {
|
|
|
32
32
|
}
|
|
33
33
|
function FlightImage(props) {
|
|
34
34
|
const { gravity, crop, src: originalSrc, sizes: sizesArray = [1], aspect, quality, sharpen, critical, modifiedDate, error: ErrorComp = Error, focalPointX, focalPointY } = props, rest = __rest(props, ["gravity", "crop", "src", "sizes", "aspect", "quality", "sharpen", "critical", "modifiedDate", "error", "focalPointX", "focalPointY"]);
|
|
35
|
-
const { theme: { breakpoints }, useMobileImageSizes = false } = useShopConfig();
|
|
35
|
+
const { theme: { breakpoints }, useMobileImageSizes = false, useLowQualityImagePlaceholder = false } = useShopConfig();
|
|
36
36
|
// The baseUrl will change based on the currently-selected channel.
|
|
37
37
|
// We need it to correctly construct the image url
|
|
38
38
|
const { selectedChannel } = React.useContext(ChannelContext);
|
|
@@ -48,6 +48,7 @@ function FlightImage(props) {
|
|
|
48
48
|
quality,
|
|
49
49
|
sharpen,
|
|
50
50
|
critical,
|
|
51
|
+
isPlaceholderEnabled: useLowQualityImagePlaceholder,
|
|
51
52
|
modifiedDate,
|
|
52
53
|
breakpoints,
|
|
53
54
|
baseUrl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlightImage.js","sourceRoot":"","sources":["FlightImage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAQvC,MAAM,CAAC,MAAM,kBAAkB,GAC7B,oHAAoH,CAAC;AA4EvH,SAAS,KAAK;IACZ,OAAO,CACL,6BACE,KAAK,EAAE;YACL,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;SACf,IAEA,CAAC,CAAC,iBAAiB,CAAC,CACjB,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAiB;IACpC,MAAM,EACJ,OAAO,EACP,IAAI,EACJ,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,EACvB,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,KAAK,EAAE,SAAS,GAAG,KAAK,EACxB,WAAW,EACX,WAAW,KAET,KAAK,EADJ,IAAI,UACL,KAAK,EAdH,sIAcL,CAAQ,CAAC;IAEV,MAAM,EACJ,KAAK,EAAE,EAAE,WAAW,EAAE,EACtB,mBAAmB,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"FlightImage.js","sourceRoot":"","sources":["FlightImage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO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
|
29
29
|
global.__IN_SERVER__ = false;
|
|
30
30
|
|
|
31
|
+
// The framework no longer requests a placeholder unless the shop opts in, so the
|
|
32
|
+
// tests that read transform parameters off the placeholder URL ask for one.
|
|
33
|
+
const withPlaceholder = { useLowQualityImagePlaceholder: true };
|
|
34
|
+
|
|
31
35
|
describe('Hooks image component', () => {
|
|
32
36
|
describe('on initial load', () => {
|
|
33
37
|
beforeAll(() => {
|
|
34
38
|
useInView.mockImplementation(() => [null, false]);
|
|
35
39
|
});
|
|
36
|
-
it('
|
|
40
|
+
it('does not request a lqip by default', () => {
|
|
37
41
|
const { placeholderImage } = setup();
|
|
38
42
|
|
|
39
43
|
const src = placeholderImage.getAttribute('src');
|
|
40
44
|
|
|
45
|
+
expect(src).toEqual(transparent);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('renders a lqip version of the image when the shop opts in', () => {
|
|
49
|
+
const { placeholderImage } = setup({ shopConfig: withPlaceholder });
|
|
50
|
+
|
|
51
|
+
const src = placeholderImage.getAttribute('src');
|
|
52
|
+
|
|
41
53
|
expect(src).toEqual(expect.stringContaining('sigma=2.5'));
|
|
42
54
|
expect(src).toEqual(expect.stringContaining('minampl=0.5'));
|
|
43
55
|
});
|
|
44
56
|
|
|
45
57
|
it('sets the lqip to the smallest of the calculated sizes', () => {
|
|
46
|
-
const { placeholderImage } = setup({
|
|
58
|
+
const { placeholderImage } = setup({
|
|
59
|
+
sizes: [0.5, 0.85, 1],
|
|
60
|
+
shopConfig: withPlaceholder
|
|
61
|
+
});
|
|
47
62
|
// Should be 160
|
|
48
63
|
// The smallest breakpoint is 20rem, which is 360px.
|
|
49
64
|
// 0.5 x 360 = 160
|
|
@@ -54,7 +69,10 @@ describe('Hooks image component', () => {
|
|
|
54
69
|
});
|
|
55
70
|
|
|
56
71
|
it('does not render an lqip if critical is true', () => {
|
|
57
|
-
const { placeholderImage } = setup({
|
|
72
|
+
const { placeholderImage } = setup({
|
|
73
|
+
critical: true,
|
|
74
|
+
shopConfig: withPlaceholder
|
|
75
|
+
});
|
|
58
76
|
|
|
59
77
|
const src = placeholderImage.getAttribute('src');
|
|
60
78
|
|
|
@@ -63,7 +81,10 @@ describe('Hooks image component', () => {
|
|
|
63
81
|
});
|
|
64
82
|
|
|
65
83
|
it('accepts sizes as pixel values', () => {
|
|
66
|
-
const { placeholderImage } = setup({
|
|
84
|
+
const { placeholderImage } = setup({
|
|
85
|
+
sizes: [123],
|
|
86
|
+
shopConfig: withPlaceholder
|
|
87
|
+
});
|
|
67
88
|
|
|
68
89
|
const src = placeholderImage.getAttribute('src');
|
|
69
90
|
|
|
@@ -82,7 +103,10 @@ describe('Hooks image component', () => {
|
|
|
82
103
|
const { placeholderImage } = setup();
|
|
83
104
|
});
|
|
84
105
|
it('to fit if an aspect ratio is provided', () => {
|
|
85
|
-
const { placeholderImage } = setup({
|
|
106
|
+
const { placeholderImage } = setup({
|
|
107
|
+
aspect: '1:1',
|
|
108
|
+
shopConfig: withPlaceholder
|
|
109
|
+
});
|
|
86
110
|
|
|
87
111
|
expect(placeholderImage.getAttribute('src')).toEqual(
|
|
88
112
|
expect.stringContaining('&height=320')
|
|
@@ -92,7 +116,11 @@ describe('Hooks image component', () => {
|
|
|
92
116
|
);
|
|
93
117
|
});
|
|
94
118
|
it('to crop if crop prop is true', () => {
|
|
95
|
-
const { placeholderImage } = setup({
|
|
119
|
+
const { placeholderImage } = setup({
|
|
120
|
+
aspect: '1:1',
|
|
121
|
+
crop: true,
|
|
122
|
+
shopConfig: withPlaceholder
|
|
123
|
+
});
|
|
96
124
|
|
|
97
125
|
expect(placeholderImage.getAttribute('src')).toEqual(
|
|
98
126
|
expect.stringContaining('&method=crop')
|
|
@@ -242,6 +270,7 @@ function setup({
|
|
|
242
270
|
sizes,
|
|
243
271
|
aspect,
|
|
244
272
|
cover,
|
|
273
|
+
shopConfig,
|
|
245
274
|
...rest
|
|
246
275
|
} = {}) {
|
|
247
276
|
const channelHandler = new ChannelHandler({
|
|
@@ -250,7 +279,7 @@ function setup({
|
|
|
250
279
|
});
|
|
251
280
|
const utils = render(
|
|
252
281
|
<ChannelProvider channelHandler={channelHandler}>
|
|
253
|
-
<ConfigProvider config={mockShopConfig}>
|
|
282
|
+
<ConfigProvider config={{ ...mockShopConfig, ...shopConfig }}>
|
|
254
283
|
<Image
|
|
255
284
|
src={falsySrc ? imageSrc : imageSrc || 'default.png'}
|
|
256
285
|
error={error}
|
|
@@ -30,6 +30,12 @@ interface ImageParameters {
|
|
|
30
30
|
*/
|
|
31
31
|
aspect?: string;
|
|
32
32
|
critical?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to request a blurred placeholder to show while the full image
|
|
35
|
+
* loads. Off by default. The placeholder is a separate transform request per
|
|
36
|
+
* image, so leaving it on roughly doubles the image requests a page makes.
|
|
37
|
+
*/
|
|
38
|
+
isPlaceholderEnabled?: boolean;
|
|
33
39
|
modifiedDate?: string;
|
|
34
40
|
breakpoints: Record<string, string>;
|
|
35
41
|
baseUrl: string;
|
|
@@ -38,9 +44,10 @@ interface ImageParameters {
|
|
|
38
44
|
}
|
|
39
45
|
/**
|
|
40
46
|
* Dynamically constructs the query parameters used by ImageMagick to size the image appropriately.
|
|
41
|
-
* Also generates a LQIP using query parameters, to display while the full image
|
|
47
|
+
* Also generates a LQIP using query parameters, to display while the full image
|
|
48
|
+
* loads, when the shop has opted into one.
|
|
42
49
|
*/
|
|
43
|
-
export declare function useConstructImage({ gravity, crop, src, sizes, aspect, critical, quality, sharpen, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }: ImageParameters): {
|
|
50
|
+
export declare function useConstructImage({ gravity, crop, src, sizes, aspect, critical, isPlaceholderEnabled, quality, sharpen, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }: ImageParameters): {
|
|
44
51
|
srcset: string;
|
|
45
52
|
sizes: string;
|
|
46
53
|
sizesMobile: string;
|
|
@@ -8,9 +8,10 @@ import { getSrcSetFromWidths } from './utils/getSrcSetFromWidths';
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* Dynamically constructs the query parameters used by ImageMagick to size the image appropriately.
|
|
11
|
-
* Also generates a LQIP using query parameters, to display while the full image
|
|
11
|
+
* Also generates a LQIP using query parameters, to display while the full image
|
|
12
|
+
* loads, when the shop has opted into one.
|
|
12
13
|
*/
|
|
13
|
-
export function useConstructImage({ gravity, crop, src, sizes, aspect, critical, quality, sharpen, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }) {
|
|
14
|
+
export function useConstructImage({ gravity, crop, src, sizes, aspect, critical, isPlaceholderEnabled = false, quality, sharpen, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }) {
|
|
14
15
|
// Warn if gravity was provided but crop was not
|
|
15
16
|
useWarningInDev(gravity && !crop, 'You have provided a gravity without setting crop to true. Your image will not be cropped, and the `gravity` prop will do nothing. Please remove the `gravity` prop.');
|
|
16
17
|
// Warn if the src is a falsy value
|
|
@@ -70,8 +71,9 @@ export function useConstructImage({ gravity, crop, src, sizes, aspect, critical,
|
|
|
70
71
|
};
|
|
71
72
|
const srcset = getSrcSetFromWidths(imageSrc, widths, aspect, imageOptions, modifiedDate, baseUrl);
|
|
72
73
|
const srcsetMobile = getSrcSetFromWidths(imageSrc, mobileWidths, aspect, imageOptions, modifiedDate, baseUrl);
|
|
73
|
-
//
|
|
74
|
-
|
|
74
|
+
// A critical image renders its real source straight away, and every other
|
|
75
|
+
// image only gets a placeholder if the shop asked for one.
|
|
76
|
+
const lqip = critical || !isPlaceholderEnabled
|
|
75
77
|
? null
|
|
76
78
|
: getLQIP(imageSrc, widths, aspect, crop, modifiedDate, baseUrl);
|
|
77
79
|
const sizesMap = getSizesMap(breakpoints, sizes);
|
|
@@ -94,6 +96,7 @@ export function useConstructImage({ gravity, crop, src, sizes, aspect, critical,
|
|
|
94
96
|
sharpen,
|
|
95
97
|
sizes,
|
|
96
98
|
critical,
|
|
99
|
+
isPlaceholderEnabled,
|
|
97
100
|
modifiedDate,
|
|
98
101
|
focalPointX,
|
|
99
102
|
focalPointY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConstructImage.js","sourceRoot":"","sources":["useConstructImage.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useConstructImage.js","sourceRoot":"","sources":["useConstructImage.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAiD1B;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EACJ,GAAG,EACH,KAAK,EACL,MAAM,EACN,QAAQ,EACR,oBAAoB,GAAG,KAAK,EAC5B,OAAO,EACP,OAAO,EACP,YAAY,EACZ,WAAW,EACX,OAAO,EACP,WAAW,EACX,WAAW,EACK;IAChB,gDAAgD;IACh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O;YACP,OAAO;YACP,OAAO;YACP,WAAW;YACX,WAAW;SACZ,CAAC;QAEF,MAAM,MAAM,GAAG,mBAAmB,CAChC,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,OAAO,CACR,CAAC;QACF,MAAM,YAAY,GAAG,mBAAmB,CACtC,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,OAAO,CACR,CAAC;QAEF,0EAA0E;QAC1E,2DAA2D;QAC3D,MAAM,IAAI,GACR,QAAQ,IAAI,CAAC,oBAAoB;YAC/B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;QAErE,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAE7D,OAAO;YACL,QAAQ;YACR,cAAc;YACd,MAAM;YACN,IAAI;YACJ,YAAY;SACb,CAAC;IACJ,CAAC,EAAE;QACD,MAAM;QACN,WAAW;QACX,IAAI;QACJ,OAAO;QACP,WAAW;QACX,QAAQ;QACR,OAAO;QACP,OAAO;QACP,KAAK;QACL,QAAQ;QACR,oBAAoB;QACpB,YAAY;QACZ,WAAW;QACX,WAAW;KACZ,CAAC,CAAC;IACH,OAAO;QACL,MAAM;QACN,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,cAAc;QAC3B,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,WAAW;QACX,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/Image/FlightImage.js
CHANGED
|
@@ -32,7 +32,7 @@ function Error() {
|
|
|
32
32
|
}
|
|
33
33
|
function FlightImage(props) {
|
|
34
34
|
const { gravity, crop, src: originalSrc, sizes: sizesArray = [1], aspect, quality, critical, modifiedDate, error: ErrorComp = Error, focalPointX, focalPointY } = props, rest = __rest(props, ["gravity", "crop", "src", "sizes", "aspect", "quality", "critical", "modifiedDate", "error", "focalPointX", "focalPointY"]);
|
|
35
|
-
const { theme: { breakpoints }, useMobileImageSizes = false } = useShopConfig();
|
|
35
|
+
const { theme: { breakpoints }, useMobileImageSizes = false, useLowQualityImagePlaceholder = false } = useShopConfig();
|
|
36
36
|
// The baseUrl will change based on the currently-selected channel.
|
|
37
37
|
// We need it to correctly construct the image url
|
|
38
38
|
const { selectedChannel } = React.useContext(ChannelContext);
|
|
@@ -47,6 +47,7 @@ function FlightImage(props) {
|
|
|
47
47
|
aspect,
|
|
48
48
|
quality,
|
|
49
49
|
critical,
|
|
50
|
+
isPlaceholderEnabled: useLowQualityImagePlaceholder,
|
|
50
51
|
modifiedDate,
|
|
51
52
|
breakpoints,
|
|
52
53
|
baseUrl,
|
package/Image/FlightImage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlightImage.js","sourceRoot":"","sources":["FlightImage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAQvC,MAAM,CAAC,MAAM,kBAAkB,GAC7B,oHAAoH,CAAC;AA8CvH,SAAS,KAAK;IACZ,OAAO,CACL,6BACE,KAAK,EAAE;YACL,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,QAAQ,EAAE,UAAU;YACpB,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AAC,KAAK,oBACA,IAAI,IACR,aAAa,EAAE,KAAK,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,IAAI,OAAO,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAClE,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,EAC3D,MAAM,EAAE,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EAC9D,UAAU,EACR,OAAO,IAAI,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,EAEhE,KAAK,EAAE,SAAS,IAChB,CACH,CACK,CACT,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -28,22 +28,37 @@ const transparent =
|
|
|
28
28
|
|
|
29
29
|
global.__IN_SERVER__ = false;
|
|
30
30
|
|
|
31
|
+
// The framework no longer requests a placeholder unless the shop opts in, so the
|
|
32
|
+
// tests that read transform parameters off the placeholder URL ask for one.
|
|
33
|
+
const withPlaceholder = { useLowQualityImagePlaceholder: true };
|
|
34
|
+
|
|
31
35
|
describe('Hooks image component', () => {
|
|
32
36
|
describe('on initial load', () => {
|
|
33
37
|
beforeAll(() => {
|
|
34
38
|
useInView.mockImplementation(() => [null, false]);
|
|
35
39
|
});
|
|
36
|
-
it('
|
|
40
|
+
it('does not request a lqip by default', () => {
|
|
37
41
|
const { placeholderImage } = setup();
|
|
38
42
|
|
|
39
43
|
const src = placeholderImage.getAttribute('src');
|
|
40
44
|
|
|
45
|
+
expect(src).toEqual(transparent);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('renders a lqip version of the image when the shop opts in', () => {
|
|
49
|
+
const { placeholderImage } = setup({ shopConfig: withPlaceholder });
|
|
50
|
+
|
|
51
|
+
const src = placeholderImage.getAttribute('src');
|
|
52
|
+
|
|
41
53
|
expect(src).toEqual(expect.stringContaining('sigma=2.5'));
|
|
42
54
|
expect(src).toEqual(expect.stringContaining('minampl=0.5'));
|
|
43
55
|
});
|
|
44
56
|
|
|
45
57
|
it('sets the lqip to the smallest of the calculated sizes', () => {
|
|
46
|
-
const { placeholderImage } = setup({
|
|
58
|
+
const { placeholderImage } = setup({
|
|
59
|
+
sizes: [0.5, 0.85, 1],
|
|
60
|
+
shopConfig: withPlaceholder
|
|
61
|
+
});
|
|
47
62
|
// Should be 160
|
|
48
63
|
// The smallest breakpoint is 20rem, which is 360px.
|
|
49
64
|
// 0.5 x 360 = 160
|
|
@@ -54,7 +69,10 @@ describe('Hooks image component', () => {
|
|
|
54
69
|
});
|
|
55
70
|
|
|
56
71
|
it('does not render an lqip if critical is true', () => {
|
|
57
|
-
const { placeholderImage } = setup({
|
|
72
|
+
const { placeholderImage } = setup({
|
|
73
|
+
critical: true,
|
|
74
|
+
shopConfig: withPlaceholder
|
|
75
|
+
});
|
|
58
76
|
|
|
59
77
|
const src = placeholderImage.getAttribute('src');
|
|
60
78
|
|
|
@@ -63,7 +81,10 @@ describe('Hooks image component', () => {
|
|
|
63
81
|
});
|
|
64
82
|
|
|
65
83
|
it('accepts sizes as pixel values', () => {
|
|
66
|
-
const { placeholderImage } = setup({
|
|
84
|
+
const { placeholderImage } = setup({
|
|
85
|
+
sizes: [123],
|
|
86
|
+
shopConfig: withPlaceholder
|
|
87
|
+
});
|
|
67
88
|
|
|
68
89
|
const src = placeholderImage.getAttribute('src');
|
|
69
90
|
|
|
@@ -82,7 +103,10 @@ describe('Hooks image component', () => {
|
|
|
82
103
|
const { placeholderImage } = setup();
|
|
83
104
|
});
|
|
84
105
|
it('to fit if an aspect ratio is provided', () => {
|
|
85
|
-
const { placeholderImage } = setup({
|
|
106
|
+
const { placeholderImage } = setup({
|
|
107
|
+
aspect: '1:1',
|
|
108
|
+
shopConfig: withPlaceholder
|
|
109
|
+
});
|
|
86
110
|
|
|
87
111
|
expect(placeholderImage.getAttribute('src')).toEqual(
|
|
88
112
|
expect.stringContaining('&height=320')
|
|
@@ -92,7 +116,11 @@ describe('Hooks image component', () => {
|
|
|
92
116
|
);
|
|
93
117
|
});
|
|
94
118
|
it('to crop if crop prop is true', () => {
|
|
95
|
-
const { placeholderImage } = setup({
|
|
119
|
+
const { placeholderImage } = setup({
|
|
120
|
+
aspect: '1:1',
|
|
121
|
+
crop: true,
|
|
122
|
+
shopConfig: withPlaceholder
|
|
123
|
+
});
|
|
96
124
|
|
|
97
125
|
expect(placeholderImage.getAttribute('src')).toEqual(
|
|
98
126
|
expect.stringContaining('&method=crop')
|
|
@@ -242,6 +270,7 @@ function setup({
|
|
|
242
270
|
sizes,
|
|
243
271
|
aspect,
|
|
244
272
|
cover,
|
|
273
|
+
shopConfig,
|
|
245
274
|
...rest
|
|
246
275
|
} = {}) {
|
|
247
276
|
const channelHandler = new ChannelHandler({
|
|
@@ -250,7 +279,7 @@ function setup({
|
|
|
250
279
|
});
|
|
251
280
|
const utils = render(
|
|
252
281
|
<ChannelProvider channelHandler={channelHandler}>
|
|
253
|
-
<ConfigProvider config={mockShopConfig}>
|
|
282
|
+
<ConfigProvider config={{ ...mockShopConfig, ...shopConfig }}>
|
|
254
283
|
<Image
|
|
255
284
|
src={falsySrc ? imageSrc : imageSrc || 'default.png'}
|
|
256
285
|
error={error}
|
|
@@ -25,6 +25,12 @@ interface ImageParameters {
|
|
|
25
25
|
*/
|
|
26
26
|
aspect?: string;
|
|
27
27
|
critical?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to request a blurred placeholder to show while the full image
|
|
30
|
+
* loads. Off by default. The placeholder is a separate transform request per
|
|
31
|
+
* image, so leaving it on roughly doubles the image requests a page makes.
|
|
32
|
+
*/
|
|
33
|
+
isPlaceholderEnabled?: boolean;
|
|
28
34
|
modifiedDate?: string;
|
|
29
35
|
breakpoints: Record<string, string>;
|
|
30
36
|
baseUrl: string;
|
|
@@ -33,9 +39,10 @@ interface ImageParameters {
|
|
|
33
39
|
}
|
|
34
40
|
/**
|
|
35
41
|
* Dynamically constructs the query parameters used by ImageMagick to size the image appropriately.
|
|
36
|
-
* Also generates a LQIP using query parameters, to display while the full image
|
|
42
|
+
* Also generates a LQIP using query parameters, to display while the full image
|
|
43
|
+
* loads, when the shop has opted into one.
|
|
37
44
|
*/
|
|
38
|
-
export declare function useConstructImage({ gravity, crop, src, sizes, aspect, critical, quality, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }: ImageParameters): {
|
|
45
|
+
export declare function useConstructImage({ gravity, crop, src, sizes, aspect, critical, isPlaceholderEnabled, quality, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }: ImageParameters): {
|
|
39
46
|
srcset: string;
|
|
40
47
|
webpSrcset: string;
|
|
41
48
|
sizes: string;
|
|
@@ -8,9 +8,10 @@ import { getSrcSetFromWidths } from './utils/getSrcSetFromWidths';
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
/**
|
|
10
10
|
* Dynamically constructs the query parameters used by ImageMagick to size the image appropriately.
|
|
11
|
-
* Also generates a LQIP using query parameters, to display while the full image
|
|
11
|
+
* Also generates a LQIP using query parameters, to display while the full image
|
|
12
|
+
* loads, when the shop has opted into one.
|
|
12
13
|
*/
|
|
13
|
-
export function useConstructImage({ gravity, crop, src, sizes, aspect, critical, quality, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }) {
|
|
14
|
+
export function useConstructImage({ gravity, crop, src, sizes, aspect, critical, isPlaceholderEnabled = false, quality, modifiedDate, breakpoints, baseUrl, focalPointX, focalPointY }) {
|
|
14
15
|
// Warn if gravity was provided but crop was not
|
|
15
16
|
useWarningInDev(gravity && !crop, 'You have provided a gravity without setting crop to true. Your image will not be cropped, and the `gravity` prop will do nothing. Please remove the `gravity` prop.');
|
|
16
17
|
// Warn if the src is a falsy value
|
|
@@ -78,8 +79,9 @@ export function useConstructImage({ gravity, crop, src, sizes, aspect, critical,
|
|
|
78
79
|
const webpSrcset = srcSetFromWidths({ webp: true });
|
|
79
80
|
const srcsetMobile = mobileSrcSetFromWidths({ webp: false });
|
|
80
81
|
const webpSrcsetMobile = mobileSrcSetFromWidths({ webp: true });
|
|
81
|
-
//
|
|
82
|
-
|
|
82
|
+
// A critical image renders its real source straight away, and every other
|
|
83
|
+
// image only gets a placeholder if the shop asked for one.
|
|
84
|
+
const lqip = critical || !isPlaceholderEnabled
|
|
83
85
|
? null
|
|
84
86
|
: getLQIP(imageSrc, widths, aspect, crop, modifiedDate);
|
|
85
87
|
const sizesMap = getSizesMap(breakpoints, sizes);
|
|
@@ -103,6 +105,7 @@ export function useConstructImage({ gravity, crop, src, sizes, aspect, critical,
|
|
|
103
105
|
quality,
|
|
104
106
|
sizes,
|
|
105
107
|
critical,
|
|
108
|
+
isPlaceholderEnabled,
|
|
106
109
|
modifiedDate,
|
|
107
110
|
focalPointX,
|
|
108
111
|
focalPointY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConstructImage.js","sourceRoot":"","sources":["useConstructImage.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useConstructImage.js","sourceRoot":"","sources":["useConstructImage.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE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AAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAEhE,0EAA0E;QAC1E,2DAA2D;QAC3D,MAAM,IAAI,GACR,QAAQ,IAAI,CAAC,oBAAoB;YAC/B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;QAE5D,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,WAAW,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAI7D,OAAO;YACL,QAAQ;YACR,cAAc;YACd,MAAM;YACN,IAAI;YACJ,UAAU;YACV,YAAY;YACZ,gBAAgB;SACjB,CAAC;IACJ,CAAC,EAAE;QACD,MAAM;QACN,WAAW;QACX,IAAI;QACJ,OAAO;QACP,WAAW;QACX,QAAQ;QACR,OAAO;QACP,KAAK;QACL,QAAQ;QACR,oBAAoB;QACpB,YAAY;QACZ,WAAW;QACX,WAAW;KACZ,CAAC,CAAC;IACH,OAAO;QACL,MAAM;QACN,UAAU;QACV,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,cAAc;QAC3B,IAAI;QACJ,GAAG,EAAE,QAAQ;QACb,WAAW;QACX,YAAY;QACZ,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetshop/ui",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.8-alpha.0+8de2285cd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"react": "^18",
|
|
62
62
|
"react-dom": "^18"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "8de2285cd5f0d20028bb6e170f4bddee62954ad8"
|
|
65
65
|
}
|