@graphcommerce/framer-scroller 1.1.20 → 1.1.24

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,41 @@
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.24](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.23...@graphcommerce/framer-scroller@1.1.24) (2021-12-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framer-next-pages:** closing is janky, caused by setting pointer-events to none, trying without resetting the pointerevents ([9247fa3](https://github.com/ho-nl/m2-pwa/commit/9247fa312926416802abd68ea04b1e6b52531f2c))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.1.22](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.21...@graphcommerce/framer-scroller@1.1.22) (2021-12-22)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **framer-scroller:** make sure the first gallery dot is selected initially ([a2ed37b](https://github.com/ho-nl/m2-pwa/commit/a2ed37bd2c17eef46c0ee4cf8219a141b2e054b4))
23
+
24
+
25
+
26
+
27
+
28
+ ## [1.1.21](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.20...@graphcommerce/framer-scroller@1.1.21) (2021-12-22)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **framer-scroller:** height of the gallery item isn't high enough ([0e84ba3](https://github.com/ho-nl/m2-pwa/commit/0e84ba3ecb8928870fdc0459a1c6c30fde372d91))
34
+ * **framer-scroller:** make sure the actual image will scale instead of the container ([8d55630](https://github.com/ho-nl/m2-pwa/commit/8d55630a93cff91ac37e426bbe9f1b25b001556c))
35
+ * **framer-scroller:** would throw ssr warning ([a3db078](https://github.com/ho-nl/m2-pwa/commit/a3db0781d2433809c0bd4cb6ba37af79b611f3c4))
36
+
37
+
38
+
39
+
40
+
6
41
  ## [1.1.20](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/framer-scroller@1.1.19...@graphcommerce/framer-scroller@1.1.20) (2021-12-22)
7
42
 
8
43
 
@@ -13,7 +13,7 @@ const useStyles = makeStyles(
13
13
  display: 'block',
14
14
  '@supports (aspect-ratio: 1 / 1)': {
15
15
  maxWidth: '99.6%',
16
- maxHeight: '99.6%',
16
+ maxHeight: '100%',
17
17
  width: 'auto',
18
18
  height: 'auto',
19
19
 
@@ -56,10 +56,11 @@ const MotionImageAspect = m(
56
56
  forwardRef<HTMLImageElement, MotionImageAspectProps>((props, ref) => {
57
57
  const classes = useStyles()
58
58
  return (
59
- <div className={classes.root} ref={ref}>
59
+ <div className={classes.root}>
60
60
  <Image
61
61
  {...props}
62
62
  layout='fill'
63
+ ref={ref}
63
64
  className={clsx(classes.image, props.className)}
64
65
  pictureProps={{
65
66
  className: clsx(classes.picture, props.pictureProps?.className),
@@ -37,7 +37,7 @@ export type DotsProps = {
37
37
 
38
38
  const ScrollerDots = m(
39
39
  React.forwardRef<HTMLDivElement, DotsProps>((props, ref) => {
40
- const { fabProps, ...containerProps } = props
40
+ const { fabProps, classes: _classes, ...containerProps } = props
41
41
  const { dots, dot, circle, ...classes } = useStyles(props)
42
42
  const { items, getScrollSnapPositions } = useScrollerContext()
43
43
  const itemsArr = useMotionValueValue(items, (v) => v)
@@ -126,9 +126,9 @@ export default function ScrollerProvider(props: ScrollerProviderProps) {
126
126
  itemsArr.length = count
127
127
 
128
128
  items.set(
129
- itemsArr.fill(undefined).map<ItemState>(() => ({
130
- visibility: motionValue(0),
131
- opacity: motionValue(0.2),
129
+ itemsArr.fill(undefined).map<ItemState>((_, i) => ({
130
+ visibility: motionValue(i === 0 ? 1 : 0),
131
+ opacity: motionValue(i === 0 ? 1 : 0.2),
132
132
  })),
133
133
  )
134
134
  },
@@ -14,6 +14,10 @@ export function useScrollTo() {
14
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
15
  // if ('scrollBehavior' in document.documentElement.style) {
16
16
  // scrollerRef.current.scrollTo({ left: to.x, top: to.y, behavior: 'smooth' })
17
+ // await new Promise((onComplete) => {
18
+ // setTimeout(onComplete, 2000)
19
+ // })
20
+ // return
17
21
  // }
18
22
 
19
23
  const xDone = new Promise<void>((onComplete) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/framer-scroller",
3
- "version": "1.1.20",
3
+ "version": "1.1.24",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "dev": "tsc -W"
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "@graphcommerce/framer-utils": "^2.103.20",
20
20
  "@graphcommerce/image": "^2.105.11",
21
- "@graphcommerce/next-ui": "^3.21.10",
21
+ "@graphcommerce/next-ui": "^3.21.14",
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": "c8ce20cffa0bf8fe47fa75d98c97d8c5d684c485"
39
+ "gitHead": "ce4499b06791f3b2e54a7e88bfca40abbcd1401c"
40
40
  }