@graphcommerce/next-ui 6.0.0-canary.39 → 6.0.0-canary.40
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 +2 -0
- package/Overlay/components/OverlayBase.tsx +17 -7
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -190,6 +190,9 @@ export function OverlayBase(incomingProps: LayoutOverlayBaseProps) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
const handleScroll = () => {
|
|
193
|
+
calcPositions()
|
|
194
|
+
|
|
195
|
+
// if (!prevVariant.current) prevVariant.current = variant()
|
|
193
196
|
if (prevVariant.current !== variant()) {
|
|
194
197
|
forceScrollPosition()
|
|
195
198
|
prevVariant.current = variant()
|
|
@@ -199,20 +202,27 @@ export function OverlayBase(incomingProps: LayoutOverlayBaseProps) {
|
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
|
|
202
|
-
|
|
205
|
+
const handleResize = () => {
|
|
206
|
+
calcPositions()
|
|
207
|
+
forceScrollPosition()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const measureScroll = () => framesync.read(handleScroll)
|
|
211
|
+
const measureResize = () => framesync.read(handleResize)
|
|
203
212
|
handleScroll()
|
|
204
213
|
|
|
205
|
-
const cancelX = scroll.x.on('change',
|
|
206
|
-
const cancelY = scroll.y.on('change',
|
|
214
|
+
const cancelX = scroll.x.on('change', measureScroll)
|
|
215
|
+
const cancelY = scroll.y.on('change', measureScroll)
|
|
207
216
|
|
|
208
|
-
const ro = new ResizeObserver(
|
|
209
|
-
calcPositions()
|
|
210
|
-
forceScrollPosition()
|
|
211
|
-
})
|
|
217
|
+
const ro = new ResizeObserver(measureResize)
|
|
212
218
|
ro.observe(scrollerRef.current)
|
|
219
|
+
ro.observe(beforeRef.current)
|
|
213
220
|
ro.observe(overlayPaneRef.current)
|
|
221
|
+
ro.observe(overlayRef.current)
|
|
214
222
|
|
|
223
|
+
window.addEventListener('resize', measureResize)
|
|
215
224
|
return () => {
|
|
225
|
+
window.removeEventListener('resize', measureResize)
|
|
216
226
|
ro.disconnect()
|
|
217
227
|
cancelX()
|
|
218
228
|
cancelY()
|
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": "6.0.0-canary.
|
|
5
|
+
"version": "6.0.0-canary.40",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"@emotion/react": "^11.10.6",
|
|
19
19
|
"@emotion/server": "^11.4.0",
|
|
20
20
|
"@emotion/styled": "^11.10.6",
|
|
21
|
-
"@graphcommerce/framer-next-pages": "6.0.0-canary.
|
|
22
|
-
"@graphcommerce/framer-scroller": "6.0.0-canary.
|
|
23
|
-
"@graphcommerce/framer-utils": "6.0.0-canary.
|
|
24
|
-
"@graphcommerce/image": "6.0.0-canary.
|
|
21
|
+
"@graphcommerce/framer-next-pages": "6.0.0-canary.40",
|
|
22
|
+
"@graphcommerce/framer-scroller": "6.0.0-canary.40",
|
|
23
|
+
"@graphcommerce/framer-utils": "6.0.0-canary.40",
|
|
24
|
+
"@graphcommerce/image": "6.0.0-canary.40",
|
|
25
25
|
"cookie": "^0.5.0",
|
|
26
26
|
"react-is": "^18.2.0",
|
|
27
27
|
"schema-dts": "^1.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.
|
|
31
|
-
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.
|
|
32
|
-
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.
|
|
30
|
+
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.40",
|
|
31
|
+
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.40",
|
|
32
|
+
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.40",
|
|
33
33
|
"@types/cookie": "^0.5.1",
|
|
34
34
|
"@types/react-is": "^17.0.3",
|
|
35
35
|
"typescript": "4.9.5"
|