@graphcommerce/framer-next-pages 3.2.2 → 3.2.3

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,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1490](https://github.com/graphcommerce-org/graphcommerce/pull/1490) [`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb) Thanks [@paales](https://github.com/paales)! - upgraded packages
8
+
9
+ - Updated dependencies [[`d311ef48b`](https://github.com/graphcommerce-org/graphcommerce/commit/d311ef48bb3e97806d992af5516d6b7f183ec9cb)]:
10
+ - @graphcommerce/framer-utils@3.1.4
11
+
3
12
  ## 3.2.2
4
13
 
5
14
  ### Patch Changes
@@ -5,7 +5,7 @@ import React, { useMemo } from 'react'
5
5
  import { pageRouterContext } from '../context/pageRouterContext'
6
6
  import { PageItem } from '../types'
7
7
 
8
- const NoLayout: React.FC = ({ children }) => <>{children}</>
8
+ const NoLayout: React.FC<{ children?: React.ReactNode }> = ({ children }) => <>{children}</>
9
9
 
10
10
  export type PageRendererProps = Omit<AppPropsType, 'router'> & {
11
11
  Layout: React.ComponentType<AppPropsType>
@@ -186,31 +186,33 @@ and pass it as a param in <FramerNextPages fallbackRoute='/[...url]' /> in your
186
186
  .reverse()
187
187
 
188
188
  return (
189
- <AnimatePresence initial={false}>
189
+ <>
190
190
  <m.div
191
191
  style={{ position: 'absolute', top: 0, minHeight: clientSizeCssVar.y, left: 0, right: 0 }}
192
192
  />
193
- {renderItems.map((item, itemIdx) => {
194
- const { historyIdx, sharedKey, overlayGroup } = item
195
- const active = itemIdx === renderItems.length - 1
196
- const depth = itemIdx - (renderItems.length - 1)
197
- const closeIdx = renderItems[itemIdx - 1]?.historyIdx ?? -1
198
- const closeSteps = closeIdx > -1 ? historyIdx - closeIdx : 0
199
- const backSteps = historyIdx - closeIdx - 1
200
-
201
- return (
202
- <pageContext.Provider
203
- key={sharedKey}
204
- // We're actually rerendering here but since the actual page renderer is memoized we can safely do this
205
- // eslint-disable-next-line react/jsx-no-constructed-context-values
206
- value={{ depth, active, direction, closeSteps, backSteps, historyIdx, overlayGroup }}
207
- >
208
- <Page active={active} historyIdx={historyIdx}>
209
- <PageRenderer {...item} />
210
- </Page>
211
- </pageContext.Provider>
212
- )
213
- })}
214
- </AnimatePresence>
193
+ <AnimatePresence initial={false}>
194
+ {renderItems.map((item, itemIdx) => {
195
+ const { historyIdx, sharedKey, overlayGroup } = item
196
+ const active = itemIdx === renderItems.length - 1
197
+ const depth = itemIdx - (renderItems.length - 1)
198
+ const closeIdx = renderItems[itemIdx - 1]?.historyIdx ?? -1
199
+ const closeSteps = closeIdx > -1 ? historyIdx - closeIdx : 0
200
+ const backSteps = historyIdx - closeIdx - 1
201
+
202
+ return (
203
+ <pageContext.Provider
204
+ key={sharedKey}
205
+ // We're actually rerendering here but since the actual page renderer is memoized we can safely do this
206
+ // eslint-disable-next-line react/jsx-no-constructed-context-values
207
+ value={{ depth, active, direction, closeSteps, backSteps, historyIdx, overlayGroup }}
208
+ >
209
+ <Page active={active} historyIdx={historyIdx}>
210
+ <PageRenderer {...item} />
211
+ </Page>
212
+ </pageContext.Provider>
213
+ )
214
+ })}
215
+ </AnimatePresence>
216
+ </>
215
217
  )
216
218
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/framer-next-pages",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.2.2",
5
+ "version": "3.2.3",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,19 +12,19 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@graphcommerce/framer-utils": "3.1.3"
15
+ "@graphcommerce/framer-utils": "3.1.4"
16
16
  },
17
17
  "devDependencies": {
18
- "@graphcommerce/eslint-config-pwa": "^4.1.5",
18
+ "@graphcommerce/eslint-config-pwa": "^4.1.8",
19
19
  "@graphcommerce/prettier-config-pwa": "^4.0.6",
20
20
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
21
21
  "@playwright/test": "^1.21.1"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "framer-motion": "^6.2.4",
25
- "next": "12.1.2",
26
- "react": "^17.0.2",
27
- "react-dom": "^17.0.2",
25
+ "next": "^12.1.2",
26
+ "react": "^18.0.0",
27
+ "react-dom": "^18.0.0",
28
28
  "@emotion/react": "^11.8.2"
29
29
  }
30
30
  }