From fdd555510097c1518f58426d6e4b65833e1acf36 Mon Sep 17 00:00:00 2001 From: Cedric Date: Fri, 20 Nov 2026 20:18:24 +0100 Subject: [PATCH] Garage UI : interface web d'administration pour Garage (API v2 + CLI) Co-Authored-By: Claude Sonnet 5.5 --- .env.example | 14 + .gitignore | 7 + Dockerfile | 34 + LICENSE | 21 + LICENSE.fr.md | 26 + README.md | 77 + THIRD_PARTY_NOTICES.md | 8 + cmd/mockgarage/main.go | 339 ++++ cmd/server/main.go | 404 ++++ cmd/server/main_test.go | 144 ++ docker-compose.yml | 27 + frontend/index.html | 16 + frontend/package-lock.json | 3402 ++++++++++++++++++++++++++++++++++ frontend/package.json | 22 + frontend/public/theme.js | 6 + frontend/src/ActionMenu.tsx | 92 + frontend/src/App.tsx | 170 ++ frontend/src/Buckets.tsx | 385 ++++ frontend/src/Cluster.tsx | 284 +++ frontend/src/Console.tsx | 131 ++ frontend/src/Keys.tsx | 351 ++++ frontend/src/Login.tsx | 47 + frontend/src/Maintenance.tsx | 207 +++ frontend/src/Overview.tsx | 127 ++ frontend/src/api.ts | 179 ++ frontend/src/format.ts | 39 + frontend/src/gicons.tsx | 25 + frontend/src/icons.tsx | 390 ++++ frontend/src/main.tsx | 10 + frontend/src/papicons.ts | 156 ++ frontend/src/styles.css | 1074 +++++++++++ frontend/src/ui.tsx | 232 +++ frontend/tsconfig.json | 17 + frontend/vite.config.ts | 10 + go.mod | 3 + web/embed.go | 10 + 36 files changed, 8486 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 LICENSE.fr.md create mode 100644 README.md create mode 100644 THIRD_PARTY_NOTICES.md create mode 100644 cmd/mockgarage/main.go create mode 100644 cmd/server/main.go create mode 100644 cmd/server/main_test.go create mode 100644 docker-compose.yml create mode 100644 frontend/index.html create mode 100644 frontend/package-lock.json create mode 100644 frontend/package.json create mode 100644 frontend/public/theme.js create mode 100644 frontend/src/ActionMenu.tsx create mode 100644 frontend/src/App.tsx create mode 100644 frontend/src/Buckets.tsx create mode 100644 frontend/src/Cluster.tsx create mode 100644 frontend/src/Console.tsx create mode 100644 frontend/src/Keys.tsx create mode 100644 frontend/src/Login.tsx create mode 100644 frontend/src/Maintenance.tsx create mode 100644 frontend/src/Overview.tsx create mode 100644 frontend/src/api.ts create mode 100644 frontend/src/format.ts create mode 100644 frontend/src/gicons.tsx create mode 100644 frontend/src/icons.tsx create mode 100644 frontend/src/main.tsx create mode 100644 frontend/src/papicons.ts create mode 100644 frontend/src/styles.css create mode 100644 frontend/src/ui.tsx create mode 100644 frontend/tsconfig.json create mode 100644 frontend/vite.config.ts create mode 100644 go.mod create mode 100644 web/embed.go diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9aea251 --- /dev/null +++ b/.env.example @@ -0,0 +1,14 @@ +# Adresse de l'API d'administration de Garage (section [admin] de garage.toml, api_bind_addr). +GARAGE_ADMIN_URL=http://garage:3903 +# Jeton d'administration (admin_token de garage.toml, ou `garage admin-token create`). +GARAGE_ADMIN_TOKEN= +# Authentification de l'interface : vide = aucune (à réserver à un reverse proxy qui authentifie). +UI_USER=admin +UI_PASSWORD= +# Affichage des exemples de configuration client (rclone, aws cli). +GARAGE_S3_ENDPOINT=https://s3.example.org +GARAGE_S3_REGION=garage +# Console CLI (facultatif) : chemin du binaire garage et secret RPC du cluster. +GARAGE_BIN=/garage +GARAGE_RPC_HOST= +GARAGE_RPC_SECRET= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9718108 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/bin/ +web/dist/* +!web/dist/.gitkeep +frontend/node_modules/ +.env +.DS_Store +.claude/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7875a77 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# syntax=docker/dockerfile:1 + +# --- 1. Frontend : React + Vite -> /src/web/dist +FROM node:22-alpine AS frontend +WORKDIR /src/frontend +COPY frontend/package.json frontend/package-lock.json ./ +RUN --mount=type=cache,target=/root/.npm npm ci --no-audit --no-fund +COPY frontend/ ./ +RUN npm run build + +# --- 2. Backend : binaire Go statique embarquant le frontend +FROM golang:1.24-alpine AS backend +ARG VERSION=dev +WORKDIR /src +COPY go.mod ./ +COPY cmd ./cmd +COPY web/embed.go ./web/ +COPY --from=frontend /src/web/dist ./web/dist +RUN --mount=type=cache,target=/root/.cache/go-build \ + CGO_ENABLED=0 go test ./... && \ + CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" -o /out/server ./cmd/server + +# --- 3. Binaire garage (CLI) : image officielle, même version que le serveur à piloter +FROM dxflrs/garage:v2.3.0 AS garage + +# --- 4. Image finale : distroless, non-root +FROM gcr.io/distroless/static-debian12:nonroot +COPY --from=backend /out/server /server +COPY --from=garage /garage /garage +ENV LISTEN_ADDR=:8080 GARAGE_BIN=/garage +EXPOSE 8080 +USER nonroot:nonroot +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/server", "healthcheck"] +ENTRYPOINT ["/server"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0612a10 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 vLab-BZH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE.fr.md b/LICENSE.fr.md new file mode 100644 index 0000000..1d18e7c --- /dev/null +++ b/LICENSE.fr.md @@ -0,0 +1,26 @@ +# Licence MIT (traduction française) + +> Traduction fournie à titre informatif. Seule la version anglaise du fichier [`LICENSE`](LICENSE) fait foi. + +```text +Copyright (c) 2026 vLab-BZH + +L'autorisation est accordée, gracieusement, à toute personne obtenant une copie +de ce logiciel et des fichiers de documentation associés (le « Logiciel »), de +commercialiser le Logiciel sans restriction, notamment les droits d'utiliser, +de copier, de modifier, de fusionner, de publier, de distribuer, de +sous-licencier et/ou de vendre des copies du Logiciel, ainsi que d'autoriser +les personnes auxquelles le Logiciel est fourni à le faire, sous réserve des +conditions suivantes : + +La déclaration de copyright ci-dessus et la présente autorisation doivent être +incluses dans toutes copies ou parties substantielles du Logiciel. + +LE LOGICIEL EST FOURNI « TEL QUEL », SANS GARANTIE D'AUCUNE SORTE, EXPLICITE OU +IMPLICITE, NOTAMMENT SANS GARANTIE DE QUALITÉ MARCHANDE, D'ADÉQUATION À UN +USAGE PARTICULIER ET D'ABSENCE DE CONTREFAÇON. EN AUCUN CAS LES AUTEURS OU +TITULAIRES DU DROIT D'AUTEUR NE SERONT RESPONSABLES DE TOUT DOMMAGE, +RÉCLAMATION OU AUTRE RESPONSABILITÉ, QUE CE SOIT DANS LE CADRE D'UN CONTRAT, +D'UN DÉLIT OU AUTRE, EN PROVENANCE DE, CONSÉCUTIF À OU EN RELATION AVEC LE +LOGICIEL OU SON UTILISATION, OU AVEC D'AUTRES ÉLÉMENTS DU LOGICIEL. +``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..f5b603f --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# Garage UI + +Interface web d'administration pour un cluster [Garage](https://garagehq.deuxfleurs.fr/) (stockage S3 auto-hébergé), dans la même charte que [Up And Down](https://github.com/vLab-BZH/upandown) : thème clair et sombre, icônes [Papicons](https://github.com/PapillonApp/papicons), même feuille de style. + +- **Vue d'ensemble** : santé du cluster, partitions, nœuds et occupation des disques, plus gros buckets. +- **Buckets** : création, alias globaux, clés autorisées (lecture, écriture, propriétaire), quotas (taille, nombre d'objets), site web statique, nettoyage des envois multipart inachevés, suppression. +- **Clés d'accès** : création, import, secret affiché à la demande, exemples de configuration `rclone` et `aws`, permissions par bucket, suppression. +- **Cluster** : nœuds, rôles (zone, capacité, étiquettes, passerelle), layout en attente avec prévisualisation, application et annulation, connexion d'un nœud. +- **Maintenance** : réparations (`tables`, `blocks`, `scrub`...), tâches de fond, blocs en erreur, snapshot des métadonnées. +- **Console** : exécute la CLI `garage` (liste blanche de sous-commandes), avec des raccourcis et un historique. + +Garage 2.0 ou plus récent est requis : l'interface parle à l'**API d'administration v2** (`/v2/...`). + +## Fonctionnement + +Un seul binaire Go (bibliothèque standard, aucune dépendance) qui embarque le frontend. Il ne contient pas de logique métier : + +1. il authentifie l'utilisateur (`UI_USER` / `UI_PASSWORD`, cookie signé `HttpOnly` `SameSite=Strict`) ; +2. il relaie `/api/garage/v2/*` vers l'API d'administration de Garage en ajoutant le jeton : **le jeton n'atteint jamais le navigateur**, et seuls les chemins `/v2/` sont relayés ; +3. il exécute, pour la console, le binaire `garage` avec une liste blanche de sous-commandes (`status`, `stats`, `repair`, `worker`, `block`, `meta`, `layout`, `bucket`, `key`, `node`), sans shell, avec délai maximal et sortie plafonnée. + +Cette interface donne les pleins pouvoirs sur le cluster : ne l'exposez que derrière HTTPS et une authentification (la vôtre, ou un reverse proxy avec `UI_PASSWORD` vide). + +## Démarrage + +Côté Garage, il faut l'API d'administration (`garage.toml`) : + +```toml +[admin] +api_bind_addr = "0.0.0.0:3903" +admin_token = "un-jeton-long-et-aleatoire" +``` + +Puis : + +```bash +cp .env.example .env # renseigner GARAGE_ADMIN_URL, GARAGE_ADMIN_TOKEN, UI_PASSWORD +docker compose up -d --build +# http://localhost:8088 +``` + +La console CLI utilise `GARAGE_RPC_HOST` (adresse RPC, port 3901) et `GARAGE_RPC_SECRET` (le `rpc_secret` de `garage.toml`). Sans `GARAGE_BIN`, la page Console est désactivée ; les autres pages n'en ont pas besoin. + +## Variables + +| Variable | Défaut | Rôle | +|---|---|---| +| `GARAGE_ADMIN_URL` | `http://garage:3903` | API d'administration de Garage | +| `GARAGE_ADMIN_TOKEN` | (obligatoire) | Jeton d'administration | +| `UI_USER` / `UI_PASSWORD` | `admin` / vide | Connexion à l'interface (vide : aucune authentification) | +| `SESSION_SECRET` / `SESSION_TTL` | aléatoire / `24h` | Signature et durée de la session | +| `PUBLIC_URL` | | URL publique (`https://...` : cookie `Secure`) | +| `TITLE` | `Garage UI` | Titre affiché | +| `GARAGE_S3_ENDPOINT` / `GARAGE_S3_REGION` | | Exemples de configuration client | +| `GARAGE_BIN` / `GARAGE_CONFIG` | `/garage` si présent | CLI : binaire et fichier `garage.toml` (`-c`) | +| `GARAGE_RPC_HOST` / `GARAGE_RPC_SECRET` | | CLI : adresse et secret RPC | +| `LISTEN_ADDR` | `:8080` | Écoute | + +## Développement + +```bash +cd frontend && npm ci && npm run build # sortie dans web/dist (embarquée) +go test ./... && go build -o bin/server ./cmd/server +``` + +`cmd/mockgarage` est un **faux** Garage v2 en mémoire (jeton `test`, port 3903) pour développer l'interface sans cluster : + +```bash +MOCK_ADDR=127.0.0.1:13903 go run ./cmd/mockgarage & +GARAGE_ADMIN_URL=http://127.0.0.1:13903 GARAGE_ADMIN_TOKEN=test UI_PASSWORD=secret LISTEN_ADDR=127.0.0.1:8080 go run ./cmd/server +``` + +`npm run dev` (dans `frontend/`) sert le frontend avec rechargement à chaud et proxy vers `:8080`. + +## Licence + +MIT, voir [LICENSE](LICENSE). Composants tiers : [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000..eb39a98 --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,8 @@ +# Composants tiers + +- **Up And Down** (MIT, vLab-BZH) : feuille de style, jetons de couleur et composants d'interface. +- **Papicons** 0.2.3 (MIT, Association Papillon, icônes de Tom Things, ) : tracés copiés sans modification dans `frontend/src/papicons.ts`, utilisés par `icons.tsx` et `gicons.tsx`. +- **Lucide** (ISC, ) : icônes « server » et « terminal » (`frontend/src/gicons.tsx`), absentes de Papicons. +- **React** (MIT, Meta), **Vite** (MIT). + +Le serveur n'utilise que la bibliothèque standard de Go. diff --git a/cmd/mockgarage/main.go b/cmd/mockgarage/main.go new file mode 100644 index 0000000..ce400c5 --- /dev/null +++ b/cmd/mockgarage/main.go @@ -0,0 +1,339 @@ +// mockgarage : faux serveur d'administration Garage v2 (en mémoire), pour développer et tester +// l'interface sans cluster. Ce n'est PAS Garage : il imite seulement la forme des réponses. +// +// go run ./cmd/mockgarage # écoute sur :3903, jeton « test » +package main + +import ( + "encoding/json" + "fmt" + "log" + "net/http" + "os" + "strings" + "sync" + "time" +) + +type perm struct { + Read bool `json:"read"` + Write bool `json:"write"` + Owner bool `json:"owner"` +} + +type bucket struct { + ID string + Created string + Aliases []string + Objects int + Bytes int64 + Site bool + Index string + ErrDoc *string + MaxSize *int64 + MaxObjs *int64 + Keys map[string]perm +} + +type key struct { + ID, Name, Secret, Created string + Expiration *string + CreateBucket bool +} + +var ( + mu sync.Mutex + buckets = map[string]*bucket{} + keys = map[string]*key{} + nodeID = "563e1ac825ee3323aa441e72c26d1030d6d4414aeb3697544d1d7e0c3d8da3a2" + staged bool + version = 1 +) + +func init() { + now := time.Now().UTC().Format(time.RFC3339) + keys["GK31c2f218a2e44f485b94239e"] = &key{ID: "GK31c2f218a2e44f485b94239e", Name: "sauvegardes-proxmox", Secret: strings.Repeat("ab12", 16), Created: now, CreateBucket: true} + keys["GKb5d1c6ef0a9d4a3f9c8e1b22"] = &key{ID: "GKb5d1c6ef0a9d4a3f9c8e1b22", Name: "lecture-seule", Secret: strings.Repeat("cd34", 16), Created: now} + gb := int64(1 << 30) + q := 50 * gb + buckets["b1"] = &bucket{ID: "9a1f0c3e5b7d2f48a6c1e9d0b3a5f7c2e4d6b8a0c2e4f6a8b0d2c4e6f8a0b2c4", Created: now, Aliases: []string{"proxmox-backups"}, Objects: 1284, Bytes: 38 * gb, MaxSize: &q, + Keys: map[string]perm{"GK31c2f218a2e44f485b94239e": {true, true, true}}} + buckets["b2"] = &bucket{ID: "1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d", Created: now, Aliases: []string{"site-vitrine", "www"}, Objects: 42, Bytes: 12 << 20, Site: true, Index: "index.html", + Keys: map[string]perm{"GKb5d1c6ef0a9d4a3f9c8e1b22": {true, false, false}}} + buckets["b3"] = &bucket{ID: "7f6e5d4c3b2a19080f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a6978", Created: now, Aliases: []string{"vide"}, Keys: map[string]perm{}} +} + +func j(w http.ResponseWriter, code int, v any) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(code) + _ = json.NewEncoder(w).Encode(v) +} + +func gerr(w http.ResponseWriter, code int, msg string) { + j(w, code, map[string]any{"code": "MockError", "message": msg, "region": "garage", "path": ""}) +} + +func findBucket(id string) *bucket { + for _, b := range buckets { + if b.ID == id { + return b + } + } + return nil +} + +func (b *bucket) info() map[string]any { + ks := []map[string]any{} + for id, p := range b.Keys { + if k := keys[id]; k != nil { + ks = append(ks, map[string]any{"accessKeyId": id, "name": k.Name, "permissions": p, "bucketLocalAliases": []string{}}) + } + } + var wc any + if b.Site { + wc = map[string]any{"indexDocument": b.Index, "errorDocument": b.ErrDoc} + } + return map[string]any{ + "id": b.ID, "created": b.Created, "globalAliases": b.Aliases, "localAliases": []any{}, "websiteAccess": b.Site, "websiteConfig": wc, + "keys": ks, "objects": b.Objects, "bytes": b.Bytes, "unfinishedUploads": 0, "unfinishedMultipartUploads": 2, + "unfinishedMultipartUploadParts": 5, "unfinishedMultipartUploadBytes": 30 << 20, + "quotas": map[string]any{"maxSize": b.MaxSize, "maxObjects": b.MaxObjs}, + } +} + +func (k *key) info(secret bool) map[string]any { + bs := []map[string]any{} + for _, b := range buckets { + if p, ok := b.Keys[k.ID]; ok { + bs = append(bs, map[string]any{"id": b.ID, "globalAliases": b.Aliases, "localAliases": []string{}, "permissions": p}) + } + } + var s any + if secret { + s = k.Secret + } + return map[string]any{"accessKeyId": k.ID, "name": k.Name, "created": k.Created, "expiration": k.Expiration, "expired": false, + "secretAccessKey": s, "permissions": map[string]bool{"createBucket": k.CreateBucket}, "buckets": bs} +} + +func handle(token string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + if r.Header.Get("Authorization") != "Bearer "+token { + gerr(w, 403, "jeton d'administration invalide") + return + } + mu.Lock() + defer mu.Unlock() + op := strings.TrimPrefix(r.URL.Path, "/v2/") + q := r.URL.Query() + var body map[string]any + var arr []any + raw := json.NewDecoder(r.Body) + var anyBody any + _ = raw.Decode(&anyBody) + switch v := anyBody.(type) { + case map[string]any: + body = v + case []any: + arr = v + } + str := func(k string) string { s, _ := body[k].(string); return s } + log.Printf("%s %s", r.Method, op) + + switch op { + case "GetClusterHealth": + j(w, 200, map[string]any{"status": "healthy", "knownNodes": 1, "connectedNodes": 1, "storageNodes": 1, "storageNodesUp": 1, "partitions": 256, "partitionsQuorum": 256, "partitionsAllOk": 256}) + case "GetClusterStatus": + var role any = map[string]any{"zone": "dc1", "tags": []string{"lab"}, "capacity": int64(500e9)} + j(w, 200, map[string]any{"layoutVersion": version, "nodes": []any{map[string]any{ + "id": nodeID, "role": role, "addr": "172.18.0.2:3901", "hostname": "garage", "isUp": true, "lastSeenSecsAgo": nil, "draining": false, + "dataPartition": map[string]any{"available": int64(412e9), "total": int64(500e9)}, "metadataPartition": map[string]any{"available": int64(40e9), "total": int64(50e9)}, "garageVersion": "v2.3.0"}}}) + case "GetClusterStatistics": + j(w, 200, map[string]any{"freeform": "Storage nodes:\n ID Hostname Zone Capacity Part. DataAvail MetaAvail\n 563e1ac8 garage dc1 500.0 GB 256 412.0 GB 40.0 GB"}) + case "GetClusterLayout": + st := []any{} + if staged { + st = append(st, map[string]any{"id": nodeID, "zone": "dc1", "tags": []string{"lab"}, "capacity": int64(800e9)}) + } + j(w, 200, map[string]any{"version": version, "roles": []any{map[string]any{"id": nodeID, "zone": "dc1", "tags": []string{"lab"}, "capacity": int64(500e9)}}, "partitionSize": 67108864, "stagedRoleChanges": st}) + case "UpdateClusterLayout": + staged = true + j(w, 200, map[string]any{"version": version}) + case "PreviewClusterLayoutChanges": + j(w, 200, map[string]any{"message": []string{"==== NEW CLUSTER LAYOUT ====", "capacité 800 GB sur dc1", "(aperçu simulé)"}}) + case "ApplyClusterLayout": + staged, version = false, version+1 + j(w, 200, map[string]any{"message": []string{"ok"}}) + case "RevertClusterLayout": + staged = false + j(w, 200, map[string]any{"version": version}) + case "ConnectClusterNodes": + j(w, 200, []any{map[string]any{"success": len(arr) > 0 && strings.Contains(fmt.Sprint(arr[0]), "@")}}) + case "ListBuckets": + out := []any{} + for _, b := range buckets { + out = append(out, map[string]any{"id": b.ID, "created": b.Created, "globalAliases": b.Aliases, "localAliases": []any{}}) + } + j(w, 200, out) + case "GetBucketInfo": + if b := findBucket(q.Get("id")); b != nil { + j(w, 200, b.info()) + return + } + gerr(w, 404, "bucket introuvable") + case "CreateBucket": + id := fmt.Sprintf("%064x", time.Now().UnixNano()) + b := &bucket{ID: id, Created: time.Now().UTC().Format(time.RFC3339), Aliases: []string{str("globalAlias")}, Keys: map[string]perm{}} + buckets[id] = b + j(w, 200, b.info()) + case "DeleteBucket": + b := findBucket(q.Get("id")) + switch { + case b == nil: + gerr(w, 404, "bucket introuvable") + case b.Objects > 0: + gerr(w, 409, "le bucket n'est pas vide") + default: + for k, x := range buckets { + if x == b { + delete(buckets, k) + } + } + w.WriteHeader(204) + } + case "UpdateBucket": + b := findBucket(q.Get("id")) + if b == nil { + gerr(w, 404, "bucket introuvable") + return + } + if wa, ok := body["websiteAccess"].(map[string]any); ok { + b.Site, _ = wa["enabled"].(bool) + b.Index, _ = wa["indexDocument"].(string) + } + if qu, ok := body["quotas"].(map[string]any); ok { + b.MaxSize, b.MaxObjs = nil, nil + if f, ok := qu["maxSize"].(float64); ok { + n := int64(f) + b.MaxSize = &n + } + if f, ok := qu["maxObjects"].(float64); ok { + n := int64(f) + b.MaxObjs = &n + } + } + j(w, 200, b.info()) + case "AddBucketAlias", "RemoveBucketAlias": + b := findBucket(str("bucketId")) + if b == nil { + gerr(w, 404, "bucket introuvable") + return + } + a := str("globalAlias") + if op == "AddBucketAlias" { + b.Aliases = append(b.Aliases, a) + } else { + out := b.Aliases[:0:0] + for _, x := range b.Aliases { + if x != a { + out = append(out, x) + } + } + b.Aliases = out + } + j(w, 200, b.info()) + case "AllowBucketKey", "DenyBucketKey": + b := findBucket(str("bucketId")) + if b == nil { + gerr(w, 404, "bucket introuvable") + return + } + p := b.Keys[str("accessKeyId")] + pm, _ := body["permissions"].(map[string]any) + on := op == "AllowBucketKey" + if pm["read"] == true { + p.Read = on + } + if pm["write"] == true { + p.Write = on + } + if pm["owner"] == true { + p.Owner = on + } + b.Keys[str("accessKeyId")] = p + j(w, 200, b.info()) + case "CleanupIncompleteUploads": + j(w, 200, map[string]any{"uploadsDeleted": 2}) + case "ListKeys": + out := []any{} + for _, k := range keys { + out = append(out, map[string]any{"id": k.ID, "name": k.Name, "created": k.Created, "expiration": k.Expiration, "expired": false}) + } + j(w, 200, out) + case "GetKeyInfo": + if k := keys[q.Get("id")]; k != nil { + j(w, 200, k.info(q.Get("showSecretKey") == "true")) + return + } + gerr(w, 404, "clé introuvable") + case "CreateKey", "ImportKey": + id := str("accessKeyId") + sec := str("secretAccessKey") + if id == "" { + id = fmt.Sprintf("GK%024x", time.Now().UnixNano()) + sec = fmt.Sprintf("%064x", time.Now().UnixNano()) + } + k := &key{ID: id, Name: str("name"), Secret: sec, Created: time.Now().UTC().Format(time.RFC3339)} + keys[id] = k + j(w, 200, k.info(true)) + case "UpdateKey": + k := keys[q.Get("id")] + if k == nil { + gerr(w, 404, "clé introuvable") + return + } + if n := str("name"); n != "" { + k.Name = n + } + if a, ok := body["allow"].(map[string]any); ok && a["createBucket"] == true { + k.CreateBucket = true + } + if d, ok := body["deny"].(map[string]any); ok && d["createBucket"] == true { + k.CreateBucket = false + } + j(w, 200, k.info(false)) + case "DeleteKey": + delete(keys, q.Get("id")) + for _, b := range buckets { + delete(b.Keys, q.Get("id")) + } + w.WriteHeader(204) + case "ListWorkers": + j(w, 200, map[string]any{"success": map[string]any{nodeID: []any{ + map[string]any{"id": 1, "name": "Block resync worker #1", "state": "idle", "errors": 0, "consecutiveErrors": 0, "queueLength": 0}, + map[string]any{"id": 2, "name": "Block scrub worker", "state": "busy", "errors": 0, "consecutiveErrors": 0, "progress": "42.0%"}, + map[string]any{"id": 3, "name": "object sync", "state": map[string]any{"throttled": map[string]any{"durationSecs": 5}}, "errors": 1, "consecutiveErrors": 1, "lastError": map[string]any{"message": "timeout", "secsAgo": 90}}, + }}, "error": map[string]any{}}) + case "ListBlockErrors": + j(w, 200, map[string]any{"success": map[string]any{nodeID: []any{}}, "error": map[string]any{}}) + case "LaunchRepairOperation", "CreateMetadataSnapshot", "RetryBlockResync": + j(w, 200, map[string]any{"success": map[string]any{nodeID: nil}, "error": map[string]any{}}) + default: + gerr(w, 404, "opération inconnue : "+op) + } + } +} + +func main() { + token := "test" + if v := os.Getenv("MOCK_TOKEN"); v != "" { + token = v + } + addr := ":3903" + if v := os.Getenv("MOCK_ADDR"); v != "" { + addr = v + } + log.Printf("mockgarage sur %s (jeton %q)", addr, token) + http.Handle("/v2/", handle(token)) + log.Fatal(http.ListenAndServe(addr, nil)) +} diff --git a/cmd/server/main.go b/cmd/server/main.go new file mode 100644 index 0000000..4244617 --- /dev/null +++ b/cmd/server/main.go @@ -0,0 +1,404 @@ +// Garage UI : interface web d'administration d'un cluster Garage (S3). +// +// Le serveur ne contient pas de logique métier : il authentifie l'utilisateur, relaie +// l'API d'administration v2 de Garage en y ajoutant le jeton (qui ne va jamais au +// navigateur) et exécute, si on l'y autorise, quelques sous-commandes de la CLI garage. +package main + +import ( + "bytes" + "context" + "crypto/hmac" + "crypto/rand" + "crypto/sha256" + "crypto/subtle" + "encoding/base64" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "io/fs" + "log" + "net/http" + "net/http/httputil" + "net/url" + "os" + "os/exec" + "path" + "strconv" + "strings" + "time" + + "github.com/vLab-BZH/garage-ui/web" +) + +var version = "dev" + +const ( + cookieName = "garage_ui" + csrfHeader = "X-Requested-With" +) + +type config struct { + listen string + adminURL *url.URL + adminToken string + user string + password string + secret []byte + title string + s3Endpoint string + s3Region string + cliBin string + cliConfig string + publicURL string + sessionTTL time.Duration + cliTimeout time.Duration + transport http.RoundTripper // nil : transport par défaut (les tests y mettent un faux Garage) +} + +func env(k, def string) string { + if v := strings.TrimSpace(os.Getenv(k)); v != "" { + return v + } + return def +} + +func loadConfig() (*config, error) { + c := &config{ + listen: env("LISTEN_ADDR", ":8080"), + adminToken: env("GARAGE_ADMIN_TOKEN", ""), + user: env("UI_USER", "admin"), + password: os.Getenv("UI_PASSWORD"), + title: env("TITLE", "Garage UI"), + s3Endpoint: env("GARAGE_S3_ENDPOINT", ""), + s3Region: env("GARAGE_S3_REGION", "garage"), + cliBin: env("GARAGE_BIN", ""), + cliConfig: env("GARAGE_CONFIG", ""), + publicURL: env("PUBLIC_URL", ""), + sessionTTL: 24 * time.Hour, + cliTimeout: 120 * time.Second, + } + u, err := url.Parse(env("GARAGE_ADMIN_URL", "http://garage:3903")) + if err != nil || u.Host == "" { + return nil, fmt.Errorf("GARAGE_ADMIN_URL invalide") + } + c.adminURL = u + if d, err := time.ParseDuration(env("SESSION_TTL", "24h")); err == nil && d > 0 { + c.sessionTTL = d + } + if s := env("SESSION_SECRET", ""); s != "" { + c.secret = []byte(s) + } else { + c.secret = make([]byte, 32) + if _, err := rand.Read(c.secret); err != nil { + return nil, err + } + } + if c.cliBin == "" { + if st, err := os.Stat("/garage"); err == nil && !st.IsDir() { + c.cliBin = "/garage" + } + } + return c, nil +} + +// --- Session ------------------------------------------------------------------- + +func (c *config) authEnabled() bool { return c.password != "" } + +func (c *config) sign(msg string) string { + m := hmac.New(sha256.New, c.secret) + m.Write([]byte(msg)) + return hex.EncodeToString(m.Sum(nil)) +} + +func (c *config) newSession(user string) string { + exp := strconv.FormatInt(time.Now().Add(c.sessionTTL).Unix(), 10) + msg := base64.RawURLEncoding.EncodeToString([]byte(user)) + "." + exp + return msg + "." + c.sign(msg) +} + +// sessionUser renvoie l'utilisateur de la session, ou "" si elle est absente ou invalide. +func (c *config) sessionUser(r *http.Request) string { + if !c.authEnabled() { + return "admin" + } + ck, err := r.Cookie(cookieName) + if err != nil { + return "" + } + parts := strings.Split(ck.Value, ".") + if len(parts) != 3 { + return "" + } + msg := parts[0] + "." + parts[1] + if subtle.ConstantTimeCompare([]byte(parts[2]), []byte(c.sign(msg))) != 1 { + return "" + } + exp, err := strconv.ParseInt(parts[1], 10, 64) + if err != nil || time.Now().Unix() > exp { + return "" + } + u, err := base64.RawURLEncoding.DecodeString(parts[0]) + if err != nil { + return "" + } + return string(u) +} + +func (c *config) setCookie(w http.ResponseWriter, value string, maxAge int) { + http.SetCookie(w, &http.Cookie{ + Name: cookieName, Value: value, Path: "/", MaxAge: maxAge, HttpOnly: true, + SameSite: http.SameSiteStrictMode, Secure: strings.HasPrefix(c.publicURL, "https://"), + }) +} + +// --- Utilitaires HTTP ---------------------------------------------------------- + +func writeJSON(w http.ResponseWriter, code int, v any) { + w.Header().Set("Content-Type", "application/json") + w.Header().Set("Cache-Control", "no-store") + w.WriteHeader(code) + _ = json.NewEncoder(w).Encode(v) +} + +func writeErr(w http.ResponseWriter, code int, msg string) { + writeJSON(w, code, map[string]string{"message": msg}) +} + +// guard exige une session et, pour les requêtes qui modifient, l'en-tête anti-CSRF. +func (c *config) guard(next http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + if c.sessionUser(r) == "" { + writeErr(w, http.StatusUnauthorized, "Connexion requise") + return + } + if r.Method != http.MethodGet && r.Method != http.MethodHead && r.Header.Get(csrfHeader) == "" { + writeErr(w, http.StatusForbidden, "En-tête "+csrfHeader+" manquant") + return + } + next(w, r) + } +} + +// --- Routes -------------------------------------------------------------------- + +func (c *config) handleConfig(w http.ResponseWriter, r *http.Request) { + user := c.sessionUser(r) + writeJSON(w, 200, map[string]any{ + "title": c.title, "version": version, "auth": c.authEnabled(), "user": user, + "cli": c.cliBin != "", "s3Endpoint": c.s3Endpoint, "s3Region": c.s3Region, + }) +} + +func (c *config) handleLogin(w http.ResponseWriter, r *http.Request) { + if r.Header.Get(csrfHeader) == "" { + writeErr(w, http.StatusForbidden, "En-tête "+csrfHeader+" manquant") + return + } + var in struct{ User, Password string } + if err := json.NewDecoder(io.LimitReader(r.Body, 4096)).Decode(&in); err != nil { + writeErr(w, 400, "Requête invalide") + return + } + okU := subtle.ConstantTimeCompare([]byte(in.User), []byte(c.user)) == 1 + okP := subtle.ConstantTimeCompare([]byte(in.Password), []byte(c.password)) == 1 + if !c.authEnabled() || !okU || !okP { + time.Sleep(700 * time.Millisecond) // ralentit les essais en série + writeErr(w, http.StatusUnauthorized, "Identifiants incorrects") + return + } + c.setCookie(w, c.newSession(in.User), int(c.sessionTTL.Seconds())) + writeJSON(w, 200, map[string]string{"user": in.User}) +} + +func (c *config) handleLogout(w http.ResponseWriter, _ *http.Request) { + c.setCookie(w, "", -1) + writeJSON(w, 200, map[string]bool{"ok": true}) +} + +// garageProxy relaie /api/garage/v2/... vers l'API d'administration de Garage. +func (c *config) garageProxy() http.Handler { + rp := &httputil.ReverseProxy{ + Transport: c.transport, + Rewrite: func(pr *httputil.ProxyRequest) { + pr.Out.URL.Scheme = c.adminURL.Scheme + pr.Out.URL.Host = c.adminURL.Host + pr.Out.URL.Path = strings.TrimRight(c.adminURL.Path, "/") + strings.TrimPrefix(pr.In.URL.Path, "/api/garage") + pr.Out.URL.RawPath = "" + pr.Out.Host = c.adminURL.Host + pr.Out.Header.Del("Cookie") + pr.Out.Header.Del(csrfHeader) + pr.Out.Header.Set("Authorization", "Bearer "+c.adminToken) + }, + ErrorHandler: func(w http.ResponseWriter, _ *http.Request, err error) { + log.Printf("garage injoignable: %v", err) + writeErr(w, http.StatusBadGateway, "API d'administration de Garage injoignable ("+c.adminURL.Host+")") + }, + } + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + p := path.Clean(r.URL.Path) + if !strings.HasPrefix(p, "/api/garage/v2/") || (r.Method != http.MethodGet && r.Method != http.MethodPost) { + writeErr(w, http.StatusNotFound, "Route inconnue") + return + } + r.Body = http.MaxBytesReader(w, r.Body, 1<<20) + rp.ServeHTTP(w, r) + }) +} + +// Sous-commandes de la CLI garage accessibles depuis la console. +var cliAllowed = map[string]bool{ + "status": true, "stats": true, "repair": true, "worker": true, "block": true, + "meta": true, "layout": true, "bucket": true, "key": true, "node": true, +} + +type limitedBuf struct { + bytes.Buffer + truncated bool +} + +func (b *limitedBuf) Write(p []byte) (int, error) { + const max = 1 << 20 + if b.Len()+len(p) > max { + p = p[:max-b.Len()] + b.truncated = true + } + b.Buffer.Write(p) + return len(p), nil +} + +func (c *config) handleCLI(w http.ResponseWriter, r *http.Request) { + if c.cliBin == "" { + writeErr(w, http.StatusNotImplemented, "Console CLI non configurée (GARAGE_BIN)") + return + } + var in struct { + Args []string `json:"args"` + } + if err := json.NewDecoder(io.LimitReader(r.Body, 16384)).Decode(&in); err != nil || len(in.Args) == 0 || len(in.Args) > 24 { + writeErr(w, 400, "Arguments invalides") + return + } + for _, a := range in.Args { + if len(a) > 300 || strings.ContainsRune(a, 0) { + writeErr(w, 400, "Argument invalide") + return + } + } + if !cliAllowed[in.Args[0]] { + writeErr(w, http.StatusForbidden, "Sous-commande non autorisée : "+in.Args[0]) + return + } + args := in.Args + if c.cliConfig != "" { + args = append([]string{"-c", c.cliConfig}, args...) + } + ctx, cancel := context.WithTimeout(r.Context(), c.cliTimeout) + defer cancel() + cmd := exec.CommandContext(ctx, c.cliBin, args...) + var env []string + for _, e := range os.Environ() { + if !strings.HasPrefix(e, "UI_") && !strings.HasPrefix(e, "SESSION_") { + env = append(env, e) + } + } + cmd.Env = env + out := &limitedBuf{} + cmd.Stdout, cmd.Stderr = out, out + start := time.Now() + err := cmd.Run() + code := 0 + var ee *exec.ExitError + switch { + case errors.As(err, &ee): + code = ee.ExitCode() + case ctx.Err() != nil: + code = -1 + out.WriteString("\n[délai dépassé]") + case err != nil: + code = -1 + out.WriteString(err.Error()) + } + log.Printf("cli: garage %s -> %d", strings.Join(in.Args, " "), code) + text := out.String() + if out.truncated { + text += "\n[sortie tronquée]" + } + writeJSON(w, 200, map[string]any{"exitCode": code, "output": text, "ms": time.Since(start).Milliseconds()}) +} + +// spa sert le frontend embarqué, avec repli sur index.html. +func spa() http.Handler { + dist, err := fs.Sub(web.Dist, "dist") + if err != nil { + log.Fatal(err) + } + files := http.FileServer(http.FS(dist)) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + p := strings.TrimPrefix(path.Clean(r.URL.Path), "/") + if p == "" { + p = "index.html" + } + if _, err := fs.Stat(dist, p); err != nil { + if _, err := fs.Stat(dist, "index.html"); err != nil { + http.Error(w, "Frontend non compilé : cd frontend && npm ci && npm run build", http.StatusServiceUnavailable) + return + } + r.URL.Path = "/" + } + if p == "index.html" || r.URL.Path == "/" { + w.Header().Set("Cache-Control", "no-cache") + } + w.Header().Set("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'none'") + w.Header().Set("X-Content-Type-Options", "nosniff") + w.Header().Set("Referrer-Policy", "same-origin") + files.ServeHTTP(w, r) + }) +} + +func (c *config) routes() http.Handler { + mux := http.NewServeMux() + mux.HandleFunc("GET /api/health", func(w http.ResponseWriter, _ *http.Request) { writeJSON(w, 200, map[string]bool{"ok": true}) }) + mux.HandleFunc("GET /api/config", c.handleConfig) + mux.HandleFunc("POST /api/login", c.handleLogin) + mux.HandleFunc("POST /api/logout", c.handleLogout) + mux.HandleFunc("POST /api/cli", c.guard(c.handleCLI)) + mux.Handle("/api/garage/", c.guard(c.garageProxy().ServeHTTP)) + mux.Handle("/", spa()) + return mux +} + +func healthcheck() int { + addr := env("LISTEN_ADDR", ":8080") + if strings.HasPrefix(addr, ":") { + addr = "127.0.0.1" + addr + } + cl := http.Client{Timeout: 4 * time.Second} + resp, err := cl.Get("http://" + addr + "/api/health") + if err != nil || resp.StatusCode != 200 { + return 1 + } + return 0 +} + +func main() { + if len(os.Args) > 1 && os.Args[1] == "healthcheck" { + os.Exit(healthcheck()) + } + c, err := loadConfig() + if err != nil { + log.Fatal(err) + } + if c.adminToken == "" { + log.Fatal("GARAGE_ADMIN_TOKEN est obligatoire") + } + if !c.authEnabled() { + log.Print("ATTENTION : UI_PASSWORD vide, aucune authentification (réservé à un reverse proxy qui authentifie)") + } + log.Printf("garage-ui %s sur %s, Garage : %s, CLI : %q", version, c.listen, c.adminURL.Host, c.cliBin) + srv := &http.Server{Addr: c.listen, Handler: c.routes(), ReadHeaderTimeout: 10 * time.Second, IdleTimeout: 2 * time.Minute} + log.Fatal(srv.ListenAndServe()) +} diff --git a/cmd/server/main_test.go b/cmd/server/main_test.go new file mode 100644 index 0000000..741213a --- /dev/null +++ b/cmd/server/main_test.go @@ -0,0 +1,144 @@ +package main + +import ( + "net/http" + "net/http/httptest" + "strings" + "testing" +) + +type roundTripFunc func(*http.Request) (*http.Response, error) + +func (f roundTripFunc) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) } + +// fakeGarage enregistre la dernière requête reçue et répond {"ok":true}, sans ouvrir de port. +func fakeGarage(t *testing.T) (roundTripFunc, *http.Request) { + t.Helper() + last := &http.Request{} + return func(r *http.Request) (*http.Response, error) { + *last = *r + rec := httptest.NewRecorder() + rec.Header().Set("Content-Type", "application/json") + _, _ = rec.WriteString(`{"ok":true}`) + return rec.Result(), nil + }, last +} + +func newTestConfig(t *testing.T, rt http.RoundTripper) *config { + t.Helper() + t.Setenv("GARAGE_ADMIN_URL", "http://garage.test:3903") + t.Setenv("GARAGE_ADMIN_TOKEN", "tok") + t.Setenv("UI_PASSWORD", "pw") + t.Setenv("GARAGE_BIN", "") + c, err := loadConfig() + if err != nil { + t.Fatal(err) + } + c.cliBin = "/bin/echo" + c.transport = rt + return c +} + +func login(t *testing.T, h http.Handler) *http.Cookie { + t.Helper() + req := httptest.NewRequest("POST", "/api/login", strings.NewReader(`{"user":"admin","password":"pw"}`)) + req.Header.Set(csrfHeader, "x") + rec := httptest.NewRecorder() + h.ServeHTTP(rec, req) + if rec.Code != 200 { + t.Fatalf("login: %d %s", rec.Code, rec.Body) + } + for _, ck := range rec.Result().Cookies() { + if ck.Name == cookieName { + return ck + } + } + t.Fatal("pas de cookie de session") + return nil +} + +func TestAuthRequiredAndBadLogin(t *testing.T) { + g, _ := fakeGarage(t) + h := newTestConfig(t, g).routes() + + rec := httptest.NewRecorder() + h.ServeHTTP(rec, httptest.NewRequest("GET", "/api/garage/v2/ListBuckets", nil)) + if rec.Code != 401 { + t.Fatalf("sans session : %d, attendu 401", rec.Code) + } + + req := httptest.NewRequest("POST", "/api/login", strings.NewReader(`{"user":"admin","password":"nope"}`)) + req.Header.Set(csrfHeader, "x") + rec = httptest.NewRecorder() + h.ServeHTTP(rec, req) + if rec.Code != 401 { + t.Fatalf("mauvais mot de passe : %d, attendu 401", rec.Code) + } +} + +func TestProxyInjectsTokenAndRestrictsPaths(t *testing.T) { + g, last := fakeGarage(t) + h := newTestConfig(t, g).routes() + ck := login(t, h) + + req := httptest.NewRequest("GET", "/api/garage/v2/ListBuckets?x=1", nil) + req.AddCookie(ck) + rec := httptest.NewRecorder() + h.ServeHTTP(rec, req) + if rec.Code != 200 || last.URL.Path != "/v2/ListBuckets" || last.URL.RawQuery != "x=1" { + t.Fatalf("proxy : %d, chemin %q", rec.Code, last.URL.String()) + } + if last.Header.Get("Authorization") != "Bearer tok" { + t.Fatalf("jeton non injecté : %q", last.Header.Get("Authorization")) + } + if last.Header.Get("Cookie") != "" { + t.Fatal("le cookie de session ne doit pas partir vers Garage") + } + + // Hors /v2/ (ex. /metrics) et traversée de chemin : refusés. + for _, p := range []string{"/api/garage/metrics", "/api/garage/v2/../metrics", "/api/garage/v1/status"} { + req = httptest.NewRequest("GET", p, nil) + req.AddCookie(ck) + rec = httptest.NewRecorder() + h.ServeHTTP(rec, req) + // 404, ou 307 vers le chemin nettoyé (le mux Go) : dans les deux cas rien n'est relayé. + if rec.Code != 404 && rec.Code != 307 { + t.Errorf("%s : %d, attendu 404 ou 307", p, rec.Code) + } + } +} + +func TestMutationNeedsCSRFHeader(t *testing.T) { + g, _ := fakeGarage(t) + h := newTestConfig(t, g).routes() + ck := login(t, h) + req := httptest.NewRequest("POST", "/api/garage/v2/DeleteBucket?id=x", strings.NewReader("{}")) + req.AddCookie(ck) + rec := httptest.NewRecorder() + h.ServeHTTP(rec, req) + if rec.Code != 403 { + t.Fatalf("sans en-tête anti-CSRF : %d, attendu 403", rec.Code) + } +} + +func TestCLIWhitelist(t *testing.T) { + g, _ := fakeGarage(t) + h := newTestConfig(t, g).routes() + ck := login(t, h) + call := func(body string) *httptest.ResponseRecorder { + req := httptest.NewRequest("POST", "/api/cli", strings.NewReader(body)) + req.Header.Set(csrfHeader, "x") + req.AddCookie(ck) + rec := httptest.NewRecorder() + h.ServeHTTP(rec, req) + return rec + } + if rec := call(`{"args":["status"]}`); rec.Code != 200 || !strings.Contains(rec.Body.String(), `"exitCode":0`) { + t.Fatalf("status : %d %s", rec.Code, rec.Body) + } + for _, b := range []string{`{"args":["server"]}`, `{"args":["offline-repair"]}`, `{"args":[]}`, `{"args":["status","a\u0000b"]}`} { + if rec := call(b); rec.Code == 200 { + t.Errorf("%s devrait être refusé", b) + } + } +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..372c92b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +# Garage UI : à lancer à côté de Garage (même hôte ou même réseau Docker). +services: + garage-ui: + build: . + image: garage-ui:local + restart: unless-stopped + ports: + - "${GARAGE_UI_PORT:-8088}:8080" + environment: + # API d'administration de Garage (port 3903). Sur le même réseau Docker : http://garage:3903 + GARAGE_ADMIN_URL: ${GARAGE_ADMIN_URL:-http://garage:3903} + GARAGE_ADMIN_TOKEN: ${GARAGE_ADMIN_TOKEN:?définir GARAGE_ADMIN_TOKEN dans .env} + # Authentification de l'interface (vide : aucune, à réserver à un reverse proxy qui authentifie). + UI_USER: ${UI_USER:-admin} + UI_PASSWORD: ${UI_PASSWORD:-} + PUBLIC_URL: ${PUBLIC_URL:-} + TITLE: ${TITLE:-Garage UI} + # Exemples de configuration client affichés sur la page d'une clé. + GARAGE_S3_ENDPOINT: ${GARAGE_S3_ENDPOINT:-} + GARAGE_S3_REGION: ${GARAGE_S3_REGION:-garage} + # Console CLI : le binaire garage est dans l'image ; il lui faut l'adresse RPC et le secret. + GARAGE_RPC_HOST: ${GARAGE_RPC_HOST:-garage:3901} + GARAGE_RPC_SECRET: ${GARAGE_RPC_SECRET:-} + read_only: true + cap_drop: [ALL] + security_opt: + - no-new-privileges:true diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..019114e --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,16 @@ + + + + + + + + + Garage UI + + + +
+ + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000..cb31c65 --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,3402 @@ +{ + "name": "upandown-frontend", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "upandown-frontend", + "version": "0.1.0", + "dependencies": { + "highlight.js": "^11.11.1", + "papaparse": "^5.5.3", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-markdown": "^10.1.0", + "remark-gfm": "^4.0.1" + }, + "devDependencies": { + "@types/papaparse": "^5.5.2", + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.0", + "@vitejs/plugin-react": "^5.0.0", + "typescript": "^5.8.0", + "vite": "^7.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.14.tgz", + "integrity": "sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.14", + "@babel/types": "^7.29.14", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.14.tgz", + "integrity": "sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.14" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz", + "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.14.tgz", + "integrity": "sha512-6E3Mi1r0B0umq6vmZa4/78q+64fqO2YY0THUdjDPKUCKhNb0yQy5NQIaPHCSD3ryTgiTss//P4JsWS80AsZ6LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.14" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz", + "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.14" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.14.tgz", + "integrity": "sha512-RAdQJrBgmIH1FWvN0X+1hoDxzMzlP4cv/1Zi4dn4tG1H0cTb+rw7CzUxQJhp1f4ANd8j5vH3fy8BAWFGkBDEsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.14", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.14", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.14", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz", + "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.14", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@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.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "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/@rolldown/pluginutils": { + "version": "1.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.3.tgz", + "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.7.tgz", + "integrity": "sha512-ZL7MgOeMUiBum1bjzzyBotE3DuHVz+UUxcDVlLL7gpdhDM4RpjG4bZOIly7ensIcXw9jhWl7HTIIQ9KsgjykGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.7.tgz", + "integrity": "sha512-cKZ2Hz/xt5DLY/vdUmMXEn3gnjLgwdeB/npHagbdTljLvBE6b/xKcPCcRWTiT0pHeVf8akl5Cb9K7ylRxbtHng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.7.tgz", + "integrity": "sha512-P9vs1uCC2drepKKuiXrhY+r7ry/jtDCrBS8SUCYm2Rr7rVTR9eFH6XVAmD9TdfYFlDgRe5r1eH8tLQVuz+l/VA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.7.tgz", + "integrity": "sha512-Lgu2AV7jbOTNNhkQ/OurNm7Snqu1Ux/3y7k8q47fbpPa3q63aIzKKp1xFzax5KH4pcdUzbnX/riuFsxKflsF+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.7.tgz", + "integrity": "sha512-wKo6rOzla+/3rN8QBqTgcrsQMfyqwa3y14TvCTotLLib/ACWTxX1zWDTYze90s2RWtYiSfTlavHLmZv0Jsafrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.7.tgz", + "integrity": "sha512-vAeCwbFyEu/vBt9O/uHCHJSvwtOpTSssnM/PoZgn8rmvAkS+9ixaUfJZ2IP3ltom+rvpuQQEIEqltPY7qhC9lQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.7.tgz", + "integrity": "sha512-HvjSxOKI+6Si4ytmaoCEpjwDMrH/1s0uWeTAhdE5oXY8/RMI92hCePI/psZuJtY5EHWoT7MfyvTz0HBDZb1ZwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.7.tgz", + "integrity": "sha512-nz/Eu1sag3w5gPiKLJhAbKa4D9hUUJpDc9XzKXxGNHZqwgT2AbuVS2e4k9CIoLQp5dPhSN9ntiEVuz2jTzu1Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.7.tgz", + "integrity": "sha512-05CEv2G/kI261A1WQBZL8gx6xXULjPfVnTKAkfnV/0uqHeLo+dNEOeUzMaiK/HDGR0Z1Nn7KJjm/34bNbNcfTA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.7.tgz", + "integrity": "sha512-wrqk3EkxQt98lTdiYhjcaWmFHwvKiSgHFi7XmPTSF4X8+uGUTBOAc0CaynEvpUhBgkPRbwASrYoU/5uJPF+LFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.7.tgz", + "integrity": "sha512-DnuEUWvzeSxHxzu5lvrN+I/UzrcQkR/fQ4Bibetdp73Rf7aP0XgFpalSDuHmVWsCLETE+Lrl3GVOqIvFP7rcjw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.7.tgz", + "integrity": "sha512-n0sr2s+rzVw8ntRucOxGhWeJ9lEl9KxCRzF3RmnZLE/tRnfKiloLuK8UqWrKFqVigEAh0IkRkPz5LVaV9/ZfvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.7.tgz", + "integrity": "sha512-qDVJyMCbh7ekjt1kM9CZsyCFZvv5UW1QTIx3YfJ/gh8LkqpoPNpl9dCeYeOa+bsDOGTWZiMG2riXuoFSRISimQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.7.tgz", + "integrity": "sha512-GiIOHHIzgpMoR5DT1pA1b9qMk5i0Ngg2FRj4D6XFSBC8e/axHuIdB7K/OBozO2RtCVAMnH1rXcuJrGScg+bvzA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.7.tgz", + "integrity": "sha512-B132V2fwDl7UGLhvK6s3Ay7eNQ4dmDSDgsBm/Wwbz+Wgnunz0le4R2wzDp6TL5ExMu3MC1auJIrVtk2gOyxbyw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.7.tgz", + "integrity": "sha512-3NueHQilbssjxgJMx9hXBV+U5keb3CBzmW5WhoBG3iSLFcmz9U2FVoG4MUYpZoZ+KSNMQPN2AA79dTxlEF0VxQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.7.tgz", + "integrity": "sha512-8XRwbf76oAF1zZzg6OT8EY3swvCptZnLmiqMgO5+STyhTZ9s7rXa+tY8jESZW9IDyKACcVBGqa/RACDaLzRVjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.7.tgz", + "integrity": "sha512-pvqqfjNdxVLvmovH681K5cPIL9DXj5n1RROaa0vb9JrtHddiScLrkHPRKj5flTKHF1M7xvRy0SS2yTRIc2TO0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.7.tgz", + "integrity": "sha512-rsTjTf5HAm6F4sI6uUfJf2pc+7AWBKxgc2RveGvwB2OvVa1GezSSCDD1rtXPuFhcg3itPv7iHgcZsq/RwWvJ4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.7.tgz", + "integrity": "sha512-VNLvsYMD5+zLCi5SohwDdL8PpicC9PnArLwyMJXXUcAduzrM3k9aZT9XiHw+mn5dOWr3UEyfyqJbOvxwJ2fCWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.7.tgz", + "integrity": "sha512-7aOjdahkwiECWWOmjAemPd21yeQ18TW59DUiLWttzolMe5tDwHyBhlOfmxRUHOQnepTNkZ2Qwp1T6LxFZ5v7yQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.7.tgz", + "integrity": "sha512-BnNkTwE4FMCAoz3UYiJ6D6Y3pGozYIYZ2W+onH64uhiTI2iwD3KOaNSlkuHYfupZVemls3YTlvbPnuKwHsraiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.7.tgz", + "integrity": "sha512-OH8tGWsJcRW6Vn0dmndyWJGdQa46bH2/2/PVfleBGUWuBd5/HVkIvw2UslgBwUZdtV78bJaoCNBmYI5+bcTJ4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.7.tgz", + "integrity": "sha512-SpYx5X9+2JOF3hXe1cRaiFn562h4AMJhfgxkyHyiuh9dJ7PanPm7FTp8GJReSbS9N+TfjRiBbKacVk1g35kKxg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.7.tgz", + "integrity": "sha512-0ncKtQ55fqElV9Sk4cZ/4tiXVGlWxaH5PvDOlx1Sx8GuHIpSWgYrTcyrO51JnVFfy7LvAJiffkEg63ZHKwTMag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.7.tgz", + "integrity": "sha512-XY9DYHO5UxxVR8G6AErXDlccQmDpvGTLgKHFpvkgsyjwG/PrQuInRjQQfpEzBRuT+bhBtwfS8yDe9sPhVcq/9A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/debug": { + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "license": "MIT" + }, + "node_modules/@types/estree-jsx": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", + "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@types/hast": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/papaparse": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@types/papaparse/-/papaparse-5.5.2.tgz", + "integrity": "sha512-gFnFp/JMzLHCwRf7tQHrNnfhN4eYBVYYI897CGX4MY1tzY9l2aLkVyx2IlKZ/SAqDbB3I1AOZW5gTMGGsqWliA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", + "license": "ISC" + }, + "node_modules/@vitejs/plugin-react": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.2.0.tgz", + "integrity": "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.29.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-rc.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.18.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/bail": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", + "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.38", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.38.tgz", + "integrity": "sha512-rMgy5YW7x28SMfXHLlVZDBqlWzYZ0x2rVR/6FWrNBF0chjigARK1H6nM0hKA1Um3kPOlkQFVtjJs00d2N1ezuw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.6.tgz", + "integrity": "sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==", + "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.11.37", + "caniuse-lite": "^1.0.30001826", + "electron-to-chromium": "^1.5.486", + "node-releases": "^2.0.64", + "update-browserslist-db": "^1.4.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001826", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001826.tgz", + "integrity": "sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA==", + "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/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decode-named-character-reference": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.491", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.491.tgz", + "integrity": "sha512-zMOQrvaTekJMwENqx1Rnyl3qieqGxIui5CRu9g6ktKzQ/T54fq0Qfr3V/SEhGrkStWI3eYMSzMN4rbyFwfQSzA==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/estree-util-is-identifier-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", + "integrity": "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/hast-util-to-jsx-runtime": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.7.tgz", + "integrity": "sha512-F7DNV2NMcTxA4GqPVHnXzX+mpoPHAIY9rJAVH3CZ1FdBZOcBUEjUuvMkMpHVs/sicEtznh9tMGj5WUR9S4E2rg==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "estree-util-is-identifier-name": "^3.0.0", + "hast-util-whitespace": "^3.0.0", + "mdast-util-mdx-expression": "^2.0.0", + "mdast-util-mdx-jsx": "^3.0.0", + "mdast-util-mdxjs-esm": "^2.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0", + "style-to-object": "^2.0.0", + "unist-util-position": "^5.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/highlight.js": { + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/html-url-attributes": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", + "integrity": "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/inline-style-parser": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.9.tgz", + "integrity": "sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg==", + "license": "MIT" + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/longest-streak": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", + "integrity": "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/markdown-table": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.1.0.tgz", + "integrity": "sha512-xpeSCdM+B+6P3ncfgaB7FoDbtJ30xAe6Z18TGT7AgXJsHqCElCICZovQqdRMm7kHgpTyYv36EupqewoFFSB8vw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-find-and-replace": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-3.0.5.tgz", + "integrity": "sha512-of3wZLEBWpK8mSYy8wmKnwyxfUKjhCkXxGLz45DVBqfcahTP37LscCK+0oAZh+ReZ5OunPDkB2zdGMIxrojLhw==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "escape-string-regexp": "^5.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.1.0.tgz", + "integrity": "sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark": "^4.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", + "integrity": "sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==", + "license": "MIT", + "dependencies": { + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-gfm-autolink-literal": "^2.0.0", + "mdast-util-gfm-footnote": "^2.0.0", + "mdast-util-gfm-strikethrough": "^2.0.0", + "mdast-util-gfm-table": "^2.0.0", + "mdast-util-gfm-task-list-item": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-autolink-literal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-2.1.1.tgz", + "integrity": "sha512-Na+L0K3V0k9O0z09UDDdZ5qE6wcjCFNlz5JG7FDTLgmdQYvgG/xMsEsXt+K0B4oYvMRlYpIRRPV+ftm9FGsZEQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "ccount": "^2.0.0", + "devlop": "^1.0.0", + "mdast-util-find-and-replace": "^3.0.0", + "micromark-util-character": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-strikethrough": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-2.0.1.tgz", + "integrity": "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-table": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-table/-/mdast-util-gfm-table-2.0.1.tgz", + "integrity": "sha512-fiIjPrAy4kz68/eFbPHhsiWDGHhqUSVoU1XsfLM5DsEPXw7MxgiVVyulUggFRckVWeT1KXQXkg5vm3kv4oMSOA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "markdown-table": "^3.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "mdast-util-to-string": "^4.0.0", + "unist-util-visit": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-gfm-task-list-item": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-2.0.1.tgz", + "integrity": "sha512-jXVO1hvB2hs82g1esi7I9nIJDqiijbQLIyH2jDUb5s7jIAZMr/79h0VHSq7XHKTqpLARRm+DDNjduB7S9+6XZA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-expression": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdx-jsx": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-3.2.2.tgz", + "integrity": "sha512-/0FHaZMv2fSjIL3z/NYmXnQTSdzYyamPpI1BXpSCngTUqpSvMNIlERa26ABz+Z6UFQbrh3I5Yhzp448WZsPfMA==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "devlop": "^1.1.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "parse-entities": "^4.0.0", + "stringify-entities": "^4.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-mdxjs-esm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-2.0.1.tgz", + "integrity": "sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-phrasing": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-phrasing/-/mdast-util-phrasing-4.1.0.tgz", + "integrity": "sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.2.tgz", + "integrity": "sha512-l2pnmOuqs+SGLVpTVXnRLQu5v1AzvDe181404fbXzzqObVxrAnnVxapAP27pUwzLBL/ABIkgUhGlPVU7QSvIFg==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-2.2.4.tgz", + "integrity": "sha512-aCsogoZ2Oz1EItAlC12A+/uGuzp+CWlDU0xZ3o5jbJaepLsOu2tlxpvHslnX5dRhspD1gxNVkBtYG0yMiIpXoQ==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "@types/unist": "^3.0.0", + "longest-streak": "^3.0.0", + "mdast-util-phrasing": "^4.0.0", + "mdast-util-to-string": "^4.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-decode-string": "^2.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "unist-util-visit": "^5.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-4.0.0.tgz", + "integrity": "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.3.tgz", + "integrity": "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0", + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-edit-map": "^1.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-core-commonmark": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.4.tgz", + "integrity": "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "devlop": "^1.0.0", + "micromark-factory-destination": "^2.0.0", + "micromark-factory-label": "^2.0.0", + "micromark-factory-space": "^2.1.0", + "micromark-factory-title": "^2.0.0", + "micromark-factory-whitespace": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-edit-map": "^1.0.0", + "micromark-util-html-tag-name": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-subtokenize": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.3" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", + "integrity": "sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==", + "license": "MIT", + "dependencies": { + "micromark-extension-gfm-autolink-literal": "^2.0.0", + "micromark-extension-gfm-footnote": "^2.0.0", + "micromark-extension-gfm-strikethrough": "^2.0.0", + "micromark-extension-gfm-table": "^2.0.0", + "micromark-extension-gfm-tagfilter": "^2.0.0", + "micromark-extension-gfm-task-list-item": "^2.0.0", + "micromark-util-combine-extensions": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-2.1.0.tgz", + "integrity": "sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==", + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-footnote": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-2.1.0.tgz", + "integrity": "sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-core-commonmark": "^2.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-normalize-identifier": "^2.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-2.1.0.tgz", + "integrity": "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-classify-character": "^2.0.0", + "micromark-util-resolve-all": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz", + "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-2.0.0.tgz", + "integrity": "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==", + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-2.1.0.tgz", + "integrity": "sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==", + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/micromark-factory-destination": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz", + "integrity": "sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-label": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-2.0.1.tgz", + "integrity": "sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-space": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-2.1.0.tgz", + "integrity": "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-title": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-2.0.1.tgz", + "integrity": "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-factory-whitespace": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-2.0.1.tgz", + "integrity": "sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-factory-space": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-character": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", + "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-chunked": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-2.0.1.tgz", + "integrity": "sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-classify-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-2.0.1.tgz", + "integrity": "sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-combine-extensions": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-2.0.1.tgz", + "integrity": "sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-chunked": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-numeric-character-reference": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-2.0.2.tgz", + "integrity": "sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-decode-string": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-2.0.1.tgz", + "integrity": "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "decode-named-character-reference": "^1.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-edit-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-edit-map/-/micromark-util-edit-map-1.0.0.tgz", + "integrity": "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", + "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-html-tag-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-2.0.1.tgz", + "integrity": "sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-normalize-identifier": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-2.0.1.tgz", + "integrity": "sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-resolve-all": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-2.0.1.tgz", + "integrity": "sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", + "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-subtokenize": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-2.1.0.tgz", + "integrity": "sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "devlop": "^1.0.0", + "micromark-util-chunked": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", + "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/micromark-util-types": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz", + "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==", + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "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.65", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.65.tgz", + "integrity": "sha512-PfvofsGQ+MiOQIPkX9fU8ELUWmy5zL74CdQaph/ismKszfFkfwXaw0cGiwbwym2hT9k5+mdyl8O5WQ1MD8EHmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/papaparse": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.3.tgz", + "integrity": "sha512-5QvjGxYVjxO59MGU2lHVYpRWBBtKHnlIAcSe1uNFCkkptUh63NFRj0FJQm7nR67puEruUci/ZkjmEFrjCAyP4A==", + "license": "MIT" + }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, + "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.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "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.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/property-information": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", + "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.1" + } + }, + "node_modules/react-markdown": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-10.1.0.tgz", + "integrity": "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "hast-util-to-jsx-runtime": "^2.0.0", + "html-url-attributes": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "remark-parse": "^11.0.0", + "remark-rehype": "^11.0.0", + "unified": "^11.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + }, + "peerDependencies": { + "@types/react": ">=18", + "react": ">=18" + } + }, + "node_modules/react-refresh": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", + "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remark-gfm": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", + "integrity": "sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-gfm": "^3.0.0", + "micromark-extension-gfm": "^3.0.0", + "remark-parse": "^11.0.0", + "remark-stringify": "^11.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz", + "integrity": "sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-from-markdown": "^2.0.0", + "micromark-util-types": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-rehype": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-11.1.2.tgz", + "integrity": "sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "mdast-util-to-hast": "^13.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-11.0.0.tgz", + "integrity": "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==", + "license": "MIT", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-to-markdown": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/rollup": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.7.tgz", + "integrity": "sha512-CxhzUIc+ocxPAWxHuff+PAluoW1otD6dHqqPK2h2Q38WA1VYk+3gizX6NEg5t2a8yNGQaiHM1R7V+qdwWuvp5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.7", + "@rollup/rollup-android-arm64": "4.68.7", + "@rollup/rollup-android-x64": "4.68.7", + "@rollup/rollup-darwin-arm64": "4.68.7", + "@rollup/rollup-darwin-x64": "4.68.7", + "@rollup/rollup-freebsd-arm64": "4.68.7", + "@rollup/rollup-freebsd-x64": "4.68.7", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.7", + "@rollup/rollup-linux-arm-musleabihf": "4.68.7", + "@rollup/rollup-linux-arm64-gnu": "4.68.7", + "@rollup/rollup-linux-arm64-musl": "4.68.7", + "@rollup/rollup-linux-loong64-gnu": "4.68.7", + "@rollup/rollup-linux-loong64-musl": "4.68.7", + "@rollup/rollup-linux-ppc64-gnu": "4.68.7", + "@rollup/rollup-linux-ppc64-musl": "4.68.7", + "@rollup/rollup-linux-riscv64-gnu": "4.68.7", + "@rollup/rollup-linux-riscv64-musl": "4.68.7", + "@rollup/rollup-linux-s390x-gnu": "4.68.7", + "@rollup/rollup-linux-x64-gnu": "4.68.7", + "@rollup/rollup-linux-x64-musl": "4.68.7", + "@rollup/rollup-openbsd-x64": "4.68.7", + "@rollup/rollup-openharmony-arm64": "4.68.7", + "@rollup/rollup-win32-arm64-msvc": "4.68.7", + "@rollup/rollup-win32-ia32-msvc": "4.68.7", + "@rollup/rollup-win32-x64-gnu": "4.68.7", + "@rollup/rollup-win32-x64-msvc": "4.68.7", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.3.tgz", + "integrity": "sha512-xj+WrAkyv5Qp+t7r9N5HvCBu7g1qOe6CKRNpq22X1GGcPEQADFU54v5qsPVs3/vrUFQ7XivFrcAVKA2stI0kWA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/style-to-object": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-2.0.2.tgz", + "integrity": "sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA==", + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.9" + } + }, + "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/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/unified": { + "version": "11.0.5", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", + "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "bail": "^2.0.0", + "devlop": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^4.0.0", + "trough": "^2.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", + "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.2.0.tgz", + "integrity": "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.1.0.tgz", + "integrity": "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.4.0.tgz", + "integrity": "sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==", + "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/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.4.tgz", + "integrity": "sha512-66ycRswIkNmHH9PHku7ADtv5RVwgIrOcuv3J8Svz6h4qgGRrKVa+9/neuKyJZUXyOpYwLTvS+whZ4R2urHHgQg==", + "license": "MIT", + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vite": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.8.tgz", + "integrity": "sha512-3tTi78MAKhVk9h+YZVXMQ8POmneJuE97QUPAWtJghHzhH7BAyiqQOC2KZh1DWOsu/USB2cRXhznPByaabvYXfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "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", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.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 + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..1ba406f --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,22 @@ +{ + "name": "garage-ui-frontend", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc --noEmit && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^19.1.0", + "react-dom": "^19.1.0" + }, + "devDependencies": { + "@types/react": "^19.1.0", + "@types/react-dom": "^19.1.0", + "@vitejs/plugin-react": "^5.0.0", + "typescript": "^5.8.0", + "vite": "^7.0.0" + } +} diff --git a/frontend/public/theme.js b/frontend/public/theme.js new file mode 100644 index 0000000..4786987 --- /dev/null +++ b/frontend/public/theme.js @@ -0,0 +1,6 @@ +// Thème appliqué avant le premier rendu (évite un flash clair). Fichier externe : la CSP interdit les scripts inline. +try { + var t = localStorage.getItem("udTheme"); + if (t === "dark" || t === "light") document.documentElement.dataset.theme = t; + else if (matchMedia("(prefers-color-scheme: dark)").matches) document.documentElement.dataset.theme = "dark"; +} catch (e) {} diff --git a/frontend/src/ActionMenu.tsx b/frontend/src/ActionMenu.tsx new file mode 100644 index 0000000..d0f0662 --- /dev/null +++ b/frontend/src/ActionMenu.tsx @@ -0,0 +1,92 @@ +import { useEffect, useLayoutEffect, useRef, useState } from "react"; +import type { ReactNode } from "react"; +import { createPortal } from "react-dom"; + +interface Props { + /** Bouton « … » qui a ouvert le menu : le menu s'aligne sur lui. */ + anchor: HTMLElement; + onClose: () => void; + children: ReactNode; +} + +const MARGIN = 8; // écart minimal avec les bords de la fenêtre + +/** + * Menu déroulant des actions d'un élément, ouvert sous le bouton « … » et aligné + * sur son bord droit (au-dessus s'il manque de place en bas). Rendu dans + * pour ne pas être rogné par le défilement de la liste ; refermé par un clic + * ailleurs, Échap, un défilement, un redimensionnement ou le choix d'une action. + */ +export function ActionMenu({ anchor, onClose, children }: Props) { + const ref = useRef(null); + const [pos, setPos] = useState<{ top: number; left: number } | null>(null); + + useLayoutEffect(() => { + const menu = ref.current; + if (!menu) return; + const a = anchor.getBoundingClientRect(); + const { offsetWidth: w, offsetHeight: h } = menu; + let top = a.bottom + 4; + if (top + h > innerHeight - MARGIN) top = Math.max(MARGIN, a.top - 4 - h); + const left = Math.min(Math.max(MARGIN, a.right - w), innerWidth - w - MARGIN); + setPos({ top, left }); + }, [anchor]); + + // Focus sur la première action une fois le menu placé (masqué, il ne le prend pas). + useEffect(() => { + if (pos) ref.current?.querySelector("button, a")?.focus({ preventScroll: true }); + }, [pos]); + + useEffect(() => { + const inside = (t: EventTarget | null) => t instanceof Node && (ref.current?.contains(t) || anchor.contains(t)); + const onDown = (ev: PointerEvent) => { + if (!inside(ev.target)) onClose(); + }; + const onKey = (ev: KeyboardEvent) => { + if (ev.key === "Escape") { + // Ni désélection, ni fermeture du panneau flottant : seulement le menu. + ev.preventDefault(); + ev.stopPropagation(); + onClose(); + anchor.focus(); + } else if (ev.key === "ArrowDown" || ev.key === "ArrowUp") { + const items = [...(ref.current?.querySelectorAll("button, a") ?? [])]; + if (!items.length) return; + ev.preventDefault(); + const i = items.indexOf(document.activeElement as HTMLElement); + const next = ev.key === "ArrowDown" ? (i + 1) % items.length : (i - 1 + items.length) % items.length; + items[next].focus(); + } + }; + const onScroll = (ev: Event) => { + if (!(ev.target instanceof Node && ref.current?.contains(ev.target))) onClose(); + }; + document.addEventListener("pointerdown", onDown, true); + document.addEventListener("keydown", onKey, true); + document.addEventListener("scroll", onScroll, true); + window.addEventListener("resize", onClose); + return () => { + document.removeEventListener("pointerdown", onDown, true); + document.removeEventListener("keydown", onKey, true); + document.removeEventListener("scroll", onScroll, true); + window.removeEventListener("resize", onClose); + }; + }, [anchor, onClose]); + + return createPortal( +
{ + if ((ev.target as HTMLElement).closest("button, a")) setTimeout(onClose); + }} + > + {children} +
, + document.body, + ); +} diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx new file mode 100644 index 0000000..a14000a --- /dev/null +++ b/frontend/src/App.tsx @@ -0,0 +1,170 @@ +import { Component, useCallback, useEffect, useState, type ReactNode } from "react"; +import { appApi, errMsg, type Config } from "./api"; +import { BucketPage, Buckets } from "./Buckets"; +import { Cluster } from "./Cluster"; +import { Console } from "./Console"; +import { ClusterIcon, BucketIcon, ConsoleIcon, MaintenanceIcon, OverviewIcon } from "./gicons"; +import { KeyIcon, LogoutIcon, MenuIcon, MoonIcon, SunIcon } from "./icons"; +import { KeyPage, Keys } from "./Keys"; +import { Login } from "./Login"; +import { Maintenance } from "./Maintenance"; +import { Overview } from "./Overview"; +import { ToastProvider } from "./ui"; + +/** Une erreur d'affichage dans une page ne doit pas blanchir toute l'application. */ +class Boundary extends Component<{ children: ReactNode }, { error: Error | null }> { + state = { error: null as Error | null }; + static getDerivedStateFromError(error: Error) { + return { error }; + } + render() { + return this.state.error ? ( +
+

+ Erreur d'affichage : {this.state.error.message} +

+
+ ) : ( + this.props.children + ); + } +} + +type Theme = "light" | "dark"; +const initialTheme = (): Theme => (document.documentElement.dataset.theme === "dark" ? "dark" : "light"); + +/** Route issue de l'adresse (#/buckets/) : liens directs et bouton « précédent ». */ +const useRoute = () => { + const get = () => location.hash.replace(/^#\/?/, "").split("/").map(decodeURIComponent); + const [route, setRoute] = useState(get); + useEffect(() => { + const on = () => setRoute(get()); + window.addEventListener("hashchange", on); + return () => window.removeEventListener("hashchange", on); + }, []); + return route; +}; + +export default function App() { + const [cfg, setCfg] = useState(null); + const [error, setError] = useState(""); + const load = useCallback(() => appApi.config().then((c) => (setCfg(c), setError("")), (e) => setError(errMsg(e))), []); + useEffect(() => { + load(); + }, [load]); + + if (error) + return ( +
+
+

{error}

+ +
+
+ ); + if (!cfg) return
Chargement…
; + if (cfg.auth && !cfg.user) return ; + return ( + + + + ); +} + +const NAV = [ + ["", "Vue d'ensemble", OverviewIcon], + ["buckets", "Buckets", BucketIcon], + ["keys", "Clés d'accès", KeyIcon], + ["cluster", "Cluster", ClusterIcon], + ["maintenance", "Maintenance", MaintenanceIcon], + ["console", "Console", ConsoleIcon], +] as const; + +function Shell({ cfg, reload }: { cfg: Config; reload: () => void }) { + const [theme, setTheme] = useState(initialTheme); + const [drawer, setDrawer] = useState(false); + const [section, id] = useRoute(); + + useEffect(() => { + document.documentElement.dataset.theme = theme; + document.title = cfg.title; + try { + localStorage.setItem("udTheme", theme); + } catch { + /* stockage indisponible */ + } + }, [theme, cfg.title]); + useEffect(() => { + setDrawer(false); + }, [section, id]); + + const page = (() => { + switch (section) { + case "buckets": + return id ? : ; + case "keys": + return id ? : ; + case "cluster": + return ; + case "maintenance": + return ; + case "console": + return ; + default: + return ; + } + })(); + + return ( +
+
+ + + + {cfg.title} + +
+ + {cfg.auth && ( + + )} +
+
+
+ {drawer &&
setDrawer(false)} />} + +
+ {page} +
+
+
+ ); +} diff --git a/frontend/src/Buckets.tsx b/frontend/src/Buckets.tsx new file mode 100644 index 0000000..daa5b6e --- /dev/null +++ b/frontend/src/Buckets.tsx @@ -0,0 +1,385 @@ +import { useState } from "react"; +import { garage, bucketName, type BucketInfo, type BucketListItem, type KeyListItem, type Perm } from "./api"; +import { GIB, fmtDate, fmtNum, fmtSize } from "./format"; +import { BucketIcon, GlobeIcon } from "./gicons"; +import { CloseIcon, PlusIcon, RefreshIcon, TrashIcon } from "./icons"; +import { Confirm, CopyButton, Loading, Modal, Mono, PageHead, Status, UsageBar, useAct, useLoad } from "./ui"; + +// --- Liste ------------------------------------------------------------------------- + +export function Buckets() { + const act = useAct(); + const [filter, setFilter] = useState(""); + const [creating, setCreating] = useState(false); + const { data, error, loading, reload } = useLoad(async () => { + const list = await garage.get("ListBuckets"); + const infos = await Promise.all(list.map((b) => garage.get("GetBucketInfo", { id: b.id }).catch(() => null))); + return list.map((b, i) => ({ b, info: infos[i] })); + }); + const rows = (data ?? []).filter(({ b }) => bucketName(b).toLowerCase().includes(filter.toLowerCase())); + + return ( +
+ + setFilter(e.target.value)} aria-label="Filtrer les buckets" /> + + + + + {data && ( +
+ + + + + + + + + + + + + {rows.map(({ b, info }) => ( + (location.hash = `#/buckets/${b.id}`)}> + + + + + + + + ))} + {rows.length === 0 && ( + + + + )} + +
NomObjetsTailleQuotaClésCréé
+ e.stopPropagation()}> + {bucketName(b)} + + {info?.websiteAccess && ( + + web + + )} + {b.globalAliases.length > 1 && +{b.globalAliases.length - 1} alias} + {fmtNum(info?.objects)}{fmtSize(info?.bytes)} + {info?.quotas?.maxSize ? ( + <> + + {fmtSize(info.quotas.maxSize)} + + ) : ( + - + )} + {info?.keys.length ?? "-"}{fmtDate(b.created)}
+ Aucun bucket. +
+
+ )} + {creating && ( + setCreating(false)} + onCreate={async (alias) => { + const created = await act(() => garage.post("CreateBucket", undefined, { globalAlias: alias }), `Bucket « ${alias} » créé`); + if (created) { + setCreating(false); + reload(); + } + }} + /> + )} +
+ ); +} + +function CreateBucket({ onClose, onCreate }: { onClose: () => void; onCreate: (alias: string) => Promise }) { + const [alias, setAlias] = useState(""); + const valid = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(alias); + return ( + +
{ + e.preventDefault(); + if (valid) onCreate(alias); + }} + > + +

3 à 63 caractères : minuscules, chiffres, points et tirets.

+
+ + + +
+
+
+ ); +} + +// --- Détail ------------------------------------------------------------------------ + +export function BucketPage({ id }: { id: string }) { + const act = useAct(); + const { data: b, error, loading, reload } = useLoad(() => garage.get("GetBucketInfo", { id }), [id]); + const keys = useLoad(() => garage.get("ListKeys"), []); + const [confirmDelete, setConfirmDelete] = useState(false); + const [alias, setAlias] = useState(""); + const [addKey, setAddKey] = useState(""); + + if (!b) return
; + + const name = bucketName(b); + const run = (fn: () => Promise, ok?: string) => act(fn, ok).then((r) => r && reload()); + const setPerm = (accessKeyId: string, key: keyof Perm, value: boolean) => + run(() => garage.post(value ? "AllowBucketKey" : "DenyBucketKey", undefined, { bucketId: b.id, accessKeyId, permissions: { [key]: true } })); + const available = (keys.data ?? []).filter((k) => !b.keys.some((bk) => bk.accessKeyId === k.id)); + + return ( +
+ + + + +
+
+ Objets + {fmtNum(b.objects)} +
+
+ Taille + {fmtSize(b.bytes)} +
+
+ Envois inachevés + {fmtNum(b.unfinishedMultipartUploads)} + {fmtSize(b.unfinishedMultipartUploadBytes)} +
+
+ Identifiant + + + + + créé le {fmtDate(b.created)} +
+
+ +
+

Alias

+
+ {b.globalAliases.map((a) => ( + + {a} + + + ))} + {b.localAliases.map((a) => ( + + {a.alias} ({a.accessKeyId.slice(0, 8)}…) + + ))} +
+
{ + e.preventDefault(); + if (alias) run(() => garage.post("AddBucketAlias", undefined, { bucketId: b.id, globalAlias: alias }), "Alias ajouté").then(() => setAlias("")); + }} + > + setAlias(e.target.value.trim())} placeholder="Nouvel alias global" aria-label="Nouvel alias global" /> + +
+
+ +
+

Clés autorisées

+
+ + + + + + + + + + + {b.keys.map((k) => ( + + + {(["read", "write", "owner"] as const).map((p) => ( + + ))} + + ))} + {b.keys.length === 0 && ( + + + + )} + +
CléLectureÉcriturePropriétaire
+ {k.name || "(sans nom)"} + + setPerm(k.accessKeyId, p, e.target.checked)} aria-label={`${p} pour ${k.name}`} /> +
+ Aucune clé n'a accès à ce bucket. +
+
+ {available.length > 0 && ( +
+ + +
+ )} +
+ +
+ run(() => garage.post("UpdateBucket", { id: b.id }, { quotas: q }), "Quotas enregistrés")} /> + run(() => garage.post("UpdateBucket", { id: b.id }, { websiteAccess: w }), "Site web enregistré")} + /> +
+ +
+

Maintenance

+

+ Les envois multipart abandonnés occupent de la place sans apparaître comme objets. Supprime ceux de plus de 24 heures. +

+ +
+ + {confirmDelete && ( + + Le bucket {name} sera supprimé définitivement. Garage refuse de supprimer un bucket qui contient encore des objets. +

+ } + confirmLabel="Supprimer" + requireText={name} + onClose={() => setConfirmDelete(false)} + onConfirm={async () => { + if (await act(() => garage.post("DeleteBucket", { id: b.id }), "Bucket supprimé")) location.hash = "#/buckets"; + else setConfirmDelete(false); + }} + /> + )} +
+ ); +} + +function QuotaForm({ b, onSave }: { b: BucketInfo; onSave: (q: { maxSize: number | null; maxObjects: number | null }) => void }) { + const [size, setSize] = useState(b.quotas?.maxSize ? String(+(b.quotas.maxSize / GIB).toFixed(2)) : ""); + const [objs, setObjs] = useState(b.quotas?.maxObjects ? String(b.quotas.maxObjects) : ""); + return ( +
+

Quotas

+ {b.quotas?.maxSize ? : null} +
{ + e.preventDefault(); + onSave({ maxSize: size ? Math.round(parseFloat(size) * GIB) : null, maxObjects: objs ? parseInt(objs, 10) : null }); + }} + > +
+ + +
+
+ +
+
+
+ ); +} + +function WebsiteForm({ b, onSave }: { b: BucketInfo; onSave: (w: { enabled: boolean; indexDocument?: string; errorDocument?: string | null }) => void }) { + const [on, setOn] = useState(b.websiteAccess); + const [index, setIndex] = useState(b.websiteConfig?.indexDocument ?? "index.html"); + const [err, setErr] = useState(b.websiteConfig?.errorDocument ?? ""); + return ( +
+

+ Site web statique {b.websiteAccess ? "activé" : "désactivé"} +

+
{ + e.preventDefault(); + onSave(on ? { enabled: true, indexDocument: index || "index.html", errorDocument: err || null } : { enabled: false }); + }} + > + + {on && ( +
+ + +
+ )} +
+ +
+
+
+ ); +} diff --git a/frontend/src/Cluster.tsx b/frontend/src/Cluster.tsx new file mode 100644 index 0000000..d8da3fd --- /dev/null +++ b/frontend/src/Cluster.tsx @@ -0,0 +1,284 @@ +import { useState } from "react"; +import { garage, type ClusterLayout, type ClusterStatus, type NodeInfo } from "./api"; +import { fmtAgo, fmtSize } from "./format"; +import { EditIcon, PlusIcon, RefreshIcon, TrashIcon } from "./icons"; +import { Confirm, Loading, Modal, Mono, PageHead, Status, UsageBar, useAct, useLoad } from "./ui"; + +const GB = 1e9; // Garage raisonne en octets ; on saisit des Go décimaux, comme dans la doc + +export function Cluster() { + const act = useAct(); + const { data, error, loading, reload } = useLoad(async () => { + const [status, layout] = await Promise.all([garage.get("GetClusterStatus"), garage.get("GetClusterLayout")]); + return { status, layout }; + }); + const [edit, setEdit] = useState(null); + const [connect, setConnect] = useState(false); + const [preview, setPreview] = useState(null); + const [confirmRevert, setConfirmRevert] = useState(false); + const [removing, setRemoving] = useState(null); + + const run = (fn: () => Promise, ok?: string) => act(fn, ok).then((r) => r && reload()); + const staged = data?.layout.stagedRoleChanges ?? []; + const stagedOf = (id: string) => staged.find((s) => s.id === id); + + const showPreview = async () => { + const r = await garage.post<{ error?: string; message?: string[] }>("PreviewClusterLayoutChanges"); + if (r.error) throw new Error(r.error); + setPreview(r.message ?? ["Aucun détail."]); + }; + + return ( +
+ + + + + + + {data && ( + <> + {staged.length > 0 && ( +
+ {staged.length} changement(s) de layout en attente. Ils ne sont appliqués qu'après validation : Garage redistribue alors les données entre les nœuds. +
+ + + +
+
+ )} + +
+ + + + + + + + + + + + + {data.status.nodes.map((n) => { + const s = stagedOf(n.id); + const used = n.dataPartition ? n.dataPartition.total - n.dataPartition.available : 0; + return ( + + + + + + + + + + ); + })} + +
NœudÉtatZoneCapacitéDonnéesVersion +
+ {n.hostname || "(sans nom)"} +
+ {n.addr} +
+
+ {n.isUp ? "en ligne" : "hors ligne"} + {!n.isUp && {fmtAgo(n.lastSeenSecsAgo)}} + {n.draining && vidange} + + {n.role ? n.role.zone : sans rôle} + {n.role?.tags?.length ? [{n.role.tags.join(", ")}] : null} + {s && {s.remove ? "retrait prévu" : "modifié"}} + {n.role ? (n.role.capacity != null ? fmtSize(n.role.capacity) : "passerelle") : "-"} + {n.dataPartition ? ( + <> + + + {fmtSize(used)} / {fmtSize(n.dataPartition.total)} + + + ) : ( + - + )} + {n.garageVersion ?? "-"} + + {n.role && ( + + )} +
+
+

+ Version du layout : {data.layout.version} + {data.layout.partitionSize ? ` · partitions de ${fmtSize(data.layout.partitionSize)}` : ""} +

+ + )} + + {edit && ( + setEdit(null)} + onSave={async (role) => { + if (await act(() => garage.post("UpdateClusterLayout", undefined, { roles: [{ id: edit.id, ...role }] }), "Changement mis en attente")) { + setEdit(null); + reload(); + } + }} + /> + )} + {connect && setConnect(false)} onDone={() => (setConnect(false), reload())} />} + {preview && ( + setPreview(null)}> +
{preview.join("\n")}
+
+ + +
+
+ )} + {confirmRevert && ( + Les changements de layout en attente seront abandonnés.

} + confirmLabel="Annuler les changements" + onClose={() => setConfirmRevert(false)} + onConfirm={async () => { + setConfirmRevert(false); + await run(() => garage.post("RevertClusterLayout"), "Changements abandonnés"); + }} + /> + )} + {removing && ( + + {removing.hostname || removing.id.slice(0, 12)} n'aura plus de rôle de stockage. Le changement est mis en attente : il faudra l'appliquer, et Garage redistribuera alors ses données sur les autres nœuds. +

+ } + confirmLabel="Mettre en attente" + onClose={() => setRemoving(null)} + onConfirm={async () => { + const id = removing.id; + setRemoving(null); + await run(() => garage.post("UpdateClusterLayout", undefined, { roles: [{ id, remove: true }] }), "Retrait mis en attente"); + }} + /> + )} +
+ ); +} + +function RoleForm({ + node, + staged, + onClose, + onSave, +}: { + node: NodeInfo; + staged?: { zone?: string; capacity?: number | null; tags?: string[]; remove?: boolean }; + onClose: () => void; + onSave: (r: { zone: string; capacity: number | null; tags: string[] }) => Promise; +}) { + const cur = staged && !staged.remove ? staged : node.role; + const [zone, setZone] = useState(cur?.zone ?? "dc1"); + const [gateway, setGateway] = useState(cur ? cur.capacity == null : false); + const [cap, setCap] = useState(cur?.capacity ? String(cur.capacity / GB) : ""); + const [tags, setTags] = useState((cur?.tags ?? []).join(", ")); + const valid = zone.trim() !== "" && (gateway || parseFloat(cap) > 0); + return ( + +
{ + e.preventDefault(); + onSave({ + zone: zone.trim(), + capacity: gateway ? null : Math.round(parseFloat(cap) * GB), + tags: tags.split(",").map((t) => t.trim()).filter(Boolean), + }); + }} + > + + + {!gateway && ( + + )} + +
+ + + +
+
+
+ ); +} + +function ConnectForm({ onClose, onDone }: { onClose: () => void; onDone: () => void }) { + const act = useAct(); + const [addr, setAddr] = useState(""); + return ( + +
{ + e.preventDefault(); + const r = await garage.post<{ success: boolean; error?: string }[]>("ConnectClusterNodes", undefined, [addr]).catch((er) => { + act(async () => { + throw er; + }); + return null; + }); + if (!r) return; + if (r[0]?.success) onDone(); + else act(async () => { throw new Error(r[0]?.error || "Connexion refusée"); }); + }} + > + +
+ + + +
+
+
+ ); +} diff --git a/frontend/src/Console.tsx b/frontend/src/Console.tsx new file mode 100644 index 0000000..a5c7efa --- /dev/null +++ b/frontend/src/Console.tsx @@ -0,0 +1,131 @@ +import { useEffect, useRef, useState } from "react"; +import { appApi, errMsg, type Config } from "./api"; +import { splitArgs } from "./format"; +import { PageHead } from "./ui"; + +interface Entry { + cmd: string; + out: string; + code: number; + ms: number; +} + +const PRESETS: [string, string][] = [ + ["Statut", "status"], + ["Statistiques", "stats -a"], + ["Layout", "layout show"], + ["Tâches", "worker list"], + ["Blocs en erreur", "block list-errors"], + ["Buckets", "bucket list"], + ["Clés", "key list"], + ["Snapshot métadonnées", "meta snapshot --all"], +]; + +export function Console({ cfg }: { cfg: Config }) { + const [line, setLine] = useState(""); + const [log, setLog] = useState([]); + const [busy, setBusy] = useState(false); + const [hist, setHist] = useState([]); + const [hi, setHi] = useState(-1); + const end = useRef(null); + useEffect(() => { + end.current?.scrollIntoView({ block: "end" }); + }, [log]); + + const run = async (text: string) => { + const args = splitArgs(text.replace(/^garage\s+/, "")); + if (!args.length || busy) return; + setBusy(true); + setHist((h) => [text, ...h.filter((x) => x !== text)].slice(0, 30)); + setHi(-1); + try { + const r = await appApi.cli(args); + setLog((l) => [...l, { cmd: text, out: r.output, code: r.exitCode, ms: r.ms }]); + } catch (e) { + setLog((l) => [...l, { cmd: text, out: errMsg(e), code: -1, ms: 0 }]); + } + setBusy(false); + setLine(""); + }; + + if (!cfg.cli) + return ( +
+ +
+

+ La console CLI n'est pas configurée. Elle exécute le binaire garage depuis le serveur de l'interface : renseignez GARAGE_BIN (l'image fournie l'embarque déjà),{" "} + GARAGE_RPC_HOST et GARAGE_RPC_SECRET (valeur de rpc_secret dans garage.toml). +

+

Les autres pages passent par l'API d'administration et n'en ont pas besoin.

+
+
+ ); + + return ( +
+ +
+ {PRESETS.map(([l, c]) => ( + + ))} +
+
+ {log.length === 0 && Choisissez une commande ci-dessus ou tapez-en une (sans le préfixe « garage »).} + {log.map((e, i) => ( +
+
+ $ garage {e.cmd} + + {" "} + {e.code === 0 ? `${e.ms} ms` : `code ${e.code}`} + +
+
{e.out}
+
+ ))} +
+
+
{ + e.preventDefault(); + run(line); + }} + > + $ garage + setLine(e.target.value)} + onKeyDown={(e) => { + if (e.key === "ArrowUp" && hist.length) { + e.preventDefault(); + const n = Math.min(hi + 1, hist.length - 1); + setHi(n); + setLine(hist[n]); + } else if (e.key === "ArrowDown") { + e.preventDefault(); + const n = hi - 1; + setHi(n); + setLine(n >= 0 ? hist[n] : ""); + } + }} + placeholder="status" + autoFocus + spellCheck={false} + autoCapitalize="off" + aria-label="Commande garage" + /> + + +
+
+ ); +} diff --git a/frontend/src/Keys.tsx b/frontend/src/Keys.tsx new file mode 100644 index 0000000..8066281 --- /dev/null +++ b/frontend/src/Keys.tsx @@ -0,0 +1,351 @@ +import { useState } from "react"; +import { garage, type Config, type KeyInfo, type KeyListItem } from "./api"; +import { fmtDate } from "./format"; +import { EyeIcon, KeyIcon, PlusIcon, RefreshIcon, TrashIcon } from "./icons"; +import { Confirm, CopyButton, Loading, Modal, Mono, PageHead, Status, useAct, useLoad } from "./ui"; + +// --- Liste ------------------------------------------------------------------------- + +export function Keys({ cfg }: { cfg: Config }) { + const [creating, setCreating] = useState<"new" | "import" | null>(null); + const [created, setCreated] = useState(null); + const { data, error, loading, reload } = useLoad(() => garage.get("ListKeys")); + return ( +
+ + + + + + + {data && ( +
+ + + + + + + + + + + {data.map((k) => ( + (location.hash = `#/keys/${k.id}`)}> + + + + + + ))} + {data.length === 0 && ( + + + + )} + +
NomIdentifiantCrééeExpiration
+ e.stopPropagation()}> + {k.name || "(sans nom)"} + + + + {fmtDate(k.created)}{k.expired ? expirée : k.expiration ? fmtDate(k.expiration) : jamais}
+ Aucune clé. +
+
+ )} + {creating && ( + setCreating(null)} + onDone={(k) => { + setCreating(null); + setCreated(k); + reload(); + }} + /> + )} + {created && ( + setCreated(null)}> +

Le secret reste consultable plus tard depuis la page de la clé.

+ +
+ + +
+
+ )} +
+ ); +} + +function KeyForm({ mode, onClose, onDone }: { mode: "new" | "import"; onClose: () => void; onDone: (k: KeyInfo) => void }) { + const act = useAct(); + const [name, setName] = useState(""); + const [id, setId] = useState(""); + const [secret, setSecret] = useState(""); + const [exp, setExp] = useState(""); + const [createBucket, setCreateBucket] = useState(false); + const [busy, setBusy] = useState(false); + const valid = mode === "new" || (/^GK[0-9a-f]{24}$/.test(id) && /^[0-9a-f]{64}$/.test(secret)); + return ( + +
{ + e.preventDefault(); + setBusy(true); + let k: KeyInfo | undefined; + if (await act(async () => { + if (mode === "new") { + k = await garage.post("CreateKey", undefined, { + name: name || null, + allow: { createBucket }, + ...(exp ? { expiration: new Date(exp).toISOString() } : { neverExpires: true }), + }); + } else { + k = await garage.post("ImportKey", undefined, { name: name || null, accessKeyId: id, secretAccessKey: secret }); + } + })) onDone(k!); + setBusy(false); + }} + > + + {mode === "import" && ( + <> + + + + )} + {mode === "new" && ( + <> + + + + )} +
+ + + +
+ +
+ ); +} + +/** Identifiant, secret et exemples de configuration client. */ +function Secrets({ k, cfg, reveal }: { k: KeyInfo; cfg: Config; reveal?: boolean }) { + const [show, setShow] = useState(!!reveal); + const secret = k.secretAccessKey || ""; + const shown = show ? secret : "•".repeat(32); + const endpoint = cfg.s3Endpoint || "https://s3.example.org"; + const rclone = `[garage]\ntype = s3\nprovider = Other\naccess_key_id = ${k.accessKeyId}\nsecret_access_key = ${secret}\nendpoint = ${endpoint}\nregion = ${cfg.s3Region}`; + const aws = `aws configure set aws_access_key_id ${k.accessKeyId}\naws configure set aws_secret_access_key ${secret}\naws configure set region ${cfg.s3Region}\naws --endpoint-url ${endpoint} s3 ls`; + return ( +
+ + + {show && secret && ( + <> +
+
+ rclone + +
+
{rclone}
+
+
+
+ AWS CLI + +
+
{aws}
+
+ + )} +
+ ); +} + +// --- Détail ------------------------------------------------------------------------ + +export function KeyPage({ id, cfg }: { id: string; cfg: Config }) { + const act = useAct(); + const [reveal, setReveal] = useState(false); + const [confirmDelete, setConfirmDelete] = useState(false); + const { data: k, error, loading, reload } = useLoad(() => garage.get("GetKeyInfo", { id, showSecretKey: reveal }), [id, reveal]); + const [name, setName] = useState(null); + + if (!k) + return ( +
+ + +
+ ); + const run = (fn: () => Promise, ok?: string) => act(fn, ok).then((r) => r && reload()); + + return ( +
+ + + + +
+

+ Identifiants {k.expired && expirée} +

+ {reveal || k.secretAccessKey ? ( + + ) : ( + <> + +

Le secret n'est récupéré auprès de Garage que sur demande.

+ + + )} +
+ +
+

Réglages

+
{ + e.preventDefault(); + if (name !== null) run(() => garage.post("UpdateKey", { id: k.accessKeyId }, { name }), "Nom enregistré").then(() => setName(null)); + }} + > +
+ + +
+
+ +

+ Créée le {fmtDate(k.created)} · expiration : {k.expiration ? fmtDate(k.expiration) : "jamais"} +

+
+ +
+

Buckets accessibles

+
+ + + + + + + + + + + {k.buckets.map((b) => ( + + + {(["read", "write", "owner"] as const).map((p) => ( + + ))} + + ))} + {k.buckets.length === 0 && ( + + + + )} + +
BucketLectureÉcriturePropriétaire
+ {b.globalAliases[0] ?? b.localAliases[0] ?? b.id.slice(0, 12)} + + + run(() => garage.post(e.target.checked ? "AllowBucketKey" : "DenyBucketKey", undefined, { bucketId: b.id, accessKeyId: k.accessKeyId, permissions: { [p]: true } })) + } + aria-label={p} + /> +
+ Cette clé n'a accès à aucun bucket. +
+
+
+ + {confirmDelete && ( + + La clé {k.name || k.accessKeyId} sera supprimée et ses accès aux buckets révoqués. Les applications qui l'utilisent cesseront de fonctionner. +

+ } + confirmLabel="Supprimer" + onClose={() => setConfirmDelete(false)} + onConfirm={async () => { + if (await act(() => garage.post("DeleteKey", { id: k.accessKeyId }), "Clé supprimée")) location.hash = "#/keys"; + else setConfirmDelete(false); + }} + /> + )} +
+ ); +} + diff --git a/frontend/src/Login.tsx b/frontend/src/Login.tsx new file mode 100644 index 0000000..023d44d --- /dev/null +++ b/frontend/src/Login.tsx @@ -0,0 +1,47 @@ +import { useState } from "react"; +import { appApi, errMsg, type Config } from "./api"; +import { BucketIcon } from "./gicons"; + +export function Login({ cfg, onLoggedIn }: { cfg: Config; onLoggedIn: () => void }) { + const [user, setUser] = useState(""); + const [password, setPassword] = useState(""); + const [error, setError] = useState(""); + const [busy, setBusy] = useState(false); + return ( +
+
{ + e.preventDefault(); + setBusy(true); + setError(""); + try { + await appApi.login(user, password); + onLoggedIn(); + } catch (er) { + setError(errMsg(er)); + setBusy(false); + } + }} + > +
+ +

{cfg.title}

+

Administration de Garage

+
+ + + {error &&

{error}

} + +
+
+ ); +} diff --git a/frontend/src/Maintenance.tsx b/frontend/src/Maintenance.tsx new file mode 100644 index 0000000..e0844bc --- /dev/null +++ b/frontend/src/Maintenance.tsx @@ -0,0 +1,207 @@ +import { useState } from "react"; +import { garage, type MultiResponse } from "./api"; +import { fmtAgo, fmtNum } from "./format"; +import { RefreshIcon } from "./icons"; +import { Loading, Mono, PageHead, Status, useAct, useLoad } from "./ui"; + +interface Worker { + id: number; + name: string; + state: string | { throttled?: { durationSecs?: number } }; + errors: number; + consecutiveErrors: number; + lastError?: { message: string; secsAgo: number } | null; + tranquility?: number | null; + progress?: string | null; + queueLength?: number | null; + persistentErrors?: number | null; + freeform?: string[]; +} + +interface BlockError { + blockHash: string; + refcount: number; + errorCount: number; + lastTrySecsAgo: number; + nextTryInSecs: number; +} + +/** Aplatit une réponse diffusée : les nœuds en erreur sont signalés à part. */ +function flat(r: MultiResponse | undefined): { items: T[]; errors: string[] } { + return { items: Object.values(r?.success ?? {}), errors: Object.entries(r?.error ?? {}).map(([id, e]) => `${id.slice(0, 8)} : ${e}`) }; +} + +const REPAIRS: [string, string][] = [ + ["tables", "Tables (métadonnées)"], + ["blocks", "Blocs de données"], + ["versions", "Versions d'objets"], + ["multipartUploads", "Envois multipart"], + ["blockRefs", "Références de blocs"], + ["blockRc", "Compteurs de références"], + ["rebalance", "Rééquilibrage des blocs"], + ["aliases", "Alias"], + ["clearResyncQueue", "Vider la file de resynchronisation"], + ["scrub:start", "Vérification d'intégrité (scrub) : démarrer"], + ["scrub:pause", "Scrub : pause"], + ["scrub:resume", "Scrub : reprendre"], + ["scrub:cancel", "Scrub : annuler"], +]; + +const stateLabel = (s: Worker["state"]): [string, "ok" | "warn" | "off"] => { + if (typeof s === "string") return s === "busy" ? ["actif", "ok"] : s === "done" ? ["terminé", "off"] : ["en attente", "off"]; + return ["ralenti", "warn"]; +}; + +export function Maintenance() { + const act = useAct(); + const [busyOnly, setBusyOnly] = useState(false); + const [repair, setRepair] = useState("tables"); + const [result, setResult] = useState(""); + const workers = useLoad(() => garage.post>("ListWorkers", { node: "*" }, { busyOnly, errorOnly: false }), [busyOnly]); + const blocks = useLoad(() => garage.post>("ListBlockErrors", { node: "*" })); + const w = flat(workers.data); + const wlist = w.items.flat(); + const b = flat(blocks.data); + const blist = b.items.flat(); + + return ( +
+ + + + +
+

Réparations

+

Les opérations sont lancées sur tous les nœuds. Elles tournent en tâche de fond : suivez-les dans la liste des tâches ci-dessous.

+
+ + + +
+ {result &&

{result}

} +
+ +
+
+

Tâches de fond

+ +
+ + {w.errors.map((e) => ( +

{e}

+ ))} + {workers.data && ( +
+ + + + + + + + + + + + {wlist.map((t, i) => { + const [l, k] = stateLabel(t.state); + return ( + + + + + + + + ); + })} + {wlist.length === 0 && ( + + + + )} + +
TâcheÉtatProgressionFileErreurs
{t.name} + {l} + {t.progress || t.freeform?.join(" · ") || "-"}{fmtNum(t.queueLength)} + {t.errors > 0 ? {t.errors} : 0} +
+ Aucune tâche. +
+
+ )} +
+ +
+
+

Blocs en erreur

+ +
+ + {b.errors.map((e) => ( +

{e}

+ ))} + {blocks.data && blist.length === 0 &&

Aucun bloc en erreur.

} + {blist.length > 0 && ( +
+ + + + + + + + + + + {blist.map((e) => ( + + + + + + + ))} + +
BlocRéférencesÉchecsDernier essai
+ + {e.refcount}{e.errorCount}{fmtAgo(e.lastTrySecsAgo)}
+
+ )} +
+
+ ); +} diff --git a/frontend/src/Overview.tsx b/frontend/src/Overview.tsx new file mode 100644 index 0000000..a0bc695 --- /dev/null +++ b/frontend/src/Overview.tsx @@ -0,0 +1,127 @@ +import { garage, bucketName, type BucketInfo, type BucketListItem, type ClusterHealth, type ClusterStatus, type KeyListItem } from "./api"; +import { fmtNum, fmtSize } from "./format"; +import { Loading, PageHead, Status, UsageBar, useLoad } from "./ui"; +import { RefreshIcon } from "./icons"; + +const healthLabel: Record = { + healthy: ["Sain", "ok"], + degraded: ["Dégradé", "warn"], + unavailable: ["Indisponible", "bad"], +}; + +export function Overview() { + const { data, error, loading, reload } = useLoad(async () => { + const [health, status, buckets, keys, stats] = await Promise.all([ + garage.get("GetClusterHealth"), + garage.get("GetClusterStatus"), + garage.get("ListBuckets"), + garage.get("ListKeys"), + garage.get<{ freeform?: string }>("GetClusterStatistics").catch(() => ({ freeform: "" })), + ]); + const infos = await Promise.all(buckets.map((b) => garage.get("GetBucketInfo", { id: b.id }).catch(() => null))); + return { health, status, buckets, keys, stats, infos: infos.filter((x): x is BucketInfo => !!x) }; + }); + + const bytes = data?.infos.reduce((s, b) => s + (b.bytes || 0), 0) ?? 0; + const objects = data?.infos.reduce((s, b) => s + (b.objects || 0), 0) ?? 0; + const [hl, hk] = healthLabel[data?.health.status ?? ""] ?? [data?.health.status ?? "-", "off" as const]; + const top = [...(data?.infos ?? [])].sort((a, b) => b.bytes - a.bytes).slice(0, 6); + + return ( +
+ + + + + {data && ( + <> +
+
+ État du cluster + + {hl} + + + {data.health.connectedNodes}/{data.health.knownNodes} nœuds connectés + +
+
+ Partitions + + {data.health.partitionsAllOk}/{data.health.partitions} + + toutes saines (quorum : {data.health.partitionsQuorum}) +
+
+ Buckets + {data.buckets.length} + {fmtNum(objects)} objets +
+
+ Données stockées + {fmtSize(bytes)} + hors réplication +
+
+ Clés d'accès + {data.keys.length} + {data.keys.filter((k) => k.expired).length} expirée(s) +
+
+ +
+
+

Nœuds

+
    + {data.status.nodes.map((n) => ( +
  • +
    + {n.isUp ? "En ligne" : "Hors ligne"} + {n.hostname || n.id.slice(0, 12)} + {n.role?.zone ?? "sans rôle"} + + {n.dataPartition && ( + + {fmtSize(n.dataPartition.total - n.dataPartition.available)} / {fmtSize(n.dataPartition.total)} + + )} +
    + {n.dataPartition && } +
  • + ))} +
+
+ +
+

Plus gros buckets

+ {top.length === 0 &&

Aucun bucket.

} +
    + {top.map((b) => ( +
  • +
    + {bucketName(b)} + + + {fmtNum(b.objects)} objets · {fmtSize(b.bytes)} + +
    + +
  • + ))} +
+
+
+ + {data.stats.freeform && ( +
+

Statistiques du cluster

+
{data.stats.freeform}
+
+ )} + + )} +
+ ); +} diff --git a/frontend/src/api.ts b/frontend/src/api.ts new file mode 100644 index 0000000..9d76505 --- /dev/null +++ b/frontend/src/api.ts @@ -0,0 +1,179 @@ +// Client de l'API : le serveur Go relaie /api/garage/v2/... vers l'API d'administration de Garage. + +export class ApiError extends Error { + status: number; + constructor(status: number, message: string) { + super(message); + this.status = status; + } +} + +async function req(url: string, init: RequestInit = {}): Promise { + const r = await fetch(url, { + ...init, + credentials: "same-origin", + headers: { "X-Requested-With": "garage-ui", ...(init.body ? { "Content-Type": "application/json" } : {}) }, + }); + const text = await r.text(); + let data: unknown = null; + try { + data = text ? JSON.parse(text) : null; + } catch { + data = text; + } + if (!r.ok) { + const d = data as { message?: string; error?: string } | string | null; + const msg = (d && typeof d === "object" ? d.message || d.error : d) || r.statusText; + throw new ApiError(r.status, String(msg)); + } + return data as T; +} + +const qs = (p?: Record) => { + const u = new URLSearchParams(); + for (const [k, v] of Object.entries(p ?? {})) if (v !== undefined && v !== "") u.set(k, String(v)); + const s = u.toString(); + return s ? `?${s}` : ""; +}; + +type Params = Record; + +export const garage = { + get: (op: string, params?: Params) => req(`/api/garage/v2/${op}${qs(params)}`), + post: (op: string, params?: Params, body?: unknown) => + req(`/api/garage/v2/${op}${qs(params)}`, { method: "POST", body: JSON.stringify(body ?? {}) }), +}; + +// --- Types (partiels : seuls les champs utilisés) --------------------------------- + +export interface Perm { + read: boolean; + write: boolean; + owner: boolean; +} + +export interface BucketListItem { + id: string; + created: string; + globalAliases: string[]; + localAliases: { accessKeyId: string; alias: string }[]; +} + +export interface BucketKey { + accessKeyId: string; + name: string; + permissions: Perm; + bucketLocalAliases?: string[]; +} + +export interface BucketInfo extends BucketListItem { + websiteAccess: boolean; + websiteConfig?: { indexDocument?: string; errorDocument?: string } | null; + keys: BucketKey[]; + objects: number; + bytes: number; + unfinishedUploads: number; + unfinishedMultipartUploads: number; + unfinishedMultipartUploadParts: number; + unfinishedMultipartUploadBytes: number; + quotas: { maxSize?: number | null; maxObjects?: number | null }; +} + +export interface KeyListItem { + id: string; + name: string; + created?: string; + expiration?: string | null; + expired?: boolean; +} + +export interface KeyInfo { + accessKeyId: string; + name: string; + created?: string; + expiration?: string | null; + expired?: boolean; + secretAccessKey?: string | null; + permissions: { createBucket: boolean }; + buckets: { id: string; globalAliases: string[]; localAliases: string[]; permissions: Perm }[]; +} + +export interface NodeInfo { + id: string; + role?: { zone: string; tags: string[]; capacity: number | null } | null; + addr?: string | null; + hostname?: string | null; + isUp: boolean; + lastSeenSecsAgo?: number | null; + draining?: boolean; + dataPartition?: { available: number; total: number } | null; + metadataPartition?: { available: number; total: number } | null; + garageVersion?: string | null; +} + +export interface ClusterStatus { + layoutVersion: number; + nodes: NodeInfo[]; +} + +export interface ClusterHealth { + status: string; + knownNodes: number; + connectedNodes: number; + storageNodes: number; + storageNodesUp: number; + partitions: number; + partitionsQuorum: number; + partitionsAllOk: number; +} + +export interface LayoutRole { + id: string; + zone: string; + tags: string[]; + capacity: number | null; +} + +export interface StagedRole { + id: string; + remove?: boolean; + zone?: string; + tags?: string[]; + capacity?: number | null; +} + +export interface ClusterLayout { + version: number; + roles: LayoutRole[]; + parameters?: { zoneRedundancy?: unknown }; + partitionSize?: number; + stagedRoleChanges: StagedRole[]; +} + +/** Réponse d'une opération diffusée aux nœuds (?node=*). */ +export interface MultiResponse { + success: Record; + error: Record; +} + +export interface Config { + title: string; + version: string; + auth: boolean; + user: string; + cli: boolean; + s3Endpoint: string; + s3Region: string; +} + +export const appApi = { + config: () => req("/api/config"), + login: (user: string, password: string) => req<{ user: string }>("/api/login", { method: "POST", body: JSON.stringify({ user, password }) }), + logout: () => req("/api/logout", { method: "POST", body: "{}" }), + cli: (args: string[]) => req<{ exitCode: number; output: string; ms: number }>("/api/cli", { method: "POST", body: JSON.stringify({ args }) }), +}; + +export const bucketName = (b: { id: string; globalAliases: string[]; localAliases: { alias: string }[] }) => + b.globalAliases[0] ?? b.localAliases[0]?.alias ?? b.id.slice(0, 12); + +export const errMsg = (e: unknown) => (e instanceof Error ? e.message : String(e)); diff --git a/frontend/src/format.ts b/frontend/src/format.ts new file mode 100644 index 0000000..69666f7 --- /dev/null +++ b/frontend/src/format.ts @@ -0,0 +1,39 @@ +const UNITS = ["o", "Ko", "Mo", "Go", "To", "Po"]; + +export function fmtSize(n: number | null | undefined): string { + if (n == null || !isFinite(n)) return "-"; + let i = 0; + let v = n; + while (v >= 1024 && i < UNITS.length - 1) { + v /= 1024; + i++; + } + return `${v >= 100 || i === 0 ? Math.round(v) : v.toFixed(1).replace(".", ",")} ${UNITS[i]}`; +} + +export const fmtNum = (n: number | null | undefined) => (n == null ? "-" : n.toLocaleString("fr-FR")); + +export function fmtDate(s?: string | null): string { + if (!s) return "-"; + const d = new Date(s); + return isNaN(d.getTime()) ? s : d.toLocaleString("fr-FR", { dateStyle: "medium", timeStyle: "short" }); +} + +export function fmtAgo(secs?: number | null): string { + if (secs == null) return "-"; + if (secs < 60) return `il y a ${secs} s`; + if (secs < 3600) return `il y a ${Math.round(secs / 60)} min`; + if (secs < 86400) return `il y a ${Math.round(secs / 3600)} h`; + return `il y a ${Math.round(secs / 86400)} j`; +} + +export const GIB = 1024 ** 3; + +/** Découpe une ligne de commande en arguments (guillemets simples et doubles pris en charge). */ +export function splitArgs(line: string): string[] { + const out: string[] = []; + const re = /"([^"]*)"|'([^']*)'|(\S+)/g; + let m: RegExpExecArray | null; + while ((m = re.exec(line))) out.push(m[1] ?? m[2] ?? m[3]); + return out; +} diff --git a/frontend/src/gicons.tsx b/frontend/src/gicons.tsx new file mode 100644 index 0000000..b43fcbe --- /dev/null +++ b/frontend/src/gicons.tsx @@ -0,0 +1,25 @@ +// Icônes propres à Garage UI : Papicons d'abord, Lucide en dernier recours (serveur, terminal). +import * as P from "./papicons"; +import { icon, pap } from "./icons"; + +export const OverviewIcon = pap(P.Pie); +export const BucketIcon = pap(P.Archive); +export const MaintenanceIcon = pap(P.Gears); +export const GlobeIcon = pap(P.Globe); + +/** Lucide « server » */ +export const ClusterIcon = icon( + <> + + + + , +); + +/** Lucide « terminal » */ +export const ConsoleIcon = icon( + <> + + + , +); diff --git a/frontend/src/icons.tsx b/frontend/src/icons.tsx new file mode 100644 index 0000000..8c21023 --- /dev/null +++ b/frontend/src/icons.tsx @@ -0,0 +1,390 @@ +// Icônes de l'interface : jeu Papicons (formes pleines, couleur héritée via currentColor), +// identique à celui d'Excalicloud (frontend/src/icons.tsx) pour que les deux outils se ressemblent. +// Les tracés Papicons sont dans papicons.ts ; les quelques icônes absentes du jeu sont +// dessinées ici dans le même esprit (formes pleines arrondies, ou trait épais à bouts ronds). +import { useId, type ReactNode } from "react"; +import * as P from "./papicons"; +import type { PapPath } from "./papicons"; + +type IconProps = { size?: number; className?: string }; + +/** Identifiant de masque SVG unique et sûr dans url(#…). */ +function useMaskId() { + return "m" + useId().replace(/[^a-zA-Z0-9_-]/g, ""); +} + +function Svg({ size = 16, className, children }: IconProps & { children: ReactNode }) { + return ( + + {children} + + ); +} + +const paths = (p: PapPath[]) => + p.map((x, i) => ); + +/** Icône Papicons telle quelle. */ +export const pap = (p: PapPath[], transform?: string) => + function Icon({ size, className }: IconProps) { + return ( + + {paths(p)} + + ); + }; + +/** Icône au trait, pour les icônes de dossiers sans équivalent Papicons (trait 2, plus appuyé que Tabler). */ +export const icon = (children: ReactNode) => + function Icon({ size = 16, className }: IconProps) { + return ( + + {children} + + ); + }; + +/** Icône pleine dessinée ici. */ +const solid = (children: ReactNode) => + function Icon({ size, className }: IconProps) { + return {children}; + }; + +/** Icône au trait épais (graisse des flèches Papicons), pour les symboles absents du jeu. */ +const line = (children: ReactNode) => + function Icon({ size = 16, className }: IconProps) { + return ( + + {children} + + ); + }; + +/** Icône Papicons avec une pastille en bas à droite (le fond est évidé autour de la pastille). */ +const badged = (base: PapPath[], badge: PapPath[]) => + function Icon({ size }: IconProps) { + const id = useMaskId(); + return ( + + + + + + {paths(base)} + {paths(badge)} + + ); + }; + +// Thème, barre du haut, panneaux. +/** Soleil dessiné ici : celui de Papicons ressemble trop à la roue dentée des Paramètres. */ +export const SunIcon = solid( + <> + + + , +); +export const MoonIcon = pap(P.Moon); +export const SettingsIcon = pap(P.Gears); +export const MenuIcon = pap(P.Menu); +export const CloseIcon = pap(P.Cross); +export const UpdateIcon = pap(P.Sparkles); +export const UserIcon = pap(P.User); +export const LogoutIcon = pap(P.Logout); +export const InfoIcon = pap(P.Info); +export const LinkIcon = pap(P.Link); +export const SearchIcon = pap(P.Search); + +// Fichiers et dossiers. +export const FolderIcon = pap(P.Folder); +export const FileIcon = pap(P.Paper); +export const FilePlusIcon = badged(P.Paper, P.Add); +export const FolderPlusIcon = badged(P.Folder, P.Add); +export const FolderUploadIcon = badged(P.Folder, P.ArrowUpBox); +export const MoveIcon = badged(P.Folder, P.ArrowRightBox); +export const UploadIcon = pap(P.ArrowUpBox); +export const DownloadIcon = pap(P.ArrowDownBox); +/** Dossier parent (« .. »). */ +export const UpIcon = pap(P.ArrowLeftUp); +export const EditIcon = pap(P.PenAlt); +export const SelectAllIcon = pap(P.Tasks); +export const DeselectIcon = pap(P.Placeholder); +/** Menu d'actions « … » : points à l'horizontale. */ +export const DotsIcon = pap(P.Dots, "rotate(90 12 12)"); + +// Vues de l'explorateur. +export const ListIcon = pap(P.List); +export const GridIcon = pap(P.Grid); +export const GalleryIcon = pap(P.Gallery); + +// Poubelle. +export const TrashIcon = pap(P.Trash); +/** Poubelle qui contient des éléments : pastille pleine sur le couvercle. */ +export function TrashFullIcon({ size }: IconProps) { + const id = useMaskId(); + return ( + + + + + + {paths(P.Trash)} + + + ); +} + +// Favoris : étoile pleine (favori) ou évidée (pas favori), même silhouette. +export const StarFilledIcon = pap(P.Star); +export function StarIcon({ size }: IconProps) { + const id = useMaskId(); + return ( + + + + + {paths(P.Star)} + + + {paths(P.Star)} + + ); +} + +// Actions sans équivalent dans Papicons. +export const RefreshIcon = line( + <> + + + , +); + +export const RestoreIcon = line(); + +export const HistoryIcon = line( + <> + + + , +); + +export const SortIcon = line(); + +export const CopyIcon = function CopyIcon({ size }: IconProps) { + const id = useMaskId(); + return ( + + + + + + + + + ); +}; + +export const SaveIcon = function SaveIcon({ size }: IconProps) { + const id = useMaskId(); + return ( + + + + + + + + + ); +}; + +export const TagIcon = solid( + , +); + +export const ShareIcon = solid( + <> + + + + + , +); + +export const EyeIcon = solid( + , +); + +/** Punaise : panneau épinglé ou flottant. */ +export const PinIcon = solid( + + + + , +); + +// Métadonnées des schémas (vue Galerie, panneau Détails). +export const ClockIcon = pap(P.Clock); +export const TextIcon = pap(P.Font); +export const PhotoIcon = pap(P.Camera); +export const ArrowIcon = pap(P.ArrowRightUp); +/** Taille du fichier. */ +export const SizeIcon = pap(P.Archive); + +export const ShapesIcon = solid( + <> + + + + , +); + +export const FrameIcon = line(); + +// --- Propres à Up And Down : types de fichiers, aperçu, comptes ---------------------- +// Même esprit : Papicons quand l'équivalent existe, sinon formes pleines ou trait épais. + +/** Feuille Papicons dont un motif est évidé (types de fichiers). */ +const page = (glyph: ReactNode) => + function Icon({ size, className }: IconProps) { + const id = useMaskId(); + return ( + + + + + {glyph} + + + {paths(P.Paper)} + + ); + }; + +export const FileTextIcon = page(); +export const FileCodeIcon = page(); +export const FileZipIcon = page( + <> + + + , +); +export const FileMusicIcon = page( + <> + + + , +); +export const FileVideoIcon = page(); +export const FilePdfIcon = page( + , +); +export const FileSheetIcon = page(); +export const FileSlidesIcon = page(); +export const FileImageIcon = page( + <> + + + , +); + +export const PlayIcon = solid(); + +export const ChevronLeftIcon = line(); +export const ChevronRightIcon = line(); +export const ChevronDownIcon = line(); + +export const LockIcon = pap(P.Lock); + +export const KeyIcon = line( + <> + + + , +); + +export const UsersIcon = solid( + <> + + + + + , +); + +export const ShieldIcon = solid( + , +); + +export const CheckIcon = line(); + +export const PlusIcon = pap(P.Add); + +export const HomeIcon = solid( + , +); + +export const TableIcon = line( + <> + + + , +); + +const cloud = "M7 19.5a5 5 0 0 1-.6-9.96 6.5 6.5 0 0 1 12.4 1.56A4.25 4.25 0 0 1 17.5 19.5z"; +export const CloudIcon = solid(); +/** Nuage avec une flèche vers le haut évidée : logo par défaut. */ +export function CloudUpIcon({ size, className }: IconProps) { + const id = useMaskId(); + return ( + + + + + + + + ); +} + +export const ExpandIcon = line(); + +export const CopyLinkIcon = CopyIcon; + +export function WarningIcon({ size, className }: IconProps) { + const id = useMaskId(); + return ( + + + + + + + + + ); +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx new file mode 100644 index 0000000..0d407b4 --- /dev/null +++ b/frontend/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./styles.css"; +import App from "./App"; + +createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/frontend/src/papicons.ts b/frontend/src/papicons.ts new file mode 100644 index 0000000..a1c36d1 --- /dev/null +++ b/frontend/src/papicons.ts @@ -0,0 +1,156 @@ +// Tracés extraits de Papicons 0.2.3 (@getpapillon/papicons, https://github.com/PapillonApp/papicons), +// icônes de Tom Things pour Papillon. Licence MIT, (c) 2025 Association Papillon : voir THIRD_PARTY_NOTICES.md. +// Grille 24 x 24, formes pleines. Seules les icônes utilisées par Excalicloud sont reprises. + +export type PapPath = { d: string; evenodd?: boolean }; + +export const Add: PapPath[] = [ + { d: "M20.414 10.515c.375.374.586.916.586 1.485s-.21 1.112-.585 1.486a1.8 1.8 0 0 1-1.415.515l-.35-.025-5.035-.36.36 5.035.026.349c.038.53-.14 1.04-.515 1.415-.374.375-.917.585-1.486.585s-1.111-.211-1.485-.586A1.79 1.79 0 0 1 10 19.001l.026-.35.36-5.036-5.037.36L5 14a1.79 1.79 0 0 1-1.413-.515C3.21 13.111 3 12.57 3 12s.21-1.112.585-1.486A1.8 1.8 0 0 1 5 10l.35.024 5.034.36L10 5c-.039-.53.138-1.04.514-1.415C10.888 3.21 11.431 3 12 3s1.111.211 1.485.586c.376.375.553.883.515 1.413l-.026.35-.359 5.036 5.036-.36L19 10a1.79 1.79 0 0 1 1.413.515" }, +]; + +export const Archive: PapPath[] = [ + { d: "M12.935 9.076c3.192-.1 4.79-.15 5.381.368.066.057.089.08.148.144.536.576.536 1.92.536 4.605 0 2.641 0 3.962-.774 4.819a3 3 0 0 1-.214.214c-.857.774-2.178.774-4.819.774h-2.386c-2.641 0-3.962 0-4.819-.774a3 3 0 0 1-.214-.214C5 18.155 5 16.834 5 14.193c0-2.686 0-4.03.536-4.605.06-.064.082-.087.148-.144.592-.517 2.189-.468 5.381-.368a30 30 0 0 0 1.87 0M12 12c-.713 0-1.275.017-1.695.037C9.668 12.068 9 12.363 9 13s.668.932 1.305.963c.42.02.982.037 1.695.037s1.275-.017 1.695-.037C14.332 13.932 15 13.637 15 13s-.668-.932-1.305-.963A35 35 0 0 0 12 12m6.65-8c.745 0 1.35.605 1.35 1.35 0 .663-.48 1.224-1.138 1.297C17.547 6.795 15.151 7 12 7c-3.15 0-5.546-.205-6.862-.353A1.29 1.29 0 0 1 4 5.351C4 4.605 4.605 4 5.35 4z" }, +]; + +export const ArrowDownBox: PapPath[] = [ + { d: "M21 12c0 1.483-.072 2.748-.178 3.805-.274 2.723-2.293 4.743-5.016 5.016a38 38 0 0 1-3.806.18c-1.483 0-2.748-.073-3.805-.18-2.723-.273-4.742-2.293-5.016-5.016A38 38 0 0 1 3 12c0-1.483.073-2.749.179-3.806.274-2.722 2.294-4.741 5.016-5.015A38 38 0 0 1 12 3c1.483 0 2.75.073 3.806.179 2.723.274 4.742 2.293 5.016 5.015C20.928 9.251 21 10.517 21 12m-4.122.828a1 1 0 1 0-1.414-1.414l-2.366 2.367.268-5.228.017-.322a1.23 1.23 0 0 0-.355-.944c-.25-.25-.606-.39-.978-.39s-.728.14-.978.39-.373.59-.355.944l.017.322.26 5.046-2.185-2.185a1 1 0 0 0-1.414 1.414l4.034 4.035c.39.39 1.024.39 1.415 0z", evenodd: true }, +]; + +export const ArrowLeftUp: PapPath[] = [ + { d: "M4.5 15a1.5 1.5 0 0 0 3 0V9.621l9.44 9.44a1.5 1.5 0 1 0 2.12-2.122L9.622 7.5h5.38a1.5 1.5 0 0 0 0-3H6A1.5 1.5 0 0 0 4.5 6z" }, +]; + +export const ArrowRightBox: PapPath[] = [ + { d: "M12 3c1.483 0 2.748.073 3.805.179 2.723.274 4.743 2.293 5.017 5.015C20.928 9.251 21 10.517 21 12s-.072 2.748-.178 3.805c-.274 2.723-2.294 4.743-5.017 5.016a38 38 0 0 1-3.805.18c-1.483 0-2.749-.073-3.805-.18-2.723-.274-4.742-2.293-5.016-5.016A38 38 0 0 1 3 12c0-1.483.073-2.749.179-3.806.274-2.722 2.293-4.741 5.016-5.015A38 38 0 0 1 12 3m.828 4.122a1 1 0 1 0-1.414 1.414l2.367 2.367-5.228-.27-.322-.016a1.23 1.23 0 0 0-.944.356c-.25.25-.39.606-.39.977 0 .372.14.728.39.978s.59.374.944.355l.322-.016 5.046-.261-2.185 2.185a1 1 0 0 0 1.414 1.415l4.035-4.035c.391-.39.391-1.024 0-1.415z", evenodd: true }, +]; + +export const ArrowRightUp: PapPath[] = [ + { d: "M19.5 15a1.5 1.5 0 0 1-3 0V9.621l-9.44 9.44a1.5 1.5 0 1 1-2.12-2.122L14.378 7.5H9a1.5 1.5 0 1 1 0-3h9A1.5 1.5 0 0 1 19.5 6z" }, +]; + +export const ArrowUpBox: PapPath[] = [ + { d: "M21 12c0-1.483-.072-2.748-.178-3.805-.274-2.722-2.293-4.742-5.016-5.016A38 38 0 0 0 12 3c-1.483 0-2.748.073-3.805.179-2.723.274-4.742 2.293-5.016 5.016A38 38 0 0 0 3 12c0 1.483.073 2.75.179 3.806.274 2.723 2.294 4.742 5.016 5.015 1.057.107 2.322.18 3.805.18a38 38 0 0 0 3.806-.18c2.723-.274 4.742-2.292 5.016-5.015.106-1.057.178-2.323.178-3.806m-4.122-.828a1 1 0 0 1-1.414 1.414l-2.366-2.367.268 5.228.017.323c.018.353-.105.693-.355.943s-.606.39-.978.39-.728-.14-.978-.39-.373-.59-.355-.943l.017-.323.26-5.045-2.185 2.184a1 1 0 0 1-1.414-1.414l4.034-4.035c.39-.39 1.024-.39 1.415 0z", evenodd: true }, +]; + +export const Calendar: PapPath[] = [ + { d: "M3 6.125C3 4.399 4.4 3 6.125 3h11.75C19.601 3 21 4.4 21 6.125 21 7.161 20.16 8 19.125 8H4.875A1.875 1.875 0 0 1 3 6.125M18.174 10.005a3 3 0 0 1 2.821 2.821c.003.048.002.101.002.174H17a4 4 0 0 0-4 4v3.99c-.373.009-.804.01-1.313.01h-2.4c-2.133 0-3.2 0-4.022-.396a4 4 0 0 1-1.869-1.869C3 17.913 3 16.846 3 14.714c0-1.6 0-2.399.297-3.016a3 3 0 0 1 1.401-1.401C5.315 10 6.115 10 7.714 10h10.065c.205 0 .308 0 .395.005" }, + { d: "M17 15h3.64c-.181.397-.426.766-.73 1.089-.04.042-.083.084-.168.169l-2.4 2.4c-1.087 1.087-1.665 1.66-2.342 1.978V17a2 2 0 0 1 1.796-1.99z" }, +]; + +export const Camera: PapPath[] = [ + { d: "M12 11a2 2 0 1 1 0 4 2 2 0 0 1 0-4" }, + { d: "M12 4c1.73 0 3.103.853 3.963 2.153l-.102-.01c2.674.213 4.812 2.038 5.048 4.71A24 24 0 0 1 21 13a24 24 0 0 1-.09 2.148c-.237 2.671-2.375 4.496-5.049 4.708A49 49 0 0 1 12 20c-1.51 0-2.793-.058-3.861-.144-2.674-.213-4.812-2.037-5.048-4.709A24 24 0 0 1 3 13c0-.796.035-1.51.09-2.148.237-2.671 2.375-4.496 5.049-4.708q-.052.003-.103.01C8.896 4.851 10.27 4 12 4m0 5a4 4 0 1 0 0 8 4 4 0 0 0 0-8", evenodd: true }, +]; + +export const Clock: PapPath[] = [ + { d: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18m0 3a1 1 0 0 0-1 1v3.93c0 .334-.167.647-.445.832l-2.11 1.406a1 1 0 0 0 1.11 1.665l2.11-1.407A3 3 0 0 0 13 10.93V7a1 1 0 0 0-1-1", evenodd: true }, +]; + +export const Code: PapPath[] = [ + { d: "M7.898 4.009c.52-.104 1.088.021 1.56.336s.806.79.91 1.31-.03 1.043-.355 1.463l-.221.286-3.553 4.605 3.553 4.604.22.287c.326.42.46.942.355 1.462-.103.52-.437.996-.909 1.31-.472.316-1.04.441-1.56.337a1.8 1.8 0 0 1-1.213-.89l-.18-.314q-1.612-2.826-3.226-5.65l-.178-.314a1.44 1.44 0 0 1-.182-.615v-.436a1.44 1.44 0 0 1 .182-.613l.178-.314 3.226-5.65.18-.313a1.8 1.8 0 0 1 1.213-.891M13.94 4.345c.472-.315 1.04-.44 1.559-.336.52.104.95.429 1.214.89l.18.314 3.225 5.65.179.314c.141.248.2.54.181.83.02.293-.04.585-.181.834l-.179.313-3.225 5.65-.18.314a1.8 1.8 0 0 1-1.214.89c-.52.105-1.087-.02-1.56-.335-.472-.315-.805-.791-.909-1.31-.104-.52.03-1.043.355-1.463l.22-.287 3.553-4.604-3.553-4.605-.22-.286a1.8 1.8 0 0 1-.355-1.463c.104-.52.437-.995.91-1.31" }, +]; + +export const Cross: PapPath[] = [ + { d: "M17.958 3.958c.53 0 1.059.23 1.456.628.397.397.628.926.628 1.456s-.23 1.02-.628 1.372l-.317.282L14.253 12l4.844 4.304.317.282c.397.353.628.841.628 1.372 0 .53-.23 1.059-.628 1.456-.397.397-.926.628-1.456.628s-1.02-.23-1.372-.628l-.282-.317L12 14.253l-4.304 4.844-.282.317a1.82 1.82 0 0 1-1.372.628c-.53 0-1.059-.23-1.456-.628-.398-.397-.628-.926-.628-1.456s.23-1.02.628-1.372l.317-.282L9.746 12 4.903 7.696l-.317-.282a1.82 1.82 0 0 1-.628-1.372c0-.53.23-1.059.628-1.456.397-.398.926-.628 1.456-.628s1.02.23 1.372.628l.282.317L12 9.746l4.304-4.843.282-.317a1.82 1.82 0 0 1 1.372-.628" }, +]; + +export const Dots: PapPath[] = [ + { d: "M10 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0M10 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0M10 18a2 2 0 1 1 4 0 2 2 0 0 1-4 0" }, +]; + +export const Folder: PapPath[] = [ + { d: "M18.295 12c1.462 0 2.194 0 2.618.373.19.166.334.378.42.614.193.531-.073 1.213-.603 2.575-.71 1.822-1.066 2.733-1.725 3.353a4 4 0 0 1-1.018.695c-.816.39-1.795.39-3.75.39H9.831c-1.945 0-2.917 0-3.727-.382a4 4 0 0 1-1.12-.787c-.634-.633-.964-1.548-1.624-3.378-.468-1.3-.702-1.952-.521-2.459a1.5 1.5 0 0 1 .458-.651C3.714 12 4.405 12 5.788 12zM8.7 4c.484 0 .726 0 .947.05a2 2 0 0 1 1.063.638c.148.171.262.385.49.812s.341.64.49.812a2 2 0 0 0 1.063.637c.22.05.463.051.947.051H17a3 3 0 0 1 3 3H4V8.571c0-1.464 0-2.197.25-2.77A3 3 0 0 1 5.8 4.25C6.374 4 7.106 4 8.57 4z" }, +]; + +export const Font: PapPath[] = [ + { d: "M8.303 5.71c1.362-3.297 6.032-3.297 7.394 0l2.29 5.542 2.817 5.885a2 2 0 1 1-3.608 1.726l-.878-1.834H7.682l-.878 1.834a2 2 0 1 1-3.608-1.726l2.816-5.885zm1.39 7.112-.022.051-.024.049-.051.107h4.808l-.052-.107-.023-.049-.021-.05L12 7.236z" }, +]; + +export const Gallery: PapPath[] = [ + { d: "M12 3c1.483 0 2.748.072 3.805.179 2.723.273 4.743 2.293 5.016 5.016C20.927 9.252 21 10.517 21 12s-.073 2.748-.179 3.805c-.274 2.723-2.293 4.743-5.016 5.016A38 38 0 0 1 12 21c-1.483 0-2.748-.073-3.805-.179-2.723-.274-4.743-2.293-5.016-5.016A38 38 0 0 1 3 12c0-1.483.072-2.748.179-3.805.273-2.723 2.293-4.743 5.016-5.016A38 38 0 0 1 12 3M9.842 13.212a2 2 0 0 0-2.683 0l-1.628 1.47a1.1 1.1 0 0 0-.362.923c.179 1.777 1.45 3.047 3.226 3.226.988.1 2.187.169 3.605.169s2.617-.07 3.605-.169c1.217-.122 2.195-.758 2.747-1.717.357-.617.082-1.366-.447-1.844l-.063-.058a2 2 0 0 0-2.683 0l-.212.191a2 2 0 0 1-2.681 0zM15 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4" }, +]; + +export const Gears: PapPath[] = [ + { d: "M12 3c.593 0 1.309.202 1.892.412.66.238.99.948.822 1.63l-.183.746c-.098.4.114.809.47 1.016.357.207.814.184 1.112-.102l.555-.531c.508-.486 1.287-.557 1.824-.104.473.4 1.006.92 1.302 1.433.297.514.48 1.235.59 1.845.124.69-.328 1.33-1.002 1.527l-.739.215c-.396.115-.643.5-.643.913 0 .412.246.797.642.913l.741.216c.674.197 1.125.835 1 1.526-.11.61-.292 1.331-.589 1.845-.296.514-.829 1.032-1.302 1.433-.537.453-1.316.383-1.824-.103l-.555-.532c-.298-.286-.754-.31-1.112-.103-.356.207-.569.616-.47 1.016l.183.747c.167.682-.161 1.393-.822 1.63-.583.21-1.3.412-1.892.412-.594 0-1.309-.201-1.892-.411-.66-.238-.99-.949-.822-1.631l.182-.748c.098-.4-.114-.809-.47-1.015-.358-.206-.814-.183-1.112.103l-.554.532c-.508.486-1.288.556-1.824.103-.473-.4-1.006-.92-1.302-1.433-.297-.514-.48-1.235-.59-1.845-.125-.69.327-1.33 1-1.526l.74-.216c.396-.115.644-.5.644-.913 0-.412-.248-.798-.644-.913l-.74-.215c-.673-.196-1.124-.836-1-1.527.11-.61.293-1.331.59-1.845.296-.514.829-1.032 1.302-1.433.537-.453 1.316-.382 1.824.104l.554.531c.298.285.754.309 1.112.102.356-.207.568-.615.47-1.016l-.182-.746c-.167-.682.161-1.392.822-1.63.583-.21 1.298-.412 1.891-.412m0 6a3 3 0 1 0 0 6 3 3 0 0 0 0-6", evenodd: true }, +]; + +export const Globe: PapPath[] = [ + { d: "M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2M4.74 9a.24.24 0 0 0-.22.16A8 8 0 0 0 12 20c.509 0 1-.328 1-.837a1.837 1.837 0 0 0-1.837-1.836H8.826a1.044 1.044 0 0 1 0-2.087h.043c.6 0 1.087-.486 1.087-1.087v-.51c0-.881-.714-1.596-1.596-1.596h-.358a1.523 1.523 0 0 1-1.523-1.524C6.479 9.683 5.796 9 4.955 9zm7.778-1.774a1.703 1.703 0 0 0 1.185 2.925h1.873A2.425 2.425 0 0 1 18 12.576v.924c0 .294.084.567.23.798.457.723 1.428.168 1.602-.669q.166-.79.168-1.629a7.99 7.99 0 0 0-3.654-6.717c-.679-.44-1.556-.262-2.136.3z", evenodd: true }, +]; + +export const Grid: PapPath[] = [ + { d: "M7 13c.552 0 1.036.023 1.454.058 1.364.114 2.374 1.124 2.488 2.488.035.418.058.902.058 1.454s-.023 1.036-.058 1.454c-.114 1.363-1.124 2.374-2.488 2.488C8.036 20.977 7.552 21 7 21s-1.036-.023-1.454-.058c-1.364-.114-2.374-1.125-2.488-2.488A17 17 0 0 1 3 17c0-.552.023-1.036.058-1.454.114-1.364 1.124-2.374 2.488-2.488C5.964 13.023 6.448 13 7 13M17 13c.552 0 1.036.023 1.454.058 1.363.114 2.374 1.124 2.488 2.488.035.418.058.902.058 1.454s-.023 1.036-.058 1.454c-.114 1.363-1.125 2.374-2.488 2.488-.418.035-.902.058-1.454.058s-1.036-.023-1.454-.058c-1.364-.114-2.374-1.125-2.488-2.488A18 18 0 0 1 13 17c0-.552.023-1.036.058-1.454.114-1.364 1.124-2.374 2.488-2.488.418-.035.902-.058 1.454-.058M7 3c.552 0 1.036.023 1.454.058 1.364.114 2.374 1.124 2.488 2.488.035.418.058.902.058 1.454s-.023 1.036-.058 1.454c-.114 1.364-1.124 2.374-2.488 2.488C8.036 10.977 7.552 11 7 11s-1.036-.023-1.454-.058c-1.364-.114-2.374-1.124-2.488-2.488A17 17 0 0 1 3 7c0-.552.023-1.036.058-1.454.114-1.364 1.124-2.374 2.488-2.488C5.964 3.023 6.448 3 7 3M17 3c.552 0 1.036.023 1.454.058 1.363.114 2.374 1.124 2.488 2.488.035.418.058.902.058 1.454s-.023 1.036-.058 1.454c-.114 1.364-1.125 2.374-2.488 2.488-.418.035-.902.058-1.454.058s-1.036-.023-1.454-.058c-1.364-.114-2.374-1.124-2.488-2.488A18 18 0 0 1 13 7c0-.552.023-1.036.058-1.454.114-1.364 1.124-2.374 2.488-2.488C15.964 3.023 16.448 3 17 3" }, +]; + +export const Info: PapPath[] = [ + { d: "M12 3c1.483 0 2.748.073 3.805.179 2.723.274 4.743 2.293 5.017 5.015C20.928 9.251 21 10.517 21 12s-.072 2.748-.178 3.805c-.274 2.723-2.294 4.743-5.017 5.016a38 38 0 0 1-3.805.18c-1.483 0-2.749-.073-3.805-.18-2.723-.274-4.742-2.293-5.016-5.016A38 38 0 0 1 3 12c0-1.483.073-2.749.179-3.806.274-2.722 2.293-4.741 5.016-5.015A38 38 0 0 1 12 3m0 8a1 1 0 0 0-1 1v5a1 1 0 1 0 2 0v-5a1 1 0 0 0-1-1m0-4a1 1 0 1 0 0 2 1 1 0 0 0 0-2", evenodd: true }, +]; + +export const Link: PapPath[] = [ + { d: "M9.415 10.429a1.5 1.5 0 0 1 2.12 2.12 10 10 0 0 0-.223.231c-.56.6-.606 1.602.24 2.546q.528.593 1.276 1.344.476.475.888.86c1.203 1.123 2.568 1.096 3.232.432.606-.606.867-1.051.975-1.33.1-.258.075-.384.067-.42a.3.3 0 0 0-.092-.155l-.007-.008.012.01.017.011.012.01q.003.001.006.004l.005.002a1.5 1.5 0 0 1 1.653-2.503l-.58.882c.553-.84.58-.88.582-.881l.002.002.005.003.01.006q.008.007.02.014l.05.037q.057.041.134.105a3.32 3.32 0 0 1 1.09 1.775c.327 1.389-.222 2.94-1.839 4.557-2.274 2.274-5.565 1.352-7.4-.36a39 39 0 0 1-2.354-2.396c-1.571-1.755-2.108-4.55-.194-6.597q.139-.149.293-.301" }, + { d: "M5.981 4.112c2.274-2.274 5.566-1.35 7.4.362a39 39 0 0 1 2.353 2.395c1.572 1.755 2.11 4.55.196 6.596q-.14.15-.293.303a1.5 1.5 0 0 1-2.122-2.122q.119-.117.224-.23c.561-.6.606-1.602-.24-2.546a35.758 35.758 0 0 0-2.165-2.203c-1.203-1.123-2.566-1.097-3.23-.433-.606.606-.867 1.051-.975 1.33-.1.257-.076.383-.068.42a.3.3 0 0 0 .092.156l.007.008q0-.001-.012-.01l-.016-.013-.013-.008-.006-.005-.005-.002a1.5 1.5 0 0 1-1.653 2.502l.58-.881c-.552.837-.58.88-.582.881l-.002-.002-.005-.002-.009-.007-.02-.014-.051-.036a3.263 3.263 0 0 1-.496-.462A3.3 3.3 0 0 1 4.14 8.67c-.325-1.389.223-2.94 1.84-4.558" }, +]; + +export const List: PapPath[] = [ + { d: "M12 3c1.483 0 2.748.073 3.805.179 2.723.273 4.742 2.293 5.016 5.015C20.927 9.251 21 10.517 21 12s-.073 2.748-.179 3.805c-.274 2.723-2.293 4.743-5.016 5.016A38 38 0 0 1 12 21c-1.483 0-2.749-.073-3.806-.179-2.722-.274-4.742-2.293-5.015-5.016A38 38 0 0 1 3 12c0-1.483.072-2.749.179-3.806.274-2.722 2.293-4.741 5.015-5.015A38 38 0 0 1 12 3m-.5 12c-1.31 0-2.281.025-2.937.052C7.86 15.08 7 15.298 7 16s.86.92 1.563.948c.656.027 1.626.052 2.937.052s2.281-.025 2.938-.052C15.139 16.92 16 16.702 16 16s-.86-.92-1.562-.948A74 74 0 0 0 11.5 15m-1-4c-.91 0-1.609.02-2.111.043-.657.03-1.389.3-1.389.957 0 .658.732.927 1.389.957C8.89 12.98 9.59 13 10.5 13s1.609-.02 2.111-.043c.657-.03 1.389-.3 1.389-.957 0-.658-.732-.927-1.389-.957A46 46 0 0 0 10.5 11M12 7a90 90 0 0 0-3.347.055C7.927 7.082 7 7.274 7 8s.927.918 1.653.945C9.383 8.973 10.487 9 12 9s2.617-.027 3.347-.055C16.073 8.918 17 8.726 17 8s-.927-.918-1.653-.945A90 90 0 0 0 12 7" }, +]; + +export const Lock: PapPath[] = [ + { d: "M12.324 3.866c3.316.171 5.504 2.964 5.636 6.349q.029.78.035 1.68c.656.043 1.117.14 1.505.364a3 3 0 0 1 1.098 1.098c.402.696.402 1.63.402 3.5s0 2.804-.402 3.5a3 3 0 0 1-1.098 1.098c-.696.402-1.63.402-3.5.402H8c-1.87 0-2.804 0-3.5-.402a3 3 0 0 1-1.098-1.098C3 19.661 3 18.727 3 16.857s0-2.804.402-3.5A3 3 0 0 1 4.5 12.26c.387-.223.849-.32 1.504-.365q.002-.336.007-.655l.029-1.024C6.176 6.72 8.503 3.857 12 3.857zM12 6.857c-1.497 0-2.872 1.172-2.962 3.474q-.026.707-.033 1.526h5.99a51 51 0 0 0-.033-1.526c-.09-2.302-1.465-3.474-2.962-3.474", evenodd: true }, +]; + +export const Logout: PapPath[] = [ + { d: "M7.5 3c1.272 0 2.281.143 3.045.321 1.234.288 2.004 1.367 2.15 2.626q.069.582.131 1.346c.065.811-.634 1.47-1.443 1.38L11 8.634c-.884-.098-1.732.167-2.357.794-.626.623-.976 1.557-.976 2.539s.35 1.916.976 2.539c.625.626 1.473.891 2.357.794l.382-.041c.81-.089 1.512.568 1.448 1.382a38 38 0 0 1-.136 1.413c-.146 1.259-.916 2.338-2.15 2.626C9.78 20.857 8.772 21 7.5 21s-2.282-.143-3.045-.321c-1.234-.288-2.004-1.367-2.15-2.626C2.152 16.74 2 14.743 2 12s.152-4.74.305-6.053c.146-1.259.916-2.338 2.15-2.626C5.218 3.143 6.228 3 7.5 3m8.396 4.384a1 1 0 0 1 1.414 0l3.773 3.773a1 1 0 0 1 0 1.414l-3.773 3.773a1 1 0 0 1-1.414-1.414L17.824 13l-6.442.281L11 13.3a1.25 1.25 0 0 1-.943-.361c-.25-.25-.39-.603-.39-.972 0-.37.14-.722.39-.972s.59-.377.943-.361l.382.016 6.655.29-2.141-2.141a1 1 0 0 1 0-1.414" }, +]; + +export const Menu: PapPath[] = [ + { d: "M12 17c2.472 0 3.263.043 4.429.085 1.114.04 2.571.3 2.571 1.415s-1.457 1.375-2.571 1.415C15.263 19.957 14.472 20 12 20s-3.263-.043-4.429-.085C6.457 19.875 5 19.615 5 18.5s1.457-1.375 2.571-1.415C8.737 17.043 9.528 17 12 17M12 11c2.472 0 2.263.043 3.429.085 1.114.04 2.571.3 2.571 1.415s-1.457 1.375-2.571 1.415c-1.166.042-.957.085-3.429.085s-2.263-.043-3.429-.085C7.457 13.875 6 13.615 6 12.5s1.457-1.375 2.571-1.415C9.737 11.043 9.528 11 12 11M12 5c2.472 0 4.263.043 5.429.085 1.114.04 2.571.3 2.571 1.415s-1.457 1.375-2.571 1.415A152 152 0 0 1 12 8c-2.472 0-4.263-.043-5.429-.085C5.457 7.875 4 7.615 4 6.5s1.457-1.375 2.571-1.415C7.737 5.043 9.528 5 12 5" }, +]; + +export const Moon: PapPath[] = [ + { d: "M11 3.857c.79 0 1 1.185.464 1.764a5.5 5.5 0 0 0 7.77 7.772c.58-.536 1.766-.325 1.766.464.003 4.97-4.03 8-9 8a9 9 0 0 1-9-9c0-4.97 3.03-9 8-9" }, +]; + +export const Paper: PapPath[] = [ + { d: "M12 7.828a4 4 0 0 0 4 4c.932 0 1.398 0 1.765.152a2 2 0 0 1 1.083 1.082c.152.368.152.834.152 1.766V15c0 2.828 0 4.243-.879 5.122S15.828 21 13 21h-2c-2.828 0-4.242 0-5.121-.878C5 19.242 5 17.828 5 14.999v-4c0-2.808 0-4.212.674-5.221a4 4 0 0 1 1.103-1.104c.39-.26.837-.42 1.402-.518 1.538-.267 2.307-.401 2.99.09.073.053.165.13.23.193C12 5.028 12 5.961 12 7.828" }, + { d: "M14 6.365c0-1.004 0-1.506.304-1.636s.666.219 1.39.915l2.792 2.688c.316.304.501.701.507 1.14.003.186-.147.356-.334.356H16l-.204-.011A2 2 0 0 1 14 7.827z" }, +]; + +export const PenAlt: PapPath[] = [ + { d: "M19.145 14.688a.4.4 0 0 1 .157.054c.229.125.343 1.145.573 3.184l.029.26c.122 1.088.184 1.633-.128 1.966q-.027.029-.057.055c-.337.308-.887.247-1.988.127l-.263-.029c-2.065-.226-3.097-.34-3.223-.566a.4.4 0 0 1-.055-.154c-.044-.254.746-1.036 2.327-2.598s2.371-2.343 2.628-2.299M12.326 8.006a1.19 1.19 0 0 1 1.676-.012c1.7 1.68 2.692 2.933 3.205 3.65.307.43.366.974.111 1.437-.332.602-.958 1.53-2.082 2.64s-2.062 1.729-2.672 2.057c-.468.252-1.018.194-1.454-.11-.725-.507-1.994-1.487-3.694-3.166a1.163 1.163 0 0 1 .012-1.656zM8.494 4.923c.681-.413 1.51-.325 2.151.147.552.406.585 1.207.098 1.688l-4.58 4.526c-.49.484-1.292.451-1.706-.099-.478-.634-.567-1.452-.149-2.126.365-.586.951-1.374 1.873-2.285s1.72-1.49 2.313-1.85" }, +]; + +export const Pie: PapPath[] = [ + { d: "M11 12a1 1 0 0 0 1 1h4.477c2.117 0 3.175 0 3.736 1.074s.1 1.738-.824 3.065A9 9 0 1 1 6.862 4.612c1.326-.924 1.99-1.386 3.064-.825S11 5.407 11 7.523z" }, + { d: "M13 7.247c0-1.777 0-2.665.823-3.264.112-.082.336-.203.466-.252.95-.362 1.507 0 2.62.726a9.05 9.05 0 0 1 2.634 2.634c.726 1.113 1.088 1.67.726 2.62-.049.13-.17.354-.252.466-.599.823-1.487.823-3.264.823-1.647 0-2.47 0-3.024-.455a2 2 0 0 1-.274-.274C13 9.717 13 8.894 13 7.247" }, +]; + +export const Placeholder: PapPath[] = [ + { d: "M4 17.357a1.5 1.5 0 0 1 1.5 1.5v.5H6a1.5 1.5 0 0 1 0 3H5a2.5 2.5 0 0 1-2.5-2.5v-1a1.5 1.5 0 0 1 1.5-1.5M13 19.357a1.5 1.5 0 0 1 0 3h-2a1.5 1.5 0 0 1 0-3zM20 17.357a1.5 1.5 0 0 1 1.5 1.5v1a2.5 2.5 0 0 1-2.5 2.5h-1a1.5 1.5 0 0 1 0-3h.5v-.5a1.5 1.5 0 0 1 1.5-1.5M4 10.357a1.5 1.5 0 0 1 1.5 1.5v2a1.5 1.5 0 0 1-3 0v-2a1.5 1.5 0 0 1 1.5-1.5M20 10.357a1.5 1.5 0 0 1 1.5 1.5v2a1.5 1.5 0 0 1-3 0v-2a1.5 1.5 0 0 1 1.5-1.5M6 3.357a1.5 1.5 0 1 1 0 3h-.5v.5a1.5 1.5 0 0 1-3 0v-1a2.5 2.5 0 0 1 2.5-2.5zM19 3.357a2.5 2.5 0 0 1 2.5 2.5v1a1.5 1.5 0 0 1-3 0v-.5H18a1.5 1.5 0 0 1 0-3zM13 3.357a1.5 1.5 0 0 1 0 3h-2a1.5 1.5 0 0 1 0-3z" }, +]; + +export const Search: PapPath[] = [ + { d: "M10 3a7 7 0 0 1 5.573 11.232l4.078 3.548c1.28 1.114.492 3.22-1.205 3.22a1.84 1.84 0 0 1-1.43-.685l-3.453-4.29A7 7 0 1 1 10 3m0 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8", evenodd: true }, +]; + +export const Sparkles: PapPath[] = [ + { d: "M12.647 16.859c-1.087 2.185-1.63 3.278-2.412 3.543a2 2 0 0 1-1.284 0c-.782-.265-1.325-1.358-2.412-3.543-1.156-.202-1.735-.302-1.876-.35-1.888-.626-1.801-3.326.123-3.831.144-.038.68-.097 1.753-.213 1.064-2.252 1.596-3.378 2.365-3.66a2 2 0 0 1 1.378 0c.77.282 1.301 1.408 2.365 3.66 1.176.114 1.765.172 1.91.208 1.958.49 2.038 3.246.11 3.849-.142.044-.768.142-2.02.337M14.294 9.114l-.25-.14c-.944-.531-1.416-.796-1.549-1.114a1 1 0 0 1 .081-.925c.186-.29.697-.47 1.718-.827.768-1.43 1.152-2.146 1.682-2.343a1.5 1.5 0 0 1 1.047 0c.53.197.915.912 1.683 2.343 1.021.358 1.532.537 1.718.827a1 1 0 0 1 .08.925c-.132.318-.604.583-1.547 1.113l-.251.141c-.79 1.39-1.184 2.085-1.726 2.269a1.5 1.5 0 0 1-.96 0c-.542-.183-.937-.879-1.726-2.269" }, +]; + +export const Star: PapPath[] = [ + { d: "m7.82 8.84-1.563 5.203L12 17.68l5.744-3.637L16.18 8.84z" }, + { d: "M12 17.68c2.723 2.55 4.084 3.826 5.08 3.639a2 2 0 0 0 1.091-.6c.693-.74.347-2.573-.345-6.239l-.082-.437z" }, + { d: "m16.18 8.84 1.564 5.203c2.305-1.066 3.459-1.599 3.76-2a2 2 0 0 0-.651-2.965c-.443-.238-1.713-.238-4.254-.238zM7.82 8.84h8.36l-.564-1.192C14.05 4.335 13.266 2.68 12 2.68s-2.05 1.656-3.616 4.97zM6.174 14.48c-.692 3.666-1.038 5.499-.345 6.24a2 2 0 0 0 1.09.599c.997.187 2.359-1.088 5.081-3.639l-5.743-3.637zM6.257 14.043 7.82 8.84h-.419c-2.54 0-3.81 0-4.254.238a2 2 0 0 0-.652 2.965c.302.401 1.455.934 3.762 2" }, +]; + +export const Tasks: PapPath[] = [ + { d: "M12 3c1.483 0 2.748.073 3.805.179 2.723.274 4.743 2.293 5.017 5.015C20.928 9.251 21 10.517 21 12s-.072 2.748-.178 3.805c-.274 2.723-2.294 4.743-5.017 5.016a38 38 0 0 1-3.805.18c-1.483 0-2.749-.073-3.805-.18-2.723-.274-4.742-2.293-5.016-5.016A38 38 0 0 1 3 12c0-1.483.073-2.749.179-3.806.274-2.722 2.293-4.741 5.016-5.015A38 38 0 0 1 12 3m5.63 4.223a1 1 0 0 0-1.407.148l-5.773 7.136-2.213-2.214-.077-.068a1 1 0 0 0-1.338 1.482l2.214 2.214a2 2 0 0 0 2.97-.156l5.772-7.136a1 1 0 0 0-.149-1.406", evenodd: true }, +]; + +export const Trash: PapPath[] = [ + { d: "M14.876 10.29c2.406-.085 3.608-.127 4.233.586.626.713.433 1.87.047 4.187l-.321 1.923c-.4 2.395-.598 3.592-1.437 4.303S15.344 22 12.917 22h-1.835c-2.427 0-3.641 0-4.48-.71-.84-.712-1.039-1.91-1.438-4.304l-.32-1.924c-.386-2.315-.58-3.473.046-4.186.625-.713 1.828-.67 4.234-.587.934.033 1.917.054 2.876.054s1.942-.021 2.876-.054M8.5 12a1 1 0 0 0-1 1v6a1 1 0 0 0 2 0v-6a1 1 0 0 0-1-1m3.5 0a1 1 0 0 0-1 1v6a1 1 0 1 0 2 0v-6a1 1 0 0 0-1-1m3.5 0a1 1 0 0 0-1 1v6a1 1 0 1 0 2 0v-6a1 1 0 0 0-1-1M12 2c1.275 0 2.271.276 2.97.854.722.597.978 1.388 1.022 2.083.024.376-.013.74-.073 1.063h2.73C19.395 6 20 6.605 20 7.35c0 .663-.48 1.224-1.138 1.297C17.547 8.795 15.151 9 12 9c-3.15 0-5.546-.205-6.862-.353A1.29 1.29 0 0 1 4 7.351C4 6.605 4.605 6 5.35 6h2.731a4.3 4.3 0 0 1-.073-1.063c.044-.695.3-1.486 1.021-2.083C9.73 2.276 10.725 2 12 2m0 2c-1.018 0-1.488.224-1.696.396-.186.153-.28.362-.3.667-.02.302.043.638.133.937h3.726c.09-.3.152-.635.133-.937-.02-.305-.114-.514-.3-.667C13.488 4.224 13.018 4 12 4" }, +]; + +export const User: PapPath[] = [ + { d: "M17 8A5 5 0 1 1 7 8a5 5 0 0 1 10 0M4.345 18.582c.052-.358.077-.537.094-.628.41-2.155 2.06-3.414 4.247-3.24.091.008.35.04.868.105.85.107 1.705.181 2.446.181s1.595-.073 2.446-.18c.518-.066.777-.098.868-.106 2.187-.174 3.837 1.085 4.247 3.24.017.09.042.27.094.628.017.124.026.185.03.236a2 2 0 0 1-1.89 2.18c-.05.002-.113.002-.238.002H6.444c-.125 0-.188 0-.238-.003a2 2 0 0 1-1.89-2.18c.004-.05.013-.111.03-.235" }, +]; diff --git a/frontend/src/styles.css b/frontend/src/styles.css new file mode 100644 index 0000000..fb9df01 --- /dev/null +++ b/frontend/src/styles.css @@ -0,0 +1,1074 @@ +/* Garage UI : interface d administration de Garage (S3), même charte que Up And Down. + Jetons de couleur en tête, clair et sombre, alignés sur Excalicloud : en clair la + palette de l'interface d'Excalidraw 0.18, en sombre la palette commune aux deux outils. + Mise en page responsive (la barre latérale devient un tiroir sous 860 px). */ +:root { + --bg: #ffffff; + --panel: #ffffff; + --panel-2: #ececf4; /* --color-surface-low : boutons, champs */ + --hover: #f1f0ff; /* --color-surface-high */ + --fg: #1b1b1f; + --muted: #7a7a7a; + --border: #ebebeb; + --accent: #6965db; + --accent-hover: #5753d0; + --accent-soft: #e0dfff; + --accent-fg: #ffffff; + --danger: #c92a2a; + --danger-soft: #ffe3e3; + --ok: #2b8a3e; + --warn: #e67700; + --folder: var(--accent); /* dossiers dans la couleur d'accent, comme Excalicloud */ + --shadow: 0 0 0.93px 0 rgb(0 0 0 / 0.17), 0 0 3.13px 0 rgb(0 0 0 / 0.08), 0 7px 14px 0 rgb(0 0 0 / 0.05); + --shadow-lg: 0 100px 80px rgb(0 0 0 / 0.07), 0 41.8px 33.4px rgb(0 0 0 / 0.05), 0 22.3px 17.9px rgb(0 0 0 / 0.042), + 0 12.5px 10px rgb(0 0 0 / 0.035), 0 6.65px 5.3px rgb(0 0 0 / 0.028), 0 2.77px 2.2px rgb(0 0 0 / 0.02); + --radius: 0.5rem; + --radius-sm: 0.375rem; + --btn: 2.25rem; + --topbar-h: 48px; + --sidebar-w: 248px; + --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; + color-scheme: light; +} + +:root[data-theme="dark"] { + --bg: #0f1218; + --panel: #171b24; + --panel-2: #1e2330; + --hover: #222838; + --fg: #e6e9f2; + --muted: #8e95aa; + --border: #2a3042; + --accent: #6e9bff; + --accent-hover: #8cb0ff; + --accent-soft: #22325a; + --accent-fg: #0b1020; + --danger: #ff8787; + --danger-soft: #4a1d1d; + --ok: #69db7c; + --warn: #ffa94d; + --folder: var(--accent); + --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 14px rgb(0 0 0 / 0.3); + --shadow-lg: 0 20px 50px rgb(0 0 0 / 0.6); + color-scheme: dark; +} + +* { + box-sizing: border-box; +} + +html, +body, +#root { + margin: 0; + height: 100%; + background: var(--bg); + color: var(--fg); + font: 14px/1.45 var(--font); +} +html, +body { + overflow: hidden; +} + +a { + color: var(--accent); +} +code, +pre { + font-family: var(--mono); + font-size: 0.85em; +} +.muted { + color: var(--muted); +} +.spacer { + flex: 1; +} +.grow { + flex: 1; + min-width: 0; +} +.block { + display: block; +} +.small-text { + font-size: 12px; + margin: 0.25rem 0; +} +.center { + text-align: center; +} +.splash { + height: 100%; + display: grid; + place-items: center; +} + +/* --- Boutons ------------------------------------------------------------------ */ +button, +.ex-btn, +.actions a { + -webkit-tap-highlight-color: transparent; + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + height: var(--btn); + padding: 0 0.75rem; + font: 500 13px/1 var(--font); + color: var(--fg); + background: var(--panel-2); + border: 1px solid transparent; + border-radius: var(--radius); + cursor: pointer; + text-decoration: none; + white-space: nowrap; +} +button svg, +.ex-btn svg { + flex: none; +} +button:hover:not(:disabled), +.ex-btn:hover { + background: var(--hover); +} +button:focus-visible, +.ex-btn:focus-visible, +a:focus-visible, +input:focus-visible, +select:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 1px; +} +button:active:not(:disabled), +.ex-btn:active { + border-color: var(--accent-hover); +} +button:disabled { + opacity: 0.45; + cursor: default; +} +button.primary, +.ex-btn.primary { + background: var(--accent); + border-color: var(--accent); + color: var(--accent-fg); +} +button.primary:hover:not(:disabled), +.ex-btn.primary:hover { + background: var(--accent-hover); + border-color: var(--accent-hover); +} +button.danger-fill { + background: var(--danger); + border-color: var(--danger); + color: #fff; +} +.ex-btn.danger, +button.danger-outline { + color: var(--danger); +} +button.big, +.ex-btn.big { + height: 2.75rem; + padding: 0 1.2rem; + font-size: 14px; +} +.ex-btn.square { + width: var(--btn); + padding: 0; +} +.icon-btn { + width: 2rem; + height: 2rem; + padding: 0; + background: transparent; + border-color: transparent; + color: var(--fg); + text-decoration: none; +} +.icon-btn:hover:not(:disabled) { + background: var(--hover); + color: var(--fg); +} +.icon-btn.on { + background: var(--accent-soft); + color: var(--accent); +} +.icon-btn.danger { + color: var(--danger); +} +button.link { + height: auto; + padding: 0; + border: none; + background: none; + color: var(--accent); + font-weight: 500; +} +.flip { + transform: rotate(180deg); +} + +/* --- Champs ------------------------------------------------------------------- */ +input[type="text"], +input[type="search"], +input[type="email"], +input[type="password"], +input[type="number"], +input:not([type]), +select { + height: var(--btn); + padding: 0 0.7rem; + font: 14px var(--font); + color: var(--fg); + background: var(--panel-2); + border: 1px solid var(--border); + border-radius: var(--radius); + min-width: 0; +} +input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover, +select:hover { + border-color: var(--accent-hover); +} +input:focus, +select:focus { + border-color: var(--accent); +} +select { + padding-right: 0.4rem; +} +.field { + display: flex; + flex-direction: column; + gap: 0.3rem; +} +.field > span { + font-size: 12px; + font-weight: 600; + color: var(--muted); +} +.field input, +.field select { + width: 100%; +} +.check-row { + display: flex; + gap: 0.6rem; + align-items: flex-start; + margin: 0.6rem 0; +} +.check-row input { + margin-top: 0.2rem; +} +.inline-form { + display: flex; + gap: 0.6rem; + align-items: flex-end; + margin: 0.5rem 0; +} +.inline-form > input { + flex: 1; +} +.form { + display: flex; + flex-direction: column; + gap: 0.85rem; +} +.form h4, +.section h4 { + margin: 1.2rem 0 0.2rem; + font-size: 13px; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--muted); +} +.grid2 { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.8rem; +} + +/* --- Messages ----------------------------------------------------------------- */ +.error { + margin: 0.5rem 0; + padding: 0.55rem 0.8rem; + border-radius: var(--radius-sm); + background: var(--danger-soft); + color: var(--danger); + cursor: pointer; + white-space: pre-line; +} +.error.floating { + position: fixed; + left: 50%; + bottom: 1rem; + transform: translateX(-50%); + z-index: 3000; +} +.error-text { + color: var(--danger); +} +.notice { + margin: 0.5rem 0; + padding: 0.55rem 0.8rem; + border-radius: var(--radius-sm); + background: var(--accent-soft); + color: var(--fg); +} +.badge { + display: inline-block; + min-width: 1.35rem; + padding: 0.05rem 0.4rem; + margin-left: 0.35rem; + border-radius: 999px; + background: var(--accent); + color: var(--accent-fg); + font-size: 11px; + font-weight: 700; + text-align: center; +} +.pill { + display: inline-flex; + align-items: center; + gap: 0.25rem; + padding: 0.05rem 0.5rem; + margin: 0 0.4rem; + border-radius: 999px; + background: var(--panel-2); + color: var(--muted); + font-size: 11px; + font-weight: 600; +} + +/* --- Barre du haut et mise en page ------------------------------------------- */ +.app { + height: 100%; + display: flex; + flex-direction: column; +} +.topbar { + flex: none; + height: var(--topbar-h); + display: flex; + align-items: center; + gap: 0.4rem; + padding: 0 0.9rem; + background: var(--panel); + border-bottom: 1px solid var(--border); +} +.brand { + display: flex; + align-items: center; + gap: 0.55rem; + color: var(--fg); + font-weight: 700; + font-size: 16px; + text-decoration: none; + min-width: 0; +} +.brand svg { + color: var(--accent); +} +.brand span { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +/* Chemin du dossier affiché, comme dans Excalicloud : chaque niveau cliquable, + le dossier courant en gras. */ +.topbar .path { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + overflow: hidden; + white-space: nowrap; + font-size: 14px; + margin-left: 0.6rem; + padding-left: 0.6rem; + border-left: 1px solid var(--border); +} +.topbar .path .seg { + display: flex; + align-items: center; + min-width: 2.5em; + flex-shrink: 1; +} +.topbar .path .seg:last-child { + flex-shrink: 0; + max-width: 60%; +} +.topbar .path .sep { + padding: 0 2px; + color: var(--muted); +} +.topbar .path button, +.topbar .path .current { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + height: auto; + padding: 4px 6px; + border: 1px solid transparent; + background: transparent; + font: inherit; + color: var(--fg); + border-radius: var(--radius); +} +.topbar .path button:hover { + background: var(--hover); +} +.topbar .path button.drop { + background: var(--accent-soft); + outline: 2px dashed var(--accent); +} +.topbar .path .current { + font-weight: 600; +} +.topbar-tools { + display: flex; + align-items: center; + gap: 0.25rem; + margin-left: auto; + padding-left: 0.5rem; + border-left: 1px solid var(--border); +} +.logo { + width: 32px; + height: 32px; + border-radius: 50%; + object-fit: cover; + flex: none; +} +.menu-btn { + display: none; +} +.user-btn { + gap: 0.5rem; + padding: 0 0.6rem 0 0.3rem; + height: 2.25rem; + border-radius: 999px; +} +.avatar { + width: 1.75rem; + height: 1.75rem; + border-radius: 50%; + display: grid; + place-items: center; + background: var(--accent); + color: var(--accent-fg); + font-size: 12px; + font-weight: 700; +} +.user-name { + max-width: 12rem; + overflow: hidden; + text-overflow: ellipsis; +} +.layout { + flex: 1; + min-height: 0; + display: grid; + grid-template-columns: var(--sidebar-w) 5px minmax(0, 1fr); +} +.resizing { + user-select: none; + cursor: col-resize; +} +.splitter { + cursor: col-resize; + background: transparent; + border-left: 1px solid var(--border); +} +.splitter:hover, +.splitter:focus-visible { + background: var(--accent-soft); + outline: none; +} +.sidebar { + display: flex; + flex-direction: column; + justify-content: space-between; + min-height: 0; + overflow: auto; + padding: 0.7rem 0.5rem; + background: var(--panel); +} +.sidebar nav { + display: flex; + flex-direction: column; + gap: 2px; +} +.nav-item { + justify-content: flex-start; + width: 100%; + height: 2.5rem; + border-color: transparent; + background: transparent; + font-size: 14px; + color: var(--fg); +} +.nav-item svg { + color: var(--muted); +} +.nav-item.on { + background: var(--accent-soft); + color: var(--accent); +} +.nav-item.on svg { + color: var(--accent); +} +.sidebar-foot { + padding: 0.7rem 0.6rem 0.2rem; + display: flex; + flex-direction: column; + gap: 0.5rem; +} +.usage-text { + display: flex; + justify-content: space-between; + gap: 0.5rem; + font-size: 12px; + margin-bottom: 0.3rem; +} +.bar { + height: 6px; + border-radius: 99px; + background: var(--panel-2); + overflow: hidden; +} +.bar span { + display: block; + height: 100%; + background: var(--accent); + transition: width 0.25s; +} +.bar span.err { + background: var(--danger); +} +.main { + min-width: 0; + min-height: 0; + background: var(--bg); +} +.scrim { + display: none; +} + +/* --- Menus ------------------------------------------------------------------------ */ +.menu-popup { + position: fixed; + z-index: 3500; + min-width: 14rem; + max-width: 20rem; + padding: 0.35rem; + background: var(--panel); + border: 1px solid var(--border); + border-radius: var(--radius); + box-shadow: var(--shadow-lg); +} +.menu-popup button, +.menu-popup a { + display: flex; + width: 100%; + justify-content: flex-start; + height: 2.2rem; + border: none; + background: transparent; + font-weight: 500; +} +.menu-popup button:hover, +.menu-popup a:hover { + background: var(--hover); +} +.menu-popup .danger { + color: var(--danger); +} +.menu-popup hr { + border: none; + border-top: 1px solid var(--border); + margin: 0.3rem 0; +} +.menu-popup .size { + display: block; + padding: 0.3rem 0.7rem 0.1rem; + font-size: 11px; + white-space: pre-line; +} +.menu-head { + display: flex; + flex-direction: column; + padding: 0.4rem 0.7rem; + min-width: 12rem; +} + +/* --- Fenêtres ---------------------------------------------------------------------- */ +.modal-backdrop { + position: fixed; + inset: 0; + z-index: 3000; + display: grid; + place-items: center; + padding: 1rem; + background: rgb(10 14 28 / 0.5); +} +.modal { + width: min(560px, 100%); + max-height: min(86vh, 900px); + overflow: auto; + padding: 1.2rem 1.3rem; + background: var(--panel); + border-radius: 14px; + box-shadow: var(--shadow-lg); +} +.modal.small { + width: min(420px, 100%); +} +.modal.share-dialog { + width: min(680px, 100%); +} +.modal.settings { + width: min(900px, 100%); + height: min(86vh, 760px); + display: flex; + flex-direction: column; + padding: 0; + overflow: hidden; +} +.modal h3 { + margin: 0 0 0.6rem; + font-size: 17px; +} +.modal-actions { + display: flex; + align-items: center; + gap: 0.5rem; + margin-top: 1rem; +} +.modal-text p { + margin: 0; +} +.folders { + list-style: none; + margin: 0.5rem 0; + padding: 0; + max-height: 40vh; + overflow: auto; + border: 1px solid var(--border); + border-radius: var(--radius-sm); +} +.folders button { + width: 100%; + justify-content: flex-start; + border: none; + border-radius: 0; + background: transparent; +} +.folders .folder { + color: var(--folder); + display: inline-flex; +} +.tag-add { + display: flex; + gap: 0.5rem; +} +.tag-add .search { + max-width: none; +} +.suggestions .chip { + background: transparent; + border: 1px dashed var(--border); +} +/* --- Connexion ------------------------------------------------------------------------------- */ +.login { + min-height: 100%; + display: grid; + place-items: center; + padding: 1.5rem; + overflow: auto; + background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent), var(--bg); +} +.login-card { + width: min(400px, 100%); + padding: 1.6rem; + background: var(--panel); + border: 1px solid var(--border); + border-radius: 16px; + box-shadow: var(--shadow-lg); +} +.login-brand { + text-align: center; + margin-bottom: 1rem; +} +.login-brand svg { + color: var(--accent); +} +.login-brand .logo { + width: 56px; + height: 56px; +} +.login-brand h1 { + margin: 0.4rem 0 0.1rem; + font-size: 22px; +} +.login-brand p { + margin: 0; +} +.or { + display: flex; + align-items: center; + gap: 0.8rem; + margin: 1rem 0; + color: var(--muted); + font-size: 12px; +} +.or::before, +.or::after { + content: ""; + flex: 1; + height: 1px; + background: var(--border); +} +.login-card .ex-btn.big { + width: 100%; +} + + +/* --- Garage UI : pages d'administration ------------------------------------------------------ */ +a.nav-item { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0 0.75rem; + border-radius: var(--radius); + text-decoration: none; + font-weight: 500; +} +a.nav-item:hover { + background: var(--hover); +} +a.nav-item.on:hover { + background: var(--accent-soft); +} +.layout { + grid-template-columns: var(--sidebar-w) minmax(0, 1fr); +} +.sidebar { + border-right: 1px solid var(--border); +} +.main { + overflow: auto; +} +.page { + max-width: 1180px; + padding: 1.2rem 1.6rem 3rem; +} +.page-head { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 0.5rem; + margin-bottom: 1rem; +} +.page-head h2 { + margin: 0; + font-size: 22px; + overflow-wrap: anywhere; +} +.page-head .back { + font-size: 12px; + color: var(--muted); + text-decoration: none; +} +.page-head .back:hover { + color: var(--accent); +} +.page-head input[type="search"] { + width: 14rem; +} +.row { + display: flex; + align-items: center; + gap: 0.5rem; + min-width: 0; +} +.cards { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); + gap: 0.8rem; + margin-bottom: 1.2rem; +} +.card, +.panel { + background: var(--panel); + border: 1px solid var(--border); + border-radius: var(--radius); + box-shadow: var(--shadow); +} +.card { + display: flex; + flex-direction: column; + gap: 0.15rem; + padding: 0.85rem 1rem; + min-width: 0; +} +.card .k { + font-size: 12px; + font-weight: 600; + color: var(--muted); +} +.card .v { + font-size: 24px; + line-height: 1.3; +} +.card .v.row { + font-size: 15px; +} +.panel { + padding: 1rem 1.2rem; + margin-bottom: 1.2rem; + min-width: 0; +} +.panel h3 { + margin: 0 0 0.7rem; + font-size: 15px; + display: flex; + align-items: center; + gap: 0.5rem; +} +.cols { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); + gap: 1.2rem; + align-items: start; +} +ul.plain { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 0.9rem; +} +ul.plain .row { + margin-bottom: 0.3rem; +} +.table-wrap { + overflow-x: auto; + background: var(--panel); + border: 1px solid var(--border); + border-radius: var(--radius); +} +.panel .table-wrap { + border: none; + background: none; +} +.table { + width: 100%; + border-collapse: collapse; +} +.table th, +.table td { + padding: 0.6rem 0.8rem; + text-align: left; + vertical-align: middle; + border-bottom: 1px solid var(--border); +} +.table th { + font-size: 12px; + font-weight: 600; + color: var(--muted); + white-space: nowrap; +} +.table tbody tr:last-child td { + border-bottom: none; +} +.table .num { + text-align: right; + font-variant-numeric: tabular-nums; + white-space: nowrap; +} +.table .c { + text-align: center; +} +.table tr.click { + cursor: pointer; +} +.table tr.click:hover { + background: var(--hover); +} +.table .name { + display: inline-flex; + align-items: center; + gap: 0.4rem; + font-weight: 600; + color: var(--fg); + text-decoration: none; +} +.table .name svg { + color: var(--accent); +} +.table .quota { + min-width: 8rem; +} +.table .actions-cell { + white-space: nowrap; + text-align: right; +} +.mono, +input.mono { + font-family: var(--mono); + font-size: 12.5px; +} +.status { + display: inline-flex; + align-items: center; + gap: 0.3rem; + padding: 0.1rem 0.55rem; + margin-right: 0.3rem; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + background: var(--panel-2); + color: var(--muted); +} +.status::before { + content: ""; + width: 7px; + height: 7px; + border-radius: 50%; + background: currentColor; +} +.status.ok { + color: var(--ok); +} +.status.warn { + color: var(--warn); +} +.status.bad { + color: var(--danger); + background: var(--danger-soft); +} +.bar span.warn { + background: var(--warn); +} +.chips { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + margin-bottom: 0.5rem; +} +.notice.staged { + border: 1px solid var(--warn); + margin-bottom: 1rem; +} +pre.out { + margin: 0; + padding: 0.7rem 0.9rem; + max-height: 22rem; + overflow: auto; + background: var(--panel-2); + border-radius: var(--radius-sm); + font-size: 12.5px; + white-space: pre-wrap; + word-break: break-all; +} +.console-page { + display: flex; + flex-direction: column; + height: 100%; + max-width: none; +} +.console { + flex: 1; + min-height: 12rem; + overflow: auto; + margin-top: 0.6rem; + padding: 0.8rem 1rem; + background: var(--panel-2); + border: 1px solid var(--border); + border-radius: var(--radius); + font-family: var(--mono); + font-size: 12.5px; +} +.console .entry { + margin-bottom: 1rem; +} +.console pre { + margin: 0.3rem 0 0; + white-space: pre-wrap; + word-break: break-all; + font-size: inherit; +} +.prompt { + color: var(--accent); + font-family: var(--mono); + font-weight: 700; + white-space: nowrap; +} +.console-input { + align-items: center; +} +.console-input input { + font-family: var(--mono); +} +.page .login-card { + margin: 0 auto; +} + +@media (max-width: 860px) { + .brand span { + display: none; + } + .layout { + grid-template-columns: minmax(0, 1fr); + } + .menu-btn-inline { + display: inline-flex; + } + .sidebar { + position: fixed; + z-index: 2600; + top: var(--topbar-h); + bottom: 0; + left: 0; + width: min(280px, 82vw); + transform: translateX(-100%); + transition: transform 0.2s; + box-shadow: var(--shadow-lg); + } + .sidebar.open { + transform: none; + } + .scrim { + display: block; + position: fixed; + inset: var(--topbar-h) 0 0 0; + z-index: 2550; + background: rgb(10 14 28 / 0.45); + } + .page { + padding: 0.9rem 0.8rem 3rem; + } + .grid2 { + grid-template-columns: 1fr; + } + .page-head input[type="search"] { + width: 100%; + order: 5; + } +} +@media (min-width: 861px) { + .menu-btn-inline { + display: none; + } +} +.status { + white-space: nowrap; +} +.panel > .bar { + margin-bottom: 0.8rem; +} diff --git a/frontend/src/ui.tsx b/frontend/src/ui.tsx new file mode 100644 index 0000000..a44728f --- /dev/null +++ b/frontend/src/ui.tsx @@ -0,0 +1,232 @@ +import { createContext, useCallback, useContext, useEffect, useRef, useState, type ReactNode } from "react"; +import { errMsg } from "./api"; +import { CheckIcon, CopyIcon } from "./icons"; + +// --- Chargement de données --------------------------------------------------------- + +export function useLoad(fn: () => Promise, deps: unknown[] = []) { + const [state, setState] = useState<{ data?: T; error?: string; loading: boolean }>({ loading: true }); + const [n, setN] = useState(0); + const fnRef = useRef(fn); + fnRef.current = fn; + useEffect(() => { + let live = true; + setState((s) => ({ ...s, loading: true })); + fnRef.current().then( + (data) => live && setState({ data, loading: false }), + (e) => live && setState({ error: errMsg(e), loading: false }), + ); + return () => { + live = false; + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [...deps, n]); + const reload = useCallback(() => setN((x) => x + 1), []); + return { ...state, reload }; +} + +// --- Messages ------------------------------------------------------------------------ + +type Notify = (msg: string, kind?: "error" | "ok") => void; +const ToastCtx = createContext(() => {}); +export const useNotify = () => useContext(ToastCtx); + +export function ToastProvider({ children }: { children: ReactNode }) { + const [toast, setToast] = useState<{ msg: string; kind: "error" | "ok" } | null>(null); + const timer = useRef(0); + const notify = useCallback((msg, kind = "error") => { + setToast({ msg, kind }); + window.clearTimeout(timer.current); + timer.current = window.setTimeout(() => setToast(null), kind === "error" ? 9000 : 3500); + }, []); + return ( + + {children} + {toast && ( +
setToast(null)}> + {toast.msg} +
+ )} +
+ ); +} + +/** Exécute une action : l'erreur éventuelle s'affiche en bandeau ; renvoie true si elle a réussi. */ +export function useAct() { + const notify = useNotify(); + return useCallback( + async (fn: () => Promise, okMsg?: string) => { + try { + await fn(); + if (okMsg) notify(okMsg, "ok"); + return true; + } catch (e) { + notify(errMsg(e)); + return false; + } + }, + [notify], + ); +} + +// --- Composants --------------------------------------------------------------------- + +export function Modal({ title, onClose, children, small }: { title: string; onClose: () => void; children: ReactNode; small?: boolean }) { + useEffect(() => { + const onKey = (e: KeyboardEvent) => e.key === "Escape" && onClose(); + window.addEventListener("keydown", onKey); + return () => window.removeEventListener("keydown", onKey); + }, [onClose]); + return ( +
e.target === e.currentTarget && onClose()}> +
+

{title}

+ {children} +
+
+ ); +} + +export function Confirm({ + title, + message, + confirmLabel = "Confirmer", + requireText, + danger = true, + onConfirm, + onClose, +}: { + title: string; + message: ReactNode; + confirmLabel?: string; + /** Texte à retaper pour valider (suppressions). */ + requireText?: string; + danger?: boolean; + onConfirm: () => Promise | void; + onClose: () => void; +}) { + const [typed, setTyped] = useState(""); + const [busy, setBusy] = useState(false); + const ok = !requireText || typed === requireText; + return ( + +
{message}
+ {requireText && ( + + )} +
+ + + +
+
+ ); +} + +export async function copyText(text: string) { + try { + await navigator.clipboard.writeText(text); + } catch { + const t = document.createElement("textarea"); + t.value = text; + t.style.position = "fixed"; + t.style.opacity = "0"; + document.body.appendChild(t); + t.select(); + document.execCommand("copy"); + t.remove(); + } +} + +export function CopyButton({ text, label }: { text: string; label?: string }) { + const [done, setDone] = useState(false); + return ( + + ); +} + +/** Identifiant technique : tronqué à l'affichage, complet au survol et à la copie. */ +export function Mono({ value, short = 12 }: { value: string; short?: number }) { + return ( + + {value.length > short + 1 ? value.slice(0, short) + "…" : value} + + ); +} + +export function Status({ kind, children }: { kind: "ok" | "warn" | "bad" | "off"; children: ReactNode }) { + return {children}; +} + +export function UsageBar({ used, total, warn = 80 }: { used: number; total: number; warn?: number }) { + const pct = total > 0 ? Math.min(100, Math.round((used / total) * 100)) : 0; + return ( +
+ = 90 ? "err" : pct >= warn ? "warn" : ""} /> +
+ ); +} + +export function PageHead({ title, children, back }: { title: ReactNode; children?: ReactNode; back?: { href: string; label: string } }) { + return ( +
+
+ {back && ( + + ← {back.label} + + )} +

{title}

+
+ {children} +
+ ); +} + +export function Loading({ loading, error, onRetry }: { loading: boolean; error?: string; onRetry?: () => void }) { + if (error) + return ( +
+ {error} + {onRetry && ( + <> + {" "} + + + )} +
+ ); + return loading ?

Chargement…

: null; +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..b5318a6 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "moduleResolution": "Bundler", + "jsx": "react-jsx", + "strict": true, + "skipLibCheck": true, + "noEmit": true, + "isolatedModules": true, + "allowImportingTsExtensions": false, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": ["src"] +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 0000000..9b13907 --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], + // Le build est embarqué dans le binaire Go (web/dist). + build: { outDir: "../web/dist", emptyOutDir: true }, + // `npm run dev` : le serveur Go tourne sur :8080. + server: { proxy: { "/api": "http://localhost:8080" } }, +}); diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d76342f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/vLab-BZH/garage-ui + +go 1.24.7 diff --git a/web/embed.go b/web/embed.go new file mode 100644 index 0000000..2cd76c2 --- /dev/null +++ b/web/embed.go @@ -0,0 +1,10 @@ +// Package web embarque le frontend compilé (frontend/ -> web/dist) dans le binaire. +package web + +import "embed" + +// Dist contient le build Vite. En développement, dist/ peut ne contenir que +// .gitkeep : le serveur affiche alors un message invitant à lancer le build. +// +//go:embed all:dist +var Dist embed.FS