Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-ronin

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ronin - npm Package Compare versions

Comparing version 2.0.3-image-component-experimental.5 to 2.0.3-image-component-experimental.6

13

dist/index.js

@@ -100,3 +100,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

const Image = ({ src: input, alt, size: defaultSize, width: defaultWidth, height: defaultHeight, quality, loading })=>{
const imageRef = react.useRef(null);
const imageElement = react.useRef(null);
const renderTime = react.useRef(Date.now());

@@ -130,3 +130,3 @@ const isMediaObject = typeof input === "object" && input !== null;

const placeholder = input && typeof input !== "string" ? input.placeholder?.base64 : null;
const onLoad = ()=>{
const onLoad = react.useCallback(()=>{
const duration = Date.now() - renderTime.current;

@@ -137,3 +137,3 @@ const threshold = 150;

if (duration > threshold) {
imageRef.current?.animate([
imageElement.current?.animate([
{

@@ -151,3 +151,6 @@ filter: "blur(4px)",

}
};
}, [
renderTime.current,
imageElement.current
]);
return /*#__PURE__*/ jsxRuntime.jsxs("div", {

@@ -182,3 +185,3 @@ style: {

loading: loading,
ref: imageRef,
ref: imageElement,
src: source,

@@ -185,0 +188,0 @@ srcSet: responsiveSource

{
"name": "react-ronin",
"version": "2.0.3-image-component-experimental.5",
"version": "2.0.3-image-component-experimental.6",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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