From 3f9e99347ddc871c68beed86535e5f5184595e97 Mon Sep 17 00:00:00 2001 From: duriantaco Date: Sat, 20 Jun 2026 08:57:24 +0800 Subject: [PATCH] Remove unused docs and integration helpers --- integrations/vite/src/components/Children.tsx | 43 ------------------- .../vite/src/components/DebugData.tsx | 22 ---------- integrations/vite/src/components/Resizer.tsx | 8 ---- integrations/vite/src/utils/assert.ts | 10 ----- integrations/vite/src/utils/cn.ts | 6 --- src/components/ContinueLink.tsx | 10 ----- src/components/Divider.tsx | 3 -- 7 files changed, 102 deletions(-) delete mode 100644 integrations/vite/src/components/Children.tsx delete mode 100644 integrations/vite/src/components/DebugData.tsx delete mode 100644 integrations/vite/src/components/Resizer.tsx delete mode 100644 integrations/vite/src/utils/assert.ts delete mode 100644 integrations/vite/src/utils/cn.ts delete mode 100644 src/components/ContinueLink.tsx delete mode 100644 src/components/Divider.tsx diff --git a/integrations/vite/src/components/Children.tsx b/integrations/vite/src/components/Children.tsx deleted file mode 100644 index d6ffee6..0000000 --- a/integrations/vite/src/components/Children.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { useLayoutEffect, useState } from "react"; - -export type SizeProps = { - height: number | undefined; - width: number | undefined; -}; - -export const Children = function Children({ - height, - onCommitLogsChange, - width, -}: SizeProps & { - onCommitLogsChange: (logs: SizeProps[]) => void; -}) { - const [commitLogs, setCommitLogs] = useState([]); - - useLayoutEffect(() => { - setCommitLogs((prev) => [ - ...prev, - { - height: - height === undefined ? undefined : parseFloat(height.toFixed(1)), - width: width === undefined ? undefined : parseFloat(width.toFixed(1)), - } as SizeProps, - ]); - }, [height, width]); - - useLayoutEffect(() => onCommitLogsChange(commitLogs)); - - // Account for StrictMode double rendering on mount - useLayoutEffect( - () => () => { - setCommitLogs([]); - }, - [], - ); - - return ( -
- {width} x {height} pixels -
- ); -}; diff --git a/integrations/vite/src/components/DebugData.tsx b/integrations/vite/src/components/DebugData.tsx deleted file mode 100644 index 5fabdcb..0000000 --- a/integrations/vite/src/components/DebugData.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { cn } from "../utils/cn"; - -export function DebugData({ data }: { data: object }) { - return ( -
-      {JSON.stringify(data, replacer, 2)}
-    
- ); -} - -function replacer(_key: string, value: unknown) { - if (typeof value === "number") { - return Math.round(value); - } - - return value; -} diff --git a/integrations/vite/src/components/Resizer.tsx b/integrations/vite/src/components/Resizer.tsx deleted file mode 100644 index c054f62..0000000 --- a/integrations/vite/src/components/Resizer.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { type PropsWithChildren } from "react"; - -export type ResizerProps = PropsWithChildren; - -export function Resizer({ children: childrenProp }: ResizerProps) { - // TODO - return childrenProp; -} diff --git a/integrations/vite/src/utils/assert.ts b/integrations/vite/src/utils/assert.ts deleted file mode 100644 index 7f8d7cc..0000000 --- a/integrations/vite/src/utils/assert.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function assert( - expectedCondition: unknown, - message: string = "Assertion error", -): asserts expectedCondition { - if (!expectedCondition) { - console.error(message); - - throw Error(message); - } -} diff --git a/integrations/vite/src/utils/cn.ts b/integrations/vite/src/utils/cn.ts deleted file mode 100644 index 365058c..0000000 --- a/integrations/vite/src/utils/cn.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type ClassValue, clsx } from "clsx"; -import { twMerge } from "tailwind-merge"; - -export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); -} diff --git a/src/components/ContinueLink.tsx b/src/components/ContinueLink.tsx deleted file mode 100644 index cc167c5..0000000 --- a/src/components/ContinueLink.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import type { Path } from "../routes"; -import { Link } from "./Link"; - -export function ContinueLink({ title, to }: { title: string; to: Path }) { - return ( -
- Continue to {title}… -
- ); -} diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx deleted file mode 100644 index c0aae74..0000000 --- a/src/components/Divider.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export function Divider() { - return
; -}