@graphcommerce/image 3.1.0 → 3.1.3
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 +70 -100
- package/components/Image.tsx +15 -14
- package/config/config.ts +2 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1378](https://github.com/graphcommerce-org/graphcommerce/pull/1378) [`b610a6e40`](https://github.com/graphcommerce-org/graphcommerce/commit/b610a6e4049e8c9e8b5d2aeff31b8e1bfc24abe5) Thanks [@paales](https://github.com/paales)! - Pin all versions internally so we can’t end up in an unfixable state for the user
|
|
8
|
+
|
|
9
|
+
## 3.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9)]:
|
|
16
|
+
- @graphcommerce/framer-utils@3.1.1
|
|
17
|
+
|
|
18
|
+
## 3.1.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#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.
|
|
23
|
+
|
|
24
|
+
* [#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
|
|
25
|
+
|
|
26
|
+
* Updated dependencies [[`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]:
|
|
27
|
+
- @graphcommerce/framer-utils@3.0.4
|
|
28
|
+
|
|
3
29
|
## 3.1.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
6
32
|
|
|
7
|
-
- [#1284](https://github.com/ho-nl/m2-pwa/pull/1284)
|
|
8
|
-
[`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)
|
|
9
|
-
Thanks [@paales](https://github.com/paales)! - SvgIcon is now more extenable and flexible:
|
|
33
|
+
- [#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:
|
|
10
34
|
|
|
11
|
-
- It will automatically calculate the stroke-width of the SVG based on the rendered size, allowing
|
|
12
|
-
for a more flexible use for icons.
|
|
35
|
+
- It will automatically calculate the stroke-width of the SVG based on the rendered size, allowing for a more flexible use for icons.
|
|
13
36
|
|
|
14
37
|
- Make SvgIcon themable in your own Theme.
|
|
15
38
|
|
|
@@ -17,84 +40,58 @@
|
|
|
17
40
|
|
|
18
41
|
### Patch Changes
|
|
19
42
|
|
|
20
|
-
- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
|
|
21
|
-
Thanks [@paales](https://github.com/paales)! - made packages public
|
|
43
|
+
- [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
|
|
22
44
|
|
|
23
|
-
* [#1278](https://github.com/ho-nl/m2-pwa/pull/1278)
|
|
24
|
-
[`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20)
|
|
25
|
-
Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Upgraded dependencies to the latest version
|
|
45
|
+
* [#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
|
|
26
46
|
|
|
27
|
-
* Updated dependencies
|
|
28
|
-
[[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
|
|
47
|
+
* Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)]:
|
|
29
48
|
- @graphcommerce/framer-utils@3.0.3
|
|
30
49
|
|
|
31
50
|
## 3.0.2
|
|
32
51
|
|
|
33
52
|
### Patch Changes
|
|
34
53
|
|
|
35
|
-
- [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* [
|
|
42
|
-
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
|
|
43
|
-
Thanks [@paales](https://github.com/paales)! - Upgraded to
|
|
44
|
-
[NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
|
|
45
|
-
implementing
|
|
46
|
-
[On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
|
|
47
|
-
soon.
|
|
48
|
-
|
|
49
|
-
This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
|
|
50
|
-
frontend to be able to revalidate pages manually.
|
|
51
|
-
|
|
52
|
-
* Updated dependencies
|
|
53
|
-
[[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
|
|
54
|
-
[`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
|
|
54
|
+
- [#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.
|
|
55
|
+
|
|
56
|
+
* [#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.
|
|
57
|
+
|
|
58
|
+
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.
|
|
59
|
+
|
|
60
|
+
* Updated dependencies [[`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)]:
|
|
55
61
|
- @graphcommerce/framer-utils@3.0.2
|
|
56
62
|
|
|
57
63
|
## 3.0.1
|
|
58
64
|
|
|
59
65
|
### Patch Changes
|
|
60
66
|
|
|
61
|
-
- [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
|
|
62
|
-
|
|
63
|
-
so that the packages link to back to the website and repository
|
|
64
|
-
- Updated dependencies
|
|
65
|
-
[[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
|
|
67
|
+
- [`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
|
|
68
|
+
- Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
|
|
66
69
|
- @graphcommerce/framer-utils@3.0.1
|
|
67
70
|
|
|
68
71
|
## 3.0.0
|
|
69
72
|
|
|
70
73
|
### Major Changes
|
|
71
74
|
|
|
72
|
-
- [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
|
|
73
|
-
[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
|
|
74
|
-
Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
|
|
75
|
+
- [#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
|
|
75
76
|
|
|
76
77
|
### Patch Changes
|
|
77
78
|
|
|
78
|
-
- Updated dependencies
|
|
79
|
-
[[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
79
|
+
- Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
80
80
|
- @graphcommerce/framer-utils@3.0.0
|
|
81
81
|
|
|
82
|
-
All notable changes to this project will be documented in this file. See
|
|
83
|
-
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
82
|
+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
84
83
|
|
|
85
84
|
# [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.13...@graphcommerce/image@2.105.0) (2021-10-27)
|
|
86
85
|
|
|
87
86
|
### Features
|
|
88
87
|
|
|
89
|
-
- **nextjs:** upgraded to nextjs 12
|
|
90
|
-
([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
|
|
88
|
+
- **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
|
|
91
89
|
|
|
92
90
|
## [2.104.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.0...@graphcommerce/image@2.104.2) (2021-09-27)
|
|
93
91
|
|
|
94
92
|
### Bug Fixes
|
|
95
93
|
|
|
96
|
-
- versions
|
|
97
|
-
([b8b306c](https://github.com/ho-nl/m2-pwa/commit/b8b306c8f3a13415e441d0593c638ae2a3731cd6))
|
|
94
|
+
- versions ([b8b306c](https://github.com/ho-nl/m2-pwa/commit/b8b306c8f3a13415e441d0593c638ae2a3731cd6))
|
|
98
95
|
|
|
99
96
|
## [2.104.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.104.0...@graphcommerce/image@2.104.1) (2021-09-27)
|
|
100
97
|
|
|
@@ -104,96 +101,69 @@ All notable changes to this project will be documented in this file. See
|
|
|
104
101
|
|
|
105
102
|
### Bug Fixes
|
|
106
103
|
|
|
107
|
-
- cart item image sizes
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
- **image:**
|
|
112
|
-
|
|
113
|
-
- **image:**
|
|
114
|
-
|
|
115
|
-
- **image:**
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
- **image:** fix build
|
|
120
|
-
([b730cb6](https://github.com/ho-nl/m2-pwa/commit/b730cb6ae4e50dcf2f60e2046d6acf3047caacb3))
|
|
121
|
-
- **image:** image decoding async added
|
|
122
|
-
([8c5f59f](https://github.com/ho-nl/m2-pwa/commit/8c5f59f54b9e28b60e197b7ddefdd78b71f6665e))
|
|
123
|
-
- **image:** image src is visible while loading the image
|
|
124
|
-
([735d79e](https://github.com/ho-nl/m2-pwa/commit/735d79e8ccab296dcc5750458fc1760f17fe47c7))
|
|
125
|
-
- **image:** make sure unoptimized images are preloaded correctly and remove preloads from lots of
|
|
126
|
-
images
|
|
127
|
-
([fb2b4fc](https://github.com/ho-nl/m2-pwa/commit/fb2b4fcb5336ff880a9b32775847d7b6738ba1ea))
|
|
128
|
-
- introduced SvgImageSimple and solve issue with review chips
|
|
129
|
-
([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
130
|
-
- make packages private so they dont get published accidently
|
|
131
|
-
([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
|
|
104
|
+
- cart item image sizes ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
|
|
105
|
+
- ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
|
106
|
+
- **image:** add loading attribute to unoptimized image ([13f7709](https://github.com/ho-nl/m2-pwa/commit/13f77096a5b1ed3f60cfa7b61ac7373d1a2b44d4))
|
|
107
|
+
- **image:** change sizing of images on grid/productpage ([0e573b6](https://github.com/ho-nl/m2-pwa/commit/0e573b69a2d405126433e7c4747c01b533858b78))
|
|
108
|
+
- **image:** component would rerender unnessarily ([bfc041d](https://github.com/ho-nl/m2-pwa/commit/bfc041d39e34faf60581dbdba7a15a32928368b3))
|
|
109
|
+
- **image:** do not report when image isn't rendered yet ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
|
|
110
|
+
- **image:** fix build ([b730cb6](https://github.com/ho-nl/m2-pwa/commit/b730cb6ae4e50dcf2f60e2046d6acf3047caacb3))
|
|
111
|
+
- **image:** image decoding async added ([8c5f59f](https://github.com/ho-nl/m2-pwa/commit/8c5f59f54b9e28b60e197b7ddefdd78b71f6665e))
|
|
112
|
+
- **image:** image src is visible while loading the image ([735d79e](https://github.com/ho-nl/m2-pwa/commit/735d79e8ccab296dcc5750458fc1760f17fe47c7))
|
|
113
|
+
- **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))
|
|
114
|
+
- introduced SvgImageSimple and solve issue with review chips ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
115
|
+
- make packages private so they dont get published accidently ([f7b693f](https://github.com/ho-nl/m2-pwa/commit/f7b693ff6a4d232d0871f6a68922d14678853a96))
|
|
132
116
|
|
|
133
117
|
### Features
|
|
134
118
|
|
|
135
|
-
- **image:** allow passing props to the picture component
|
|
136
|
-
|
|
137
|
-
- **
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
141
|
-
- renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
|
|
142
|
-
[@reachdigital](https://github.com/reachdigital)
|
|
143
|
-
([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
|
|
144
|
-
- upgraded to nextjs 11
|
|
145
|
-
([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
119
|
+
- **image:** allow passing props to the picture component ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
|
|
120
|
+
- **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
|
|
121
|
+
- **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
122
|
+
- 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))
|
|
123
|
+
- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
146
124
|
|
|
147
125
|
# Change Log
|
|
148
126
|
|
|
149
|
-
All notable changes to this project will be documented in this file. See
|
|
150
|
-
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
127
|
+
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
151
128
|
|
|
152
129
|
# [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.102.1...@graphcommerce/image@2.103.0) (2021-09-01)
|
|
153
130
|
|
|
154
131
|
### Features
|
|
155
132
|
|
|
156
|
-
- **image:** allow passing props to the picture component
|
|
157
|
-
([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
|
|
133
|
+
- **image:** allow passing props to the picture component ([3425664](https://github.com/ho-nl/m2-pwa/commit/3425664f197974d2e9db048fc94d447b2d34c280))
|
|
158
134
|
|
|
159
135
|
# [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.5...@graphcommerce/image@2.102.0) (2021-08-12)
|
|
160
136
|
|
|
161
137
|
### Features
|
|
162
138
|
|
|
163
|
-
- upgraded to nextjs 11
|
|
164
|
-
([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
139
|
+
- upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
165
140
|
|
|
166
141
|
## [2.101.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.3...@graphcommerce/image@2.101.4) (2021-08-09)
|
|
167
142
|
|
|
168
143
|
### Bug Fixes
|
|
169
144
|
|
|
170
|
-
- **image:** do not report when image isn't rendered yet
|
|
171
|
-
([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
|
|
145
|
+
- **image:** do not report when image isn't rendered yet ([5aa08ef](https://github.com/ho-nl/m2-pwa/commit/5aa08efc1eade69f53e1645c37fcb0632d83bc5e))
|
|
172
146
|
|
|
173
147
|
## [2.101.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.2...@graphcommerce/image@2.101.3) (2021-08-06)
|
|
174
148
|
|
|
175
149
|
### Bug Fixes
|
|
176
150
|
|
|
177
|
-
- introduced SvgImageSimple and solve issue with review chips
|
|
178
|
-
([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
151
|
+
- introduced SvgImageSimple and solve issue with review chips ([931d7fd](https://github.com/ho-nl/m2-pwa/commit/931d7fdcf0faa9d2264899b72e564138215b6bd8))
|
|
179
152
|
|
|
180
153
|
## [2.101.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.101.1...@graphcommerce/image@2.101.2) (2021-08-04)
|
|
181
154
|
|
|
182
155
|
### Bug Fixes
|
|
183
156
|
|
|
184
|
-
- cart item image sizes
|
|
185
|
-
([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
|
|
157
|
+
- cart item image sizes ([e7c860c](https://github.com/ho-nl/m2-pwa/commit/e7c860c785e172b9275e1a00c8b51509d6b297a8))
|
|
186
158
|
|
|
187
159
|
# [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.12...@graphcommerce/image@2.101.0) (2021-07-26)
|
|
188
160
|
|
|
189
161
|
### Features
|
|
190
162
|
|
|
191
|
-
- **playwright:** added new playwright package to enable browser testing
|
|
192
|
-
([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
163
|
+
- **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
193
164
|
|
|
194
165
|
## [2.100.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/image@2.100.10...@graphcommerce/image@2.100.11) (2021-07-20)
|
|
195
166
|
|
|
196
167
|
### Bug Fixes
|
|
197
168
|
|
|
198
|
-
- ignore md files from triggering version updates
|
|
199
|
-
([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
|
169
|
+
- ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
package/components/Image.tsx
CHANGED
|
@@ -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/
|
|
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
|
-
|
|
30
|
+
global.__NEXT_IMAGE_IMPORTED = true
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export type { ImageLoaderProps, ImageLoader }
|
|
@@ -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
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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/
|
|
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.1.
|
|
5
|
+
"version": "3.1.3",
|
|
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": "
|
|
18
|
+
"@graphcommerce/framer-utils": "3.1.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@graphcommerce/eslint-config-pwa": "^4.
|
|
22
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
21
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.4",
|
|
22
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.5",
|
|
23
23
|
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
24
|
-
"@playwright/test": "^1.
|
|
24
|
+
"@playwright/test": "^1.20.1",
|
|
25
|
+
"type-fest": "2.12.1"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
|
-
"
|
|
28
|
+
"@mui/material": "5.5.3",
|
|
29
|
+
"next": "12.1.2",
|
|
28
30
|
"react": "^17.0.2",
|
|
29
|
-
"react-dom": "^17.0.2"
|
|
30
|
-
"type-fest": "^2.12.0"
|
|
31
|
+
"react-dom": "^17.0.2"
|
|
31
32
|
}
|
|
32
33
|
}
|