@graphcommerce/image 3.1.6 → 3.1.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`01372b918`](https://github.com/graphcommerce-org/graphcommerce/commit/01372b918a291e01cbf5db40edcb40fb1c2af313)]:
8
+ - @graphcommerce/framer-utils@3.2.0
9
+
10
+ ## 3.1.8
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b), [`5c5645e6e`](https://github.com/graphcommerce-org/graphcommerce/commit/5c5645e6eaf5314c063f05547707fcd4b34a8717)]:
15
+ - @graphcommerce/framer-utils@3.1.5
16
+
17
+ ## 3.1.7
18
+
19
+ ### Patch Changes
20
+
21
+ - [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages
22
+
23
+ - Updated dependencies [[`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]:
24
+ - @graphcommerce/framer-utils@3.1.4
25
+
3
26
  ## 3.1.6
4
27
 
5
28
  ### Patch Changes
@@ -260,6 +260,7 @@ const Image = React.forwardRef<HTMLImageElement, ImageProps>(
260
260
  blurDataURL,
261
261
  dontReportWronglySizedImages,
262
262
  pictureProps,
263
+ sx = [],
263
264
  ...imgProps
264
265
  },
265
266
  forwardedRef,
@@ -494,7 +495,7 @@ const Image = React.forwardRef<HTMLImageElement, ImageProps>(
494
495
  width={width}
495
496
  height={height}
496
497
  data-nimg
497
- style={style}
498
+ sx={[style, ...(Array.isArray(sx) ? sx : [sx])]}
498
499
  />
499
500
  ) : (
500
501
  <Picture {...pictureProps}>
@@ -512,7 +513,7 @@ const Image = React.forwardRef<HTMLImageElement, ImageProps>(
512
513
  loading={loading ?? 'lazy'}
513
514
  width={width}
514
515
  height={height}
515
- style={style}
516
+ sx={[style, ...(Array.isArray(sx) ? sx : [sx])]}
516
517
  sizes={sizes}
517
518
  data-nimg
518
519
  decoding='async'
@@ -530,27 +531,24 @@ const Image = React.forwardRef<HTMLImageElement, ImageProps>(
530
531
  rel='preload'
531
532
  as='image'
532
533
  media='(-webkit-min-device-pixel-ratio: 2.5)'
533
- // @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
534
- imagesrcset={srcSet3x}
535
- imagesizes={sizes}
534
+ imageSrcSet={srcSet3x}
535
+ imageSizes={sizes}
536
536
  />
537
537
  <link
538
538
  key={`img-${srcSet2x}${sizes}`}
539
539
  rel='preload'
540
540
  as='image'
541
541
  media='(-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 2.49)'
542
- // @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
543
- imagesrcset={srcSet2x}
544
- imagesizes={sizes}
542
+ imageSrcSet={srcSet2x}
543
+ imageSizes={sizes}
545
544
  />
546
545
  <link
547
546
  key={`img-${srcSet1x}${sizes}`}
548
547
  rel='preload'
549
548
  as='image'
550
549
  media='(-webkit-max-device-pixel-ratio: 1.49)'
551
- // @ts-expect-error imagesrcset/imagesizes is not yet in the link element type.
552
- imagesrcset={srcSet1x}
553
- imagesizes={sizes}
550
+ imageSrcSet={srcSet1x}
551
+ imageSizes={sizes}
554
552
  />
555
553
  </>
556
554
  )}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/image",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.1.6",
5
+ "version": "3.1.9",
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
8
  "dev": "tsc -W"
@@ -15,10 +15,10 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@graphcommerce/framer-utils": "3.1.3"
18
+ "@graphcommerce/framer-utils": "3.2.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@graphcommerce/eslint-config-pwa": "^4.1.5",
21
+ "@graphcommerce/eslint-config-pwa": "^4.1.10",
22
22
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
23
23
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
24
24
  "@playwright/test": "^1.21.1",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@mui/material": "5.5.3",
29
- "next": "12.1.2",
30
- "react": "^17.0.2",
31
- "react-dom": "^17.0.2"
29
+ "next": "^12.1.2",
30
+ "react": "^18.0.0",
31
+ "react-dom": "^18.0.0"
32
32
  }
33
33
  }