diff --git a/package-lock.json b/package-lock.json index f525c02..cb5b185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "@steeze-ui/svelte-icon": "^1.3.2", "@sveltejs/adapter-auto": "1.0.2", "@sveltejs/adapter-node": "^1.1.6", + "@sveltejs/enhanced-img": "^0.1.8", "@sveltejs/kit": "^1.24.0", "@tailwindcss/forms": "^0.5.4", "@tailwindcss/typography": "^0.5.9", @@ -599,6 +600,16 @@ "node": ">=6.9.0" } }, + "node_modules/@emnapi/runtime": { + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.45.0.tgz", + "integrity": "sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==", + "dev": true, + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", @@ -1743,6 +1754,456 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz", + "integrity": "sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.2.tgz", + "integrity": "sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz", + "integrity": "sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=11", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.1.tgz", + "integrity": "sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "macos": ">=10.13", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.1.tgz", + "integrity": "sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.1.tgz", + "integrity": "sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.1.tgz", + "integrity": "sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz", + "integrity": "sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.1.tgz", + "integrity": "sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz", + "integrity": "sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.2.tgz", + "integrity": "sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.2.tgz", + "integrity": "sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.2.tgz", + "integrity": "sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.28", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.1" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz", + "integrity": "sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "glibc": ">=2.26", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.2.tgz", + "integrity": "sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz", + "integrity": "sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "musl": ">=1.2.2", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.1" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.2.tgz", + "integrity": "sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "optional": true, + "dependencies": { + "@emnapi/runtime": "^0.45.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.2.tgz", + "integrity": "sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz", + "integrity": "sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0", + "yarn": ">=3.2.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@ioredis/commands": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", @@ -1929,9 +2390,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", - "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -1942,7 +2403,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -2002,6 +2463,29 @@ "@sveltejs/kit": "^1.0.0" } }, + "node_modules/@sveltejs/enhanced-img": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@sveltejs/enhanced-img/-/enhanced-img-0.1.8.tgz", + "integrity": "sha512-0cLVR9KiO0/t3VVm64OM7bPHTkdaT2aaz1rwoAhao+EBXR3vMvLoYXLHvz8o9/552PSV8G844RkH7qkGc3YAiQ==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "svelte-parse-markup": "^0.1.2", + "vite-imagetools": "^6.2.8" + } + }, + "node_modules/@sveltejs/enhanced-img/node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@sveltejs/kit": { "version": "1.24.1", "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.24.1.tgz", @@ -3261,6 +3745,19 @@ "@types/estree": "^1.0.0" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3279,6 +3776,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dev": true, + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", @@ -3713,6 +4220,15 @@ "node": ">=8" } }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/devalue": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", @@ -5051,6 +5567,18 @@ "node": ">= 4" } }, + "node_modules/imagetools-core": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/imagetools-core/-/imagetools-core-6.0.4.tgz", + "integrity": "sha512-N1qs5qn7u9nR3kboISkYuvJm8MohiphCfBa+wx1UOropVaFis9/mh6wuDPLHJNhl6/64C7q2Pch5NASVKAaSrg==", + "dev": true, + "dependencies": { + "sharp": "^0.33.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/immediate": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", @@ -5131,6 +5659,12 @@ "url": "https://opencollective.com/ioredis" } }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -7062,9 +7596,9 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -7116,6 +7650,46 @@ "sha.js": "bin.js" } }, + "node_modules/sharp": { + "version": "0.33.2", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.2.tgz", + "integrity": "sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "semver": "^7.5.4" + }, + "engines": { + "libvips": ">=8.15.1", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.2", + "@img/sharp-darwin-x64": "0.33.2", + "@img/sharp-libvips-darwin-arm64": "1.0.1", + "@img/sharp-libvips-darwin-x64": "1.0.1", + "@img/sharp-libvips-linux-arm": "1.0.1", + "@img/sharp-libvips-linux-arm64": "1.0.1", + "@img/sharp-libvips-linux-s390x": "1.0.1", + "@img/sharp-libvips-linux-x64": "1.0.1", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.1", + "@img/sharp-libvips-linuxmusl-x64": "1.0.1", + "@img/sharp-linux-arm": "0.33.2", + "@img/sharp-linux-arm64": "0.33.2", + "@img/sharp-linux-s390x": "0.33.2", + "@img/sharp-linux-x64": "0.33.2", + "@img/sharp-linuxmusl-arm64": "0.33.2", + "@img/sharp-linuxmusl-x64": "0.33.2", + "@img/sharp-wasm32": "0.33.2", + "@img/sharp-win32-ia32": "0.33.2", + "@img/sharp-win32-x64": "0.33.2" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7137,6 +7711,15 @@ "node": ">=8" } }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, "node_modules/sirv": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz", @@ -7518,6 +8101,18 @@ "integrity": "sha512-EKCId1DjVL2RSUVJJsvtNcqQHox03XIgh4xh/4p7r6ST7d8mut6INY9/LqK4A17PFU64+3quZmqiSfOlf480CA==", "dev": true }, + "node_modules/svelte-parse-markup": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/svelte-parse-markup/-/svelte-parse-markup-0.1.2.tgz", + "integrity": "sha512-DycY7DJr7VqofiJ63ut1/NEG92HrWWL56VWITn/cJCu+LlZhMoBkBXT4opUitPEEwbq1nMQbv4vTKUfbOqIW1g==", + "dev": true, + "funding": { + "url": "https://bjornlu.com/sponsor" + }, + "peerDependencies": { + "svelte": "^3.0.0 || ^4.0.0" + } + }, "node_modules/svelte-preprocess": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.4.tgz", @@ -8275,6 +8870,19 @@ } } }, + "node_modules/vite-imagetools": { + "version": "6.2.9", + "resolved": "https://registry.npmjs.org/vite-imagetools/-/vite-imagetools-6.2.9.tgz", + "integrity": "sha512-C4ZYhgj2vAj43/TpZ06XlDNP0p/7LIeYbgUYr+xG44nM++4HGX6YZBKAYpiBNgiCFUTJ6eXkRppWBrfPMevgmg==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.5", + "imagetools-core": "^6.0.4" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/vitefu": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", diff --git a/package.json b/package.json index 0e8860a..9fb2fec 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@steeze-ui/svelte-icon": "^1.3.2", "@sveltejs/adapter-auto": "1.0.2", "@sveltejs/adapter-node": "^1.1.6", + "@sveltejs/enhanced-img": "^0.1.8", "@sveltejs/kit": "^1.24.0", "@tailwindcss/forms": "^0.5.4", "@tailwindcss/typography": "^0.5.9", diff --git a/src/lib/CampaignActions.svelte b/src/lib/CampaignActions.svelte index c76554d..66bdadd 100644 --- a/src/lib/CampaignActions.svelte +++ b/src/lib/CampaignActions.svelte @@ -19,6 +19,9 @@ let transferWalletModalDialog: ModalDialog; + import CartImage from '$lib/images/site/Cart.svg'; + import TransferImage from '$lib/images/site/Transfer.svg'; + // Wallet management import { OrderStatus } from './api'; import type { WalletCrowdtainerModel } from './Model/WalletCrowdtainerModel.js'; @@ -38,6 +41,9 @@ let transferWalletUserInput = ''; const dispatch = createEventDispatcher(); + + import ExitImage from '$lib/images/site/Exit.svg'; + @@ -113,7 +119,7 @@ >
- Checkout + Checkout

Checkout

@@ -145,7 +151,7 @@ Transfer participation proof to another wallet. @@ -188,7 +194,7 @@ >
- Leave campaign + Leave campaign

Leave

@@ -218,7 +224,7 @@ >
- Leave campaign + Leave campaign

Withdraw {tokenSymbol}

diff --git a/src/lib/JoinProjectButton.svelte b/src/lib/JoinProjectButton.svelte index e94447c..77605f6 100644 --- a/src/lib/JoinProjectButton.svelte +++ b/src/lib/JoinProjectButton.svelte @@ -34,7 +34,6 @@ export let tokenVersion: string; export let txSponsoringEnabled: boolean; export let totalSum: number; - export let tokenDecimals: number; export let totalCostInERCUnits: BigNumber; export let discountValue: number; export let validUserCouponCode: string; diff --git a/src/lib/MyCampaign.svelte b/src/lib/MyCampaign.svelte index 43593a3..e429562 100644 --- a/src/lib/MyCampaign.svelte +++ b/src/lib/MyCampaign.svelte @@ -156,7 +156,7 @@
- + isURL.test(path)); + async function refreshData() { if (staticDataLoadStatus !== LoadStatus.Loaded) { console.log('Skipped wallet data refresh, project data still loading.'); @@ -159,11 +167,25 @@
@@ -173,9 +195,16 @@
diff --git a/src/lib/ProjectGlobalView.svelte b/src/lib/ProjectGlobalView.svelte index 35ec3fe..50f31c4 100644 --- a/src/lib/ProjectGlobalView.svelte +++ b/src/lib/ProjectGlobalView.svelte @@ -119,7 +119,7 @@ {state} /> -
+
{#if campaignStaticUI}

diff --git a/src/lib/ProjectImages.ts b/src/lib/ProjectImages.ts new file mode 100644 index 0000000..57769f5 --- /dev/null +++ b/src/lib/ProjectImages.ts @@ -0,0 +1,29 @@ +export type Image = { + sources: { + avif: string + webp: string + png: string + } + img: { + src: string + w: number + h: number + } +}; + +export const campaignImages = Object.entries( + import.meta.glob('$lib/images/projects/**/*.{avif,gif,heif,jpeg,jpg,png,tiff,webp}', { + query: { enhanced: true }, + import: 'default', + eager: true + }) +); + +export function campaignImagesAt(paths: string[]): [string, Image][] { + return campaignImages.filter(([stringItem, _]) => { + return paths.some(path => { + return stringItem.includes(path); + } + ); + }); +} \ No newline at end of file diff --git a/src/lib/TopMenuNav.svelte b/src/lib/TopMenuNav.svelte index 565e486..96ceb4b 100644 --- a/src/lib/TopMenuNav.svelte +++ b/src/lib/TopMenuNav.svelte @@ -9,6 +9,10 @@ import { Clipboard } from '@steeze-ui/heroicons'; import { clickOutside } from '$lib/Utils/clickOutside'; + import CrowdtainerLogo from '$lib/images/site/CrowdtainerLogo.svg'; + import TopNavbarLogo from '$lib/images/site/TopNavbarLogo.svg'; + import EthereumLogo from '$lib/images/site/Ethereum.svg'; + // Wallet management import { walletState, @@ -68,7 +72,6 @@ $: path = $page.url.pathname; -

@@ -112,14 +115,14 @@ Crowdtainer @@ -170,7 +173,9 @@ /> -

Wallet locked

+

+ Wallet locked +

{:else if $walletState.connectionState === ConnectionState.ConnectedToUnsupportedNetwork}
@@ -205,7 +210,7 @@ aria-haspopup="true" > Open user menu - +
diff --git a/src/lib/images/docs/productSelection.png b/src/lib/images/docs/productSelection.png new file mode 100644 index 0000000..1814b45 Binary files /dev/null and b/src/lib/images/docs/productSelection.png differ diff --git a/static/images/projects/CoffeeBag.png b/src/lib/images/projects/31337/1/CoffeeBag.png similarity index 100% rename from static/images/projects/CoffeeBag.png rename to src/lib/images/projects/31337/1/CoffeeBag.png diff --git a/static/images/site/Cart.svg b/src/lib/images/site/Cart.svg similarity index 100% rename from static/images/site/Cart.svg rename to src/lib/images/site/Cart.svg diff --git a/static/images/site/CrowdtainerLogo.svg b/src/lib/images/site/CrowdtainerLogo.svg similarity index 100% rename from static/images/site/CrowdtainerLogo.svg rename to src/lib/images/site/CrowdtainerLogo.svg diff --git a/static/images/site/Download.svg b/src/lib/images/site/Download.svg similarity index 100% rename from static/images/site/Download.svg rename to src/lib/images/site/Download.svg diff --git a/static/images/site/Ethereum.svg b/src/lib/images/site/Ethereum.svg similarity index 100% rename from static/images/site/Ethereum.svg rename to src/lib/images/site/Ethereum.svg diff --git a/static/images/site/Exit.svg b/src/lib/images/site/Exit.svg similarity index 100% rename from static/images/site/Exit.svg rename to src/lib/images/site/Exit.svg diff --git a/static/images/site/TopNavbarLogo.svg b/src/lib/images/site/TopNavbarLogo.svg similarity index 100% rename from static/images/site/TopNavbarLogo.svg rename to src/lib/images/site/TopNavbarLogo.svg diff --git a/static/images/site/Transfer.svg b/src/lib/images/site/Transfer.svg similarity index 100% rename from static/images/site/Transfer.svg rename to src/lib/images/site/Transfer.svg diff --git a/static/images/site/VoucherPlaceHolder.svg b/src/lib/images/site/VoucherPlaceHolder.svg similarity index 100% rename from static/images/site/VoucherPlaceHolder.svg rename to src/lib/images/site/VoucherPlaceHolder.svg diff --git a/static/images/site/splitPayment.webp b/src/lib/images/site/splitPayment.webp similarity index 100% rename from static/images/site/splitPayment.webp rename to src/lib/images/site/splitPayment.webp diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index 41544d6..addb7ba 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -1,16 +1,17 @@
+ import CrowdtainerLogo from '$lib/images/site/CrowdtainerLogo.svg'; + import SplitPayment from '$lib/images/site/splitPayment.webp'; + +
@@ -48,9 +49,8 @@
  • Banks and credit cards are not strictly required. Ethereum ERC20 tokens are used - as a medium of payment. Costs are per transaction, not - a percentage. Less fees for intermediaries means more is available for the - campaign goal. + as a medium of payment. Costs are per transaction, not a percentage. Less fees + for intermediaries means more is available for the campaign goal.
  • Optional, transparent & fair referral system. Backers can share the campaign with @@ -63,7 +63,7 @@ Improved privacy. Instead of multiple companies receiving sensitive data (such as delivery details), only the actual service provider receives what is needed to fulfil the agreements. Other ways to improve the status quo in online ordering and - privacy, such as using + privacy, such as using zero knowledge proofs @@ -75,11 +75,7 @@ split contract at the recipient address:
    - Crowdtainer Logo + Crowdtainer Logo
  • diff --git a/src/routes/Data/projects.json b/src/routes/Data/projects.json index d6aee94..088f241 100644 --- a/src/routes/Data/projects.json +++ b/src/routes/Data/projects.json @@ -14,9 +14,7 @@ "description": "Explore the amazing world of Single Origin coffee beans. Sitting at altitudes between 950 and 1,450 m.a.s.l., the farm covers almost 900 hectares of predominantly hilly terrain, of which 239 hectares are used for coffee cultivation.", "projectURL": "https://shop.barterfly.de/index.php/meet-your-farmers/", "projectImageURLs": [ - "images/projects/CoffeeBag.png", - "images/projects/CoffeeBag.png", - "images/projects/CoffeeBag.png" + "/images/projects/31337/1/" ], "basePriceDenominator": [ 0.5, diff --git a/src/routes/dynamicVoucherAPI/[id]/+server.ts b/src/routes/dynamicVoucherAPI/[id]/+server.ts index 5d8c8c9..a782a43 100644 --- a/src/routes/dynamicVoucherAPI/[id]/+server.ts +++ b/src/routes/dynamicVoucherAPI/[id]/+server.ts @@ -1,7 +1,7 @@ // Typechain import { Vouchers721__factory } from '../../typechain/factories/Vouchers721__factory'; import { Crowdtainer__factory } from '../../typechain/factories/Crowdtainer.sol/Crowdtainer__factory'; -import type { IERC20 } from '../../typechain'; +import { IERC20__factory, type IERC20 } from '../../typechain'; // Ethers import { BigNumber } from 'ethers'; @@ -20,9 +20,12 @@ import { provider } from '$lib/ethersCalls/provider'; let lastFetchEpochTimeInMilliseconds = 0; const cacheExpirationTimeInMilliseconds = 6 * 1000; // 6 seconds +let erc20Contract: IERC20; +let crowdtainerForIdMap = new Map(); + async function fetchData(crowdtainerId: BigNumber): Promise> { try { - if (crowdtainerId.toNumber() === 0) { + if (crowdtainerId.toNumber() <= 0) { return Err({ error: `Invalid crowdtainerId: ${crowdtainerId.toNumber()}` }); } @@ -40,24 +43,28 @@ async function fetchData(crowdtainerId: BigNumber): Promise