diff --git a/.gitignore b/.gitignore index 6cbd4973..b80c04eb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ dist-ssr !.vscode/extensions.json .claude .DS_Store -.env*.local +.env* .idea .vercel *.njsproj diff --git a/package-lock.json b/package-lock.json index 852a266b..9bc1cb90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,10 +17,10 @@ "@dnd-kit/sortable": "^10.0.0", "@fontsource/figtree": "^5.1.0", "@hookform/resolvers": "^3.9.0", - "@ianpaschal/combat-command-components": "^2.1.1", + "@ianpaschal/combat-command-components": "^2.2.1", "@ianpaschal/combat-command-game-systems": "^1.6.0", "@mapbox/search-js-core": "^1.0.0-beta.25", - "@pdfme/pdf-lib": "^1.17.1", + "@pdfme/pdf-lib": "^6.1.3", "@radix-ui/colors": "^3.0.0", "@react-hook/window-size": "^3.1.1", "@tanstack/react-query": "^5.59.15", @@ -87,7 +87,7 @@ "@types/react-dom": "^18.3.0", "@types/tz-lookup": "^6.1.2", "@vitejs/plugin-react": "^5.0.4", - "@vitest/coverage-v8": "^3.2.4", + "@vitest/coverage-v8": "^4.1.8", "convex-test": "^0.0.36", "eslint": "^9.0.0", "husky": "^9.1.7", @@ -102,7 +102,7 @@ "typescript": "^5.2.2", "typescript-plugin-css-modules": "^5.1.0", "vite": "^7.1.10", - "vitest": "^3.0.9" + "vitest": "^4.1.8" } }, "node_modules/@adobe/css-tools": { @@ -110,18 +110,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@auth/core": { "version": "0.37.4", "license": "ISC", @@ -291,7 +279,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", "dev": true, "license": "MIT", "engines": { @@ -299,7 +289,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", + "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==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -326,11 +318,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.5", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.29.7" }, "bin": { "parser": "bin/babel-parser.js" @@ -407,12 +401,14 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -1449,9 +1445,9 @@ } }, "node_modules/@ianpaschal/combat-command-components": { - "version": "2.1.1", - "resolved": "https://npm.pkg.github.com/download/@ianpaschal/combat-command-components/2.1.1/51557e9072a5ade5fd6b0b9c5422383b1b68cb50", - "integrity": "sha512-4kapO0LhmdwkWw77scwQWror8wrjgojeCcMCljl29OyO6Vi0biBxqOn4ROOpVZ0B5m6RiEkDsuUrg9FK37nVig==", + "version": "2.2.1", + "resolved": "https://npm.pkg.github.com/download/@ianpaschal/combat-command-components/2.2.1/4a796621c71d47b0bd8daa98880a70104a5f3faa", + "integrity": "sha512-IRRQKkv+3q3gcRoZ/QmgkVQkXueS32+hjh8xKlG3GyfvC2cnR6crNRtmgGHoAy0+hpliAE+eBpzWQAPli9v0xA==", "license": "MIT", "dependencies": { "@base-ui/react": "^1.4.1", @@ -1714,14 +1710,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "license": "MIT", @@ -1802,7 +1790,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, @@ -2966,16 +2956,24 @@ } }, "node_modules/@pdfme/pdf-lib": { - "version": "1.18.4", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@pdfme/pdf-lib/-/pdf-lib-6.1.3.tgz", + "integrity": "sha512-eqJ4dlxSfst4VZoU/0/w8sbdi1MZiprT4vVaIp66lL5/sgG2Y4JLJ4toJkq8jQMNUjzMBJvC+mcCFCnA9s/YnQ==", "license": "MIT", "dependencies": { "@pdf-lib/standard-fonts": "^1.0.0", "@pdf-lib/upng": "^1.0.1", - "color": "^4.2.3", - "node-html-better-parser": "^1.4.0", - "pako": "^1.0.11" + "color": "^5.0.3", + "node-html-better-parser": "^1.5.8", + "pako": "^2.1.0" } }, + "node_modules/@pdfme/pdf-lib/node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "license": "MIT", @@ -5076,7 +5074,9 @@ } }, "node_modules/@tootallnate/once": { - "version": "2.0.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "license": "MIT", "engines": { "node": ">= 10" @@ -5154,6 +5154,8 @@ }, "node_modules/@types/chai": { "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { @@ -5163,6 +5165,8 @@ }, "node_modules/@types/deep-eql": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, "license": "MIT" }, @@ -5527,9 +5531,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", "dev": true, "license": "MIT", "dependencies": { @@ -5630,30 +5634,30 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.8.tgz", + "integrity": "sha512-lt3kovsyHwYe00wq4D1ti0Z974fWj4NLp6siqiyEufUpyFwK9Yhi7rBhac9JL5aA0zoMrJqc4vYPZRUnI7l7nw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^1.0.2", - "ast-v8-to-istanbul": "^0.3.3", - "debug": "^4.4.1", + "@vitest/utils": "4.1.8", + "ast-v8-to-istanbul": "^1.0.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.6", - "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.17", - "magicast": "^0.3.5", - "std-env": "^3.9.0", - "test-exclude": "^7.0.1", - "tinyrainbow": "^2.0.0" + "istanbul-reports": "^3.2.0", + "magicast": "^0.5.2", + "obug": "^2.1.1", + "std-env": "^4.0.0-rc.1", + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "3.2.4", - "vitest": "3.2.4" + "@vitest/browser": "4.1.8", + "vitest": "4.1.8" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -5662,35 +5666,47 @@ } }, "node_modules/@vitest/expect": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.8.tgz", + "integrity": "sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==", "dev": true, "license": "MIT", "dependencies": { + "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" + "@vitest/spy": "4.1.8", + "@vitest/utils": "4.1.8", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, + "node_modules/@vitest/expect/node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, "node_modules/@vitest/mocker": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.8.tgz", + "integrity": "sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "3.2.4", + "@vitest/spy": "4.1.8", "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" + "magic-string": "^0.30.21" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "msw": { @@ -5702,36 +5718,42 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz", + "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^2.0.0" + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.8.tgz", + "integrity": "sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" + "@vitest/utils": "4.1.8", + "pathe": "^2.0.3" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/snapshot": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.8.tgz", + "integrity": "sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", + "@vitest/pretty-format": "4.1.8", + "@vitest/utils": "4.1.8", + "magic-string": "^0.30.21", "pathe": "^2.0.3" }, "funding": { @@ -5739,24 +5761,25 @@ } }, "node_modules/@vitest/spy": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.8.tgz", + "integrity": "sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==", "dev": true, "license": "MIT", - "dependencies": { - "tinyspy": "^4.0.3" - }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz", + "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" + "@vitest/pretty-format": "4.1.8", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -6034,6 +6057,8 @@ }, "node_modules/assertion-error": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "license": "MIT", "engines": { @@ -6041,17 +6066,21 @@ } }, "node_modules/ast-v8-to-istanbul": { - "version": "0.3.8", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.3.tgz", + "integrity": "sha512-jCMQ6ZylLPudp0CDfBmQBZUsrh1/8psbmu9ibeVWKuHWD0YrH9YABwlKu5kVEFoT0GCQQW9Z/SxfuEbbkGQCRg==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.31", "estree-walker": "^3.0.3", - "js-tokens": "^9.0.1" + "js-tokens": "^10.0.0" } }, "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { - "version": "9.0.1", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", + "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", "dev": true, "license": "MIT" }, @@ -6200,14 +6229,6 @@ "ieee754": "^1.2.1" } }, - "node_modules/cac": { - "version": "6.7.14", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cacheable": { "version": "1.9.0", "dev": true, @@ -6295,16 +6316,11 @@ "license": "CC-BY-4.0" }, "node_modules/chai": { - "version": "5.3.3", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, "engines": { "node": ">=18" } @@ -6327,14 +6343,6 @@ "version": "5.4.4", "license": "MIT" }, - "node_modules/check-error": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, "node_modules/chokidar": { "version": "4.0.3", "dev": true, @@ -6370,14 +6378,16 @@ } }, "node_modules/color": { - "version": "4.2.3", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/color/-/color-5.0.3.tgz", + "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", "license": "MIT", "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" + "color-convert": "^3.1.3", + "color-string": "^2.1.3" }, "engines": { - "node": ">=12.5.0" + "node": ">=18" } }, "node_modules/color-convert": { @@ -6395,11 +6405,45 @@ "license": "MIT" }, "node_modules/color-string": { - "version": "1.9.1", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.4.tgz", + "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", "license": "MIT", "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/color-string/node_modules/color-name": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.0.tgz", + "integrity": "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg==", + "license": "MIT", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.3.tgz", + "integrity": "sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==", + "license": "MIT", + "dependencies": { + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=14.6" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.0.tgz", + "integrity": "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg==", + "license": "MIT", + "engines": { + "node": ">=12.20" } }, "node_modules/colord": { @@ -6755,14 +6799,6 @@ "version": "10.5.0", "license": "MIT" }, - "node_modules/deep-eql": { - "version": "5.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/deep-is": { "version": "0.1.4", "dev": true, @@ -7155,7 +7191,9 @@ } }, "node_modules/es-module-lexer": { - "version": "1.7.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", + "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, @@ -7613,6 +7651,8 @@ }, "node_modules/estree-walker": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { @@ -7627,7 +7667,9 @@ } }, "node_modules/expect-type": { - "version": "1.2.1", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -7675,7 +7717,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.0.6", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", + "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", "dev": true, "funding": [ { @@ -8887,19 +8931,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-reports": { "version": "3.2.0", "dev": true, @@ -9082,11 +9113,10 @@ } }, "node_modules/js-cookie": { - "version": "3.0.5", - "license": "MIT", - "engines": { - "node": ">=14" - } + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.8.tgz", + "integrity": "sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==", + "license": "MIT" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -9366,11 +9396,6 @@ "loose-envify": "cli.js" } }, - "node_modules/loupe": { - "version": "3.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/lru-cache": { "version": "5.1.1", "dev": true, @@ -9408,21 +9433,25 @@ } }, "node_modules/magic-string": { - "version": "0.30.17", + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/magicast": { - "version": "0.3.5", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.3.tgz", + "integrity": "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.25.4", - "@babel/types": "^7.25.4", - "source-map-js": "^1.2.0" + "@babel/parser": "^7.29.3", + "@babel/types": "^7.29.0", + "source-map-js": "^1.2.1" } }, "node_modules/make-cancellable-promise": { @@ -9919,6 +9948,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/obug": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.2.tgz", + "integrity": "sha512-AWGB9WFcRXOQs48Z/udjI5ZcZMHXwX8XPByNpOydgcGsDLIzjGizhoMWJyKAWze7AVW/2W1i+/gPX4YtKe5cyg==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/once": { "version": "1.4.0", "dev": true, @@ -10122,17 +10165,11 @@ }, "node_modules/pathe": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, - "node_modules/pathval": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, "node_modules/pdfjs-dist": { "version": "5.4.624", "license": "Apache-2.0", @@ -10586,7 +10623,9 @@ } }, "node_modules/qs": { - "version": "6.15.0", + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -10880,7 +10919,9 @@ } }, "node_modules/react-router": { - "version": "7.12.0", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.17.0.tgz", + "integrity": "sha512-FDELK7rTMlCHO5+reyXsPlmfr7N1F91lPHsWYfMEGQm/KQ+F4JFM8jGoeQDmDvdTs93Fw9aSilH+uKRb4/jXvQ==", "license": "MIT", "peer": true, "dependencies": { @@ -10901,11 +10942,13 @@ } }, "node_modules/react-router-dom": { - "version": "7.12.0", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.17.0.tgz", + "integrity": "sha512-fyU2yjGups/hE6Xz0I5ZYbVL8Gx29eCjgpHaRaTaVU+OOAdfRX05KsvyRm0GO8YQwOkhpU3MurW1jyMUJn+zSw==", "license": "MIT", "peer": true, "dependencies": { - "react-router": "7.12.0" + "react-router": "7.17.0" }, "engines": { "node": ">=20.0.0" @@ -11376,20 +11419,11 @@ }, "node_modules/siginfo": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, "license": "ISC" }, - "node_modules/simple-swizzle": { - "version": "0.2.4", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.4", - "license": "MIT" - }, "node_modules/slash": { "version": "3.0.0", "license": "MIT", @@ -11448,11 +11482,15 @@ }, "node_modules/stackback": { "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, "license": "MIT" }, "node_modules/std-env": { - "version": "3.10.0", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", + "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", "dev": true, "license": "MIT" }, @@ -11624,22 +11662,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strip-literal": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/strip-literal/node_modules/js-tokens": { - "version": "9.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/style-search": { "version": "0.1.0", "dev": true, @@ -12100,38 +12122,6 @@ "dev": true, "license": "MIT" }, - "node_modules/test-exclude": { - "version": "7.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^9.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "10.5.0", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/tiny-invariant": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", @@ -12140,13 +12130,20 @@ }, "node_modules/tinybench": { "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.2", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/tinyglobby": { "version": "0.2.15", @@ -12193,24 +12190,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/tinypool": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, "node_modules/tinyrainbow": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "4.0.4", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", "dev": true, "license": "MIT", "engines": { @@ -12657,7 +12640,9 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "11.1.0", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", + "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -12752,27 +12737,6 @@ } } }, - "node_modules/vite-node": { - "version": "3.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, "node_modules/vite/node_modules/@esbuild/aix-ppc64": { "version": "0.27.3", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", @@ -13267,64 +13231,80 @@ } }, "node_modules/vitest": { - "version": "3.2.4", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.8.tgz", + "integrity": "sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", + "@vitest/expect": "4.1.8", + "@vitest/mocker": "4.1.8", + "@vitest/pretty-format": "4.1.8", + "@vitest/runner": "4.1.8", + "@vitest/snapshot": "4.1.8", + "@vitest/spy": "4.1.8", + "@vitest/utils": "4.1.8", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.8", + "@vitest/browser-preview": "4.1.8", + "@vitest/browser-webdriverio": "4.1.8", + "@vitest/coverage-istanbul": "4.1.8", + "@vitest/coverage-v8": "4.1.8", + "@vitest/ui": "4.1.8", "happy-dom": "*", - "jsdom": "*" + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "@edge-runtime/vm": { "optional": true }, - "@types/debug": { + "@opentelemetry/api": { "optional": true }, "@types/node": { "optional": true }, - "@vitest/browser": { + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { "optional": true }, "@vitest/ui": { @@ -13335,6 +13315,9 @@ }, "jsdom": { "optional": true + }, + "vite": { + "optional": false } } }, @@ -13505,6 +13488,8 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { @@ -13549,7 +13534,9 @@ "optional": true }, "node_modules/ws": { - "version": "8.18.2", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index b3e77ea1..f3082ada 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,10 @@ "@dnd-kit/sortable": "^10.0.0", "@fontsource/figtree": "^5.1.0", "@hookform/resolvers": "^3.9.0", - "@ianpaschal/combat-command-components": "^2.1.1", + "@ianpaschal/combat-command-components": "^2.2.1", "@ianpaschal/combat-command-game-systems": "^1.6.0", "@mapbox/search-js-core": "^1.0.0-beta.25", - "@pdfme/pdf-lib": "^1.17.1", + "@pdfme/pdf-lib": "^6.1.3", "@radix-ui/colors": "^3.0.0", "@react-hook/window-size": "^3.1.1", "@tanstack/react-query": "^5.59.15", @@ -101,7 +101,7 @@ "@types/react-dom": "^18.3.0", "@types/tz-lookup": "^6.1.2", "@vitejs/plugin-react": "^5.0.4", - "@vitest/coverage-v8": "^3.2.4", + "@vitest/coverage-v8": "^4.1.8", "convex-test": "^0.0.36", "eslint": "^9.0.0", "husky": "^9.1.7", @@ -116,6 +116,6 @@ "typescript": "^5.2.2", "typescript-plugin-css-modules": "^5.1.0", "vite": "^7.1.10", - "vitest": "^3.0.9" + "vitest": "^4.1.8" } } diff --git a/playwright.config.ts b/playwright.config.ts index f128d6a7..61ea6cd5 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,11 +1,30 @@ import { defineConfig, devices } from '@playwright/test'; +import fs from 'fs'; +import path from 'path'; -const LOCAL_CONVEX_DEPLOYMENT = 'local:local-ian_paschal-combat_command-1'; -const LOCAL_CONVEX_URL = 'http://127.0.0.1:3210'; +const TEST_CONVEX_URL = 'http://127.0.0.1:3215'; + +function getLocalAdminKey(): string { + const configPath = path.join( + process.env.HOME!, + '.convex/convex-backend-state/local-ian_paschal-combat_command-1/config.json', + ); + const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); + return config.adminKey; +} if (!process.env.CI) { - process.env.CONVEX_DEPLOYMENT = LOCAL_CONVEX_DEPLOYMENT; - process.env.VITE_CONVEX_URL = LOCAL_CONVEX_URL; + const adminKey = getLocalAdminKey(); + process.env.VITE_CONVEX_URL = TEST_CONVEX_URL; + process.env.CONVEX_SELF_HOSTED_URL = TEST_CONVEX_URL; + process.env.CONVEX_SELF_HOSTED_ADMIN_KEY = adminKey; + + // Write .env.playwright so the CLI reads the correct self-hosted vars from it + // (the CLI requires these in the env file, not just in process.env). + fs.writeFileSync( + path.join(import.meta.dirname, '.env.playwright'), + `CONVEX_SELF_HOSTED_URL=${TEST_CONVEX_URL}\nCONVEX_SELF_HOSTED_ADMIN_KEY=${adminKey}\nVITE_CONVEX_URL=${TEST_CONVEX_URL}\n`, + ); } export default defineConfig({ @@ -23,12 +42,12 @@ export default defineConfig({ webServer: [ // In CI the backend is a Convex preview deployment already running in the cloud — - // only start the local dev server when running tests locally. + // only start the local backend binary when running tests locally. ...(!process.env.CI ? [{ - command: 'npx convex dev --tail-logs disable > /dev/null 2>&1', - url: LOCAL_CONVEX_URL, + command: 'bash test/scripts/start-convex-backend.sh', + url: TEST_CONVEX_URL, reuseExistingServer: false, - timeout: 60000, + timeout: 30000, }] : []), { command: 'npm run dev:frontend > /dev/null 2>&1', diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index 97eb412b..ecef7b9f 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -10,13 +10,18 @@ import { Route, } from '@ianpaschal/combat-command-components'; import { useWindowWidth } from '@react-hook/window-size/throttled'; -import { Coffee } from 'lucide-react'; +import { Coffee, Info } from 'lucide-react'; import { NuqsAdapter } from 'nuqs/adapters/react-router/v7'; import { AccountMenu } from '~/components/AccountMenu'; import { usePrimaryAppRoutes } from '~/components/App/App.hooks'; import { ErrorBoundary } from '~/components/ErrorBoundary'; -import { MAX_WIDTH, MIN_WIDTH_DESKTOP } from '~/settings'; +import { SocialIconDiscord } from '~/components/SocialIconDiscord'; +import { + MAX_WIDTH, + MIN_WIDTH_DESKTOP, + PATHS, +} from '~/settings'; import styles from './App.module.scss'; @@ -27,9 +32,29 @@ export const App = (): JSX.Element => { const primaryRoutes = usePrimaryAppRoutes(); const secondaryRoutes: Route[] = [ { - title: 'Buy Me a Coffee', - path: 'https://buymeacoffee.com/combatcommand', - icon: , + title: 'Support', + path: PATHS.external.docs, + target: '_blank', + children: [ + { + title: 'Docs', + path: PATHS.external.docs, + icon: , + target: '_blank', + }, + { + title: 'Discord', + path: PATHS.external.discord, + icon: , + target: '_blank', + }, + { + title: 'Buy Me a Coffee', + path: PATHS.external.buyMeACoffee, + icon: , + target: '_blank', + }, + ], }, ]; return ( @@ -37,6 +62,7 @@ export const App = (): JSX.Element => { } + logoRoute={{ path: 'https://www.combatcommand.net', target: '_self' }} maxWidth={MAX_WIDTH} mobile={width <= MIN_WIDTH_DESKTOP} routes={primaryRoutes} diff --git a/src/components/SocialIconDiscord/SocialIconDiscord.tsx b/src/components/SocialIconDiscord/SocialIconDiscord.tsx new file mode 100644 index 00000000..dc73a875 --- /dev/null +++ b/src/components/SocialIconDiscord/SocialIconDiscord.tsx @@ -0,0 +1,29 @@ +import { forwardRef, SVGProps } from 'react'; + +interface SocialIconDiscordProps extends SVGProps { + size?: string | number; +} + +export const SocialIconDiscord = forwardRef(({ + size = 24, + strokeWidth = 2, + ...props +}, ref) => ( + + + +)); + +SocialIconDiscord.displayName = 'SocialIconDiscord'; diff --git a/src/components/SocialIconDiscord/index.ts b/src/components/SocialIconDiscord/index.ts new file mode 100644 index 00000000..69c7a801 --- /dev/null +++ b/src/components/SocialIconDiscord/index.ts @@ -0,0 +1 @@ +export * from './SocialIconDiscord'; diff --git a/src/pages/LandingPage/LandingPage.module.scss b/src/pages/LandingPage/LandingPage.module.scss deleted file mode 100644 index 7eeb4b66..00000000 --- a/src/pages/LandingPage/LandingPage.module.scss +++ /dev/null @@ -1,110 +0,0 @@ -@use "/src/style/flex"; -@use "/src/style/borders"; -@use "/src/style/shadows"; -@use "/src/style/variables"; -@use "/src/style/corners"; -@use "@radix-ui/colors/gray.css"; - -.LandingPage { - @include flex.column; - - flex-grow: 1; - - // height: 100vh; - min-height: 0; - padding-bottom: calc(100vh - 100dvh); // Prevent browser toolbar from cutting off bottom of page - // background-color: aquamarine; - - &_Content { - @include flex.column($gap: 2rem); - - padding-bottom: 4rem; - } - - &_Hero { - @include flex.row($xAlign: left); - - height: calc(560px); - padding: calc(var(--app-bar-height) + 2rem) 0 2rem; - - color: var(--primary-default-text); - - background: var(--gray-12); - background: url("/splash.jpg") no-repeat center center; - background-size: cover; - - h1 { - width: 50%; - font-size: 32px; - color: white; - } - - p { - width: 50%; - font-size: 18px; - line-height: 24px; - color: white; - } - } - - &_HeroContent { - @include flex.column; - - flex-grow: 1; - max-width: calc(1280px + (2 * 1rem)); - margin: 0 auto; - padding: 0 calc(1rem + var(--border-width) + var(--container-padding-x)); - } - - &_HeroCta { - align-self: flex-start; - - // background-color: #0588f0; - - // button:hover { - // background-color: #0090ff; - // } - } - - &_FullWidth { - min-height: 10rem; - background-color: slategray; - } - - &_Normal { - max-width: calc(1280px + (2 * 1rem)); - min-height: 10rem; - margin: 0 auto; - padding: 0 1rem; - } - - &_TripleBlock { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); - grid-template-rows: min-content; - gap: 1rem; - - width: 100%; - } - - &_Block { - @include flex.column; - @include corners.normal; - @include shadows.surface; - @include borders.normal; - - padding: var(--container-padding-x); - background-color: var(--color-card-bg); - - p { - font-size: 16px; - line-height: 24px; - } - } -} - -@media (width < 688px) { - .LandingPage_TripleBlock { - grid-template-columns: 1fr; - } -} diff --git a/src/pages/LandingPage/LandingPage.tsx b/src/pages/LandingPage/LandingPage.tsx index 9285fa47..447caa59 100644 --- a/src/pages/LandingPage/LandingPage.tsx +++ b/src/pages/LandingPage/LandingPage.tsx @@ -1,46 +1,14 @@ -import { useNavigate } from 'react-router-dom'; -import { Button, ScrollArea } from '@ianpaschal/combat-command-components'; +import { ReactElement } from 'react'; +import { Navigate } from 'react-router-dom'; -import { PreventAuth } from '~/components/PreventAuth'; +import { useAuth } from '~/components/AuthProvider'; import { PATHS } from '~/settings'; +import { getPathWithQuery } from '~/utils/common/getPathWithQuery'; -import styles from './LandingPage.module.scss'; - -export const LandingPage = (): JSX.Element => { - const navigate = useNavigate(); - const handleSignUp = (): void => { - navigate(PATHS.authSignUp); - }; +export const LandingPage = (): ReactElement => { + const user = useAuth(); + const redirect = user ? PATHS.dashboard : getPathWithQuery(PATHS.tournaments, { status: ['published'] }); return ( - - -
-
-
-

Combat Command

-

Elevate your historical war-gaming experience.

-

Whether you're a casual player or the organizer of a highly competitive tournament, Combat Command is the digital half of your dice box.

-
-
-
-
-
-

Organize Tournaments

-

Born out of the European Team Championships for Battlefront’s classic WWII game: Flames of War, CombatCommand offers all the tools organizers need and is battle tested at the highest levels of competition.

-
-
-

Check In Matches

-

Tournaments aren’t everything! Check in your single matches with friends, attach photos, and save notes with the game results.

-
-
-

Statistics

-

What is your most-valuable unit? Do you have an edge playing a certain stance? Which missions do you struggle with the most? The CombatCommand statistics panel gives you insight into all of these topics.

-
-
-
-
-
-
+ ); }; diff --git a/src/pages/LandingPage/index.ts b/src/pages/LandingPage/index.ts index a91a96a6..49287ad1 100644 --- a/src/pages/LandingPage/index.ts +++ b/src/pages/LandingPage/index.ts @@ -1 +1 @@ -export { LandingPage } from './LandingPage'; +export * from './LandingPage'; diff --git a/src/pages/TournamentPairingsPage/components/Draggable/Draggable.tsx b/src/pages/TournamentPairingsPage/components/Draggable/Draggable.tsx index 0de9a32f..8af721e0 100644 --- a/src/pages/TournamentPairingsPage/components/Draggable/Draggable.tsx +++ b/src/pages/TournamentPairingsPage/components/Draggable/Draggable.tsx @@ -33,6 +33,7 @@ export const Draggable = ({