diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b15f726 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# ---- Python (backend) ---- +backend/.venv/ +.venv/ +__pycache__/ +*.py[cod] +*.egg-info/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ + +# ---- Node (frontend) ---- +node_modules/ +frontend/dist/ +frontend/dist-ssr/ +*.local + +# ---- Traktor data ---- +# The collection is personal, large, and irreplaceable — don't commit it. +# Remove this if you deliberately want to version a sample .nml. +*.nml +# Backups Konduktor will create before any write (Phase 3+). +*.nml.bak +*.nml.backup +backups/ + +# ---- Editor / OS ---- +.vscode/ +.idea/ +.DS_Store +Thumbs.db +*.swp + +# ---- Logs / env ---- +*.log +.env +.env.* diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..e6dcbcb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,98 @@ +# CLAUDE.md + +Guidance for working in this repo. Read before making changes. + +## What this is + +**Konduktor** — a library-management and track-preparation tool for **Native +Instruments Traktor** (Pro 4 / NML v20), built on the `traktor-nml-utils` +library. The user is a DJ; the goal is a polished, multiplatform web app for +browsing the collection and editing playlists, later possibly wrapped in Tauri. + +## Architecture + +Two independent apps that talk over HTTP: + +- **`backend/`** — Python + FastAPI. Parses `collection.nml` via + `traktor-nml-utils` and serves a query API. Entry point: + [backend/konduktor/main.py](backend/konduktor/main.py). + - `collection_service.py` — loads the NML once into memory, flattens ENTRYs + into `Track` objects, indexes them by primary key, and builds the playlist + tree. All query logic (filter/sort/facets/stats) lives here. + - `schemas.py` — Pydantic response models. + - `main.py` — FastAPI routes (all under `/api`). +- **`frontend/`** — React + TypeScript + Vite. A dark, virtualized track + explorer. Entry: [frontend/src/App.tsx](frontend/src/App.tsx). + - `api.ts` — typed client + all API types (keep in sync with backend + `schemas.py`). + - `components/` — `Sidebar` (playlist tree), `Toolbar` (search/filters), + `TrackTable` (TanStack Table + Virtual grid), `StatusBar`, `RatingStars`. + - Data flow: the whole library is fetched once (`/api/tracks?limit=20000`); + filtering and sorting happen **client-side** for instant interaction. + Styling is Tailwind v4 with design tokens in `src/index.css`. + +## Commands + +```bash +./dev.sh # start both servers (see README for one-time setup) + +# Backend +cd backend && source .venv/bin/activate +uvicorn konduktor.main:app --reload --port 8000 +# point at another file: KONDUKTOR_NML=/path/to/collection.nml uvicorn ... + +# Frontend +cd frontend +npm run dev # dev server (proxies /api -> :8000) +npm run build # tsc -b && vite build — run this to typecheck +``` + +There is no test suite yet. Validate the backend with the Swagger UI at +`http://localhost:8000/docs`; validate the frontend by loading +`http://localhost:5173`. + +## Critical gotchas — read these + +1. **`traktor-nml-utils` MUST come from GitHub, not PyPI.** PyPI's `3.1.0` is + stale and **cannot parse Traktor Pro 4 (NML v20)** files — its strict parser + dies on the v4 `` element inside `CUE_V2`. `requirements.txt` pins the + GitHub `master` (v4.0.0). Do not "simplify" this to a plain PyPI pin. +2. **Never write to the user's `collection.nml`.** It is real, irreplaceable + data (8,485 tracks). The app is read-only today. Phase 3 writes must operate + on a copy and **back up first**. +3. **Saving is lossy.** The library's `save()` re-serializes the entire file + (reflows whitespace, `124.000000`→`124.0`, reorders attributes) and does + **not** update count attributes (e.g. `PLAYLIST ENTRIES`). For Phase 3, prefer + **surgical edits** to just the `PLAYLISTS` node (e.g. via lxml), recompute + counts, and back up — do not round-trip the whole 14 MB collection. + +## Data model notes + +- **Track primary key** = `f"{location.volume}{location.dir}{location.file}"`, + e.g. `Macintosh HD/:Music/:one.mp3`. This is how playlist entries + (`PRIMARYKEY.KEY`) join to collection tracks. `Track.id` uses this. +- **Rating** = `RANKING / 51`, giving 0–5 stars (`_rating_stars`). +- **Key** is Traktor's display key string, e.g. `"10m"` (Open Key notation). +- **Playlist tree**: recurse `nml.playlists.node.subnodes.node`. A node's `.type` + is `FOLDER`, `PLAYLIST`, or `SMARTLIST`. Smart playlists are rule-based and + have no static entry list. Synthetic ids (`pl-N`/`fld-N`/`sl-N`) are assigned + at load and map to entries in `CollectionService._playlist_entries`. +- Model classes use single-capital names: `Entrytype`, `Primarykeytype`, + `CueV2Type`. `Entrytype` is shared by collection entries and playlist entries. + +## Conventions + +- Backend: type hints, Pydantic models for all responses, keep query logic in + `collection_service.py` (routes stay thin). +- Frontend: functional components, TanStack Query for fetching, Tailwind + utility classes with the `ink-*`/`accent`/`gold` tokens from `index.css`. + Keep `api.ts` types aligned with `schemas.py`. +- Python 3.14 note: pin dependencies loosely enough to get prebuilt wheels + (older `pydantic-core` pins force a from-source Rust build that fails). + +## Roadmap + +- ✅ Phase 1 — backend core + read-only API +- ✅ Phase 2 — track explorer UI +- ⬜ Phase 3 — playlist editing/creation + safe (backup-first, surgical) saves +- ⬜ Phase 4 — polish + optional Tauri desktop packaging diff --git a/README.md b/README.md new file mode 100644 index 0000000..ada7441 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Konduktor + +A library-management and track-preparation tool for **Native Instruments +Traktor** (Pro 4 / NML v20), built on top of +[`traktor-nml-utils`](https://github.com/MrPatben8/traktor-nml-utils). + +- **backend/** — FastAPI service that parses `collection.nml` and serves it as a + query API (tracks, stats, facets, playlists). Read-only in the current phase. +- **frontend/** — React + TypeScript (Vite) track explorer: a polished, dark, + virtualized grid with search, filtering, sorting, and playlist browsing. + +## Quick start + +After the one-time setup below, start everything with a single command: + +```bash +./dev.sh +``` + +Then open **http://localhost:5173**. Press `Ctrl-C` to stop both servers. + +## One-time setup + +You only need to do this once (installs backend and frontend dependencies). + +**Backend** (Python 3.11+): + +```bash +cd backend +python3 -m venv .venv && source .venv/bin/activate +pip install -r requirements.txt +cd .. +``` + +**Frontend** (Node 18+): + +```bash +cd frontend +npm install +cd .. +``` + +## Running the servers manually + +`./dev.sh` runs both for you, but you can also start them in separate terminals: + +**Backend** (terminal 1) — FastAPI on port 8000: + +```bash +cd backend && source .venv/bin/activate +uvicorn konduktor.main:app --reload --port 8000 +``` + +**Frontend** (terminal 2) — Vite on port 5173: + +```bash +cd frontend && npm run dev +``` + +The Vite dev server proxies `/api` to the backend on port 8000, so both must be +running. API docs (Swagger UI): **http://localhost:8000/docs**. + +To point at a different collection file: + +```bash +KONDUKTOR_NML=/path/to/collection.nml uvicorn konduktor.main:app --port 8000 +``` + +## Status + +- ✅ **Phase 1** — backend core + read-only API +- ✅ **Phase 2** — track explorer UI (grid, search, filters, playlist browsing) +- ⬜ **Phase 3** — playlist editing / creation, with backup-first safe saves +- ⬜ **Phase 4** — polish + optional Tauri desktop packaging + +**Safety:** the app never writes to your `.nml`. Writing arrives in Phase 3 and +will always back up first. diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..db53d6d --- /dev/null +++ b/backend/README.md @@ -0,0 +1,56 @@ +# Konduktor — Backend (Phase 1) + +FastAPI service that reads a Traktor Pro 4 `collection.nml` and serves a +query-friendly view of the library: tracks (search / filter / sort), library +stats, filter facets, and the playlist tree with track resolution. + +**Phase 1 is strictly read-only.** It never writes to your `.nml`. Writing +(playlist editing) arrives in Phase 3 and will operate on a backup-first copy. + +## Setup + +```bash +cd backend +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` + +> Note: `traktor-nml-utils` is installed from GitHub `master` (v4.0.0), **not** +> PyPI. The PyPI release (3.1.0) cannot parse Traktor Pro 4 (NML v20) files. + +## Run + +```bash +source .venv/bin/activate +uvicorn konduktor.main:app --reload --port 8000 +``` + +By default it reads `../collection.nml` (the repo-root file). Point it elsewhere: + +```bash +KONDUKTOR_NML=/path/to/collection.nml uvicorn konduktor.main:app --port 8000 +``` + +Interactive API docs: http://localhost:8000/docs + +## Endpoints + +| Method | Path | Description | +|---|---|---| +| GET | `/api/health` | Service + NML path status | +| POST | `/api/reload` | Re-parse the NML from disk | +| GET | `/api/stats` | Totals, rating breakdown, BPM histogram, metadata gaps | +| GET | `/api/facets` | Distinct genres/keys + BPM range (for filter UI) | +| GET | `/api/tracks` | Paginated track list — see query params below | +| GET | `/api/playlists` | Playlist tree (folders / playlists / smart playlists) | +| GET | `/api/playlists/{id}/tracks` | Tracks in a playlist, joined to full metadata | + +### `GET /api/tracks` query params + +`q` (search artist/title/album), `genre`, `key`, `bpm_min`, `bpm_max`, +`rating_min` (0–5), `has_cues` (bool), `sort` +(`artist|title|album|genre|key|bpm|rating|playcount|import_date|length`), +`order` (`asc|desc`), `limit` (1–1000, default 100), `offset`. + +Returns `{ total, offset, limit, items: [Track] }`. diff --git a/backend/konduktor/__init__.py b/backend/konduktor/__init__.py new file mode 100644 index 0000000..cfcc876 --- /dev/null +++ b/backend/konduktor/__init__.py @@ -0,0 +1,3 @@ +"""Konduktor — Traktor library management & track preparation.""" + +__version__ = "0.1.0" diff --git a/backend/konduktor/collection_service.py b/backend/konduktor/collection_service.py new file mode 100644 index 0000000..b92e3d1 --- /dev/null +++ b/backend/konduktor/collection_service.py @@ -0,0 +1,285 @@ +"""Loads a Traktor collection and serves query-friendly views of it. + +Phase 1 is read-only. The service parses the .nml once into memory, builds a +flat list of Track objects, a primary-key index (so playlist entries can be +joined to full track metadata), and the playlist tree. +""" +from __future__ import annotations + +import threading +from pathlib import Path + +from traktor_nml_utils import TraktorCollection + +from .schemas import ( + Facets, + GenreCount, + PlaylistNode, + Stats, + Track, + TrackPage, +) + + +def _primary_key(location) -> str: + """Reconstruct the Traktor primary key used by playlist entries.""" + vol = location.volume or "" + d = location.dir or "" + f = location.file or "" + return f"{vol}{d}{f}" + + +def _display_path(location) -> str: + """Human-readable OS-ish path from Traktor's '/:'-separated dir.""" + d = (location.dir or "").replace("/:", "/") + f = location.file or "" + return f"{d}{f}" + + +def _rating_stars(ranking) -> int: + if not ranking: + return 0 + return max(0, min(5, round(ranking / 51))) + + +class CollectionService: + def __init__(self, nml_path: Path): + self.nml_path = Path(nml_path) + self._lock = threading.Lock() + self.tracks: list[Track] = [] + self.by_key: dict[str, Track] = {} + self._playlist_entries: dict[str, list[str]] = {} # id -> ordered primary keys + self._tree: list[PlaylistNode] = [] + self._playlist_count = 0 + self.load() + + # ---- loading ------------------------------------------------------- + def load(self) -> None: + with self._lock: + collection = TraktorCollection(path=self.nml_path) + self.tracks = [self._to_track(e) for e in collection.nml.collection.entry] + self.by_key = {t.id: t for t in self.tracks} + self._playlist_entries = {} + self._playlist_count = 0 + counter = {"n": 0} + root = collection.nml.playlists.node if collection.nml.playlists else None + self._tree = self._build_tree(root, counter) if root else [] + + def _to_track(self, e) -> Track: + info = e.info + loc = e.location + cues = e.cue_v2 or [] + hotcues = sum( + 1 for c in cues if c.hotcue is not None and c.hotcue >= 0 + ) + has_grid = any(getattr(c, "grid", None) is not None for c in cues) + return Track( + id=_primary_key(loc) if loc else (e.title or ""), + artist=e.artist, + title=e.title, + album=e.album.title if e.album else None, + genre=info.genre if info else None, + label=info.label if info else None, + remixer=info.remixer if info else None, + producer=info.producer if info else None, + comment=info.comment if info else None, + bpm=e.tempo.bpm if e.tempo else None, + key=info.key if info else None, + rating=_rating_stars(info.ranking if info else None), + playcount=info.playcount if info else None, + length=info.playtime if info else None, + bitrate=info.bitrate if info else None, + import_date=info.import_date if info else None, + last_played=info.last_played if info else None, + release_date=info.release_date if info else None, + filepath=_display_path(loc) if loc else None, + cue_count=len(cues), + hotcue_count=hotcues, + has_grid=has_grid, + ) + + def _build_tree(self, node, counter, is_root=True) -> list[PlaylistNode]: + """Return the children of the $ROOT folder as the top-level tree.""" + if node is None: + return [] + # Root ($ROOT) is a wrapper folder; expose its children as top level. + if is_root and node.subnodes: + out = [] + for child in node.subnodes.node: + out.append(self._node_to_model(child, counter)) + return out + return [self._node_to_model(node, counter)] + + def _node_to_model(self, node, counter) -> PlaylistNode: + ntype = node.type or "FOLDER" + if ntype == "PLAYLIST" or (node.playlist is not None): + nid = f"pl-{counter['n']}" + counter["n"] += 1 + self._playlist_count += 1 + keys = [] + if node.playlist and node.playlist.entry: + for en in node.playlist.entry: + if en.primarykey and en.primarykey.key: + keys.append(en.primarykey.key) + self._playlist_entries[nid] = keys + return PlaylistNode( + id=nid, + name=node.name or "(unnamed)", + type="PLAYLIST", + uuid=node.playlist.uuid if node.playlist else None, + count=len(keys), + ) + if ntype == "SMARTLIST" or getattr(node, "smartlist", None) is not None: + # Smart playlists are dynamic (rule-based); no static entry list. + nid = f"sl-{counter['n']}" + counter["n"] += 1 + return PlaylistNode(id=nid, name=node.name or "(smart)", type="SMARTLIST") + # FOLDER + nid = f"fld-{counter['n']}" + counter["n"] += 1 + children = [] + if node.subnodes: + for child in node.subnodes.node: + children.append(self._node_to_model(child, counter)) + return PlaylistNode( + id=nid, name=node.name or "(folder)", type="FOLDER", children=children + ) + + # ---- queries ------------------------------------------------------- + _SORT_KEYS = { + "artist": lambda t: (t.artist or "").lower(), + "title": lambda t: (t.title or "").lower(), + "album": lambda t: (t.album or "").lower(), + "genre": lambda t: (t.genre or "").lower(), + "key": lambda t: (t.key or ""), + "bpm": lambda t: (t.bpm if t.bpm is not None else -1), + "rating": lambda t: t.rating, + "playcount": lambda t: (t.playcount or 0), + "import_date": lambda t: (t.import_date or ""), + "length": lambda t: (t.length or 0), + } + + def query_tracks( + self, + q: str | None = None, + genre: str | None = None, + key: str | None = None, + bpm_min: float | None = None, + bpm_max: float | None = None, + rating_min: int | None = None, + has_cues: bool | None = None, + sort: str = "artist", + order: str = "asc", + limit: int = 100, + offset: int = 0, + ) -> TrackPage: + items = self.tracks + if q: + ql = q.lower() + items = [ + t + for t in items + if (t.artist and ql in t.artist.lower()) + or (t.title and ql in t.title.lower()) + or (t.album and ql in t.album.lower()) + ] + if genre: + items = [t for t in items if t.genre == genre] + if key: + items = [t for t in items if t.key == key] + if bpm_min is not None: + items = [t for t in items if t.bpm is not None and t.bpm >= bpm_min] + if bpm_max is not None: + items = [t for t in items if t.bpm is not None and t.bpm <= bpm_max] + if rating_min is not None: + items = [t for t in items if t.rating >= rating_min] + if has_cues is not None: + items = [t for t in items if (t.cue_count > 0) == has_cues] + + keyfn = self._SORT_KEYS.get(sort, self._SORT_KEYS["artist"]) + items = sorted(items, key=keyfn, reverse=(order == "desc")) + + total = len(items) + page = items[offset : offset + limit] + return TrackPage(total=total, offset=offset, limit=limit, items=page) + + def facets(self) -> Facets: + genres: dict[str, int] = {} + keys: dict[str, int] = {} + bpms = [] + for t in self.tracks: + if t.genre: + genres[t.genre] = genres.get(t.genre, 0) + 1 + if t.key: + keys[t.key] = keys.get(t.key, 0) + 1 + if t.bpm is not None: + bpms.append(t.bpm) + return Facets( + genres=[ + GenreCount(name=k, count=v) + for k, v in sorted(genres.items(), key=lambda x: -x[1]) + ], + keys=[ + GenreCount(name=k, count=v) + for k, v in sorted(keys.items(), key=lambda x: -x[1]) + ], + bpm_min=min(bpms) if bpms else None, + bpm_max=max(bpms) if bpms else None, + total_tracks=len(self.tracks), + ) + + def stats(self) -> Stats: + rating_breakdown = {i: 0 for i in range(6)} + genres: dict[str, int] = {} + bpm_buckets: dict[str, int] = {} + rated = missing_key = missing_genre = missing_bpm = no_cues = 0 + for t in self.tracks: + rating_breakdown[t.rating] += 1 + if t.rating > 0: + rated += 1 + if not t.key: + missing_key += 1 + if not t.genre: + missing_genre += 1 + else: + genres[t.genre] = genres.get(t.genre, 0) + 1 + if t.bpm is None: + missing_bpm += 1 + else: + lo = int(t.bpm // 10 * 10) + bucket = f"{lo}-{lo + 10}" + bpm_buckets[bucket] = bpm_buckets.get(bucket, 0) + 1 + if t.cue_count == 0: + no_cues += 1 + total = len(self.tracks) + histogram = [ + {"bucket": b, "count": c} + for b, c in sorted(bpm_buckets.items(), key=lambda x: int(x[0].split("-")[0])) + ] + top = sorted(genres.items(), key=lambda x: -x[1])[:10] + return Stats( + total_tracks=total, + total_playlists=self._playlist_count, + rated=rated, + unrated=total - rated, + missing_key=missing_key, + missing_genre=missing_genre, + missing_bpm=missing_bpm, + no_cues=no_cues, + rating_breakdown=rating_breakdown, + bpm_histogram=histogram, + top_genres=[GenreCount(name=k, count=v) for k, v in top], + ) + + def playlist_tree(self) -> list[PlaylistNode]: + return self._tree + + def playlist_tracks(self, playlist_id: str) -> list[Track] | None: + if playlist_id not in self._playlist_entries: + return None + out = [] + for k in self._playlist_entries[playlist_id]: + t = self.by_key.get(k) + if t is not None: + out.append(t) + return out diff --git a/backend/konduktor/main.py b/backend/konduktor/main.py new file mode 100644 index 0000000..ed56e3f --- /dev/null +++ b/backend/konduktor/main.py @@ -0,0 +1,110 @@ +"""Konduktor FastAPI app — Phase 1 (read-only collection API).""" +from __future__ import annotations + +import os +from pathlib import Path + +from fastapi import FastAPI, HTTPException, Query +from fastapi.middleware.cors import CORSMiddleware + +from .collection_service import CollectionService +from .schemas import Facets, PlaylistNode, Stats, Track, TrackPage + +# The collection to read. Defaults to the repo-root collection.nml. +# Reading is safe/non-destructive; writes (later phases) always use a copy. +DEFAULT_NML = Path(__file__).resolve().parents[2] / "collection.nml" +NML_PATH = Path(os.environ.get("KONDUKTOR_NML", DEFAULT_NML)) + +app = FastAPI(title="Konduktor API", version="0.1.0") + +# Vite dev server runs on 5173; allow local dev origins. +app.add_middleware( + CORSMiddleware, + allow_origins=[ + "http://localhost:5173", + "http://127.0.0.1:5173", + ], + allow_methods=["*"], + allow_headers=["*"], +) + +_service: CollectionService | None = None + + +def get_service() -> CollectionService: + global _service + if _service is None: + if not NML_PATH.exists(): + raise HTTPException(500, f"NML file not found: {NML_PATH}") + _service = CollectionService(NML_PATH) + return _service + + +@app.get("/api/health") +def health() -> dict: + exists = NML_PATH.exists() + return { + "status": "ok", + "nml_path": str(NML_PATH), + "nml_exists": exists, + "loaded": _service is not None, + } + + +@app.post("/api/reload") +def reload_collection() -> dict: + svc = get_service() + svc.load() + return {"status": "reloaded", "tracks": len(svc.tracks)} + + +@app.get("/api/stats", response_model=Stats) +def stats() -> Stats: + return get_service().stats() + + +@app.get("/api/facets", response_model=Facets) +def facets() -> Facets: + return get_service().facets() + + +@app.get("/api/tracks", response_model=TrackPage) +def tracks( + q: str | None = None, + genre: str | None = None, + key: str | None = None, + bpm_min: float | None = None, + bpm_max: float | None = None, + rating_min: int | None = Query(None, ge=0, le=5), + has_cues: bool | None = None, + sort: str = "artist", + order: str = Query("asc", pattern="^(asc|desc)$"), + limit: int = Query(100, ge=1, le=20000), + offset: int = Query(0, ge=0), +) -> TrackPage: + return get_service().query_tracks( + q=q, + genre=genre, + key=key, + bpm_min=bpm_min, + bpm_max=bpm_max, + rating_min=rating_min, + has_cues=has_cues, + sort=sort, + order=order, + limit=limit, + offset=offset, + ) + + +@app.get("/api/playlists", response_model=list[PlaylistNode]) +def playlists() -> list[PlaylistNode]: + return get_service().playlist_tree() + + +@app.get("/api/playlists/{playlist_id}/tracks", response_model=list[Track]) +def playlist_tracks(playlist_id: str) -> list[Track]: + result = get_service().playlist_tracks(playlist_id) + if result is None: + raise HTTPException(404, f"Playlist not found: {playlist_id}") + return result diff --git a/backend/konduktor/schemas.py b/backend/konduktor/schemas.py new file mode 100644 index 0000000..445af97 --- /dev/null +++ b/backend/konduktor/schemas.py @@ -0,0 +1,81 @@ +"""API response models (Pydantic).""" +from __future__ import annotations + +from pydantic import BaseModel + + +class Track(BaseModel): + """A single track, flattened from a Traktor collection ENTRY.""" + + id: str # primary key: "", used to join playlist entries + artist: str | None = None + title: str | None = None + album: str | None = None + genre: str | None = None + label: str | None = None + remixer: str | None = None + producer: str | None = None + comment: str | None = None + bpm: float | None = None + key: str | None = None # Traktor display key, e.g. "10m" + rating: int = 0 # 0-5 stars (derived from RANKING/51) + playcount: int | None = None + length: int | None = None # seconds + bitrate: int | None = None + import_date: str | None = None + last_played: str | None = None + release_date: str | None = None + filepath: str | None = None # human-readable OS path + cue_count: int = 0 + hotcue_count: int = 0 + has_grid: bool = False + + +class TrackPage(BaseModel): + total: int # total matching the filter (before pagination) + offset: int + limit: int + items: list[Track] + + +class GenreCount(BaseModel): + name: str + count: int + + +class Facets(BaseModel): + """Distinct values available for building filter UI.""" + + genres: list[GenreCount] + keys: list[GenreCount] + bpm_min: float | None + bpm_max: float | None + total_tracks: int + + +class Stats(BaseModel): + total_tracks: int + total_playlists: int + rated: int + unrated: int + missing_key: int + missing_genre: int + missing_bpm: int + no_cues: int + rating_breakdown: dict[int, int] # stars -> count + bpm_histogram: list[dict] # [{bucket: "120-130", count: n}] + top_genres: list[GenreCount] + + +class PlaylistNode(BaseModel): + """A node in the playlist tree — either a FOLDER or a PLAYLIST/SMARTLIST.""" + + id: str # stable synthetic id ("pl-" / "fld-") + name: str + type: str # "FOLDER" | "PLAYLIST" | "SMARTLIST" + uuid: str | None = None + count: int = 0 # track count (for playlists) + children: list["PlaylistNode"] = [] + + +PlaylistNode.model_rebuild() diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..a1585b1 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1,8 @@ +# Unpinned lower bounds so pip picks versions with prebuilt Python 3.14 wheels +# (older pins force a from-source pydantic-core build that needs Rust). +fastapi>=0.115 +uvicorn[standard]>=0.34 +pydantic>=2.11 +# Traktor Pro 4 (NML v20) support requires the GitHub master (v4.0.0), +# NOT the stale PyPI release (3.1.0), which cannot parse v4 files. +traktor-nml-utils @ git+https://github.com/MrPatben8/traktor-nml-utils.git diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..bace917 --- /dev/null +++ b/dev.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Start both Konduktor servers (backend + frontend) together. +# Ctrl-C stops both. First run? See one-time setup in README.md. +set -euo pipefail +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Backend (FastAPI on :8000) +source "$ROOT/backend/.venv/bin/activate" +uvicorn konduktor.main:app --reload --port 8000 --app-dir "$ROOT/backend" & +BACKEND_PID=$! + +# Frontend (Vite on :5173, proxies /api -> :8000) +(cd "$ROOT/frontend" && npm run dev) & +FRONTEND_PID=$! + +# Stop both on exit. +trap 'kill $BACKEND_PID $FRONTEND_PID 2>/dev/null || true' EXIT INT TERM + +echo "" +echo " Konduktor is starting…" +echo " → App: http://localhost:5173" +echo " → API docs: http://localhost:8000/docs" +echo " (Ctrl-C to stop both)" +echo "" +wait diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.json new file mode 100644 index 0000000..6fa991d --- /dev/null +++ b/frontend/.oxlintrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "oxc"], + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..d6af7e3 --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,32 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the Oxlint configuration + +If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`: + +```json +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "oxc"], + "options": { + "typeAware": true + }, + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} +``` + +See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories. diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..528a475 --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,13 @@ + + + + + + + Konduktor + + +
+ + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000..e8fe867 --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,2104 @@ +{ + "name": "frontend", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "frontend", + "version": "0.0.0", + "dependencies": { + "@tanstack/react-query": "^5.101.2", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.14.5", + "react": "^19.2.7", + "react-dom": "^19.2.7" + }, + "devDependencies": { + "@tailwindcss/postcss": "^4.3.2", + "@types/node": "^24.13.2", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.3", + "autoprefixer": "^10.5.2", + "oxlint": "^1.71.0", + "postcss": "^8.5.16", + "tailwindcss": "^4.3.2", + "typescript": "~6.0.2", + "vite": "^8.1.1" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.138.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.138.0.tgz", + "integrity": "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.72.0.tgz", + "integrity": "sha512-zhCmvn+1Mj3UchAc/90i99S0t7jJUsHmFVSPg4UWrjO8b8eaSGwscgO6QAUtvHBstkjQwBttQNswEnAF1mIQdA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.72.0.tgz", + "integrity": "sha512-mtH+aY/ozv1eZoCUC2owjFAtyNBKHpJHygKeEu9zXXnQGW1Q2/qOpvx+I+Lf23+TvTz66F4iiXUbl2cGvoLPCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.72.0.tgz", + "integrity": "sha512-EvnajNPDtfknB3ZieeOOyDTwJn9QXDiwfnF4ZDQqART6RG6hjY4WigQcZdGoK2dkB3e1vrmEzN9aYbQCUkh/gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.72.0.tgz", + "integrity": "sha512-ZkCdEa/G80A7vEHfeCDz/+L3m33DE73v32mDKhgOIgz8Uwf0DFcK7+uu6qC+7LEhmz5fpOe1osWKyjSNMydFIQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.72.0.tgz", + "integrity": "sha512-NroXv2vh+sxVY1uya/rM5pjhx1hm8BzlYpx9q67QP0Xhw5MH2bf5GJylpvLEC+781p1Xli/317EoV9AlGwViag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.72.0.tgz", + "integrity": "sha512-0NDywYgfj279Ou/BcQuCYSj7NJwBfmWn5qc5uGO/Ny7fUWmXyIpvawqX/8acQlWG6IXelJsJhj+JAy6sjsKj0A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.72.0.tgz", + "integrity": "sha512-4vpXB06h65Ezsy4hRyrGjGrfa1SkVPii09yaajiYhmVpgsFiLD+KNxIx/BNAY+XiO+i1yqp9HHdwqM8VTqa5XQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.72.0.tgz", + "integrity": "sha512-immaN4g2ZGFiOkKrvRX9LvzZdd2GkQM5wR+UyzYyUuyhUTXGQ4HKUJH18xp4G8OfhCVaVAJfKZxwE1r8+4hhaQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.72.0.tgz", + "integrity": "sha512-JGHS9Mnr7iWyyLDxgCv1MhzVpAckgptg00F2gnxt/GD7lQ2SW1BRcxHqhSTaSdDpjWRrBkBxMMh4+Hn3aVtExg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.72.0.tgz", + "integrity": "sha512-AOYgBZqxNshrg83P9v0RYv+m8s10Cqkj4/PxXFDhcS3k7FqsIG5+CxErshZCIN7G8iy4Y+VGfAsuEdar8AcbBg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.72.0.tgz", + "integrity": "sha512-QMybPS5ij3/vrKG67mqzHwW++91sYxK/PPUVi6SBtNCEzW4niS52fVBdXbQ6nou0wWbUPEpx8Sl/ZjtgE3clXA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.72.0.tgz", + "integrity": "sha512-gOc3W7JV0PXRpIL7stUlLe3Wa9Gp0Kdlup87IT3gHDvPKck2xNgMIl/Gs2lldYY2lyXZDC4rWi3hmoLUobkgbQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.72.0.tgz", + "integrity": "sha512-rpGxph+FjjHcYI5q6uxB3Az+tnfmEnDbSA8+PK9ZE/VzyUAkvBOMeuY7ZQMhu5mpZH7YQDsTdW6Cx4kV/msc6w==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.72.0.tgz", + "integrity": "sha512-WND+uhf/Ko13SLqQMWQUgsZuLvYYEvL0ZKgg0tgGYfLqxG7l8Ju123fHDMJyYSDl5E3bUbpFUuii/OvMreFQzw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.72.0.tgz", + "integrity": "sha512-SrpbrUL70nG9vh6zP4/oKHWgLuHquwsr7MW9XOn0olBVgh10Uqr8qscKhQoBGEn6olK/IUpn5GSKcdQ5AjUhGA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.72.0.tgz", + "integrity": "sha512-qkrsEn6NmgFKr7U/QnezQMb+q/vzAy0Dd9Y95gQGQTyjzDLN+HRZMuM5u70iyH4nBLCfKBzhjMsYCehKay2jyg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.72.0.tgz", + "integrity": "sha512-LWR6ZlFZph+KPjXv8opgZsXRDCdrdQe8VL8Cg9zxCoBS73h6znzZpydVgmdnwj8mB9AuSM5jxEgDJDpQkjboeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.72.0.tgz", + "integrity": "sha512-yt6HEh7IsHvtjRWtmeZRX134eaXKHq5Gnqlf1xBJdJl1JtdoRUEJw3nAxpZoUDS860cX/foKbztO441anVBtVQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.72.0.tgz", + "integrity": "sha512-b2eKFD2hX7tIwmo/cyH6TDq8vzWRZ2qNHrzoGntUTmq0h3zQh/uX3eTSHCwI8OB/ADQfJCRelLItK8BsxuucDA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.4.tgz", + "integrity": "sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.4.tgz", + "integrity": "sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.4.tgz", + "integrity": "sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.4.tgz", + "integrity": "sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.4.tgz", + "integrity": "sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.4.tgz", + "integrity": "sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.4.tgz", + "integrity": "sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.4.tgz", + "integrity": "sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.4.tgz", + "integrity": "sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.4.tgz", + "integrity": "sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.4.tgz", + "integrity": "sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.4.tgz", + "integrity": "sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.4.tgz", + "integrity": "sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.4.tgz", + "integrity": "sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.4.tgz", + "integrity": "sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.2.tgz", + "integrity": "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "5.21.6", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.2" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.2.tgz", + "integrity": "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.2", + "@tailwindcss/oxide-darwin-arm64": "4.3.2", + "@tailwindcss/oxide-darwin-x64": "4.3.2", + "@tailwindcss/oxide-freebsd-x64": "4.3.2", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.2", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.2", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.2", + "@tailwindcss/oxide-linux-x64-musl": "4.3.2", + "@tailwindcss/oxide-wasm32-wasi": "4.3.2", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.2", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.2" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.2.tgz", + "integrity": "sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.2.tgz", + "integrity": "sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.2.tgz", + "integrity": "sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.2.tgz", + "integrity": "sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.2.tgz", + "integrity": "sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.2.tgz", + "integrity": "sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.2.tgz", + "integrity": "sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.2.tgz", + "integrity": "sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.2.tgz", + "integrity": "sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.2.tgz", + "integrity": "sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.2.tgz", + "integrity": "sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.2.tgz", + "integrity": "sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/postcss": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.3.2.tgz", + "integrity": "sha512-rjVWYCa7Ngbi5AarT6k8TkxUG3Wl1QKzHdIZVsjZSzf36Jmo2IKZt/NHRAwly8oDkbBOH0YTu+CHuf9jPxMc+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.3.2", + "@tailwindcss/oxide": "4.3.2", + "postcss": "^8.5.15", + "tailwindcss": "4.3.2" + } + }, + "node_modules/@tanstack/query-core": { + "version": "5.101.2", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.101.2.tgz", + "integrity": "sha512-hH5MLoJhF7KaIGd7q3xTXGXvslI+GYlM1Z/35aSHHWaCJWB7XvTSHYuV3eM7tw+aE0mT/xMro4M4Q9rCGHT0lw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.101.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.101.2.tgz", + "integrity": "sha512-seDkr6kzGzX1okaaTtZPtgA688CDPlXUz1C6xSg0ESqn04Vuc8tlrYms1s3de+znBqhPVxFRfpAfUf+6XvfPWg==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.101.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^18 || ^19" + } + }, + "node_modules/@tanstack/react-table": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.21.3.tgz", + "integrity": "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww==", + "license": "MIT", + "dependencies": { + "@tanstack/table-core": "8.21.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/@tanstack/react-virtual": { + "version": "3.14.5", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.14.5.tgz", + "integrity": "sha512-4EKRXh7zBLkbKbFmG3AUVkircuHd+7OdT1pocJSepxtfBd3qnrJgJ5rtPkRYyo9fmyVb2+pI2xPy5oYvMLQy6A==", + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.17.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@tanstack/table-core": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.21.3.tgz", + "integrity": "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.17.3.tgz", + "integrity": "sha512-8Np/TFELpI0ySuJoVmjvOrQYXH/8sTX0Biv9szhFhY39xOdAAY+smrMxjxOum/ux3eM8MUJQsEJ0/R0UpvC8dw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/node": { + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.3.tgz", + "integrity": "sha512-vmFvco5/QuC2f9Oj+wTk0+9XeDFkHxSamwZKYc7MxYwKICfvUvlMhqKI0VuICPltGqh1neqBKDvO4kes1ya8vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + } + } + }, + "node_modules/autoprefixer": { + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.2.tgz", + "integrity": "sha512-rD5t5DwOjJdmSORcTq64j8MawTC+tbQ+HHqjR4NDumamy/ambn1UJrlKL+KdwujWxMkFjPM3pPHOEA9tl4767Q==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.28.4", + "caniuse-lite": "^1.0.30001799", + "fraction.js": "^5.3.4", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.41", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.41.tgz", + "integrity": "sha512-WwS7MHhqGHHlaVsqRZnhvCEMS0owDX+SxRlve7JkuH7My1Ara3ZriTmCQupPfYjxMZ8I/tgxtJYr2t7taHaH4A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.4.tgz", + "integrity": "sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.38", + "caniuse-lite": "^1.0.30001799", + "electron-to-chromium": "^1.5.376", + "node-releases": "^2.0.48", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001800", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001800.tgz", + "integrity": "sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.385", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.385.tgz", + "integrity": "sha512-78sa/M08MNAYHQfjoWMvOlKQqZ0ElhSm/L5HNUc96VZ3b+KvDVnngFm8sYQy0XrhTRgAhggHr5abA7yTvRdo4Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/enhanced-resolve": { + "version": "5.21.6", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.6.tgz", + "integrity": "sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fraction.js": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-5.3.4.tgz", + "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/nanoid": { + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", + "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.50", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.50.tgz", + "integrity": "sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/oxlint": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.72.0.tgz", + "integrity": "sha512-1rhdZIP/EvoI91ABIwNU5Q8+bWf8mjrS5UzIOZld4d4bXxJvtlUhlQvaoTogIGin/qdErMOrwaIJvCSIAKTLhA==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.72.0", + "@oxlint/binding-android-arm64": "1.72.0", + "@oxlint/binding-darwin-arm64": "1.72.0", + "@oxlint/binding-darwin-x64": "1.72.0", + "@oxlint/binding-freebsd-x64": "1.72.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.72.0", + "@oxlint/binding-linux-arm-musleabihf": "1.72.0", + "@oxlint/binding-linux-arm64-gnu": "1.72.0", + "@oxlint/binding-linux-arm64-musl": "1.72.0", + "@oxlint/binding-linux-ppc64-gnu": "1.72.0", + "@oxlint/binding-linux-riscv64-gnu": "1.72.0", + "@oxlint/binding-linux-riscv64-musl": "1.72.0", + "@oxlint/binding-linux-s390x-gnu": "1.72.0", + "@oxlint/binding-linux-x64-gnu": "1.72.0", + "@oxlint/binding-linux-x64-musl": "1.72.0", + "@oxlint/binding-openharmony-arm64": "1.72.0", + "@oxlint/binding-win32-arm64-msvc": "1.72.0", + "@oxlint/binding-win32-ia32-msvc": "1.72.0", + "@oxlint/binding-win32-x64-msvc": "1.72.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.22.1", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", + "integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/react": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", + "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", + "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.7" + } + }, + "node_modules/rolldown": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz", + "integrity": "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.138.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.4", + "@rolldown/binding-darwin-arm64": "1.1.4", + "@rolldown/binding-darwin-x64": "1.1.4", + "@rolldown/binding-freebsd-x64": "1.1.4", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.4", + "@rolldown/binding-linux-arm64-gnu": "1.1.4", + "@rolldown/binding-linux-arm64-musl": "1.1.4", + "@rolldown/binding-linux-ppc64-gnu": "1.1.4", + "@rolldown/binding-linux-s390x-gnu": "1.1.4", + "@rolldown/binding-linux-x64-gnu": "1.1.4", + "@rolldown/binding-linux-x64-musl": "1.1.4", + "@rolldown/binding-openharmony-arm64": "1.1.4", + "@rolldown/binding-wasm32-wasi": "1.1.4", + "@rolldown/binding-win32-arm64-msvc": "1.1.4", + "@rolldown/binding-win32-x64-msvc": "1.1.4" + } + }, + "node_modules/scheduler": { + "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/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.2.tgz", + "integrity": "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.3.tgz", + "integrity": "sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.16", + "rolldown": "~1.1.3", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..9732a79 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,32 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "oxlint", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/react-query": "^5.101.2", + "@tanstack/react-table": "^8.21.3", + "@tanstack/react-virtual": "^3.14.5", + "react": "^19.2.7", + "react-dom": "^19.2.7" + }, + "devDependencies": { + "@tailwindcss/postcss": "^4.3.2", + "@types/node": "^24.13.2", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^6.0.3", + "autoprefixer": "^10.5.2", + "oxlint": "^1.71.0", + "postcss": "^8.5.16", + "tailwindcss": "^4.3.2", + "typescript": "~6.0.2", + "vite": "^8.1.1" + } +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js new file mode 100644 index 0000000..a7f73a2 --- /dev/null +++ b/frontend/postcss.config.js @@ -0,0 +1,5 @@ +export default { + plugins: { + '@tailwindcss/postcss': {}, + }, +} diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg new file mode 100644 index 0000000..6893eb1 --- /dev/null +++ b/frontend/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/icons.svg b/frontend/public/icons.svg new file mode 100644 index 0000000..e952219 --- /dev/null +++ b/frontend/public/icons.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx new file mode 100644 index 0000000..a80ea6c --- /dev/null +++ b/frontend/src/App.tsx @@ -0,0 +1,90 @@ +import { useMemo, useState } from 'react' +import { useQuery } from '@tanstack/react-query' +import type { SortingState } from '@tanstack/react-table' +import { api, type Track } from './api' +import { Sidebar, type Source } from './components/Sidebar' +import { Toolbar, emptyFilters, type Filters } from './components/Toolbar' +import { TrackTable } from './components/TrackTable' +import { StatusBar } from './components/StatusBar' + +function applyFilters(tracks: Track[], f: Filters): Track[] { + const q = f.search.trim().toLowerCase() + const bpmMin = f.bpmMin ? parseFloat(f.bpmMin) : null + const bpmMax = f.bpmMax ? parseFloat(f.bpmMax) : null + return tracks.filter((t) => { + if (q) { + const hay = `${t.artist ?? ''} ${t.title ?? ''} ${t.album ?? ''}`.toLowerCase() + if (!hay.includes(q)) return false + } + if (f.genre && t.genre !== f.genre) return false + if (f.key && t.key !== f.key) return false + if (bpmMin != null && (t.bpm == null || t.bpm < bpmMin)) return false + if (bpmMax != null && (t.bpm == null || t.bpm > bpmMax)) return false + if (f.ratingMin > 0 && t.rating < f.ratingMin) return false + if (f.hasCues === 'yes' && t.cue_count === 0) return false + if (f.hasCues === 'no' && t.cue_count > 0) return false + return true + }) +} + +export default function App() { + const [source, setSource] = useState({ kind: 'all' }) + const [filters, setFilters] = useState(emptyFilters) + const [sorting, setSorting] = useState([]) + + const allTracks = useQuery({ + queryKey: ['tracks', 'all'], + queryFn: () => api.tracks({ limit: 20000, sort: 'artist' }), + enabled: source.kind === 'all', + }) + + const playlistTracks = useQuery({ + queryKey: ['playlist', source.kind === 'playlist' ? source.id : null], + queryFn: () => api.playlistTracks((source as { id: string }).id), + enabled: source.kind === 'playlist', + }) + + const tracks: Track[] = + source.kind === 'all' ? (allTracks.data?.items ?? []) : (playlistTracks.data ?? []) + const loading = source.kind === 'all' ? allTracks.isLoading : playlistTracks.isLoading + + const filtered = useMemo(() => applyFilters(tracks, filters), [tracks, filters]) + + const sourceName = source.kind === 'all' ? 'All Tracks' : source.name + + return ( +
+ { + setSource(s) + // Playlists carry a deliberate order; reset sort to preserve it. + setSorting([]) + }} + /> +
+ +
+ {loading ? ( +
+ Loading library… +
+ ) : filtered.length === 0 ? ( +
+
No tracks match
+
Try clearing some filters.
+
+ ) : ( + + )} +
+ +
+
+ ) +} diff --git a/frontend/src/api.ts b/frontend/src/api.ts new file mode 100644 index 0000000..659069f --- /dev/null +++ b/frontend/src/api.ts @@ -0,0 +1,122 @@ +// Typed client for the Konduktor backend (Phase 1 read-only API). + +export interface Track { + id: string + artist: string | null + title: string | null + album: string | null + genre: string | null + label: string | null + remixer: string | null + producer: string | null + comment: string | null + bpm: number | null + key: string | null + rating: number + playcount: number | null + length: number | null + bitrate: number | null + import_date: string | null + last_played: string | null + release_date: string | null + filepath: string | null + cue_count: number + hotcue_count: number + has_grid: boolean +} + +export interface TrackPage { + total: number + offset: number + limit: number + items: Track[] +} + +export interface GenreCount { + name: string + count: number +} + +export interface Facets { + genres: GenreCount[] + keys: GenreCount[] + bpm_min: number | null + bpm_max: number | null + total_tracks: number +} + +export interface Stats { + total_tracks: number + total_playlists: number + rated: number + unrated: number + missing_key: number + missing_genre: number + missing_bpm: number + no_cues: number + rating_breakdown: Record + bpm_histogram: { bucket: string; count: number }[] + top_genres: GenreCount[] +} + +export type PlaylistType = 'FOLDER' | 'PLAYLIST' | 'SMARTLIST' + +export interface PlaylistNode { + id: string + name: string + type: PlaylistType + uuid: string | null + count: number + children: PlaylistNode[] +} + +export type SortField = + | 'artist' + | 'title' + | 'album' + | 'genre' + | 'key' + | 'bpm' + | 'rating' + | 'playcount' + | 'import_date' + | 'length' + +export interface TrackQuery { + q?: string + genre?: string + key?: string + bpm_min?: number + bpm_max?: number + rating_min?: number + has_cues?: boolean + sort?: SortField + order?: 'asc' | 'desc' + limit?: number + offset?: number +} + +async function getJSON(url: string): Promise { + const res = await fetch(url) + if (!res.ok) throw new Error(`${res.status} ${res.statusText} — ${url}`) + return res.json() as Promise +} + +function qs(params: Record): string { + const p = new URLSearchParams() + for (const [k, v] of Object.entries(params)) { + if (v !== undefined && v !== null && v !== '') p.set(k, String(v)) + } + const s = p.toString() + return s ? `?${s}` : '' +} + +export const api = { + stats: () => getJSON('/api/stats'), + facets: () => getJSON('/api/facets'), + playlists: () => getJSON('/api/playlists'), + tracks: (query: TrackQuery) => + getJSON(`/api/tracks${qs(query as Record)}`), + playlistTracks: (id: string) => + getJSON(`/api/playlists/${id}/tracks`), +} diff --git a/frontend/src/assets/hero.png b/frontend/src/assets/hero.png new file mode 100644 index 0000000..02251f4 Binary files /dev/null and b/frontend/src/assets/hero.png differ diff --git a/frontend/src/assets/react.svg b/frontend/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/frontend/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/assets/vite.svg b/frontend/src/assets/vite.svg new file mode 100644 index 0000000..5101b67 --- /dev/null +++ b/frontend/src/assets/vite.svg @@ -0,0 +1 @@ +Vite diff --git a/frontend/src/components/RatingStars.tsx b/frontend/src/components/RatingStars.tsx new file mode 100644 index 0000000..1ccc406 --- /dev/null +++ b/frontend/src/components/RatingStars.tsx @@ -0,0 +1,20 @@ +interface Props { + value: number +} + +// Compact 5-star rating. Filled stars use the gold accent; empties are faint. +export function RatingStars({ value }: Props) { + if (!value) return — + return ( + + {[1, 2, 3, 4, 5].map((i) => ( + + ★ + + ))} + + ) +} diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx new file mode 100644 index 0000000..90d292d --- /dev/null +++ b/frontend/src/components/Sidebar.tsx @@ -0,0 +1,125 @@ +import { useState } from 'react' +import { useQuery } from '@tanstack/react-query' +import { api, type PlaylistNode } from '../api' + +export type Source = { kind: 'all' } | { kind: 'playlist'; id: string; name: string } + +interface Props { + source: Source + onSelect: (s: Source) => void +} + +const icons: Record = { + FOLDER: '▸', + PLAYLIST: '♫', + SMARTLIST: '✦', +} + +function NodeRow({ + node, + depth, + source, + onSelect, +}: { + node: PlaylistNode + depth: number + source: Source + onSelect: (s: Source) => void +}) { + const [open, setOpen] = useState(true) + const isFolder = node.type === 'FOLDER' + const selected = source.kind === 'playlist' && source.id === node.id + const selectable = node.type === 'PLAYLIST' + + return ( +
+ + {isFolder && open && node.children.length > 0 && ( +
+ {node.children.map((c) => ( + + ))} +
+ )} +
+ ) +} + +export function Sidebar({ source, onSelect }: Props) { + const { data: playlists, isLoading } = useQuery({ + queryKey: ['playlists'], + queryFn: api.playlists, + }) + + return ( + + ) +} diff --git a/frontend/src/components/StatusBar.tsx b/frontend/src/components/StatusBar.tsx new file mode 100644 index 0000000..ba60599 --- /dev/null +++ b/frontend/src/components/StatusBar.tsx @@ -0,0 +1,29 @@ +interface Props { + showing: number + total: number + sourceName: string + loading?: boolean +} + +export function StatusBar({ showing, total, sourceName, loading }: Props) { + return ( +
+ {sourceName} + · + {loading ? ( + Loading… + ) : ( + + {showing === total ? ( + <>{total.toLocaleString()} tracks + ) : ( + <> + {showing.toLocaleString()} of {total.toLocaleString()} tracks + + )} + + )} + konduktor · phase 2 +
+ ) +} diff --git a/frontend/src/components/Toolbar.tsx b/frontend/src/components/Toolbar.tsx new file mode 100644 index 0000000..5d0068f --- /dev/null +++ b/frontend/src/components/Toolbar.tsx @@ -0,0 +1,133 @@ +import { useQuery } from '@tanstack/react-query' +import { api } from '../api' + +export interface Filters { + search: string + genre: string + key: string + bpmMin: string + bpmMax: string + ratingMin: number + hasCues: 'any' | 'yes' | 'no' +} + +export const emptyFilters: Filters = { + search: '', + genre: '', + key: '', + bpmMin: '', + bpmMax: '', + ratingMin: 0, + hasCues: 'any', +} + +interface Props { + filters: Filters + onChange: (f: Filters) => void +} + +const selectCls = + 'rounded-md border border-line bg-ink-850 px-2.5 py-1.5 text-sm text-text outline-none focus:border-accent hover:border-ink-600 transition-colors' + +export function Toolbar({ filters, onChange }: Props) { + const { data: facets } = useQuery({ queryKey: ['facets'], queryFn: api.facets }) + const set = (patch: Partial) => onChange({ ...filters, ...patch }) + const active = + filters.search || + filters.genre || + filters.key || + filters.bpmMin || + filters.bpmMax || + filters.ratingMin > 0 || + filters.hasCues !== 'any' + + return ( +
+
+ + ⌕ + + set({ search: e.target.value })} + placeholder="Search artist, title, album…" + className="w-64 rounded-md border border-line bg-ink-850 py-1.5 pl-8 pr-3 text-sm text-text outline-none placeholder:text-faint focus:border-accent" + /> +
+ + + + + +
+ set({ bpmMin: e.target.value.replace(/[^\d.]/g, '') })} + placeholder="min" + className="w-14 rounded-md border border-line bg-ink-850 px-2 py-1.5 text-center text-sm tabular-nums outline-none focus:border-accent placeholder:text-faint" + /> + BPM + set({ bpmMax: e.target.value.replace(/[^\d.]/g, '') })} + placeholder="max" + className="w-14 rounded-md border border-line bg-ink-850 px-2 py-1.5 text-center text-sm tabular-nums outline-none focus:border-accent placeholder:text-faint" + /> +
+ + + + + + {active && ( + + )} +
+ ) +} diff --git a/frontend/src/components/TrackTable.tsx b/frontend/src/components/TrackTable.tsx new file mode 100644 index 0000000..cd5e9e0 --- /dev/null +++ b/frontend/src/components/TrackTable.tsx @@ -0,0 +1,193 @@ +import { useMemo, useRef } from 'react' +import { + createColumnHelper, + flexRender, + getCoreRowModel, + getSortedRowModel, + useReactTable, + type SortingState, +} from '@tanstack/react-table' +import { useVirtualizer } from '@tanstack/react-virtual' +import type { Track } from '../api' +import { formatBpm, formatDuration, keyColor } from '../lib/format' +import { RatingStars } from './RatingStars' + +const col = createColumnHelper() + +const columns = [ + col.accessor('title', { + header: 'Title', + size: 320, + cell: (c) => ( +
+
+ {c.getValue() || Untitled} +
+
{c.row.original.artist}
+
+ ), + }), + col.accessor('album', { + header: 'Album', + size: 200, + cell: (c) => {c.getValue() || '—'}, + }), + col.accessor('genre', { + header: 'Genre', + size: 150, + cell: (c) => { + const g = c.getValue()?.trim() + return g ? ( + {g} + ) : ( + — + ) + }, + }), + col.accessor('bpm', { + header: 'BPM', + size: 74, + cell: (c) => {formatBpm(c.getValue())}, + }), + col.accessor('key', { + header: 'Key', + size: 64, + cell: (c) => { + const k = c.getValue() + if (!k) return — + return ( + + {k} + + ) + }, + }), + col.accessor('rating', { + header: 'Rating', + size: 92, + cell: (c) => , + }), + col.accessor('length', { + header: 'Time', + size: 64, + cell: (c) => {formatDuration(c.getValue())}, + }), + col.accessor('cue_count', { + header: 'Cues', + size: 72, + cell: (c) => { + const n = c.getValue() + const grid = c.row.original.has_grid + return ( + + 0 ? 'text-text' : 'text-faint'}>{n} + {grid && ⊞} + + ) + }, + }), + col.accessor('playcount', { + header: 'Plays', + size: 68, + cell: (c) => {c.getValue() || 0}, + }), +] + +interface Props { + tracks: Track[] + sorting: SortingState + onSortingChange: (s: SortingState) => void + // Playlists have a meaningful order; disable default sort to preserve it. + ordered?: boolean +} + +export function TrackTable({ tracks, sorting, onSortingChange }: Props) { + const table = useReactTable({ + data: tracks, + columns, + state: { sorting }, + onSortingChange: (updater) => + onSortingChange(typeof updater === 'function' ? updater(sorting) : updater), + getCoreRowModel: getCoreRowModel(), + getSortedRowModel: getSortedRowModel(), + }) + + const rows = table.getRowModel().rows + const parentRef = useRef(null) + + const virtualizer = useVirtualizer({ + count: rows.length, + getScrollElement: () => parentRef.current, + estimateSize: () => 44, + overscan: 12, + }) + + const totalWidth = useMemo( + () => table.getTotalSize(), + // eslint-disable-next-line react-hooks/exhaustive-deps + [], + ) + const virtualRows = virtualizer.getVirtualItems() + + return ( +
+
+ {/* Header */} +
+ + {table.getHeaderGroups()[0].headers.map((header) => { + const sorted = header.column.getIsSorted() + return ( + + ) + })} +
+ + {/* Virtualized rows */} +
+ {virtualRows.map((vr) => { + const row = rows[vr.index] + return ( +
+ + {vr.index + 1} + + {row.getVisibleCells().map((cell) => ( +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
+ ))} +
+ ) + })} +
+
+
+ ) +} diff --git a/frontend/src/index.css b/frontend/src/index.css new file mode 100644 index 0000000..a468820 --- /dev/null +++ b/frontend/src/index.css @@ -0,0 +1,58 @@ +@import 'tailwindcss'; + +/* Konduktor design tokens — a dark, deck-friendly palette. */ +@theme { + --color-ink-950: #0a0b0f; + --color-ink-900: #101218; + --color-ink-850: #161922; + --color-ink-800: #1c2029; + --color-ink-700: #262b37; + --color-ink-600: #333a49; + --color-line: #2a2f3b; + + --color-text: #e6e9ef; + --color-muted: #8b93a3; + --color-faint: #5a6172; + + --color-accent: #4f8cff; + --color-accent-soft: #2b3a5c; + --color-gold: #ffb020; + --color-mint: #34d399; + --color-pink: #f472b6; +} + +html, +body, +#root { + height: 100%; +} + +body { + margin: 0; + background: var(--color-ink-950); + color: var(--color-text); + font-family: + 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; + font-feature-settings: 'tnum' 1; /* tabular numbers for BPM columns */ + -webkit-font-smoothing: antialiased; +} + +/* Thin, dark scrollbars that fit the deck aesthetic. */ +* { + scrollbar-width: thin; + scrollbar-color: var(--color-ink-600) transparent; +} +*::-webkit-scrollbar { + width: 10px; + height: 10px; +} +*::-webkit-scrollbar-thumb { + background: var(--color-ink-600); + border-radius: 6px; + border: 2px solid transparent; + background-clip: padding-box; +} +*::-webkit-scrollbar-thumb:hover { + background: var(--color-ink-700); + background-clip: padding-box; +} diff --git a/frontend/src/lib/format.ts b/frontend/src/lib/format.ts new file mode 100644 index 0000000..574183a --- /dev/null +++ b/frontend/src/lib/format.ts @@ -0,0 +1,25 @@ +// Display helpers for track data. + +export function formatDuration(seconds: number | null): string { + if (seconds == null) return '—' + const m = Math.floor(seconds / 60) + const s = Math.floor(seconds % 60) + return `${m}:${s.toString().padStart(2, '0')}` +} + +export function formatBpm(bpm: number | null): string { + if (bpm == null) return '—' + return bpm.toFixed(1) +} + +// Traktor stores keys like "10m" / "8d" (Open Key notation) or classic "8A". +// Give each of the 12 pitch classes a stable hue so harmonic groups read at a +// glance — adjacent/compatible keys land near each other on the color wheel. +export function keyColor(key: string | null): string | undefined { + if (!key) return undefined + const m = key.match(/(\d+)/) + if (!m) return undefined + const n = parseInt(m[1], 10) % 12 + const hue = (n / 12) * 360 + return `hsl(${hue} 65% 62%)` +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx new file mode 100644 index 0000000..ee87744 --- /dev/null +++ b/frontend/src/main.tsx @@ -0,0 +1,22 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import './index.css' +import App from './App.tsx' + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: 30_000, + refetchOnWindowFocus: false, + }, + }, +}) + +createRoot(document.getElementById('root')!).render( + + + + + , +) diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json new file mode 100644 index 0000000..6830b6f --- /dev/null +++ b/frontend/tsconfig.app.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023", "DOM"], + "module": "esnext", + "types": ["vite/client"], + "allowArbitraryExtensions": true, + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json new file mode 100644 index 0000000..8455dcb --- /dev/null +++ b/frontend/tsconfig.node.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "es2023", + "lib": ["ES2023"], + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "module": "nodenext", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 0000000..45e215c --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// Proxy /api to the FastAPI backend so the frontend can use same-origin fetches. +export default defineConfig({ + plugins: [react()], + server: { + port: 5173, + proxy: { + '/api': 'http://localhost:8000', + }, + }, +})