diff --git a/.github/docs/apps.md b/.github/docs/apps.md index ae5fc609..41b6e4ca 100644 --- a/.github/docs/apps.md +++ b/.github/docs/apps.md @@ -1,6 +1,6 @@ # Framework Applications -This project contains the same weather application built using 12 different JavaScript frameworks. Each implementation provides identical functionality but uses the specific patterns and approaches of its framework. +This project contains the same weather application built using 14 different JavaScript frameworks. Each implementation provides identical functionality but uses the specific patterns and approaches of its framework. ## Available Frameworks @@ -17,6 +17,8 @@ The project includes implementations for: **Alpine.js** - Minimal framework with HTML-first approach **Lit** - Web Components with efficient updates **VanJS** - Ultra-small vanilla framework +**Lume.js** - Minimal reactive state library with no build step +**Gea** - Compiler-first reactive framework with surgical DOM updates **Vanilla** - Pure JavaScript without any framework Each app lives in its own directory under `apps/{framework}/` and can be developed, built, and tested independently. diff --git a/apps/geajs/README.md b/apps/geajs/README.md new file mode 100644 index 00000000..cfe68bda --- /dev/null +++ b/apps/geajs/README.md @@ -0,0 +1,65 @@ +# Weather App — Gea + +A weather application built with [Gea](https://geajs.com/) — a compiler-first reactive UI framework that compiles JSX into surgical DOM updates at build time (a hello-world app ships ~121 B of brotli JavaScript). + +## Usage + +```bash +# Install dependencies +npm install + +# Dev server (Vite + @geajs/vite-plugin) +npm run dev + +# Production build +npm run build + +# Run tests (from repo root) +npm run test:geajs + +# Lint (from repo root) +npm run lint:geajs +``` + +## Implementation + +Gea doesn't use signals, hooks, dependency arrays, or a virtual DOM. You write ordinary JavaScript — classes with state and methods, getters for computed values — and the Vite plugin (`@geajs/vite-plugin`) analyzes the JSX at build time, works out which DOM nodes depend on which state paths, and generates the reactive wiring. At runtime only the affected nodes are patched. + +The implementation uses: + +- **`Store`** — [`weather-store.js`](src/weather-store.js) is a singleton class extending `Store`. Its fields (`searchQuery`, `isLoading`, `hasError`, `weatherData`, `activeForecastIndex`) are made reactive through a deep Proxy; mutations are plain assignments like `this.isLoading = true`. +- **Getters as computed values** — derived state such as `showContent`, `locationLabel`, `currentTemperature`, and `forecastDays` are ordinary JavaScript getters on the store. The compiler tracks which state paths they read and re-evaluates the dependent DOM bindings when those paths change. +- **Class components** — each UI piece ([`SearchForm`](src/components/SearchForm.jsx), [`CurrentWeather`](src/components/CurrentWeather.jsx), [`ForecastItem`](src/components/ForecastItem.jsx), …) extends `Component` and returns JSX from `template()`. JSX uses HTML-style attributes (`class`, `for`) and native-style event bindings (`click={...}`, `input={...}`, `submit={...}`) wired through document-level event delegation. +- **Function components** — stateless UI like [`LoadingState`](src/components/LoadingState.jsx) is a plain function; the compiler converts it to a class component at build time. +- **Conditional rendering** — `{condition && }` in [`WeatherDisplay`](src/components/WeatherDisplay.jsx) compiles into `` markers with swap logic, so hidden branches cost no DOM nodes. +- **Keyed lists** — the 7-day forecast maps `weatherStore.forecastDays` to ``; list changes are reconciled per-item rather than re-rendered. + +```jsx +// Components read the store singleton directly — mutations patch the DOM surgically +export default class SearchForm extends Component { + handleSubmit(e) { + e.preventDefault(); + weatherStore.search(); + } + + template() { + return ( + + + + {weatherStore.isLoading ? 'Loading...' : 'Get Weather'} + + + ); + } +} +``` + +## About Gea + +Gea's runtime and compiler are vertically integrated: JSX becomes HTML string templates, state tracking happens through deep proxies, and the generated `observe()` calls patch only the DOM nodes that depend on changed data — no diffing or reconciliation overhead. The framework can also run [without a build step](https://geajs.com/docs/browser-usage.html) from a CDN global (~4.1 kB gzipped), where the reactivity glue is written by hand instead of the compiler. + +- 🌐 Website: [geajs.com](https://geajs.com/) +- 📚 Docs: [geajs.com/docs](https://geajs.com/docs/getting-started.html) +- 🐙 GitHub: [dashersw/gea](https://github.com/dashersw/gea) +- 📦 npm: [`@geajs/core`](https://www.npmjs.com/package/@geajs/core) diff --git a/apps/geajs/index.html b/apps/geajs/index.html new file mode 100644 index 00000000..942a0785 --- /dev/null +++ b/apps/geajs/index.html @@ -0,0 +1,17 @@ + + + + + + Weather App - Gea + + + + + + + + + + + diff --git a/apps/geajs/package-lock.json b/apps/geajs/package-lock.json new file mode 100644 index 00000000..31850c46 --- /dev/null +++ b/apps/geajs/package-lock.json @@ -0,0 +1,1147 @@ +{ + "name": "weather-app-geajs", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "weather-app-geajs", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@geajs/core": "^1.4.0" + }, + "devDependencies": { + "@geajs/vite-plugin": "^1.4.1", + "vite": "^8.0.0" + } + }, + "node_modules/@acemir/cssom": { + "version": "0.9.31", + "resolved": "https://registry.npmjs.org/@acemir/cssom/-/cssom-0.9.31.tgz", + "integrity": "sha512-ZnR3GSaH+/vJ0YlHau21FjfLYjMpYVIzTD8M8vIEQvIGxeOXyXdzCI140rrCY862p/C/BbzWsjc1dgnM9mkoTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@geajs/core": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@geajs/core/-/core-1.4.0.tgz", + "integrity": "sha512-91Oz41mmsq5u8tMlGqe3HS5DuzH5RR81ZvmCDLrP8wvsLsnE4ddUeNALjuV7rGimE7SOXNqnPdR886OgFo9cRg==", + "license": "MIT", + "dependencies": { + "@types/react": "^19.0.0" + } + }, + "node_modules/@geajs/vite-plugin": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@geajs/vite-plugin/-/vite-plugin-1.4.1.tgz", + "integrity": "sha512-R7BC/ybPZW5pJailL8ttEZrNjquCQ29gK0TwIz3lL4M4fKs/+afFpJeMUhig1nexpknTCQlveAUc1HRAdh71fA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@acemir/cssom": "^0.9.31", + "@babel/generator": "^7.23.0", + "@babel/parser": "^7.23.0", + "@babel/traverse": "^7.23.0", + "@babel/types": "^7.23.0", + "eszter": "^0.3.0" + }, + "peerDependencies": { + "vite": "^8.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/eszter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eszter/-/eszter-0.3.0.tgz", + "integrity": "sha512-kt4v6nDRgczErAUqsx8RwWIIt4u+inGxTRwgpy1HK3r0N7hgB+tdUO6zfkahu2tjlc9SKRC/icyrFZazdhgl7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.19.tgz", + "integrity": "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rolldown": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.139.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/vite": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", + "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/apps/geajs/package.json b/apps/geajs/package.json new file mode 100644 index 00000000..31a889b9 --- /dev/null +++ b/apps/geajs/package.json @@ -0,0 +1,22 @@ +{ + "name": "weather-app-geajs", + "version": "1.0.0", + "description": "Weather app built with Gea", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "serve": "vite preview --port 3000" + }, + "dependencies": { + "@geajs/core": "^1.4.0" + }, + "devDependencies": { + "@geajs/vite-plugin": "^1.4.1", + "vite": "^8.0.0" + }, + "keywords": ["weather", "geajs", "reactive", "frontend"], + "author": "Alicia Sykes", + "license": "MIT" +} diff --git a/apps/geajs/src/app.jsx b/apps/geajs/src/app.jsx new file mode 100644 index 00000000..1d98ac8e --- /dev/null +++ b/apps/geajs/src/app.jsx @@ -0,0 +1,32 @@ +import { Component } from '@geajs/core'; +import SearchForm from './components/SearchForm.jsx'; +import WeatherDisplay from './components/WeatherDisplay.jsx'; + +export default class App extends Component { + template() { + return ( + + + + Weather Front + + + + + + + + + + + + + ); + } +} diff --git a/apps/geajs/src/components/CurrentWeather.jsx b/apps/geajs/src/components/CurrentWeather.jsx new file mode 100644 index 00000000..3111fa8e --- /dev/null +++ b/apps/geajs/src/components/CurrentWeather.jsx @@ -0,0 +1,50 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; + +export default class CurrentWeather extends Component { + template() { + return ( + + Current Weather + + + {weatherStore.locationLabel} + + {weatherStore.currentIcon} + + {weatherStore.currentTemperature} + {weatherStore.currentCondition} + + + + + Feels like + {weatherStore.feelsLike} + + + Humidity + {weatherStore.humidity} + + + Wind Speed + {weatherStore.windSpeed} + + + Pressure + {weatherStore.pressure} + + + Cloud Cover + {weatherStore.cloudCover} + + + Wind Direction + {weatherStore.windDirection} + + + + + + ); + } +} diff --git a/apps/geajs/src/components/ErrorState.jsx b/apps/geajs/src/components/ErrorState.jsx new file mode 100644 index 00000000..40a8426d --- /dev/null +++ b/apps/geajs/src/components/ErrorState.jsx @@ -0,0 +1,13 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; + +export default class ErrorState extends Component { + template() { + return ( + + Unable to load weather data + {weatherStore.errorMessage || 'Please check the city name and try again.'} + + ); + } +} diff --git a/apps/geajs/src/components/Forecast.jsx b/apps/geajs/src/components/Forecast.jsx new file mode 100644 index 00000000..004971be --- /dev/null +++ b/apps/geajs/src/components/Forecast.jsx @@ -0,0 +1,20 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; +import ForecastItem from './ForecastItem.jsx'; + +export default class Forecast extends Component { + template() { + return ( + + 7-Day Forecast + + + {weatherStore.forecastDays.map(day => ( + + ))} + + + + ); + } +} diff --git a/apps/geajs/src/components/ForecastItem.jsx b/apps/geajs/src/components/ForecastItem.jsx new file mode 100644 index 00000000..c75a0ee2 --- /dev/null +++ b/apps/geajs/src/components/ForecastItem.jsx @@ -0,0 +1,67 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; + +export default class ForecastItem extends Component { + handleClick() { + weatherStore.toggleForecast(this.props.day.index); + } + + handleKeydown(e) { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + weatherStore.toggleForecast(this.props.day.index); + } + } + + template({ day }) { + return ( + + {day.dayName} + {day.icon} + + {day.condition} + + {day.high} + {day.low} + + + {weatherStore.activeForecastIndex === day.index && ( + + + Sunrise + {day.sunrise} + + + Sunset + {day.sunset} + + + Rain + {day.rain} + + + UV Index + {day.uvIndex} + + + Precipitation + {day.precipitation} + + + Temperature + {day.tempRange} + + + )} + + ); + } +} diff --git a/apps/geajs/src/components/LoadingState.jsx b/apps/geajs/src/components/LoadingState.jsx new file mode 100644 index 00000000..16e36028 --- /dev/null +++ b/apps/geajs/src/components/LoadingState.jsx @@ -0,0 +1,8 @@ +export default function LoadingState() { + return ( + + + Loading weather data... + + ); +} diff --git a/apps/geajs/src/components/SearchForm.jsx b/apps/geajs/src/components/SearchForm.jsx new file mode 100644 index 00000000..08fe3c7c --- /dev/null +++ b/apps/geajs/src/components/SearchForm.jsx @@ -0,0 +1,39 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; + +export default class SearchForm extends Component { + handleInput(e) { + weatherStore.setSearchQuery(e.target.value); + } + + handleSubmit(e) { + e.preventDefault(); + weatherStore.search(); + } + + template() { + return ( + + + + Enter city name + + + {weatherStore.isLoading ? 'Loading...' : 'Get Weather'} + 🌦️ + + + + + ); + } +} diff --git a/apps/geajs/src/components/WeatherContent.jsx b/apps/geajs/src/components/WeatherContent.jsx new file mode 100644 index 00000000..ba842369 --- /dev/null +++ b/apps/geajs/src/components/WeatherContent.jsx @@ -0,0 +1,16 @@ +import { Component } from '@geajs/core'; +import CurrentWeather from './CurrentWeather.jsx'; +import Forecast from './Forecast.jsx'; + +export default class WeatherContent extends Component { + template() { + return ( + + + + + + + ); + } +} diff --git a/apps/geajs/src/components/WeatherDisplay.jsx b/apps/geajs/src/components/WeatherDisplay.jsx new file mode 100644 index 00000000..385fce0d --- /dev/null +++ b/apps/geajs/src/components/WeatherDisplay.jsx @@ -0,0 +1,17 @@ +import { Component } from '@geajs/core'; +import weatherStore from '../weather-store.js'; +import LoadingState from './LoadingState.jsx'; +import ErrorState from './ErrorState.jsx'; +import WeatherContent from './WeatherContent.jsx'; + +export default class WeatherDisplay extends Component { + template() { + return ( + + {weatherStore.isLoading && } + {weatherStore.showErrorState && } + {weatherStore.showContent && } + + ); + } +} diff --git a/apps/geajs/src/main.js b/apps/geajs/src/main.js new file mode 100644 index 00000000..d9f0f764 --- /dev/null +++ b/apps/geajs/src/main.js @@ -0,0 +1,8 @@ +import App from './app.jsx'; +import weatherStore from './weather-store.js'; + +// Mount the root component, then kick off the initial weather load +const app = new App(); +app.render(document.getElementById('app')); + +weatherStore.init(); diff --git a/apps/geajs/src/services/weather-service.js b/apps/geajs/src/services/weather-service.js new file mode 100644 index 00000000..bc7f76c2 --- /dev/null +++ b/apps/geajs/src/services/weather-service.js @@ -0,0 +1,165 @@ +export class WeatherService { + constructor() { + this.baseUrl = 'https://api.open-meteo.com/v1'; + this.geocodingUrl = 'https://geocoding-api.open-meteo.com/v1'; + this.useMockData = this.shouldUseMockData(); + } + + shouldUseMockData() { + // Check if we're in a testing environment (Playwright sets specific user agents) + const isTestEnvironment = navigator.userAgent.includes('Playwright') || + navigator.userAgent.includes('HeadlessChrome'); + + // Don't use mock data if we're explicitly testing API errors + if (window.location.search.includes('mock=false')) { + return false; + } + + // Use mock data if explicitly requested or if we're in a test environment + return window.location.search.includes('mock=true') || isTestEnvironment; + } + + async getMockData() { + try { + // Add delay in test environments to make loading state visible + if (this.isTestEnvironment()) { + await new Promise(resolve => setTimeout(resolve, 200)); + } + + const response = await fetch('./mocks/weather-data.json'); + if (!response.ok) { + throw new Error('Failed to load mock data'); + } + return await response.json(); + } catch (error) { + console.error('Error loading mock data:', error); + throw error; + } + } + + isTestEnvironment() { + return navigator.userAgent.includes('Playwright') || + navigator.userAgent.includes('HeadlessChrome'); + } + + getMockGeocodingData(cityName) { + // Mock geocoding data for different cities to enable proper testing + const mockCities = { + 'London': { + latitude: 51.5074, + longitude: -0.1278, + name: 'London', + country: 'United Kingdom' + }, + 'Tokyo': { + latitude: 35.6762, + longitude: 139.6503, + name: 'Tokyo', + country: 'Japan' + }, + 'Paris': { + latitude: 48.8566, + longitude: 2.3522, + name: 'Paris', + country: 'France' + }, + 'São Paulo': { + latitude: -23.5505, + longitude: -46.6333, + name: 'São Paulo', + country: 'Brazil' + }, + 'New York': { + latitude: 40.7128, + longitude: -74.0060, + name: 'New York', + country: 'United States' + } + }; + + // Handle invalid cities + if (cityName.includes('Invalid') || cityName.includes('123') || !cityName.trim()) { + throw new Error('Unable to find location. Please check the city name and try again.'); + } + + // Return mock data for known cities, or default to London for unknown cities + return mockCities[cityName] || mockCities['London']; + } + + async geocodeLocation(cityName) { + if (this.useMockData) { + return this.getMockGeocodingData(cityName); + } + + try { + const response = await fetch( + `${this.geocodingUrl}/search?name=${encodeURIComponent(cityName)}&count=1&language=en&format=json` + ); + + if (!response.ok) { + throw new Error('Geocoding failed'); + } + + const data = await response.json(); + + if (!data.results || data.results.length === 0) { + throw new Error('Location not found'); + } + + const location = data.results[0]; + return { + latitude: location.latitude, + longitude: location.longitude, + name: location.name, + country: location.country + }; + } catch (error) { + console.error('Geocoding error:', error); + throw new Error('Unable to find location. Please check the city name and try again.'); + } + } + + async getWeatherData(latitude, longitude) { + if (this.useMockData) { + return await this.getMockData(); + } + + try { + const params = new URLSearchParams({ + latitude: latitude.toString(), + longitude: longitude.toString(), + daily: 'temperature_2m_max,temperature_2m_min,weather_code,sunrise,sunset,rain_sum,uv_index_max,precipitation_probability_max', + current: 'temperature_2m,relative_humidity_2m,apparent_temperature,is_day,snowfall,showers,rain,precipitation,weather_code,cloud_cover,pressure_msl,surface_pressure,wind_direction_10m,wind_gusts_10m,wind_speed_10m', + timezone: 'GMT' + }); + + const response = await fetch(`${this.baseUrl}/forecast?${params}`); + + if (!response.ok) { + throw new Error(`Weather API error: ${response.status}`); + } + + const data = await response.json(); + return data; + } catch (error) { + console.error('Weather API error:', error); + throw new Error('Unable to fetch weather data. Please try again later.'); + } + } + + async getWeatherByCity(cityName) { + try { + const location = await this.geocodeLocation(cityName); + const weather = await this.getWeatherData(location.latitude, location.longitude); + + return { + ...weather, + locationName: location.name, + country: location.country + }; + } catch (error) { + console.error('Weather service error:', error); + throw error; + } + } +} diff --git a/apps/geajs/src/utils/weather-utils.js b/apps/geajs/src/utils/weather-utils.js new file mode 100644 index 00000000..00d84f5e --- /dev/null +++ b/apps/geajs/src/utils/weather-utils.js @@ -0,0 +1,128 @@ +export class WeatherUtils { + static getWeatherDescription(weatherCode) { + const weatherCodes = { + 0: 'Clear sky', + 1: 'Mainly clear', + 2: 'Partly cloudy', + 3: 'Overcast', + 45: 'Fog', + 48: 'Depositing rime fog', + 51: 'Light drizzle', + 53: 'Moderate drizzle', + 55: 'Dense drizzle', + 56: 'Light freezing drizzle', + 57: 'Dense freezing drizzle', + 61: 'Slight rain', + 63: 'Moderate rain', + 65: 'Heavy rain', + 66: 'Light freezing rain', + 67: 'Heavy freezing rain', + 71: 'Slight snow fall', + 73: 'Moderate snow fall', + 75: 'Heavy snow fall', + 77: 'Snow grains', + 80: 'Slight rain showers', + 81: 'Moderate rain showers', + 82: 'Violent rain showers', + 85: 'Slight snow showers', + 86: 'Heavy snow showers', + 95: 'Thunderstorm', + 96: 'Thunderstorm with slight hail', + 99: 'Thunderstorm with heavy hail' + }; + + return weatherCodes[weatherCode] || 'Unknown'; + } + + static getWeatherIcon(weatherCode, isDay = true) { + if (weatherCode === 0) { + return isDay ? '☀️' : '🌙'; + } else if (weatherCode <= 3) { + return isDay ? '⛅' : '☁️'; + } else if (weatherCode <= 48) { + return '🌫️'; + } else if (weatherCode <= 57 || (weatherCode >= 80 && weatherCode <= 82)) { + return '🌧️'; + } else if (weatherCode >= 61 && weatherCode <= 67) { + return '🌧️'; + } else if (weatherCode >= 71 && weatherCode <= 77) { + return '❄️'; + } else if (weatherCode >= 85 && weatherCode <= 86) { + return '🌨️'; + } else if (weatherCode >= 95) { + return '⛈️'; + } + return '🌤️'; + } + + static formatTemperature(temp) { + return `${Math.round(temp)}°C`; + } + + static formatWindSpeed(speed) { + return `${Math.round(speed)} km/h`; + } + + static formatPressure(pressure) { + return `${Math.round(pressure)} hPa`; + } + + static formatPercentage(value) { + return `${Math.round(value)}%`; + } + + static getWindDirection(degrees) { + const directions = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']; + const index = Math.round(degrees / 22.5) % 16; + return directions[index]; + } + + static formatDate(dateString) { + const date = new Date(dateString); + const today = new Date(); + const tomorrow = new Date(today); + tomorrow.setDate(today.getDate() + 1); + + if (date.toDateString() === today.toDateString()) { + return 'Today'; + } else if (date.toDateString() === tomorrow.toDateString()) { + return 'Tomorrow'; + } else { + return date.toLocaleDateString('en-US', { weekday: 'long' }); + } + } + + static formatTime(timeString) { + const date = new Date(timeString); + return date.toLocaleTimeString('en-US', { + hour: '2-digit', + minute: '2-digit', + hour12: false + }); + } + + static getConditionClass(weatherCode) { + if (weatherCode === 0) { + return 'weather-condition-sunny'; + } else if (weatherCode <= 3) { + return 'weather-condition-cloudy'; + } else if ((weatherCode >= 51 && weatherCode <= 67) || (weatherCode >= 80 && weatherCode <= 82)) { + return 'weather-condition-rainy'; + } else if (weatherCode >= 95) { + return 'weather-condition-stormy'; + } + return 'weather-condition-cloudy'; + } + + static debounce(func, wait) { + let timeout; + return function executedFunction(...args) { + const later = () => { + clearTimeout(timeout); + func(...args); + }; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + }; + } +} diff --git a/apps/geajs/src/weather-store.js b/apps/geajs/src/weather-store.js new file mode 100644 index 00000000..a3cc0a9f --- /dev/null +++ b/apps/geajs/src/weather-store.js @@ -0,0 +1,233 @@ +import { Store } from '@geajs/core'; +import { WeatherService } from './services/weather-service.js'; +import { WeatherUtils } from './utils/weather-utils.js'; + +const weatherService = new WeatherService(); + +class WeatherStore extends Store { + searchQuery = ''; + isLoading = false; + hasError = false; + errorMessage = ''; + weatherData = null; + activeForecastIndex = null; + + // Derived view state — plain getters, re-evaluated reactively by the compiler + get showErrorState() { + return !this.isLoading && this.hasError; + } + + get showContent() { + return !this.isLoading && !this.hasError && !!this.weatherData; + } + + get current() { + return this.weatherData ? this.weatherData.current : null; + } + + get locationLabel() { + const data = this.weatherData; + if (!data) { + return ''; + } + return `${data.locationName}${data.country ? `, ${data.country}` : ''}`; + } + + get currentIcon() { + return this.current ? WeatherUtils.getWeatherIcon(this.current.weather_code, this.current.is_day) : ''; + } + + get currentTemperature() { + return this.current ? WeatherUtils.formatTemperature(this.current.temperature_2m) : ''; + } + + get currentCondition() { + return this.current ? WeatherUtils.getWeatherDescription(this.current.weather_code) : ''; + } + + get conditionClass() { + return this.current ? WeatherUtils.getConditionClass(this.current.weather_code) : ''; + } + + get feelsLike() { + return this.current ? WeatherUtils.formatTemperature(this.current.apparent_temperature) : ''; + } + + get humidity() { + return this.current ? WeatherUtils.formatPercentage(this.current.relative_humidity_2m) : ''; + } + + get windSpeed() { + return this.current ? WeatherUtils.formatWindSpeed(this.current.wind_speed_10m) : ''; + } + + get pressure() { + return this.current ? WeatherUtils.formatPressure(this.current.pressure_msl) : ''; + } + + get cloudCover() { + return this.current ? WeatherUtils.formatPercentage(this.current.cloud_cover) : ''; + } + + get windDirection() { + return this.current ? WeatherUtils.getWindDirection(this.current.wind_direction_10m) : ''; + } + + get forecastDays() { + const daily = this.weatherData?.daily; + if (!daily?.time) { + return []; + } + return daily.time.slice(0, 7).map((date, index) => ({ + index, + date, + dayName: WeatherUtils.formatDate(date), + icon: WeatherUtils.getWeatherIcon(daily.weather_code[index]), + condition: WeatherUtils.getWeatherDescription(daily.weather_code[index]), + high: WeatherUtils.formatTemperature(daily.temperature_2m_max[index]), + low: WeatherUtils.formatTemperature(daily.temperature_2m_min[index]), + sunrise: daily.sunrise ? WeatherUtils.formatTime(daily.sunrise[index]) : '', + sunset: daily.sunset ? WeatherUtils.formatTime(daily.sunset[index]) : '', + rain: `${daily.rain_sum?.[index]?.toFixed(1) || 0} mm`, + uvIndex: `${daily.uv_index_max?.[index]?.toFixed(1) || 0}`, + precipitation: WeatherUtils.formatPercentage(daily.precipitation_probability_max?.[index] || 0), + tempRange: `${WeatherUtils.formatTemperature(daily.temperature_2m_min[index])} to ${WeatherUtils.formatTemperature(daily.temperature_2m_max[index])}` + })); + } + + // Actions + async init() { + try { + const savedLocation = this.getSavedLocation(); + if (savedLocation) { + this.searchQuery = savedLocation; + await this.loadWeather(savedLocation); + return; + } + } catch (error) { + console.warn('Could not load saved location:', error); + } + + // Try to get current location + try { + await this.getCurrentLocationWeather(); + } catch (error) { + console.warn('Could not get current location:', error); + // Fallback to default location + this.searchQuery = 'London'; + await this.loadWeather('London'); + } + } + + async search() { + const city = this.searchQuery.trim(); + + if (!city) { + this.showError('Please enter a city name'); + return; + } + + await this.loadWeather(city); + } + + async loadWeather(city) { + try { + this.isLoading = true; + this.clearError(); + + this.weatherData = await weatherService.getWeatherByCity(city); + this.saveLocation(city); + } catch (error) { + this.showError(error.message); + } finally { + this.isLoading = false; + } + } + + getCurrentLocationWeather() { + return new Promise((resolve, reject) => { + if (!navigator.geolocation) { + reject(new Error('Geolocation not supported')); + return; + } + + navigator.geolocation.getCurrentPosition( + async(position) => { + try { + this.isLoading = true; + this.clearError(); + + const { latitude, longitude } = position.coords; + const data = await weatherService.getWeatherData(latitude, longitude); + data.locationName = 'Current Location'; + this.weatherData = data; + this.searchQuery = 'Current Location'; + resolve(); + } catch (error) { + reject(error); + } finally { + this.isLoading = false; + } + }, + (error) => { + reject(error); + }, + { + timeout: 10000, + enableHighAccuracy: false, + maximumAge: 300000 // 5 minutes + } + ); + }); + } + + toggleForecast(index) { + if (this.activeForecastIndex === index) { + this.activeForecastIndex = null; + } else { + this.activeForecastIndex = index; + + // Smooth scroll to the expanded item + setTimeout(() => { + const activeElement = document.querySelector('.forecast-item.active'); + if (activeElement) { + activeElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + } + }, 100); + } + } + + setSearchQuery(value) { + this.searchQuery = value; + } + + showError(message) { + this.hasError = true; + this.weatherData = null; + this.errorMessage = message; + } + + clearError() { + this.hasError = false; + this.errorMessage = ''; + } + + saveLocation(city) { + try { + localStorage.setItem('weather-app-location', city); + } catch (error) { + console.warn('Could not save location to localStorage:', error); + } + } + + getSavedLocation() { + try { + return localStorage.getItem('weather-app-location'); + } catch (error) { + console.warn('Could not get saved location from localStorage:', error); + return null; + } + } +} + +export default new WeatherStore(); diff --git a/apps/geajs/styles.css b/apps/geajs/styles.css new file mode 100644 index 00000000..39534b1b --- /dev/null +++ b/apps/geajs/styles.css @@ -0,0 +1,47 @@ +/* Gea specific styles */ + +#app { + display: flex; + flex-direction: column; + min-height: 100vh; + font-family: var(--font-family-sans); + color: var(--color-text); + line-height: var(--line-height-normal); +} + +/* Ensure smooth transitions for state changes */ +.fade-in { + opacity: 0; + animation: fadeIn 0.3s ease-out forwards; +} + +.fade-out { + opacity: 1; + animation: fadeOut 0.3s ease-out forwards; +} + +@keyframes fadeIn { + to { + opacity: 1; + } +} + +@keyframes fadeOut { + to { + opacity: 0; + } +} + +/* Active forecast item styling */ +.forecast-item.active { + background-color: var(--color-background-secondary); + border-color: var(--color-primary); +} + +/* App shell rendered by the root Gea component */ +.app-shell { + display: flex; + flex-direction: column; + flex: 1; + min-height: 100vh; +} \ No newline at end of file diff --git a/apps/geajs/vite.config.js b/apps/geajs/vite.config.js new file mode 100644 index 00000000..8613fe83 --- /dev/null +++ b/apps/geajs/vite.config.js @@ -0,0 +1,19 @@ +import { defineConfig } from 'vite'; +import { geaPlugin } from '@geajs/vite-plugin'; + +export default defineConfig({ + plugins: [geaPlugin()], + base: './', + server: { + port: 3000, + open: false + }, + build: { + target: 'esnext', + rollupOptions: { + input: { + main: 'index.html' + } + } + } +}); diff --git a/eslint.config.mjs b/eslint.config.mjs index d5e433a0..cc53f747 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -206,6 +206,18 @@ export default [ }, }, + // Gea-specific rules + { + files: ['apps/geajs/**/*.{js,jsx}'], + rules: { + // Gea components are referenced only inside JSX templates + 'no-unused-vars': ['warn', { + argsIgnorePattern: '^_', + varsIgnorePattern: '^(SearchForm|WeatherDisplay|LoadingState|ErrorState|WeatherContent|CurrentWeather|Forecast|ForecastItem|App)$' + }], + }, + }, + // jQuery-specific rules { files: ['apps/jquery/**/*.js'], diff --git a/frameworks.json b/frameworks.json index 839a3b20..a79e54d8 100644 --- a/frameworks.json +++ b/frameworks.json @@ -401,6 +401,34 @@ "longDescription": "Standards-only reactive library with state, DOM binding, and keyed list rendering." } }, + { + "id": "geajs", + "name": "Gea", + "displayName": "Gea.js", + "dir": "geajs", + "assetsDir": "public", + "build": { + "buildCommand": "vite build", + "hasNodeModules": true, + "devCommand": "vite --port 3000", + "testCommand": "playwright test --config=tests/config/playwright-geajs.config.js", + "lintFiles": ["js", "jsx"] + }, + "meta": { + "emoji": "🌍", + "iconName": "googleearth", + "iconUrl": "https://geajs.com/logo.png", + "website": "https://geajs.com/", + "docs": "https://geajs.com/docs/getting-started.html", + "github": "https://github.com/dashersw/gea", + "npmPackage": "@geajs/core", + "color": "#00e5ff", + "accentColor": "#00e5ff", + "logo": "https://geajs.com/logo.png", + "description": "Compiler-first reactive framework that compiles JSX into surgical DOM updates", + "longDescription": "Compiler-first framework with proxy-based stores, no virtual DOM, and tiny bundles." + } + }, { "id": "vanilla", "name": "Vanilla JS", diff --git a/package.json b/package.json index 65214314..40bfea41 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,10 @@ "start": "python scripts/run/serve.py", "help": "python scripts/main.py", "// DEV COMMANDS": "-------------------------------------------------------", - "dev:all": "npm run dev:alpine && npm run dev:angular && npm run dev:jquery && npm run dev:lit && npm run dev:lume-js && npm run dev:preact && npm run dev:qwik && npm run dev:react && npm run dev:solid && npm run dev:svelte && npm run dev:vanilla && npm run dev:vanjs && npm run dev:vue", + "dev:all": "npm run dev:alpine && npm run dev:angular && npm run dev:geajs && npm run dev:jquery && npm run dev:lit && npm run dev:lume-js && npm run dev:preact && npm run dev:qwik && npm run dev:react && npm run dev:solid && npm run dev:svelte && npm run dev:vanilla && npm run dev:vanjs && npm run dev:vue", "dev:alpine": "cd apps/alpine && python3 -m http.server 3000 || python -m http.server 3000", "dev:angular": "cd apps/angular && npx ng serve --port 3000", + "dev:geajs": "cd apps/geajs && npx vite --port 3000", "dev:jquery": "cd apps/jquery && npx vite --port 3000", "dev:lit": "cd apps/lit && npx vite --port 3000", "dev:lume-js": "cd apps/lume-js && python3 -m http.server 3000 || python -m http.server 3000", @@ -32,9 +33,10 @@ "dev:vanjs": "cd apps/vanjs && npx vite --port 3000", "dev:vue": "cd apps/vue && npx vite --port 3000", "// BUILD COMMANDS": "-----------------------------------------------------", - "build:all": "npm run build:alpine && npm run build:angular && npm run build:jquery && npm run build:lit && npm run build:lume-js && npm run build:preact && npm run build:qwik && npm run build:react && npm run build:solid && npm run build:svelte && npm run build:vanilla && npm run build:vanjs && npm run build:vue", + "build:all": "npm run build:alpine && npm run build:angular && npm run build:geajs && npm run build:jquery && npm run build:lit && npm run build:lume-js && npm run build:preact && npm run build:qwik && npm run build:react && npm run build:solid && npm run build:svelte && npm run build:vanilla && npm run build:vanjs && npm run build:vue", "build:alpine": "cd apps/alpine && echo 'No build step required'", "build:angular": "cd apps/angular && npx ng build", + "build:geajs": "cd apps/geajs && npx vite build", "build:jquery": "cd apps/jquery && npx vite build", "build:lit": "cd apps/lit && npx vite build", "build:lume-js": "cd apps/lume-js && echo 'No build step required'", @@ -47,9 +49,10 @@ "build:vanjs": "cd apps/vanjs && npx vite build", "build:vue": "cd apps/vue && npx vite build", "// TEST COMMANDS": "------------------------------------------------------", - "test:all": "npm run test:alpine && npm run test:angular && npm run test:jquery && npm run test:lit && npm run test:lume-js && npm run test:preact && npm run test:qwik && npm run test:react && npm run test:solid && npm run test:svelte && npm run test:vanilla && npm run test:vanjs && npm run test:vue", + "test:all": "npm run test:alpine && npm run test:angular && npm run test:geajs && npm run test:jquery && npm run test:lit && npm run test:lume-js && npm run test:preact && npm run test:qwik && npm run test:react && npm run test:solid && npm run test:svelte && npm run test:vanilla && npm run test:vanjs && npm run test:vue", "test:alpine": "npx playwright test --config=tests/config/playwright-alpine.config.js --reporter=list", "test:angular": "npx playwright test --config=tests/config/playwright-angular.config.js --reporter=list", + "test:geajs": "npx playwright test --config=tests/config/playwright-geajs.config.js --reporter=list", "test:jquery": "npx playwright test --config=tests/config/playwright-jquery.config.js --reporter=list", "test:lit": "npx playwright test --config=tests/config/playwright-lit.config.js --reporter=list", "test:lume-js": "npx playwright test --config=tests/config/playwright-lume-js.config.js --reporter=list", @@ -62,9 +65,10 @@ "test:vanjs": "npx playwright test --config=tests/config/playwright-vanjs.config.js --reporter=list", "test:vue": "npx playwright test --config=tests/config/playwright-vue.config.js --reporter=list", "// LINT COMMANDS": "------------------------------------------------------", - "lint:all": "npm run lint:alpine && npm run lint:angular && npm run lint:jquery && npm run lint:lit && npm run lint:lume-js && npm run lint:preact && npm run lint:qwik && npm run lint:react && npm run lint:solid && npm run lint:svelte && npm run lint:vanilla && npm run lint:vanjs && npm run lint:vue", + "lint:all": "npm run lint:alpine && npm run lint:angular && npm run lint:geajs && npm run lint:jquery && npm run lint:lit && npm run lint:lume-js && npm run lint:preact && npm run lint:qwik && npm run lint:react && npm run lint:solid && npm run lint:svelte && npm run lint:vanilla && npm run lint:vanjs && npm run lint:vue", "lint:alpine": "eslint 'apps/alpine/**/*.js'", "lint:angular": "eslint 'apps/angular/**/*.{ts,html}'", + "lint:geajs": "eslint 'apps/geajs/**/*.{js,jsx}'", "lint:jquery": "eslint 'apps/jquery/**/*.js'", "lint:lit": "eslint 'apps/lit/**/*.js'", "lint:lume-js": "eslint 'apps/lume-js/**/*.js'", diff --git a/tests/config/playwright-geajs.config.js b/tests/config/playwright-geajs.config.js new file mode 100644 index 00000000..44dc3a40 --- /dev/null +++ b/tests/config/playwright-geajs.config.js @@ -0,0 +1,3 @@ +const { createConfig } = require('./playwright.config.base.js'); + +module.exports = createConfig('geajs'); diff --git a/tests/config/playwright.config.base.js b/tests/config/playwright.config.base.js index 37dc4d8a..7b7d85bd 100644 --- a/tests/config/playwright.config.base.js +++ b/tests/config/playwright.config.base.js @@ -92,6 +92,13 @@ function createConfig(framework) { command: 'npm run dev:lume-js', url: 'http://localhost:3000/', } + }, + geajs: { + baseURL: 'http://localhost:3000/?mock=true', + webServer: { + command: 'npm run dev:geajs', + url: 'http://localhost:3000/', + } } };
{weatherStore.errorMessage || 'Please check the city name and try again.'}
Loading weather data...