Scan your whole stack
From OX Research Newsroom
Are you using @mmstack/dnd?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v21.8.0
@mmstack/dnd was last scanned on 29 Nov 2026 at version 21.8.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 21.8.0 LATEST | 29 Nov 2026 | No rules fired |
| 22.8.0 | 29 Nov 2026 | No rules fired |
| 22.7.0 | 18 Oct 2026 | No rules fired |
| 21.7.0 | 18 Oct 2026 | Not shown |
| 22.6.2 | 7 Oct 2026 | Not shown |
Findings for v21.8.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 21.8.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Signals-first drag & drop for Angular. Make any element draggable or a drop target with a typed payload, read every bit of drag state as a Signal, and build reorderable lists — single or cross-list — on the same primitives. Choose the engine per element: native HTML5 (files, cross-window, a drop-indicator line) or a first-party pointer / FLIP engine (siblings glide to open a gap, no browser drag image). Accessible by default, tree-shakeable, and it works with zero configuration.
Built on @atlaskit/pragmatic-drag-and-drop (v4) for the native engine; the pointer engine, sortable/FLIP, keyboard a11y, and the optional plugins are all first-party.
dragging, isDragOver, closestEdge, …) is a computed off a single ambient session — no per-element writable signals, no callbacks writing into state, no effects copying signals. The core path has no recurring effects.native uses HTML5 DnD (files, cross-window, the browser's drag image); pointer uses pointer events with FLIP (buttery same-page sorting, custom followers). Both feed the same session, so monitor, dragging, and isDragOver behave identically. Pick per element or set a default once.WritableSignal<T[]> at drop — no parallel order state, the array untouched mid-drag. The pointer engine animates from derived state (FLIP) instead of mutating the DOM.sortableGroup<T>() and items drag between lists; innermost wins for nested lists, with a canReceive guard.announceTransform.@mmstack/dnd/plugins, or plug in pragmatic's sub-libraries. Missing a plugin degrades gracefully (dev warning + no-op), never a throw.accepts narrows payloads with no casting; a symbol-keyed meta channel never collides with your data; engine-only options are compile-time-guarded per engine.axis: 'wrap'), a controlled spanning grid (placementGrid, the dashboard / form-builder model) and a free-form canvas (canvas: move, resize, rotate, marquee, snaplines, pan/zoom, containment). All of them write your state signal exactly once per gesture, which makes them a natural fit for op-log stores and undo history; grid and canvas moves commit as per-property ops, the collaboration-friendly shape.driveGesture), the geometry hit-testing helpers, & more, so you can assemble a bespoke interaction on the same reactive session. These stay out of the docs to keep the surface small, but they are typed and discoverable from the barrel.npm install @mmstack/dnd @atlaskit/pragmatic-drag-and-drop
@atlaskit/pragmatic-drag-and-drop is a peer dependency (it powers the native engine and the shared global monitor). The sub-libraries below are optional peers (marked optional in peerDependenciesMeta, so nothing installs them for you) — reach for them only if you prefer them over the first-party plugins (see Plugins):
npm install @atlaskit/pragmatic-drag-and-drop-hitbox # edge detection
npm install @atlaskit/pragmatic-drag-and-drop-auto-scroll # auto-scroll
npm install @atlaskit/pragmatic-drag-and-drop-flourish # post-move flash
The sub-libraries list the core package as a regular dependency rather than a peer. If the versions you install disagree on a core major, your package manager nests a second copy of the core under the sub-library. The two copies share no state, so auto-scroll registered through the nested copy never sees your drags. Install the core and the sub-libraries within the ranges this package declares as peers and you get a single copy.
Drag cards between two columns. draggable carries the typed payload, dropTarget narrows it with accepts and exposes isDragOver, and the drop updates your own signal. No plugins required.
import { Component, signal } from '@angular/core';
import { Draggable, DropTarget } from '@mmstack/dnd';
type Column = 'todo' | 'done';
type Card = { id: number; title: string };
const isCard = (d: unknown): d is Card =>
!!d && typeof d === 'object' && 'id' in d;
@Component({
selector: 'app-board',
imports: [Draggable, DropTarget],
template: `
@for (col of columns; track col) {
<section
mmDropTarget
#zone="mmDropTarget"
[accepts]="isCard"
[class.over]="zone.isDragOver()"
(dropped)="move(col, $event.data)"
>
<h3>{{ col }}</h3>
@for (card of board()[col]; track card.id) {
<article
mmDraggable
#d="mmDraggable"
[data]="card"
[class.dragging]="d.dragging()"
>
{{ card.title }}
</article>
}
</section>
}
`,
styles: `
:host {
display: flex;
gap: 1rem;
font-family: system-ui, sans-serif;
}
section {
flex: 1;
min-height: 120px;
padding: 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 8px;
}
section.over {
border-color: #2563eb;
background: #eff6ff;
}
h3 {
margin: 0 0 0.5rem;
text-transform: capitalize;
}
article {
margin-bottom: 0.5rem;
padding: 0.5rem 0.75rem;
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 6px;
cursor: grab;
user-select: none;
}
article.dragging {
opacity: 0.4;
}
`,
})
export class BoardComponent {
protected readonly isCard = isCard;
protected readonly columns: Column[] = ['todo', 'done'];
protected readonly board = signal<Record<Column, Card[]>>({
todo: [
{ id: 1, title: 'Design' },
{ id: 2, title: 'Build' },
],
done: [{ id: 3, title: 'Kickoff' }],
});
protected move(to: Column, card: Card): void {
this.board.update((b) => {
const next: Record<Column, Card[]> = {
todo: b.todo.filter((c) => c.id !== card.id),
done: b.done.filter((c) => c.id !== card.id),
};
next[to] = [...next[to], card];
return next;
});
}
}
$event.data is typed Card because accepts narrows it. Add the hitbox plugin when you want edge-aware drops (insert before or after a target).
draggable<TData, TMeta>(opts) / Draggable: make an element draggable with a typed payload and optional metadata.dropTarget<TAccept, TSelf, TMeta>(opts) / DropTarget: make an element a drop target with a type-narrowing accepts, optional edge detection, and derived state.monitor<TAccept, TMeta>(opts): global drag-state observer (derived; callbacks optional).fileDropTarget(opts) / monitorExternal(opts): accept files dragged in from the OS (the external adapter).reorderable(signal, opts) / injectReorderable(signal, opts) + Reorderable / ReorderableItem (/ ReorderableHandle): a sortable list over your own WritableSignal<T[]>. See Sortable lists.sortableGroup<T>(): share one group object across lists so items drag between them; DropIndicator: the native engine's insertion line.DragHandle (mmDragHandle): restrict drag initiation to a child element.autoScroll(opts) / mmAutoScroll: edge auto-scroll (needs an auto-scroll plugin).provideDnd(config): register optional plugins and scope a session.provideDndDefaults / provideDraggableDefaults / provideDropTargetDefaults / provideReorderableDefaults: set option defaults via DI. See Defaults.preview option on draggable().Both draggable and dropTarget take an engine?: 'native' | 'pointer' (default 'native'). Native uses HTML5 drag-and-drop (files, cross-window, the browser's drag image); pointer uses pointer events (continuous position, no native drag image — you move the element, e.g. FLIP). Both feed the same session, so dragging / isDragOver / monitor work identically regardless of engine.
Every composable is a function. Every directive is a thin wrapper that forwards inputs into the composable and exposes its signal state.
monitorForElements already broadcasts the full drag world on every move. A root DndSession captures it once into a signal, and everything per-element is a computed:
// inside dropTarget()
const isDragOver = computed(() => hitIndex() >= 0);
const closestEdge = computed(() => /* read from the session via the hitbox plugin */);
There are no per-element writable signals, no callbacks writing into signals, and no effects copying one signal into another. Pragmatic's config hooks (getInitialData, canDrop, getData) are read lazily, so registration happens once. A reactive dragHandle is the only thing that re-registers, and only when the handle element changes.
import { Component, signal } from '@angular/core';
import { draggable } from '@mmstack/dnd';
type Card = { id: string; title: string };
@Component({
selector: 'app-card',
template: `{{ card().title }}`,
host: { '[class.dragging]': 'dnd.dragging()' },
})
export class CardComponent {
readonly card = signal<Card>({ id: '1', title: 'Hello' });
protected readonly dnd = draggable<Card>({
data: this.card,
onDrop: ({ data, edge, location }) => {
console.log('dropped', data, 'edge', edge, 'onto', location.current);
},
});
}
Or the directive:
<div
mmDraggable
[data]="card()"
#d="mmDraggable"
[class.dragging]="d.dragging()"
(dropped)="onDrop($event)"
>
{{ card().title }}
</div>
accepts is a typeguard that narrows incoming payloads, so all events and signals are typed against TAccept with no casting.
import { dropTarget } from '@mmstack/dnd';
type Card = { id: string };
const isCard = (d: unknown): d is Card =>
!!d && typeof d === 'object' && 'id' in d;
protected readonly zone = dropTarget<Card>({
accepts: isCard,
onDrop: ({ data }) => this.cards.update((cs) => [...cs, data]),
});
// zone.isDragOver(), zone.isInnermost(), zone.dragOverData(), zone.closestEdge()
closestEdge and edges need the hitbox plugin (see Plugins); without it, drops still work — you just get no edge (closestEdge() stays null), plus a one-time dev warning. dropTarget also supports sticky (stay the active target after the pointer leaves) and dropEffect ('move' | 'copy' | 'link'), both pragmatic element-adapter features.
Both draggable and dropTarget accept engine: 'pointer' to drive via pointer events instead of native HTML5 DnD (see Sortable lists for the engine trade-offs). In pointer mode draggable moves the element itself (there's no browser drag image), so preview renders a floating follower; native preview uses the browser's custom drag preview. The engine is resolved at creation. Edge detection (edges / hitbox) works on either engine, since the hitbox is pure geometry over the pointer position; sticky / dropEffect are native-only and compile-time-forbidden when engine: 'pointer', and conversely activationThreshold (px before the drag activates, default 5) and touchActivation (see Touch) are pointer-only.
Accept files dragged from outside the browser (pragmatic's external adapter):
import { fileDropTarget } from '@mmstack/dnd';
protected readonly drop = fileDropTarget({
onDrop: ({ files }) => this.upload(files), // files: File[]
// canDrop: ({ types }) => ..., disabled, sticky, dropEffect
});
// drop.isDragOver(), drop.isInnermost()
monitorExternal({ onDrop }) observes external drags globally. An element can be both an element target and a file target: apply both composables.
protected readonly monitor = monitor<Card>({ accepts: isCard });
// monitor.isDragging(), monitor.source()
isDragging and source are pure derivations of the ambient session. Pass onDragStart or onDrop to also attach a thin subscription for side effects.
reorderable)reorderable turns your own WritableSignal<T[]> into a sortable list. Reordering is a single splice on your signal at drop — there's no parallel order state, and the array is untouched mid-drag. Bind the returned controller to the mmReorderable container + mmReorderableItem directives:
import { Component, signal } from '@angular/core';
import { Reorderable, ReorderableItem, reorderable } from '@mmstack/dnd';
type Task = { id: number; label: string };
@Component({
selector: 'app-list',
imports: [Reorderable, ReorderableItem],
template: `
<ul [mmReorderable]="list">
@for (task of list.items(); track task.id) {
<li [mmReorderableItem]="task">{{ task.label }}</li>
}
</ul>
`,
})
export class ListComponent {
private readonly tasks = signal<Task[]>([
{ id: 1, label: 'One' },
{ id: 2, label: 'Two' },
{ id: 3, label: 'Three' },
]);
protected readonly list = reorderable(this.tasks, { key: (t) => t.id });
}
reorderablevsinjectReorderable.reorderableis a pure factory (no DI — great for tests). UseinjectReorderable(same signature, called from an injection context) when you want the list to pick up DI option defaults — it captures the currentInjectorand hands it toreorderablefor you.
Keyboard reordering is on by default: focus a row, then arrow keys move it one step (axis-aware), and Cmd/Ctrl + arrow jumps to an end — announced via injectAnnounce, and the moved row is kept focused and scrolled into view. Every piece is opt-out or replaceable:
reorderable(this.items, {
key: (t) => t.id,
keyboard: false, // ← disable keys entirely (no tabindex, no handler)
announceMove: false, // ← silence announcements (no live region is created)
jumpModifier: (e) => e.shiftKey, // ← Shift instead of Cmd/Ctrl for the built-in jump
// …or take over keydown completely (custom keys / behaviour). `api.move(to)`
// reuses the built-in commit + announce + focus-restore; ignore it to do your own thing.
onKeyboardKeydown: (e, { index, total, move }) => {
if (e.key === 'j') {
e.preventDefault();
move(Math.min(index + 1, total - 1));
}
if (e.key === 'k') {
e.preventDefault();
move(Math.max(index - 1, 0));
}
},
});
native (indicator) vs pointer (FLIP)Same API, two render/drag models, chosen with engine (default 'native'):
'native' — HTML5 drag-and-drop. Items stay put and a DropIndicator line shows where the drop will land. Composes with file / cross-window drags.'pointer' — pointer events. Siblings glide (FLIP) to open a gap and the dragged element follows the pointer; the "gap" placeholder feel. In-page only.reorderable(this.tasks, { key: (t) => t.id }); // native indicator (default)
reorderable(this.tasks, { key: (t) => t.id, engine: 'pointer' }); // FLIP glide Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.