@graphcommerce/framer-scroller 6.0.0-canary.26 → 6.0.0-canary.28
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 +12 -0
- package/hooks/useScrollTo.ts +3 -4
- package/hooks/useScroller.ts +5 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.0.0-canary.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1823](https://github.com/graphcommerce-org/graphcommerce/pull/1823) [`605d74434`](https://github.com/graphcommerce-org/graphcommerce/commit/605d74434b78baa83f3574b6a4249eae0431d570) - Fix/upgrade instructions ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 6.0.0-canary.27
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#1821](https://github.com/graphcommerce-org/graphcommerce/pull/1821) [`1abc50a21`](https://github.com/graphcommerce-org/graphcommerce/commit/1abc50a21103270fad04e4a9ea892ee1e75233e9) - Fix regression bugs and upgrade packages to latest versions ([@paales](https://github.com/paales))
|
|
14
|
+
|
|
3
15
|
## 6.0.0-canary.26
|
|
4
16
|
|
|
5
17
|
## 6.0.0-canary.25
|
package/hooks/useScrollTo.ts
CHANGED
|
@@ -14,9 +14,7 @@ export function useScrollTo() {
|
|
|
14
14
|
const ref = scrollerRef.current
|
|
15
15
|
if (!ref) return
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
19
|
-
scroll.scroll.start(() => () => {})
|
|
17
|
+
scroll.scroll.set({ ...scroll.scroll.get(), animating: true })
|
|
20
18
|
|
|
21
19
|
const xDone = new Promise<void>((onComplete) => {
|
|
22
20
|
if (ref.scrollLeft !== to.x) {
|
|
@@ -62,7 +60,8 @@ export function useScrollTo() {
|
|
|
62
60
|
|
|
63
61
|
await xDone
|
|
64
62
|
await yDone
|
|
65
|
-
|
|
63
|
+
|
|
64
|
+
scroll.scroll.set({ ...scroll.scroll.get(), animating: false })
|
|
66
65
|
enableSnap()
|
|
67
66
|
},
|
|
68
67
|
[disableSnap, enableSnap, register, scroll, scrollerRef, duration],
|
package/hooks/useScroller.ts
CHANGED
|
@@ -16,9 +16,13 @@ import { scrollSnapTypeDirection, SnapTypeDirection } from '../utils/scrollSnapT
|
|
|
16
16
|
import { useScrollerContext } from './useScrollerContext'
|
|
17
17
|
import { useVelocitySnapTo } from './useVelocitySnapTo'
|
|
18
18
|
|
|
19
|
-
export type ScrollableProps<TagName extends keyof ReactHTML = 'div'> =
|
|
19
|
+
export type ScrollableProps<TagName extends keyof ReactHTML = 'div'> = Omit<
|
|
20
|
+
HTMLMotionProps<TagName>,
|
|
21
|
+
'children'
|
|
22
|
+
> & {
|
|
20
23
|
hideScrollbar?: boolean
|
|
21
24
|
grid?: boolean
|
|
25
|
+
children: React.ReactNode
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
type OwnerProps = {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/framer-scroller",
|
|
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.28",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "tsc -W"
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"popmotion": "11.0.5",
|
|
19
|
-
"@graphcommerce/framer-utils": "6.0.0-canary.
|
|
20
|
-
"@graphcommerce/image": "6.0.0-canary.
|
|
19
|
+
"@graphcommerce/framer-utils": "6.0.0-canary.28",
|
|
20
|
+
"@graphcommerce/image": "6.0.0-canary.28"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.
|
|
25
|
-
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.
|
|
23
|
+
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.28",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.28",
|
|
25
|
+
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.28"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@mui/material": "^5.10.16",
|
|
29
29
|
"@lingui/react": "3.17.1",
|
|
30
30
|
"@lingui/core": "3.17.1",
|
|
31
31
|
"framer-motion": "^7.0.0",
|
|
32
|
-
"next": "^13.
|
|
32
|
+
"next": "^13.2.0",
|
|
33
33
|
"react": "^18.2.0",
|
|
34
34
|
"react-dom": "^18.2.0"
|
|
35
35
|
}
|