feat: add in-canvas image crop panels
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-08 11:23:47 +08:00
parent 434d4d0d8d
commit e3948f4518
4 changed files with 2713 additions and 95 deletions

View File

@ -116,14 +116,17 @@ import {
Brain,
CheckCircle2,
Copy,
Crop,
Crosshair,
Download,
Eraser,
ExternalLink,
FlipHorizontal2,
FolderOpen,
Globe2,
HardDrive,
Plus,
SlidersHorizontal,
Edit,
Eye,
EyeOff,
@ -920,10 +923,13 @@ const CANVAS_TOOLBAR_FALLBACK_ICONS: Record<CanvasToolbarItemKey, LucideIcon> =
imageResize: Maximize2,
imageTextEdit: Type,
imageMultiAngle: Box,
imageAdjust: SlidersHorizontal,
imageFlipRotate: FlipHorizontal2,
imageGenerate3dModel: Box,
imageGenerate3dWorld: Globe2,
imageLayerSplit: Layers,
imageExtend: Expand,
imageCrop: Crop,
imagePromptRegenerate: RefreshCw,
imageNote: StickyNote,
imageRename: Edit,

File diff suppressed because it is too large Load Diff

View File

@ -247,6 +247,24 @@ export const DEFAULT_CANVAS_TOOLBAR_ITEMS = [
label: "扩图",
description: "扩展图片画幅",
},
{
key: "imageCrop",
group: "节点工具栏",
label: "裁剪",
description: "打开图片裁剪面板",
},
{
key: "imageAdjust",
group: "节点工具栏",
label: "调整",
description: "打开图片调整面板",
},
{
key: "imageFlipRotate",
group: "节点工具栏",
label: "翻转与旋转",
description: "打开图片翻转与旋转工具条",
},
{
key: "imagePromptRegenerate",
group: "节点工具栏",

View File

@ -266,7 +266,21 @@ export interface Attachment {
// 图片编辑操作
export interface ImageEditAction {
type: 'rmbg' | 'enhance' | 'enhance-pro' | 'extend' | 'resize' | 'angle-edit' | 'scene-fusion' | 'annotate' | 'text-edit' | 'box-cutout' | 'layer-split';
type:
| 'rmbg'
| 'enhance'
| 'enhance-pro'
| 'extend'
| 'crop'
| 'adjust'
| 'flip-rotate'
| 'resize'
| 'angle-edit'
| 'scene-fusion'
| 'annotate'
| 'text-edit'
| 'box-cutout'
| 'layer-split';
timestamp: Date;
params?: Record<string, any>;
resultUrl?: string;