Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sortable-dnd

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sortable-dnd - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

dist/sortable-dnd.js

4

package.json
{
"name": "sortable-dnd",
"version": "0.5.0",
"version": "0.5.1",
"description": "JS library for drag-and-drop lists, supports sortable and draggable",
"main": "dist/index.js",
"main": "dist/sortable-dnd.min.js",
"types": "types/index.d.ts",

@@ -7,0 +7,0 @@ "files": [

@@ -1,2 +0,16 @@

type Group = {
type SortableState = {
sortable: Sortable;
group: HTMLElement;
node: HTMLElement;
offset: DOMOffset;
rect: DOMRect;
};
type MultiNode = {
node: HTMLElement;
offset: DOMOffset;
rect: DOMRect;
};
export type Group = {
name: String;

@@ -7,3 +21,3 @@ put: Boolean;

type DOMOffset = {
export type DOMOffset = {
height: Number;

@@ -15,3 +29,3 @@ width: Number;

type DOMRect = DOMOffset & {
export type DOMRect = DOMOffset & {
bottom: Number;

@@ -21,23 +35,9 @@ right: Number;

type SortableState = {
sortable: Sortable;
group: HTMLElement;
node: HTMLElement;
offset: DOMOffset;
rect: DOMRect;
};
export type EventType = Event & (TouchEvent | MouseEvent);
type MultiNode = {
node: HTMLElement;
offset: DOMOffset;
rect: DOMRect;
};
export type FromTo = SortableState & { nodes?: MultiNode[] };
type EventType = Event & (PointerEvent | TouchEvent | MouseEvent);
export type Select = SortableState & { event: EventType };
type FromTo = SortableState & { nodes?: MultiNode[] };
type Select = SortableState & { event: EventType };
type Options = {
export type Options = {
/**

@@ -88,7 +88,3 @@ * Specifies which items inside the element should be draggable.

*/
onDrag?: (params: {
from: FromTo;
to: FromTo;
event: EventType;
}) => void;
onDrag?: (params: { from: FromTo; to: FromTo; event: EventType }) => void;

@@ -98,7 +94,3 @@ /**

*/
onMove?: (params: {
from: FromTo;
to: FromTo;
event: EventType;
}) => void;
onMove?: (params: { from: FromTo; to: FromTo; event: EventType }) => void;

@@ -118,7 +110,3 @@ /**

*/
onAdd?: (params: {
from: FromTo;
to: FromTo;
event: EventType;
}) => void;
onAdd?: (params: { from: FromTo; to: FromTo; event: EventType }) => void;

@@ -128,7 +116,3 @@ /**

*/
onRemove?: (params: {
from: FromTo;
to: FromTo;
event: EventType;
}) => void;
onRemove?: (params: { from: FromTo; to: FromTo; event: EventType }) => void;

@@ -138,7 +122,3 @@ /**

*/
onChange?: (params: {
from: FromTo;
to: FromTo;
event: EventType;
}) => void;
onChange?: (params: { from: FromTo; to: FromTo; event: EventType }) => void;

@@ -233,4 +213,24 @@ /**

destroy(): void;
};
/**
* Get/Set sortable options.
* @param key option name
* @param value option value
*/
option(key: string, value: any): any;
/**
* Get the Sortable instance of an element
* @param el
*/
get(el: HTMLElement): Sortable | undefined;
/**
* Create sortable instance
* @param el
* @param options
*/
create(el: HTMLElement, options: Options): void;
}
export = Sortable;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc