feat: Added proper path alias for imports (#216)

* Added "Share" and "Add to Playlist" buttons to video player overlay.
* Added options to sort playlists in reverse order.
* Added handle for dragging playlist items.
* Added consistent import sorting (with ESLint).
* Removed barrel files.
This commit is contained in:
Mani
2024-05-22 17:30:26 +02:00
committed by GitHub
parent 2f63982ed6
commit 1f0844465c
210 changed files with 2478 additions and 1495 deletions
+26 -3
View File
@@ -7,6 +7,7 @@
"ignorePatterns": [
"src/generated"
],
"plugins": ["simple-import-sort"],
"rules": {
"semi": [
"error",
@@ -37,8 +38,25 @@
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "error",
// For now we don't habe prop-types validation
"react/prop-types": "off"
"react/prop-types": "off",
// Sort imports
"simple-import-sort/imports": [
"error",
{
"groups": [
// Packages that are used in almost all files.
["^react$", "^react\\u0000$", "^styled-components", "^next"],
// All other packages.
["^@?\\w"],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
["^"],
// Side effect imports.
["^\\u0000"]
]
}
],
"simple-import-sort/exports": "error"
},
"overrides": [
{
@@ -65,7 +83,12 @@
"allowSingleExtends": true
}
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/consistent-type-exports": "error"
}
}
+1
View File
@@ -37,6 +37,7 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
next.config.mjs
# IDE (WebStorm)
*.iml
+4 -1
View File
@@ -1,5 +1,8 @@
{
"compilerOptions": {
"baseUrl": "src"
"baseUrl": "src",
"paths": {
"@/*": ["./*"]
}
}
}
+5 -8
View File
@@ -1,10 +1,10 @@
// @ts-check
import { ANALYZE, BASE_PATH, STAGING, validateConfig } from "./src/utils/config.mjs";
import { error, info } from "./src/utils/log.mjs";
import type { NextConfig } from "next";
import NextBundleAnalyzer from "@next/bundle-analyzer";
import { ANALYZE, BASE_PATH, STAGING, validateConfig } from "@/utils/config";
import { error, info } from "@/utils/log";
const withBundleAnalyzer = NextBundleAnalyzer({
enabled: ANALYZE,
});
@@ -18,10 +18,7 @@ if (STAGING) {
info("Running animethemes-web in staging mode!");
}
/**
* @type {import('next').NextConfig}
**/
const nextConfig = {
const nextConfig: NextConfig = {
basePath: BASE_PATH,
reactStrictMode: true,
compiler: {
+633 -13
View File
@@ -23,7 +23,7 @@
"ahooks": "^3.7.6",
"axios": "^1.2.2",
"common-tags": "^1.8.0",
"framer-motion": "^10.12.4",
"framer-motion": "^11.2.4",
"graphql": "^15.8.0",
"graphql-parse-resolve-info": "^4.12.0",
"graphql-tag": "^2.12.6",
@@ -62,8 +62,10 @@
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"esbuild": "^0.21.3",
"eslint": "7.32.0",
"eslint-config-next": "^13.3.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"husky": "^9.0.11",
"ts-node": "^10.8.1",
"typescript": "^4.9.5"
@@ -1191,6 +1193,7 @@
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
"integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
"optional": true,
"peer": true,
"dependencies": {
"@emotion/memoize": "0.7.4"
}
@@ -1199,7 +1202,8 @@
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
"optional": true,
"peer": true
},
"node_modules/@emotion/stylis": {
"version": "0.8.5",
@@ -1211,6 +1215,374 @@
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz",
"integrity": "sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.3.tgz",
"integrity": "sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz",
"integrity": "sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.3.tgz",
"integrity": "sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz",
"integrity": "sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz",
"integrity": "sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz",
"integrity": "sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz",
"integrity": "sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz",
"integrity": "sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz",
"integrity": "sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz",
"integrity": "sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz",
"integrity": "sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==",
"cpu": [
"loong64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz",
"integrity": "sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz",
"integrity": "sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz",
"integrity": "sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz",
"integrity": "sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz",
"integrity": "sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz",
"integrity": "sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz",
"integrity": "sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz",
"integrity": "sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz",
"integrity": "sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz",
"integrity": "sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz",
"integrity": "sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@@ -5447,6 +5819,44 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/esbuild": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.3.tgz",
"integrity": "sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.21.3",
"@esbuild/android-arm": "0.21.3",
"@esbuild/android-arm64": "0.21.3",
"@esbuild/android-x64": "0.21.3",
"@esbuild/darwin-arm64": "0.21.3",
"@esbuild/darwin-x64": "0.21.3",
"@esbuild/freebsd-arm64": "0.21.3",
"@esbuild/freebsd-x64": "0.21.3",
"@esbuild/linux-arm": "0.21.3",
"@esbuild/linux-arm64": "0.21.3",
"@esbuild/linux-ia32": "0.21.3",
"@esbuild/linux-loong64": "0.21.3",
"@esbuild/linux-mips64el": "0.21.3",
"@esbuild/linux-ppc64": "0.21.3",
"@esbuild/linux-riscv64": "0.21.3",
"@esbuild/linux-s390x": "0.21.3",
"@esbuild/linux-x64": "0.21.3",
"@esbuild/netbsd-x64": "0.21.3",
"@esbuild/openbsd-x64": "0.21.3",
"@esbuild/sunos-x64": "0.21.3",
"@esbuild/win32-arm64": "0.21.3",
"@esbuild/win32-ia32": "0.21.3",
"@esbuild/win32-x64": "0.21.3"
}
},
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -5801,6 +6211,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/eslint-plugin-simple-import-sort": {
"version": "12.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.0.tgz",
"integrity": "sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==",
"dev": true,
"peerDependencies": {
"eslint": ">=5.0.0"
}
},
"node_modules/eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@@ -6428,20 +6847,21 @@
}
},
"node_modules/framer-motion": {
"version": "10.12.4",
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-10.12.4.tgz",
"integrity": "sha512-9gLtv8T6dui0tujHROR+VM3kdJyKiFCFiD94IQE+0OuX6LaIyXtdVpviokVdrHSb1giWhmmX4yzoucALMx6mtw==",
"version": "11.2.4",
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.2.4.tgz",
"integrity": "sha512-D+EXd0lspaZijv3BJhAcSsyGz+gnvoEdnf+QWkPZdhoFzbeX/2skrH9XSVFb0osgUnCajW8x1frjhLuKwa/Reg==",
"dependencies": {
"tslib": "^2.4.0"
},
"optionalDependencies": {
"@emotion/is-prop-valid": "^0.8.2"
},
"peerDependencies": {
"@emotion/is-prop-valid": "*",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"peerDependenciesMeta": {
"@emotion/is-prop-valid": {
"optional": true
},
"react": {
"optional": true
},
@@ -12907,6 +13327,7 @@
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
"integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
"optional": true,
"peer": true,
"requires": {
"@emotion/memoize": "0.7.4"
}
@@ -12915,7 +13336,8 @@
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
"optional": true,
"peer": true
},
"@emotion/stylis": {
"version": "0.8.5",
@@ -12927,6 +13349,167 @@
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"@esbuild/aix-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz",
"integrity": "sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==",
"dev": true,
"optional": true
},
"@esbuild/android-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.3.tgz",
"integrity": "sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==",
"dev": true,
"optional": true
},
"@esbuild/android-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz",
"integrity": "sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==",
"dev": true,
"optional": true
},
"@esbuild/android-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.3.tgz",
"integrity": "sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==",
"dev": true,
"optional": true
},
"@esbuild/darwin-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz",
"integrity": "sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==",
"dev": true,
"optional": true
},
"@esbuild/darwin-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz",
"integrity": "sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==",
"dev": true,
"optional": true
},
"@esbuild/freebsd-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz",
"integrity": "sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==",
"dev": true,
"optional": true
},
"@esbuild/freebsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz",
"integrity": "sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==",
"dev": true,
"optional": true
},
"@esbuild/linux-arm": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz",
"integrity": "sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==",
"dev": true,
"optional": true
},
"@esbuild/linux-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz",
"integrity": "sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==",
"dev": true,
"optional": true
},
"@esbuild/linux-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz",
"integrity": "sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==",
"dev": true,
"optional": true
},
"@esbuild/linux-loong64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz",
"integrity": "sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==",
"dev": true,
"optional": true
},
"@esbuild/linux-mips64el": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz",
"integrity": "sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==",
"dev": true,
"optional": true
},
"@esbuild/linux-ppc64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz",
"integrity": "sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==",
"dev": true,
"optional": true
},
"@esbuild/linux-riscv64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz",
"integrity": "sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==",
"dev": true,
"optional": true
},
"@esbuild/linux-s390x": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz",
"integrity": "sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==",
"dev": true,
"optional": true
},
"@esbuild/linux-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz",
"integrity": "sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==",
"dev": true,
"optional": true
},
"@esbuild/netbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz",
"integrity": "sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==",
"dev": true,
"optional": true
},
"@esbuild/openbsd-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz",
"integrity": "sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==",
"dev": true,
"optional": true
},
"@esbuild/sunos-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz",
"integrity": "sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==",
"dev": true,
"optional": true
},
"@esbuild/win32-arm64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz",
"integrity": "sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==",
"dev": true,
"optional": true
},
"@esbuild/win32-ia32": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz",
"integrity": "sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==",
"dev": true,
"optional": true
},
"@esbuild/win32-x64": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz",
"integrity": "sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==",
"dev": true,
"optional": true
},
"@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@@ -16187,6 +16770,37 @@
"is-symbol": "^1.0.2"
}
},
"esbuild": {
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.3.tgz",
"integrity": "sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==",
"dev": true,
"requires": {
"@esbuild/aix-ppc64": "0.21.3",
"@esbuild/android-arm": "0.21.3",
"@esbuild/android-arm64": "0.21.3",
"@esbuild/android-x64": "0.21.3",
"@esbuild/darwin-arm64": "0.21.3",
"@esbuild/darwin-x64": "0.21.3",
"@esbuild/freebsd-arm64": "0.21.3",
"@esbuild/freebsd-x64": "0.21.3",
"@esbuild/linux-arm": "0.21.3",
"@esbuild/linux-arm64": "0.21.3",
"@esbuild/linux-ia32": "0.21.3",
"@esbuild/linux-loong64": "0.21.3",
"@esbuild/linux-mips64el": "0.21.3",
"@esbuild/linux-ppc64": "0.21.3",
"@esbuild/linux-riscv64": "0.21.3",
"@esbuild/linux-s390x": "0.21.3",
"@esbuild/linux-x64": "0.21.3",
"@esbuild/netbsd-x64": "0.21.3",
"@esbuild/openbsd-x64": "0.21.3",
"@esbuild/sunos-x64": "0.21.3",
"@esbuild/win32-arm64": "0.21.3",
"@esbuild/win32-ia32": "0.21.3",
"@esbuild/win32-x64": "0.21.3"
}
},
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -16552,6 +17166,13 @@
"dev": true,
"requires": {}
},
"eslint-plugin-simple-import-sort": {
"version": "12.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.0.tgz",
"integrity": "sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==",
"dev": true,
"requires": {}
},
"eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@@ -16935,11 +17556,10 @@
}
},
"framer-motion": {
"version": "10.12.4",
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-10.12.4.tgz",
"integrity": "sha512-9gLtv8T6dui0tujHROR+VM3kdJyKiFCFiD94IQE+0OuX6LaIyXtdVpviokVdrHSb1giWhmmX4yzoucALMx6mtw==",
"version": "11.2.4",
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.2.4.tgz",
"integrity": "sha512-D+EXd0lspaZijv3BJhAcSsyGz+gnvoEdnf+QWkPZdhoFzbeX/2skrH9XSVFb0osgUnCajW8x1frjhLuKwa/Reg==",
"requires": {
"@emotion/is-prop-valid": "^0.8.2",
"tslib": "^2.4.0"
}
},
+7 -1
View File
@@ -6,6 +6,10 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"predev": "npm run compile-config",
"prebuild": "npm run compile-config",
"prestart": "npm run compile-config",
"compile-config": "esbuild next.config.ts --bundle --outfile=next.config.mjs --platform=node --format=esm --external:./node_modules/* --target=esnext",
"lint": "next lint",
"type-check": "tsc",
"graphql-codegen": "graphql-codegen --config codegen.ts",
@@ -27,7 +31,7 @@
"ahooks": "^3.7.6",
"axios": "^1.2.2",
"common-tags": "^1.8.0",
"framer-motion": "^10.12.4",
"framer-motion": "^11.2.4",
"graphql": "^15.8.0",
"graphql-parse-resolve-info": "^4.12.0",
"graphql-tag": "^2.12.6",
@@ -66,8 +70,10 @@
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"esbuild": "^0.21.3",
"eslint": "7.32.0",
"eslint-config-next": "^13.3.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"husky": "^9.0.11",
"ts-node": "^10.8.1",
"typescript": "^4.9.5"
+6 -5
View File
@@ -1,9 +1,10 @@
import useAuth from "hooks/useAuth";
import type { ReactNode } from "react";
import { Text } from "components/text";
import { Column, Row } from "components/box";
import { LoginDialog } from "components/dialog/LoginDialog";
import { RegisterDialog } from "components/dialog/RegisterDialog";
import { Column, Row } from "@/components/box/Flex";
import { LoginDialog } from "@/components/dialog/LoginDialog";
import { RegisterDialog } from "@/components/dialog/RegisterDialog";
import { Text } from "@/components/text/Text";
import useAuth from "@/hooks/useAuth";
interface LoginGateProps {
children: ReactNode;
+1
View File
@@ -1,4 +1,5 @@
import styled from "styled-components";
import type { Property } from "csstype";
const Flex = styled.div<{
+2 -1
View File
@@ -1,5 +1,6 @@
import styled from "styled-components";
import theme from "theme";
import theme from "@/theme";
export const Solid = styled.div`
background-color: ${theme.colors["solid"]};
-2
View File
@@ -1,2 +0,0 @@
export { Row, Column } from "./Flex";
export { Solid } from "./Solid";
+12 -10
View File
@@ -1,15 +1,17 @@
import styled from "styled-components";
import { Text } from "components/text";
import { faDiagramProject } from "@fortawesome/pro-solid-svg-icons";
import { Icon } from "components/icon";
import type { RefObject } from "react";
import { memo, useCallback, useRef, useState } from "react";
import theme from "theme";
import type { RefObject } from "react";
import styled from "styled-components";
import { faDiagramProject } from "@fortawesome/pro-solid-svg-icons";
import { m } from "framer-motion";
import { Button } from "components/button";
import { BracketThemeSummaryCard } from "components/bracket/BracketThemeSummaryCard";
import type { BracketPageQuery } from "generated/graphql";
import type { RequiredNonNullable } from "utils/types";
import { BracketThemeSummaryCard } from "@/components/bracket/BracketThemeSummaryCard";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import type { BracketPageQuery } from "@/generated/graphql";
import theme from "@/theme";
import type { RequiredNonNullable } from "@/utils/types";
const StyledBracketContainer = styled.div`
flex: 1 1 0;
@@ -1,17 +1,20 @@
import styled from "styled-components";
import { SummaryCard, ThemeSummaryCard } from "components/card";
import { Text } from "components/text";
import extractImages from "utils/extractImages";
import createVideoSlug from "utils/createVideoSlug";
import { SongTitleWithArtists } from "components/utils";
import { Column } from "components/box";
import { Icon } from "components/icon";
import { faAward, faSeedling, faUsers } from "@fortawesome/pro-solid-svg-icons";
import { CornerIcon } from "components/icon/CornerIcon";
import gql from "graphql-tag";
import type { BracketThemeSummaryCardConstestantFragment } from "generated/graphql";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { TextLink } from "components/text/TextLink";
import styled from "styled-components";
import { faAward, faSeedling, faUsers } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { Column } from "@/components/box/Flex";
import { SummaryCard } from "@/components/card/SummaryCard";
import { ThemeSummaryCard } from "@/components/card/ThemeSummaryCard";
import { CornerIcon } from "@/components/icon/CornerIcon";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import { TextLink } from "@/components/text/TextLink";
import { SongTitleWithArtists } from "@/components/utils/SongTitleWithArtists";
import type { BracketThemeSummaryCardConstestantFragment } from "@/generated/graphql";
import createVideoSlug from "@/utils/createVideoSlug";
import extractImages from "@/utils/extractImages";
const StyledSummaryCardWrapper = styled.div`
position: relative;
+8 -6
View File
@@ -1,13 +1,15 @@
import React, { useContext,useEffect, useState } from "react";
import styled from "styled-components";
import { Button } from "./Button";
import { Icon } from "components/icon";
import { faChevronUp } from "@fortawesome/pro-solid-svg-icons";
import React, { useState, useEffect, useContext } from "react";
import theme from "theme";
import { withHover } from "styles/mixins";
import PlayerContext from "context/playerContext";
import { AnimatePresence, m } from "framer-motion";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import PlayerContext from "@/context/playerContext";
import { withHover } from "@/styles/mixins";
import theme from "@/theme";
const ScrollButton = styled(m(Button))<{ $bottomOffset: number }>`
position: fixed;
right: 16px;
+6 -5
View File
@@ -1,9 +1,10 @@
import styled from "styled-components";
import theme from "theme";
import { withHover } from "styles/mixins";
import { Solid } from "components/box";
import type { ComponentPropsWithoutRef, ForwardedRef, ReactNode } from "react";
import { forwardRef } from "react";
import type { ComponentPropsWithoutRef, ForwardedRef, ReactNode } from "react";
import styled from "styled-components";
import { Solid } from "@/components/box/Solid";
import { withHover } from "@/styles/mixins";
import theme from "@/theme";
export const Button = forwardRef(ButtonWithRef);
+4 -2
View File
@@ -1,7 +1,9 @@
import { faFilter } from "@fortawesome/pro-solid-svg-icons";
import { IconTextButton } from "components/button";
import type { ComponentPropsWithoutRef } from "react";
import { faFilter } from "@fortawesome/pro-solid-svg-icons";
import { IconTextButton } from "@/components/button/IconTextButton";
export function FilterToggleButton(props: Partial<ComponentPropsWithoutRef<typeof IconTextButton>>) {
return (
<IconTextButton icon={faFilter} collapsible {...props}>Filter</IconTextButton>
+8 -6
View File
@@ -1,10 +1,12 @@
import { Icon } from "components/icon";
import { Button } from "components/button";
import styled from "styled-components";
import theme from "theme";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { forwardRef } from "react";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import styled from "styled-components";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import theme from "@/theme";
const StyledButton = styled(Button)<{ $collapseBreakpoint: string }>`
gap: 8px;
+9 -7
View File
@@ -1,19 +1,21 @@
import type { ComponentPropsWithoutRef } from "react";
import { useContext } from "react";
import type { ComponentPropsWithoutRef } from "react";
import Link from "next/link";
import { faCompactDisc, faPlay } from "@fortawesome/pro-solid-svg-icons";
import PlayerContext from "context/playerContext";
import createVideoSlug, { getVideoSlugByWatchListItem } from "utils/createVideoSlug";
import { Icon } from "components/icon";
import { Button } from "components/button";
import { VideoTags } from "components/tag/VideoTags";
import gql from "graphql-tag";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import { VideoTags } from "@/components/tag/VideoTags";
import PlayerContext from "@/context/playerContext";
import type {
VideoButtonAnimeFragment,
VideoButtonEntryFragment,
VideoButtonThemeFragment,
VideoButtonVideoFragment
} from "generated/graphql";
} from "@/generated/graphql";
import createVideoSlug, { getVideoSlugByWatchListItem } from "@/utils/createVideoSlug";
interface VideoButtonProps extends ComponentPropsWithoutRef<typeof Button> {
anime: VideoButtonAnimeFragment
-5
View File
@@ -1,5 +0,0 @@
export { Button } from "./Button";
export { VideoButton } from "./VideoButton";
export { FilterToggleButton } from "./FilterToggleButton";
export { IconTextButton } from "./IconTextButton";
export { BackToTopButton } from "./BackToTopButton";
+16 -14
View File
@@ -1,20 +1,22 @@
import { Fragment } from "react";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import { Text } from "components/text";
import extractImages from "utils/extractImages";
import { Icon } from "components/icon";
import { SummaryCard } from "components/card";
import styled from "styled-components";
import useToggle from "hooks/useToggle";
import theme from "theme";
import { uniqBy } from "lodash-es";
import { Collapse } from "components/utils";
import { ThemeTable } from "components/table";
import useMediaQuery from "hooks/useMediaQuery";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import type { AnimeSummaryCardAnimeExpandableFragment, AnimeSummaryCardAnimeFragment } from "generated/graphql";
import { TextLink } from "components/text/TextLink";
import { uniqBy } from "lodash-es";
import { Button } from "@/components/button/Button";
import { SummaryCard } from "@/components/card/SummaryCard";
import { Icon } from "@/components/icon/Icon";
import { ThemeTable } from "@/components/table/ThemeTable";
import { Text } from "@/components/text/Text";
import { TextLink } from "@/components/text/TextLink";
import { Collapse } from "@/components/utils/Collapse";
import type { AnimeSummaryCardAnimeExpandableFragment, AnimeSummaryCardAnimeFragment } from "@/generated/graphql";
import useMediaQuery from "@/hooks/useMediaQuery";
import useToggle from "@/hooks/useToggle";
import theme from "@/theme";
import extractImages from "@/utils/extractImages";
const StyledWrapper = styled.div`
position: relative
+3 -2
View File
@@ -1,6 +1,7 @@
import type { MDXRemoteSerializeResult } from "next-mdx-remote";
import { Markdown } from "components/markdown/Markdown";
import { AnimeAwardsNowAvailable } from "components/event/AnimeAwardsNowAvailable";
import { AnimeAwardsNowAvailable } from "@/components/event/AnimeAwardsNowAvailable";
import { Markdown } from "@/components/markdown/Markdown";
interface AnnouncementCardProps {
announcementSource: MDXRemoteSerializeResult;
+4 -3
View File
@@ -1,7 +1,8 @@
import extractImages from "utils/extractImages";
import { SummaryCard } from "components/card";
import gql from "graphql-tag";
import type { ArtistSummaryCardArtistFragment } from "generated/graphql";
import { SummaryCard } from "@/components/card/SummaryCard";
import type { ArtistSummaryCardArtistFragment } from "@/generated/graphql";
import extractImages from "@/utils/extractImages";
type ArtistSummaryCardProps = {
artist: ArtistSummaryCardArtistFragment
+5 -4
View File
@@ -1,8 +1,9 @@
import styled, { css } from "styled-components";
import { Solid } from "components/box";
import theme from "theme";
import { withHover } from "styles/mixins";
import type { Colors } from "theme/colors";
import { Solid } from "@/components/box/Solid";
import { withHover } from "@/styles/mixins";
import theme from "@/theme";
import type { Colors } from "@/theme/colors";
export const Card = styled(Solid)<{
hoverable?: boolean
+8 -6
View File
@@ -1,10 +1,12 @@
import { Card } from "components/card";
import { Row } from "components/box";
import { Text } from "components/text";
import { faExclamation } from "@fortawesome/pro-solid-svg-icons";
import styled from "styled-components";
import theme from "theme";
import { Icon } from "components/icon";
import { faExclamation } from "@fortawesome/pro-solid-svg-icons";
import { Row } from "@/components/box/Flex";
import { Card } from "@/components/card/Card";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import theme from "@/theme";
const StyledCard = styled(Card)`
display: flex;
+7 -5
View File
@@ -1,11 +1,13 @@
import { SummaryCard } from "components/card/SummaryCard";
import type { PropsWithChildren } from "react";
import gql from "graphql-tag";
import type { PlaylistSummaryCardPlaylistFragment, PlaylistSummaryCardShowOwnerFragment } from "generated/graphql";
import type { ReactNode } from "react";
import styled from "styled-components";
import theme from "theme";
import { Text } from "components/text";
import gql from "graphql-tag";
import { SummaryCard } from "@/components/card/SummaryCard";
import { Text } from "@/components/text/Text";
import type { PlaylistSummaryCardPlaylistFragment, PlaylistSummaryCardShowOwnerFragment } from "@/generated/graphql";
import theme from "@/theme";
const StyledWrapper = styled.div`
position: relative
+6 -4
View File
@@ -1,10 +1,12 @@
import { type SyntheticEvent, useState } from "react";
import type { Property } from "csstype";
import gql from "graphql-tag";
import type { StudioSummaryCardStudioFragment } from "generated/graphql";
import extractBackgroundColor from "utils/extractBackgroundColor";
import { SummaryCard } from "components/card/SummaryCard";
import extractImages from "utils/extractImages";
import { SummaryCard } from "@/components/card/SummaryCard";
import type { StudioSummaryCardStudioFragment } from "@/generated/graphql";
import extractBackgroundColor from "@/utils/extractBackgroundColor";
import extractImages from "@/utils/extractImages";
interface StudioSummaryCardProps {
studio: StudioSummaryCardStudioFragment;
+12 -10
View File
@@ -1,16 +1,18 @@
import Link from "next/link";
import { Text } from "components/text";
import styled, { css } from "styled-components";
import { Card } from "components/card";
import { Column } from "components/box";
import withBasePath from "utils/withBasePath";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { useState } from "react";
import { loadingAnimation } from "styles/mixins";
import { TextLink } from "components/text/TextLink";
import { ConditionalWrapper } from "components/utils/ConditionalWrapper";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import styled, { css } from "styled-components";
import Link from "next/link";
import type { Property } from "csstype";
import { Column } from "@/components/box/Flex";
import { Card } from "@/components/card/Card";
import { Text } from "@/components/text/Text";
import { TextLink } from "@/components/text/TextLink";
import { ConditionalWrapper } from "@/components/utils/ConditionalWrapper";
import { loadingAnimation } from "@/styles/mixins";
import withBasePath from "@/utils/withBasePath";
const StyledSummaryCard = styled(Card)`
display: flex;
flex-direction: row;
+9 -7
View File
@@ -1,13 +1,15 @@
import { Text } from "components/text";
import styled, { css } from "styled-components";
import { Card } from "components/card";
import { Column } from "components/box";
import withBasePath from "utils/withBasePath";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { useState } from "react";
import { loadingAnimation } from "styles/mixins";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import styled, { css } from "styled-components";
import type { Property } from "csstype";
import { Column } from "@/components/box/Flex";
import { Card } from "@/components/card/Card";
import { Text } from "@/components/text/Text";
import { loadingAnimation } from "@/styles/mixins";
import withBasePath from "@/utils/withBasePath";
const StyledSummaryCard = styled(Card)`
display: flex;
flex-direction: row;
+15 -12
View File
@@ -1,16 +1,19 @@
import { VideoButton } from "components/button";
import { Performances, SongTitle } from "components/utils";
import { Text } from "components/text";
import { ThemeMenu } from "components/menu/ThemeMenu";
import { ThemeEntryTags } from "components/tag/ThemeEntryTags";
import { VideoTags } from "components/tag/VideoTags";
import gql from "graphql-tag";
import type { ThemeDetailCardThemeFragment } from "generated/graphql";
import styled from "styled-components";
import { Card } from "components/card/Card";
import theme from "theme";
import { Row } from "components/box";
import { entryVersionComparator } from "utils/comparators";
import gql from "graphql-tag";
import { Row } from "@/components/box/Flex";
import { VideoButton } from "@/components/button/VideoButton";
import { Card } from "@/components/card/Card";
import { ThemeMenu } from "@/components/menu/ThemeMenu";
import { ThemeEntryTags } from "@/components/tag/ThemeEntryTags";
import { VideoTags } from "@/components/tag/VideoTags";
import { Text } from "@/components/text/Text";
import { Performances } from "@/components/utils/Performances";
import { SongTitle } from "@/components/utils/SongTitle";
import type { ThemeDetailCardThemeFragment } from "@/generated/graphql";
import theme from "@/theme";
import { entryVersionComparator } from "@/utils/comparators";
const StyledThemeCard = styled(Card)`
display: flex;
+25 -20
View File
@@ -1,29 +1,34 @@
import Link from "next/link";
import { Collapse, Performances, SongTitle, SongTitleWithArtists } from "components/utils";
import { Text } from "components/text";
import extractImages from "utils/extractImages";
import createVideoSlug from "utils/createVideoSlug";
import { SummaryCard } from "components/card/SummaryCard2";
import { ThemeMenu } from "components/menu/ThemeMenu";
import gql from "graphql-tag";
import { fetchDataClient } from "lib/client";
import { Icon } from "components/icon";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import useToggle from "hooks/useToggle";
import type { PropsWithChildren } from "react";
import styled from "styled-components";
import { Table, ThemeTable } from "components/table";
import theme from "theme";
import useMediaQuery from "hooks/useMediaQuery";
import Link from "next/link";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { Button } from "@/components/button/Button";
import { SummaryCard } from "@/components/card/SummaryCard2";
import { Icon } from "@/components/icon/Icon";
import { ThemeMenu } from "@/components/menu/ThemeMenu";
import { Table, TableBody, TableCell, TableHead, TableHeadCell, TableRow } from "@/components/table/Table";
import { ThemeTable } from "@/components/table/ThemeTable";
import { Text } from "@/components/text/Text";
import { TextLink } from "@/components/text/TextLink";
import { Collapse } from "@/components/utils/Collapse";
import { Performances } from "@/components/utils/Performances";
import { SongTitle } from "@/components/utils/SongTitle";
import { SongTitleWithArtists } from "@/components/utils/SongTitleWithArtists";
import type {
ThemeSummaryCardArtistFragment,
ThemeSummaryCardQuery,
ThemeSummaryCardThemeExpandableFragment,
ThemeSummaryCardThemeFragment
} from "generated/graphql";
import type { PropsWithChildren } from "react";
import { TableBody, TableCell, TableHead, TableHeadCell, TableRow } from "components/table/Table";
import { TextLink } from "components/text/TextLink";
} from "@/generated/graphql";
import useMediaQuery from "@/hooks/useMediaQuery";
import useToggle from "@/hooks/useToggle";
import { fetchDataClient } from "@/lib/client";
import theme from "@/theme";
import createVideoSlug from "@/utils/createVideoSlug";
import extractImages from "@/utils/extractImages";
const StyledWrapper = styled.div`
position: relative
+17 -11
View File
@@ -1,16 +1,20 @@
import { Performances, SongTitle, SongTitleWithArtists } from "components/utils";
import extractImages from "utils/extractImages";
import createVideoSlug from "utils/createVideoSlug";
import { SummaryCard } from "components/card/SummaryCard2";
import gql from "graphql-tag";
import styled from "styled-components";
import theme from "theme";
import type { VideoSummaryCardVideoFragment } from "generated/graphql";
import { type ForwardedRef, forwardRef, type ReactNode } from "react";
import { TextLink } from "components/text/TextLink";
import styled from "styled-components";
import Link from "next/link";
import { Icon } from "components/icon";
import { faPlay } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { SummaryCard } from "@/components/card/SummaryCard2";
import { Icon } from "@/components/icon/Icon";
import { TextLink } from "@/components/text/TextLink";
import { Performances } from "@/components/utils/Performances";
import { SongTitle } from "@/components/utils/SongTitle";
import { SongTitleWithArtists } from "@/components/utils/SongTitleWithArtists";
import type { VideoSummaryCardVideoFragment } from "@/generated/graphql";
import theme from "@/theme";
import createVideoSlug from "@/utils/createVideoSlug";
import extractImages from "@/utils/extractImages";
const StyledWrapper = styled.div`
position: relative;
@@ -52,12 +56,13 @@ const StyledCoverOverlay = styled.div`
interface VideoSummaryCardProps {
video: VideoSummaryCardVideoFragment;
menu?: ReactNode;
append?: ReactNode;
onPlay?(): void;
isPlaying?: boolean;
}
export const VideoSummaryCard = forwardRef(
function VideoSummaryCard({ video, menu, onPlay, isPlaying, ...props }: VideoSummaryCardProps, ref: ForwardedRef<HTMLDivElement>) {
function VideoSummaryCard({ video, menu, append, onPlay, isPlaying, ...props }: VideoSummaryCardProps, ref: ForwardedRef<HTMLDivElement>) {
const entry = video.entries[0];
const theme = entry.theme;
const anime = theme?.anime;
@@ -96,6 +101,7 @@ export const VideoSummaryCard = forwardRef(
{menu}
</StyledOverlayButtons>
) : null}
{append}
</SummaryCard>
</StyledWrapper>
);
-7
View File
@@ -1,7 +0,0 @@
export { Card } from "./Card";
export { SummaryCard } from "./SummaryCard";
export { AnimeSummaryCard } from "./AnimeSummaryCard";
export { ThemeSummaryCard } from "./ThemeSummaryCard";
export { ArtistSummaryCard } from "./ArtistSummaryCard";
export { ThemeDetailCard } from "./ThemeDetailCard";
export { ErrorCard } from "./ErrorCard";
+2 -1
View File
@@ -1,5 +1,6 @@
import styled from "styled-components";
import theme from "theme";
import theme from "@/theme";
export const SidebarContainer = styled.div`
display: grid;
-2
View File
@@ -1,2 +0,0 @@
export { Container } from "./Container";
export { SidebarContainer } from "./SidebarContainer";
@@ -1,6 +1,7 @@
import styled from "styled-components";
import { Text } from "components/text";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import styled from "styled-components";
import { Text } from "@/components/text/Text";
const StyledDescriptionList = styled.dl`
display: flex;
-1
View File
@@ -1 +0,0 @@
export { DescriptionList } from "./DescriptionList";
+6 -4
View File
@@ -1,9 +1,11 @@
import { forwardRef } from "react";
import * as RadixDialog from "@radix-ui/react-dialog";
import styled, { keyframes } from "styled-components";
import { Card } from "components/card";
import theme from "theme";
import { Text } from "components/text";
import * as RadixDialog from "@radix-ui/react-dialog";
import { Card } from "@/components/card/Card";
import { Text } from "@/components/text/Text";
import theme from "@/theme";
const overlayAnimation = keyframes`
from {
+13 -11
View File
@@ -1,18 +1,20 @@
import type { SyntheticEvent } from "react";
import { useState } from "react";
import { Button } from "components/button";
import { Input } from "components/form";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import useAuth from "hooks/useAuth";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Column, Row } from "components/box";
import { Busy } from "components/utils/Busy";
import { Toast } from "components/toast";
import { useToasts } from "context/toastContext";
import { isAxiosError } from "axios";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Toast } from "@/components/toast/Toast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import useAuth from "@/hooks/useAuth";
const StyledForm = styled.form`
display: flex;
flex-direction: column;
+12 -11
View File
@@ -1,16 +1,17 @@
import type { SyntheticEvent } from "react";
import { useState } from "react";
import { Button } from "components/button";
import { Input } from "components/form";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import useAuth from "hooks/useAuth";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Column, Row } from "components/box";
import { Busy } from "components/utils/Busy";
import Switch from "components/form/Switch";
import { ForgotPasswordDialog } from "components/dialog/ForgotPasswordDialog";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { ForgotPasswordDialog } from "@/components/dialog/ForgotPasswordDialog";
import { Input } from "@/components/form/Input";
import Switch from "@/components/form/Switch";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Busy } from "@/components/utils/Busy";
import useAuth from "@/hooks/useAuth";
const StyledForm = styled.form`
display: flex;
+14 -12
View File
@@ -1,18 +1,20 @@
import type { SyntheticEvent } from "react";
import { useState } from "react";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import { Button } from "components/button";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import { Column, Row } from "components/box";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Busy } from "components/utils/Busy";
import axios from "lib/client/axios";
import { isAxiosError } from "axios";
import { useToasts } from "context/toastContext";
import { Toast } from "components/toast";
import { AUTH_PATH } from "utils/config.mjs";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Toast } from "@/components/toast/Toast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import axios from "@/lib/client/axios";
import { AUTH_PATH } from "@/utils/config";
export function PasswordChangeDialog() {
const [open, setOpen] = useState(false);
+14 -12
View File
@@ -1,18 +1,20 @@
import type { SyntheticEvent } from "react";
import { useEffect, useState } from "react";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import { Button } from "components/button";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import { Column, Row } from "components/box";
import { Dialog, DialogContent } from "components/dialog/Dialog";
import { Busy } from "components/utils/Busy";
import { isAxiosError } from "axios";
import { useToasts } from "context/toastContext";
import { Toast } from "components/toast";
import { useRouter } from "next/router";
import useAuth from "hooks/useAuth";
import { isAxiosError } from "axios";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Toast } from "@/components/toast/Toast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import useAuth from "@/hooks/useAuth";
export function PasswordResetDialog() {
const router = useRouter();
+16 -13
View File
@@ -1,19 +1,22 @@
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button, IconTextButton } from "components/button";
import { faPlus } from "@fortawesome/pro-solid-svg-icons";
import { Column, Row } from "components/box";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import type { FormEvent, ReactNode } from "react";
import { useState } from "react";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import axios from "lib/client/axios";
import type { FormEvent, ReactNode } from "react";
import styled from "styled-components";
import { LoginGate } from "components/auth/LoginGate";
import { mutate } from "swr";
import { Busy } from "components/utils/Busy";
import { faPlus } from "@fortawesome/pro-solid-svg-icons";
import { isAxiosError } from "axios";
import { mutate } from "swr";
import { LoginGate } from "@/components/auth/LoginGate";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { IconTextButton } from "@/components/button/IconTextButton";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Busy } from "@/components/utils/Busy";
import axios from "@/lib/client/axios";
interface PlaylistAddDialogProps {
trigger?: ReactNode;
+17 -14
View File
@@ -1,21 +1,24 @@
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button, IconTextButton } from "components/button";
import { faPen } from "@fortawesome/pro-solid-svg-icons";
import { Column, Row } from "components/box";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import type { FormEvent, ReactNode } from "react";
import { useState } from "react";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import axios from "lib/client/axios";
import type { FormEvent, ReactNode } from "react";
import styled from "styled-components";
import { LoginGate } from "components/auth/LoginGate";
import { mutate } from "swr";
import { Busy } from "components/utils/Busy";
import { faPen } from "@fortawesome/pro-solid-svg-icons";
import { isAxiosError } from "axios";
import gql from "graphql-tag";
import type { PlaylistEditDialogPlaylistFragment } from "generated/graphql";
import { mutate } from "swr";
import { LoginGate } from "@/components/auth/LoginGate";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { IconTextButton } from "@/components/button/IconTextButton";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Busy } from "@/components/utils/Busy";
import type { PlaylistEditDialogPlaylistFragment } from "@/generated/graphql";
import axios from "@/lib/client/axios";
interface PlaylistEditDialogProps {
playlist: PlaylistEditDialogPlaylistFragment;
+17 -14
View File
@@ -1,19 +1,22 @@
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button, IconTextButton } from "components/button";
import { faMinus } from "@fortawesome/pro-solid-svg-icons";
import { Column, Row } from "components/box";
import { Text } from "components/text";
import type { ReactNode } from "react";
import { useState } from "react";
import axios from "lib/client/axios";
import { LoginGate } from "components/auth/LoginGate";
import { mutate } from "swr";
import { Busy } from "components/utils/Busy";
import type { ReactNode } from "react";
import { faMinus } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { useToasts } from "context/toastContext";
import { PlaylistRemoveToast } from "components/toast/PlaylistRemoveToast";
import PlaylistSummaryCard from "components/card/PlaylistSummaryCard";
import type { PlaylistRemoveDialogPlaylistFragment } from "generated/graphql";
import { mutate } from "swr";
import { LoginGate } from "@/components/auth/LoginGate";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { IconTextButton } from "@/components/button/IconTextButton";
import PlaylistSummaryCard from "@/components/card/PlaylistSummaryCard";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Text } from "@/components/text/Text";
import { PlaylistRemoveToast } from "@/components/toast/PlaylistRemoveToast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import type { PlaylistRemoveDialogPlaylistFragment } from "@/generated/graphql";
import axios from "@/lib/client/axios";
interface PlaylistRemoveDialogProps {
playlist: PlaylistRemoveDialogPlaylistFragment;
@@ -1,28 +1,31 @@
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button, IconTextButton } from "components/button";
import { faArrowDown, faListMusic, faMinus, faPlus } from "@fortawesome/pro-solid-svg-icons";
import { Column, Row } from "components/box";
import type { ReactNode } from "react";
import { useState } from "react";
import axios from "lib/client/axios";
import type { ReactNode } from "react";
import { faArrowDown, faListMusic, faMinus, faPlus } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import useSWR, { mutate } from "swr";
import { Icon } from "components/icon";
import PlaylistSummaryCard from "components/card/PlaylistSummaryCard";
import { useToasts } from "context/toastContext";
import { LoginGate } from "@/components/auth/LoginGate";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { IconTextButton } from "@/components/button/IconTextButton";
import PlaylistSummaryCard from "@/components/card/PlaylistSummaryCard";
import { VideoSummaryCard, VideoSummaryCardFragmentVideo } from "@/components/card/VideoSummaryCard";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { PlaylistAddDialog } from "@/components/dialog/PlaylistAddDialog";
import { Icon } from "@/components/icon/Icon";
import { Skeleton } from "@/components/skeleton/Skeleton";
import { Text } from "@/components/text/Text";
import { PlaylistTrackAddToast } from "@/components/toast/PlaylistTrackAddToast";
import { PlaylistTrackRemoveToast } from "@/components/toast/PlaylistTrackRemoveToast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import type {
PlaylistTrackAddDialogVideoFragment,
PlaylistTrackAddFormPlaylistQuery, PlaylistTrackAddFormPlaylistQueryVariables
} from "generated/graphql";
import { Text } from "components/text";
import { PlaylistTrackAddToast } from "components/toast/PlaylistTrackAddToast";
import { PlaylistTrackRemoveToast } from "components/toast/PlaylistTrackRemoveToast";
import { LoginGate } from "components/auth/LoginGate";
import { VideoSummaryCard, VideoSummaryCardFragmentVideo } from "components/card/VideoSummaryCard";
import gql from "graphql-tag";
import { Skeleton } from "components/skeleton/Skeleton";
import { Busy } from "components/utils/Busy";
import { fetchDataClient } from "lib/client";
import { PlaylistAddDialog } from "components/dialog/PlaylistAddDialog";
} from "@/generated/graphql";
import { fetchDataClient } from "@/lib/client";
import axios from "@/lib/client/axios";
interface PlaylistTrackAddDialogProps {
video: PlaylistTrackAddDialogVideoFragment;
@@ -1,22 +1,25 @@
import { useState } from "react";
import type { ReactNode } from "react";
import { faMinus } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { mutate } from "swr";
import { LoginGate } from "@/components/auth/LoginGate";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { IconTextButton } from "@/components/button/IconTextButton";
import { VideoSummaryCard, VideoSummaryCardFragmentVideo } from "@/components/card/VideoSummaryCard";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Text } from "@/components/text/Text";
import { PlaylistTrackRemoveToast } from "@/components/toast/PlaylistTrackRemoveToast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import type {
PlaylistTrackRemoveDialogPlaylistFragment,
PlaylistTrackRemoveDialogVideoFragment
} from "generated/graphql";
import type { ReactNode } from "react";
import { useState } from "react";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button, IconTextButton } from "components/button";
import { faMinus } from "@fortawesome/pro-solid-svg-icons";
import { LoginGate } from "components/auth/LoginGate";
import axios from "lib/client/axios";
import { Column, Row } from "components/box";
import { VideoSummaryCard, VideoSummaryCardFragmentVideo } from "components/card/VideoSummaryCard";
import { Text } from "components/text";
import { PlaylistTrackRemoveToast } from "components/toast/PlaylistTrackRemoveToast";
import { useToasts } from "context/toastContext";
import { mutate } from "swr";
import gql from "graphql-tag";
import { Busy } from "components/utils/Busy";
} from "@/generated/graphql";
import axios from "@/lib/client/axios";
interface PlaylistTrackRemoveDialogProps {
playlist: PlaylistTrackRemoveDialogPlaylistFragment;
+11 -10
View File
@@ -1,17 +1,18 @@
import type { SyntheticEvent } from "react";
import { useState } from "react";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import { Button } from "components/button";
import useAuth from "hooks/useAuth";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import Switch from "components/form/Switch";
import { Column, Row } from "components/box";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Busy } from "components/utils/Busy";
import Link from "next/link";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import Switch from "@/components/form/Switch";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Busy } from "@/components/utils/Busy";
import useAuth from "@/hooks/useAuth";
export function RegisterDialog() {
const [open, setOpen] = useState(false);
+11 -10
View File
@@ -1,15 +1,16 @@
import { type FormEvent, type ReactNode, useState } from "react";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Button } from "components/button";
import styled from "styled-components";
import { Row } from "components/box";
import useRandomThemes from "hooks/useRandomThemes";
import { Busy } from "components/utils/Busy";
import { Switcher } from "../switcher";
import { SwitcherOption } from "../switcher/Switcher";
import { Text } from "../text";
import { SearchFilter, SearchFilterGroup } from "../search-filter";
import { Input } from "../form";
import { Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { SearchFilterGroup } from "@/components/search-filter/SearchFilterGroup";
import { Switcher, SwitcherOption } from "@/components/switcher/Switcher";
import { Text } from "@/components/text/Text";
import { Busy } from "@/components/utils/Busy";
import useRandomThemes from "@/hooks/useRandomThemes";
interface ShuffleDialogProps {
trigger: ReactNode;
+15 -13
View File
@@ -1,20 +1,22 @@
import type { SyntheticEvent } from "react";
import { useState } from "react";
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Input } from "components/form";
import { Button } from "components/button";
import type { SyntheticEvent } from "react";
import styled from "styled-components";
import { Column, Row } from "components/box";
import { Dialog, DialogContent, DialogTrigger } from "components/dialog/Dialog";
import { Busy } from "components/utils/Busy";
import axios from "lib/client/axios";
import { isAxiosError } from "axios";
import { useToasts } from "context/toastContext";
import { Toast } from "components/toast";
import { AUTH_PATH } from "utils/config.mjs";
import { mutate } from "swr";
import useAuth from "../../hooks/useAuth";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/dialog/Dialog";
import { Input } from "@/components/form/Input";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import { Toast } from "@/components/toast/Toast";
import { Busy } from "@/components/utils/Busy";
import { useToasts } from "@/context/toastContext";
import useAuth from "@/hooks/useAuth";
import axios from "@/lib/client/axios";
import { AUTH_PATH } from "@/utils/config";
export function UserInformationDialog() {
const [open, setOpen] = useState(false);
@@ -1,10 +1,12 @@
import styled, { keyframes } from "styled-components";
import theme from "theme";
import Link from "next/link";
import { faArrowRight, faTrophy } from "@fortawesome/pro-solid-svg-icons";
import { Text } from "components/text";
import { Icon } from "components/icon";
import { Button } from "components/button";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import theme from "@/theme";
const EventButtonContainer = styled.div`
position: relative;
@@ -1,8 +1,10 @@
import { faChevronCircleRight } from "@fortawesome/pro-solid-svg-icons";
import { Text } from "components/text";
import { Icon } from "components/icon";
import type { ComponentPropsWithoutRef, ReactNode } from "react";
import { faChevronCircleRight } from "@fortawesome/pro-solid-svg-icons";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
interface ExternalLinkProps extends ComponentPropsWithoutRef<typeof Text> {
href?: string | null
children: ReactNode
-1
View File
@@ -1 +0,0 @@
export { ExternalLink } from "./ExternalLink";
+14 -12
View File
@@ -1,18 +1,20 @@
import { FeaturedThemePreview } from "utils/settings";
import styled, { keyframes } from "styled-components";
import theme from "theme";
import { ThemeSummaryCard } from "components/card";
import extractImages from "utils/extractImages";
import type { ReactNode } from "react";
import { useEffect, useState } from "react";
import useSetting from "hooks/useSetting";
import useCompatability from "hooks/useCompatability";
import { fetchRandomGrill } from "lib/client/randomGrill";
import createVideoSlug from "utils/createVideoSlug";
import type { ReactNode } from "react";
import styled, { keyframes } from "styled-components";
import Link from "next/link";
import { VIDEO_URL } from "utils/config.mjs";
import gql from "graphql-tag";
import type { FeaturedThemeThemeFragment } from "generated/graphql";
import { ThemeSummaryCard } from "@/components/card/ThemeSummaryCard";
import type { FeaturedThemeThemeFragment } from "@/generated/graphql";
import useCompatability from "@/hooks/useCompatability";
import useSetting from "@/hooks/useSetting";
import { fetchRandomGrill } from "@/lib/client/randomGrill";
import theme from "@/theme";
import { VIDEO_URL } from "@/utils/config";
import createVideoSlug from "@/utils/createVideoSlug";
import extractImages from "@/utils/extractImages";
import { FeaturedThemePreview } from "@/utils/settings";
const slowPan = keyframes`
from {
-1
View File
@@ -1 +0,0 @@
export { FeaturedTheme } from "./FeaturedTheme";
+9 -7
View File
@@ -1,12 +1,14 @@
import { memo, useMemo, useState } from "react";
import { Column, Row } from "components/box";
import { ThemeDetailCard } from "components/card";
import { HorizontalScroll } from "components/utils";
import { either, themeGroupComparator, themeIndexComparator, themeTypeComparator } from "utils/comparators";
import gql from "graphql-tag";
import type { AnimeThemeFilterThemeFragment } from "generated/graphql";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Text } from "components/text/Text";
import { Column, Row } from "@/components/box/Flex";
import { ThemeDetailCard } from "@/components/card/ThemeDetailCard";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { Text } from "@/components/text/Text";
import { HorizontalScroll } from "@/components/utils/HorizontalScroll";
import type { AnimeThemeFilterThemeFragment } from "@/generated/graphql";
import { either, themeGroupComparator, themeIndexComparator, themeTypeComparator } from "@/utils/comparators";
interface AnimeThemeFilterProps {
themes: Array<AnimeThemeFilterThemeFragment>
-1
View File
@@ -1 +0,0 @@
export { AnimeThemeFilter } from "./AnimeThemeFilter";
+12 -9
View File
@@ -1,13 +1,16 @@
import Link from "next/link";
import { Column, Row, Solid } from "components/box";
import { Container } from "components/container";
import { Text } from "components/text";
import { Icon } from "components/icon";
import { faDiscord, faGithub, faReddit, faTwitter } from "@fortawesome/free-brands-svg-icons";
import { Button } from "components/button";
import styled from "styled-components";
import theme from "theme";
import type { ComponentPropsWithoutRef } from "react";
import styled from "styled-components";
import Link from "next/link";
import { faDiscord, faGithub, faReddit, faTwitter } from "@fortawesome/free-brands-svg-icons";
import { Column, Row } from "@/components/box/Flex";
import { Solid } from "@/components/box/Solid";
import { Button } from "@/components/button/Button";
import { Container } from "@/components/container/Container";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import theme from "@/theme";
const StyledFooter = styled(Solid)`
margin-top: auto;
-1
View File
@@ -1 +0,0 @@
export { Footer } from "./Footer";
+9 -7
View File
@@ -1,11 +1,13 @@
import styled from "styled-components";
import theme from "theme";
import { Icon } from "components/icon";
import { faTimes } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import type { ComponentPropsWithoutRef } from "react";
import { withColorTheme } from "styles/mixins";
import styled from "styled-components";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { faTimes } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import { withColorTheme } from "@/styles/mixins";
import theme from "@/theme";
const StyledSearchInput = styled.div`
display: flex;
+5 -3
View File
@@ -1,7 +1,9 @@
import * as RadixSwitch from "@radix-ui/react-switch";
import styled from "styled-components";
import theme from "theme";
import { withColorTheme } from "styles/mixins";
import * as RadixSwitch from "@radix-ui/react-switch";
import { withColorTheme } from "@/styles/mixins";
import theme from "@/theme";
const StyledSwitch = styled(RadixSwitch.Root)`
width: 50px;
+1 -1
View File
@@ -1 +1 @@
export { Input } from "components/form/Input";
export { Input } from "@/components/form/Input";
+3 -2
View File
@@ -1,6 +1,7 @@
import styled from "styled-components";
import { Icon } from "components/icon/Icon";
import theme from "theme";
import { Icon } from "@/components/icon/Icon";
import theme from "@/theme";
export const CornerIcon = styled(Icon)`
position: absolute;
+1
View File
@@ -1,4 +1,5 @@
import type { SVGProps } from "react";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
export type FontAwesomeIconProps = SVGProps<SVGSVGElement> & {
+5 -3
View File
@@ -1,8 +1,10 @@
import { FontAwesomeIcon } from "components/icon/FontAwesomeIcon";
import styled from "styled-components";
import theme from "theme";
import type { Property } from "csstype";
import type { Colors } from "theme/colors";
import { FontAwesomeIcon } from "@/components/icon/FontAwesomeIcon";
import theme from "@/theme";
import type { Colors } from "@/theme/colors";
export const Icon = styled(FontAwesomeIcon)<{ color?: keyof Colors, transition?: Property.Transition }>`
color: ${(props) => props.color && theme.colors[props.color]};
-1
View File
@@ -1 +0,0 @@
export { Icon } from "./Icon";
+7 -5
View File
@@ -1,10 +1,12 @@
import extractImages from "utils/extractImages";
import { AspectRatio } from "components/utils";
import { FullWidthImage } from "components/image";
import gql from "graphql-tag";
import type { CoverImageResourceWithImagesFragment } from "generated/graphql";
import type { ComponentPropsWithoutRef } from "react";
import gql from "graphql-tag";
import { FullWidthImage } from "@/components/image/FullWidthImage";
import { AspectRatio } from "@/components/utils/AspectRatio";
import type { CoverImageResourceWithImagesFragment } from "@/generated/graphql";
import extractImages from "@/utils/extractImages";
interface CoverImageProps extends ComponentPropsWithoutRef<typeof FullWidthImage> {
resourceWithImages: CoverImageResourceWithImagesFragment
}
+2 -1
View File
@@ -1,5 +1,6 @@
import styled from "styled-components";
import theme from "theme";
import theme from "@/theme";
export const FullWidthImage = styled.img`
width: 100%;
+4 -3
View File
@@ -1,7 +1,8 @@
import styled from "styled-components";
import theme from "theme";
import { Logo } from "components/image/Logo";
import type { ComponentPropsWithoutRef } from "react";
import styled from "styled-components";
import { Logo } from "@/components/image/Logo";
import theme from "@/theme";
const StyledPlaceholder = styled.div`
width: 100%;
+7 -5
View File
@@ -1,10 +1,12 @@
import extractImages from "utils/extractImages";
import { AspectRatio } from "components/utils";
import styled, { css } from "styled-components";
import type { ComponentPropsWithoutRef } from "react";
import type { MultiCoverImageResourceWithImagesFragment } from "generated/graphql";
import styled, { css } from "styled-components";
import gql from "graphql-tag";
import { LogoPlaceholder } from "components/image/LogoPlaceholder";
import { LogoPlaceholder } from "@/components/image/LogoPlaceholder";
import { AspectRatio } from "@/components/utils/AspectRatio";
import type { MultiCoverImageResourceWithImagesFragment } from "@/generated/graphql";
import extractImages from "@/utils/extractImages";
function getTranslationX(item: number, itemCount: number) {
switch (itemCount) {
+2 -1
View File
@@ -1,7 +1,8 @@
import gql from "graphql-tag";
import type { ProfileImageUserFragment } from "generated/graphql";
import md5 from "md5";
import type { ProfileImageUserFragment } from "@/generated/graphql";
interface ProfileImageProps {
user: ProfileImageUserFragment;
size?: number;
+9 -6
View File
@@ -1,12 +1,15 @@
import extractImages from "utils/extractImages";
import { AspectRatio } from "components/utils";
import { FullWidthImage, MultiCoverImage } from "components/image";
import gql from "graphql-tag";
import type { ComponentPropsWithoutRef } from "react";
import { useState } from "react";
import type { StudioCoverImageStudioFragment } from "generated/graphql";
import type { ComponentPropsWithoutRef } from "react";
import styled from "styled-components";
import gql from "graphql-tag";
import { FullWidthImage } from "@/components/image/FullWidthImage";
import { MultiCoverImage } from "@/components/image/MultiCoverImage";
import { AspectRatio } from "@/components/utils/AspectRatio";
import type { StudioCoverImageStudioFragment } from "@/generated/graphql";
import extractImages from "@/utils/extractImages";
const StyledImage = styled(FullWidthImage)`
object-fit: contain;
background-size: contain;
-4
View File
@@ -1,4 +0,0 @@
export { FullWidthImage } from "./FullWidthImage";
export { CoverImage } from "./CoverImage";
export { MultiCoverImage } from "./MultiCoverImage";
export { Logo } from "./Logo";
+6 -4
View File
@@ -1,9 +1,11 @@
import type { ReactNode } from "react";
import React from "react";
import Link from "next/link";
import { groupBy } from "lodash-es";
import { Text } from "components/text";
import type { ReactNode } from "react";
import styled from "styled-components";
import Link from "next/link";
import { groupBy } from "lodash-es";
import { Text } from "@/components/text/Text";
const StyledLetterList = styled.div`
display: flex;
-1
View File
@@ -1 +0,0 @@
export { AlphabeticalIndex } from "./AlphabeticalIndex";
+9 -7
View File
@@ -1,11 +1,13 @@
import styled from "styled-components";
import { faCheck, faSort, faTimes } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import theme from "theme";
import * as RadixSelect from "@radix-ui/react-select";
import { flipDown } from "styles/animations";
import { Icon } from "components/icon";
import { forwardRef } from "react";
import styled from "styled-components";
import { faCheck, faSort, faTimes } from "@fortawesome/pro-solid-svg-icons";
import * as RadixSelect from "@radix-ui/react-select";
import { Button } from "@/components/button/Button";
import { Icon } from "@/components/icon/Icon";
import { flipDown } from "@/styles/animations";
import theme from "@/theme";
// Radix' listbox can't handle null values, so we are giving it a fake null value.
const NULL_VALUE = "__NULL__";
+8 -6
View File
@@ -1,13 +1,15 @@
import type { ComponentPropsWithoutRef } from "react";
import styled from "styled-components";
import type { MDXRemoteSerializeResult } from "next-mdx-remote";
import { MDXRemote } from "next-mdx-remote";
import type { ComponentPropsWithoutRef } from "react";
import { TextLink } from "components/text/TextLink";
import { Text } from "components/text";
import { Card } from "components/card";
import styled from "styled-components";
import theme from "theme";
import type { MDXComponents } from "mdx/types";
import { Card } from "@/components/card/Card";
import { Text } from "@/components/text/Text";
import { TextLink } from "@/components/text/TextLink";
import theme from "@/theme";
const StyledMarkdown = styled.div`
line-height: 1.75;
word-break: break-word;
+5 -3
View File
@@ -1,9 +1,11 @@
import type { Heading } from "utils/rehypeExtractHeadings";
import { useEffect, useState } from "react";
import { Text } from "components/text";
import styled from "styled-components";
import { m } from "framer-motion";
import theme from "theme";
import { Text } from "@/components/text/Text";
import theme from "@/theme";
import type { Heading } from "@/utils/rehypeExtractHeadings";
const StyledTableOfContents = styled.ul`
position: sticky;
+5 -3
View File
@@ -1,10 +1,12 @@
import styled from "styled-components";
import theme from "theme";
import { flipDown } from "styles/animations";
import { forwardRef } from "react";
import styled from "styled-components";
import type { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
import { flipDown } from "@/styles/animations";
import theme from "@/theme";
const StyledMenuContent = styled(RadixMenu.Content)`
width: max-content;
max-height: var(--radix-dropdown-menu-content-available-height);
+54
View File
@@ -0,0 +1,54 @@
import type { ReactNode } from "react";
import { faShare } from "@fortawesome/pro-solid-svg-icons";
import { IconTextButton } from "@/components/button/IconTextButton";
import { Menu, MenuContent, MenuItem, MenuTrigger } from "@/components/menu/Menu";
import { Toast } from "@/components/toast/Toast";
import { useToasts } from "@/context/toastContext";
import useSetting from "@/hooks/useSetting";
import { BASE_PATH } from "@/utils/config";
import { AudioMode } from "@/utils/settings";
interface ShareMenuProps {
pagePath: string;
videoUrl: string;
audioUrl: string;
trigger?: ReactNode;
}
export function ShareMenu({ pagePath, videoUrl, audioUrl, trigger }: ShareMenuProps) {
const { dispatchToast } = useToasts();
const [audioMode] = useSetting(AudioMode, { storageSync: false });
function saveToClipboard(url: string) {
navigator.clipboard.writeText(url)
.then(() => dispatchToast("clipboard", <Toast>Copied to clipboard!</Toast>));
}
return (
<Menu modal={false}>
<MenuTrigger asChild>
{trigger ?? <IconTextButton icon={faShare} variant="solid" collapsible="socialListMax">Share</IconTextButton>}
</MenuTrigger>
<MenuContent>
<MenuItem onSelect={() => saveToClipboard(location.origin + BASE_PATH + pagePath)}>Copy URL to this Page</MenuItem>
{audioMode === AudioMode.ENABLED ? (
<>
<MenuItem onSelect={() => saveToClipboard(audioUrl)}>Copy URL to Embeddable Audio</MenuItem>
<a href={`${audioUrl}?download`}>
<MenuItem>Download Audio</MenuItem>
</a>
</>
) : (
<>
<MenuItem onSelect={() => saveToClipboard(videoUrl)}>Copy URL to Embeddable Video</MenuItem>
<a href={`${videoUrl}?download`}>
<MenuItem>Download Video</MenuItem>
</a>
</>
)}
</MenuContent>
</Menu>
);
}
+10 -9
View File
@@ -1,14 +1,15 @@
import { Icon } from "components/icon";
import { faEllipsisV, faListMusic } from "@fortawesome/pro-solid-svg-icons";
import { Text } from "components/text";
import type { ThemeMenuThemeFragment } from "generated/graphql";
import { PlaylistTrackAddDialog } from "components/dialog/PlaylistTrackAddDialog";
import gql from "graphql-tag";
import { SongTitleWithArtists } from "components/utils";
import extractImages from "utils/extractImages";
import createVideoSlug from "utils/createVideoSlug";
import { Menu, MenuContent, MenuItem, MenuTrigger } from "components/menu/Menu";
import { Button } from "components/button";
import { Button } from "@/components/button/Button";
import { PlaylistTrackAddDialog } from "@/components/dialog/PlaylistTrackAddDialog";
import { Icon } from "@/components/icon/Icon";
import { Menu, MenuContent, MenuItem, MenuTrigger } from "@/components/menu/Menu";
import { Text } from "@/components/text/Text";
import { SongTitleWithArtists } from "@/components/utils/SongTitleWithArtists";
import type { ThemeMenuThemeFragment } from "@/generated/graphql";
import createVideoSlug from "@/utils/createVideoSlug";
import extractImages from "@/utils/extractImages";
interface ThemeMenuProps {
theme: ThemeMenuThemeFragment;
@@ -1,8 +1,9 @@
import styled, { css } from "styled-components";
import { Container } from "components/container";
import theme from "theme";
import { Logo } from "components/image";
import { ProfileImage } from "components/image/ProfileImage";
import { Container } from "@/components/container/Container";
import { Logo } from "@/components/image/Logo";
import { ProfileImage } from "@/components/image/ProfileImage";
import theme from "@/theme";
export const StyledNavigation = styled.nav<{ $floating: boolean }>`
position: sticky;
+8 -6
View File
@@ -1,6 +1,11 @@
import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import { faRandom, faSearch, faTv, faUser } from "@fortawesome/pro-solid-svg-icons";
import { IconTextButton } from "@/components/button/IconTextButton";
import { ShuffleDialog } from "@/components/dialog/ShuffleDialog";
import {
StyledLogo,
StyledLogoContainer,
@@ -9,12 +14,9 @@ import {
StyledNavigationLinks,
StyledProfileImage,
StyledProfileImageIcon
} from "./Navigation.style";
import { IconTextButton } from "components/button";
import useCurrentSeason from "hooks/useCurrentSeason";
import { useRouter } from "next/router";
import useAuth from "hooks/useAuth";
import { ShuffleDialog } from "../dialog/ShuffleDialog";
} from "@/components/navigation/Navigation.style";
import useAuth from "@/hooks/useAuth";
import useCurrentSeason from "@/hooks/useCurrentSeason";
export function Navigation() {
const { me } = useAuth();
@@ -1,15 +1,16 @@
import { useCallback, useEffect, useRef, useState } from "react";
import Link from "next/link";
import { Text } from "components/text";
import { Input } from "components/form";
import { HorizontalScroll } from "components/utils";
import { Switcher } from "components/switcher";
import styled from "styled-components";
import theme from "theme";
import Link from "next/link";
import { useRouter } from "next/router";
import { debounce } from "lodash-es";
import { faSearch } from "@fortawesome/pro-solid-svg-icons";
import { SwitcherOption, SwitcherReset } from "components/switcher/Switcher";
import { debounce } from "lodash-es";
import { Input } from "@/components/form/Input";
import { Switcher, SwitcherOption, SwitcherReset } from "@/components/switcher/Switcher";
import { Text } from "@/components/text/Text";
import { HorizontalScroll } from "@/components/utils/HorizontalScroll";
import theme from "@/theme";
const StyledSearchOptions = styled.div`
display: grid;
@@ -1,10 +1,10 @@
import { Row } from "components/box";
import { Switcher } from "components/switcher";
import Link from "next/link";
import { HorizontalScroll } from "components/utils";
import type { YearDetailPageProps } from "pages/year/[year]";
import { SwitcherOption } from "components/switcher/Switcher";
import type { SeasonDetailPageProps } from "pages/year/[year]/[season]";
import { Row } from "@/components/box/Flex";
import { Switcher, SwitcherOption } from "@/components/switcher/Switcher";
import { HorizontalScroll } from "@/components/utils/HorizontalScroll";
import type { YearDetailPageProps } from "@/pages/year/[year]";
import type { SeasonDetailPageProps } from "@/pages/year/[year]/[season]";
export function SeasonNavigation(props: YearDetailPageProps | SeasonDetailPageProps) {
const { year } = props;
+6 -5
View File
@@ -1,9 +1,10 @@
import Link from "next/link";
import { Button } from "components/button";
import styled from "styled-components";
import { Row } from "components/box";
import { Text } from "components/text";
import type { YearDetailPageProps } from "pages/year/[year]";
import Link from "next/link";
import { Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { Text } from "@/components/text/Text";
import type { YearDetailPageProps } from "@/pages/year/[year]";
const StyledYear = styled.div`
flex: 1;
-4
View File
@@ -1,4 +0,0 @@
export { Navigation } from "./Navigation";
export { SeasonNavigation } from "./SeasonNavigation";
export { YearNavigation } from "./YearNavigation";
export { SearchNavigation } from "./SearchNavigation";
@@ -1,6 +1,6 @@
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
const letters = createLetters();
@@ -1,6 +1,6 @@
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
interface SearchFilterMediaFormatProps {
value: string | null
@@ -1,6 +1,6 @@
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
interface SearchFilterSeasonProps {
value: string | null
@@ -1,8 +1,9 @@
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import type { ReactNode } from "react";
import type { ListboxOptionProps } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import type { ListboxOptionProps } from "@/components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
interface SearchFilterSortByProps<T extends string | null> {
children: ReactNode
@@ -1,6 +1,6 @@
import { Text } from "components/text";
import { SearchFilter } from "components/search-filter";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
interface SearchFilterThemeTypeProps {
value: string | null
@@ -1,7 +1,7 @@
import { Text } from "components/text";
import useYearList from "hooks/useYearList";
import { SearchFilter } from "components/search-filter";
import { Listbox, ListboxOption } from "components/listbox/Listbox";
import { Listbox, ListboxOption } from "@/components/listbox/Listbox";
import { SearchFilter } from "@/components/search-filter/SearchFilter";
import { Text } from "@/components/text/Text";
import useYearList from "@/hooks/useYearList";
interface SearchFilterYearProps {
value: string | null
-7
View File
@@ -1,7 +0,0 @@
export { SearchFilter } from "./SearchFilter";
export { SearchFilterGroup } from "./SearchFilterGroup";
export { SearchFilterFirstLetter } from "./SearchFilterFirstLetter";
export { SearchFilterSeason } from "./SearchFilterSeason";
export { SearchFilterYear } from "./SearchFilterYear";
export { SearchFilterThemeType } from "./SearchFilterThemeType";
export { SearchFilterSortBy } from "./SearchFilterSortBy";
+12 -12
View File
@@ -1,17 +1,17 @@
import {
SearchFilterFirstLetter,
SearchFilterSeason,
SearchFilterSortBy,
SearchFilterYear
} from "components/search-filter";
import { SearchEntity } from "components/search";
import { AnimeSummaryCard } from "components/card";
import { useState } from "react";
import gql from "graphql-tag";
import type { SearchAnimeQuery, SearchAnimeQueryVariables } from "generated/graphql";
import { fetchDataClient } from "lib/client";
import useFilterStorage from "hooks/useFilterStorage";
import { SearchFilterMediaFormat } from "components/search-filter/SearchFilterMediaFormat";
import { AnimeSummaryCard } from "@/components/card/AnimeSummaryCard";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterFirstLetter } from "@/components/search-filter/SearchFilterFirstLetter";
import { SearchFilterMediaFormat } from "@/components/search-filter/SearchFilterMediaFormat";
import { SearchFilterSeason } from "@/components/search-filter/SearchFilterSeason";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import { SearchFilterYear } from "@/components/search-filter/SearchFilterYear";
import type { SearchAnimeQuery, SearchAnimeQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
firstLetter: null,
+9 -6
View File
@@ -1,11 +1,14 @@
import { SearchFilterFirstLetter, SearchFilterSortBy } from "components/search-filter";
import { SearchEntity } from "components/search";
import { ArtistSummaryCard } from "components/card";
import { useState } from "react";
import { fetchDataClient } from "lib/client";
import type { SearchArtistQuery, SearchArtistQueryVariables } from "generated/graphql";
import gql from "graphql-tag";
import useFilterStorage from "hooks/useFilterStorage";
import { ArtistSummaryCard } from "@/components/card/ArtistSummaryCard";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterFirstLetter } from "@/components/search-filter/SearchFilterFirstLetter";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import type { SearchArtistQuery, SearchArtistQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
firstLetter: null,
+12 -10
View File
@@ -1,14 +1,16 @@
import { faChevronDown, faSpinner } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import { Text } from "components/text";
import { Column, Row } from "components/box";
import { Icon } from "components/icon";
import { SearchFilterGroup } from "components/search-filter";
import { ErrorCard } from "components/card";
import useEntitySearch from "hooks/useEntitySearch";
import type { ReactNode } from "react";
import type { SearchArgs } from "generated/graphql";
import type { SimpleSearchArgs } from "lib/client/search";
import { faChevronDown, faSpinner } from "@fortawesome/pro-solid-svg-icons";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { ErrorCard } from "@/components/card/ErrorCard";
import { Icon } from "@/components/icon/Icon";
import { SearchFilterGroup } from "@/components/search-filter/SearchFilterGroup";
import { Text } from "@/components/text/Text";
import type { SearchArgs } from "@/generated/graphql";
import useEntitySearch from "@/hooks/useEntitySearch";
import type { SimpleSearchArgs } from "@/lib/client/search";
interface SearchEntityProps<T> {
entity: string
+19 -13
View File
@@ -1,17 +1,23 @@
import Link from "next/link";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import { Button } from "components/button";
import { Text } from "components/text";
import { Column, Row } from "components/box";
import { Icon } from "components/icon";
import { useQuery } from "react-query";
import { AnimeSummaryCard, ArtistSummaryCard, ErrorCard, SummaryCard, ThemeSummaryCard } from "components/card";
import { useRouter } from "next/router";
import { fetchDataClient } from "lib/client";
import gql from "graphql-tag";
import type { SearchGlobalQuery, SearchGlobalQueryVariables } from "generated/graphql";
import type { ReactNode } from "react";
import PlaylistSummaryCard from "components/card/PlaylistSummaryCard";
import Link from "next/link";
import { useRouter } from "next/router";
import { faChevronDown } from "@fortawesome/pro-solid-svg-icons";
import gql from "graphql-tag";
import { useQuery } from "react-query";
import { Column, Row } from "@/components/box/Flex";
import { Button } from "@/components/button/Button";
import { AnimeSummaryCard } from "@/components/card/AnimeSummaryCard";
import { ArtistSummaryCard } from "@/components/card/ArtistSummaryCard";
import { ErrorCard } from "@/components/card/ErrorCard";
import PlaylistSummaryCard from "@/components/card/PlaylistSummaryCard";
import { SummaryCard } from "@/components/card/SummaryCard";
import { ThemeSummaryCard } from "@/components/card/ThemeSummaryCard";
import { Icon } from "@/components/icon/Icon";
import { Text } from "@/components/text/Text";
import type { SearchGlobalQuery, SearchGlobalQueryVariables } from "@/generated/graphql";
import { fetchDataClient } from "@/lib/client";
interface SearchGlobalProps {
searchQuery?: string
+8 -6
View File
@@ -1,11 +1,13 @@
import { SearchFilterSortBy } from "components/search-filter";
import { SearchEntity } from "components/search";
import { useState } from "react";
import gql from "graphql-tag";
import type { SearchPlaylistQuery, SearchPlaylistQueryVariables } from "generated/graphql";
import { fetchDataClient } from "lib/client";
import useFilterStorage from "hooks/useFilterStorage";
import PlaylistSummaryCard from "components/card/PlaylistSummaryCard";
import PlaylistSummaryCard from "@/components/card/PlaylistSummaryCard";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import type { SearchPlaylistQuery, SearchPlaylistQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
sortBy: "name",
+9 -6
View File
@@ -1,11 +1,14 @@
import { SearchFilterFirstLetter, SearchFilterSortBy } from "components/search-filter";
import { SearchEntity } from "components/search";
import { SummaryCard } from "components/card";
import { useState } from "react";
import { fetchDataClient } from "lib/client";
import type { SearchSeriesQuery, SearchSeriesQueryVariables } from "generated/graphql";
import gql from "graphql-tag";
import useFilterStorage from "hooks/useFilterStorage";
import { SummaryCard } from "@/components/card/SummaryCard";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterFirstLetter } from "@/components/search-filter/SearchFilterFirstLetter";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import type { SearchSeriesQuery, SearchSeriesQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
firstLetter: null,
+10 -7
View File
@@ -1,12 +1,15 @@
import { SearchFilterFirstLetter, SearchFilterSortBy } from "components/search-filter";
import { SearchEntity } from "components/search";
import { useState } from "react";
import { fetchDataClient } from "lib/client";
import type { SearchStudioQuery, SearchStudioQueryVariables } from "generated/graphql";
import gql from "graphql-tag";
import { StudioCoverImage } from "components/image/StudioCoverImage";
import useFilterStorage from "hooks/useFilterStorage";
import { StudioSummaryCard } from "components/card/StudioSummaryCard";
import { StudioSummaryCard } from "@/components/card/StudioSummaryCard";
import { StudioCoverImage } from "@/components/image/StudioCoverImage";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterFirstLetter } from "@/components/search-filter/SearchFilterFirstLetter";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import type { SearchStudioQuery, SearchStudioQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
firstLetter: null,
+10 -6
View File
@@ -1,11 +1,15 @@
import { SearchFilterFirstLetter, SearchFilterSortBy, SearchFilterThemeType } from "components/search-filter";
import { SearchEntity } from "components/search";
import { ThemeSummaryCard } from "components/card";
import { useState } from "react";
import { fetchDataClient } from "lib/client";
import type { SearchThemeQuery, SearchThemeQueryVariables } from "generated/graphql";
import gql from "graphql-tag";
import useFilterStorage from "hooks/useFilterStorage";
import { ThemeSummaryCard } from "@/components/card/ThemeSummaryCard";
import { SearchEntity } from "@/components/search/SearchEntity";
import { SearchFilterFirstLetter } from "@/components/search-filter/SearchFilterFirstLetter";
import { SearchFilterSortBy } from "@/components/search-filter/SearchFilterSortBy";
import { SearchFilterThemeType } from "@/components/search-filter/SearchFilterThemeType";
import type { SearchThemeQuery, SearchThemeQueryVariables } from "@/generated/graphql";
import useFilterStorage from "@/hooks/useFilterStorage";
import { fetchDataClient } from "@/lib/client";
const initialFilter = {
firstLetter: null,

Some files were not shown because too many files have changed in this diff Show More