refactor: delete sticker.ts (#1899 #1900)

This commit is contained in:
2026-09-14 20:45:14 +08:00
parent 21335df135
commit d8596fec28
@@ -1,93 +0,0 @@
/**
* 贴纸配置类型
*/
/** 贴纸类型 */
export type StickerType = "emoji" | "image" | "text"
/** 文字花字预设 */
export type TextStickerPreset =
| "normal" // 普通
| "highlight" // 高亮
| "bubble" // 气泡
| "neon" // 霓虹
| "shadow" // 投影
| "outline" // 描边
| "gradient" // 渐变
| "handwrite" // 手写
/** 贴纸项 */
export interface StickerItem {
id: string
/** 贴纸类型 */
type: StickerType
/** 内容(emoji 字符 / 图片 URL / 文字内容) */
content: string
/** X 坐标(百分比 0~100) */
x: number
/** Y 坐标(百分比 0~100) */
y: number
/** 宽度(百分比 0~100) */
width: number
/** 高度(百分比 0~100) */
height: number
/** 旋转角度(度 -180~180) */
rotation: number
/** 不透明度(0~100) */
opacity: number
/** 开始时间(秒) */
start_time: number
/** 持续时长(秒,0 表示全程显示) */
duration: number
/** 图层顺序 */
z_index: number
/** 文字花字预设(仅 type=text 时有效) */
text_preset: TextStickerPreset
/** 文字颜色(仅 type=text 时有效) */
text_color: string
/** 文字大小(px,仅 type=text 时有效) */
font_size: number
}
/** 贴纸配置 */
export interface StickerConfig {
enabled: boolean
items: StickerItem[]
}
/** 默认贴纸项 */
export const DEFAULT_STICKER_ITEM: StickerItem = {
id: "",
type: "emoji",
content: "😀",
x: 50,
y: 50,
width: 15,
height: 15,
rotation: 0,
opacity: 100,
start_time: 0,
duration: 0,
z_index: 1,
text_preset: "normal",
text_color: "#FFFFFF",
font_size: 24,
}
/** 默认贴纸配置 */
export const DEFAULT_STICKER_CONFIG: StickerConfig = {
enabled: false,
items: [],
}
/** 文字花字预设标签 */
export const TEXT_STICKER_PRESET_LABELS: Record<TextStickerPreset, string> = {
normal: "普通",
highlight: "高亮",
bubble: "气泡",
neon: "霓虹",
shadow: "投影",
outline: "描边",
gradient: "渐变",
handwrite: "手写",
}