Socket
Socket
Sign inDemoInstall

@yamada-ui/image

Package Overview
Dependencies
Maintainers
0
Versions
915
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/image - npm Package Compare versions

Comparing version 1.0.33 to 1.1.0-dev-20240723153523

dist/chunk-GHMLRPDP.mjs

6

dist/image.d.ts
import * as _yamada_ui_core from '@yamada-ui/core';
import { HTMLUIProps, CSSUIProps } from '@yamada-ui/core';
import { HTMLUIProps, ThemeProps, CSSUIProps } from '@yamada-ui/core';
import { ReactElement } from 'react';

@@ -20,2 +20,4 @@ import { UseImageProps } from './use-image.js';

* The CSS `box-size` property.
*
* @deprecated Use `boxSize` instead.
*/

@@ -28,3 +30,3 @@ size?: CSSUIProps["boxSize"];

};
type ImageProps = Omit<HTMLUIProps<"img">, keyof UseImageProps> & UseImageProps & ImageOptions;
type ImageProps = Omit<HTMLUIProps<"img">, keyof UseImageProps> & Omit<ThemeProps<"Image">, "size"> & UseImageProps & ImageOptions;
/**

@@ -31,0 +33,0 @@ * `Image` is a component that displays images with fallback support.

@@ -90,3 +90,8 @@ "use client"

var Image2 = (0, import_core.forwardRef)((props, ref) => {
const [styles, { size: boxSize, ...mergedProps }] = (0, import_core.useComponentStyle)(
"Image",
props
);
let {
fit: objectFit,
fallback,

@@ -103,9 +108,10 @@ src,

referrerPolicy,
size: boxSize,
fit: objectFit,
...rest
} = props;
} = (0, import_core.omitThemeProps)(mergedProps);
ignoreFallback = loading != null || ignoreFallback || !fallback;
const css = (0, import_react2.useMemo)(
() => ({ ...styles, boxSize, objectFit }),
[styles, boxSize, objectFit]
);
const status = useImage({ ...props, ignoreFallback });
const css = (0, import_react2.useMemo)(() => ({ boxSize, objectFit }), [boxSize, objectFit]);
const isFallbackImage = shouldShowFallbackImage(status, fallbackStrategy);

@@ -112,0 +118,0 @@ if (isFallbackImage) {

@@ -93,3 +93,8 @@ "use client"

var Image2 = (0, import_core.forwardRef)((props, ref) => {
const [styles, { size: boxSize, ...mergedProps }] = (0, import_core.useComponentStyle)(
"Image",
props
);
let {
fit: objectFit,
fallback,

@@ -106,9 +111,10 @@ src,

referrerPolicy,
size: boxSize,
fit: objectFit,
...rest
} = props;
} = (0, import_core.omitThemeProps)(mergedProps);
ignoreFallback = loading != null || ignoreFallback || !fallback;
const css = (0, import_react2.useMemo)(
() => ({ ...styles, boxSize, objectFit }),
[styles, boxSize, objectFit]
);
const status = useImage({ ...props, ignoreFallback });
const css = (0, import_react2.useMemo)(() => ({ boxSize, objectFit }), [boxSize, objectFit]);
const isFallbackImage = shouldShowFallbackImage(status, fallbackStrategy);

@@ -115,0 +121,0 @@ if (isFallbackImage) {

{
"name": "@yamada-ui/image",
"version": "1.0.33",
"version": "1.1.0-dev-20240723153523",
"description": "Yamada UI media and image component",

@@ -5,0 +5,0 @@ "keywords": [

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc