diff --git a/components/MDXRoot.tsx b/components/MDXRoot.tsx index 84bb003..ea8bde4 100644 --- a/components/MDXRoot.tsx +++ b/components/MDXRoot.tsx @@ -1,4 +1,4 @@ -import MDXPageFactory from '@sup39/mdx-page'; +import {MDXPageFactory} from '@sup39/mdx-page'; import config from '#config'; export default MDXPageFactory(config); diff --git a/core/components/heading.tsx b/core/components/heading.tsx deleted file mode 100644 index b3cd81c..0000000 --- a/core/components/heading.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -const hx = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const; -export const anchoredHx = Object.fromEntries(hx.map(H => [ - H, - ({children, id, ...props}: React.ComponentProps<(typeof hx)[number]>) => ( - - {id && } - {children} - - ), -])); diff --git a/core/components/index.tsx b/core/components/index.tsx deleted file mode 100644 index 89caab1..0000000 --- a/core/components/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export * from './heading'; -export * from './tag'; - -import {anchoredHx} from './heading'; -const mdx = {...anchoredHx}; -export default mdx; diff --git a/core/components/tag.tsx b/core/components/tag.tsx deleted file mode 100644 index 56ba441..0000000 --- a/core/components/tag.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import React from 'react'; - -export type TagFactory = { - [modifier: string]: TagFactory - (children: React.ReactNode): JSX.Element - (s: TemplateStringsArray, ...argv: any[]): JSX.Element -}; - -export type TagInfo = { - tagName: string - attrs: Record -}; -export const AttrProxyHandler: ProxyHandler = { - get({tagName, attrs}, modifier) { - let extra: TagInfo['attrs']; - if (typeof modifier === 'symbol') { - extra = {}; - } else if (modifier.startsWith('#')) { - // #id - extra = {id: modifier.slice(1)}; - } else if (modifier.includes('=')) { - // attr=value - const idx = modifier.indexOf('='); - extra = {[modifier.slice(0, idx)]: modifier.slice(idx+1)}; - } else { - // .class - extra = {class: attrs.class ? attrs.class+' '+modifier : modifier}; - } - // apply - return new Proxy( - Object.assign(()=>{}, {tagName, attrs: {...attrs, ...extra}}), - AttrProxyHandler, - ); - }, - apply({ - tagName, - attrs: {class: className, for: htmlFor, style, ...attrs}, - }, thisArg, args) { - const [s, ...argv] = args; - const children = s instanceof Array ? - s[0]+argv.map((e, i) => `${e}${s[i+1]}`).join('') : s; - return React.createElement( - tagName, - { - className, - htmlFor, - ...(style == null ? {} : { - style: Object.fromEntries(style.split(';').flatMap(line => { - const idx = line.indexOf(':'); - if (idx < 0) return []; - const key0 = line.slice(0, idx); - const value = line.slice(idx+1); - // kebab-case to camelCase - const ktoks = key0.split('-'); - const key = ktoks[0] + ktoks.slice(1).map(s => s[0].toUpperCase()+s.slice(1)).join(''); - return [[key, value]]; - })), - }), - ...attrs, - }, - children, - ); - }, -}; - -export const TagProxyHandler: ProxyHandler> = { - get(self, arg) { - const tagName = arg.toString(); - return new Proxy( - Object.assign(()=>{}, {tagName, attrs: {}}), - AttrProxyHandler, - ); - }, -}; - -export const T = new Proxy({}, TagProxyHandler); -export const S = T.span; -export const C = T.code; -export const tags = {T, S, C}; diff --git a/core/nav/Nav.tsx b/core/nav/Nav.tsx deleted file mode 100644 index d505bca..0000000 --- a/core/nav/Nav.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import {useState} from 'react'; -import type {NavEntryInfo} from './NavEntry'; -import {NavBase, HeadingInfo} from './NavBase'; -import {NavHeader, NavHeaderConfig} from './NavHeader'; - -export type NavConfig = { - site: NavHeaderConfig - nav: NavEntryInfo[] -} -export type NavProps = { - children?: React.ReactNode - headings: HeadingInfo[] - pathname: string - config: NavConfig -}; - -export function Nav({config, children, ...props}: NavProps) { - const [navFold, setNavFold] = useState(false); - return ( - - setNavFold(e=>!e)} /> - {children} - - ); -} diff --git a/core/nav/NavBase.tsx b/core/nav/NavBase.tsx deleted file mode 100644 index 8f2938a..0000000 --- a/core/nav/NavBase.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import {NavEntry, NavEntryInfo} from './NavEntry'; - -export type HeadingInfo = { - tagName: string; - label: string; - id: string; -}; -export type NavBaseProps = { - children?: React.ReactNode - headings: HeadingInfo[] - pathname: string - entries: NavEntryInfo[] - className?: string -} - -export function NavBase({ - children, headings, pathname, entries, className, -}: NavBaseProps) { - const headingsJSX = {headings.map(({label, id}) => - {label} - )}; - - return - {children} - - {entries.map(entry => )} - {headingsJSX} - - ; -} diff --git a/core/nav/NavEntry.tsx b/core/nav/NavEntry.tsx deleted file mode 100644 index b4b1661..0000000 --- a/core/nav/NavEntry.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import {useState} from 'react'; -import Link from 'next/link'; -export type NavEntryInfo = { - label: string - link: string - children?: NavEntryInfo[] -}; - -export function NavEntry({ - entry: {label, link, children}, dir, here, children: childrenJSX, -}: {entry: NavEntryInfo, dir: string, here: string, children?: Body}) { - const href = dir+link; - const isHere = href.replace(/\/$/, '')===here; // remove trailing slash - const isRHere = isHere || here.startsWith(href); // here or is children - - const [toggle, setToggle] = useState(isRHere); - const entryCls = 'nav-entry'+(isHere ? ' nav-here' : ''); - return children?.length ? <> - - {label} - setToggle(e=>!e)}> - - {isHere ? childrenJSX : <>>} - { - children.map(entry => {childrenJSX}) - } - > : - {label} - ; -} diff --git a/core/nav/NavHeader.tsx b/core/nav/NavHeader.tsx deleted file mode 100644 index 82bb299..0000000 --- a/core/nav/NavHeader.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import Link from 'next/link'; - -export type NavHeaderConfig = { - title: string - subtitle?: string - icon?: string | { - href: string - alt?: string - size?: number - width?: number - height?: number - } -}; - -export function NavHeader({config, onToggleFold}: { - config: NavHeaderConfig - onToggleFold?: ()=>void -}) { - const {title, subtitle, icon: icon0} = config; - const icon = typeof icon0 === 'string' ? {href: icon0} : icon0; - return - - {icon?.href && } - - {title} - {subtitle} - - - - ; -} diff --git a/core/nav/index.tsx b/core/nav/index.tsx deleted file mode 100644 index 3306a5a..0000000 --- a/core/nav/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -export * from './Nav'; -export * from './NavBase'; -export * from './NavEntry'; -export * from './NavHeader'; - -import {Nav} from './Nav'; -export default Nav; diff --git a/core/page/Footer.tsx b/core/page/Footer.tsx deleted file mode 100644 index f4fc5c7..0000000 --- a/core/page/Footer.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -export type FooterConfig = { - site: { - startYear?: number - author: string - } -}; - -export function Footer({config}: {config: FooterConfig}) { - const year = new Date().getFullYear(); - const {site: {startYear: year0 = year, author}} = config; - const yearStr = year>year0 ? `${year0}-${year}` : year; - return ; -} diff --git a/core/page/MDXPage.tsx b/core/page/MDXPage.tsx deleted file mode 100644 index 0999568..0000000 --- a/core/page/MDXPage.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import Head from 'next/head'; -import {Nav, NavHeaderConfig} from '@sup39/mdx-nav'; -import {Footer} from './Footer'; -import {MetaInfo} from './MetaInfo'; -import {I18N, LocaleInfo, translate} from './i18n'; -import {I18NNavEntryInfo, translateNav} from './i18n-nav'; - -type HeadingInfo = { - tagName: string; - label: string; - id: string; -}; - -export type MDXProps = { - children: JSX.Element - router: {pathname: string} & LocaleInfo - meta: Partial<{ - title: I18N - description: I18N - h1: I18N - [key: string]: any - }> - headings: HeadingInfo[] - config: MDXConfig -}; - -export type MDXConfig = { - site: { - startYear?: number - author: string - title: I18N - subtitle?: I18N - } & Omit - metaFields?: {label: I18N, attr: string}[] - nav: I18NNavEntryInfo[] -} - -export function MDXPage({ - children, router, meta: meta18={}, headings, config, -}: MDXProps) { - const meta = Object.fromEntries(Object.entries(meta18).map(([k, v]) => [ - k, translate(v, router), - ])); - const {title, description} = meta; - const h1 = meta.h1 ?? title; - - const metaFields = config.metaFields?.map(({label, attr}) => ({ - label: translate(label, router), - attr, - })) ?? []; - - const {pathname} = router; - const navConfig = { - site: { - ...config.site, - title: translate(config.site.title, router), - subtitle: translate(config.site.subtitle, router), - }, - nav: translateNav(config.nav, router), - }; - - return <> - - {title && {title}} - {description && } - - - - - {h1 ? {h1} : <>>} - - {children} - - - - >; -} - -export default function MDXPageFactory(config: MDXConfig) { - return function Page({children, ...props}: Omit) { - return {children}; - }; -} diff --git a/core/page/MetaInfo.tsx b/core/page/MetaInfo.tsx deleted file mode 100644 index 4ccdab4..0000000 --- a/core/page/MetaInfo.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; - -export type MetaInfoProps = { - data: Record - fields: { - label: string - attr: string - }[] -}; - -export function MetaInfo({fields, data}: MetaInfoProps) { - return {fields.map(({label, attr}) => { - const val = data[attr]; - return val == null ? null : - {label} - {val} - ; - })}; -} diff --git a/core/page/i18n-nav.ts b/core/page/i18n-nav.ts deleted file mode 100644 index 8cc9af9..0000000 --- a/core/page/i18n-nav.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type {NavEntryInfo} from '@sup39/mdx-nav'; -import {I18N, translate} from './i18n'; - -export type I18NNavEntryInfo = { - label: I18N - link: string - children?: I18NNavEntryInfo[] -}; - -export function translateNav( - nav18: I18NNavEntryInfo[], - localeInfo: Parameters[1], -): NavEntryInfo[] { - return nav18.map(e => ({ - label: translate(e.label, localeInfo), - link: e.link, - ...(e.children ? {children: translateNav(e.children, localeInfo)} : {}), - })); -} diff --git a/core/page/i18n.ts b/core/page/i18n.ts deleted file mode 100644 index 9bd15ef..0000000 --- a/core/page/i18n.ts +++ /dev/null @@ -1,29 +0,0 @@ -export type NonRecordType = boolean|number|bigint|string|symbol|any[]; -export type I18N = (T & NonRecordType) | Record; -export type LocaleInfo = { - locale?: string - defaultLocale?: string -}; - -export function translate( - data: I18N, - {locale, defaultLocale=''}: LocaleInfo, -): T; -export function translate( - data: I18N|null, - {locale, defaultLocale=''}: LocaleInfo, -): null; -export function translate( - data: I18N|undefined, - {locale, defaultLocale=''}: LocaleInfo, -): undefined; -export function translate( - data: I18N|U, - {locale, defaultLocale=''}: LocaleInfo, -): T|U { - if (data == null) return data; - if (typeof data !== 'object') return data; - if (data instanceof Array) return data; - return (locale == null ? undefined : data[locale]) ?? - data[defaultLocale] ?? Object.values(data)[0]; -} diff --git a/core/page/index.tsx b/core/page/index.tsx deleted file mode 100644 index 50de37a..0000000 --- a/core/page/index.tsx +++ /dev/null @@ -1,8 +0,0 @@ -export * from './Footer'; -export * from './MDXPage'; -export * from './MetaInfo'; -export * from './i18n'; -export * from './i18n-nav'; - -import MDXPageFactory from './MDXPage'; -export default MDXPageFactory; diff --git a/package.json b/package.json index 1839635..0611305 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,8 @@ "@mdx-js/loader": "^2.3.0", "@mdx-js/react": "^2.3.0", "@next/mdx": "13.0.7", + "@sup39/mdx-components": "^0.1.0", + "@sup39/mdx-page": "^0.2.0", "@sup39/rehype-mdx-auto-import": "^1.0.0", "@sup39/rehype-mdx-component-wrapper": "^0.1.0", "@sup39/rehype-mdx-export-headings": "^0.1.1", @@ -60,12 +62,12 @@ "yaml-loader": "^0.8.0" }, "devDependencies": { - "@sup39/eslint-config-typescript": "^0.1.4", - "@types/node": "18.11.9", - "@types/react": "18.0.24", - "eslint": "^8.26.0", - "eslint-config-next": "^13.0.2", + "@sup39/eslint-config-typescript": "^0.1.5", + "@types/node": "^18.13.0", + "@types/react": "^18.0.28", + "eslint": "^8.34.0", + "eslint-config-next": "^13.1.6", "eslint-plugin-mdx": "^2.0.5", - "typescript": "4.8.4" + "typescript": "^4.9.5" } } diff --git a/pages/_app.tsx b/pages/_app.tsx index 05c1315..185b2e3 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,11 +1,11 @@ import React from 'react'; import type {AppProps} from 'next/app'; import {MDXProvider} from '@mdx-js/react'; -import mdx from '@sup39/mdx-components'; +import {components} from '@sup39/mdx-components'; import '../styles/index.sass'; export default function App({Component, pageProps, router}: AppProps) { - return + return ; } diff --git a/supMDX.yml b/supMDX.yml index 2050638..04a3282 100644 --- a/supMDX.yml +++ b/supMDX.yml @@ -1,9 +1,9 @@ site: startYear: 2023 author: - title: - subtitle: - icon: + title: supMDX + subtitle: Template + icon: https://cdn.sup39.dev/img/shine.svg metaFields: - {attr: author, label: 'Author: '} - {attr: createdAt, label: 'Created at '} diff --git a/tsconfig.json b/tsconfig.json index d79f73a..296169a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,6 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "@sup39/mdx-*": ["core/*"], "@/*": ["components/*"], "#/*": ["pages/*"], "#config": ["supMDX.yml"], diff --git a/yarn.lock b/yarn.lock index 3203181..37c00d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,25 +38,25 @@ dependencies: regenerator-runtime "^0.13.10" -"@eslint/eslintrc@^1.3.3": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" - integrity sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg== +"@eslint/eslintrc@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" + integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.4.0" - globals "^13.15.0" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.6": - version "0.11.7" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.7.tgz#38aec044c6c828f6ed51d5d7ae3d9b9faf6dbb0f" - integrity sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw== +"@humanwhocodes/config-array@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" + integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -116,10 +116,10 @@ resolved "https://registry.yarnpkg.com/@next/env/-/env-13.0.7.tgz#7b6ccd9006d3fb57c369e3fb62b28e15324141e9" integrity sha512-ZBclBRB7DbkSswXgbJ+muF5RxfgmAuQKAWL8tcm86aZmoiL1ZainxQK0hMcMYdh+IYG8UObAKV2wKB5O+6P4ng== -"@next/eslint-plugin-next@13.0.2": - version "13.0.2" - resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.0.2.tgz#89fe2144b37896f926e2bd9bed675396f1f697ce" - integrity sha512-W+fIIIaFU7Kct7Okx91C7XDRGolv/w2RUenX2yZFeeNVcuVzDIKUcNmckrYbYcwrNQUSXmtwrs3g8xwast0YtA== +"@next/eslint-plugin-next@13.1.6": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-13.1.6.tgz#ad8be22dd3d8aee9a9bd9a2507e2c55a2f7ebdd9" + integrity sha512-o7cauUYsXjzSJkay8wKjpKJf2uLzlggCsGUkPu3lP09Pv97jYlekTC20KJrjQKmSv5DXV0R/uks2ZXhqjNkqAw== dependencies: glob "7.1.7" @@ -238,15 +238,32 @@ resolved "https://registry.yarnpkg.com/@sup39/eslint-config-basic/-/eslint-config-basic-0.1.5.tgz#73520b79d5fe2efafdc615207689c64b7307542c" integrity sha512-fAYz/rIGkAUzBhQqPKo9w442HRGop71HBa4wnQHeLdySE3LxMyiNtuz5a3TaNrfWm3x+er2TCGq3if/FzRp+5g== -"@sup39/eslint-config-typescript@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@sup39/eslint-config-typescript/-/eslint-config-typescript-0.1.4.tgz#d5d3c1ac20e160b1f042910e535587e00ce8c871" - integrity sha512-0hjNZGUgkrFkeifSMECE0NG65MLEMAgVnpiM6IL+yX4gLjz431DHDY/a//2ptfqWaP30JasFRYVuWp8EIDw+dQ== +"@sup39/eslint-config-typescript@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@sup39/eslint-config-typescript/-/eslint-config-typescript-0.1.5.tgz#1dd13cf6ad5d5d849c33721045a5829646289758" + integrity sha512-EpuYgCXB4vUnzeOiyhKxIajufMDHeudiHrYUNnXbmhORnTO67HfcYlSMceEIavmE/wzGy5tZoMjtKytTJ5X7Ng== dependencies: "@sup39/eslint-config-basic" "^0.1.5" "@typescript-eslint/eslint-plugin" "^5" "@typescript-eslint/parser" "^5" +"@sup39/mdx-components@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@sup39/mdx-components/-/mdx-components-0.1.0.tgz#641b91c11f2da3635a3ab6803a4dbb8ec777308b" + integrity sha512-iAg3uyV0nMWI4jlNGb1ZQ+zr3uY3g1jgEKKE1/lYf7onH59bmUFH9BxZP7bFTKdbOIIfR7tqBH7vYGexBcEx9w== + +"@sup39/mdx-nav@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sup39/mdx-nav/-/mdx-nav-0.2.0.tgz#65679915e9f81b8c735f4576aa6b1d12ee0944a3" + integrity sha512-qgx7/zVklSJLZKQ+8wAO8y0CdyLZQdAwNPOzXfykodvByMEeeEROy9FnTeg067zme8uzoquCXFXLls2yWhjm6g== + +"@sup39/mdx-page@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sup39/mdx-page/-/mdx-page-0.2.0.tgz#6f7e86da8262af654f158e4f2c824c21fd3de19d" + integrity sha512-XpVeEg17pCKsqT5yWb1tUwM6IoL4oNy54ixlSUdI5sgp3t1OIEINAxDtM65t0uimlEXhRE59wps93YOrnJ0RVA== + dependencies: + "@sup39/mdx-nav" "^0.2.0" + "@sup39/rehype-mdx-auto-import@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@sup39/rehype-mdx-auto-import/-/rehype-mdx-auto-import-1.0.0.tgz#d8319748c8791648aa3dcf64f24ae37926cd0c05" @@ -334,10 +351,10 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@18.11.9": - version "18.11.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" - integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== +"@types/node@^18.13.0": + version "18.13.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" + integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== "@types/parse-json@^4.0.0": version "4.0.0" @@ -354,7 +371,7 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== -"@types/react@18.0.24", "@types/react@>=16": +"@types/react@>=16": version "18.0.24" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.24.tgz#2f79ed5b27f08d05107aab45c17919754cc44c20" integrity sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q== @@ -363,6 +380,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.28": + version "18.0.28" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.28.tgz#accaeb8b86f4908057ad629a26635fe641480065" + integrity sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -393,7 +419,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5", "@typescript-eslint/parser@^5.21.0": +"@typescript-eslint/parser@^5": version "5.42.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.42.0.tgz#be0ffbe279e1320e3d15e2ef0ad19262f59e9240" integrity sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA== @@ -403,6 +429,16 @@ "@typescript-eslint/typescript-estree" "5.42.0" debug "^4.3.4" +"@typescript-eslint/parser@^5.42.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4" + integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== + dependencies: + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.42.0": version "5.42.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.42.0.tgz#e1f2bb26d3b2a508421ee2e3ceea5396b192f5ef" @@ -411,6 +447,14 @@ "@typescript-eslint/types" "5.42.0" "@typescript-eslint/visitor-keys" "5.42.0" +"@typescript-eslint/scope-manager@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1" + integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + "@typescript-eslint/type-utils@5.42.0": version "5.42.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.42.0.tgz#4206d7192d4fe903ddf99d09b41d4ac31b0b7dca" @@ -426,6 +470,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.42.0.tgz#5aeff9b5eced48f27d5b8139339bf1ef805bad7a" integrity sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw== +"@typescript-eslint/types@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b" + integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== + "@typescript-eslint/typescript-estree@5.42.0": version "5.42.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.42.0.tgz#2592d24bb5f89bf54a63384ff3494870f95b3fd8" @@ -439,6 +488,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca" + integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.42.0": version "5.42.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.42.0.tgz#f06bd43b9a9a06ed8f29600273240e84a53f2f15" @@ -461,6 +523,14 @@ "@typescript-eslint/types" "5.42.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f" + integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== + dependencies: + "@typescript-eslint/types" "5.52.0" + eslint-visitor-keys "^3.3.0" + acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -868,6 +938,14 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== +enhanced-resolve@^5.10.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" + integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -936,16 +1014,16 @@ escape-string-regexp@^5.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== -eslint-config-next@^13.0.2: - version "13.0.2" - resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.0.2.tgz#7c87837821ea7468e018ca41f3bf6fa37d53db68" - integrity sha512-SrrHp+zBDYLjOFZdM5b9aW/pliK687Xxfa+qpDuL08Z04ReHhmz3L+maXaAqgrEVZHQximP7nh0El4yNDJW+CA== +eslint-config-next@^13.1.6: + version "13.1.6" + resolved "https://registry.yarnpkg.com/eslint-config-next/-/eslint-config-next-13.1.6.tgz#ab6894fe5b80080f1e9b9306d1c4b0003230620e" + integrity sha512-0cg7h5wztg/SoLAlxljZ0ZPUQ7i6QKqRiP4M2+MgTZtxWwNKb2JSwNc18nJ6/kXBI6xYvPraTbQSIhAuVw6czw== dependencies: - "@next/eslint-plugin-next" "13.0.2" + "@next/eslint-plugin-next" "13.1.6" "@rushstack/eslint-patch" "^1.1.3" - "@typescript-eslint/parser" "^5.21.0" + "@typescript-eslint/parser" "^5.42.0" eslint-import-resolver-node "^0.3.6" - eslint-import-resolver-typescript "^2.7.1" + eslint-import-resolver-typescript "^3.5.2" eslint-plugin-import "^2.26.0" eslint-plugin-jsx-a11y "^6.5.1" eslint-plugin-react "^7.31.7" @@ -959,16 +1037,18 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-import-resolver-typescript@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz#a90a4a1c80da8d632df25994c4c5fdcdd02b8751" - integrity sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ== +eslint-import-resolver-typescript@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.3.tgz#db5ed9e906651b7a59dd84870aaef0e78c663a05" + integrity sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ== dependencies: debug "^4.3.4" - glob "^7.2.0" + enhanced-resolve "^5.10.0" + get-tsconfig "^4.2.0" + globby "^13.1.2" + is-core-module "^2.10.0" is-glob "^4.0.3" - resolve "^1.22.0" - tsconfig-paths "^3.14.1" + synckit "^0.8.4" eslint-mdx@^2.0.5: version "2.0.5" @@ -1114,13 +1194,13 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.26.0: - version "8.26.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.26.0.tgz#2bcc8836e6c424c4ac26a5674a70d44d84f2181d" - integrity sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg== +eslint@^8.34.0: + version "8.34.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.34.0.tgz#fe0ab0ef478104c1f9ebc5537e303d25a8fb22d6" + integrity sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg== dependencies: - "@eslint/eslintrc" "^1.3.3" - "@humanwhocodes/config-array" "^0.11.6" + "@eslint/eslintrc" "^1.4.1" + "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" @@ -1139,7 +1219,7 @@ eslint@^8.26.0: file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.15.0" + globals "^13.19.0" grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" @@ -1258,7 +1338,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -1380,6 +1460,11 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-tsconfig@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.4.0.tgz#64eee64596668a81b8fce18403f94f245ee0d4e5" + integrity sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1406,7 +1491,7 @@ glob@7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3, glob@^7.2.0: +glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1418,10 +1503,10 @@ glob@^7.1.3, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.15.0: - version "13.17.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" - integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== +globals@^13.19.0: + version "13.20.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" + integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== dependencies: type-fest "^0.20.2" @@ -1442,11 +1527,27 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globby@^13.1.2: + version "13.1.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.3.tgz#f62baf5720bcb2c1330c8d4ef222ee12318563ff" + integrity sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + globrex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== +graceful-fs@^4.2.4: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + grapheme-splitter@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" @@ -1681,7 +1782,7 @@ is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.10.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -3147,6 +3248,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" @@ -3260,6 +3366,11 @@ synckit@^0.8.4: "@pkgr/utils" "^2.3.1" tslib "^2.4.0" +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -3334,10 +3445,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@4.8.4: - version "4.8.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" - integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== unbox-primitive@^1.0.2: version "1.0.2"