diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0d0f0d0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d86dd4e --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# Public API URLs, embedded at build time. Never put credentials in NEXT_PUBLIC_*. +NEXT_PUBLIC_AUTH_URL=https://learn.reboot01.com/api/auth/signin +NEXT_PUBLIC_GRAPHQL_URL=https://learn.reboot01.com/api/graphql-engine/v1/graphql +NEXT_PUBLIC_MODULE_PATH=/bahrain/bh-module diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cc0d8c2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto eol=lf +*.webp binary +*.png binary +*.ico binary diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a867d6c --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +## Change + +Describe the problem and the resulting behavior. + +## Validation + +List the checks you ran and any relevant limitations. diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..eb9ab86 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,26 @@ +name: Quality +on: + push: + branches: [main] + pull_request: +permissions: + contents: read +concurrency: + group: quality-${{ github.ref }} + cancel-in-progress: true +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + - run: npm ci + - run: npm run format:check + - run: npm run lint + - run: npm run typecheck + - run: npm test + - run: npm run build:static diff --git a/.gitignore b/.gitignore index 5ef6a52..7b8da95 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env* +!.env.example # vercel .vercel diff --git a/.openai/hosting.json b/.openai/hosting.json new file mode 100644 index 0000000..67b40a8 --- /dev/null +++ b/.openai/hosting.json @@ -0,0 +1,4 @@ +{ + "project_id": "appgprj_6aa268f88448819194e9d71ae0b13118", + "static": { "directory": "out" } +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..bf54fe9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +node_modules +.next +out +package-lock.json +next-env.d.ts +*.tsbuildinfo +coverage diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..d83b072 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{ "semi": true, "singleQuote": false, "trailingComma": "all", "printWidth": 100 } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4e1a8d9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing + +Use Node.js 22.12 or newer, install with `npm ci`, and start with `npm run dev`. + +Before opening a change, run: + +```sh +npm run format:check +npm run lint +npm run typecheck +npm test +npm run build:static +``` + +Use `npm run format` when formatting changes are needed. Keep dependency changes in `package.json` and the existing lockfile together. + +Keep live API failures distinct from the sample route. Do not commit credentials, JWTs, real learner exports, or screenshots containing private student information. Add calculation and request-lifecycle tests when changing those behaviors. UI changes should preserve keyboard access, narrow layouts, and reduced motion. + +Prefer commits that describe one meaningful change: authentication, analytics, design, testing, or documentation. Explain why a calculation or API scope changes in the pull request. diff --git a/README.md b/README.md index e215bc4..c1f1eab 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,81 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). +# Graphite -## Getting Started +**Your learning, connected.** A Reboot01 analytics workspace built with Next.js, TypeScript, and Apollo GraphQL. -First, run the development server: +![Graphite's original amber glass and graphite orbital artwork](public/images/graphite-orbit.webp) -```bash +Graphite brings experience, projects, skills, and peer feedback into one considered workspace. It connects to a student's existing Reboot01 account and provides a separate, clearly labeled sample workspace for exploring the interface without credentials. + +## The experience + +- **A clear overview:** module XP, passed projects, audit ratio, and current level. +- **A useful growth chart:** cumulative experience, calendar-month controls, and an exact data table. +- **Skills in context:** highest attained percentages, a radar visualization, and complete skill values. +- **Project history:** search, status filters, best grades, module XP, dates, and pagination. +- **Peer audits:** given and received XP, pass/fail history, and filtered results. +- **A coherent visual identity:** original local artwork, a cinematic sign-in page, scroll-linked parallax, section reveals, and responsive layouts. +- **Considered access:** per-request session headers, tab-scoped tokens, expiry handling, accessible controls, and reduced-motion support. + +## Run locally + +Requires **Node.js 22.12+** and npm. + +```sh +git clone https://github.com/hujaafar/GraphQL.git +cd GraphQL +npm ci npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +Open [localhost:3000](http://localhost:3000). Choose **Explore the sample workspace** to inspect the dashboard with fictional data, or sign in with a Reboot01 account to load your own records. + +The default Reboot01 endpoints work without an environment file. To use another compatible installation, copy `.env.example` to `.env.local` and update the public URLs and module path. Never place a password or token in an environment variable prefixed with `NEXT_PUBLIC_`. + +| Route | Purpose | +| ----------------- | ------------------------------------------------------------ | +| `/` and `/login/` | Sign in to the Reboot01 account | +| `/profile/` | Authenticated learning workspace | +| `/demo/` | Fictional sample workspace; no account or API request needed | + +## Build and verify + +```sh +npm run format:check +npm run lint +npm run typecheck +npm test +npm run build +npm start +``` + +For static hosting, use `npm run build:static` and publish the generated `out/` directory. The normal build retains Next.js and Vercel compatibility. API requests still go directly from the browser to Reboot01, so the upstream service must allow the deployed origin. -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +The test suite covers token expiry, failed sign-ins, UTF-8 credentials, current-token request headers, GraphQL failures, module scopes, ranks, skill maxima, project aggregation, and XP reconciliation. GitHub Actions runs formatting, lint, types, tests, and the static build for pull requests and updates to `main`. -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. +## Inside the repository -## Learn More +```text +src/ + app/ Routes, shared layout, metadata, and design tokens + components/ Workspace, charts, identity, and motion + graphql/ Dashboard query and module configuration + lib/ Authentication, Apollo transport, calculations, sample data +tests/ Request lifecycle and data regression tests +docs/ Architecture, data semantics, and design decisions +scripts/ Portable static export +``` -To learn more about Next.js, take a look at the following resources: +- [Architecture and session model](docs/architecture.md) +- [Data contract and calculations](docs/data-contract.md) +- [Design and artwork](docs/design.md) +- [Contribution guide](CONTRIBUTING.md) -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +## Data and scope -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! +This is an independent educational project, not an official Reboot01 application. It is read-only: it does not edit grades, submit audits, or modify student records. The artwork is decorative; the sample route is explicitly fictional. Real authentication and learner data depend on Reboot01's API and access rules. -## Deploy on Vercel +Live-account login and browser regression testing are not included in the automated suite. The tests use controlled responses rather than real student credentials. -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. +The dependency tree retains the existing project libraries. React compatibility is updated, and a PostCSS override keeps Next.js's parser on a patched 8.x release without a framework-major migration. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +Built by [hujaafar](https://github.com/hujaafar). diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..e6e5859 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,59 @@ +# Architecture + +Graphite is a read-only client for the Reboot01 learning API. Next.js renders the public shell; the authenticated dashboard loads in the browser. A separate sample route makes the interface reviewable without credentials. + +```mermaid +flowchart LR + Login[Sign-in form] -->|Basic auth over HTTPS| Auth[Reboot01 sign-in API] + Auth -->|JWT| Session[Tab-scoped sessionStorage] + Session -->|Token read on every operation| Apollo[Apollo Client] + Apollo -->|Read-only query| API[Reboot01 GraphQL API] + API --> Model[Typed data and calculations] + Model --> Dashboard[Charts, projects, audits, profile] + Fixtures[Fictional fixtures] --> Demo[Sample workspace] +``` + +## Boundaries + +| Area | Responsibility | +| -------------------------------- | -------------------------------------------------------------------------------------- | +| `src/lib/auth.ts` | UTF-8 credential encoding, sign-in, session storage, expiry checks | +| `src/lib/apollo.ts` | Per-request authorization, a 20-second request timeout, expiry events, in-memory cache | +| `src/graphql/dashboard-query.ts` | One typed dashboard operation with a consistent module scope | +| `src/lib/dashboard.ts` | Pure, independently tested aggregation and formatting | +| `src/lib/demo-data.ts` | Explicit fictional sample data, never an API error fallback | +| `src/components/Dashboard.tsx` | Workspace navigation, project filtering, audit history, and account details | +| `src/components/Charts.tsx` | XP history and skills visualization, with exact data alternatives | +| `src/components/Motion.tsx` | Hero parallax and progressive section motion | +| `src/app/profile/page.tsx` | Session guard, query lifecycle, refresh, logout, and failure states | + +## Authentication and privacy + +- The password is sent directly to the configured Reboot01 HTTPS endpoint and is not written to storage, logged, or sent to an app-owned server. +- The JWT lives in `sessionStorage`, which normally lasts for the current browser tab. The previous application's `localStorage.authToken` is removed on successful sign-in and logout. +- Client-side JWT decoding checks format and expiry only. **Reboot01 verifies the token and enforces authorization.** A client-side route guard is not an authorization boundary. +- Browser storage is accessible to JavaScript on the same origin. A deployment that requires stronger session isolation should use a trusted backend with HttpOnly cookies; it must also address CSRF and upstream API access. +- Apollo reads the latest token before every operation. Invalid JWT and HTTP 401 responses clear the session; the profile page clears cached data and returns to sign-in. A periodic and focus check also detects expiry. +- Ordinary connection errors retain the last loaded live data for retry. No API failure silently switches to sample data. +- Real learner data is not embedded in the static build. The `/demo/` route contains only the clearly labeled fixtures in `demo-data.ts`. +- Account details retain the original profile fields but are collapsed by default. + +## Data semantics + +See [the data contract](data-contract.md) for the query scopes and calculations. The important design decision is that XP shown in the overview, breakdown, and timeline refers to the same module event. Piscine XP is displayed separately. + +## Motion + +The dashboard uses Framer Motion for a small, scroll-linked image translation and scale. Section entry uses CSS view timelines where supported, with a readable static fallback. There is no scroll hijacking or mandatory pinned section in the working dashboard. + +The pause control stops decorative motion for the current page. The operating system's reduced-motion preference takes precedence; charts, CSS transitions, and the hero respect it. Native scrolling, keyboard navigation, and anchor links remain available. + +## Deployment + +The regular `npm run build` / `npm start` workflow retains Next.js hosting compatibility, including Vercel. `npm run build:static` creates `out/` for static hosting by setting a build-only environment variable. The two outputs use the same source and API client. + +The `.openai/hosting.json` file identifies the owner's private Sites preview and declares `out` as the static output. It contains no credentials. A fork should obtain its own Sites project identifier before deploying through Sites. + +## Verification limits + +The automated tests use mocked authentication and GraphQL transports and real pure calculation functions. They do not log in to a real Reboot01 student account. Live compatibility still depends on the upstream schema, permission rules, and CORS policy. Browser interaction and visual regression tests are not part of the included suite. diff --git a/docs/data-contract.md b/docs/data-contract.md new file mode 100644 index 0000000..f77df35 --- /dev/null +++ b/docs/data-contract.md @@ -0,0 +1,31 @@ +# Data contract + +The dashboard operation builds on the original repository's Reboot01 schema. The default module is `/bahrain/bh-module`; public build-time environment variables can configure another compatible installation. + +| Display | Source | Calculation | +| ---------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| Total module XP | `transaction_aggregate`, `type = xp`, exact module event path | Sum of `amount` | +| Project / exercise module XP | The same module event scope plus object type | Sum by object type; any remaining module XP is displayed separately | +| Piscine Go / JS | XP transaction paths matching the original piscine patterns | Separate totals; never added to the module summary | +| XP timeline | Module XP transactions ordered by date | Monthly awards plus a cumulative total; limited periods retain the opening balance | +| Current level | Highest `level` transaction with the module path prefix | Maximum attained level | +| Rank | Current level | Original rank milestones from 0 to 60; level 60+ remains in the final rank | +| Skill percentages | Transactions whose type starts with `skill_` | Highest attained value for each skill, constrained to 0–100 | +| Projects | Project progress plus module project XP awards | One row per object name, combined XP, latest award date, best recorded grade | +| Audit ratio | `user.auditRatio` | Displayed when received audit XP exists; otherwise shown as unavailable | +| Audit XP | `user.totalUp`, `user.totalDown` | Given and received totals | +| Audit history | Original passed/failed audit aggregates | Sorted by the group's creation timestamp | + +## Display conventions + +- XP uses decimal units: 1 kB = 1,000 B; 1 MB = 1,000,000 B, matching the original project. +- A project with XP or a grade of at least 1 is passed. A recorded grade below 1 is shown as retry. A missing grade without XP is in progress. The UI labels grades as **best grade** because multiple progress records are consolidated. +- The project list combines progress records from all projects with XP from the selected module. Projects outside the module can therefore show a grade and 0 module XP. +- Audit rows say **Group created**. That field is not the timestamp when an audit was completed; the label deliberately preserves the meaning of the available data. +- The 3M and 6M chart controls show calendar months including the current month. Dates use UTC to keep month boundaries consistent. +- `attrs` accepts an object or a stringified object. Missing and malformed values display safely as not provided. +- Empty data is not replaced with sample data. All zero and missing cases are handled directly. + +## Upstream dependencies + +The query uses the existing `user`, `transaction`, `transaction_aggregate`, `progress`, and audit aggregate fields. Module filters are GraphQL variables rather than interpolated query text. A change to the upstream schema or authorization rules may require updating the operation. No live credentials are required for the repository's test suite. diff --git a/docs/design.md b/docs/design.md new file mode 100644 index 0000000..6b51f67 --- /dev/null +++ b/docs/design.md @@ -0,0 +1,27 @@ +# Design notes + +Graphite takes its direction from the user's Neo4flix and Nexora projects: a large tactile image, confident typography, deliberate whitespace, and movement linked to scrolling. The result stays focused on learning analytics. + +## Identity + +- Charcoal backgrounds, warm amber highlights, subdued green success states, and separate violet received-audit values. +- A restrained network mark connects the GraphQL subject to the product's name. +- A split sign-in composition introduces the orbital sculpture; a shallow crop carries that image into the workspace. +- Flat, readable chart surfaces keep the data prominent. Profile details move behind a disclosure rather than consuming the first viewport. + +## Artwork + +`public/images/graphite-orbit.webp` is an original AI-generated artwork commissioned for this redesign. It depicts graphite and brushed-metal nodes connected by translucent amber glass arcs. The 1536 × 1024 asset is compressed to WebP and served locally; the interface has no remote image dependency. It is decorative and does not represent real data. + +## Interaction principles + +- The dashboard opens with its overview and primary metrics. +- Sidebar anchors expose the existing functional sections without adding navigation routes for each panel. +- Project search, result filters, pagination, chart periods, and audit filters are keyboard-operable controls. +- Native details elements provide expanded chart data, the complete skill list, and profile details. +- Responsive layouts change from a desktop sidebar to horizontally scrollable navigation, while tables retain their headers and scroll inside their panel. +- Motion can be paused and follows system accessibility preferences. + +## Implementation notes + +Shared tokens live at the start of `globals.css`. The dashboard, data normalization, query, authentication transport, and charts have separate responsibilities. Components contain explanatory comments around behavior that is easy to get wrong rather than comments that restate every line. diff --git a/eslint.config.mjs b/eslint.config.mjs index c85fb67..4735fc3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -10,6 +10,7 @@ const compat = new FlatCompat({ }); const eslintConfig = [ + { ignores: [".next/**", "out/**", "node_modules/**", "next-env.d.ts", "coverage/**"] }, ...compat.extends("next/core-web-vitals", "next/typescript"), ]; diff --git a/next.config.ts b/next.config.ts index 8418009..bab6b5f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,10 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ reactStrictMode: true, + reactStrictMode: true, + output: process.env.GRAPHITE_STATIC_EXPORT === "1" ? "export" : undefined, + trailingSlash: true, + images: { unoptimized: true }, }; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index 58ae4b3..856aba6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "@mui/material": "^6.3.1", - "@react-three/fiber": "^8.17.10", + "@react-three/fiber": "^9.7.0", "animejs": "^3.2.2", "daisyui": "^4.12.23", "framer-motion": "^11.17.0", @@ -36,13 +36,18 @@ "@types/three": "^0.171.0", "autoprefixer": "^10.4.20", "eslint": "^9", - "eslint-config-next": "15.1.3", - "next": "^15.1.3", - "postcss": "^8.4.49", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "eslint-config-next": "^15.5.25", + "next": "^15.5.25", + "postcss": "^8.5.23", + "prettier": "^3.9.6", + "react": "19.0", + "react-dom": "19.0", "tailwindcss": "^3.4.17", + "tsx": "^4.23.13", "typescript": "^5.7.2" + }, + "engines": { + "node": ">=22.12.0" } }, "node_modules/@alloc/quick-lru": { @@ -178,13 +183,10 @@ } }, "node_modules/@babel/runtime": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", - "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } @@ -244,9 +246,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", - "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", "dev": true, "license": "MIT", "optional": true, @@ -400,10 +402,452 @@ "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", "license": "MIT" }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", "dev": true, "license": "MIT", "dependencies": { @@ -443,24 +887,37 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", - "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^2.1.5", + "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", - "minimatch": "^3.1.2" + "minimatch": "^3.1.5" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@eslint/core": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", - "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -471,20 +928,20 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", - "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.7.tgz", + "integrity": "sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==", "dev": true, "license": "MIT", "dependencies": { - "ajv": "^6.12.4", + "ajv": "^6.14.0", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", + "js-yaml": "^4.3.2", + "minimatch": "^3.1.5", "strip-json-comments": "^3.1.1" }, "engines": { @@ -495,19 +952,22 @@ } }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.5.tgz", + "integrity": "sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", - "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -515,12 +975,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", - "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { + "@eslint/core": "^0.17.0", "levn": "^0.4.1" }, "engines": { @@ -537,41 +998,41 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -589,9 +1050,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", - "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -602,10 +1063,21 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@img/colour": { + "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", + "optional": true, + "engines": { + "node": ">=18" + } + }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", - "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.4.tgz", + "integrity": "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==", "cpu": [ "arm64" ], @@ -616,19 +1088,19 @@ "darwin" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.4" + "@img/sharp-libvips-darwin-arm64": "1.3.3" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", - "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.4.tgz", + "integrity": "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==", "cpu": [ "x64" ], @@ -639,19 +1111,39 @@ "darwin" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.4" + "@img/sharp-libvips-darwin-x64": "1.3.3" + } + }, + "node_modules/@img/sharp-freebsd-wasm32": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.4.tgz", + "integrity": "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "dependencies": { + "@img/sharp-wasm32": "0.35.4" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", - "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.3.tgz", + "integrity": "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==", "cpu": [ "arm64" ], @@ -666,9 +1158,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", - "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.3.tgz", + "integrity": "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==", "cpu": [ "x64" ], @@ -683,9 +1175,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", - "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.3.tgz", + "integrity": "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==", "cpu": [ "arm" ], @@ -700,9 +1192,9 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", - "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.3.tgz", + "integrity": "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==", "cpu": [ "arm64" ], @@ -716,12 +1208,80 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.3.tgz", + "integrity": "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.3.tgz", + "integrity": "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", - "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.3.tgz", + "integrity": "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.3.tgz", + "integrity": "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.3.tgz", + "integrity": "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==", "cpu": [ - "s390x" + "arm64" ], "dev": true, "license": "LGPL-3.0-or-later", @@ -733,10 +1293,10 @@ "url": "https://opencollective.com/libvips" } }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", - "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.3.tgz", + "integrity": "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==", "cpu": [ "x64" ], @@ -750,46 +1310,58 @@ "url": "https://opencollective.com/libvips" } }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", - "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "node_modules/@img/sharp-linux-arm": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.4.tgz", + "integrity": "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==", "cpu": [ - "arm64" + "arm" ], "dev": true, - "license": "LGPL-3.0-or-later", + "license": "Apache-2.0", "optional": true, "os": [ "linux" ], + "engines": { + "node": ">=20.9.0" + }, "funding": { "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.3.3" } }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", - "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "node_modules/@img/sharp-linux-arm64": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.4.tgz", + "integrity": "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==", "cpu": [ - "x64" + "arm64" ], "dev": true, - "license": "LGPL-3.0-or-later", + "license": "Apache-2.0", "optional": true, "os": [ "linux" ], + "engines": { + "node": ">=20.9.0" + }, "funding": { "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.3.3" } }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", - "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.4.tgz", + "integrity": "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==", "cpu": [ - "arm" + "ppc64" ], "dev": true, "license": "Apache-2.0", @@ -798,21 +1370,21 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.5" + "@img/sharp-libvips-linux-ppc64": "1.3.3" } }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", - "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.4.tgz", + "integrity": "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==", "cpu": [ - "arm64" + "riscv64" ], "dev": true, "license": "Apache-2.0", @@ -821,19 +1393,19 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.4" + "@img/sharp-libvips-linux-riscv64": "1.3.3" } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", - "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.4.tgz", + "integrity": "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==", "cpu": [ "s390x" ], @@ -844,19 +1416,19 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.4" + "@img/sharp-libvips-linux-s390x": "1.3.3" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", - "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.4.tgz", + "integrity": "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==", "cpu": [ "x64" ], @@ -867,19 +1439,19 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.4" + "@img/sharp-libvips-linux-x64": "1.3.3" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", - "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.4.tgz", + "integrity": "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==", "cpu": [ "arm64" ], @@ -890,19 +1462,19 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", - "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.4.tgz", + "integrity": "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==", "cpu": [ "x64" ], @@ -913,39 +1485,76 @@ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + "@img/sharp-libvips-linuxmusl-x64": "1.3.3" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", - "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.4.tgz", + "integrity": "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==", + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.11.3" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-webcontainers-wasm32": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.4.tgz", + "integrity": "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==", "cpu": [ "wasm32" ], "dev": true, - "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "license": "Apache-2.0", "optional": true, "dependencies": { - "@emnapi/runtime": "^1.2.0" + "@img/sharp-wasm32": "0.35.4" + }, + "engines": { + "node": ">=20.9.0" }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.4.tgz", + "integrity": "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "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" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", - "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.4.tgz", + "integrity": "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==", "cpu": [ "ia32" ], @@ -956,16 +1565,16 @@ "win32" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": "^20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", - "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.4.tgz", + "integrity": "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==", "cpu": [ "x64" ], @@ -976,7 +1585,7 @@ "win32" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -1265,16 +1874,16 @@ "license": "MIT" }, "node_modules/@next/env": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.3.tgz", - "integrity": "sha512-Q1tXwQCGWyA3ehMph3VO+E6xFPHDKdHFYosadt0F78EObYxPio0S09H9UGYznDe6Wc8eLKLG89GqcFJJDiK5xw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.25.tgz", + "integrity": "sha512-42h1lLr07vl4gawALP1hsgRZjHB1xYa58JfUfHwr0f7jG/zhPakh5GHkADHXOC9ZxUvlQFOPIrp7s6qX4DezPQ==", "dev": true, "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.1.3.tgz", - "integrity": "sha512-oeP1vnc5Cq9UoOb8SYHAEPbCXMzOgG70l+Zfd+Ie00R25FOm+CCVNrcIubJvB1tvBgakXE37MmqSycksXVPRqg==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-15.5.25.tgz", + "integrity": "sha512-dAzOqZQCAOgIq5yQpsuMBZcwxK0AtzGqHMQpxNWYLQlvf79rsP3SDwdGPNQC4ySaMSihOQXMO/VXubQ3JWW+3A==", "dev": true, "license": "MIT", "dependencies": { @@ -1282,9 +1891,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.3.tgz", - "integrity": "sha512-aZtmIh8jU89DZahXQt1La0f2EMPt/i7W+rG1sLtYJERsP7GRnNFghsciFpQcKHcGh4dUiyTB5C1X3Dde/Gw8gg==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.25.tgz", + "integrity": "sha512-w+RR0v/QuApnWEjRGm1z6gcObKwGMb5YPA7V3bzBEVSBpMFUXprer0tS27UxjUcEnqbhL7Zuzohej79B6rYmBg==", "cpu": [ "arm64" ], @@ -1299,9 +1908,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.3.tgz", - "integrity": "sha512-aw8901rjkVBK5mbq5oV32IqkJg+CQa6aULNlN8zyCWSsePzEG3kpDkAFkkTOh3eJ0p95KbkLyWBzslQKamXsLA==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.25.tgz", + "integrity": "sha512-QiGGBUSakt8S1H4Lt9Ehsh6Ja87axiBnQQgysOObvCbI7iUfJnRGntF1P64S4/ijuHFnSB8KLsEddkY3nN26uw==", "cpu": [ "x64" ], @@ -1316,9 +1925,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.3.tgz", - "integrity": "sha512-YbdaYjyHa4fPK4GR4k2XgXV0p8vbU1SZh7vv6El4bl9N+ZSiMfbmqCuCuNU1Z4ebJMumafaz6UCC2zaJCsdzjw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.25.tgz", + "integrity": "sha512-ehLos/66zo0d/mJCU5u96a/VDcr01aaUrX0o/i16UdInxz8qPTCDSxGtjk/Lps1sIr1RJFdiX3hxc0fxJo+cPA==", "cpu": [ "arm64" ], @@ -1333,9 +1942,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.3.tgz", - "integrity": "sha512-qgH/aRj2xcr4BouwKG3XdqNu33SDadqbkqB6KaZZkozar857upxKakbRllpqZgWl/NDeSCBYPmUAZPBHZpbA0w==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.25.tgz", + "integrity": "sha512-ZVMrqLiJ7DiChgmbkQwFtdhAnUkSH/4p7tB29QY+giATb0Q/XGHNRSKAb/B8XGDHRUaA67NepOW5W8u3ZRJBAA==", "cpu": [ "arm64" ], @@ -1350,9 +1959,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.3.tgz", - "integrity": "sha512-uzafnTFwZCPN499fNVnS2xFME8WLC9y7PLRs/yqz5lz1X/ySoxfaK2Hbz74zYUdEg+iDZPd8KlsWaw9HKkLEVw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.25.tgz", + "integrity": "sha512-UOewtDGkTMJTiODrEdeLZ50yGb59xCZSriNpXkfPMxRRgwDkGc7i8mLWqV5076wEdb+Ca/XN7MhJyM3CupyNyQ==", "cpu": [ "x64" ], @@ -1367,9 +1976,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.3.tgz", - "integrity": "sha512-el6GUFi4SiDYnMTTlJJFMU+GHvw0UIFnffP1qhurrN1qJV3BqaSRUjkDUgVV44T6zpw1Lc6u+yn0puDKHs+Sbw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.25.tgz", + "integrity": "sha512-UBHwA8AhkCZgtRfU1aJpunuAJe/6gZv6jDESQe4p5MjTb5V0YEeJBWCdNqx15Vj3x+5jmauRfeMJSjfQj9HGFQ==", "cpu": [ "x64" ], @@ -1384,9 +1993,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.3.tgz", - "integrity": "sha512-6RxKjvnvVMM89giYGI1qye9ODsBQpHSHVo8vqA8xGhmRPZHDQUE4jcDbhBwK0GnFMqBnu+XMg3nYukNkmLOLWw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.25.tgz", + "integrity": "sha512-QcFcPRr16djk5IqK5+e8O80eZfgWzIvVBXfitIq0tQ/uc+eyfdoZ0NmKc0cnbIJyfVwREapKuG97YcxWA9gcpA==", "cpu": [ "arm64" ], @@ -1401,9 +2010,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.3.tgz", - "integrity": "sha512-VId/f5blObG7IodwC5Grf+aYP0O8Saz1/aeU3YcWqNdIUAmFQY3VEPKPaIzfv32F/clvanOb2K2BR5DtDs6XyQ==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.25.tgz", + "integrity": "sha512-zREeykps3ndWr9egJgvJKqVkkDuaw6Zrrg23cYBos0ygydFkAWYU4+PaPVwXzP1eAYQJe53ShSK45iDM529BOg==", "cpu": [ "x64" ], @@ -1487,33 +2096,31 @@ } }, "node_modules/@react-three/fiber": { - "version": "8.17.10", - "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-8.17.10.tgz", - "integrity": "sha512-S6bqa4DqUooEkInYv/W+Jklv2zjSYCXAhm6qKpAQyOXhTEt5gBXnA7W6aoJ0bjmp9pAeaSj/AZUoz1HCSof/uA==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-9.7.0.tgz", + "integrity": "sha512-EWm9FwcaOZQu/ExFW5rggoCMM1NJet5YbxVxKaOE+KSncrjU0Wx7017qSyGFvupviK89nMYGCWU3BIK4dI1clw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.17.8", - "@types/debounce": "^1.2.1", - "@types/react-reconciler": "^0.26.7", "@types/webxr": "*", "base64-js": "^1.5.1", "buffer": "^6.0.3", - "debounce": "^1.2.1", - "its-fine": "^1.0.6", - "react-reconciler": "^0.27.0", - "scheduler": "^0.21.0", + "its-fine": "^2.0.0", + "react-use-measure": "^2.1.7", + "scheduler": "^0.27.0", "suspend-react": "^0.1.3", - "zustand": "^3.7.1" + "use-sync-external-store": "^1.4.0", + "zustand": "^5.0.3" }, "peerDependencies": { "expo": ">=43.0", "expo-asset": ">=8.4", "expo-file-system": ">=11.0", "expo-gl": ">=11.0", - "react": ">=18.0", - "react-dom": ">=18.0", - "react-native": ">=0.64", - "three": ">=0.133" + "react": ">=19 <19.3", + "react-dom": ">=19 <19.3", + "react-native": ">=0.78", + "three": ">=0.156" }, "peerDependenciesMeta": { "expo": { @@ -1536,30 +2143,11 @@ } } }, - "node_modules/@react-three/fiber/node_modules/react-reconciler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.27.0.tgz", - "integrity": "sha512-HmMDKciQjYmBRGuuhIaKA1ba/7a+UsM5FzOZsMO2JYHt9Jh8reCb7j1eDC95NOyUlKM9KRyvdx0flBuDvYSBoA==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.21.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "react": "^18.0.0" - } - }, "node_modules/@react-three/fiber/node_modules/scheduler": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.21.0.tgz", - "integrity": "sha512-1r87x5fz9MXqswA2ERLo0EbOAU74DpIUO090gIasYTqlVoJeMcl+Z1Rg7WHz+qtPujhS/hGIt9kxZOYBV3faRQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" }, "node_modules/@rtsao/scc": { "version": "1.1.0", @@ -1575,13 +2163,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/@swc/helpers": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", @@ -2252,12 +2833,6 @@ "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", "license": "MIT" }, - "node_modules/@types/debounce": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", - "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", - "license": "MIT" - }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -2321,11 +2896,11 @@ } }, "node_modules/@types/react-reconciler": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.26.7.tgz", - "integrity": "sha512-mBDYl8x+oyPX/VBb3E638N0B7xG+SPk/EAMcVPeexqus/5aTpTphQi0curhhshOqRrc9t6OPoJfEUkbymse/lQ==", + "version": "0.28.9", + "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz", + "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==", "license": "MIT", - "dependencies": { + "peerDependencies": { "@types/react": "*" } }, @@ -2505,9 +3080,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -2545,13 +3120,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -2658,9 +3233,9 @@ } }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", "dev": true, "license": "MIT", "bin": { @@ -2681,9 +3256,9 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -3057,6 +3632,19 @@ ], "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz", + "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -3071,9 +3659,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -3095,9 +3683,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", - "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", + "version": "4.28.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz", + "integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==", "dev": true, "funding": [ { @@ -3115,10 +3703,11 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "baseline-browser-mapping": "^2.11.20", + "caniuse-lite": "^1.0.30001810", + "electron-to-chromium": "^1.5.420", + "node-releases": "^2.0.54", + "update-browserslist-db": "^1.3.2" }, "bin": { "browserslist": "cli.js" @@ -3151,18 +3740,6 @@ "ieee754": "^1.2.1" } }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -3232,9 +3809,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001690", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", - "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "version": "1.0.30001810", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", + "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", "dev": true, "funding": [ { @@ -3323,21 +3900,6 @@ "node": ">=6" } }, - "node_modules/color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3358,18 +3920,6 @@ "dev": true, "license": "MIT" }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -3410,9 +3960,9 @@ } }, "node_modules/cosmiconfig/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", "license": "ISC", "engines": { "node": ">= 6" @@ -3671,12 +4221,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "license": "MIT" - }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", @@ -3744,9 +4288,9 @@ } }, "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "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", "optional": true, @@ -3814,9 +4358,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.76", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz", - "integrity": "sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==", + "version": "1.5.425", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.425.tgz", + "integrity": "sha512-QvPtl41EUOnuT1HBvMKgxXRIaHNcagBPs50u7VULzhZXaGfqTbZyE16LQsctZ/RQHlGu+FOWeDTR4mY6YbeF1g==", "dev": true, "license": "ISC" }, @@ -4027,6 +4571,48 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -4050,32 +4636,33 @@ } }, "node_modules/eslint": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", - "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "version": "9.39.5", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.5.tgz", + "integrity": "sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.19.0", - "@eslint/core": "^0.9.0", - "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.17.0", - "@eslint/plugin-kit": "^0.2.3", + "@eslint/config-array": "^0.21.2", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.6", + "@eslint/js": "9.39.5", + "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.1", + "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", + "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4087,7 +4674,7 @@ "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", + "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -4110,13 +4697,13 @@ } }, "node_modules/eslint-config-next": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.1.3.tgz", - "integrity": "sha512-wGYlNuWnh4ujuKtZvH+7B2Z2vy9nONZE6ztd+DKF7hAsIabkrxmD4TzYHzASHENo42lmz2tnT2B+zN2sOHvpJg==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-15.5.25.tgz", + "integrity": "sha512-hB1oClZzRO3vMAeMmBMch0FHNJ4irH74LvQWDEMHkJtG/Us9+SAsg1f5Pvcw9jz4tc8wSGnvbmF050BRAAIbBg==", "dev": true, "license": "MIT", "dependencies": { - "@next/eslint-plugin-next": "15.1.3", + "@next/eslint-plugin-next": "15.5.25", "@rushstack/eslint-patch": "^1.10.3", "@typescript-eslint/eslint-plugin": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0", @@ -4412,9 +4999,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4429,9 +5016,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4442,15 +5029,15 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4588,9 +5175,9 @@ } }, "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", "dev": true, "license": "MIT" }, @@ -4658,9 +5245,9 @@ } }, "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", "dev": true, "license": "ISC" }, @@ -4858,9 +5445,10 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -4892,9 +5480,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -4902,13 +5490,13 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -5198,14 +5786,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true, - "license": "MIT", - "optional": true - }, "node_modules/is-async-function": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.0.tgz", @@ -5630,24 +6210,15 @@ } }, "node_modules/its-fine": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-1.2.5.tgz", - "integrity": "sha512-fXtDA0X0t0eBYAGLVM5YsgJGsJ5jEmqZEPrGbzdf5awjv0xE7nqv3TVnvtUF060Tkes15DbDAKW/I48vsb6SyA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-2.0.0.tgz", + "integrity": "sha512-KLViCmWx94zOvpLwSlsx6yOCeMhZYaxrJV87Po5k/FoZzcPSahvK5qJ7fYhS61sZi5ikmh2S3Hz55A2l3U69ng==", "license": "MIT", "dependencies": { - "@types/react-reconciler": "^0.28.0" + "@types/react-reconciler": "^0.28.9" }, "peerDependencies": { - "react": ">=18.0" - } - }, - "node_modules/its-fine/node_modules/@types/react-reconciler": { - "version": "0.28.9", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz", - "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" + "react": "^19.0.0" } }, "node_modules/jackspeak": { @@ -5683,10 +6254,20 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "license": "MIT", "dependencies": { "argparse": "^2.0.1" @@ -5852,9 +6433,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/lodash.merge": { @@ -5934,9 +6515,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -6000,9 +6581,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", - "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "funding": [ { "type": "github", @@ -6025,16 +6606,14 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.1.3", - "resolved": "https://registry.npmjs.org/next/-/next-15.1.3.tgz", - "integrity": "sha512-5igmb8N8AEhWDYzogcJvtcRDU6n4cMGtBklxKD4biYv4LXN8+awc/bbQ2IM2NQHdVPgJ6XumYXfo3hBtErg1DA==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/next/-/next-15.5.25.tgz", + "integrity": "sha512-OMWNulIIqKM2ykvC2qMjIt0IoavB4UB2SCs4iXJ6z6847FvyH8jBmBWcvrF5iuhTu8Przh20Fo/aoszIdqx4PA==", "dev": true, "license": "MIT", "dependencies": { - "@next/env": "15.1.3", - "@swc/counter": "0.1.3", + "@next/env": "15.5.25", "@swc/helpers": "0.5.15", - "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" @@ -6046,19 +6625,19 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.1.3", - "@next/swc-darwin-x64": "15.1.3", - "@next/swc-linux-arm64-gnu": "15.1.3", - "@next/swc-linux-arm64-musl": "15.1.3", - "@next/swc-linux-x64-gnu": "15.1.3", - "@next/swc-linux-x64-musl": "15.1.3", - "@next/swc-win32-arm64-msvc": "15.1.3", - "@next/swc-win32-x64-msvc": "15.1.3", - "sharp": "^0.33.5" + "@next/swc-darwin-arm64": "15.5.25", + "@next/swc-darwin-x64": "15.5.25", + "@next/swc-linux-arm64-gnu": "15.5.25", + "@next/swc-linux-arm64-musl": "15.5.25", + "@next/swc-linux-x64-gnu": "15.5.25", + "@next/swc-linux-x64-musl": "15.5.25", + "@next/swc-win32-arm64-msvc": "15.5.25", + "@next/swc-win32-x64-msvc": "15.5.25", + "sharp": "^0.34.3 || ^0.35.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.41.2", + "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", @@ -6079,42 +6658,16 @@ } } }, - "node_modules/next/node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "node_modules/node-releases": { + "version": "2.0.55", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.55.tgz", + "integrity": "sha512-mIrE/Cw9y+9Au6dS5vDKDhQza9YvG6w+ZrS6X+ZzA7yFW/soAeaups4Qzn1bL6g5FVy8WtP79+0j82oPIbqRjQ==", "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.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=18" } }, - "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", - "dev": true, - "license": "MIT" - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6442,9 +6995,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -6485,9 +7038,9 @@ } }, "node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "version": "8.5.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", + "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", "funding": [ { "type": "opencollective", @@ -6504,7 +7057,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", + "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -6612,9 +7165,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz", + "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6642,6 +7195,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -6685,9 +7254,9 @@ "license": "MIT" }, "node_modules/react": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", - "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "version": "19.0.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.8.tgz", + "integrity": "sha512-0AdV74MDFG2T5TolFNYvgSqhbH26yUAe2yUErKArC8ehNHb84bwXE0dS68EvEJNBt01eSVNdhL0U6N60JKrFjw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6709,15 +7278,15 @@ } }, "node_modules/react-dom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", - "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "version": "19.0.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.8.tgz", + "integrity": "sha512-AZ38kyYRWwwY2gSC/8+nnvdaNUH00hPbfpLvDjNxCM7Oslu3wRr0+5ChQCvfABdcKaSIYPECDNEOytbCAU8DjQ==", "license": "MIT", "dependencies": { "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "^19.0.0" + "react": "^19.0.8" } }, "node_modules/react-icons": { @@ -6794,6 +7363,21 @@ "react": ">=16" } }, + "node_modules/react-use-measure": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz", + "integrity": "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.13", + "react-dom": ">=16.13" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -6878,12 +7462,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, "node_modules/regexp.prototype.flags": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", @@ -7068,9 +7646,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -7130,44 +7708,54 @@ } }, "node_modules/sharp": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", - "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "version": "0.35.4", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.4.tgz", + "integrity": "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==", "dev": true, - "hasInstallScript": true, "license": "Apache-2.0", "optional": true, "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.3", - "semver": "^7.6.3" + "@img/colour": "^1.1.0", + "detect-libc": "^2.1.2", + "semver": "^7.8.5" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.33.5", - "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.4", - "@img/sharp-libvips-darwin-x64": "1.0.4", - "@img/sharp-libvips-linux-arm": "1.0.5", - "@img/sharp-libvips-linux-arm64": "1.0.4", - "@img/sharp-libvips-linux-s390x": "1.0.4", - "@img/sharp-libvips-linux-x64": "1.0.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", - "@img/sharp-libvips-linuxmusl-x64": "1.0.4", - "@img/sharp-linux-arm": "0.33.5", - "@img/sharp-linux-arm64": "0.33.5", - "@img/sharp-linux-s390x": "0.33.5", - "@img/sharp-linux-x64": "0.33.5", - "@img/sharp-linuxmusl-arm64": "0.33.5", - "@img/sharp-linuxmusl-x64": "0.33.5", - "@img/sharp-wasm32": "0.33.5", - "@img/sharp-win32-ia32": "0.33.5", - "@img/sharp-win32-x64": "0.33.5" + "@img/sharp-darwin-arm64": "0.35.4", + "@img/sharp-darwin-x64": "0.35.4", + "@img/sharp-freebsd-wasm32": "0.35.4", + "@img/sharp-libvips-darwin-arm64": "1.3.3", + "@img/sharp-libvips-darwin-x64": "1.3.3", + "@img/sharp-libvips-linux-arm": "1.3.3", + "@img/sharp-libvips-linux-arm64": "1.3.3", + "@img/sharp-libvips-linux-ppc64": "1.3.3", + "@img/sharp-libvips-linux-riscv64": "1.3.3", + "@img/sharp-libvips-linux-s390x": "1.3.3", + "@img/sharp-libvips-linux-x64": "1.3.3", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", + "@img/sharp-libvips-linuxmusl-x64": "1.3.3", + "@img/sharp-linux-arm": "0.35.4", + "@img/sharp-linux-arm64": "0.35.4", + "@img/sharp-linux-ppc64": "0.35.4", + "@img/sharp-linux-riscv64": "0.35.4", + "@img/sharp-linux-s390x": "0.35.4", + "@img/sharp-linux-x64": "0.35.4", + "@img/sharp-linuxmusl-arm64": "0.35.4", + "@img/sharp-linuxmusl-x64": "0.35.4", + "@img/sharp-webcontainers-wasm32": "0.35.4", + "@img/sharp-win32-arm64": "0.35.4", + "@img/sharp-win32-ia32": "0.35.4", + "@img/sharp-win32-x64": "0.35.4" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/shebang-command": { @@ -7282,17 +7870,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -7318,15 +7895,6 @@ "dev": true, "license": "MIT" }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -7897,6 +8465,25 @@ "hasInstallScript": true, "license": "MIT" }, + "node_modules/tsx": { + "version": "4.23.13", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.13.tgz", + "integrity": "sha512-BL5MGkRln6aDYhb0xbQlEAGw743BaZYWdbWtdJOBriYJboKgUUYCadFp2/FpBBZquBC/ezNBn7wMMPx7FDZUDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/tween-functions": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz", @@ -8035,9 +8622,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz", + "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==", "dev": true, "funding": [ { @@ -8056,7 +8643,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -8075,6 +8662,15 @@ "punycode": "^2.1.0" } }, + "node_modules/use-sync-external-store": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.7.0.tgz", + "integrity": "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -8314,16 +8910,19 @@ } }, "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yocto-queue": { @@ -8355,19 +8954,31 @@ } }, "node_modules/zustand": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz", - "integrity": "sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.15.tgz", + "integrity": "sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A==", "license": "MIT", "engines": { - "node": ">=12.7.0" + "node": ">=12.20.0" }, "peerDependencies": { - "react": ">=16.8" + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" }, "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, "react": { "optional": true + }, + "use-sync-external-store": { + "optional": true } } } diff --git a/package.json b/package.json index 7b786fa..849f1a1 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,19 @@ "dev": "next dev --turbopack", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "eslint .", + "typecheck": "tsc --noEmit", + "test": "tsx --test --test-concurrency=1 tests/*.test.ts", + "format": "prettier --write .", + "format:check": "prettier --check .", + "build:static": "node scripts/export.mjs" }, "dependencies": { "@apollo/client": "^3.12.5", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", "@mui/material": "^6.3.1", - "@react-three/fiber": "^8.17.10", + "@react-three/fiber": "^9.7.0", "animejs": "^3.2.2", "daisyui": "^4.12.23", "framer-motion": "^11.17.0", @@ -36,17 +41,30 @@ "@types/three": "^0.171.0", "autoprefixer": "^10.4.20", "eslint": "^9", - "eslint-config-next": "15.1.3", - "next": "^15.1.3", - "postcss": "^8.4.49", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "eslint-config-next": "^15.5.25", + "next": "^15.5.25", + "postcss": "^8.5.23", + "prettier": "^3.9.6", + "react": "19.0", + "react-dom": "19.0", "tailwindcss": "^3.4.17", + "tsx": "^4.23.13", "typescript": "^5.7.2" }, - "description": "This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).", - "main": "postcss.config.js", - "keywords": [], - "author": "", + "overrides": { + "postcss": "$postcss" + }, + "engines": { + "node": ">=22.12.0" + }, + "description": "Graphite: a cinematic Reboot01 learning dashboard powered by Next.js, Apollo GraphQL, and accessible data visualizations.", + "keywords": [ + "graphql", + "reboot01", + "nextjs", + "learning-analytics", + "dashboard" + ], + "author": "hujaafar", "license": "ISC" } diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 33ad091..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/postcss.config.mjs b/postcss.config.mjs index 1a69fd2..2ef30fc 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -2,6 +2,7 @@ const config = { plugins: { tailwindcss: {}, + autoprefixer: {}, }, }; diff --git a/public/file.svg b/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/globe.svg b/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/graphite-orbit.webp b/public/images/graphite-orbit.webp new file mode 100644 index 0000000..337aa63 Binary files /dev/null and b/public/images/graphite-orbit.webp differ diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/window.svg b/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/scripts/export.mjs b/scripts/export.mjs new file mode 100644 index 0000000..86da62f --- /dev/null +++ b/scripts/export.mjs @@ -0,0 +1,9 @@ +import { spawnSync } from "node:child_process"; + +// Keep the regular Next.js/Vercel build available alongside the portable static build. +const result = spawnSync(process.execPath, ["node_modules/next/dist/bin/next", "build"], { + stdio: "inherit", + env: { ...process.env, GRAPHITE_STATIC_EXPORT: "1" }, +}); +if (result.error) console.error(result.error.message); +process.exit(result.status ?? 1); diff --git a/src/app/demo/page.tsx b/src/app/demo/page.tsx new file mode 100644 index 0000000..c159e6d --- /dev/null +++ b/src/app/demo/page.tsx @@ -0,0 +1,7 @@ +import type { Metadata } from "next"; +import { Dashboard } from "@/components/Dashboard"; +import { demoData, DEMO_DATE } from "@/lib/demo-data"; +export const metadata: Metadata = { title: "Sample workspace" }; +export default function DemoPage() { + return ; +} diff --git a/src/app/error.tsx b/src/app/error.tsx new file mode 100644 index 0000000..fa094a0 --- /dev/null +++ b/src/app/error.tsx @@ -0,0 +1,12 @@ +"use client"; +export default function ErrorPage({ reset }: { reset: () => void }) { + return ( +
+

Something interrupted your workspace.

+

Your Reboot01 data has not been changed.

+ +
+ ); +} diff --git a/src/app/favicon.ico b/src/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/src/app/favicon.ico and /dev/null differ diff --git a/src/app/globals.css b/src/app/globals.css index 70831f2..d69f97b 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,21 +1,2423 @@ -@keyframes orbPulse { - 0% { - transform: scale(1); - opacity: 0.7; +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + color-scheme: dark; + --background: #111213; + --surface: #191a1c; + --surface-raised: #202124; + --foreground: #f3f2ec; + --muted: #a7a8ad; + --line: #303135; + --amber: #f6b85e; + --amber-soft: #35291b; + --green: #9fceb0; + --red: #f4a39b; + --sidebar: 228px; + --radius: 14px; +} +* { + box-sizing: border-box; +} +html { + scroll-behavior: smooth; + scroll-padding-top: 100px; +} +body { + margin: 0; + background: var(--background); + color: var(--foreground); + font-family: Arial, Helvetica, sans-serif; + font-size: 16px; + line-height: 1.5; + -webkit-font-smoothing: antialiased; +} +button, +input, +select { + font: inherit; +} +button, +a, +input, +select { + -webkit-tap-highlight-color: transparent; +} +button, +a { + touch-action: manipulation; +} +button { + cursor: pointer; +} +button:disabled { + cursor: wait; + opacity: 0.6; +} +a { + color: inherit; + text-decoration: none; +} +img { + display: block; + max-width: 100%; +} +h1, +h2, +h3, +p { + margin: 0; +} +button:focus-visible, +a:focus-visible, +input:focus-visible, +select:focus-visible, +summary:focus-visible { + outline: 2px solid var(--amber); + outline-offset: 5px; +} +::selection { + background: var(--amber); + color: #17130e; +} +.skip-link { + position: fixed; + left: 16px; + top: -100px; + z-index: 100; + background: var(--amber); + color: #17130e; + padding: 12px 20px; +} +.skip-link:focus { + top: 16px; +} +.brand { + display: inline-flex; + align-items: center; + gap: 10px; + font-size: 27px; + letter-spacing: -1.2px; + font-weight: 700; + line-height: 1; +} +.brand-symbol { + display: grid; + place-items: center; + width: 35px; + height: 35px; + border-radius: 9px; + color: #211b12; + background: var(--amber); + transform: rotate(-5deg); +} +.brand-symbol svg { + transform: rotate(5deg); +} +.brand-dot { + color: var(--amber); +} +.eyebrow { + font-size: 12px; + letter-spacing: 0.16em; + font-weight: 600; + display: flex; + gap: 10px; + align-items: center; +} +.status-dot { + width: 6px; + height: 6px; + display: inline-block; + border-radius: 50%; + background: var(--amber); +} +.muted { + color: var(--muted); +} +.outline-label { + font-size: 12px; + letter-spacing: 0.09em; + border: 1px solid var(--line); + border-radius: 5px; + padding: 5px 8px; +} +.button { + min-height: 50px; + display: inline-flex; + align-items: center; + justify-content: space-between; + gap: 20px; + padding: 13px 19px; + border-radius: 8px; + font-size: 14px; + font-weight: 600; + transition: + background 0.2s, + transform 0.2s; + border: 1px solid transparent; +} +.button:hover { + transform: translateY(-2px); +} +.button-primary { + background: var(--amber); + color: #1f190f; +} +.button-primary:hover { + background: #ffcb81; +} +.button-secondary { + background: transparent; + color: var(--foreground); + border-color: #424348; +} +.button-secondary:hover { + background: var(--surface-raised); +} +.icon-button { + border: 0; + background: transparent; + color: var(--muted); + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 40px; + min-height: 40px; + border-radius: 7px; +} +.icon-button:hover { + color: var(--foreground); + background: #ffffff08; +} +.spin { + animation: spin 1.2s linear infinite; +} +@keyframes spin { + to { + transform: rotate(360deg); + } +} +.login-page { + min-height: 100svh; + display: grid; + grid-template-columns: 1.05fr 1fr; +} +.login-editorial { + position: relative; + min-height: 850px; + display: flex; + flex-direction: column; + justify-content: space-between; + isolation: isolate; + overflow: hidden; + background: #18191a; + border-right: 1px solid var(--line); +} +.login-art { + position: absolute; + inset: 0; + z-index: -2; + background-image: + linear-gradient(180deg, #10111215, #10111220 30%, #101112c9 68%, #101112f0), + url("/images/graphite-orbit.webp"); + background-size: cover; + background-position: 66% center; +} +.editorial-top, +.editorial-bottom { + display: flex; + align-items: center; + justify-content: space-between; + padding: 42px; +} +.editorial-top > .eyebrow { + color: #c0c0ba; + font-size: 12px; +} +.editorial-copy { + padding: 200px 42px 55px; + margin-top: auto; +} +.editorial-copy > .eyebrow { + margin-bottom: 25px; + color: var(--amber); +} +.editorial-copy h1 { + font-size: clamp(46px, 4.5vw, 78px); + line-height: 1.05; + font-weight: 500; + letter-spacing: -0.065em; +} +.editorial-copy h1 em { + font-family: Georgia, serif; + font-weight: 400; + color: var(--amber); + letter-spacing: -0.06em; +} +.editorial-copy > p { + margin-top: 26px; + line-height: 1.75; + color: #c4c5c5; + font-size: 15px; +} +.editorial-bottom { + border-top: 1px solid #ffffff16; + margin: 0 42px; + padding: 23px 0; + font-size: 12px; + letter-spacing: 0.12em; + color: #aeb0af; +} +.editorial-bottom svg { + color: var(--amber); +} +.login-panel { + display: flex; + flex-direction: column; + padding: 40px 42px 27px; + min-width: 0; +} +.login-panel-top { + display: flex; + align-items: center; + justify-content: space-between; + gap: 15px; + color: var(--muted); + font-size: 12px; +} +.login-form-wrap { + width: 100%; + max-width: 380px; + margin: auto; + padding: 60px 0; +} +.login-icon { + height: 52px; + width: 52px; + display: grid; + place-items: center; + border: 1px solid var(--line); + border-radius: 13px; + margin-bottom: 30px; + color: var(--amber); +} +.login-form-wrap > .eyebrow { + color: var(--amber); + margin-bottom: 16px; +} +.login-form-wrap h2 { + font-size: 42px; + letter-spacing: -0.045em; + line-height: 1.15; + font-weight: 500; +} +.login-form-wrap > .muted { + margin-top: 16px; + font-size: 15px; +} +.login-form { + display: flex; + flex-direction: column; + margin-top: 33px; + gap: 10px; +} +.login-form label { + font-size: 14px; + margin-top: 9px; +} +.login-form input { + width: 100%; + background: #1b1c1e; + border: 1px solid #3b3c40; + border-radius: 7px; + padding: 14px; + color: var(--foreground); + font-size: 14px; + min-height: 50px; +} +.login-form input::placeholder { + color: #85878f; +} +.password-field { + position: relative; +} +.password-field input { + padding-right: 48px; +} +.password-field .icon-button { + position: absolute; + right: 4px; + top: 5px; +} +.login-form > .button { + margin-top: 14px; +} +.form-error { + color: var(--red); + background: #4b211a44; + border: 1px solid #85473e; + padding: 12px; + border-radius: 7px; + font-size: 14px; +} +.login-security { + display: flex; + justify-content: center; + align-items: center; + gap: 8px; + font-size: 12px; + color: #a4a6ab; + margin-top: 17px; +} +.login-divider { + display: flex; + align-items: center; + gap: 15px; + color: #93959c; + font-size: 12px; + letter-spacing: 0.12em; + margin: 32px 0 21px; +} +.login-divider:before, +.login-divider:after { + content: ""; + height: 1px; + background: var(--line); + flex: 1; +} +.login-form-wrap > .button { + width: 100%; +} +.demo-note { + color: #93959c; + text-align: center; + font-size: 12px; + margin-top: 11px; +} +.login-footer { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 18px; + color: #92949b; + font-size: 12px; +} +.login-footer span, +.login-footer a { + display: flex; + align-items: center; + gap: 7px; +} +@media (min-width: 1700px) { + .login-page { + max-width: 1920px; + margin: auto; + border: 1px solid var(--line); + } +} +@media (max-width: 1050px) { + .login-panel { + padding: 30px; + } + .editorial-top, + .editorial-copy { + padding-left: 30px; + padding-right: 30px; } - 100% { - transform: scale(1.2); - opacity: 1; + .editorial-top > .eyebrow { + display: none; + } + .editorial-bottom { + margin: 0 30px; + } + .login-panel-top > .outline-label { + display: none; } } - -@keyframes orbPulseReverse { - 0% { - transform: scale(1); - opacity: 0.7; - } - 100% { - transform: scale(1.2); - opacity: 1; +@media (max-width: 760px) { + .login-page { + display: block; + } + .login-editorial { + min-height: 360px; + border-right: 0; + border-bottom: 1px solid var(--line); + } + .editorial-top { + padding: 24px; + } + .editorial-copy { + padding: 55px 24px 30px; + } + .editorial-copy h1 { + font-size: 43px; + } + .editorial-copy > p, + .editorial-bottom { + display: none; + } + .login-art { + background-position: center 43%; + } + .login-panel { + padding: 25px; + } + .login-panel-top { + display: none; + } + .login-form-wrap { + padding: 15px 0 40px; + } + .login-icon { + display: none; + } + .login-form-wrap h2 { + font-size: 34px; + } + .login-form-wrap > .eyebrow { + margin-top: 10px; + } + .login-footer { + justify-content: center; + } + .login-security { + font-size: 12px; + } +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} +.tabular { + font-variant-numeric: tabular-nums; +} +.workspace { + min-height: 100vh; +} +.sidebar { + position: fixed; + inset: 0 auto 0 0; + width: var(--sidebar); + background: #151617; + border-right: 1px solid var(--line); + padding: 34px 20px 0; + display: flex; + flex-direction: column; + z-index: 30; +} +.sidebar > .brand { + margin: 0 7px 54px; +} +.nav-label { + color: #86888e; + font-size: 12px; + letter-spacing: 0.14em; + margin: 0 13px 15px; +} +.sidebar nav { + display: flex; + flex-direction: column; + gap: 7px; +} +.sidebar nav > a { + display: flex; + align-items: center; + gap: 13px; + min-height: 46px; + font-size: 14px; + padding: 11px 13px; + color: #a5a7ac; + border: 1px solid transparent; + border-radius: 7px; + transition: + background 0.2s, + color 0.2s; +} +.sidebar nav > a:hover { + background: #ffffff05; + color: var(--foreground); +} +.sidebar nav > a.active { + background: #f6b85e12; + color: var(--amber); + border-color: #f6b85e17; +} +.nav-count { + margin-left: auto; + font-size: 12px; + background: #ffffff08; + border: 1px solid #ffffff0d; + padding: 0 5px; + border-radius: 4px; +} +.sidebar-bottom { + margin-top: auto; +} +.sidebar-note { + border: 1px solid var(--line); + border-radius: 11px; + padding: 18px; + margin-bottom: 20px; + color: var(--amber); + background: linear-gradient(145deg, #2b261e, transparent 70%); +} +.sidebar-note p { + font-size: 13px; + margin-top: 15px; + color: var(--foreground); +} +.sidebar-note p > span { + font-size: 12px; + color: var(--muted); +} +.source-link { + display: flex; + gap: 9px; + align-items: center; + font-size: 12px; + color: var(--muted); + padding: 5px 8px 20px; +} +.source-link > svg:last-child { + margin-left: auto; +} +.sidebar-user { + border-top: 1px solid var(--line); + display: flex; + gap: 9px; + align-items: center; + padding: 21px 0; +} +.avatar { + flex-shrink: 0; + display: grid; + place-items: center; + width: 35px; + height: 35px; + border-radius: 50%; + background: #373026; + color: #f7c98c; + font-size: 13px; + font-weight: 600; + border: 1px solid #4a3d2b; +} +.sidebar-user > div { + min-width: 0; + flex: 1; +} +.sidebar-user strong { + display: block; + font-size: 12px; + font-weight: 500; + overflow: hidden; + text-overflow: ellipsis; +} +.sidebar-user div > span { + display: block; + color: var(--muted); + font-size: 12px; +} +.sidebar-user > .icon-button { + min-width: 28px; +} +.workspace-body { + margin-left: var(--sidebar); +} +.topbar { + position: sticky; + top: 0; + z-index: 20; + min-height: 77px; + background: #111213ee; + backdrop-filter: blur(18px); + border-bottom: 1px solid var(--line); + display: flex; + align-items: center; + justify-content: space-between; + gap: 20px; + padding: 16px 38px; +} +.breadcrumb { + font-size: 13px; + display: flex; + align-items: center; + gap: 16px; +} +.breadcrumb > span { + color: #86888e; +} +.breadcrumb > strong { + font-weight: 400; +} +.topbar-right { + display: flex; + align-items: center; + gap: 21px; +} +.connection-label { + display: flex; + align-items: center; + gap: 8px; + font-size: 12px; + color: #c0c1c5; +} +.connection-label .status-dot { + background: var(--green); + width: 5px; + height: 5px; +} +.topbar-date { + font-size: 12px; + color: var(--muted); + border-left: 1px solid var(--line); + padding-left: 20px; +} +.topbar-right > .icon-button { + min-width: 32px; + min-height: 32px; + border: 1px solid var(--line); +} +.dashboard-main { + max-width: 1580px; + margin: 0 auto; + padding: 28px 38px 0; +} +.demo-banner { + border: 1px solid #f6b85e26; + border-radius: 6px; + background: #f6b85e09; + font-size: 12px; + color: #c6b294; + padding: 10px 13px; + display: flex; + justify-content: space-between; + align-items: center; + gap: 15px; + margin-bottom: 23px; +} +.demo-banner > span, +.demo-banner > a { + display: flex; + align-items: center; + gap: 10px; +} +.demo-banner .outline-label { + font-size: 12px; + padding: 2px 5px; + border-color: #6a5030; + color: var(--amber); +} +.demo-banner > a { + color: var(--amber); + white-space: nowrap; +} +.section-topline { + display: flex; + align-items: center; + gap: 15px; + margin-bottom: 18px; + min-height: 25px; +} +.section-topline > .eyebrow { + font-size: 12px; + color: var(--muted); +} +.section-topline-note { + margin-left: auto; + font-size: 12px; + color: #8f9197; +} +.text-button { + display: inline-flex; + align-items: center; + gap: 7px; + background: none; + border: 0; + color: var(--muted); + font-size: 12px; +} +.text-button:hover { + color: var(--amber); +} +.journey-header { + position: relative; + min-height: 235px; + overflow: hidden; + border-radius: 12px; + border: 1px solid #464039; + background: #191a1b; + isolation: isolate; +} +.journey-image { + position: absolute; + inset: -45% -2% -40% 26%; + z-index: -2; + background: url("/images/graphite-orbit.webp") 75% center/cover no-repeat; + will-change: transform; +} +.journey-header:after { + position: absolute; + inset: 0; + content: ""; + z-index: -1; + background: linear-gradient(90deg, #181919 0%, #181919f5 23%, #181919a8 52%, #18191900 78%); +} +.journey-content { + position: relative; + padding: 30px 32px; +} +.journey-content > .eyebrow { + color: var(--amber); + font-size: 12px; + margin-bottom: 12px; +} +.journey-content h1 { + font-weight: 500; + font-size: clamp(27px, 3.1vw, 46px); + line-height: 1.17; + letter-spacing: -0.05em; + max-width: 78%; +} +.journey-content h1 em { + font-family: Georgia, serif; + font-weight: 400; + color: #f7c98c; +} +.journey-content > p { + color: #b5b5b5; + font-size: 14px; + margin-top: 12px; + max-width: 64%; +} +.journey-rank { + display: inline-flex; + gap: 10px; + align-items: center; + margin-top: 26px; + font-size: 12px; +} +.rank-mini { + display: grid; + place-items: center; + width: 33px; + height: 33px; + border-radius: 7px; + border: 1px solid #725330; + color: var(--amber); + background: #30261b; + font-size: 15px; +} +.rank-mini-label { + display: block; + font-size: 12px; + color: #a4a3a2; + margin-top: 2px; +} +.journey-index { + position: absolute; + right: 20px; + bottom: 17px; + font-size: 12px; + letter-spacing: 0.15em; + color: #dbccba; +} +.stat-grid { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 15px; + margin: 20px 0 23px; +} +.stat-card { + padding: 20px 21px; + background: var(--surface); + border: 1px solid var(--line); + border-radius: 10px; + min-width: 0; +} +.stat-card > div { + display: flex; + justify-content: space-between; + gap: 10px; + font-size: 12px; + color: #b2b3b8; +} +.stat-card > div > svg { + color: #86888e; +} +.stat-card > strong { + display: block; + font-size: 32px; + font-weight: 500; + letter-spacing: -0.04em; + margin: 10px 0 5px; + line-height: 1.1; + font-variant-numeric: tabular-nums; +} +.stat-card > p { + font-size: 12px; + color: #909299; + line-height: 1.4; +} +.stat-card.accent { + background: linear-gradient(115deg, #30281e, #1d1c1a); + border-color: #59432a; +} +.stat-card.accent > strong, +.stat-card.accent svg { + color: var(--amber); +} +.overview-grid { + display: grid; + grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); + gap: 23px; +} +.panel { + background: var(--surface); + border: 1px solid var(--line); + border-radius: var(--radius); + padding: 24px; + min-width: 0; +} +.panel-heading { + display: flex; + align-items: center; + justify-content: space-between; + gap: 17px; +} +.panel-kicker { + color: #9c9da4; + font-size: 12px; + letter-spacing: 0.13em; + margin-bottom: 7px; +} +.panel h2 { + font-size: 17px; + font-weight: 500; + letter-spacing: -0.025em; +} +.segmented { + display: flex; + gap: 3px; + background: #111213; + border: 1px solid #303135; + padding: 3px; + border-radius: 7px; + flex-shrink: 0; +} +.segmented > button { + background: none; + border: none; + border-radius: 4px; + min-width: 34px; + padding: 5px 9px; + color: #9c9da4; + font-size: 12px; + min-height: 28px; +} +.segmented > button[aria-pressed="true"] { + background: #303135; + color: #f4d9b4; +} +.segmented > button:hover { + color: var(--foreground); +} +.chart-summary { + display: flex; + align-items: baseline; + gap: 15px; + margin: 23px 0 4px; +} +.chart-summary > strong { + font-size: 27px; + font-weight: 500; + letter-spacing: -0.04em; +} +.chart-summary > span { + display: flex; + align-items: center; + gap: 4px; + font-size: 12px; + color: #b5a17f; +} +.area-chart { + height: 216px; + width: 100%; + min-width: 0; +} +.chart-footer { + display: flex; + justify-content: space-between; + align-items: flex-start; + font-size: 12px; + color: var(--muted); + padding-top: 19px; + gap: 10px; +} +.chart-footer > span { + display: flex; + align-items: center; + gap: 7px; + padding: 0 5px; +} +.legend-dot { + display: inline-block; + width: 6px; + height: 6px; + background: var(--amber); + border-radius: 50%; + flex-shrink: 0; +} +.legend-dot.pale { + background: #b8b6e7; +} +.chart-data { + position: relative; + z-index: 3; +} +.chart-data > summary { + cursor: pointer; + text-align: right; + color: #c5c5c5; +} +.chart-data[open] > table { + position: absolute; + top: 30px; + right: 0; + background: #232427; + box-shadow: 0 12px 50px #0009; + width: 300px; + max-width: 70vw; + padding: 10px; + border: 1px solid var(--line); + border-radius: 9px; + border-collapse: separate; +} +.chart-data td, +.chart-data th { + font-size: 12px; + padding: 8px; + text-align: left; + white-space: nowrap; +} +.chart-data caption { + background: #232427; + text-align: left; + padding: 10px 15px; + font-size: 12px; +} +.breakdown-total { + font-size: 35px; + font-weight: 500; + letter-spacing: -0.04em; + margin-top: 27px; +} +.breakdown-total > span { + display: block; + font-size: 12px; + letter-spacing: 0.1em; + color: #8e9097; + margin-top: 5px; +} +.stacked-bar { + display: flex; + gap: 4px; + height: 7px; + overflow: hidden; + border-radius: 5px; + margin: 23px 0; +} +.stacked-bar > span { + background: var(--amber); + border-radius: 2px; +} +.stacked-bar > span:nth-child(2) { + background: #b8b6e7; +} +.stacked-bar > span:nth-child(3) { + background: #849c92; +} +.breakdown-row, +.piscine-breakdown > div { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + font-size: 12px; + padding: 6px 0; +} +.breakdown-row > span { + display: flex; + align-items: center; + gap: 9px; + color: #b4b5ba; +} +.breakdown-row > strong, +.piscine-breakdown strong { + font-weight: 400; + font-variant-numeric: tabular-nums; +} +.piscine-breakdown { + border-top: 1px solid var(--line); + margin-top: 17px; + padding-top: 15px; +} +.piscine-breakdown > p { + font-size: 12px; + letter-spacing: 0.12em; + color: #8e9097; + margin-bottom: 9px; +} +.piscine-breakdown > div { + font-size: 12px; + color: #a7a8ad; + padding: 4px 0; +} +.dashboard-section { + padding-top: 43px; + scroll-margin-top: 75px; +} +.section-title { + margin-bottom: 20px; + display: flex; + align-items: center; + justify-content: space-between; + gap: 15px; +} +.section-title > div { + display: flex; + align-items: center; + gap: 13px; +} +.section-title h2 { + font-size: 23px; + letter-spacing: -0.04em; + font-weight: 500; +} +.section-number { + color: #8e7858; + border: 1px solid #504535; + border-radius: 5px; + min-width: 28px; + height: 27px; + display: grid; + place-items: center; + font-size: 12px; +} +.section-title > p { + color: #91939a; + font-size: 12px; +} +.skills-grid { + display: grid; + grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); + gap: 23px; +} +.skill-chart-wrap { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 15px; + align-items: center; +} +.radar-chart { + height: 260px; + min-width: 0; +} +.skill-list { + list-style: none; + margin: 0; + padding: 8px 0; +} +.skill-list > li { + display: grid; + grid-template-columns: minmax(58px, 1fr) 1.1fr 30px; + gap: 10px; + align-items: center; + font-size: 12px; + margin: 19px 0; +} +.skill-list > li > span { + text-transform: capitalize; + color: #c3c4c8; +} +.skill-list strong { + font-size: 12px; + color: #abadb3; + font-weight: 400; + text-align: right; +} +.skill-track { + height: 3px; + background: #333438; + border-radius: 2px; + overflow: hidden; +} +.skill-track > span { + height: 100%; + display: block; + background: #d4aa73; + border-radius: 2px; +} +.additional-skills { + border-top: 1px solid var(--line); + padding-top: 13px; + margin-top: 4px; +} +.additional-skills > summary { + font-size: 12px; + color: var(--muted); + cursor: pointer; + display: flex; + align-items: center; + justify-content: space-between; +} +.additional-skills > div { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 11px 25px; + margin-top: 20px; +} +.additional-skills > div > span { + display: flex; + justify-content: space-between; + font-size: 13px; + text-transform: capitalize; + color: var(--muted); +} +.additional-skills strong { + color: var(--amber); + font-weight: 400; +} +.level-panel { + background: linear-gradient(145deg, #2c2821, #1c1c1b); + border-color: #4a4031; + position: relative; + overflow: hidden; +} +.level-panel > .eyebrow { + font-size: 12px; + color: #b49b77; +} +.level-display { + display: flex; + align-items: baseline; + gap: 12px; + margin: 16px 0 8px; + color: var(--amber); +} +.level-display > span { + font-size: 12px; + letter-spacing: 0.1em; + writing-mode: vertical-rl; + transform: rotate(180deg); +} +.level-display > strong { + font-size: 73px; + line-height: 1; + font-weight: 400; + letter-spacing: -0.07em; +} +.level-display > svg { + align-self: center; + margin-left: auto; + color: #836d4e; + stroke-width: 1; +} +.level-panel > h2 { + margin-top: 16px; + font-size: 17px; +} +.level-panel > p { + font-size: 12px; + color: #b1aa9e; + line-height: 1.7; + margin-top: 9px; + max-width: 245px; +} +.level-progress { + height: 5px; + margin: 25px 0 9px; + border-radius: 3px; + background: #4a4031; + overflow: hidden; +} +.level-progress > span { + display: block; + height: 100%; + background: var(--amber); + border-radius: 3px; +} +.level-endpoints { + display: flex; + justify-content: space-between; + font-size: 12px; + color: #a59780; +} +.rank-footnote { + display: flex; + gap: 8px; + align-items: center; + margin-top: 23px; + border-top: 1px solid #534633; + padding-top: 15px; + font-size: 12px; + color: #b2a087; +} +.projects-panel { + padding: 0; + overflow: hidden; +} +.table-toolbar { + padding: 20px 24px; + display: flex; + justify-content: space-between; + gap: 15px; +} +.search-field { + display: flex; + align-items: center; + gap: 10px; + background: #131416; + border: 1px solid var(--line); + border-radius: 7px; + padding: 0 12px; + min-width: 0; + width: min(350px, 60%); + color: var(--muted); +} +.search-field > input { + background: transparent; + border: 0; + outline-offset: 3px; + color: var(--foreground); + font-size: 13px; + height: 41px; + min-width: 0; + width: 100%; +} +.search-field > svg { + flex-shrink: 0; +} +.search-field > .icon-button { + min-width: 20px; + min-height: 28px; +} +.select-field { + position: relative; + display: flex; + align-items: center; +} +.select-field select { + appearance: none; + background: #202124; + border: 1px solid var(--line); + border-radius: 7px; + color: #c7c8cd; + padding: 11px 34px 11px 13px; + font-size: 12px; +} +.select-field > svg { + position: absolute; + right: 11px; + pointer-events: none; + color: #b2b3b8; +} +.table-scroll { + overflow-x: auto; +} +.data-table { + width: 100%; + border-collapse: collapse; + text-align: left; + white-space: nowrap; +} +.data-table th { + color: #8e9097; + background: #161719; + font-size: 12px; + letter-spacing: 0.1em; + font-weight: 400; + padding: 12px 24px; + border-block: 1px solid var(--line); +} +.data-table td { + padding: 17px 24px; + font-size: 12px; + border-bottom: 1px solid #2b2c30; +} +.data-table tr:last-child td { + border-bottom: 0; +} +.data-table tr:hover td { + background: #ffffff02; +} +.project-name { + display: flex; + align-items: center; + gap: 11px; +} +.project-name strong { + text-transform: capitalize; + font-weight: 400; + color: #dadbe0; +} +.project-icon { + width: 31px; + height: 31px; + display: grid; + place-items: center; + border-radius: 7px; + color: #b8b1a7; + background: #292826; + border: 1px solid #3c3935; +} +.status-badge { + display: inline-flex; + align-items: center; + gap: 3px; + white-space: nowrap; + border-radius: 5px; + border: 1px solid #4b4938; + padding: 3px 7px; + font-size: 12px; + color: #dfcd9a; +} +.status-badge.passed { + background: #22322980; + border-color: #324b3b; + color: #a3cdae; +} +.status-badge.retry { + background: #44292480; + border-color: #64433e; + color: #e1a298; +} +.status-badge.pending { + background: #37312380; + border-color: #574c36; + color: #d9c498; +} +.xp-value { + color: #d7b17d; +} +.pagination { + display: flex; + align-items: center; + justify-content: space-between; + gap: 15px; + border-top: 1px solid var(--line); + padding: 15px 24px; + color: #95979e; + font-size: 12px; +} +.pagination > div { + display: flex; + gap: 8px; +} +.pagination button { + display: flex; + align-items: center; + gap: 8px; + border: 1px solid #3a3b3f; + border-radius: 5px; + background: transparent; + padding: 7px 10px; + font-size: 12px; + color: #c2c3c8; + min-height: 31px; +} +.pagination button:disabled { + cursor: default; + opacity: 0.4; +} +.pagination button:not(:disabled):hover { + background: var(--surface-raised); + color: var(--amber); +} +.empty-state { + min-height: 160px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 12px; + text-align: center; + padding: 25px; + color: var(--muted); + font-size: 14px; +} +.empty-state > strong { + font-weight: 500; + color: var(--foreground); +} +.empty-state > p { + font-size: 13px; +} +.audits-grid { + display: grid; + grid-template-columns: minmax(270px, 1fr) minmax(0, 1.8fr); + gap: 23px; +} +.audit-balance > .panel-heading > svg { + color: var(--muted); +} +.audit-ratio { + margin: 28px 0 0; + font-size: 60px; + font-weight: 400; + letter-spacing: -0.05em; + line-height: 1; + color: #e2dccf; +} +.audit-ratio > span { + display: block; + font-size: 12px; + letter-spacing: 0.12em; + margin-top: 12px; + color: #9e9d9b; +} +.audit-meter { + height: 7px; + background: #6b6688; + border-radius: 4px; + overflow: hidden; + margin: 26px 0 18px; +} +.audit-meter > span { + display: block; + height: 100%; + background: var(--amber); + border-right: 4px solid var(--surface); +} +.audit-amount { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 12px; + padding: 10px 0; +} +.audit-amount > span { + display: flex; + align-items: center; + gap: 8px; + color: #b8b9bc; +} +.audit-amount strong { + font-weight: 400; + color: #e1c8a4; +} +.audit-amount + .audit-amount strong { + color: #b6b1d9; +} +.audit-caption { + border-top: 1px solid var(--line); + padding-top: 19px; + margin-top: 13px; + color: #93959b; + font-size: 12px; +} +.audit-history { + padding: 23px 24px 0; +} +.audit-history > ul { + list-style: none; + padding: 0; + margin: 10px 0 0; +} +.audit-history li { + display: flex; + align-items: center; + gap: 13px; + padding: 17px 0; + border-bottom: 1px solid #2b2c30; +} +.audit-history li:last-child { + border-bottom: 0; +} +.audit-result { + width: 31px; + height: 31px; + display: grid; + place-items: center; + border-radius: 50%; + border: 1px solid #3c5043; + background: #23302880; + color: #a3cdae; + flex-shrink: 0; +} +.audit-result.failed { + color: #dca89c; + background: #34262580; + border-color: #59413b; +} +.audit-history li > div { + flex: 1; + min-width: 0; +} +.audit-history li > div > strong { + font-size: 12px; + font-weight: 400; + display: block; + overflow: hidden; + text-overflow: ellipsis; +} +.audit-history li > div > span { + font-size: 12px; + color: #8f9197; + display: block; + margin-top: 4px; +} +.audit-history > .pagination { + padding-inline: 0; +} +.account-panel { + padding: 28px; +} +.account-heading { + display: flex; + gap: 16px; + align-items: center; +} +.avatar.large { + width: 55px; + height: 55px; + font-size: 22px; +} +.account-heading h2 { + font-size: 20px; + margin-bottom: 4px; +} +.account-heading .muted { + font-size: 13px; + overflow-wrap: anywhere; +} +.account-id { + margin-left: auto; + font-size: 12px; + color: #92949a; +} +.account-details { + border-top: 1px solid var(--line); + margin-top: 23px; + padding-top: 17px; +} +.account-details > summary { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 13px; + color: var(--muted); + cursor: pointer; +} +.account-details > dl { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 22px; + margin: 25px 0 0; +} +.account-details dt { + color: #95979e; + font-size: 12px; + margin-bottom: 6px; +} +.account-details dd { + margin: 0; + font-size: 14px; + overflow-wrap: anywhere; +} +.dashboard-footer { + margin-top: 35px; + border-top: 1px solid var(--line); + padding: 25px 0; + display: flex; + align-items: center; + justify-content: space-between; + gap: 15px; + color: #898b92; + font-size: 12px; +} +.dashboard-footer .brand { + font-size: 19px; + color: #b6b7bc; +} +.dashboard-footer .brand-symbol { + width: 25px; + height: 25px; + border-radius: 6px; + opacity: 0.65; +} +.dashboard-footer .brand-symbol svg { + width: 16px; +} +.dashboard-footer > span { + display: flex; + align-items: center; + gap: 7px; +} +.route-state { + min-height: 100svh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + gap: 25px; + padding: 30px; +} +.route-state h1 { + font-size: clamp(25px, 4vw, 42px); + letter-spacing: -0.04em; + font-weight: 500; +} +.route-state > p { + color: var(--muted); + max-width: 480px; +} +.route-state > .brand { + margin-bottom: 30px; +} +.state-actions { + display: flex; + gap: 15px; +} +@supports (animation-timeline: view()) { + @keyframes section-arrive { + from { + opacity: 0.3; + transform: translateY(32px); + } + to { + opacity: 1; + transform: translateY(0); + } + } + .reveal-content { + animation: section-arrive linear both; + animation-timeline: view(); + animation-range: entry 0% entry 25%; + } +} +.motion-paused .reveal-content { + animation: none; +} +.motion-paused * { + scroll-behavior: auto !important; +} +.motion-paused .journey-image { + will-change: auto; +} +@media (min-width: 1700px) { + :root { + --sidebar: 248px; + } + .dashboard-main { + padding-top: 36px; + } + .journey-header { + min-height: 265px; + } + .journey-content { + padding: 36px 40px; + } + .journey-content h1 { + font-size: 48px; + } + .stat-card { + padding: 24px; + } + .stat-card > strong { + font-size: 37px; + } + .panel { + padding: 28px; + } + .projects-panel { + padding: 0; + } + .audit-history { + padding-bottom: 0; + } +} +@media (max-width: 1250px) { + :root { + --sidebar: 205px; + } + .sidebar { + padding-inline: 14px; + } + .topbar { + padding-inline: 25px; + } + .dashboard-main { + padding-inline: 25px; + } + .stat-card { + padding: 17px; + } + .stat-card > strong { + font-size: 28px; + } + .stat-card > div { + font-size: 12px; + } + .stat-card > p { + font-size: 12px; + } + .overview-grid, + .skills-grid { + grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr); + gap: 17px; + } + .audits-grid { + grid-template-columns: minmax(240px, 1fr) minmax(0, 1.65fr); + gap: 17px; + } + .panel { + padding: 20px; + } + .projects-panel { + padding: 0; + } + .audit-history { + padding-bottom: 0; + } + .panel h2 { + font-size: 16px; + } + .section-title > p { + font-size: 12px; + max-width: 210px; + text-align: right; + } + .skill-chart-wrap { + grid-template-columns: 1fr; + } + .radar-chart { + height: 245px; + } + .skill-list { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 20px; + padding: 0; + } + .skill-list > li { + grid-template-columns: 1fr 27px; + gap: 7px; + margin: 7px 0; + } + .skill-track { + display: none; + } + .level-panel { + display: flex; + flex-direction: column; + } + .level-display { + margin-top: 30px; + } + .rank-footnote { + margin-top: auto; + padding-top: 17px; + } + .level-endpoints { + margin-bottom: 23px; + } + .data-table th, + .data-table td { + padding-inline: 18px; + } + .audit-history .panel-heading { + flex-wrap: wrap; + gap: 13px; + } + .audit-history li { + padding: 19px 0; + } +} +@media (max-width: 1000px) { + :root { + --sidebar: 184px; + } + .sidebar > .brand { + font-size: 23px; + margin-inline: 2px; + } + .brand-symbol { + width: 31px; + height: 31px; + } + .sidebar nav > a { + font-size: 12px; + padding-inline: 9px; + gap: 9px; + } + .sidebar-note { + padding: 14px; + } + .sidebar-note p > span { + font-size: 12px; + } + .source-link { + font-size: 12px; + gap: 6px; + } + .topbar { + padding-inline: 20px; + } + .topbar-date { + display: none; + } + .dashboard-main { + padding: 23px 20px 0; + } + .journey-content { + padding: 26px; + } + .journey-content h1 { + font-size: 32px; + } + .journey-content > p { + font-size: 13px; + } + .journey-header { + min-height: 220px; + } + .stat-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + } + .stat-card { + padding: 18px; + } + .stat-card > div { + font-size: 12px; + } + .stat-card > strong { + font-size: 31px; + } + .stat-card > p { + font-size: 12px; + } + .overview-grid, + .skills-grid, + .audits-grid { + grid-template-columns: 1fr; + } + .xp-breakdown { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 30px; + } + .xp-breakdown .panel-heading { + grid-column: 1/-1; + } + .breakdown-total { + margin-top: 24px; + } + .stacked-bar { + margin-top: 36px; + align-self: center; + } + .piscine-breakdown { + grid-column: 1/-1; + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 30px; + } + .piscine-breakdown > p { + grid-column: 1/-1; + } + .skill-chart-wrap { + grid-template-columns: 1fr 1fr; + } + .skill-list { + display: block; + } + .skill-list > li { + grid-template-columns: 65px 1fr 30px; + margin: 20px 0; + } + .skill-track { + display: block; + } + .level-panel { + min-height: 300px; + } + .level-display { + margin-top: 18px; + } + .level-panel > p { + max-width: none; + } + .rank-footnote { + margin-top: 10px; + } + .level-endpoints { + margin-bottom: 0; + } + .audit-balance { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 35px; + } + .audit-balance .panel-heading { + grid-column: 1/-1; + } + .audit-ratio { + grid-row: 2/5; + } + .audit-meter { + grid-column: 2; + margin: 30px 0 9px; + } + .audit-caption { + grid-column: 1/-1; + } + .account-details > dl { + grid-template-columns: 1fr 1fr; + } + .dashboard-footer > p { + display: none; + } + .section-title > p { + display: none; + } + .demo-banner { + font-size: 12px; + } + .demo-banner > a { + font-size: 12px; + } +} +@media (max-width: 760px) { + :root { + --sidebar: 0px; + } + .sidebar { + position: sticky; + inset: 0; + top: 0; + width: 100%; + height: auto; + padding: 17px 20px 0; + gap: 16px; + border-right: 0; + border-bottom: 1px solid var(--line); + background: #151617f5; + backdrop-filter: blur(14px); + } + .sidebar > .brand { + margin: 0; + font-size: 23px; + align-self: flex-start; + } + .sidebar nav { + flex-direction: row; + overflow-x: auto; + gap: 2px; + margin: 0 -20px; + padding: 0 12px 9px; + scrollbar-width: none; + } + .sidebar nav > a { + min-height: 40px; + white-space: nowrap; + font-size: 12px; + padding: 8px 10px; + gap: 7px; + } + .sidebar nav > a > svg { + width: 15px; + height: 15px; + } + .sidebar nav > a > .nav-count { + display: none; + } + .sidebar-bottom, + .nav-label { + display: none; + } + .workspace-body { + margin: 0; + } + .topbar { + position: static; + min-height: 49px; + padding: 8px 20px; + gap: 10px; + } + .breadcrumb { + font-size: 12px; + gap: 8px; + } + .connection-label { + font-size: 12px; + } + .topbar-right { + gap: 10px; + } + .topbar-right > .icon-button { + min-width: 28px; + min-height: 28px; + } + .dashboard-main { + padding: 18px 17px 0; + } + .demo-banner { + align-items: flex-start; + flex-direction: column; + gap: 9px; + margin-bottom: 20px; + font-size: 12px; + padding: 12px; + } + .demo-banner > a { + margin-left: 45px; + } + .section-topline { + margin-bottom: 13px; + } + .section-topline-note { + font-size: 12px; + } + .section-topline > .eyebrow { + font-size: 12px; + } + .journey-header { + min-height: 255px; + } + .journey-content { + padding: 25px 22px; + } + .journey-content h1 { + font-size: 31px; + max-width: 90%; + line-height: 1.15; + } + .journey-content h1 em { + display: block; + margin-top: 4px; + } + .journey-content > p { + max-width: 75%; + font-size: 12px; + line-height: 1.6; + } + .journey-image { + inset: -5% -25% -15% 0%; + background-position: 75% center; + } + .journey-header:after { + background: linear-gradient(90deg, #181919f2, #181919c0 45%, #18191915); + } + .journey-index { + font-size: 12px; + right: 13px; + bottom: 12px; + } + .journey-rank { + margin-top: 22px; + font-size: 12px; + } + .stat-grid { + margin: 15px 0 17px; + gap: 10px; + } + .stat-card { + padding: 15px; + } + .stat-card > div { + font-size: 12px; + gap: 4px; + } + .stat-card > div > svg { + width: 14px; + } + .stat-card > strong { + font-size: 28px; + margin: 12px 0 8px; + } + .stat-card > p { + font-size: 12px; + } + .panel { + padding: 20px 17px; + } + .projects-panel { + padding: 0; + } + .panel-heading { + gap: 10px; + } + .panel h2 { + font-size: 16px; + } + .panel-kicker { + font-size: 12px; + } + .segmented > button { + padding: 5px 7px; + min-width: 30px; + } + .chart-summary { + gap: 10px; + margin-top: 25px; + } + .chart-summary > strong { + font-size: 26px; + } + .chart-summary > span { + font-size: 12px; + } + .area-chart { + height: 210px; + } + .chart-footer { + font-size: 12px; + } + .xp-breakdown { + column-gap: 20px; + } + .breakdown-total { + font-size: 29px; + } + .stacked-bar { + margin-top: 29px; + } + .breakdown-row { + font-size: 12px; + } + .piscine-breakdown { + column-gap: 20px; + } + .dashboard-section { + padding-top: 33px; + scroll-margin-top: 130px; + } + .overview-section { + scroll-margin-top: 130px; + } + .section-title { + margin-bottom: 15px; + } + .section-title h2 { + font-size: 21px; + } + .section-title > div { + gap: 10px; + } + .section-number { + font-size: 12px; + min-width: 25px; + height: 25px; + } + .skill-chart-wrap { + grid-template-columns: 1fr; + } + .radar-chart { + height: 255px; + } + .skill-list { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 4px 18px; + } + .skill-list > li { + display: flex; + justify-content: space-between; + gap: 6px; + margin: 10px 0; + } + .skill-track { + display: none; + } + .additional-skills > div { + gap: 16px; + } + .additional-skills > div > span { + font-size: 12px; + } + .table-toolbar { + padding: 16px; + gap: 10px; + } + .search-field { + width: 60%; + gap: 7px; + padding-inline: 9px; + } + .search-field input { + font-size: 12px; + } + .select-field select { + font-size: 12px; + padding-left: 10px; + padding-right: 27px; + } + .select-field > svg { + right: 8px; + } + .data-table th { + padding: 12px 16px; + } + .data-table td { + padding: 16px; + font-size: 12px; + } + .data-table { + min-width: 670px; + } + .pagination { + padding: 13px 16px; + font-size: 12px; + } + .pagination button { + font-size: 12px; + padding: 7px; + } + .audit-balance { + column-gap: 20px; + } + .audit-ratio { + font-size: 55px; + } + .audit-amount { + font-size: 12px; + } + .audit-history { + padding-bottom: 0; + } + .audit-history li { + padding: 17px 0; + gap: 10px; + } + .audit-history li > div > span { + font-size: 12px; + } + .account-heading { + gap: 12px; + } + .account-heading h2 { + font-size: 18px; + } + .account-heading .muted { + font-size: 12px; + } + .avatar.large { + width: 44px; + height: 44px; + font-size: 18px; + } + .account-id { + display: none; + } + .account-details > dl { + gap: 20px; + } + .account-details dd { + font-size: 13px; + } + .dashboard-footer { + margin-top: 30px; + font-size: 12px; + } + .dashboard-footer .brand { + font-size: 18px; + } + .state-actions { + flex-wrap: wrap; + justify-content: center; + } +} +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + *, + *:before, + *:after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } + .reveal-content { + animation: none !important; + } + .journey-image { + will-change: auto; + } +} +/* Readable controls and labels remain consistent at every breakpoint. */ +.sidebar nav > a, +.breadcrumb, +.demo-banner, +.demo-banner > a, +.stat-card > div, +.login-form label, +.panel h2, +.table-toolbar input, +.select-field select, +.data-table td, +.skill-list > li, +.breakdown-row, +.audit-amount, +.account-details > summary, +.account-heading .muted { + font-size: 14px; +} +.login-form input { + font-size: 16px; +} +.stat-card > p, +.chart-summary > span, +.section-title > p, +.journey-rank, +.piscine-breakdown > div, +.status-badge, +.pagination, +.pagination button, +.audit-history li > div > strong, +.audit-caption { + font-size: 12px; +} +.panel h2 { + font-size: 18px; +} +.journey-content > p, +.editorial-copy > p { + font-size: 16px; +} +@media (max-width: 760px) { + .sidebar nav > a { + font-size: 12px; + } + .journey-content > p { + max-width: 90%; + font-size: 14px; + } + .journey-index { + display: none; + } + .journey-content h1 { + max-width: 100%; + } + .panel-heading { + flex-wrap: wrap; + } + .skill-list > li { + font-size: 14px; + } + .section-topline-note { + display: none; } } diff --git a/src/app/icon.svg b/src/app/icon.svg new file mode 100644 index 0000000..df3de75 --- /dev/null +++ b/src/app/icon.svg @@ -0,0 +1 @@ + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 33bbd18..3d1396f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,49 +1,22 @@ -"use client"; +import type { Metadata } from "next"; +import { Providers } from "@/components/Providers"; +import "./globals.css"; -import React from "react"; -import { - ApolloProvider, - ApolloClient, - InMemoryCache, - createHttpLink, -} from "@apollo/client"; -// We import type NormalizedCacheObject -import type { NormalizedCacheObject } from "@apollo/client"; +export const metadata: Metadata = { + title: { default: "Graphite — Your learning, connected", template: "%s · Graphite" }, + description: + "A considered view of your Reboot01 learning journey. Explore experience, skills, projects, and peer audits with GraphQL.", + robots: { index: false, follow: false }, +}; -let client: ApolloClient; - -// If we’re in the browser, read localStorage. Otherwise, skip it. -if (typeof window !== "undefined") { - const token = localStorage.getItem("authToken") || ""; - client = new ApolloClient({ - link: createHttpLink({ - uri: "https://learn.reboot01.com/api/graphql-engine/v1/graphql", - headers: { - Authorization: `Bearer ${token}`, - }, - }), - cache: new InMemoryCache(), - }); -} else { - // Server-side fallback: no localStorage - client = new ApolloClient({ - link: createHttpLink({ - uri: "https://learn.reboot01.com/api/graphql-engine/v1/graphql", - }), - cache: new InMemoryCache(), - }); -} - -export default function RootLayout({ children }: { children: React.ReactNode }) { +export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) { return ( - - My App - - - {children} - + + Skip to content + + {children} ); diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index efa579f..956ce71 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,108 +1,165 @@ "use client"; -import React, { useState, FormEvent } from "react"; -import { motion } from "framer-motion"; -import { Card, CardContent, Typography, TextField, Button, Box } from "@mui/material"; +import { useEffect, useState, type FormEvent } from "react"; +import Link from "next/link"; +import { useRouter } from "next/navigation"; +import { + ArrowRight, + ArrowUpRight, + Eye, + EyeOff, + LockKeyhole, + LoaderCircle, + Network, + ShieldCheck, +} from "lucide-react"; +import { Brand } from "@/components/Brand"; +import { getSession, signIn } from "@/lib/auth"; export default function LoginPage() { + const router = useRouter(); const [identifier, setIdentifier] = useState(""); const [password, setPassword] = useState(""); + const [visible, setVisible] = useState(false); + const [pending, setPending] = useState(false); const [error, setError] = useState(""); - - const handleSubmit = async (e: FormEvent) => { - e.preventDefault(); + useEffect(() => { + if (getSession()) router.replace("/profile"); + }, [router]); + async function handleSubmit(event: FormEvent) { + event.preventDefault(); + if (pending) return; + setPending(true); setError(""); - try { - const basicAuth = btoa(`${identifier}:${password}`); - const response = await fetch("https://learn.reboot01.com/api/auth/signin", { - method: "POST", - headers: { - Authorization: `Basic ${basicAuth}`, - "Content-Type": "application/json", - }, - }); - - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData.message || "Invalid credentials. Please try again."); - } - - const token = await response.json(); - localStorage.setItem("authToken", token); - window.location.href = "/profile"; - } catch (err: unknown) { - if (err instanceof Error) { - setError(err.message); - } else { - setError("An unknown error occurred"); - } + await signIn(identifier, password); + setPassword(""); + router.replace("/profile"); + } catch (cause) { + setError( + cause instanceof TypeError + ? "Couldn’t connect to Reboot01. Check your connection and try again." + : cause instanceof Error && ["TimeoutError", "AbortError"].includes(cause.name) + ? "The connection took too long. Please try again." + : cause instanceof Error + ? cause.message + : "Sign-in failed. Please try again.", + ); + } finally { + setPending(false); } - }; - + } return ( - - - - - - Welcome Back Rebooter! - -
- - setIdentifier(e.target.value)} - required - /> - setPassword(e.target.value)} - required - /> - {error && ( - - {error} - - )} - - -
-
-
-
-
+
+
+
+
+
+ Made for Reboot01 + STUDENT WORKSPACE +
+
+ + + +

WELCOME BACK

+

+ Your journey, +
+ in perspective. +

+

Sign in with your Reboot01 account.

+
+ + setIdentifier(event.target.value)} + required + disabled={pending} + /> + +
+ setPassword(event.target.value)} + required + disabled={pending} + /> + +
+ {error && ( +

+ {error} +

+ )} + +
+

+ Your password is sent only to Reboot01. +

+
+ TAKE A LOOK AROUND +
+ + Explore the sample workspace + +

Sample data. No account needed.

+
+ +
+
); } diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx new file mode 100644 index 0000000..3fa1748 --- /dev/null +++ b/src/app/not-found.tsx @@ -0,0 +1,12 @@ +import Link from "next/link"; +export default function NotFound() { + return ( +
+

404 / A LOOSE CONNECTION

+

This page isn’t in your graph.

+ + Back to Graphite + +
+ ); +} diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index 34f408d..49b9953 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -1,114 +1,95 @@ "use client"; +import { useCallback, useEffect, useState } from "react"; +import { useRouter } from "next/navigation"; +import { useApolloClient, useQuery } from "@apollo/client"; +import { LoaderCircle, RefreshCw } from "lucide-react"; +import { Dashboard } from "@/components/Dashboard"; +import { Brand } from "@/components/Brand"; +import { GET_DASHBOARD, MODULE_PATH } from "@/graphql/dashboard-query"; +import { clearSession, getSession } from "@/lib/auth"; +import type { DashboardData } from "@/lib/dashboard"; -import React from "react"; -import { motion } from "framer-motion"; -import CrazyAuditsTable from "@/components/AuditsTable"; -import CrazyAuditStats from "@/components/CrazyAudit"; -import RankDisplay from "@/components/LevelProgressChart"; -import CrazyProgressChart from "@/components/ProgressChart"; -import CrazyRadarChart from "@/components/RadarCharts"; -import CrazyProjectCards from "@/components/TransactionList"; -import UserInfo from "@/components/UserInfo"; -import SidebarXPChart from "@/components/XPOverviewCard"; - -const ProfilePage = () => { - const logoutUser = () => { - // Remove the token from localStorage - localStorage.removeItem("authToken"); - window.location.href = "/"; - }; - +export default function ProfilePage() { + const router = useRouter(); + const client = useApolloClient(); + const [ready, setReady] = useState(false); + const [anchor, setAnchor] = useState(""); + const { data, previousData, loading, error, refetch } = useQuery(GET_DASHBOARD, { + skip: !ready, + variables: { modulePath: MODULE_PATH, modulePattern: `${MODULE_PATH}%` }, + notifyOnNetworkStatusChange: true, + }); + const logout = useCallback(() => { + setReady(false); + clearSession(); + void client.clearStore(); + router.replace("/login"); + }, [client, router]); + useEffect(() => { + if (!getSession()) { + router.replace("/login"); + return; + } + setReady(true); + setAnchor(new Date().toISOString()); + const check = () => { + if (!getSession()) logout(); + }; + const timer = window.setInterval(check, 30000); + window.addEventListener("graphite:session-expired", logout); + window.addEventListener("focus", check); + return () => { + window.clearInterval(timer); + window.removeEventListener("graphite:session-expired", logout); + window.removeEventListener("focus", check); + }; + }, [logout, router]); + async function refresh() { + try { + await refetch(); + setAnchor(new Date().toISOString()); + } catch { + /* The query error is presented in the workspace. */ + } + } + const current = data || previousData; + if (!ready || (loading && !current)) + return ( +
+ + +

Connecting your learning.

+

Loading your Reboot01 workspace…

+
+ ); + if (!current || !current.user.length) + return ( +
+ +

{error ? "We couldn’t load your workspace." : "No learner profile was returned."}

+

+ {error + ? "Check your connection and try again. If your session has ended, sign in again." + : "Try signing in with your Reboot01 student account."} +

+
+ + +
+
+ ); return ( - - {/* Logout Button */} -
- -
- - {/* Page Title */} -
-

User Profile

-

Explore your progress, audits, and achievements.

-
- - {/* User Info Section */} -
- -
- - {/* XP Overview and Audit Stats Section */} -
- - -
- - {/* Level Progress and Skill Radar Section */} -
- - -
- - {/* Progress Chart and Audits Table Section */} -
- -
- -
- -
- - {/* Project Transactions Section */} -
- -
-
+ ); -}; - -export default ProfilePage; +} diff --git a/src/components/AuditsTable.tsx b/src/components/AuditsTable.tsx deleted file mode 100644 index eb4149f..0000000 --- a/src/components/AuditsTable.tsx +++ /dev/null @@ -1,236 +0,0 @@ -"use client"; - -import React, { useState } from "react"; -import { useQuery } from "@apollo/client"; -import { GET_AUDITS } from "@/graphql/queries"; -import { motion } from "framer-motion"; - -interface Audit { - group: { - captainLogin: string; - createdAt: string; - }; -} - -const CrazyAuditsTable = () => { - const { data, loading, error } = useQuery(GET_AUDITS); - const [filter, setFilter] = useState(""); - const [auditType, setAuditType] = useState("all"); // Options: all, valid, failed - - if (loading) - return

Loading...

; - if (error) - return ( -

Error fetching data

- ); - - const validAudits = (data?.user[0]?.validAudits?.nodes as Audit[]) || []; - const failedAudits = (data?.user[0]?.failedAudits?.nodes as Audit[]) || []; - - const auditsToDisplay = - auditType === "valid" - ? validAudits - : auditType === "failed" - ? failedAudits - : [...validAudits, ...failedAudits]; - - const filteredAudits = auditsToDisplay.filter((audit: Audit) => - audit.group.captainLogin.toLowerCase().includes(filter.toLowerCase()) - ); - - return ( -
- {/* Glowing Animation */} -
-
- -

- Crazy Audits Table -

- - {/* Filter Input */} - setFilter(e.target.value)} - style={{ - width: "100%", - padding: "12px", - marginBottom: "20px", - borderRadius: "8px", - border: "none", - fontSize: "1rem", - boxShadow: "0 4px 10px rgba(0, 0, 0, 0.2)", - }} - /> - - {/* Toggle Buttons */} -
- - - -
- - {/* Scrollable Dynamic Table */} - - - - - - - - - - - {filteredAudits.length > 0 ? ( - filteredAudits.map((audit: Audit, index: number) => ( - - - - - - )) - ) : ( - - - - )} - -
Captain LoginAudit DateStatus
{audit.group.captainLogin} - {new Date(audit.group.createdAt).toLocaleDateString()} - - - {validAudits.includes(audit) ? "✔ Passed" : "✘ Failed"} - -
- No audits found! -
-
-
- ); -}; - -export default CrazyAuditsTable; diff --git a/src/components/Brand.tsx b/src/components/Brand.tsx new file mode 100644 index 0000000..17cd094 --- /dev/null +++ b/src/components/Brand.tsx @@ -0,0 +1,14 @@ +import Link from "next/link"; +import { Network } from "lucide-react"; +export function Brand({ href = "/" }: { href?: string }) { + return ( + + + + + + graphite. + + + ); +} diff --git a/src/components/Charts.tsx b/src/components/Charts.tsx new file mode 100644 index 0000000..d47ec6c --- /dev/null +++ b/src/components/Charts.tsx @@ -0,0 +1,209 @@ +"use client"; +import { useState } from "react"; +import { + Area, + AreaChart, + CartesianGrid, + PolarAngleAxis, + PolarGrid, + PolarRadiusAxis, + Radar, + RadarChart, + ResponsiveContainer, + Tooltip, + XAxis, + YAxis, +} from "recharts"; +import { useReducedMotion } from "framer-motion"; +import { ArrowUpRight } from "lucide-react"; +import { formatXP, getTimeline, type Period, type Transaction } from "@/lib/dashboard"; + +const tooltipStyle = { + background: "#232427", + border: "1px solid #45464b", + borderRadius: "10px", + color: "#f3f2ec", + fontSize: "13px", +}; + +export function XPChart({ + transactions, + anchor, + paused = false, +}: { + transactions: Transaction[]; + anchor: string; + paused?: boolean; +}) { + const [period, setPeriod] = useState("6m"); + const systemReduce = useReducedMotion(); + const reduce = systemReduce || paused; + const timeline = getTimeline(transactions, period, new Date(anchor)); + const earned = timeline.reduce((sum, point) => sum + point.earned, 0); + return ( +
+
+
+

EXPERIENCE

+

Your growth over time

+
+
+ {(["3m", "6m", "all"] as const).map((value) => ( + + ))} +
+
+
+ {formatXP(earned)} + + earned in this period + +
+ {timeline.length ? ( + <> +
+ + + + + + + + + + + formatXP(n, 0)} + tick={{ fill: "#a7a8ad", fontSize: 12 }} + tickLine={false} + axisLine={false} + width={67} + /> + [formatXP(value), "Cumulative XP"]} + /> + + + +
+
+ + Cumulative module XP + +
+ View data + + + + + + + + + + + {timeline.map((point) => ( + + + + + + ))} + +
XP by month
MonthEarnedTotal
{point.label}{formatXP(point.earned)}{formatXP(point.total)}
+
+
+ + ) : ( +
Your first XP award will start this chart.
+ )} +
+ ); +} + +export function SkillsChart({ + skills, + paused = false, +}: { + skills: { name: string; value: number }[]; + paused?: boolean; +}) { + const systemReduce = useReducedMotion(); + const reduce = systemReduce || paused; + if (!skills.length) + return ( +
Skill milestones will appear as you complete your projects.
+ ); + return ( +
+
+ + + + + + + [`${value}%`, "Highest attained"]} + /> + + +
+
    + {skills.slice(0, 6).map((skill) => ( +
  1. + {skill.name} +
    + +
    + {skill.value}% +
  2. + ))} +
+
+ ); +} diff --git a/src/components/CrazyAudit.tsx b/src/components/CrazyAudit.tsx deleted file mode 100644 index 071c954..0000000 --- a/src/components/CrazyAudit.tsx +++ /dev/null @@ -1,180 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { GET_AUDIT_STATS } from "@/graphql/queries"; -import { PieChart, Pie, Cell, ResponsiveContainer } from "recharts"; - -const formatSize = (size: number) => { - if (size >= 1000000) return `${Math.round((size / 1000000) * 100) / 100} MB`; - return `${Math.round(size / 1000)} kB`; -}; - -const CrazyAuditStats = () => { - const { data, loading, error } = useQuery(GET_AUDIT_STATS); - - if (loading) - return

Loading...

; - if (error) - return

Error fetching data

; - - const auditStats = data?.user[0]; - const totalUp = auditStats?.totalUp || 0; - const totalDown = auditStats?.totalDown || 0; - const auditRatio = auditStats?.auditRatio || 0; - - const ratioStyle = - auditRatio < 1.0 - ? { color: "#f44336", message: "Careful buddy! 🔴" } - : auditRatio < 1.5 - ? { color: "#ff9800", message: "You can do better! 🟡" } - : { color: "#4caf50", message: "You're good! 🟢" }; - - const chartData = [ - { name: "Total Up", value: totalUp, color: "#4caf50" }, - { name: "Total Down", value: totalDown, color: "#f44336" }, - ]; - - return ( -
- {/* Glowing Orb */} -
-
- -

- Audit Statistics -

- -
- {auditRatio.toFixed(1)} -
-

- {ratioStyle.message} -

- -
- - - - {chartData.map((entry, index) => ( - - ))} - - - -
- -
-
-

- {formatSize(totalUp)} -

-

Done

-
-
-

- {formatSize(totalDown)} -

-

Received

-
-
-
- ); -}; - -export default CrazyAuditStats; - -/* Add animations for glow effect */ - diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx new file mode 100644 index 0000000..aac65fb --- /dev/null +++ b/src/components/Dashboard.tsx @@ -0,0 +1,783 @@ +"use client"; +import { useEffect, useMemo, useState } from "react"; +import Link from "next/link"; +import { + Activity, + ArrowDownLeft, + ArrowRight, + ArrowUpRight, + Award, + BookOpen, + Check, + ChevronDown, + Code2, + Fingerprint, + Github, + LayoutDashboard, + LogOut, + Network, + Pause, + Play, + RefreshCw, + Search, + ShieldCheck, + Sparkles, + TrendingUp, + Users, + X, +} from "lucide-react"; +import { MotionConfig, useReducedMotion } from "framer-motion"; +import { Brand } from "./Brand"; +import { XPChart, SkillsChart } from "./Charts"; +import { JourneyHeader, Reveal } from "./Motion"; +import { + amountOf, + formatXP, + getAudits, + getProjects, + getRank, + getSkills, + readableName, + userAttrs, + type DashboardData, + type Project, +} from "@/lib/dashboard"; + +const nav = [ + { id: "overview", label: "Overview", icon: LayoutDashboard }, + { id: "skills", label: "Skills & level", icon: Sparkles }, + { id: "projects", label: "Projects", icon: Code2 }, + { id: "audits", label: "Peer audits", icon: Users }, + { id: "account", label: "My profile", icon: Fingerprint }, +]; +function dateLabel(date: string) { + const value = new Date(date); + return Number.isNaN(value.getTime()) + ? "—" + : value.toLocaleDateString("en-GB", { + day: "2-digit", + month: "short", + year: "numeric", + timeZone: "UTC", + }); +} + +export function Dashboard({ + data, + demo = false, + anchor, + onLogout, + onRefresh, + refreshing = false, + refreshError = false, +}: { + data: DashboardData; + demo?: boolean; + anchor: string; + onLogout?: () => void; + onRefresh?: () => void; + refreshing?: boolean; + refreshError?: boolean; +}) { + const [active, setActive] = useState("overview"); + const [paused, setPaused] = useState(false); + const systemReduce = useReducedMotion(); + const reduced = paused || !!systemReduce; + const [query, setQuery] = useState(""); + const [projectStatus, setProjectStatus] = useState("All projects"); + const [projectPage, setProjectPage] = useState(0); + const [auditFilter, setAuditFilter] = useState("All"); + const [auditPage, setAuditPage] = useState(0); + const user = data.user[0]; + const attrs = userAttrs(user); + const firstName = + typeof attrs.firstName === "string" && attrs.firstName.trim() ? attrs.firstName : user.login; + const level = data.currentLevel[0]?.amount || 0; + const rank = getRank(level); + const projects = useMemo(() => getProjects(data), [data]); + const skills = useMemo(() => getSkills(data.skillTransactions), [data.skillTransactions]); + const audits = useMemo(() => getAudits(user), [user]); + const filteredProjects = projects.filter( + (project) => + project.name.toLowerCase().includes(query.trim().toLowerCase()) && + (projectStatus === "All projects" || project.status === projectStatus), + ); + const filteredAudits = audits.filter( + (audit) => auditFilter === "All" || audit.status === auditFilter, + ); + const projectPageSafe = Math.min( + projectPage, + Math.max(0, Math.ceil(filteredProjects.length / 6) - 1), + ); + const auditPageSafe = Math.min(auditPage, Math.max(0, Math.ceil(filteredAudits.length / 5) - 1)); + const passed = projects.filter((project) => project.status === "Passed").length; + const totalXP = amountOf(data.moduleXP); + const projectXP = amountOf(data.projectXP); + const exerciseXP = amountOf(data.exerciseXP); + const otherXP = Math.max(0, totalXP - projectXP - exerciseXP); + const ratio = + user.totalDown > 0 && user.auditRatio !== null && Number.isFinite(user.auditRatio) + ? user.auditRatio + : null; + const validCount = user.validAudits?.nodes.length || 0; + const auditTotal = validCount + (user.failedAudits?.nodes.length || 0); + + useEffect(() => { + const observer = new IntersectionObserver( + (entries) => { + const visible = entries + .filter((entry) => entry.isIntersecting) + .sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top); + if (visible[0]) setActive(visible[0].target.id); + }, + { rootMargin: "-15% 0px -55% 0px", threshold: 0 }, + ); + for (const section of nav) { + const element = document.getElementById(section.id); + if (element) observer.observe(element); + } + return () => observer.disconnect(); + }, []); + + return ( + +
+ +
+
+
+ Workspace + / + {nav.find((item) => item.id === active)?.label} +
+
+ + + {demo ? "Sample workspace" : "Reboot01 connected"} + + {dateLabel(anchor)} + +
+
+
+ {demo && ( +
+ + DEMO You’re exploring fictional sample + data. + + + Connect your account + +
+ )} + {refreshError && ( +

+ Couldn’t refresh your data. Showing your last loaded results; try refreshing again. +

+ )} +
+
+ OVERVIEW + {onRefresh && ( + + )} + A little more perspective. +
+ +
+ + + = 1 + ? "Giving back to the community" + : "Room to give more feedback" + } + /> + +
+
+ +
+
+
+

THE BREAKDOWN

+

Where it adds up

+
+ +
+

+ {formatXP(totalXP)} + MODULE EXPERIENCE +

+
+ + + {otherXP > 0 && } +
+
+ + Projects + + {formatXP(projectXP)} +
+
+ + Exercises + + {formatXP(exerciseXP)} +
+ {otherXP > 0 && ( +
+ Other module XP + {formatXP(otherXP)} +
+ )} +
+

BEFORE THE MODULE

+
+ Piscine Go + {formatXP(amountOf(data.piscineGoXP))} +
+
+ Piscine JS + {formatXP(amountOf(data.piscineJsXP))} +
+
+
+
+
+ + +
+
+
+
+

YOUR TOOLKIT

+

Strongest connections

+
+ {skills.length} SKILLS +
+ + {skills.length > 6 && ( +
+ + View all {skills.length} skills + +
+ {skills.map((skill) => ( + + {skill.name} + {skill.value}% + + ))} +
+
+ )} +
+
+ THE NEXT CHAPTER +
+ LEVEL + {level} + +
+

{rank.current.name}

+

+ {rank.next + ? `${rank.remaining} more levels to ${rank.next.name}.` + : "You’ve reached the highest milestone in this workspace."} +

+
+ +
+
+ Level {rank.current.level} + {rank.next ? `Level ${rank.next.level}` : "Milestone reached"} +
+
+ + Progress through practice. +
+
+
+
+ + +
+
+
+ + + { + setQuery(event.target.value); + setProjectPage(0); + }} + /> + {query && ( + + )} +
+ +
+
+ + + + + + + + + + + + + {filteredProjects + .slice(projectPageSafe * 6, projectPageSafe * 6 + 6) + .map((project) => ( + + ))} + +
Project results and module XP awards
PROJECTSTATUSBEST GRADEMODULE XPLAST XP AWARD
+ {!filteredProjects.length && ( +
+ + + {projects.length + ? "No matching projects" + : "Your project story starts here"} + +

+ {projects.length + ? "Try a different name or status." + : "Project results will appear when they’re available."} +

+
+ )} +
+ +
+
+ + +
+
+
+
+

GIVE & RECEIVE

+

A healthy balance

+
+ +
+
+ {ratio === null ? "—" : ratio.toFixed(2)} + AUDIT RATIO +
+ +
+ + Given + + {formatXP(user.totalUp)} +
+
+ + Received + + {formatXP(user.totalDown)} +
+

+ {auditTotal + ? `${validCount} of ${auditTotal} recorded audits passed.` + : "Your completed peer audits will appear here."} +

+
+
+
+

Audit history

+
+ {["All", "Passed", "Failed"].map((filter) => ( + + ))} +
+
+
    + {filteredAudits + .slice(auditPageSafe * 5, auditPageSafe * 5 + 5) + .map((audit, index) => ( +
  • + + {audit.status === "Passed" ? : } + +
    + {audit.group?.captainLogin} + Group created {dateLabel(audit.group!.createdAt)} +
    + + {audit.status} + +
  • + ))} +
+ {!filteredAudits.length && ( +
+ No {auditFilter === "All" ? "" : auditFilter.toLowerCase()} audits to show. +
+ )} + +
+
+
+ +
+
+ {firstName.slice(0, 1).toUpperCase()} +
+

YOUR REBOOT01 PROFILE

+

+ {firstName} {typeof attrs.lastName === "string" ? attrs.lastName : ""} +

+

{user.email}

+
+ ID / {user.id} +
+
+ + View account details + +
+
+
Username
+
{user.login}
+
+ {[ + ["Country", "country"], + ["City", "addressCity"], + ["Date of birth", "dateOfBirth"], + ["Phone", "PhoneNumber"], + ["Qualification", "qualification"], + ["Employment", "employment"], + ["Place of birth", "placeOfBirth"], + ["Street", "addressStreet"], + ["Emergency first name", "emergencyFirstName"], + ["Emergency last name", "emergencyLastName"], + ["Emergency phone", "emergencyTel"], + ].map(([label, key]) => ( +
+
{label}
+
+ {typeof attrs[key] === "string" && attrs[key] + ? String(attrs[key]) + : "Not provided"} +
+
+ ))} +
+
+
+
+
+ +

Made for the journey. Built with GraphQL.

+ + + {demo ? "Fictional sample data" : "Your data stays yours"} + +
+
+
+
+
+ ); +} + +function Stat({ + icon: Icon, + label, + value, + note, + accent = false, +}: { + icon: typeof TrendingUp; + label: string; + value: string; + note: string; + accent?: boolean; +}) { + return ( +
+
+ {label} + +
+ {value} +

{note}

+
+ ); +} +function SectionTitle({ + number, + title, + subtitle, +}: { + number: string; + title: string; + subtitle: string; +}) { + return ( +
+
+ {number} +

{title}

+
+

{subtitle}

+
+ ); +} +function ProjectRow({ project }: { project: Project }) { + return ( + + + + + + + {readableName(project.name)} + + + + + {project.status === "Passed" && } {project.status} + + + + {project.grade === null ? "—" : `${Math.round(project.grade * 100)}%`} + + {formatXP(project.xp)} + {project.date ? dateLabel(project.date) : "—"} + + ); +} +function Pagination({ + count, + page, + size, + onPage, + noun, +}: { + count: number; + page: number; + size: number; + onPage: (page: number) => void; + noun: string; +}) { + return ( +
+ + {count ? `${page * size + 1}–${Math.min(count, (page + 1) * size)} of ${count}` : "0"}{" "} + {noun} + +
+ + +
+
+ ); +} diff --git a/src/components/LevelProgressChart.tsx b/src/components/LevelProgressChart.tsx deleted file mode 100644 index 32a1284..0000000 --- a/src/components/LevelProgressChart.tsx +++ /dev/null @@ -1,169 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { GET_LEVEL_PROGRESS } from "@/graphql/queries"; -import { motion } from "framer-motion"; - -const ranks = [ - { name: "Aspiring Developer", level: 0 }, - { name: "Beginner Developer", level: 10 }, - { name: "Apprentice Developer", level: 20 }, - { name: "Assistant Developer", level: 30 }, - { name: "Basic Developer", level: 40 }, - { name: "Junior Developer", level: 50 }, - { name: "Confirmed Developer", level: 55 }, - { name: "Full-Stack Developer", level: 60 }, -]; - -const RankDisplay = () => { - const { data, loading, error } = useQuery(GET_LEVEL_PROGRESS); - - if (loading) return

Loading...

; - if (error) return

Error fetching data

; - - const currentLevel = data?.currentLevel[0]?.amount || 0; - - const currentRankIndex = ranks.findIndex((rank) => rank.level > currentLevel) - 1; - const currentRank = ranks[currentRankIndex]; - const nextRank = ranks[currentRankIndex + 1]; - const levelsToNextRank = nextRank ? nextRank.level - currentLevel : 0; - - return ( -
- {/* Floating Neon Rings */} -
-
- - {/* Title */} - - Current Rank - - - {/* Rank and Level Badge */} - - {currentLevel} - - {currentRank?.name || "Unranked"} - - - - {/* Progress Bar */} - {nextRank && ( - - )} - - {/* Next Rank Info */} - {nextRank && ( - - Next level in {levelsToNextRank} levels to unlock{" "} - {nextRank.name}! - - )} - - {/* Interactive Neon Arrow */} - {nextRank && ( - - 🚀 YOU CAN DO IT - - )} -
- ); -}; - -export default RankDisplay; diff --git a/src/components/Motion.tsx b/src/components/Motion.tsx new file mode 100644 index 0000000..4b0d939 --- /dev/null +++ b/src/components/Motion.tsx @@ -0,0 +1,70 @@ +"use client"; +import { useRef, type ReactNode } from "react"; +import { motion, useReducedMotion, useScroll, useTransform } from "framer-motion"; + +export function Reveal({ + children, + className = "", + id, +}: { + children: ReactNode; + className?: string; + id?: string; +}) { + const reduce = useReducedMotion(); + return ( + +
{children}
+
+ ); +} + +export function JourneyHeader({ + name, + level, + rank, + paused = false, +}: { + name: string; + level: number; + rank: string; + paused?: boolean; +}) { + const target = useRef(null); + const systemReduce = useReducedMotion(); + const reduce = systemReduce || paused; + const { scrollYProgress } = useScroll({ target, offset: ["start start", "end start"] }); + const y = useTransform(scrollYProgress, [0, 1], [0, 90]); + const scale = useTransform(scrollYProgress, [0, 1], [1, 1.15]); + return ( +
+
+ ); +} diff --git a/src/components/ProgressChart.tsx b/src/components/ProgressChart.tsx deleted file mode 100644 index 13928f5..0000000 --- a/src/components/ProgressChart.tsx +++ /dev/null @@ -1,135 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { GET_TRANSACTIONS } from "@/graphql/queries"; -import { - LineChart, - Line, - XAxis, - YAxis, - Tooltip, - CartesianGrid, - ResponsiveContainer, -} from "recharts"; - -interface Transaction { - object: { - name: string; - }; - amount: number; - createdAt: string; -} - -const CrazyProgressChart = () => { - const { data, loading, error } = useQuery(GET_TRANSACTIONS); - - if (loading) - return

Loading...

; - if (error) - return ( -

- Error fetching data -

- ); - - const transactions = (data?.transaction as Transaction[]) || []; - - const chartData = transactions.map((transaction: Transaction) => ({ - name: transaction.object.name, - xp: transaction.amount, - date: new Date(transaction.createdAt).toLocaleDateString(), - })); - - return ( -
- {/* Glowing Animation */} -
-
- -

- Progress Over Time -

- -
- - - - - - - - - - - - - - - -
-
- ); -}; - -export default CrazyProgressChart; diff --git a/src/components/Providers.tsx b/src/components/Providers.tsx new file mode 100644 index 0000000..85e4b0e --- /dev/null +++ b/src/components/Providers.tsx @@ -0,0 +1,14 @@ +"use client"; +import { useState } from "react"; +import { ApolloProvider } from "@apollo/client"; +import { MotionConfig } from "framer-motion"; +import { createGraphQLClient } from "@/lib/apollo"; + +export function Providers({ children }: { children: React.ReactNode }) { + const [client] = useState(createGraphQLClient); + return ( + + {children} + + ); +} diff --git a/src/components/RadarCharts.tsx b/src/components/RadarCharts.tsx deleted file mode 100644 index b8de743..0000000 --- a/src/components/RadarCharts.tsx +++ /dev/null @@ -1,135 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { GET_SKILL_TRANSACTIONS } from "@/graphql/queries"; -import { Radar, RadarChart, PolarGrid, PolarAngleAxis, ResponsiveContainer } from "recharts"; - -const processSkillTransactions = (transactions: { type: string; amount: number }[]) => { - const skillData: { [key: string]: number } = {}; - - transactions.forEach((transaction) => { - const skillName = transaction.type.replace("skill_", "").replace("-", " ").toUpperCase(); - skillData[skillName] = (skillData[skillName] || 0) + transaction.amount; - }); - - return Object.entries(skillData).map(([name, value]) => ({ name, value })); -}; - -const CrazyRadarChart = () => { - const { data, loading, error } = useQuery(GET_SKILL_TRANSACTIONS); - - if (loading) return

Loading...

; - if (error) return

Error fetching data

; - - const skillTransactions = data?.skillTransactions || []; - const radarData = processSkillTransactions(skillTransactions); - - return ( -
- {/* Floating Background Animation */} -
-
- - {/* Title */} -

- Highest Skills -

- - {/* Radar Chart */} -
- - - - - - - - - - - - - -
-
- ); -}; - -export default CrazyRadarChart; - -/* Add animations for glowing effects */ - diff --git a/src/components/TransactionList.tsx b/src/components/TransactionList.tsx deleted file mode 100644 index 77e695f..0000000 --- a/src/components/TransactionList.tsx +++ /dev/null @@ -1,186 +0,0 @@ -"use client"; - -import React, { useState } from "react"; -import { useQuery } from "@apollo/client"; -import { GET_PROJECT_TRANSACTIONS } from "@/graphql/queries"; -import { motion } from "framer-motion"; - -interface ProjectTransaction { - object: { name: string }; - amount: number; - createdAt: string; -} - -const CrazyProjectCards = () => { - const { data, loading, error } = useQuery(GET_PROJECT_TRANSACTIONS); - const [filter, setFilter] = useState(""); - - if (loading) - return

Loading...

; - if (error) - return ( -

- Error fetching data -

- ); - - const transactions = (data?.transaction as ProjectTransaction[]) || []; - - const filteredTransactions = transactions.filter((transaction: ProjectTransaction) => - transaction.object.name.toLowerCase().includes(filter.toLowerCase()) - ); - - return ( -
- {/* Glowing Animation */} -
-
- -

- Project Transactions -

- - {/* Filter Input */} - setFilter(e.target.value)} - style={{ - width: "100%", - padding: "12px", - marginBottom: "20px", - borderRadius: "8px", - border: "none", - fontSize: "1rem", - boxShadow: "0 4px 15px rgba(0, 0, 0, 0.2)", - }} - /> - - {/* Scrollable Cards */} -
- {filteredTransactions.length > 0 ? ( - filteredTransactions.map((transaction: ProjectTransaction, index: number) => { - const amount = transaction.amount; - const size = - amount < 1000 - ? `${amount} B` - : `${Math.ceil(amount / 1000)} kB`; - - return ( - -
-

- 🔗 {transaction.object.name} -

-

- {new Date(transaction.createdAt).toLocaleDateString()} -

-
-
- {size} 📈 XP -
-
- ); - }) - ) : ( -

- No project transactions found! -

- )} -
-
- ); -}; - -export default CrazyProjectCards; diff --git a/src/components/UserInfo.tsx b/src/components/UserInfo.tsx deleted file mode 100644 index f82bf2d..0000000 --- a/src/components/UserInfo.tsx +++ /dev/null @@ -1,247 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { motion } from "framer-motion"; -import { GET_USER_INFO } from "@/graphql/queries"; - -interface UserAttrs { - firstName?: string; - lastName?: string; - country?: string; - addressCity?: string; - dateOfBirth?: string; - PhoneNumber?: string; - qualification?: string; - employment?: string; - placeOfBirth?: string; - addressStreet?: string; - emergencyTel?: string; - emergencyFirstName?: string; - emergencyLastName?: string; -} - -const UserInfo = () => { - const { data, loading, error } = useQuery(GET_USER_INFO); - - if (loading) { - return

Loading...

; - } - if (error) { - return ( -

- Error: {error.message} -

- ); - } - - const user = data?.user?.[0] || {}; - const { id, login, email, attrs } = user; - const parsedAttrs: UserAttrs = typeof attrs === "object" ? attrs : {}; - - const comets = Array.from({ length: 4 }, (_, i) => ({ - id: i, - top: Math.random() * 80, - delay: Math.random() * 3, - })); - - return ( - - {/* Swirling Orbs */} - - - - - {/* Comets */} - {comets.map((comet) => ( - - ))} - - {/* Main Card */} -
-

- User Info -

-

- ID: {id || "N/A"} -

-

- Login: {login || "N/A"} -

-

- Email: {email || "N/A"} -

-

- Name: {parsedAttrs.firstName || login} {parsedAttrs.lastName || ""} -

- -
- -
-
-

- Country: {parsedAttrs.country || "N/A"} -

-

- City: {parsedAttrs.addressCity || "N/A"} -

-

- Date of Birth:{" "} - {parsedAttrs.dateOfBirth - ? new Date(parsedAttrs.dateOfBirth).toLocaleDateString() - : "N/A"} -

-

- Phone: {parsedAttrs.PhoneNumber || "N/A"} -

-
-
-

- Qualification: {parsedAttrs.qualification || "N/A"} -

-

- Employment: {parsedAttrs.employment || "N/A"} -

-

- Place of Birth: {parsedAttrs.placeOfBirth || "N/A"} -

-

- Street: {parsedAttrs.addressStreet || "N/A"} -

-
-
- -

- Emergency Contact -

-

- Name: {parsedAttrs.emergencyFirstName || "N/A"}{" "} - {parsedAttrs.emergencyLastName || ""} -

-

- Phone: {parsedAttrs.emergencyTel || "N/A"} -

-
-
- ); -}; - -export default UserInfo; diff --git a/src/components/XPOverviewCard.tsx b/src/components/XPOverviewCard.tsx deleted file mode 100644 index 80a28b8..0000000 --- a/src/components/XPOverviewCard.tsx +++ /dev/null @@ -1,174 +0,0 @@ -"use client"; - -import React from "react"; -import { useQuery } from "@apollo/client"; -import { GET_TOTAL_AND_BREAKDOWN_XP } from "@/graphql/queries"; -import { - BarChart, - Bar, - XAxis, - YAxis, - Tooltip, - ResponsiveContainer, - Cell, - LabelList, -} from "recharts"; -import { motion } from "framer-motion"; - -interface XPData { - name: string; - value: number; - color: string; - percentage?: string; -} - -interface CustomTooltipParams { - active?: boolean; - payload?: { payload?: XPData }[]; -} - -const SidebarXPChart = () => { - const { data, loading, error } = useQuery(GET_TOTAL_AND_BREAKDOWN_XP); - - if (loading) { - return

Loading...

; - } - if (error) { - return

Error: {error.message}

; - } - - // 1) Extract XP amounts (in kB) - const totalXP = (data?.totalXP?.aggregate?.sum?.amount || 0) / 1000; - const piscineGoXP = (data?.piscineGoXP?.aggregate?.sum?.amount || 0) / 1000; - const piscineJsXP = (data?.piscineJsXP?.aggregate?.sum?.amount || 0) / 1000; - const projectXP = (data?.projectXP?.aggregate?.sum?.amount || 0) / 1000; - const exerciseXP = (data?.exerciseXP?.aggregate?.sum?.amount || 0) / 1000; - - // 2) Create data array - const chartDataRaw: XPData[] = [ - { name: "Piscine Go", value: piscineGoXP, color: "#ff6b6b" }, - { name: "Piscine JS", value: piscineJsXP, color: "#51cf66" }, - { name: "Projects", value: projectXP, color: "#339af0" }, - { name: "Exercises", value: exerciseXP, color: "#ffa94d" }, - ]; - - // 3) Sort so largest XP is at the bottom - chartDataRaw.sort((a, b) => a.value - b.value); - - // 4) Sum for percentage - const totalAllXP = piscineGoXP + piscineJsXP + projectXP + exerciseXP; - - // 5) Append percentage - const chartData = chartDataRaw.map((item) => { - const percent = totalAllXP - ? ((item.value / totalAllXP) * 100).toFixed(1) - : "0.0"; - return { ...item, percentage: percent }; - }); - - // 6) Custom tooltip - const CustomTooltip = ({ active, payload }: CustomTooltipParams) => { - if (active && payload && payload.length > 0) { - const dataItem = payload[0].payload; - if (!dataItem) return null; - - return ( -
-

{dataItem.name}

-

- {dataItem.value.toFixed(1)} kB ({dataItem.percentage}%) -

-
- ); - } - return null; - }; - - return ( - - {/* Title */} -

- Total XP (KB) -

- - {/* XP Value */} -
- {totalXP.toFixed(0)} kB -
- - {/* Chart Container */} -
- - - - - } /> - - { - if (!item?.payload) return `${val.toFixed(1)} kB`; - const { percentage } = item.payload; - if (!percentage) return `${val.toFixed(1)} kB`; - return `${val.toFixed(1)} kB (${percentage}%)`; - }} - fill="#fff" - style={{ fontSize: 12, fontWeight: "bold" }} - /> - {chartData.map((entry, index) => ( - - ))} - - - -
-
- ); -}; - -export default SidebarXPChart; diff --git a/src/graphql/dashboard-query.ts b/src/graphql/dashboard-query.ts new file mode 100644 index 0000000..5fadbfe --- /dev/null +++ b/src/graphql/dashboard-query.ts @@ -0,0 +1,114 @@ +import { gql } from "@apollo/client"; + +// All module cards and the timeline share this exact event scope. Piscines are separate. +export const GET_DASHBOARD = gql` + query LearningDashboard($modulePath: String!, $modulePattern: String!) { + user { + id + login + email + attrs + auditRatio + totalUp + totalDown + validAudits: audits_aggregate(where: { grade: { _gte: 1 } }, order_by: { createdAt: desc }) { + nodes { + group { + captainLogin + createdAt + } + } + } + failedAudits: audits_aggregate(where: { grade: { _lt: 1 } }, order_by: { createdAt: desc }) { + nodes { + group { + captainLogin + createdAt + } + } + } + } + moduleXP: transaction_aggregate( + where: { type: { _eq: "xp" }, event: { path: { _eq: $modulePath } } } + ) { + aggregate { + sum { + amount + } + } + } + projectXP: transaction_aggregate( + where: { + type: { _eq: "xp" } + event: { path: { _eq: $modulePath } } + object: { type: { _eq: "project" } } + } + ) { + aggregate { + sum { + amount + } + } + } + exerciseXP: transaction_aggregate( + where: { + type: { _eq: "xp" } + event: { path: { _eq: $modulePath } } + object: { type: { _eq: "exercise" } } + } + ) { + aggregate { + sum { + amount + } + } + } + piscineGoXP: transaction_aggregate( + where: { type: { _eq: "xp" }, path: { _like: "%bh-piscine%" } } + ) { + aggregate { + sum { + amount + } + } + } + piscineJsXP: transaction_aggregate( + where: { type: { _eq: "xp" }, path: { _like: "%piscine-js%" } } + ) { + aggregate { + sum { + amount + } + } + } + currentLevel: transaction( + order_by: { amount: desc } + limit: 1 + where: { type: { _eq: "level" }, path: { _like: $modulePattern } } + ) { + amount + } + transactions: transaction( + where: { type: { _eq: "xp" }, event: { path: { _eq: $modulePath } } } + order_by: { createdAt: asc } + ) { + amount + createdAt + object { + name + type + } + } + skillTransactions: transaction(where: { type: { _like: "skill_%" } }) { + type + amount + } + progress(where: { object: { type: { _eq: "project" } } }) { + grade + object { + name + } + } + } +`; +export const MODULE_PATH = process.env.NEXT_PUBLIC_MODULE_PATH || "/bahrain/bh-module"; diff --git a/src/graphql/queries.ts b/src/graphql/queries.ts deleted file mode 100644 index 2e6b923..0000000 --- a/src/graphql/queries.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { gql } from "@apollo/client"; - -// Fetch basic user information -export const GET_USER_INFO = gql` - query GetUserInfo { - user { - id - login - email - attrs - } -} -`; -// Fetch all transactions for XP breakdown -export const GET_TRANSACTIONS = gql` - query GetTransactions { - transaction( - where: { - type: { _eq: "xp" } - _or: [ - { object: { type: { _eq: "project" } } } - { - object: { type: { _eq: "exercise" } } - event: { path: { _eq: "/bahrain/bh-module" } } - } - ] - } - order_by: { createdAt: asc } - ) { - amount - createdAt - object { - name - type - } - } - } -`; - -// Fetch the total XP -export const GET_TOTAL_XP = gql` - query GetTotalXP { - transaction_aggregate( - where: { - event: { path: { _eq: "/bahrain/bh-module" } } - type: { _eq: "xp" } - } - ) { - aggregate { - sum { - amount - } - } - } - } -`; - -export const GET_LEVEL_PROGRESS = gql` - query GetLevelProgress { - currentLevel: transaction( - order_by: { amount: desc } - limit: 1 - where: { type: { _eq: "level" }, path: { _like: "/bahrain/bh-module%" } } - ) { - amount - } - totalXP: transaction_aggregate( - where: { - type: { _eq: "xp" } - event: { path: { _eq: "/bahrain/bh-module" } } - } - ) { - aggregate { - sum { - amount - } - } - } - } - ` ; - -// Fetch top transaction (highest XP gain) -export const GET_TOP_TRANSACTION = gql` - query GetTopTransaction { - transaction( - order_by: { amount: desc } - limit: 1 - where: { type: { _eq: "level" }, path: { _like: "/bahrain/bh-module%" } } - ) { - amount - } - } -`; - -// Fetch audit stats -export const GET_AUDIT_STATS = gql` - query GetAuditStats { - user { - auditRatio - totalUp - totalDown - } - } -`; - -// Fetch valid and failed audits -export const GET_AUDITS = gql` - query GetAudits { - user { - validAudits: audits_aggregate( - where: { grade: { _gte: 1 } } - order_by: { createdAt: desc } - ) { - nodes { - group { - captainLogin - createdAt - } - } - } - failedAudits: audits_aggregate( - where: { grade: { _lt: 1 } } - order_by: { createdAt: desc } - ) { - nodes { - group { - captainLogin - createdAt - } - } - } - } - } -`; - -// Fetch XP breakdown by projects and exercises -export const GET_XP_BREAKDOWN = gql` - query GetXPBreakdown { - transaction( - where: { type: { _eq: "xp" } } - order_by: { createdAt: asc } - ) { - amount - object { - type - name - } - } - } -`; - -// Fetch user progress (project grades) -export const GET_PROJECT_PROGRESS = gql` - query GetProjectProgress { - progress(where: { object: { type: { _eq: "project" } } }) { - grade - object { - name - } - } - } -`; - -// Get Total XP and Breakdown -export const GET_TOTAL_AND_BREAKDOWN_XP = gql` - query GetTotalAndBreakdownXP { - totalXP: transaction_aggregate( - where: { - type: { _eq: "xp" } - event: { path: { _eq: "/bahrain/bh-module" } } - } - ) { - aggregate { - sum { - amount - } - } - } - piscineGoXP: transaction_aggregate( - where: { type: { _eq: "xp" }, path: { _like: "%bh-piscine%" } } - ) { - aggregate { - sum { - amount - } - } - } - piscineJsXP: transaction_aggregate( - where: { type: { _eq: "xp" }, path: { _like: "%piscine-js%" } } - ) { - aggregate { - sum { - amount - } - } - } - projectXP: transaction_aggregate( - where: { type: { _eq: "xp" }, object: { type: { _eq: "project" } } } - ) { - aggregate { - sum { - amount - } - } - } - exerciseXP: transaction_aggregate( - where: { type: { _eq: "xp" }, object: { type: { _eq: "exercise" } } } - ) { - aggregate { - sum { - amount - } - } - } - } -`; - - -export const GET_SKILL_TRANSACTIONS = gql` - query GetSkillTransactions { - skillTransactions: transaction( - where: { - _and: [ - { type: { _neq: "xp" } } - { type: { _neq: "up" } } - { type: { _neq: "down" } } - { type: { _neq: "level" } } - ] - } - ) { - type - amount - } - } -`; - - -export const GET_PROJECT_TRANSACTIONS = gql` - query GetProjectTransactions { - transaction( - where: { - type: { _eq: "xp" } - object: { type: { _eq: "project" } } - } - order_by: { createdAt: asc } - ) { - amount - object { - type - name - } - createdAt - } - } -`; diff --git a/src/lib/apollo.ts b/src/lib/apollo.ts new file mode 100644 index 0000000..b7eb3d7 --- /dev/null +++ b/src/lib/apollo.ts @@ -0,0 +1,35 @@ +import { ApolloClient, InMemoryCache, createHttpLink } from "@apollo/client"; +import { setContext } from "@apollo/client/link/context"; +import { onError } from "@apollo/client/link/error"; +import { clearSession, getSession, GRAPHQL_ENDPOINT } from "./auth"; + +export function createGraphQLClient(fetcher: typeof fetch = fetch) { + const auth = setContext((_, { headers }) => { + // Resolve the tab's current token for every operation, including manual refreshes. + const token = getSession(); + return { headers: { ...headers, ...(token ? { Authorization: `Bearer ${token}` } : {}) } }; + }); + const errors = onError(({ graphQLErrors, networkError }) => { + const expired = + graphQLErrors?.some((error) => + ["invalid-jwt", "jwt-expired", "UNAUTHENTICATED"].includes(String(error.extensions?.code)), + ) || + (networkError && "statusCode" in networkError && networkError.statusCode === 401); + if (expired && typeof window !== "undefined") { + clearSession(); + window.dispatchEvent(new Event("graphite:session-expired")); + } + }); + const boundedFetch: typeof fetch = (input, init) => { + const timeout = AbortSignal.timeout(20000); + const signal = init?.signal ? AbortSignal.any([init.signal, timeout]) : timeout; + return fetcher(input, { ...init, signal, cache: "no-store" }); + }; + return new ApolloClient({ + link: errors + .concat(auth) + .concat(createHttpLink({ uri: GRAPHQL_ENDPOINT, fetch: boundedFetch })), + cache: new InMemoryCache(), + defaultOptions: { watchQuery: { fetchPolicy: "cache-and-network", errorPolicy: "none" } }, + }); +} diff --git a/src/lib/auth.ts b/src/lib/auth.ts new file mode 100644 index 0000000..a6139be --- /dev/null +++ b/src/lib/auth.ts @@ -0,0 +1,73 @@ +import { jwtDecode } from "jwt-decode"; + +const TOKEN_KEY = "graphite.session"; +export const AUTH_ENDPOINT = + process.env.NEXT_PUBLIC_AUTH_URL || "https://learn.reboot01.com/api/auth/signin"; +export const GRAPHQL_ENDPOINT = + process.env.NEXT_PUBLIC_GRAPHQL_URL || "https://learn.reboot01.com/api/graphql-engine/v1/graphql"; + +export function isValidSession(token: unknown, now = Date.now()): token is string { + if (typeof token !== "string" || token.split(".").length !== 3) return false; + try { + const payload = jwtDecode<{ exp?: number }>(token); + return ( + typeof payload.exp === "number" && Number.isFinite(payload.exp) && payload.exp * 1000 > now + ); + } catch { + return false; + } +} + +export function getSession(): string | null { + if (typeof window === "undefined") return null; + try { + const token = sessionStorage.getItem(TOKEN_KEY); + if (isValidSession(token)) return token; + sessionStorage.removeItem(TOKEN_KEY); + } catch { + /* Unavailable storage is an unsigned-in session. */ + } + return null; +} + +export function saveSession(token: unknown): void { + if (!isValidSession(token)) + throw new Error("The server returned an invalid session. Please try signing in again."); + sessionStorage.setItem(TOKEN_KEY, token); + // Retire the previous app's persistent token; new sessions last for this tab only. + localStorage.removeItem("authToken"); +} + +export function clearSession(): void { + try { + sessionStorage.removeItem(TOKEN_KEY); + localStorage.removeItem("authToken"); + } catch { + /* Storage may be disabled. */ + } +} + +export function encodeCredentials(identifier: string, password: string): string { + const bytes = new TextEncoder().encode(`${identifier}:${password}`); + return btoa(Array.from(bytes, (byte) => String.fromCharCode(byte)).join("")); +} + +export async function signIn(identifier: string, password: string): Promise { + const response = await fetch(AUTH_ENDPOINT, { + method: "POST", + headers: { + Authorization: `Basic ${encodeCredentials(identifier.trim(), password)}`, + "Content-Type": "application/json", + }, + signal: AbortSignal.timeout(15000), + cache: "no-store", + }); + if (!response.ok) { + if (response.status === 401 || response.status === 403) + throw new Error("That username or password isn’t correct. Please try again."); + if (response.status === 429) + throw new Error("Too many attempts. Please wait a moment before trying again."); + throw new Error("Reboot01 is unavailable right now. Please try again shortly."); + } + saveSession(await response.json()); +} diff --git a/src/lib/dashboard.ts b/src/lib/dashboard.ts new file mode 100644 index 0000000..578539b --- /dev/null +++ b/src/lib/dashboard.ts @@ -0,0 +1,190 @@ +export type Transaction = { + amount: number; + createdAt: string; + object: { name: string; type: string } | null; +}; +export type Aggregate = { aggregate: { sum: { amount: number | null } | null } | null }; +export type AuditNode = { group: { captainLogin: string; createdAt: string } | null }; +export type Learner = { + id: number; + login: string; + email: string; + attrs: Record | string | null; + auditRatio: number | null; + totalUp: number; + totalDown: number; + validAudits: { nodes: AuditNode[] }; + failedAudits: { nodes: AuditNode[] }; +}; +export type DashboardData = { + user: Learner[]; + moduleXP: Aggregate; + projectXP: Aggregate; + exerciseXP: Aggregate; + piscineGoXP: Aggregate; + piscineJsXP: Aggregate; + currentLevel: { amount: number }[]; + transactions: Transaction[]; + skillTransactions: { type: string; amount: number }[]; + progress: { grade: number | null; object: { name: string } | null }[]; +}; +export type Period = "all" | "6m" | "3m"; +export type Project = { + name: string; + xp: number; + date: string | null; + grade: number | null; + status: "Passed" | "In progress" | "Retry"; +}; + +export const ranks = [ + { name: "Aspiring Developer", level: 0 }, + { name: "Beginner Developer", level: 10 }, + { name: "Apprentice Developer", level: 20 }, + { name: "Assistant Developer", level: 30 }, + { name: "Basic Developer", level: 40 }, + { name: "Junior Developer", level: 50 }, + { name: "Confirmed Developer", level: 55 }, + { name: "Full-Stack Developer", level: 60 }, +]; + +export function getRank(level: number) { + const safeLevel = Number.isFinite(level) ? Math.max(0, level) : 0; + // Search from the highest milestone so level 60+ remains in the final rank. + const current = [...ranks].reverse().find((rank) => safeLevel >= rank.level) || ranks[0]; + const next = ranks.find((rank) => rank.level > safeLevel) || null; + const percentage = next + ? Math.min(100, ((safeLevel - current.level) / (next.level - current.level)) * 100) + : 100; + return { current, next, percentage, remaining: next ? next.level - safeLevel : 0 }; +} + +export function formatXP(value: number, digits = 1) { + const n = Number.isFinite(value) ? value : 0; + if (Math.abs(n) >= 1000000) return `${(n / 1000000).toFixed(digits)} MB`; + if (Math.abs(n) >= 1000) return `${(n / 1000).toFixed(digits)} kB`; + return `${Math.round(n)} B`; +} +export const amountOf = (value: Aggregate | undefined) => value?.aggregate?.sum?.amount || 0; +export function readableName(name: string) { + return name.replace(/^skill_/, "").replace(/[-_]/g, " "); +} +export function userAttrs(user: Learner): Record { + if (typeof user.attrs === "string") { + try { + const parsed = JSON.parse(user.attrs); + return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}; + } catch { + return {}; + } + } + return user.attrs && !Array.isArray(user.attrs) ? user.attrs : {}; +} + +export function getSkills(transactions: DashboardData["skillTransactions"]) { + const values = new Map(); + // Skill transactions record attained percentages, rather than additive XP awards. + for (const transaction of transactions) { + if (!transaction.type.startsWith("skill_") || !Number.isFinite(transaction.amount)) continue; + values.set( + transaction.type, + Math.max(values.get(transaction.type) || 0, Math.min(100, Math.max(0, transaction.amount))), + ); + } + return [...values] + .map(([type, value]) => ({ name: readableName(type), value })) + .sort((a, b) => b.value - a.value); +} + +export function getProjects(data: Pick): Project[] { + const projects = new Map(); + for (const transaction of data.transactions) { + if (transaction.object?.type !== "project") continue; + const name = transaction.object.name; + const item = projects.get(name) || { + name, + xp: 0, + date: null, + grade: null, + status: "Passed" as const, + }; + item.xp += Number.isFinite(transaction.amount) ? transaction.amount : 0; + if ( + !Number.isNaN(Date.parse(transaction.createdAt)) && + (!item.date || transaction.createdAt > item.date) + ) + item.date = transaction.createdAt; + projects.set(name, item); + } + for (const progress of data.progress) { + if (!progress.object) continue; + const name = progress.object.name; + const item = projects.get(name) || { + name, + xp: 0, + date: null, + grade: null, + status: "In progress" as const, + }; + if (progress.grade !== null && Number.isFinite(progress.grade)) + item.grade = Math.max(item.grade ?? -Infinity, progress.grade); + item.status = + item.xp > 0 || (item.grade !== null && item.grade >= 1) + ? "Passed" + : item.grade === null + ? "In progress" + : "Retry"; + projects.set(name, item); + } + return [...projects.values()].sort( + (a, b) => (b.date || "").localeCompare(a.date || "") || a.name.localeCompare(b.name), + ); +} + +export function getTimeline(transactions: Transaction[], period: Period, anchor: Date) { + const valid = transactions + .filter( + (t) => + Number.isFinite(t.amount) && + !Number.isNaN(Date.parse(t.createdAt)) && + Date.parse(t.createdAt) <= anchor.getTime(), + ) + .sort((a, b) => Date.parse(a.createdAt) - Date.parse(b.createdAt)); + if (!valid.length) return []; + const end = new Date(Date.UTC(anchor.getUTCFullYear(), anchor.getUTCMonth(), 1)); + const earliest = new Date(valid[0].createdAt); + const start = + period === "all" + ? new Date(Date.UTC(earliest.getUTCFullYear(), earliest.getUTCMonth(), 1)) + : new Date(Date.UTC(end.getUTCFullYear(), end.getUTCMonth() - (period === "6m" ? 5 : 2), 1)); + let cumulative = valid + .filter((t) => Date.parse(t.createdAt) < start.getTime()) + .reduce((sum, t) => sum + t.amount, 0); + const monthly = new Map(); + for (const item of valid) { + const date = new Date(item.createdAt); + const key = `${date.getUTCFullYear()}-${date.getUTCMonth()}`; + monthly.set(key, (monthly.get(key) || 0) + item.amount); + } + const points: { label: string; month: string; earned: number; total: number }[] = []; + for (const month = new Date(start); month <= end; month.setUTCMonth(month.getUTCMonth() + 1)) { + const earned = monthly.get(`${month.getUTCFullYear()}-${month.getUTCMonth()}`) || 0; + cumulative += earned; + points.push({ + label: month.toLocaleDateString("en", { month: "short", year: "2-digit", timeZone: "UTC" }), + month: month.toISOString(), + earned, + total: cumulative, + }); + } + return points; +} + +export function getAudits(user: Learner) { + return [ + ...(user.validAudits?.nodes || []).map((node) => ({ ...node, status: "Passed" as const })), + ...(user.failedAudits?.nodes || []).map((node) => ({ ...node, status: "Failed" as const })), + ] + .filter((node) => node.group) + .sort((a, b) => (b.group?.createdAt || "").localeCompare(a.group?.createdAt || "")); +} diff --git a/src/lib/demo-data.ts b/src/lib/demo-data.ts new file mode 100644 index 0000000..800d52b --- /dev/null +++ b/src/lib/demo-data.ts @@ -0,0 +1,89 @@ +import type { DashboardData, Aggregate, Transaction } from "./dashboard"; + +// Deliberately fictional fixtures. Never substitute these for a failed live API request. +export const DEMO_DATE = "2026-09-09T23:59:59.000Z"; +const awards = [ + ["go-reloaded", 24500, "2026-03-08"], + ["ascii-art", 32500, "2026-03-26"], + ["ascii-art-web", 38400, "2026-04-05"], + ["groupie-tracker", 42500, "2026-04-22"], + ["lem-in", 55200, "2026-05-07"], + ["net-cat", 48000, "2026-05-28"], + ["forum", 86000, "2026-06-16"], + ["make-your-game", 52000, "2026-06-25"], + ["real-time-forum", 92000, "2026-07-18"], + ["graphql", 62500, "2026-08-02"], + ["social-network", 104000, "2026-08-21"], + ["mini-framework", 79000, "2026-09-08"], +] as const; +const transactions: Transaction[] = awards.map(([name, amount, date]) => ({ + amount, + createdAt: `${date}T12:00:00.000Z`, + object: { name, type: "project" }, +})); +transactions.push({ + amount: 18000, + createdAt: "2026-05-14T12:00:00.000Z", + object: { name: "module-exercises", type: "exercise" }, +}); +const aggregate = (amount: number): Aggregate => ({ aggregate: { sum: { amount } } }); +const total = transactions.reduce((sum, item) => sum + item.amount, 0); + +export const demoData: DashboardData = { + user: [ + { + id: 101, + login: "alex.demo", + email: "alex@example.com", + attrs: { + firstName: "Alex", + lastName: "Morgan", + country: "Bahrain", + addressCity: "Manama", + qualification: "Software development", + employment: "Student", + }, + auditRatio: 1.34, + totalUp: 1809000, + totalDown: 1350000, + validAudits: { + nodes: Array.from({ length: 19 }, (_, index) => ({ + group: { + captainLogin: ["sara.demo", "omar.demo", "noor.demo", "zain.demo"][index % 4], + createdAt: new Date(Date.UTC(2026, 8, 9 - index * 3)).toISOString(), + }, + })), + }, + failedAudits: { + nodes: Array.from({ length: 5 }, (_, index) => ({ + group: { + captainLogin: ["leo.demo", "maya.demo"][index % 2], + createdAt: new Date(Date.UTC(2026, 8, 6 - index * 8)).toISOString(), + }, + })), + }, + }, + ], + moduleXP: aggregate(total), + projectXP: aggregate(total - 18000), + exerciseXP: aggregate(18000), + piscineGoXP: aggregate(104800), + piscineJsXP: aggregate(86300), + currentLevel: [{ amount: 42 }], + transactions, + skillTransactions: [ + { type: "skill_go", amount: 87 }, + { type: "skill_js", amount: 79 }, + { type: "skill_html", amount: 75 }, + { type: "skill_css", amount: 72 }, + { type: "skill_sql", amount: 66 }, + { type: "skill_graphql", amount: 61 }, + { type: "skill_unix", amount: 57 }, + { type: "skill_docker", amount: 54 }, + { type: "skill_go", amount: 60 }, + ], + progress: [ + ...awards.map(([name], index) => ({ object: { name }, grade: 1 + (index % 4) * 0.05 })), + { object: { name: "rust-piscine" }, grade: null }, + ], +}; diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index f7c22ec..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: {}, - }, - plugins: [], -} - diff --git a/tailwind.config.ts b/tailwind.config.ts index fff2d7a..109807b 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -14,5 +14,5 @@ export default { }, }, }, - plugins: [require('daisyui')], + plugins: [], } satisfies Config; diff --git a/tests/apollo.test.ts b/tests/apollo.test.ts new file mode 100644 index 0000000..7a47cd7 --- /dev/null +++ b/tests/apollo.test.ts @@ -0,0 +1,91 @@ +import test, { afterEach } from "node:test"; +import assert from "node:assert/strict"; +import { gql } from "@apollo/client"; +import { createGraphQLClient } from "../src/lib/apollo"; +import { getSession, saveSession } from "../src/lib/auth"; + +function installBrowser() { + const session = new Map(); + const store = { + getItem: (key: string) => session.get(key) ?? null, + setItem: (key: string, value: string) => { + session.set(key, value); + }, + removeItem: (key: string) => { + session.delete(key); + }, + }; + Object.defineProperty(globalThis, "sessionStorage", { value: store, configurable: true }); + Object.defineProperty(globalThis, "localStorage", { + value: { removeItem() {} }, + configurable: true, + }); + const events = new EventTarget(); + Object.defineProperty(globalThis, "window", { value: events, configurable: true }); + return events; +} +const jwt = (sub: string) => + `e30.${Buffer.from(JSON.stringify({ sub, exp: Math.floor(Date.now() / 1000) + 3600 })).toString("base64url")}.test`; +const query = gql` + query Ping { + ping + } +`; +afterEach(() => { + Reflect.deleteProperty(globalThis, "window"); + Reflect.deleteProperty(globalThis, "sessionStorage"); + Reflect.deleteProperty(globalThis, "localStorage"); +}); + +test("Apollo resolves the latest token for every request, including token replacement", async () => { + installBrowser(); + const seen: (string | null)[] = []; + const client = createGraphQLClient(async (_, init) => { + seen.push(new Headers(init?.headers).get("authorization")); + assert.equal(init?.cache, "no-store"); + assert.ok(init?.signal); + return new Response(JSON.stringify({ data: { ping: "ok" } }), { + headers: { "content-type": "application/json" }, + }); + }); + const first = jwt("one"); + const second = jwt("two"); + saveSession(first); + await client.query({ query, fetchPolicy: "network-only" }); + saveSession(second); + await client.query({ query, fetchPolicy: "network-only" }); + assert.deepEqual(seen, [`Bearer ${first}`, `Bearer ${second}`]); + client.stop(); +}); + +test("an invalid-jwt response clears the session and signals the profile guard", async () => { + const events = installBrowser(); + saveSession(jwt("one")); + let expired = false; + events.addEventListener("graphite:session-expired", () => { + expired = true; + }); + const client = createGraphQLClient( + async () => + new Response( + JSON.stringify({ errors: [{ message: "Expired", extensions: { code: "invalid-jwt" } }] }), + { headers: { "content-type": "application/json" } }, + ), + ); + await assert.rejects(client.query({ query, fetchPolicy: "network-only" })); + assert.equal(getSession(), null); + assert.equal(expired, true); + client.stop(); +}); + +test("API outages do not erase a valid session or return sample data", async () => { + installBrowser(); + const token = jwt("one"); + saveSession(token); + const client = createGraphQLClient( + async () => new Response("Service unavailable", { status: 503 }), + ); + await assert.rejects(client.query({ query, fetchPolicy: "network-only" })); + assert.equal(getSession(), token); + client.stop(); +}); diff --git a/tests/auth.test.ts b/tests/auth.test.ts new file mode 100644 index 0000000..fe9c560 --- /dev/null +++ b/tests/auth.test.ts @@ -0,0 +1,120 @@ +import test, { afterEach } from "node:test"; +import assert from "node:assert/strict"; +import { + clearSession, + encodeCredentials, + getSession, + isValidSession, + saveSession, + signIn, + AUTH_ENDPOINT, +} from "../src/lib/auth"; + +const originalFetch = globalThis.fetch; +const token = (exp: number) => + `e30.${Buffer.from(JSON.stringify({ exp })).toString("base64url")}.signature`; +function mockStorage() { + const data = new Map(); + return { + getItem: (key: string) => data.get(key) ?? null, + setItem: (key: string, value: string) => { + data.set(key, value); + }, + removeItem: (key: string) => { + data.delete(key); + }, + }; +} +function installStorage() { + Object.defineProperty(globalThis, "window", { value: {}, configurable: true }); + Object.defineProperty(globalThis, "sessionStorage", { value: mockStorage(), configurable: true }); + Object.defineProperty(globalThis, "localStorage", { value: mockStorage(), configurable: true }); +} +afterEach(() => { + globalThis.fetch = originalFetch; + Reflect.deleteProperty(globalThis, "window"); + Reflect.deleteProperty(globalThis, "sessionStorage"); + Reflect.deleteProperty(globalThis, "localStorage"); +}); + +test("expired, malformed, and missing-expiry tokens fail the client session check", () => { + const now = 100000; + assert.equal(isValidSession(token(101), now), true); + assert.equal(isValidSession(token(100), now), false); + assert.equal(isValidSession("e30.e30.sig", now), false); + assert.equal(isValidSession("invalid", now), false); + assert.equal(isValidSession(null, now), false); +}); + +test("credentials preserve UTF-8 characters and password whitespace", () => { + assert.equal( + Buffer.from(encodeCredentials("علي", " páss "), "base64").toString("utf8"), + "علي: páss ", + ); +}); + +test("session storage replaces the legacy token and is cleared on sign-out", () => { + installStorage(); + localStorage.setItem("authToken", "legacy"); + const value = token(Math.floor(Date.now() / 1000) + 3600); + saveSession(value); + assert.equal(localStorage.getItem("authToken"), null); + assert.equal(getSession(), value); + clearSession(); + assert.equal(getSession(), null); +}); + +test("expired stored sessions are discarded", () => { + installStorage(); + sessionStorage.setItem("graphite.session", token(1)); + assert.equal(getSession(), null); + assert.equal(sessionStorage.getItem("graphite.session"), null); +}); + +test("server rendering has no session and rejected storage is handled", () => { + assert.equal(getSession(), null); + Object.defineProperty(globalThis, "window", { value: {}, configurable: true }); + Object.defineProperty(globalThis, "sessionStorage", { + get: () => { + throw new Error("blocked"); + }, + configurable: true, + }); + assert.equal(getSession(), null); +}); + +test("sign-in calls only the configured endpoint and saves a valid session", async () => { + installStorage(); + const value = token(Math.floor(Date.now() / 1000) + 3600); + globalThis.fetch = async (input, init) => { + assert.equal(input, AUTH_ENDPOINT); + assert.equal(init?.method, "POST"); + assert.equal(init?.cache, "no-store"); + const headers = new Headers(init?.headers); + assert.equal(headers.get("authorization"), `Basic ${encodeCredentials("alex", "secret")}`); + return new Response(JSON.stringify(value), { status: 200 }); + }; + await signIn(" alex ", "secret"); + assert.equal(getSession(), value); +}); + +test("failed logins and invalid successful responses never create sessions", async () => { + installStorage(); + globalThis.fetch = async () => new Response("denied", { status: 401 }); + await assert.rejects(signIn("alex", "wrong"), /isn’t correct/); + assert.equal(getSession(), null); + globalThis.fetch = async () => new Response('"not-a-token"', { status: 200 }); + await assert.rejects(signIn("alex", "wrong"), /invalid session/); + assert.equal(getSession(), null); +}); + +test("rate limits, outages, and network failures remain failures", async () => { + globalThis.fetch = async () => new Response(null, { status: 429 }); + await assert.rejects(signIn("alex", "secret"), /Too many attempts/); + globalThis.fetch = async () => new Response(null, { status: 503 }); + await assert.rejects(signIn("alex", "secret"), /unavailable/); + globalThis.fetch = async () => { + throw new TypeError("offline"); + }; + await assert.rejects(signIn("alex", "secret"), /offline/); +}); diff --git a/tests/dashboard.test.ts b/tests/dashboard.test.ts new file mode 100644 index 0000000..298e614 --- /dev/null +++ b/tests/dashboard.test.ts @@ -0,0 +1,159 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { + amountOf, + formatXP, + getAudits, + getProjects, + getRank, + getSkills, + getTimeline, + userAttrs, + type Transaction, +} from "../src/lib/dashboard"; +import { demoData, DEMO_DATE } from "../src/lib/demo-data"; + +test("rank boundaries include the final milestone and levels above it", () => { + assert.equal(getRank(0).current.name, "Aspiring Developer"); + assert.equal(getRank(40).current.name, "Basic Developer"); + assert.equal(getRank(42).percentage, 20); + assert.equal(getRank(42).remaining, 8); + assert.equal(getRank(60).current.name, "Full-Stack Developer"); + assert.equal(getRank(80).next, null); + assert.equal(getRank(80).percentage, 100); + assert.equal(getRank(-5).percentage, 0); + assert.equal(getRank(NaN).current.level, 0); +}); + +test("skill percentages use maxima and exclude unrelated transactions", () => { + assert.deepEqual( + getSkills([ + { type: "skill_go", amount: 25 }, + { type: "skill_go", amount: 70 }, + { type: "skill_go", amount: 40 }, + { type: "xp", amount: 4000 }, + { type: "skill_js", amount: 150 }, + { type: "skill_rust", amount: -5 }, + ]), + [ + { name: "js", value: 100 }, + { name: "go", value: 70 }, + { name: "rust", value: 0 }, + ], + ); + assert.deepEqual(getSkills([{ type: "skill_css", amount: NaN }]), []); +}); + +test("byte formatting remains valid for empty, exact-unit, and nonfinite amounts", () => { + assert.equal(formatXP(0), "0 B"); + assert.equal(formatXP(999), "999 B"); + assert.equal(formatXP(1000), "1.0 kB"); + assert.equal(formatXP(1000000), "1.0 MB"); + assert.equal(formatXP(NaN), "0 B"); + assert.equal(amountOf(undefined), 0); + assert.equal(amountOf({ aggregate: { sum: null } }), 0); +}); + +test("timeline carries prior XP into the selected period and fills empty months", () => { + const tx = (amount: number, date: string): Transaction => ({ + amount, + createdAt: date, + object: null, + }); + const result = getTimeline( + [ + tx(100, "2026-01-10"), + tx(50, "2026-04-12"), + tx(25, "2026-06-30"), + tx(900, "invalid"), + tx(1000, "2027-01-01"), + ], + "3m", + new Date("2026-06-30T23:59:59Z"), + ); + assert.equal(result.length, 3); + assert.deepEqual( + result.map((point) => point.earned), + [50, 0, 25], + ); + assert.deepEqual( + result.map((point) => point.total), + [150, 150, 175], + ); + assert.equal(result[0].month, "2026-04-01T00:00:00.000Z"); +}); + +test("timeline handles year boundaries, unsorted awards, and empty results", () => { + const transactions: Transaction[] = [ + { amount: 30, createdAt: "2026-01-02", object: null }, + { amount: 10, createdAt: "2025-11-01", object: null }, + ]; + const timeline = getTimeline(transactions, "all", new Date("2026-01-31")); + assert.deepEqual( + timeline.map((point) => point.total), + [10, 10, 40], + ); + assert.deepEqual(getTimeline([], "all", new Date()), []); +}); + +test("projects combine multiple awards and grades without counting exercise XP", () => { + const results = getProjects({ + transactions: [ + { amount: 1000, createdAt: "2026-05-02", object: { name: "graphql", type: "project" } }, + { amount: 500, createdAt: "2026-05-03", object: { name: "graphql", type: "project" } }, + { amount: 700, createdAt: "2026-05-03", object: { name: "practice", type: "exercise" } }, + ], + progress: [ + { object: { name: "graphql" }, grade: 0.5 }, + { object: { name: "graphql" }, grade: 1.1 }, + { object: { name: "forum" }, grade: null }, + { object: { name: "net-cat" }, grade: 0.7 }, + { object: null, grade: 1 }, + ], + }); + assert.equal(results.length, 3); + assert.deepEqual(results[0], { + name: "graphql", + xp: 1500, + date: "2026-05-03", + grade: 1.1, + status: "Passed", + }); + assert.equal(results.find((project) => project.name === "forum")?.status, "In progress"); + assert.equal(results.find((project) => project.name === "net-cat")?.status, "Retry"); +}); + +test("profile attributes tolerate stringified, absent, and malformed values", () => { + const user = demoData.user[0]; + assert.deepEqual(userAttrs({ ...user, attrs: '{"firstName":"Alex"}' }), { firstName: "Alex" }); + assert.deepEqual(userAttrs({ ...user, attrs: "not-json" }), {}); + assert.deepEqual(userAttrs({ ...user, attrs: "[]" }), {}); + assert.deepEqual(userAttrs({ ...user, attrs: null }), {}); +}); + +test("audit history removes missing groups and preserves pass/fail distinctions", () => { + const rows = getAudits({ + ...demoData.user[0], + validAudits: { + nodes: [{ group: null }, { group: { captainLogin: "one", createdAt: "2026-04-01" } }], + }, + failedAudits: { nodes: [{ group: { captainLogin: "two", createdAt: "2026-05-01" } }] }, + }); + assert.deepEqual( + rows.map((row) => row.status), + ["Failed", "Passed"], + ); +}); + +test("sample totals reconcile across cards, timeline, and project rows", () => { + const total = amountOf(demoData.moduleXP); + const points = getTimeline(demoData.transactions, "all", new Date(DEMO_DATE)); + assert.equal(points.at(-1)?.total, total); + assert.equal(amountOf(demoData.projectXP) + amountOf(demoData.exerciseXP), total); + assert.equal( + getProjects(demoData).reduce((sum, project) => sum + project.xp, 0), + amountOf(demoData.projectXP), + ); + assert.equal(getProjects(demoData).filter((project) => project.status === "Passed").length, 12); + assert.equal(getAudits(demoData.user[0]).length, 24); +}); diff --git a/tests/query.test.ts b/tests/query.test.ts new file mode 100644 index 0000000..3488249 --- /dev/null +++ b/tests/query.test.ts @@ -0,0 +1,24 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { print, visit, type ArgumentNode, type FieldNode } from "graphql"; +import { GET_DASHBOARD } from "../src/graphql/dashboard-query"; + +test("all module XP views use the same event scope and no mutation is present", () => { + const scoped = new Set(["moduleXP", "projectXP", "exerciseXP", "transactions"]); + const visited = new Set(); + visit(GET_DASHBOARD, { + OperationDefinition(node) { + assert.equal(node.operation, "query"); + }, + Field(node: FieldNode) { + if (!node.alias || !scoped.has(node.alias.value)) return; + const where = node.arguments?.find( + (argument: ArgumentNode) => argument.name.value === "where", + ); + assert.ok(where); + assert.match(print(where), /event:\s*\{\s*path:\s*\{\s*_eq: \$modulePath/); + visited.add(node.alias.value); + }, + }); + assert.deepEqual(visited, scoped); +});