diff --git a/apps/trpfrog.net/package.json b/apps/trpfrog.net/package.json
index 29412f92..ef992589 100644
--- a/apps/trpfrog.net/package.json
+++ b/apps/trpfrog.net/package.json
@@ -10,7 +10,8 @@
"storybook": "storybook dev -p 6006",
"test": "vitest run",
"build-storybook": "storybook build",
- "lint-fix": "eslint . --fix"
+ "lint-fix": "eslint . --fix",
+ "check-unused": "ts-remove-unused --skip '.*\\.(test|spec|stories)\\.tsx?' --skip '(\\.next|\\.config\\.[jt]sx?|\\/article\\-parts\\/)' --skip '(layout|page|loading|not-found|error|global-error|route|template|default|mdx-components|middleware).[jt]sx?' --check"
},
"prisma": {
"seed": "dotenv -e .env.local -- ts-node --compiler-options {\"module\":\"CommonJS\"} ./src/prisma/seed.ts",
diff --git a/apps/trpfrog.net/src/app/(gallery)/_components/ImageList.tsx b/apps/trpfrog.net/src/app/(gallery)/_components/ImageList.tsx
index 62fd5e6f..38ae44b6 100644
--- a/apps/trpfrog.net/src/app/(gallery)/_components/ImageList.tsx
+++ b/apps/trpfrog.net/src/app/(gallery)/_components/ImageList.tsx
@@ -1,7 +1,7 @@
import Image from 'next/legacy/image'
import Link from 'next/link'
-export type ImageListProps = {
+type ImageListProps = {
images: ImagePaths[]
imageWidth?: number
imageHeight?: number
diff --git a/apps/trpfrog.net/src/app/(home)/_cards/AboutMeCard.tsx b/apps/trpfrog.net/src/app/(home)/_cards/AboutMeCard.tsx
index 75e08c0a..48120ece 100644
--- a/apps/trpfrog.net/src/app/(home)/_cards/AboutMeCard.tsx
+++ b/apps/trpfrog.net/src/app/(home)/_cards/AboutMeCard.tsx
@@ -7,7 +7,7 @@ const image = replaceWithLighterImageFormat(
'https://res.cloudinary.com/trpfrog/image/upload/w_1000/blog/sugadaira-travel/42C94C5A-04C6-4DEC-9D41-2C87F87D79B7_1_105_c.jpg',
)
-export const attributes = [
+const attributes = [
{ icon: '🐸', iconName: '性別', text: '男性' },
{ icon: '🎂', iconName: '誕生日', text: '2000年10月17日 (23歳)' },
{
diff --git a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/KCommandBox.tsx b/apps/trpfrog.net/src/app/(home)/_components/AboutMe/KCommandBox.tsx
deleted file mode 100644
index f881616a..00000000
--- a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/KCommandBox.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-'use client'
-
-import * as React from 'react'
-import { useState } from 'react'
-
-import { faA, faB } from '@fortawesome/free-solid-svg-icons'
-import { faPlay } from '@fortawesome/free-solid-svg-icons/faPlay'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-
-import styles from '@/app/(home)/_components/AboutMe/index.module.scss'
-
-export function KCommandBox({ children }: { children: React.ReactNode }) {
- const [isUnlocked, setIsUnlocked] = useState(false)
- const [input, setInput] = useState('')
- const answer = '↑↑↓↓←→←→BA' // ソースまで辿り着くような人間はどうせこれも知ってるのでソース直書きで良い
-
- const figures = {
- '↑': ,
- '↓': ,
- '←': ,
- '→': ,
- A: ,
- B: ,
- } as const
-
- return isUnlocked ? (
- <>{children}>
- ) : (
- <>
-
- {(['↑', '↓', '←', '→', 'A', 'B'] as (keyof typeof figures)[]).map(e => (
-
- ))}
-
- {input.replaceAll(/./g, '●')}
- >
- )
-}
diff --git a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/attributes.ts b/apps/trpfrog.net/src/app/(home)/_components/AboutMe/attributes.ts
deleted file mode 100644
index bc552392..00000000
--- a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/attributes.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-import {
- IconDefinition,
- faBirthdayCake,
- faCode,
- faFlask,
- faHeart,
- faHorse,
- faLaptop,
- faMapMarkerAlt,
- faTelevision,
- faUniversity,
- faWalking,
-} from '@fortawesome/free-solid-svg-icons'
-import { faBook } from '@fortawesome/free-solid-svg-icons/faBook'
-import { faMusic } from '@fortawesome/free-solid-svg-icons/faMusic'
-
-import { ATCODER_HIGHEST, WALKING_FARTHEST } from '@/lib/constants'
-
-type Attribute = { icon: IconDefinition; iconName: string; text: string }
-
-export const attributes: Attribute[] = [
- { icon: faMapMarkerAlt, iconName: '住まい', text: '東京都 (多摩地域)' },
- {
- icon: faUniversity,
- iconName: '大学',
- text: '電気通信大学大学院 情報学専攻 修士1年',
- },
- { icon: faBirthdayCake, iconName: '誕生日', text: '2000年10月17日 (23歳)' },
- { icon: faHeart, iconName: '好き', text: 'コンピュータ / Web開発 / 散歩' },
- {
- icon: faCode,
- iconName: '使用言語',
- text: 'TypeScript (React) / Python (PyTorch) / Java',
- },
- { icon: faFlask, iconName: '研究分野', text: '深層学習による自然言語処理' },
- {
- icon: faLaptop,
- iconName: '使用PC',
- text: 'MacBook Pro (2021, 14-inch, M1 Pro)',
- },
- {
- icon: faHorse,
- iconName: 'AtCoder',
- text: `AtCoder水色 (highest ${ATCODER_HIGHEST})`,
- },
- {
- icon: faWalking,
- iconName: '徒歩',
- text: `徒歩会 (farthest ${WALKING_FARTHEST})`,
- },
-]
-
-export const additionalAttributes: Attribute[] = [
- {
- icon: faTelevision,
- iconName: '良かったアニメ (原作が存在している場合は買っている)',
- text: [
- '私に天使が舞い降りた!',
- 'ぼっち・ざ・ろっく!',
- '恋する小惑星',
- 'やがて君になる',
- '三ツ星カラーズ',
- '安達としまむら',
- 'リコリス・リコイル',
- '響け!ユーフォニアム',
- 'けものフレンズ',
- 'ゆるゆり',
- 'citrus',
- 'Dr.STONE',
- '天気の子',
- 'アイの歌声を聴かせて',
- ].join(' / '),
- },
- {
- icon: faBook,
- iconName: '良かった小説・漫画',
- text: [
- 'ななどなどなど',
- 'ふたりエスケープ',
- '週に一度クラスメイトを買う話',
- '性悪天才幼馴染との勝負に負けて初体験を全部奪われる話',
- 'さよならローズガーデン',
- 'お兄ちゃんはおしまい!',
- 'Still Sick',
- 'ハッピー・シュガー・ライフ',
- ].join(' / '),
- },
- {
- icon: faMusic,
- iconName: 'ここ数年好きな音楽 (ジャンル・アーティスト名ごちゃ混ぜ)',
- text: [
- 'UK Hardcore',
- 'Speedcore',
- 'Trance',
- 'HARDCORE TANO*C (数度現地に行っている)',
- '吹奏楽曲 (元吹部、トランペットをやっていた)',
- '結束バンド',
- ].join(' / '),
- },
-]
diff --git a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/index.tsx b/apps/trpfrog.net/src/app/(home)/_components/AboutMe/index.tsx
deleted file mode 100644
index b36d1a4a..00000000
--- a/apps/trpfrog.net/src/app/(home)/_components/AboutMe/index.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { tv } from '@/lib/tailwind/variants'
-
-const createStyles = tv({
- slots: {
- wrapper: 'tw-grid tw-grid-cols-subgrid sp:tw-grid-cols-3',
- aboutMe: 'tw-bg-amber-300 sp:tw-col-span-3 pc:tw-col-span-2 pc:tw-row-span-3',
- social: 'tw-bg-amber-300',
- },
-})
-
-export function AboutMe() {
- const styles = createStyles()
- return (
-
-
AboutMe
-
GitHub
-
Twitter
-
Mail
-
- )
-}
diff --git a/apps/trpfrog.net/src/app/(home)/_components/TopCard.tsx b/apps/trpfrog.net/src/app/(home)/_components/TopCard.tsx
index fc118ae6..28da6ab7 100644
--- a/apps/trpfrog.net/src/app/(home)/_components/TopCard.tsx
+++ b/apps/trpfrog.net/src/app/(home)/_components/TopCard.tsx
@@ -37,7 +37,7 @@ const styles = {
}),
}
-export interface TopCardProps extends ComponentPropsWithRef<'div'> {
+interface TopCardProps extends ComponentPropsWithRef<'div'> {
title?: string
titlePosition?: VariantProps['position']
}
@@ -60,7 +60,7 @@ export function TopCard(props: TopCardProps) {
)
}
-export interface TopLinkCardProps extends AProps {
+interface TopLinkCardProps extends AProps {
title?: string
readMoreText?: string | boolean
titlePosition?: VariantProps['position']
diff --git a/apps/trpfrog.net/src/app/(home)/_components/TrpFrogAnimation/useRpmCalculation.ts b/apps/trpfrog.net/src/app/(home)/_components/TrpFrogAnimation/useRpmCalculation.ts
index 46bafef5..2ad4acbc 100644
--- a/apps/trpfrog.net/src/app/(home)/_components/TrpFrogAnimation/useRpmCalculation.ts
+++ b/apps/trpfrog.net/src/app/(home)/_components/TrpFrogAnimation/useRpmCalculation.ts
@@ -13,7 +13,7 @@ function degreeMod(n: number) {
}
// returns [-180, 180)
-export function degreeDifference(prev: number, cur: number) {
+function degreeDifference(prev: number, cur: number) {
const diff = degreeMod(cur - prev)
if (diff >= 180) {
return diff - 360
@@ -21,7 +21,7 @@ export function degreeDifference(prev: number, cur: number) {
return diff
}
-export type RpmCalculationOptions = Partial<{
+type RpmCalculationOptions = Partial<{
minQueueSize: number
}>
diff --git a/apps/trpfrog.net/src/app/blog/_components/LiteArticleCard/index.tsx b/apps/trpfrog.net/src/app/blog/_components/LiteArticleCard/index.tsx
index 9f0712e8..66132561 100644
--- a/apps/trpfrog.net/src/app/blog/_components/LiteArticleCard/index.tsx
+++ b/apps/trpfrog.net/src/app/blog/_components/LiteArticleCard/index.tsx
@@ -11,7 +11,7 @@ import { DEFAULT_BLOG_THUMBNAIL } from '@/lib/constants'
import styles from './index.module.scss'
-export type LiteArticleCardProps = {
+type LiteArticleCardProps = {
entry: BlogPost
}
diff --git a/apps/trpfrog.net/src/app/blog/_components/OriginalMarkdownComponent.tsx b/apps/trpfrog.net/src/app/blog/_components/OriginalMarkdownComponent.tsx
index cd088383..c8d6fdb0 100644
--- a/apps/trpfrog.net/src/app/blog/_components/OriginalMarkdownComponent.tsx
+++ b/apps/trpfrog.net/src/app/blog/_components/OriginalMarkdownComponent.tsx
@@ -77,7 +77,7 @@ const extraCodeBlockComponents = [
},
] as const satisfies readonly ArticleParts[]
-export type ExtraCodeBlockComponentName = (typeof extraCodeBlockComponents)[number]['name']
+type ExtraCodeBlockComponentName = (typeof extraCodeBlockComponents)[number]['name']
// TODO: ArticleParts の DevComponent の扱いを考える
const extraCodeBlockComponentRecord = Object.fromEntries(
diff --git a/apps/trpfrog.net/src/app/blog/_components/Tag/index.tsx b/apps/trpfrog.net/src/app/blog/_components/Tag/index.tsx
index fe11e4f8..20d8e347 100644
--- a/apps/trpfrog.net/src/app/blog/_components/Tag/index.tsx
+++ b/apps/trpfrog.net/src/app/blog/_components/Tag/index.tsx
@@ -27,7 +27,7 @@ const getTagEmoji = (tag: string) => {
}
}
-export const getEmojiUrlFromTagName = (tag: string) => {
+const getEmojiUrlFromTagName = (tag: string) => {
const codePoint = getTagEmoji(tag).codePointAt(0)?.toString(16)
return `https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/${codePoint}.svg`
}
diff --git a/apps/trpfrog.net/src/app/blog/_renderer/ArticleRenderer.tsx b/apps/trpfrog.net/src/app/blog/_renderer/ArticleRenderer.tsx
index 9b041d19..7ca6c4d7 100644
--- a/apps/trpfrog.net/src/app/blog/_renderer/ArticleRenderer.tsx
+++ b/apps/trpfrog.net/src/app/blog/_renderer/ArticleRenderer.tsx
@@ -9,7 +9,7 @@ export type MarkdownOptions = Omit & {
components: MDXRemoteProps['components']
}
-export type ArticleRendererProps =
+type ArticleRendererProps =
| {
toRender: string
markdownOptions: MarkdownOptions
diff --git a/apps/trpfrog.net/src/app/blog/_renderer/DevBlogMarkdown/DevBlogMarkdown.tsx b/apps/trpfrog.net/src/app/blog/_renderer/DevBlogMarkdown/DevBlogMarkdown.tsx
index dc16db7d..23c83911 100644
--- a/apps/trpfrog.net/src/app/blog/_renderer/DevBlogMarkdown/DevBlogMarkdown.tsx
+++ b/apps/trpfrog.net/src/app/blog/_renderer/DevBlogMarkdown/DevBlogMarkdown.tsx
@@ -9,7 +9,7 @@ import { LoadingBlock } from '@/components/molecules/LoadingBlock'
import { ImageDragAndDrop } from '@blog/_renderer/DevBlogMarkdown/ImageDragAndDrop.tsx'
import { renderBlog } from '@blog/_renderer/renderBlog'
-export type DevBlogMarkdownProps = {
+type DevBlogMarkdownProps = {
slug: string
page?: number | 'all'
}
diff --git a/apps/trpfrog.net/src/app/blog/_renderer/rendererProperties.tsx b/apps/trpfrog.net/src/app/blog/_renderer/rendererProperties.tsx
index 9421a946..bb16b27a 100644
--- a/apps/trpfrog.net/src/app/blog/_renderer/rendererProperties.tsx
+++ b/apps/trpfrog.net/src/app/blog/_renderer/rendererProperties.tsx
@@ -166,7 +166,7 @@ export function getMarkdownOptions(options?: {
} satisfies MarkdownOptions
}
-export function getMarkdownPlugins() {
+function getMarkdownPlugins() {
return {
remarkPlugins: [
remarkGfm,
diff --git a/apps/trpfrog.net/src/app/download/schema.ts b/apps/trpfrog.net/src/app/download/schema.ts
index 53fa4401..ea5d2db0 100644
--- a/apps/trpfrog.net/src/app/download/schema.ts
+++ b/apps/trpfrog.net/src/app/download/schema.ts
@@ -17,5 +17,3 @@ export const WorksFrontmatterSchema = z.object({
),
date: z.coerce.date(),
})
-
-export type WorksFrontmatter = z.infer
diff --git a/apps/trpfrog.net/src/app/icon-maker/iconMaker.ts b/apps/trpfrog.net/src/app/icon-maker/iconMaker.ts
index ec0e9459..cacabcd8 100644
--- a/apps/trpfrog.net/src/app/icon-maker/iconMaker.ts
+++ b/apps/trpfrog.net/src/app/icon-maker/iconMaker.ts
@@ -1,6 +1,6 @@
import { RefObject } from 'react'
-export const ICON_SIZE = 500,
+const ICON_SIZE = 500,
CIRCLE_SIZE = 430
export class IconCanvas {
diff --git a/apps/trpfrog.net/src/app/links/fetchFavicon.ts b/apps/trpfrog.net/src/app/links/fetchFavicon.ts
deleted file mode 100644
index fac7a069..00000000
--- a/apps/trpfrog.net/src/app/links/fetchFavicon.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { LRUCache } from 'lru-cache'
-
-const faviconCache = new LRUCache({
- max: 1000,
-})
-
-export async function fetchFaviconBase64(url: string) {
- if (faviconCache.has(url)) {
- return faviconCache.get(url)
- }
- const endpoint = 'http://www.google.com/s2/favicons?domain=' + url
- const res = await fetch(endpoint)
- const blob = await res.blob()
- const arrayBuffer = await blob.arrayBuffer()
- const base64 = Buffer.from(arrayBuffer).toString('base64')
- faviconCache.set(url, base64)
- return base64
-}
diff --git a/apps/trpfrog.net/src/app/music/page.tsx b/apps/trpfrog.net/src/app/music/page.tsx
index bb634b27..39a569f6 100644
--- a/apps/trpfrog.net/src/app/music/page.tsx
+++ b/apps/trpfrog.net/src/app/music/page.tsx
@@ -9,7 +9,6 @@ import { A } from '@/components/wrappers'
// FIXME: Cannot find module 'Lyrics'
// @ts-expect-error - Error: Cannot find module 'Lyrics'
import Lyrics from './Lyrics.mdx'
-import styles from './style.module.scss'
export default function Music() {
return (
@@ -56,7 +55,7 @@ export default function Music() {
-
+
diff --git a/apps/trpfrog.net/src/app/music/style.module.scss b/apps/trpfrog.net/src/app/music/style.module.scss
deleted file mode 100644
index 77231ed8..00000000
--- a/apps/trpfrog.net/src/app/music/style.module.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-#lyrics {
- text-align: center;
- font-size: 1.1em;
- span {
- display: inline-block;
- }
-}
diff --git a/apps/trpfrog.net/src/components/atoms/Alert/index.tsx b/apps/trpfrog.net/src/components/atoms/Alert/index.tsx
index 8ccce632..4106601e 100644
--- a/apps/trpfrog.net/src/components/atoms/Alert/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/Alert/index.tsx
@@ -10,7 +10,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import styles from './index.module.scss'
-export type AlertTypes = 'caution' | 'frog' | 'info'
+type AlertTypes = 'caution' | 'frog' | 'info'
type AlertAppearance = {
icon: IconDefinition
diff --git a/apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.scss b/apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.css
similarity index 96%
rename from apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.scss
rename to apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.css
index aa7f6e17..e2a6aae0 100644
--- a/apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.scss
+++ b/apps/trpfrog.net/src/components/atoms/AnglePicker/index.module.css
@@ -13,7 +13,7 @@
width: 100%;
aspect-ratio: 1;
border-radius: 50%;
- box-shadow: 0 0 30px 5px rgba(black, 0.3) inset;
+ box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.3) inset;
--thickness: 6deg;
--scales: 8;
diff --git a/apps/trpfrog.net/src/components/atoms/AnglePicker/index.tsx b/apps/trpfrog.net/src/components/atoms/AnglePicker/index.tsx
index 7d48c006..f0537361 100644
--- a/apps/trpfrog.net/src/components/atoms/AnglePicker/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/AnglePicker/index.tsx
@@ -4,7 +4,7 @@ import { useImperativeHandle, useRef, useState } from 'react'
import { useDragEvent } from '@/hooks/useDragEvent'
-import styles from './index.module.scss'
+import styles from './index.module.css'
interface Props extends Omit
, 'children' | 'onDrag'> {
onAngleChange: (degree: number) => void
diff --git a/apps/trpfrog.net/src/components/atoms/ButtonWithTooltip/index.tsx b/apps/trpfrog.net/src/components/atoms/ButtonWithTooltip/index.tsx
index 053c6f56..f388a98f 100644
--- a/apps/trpfrog.net/src/components/atoms/ButtonWithTooltip/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/ButtonWithTooltip/index.tsx
@@ -5,7 +5,7 @@ import { useCallback, useId, useState } from 'react'
import { Tooltip } from 'react-tooltip'
-export interface ButtonWithTooltipProps extends React.ComponentPropsWithoutRef<'button'> {
+interface ButtonWithTooltipProps extends React.ComponentPropsWithoutRef<'button'> {
hoveredTooltipContent: React.ReactNode
clickedTooltipContent: React.ReactNode
}
diff --git a/apps/trpfrog.net/src/components/atoms/CopyButton.tsx b/apps/trpfrog.net/src/components/atoms/CopyButton.tsx
index 6ddb980f..c81b3efc 100644
--- a/apps/trpfrog.net/src/components/atoms/CopyButton.tsx
+++ b/apps/trpfrog.net/src/components/atoms/CopyButton.tsx
@@ -7,7 +7,7 @@ import { ButtonWithTooltip } from '@/components/atoms/ButtonWithTooltip'
import { tv } from '@/lib/tailwind/variants'
-export type CopyButtonProps = {
+type CopyButtonProps = {
copyContent: string
className?: string
onError?: (error: Error) => void
diff --git a/apps/trpfrog.net/src/components/atoms/Details/index.tsx b/apps/trpfrog.net/src/components/atoms/Details/index.tsx
index 07ecaab1..f94b43b2 100644
--- a/apps/trpfrog.net/src/components/atoms/Details/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/Details/index.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import styles from './index.module.scss'
-export type DetailsProps = React.ComponentPropsWithoutRef<'details'> & {
+type DetailsProps = React.ComponentPropsWithoutRef<'details'> & {
summary: string
innerProps?: Omit, 'children'>
}
diff --git a/apps/trpfrog.net/src/components/atoms/Devicon.tsx b/apps/trpfrog.net/src/components/atoms/Devicon.tsx
index 7f4ba5bb..c5a7a497 100644
--- a/apps/trpfrog.net/src/components/atoms/Devicon.tsx
+++ b/apps/trpfrog.net/src/components/atoms/Devicon.tsx
@@ -3,7 +3,7 @@ import React from 'react'
import 'devicon'
import { twMerge } from '@/lib/tailwind/merge'
-export const deviconMap = {
+const deviconMap = {
Python: 'devicon-python-plain',
PyTorch: 'devicon-pytorch-original',
TypeScript: 'devicon-typescript-plain',
@@ -29,13 +29,13 @@ export const deviconMap = {
'GitHub Pages': 'devicon-github-plain',
}
-export type DeviconKey = keyof typeof deviconMap
+type DeviconKey = keyof typeof deviconMap
export function hasDevicon(iconName: string): iconName is DeviconKey {
return iconName in deviconMap
}
-export type DeviconProps = {
+type DeviconProps = {
iconName: DeviconKey
colored?: boolean
className?: string
diff --git a/apps/trpfrog.net/src/components/atoms/ErrorFallback/index.tsx b/apps/trpfrog.net/src/components/atoms/ErrorFallback/index.tsx
index 69d3c54b..dfdb248a 100644
--- a/apps/trpfrog.net/src/components/atoms/ErrorFallback/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/ErrorFallback/index.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import styles from './index.module.scss'
-export type ErrorFallbackProps = React.ComponentPropsWithoutRef<'div'> & {
+type ErrorFallbackProps = React.ComponentPropsWithoutRef<'div'> & {
title?: string
}
diff --git a/apps/trpfrog.net/src/components/atoms/InlineLink.tsx b/apps/trpfrog.net/src/components/atoms/InlineLink.tsx
index 6c958a1c..40b40195 100644
--- a/apps/trpfrog.net/src/components/atoms/InlineLink.tsx
+++ b/apps/trpfrog.net/src/components/atoms/InlineLink.tsx
@@ -2,7 +2,7 @@ import { A, AProps } from '@/components/wrappers/A'
import { tv } from '@/lib/tailwind/variants'
-export const inlineLinkStyle = tv({
+const inlineLinkStyle = tv({
base: [
'tw-inline tw-underline',
'tw-text-[forestgreen] visited:tw-text-[olive]',
diff --git a/apps/trpfrog.net/src/components/atoms/MainWrapper.tsx b/apps/trpfrog.net/src/components/atoms/MainWrapper.tsx
index 6bf88cd9..35aad658 100644
--- a/apps/trpfrog.net/src/components/atoms/MainWrapper.tsx
+++ b/apps/trpfrog.net/src/components/atoms/MainWrapper.tsx
@@ -11,7 +11,7 @@ export const gridLayoutStyle = tv({
],
})
-export const mainWrapperStyle = tv({
+const mainWrapperStyle = tv({
base: [
'tw-mx-auto tw-my-[var(--main-margin)]',
'tw-w-[calc(100%-2*var(--main-margin))] tw-max-w-[1000px]',
@@ -26,7 +26,7 @@ export const mainWrapperStyle = tv({
},
})
-export interface MainWrapperProps extends React.ComponentPropsWithoutRef<'div'> {
+interface MainWrapperProps extends React.ComponentPropsWithoutRef<'div'> {
gridLayout?: boolean
}
diff --git a/apps/trpfrog.net/src/components/atoms/PlainBlock.tsx b/apps/trpfrog.net/src/components/atoms/PlainBlock.tsx
index 16fa38a5..8d35fbfb 100644
--- a/apps/trpfrog.net/src/components/atoms/PlainBlock.tsx
+++ b/apps/trpfrog.net/src/components/atoms/PlainBlock.tsx
@@ -19,7 +19,7 @@ export const plainBlockStyle = tv({
},
})
-export type PlainBlockProps = React.ComponentPropsWithRef<'div'>
+type PlainBlockProps = React.ComponentPropsWithRef<'div'>
export function PlainBlock(props: PlainBlockProps) {
const { className, ref, ...rest } = props
diff --git a/apps/trpfrog.net/src/components/atoms/Talk/index.tsx b/apps/trpfrog.net/src/components/atoms/Talk/index.tsx
index 91456a67..49b6b1c3 100644
--- a/apps/trpfrog.net/src/components/atoms/Talk/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/Talk/index.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import styles from './index.module.scss'
-export type ConversationProps = React.ComponentPropsWithoutRef<'div'>
+type ConversationProps = React.ComponentPropsWithoutRef<'div'>
export function Talk(props: ConversationProps) {
const { className = '', children, ...rest } = props
@@ -13,7 +13,7 @@ export function Talk(props: ConversationProps) {
)
}
-export type ConversationItemProps = React.ComponentPropsWithoutRef<'div'> & {
+type ConversationItemProps = React.ComponentPropsWithoutRef<'div'> & {
speaker: string
outOfComment?: React.ReactNode
}
diff --git a/apps/trpfrog.net/src/components/atoms/twitter/TweetTextarea/index.tsx b/apps/trpfrog.net/src/components/atoms/twitter/TweetTextarea/index.tsx
index 95051e47..9aed5f6d 100644
--- a/apps/trpfrog.net/src/components/atoms/twitter/TweetTextarea/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/twitter/TweetTextarea/index.tsx
@@ -2,12 +2,12 @@ import * as React from 'react'
import styles from './index.module.scss'
-export type TweetTextareaProps = Omit, 'children'> & {
+type TweetTextareaProps = Omit, 'children'> & {
tweet: string
cite?: string
}
-export function parseTweet(tweet: string) {
+function parseTweet(tweet: string) {
tweet = ' ' + tweet + ' '
const sepFigures = ['\\s', '\\n', '\\(', '\\)', '、', '。', '!', '?']
diff --git a/apps/trpfrog.net/src/components/atoms/twitter/TwitterIcon/index.tsx b/apps/trpfrog.net/src/components/atoms/twitter/TwitterIcon/index.tsx
index 9126fb6f..df92734c 100644
--- a/apps/trpfrog.net/src/components/atoms/twitter/TwitterIcon/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/twitter/TwitterIcon/index.tsx
@@ -3,7 +3,7 @@ import * as React from 'react'
import styles from './index.module.scss'
import { iconPreset } from './preset'
-export type TwitterIconProps = {
+type TwitterIconProps = {
preset?: keyof typeof iconPreset
iconStyle?: React.CSSProperties['background']
}
diff --git a/apps/trpfrog.net/src/components/atoms/twitter/TwitterImage/index.tsx b/apps/trpfrog.net/src/components/atoms/twitter/TwitterImage/index.tsx
index a6f537b8..2cb64ad4 100644
--- a/apps/trpfrog.net/src/components/atoms/twitter/TwitterImage/index.tsx
+++ b/apps/trpfrog.net/src/components/atoms/twitter/TwitterImage/index.tsx
@@ -5,7 +5,7 @@ export type TwitterImageData = {
alt?: string
}
-export type TwitterImageProps = {
+type TwitterImageProps = {
images: TwitterImageData[]
cite?: string
}
diff --git a/apps/trpfrog.net/src/components/molecules/CodeBlock/index.tsx b/apps/trpfrog.net/src/components/molecules/CodeBlock/index.tsx
index 4ab07c45..4b8a0bc8 100644
--- a/apps/trpfrog.net/src/components/molecules/CodeBlock/index.tsx
+++ b/apps/trpfrog.net/src/components/molecules/CodeBlock/index.tsx
@@ -15,7 +15,7 @@ import { normalizeLangName } from './normalizeLangName'
import './shiki-style.css'
-export type CodeBlockProps = Omit, 'children'> & {
+type CodeBlockProps = Omit, 'children'> & {
children?: string
language?: string
fileName?: string
@@ -65,7 +65,7 @@ const langAlias = {
txt: 'text',
}
-export function extractPrefixes(language: string) {
+function extractPrefixes(language: string) {
const prefixes: string[] = (language?.match(/([^:]+):/g) ?? []).map(prefix => {
language = language.replace(prefix, '')
return prefix.replace(':', '')
@@ -73,7 +73,7 @@ export function extractPrefixes(language: string) {
return { prefixes, language }
}
-export function isValidLanguage(language: string): boolean {
+function isValidLanguage(language: string): boolean {
// text and ansi are special languages
return [...Object.keys(bundledLanguages), ...Object.keys(langAlias), 'text', 'ansi'].includes(
language?.split(':').slice(-1)[0],
diff --git a/apps/trpfrog.net/src/components/molecules/FullHeight/index.tsx b/apps/trpfrog.net/src/components/molecules/FullHeight/index.tsx
deleted file mode 100644
index cd86b969..00000000
--- a/apps/trpfrog.net/src/components/molecules/FullHeight/index.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import * as React from 'react'
-
-import styles from './index.module.scss'
-
-export function FullHeight(props: React.ComponentPropsWithoutRef<'div'>) {
- const { className = '', ...rest } = props
- return
-}
diff --git a/apps/trpfrog.net/src/components/molecules/ShowAll/index.tsx b/apps/trpfrog.net/src/components/molecules/ShowAll/index.tsx
index 82860cf3..04d599cd 100644
--- a/apps/trpfrog.net/src/components/molecules/ShowAll/index.tsx
+++ b/apps/trpfrog.net/src/components/molecules/ShowAll/index.tsx
@@ -7,7 +7,7 @@ import { usePixelValueFromCSSLength } from '@/components/molecules/ShowAll/usePi
import styles from './index.module.scss'
-export type ShowAllProps = FoggedDivProps & {
+type ShowAllProps = FoggedDivProps & {
showAllByDefault?: boolean
}
diff --git a/apps/trpfrog.net/src/components/molecules/TwitterHeader/index.tsx b/apps/trpfrog.net/src/components/molecules/TwitterHeader/index.tsx
index 347a64bc..191e4dfb 100644
--- a/apps/trpfrog.net/src/components/molecules/TwitterHeader/index.tsx
+++ b/apps/trpfrog.net/src/components/molecules/TwitterHeader/index.tsx
@@ -11,7 +11,7 @@ import { A } from '@/components/wrappers'
import styles from './index.module.scss'
-export type TwitterHeaderProps = {
+type TwitterHeaderProps = {
iconStyle?: React.CSSProperties['background']
preset?: keyof typeof iconPreset
name: string
diff --git a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/buy-me-a-coffee.tsx b/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/buy-me-a-coffee.tsx
deleted file mode 100644
index d6faba48..00000000
--- a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/buy-me-a-coffee.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import classNames from 'classnames'
-import { Cookie } from 'next/font/google'
-
-import { A } from '@/components/wrappers'
-
-import styles from './buy-me-a-coffee.module.scss'
-import { CoffeeLogo } from './coffee-logo'
-
-const cookieFont = Cookie({
- subsets: ['latin'],
- weight: '400',
-})
-
-export function BuyMeACoffee() {
- return (
-
- )
-}
diff --git a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/coffee-logo.tsx b/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/coffee-logo.tsx
deleted file mode 100644
index b9fb332d..00000000
--- a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/coffee-logo.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-// from https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js
-import styles from './buy-me-a-coffee.module.scss'
-
-export function CoffeeLogo() {
- return (
-
- )
-}
diff --git a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/index.ts b/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/index.ts
deleted file mode 100644
index 7f362287..00000000
--- a/apps/trpfrog.net/src/components/organisms/BuyMeACoffee/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { BuyMeACoffee } from './buy-me-a-coffee'
diff --git a/apps/trpfrog.net/src/components/organisms/Header/SiteName.tsx b/apps/trpfrog.net/src/components/organisms/Header/SiteName.tsx
index 040d0a4d..0516e615 100644
--- a/apps/trpfrog.net/src/components/organisms/Header/SiteName.tsx
+++ b/apps/trpfrog.net/src/components/organisms/Header/SiteName.tsx
@@ -5,7 +5,7 @@ import { usePathname } from 'next/navigation'
import { SITE_NAME } from '@/lib/constants'
import { tv } from '@/lib/tailwind/variants'
-export type TitleWithPageNameProps = {
+type TitleWithPageNameProps = {
siteTitle?: string
pageTitle?: string
showPageTitle?: boolean
diff --git a/apps/trpfrog.net/src/components/organisms/Header/SiteNameWithIcon.tsx b/apps/trpfrog.net/src/components/organisms/Header/SiteNameWithIcon.tsx
index 06ce1b7e..ef984262 100644
--- a/apps/trpfrog.net/src/components/organisms/Header/SiteNameWithIcon.tsx
+++ b/apps/trpfrog.net/src/components/organisms/Header/SiteNameWithIcon.tsx
@@ -9,7 +9,7 @@ import { tv } from '@/lib/tailwind/variants'
import { SiteName } from './SiteName'
import { useHeaderStatus } from './useHeaderStatus'
-export type TitleProps = {
+type TitleProps = {
siteTitle?: string
pageTitle?: string
}
diff --git a/apps/trpfrog.net/src/components/organisms/LinkCard/ClientLinkCard.tsx b/apps/trpfrog.net/src/components/organisms/LinkCard/ClientLinkCard.tsx
index d10cd75c..b7418b31 100644
--- a/apps/trpfrog.net/src/components/organisms/LinkCard/ClientLinkCard.tsx
+++ b/apps/trpfrog.net/src/components/organisms/LinkCard/ClientLinkCard.tsx
@@ -8,7 +8,7 @@ import { fetchOGP } from '@/components/organisms/LinkCard/fetchOGP'
import { LinkCard } from '@/components/organisms/LinkCard/LinkCard'
import { SkeletonLinkCard } from '@/components/organisms/LinkCard/SkeletonLinkCard'
-export type ClientLinkCardProps = Omit, 'children'> & {
+type ClientLinkCardProps = Omit, 'children'> & {
href: string
}
diff --git a/apps/trpfrog.net/src/components/organisms/LinkCard/LinkCard.tsx b/apps/trpfrog.net/src/components/organisms/LinkCard/LinkCard.tsx
index 40948606..3723333e 100644
--- a/apps/trpfrog.net/src/components/organisms/LinkCard/LinkCard.tsx
+++ b/apps/trpfrog.net/src/components/organisms/LinkCard/LinkCard.tsx
@@ -35,7 +35,7 @@ export const createLinkCardStyles = tv({
},
})
-export type LinkCardProps = Omit, 'children'> & {
+type LinkCardProps = Omit, 'children'> & {
title: string
description?: string
imageUrl?: string
diff --git a/apps/trpfrog.net/src/components/organisms/LinkCard/ServerLinkCard.tsx b/apps/trpfrog.net/src/components/organisms/LinkCard/ServerLinkCard.tsx
index 7eac9cad..7bfd51fe 100644
--- a/apps/trpfrog.net/src/components/organisms/LinkCard/ServerLinkCard.tsx
+++ b/apps/trpfrog.net/src/components/organisms/LinkCard/ServerLinkCard.tsx
@@ -9,7 +9,7 @@ import { LinkCard } from '@/components/organisms/LinkCard/LinkCard'
import { fetchOGP } from './fetchOGP'
-export type LinkCardProps = Omit, 'children'> & {
+type LinkCardProps = Omit, 'children'> & {
href: string
fallbackToClient?: boolean
fallbackToClientMillis?: number
diff --git a/apps/trpfrog.net/src/components/organisms/LinkCard/SkeletonLinkCard.tsx b/apps/trpfrog.net/src/components/organisms/LinkCard/SkeletonLinkCard.tsx
index 7bbace83..c5ff9d1c 100644
--- a/apps/trpfrog.net/src/components/organisms/LinkCard/SkeletonLinkCard.tsx
+++ b/apps/trpfrog.net/src/components/organisms/LinkCard/SkeletonLinkCard.tsx
@@ -6,7 +6,7 @@ import { createHostnameStyles } from '@/components/organisms/LinkCard/Hostname'
import { createLinkCardStyles } from '@/components/organisms/LinkCard/LinkCard'
import { A } from '@/components/wrappers'
-export type LinkCardProps = Omit, 'children'>
+type LinkCardProps = Omit, 'children'>
export function SkeletonLinkCard(props: LinkCardProps) {
const styles = createLinkCardStyles()
diff --git a/apps/trpfrog.net/src/components/organisms/LinkCard/index.ts b/apps/trpfrog.net/src/components/organisms/LinkCard/index.ts
index 977b9202..b9c4e589 100644
--- a/apps/trpfrog.net/src/components/organisms/LinkCard/index.ts
+++ b/apps/trpfrog.net/src/components/organisms/LinkCard/index.ts
@@ -1,2 +1 @@
export { LinkCard } from './LinkCard'
-export type { LinkCardProps } from './LinkCard'
diff --git a/apps/trpfrog.net/src/components/organisms/YouTube.tsx b/apps/trpfrog.net/src/components/organisms/YouTube.tsx
index 785ea300..547ec6fb 100644
--- a/apps/trpfrog.net/src/components/organisms/YouTube.tsx
+++ b/apps/trpfrog.net/src/components/organisms/YouTube.tsx
@@ -2,7 +2,7 @@ import { memo } from 'react'
import { YouTubeEmbed } from '@next/third-parties/google'
-export interface YouTubeProps {
+interface YouTubeProps {
videoId: string
}
diff --git a/apps/trpfrog.net/src/components/utils/MathJaxWrapper.tsx b/apps/trpfrog.net/src/components/utils/MathJaxWrapper.tsx
deleted file mode 100644
index 88b87593..00000000
--- a/apps/trpfrog.net/src/components/utils/MathJaxWrapper.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * This is a wrapper for MathJax to prevent the Server Component error.
- */
-
-'use client'
-
-import * as React from 'react'
-
-import { MathJax, MathJaxContext, MathJaxContextProps, MathJaxProps } from 'better-react-mathjax'
-
-export function MathJaxContextWrapper(props: MathJaxContextProps) {
- return
-}
-
-export function MathJaxWrapper(props: MathJaxProps & { children: React.ReactNode }) {
- return
-}
diff --git a/apps/trpfrog.net/src/components/wrappers/H2.tsx b/apps/trpfrog.net/src/components/wrappers/H2.tsx
index 3637ec40..a9e7fe03 100644
--- a/apps/trpfrog.net/src/components/wrappers/H2.tsx
+++ b/apps/trpfrog.net/src/components/wrappers/H2.tsx
@@ -3,7 +3,7 @@ import * as React from 'react'
import { tv } from '@/lib/tailwind/variants'
import { zodEnumFromObjKeys } from '@/lib/zod'
-export const iconURLs = {
+const iconURLs = {
trpfrog: '/images/icons/trpfrog.webp',
ice: '/images/icons/ice.webp',
think: '/images/icons/thinking.webp',
diff --git a/apps/trpfrog.net/src/components/wrappers/Input.tsx b/apps/trpfrog.net/src/components/wrappers/Input.tsx
index 240c41ac..4e338a5e 100644
--- a/apps/trpfrog.net/src/components/wrappers/Input.tsx
+++ b/apps/trpfrog.net/src/components/wrappers/Input.tsx
@@ -6,7 +6,7 @@ import { tv } from '@/lib/tailwind/variants'
type Props = React.ComponentPropsWithRef<'input'>
-export const inputBoxStyle = tv({
+const inputBoxStyle = tv({
base: 'tw-rounded-md tw-bg-gray-200 tw-p-1 dark:tw-bg-gray-700',
})
diff --git a/apps/trpfrog.net/src/hooks/useDisableScroll.ts b/apps/trpfrog.net/src/hooks/useDisableScroll.ts
deleted file mode 100644
index 1c508fb5..00000000
--- a/apps/trpfrog.net/src/hooks/useDisableScroll.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { useEffect } from 'react'
-
-export function useDisableScroll() {
- useEffect(() => {
- if (typeof window === 'undefined') {
- return
- }
- window.onscroll = () => {
- window.scrollTo(0, 0)
- }
- return () => {
- window.onscroll = null
- }
- })
-}
diff --git a/apps/trpfrog.net/src/hooks/useFullscreen.ts b/apps/trpfrog.net/src/hooks/useFullscreen.ts
deleted file mode 100644
index 8ee4a46d..00000000
--- a/apps/trpfrog.net/src/hooks/useFullscreen.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { useEffect } from 'react'
-
-export function useFullscreen() {
- useEffect(() => {
- if (typeof document === 'undefined') {
- return
- }
- const selectors: Record = {
- header: 'body > div:has(header)',
- nav: 'body > nav',
- footer: 'body > footer',
- mobileMenu: 'body > section',
- }
-
- const defaultStyle = Object.fromEntries(
- Object.entries(selectors).map(([key, selector]) => {
- const el = document.querySelector(selector)
- return [key, el ? (el as HTMLElement).style.display : '']
- }),
- )
-
- // hide header, nav, footer, mobile menu
- Object.values(selectors).forEach(selector => {
- const el = document.querySelector(selector)
- if (el) {
- ;(el as HTMLElement).style.display = 'none'
- }
- })
-
- // restore default style
- return () => {
- Object.entries(selectors).forEach(([key, selector]) => {
- const el = document.querySelector(selector)
- if (el) {
- ;(el as HTMLElement).style.display = defaultStyle[key]
- }
- })
- }
- })
-}
diff --git a/apps/trpfrog.net/src/hooks/useScrollPositionKeeper.ts b/apps/trpfrog.net/src/hooks/useScrollPositionKeeper.ts
deleted file mode 100644
index 7ea36287..00000000
--- a/apps/trpfrog.net/src/hooks/useScrollPositionKeeper.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from 'react'
-
-export function useScrollPositionKeeper(ref?: React.RefObject) {
- const scrollPosition = React.useRef(0)
-
- // restore scroll position
- React.useEffect(() => {
- const element = ref ? ref.current : typeof window !== 'undefined' ? window : undefined
- element?.scrollTo(0, scrollPosition.current)
- })
-
- // register scroll event
- React.useEffect(() => {
- const element = ref ? ref.current : typeof window !== 'undefined' ? window : undefined
- if (!element) return
-
- const handleScroll = () => {
- scrollPosition.current =
- 'scrollTop' in element ? element.scrollTop : element ? window.scrollY : 0
- }
-
- element.addEventListener('scroll', handleScroll)
- return () => {
- element.removeEventListener('scroll', handleScroll)
- }
- }, [ref])
-}
diff --git a/apps/trpfrog.net/src/lib/constants.ts b/apps/trpfrog.net/src/lib/constants.ts
index 747fc6fb..a481b8bf 100644
--- a/apps/trpfrog.net/src/lib/constants.ts
+++ b/apps/trpfrog.net/src/lib/constants.ts
@@ -1,5 +1,3 @@
-import { NODE_ENV } from '@/env/client'
-
export const LOREM_IPSUM = [
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, ',
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
@@ -10,23 +8,7 @@ export const LOREM_IPSUM = [
export const SITE_NAME = 'つまみネット'
-export const TWITTER_ID = 'TrpFrog'
-
-export const TRPFROG_DIFFUSION_DEFAULT_UPDATE_HOURS = 3
-export const TRPFROG_DIFFUSION_UPDATE_HOURS_EDGE_CONFIG_KEY = 'trpfrog-diffusion-update-hours'
-
-export const ATCODER_HIGHEST = 1596
-export const WALKING_FARTHEST = '70.5km'
-
export const PRODUCTION_ORIGIN = 'https://trpfrog.net'
export const DEVELOPMENT_ORIGIN = 'http://localhost:3000'
-export const HOST_URL =
- NODE_ENV === 'production'
- ? // eslint-disable-next-line n/no-process-env
- `https://${process.env.VERCEL_URL || 'trpfrog.net'}`
- : DEVELOPMENT_ORIGIN
-
export const DEFAULT_BLOG_THUMBNAIL = 'https://res.cloudinary.com/trpfrog/TwitterCard'
-
-export const MARKDOWN_WATCHER_PORT = 4000
diff --git a/apps/trpfrog.net/src/lib/setTimeoutPromise.ts b/apps/trpfrog.net/src/lib/setTimeoutPromise.ts
deleted file mode 100644
index eb73fb99..00000000
--- a/apps/trpfrog.net/src/lib/setTimeoutPromise.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export function setTimeoutPromise(fn: () => T, ms: number): Promise {
- return new Promise(resolve => {
- setTimeout(() => {
- resolve(fn())
- }, ms)
- })
-}
diff --git a/apps/trpfrog.net/src/lib/types.ts b/apps/trpfrog.net/src/lib/types.ts
deleted file mode 100644
index d493999b..00000000
--- a/apps/trpfrog.net/src/lib/types.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { MDXComponents } from 'mdx/types'
-
-type InnerCamelToKebabCase = S extends `${infer T}${infer U}`
- ? `${T extends Capitalize ? '-' : ''}${Lowercase}${InnerCamelToKebabCase}`
- : S
-
-export type CamelToKebabCase = InnerCamelToKebabCase>
-
-export type PropertyIntersect = Pick>
-
-/**
- * @deprecated Use `MDXComponents` from `mdx/types` instead
- */
-export type IsomorphicMarkdownComponent = MDXComponents
-
-export type SelectedRequired = Required> & Omit
diff --git a/apps/trpfrog.net/src/lib/utils.ts b/apps/trpfrog.net/src/lib/utils.ts
index 9dac905c..5cfe1327 100644
--- a/apps/trpfrog.net/src/lib/utils.ts
+++ b/apps/trpfrog.net/src/lib/utils.ts
@@ -7,31 +7,6 @@ export function clamp(x: number, min: number, max: number): number {
return x
}
-export function calcMonospacedTextWidth(text: string): number {
- // Consider ASCII figures and half-width kana as half-width figures
- const doubledSizes = text.replace(/[\x20-\x7e ヲ-゚]/g, '').length
- return text.length + doubledSizes
-}
-
-export function sortWithDates(
- a: `${number}/${number}/${number}`,
- b: `${number}/${number}/${number}`,
-) {
- const aDate = a.split('/').map(Number) as [number, number, number]
- const bDate = b.split('/').map(Number) as [number, number, number]
- if (aDate[0] !== bDate[0]) {
- return bDate[0] - aDate[0]
- }
- if (aDate[1] !== bDate[1]) {
- return bDate[1] - aDate[1]
- }
- return bDate[2] - aDate[2]
-}
-
-export function getTypedKeys>(obj: T): (keyof T)[] {
- return Object.keys(obj)
-}
-
export function getTypedEntries>(
obj: T,
): [keyof T, T[keyof T]][] {
diff --git a/apps/trpfrog.net/src/lib/wordSplit/client.tsx b/apps/trpfrog.net/src/lib/wordSplit/client.tsx
deleted file mode 100644
index 276430ca..00000000
--- a/apps/trpfrog.net/src/lib/wordSplit/client.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client'
-import { loadDefaultJapaneseParser } from 'budoux'
-
-import { BudouXCommon, parseUsingBudouxParser } from './common'
-const budouXParser = loadDefaultJapaneseParser()
-
-export function useBudouX(text: string) {
- return parseUsingBudouxParser(budouXParser.parse, text)
-}
-
-export function BudouXClient(props: { text: string }) {
- return
-}
diff --git a/apps/trpfrog.net/src/lib/wordSplit/server.tsx b/apps/trpfrog.net/src/lib/wordSplit/server.tsx
deleted file mode 100644
index 4f0a5c8f..00000000
--- a/apps/trpfrog.net/src/lib/wordSplit/server.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import 'server-only'
-import { loadDefaultJapaneseParser } from 'budoux/dist'
-
-import { BudouXCommon, parseUsingBudouxParser } from './common'
-const budouXParser = loadDefaultJapaneseParser()
-
-export function BudouXSSR(props: { text: string }) {
- return
-}
-
-export function parseWithBudouXOnServer(text: string) {
- return parseUsingBudouxParser(budouXParser.parse, text)
-}
diff --git a/package.json b/package.json
index 78d4a746..00431df2 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"devDependencies": {
"@eslint/config-inspector": "^0.5.4",
"@evilmartians/lefthook": "^1.7.11",
+ "@line/ts-remove-unused": "^0.5.2",
"@trpfrog.net/config-eslint": "workspace:*",
"@types/node": "^20.14.12",
"@vitejs/plugin-react": "^4.3.1",
@@ -25,6 +26,8 @@
"happy-dom": "^14.12.3",
"prettier": "3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5",
+ "prettier-plugin-classnames": "^0.7.3",
+ "prettier-plugin-merge": "^0.7.1",
"turbo": "^2.1.3",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0a437938..b9fff0a5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -18,6 +18,9 @@ importers:
'@evilmartians/lefthook':
specifier: ^1.7.11
version: 1.7.11
+ '@line/ts-remove-unused':
+ specifier: ^0.5.2
+ version: 0.5.2(typescript@5.5.4)
'@trpfrog.net/config-eslint':
specifier: workspace:*
version: link:packages/config-eslint
@@ -39,6 +42,12 @@ importers:
prettier:
specifier: 3.3.3
version: 3.3.3
+ prettier-plugin-classnames:
+ specifier: ^0.7.3
+ version: 0.7.3(prettier@3.3.3)
+ prettier-plugin-merge:
+ specifier: ^0.7.1
+ version: 0.7.1(prettier@3.3.3)
prettier-plugin-tailwindcss:
specifier: ^0.6.5
version: 0.6.5(prettier@3.3.3)
@@ -2475,6 +2484,12 @@ packages:
resolution: {integrity: sha512-PQGmnnKbsC8odwjGbYf2aHAQEZ/uVXYtXqKnwk7BTVMZlFnt+Rt9eigp940xMKAadxHzqtKJpSd7Xf6G+LI6KA==}
engines: {node: '>=18'}
+ '@line/ts-remove-unused@0.5.2':
+ resolution: {integrity: sha512-1eKXUiL4+bxsy5V7aTAs/IMFH5M6NVwwF9Dn9dTF1/avZf+qgbj2kjOwSqgyk9NERNP7yX4PY5ylyN6hGZ5efw==}
+ hasBin: true
+ peerDependencies:
+ typescript: '>=4.0.0'
+
'@mdx-js/loader@3.0.1':
resolution: {integrity: sha512-YbYUt7YyEOdFxhyuCWmLKf5vKhID/hJAojEUnheJk4D8iYVLFQw+BAoBWru/dHGch1omtmZOPstsmKPyBF68Tw==}
peerDependencies:
@@ -5522,6 +5537,10 @@ packages:
resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
+ diff@5.1.0:
+ resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==}
+ engines: {node: '>=0.3.1'}
+
diffie-hellman@5.0.3:
resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==}
@@ -8302,6 +8321,25 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
+ prettier-plugin-classnames@0.7.3:
+ resolution: {integrity: sha512-pl7RENikiCq0FpjyO/7XayLV49VXPGyBkbPnEmEkaicGweOnO0GrUaCeo2GvqB/rzERGvBRurB6/yQPF70WPTQ==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ prettier: ^2 || ^3
+ prettier-plugin-astro: '*'
+ prettier-plugin-svelte: '*'
+ peerDependenciesMeta:
+ prettier-plugin-astro:
+ optional: true
+ prettier-plugin-svelte:
+ optional: true
+
+ prettier-plugin-merge@0.7.1:
+ resolution: {integrity: sha512-R3dSlv3kAlScjd/liWjTkGHcUrE4MBhPKKBxVOvHK7+FY2P5SEmLarZiD11VUEuaMRK0L7zqIurX6JcRYS9Y5Q==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ prettier: ^2 || ^3
+
prettier-plugin-tailwindcss@0.6.5:
resolution: {integrity: sha512-axfeOArc/RiGHjOIy9HytehlC0ZLeMaqY09mm8YCkMzznKiDkwFzOpBvtuhuv3xG5qB73+Mj7OCe2j/L1ryfuQ==}
engines: {node: '>=14.21.3'}
@@ -12249,6 +12287,12 @@ snapshots:
- encoding
- langchain
+ '@line/ts-remove-unused@0.5.2(typescript@5.5.4)':
+ dependencies:
+ cac: 6.7.14
+ chalk: 5.3.0
+ typescript: 5.5.4
+
'@mdx-js/loader@3.0.1(webpack@5.92.1(@swc/core@1.6.13(@swc/helpers@0.5.13))(esbuild@0.18.20))':
dependencies:
'@mdx-js/mdx': 3.0.1
@@ -16189,6 +16233,8 @@ snapshots:
diff-sequences@29.6.3: {}
+ diff@5.1.0: {}
+
diffie-hellman@5.0.3:
dependencies:
bn.js: 4.12.0
@@ -19774,6 +19820,15 @@ snapshots:
prelude-ls@1.2.1: {}
+ prettier-plugin-classnames@0.7.3(prettier@3.3.3):
+ dependencies:
+ prettier: 3.3.3
+
+ prettier-plugin-merge@0.7.1(prettier@3.3.3):
+ dependencies:
+ diff: 5.1.0
+ prettier: 3.3.3
+
prettier-plugin-tailwindcss@0.6.5(prettier@3.3.3):
dependencies:
prettier: 3.3.3
diff --git a/prettier.config.js b/prettier.config.js
index b077af5e..fcafdab1 100644
--- a/prettier.config.js
+++ b/prettier.config.js
@@ -2,7 +2,7 @@
/** @type {import("prettier").Config} */
const config = {
- plugins: ['prettier-plugin-tailwindcss'],
+ plugins: ['prettier-plugin-tailwindcss', 'prettier-plugin-classnames', 'prettier-plugin-merge'],
trailingComma: 'all',
tabWidth: 2,
semi: false,