Compare commits
8 Commits
50c0033f2f
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d7f7df2c4 | ||
|
|
191fe49c64 | ||
|
|
cc6a1a4c6a | ||
|
|
0338188e94 | ||
|
|
a60d309a66 | ||
|
|
203a5c0e2e | ||
|
|
cb50ade88f | ||
|
|
984a2e95ca |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
181
.github/dependabot.yml
vendored
@@ -4,135 +4,40 @@
|
||||
# Strategy:
|
||||
# - Weekly checks for faster vulnerability detection
|
||||
# - Separate patch/minor/major updates to prevent blocking
|
||||
# - Group by crate (game vs server) for easier review
|
||||
# - Auto-merge patches via GitHub branch protection rules
|
||||
# - Limit concurrent PRs to avoid spam
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
# Game: Patch updates (auto-mergeable)
|
||||
# Cargo workspace (all Rust crates)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
game-patches:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "patch"
|
||||
ignore:
|
||||
# Bevy ECS 0.17+ requires API migration - ignore until manual update
|
||||
# Bevy ECS 0.17+ requires API migration
|
||||
- dependency-name: "bevy_ecs"
|
||||
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:patch"
|
||||
- "game"
|
||||
|
||||
# Game: Minor updates (grouped, manual review)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
game-minor:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "minor"
|
||||
ignore:
|
||||
- dependency-name: "bevy_ecs"
|
||||
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:minor"
|
||||
- "game"
|
||||
|
||||
# Game: Major updates (separate PRs, manual review)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
game-major:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "major"
|
||||
ignore:
|
||||
- dependency-name: "bevy_ecs"
|
||||
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:major"
|
||||
- "game"
|
||||
|
||||
# Server: Patch updates (auto-mergeable)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman-server"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
server-patches:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "patch"
|
||||
ignore:
|
||||
# jsonwebtoken 10+ requires crypto backend feature flag - ignore until manual migration
|
||||
# jsonwebtoken 10+ requires crypto backend feature flag
|
||||
- dependency-name: "jsonwebtoken"
|
||||
versions: ["10.x", "11.x"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:patch"
|
||||
- "server"
|
||||
|
||||
# Server: Minor updates (grouped, manual review)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman-server"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
server-minor:
|
||||
rust-patches:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "minor"
|
||||
ignore:
|
||||
- dependency-name: "jsonwebtoken"
|
||||
versions: ["10.x", "11.x"]
|
||||
update-types: ["patch"]
|
||||
rust-minor:
|
||||
applies-to: "version-updates"
|
||||
update-types: ["minor"]
|
||||
rust-major:
|
||||
applies-to: "version-updates"
|
||||
update-types: ["major"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:minor"
|
||||
- "server"
|
||||
- "rust"
|
||||
|
||||
# Server: Major updates (separate PRs, manual review)
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/pacman-server"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
server-major:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "major"
|
||||
ignore:
|
||||
- dependency-name: "jsonwebtoken"
|
||||
versions: ["10.x", "11.x"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:major"
|
||||
- "server"
|
||||
|
||||
# Frontend: Patch updates (auto-mergeable)
|
||||
# Frontend (web/)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/web"
|
||||
schedule:
|
||||
@@ -142,65 +47,21 @@ updates:
|
||||
groups:
|
||||
frontend-patches:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "patch"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:patch"
|
||||
- "frontend"
|
||||
|
||||
# Frontend: Minor updates (grouped, manual review)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/web"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
update-types: ["patch"]
|
||||
frontend-minor:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "minor"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:minor"
|
||||
- "frontend"
|
||||
|
||||
# Frontend: Major updates (separate PRs for critical deps)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/web"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
update-types: ["minor"]
|
||||
frontend-major-framework:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "major"
|
||||
update-types: ["major"]
|
||||
patterns:
|
||||
- "react"
|
||||
- "react-dom"
|
||||
- "vike"
|
||||
- "vite"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:major"
|
||||
- "frontend"
|
||||
- "framework"
|
||||
|
||||
# Frontend: Other major updates (grouped)
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/web"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
frontend-major-other:
|
||||
applies-to: "version-updates"
|
||||
update-types:
|
||||
- "major"
|
||||
update-types: ["major"]
|
||||
exclude-patterns:
|
||||
- "react"
|
||||
- "react-dom"
|
||||
@@ -208,10 +69,9 @@ updates:
|
||||
- "vite"
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "dependencies:major"
|
||||
- "frontend"
|
||||
|
||||
# GitHub Actions: All updates grouped (low risk)
|
||||
# GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
@@ -220,8 +80,7 @@ updates:
|
||||
open-pull-requests-limit: 5
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
patterns: ["*"]
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "github-actions"
|
||||
|
||||
2
.github/workflows/build.yaml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Rust Toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
|
||||
2
.github/workflows/checks.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
|
||||
11
.github/workflows/coverage.yaml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
@@ -56,7 +56,16 @@ jobs:
|
||||
just coverage
|
||||
working-directory: pacman
|
||||
|
||||
- name: Check Coveralls Token
|
||||
run: |
|
||||
if [ -z "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
|
||||
echo "::warning::COVERALLS_REPO_TOKEN not available - coverage upload skipped (common for Dependabot PRs)"
|
||||
else
|
||||
echo "COVERALLS_REPO_TOKEN is available - will upload coverage"
|
||||
fi
|
||||
|
||||
- name: Coveralls upload
|
||||
if: ${{ secrets.COVERALLS_REPO_TOKEN != '' }}
|
||||
uses: coverallsapp/github-action@v2
|
||||
with:
|
||||
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
|
||||
11
.github/workflows/deploy.yaml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
digest: ${{ steps.docker_build.outputs.digest }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Emscripten SDK
|
||||
uses: pyodide/setup-emsdk@v15
|
||||
@@ -132,8 +132,17 @@ jobs:
|
||||
env:
|
||||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
||||
steps:
|
||||
- name: Check Railway Token
|
||||
run: |
|
||||
if [ -z "$RAILWAY_TOKEN" ]; then
|
||||
echo "::warning::RAILWAY_TOKEN not available - deployment skipped (common for Dependabot PRs)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Generate proxy Dockerfile
|
||||
if: env.RAILWAY_TOKEN != ''
|
||||
run: echo "FROM ghcr.io/xevion/pac-man@${{ needs.build-and-deploy.outputs.digest }}" > Dockerfile
|
||||
|
||||
- name: Deploy to Railway
|
||||
if: env.RAILWAY_TOKEN != ''
|
||||
run: railway up --service pac-man
|
||||
|
||||
2
.github/workflows/tests.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
|
||||
447
Cargo.lock
generated
2
Justfile
@@ -52,7 +52,7 @@ push:
|
||||
|
||||
# Create a postgres container for the server
|
||||
server-postgres:
|
||||
bun run .scripts/postgres.ts
|
||||
bun run pacman-server/scripts/postgres.ts
|
||||
|
||||
# Build the server image
|
||||
server-image:
|
||||
|
||||
10
README.md
@@ -2,7 +2,7 @@
|
||||
<!-- markdownlint-disable MD041 -->
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/banner.png" alt="Pac-Man Banner Screenshot">
|
||||
<img src=".github/assets/banner.png" alt="Pac-Man Banner Screenshot">
|
||||
</div>
|
||||
|
||||
# Pac-Man
|
||||
@@ -49,16 +49,16 @@ However, every commit has build artifacts, so you can grab the [latest build art
|
||||
## Screenshots
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/screenshots/0.png" alt="Screenshot 0 - Starting Game">
|
||||
<img src=".github/assets/screenshots/0.png" alt="Screenshot 0 - Starting Game">
|
||||
<p><em>Starting a new game</em></p>
|
||||
|
||||
<img src="assets/screenshots/1.png" alt="Screenshot 1 - Eating Dots">
|
||||
<img src=".github/assets/screenshots/1.png" alt="Screenshot 1 - Eating Dots">
|
||||
<p><em>Pac-Man collecting dots and avoiding ghosts</em></p>
|
||||
|
||||
<img src="assets/screenshots/2.png" alt="Screenshot 2 - Game Over">
|
||||
<img src=".github/assets/screenshots/2.png" alt="Screenshot 2 - Game Over">
|
||||
<p><em>Game over screen after losing all lives</em></p>
|
||||
|
||||
<img src="assets/screenshots/3.png" alt="Screenshot 3 - Debug Mode">
|
||||
<img src=".github/assets/screenshots/3.png" alt="Screenshot 3 - Debug Mode">
|
||||
<p><em>Debug mode showing hitboxes, node graph, and performance details.</em></p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ dashmap = "6.1"
|
||||
axum-cookie = "0.2"
|
||||
async-trait = "0.1"
|
||||
jsonwebtoken = { version = "9.3", default-features = false }
|
||||
tracing = "0.1.41"
|
||||
tracing-subscriber = { version = "0.3.20", features = ["env-filter", "json"] }
|
||||
tracing = "0.1.43"
|
||||
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }
|
||||
tracing-futures = { version = "0.2.5", features = ["tokio"] }
|
||||
tower-http = { version = "0.6", features = ["trace", "fs", "normalize-path"] }
|
||||
time = { version = "0.3", features = ["macros", "formatting"] }
|
||||
@@ -51,7 +51,7 @@ s3-tokio = { version = "0.39.6", default-features = false }
|
||||
rustls = { version = "0.23", features = ["ring"] }
|
||||
image = { version = "0.25", features = ["png", "jpeg"] }
|
||||
sha2 = "0.10"
|
||||
mockall = "0.13.1"
|
||||
mockall = "0.14.0"
|
||||
# validator = { version = "0.16", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -19,19 +19,19 @@ default-run = "pacman"
|
||||
|
||||
[dependencies]
|
||||
bevy_ecs = "0.16.1"
|
||||
glam = "0.30.5"
|
||||
glam = "0.30.9"
|
||||
pathfinding = "4.14"
|
||||
tracing = { version = "0.1.41", features = ["max_level_trace", "release_max_level_debug"]}
|
||||
tracing = { version = "0.1.43", features = ["max_level_trace", "release_max_level_debug"]}
|
||||
tracing-error = "0.2.0"
|
||||
tracing-subscriber = {version = "0.3.20", features = ["env-filter"]}
|
||||
time = { version = "0.3.43", features = ["formatting", "macros"] }
|
||||
thiserror = "2.0.16"
|
||||
tracing-subscriber = {version = "0.3.22", features = ["env-filter"]}
|
||||
time = { version = "0.3.44", features = ["formatting", "macros"] }
|
||||
thiserror = "2.0.17"
|
||||
anyhow = "1.0"
|
||||
smallvec = "1.15.1"
|
||||
bitflags = "2.9.4"
|
||||
micromap = "0.1.0"
|
||||
circular-buffer = "=1.1.0"
|
||||
parking_lot = "0.12.3"
|
||||
parking_lot = "0.12.5"
|
||||
strum = "0.27.2"
|
||||
strum_macros = "0.27.2"
|
||||
thousands = "0.2.0"
|
||||
@@ -42,8 +42,8 @@ phf = { version = "0.13.1", features = ["macros"] }
|
||||
# Windows-specific dependencies
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
# Used for customizing console output on Windows; both are required due to the `windows` crate having poor Result handling with `GetStdHandle`.
|
||||
windows = { version = "0.62.0", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console"] }
|
||||
windows-sys = { version = "0.61.0", features = ["Win32_System_Console"] }
|
||||
windows = { version = "0.62.1", features = ["Win32_Security", "Win32_Storage_FileSystem", "Win32_System_Console"] }
|
||||
windows-sys = { version = "0.61.2", features = ["Win32_System_Console"] }
|
||||
|
||||
# Desktop-specific dependencies
|
||||
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
|
||||
@@ -59,7 +59,7 @@ spin_sleep = "1.3.3"
|
||||
sdl2 = { version = "0.38", default-features = false, features = ["image", "ttf", "gfx", "mixer", "unsafe_textures"] }
|
||||
# TODO: Document why Emscripten cannot use `os_rng`.
|
||||
rand = { version = "0.9.2", default-features = false, features = ["small_rng", "os_rng"] }
|
||||
libc = "0.2.175" # TODO: Describe why this is required.
|
||||
libc = "0.2.177" # TODO: Describe why this is required.
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.4.1"
|
||||
@@ -67,7 +67,7 @@ speculoos = "0.13.0"
|
||||
|
||||
[build-dependencies]
|
||||
phf = { version = "0.13.1", features = ["macros"] }
|
||||
serde = { version = "1.0.225", features = ["derive"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = "1.0.145"
|
||||
|
||||
# phf generates runtime code which machete will not detect
|
||||
|
||||
13
web/bun.lock
@@ -9,7 +9,6 @@
|
||||
"@tabler/icons-react": "^3.35.0",
|
||||
"@vitejs/plugin-react": "^5.0.2",
|
||||
"react": "^19.1.1",
|
||||
"react-animated-numbers": "^1.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"vike": "^0.4.240",
|
||||
"vike-react": "^0.6.5",
|
||||
@@ -465,8 +464,6 @@
|
||||
|
||||
"for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="],
|
||||
|
||||
"framer-motion": ["framer-motion@11.18.2", "", { "dependencies": { "motion-dom": "^11.18.1", "motion-utils": "^11.18.1", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w=="],
|
||||
|
||||
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||
|
||||
"function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
|
||||
@@ -641,12 +638,6 @@
|
||||
|
||||
"minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
||||
|
||||
"motion": ["motion@11.18.2", "", { "dependencies": { "framer-motion": "^11.18.2", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-JLjvFDuFr42NFtcVoMAyC2sEjnpA8xpy6qWPyzQvCloznAyQ8FIXioxWfHiLtgYhoVpfUqSWpn1h9++skj9+Wg=="],
|
||||
|
||||
"motion-dom": ["motion-dom@11.18.1", "", { "dependencies": { "motion-utils": "^11.18.1" } }, "sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw=="],
|
||||
|
||||
"motion-utils": ["motion-utils@11.18.1", "", {}, "sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA=="],
|
||||
|
||||
"mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="],
|
||||
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
@@ -711,8 +702,6 @@
|
||||
|
||||
"react": ["react@19.2.0", "", {}, "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ=="],
|
||||
|
||||
"react-animated-numbers": ["react-animated-numbers@1.1.1", "", { "dependencies": { "motion": "^11.16.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-Jr2vbDWjo5wW+X8wBYRBACpuKdPkLa4A2ZYfxlAR0oc/gXWVeWyAmAWzZj73276IQxycxrTL7aGn4quWV7+l2Q=="],
|
||||
|
||||
"react-dom": ["react-dom@19.2.0", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.0" } }, "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ=="],
|
||||
|
||||
"react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],
|
||||
@@ -803,8 +792,6 @@
|
||||
|
||||
"ts-api-utils": ["ts-api-utils@2.1.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
||||
|
||||
"typed-array-buffer": ["typed-array-buffer@1.0.3", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-typed-array": "^1.1.14" } }, "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw=="],
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"@tabler/icons-react": "^3.35.0",
|
||||
"@vitejs/plugin-react": "^5.0.2",
|
||||
"react": "^19.1.1",
|
||||
"react-animated-numbers": "^1.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"vike": "^0.4.240",
|
||||
"vike-react": "^0.6.5"
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { IconTrophy, IconCalendar } from "@tabler/icons-react";
|
||||
import { clientOnly } from "vike-react/clientOnly";
|
||||
|
||||
const AnimatedNumbers = clientOnly(() => import("react-animated-numbers"));
|
||||
|
||||
interface LeaderboardEntry {
|
||||
id: number;
|
||||
@@ -238,15 +235,7 @@ function LeaderboardTable({ data }: { data: LeaderboardEntry[] }) {
|
||||
</td>
|
||||
<td className="py-2">
|
||||
<span className="text-yellow-300 font-[600] text-lg">
|
||||
<AnimatedNumbers
|
||||
fallback={<span className="text-transparent">{entry.score.toLocaleString()}</span>}
|
||||
useThousandsSeparator
|
||||
transitions={(digitIndex) => ({
|
||||
type: "easeIn",
|
||||
duration: 0.75 + digitIndex * 0.25 + entryIndex * 0.2,
|
||||
})}
|
||||
animateToNumber={entry.score}
|
||||
/>
|
||||
{entry.score.toLocaleString()}
|
||||
</span>
|
||||
</td>
|
||||
<td className="py-2">
|
||||
|
||||
6
web/pages/leaderboard/+config.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { Config } from "vike/types";
|
||||
|
||||
export default {
|
||||
prerender: true, // Generate static HTML for deployment
|
||||
ssr: false, // Force client-side only rendering
|
||||
} satisfies Config;
|
||||