New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dnd-core

Package Overview
Dependencies
Maintainers
5
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnd-core - npm Package Compare versions

Comparing version 15.0.0 to 15.0.1

dist/cjs/actions/dragDrop/beginDrag.js

14

package.json
{
"name": "dnd-core",
"version": "15.0.0",
"version": "15.0.1",
"description": "Drag and drop sans the GUI",
"license": "MIT",
"type": "module",
"exports": "./lib/index.js",
"types": "./lib/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc -b . && swc src -d lib",
"clean": "shx rm -rf dist/ lib/"
"clean": "shx rm -rf dist/",
"build": "tsc -b tsconfig.cjs.json && tsc -b tsconfig.esm.json && tsc -b tsconfig.types.json"
},

@@ -24,4 +24,2 @@ "repository": {

"devDependencies": {
"@swc/cli": "^0.1.55",
"@swc/core": "^1.2.135",
"@types/setimmediate": "^1.0.2",

@@ -28,0 +26,0 @@ "react-dnd-test-backend": "portal:../backend-test",

@@ -46,3 +46,3 @@ import { invariant } from '@react-dnd/invariant'

const sourceId = getDraggableSource(sourceIds, monitor)
if (sourceId === null) {
if (sourceId == null) {
manager.dispatch(ResetCoordinatesAction)

@@ -49,0 +49,0 @@ return

@@ -50,3 +50,3 @@ import { invariant } from '@react-dnd/invariant'

for (let i = 0; i < targetIds.length; i++) {
const targetId = targetIds[i]
const targetId = targetIds[i] as string
invariant(

@@ -71,3 +71,3 @@ targetIds.lastIndexOf(targetId) === i,

for (let i = targetIds.length - 1; i >= 0; i--) {
const targetId = targetIds[i]
const targetId = targetIds[i] as string
const targetType = registry.getTargetType(targetId)

@@ -74,0 +74,0 @@ if (!matchesType(targetType, draggedItemType)) {

@@ -10,3 +10,4 @@ import type { DragDropManager, SentinelAction } from '../../interfaces'

}
return
}
}

@@ -9,3 +9,3 @@ import type { Store } from 'redux'

import { areDirty } from '../utils/dirtiness'
import { State } from '../reducers'
import type { State } from '../reducers'
import type {

@@ -31,3 +31,3 @@ DragDropMonitor,

listener: Listener,
options: { handlerIds: string[] | undefined } = { handlerIds: undefined },
options: { handlerIds?: string[] } = {},
): Unsubscribe {

@@ -34,0 +34,0 @@ const { handlerIds } = options

@@ -46,3 +46,3 @@ import type { Store } from 'redux'

default:
invariant(false, `Cannot parse handler ID: ${handlerId}`)
throw new Error(`Cannot parse handler ID: ${handlerId}`)
}

@@ -49,0 +49,0 @@ }

@@ -30,3 +30,3 @@ export type Identifier = string | symbol

options?: {
handlerIds: Identifier[] | undefined
handlerIds?: Identifier[]
},

@@ -136,3 +136,3 @@ ): Unsubscribe

clientOffset?: XYCoord
getSourceClientOffset?: (sourceId: Identifier) => XYCoord
getSourceClientOffset?: (sourceId: Identifier | undefined) => XYCoord
}

@@ -139,0 +139,0 @@

@@ -38,3 +38,3 @@ import type { XYCoord } from '../interfaces'

for (let i = 0; i < a.length; ++i) {
if (!isEqual(a[i], b[i])) {
if (!isEqual(a[i] as T, b[i] as T)) {
return false

@@ -41,0 +41,0 @@ }

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