@graphcommerce/framer-scroller 1.1.13 → 1.1.17

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 CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.17](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.16...@graphcommerce/framer-scroller@1.1.17) (2021-12-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framer-scroller:** apply will change only when animating ([77fee92](https://github.com/ho-nl/m2-pwa/commit/77fee92c0eb70691b699e1f6ba378ec16c534975))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.1.14](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.13...@graphcommerce/framer-scroller@1.1.14) (2021-12-20)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **framer-scroller:** remove jank from scroller when opening ([c618bf2](https://github.com/ho-nl/m2-pwa/commit/c618bf290bd580fe5eb45663c44843dd751e00ed))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [1.1.10](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.9...@graphcommerce/framer-scroller@1.1.10) (2021-12-17)
7
29
 
8
30
 
@@ -11,6 +11,11 @@ export function useScrollTo() {
11
11
  const ref = scrollerRef.current
12
12
  if (!ref) return
13
13
 
14
+ // In the future we want to move to browser native scrolling behavior, but since it is too slow we're not moving to that yet.
15
+ // if ('scrollBehavior' in document.documentElement.style) {
16
+ // scrollerRef.current.scrollTo({ left: to.x, top: to.y, behavior: 'smooth' })
17
+ // }
18
+
14
19
  const xDone = new Promise<void>((onComplete) => {
15
20
  if (ref.scrollLeft !== to.x) {
16
21
  disableSnap()
@@ -24,7 +29,6 @@ export function useScrollTo() {
24
29
  },
25
30
  onComplete,
26
31
  onStop: onComplete,
27
- bounce: 50,
28
32
  }),
29
33
  )
30
34
  } else onComplete()
@@ -43,7 +47,7 @@ export function useScrollTo() {
43
47
  },
44
48
  onComplete,
45
49
  onStop: onComplete,
46
- bounce: 50,
50
+ duration: 500,
47
51
  }),
48
52
  )
49
53
  } else onComplete()
@@ -11,7 +11,7 @@ import {
11
11
  useTransform,
12
12
  } from 'framer-motion'
13
13
  import React, { ReactHTML, useState } from 'react'
14
- import { ScrollSnapProps, ScrollSnapType } from '../types'
14
+ import { ScrollSnapProps } from '../types'
15
15
  import { isHTMLMousePointerEvent } from '../utils/isHTMLMousePointerEvent'
16
16
  import { scrollSnapTypeDirection } from '../utils/scrollSnapTypeDirection'
17
17
  import { useScrollerContext } from './useScrollerContext'
@@ -25,7 +25,6 @@ const useStyles = makeStyles(
25
25
  userDrag: 'none',
26
26
  },
27
27
  },
28
-
29
28
  rootSmSnapDirNone: {
30
29
  [theme.breakpoints.down('sm')]: {
31
30
  overflow: 'hidden',
@@ -105,6 +104,9 @@ const useStyles = makeStyles(
105
104
  scrollSnapType: scrollSnapTypeMd,
106
105
  },
107
106
  }),
107
+ rootNoSnap: {
108
+ willChange: 'scroll-position',
109
+ },
108
110
  rootIsPanning: {
109
111
  cursor: 'grabbing !important',
110
112
  '& > *': {
@@ -216,6 +218,7 @@ export function useScroller<TagName extends keyof ReactHTML = 'div'>(
216
218
  mdSnapDir,
217
219
  mdGridDir,
218
220
  isSnap,
221
+ noSnap: !isSnap,
219
222
  isPanning,
220
223
  hideScrollbar,
221
224
  canGrab,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/framer-scroller",
3
- "version": "1.1.13",
3
+ "version": "1.1.17",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "dev": "tsc -W"
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@graphcommerce/framer-utils": "^2.103.20",
20
- "@graphcommerce/image": "^2.105.10",
21
- "@graphcommerce/next-ui": "^3.21.3",
20
+ "@graphcommerce/image": "^2.105.11",
21
+ "@graphcommerce/next-ui": "^3.21.7",
22
22
  "@material-ui/core": "^4.12.3",
23
23
  "popmotion": "11.0.3"
24
24
  },
@@ -36,5 +36,5 @@
36
36
  "react-dom": "^17.0.2",
37
37
  "type-fest": "^2.8.0"
38
38
  },
39
- "gitHead": "7cfbdb5a042e271252c8b9729393e084002a321e"
39
+ "gitHead": "09aca3fbe0a5dc006b33fc8dee349c81bcbe0cb8"
40
40
  }