@graphcommerce/next-ui 9.1.0-canary.45 → 9.1.0-canary.47
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 +16 -0
- package/index.ts +3 -2
- package/package.json +8 -8
- package/server.ts +4 -3
- package/utils/revalidate.ts +13 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 9.1.0-canary.47
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [`4564271`](https://github.com/graphcommerce-org/graphcommerce/commit/4564271e702aab11c28e425029f4a7c09a4d5d61) - Created a revalidate method that returns a single value so that it can be overwritten centrally ([@paales](https://github.com/paales))
|
8
|
+
|
9
|
+
## 9.1.0-canary.46
|
10
|
+
|
3
11
|
## 9.1.0-canary.45
|
4
12
|
|
5
13
|
## 9.1.0-canary.44
|
@@ -177,6 +185,7 @@
|
|
177
185
|
```
|
178
186
|
|
179
187
|
When to use, replacement for:
|
188
|
+
|
180
189
|
1. useMediaQuery: When you are now using useMediaQuery to conditionally render content for mobile or desktop. a. Is very slow as it has to wait for the JS to initialize on pageload. b. Can cause CLS problems if the useMediaQuery is used to render elements in the viewport. c. Can cause LCP issues if useMediaQuery is used to render the LCP element. d. Causes TBT problems as a component always needs to be rerendered. (And bad TBT can cause INP problems) e. HTML isn't present in the DOM, which can cause SEO issues.
|
181
190
|
2. CSS Media query: When you are using CSS to show or hide content based on media queries. a. Causes TBT problems as both code paths need to be rendered. (And bad TBT can cause INP problems)
|
182
191
|
|
@@ -195,6 +204,7 @@
|
|
195
204
|
### Minor Changes
|
196
205
|
|
197
206
|
- [#2216](https://github.com/graphcommerce-org/graphcommerce/pull/2216) [`74eb239`](https://github.com/graphcommerce-org/graphcommerce/commit/74eb2393a64988649178d59f53b33d41fecdd769) - Added Intl components, deprecated `useNumberFormat` and `useDateTimeFormatter`, and replaced usage sites. New components and hooks:
|
207
|
+
|
198
208
|
- `<DisplayNames />` and `useIntlDisplayNames`
|
199
209
|
- `<DateTimeFormat />`, `<DateFormat/>`, `<TimeFormat />` and `useIntlDateTimeFormat`
|
200
210
|
- `<ListFormat />` and `useIntlListFormat`
|
@@ -435,6 +445,7 @@
|
|
435
445
|
### Minor Changes
|
436
446
|
|
437
447
|
- [#1822](https://github.com/graphcommerce-org/graphcommerce/pull/1822) [`cc02c46e3`](https://github.com/graphcommerce-org/graphcommerce/commit/cc02c46e32c9a44a90789591f43d91ae234dac84) - Added Facebook Open Graph tags to product pages:
|
448
|
+
|
438
449
|
- og:title
|
439
450
|
- og:image
|
440
451
|
- og:url
|
@@ -446,6 +457,7 @@
|
|
446
457
|
- product:category ([@KMalkowski](https://github.com/KMalkowski))
|
447
458
|
|
448
459
|
- [#1830](https://github.com/graphcommerce-org/graphcommerce/pull/1830) [`fafa76ba9`](https://github.com/graphcommerce-org/graphcommerce/commit/fafa76ba9e655739171abc553d309795c9d8e5c2) - Overlays now use an additional scroll container to handle vertical scroll, fixing:
|
460
|
+
|
449
461
|
- Scrolling on desktop will not close the overlay when there is content to be scrolled
|
450
462
|
- Scrolling will not snap to bottom / top when the content is barely scrollable
|
451
463
|
- Dragging will only open or close the drawer, not something inbetween
|
@@ -513,6 +525,7 @@
|
|
513
525
|
- [#1745](https://github.com/graphcommerce-org/graphcommerce/pull/1745) [`b1444b933`](https://github.com/graphcommerce-org/graphcommerce/commit/b1444b9336107d3ac111563f9b62a884f1b26a8d) - Bring password reset page more in line with standard forms, add missing translations. ([@github-actions](https://github.com/apps/github-actions))
|
514
526
|
|
515
527
|
- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues.
|
528
|
+
|
516
529
|
- Updated the @mui/material package
|
517
530
|
- Removed dependencies on react-hook-form-mui and @playwright/test
|
518
531
|
- Upgraded dependencies including type-fest and graphql-mesh
|
@@ -949,6 +962,7 @@
|
|
949
962
|
### Patch Changes
|
950
963
|
|
951
964
|
- [#1509](https://github.com/graphcommerce-org/graphcommerce/pull/1509) [`0ab7c5465`](https://github.com/graphcommerce-org/graphcommerce/commit/0ab7c5465441cba9bf8cd185a6790ce2f443f4ed) Thanks [@paales](https://github.com/paales)! - SidebarGallery improvements (product page):
|
965
|
+
|
952
966
|
- Prevent vertical scrolling
|
953
967
|
- Disable zoom fab when there are no images
|
954
968
|
- Hide scroller dots when there in only one image
|
@@ -1151,6 +1165,7 @@
|
|
1151
1165
|
- [#1353](https://github.com/graphcommerce-org/graphcommerce/pull/1353) [`0e5ee7ba8`](https://github.com/graphcommerce-org/graphcommerce/commit/0e5ee7ba89698e5e711001e846ed182528060cba) Thanks [@paales](https://github.com/paales)! - Eslint: enable rules that were previously disabled and make fixes
|
1152
1166
|
|
1153
1167
|
* [#1360](https://github.com/graphcommerce-org/graphcommerce/pull/1360) [`829b8690b`](https://github.com/graphcommerce-org/graphcommerce/commit/829b8690bc5d0a46e596299e4120e9837a9f179c) Thanks [@paales](https://github.com/paales)! - Lots of fixes for LayoutOverlay:
|
1168
|
+
|
1154
1169
|
- When interacting with an overlay it causes browser resizes on mobile and causing a janky experience.
|
1155
1170
|
- Allow interaction with the previous layer after it has been closed, instead of waiting for the actual route to complete.
|
1156
1171
|
- Allow scrolling to the the bottom in the overlay when the height is just a bit higher than the window.
|
@@ -1307,6 +1322,7 @@
|
|
1307
1322
|
- [#1281](https://github.com/ho-nl/m2-pwa/pull/1281) [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d) Thanks [@paales](https://github.com/paales)! - Make sure we're able to style the backdrop and the regular overlay for LayoutOverlay
|
1308
1323
|
|
1309
1324
|
* [#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:
|
1325
|
+
|
1310
1326
|
- It will automatically calculate the stroke-width of the SVG based on the rendered size, allowing for a more flexible use for icons.
|
1311
1327
|
|
1312
1328
|
- Make SvgIcon themable in your own Theme.
|
package/index.ts
CHANGED
@@ -9,9 +9,10 @@ export * from './Blog/BlogTitle/BlogTitle'
|
|
9
9
|
export * from './Breadcrumbs'
|
10
10
|
export * from './Button'
|
11
11
|
export * from './ChipMenu/ChipMenu'
|
12
|
-
export * from './
|
12
|
+
export * from './Container/Container'
|
13
13
|
export * from './ContainerWithHeader/ContainerWithHeader'
|
14
14
|
export * from './Fab'
|
15
|
+
export * from './FindAndReplace/FindAndReplace'
|
15
16
|
export * from './FlagAvatar/FlagAvatar'
|
16
17
|
export * from './Footer'
|
17
18
|
export * from './Form/Form'
|
@@ -66,8 +67,8 @@ export * from './UspList/UspListItem'
|
|
66
67
|
export * from './utils/cookie'
|
67
68
|
export * from './utils/cssFlags'
|
68
69
|
export * from './utils/normalizeLocale'
|
70
|
+
export * from './utils/revalidate'
|
69
71
|
export * from './utils/robots'
|
70
72
|
export * from './utils/sitemap'
|
71
73
|
export * from './utils/storefrontConfig'
|
72
74
|
export * from './utils/sxx'
|
73
|
-
export * from './Container/Container'
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
5
|
-
"version": "9.1.0-canary.
|
5
|
+
"version": "9.1.0-canary.47",
|
6
6
|
"sideEffects": false,
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
8
8
|
"eslintConfig": {
|
@@ -24,13 +24,13 @@
|
|
24
24
|
"@emotion/react": "^11",
|
25
25
|
"@emotion/server": "^11",
|
26
26
|
"@emotion/styled": "^11",
|
27
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
28
|
-
"@graphcommerce/framer-next-pages": "^9.1.0-canary.
|
29
|
-
"@graphcommerce/framer-scroller": "^9.1.0-canary.
|
30
|
-
"@graphcommerce/framer-utils": "^9.1.0-canary.
|
31
|
-
"@graphcommerce/image": "^9.1.0-canary.
|
32
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
33
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
27
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.47",
|
28
|
+
"@graphcommerce/framer-next-pages": "^9.1.0-canary.47",
|
29
|
+
"@graphcommerce/framer-scroller": "^9.1.0-canary.47",
|
30
|
+
"@graphcommerce/framer-utils": "^9.1.0-canary.47",
|
31
|
+
"@graphcommerce/image": "^9.1.0-canary.47",
|
32
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.47",
|
33
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.47",
|
34
34
|
"@lingui/core": "^4.2.1",
|
35
35
|
"@lingui/macro": "^4.2.1",
|
36
36
|
"@lingui/react": "^4.2.1",
|
package/server.ts
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
export * from './Document'
|
2
|
+
export * from './PageMeta/canonicalize'
|
1
3
|
export * from './Styles/withEmotionCache'
|
4
|
+
export * from './utils/cookie'
|
2
5
|
export * from './utils/getCssFlagInitScript'
|
3
6
|
export * from './utils/normalizeLocale'
|
7
|
+
export * from './utils/revalidate'
|
4
8
|
export * from './utils/robots'
|
5
9
|
export * from './utils/sitemap'
|
6
10
|
export * from './utils/storefrontConfig'
|
7
|
-
export * from './PageMeta/canonicalize'
|
8
|
-
export * from './Document'
|
9
|
-
export * from './utils/cookie'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
type Revalidate = 'minutes' | 'hours' | 'days'
|
2
|
+
|
3
|
+
export function revalidate(frequency: Revalidate = 'minutes') {
|
4
|
+
switch (frequency) {
|
5
|
+
case 'days':
|
6
|
+
return 60 * 60 * 24 * 20
|
7
|
+
case 'hours':
|
8
|
+
return 60 * 60 * 20
|
9
|
+
case 'minutes':
|
10
|
+
default:
|
11
|
+
return 60 * 20
|
12
|
+
}
|
13
|
+
}
|