@graphcommerce/docs 10.0.0-canary.66 → 10.0.0-canary.68

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,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.68
4
+
5
+ ## 10.0.0-canary.67
6
+
3
7
  ## 10.0.0-canary.66
4
8
 
5
9
  ## 10.0.0-canary.65
@@ -18,7 +18,7 @@ The configuration file is a javascript file that exports a `GraphCommerceConfig`
18
18
 
19
19
  ## Using configuration
20
20
 
21
- Configuration can be accessed in your project with the `import.meta.graphCommerce` object.
21
+ Configuration can be accessed in your project by importing the config from `@graphcommerce/next-config/config`.
22
22
 
23
23
  ```tsx
24
24
  import { storefrontAll, storefrontConfig, storefrontConfigDefault, useStorefrontConfig } from '@graphcommerce/next-ui'
@@ -296,7 +296,7 @@ Project settings -> API Access -> Permanent Auth Tokens
296
296
  - Delete public content views
297
297
  - Can see schema view
298
298
 
299
- ```
299
+ ```bash
300
300
  GC_HYGRAPH_WRITE_ACCESS_TOKEN="AccessTokenFromHygraph"
301
301
  yarn graphcommerce hygraph-migrate
302
302
  ```
@@ -407,6 +407,10 @@ The sha256 certificate fingerprint of the Android app.
407
407
 
408
408
  Permissions input
409
409
 
410
+ #### billingAddress: EDITABLE | READONLY
411
+
412
+ Allows customers to change their billing address or locks it down.
413
+
410
414
  #### cart: CUSTOMER_ONLY | DISABLED | ENABLED
411
415
 
412
416
  Changes the availability of the add to cart buttons and the cart page to either customer only or completely disables it.
@@ -44,7 +44,7 @@ const createOverrides = (theme: Theme): Components => ({
44
44
  {
45
45
  props: {},
46
46
  style: ({ theme }) => ({
47
- color: theme.palette.primary.main,
47
+ color: theme.vars.palette.primary.main,
48
48
  }),
49
49
  },
50
50
  ],
@@ -37,7 +37,7 @@ updated in real-time:
37
37
 
38
38
  You can search through your codebase to discover which components will be
39
39
  affected by your changes. For example, search for occurrences of
40
- `theme.palette.primary.main`.
40
+ `theme.vars.palette.primary.main`.
41
41
 
42
42
  ### Best practices
43
43
 
@@ -84,7 +84,7 @@ property:
84
84
  ```tsx
85
85
  sx={{
86
86
  borderRadius: 2,
87
- backgroundColor: (theme) => theme.palette.primary.main,
87
+ backgroundColor: (theme) => theme.vars.palette.primary.main,
88
88
  }}
89
89
  ```
90
90
 
@@ -92,8 +92,8 @@ To use the theme object for multiple property's:
92
92
 
93
93
  ```tsx
94
94
  sx={(theme) => ({
95
- borderRadius: `1px solid ${theme.palette.divider}`,
96
- backgroundColor: theme.palette.primary.main,
95
+ borderRadius: `1px solid ${theme.vars.palette.divider}`,
96
+ backgroundColor: theme.vars.palette.primary.main,
97
97
  })}
98
98
  ```
99
99
 
@@ -110,10 +110,10 @@ const AnimatedButton = styled(Button, { name: 'animatedButton' })(
110
110
  ({ theme }) => ({
111
111
  '@keyframes pulse': {
112
112
  '0%': {
113
- boxShadow: `0 0 0 0 ${theme.palette.primary.main}`,
113
+ boxShadow: `0 0 0 0 ${theme.vars.palette.primary.main}`,
114
114
  },
115
115
  '100%': {
116
- boxShadow: `0 0 0 15px ${theme.palette.background.default}`,
116
+ boxShadow: `0 0 0 15px ${theme.vars.palette.background.default}`,
117
117
  },
118
118
  },
119
119
  animation: 'pulse 1.5s infinite',
@@ -63,7 +63,7 @@ component:
63
63
  gutterBottom
64
64
  sx={{
65
65
  h3: (theme) => ({
66
- color: theme.palette.primary.main,
66
+ color: theme.vars.palette.primary.main,
67
67
  }),
68
68
  }}
69
69
  >
@@ -198,7 +198,7 @@ export function Banner(props: BannerFragment) {
198
198
  textAlign: 'center' as const,
199
199
  },
200
200
  'heading-one': (theme) => ({
201
- color: theme.palette.primary.main,
201
+ color: theme.vars.palette.primary.main,
202
202
  }),
203
203
  }}
204
204
  />
@@ -103,7 +103,7 @@ sx={{ '& .MuiBox-root': { background: 'blue' }}}
103
103
  Pass the theme object to use global values
104
104
 
105
105
  ```tsx
106
- sx={(theme)=>({ margin: theme.spacings.lg, color: theme.palette.text.secondary })}
106
+ sx={(theme)=>({ margin: theme.spacings.lg, color: theme.vars.palette.text.secondary })}
107
107
  ```
108
108
 
109
109
  ## Customization
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "10.0.0-canary.66",
5
+ "version": "10.0.0-canary.68",
6
6
  "sideEffects": true,
7
7
  "peerDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.66"
8
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.68"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }
@@ -3,6 +3,30 @@
3
3
  Depending on the amounts of customisations you've made, there are some manual
4
4
  steps.
5
5
 
6
+ ## Theme: Replace theme.palette with theme.vars.palette
7
+
8
+ To support CSS variables properly, replace `theme.palette` with
9
+ `theme.vars.palette` in your theme customizations:
10
+
11
+ ```diff
12
+ - color: theme.palette.primary.main,
13
+ + color: theme.vars.palette.primary.main,
14
+ ```
15
+
16
+ ## Theme: Replace dark mode checks with theme.applyStyles
17
+
18
+ Replace conditional dark mode checks with `theme.applyStyles('dark', ...)`:
19
+
20
+ ```diff
21
+ - background: theme.palette.mode === 'dark'
22
+ - ? lighten(theme.palette.background.default, 0.15)
23
+ - : theme.palette.background.default,
24
+ + background: theme.vars.palette.background.default,
25
+ + ...theme.applyStyles('dark', {
26
+ + background: theme.lighten(theme.vars.palette.background.default, 0.15),
27
+ + }),
28
+ ```
29
+
6
30
  ## Trans and t import replacements
7
31
 
8
32
  ```tsx
@@ -106,6 +106,7 @@ After resolving the diff issues, manually process upgrade instructions:
106
106
 
107
107
  - [Upgrading to GraphCommerce 5 to 6](../upgrading/graphcommerce-5-to-6.md)
108
108
  - [Upgrading to GraphCommerce 6 to 7](../upgrading/graphcommerce-6-to-7.md)
109
+ - [Upgrading to GraphCommerce 9 to 10](../upgrading/graphcommerce-9-to-10.md)
109
110
 
110
111
  Run and validate your local environment:
111
112