Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@dnd-kit/utilities
Advanced tools
Internal utilities to bee shared between `@dnd-kit` packages
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
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.