Socket
Book a DemoInstallSign in
Socket

rescript-dnd

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rescript-dnd - npm Package Compare versions

Comparing version

to
7.0.0

33

package.json
{
"name": "rescript-dnd",
"version": "6.0.0",
"version": "7.0.0",
"description": "Drag-n-drop for @rescript/react",

@@ -12,9 +12,9 @@ "author": "Alex Fedoseev <alex@35mil.me>",

"prebuild": "yarn run res:build",
"res:build": "RES_LOG=off rescript build -with-deps",
"res:build:dev": "RES_LOG=*,rescript-dnd=* rescript build -with-deps",
"res:watch": "RES_LOG=*,rescript-dnd=* rescript build -with-deps -w",
"res:build": "RES_LOG=off rescript build",
"res:build:dev": "RES_LOG=*,rescript-dnd=* rescript build",
"res:watch": "RES_LOG=*,rescript-dnd=* rescript build -w",
"res:clean": "rescript clean",
"clean": "rm -rf dist && yarn run res:clean",
"test": "exit 0",
"format": "rescript format -all",
"format": "rescript format",
"deploy": "vercel deploy dist --prod",

@@ -48,20 +48,23 @@ "predeploy": "yarn run build"

"peerDependencies": {
"@rescript/react": ">=0.12.0",
"@rescript/core": ">=1.6.0",
"@rescript/react": ">=0.14.0",
"react": ">=18.0.0",
"react-dom": ">=18.0.0",
"rescript": ">=11.0.0",
"rescript": ">=11.1.0",
"rescript-webapi": ">=0.6.0"
},
"devDependencies": {
"@rescript/react": "0.12.1",
"autoprefixer": "10.4.17",
"parcel": "2.11.0",
"postcss": "8.4.35",
"@rescript/core": "1.6.1",
"@rescript/react": "0.14.0",
"autoprefixer": "10.4.21",
"parcel": "2.15.4",
"postcss": "8.5.6",
"process": "^0.11.10",
"react": "18.2.0",
"react-dom": "18.2.0",
"rescript": "11.0.1",
"rescript-classnames": "7.0.0",
"rescript-webapi": "0.9.1"
}
"rescript": "11.1.4",
"rescript-classnames": "7.0.1",
"rescript-webapi": "0.10.0"
},
"packageManager": "yarn@1.22.15+sha512.033a040f18f6e7a04e4bf8ea0d7037a63ca19a2e054410543206284c7238108b7612144492f1f4b283d512d9c3f8340825f53947d6ca85c6751fd97cccf59ea0"
}

@@ -15,2 +15,3 @@ {

"bs-dependencies": [
"@rescript/core",
"@rescript/react",

@@ -36,3 +37,3 @@ "rescript-webapi",

"package-specs": {
"module": "es6",
"module": "esmodule",
"in-source": true

@@ -39,0 +40,0 @@ },

@@ -13,3 +13,2 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

import * as JsxRuntime from "react/jsx-runtime";
import * as Browser$ReScriptLogger from "rescript-logger/src/loggers/Browser.res.js";

@@ -41,17 +40,2 @@ function Make(Context) {

}
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__DraggableItem",
subModulePath: {
hd: "Make",
tl: {
hd: "MouseInteractions",
tl: /* [] */0
}
},
value: "onMouseDown",
fullPath: "Dnd__DraggableItem.Make.MouseInteractions.onMouseDown"
}, "MouseDown", [
"ItemId",
itemId
]);
var start_page = {

@@ -85,17 +69,2 @@ x: $$event.pageX,

if (moved) {
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__DraggableItem",
subModulePath: {
hd: "Make",
tl: {
hd: "MouseInteractions",
tl: /* [] */0
}
},
value: "onMouseDown",
fullPath: "Dnd__DraggableItem.Make.MouseInteractions.onMouseDown"
}, "MouseDown::Moved", [
"ItemId",
itemId
]);
dropInitialSubscriptions();

@@ -114,17 +83,2 @@ clearSelection();

var dropInitialSubscriptions = function () {
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__DraggableItem",
subModulePath: {
hd: "Make",
tl: {
hd: "MouseInteractions",
tl: /* [] */0
}
},
value: "onMouseDown",
fullPath: "Dnd__DraggableItem.Make.MouseInteractions.onMouseDown"
}, "DropInitialSubscriptions", [
"ItemId",
itemId
]);
Dnd__Events.unsubscribeFromMouseMove(onInitialMouseMove);

@@ -170,6 +124,6 @@ Dnd__Events.unsubscribeFromMouseUp(onInitialMouseUp);

};
var onInitialTouchEnd = function (param) {
var onInitialTouchMove = function (param) {
cancelDrag();
};
var onInitialTouchMove = function (param) {
var onInitialTouchEnd = function (param) {
cancelDrag();

@@ -227,14 +181,2 @@ };

}
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__DraggableItem",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "make",
fullPath: "Dnd__DraggableItem.Make.make"
}, "RegisterItem", [
"ItemId",
itemId
]);
ctx.registerItem({

@@ -241,0 +183,0 @@ id: itemId,

@@ -11,3 +11,2 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

import * as JsxRuntime from "react/jsx-runtime";
import * as Browser$ReScriptLogger from "rescript-logger/src/loggers/Browser.res.js";

@@ -73,14 +72,2 @@ function Make(Context) {

}
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__DroppableContainer",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "make",
fullPath: "Dnd__DroppableContainer.Make.make"
}, "RegisterItem", [
"ContainerId",
containerId
]);
ctx.registerContainer({

@@ -87,0 +74,0 @@ id: containerId,

@@ -10,3 +10,2 @@ // Generated by ReScript, PLEASE EDIT WITH CARE

import * as Dnd__ReactHooks from "./Dnd__ReactHooks.res.js";
import * as Browser$ReScriptLogger from "rescript-logger/src/loggers/Browser.res.js";

@@ -56,11 +55,2 @@ function smoothScrollBy(x, y) {

if (action === "RestorePrevious") {
Browser$ReScriptLogger.debug({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "RestorePrevious");
return {

@@ -73,112 +63,52 @@ TAG: "Update",

};
} else {
return {
TAG: "Update",
_0: {
current: Belt_Set.make(ComparableItem),
previous: state.current
}
};
}
Browser$ReScriptLogger.debug({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "Clear");
return {
TAG: "Update",
_0: {
current: Belt_Set.make(ComparableItem),
previous: state.current
}
};
} else {
switch (action.TAG) {
case "SelectOne" :
var id = action._0;
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
}
switch (action.TAG) {
case "SelectOne" :
var id = action._0;
return {
TAG: "UpdateWithSideEffects",
_0: {
current: Belt_Set.add(Belt_Set.make(ComparableItem), id),
previous: state.current
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "SelectOne with payload", [
"id",
id
]);
return {
TAG: "UpdateWithSideEffects",
_0: {
current: Belt_Set.add(Belt_Set.make(ComparableItem), id),
previous: state.current
},
_1: (function (param) {
Belt_Option.mapWithDefault(Belt_Map.get(refs.current, id), undefined, (function (param) {
return adjust(param, topMarginFactor, bottomMarginFactor);
}));
})
};
case "DeselectOne" :
var id$1 = action._0;
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "DeselectOne with payload", [
"id",
id$1
]);
return {
TAG: "Update",
_0: {
current: Belt_Set.remove(state.current, id$1),
previous: state.current
}
};
case "Concat" :
var items = action._0;
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "Concat with payload", [
"items",
items
]);
return {
TAG: "Update",
_0: {
current: Belt_Set.mergeMany(state.current, items),
previous: state.current
}
};
case "FromArray" :
var items$1 = action._0;
Browser$ReScriptLogger.debug1({
rootModule: "Dnd__SelectionManager",
subModulePath: {
hd: "Make",
tl: /* [] */0
},
value: "useSelection",
fullPath: "Dnd__SelectionManager.Make.useSelection"
}, "FromArray with payload", [
"items",
items$1
]);
return {
TAG: "Update",
_0: {
current: Belt_Set.fromArray(items$1, ComparableItem),
previous: state.current
}
};
}
_1: (function (param) {
Belt_Option.mapWithDefault(Belt_Map.get(refs.current, id), undefined, (function (none) {
return adjust(none, topMarginFactor, bottomMarginFactor);
}));
})
};
case "DeselectOne" :
return {
TAG: "Update",
_0: {
current: Belt_Set.remove(state.current, action._0),
previous: state.current
}
};
case "Concat" :
return {
TAG: "Update",
_0: {
current: Belt_Set.mergeMany(state.current, action._0),
previous: state.current
}
};
case "FromArray" :
return {
TAG: "Update",
_0: {
current: Belt_Set.fromArray(action._0, ComparableItem),
previous: state.current
}
};
}

@@ -185,0 +115,0 @@ }));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet