From 101170d71d8f54b927f758a4362091ad71e0198b Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 22 Jul 2023 12:39:09 -0700 Subject: [PATCH] editor: remove patching Signed-off-by: Varun Patil --- Makefile | 1 - package-lock.json | 178 +++++++++++--------------- package.json | 3 +- patches/filerobot-loadImage.js | 22 ---- patches/filerobot-patch.sh | 17 --- src/components/viewer/ImageEditor.vue | 12 +- 6 files changed, 83 insertions(+), 150 deletions(-) delete mode 100644 patches/filerobot-loadImage.js delete mode 100644 patches/filerobot-patch.sh diff --git a/Makefile b/Makefile index 439e89ca..aebed03f 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,6 @@ build-js-production: patch-external: patch -p1 -N < patches/scroller-perf.patch || true patch -p1 -N < patches/scroller-sticky.patch || true - bash ./patches/filerobot-patch.sh watch-js: npm run watch diff --git a/package-lock.json b/package-lock.json index 09800587..9fe58436 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@nextcloud/sharing": "^0.1.0", "@nextcloud/vue": "7.11.2", "camelcase": "^7.0.1", - "filerobot-image-editor": "^4.4.0", + "filerobot-image-editor": "^4.5.1", "fuse.js": "^6.6.2", "hammerjs": "^2.0.8", "justified-layout": "^4.1.0", @@ -24,6 +24,7 @@ "path-posix": "^1.0.0", "photoswipe": "^5.3.7", "plyr": "^3.7.8", + "react-filerobot-image-editor": "^4.5.1", "reflect-metadata": "^0.1.13", "video.js": "^8.3.0", "vue": "^2.7.14", @@ -2128,10 +2129,9 @@ } }, "node_modules/@popperjs/core": { - "version": "2.11.6", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", - "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", - "peer": true, + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "funding": { "type": "opencollective", "url": "https://opencollective.com/popperjs" @@ -2217,10 +2217,9 @@ "dev": true }, "node_modules/@scaleflex/icons": { - "version": "1.0.0-beta.80", - "resolved": "https://registry.npmjs.org/@scaleflex/icons/-/icons-1.0.0-beta.80.tgz", - "integrity": "sha512-QUPwFDmFNlE3GZ5kcr5Fp3KzetcG4FQyOYO76vPi9v0h/+gr9NKfLDhx5AI72XHZrVdp42I4Mu17jGREQy2Q6A==", - "peer": true, + "version": "1.0.0-beta.99", + "resolved": "https://registry.npmjs.org/@scaleflex/icons/-/icons-1.0.0-beta.99.tgz", + "integrity": "sha512-LXFn0/7jbtCxv90yO7dt7Mx/n9f5Fvl9bovf8HABFX1Y2V4Iw+egdnm6LGt+fbl61lq7Ea8aFCr/YKH4jmGpvw==", "engines": { "node": ">=12" }, @@ -2230,13 +2229,12 @@ } }, "node_modules/@scaleflex/ui": { - "version": "1.0.0-beta.80", - "resolved": "https://registry.npmjs.org/@scaleflex/ui/-/ui-1.0.0-beta.80.tgz", - "integrity": "sha512-h4IiShDPcg4F+dLb7Fw6Xk1KmMWTm/NJzJaSeQ84ysCFquFrDgJKs5WKQ0yn/pdnCQfdec4801ACVpybqmA8UQ==", - "peer": true, + "version": "1.0.0-beta.99", + "resolved": "https://registry.npmjs.org/@scaleflex/ui/-/ui-1.0.0-beta.99.tgz", + "integrity": "sha512-PglsU+2xHI7MYiLS9BNbPacXTbsc+Nvj7/p0fQ37E9mhJiM2/rRKCJG4YiyDQRpnc9VjyOIF12GDvHAmiFnrCQ==", "dependencies": { "@popperjs/core": "^2.6.0", - "@scaleflex/icons": "^1.0.0-beta.80", + "@scaleflex/icons": "^1.0.0-beta.99", "lodash.merge": "^4.6.2", "lodash.throttle": "^4.1.1", "polished": "^3.6.6", @@ -4441,8 +4439,7 @@ "node_modules/detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", - "peer": true + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" }, "node_modules/diff": { "version": "5.1.0", @@ -4950,9 +4947,9 @@ } }, "node_modules/filerobot-image-editor": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/filerobot-image-editor/-/filerobot-image-editor-4.4.0.tgz", - "integrity": "sha512-B1lqUtPT0iEn+sguJ+XOrTLnjf5adBA60aNW6DPAwGCtHj4NjIHEGT7RMVeleCt9vsHwnTYEZVih0DvLcsVRcw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/filerobot-image-editor/-/filerobot-image-editor-4.5.1.tgz", + "integrity": "sha512-5I1IjfEv4dCfFEub11itje8DAupcverqHZtnEBrKEIYOeg+dUM51agwTKznvo+01tEL7FMem5lklMvQBW2Ebiw==", "dependencies": { "@babel/runtime": "^7.17.2", "react": "18.2.0", @@ -5140,10 +5137,9 @@ } }, "node_modules/focus-lock": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.3.tgz", - "integrity": "sha512-4n0pYcPTa/uI7Q66BZna61nRT7lDhnuJ9PJr6wiDjx4uStg491ks41y7uOG+s0umaaa+hulNKSldU9aTg9/yVg==", - "peer": true, + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.6.tgz", + "integrity": "sha512-KSuV3ur4gf2KqMNoZx3nXNVhqCkn42GuTYCX4tXPEwf0MjpFQmNMiN6m7dXaUXgIoivL6/65agoUMg4RLS0Vbg==", "dependencies": { "tslib": "^2.0.3" }, @@ -6576,9 +6572,9 @@ } }, "node_modules/konva": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/konva/-/konva-8.3.2.tgz", - "integrity": "sha512-vWi51qFTFkEIp+HxMek1eH1fA1zFo0DPD3uqUez+v2gy/IfZF2eLu9DcEj7Exk532hxfHJi/2oZ0GQYHlhg/dQ==", + "version": "8.4.3", + "resolved": "https://registry.npmjs.org/konva/-/konva-8.4.3.tgz", + "integrity": "sha512-ARqdgAbdNIougRlOKvkQwHlGhXPRBV4KvhCP+qoPpGoVQwwiJe4Hkdu4HHdRPb9rGUp04jDTAxBzEwBsE272pg==", "funding": [ { "type": "patreon", @@ -6592,8 +6588,7 @@ "type": "github", "url": "https://github.com/sponsors/lavrton" } - ], - "peer": true + ] }, "node_modules/layerr": { "version": "0.1.2", @@ -6679,8 +6674,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "peer": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.sortby": { "version": "4.7.0", @@ -7644,7 +7638,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -8014,7 +8007,6 @@ "version": "3.7.2", "resolved": "https://registry.npmjs.org/polished/-/polished-3.7.2.tgz", "integrity": "sha512-pQKtpZGmsZrW8UUpQMAnR7s3ppHeMQVNyMDKtUyKwuvDmklzcEyM5Kllb3JyE/sE/x7arDmyd35i+4vp99H6sQ==", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.5" }, @@ -8175,7 +8167,6 @@ "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "peer": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -8185,8 +8176,7 @@ "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "peer": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/property-information": { "version": "6.2.0", @@ -8365,7 +8355,6 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz", "integrity": "sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg==", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.13" }, @@ -8386,32 +8375,30 @@ } }, "node_modules/react-filerobot-image-editor": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/react-filerobot-image-editor/-/react-filerobot-image-editor-4.3.7.tgz", - "integrity": "sha512-StUOsbiNj9ssSXgVOZUeNPwd3p8U0hJFVVwUgcb57EZSW2uWjt0cRn74hqhs9S/qJwqjF+D4ve4X3JY/gW4j1A==", - "peer": true, + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/react-filerobot-image-editor/-/react-filerobot-image-editor-4.5.1.tgz", + "integrity": "sha512-QI9UM3iPK59hRxn4aPvSVSw77mP6sPD/smOKf2pJDXINNmZxANOYgB57iipB0glBGQDHjkqWBt2xHV8O/KkV1w==", "dependencies": { "@babel/runtime": "^7.17.2", - "@scaleflex/icons": "1.0.0-beta.80", - "@scaleflex/ui": "1.0.0-beta.80", - "konva": "8.3.2", - "prop-types": "15.7.2", - "react-konva": "18.1.1" + "@scaleflex/icons": "1.0.0-beta.99", + "@scaleflex/ui": "1.0.0-beta.99", + "konva": "8.4.3", + "prop-types": "15.7.2" }, "peerDependencies": { - "react": "18.2.0", - "react-dom": "18.2.0", + "react": ">=17.0.0", + "react-dom": ">=17.0.0", + "react-konva": ">=17.0.0", "styled-components": ">=5.3.5" } }, "node_modules/react-focus-lock": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.1.tgz", - "integrity": "sha512-pSWOQrUmiKLkffPO6BpMXN7SNKXMsuOakl652IBuALAu1esk+IcpJyM+ALcYzPTTFz1rD0R54aB9A4HuP5t1Wg==", - "peer": true, + "version": "2.9.5", + "resolved": "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.5.tgz", + "integrity": "sha512-h6vrdgUbsH2HeD5I7I3Cx1PPrmwGuKYICS+kB9m+32X/9xHRrAbxgvaBpG7BFBN9h3tO+C3qX1QAVESmi4CiIA==", "dependencies": { "@babel/runtime": "^7.0.0", - "focus-lock": "^0.11.2", + "focus-lock": "^0.11.6", "prop-types": "^15.6.2", "react-clientside-effect": "^1.2.6", "use-callback-ref": "^1.3.0", @@ -10401,7 +10388,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", - "peer": true, "dependencies": { "tslib": "^2.0.0" }, @@ -10422,7 +10408,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", - "peer": true, "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" @@ -13014,10 +12999,9 @@ } }, "@popperjs/core": { - "version": "2.11.6", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz", - "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==", - "peer": true + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" }, "@rollup/plugin-babel": { "version": "5.3.1", @@ -13073,20 +13057,18 @@ } }, "@scaleflex/icons": { - "version": "1.0.0-beta.80", - "resolved": "https://registry.npmjs.org/@scaleflex/icons/-/icons-1.0.0-beta.80.tgz", - "integrity": "sha512-QUPwFDmFNlE3GZ5kcr5Fp3KzetcG4FQyOYO76vPi9v0h/+gr9NKfLDhx5AI72XHZrVdp42I4Mu17jGREQy2Q6A==", - "peer": true, + "version": "1.0.0-beta.99", + "resolved": "https://registry.npmjs.org/@scaleflex/icons/-/icons-1.0.0-beta.99.tgz", + "integrity": "sha512-LXFn0/7jbtCxv90yO7dt7Mx/n9f5Fvl9bovf8HABFX1Y2V4Iw+egdnm6LGt+fbl61lq7Ea8aFCr/YKH4jmGpvw==", "requires": {} }, "@scaleflex/ui": { - "version": "1.0.0-beta.80", - "resolved": "https://registry.npmjs.org/@scaleflex/ui/-/ui-1.0.0-beta.80.tgz", - "integrity": "sha512-h4IiShDPcg4F+dLb7Fw6Xk1KmMWTm/NJzJaSeQ84ysCFquFrDgJKs5WKQ0yn/pdnCQfdec4801ACVpybqmA8UQ==", - "peer": true, + "version": "1.0.0-beta.99", + "resolved": "https://registry.npmjs.org/@scaleflex/ui/-/ui-1.0.0-beta.99.tgz", + "integrity": "sha512-PglsU+2xHI7MYiLS9BNbPacXTbsc+Nvj7/p0fQ37E9mhJiM2/rRKCJG4YiyDQRpnc9VjyOIF12GDvHAmiFnrCQ==", "requires": { "@popperjs/core": "^2.6.0", - "@scaleflex/icons": "^1.0.0-beta.80", + "@scaleflex/icons": "^1.0.0-beta.99", "lodash.merge": "^4.6.2", "lodash.throttle": "^4.1.1", "polished": "^3.6.6", @@ -14854,8 +14836,7 @@ "detect-node-es": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", - "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", - "peer": true + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==" }, "diff": { "version": "5.1.0", @@ -15271,9 +15252,9 @@ } }, "filerobot-image-editor": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/filerobot-image-editor/-/filerobot-image-editor-4.4.0.tgz", - "integrity": "sha512-B1lqUtPT0iEn+sguJ+XOrTLnjf5adBA60aNW6DPAwGCtHj4NjIHEGT7RMVeleCt9vsHwnTYEZVih0DvLcsVRcw==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/filerobot-image-editor/-/filerobot-image-editor-4.5.1.tgz", + "integrity": "sha512-5I1IjfEv4dCfFEub11itje8DAupcverqHZtnEBrKEIYOeg+dUM51agwTKznvo+01tEL7FMem5lklMvQBW2Ebiw==", "requires": { "@babel/runtime": "^7.17.2", "react": "18.2.0", @@ -15403,10 +15384,9 @@ } }, "focus-lock": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.3.tgz", - "integrity": "sha512-4n0pYcPTa/uI7Q66BZna61nRT7lDhnuJ9PJr6wiDjx4uStg491ks41y7uOG+s0umaaa+hulNKSldU9aTg9/yVg==", - "peer": true, + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/focus-lock/-/focus-lock-0.11.6.tgz", + "integrity": "sha512-KSuV3ur4gf2KqMNoZx3nXNVhqCkn42GuTYCX4tXPEwf0MjpFQmNMiN6m7dXaUXgIoivL6/65agoUMg4RLS0Vbg==", "requires": { "tslib": "^2.0.3" } @@ -16451,10 +16431,9 @@ "peer": true }, "konva": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/konva/-/konva-8.3.2.tgz", - "integrity": "sha512-vWi51qFTFkEIp+HxMek1eH1fA1zFo0DPD3uqUez+v2gy/IfZF2eLu9DcEj7Exk532hxfHJi/2oZ0GQYHlhg/dQ==", - "peer": true + "version": "8.4.3", + "resolved": "https://registry.npmjs.org/konva/-/konva-8.4.3.tgz", + "integrity": "sha512-ARqdgAbdNIougRlOKvkQwHlGhXPRBV4KvhCP+qoPpGoVQwwiJe4Hkdu4HHdRPb9rGUp04jDTAxBzEwBsE272pg==" }, "layerr": { "version": "0.1.2", @@ -16529,8 +16508,7 @@ "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "peer": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "lodash.sortby": { "version": "4.7.0", @@ -17177,8 +17155,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "peer": true + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-inspect": { "version": "1.12.2", @@ -17451,7 +17428,6 @@ "version": "3.7.2", "resolved": "https://registry.npmjs.org/polished/-/polished-3.7.2.tgz", "integrity": "sha512-pQKtpZGmsZrW8UUpQMAnR7s3ppHeMQVNyMDKtUyKwuvDmklzcEyM5Kllb3JyE/sE/x7arDmyd35i+4vp99H6sQ==", - "peer": true, "requires": { "@babel/runtime": "^7.12.5" } @@ -17552,7 +17528,6 @@ "version": "15.7.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "peer": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -17562,8 +17537,7 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "peer": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" } } }, @@ -17712,7 +17686,6 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/react-clientside-effect/-/react-clientside-effect-1.2.6.tgz", "integrity": "sha512-XGGGRQAKY+q25Lz9a/4EPqom7WRjz3z9R2k4jhVKA/puQFH/5Nt27vFZYql4m4NVNdUvX8PS3O7r/Zzm7cjUlg==", - "peer": true, "requires": { "@babel/runtime": "^7.12.13" } @@ -17727,27 +17700,24 @@ } }, "react-filerobot-image-editor": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/react-filerobot-image-editor/-/react-filerobot-image-editor-4.3.7.tgz", - "integrity": "sha512-StUOsbiNj9ssSXgVOZUeNPwd3p8U0hJFVVwUgcb57EZSW2uWjt0cRn74hqhs9S/qJwqjF+D4ve4X3JY/gW4j1A==", - "peer": true, + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/react-filerobot-image-editor/-/react-filerobot-image-editor-4.5.1.tgz", + "integrity": "sha512-QI9UM3iPK59hRxn4aPvSVSw77mP6sPD/smOKf2pJDXINNmZxANOYgB57iipB0glBGQDHjkqWBt2xHV8O/KkV1w==", "requires": { "@babel/runtime": "^7.17.2", - "@scaleflex/icons": "1.0.0-beta.80", - "@scaleflex/ui": "1.0.0-beta.80", - "konva": "8.3.2", - "prop-types": "15.7.2", - "react-konva": "18.1.1" + "@scaleflex/icons": "1.0.0-beta.99", + "@scaleflex/ui": "1.0.0-beta.99", + "konva": "8.4.3", + "prop-types": "15.7.2" } }, "react-focus-lock": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.1.tgz", - "integrity": "sha512-pSWOQrUmiKLkffPO6BpMXN7SNKXMsuOakl652IBuALAu1esk+IcpJyM+ALcYzPTTFz1rD0R54aB9A4HuP5t1Wg==", - "peer": true, + "version": "2.9.5", + "resolved": "https://registry.npmjs.org/react-focus-lock/-/react-focus-lock-2.9.5.tgz", + "integrity": "sha512-h6vrdgUbsH2HeD5I7I3Cx1PPrmwGuKYICS+kB9m+32X/9xHRrAbxgvaBpG7BFBN9h3tO+C3qX1QAVESmi4CiIA==", "requires": { "@babel/runtime": "^7.0.0", - "focus-lock": "^0.11.2", + "focus-lock": "^0.11.6", "prop-types": "^15.6.2", "react-clientside-effect": "^1.2.6", "use-callback-ref": "^1.3.0", @@ -19223,7 +19193,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.0.tgz", "integrity": "sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==", - "peer": true, "requires": { "tslib": "^2.0.0" } @@ -19232,7 +19201,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", - "peer": true, "requires": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" diff --git a/package.json b/package.json index 0dcea68f..a978f6e4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@nextcloud/sharing": "^0.1.0", "@nextcloud/vue": "7.11.2", "camelcase": "^7.0.1", - "filerobot-image-editor": "^4.4.0", + "filerobot-image-editor": "^4.5.1", "fuse.js": "^6.6.2", "hammerjs": "^2.0.8", "justified-layout": "^4.1.0", @@ -45,6 +45,7 @@ "path-posix": "^1.0.0", "photoswipe": "^5.3.7", "plyr": "^3.7.8", + "react-filerobot-image-editor": "^4.5.1", "reflect-metadata": "^0.1.13", "video.js": "^8.3.0", "vue": "^2.7.14", diff --git a/patches/filerobot-loadImage.js b/patches/filerobot-loadImage.js deleted file mode 100644 index dc602774..00000000 --- a/patches/filerobot-loadImage.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Filerobot has issues with loading images from HTML elements. - * We need to wait for the react object to be created properly before loading. - * This is a monkey patch to select an existing image using a global, but after wait. - */ - -import loadImageOriginal from './loadImageOriginal.js'; - -var loadImage = function() { - const image = globalThis._fileRobotOverrideImage; - if (image) { - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve(image); - }, 0); - }); - } - - return loadImageOriginal.apply(this, arguments); -} - -export default loadImage; \ No newline at end of file diff --git a/patches/filerobot-patch.sh b/patches/filerobot-patch.sh deleted file mode 100644 index 21fb6914..00000000 --- a/patches/filerobot-patch.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -target="node_modules/react-filerobot-image-editor/lib/utils" - -if [ -f $target/loadImageOriginal.js ]; then - echo "Filerobot is already patched, copying patch again ..." -else - if [ ! -f $target/loadImage.js ]; then - echo "Filerobot not installed or patch outdated" - exit 1 - fi - - echo "Patching filerobot-image-editor ..." - cp $target/loadImage.js $target/loadImageOriginal.js -fi - -cp patches/filerobot-loadImage.js $target/loadImage.js \ No newline at end of file diff --git a/src/components/viewer/ImageEditor.vue b/src/components/viewer/ImageEditor.vue index f39899e5..53793a00 100644 --- a/src/components/viewer/ImageEditor.vue +++ b/src/components/viewer/ImageEditor.vue @@ -141,10 +141,15 @@ export default defineComponent({ async mounted() { await loadFilerobot(); - globalThis._fileRobotOverrideImage = await this.getImage(); - const div = this.$refs.editor; - this.imageEditor = new FilerobotImageEditor(div, this.config); + + // Directly use an HTML element to make sure the resolution + // in the editor matches the original file, but we can work + // with a preview instead + const source = await this.getImage(); + const config = { ...this.config, source }; + + this.imageEditor = new FilerobotImageEditor(div, config); this.imageEditor.render(); // Handle keyboard @@ -155,7 +160,6 @@ export default defineComponent({ if (this.imageEditor) { this.imageEditor.terminate(); } - globalThis._fileRobotOverrideImage = undefined; window.removeEventListener('keydown', this.handleKeydown, true); },