diff --git a/apps/web/src/pages/editing-planner/components/TransitionSelector.tsx b/apps/web/src/pages/editing-planner/components/TransitionSelector.tsx deleted file mode 100644 index 9c087209d..000000000 --- a/apps/web/src/pages/editing-planner/components/TransitionSelector.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/** - * 转场特效选择器 — Drawer 形式 - * 14 种转场预设卡片网格 + 转场时长滑块 - * 支持全局默认转场 + 单个片段间独立设置 - */ -import React, { useCallback } from "react" -import { Drawer, Slider } from "antd" -import { TRANSITION_OPTIONS } from "@/api/template-editor" -import type { TransitionConfig, TransitionType } from "../types" -import { DEFAULT_TRANSITION } from "../types" - -/* ──────────── Props ──────────── */ -interface TransitionSelectorProps { - open: boolean - onClose: () => void - /** 当前转场配置 */ - config: TransitionConfig - onChange: (config: TransitionConfig) => void - /** 标题提示(区分全局 / 片段间) */ - title?: string -} - -const TransitionSelector: React.FC = ({ - open, - onClose, - config, - onChange, - title = "转场特效", -}) => { - /* ── 选择转场类型 ── */ - const handleSelectType = useCallback( - (type: TransitionType) => { - onChange({ ...config, type }) - }, - [config, onChange], - ) - - /* ── 修改时长 ── */ - const handleChangeDuration = useCallback( - (duration: number) => { - onChange({ ...config, duration }) - }, - [config, onChange], - ) - - /* ── 重置为无转场 ── */ - const handleReset = useCallback(() => { - onChange({ ...DEFAULT_TRANSITION }) - }, [onChange]) - - return ( - - {/* ── 时长滑块 ── */} -
-
- 转场时长 - {config.duration.toFixed(1)}s -
- `${(v as number).toFixed(1)}s` }} - /> -
- 0.3s - 1.0s - 2.0s -
-
- - {/* ── 转场类型卡片网格 ── */} -
- {TRANSITION_OPTIONS.map((opt) => { - const isActive = config.type === opt.value - return ( -
handleSelectType(opt.value)} - > -
{opt.icon}
-
{opt.label}
- {isActive && ✓} -
- ) - })} -
- - {/* ── 底部操作 ── */} -
- -
- 当前: - {TRANSITION_OPTIONS.find((o) => o.value === config.type)?.label ?? "无转场"} - {" · "} - {config.duration.toFixed(1)}s -
-
-
- ) -} - -export default TransitionSelector