import './globals.css'; import React, { useEffect, useState } from 'react'; import { ThemeShell, NavGroup, NavItem, MarkdownViewer } from '../../common/ThemeShell'; /** * Firecrawl 主题演示页 */ const groups: NavGroup[] = [ { id: 'docs', title: '说明', order: 1 }, { id: 'foundation', title: '基础', order: 2 }, { id: 'components', title: '组件', order: 3 }, ]; const items: NavItem[] = [ { id: 'design-spec', label: '设计规范 Design Spec', groupId: 'docs' }, { id: 'colors', label: '色彩系统', groupId: 'foundation' }, { id: 'typography', label: '字体系统', groupId: 'foundation' }, { id: 'spacing', label: '间距', groupId: 'foundation' }, { id: 'radius', label: '圆角', groupId: 'foundation' }, { id: 'shadows', label: '阴影', groupId: 'foundation' }, { id: 'icons', label: '图标', groupId: 'foundation' }, { id: 'buttons', label: '按钮', groupId: 'components' }, { id: 'cards', label: '卡片', groupId: 'components' }, { id: 'inputs', label: '输入框', groupId: 'components' }, ]; function ColorSwatch({ name, color, hex, textDark = false, light = false }: { name: string; color: string; hex: string; textDark?: boolean; light?: boolean; }) { return (
{textDark && ( Aa )}
{name}
{hex}
); } function ColorsSection() { return (

色彩系统 (Colors)

Primary

Background & Surface

Text Colors

Semantic Colors

); } function TypographySection() { return (

字体系统 (Typography)

H1 / 28px / 500

Firecrawl UI Spec

H2 / 20px / 450

Section Heading

Body / 16px / 400

The quick brown fox jumps over the lazy dog. 敏捷的棕色狐狸跳过了懒狗。

Body Small / 14px / 400

辅助说明文本与注释内容。

Label / 14px / 450

Label Text

Code / 14px / Geist Mono

curl -X POST https://api.firecrawl.dev

); } function SpacingSection() { return (

间距 (Spacing)

2/4/8px Rhythm

{[ { name: '--spacing-1', value: 'var(--spacing-1)' }, { name: '--spacing-2', value: 'var(--spacing-2)' }, { name: '--spacing-3', value: 'var(--spacing-3)' }, { name: '--spacing-4', value: 'var(--spacing-4)' }, { name: '--spacing-6', value: 'var(--spacing-6)' }, { name: '--spacing-8', value: 'var(--spacing-8)' }, { name: '--spacing-10', value: 'var(--spacing-10)' }, { name: '--spacing-12', value: 'var(--spacing-12)' }, { name: '--spacing-20', value: 'var(--spacing-20)' }, ].map(({ name, value }) => (
{name}: {value}
))}
); } function RadiusSection() { return (

圆角 (Radius)

Border Radius Tokens

{[ { name: '--radius-sm', value: 'var(--radius-sm)' }, { name: '--radius-md', value: 'var(--radius-md)' }, { name: '--radius-lg', value: 'var(--radius-lg)' }, { name: '--radius-xl', value: 'var(--radius-xl)' }, { name: '--radius-2xl', value: 'var(--radius-2xl)' }, { name: '--radius-full', value: 'var(--radius-full)' }, ].map(({ name, value }) => (
{name}
{value}
))}
); } function ShadowsSection() { return (

阴影 (Shadows)

{[ { name: '--shadow-sm', value: 'var(--shadow-sm)', desc: '轻量卡片、列表' }, { name: '--shadow-md', value: 'var(--shadow-md)', desc: '浮层、弹窗' }, ].map(({ name, value, desc }) => (
{name}
{desc}
{value}
))}
); } function IconsSection() { const iconStyle: React.CSSProperties = { width: '24px', height: '24px', color: 'var(--muted-foreground)' }; return (

图标 (Icons)

{[ { name: 'Spark', svg: ( ) }, { name: 'Search', svg: ( ) }, { name: 'Terminal', svg: ( ) }, { name: 'Globe', svg: ( ) }, { name: 'Code', svg: ( ) }, { name: 'Webhook', svg: ( ) }, ].map(({ name, svg }) => (
{svg}
{name}
24px / 1.5px
))}
); } function ButtonsSection() { return (

按钮 (Buttons)

); } function CardsSection() { return (

卡片 (Cards)

Card Title

这是一个基础卡片组件,使用 card 背景色与轻量阴影。

Elevated Card

悬浮卡片使用更明显的阴影层级。

Accent Card

使用品牌色作为强调边框,突出重要内容。

); } function InputsSection() { return (

输入框 (Inputs)