refactor(other): repo setup (#271)

* direct library import

* running dev environment

* fix linting

* strickt null checks

* fix linting

* chunks

* fix jumping button

* don't exclude rollup-config from typechecks
This commit is contained in:
Anton Tranelis 2025-06-27 20:03:16 +02:00 committed by GitHub
parent 76d899dba2
commit 712aa98ac2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 209 additions and 287 deletions

View File

@ -18,7 +18,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-rnd": "^10.4.1", "react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0", "react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.110" "utopia-ui": "^3.0.111"
}, },
"devDependencies": { "devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
@ -2797,9 +2797,9 @@
} }
}, },
"node_modules/@tailwindcss/node": { "node_modules/@tailwindcss/node": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.11.tgz",
"integrity": "sha512-9rsOpdY9idRI2NH6CL4wORFY0+Q6fnx9XP9Ju+iq/0wJwGD5IByIgFmwVbyy4ymuyprj8Qh4ErxMKTUL4uNh3g==", "integrity": "sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.3.0", "@ampproject/remapping": "^2.3.0",
@ -2808,13 +2808,13 @@
"lightningcss": "1.30.1", "lightningcss": "1.30.1",
"magic-string": "^0.30.17", "magic-string": "^0.30.17",
"source-map-js": "^1.2.1", "source-map-js": "^1.2.1",
"tailwindcss": "4.1.7" "tailwindcss": "4.1.11"
} }
}, },
"node_modules/@tailwindcss/oxide": { "node_modules/@tailwindcss/oxide": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz",
"integrity": "sha512-5SF95Ctm9DFiUyjUPnDGkoKItPX/k+xifcQhcqX5RA85m50jw1pT/KzjdvlqxRja45Y52nR4MR9fD1JYd7f8NQ==", "integrity": "sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -2825,24 +2825,24 @@
"node": ">= 10" "node": ">= 10"
}, },
"optionalDependencies": { "optionalDependencies": {
"@tailwindcss/oxide-android-arm64": "4.1.7", "@tailwindcss/oxide-android-arm64": "4.1.11",
"@tailwindcss/oxide-darwin-arm64": "4.1.7", "@tailwindcss/oxide-darwin-arm64": "4.1.11",
"@tailwindcss/oxide-darwin-x64": "4.1.7", "@tailwindcss/oxide-darwin-x64": "4.1.11",
"@tailwindcss/oxide-freebsd-x64": "4.1.7", "@tailwindcss/oxide-freebsd-x64": "4.1.11",
"@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.7", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11",
"@tailwindcss/oxide-linux-arm64-gnu": "4.1.7", "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11",
"@tailwindcss/oxide-linux-arm64-musl": "4.1.7", "@tailwindcss/oxide-linux-arm64-musl": "4.1.11",
"@tailwindcss/oxide-linux-x64-gnu": "4.1.7", "@tailwindcss/oxide-linux-x64-gnu": "4.1.11",
"@tailwindcss/oxide-linux-x64-musl": "4.1.7", "@tailwindcss/oxide-linux-x64-musl": "4.1.11",
"@tailwindcss/oxide-wasm32-wasi": "4.1.7", "@tailwindcss/oxide-wasm32-wasi": "4.1.11",
"@tailwindcss/oxide-win32-arm64-msvc": "4.1.7", "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11",
"@tailwindcss/oxide-win32-x64-msvc": "4.1.7" "@tailwindcss/oxide-win32-x64-msvc": "4.1.11"
} }
}, },
"node_modules/@tailwindcss/oxide-android-arm64": { "node_modules/@tailwindcss/oxide-android-arm64": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.11.tgz",
"integrity": "sha512-IWA410JZ8fF7kACus6BrUwY2Z1t1hm0+ZWNEzykKmMNM09wQooOcN/VXr0p/WJdtHZ90PvJf2AIBS/Ceqx1emg==", "integrity": "sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -2856,9 +2856,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-darwin-arm64": { "node_modules/@tailwindcss/oxide-darwin-arm64": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.11.tgz",
"integrity": "sha512-81jUw9To7fimGGkuJ2W5h3/oGonTOZKZ8C2ghm/TTxbwvfSiFSDPd6/A/KE2N7Jp4mv3Ps9OFqg2fEKgZFfsvg==", "integrity": "sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -2872,9 +2872,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-darwin-x64": { "node_modules/@tailwindcss/oxide-darwin-x64": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.11.tgz",
"integrity": "sha512-q77rWjEyGHV4PdDBtrzO0tgBBPlQWKY7wZK0cUok/HaGgbNKecegNxCGikuPJn5wFAlIywC3v+WMBt0PEBtwGw==", "integrity": "sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -2888,9 +2888,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-freebsd-x64": { "node_modules/@tailwindcss/oxide-freebsd-x64": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.11.tgz",
"integrity": "sha512-RfmdbbK6G6ptgF4qqbzoxmH+PKfP4KSVs7SRlTwcbRgBwezJkAO3Qta/7gDy10Q2DcUVkKxFLXUQO6J3CRvBGw==", "integrity": "sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -2904,9 +2904,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.11.tgz",
"integrity": "sha512-OZqsGvpwOa13lVd1z6JVwQXadEobmesxQ4AxhrwRiPuE04quvZHWn/LnihMg7/XkN+dTioXp/VMu/p6A5eZP3g==", "integrity": "sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -2920,9 +2920,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm64-gnu": { "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.11.tgz",
"integrity": "sha512-voMvBTnJSfKecJxGkoeAyW/2XRToLZ227LxswLAwKY7YslG/Xkw9/tJNH+3IVh5bdYzYE7DfiaPbRkSHFxY1xA==", "integrity": "sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -2936,9 +2936,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-arm64-musl": { "node_modules/@tailwindcss/oxide-linux-arm64-musl": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.11.tgz",
"integrity": "sha512-PjGuNNmJeKHnP58M7XyjJyla8LPo+RmwHQpBI+W/OxqrwojyuCQ+GUtygu7jUqTEexejZHr/z3nBc/gTiXBj4A==", "integrity": "sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -2952,9 +2952,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-x64-gnu": { "node_modules/@tailwindcss/oxide-linux-x64-gnu": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.11.tgz",
"integrity": "sha512-HMs+Va+ZR3gC3mLZE00gXxtBo3JoSQxtu9lobbZd+DmfkIxR54NO7Z+UQNPsa0P/ITn1TevtFxXTpsRU7qEvWg==", "integrity": "sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -2968,9 +2968,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-linux-x64-musl": { "node_modules/@tailwindcss/oxide-linux-x64-musl": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.11.tgz",
"integrity": "sha512-MHZ6jyNlutdHH8rd+YTdr3QbXrHXqwIhHw9e7yXEBcQdluGwhpQY2Eku8UZK6ReLaWtQ4gijIv5QoM5eE+qlsA==", "integrity": "sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -2984,9 +2984,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-wasm32-wasi": { "node_modules/@tailwindcss/oxide-wasm32-wasi": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.11.tgz",
"integrity": "sha512-ANaSKt74ZRzE2TvJmUcbFQ8zS201cIPxUDm5qez5rLEwWkie2SkGtA4P+GPTj+u8N6JbPrC8MtY8RmJA35Oo+A==", "integrity": "sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==",
"bundleDependencies": [ "bundleDependencies": [
"@napi-rs/wasm-runtime", "@napi-rs/wasm-runtime",
"@emnapi/core", "@emnapi/core",
@ -3004,7 +3004,7 @@
"@emnapi/core": "^1.4.3", "@emnapi/core": "^1.4.3",
"@emnapi/runtime": "^1.4.3", "@emnapi/runtime": "^1.4.3",
"@emnapi/wasi-threads": "^1.0.2", "@emnapi/wasi-threads": "^1.0.2",
"@napi-rs/wasm-runtime": "^0.2.9", "@napi-rs/wasm-runtime": "^0.2.11",
"@tybys/wasm-util": "^0.9.0", "@tybys/wasm-util": "^0.9.0",
"tslib": "^2.8.0" "tslib": "^2.8.0"
}, },
@ -3013,9 +3013,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.11.tgz",
"integrity": "sha512-HUiSiXQ9gLJBAPCMVRk2RT1ZrBjto7WvqsPBwUrNK2BcdSxMnk19h4pjZjI7zgPhDxlAbJSumTC4ljeA9y0tEw==", "integrity": "sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -3029,9 +3029,9 @@
} }
}, },
"node_modules/@tailwindcss/oxide-win32-x64-msvc": { "node_modules/@tailwindcss/oxide-win32-x64-msvc": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.11.tgz",
"integrity": "sha512-rYHGmvoHiLJ8hWucSfSOEmdCBIGZIq7SpkPRSqLsH2Ab2YUNgKeAPT1Fi2cx3+hnYOrAb0jp9cRyode3bBW4mQ==", "integrity": "sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -3045,17 +3045,17 @@
} }
}, },
"node_modules/@tailwindcss/vite": { "node_modules/@tailwindcss/vite": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.11.tgz",
"integrity": "sha512-tYa2fO3zDe41I7WqijyVbRd8oWT0aEID1Eokz5hMT6wShLIHj3yvwj9XbfuloHP9glZ6H+aG2AN/+ZrxJ1Y5RQ==", "integrity": "sha512-RHYhrR3hku0MJFRV+fN2gNbDNEh3dwKvY8XJvTxCSXeMOsCRSr+uKvDWQcbizrHgjML6ZmTE5OwMrl5wKcujCw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@tailwindcss/node": "4.1.7", "@tailwindcss/node": "4.1.11",
"@tailwindcss/oxide": "4.1.7", "@tailwindcss/oxide": "4.1.11",
"tailwindcss": "4.1.7" "tailwindcss": "4.1.11"
}, },
"peerDependencies": { "peerDependencies": {
"vite": "^5.2.0 || ^6" "vite": "^5.2.0 || ^6 || ^7"
} }
}, },
"node_modules/@tanstack/query-core": { "node_modules/@tanstack/query-core": {
@ -5247,9 +5247,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/enhanced-resolve": { "node_modules/enhanced-resolve": {
"version": "5.18.1", "version": "5.18.2",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz",
"integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"graceful-fs": "^4.2.4", "graceful-fs": "^4.2.4",
@ -9223,9 +9223,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.3", "version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -9242,7 +9242,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"nanoid": "^3.3.8", "nanoid": "^3.3.11",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"source-map-js": "^1.2.1" "source-map-js": "^1.2.1"
}, },
@ -10755,9 +10755,9 @@
} }
}, },
"node_modules/tailwindcss": { "node_modules/tailwindcss": {
"version": "4.1.7", "version": "4.1.11",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.7.tgz", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz",
"integrity": "sha512-kr1o/ErIdNhTz8uzAYL7TpaUuzKIE6QPQ4qmSdxnoX/lo+5wmUHQA6h3L5yIqEImSRnAAURDirLu/BgiXGPAhg==", "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/tapable": { "node_modules/tapable": {
@ -11438,9 +11438,9 @@
} }
}, },
"node_modules/utopia-ui": { "node_modules/utopia-ui": {
"version": "3.0.110", "version": "3.0.111",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.110.tgz", "resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.111.tgz",
"integrity": "sha512-uwcdXSsttQbCJc++ZnPPHoNfxpTiklJLGbFQISbJ27VbXS9yVIBD38En/cTzW1hZUOex2HkxFcKOfIOG8fkhRg==", "integrity": "sha512-bUqgPCWyS3IcyegweXbRLt2SVYM9cWWLvLst9gcEaezfF4Egz4yXOq7mYmjBl+PpCt0d8EY6Tj8VhdfLxg63qg==",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
@ -11471,7 +11471,7 @@
"react-leaflet-cluster": "^2.1.0", "react-leaflet-cluster": "^2.1.0",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-photo-album": "^3.0.2", "react-photo-album": "^3.0.2",
"react-router-dom": "^6.16.0", "react-router-dom": "^6.23.0",
"react-toastify": "^9.1.3", "react-toastify": "^9.1.3",
"remark-breaks": "^4.0.0", "remark-breaks": "^4.0.0",
"tiptap-markdown": "^0.8.10", "tiptap-markdown": "^0.8.10",

View File

@ -20,7 +20,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-rnd": "^10.4.1", "react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0", "react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.110" "utopia-ui": "^3.0.111"
}, },
"devDependencies": { "devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",

View File

@ -33,12 +33,15 @@ import {
MarketView, MarketView,
SVG, SVG,
LoadingMapOverlay, LoadingMapOverlay,
ProfileView,
ProfileForm,
UserSettings,
} from 'utopia-ui' } from 'utopia-ui'
import { Route, Routes } from 'react-router-dom' import { Route, Routes } from 'react-router-dom'
import './App.css' import './App.css'
import { lazy, Suspense, useEffect, useState } from 'react' import { Suspense, useEffect, useState } from 'react'
import { assetsApi } from './api/assetsApi' import { assetsApi } from './api/assetsApi'
import { itemsApi } from './api/itemsApi' import { itemsApi } from './api/itemsApi'
@ -51,24 +54,6 @@ import { Landingpage } from './pages/Landingpage'
import MapContainer from './pages/MapContainer' import MapContainer from './pages/MapContainer'
import { getBottomRoutes, routes } from './routes/sidebar' import { getBottomRoutes, routes } from './routes/sidebar'
const ProfileForm = lazy(() =>
import('utopia-ui/Profile').then((mod) => ({
default: mod.ProfileForm,
})),
)
const ProfileView = lazy(() =>
import('utopia-ui/Profile').then((mod) => ({
default: mod.ProfileView,
})),
)
const UserSettings = lazy(() =>
import('utopia-ui/Profile').then((mod) => ({
default: mod.UserSettings,
})),
)
function App() { function App() {
const [permissionsApiInstance, setPermissionsApiInstance] = useState<permissionsApi>() const [permissionsApiInstance, setPermissionsApiInstance] = useState<permissionsApi>()
const [tagsApi, setTagsApi] = useState<itemsApi<Tag>>() const [tagsApi, setTagsApi] = useState<itemsApi<Tag>>()
@ -123,7 +108,7 @@ function App() {
icon: ( icon: (
<SVG <SVG
src={'https://api.utopia-lab.org/assets/' + l.indexIcon} src={'https://api.utopia-lab.org/assets/' + l.indexIcon}
className='w-6 h-6' className='tw:w-6 tw:h-6'
preProcessor={(code: string) => preProcessor={(code: string) =>
code.replace(/stroke=".*?"/g, 'stroke="currentColor"') code.replace(/stroke=".*?"/g, 'stroke="currentColor"')
} }
@ -154,7 +139,7 @@ function App() {
if (map && layers) if (map && layers)
return ( return (
<div className='App overflow-x-hidden'> <div className='App tw:overflow-x-hidden'>
<AuthProvider userApi={new userApi()}> <AuthProvider userApi={new userApi()}>
<AppShell <AppShell
assetsApi={new assetsApi('https://api.utopia-lab.org/assets/')} assetsApi={new assetsApi('https://api.utopia-lab.org/assets/')}
@ -246,18 +231,18 @@ function App() {
) )
else if (map == 'null' && !loading) else if (map == 'null' && !loading)
return ( return (
<div className='flex items-center justify-center h-screen'> <div className='tw:flex tw:items-center tw:justify-center tw:h-screen'>
<div> <div>
<p className='text-xl font-semibold'>This map does not exist</p> <p className='tw:text-xl tw:font-semibold'>This map does not exist</p>
</div> </div>
</div> </div>
) )
else else
return ( return (
<div className='outer'> <div className='outer'>
<img className='pulse-loader opacity h-[96px]' src='/3markers-globe.svg' /> <img className='pulse-loader tw-h-[96px]' src='/3markers-globe.svg' />
<br /> <br />
<span className='loader'></span> <span className='tw:loader'></span>
</div> </div>
) )
} }

View File

@ -2,13 +2,12 @@
/* eslint-disable @typescript-eslint/restrict-plus-operands */ /* eslint-disable @typescript-eslint/restrict-plus-operands */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { TextView } from 'utopia-ui' import { TextView } from 'utopia-ui'
interface ChapterProps { interface ChapterProps {
clickAction1?: () => void clickAction1: () => void
clickAction2?: () => void
map?: any map?: any
} }
@ -21,20 +20,23 @@ export function Welcome1({ clickAction1, map }: ChapterProps) {
</> </>
) : ( ) : (
<> <>
<h3 className='font-bold text-lg'>Welcome to {map?.name || 'Utopia Map'}</h3> <h3 className='tw:font-bold tw:text-lg'>Welcome to {map?.name || 'Utopia Map'}</h3>
<img <img
className='float-right w-32 m-2' className='tw:float-right tw:w-32 tw:m-2'
src={'https://api.utopia-lab.org/assets/' + map.logo} src={'https://api.utopia-lab.org/assets/' + map.logo}
></img> ></img>
<p className='py-3'> <p className='tw:py-3'>
It is a tool for collaborative mapping to connect local initiatives, people and events. It is a tool for collaborative mapping to connect local initiatives, people and events.
</p> </p>
<p className='py-1'> <p className='tw:py-1'>
Join us and grow the network by adding projects and events to the map. Join us and grow the network by adding projects and events to the map.
</p> </p>
<p className='py-1'>Create your personal profile and place it on the map.</p> <p className='tw:py-1'>Create your personal profile and place it on the map.</p>
<div className='grid'> <div className='tw:grid'>
<label className='btn btn-primary place-self-end mt-4' onClick={() => clickAction1!()}> <label
className='tw:btn tw:btn-primary tw:place-self-end tw:mt-4'
onClick={() => clickAction1()}
>
Close Close
</label> </label>
</div> </div>

View File

@ -5,4 +5,7 @@
@theme { @theme {
--animate-fade: fadeOut 1s ease-in-out; --animate-fade: fadeOut 1s ease-in-out;
} }
@import 'tailwindcss' prefix(tw);
@source '../../lib/src/';

View File

@ -1,4 +1,3 @@
/* eslint-disable import/default */
/* eslint-disable import/extensions */ /* eslint-disable import/extensions */
/* eslint-disable import/no-named-as-default-member */ /* eslint-disable import/no-named-as-default-member */
/* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-non-null-assertion */

View File

@ -1,98 +0,0 @@
/* eslint-disable import/default */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline'
import {
add,
eachDayOfInterval,
endOfMonth,
endOfWeek,
format,
getDay,
isSameMonth,
isToday,
parse,
startOfToday,
startOfWeek,
} from 'date-fns'
import React, { useState } from 'react'
import { MapOverlayPage } from 'utopia-ui'
export const Calendar = () => {
const today = startOfToday()
const days = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']
const colStartClasses = [
'',
'col-start-2',
'col-start-3',
'col-start-4',
'col-start-5',
'col-start-6',
'col-start-7',
]
const [currMonth, setCurrMonth] = useState(() => format(today, 'MMM-yyyy'))
const firstDayOfMonth = parse(currMonth, 'MMM-yyyy', new Date())
const daysInMonth = eachDayOfInterval({
start: startOfWeek(firstDayOfMonth),
end: endOfWeek(endOfMonth(firstDayOfMonth)),
})
const getPrevMonth = (event: React.MouseEvent<SVGSVGElement>) => {
event.preventDefault()
const firstDayOfPrevMonth = add(firstDayOfMonth, { months: -1 })
setCurrMonth(format(firstDayOfPrevMonth, 'MMM-yyyy'))
}
const getNextMonth = (event: React.MouseEvent<SVGSVGElement>) => {
event.preventDefault()
const firstDayOfNextMonth = add(firstDayOfMonth, { months: 1 })
setCurrMonth(format(firstDayOfNextMonth, 'MMM-yyyy'))
}
return (
<MapOverlayPage
backdrop
className='tw-max-h-[calc(100dvh-96px)] tw-h-fit md:tw-w-[calc(50%-32px)] tw-w-[calc(100%-32px)] max-w-lg'
>
<div className='flex items-center justify-between'>
<p className='font-semibold text-xl'>{format(firstDayOfMonth, 'MMMM yyyy')}</p>
<div className='flex items-center justify-evenly gap-6 sm:gap-12'>
<ChevronLeftIcon className='w-6 h-6 cursor-pointer' onClick={getPrevMonth} />
<ChevronRightIcon className='w-6 h-6 cursor-pointer' onClick={getNextMonth} />
</div>
</div>
<hr className='my-6' />
<div className='grid grid-cols-7 gap-6 sm:gap-12 place-items-center'>
{days.map((day, idx) => {
return (
<div key={idx} className='font-semibold'>
{capitalizeFirstLetter(day)}
</div>
)
})}
</div>
<div className='grid grid-cols-7 gap-4 sm:gap-12 mt-8 place-items-center'>
{daysInMonth.map((day, idx) => {
return (
<div key={idx} className={colStartClasses[getDay(day)]}>
<p
className={`cursor-pointer flex items-center justify-center font-semibold h-8 w-8 rounded-full hover:text-white ${
isSameMonth(day, today) ? 'text-current' : 'text-gray-500'
} ${!isToday(day) && 'hover:bg-primary-content'} ${
isToday(day) && 'bg-primary text-white!'
}`}
>
{format(day, 'd')}
</p>
</div>
)
})}
</div>
</MapOverlayPage>
)
}
const capitalizeFirstLetter = (string: string) => {
return string
}

View File

@ -124,11 +124,11 @@ function MapContainer({ layers, map }: { layers: LayerProps[]; map: any }) {
<PopupStartEndInput showLabels={false}></PopupStartEndInput> <PopupStartEndInput showLabels={false}></PopupStartEndInput>
)} )}
{layer.itemType.show_text_input && ( {layer.itemType.show_text_input && (
<div className='mt-4'> <div className='tw:mt-4'>
<PopupTextAreaInput <PopupTextAreaInput
dataField='text' dataField='text'
placeholder={'Text ...'} placeholder={'Text ...'}
style='tw-h-40' style='tw:h-40'
></PopupTextAreaInput> ></PopupTextAreaInput>
</div> </div>
)} )}
@ -136,7 +136,7 @@ function MapContainer({ layers, map }: { layers: LayerProps[]; map: any }) {
// layer.public_edit_items && <PopupCheckboxInput dataField={'public_edit'} label={'public edit'}/> // layer.public_edit_items && <PopupCheckboxInput dataField={'public_edit'} label={'public edit'}/>
} }
{layer.itemType.custom_text && ( {layer.itemType.custom_text && (
<div className='flex justify-center'> <div className='tw:flex tw:justify-center'>
<p>{layer.itemType.custom_text}</p> <p>{layer.itemType.custom_text}</p>
</div> </div>
)} )}

View File

@ -1,6 +1,8 @@
import { MapIcon } from '@heroicons/react/24/outline' import { MapIcon } from '@heroicons/react/24/outline'
import { SVG } from 'utopia-ui' import { SVG } from 'utopia-ui'
import type { Route } from '#components/AppShell/SideBar'
export const routes = [ export const routes = [
{ {
path: '/', path: '/',
@ -43,7 +45,7 @@ export const getBottomRoutes = (currentUrl: string) => {
const url = new URL(currentUrl) const url = new URL(currentUrl)
const isEmbedded = url.searchParams.get('embedded') === 'true' const isEmbedded = url.searchParams.get('embedded') === 'true'
const bottomRoutes = [ const bottomRoutes: Route[] = [
// Other routes can be added here // Other routes can be added here
] ]
@ -51,13 +53,13 @@ export const getBottomRoutes = (currentUrl: string) => {
bottomRoutes.push( bottomRoutes.push(
{ {
path: 'https://github.com/utopia-os/utopia-ui', // url path: 'https://github.com/utopia-os/utopia-ui', // url
icon: <SVG src='/github.svg' className='w-6 h-6' />, icon: <SVG src='/github.svg' className='tw:w-6 tw:h-6' />,
name: 'GitHub', // name that appear in Sidebar name: 'GitHub', // name that appear in Sidebar
blank: true, blank: true,
}, },
{ {
path: 'https://opencollective.com/utopia-project', // url path: 'https://opencollective.com/utopia-project', // url
icon: <SVG src='/opencollective.svg' className='w-6 h-6' />, icon: <SVG src='/opencollective.svg' className='tw:w-6 tw:h-6' />,
name: 'Open Collective', // name that appear in Sidebar name: 'Open Collective', // name that appear in Sidebar
blank: true, blank: true,
}, },

View File

@ -1,23 +1,24 @@
{ {
"extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler", "moduleResolution": "bundler",
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx", "jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true,
"paths": {
"utopia-ui": ["../lib/src"],
"#components/*": ["../lib/src/Components/*"],
"#utils/*": ["../lib/src/Utils/*"],
"#types/*": ["../lib/src/types/*"],
"#assets/*": ["../lib/src/assets/*"],
"#src/*": ["../lib/src/*"],
"#root/*": ["../lib/*"]
}
}, },
"include": ["src"], "include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }] "references": [{ "path": "./tsconfig.node.json" }]

View File

@ -22,26 +22,43 @@ export default defineConfig({
react(), react(),
tailwindcss(), tailwindcss(),
], ],
resolve: {
dedupe: ['react', 'react-dom', 'react-router-dom'],
alias: {
'utopia-ui': path.resolve(__dirname, '../lib/src'),
'#components': path.resolve(__dirname, '../lib/src/Components'),
'#utils': path.resolve(__dirname, '../lib/src/Utils'),
'#types': path.resolve(__dirname, '../lib/src/types'),
'#assets': path.resolve(__dirname, '../lib/src/assets'),
'#src': path.resolve(__dirname, '../lib/src'),
'#root': path.resolve(__dirname, '../lib'),
}
},
build: { build: {
sourcemap: true,
rollupOptions: { rollupOptions: {
output: { output: {
manualChunks(id) { manualChunks: (id) => {
if ( if (id.includes('lib/src')) {
id.includes('node_modules/utopia-ui/dist/Profile') && return 'utopia-ui'
/\.(esm|cjs)\.js$/.test(id)
) {
return 'profile-form'
} }
if (id.includes('node_modules')) {
if (id.includes('node_modules/utopia-ui/')) { if (id.includes('react')) {
return 'utopia-ui-vendor' return 'react';
} }
if (id.includes('tiptap')) {
if (id.includes('node_modules/')) { return 'tiptap';
return 'vendor' }
if (id.includes('leaflet')) {
return 'leaflet';
}
if (id.includes('lib/node_modules')) {
return 'utopia-ui-vendor'
}
else return 'vendor';
} }
} }
} },
} },
} },
}); });

6
lib/package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "utopia-ui", "name": "utopia-ui",
"version": "3.0.110", "version": "3.0.111",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "utopia-ui", "name": "utopia-ui",
"version": "3.0.110", "version": "3.0.111",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"dependencies": { "dependencies": {
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
@ -37,7 +37,7 @@
"react-leaflet-cluster": "^2.1.0", "react-leaflet-cluster": "^2.1.0",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-photo-album": "^3.0.2", "react-photo-album": "^3.0.2",
"react-router-dom": "^6.16.0", "react-router-dom": "^6.23.0",
"react-toastify": "^9.1.3", "react-toastify": "^9.1.3",
"remark-breaks": "^4.0.0", "remark-breaks": "^4.0.0",
"tiptap-markdown": "^0.8.10", "tiptap-markdown": "^0.8.10",

View File

@ -1,6 +1,6 @@
{ {
"name": "utopia-ui", "name": "utopia-ui",
"version": "3.0.110", "version": "3.0.111",
"description": "Reuseable React Components to build mapping apps for real life communities and networks", "description": "Reuseable React Components to build mapping apps for real life communities and networks",
"repository": "https://github.com/utopia-os/utopia-ui", "repository": "https://github.com/utopia-os/utopia-ui",
"homepage": "https://utopia-os.org/", "homepage": "https://utopia-os.org/",
@ -125,7 +125,7 @@
"react-leaflet-cluster": "^2.1.0", "react-leaflet-cluster": "^2.1.0",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-photo-album": "^3.0.2", "react-photo-album": "^3.0.2",
"react-router-dom": "^6.16.0", "react-router-dom": "^6.23.0",
"react-toastify": "^9.1.3", "react-toastify": "^9.1.3",
"remark-breaks": "^4.0.0", "remark-breaks": "^4.0.0",
"tiptap-markdown": "^0.8.10", "tiptap-markdown": "^0.8.10",

View File

@ -1,5 +1,7 @@
export { AuthProvider, UserApi, UserItem } from './useAuth' export { AuthProvider } from './useAuth'
export { LoginPage } from './LoginPage' export { LoginPage } from './LoginPage'
export { SignupPage } from './SignupPage' export { SignupPage } from './SignupPage'
export { RequestPasswordPage } from './RequestPasswordPage' export { RequestPasswordPage } from './RequestPasswordPage'
export { SetNewPasswordPage } from './SetNewPasswordPage' export { SetNewPasswordPage } from './SetNewPasswordPage'
export type { UserItem } from '#types/UserItem'
export type { UserApi } from '#types/UserApi'

View File

@ -3,9 +3,6 @@ import { createContext, useState, useContext, useEffect } from 'react'
import type { UserApi } from '#types/UserApi' import type { UserApi } from '#types/UserApi'
import type { UserItem } from '#types/UserItem' import type { UserItem } from '#types/UserItem'
export type { UserApi } from '#types/UserApi'
export type { UserItem } from '#types/UserItem'
interface AuthProviderProps { interface AuthProviderProps {
userApi: UserApi userApi: UserApi
children?: React.ReactNode children?: React.ReactNode

View File

@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-call */
@ -35,8 +34,6 @@ export const Autocomplete = ({
const inputRef = useRef<HTMLInputElement>() const inputRef = useRef<HTMLInputElement>()
const getSuggestionValue = (suggestion) => suggestion.name
const getSuggestions = (value) => { const getSuggestions = (value) => {
const inputValue = value.trim().toLowerCase() const inputValue = value.trim().toLowerCase()
const inputLength = inputValue.length const inputLength = inputValue.length

View File

@ -74,7 +74,7 @@ export function HeaderView({
<> <>
<div className='tw:flex tw:flex-row'> <div className='tw:flex tw:flex-row'>
<div className={'tw:grow tw:max-w-[calc(100%-60px)] }'}> <div className={'tw:grow tw:max-w-[calc(100%-60px)] }'}>
<div className='flex items-center'> <div className='tw:flex tw:items-center'>
{avatar && ( {avatar && (
<div className='tw:avatar'> <div className='tw:avatar'>
<div <div

View File

@ -100,7 +100,7 @@ export const ItemViewPopup = forwardRef((props: ItemViewPopupProps, ref: any) =>
}} }}
loading={loading} loading={loading}
/> />
<div className='tw:overflow-y-auto tw:overflow-x-hidden tw:max-h-64 fade'> <div className='tw:overflow-hidden tw:max-h-64 fade'>
{props.children ?? <TextView text={props.item.text} itemId={props.item.id} />} {props.children ?? <TextView text={props.item.text} itemId={props.item.id} />}
</div> </div>
<div className='tw:flex tw:-mb-1 tw:flex-row tw:mr-2 tw:mt-1'> <div className='tw:flex tw:-mb-1 tw:flex-row tw:mr-2 tw:mt-1'>

View File

@ -76,7 +76,9 @@ export const GalleryForm = ({ state, setState }: Props) => {
const images = state.gallery const images = state.gallery
.map((image) => ({ .map((image) => ({
src: appState.assetsApi.url + `${image.directus_files_id.id}.jpg`, src:
typeof image.directus_files_id !== 'string' &&
appState.assetsApi.url + `${image.directus_files_id.id}.jpg`,
state: 'uploaded', state: 'uploaded',
})) }))
.concat( .concat(
@ -99,7 +101,7 @@ export const GalleryForm = ({ state, setState }: Props) => {
{images.map((image, index) => ( {images.map((image, index) => (
<div key={index} className='tw:relative'> <div key={index} className='tw:relative'>
<img <img
src={image.src} src={image.src || undefined}
alt={`Gallery image ${index + 1}`} alt={`Gallery image ${index + 1}`}
className={`tw:w-full tw:h-full tw:object-cover tw:rounded-lg ${ className={`tw:w-full tw:h-full tw:object-cover tw:rounded-lg ${
image.state === 'uploading' ? 'tw:opacity-50' : '' image.state === 'uploading' ? 'tw:opacity-50' : ''

View File

@ -23,12 +23,19 @@ export const GalleryView = ({ item }: { item: Item }) => {
const [index, setIndex] = useState(-1) const [index, setIndex] = useState(-1)
const appState = useAppState() const appState = useAppState()
const images = const images =
item.gallery?.map(({ directus_files_id: { id, type, width, height } }, index) => ({ item.gallery?.flatMap((g, index) => {
src: `${appState.assetsApi.url}${id}${getExtension(type)}`, const file = g.directus_files_id
width, if (typeof file === 'string') return []
height, const { id, type, width, height } = file
index, return [
})) ?? [] {
src: `${appState.assetsApi.url}${id}${getExtension(type)}`,
width,
height,
index,
},
]
}) ?? []
if (images.length > 0) if (images.length > 0)
return ( return (

View File

@ -1,4 +1,3 @@
export { UserSettings } from './UserSettings' export { UserSettings } from './UserSettings'
// export { PlusButton } from './Subcomponents/PlusButton'
export { ProfileView } from './ProfileView' export { ProfileView } from './ProfileView'
export { ProfileForm } from './ProfileForm' export { ProfileForm } from './ProfileForm'

View File

@ -200,7 +200,7 @@ export const onUpdateItem = async (
...(state.needs.length > 0 && { needs: needsUpdates }), ...(state.needs.length > 0 && { needs: needsUpdates }),
...(state.openCollectiveSlug && { openCollectiveSlug: state.openCollectiveSlug }), ...(state.openCollectiveSlug && { openCollectiveSlug: state.openCollectiveSlug }),
gallery: state.gallery.map((i) => ({ gallery: state.gallery.map((i) => ({
directus_files_id: i.directus_files_id.id, directus_files_id: typeof i.directus_files_id !== 'string' && i.directus_files_id.id,
})), })),
} }

View File

@ -32,7 +32,6 @@ import type { Item } from '#types/Item'
export const OverlayItemsIndexPage = ({ export const OverlayItemsIndexPage = ({
url, url,
layerName, layerName,
parameterField,
}: { }: {
layerName: string layerName: string
url: string url: string
@ -40,8 +39,6 @@ export const OverlayItemsIndexPage = ({
}) => { }) => {
const [loading, setLoading] = useState<boolean>(false) const [loading, setLoading] = useState<boolean>(false)
const [addItemPopupOpen, setAddItemPopupOpen] = useState<boolean>(false) const [addItemPopupOpen, setAddItemPopupOpen] = useState<boolean>(false)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const parameterFieldDummy = parameterField
const tabRef = useRef<HTMLFormElement>(null) const tabRef = useRef<HTMLFormElement>(null)

View File

@ -8,6 +8,7 @@ export * from './Components/Gaming'
export * from './Components/Templates' export * from './Components/Templates'
export * from './Components/Input' export * from './Components/Input'
export * from './Components/Item' export * from './Components/Item'
export * from './Components/Profile'
declare global { declare global {
interface Window { interface Window {

View File

@ -8,12 +8,14 @@ import type { Point } from 'geojson'
type TagIds = { tags_id: string }[] type TagIds = { tags_id: string }[]
interface GalleryItem { interface GalleryItem {
directus_files_id: { directus_files_id:
id: string | {
width: number id: string
height: number width: number
type: string height: number
} type: string
}
| string
} }
/** /**

View File

@ -1,24 +1,19 @@
{ {
"extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"declaration": true, "declaration": true,
"declarationDir": "dist/types", // 🔹 Muss innerhalb von dist/ liegen "declarationDir": "dist/types", // 🔹 Muss innerhalb von dist/ liegen
"emitDeclarationOnly": true, // Nur `.d.ts` generieren, kein JavaScript "emitDeclarationOnly": true, // Nur `.d.ts` generieren, kein JavaScript
"module": "esnext",
"target": "ESNext",
"lib": ["es6", "dom","es2015", "es2016", "es2017", "es2020"],
"sourceMap": false, "sourceMap": false,
"allowJs": false, "allowJs": false,
"jsx": "react-jsx",
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitThis": true, "noImplicitThis": true,
"strictNullChecks": true, "strictNullChecks": true,
"noUnusedLocals": false, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"paths": { "paths": {
"#assets/*": ["./src/assets/*"], "#assets/*": ["./src/assets/*"],
"#components/*": ["./src/Components/*"], "#components/*": ["./src/Components/*"],
@ -29,7 +24,7 @@
} }
}, },
"include": ["src", "vite.config.ts", "setupTest.ts", "cypress.config.ts", "cypress/support/commands.ts", "cypress/support/component.ts"], "include": ["src", "vite.config.ts", "setupTest.ts", "cypress.config.ts", "cypress/support/commands.ts", "cypress/support/component.ts"],
"exclude": ["node_modules", "dist", "example", "rollup.config.mjss"], "exclude": ["node_modules", "dist", "example"],
"typeRoots": [ "typeRoots": [
"./src/types", "./src/types",
"./node_modules/@types/" "./node_modules/@types/"

12
tsconfig.base.json Normal file
View File

@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"moduleResolution": "Node",
"jsx": "react-jsx",
"esModuleInterop": true,
"skipLibCheck": true,
"strictNullChecks": true,
}
}