@graphcommerce/image 9.0.0-canary.115 → 9.0.0-canary.117
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 +4 -0
- package/components/Image.tsx +5 -1
- package/config/config.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/components/Image.tsx
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
11
11
|
import { styled, useForkRef } from '@mui/material'
|
|
12
12
|
import type { ImageConfigComplete, LoaderValue } from 'next/dist/shared/lib/image-config'
|
|
13
|
-
import {
|
|
13
|
+
import { imageConfigDefault, VALID_LOADERS } from 'next/dist/shared/lib/image-config'
|
|
14
14
|
import { ImageConfigContext } from 'next/dist/shared/lib/image-config-context.shared-runtime'
|
|
15
15
|
import Head from 'next/head'
|
|
16
16
|
import type { ImageLoader, ImageLoaderProps } from 'next/image'
|
|
@@ -67,18 +67,22 @@ interface StaticRequire {
|
|
|
67
67
|
|
|
68
68
|
export type StaticImport = StaticRequire | StaticImageData
|
|
69
69
|
|
|
70
|
+
/** @public */
|
|
70
71
|
export function isStaticRequire(src: StaticRequire | StaticImageData): src is StaticRequire {
|
|
71
72
|
return (src as StaticRequire).default !== undefined
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
/** @public */
|
|
74
76
|
export function isStaticImageData(src: StaticRequire | StaticImageData): src is StaticImageData {
|
|
75
77
|
return (src as StaticImageData).src !== undefined
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
/** @public */
|
|
78
81
|
export function isStaticImport(src: string | StaticImport): src is StaticImport {
|
|
79
82
|
return typeof src === 'object' && (isStaticRequire(src) || isStaticImageData(src))
|
|
80
83
|
}
|
|
81
84
|
|
|
85
|
+
/** @public */
|
|
82
86
|
export function srcToString(src: StaticImport | string) {
|
|
83
87
|
return isStaticImport(src) ? (isStaticRequire(src) ? src.default : src).src : src
|
|
84
88
|
}
|
package/config/config.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/image",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.117",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "tsc -W"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
19
|
-
"@graphcommerce/framer-utils": "^9.0.0-canary.
|
|
20
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
21
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
18
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.117",
|
|
19
|
+
"@graphcommerce/framer-utils": "^9.0.0-canary.117",
|
|
20
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.117",
|
|
21
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.117",
|
|
22
22
|
"@mui/material": "^5.10.16",
|
|
23
23
|
"next": "*",
|
|
24
24
|
"react": "^18.2.0",
|