Comparing version 15.0.0 to 15.0.1
{ | ||
"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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5
118
4147
0
145543
No