@yamada-ui/image
Advanced tools
Comparing version 1.2.4-dev-20241007025246 to 1.2.4-dev-20241007135427
@@ -8,2 +8,8 @@ import * as _yamada_ui_core from '@yamada-ui/core'; | ||
/** | ||
* The CSS `box-size` property. | ||
* | ||
* @deprecated Use `boxSize` instead. | ||
*/ | ||
size?: CSSUIProps["boxSize"]; | ||
/** | ||
* Fallback image `src` or element to show if image is loading or image fails. | ||
@@ -23,8 +29,2 @@ */ | ||
fit?: CSSUIProps["objectFit"]; | ||
/** | ||
* The CSS `box-size` property. | ||
* | ||
* @deprecated Use `boxSize` instead. | ||
*/ | ||
size?: CSSUIProps["boxSize"]; | ||
} | ||
@@ -31,0 +31,0 @@ interface ImageProps extends Omit<HTMLUIProps<"img">, keyof UseImageProps>, Omit<ThemeProps<"Image">, "size">, UseImageProps, ImageOptions { |
@@ -36,2 +36,4 @@ "use client" | ||
var useImage = ({ | ||
src, | ||
srcSet, | ||
crossOrigin, | ||
@@ -41,4 +43,2 @@ ignoreFallback, | ||
sizes, | ||
src, | ||
srcSet, | ||
onError, | ||
@@ -94,2 +94,4 @@ onLoad | ||
let { | ||
src, | ||
srcSet, | ||
className, | ||
@@ -104,4 +106,2 @@ boxSize, | ||
referrerPolicy, | ||
src, | ||
srcSet, | ||
onError, | ||
@@ -127,4 +127,4 @@ onLoad, | ||
ref, | ||
src: fallback, | ||
className: (0, import_utils2.cx)("ui-image--fallback", className), | ||
src: fallback, | ||
__css: css, | ||
@@ -140,2 +140,4 @@ ...ignoreFallback ? { ...rest, onError, onLoad } : rest | ||
ref, | ||
src, | ||
srcSet, | ||
className: (0, import_utils2.cx)("ui-image", className), | ||
@@ -145,4 +147,2 @@ crossOrigin, | ||
referrerPolicy, | ||
src, | ||
srcSet, | ||
__css: css, | ||
@@ -149,0 +149,0 @@ ...ignoreFallback ? { ...rest, onError, onLoad } : rest |
@@ -42,2 +42,4 @@ "use client" | ||
var useImage = ({ | ||
src, | ||
srcSet, | ||
crossOrigin, | ||
@@ -47,4 +49,2 @@ ignoreFallback, | ||
sizes, | ||
src, | ||
srcSet, | ||
onError, | ||
@@ -100,2 +100,4 @@ onLoad | ||
let { | ||
src, | ||
srcSet, | ||
className, | ||
@@ -110,4 +112,2 @@ boxSize, | ||
referrerPolicy, | ||
src, | ||
srcSet, | ||
onError, | ||
@@ -133,4 +133,4 @@ onLoad, | ||
ref, | ||
src: fallback, | ||
className: (0, import_utils2.cx)("ui-image--fallback", className), | ||
src: fallback, | ||
__css: css, | ||
@@ -146,2 +146,4 @@ ...ignoreFallback ? { ...rest, onError, onLoad } : rest | ||
ref, | ||
src, | ||
srcSet, | ||
className: (0, import_utils2.cx)("ui-image", className), | ||
@@ -151,4 +153,2 @@ crossOrigin, | ||
referrerPolicy, | ||
src, | ||
srcSet, | ||
__css: css, | ||
@@ -155,0 +155,0 @@ ...ignoreFallback ? { ...rest, onError, onLoad } : rest |
@@ -6,2 +6,10 @@ import { ImgHTMLAttributes } from 'react'; | ||
/** | ||
* The image `src` attribute. | ||
*/ | ||
src?: string; | ||
/** | ||
* The image `srcset` attribute. | ||
*/ | ||
srcSet?: string; | ||
/** | ||
* The key used to set the crossOrigin on the HTMLImageElement into which the image will be loaded. | ||
@@ -26,10 +34,2 @@ * This tells the browser to request cross-origin access when trying to download the image data. | ||
/** | ||
* The image `src` attribute. | ||
*/ | ||
src?: string; | ||
/** | ||
* The image `srcset` attribute. | ||
*/ | ||
srcSet?: string; | ||
/** | ||
* A callback for when there was an error loading the image `src`. | ||
@@ -45,5 +45,5 @@ */ | ||
declare const shouldShowFallbackImage: (status: Status, fallbackStrategy: "beforeLoadOrError" | "onError") => boolean; | ||
declare const useImage: ({ crossOrigin, ignoreFallback, loading, sizes, src, srcSet, onError, onLoad, }: UseImageProps) => Status; | ||
declare const useImage: ({ src, srcSet, crossOrigin, ignoreFallback, loading, sizes, onError, onLoad, }: UseImageProps) => Status; | ||
type UseImageReturn = ReturnType<typeof useImage>; | ||
export { type UseImageProps, type UseImageReturn, shouldShowFallbackImage, useImage }; |
@@ -32,2 +32,4 @@ "use client" | ||
var useImage = ({ | ||
src, | ||
srcSet, | ||
crossOrigin, | ||
@@ -37,4 +39,2 @@ ignoreFallback, | ||
sizes, | ||
src, | ||
srcSet, | ||
onError, | ||
@@ -41,0 +41,0 @@ onLoad |
{ | ||
"name": "@yamada-ui/image", | ||
"version": "1.2.4-dev-20241007025246", | ||
"version": "1.2.4-dev-20241007135427", | ||
"description": "Yamada UI media and image component", | ||
@@ -39,4 +39,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@yamada-ui/core": "1.15.2-dev-20241007025246", | ||
"@yamada-ui/utils": "1.5.3-dev-20241007025246" | ||
"@yamada-ui/core": "1.15.2-dev-20241007135427", | ||
"@yamada-ui/utils": "1.5.3-dev-20241007135427" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
+ Added@yamada-ui/core@1.15.2-dev-20241007135427(transitive)
+ Added@yamada-ui/portal@1.0.23-dev-20241007135427(transitive)
+ Added@yamada-ui/utils@1.5.3-dev-20241007135427(transitive)
- Removed@yamada-ui/core@1.15.2-dev-20241007025246(transitive)
- Removed@yamada-ui/portal@1.0.23-dev-20241007025246(transitive)
- Removed@yamada-ui/utils@1.5.3-dev-20241007025246(transitive)