@graphcommerce/framer-next-pages 3.2.0 → 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 +24 -0
- package/components/Page.tsx +4 -1
- package/components/PageRenderer.tsx +1 -1
- package/components/Pages.tsx +25 -23
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
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
|
+
|
|
12
|
+
## 3.2.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#1477](https://github.com/graphcommerce-org/graphcommerce/pull/1477) [`597e2f413`](https://github.com/graphcommerce-org/graphcommerce/commit/597e2f413bdb5b76793b40ab631ce61390e26e81) Thanks [@paales](https://github.com/paales)! - fixes Received `true` for a non-boolean attribute `inert`.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494)]:
|
|
19
|
+
- @graphcommerce/framer-utils@3.1.3
|
|
20
|
+
|
|
21
|
+
## 3.2.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#1432](https://github.com/graphcommerce-org/graphcommerce/pull/1432) [`99600dd09`](https://github.com/graphcommerce-org/graphcommerce/commit/99600dd091980dd9ef335c04d2efac0835c20b2f) Thanks [@paales](https://github.com/paales)! - make sure the background isn’t visible to screen readers
|
|
26
|
+
|
|
3
27
|
## 3.2.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/components/Page.tsx
CHANGED
|
@@ -36,7 +36,10 @@ export function Page(props: PageProps) {
|
|
|
36
36
|
return (
|
|
37
37
|
<m.div
|
|
38
38
|
style={{ position, top, zIndex, minHeight: clientSizeCssVar.y, left: 0, right: 0 }}
|
|
39
|
-
|
|
39
|
+
// @ts-expect-error inert is not in the type definition yet
|
|
40
|
+
inert={!active ? 'true' : undefined}
|
|
41
|
+
data-nosnippet={!active ? true : undefined}
|
|
42
|
+
aria-hidden={!active ? true : undefined}
|
|
40
43
|
>
|
|
41
44
|
{children}
|
|
42
45
|
</m.div>
|
|
@@ -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>
|
package/components/Pages.tsx
CHANGED
|
@@ -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
|
-
|
|
189
|
+
<>
|
|
190
190
|
<m.div
|
|
191
191
|
style={{ position: 'absolute', top: 0, minHeight: clientSizeCssVar.y, left: 0, right: 0 }}
|
|
192
192
|
/>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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.
|
|
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.
|
|
15
|
+
"@graphcommerce/framer-utils": "3.1.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^4.1.
|
|
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": "^
|
|
27
|
-
"react-dom": "^
|
|
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
|
}
|