refactor: simplify build process and remove unused components

- Updated the build script for the client to streamline the process by removing TypeScript compilation.
- Removed the LinearBorderPanel component and its associated exports from the index file, cleaning up unused code.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-11-23 19:45:24 +08:00
parent d5a2ea4db2
commit 4b931f8c7a
3 changed files with 2 additions and 72 deletions

View File

@@ -5,7 +5,7 @@
"private": true,
"scripts": {
"build": "pnpm build:client && pnpm build:static && pnpm output",
"build:client": "tsc -b && vite build",
"build:client": "vite build",
"build:static": "vite build --ssr src/main-static.tsx --outDir dist/static",
"create:doc": "tsx ../../scripts/create-doc.ts",
"dev": "vite",
@@ -67,4 +67,4 @@
"typescript-eslint": "^8.46.4",
"vite": "^7.2.2"
}
}
}

View File

@@ -1,69 +0,0 @@
import clsx from 'clsx'
import type { ReactNode } from 'react'
interface LinearBorderPanelProps {
className?: string
children: ReactNode
variant?: 'default' | 'subtle' | 'accent'
}
export function LinearBorderPanel({ className, children, variant = 'default' }: LinearBorderPanelProps) {
const variantClass = {
default: 'border-line-default',
subtle: 'border-line-subtle',
accent: 'border-line-accent',
}[variant]
return (
<div className={clsx('group relative overflow-hidden', variantClass, className)}>
{/* Top border */}
<div className="border-line-top absolute top-0 right-0 left-0 h-[0.5px]" />
{/* Right border */}
<div className="border-line-right absolute top-0 right-0 bottom-0 w-[0.5px]" />
{/* Bottom border */}
<div className="border-line-bottom absolute right-0 bottom-0 left-0 h-[0.5px]" />
{/* Left border */}
<div className="border-line-left absolute top-0 bottom-0 left-0 w-[0.5px]" />
<div className="relative">{children}</div>
</div>
)
}
/**
* Divider component - horizontal line separator
*/
export function Divider({
className,
variant = 'default',
}: {
className?: string
variant?: 'default' | 'subtle' | 'accent'
}) {
const variantClass = {
default: 'divider-default',
subtle: 'divider-subtle',
accent: 'divider-accent',
}[variant]
return <div className={clsx('h-[0.5px] w-full', variantClass, className)} />
}
/**
* Vertical divider component
*/
export function VerticalDivider({
className,
variant = 'default',
}: {
className?: string
variant?: 'default' | 'subtle' | 'accent'
}) {
const variantClass = {
default: 'divider-vertical-default',
subtle: 'divider-vertical-subtle',
accent: 'divider-vertical-accent',
}[variant]
return <div className={clsx('h-full w-[0.5px]', variantClass, className)} />
}

View File

@@ -1,7 +1,6 @@
export { ContentFooter } from './ContentFooter'
export { DocumentNavigation } from './DocumentNavigation'
export { HeaderLogoSection } from './HeaderLogoSection'
export { Divider, LinearBorderPanel, VerticalDivider } from './LinearBorderPanel'
export { MDX } from './MDX'
export { MobileTableOfContents } from './MobileTableOfContents'
export { Sidebar } from './Sidebar'