From 874e6fc2c6a3705e52aa7f13726777b69b2b77c2 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 10:41:20 +0000 Subject: [PATCH 01/19] export all types --- package.json | 2 +- types/index.d.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 types/index.d.ts diff --git a/package.json b/package.json index e3a4867f..ea6d3615 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", "module": "dist/index.js", - "types": "dist/index.d.ts", + "types": "types/index.d.ts", "type": "module", "scripts": { "build": "rollup -c", diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 00000000..473c3bea --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,16 @@ +export * from './AssetsApi' +export * from './FormState' +export * from './Item' +export * from './ItemFormPopupProps' +export * from './ItemsApi' +export * from './ItemType' +export * from './LayerProps' +export * from './Permission' +export * from './PermissionAction' +export * from './PermissionCondition' +export * from './Profile' +export * from './Relation' +export * from './Tag' +export * from './UserApi' +export * from './UserItem' +export * from './UtopiaMapProps' From 75879fdc2141eec90b4de72f7ac68768d4d67296 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 10:42:42 +0000 Subject: [PATCH 02/19] version 3.0.51 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea6d3615..ffa63e47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.40", + "version": "3.0.51", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From d9791b84c46b2432333044fc48171e0e6cba9e13 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:24:27 +0000 Subject: [PATCH 03/19] updated rollup --- package-lock.json | 333 ++++++++++++++++++++++++++++++++++++++-------- package.json | 3 +- rollup.config.js | 106 ++++++++------- 3 files changed, 337 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2f3f0c3..815718dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.40", + "version": "3.0.51", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.40", + "version": "3.0.51", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", @@ -27,6 +27,7 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", + "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, @@ -64,7 +65,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "rollup": "^2.75.7", + "rollup": "^4.34.6", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -98,7 +99,7 @@ }, "node_modules/@babel/code-frame": { "version": "7.26.2", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -246,7 +247,7 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.25.9", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -714,30 +715,234 @@ "node": ">=14.0.0" } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.34.1", + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz", + "integrity": "sha512-+GcCXtOQoWuC7hhX1P00LqjjIiS/iOouHXhMdiDSnq/1DGTox4SpUvO52Xm+div6+106r+TcvOeo/cxvyEyTgg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.6.tgz", + "integrity": "sha512-E8+2qCIjciYUnCa1AiVF1BkRgqIGW9KzJeesQqVfyRITGQN+dFuoivO0hnro1DjT74wXLRZ7QF8MIbz+luGaJA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.6.tgz", + "integrity": "sha512-z9Ib+OzqN3DZEjX7PDQMHEhtF+t6Mi2z/ueChQPLS/qUMKY7Ybn5A2ggFoKRNRh1q1T03YTQfBTQCJZiepESAg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.6.tgz", + "integrity": "sha512-PShKVY4u0FDAR7jskyFIYVyHEPCPnIQY8s5OcXkdU8mz3Y7eXDJPdyM/ZWjkYdR2m0izD9HHWA8sGcXn+Qrsyg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.6.tgz", + "integrity": "sha512-YSwyOqlDAdKqs0iKuqvRHLN4SrD2TiswfoLfvYXseKbL47ht1grQpq46MSiQAx6rQEN8o8URtpXARCpqabqxGQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.6.tgz", + "integrity": "sha512-HEP4CgPAY1RxXwwL5sPFv6BBM3tVeLnshF03HMhJYCNc6kvSqBgTMmsEjb72RkZBAWIqiPUyF1JpEBv5XT9wKQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.6.tgz", + "integrity": "sha512-88fSzjC5xeH9S2Vg3rPgXJULkHcLYMkh8faix8DX4h4TIAL65ekwuQMA/g2CXq8W+NJC43V6fUpYZNjaX3+IIg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.6.tgz", + "integrity": "sha512-wM4ztnutBqYFyvNeR7Av+reWI/enK9tDOTKNF+6Kk2Q96k9bwhDDOlnCUNRPvromlVXo04riSliMBs/Z7RteEg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.6.tgz", + "integrity": "sha512-9RyprECbRa9zEjXLtvvshhw4CMrRa3K+0wcp3KME0zmBe1ILmvcVHnypZ/aIDXpRyfhSYSuN4EPdCCj5Du8FIA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.6.tgz", + "integrity": "sha512-qTmklhCTyaJSB05S+iSovfo++EwnIEZxHkzv5dep4qoszUMX5Ca4WM4zAVUMbfdviLgCSQOu5oU8YoGk1s6M9Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.6.tgz", + "integrity": "sha512-4Qmkaps9yqmpjY5pvpkfOerYgKNUGzQpFxV6rnS7c/JfYbDSU0y6WpbbredB5cCpLFGJEqYX40WUmxMkwhWCjw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.6.tgz", + "integrity": "sha512-Zsrtux3PuaxuBTX/zHdLaFmcofWGzaWW1scwLU3ZbW/X+hSsFbz9wDIp6XvnT7pzYRl9MezWqEqKy7ssmDEnuQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.6.tgz", + "integrity": "sha512-aK+Zp+CRM55iPrlyKiU3/zyhgzWBxLVrw2mwiQSYJRobCURb781+XstzvA8Gkjg/hbdQFuDw44aUOxVQFycrAg==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.6.tgz", + "integrity": "sha512-WoKLVrY9ogmaYPXwTH326+ErlCIgMmsoRSx6bO+l68YgJnlOXhygDYSZe/qbUJCSiCiZAQ+tKm88NcWuUXqOzw==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.6.tgz", + "integrity": "sha512-Sht4aFvmA4ToHd2vFzwMFaQCiYm2lDFho5rPcvPBT5pCdC+GwHG6CMch4GQfmWTQ1SwRKS0dhDYb54khSrjDWw==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.34.1", + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.6.tgz", + "integrity": "sha512-zmmpOQh8vXc2QITsnCiODCDGXFC8LMi64+/oPpPx5qz3pqv0s6x46ps4xoycfUiVZps5PFn1gksZzo4RGTKT+A==", "cpu": [ "x64" ], - "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.6.tgz", + "integrity": "sha512-3/q1qUsO/tLqGBaD4uXsB6coVGB3usxw3qyeVb59aArCgedSF66MPdgRStUd7vbZOsko/CgVaY5fo2vkvPLWiA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.6.tgz", + "integrity": "sha512-oLHxuyywc6efdKVTxvc0135zPrRdtYVjtVD5GUm55I3ODxhU/PwkQFD97z16Xzxa1Fz0AEe4W/2hzRtd+IfpOA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.6.tgz", + "integrity": "sha512-0PVwmgzZ8+TZ9oGBmdZoQVXflbvuwzN/HRclujpl4N/q3i+y0lqLw8n1bXA8ru3sApDjlmONaNAuYr38y1Kr9w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "dev": true, @@ -3634,6 +3839,19 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -4726,7 +4944,6 @@ }, "node_modules/magic-string": { "version": "0.30.17", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -6930,19 +7147,63 @@ } }, "node_modules/rollup": { - "version": "2.79.2", - "dev": true, - "license": "MIT", + "version": "4.34.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", + "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", + "dependencies": { + "@types/estree": "1.0.6" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.34.6", + "@rollup/rollup-android-arm64": "4.34.6", + "@rollup/rollup-darwin-arm64": "4.34.6", + "@rollup/rollup-darwin-x64": "4.34.6", + "@rollup/rollup-freebsd-arm64": "4.34.6", + "@rollup/rollup-freebsd-x64": "4.34.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.6", + "@rollup/rollup-linux-arm-musleabihf": "4.34.6", + "@rollup/rollup-linux-arm64-gnu": "4.34.6", + "@rollup/rollup-linux-arm64-musl": "4.34.6", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.6", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.6", + "@rollup/rollup-linux-riscv64-gnu": "4.34.6", + "@rollup/rollup-linux-s390x-gnu": "4.34.6", + "@rollup/rollup-linux-x64-gnu": "4.34.6", + "@rollup/rollup-linux-x64-musl": "4.34.6", + "@rollup/rollup-win32-arm64-msvc": "4.34.6", + "@rollup/rollup-win32-ia32-msvc": "4.34.6", + "@rollup/rollup-win32-x64-msvc": "4.34.6", "fsevents": "~2.3.2" } }, + "node_modules/rollup-plugin-dts": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", + "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", + "dependencies": { + "magic-string": "^0.30.10" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/Swatinem" + }, + "optionalDependencies": { + "@babel/code-frame": "^7.24.2" + }, + "peerDependencies": { + "rollup": "^3.29.4 || ^4", + "typescript": "^4.5 || ^5.0" + } + }, "node_modules/rollup-plugin-postcss": { "version": "4.0.2", "dev": true, @@ -8008,7 +8269,6 @@ }, "node_modules/typescript": { "version": "5.7.3", - "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -8300,43 +8560,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite/node_modules/rollup": { - "version": "4.34.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.34.1", - "@rollup/rollup-android-arm64": "4.34.1", - "@rollup/rollup-darwin-arm64": "4.34.1", - "@rollup/rollup-darwin-x64": "4.34.1", - "@rollup/rollup-freebsd-arm64": "4.34.1", - "@rollup/rollup-freebsd-x64": "4.34.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.34.1", - "@rollup/rollup-linux-arm-musleabihf": "4.34.1", - "@rollup/rollup-linux-arm64-gnu": "4.34.1", - "@rollup/rollup-linux-arm64-musl": "4.34.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.34.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.34.1", - "@rollup/rollup-linux-riscv64-gnu": "4.34.1", - "@rollup/rollup-linux-s390x-gnu": "4.34.1", - "@rollup/rollup-linux-x64-gnu": "4.34.1", - "@rollup/rollup-linux-x64-musl": "4.34.1", - "@rollup/rollup-win32-arm64-msvc": "4.34.1", - "@rollup/rollup-win32-ia32-msvc": "4.34.1", - "@rollup/rollup-win32-x64-msvc": "4.34.1", - "fsevents": "~2.3.2" - } - }, "node_modules/vitest": { "version": "3.0.5", "dev": true, diff --git a/package.json b/package.json index ffa63e47..12423ece 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "prettier": "^3.3.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "rollup": "^2.75.7", + "rollup": "^4.34.6", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -89,6 +89,7 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", + "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, diff --git a/rollup.config.js b/rollup.config.js index d3dd649f..af4b5b3f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,52 +1,60 @@ +import { dts } from 'rollup-plugin-dts' import postcss from 'rollup-plugin-postcss' import typescript from 'rollup-plugin-typescript2' -export default { - input: 'src/index.tsx', - output: [ - { - dir: 'dist/', - format: 'esm', - exports: 'named', - sourcemap: true, - strict: false, - }, - ], - plugins: [ - postcss({ - plugins: [], - }), - typescript(), - ], - external: [ - 'react', - 'react-dom', - 'react-markdown', - 'react/jsx-runtime', - 'remark-breaks', - 'leaflet', - 'react-leaflet', - 'react-toastify', - 'react-string-replace', - 'react-toastify/dist/ReactToastify.css', - 'tw-elements', - 'react-router-dom', - 'react-leaflet-cluster', - '@tanstack/react-query', - 'tributejs', - 'prop-types', - 'leaflet/dist/leaflet.css', - '@heroicons/react/20/solid', - '@heroicons/react/24/outline/ChevronRightIcon', - '@heroicons/react/24/outline', - 'date-fns', - '@heroicons/react/24/outline/InformationCircleIcon', - '@heroicons/react/24/outline/QuestionMarkCircleIcon', - '@heroicons/react/24/outline/ChevronDownIcon', - 'axios', - 'react-image-crop', - 'react-image-crop/dist/ReactCrop.css', - 'react-colorful', - 'leaflet.locatecontrol/dist/L.Control.Locate.css', - ], -} +export default [ + { + input: 'src/index.tsx', + output: [ + { + dir: 'dist/', + format: 'esm', + exports: 'named', + sourcemap: true, + strict: false, + }, + ], + plugins: [ + postcss({ + plugins: [], + }), + typescript(), + ], + external: [ + 'react', + 'react-dom', + 'react-markdown', + 'react/jsx-runtime', + 'remark-breaks', + 'leaflet', + 'react-leaflet', + 'react-toastify', + 'react-string-replace', + 'react-toastify/dist/ReactToastify.css', + 'tw-elements', + 'react-router-dom', + 'react-leaflet-cluster', + '@tanstack/react-query', + 'tributejs', + 'prop-types', + 'leaflet/dist/leaflet.css', + '@heroicons/react/20/solid', + '@heroicons/react/24/outline/ChevronRightIcon', + '@heroicons/react/24/outline', + 'date-fns', + '@heroicons/react/24/outline/InformationCircleIcon', + '@heroicons/react/24/outline/QuestionMarkCircleIcon', + '@heroicons/react/24/outline/ChevronDownIcon', + 'axios', + 'react-image-crop', + 'react-image-crop/dist/ReactCrop.css', + 'react-colorful', + 'leaflet.locatecontrol/dist/L.Control.Locate.css', + ], + }, + { + input: 'types/index.d.ts', + output: [{ file: 'dist/index.d.ts', format: 'es' }], + plugins: [dts()], + }, +] From b370b7afe303b70531769473dd465027c3844de8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:24:38 +0000 Subject: [PATCH 04/19] 3.0.52 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 815718dd..3c4e6dd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.51", + "version": "3.0.52", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.51", + "version": "3.0.52", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 12423ece..6403196f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.51", + "version": "3.0.52", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From 2945c0e4bd8c28298363fe103819e70c297d38a2 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:27:01 +0000 Subject: [PATCH 05/19] fixed types path in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6403196f..55b3b70b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", "module": "dist/index.js", - "types": "types/index.d.ts", + "types": "dist/index.d.ts", "type": "module", "scripts": { "build": "rollup -c", From bb3f600b8bec9bcdcfa9158d3fbb6e90036ebc16 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:27:05 +0000 Subject: [PATCH 06/19] 3.0.53 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c4e6dd8..ec43d151 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.52", + "version": "3.0.53", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.52", + "version": "3.0.53", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 55b3b70b..98516dd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.52", + "version": "3.0.53", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From 0e02ad0a6027314a187ab44334789db3d1a72c28 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:27:43 +0000 Subject: [PATCH 07/19] 3.0.54 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec43d151..0cb756b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.53", + "version": "3.0.54", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.53", + "version": "3.0.54", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 98516dd3..cefbbd0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.53", + "version": "3.0.54", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From 0cfd4482bb04cb422e5cbab9dc9ce6b050ab7225 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:48:47 +0000 Subject: [PATCH 08/19] config for rollup 4.x --- package-lock.json | 90 +++++++++++++++++++++++++++++++++++++++++++++-- package.json | 8 ++++- rollup.config.js | 5 +-- 3 files changed, 95 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0cb756b5..f7abd10c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,12 +27,12 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", - "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", + "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@types/geojson": "^7946.0.14", @@ -66,6 +66,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rollup": "^4.34.6", + "rollup-plugin-dts": "^6.1.1", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -99,7 +100,7 @@ }, "node_modules/@babel/code-frame": { "version": "7.26.2", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", @@ -247,7 +248,7 @@ }, "node_modules/@babel/helper-validator-identifier": { "version": "7.25.9", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -715,6 +716,66 @@ "node": ">=14.0.0" } }, + "node_modules/@rollup/plugin-typescript": { + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz", + "integrity": "sha512-cdtSp154H5sv637uMr1a8OTWB0L1SWDSm1rDGiyfcGcvQ6cuTs4MDk2BVEBGysUWago4OJN4EQZqOTl/QY3Jgg==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0||^3.0.0||^4.0.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "tslib": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", + "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.34.6", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.6.tgz", @@ -722,6 +783,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -734,6 +796,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -746,6 +809,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -758,6 +822,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -770,6 +835,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -782,6 +848,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -794,6 +861,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -806,6 +874,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -818,6 +887,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -830,6 +900,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -842,6 +913,7 @@ "cpu": [ "loong64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -854,6 +926,7 @@ "cpu": [ "ppc64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -866,6 +939,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -878,6 +952,7 @@ "cpu": [ "s390x" ], + "dev": true, "optional": true, "os": [ "linux" @@ -890,6 +965,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -902,6 +978,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -914,6 +991,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -926,6 +1004,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -938,6 +1017,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -4944,6 +5024,7 @@ }, "node_modules/magic-string": { "version": "0.30.17", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -7150,6 +7231,7 @@ "version": "4.34.6", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.6.tgz", "integrity": "sha512-wc2cBWqJgkU3Iz5oztRkQbfVkbxoz5EhnCGOrnJvnLnQ7O0WhQUYyv18qQI79O8L7DdHrrlJNeCHd4VGpnaXKQ==", + "dev": true, "dependencies": { "@types/estree": "1.0.6" }, @@ -7187,6 +7269,7 @@ "version": "6.1.1", "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-6.1.1.tgz", "integrity": "sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==", + "dev": true, "dependencies": { "magic-string": "^0.30.10" }, @@ -8269,6 +8352,7 @@ }, "node_modules/typescript": { "version": "5.7.3", + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index cefbbd0c..7d4907fc 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,11 @@ "homepage:": "https://utopia-os.org/", "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + }}, "type": "module", "scripts": { "build": "rollup -c", @@ -24,6 +29,7 @@ "license": "GPL-3.0-only", "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", + "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", "@types/geojson": "^7946.0.14", @@ -57,6 +63,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rollup": "^4.34.6", + "rollup-plugin-dts": "^6.1.1", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", @@ -89,7 +96,6 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", - "rollup-plugin-dts": "^6.1.1", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, diff --git a/rollup.config.js b/rollup.config.js index af4b5b3f..68125626 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,11 +7,8 @@ export default [ input: 'src/index.tsx', output: [ { - dir: 'dist/', + file: 'dist/index.js', format: 'esm', - exports: 'named', - sourcemap: true, - strict: false, }, ], plugins: [ From 2af771a79bea00eecaf87f7bc2dbdbb59805462d Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 18:48:54 +0000 Subject: [PATCH 09/19] 3.0.55 --- package-lock.json | 4 ++-- package.json | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f7abd10c..b47fd8e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.54", + "version": "3.0.55", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.54", + "version": "3.0.55", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 7d4907fc..f239e48f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.54", + "version": "3.0.55", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", @@ -10,7 +10,8 @@ ".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" - }}, + } + }, "type": "module", "scripts": { "build": "rollup -c", From c6484027c4e5e17b7ab3d8253e84af37cf839952 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 19:02:35 +0000 Subject: [PATCH 10/19] uddated package.json --- package.json | 8 +++++--- rollup.config.js | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f239e48f..562e6f6d 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,14 @@ "version": "3.0.55", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", - "homepage:": "https://utopia-os.org/", - "module": "dist/index.js", + "homepage": "https://utopia-os.org/", + "module": "dist/index.esm.js", + "main": "dist/index.cjs", "types": "dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", + "import": "./dist/index.esm.js", + "require": "./dist/index.cjs", "types": "./dist/index.d.ts" } }, diff --git a/rollup.config.js b/rollup.config.js index 68125626..ccceab93 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,9 +7,13 @@ export default [ input: 'src/index.tsx', output: [ { - file: 'dist/index.js', + file: 'dist/index.esm.js', format: 'esm', }, + { + file: 'dist/index.cjs', + format: 'cjs', + }, ], plugins: [ postcss({ From 4663acf9b8490b1e5f702fd74766664b19427ed9 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 19:03:41 +0000 Subject: [PATCH 11/19] 3.0.56 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b47fd8e5..40b78af8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.55", + "version": "3.0.56", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.55", + "version": "3.0.56", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 562e6f6d..d5a0274c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.55", + "version": "3.0.56", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage": "https://utopia-os.org/", From d6e63270fc669ff6c0f21cdaa9e86c44f1e9c63d Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 19:43:10 +0000 Subject: [PATCH 12/19] updated config for rollup --- package-lock.json | 18 ++++++++++++++++++ package.json | 8 ++++---- rollup.config.js | 23 +++++++++++++++++++---- tsconfig.json | 5 +++-- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40b78af8..53ba122d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,7 @@ }, "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", + "@rollup/plugin-alias": "^5.1.1", "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", @@ -716,6 +717,23 @@ "node": ">=14.0.0" } }, + "node_modules/@rollup/plugin-alias": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz", + "integrity": "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/plugin-typescript": { "version": "12.1.2", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz", diff --git a/package.json b/package.json index d5a0274c..cfc5f4aa 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage": "https://utopia-os.org/", - "module": "dist/index.esm.js", - "main": "dist/index.cjs", - "types": "dist/index.d.ts", + "module": "./dist/index.esm.js", + "main": "./dist/index.cjs", + "types": "./dist/index.d.ts", "exports": { ".": { "import": "./dist/index.esm.js", @@ -32,6 +32,7 @@ "license": "GPL-3.0-only", "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", + "@rollup/plugin-alias": "^5.1.1", "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", @@ -68,7 +69,6 @@ "rollup": "^4.34.6", "rollup-plugin-dts": "^6.1.1", "rollup-plugin-postcss": "^4.0.2", - "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", "typedoc": "^0.27.6", "typedoc-plugin-coverage": "^3.4.1", diff --git a/rollup.config.js b/rollup.config.js index ccceab93..aaff530b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,17 @@ +import path from 'path' +import { fileURLToPath } from 'url' + +import alias from '@rollup/plugin-alias' +import typescript from '@rollup/plugin-typescript' import { dts } from 'rollup-plugin-dts' import postcss from 'rollup-plugin-postcss' -import typescript from 'rollup-plugin-typescript2' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +const aliasConfig = alias({ + entries: [{ find: '#types', replacement: path.resolve(__dirname, 'types') }], +}) export default [ { @@ -16,10 +27,13 @@ export default [ }, ], plugins: [ + aliasConfig, postcss({ plugins: [], }), - typescript(), + typescript({ + tsconfig: './tsconfig.json', + }), ], external: [ 'react', @@ -54,8 +68,9 @@ export default [ ], }, { - input: 'types/index.d.ts', + input: 'src/index.tsx', output: [{ file: 'dist/index.d.ts', format: 'es' }], - plugins: [dts()], + plugins: [aliasConfig, dts()], + external: [/\.css$/], }, ] diff --git a/tsconfig.json b/tsconfig.json index b0d11e50..0d97d121 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,15 @@ { "compilerOptions": { "outDir": "dist", + "declaration": true, + "declarationDir": "dist/types", // 🔹 Muss innerhalb von dist/ liegen + "emitDeclarationOnly": true, // Nur `.d.ts` generieren, kein JavaScript "module": "esnext", "target": "ESNext", "lib": ["es6", "dom","es2015", "es2016", "es2017", "es2020"], "sourceMap": true, "allowJs": false, "jsx": "react-jsx", - "declaration": true, - "declarationDir": "./types", "moduleResolution": "node", "forceConsistentCasingInFileNames": true, "noImplicitReturns": true, From 4d52294758d7be6a6441a488a757324fe69937db Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 19:43:13 +0000 Subject: [PATCH 13/19] 3.0.57 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53ba122d..ed87256d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.56", + "version": "3.0.57", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.56", + "version": "3.0.57", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index cfc5f4aa..a3866d4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.56", + "version": "3.0.57", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage": "https://utopia-os.org/", From a450128b7290f0ddc5f29969433e08a7300621fd Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 20:32:41 +0000 Subject: [PATCH 14/19] reorganized types --- package-lock.json | 200 ++++-------------- package.json | 1 + rollup.config.js | 2 +- src/Components/AppShell/AppShell.tsx | 2 +- src/Components/AppShell/NavBar.tsx | 2 +- src/Components/AppShell/SetAppState.tsx | 2 +- src/Components/AppShell/hooks/useAppState.tsx | 2 +- src/Components/AppShell/hooks/useAssets.tsx | 2 +- src/Components/Auth/useAuth.tsx | 4 +- src/Components/Gaming/Quests.tsx | 2 +- src/Components/Map/ItemForm.tsx | 2 +- src/Components/Map/ItemView.tsx | 2 +- src/Components/Map/Layer.tsx | 6 +- src/Components/Map/Permissions.tsx | 4 +- .../Subcomponents/Controls/SearchControl.tsx | 2 +- .../Map/Subcomponents/ItemFormPopup.tsx | 4 +- .../ItemPopupComponents/HeaderView.tsx | 4 +- .../ItemPopupComponents/PopupButton.tsx | 2 +- .../PopupCheckboxInput.tsx | 2 +- .../PopupStartEndInput.tsx | 2 +- .../PopupTextAreaInput.tsx | 2 +- .../ItemPopupComponents/PopupTextInput.tsx | 2 +- .../ItemPopupComponents/StartEndView.tsx | 2 +- .../ItemPopupComponents/TextView.tsx | 4 +- .../Map/Subcomponents/ItemViewPopup.tsx | 4 +- src/Components/Map/Tags.tsx | 4 +- src/Components/Map/UtopiaMap.tsx | 2 +- src/Components/Map/UtopiaMapInner.tsx | 4 +- src/Components/Map/hooks/useFilter.tsx | 4 +- src/Components/Map/hooks/useItems.tsx | 4 +- src/Components/Map/hooks/useLayers.tsx | 2 +- src/Components/Map/hooks/useLeafletRefs.tsx | 2 +- src/Components/Map/hooks/usePermissions.tsx | 10 +- .../Map/hooks/useSelectPosition.tsx | 6 +- src/Components/Map/hooks/useTags.tsx | 6 +- src/Components/Profile/ProfileForm.tsx | 4 +- src/Components/Profile/ProfileView.tsx | 6 +- .../Profile/Subcomponents/ActionsButton.tsx | 2 +- .../Profile/Subcomponents/ContactInfoForm.tsx | 2 +- .../Profile/Subcomponents/ContactInfoView.tsx | 2 +- .../Profile/Subcomponents/GalleryView.tsx | 2 +- .../Subcomponents/GroupSubHeaderView.tsx | 2 +- .../Subcomponents/GroupSubheaderForm.tsx | 4 +- .../Subcomponents/LinkedItemsHeaderView.tsx | 2 +- .../Profile/Subcomponents/PlusButton.tsx | 2 +- .../Subcomponents/ProfileStartEndForm.tsx | 2 +- .../Subcomponents/ProfileStartEndView.tsx | 2 +- .../Profile/Subcomponents/ProfileTextForm.tsx | 2 +- .../Profile/Subcomponents/ProfileTextView.tsx | 2 +- .../Profile/Subcomponents/TagsWidget.tsx | 2 +- src/Components/Profile/Templates/FlexForm.tsx | 4 +- src/Components/Profile/Templates/FlexView.tsx | 2 +- .../Profile/Templates/OnepagerForm.tsx | 4 +- .../Profile/Templates/OnepagerView.tsx | 2 +- .../Profile/Templates/SimpleView.tsx | 2 +- src/Components/Profile/Templates/TabsView.tsx | 4 +- src/Components/Profile/UserSettings.tsx | 2 +- src/Components/Profile/itemFunctions.ts | 2 +- src/Components/Templates/AttestationForm.tsx | 4 +- src/Components/Templates/DateUserInfo.tsx | 2 +- src/Components/Templates/ItemCard.tsx | 2 +- src/Components/Templates/MarketView.tsx | 2 +- .../Templates/OverlayItemsIndexPage.tsx | 2 +- src/Components/Templates/TagView.tsx | 2 +- src/index.tsx | 2 + src/types/AssetsApi.d.ts | 4 + src/types/FormState.d.ts | 20 ++ src/types/Item.d.ts | 44 ++++ src/types/ItemFormPopupProps.d.ts | 11 + src/types/ItemType.d.ts | 5 + src/types/ItemsApi.d.ts | 8 + src/types/LayerProps.d.ts | 42 ++++ src/types/Permission.d.ts | 13 ++ src/types/PermissionAction.d.ts | 1 + src/types/PermissionCondition.d.ts | 8 + src/types/Profile.d.ts | 10 + src/types/Relation.d.ts | 5 + src/types/Tag.d.ts | 6 + src/types/UserApi.d.ts | 12 ++ src/types/UserItem.d.ts | 13 ++ src/types/UtopiaMapProps.d.ts | 16 ++ src/types/index.ts | 9 + tsconfig.json | 2 +- 83 files changed, 358 insertions(+), 254 deletions(-) create mode 100644 src/types/AssetsApi.d.ts create mode 100644 src/types/FormState.d.ts create mode 100644 src/types/Item.d.ts create mode 100644 src/types/ItemFormPopupProps.d.ts create mode 100644 src/types/ItemType.d.ts create mode 100644 src/types/ItemsApi.d.ts create mode 100644 src/types/LayerProps.d.ts create mode 100644 src/types/Permission.d.ts create mode 100644 src/types/PermissionAction.d.ts create mode 100644 src/types/PermissionCondition.d.ts create mode 100644 src/types/Profile.d.ts create mode 100644 src/types/Relation.d.ts create mode 100644 src/types/Tag.d.ts create mode 100644 src/types/UserApi.d.ts create mode 100644 src/types/UserItem.d.ts create mode 100644 src/types/UtopiaMapProps.d.ts create mode 100644 src/types/index.ts diff --git a/package-lock.json b/package-lock.json index ed87256d..df9c3082 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", "@rollup/plugin-alias": "^5.1.1", + "@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", @@ -69,7 +70,6 @@ "rollup": "^4.34.6", "rollup-plugin-dts": "^6.1.1", "rollup-plugin-postcss": "^4.0.2", - "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", "typedoc": "^0.27.6", "typedoc-plugin-coverage": "^3.4.1", @@ -734,6 +734,30 @@ } } }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.0.tgz", + "integrity": "sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, "node_modules/@rollup/plugin-typescript": { "version": "12.1.2", "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz", @@ -1336,6 +1360,12 @@ "@types/react": "*" } }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true + }, "node_modules/@types/semver": { "version": "7.5.8", "dev": true, @@ -2303,11 +2333,6 @@ "node": ">= 10" } }, - "node_modules/commondir": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/concat-map": { "version": "0.0.1", "license": "MIT" @@ -3810,34 +3835,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "dev": true, @@ -3920,19 +3917,6 @@ "url": "https://www.patreon.com/infusion" } }, - "node_modules/fs-extra": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "license": "ISC" @@ -4589,6 +4573,12 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, "node_modules/is-negative-zero": { "version": "2.0.3", "dev": true, @@ -4875,17 +4865,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jsonfile": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/jsx-ast-utils": { "version": "3.3.3", "dev": true, @@ -4954,17 +4933,6 @@ "node": ">= 12.13.0" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lodash": { "version": "4.17.21", "dev": true, @@ -5058,20 +5026,6 @@ "source-map-js": "^1.2.0" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/markdown-it": { "version": "14.1.0", "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", @@ -5979,31 +5933,6 @@ "node": ">=4" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-queue": { "version": "6.6.2", "dev": true, @@ -6030,14 +5959,6 @@ "node": ">=8" } }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "dev": true, @@ -6180,17 +6101,6 @@ "node": ">= 6" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/possible-typed-array-names": { "version": "1.0.0", "dev": true, @@ -7331,34 +7241,6 @@ "postcss": "8.x" } }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.32.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^4.1.2", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", - "resolve": "^1.20.0", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - } - }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "dev": true, @@ -8497,14 +8379,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/universalify": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/update-browserslist-db": { "version": "1.1.2", "dev": true, diff --git a/package.json b/package.json index a3866d4a..f034b0ee 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", "@rollup/plugin-alias": "^5.1.1", + "@rollup/plugin-node-resolve": "^16.0.0", "@rollup/plugin-typescript": "^12.1.2", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.2.0", diff --git a/rollup.config.js b/rollup.config.js index aaff530b..0ad2545b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,7 +10,7 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) const aliasConfig = alias({ - entries: [{ find: '#types', replacement: path.resolve(__dirname, 'types') }], + entries: [{ find: '#types', replacement: path.resolve(__dirname, 'src/types') }], }) export default [ diff --git a/src/Components/AppShell/AppShell.tsx b/src/Components/AppShell/AppShell.tsx index 0421a302..5267a48d 100644 --- a/src/Components/AppShell/AppShell.tsx +++ b/src/Components/AppShell/AppShell.tsx @@ -2,7 +2,7 @@ import { ContextWrapper } from './ContextWrapper' import NavBar from './NavBar' import { SetAppState } from './SetAppState' -import type { AssetsApi } from '#types/AssetsApi' +import type { AssetsApi } from '#src/types/AssetsApi' export function AppShell({ appName, diff --git a/src/Components/AppShell/NavBar.tsx b/src/Components/AppShell/NavBar.tsx index 08971877..f25d532a 100644 --- a/src/Components/AppShell/NavBar.tsx +++ b/src/Components/AppShell/NavBar.tsx @@ -6,7 +6,7 @@ import { toast } from 'react-toastify' import { useAuth } from '#components/Auth' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export default function NavBar({ appName, userType }: { appName: string; userType: string }) { const { isAuthenticated, user, logout } = useAuth() diff --git a/src/Components/AppShell/SetAppState.tsx b/src/Components/AppShell/SetAppState.tsx index eb537911..a84ec067 100644 --- a/src/Components/AppShell/SetAppState.tsx +++ b/src/Components/AppShell/SetAppState.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { useSetAppState } from './hooks/useAppState' -import type { AssetsApi } from '#types/AssetsApi' +import type { AssetsApi } from '#src/types/AssetsApi' export const SetAppState = ({ assetsApi, diff --git a/src/Components/AppShell/hooks/useAppState.tsx b/src/Components/AppShell/hooks/useAppState.tsx index c338d8c4..f0ffd76d 100644 --- a/src/Components/AppShell/hooks/useAppState.tsx +++ b/src/Components/AppShell/hooks/useAppState.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#types/AssetsApi' +import type { AssetsApi } from '#src/types/AssetsApi' interface AppState { assetsApi: AssetsApi diff --git a/src/Components/AppShell/hooks/useAssets.tsx b/src/Components/AppShell/hooks/useAssets.tsx index 6c04d6ab..04b3d3f2 100644 --- a/src/Components/AppShell/hooks/useAssets.tsx +++ b/src/Components/AppShell/hooks/useAssets.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#types/AssetsApi' +import type { AssetsApi } from '#src/types/AssetsApi' type UseAssetManagerResult = ReturnType diff --git a/src/Components/Auth/useAuth.tsx b/src/Components/Auth/useAuth.tsx index e892a0c6..767ce700 100644 --- a/src/Components/Auth/useAuth.tsx +++ b/src/Components/Auth/useAuth.tsx @@ -5,8 +5,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { createContext, useState, useContext, useEffect } from 'react' -import type { UserApi } from '#types/UserApi' -import type { UserItem } from '#types/UserItem' +import type { UserApi } from '#src/types/UserApi' +import type { UserItem } from '#src/types/UserItem' interface AuthProviderProps { userApi: UserApi diff --git a/src/Components/Gaming/Quests.tsx b/src/Components/Gaming/Quests.tsx index 0e669c6f..61303c30 100644 --- a/src/Components/Gaming/Quests.tsx +++ b/src/Components/Gaming/Quests.tsx @@ -5,7 +5,7 @@ import { useItems } from '#components/Map/hooks/useItems' import { useQuestsOpen, useSetQuestOpen } from './hooks/useQuests' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export function Quests() { const questsOpen = useQuestsOpen() diff --git a/src/Components/Map/ItemForm.tsx b/src/Components/Map/ItemForm.tsx index d48b33ce..f9ad282f 100644 --- a/src/Components/Map/ItemForm.tsx +++ b/src/Components/Map/ItemForm.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement, useEffect } from 'react' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ItemForm = ({ children, diff --git a/src/Components/Map/ItemView.tsx b/src/Components/Map/ItemView.tsx index 63a241d6..9a674504 100644 --- a/src/Components/Map/ItemView.tsx +++ b/src/Components/Map/ItemView.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement } from 'react' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ItemView = ({ children, item }: { children?: React.ReactNode; item?: Item }) => { return ( diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index 0ce40aef..d2525df8 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -28,9 +28,9 @@ import { useAddTag, useAllTagsLoaded, useGetItemTags, useTags } from './hooks/us import { ItemFormPopup } from './Subcomponents/ItemFormPopup' import { ItemViewPopup } from './Subcomponents/ItemViewPopup' -import type { Item } from '#types/Item' -import type { LayerProps } from '#types/LayerProps' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { LayerProps } from '#src/types/LayerProps' +import type { Tag } from '#src/types/Tag' import type { Popup } from 'leaflet' export const Layer = ({ diff --git a/src/Components/Map/Permissions.tsx b/src/Components/Map/Permissions.tsx index cac67cf2..90ba458f 100644 --- a/src/Components/Map/Permissions.tsx +++ b/src/Components/Map/Permissions.tsx @@ -4,8 +4,8 @@ import { useAuth } from '#components/Auth' import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './hooks/usePermissions' -import type { ItemsApi } from '#types/ItemsApi' -import type { Permission } from '#types/Permission' +import type { ItemsApi } from '#src/types/ItemsApi' +import type { Permission } from '#src/types/Permission' export function Permissions({ data, diff --git a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx index 323d8c5c..615527ac 100644 --- a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx @@ -29,7 +29,7 @@ import MarkerIconFactory from '#utils/MarkerIconFactory' import { LocateControl } from './LocateControl' import { SidebarControl } from './SidebarControl' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const SearchControl = () => { const windowDimensions = useWindowDimensions() diff --git a/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/src/Components/Map/Subcomponents/ItemFormPopup.tsx index ed35d861..a8557695 100644 --- a/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -19,8 +19,8 @@ import { useAddTag, useTags } from '#components/Map/hooks/useTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#types/Item' -import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { Item } from '#src/types/Item' +import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' export function ItemFormPopup(props: ItemFormPopupProps) { const [spinner, setSpinner] = useState(false) diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx index b7602afc..e948b396 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx @@ -17,8 +17,8 @@ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#types/Item' -import type { ItemsApi } from '#types/ItemsApi' +import type { Item } from '#src/types/Item' +import type { ItemsApi } from '#src/types/ItemsApi' export function HeaderView({ item, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx index 3f3bf2da..7ef100ab 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom' import { useGetItemTags } from '#components/Map/hooks/useTags' import { getValue } from '#utils/GetValue' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const PopupButton = ({ url, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx index 42a1d6ca..87a28c1f 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx @@ -1,4 +1,4 @@ -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const PopupCheckboxInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx index 819182d6..5c87b01e 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ import { TextInput } from '#components/Input' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' interface StartEndInputProps { item?: Item diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx index c07b6b26..b403bc31 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx @@ -1,6 +1,6 @@ import { TextAreaInput } from '#components/Input' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const PopupTextAreaInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx index 4030769f..ce957842 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx @@ -1,6 +1,6 @@ import { TextInput } from '#components/Input' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const PopupTextInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx index c41d86f4..02b21cb1 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const StartEndView = ({ item }: { item?: Item }) => { return ( diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx index 59115151..0dbb3ffc 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx @@ -16,8 +16,8 @@ import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' import { fixUrls, mailRegex } from '#utils/ReplaceURLs' -import type { Item } from '#types/Item' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { Tag } from '#src/types/Tag' export const TextView = ({ item, diff --git a/src/Components/Map/Subcomponents/ItemViewPopup.tsx b/src/Components/Map/Subcomponents/ItemViewPopup.tsx index 2a935e48..ac484ad3 100644 --- a/src/Components/Map/Subcomponents/ItemViewPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemViewPopup.tsx @@ -20,8 +20,8 @@ import { timeAgo } from '#utils/TimeAgo' import { HeaderView } from './ItemPopupComponents/HeaderView' import { TextView } from './ItemPopupComponents/TextView' -import type { Item } from '#types/Item' -import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { Item } from '#src/types/Item' +import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' export interface ItemViewPopupProps { item: Item diff --git a/src/Components/Map/Tags.tsx b/src/Components/Map/Tags.tsx index ff77a3ff..1195a0c2 100644 --- a/src/Components/Map/Tags.tsx +++ b/src/Components/Map/Tags.tsx @@ -4,8 +4,8 @@ import { useLocation } from 'react-router-dom' import { useAddFilterTag, useFilterTags, useResetFilterTags } from './hooks/useFilter' import { useSetTagData, useSetTagApi, useTags } from './hooks/useTags' -import type { ItemsApi } from '#types/ItemsApi' -import type { Tag } from '#types/Tag' +import type { ItemsApi } from '#src/types/ItemsApi' +import type { Tag } from '#src/types/Tag' export function Tags({ data, api }: { data?: Tag[]; api?: ItemsApi }) { const setTagData = useSetTagData() diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 5fcb292d..1991df87 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -5,7 +5,7 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper' import { UtopiaMapInner } from './UtopiaMapInner' -import type { UtopiaMapProps } from '#types/UtopiaMapProps' +import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' import 'react-toastify/dist/ReactToastify.css' function UtopiaMap({ diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index 6cdf9106..bd17434c 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -36,8 +36,8 @@ import { TagsControl } from './Subcomponents/Controls/TagsControl' import { TextView } from './Subcomponents/ItemPopupComponents/TextView' import { SelectPosition } from './Subcomponents/SelectPosition' -import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' -import type { UtopiaMapProps } from '#types/UtopiaMapProps' +import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' import type { Feature, Geometry as GeoJSONGeometry } from 'geojson' export function UtopiaMapInner({ diff --git a/src/Components/Map/hooks/useFilter.tsx b/src/Components/Map/hooks/useFilter.tsx index febc6bfd..e05bc542 100644 --- a/src/Components/Map/hooks/useFilter.tsx +++ b/src/Components/Map/hooks/useFilter.tsx @@ -10,8 +10,8 @@ import { useNavigate } from 'react-router-dom' import { useLayers } from './useLayers' import useWindowDimensions from './useWindowDimension' -import type { LayerProps } from '#types/LayerProps' -import type { Tag } from '#types/Tag' +import type { LayerProps } from '#src/types/LayerProps' +import type { Tag } from '#src/types/Tag' type ActionType = | { type: 'ADD_TAG'; tag: Tag } diff --git a/src/Components/Map/hooks/useItems.tsx b/src/Components/Map/hooks/useItems.tsx index db174e77..9517ef78 100644 --- a/src/Components/Map/hooks/useItems.tsx +++ b/src/Components/Map/hooks/useItems.tsx @@ -10,8 +10,8 @@ import { toast } from 'react-toastify' import { useAddLayer } from './useLayers' -import type { Item } from '#types/Item' -import type { LayerProps } from '#types/LayerProps' +import type { Item } from '#src/types/Item' +import type { LayerProps } from '#src/types/LayerProps' type ActionType = | { type: 'ADD'; item: Item } diff --git a/src/Components/Map/hooks/useLayers.tsx b/src/Components/Map/hooks/useLayers.tsx index 477ffc64..711a95be 100644 --- a/src/Components/Map/hooks/useLayers.tsx +++ b/src/Components/Map/hooks/useLayers.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { LayerProps } from '#types/LayerProps' +import type { LayerProps } from '#src/types/LayerProps' interface ActionType { type: 'ADD LAYER' diff --git a/src/Components/Map/hooks/useLeafletRefs.tsx b/src/Components/Map/hooks/useLeafletRefs.tsx index a092d98e..93a1c130 100644 --- a/src/Components/Map/hooks/useLeafletRefs.tsx +++ b/src/Components/Map/hooks/useLeafletRefs.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' import type { Marker, Popup } from 'leaflet' interface LeafletRef { diff --git a/src/Components/Map/hooks/usePermissions.tsx b/src/Components/Map/hooks/usePermissions.tsx index 5d149eb3..6d413b7c 100644 --- a/src/Components/Map/hooks/usePermissions.tsx +++ b/src/Components/Map/hooks/usePermissions.tsx @@ -10,11 +10,11 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { useAuth } from '#components/Auth/useAuth' -import type { Item } from '#types/Item' -import type { ItemsApi } from '#types/ItemsApi' -import type { LayerProps } from '#types/LayerProps' -import type { Permission } from '#types/Permission' -import type { PermissionAction } from '#types/PermissionAction' +import type { Item } from '#src/types/Item' +import type { ItemsApi } from '#src/types/ItemsApi' +import type { LayerProps } from '#src/types/LayerProps' +import type { Permission } from '#src/types/Permission' +import type { PermissionAction } from '#src/types/PermissionAction' type ActionType = { type: 'ADD'; permission: Permission } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Map/hooks/useSelectPosition.tsx b/src/Components/Map/hooks/useSelectPosition.tsx index d00fa4d9..982a3962 100644 --- a/src/Components/Map/hooks/useSelectPosition.tsx +++ b/src/Components/Map/hooks/useSelectPosition.tsx @@ -14,9 +14,9 @@ import { toast } from 'react-toastify' import { useUpdateItem } from './useItems' import { useHasUserPermission } from './usePermissions' -import type { Item } from '#types/Item' -import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' -import type { LayerProps } from '#types/LayerProps' +import type { Item } from '#src/types/Item' +import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { LayerProps } from '#src/types/LayerProps' import type { Point } from 'geojson' import type { LatLng } from 'leaflet' diff --git a/src/Components/Map/hooks/useTags.tsx b/src/Components/Map/hooks/useTags.tsx index f80e96ad..9420ce01 100644 --- a/src/Components/Map/hooks/useTags.tsx +++ b/src/Components/Map/hooks/useTags.tsx @@ -13,9 +13,9 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' -import type { Item } from '#types/Item' -import type { ItemsApi } from '#types/ItemsApi' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { ItemsApi } from '#src/types/ItemsApi' +import type { Tag } from '#src/types/Tag' type ActionType = { type: 'ADD'; tag: Tag } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Profile/ProfileForm.tsx b/src/Components/Profile/ProfileForm.tsx index c5339657..c4eb2c6a 100644 --- a/src/Components/Profile/ProfileForm.tsx +++ b/src/Components/Profile/ProfileForm.tsx @@ -23,8 +23,8 @@ import { OnepagerForm } from './Templates/OnepagerForm' import { SimpleForm } from './Templates/SimpleForm' import { TabsForm } from './Templates/TabsForm' -import type { Item } from '#types/Item' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { Tag } from '#src/types/Tag' export function ProfileForm() { const [state, setState] = useState({ diff --git a/src/Components/Profile/ProfileView.tsx b/src/Components/Profile/ProfileView.tsx index 76c42aec..ca9e072d 100644 --- a/src/Components/Profile/ProfileView.tsx +++ b/src/Components/Profile/ProfileView.tsx @@ -29,9 +29,9 @@ import { OnepagerView } from './Templates/OnepagerView' import { SimpleView } from './Templates/SimpleView' import { TabsView } from './Templates/TabsView' -import type { Item } from '#types/Item' -import type { ItemsApi } from '#types/ItemsApi' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { ItemsApi } from '#src/types/ItemsApi' +import type { Tag } from '#src/types/Tag' export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi }) { const [item, setItem] = useState() diff --git a/src/Components/Profile/Subcomponents/ActionsButton.tsx b/src/Components/Profile/Subcomponents/ActionsButton.tsx index 7eea5e44..6452f741 100644 --- a/src/Components/Profile/Subcomponents/ActionsButton.tsx +++ b/src/Components/Profile/Subcomponents/ActionsButton.tsx @@ -12,7 +12,7 @@ import { HeaderView } from '#components/Map/Subcomponents/ItemPopupComponents/He import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export function ActionButton({ item, diff --git a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx index 7f129d01..2081567e 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { TextInput } from '#components/Input' -import type { FormState } from '#types/FormState' +import type { FormState } from '#src/types/FormState' export const ContactInfoForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ContactInfoView.tsx b/src/Components/Profile/Subcomponents/ContactInfoView.tsx index a8368d24..01f2dfb5 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoView.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoView.tsx @@ -8,7 +8,7 @@ import { Link } from 'react-router-dom' import { useAppState } from '#components/AppShell/hooks/useAppState' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ContactInfoView = ({ item, heading }: { item: Item; heading: string }) => { const appState = useAppState() diff --git a/src/Components/Profile/Subcomponents/GalleryView.tsx b/src/Components/Profile/Subcomponents/GalleryView.tsx index 7cf2bc37..f6fee269 100644 --- a/src/Components/Profile/Subcomponents/GalleryView.tsx +++ b/src/Components/Profile/Subcomponents/GalleryView.tsx @@ -10,7 +10,7 @@ import 'react-photo-album/rows.css' import { useAppState } from '#components/AppShell/hooks/useAppState' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const GalleryView = ({ item }: { item: Item }) => { const [index, setIndex] = useState(-1) diff --git a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx index 7718b075..6c808314 100644 --- a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx @@ -1,6 +1,6 @@ import SocialShareBar from './SocialShareBar' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const GroupSubHeaderView = ({ item, diff --git a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx index 55b8c58f..db2e663b 100644 --- a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx @@ -5,8 +5,8 @@ import { useEffect } from 'react' import ComboBoxInput from '#components/Input/ComboBoxInput' -import type { FormState } from '#types/FormState' -import type { Item } from '#types/Item' +import type { FormState } from '#src/types/FormState' +import type { Item } from '#src/types/Item' interface groupType { groupTypes_id: { diff --git a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx index 57dd0ce9..626f0ba7 100644 --- a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx @@ -10,7 +10,7 @@ import { useEffect } from 'react' import { useAppState } from '#components/AppShell/hooks/useAppState' import { getValue } from '#utils/GetValue' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export function LinkedItemsHeaderView({ item, diff --git a/src/Components/Profile/Subcomponents/PlusButton.tsx b/src/Components/Profile/Subcomponents/PlusButton.tsx index c8122d95..06fa6e34 100644 --- a/src/Components/Profile/Subcomponents/PlusButton.tsx +++ b/src/Components/Profile/Subcomponents/PlusButton.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' -import type { LayerProps } from '#types/LayerProps' +import type { LayerProps } from '#src/types/LayerProps' export function PlusButton({ layer, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx index e5f67ffe..5ccc1384 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { PopupStartEndInput } from '#components/Map' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ProfileStartEndForm = ({ item, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx index 8d64e55d..95425563 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx @@ -1,6 +1,6 @@ import { StartEndView } from '#components/Map' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ProfileStartEndView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx index 1d72a3b3..b74c01d4 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx @@ -9,7 +9,7 @@ import { getValue } from '#utils/GetValue' import { MarkdownHint } from './MarkdownHint' -import type { FormState } from '#types/FormState' +import type { FormState } from '#src/types/FormState' export const ProfileTextForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ProfileTextView.tsx b/src/Components/Profile/Subcomponents/ProfileTextView.tsx index 8a2725ce..75dc8ca1 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextView.tsx @@ -2,7 +2,7 @@ import { TextView } from '#components/Map' import { getValue } from '#utils/GetValue' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ProfileTextView = ({ item, diff --git a/src/Components/Profile/Subcomponents/TagsWidget.tsx b/src/Components/Profile/Subcomponents/TagsWidget.tsx index b1a03ad1..48850c0c 100644 --- a/src/Components/Profile/Subcomponents/TagsWidget.tsx +++ b/src/Components/Profile/Subcomponents/TagsWidget.tsx @@ -11,7 +11,7 @@ import { useTags } from '#components/Map/hooks/useTags' import { decodeTag, encodeTag } from '#utils/FormatTags' import { randomColor } from '#utils/RandomColor' -import type { Tag } from '#types/Tag' +import type { Tag } from '#src/types/Tag' // eslint-disable-next-line react/prop-types export const TagsWidget = ({ placeholder, containerStyle, defaultTags, onUpdate }) => { diff --git a/src/Components/Profile/Templates/FlexForm.tsx b/src/Components/Profile/Templates/FlexForm.tsx index 56f14eac..0d6aa9c6 100644 --- a/src/Components/Profile/Templates/FlexForm.tsx +++ b/src/Components/Profile/Templates/FlexForm.tsx @@ -8,8 +8,8 @@ import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubhe import { ProfileStartEndForm } from '#components/Profile/Subcomponents/ProfileStartEndForm' import { ProfileTextForm } from '#components/Profile/Subcomponents/ProfileTextForm' -import type { FormState } from '#types/FormState' -import type { Item } from '#types/Item' +import type { FormState } from '#src/types/FormState' +import type { Item } from '#src/types/Item' const componentMap = { groupSubheaders: GroupSubheaderForm, diff --git a/src/Components/Profile/Templates/FlexView.tsx b/src/Components/Profile/Templates/FlexView.tsx index 608b0fdf..08c35f26 100644 --- a/src/Components/Profile/Templates/FlexView.tsx +++ b/src/Components/Profile/Templates/FlexView.tsx @@ -8,7 +8,7 @@ import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHe import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView' import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' const componentMap = { groupSubheaders: GroupSubHeaderView, diff --git a/src/Components/Profile/Templates/OnepagerForm.tsx b/src/Components/Profile/Templates/OnepagerForm.tsx index 163cae4e..9e4a1783 100644 --- a/src/Components/Profile/Templates/OnepagerForm.tsx +++ b/src/Components/Profile/Templates/OnepagerForm.tsx @@ -4,8 +4,8 @@ import { TextAreaInput } from '#components/Input' import { ContactInfoForm } from '#components/Profile/Subcomponents/ContactInfoForm' import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubheaderForm' -import type { FormState } from '#types/FormState' -import type { Item } from '#types/Item' +import type { FormState } from '#src/types/FormState' +import type { Item } from '#src/types/Item' export const OnepagerForm = ({ item, diff --git a/src/Components/Profile/Templates/OnepagerView.tsx b/src/Components/Profile/Templates/OnepagerView.tsx index 32a786ee..b26f0303 100644 --- a/src/Components/Profile/Templates/OnepagerView.tsx +++ b/src/Components/Profile/Templates/OnepagerView.tsx @@ -4,7 +4,7 @@ import { TextView } from '#components/Map' import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView' import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHeaderView' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const OnepagerView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/SimpleView.tsx b/src/Components/Profile/Templates/SimpleView.tsx index dca6d079..6553cb77 100644 --- a/src/Components/Profile/Templates/SimpleView.tsx +++ b/src/Components/Profile/Templates/SimpleView.tsx @@ -1,6 +1,6 @@ import { TextView } from '#components/Map' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const SimpleView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index d7554b94..51df5ec2 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -18,8 +18,8 @@ import { LinkedItemsHeaderView } from '#components/Profile/Subcomponents/LinkedI import { TagView } from '#components/Templates/TagView' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#types/Item' -import type { Tag } from '#types/Tag' +import type { Item } from '#src/types/Item' +import type { Tag } from '#src/types/Tag' export const TabsView = ({ attestations, diff --git a/src/Components/Profile/UserSettings.tsx b/src/Components/Profile/UserSettings.tsx index 9f602f63..2da3d54d 100644 --- a/src/Components/Profile/UserSettings.tsx +++ b/src/Components/Profile/UserSettings.tsx @@ -8,7 +8,7 @@ import { useAuth } from '#components/Auth' import { TextInput } from '#components/Input' import { MapOverlayPage } from '#components/Templates' -import type { UserItem } from '#types/UserItem' +import type { UserItem } from '#src/types/UserItem' export function UserSettings() { const { user, updateUser, loading /* token */ } = useAuth() diff --git a/src/Components/Profile/itemFunctions.ts b/src/Components/Profile/itemFunctions.ts index ad11c536..5d4ca6dc 100644 --- a/src/Components/Profile/itemFunctions.ts +++ b/src/Components/Profile/itemFunctions.ts @@ -15,7 +15,7 @@ import { encodeTag } from '#utils/FormatTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' // eslint-disable-next-line promise/avoid-new const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/src/Components/Templates/AttestationForm.tsx b/src/Components/Templates/AttestationForm.tsx index ce5994ad..a4d84aea 100644 --- a/src/Components/Templates/AttestationForm.tsx +++ b/src/Components/Templates/AttestationForm.tsx @@ -8,8 +8,8 @@ import { useItems } from '#components/Map/hooks/useItems' import { EmojiPicker } from './EmojiPicker' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#types/Item' -import type { ItemsApi } from '#types/ItemsApi' +import type { Item } from '#src/types/Item' +import type { ItemsApi } from '#src/types/ItemsApi' export const AttestationForm = ({ api }: { api?: ItemsApi }) => { const items = useItems() diff --git a/src/Components/Templates/DateUserInfo.tsx b/src/Components/Templates/DateUserInfo.tsx index 4243a9c0..358764bf 100644 --- a/src/Components/Templates/DateUserInfo.tsx +++ b/src/Components/Templates/DateUserInfo.tsx @@ -5,7 +5,7 @@ import { useState } from 'react' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const DateUserInfo = ({ item }: { item: Item }) => { const [infoExpanded, setInfoExpanded] = useState(false) diff --git a/src/Components/Templates/ItemCard.tsx b/src/Components/Templates/ItemCard.tsx index 585d18ae..1e5938d8 100644 --- a/src/Components/Templates/ItemCard.tsx +++ b/src/Components/Templates/ItemCard.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { DateUserInfo } from './DateUserInfo' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const ItemCard = ({ i, diff --git a/src/Components/Templates/MarketView.tsx b/src/Components/Templates/MarketView.tsx index 18822755..f2339540 100644 --- a/src/Components/Templates/MarketView.tsx +++ b/src/Components/Templates/MarketView.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { MapOverlayPage } from './MapOverlayPage' import { TagView } from './TagView' -import type { Tag } from '#types/Tag' +import type { Tag } from '#src/types/Tag' function groupAndCount(arr) { const grouped = arr.reduce((acc, obj) => { diff --git a/src/Components/Templates/OverlayItemsIndexPage.tsx b/src/Components/Templates/OverlayItemsIndexPage.tsx index 3388cddc..052ad27c 100644 --- a/src/Components/Templates/OverlayItemsIndexPage.tsx +++ b/src/Components/Templates/OverlayItemsIndexPage.tsx @@ -25,7 +25,7 @@ import { randomColor } from '#utils/RandomColor' import { ItemCard } from './ItemCard' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#types/Item' +import type { Item } from '#src/types/Item' export const OverlayItemsIndexPage = ({ url, diff --git a/src/Components/Templates/TagView.tsx b/src/Components/Templates/TagView.tsx index f19c5adc..f103d533 100644 --- a/src/Components/Templates/TagView.tsx +++ b/src/Components/Templates/TagView.tsx @@ -2,7 +2,7 @@ import { decodeTag } from '#utils/FormatTags' -import type { Tag } from '#types/Tag' +import type { Tag } from '#src/types/Tag' export const TagView = ({ tag, diff --git a/src/index.tsx b/src/index.tsx index 145d1719..1446e5a5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -37,6 +37,8 @@ export { } from './Components/Templates' export { TextInput, TextAreaInput, SelectBox } from './Components/Input' +export * from './types' + declare global { interface Window { my_modal_3: { diff --git a/src/types/AssetsApi.d.ts b/src/types/AssetsApi.d.ts new file mode 100644 index 00000000..f2005016 --- /dev/null +++ b/src/types/AssetsApi.d.ts @@ -0,0 +1,4 @@ +export interface AssetsApi { + upload(file: Blob, title: string): Promise<{ id: string }> + url: string +} diff --git a/src/types/FormState.d.ts b/src/types/FormState.d.ts new file mode 100644 index 00000000..20589afd --- /dev/null +++ b/src/types/FormState.d.ts @@ -0,0 +1,20 @@ +import type { Item } from './Item' +import type { Tag } from './Tag' + +export interface FormState { + color: string + id: string + group_type: string + status: string + name: string + subname: string + text: string + contact: string + telephone: string + next_appointment: string + image: string + marker_icon: string + offers: Tag[] + needs: Tag[] + relations: Item[] +} diff --git a/src/types/Item.d.ts b/src/types/Item.d.ts new file mode 100644 index 00000000..47560e66 --- /dev/null +++ b/src/types/Item.d.ts @@ -0,0 +1,44 @@ +import type { ItemsApi } from './ItemsApi' +import type { LayerProps } from './LayerProps' +import type { Relation } from './Relation' +import type { UserItem } from './UserItem' +import type { Point } from 'geojson' + +export interface Item { + id: string + name: string + text: string + position?: Point + date_created?: string + date_updated?: string | null + start?: string + end?: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + api?: ItemsApi + tags?: string[] + layer?: LayerProps + relations?: Relation[] + parent?: string + subname?: string + public_edit?: boolean + slug?: string + user_created?: UserItem + image?: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any + /* constructor( + id: string, + name: string, + text: string, + position: Geometry, + layer?: LayerProps, + api?: ItemsApi, + ) { + this.id = id + this.name = name + this.text = text + this.position = position + this.layer = layer + this.api = api + } */ +} diff --git a/src/types/ItemFormPopupProps.d.ts b/src/types/ItemFormPopupProps.d.ts new file mode 100644 index 00000000..64e880bb --- /dev/null +++ b/src/types/ItemFormPopupProps.d.ts @@ -0,0 +1,11 @@ +import type { Item } from './Item' +import type { LayerProps } from './LayerProps' +import type { LatLng } from 'leaflet' + +export interface ItemFormPopupProps { + position: LatLng + layer: LayerProps + item?: Item + children?: React.ReactNode + setItemFormPopup?: React.Dispatch> +} diff --git a/src/types/ItemType.d.ts b/src/types/ItemType.d.ts new file mode 100644 index 00000000..1f125cc7 --- /dev/null +++ b/src/types/ItemType.d.ts @@ -0,0 +1,5 @@ +export interface ItemType { + name: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any +} diff --git a/src/types/ItemsApi.d.ts b/src/types/ItemsApi.d.ts new file mode 100644 index 00000000..147fa462 --- /dev/null +++ b/src/types/ItemsApi.d.ts @@ -0,0 +1,8 @@ +export interface ItemsApi { + getItems(): Promise + getItem?(id: string): Promise + createItem?(item: T): Promise + updateItem?(item: T): Promise + deleteItem?(id: string): Promise + collectionName?: string +} diff --git a/src/types/LayerProps.d.ts b/src/types/LayerProps.d.ts new file mode 100644 index 00000000..7d742d5e --- /dev/null +++ b/src/types/LayerProps.d.ts @@ -0,0 +1,42 @@ +import type { Item } from './Item' +import type { ItemFormPopupProps } from './ItemFormPopupProps' +import type { ItemsApi } from './ItemsApi' +import type { ItemType } from './ItemType' + +export interface LayerProps { + id?: string + data?: Item[] + children?: React.ReactNode + name: string + menuIcon: string + menuColor: string + menuText: string + markerIcon: string + markerShape: string + markerDefaultColor: string + markerDefaultColor2?: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + api?: ItemsApi + itemType: ItemType + itemNameField?: string + itemSubnameField?: string + itemTextField?: string + itemAvatarField?: string + itemColorField?: string + itemOwnerField?: string + itemTagsField?: string + itemLatitudeField?: string + itemLongitudeField?: string + itemOffersField?: string + itemNeedsField?: string + onlyOnePerOwner?: boolean + customEditLink?: string + customEditParameter?: string + public_edit_items?: boolean + listed?: boolean + item_presets?: Record + setItemFormPopup?: React.Dispatch> + itemFormPopup?: ItemFormPopupProps | null + // eslint-disable-next-line @typescript-eslint/no-explicit-any + clusterRef?: any +} diff --git a/src/types/Permission.d.ts b/src/types/Permission.d.ts new file mode 100644 index 00000000..57067fee --- /dev/null +++ b/src/types/Permission.d.ts @@ -0,0 +1,13 @@ +import type { PermissionAction } from './PermissionAction' +import type { PermissionCondition } from './PermissionCondition' + +export interface Permission { + id?: string + policy?: { name: string } + collection: string + action: PermissionAction + permissions?: { + // Optional, für spezifische Bedingungen wie `user_created` + _and: PermissionCondition[] + } +} diff --git a/src/types/PermissionAction.d.ts b/src/types/PermissionAction.d.ts new file mode 100644 index 00000000..7278a069 --- /dev/null +++ b/src/types/PermissionAction.d.ts @@ -0,0 +1 @@ +export type PermissionAction = 'create' | 'read' | 'update' | 'delete' diff --git a/src/types/PermissionCondition.d.ts b/src/types/PermissionCondition.d.ts new file mode 100644 index 00000000..e946bdb1 --- /dev/null +++ b/src/types/PermissionCondition.d.ts @@ -0,0 +1,8 @@ +export interface PermissionCondition { + user_created?: { + _eq: string // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID + } + public_edit?: { + _eq: boolean // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID + } +} diff --git a/src/types/Profile.d.ts b/src/types/Profile.d.ts new file mode 100644 index 00000000..4bfb8980 --- /dev/null +++ b/src/types/Profile.d.ts @@ -0,0 +1,10 @@ +import type { Geometry } from 'geojson' + +export interface Profile { + id?: string + avatar?: string + color?: string + name: string + text: string + geoposition?: Geometry +} diff --git a/src/types/Relation.d.ts b/src/types/Relation.d.ts new file mode 100644 index 00000000..0b038022 --- /dev/null +++ b/src/types/Relation.d.ts @@ -0,0 +1,5 @@ +export interface Relation { + related_items_id: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any +} diff --git a/src/types/Tag.d.ts b/src/types/Tag.d.ts new file mode 100644 index 00000000..1dc7c5a9 --- /dev/null +++ b/src/types/Tag.d.ts @@ -0,0 +1,6 @@ +export interface Tag { + color: string + id: string + name: string + offer_or_need?: boolean +} diff --git a/src/types/UserApi.d.ts b/src/types/UserApi.d.ts new file mode 100644 index 00000000..6c36cd4e --- /dev/null +++ b/src/types/UserApi.d.ts @@ -0,0 +1,12 @@ +import type { UserItem } from './UserItem' + +export interface UserApi { + register(email: string, password: string, userName: string): Promise + login(email: string, password: string): Promise + logout(): Promise + getUser(): Promise + getToken(): Promise + updateUser(user: UserItem): Promise + requestPasswordReset(email: string, reset_url?: string) + passwordReset(token: string, new_password: string) +} diff --git a/src/types/UserItem.d.ts b/src/types/UserItem.d.ts new file mode 100644 index 00000000..1d28817e --- /dev/null +++ b/src/types/UserItem.d.ts @@ -0,0 +1,13 @@ +import type { Profile } from './Profile' + +export interface UserItem { + id?: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + role?: any + email?: string + password?: string + profile?: Profile + first_name?: string + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any +} diff --git a/src/types/UtopiaMapProps.d.ts b/src/types/UtopiaMapProps.d.ts new file mode 100644 index 00000000..99389e81 --- /dev/null +++ b/src/types/UtopiaMapProps.d.ts @@ -0,0 +1,16 @@ +import type { Tag } from './Tag' +import type { GeoJsonObject } from 'geojson' + +export interface UtopiaMapProps { + height?: string + width?: string + center?: [number, number] + zoom?: number + tags?: Tag[] + children?: React.ReactNode + geo?: GeoJsonObject + showFilterControl?: boolean + showLayerControl?: boolean + showGratitudeControl?: boolean + infoText?: string +} diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 00000000..42cb2117 --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,9 @@ +export type { ItemsApi } from './ItemsApi' +export type { Tag } from './Tag' +export type { Item } from './Item' +export type { Permission } from './Permission' +export type { LayerProps } from './LayerProps' +export type { UserApi } from './UserApi' +export type { UserItem } from './UserItem' +export type { UtopiaMapProps } from './UtopiaMapProps' +export type { AssetsApi } from './AssetsApi' diff --git a/tsconfig.json b/tsconfig.json index 0d97d121..dc2c4663 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,7 +23,7 @@ "#components/*": ["./src/Components/*"], "#utils/*": ["./src/Utils/*"], "#src/*": ["./src/*"], - "#types/*": ["./types/*"], + "#types/*": ["./src/types/*"], "#root/*": ["./*"] } }, From ddb0d481fbe88e9604f96dbb7cfd7bb06de5f3d5 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 20:34:08 +0000 Subject: [PATCH 15/19] reorganized types --- types/AssetsApi.d.ts | 4 ---- types/FormState.d.ts | 20 ---------------- types/Item.d.ts | 44 ---------------------------------- types/ItemFormPopupProps.d.ts | 11 --------- types/ItemType.d.ts | 5 ---- types/ItemsApi.d.ts | 8 ------- types/LayerProps.d.ts | 42 -------------------------------- types/Permission.d.ts | 13 ---------- types/PermissionAction.d.ts | 1 - types/PermissionCondition.d.ts | 8 ------- types/Profile.d.ts | 10 -------- types/Relation.d.ts | 5 ---- types/Tag.d.ts | 6 ----- types/UserApi.d.ts | 12 ---------- types/UserItem.d.ts | 13 ---------- types/UtopiaMapProps.d.ts | 16 ------------- types/index.d.ts | 16 ------------- 17 files changed, 234 deletions(-) delete mode 100644 types/AssetsApi.d.ts delete mode 100644 types/FormState.d.ts delete mode 100644 types/Item.d.ts delete mode 100644 types/ItemFormPopupProps.d.ts delete mode 100644 types/ItemType.d.ts delete mode 100644 types/ItemsApi.d.ts delete mode 100644 types/LayerProps.d.ts delete mode 100644 types/Permission.d.ts delete mode 100644 types/PermissionAction.d.ts delete mode 100644 types/PermissionCondition.d.ts delete mode 100644 types/Profile.d.ts delete mode 100644 types/Relation.d.ts delete mode 100644 types/Tag.d.ts delete mode 100644 types/UserApi.d.ts delete mode 100644 types/UserItem.d.ts delete mode 100644 types/UtopiaMapProps.d.ts delete mode 100644 types/index.d.ts diff --git a/types/AssetsApi.d.ts b/types/AssetsApi.d.ts deleted file mode 100644 index f2005016..00000000 --- a/types/AssetsApi.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AssetsApi { - upload(file: Blob, title: string): Promise<{ id: string }> - url: string -} diff --git a/types/FormState.d.ts b/types/FormState.d.ts deleted file mode 100644 index 20589afd..00000000 --- a/types/FormState.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Item } from './Item' -import type { Tag } from './Tag' - -export interface FormState { - color: string - id: string - group_type: string - status: string - name: string - subname: string - text: string - contact: string - telephone: string - next_appointment: string - image: string - marker_icon: string - offers: Tag[] - needs: Tag[] - relations: Item[] -} diff --git a/types/Item.d.ts b/types/Item.d.ts deleted file mode 100644 index 47560e66..00000000 --- a/types/Item.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { ItemsApi } from './ItemsApi' -import type { LayerProps } from './LayerProps' -import type { Relation } from './Relation' -import type { UserItem } from './UserItem' -import type { Point } from 'geojson' - -export interface Item { - id: string - name: string - text: string - position?: Point - date_created?: string - date_updated?: string | null - start?: string - end?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - api?: ItemsApi - tags?: string[] - layer?: LayerProps - relations?: Relation[] - parent?: string - subname?: string - public_edit?: boolean - slug?: string - user_created?: UserItem - image?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any - /* constructor( - id: string, - name: string, - text: string, - position: Geometry, - layer?: LayerProps, - api?: ItemsApi, - ) { - this.id = id - this.name = name - this.text = text - this.position = position - this.layer = layer - this.api = api - } */ -} diff --git a/types/ItemFormPopupProps.d.ts b/types/ItemFormPopupProps.d.ts deleted file mode 100644 index 64e880bb..00000000 --- a/types/ItemFormPopupProps.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Item } from './Item' -import type { LayerProps } from './LayerProps' -import type { LatLng } from 'leaflet' - -export interface ItemFormPopupProps { - position: LatLng - layer: LayerProps - item?: Item - children?: React.ReactNode - setItemFormPopup?: React.Dispatch> -} diff --git a/types/ItemType.d.ts b/types/ItemType.d.ts deleted file mode 100644 index 1f125cc7..00000000 --- a/types/ItemType.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ItemType { - name: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any -} diff --git a/types/ItemsApi.d.ts b/types/ItemsApi.d.ts deleted file mode 100644 index 147fa462..00000000 --- a/types/ItemsApi.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface ItemsApi { - getItems(): Promise - getItem?(id: string): Promise - createItem?(item: T): Promise - updateItem?(item: T): Promise - deleteItem?(id: string): Promise - collectionName?: string -} diff --git a/types/LayerProps.d.ts b/types/LayerProps.d.ts deleted file mode 100644 index 7d742d5e..00000000 --- a/types/LayerProps.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { Item } from './Item' -import type { ItemFormPopupProps } from './ItemFormPopupProps' -import type { ItemsApi } from './ItemsApi' -import type { ItemType } from './ItemType' - -export interface LayerProps { - id?: string - data?: Item[] - children?: React.ReactNode - name: string - menuIcon: string - menuColor: string - menuText: string - markerIcon: string - markerShape: string - markerDefaultColor: string - markerDefaultColor2?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - api?: ItemsApi - itemType: ItemType - itemNameField?: string - itemSubnameField?: string - itemTextField?: string - itemAvatarField?: string - itemColorField?: string - itemOwnerField?: string - itemTagsField?: string - itemLatitudeField?: string - itemLongitudeField?: string - itemOffersField?: string - itemNeedsField?: string - onlyOnePerOwner?: boolean - customEditLink?: string - customEditParameter?: string - public_edit_items?: boolean - listed?: boolean - item_presets?: Record - setItemFormPopup?: React.Dispatch> - itemFormPopup?: ItemFormPopupProps | null - // eslint-disable-next-line @typescript-eslint/no-explicit-any - clusterRef?: any -} diff --git a/types/Permission.d.ts b/types/Permission.d.ts deleted file mode 100644 index 57067fee..00000000 --- a/types/Permission.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { PermissionAction } from './PermissionAction' -import type { PermissionCondition } from './PermissionCondition' - -export interface Permission { - id?: string - policy?: { name: string } - collection: string - action: PermissionAction - permissions?: { - // Optional, für spezifische Bedingungen wie `user_created` - _and: PermissionCondition[] - } -} diff --git a/types/PermissionAction.d.ts b/types/PermissionAction.d.ts deleted file mode 100644 index 7278a069..00000000 --- a/types/PermissionAction.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type PermissionAction = 'create' | 'read' | 'update' | 'delete' diff --git a/types/PermissionCondition.d.ts b/types/PermissionCondition.d.ts deleted file mode 100644 index e946bdb1..00000000 --- a/types/PermissionCondition.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface PermissionCondition { - user_created?: { - _eq: string // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID - } - public_edit?: { - _eq: boolean // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID - } -} diff --git a/types/Profile.d.ts b/types/Profile.d.ts deleted file mode 100644 index 4bfb8980..00000000 --- a/types/Profile.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Geometry } from 'geojson' - -export interface Profile { - id?: string - avatar?: string - color?: string - name: string - text: string - geoposition?: Geometry -} diff --git a/types/Relation.d.ts b/types/Relation.d.ts deleted file mode 100644 index 0b038022..00000000 --- a/types/Relation.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Relation { - related_items_id: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any -} diff --git a/types/Tag.d.ts b/types/Tag.d.ts deleted file mode 100644 index 1dc7c5a9..00000000 --- a/types/Tag.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Tag { - color: string - id: string - name: string - offer_or_need?: boolean -} diff --git a/types/UserApi.d.ts b/types/UserApi.d.ts deleted file mode 100644 index 6c36cd4e..00000000 --- a/types/UserApi.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { UserItem } from './UserItem' - -export interface UserApi { - register(email: string, password: string, userName: string): Promise - login(email: string, password: string): Promise - logout(): Promise - getUser(): Promise - getToken(): Promise - updateUser(user: UserItem): Promise - requestPasswordReset(email: string, reset_url?: string) - passwordReset(token: string, new_password: string) -} diff --git a/types/UserItem.d.ts b/types/UserItem.d.ts deleted file mode 100644 index 1d28817e..00000000 --- a/types/UserItem.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Profile } from './Profile' - -export interface UserItem { - id?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - role?: any - email?: string - password?: string - profile?: Profile - first_name?: string - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any -} diff --git a/types/UtopiaMapProps.d.ts b/types/UtopiaMapProps.d.ts deleted file mode 100644 index 99389e81..00000000 --- a/types/UtopiaMapProps.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Tag } from './Tag' -import type { GeoJsonObject } from 'geojson' - -export interface UtopiaMapProps { - height?: string - width?: string - center?: [number, number] - zoom?: number - tags?: Tag[] - children?: React.ReactNode - geo?: GeoJsonObject - showFilterControl?: boolean - showLayerControl?: boolean - showGratitudeControl?: boolean - infoText?: string -} diff --git a/types/index.d.ts b/types/index.d.ts deleted file mode 100644 index 473c3bea..00000000 --- a/types/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export * from './AssetsApi' -export * from './FormState' -export * from './Item' -export * from './ItemFormPopupProps' -export * from './ItemsApi' -export * from './ItemType' -export * from './LayerProps' -export * from './Permission' -export * from './PermissionAction' -export * from './PermissionCondition' -export * from './Profile' -export * from './Relation' -export * from './Tag' -export * from './UserApi' -export * from './UserItem' -export * from './UtopiaMapProps' From da7852f3e466cb2724c7b94e9d4d9cde82fdfa9c Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 20:34:13 +0000 Subject: [PATCH 16/19] 3.0.58 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index df9c3082..31fb4f35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.57", + "version": "3.0.58", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.57", + "version": "3.0.58", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index f034b0ee..568f49c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.57", + "version": "3.0.58", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage": "https://utopia-os.org/", From 58e1b1212176636ada00aba583028c83fb258af0 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 9 Feb 2025 21:09:38 +0000 Subject: [PATCH 17/19] capture tap events --- src/Components/Map/Subcomponents/AddButton.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Components/Map/Subcomponents/AddButton.tsx b/src/Components/Map/Subcomponents/AddButton.tsx index b4b9dd47..c9413855 100644 --- a/src/Components/Map/Subcomponents/AddButton.tsx +++ b/src/Components/Map/Subcomponents/AddButton.tsx @@ -57,6 +57,10 @@ export default function AddButton({ onClick={() => { triggerAction(layer) }} + onTouchEnd={(e) => { + triggerAction(layer) + e.preventDefault() + }} > Date: Mon, 10 Feb 2025 11:38:40 +0000 Subject: [PATCH 18/19] extended external dependencies --- rollup.config.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 0ad2545b..5f4a811b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,6 +2,7 @@ import path from 'path' import { fileURLToPath } from 'url' import alias from '@rollup/plugin-alias' +import resolve from '@rollup/plugin-node-resolve' import typescript from '@rollup/plugin-typescript' import { dts } from 'rollup-plugin-dts' import postcss from 'rollup-plugin-postcss' @@ -20,14 +21,19 @@ export default [ { file: 'dist/index.esm.js', format: 'esm', + sourcemap: true, }, { file: 'dist/index.cjs', format: 'cjs', + sourcemap: true, }, ], plugins: [ aliasConfig, + resolve({ + extensions: ['.ts', '.tsx'], + }), postcss({ plugins: [], }), @@ -65,12 +71,22 @@ export default [ 'react-image-crop/dist/ReactCrop.css', 'react-colorful', 'leaflet.locatecontrol/dist/L.Control.Locate.css', + 'yet-another-react-lightbox', + 'react-photo-album', ], }, { input: 'src/index.tsx', output: [{ file: 'dist/index.d.ts', format: 'es' }], - plugins: [aliasConfig, dts()], - external: [/\.css$/], + plugins: [ + aliasConfig, + dts({ + respectExternal: true, + compilerOptions: { + skipLibCheck: true, + }, + }), + ], + external: [/\.css$/, /\.d\.ts$/], // ✅ `.d.ts` als extern behandeln }, ] From 79ca17aa3f0b47b095874c7239c1c14b7dcb10a8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 10 Feb 2025 11:39:07 +0000 Subject: [PATCH 19/19] fix types import path --- src/Components/AppShell/AppShell.tsx | 2 +- src/Components/AppShell/NavBar.tsx | 2 +- src/Components/AppShell/SetAppState.tsx | 2 +- src/Components/AppShell/hooks/useAppState.tsx | 2 +- src/Components/AppShell/hooks/useAssets.tsx | 2 +- src/Components/Auth/useAuth.tsx | 4 ++-- src/Components/Gaming/Quests.tsx | 2 +- src/Components/Map/ItemForm.tsx | 2 +- src/Components/Map/ItemView.tsx | 2 +- src/Components/Map/Layer.tsx | 6 +++--- src/Components/Map/Permissions.tsx | 4 ++-- .../Map/Subcomponents/Controls/SearchControl.tsx | 2 +- src/Components/Map/Subcomponents/ItemFormPopup.tsx | 4 ++-- .../Subcomponents/ItemPopupComponents/HeaderView.tsx | 4 ++-- .../Subcomponents/ItemPopupComponents/PopupButton.tsx | 2 +- .../ItemPopupComponents/PopupCheckboxInput.tsx | 2 +- .../ItemPopupComponents/PopupStartEndInput.tsx | 2 +- .../ItemPopupComponents/PopupTextAreaInput.tsx | 2 +- .../ItemPopupComponents/PopupTextInput.tsx | 2 +- .../Subcomponents/ItemPopupComponents/StartEndView.tsx | 2 +- .../Map/Subcomponents/ItemPopupComponents/TextView.tsx | 4 ++-- src/Components/Map/Subcomponents/ItemViewPopup.tsx | 4 ++-- src/Components/Map/Tags.tsx | 4 ++-- src/Components/Map/UtopiaMap.tsx | 2 +- src/Components/Map/UtopiaMapInner.tsx | 4 ++-- src/Components/Map/hooks/useFilter.tsx | 4 ++-- src/Components/Map/hooks/useItems.tsx | 4 ++-- src/Components/Map/hooks/useLayers.tsx | 2 +- src/Components/Map/hooks/useLeafletRefs.tsx | 2 +- src/Components/Map/hooks/usePermissions.tsx | 10 +++++----- src/Components/Map/hooks/useSelectPosition.tsx | 6 +++--- src/Components/Map/hooks/useTags.tsx | 6 +++--- src/Components/Profile/ProfileForm.tsx | 4 ++-- src/Components/Profile/ProfileView.tsx | 6 +++--- src/Components/Profile/Subcomponents/ActionsButton.tsx | 2 +- .../Profile/Subcomponents/ContactInfoForm.tsx | 2 +- .../Profile/Subcomponents/ContactInfoView.tsx | 2 +- src/Components/Profile/Subcomponents/GalleryView.tsx | 2 +- .../Profile/Subcomponents/GroupSubHeaderView.tsx | 2 +- .../Profile/Subcomponents/GroupSubheaderForm.tsx | 4 ++-- .../Profile/Subcomponents/LinkedItemsHeaderView.tsx | 2 +- src/Components/Profile/Subcomponents/PlusButton.tsx | 2 +- .../Profile/Subcomponents/ProfileStartEndForm.tsx | 2 +- .../Profile/Subcomponents/ProfileStartEndView.tsx | 2 +- .../Profile/Subcomponents/ProfileTextForm.tsx | 2 +- .../Profile/Subcomponents/ProfileTextView.tsx | 2 +- src/Components/Profile/Subcomponents/TagsWidget.tsx | 2 +- src/Components/Profile/Templates/FlexForm.tsx | 4 ++-- src/Components/Profile/Templates/FlexView.tsx | 2 +- src/Components/Profile/Templates/OnepagerForm.tsx | 4 ++-- src/Components/Profile/Templates/OnepagerView.tsx | 2 +- src/Components/Profile/Templates/SimpleView.tsx | 2 +- src/Components/Profile/Templates/TabsView.tsx | 4 ++-- src/Components/Profile/UserSettings.tsx | 2 +- src/Components/Profile/itemFunctions.ts | 2 +- src/Components/Templates/AttestationForm.tsx | 4 ++-- src/Components/Templates/DateUserInfo.tsx | 2 +- src/Components/Templates/ItemCard.tsx | 2 +- src/Components/Templates/MarketView.tsx | 2 +- src/Components/Templates/OverlayItemsIndexPage.tsx | 2 +- src/Components/Templates/TagView.tsx | 2 +- 61 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/Components/AppShell/AppShell.tsx b/src/Components/AppShell/AppShell.tsx index 5267a48d..0421a302 100644 --- a/src/Components/AppShell/AppShell.tsx +++ b/src/Components/AppShell/AppShell.tsx @@ -2,7 +2,7 @@ import { ContextWrapper } from './ContextWrapper' import NavBar from './NavBar' import { SetAppState } from './SetAppState' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' export function AppShell({ appName, diff --git a/src/Components/AppShell/NavBar.tsx b/src/Components/AppShell/NavBar.tsx index f25d532a..08971877 100644 --- a/src/Components/AppShell/NavBar.tsx +++ b/src/Components/AppShell/NavBar.tsx @@ -6,7 +6,7 @@ import { toast } from 'react-toastify' import { useAuth } from '#components/Auth' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export default function NavBar({ appName, userType }: { appName: string; userType: string }) { const { isAuthenticated, user, logout } = useAuth() diff --git a/src/Components/AppShell/SetAppState.tsx b/src/Components/AppShell/SetAppState.tsx index a84ec067..eb537911 100644 --- a/src/Components/AppShell/SetAppState.tsx +++ b/src/Components/AppShell/SetAppState.tsx @@ -2,7 +2,7 @@ import { useEffect } from 'react' import { useSetAppState } from './hooks/useAppState' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' export const SetAppState = ({ assetsApi, diff --git a/src/Components/AppShell/hooks/useAppState.tsx b/src/Components/AppShell/hooks/useAppState.tsx index f0ffd76d..c338d8c4 100644 --- a/src/Components/AppShell/hooks/useAppState.tsx +++ b/src/Components/AppShell/hooks/useAppState.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' interface AppState { assetsApi: AssetsApi diff --git a/src/Components/AppShell/hooks/useAssets.tsx b/src/Components/AppShell/hooks/useAssets.tsx index 04b3d3f2..6c04d6ab 100644 --- a/src/Components/AppShell/hooks/useAssets.tsx +++ b/src/Components/AppShell/hooks/useAssets.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useState, createContext, useContext } from 'react' -import type { AssetsApi } from '#src/types/AssetsApi' +import type { AssetsApi } from '#types/AssetsApi' type UseAssetManagerResult = ReturnType diff --git a/src/Components/Auth/useAuth.tsx b/src/Components/Auth/useAuth.tsx index 767ce700..e892a0c6 100644 --- a/src/Components/Auth/useAuth.tsx +++ b/src/Components/Auth/useAuth.tsx @@ -5,8 +5,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { createContext, useState, useContext, useEffect } from 'react' -import type { UserApi } from '#src/types/UserApi' -import type { UserItem } from '#src/types/UserItem' +import type { UserApi } from '#types/UserApi' +import type { UserItem } from '#types/UserItem' interface AuthProviderProps { userApi: UserApi diff --git a/src/Components/Gaming/Quests.tsx b/src/Components/Gaming/Quests.tsx index 61303c30..0e669c6f 100644 --- a/src/Components/Gaming/Quests.tsx +++ b/src/Components/Gaming/Quests.tsx @@ -5,7 +5,7 @@ import { useItems } from '#components/Map/hooks/useItems' import { useQuestsOpen, useSetQuestOpen } from './hooks/useQuests' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function Quests() { const questsOpen = useQuestsOpen() diff --git a/src/Components/Map/ItemForm.tsx b/src/Components/Map/ItemForm.tsx index f9ad282f..d48b33ce 100644 --- a/src/Components/Map/ItemForm.tsx +++ b/src/Components/Map/ItemForm.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement, useEffect } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemForm = ({ children, diff --git a/src/Components/Map/ItemView.tsx b/src/Components/Map/ItemView.tsx index 9a674504..63a241d6 100644 --- a/src/Components/Map/ItemView.tsx +++ b/src/Components/Map/ItemView.tsx @@ -1,7 +1,7 @@ import { node, string } from 'prop-types' import { Children, cloneElement, isValidElement } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemView = ({ children, item }: { children?: React.ReactNode; item?: Item }) => { return ( diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index d2525df8..0ce40aef 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -28,9 +28,9 @@ import { useAddTag, useAllTagsLoaded, useGetItemTags, useTags } from './hooks/us import { ItemFormPopup } from './Subcomponents/ItemFormPopup' import { ItemViewPopup } from './Subcomponents/ItemViewPopup' -import type { Item } from '#src/types/Item' -import type { LayerProps } from '#src/types/LayerProps' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { LayerProps } from '#types/LayerProps' +import type { Tag } from '#types/Tag' import type { Popup } from 'leaflet' export const Layer = ({ diff --git a/src/Components/Map/Permissions.tsx b/src/Components/Map/Permissions.tsx index 90ba458f..cac67cf2 100644 --- a/src/Components/Map/Permissions.tsx +++ b/src/Components/Map/Permissions.tsx @@ -4,8 +4,8 @@ import { useAuth } from '#components/Auth' import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './hooks/usePermissions' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Permission } from '#src/types/Permission' +import type { ItemsApi } from '#types/ItemsApi' +import type { Permission } from '#types/Permission' export function Permissions({ data, diff --git a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx index 615527ac..323d8c5c 100644 --- a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx @@ -29,7 +29,7 @@ import MarkerIconFactory from '#utils/MarkerIconFactory' import { LocateControl } from './LocateControl' import { SidebarControl } from './SidebarControl' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const SearchControl = () => { const windowDimensions = useWindowDimensions() diff --git a/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/src/Components/Map/Subcomponents/ItemFormPopup.tsx index a8557695..ed35d861 100644 --- a/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -19,8 +19,8 @@ import { useAddTag, useTags } from '#components/Map/hooks/useTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' export function ItemFormPopup(props: ItemFormPopupProps) { const [spinner, setSpinner] = useState(false) diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx index e948b396..b7602afc 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx @@ -17,8 +17,8 @@ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' export function HeaderView({ item, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx index 7ef100ab..3f3bf2da 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom' import { useGetItemTags } from '#components/Map/hooks/useTags' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupButton = ({ url, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx index 87a28c1f..42a1d6ca 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.tsx @@ -1,4 +1,4 @@ -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupCheckboxInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx index 5c87b01e..819182d6 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ import { TextInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' interface StartEndInputProps { item?: Item diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx index b403bc31..c07b6b26 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.tsx @@ -1,6 +1,6 @@ import { TextAreaInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupTextAreaInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx index ce957842..4030769f 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.tsx @@ -1,6 +1,6 @@ import { TextInput } from '#components/Input' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const PopupTextInput = ({ dataField, diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx index 02b21cb1..c41d86f4 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/prefer-optional-chain */ -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const StartEndView = ({ item }: { item?: Item }) => { return ( diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx index 0dbb3ffc..59115151 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.tsx @@ -16,8 +16,8 @@ import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' import { fixUrls, mailRegex } from '#utils/ReplaceURLs' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export const TextView = ({ item, diff --git a/src/Components/Map/Subcomponents/ItemViewPopup.tsx b/src/Components/Map/Subcomponents/ItemViewPopup.tsx index ac484ad3..2a935e48 100644 --- a/src/Components/Map/Subcomponents/ItemViewPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemViewPopup.tsx @@ -20,8 +20,8 @@ import { timeAgo } from '#utils/TimeAgo' import { HeaderView } from './ItemPopupComponents/HeaderView' import { TextView } from './ItemPopupComponents/TextView' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' export interface ItemViewPopupProps { item: Item diff --git a/src/Components/Map/Tags.tsx b/src/Components/Map/Tags.tsx index 1195a0c2..ff77a3ff 100644 --- a/src/Components/Map/Tags.tsx +++ b/src/Components/Map/Tags.tsx @@ -4,8 +4,8 @@ import { useLocation } from 'react-router-dom' import { useAddFilterTag, useFilterTags, useResetFilterTags } from './hooks/useFilter' import { useSetTagData, useSetTagApi, useTags } from './hooks/useTags' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' export function Tags({ data, api }: { data?: Tag[]; api?: ItemsApi }) { const setTagData = useSetTagData() diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 1991df87..5fcb292d 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -5,7 +5,7 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper' import { UtopiaMapInner } from './UtopiaMapInner' -import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' +import type { UtopiaMapProps } from '#types/UtopiaMapProps' import 'react-toastify/dist/ReactToastify.css' function UtopiaMap({ diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index bd17434c..6cdf9106 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -36,8 +36,8 @@ import { TagsControl } from './Subcomponents/Controls/TagsControl' import { TextView } from './Subcomponents/ItemPopupComponents/TextView' import { SelectPosition } from './Subcomponents/SelectPosition' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' -import type { UtopiaMapProps } from '#src/types/UtopiaMapProps' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { UtopiaMapProps } from '#types/UtopiaMapProps' import type { Feature, Geometry as GeoJSONGeometry } from 'geojson' export function UtopiaMapInner({ diff --git a/src/Components/Map/hooks/useFilter.tsx b/src/Components/Map/hooks/useFilter.tsx index e05bc542..febc6bfd 100644 --- a/src/Components/Map/hooks/useFilter.tsx +++ b/src/Components/Map/hooks/useFilter.tsx @@ -10,8 +10,8 @@ import { useNavigate } from 'react-router-dom' import { useLayers } from './useLayers' import useWindowDimensions from './useWindowDimension' -import type { LayerProps } from '#src/types/LayerProps' -import type { Tag } from '#src/types/Tag' +import type { LayerProps } from '#types/LayerProps' +import type { Tag } from '#types/Tag' type ActionType = | { type: 'ADD_TAG'; tag: Tag } diff --git a/src/Components/Map/hooks/useItems.tsx b/src/Components/Map/hooks/useItems.tsx index 9517ef78..db174e77 100644 --- a/src/Components/Map/hooks/useItems.tsx +++ b/src/Components/Map/hooks/useItems.tsx @@ -10,8 +10,8 @@ import { toast } from 'react-toastify' import { useAddLayer } from './useLayers' -import type { Item } from '#src/types/Item' -import type { LayerProps } from '#src/types/LayerProps' +import type { Item } from '#types/Item' +import type { LayerProps } from '#types/LayerProps' type ActionType = | { type: 'ADD'; item: Item } diff --git a/src/Components/Map/hooks/useLayers.tsx b/src/Components/Map/hooks/useLayers.tsx index 711a95be..477ffc64 100644 --- a/src/Components/Map/hooks/useLayers.tsx +++ b/src/Components/Map/hooks/useLayers.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { LayerProps } from '#src/types/LayerProps' +import type { LayerProps } from '#types/LayerProps' interface ActionType { type: 'ADD LAYER' diff --git a/src/Components/Map/hooks/useLeafletRefs.tsx b/src/Components/Map/hooks/useLeafletRefs.tsx index 93a1c130..a092d98e 100644 --- a/src/Components/Map/hooks/useLeafletRefs.tsx +++ b/src/Components/Map/hooks/useLeafletRefs.tsx @@ -3,7 +3,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ import { useCallback, useReducer, createContext, useContext } from 'react' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' import type { Marker, Popup } from 'leaflet' interface LeafletRef { diff --git a/src/Components/Map/hooks/usePermissions.tsx b/src/Components/Map/hooks/usePermissions.tsx index 6d413b7c..5d149eb3 100644 --- a/src/Components/Map/hooks/usePermissions.tsx +++ b/src/Components/Map/hooks/usePermissions.tsx @@ -10,11 +10,11 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { useAuth } from '#components/Auth/useAuth' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { LayerProps } from '#src/types/LayerProps' -import type { Permission } from '#src/types/Permission' -import type { PermissionAction } from '#src/types/PermissionAction' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { LayerProps } from '#types/LayerProps' +import type { Permission } from '#types/Permission' +import type { PermissionAction } from '#types/PermissionAction' type ActionType = { type: 'ADD'; permission: Permission } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Map/hooks/useSelectPosition.tsx b/src/Components/Map/hooks/useSelectPosition.tsx index 982a3962..d00fa4d9 100644 --- a/src/Components/Map/hooks/useSelectPosition.tsx +++ b/src/Components/Map/hooks/useSelectPosition.tsx @@ -14,9 +14,9 @@ import { toast } from 'react-toastify' import { useUpdateItem } from './useItems' import { useHasUserPermission } from './usePermissions' -import type { Item } from '#src/types/Item' -import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps' -import type { LayerProps } from '#src/types/LayerProps' +import type { Item } from '#types/Item' +import type { ItemFormPopupProps } from '#types/ItemFormPopupProps' +import type { LayerProps } from '#types/LayerProps' import type { Point } from 'geojson' import type { LatLng } from 'leaflet' diff --git a/src/Components/Map/hooks/useTags.tsx b/src/Components/Map/hooks/useTags.tsx index 9420ce01..f80e96ad 100644 --- a/src/Components/Map/hooks/useTags.tsx +++ b/src/Components/Map/hooks/useTags.tsx @@ -13,9 +13,9 @@ import { useCallback, useReducer, createContext, useContext, useState } from 're import { getValue } from '#utils/GetValue' import { hashTagRegex } from '#utils/HashTagRegex' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' type ActionType = { type: 'ADD'; tag: Tag } | { type: 'REMOVE'; id: string } diff --git a/src/Components/Profile/ProfileForm.tsx b/src/Components/Profile/ProfileForm.tsx index c4eb2c6a..c5339657 100644 --- a/src/Components/Profile/ProfileForm.tsx +++ b/src/Components/Profile/ProfileForm.tsx @@ -23,8 +23,8 @@ import { OnepagerForm } from './Templates/OnepagerForm' import { SimpleForm } from './Templates/SimpleForm' import { TabsForm } from './Templates/TabsForm' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export function ProfileForm() { const [state, setState] = useState({ diff --git a/src/Components/Profile/ProfileView.tsx b/src/Components/Profile/ProfileView.tsx index ca9e072d..76c42aec 100644 --- a/src/Components/Profile/ProfileView.tsx +++ b/src/Components/Profile/ProfileView.tsx @@ -29,9 +29,9 @@ import { OnepagerView } from './Templates/OnepagerView' import { SimpleView } from './Templates/SimpleView' import { TabsView } from './Templates/TabsView' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' +import type { Tag } from '#types/Tag' export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi }) { const [item, setItem] = useState() diff --git a/src/Components/Profile/Subcomponents/ActionsButton.tsx b/src/Components/Profile/Subcomponents/ActionsButton.tsx index 6452f741..7eea5e44 100644 --- a/src/Components/Profile/Subcomponents/ActionsButton.tsx +++ b/src/Components/Profile/Subcomponents/ActionsButton.tsx @@ -12,7 +12,7 @@ import { HeaderView } from '#components/Map/Subcomponents/ItemPopupComponents/He import DialogModal from '#components/Templates/DialogModal' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function ActionButton({ item, diff --git a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx index 2081567e..7f129d01 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoForm.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { TextInput } from '#components/Input' -import type { FormState } from '#src/types/FormState' +import type { FormState } from '#types/FormState' export const ContactInfoForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ContactInfoView.tsx b/src/Components/Profile/Subcomponents/ContactInfoView.tsx index 01f2dfb5..a8368d24 100644 --- a/src/Components/Profile/Subcomponents/ContactInfoView.tsx +++ b/src/Components/Profile/Subcomponents/ContactInfoView.tsx @@ -8,7 +8,7 @@ import { Link } from 'react-router-dom' import { useAppState } from '#components/AppShell/hooks/useAppState' import { useItems } from '#components/Map/hooks/useItems' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ContactInfoView = ({ item, heading }: { item: Item; heading: string }) => { const appState = useAppState() diff --git a/src/Components/Profile/Subcomponents/GalleryView.tsx b/src/Components/Profile/Subcomponents/GalleryView.tsx index f6fee269..7cf2bc37 100644 --- a/src/Components/Profile/Subcomponents/GalleryView.tsx +++ b/src/Components/Profile/Subcomponents/GalleryView.tsx @@ -10,7 +10,7 @@ import 'react-photo-album/rows.css' import { useAppState } from '#components/AppShell/hooks/useAppState' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const GalleryView = ({ item }: { item: Item }) => { const [index, setIndex] = useState(-1) diff --git a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx index 6c808314..7718b075 100644 --- a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx @@ -1,6 +1,6 @@ import SocialShareBar from './SocialShareBar' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const GroupSubHeaderView = ({ item, diff --git a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx index db2e663b..55b8c58f 100644 --- a/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubheaderForm.tsx @@ -5,8 +5,8 @@ import { useEffect } from 'react' import ComboBoxInput from '#components/Input/ComboBoxInput' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' interface groupType { groupTypes_id: { diff --git a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx index 626f0ba7..57dd0ce9 100644 --- a/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx @@ -10,7 +10,7 @@ import { useEffect } from 'react' import { useAppState } from '#components/AppShell/hooks/useAppState' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export function LinkedItemsHeaderView({ item, diff --git a/src/Components/Profile/Subcomponents/PlusButton.tsx b/src/Components/Profile/Subcomponents/PlusButton.tsx index 06fa6e34..c8122d95 100644 --- a/src/Components/Profile/Subcomponents/PlusButton.tsx +++ b/src/Components/Profile/Subcomponents/PlusButton.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ import { useHasUserPermission } from '#components/Map/hooks/usePermissions' -import type { LayerProps } from '#src/types/LayerProps' +import type { LayerProps } from '#types/LayerProps' export function PlusButton({ layer, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx index 5ccc1384..e5f67ffe 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndForm.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ import { PopupStartEndInput } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileStartEndForm = ({ item, diff --git a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx index 95425563..8d64e55d 100644 --- a/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileStartEndView.tsx @@ -1,6 +1,6 @@ import { StartEndView } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileStartEndView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx index b74c01d4..1d72a3b3 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx @@ -9,7 +9,7 @@ import { getValue } from '#utils/GetValue' import { MarkdownHint } from './MarkdownHint' -import type { FormState } from '#src/types/FormState' +import type { FormState } from '#types/FormState' export const ProfileTextForm = ({ state, diff --git a/src/Components/Profile/Subcomponents/ProfileTextView.tsx b/src/Components/Profile/Subcomponents/ProfileTextView.tsx index 75dc8ca1..8a2725ce 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextView.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextView.tsx @@ -2,7 +2,7 @@ import { TextView } from '#components/Map' import { getValue } from '#utils/GetValue' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ProfileTextView = ({ item, diff --git a/src/Components/Profile/Subcomponents/TagsWidget.tsx b/src/Components/Profile/Subcomponents/TagsWidget.tsx index 48850c0c..b1a03ad1 100644 --- a/src/Components/Profile/Subcomponents/TagsWidget.tsx +++ b/src/Components/Profile/Subcomponents/TagsWidget.tsx @@ -11,7 +11,7 @@ import { useTags } from '#components/Map/hooks/useTags' import { decodeTag, encodeTag } from '#utils/FormatTags' import { randomColor } from '#utils/RandomColor' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' // eslint-disable-next-line react/prop-types export const TagsWidget = ({ placeholder, containerStyle, defaultTags, onUpdate }) => { diff --git a/src/Components/Profile/Templates/FlexForm.tsx b/src/Components/Profile/Templates/FlexForm.tsx index 0d6aa9c6..56f14eac 100644 --- a/src/Components/Profile/Templates/FlexForm.tsx +++ b/src/Components/Profile/Templates/FlexForm.tsx @@ -8,8 +8,8 @@ import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubhe import { ProfileStartEndForm } from '#components/Profile/Subcomponents/ProfileStartEndForm' import { ProfileTextForm } from '#components/Profile/Subcomponents/ProfileTextForm' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' const componentMap = { groupSubheaders: GroupSubheaderForm, diff --git a/src/Components/Profile/Templates/FlexView.tsx b/src/Components/Profile/Templates/FlexView.tsx index 08c35f26..608b0fdf 100644 --- a/src/Components/Profile/Templates/FlexView.tsx +++ b/src/Components/Profile/Templates/FlexView.tsx @@ -8,7 +8,7 @@ import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHe import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView' import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' const componentMap = { groupSubheaders: GroupSubHeaderView, diff --git a/src/Components/Profile/Templates/OnepagerForm.tsx b/src/Components/Profile/Templates/OnepagerForm.tsx index 9e4a1783..163cae4e 100644 --- a/src/Components/Profile/Templates/OnepagerForm.tsx +++ b/src/Components/Profile/Templates/OnepagerForm.tsx @@ -4,8 +4,8 @@ import { TextAreaInput } from '#components/Input' import { ContactInfoForm } from '#components/Profile/Subcomponents/ContactInfoForm' import { GroupSubheaderForm } from '#components/Profile/Subcomponents/GroupSubheaderForm' -import type { FormState } from '#src/types/FormState' -import type { Item } from '#src/types/Item' +import type { FormState } from '#types/FormState' +import type { Item } from '#types/Item' export const OnepagerForm = ({ item, diff --git a/src/Components/Profile/Templates/OnepagerView.tsx b/src/Components/Profile/Templates/OnepagerView.tsx index b26f0303..32a786ee 100644 --- a/src/Components/Profile/Templates/OnepagerView.tsx +++ b/src/Components/Profile/Templates/OnepagerView.tsx @@ -4,7 +4,7 @@ import { TextView } from '#components/Map' import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView' import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHeaderView' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const OnepagerView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/SimpleView.tsx b/src/Components/Profile/Templates/SimpleView.tsx index 6553cb77..dca6d079 100644 --- a/src/Components/Profile/Templates/SimpleView.tsx +++ b/src/Components/Profile/Templates/SimpleView.tsx @@ -1,6 +1,6 @@ import { TextView } from '#components/Map' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const SimpleView = ({ item }: { item: Item }) => { return ( diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index 51df5ec2..d7554b94 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -18,8 +18,8 @@ import { LinkedItemsHeaderView } from '#components/Profile/Subcomponents/LinkedI import { TagView } from '#components/Templates/TagView' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#src/types/Item' -import type { Tag } from '#src/types/Tag' +import type { Item } from '#types/Item' +import type { Tag } from '#types/Tag' export const TabsView = ({ attestations, diff --git a/src/Components/Profile/UserSettings.tsx b/src/Components/Profile/UserSettings.tsx index 2da3d54d..9f602f63 100644 --- a/src/Components/Profile/UserSettings.tsx +++ b/src/Components/Profile/UserSettings.tsx @@ -8,7 +8,7 @@ import { useAuth } from '#components/Auth' import { TextInput } from '#components/Input' import { MapOverlayPage } from '#components/Templates' -import type { UserItem } from '#src/types/UserItem' +import type { UserItem } from '#types/UserItem' export function UserSettings() { const { user, updateUser, loading /* token */ } = useAuth() diff --git a/src/Components/Profile/itemFunctions.ts b/src/Components/Profile/itemFunctions.ts index 5d4ca6dc..ad11c536 100644 --- a/src/Components/Profile/itemFunctions.ts +++ b/src/Components/Profile/itemFunctions.ts @@ -15,7 +15,7 @@ import { encodeTag } from '#utils/FormatTags' import { hashTagRegex } from '#utils/HashTagRegex' import { randomColor } from '#utils/RandomColor' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' // eslint-disable-next-line promise/avoid-new const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/src/Components/Templates/AttestationForm.tsx b/src/Components/Templates/AttestationForm.tsx index a4d84aea..ce5994ad 100644 --- a/src/Components/Templates/AttestationForm.tsx +++ b/src/Components/Templates/AttestationForm.tsx @@ -8,8 +8,8 @@ import { useItems } from '#components/Map/hooks/useItems' import { EmojiPicker } from './EmojiPicker' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#src/types/Item' -import type { ItemsApi } from '#src/types/ItemsApi' +import type { Item } from '#types/Item' +import type { ItemsApi } from '#types/ItemsApi' export const AttestationForm = ({ api }: { api?: ItemsApi }) => { const items = useItems() diff --git a/src/Components/Templates/DateUserInfo.tsx b/src/Components/Templates/DateUserInfo.tsx index 358764bf..4243a9c0 100644 --- a/src/Components/Templates/DateUserInfo.tsx +++ b/src/Components/Templates/DateUserInfo.tsx @@ -5,7 +5,7 @@ import { useState } from 'react' import { timeAgo } from '#utils/TimeAgo' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const DateUserInfo = ({ item }: { item: Item }) => { const [infoExpanded, setInfoExpanded] = useState(false) diff --git a/src/Components/Templates/ItemCard.tsx b/src/Components/Templates/ItemCard.tsx index 1e5938d8..585d18ae 100644 --- a/src/Components/Templates/ItemCard.tsx +++ b/src/Components/Templates/ItemCard.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { DateUserInfo } from './DateUserInfo' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const ItemCard = ({ i, diff --git a/src/Components/Templates/MarketView.tsx b/src/Components/Templates/MarketView.tsx index f2339540..18822755 100644 --- a/src/Components/Templates/MarketView.tsx +++ b/src/Components/Templates/MarketView.tsx @@ -13,7 +13,7 @@ import { getValue } from '#utils/GetValue' import { MapOverlayPage } from './MapOverlayPage' import { TagView } from './TagView' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' function groupAndCount(arr) { const grouped = arr.reduce((acc, obj) => { diff --git a/src/Components/Templates/OverlayItemsIndexPage.tsx b/src/Components/Templates/OverlayItemsIndexPage.tsx index 052ad27c..3388cddc 100644 --- a/src/Components/Templates/OverlayItemsIndexPage.tsx +++ b/src/Components/Templates/OverlayItemsIndexPage.tsx @@ -25,7 +25,7 @@ import { randomColor } from '#utils/RandomColor' import { ItemCard } from './ItemCard' import { MapOverlayPage } from './MapOverlayPage' -import type { Item } from '#src/types/Item' +import type { Item } from '#types/Item' export const OverlayItemsIndexPage = ({ url, diff --git a/src/Components/Templates/TagView.tsx b/src/Components/Templates/TagView.tsx index f103d533..f19c5adc 100644 --- a/src/Components/Templates/TagView.tsx +++ b/src/Components/Templates/TagView.tsx @@ -2,7 +2,7 @@ import { decodeTag } from '#utils/FormatTags' -import type { Tag } from '#src/types/Tag' +import type { Tag } from '#types/Tag' export const TagView = ({ tag,