@graphcommerce/framer-next-pages 2.109.0 → 3.0.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/CHANGELOG.md +69 -93
- package/components/Page.tsx +12 -17
- package/components/Pages.tsx +2 -3
- package/hooks/useGo.ts +2 -2
- package/package.json +9 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,138 +1,124 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
3
|
+
## 3.0.0
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
5
|
+
### Major Changes
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
- [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
|
|
8
|
+
[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
|
|
9
|
+
Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
|
|
12
10
|
|
|
11
|
+
### Patch Changes
|
|
13
12
|
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
[[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
|
|
15
|
+
- @graphcommerce/framer-utils@3.0.0
|
|
14
16
|
|
|
17
|
+
All notable changes to this project will be documented in this file. See
|
|
18
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
## [2.108.10](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.9...@graphcommerce/framer-next-pages@2.108.10) (2021-12-23)
|
|
18
|
-
|
|
20
|
+
## [2.109.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.109.1...@graphcommerce/framer-next-pages@2.109.2) (2022-01-04)
|
|
19
21
|
|
|
20
22
|
### Bug Fixes
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
- regression where close button didn't work
|
|
25
|
+
([5bf57b4](https://github.com/ho-nl/m2-pwa/commit/5bf57b470ab7c013fbe0a896792fcb316a454aa4))
|
|
25
26
|
|
|
27
|
+
# [2.109.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.11...@graphcommerce/framer-next-pages@2.109.0) (2022-01-03)
|
|
26
28
|
|
|
29
|
+
### Features
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
- **framer-next-pages:** reduce rerenders when navigating to a new page
|
|
32
|
+
([5cf3301](https://github.com/ho-nl/m2-pwa/commit/5cf330130bb3527057da015e3c4a6fa295d7262e))
|
|
29
33
|
|
|
34
|
+
## [2.108.10](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.9...@graphcommerce/framer-next-pages@2.108.10) (2021-12-23)
|
|
30
35
|
|
|
31
36
|
### Bug Fixes
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
- **framer-next-pages:** closing is janky, caused by setting pointer-events to none, trying without
|
|
39
|
+
resetting the pointerevents
|
|
40
|
+
([9247fa3](https://github.com/ho-nl/m2-pwa/commit/9247fa312926416802abd68ea04b1e6b52531f2c))
|
|
36
41
|
|
|
42
|
+
## [2.108.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.7...@graphcommerce/framer-next-pages@2.108.8) (2021-12-21)
|
|
37
43
|
|
|
44
|
+
### Bug Fixes
|
|
38
45
|
|
|
46
|
+
- **graphql:** make sure we're passing the correct store code to the schema endpoint
|
|
47
|
+
([39753f2](https://github.com/ho-nl/m2-pwa/commit/39753f2117ce7ba79dab035c4134e642829e7f18))
|
|
48
|
+
- make sure we're remounting when the store changes
|
|
49
|
+
([10756e3](https://github.com/ho-nl/m2-pwa/commit/10756e3eb252f8a91d84534ae024edb382a4ea0d))
|
|
39
50
|
|
|
40
51
|
## [2.108.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.6...@graphcommerce/framer-next-pages@2.108.7) (2021-12-20)
|
|
41
52
|
|
|
42
|
-
|
|
43
53
|
### Bug Fixes
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
- animations would run on background page, make sure animations are not running when page is not
|
|
56
|
+
active
|
|
57
|
+
([2fcf4b8](https://github.com/ho-nl/m2-pwa/commit/2fcf4b8a853108147477e3a67c7ea202abb2842f))
|
|
50
58
|
|
|
51
59
|
## [2.108.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.2...@graphcommerce/framer-next-pages@2.108.3) (2021-12-15)
|
|
52
60
|
|
|
53
|
-
|
|
54
61
|
### Bug Fixes
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
- **framer-next-pages:** make sure the cancellation of loading the fallback doesn't show an error
|
|
64
|
+
([3470461](https://github.com/ho-nl/m2-pwa/commit/34704612c7b19a61a8309967b982e5f04c0fe8b2))
|
|
61
65
|
|
|
62
66
|
## [2.108.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.108.1...@graphcommerce/framer-next-pages@2.108.2) (2021-12-13)
|
|
63
67
|
|
|
64
|
-
|
|
65
68
|
### Bug Fixes
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
- make sure we're using the correct variant
|
|
71
|
+
([7fff606](https://github.com/ho-nl/m2-pwa/commit/7fff606390bc63c14cd8c033fbe5138226517869))
|
|
72
72
|
|
|
73
73
|
# [2.108.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.107.5...@graphcommerce/framer-next-pages@2.108.0) (2021-12-03)
|
|
74
74
|
|
|
75
|
-
|
|
76
75
|
### Bug Fixes
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
- **framer-next-pages:** do no throw error when framer next pages is recreated
|
|
78
|
+
([6c4665b](https://github.com/ho-nl/m2-pwa/commit/6c4665b4a00adb1c1d770c458a590f4360be83d8))
|
|
79
|
+
- make sure the fallback loads during idle timing to prevent jank
|
|
80
|
+
([dd888e2](https://github.com/ho-nl/m2-pwa/commit/dd888e27b94091233d74ddba1023310b09910f0f))
|
|
81
|
+
- make sure the overlay becomes visible, even if the overlay is scrolled
|
|
82
|
+
([1738c98](https://github.com/ho-nl/m2-pwa/commit/1738c982ea84ec2b93daa824c4b8c86ab2a3f5ed))
|
|
83
|
+
- make sure the overlays are rendered correctly on mobile
|
|
84
|
+
([48f7050](https://github.com/ho-nl/m2-pwa/commit/48f705060e99b997f5b1db03ccc49f1051a1ed8f))
|
|
85
|
+
- minHeight of page on iOS is sometimes less high than expected
|
|
86
|
+
([8a0bc23](https://github.com/ho-nl/m2-pwa/commit/8a0bc234d153d974ac415369483ddabfb5e7fb0c))
|
|
87
|
+
- spacing of LayoutTItle
|
|
88
|
+
([7afcd31](https://github.com/ho-nl/m2-pwa/commit/7afcd3163d16e902cf2ff7917f56ee6a8798f55b))
|
|
85
89
|
|
|
86
90
|
### Features
|
|
87
91
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
- **framer-next-pages:** automatically create a fallback page when there is no page to render.
|
|
93
|
+
([f18a804](https://github.com/ho-nl/m2-pwa/commit/f18a804a228901431f848927844dd9cd324170c1))
|
|
93
94
|
|
|
94
95
|
## [2.107.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.107.2...@graphcommerce/framer-next-pages@2.107.3) (2021-11-02)
|
|
95
96
|
|
|
96
|
-
|
|
97
97
|
### Bug Fixes
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
- **framer-next-pages:** prevent back button loop when previous page is the up page of the previous
|
|
100
|
+
page ([cbdde83](https://github.com/ho-nl/m2-pwa/commit/cbdde83790337bdf4c5f03c907ca6e6e02792e70))
|
|
104
101
|
|
|
105
102
|
# [2.107.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.106.12...@graphcommerce/framer-next-pages@2.107.0) (2021-10-27)
|
|
106
103
|
|
|
107
|
-
|
|
108
104
|
### Features
|
|
109
105
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
- **nextjs:** upgraded to nextjs 12
|
|
107
|
+
([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
|
|
115
108
|
|
|
116
109
|
## [2.106.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.106.0...@graphcommerce/framer-next-pages@2.106.2) (2021-09-27)
|
|
117
110
|
|
|
118
|
-
|
|
119
111
|
### Bug Fixes
|
|
120
112
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
113
|
+
- ignore example directories when publishing
|
|
114
|
+
([620cbb2](https://github.com/ho-nl/m2-pwa/commit/620cbb2d8e68b727b8593e2e45702c4d12276d92))
|
|
115
|
+
- versions
|
|
116
|
+
([b8b306c](https://github.com/ho-nl/m2-pwa/commit/b8b306c8f3a13415e441d0593c638ae2a3731cd6))
|
|
127
117
|
|
|
128
118
|
## [2.106.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-next-pages@2.106.0...@graphcommerce/framer-next-pages@2.106.1) (2021-09-27)
|
|
129
119
|
|
|
130
120
|
**Note:** Version bump only for package @graphcommerce/framer-next-pages
|
|
131
121
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
122
|
# Change Log
|
|
137
123
|
|
|
138
124
|
All notable changes to this project will be documented in this file. See
|
|
@@ -148,8 +134,7 @@ All notable changes to this project will be documented in this file. See
|
|
|
148
134
|
([59f7b20](https://github.com/ho-nl/m2-pwa/commit/59f7b2047194c3506037fc88d791302c7c4a1a69))
|
|
149
135
|
- edit billing address updating state
|
|
150
136
|
([ecd9f48](https://github.com/ho-nl/m2-pwa/commit/ecd9f48ce313d8e7a698c06ff29b88231dc50168))
|
|
151
|
-
- **framer-next-pages:** back navigation renders the wrong page, items were
|
|
152
|
-
reversed
|
|
137
|
+
- **framer-next-pages:** back navigation renders the wrong page, items were reversed
|
|
153
138
|
([7168fc1](https://github.com/ho-nl/m2-pwa/commit/7168fc1d1daa3920ae401dda0029e35a253068ec))
|
|
154
139
|
- **framer-next-pages:** backSteps returns NaN
|
|
155
140
|
([31ac95a](https://github.com/ho-nl/m2-pwa/commit/31ac95a75fb166efdc2d52d0aa0e40e45290e6bb))
|
|
@@ -163,8 +148,7 @@ All notable changes to this project will be documented in this file. See
|
|
|
163
148
|
([4870925](https://github.com/ho-nl/m2-pwa/commit/4870925554cfee3ac94209719d9464b82fce9cc5))
|
|
164
149
|
- **framer-next-pages:** overlay offset fixes
|
|
165
150
|
([1b45cc8](https://github.com/ho-nl/m2-pwa/commit/1b45cc85412c17a4a02ae6a3bad23808def6cbfc))
|
|
166
|
-
- **framer-next-pages:** prevent unessary rerender when navigating back to a
|
|
167
|
-
previous page
|
|
151
|
+
- **framer-next-pages:** prevent unessary rerender when navigating back to a previous page
|
|
168
152
|
([a5568d0](https://github.com/ho-nl/m2-pwa/commit/a5568d00a034ef0686bd36b548af1def93ad1522))
|
|
169
153
|
- **framer-next-pages:** router proxy couldn’t fall back to home
|
|
170
154
|
([7644698](https://github.com/ho-nl/m2-pwa/commit/76446981898e7573148ad71d496ef5bafc1232b8))
|
|
@@ -176,11 +160,9 @@ All notable changes to this project will be documented in this file. See
|
|
|
176
160
|
([c2fb164](https://github.com/ho-nl/m2-pwa/commit/c2fb164b342770089b787378a3f79529c36d2152))
|
|
177
161
|
- **framer-sheet:** left/rigth sheet is a little higher than the page
|
|
178
162
|
([4c4679d](https://github.com/ho-nl/m2-pwa/commit/4c4679d00de1e3306aa0587ad9f9f10df8e2324a))
|
|
179
|
-
- **framer-sheet:** make opacity animation of SheetBackdrop less jarring when
|
|
180
|
-
dragging fast
|
|
163
|
+
- **framer-sheet:** make opacity animation of SheetBackdrop less jarring when dragging fast
|
|
181
164
|
([f25b7ce](https://github.com/ho-nl/m2-pwa/commit/f25b7ce2a16a621799a434704ed77b59089808cb))
|
|
182
|
-
- **framer-sheet:** make sure the left/right drawer have more space / better
|
|
183
|
-
scrollbar
|
|
165
|
+
- **framer-sheet:** make sure the left/right drawer have more space / better scrollbar
|
|
184
166
|
([226387a](https://github.com/ho-nl/m2-pwa/commit/226387a5e7b9b8a93f9516c97879be959b8072dc))
|
|
185
167
|
- ignore md files from triggering version updates
|
|
186
168
|
([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
|
|
@@ -205,16 +187,13 @@ All notable changes to this project will be documented in this file. See
|
|
|
205
187
|
([f0b44b4](https://github.com/ho-nl/m2-pwa/commit/f0b44b44a3c4976a35ca3235e305bd5f281f78d7))
|
|
206
188
|
- **framer-next-pages:** added SheetBackdrop component
|
|
207
189
|
([4981744](https://github.com/ho-nl/m2-pwa/commit/4981744a8bc5f74a0b7d510e0000d3070b388c79))
|
|
208
|
-
- **framer-next-pages:** added useCloseOverlay hook to close multiple steps at
|
|
209
|
-
once
|
|
190
|
+
- **framer-next-pages:** added useCloseOverlay hook to close multiple steps at once
|
|
210
191
|
([55b7473](https://github.com/ho-nl/m2-pwa/commit/55b74730e64060c20072bf10f34d346964edc51f))
|
|
211
|
-
- **framer-next-pages:** added usePageRouter().go(-2) functionality to close
|
|
212
|
-
overlays
|
|
192
|
+
- **framer-next-pages:** added usePageRouter().go(-2) functionality to close overlays
|
|
213
193
|
([cb177e7](https://github.com/ho-nl/m2-pwa/commit/cb177e7266939b3a6a4f04c03852f024fd2dca3e))
|
|
214
194
|
- **framer-next-pages:** animate drag indicator when resizing height
|
|
215
195
|
([5b687d1](https://github.com/ho-nl/m2-pwa/commit/5b687d1cf5a04dfa2f499d1335404cd41992a7aa))
|
|
216
|
-
- **framer-next-pages:** animate the SheetBackdrop based on the y-value of the
|
|
217
|
-
sheet
|
|
196
|
+
- **framer-next-pages:** animate the SheetBackdrop based on the y-value of the sheet
|
|
218
197
|
([96af2d4](https://github.com/ho-nl/m2-pwa/commit/96af2d4dcab87f952f9d3621a7cce9099f9310f6))
|
|
219
198
|
- **framer-next-pages:** base sheet on container height
|
|
220
199
|
([b8293e3](https://github.com/ho-nl/m2-pwa/commit/b8293e3762892529d39d3e12032d0450166ae79e))
|
|
@@ -226,8 +205,7 @@ All notable changes to this project will be documented in this file. See
|
|
|
226
205
|
([7604fc0](https://github.com/ho-nl/m2-pwa/commit/7604fc037d76cefda711b7b6ccb40f14c1ef4c8e))
|
|
227
206
|
- **framer-next-pages:** move example to @graphcommerce/next-config
|
|
228
207
|
([b801856](https://github.com/ho-nl/m2-pwa/commit/b801856d370804616a986a6a66ba88ae4f193b4b))
|
|
229
|
-
- **framer-next-pages:** usePageDirection to determine which direction the user
|
|
230
|
-
is navigating
|
|
208
|
+
- **framer-next-pages:** usePageDirection to determine which direction the user is navigating
|
|
231
209
|
([6769b90](https://github.com/ho-nl/m2-pwa/commit/6769b909486cbcc8bf58d83d13e0ef1b84a7389d))
|
|
232
210
|
- **framer-next-pages:** working on new sheet component
|
|
233
211
|
([cc6fb11](https://github.com/ho-nl/m2-pwa/commit/cc6fb11b22db59276a3ea32493bf340c02850a2c))
|
|
@@ -235,8 +213,7 @@ All notable changes to this project will be documented in this file. See
|
|
|
235
213
|
([2cc164e](https://github.com/ho-nl/m2-pwa/commit/2cc164eac4b5022cfdf347a83ea559e26103063f))
|
|
236
214
|
- **framer-sheet:** created separate package that can be implemented
|
|
237
215
|
([69cc8ce](https://github.com/ho-nl/m2-pwa/commit/69cc8ce3237125335524728a70f4dae050032108))
|
|
238
|
-
- **framer-utils:** created framer-utils and implemented for framer-sheet and
|
|
239
|
-
framer-next-pages
|
|
216
|
+
- **framer-utils:** created framer-utils and implemented for framer-sheet and framer-next-pages
|
|
240
217
|
([788bf28](https://github.com/ho-nl/m2-pwa/commit/788bf282d4a38ec5e78ab7244065c540dfc132a1))
|
|
241
218
|
- **image:** introduced completely rewritten Image component
|
|
242
219
|
([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
|
|
@@ -254,8 +231,8 @@ All notable changes to this project will be documented in this file. See
|
|
|
254
231
|
([9094551](https://github.com/ho-nl/m2-pwa/commit/909455146d159a839fa72046c15332fc763f315f))
|
|
255
232
|
- **playwright:** added new playwright package to enable browser testing
|
|
256
233
|
([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
|
|
257
|
-
- renamed all packages to use [@graphcommerce](https://github.com/graphcommerce)
|
|
258
|
-
|
|
234
|
+
- renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
|
|
235
|
+
[@reachdigital](https://github.com/reachdigital)
|
|
259
236
|
([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
|
|
260
237
|
- upgraded to nextjs 11
|
|
261
238
|
([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
|
|
@@ -324,8 +301,7 @@ All notable changes to this project will be documented in this file. See
|
|
|
324
301
|
|
|
325
302
|
- back button behavior
|
|
326
303
|
([59f7b20](https://github.com/ho-nl/m2-pwa/commit/59f7b2047194c3506037fc88d791302c7c4a1a69))
|
|
327
|
-
- **framer-next-pages:** back navigation renders the wrong page, items were
|
|
328
|
-
reversed
|
|
304
|
+
- **framer-next-pages:** back navigation renders the wrong page, items were reversed
|
|
329
305
|
([7168fc1](https://github.com/ho-nl/m2-pwa/commit/7168fc1d1daa3920ae401dda0029e35a253068ec))
|
|
330
306
|
- **framer-next-pages:** backSteps returns NaN
|
|
331
307
|
([31ac95a](https://github.com/ho-nl/m2-pwa/commit/31ac95a75fb166efdc2d52d0aa0e40e45290e6bb))
|
package/components/Page.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { css } from '@emotion/react'
|
|
2
2
|
import { m, useIsPresent } from 'framer-motion'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import type { PageItem } from '../types'
|
|
@@ -14,24 +14,9 @@ export function scrollPos(idx: number): { x: number; y: number } {
|
|
|
14
14
|
return scroll ? JSON.parse(scroll) : { x: 0, y: 0 }
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const useStyles = makeStyles(
|
|
18
|
-
{
|
|
19
|
-
page: {
|
|
20
|
-
left: 0,
|
|
21
|
-
right: 0,
|
|
22
|
-
minHeight: '100vh',
|
|
23
|
-
'@supports (-webkit-touch-callout: none)': {
|
|
24
|
-
height: '-webkit-fill-available',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{ name: 'FramerNextPage' },
|
|
29
|
-
)
|
|
30
|
-
|
|
31
17
|
export default function Page(props: PageProps) {
|
|
32
18
|
const { active, historyIdx, children } = props
|
|
33
19
|
const isPresent = useIsPresent()
|
|
34
|
-
const classes = useStyles()
|
|
35
20
|
|
|
36
21
|
/** The active Page doesn't get any special treatment */
|
|
37
22
|
let top: number | undefined
|
|
@@ -49,7 +34,17 @@ export default function Page(props: PageProps) {
|
|
|
49
34
|
const zIndex = active ? 1 : undefined
|
|
50
35
|
|
|
51
36
|
return (
|
|
52
|
-
<m.div
|
|
37
|
+
<m.div
|
|
38
|
+
style={{ position, top, zIndex }}
|
|
39
|
+
css={css({
|
|
40
|
+
left: 0,
|
|
41
|
+
right: 0,
|
|
42
|
+
minHeight: '100vh',
|
|
43
|
+
'@supports (-webkit-touch-callout: none)': {
|
|
44
|
+
height: '-webkit-fill-available',
|
|
45
|
+
},
|
|
46
|
+
})}
|
|
47
|
+
>
|
|
53
48
|
{children}
|
|
54
49
|
</m.div>
|
|
55
50
|
)
|
package/components/Pages.tsx
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AnimatePresence } from 'framer-motion'
|
|
2
2
|
import { requestIdleCallback, cancelIdleCallback } from 'next/dist/client/request-idle-callback'
|
|
3
3
|
import { AppPropsType } from 'next/dist/shared/lib/utils'
|
|
4
|
-
import { NextRouter, Router
|
|
5
|
-
import
|
|
6
|
-
import {} from 'react-dom'
|
|
4
|
+
import { NextRouter, Router } from 'next/router'
|
|
5
|
+
import { useEffect, useRef, useState } from 'react'
|
|
7
6
|
import { pageContext } from '../context/pageContext'
|
|
8
7
|
import type { PageComponent, PageItem, UpPage } from '../types'
|
|
9
8
|
import Page from './Page'
|
package/hooks/useGo.ts
CHANGED
|
@@ -4,9 +4,9 @@ export function useGo(delta: number) {
|
|
|
4
4
|
const { push, back } = useRouter()
|
|
5
5
|
return () => {
|
|
6
6
|
if (delta >= 0) {
|
|
7
|
-
|
|
7
|
+
console.error(`Called .go(${delta}), only negative numbers are allowed. Redirecting to home`)
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
9
|
-
|
|
9
|
+
push('/', '/')
|
|
10
10
|
return
|
|
11
11
|
}
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/framer-next-pages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "tsc -W"
|
|
7
7
|
},
|
|
8
8
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
9
|
-
"browserslist": [
|
|
10
|
-
"extends @graphcommerce/browserslist-config-pwa"
|
|
11
|
-
],
|
|
12
9
|
"eslintConfig": {
|
|
13
10
|
"extends": "@graphcommerce/eslint-config-pwa",
|
|
14
11
|
"parserOptions": {
|
|
@@ -16,20 +13,18 @@
|
|
|
16
13
|
}
|
|
17
14
|
},
|
|
18
15
|
"dependencies": {
|
|
19
|
-
"@graphcommerce/framer-utils": "^
|
|
16
|
+
"@graphcommerce/framer-utils": "^3.0.0"
|
|
20
17
|
},
|
|
21
18
|
"devDependencies": {
|
|
22
|
-
"@graphcommerce/
|
|
23
|
-
"@graphcommerce/
|
|
24
|
-
"@graphcommerce/
|
|
25
|
-
"@
|
|
26
|
-
"@playwright/test": "^1.17.1"
|
|
19
|
+
"@graphcommerce/eslint-config-pwa": "^4.0.0",
|
|
20
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.0",
|
|
21
|
+
"@graphcommerce/typescript-config-pwa": "^4.0.0",
|
|
22
|
+
"@playwright/test": "^1.18.1"
|
|
27
23
|
},
|
|
28
24
|
"peerDependencies": {
|
|
29
|
-
"framer-motion": "^
|
|
30
|
-
"next": "^12.0.
|
|
25
|
+
"framer-motion": "^6.2.4",
|
|
26
|
+
"next": "^12.0.10",
|
|
31
27
|
"react": "^17.0.2",
|
|
32
28
|
"react-dom": "^17.0.2"
|
|
33
|
-
}
|
|
34
|
-
"gitHead": "bc5423d7547f8685db4cd8fc6d8f7a2a51ebed05"
|
|
29
|
+
}
|
|
35
30
|
}
|