diff --git a/client/package-lock.json b/client/package-lock.json index c457419..a1946d3 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -12,6 +12,7 @@ "@devbookhq/splitter": "^1.4.2", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", + "@hello-pangea/dnd": "^16.6.0", "@monaco-editor/react": "^4.5.2", "@mui/icons-material": "^5.15.10", "@mui/lab": "^5.0.0-alpha.146", @@ -54,7 +55,6 @@ "protocol": "file:../protocol", "react": "^19.0.0-beta-26f2496093-20240514", "react-async-hook": "^4.0.0", - "react-beautiful-dnd": "^13.1.1", "react-colorful": "^5.6.1", "react-d3-tree": "^3.6.1", "react-dnd": "^16.0.1", @@ -1548,6 +1548,88 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, + "node_modules/@hello-pangea/dnd": { + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/@hello-pangea/dnd/-/dnd-16.6.0.tgz", + "integrity": "sha512-vfZ4GydqbtUPXSLfAvKvXQ6xwRzIjUSjVU0Sx+70VOhc2xx6CdmJXJ8YhH70RpbTUGjxctslQTHul9sIOxCfFQ==", + "dependencies": { + "@babel/runtime": "^7.24.1", + "css-box-model": "^1.2.1", + "memoize-one": "^6.0.0", + "raf-schd": "^4.0.3", + "react-redux": "^8.1.3", + "redux": "^4.2.1", + "use-memo-one": "^1.1.3" + }, + "peerDependencies": { + "react": "^16.8.5 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@hello-pangea/dnd/node_modules/memoize-one": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz", + "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==" + }, + "node_modules/@hello-pangea/dnd/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "node_modules/@hello-pangea/dnd/node_modules/react-redux": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-8.1.3.tgz", + "integrity": "sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==", + "dependencies": { + "@babel/runtime": "^7.12.1", + "@types/hoist-non-react-statics": "^3.3.1", + "@types/use-sync-external-store": "^0.0.3", + "hoist-non-react-statics": "^3.3.2", + "react-is": "^18.0.0", + "use-sync-external-store": "^1.0.0" + }, + "peerDependencies": { + "@types/react": "^16.8 || ^17.0 || ^18.0", + "@types/react-dom": "^16.8 || ^17.0 || ^18.0", + "react": "^16.8 || ^17.0 || ^18.0", + "react-dom": "^16.8 || ^17.0 || ^18.0", + "react-native": ">=0.59", + "redux": "^4 || ^5.0.0-beta.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, + "node_modules/@hello-pangea/dnd/node_modules/react-redux/node_modules/use-sync-external-store": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", + "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@hello-pangea/dnd/node_modules/use-memo-one": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz", + "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -2243,6 +2325,134 @@ "react-dom": ">=16.8.0" } }, + "node_modules/@mui/lab/node_modules/@mui/system": { + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.14", + "@mui/styled-engine": "^5.15.14", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/@mui/system/node_modules/@mui/private-theming": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.14", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/@mui/system/node_modules/@mui/styled-engine": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", + "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.11.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/@mui/utils": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@types/prop-types": "^15.7.11", + "prop-types": "^15.8.1", + "react-is": "^18.2.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0", + "react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/lab/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, "node_modules/@mui/material": { "version": "5.15.18", "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.18.tgz", @@ -2330,18 +2540,18 @@ "react-dom": ">=16.8.0" } }, - "node_modules/@mui/material/node_modules/react-is": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" - }, - "node_modules/@mui/private-theming": { - "version": "5.15.14", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", - "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", + "node_modules/@mui/material/node_modules/@mui/system": { + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", "dependencies": { "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.14", + "@mui/styled-engine": "^5.15.14", + "@mui/types": "^7.2.14", "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { @@ -2352,23 +2562,30 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", "@types/react": "^17.0.0 || ^18.0.0", "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, "@types/react": { "optional": true } } }, - "node_modules/@mui/styled-engine": { + "node_modules/@mui/material/node_modules/@mui/system/node_modules/@mui/private-theming": { "version": "5.15.14", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", - "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", "dependencies": { "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.11.0", - "csstype": "^3.1.3", + "@mui/utils": "^5.15.14", "prop-types": "^15.8.1" }, "engines": { @@ -2379,30 +2596,22 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@emotion/react": "^11.4.1", - "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0", "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { + "@types/react": { "optional": true } } }, - "node_modules/@mui/system": { - "version": "5.15.15", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", - "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", + "node_modules/@mui/material/node_modules/@mui/system/node_modules/@mui/styled-engine": { + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", + "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.14", - "@mui/styled-engine": "^5.15.14", - "@mui/types": "^7.2.14", - "@mui/utils": "^5.15.14", - "clsx": "^2.1.0", + "@emotion/cache": "^11.11.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, @@ -2414,9 +2623,8 @@ "url": "https://opencollective.com/mui-org" }, "peerDependencies": { - "@emotion/react": "^11.5.0", + "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0", "react": "^17.0.0 || ^18.0.0" }, "peerDependenciesMeta": { @@ -2425,26 +2633,10 @@ }, "@emotion/styled": { "optional": true - }, - "@types/react": { - "optional": true } } }, - "node_modules/@mui/types": { - "version": "7.2.14", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", - "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils": { + "node_modules/@mui/material/node_modules/@mui/utils": { "version": "5.15.14", "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", @@ -2471,10 +2663,23 @@ } } }, - "node_modules/@mui/utils/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "node_modules/@mui/material/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, + "node_modules/@mui/types": { + "version": "7.2.14", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", + "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -2938,22 +3143,11 @@ "version": "18.2.19", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", - "dev": true, + "devOptional": true, "dependencies": { "@types/react": "*" } }, - "node_modules/@types/react-redux": { - "version": "7.1.33", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.33.tgz", - "integrity": "sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg==", - "dependencies": { - "@types/hoist-non-react-statics": "^3.3.0", - "@types/react": "*", - "hoist-non-react-statics": "^3.3.0", - "redux": "^4.0.0" - } - }, "node_modules/@types/react-transition-group": { "version": "4.4.10", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", @@ -2997,6 +3191,11 @@ "integrity": "sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg==", "dev": true }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz", + "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==" + }, "node_modules/@types/yargs": { "version": "13.0.12", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.12.tgz", @@ -6466,9 +6665,9 @@ } }, "node_modules/hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.5.tgz", + "integrity": "sha512-fedL7PRwmeVkgyhu9hLeTBaI6wcGk7JGJswdaRsa5aUbkXI1kr1xZwTPBtaYPpwf56878iDek6VbVnuWMebJmw==" }, "node_modules/iconv-lite": { "version": "0.6.3", @@ -7471,11 +7670,6 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, - "node_modules/memoize-one": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz", - "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==" - }, "node_modules/memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -7672,9 +7866,9 @@ } }, "node_modules/nano-css/node_modules/stylis": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", - "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" }, "node_modules/nanoid": { "version": "5.0.5", @@ -8497,9 +8691,9 @@ } }, "node_modules/react": { - "version": "19.0.0-beta-26f2496093-20240514", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-beta-26f2496093-20240514.tgz", - "integrity": "sha512-ZsU/WjNZ6GfzMWsq2DcGjElpV9it8JmETHm9mAJuOJNhuJcWJxt8ltCJabONFRpDFq1A/DP0d0KFj9CTJVM4VA==", + "version": "19.0.0-rc-f994737d14-20240522", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc-f994737d14-20240522.tgz", + "integrity": "sha512-SeU2v5Xy6FotVhKz0pMS2gvYP7HlkF0qgTskj3JzA1vlxcb3dQjxlm9t0ZlJqcgoyI3VFAw7bomuDMdgy1nBuw==", "engines": { "node": ">=0.10.0" } @@ -8516,24 +8710,6 @@ "react": ">=16.8" } }, - "node_modules/react-beautiful-dnd": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", - "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", - "dependencies": { - "@babel/runtime": "^7.9.2", - "css-box-model": "^1.2.0", - "memoize-one": "^5.1.1", - "raf-schd": "^4.0.2", - "react-redux": "^7.2.0", - "redux": "^4.0.4", - "use-memo-one": "^1.1.1" - }, - "peerDependencies": { - "react": "^16.8.5 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-colorful": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/react-colorful/-/react-colorful-5.6.1.tgz", @@ -8626,14 +8802,14 @@ } }, "node_modules/react-dom": { - "version": "19.0.0-beta-26f2496093-20240514", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-beta-26f2496093-20240514.tgz", - "integrity": "sha512-UvQ+K1l3DFQ34LDgfFSNuUGi9EC+yfE9tS6MdpNTd5fx7qC7KLfepfC/KpxWMQZ7JfE3axD4ZO6H4cBSpAZpqw==", + "version": "19.0.0-rc-f994737d14-20240522", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc-f994737d14-20240522.tgz", + "integrity": "sha512-J4CsfTSptPKkhaPbaR6n/KohQiHZTrRZ8GL4H8rbAqN/Qpy69g2MIoLBr5/PUX21ye6JxC1ZRWJFna7Xdg1pdA==", "dependencies": { - "scheduler": "0.25.0-beta-26f2496093-20240514" + "scheduler": "0.25.0-rc-f994737d14-20240522" }, "peerDependencies": { - "react": "19.0.0-beta-26f2496093-20240514" + "react": "19.0.0-rc-f994737d14-20240522" } }, "node_modules/react-error-boundary": { @@ -8665,30 +8841,6 @@ "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, - "node_modules/react-redux": { - "version": "7.2.9", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz", - "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==", - "dependencies": { - "@babel/runtime": "^7.15.4", - "@types/react-redux": "^7.1.20", - "hoist-non-react-statics": "^3.3.2", - "loose-envify": "^1.4.0", - "prop-types": "^15.7.2", - "react-is": "^17.0.2" - }, - "peerDependencies": { - "react": "^16.8.3 || ^17 || ^18" - }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } - } - }, "node_modules/react-refresh": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", @@ -9212,9 +9364,9 @@ } }, "node_modules/scheduler": { - "version": "0.25.0-beta-26f2496093-20240514", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-beta-26f2496093-20240514.tgz", - "integrity": "sha512-vDwOytLHFnA3SW2B1lNcbO+/qKVyLCX+KLpm+tRGNDsXpyxzRgkIaYGWmX+S70AJGchUHCtuqQ50GFeFgDbXUw==" + "version": "0.25.0-rc-f994737d14-20240522", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc-f994737d14-20240522.tgz", + "integrity": "sha512-qS+xGFF7AljP2APO2iJe8zESNsK20k25MACz+WGOXPybUsRdi1ssvaoF93im2nSX2q/XT3wKkjdz6RQfbmaxdw==" }, "node_modules/screenfull": { "version": "5.2.0", @@ -10229,14 +10381,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/use-memo-one": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz", - "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/utif2": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/utif2/-/utif2-4.1.0.tgz", diff --git a/client/package.json b/client/package.json index c8f43f8..7b44398 100644 --- a/client/package.json +++ b/client/package.json @@ -7,6 +7,7 @@ "@devbookhq/splitter": "^1.4.2", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", + "@hello-pangea/dnd": "^16.6.0", "@monaco-editor/react": "^4.5.2", "@mui/icons-material": "^5.15.10", "@mui/lab": "^5.0.0-alpha.146", @@ -49,7 +50,6 @@ "protocol": "file:../protocol", "react": "^19.0.0-beta-26f2496093-20240514", "react-async-hook": "^4.0.0", - "react-beautiful-dnd": "^13.1.1", "react-colorful": "^5.6.1", "react-d3-tree": "^3.6.1", "react-dnd": "^16.0.1", diff --git a/client/src/Sidebar.tsx b/client/src/Sidebar.tsx index b28cb36..3bd0d9d 100644 --- a/client/src/Sidebar.tsx +++ b/client/src/Sidebar.tsx @@ -89,6 +89,10 @@ export function useSidebarBackground() { ); } +function Divider2() { + return ; +} + export function Sidebar({ children }: { children?: ReactNode }) { const { isPrimary } = useSyncStatus(); const { Content, produceRoot, root, setRoot, setOpen, tab, open } = @@ -150,7 +154,7 @@ export function Sidebar({ children }: { children?: ReactNode }) { ) .flatMap((c, i, cx) => [ !sm && !!i && c.color !== cx[i - 1].color && ( - + ), { diff --git a/client/src/client/internal.ts b/client/src/client/internal.ts index 4c16236..74b3ab0 100644 --- a/client/src/client/internal.ts +++ b/client/src/client/internal.ts @@ -1,8 +1,8 @@ import { Dictionary, chain as _, entries, find, map } from "lodash"; -import { PathfindingTask, Scheme } from "protocol/SolveTask"; +import memoizee from "memoizee"; +import { Scheme } from "protocol/SolveTask"; import url from "url-parse"; import { Transport } from "./Transport"; -import memoizee from "memoizee"; const paths = import.meta.glob("/public/maps/*.grid", { as: "url", diff --git a/client/src/components/generic/ListEditor.tsx b/client/src/components/generic/ListEditor.tsx index 7b7ed99..6ba3525 100644 --- a/client/src/components/generic/ListEditor.tsx +++ b/client/src/components/generic/ListEditor.tsx @@ -3,7 +3,6 @@ import { ClearOutlined as DeleteIcon, DragHandleOutlined, EditOutlined as EditIcon, - LabelOutlined as LabelIcon, } from "@mui/icons-material"; import { Box, @@ -19,12 +18,11 @@ import { SxProps, Theme, Typography, - alpha, useTheme, } from "@mui/material"; import { defer, filter, map, sortBy, uniqBy } from "lodash"; import { nanoid as id } from "nanoid"; -import { DragDropContext, Draggable, Droppable } from "react-beautiful-dnd"; +import { DragDropContext, Draggable, Droppable } from "@hello-pangea/dnd"; import { CSSProperties, @@ -41,7 +39,10 @@ import { useAcrylic, usePaper } from "theme"; import { Flex } from "./Flex"; export const DefaultListEditorInput = forwardRef(function StyledInputBase( - props: ComponentProps, + { + onValueChange, + ...props + }: ComponentProps & { onValueChange?: (v: string) => void }, ref ) { return ( @@ -381,7 +382,12 @@ export default function Editor(props: Props) { } > - + {(provided) => (
{(() => { diff --git a/client/src/components/layer-editor/LayerEditor.tsx b/client/src/components/layer-editor/LayerEditor.tsx index d0f65f9..3c41213 100644 --- a/client/src/components/layer-editor/LayerEditor.tsx +++ b/client/src/components/layer-editor/LayerEditor.tsx @@ -26,17 +26,9 @@ import { startCase, truncate, } from "lodash"; -import { - ForwardedRef, - ReactNode, - createElement, - forwardRef, - useEffect, - useMemo, - useState, -} from "react"; +import { ReactNode, createElement, useEffect, useMemo, useState } from "react"; import { Layer } from "slices/layers"; -import { useAcrylic, usePaper } from "theme"; +import { usePaper } from "theme"; const compositeOperations = [ "color", @@ -100,7 +92,10 @@ function useDraft( ] as const; } -function Component({ value, onValueChange: onChange }: LayerEditorProps) { +export function LayerEditor({ + value, + onValueChange: onChange, +}: LayerEditorProps) { const paper = usePaper(); const [draft, setDraft] = useDraft(value, onChange, 300, [ "name", @@ -273,5 +268,3 @@ function Component({ value, onValueChange: onChange }: LayerEditorProps) { ); } - -export const LayerEditor = forwardRef(Component); diff --git a/client/src/layers/trace/index.tsx b/client/src/layers/trace/index.tsx index a10cda5..5c2fbc7 100644 --- a/client/src/layers/trace/index.tsx +++ b/client/src/layers/trace/index.tsx @@ -172,7 +172,7 @@ export const controller = { notify("Opening trace..."); try { const output = readUploadedTrace(file); - return { trace: { ...(await output.read()) } }; + return { trace: await output.read() }; } catch (e) { console.error(e); notify(`Error opening, ${get(e, "message")}`); @@ -274,7 +274,7 @@ export const controller = { const parsedTrace = await parseTrace(); produce((l) => { set(l, "source.parsedTrace", parsedTrace); - // set(l, "viewKey", id()); + set(l, "viewKey", id()); }); } }, [loading, parseTrace]); diff --git a/client/src/pages/SettingsPage.tsx b/client/src/pages/SettingsPage.tsx index 9f79157..144490e 100644 --- a/client/src/pages/SettingsPage.tsx +++ b/client/src/pages/SettingsPage.tsx @@ -289,6 +289,10 @@ export function SettingsPage({ template: Page }: PageContentProps) { const a = keys(mapParsers).map((c) => ({ key: c })); type A = (typeof a)[number]; +function Sink({ children }: { children?: ReactNode }) { + return children; +} + export function MapParserListEditor() { return ( @@ -298,12 +302,12 @@ export function MapParserListEditor() { addable={false} deletable={false} editor={(v) => ( - + - + )} icon={null} value={a} diff --git a/client/src/pages/TreePage.tsx b/client/src/pages/TreePage.tsx index 709af8e..9f7a736 100644 --- a/client/src/pages/TreePage.tsx +++ b/client/src/pages/TreePage.tsx @@ -219,7 +219,7 @@ export function TreeGraph({ }); const numParents: Dictionary> = {}; - forEach(trace?.events, ({ id, pId, type }, i) => { + forEach(trace?.events, ({ id, pId }) => { if (id && pId) { numParents[id] = numParents[id] ?? new Set(); numParents[id].add(pId); @@ -400,8 +400,6 @@ export function TreePage({ template: Page }: PageContentProps) { const [trackedProperty, setTrackedProperty] = useState(""); const trace = layer?.source?.trace?.content; - const lastModified = layer?.source?.trace?.lastModified; - const id = layer?.source?.trace?.key; // Reset tracked property useEffect(() => { @@ -422,12 +420,7 @@ export function TreePage({ template: Page }: PageContentProps) { return { events, current: findLast(events, (c) => c.step <= step) }; }, [selection, step]); - const params = useMemo( - () => ({ trace, mode }), - [trace, id, lastModified, mode] - ); - - const { result: tree, loading } = useTreeMemo(params, [params]); + const { result: tree, loading } = useTreeMemo({ trace, mode }, [key, mode]); const settings = useMemo( () => diff --git a/client/src/pages/ViewportPage.tsx b/client/src/pages/ViewportPage.tsx index ec2e050..e391388 100644 --- a/client/src/pages/ViewportPage.tsx +++ b/client/src/pages/ViewportPage.tsx @@ -1,5 +1,6 @@ import { BlurCircularOutlined, + CameraOutlined, CenterFocusWeakOutlined, LayersOutlined, TimesOneMobiledataOutlined, @@ -11,6 +12,7 @@ import { Flex } from "components/generic/Flex"; import { IconButtonWithTooltip } from "components/generic/IconButtonWithTooltip"; import { TraceRenderer } from "components/inspector/TraceRenderer"; import { useViewTreeContext } from "components/inspector/ViewTree"; +import download from "downloadjs"; import { inferLayerName } from "layers/inferLayerName"; import { Dictionary, @@ -29,6 +31,7 @@ import { useLayers } from "slices/layers"; import { Renderer, useRenderers } from "slices/renderers"; import { PanelState } from "slices/view"; import { useAcrylic, usePaper } from "theme"; +import { generateUsername as id } from "unique-username-generator"; import { PageContentProps } from "./PageMeta"; import { useRendererResolver } from "./useRendererResolver"; @@ -122,7 +125,6 @@ export function ViewportPage({ template: Page }: PageContentProps) { label="Fit" icon={} /> - {divider} } label="1 to 1" /> + {divider} + { + const a = await rendererInstance?.toDataUrl(); + if (a) { + download(a, id("-")); + } + }} + icon={} + label="capture-screenshot" + /> diff --git a/client/src/services/BootstrapService.tsx b/client/src/services/BootstrapService.tsx index f6f8680..9d5e4c2 100644 --- a/client/src/services/BootstrapService.tsx +++ b/client/src/services/BootstrapService.tsx @@ -6,9 +6,8 @@ export function BootstrapService() { const { load } = useWorkspace(); useAsync(async () => { try { - const param = new URLSearchParams(location.search).get("workspace"); - if (param) { - const workspace = decodeURIComponent(param); + const workspace = new URLSearchParams(location.search).get("workspace"); + if (workspace && isWorkspace(workspace)) { if (isWorkspace(workspace)) { const name = workspace.split("/").pop() ?? workspace; const a = await fetch(workspace); diff --git a/client/src/services/LayerService.tsx b/client/src/services/LayerService.tsx index 3d0b7be..841cec1 100644 --- a/client/src/services/LayerService.tsx +++ b/client/src/services/LayerService.tsx @@ -6,7 +6,7 @@ import { useSyncStatus } from "./SyncService"; function useLayerServices() { const { isPrimary } = useSyncStatus(); - const [{ layers }, setLayers] = useLayers(); + const [{ layers }, setLayers, , c1] = useLayers(); return useMemo(() => { return !isPrimary ? [] @@ -23,7 +23,7 @@ function useLayerServices() { }); } }); - }, [layers, setLayers, isPrimary]); + }, [c1, setLayers, isPrimary]); } export function LayerService() { diff --git a/client/src/services/SettingsService.tsx b/client/src/services/SettingsService.tsx index 78afc08..498c2bb 100644 --- a/client/src/services/SettingsService.tsx +++ b/client/src/services/SettingsService.tsx @@ -8,7 +8,8 @@ export function SettingsService() { useSettings(); const [, setUIState] = useUIState(); useEffect(() => { - if (!minimal && showOnStart && initialised) { + const workspace = new URLSearchParams(location.search).get("workspace"); + if (!minimal && showOnStart && initialised && !workspace) { setUIState(() => ({ fullscreenModal: showOnStart })); } }, [initialised, minimal]); diff --git a/client/vite.config.ts b/client/vite.config.ts index d6e43ac..dc07e22 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -16,7 +16,7 @@ export default defineConfig(({ mode }) => ({ plugins: [ react({ babel: { - plugins: [["babel-plugin-react-compiler", ReactCompilerConfig]], + // plugins: [["babel-plugin-react-compiler", ReactCompilerConfig]], }, }), viteTsconfigPaths(), diff --git a/package-lock.json b/package-lock.json index dc8d126..c0b7df0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,55 @@ "name": "app", "version": "1.0.5", "hasInstallScript": true, - "license": "ISC" + "license": "ISC", + "dependencies": { + "react": "^19.0.0-beta-26f2496093-20240514", + "react-dom": "^19.0.0-beta-26f2496093-20240514" + } + }, + "node_modules/react": { + "version": "19.0.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-ZsU/WjNZ6GfzMWsq2DcGjElpV9it8JmETHm9mAJuOJNhuJcWJxt8ltCJabONFRpDFq1A/DP0d0KFj9CTJVM4VA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.0.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-UvQ+K1l3DFQ34LDgfFSNuUGi9EC+yfE9tS6MdpNTd5fx7qC7KLfepfC/KpxWMQZ7JfE3axD4ZO6H4cBSpAZpqw==", + "dependencies": { + "scheduler": "0.25.0-beta-26f2496093-20240514" + }, + "peerDependencies": { + "react": "19.0.0-beta-26f2496093-20240514" + } + }, + "node_modules/scheduler": { + "version": "0.25.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-vDwOytLHFnA3SW2B1lNcbO+/qKVyLCX+KLpm+tRGNDsXpyxzRgkIaYGWmX+S70AJGchUHCtuqQ50GFeFgDbXUw==" + } + }, + "dependencies": { + "react": { + "version": "19.0.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-ZsU/WjNZ6GfzMWsq2DcGjElpV9it8JmETHm9mAJuOJNhuJcWJxt8ltCJabONFRpDFq1A/DP0d0KFj9CTJVM4VA==" + }, + "react-dom": { + "version": "19.0.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-UvQ+K1l3DFQ34LDgfFSNuUGi9EC+yfE9tS6MdpNTd5fx7qC7KLfepfC/KpxWMQZ7JfE3axD4ZO6H4cBSpAZpqw==", + "requires": { + "scheduler": "0.25.0-beta-26f2496093-20240514" + } + }, + "scheduler": { + "version": "0.25.0-beta-26f2496093-20240514", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-beta-26f2496093-20240514.tgz", + "integrity": "sha512-vDwOytLHFnA3SW2B1lNcbO+/qKVyLCX+KLpm+tRGNDsXpyxzRgkIaYGWmX+S70AJGchUHCtuqQ50GFeFgDbXUw==" } } } diff --git a/package.json b/package.json index 896db18..3d56e93 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,9 @@ "url": "https://github.com/ShortestPathLab/posthoc-app/issues" }, "homepage": "posthoc.pathfinding.ai", - "dependencies": {}, + "dependencies": { + "react": "^19.0.0-beta-26f2496093-20240514", + "react-dom": "^19.0.0-beta-26f2496093-20240514" + }, "type": "module" }