diff --git a/.gitignore b/.gitignore
index c1491a3..b78acfb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@ src/graphql/generated.ts
# next.js
/.next/
/out/
+src/pages.old
# production
/build
diff --git a/.prettierignore b/.prettierignore
index a680367..35a849b 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,2 @@
.next
+public/local-data
diff --git a/next.config.js b/next.config.js
index 50cd568..809ac5a 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,17 +1,9 @@
-/* CONFIG */
-
-const locales = ["en", "es", "fr", "pt-br", "ja"];
-
-/* END CONFIG */
-
/* @type {import('next').NextConfig} */
module.exports = {
- swcMinify: true,
reactStrictMode: true,
poweredByHeader: false,
- i18n: {
- locales: locales,
- defaultLocale: "en",
+ experimental: {
+ appDir: true,
},
images: {
domains: ["img.accords-library.com", "watch.accords-library.com"],
diff --git a/package-lock.json b/package-lock.json
index b0a93e5..0556a5f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,60 +6,60 @@
"": {
"name": "accords-library.com",
"dependencies": {
- "@fontsource/material-icons": "^4.5.4",
- "@fontsource/material-icons-outlined": "^4.5.4",
- "@fontsource/opendyslexic": "^4.5.4",
- "@fontsource/share-tech-mono": "^4.5.9",
- "@fontsource/vollkorn": "^4.5.12",
- "@fontsource/zen-maru-gothic": "^4.5.13",
- "@tippyjs/react": "^4.2.6",
- "autoprefixer": "^10.4.13",
- "cuid": "^2.1.8",
- "graphql-request": "^5.0.0",
- "jotai": "^1.9.0",
- "markdown-to-jsx": "^7.1.7",
- "next": "^12.3.1",
- "nodemailer": "^6.8.0",
- "rc-slider": "^10.0.1",
+ "@fontsource/material-icons": "4.5.4",
+ "@fontsource/material-icons-outlined": "4.5.4",
+ "@fontsource/opendyslexic": "4.5.4",
+ "@fontsource/share-tech-mono": "4.5.9",
+ "@fontsource/vollkorn": "4.5.12",
+ "@fontsource/zen-maru-gothic": "4.5.13",
+ "@tippyjs/react": "4.2.6",
+ "autoprefixer": "10.4.13",
+ "graphql-request": "5.0.0",
+ "jotai": "1.9.1",
+ "markdown-to-jsx": "7.1.7",
+ "next": "13.0.2",
+ "nodemailer": "6.8.0",
+ "rc-slider": "10.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
- "react-hotkeys-hook": "^3.4.7",
- "react-swipeable": "^7.0.0",
- "react-zoom-pan-pinch": "^2.1.3",
- "string-natural-compare": "^3.0.1",
- "throttle-debounce": "^5.0.0",
- "tippy.js": "^6.3.7",
- "turndown": "^7.1.1",
- "ua-parser-js": "^1.0.32",
- "usehooks-ts": "^2.9.1"
+ "react-hotkeys-hook": "3.4.7",
+ "react-swipeable": "7.0.0",
+ "react-zoom-pan-pinch": "2.1.3",
+ "string-natural-compare": "3.0.1",
+ "throttle-debounce": "5.0.0",
+ "tippy.js": "6.3.7",
+ "turndown": "7.1.1",
+ "ua-parser-js": "1.0.32",
+ "usehooks-ts": "2.9.1"
},
"devDependencies": {
- "@digitak/esrun": "^3.2.14",
- "@graphql-codegen/cli": "^2.13.8",
- "@graphql-codegen/typescript": "2.8.0",
- "@graphql-codegen/typescript-graphql-request": "^4.5.7",
- "@graphql-codegen/typescript-operations": "^2.5.5",
- "@types/node": "18.11.7",
- "@types/nodemailer": "^6.4.6",
+ "@digitak/esrun": "3.2.14",
+ "@graphql-codegen/cli": "2.13.11",
+ "@graphql-codegen/typescript": "2.8.1",
+ "@graphql-codegen/typescript-graphql-request": "4.5.8",
+ "@graphql-codegen/typescript-operations": "2.5.6",
+ "@types/node": "18.11.9",
+ "@types/nodemailer": "6.4.6",
"@types/react": "18.0.22",
- "@types/react-dom": "^18.0.8",
- "@types/string-natural-compare": "^3.0.2",
- "@types/throttle-debounce": "^5.0.0",
- "@types/turndown": "^5.0.1",
- "@types/ua-parser-js": "^0.7.36",
- "@typescript-eslint/eslint-plugin": "^5.41.0",
- "@typescript-eslint/parser": "^5.41.0",
- "dotenv": "^16.0.3",
- "eslint": "^8.26.0",
- "eslint-config-next": "12.3.1",
- "eslint-plugin-import": "^2.26.0",
- "graphql": "^16.6.0",
- "next-sitemap": "^3.1.29",
- "prettier": "^2.7.1",
- "prettier-plugin-tailwindcss": "^0.1.13",
- "tailwindcss": "^3.2.1",
- "ts-unused-exports": "^8.0.0",
- "typescript": "^4.8.4"
+ "@types/react-dom": "18.0.8",
+ "@types/string-natural-compare": "3.0.2",
+ "@types/throttle-debounce": "5.0.0",
+ "@types/turndown": "5.0.1",
+ "@types/ua-parser-js": "0.7.36",
+ "@typescript-eslint/eslint-plugin": "5.42.0",
+ "@typescript-eslint/parser": "5.42.0",
+ "cuid": "2.1.8",
+ "dotenv": "16.0.3",
+ "eslint": "8.26.0",
+ "eslint-config-next": "13.0.2",
+ "eslint-plugin-import": "2.26.0",
+ "graphql": "16.6.0",
+ "next-sitemap": "3.1.30",
+ "prettier": "2.7.1",
+ "prettier-plugin-tailwindcss": "0.1.13",
+ "tailwindcss": "3.2.1",
+ "ts-unused-exports": "8.0.0",
+ "typescript": "4.8.4"
}
},
"node_modules/@ampproject/remapping": {
@@ -404,12 +404,12 @@
}
},
"node_modules/@babel/helper-skip-transparent-expression-wrappers": {
- "version": "7.18.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz",
- "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz",
+ "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.18.9"
+ "@babel/types": "^7.20.0"
},
"engines": {
"node": ">=6.9.0"
@@ -685,9 +685,9 @@
}
},
"node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.19.4.tgz",
- "integrity": "sha512-934S2VLLlt2hRJwPf4MczaOr4hYF0z+VKPwqTNxyKX7NthTiPfhuKFWQZHXRM0vh/wo/VyXB3s4bZUNA08l+tQ==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.0.tgz",
+ "integrity": "sha512-sXOohbpHZSk7GjxK9b3dKB7CfqUD5DwOH+DggKzOQ7TXYP+RCSbRykfjQmn/zq+rBjycVRtLf9pYhAaEJA786w==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.19.0"
@@ -738,9 +738,9 @@
}
},
"node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.19.4.tgz",
- "integrity": "sha512-t0j0Hgidqf0aM86dF8U+vXYReUgJnlv4bZLsyoPnwZNrGY+7/38o8YjaELrvHeVfTZao15kjR0PVv0nju2iduA==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.0.tgz",
+ "integrity": "sha512-1dIhvZfkDVx/zn2S1aFwlruspTt4189j7fEkH0Y0VyuDM6bQt7bD6kLcz3l4IlLG+e5OReaBz9ROAbttRtUHqA==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.19.0"
@@ -864,12 +864,12 @@
}
},
"node_modules/@babel/plugin-transform-parameters": {
- "version": "7.18.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz",
- "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==",
+ "version": "7.20.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.1.tgz",
+ "integrity": "sha512-nDvKLrAvl+kf6BOy1UJ3MGwzzfTMgppxwiD2Jb4LO3xjYyZq30oQzDNJbCQpMdG9+j2IXHoiMrw5Cm/L6ZoxXQ==",
"dev": true,
"dependencies": {
- "@babel/helper-plugin-utils": "^7.18.6"
+ "@babel/helper-plugin-utils": "^7.19.0"
},
"engines": {
"node": ">=6.9.0"
@@ -1033,9 +1033,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
- "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.0.tgz",
+ "integrity": "sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg==",
"devOptional": true,
"dependencies": {
"@babel/helper-string-parser": "^7.19.4",
@@ -1097,22 +1097,6 @@
"integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
"dev": true
},
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/@eslint/eslintrc": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
@@ -1182,16 +1166,16 @@
"integrity": "sha512-GM3dDQXCrhoLR/Cg8C3FrmlZPtSapl7X9qTbnIHvzuSk5VX7mzb3qehmoMZiYZZ2UCFmdFac+zlMeUoQ9yvKDg=="
},
"node_modules/@graphql-codegen/cli": {
- "version": "2.13.8",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.13.8.tgz",
- "integrity": "sha512-xX+lT51nMBD3b6lDyA+BDyJoEKnsPMctM/Fx8st0gEy7ZgdWLrsgOBOn4k71yyejOy3CHnRV5LMKWdhiQDaYsA==",
+ "version": "2.13.11",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.13.11.tgz",
+ "integrity": "sha512-PJF36a1i6M7Btj1kB4PWWzBUO3u2BJzsd/6KXxRmEugcxrbaCnbTDDktopy0CZYKdqaFbXaowwbRY8Tk8DV99Q==",
"dev": true,
"dependencies": {
"@babel/generator": "^7.18.13",
"@babel/template": "^7.18.10",
"@babel/types": "^7.18.13",
- "@graphql-codegen/core": "2.6.2",
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/core": "2.6.5",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/apollo-engine-loader": "^7.3.6",
"@graphql-tools/code-file-loader": "^7.3.1",
"@graphql-tools/git-loader": "^7.2.1",
@@ -1400,30 +1384,42 @@
}
},
"node_modules/@graphql-codegen/core": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.2.tgz",
- "integrity": "sha512-58T5yf9nEfAhDwN1Vz1hImqpdJ/gGpCGUaroQ5tqskZPf7eZYYVkEXbtqRZZLx1MCCKwjWX4hMtTPpHhwKCkng==",
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.5.tgz",
+ "integrity": "sha512-oSbM8vINFxcV1GUasJTDIemMpEG1t6NkBG8odQCt/3ZExCYmoviHhG9vJB89QqJeU5W06qQB6SJn/dg/gv5Aqg==",
"dev": true,
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/schema": "^9.0.0",
- "@graphql-tools/utils": "^8.8.0",
+ "@graphql-tools/utils": "9.0.0",
"tslib": "~2.4.0"
},
"peerDependencies": {
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
}
},
+ "node_modules/@graphql-codegen/core/node_modules/@graphql-tools/utils": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.0.0.tgz",
+ "integrity": "sha512-kaCwyWnURxMsYbxzkfylLqFFelu83jKk3BJOOy0GIuxEtgXVS9v7Y/tojljo69Q+jaZ2YxAi3+d8IpM+hx768A==",
+ "dev": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ },
+ "peerDependencies": {
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
+ }
+ },
"node_modules/@graphql-codegen/core/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
},
"node_modules/@graphql-codegen/plugin-helpers": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.1.tgz",
- "integrity": "sha512-wpEShhwbQp8pqXolnSCNaj0pU91LbuBvYHpYqm96TUqyeKQYAYRVmw3JIt0g8UQpKYhg8lYIDwWdcINOYqkGLg==",
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz",
+ "integrity": "sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg==",
"dev": true,
"dependencies": {
"@graphql-tools/utils": "^8.8.0",
@@ -1464,14 +1460,14 @@
"dev": true
},
"node_modules/@graphql-codegen/typescript": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.8.0.tgz",
- "integrity": "sha512-atQ6NFfMmoknJi0QdVSozPugKcgeJB6t1/cVskbhVtX8tAEFFLjl6H23mpz3t35AH6aGWtvx2LCjUSxHI6P6xA==",
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.8.1.tgz",
+ "integrity": "sha512-kweV1DOOH2blvMheVL55TT0s9bxkmF/zijN9mdk9pRD20i/rI/46qbh8fNKqy/PV12vZOmZGNL6tigdghG2bqg==",
"dev": true,
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-codegen/schema-ast": "^2.5.1",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -1480,13 +1476,13 @@
}
},
"node_modules/@graphql-codegen/typescript-graphql-request": {
- "version": "4.5.7",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.5.7.tgz",
- "integrity": "sha512-1YPaCO+0q5z0Um6Om+5LMWdB8+WQxda8eXRXwy0dqSGRy9X5HTZz/pxqaTgy76yMtPBxq1UNa7lruBTzszHhJg==",
+ "version": "4.5.8",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.5.8.tgz",
+ "integrity": "sha512-XsuAA35Ou03LsklNgnIWXZ5HOHsJ5w1dBuDKtvqM9rD0cAI8x0f4TY0n6O1EraSBSvyHLP3npb1lOTPZzG2TjA==",
"dev": true,
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^2.7.1",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -1503,14 +1499,14 @@
"dev": true
},
"node_modules/@graphql-codegen/typescript-operations": {
- "version": "2.5.5",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.5.5.tgz",
- "integrity": "sha512-rH15UA34MRf6cITfvt2EkSEaC/8ULvgMg5kzun6895oucA8PFyAFJaQzcjk9UraeD3ddMu56OKhZGdxd0JWfKw==",
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.5.6.tgz",
+ "integrity": "sha512-7WqOsVMTUXf+tdt0jGOBuQINLYjPIGlcsnkzXQSPJ7rSGVj99VobVuwgmAeFmJctZ3lgwx3gjPZ0dyCIOBc2/A==",
"dev": true,
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
- "@graphql-codegen/typescript": "^2.7.5",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
+ "@graphql-codegen/typescript": "^2.8.1",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -1531,12 +1527,12 @@
"dev": true
},
"node_modules/@graphql-codegen/visitor-plugin-common": {
- "version": "2.13.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.0.tgz",
- "integrity": "sha512-8lKw4l8W6yKaqrxx025eB6+lRMWaBKedbKjC9UyLhXAnqTi3tgaRKOBo4zvl1+KzE6R41Ruov9UcGD7OjgmBrw==",
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.1.tgz",
+ "integrity": "sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg==",
"dev": true,
"dependencies": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/optimize": "^1.3.0",
"@graphql-tools/relay-operation-optimizer": "^6.5.0",
"@graphql-tools/utils": "^8.8.0",
@@ -1552,9 +1548,9 @@
}
},
"node_modules/@graphql-codegen/visitor-plugin-common/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
},
"node_modules/@graphql-tools/apollo-engine-loader": {
@@ -1918,9 +1914,9 @@
}
},
"node_modules/@graphql-tools/optimize/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
},
"node_modules/@graphql-tools/prisma-loader": {
@@ -1986,13 +1982,13 @@
"dev": true
},
"node_modules/@graphql-tools/relay-operation-optimizer": {
- "version": "6.5.6",
- "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.6.tgz",
- "integrity": "sha512-2KjaWYxD/NC6KtckbDEAbN46QO+74d1SBaZQ26qQjWhyoAjon12xlMW4HWxHEN0d0xuz0cnOVUVc+t4wVXePUg==",
+ "version": "6.5.10",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.10.tgz",
+ "integrity": "sha512-daNJRkJa/NgpXVxUApCMIGqHoyHExaG7XN2gk48r+DbKmoahpflF+lnhBKmS44HtSGciFUv8bPbp0NWvXafZ2w==",
"dev": true,
"dependencies": {
"@ardatan/relay-compiler": "12.0.0",
- "@graphql-tools/utils": "8.12.0",
+ "@graphql-tools/utils": "9.0.1",
"tslib": "^2.4.0"
},
"peerDependencies": {
@@ -2000,9 +1996,9 @@
}
},
"node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils": {
- "version": "8.12.0",
- "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.12.0.tgz",
- "integrity": "sha512-TeO+MJWGXjUTS52qfK4R8HiPoF/R7X+qmgtOYd8DTH0l6b+5Y/tlg5aGeUJefqImRq7nvi93Ms40k/Uz4D5CWw==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.0.1.tgz",
+ "integrity": "sha512-z6FimVa5E44bHKmqK0/uMp9hHvHo2Tkt9A5rlLb40ReD/8IFKehSXLzM4b2N1vcP7mSsbXIdDK9Aoc8jT/he1Q==",
"dev": true,
"dependencies": {
"tslib": "^2.4.0"
@@ -2012,9 +2008,9 @@
}
},
"node_modules/@graphql-tools/relay-operation-optimizer/node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
},
"node_modules/@graphql-tools/schema": {
@@ -2215,23 +2211,23 @@
}
},
"node_modules/@next/env": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz",
- "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg=="
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.2.tgz",
+ "integrity": "sha512-Qb6WPuRriGIQ19qd6NBxpcrFOfj8ziN7l9eZUfwff5gl4zLXluqtuZPddYZM/oWjN53ZYcuRXzL+oowKyJeYtA=="
},
"node_modules/@next/eslint-plugin-next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.1.tgz",
- "integrity": "sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.0.2.tgz",
+ "integrity": "sha512-W+fIIIaFU7Kct7Okx91C7XDRGolv/w2RUenX2yZFeeNVcuVzDIKUcNmckrYbYcwrNQUSXmtwrs3g8xwast0YtA==",
"dev": true,
"dependencies": {
"glob": "7.1.7"
}
},
"node_modules/@next/swc-android-arm-eabi": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz",
- "integrity": "sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.2.tgz",
+ "integrity": "sha512-X54UQCTFyOGnJP//Z71dPPlp4BCYcQL2ncikKXQcPzVpqPs4C3m+tKC8ivBNH6edAXkppwsLRz1/yQwgSZ9Swg==",
"cpu": [
"arm"
],
@@ -2244,9 +2240,9 @@
}
},
"node_modules/@next/swc-android-arm64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz",
- "integrity": "sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.2.tgz",
+ "integrity": "sha512-1P00Kv8uKaLubqo7JzPrTqgFAzSOmfb8iwqJrOb9in5IvTRtNGlkR4hU0sXzqbQNM/+SaYxze6Z5ry1IDyb/cQ==",
"cpu": [
"arm64"
],
@@ -2259,9 +2255,9 @@
}
},
"node_modules/@next/swc-darwin-arm64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz",
- "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.2.tgz",
+ "integrity": "sha512-1zGIOkInkOLRv0QQGZ+3wffYsyKI4vIy62LYTvDWUn7TAYqnmXwougp9NSLqDeagLwgsv2URrykyAFixA/YqxA==",
"cpu": [
"arm64"
],
@@ -2274,9 +2270,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz",
- "integrity": "sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.2.tgz",
+ "integrity": "sha512-ECDAjoMP1Y90cARaelS6X+k6BQx+MikAYJ8f/eaJrLur44NIOYc9HA/dgcTp5jenguY4yT8V+HCquLjAVle6fA==",
"cpu": [
"x64"
],
@@ -2289,9 +2285,9 @@
}
},
"node_modules/@next/swc-freebsd-x64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz",
- "integrity": "sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.2.tgz",
+ "integrity": "sha512-2DcL/ofQdBnQX3IoI9sjlIAyLCD1oZoUBuhrhWbejvBQjutWrI0JTEv9uG69WcxWhVMm3BCsjv8GK2/68OKp7A==",
"cpu": [
"x64"
],
@@ -2304,9 +2300,9 @@
}
},
"node_modules/@next/swc-linux-arm-gnueabihf": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz",
- "integrity": "sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.2.tgz",
+ "integrity": "sha512-Y3OQF1CSBSWW2vGkmvOIuOUNqOq8qX7f1ZpcKUVWP3/Uq++DZmVi9d18lgnSe1I3QFqc+nXWyun9ljsN83j0sw==",
"cpu": [
"arm"
],
@@ -2319,9 +2315,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz",
- "integrity": "sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.2.tgz",
+ "integrity": "sha512-mNyzwsFF6kwZYEjnGicx9ksDZYEZvyzEc1BtCu8vdZi/v8UeixQwCiAT6FyYX9uxMPEkzk8qiU0t0u9gvltsKw==",
"cpu": [
"arm64"
],
@@ -2334,9 +2330,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz",
- "integrity": "sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.2.tgz",
+ "integrity": "sha512-M6SdYjWgRrY3tJBxz0663zCRPTu5BRONmxlftKWWHv9LjAJ59neTLaGj4rp0A08DkJglZIoCkLOzLrzST6TGag==",
"cpu": [
"arm64"
],
@@ -2349,9 +2345,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz",
- "integrity": "sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.2.tgz",
+ "integrity": "sha512-pi63RoxvG4ES1KS06Zpm0MATVIXTs/TIbLbdckeLoM40u1d3mQl/+hSSrLRSxzc2OtyL8fh92sM4gkJrQXAMAw==",
"cpu": [
"x64"
],
@@ -2364,9 +2360,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz",
- "integrity": "sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.2.tgz",
+ "integrity": "sha512-9Pv91gfYnDONgjtRm78n64b/c54+azeHtlnqBLTnIFWSMBDRl1/WDkhKWIj3fBGPLimtK7Tko3ULR3og9RRUPw==",
"cpu": [
"x64"
],
@@ -2379,9 +2375,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz",
- "integrity": "sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.2.tgz",
+ "integrity": "sha512-Nvewe6YZaizAkGHHprbMkYqQulBjZCHKBGKeFPwoPtOA+a2Qi4pZzc/qXFyC5/2A6Z0mr2U1zg9rd04WBYMwBw==",
"cpu": [
"arm64"
],
@@ -2394,9 +2390,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz",
- "integrity": "sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.2.tgz",
+ "integrity": "sha512-ZUBYGZw5G3QrqDpRq1EWi3aHmvPZM8ijK5TFL6UbH16cYQ0JpANmuG2P66KB93Qe/lWWzbeAZk/tj1XqwoCuPA==",
"cpu": [
"ia32"
],
@@ -2409,9 +2405,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz",
- "integrity": "sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.2.tgz",
+ "integrity": "sha512-fA9uW1dm7C0mEYGcKlbmLcVm2sKcye+1kPxh2cM4jVR+kQQMtHWsjIzeSpe2grQLSDan06z4n6hbr8b1c3hA8w==",
"cpu": [
"x64"
],
@@ -2623,9 +2619,9 @@
}
},
"node_modules/@types/node": {
- "version": "18.11.7",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz",
- "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==",
+ "version": "18.11.9",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
+ "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
},
"node_modules/@types/nodemailer": {
@@ -2715,16 +2711,17 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz",
- "integrity": "sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.42.0.tgz",
+ "integrity": "sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/type-utils": "5.41.0",
- "@typescript-eslint/utils": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/type-utils": "5.42.0",
+ "@typescript-eslint/utils": "5.42.0",
"debug": "^4.3.4",
"ignore": "^5.2.0",
+ "natural-compare-lite": "^1.4.0",
"regexpp": "^3.2.0",
"semver": "^7.3.7",
"tsutils": "^3.21.0"
@@ -2747,14 +2744,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.41.0.tgz",
- "integrity": "sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.42.0.tgz",
+ "integrity": "sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/typescript-estree": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
"debug": "^4.3.4"
},
"engines": {
@@ -2774,13 +2771,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.41.0.tgz",
- "integrity": "sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.42.0.tgz",
+ "integrity": "sha512-l5/3IBHLH0Bv04y+H+zlcLiEMEMjWGaCX6WyHE5Uk2YkSGAMlgdUPsT/ywTSKgu9D1dmmKMYgYZijObfA39Wow==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/visitor-keys": "5.41.0"
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/visitor-keys": "5.42.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2791,13 +2788,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz",
- "integrity": "sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.42.0.tgz",
+ "integrity": "sha512-HW14TXC45dFVZxnVW8rnUGnvYyRC0E/vxXShFCthcC9VhVTmjqOmtqj6H5rm9Zxv+ORxKA/1aLGD7vmlLsdlOg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/typescript-estree": "5.41.0",
- "@typescript-eslint/utils": "5.41.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
+ "@typescript-eslint/utils": "5.42.0",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
},
@@ -2818,9 +2815,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.41.0.tgz",
- "integrity": "sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.42.0.tgz",
+ "integrity": "sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2831,13 +2828,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz",
- "integrity": "sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.42.0.tgz",
+ "integrity": "sha512-2O3vSq794x3kZGtV7i4SCWZWCwjEtkWfVqX4m5fbUBomOsEOyd6OAD1qU2lbvV5S8tgy/luJnOYluNyYVeOTTg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/visitor-keys": "5.41.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/visitor-keys": "5.42.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -2858,16 +2855,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.41.0.tgz",
- "integrity": "sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.42.0.tgz",
+ "integrity": "sha512-JZ++3+h1vbeG1NUECXQZE3hg0kias9kOtcQr3+JVQ3whnjvKuMyktJAAIj6743OeNPnGBmjj7KEmiDL7qsdnCQ==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/typescript-estree": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0",
"semver": "^7.3.7"
@@ -2906,12 +2903,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz",
- "integrity": "sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.42.0.tgz",
+ "integrity": "sha512-QHbu5Hf/2lOEOwy+IUw0GoSCuAzByTAWWrOTKzTzsotiUnWFpuKnXcAhC9YztAf2EElQ0VvIK+pHJUPkM0q7jg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.41.0",
+ "@typescript-eslint/types": "5.42.0",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@@ -3740,6 +3737,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/client-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
+ },
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@@ -3948,7 +3950,8 @@
"node_modules/cuid": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/cuid/-/cuid-2.1.8.tgz",
- "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg=="
+ "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==",
+ "dev": true
},
"node_modules/damerau-levenshtein": {
"version": "1.0.8",
@@ -4300,118 +4303,6 @@
"esbuild-windows-arm64": "0.14.54"
}
},
- "node_modules/esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-darwin-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
- "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/esbuild-linux-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
@@ -4428,198 +4319,6 @@
"node": ">=12"
}
},
- "node_modules/esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=12"
- }
- },
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -4697,12 +4396,12 @@
}
},
"node_modules/eslint-config-next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.3.1.tgz",
- "integrity": "sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.0.2.tgz",
+ "integrity": "sha512-SrrHp+zBDYLjOFZdM5b9aW/pliK687Xxfa+qpDuL08Z04ReHhmz3L+maXaAqgrEVZHQximP7nh0El4yNDJW+CA==",
"dev": true,
"dependencies": {
- "@next/eslint-plugin-next": "12.3.1",
+ "@next/eslint-plugin-next": "13.0.2",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.21.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -5413,20 +5112,6 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -6300,9 +5985,9 @@
}
},
"node_modules/jotai": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/jotai/-/jotai-1.9.0.tgz",
- "integrity": "sha512-XYpSlxbxujUCTA8PNkzfj3+zF6XVyzo6XMZIEic3gXQCpTDPfmqhUj2FR8kwUACK5weosFrSBhesrjwfILUCoQ==",
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/jotai/-/jotai-1.9.1.tgz",
+ "integrity": "sha512-rDmmDL6owX4Kg5fAV0arjGVJmT1VYnkROwAx/PgpMkYCzvHEtABm8qnq/Ki5o5/GFGbvdfE11VNP1brDWP7+9w==",
"engines": {
"node": ">=12.7.0"
},
@@ -6890,44 +6575,50 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "node_modules/natural-compare-lite": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
+ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
+ "dev": true
+ },
"node_modules/next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz",
- "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/next/-/next-13.0.2.tgz",
+ "integrity": "sha512-uQ5z5e4D9mOe8+upy6bQdYYjo/kk1v3jMW87kTy2TgAyAsEO+CkwRnMgyZ4JoHEnhPZLHwh7dk0XymRNLe1gFw==",
"dependencies": {
- "@next/env": "12.3.1",
+ "@next/env": "13.0.2",
"@swc/helpers": "0.4.11",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",
- "styled-jsx": "5.0.7",
+ "styled-jsx": "5.1.0",
"use-sync-external-store": "1.2.0"
},
"bin": {
"next": "dist/bin/next"
},
"engines": {
- "node": ">=12.22.0"
+ "node": ">=14.6.0"
},
"optionalDependencies": {
- "@next/swc-android-arm-eabi": "12.3.1",
- "@next/swc-android-arm64": "12.3.1",
- "@next/swc-darwin-arm64": "12.3.1",
- "@next/swc-darwin-x64": "12.3.1",
- "@next/swc-freebsd-x64": "12.3.1",
- "@next/swc-linux-arm-gnueabihf": "12.3.1",
- "@next/swc-linux-arm64-gnu": "12.3.1",
- "@next/swc-linux-arm64-musl": "12.3.1",
- "@next/swc-linux-x64-gnu": "12.3.1",
- "@next/swc-linux-x64-musl": "12.3.1",
- "@next/swc-win32-arm64-msvc": "12.3.1",
- "@next/swc-win32-ia32-msvc": "12.3.1",
- "@next/swc-win32-x64-msvc": "12.3.1"
+ "@next/swc-android-arm-eabi": "13.0.2",
+ "@next/swc-android-arm64": "13.0.2",
+ "@next/swc-darwin-arm64": "13.0.2",
+ "@next/swc-darwin-x64": "13.0.2",
+ "@next/swc-freebsd-x64": "13.0.2",
+ "@next/swc-linux-arm-gnueabihf": "13.0.2",
+ "@next/swc-linux-arm64-gnu": "13.0.2",
+ "@next/swc-linux-arm64-musl": "13.0.2",
+ "@next/swc-linux-x64-gnu": "13.0.2",
+ "@next/swc-linux-x64-musl": "13.0.2",
+ "@next/swc-win32-arm64-msvc": "13.0.2",
+ "@next/swc-win32-ia32-msvc": "13.0.2",
+ "@next/swc-win32-x64-msvc": "13.0.2"
},
"peerDependencies": {
"fibers": ">= 3.1.0",
"node-sass": "^6.0.0 || ^7.0.0",
- "react": "^17.0.2 || ^18.0.0-0",
- "react-dom": "^17.0.2 || ^18.0.0-0",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
"sass": "^1.3.0"
},
"peerDependenciesMeta": {
@@ -6943,9 +6634,9 @@
}
},
"node_modules/next-sitemap": {
- "version": "3.1.29",
- "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.29.tgz",
- "integrity": "sha512-7UQyfpI7obOdB11aCswWYfqRn5CR0YSmWHo1r/uarrFfZD5PyyAWtQlgP6jNqDW0eX1ZJWERBwmJ2dLjl4nT8Q==",
+ "version": "3.1.30",
+ "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.30.tgz",
+ "integrity": "sha512-mZqq9xWrTp/tgUM7+Oz/qxT6x2vnJhwQ3AGke2GjypRbUo44QaTb+4Cp1uX9GwXBaiuuuXDoWyS5VxJP3pJljw==",
"dev": true,
"funding": [
{
@@ -8406,9 +8097,12 @@
}
},
"node_modules/styled-jsx": {
- "version": "5.0.7",
- "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz",
- "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.0.tgz",
+ "integrity": "sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==",
+ "dependencies": {
+ "client-only": "0.0.1"
+ },
"engines": {
"node": ">= 12.0.0"
},
@@ -9521,12 +9215,12 @@
}
},
"@babel/helper-skip-transparent-expression-wrappers": {
- "version": "7.18.9",
- "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz",
- "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz",
+ "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==",
"dev": true,
"requires": {
- "@babel/types": "^7.18.9"
+ "@babel/types": "^7.20.0"
}
},
"@babel/helper-split-export-declaration": {
@@ -9720,9 +9414,9 @@
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.19.4.tgz",
- "integrity": "sha512-934S2VLLlt2hRJwPf4MczaOr4hYF0z+VKPwqTNxyKX7NthTiPfhuKFWQZHXRM0vh/wo/VyXB3s4bZUNA08l+tQ==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.0.tgz",
+ "integrity": "sha512-sXOohbpHZSk7GjxK9b3dKB7CfqUD5DwOH+DggKzOQ7TXYP+RCSbRykfjQmn/zq+rBjycVRtLf9pYhAaEJA786w==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.19.0"
@@ -9755,9 +9449,9 @@
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.19.4.tgz",
- "integrity": "sha512-t0j0Hgidqf0aM86dF8U+vXYReUgJnlv4bZLsyoPnwZNrGY+7/38o8YjaELrvHeVfTZao15kjR0PVv0nju2iduA==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.0.tgz",
+ "integrity": "sha512-1dIhvZfkDVx/zn2S1aFwlruspTt4189j7fEkH0Y0VyuDM6bQt7bD6kLcz3l4IlLG+e5OReaBz9ROAbttRtUHqA==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.19.0"
@@ -9833,12 +9527,12 @@
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.18.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz",
- "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==",
+ "version": "7.20.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.1.tgz",
+ "integrity": "sha512-nDvKLrAvl+kf6BOy1UJ3MGwzzfTMgppxwiD2Jb4LO3xjYyZq30oQzDNJbCQpMdG9+j2IXHoiMrw5Cm/L6ZoxXQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.18.6"
+ "@babel/helper-plugin-utils": "^7.19.0"
}
},
"@babel/plugin-transform-property-literals": {
@@ -9948,9 +9642,9 @@
}
},
"@babel/types": {
- "version": "7.19.4",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz",
- "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==",
+ "version": "7.20.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.0.tgz",
+ "integrity": "sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg==",
"devOptional": true,
"requires": {
"@babel/helper-string-parser": "^7.19.4",
@@ -10002,13 +9696,6 @@
"integrity": "sha512-7PV6XCS5qC28oaEKWUUXLxiewoj3Z0EfdCdxX5D6Vy5wtC/rYuCO15XOOupUcnwBaNR+Xm/bfmsCe1KJtEfE7g==",
"dev": true
},
- "@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
- "dev": true,
- "optional": true
- },
"@eslint/eslintrc": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz",
@@ -10068,16 +9755,16 @@
"integrity": "sha512-GM3dDQXCrhoLR/Cg8C3FrmlZPtSapl7X9qTbnIHvzuSk5VX7mzb3qehmoMZiYZZ2UCFmdFac+zlMeUoQ9yvKDg=="
},
"@graphql-codegen/cli": {
- "version": "2.13.8",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.13.8.tgz",
- "integrity": "sha512-xX+lT51nMBD3b6lDyA+BDyJoEKnsPMctM/Fx8st0gEy7ZgdWLrsgOBOn4k71yyejOy3CHnRV5LMKWdhiQDaYsA==",
+ "version": "2.13.11",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.13.11.tgz",
+ "integrity": "sha512-PJF36a1i6M7Btj1kB4PWWzBUO3u2BJzsd/6KXxRmEugcxrbaCnbTDDktopy0CZYKdqaFbXaowwbRY8Tk8DV99Q==",
"dev": true,
"requires": {
"@babel/generator": "^7.18.13",
"@babel/template": "^7.18.10",
"@babel/types": "^7.18.13",
- "@graphql-codegen/core": "2.6.2",
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/core": "2.6.5",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/apollo-engine-loader": "^7.3.6",
"@graphql-tools/code-file-loader": "^7.3.1",
"@graphql-tools/git-loader": "^7.2.1",
@@ -10246,29 +9933,38 @@
}
},
"@graphql-codegen/core": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.2.tgz",
- "integrity": "sha512-58T5yf9nEfAhDwN1Vz1hImqpdJ/gGpCGUaroQ5tqskZPf7eZYYVkEXbtqRZZLx1MCCKwjWX4hMtTPpHhwKCkng==",
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.5.tgz",
+ "integrity": "sha512-oSbM8vINFxcV1GUasJTDIemMpEG1t6NkBG8odQCt/3ZExCYmoviHhG9vJB89QqJeU5W06qQB6SJn/dg/gv5Aqg==",
"dev": true,
"requires": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/schema": "^9.0.0",
- "@graphql-tools/utils": "^8.8.0",
+ "@graphql-tools/utils": "9.0.0",
"tslib": "~2.4.0"
},
"dependencies": {
+ "@graphql-tools/utils": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.0.0.tgz",
+ "integrity": "sha512-kaCwyWnURxMsYbxzkfylLqFFelu83jKk3BJOOy0GIuxEtgXVS9v7Y/tojljo69Q+jaZ2YxAi3+d8IpM+hx768A==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.4.0"
+ }
+ },
"tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}
}
},
"@graphql-codegen/plugin-helpers": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.1.tgz",
- "integrity": "sha512-wpEShhwbQp8pqXolnSCNaj0pU91LbuBvYHpYqm96TUqyeKQYAYRVmw3JIt0g8UQpKYhg8lYIDwWdcINOYqkGLg==",
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz",
+ "integrity": "sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg==",
"dev": true,
"requires": {
"@graphql-tools/utils": "^8.8.0",
@@ -10307,14 +10003,14 @@
}
},
"@graphql-codegen/typescript": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.8.0.tgz",
- "integrity": "sha512-atQ6NFfMmoknJi0QdVSozPugKcgeJB6t1/cVskbhVtX8tAEFFLjl6H23mpz3t35AH6aGWtvx2LCjUSxHI6P6xA==",
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.8.1.tgz",
+ "integrity": "sha512-kweV1DOOH2blvMheVL55TT0s9bxkmF/zijN9mdk9pRD20i/rI/46qbh8fNKqy/PV12vZOmZGNL6tigdghG2bqg==",
"dev": true,
"requires": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-codegen/schema-ast": "^2.5.1",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -10328,13 +10024,13 @@
}
},
"@graphql-codegen/typescript-graphql-request": {
- "version": "4.5.7",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.5.7.tgz",
- "integrity": "sha512-1YPaCO+0q5z0Um6Om+5LMWdB8+WQxda8eXRXwy0dqSGRy9X5HTZz/pxqaTgy76yMtPBxq1UNa7lruBTzszHhJg==",
+ "version": "4.5.8",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.5.8.tgz",
+ "integrity": "sha512-XsuAA35Ou03LsklNgnIWXZ5HOHsJ5w1dBuDKtvqM9rD0cAI8x0f4TY0n6O1EraSBSvyHLP3npb1lOTPZzG2TjA==",
"dev": true,
"requires": {
- "@graphql-codegen/plugin-helpers": "^2.7.1",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -10348,14 +10044,14 @@
}
},
"@graphql-codegen/typescript-operations": {
- "version": "2.5.5",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.5.5.tgz",
- "integrity": "sha512-rH15UA34MRf6cITfvt2EkSEaC/8ULvgMg5kzun6895oucA8PFyAFJaQzcjk9UraeD3ddMu56OKhZGdxd0JWfKw==",
+ "version": "2.5.6",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.5.6.tgz",
+ "integrity": "sha512-7WqOsVMTUXf+tdt0jGOBuQINLYjPIGlcsnkzXQSPJ7rSGVj99VobVuwgmAeFmJctZ3lgwx3gjPZ0dyCIOBc2/A==",
"dev": true,
"requires": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
- "@graphql-codegen/typescript": "^2.7.5",
- "@graphql-codegen/visitor-plugin-common": "2.13.0",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
+ "@graphql-codegen/typescript": "^2.8.1",
+ "@graphql-codegen/visitor-plugin-common": "2.13.1",
"auto-bind": "~4.0.0",
"tslib": "~2.4.0"
},
@@ -10369,12 +10065,12 @@
}
},
"@graphql-codegen/visitor-plugin-common": {
- "version": "2.13.0",
- "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.0.tgz",
- "integrity": "sha512-8lKw4l8W6yKaqrxx025eB6+lRMWaBKedbKjC9UyLhXAnqTi3tgaRKOBo4zvl1+KzE6R41Ruov9UcGD7OjgmBrw==",
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.1.tgz",
+ "integrity": "sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg==",
"dev": true,
"requires": {
- "@graphql-codegen/plugin-helpers": "^2.6.2",
+ "@graphql-codegen/plugin-helpers": "^2.7.2",
"@graphql-tools/optimize": "^1.3.0",
"@graphql-tools/relay-operation-optimizer": "^6.5.0",
"@graphql-tools/utils": "^8.8.0",
@@ -10387,9 +10083,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}
}
@@ -10716,9 +10412,9 @@
},
"dependencies": {
"tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}
}
@@ -10776,29 +10472,29 @@
}
},
"@graphql-tools/relay-operation-optimizer": {
- "version": "6.5.6",
- "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.6.tgz",
- "integrity": "sha512-2KjaWYxD/NC6KtckbDEAbN46QO+74d1SBaZQ26qQjWhyoAjon12xlMW4HWxHEN0d0xuz0cnOVUVc+t4wVXePUg==",
+ "version": "6.5.10",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.10.tgz",
+ "integrity": "sha512-daNJRkJa/NgpXVxUApCMIGqHoyHExaG7XN2gk48r+DbKmoahpflF+lnhBKmS44HtSGciFUv8bPbp0NWvXafZ2w==",
"dev": true,
"requires": {
"@ardatan/relay-compiler": "12.0.0",
- "@graphql-tools/utils": "8.12.0",
+ "@graphql-tools/utils": "9.0.1",
"tslib": "^2.4.0"
},
"dependencies": {
"@graphql-tools/utils": {
- "version": "8.12.0",
- "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.12.0.tgz",
- "integrity": "sha512-TeO+MJWGXjUTS52qfK4R8HiPoF/R7X+qmgtOYd8DTH0l6b+5Y/tlg5aGeUJefqImRq7nvi93Ms40k/Uz4D5CWw==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.0.1.tgz",
+ "integrity": "sha512-z6FimVa5E44bHKmqK0/uMp9hHvHo2Tkt9A5rlLb40ReD/8IFKehSXLzM4b2N1vcP7mSsbXIdDK9Aoc8jT/he1Q==",
"dev": true,
"requires": {
"tslib": "^2.4.0"
}
},
"tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
+ "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"dev": true
}
}
@@ -10974,95 +10670,95 @@
"requires": {}
},
"@next/env": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/env/-/env-12.3.1.tgz",
- "integrity": "sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg=="
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/env/-/env-13.0.2.tgz",
+ "integrity": "sha512-Qb6WPuRriGIQ19qd6NBxpcrFOfj8ziN7l9eZUfwff5gl4zLXluqtuZPddYZM/oWjN53ZYcuRXzL+oowKyJeYtA=="
},
"@next/eslint-plugin-next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.3.1.tgz",
- "integrity": "sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.0.2.tgz",
+ "integrity": "sha512-W+fIIIaFU7Kct7Okx91C7XDRGolv/w2RUenX2yZFeeNVcuVzDIKUcNmckrYbYcwrNQUSXmtwrs3g8xwast0YtA==",
"dev": true,
"requires": {
"glob": "7.1.7"
}
},
"@next/swc-android-arm-eabi": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz",
- "integrity": "sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.2.tgz",
+ "integrity": "sha512-X54UQCTFyOGnJP//Z71dPPlp4BCYcQL2ncikKXQcPzVpqPs4C3m+tKC8ivBNH6edAXkppwsLRz1/yQwgSZ9Swg==",
"optional": true
},
"@next/swc-android-arm64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz",
- "integrity": "sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.0.2.tgz",
+ "integrity": "sha512-1P00Kv8uKaLubqo7JzPrTqgFAzSOmfb8iwqJrOb9in5IvTRtNGlkR4hU0sXzqbQNM/+SaYxze6Z5ry1IDyb/cQ==",
"optional": true
},
"@next/swc-darwin-arm64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz",
- "integrity": "sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.2.tgz",
+ "integrity": "sha512-1zGIOkInkOLRv0QQGZ+3wffYsyKI4vIy62LYTvDWUn7TAYqnmXwougp9NSLqDeagLwgsv2URrykyAFixA/YqxA==",
"optional": true
},
"@next/swc-darwin-x64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz",
- "integrity": "sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.2.tgz",
+ "integrity": "sha512-ECDAjoMP1Y90cARaelS6X+k6BQx+MikAYJ8f/eaJrLur44NIOYc9HA/dgcTp5jenguY4yT8V+HCquLjAVle6fA==",
"optional": true
},
"@next/swc-freebsd-x64": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz",
- "integrity": "sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.2.tgz",
+ "integrity": "sha512-2DcL/ofQdBnQX3IoI9sjlIAyLCD1oZoUBuhrhWbejvBQjutWrI0JTEv9uG69WcxWhVMm3BCsjv8GK2/68OKp7A==",
"optional": true
},
"@next/swc-linux-arm-gnueabihf": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz",
- "integrity": "sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.2.tgz",
+ "integrity": "sha512-Y3OQF1CSBSWW2vGkmvOIuOUNqOq8qX7f1ZpcKUVWP3/Uq++DZmVi9d18lgnSe1I3QFqc+nXWyun9ljsN83j0sw==",
"optional": true
},
"@next/swc-linux-arm64-gnu": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz",
- "integrity": "sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.2.tgz",
+ "integrity": "sha512-mNyzwsFF6kwZYEjnGicx9ksDZYEZvyzEc1BtCu8vdZi/v8UeixQwCiAT6FyYX9uxMPEkzk8qiU0t0u9gvltsKw==",
"optional": true
},
"@next/swc-linux-arm64-musl": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz",
- "integrity": "sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.2.tgz",
+ "integrity": "sha512-M6SdYjWgRrY3tJBxz0663zCRPTu5BRONmxlftKWWHv9LjAJ59neTLaGj4rp0A08DkJglZIoCkLOzLrzST6TGag==",
"optional": true
},
"@next/swc-linux-x64-gnu": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz",
- "integrity": "sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.2.tgz",
+ "integrity": "sha512-pi63RoxvG4ES1KS06Zpm0MATVIXTs/TIbLbdckeLoM40u1d3mQl/+hSSrLRSxzc2OtyL8fh92sM4gkJrQXAMAw==",
"optional": true
},
"@next/swc-linux-x64-musl": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz",
- "integrity": "sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.2.tgz",
+ "integrity": "sha512-9Pv91gfYnDONgjtRm78n64b/c54+azeHtlnqBLTnIFWSMBDRl1/WDkhKWIj3fBGPLimtK7Tko3ULR3og9RRUPw==",
"optional": true
},
"@next/swc-win32-arm64-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz",
- "integrity": "sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.2.tgz",
+ "integrity": "sha512-Nvewe6YZaizAkGHHprbMkYqQulBjZCHKBGKeFPwoPtOA+a2Qi4pZzc/qXFyC5/2A6Z0mr2U1zg9rd04WBYMwBw==",
"optional": true
},
"@next/swc-win32-ia32-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz",
- "integrity": "sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.2.tgz",
+ "integrity": "sha512-ZUBYGZw5G3QrqDpRq1EWi3aHmvPZM8ijK5TFL6UbH16cYQ0JpANmuG2P66KB93Qe/lWWzbeAZk/tj1XqwoCuPA==",
"optional": true
},
"@next/swc-win32-x64-msvc": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz",
- "integrity": "sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.2.tgz",
+ "integrity": "sha512-fA9uW1dm7C0mEYGcKlbmLcVm2sKcye+1kPxh2cM4jVR+kQQMtHWsjIzeSpe2grQLSDan06z4n6hbr8b1c3hA8w==",
"optional": true
},
"@nodelib/fs.scandir": {
@@ -11246,9 +10942,9 @@
}
},
"@types/node": {
- "version": "18.11.7",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz",
- "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==",
+ "version": "18.11.9",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
+ "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"dev": true
},
"@types/nodemailer": {
@@ -11338,69 +11034,70 @@
}
},
"@typescript-eslint/eslint-plugin": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz",
- "integrity": "sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.42.0.tgz",
+ "integrity": "sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/type-utils": "5.41.0",
- "@typescript-eslint/utils": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/type-utils": "5.42.0",
+ "@typescript-eslint/utils": "5.42.0",
"debug": "^4.3.4",
"ignore": "^5.2.0",
+ "natural-compare-lite": "^1.4.0",
"regexpp": "^3.2.0",
"semver": "^7.3.7",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/parser": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.41.0.tgz",
- "integrity": "sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.42.0.tgz",
+ "integrity": "sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA==",
"dev": true,
"requires": {
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/typescript-estree": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
"debug": "^4.3.4"
}
},
"@typescript-eslint/scope-manager": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.41.0.tgz",
- "integrity": "sha512-xOxPJCnuktUkY2xoEZBKXO5DBCugFzjrVndKdUnyQr3+9aDWZReKq9MhaoVnbL+maVwWJu/N0SEtrtEUNb62QQ==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.42.0.tgz",
+ "integrity": "sha512-l5/3IBHLH0Bv04y+H+zlcLiEMEMjWGaCX6WyHE5Uk2YkSGAMlgdUPsT/ywTSKgu9D1dmmKMYgYZijObfA39Wow==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/visitor-keys": "5.41.0"
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/visitor-keys": "5.42.0"
}
},
"@typescript-eslint/type-utils": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz",
- "integrity": "sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.42.0.tgz",
+ "integrity": "sha512-HW14TXC45dFVZxnVW8rnUGnvYyRC0E/vxXShFCthcC9VhVTmjqOmtqj6H5rm9Zxv+ORxKA/1aLGD7vmlLsdlOg==",
"dev": true,
"requires": {
- "@typescript-eslint/typescript-estree": "5.41.0",
- "@typescript-eslint/utils": "5.41.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
+ "@typescript-eslint/utils": "5.42.0",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
}
},
"@typescript-eslint/types": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.41.0.tgz",
- "integrity": "sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.42.0.tgz",
+ "integrity": "sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz",
- "integrity": "sha512-SlzFYRwFSvswzDSQ/zPkIWcHv8O5y42YUskko9c4ki+fV6HATsTODUPbRbcGDFYP86gaJL5xohUEytvyNNcXWg==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.42.0.tgz",
+ "integrity": "sha512-2O3vSq794x3kZGtV7i4SCWZWCwjEtkWfVqX4m5fbUBomOsEOyd6OAD1qU2lbvV5S8tgy/luJnOYluNyYVeOTTg==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/visitor-keys": "5.41.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/visitor-keys": "5.42.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -11409,16 +11106,16 @@
}
},
"@typescript-eslint/utils": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.41.0.tgz",
- "integrity": "sha512-QlvfwaN9jaMga9EBazQ+5DDx/4sAdqDkcs05AsQHMaopluVCUyu1bTRUVKzXbgjDlrRAQrYVoi/sXJ9fmG+KLQ==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.42.0.tgz",
+ "integrity": "sha512-JZ++3+h1vbeG1NUECXQZE3hg0kias9kOtcQr3+JVQ3whnjvKuMyktJAAIj6743OeNPnGBmjj7KEmiDL7qsdnCQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
- "@typescript-eslint/scope-manager": "5.41.0",
- "@typescript-eslint/types": "5.41.0",
- "@typescript-eslint/typescript-estree": "5.41.0",
+ "@typescript-eslint/scope-manager": "5.42.0",
+ "@typescript-eslint/types": "5.42.0",
+ "@typescript-eslint/typescript-estree": "5.42.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0",
"semver": "^7.3.7"
@@ -11443,12 +11140,12 @@
}
},
"@typescript-eslint/visitor-keys": {
- "version": "5.41.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz",
- "integrity": "sha512-vilqeHj267v8uzzakbm13HkPMl7cbYpKVjgFWZPIOHIJHZtinvypUhJ5xBXfWYg4eFKqztbMMpOgFpT9Gfx4fw==",
+ "version": "5.42.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.42.0.tgz",
+ "integrity": "sha512-QHbu5Hf/2lOEOwy+IUw0GoSCuAzByTAWWrOTKzTzsotiUnWFpuKnXcAhC9YztAf2EElQ0VvIK+pHJUPkM0q7jg==",
"dev": true,
"requires": {
- "@typescript-eslint/types": "5.41.0",
+ "@typescript-eslint/types": "5.42.0",
"eslint-visitor-keys": "^3.3.0"
}
},
@@ -12056,6 +11753,11 @@
"string-width": "^4.2.0"
}
},
+ "client-only": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
+ },
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@@ -12227,7 +11929,8 @@
"cuid": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/cuid/-/cuid-2.1.8.tgz",
- "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg=="
+ "integrity": "sha512-xiEMER6E7TlTPnDxrM4eRiC6TRgjNX9xzEZ5U/Se2YJKr7Mq4pJn/2XEHjl3STcSh96GmkHPcBXLES8M29wyyg==",
+ "dev": true
},
"damerau-levenshtein": {
"version": "1.0.8",
@@ -12517,55 +12220,6 @@
"esbuild-windows-arm64": "0.14.54"
}
},
- "esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
- "dev": true,
- "optional": true
- },
- "esbuild-darwin-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
- "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
- "dev": true,
- "optional": true
- },
- "esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
- "dev": true,
- "optional": true
- },
- "esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
- "dev": true,
- "optional": true
- },
"esbuild-linux-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
@@ -12573,90 +12227,6 @@
"dev": true,
"optional": true
},
- "esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
- "dev": true,
- "optional": true
- },
- "esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
- "dev": true,
- "optional": true
- },
- "esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
- "dev": true,
- "optional": true
- },
- "esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
- "dev": true,
- "optional": true
- },
- "esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
- "dev": true,
- "optional": true
- },
- "esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
- "dev": true,
- "optional": true
- },
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -12770,12 +12340,12 @@
}
},
"eslint-config-next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.3.1.tgz",
- "integrity": "sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.0.2.tgz",
+ "integrity": "sha512-SrrHp+zBDYLjOFZdM5b9aW/pliK687Xxfa+qpDuL08Z04ReHhmz3L+maXaAqgrEVZHQximP7nh0El4yNDJW+CA==",
"dev": true,
"requires": {
- "@next/eslint-plugin-next": "12.3.1",
+ "@next/eslint-plugin-next": "13.0.2",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.21.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -13261,13 +12831,6 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
- "fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "optional": true
- },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -13903,9 +13466,9 @@
"requires": {}
},
"jotai": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/jotai/-/jotai-1.9.0.tgz",
- "integrity": "sha512-XYpSlxbxujUCTA8PNkzfj3+zF6XVyzo6XMZIEic3gXQCpTDPfmqhUj2FR8kwUACK5weosFrSBhesrjwfILUCoQ==",
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/jotai/-/jotai-1.9.1.tgz",
+ "integrity": "sha512-rDmmDL6owX4Kg5fAV0arjGVJmT1VYnkROwAx/PgpMkYCzvHEtABm8qnq/Ki5o5/GFGbvdfE11VNP1brDWP7+9w==",
"requires": {}
},
"js-sdsl": {
@@ -14345,36 +13908,42 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
+ "natural-compare-lite": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz",
+ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==",
+ "dev": true
+ },
"next": {
- "version": "12.3.1",
- "resolved": "https://registry.npmjs.org/next/-/next-12.3.1.tgz",
- "integrity": "sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/next/-/next-13.0.2.tgz",
+ "integrity": "sha512-uQ5z5e4D9mOe8+upy6bQdYYjo/kk1v3jMW87kTy2TgAyAsEO+CkwRnMgyZ4JoHEnhPZLHwh7dk0XymRNLe1gFw==",
"requires": {
- "@next/env": "12.3.1",
- "@next/swc-android-arm-eabi": "12.3.1",
- "@next/swc-android-arm64": "12.3.1",
- "@next/swc-darwin-arm64": "12.3.1",
- "@next/swc-darwin-x64": "12.3.1",
- "@next/swc-freebsd-x64": "12.3.1",
- "@next/swc-linux-arm-gnueabihf": "12.3.1",
- "@next/swc-linux-arm64-gnu": "12.3.1",
- "@next/swc-linux-arm64-musl": "12.3.1",
- "@next/swc-linux-x64-gnu": "12.3.1",
- "@next/swc-linux-x64-musl": "12.3.1",
- "@next/swc-win32-arm64-msvc": "12.3.1",
- "@next/swc-win32-ia32-msvc": "12.3.1",
- "@next/swc-win32-x64-msvc": "12.3.1",
+ "@next/env": "13.0.2",
+ "@next/swc-android-arm-eabi": "13.0.2",
+ "@next/swc-android-arm64": "13.0.2",
+ "@next/swc-darwin-arm64": "13.0.2",
+ "@next/swc-darwin-x64": "13.0.2",
+ "@next/swc-freebsd-x64": "13.0.2",
+ "@next/swc-linux-arm-gnueabihf": "13.0.2",
+ "@next/swc-linux-arm64-gnu": "13.0.2",
+ "@next/swc-linux-arm64-musl": "13.0.2",
+ "@next/swc-linux-x64-gnu": "13.0.2",
+ "@next/swc-linux-x64-musl": "13.0.2",
+ "@next/swc-win32-arm64-msvc": "13.0.2",
+ "@next/swc-win32-ia32-msvc": "13.0.2",
+ "@next/swc-win32-x64-msvc": "13.0.2",
"@swc/helpers": "0.4.11",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.14",
- "styled-jsx": "5.0.7",
+ "styled-jsx": "5.1.0",
"use-sync-external-store": "1.2.0"
}
},
"next-sitemap": {
- "version": "3.1.29",
- "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.29.tgz",
- "integrity": "sha512-7UQyfpI7obOdB11aCswWYfqRn5CR0YSmWHo1r/uarrFfZD5PyyAWtQlgP6jNqDW0eX1ZJWERBwmJ2dLjl4nT8Q==",
+ "version": "3.1.30",
+ "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.30.tgz",
+ "integrity": "sha512-mZqq9xWrTp/tgUM7+Oz/qxT6x2vnJhwQ3AGke2GjypRbUo44QaTb+4Cp1uX9GwXBaiuuuXDoWyS5VxJP3pJljw==",
"dev": true,
"requires": {
"@corex/deepmerge": "^4.0.29",
@@ -15429,10 +14998,12 @@
"dev": true
},
"styled-jsx": {
- "version": "5.0.7",
- "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz",
- "integrity": "sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==",
- "requires": {}
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.0.tgz",
+ "integrity": "sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==",
+ "requires": {
+ "client-only": "0.0.1"
+ }
},
"supports-color": {
"version": "7.2.0",
diff --git a/package.json b/package.json
index 691f3af..7439650 100644
--- a/package.json
+++ b/package.json
@@ -17,60 +17,60 @@
"prettier": "prettier --end-of-line auto --write ."
},
"dependencies": {
- "@fontsource/material-icons": "^4.5.4",
- "@fontsource/material-icons-outlined": "^4.5.4",
- "@fontsource/opendyslexic": "^4.5.4",
- "@fontsource/share-tech-mono": "^4.5.9",
- "@fontsource/vollkorn": "^4.5.12",
- "@fontsource/zen-maru-gothic": "^4.5.13",
- "@tippyjs/react": "^4.2.6",
- "autoprefixer": "^10.4.13",
- "cuid": "^2.1.8",
- "graphql-request": "^5.0.0",
- "jotai": "^1.9.0",
- "markdown-to-jsx": "^7.1.7",
- "next": "^12.3.1",
- "nodemailer": "^6.8.0",
- "rc-slider": "^10.0.1",
+ "@fontsource/material-icons": "4.5.4",
+ "@fontsource/material-icons-outlined": "4.5.4",
+ "@fontsource/opendyslexic": "4.5.4",
+ "@fontsource/share-tech-mono": "4.5.9",
+ "@fontsource/vollkorn": "4.5.12",
+ "@fontsource/zen-maru-gothic": "4.5.13",
+ "@tippyjs/react": "4.2.6",
+ "autoprefixer": "10.4.13",
+ "graphql-request": "5.0.0",
+ "jotai": "1.9.1",
+ "markdown-to-jsx": "7.1.7",
+ "next": "13.0.2",
+ "nodemailer": "6.8.0",
+ "rc-slider": "10.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
- "react-hotkeys-hook": "^3.4.7",
- "react-swipeable": "^7.0.0",
- "react-zoom-pan-pinch": "^2.1.3",
- "string-natural-compare": "^3.0.1",
- "throttle-debounce": "^5.0.0",
- "tippy.js": "^6.3.7",
- "turndown": "^7.1.1",
- "ua-parser-js": "^1.0.32",
- "usehooks-ts": "^2.9.1"
+ "react-hotkeys-hook": "3.4.7",
+ "react-swipeable": "7.0.0",
+ "react-zoom-pan-pinch": "2.1.3",
+ "string-natural-compare": "3.0.1",
+ "throttle-debounce": "5.0.0",
+ "tippy.js": "6.3.7",
+ "turndown": "7.1.1",
+ "ua-parser-js": "1.0.32",
+ "usehooks-ts": "2.9.1"
},
"devDependencies": {
- "@digitak/esrun": "^3.2.14",
- "@graphql-codegen/cli": "^2.13.8",
- "@graphql-codegen/typescript": "2.8.0",
- "@graphql-codegen/typescript-graphql-request": "^4.5.7",
- "@graphql-codegen/typescript-operations": "^2.5.5",
- "@types/node": "18.11.7",
- "@types/nodemailer": "^6.4.6",
+ "@digitak/esrun": "3.2.14",
+ "@graphql-codegen/cli": "2.13.11",
+ "@graphql-codegen/typescript": "2.8.1",
+ "@graphql-codegen/typescript-graphql-request": "4.5.8",
+ "@graphql-codegen/typescript-operations": "2.5.6",
+ "@types/node": "18.11.9",
+ "@types/nodemailer": "6.4.6",
"@types/react": "18.0.22",
- "@types/react-dom": "^18.0.8",
- "@types/string-natural-compare": "^3.0.2",
- "@types/throttle-debounce": "^5.0.0",
- "@types/turndown": "^5.0.1",
- "@types/ua-parser-js": "^0.7.36",
- "@typescript-eslint/eslint-plugin": "^5.41.0",
- "@typescript-eslint/parser": "^5.41.0",
- "dotenv": "^16.0.3",
- "eslint": "^8.26.0",
- "eslint-config-next": "12.3.1",
- "eslint-plugin-import": "^2.26.0",
- "graphql": "^16.6.0",
- "next-sitemap": "^3.1.29",
- "prettier": "^2.7.1",
- "prettier-plugin-tailwindcss": "^0.1.13",
- "tailwindcss": "^3.2.1",
- "ts-unused-exports": "^8.0.0",
- "typescript": "^4.8.4"
+ "@types/react-dom": "18.0.8",
+ "@types/string-natural-compare": "3.0.2",
+ "@types/throttle-debounce": "5.0.0",
+ "@types/turndown": "5.0.1",
+ "@types/ua-parser-js": "0.7.36",
+ "@typescript-eslint/eslint-plugin": "5.42.0",
+ "@typescript-eslint/parser": "5.42.0",
+ "cuid": "2.1.8",
+ "dotenv": "16.0.3",
+ "eslint": "8.26.0",
+ "eslint-config-next": "13.0.2",
+ "eslint-plugin-import": "2.26.0",
+ "graphql": "16.6.0",
+ "next-sitemap": "3.1.30",
+ "prettier": "2.7.1",
+ "prettier-plugin-tailwindcss": "0.1.13",
+ "tailwindcss": "3.2.1",
+ "ts-unused-exports": "8.0.0",
+ "typescript": "4.8.4"
},
"overrides": {
"react-zoom-pan-pinch": {
diff --git a/src/app/[locale]/contents/page.tsx b/src/app/[locale]/contents/page.tsx
new file mode 100644
index 0000000..9affc90
--- /dev/null
+++ b/src/app/[locale]/contents/page.tsx
@@ -0,0 +1,2 @@
+const Page: Page = () => <>Hello from contents>;
+export default Page;
diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx
new file mode 100644
index 0000000..410f6b9
--- /dev/null
+++ b/src/app/[locale]/page.tsx
@@ -0,0 +1,8 @@
+export const generateStaticParams: GenerateStaticParams = () =>
+ ["en", "es", "fr", "pt-br", "ja", ""].map((locale) => ({ locale }));
+
+// Disabled using locales other than the one defined
+export const dynamicParams = false;
+
+const Page: Page = () => <>Hello from within locale>;
+export default Page;
diff --git a/src/app/head.tsx b/src/app/head.tsx
new file mode 100644
index 0000000..c9b2864
--- /dev/null
+++ b/src/app/head.tsx
@@ -0,0 +1,19 @@
+const Head: Head = () => (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+);
+export default Head;
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
new file mode 100644
index 0000000..01253d3
--- /dev/null
+++ b/src/app/layout.tsx
@@ -0,0 +1,64 @@
+"use client";
+
+import "@fontsource/material-icons";
+import "@fontsource/material-icons-outlined";
+import "@fontsource/opendyslexic/400.css";
+import "@fontsource/share-tech-mono/400.css";
+import "@fontsource/opendyslexic/700.css";
+import "@fontsource/vollkorn/700.css";
+import "@fontsource/zen-maru-gothic/500.css";
+import "@fontsource/zen-maru-gothic/900.css";
+
+import "styles/debug.css";
+import "styles/formatted.css";
+import "styles/others.css";
+import "styles/rc-slider.css";
+import "styles/tippy.css";
+
+import Script from "next/script";
+import { useLocalData } from "contexts/localData";
+// import { useAppLayout } from "contexts/appLayout";
+import { LightBoxProvider } from "contexts/LightBoxProvider";
+import { SettingsPopup } from "components/Panels/SettingsPopup";
+import { useSettings } from "contexts/settings";
+import { useContainerQueries } from "contexts/containerQueries";
+import { Ids } from "types/ids";
+import { atoms } from "contexts/atoms";
+import { useAtomGetter } from "helpers/atoms";
+import { cIf, cJoin } from "helpers/className";
+
+const Layout: Layout = ({ children }) => {
+ useLocalData();
+ // useAppLayout();
+ useSettings();
+ useContainerQueries();
+
+ const isDyslexic = useAtomGetter(atoms.settings.dyslexic);
+ const isDarkMode = useAtomGetter(atoms.settings.darkMode);
+
+ return (
+
+
+
+
+
+
+
+
+ {children}
+
+
+ );
+};
+export default Layout;
diff --git a/src/components/Cli/Terminal.tsx b/src/components/Cli/Terminal.tsx
index c28dda7..5396e31 100644
--- a/src/components/Cli/Terminal.tsx
+++ b/src/components/Cli/Terminal.tsx
@@ -234,7 +234,7 @@ export const Terminal = ({
}, [line]);
return (
-
+
diff --git a/src/components/Panels/SettingsPopup.tsx b/src/components/Panels/SettingsPopup.tsx
index 3d27986..8dd1bb3 100644
--- a/src/components/Panels/SettingsPopup.tsx
+++ b/src/components/Panels/SettingsPopup.tsx
@@ -32,8 +32,6 @@ export const SettingsPopup = (): JSX.Element => {
const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout);
- const router = useRouter();
-
const currencyOptions = useMemo(
() =>
filterHasAttributes(currencies, ["attributes"] as const).map(
@@ -66,34 +64,6 @@ export const SettingsPopup = (): JSX.Element => {
`mt-4 grid justify-items-center gap-16 text-center`,
cIf(!is1ColumnLayout, "grid-cols-[auto_auto]")
)}>
- {router.locales && (
-
-
{langui.languages}
- {preferredLanguages.length > 0 && (
- ({
- code: locale,
- name: prettyLanguage(locale, languages),
- }))}
- insertLabels={[
- {
- insertAt: 0,
- name: langui.primary_language ?? "Primary language",
- },
- {
- insertAt: 1,
- name: langui.secondary_language ?? "Secondary languages",
- },
- ]}
- onChange={(items) => {
- const newPreferredLanguages = items.map((item) => item.code);
- setPreferredLanguages(newPreferredLanguages);
- sendAnalytics("Settings", "Change preferred languages");
- }}
- />
- )}
-
- )}
void;
- }>({ showLightBox: () => null })
-);
-
-export const lightBox = lightBoxAtom[0];
+import { useAtomSetter } from "helpers/atoms";
+import { lightBox } from "contexts/atoms";
export const LightBoxProvider = (): JSX.Element => {
const [isLightBoxVisible, setLightBoxVisibility] = useState(false);
const [lightBoxImages, setLightBoxImages] = useState<(UploadImageFragment | string)[]>([]);
const [lightBoxIndex, setLightBoxIndex] = useState(0);
- const setShowLightBox = useAtomSetter(lightBoxAtom);
+ const setShowLightBox = useAtomSetter(lightBox);
useEffectOnce(() =>
setShowLightBox({
diff --git a/src/contexts/appLayout.ts b/src/contexts/appLayout.ts
index 506ccdf..467860c 100644
--- a/src/contexts/appLayout.ts
+++ b/src/contexts/appLayout.ts
@@ -1,8 +1,8 @@
import { useRouter } from "next/router";
import { useEffect } from "react";
-import { useScrollIntoView } from "hooks/useScrollIntoView";
import { useAtomSetter } from "helpers/atoms";
import { atoms } from "contexts/atoms";
+import { useScrollIntoView } from "hooks/useScrollIntoView";
export const useAppLayout = (): void => {
const router = useRouter();
diff --git a/src/contexts/atoms.ts b/src/contexts/atoms.ts
index 8c2d790..cd446c9 100644
--- a/src/contexts/atoms.ts
+++ b/src/contexts/atoms.ts
@@ -4,13 +4,24 @@ import { localData } from "contexts/localData";
import { containerQueries } from "contexts/containerQueries";
import { atomPairing } from "helpers/atoms";
import { settings } from "contexts/settings";
-import { lightBox } from "contexts/LightBoxProvider";
+import { UploadImageFragment } from "graphql/generated";
/*
* I'm getting a weird error if I put those atoms in appLayout.ts
* So I'm putting the atoms here. Sucks, I know.
*/
+/* [ LIGHTBOX ] */
+
+export const lightBox = atomPairing(
+ atom<{
+ showLightBox: (
+ images: (UploadImageFragment | string | null | undefined)[],
+ index?: number
+ ) => void;
+ }>({ showLightBox: () => null })
+);
+
/* [ APPLAYOUT ATOMS ] */
const mainPanelReduced = atomPairing(atomWithStorage("isMainPanelReduced", false));
@@ -44,6 +55,6 @@ export const atoms = {
layout,
terminal,
localData,
- lightBox,
+ lightBox: lightBox[0],
containerQueries,
};
diff --git a/src/contexts/localData.ts b/src/contexts/localData.ts
index be54704..f94b65b 100644
--- a/src/contexts/localData.ts
+++ b/src/contexts/localData.ts
@@ -35,7 +35,6 @@ export const useLocalData = (): void => {
const setCurrencies = useAtomSetter(currencies);
const setLangui = useAtomSetter(langui);
- const { locale } = useRouter();
const { data: rawLanguages } = useFetch
(getFileName("languages"));
const { data: rawCurrencies } = useFetch(getFileName("currencies"));
const { data: rawLangui } = useFetch(
@@ -54,6 +53,6 @@ export const useLocalData = (): void => {
useEffect(() => {
console.log("[useLocalData] Refresh langui");
- setLangui(processLangui(rawLangui, locale));
- }, [locale, rawLangui, setLangui]);
+ setLangui(processLangui(rawLangui, "en"));
+ }, [rawLangui, setLangui]);
};
diff --git a/src/contexts/settings.ts b/src/contexts/settings.ts
index fe98769..f129b35 100644
--- a/src/contexts/settings.ts
+++ b/src/contexts/settings.ts
@@ -1,11 +1,12 @@
-import { useRouter } from "next/router";
+// import { useRouter } from "next/router";
import { useLayoutEffect, useEffect } from "react";
import { atom } from "jotai";
import { atomWithStorage } from "jotai/utils";
-import { atomPairing, useAtomGetter, useAtomPair } from "helpers/atoms";
+import { atomPairing, useAtomGetter, useAtomPair, useAtomSetter } from "helpers/atoms";
import { getDefaultPreferredLanguages } from "helpers/locales";
import { isDefined, isDefinedAndNotEmpty } from "helpers/others";
import { usePrefersDarkMode } from "hooks/useMediaQuery";
+import { Ids } from "types/ids";
export enum ThemeMode {
Dark = "dark",
@@ -32,11 +33,10 @@ export const settings = {
};
export const useSettings = (): void => {
- const router = useRouter();
- const [preferredLanguages, setPreferredLanguages] = useAtomPair(preferredLanguagesAtom);
+ // const router = useRouter();
+ // const [preferredLanguages, setPreferredLanguages] = useAtomPair(preferredLanguagesAtom);
const fontSize = useAtomGetter(fontSizeAtom);
- const isDyslexic = useAtomGetter(dyslexicAtom);
- const [isDarkMode, setDarkMode] = useAtomPair(darkModeAtom);
+ const setDarkMode = useAtomSetter(darkModeAtom);
const themeMode = useAtomGetter(themeModeAtom);
useLayoutEffect(() => {
@@ -46,19 +46,6 @@ export const useSettings = (): void => {
}
}, [fontSize]);
- useLayoutEffect(() => {
- const next = document.getElementById("__next");
- if (isDefined(next)) {
- if (isDyslexic) {
- next.classList.add("set-theme-font-dyslexic");
- next.classList.remove("set-theme-font-standard");
- } else {
- next.classList.add("set-theme-font-standard");
- next.classList.remove("set-theme-font-dyslexic");
- }
- }
- }, [isDyslexic]);
-
/* DARK MODE */
const prefersDarkMode = usePrefersDarkMode();
@@ -66,31 +53,21 @@ export const useSettings = (): void => {
setDarkMode(themeMode === ThemeMode.Auto ? prefersDarkMode : themeMode === ThemeMode.Dark);
}, [prefersDarkMode, setDarkMode, themeMode]);
- useLayoutEffect(() => {
- const next = document.getElementById("__next");
- if (isDefined(next)) {
- if (isDarkMode) {
- next.classList.add("set-theme-dark");
- next.classList.remove("set-theme-light");
- } else {
- next.classList.add("set-theme-light");
- next.classList.remove("set-theme-dark");
- }
- }
- }, [isDarkMode]);
-
/* PREFERRED LANGUAGES */
+ /*
useEffect(() => {
if (preferredLanguages.length === 0) {
if (isDefinedAndNotEmpty(router.locale) && router.locales) {
setPreferredLanguages(getDefaultPreferredLanguages(router.locale, router.locales));
}
} else if (router.locale !== preferredLanguages[0]) {
- /*
- * Using a timeout to the code getting stuck into a loop when reaching the website with a
- * different preferredLanguages[0] from router.locale
- */
+ */
+ /*
+ * Using a timeout to the code getting stuck into a loop when reaching the website with a
+ * different preferredLanguages[0] from router.locale
+ */
+ /*
setTimeout(
async () =>
router.replace(router.asPath, router.asPath, {
@@ -100,4 +77,5 @@ export const useSettings = (): void => {
);
}
}, [preferredLanguages, router, setPreferredLanguages]);
+ */
};
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
deleted file mode 100644
index 3112b18..0000000
--- a/src/pages/404.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { GetStaticProps } from "next";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel } from "components/Containers/ContentPanel";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { Img } from "components/Img";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const FourOhFour = ({ openGraph, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
-
-
-
{langui.page_not_found}
-
-
-
- }
- openGraph={openGraph}
- {...otherProps}
- />
- );
-};
-export default FourOhFour;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, `404 - ${langui.page_not_found}`),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/500.tsx b/src/pages/500.tsx
deleted file mode 100644
index c4605be..0000000
--- a/src/pages/500.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { GetStaticProps } from "next";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel } from "components/Containers/ContentPanel";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { Img } from "components/Img";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const FiveHundred = ({ openGraph, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
-
-
-
{langui.page_not_found}
-
-
-
- }
- openGraph={openGraph}
- {...otherProps}
- />
- );
-};
-export default FiveHundred;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, "500 - Internal Server Error"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
deleted file mode 100644
index 0121a98..0000000
--- a/src/pages/_app.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import "@fontsource/material-icons";
-import "@fontsource/material-icons-outlined";
-import "@fontsource/opendyslexic/400.css";
-import "@fontsource/share-tech-mono/400.css";
-import "@fontsource/opendyslexic/700.css";
-import "@fontsource/vollkorn/700.css";
-import "@fontsource/zen-maru-gothic/500.css";
-import "@fontsource/zen-maru-gothic/900.css";
-
-import type { AppProps } from "next/app";
-import Script from "next/script";
-
-import "styles/debug.css";
-import "styles/formatted.css";
-import "styles/others.css";
-import "styles/rc-slider.css";
-import "styles/tippy.css";
-
-import { useLocalData } from "contexts/localData";
-import { useAppLayout } from "contexts/appLayout";
-import { LightBoxProvider } from "contexts/LightBoxProvider";
-import { SettingsPopup } from "components/Panels/SettingsPopup";
-import { useSettings } from "contexts/settings";
-import { useContainerQueries } from "contexts/containerQueries";
-
-const AccordsLibraryApp = (props: AppProps): JSX.Element => {
- useLocalData();
- useAppLayout();
- useSettings();
- useContainerQueries();
-
- return (
- <>
-
-
-
-
- >
- );
-};
-export default AccordsLibraryApp;
diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx
deleted file mode 100644
index 12a8bac..0000000
--- a/src/pages/_document.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import Document, {
- DocumentContext,
- DocumentInitialProps,
- Head,
- Html,
- Main,
- NextScript,
-} from "next/document";
-
-export default class MyDocument extends Document {
- static async getInitialProps(ctx: DocumentContext): Promise {
- const initialProps = await Document.getInitialProps(ctx);
- return { ...initialProps };
- }
-
- render(): JSX.Element {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx
deleted file mode 100644
index 4cb9d13..0000000
--- a/src/pages/about-us/accords-handbook.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const AccordsHandbook = (props: PostStaticProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
- );
-};
-export default AccordsHandbook;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps = getPostStaticProps("accords-handbook");
diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx
deleted file mode 100644
index 2c1ddee..0000000
--- a/src/pages/about-us/contact.tsx
+++ /dev/null
@@ -1,185 +0,0 @@
-import { useRouter } from "next/router";
-import { useState } from "react";
-import { InsetBox } from "components/Containers/InsetBox";
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { cIf, cJoin } from "helpers/className";
-import { randomInt } from "helpers/numbers";
-import { RequestMailProps, ResponseMailProps } from "pages/api/mail";
-import { sendAnalytics } from "helpers/analytics";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const AboutUs = (props: PostStaticProps): JSX.Element => {
- const router = useRouter();
- const langui = useAtomGetter(atoms.localData.langui);
- const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout);
- const [formResponse, setFormResponse] = useState("");
- const [formState, setFormState] = useState<"completed" | "ongoing" | "stale">("stale");
-
- const [randomNumber1, setRandomNumber1] = useState(randomInt(0, 10));
- const [randomNumber2, setRandomNumber2] = useState(randomInt(0, 10));
-
- const contactForm = (
-
-
-
-
- {formResponse && (
-
- {formResponse}
-
- )}
-
-
- );
-
- return (
-
- );
-};
-export default AboutUs;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps = getPostStaticProps("contact");
diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx
deleted file mode 100644
index 37627f1..0000000
--- a/src/pages/about-us/index.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import { GetStaticProps } from "next";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Icon } from "components/Ico";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { getOpenGraph } from "helpers/openGraph";
-import { HorizontalLine } from "components/HorizontalLine";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const AboutUs = (props: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
-
-
-
-
-
-
-
-
-
- }
- {...props}
- />
- );
-};
-export default AboutUs;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, langui.about_us ?? "About us"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx
deleted file mode 100644
index a753c4d..0000000
--- a/src/pages/about-us/legality.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const Legality = (props: PostStaticProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
- );
-};
-export default Legality;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps = getPostStaticProps("legality");
diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx
deleted file mode 100644
index 850523e..0000000
--- a/src/pages/about-us/sharing-policy.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const SharingPolicy = (props: PostStaticProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
- );
-};
-export default SharingPolicy;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps = getPostStaticProps("sharing-policy");
diff --git a/src/pages/api/mail.ts b/src/pages/api/mail.ts
deleted file mode 100644
index 7c06663..0000000
--- a/src/pages/api/mail.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import type { NextApiRequest, NextApiResponse } from "next";
-import nodemailer from "nodemailer";
-import { SMTPError } from "nodemailer/lib/smtp-connection";
-
-export interface ResponseMailProps {
- code?: string;
- message?: string;
-}
-
-export interface RequestMailProps {
- name: string;
- email: string;
- message: string;
- formName: string;
-}
-
-const Mail = async (
- req: NextApiRequest,
- res: NextApiResponse
-): Promise => {
- if (req.method === "POST") {
- const body = req.body as RequestMailProps;
-
- const transporter = nodemailer.createTransport({
- host: process.env.SMTP_HOST,
- port: 587,
- secure: false,
- auth: {
- user: process.env.SMTP_USER,
- pass: process.env.SMTP_PASSWORD,
- },
- });
-
- // send mail with defined transport object
- await transporter
- .sendMail({
- from: `"${body.name}" <${body.email}>`,
- to: "contact@accords-library.com",
- subject: `New ${body.formName} from ${body.name}`,
- text: body.message,
- })
- .catch((reason: SMTPError) => {
- res.status(reason.responseCode ?? 500).json({
- code: reason.code,
- message: reason.response,
- });
- });
- }
-
- res.status(200).json({ code: "OKAY" });
-};
-export default Mail;
diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts
deleted file mode 100644
index ae162b5..0000000
--- a/src/pages/api/revalidate.ts
+++ /dev/null
@@ -1,253 +0,0 @@
-import type { NextApiRequest, NextApiResponse } from "next";
-import { i18n } from "../../../next.config";
-import { cartesianProduct } from "helpers/others";
-
-type CRUDEvents = "entry.create" | "entry.delete" | "entry.update";
-
-type StrapiEvent = {
- event: CRUDEvents;
- model: string;
- entry: Record;
-};
-
-type RequestProps =
- | CustomRequest
- | StrapiChronicle
- | StrapiChronicleChapter
- | StrapiChronology
- | StrapiContent
- | StrapiContentFolder
- | StrapiLibraryItem
- | StrapiPostContent
- | StrapiRangedContent
- | StrapiWiki;
-
-interface CustomRequest {
- model: "custom";
- path: string;
-}
-
-interface StrapiRangedContent extends StrapiEvent {
- event: CRUDEvents;
- model: "ranged-content";
- entry: {
- library_item?: {
- slug: string;
- };
- content?: {
- slug: string;
- };
- };
-}
-
-interface StrapiContent extends StrapiEvent {
- model: "content";
- entry: {
- slug: string;
- folder?: {
- slug: string;
- };
- ranged_contents: {
- slug: string;
- }[];
- };
-}
-
-interface StrapiPostContent extends StrapiEvent {
- event: CRUDEvents;
- model: "post";
- entry: {
- slug: string;
- };
-}
-
-interface StrapiLibraryItem extends StrapiEvent {
- event: CRUDEvents;
- model: "library-item";
- entry: {
- slug: string;
- subitem_of: [
- {
- slug: string;
- }
- ];
- };
-}
-
-interface StrapiContentFolder extends StrapiEvent {
- event: CRUDEvents;
- model: "contents-folder";
- entry: {
- slug: string;
- parent_folder?: {
- slug: string;
- };
- subfolders: { slug: string }[];
- contents: {
- slug: string;
- }[];
- };
-}
-
-interface StrapiChronology extends StrapiEvent {
- event: CRUDEvents;
- model: "chronology-era" | "chronology-item";
-}
-
-interface StrapiWiki extends StrapiEvent {
- event: CRUDEvents;
- model: "wiki-page";
- entry: {
- slug: string;
- };
-}
-
-interface StrapiChronicle extends StrapiEvent {
- event: CRUDEvents;
- model: "chronicle";
- entry: {
- slug: string;
- };
-}
-
-interface StrapiChronicleChapter extends StrapiEvent {
- event: CRUDEvents;
- model: "chronicles-chapter";
- entry: {
- chronicles: { slug: string }[];
- };
-}
-
-type ResponseMailProps = {
- message: string;
- revalidated: boolean;
-};
-
-const Revalidate = (req: NextApiRequest, res: NextApiResponse): void => {
- const body = req.body as RequestProps;
-
- // Check for secret to confirm this is a valid request
- if (req.headers.authorization !== `Bearer ${process.env.REVALIDATION_TOKEN}`) {
- res.status(401).json({ message: "Invalid token", revalidated: false });
- return;
- }
-
- const paths: string[] = [];
-
- switch (body.model) {
- case "post": {
- paths.push(`/news`);
- paths.push(`/news/${body.entry.slug}`);
- break;
- }
-
- case "library-item": {
- paths.push(`/library`);
- paths.push(`/library/${body.entry.slug}`);
- paths.push(`/library/${body.entry.slug}/reader`);
- body.entry.subitem_of.forEach((parentItem) => {
- paths.push(`/library/${parentItem.slug}`);
- });
- break;
- }
-
- case "content": {
- paths.push(`/contents`);
- paths.push(`/contents/all`);
- paths.push(`/contents/${body.entry.slug}`);
- if (body.entry.folder?.slug) {
- paths.push(`/contents/folder/${body.entry.folder.slug}`);
- }
- if (body.entry.ranged_contents.length > 0) {
- body.entry.ranged_contents.forEach((ranged_content) => {
- const parentSlug = ranged_content.slug.slice(
- 0,
- ranged_content.slug.length - body.entry.slug.length - 1
- );
- paths.push(`/library/${parentSlug}`);
- paths.push(`/library/${parentSlug}/reader`);
- });
- }
- break;
- }
-
- case "chronology-era":
- case "chronology-item": {
- paths.push(`/wiki/chronology`);
- break;
- }
-
- case "ranged-content": {
- if (body.entry.library_item) {
- paths.push(`/library/${body.entry.library_item.slug}`);
- paths.push(`/library/${body.entry.library_item.slug}/reader`);
- }
- if (body.entry.content) {
- paths.push(`/contents/${body.entry.content.slug}`);
- }
- break;
- }
-
- case "contents-folder": {
- if (body.entry.slug === "root") {
- paths.push(`/contents`);
- }
- paths.push(`/contents/folder/${body.entry.slug}`);
- if (body.entry.parent_folder) {
- paths.push(`/contents/folder/${body.entry.parent_folder.slug}`);
- }
- body.entry.subfolders.forEach((subfolder) =>
- paths.push(`/contents/folder/${subfolder.slug}`)
- );
- body.entry.contents.forEach((content) => paths.push(`/contents/${content.slug}`));
- break;
- }
-
- case "wiki-page": {
- paths.push(`/wiki`);
- paths.push(`/wiki/${body.entry.slug}`);
- break;
- }
-
- case "chronicle": {
- paths.push(`/chronicles`);
- paths.push(`/chronicles/${body.entry.slug}`);
- break;
- }
-
- case "chronicles-chapter": {
- paths.push(`/chronicles`);
- body.entry.chronicles.forEach((chronicle) => {
- paths.push(`/chronicles/${chronicle.slug}`);
- });
- break;
- }
-
- case "custom": {
- paths.push(`${body.path}`);
- break;
- }
-
- default:
- console.log(body);
- break;
- }
-
- const localizedPaths = cartesianProduct(i18n.locales, paths).map(
- ([locale, path]) => `/${locale}${path}`
- );
- console.table(localizedPaths);
-
- try {
- Promise.all(
- localizedPaths.map(async (path) => {
- await res.revalidate(path);
- })
- );
- res.json({ message: "Success!", revalidated: true });
- return;
- } catch (error) {
- res.status(500).send({ message: `Error revalidating: ${error}`, revalidated: false });
- }
-};
-export default Revalidate;
diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx
deleted file mode 100644
index e6cd447..0000000
--- a/src/pages/archives/index.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo } from "react";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { Icon } from "components/Ico";
-import { getOpenGraph } from "helpers/openGraph";
-import { HorizontalLine } from "components/HorizontalLine";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const Archives = (props: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const subPanel = useMemo(
- () => (
-
-
-
-
-
- ),
- [langui]
- );
- return ;
-};
-export default Archives;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, langui.archives ?? "Archives"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx
deleted file mode 100644
index 41e0709..0000000
--- a/src/pages/archives/videos/c/[uid].tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { useMemo, useState } from "react";
-import { useBoolean } from "usehooks-ts";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Switch } from "components/Inputs/Switch";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { PreviewCard } from "components/PreviewCard";
-import { GetVideoChannelQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { getVideoThumbnailURL } from "helpers/videos";
-import { Icon } from "components/Ico";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { filterHasAttributes, isDefined } from "helpers/others";
-import { getOpenGraph } from "helpers/openGraph";
-import { compareDate } from "helpers/date";
-import { HorizontalLine } from "components/HorizontalLine";
-import { SmartList } from "components/SmartList";
-import { cIf } from "helpers/className";
-import { TextInput } from "components/Inputs/TextInput";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- searchName: "",
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- channel: NonNullable["data"][number]["attributes"];
-}
-
-const Channel = ({ channel, ...otherProps }: Props): JSX.Element => {
- const { value: keepInfoVisible, toggle: toggleKeepInfoVisible } = useBoolean(true);
- const langui = useAtomGetter(atoms.localData.langui);
- const hoverable = useDeviceSupportsHover();
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
-
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
-
- {hoverable && (
-
-
-
- )}
-
- ),
- [hoverable, keepInfoVisible, langui, searchName, toggleKeepInfoVisible]
- );
-
- const contentPanel = useMemo(
- () => (
-
- item.id}
- renderItem={({ item }) => (
-
- )}
- className={cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-3 gap-y-5"
- )}
- groupingFunction={() => [channel?.title ?? ""]}
- paginationItemPerPage={25}
- searchingTerm={searchName}
- searchingBy={(item) => item.attributes.title}
- />
-
- ),
- [channel?.title, channel?.videos?.data, isContentPanelAtLeast4xl, keepInfoVisible, searchName]
- );
-
- return ;
-};
-export default Channel;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const channel = await sdk.getVideoChannel({
- channel: context.params && isDefined(context.params.uid) ? context.params.uid.toString() : "",
- });
- if (!channel.videoChannels?.data[0].attributes) return { notFound: true };
-
- channel.videoChannels.data[0].attributes.videos?.data
- .sort((a, b) => compareDate(a.attributes?.published_date, b.attributes?.published_date))
- .reverse();
-
- const props: Props = {
- channel: channel.videoChannels.data[0].attributes,
- openGraph: getOpenGraph(langui, channel.videoChannels.data[0].attributes.title),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const channels = await sdk.getVideoChannelsSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
-
- if (channels.videoChannels?.data)
- filterHasAttributes(channels.videoChannels.data, ["attributes"] as const).map((channel) => {
- context.locales?.map((local) => {
- paths.push({
- params: { uid: channel.attributes.uid },
- locale: local,
- });
- });
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx
deleted file mode 100644
index 1dd29e3..0000000
--- a/src/pages/archives/videos/index.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo, useState } from "react";
-import { useBoolean } from "usehooks-ts";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { SmartList } from "components/SmartList";
-import { Icon } from "components/Ico";
-import { Switch } from "components/Inputs/Switch";
-import { TextInput } from "components/Inputs/TextInput";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { PreviewCard } from "components/PreviewCard";
-import { GetVideosPreviewQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { filterHasAttributes } from "helpers/others";
-import { getVideoThumbnailURL } from "helpers/videos";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { getOpenGraph } from "helpers/openGraph";
-import { compareDate } from "helpers/date";
-import { HorizontalLine } from "components/HorizontalLine";
-import { cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- searchName: "",
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- videos: NonNullable["data"];
-}
-
-const Videos = ({ videos, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const hoverable = useDeviceSupportsHover();
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
-
- const { value: keepInfoVisible, toggle: toggleKeepInfoVisible } = useBoolean(true);
-
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
-
- {hoverable && (
-
-
-
- )}
-
- ),
- [hoverable, keepInfoVisible, langui, searchName, toggleKeepInfoVisible]
- );
-
- const contentPanel = useMemo(
- () => (
-
- item.id}
- renderItem={({ item }) => (
-
- )}
- className={cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-3 gap-y-5"
- )}
- paginationItemPerPage={25}
- searchingTerm={searchName}
- searchingBy={(item) => item.attributes.title}
- />
-
- ),
- [isContentPanelAtLeast4xl, keepInfoVisible, searchName, videos]
- );
- return ;
-};
-export default Videos;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const videos = await sdk.getVideosPreview();
- if (!videos.videos) return { notFound: true };
- videos.videos.data
- .sort((a, b) => compareDate(a.attributes?.published_date, b.attributes?.published_date))
- .reverse();
-
- const props: Props = {
- videos: videos.videos.data,
- openGraph: getOpenGraph(langui, langui.videos ?? "Videos"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx
deleted file mode 100644
index e0115a8..0000000
--- a/src/pages/archives/videos/v/[uid].tsx
+++ /dev/null
@@ -1,195 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { useMemo } from "react";
-import { useRouter } from "next/router";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { HorizontalLine } from "components/HorizontalLine";
-import { Ico, Icon } from "components/Ico";
-import { Button } from "components/Inputs/Button";
-import { InsetBox } from "components/Containers/InsetBox";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { GetVideoQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { prettyDate, prettyShortenNumber } from "helpers/formatters";
-import { filterHasAttributes, isDefined } from "helpers/others";
-import { getVideoFile } from "helpers/videos";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- video: NonNullable["data"][number]["attributes"]>;
-}
-
-const Video = ({ video, ...otherProps }: Props): JSX.Element => {
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
- const langui = useAtomGetter(atoms.localData.langui);
- const router = useRouter();
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
-
- ),
- [langui]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
-
-
- {video.gone ? (
-
- ) : (
-
- )}
-
-
-
{video.title}
-
-
-
- {prettyDate(video.published_date, router.locale)}
-
-
-
- {isContentPanelAtLeast4xl
- ? video.views.toLocaleString()
- : prettyShortenNumber(video.views)}
-
- {video.channel?.data?.attributes && (
-
-
- {isContentPanelAtLeast4xl
- ? video.likes.toLocaleString()
- : prettyShortenNumber(video.likes)}
-
- )}
-
-
-
-
-
-
-
- {video.channel?.data?.attributes && (
-
-
-
{langui.channel}
-
-
-
- {`${video.channel.data.attributes.subscribers.toLocaleString()}
- ${langui.subscribers?.toLowerCase()}`}
-
-
-
-
- )}
-
-
-
-
{langui.description}
-
{video.description}
-
-
-
-
- ),
- [
- isContentPanelAtLeast4xl,
- langui,
- router.locale,
- video.channel?.data?.attributes,
- video.description,
- video.gone,
- video.likes,
- video.published_date,
- video.source,
- video.title,
- video.uid,
- video.views,
- ]
- );
-
- return ;
-};
-export default Video;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const videos = await sdk.getVideo({
- uid: context.params && isDefined(context.params.uid) ? context.params.uid.toString() : "",
- });
- if (!videos.videos?.data[0]?.attributes) return { notFound: true };
-
- const props: Props = {
- video: videos.videos.data[0].attributes,
- openGraph: getOpenGraph(langui, videos.videos.data[0].attributes.title),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const videos = await sdk.getVideosSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- if (videos.videos?.data)
- filterHasAttributes(videos.videos.data, ["attributes"] as const).map((video) => {
- context.locales?.map((local) => {
- paths.push({ params: { uid: video.attributes.uid }, locale: local });
- });
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
diff --git a/src/pages/chronicles/[slug]/index.tsx b/src/pages/chronicles/[slug]/index.tsx
deleted file mode 100644
index 84b2850..0000000
--- a/src/pages/chronicles/[slug]/index.tsx
+++ /dev/null
@@ -1,285 +0,0 @@
-import { GetStaticProps, GetStaticPaths, GetStaticPathsResult } from "next";
-import { useCallback, useMemo } from "react";
-import { getReadySdk } from "graphql/sdk";
-import { isDefined, filterHasAttributes } from "helpers/others";
-import { ChronicleWithTranslations } from "types/types";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { ContentPanel } from "components/Containers/ContentPanel";
-import { Markdawn } from "components/Markdown/Markdawn";
-import { SubPanel } from "components/Containers/SubPanel";
-import { ThumbnailHeader } from "components/ThumbnailHeader";
-import { HorizontalLine } from "components/HorizontalLine";
-import { GetChroniclesChaptersQuery } from "graphql/generated";
-import { prettyInlineTitle, prettySlug } from "helpers/formatters";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { Icon } from "components/Ico";
-import { getOpenGraph } from "helpers/openGraph";
-import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
-import { getDescription } from "helpers/description";
-import { TranslatedChroniclesList } from "components/Chronicles/ChroniclesList";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- chronicle: ChronicleWithTranslations;
- chapters: NonNullable["data"];
-}
-
-const Chronicle = ({ chronicle, chapters, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
- items: chronicle.translations,
- languageExtractor: useCallback(
- (item: ChronicleWithTranslations["translations"][number]) =>
- item?.language?.data?.attributes?.code,
- []
- ),
- });
-
- const primaryContent = useMemo<
- NonNullable["data"][number]["attributes"]
- >(
- () =>
- filterHasAttributes(chronicle.contents?.data, ["attributes.translations"] as const)[0]
- ?.attributes,
- [chronicle.contents?.data]
- );
-
- const [selectedContentTranslation, ContentLanguageSwitcher, ContentLanguageSwitcherProps] =
- useSmartLanguage({
- items: primaryContent?.translations ?? [],
- languageExtractor: useCallback(
- (
- item: NonNullable<
- NonNullable<
- NonNullable["data"][number]["attributes"]
- >["translations"]
- >[number]
- ) => item?.language?.data?.attributes?.code,
- []
- ),
- });
-
- const contentPanel = useMemo(
- () => (
-
-
-
- {isDefined(selectedTranslation) ? (
- <>
- {selectedTranslation.title}
-
- {languageSwitcherProps.locales.size > 1 && (
-
- )}
-
- {isDefined(selectedTranslation.body) && (
-
- )}
- >
- ) : (
- <>
- {selectedContentTranslation && (
- <>
- 1 ? (
-
- ) : undefined
- }
- categories={primaryContent?.categories}
- type={primaryContent?.type}
- description={selectedContentTranslation.description}
- thumbnail={primaryContent?.thumbnail?.data?.attributes}
- />
-
- {selectedContentTranslation.text_set?.text && (
- <>
-
-
- >
- )}
- >
- )}
- >
- )}
-
- ),
- [
- selectedTranslation,
- languageSwitcherProps,
- LanguageSwitcher,
- selectedContentTranslation,
- ContentLanguageSwitcherProps,
- ContentLanguageSwitcher,
- primaryContent?.categories,
- primaryContent?.type,
- primaryContent?.thumbnail?.data?.attributes,
- langui,
- ]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
- {filterHasAttributes(chapters, ["attributes.chronicles", "id"] as const).map(
- (chapter) => (
- ({
- title: translation.title,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(chapter.attributes.slug) }}
- currentSlug={chronicle.slug}
- />
- )
- )}
-
-
- ),
- [chapters, chronicle.slug, langui]
- );
-
- return (
-
- );
-};
-export default Chronicle;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const slug =
- context.params && isDefined(context.params.slug) ? context.params.slug.toString() : "";
- const chronicle = await sdk.getChronicle({
- language_code: context.locale ?? "en",
- slug: slug,
- });
- const chronicles = await sdk.getChroniclesChapters();
- if (
- !chronicle.chronicles?.data[0]?.attributes?.translations ||
- !chronicles.chroniclesChapters?.data
- )
- return { notFound: true };
-
- const { title, description } = (() => {
- if (context.locale && context.locales) {
- if (chronicle.chronicles.data[0].attributes.contents?.data[0]?.attributes?.translations) {
- const selectedContentTranslation = staticSmartLanguage({
- items: chronicle.chronicles.data[0].attributes.contents.data[0].attributes.translations,
- languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
- });
- if (selectedContentTranslation) {
- return {
- title: prettyInlineTitle(
- selectedContentTranslation.pre_title,
- selectedContentTranslation.title,
- selectedContentTranslation.subtitle
- ),
- description: getDescription(selectedContentTranslation.description, {
- [langui.type ?? "Type"]: [
- chronicle.chronicles.data[0].attributes.contents.data[0].attributes.type?.data
- ?.attributes?.titles?.[0]?.title,
- ],
- [langui.categories ?? "Categories"]: filterHasAttributes(
- chronicle.chronicles.data[0].attributes.contents.data[0].attributes.categories
- ?.data,
- ["attributes"] as const
- ).map((category) => category.attributes.short),
- }),
- };
- }
- } else {
- const selectedTranslation = staticSmartLanguage({
- items: chronicle.chronicles.data[0].attributes.translations,
- languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
- });
- if (selectedTranslation) {
- return {
- title: selectedTranslation.title,
- description: selectedTranslation.summary,
- };
- }
- }
- }
- return {
- title: prettySlug(chronicle.chronicles.data[0].attributes.slug),
- description: undefined,
- };
- })();
-
- const thumbnail =
- chronicle.chronicles.data[0].attributes.translations.length === 0
- ? chronicle.chronicles.data[0].attributes.contents?.data[0]?.attributes?.thumbnail?.data
- ?.attributes
- : undefined;
-
- const props: Props = {
- chronicle: chronicle.chronicles.data[0].attributes as ChronicleWithTranslations,
- chapters: chronicles.chroniclesChapters.data,
- openGraph: getOpenGraph(langui, title, description, thumbnail),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const contents = await sdk.getChroniclesSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(contents.chronicles?.data, ["attributes"] as const).map((wikiPage) => {
- context.locales?.map((local) =>
- paths.push({
- params: { slug: wikiPage.attributes.slug },
- locale: local,
- })
- );
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx
deleted file mode 100644
index 208b214..0000000
--- a/src/pages/chronicles/index.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo } from "react";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { Icon } from "components/Ico";
-import { getReadySdk } from "graphql/sdk";
-import { GetChroniclesChaptersQuery } from "graphql/generated";
-import { filterHasAttributes } from "helpers/others";
-import { prettySlug } from "helpers/formatters";
-import { getOpenGraph } from "helpers/openGraph";
-import { TranslatedChroniclesList } from "components/Chronicles/ChroniclesList";
-import { HorizontalLine } from "components/HorizontalLine";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- chapters: NonNullable["data"];
-}
-
-const Chronicles = ({ chapters, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
- {filterHasAttributes(chapters, ["attributes.chronicles", "id"] as const).map(
- (chapter) => (
- ({
- title: translation.title,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(chapter.attributes.slug) }}
- />
- )
- )}
-
-
- ),
- [chapters, langui]
- );
-
- return ;
-};
-export default Chronicles;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const chronicles = await sdk.getChroniclesChapters();
- if (!chronicles.chroniclesChapters?.data) return { notFound: true };
-
- const props: Props = {
- chapters: chronicles.chroniclesChapters.data,
- openGraph: getOpenGraph(langui, langui.chronicles ?? "Chronicles"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/contents/[slug].tsx b/src/pages/contents/[slug].tsx
deleted file mode 100644
index cb32da4..0000000
--- a/src/pages/contents/[slug].tsx
+++ /dev/null
@@ -1,525 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { Fragment, useCallback, useMemo } from "react";
-import naturalCompare from "string-natural-compare";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Chip } from "components/Chip";
-import { HorizontalLine } from "components/HorizontalLine";
-import { PreviewCardCTAs } from "components/Library/PreviewCardCTAs";
-import { Markdawn, TableOfContents } from "components/Markdown/Markdawn";
-import { TranslatedReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { PreviewCard } from "components/PreviewCard";
-import { RecorderChip } from "components/RecorderChip";
-import { ThumbnailHeader } from "components/ThumbnailHeader";
-import { ToolTip } from "components/ToolTip";
-import { getReadySdk } from "graphql/sdk";
-import {
- prettyInlineTitle,
- prettyLanguage,
- prettyItemSubType,
- prettySlug,
-} from "helpers/formatters";
-import { isUntangibleGroupItem } from "helpers/libraryItem";
-import { filterHasAttributes, getStatusDescription, isDefinedAndNotEmpty } from "helpers/others";
-import { ContentWithTranslations } from "types/types";
-import { useScrollTopOnChange } from "hooks/useScrollTopOnChange";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { getOpenGraph } from "helpers/openGraph";
-import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
-import { getDescription } from "helpers/description";
-import { TranslatedPreviewLine } from "components/PreviewLine";
-import { cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { Ids } from "types/ids";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- content: ContentWithTranslations;
-}
-
-const Content = ({ content, ...otherProps }: Props): JSX.Element => {
- const isContentPanelAtLeast2xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast2xl);
- const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout);
-
- const langui = useAtomGetter(atoms.localData.langui);
- const languages = useAtomGetter(atoms.localData.languages);
-
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
- items: content.translations,
- languageExtractor: useCallback(
- (item: NonNullable) =>
- item.language?.data?.attributes?.code,
- []
- ),
- });
-
- useScrollTopOnChange(Ids.ContentPanel, [selectedTranslation]);
-
- const { previousContent, nextContent } = useMemo(
- () => ({
- previousContent:
- content.folder?.data?.attributes?.contents && content.folder.data.attributes.sequence
- ? getPreviousContent(content.folder.data.attributes.contents.data, content.slug)
- : undefined,
- nextContent:
- content.folder?.data?.attributes?.contents && content.folder.data.attributes.sequence
- ? getNextContent(content.folder.data.attributes.contents.data, content.slug)
- : undefined,
- }),
- [content.folder, content.slug]
- );
-
- const returnButtonProps = useMemo(
- () => ({
- href: content.folder?.data?.attributes
- ? `/contents/folder/${content.folder.data.attributes.slug}`
- : "/contents",
-
- translations: filterHasAttributes(content.folder?.data?.attributes?.titles, [
- "language.data.attributes.code",
- ] as const).map((title) => ({
- language: title.language.data.attributes.code,
- title: title.title,
- })),
- fallback: {
- title: content.folder?.data?.attributes
- ? prettySlug(content.folder.data.attributes.slug)
- : langui.contents,
- },
- langui,
- }),
- [content.folder?.data?.attributes, langui]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
- {selectedTranslation?.text_set?.source_language?.data?.attributes?.code !== undefined && (
- <>
-
-
-
- {selectedTranslation.text_set.source_language.data.attributes.code ===
- selectedTranslation.language?.data?.attributes?.code
- ? langui.transcript_notice
- : langui.translation_notice}
-
-
- {selectedTranslation.text_set.source_language.data.attributes.code !==
- selectedTranslation.language?.data?.attributes?.code && (
-
-
{langui.source_language}:
-
-
- )}
-
-
-
{langui.status}:
-
-
-
-
-
-
- {selectedTranslation.text_set.transcribers &&
- selectedTranslation.text_set.transcribers.data.length > 0 && (
-
-
{langui.transcribers}:
-
- {filterHasAttributes(selectedTranslation.text_set.transcribers.data, [
- "attributes",
- "id",
- ] as const).map((recorder) => (
-
-
-
- ))}
-
-
- )}
-
- {selectedTranslation.text_set.translators &&
- selectedTranslation.text_set.translators.data.length > 0 && (
-
-
{langui.translators}:
-
- {filterHasAttributes(selectedTranslation.text_set.translators.data, [
- "attributes",
- "id",
- ] as const).map((recorder) => (
-
-
-
- ))}
-
-
- )}
-
- {selectedTranslation.text_set.proofreaders &&
- selectedTranslation.text_set.proofreaders.data.length > 0 && (
-
-
{langui.proofreaders}:
-
- {filterHasAttributes(selectedTranslation.text_set.proofreaders.data, [
- "attributes",
- "id",
- ] as const).map((recorder) => (
-
-
-
- ))}
-
-
- )}
-
- {isDefinedAndNotEmpty(selectedTranslation.text_set.notes) && (
-
-
{langui.notes}:
-
-
-
-
- )}
-
- >
- )}
-
- {selectedTranslation?.text_set?.text && (
- <>
-
- >
- )}
-
- {content.ranged_contents?.data && content.ranged_contents.data.length > 0 && (
- <>
-
-
-
{langui.source}
-
- {filterHasAttributes(content.ranged_contents.data, [
- "attributes.library_item.data.attributes",
- "attributes.library_item.data.id",
- ] as const).map((rangedContent) => {
- const libraryItem = rangedContent.attributes.library_item.data;
- return (
-
-
0 &&
- libraryItem.attributes.metadata[0]
- ? [prettyItemSubType(libraryItem.attributes.metadata[0])]
- : []
- }
- bottomChips={filterHasAttributes(libraryItem.attributes.categories?.data, [
- "attributes",
- ] as const).map((category) => category.attributes.short)}
- metadata={{
- releaseDate: libraryItem.attributes.release_date,
- price: libraryItem.attributes.price,
- position: "Bottom",
- }}
- infoAppend={
- !isUntangibleGroupItem(libraryItem.attributes.metadata?.[0]) && (
-
- )
- }
- />
-
- );
- })}
-
-
- >
- )}
-
- ),
- [
- content.ranged_contents?.data,
- languages,
- langui,
- returnButtonProps,
- selectedTranslation,
- is1ColumnLayout,
- ]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
-
-
1 ? (
-
- ) : undefined
- }
- />
-
- {previousContent?.attributes && (
-
-
{langui.previous_content}
- ({
- pre_title: translation.pre_title,
- title: translation.title,
- subtitle: translation.subtitle,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{
- title: prettySlug(previousContent.attributes.slug),
- }}
- thumbnail={previousContent.attributes.thumbnail?.data?.attributes}
- topChips={
- isContentPanelAtLeast2xl && previousContent.attributes.type?.data?.attributes
- ? [
- previousContent.attributes.type.data.attributes.titles?.[0]
- ? previousContent.attributes.type.data.attributes.titles[0]?.title
- : prettySlug(previousContent.attributes.type.data.attributes.slug),
- ]
- : undefined
- }
- bottomChips={
- isContentPanelAtLeast2xl
- ? previousContent.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )
- : undefined
- }
- />
-
- )}
-
- {selectedTranslation?.text_set?.text && (
- <>
-
-
- >
- )}
-
- {nextContent?.attributes && (
- <>
-
- {langui.followup_content}
- ({
- pre_title: translation.pre_title,
- title: translation.title,
- subtitle: translation.subtitle,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: nextContent.attributes.slug }}
- thumbnail={nextContent.attributes.thumbnail?.data?.attributes}
- topChips={
- isContentPanelAtLeast2xl && nextContent.attributes.type?.data?.attributes
- ? [
- nextContent.attributes.type.data.attributes.titles?.[0]
- ? nextContent.attributes.type.data.attributes.titles[0]?.title
- : prettySlug(nextContent.attributes.type.data.attributes.slug),
- ]
- : undefined
- }
- bottomChips={
- isContentPanelAtLeast2xl
- ? nextContent.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )
- : undefined
- }
- />
- >
- )}
-
-
- ),
- [
- LanguageSwitcher,
- content.categories,
- content.thumbnail?.data?.attributes,
- content.type,
- isContentPanelAtLeast2xl,
- languageSwitcherProps,
- langui,
- nextContent?.attributes,
- previousContent?.attributes,
- returnButtonProps,
- selectedTranslation?.description,
- selectedTranslation?.pre_title,
- selectedTranslation?.subtitle,
- selectedTranslation?.text_set?.text,
- selectedTranslation?.title,
- ]
- );
-
- return ;
-};
-export default Content;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const slug = context.params?.slug ? context.params.slug.toString() : "";
- const content = await sdk.getContentText({
- slug: slug,
- language_code: context.locale ?? "en",
- });
-
- if (!content.contents?.data[0]?.attributes?.translations) {
- return { notFound: true };
- }
-
- const { title, description } = (() => {
- if (context.locale && context.locales) {
- const selectedTranslation = staticSmartLanguage({
- items: content.contents.data[0].attributes.translations,
- languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
- });
- if (selectedTranslation) {
- return {
- title: prettyInlineTitle(
- selectedTranslation.pre_title,
- selectedTranslation.title,
- selectedTranslation.subtitle
- ),
- description: getDescription(selectedTranslation.description, {
- [langui.type ?? "Type"]: [
- content.contents.data[0].attributes.type?.data?.attributes?.titles?.[0]?.title,
- ],
- [langui.categories ?? "Categories"]: filterHasAttributes(
- content.contents.data[0].attributes.categories?.data,
- ["attributes"] as const
- ).map((category) => category.attributes.short),
- }),
- };
- }
- }
- return {
- title: prettySlug(content.contents.data[0].attributes.slug),
- description: undefined,
- };
- })();
-
- const thumbnail = content.contents.data[0].attributes.thumbnail?.data?.attributes;
-
- content.contents.data[0].attributes.folder?.data?.attributes?.contents?.data.sort((a, b) =>
- a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0
- );
-
- const props: Props = {
- content: content.contents.data[0].attributes as ContentWithTranslations,
- openGraph: getOpenGraph(langui, title, description, thumbnail),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const contents = await sdk.getContentsSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(contents.contents?.data, ["attributes"] as const).map((item) => {
- context.locales?.map((local) => {
- paths.push({
- params: { slug: item.attributes.slug },
- locale: local,
- });
- });
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-type FolderContents = NonNullable<
- NonNullable<
- NonNullable["data"]>["attributes"]
- >["contents"]
->["data"];
-
-const getPreviousContent = (contents: FolderContents, currentSlug: string) => {
- for (let index = 0; index < contents.length; index++) {
- const content = contents[index];
- if (content.attributes?.slug === currentSlug && index > 0) {
- return contents[index - 1];
- }
- }
- return undefined;
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-const getNextContent = (contents: FolderContents, currentSlug: string) => {
- for (let index = 0; index < contents.length; index++) {
- const content = contents[index];
- if (content.attributes?.slug === currentSlug && index < contents.length - 1) {
- return contents[index + 1];
- }
- }
- return undefined;
-};
diff --git a/src/pages/contents/all.tsx b/src/pages/contents/all.tsx
deleted file mode 100644
index 1525854..0000000
--- a/src/pages/contents/all.tsx
+++ /dev/null
@@ -1,315 +0,0 @@
-import { GetStaticProps } from "next";
-import { useState, useMemo, useCallback } from "react";
-import { useBoolean } from "usehooks-ts";
-import naturalCompare from "string-natural-compare";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Select } from "components/Inputs/Select";
-import { Switch } from "components/Inputs/Switch";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { getReadySdk } from "graphql/sdk";
-import { prettyInlineTitle, prettySlug } from "helpers/formatters";
-import { TextInput } from "components/Inputs/TextInput";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { Button } from "components/Inputs/Button";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { Icon } from "components/Ico";
-import { filterDefined, filterHasAttributes, isDefinedAndNotEmpty } from "helpers/others";
-import { GetContentsQuery } from "graphql/generated";
-import { SmartList } from "components/SmartList";
-import { SelectiveNonNullable } from "types/SelectiveNonNullable";
-import { getOpenGraph } from "helpers/openGraph";
-import { HorizontalLine } from "components/HorizontalLine";
-import { TranslatedPreviewCard } from "components/PreviewCard";
-import { cJoin, cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { sendAnalytics } from "helpers/analytics";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- groupingMethod: -1,
- keepInfoVisible: false,
- searchName: "",
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- contents: NonNullable["data"];
-}
-
-const Contents = ({ contents, ...otherProps }: Props): JSX.Element => {
- const hoverable = useDeviceSupportsHover();
- const langui = useAtomGetter(atoms.localData.langui);
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
-
- const [groupingMethod, setGroupingMethod] = useState(
- DEFAULT_FILTERS_STATE.groupingMethod
- );
- const {
- value: keepInfoVisible,
- toggle: toggleKeepInfoVisible,
- setValue: setKeepInfoVisible,
- } = useBoolean(DEFAULT_FILTERS_STATE.keepInfoVisible);
-
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
-
- const groupingFunction = useCallback(
- (
- item: SelectiveNonNullable<
- NonNullable["data"][number],
- "attributes" | "id"
- >
- ): string[] => {
- switch (groupingMethod) {
- case 0: {
- const categories = filterHasAttributes(item.attributes.categories?.data, [
- "attributes",
- ] as const);
- if (categories.length > 0) {
- return categories.map((category) => category.attributes.name);
- }
- return [langui.no_category ?? "No category"];
- }
- case 1: {
- return [
- item.attributes.type?.data?.attributes?.titles?.[0]?.title ??
- item.attributes.type?.data?.attributes?.slug
- ? prettySlug(item.attributes.type.data.attributes.slug)
- : langui.no_type ?? "No type",
- ];
- }
- default: {
- return [""];
- }
- }
- },
- [groupingMethod, langui]
- );
-
- const filteringFunction = useCallback(
- (item: SelectiveNonNullable) => {
- if (searchName.length > 1) {
- if (
- filterDefined(item.attributes.translations).find((translation) =>
- prettyInlineTitle(translation.pre_title, translation.title, translation.subtitle)
- .toLowerCase()
- .includes(searchName.toLowerCase())
- )
- ) {
- return true;
- }
- return false;
- }
- return true;
- },
- [searchName]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
-
- {
- setSearchName(name);
- if (isDefinedAndNotEmpty(name)) {
- sendAnalytics("Contents/All", "Change search term");
- } else {
- sendAnalytics("Contents/All", "Clear search term");
- }
- }}
- />
-
-
- {
- setGroupingMethod(value);
- sendAnalytics(
- "Contents/All",
- `Change grouping method (${["none", "category", "type"][value + 1]})`
- );
- }}
- allowEmpty
- />
-
-
- {hoverable && (
-
- {
- toggleKeepInfoVisible();
- sendAnalytics("Contents/All", `Always ${keepInfoVisible ? "hide" : "show"} info`);
- }}
- />
-
- )}
-
- {
- setSearchName(DEFAULT_FILTERS_STATE.searchName);
- setGroupingMethod(DEFAULT_FILTERS_STATE.groupingMethod);
- setKeepInfoVisible(DEFAULT_FILTERS_STATE.keepInfoVisible);
- sendAnalytics("Contents/All", "Reset all filters");
- }}
- />
-
- ),
- [
- groupingMethod,
- hoverable,
- keepInfoVisible,
- langui.always_show_info,
- langui.category,
- langui.contents,
- langui.contents_description,
- langui.group_by,
- langui.reset_all_filters,
- langui.search_title,
- langui.switch_to_folder_view,
- langui.type,
- searchName,
- setKeepInfoVisible,
- toggleKeepInfoVisible,
- ]
- );
-
- const contentPanel = useMemo(
- () => (
-
- item.id}
- renderItem={({ item }) => (
- ({
- pre_title: translation.pre_title,
- title: translation.title,
- subtitle: translation.subtitle,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(item.attributes.slug) }}
- thumbnail={item.attributes.thumbnail?.data?.attributes}
- thumbnailAspectRatio="3/2"
- thumbnailForceAspectRatio
- topChips={
- item.attributes.type?.data?.attributes
- ? [
- item.attributes.type.data.attributes.titles?.[0]
- ? item.attributes.type.data.attributes.titles[0]?.title
- : prettySlug(item.attributes.type.data.attributes.slug),
- ]
- : undefined
- }
- bottomChips={item.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )}
- keepInfoVisible={keepInfoVisible}
- />
- )}
- className={cJoin(
- "items-end",
- cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-3 gap-y-5"
- )
- )}
- groupingFunction={groupingFunction}
- filteringFunction={filteringFunction}
- searchingTerm={searchName}
- searchingBy={(item) =>
- `
- ${item.attributes.slug}
- ${filterDefined(item.attributes.translations)
- .map((translation) =>
- prettyInlineTitle(translation.pre_title, translation.title, translation.subtitle)
- )
- .join(" ")}`
- }
- paginationItemPerPage={50}
- />
-
- ),
- [
- isContentPanelAtLeast4xl,
- contents,
- filteringFunction,
- groupingFunction,
- keepInfoVisible,
- searchName,
- ]
- );
-
- return (
-
- );
-};
-export default Contents;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const contents = await sdk.getContents({
- language_code: context.locale ?? "en",
- });
- if (!contents.contents) return { notFound: true };
-
- contents.contents.data.sort((a, b) => {
- const titleA = a.attributes?.slug ?? "";
- const titleB = b.attributes?.slug ?? "";
- return naturalCompare(titleA, titleB);
- });
-
- const props: Props = {
- contents: contents.contents.data,
- openGraph: getOpenGraph(langui, langui.contents ?? "Contents"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/contents/folder/[slug].tsx b/src/pages/contents/folder/[slug].tsx
deleted file mode 100644
index 4eea4f0..0000000
--- a/src/pages/contents/folder/[slug].tsx
+++ /dev/null
@@ -1,286 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { useMemo } from "react";
-import naturalCompare from "string-natural-compare";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { getOpenGraph } from "helpers/openGraph";
-import { getReadySdk } from "graphql/sdk";
-import { filterHasAttributes } from "helpers/others";
-import { GetContentsFolderQuery } from "graphql/generated";
-import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
-import { prettySlug } from "helpers/formatters";
-import { SmartList } from "components/SmartList";
-import { Ico, Icon } from "components/Ico";
-import { Button, TranslatedButton } from "components/Inputs/Button";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { TranslatedPreviewCard } from "components/PreviewCard";
-import { HorizontalLine } from "components/HorizontalLine";
-import { cJoin, cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-import { TranslatedPreviewFolder } from "components/Contents/PreviewFolder";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- folder: NonNullable<
- NonNullable["data"][number]["attributes"]
- >;
-}
-
-const ContentsFolder = ({ openGraph, folder, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
- ),
- [langui.contents, langui.contents_description, langui.switch_to_grid_view]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
- {folder.parent_folder?.data?.attributes && (
- <>
- {folder.parent_folder.data.attributes.slug === "root" ? (
-
- ) : (
- ({
- language: title.language.data.attributes.code,
- text: title.title,
- }))}
- fallback={{
- text: prettySlug(folder.parent_folder.data.attributes.slug),
- }}
- />
- )}
-
- >
- )}
-
- {folder.slug === "root" ? (
-
- ) : (
- ({
- language: title.language.data.attributes.code,
- text: title.title,
- }))}
- fallback={{
- text: prettySlug(folder.slug),
- }}
- active
- />
- )}
-
-
- item.id}
- renderItem={({ item }) => (
- ({
- title: title.title,
- language: title.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(item.attributes.slug) }}
- />
- )}
- className={cJoin(
- "items-end",
- cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-4"
- )
- )}
- renderWhenEmpty={() => <>>}
- groupingFunction={() => [langui.folders ?? "Folders"]}
- />
-
- item.id}
- renderItem={({ item }) => (
- ({
- pre_title: translation.pre_title,
- title: translation.title,
- subtitle: translation.subtitle,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(item.attributes.slug) }}
- thumbnail={item.attributes.thumbnail?.data?.attributes}
- thumbnailAspectRatio="3/2"
- thumbnailForceAspectRatio
- topChips={
- item.attributes.type?.data?.attributes
- ? [
- item.attributes.type.data.attributes.titles?.[0]
- ? item.attributes.type.data.attributes.titles[0]?.title
- : prettySlug(item.attributes.type.data.attributes.slug),
- ]
- : undefined
- }
- bottomChips={item.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )}
- keepInfoVisible
- />
- )}
- className={cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-3 gap-y-5"
- )}
- renderWhenEmpty={() => <>>}
- groupingFunction={() => [langui.contents ?? "Contents"]}
- />
-
- {folder.contents?.data.length === 0 && folder.subfolders?.data.length === 0 && (
-
- )}
-
- ),
- [
- folder.contents?.data,
- folder.parent_folder?.data?.attributes,
- folder.slug,
- folder.subfolders?.data,
- folder.titles,
- isContentPanelAtLeast4xl,
- langui,
- ]
- );
-
- return (
-
- );
-};
-export default ContentsFolder;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const slug = context.params?.slug ? context.params.slug.toString() : "";
- const contentsFolder = await sdk.getContentsFolder({
- slug: slug,
- language_code: context.locale ?? "en",
- });
- if (!contentsFolder.contentsFolders?.data[0]?.attributes) {
- return { notFound: true };
- }
-
- const folder = contentsFolder.contentsFolders.data[0].attributes;
-
- folder.subfolders?.data.sort((a, b) =>
- a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0
- );
-
- folder.contents?.data.sort((a, b) =>
- a.attributes && b.attributes ? naturalCompare(a.attributes.slug, b.attributes.slug) : 0
- );
-
- const title = (() => {
- if (slug === "root") {
- return langui.contents ?? "Contents";
- }
- if (context.locale && context.locales) {
- const selectedTranslation = staticSmartLanguage({
- items: folder.titles,
- languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
- });
- if (selectedTranslation) {
- return selectedTranslation.title;
- }
- }
- return prettySlug(folder.slug);
- })();
-
- const props: Props = {
- openGraph: getOpenGraph(langui, title),
- folder,
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const contents = await sdk.getContentsFoldersSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(contents.contentsFolders?.data, ["attributes"] as const).map((item) => {
- context.locales?.map((local) => {
- paths.push({
- params: { slug: item.attributes.slug },
- locale: local,
- });
- });
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
- */
-
-const NoContentNorFolderMessage = () => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
-
-
{langui.empty_folder_message}
-
-
- );
-};
diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx
deleted file mode 100644
index 2e6124e..0000000
--- a/src/pages/contents/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { GetStaticProps } from "next";
-import ContentsFolder, { getStaticProps as folderGetStaticProps } from "./folder/[slug]";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const Contents = (props: Parameters[0]): JSX.Element => (
-
-);
-export default Contents;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- context.params = { slug: "root" };
- return await folderGetStaticProps(context);
-};
diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx
deleted file mode 100644
index 5758208..0000000
--- a/src/pages/dev/checkup/contents.tsx
+++ /dev/null
@@ -1,264 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo } from "react";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Chip } from "components/Chip";
-import { Button } from "components/Inputs/Button";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { ToolTip } from "components/ToolTip";
-import { DevGetContentsQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { filterDefined, filterHasAttributes } from "helpers/others";
-import { Report, Severity } from "types/Report";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { sJoin } from "helpers/formatters";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- contents: DevGetContentsQuery;
-}
-
-const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
- const testReport = useMemo(() => testingContent(contents), [contents]);
-
- const contentPanel = useMemo(
- () => (
-
- {{testReport.title} }
-
-
-
-
-
Ref
-
Name
-
Type
-
Severity
-
Description
-
-
- {testReport.lines
- .sort((a, b) => a.name.localeCompare(b.name))
- .sort((a, b) => b.severity - a.severity)
- .map((line, index) => (
-
-
-
-
{line.subitems.join(" -> ")}
-
{line.name}
-
-
-
- {line.description}
-
-
- ))}
-
- ),
- [testReport.lines, testReport.title]
- );
-
- return ;
-};
-export default CheckupContents;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const contents = await sdk.devGetContents();
- const props: Props = {
- contents: contents,
- openGraph: getOpenGraph(langui, "Checkup Contents"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-const testingContent = (contents: Props["contents"]): Report => {
- const report: Report = {
- title: "Contents",
- lines: [],
- };
-
- filterHasAttributes(contents.contents?.data, ["attributes"] as const).map((content) => {
- const backendUrl = sJoin(
- process.env.NEXT_PUBLIC_URL_CMS,
- "/admin/content-manager/collectionType/api::content.content/",
- content.id
- );
- const frontendUrl = sJoin(
- process.env.NEXT_PUBLIC_URL_SELF,
- "/contents/",
- content.attributes.slug
- );
-
- if (content.attributes.categories?.data.length === 0) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Category",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Category.",
- recommandation: "Select a Category in relation with the Content",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!content.attributes.type?.data?.id) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Type",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Type.",
- recommandation: 'If unsure, use the "Other" Type.',
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (content.attributes.ranged_contents?.data.length === 0) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Ranged Content",
- type: "Improvement",
- severity: Severity.Low,
- description: "The Content has no Ranged Content.",
- recommandation:
- "If this Content is available in one or multiple Library Item(s),\
- create a Range Content to connect the Content to its Library Item(s).",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!content.attributes.thumbnail?.data?.id) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Thumbnail",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Thumbnail.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (content.attributes.translations?.length === 0) {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Titles",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Titles.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- const titleLanguages: string[] = [];
-
- if (content.attributes.translations && content.attributes.translations.length > 0) {
- filterDefined(content.attributes.translations).map((translation, titleIndex) => {
- if (translation.language?.data?.id) {
- if (translation.language.data.id in titleLanguages) {
- report.lines.push({
- subitems: [content.attributes.slug, `Title ${titleIndex.toString()}`],
- name: "Duplicate Language",
- type: "Error",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- titleLanguages.push(translation.language.data.id);
- }
- } else {
- report.lines.push({
- subitems: [content.attributes.slug, `Title ${titleIndex.toString()}`],
- name: "No Language",
- type: "Error",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!translation.description) {
- report.lines.push({
- subitems: [content.attributes.slug, `Title ${titleIndex.toString()}`],
- name: "No Description",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!translation.text_set) {
- report.lines.push({
- subitems: [
- content.attributes.slug,
- translation.language?.data?.attributes?.code ?? "",
- ],
- name: "No Text Set",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Text Set.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- });
- } else {
- report.lines.push({
- subitems: [content.attributes.slug],
- name: "No Translations",
- type: "Missing",
- severity: Severity.High,
- description: "The Content has no Translations.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- }
- });
- return report;
-};
diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx
deleted file mode 100644
index 38ab8b1..0000000
--- a/src/pages/dev/checkup/libraryitems.tsx
+++ /dev/null
@@ -1,654 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo } from "react";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Chip } from "components/Chip";
-import { Button } from "components/Inputs/Button";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { ToolTip } from "components/ToolTip";
-import {
- DevGetLibraryItemsQuery,
- Enum_Componentcollectionscomponentlibraryimages_Status,
-} from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { Report, Severity } from "types/Report";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { sJoin } from "helpers/formatters";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- libraryItems: DevGetLibraryItemsQuery;
-}
-
-const CheckupLibraryItems = ({ libraryItems, ...otherProps }: Props): JSX.Element => {
- const testReport = testingLibraryItem(libraryItems);
-
- const contentPanel = useMemo(
- () => (
-
- {{testReport.title} }
-
-
-
-
-
Ref
-
Name
-
Type
-
Severity
-
Description
-
-
- {testReport.lines
- .sort((a, b) => a.name.localeCompare(b.name))
- .sort((a, b) => b.severity - a.severity)
- .map((line, index) => (
-
-
-
-
{line.subitems.join(" -> ")}
-
{line.name}
-
-
-
- {line.description}
-
-
- ))}
-
- ),
- [testReport.lines, testReport.title]
- );
-
- return ;
-};
-export default CheckupLibraryItems;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const libraryItems = await sdk.devGetLibraryItems();
-
- const props: Props = {
- libraryItems: libraryItems,
- openGraph: getOpenGraph(langui, "Checkup Library Items"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
- const report: Report = {
- title: "Contents",
- lines: [],
- };
-
- libraryItems.libraryItems?.data.map((item) => {
- if (item.attributes) {
- const backendUrl = sJoin(
- process.env.NEXT_PUBLIC_URL_CMS,
- "/admin/content-manager/collectionType/api::library-item.library-item/",
- item.id
- );
- const frontendUrl = sJoin(
- process.env.NEXT_PUBLIC_URL_SELF,
- "/library/",
- item.attributes.slug
- );
-
- if (item.attributes.categories?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No Category",
- type: "Missing",
- severity: Severity.High,
- description: "The Item has no Category.",
- recommandation: "Select a Category in relation with the Item",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!item.attributes.root_item && item.attributes.subitem_of?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "Disconnected Item",
- type: "Error",
- severity: Severity.VeryHigh,
- description: "The Item is neither a Root Item, nor is it a subitem of another item.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (item.attributes.contents?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No Contents",
- type: "Missing",
- severity: Severity.Low,
- description: "The Item has no Contents.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!item.attributes.thumbnail?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No Thumbnail",
- type: "Missing",
- severity: Severity.High,
- description: "The Item has no Thumbnail.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (item.attributes.images?.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No Images",
- type: "Missing",
- severity: Severity.Low,
- description: "The Item has no Images.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- item.attributes.images?.map((image, imageIndex) => {
- const imagesLanguages: string[] = [];
-
- if (image && item.attributes) {
- if (image.language?.data?.id) {
- if (image.language.data.id in imagesLanguages) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "Duplicate Language",
- type: "Error",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- imagesLanguages.push(image.language.data.id);
- }
- } else {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Language",
- type: "Error",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (!image.source_language?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Source Language",
- type: "Error",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (image.status !== Enum_Componentcollectionscomponentlibraryimages_Status.Done) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "Not Done Status",
- type: "Improvement",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (image.source_language?.data?.id === image.language?.data?.id) {
- if (image.scanners?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Scanners",
- type: "Missing",
- severity: Severity.High,
- description: "The Item is a Scan but doesn't credit any Scanners.",
- recommandation: "Add the appropriate Scanners.",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (image.cleaners?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Cleaners",
- type: "Missing",
- severity: Severity.High,
- description: "The Item is a Scan but doesn't credit any Cleaners.",
- recommandation: "Add the appropriate Cleaners.",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (image.typesetters?.data && image.typesetters.data.length > 0) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "Credited Typesetters",
- type: "Error",
- severity: Severity.High,
- description: "The Item is a Scan but credits one or more Typesetters.",
- recommandation:
- "If appropriate, create a Scanlation Images Set\
- with the Typesetters credited there.",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- } else {
- if (image.typesetters?.data.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Typesetters",
- type: "Missing",
- severity: Severity.High,
- description: "The Item is a Scanlation but doesn't credit any Typesetters.",
- recommandation: "Add the appropriate Typesetters.",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (image.scanners?.data && image.scanners.data.length > 0) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "Credited Scanners",
- type: "Error",
- severity: Severity.High,
- description: "The Item is a Scanlation but credits one or more Scanners.",
- recommandation:
- "If appropriate, create a Scanners Images Set\
- with the Scanners credited there.",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- }
-
- if (image.cover) {
- if (!image.cover.front?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Cover"],
- name: "No Front",
- type: "Missing",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.cover.spine?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Cover"],
- name: "No spine",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.cover.back?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Cover"],
- name: "No Back",
- type: "Missing",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.cover.full?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Cover"],
- name: "No Full",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- } else {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Cover",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (image.dust_jacket) {
- if (!image.dust_jacket.front?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No Front",
- type: "Missing",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.dust_jacket.spine?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No spine",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.dust_jacket.back?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No Back",
- type: "Missing",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.dust_jacket.full?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No Full",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.dust_jacket.flap_front?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No Flap Front",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.dust_jacket.flap_back?.data?.id) {
- report.lines.push({
- subitems: [
- item.attributes.slug,
- `Images ${imageIndex.toString()}`,
- "Dust Jacket",
- ],
- name: "No Flap Back",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- } else {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Dust Jacket",
- type: "Missing",
- severity: Severity.VeryLow,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (image.obi_belt) {
- if (!image.obi_belt.front?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No Front",
- type: "Missing",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.obi_belt.spine?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No spine",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.obi_belt.back?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No Back",
- type: "Missing",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.obi_belt.full?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No Full",
- type: "Missing",
- severity: Severity.Low,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.obi_belt.flap_front?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No Flap Front",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- if (!image.obi_belt.flap_back?.data?.id) {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`, "Obi Belt"],
- name: "No Flap Back",
- type: "Missing",
- severity: Severity.Medium,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- } else {
- report.lines.push({
- subitems: [item.attributes.slug, `Images ${imageIndex.toString()}`],
- name: "No Obi Belt",
- type: "Missing",
- severity: Severity.VeryLow,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- }
- });
- }
-
- if (item.attributes.descriptions && item.attributes.descriptions.length > 0) {
- const descriptionLanguages: string[] = [];
-
- item.attributes.descriptions.map((description, descriptionIndex) => {
- if (description && item.attributes) {
- if (description.description.length < 10) {
- report.lines.push({
- subitems: [item.attributes.slug, `Description ${descriptionIndex}`],
- name: "No Text",
- type: "Missing",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (description.language?.data?.id) {
- if (description.language.data.id in descriptionLanguages) {
- report.lines.push({
- subitems: [item.attributes.slug, `Description ${descriptionIndex}`],
- name: "Duplicate Language",
- type: "Error",
- severity: Severity.High,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- } else {
- descriptionLanguages.push(description.language.data.id);
- }
- } else {
- report.lines.push({
- subitems: [item.attributes.slug, `Description ${descriptionIndex}`],
- name: "No Language",
- type: "Error",
- severity: Severity.VeryHigh,
- description: "",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- }
- });
- } else {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No Description",
- type: "Missing",
- severity: Severity.Medium,
- description: "The Item has no Description.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
-
- if (item.attributes.urls?.length === 0) {
- report.lines.push({
- subitems: [item.attributes.slug],
- name: "No URLs",
- type: "Missing",
- severity: Severity.VeryLow,
- description: "The Item has no URLs.",
- recommandation: "",
- backendUrl: backendUrl,
- frontendUrl: frontendUrl,
- });
- }
- }
- });
-
- return report;
-};
diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx
deleted file mode 100644
index 61f023b..0000000
--- a/src/pages/dev/editor.tsx
+++ /dev/null
@@ -1,422 +0,0 @@
-import { GetStaticProps } from "next";
-import { useCallback, useMemo, useRef, useState } from "react";
-import TurndownService from "turndown";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Button } from "components/Inputs/Button";
-import { Markdawn, TableOfContents } from "components/Markdown/Markdawn";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { Popup } from "components/Containers/Popup";
-import { ToolTip } from "components/ToolTip";
-import { Icon } from "components/Ico";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const Editor = (props: Props): JSX.Element => {
- const handleInput = useCallback((text: string) => {
- setMarkdown(text);
- }, []);
-
- const [markdown, setMarkdown] = useState("");
- const [converterOpened, setConverterOpened] = useState(false);
- const textAreaRef = useRef(null);
-
- const transformationWrapper = useCallback(
- (
- transformation: (
- value: string,
- selectionStart: number,
- selectedEnd: number
- ) => { prependLength: number; transformedValue: string }
- ) => {
- if (textAreaRef.current) {
- const { value, selectionStart, selectionEnd } = textAreaRef.current;
-
- const { prependLength, transformedValue } = transformation(
- value,
- selectionStart,
- selectionEnd
- );
-
- textAreaRef.current.value = transformedValue;
- handleInput(textAreaRef.current.value);
-
- textAreaRef.current.focus();
- textAreaRef.current.selectionStart = selectionStart + prependLength;
- textAreaRef.current.selectionEnd = selectionEnd + prependLength;
- }
- },
- [handleInput]
- );
-
- const wrap = useCallback(
- (wrapper: string, properties?: Record, addInnerNewLines?: boolean) => {
- transformationWrapper((value, selectionStart, selectionEnd) => {
- let prepend = wrapper;
- let append = wrapper;
-
- if (properties) {
- prepend = `<${wrapper}${Object.entries(properties).map(
- ([propertyName, propertyValue]) => ` ${propertyName}="${propertyValue}"`
- )}>`;
- append = `${wrapper}>`;
- }
-
- if (addInnerNewLines === true) {
- prepend = `${prepend}\n`;
- append = `\n${append}`;
- }
-
- let newValue = "";
- newValue += value.slice(0, selectionStart);
- newValue += prepend;
- newValue += value.slice(selectionStart, selectionEnd);
- newValue += append;
- newValue += value.slice(selectionEnd);
- return { prependLength: prepend.length, transformedValue: newValue };
- });
- },
- [transformationWrapper]
- );
-
- const unwrap = useCallback(
- (wrapper: string) => {
- transformationWrapper((value, selectionStart, selectionEnd) => {
- let newValue = "";
- newValue += value.slice(0, selectionStart - wrapper.length);
- newValue += value.slice(selectionStart, selectionEnd);
- newValue += value.slice(wrapper.length + selectionEnd);
- return { prependLength: -wrapper.length, transformedValue: newValue };
- });
- },
- [transformationWrapper]
- );
-
- const toggleWrap = useCallback(
- (wrapper: string, properties?: Record, addInnerNewLines?: boolean) => {
- if (textAreaRef.current) {
- const { value, selectionStart, selectionEnd } = textAreaRef.current;
-
- if (
- value.slice(selectionStart - wrapper.length, selectionStart) === wrapper &&
- value.slice(selectionEnd, selectionEnd + wrapper.length) === wrapper
- ) {
- unwrap(wrapper);
- } else {
- wrap(wrapper, properties, addInnerNewLines);
- }
- }
- },
- [unwrap, wrap]
- );
-
- const preline = useCallback(
- (prepend: string) => {
- transformationWrapper((value, selectionStart) => {
- const lastNewLine = value.slice(0, selectionStart).lastIndexOf("\n") + 1;
-
- let newValue = "";
- newValue += value.slice(0, lastNewLine);
- newValue += prepend;
- newValue += value.slice(lastNewLine);
-
- return { prependLength: prepend.length, transformedValue: newValue };
- });
- },
- [transformationWrapper]
- );
-
- const insert = useCallback(
- (prepend: string) => {
- transformationWrapper((value, selectionStart) => {
- let newValue = "";
- newValue += value.slice(0, selectionStart);
- newValue += prepend;
- newValue += value.slice(selectionStart);
-
- return { prependLength: prepend.length, transformedValue: newValue };
- });
- },
- [transformationWrapper]
- );
-
- const appendDoc = useCallback(
- (append: string) => {
- transformationWrapper((value) => {
- const newValue = value + append;
- return { prependLength: 0, transformedValue: newValue };
- });
- },
- [transformationWrapper]
- );
-
- const contentPanel = useMemo(
- () => (
-
- setConverterOpened(false)}>
-
-
Convert HTML to markdown
-
- Copy and paste any HTML content (content from web pages) here.
-
- The text will immediatly be converted to valid Markdown.
-
- You can then copy the converted text and paste it anywhere you want in the editor
-
-
- {
- const turndownService = new TurndownService({
- headingStyle: "atx",
- codeBlockStyle: "fenced",
- bulletListMarker: "-",
- emDelimiter: "_",
- strongDelimiter: "**",
- });
-
- let paste = event.clipboardData.getData("text/html");
- paste = paste.replace(//u, "");
- paste = turndownService.turndown(paste);
- paste = paste.replace(//u, "");
-
- const target = event.target as HTMLTextAreaElement;
- target.value = paste;
- target.select();
- event.preventDefault();
- }}
- className="h-[50vh] w-[50vw]"
- />
-
-
-
-
- Headers
- preline("# ")} text={"H1"} />
- preline("## ")} text={"H2"} />
- preline("### ")} text={"H3"} />
- preline("#### ")} text={"H4"} />
- preline("##### ")} text={"H5"} />
- preline("###### ")} text={"H6"} />
-
- }>
-
-
-
- Toggle Bold}>
- toggleWrap("**")} icon={Icon.FormatBold} />
-
-
- Toggle Italic}>
- toggleWrap("_")} icon={Icon.FormatItalic} />
-
-
-
- Toggle Inline Code
-
- Makes the text monospace (like text from a computer terminal). Usually used for
- stylistic purposes in transcripts.
-
- >
- }>
- toggleWrap("`")} icon={Icon.Code} />
-
-
-
- Insert footnote
- When inserted “x”
- >
- }>
- {
- insert("[^x]");
- appendDoc("\n\n[^x]: This is a footnote.");
- }}
- icon={Icon.Superscript}
- />
-
-
-
- Transcripts
-
- Use this to create dialogues and transcripts. Start by adding a container, then
- add transcript speech line within.
-
-
-
- Transcript container
- >
- }>
- wrap("Transcript", {}, true)} icon={Icon.AddBox} />
-
-
- Transcript speech line
-
- Use to add a dialogue/transcript line. Change the name property
- to chang the name of the speaker
-
- >
- }>
- wrap("Line", { name: "speaker" })}
- icon={Icon.RecordVoiceOver}
- />
-
-
- >
- }>
-
-
-
- Inset box}>
- wrap("InsetBox", {}, true)} icon={Icon.CheckBoxOutlineBlank} />
-
- Scene break}>
- insert("\n* * *\n")} icon={Icon.MoreHoriz} />
-
-
- Links
-
- External Link
- Provides a link to another webpage / website
- >
- }>
- insert("[Link name](https://domain.com)")}
- icon={Icon.Link}
- text={"External"}
- />
-
-
-
- Intralink
-
- Interlinks are used to add links to a header within the same document
-
- >
- }>
- wrap("IntraLink", {})}
- icon={Icon.Link}
- text={"Internal"}
- />
-
-
- Intralink (with target) {" "}
-
- Use this one if you want the intralink text to be different from the target
- header’s name.
-
- >
- }>
- wrap("IntraLink", { target: "target" })}
- icon={Icon.Link}
- text="Internal (w/ target)"
- />
-
-
- }>
-
-
-
-
Player’s name placeholder}>
- insert("@player")} icon={Icon.Person} />
-
-
-
Open HTML Converter}>
- {
- setConverterOpened(true);
- }}
- icon={Icon.Html}
- />
-
-
-
-
-
-
Editor
- {
- const textarea = event.target as HTMLTextAreaElement;
- handleInput(textarea.value);
- }}
- className="h-[70vh] w-full rounded-xl bg-mid !bg-opacity-40 p-8
- font-mono text-black outline-none"
- value={markdown}
- title="Input textarea"
- />
-
-
-
-
-
-
- ),
- [appendDoc, converterOpened, handleInput, insert, markdown, preline, toggleWrap, wrap]
- );
-
- return
;
-};
-export default Editor;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, "Markdawn Editor"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/dev/showcase/design-system.tsx b/src/pages/dev/showcase/design-system.tsx
deleted file mode 100644
index 54e2671..0000000
--- a/src/pages/dev/showcase/design-system.tsx
+++ /dev/null
@@ -1,961 +0,0 @@
-/* eslint-disable id-denylist */
-import { GetStaticProps } from "next";
-import { ReactNode, useState } from "react";
-import Slider from "rc-slider";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { getLangui } from "graphql/fetchLocalData";
-import { getOpenGraph } from "helpers/openGraph";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { Button } from "components/Inputs/Button";
-import { Icon } from "components/Ico";
-import { cJoin } from "helpers/className";
-import { HorizontalLine } from "components/HorizontalLine";
-import { Switch } from "components/Inputs/Switch";
-import { TextInput } from "components/Inputs/TextInput";
-import { Select } from "components/Inputs/Select";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { ButtonGroup } from "components/Inputs/ButtonGroup";
-import { PreviewCard } from "components/PreviewCard";
-import { PreviewLine } from "components/PreviewLine";
-import { ChroniclePreview } from "components/Chronicles/ChroniclePreview";
-import { PreviewFolder } from "components/Contents/PreviewFolder";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const DesignSystem = (props: Props): JSX.Element => {
- const [switchState, setSwitchState] = useState(false);
- const [selectState, setSelectState] = useState(0);
- const [sliderState, setSliderState] = useState(5);
- const [textInputState, setTextInputState] = useState("");
- const [textAreaState, setTextAreaState] = useState("");
- const [buttonGroupState, setButtonGroupState] = useState(0);
-
- const contentPanel = (
-
- Design System
-
- Colors
-
-
- Highlight
- Light
- Mid
- Dark
- Shade
- Black
-
- Light theme
-
-
-
-
-
-
-
- Dark theme
-
-
-
-
-
-
-
-
- Fonts
-
-
- Vollkorn
- Zen Maru Gothic
- Share Tech Mono
- Open Dyslexic
-
- 3XL
- Header H3XL
-
-
- Dyslexia D3XL
-
- 2XL
- Header H2XL
-
-
- Dyslexia D2XL
-
- XL
- Header HXL
- Body BXL
- Mono MXL
- Dyslexia DXL
-
- LG
- Header HLG
- Body BLG
- Mono MLG
- Dyslexia DLG
-
- B
-
- Body BB
- Mono MB
- Dyslexia DB
-
- SM
-
- Body BSM
-
- Dyslexia DSM
-
- XS
-
-
-
- Dyslexia DXS
-
-
- Elevations
-
-
-
-
-
-
-
-
-
- Drop shadow
-
-
-
-
-
-
-
- Black
-
-
-
-
-
-
-
-
- Drop shadow
-
- black
-
-
-
-
-
-
-
-
-
- Buttons
-
- Normal sized
-
-
-
-
Icon
-
Text
-
Icon + Text
-
-
Normal
-
-
-
-
-
Active
-
-
-
-
-
Disabled
-
-
-
-
-
Badge
-
-
-
-
-
-
- Small sized
-
-
-
Normal
-
-
-
-
-
Active
-
-
-
-
-
Disabled
-
-
-
-
-
Badge
-
-
-
-
-
-
- Groups
-
-
-
-
- setButtonGroupState(0),
- },
- {
- icon: Icon.AdUnits,
- text: "Label",
- active: buttonGroupState === 1,
- onClick: () => setButtonGroupState(1),
- },
- {
- text: "Yet another label",
- active: buttonGroupState === 2,
- onClick: () => setButtonGroupState(2),
- },
- {
- icon: Icon.Security,
- active: buttonGroupState === 3,
- onClick: () => setButtonGroupState(3),
- },
- ]}
- />
-
-
-
- Inputs
-
- Switches
-
- null} />
-
-
- null} />
-
-
- null} disabled />
-
-
- null} disabled />
-
-
- setSwitchState((current) => !current)} />
-
-
-
- Selects
-
-
- null}
- />
-
-
-
- null}
- />
-
-
-
- null}
- allowEmpty
- />
-
-
-
- null}
- allowEmpty
- disabled
- />
-
-
-
- setSelectState(index)}
- allowEmpty
- />
-
-
-
- Text inputs
-
-
- null} />
-
-
-
- null} />
-
-
-
- null} />
-
-
-
- null} disabled />
-
-
-
-
-
-
-
-
- Text area
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- setTextAreaState(event.target.value)}
- placeholder="Placeholder..."
- />
-
-
-
-
- Slider
-
-
-
-
-
-
-
-
-
- {
- let value = 0;
- if (Array.isArray(event)) {
- value = event[0];
- } else {
- value = event;
- }
- setSliderState(() => value);
- }}
- />
-
-
-
- Down-Pressables
-
- Navigation Options
-
-
-
-
Title
-
- Title
- + Icon
-
-
- Title
- + Subtitle
-
-
- Title
- + Subtitle
- + Icon
-
-
Reduced
-
-
Normal
-
-
-
-
-
-
-
Border
-
-
-
-
-
-
-
Active
-
-
-
-
-
-
-
- Active
- + Border
-
-
-
-
-
-
-
-
Disabled
-
-
-
-
-
-
-
- Disabled
- + Border
-
-
-
-
-
-
-
-
- Disabled
- + Active
-
-
-
-
-
-
-
-
-
- Chronology Previews
-
-
-
-
Title
-
Year
-
- Year
- + Month
-
-
- Year
- + Month
- + Day
-
-
-
Normal
-
-
-
-
-
-
Active
-
-
-
-
-
-
Disabled
-
-
-
-
-
-
- Disabled
-
- Active
-
-
-
-
-
-
-
-
- Up-Pressables
-
- Preview Cards
-
-
-
-
-
-
-
-
}
- bottomChips={["Bottom chip 1", "Chip 2", "Chip 3", "Chip 4"]}
- description="Eveniet occaecati qui dicta explicabo dolor.
- Ipsum quam dolorum dolores.
- Neque dolor nihil neque tempora.
- Mollitia voluptates iste qui et temporibus eum omnis.
- Itaque atque architecto maiores qui et optio."
- hoverlay={{ __typename: "Video", duration: 465 }}
- topChips={[
- "Top chip 1",
- "Chip 2",
- "Chip 3",
- "Chip 4",
- "When there are too many, it overflow",
- ]}
- metadata={{
- price: {
- amount: 5.23,
- currency: { data: { attributes: { code: "USD", rate_to_usd: 1, symbol: "$" } } },
- },
- releaseDate: { year: 1970, month: 1, day: 1 },
- views: 550669,
- position: "Bottom",
- }}
- />
-
-
-
}
- bottomChips={["Bottom chip 1", "Chip 2", "Chip 3", "Chip 4"]}
- description="Eveniet occaecati qui dicta explicabo dolor.
- Ipsum quam dolorum dolores.
- Neque dolor nihil neque tempora.
- Mollitia voluptates iste qui et temporibus eum omnis.
- Itaque atque architecto maiores qui et optio."
- hoverlay={{ __typename: "Video", duration: 465 }}
- topChips={[
- "Top chip 1",
- "Chip 2",
- "Chip 3",
- "Chip 4",
- "When there are too many, it overflow",
- ]}
- metadata={{
- price: {
- amount: 5.23,
- currency: { data: { attributes: { code: "USD", rate_to_usd: 1, symbol: "$" } } },
- },
- releaseDate: { year: 1970, month: 1, day: 1 },
- views: 550669,
- position: "Bottom",
- }}
- disabled
- />
-
-
-
- Preview Line
-
-
-
-
- Folder Card
-
-
-
-
- );
- return
;
-};
-
-export default DesignSystem;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, "Design System"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
- */
-
-interface ThemedSectionProps {
- className?: string;
- children?: ReactNode;
-}
-
-const TwoThemedSection = ({ children, className }: ThemedSectionProps) => (
-
-
- {children}
-
-
- {children}
-
-
-);
-
-const DarkThemeSection = ({ className, children }: ThemedSectionProps) => (
-
{children}
-);
-const LightThemeSection = ({ className, children }: ThemedSectionProps) => (
-
{children}
-);
-
-const WhiteSection = ({ className, children }: ThemedSectionProps) => (
-
-);
-
-interface ColorSquareProps {
- className?: string;
-}
-
-const ColorSquare = ({ className }: ColorSquareProps) => (
-
-);
-
-interface ShadowSquareProps {
- className?: string;
- text: string;
-}
-
-const ShadowSquare = ({ className, text }: ShadowSquareProps) => (
-
- {text}
-
-);
diff --git a/src/pages/dev/transcript.tsx b/src/pages/dev/transcript.tsx
deleted file mode 100644
index e91c699..0000000
--- a/src/pages/dev/transcript.tsx
+++ /dev/null
@@ -1,558 +0,0 @@
-import { GetStaticProps } from "next";
-import { useCallback, useMemo, useRef, useState } from "react";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Button } from "components/Inputs/Button";
-import { ButtonGroup } from "components/Inputs/ButtonGroup";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { ToolTip } from "components/ToolTip";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const SIZE_MULTIPLIER = 1000;
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-
-const replaceSelection = (
- text: string,
- selectionStart: number,
- selectionEnd: number,
- newSelectedText: string
-) => text.substring(0, selectionStart) + newSelectedText + text.substring(selectionEnd);
-
-const swapChar = (char: string, swaps: string[]): string => {
- for (let index = 0; index < swaps.length; index++) {
- if (char === swaps[index]) {
- return swaps[(index + 1) % swaps.length];
- }
- }
- return char;
-};
-
-const Transcript = (props: Props): JSX.Element => {
- const [text, setText] = useState("");
- const [fontSize, setFontSize] = useState(1);
- const [xOffset, setXOffset] = useState(0);
- const [lineIndex, setLineIndex] = useState(0);
-
- const textAreaRef = useRef
(null);
-
- const updateDisplayedText = useCallback(() => {
- if (textAreaRef.current) {
- setText(textAreaRef.current.value);
- }
- }, []);
-
- const updateLineIndex = useCallback(() => {
- if (textAreaRef.current) {
- const subText = textAreaRef.current.value.substring(0, textAreaRef.current.selectionStart);
- setLineIndex(subText.split("\n").length - 1);
- }
- }, []);
-
- const convertFullWidth = useCallback(() => {
- if (textAreaRef.current) {
- textAreaRef.current.value = textAreaRef.current.value
- // Numbers
- .replaceAll("0", "0")
- .replaceAll("1", "1")
- .replaceAll("2", "2")
- .replaceAll("3", "3")
- .replaceAll("4", "4")
- .replaceAll("5", "5")
- .replaceAll("6", "6")
- .replaceAll("7", "7")
- .replaceAll("8", "8")
- .replaceAll("9", "9")
- // Uppercase letters
- .replaceAll("A", "A")
- .replaceAll("B", "B")
- .replaceAll("C", "C")
- .replaceAll("D", "D")
- .replaceAll("E", "E")
- .replaceAll("F", "F")
- .replaceAll("G", "G")
- .replaceAll("H", "H")
- .replaceAll("I", "I")
- .replaceAll("J", "J")
- .replaceAll("K", "K")
- .replaceAll("L", "L")
- .replaceAll("M", "M")
- .replaceAll("N", "N")
- .replaceAll("O", "O")
- .replaceAll("P", "P")
- .replaceAll("Q", "Q")
- .replaceAll("R", "R")
- .replaceAll("S", "S")
- .replaceAll("T", "T")
- .replaceAll("U", "U")
- .replaceAll("V", "V")
- .replaceAll("W", "W")
- .replaceAll("X", "X")
- .replaceAll("Y", "Y")
- .replaceAll("Z", "Z")
- // Lowercase letters
- .replaceAll("a", "a")
- .replaceAll("b", "b")
- .replaceAll("c", "c")
- .replaceAll("d", "d")
- .replaceAll("e", "e")
- .replaceAll("f", "f")
- .replaceAll("g", "g")
- .replaceAll("h", "h")
- .replaceAll("i", "i")
- .replaceAll("j", "j")
- .replaceAll("k", "k")
- .replaceAll("l", "l")
- .replaceAll("m", "m")
- .replaceAll("n", "n")
- .replaceAll("o", "o")
- .replaceAll("p", "p")
- .replaceAll("q", "q")
- .replaceAll("r", "r")
- .replaceAll("s", "s")
- .replaceAll("t", "t")
- .replaceAll("u", "u")
- .replaceAll("v", "v")
- .replaceAll("w", "w")
- .replaceAll("x", "x")
- .replaceAll("y", "y")
- .replaceAll("z", "z")
- // Others
- .replaceAll(" ", " ")
- .replaceAll(",", ",")
- .replaceAll(".", ".")
- .replaceAll(":", ":")
- .replaceAll(";", ";")
- .replaceAll("!", "!")
- .replaceAll("?", "?")
- .replaceAll('"', """)
- .replaceAll("'", "'")
- .replaceAll("`", "`")
- .replaceAll("^", "^")
- .replaceAll("~", "~")
- .replaceAll("_", "_")
- .replaceAll("&", "&")
- .replaceAll("@", "@")
- .replaceAll("#", "#")
- .replaceAll("%", "%")
- .replaceAll("+", "+")
- .replaceAll("-", "-")
- .replaceAll("*", "*")
- .replaceAll("=", "=")
- .replaceAll("<", "<")
- .replaceAll(">", ">")
- .replaceAll("(", "(")
- .replaceAll(")", ")")
- .replaceAll("[", "[")
- .replaceAll("]", "]")
- .replaceAll("{", "{")
- .replaceAll("}", "}")
- .replaceAll("|", "|")
- .replaceAll("$", "$")
- .replaceAll("£", "£")
- .replaceAll("¢", "¢")
- .replaceAll("₩", "₩")
- .replaceAll("¥", "¥");
- updateDisplayedText();
- }
- }, [updateDisplayedText]);
-
- const convertPunctuation = useCallback(() => {
- if (textAreaRef.current) {
- textAreaRef.current.value = textAreaRef.current.value
- .replaceAll("...", "⋯")
- .replaceAll("…", "⋯")
- .replaceAll(":::", "⋯⋯")
- .replaceAll(".", "。")
- .replaceAll(",", "、")
- .replaceAll("?", "?")
- .replaceAll("!", "!")
- .replaceAll(":", ":")
- .replaceAll("~", "~");
- updateDisplayedText();
- }
- }, [updateDisplayedText]);
-
- const toggleDakuten = useCallback(() => {
- if (textAreaRef.current) {
- const selectionStart = Math.min(
- textAreaRef.current.selectionStart,
- textAreaRef.current.selectionEnd
- );
- const selectionEnd = Math.max(
- textAreaRef.current.selectionStart,
- textAreaRef.current.selectionEnd
- );
- const selection = textAreaRef.current.value.substring(selectionStart, selectionEnd);
- if (selection.length === 1) {
- let newSelection = selection;
-
- /*
- * Hiragana
- * a
- */
- newSelection = swapChar(newSelection, ["か", "が"]);
- newSelection = swapChar(newSelection, ["さ", "ざ"]);
- newSelection = swapChar(newSelection, ["た", "だ"]);
- newSelection = swapChar(newSelection, ["は", "ば", "ぱ"]);
- // i
- newSelection = swapChar(newSelection, ["き", "ぎ"]);
- newSelection = swapChar(newSelection, ["し", "じ"]);
- newSelection = swapChar(newSelection, ["ち", "ぢ"]);
- newSelection = swapChar(newSelection, ["ひ", "び", "ぴ"]);
- // u
- newSelection = swapChar(newSelection, ["く", "ぐ"]);
- newSelection = swapChar(newSelection, ["す", "ず"]);
- newSelection = swapChar(newSelection, ["つ", "づ"]);
- newSelection = swapChar(newSelection, ["ふ", "ぶ", "ぷ"]);
- // e
- newSelection = swapChar(newSelection, ["け", "げ"]);
- newSelection = swapChar(newSelection, ["せ", "ぜ"]);
- newSelection = swapChar(newSelection, ["て", "で"]);
- newSelection = swapChar(newSelection, ["へ", "べ", "ぺ"]);
- // o
- newSelection = swapChar(newSelection, ["こ", "ご"]);
- newSelection = swapChar(newSelection, ["そ", "ぞ"]);
- newSelection = swapChar(newSelection, ["と", "ど"]);
- newSelection = swapChar(newSelection, ["ほ", "ぼ", "ぽ"]);
- // others
- newSelection = swapChar(newSelection, ["う", "ゔ"]);
- newSelection = swapChar(newSelection, ["ゝ", "ゞ"]);
-
- /*
- * Katakana
- * a
- */
- newSelection = swapChar(newSelection, ["カ", "ガ"]);
- newSelection = swapChar(newSelection, ["サ", "ザ"]);
- newSelection = swapChar(newSelection, ["タ", "ダ"]);
- newSelection = swapChar(newSelection, ["ハ", "バ", "パ"]);
- // i
- newSelection = swapChar(newSelection, ["キ", "ギ"]);
- newSelection = swapChar(newSelection, ["シ", "ジ"]);
- newSelection = swapChar(newSelection, ["チ", "ヂ"]);
- newSelection = swapChar(newSelection, ["ヒ", "ビ", "ピ"]);
- // u
- newSelection = swapChar(newSelection, ["ク", "グ"]);
- newSelection = swapChar(newSelection, ["ス", "ズ"]);
- newSelection = swapChar(newSelection, ["ツ", "ヅ"]);
- newSelection = swapChar(newSelection, ["フ", "ブ", "プ"]);
- // e
- newSelection = swapChar(newSelection, ["ケ", "ゲ"]);
- newSelection = swapChar(newSelection, ["セ", "ゼ"]);
- newSelection = swapChar(newSelection, ["テ", "デ"]);
- newSelection = swapChar(newSelection, ["ヘ", "ベ", "ペ"]);
- // o
- newSelection = swapChar(newSelection, ["コ", "ゴ"]);
- newSelection = swapChar(newSelection, ["ソ", "ゾ"]);
- newSelection = swapChar(newSelection, ["ト", "ド"]);
- newSelection = swapChar(newSelection, ["ホ", "ボ", "ポ"]);
- // others
- newSelection = swapChar(newSelection, ["ゥ", "ヴ"]);
- newSelection = swapChar(newSelection, ["ヽ", "ヾ"]);
-
- if (newSelection !== selection) {
- textAreaRef.current.value = replaceSelection(
- textAreaRef.current.value,
- selectionStart,
- selectionEnd,
- newSelection
- );
-
- textAreaRef.current.selectionStart = selectionStart;
- textAreaRef.current.selectionEnd = selectionEnd;
- textAreaRef.current.focus();
-
- updateDisplayedText();
- }
- }
- }
- }, [updateDisplayedText]);
-
- const toggleSmallForm = useCallback(() => {
- if (textAreaRef.current) {
- const selectionStart = Math.min(
- textAreaRef.current.selectionStart,
- textAreaRef.current.selectionEnd
- );
- const selectionEnd = Math.max(
- textAreaRef.current.selectionStart,
- textAreaRef.current.selectionEnd
- );
- const selection = textAreaRef.current.value.substring(selectionStart, selectionEnd);
- if (selection.length === 1) {
- let newSelection = selection;
-
- // Hiragana
- newSelection = swapChar(newSelection, ["あ", "ぁ"]);
- newSelection = swapChar(newSelection, ["い", "ぃ"]);
- newSelection = swapChar(newSelection, ["う", "ぅ"]);
- newSelection = swapChar(newSelection, ["え", "ぇ"]);
- newSelection = swapChar(newSelection, ["お", "ぉ"]);
- newSelection = swapChar(newSelection, ["か", "ゕ"]);
- newSelection = swapChar(newSelection, ["け", "ゖ"]);
- newSelection = swapChar(newSelection, ["つ", "っ"]);
- newSelection = swapChar(newSelection, ["や", "ゃ"]);
- newSelection = swapChar(newSelection, ["ゆ", "ゅ"]);
- newSelection = swapChar(newSelection, ["よ", "ょ"]);
- newSelection = swapChar(newSelection, ["わ", "ゎ"]);
- // Katakana
- newSelection = swapChar(newSelection, ["ア", "ァ"]);
- newSelection = swapChar(newSelection, ["イ", "ィ"]);
- newSelection = swapChar(newSelection, ["ウ", "ゥ"]);
- newSelection = swapChar(newSelection, ["エ", "ェ"]);
- newSelection = swapChar(newSelection, ["オ", "ォ"]);
- newSelection = swapChar(newSelection, ["ツ", "ッ"]);
- newSelection = swapChar(newSelection, ["ヤ", "ャ"]);
- newSelection = swapChar(newSelection, ["ユ", "ュ"]);
- newSelection = swapChar(newSelection, ["ヨ", "ョ"]);
-
- if (newSelection !== selection) {
- textAreaRef.current.value = replaceSelection(
- textAreaRef.current.value,
- selectionStart,
- selectionEnd,
- newSelection
- );
-
- textAreaRef.current.selectionStart = selectionStart;
- textAreaRef.current.selectionEnd = selectionEnd;
- textAreaRef.current.focus();
-
- updateDisplayedText();
- }
- }
- }
- }, [updateDisplayedText]);
-
- const insert = useCallback(
- (insertedText: string) => {
- if (textAreaRef.current) {
- const selectionEnd = Math.max(
- textAreaRef.current.selectionStart,
- textAreaRef.current.selectionEnd
- );
- textAreaRef.current.value = replaceSelection(
- textAreaRef.current.value,
- selectionEnd,
- selectionEnd,
- insertedText
- );
-
- textAreaRef.current.selectionStart = selectionEnd;
- textAreaRef.current.selectionEnd = selectionEnd + insertedText.length;
- textAreaRef.current.focus();
-
- updateDisplayedText();
- }
- },
- [updateDisplayedText]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
-
-
- {text.split("\n")[lineIndex]}
-
-
-
-
-
-
Text offset: {xOffset}px
-
setXOffset(parseInt(event.target.value, 10) / 10)}
- />
-
-
-
-
Font size: {fontSize}x
-
setFontSize(parseInt(event.target.value, 10) / SIZE_MULTIPLIER)}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- insert("「") },
- { text: "」", onClick: () => insert("」") },
- ]}
- />
- insert("『") },
- { text: "』", onClick: () => insert("』") },
- ]}
- />
- insert("【") },
- { text: "】", onClick: () => insert("】") },
- ]}
- />
- insert("〖") },
- { text: "〗", onClick: () => insert("〗") },
- ]}
- />
- insert("〝") },
- { text: "〟", onClick: () => insert("〟") },
- ]}
- />
- insert("(") },
- { text: ")", onClick: () => insert(")") },
- ]}
- />
- insert("⦅") },
- { text: "⦆", onClick: () => insert("⦆") },
- ]}
- />
- insert("〈") },
- { text: "〉", onClick: () => insert("〉") },
- ]}
- />
- insert("《") },
- { text: "》", onClick: () => insert("》") },
- ]}
- />
- insert("{") },
- { text: "}", onClick: () => insert("}") },
- ]}
- />
- insert("[") },
- { text: "]", onClick: () => insert("]") },
- ]}
- />
- insert("〔") },
- { text: "〕", onClick: () => insert("〕") },
- ]}
- />
- insert("〘") },
- { text: "〙", onClick: () => insert("〙") },
- ]}
- />
-
- }>
-
-
-
- insert("。")} />
- insert("?")} />
- insert("!")} />
- insert("⋯")} />
- insert("※")} />
- insert("♪")} />
- insert("・")} />
- insert("〇")} />
- insert(" ")} />
-
- }>
-
-
-
-
- ),
- [
- convertFullWidth,
- convertPunctuation,
- fontSize,
- insert,
- lineIndex,
- text,
- toggleDakuten,
- toggleSmallForm,
- updateDisplayedText,
- updateLineIndex,
- xOffset,
- ]
- );
-
- return ;
-};
-export default Transcript;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, "Japanese Transcription Tool"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
deleted file mode 100644
index 8240587..0000000
--- a/src/pages/index.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { getOpenGraph } from "helpers/openGraph";
-import { Terminal } from "components/Cli/Terminal";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-const Home = ({ ...otherProps }: PostStaticProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const isTerminalMode = useAtomGetter(atoms.layout.terminalMode);
-
- if (isTerminalMode) {
- return (
-
- );
- }
-
- return (
-
-
- Accord’s Library
- Discover • Analyze • Translate • Archive
-
- }
- displayTitle={false}
- openGraph={getOpenGraph(langui)}
- displayLanguageSwitcher
- />
- );
-};
-
-export default Home;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps = getPostStaticProps("home");
diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx
deleted file mode 100644
index 4c53865..0000000
--- a/src/pages/library/[slug]/index.tsx
+++ /dev/null
@@ -1,806 +0,0 @@
-import { Fragment, useCallback, useMemo } from "react";
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { useRouter } from "next/router";
-import { useBoolean } from "usehooks-ts";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Chip } from "components/Chip";
-import { Img } from "components/Img";
-import { Button } from "components/Inputs/Button";
-import { Switch } from "components/Inputs/Switch";
-import { InsetBox } from "components/Containers/InsetBox";
-import { PreviewCardCTAs } from "components/Library/PreviewCardCTAs";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { PreviewCard } from "components/PreviewCard";
-import {
- Enum_Componentmetadatabooks_Binding_Type,
- Enum_Componentmetadatabooks_Page_Order,
- GetLibraryItemQuery,
-} from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import {
- prettyDate,
- prettyInlineTitle,
- prettyItemSubType,
- prettyItemType,
- prettyPrice,
- prettySlug,
- prettyURL,
-} from "helpers/formatters";
-import { ImageQuality } from "helpers/img";
-import { convertMmToInch } from "helpers/numbers";
-import {
- filterDefined,
- filterHasAttributes,
- isDefined,
- isDefinedAndNotEmpty,
- sortRangedContent,
-} from "helpers/others";
-import { useScrollTopOnChange } from "hooks/useScrollTopOnChange";
-import { isUntangibleGroupItem } from "helpers/libraryItem";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { Ico, Icon } from "components/Ico";
-import { cJoin, cIf } from "helpers/className";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { getOpenGraph } from "helpers/openGraph";
-import { getDescription } from "helpers/description";
-import { useIntersectionList } from "hooks/useIntersectionList";
-import { HorizontalLine } from "components/HorizontalLine";
-import { getLangui } from "graphql/fetchLocalData";
-import { Ids } from "types/ids";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const intersectionIds = ["summary", "gallery", "details", "subitems", "contents"];
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- item: NonNullable["data"][number]["attributes"]>;
- itemId: NonNullable["data"][number]["id"];
-}
-
-const LibrarySlug = ({ item, itemId, ...otherProps }: Props): JSX.Element => {
- const currency = useAtomGetter(atoms.settings.currency);
- const langui = useAtomGetter(atoms.localData.langui);
- const currencies = useAtomGetter(atoms.localData.currencies);
-
- const isContentPanelAtLeast3xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast3xl);
- const isContentPanelAtLeastSm = useAtomGetter(atoms.containerQueries.isContentPanelAtLeastSm);
-
- const hoverable = useDeviceSupportsHover();
- const router = useRouter();
- const { value: keepInfoVisible, toggle: toggleKeepInfoVisible } = useBoolean(false);
-
- const { showLightBox } = useAtomGetter(atoms.lightBox);
-
- useScrollTopOnChange(Ids.ContentPanel, [item]);
- const currentIntersection = useIntersectionList(intersectionIds);
-
- const isVariantSet = useMemo(
- () =>
- item.metadata?.[0]?.__typename === "ComponentMetadataGroup" &&
- item.metadata[0].subtype?.data?.attributes?.slug === "variant-set",
- [item.metadata]
- );
-
- const displayOpenScans = useMemo(
- () =>
- item.contents?.data.some(
- (content) => content.attributes?.scan_set && content.attributes.scan_set.length > 0
- ),
- [item.contents?.data]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
- {item.gallery && item.gallery.data.length > 0 && (
-
- )}
-
-
-
- {item.subitems && item.subitems.data.length > 0 && (
-
- )}
-
- {item.contents && item.contents.data.length > 0 && (
-
- )}
-
-
- ),
- [currentIntersection, isVariantSet, item.contents, item.gallery, item.subitems, langui]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
-
- {item.thumbnail?.data?.attributes ? (
-
{
- showLightBox([item.thumbnail?.data?.attributes]);
- }}
- />
- ) : (
-
- )}
-
-
-
-
- {item.subitem_of?.data[0]?.attributes && (
-
-
{langui.subitem_of}
-
-
- )}
-
-
{item.title}
- {isDefinedAndNotEmpty(item.subtitle) && (
- {item.subtitle}
- )}
-
-
- {!isUntangibleGroupItem(item.metadata?.[0]) && isDefinedAndNotEmpty(itemId) && (
-
- )}
-
- {item.descriptions?.[0] && (
-
{item.descriptions[0].description}
- )}
- {!(
- item.metadata &&
- item.metadata[0]?.__typename === "ComponentMetadataGroup" &&
- (item.metadata[0].subtype?.data?.attributes?.slug === "variant-set" ||
- item.metadata[0].subtype?.data?.attributes?.slug === "relation-set")
- ) && (
- <>
- {item.urls?.length ? (
-
-
{langui.available_at}
- {filterHasAttributes(item.urls, ["url"] as const).map((url, index) => (
-
-
-
- ))}
-
- ) : (
-
{langui.item_not_available}
- )}
- >
- )}
-
-
-
- {item.gallery && item.gallery.data.length > 0 && (
-
-
{langui.gallery}
-
- {filterHasAttributes(item.gallery.data, ["id", "attributes"] as const).map(
- (galleryItem, index) => (
-
- {
- showLightBox(
- filterHasAttributes(item.gallery?.data, ["attributes"] as const).map(
- (image) => image.attributes
- ),
- index
- );
- }}>
-
-
-
- )
- )}
-
-
- )}
-
-
-
-
{langui.details}
-
- {item.metadata?.[0] && (
-
-
{langui.type}
-
-
- {"›"}
-
-
-
- )}
-
- {item.release_date && (
-
-
{langui.release_date}
-
{prettyDate(item.release_date, router.locale)}
-
- )}
-
- {item.price && (
-
-
{langui.price}
-
- {prettyPrice(
- item.price,
- currencies,
- item.price.currency?.data?.attributes?.code
- )}
-
- {item.price.currency?.data?.attributes?.code !== currency && (
-
- {prettyPrice(item.price, currencies, currency)} (
- {langui.calculated?.toLowerCase()})
-
- )}
-
- )}
-
-
- {item.categories && item.categories.data.length > 0 && (
-
-
{langui.categories}
-
- {filterHasAttributes(item.categories.data, ["attributes"] as const).map(
- (category) => (
-
- )
- )}
-
-
- )}
-
- {item.size && (
-
-
{langui.size}
-
-
-
{langui.width}:
-
-
{item.size.width} mm
-
{convertMmToInch(item.size.width)} in
-
-
-
-
{langui.height}:
-
-
{item.size.height} mm
-
{convertMmToInch(item.size.height)} in
-
-
- {isDefined(item.size.thickness) && (
-
-
{langui.thickness}:
-
-
{item.size.thickness} mm
-
{convertMmToInch(item.size.thickness)} in
-
-
- )}
-
-
- )}
-
- {item.metadata?.[0]?.__typename !== "ComponentMetadataGroup" &&
- item.metadata?.[0]?.__typename !== "ComponentMetadataOther" && (
-
-
{langui.type_information}
-
- {item.metadata?.[0]?.__typename === "ComponentMetadataBooks" && (
- <>
-
-
{langui.pages}:
-
{item.metadata[0].page_count}
-
-
-
-
{langui.binding}:
-
- {item.metadata[0].binding_type ===
- Enum_Componentmetadatabooks_Binding_Type.Paperback
- ? langui.paperback
- : item.metadata[0].binding_type ===
- Enum_Componentmetadatabooks_Binding_Type.Hardcover
- ? langui.hardcover
- : ""}
-
-
-
-
-
{langui.page_order}:
-
- {item.metadata[0].page_order ===
- Enum_Componentmetadatabooks_Page_Order.LeftToRight
- ? langui.left_to_right
- : langui.right_to_left}
-
-
-
-
-
{langui.languages}:
- {item.metadata[0]?.languages?.data.map((lang) => (
-
{lang.attributes?.name}
- ))}
-
- >
- )}
-
-
- )}
-
-
-
- {item.subitems && item.subitems.data.length > 0 && (
-
-
{isVariantSet ? langui.variants : langui.subitems}
-
- {hoverable && (
-
-
-
- )}
-
-
- {filterHasAttributes(item.subitems.data, ["id", "attributes"] as const).map(
- (subitem) => (
-
- 0 &&
- subitem.attributes.metadata[0]
- ? [prettyItemSubType(subitem.attributes.metadata[0])]
- : []
- }
- bottomChips={subitem.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )}
- metadata={{
- releaseDate: subitem.attributes.release_date,
- price: subitem.attributes.price,
- position: "Bottom",
- }}
- infoAppend={
- !isUntangibleGroupItem(subitem.attributes.metadata?.[0]) && (
-
- )
- }
- />
-
- )
- )}
-
-
- )}
-
- {item.contents && item.contents.data.length > 0 && (
-
-
{langui.contents}
- {displayOpenScans && (
-
-
-
- )}
-
- {filterHasAttributes(item.contents.data, ["attributes"] as const).map(
- (rangedContent) => (
- ({
- pre_title: translation.pre_title,
- title: translation.title,
- subtitle: translation.subtitle,
- language: translation.language?.data?.attributes?.code,
- })),
- categories: filterHasAttributes(
- rangedContent.attributes.content.data.attributes.categories?.data,
- ["attributes"]
- ).map((category) => category.attributes.short),
- type:
- rangedContent.attributes.content.data.attributes.type?.data
- ?.attributes?.titles?.[0]?.title ??
- prettySlug(
- rangedContent.attributes.content.data.attributes.type?.data
- ?.attributes?.slug
- ),
- slug: rangedContent.attributes.content.data.attributes.slug,
- }
- : undefined
- }
- rangeStart={
- rangedContent.attributes.range[0]?.__typename === "ComponentRangePageRange"
- ? `${rangedContent.attributes.range[0].starting_page}`
- : ""
- }
- slug={rangedContent.attributes.slug}
- parentSlug={item.slug}
- key={rangedContent.id}
- hasScanSet={
- isDefined(rangedContent.attributes.scan_set) &&
- rangedContent.attributes.scan_set.length > 0
- }
- condensed={!isContentPanelAtLeast3xl}
- />
- )
- )}
-
-
- )}
-
-
- ),
- [
- langui,
- isContentPanelAtLeast3xl,
- item.thumbnail?.data?.attributes,
- item.subitem_of?.data,
- item.title,
- item.subtitle,
- item.metadata,
- item.descriptions,
- item.urls,
- item.gallery,
- item.release_date,
- item.price,
- item.categories,
- item.size,
- item.subitems,
- item.contents,
- item.slug,
- itemId,
- router.locale,
- currencies,
- currency,
- isContentPanelAtLeastSm,
- isVariantSet,
- hoverable,
- toggleKeepInfoVisible,
- keepInfoVisible,
- displayOpenScans,
- showLightBox,
- ]
- );
-
- return ;
-};
-export default LibrarySlug;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const item = await sdk.getLibraryItem({
- slug: context.params && isDefined(context.params.slug) ? context.params.slug.toString() : "",
- language_code: context.locale ?? "en",
- });
- if (!item.libraryItems?.data[0]?.attributes) return { notFound: true };
- sortRangedContent(item.libraryItems.data[0].attributes.contents);
-
- const { title, thumbnail } = item.libraryItems.data[0].attributes;
-
- const description = getDescription(
- item.libraryItems.data[0].attributes.descriptions?.[0]?.description,
- {
- [langui.categories ?? "Categories"]: filterHasAttributes(
- item.libraryItems.data[0].attributes.categories?.data,
- ["attributes.short"]
- ).map((category) => category.attributes.short),
- [langui.type ?? "Type"]: item.libraryItems.data[0].attributes.metadata?.[0]
- ? [prettyItemSubType(item.libraryItems.data[0].attributes.metadata[0])]
- : [],
- [langui.release_date ?? "Release date"]: [
- item.libraryItems.data[0].attributes.release_date
- ? prettyDate(item.libraryItems.data[0].attributes.release_date, context.locale)
- : undefined,
- ],
- }
- );
-
- const props: Props = {
- item: item.libraryItems.data[0].attributes,
- itemId: item.libraryItems.data[0].id,
- openGraph: getOpenGraph(langui, title, description, thumbnail?.data?.attributes),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const libraryItems = await sdk.getLibraryItemsSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(libraryItems.libraryItems?.data, ["attributes"] as const).map((item) => {
- context.locales?.map((local) =>
- paths.push({ params: { slug: item.attributes.slug }, locale: local })
- );
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
- */
-
-interface ContentLineProps {
- content?: {
- translations: {
- pre_title: string | null | undefined;
- title: string;
- subtitle: string | null | undefined;
- language: string | undefined;
- }[];
- categories?: string[];
- type?: string;
- slug: string;
- };
- rangeStart: string;
- parentSlug: string;
- slug: string;
-
- hasScanSet: boolean;
- condensed: boolean;
-}
-
-const ContentLine = ({
- rangeStart,
- content,
- hasScanSet,
- slug,
- parentSlug,
- condensed,
-}: ContentLineProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const { value: isOpened, toggle: toggleOpened } = useBoolean(false);
- const [selectedTranslation] = useSmartLanguage({
- items: content?.translations ?? [],
- languageExtractor: useCallback(
- (item: NonNullable["translations"][number]) => item.language,
- []
- ),
- });
-
- if (condensed) {
- return (
-
-
- {content?.type &&
}
-
-
{rangeStart}
-
-
-
- {selectedTranslation
- ? prettyInlineTitle(
- selectedTranslation.pre_title,
- selectedTranslation.title,
- selectedTranslation.subtitle
- )
- : content
- ? prettySlug(content.slug, parentSlug)
- : prettySlug(slug, parentSlug)}
-
-
- {content?.categories?.map((category, index) => (
-
- ))}
-
-
- {hasScanSet || isDefined(content) ? (
- <>
- {hasScanSet && (
-
- )}
- {isDefined(content) && (
-
- )}
- >
- ) : (
- langui.content_is_not_available
- )}
-
-
- );
- }
-
- return (
-
-
-
-
-
- {hasScanSet || isDefined(content) ? (
- <>
- {hasScanSet && (
-
- )}
- {isDefined(content) && (
-
- )}
- >
- ) : (
- langui.content_is_not_available
- )}
-
-
- );
-};
diff --git a/src/pages/library/[slug]/reader.tsx b/src/pages/library/[slug]/reader.tsx
deleted file mode 100644
index f5c76aa..0000000
--- a/src/pages/library/[slug]/reader.tsx
+++ /dev/null
@@ -1,1075 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
-import { useHotkeys } from "react-hotkeys-hook";
-import Slider from "rc-slider";
-import { useRouter } from "next/router";
-import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import {
- Enum_Componentmetadatabooks_Page_Order as PageOrder,
- GetLibraryItemScansQuery,
- UploadImageFragment,
-} from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import {
- filterHasAttributes,
- getStatusDescription,
- isDefined,
- isDefinedAndNotEmpty,
- sortRangedContent,
-} from "helpers/others";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { Img } from "components/Img";
-import { getAssetFilename, ImageQuality } from "helpers/img";
-import { cIf, cJoin } from "helpers/className";
-import { clamp, isInteger } from "helpers/numbers";
-import { SubPanel } from "components/Containers/SubPanel";
-import { Button } from "components/Inputs/Button";
-import { Icon } from "components/Ico";
-import { Ids } from "types/ids";
-import { Switch } from "components/Inputs/Switch";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { sendAnalytics } from "helpers/analytics";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ButtonGroup } from "components/Inputs/ButtonGroup";
-import { Chip } from "components/Chip";
-import { RecorderChip } from "components/RecorderChip";
-import { ToolTip } from "components/ToolTip";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { TranslatedProps } from "types/TranslatedProps";
-import { prettyInlineTitle, prettySlug } from "helpers/formatters";
-import { useFullscreen } from "hooks/useFullscreen";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-import { FilterSettings, useReaderSettings } from "hooks/useReaderSettings";
-
-const CUSTOM_DARK_DROPSHADOW = `
- drop-shadow(0 0 0.5em rgb(var(--theme-color-shade) / 30%))
- drop-shadow(0 1em 1em rgb(var(--theme-color-shade) / 40%))
- drop-shadow(0 2em 2em rgb(var(--theme-color-shade) / 60%))
- drop-shadow(0 12em 12em rgb(var(--theme-color-shade) / 80%))`;
-
-const CUSTOM_LIGHT_DROPSHADOW = `
- drop-shadow(0 0.3em 0.5em rgb(var(--theme-color-shade) / 70%))
- drop-shadow(0 1em 1em rgb(var(--theme-color-shade) / 30%))
- drop-shadow(0 2em 2em rgb(var(--theme-color-shade) / 30%))
- drop-shadow(0 12em 12em rgb(var(--theme-color-shade) / 60%))`;
-
-const SIDEPAGES_PAGE_COUNT_ON_TEXTURE = 200;
-const SIDEPAGES_PAGE_WIDTH = 0.02;
-
-type BookType = "book" | "manga";
-type DisplayMode = "double" | "single";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- item: NonNullable<
- NonNullable["data"][number]["attributes"]
- >;
- pages: UploadImageFragment[];
- pageOrder: PageOrder;
- bookType: BookType;
- pageWidth: number;
- pageRatio: string;
- itemSlug: string;
-}
-
-const LibrarySlug = ({
- pages,
- bookType,
- pageOrder,
- pageWidth,
- itemSlug,
- item,
- ...otherProps
-}: Props): JSX.Element => {
- const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout);
- const langui = useAtomGetter(atoms.localData.langui);
- const isDarkMode = useAtomGetter(atoms.settings.darkMode);
- const {
- filterSettings,
- isSidePagesEnabled,
- pageQuality,
- toggleBookFold,
- toggleLighting,
- togglePaperTexture,
- toggleDropShadow,
- toggleIsSidePagesEnabled,
- setPageQuality,
- setTeint,
- resetReaderSettings,
- } = useReaderSettings();
- const [currentPageIndex, setCurrentPageIndex] = useState(0);
- const [currentZoom, setCurrentZoom] = useState(1);
- const [isGalleryMode, setIsGalleryMode] = useState(false);
- const [displayMode, setDisplayMode] = useState(
- is1ColumnLayout ? "single" : "double"
- );
- const router = useRouter();
-
- const { isFullscreen, toggleFullscreen, requestFullscreen } = useFullscreen(Ids.ContentPanel);
-
- const effectiveDisplayMode = useMemo(
- () =>
- currentPageIndex === 0 || currentPageIndex === pages.length - 1 ? "single" : displayMode,
- [currentPageIndex, displayMode, pages.length]
- );
-
- const ajustedSidepagesTotalWidth = useMemo(
- () => pages.length * SIDEPAGES_PAGE_WIDTH * (120 / pageWidth),
- [pageWidth, pages.length]
- );
-
- const changeCurrentPageIndex = useCallback(
- (callbackFn: (current: number) => number) => {
- setCurrentPageIndex((current) => {
- let result = callbackFn(current);
- result = clamp(result, 0, pages.length - 1);
- window.history.replaceState({}, "", `?page=${result - 1}`);
- return result;
- });
- },
- [pages.length]
- );
-
- useEffect(() => setDisplayMode(is1ColumnLayout ? "single" : "double"), [is1ColumnLayout]);
-
- useEffect(() => {
- const indexQueryString = router.asPath.indexOf("?page=");
- if (indexQueryString > 0) {
- const page = parseInt(router.asPath.slice(indexQueryString + "?page=".length), 10);
- changeCurrentPageIndex(() => page + 1);
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [router.asPath]);
-
- const changeDisplayMode = useCallback(
- (newDisplayMode: DisplayMode) => {
- setDisplayMode(newDisplayMode);
- changeCurrentPageIndex((current) => current);
- },
- [changeCurrentPageIndex]
- );
-
- const handlePageNavigation = useCallback(
- (navigateTo: "left" | "next" | "previous" | "right") => {
- if (
- (navigateTo === "right" && pageOrder === PageOrder.LeftToRight) ||
- (navigateTo === "left" && pageOrder === PageOrder.RightToLeft) ||
- navigateTo === "next"
- ) {
- changeCurrentPageIndex((current) => current + (effectiveDisplayMode === "single" ? 1 : 2));
- } else {
- changeCurrentPageIndex((current) => current - (effectiveDisplayMode === "single" ? 1 : 2));
- }
- },
- [changeCurrentPageIndex, effectiveDisplayMode, pageOrder]
- );
-
- useHotkeys("left", () => handlePageNavigation("left"), { enabled: !isGalleryMode }, [
- handlePageNavigation,
- ]);
-
- useHotkeys("up", () => setIsGalleryMode(true), { enabled: !isGalleryMode }, [setIsGalleryMode]);
- useHotkeys("down", () => setIsGalleryMode(false), { enabled: isGalleryMode }, [setIsGalleryMode]);
-
- useHotkeys("f", () => requestFullscreen(), { enabled: !isFullscreen }, [requestFullscreen]);
-
- useHotkeys("right", () => handlePageNavigation("right"), { enabled: !isGalleryMode }, [
- handlePageNavigation,
- ]);
-
- const firstPage = useMemo(
- () =>
- pages[
- effectiveDisplayMode === "double" && currentPageIndex % 2 === 0
- ? currentPageIndex - 1
- : currentPageIndex
- ],
- [currentPageIndex, effectiveDisplayMode, pages]
- );
- const secondPage = useMemo(
- () =>
- pages[
- effectiveDisplayMode === "double" && currentPageIndex % 2 === 0
- ? currentPageIndex
- : currentPageIndex + 1
- ],
- [currentPageIndex, effectiveDisplayMode, pages]
- );
-
- const leftSidePagesCount = useMemo(
- () =>
- pageOrder === PageOrder.LeftToRight ? currentPageIndex : pages.length - 1 - currentPageIndex,
- [currentPageIndex, pageOrder, pages.length]
- );
-
- const rightSidePagesCount = useMemo(
- () =>
- pageOrder === PageOrder.LeftToRight ? pages.length - 1 - currentPageIndex : currentPageIndex,
- [currentPageIndex, pageOrder, pages.length]
- );
-
- const leftSidePagesWidth = useMemo(
- () =>
- `${
- pageOrder === PageOrder.LeftToRight
- ? (currentPageIndex / pages.length) * ajustedSidepagesTotalWidth
- : ajustedSidepagesTotalWidth -
- (currentPageIndex / pages.length) * ajustedSidepagesTotalWidth
- }vmin`,
- [ajustedSidepagesTotalWidth, currentPageIndex, pageOrder, pages.length]
- );
-
- const rightSidePagesWidth = useMemo(
- () =>
- `${
- pageOrder === PageOrder.LeftToRight
- ? ajustedSidepagesTotalWidth -
- (currentPageIndex / pages.length) * ajustedSidepagesTotalWidth
- : (currentPageIndex / pages.length) * ajustedSidepagesTotalWidth
- }vmin`,
- [ajustedSidepagesTotalWidth, currentPageIndex, pageOrder, pages.length]
- );
-
- const leftSideClipPath = useMemo(
- () => `polygon(
- ${
- isSidePagesEnabled
- ? `
- ${leftSidePagesWidth} 100%,
- 0% calc(100% - ${leftSidePagesWidth} / 3),
- 0% calc(${leftSidePagesWidth} / 3),
- ${leftSidePagesWidth} 0%,`
- : "0% 100%, 0% 0%,"
- }
- 70% 0%,
- ${
- filterSettings.bookFold
- ? `90% .25%,
- 95% .5%,
- 98% .8%,
- 99% 1%,
- 101% 2%,
- 101% 98%,
- 99% 99%,
- 98% 99.2%,
- 95% 99.5%,
- 90% 99.75%,`
- : "101% 0%, 101% 100%,"
- }
- 70% 100%
- )`,
- [filterSettings.bookFold, isSidePagesEnabled, leftSidePagesWidth]
- );
-
- const rightSideClipPath = useMemo(
- () => `polygon(
- ${
- isSidePagesEnabled
- ? `calc(100% - ${rightSidePagesWidth}) 0%,
- 100% calc(${rightSidePagesWidth} / 3),
- 100% calc(100% - ${rightSidePagesWidth} / 3),
- calc(100% - ${rightSidePagesWidth}) 100%,`
- : "100% 0%, 100% 100%,"
- }
- 30% 100%,
- ${
- filterSettings.bookFold
- ? `10% 99.75%,
- 5% 99.5%,
- 2% 99.2%,
- 1% 99%,
- -1% 98%,
- -1% 2%,
- 1% 1%,
- 2% .8%,
- 5% .5%,
- 10% .25%,`
- : "-1% 100%, -1% 0%,"
- }
- 30% 0%
- )`,
- [filterSettings.bookFold, isSidePagesEnabled, rightSidePagesWidth]
- );
-
- const pageHeight = useMemo(
- () => `calc(100vh - ${is1ColumnLayout ? 5 : 4}rem - 3rem)`,
- [is1ColumnLayout]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{langui.night_reader}:
-
{
- let value = 0;
- if (Array.isArray(event)) {
- value = event[0];
- } else {
- value = event;
- }
- setTeint(value / 10);
- }}
- />
-
-
-
-
{langui.reading_layout}:
-
changeDisplayMode("single"),
- },
- {
- icon: Icon.AutoStories,
- tooltip: langui.double_page_view,
- active: displayMode === "double",
- onClick: () => changeDisplayMode("double"),
- },
- ]}
- />
-
-
-
-
{langui.quality}:
-
setPageQuality(ImageQuality.Medium),
- },
- {
- text: "HD",
- active: pageQuality === ImageQuality.Large,
- onClick: () => setPageQuality(ImageQuality.Large),
- },
- ]}
- />
-
-
- {
- resetReaderSettings();
- setDisplayMode(is1ColumnLayout ? "single" : "double");
- sendAnalytics("Reader", "Reset all options");
- }}
- />
-
- ),
- [
- langui.item,
- langui.paper_texture,
- langui.book_fold,
- langui.lighting,
- langui.side_pages,
- langui.shadow,
- langui.night_reader,
- langui.reading_layout,
- langui.single_page_view,
- langui.double_page_view,
- langui.quality,
- langui.reset_all_options,
- itemSlug,
- filterSettings.paperTexture,
- filterSettings.bookFold,
- filterSettings.lighting,
- filterSettings.dropShadow,
- filterSettings.teint,
- togglePaperTexture,
- toggleBookFold,
- toggleLighting,
- isSidePagesEnabled,
- toggleIsSidePagesEnabled,
- toggleDropShadow,
- displayMode,
- pageQuality,
- setTeint,
- changeDisplayMode,
- setPageQuality,
- resetReaderSettings,
- is1ColumnLayout,
- ]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
setCurrentZoom(zoom.state.scale)}
- panning={{ disabled: currentZoom <= 1, velocityDisabled: false }}
- doubleClick={{ disabled: true, mode: "reset" }}
- zoomAnimation={{ size: 0.1 }}
- velocityAnimation={{ animationTime: 0, equalToMove: true }}>
-
- {effectiveDisplayMode === "single" ? (
-
-
-
-
currentZoom <= 1 && handlePageNavigation("left")}
- />
-
currentZoom <= 1 && handlePageNavigation("right")}
- />
-
- ) : (
- <>
-
currentZoom <= 1 && handlePageNavigation("left")}
- style={{
- clipPath: leftSideClipPath,
- }}>
- {isSidePagesEnabled && (
-
- )}
-
-
-
-
-
currentZoom <= 1 && handlePageNavigation("right")}
- style={{
- clipPath: rightSideClipPath,
- }}>
-
- {isSidePagesEnabled && (
-
- )}
-
-
-
- >
- )}
-
-
-
-
-
-
- {currentPageIndex - 1} / {pages.length - 2}
-
-
{
- let value = 0;
- if (Array.isArray(event)) {
- value = event[0];
- } else {
- value = event;
- }
- changeCurrentPageIndex(() => value);
- }}
- />
-
- setIsGalleryMode((current) => !current)}
- size="small"
- />
-
-
-
-
- {item.contents?.data.map((content) => (
-
- {content.attributes?.scan_set?.[0] && (
- {
- const range = content.attributes?.range[0];
- let newPageIndex = index + 1;
- if (range?.__typename === "ComponentRangePageRange") {
- newPageIndex += range.starting_page;
- }
- changeCurrentPageIndex(() => newPageIndex);
- setIsGalleryMode(false);
- }}
- id={content.attributes.slug}
- translations={filterHasAttributes(
- content.attributes.content?.data?.attributes?.translations,
- ["language.data.attributes"] as const
- ).map((translation) => ({
- language: translation.language.data.attributes.code,
- title: prettyInlineTitle(
- translation.pre_title,
- translation.title,
- translation.subtitle
- ),
- }))}
- fallback={{
- title: prettySlug(content.attributes.slug, item.slug),
- }}
- content={content.attributes.content}
- />
- )}
-
- ))}
-
-
-
- ),
- [
- is1ColumnLayout,
- currentZoom,
- filterSettings,
- isDarkMode,
- pageHeight,
- effectiveDisplayMode,
- firstPage,
- pageQuality,
- bookType,
- leftSideClipPath,
- isSidePagesEnabled,
- leftSidePagesWidth,
- leftSidePagesCount,
- pageOrder,
- secondPage,
- rightSideClipPath,
- rightSidePagesWidth,
- rightSidePagesCount,
- isGalleryMode,
- currentPageIndex,
- pages.length,
- isFullscreen,
- toggleFullscreen,
- item.contents?.data,
- item.slug,
- handlePageNavigation,
- changeCurrentPageIndex,
- ]
- );
-
- return (
-
- );
-};
-export default LibrarySlug;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const item = await sdk.getLibraryItemScans({
- slug: context.params && isDefined(context.params.slug) ? context.params.slug.toString() : "",
- language_code: context.locale ?? "en",
- });
- if (!item.libraryItems?.data[0]?.attributes || !item.libraryItems.data[0]?.id)
- return { notFound: true };
- sortRangedContent(item.libraryItems.data[0].attributes.contents);
-
- const pages: UploadImageFragment[] = [];
-
- const cover = item.libraryItems.data[0].attributes.images?.[0]?.cover;
- if (cover) {
- if (cover.front?.data?.attributes) pages.push(cover.front.data.attributes);
- if (cover.inside_front?.data?.attributes) pages.push(cover.inside_front.data.attributes);
- }
-
- filterHasAttributes(item.libraryItems.data[0].attributes.contents?.data, [
- "attributes.scan_set",
- ] as const).forEach((content) =>
- filterHasAttributes(content.attributes.scan_set, ["pages.data"] as const).forEach((scanSet) =>
- filterHasAttributes(scanSet.pages.data, ["attributes"] as const)
- .sort((a, b) => {
- if (isDefinedAndNotEmpty(a.attributes.url) && isDefinedAndNotEmpty(b.attributes.url)) {
- let aName = getAssetFilename(a.attributes.url);
- let bName = getAssetFilename(b.attributes.url);
-
- /*
- * If the number is a succession of 0s, make the number
- * incrementally smaller than 0 (i.e: 00 becomes -1)
- */
- if (aName.replaceAll("0", "").length === 0) {
- aName = (1 - aName.length).toString(10);
- }
- if (bName.replaceAll("0", "").length === 0) {
- bName = (1 - bName.length).toString(10);
- }
-
- if (isInteger(aName) && isInteger(bName)) {
- return parseInt(aName, 10) - parseInt(bName, 10);
- }
- return a.attributes.url.localeCompare(b.attributes.url);
- }
- return 0;
- })
- .forEach((page) => pages.push(page.attributes))
- )
- );
-
- if (cover) {
- if (cover.inside_back?.data?.attributes) pages.push(cover.inside_back.data.attributes);
- if (cover.back?.data?.attributes) pages.push(cover.back.data.attributes);
- }
-
- const pageOrder: Props["pageOrder"] = (() => {
- const { metadata } = item.libraryItems.data[0].attributes;
- if (metadata?.[0]?.__typename === "ComponentMetadataBooks") {
- return metadata[0].page_order;
- }
- return PageOrder.LeftToRight;
- })();
-
- const bookType =
- item.libraryItems.data[0].attributes.metadata?.[0]?.__typename === "ComponentMetadataBooks" &&
- item.libraryItems.data[0].attributes.metadata[0].subtype?.data?.attributes?.slug === "manga"
- ? "manga"
- : "book";
-
- const pageWidth = item.libraryItems.data[0].attributes.size?.width ?? 120;
-
- if (pages.length === 0) return { notFound: true };
-
- const props: Props = {
- item: item.libraryItems.data[0].attributes,
- pages,
- pageOrder,
- bookType,
- pageWidth,
- itemSlug: item.libraryItems.data[0].attributes.slug,
- pageRatio: `${pages[0].width ?? 21} / ${pages[0].height ?? 29.7}`,
- openGraph: getOpenGraph(
- langui,
- item.libraryItems.data[0].attributes.title,
- undefined,
- item.libraryItems.data[0].attributes.thumbnail?.data?.attributes
- ),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const libraryItems = await sdk.getLibraryItemsSlugs({});
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(libraryItems.libraryItems?.data, ["attributes"] as const).map((item) => {
- context.locales?.map((local) =>
- paths.push({ params: { slug: item.attributes.slug }, locale: local })
- );
- });
-
- return {
- paths,
- fallback: "blocking",
- };
-};
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
- */
-
-interface PageFiltersProps {
- page: "left" | "right" | "single";
- bookType: BookType;
- options: FilterSettings;
-}
-
-const PageFilters = ({ page, bookType, options }: PageFiltersProps) => {
- const isDarkMode = useAtomGetter(atoms.settings.darkMode);
- const commonCss = useMemo(
- () => cJoin("absolute inset-0", cIf(page === "right", "[background-position-x:-100%]")),
- [page]
- );
-
- return (
- <>
- {options.paperTexture && (
-
- )}
-
- {options.bookFold && (
-
- )}
-
- {options.lighting && (
- <>
-
-
- >
- )}
-
-
- >
- );
-};
-
-interface ScanSetProps {
- onClickOnImage: (index: number) => void;
- scanSet: NonNullable<
- NonNullable<
- NonNullable<
- NonNullable<
- NonNullable
["data"][number]["attributes"]
- >["contents"]
- >["data"][number]["attributes"]
- >["scan_set"]
- >;
- id: string;
- title: string;
-
- content: NonNullable<
- NonNullable<
- NonNullable<
- NonNullable["data"][number]["attributes"]
- >["contents"]
- >["data"][number]["attributes"]
- >["content"];
-}
-
-const ScanSet = ({ onClickOnImage, scanSet, id, title, content }: ScanSetProps): JSX.Element => {
- const is1ColumnLayout = useAtomGetter(atoms.containerQueries.is1ColumnLayout);
- const langui = useAtomGetter(atoms.localData.langui);
- const [selectedScan, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
- items: scanSet,
- languageExtractor: useCallback(
- (item: NonNullable) => item.language?.data?.attributes?.code,
- []
- ),
- transform: useCallback((item: NonNullable) => {
- item.pages?.data.sort((a, b) => {
- if (
- a.attributes &&
- b.attributes &&
- isDefinedAndNotEmpty(a.attributes.url) &&
- isDefinedAndNotEmpty(b.attributes.url)
- ) {
- let aName = getAssetFilename(a.attributes.url);
- let bName = getAssetFilename(b.attributes.url);
-
- /*
- * If the number is a succession of 0s, make the number
- * incrementally smaller than 0 (i.e: 00 becomes -1)
- */
- if (aName.replaceAll("0", "").length === 0) {
- aName = (1 - aName.length).toString(10);
- }
- if (bName.replaceAll("0", "").length === 0) {
- bName = (1 - bName.length).toString(10);
- }
-
- if (isInteger(aName) && isInteger(bName)) {
- return parseInt(aName, 10) - parseInt(bName, 10);
- }
- return a.attributes.url.localeCompare(b.attributes.url);
- }
- return 0;
- });
- return item;
- }, []),
- });
-
- const pages = useMemo(
- () => filterHasAttributes(selectedScan?.pages?.data, ["attributes"]),
- [selectedScan]
- );
-
- return (
- <>
- {selectedScan && isDefined(pages) && (
-
-
-
- {title}
-
-
-
-
-
-
- {content?.data?.attributes && isDefinedAndNotEmpty(content.data.attributes.slug) && (
-
- )}
-
- {languageSwitcherProps.locales.size > 1 && (
-
- )}
-
-
-
{langui.status}:
-
-
-
-
-
- {selectedScan.scanners && selectedScan.scanners.data.length > 0 && (
-
-
{langui.scanners}:
-
- {filterHasAttributes(selectedScan.scanners.data, [
- "id",
- "attributes",
- ] as const).map((scanner) => (
-
-
-
- ))}
-
-
- )}
-
- {selectedScan.cleaners && selectedScan.cleaners.data.length > 0 && (
-
-
{langui.cleaners}:
-
- {filterHasAttributes(selectedScan.cleaners.data, [
- "id",
- "attributes",
- ] as const).map((cleaner) => (
-
-
-
- ))}
-
-
- )}
-
- {selectedScan.typesetters && selectedScan.typesetters.data.length > 0 && (
-
-
{langui.typesetters}:
-
- {filterHasAttributes(selectedScan.typesetters.data, [
- "id",
- "attributes",
- ] as const).map((typesetter) => (
-
-
-
- ))}
-
-
- )}
-
- {isDefinedAndNotEmpty(selectedScan.notes) && (
-
-
-
- )}
-
-
-
- {pages.map((page, index) => (
-
{
- onClickOnImage(index);
- }}>
-
-
- ))}
-
-
- )}
- >
- );
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const TranslatedScanSet = ({
- translations,
- fallback,
- ...otherProps
-}: TranslatedProps): JSX.Element => {
- const [selectedTranslation] = useSmartLanguage({
- items: translations,
- languageExtractor: useCallback((item: { language: string }): string => item.language, []),
- });
-
- return ;
-};
diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx
deleted file mode 100644
index 6476846..0000000
--- a/src/pages/library/index.tsx
+++ /dev/null
@@ -1,507 +0,0 @@
-import { GetStaticProps } from "next";
-import { useState, useMemo, useCallback } from "react";
-import { useBoolean } from "usehooks-ts";
-import naturalCompare from "string-natural-compare";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Select } from "components/Inputs/Select";
-import { Switch } from "components/Inputs/Switch";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { GetLibraryItemsPreviewQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { prettyInlineTitle, prettyItemSubType } from "helpers/formatters";
-import { LibraryItemUserStatus } from "types/types";
-import { Icon } from "components/Ico";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { TextInput } from "components/Inputs/TextInput";
-import { Button } from "components/Inputs/Button";
-import { PreviewCardCTAs } from "components/Library/PreviewCardCTAs";
-import { isUntangibleGroupItem } from "helpers/libraryItem";
-import { PreviewCard } from "components/PreviewCard";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { ButtonGroup } from "components/Inputs/ButtonGroup";
-import { filterHasAttributes, isDefined, isDefinedAndNotEmpty, isUndefined } from "helpers/others";
-import { convertPrice } from "helpers/numbers";
-import { SmartList } from "components/SmartList";
-import { SelectiveNonNullable } from "types/SelectiveNonNullable";
-import { getOpenGraph } from "helpers/openGraph";
-import { compareDate } from "helpers/date";
-import { HorizontalLine } from "components/HorizontalLine";
-import { cIf, cJoin } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { sendAnalytics } from "helpers/analytics";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-import { useLibraryItemUserStatus } from "hooks/useLibraryItemUserStatus";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- searchName: "",
- showSubitems: false,
- showPrimaryItems: true,
- showSecondaryItems: false,
- sortingMethod: 0,
- groupingMethod: -1,
- keepInfoVisible: false,
- filterUserStatus: undefined,
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- items: NonNullable["data"];
-}
-
-const Library = ({ items, ...otherProps }: Props): JSX.Element => {
- const hoverable = useDeviceSupportsHover();
- const langui = useAtomGetter(atoms.localData.langui);
- const currencies = useAtomGetter(atoms.localData.currencies);
-
- const { libraryItemUserStatus } = useLibraryItemUserStatus();
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
-
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
-
- const {
- value: showSubitems,
- toggle: toggleShowSubitems,
- setValue: setShowSubitems,
- } = useBoolean(DEFAULT_FILTERS_STATE.showSubitems);
-
- const {
- value: showPrimaryItems,
- toggle: toggleShowPrimaryItems,
- setValue: setShowPrimaryItems,
- } = useBoolean(DEFAULT_FILTERS_STATE.showPrimaryItems);
-
- const {
- value: showSecondaryItems,
- toggle: toggleShowSecondaryItems,
- setValue: setShowSecondaryItems,
- } = useBoolean(DEFAULT_FILTERS_STATE.showSecondaryItems);
-
- const {
- value: keepInfoVisible,
- toggle: toggleKeepInfoVisible,
- setValue: setKeepInfoVisible,
- } = useBoolean(DEFAULT_FILTERS_STATE.keepInfoVisible);
-
- const [sortingMethod, setSortingMethod] = useState(DEFAULT_FILTERS_STATE.sortingMethod);
-
- const [groupingMethod, setGroupingMethod] = useState(
- DEFAULT_FILTERS_STATE.groupingMethod
- );
-
- const [filterUserStatus, setFilterUserStatus] = useState(
- DEFAULT_FILTERS_STATE.filterUserStatus
- );
-
- const filteringFunction = useCallback(
- (item: SelectiveNonNullable) => {
- if (!showSubitems && !item.attributes.root_item) return false;
- if (showSubitems && isUntangibleGroupItem(item.attributes.metadata?.[0])) {
- return false;
- }
- if (item.attributes.primary && !showPrimaryItems) return false;
- if (!item.attributes.primary && !showSecondaryItems) return false;
-
- if (isDefined(filterUserStatus) && item.id) {
- if (isUntangibleGroupItem(item.attributes.metadata?.[0])) {
- return false;
- }
- if (filterUserStatus === LibraryItemUserStatus.None) {
- if (libraryItemUserStatus[item.id]) {
- return false;
- }
- } else if (filterUserStatus !== libraryItemUserStatus[item.id]) {
- return false;
- }
- }
- return true;
- },
- [libraryItemUserStatus, filterUserStatus, showPrimaryItems, showSecondaryItems, showSubitems]
- );
-
- const sortingFunction = useCallback(
- (
- a: SelectiveNonNullable,
- b: SelectiveNonNullable
- ) => {
- switch (sortingMethod) {
- case 0: {
- const titleA = prettyInlineTitle("", a.attributes.title, a.attributes.subtitle);
- const titleB = prettyInlineTitle("", b.attributes.title, b.attributes.subtitle);
- return naturalCompare(titleA, titleB);
- }
- case 1: {
- const priceA = a.attributes.price
- ? convertPrice(a.attributes.price, currencies[0])
- : Infinity;
- const priceB = b.attributes.price
- ? convertPrice(b.attributes.price, currencies[0])
- : Infinity;
- return priceA - priceB;
- }
- case 2: {
- return compareDate(a.attributes.release_date, b.attributes.release_date);
- }
- default:
- return 0;
- }
- },
- [currencies, sortingMethod]
- );
-
- const groupingFunction = useCallback(
- (item: SelectiveNonNullable): string[] => {
- switch (groupingMethod) {
- case 0: {
- const categories = filterHasAttributes(item.attributes.categories?.data, [
- "attributes",
- ] as const);
- if (categories.length > 0) {
- return categories.map((category) => category.attributes.name);
- }
- return [langui.no_category ?? "No category"];
- }
- case 1: {
- if (item.attributes.metadata && item.attributes.metadata.length > 0) {
- switch (item.attributes.metadata[0]?.__typename) {
- case "ComponentMetadataAudio":
- return [langui.audio ?? "Audio"];
- case "ComponentMetadataGame":
- return [langui.game ?? "Game"];
- case "ComponentMetadataBooks":
- return [langui.textual ?? "Textual"];
- case "ComponentMetadataVideo":
- return [langui.video ?? "Video"];
- case "ComponentMetadataOther":
- return [langui.other ?? "Other"];
- case "ComponentMetadataGroup": {
- switch (item.attributes.metadata[0]?.subitems_type?.data?.attributes?.slug) {
- case "audio":
- return [langui.audio ?? "Audio"];
- case "video":
- return [langui.video ?? "Video"];
- case "game":
- return [langui.game ?? "Game"];
- case "textual":
- return [langui.textual ?? "Textual"];
- case "mixed":
- return [langui.group ?? "Group"];
- default: {
- return [langui.no_type ?? "No type"];
- }
- }
- }
- default:
- return [langui.no_type ?? "No type"];
- }
- } else {
- return [langui.no_type ?? "No type"];
- }
- }
- case 2: {
- if (item.attributes.release_date?.year) {
- return [item.attributes.release_date.year.toString()];
- }
- return [langui.no_year ?? "No year"];
- }
- default:
- return [""];
- }
- },
- [groupingMethod, langui]
- );
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
- {
- setSearchName(name);
- if (isDefinedAndNotEmpty(name)) {
- sendAnalytics("Library", "Change search term");
- } else {
- sendAnalytics("Library", "Clear search term");
- }
- }}
- />
-
-
- {
- setGroupingMethod(value);
- sendAnalytics(
- "Library",
- `Change grouping method (${["none", "category", "type", "year"][value + 1]})`
- );
- }}
- allowEmpty
- />
-
-
-
- {
- setSortingMethod(value);
- sendAnalytics(
- "Library",
- `Change sorting method (${["name", "price", "release date"][value]})`
- );
- }}
- />
-
-
-
- {
- toggleShowSubitems();
- sendAnalytics("Library", `${showSubitems ? "Hide" : "Show"} subitems`);
- }}
- />
-
-
-
- {
- toggleShowPrimaryItems();
- sendAnalytics("Library", `${showPrimaryItems ? "Hide" : "Show"} primary items`);
- }}
- />
-
-
-
- {
- toggleShowSecondaryItems();
- sendAnalytics("Library", `${showSecondaryItems ? "Hide" : "Show"} secondary items`);
- }}
- />
-
-
- {hoverable && (
-
- {
- toggleKeepInfoVisible();
- sendAnalytics("Library", `Always ${keepInfoVisible ? "hide" : "show"} info`);
- }}
- />
-
- )}
-
- {
- setFilterUserStatus(LibraryItemUserStatus.Want);
- sendAnalytics("Library", "Set filter status (I want)");
- },
- active: filterUserStatus === LibraryItemUserStatus.Want,
- },
- {
- tooltip: langui.only_display_items_i_have,
- icon: Icon.BackHand,
- onClick: () => {
- setFilterUserStatus(LibraryItemUserStatus.Have);
- sendAnalytics("Library", "Set filter status (I have)");
- },
- active: filterUserStatus === LibraryItemUserStatus.Have,
- },
- {
- tooltip: langui.only_display_unmarked_items,
- icon: Icon.RadioButtonUnchecked,
- onClick: () => {
- setFilterUserStatus(LibraryItemUserStatus.None);
- sendAnalytics("Library", "Set filter status (unmarked)");
- },
- active: filterUserStatus === LibraryItemUserStatus.None,
- },
- {
- tooltip: langui.only_display_unmarked_items,
- text: langui.all,
- onClick: () => {
- setFilterUserStatus(undefined);
- sendAnalytics("Library", "Set filter status (all)");
- },
- active: isUndefined(filterUserStatus),
- },
- ]}
- />
-
- {
- setSearchName(DEFAULT_FILTERS_STATE.searchName);
- setShowSubitems(DEFAULT_FILTERS_STATE.showSubitems);
- setShowPrimaryItems(DEFAULT_FILTERS_STATE.showPrimaryItems);
- setShowSecondaryItems(DEFAULT_FILTERS_STATE.showSecondaryItems);
- setSortingMethod(DEFAULT_FILTERS_STATE.sortingMethod);
- setGroupingMethod(DEFAULT_FILTERS_STATE.groupingMethod);
- setKeepInfoVisible(DEFAULT_FILTERS_STATE.keepInfoVisible);
- setFilterUserStatus(DEFAULT_FILTERS_STATE.filterUserStatus);
- sendAnalytics("Library", "Reset all filters");
- }}
- />
-
- ),
- [
- filterUserStatus,
- groupingMethod,
- hoverable,
- keepInfoVisible,
- langui,
- searchName,
- setKeepInfoVisible,
- setShowPrimaryItems,
- setShowSecondaryItems,
- setShowSubitems,
- showPrimaryItems,
- showSecondaryItems,
- showSubitems,
- sortingMethod,
- toggleKeepInfoVisible,
- toggleShowPrimaryItems,
- toggleShowSecondaryItems,
- toggleShowSubitems,
- ]
- );
-
- const contentPanel = useMemo(
- () => (
-
- item.id}
- renderItem={({ item }) => (
- 0 &&
- item.attributes.metadata[0]
- ? [prettyItemSubType(item.attributes.metadata[0])]
- : []
- }
- bottomChips={item.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )}
- metadata={{
- releaseDate: item.attributes.release_date,
- price: item.attributes.price,
- position: "Bottom",
- }}
- infoAppend={
- !isUntangibleGroupItem(item.attributes.metadata?.[0]) && (
-
- )
- }
- />
- )}
- className={cJoin(
- "grid-cols-2 items-end",
- cIf(isContentPanelAtLeast4xl, "grid-cols-[repeat(auto-fill,_minmax(13rem,1fr))]")
- )}
- searchingTerm={searchName}
- sortingFunction={sortingFunction}
- groupingFunction={groupingFunction}
- searchingBy={(item) =>
- prettyInlineTitle("", item.attributes.title, item.attributes.subtitle)
- }
- filteringFunction={filteringFunction}
- paginationItemPerPage={25}
- />
-
- ),
- [
- filteringFunction,
- groupingFunction,
- isContentPanelAtLeast4xl,
- items,
- keepInfoVisible,
- searchName,
- sortingFunction,
- ]
- );
-
- return (
-
- );
-};
-export default Library;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const items = await sdk.getLibraryItemsPreview({
- language_code: context.locale ?? "en",
- });
- if (!items.libraryItems?.data) return { notFound: true };
-
- const props: Props = {
- items: items.libraryItems.data,
- openGraph: getOpenGraph(langui, langui.library ?? "Library"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx
deleted file mode 100644
index 389efc7..0000000
--- a/src/pages/merch/index.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import { GetStaticProps } from "next";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { Icon } from "components/Ico";
-import { getOpenGraph } from "helpers/openGraph";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {}
-const Merch = (props: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- return (
-
-
-
- }
- {...props}
- />
- );
-};
-export default Merch;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = (context) => {
- const langui = getLangui(context.locale);
- const props: Props = {
- openGraph: getOpenGraph(langui, langui.merch ?? "Merch"),
- };
- return {
- props: props,
- };
-};
diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx
deleted file mode 100644
index 67bd2fa..0000000
--- a/src/pages/news/[slug].tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { NextRouter, useRouter } from "next/router";
-import { PostPage } from "components/PostPage";
-import { getPostStaticProps, PostStaticProps } from "graphql/getPostStaticProps";
-import { getReadySdk } from "graphql/sdk";
-import { filterHasAttributes, isDefined, isDefinedAndNotEmpty } from "helpers/others";
-import { Terminal } from "components/Cli/Terminal";
-import { PostWithTranslations } from "types/types";
-import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
-import { prettyTerminalBoxedTitle } from "helpers/terminal";
-import { prettyMarkdown } from "helpers/description";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends PostStaticProps {}
-
-const LibrarySlug = (props: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const isTerminalMode = useAtomGetter(atoms.layout.terminalMode);
- const router = useRouter();
-
- if (isTerminalMode) {
- return (
-
- );
- }
-
- return (
-
- );
-};
-export default LibrarySlug;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const slug =
- context.params && isDefined(context.params.slug) ? context.params.slug.toString() : "";
- return await getPostStaticProps(slug)(context);
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const posts = await sdk.getPostsSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
-
- filterHasAttributes(posts.posts?.data, ["attributes"] as const).map((item) => {
- context.locales?.map((local) =>
- paths.push({ params: { slug: item.attributes.slug }, locale: local })
- );
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
-
-const terminalPostPage = (post: PostWithTranslations, router: NextRouter): string => {
- let result = "";
- if (router.locales && router.locale) {
- const selectedTranslation = staticSmartLanguage({
- items: filterHasAttributes(post.translations, ["language.data.attributes.code"] as const),
- languageExtractor: (item) => item.language.data.attributes.code,
- preferredLanguages: getDefaultPreferredLanguages(router.locale, router.locales),
- });
-
- if (selectedTranslation) {
- result += prettyTerminalBoxedTitle(selectedTranslation.title);
- if (isDefinedAndNotEmpty(selectedTranslation.excerpt)) {
- result += "\n\n";
- result += prettyMarkdown(selectedTranslation.excerpt);
- }
- if (isDefinedAndNotEmpty(selectedTranslation.body)) {
- result += "\n\n";
- result += prettyMarkdown(selectedTranslation.body);
- }
- }
- }
-
- result += "\n\n";
-
- return result;
-};
diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx
deleted file mode 100644
index 9eb8523..0000000
--- a/src/pages/news/index.tsx
+++ /dev/null
@@ -1,206 +0,0 @@
-import { GetStaticProps } from "next";
-import { useMemo, useState } from "react";
-import { useBoolean } from "usehooks-ts";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Switch } from "components/Inputs/Switch";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import { GetPostsPreviewQuery } from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { prettySlug } from "helpers/formatters";
-import { Icon } from "components/Ico";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { TextInput } from "components/Inputs/TextInput";
-import { Button } from "components/Inputs/Button";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { filterHasAttributes, isDefinedAndNotEmpty } from "helpers/others";
-import { SmartList } from "components/SmartList";
-import { getOpenGraph } from "helpers/openGraph";
-import { compareDate } from "helpers/date";
-import { TranslatedPreviewCard } from "components/PreviewCard";
-import { HorizontalLine } from "components/HorizontalLine";
-import { cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { sendAnalytics } from "helpers/analytics";
-import { Terminal } from "components/Cli/Terminal";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- searchName: "",
- keepInfoVisible: true,
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- posts: NonNullable["data"];
-}
-
-const News = ({ posts, ...otherProps }: Props): JSX.Element => {
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
- const langui = useAtomGetter(atoms.localData.langui);
- const hoverable = useDeviceSupportsHover();
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
- const {
- value: keepInfoVisible,
- toggle: toggleKeepInfoVisible,
- setValue: setKeepInfoVisible,
- } = useBoolean(DEFAULT_FILTERS_STATE.keepInfoVisible);
- const isTerminalMode = useAtomGetter(atoms.layout.terminalMode);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
- {
- setSearchName(name);
- if (isDefinedAndNotEmpty(name)) {
- sendAnalytics("News", "Change search term");
- } else {
- sendAnalytics("News", "Clear search term");
- }
- }}
- />
-
- {hoverable && (
-
- {
- toggleKeepInfoVisible();
- sendAnalytics("News", `Always ${keepInfoVisible ? "hide" : "show"} info`);
- }}
- />
-
- )}
-
- {
- setSearchName(DEFAULT_FILTERS_STATE.searchName);
- setKeepInfoVisible(DEFAULT_FILTERS_STATE.keepInfoVisible);
- sendAnalytics("News", "Reset all filters");
- }}
- />
-
- ),
- [hoverable, keepInfoVisible, langui, searchName, setKeepInfoVisible, toggleKeepInfoVisible]
- );
-
- const contentPanel = useMemo(
- () => (
-
- post.id}
- renderItem={({ item: post }) => (
- ({
- language: translation.language.data.attributes.code,
- title: translation.title,
- description: translation.excerpt,
- }))}
- fallback={{ title: prettySlug(post.attributes.slug) }}
- thumbnail={post.attributes.thumbnail?.data?.attributes}
- thumbnailAspectRatio="3/2"
- thumbnailForceAspectRatio
- bottomChips={post.attributes.categories?.data.map(
- (category) => category.attributes?.short ?? ""
- )}
- keepInfoVisible={keepInfoVisible}
- metadata={{
- releaseDate: post.attributes.date,
- releaseDateFormat: "long",
- position: "Top",
- }}
- />
- )}
- className={cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-4 gap-y-6"
- )}
- searchingTerm={searchName}
- searchingBy={(post) =>
- `${prettySlug(post.attributes.slug)} ${post.attributes.translations
- ?.map((translation) => translation?.title)
- .join(" ")}`
- }
- paginationItemPerPage={25}
- />
-
- ),
- [keepInfoVisible, posts, searchName, isContentPanelAtLeast4xl]
- );
-
- if (isTerminalMode) {
- return (
- post.attributes.slug
- )}
- />
- );
- }
-
- return (
-
- );
-};
-export default News;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const posts = await sdk.getPostsPreview();
- if (!posts.posts) return { notFound: true };
-
- const props: Props = {
- posts: sortPosts(posts.posts.data),
- openGraph: getOpenGraph(langui, langui.news ?? "News"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-const sortPosts = (posts: Props["posts"]): Props["posts"] =>
- posts.sort((a, b) => compareDate(a.attributes?.date, b.attributes?.date)).reverse();
diff --git a/src/pages/wiki/[slug]/index.tsx b/src/pages/wiki/[slug]/index.tsx
deleted file mode 100644
index 3781a76..0000000
--- a/src/pages/wiki/[slug]/index.tsx
+++ /dev/null
@@ -1,318 +0,0 @@
-import { useCallback, useMemo } from "react";
-import { GetStaticPaths, GetStaticPathsResult, GetStaticProps } from "next";
-import { useRouter } from "next/router";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { Chip } from "components/Chip";
-import { HorizontalLine } from "components/HorizontalLine";
-import { Img } from "components/Img";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import DefinitionCard from "components/Wiki/DefinitionCard";
-import { getReadySdk } from "graphql/sdk";
-import { filterHasAttributes, isDefined, isDefinedAndNotEmpty } from "helpers/others";
-import { WikiPageWithTranslations } from "types/types";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { prettySlug, sJoin } from "helpers/formatters";
-import { ImageQuality } from "helpers/img";
-import { getOpenGraph } from "helpers/openGraph";
-import { getDefaultPreferredLanguages, staticSmartLanguage } from "helpers/locales";
-import { getDescription } from "helpers/description";
-import { cIf, cJoin } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { Terminal } from "components/Cli/Terminal";
-import { prettyTerminalBoxedTitle, prettyTerminalUnderlinedTitle } from "helpers/terminal";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- page: WikiPageWithTranslations;
-}
-
-const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const router = useRouter();
- const isTerminalMode = useAtomGetter(atoms.layout.terminalMode);
- const { showLightBox } = useAtomGetter(atoms.lightBox);
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
- items: page.translations,
- languageExtractor: useCallback(
- (item: NonNullable) =>
- item.language?.data?.attributes?.code,
- []
- ),
- });
- const is3ColumnsLayout = useAtomGetter(atoms.containerQueries.is3ColumnsLayout);
-
- const subPanel = useMemo(
- () => (
-
-
-
- ),
- [langui]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
-
-
{selectedTranslation?.title}
- {selectedTranslation?.aliases && selectedTranslation.aliases.length > 0 && (
-
- {`(${selectedTranslation.aliases.map((alias) => alias?.alias).join("・")})`}
-
- )}
-
-
-
- {selectedTranslation && (
- <>
-
-
-
- {page.thumbnail?.data?.attributes && (
-
{
- if (page.thumbnail?.data?.attributes) {
- showLightBox([page.thumbnail.data.attributes]);
- }
- }}
- />
- )}
-
- {page.categories?.data && page.categories.data.length > 0 && (
- <>
-
{langui.categories}
-
-
- {filterHasAttributes(page.categories.data, ["attributes"] as const).map(
- (category) => (
-
- )
- )}
-
- >
- )}
-
- {page.tags?.data && page.tags.data.length > 0 && (
- <>
-
{langui.tags}
-
- {filterHasAttributes(page.tags.data, ["attributes"] as const).map((tag) => (
-
- ))}
-
- >
- )}
-
-
-
- {isDefinedAndNotEmpty(selectedTranslation.summary) && (
-
-
{langui.summary}
-
{selectedTranslation.summary}
-
- )}
-
- {filterHasAttributes(page.definitions, ["translations"] as const).map(
- (definition, index) => (
-
- ({
- language: translation?.language?.data?.attributes?.code,
- definition: translation?.definition,
- status: translation?.status,
- }))}
- index={index + 1}
- categories={filterHasAttributes(definition.categories?.data, [
- "attributes",
- ] as const).map((category) => category.attributes.short)}
- />
-
- )
- )}
-
- >
- )}
-
- ),
- [
- LanguageSwitcher,
- is3ColumnsLayout,
- languageSwitcherProps,
- langui.categories,
- langui.summary,
- langui.tags,
- langui.wiki,
- page.categories?.data,
- page.definitions,
- page.tags?.data,
- page.thumbnail?.data?.attributes,
- selectedTranslation,
- showLightBox,
- ]
- );
-
- if (isTerminalMode) {
- return (
- 0
- ? ` (${selectedTranslation.aliases.map((alias) => alias?.alias).join(", ")})`
- : ""
- }`
- )}${
- isDefinedAndNotEmpty(selectedTranslation?.summary)
- ? `${prettyTerminalUnderlinedTitle(langui.summary)}${selectedTranslation?.summary}`
- : ""
- }${
- page.definitions && page.definitions.length > 0
- ? `${filterHasAttributes(page.definitions, ["translations"] as const).map(
- (definition, index) =>
- `${prettyTerminalUnderlinedTitle(`${langui.definition} ${index + 1}`)}${
- staticSmartLanguage({
- items: filterHasAttributes(definition.translations, [
- "language.data.attributes.code",
- ] as const),
- languageExtractor: (item) => item.language.data.attributes.code,
- preferredLanguages: getDefaultPreferredLanguages(
- router.locale ?? "en",
- router.locales ?? ["en"]
- ),
- })?.definition
- }`
- )}`
- : ""
- }${
- isDefinedAndNotEmpty(selectedTranslation?.body?.body)
- ? `\n\n${selectedTranslation?.body?.body}`
- : "\n"
- }`}
- />
- );
- }
-
- return ;
-};
-export default WikiPage;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const slug =
- context.params && isDefined(context.params.slug) ? context.params.slug.toString() : "";
- const page = await sdk.getWikiPage({
- language_code: context.locale ?? "en",
- slug: slug,
- });
- if (!page.wikiPages?.data[0]?.attributes?.translations) return { notFound: true };
-
- const { title, description } = (() => {
- const chipsGroups = {
- [langui.tags ?? "Tags"]: filterHasAttributes(page.wikiPages.data[0].attributes.tags?.data, [
- "attributes",
- ] as const).map(
- (tag) => tag.attributes.titles?.[0]?.title ?? prettySlug(tag.attributes.slug)
- ),
- [langui.categories ?? "Categories"]: filterHasAttributes(
- page.wikiPages.data[0].attributes.categories?.data,
- ["attributes"] as const
- ).map((category) => category.attributes.short),
- };
-
- if (context.locale && context.locales) {
- const selectedTranslation = staticSmartLanguage({
- items: page.wikiPages.data[0].attributes.translations,
- languageExtractor: (item) => item.language?.data?.attributes?.code,
- preferredLanguages: getDefaultPreferredLanguages(context.locale, context.locales),
- });
- if (selectedTranslation) {
- return {
- title: selectedTranslation.title,
- description: getDescription(selectedTranslation.summary, chipsGroups),
- };
- }
- }
-
- return {
- title: prettySlug(page.wikiPages.data[0].attributes.slug),
- description: getDescription(undefined, chipsGroups),
- };
- })();
-
- const thumbnail = page.wikiPages.data[0].attributes.thumbnail?.data?.attributes;
-
- const props: Props = {
- page: page.wikiPages.data[0].attributes as WikiPageWithTranslations,
- openGraph: getOpenGraph(langui, title, description, thumbnail),
- };
- return {
- props: props,
- };
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-export const getStaticPaths: GetStaticPaths = async (context) => {
- const sdk = getReadySdk();
- const contents = await sdk.getWikiPagesSlugs();
- const paths: GetStaticPathsResult["paths"] = [];
- filterHasAttributes(contents.wikiPages?.data, ["attributes"] as const).map((wikiPage) => {
- context.locales?.map((local) =>
- paths.push({
- params: { slug: wikiPage.attributes.slug },
- locale: local,
- })
- );
- });
- return {
- paths,
- fallback: "blocking",
- };
-};
diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx
deleted file mode 100644
index d164917..0000000
--- a/src/pages/wiki/chronology.tsx
+++ /dev/null
@@ -1,393 +0,0 @@
-import { GetStaticProps } from "next";
-import { Fragment, useCallback, useMemo } from "react";
-import { useRouter } from "next/router";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { InsetBox } from "components/Containers/InsetBox";
-import { ReturnButton } from "components/PanelComponents/ReturnButton";
-import { ContentPanel } from "components/Containers/ContentPanel";
-import { SubPanel } from "components/Containers/SubPanel";
-import {
- Enum_Componenttranslationschronologyitem_Status,
- GetChronologyItemsQuery,
- GetErasQuery,
-} from "graphql/generated";
-import { getReadySdk } from "graphql/sdk";
-import { prettySlug } from "helpers/formatters";
-import {
- filterHasAttributes,
- getStatusDescription,
- isDefined,
- isDefinedAndNotEmpty,
-} from "helpers/others";
-import { getOpenGraph } from "helpers/openGraph";
-import { useSmartLanguage } from "hooks/useSmartLanguage";
-import { ToolTip } from "components/ToolTip";
-import { Chip } from "components/Chip";
-import { Ico, Icon } from "components/Ico";
-import { AnchorShare } from "components/AnchorShare";
-import { datePickerToDate } from "helpers/date";
-import { TranslatedProps } from "types/TranslatedProps";
-import { TranslatedNavOption } from "components/PanelComponents/NavOption";
-import { useIntersectionList } from "hooks/useIntersectionList";
-import { HorizontalLine } from "components/HorizontalLine";
-import { getLangui } from "graphql/fetchLocalData";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- chronologyItems: NonNullable["data"];
- chronologyEras: NonNullable["data"];
-}
-
-const Chronology = ({ chronologyItems, chronologyEras, ...otherProps }: Props): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const ids = useMemo(
- () =>
- filterHasAttributes(chronologyEras, ["attributes"] as const).map(
- (era) => era.attributes.slug
- ),
- [chronologyEras]
- );
-
- const currentIntersection = useIntersectionList(ids);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
- {filterHasAttributes(chronologyEras, ["attributes", "id"] as const).map((era, index) => (
-
- ({
- language: translation.language.data.attributes.code,
- title: translation.title,
- subtitle: `${era.attributes.starting_year} → ${era.attributes.ending_year}`,
- }))}
- fallback={{
- title: prettySlug(era.attributes.slug),
- subtitle: `${era.attributes.starting_year} → ${era.attributes.ending_year}`,
- }}
- url={`#${era.attributes.slug}`}
- border
- active={currentIntersection === index}
- />
-
- ))}
-
- ),
- [chronologyEras, currentIntersection, langui]
- );
-
- const contentPanel = useMemo(
- () => (
-
-
-
- {filterHasAttributes(chronologyEras, ["attributes"] as const).map((era) => (
- ({
- language: translation.language.data.attributes.code,
- title: translation.title,
- description: translation.description,
- }))}
- fallback={{ title: prettySlug(era.attributes.slug) }}
- chronologyItems={filterHasAttributes(chronologyItems, ["attributes"] as const).filter(
- (item) =>
- item.attributes.year >= era.attributes.starting_year &&
- item.attributes.year < era.attributes.ending_year
- )}
- />
- ))}
-
- ),
- [chronologyEras, chronologyItems, langui]
- );
-
- return ;
-};
-export default Chronology;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const chronologyItems = await sdk.getChronologyItems();
- const chronologyEras = await sdk.getEras();
- if (!chronologyItems.chronologyItems || !chronologyEras.chronologyEras) return { notFound: true };
-
- const props: Props = {
- chronologyItems: chronologyItems.chronologyItems.data,
- chronologyEras: chronologyEras.chronologyEras.data,
- openGraph: getOpenGraph(langui, langui.chronology ?? "Chronology"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ PRIVATE COMPONENTS ╰──────────────────────────────────────
- */
-
-interface ChronologyEraProps {
- id: string;
- title: string;
- description?: string | null | undefined;
- chronologyItems: Props["chronologyItems"];
-}
-
-const ChronologyEra = ({ id, title, description, chronologyItems }: ChronologyEraProps) => {
- const yearGroups = useMemo(() => {
- const memo: Props["chronologyItems"][] = [];
- let currentYear = -Infinity;
- filterHasAttributes(chronologyItems, ["attributes"] as const).forEach((item) => {
- if (currentYear === item.attributes.year) {
- memo[memo.length - 1].push(item);
- } else {
- currentYear = item.attributes.year;
- memo.push([item]);
- }
- });
- return memo;
- }, [chronologyItems]);
-
- return (
-
-
-
- {title}
-
-
-
- {isDefinedAndNotEmpty(description) && {description}
}
-
-
- {yearGroups.map((item, index) => (
-
- ))}
-
-
- );
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-const TranslatedChronologyEra = ({
- translations,
- fallback,
- ...otherProps
-}: TranslatedProps[0], "description" | "title">): JSX.Element => {
- const [selectedTranslation] = useSmartLanguage({
- items: translations,
- languageExtractor: (item: { language: string }): string => item.language,
- });
-
- return (
-
- );
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-interface ChronologyYearProps {
- items: NonNullable;
-}
-
-const ChronologyYear = ({ items }: ChronologyYearProps) => (
-
- {filterHasAttributes(items, ["attributes.events"] as const).map((item, index) => (
-
- ))}
-
-);
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-interface ChronologyDateProps {
- date: {
- year: number;
- month: number | null | undefined;
- day: number | null | undefined;
- displayYear: boolean;
- overwriteYear?: string | null | undefined;
- };
- events: NonNullable<
- NonNullable[number]["attributes"]>["events"]
- >;
-}
-
-export const ChronologyDate = ({ date, events }: ChronologyDateProps): JSX.Element => {
- const router = useRouter();
- return (
-
- {date.displayYear && (
-
- {isDefinedAndNotEmpty(date.overwriteYear) ? date.overwriteYear : date.year}
-
- )}
-
-
- {isDefined(date.month)
- ? isDefined(date.day)
- ? datePickerToDate({
- year: date.year,
- month: date.month,
- day: date.day,
- }).toLocaleDateString(router.locale, {
- month: "short",
- day: "numeric",
- })
- : datePickerToDate({
- year: date.year,
- month: date.month,
- day: date.day,
- }).toLocaleDateString(router.locale, {
- month: "short",
- })
- : ""}
-
-
-
- {filterHasAttributes(events, ["id", "translations"] as const).map((event) => (
-
- ))}
-
-
- );
-};
-
-// ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
-
-interface ChronologyEventProps {
- event: NonNullable<
- NonNullable<
- NonNullable[number]["attributes"]>["events"]
- >[number]
- >;
-
- id: string;
-}
-
-export const ChronologyEvent = ({ event, id }: ChronologyEventProps): JSX.Element => {
- const langui = useAtomGetter(atoms.localData.langui);
- const [selectedTranslation, LanguageSwitcher, languageSwitcherProps] = useSmartLanguage({
- items: event.translations ?? [],
- languageExtractor: useCallback(
- (item: NonNullable[number]) =>
- item?.language?.data?.attributes?.code,
- []
- ),
- });
-
- return (
-
- {selectedTranslation && (
- <>
-
-
-
- {selectedTranslation.status !==
- Enum_Componenttranslationschronologyitem_Status.Done && (
-
-
-
- )}
-
-
- {event.source?.data ? (
- `(${event.source.data.attributes?.name})`
- ) : (
-
-
- {langui.no_source_warning}
-
- )}
-
-
-
-
-
-
-
- {selectedTranslation.title && (
-
-
{selectedTranslation.title}
-
- )}
-
- {selectedTranslation.description && (
-
{selectedTranslation.description}
- )}
-
- {selectedTranslation.note &&
{`${langui.notes}: ${selectedTranslation.note}`} }
- >
- )}
-
- );
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-const generateAnchor = (
- year: number | undefined,
- month?: number | null | undefined,
- day?: number | null | undefined
-): string => {
- let result = "";
- if (isDefined(year)) result += year;
- if (isDefined(month)) result += `-${month.toString().padStart(2, "0")}`;
- if (isDefined(day)) result += `-${day.toString().padStart(2, "0")}`;
- return result;
-};
diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx
deleted file mode 100644
index 86f4b09..0000000
--- a/src/pages/wiki/index.tsx
+++ /dev/null
@@ -1,289 +0,0 @@
-import { GetStaticProps } from "next";
-import { useCallback, useMemo, useState } from "react";
-import { useBoolean } from "usehooks-ts";
-import { AppLayout, AppLayoutRequired } from "components/AppLayout";
-import { NavOption } from "components/PanelComponents/NavOption";
-import { PanelHeader } from "components/PanelComponents/PanelHeader";
-import { SubPanel } from "components/Containers/SubPanel";
-import { Icon } from "components/Ico";
-import { getReadySdk } from "graphql/sdk";
-import { GetWikiPageQuery, GetWikiPagesPreviewsQuery } from "graphql/generated";
-import { ContentPanel, ContentPanelWidthSizes } from "components/Containers/ContentPanel";
-import { HorizontalLine } from "components/HorizontalLine";
-import { Button } from "components/Inputs/Button";
-import { Switch } from "components/Inputs/Switch";
-import { TextInput } from "components/Inputs/TextInput";
-import { WithLabel } from "components/Inputs/WithLabel";
-import { useDeviceSupportsHover } from "hooks/useMediaQuery";
-import { filterDefined, filterHasAttributes, isDefinedAndNotEmpty } from "helpers/others";
-import { SmartList } from "components/SmartList";
-import { Select } from "components/Inputs/Select";
-import { SelectiveNonNullable } from "types/SelectiveNonNullable";
-import { prettySlug } from "helpers/formatters";
-import { getOpenGraph } from "helpers/openGraph";
-import { TranslatedPreviewCard } from "components/PreviewCard";
-import { cIf } from "helpers/className";
-import { getLangui } from "graphql/fetchLocalData";
-import { sendAnalytics } from "helpers/analytics";
-import { Terminal } from "components/Cli/Terminal";
-import { atoms } from "contexts/atoms";
-import { useAtomGetter } from "helpers/atoms";
-
-/*
- * ╭─────────────╮
- * ────────────────────────────────────────╯ CONSTANTS ╰──────────────────────────────────────────
- */
-
-const DEFAULT_FILTERS_STATE = {
- searchName: "",
- keepInfoVisible: true,
- groupingMethod: -1,
-};
-
-/*
- * ╭────────╮
- * ──────────────────────────────────────────╯ PAGE ╰─────────────────────────────────────────────
- */
-
-interface Props extends AppLayoutRequired {
- pages: NonNullable["data"];
-}
-
-const Wiki = ({ pages, ...otherProps }: Props): JSX.Element => {
- const hoverable = useDeviceSupportsHover();
- const langui = useAtomGetter(atoms.localData.langui);
- const isContentPanelAtLeast4xl = useAtomGetter(atoms.containerQueries.isContentPanelAtLeast4xl);
- const isTerminalMode = useAtomGetter(atoms.layout.terminalMode);
-
- const [searchName, setSearchName] = useState(DEFAULT_FILTERS_STATE.searchName);
-
- const [groupingMethod, setGroupingMethod] = useState(
- DEFAULT_FILTERS_STATE.groupingMethod
- );
-
- const {
- value: keepInfoVisible,
- toggle: toggleKeepInfoVisible,
- setValue: setKeepInfoVisible,
- } = useBoolean(DEFAULT_FILTERS_STATE.keepInfoVisible);
-
- const subPanel = useMemo(
- () => (
-
-
-
-
-
- {
- setSearchName(name);
- if (isDefinedAndNotEmpty(name)) {
- sendAnalytics("Wiki", "Change search term");
- } else {
- sendAnalytics("Wiki", "Clear search term");
- }
- }}
- />
-
-
- {
- setGroupingMethod(value);
- sendAnalytics("Wiki", `Change grouping method (${["none", "category"][value + 1]})`);
- }}
- allowEmpty
- />
-
-
- {hoverable && (
-
- {
- toggleKeepInfoVisible();
- sendAnalytics("Wiki", `Always ${keepInfoVisible ? "hide" : "show"} info`);
- }}
- />
-
- )}
-
- {
- setSearchName(DEFAULT_FILTERS_STATE.searchName);
- setGroupingMethod(DEFAULT_FILTERS_STATE.groupingMethod);
- setKeepInfoVisible(DEFAULT_FILTERS_STATE.keepInfoVisible);
- sendAnalytics("Wiki", "Reset all filters");
- }}
- />
-
-
-
- {langui.special_pages}
-
-
-
- ),
- [
- groupingMethod,
- hoverable,
- keepInfoVisible,
- langui,
- searchName,
- setKeepInfoVisible,
- toggleKeepInfoVisible,
- ]
- );
-
- const groupingFunction = useCallback(
- (
- item: SelectiveNonNullable<
- NonNullable["data"][number],
- "attributes" | "id"
- >
- ): string[] => {
- switch (groupingMethod) {
- case 0: {
- const categories = filterHasAttributes(item.attributes.categories?.data, [
- "attributes",
- ] as const);
- if (categories.length > 0) {
- return categories.map((category) => category.attributes.name);
- }
- return [langui.no_category ?? "No category"];
- }
- default: {
- return [""];
- }
- }
- },
- [groupingMethod, langui]
- );
-
- const contentPanel = useMemo(
- () => (
-
- item.id}
- renderItem={({ item }) => (
- ({
- title: translation.title,
- subtitle:
- translation.aliases && translation.aliases.length > 0
- ? translation.aliases.map((alias) => alias?.alias).join("・")
- : undefined,
- description: translation.summary,
- language: translation.language.data.attributes.code,
- }))}
- fallback={{ title: prettySlug(item.attributes.slug) }}
- thumbnail={item.attributes.thumbnail?.data?.attributes}
- thumbnailAspectRatio={"4/3"}
- thumbnailRounded
- thumbnailForceAspectRatio
- keepInfoVisible={keepInfoVisible}
- topChips={filterHasAttributes(item.attributes.tags?.data, [
- "attributes",
- ] as const).map(
- (tag) => tag.attributes.titles?.[0]?.title ?? prettySlug(tag.attributes.slug)
- )}
- bottomChips={filterHasAttributes(item.attributes.categories?.data, [
- "attributes",
- ] as const).map((category) => category.attributes.short)}
- />
- )}
- className={cIf(
- isContentPanelAtLeast4xl,
- "grid-cols-[repeat(auto-fill,minmax(15rem,1fr))] gap-x-6 gap-y-8",
- "grid-cols-2 gap-x-3 gap-y-5"
- )}
- searchingTerm={searchName}
- searchingBy={(item) =>
- filterDefined(item.attributes.translations)
- .map(
- (translation) =>
- `${translation.title} ${filterDefined(translation.aliases)
- .map((alias) => alias.alias)
- .join(" ")}`
- )
- .join(" ")
- }
- groupingFunction={groupingFunction}
- paginationItemPerPage={25}
- />
-
- ),
- [groupingFunction, keepInfoVisible, pages, searchName, isContentPanelAtLeast4xl]
- );
-
- if (isTerminalMode) {
- return (
- page.attributes.slug
- )}
- />
- );
- }
-
- return (
-
- );
-};
-export default Wiki;
-
-/*
- * ╭──────────────────────╮
- * ───────────────────────────────────╯ NEXT DATA FETCHING ╰──────────────────────────────────────
- */
-
-export const getStaticProps: GetStaticProps = async (context) => {
- const sdk = getReadySdk();
- const langui = getLangui(context.locale);
- const pages = await sdk.getWikiPagesPreviews({
- language_code: context.locale ?? "en",
- });
- if (!pages.wikiPages?.data) return { notFound: true };
-
- const props: Props = {
- pages: sortPages(pages.wikiPages.data),
- openGraph: getOpenGraph(langui, langui.wiki ?? "Wiki"),
- };
- return {
- props: props,
- };
-};
-
-/*
- * ╭───────────────────╮
- * ─────────────────────────────────────╯ PRIVATE METHODS ╰───────────────────────────────────────
- */
-
-const sortPages = (pages: Props["pages"]): Props["pages"] =>
- pages.sort((a, b) => {
- const slugA = a.attributes?.slug ?? "";
- const slugB = b.attributes?.slug ?? "";
- return slugA.localeCompare(slugB);
- });
diff --git a/src/styles/others.css b/src/styles/others.css
index 354d548..7270abc 100644
--- a/src/styles/others.css
+++ b/src/styles/others.css
@@ -2,10 +2,6 @@
@tailwind components;
@tailwind utilities;
-#__next {
- @apply bg-light font-body font-medium text-black;
-}
-
* {
@apply box-border scroll-m-[40vh] scroll-smooth scrollbar-thin ![-webkit-tap-highlight-color:transparent];
}
diff --git a/src/types/next.d.ts b/src/types/next.d.ts
new file mode 100644
index 0000000..e8e2db6
--- /dev/null
+++ b/src/types/next.d.ts
@@ -0,0 +1,20 @@
+export {};
+
+declare global {
+ type Params = Record;
+ type SearchParams = Record;
+
+ type Layout = (props: { children: React.ReactNode; params: Params }) => JSX.Element;
+ type Template = Layout;
+
+ type Page = (props: { params: Params; searchParams: SearchParams }) => JSX.Element;
+
+ type Loading = () => JSX.Element;
+ type NotFound = () => Loading;
+
+ type Head = (props: { params: Params }) => JSX.Element;
+
+ type Error = (props: { error: Error; reset: () => void }) => JSX.Element;
+
+ type GenerateStaticParams = () => Record[];
+}
diff --git a/tsconfig.json b/tsconfig.json
index 5fb3c5d..f0083d6 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "ES6",
- "lib": ["dom", "dom.iterable", "esnext"],
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext"
+ ],
"importHelpers": true,
"allowJs": true,
"skipLibCheck": true,
@@ -17,7 +21,20 @@
"incremental": true,
"baseUrl": "src"
// "noUncheckedIndexedAccess": true
+ ,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ]
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
- "exclude": ["node_modules"]
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
}