Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
🎭 Library for seamless transition animations of images.
View demo page or the sample app from the gif on the right.
<img>
tag or element with background-image
object-fit
, background-size
: cover
, contain
and percentages), positioning background-position
, clip-path
, etc...npm install eivor
<script type="importmap">
{"imports": {"eivor": "./node_modules/eivor/src/ImageTransition.js"}}
</script>
ImageTransition
classsource
and target
can be <img>
tag or any html element with background-image
css property. Third and optional argument is an options
object.
import {ImageTransition} from 'eivor'
let transition = new ImageTransition(source, target, {duration: 1000})
await transition.play()
Optionally you can await transition.ready
Promise
if you need to wait for images to load.
let transition = new ImageTransition(source, target)
// Wait for source and target images to load. Calculating position delta hasn't yet begun.
await transition.ready
// Images are now loaded, here you can do something
await transition.play()
// animation is over, temporary files are removed from DOM, source and target have returned to their original positions, any additional CSS props are removed.
options
objectoptions.easing
: string
options.duration
: number
options.fill
: string
options.mode
: 'crop'|'recreate'|'clone'
automatically determined. Can be overriden with caution.
crop
: Crop, scale and translation are applied to the larger image. Only available if one image fits into the other.
recreate
: The larger image is temporarily resized in order to display the whole image uncropped. Then the target image is animated like crop
.
clone
: Like recreate
, but animation is applied to a clone of the target image while the original is hidden.The script is already mighty as is right now. But there are still some edge cases or nice to have things I'd like to implement.
*ContainedWithinTarget
allows it, or which url to use for clone node)sourceContainedWithinTarget
/ targetContainedWithinSource
and forcing use of clone instead of manipulating the image that covers more imge space. (maybe it should be just an option defaulting to false)MIT, Mike Kovařík, Mutiny.cz
FAQs
🎭 Library for seamless transition animations of images.
The npm package eivor receives a total of 0 weekly downloads. As such, eivor popularity was classified as not popular.
We found that eivor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.