Socket
Socket
Sign inDemoInstall

react-reorder-list

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-reorder-list - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

15

dist/hooks.d.ts

@@ -1,9 +0,6 @@

export declare function useDraggable(initValue?: boolean): {
draggable: boolean;
draggableProps: {
onMouseEnter: () => void;
onMouseLeave: () => void;
onTouchStart: () => void;
onTouchEnd: () => void;
};
};
export declare function useDraggable(initValue?: boolean): readonly [boolean, {
onMouseEnter: () => void;
onMouseLeave: () => void;
onTouchStart: () => void;
onTouchEnd: () => void;
}];

2

dist/hooks.js

@@ -7,3 +7,3 @@ import { useState } from "react";

const draggableProps = { onMouseEnter: enableDragging, onMouseLeave: disableDragging, onTouchStart: enableDragging, onTouchEnd: disableDragging };
return { draggable, draggableProps };
return [draggable, draggableProps];
}

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

import React, { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react";
import React, { CSSProperties, DetailedHTMLProps, DragEventHandler, HTMLAttributes, ReactNode, TouchEventHandler } from "react";
export type Props = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;

@@ -21,4 +21,16 @@ export type PositionChangeHandler = (params?: {

};
export type DivDragEventHandler = DragEventHandler<HTMLDivElement>;
export type DivTouchEventHandler = TouchEventHandler<HTMLDivElement>;
export type ReorderItemProps = {
useOnlyIconToDrag: boolean;
style: CSSProperties;
onDragStart?: DivDragEventHandler;
onDragEnter: DivDragEventHandler;
onDragEnd: DivDragEventHandler;
onTouchMove: DivTouchEventHandler;
onTouchEnd: DivTouchEventHandler;
children: ReactNode;
};
export type { IconProps } from "./icons.js";
export default function ReorderList({ useOnlyIconToDrag, selectedItemOpacity, animationDuration, watchChildrenUpdates, preserveOrder, onPositionChange, disabled, props, children }: ReorderListProps): React.JSX.Element;
export declare function ReorderIcon({ children, style, ...props }: Props): React.JSX.Element;

@@ -111,3 +111,3 @@ var __rest = (this && this.__rest) || function (s, e) {

var { useOnlyIconToDrag, onTouchEnd: propOnTouchEnd, children } = _a, props = __rest(_a, ["useOnlyIconToDrag", "onTouchEnd", "children"]);
const _b = useDraggable(), { draggable } = _b, _c = _b.draggableProps, { onTouchEnd: draggableOnTouchEnd } = _c, draggableProps = __rest(_c, ["onTouchEnd"]);
const [draggable, _b] = useDraggable(), { onTouchEnd: draggableOnTouchEnd } = _b, draggableProps = __rest(_b, ["onTouchEnd"]);
if (!draggable)

@@ -114,0 +114,0 @@ props.onDragStart = undefined;

{
"name": "react-reorder-list",
"version": "0.6.5",
"version": "0.6.6",
"description": "A simple react component that facilitates the reordering of JSX/HTML elements through drag-and-drop functionality, allowing for easy position changes.",

@@ -29,3 +29,3 @@ "type": "module",

"peerDependencies": {
"react": ">=16.0.0"
"react": ">=17.0.0"
},

@@ -32,0 +32,0 @@ "devDependencies": {

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