Updated deps
This commit is contained in:
parent
da916f898a
commit
34c4570688
|
@ -161,7 +161,6 @@ module.exports = {
|
||||||
"@typescript-eslint/no-invalid-void-type": "error",
|
"@typescript-eslint/no-invalid-void-type": "error",
|
||||||
"@typescript-eslint/no-meaningless-void-operator": "error",
|
"@typescript-eslint/no-meaningless-void-operator": "error",
|
||||||
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
||||||
"@typescript-eslint/no-parameter-properties": "error",
|
|
||||||
"@typescript-eslint/no-require-imports": "error",
|
"@typescript-eslint/no-require-imports": "error",
|
||||||
// "@typescript-eslint/no-type-alias": "warn",
|
// "@typescript-eslint/no-type-alias": "warn",
|
||||||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
|
||||||
|
@ -182,7 +181,6 @@ module.exports = {
|
||||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||||
"@typescript-eslint/promise-function-async": "error",
|
"@typescript-eslint/promise-function-async": "error",
|
||||||
"@typescript-eslint/require-array-sort-compare": "error",
|
"@typescript-eslint/require-array-sort-compare": "error",
|
||||||
"@typescript-eslint/sort-type-union-intersection-members": "warn",
|
|
||||||
// "@typescript-eslint/strict-boolean-expressions": [
|
// "@typescript-eslint/strict-boolean-expressions": [
|
||||||
// "error",
|
// "error",
|
||||||
// { allowAny: true },
|
// { allowAny: true },
|
||||||
|
@ -192,7 +190,6 @@ module.exports = {
|
||||||
"@typescript-eslint/unified-signatures": "error",
|
"@typescript-eslint/unified-signatures": "error",
|
||||||
|
|
||||||
/* EXTENSION OF ESLINT */
|
/* EXTENSION OF ESLINT */
|
||||||
"@typescript-eslint/no-duplicate-imports": "error",
|
|
||||||
"@typescript-eslint/default-param-last": "warn",
|
"@typescript-eslint/default-param-last": "warn",
|
||||||
"@typescript-eslint/dot-notation": "warn",
|
"@typescript-eslint/dot-notation": "warn",
|
||||||
"@typescript-eslint/init-declarations": "warn",
|
"@typescript-eslint/init-declarations": "warn",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
76
package.json
76
package.json
|
@ -21,40 +21,40 @@
|
||||||
"upgrade": "ncu"
|
"upgrade": "ncu"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/noto-serif-jp": "^5.0.2",
|
"@fontsource/noto-serif-jp": "^5.0.7",
|
||||||
"@fontsource/opendyslexic": "^5.0.2",
|
"@fontsource/opendyslexic": "^5.0.7",
|
||||||
"@fontsource/share-tech-mono": "^5.0.2",
|
"@fontsource/share-tech-mono": "^5.0.8",
|
||||||
"@fontsource/vollkorn": "^5.0.2",
|
"@fontsource/vollkorn": "^5.0.9",
|
||||||
"@fontsource/zen-maru-gothic": "^5.0.2",
|
"@fontsource/zen-maru-gothic": "^5.0.7",
|
||||||
"@formatjs/icu-messageformat-parser": "^2.4.0",
|
"@formatjs/icu-messageformat-parser": "^2.6.0",
|
||||||
"@tippyjs/react": "^4.2.6",
|
"@tippyjs/react": "^4.2.6",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.15",
|
||||||
"cuid": "^2.1.8",
|
"cuid": "^2.1.8",
|
||||||
"html-to-text": "^9.0.5",
|
"html-to-text": "^9.0.5",
|
||||||
"intl-messageformat": "^10.3.5",
|
"intl-messageformat": "^10.5.0",
|
||||||
"isomorphic-dompurify": "^1.6.0",
|
"isomorphic-dompurify": "^1.8.0",
|
||||||
"jotai": "^2.1.1",
|
"jotai": "^2.3.1",
|
||||||
"markdown-to-jsx": "^7.2.1",
|
"markdown-to-jsx": "^7.3.2",
|
||||||
"marked": "^4.3.0",
|
"marked": "^7.0.3",
|
||||||
"material-symbols": "^0.5.5",
|
"material-symbols": "^0.10.4",
|
||||||
"meilisearch": "^0.33.0",
|
"meilisearch": "^0.34.1",
|
||||||
"next": "^13.4.4",
|
"next": "^13.4.17",
|
||||||
"nodemailer": "^6.9.3",
|
"nodemailer": "^6.9.4",
|
||||||
"patch-package": "^7.0.0",
|
"patch-package": "^8.0.0",
|
||||||
"rc-slider": "^10.2.0",
|
"rc-slider": "^10.2.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-collapsible": "^2.10.0",
|
"react-collapsible": "^2.10.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-hotkeys-hook": "^3.4.7",
|
"react-hotkeys-hook": "^3.4.7",
|
||||||
"react-swipeable": "^7.0.1",
|
"react-swipeable": "^7.0.1",
|
||||||
"react-zoom-pan-pinch": "^3.0.8",
|
"react-zoom-pan-pinch": "^3.1.0",
|
||||||
"string-natural-compare": "^3.0.1",
|
"string-natural-compare": "^3.0.1",
|
||||||
"throttle-debounce": "^5.0.0",
|
"throttle-debounce": "^5.0.0",
|
||||||
"tippy.js": "^6.3.7",
|
"tippy.js": "^6.3.7",
|
||||||
"turndown": "^7.1.2",
|
"turndown": "^7.1.2",
|
||||||
"ua-parser-js": "^1.0.35",
|
"ua-parser-js": "^1.0.35",
|
||||||
"usehooks-ts": "^2.9.1",
|
"usehooks-ts": "^2.9.1",
|
||||||
"zod": "^3.21.4"
|
"zod": "^3.22.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@digitak/esrun": "3.2.24",
|
"@digitak/esrun": "3.2.24",
|
||||||
|
@ -63,29 +63,29 @@
|
||||||
"@graphql-codegen/typescript-graphql-request": "^4.5.9",
|
"@graphql-codegen/typescript-graphql-request": "^4.5.9",
|
||||||
"@graphql-codegen/typescript-operations": "^3.0.4",
|
"@graphql-codegen/typescript-operations": "^3.0.4",
|
||||||
"@types/html-to-text": "^9.0.1",
|
"@types/html-to-text": "^9.0.1",
|
||||||
"@types/marked": "^4.3.0",
|
"@types/marked": "^5.0.1",
|
||||||
"@types/node": "20.2.5",
|
"@types/node": "20.5.0",
|
||||||
"@types/nodemailer": "^6.4.8",
|
"@types/nodemailer": "^6.4.9",
|
||||||
"@types/react": "^18.2.9",
|
"@types/react": "^18.2.20",
|
||||||
"@types/react-dom": "^18.2.4",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@types/string-natural-compare": "^3.0.2",
|
"@types/string-natural-compare": "^3.0.2",
|
||||||
"@types/throttle-debounce": "^5.0.0",
|
"@types/throttle-debounce": "^5.0.0",
|
||||||
"@types/turndown": "^5.0.1",
|
"@types/turndown": "^5.0.1",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
||||||
"@typescript-eslint/parser": "^5.59.9",
|
"@typescript-eslint/parser": "^6.4.0",
|
||||||
"chalk": "^5.2.0",
|
"chalk": "^5.3.0",
|
||||||
"dotenv": "^16.1.4",
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.42.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-next": "13.4.4",
|
"eslint-config-next": "13.4.17",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.28.0",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.6.0",
|
||||||
"graphql-request": "5.1.0",
|
"graphql-request": "5.1.0",
|
||||||
"next-sitemap": "^4.1.3",
|
"next-sitemap": "^4.2.2",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.2",
|
||||||
"prettier-plugin-tailwindcss": "^0.3.0",
|
"prettier-plugin-tailwindcss": "^0.5.3",
|
||||||
"tailwindcss": "^3.3.2",
|
"tailwindcss": "^3.3.3",
|
||||||
"ts-unused-exports": "^9.0.4",
|
"ts-unused-exports": "^10.0.0",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -19,10 +19,11 @@ interface Props {
|
||||||
export const ChroniclesLists = ({ chapters, currentChronicleSlug }: Props): JSX.Element => {
|
export const ChroniclesLists = ({ chapters, currentChronicleSlug }: Props): JSX.Element => {
|
||||||
const [openedIndex, setOpenedIndex] = useState(
|
const [openedIndex, setOpenedIndex] = useState(
|
||||||
currentChronicleSlug
|
currentChronicleSlug
|
||||||
? chapters.findIndex((chapter) =>
|
? chapters.findIndex(
|
||||||
chapter.attributes?.chronicles?.data.some(
|
(chapter) =>
|
||||||
(chronicle) => chronicle.attributes?.slug === currentChronicleSlug
|
chapter.attributes?.chronicles?.data.some(
|
||||||
)
|
(chronicle) => chronicle.attributes?.slug === currentChronicleSlug
|
||||||
|
)
|
||||||
)
|
)
|
||||||
: -1
|
: -1
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { TranslatedProps } from "types/TranslatedProps";
|
||||||
import { atoms } from "contexts/atoms";
|
import { atoms } from "contexts/atoms";
|
||||||
import { useAtomGetter } from "helpers/atoms";
|
import { useAtomGetter } from "helpers/atoms";
|
||||||
import { useFormat } from "hooks/useFormat";
|
import { useFormat } from "hooks/useFormat";
|
||||||
|
import { isDefined } from "helpers/asserts";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ╭─────────────╮
|
* ╭─────────────╮
|
||||||
|
@ -84,7 +85,7 @@ export const PreviewCard = ({
|
||||||
|
|
||||||
const metadataJSX = (
|
const metadataJSX = (
|
||||||
<>
|
<>
|
||||||
{metadata && (metadata.releaseDate || metadata.price) && (
|
{metadata && (isDefined(metadata.releaseDate) || isDefined(metadata.price)) && (
|
||||||
<div className="flex w-full flex-row flex-wrap gap-x-3">
|
<div className="flex w-full flex-row flex-wrap gap-x-3">
|
||||||
{metadata.releaseDate && (
|
{metadata.releaseDate && (
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { convert } from "html-to-text";
|
import { convert } from "html-to-text";
|
||||||
import { sanitize } from "isomorphic-dompurify";
|
import { sanitize } from "isomorphic-dompurify";
|
||||||
import { marked } from "marked";
|
import { Renderer, marked } from "marked";
|
||||||
import { isDefinedAndNotEmpty } from "./asserts";
|
import { isDefinedAndNotEmpty } from "./asserts";
|
||||||
|
|
||||||
export const prettySlug = (slug?: string, parentSlug?: string): string => {
|
export const prettySlug = (slug?: string, parentSlug?: string): string => {
|
||||||
|
@ -101,7 +101,7 @@ export const prettyMarkdown = (markdown: string): string => {
|
||||||
const newline = () => "\n";
|
const newline = () => "\n";
|
||||||
const empty = () => "";
|
const empty = () => "";
|
||||||
|
|
||||||
const TxtRenderer: marked.Renderer = {
|
const TxtRenderer: Renderer = {
|
||||||
// Block elements
|
// Block elements
|
||||||
code: escapeBlock,
|
code: escapeBlock,
|
||||||
blockquote: block,
|
blockquote: block,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
|
||||||
import { MeiliSearch } from "meilisearch";
|
import { MeiliSearch } from "meilisearch";
|
||||||
import type {
|
import type {
|
||||||
SearchParams,
|
SearchParams,
|
||||||
|
@ -73,7 +75,6 @@ export const filterHitsWithHighlight = <T extends MeiliDocumentsType["documents"
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
||||||
export const meiliSearch = async <I extends MeiliDocumentsType["index"]>(
|
export const meiliSearch = async <I extends MeiliDocumentsType["index"]>(
|
||||||
indexName: I,
|
indexName: I,
|
||||||
query: string,
|
query: string,
|
||||||
|
|
|
@ -190,7 +190,6 @@ const Contents = (props: Props): JSX.Element => {
|
||||||
|
|
||||||
{!is1ColumnLayout && <div className="mb-6">{searchInput}</div>}
|
{!is1ColumnLayout && <div className="mb-6">{searchInput}</div>}
|
||||||
|
|
||||||
|
|
||||||
<WithLabel label={format("order_by")}>
|
<WithLabel label={format("order_by")}>
|
||||||
<Select
|
<Select
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|
|
@ -807,9 +807,7 @@ const ContentItem = ({
|
||||||
<div className="grid grid-cols-[auto_auto_1fr_auto] items-center gap-3">
|
<div className="grid grid-cols-[auto_auto_1fr_auto] items-center gap-3">
|
||||||
<h3>{title}</h3>
|
<h3>{title}</h3>
|
||||||
<div className="flex flex-wrap place-content-center gap-1">
|
<div className="flex flex-wrap place-content-center gap-1">
|
||||||
{content?.categories?.map((category, index) => (
|
{content?.categories?.map((category, index) => <Chip key={index} text={category} />)}
|
||||||
<Chip key={index} text={category} />
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
<p className="h-4 w-full border-b-2 border-dotted border-mid" />
|
<p className="h-4 w-full border-b-2 border-dotted border-mid" />
|
||||||
{content?.type && <Chip className="justify-self-end" text={content.type} />}
|
{content?.type && <Chip className="justify-self-end" text={content.type} />}
|
||||||
|
|
|
@ -56,7 +56,7 @@ const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
|
||||||
const toc = getTocFromMarkdawn(selectedTranslation?.body?.body, selectedTranslation?.title);
|
const toc = getTocFromMarkdawn(selectedTranslation?.body?.body, selectedTranslation?.title);
|
||||||
|
|
||||||
const subPanel =
|
const subPanel =
|
||||||
toc || !is1ColumnLayout ? (
|
isDefined(toc) || !is1ColumnLayout ? (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ElementsSeparator>
|
<ElementsSeparator>
|
||||||
{[
|
{[
|
||||||
|
@ -204,18 +204,18 @@ const WikiPage = ({ page, ...otherProps }: Props): JSX.Element => {
|
||||||
page.definitions && page.definitions.length > 0
|
page.definitions && page.definitions.length > 0
|
||||||
? `${filterHasAttributes(page.definitions, ["translations"]).map(
|
? `${filterHasAttributes(page.definitions, ["translations"]).map(
|
||||||
(definition, index) =>
|
(definition, index) =>
|
||||||
`${prettyTerminalUnderlinedTitle(format("definition_x", { x: index + 1 }))}${
|
`${prettyTerminalUnderlinedTitle(
|
||||||
staticSmartLanguage({
|
format("definition_x", { x: index + 1 })
|
||||||
items: filterHasAttributes(definition.translations, [
|
)}${staticSmartLanguage({
|
||||||
"language.data.attributes.code",
|
items: filterHasAttributes(definition.translations, [
|
||||||
]),
|
"language.data.attributes.code",
|
||||||
languageExtractor: (item) => item.language.data.attributes.code,
|
]),
|
||||||
preferredLanguages: getDefaultPreferredLanguages(
|
languageExtractor: (item) => item.language.data.attributes.code,
|
||||||
router.locale ?? "en",
|
preferredLanguages: getDefaultPreferredLanguages(
|
||||||
router.locales ?? ["en"]
|
router.locale ?? "en",
|
||||||
),
|
router.locales ?? ["en"]
|
||||||
})?.definition
|
),
|
||||||
}`
|
})?.definition}`
|
||||||
)}`
|
)}`
|
||||||
: ""
|
: ""
|
||||||
}${
|
}${
|
||||||
|
|
Loading…
Reference in New Issue