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

@formkit/drag-and-drop

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formkit/drag-and-drop - npm Package Compare versions

Comparing version 0.0.36 to 0.0.37

49

index.d.ts

@@ -134,2 +134,16 @@ /**

/**
* The scroll behavior of the parent.
*
* If a parent of the dragged element is scrollable, the parent will scroll on its x and y axis.
*
* I.e. Setting x: 0.9 will begin scrolling the parent when the dragged element is 90% horizontally.
*
* Scroll Outside determines whether or not the parent will scroll when the dragged element is outside of the parent.
*/
scrollBehavior: {
x: number;
y: number;
scrollOutside?: boolean;
};
/**
* Flag for whether or not to allow sorting within a given parent.

@@ -455,10 +469,2 @@ */

/**
* The parent that is scrollable.
*/
scrollParent: HTMLElement | undefined;
/**
* The overflow of the scroll parent.
*/
scrollParentOverflow: string | undefined;
/**
* A flag to indicate whether a long touch has occurred.

@@ -519,2 +525,9 @@ */

/**
* The coordinates of the dragged element itself.
*/
coordinates: {
x: number;
y: number;
};
/**
* The node that is being dragged.

@@ -565,2 +578,6 @@ */

/**
* The nearest parent that is scrollable.
*/
scrollParent: HTMLElement;
/**
* The value of the node that was swapped with the dragged node.

@@ -575,2 +592,6 @@ */

interface DragStateProps<T> {
coordinates: {
x: number;
y: number;
};
draggedNode: NodeRecord<T>;

@@ -581,4 +602,9 @@ draggedNodes: Array<NodeRecord<T>>;

lastParent: ParentRecord<T>;
scrollParent: HTMLElement;
}
interface TouchStateProps {
coordinates: {
x: number;
y: number;
};
touchedNode: HTMLElement;

@@ -588,2 +614,3 @@ touchStartLeft: number;

touchMoving: boolean;
scrollParent: HTMLElement;
}

@@ -607,3 +634,3 @@

*/
declare function getScrollParent(node: HTMLElement | null): HTMLElement | undefined;
declare function getScrollParent(childNode: HTMLElement): HTMLElement;
/**

@@ -738,3 +765,3 @@ * Used for setting a single event listener on x number of events for a given

declare function setTouchState<T>(dragState: DragState<T>, touchStateProps: TouchStateProps): TouchState<T>;
declare function dragStateProps<T>(targetData: NodeTargetData<T>): DragStateProps<T>;
declare function dragStateProps<T>(data: NodeDragEventData<T> | NodeTouchEventData<T>): DragStateProps<T>;
declare function performSort<T>(state: DragState<T> | TouchState<T>, data: NodeDragEventData<T> | NodeTouchEventData<T>): void;

@@ -786,3 +813,3 @@ declare function parentValues<T>(parent: HTMLElement, parentData: ParentData<T>): Array<T>;

declare function handleDragoverNode<T>(data: NodeDragEventData<T>): void;
declare function handleDragoverParent<T>(eventData: ParentEventData<T>): void;
declare function handleDragoverParent<T>(data: ParentEventData<T>): void;
declare function handleTouchOverParent<T>(e: TouchOverParentEvent<T>): void;

@@ -789,0 +816,0 @@ declare function validateTransfer<T>(data: ParentEventData<T>, state: DragState<T> | TouchState<T>): boolean;

{
"name": "@formkit/drag-and-drop",
"version": "0.0.36",
"version": "0.0.37",
"description": "Drag and drop package.",

@@ -5,0 +5,0 @@ "main": "./index.cjs",

@@ -115,2 +115,16 @@ import { RefObject, Dispatch, SetStateAction } from 'react';

/**
* The scroll behavior of the parent.
*
* If a parent of the dragged element is scrollable, the parent will scroll on its x and y axis.
*
* I.e. Setting x: 0.9 will begin scrolling the parent when the dragged element is 90% horizontally.
*
* Scroll Outside determines whether or not the parent will scroll when the dragged element is outside of the parent.
*/
scrollBehavior: {
x: number;
y: number;
scrollOutside?: boolean;
};
/**
* Flag for whether or not to allow sorting within a given parent.

@@ -385,10 +399,2 @@ */

/**
* The parent that is scrollable.
*/
scrollParent: HTMLElement | undefined;
/**
* The overflow of the scroll parent.
*/
scrollParentOverflow: string | undefined;
/**
* A flag to indicate whether a long touch has occurred.

@@ -449,2 +455,9 @@ */

/**
* The coordinates of the dragged element itself.
*/
coordinates: {
x: number;
y: number;
};
/**
* The node that is being dragged.

@@ -495,2 +508,6 @@ */

/**
* The nearest parent that is scrollable.
*/
scrollParent: HTMLElement;
/**
* The value of the node that was swapped with the dragged node.

@@ -505,2 +522,6 @@ */

interface DragStateProps<T> {
coordinates: {
x: number;
y: number;
};
draggedNode: NodeRecord<T>;

@@ -511,2 +532,3 @@ draggedNodes: Array<NodeRecord<T>>;

lastParent: ParentRecord<T>;
scrollParent: HTMLElement;
}

@@ -513,0 +535,0 @@

@@ -116,2 +116,16 @@ import { Ref } from 'vue';

/**
* The scroll behavior of the parent.
*
* If a parent of the dragged element is scrollable, the parent will scroll on its x and y axis.
*
* I.e. Setting x: 0.9 will begin scrolling the parent when the dragged element is 90% horizontally.
*
* Scroll Outside determines whether or not the parent will scroll when the dragged element is outside of the parent.
*/
scrollBehavior: {
x: number;
y: number;
scrollOutside?: boolean;
};
/**
* Flag for whether or not to allow sorting within a given parent.

@@ -386,10 +400,2 @@ */

/**
* The parent that is scrollable.
*/
scrollParent: HTMLElement | undefined;
/**
* The overflow of the scroll parent.
*/
scrollParentOverflow: string | undefined;
/**
* A flag to indicate whether a long touch has occurred.

@@ -450,2 +456,9 @@ */

/**
* The coordinates of the dragged element itself.
*/
coordinates: {
x: number;
y: number;
};
/**
* The node that is being dragged.

@@ -496,2 +509,6 @@ */

/**
* The nearest parent that is scrollable.
*/
scrollParent: HTMLElement;
/**
* The value of the node that was swapped with the dragged node.

@@ -506,2 +523,6 @@ */

interface DragStateProps<T> {
coordinates: {
x: number;
y: number;
};
draggedNode: NodeRecord<T>;

@@ -512,2 +533,3 @@ draggedNodes: Array<NodeRecord<T>>;

lastParent: ParentRecord<T>;
scrollParent: HTMLElement;
}

@@ -514,0 +536,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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