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

@nosferatu500/react-dnd-scrollzone

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nosferatu500/react-dnd-scrollzone - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

9

esm/index.d.ts

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

/// <reference types="react" />
import hoist from 'hoist-non-react-statics';

@@ -13,8 +12,8 @@ export declare type Point = {

};
export declare const createHorizontalStrength: (_buffer: number) => ({ x, w, y, h, }: Size, point: Point) => number;
export declare const createVerticalStrength: (_buffer: number) => ({ y, h, x, w, }: Size, point: Point) => number;
export declare const defaultHorizontalStrength: ({ x, w, y, h, }: Size, point: Point) => number;
export declare const defaultVerticalStrength: ({ y, h, x, w, }: Size, point: Point) => number;
export declare const createHorizontalStrength: (_buffer: number) => ({ x, w, y, h }: Size, point: Point) => number;
export declare const createVerticalStrength: (_buffer: number) => ({ y, h, x, w }: Size, point: Point) => number;
export declare const defaultHorizontalStrength: ({ x, w, y, h }: Size, point: Point) => number;
export declare const defaultVerticalStrength: ({ y, h, x, w }: Size, point: Point) => number;
export declare const createScrollingComponent: (WrappedComponent: any) => ((props: any) => JSX.Element) & hoist.NonReactStatics<any, {}>;
declare const createScrollingComponentWithConsumer: (WrappedComponent: any) => (props: any) => JSX.Element;
export default createScrollingComponentWithConsumer;

@@ -42,3 +42,6 @@ import React, { createRef, useEffect } from 'react';

if (evt.type === "touchmove") {
return { x: evt.changedTouches[0].clientX, y: evt.changedTouches[0].clientY };
return {
x: evt.changedTouches[0].clientX,
y: evt.changedTouches[0].clientY
};
}

@@ -48,8 +51,3 @@ return { x: evt.clientX, y: evt.clientY };

const DEFAULT_BUFFER = 150;
const createHorizontalStrength = (_buffer) => ({
x,
w,
y,
h
}, point) => {
const createHorizontalStrength = (_buffer) => ({ x, w, y, h }, point) => {
const buffer = Math.min(w / 2, _buffer);

@@ -68,8 +66,3 @@ const inRange = point.x >= x && point.x <= x + w;

};
const createVerticalStrength = (_buffer) => ({
y,
h,
x,
w
}, point) => {
const createVerticalStrength = (_buffer) => ({ y, h, x, w }, point) => {
const buffer = Math.min(h / 2, _buffer);

@@ -76,0 +69,0 @@ const inRange = point.y >= y && point.y <= y + h;

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

/// <reference types="react" />
import hoist from 'hoist-non-react-statics';

@@ -13,8 +12,8 @@ export declare type Point = {

};
export declare const createHorizontalStrength: (_buffer: number) => ({ x, w, y, h, }: Size, point: Point) => number;
export declare const createVerticalStrength: (_buffer: number) => ({ y, h, x, w, }: Size, point: Point) => number;
export declare const defaultHorizontalStrength: ({ x, w, y, h, }: Size, point: Point) => number;
export declare const defaultVerticalStrength: ({ y, h, x, w, }: Size, point: Point) => number;
export declare const createHorizontalStrength: (_buffer: number) => ({ x, w, y, h }: Size, point: Point) => number;
export declare const createVerticalStrength: (_buffer: number) => ({ y, h, x, w }: Size, point: Point) => number;
export declare const defaultHorizontalStrength: ({ x, w, y, h }: Size, point: Point) => number;
export declare const defaultVerticalStrength: ({ y, h, x, w }: Size, point: Point) => number;
export declare const createScrollingComponent: (WrappedComponent: any) => ((props: any) => JSX.Element) & hoist.NonReactStatics<any, {}>;
declare const createScrollingComponentWithConsumer: (WrappedComponent: any) => (props: any) => JSX.Element;
export default createScrollingComponentWithConsumer;
{
"name": "@nosferatu500/react-dnd-scrollzone",
"version": "2.0.0",
"version": "2.0.1",
"description": "A cross browser solution to scrolling during drag and drop.",
"main": "./index.js",
"module": "./esm/index.js",
"types": "./index.d.ts",
"exports": {
"./package.json": "./package.json",
"./": "./",
".": {
"types": "./index.d.ts",
"module": "./esm/index.js",
"import": "./esm/index.js",
"import": "./esm/index.mjs",
"default": "./index.js"

@@ -16,0 +14,0 @@ }

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