
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
@neodrag/core
Advanced tools
The foundational drag functionality through a plugin-based architecture.
npm install @neodrag/core@next
Basic usage
import { DraggableFactory, DEFAULTS } from '@neodrag/core';
import { axis, grid } from '@neodrag/core/plugins';
const factory = new DraggableFactory(DEFAULTS);
// Create draggable with plugins
const dragInstance = factory.draggable(element, [axis('x'), grid([10, 10])]);
// Clean up when done
dragInstance.destroy();
With compartments for reactivity
import { Compartment } from '@neodrag/core';
const axisCompartment = new Compartment(() => axis('x'));
const dragInstance = factory.draggable(element, [axisCompartment.current, grid([10, 10])]);
// Update axis dynamically
axisCompartment.current = () => axis('y');
Error handling
const factory = new DraggableFactory({
...DEFAULTS,
onError: (error) => {
console.error(`Error in ${error.phase} phase:`, error.error);
if (error.plugin) {
console.error(`Plugin: ${error.plugin.name}, Hook: ${error.plugin.hook}`);
}
},
});
Available plugins
import {
axis,
bounds,
BoundsFrom,
grid,
events,
controls,
ControlFrom,
disabled,
threshold,
touchAction,
transform,
} from '@neodrag/core/plugins';
const plugins = [
axis('x'),
bounds(BoundsFrom.viewport()),
grid([20, 20]),
events({
start: (ctx) => console.log('Drag started'),
drag: (ctx) => console.log('Dragging'),
end: (ctx) => console.log('Drag ended'),
}),
];
This core powers all framework-specific packages:
// Svelte
import { draggable, axis } from '@neodrag/svelte';
// React
import { useDraggable, axis } from '@neodrag/react';
// Vue
import { vDraggable, axis } from '@neodrag/vue';
// Solid
import { useDraggable, axis } from '@neodrag/solid';
// Vanilla
import { Draggable, axis } from '@neodrag/vanilla';
MIT License © Puru Vijay
FAQs
Unknown package
The npm package @neodrag/core receives a total of 315,167 weekly downloads. As such, @neodrag/core popularity was classified as popular.
We found that @neodrag/core 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.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.