@graphcommerce/framer-scroller 4.30.0 → 4.31.0-canary.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.31.0-canary.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1719](https://github.com/graphcommerce-org/graphcommerce/pull/1719) [`dc4996bfe`](https://github.com/graphcommerce-org/graphcommerce/commit/dc4996bfe8a3d6aa950ec79972b3b0c84dfe1c9d) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Changed pan gesture in useScroller to look at pan state instead of the root component
8
+
3
9
  ## 4.30.0
4
10
 
5
11
  ### Patch Changes
@@ -96,7 +96,7 @@ export function useScroller<
96
96
 
97
97
  // If we're not dealing with the mouse we don't need to do anything
98
98
  if (!isHTMLMousePointerEvent(event)) return
99
- if (event.target.closest('.Scroller-root') !== scrollerRef.current) return
99
+ if (!isPanning) return
100
100
 
101
101
  scrollerRef.current.scrollLeft = scrollStart.x.get() - info.offset.x
102
102
  scrollerRef.current.scrollTop = scrollStart.y.get() - info.offset.y
@@ -105,7 +105,7 @@ export function useScroller<
105
105
  const onPanEnd: PanHandlers['onPanEnd'] = (event, info) => {
106
106
  // If we're not dealing with the mouse we don't need to do anything
107
107
  if (!isHTMLMousePointerEvent(event)) return
108
- if (event.target.closest('.Scroller-root') !== scrollerRef.current) return
108
+ if (!isPanning) return
109
109
 
110
110
  setPanning(false)
111
111
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
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": "4.30.0",
5
+ "version": "4.31.0-canary.0",
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
8
  "dev": "tsc -W"
@@ -15,9 +15,9 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@graphcommerce/framer-utils": "4.30.0",
19
- "@graphcommerce/image": "4.30.0",
20
- "@graphcommerce/next-ui": "4.30.0"
18
+ "@graphcommerce/framer-utils": "4.31.0-canary.0",
19
+ "@graphcommerce/image": "4.31.0-canary.0",
20
+ "@graphcommerce/next-ui": "4.31.0-canary.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@graphcommerce/eslint-config-pwa": "^4.1.11",