From 622ef27ca6833e3dc9b8e12a7caa2d84e87f8dbe Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Thu, 25 Jul 2024 21:06:54 +0800 Subject: [PATCH] bump glodrei to its successor react-three/drei --- .storybook/preview.tsx | 2 +- package-lock.json | 305 ++++++++++++++++++++++++------------- package.json | 2 +- src/symbols/Cluster.tsx | 2 +- src/symbols/Edge.tsx | 2 +- src/symbols/Label.tsx | 2 +- src/symbols/Node.tsx | 2 +- src/symbols/Ring.tsx | 2 +- src/symbols/edges/Edge.tsx | 2 +- src/symbols/nodes/Svg.tsx | 6 +- 10 files changed, 211 insertions(+), 116 deletions(-) diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 480a9fa5..5fea76b7 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -1,4 +1,4 @@ -import { Stats } from 'glodrei'; +import { Stats } from '@react-three/drei'; import theme from './theme'; import { Preview } from '@storybook/react'; diff --git a/package-lock.json b/package-lock.json index 50f06a64..2aaa2c6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@react-spring/three": "9.6.1", + "@react-three/drei": "^9.109.2", "@react-three/fiber": "8.13.5", "camera-controls": "^2.8.3", "classnames": "^2.5.1", @@ -18,7 +19,6 @@ "d3-hierarchy": "^3.1.2", "d3-scale": "^4.0.2", "ellipsize": "^0.5.1", - "glodrei": "^0.0.1", "graphology": "^0.25.4", "graphology-layout": "^0.6.1", "graphology-layout-forceatlas2": "^0.10.1", @@ -4182,7 +4182,8 @@ "node_modules/@mediapipe/tasks-vision": { "version": "0.10.8", "resolved": "https://registry.npmjs.org/@mediapipe/tasks-vision/-/tasks-vision-0.10.8.tgz", - "integrity": "sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q==" + "integrity": "sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q==", + "license": "Apache-2.0" }, "node_modules/@microsoft/api-extractor": { "version": "7.39.0", @@ -5086,6 +5087,77 @@ "resolved": "https://registry.npmjs.org/@react-spring/types/-/types-9.6.1.tgz", "integrity": "sha512-POu8Mk0hIU3lRXB3bGIGe4VHIwwDsQyoD1F394OK7STTiX9w4dG3cTLljjYswkQN+hDSHRrj4O36kuVa7KPU8Q==" }, + "node_modules/@react-three/drei": { + "version": "9.109.2", + "resolved": "https://registry.npmjs.org/@react-three/drei/-/drei-9.109.2.tgz", + "integrity": "sha512-oUbfjiyPQeQch4Mi3jZvFKigMlc97/xvazxyjPBCGa8RP8cHZJl187eZI9Ha1WwkVaX80DfgN7bYAWXS4ywxmw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.11.2", + "@mediapipe/tasks-vision": "0.10.8", + "@monogrid/gainmap-js": "^3.0.5", + "@react-spring/three": "~9.6.1", + "@use-gesture/react": "^10.2.24", + "camera-controls": "^2.4.2", + "cross-env": "^7.0.3", + "detect-gpu": "^5.0.28", + "glsl-noise": "^0.0.0", + "hls.js": "1.3.5", + "maath": "^0.10.7", + "meshline": "^3.1.6", + "react-composer": "^5.0.3", + "stats-gl": "^2.0.0", + "stats.js": "^0.17.0", + "suspend-react": "^0.1.3", + "three-mesh-bvh": "^0.7.0", + "three-stdlib": "^2.29.9", + "troika-three-text": "^0.49.0", + "tunnel-rat": "^0.1.2", + "utility-types": "^3.10.0", + "uuid": "^9.0.1", + "zustand": "^3.7.1" + }, + "peerDependencies": { + "@react-three/fiber": ">=8.0", + "react": ">=18.0", + "react-dom": ">=18.0", + "three": ">=0.137" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/@react-three/drei/node_modules/@monogrid/gainmap-js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@monogrid/gainmap-js/-/gainmap-js-3.0.5.tgz", + "integrity": "sha512-53sCTG4FaJBaAq/tcufARtVYDMDGqyBT9i7F453pWGhZ5LqubDHDWtYoHo9VhQqMcHTEexdJqSsR58y+9HVmQA==", + "license": "MIT", + "dependencies": { + "promise-worker-transferable": "^1.0.4" + }, + "peerDependencies": { + "three": ">= 0.159.0" + } + }, + "node_modules/@react-three/drei/node_modules/zustand": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", + "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", + "license": "MIT", + "engines": { + "node": ">=12.7.0" + }, + "peerDependencies": { + "react": ">=16.8" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } + } + }, "node_modules/@react-three/fiber": { "version": "8.13.5", "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-8.13.5.tgz", @@ -7911,16 +7983,18 @@ "dev": true }, "node_modules/@use-gesture/core": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.0.tgz", - "integrity": "sha512-rh+6MND31zfHcy9VU3dOZCqGY511lvGcfyJenN4cWZe0u1BH6brBpBddLVXhF2r4BMqWbvxfsbL7D287thJU2A==" + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz", + "integrity": "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw==", + "license": "MIT" }, "node_modules/@use-gesture/react": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.0.tgz", - "integrity": "sha512-3zc+Ve99z4usVP6l9knYVbVnZgfqhKah7sIG+PS2w+vpig2v2OLct05vs+ZXMzwxdNCMka8B+8WlOo0z6Pn6DA==", + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@use-gesture/react/-/react-10.3.1.tgz", + "integrity": "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g==", + "license": "MIT", "dependencies": { - "@use-gesture/core": "10.3.0" + "@use-gesture/core": "10.3.1" }, "peerDependencies": { "react": ">= 16.8.0" @@ -8800,6 +8874,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "license": "MIT", "dependencies": { "require-from-string": "^2.0.2" } @@ -9718,6 +9793,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.1" }, @@ -10227,9 +10303,10 @@ } }, "node_modules/detect-gpu": { - "version": "5.0.38", - "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-5.0.38.tgz", - "integrity": "sha512-36QeGHSXYcJ/RfrnPEScR8GDprbXFG4ZhXsfVNVHztZr38+fRxgHnJl3CjYXXjbeRUhu3ZZBJh6Lg0A9v0Qd8A==", + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/detect-gpu/-/detect-gpu-5.0.40.tgz", + "integrity": "sha512-5v4jDN/ERdZZitD29UiLjV9Q9+lDfw2OhEJACIqnvdWulVZCy2K6EwonZ/VKyo4YMqvSIzGIDmojX3jGL3dLpA==", + "license": "MIT", "dependencies": { "webgl-constants": "^1.1.1" } @@ -12301,66 +12378,11 @@ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", "dev": true }, - "node_modules/glodrei": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/glodrei/-/glodrei-0.0.1.tgz", - "integrity": "sha512-DMx6ElCSwh1pR4IyDS3LvyFwZHSCCKCqdqo8P1G7klQtqH6PcOjleduCDsHehDtyYQ1E4dzVeoEzHIL1DIxjag==", - "dependencies": { - "@babel/runtime": "^7.11.2", - "@mediapipe/tasks-vision": "0.10.8", - "@react-spring/three": "~9.6.1", - "@use-gesture/react": "^10.2.24", - "camera-controls": "^2.4.2", - "cross-env": "^7.0.3", - "detect-gpu": "^5.0.28", - "glsl-noise": "^0.0.0", - "maath": "^0.10.7", - "meshline": "^3.1.6", - "react-composer": "^5.0.3", - "react-merge-refs": "^1.1.0", - "stats-gl": "^2.0.0", - "stats.js": "^0.17.0", - "suspend-react": "^0.1.3", - "three-mesh-bvh": "^0.7.0", - "three-stdlib": "^2.29.4", - "troika-three-text": "^0.47.2", - "tunnel-rat": "^0.1.2", - "utility-types": "^3.10.0", - "uuid": "^9.0.1", - "zustand": "^3.7.1" - }, - "peerDependencies": { - "@react-three/fiber": ">=8.0", - "react": ">=18.0", - "react-dom": ">=18.0", - "three": ">=0.137" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - } - } - }, - "node_modules/glodrei/node_modules/zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", - "engines": { - "node": ">=12.7.0" - }, - "peerDependencies": { - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "react": { - "optional": true - } - } - }, "node_modules/glsl-noise": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/glsl-noise/-/glsl-noise-0.0.0.tgz", - "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w==" + "integrity": "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w==", + "license": "MIT" }, "node_modules/gopd": { "version": "1.0.1", @@ -12612,6 +12634,12 @@ "he": "bin/he" } }, + "node_modules/hls.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.3.5.tgz", + "integrity": "sha512-uybAvKS6uDe0MnWNEPnO0krWVr+8m2R0hJ/viql8H3MVK+itq8gGQuIYoFHL3rECkIpNH98Lw8YuuWMKZxp3Ew==", + "license": "Apache-2.0" + }, "node_modules/hold-event": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/hold-event/-/hold-event-0.2.0.tgz", @@ -12760,6 +12788,12 @@ "node": ">= 4" } }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -13243,6 +13277,12 @@ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "license": "MIT" + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -14159,6 +14199,15 @@ "node": ">= 0.8.0" } }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/lil-gui": { "version": "0.17.0", "resolved": "https://registry.npmjs.org/lil-gui/-/lil-gui-0.17.0.tgz", @@ -14621,12 +14670,13 @@ } }, "node_modules/maath": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/maath/-/maath-0.10.7.tgz", - "integrity": "sha512-zQ2xd7dNOIVTjAS+hj22fyj1EFYmOJX6tzKjZ92r6WDoq8hyFxjuGA2q950tmR4iC/EKXoMQdSipkaJVuUHDTg==", + "version": "0.10.8", + "resolved": "https://registry.npmjs.org/maath/-/maath-0.10.8.tgz", + "integrity": "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==", + "license": "MIT", "peerDependencies": { - "@types/three": ">=0.144.0", - "three": ">=0.144.0" + "@types/three": ">=0.134.0", + "three": ">=0.134.0" } }, "node_modules/magic-string": { @@ -14965,9 +15015,10 @@ } }, "node_modules/meshline": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/meshline/-/meshline-3.2.0.tgz", - "integrity": "sha512-ZaJkC967GTuef7UBdO0rGPX544oIWaNo7tYedVHSoR2lje6RR16fX8IsgMxgxoYYERtjqsRWIYBSPBxG4QR84Q==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/meshline/-/meshline-3.3.1.tgz", + "integrity": "sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ==", + "license": "MIT", "peerDependencies": { "three": ">=0.137" } @@ -17493,6 +17544,16 @@ "node": ">=0.4.0" } }, + "node_modules/promise-worker-transferable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz", + "integrity": "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw==", + "license": "Apache-2.0", + "dependencies": { + "is-promise": "^2.1.0", + "lie": "^3.0.2" + } + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -17799,6 +17860,7 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/react-composer/-/react-composer-5.0.3.tgz", "integrity": "sha512-1uWd07EME6XZvMfapwZmc7NgCZqDemcvicRi3wMJzXsQLvZ3L7fTHVyPy1bZdnWXM4iPjYuNE+uJ41MLKeTtnA==", + "license": "MIT", "dependencies": { "prop-types": "^15.6.0" }, @@ -17905,15 +17967,6 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, - "node_modules/react-merge-refs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/react-merge-refs/-/react-merge-refs-1.1.0.tgz", - "integrity": "sha512-alTKsjEL0dKH/ru1Iyn7vliS2QRcBp9zZPGoWxUOvRGWPUYgjo+V01is7p04It6KhgrzhJGnIj9GgX8W4bZoCQ==", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/gregberge" - } - }, "node_modules/react-reconciler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.27.0.tgz", @@ -18356,6 +18409,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -18999,9 +19053,38 @@ "dev": true }, "node_modules/stats-gl": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.0.1.tgz", - "integrity": "sha512-EhFm1AxoSBK3MflkFawZ4jmOX1dWu0nBAtCpvGxGsondEvCpsohbpRpM8pi8UAcxG5eRsDsCiRcxdH20j3Rp9A==" + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/stats-gl/-/stats-gl-2.2.8.tgz", + "integrity": "sha512-94G5nZvduDmzxBS7K0lYnynYwreZpkknD8g5dZmU6mpwIhy3caCrjAm11Qm1cbyx7mqix7Fp00RkbsonzKWnoQ==", + "license": "MIT", + "dependencies": { + "@types/three": "^0.163.0" + } + }, + "node_modules/stats-gl/node_modules/@tweenjs/tween.js": { + "version": "23.1.2", + "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.2.tgz", + "integrity": "sha512-kMCNaZCJugWI86xiEHaY338CU5JpD0B97p1j1IKNn/Zto8PgACjQx0UxbHjmOcLl/dDOBnItwD07KmCs75pxtQ==", + "license": "MIT" + }, + "node_modules/stats-gl/node_modules/@types/three": { + "version": "0.163.0", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.163.0.tgz", + "integrity": "sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA==", + "license": "MIT", + "dependencies": { + "@tweenjs/tween.js": "~23.1.1", + "@types/stats.js": "*", + "@types/webxr": "*", + "fflate": "~0.8.2", + "meshoptimizer": "~0.18.1" + } + }, + "node_modules/stats-gl/node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "license": "MIT" }, "node_modules/stats.js": { "version": "0.17.0", @@ -19614,17 +19697,19 @@ "integrity": "sha512-Uzz8C/5GesJzv8i+Y2prEMYUwodwZySPcNhuJUdsVMH2Yn4Nm8qlbQe6qRN5fOhg55XB0WiLfTPBxVHxpE60ug==" }, "node_modules/three-mesh-bvh": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.7.3.tgz", - "integrity": "sha512-3W6KjzmupjfE89GuHPT31kxKWZ4YGZPEZJNysJpiOZfQRsBQQgmK7v/VJPpjG6syhAvTnY+5Fr77EvIkTLpGSw==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.7.6.tgz", + "integrity": "sha512-rCjsnxEqR9r1/C/lCqzGLS67NDty/S/eT6rAJfDvsanrIctTWdNoR4ZOGWewCB13h1QkVo2BpmC0wakj1+0m8A==", + "license": "MIT", "peerDependencies": { "three": ">= 0.151.0" } }, "node_modules/three-stdlib": { - "version": "2.29.5", - "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.29.5.tgz", - "integrity": "sha512-p9IQsH7gT9wVqAuMsimX2JTtEoCGHlwgm3HsAeXwWqP/PWV9DjYldbggLCr0B1TMzofi/58GG1X5KTQnG6ijpw==", + "version": "2.30.4", + "resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.30.4.tgz", + "integrity": "sha512-E7sN8UkaorSq2uRZU14AE7wXkdCBa2oFwPkPt92zaecuzrgd98BXkTt+2tFQVF1tPJRvfs7aMZV5dSOq4/vNVg==", + "license": "MIT", "dependencies": { "@types/draco3d": "^1.4.0", "@types/offscreencanvas": "^2019.6.4", @@ -19792,13 +19877,14 @@ } }, "node_modules/troika-three-text": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.47.2.tgz", - "integrity": "sha512-qylT0F+U7xGs+/PEf3ujBdJMYWbn0Qci0kLqI5BJG2kW1wdg4T1XSxneypnF05DxFqJhEzuaOR9S2SjiyknMng==", + "version": "0.49.1", + "resolved": "https://registry.npmjs.org/troika-three-text/-/troika-three-text-0.49.1.tgz", + "integrity": "sha512-lXGWxgjJP9kw4i4Wh+0k0Q/7cRfS6iOME4knKht/KozPu9GcFA9NnNpRvehIhrUawq9B0ZRw+0oiFHgRO+4Wig==", + "license": "MIT", "dependencies": { "bidi-js": "^1.0.2", - "troika-three-utils": "^0.47.2", - "troika-worker-utils": "^0.47.2", + "troika-three-utils": "^0.49.0", + "troika-worker-utils": "^0.49.0", "webgl-sdf-generator": "1.1.1" }, "peerDependencies": { @@ -19806,17 +19892,19 @@ } }, "node_modules/troika-three-utils": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.47.2.tgz", - "integrity": "sha512-/28plhCxfKtH7MSxEGx8e3b/OXU5A0xlwl+Sbdp0H8FXUHKZDoksduEKmjQayXYtxAyuUiCRunYIv/8Vi7aiyg==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/troika-three-utils/-/troika-three-utils-0.49.0.tgz", + "integrity": "sha512-umitFL4cT+Fm/uONmaQEq4oZlyRHWwVClaS6ZrdcueRvwc2w+cpNQ47LlJKJswpqtMFWbEhOLy0TekmcPZOdYA==", + "license": "MIT", "peerDependencies": { "three": ">=0.125.0" } }, "node_modules/troika-worker-utils": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.47.2.tgz", - "integrity": "sha512-mzss4MeyzUkYBppn4x5cdAqrhBHFEuVmMMgLMTyFV23x6GvQMyo+/R5E5Lsbrt7WSt5RfvewjcwD1DChRTA9lA==" + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/troika-worker-utils/-/troika-worker-utils-0.49.0.tgz", + "integrity": "sha512-1xZHoJrG0HFfCvT/iyN41DvI/nRykiBtHqFkGaGgJwq5iXfIZFBiPPEHFpPpgyKM3Oo5ITHXP5wM2TNQszYdVg==", + "license": "MIT" }, "node_modules/trough": { "version": "2.2.0", @@ -19900,6 +19988,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/tunnel-rat/-/tunnel-rat-0.1.2.tgz", "integrity": "sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ==", + "license": "MIT", "dependencies": { "zustand": "^4.3.2" } @@ -20419,6 +20508,7 @@ "version": "3.11.0", "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz", "integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==", + "license": "MIT", "engines": { "node": ">= 4" } @@ -21577,7 +21667,8 @@ "node_modules/webgl-sdf-generator": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/webgl-sdf-generator/-/webgl-sdf-generator-1.1.1.tgz", - "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==" + "integrity": "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA==", + "license": "MIT" }, "node_modules/webidl-conversions": { "version": "7.0.0", diff --git a/package.json b/package.json index e05ed577..befbb162 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "homepage": "https://github.com/reaviz/reagraph#readme", "dependencies": { "@react-spring/three": "9.6.1", + "@react-three/drei": "^9.109.2", "@react-three/fiber": "8.13.5", "camera-controls": "^2.8.3", "classnames": "^2.5.1", @@ -60,7 +61,6 @@ "d3-hierarchy": "^3.1.2", "d3-scale": "^4.0.2", "ellipsize": "^0.5.1", - "glodrei": "^0.0.1", "graphology": "^0.25.4", "graphology-layout": "^0.6.1", "graphology-layout-forceatlas2": "^0.10.1", diff --git a/src/symbols/Cluster.tsx b/src/symbols/Cluster.tsx index 6f4c4cda..9b0f0602 100644 --- a/src/symbols/Cluster.tsx +++ b/src/symbols/Cluster.tsx @@ -4,7 +4,7 @@ import { useSpring, a } from '@react-spring/three'; import { Color, DoubleSide } from 'three'; import { useStore } from '../store'; import { Label } from './Label'; -import { useCursor } from 'glodrei'; +import { useCursor } from '@react-three/drei'; import { ThreeEvent } from '@react-three/fiber'; export type ClusterEventArgs = Omit; diff --git a/src/symbols/Edge.tsx b/src/symbols/Edge.tsx index ae824d68..b777d4d2 100644 --- a/src/symbols/Edge.tsx +++ b/src/symbols/Edge.tsx @@ -15,7 +15,7 @@ import { import { Line } from './Line'; import { useStore } from '../store'; import { ContextMenuEvent, InternalGraphEdge } from '../types'; -import { Html, useCursor } from 'glodrei'; +import { Html, useCursor } from '@react-three/drei'; import { useHoverIntent } from '../utils/useHoverIntent'; import { Euler, Vector3 } from 'three'; import { ThreeEvent } from '@react-three/fiber'; diff --git a/src/symbols/Label.tsx b/src/symbols/Label.tsx index 888bf512..ff0a76f4 100644 --- a/src/symbols/Label.tsx +++ b/src/symbols/Label.tsx @@ -1,5 +1,5 @@ import React, { FC, useMemo } from 'react'; -import { Billboard, Text } from 'glodrei'; +import { Billboard, Text } from '@react-three/drei'; import { Color, ColorRepresentation, Euler } from 'three'; import ellipsize from 'ellipsize'; diff --git a/src/symbols/Node.tsx b/src/symbols/Node.tsx index 621025ae..3909d01e 100644 --- a/src/symbols/Node.tsx +++ b/src/symbols/Node.tsx @@ -18,7 +18,7 @@ import { NodeRenderer, CollapseProps } from '../types'; -import { Html, useCursor } from 'glodrei'; +import { Html, useCursor } from '@react-three/drei'; import { useCameraControls } from '../CameraControls'; import { useStore } from '../store'; import { useDrag } from '../utils/useDrag'; diff --git a/src/symbols/Ring.tsx b/src/symbols/Ring.tsx index 3d5f1dc2..d7b79678 100644 --- a/src/symbols/Ring.tsx +++ b/src/symbols/Ring.tsx @@ -2,7 +2,7 @@ import React, { FC, useMemo } from 'react'; import { Color, ColorRepresentation, DoubleSide } from 'three'; import { animationConfig } from '../utils/animation'; import { useSpring, a } from '@react-spring/three'; -import { Billboard } from 'glodrei'; +import { Billboard } from '@react-three/drei'; export interface RingProps { /** diff --git a/src/symbols/edges/Edge.tsx b/src/symbols/edges/Edge.tsx index b2a3ae67..cb2096cd 100644 --- a/src/symbols/edges/Edge.tsx +++ b/src/symbols/edges/Edge.tsx @@ -1,6 +1,6 @@ import React, { FC, useCallback, useMemo } from 'react'; import { useSpring, a } from '@react-spring/three'; -import { Html } from 'glodrei'; +import { Html } from '@react-three/drei'; import { ColorRepresentation, Euler } from 'three'; import { useStore } from '../../store'; diff --git a/src/symbols/nodes/Svg.tsx b/src/symbols/nodes/Svg.tsx index 25585be6..6ec86941 100644 --- a/src/symbols/nodes/Svg.tsx +++ b/src/symbols/nodes/Svg.tsx @@ -2,7 +2,11 @@ import React, { FC, useMemo } from 'react'; import { a, useSpring } from '@react-spring/three'; import { animationConfig } from '../../utils'; import { NodeRendererProps } from '../../types'; -import { Billboard, Svg as DreiSvg, SvgProps as DreiSvgProps } from 'glodrei'; +import { + Billboard, + Svg as DreiSvg, + SvgProps as DreiSvgProps +} from '@react-three/drei'; import { Color, DoubleSide } from 'three'; export type SvgProps = NodeRendererProps &