import { FileUpIcon, FolderOpenIcon } from "lucide-react" import { Button, Card, CardContent, CardHeader, CardTitle, LoadingScreen, Progress } from "@hm-design/ui" import { SAMPLE_DRAWINGS, type SampleDrawing } from "../lib/samples" /** Shown on the empty canvas: the page's single brand action (open a file) plus the bundled samples. */ export function EmptyState({ onOpenFile, onSample }: { onOpenFile: () => void; onSample: (s: SampleDrawing) => void }) { return (
도면을 열어 주세요

DWG · DXF 파일을 선택하거나 이 화면에 끌어다 놓습니다. 주소에 ?model=경로를 붙이면 자동으로 엽니다.

샘플 도면

{SAMPLE_DRAWINGS.map((s) => ( ))}
) } export type LoadState = { /** Text for the LoadingScreen label and the status line. */ label: string /** 0–100 when measurable, null when not (no Content-Length). */ value: number | null /** A stage is running (LoadingScreen shown); false only for the brief "done" frame of the Progress bar. */ busy: boolean } /** * Load feedback, following HMDesign's split (loading-screen.md §2): * - Progress (top edge of the canvas) — the measurable part: download bytes, then stage steps. * - LoadingScreen (centre) — the unmeasurable part. WASM parsing and Viewer2D.load() block the main * thread; LoadingScreen's spinner is a CSS opacity keyframe animation the compositor can keep running. */ export function LoadingOverlay({ state }: { state: LoadState }) { return ( <> {state.value != null ? (
) : null} {state.busy ? (
{state.label}
) : null} ) } /** Drop target hint while a file is dragged over the window. */ export function DropOverlay() { return ( ) }