chore : bump all packages versions
This commit is contained in:
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
@@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
const { PHASE_PRODUCTION_BUILD } = require("next/constants");
|
|
||||||
|
|
||||||
const nextConfig = (phase) =>
|
|
||||||
/** @type {import('next').NextConfig} */ ({
|
|
||||||
output: phase === PHASE_PRODUCTION_BUILD ? "export" : undefined,
|
|
||||||
trailingSlash: false,
|
|
||||||
reactStrictMode: true,
|
|
||||||
images: {
|
|
||||||
unoptimized: true,
|
|
||||||
},
|
|
||||||
headers:
|
|
||||||
phase === PHASE_PRODUCTION_BUILD
|
|
||||||
? undefined
|
|
||||||
: () => [
|
|
||||||
{
|
|
||||||
source: "/",
|
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Embedder-Policy",
|
|
||||||
value: "require-corp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Opener-Policy",
|
|
||||||
value: "same-origin",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: "/engines/:blob*",
|
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Embedder-Policy",
|
|
||||||
value: "require-corp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Opener-Policy",
|
|
||||||
value: "same-origin",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: "/play",
|
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Embedder-Policy",
|
|
||||||
value: "require-corp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Opener-Policy",
|
|
||||||
value: "same-origin",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
source: "/database",
|
|
||||||
headers: [
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Embedder-Policy",
|
|
||||||
value: "require-corp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "Cross-Origin-Opener-Policy",
|
|
||||||
value: "same-origin",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = nextConfig;
|
|
||||||
70
next.config.ts
Normal file
70
next.config.ts
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
import { NextConfig } from "next";
|
||||||
|
import { PHASE_PRODUCTION_BUILD } from "next/constants";
|
||||||
|
|
||||||
|
const nextConfig = (phase: string): NextConfig => ({
|
||||||
|
output: phase === PHASE_PRODUCTION_BUILD ? "export" : undefined,
|
||||||
|
trailingSlash: false,
|
||||||
|
reactStrictMode: true,
|
||||||
|
images: {
|
||||||
|
unoptimized: true,
|
||||||
|
},
|
||||||
|
headers:
|
||||||
|
phase === PHASE_PRODUCTION_BUILD
|
||||||
|
? undefined
|
||||||
|
: async () => [
|
||||||
|
{
|
||||||
|
source: "/",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Embedder-Policy",
|
||||||
|
value: "require-corp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Opener-Policy",
|
||||||
|
value: "same-origin",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/engines/:blob*",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Embedder-Policy",
|
||||||
|
value: "require-corp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Opener-Policy",
|
||||||
|
value: "same-origin",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/play",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Embedder-Policy",
|
||||||
|
value: "require-corp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Opener-Policy",
|
||||||
|
value: "same-origin",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/database",
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Embedder-Policy",
|
||||||
|
value: "require-corp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "Cross-Origin-Opener-Policy",
|
||||||
|
value: "same-origin",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
export default nextConfig;
|
||||||
3048
package-lock.json
generated
3048
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
48
package.json
48
package.json
@@ -4,41 +4,41 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev --turbo",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint && tsc --noEmit",
|
"lint": "next lint && tsc --noEmit",
|
||||||
"deploy": "firebase deploy --project=freechessproject --only hosting"
|
"deploy": "firebase deploy --project=freechessproject --only hosting"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.14.0",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.14.0",
|
||||||
"@fontsource/roboto": "^5.0.3",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@iconify/react": "^4.1.0",
|
"@iconify/react": "^5.1.0",
|
||||||
"@mui/lab": "^5.0.0-alpha.165",
|
"@mui/lab": "^6.0.0-beta.21",
|
||||||
"@mui/material": "^5.13.4",
|
"@mui/material": "^6.3.0",
|
||||||
"@mui/x-data-grid": "^6.19.4",
|
"@mui/x-data-grid": "^7.23.5",
|
||||||
"chess.js": "^1.0.0-beta.7",
|
"chess.js": "^1.0.0-beta.8",
|
||||||
"firebase": "^10.6.0",
|
"firebase": "^11.1.0",
|
||||||
"idb": "^8.0.0",
|
"idb": "^8.0.1",
|
||||||
"jotai": "^2.6.4",
|
"jotai": "^2.11.0",
|
||||||
"next": "14.2.5",
|
"next": "15.1.3",
|
||||||
"react": "18.2.0",
|
"react": "18.3.1",
|
||||||
"react-chessboard": "^4.6.0",
|
"react-chessboard": "^4.7.2",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.3.1",
|
||||||
"recharts": "^2.12.7"
|
"recharts": "^2.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "20.3.0",
|
"@types/node": "^22.10.2",
|
||||||
"@types/react": "18.2.11",
|
"@types/react": "18.2.11",
|
||||||
"@types/react-dom": "18.2.4",
|
"@types/react-dom": "^18.3.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.11",
|
"@typescript-eslint/eslint-plugin": "^8.18.2",
|
||||||
"@typescript-eslint/parser": "^5.59.11",
|
"@typescript-eslint/parser": "^8.18.2",
|
||||||
"eslint": "8.42.0",
|
"eslint": "^8.57.1",
|
||||||
"eslint-config-next": "13.4.5",
|
"eslint-config-next": "^13.4.5",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"typescript": "5.1.3"
|
"typescript": "^5.7.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
|
|||||||
export const useScreenSize = () => {
|
export const useScreenSize = () => {
|
||||||
const [screenSize, setScreenSize] = useState({
|
const [screenSize, setScreenSize] = useState({
|
||||||
width: document?.querySelector(".MuiGrid-root")?.clientWidth ?? 500,
|
width: document?.querySelector(".MuiGrid-root")?.clientWidth ?? 500,
|
||||||
height: window?.innerHeight - 120 ?? 500,
|
height: window ? window.innerHeight - 120 : 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export const moveLineUciToSan = (
|
|||||||
try {
|
try {
|
||||||
const move = game.move(uciMoveParams(moveUci));
|
const move = game.move(uciMoveParams(moveUci));
|
||||||
return move.san;
|
return move.san;
|
||||||
} catch (e) {
|
} catch {
|
||||||
return moveUci;
|
return moveUci;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,10 +65,8 @@ export default function GameDatabase() {
|
|||||||
width: 200,
|
width: 200,
|
||||||
headerAlign: "center",
|
headerAlign: "center",
|
||||||
align: "center",
|
align: "center",
|
||||||
valueGetter: (params) =>
|
valueGetter: (_, row) =>
|
||||||
`${params.row.white.name ?? "Unknown"} (${
|
`${row.white.name ?? "Unknown"} (${row.white.rating ?? "?"})`,
|
||||||
params.row.white.rating ?? "?"
|
|
||||||
})`,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "result",
|
field: "result",
|
||||||
@@ -83,10 +81,8 @@ export default function GameDatabase() {
|
|||||||
width: 200,
|
width: 200,
|
||||||
headerAlign: "center",
|
headerAlign: "center",
|
||||||
align: "center",
|
align: "center",
|
||||||
valueGetter: (params) =>
|
valueGetter: (_, row) =>
|
||||||
`${params.row.black.name ?? "Unknown"} (${
|
`${row.black.name ?? "Unknown"} (${row.black.rating ?? "?"})`,
|
||||||
params.row.black.rating ?? "?"
|
|
||||||
})`,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "eval",
|
field: "eval",
|
||||||
@@ -95,7 +91,7 @@ export default function GameDatabase() {
|
|||||||
headerAlign: "center",
|
headerAlign: "center",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
valueGetter: (params) => !!params.row.eval,
|
valueGetter: (_, row) => !!row.eval,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "openEvaluation",
|
field: "openEvaluation",
|
||||||
@@ -169,7 +165,6 @@ export default function GameDatabase() {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
disableColumnMenu
|
disableColumnMenu
|
||||||
hideFooter={true}
|
hideFooter={true}
|
||||||
autoHeight={true}
|
|
||||||
localeText={gridLocaleText}
|
localeText={gridLocaleText}
|
||||||
initialState={{
|
initialState={{
|
||||||
sorting: {
|
sorting: {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function GameRecap() {
|
|||||||
if (game.isInsufficientMaterial()) return "Draw by insufficient material";
|
if (game.isInsufficientMaterial()) return "Draw by insufficient material";
|
||||||
if (game.isStalemate()) return "Draw by stalemate";
|
if (game.isStalemate()) return "Draw by stalemate";
|
||||||
if (game.isThreefoldRepetition()) return "Draw by threefold repetition";
|
if (game.isThreefoldRepetition()) return "Draw by threefold repetition";
|
||||||
if (game.isDraw()) "Draw by fifty-move rule";
|
if (game.isDraw()) return "Draw by fifty-move rule";
|
||||||
|
|
||||||
return "You resigned";
|
return "You resigned";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,6 +27,6 @@
|
|||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user