Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@dnd-kit/utilities
Advanced tools
The @dnd-kit/utilities package provides a set of utility functions and types that are designed to be used with the @dnd-kit/core package for building drag and drop interfaces. These utilities help with common tasks such as managing keyboard events, coordinates, and other drag and drop related calculations.
Coordinates
Utilities for managing coordinates, such as calculating relative positions for drag and drop elements.
{"getRelativeTransform": (x, y) => `translate3d(${x}px, ${y}px, 0)`}
Keyboard Coordinates
Functions to handle keyboard events and convert them into coordinates for keyboard accessible drag and drop functionality.
{"keyboardCoordinates": (event) => ({x: event.clientX, y: event.clientY})}
Distance Measurement
Functions to measure the distance between two points, useful for determining drag thresholds and more.
{"distance": (x1, y1, x2, y2) => Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2))}
React DnD is a set of React utilities to help you build complex drag and drop interfaces while keeping your components decoupled. It provides more comprehensive drag and drop context and handlers compared to @dnd-kit/utilities, which is more focused on utility functions.
A higher-level abstraction specifically built for vertical and horizontal lists. Unlike @dnd-kit/utilities, which provides low-level utilities, react-beautiful-dnd offers a more opinionated solution with a focus on list reordering.
SortableJS is a minimalist JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices. It does not require a framework and has more out-of-the-box functionality for list reordering compared to the utility-centric approach of @dnd-kit/utilities.
FAQs
Internal utilities to bee shared between `@dnd-kit` packages
The npm package @dnd-kit/utilities receives a total of 1,539,781 weekly downloads. As such, @dnd-kit/utilities popularity was classified as popular.
We found that @dnd-kit/utilities 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.