@graphcommerce/docs 3.1.4 → 4.1.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 +29 -0
- package/{content/framework → framework}/deployment.md +10 -6
- package/{content/framework → framework}/environment-variables.md +0 -0
- package/{content/framework → framework}/favicon.md +3 -1
- package/{content/framework → framework}/graphcms.md +10 -4
- package/{content/framework → framework}/icons.md +0 -0
- package/{content/framework → framework}/readme.md +0 -0
- package/{content/framework → framework}/seo.md +0 -0
- package/{content/framework → framework}/static-file-serving.md +0 -0
- package/{content/framework → framework}/static-generation.md +0 -0
- package/{content/framework → framework}/theming.md +1 -1
- package/{content/framework → framework}/translations.md +3 -1
- package/{content/framework → framework}/troubleshooting.md +0 -0
- package/{content/framework → framework}/typography.md +0 -0
- package/{content/getting-started → getting-started}/create.md +7 -3
- package/{content/getting-started → getting-started}/graphcms-component.md +30 -10
- package/{content/getting-started → getting-started}/header.md +17 -7
- package/{content/getting-started → getting-started}/pages.md +12 -4
- package/{content/getting-started → getting-started}/readme.md +3 -2
- package/{content/getting-started → getting-started}/start-building.md +2 -2
- package/{content/getting-started → getting-started}/vscode.md +0 -0
- package/package.json +6 -51
- package/{content/readme.md → readme.md} +1 -1
- package/{content/roadmap.md → roadmap.md} +0 -0
- package/.babelrc +0 -4
- package/components/Layout/LayoutFull.tsx +0 -85
- package/components/Layout/Logo.tsx +0 -19
- package/components/Layout/graphcommerce.svg +0 -34
- package/components/Search.tsx +0 -37
- package/components/SearchForm.tsx +0 -110
- package/components/SidebarMenu/index.tsx +0 -101
- package/components/prism.css +0 -274
- package/components/rehype-prism-plus.css +0 -49
- package/components/theme.ts +0 -410
- package/lib/DocumentIndexer.ts +0 -59
- package/lib/files.ts +0 -168
- package/lib/instantSearch.ts +0 -26
- package/lib/typesense/IndexerHandler.ts +0 -47
- package/lib/typesense/Leaves.ts +0 -37
- package/lib/typesense/SearchIndexer.ts +0 -64
- package/lib/typesense/batchInterable.ts +0 -13
- package/lib/typesense/createInstantSearchProps.ts +0 -36
- package/lib/typesense/typesenseClientConf.ts +0 -23
- package/lib/typesense/typesenseIndexerHandler.ts +0 -23
- package/next-env.d.ts +0 -5
- package/next.config.js +0 -21
- package/pages/[[...url]].tsx +0 -391
- package/pages/_app.tsx +0 -26
- package/pages/_document.tsx +0 -22
- package/pages/api/reindex.ts +0 -4
- package/pages/menu/[[...url]].tsx +0 -69
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +0 -12
- package/public/link.svg +0 -4
- package/public/manifest/favicon-192.png +0 -0
- package/public/manifest/favicon-512.png +0 -0
- package/public/manifest.webmanifest +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`ef499815c`](https://github.com/ho-nl/m2-pwa/commit/ef499815cb1d1e040408ae697f8f3156b5478020)
|
|
8
|
+
Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Fix build breaking spacing
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`12fc8166f`](https://github.com/ho-nl/m2-pwa/commit/12fc8166fd255db87862a08504a5a88552e41e08)
|
|
13
|
+
Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Fix build breaking spaces
|
|
14
|
+
|
|
15
|
+
## 4.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`2db82d114`](https://github.com/ho-nl/m2-pwa/commit/2db82d114ffd4b4860e5a31ce0f2cd170732bda6)
|
|
20
|
+
Thanks [@paales](https://github.com/paales)! - Docs improvements: add alt attribute to docs
|
|
21
|
+
images, markup external links, images as markdown, play video inline
|
|
22
|
+
|
|
23
|
+
## 4.0.0
|
|
24
|
+
|
|
25
|
+
### Major Changes
|
|
26
|
+
|
|
27
|
+
- [#1302](https://github.com/ho-nl/m2-pwa/pull/1302)
|
|
28
|
+
[`22ea2a0af`](https://github.com/ho-nl/m2-pwa/commit/22ea2a0af373dbd427e85f6ac82a074b1928a289)
|
|
29
|
+
Thanks [@paales](https://github.com/paales)! - Moved all rendering of docs to
|
|
30
|
+
https://www.graphcommerce.org/docs and use this only as a content package.
|
|
31
|
+
|
|
3
32
|
## 3.1.4
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -17,9 +17,11 @@ Production Branch of your GitHub project:
|
|
|
17
17
|
it's not showing up, click the 'Configure Github App' to grant Vercel
|
|
18
18
|
repository access
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<figure>
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
</figure>
|
|
23
25
|
|
|
24
26
|
- Set the Environment Variables from your .env file:
|
|
25
27
|
|
|
@@ -41,9 +43,11 @@ Production Branch of your GitHub project:
|
|
|
41
43
|
NEXT_PUBLIC_SITE_URL="https://graphcommerce-example.vercel.app/"
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
<figure>
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
</figure>
|
|
47
51
|
|
|
48
52
|
- Hit the "Deploy" button
|
|
49
53
|
- A custom domain can be configured in the Vercel Project Settings. Update the
|
|
File without changes
|
|
@@ -29,7 +29,9 @@ You can use the GraphCommerce
|
|
|
29
29
|
to simplify the process of making correct favicons.
|
|
30
30
|
|
|
31
31
|
<figure>
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
33
35
|
<figcaption>Favicon sketch template</figcaption>
|
|
34
36
|
</figure>
|
|
35
37
|
|
|
@@ -23,7 +23,7 @@ by adding GraphCMS content to pages.
|
|
|
23
23
|
|
|
24
24
|
To connect your GraphCommerce app to your GraphCMS project, you'll need a
|
|
25
25
|
GraphCMS project with the required schema.
|
|
26
|
-
[Clone the demo GraphCMS project](https://app.graphcms.com/clone/caddaa93cfa9436a9e76ae9c0F34d257)
|
|
26
|
+
[Clone the demo GraphCMS project ↗](https://app.graphcms.com/clone/caddaa93cfa9436a9e76ae9c0F34d257)
|
|
27
27
|
as your starting point. Update the variable in the /.env file:
|
|
28
28
|
|
|
29
29
|
`GRAPHCMS_URL=""`
|
|
@@ -45,19 +45,25 @@ wish to add content to.
|
|
|
45
45
|
For example, the content of the 'men' Page entry in GraphCMS:
|
|
46
46
|
|
|
47
47
|
<figure>
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
49
51
|
</figure>
|
|
50
52
|
|
|
51
53
|
Is used to add a`RowProduct (variant:Grid)` and a
|
|
52
54
|
`RowProduct (variant:Backstory` component to: http://localhost:3000/men
|
|
53
55
|
|
|
54
56
|
<figure>
|
|
55
|
-
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
56
60
|
<figcaption>Content of the RowProduct (variant:Backstory component)</figcaption>
|
|
57
61
|
</figure>
|
|
58
62
|
|
|
59
63
|
<figure>
|
|
60
|
-
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
61
67
|
</figure>
|
|
62
68
|
|
|
63
69
|
## Next steps
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -130,7 +130,7 @@ const AnimatedButton = styled(Button, { name: 'animatedButton' })(
|
|
|
130
130
|
|
|
131
131
|
https://user-images.githubusercontent.com/1251986/155032870-ddecefe0-afb3-418c-af3d-91d8bc435dff.mp4
|
|
132
132
|
|
|
133
|
-
<video width="100%" controls autoPlay loop muted>
|
|
133
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
134
134
|
<source src="https://user-images.githubusercontent.com/1251986/155032870-ddecefe0-afb3-418c-af3d-91d8bc435dff.mp4" type="video/mp4"/>
|
|
135
135
|
</video>
|
|
136
136
|
|
|
@@ -48,7 +48,9 @@ msgstr "Empty cart!"
|
|
|
48
48
|
Refresh to see your changes updated
|
|
49
49
|
|
|
50
50
|
<figure>
|
|
51
|
-
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
52
54
|
<figcaption>Make changes to translations. Refresh to see changes updated.</figcaption>
|
|
53
55
|
</figure>
|
|
54
56
|
|
|
File without changes
|
|
File without changes
|
|
@@ -20,12 +20,16 @@ After you've finished this tutorial, you'll have accomplished the following:
|
|
|
20
20
|
- Generated a new project based on the magento-graphcms example
|
|
21
21
|
|
|
22
22
|
<figure>
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
24
26
|
<figcaption>GraphCommerce magento-graphcms example category page</figcaption>
|
|
25
27
|
</figure>
|
|
26
28
|
|
|
27
29
|
<figure>
|
|
28
|
-
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
29
33
|
<figcaption>GraphCommerce magento-graphcms example product page</figcaption>
|
|
30
34
|
</figure>
|
|
31
35
|
|
|
@@ -86,7 +90,7 @@ and/or GraphCMS project, you'll need:
|
|
|
86
90
|
|
|
87
91
|
- Magento 2.4.3 - Clean install, or a production or development environment
|
|
88
92
|
- GraphCMS - A GraphCMS project with the required schema.
|
|
89
|
-
[Clone the demo GraphCMS project](https://app.graphcms.com/clone/caddaa93cfa9436a9e76ae9c0F34d257)
|
|
93
|
+
[Clone the demo GraphCMS project ↗](https://app.graphcms.com/clone/caddaa93cfa9436a9e76ae9c0F34d257)
|
|
90
94
|
as your starting point.
|
|
91
95
|
|
|
92
96
|
### Configuration
|
|
@@ -44,31 +44,41 @@ frontend React framework that uses Next.js for server-side rendering.
|
|
|
44
44
|
- Add a single line text field called "Identity" and configure the following:
|
|
45
45
|
|
|
46
46
|
<figure>
|
|
47
|
-
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
48
50
|
<figcaption>Adding a Single line text field called "Identity"</figcaption>
|
|
49
51
|
</figure>
|
|
50
52
|
|
|
51
53
|
<figure>
|
|
52
|
-
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
53
57
|
<figcaption>Configuring of the "Identity" field</figcaption>
|
|
54
58
|
</figure>
|
|
55
59
|
|
|
56
60
|
- Add an Asset field called "Image" and configure the following:
|
|
57
61
|
|
|
58
62
|
<figure>
|
|
59
|
-
|
|
63
|
+
|
|
64
|
+

|
|
65
|
+
|
|
60
66
|
<figcaption>Adding an Asset field called "Image"</figcaption>
|
|
61
67
|
</figure>
|
|
62
68
|
|
|
63
69
|
- Add a Rich text field called "Copy" and configure the following:
|
|
64
70
|
|
|
65
71
|
<figure>
|
|
66
|
-
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
67
75
|
<figcaption>Adding a Rich text field called "Copy"</figcaption>
|
|
68
76
|
</figure>
|
|
69
77
|
|
|
70
78
|
<figure>
|
|
71
|
-
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
72
82
|
<figcaption>Configuring of the "Copy" field</figcaption>
|
|
73
83
|
</figure>
|
|
74
84
|
|
|
@@ -82,7 +92,9 @@ relationship between the Banner model and the Content field of the Page model.
|
|
|
82
92
|
"Models to reference"
|
|
83
93
|
|
|
84
94
|
<figure>
|
|
85
|
-
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
86
98
|
<figcaption>Adding the newly created Banner Model to "Models to reference"</figcaption>
|
|
87
99
|
</figure>
|
|
88
100
|
|
|
@@ -90,7 +102,9 @@ relationship between the Banner model and the Content field of the Page model.
|
|
|
90
102
|
the homepage:
|
|
91
103
|
|
|
92
104
|
<figure>
|
|
93
|
-
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
94
108
|
<figcaption>Adding a new banner to the Homepage content entry</figcaption>
|
|
95
109
|
</figure>
|
|
96
110
|
|
|
@@ -114,7 +128,9 @@ query {
|
|
|
114
128
|
Should output the following. Make note that 'Banner' is listed as a typename.
|
|
115
129
|
|
|
116
130
|
<figure>
|
|
117
|
-
|
|
131
|
+
|
|
132
|
+

|
|
133
|
+
|
|
118
134
|
<figcaption>Validation of the addition of "Banner" to the GraphQL Schema</figcaption>
|
|
119
135
|
</figure>
|
|
120
136
|
|
|
@@ -226,12 +242,16 @@ const defaultRenderer: Partial<ContentTypeRenderer> = {
|
|
|
226
242
|
matters:
|
|
227
243
|
|
|
228
244
|
<figure>
|
|
229
|
-
|
|
245
|
+
|
|
246
|
+

|
|
247
|
+
|
|
230
248
|
<figcaption>An instance of the banner component rendering with content from GraphCMS</figcaption>
|
|
231
249
|
</figure>
|
|
232
250
|
|
|
233
251
|
<figure>
|
|
234
|
-
|
|
252
|
+
|
|
253
|
+

|
|
254
|
+
|
|
235
255
|
<figcaption>Sort order matters</figcaption>
|
|
236
256
|
</figure>
|
|
237
257
|
|
|
@@ -39,7 +39,7 @@ frontend React framework that uses Next.js for server-side rendering.
|
|
|
39
39
|
|
|
40
40
|
https://user-images.githubusercontent.com/1251986/154978614-8d2eaee1-d64b-4bae-a7d7-cfee2e9175d3.mp4
|
|
41
41
|
|
|
42
|
-
<video width="100%" controls autoPlay loop muted>
|
|
42
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
43
43
|
<source src="https://user-images.githubusercontent.com/1251986/154978614-8d2eaee1-d64b-4bae-a7d7-cfee2e9175d3.mp4" type="video/mp4"/>
|
|
44
44
|
</video>
|
|
45
45
|
|
|
@@ -50,7 +50,7 @@ https://user-images.githubusercontent.com/1251986/154978614-8d2eaee1-d64b-4bae-a
|
|
|
50
50
|
|
|
51
51
|
https://user-images.githubusercontent.com/1251986/154979091-89c72d68-c62f-451c-af49-6f36f3fa6609.mp4
|
|
52
52
|
|
|
53
|
-
<video width="100%" controls autoPlay loop muted>
|
|
53
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
54
54
|
<source src="https://user-images.githubusercontent.com/1251986/154979091-89c72d68-c62f-451c-af49-6f36f3fa6609.mp4" type="video/mp4"/>
|
|
55
55
|
</video>
|
|
56
56
|
|
|
@@ -81,7 +81,9 @@ https://user-images.githubusercontent.com/1251986/154979091-89c72d68-c62f-451c-a
|
|
|
81
81
|
- Save the file to see your changes updated in real-time
|
|
82
82
|
|
|
83
83
|
<figure>
|
|
84
|
-
|
|
84
|
+
|
|
85
|
+

|
|
86
|
+
|
|
85
87
|
<figcaption>Reorder components</figcaption>
|
|
86
88
|
</figure>
|
|
87
89
|
|
|
@@ -91,7 +93,9 @@ https://user-images.githubusercontent.com/1251986/154979091-89c72d68-c62f-451c-a
|
|
|
91
93
|
`<DesktopNavBar>...</DesktopNavBar>` component.
|
|
92
94
|
|
|
93
95
|
<figure>
|
|
94
|
-
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
95
99
|
<figcaption>Remove navigation</figcaption>
|
|
96
100
|
</figure>
|
|
97
101
|
|
|
@@ -125,7 +129,9 @@ https://user-images.githubusercontent.com/1251986/154979091-89c72d68-c62f-451c-a
|
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
<figure>
|
|
128
|
-
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
129
135
|
<figcaption>Replace search input with Search Fab, remove Customer Service Fab</figcaption>
|
|
130
136
|
</figure>
|
|
131
137
|
|
|
@@ -163,7 +169,9 @@ import React, { useEffect } from 'react'
|
|
|
163
169
|
```
|
|
164
170
|
|
|
165
171
|
<figure>
|
|
166
|
-
|
|
172
|
+
|
|
173
|
+

|
|
174
|
+
|
|
167
175
|
<figcaption>Local copy of the MenuFab component with Fab scroll animation removed</figcaption>
|
|
168
176
|
</figure>
|
|
169
177
|
|
|
@@ -213,7 +221,9 @@ TransitionComponent={Fade}
|
|
|
213
221
|
```
|
|
214
222
|
|
|
215
223
|
<figure>
|
|
216
|
-
|
|
224
|
+
|
|
225
|
+

|
|
226
|
+
|
|
217
227
|
<figcaption>Menu component with custom styling</figcaption>
|
|
218
228
|
</figure>
|
|
219
229
|
|
|
@@ -110,7 +110,9 @@ export const getStaticProps: GetPageStaticProps = async (context) => {
|
|
|
110
110
|
- Visiting http://localhost:3000/about/about-us will output:
|
|
111
111
|
|
|
112
112
|
<figure>
|
|
113
|
-
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
114
116
|
<figcaption>Page with page layout (header, footer)</figcaption>
|
|
115
117
|
</figure>
|
|
116
118
|
|
|
@@ -164,12 +166,16 @@ function AboutUs({ pages }: Props) {
|
|
|
164
166
|
```
|
|
165
167
|
|
|
166
168
|
<figure>
|
|
167
|
-
|
|
169
|
+
|
|
170
|
+

|
|
171
|
+
|
|
168
172
|
<figcaption>Fetch page content from GraphCMS</figcaption>
|
|
169
173
|
</figure>
|
|
170
174
|
|
|
171
175
|
<figure>
|
|
172
|
-
|
|
176
|
+
|
|
177
|
+

|
|
178
|
+
|
|
173
179
|
<figcaption>GraphCMS entry</figcaption>
|
|
174
180
|
</figure>
|
|
175
181
|
|
|
@@ -280,7 +286,9 @@ You can test the static build process by running it locally:
|
|
|
280
286
|
- `yarn build` Start static build process
|
|
281
287
|
|
|
282
288
|
<figure>
|
|
283
|
-
|
|
289
|
+
|
|
290
|
+

|
|
291
|
+
|
|
284
292
|
<figcaption>Successful pre-render of the about/about-us page</figcaption>
|
|
285
293
|
</figure>
|
|
286
294
|
|
|
@@ -82,8 +82,9 @@ styles.
|
|
|
82
82
|
|
|
83
83
|
Others components are imported where needed, and can be recognized by their
|
|
84
84
|
namespace `@graphcommerce/`. There are different ways to
|
|
85
|
-
[customize styles](https://mui.com/customization/how-to-customize/) of
|
|
86
|
-
components. The most common way is by adding an sx prop:
|
|
85
|
+
[customize styles ↗](https://mui.com/customization/how-to-customize/) of
|
|
86
|
+
importend components. The most common way is by adding an sx prop:
|
|
87
|
+
`sx={{color:'red'}}`.
|
|
87
88
|
|
|
88
89
|
If you want to extend a component's behavior or built your own, you can
|
|
89
90
|
duplicate a `@graphcommerce/` component to your /components directory. You'll
|
|
@@ -56,7 +56,7 @@ You've completed the
|
|
|
56
56
|
|
|
57
57
|
https://user-images.githubusercontent.com/1251986/154980151-2039c027-c31f-4b99-86f2-8c2420053da8.mp4
|
|
58
58
|
|
|
59
|
-
<video width="100%" controls autoPlay loop muted>
|
|
59
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
60
60
|
<source src="https://user-images.githubusercontent.com/1251986/154980151-2039c027-c31f-4b99-86f2-8c2420053da8.mp4" type="video/mp4"/>
|
|
61
61
|
</video>
|
|
62
62
|
|
|
@@ -89,7 +89,7 @@ https://user-images.githubusercontent.com/1251986/154980151-2039c027-c31f-4b99-8
|
|
|
89
89
|
|
|
90
90
|
https://user-images.githubusercontent.com/1251986/154980686-3d2bf587-16d7-412b-b05f-8b0f7b40cbfd.mp4
|
|
91
91
|
|
|
92
|
-
<video width="100%" controls autoPlay loop muted>
|
|
92
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
93
93
|
|
|
94
94
|
<source src="https://user-images.githubusercontent.com/1251986/154980686-3d2bf587-16d7-412b-b05f-8b0f7b40cbfd.mp4" type="video/mp4"/>
|
|
95
95
|
</video>
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,56 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
|
-
"homepage": "https://www.graphcommerce.org/",
|
|
4
|
-
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "
|
|
6
|
-
"
|
|
7
|
-
"sideEffects": false,
|
|
8
|
-
"main": "index.js",
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@graphcommerce/framer-next-pages": "^3.1.0",
|
|
11
|
-
"@graphcommerce/image": "^3.1.0",
|
|
12
|
-
"@graphcommerce/next-config": "^3.0.3",
|
|
13
|
-
"@graphcommerce/next-ui": "^4.2.2",
|
|
14
|
-
"@graphcommerce/react-hook-form": "^3.0.3",
|
|
15
|
-
"@mui/material": "^5.4.3",
|
|
16
|
-
"instantsearch.js": "^4.39.0",
|
|
17
|
-
"next": "^12.1.0",
|
|
18
|
-
"next-mdx-remote": "^4.0.0",
|
|
19
|
-
"react": "^17.0.2",
|
|
20
|
-
"react-dom": "^17.0.2",
|
|
21
|
-
"react-instantsearch-hooks": "^6.22.0",
|
|
22
|
-
"rehype-autolink-headings": "^6.1.1",
|
|
23
|
-
"rehype-prism-plus": "^1.3.2",
|
|
24
|
-
"rehype-slug": "^5.0.1",
|
|
25
|
-
"remark": "^14.0.2",
|
|
26
|
-
"remark-gfm": "^3.0.1",
|
|
27
|
-
"strip-markdown": "^5.0.0",
|
|
28
|
-
"to-vfile": "^7.2.3",
|
|
29
|
-
"type-fest": "^2.12.0",
|
|
30
|
-
"typesense": "^1.2.1",
|
|
31
|
-
"typesense-instantsearch-adapter": "^2.4.0",
|
|
32
|
-
"vfile-matter": "^3.0.1"
|
|
33
|
-
},
|
|
3
|
+
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
|
+
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
+
"version": "4.1.0",
|
|
6
|
+
"sideEffects": true,
|
|
34
7
|
"devDependencies": {
|
|
35
|
-
"@graphcommerce/
|
|
36
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.2",
|
|
37
|
-
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
38
|
-
"eslint": "^8.10.0",
|
|
39
|
-
"typescript": "^4.5.5"
|
|
40
|
-
},
|
|
41
|
-
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
42
|
-
"eslintConfig": {
|
|
43
|
-
"extends": "@graphcommerce/eslint-config-pwa",
|
|
44
|
-
"parserOptions": {
|
|
45
|
-
"project": "./tsconfig.json"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"engines": {
|
|
49
|
-
"node": "14.x"
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.2"
|
|
50
9
|
},
|
|
51
|
-
"
|
|
52
|
-
"dev": "next dev -p 3002",
|
|
53
|
-
"build": "next build",
|
|
54
|
-
"start": "next start"
|
|
55
|
-
}
|
|
10
|
+
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
56
11
|
}
|
|
@@ -24,7 +24,7 @@ high-end e-commerce progressive web apps (PWA).
|
|
|
24
24
|
|
|
25
25
|
https://user-images.githubusercontent.com/1251986/154977573-4015e77c-43e7-481e-ab97-60c365c6b746.mp4
|
|
26
26
|
|
|
27
|
-
<video width="100%" controls autoPlay loop muted>
|
|
27
|
+
<video width="100%" controls autoPlay loop muted playsinline>
|
|
28
28
|
<source src="https://user-images.githubusercontent.com/1251986/154977573-4015e77c-43e7-481e-ab97-60c365c6b746.mp4" type="video/mp4"/>
|
|
29
29
|
</video>
|
|
30
30
|
|
|
File without changes
|
package/.babelrc
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
iconMenu,
|
|
3
|
-
LayoutDefault,
|
|
4
|
-
LayoutDefaultProps,
|
|
5
|
-
responsiveVal,
|
|
6
|
-
IconSvg,
|
|
7
|
-
} from '@graphcommerce/next-ui'
|
|
8
|
-
import { Box, Fab } from '@mui/material'
|
|
9
|
-
import Link from 'next/link'
|
|
10
|
-
import { useRouter } from 'next/router'
|
|
11
|
-
import { FileNode } from '../../lib/files'
|
|
12
|
-
import { Search } from '../Search'
|
|
13
|
-
import SidebarMenu from '../SidebarMenu'
|
|
14
|
-
import { Logo } from './Logo'
|
|
15
|
-
|
|
16
|
-
export type LayoutFullProps = Omit<
|
|
17
|
-
LayoutDefaultProps,
|
|
18
|
-
'pages' | 'classes' | 'header' | 'cartFab' | 'menuFab' | 'footer'
|
|
19
|
-
> & { menuData?: FileNode }
|
|
20
|
-
|
|
21
|
-
export function LayoutFull(props: LayoutFullProps) {
|
|
22
|
-
const { children, menuData } = props
|
|
23
|
-
|
|
24
|
-
const router = useRouter()
|
|
25
|
-
|
|
26
|
-
const selected = router.asPath.split('?')[0].split('#')[0]
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<LayoutDefault
|
|
30
|
-
header={<Logo />}
|
|
31
|
-
footer=''
|
|
32
|
-
menuFab={
|
|
33
|
-
<Link href={`/menu${selected}`} passHref>
|
|
34
|
-
<Fab
|
|
35
|
-
size='responsive'
|
|
36
|
-
sx={{
|
|
37
|
-
display: { sm: undefined, md: 'none' },
|
|
38
|
-
backgroundColor: 'text.primary',
|
|
39
|
-
color: 'background.paper',
|
|
40
|
-
'&:hover, &:focus': {
|
|
41
|
-
boxShadow: 'none',
|
|
42
|
-
backgroundColor: 'text.primary',
|
|
43
|
-
},
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
<IconSvg src={iconMenu} size='medium' />
|
|
47
|
-
</Fab>
|
|
48
|
-
</Link>
|
|
49
|
-
}
|
|
50
|
-
sx={[
|
|
51
|
-
(theme) => ({
|
|
52
|
-
'& header': {
|
|
53
|
-
p: 0,
|
|
54
|
-
},
|
|
55
|
-
'& header a, & header > div': {
|
|
56
|
-
backgroundColor: theme.palette.background.paper,
|
|
57
|
-
[theme.breakpoints.up('md')]: {
|
|
58
|
-
borderRight: `1px solid ${theme.palette.divider}`,
|
|
59
|
-
width: `${responsiveVal(320, 340)}`,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
'& .LayoutDefault-children': {
|
|
63
|
-
display: 'grid',
|
|
64
|
-
gridAutoFlow: 'column',
|
|
65
|
-
gridTemplateColumns: { xs: '1fe', md: `${responsiveVal(320, 340)} 1fr` },
|
|
66
|
-
borderTop: `1px solid ${theme.palette.divider}`,
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
]}
|
|
70
|
-
>
|
|
71
|
-
<Box
|
|
72
|
-
sx={{
|
|
73
|
-
backgroundColor: (theme) => theme.palette.background.paper,
|
|
74
|
-
padding: 2,
|
|
75
|
-
borderRight: (theme) => `1px solid ${theme.palette.divider}`,
|
|
76
|
-
display: { xs: 'none', md: 'block' },
|
|
77
|
-
}}
|
|
78
|
-
>
|
|
79
|
-
<Search />
|
|
80
|
-
{menuData && <SidebarMenu {...menuData} selected={selected} />}
|
|
81
|
-
</Box>
|
|
82
|
-
<Box sx={{ mb: 15 }}>{children}</Box>
|
|
83
|
-
</LayoutDefault>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Logo as LogoBase } from '@graphcommerce/next-ui'
|
|
2
|
-
import svgLogo from './graphcommerce.svg'
|
|
3
|
-
|
|
4
|
-
export function Logo() {
|
|
5
|
-
return (
|
|
6
|
-
<LogoBase
|
|
7
|
-
sx={{
|
|
8
|
-
'& .GcLogo-logo': {
|
|
9
|
-
width: 'auto',
|
|
10
|
-
height: { xs: '24px', md: '36px' },
|
|
11
|
-
paddingLeft: { xs: '10px', md: '52px' },
|
|
12
|
-
marginTop: { xs: 0, md: '4px' },
|
|
13
|
-
filter: (theme) => (theme.palette.mode === 'dark' ? 'invert(100%)' : 'invert(0%)'),
|
|
14
|
-
},
|
|
15
|
-
}}
|
|
16
|
-
image={{ alt: 'GraphCommerce Logo', src: svgLogo, unoptimized: true }}
|
|
17
|
-
/>
|
|
18
|
-
)
|
|
19
|
-
}
|