diff --git a/.travis.yml b/.travis.yml index c4cd216..996967a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,3 @@ install: script: - npx bower install - npm -s test - -# after_success: -# - >- -# test $TRAVIS_TAG && -# echo $GITHUB_TOKEN | pulp login && -# echo y | pulp publish --no-push diff --git a/README.md b/README.md index 75c65a2..87aa592 100644 --- a/README.md +++ b/README.md @@ -116,5 +116,5 @@ moveItem fromIndex toIndex items = in take toIndex items' <> maybe [] pure item -<> drop toIndex items' + <> drop toIndex items' ``` diff --git a/bower.json b/bower.json index da1a8a1..492f2bb 100644 --- a/bower.json +++ b/bower.json @@ -7,12 +7,12 @@ "url": "https://github.com/lumihq/purescript-react-dnd-basic.git" }, "dependencies": { - "purescript-prelude": "^3.3.0", - "purescript-react-basic": "^0.10.0", - "purescript-nullable": "^3.0.0", - "purescript-promises": "^2.0.0" + "purescript-prelude": "^4.0.0", + "purescript-react-basic": "^1.0.0", + "purescript-nullable": "^4.0.0", + "purescript-promises": "^3.0.0" }, "devDependencies": { - "purescript-psci-support": "^3.0.0" + "purescript-psci-support": "^4.0.0" } } diff --git a/examples/basic/package.json b/examples/basic/package.json index 5c18796..e316a4f 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -6,12 +6,12 @@ "author": "", "dependencies": { "pulp": "^12.2.0", - "react": "^16.2.0", + "react": "^16.4.0", "react-dnd": "^2.6.0", "react-dnd-html5-backend": "^2.6.0", - "react-dom": "^16.2.0" + "react-dom": "^16.4.0" }, "devDependencies": { - "browserify": "^16.1.0" + "browserify": "^16.2.2" } } diff --git a/package-lock.json b/package-lock.json index 6ad1297..5a7a88d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,9 +93,9 @@ } }, "app-cache-dir": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/app-cache-dir/-/app-cache-dir-0.2.1.tgz", - "integrity": "sha512-UdSjcARK1TxWteoGRl66MO5VRwc3uOe+rt3HmH95c+PUasN82PuDLBtmpNQ8+uoqFoUs8KJOtNv5PXgkIqEdCw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/app-cache-dir/-/app-cache-dir-0.3.0.tgz", + "integrity": "sha512-VBd9owDbwIj3cKvt87ji+OGhz+6zgA0qj9OkDhErAJyxX5G0CrHKmxHVKCWbglbLnaKoivKGpq+v2tWzlOeXOQ==", "dev": true, "requires": { "inspect-with-kind": "^1.0.2" @@ -597,19 +597,19 @@ } }, "buffer-alloc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.1.0.tgz", - "integrity": "sha1-BVFNM78WVtNUDGhPZbEgLpDsowM=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "requires": { - "buffer-alloc-unsafe": "^0.1.0", - "buffer-fill": "^0.1.0" + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" } }, "buffer-alloc-unsafe": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz", - "integrity": "sha1-/+H2dVHdBVc33iUzN7/oU9+rGmo=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, "buffer-crc32": { @@ -619,9 +619,9 @@ "dev": true }, "buffer-fill": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-0.1.1.tgz", - "integrity": "sha512-YgBMBzdRLEfgxJIGu2wrvI2E03tMCFU1p7d1KhB4BOoMN0VxmTFjSyN5JtKt9z8Z9JajMHruI6SE25W96wNv7Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", "dev": true }, "buffer-from": { @@ -637,13 +637,13 @@ "dev": true }, "build-purescript": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/build-purescript/-/build-purescript-0.1.1.tgz", - "integrity": "sha512-f6zuH9SV9m105gFWL0OHslwPuX7OdfEpFE6sSfq7Ai7bZbe35O+sN7hovBwO3uCvU2FMMrKoHUtO8ukEfgUq9Q==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/build-purescript/-/build-purescript-0.2.3.tgz", + "integrity": "sha512-oIBeOxbEHG8don4jqxCMhZxoXCqk21jIqN+a9U/8jiiwYOAS6KcssxcTklhE+LzEIsBx/hh8cObQ5Lupos/mVw==", "dev": true, "requires": { - "download-purescript-source": "^0.3.2", - "feint": "^1.0.1", + "download-purescript-source": "^0.4.0", + "feint": "^1.0.2", "graceful-fs": "^4.1.11", "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", @@ -651,22 +651,8 @@ "mkdirp": "^0.5.1", "once": "^1.4.0", "rimraf": "^2.6.2", - "spawn-stack": "0.3.1-0 ", - "uid2": "^0.0.3", - "zen-observable": "^0.6.0" - }, - "dependencies": { - "spawn-stack": { - "version": "0.3.1-0", - "resolved": "https://registry.npmjs.org/spawn-stack/-/spawn-stack-0.3.1-0.tgz", - "integrity": "sha512-z+vQvfaYODaQqJ9SBkYs+JW6DCYX4+2moyzjqW7+Hw9OoAqjjYiEFbOfFET153Xo365d23F3anjVkF7y1miWdQ==", - "dev": true, - "requires": { - "byline": "^5.0.0", - "execa": "^0.7.0", - "zen-observable": "^0.6.0" - } - } + "spawn-stack": "^0.5.0", + "zen-observable": "^0.6.1" } }, "builtin-status-codes": { @@ -941,12 +927,14 @@ } }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" } @@ -1095,9 +1083,9 @@ "integrity": "sha1-NsamdEdfVaLWkTVnpgFETkh7S24=" }, "dl-tar": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/dl-tar/-/dl-tar-0.5.3.tgz", - "integrity": "sha512-4e0DMD0uVz8z1nC44MvJRDyAI9FS6Q1ROzECdvB+nB3SrSOjbPJ2IPLSNhyqlz9QoQg9fqAitsFbwBLyNXCrCw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/dl-tar/-/dl-tar-0.6.0.tgz", + "integrity": "sha512-bh6sKubl/RzCNC6v6PEim13GDA0D0OEq8j1yqORFQrVnH8C1aaP2xb4BSRP8VxFPKYVvAi4zzDEBMr72z2M9Wg==", "dev": true, "requires": { "cancelable-pump": "^0.2.0", @@ -1108,18 +1096,18 @@ "load-request-from-cwd-or-npm": "^2.0.1", "tar-fs": "^1.16.0", "tar-stream": "^1.5.5", - "zen-observable": "^0.6.0" + "zen-observable": "^0.6.1" } }, "dl-tgz": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/dl-tgz/-/dl-tgz-0.5.1.tgz", - "integrity": "sha512-EHTJROgl6wtka3fNkKJwuz2Q+id0sCIJ3ZXF7GXRbNJAcgyrkEg9dNzmvte7TnScvzDDOPD80q8n+GyjWrHd+A==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/dl-tgz/-/dl-tgz-0.6.0.tgz", + "integrity": "sha512-pkf0P6EwWfVmpbFTvgfrWOh9JvrCwW/bnx2i+M9ffKfKCP20B/3ZHRL/jGXL8nuZ+TQcI/rsasx1fzjf+expmQ==", "dev": true, "requires": { - "dl-tar": "^0.5.2", + "dl-tar": "^0.6.0", "is-plain-obj": "^1.1.0", - "zen-observable": "^0.6.0" + "zen-observable": "^0.6.1" } }, "dnd-core": { @@ -1144,44 +1132,58 @@ "dev": true }, "download-or-build-purescript": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/download-or-build-purescript/-/download-or-build-purescript-0.0.6.tgz", - "integrity": "sha512-YzTfSu1amdz3qmIczYawUppKC1f69hdBfknltRM34uUyWpNS6rqayJpGgcp3zsX73kDroVGoN6Zorv1z2eWK8w==", + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/download-or-build-purescript/-/download-or-build-purescript-0.0.9.tgz", + "integrity": "sha512-1SOq5zLZd2Nh1bmyQUhMlmZoUxuUMYYTHcyU8kR2Y9nRRiuogEWQcD2+SiJfEl5S6Ap+S4x2hVNP3bbQp0/80g==", "dev": true, "requires": { - "build-purescript": "^0.1.0", - "download-purescript": "^0.3.0", - "execa": "^0.7.0", - "feint": "1.0.1", + "build-purescript": "^0.2.0", + "download-purescript": "0.5.0-0", + "execa": "^0.10.0", + "feint": "^1.0.2", "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.3", + "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", "once": "^1.4.0", - "prepare-write": "^0.3.0", - "spawn-stack": "^0.2.0", + "prepare-write": "^0.3.1", + "spawn-stack": "^0.5.0", "which": "^1.3.0", "zen-observable": "^0.6.0" + }, + "dependencies": { + "prepare-write": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-0.3.1.tgz", + "integrity": "sha512-p4NqFH9qi2Qjkh8OxdUSbF32+OVp6j/Vu/RQC/v0Yar5nWdmLQvDm+uEjy9Z8c+HgqC0tS0eZRLHnn+AWAk3Hg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "inspect-with-kind": "^1.0.2", + "is-dir": "^1.0.0", + "mkdirp": "^0.5.1" + } + } } }, "download-purescript": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/download-purescript/-/download-purescript-0.3.0.tgz", - "integrity": "sha512-XEEHSP05fHCBs0RbaxrMB4QwrIOr8VE0wNVzhC9d0zzRVqddr/F59OTchFUd8/TXkAE3Mm1FW7Pjauv1y/cmaA==", + "version": "0.5.0-0", + "resolved": "https://registry.npmjs.org/download-purescript/-/download-purescript-0.5.0-0.tgz", + "integrity": "sha512-oBjNPPBBB/zcsIvn9VUgL+YnT9E3dSszwISKmPxU4ehIkAisysrII8pvQAoQRxSikppJhmajo/VYEpa5LD0whQ==", "dev": true, "requires": { - "dl-tgz": "^0.5.1", - "inspect-with-kind": "^1.0.3", + "dl-tgz": "^0.6.0", + "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", - "zen-observable": "^0.6.0" + "zen-observable": "^0.6.1" } }, "download-purescript-source": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/download-purescript-source/-/download-purescript-source-0.3.2.tgz", - "integrity": "sha512-Vt9gH6IOrrRnsSbjIrMWtKt86VYoYYyQQMF7mvweLDop99QJPolYcpsURyFxbT2GoLjwqI4L6l47dn5hzu/t4A==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/download-purescript-source/-/download-purescript-source-0.4.0.tgz", + "integrity": "sha512-Y+5VqajGu9uv63XbY7R27UZGplqxQkyYMg52nSBHQMOyML/2TIm4HmP3trTSM2lxFR4yCeKGQgPas35OERCFWg==", "dev": true, "requires": { - "dl-tgz": "^0.5.1", + "dl-tgz": "^0.6.0", "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", "zen-observable": "^0.6.1" @@ -1257,12 +1259,12 @@ } }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", + "cross-spawn": "^6.0.0", "get-stream": "^3.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", @@ -1407,28 +1409,49 @@ } }, "feint": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/feint/-/feint-1.0.1.tgz", - "integrity": "sha1-FsZCrfN+vzSHjy64MY96X71si5w=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/feint/-/feint-1.0.2.tgz", + "integrity": "sha512-PC77rn63FAMGcmHEkuGh4AdofqI6/c/YGjyvLo60mGLcCOHUUzCnKFzoij062piVgBblkl/KlN1vHGVJsK88cg==", "dev": true, "requires": { - "append-type": "^1.0.0" + "append-type": "^1.0.1" } }, "file-to-tar": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/file-to-tar/-/file-to-tar-0.2.3.tgz", - "integrity": "sha512-nFcPj8HwSRdqxLX4Fja7oCzQOSQSrS1iCnJZDMn+i2MvW+wXh4uoUPLE9NlUUdMAsmXoG8oTFalXBf6V66g6hA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/file-to-tar/-/file-to-tar-0.3.1.tgz", + "integrity": "sha512-bFYkxQR2weH7Bgdj6Dxuo+0rRZagcqY0uuu2CcXUdrOp8TFfkGYEdHy3uSqLiwhkXCcFFDk0584bdIyyEvJKBA==", "dev": true, "requires": { - "cancelable-pump": "^0.2.0", + "cancelable-pump": "^0.4.0", "graceful-fs": "^4.1.11", "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", "is-stream": "^1.1.0", "mkdirp": "^0.5.1", - "tar-fs": "^1.16.0", + "tar-fs": "^1.16.2", "zen-observable": "^0.6.1" + }, + "dependencies": { + "cancelable-pump": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", + "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "filesize": { @@ -2242,50 +2265,58 @@ } }, "install-purescript": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/install-purescript/-/install-purescript-0.2.0.tgz", - "integrity": "sha512-f7/330TaPz3z8TzLNwHhDyP7UWKlbjvKL4wNG18IC019cmzlQTvmGy/raGmQS4/YxnDECXtA0lheBJ9ELVEwSA==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/install-purescript/-/install-purescript-0.4.0.tgz", + "integrity": "sha512-hXfy12CP/aSCxEhx75kA2jTsbUrkQYFwbolNIrFcFVaiSYc3GpEcAsLqSuijzMCtfxAq+2S6Uw5o6QrVVNVpwQ==", "dev": true, "requires": { - "app-cache-dir": "^0.2.1", + "app-cache-dir": "^0.3.0", "arch": "^2.1.0", - "download-or-build-purescript": "^0.0.6", - "execa": "^0.7.0", - "feint": "1.0.1", - "file-to-tar": "^0.2.1", + "download-or-build-purescript": "^0.0.9", + "execa": "^0.10.0", + "feint": "1.0.2", + "file-to-tar": "^0.3.1", "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.2", + "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", "once": "^1.4.0", - "prepare-write": "^0.3.0", - "readdir-clean": "^0.4.0", + "prepare-write": "^1.0.0", + "readdir-clean": "^1.0.0", "rimraf": "^2.6.2", - "tar-to-file": "^0.2.0", + "tar-to-file": "^0.4.0", "tilde-path": "^2.0.0", - "truncated-list": "^0.1.0", - "zen-observable": "^0.6.0" + "truncated-list": "^1.0.1", + "zen-observable": "^0.6.1" } }, "install-purescript-cli": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/install-purescript-cli/-/install-purescript-cli-0.2.0.tgz", - "integrity": "sha512-F3t7uJEbWdbFlAJY+4n55li6D2Vod2CmhBSDesAtIZpgYSG/u706pNZmst/EwZV7bZwhR4sR/YUgGPx+UpDy2g==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/install-purescript-cli/-/install-purescript-cli-0.3.0.tgz", + "integrity": "sha512-fxxJ2nnKfDHli530XVz7w5bd5I7UKODtVjMLJuvpOHPSqPfHgOPqHat2vjPTqaW5B4sHt3NYGopvt/fYPfwl2A==", "dev": true, "requires": { - "chalk": "^2.3.0", - "install-purescript": "^0.2.0", - "log-symbols": "^2.1.0", + "chalk": "^2.4.1", + "install-purescript": "^0.4.0", + "log-symbols": "^2.2.0", "log-update": "^2.3.0", "minimist": "^1.2.0", - "ms": "^2.0.0", - "neat-frame": "^0.2.0", - "neat-stack": "^0.1.1", + "ms": "^2.1.1", + "neat-frame": "^1.0.1", + "neat-stack": "^1.0.0", "once": "^1.4.0", - "platform-name": "^0.5.0", + "platform-name": "^1.0.0", "size-rate": "^0.1.0", "tilde-path": "^2.0.0", - "tty-truncate": "^0.3.1", - "vertical-meter": "^0.1.0" + "tty-truncate": "^1.0.0", + "vertical-meter": "^1.0.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } } }, "invariant": { @@ -2883,24 +2914,24 @@ } }, "neat-frame": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/neat-frame/-/neat-frame-0.2.0.tgz", - "integrity": "sha512-7GOJQFq7MUJNMsYFfJ4Uk7Mi0MtIpX8xxtoP+zRuOoazTmHckvDCcGa6oRR6YwvmG+TIQSrkmIgolxAXM+2k8Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/neat-frame/-/neat-frame-1.0.1.tgz", + "integrity": "sha512-4rcKecmbH5Wkk/iIzvN9E0x1OtFOLbGNIcag8z+oedZPhqWOVKZ+YOvoK6bA32Z7TbC7xhSgF2cVpiAePZCtEA==", "dev": true, "requires": { - "inspect-with-kind": "^1.0.2", + "inspect-with-kind": "^1.0.4", "string-width": "^2.1.1", "term-size": "^1.2.0", "wrap-ansi": "^3.0.1" } }, "neat-stack": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/neat-stack/-/neat-stack-0.1.2.tgz", - "integrity": "sha512-IM2Xfjma9Czp1FkFZBQVWm36156RFcpm7s4oWCmPqsD44RdgHSA3YtJykkQIpTHGFkVVWEpG811HUUB5e/kkLg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/neat-stack/-/neat-stack-1.0.0.tgz", + "integrity": "sha512-T8/XRUmzb+trkqF3gEKFZoidbOodhXIKYvDwO0yi9cVs+6f0geF4xy/VOEX2v3ewUq+OJnpBldXUjiC7Ng+cyw==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.0", "clean-stack": "^1.3.0" } }, @@ -2910,6 +2941,12 @@ "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -2949,12 +2986,12 @@ } }, "npm-cli-path": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-cli-path/-/npm-cli-path-2.0.1.tgz", - "integrity": "sha512-7wkczdiJjLnQbdgtt6ov/WrK8OCcjJHh+o1tIkQ7GzwLgStBc5XTpJrvGhkhrDOK+OxFXBn9zk7TMD9iZHOJLA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/npm-cli-path/-/npm-cli-path-2.0.3.tgz", + "integrity": "sha512-DX+QTbHxnUIY6trC0y6JtBsPMqsMAgHbvLABwhtBjIKKy+6sg7Bq41tbWxtRT6t3yxigIePWXzKy+t285Tv56w==", "dev": true, "requires": { - "real-executable-path": "^2.0.1", + "real-executable-path": "^2.0.2", "win-user-installed-npm-cli-path": "^2.0.2" } }, @@ -3171,12 +3208,12 @@ } }, "platform-name": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/platform-name/-/platform-name-0.5.0.tgz", - "integrity": "sha1-l4PmlggWCb5zCEC5aYYNAlAropc=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/platform-name/-/platform-name-1.0.0.tgz", + "integrity": "sha512-ZRbqJ30uRRKGKW2O1XnG/Ls1K/aBGlnyjq1Z0BbjqDPTNN+XZKFaugCsCm3/mq6XGR5DZNVdV75afpQEvNNY3Q==", "dev": true, "requires": { - "append-type": "^1.0.0" + "inspect-with-kind": "^1.0.4" } }, "posix-character-classes": { @@ -3186,13 +3223,13 @@ "dev": true }, "prepare-write": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-0.3.1.tgz", - "integrity": "sha512-p4NqFH9qi2Qjkh8OxdUSbF32+OVp6j/Vu/RQC/v0Yar5nWdmLQvDm+uEjy9Z8c+HgqC0tS0eZRLHnn+AWAk3Hg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prepare-write/-/prepare-write-1.0.0.tgz", + "integrity": "sha512-p3OWhGbr3136RlcX5hRY1ohxUV0PoP0Xy1hAbHo2U1LA6IMJYeu9t9AqBI/08iMh2F+4zzH5aVxKgqoTh/45ig==", "dev": true, "requires": { "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.2", + "inspect-with-kind": "^1.0.4", "is-dir": "^1.0.0", "mkdirp": "^0.5.1" } @@ -3287,12 +3324,12 @@ "dev": true }, "purescript": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/purescript/-/purescript-0.11.7.tgz", - "integrity": "sha512-Wvw/K7W2e2+dF6Jc926InVUtilF2eNuuOLTW6ij7ciTcTc1ynr20tHiopM1PuV/KzjZ5VwoOTVlh2IHiVikhJA==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/purescript/-/purescript-0.12.0.tgz", + "integrity": "sha512-q9kYKqjcukY3/4xdu3wk13Qs6po3NQR1QLGTmyVgqjKpz8l7coZCAx5Ajpi3u2Qla7eXurgD3mWFo0iMOUzUUA==", "dev": true, "requires": { - "install-purescript-cli": "^0.2.0" + "install-purescript-cli": "^0.4.0 || ^0.3.0" } }, "querystring": { @@ -3336,9 +3373,9 @@ } }, "react": { - "version": "16.3.2", - "resolved": "https://registry.npmjs.org/react/-/react-16.3.2.tgz", - "integrity": "sha512-o5GPdkhciQ3cEph6qgvYB7LTOHw/GB0qRI6ZFNugj49qJCFfgHwVNjZ5u+b7nif4vOeMIOuYj3CeYe2IBD74lg==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.4.0.tgz", + "integrity": "sha512-K0UrkLXSAekf5nJu89obKUM7o2vc6MMN9LYoKnCa+c+8MJRAT120xzPLENcWSRc7GYKIg0LlgJRDorrufdglQQ==", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.1.0", @@ -3401,9 +3438,9 @@ } }, "react-dom": { - "version": "16.3.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.3.2.tgz", - "integrity": "sha512-MMPko3zYncNrz/7gG17wJWUREZDvskZHXOwbttzl0F0L3wDmToyuETuo/r8Y5yvDejwYcRyWI1lvVBjLJWFwKA==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.4.0.tgz", + "integrity": "sha512-bbLd+HYpBEnYoNyxDe9XpSG2t9wypMohwQPvKw8Hov3nF7SJiJIgK56b46zHpBUpHb06a1iEuw7G3rbrsnNL6w==", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.1.0", @@ -3456,13 +3493,12 @@ } }, "readdir-clean": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/readdir-clean/-/readdir-clean-0.4.0.tgz", - "integrity": "sha512-1HjVAFHcj/HQQNMNm0pIs2dTey0a4GO1cq1l6lIwYoSbnyC4IViVLyHF1M1n8dFYJOTCyrHgip42mTK+tk4/3Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readdir-clean/-/readdir-clean-1.0.0.tgz", + "integrity": "sha512-9+/foOFyAlmXdMLIsrSm/aoBxnSQ+8fruH814Z3hm5xlwfKYP35qhdJH05KYSSd0RUw9cPEKqvgKdGNjn88aYg==", "dev": true, "requires": { "graceful-fs": "^4.1.11", - "inspect-with-kind": "^1.0.2", "junk": "^2.1.0" } }, @@ -3634,6 +3670,12 @@ "rimraf": "^2.5.2" } }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -3732,10 +3774,13 @@ } }, "slice-ansi": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.1.0.tgz", - "integrity": "sha1-qITs8XjpjDauT2KSU3eKJNEu0Xs=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } }, "snapdragon": { "version": "0.8.2", @@ -3888,22 +3933,15 @@ "dev": true }, "spawn-stack": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/spawn-stack/-/spawn-stack-0.2.0.tgz", - "integrity": "sha512-4EiDExNA1iER5qWN/A6Ntz/G06wUm4v3bXjApVc1aUI1DOkmsj9tYBi6Xw+ErHOGv5wPO5Ti6gsBgsIYNKfOsA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/spawn-stack/-/spawn-stack-0.5.0.tgz", + "integrity": "sha512-suwvBV2WNTOYe/TQBoAFrGbdRvo5t/pWYq/vNw24wbSmIJXr/eaadsF+92VyPm2dBYsYwBnsTLhQFCo3EdCA+Q==", "dev": true, "requires": { "byline": "^5.0.0", - "execa": "^0.7.0", - "zen-observable": "^0.5.1" - }, - "dependencies": { - "zen-observable": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.5.2.tgz", - "integrity": "sha512-Dhp/R0pqSHj3vPs5O1gVd9kZx5Iew2lqVcfJQOBHx3llM/dLea8vl9wSa9FK8wLdSBQJ6mmgKi9+Rk2DRH3i9Q==", - "dev": true - } + "execa": "^0.10.0", + "inspect-with-kind": "^1.0.4", + "zen-observable": "^0.6.1" } }, "split-string": { @@ -4061,34 +4099,55 @@ } }, "tar-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.0.tgz", - "integrity": "sha512-lh2iAPG/BHNmN6WB9Ybdynk9rEJ5GD/dy4zscHmVlwa1dq2tpE+BH78i5vjYwYVWEaOXGBjzxr89aVACF17Cpw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", "dev": true, "requires": { "bl": "^1.0.0", "buffer-alloc": "^1.1.0", "end-of-stream": "^1.0.0", "fs-constants": "^1.0.0", - "readable-stream": "^2.0.0", + "readable-stream": "^2.3.0", "to-buffer": "^1.1.0", "xtend": "^4.0.0" } }, "tar-to-file": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tar-to-file/-/tar-to-file-0.2.1.tgz", - "integrity": "sha512-ZrLV9wf3NHeFQ9o1ixRVvshDLu/L/jvSwMnKO0uC75tYTEkPUR7REuVLt3si4/wLwHnOhFtdOXDJSpZtmwoh3g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/tar-to-file/-/tar-to-file-0.4.0.tgz", + "integrity": "sha512-DFRBSotqmgeMrU/H7z0VIMPv8taOheRUlAhi6Q+r5Xso9xoa5vez/Z3uvASSzuT1dwe2orAdENT7NXlAh1zwvA==", "dev": true, "requires": { - "cancelable-pump": "^0.2.0", + "cancelable-pump": "^0.4.0", "graceful-fs": "^4.1.11", "inspect-with-kind": "^1.0.4", "is-plain-obj": "^1.1.0", "is-stream": "^1.1.0", - "tar-fs": "^1.16.0", - "tar-stream": "^1.5.5", + "tar-fs": "^1.16.2", + "tar-stream": "^1.6.1", "zen-observable": "^0.6.1" + }, + "dependencies": { + "cancelable-pump": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cancelable-pump/-/cancelable-pump-0.4.0.tgz", + "integrity": "sha512-7Yvp8ADC9exD0Kdq/Q35UD5wOiuXTTLp159gFHC+uMQvjRMllrsM6EUKnozmIe43yesLBiH/ni0KD69k07yzZQ==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "temp": { @@ -4116,6 +4175,34 @@ "dev": true, "requires": { "execa": "^0.7.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + } } }, "through": { @@ -4210,12 +4297,12 @@ "dev": true }, "truncated-list": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/truncated-list/-/truncated-list-0.1.0.tgz", - "integrity": "sha512-8ZkhXPh8EGrD9tLqnVwjB2BRMSLQCRR8YyXzQgKzWi7t3Z3f2UerOA3SHCFOoVjck6JhMwtVJXZKtEb2lJODWg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/truncated-list/-/truncated-list-1.0.1.tgz", + "integrity": "sha512-aNcDZ1PfxAtUXXLEmy+m1D465lFv0VgWltGlTWuJuhPh+FGeOiHV9S2DYOD8IEgZU8yOInZBRHVcAts+xIYzew==", "dev": true, "requires": { - "inspect-with-kind": "^1.0.2" + "inspect-with-kind": "^1.0.4" } }, "tty-browserify": { @@ -4225,15 +4312,15 @@ "dev": true }, "tty-truncate": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tty-truncate/-/tty-truncate-0.3.1.tgz", - "integrity": "sha512-4ehw5Wudz1oi7YFP7jhDOggwE6TLzz6qvwEczMxZho7iePs1MEcl+LfXn+pauu7b9F87DK0RlABxPzXGbqeyFw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tty-truncate/-/tty-truncate-1.0.0.tgz", + "integrity": "sha512-pUnGE8KQJl/aGOkPtAPXcKnJRPNBzn/c+9gWFPtGPtayGUp0luLyM3RST10g5UbybJAWlHUuYjIO4NXsilg6nA==", "dev": true, "requires": { "ansi-regex": "^3.0.0", - "inspect-with-kind": "^1.0.2", - "slice-ansi": "^0.1.0", - "string-width": "^2.1.0" + "inspect-with-kind": "^1.0.4", + "slice-ansi": "^1.0.0", + "string-width": "^2.1.1" } }, "typedarray": { @@ -4247,12 +4334,6 @@ "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==" }, - "uid2": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz", - "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I=", - "dev": true - }, "umd": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", @@ -4397,9 +4478,9 @@ "dev": true }, "vertical-meter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/vertical-meter/-/vertical-meter-0.1.1.tgz", - "integrity": "sha512-qw05D8M41+kfxI+m2MjEi63BtWHb5qsUwWq2QvEDvOCMzZW5WKO5/hN0PO7yp/q0hiYZSUqugVapiZFWk0K/zQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vertical-meter/-/vertical-meter-1.0.0.tgz", + "integrity": "sha512-xvtone0DHRBrWSBVF2p3+/KSz/mzHvDZ7+HYB3g68hBpqIC3tIF8J1maf5osHPKHB/45iq2B+T4ju/mfxArd/Q==", "dev": true, "requires": { "rate-map": "^1.0.1" diff --git a/package.json b/package.json index 6c37d70..e7c7000 100644 --- a/package.json +++ b/package.json @@ -27,13 +27,13 @@ "devDependencies": { "bower": "^1.8.4", "pulp": "^12.2.0", - "purescript": "^0.11.7" + "purescript": "^0.12.0" }, "dependencies": { - "react": "^16.3.2", + "react": "^16.4.0", "react-dnd": "^2.6.0", "react-dnd-html5-backend": "^2.6.0", "react-dnd-test-backend": "^3.0.2", - "react-dom": "^16.3.2" + "react-dom": "^16.4.0" } } diff --git a/src/React/Basic/ReactDND.purs b/src/React/Basic/ReactDND.purs index b1a5d1d..c2bd446 100644 --- a/src/React/Basic/ReactDND.purs +++ b/src/React/Basic/ReactDND.purs @@ -17,12 +17,12 @@ module React.Basic.ReactDND import Prelude -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.Uncurried (mkEffFn1) import Data.Function.Uncurried (Fn2, mkFn1, runFn2) import Data.Maybe (Maybe) import Data.Nullable (Nullable, toMaybe, toNullable) -import React.Basic (JSX, ReactComponent, ReactFX, createElement, stateless) +import Effect (Effect) +import Effect.Uncurried (mkEffectFn1) +import React.Basic (JSX, ReactComponent, createElement, stateless) data Backend @@ -70,17 +70,17 @@ type DragDropContextProps = } type DragSourceProps item = - { beginDrag :: DragSourceCollectArgs item -> Eff (react :: ReactFX) item - , endDrag :: DragSourceCollectArgs item -> Eff (react :: ReactFX) Unit - , canDrag :: DragSourceCollectArgs item -> Eff (react :: ReactFX) Boolean - , isDragging :: DragSourceCollectArgs item -> Eff (react :: ReactFX) Boolean + { beginDrag :: DragSourceCollectArgs item -> Effect item + , endDrag :: DragSourceCollectArgs item -> Effect Unit + , canDrag :: DragSourceCollectArgs item -> Effect Boolean + , isDragging :: DragSourceCollectArgs item -> Effect Boolean , render :: DragSourceCollectArgs item -> JSX } type DropTargetProps item = - { drop :: DropTargetCollectArgs item -> Eff (react :: ReactFX) (Maybe item) - , hover :: DropTargetCollectArgs item -> Eff (react :: ReactFX) Unit - , canDrop :: DropTargetCollectArgs item -> Eff (react :: ReactFX) Boolean + { drop :: DropTargetCollectArgs item -> Effect (Maybe item) + , hover :: DropTargetCollectArgs item -> Effect Unit + , canDrop :: DropTargetCollectArgs item -> Effect Boolean , render :: DropTargetCollectArgs item -> JSX } @@ -109,10 +109,10 @@ createDragDrop itemType = in stateless { displayName: "DragSource" , render: \props -> createElement jsDragSource - { beginDrag: mkEffFn1 props.beginDrag - , endDrag: mkEffFn1 props.endDrag - , canDrag: mkEffFn1 props.canDrag - , isDragging: mkEffFn1 props.isDragging + { beginDrag: mkEffectFn1 props.beginDrag + , endDrag: mkEffectFn1 props.endDrag + , canDrag: mkEffectFn1 props.canDrag + , isDragging: mkEffectFn1 props.isDragging , render: mkFn1 props.render } } @@ -122,9 +122,9 @@ createDragDrop itemType = in stateless { displayName: "DropTarget" , render: \props -> createElement jsDropTarget - { drop: mkEffFn1 (map toNullable <<< props.drop) - , hover: mkEffFn1 props.hover - , canDrop: mkEffFn1 props.canDrop + { drop: mkEffectFn1 (map toNullable <<< props.drop) + , hover: mkEffectFn1 props.hover + , canDrop: mkEffectFn1 props.canDrop , render: mkFn1 props.render } }