@graphcommerce/graphcms-ui 3.0.9 → 3.0.12
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,34 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Now using [@graphql-yoga](https://github.com/dotansimha/graphql-yoga) for GraphQL which has full support for [envelop](https://www.envelop.dev/) plugins.
|
|
8
|
+
|
|
9
|
+
* [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Added a new @graphcommerce/cli package to generate the mesh so it can be generated _inside_ the @graphcommerce/graphql-mesh package to allow for better future extensibility.
|
|
10
|
+
|
|
11
|
+
- [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]:
|
|
14
|
+
- @graphcommerce/graphql@3.1.0
|
|
15
|
+
- @graphcommerce/next-ui@4.6.1
|
|
16
|
+
- @graphcommerce/image@3.1.5
|
|
17
|
+
|
|
18
|
+
## 3.0.11
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#1392](https://github.com/graphcommerce-org/graphcommerce/pull/1392) [`123d441ac`](https://github.com/graphcommerce-org/graphcommerce/commit/123d441acb74706d08e453abae4a6a8dad3130e0) Thanks [@carlocarels90](https://github.com/carlocarels90)! - add missing fields to the iframe renderer
|
|
23
|
+
|
|
24
|
+
## 3.0.10
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [[`3c801f45c`](https://github.com/graphcommerce-org/graphcommerce/commit/3c801f45c7df55131acf30ae2fe0d2344830d480), [`3192fab82`](https://github.com/graphcommerce-org/graphcommerce/commit/3192fab82560e2211dfcacadc3b0b305260527d8), [`0e425e85e`](https://github.com/graphcommerce-org/graphcommerce/commit/0e425e85ee8fed280349317ee0440c7bceea5823), [`8a354d1cd`](https://github.com/graphcommerce-org/graphcommerce/commit/8a354d1cd4757497ddfc9b1969a0addbc8ff616b)]:
|
|
29
|
+
- @graphcommerce/next-ui@4.6.0
|
|
30
|
+
- @graphcommerce/image@3.1.4
|
|
31
|
+
|
|
3
32
|
## 3.0.9
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -16,11 +16,22 @@ export const defaultRenderers: Renderers = {
|
|
|
16
16
|
'list-item': (props) => <Box component='li' {...props} />,
|
|
17
17
|
'list-item-child': (props) => <Box component='span' {...props} />,
|
|
18
18
|
'block-quote': (props) => <Box component='blockquote' {...props} />,
|
|
19
|
-
iframe: (props) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
iframe: (props) => {
|
|
20
|
+
const { url, width, height, sx = [] } = props
|
|
21
|
+
return (
|
|
22
|
+
// todo add security attributes to iframe
|
|
23
|
+
// todo make iframe responsive (generic IFrame component?)
|
|
24
|
+
<Box
|
|
25
|
+
component='iframe'
|
|
26
|
+
src={url}
|
|
27
|
+
loading='lazy'
|
|
28
|
+
sx={[
|
|
29
|
+
{ aspectRatio: `${width} / ${height}`, width: '100%' },
|
|
30
|
+
...(Array.isArray(sx) ? sx : [sx]),
|
|
31
|
+
]}
|
|
32
|
+
/>
|
|
33
|
+
)
|
|
34
|
+
},
|
|
24
35
|
image: ({ src, width, height, title, mimeType }) => (
|
|
25
36
|
<Asset asset={{ url: src, alt: title, width, height, mimeType }} />
|
|
26
37
|
),
|
|
@@ -2,7 +2,7 @@ import { SxRenderer } from './types'
|
|
|
2
2
|
|
|
3
3
|
export const defaultSxRenderer: SxRenderer = {
|
|
4
4
|
all: {
|
|
5
|
-
'&:empty': {
|
|
5
|
+
'&:empty:not(iframe)': {
|
|
6
6
|
display: 'none',
|
|
7
7
|
},
|
|
8
8
|
},
|
|
@@ -104,4 +104,5 @@ export const defaultSxRenderer: SxRenderer = {
|
|
|
104
104
|
underlined: {
|
|
105
105
|
textDecoration: 'underline',
|
|
106
106
|
},
|
|
107
|
+
iframe: {},
|
|
107
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material'
|
|
2
|
-
import { LiteralUnion } from 'type-fest'
|
|
2
|
+
import type { LiteralUnion } from 'type-fest'
|
|
3
3
|
|
|
4
4
|
type BaseElementTypes =
|
|
5
5
|
| 'heading-one'
|
|
@@ -69,7 +69,9 @@ type VideoElement = {
|
|
|
69
69
|
type IframeElement = {
|
|
70
70
|
type: 'iframe'
|
|
71
71
|
children: ElementOrTextNode[]
|
|
72
|
-
|
|
72
|
+
url: string
|
|
73
|
+
width?: number
|
|
74
|
+
height?: number
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
export type ElementNode = SimpleElement | LinkElement | ImageElement | VideoElement | IframeElement
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/graphcms-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "3.0.
|
|
5
|
+
"version": "3.0.12",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^4.1.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.5",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
17
|
"@graphcommerce/typescript-config-pwa": "^4.0.2",
|
|
18
|
-
"@playwright/test": "^1.
|
|
19
|
-
"type-fest": "2.12.
|
|
18
|
+
"@playwright/test": "^1.21.1",
|
|
19
|
+
"type-fest": "^2.12.2"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@graphcommerce/graphql": "3.0
|
|
23
|
-
"@graphcommerce/image": "3.1.
|
|
24
|
-
"@graphcommerce/next-ui": "4.
|
|
22
|
+
"@graphcommerce/graphql": "3.1.0",
|
|
23
|
+
"@graphcommerce/image": "3.1.5",
|
|
24
|
+
"@graphcommerce/next-ui": "4.6.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@mui/material": "5.5.3",
|