From 974113e5b0c15cbb99bd80f7267897554f28ff26 Mon Sep 17 00:00:00 2001 From: riya-saharan Date: Sun, 22 Mar 2026 17:56:39 +0000 Subject: [PATCH] refactor: move jumpToState to Astro.locals to fix build race conditions --- package-lock.json | 1165 +---------------- src/components/Nav/NavPanels.tsx | 2 +- src/components/Nav/index.astro | 9 +- src/components/Settings/index.astro | 5 +- src/env.d.ts | 7 + src/globals/state.ts | 13 +- src/layouts/AboutLayout.astro | 9 +- src/layouts/CommunityLayout.astro | 7 +- src/layouts/ContributeLayout.astro | 8 +- src/layouts/ContributorDocLayout.astro | 7 +- src/layouts/EventLayout.astro | 5 +- src/layouts/EventsLayout.astro | 5 +- src/layouts/ExampleLayout.astro | 5 +- src/layouts/ExamplesLayout.astro | 5 +- src/layouts/HomepageLayout.astro | 5 +- src/layouts/LibrariesLayout.astro | 8 +- src/layouts/PeopleLayout.astro | 5 +- src/layouts/ReferenceItemLayout.astro | 9 +- src/layouts/ReferenceLayout.astro | 7 +- src/layouts/SearchLayout.astro | 5 +- src/layouts/SketchLayout.astro | 5 +- src/layouts/SketchesLayout.astro | 5 +- src/layouts/TextDetailLayout.astro | 5 +- src/layouts/TutorialLayout.astro | 6 +- src/layouts/TutorialsLayout.astro | 11 +- src/pages/[locale]/about.astro | 6 +- .../[locale]/education-resources/index.astro | 9 +- src/pages/[locale]/index.astro | 6 +- src/pages/about.astro | 7 +- src/pages/education-resources/index.astro | 9 +- src/pages/index.astro | 5 +- 31 files changed, 146 insertions(+), 1219 deletions(-) diff --git a/package-lock.json b/package-lock.json index 00aee98b98..4766e2a419 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "0.0.1", "dependencies": { "@astrojs/check": "^0.9.6", - "@astrojs/cloudflare": "^12.6.13", "@astrojs/mdx": "^4.3.13", "@astrojs/preact": "^4.1.3", "@astrojs/tailwind": "^6.0.2", @@ -147,1103 +146,6 @@ "typescript": "^5.0.0" } }, - "node_modules/@astrojs/cloudflare": { - "version": "12.6.13", - "resolved": "https://registry.npmjs.org/@astrojs/cloudflare/-/cloudflare-12.6.13.tgz", - "integrity": "sha512-oKaCyiovyQr183r9U93787Ju1zwk+rRMgPnLTwCLckHmOUK7sltA1Gp4LSGt8oNMgqQS6jR7uRdfQ/NPul37QA==", - "license": "MIT", - "dependencies": { - "@astrojs/internal-helpers": "0.7.6", - "@astrojs/underscore-redirects": "1.0.0", - "@cloudflare/workers-types": "^4.20260116.0", - "tinyglobby": "^0.2.15", - "vite": "^6.4.1", - "wrangler": "4.59.2" - }, - "peerDependencies": { - "astro": "^5.7.0" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@astrojs/internal-helpers": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.7.6.tgz", - "integrity": "sha512-GOle7smBWKfMSP8osUIGOlB5kaHdQLV3foCsf+5Q9Wsuu+C6Fs3Ez/ttXmhjZ1HkSgsogcM1RXSjjOVieHq16Q==", - "license": "MIT" - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/unenv-preset": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.10.0.tgz", - "integrity": "sha512-/uII4vLQXhzCAZzEVeYAjFLBNg2nqTJ1JGzd2lRF6ItYe6U2zVoYGfeKpGx/EkBF6euiU+cyBXgMdtJih+nQ6g==", - "license": "MIT OR Apache-2.0", - "peerDependencies": { - "unenv": "2.0.0-rc.24", - "workerd": "^1.20251221.0" - }, - "peerDependenciesMeta": { - "workerd": { - "optional": true - } - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260114.0.tgz", - "integrity": "sha512-HNlsRkfNgardCig2P/5bp/dqDECsZ4+NU5XewqArWxMseqt3C5daSuptI620s4pn7Wr0ZKg7jVLH0PDEBkA+aA==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260114.0.tgz", - "integrity": "sha512-qyE1UdFnAlxzb+uCfN/d9c8icch7XRiH49/DjoqEa+bCDihTuRS7GL1RmhVIqHJhb3pX3DzxmKgQZBDBL83Inw==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260114.0.tgz", - "integrity": "sha512-Z0BLvAj/JPOabzads2ddDEfgExWTlD22pnwsuNbPwZAGTSZeQa3Y47eGUWyHk+rSGngknk++S7zHTGbKuG7RRg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260114.0.tgz", - "integrity": "sha512-kPUmEtUxUWlr9PQ64kuhdK0qyo8idPe5IIXUgi7xCD7mDd6EOe5J7ugDpbfvfbYKEjx4DpLvN2t45izyI/Sodw==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260114.0.tgz", - "integrity": "sha512-MJnKgm6i1jZGyt2ZHQYCnRlpFTEZcK2rv9y7asS3KdVEXaDgGF8kOns5u6YL6/+eMogfZuHRjfDS+UqRTUYIFA==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", - "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/android-arm": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.0.tgz", - "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/android-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", - "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/android-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.0.tgz", - "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", - "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/darwin-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", - "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", - "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", - "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-arm": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", - "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", - "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-ia32": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", - "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-loong64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", - "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", - "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", - "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", - "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-s390x": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", - "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/linux-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", - "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", - "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", - "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", - "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", - "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", - "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/sunos-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", - "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/win32-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", - "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/win32-ia32": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", - "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@esbuild/win32-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", - "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-darwin-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", - "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-darwin-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", - "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", - "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", - "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", - "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", - "cpu": [ - "arm" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", - "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", - "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", - "cpu": [ - "s390x" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", - "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", - "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", - "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linux-arm": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", - "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", - "cpu": [ - "arm" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linux-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", - "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linux-s390x": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", - "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", - "cpu": [ - "s390x" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linux-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", - "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", - "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", - "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.2.4" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-wasm32": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", - "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", - "cpu": [ - "wasm32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.7.0" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-win32-ia32": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", - "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", - "cpu": [ - "ia32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/@img/sharp-win32-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", - "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/esbuild": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", - "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.0", - "@esbuild/android-arm": "0.27.0", - "@esbuild/android-arm64": "0.27.0", - "@esbuild/android-x64": "0.27.0", - "@esbuild/darwin-arm64": "0.27.0", - "@esbuild/darwin-x64": "0.27.0", - "@esbuild/freebsd-arm64": "0.27.0", - "@esbuild/freebsd-x64": "0.27.0", - "@esbuild/linux-arm": "0.27.0", - "@esbuild/linux-arm64": "0.27.0", - "@esbuild/linux-ia32": "0.27.0", - "@esbuild/linux-loong64": "0.27.0", - "@esbuild/linux-mips64el": "0.27.0", - "@esbuild/linux-ppc64": "0.27.0", - "@esbuild/linux-riscv64": "0.27.0", - "@esbuild/linux-s390x": "0.27.0", - "@esbuild/linux-x64": "0.27.0", - "@esbuild/netbsd-arm64": "0.27.0", - "@esbuild/netbsd-x64": "0.27.0", - "@esbuild/openbsd-arm64": "0.27.0", - "@esbuild/openbsd-x64": "0.27.0", - "@esbuild/openharmony-arm64": "0.27.0", - "@esbuild/sunos-x64": "0.27.0", - "@esbuild/win32-arm64": "0.27.0", - "@esbuild/win32-ia32": "0.27.0", - "@esbuild/win32-x64": "0.27.0" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/miniflare": { - "version": "4.20260114.0", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260114.0.tgz", - "integrity": "sha512-QwHT7S6XqGdQxIvql1uirH/7/i3zDEt0B/YBXTYzMfJtVCR4+ue3KPkU+Bl0zMxvpgkvjh9+eCHhJbKEqya70A==", - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "0.8.1", - "sharp": "^0.34.5", - "undici": "7.14.0", - "workerd": "1.20260114.0", - "ws": "8.18.0", - "youch": "4.1.0-beta.10", - "zod": "^3.25.76" - }, - "bin": { - "miniflare": "bootstrap.js" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/sharp": { - "version": "0.34.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz", - "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "@img/colour": "^1.0.0", - "detect-libc": "^2.1.2", - "semver": "^7.7.3" - }, - "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.34.5", - "@img/sharp-darwin-x64": "0.34.5", - "@img/sharp-libvips-darwin-arm64": "1.2.4", - "@img/sharp-libvips-darwin-x64": "1.2.4", - "@img/sharp-libvips-linux-arm": "1.2.4", - "@img/sharp-libvips-linux-arm64": "1.2.4", - "@img/sharp-libvips-linux-ppc64": "1.2.4", - "@img/sharp-libvips-linux-riscv64": "1.2.4", - "@img/sharp-libvips-linux-s390x": "1.2.4", - "@img/sharp-libvips-linux-x64": "1.2.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", - "@img/sharp-libvips-linuxmusl-x64": "1.2.4", - "@img/sharp-linux-arm": "0.34.5", - "@img/sharp-linux-arm64": "0.34.5", - "@img/sharp-linux-ppc64": "0.34.5", - "@img/sharp-linux-riscv64": "0.34.5", - "@img/sharp-linux-s390x": "0.34.5", - "@img/sharp-linux-x64": "0.34.5", - "@img/sharp-linuxmusl-arm64": "0.34.5", - "@img/sharp-linuxmusl-x64": "0.34.5", - "@img/sharp-wasm32": "0.34.5", - "@img/sharp-win32-arm64": "0.34.5", - "@img/sharp-win32-ia32": "0.34.5", - "@img/sharp-win32-x64": "0.34.5" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/undici": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.14.0.tgz", - "integrity": "sha512-Vqs8HTzjpQXZeXdpsfChQTlafcMQaaIwnGwLam1wudSSjlJeQ3bw1j+TLPePgrCnCpUXx7Ba5Pdpf5OBih62NQ==", - "license": "MIT", - "engines": { - "node": ">=20.18.1" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/workerd": { - "version": "1.20260114.0", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260114.0.tgz", - "integrity": "sha512-kTJ+jNdIllOzWuVA3NRQRvywP0T135zdCjAE2dAUY1BFbxM6fmMZV8BbskEoQ4hAODVQUfZQmyGctcwvVCKxFA==", - "hasInstallScript": true, - "license": "Apache-2.0", - "bin": { - "workerd": "bin/workerd" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20260114.0", - "@cloudflare/workerd-darwin-arm64": "1.20260114.0", - "@cloudflare/workerd-linux-64": "1.20260114.0", - "@cloudflare/workerd-linux-arm64": "1.20260114.0", - "@cloudflare/workerd-windows-64": "1.20260114.0" - } - }, - "node_modules/@astrojs/cloudflare/node_modules/wrangler": { - "version": "4.59.2", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.59.2.tgz", - "integrity": "sha512-Z4xn6jFZTaugcOKz42xvRAYKgkVUERHVbuCJ5+f+gK+R6k12L02unakPGOA0L0ejhUl16dqDjKe4tmL9sedHcw==", - "license": "MIT OR Apache-2.0", - "dependencies": { - "@cloudflare/kv-asset-handler": "0.4.2", - "@cloudflare/unenv-preset": "2.10.0", - "blake3-wasm": "2.1.5", - "esbuild": "0.27.0", - "miniflare": "4.20260114.0", - "path-to-regexp": "6.3.0", - "unenv": "2.0.0-rc.24", - "workerd": "1.20260114.0" - }, - "bin": { - "wrangler": "bin/wrangler.js", - "wrangler2": "bin/wrangler.js" - }, - "engines": { - "node": ">=20.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@cloudflare/workers-types": "^4.20260114.0" - }, - "peerDependenciesMeta": { - "@cloudflare/workers-types": { - "optional": true - } - } - }, - "node_modules/@astrojs/cloudflare/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@astrojs/compiler": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.13.1.tgz", @@ -1416,12 +318,6 @@ "node": "18.20.8 || ^20.3.0 || >=22.0.0" } }, - "node_modules/@astrojs/underscore-redirects": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@astrojs/underscore-redirects/-/underscore-redirects-1.0.0.tgz", - "integrity": "sha512-qZxHwVnmb5FXuvRsaIGaqWgnftjCuMY+GSbaVZdBmE4j8AfgPqKPxYp8SUERyJcjpKCEmO4wD6ybuGH8A2kVRQ==", - "license": "MIT" - }, "node_modules/@astrojs/yaml2ts": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@astrojs/yaml2ts/-/yaml2ts-0.2.2.tgz", @@ -1472,6 +368,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -3030,6 +1927,7 @@ "version": "0.4.2", "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.2.tgz", "integrity": "sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ==", + "dev": true, "license": "MIT OR Apache-2.0", "engines": { "node": ">=18.0.0" @@ -3136,12 +2034,6 @@ "node": ">=16" } }, - "node_modules/@cloudflare/workers-types": { - "version": "4.20260316.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260316.1.tgz", - "integrity": "sha512-HUZ+vQD8/1A4Fz/8WAlzYWcS5W5u3Nu7Dv9adkIkmLfeKqMIRn01vc4nSUBar60KkmohyQHkPi8jtWV/zazvAg==", - "license": "MIT OR Apache-2.0" - }, "node_modules/@codemirror/autocomplete": { "version": "6.20.0", "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.0.tgz", @@ -3252,6 +2144,7 @@ "integrity": "sha512-aCWjgweIIXLBHh7bY6cACvXuyrZ0xGafjQ2VInjp4RM4gMfscK5uESiNdrH0pE+e1lZr2B4ONGsjchl2KsKZzg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@codemirror/state": "^6.5.0", "crelt": "^1.0.6", @@ -3263,6 +2156,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -3275,6 +2169,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -3369,6 +2264,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -3392,6 +2288,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -3455,6 +2352,7 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -4074,6 +2972,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -4200,6 +3099,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -4216,6 +3116,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -4346,6 +3247,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -4368,6 +3270,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "Apache-2.0", "optional": true, "os": [ @@ -4502,6 +3405,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "Apache-2.0 AND LGPL-3.0-or-later", "optional": true, "os": [ @@ -5347,6 +4251,7 @@ "version": "4.1.6", "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz", "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==", + "dev": true, "license": "MIT", "dependencies": { "kleur": "^4.1.5" @@ -5356,6 +4261,7 @@ "version": "0.6.5", "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz", "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==", + "dev": true, "license": "MIT", "dependencies": { "@poppinss/colors": "^4.1.5", @@ -5367,6 +4273,7 @@ "version": "10.2.2", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5379,6 +4286,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz", "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==", + "dev": true, "license": "MIT" }, "node_modules/@preact/preset-vite": { @@ -5920,6 +4828,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz", "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -5932,6 +4841,7 @@ "version": "1.2.14", "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.14.tgz", "integrity": "sha512-G4ewlBNhUtlLvrJTb88d2mdy2KRijzs4UhnlrOSRT4bmjh/IqNElZa3zkrZ+TC47TwtlDWzVLFADljF1Ijp5hA==", + "dev": true, "license": "CC0-1.0" }, "node_modules/@standard-schema/spec": { @@ -6712,6 +5622,7 @@ "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "7.18.0", @@ -6746,6 +5657,7 @@ "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "7.18.0", "@typescript-eslint/types": "7.18.0", @@ -7268,6 +6180,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -7658,6 +6571,7 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-5.17.3.tgz", "integrity": "sha512-69dcfPe8LsHzklwj+hl+vunWUbpMB6pmg35mACjetxbJeUNNys90JaBM8ZiwsPK689SAj/4Zqb1ayaANls9/MA==", "license": "MIT", + "peer": true, "dependencies": { "@astrojs/compiler": "^2.13.0", "@astrojs/internal-helpers": "0.7.5", @@ -8928,6 +7842,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true, "license": "MIT" }, "node_modules/body-parser": { @@ -9082,6 +7997,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -9391,6 +8307,7 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.1.1.tgz", "integrity": "sha512-f0yv5CPKaFxfsPTBzX7vGuim4oIC1/gcS7LUGdBSwl2dU6+FON6LVUksdOo1qJjoUvXNn45urgh8C+0a24pACQ==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.1.1", "@chevrotain/gast": "11.1.1", @@ -10030,6 +8947,7 @@ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz", "integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=0.10" } @@ -10439,6 +9357,7 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", + "peer": true, "engines": { "node": ">=12" } @@ -12245,6 +11164,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==", + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" @@ -12557,6 +11477,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -12632,6 +11553,7 @@ "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -15725,6 +14647,7 @@ "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "cssstyle": "^4.0.1", "data-urls": "^5.0.0", @@ -17136,6 +16059,7 @@ "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.3.tgz", "integrity": "sha512-wN5ZSgJQIC+CHJut9xaKWsknLxaFBwCPwPkGTSUYrTiHORWvpT8RxGk849HPnpUAQ+/9BPRqYb80jTpearrHzQ==", "license": "MIT", + "peer": true, "dependencies": { "@braintree/sanitize-url": "^7.1.1", "@iconify/utils": "^3.0.1", @@ -18945,6 +17869,7 @@ "devOptional": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "dependencies": { "@inquirer/confirm": "^5.0.0", "@mswjs/interceptors": "^0.41.2", @@ -19890,6 +18815,7 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "devOptional": true, "license": "MIT" }, "node_modules/path-type": { @@ -19990,6 +18916,7 @@ "integrity": "sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "playwright-core": "cli.js" }, @@ -20041,6 +18968,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -20718,6 +19646,7 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.28.4.tgz", "integrity": "sha512-uKFfOHWuSNpRFVTnljsCluEFq57OKT+0QdOiQo8XWnQ/pSvg7OpX5eNOejELXJMWy+BwM2nobz0FkvzmnpCNsQ==", "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -20814,6 +19743,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -22795,6 +21725,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -22979,6 +21910,7 @@ "integrity": "sha512-fDz1zJpd5GycprAbu4Q2PV/RprsRtKC/0z82z0JLgdytmcq0+ujJbJ/09bPGDxCLkKY3Np5cRAOcWiVkLXJURg==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", @@ -24112,6 +23044,7 @@ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", "license": "MIT", + "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -24572,6 +23505,7 @@ "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", "devOptional": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.27.0", "get-tsconfig": "^4.7.5" @@ -24736,6 +23670,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -24837,7 +23772,9 @@ "version": "2.0.0-rc.24", "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", + "dev": true, "license": "MIT", + "peer": true, "dependencies": { "pathe": "^2.0.3" } @@ -25802,6 +24739,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -27111,6 +26049,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -27209,6 +26148,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.80.0.tgz", "integrity": "sha512-cIFJOD1DESzpjOBl763Kp1AH7UE/0fcdHe6rZXUdQ9c50uvgigvW97u3IcSeBwOkgqL/PXPBktBCh0KEu5L8XQ==", "license": "MIT", + "peer": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -27407,6 +26347,7 @@ "dev": true, "hasInstallScript": true, "license": "Apache-2.0", + "peer": true, "bin": { "workerd": "bin/workerd" }, @@ -27621,6 +26562,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -27788,6 +26730,7 @@ "version": "4.1.0-beta.10", "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz", "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==", + "dev": true, "license": "MIT", "dependencies": { "@poppinss/colors": "^4.1.5", @@ -27801,6 +26744,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz", "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==", + "dev": true, "license": "MIT", "dependencies": { "@poppinss/exception": "^1.2.2", @@ -27913,6 +26857,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/src/components/Nav/NavPanels.tsx b/src/components/Nav/NavPanels.tsx index 05359f44e9..9eb13fa897 100644 --- a/src/components/Nav/NavPanels.tsx +++ b/src/components/Nav/NavPanels.tsx @@ -1,4 +1,4 @@ -import type { JumpToState } from "@/src/globals/state"; +import type { JumpToState } from "../../globals/state"; import { JumpToLinks } from "./JumpToLinks"; import { MainNavLinks } from "./MainNavLinks"; import { useEffect, useState } from "preact/hooks"; diff --git a/src/components/Nav/index.astro b/src/components/Nav/index.astro index 320add0aef..67440c80fb 100644 --- a/src/components/Nav/index.astro +++ b/src/components/Nav/index.astro @@ -1,6 +1,5 @@ --- import { getCurrentLocale, getUiTranslator } from "@/src/i18n/utils"; -import { jumpToState } from "@/src/globals/state"; import styles from "./styles.module.scss"; import { NavPanels } from "./NavPanels"; @@ -10,6 +9,8 @@ const pathMinusLocale = Astro.url.pathname.replace(`/${currentLocale}`, ""); const isHomepage = pathMinusLocale === "/"; const t = await getUiTranslator(currentLocale); +const jumpToState = Astro.locals.jumpToState ?? null; + const mainLinks = [ { url: "/reference/", label: t("Reference") }, { url: "/tutorials/", label: t("Tutorials") }, @@ -30,13 +31,13 @@ const jumpToLabel = t("Jump To"); {t("Skip to main content")} - + \ No newline at end of file diff --git a/src/components/Settings/index.astro b/src/components/Settings/index.astro index 88bc692139..e828644c14 100644 --- a/src/components/Settings/index.astro +++ b/src/components/Settings/index.astro @@ -5,7 +5,6 @@ import { removeLocalePrefix, getUiTranslator, } from "@/src/i18n/utils"; -import { jumpToState } from "@/src/globals/state"; import { AccessibilitySettings } from "@components/AccessibilitySettings/"; import SearchForm from "@components/SearchForm/index.astro"; import { LocaleSelect } from "@components/LocaleSelect"; @@ -73,6 +72,8 @@ const a11ySettingsProps = [ ] as DropdownOption[]; const { hideSearch } = Astro.props; + +const jumpToState = Astro.locals.jumpToState; ---
@@ -98,4 +99,4 @@ const { hideSearch } = Astro.props; }
- + \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts index e815b3594e..5a8a4490ce 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,3 +1,10 @@ /* eslint-disable @typescript-eslint/triple-slash-reference */ /// /// + +declare namespace App { + interface Locals { + // We import the type directly from your state file so it knows what shape the data is + jumpToState?: import('./globals/state').JumpToState | null; + } +} \ No newline at end of file diff --git a/src/globals/state.ts b/src/globals/state.ts index 1fb00c4e4f..e48d6b3a38 100644 --- a/src/globals/state.ts +++ b/src/globals/state.ts @@ -1,5 +1,5 @@ /** - * This file is used to store global state that is shared across the application during built. + * This file is used to store global state types that are shared across the application. */ export type JumpToLink = { label: string; @@ -11,13 +11,4 @@ export type JumpToLink = { export type JumpToState = { heading?: string; links?: JumpToLink[]; -}; -/** - * This object is used to store the jump to links for the current page. - * Set to an empty object for pages without jump to links. - */ -export let jumpToState: JumpToState | null = null; - -export const setJumpToState = (newJumpToState: JumpToState | null = null) => { - jumpToState = newJumpToState; -}; +}; \ No newline at end of file diff --git a/src/layouts/AboutLayout.astro b/src/layouts/AboutLayout.astro index 14f0879bb9..8cd8e0b0b4 100644 --- a/src/layouts/AboutLayout.astro +++ b/src/layouts/AboutLayout.astro @@ -6,7 +6,6 @@ import LinkButton from "@components/LinkButton/index.astro"; import GridItemPerson from "@components/GridItem/Person.astro"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { getCollectionInLocaleWithFallbacks } from "../pages/_utils"; -import { setJumpToState } from "../globals/state"; interface Props { entry: CollectionEntry<"text-detail">; @@ -41,9 +40,9 @@ const pageJumpToLinks = [ }, ]; -setJumpToState({ +Astro.locals.jumpToState = { links: [...markdownJumpToLinks, ...pageJumpToLinks], -}); +}; const people = await getCollectionInLocaleWithFallbacks( "people", @@ -99,7 +98,7 @@ const displayedFeaturedPeople = sortedFeaturedPeople.slice(0, 6); GitHub,{` `} Instagram,{` `} X,{` `} - YouTube,{` `} + YouTube,{` `} Discord,{` `} {t("Forum")}{` `} @@ -139,4 +138,4 @@ const displayedFeaturedPeople = sortedFeaturedPeople.slice(0, 6); a { @apply text-type-magenta-dark; } - + \ No newline at end of file diff --git a/src/layouts/CommunityLayout.astro b/src/layouts/CommunityLayout.astro index f7a4e56173..7627a77bbe 100644 --- a/src/layouts/CommunityLayout.astro +++ b/src/layouts/CommunityLayout.astro @@ -7,7 +7,6 @@ import GridItemSketch from "@components/GridItem/Sketch.astro"; import GridItemLibrary from "@components/GridItem/Library.astro"; import GridItemEvent from "@components/GridItem/Event.astro"; import { getCurrentLocale, getUiTranslator } from "@i18n/utils"; -import { setJumpToState } from "../globals/state"; import { type OpenProcessingCurationResponse } from "../api/OpenProcessing"; interface Props { @@ -32,13 +31,13 @@ const sketches = Astro.props.sketches.slice(0, sketchesLimit), const currentLocale = getCurrentLocale(Astro.url.pathname); const t = await getUiTranslator(currentLocale); -setJumpToState({ +Astro.locals.jumpToState = { links: [ { label: t("Sketches") as string, url: "#sketches" }, { label: t("Libraries") as string, url: "#libraries" }, { label: t("Events") as string, url: "#events" }, ], -}); +}; --- @@ -117,4 +116,4 @@ setJumpToState({ > - + \ No newline at end of file diff --git a/src/layouts/ContributeLayout.astro b/src/layouts/ContributeLayout.astro index 229c629862..0385b28707 100644 --- a/src/layouts/ContributeLayout.astro +++ b/src/layouts/ContributeLayout.astro @@ -6,7 +6,7 @@ import ContributeImage from "@content/ui/images/contribute.png"; import BaseLayout from "./BaseLayout.astro"; import { getCurrentLocale, getUiTranslator } from "@i18n/utils"; import GridItemContributorDoc from "@components/GridItem/ContributorDoc.astro"; -import { setJumpToState, type JumpToLink } from "../globals/state"; +import { type JumpToLink } from "../globals/state"; interface Props { entries: CollectionEntry<"contributor-docs">[]; @@ -40,9 +40,9 @@ const jumpToLinks = [ }, ]; -setJumpToState({ +Astro.locals.jumpToState = { links: jumpToLinks as JumpToLink[], -}); +}; --- - + \ No newline at end of file diff --git a/src/layouts/ContributorDocLayout.astro b/src/layouts/ContributorDocLayout.astro index 2bb65aa025..eb62ff25aa 100644 --- a/src/layouts/ContributorDocLayout.astro +++ b/src/layouts/ContributorDocLayout.astro @@ -4,7 +4,6 @@ import BaseLayout from "./BaseLayout.astro"; import Head from "@components/Head/index.astro"; import type { MarkdownHeading } from "astro"; import { - setJumpToState, type JumpToLink, type JumpToState, } from "../globals/state"; @@ -27,12 +26,10 @@ const jumpToLinks = headings url: `#${heading.slug}`, })); -const jumpToState = { +Astro.locals.jumpToState = { links: jumpToLinks as JumpToLink[], heading: t("Contributor Docs"), } as JumpToState; - -setJumpToState(jumpToState); --- @@ -47,4 +44,4 @@ setJumpToState(jumpToState);
- + \ No newline at end of file diff --git a/src/layouts/EventLayout.astro b/src/layouts/EventLayout.astro index d214e12ce8..d8549c6258 100644 --- a/src/layouts/EventLayout.astro +++ b/src/layouts/EventLayout.astro @@ -5,7 +5,6 @@ import BaseLayout from "./BaseLayout.astro"; import Image from "@components/Image/index.astro"; import FreeRatioImage from "@components/Image/FreeRatioImage.astro"; import RelatedItems from "@components/RelatedItems/index.astro"; -import { setJumpToState } from "../globals/state"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { getRelatedEntriesinCollection } from "../pages/_utils"; import OutdatedTranslationBanner from "@components/OutdatedTranslationBanner/index.astro"; @@ -19,7 +18,7 @@ interface Props { const { entry, title } = Astro.props; const { Content } = await entry.render(); -setJumpToState(null); +Astro.locals.jumpToState = null; const currentLocale = getCurrentLocale(Astro.url.pathname); const t = await getUiTranslator(currentLocale); @@ -80,4 +79,4 @@ const { showBanner, englishUrl } = checkTranslationBanner( /> ) } - + \ No newline at end of file diff --git a/src/layouts/EventsLayout.astro b/src/layouts/EventsLayout.astro index be65a72bed..0b59273c3b 100644 --- a/src/layouts/EventsLayout.astro +++ b/src/layouts/EventsLayout.astro @@ -5,7 +5,6 @@ import BaseLayout from "./BaseLayout.astro"; import GridItemEvent from "@components/GridItem/Event.astro"; import PaginationNav from "@components/PaginationNav/index.astro"; import { eventsPerPage } from "../globals/globals"; -import { setJumpToState } from "../globals/state"; import { getCurrentLocale } from "../i18n/utils"; interface Props { @@ -17,7 +16,7 @@ interface Props { const currentLocale = getCurrentLocale(Astro.url.pathname); const { entries, totalNumEvents, currentPage } = Astro.props; -setJumpToState(null); +Astro.locals.jumpToState = null; --- @@ -38,4 +37,4 @@ setJumpToState(null); sectionUrlPrefix="/events" /> - + \ No newline at end of file diff --git a/src/layouts/ExampleLayout.astro b/src/layouts/ExampleLayout.astro index d976598af0..c907acd0df 100644 --- a/src/layouts/ExampleLayout.astro +++ b/src/layouts/ExampleLayout.astro @@ -1,7 +1,6 @@ --- import type { CollectionEntry } from "astro:content"; import Head from "@components/Head/index.astro"; -import { setJumpToState } from "../globals/state"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { generateJumpToState, @@ -32,7 +31,7 @@ const jumpToState = await generateJumpToState( currentLocale ); -setJumpToState(jumpToState); +Astro.locals.jumpToState = jumpToState; const relatedReferences = example.data.relatedReference !== undefined @@ -186,4 +185,4 @@ const { showBanner, englishUrl } = checkTranslationBanner( items={relatedExamples} /> - + \ No newline at end of file diff --git a/src/layouts/ExamplesLayout.astro b/src/layouts/ExamplesLayout.astro index 17500df832..ca60e3bc23 100644 --- a/src/layouts/ExamplesLayout.astro +++ b/src/layouts/ExamplesLayout.astro @@ -4,7 +4,6 @@ import Head from "@components/Head/index.astro"; import GridItemExample from "@components/GridItem/Example.astro"; import { getExampleCategory } from "../pages/_utils"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; -import { setJumpToState } from "../globals/state"; import type { CollectionEntry } from "astro:content"; interface Props { @@ -49,7 +48,7 @@ const jumpToState = { links: jumpToLinks, }; -setJumpToState(jumpToState); +Astro.locals.jumpToState = jumpToState; --- @@ -71,4 +70,4 @@ setJumpToState(jumpToState); )) } - + \ No newline at end of file diff --git a/src/layouts/HomepageLayout.astro b/src/layouts/HomepageLayout.astro index 42558cab26..b193712500 100644 --- a/src/layouts/HomepageLayout.astro +++ b/src/layouts/HomepageLayout.astro @@ -5,7 +5,6 @@ import GridItemSketch from "@components/GridItem/Sketch.astro"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { getCurationSketches } from "../api/OpenProcessing"; import BaseLayout from "./BaseLayout.astro"; -import { setJumpToState } from "../globals/state"; import Head from "../components/Head/index.astro"; interface Props { @@ -26,7 +25,7 @@ const sketches = data.sketchIds.map( curationSketches[i] ); -setJumpToState(null); +Astro.locals.jumpToState = null; --- + \ No newline at end of file diff --git a/src/layouts/LibrariesLayout.astro b/src/layouts/LibrariesLayout.astro index 838b395751..2fee9de2a9 100644 --- a/src/layouts/LibrariesLayout.astro +++ b/src/layouts/LibrariesLayout.astro @@ -4,7 +4,7 @@ import Head from "@components/Head/index.astro"; import BaseLayout from "./BaseLayout.astro"; import GridItemLibrary from "@components/GridItem/Library.astro"; import LibraryListing from "@components/LibraryListing/index.astro"; -import { setJumpToState, type JumpToLink } from "../globals/state"; +import { type JumpToLink } from "../globals/state"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { categories } from "../content/libraries/config"; import Button from "@components/Button/index.astro"; @@ -87,10 +87,10 @@ const pageJumpToLinks = categories.map((category) => ({ label: t("libraryCategories", category), })); -setJumpToState({ +Astro.locals.jumpToState = { heading: t("Libraries") as string, links: pageJumpToLinks as JumpToLink[], -}); +}; --- @@ -131,4 +131,4 @@ setJumpToState({ )) } - + \ No newline at end of file diff --git a/src/layouts/PeopleLayout.astro b/src/layouts/PeopleLayout.astro index ea6b3bfed7..9a5e871743 100644 --- a/src/layouts/PeopleLayout.astro +++ b/src/layouts/PeopleLayout.astro @@ -3,7 +3,6 @@ import Image from "@components/Image/index.astro"; import Head from "@components/Head/index.astro"; import BaseLayout from "./BaseLayout.astro"; import type { CollectionEntry } from "astro:content"; -import { setJumpToState } from "../globals/state"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import lodash from "lodash"; import { removeLocaleAndExtension } from "../pages/_utils"; @@ -52,7 +51,7 @@ const contributorEntries = { members: filteredEntries.contributor, }; -setJumpToState(null); +Astro.locals.jumpToState = null; --- @@ -117,4 +116,4 @@ setJumpToState(null); } - + \ No newline at end of file diff --git a/src/layouts/ReferenceItemLayout.astro b/src/layouts/ReferenceItemLayout.astro index 49fab87dda..6e64aad14e 100644 --- a/src/layouts/ReferenceItemLayout.astro +++ b/src/layouts/ReferenceItemLayout.astro @@ -17,10 +17,9 @@ import type { ReferenceOverload, ReferenceParam, } from "@/types/parsers.interface"; -import { setJumpToState } from "../globals/state"; import { p5Version } from "../globals/p5-version"; -import flask from "@src/content/ui/images/icons/flask.svg?raw"; -import warning from "@src/content/ui/images/icons/warning.svg?raw"; +import flask from "@src/content/ui/images/icons/flask.svg?raw"; +import warning from "@src/content/ui/images/icons/warning.svg?raw"; import OutdatedTranslationBanner from "@components/OutdatedTranslationBanner/index.astro"; import { checkTranslationBanner } from "../utils/translationBanner"; @@ -59,7 +58,7 @@ relatedEntriesLinks.unshift({ // Put related links at top of the list jumpToState.links?.unshift(...relatedEntriesLinks); -setJumpToState(jumpToState); +Astro.locals.jumpToState = jumpToState; // get whatever related entries might be specified in the collection entry data const relatedReferencesFromEntryData = @@ -318,4 +317,4 @@ function normalizeP5ReferenceLinks(html: string | undefined): string | undefined title={t("Related References") as string} items={relatedReferences} /> - + \ No newline at end of file diff --git a/src/layouts/ReferenceLayout.astro b/src/layouts/ReferenceLayout.astro index 3a952b922a..413d3514fd 100644 --- a/src/layouts/ReferenceLayout.astro +++ b/src/layouts/ReferenceLayout.astro @@ -1,5 +1,5 @@ --- -import { type CollectionEntry } from "astro:content"; +import type { CollectionEntry } from "astro:content"; import Head from "@components/Head/index.astro"; import BaseLayout from "./BaseLayout.astro"; import { ReferenceDirectoryWithFilter } from "@components/ReferenceDirectoryWithFilter/"; @@ -9,7 +9,6 @@ import { normalizeReferenceRoute, } from "../pages/_utils"; import { - setJumpToState, type JumpToLink, type JumpToState, } from "../globals/state"; @@ -151,7 +150,7 @@ const pageJumpToState: JumpToState = { links: pageJumpToLinks, }; -setJumpToState(pageJumpToState); +Astro.locals.jumpToState = pageJumpToState; --- @@ -162,4 +161,4 @@ setJumpToState(pageJumpToState); categoryData={categoryData as any} uiTranslations={uiTranslations} /> - + \ No newline at end of file diff --git a/src/layouts/SearchLayout.astro b/src/layouts/SearchLayout.astro index 8d86979e37..987794916a 100644 --- a/src/layouts/SearchLayout.astro +++ b/src/layouts/SearchLayout.astro @@ -3,12 +3,11 @@ import SearchProvider from "@components/SearchProvider"; import Head from "@components/Head/index.astro"; import { getCurrentLocale, getUiTranslationWithFallback } from "@i18n/utils"; import BaseLayout from "./BaseLayout.astro"; -import { setJumpToState } from "../globals/state"; const currentLocale = getCurrentLocale(Astro.url.pathname); const { title } = Astro.props; const uiTranslations = await getUiTranslationWithFallback(currentLocale); -setJumpToState(null); +Astro.locals.jumpToState = null; --- @@ -20,4 +19,4 @@ setJumpToState(null); currentLocale={currentLocale} uiTranslations={uiTranslations} /> - + \ No newline at end of file diff --git a/src/layouts/SketchLayout.astro b/src/layouts/SketchLayout.astro index 39844397b5..fa39d7f98c 100644 --- a/src/layouts/SketchLayout.astro +++ b/src/layouts/SketchLayout.astro @@ -11,7 +11,6 @@ import { } from "@/src/api/OpenProcessing"; import LinkButton from "@components/LinkButton/index.astro"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; -import { setJumpToState } from "../globals/state"; import { ScalingIframe } from "@components/ScalingIframe"; interface Props { @@ -33,7 +32,7 @@ const dateString = new Date(createdOn).toLocaleDateString(currentLocale, { day: "numeric", }); -setJumpToState(null); +Astro.locals.jumpToState = null; const moreSketches = await getRandomCurationSketches(4); const featuredImageURL = makeThumbnailUrl(sketchIdNumber); @@ -122,4 +121,4 @@ const iframeTitle = `OpenProcessing Sketch: ${title} by ${authorName}`;

- + \ No newline at end of file diff --git a/src/layouts/SketchesLayout.astro b/src/layouts/SketchesLayout.astro index ff1a9e448c..a41772fc33 100644 --- a/src/layouts/SketchesLayout.astro +++ b/src/layouts/SketchesLayout.astro @@ -2,7 +2,6 @@ import { type OpenProcessingCurationResponse } from "../api/OpenProcessing"; import Head from "@components/Head/index.astro"; import { sketchesPerPage } from "../globals/globals"; -import { setJumpToState } from "../globals/state"; import BaseLayout from "./BaseLayout.astro"; import GridItemSketch from "@components/GridItem/Sketch.astro"; import PaginationNav from "@components/PaginationNav/index.astro"; @@ -16,7 +15,7 @@ interface Props { const currentLocale = getCurrentLocale(Astro.url.pathname); -setJumpToState(null); +Astro.locals.jumpToState = null; const { entries, totalNumSketches, currentPage } = Astro.props; --- @@ -39,4 +38,4 @@ const { entries, totalNumSketches, currentPage } = Astro.props; currentPage={currentPage} /> - + \ No newline at end of file diff --git a/src/layouts/TextDetailLayout.astro b/src/layouts/TextDetailLayout.astro index ff6c268382..5ab8dd9ab6 100644 --- a/src/layouts/TextDetailLayout.astro +++ b/src/layouts/TextDetailLayout.astro @@ -2,7 +2,6 @@ import Head from "@components/Head/index.astro"; import BaseLayout from "./BaseLayout.astro"; import type { CollectionEntry } from "astro:content"; -import { setJumpToState } from "../globals/state"; import { getCurrentLocale } from "../i18n/utils"; import OutdatedTranslationBanner from "@components/OutdatedTranslationBanner/index.astro"; import { checkTranslationBanner } from "../utils/translationBanner"; @@ -20,7 +19,7 @@ const pageTopic = Astro.url.pathname.includes("donate") const currentLocale = getCurrentLocale(Astro.url.pathname); -setJumpToState(null); +Astro.locals.jumpToState = null; const { showBanner, englishUrl } = checkTranslationBanner( 'text-detail', @@ -44,4 +43,4 @@ const { showBanner, englishUrl } = checkTranslationBanner(
- + \ No newline at end of file diff --git a/src/layouts/TutorialLayout.astro b/src/layouts/TutorialLayout.astro index 0e9f5bdffe..2bad59c60f 100644 --- a/src/layouts/TutorialLayout.astro +++ b/src/layouts/TutorialLayout.astro @@ -2,10 +2,8 @@ import BaseLayout from "@layouts/BaseLayout.astro"; import Head from "@components/Head/index.astro"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; -import { setJumpToState } from "../globals/state"; import FreeRatioImage from "@components/Image/FreeRatioImage.astro"; import PreProxy from "@components/PreProxy/index.astro"; -import CodeBlockWrapper from "@components/CodeBlockWrapper/index.astro"; import LinkWrapper from "@components/LinkWrapper/index.astro"; import RelatedItems from "@components/RelatedItems/index.astro"; import { @@ -29,7 +27,7 @@ const jumpToState = await generateJumpToState( currentLocale ); -setJumpToState(jumpToState); +Astro.locals.jumpToState = jumpToState; const relatedReferences = entry.data.relatedContent?.references !== undefined @@ -104,4 +102,4 @@ const { showBanner, englishUrl } = checkTranslationBanner( ) } - + \ No newline at end of file diff --git a/src/layouts/TutorialsLayout.astro b/src/layouts/TutorialsLayout.astro index 8a44ec3e5f..d914a42f3d 100644 --- a/src/layouts/TutorialsLayout.astro +++ b/src/layouts/TutorialsLayout.astro @@ -2,7 +2,7 @@ import { type CollectionEntry } from "astro:content"; import Head from "@components/Head/index.astro"; import BaseLayout from "./BaseLayout.astro"; -import { setJumpToState, type JumpToLink } from "../globals/state"; +import { type JumpToLink } from "../globals/state"; import { getCurrentLocale, getUiTranslator } from "../i18n/utils"; import { categories } from "../content/tutorials/config"; import LinkButton from "@components/LinkButton/index.astro"; @@ -39,9 +39,9 @@ const pageJumpToLinks = categories }, ]); -setJumpToState({ +Astro.locals.jumpToState = { links: pageJumpToLinks as JumpToLink[], -}); +}; --- @@ -66,11 +66,10 @@ setJumpToState({

- {t("tutorialCategories", "education-resources")} -

+ {t("tutorialCategories", "education-resources")}

{t("tutorialsPage", "education-resources-snippet")}

{t("tutorialsPage", "view-education-resources")}
- + \ No newline at end of file diff --git a/src/pages/[locale]/about.astro b/src/pages/[locale]/about.astro index 2b28b336df..8da33607cf 100644 --- a/src/pages/[locale]/about.astro +++ b/src/pages/[locale]/about.astro @@ -2,7 +2,6 @@ import { getCollectionInLocaleWithFallbacks } from "@pages/_utils"; import AboutLayout from "@layouts/AboutLayout.astro"; import { nonDefaultSupportedLocales, defaultLocale } from "@i18n/const"; -import { setJumpToState } from "../../globals/state"; import type { CollectionEntry } from "astro:content"; export async function getStaticPaths() { @@ -26,7 +25,8 @@ export async function getStaticPaths() { } const { entry } = Astro.props; -setJumpToState(null); + +Astro.locals.jumpToState = null; --- - + \ No newline at end of file diff --git a/src/pages/[locale]/education-resources/index.astro b/src/pages/[locale]/education-resources/index.astro index 7ed48a0a2c..053bb97d5a 100644 --- a/src/pages/[locale]/education-resources/index.astro +++ b/src/pages/[locale]/education-resources/index.astro @@ -3,7 +3,7 @@ import BaseLayout from "@layouts/BaseLayout.astro"; import Head from "@components/Head/index.astro"; import { getCollectionInLocaleWithFallbacks } from "@pages/_utils"; import { nonDefaultSupportedLocales } from "@i18n/const"; -import { setJumpToState, type JumpToLink } from "@/src/globals/state"; +import { type JumpToLink } from "@/src/globals/state"; import { getCurrentLocale, getUiTranslator } from "@i18n/utils"; import { categories } from "@/src/content/tutorials/config"; import { removeLocalePrefix } from "@i18n/utils"; @@ -36,10 +36,11 @@ const pageJumpToLinks = categories.map((category) => ({ url: '/education-resources', label: t("tutorialsPage", "education-resources"), }]); -setJumpToState({ + +Astro.locals.jumpToState = { heading: t("Tutorials") as string, links: pageJumpToLinks as JumpToLink[], -}); +}; --- @@ -55,4 +56,4 @@ setJumpToState({ topic="tutorials" > - + \ No newline at end of file diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index a6370e21c7..6ca391a5ba 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -2,7 +2,6 @@ import { getEntry } from "astro:content"; import HomepageLayout from "@/src/layouts/HomepageLayout.astro"; import { defaultLocale, nonDefaultSupportedLocales } from "@i18n/const"; -import { setJumpToState } from "@/src/globals/state"; export const getStaticPaths = async () => { const defaultLocaleHomePageConfig = await getEntry( @@ -24,7 +23,8 @@ export const getStaticPaths = async () => { }; const { homePageConfig } = Astro.props; -setJumpToState(null); + +Astro.locals.jumpToState = null; --- - + \ No newline at end of file diff --git a/src/pages/about.astro b/src/pages/about.astro index 4fa8d3b0d4..e67a0f36e4 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,10 +1,11 @@ --- import { getEntry } from "astro:content"; import AboutLayout from "../layouts/AboutLayout.astro"; -import { setJumpToState } from "../globals/state"; const entry = await getEntry("text-detail", "en/about"); -setJumpToState(null); + +// ✅ We now clear the state specifically for this request +Astro.locals.jumpToState = null; --- - + \ No newline at end of file diff --git a/src/pages/education-resources/index.astro b/src/pages/education-resources/index.astro index 9485e44eba..21f32f76c3 100644 --- a/src/pages/education-resources/index.astro +++ b/src/pages/education-resources/index.astro @@ -3,7 +3,7 @@ import BaseLayout from "@layouts/BaseLayout.astro"; import Head from "@components/Head/index.astro"; import { defaultLocale } from "@/src/i18n/const"; import { getCollectionInDefaultLocale } from "@pages/_utils"; -import { setJumpToState, type JumpToLink } from "@/src/globals/state"; +import { type JumpToLink } from "@/src/globals/state"; import { getCurrentLocale, getUiTranslator } from "@i18n/utils"; import { categories } from "@/src/content/tutorials/config"; import { removeLocalePrefix } from "@i18n/utils"; @@ -20,10 +20,11 @@ const pageJumpToLinks = categories.map((category) => ({ url: '/education-resources', label: t("tutorialsPage", "education-resources"), }]); -setJumpToState({ + +Astro.locals.jumpToState = { heading: t("Tutorials") as string, links: pageJumpToLinks as JumpToLink[], -}); +}; --- @@ -38,4 +39,4 @@ setJumpToState({ variant="item" topic="tutorials" > - + \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index f3bf2ffd6d..442dce90fa 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,10 +2,9 @@ import { getEntry } from "astro:content"; import HomepageLayout from "../layouts/HomepageLayout.astro"; import { defaultLocale } from "../i18n/const"; -import { setJumpToState } from "../globals/state"; -setJumpToState(null); +Astro.locals.jumpToState = null; const homePageConfig = await getEntry("homepage", defaultLocale); --- - + \ No newline at end of file