@graphcommerce/image 3.0.2 → 3.1.2

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,72 +1,91 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
8
+
9
+ - Updated dependencies [[`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9)]:
10
+ - @graphcommerce/framer-utils@3.1.1
11
+
12
+ ## 3.1.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
17
+
18
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
19
+
20
+ * Updated dependencies [[`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]:
21
+ - @graphcommerce/framer-utils@3.0.4
22
+
23
+ ## 3.1.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [#1284](https://github.com/ho-nl/m2-pwa/pull/1284) [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14) Thanks [@paales](https://github.com/paales)! - SvgIcon is now more extenable and flexible:
28
+
29
+ - It will automatically calculate the stroke-width of the SVG based on the rendered size, allowing for a more flexible use for icons.
30
+
31
+ - Make SvgIcon themable in your own Theme.
32
+
33
+ - Create overrides for components that will be used throughout the app.
34
+
35
+ ### Patch Changes
36
+
37
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
38
+
39
+ * [#1278](https://github.com/ho-nl/m2-pwa/pull/1278) [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
40
+
41
+ * Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
42
+ - @graphcommerce/framer-utils@3.0.3
43
+
3
44
  ## 3.0.2
4
45
 
5
46
  ### Patch Changes
6
47
 
7
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
8
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
9
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
10
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
11
- duplicate packages in the node_modules folders.
12
-
13
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
14
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
15
- Thanks [@paales](https://github.com/paales)! - Upgraded to
16
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
17
- implementing
18
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
19
- soon.
20
-
21
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
22
- frontend to be able to revalidate pages manually.
23
-
24
- * Updated dependencies
25
- [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
26
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
48
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
49
+
50
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
51
+
52
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
53
+
54
+ * Updated dependencies [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
27
55
  - @graphcommerce/framer-utils@3.0.2
28
56
 
29
57
  ## 3.0.1
30
58
 
31
59
  ### Patch Changes
32
60
 
33
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
34
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
35
- so that the packages link to back to the website and repository
36
- - Updated dependencies
37
- [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
61
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
62
+ - Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
38
63
  - @graphcommerce/framer-utils@3.0.1
39
64
 
40
65
  ## 3.0.0
41
66
 
42
67
  ### Major Changes
43
68
 
44
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
45
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
46
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
69
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
47
70
 
48
71
  ### Patch Changes
49
72
 
50
- - Updated dependencies
51
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
73
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
52
74
  - @graphcommerce/framer-utils@3.0.0
53
75
 
54
- All notable changes to this project will be documented in this file. See
55
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
76
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
56
77
 
57
78
  # [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.13...@graphcommerce/image@2.105.0) (2021-10-27)
58
79
 
59
80
  ### Features
60
81
 
61
- - **nextjs:** upgraded to nextjs 12
62
- ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
82
+ - **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
63
83
 
64
84
  ## [2.104.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.0...@graphcommerce/image@2.104.2) (2021-09-27)
65
85
 
66
86
  ### Bug Fixes
67
87
 
68
- - versions
69
- ([b8b306c](https://github.com/ho-nl/m2-pwa/commit/b8b306c8f3a13415e441d0593c638ae2a3731cd6))
88
+ - versions ([b8b306c](https://github.com/ho-nl/m2-pwa/commit/b8b306c8f3a13415e441d0593c638ae2a3731cd6))
70
89
 
71
90
  ## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.0...@graphcommerce/image@2.104.1) (2021-09-27)
72
91
 
@@ -76,96 +95,69 @@ All notable changes to this project will be documented in this file. See
76
95
 
77
96
  ### Bug Fixes
78
97
 
79
- - cart item image sizes
80
- ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
81
- - ignore md files from triggering version updates
82
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
83
- - **image:** add loading attribute to unoptimized image
84
- ([13f7709](https://github.com/ho-nl/m2-pwa/commit/13f77096a5b1ed3f60cfa7b61ac7373d1a2b44d4))
85
- - **image:** change sizing of images on grid/productpage
86
- ([0e573b6](https://github.com/ho-nl/m2-pwa/commit/0e573b69a2d405126433e7c4747c01b533858b78))
87
- - **image:** component would rerender unnessarily
88
- ([bfc041d](https://github.com/ho-nl/m2-pwa/commit/bfc041d39e34faf60581dbdba7a15a32928368b3))
89
- - **image:** do not report when image isn't rendered yet
90
- ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
91
- - **image:** fix build
92
- ([b730cb6](https://github.com/ho-nl/m2-pwa/commit/b730cb6ae4e50dcf2f60e2046d6acf3047caacb3))
93
- - **image:** image decoding async added
94
- ([8c5f59f](https://github.com/ho-nl/m2-pwa/commit/8c5f59f54b9e28b60e197b7ddefdd78b71f6665e))
95
- - **image:** image src is visible while loading the image
96
- ([735d79e](https://github.com/ho-nl/m2-pwa/commit/735d79e8ccab296dcc5750458fc1760f17fe47c7))
97
- - **image:** make sure unoptimized images are preloaded correctly and remove preloads from lots of
98
- images
99
- ([fb2b4fc](https://github.com/ho-nl/m2-pwa/commit/fb2b4fcb5336ff880a9b32775847d7b6738ba1ea))
100
- - introduced SvgImageSimple and solve issue with review chips
101
- ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
102
- - make packages private so they dont get published accidently
103
- ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
98
+ - cart item image sizes ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
99
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
100
+ - **image:** add loading attribute to unoptimized image ([13f7709](https://github.com/ho-nl/m2-pwa/commit/13f77096a5b1ed3f60cfa7b61ac7373d1a2b44d4))
101
+ - **image:** change sizing of images on grid/productpage ([0e573b6](https://github.com/ho-nl/m2-pwa/commit/0e573b69a2d405126433e7c4747c01b533858b78))
102
+ - **image:** component would rerender unnessarily ([bfc041d](https://github.com/ho-nl/m2-pwa/commit/bfc041d39e34faf60581dbdba7a15a32928368b3))
103
+ - **image:** do not report when image isn't rendered yet ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
104
+ - **image:** fix build ([b730cb6](https://github.com/ho-nl/m2-pwa/commit/b730cb6ae4e50dcf2f60e2046d6acf3047caacb3))
105
+ - **image:** image decoding async added ([8c5f59f](https://github.com/ho-nl/m2-pwa/commit/8c5f59f54b9e28b60e197b7ddefdd78b71f6665e))
106
+ - **image:** image src is visible while loading the image ([735d79e](https://github.com/ho-nl/m2-pwa/commit/735d79e8ccab296dcc5750458fc1760f17fe47c7))
107
+ - **image:** make sure unoptimized images are preloaded correctly and remove preloads from lots of images ([fb2b4fc](https://github.com/ho-nl/m2-pwa/commit/fb2b4fcb5336ff880a9b32775847d7b6738ba1ea))
108
+ - introduced SvgImageSimple and solve issue with review chips ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
109
+ - make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
104
110
 
105
111
  ### Features
106
112
 
107
- - **image:** allow passing props to the picture component
108
- ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
109
- - **image:** introduced completely rewritten Image component
110
- ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
111
- - **playwright:** added new playwright package to enable browser testing
112
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
113
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
114
- [@reachdigital](https://github.com/reachdigital)
115
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
116
- - upgraded to nextjs 11
117
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
113
+ - **image:** allow passing props to the picture component ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
114
+ - **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
115
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
116
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
117
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
118
118
 
119
119
  # Change Log
120
120
 
121
- All notable changes to this project will be documented in this file. See
122
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
121
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
123
122
 
124
123
  # [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.102.1...@graphcommerce/image@2.103.0) (2021-09-01)
125
124
 
126
125
  ### Features
127
126
 
128
- - **image:** allow passing props to the picture component
129
- ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
127
+ - **image:** allow passing props to the picture component ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
130
128
 
131
129
  # [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.5...@graphcommerce/image@2.102.0) (2021-08-12)
132
130
 
133
131
  ### Features
134
132
 
135
- - upgraded to nextjs 11
136
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
133
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
137
134
 
138
135
  ## [2.101.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.3...@graphcommerce/image@2.101.4) (2021-08-09)
139
136
 
140
137
  ### Bug Fixes
141
138
 
142
- - **image:** do not report when image isn't rendered yet
143
- ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
139
+ - **image:** do not report when image isn't rendered yet ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
144
140
 
145
141
  ## [2.101.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.2...@graphcommerce/image@2.101.3) (2021-08-06)
146
142
 
147
143
  ### Bug Fixes
148
144
 
149
- - introduced SvgImageSimple and solve issue with review chips
150
- ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
145
+ - introduced SvgImageSimple and solve issue with review chips ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
151
146
 
152
147
  ## [2.101.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.1...@graphcommerce/image@2.101.2) (2021-08-04)
153
148
 
154
149
  ### Bug Fixes
155
150
 
156
- - cart item image sizes
157
- ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
151
+ - cart item image sizes ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
158
152
 
159
153
  # [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.12...@graphcommerce/image@2.101.0) (2021-07-26)
160
154
 
161
155
  ### Features
162
156
 
163
- - **playwright:** added new playwright package to enable browser testing
164
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
157
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
165
158
 
166
159
  ## [2.100.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.10...@graphcommerce/image@2.100.11) (2021-07-20)
167
160
 
168
161
  ### Bug Fixes
169
162
 
170
- - ignore md files from triggering version updates
171
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
163
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
@@ -1,14 +1,15 @@
1
+ /* eslint-disable @typescript-eslint/no-restricted-imports */
1
2
  /* eslint-disable prefer-const */
2
3
  /* eslint-disable no-param-reassign */
3
4
  /* eslint-disable @next/next/no-img-element */
4
5
  /* eslint-disable jsx-a11y/alt-text */
5
6
  import { useForkRef, styled, SxProps, Theme } from '@mui/material'
6
7
  import {
7
- ImageConfigComplete,
8
8
  LoaderValue,
9
9
  VALID_LOADERS,
10
+ ImageConfigComplete,
10
11
  imageConfigDefault,
11
- } from 'next/dist/server/image-config'
12
+ } from 'next/dist/shared/lib/image-config'
12
13
  import { ImageConfigContext } from 'next/dist/shared/lib/image-config-context'
13
14
  import Head from 'next/head'
14
15
  import type { ImageLoaderProps, ImageLoader } from 'next/image'
@@ -26,7 +27,7 @@ import {
26
27
 
27
28
  if (typeof window === 'undefined') {
28
29
  // eslint-disable-next-line no-underscore-dangle
29
- ;(global as any).__NEXT_IMAGE_IMPORTED = true
30
+ global.__NEXT_IMAGE_IMPORTED = true
30
31
  }
31
32
 
32
33
  export type { ImageLoaderProps, ImageLoader }
@@ -59,7 +60,7 @@ interface StaticRequire {
59
60
  default: StaticImageData
60
61
  }
61
62
 
62
- type StaticImport = StaticRequire | StaticImageData
63
+ export type StaticImport = StaticRequire | StaticImageData
63
64
 
64
65
  export function isStaticRequire(src: StaticRequire | StaticImageData): src is StaticRequire {
65
66
  return (src as StaticRequire).default !== undefined
@@ -238,7 +239,7 @@ const Img = styled('img')({})
238
239
  const Picture = styled('picture')({})
239
240
 
240
241
  // eslint-disable-next-line no-underscore-dangle
241
- const configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete
242
+ const configEnv = process.env.__NEXT_IMAGE_OPTS as unknown as ImageConfigComplete
242
243
 
243
244
  const Image = React.forwardRef<HTMLImageElement, ImageProps>(
244
245
  (
@@ -283,16 +284,16 @@ const Image = React.forwardRef<HTMLImageElement, ImageProps>(
283
284
  if (process.env.NODE_ENV === 'production') return () => {}
284
285
  if (!ref.current || unoptimized || dontReportWronglySizedImages) return () => {}
285
286
 
286
- function getContainedSize(img: HTMLImageElement) {
287
- let ratio = img.naturalWidth / img.naturalHeight
288
- let w = img.height * ratio
289
- let h = img.height
290
- if (w > img.width) {
291
- w = img.width
292
- h = img.width / ratio
293
- }
294
- return [w, h]
295
- }
287
+ // function getContainedSize(img: HTMLImageElement) {
288
+ // let ratio = img.naturalWidth / img.naturalHeight
289
+ // let w = img.height * ratio
290
+ // let h = img.height
291
+ // if (w > img.width) {
292
+ // w = img.width
293
+ // h = img.width / ratio
294
+ // }
295
+ // return [w, h]
296
+ // }
296
297
 
297
298
  function reportSizes(img: HTMLImageElement) {
298
299
  let ratio: number
package/config/config.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { ImageConfigComplete, imageConfigDefault } from 'next/dist/server/image-config'
1
+ import { ImageConfigComplete, imageConfigDefault } from 'next/dist/shared/lib/image-config'
2
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
2
3
  import { ImageLoaderProps } from 'next/image'
3
4
 
4
5
  export type DefaultImageLoaderProps = ImageLoaderProps & { root: string }
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.0.2",
5
+ "version": "3.1.2",
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
8
  "dev": "tsc -W"
@@ -15,18 +15,19 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@graphcommerce/framer-utils": "^3.0.2"
18
+ "@graphcommerce/framer-utils": "^3.1.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@graphcommerce/eslint-config-pwa": "^4.0.2",
22
- "@graphcommerce/prettier-config-pwa": "^4.0.1",
23
- "@graphcommerce/typescript-config-pwa": "^4.0.1",
24
- "@playwright/test": "^1.19.1"
21
+ "@graphcommerce/eslint-config-pwa": "^4.1.3",
22
+ "@graphcommerce/prettier-config-pwa": "^4.0.5",
23
+ "@graphcommerce/typescript-config-pwa": "^4.0.2",
24
+ "@playwright/test": "^1.20.1",
25
+ "type-fest": "2.12.1"
25
26
  },
26
27
  "peerDependencies": {
28
+ "@mui/material": "^5.5.0",
27
29
  "next": "^12.1.0",
28
30
  "react": "^17.0.2",
29
- "react-dom": "^17.0.2",
30
- "type-fest": "^2.11.2"
31
+ "react-dom": "^17.0.2"
31
32
  }
32
33
  }