Files
image-studio/view/GenerateSheet.tsx
syntaxbullet ff762b8f17 feat: add inpaint region functionality and related tools
- Enhanced cursor behavior for new tools: semantic select, mask lasso, and mask rectangle.
- Updated mask edit state to include mask asset ID and kind.
- Implemented inpaint region commands for adding, applying, and removing inpaint regions.
- Introduced new operations for lasso and semantic selection tools.
- Created UI components for candidate review and inpaint region management.
- Added tests for inpaint region commands to ensure functionality.
- Updated various components to support new inpaint features and improve user experience.
2026-07-11 16:41:22 +02:00

38 lines
1.6 KiB
TypeScript

import type { GenerateSettings } from "@editor/tools";
import type { AppStore } from "@editor/store";
import type { GenerationResourcesState, GenerationState } from "@editor/state";
import { GenerateControls } from "./bottom-controls/GenerateControls";
import type { ImageDocument } from "@core/document";
import type { SelectionState } from "@editor/state";
import { CandidateReviewPanel } from "./inpaint/CandidateReviewPanel";
export type GenerateSheetProps = {
settings: GenerateSettings;
document: ImageDocument;
selection: SelectionState;
resources: GenerationResourcesState;
generation: GenerationState;
open: boolean;
dispatch: AppStore["dispatch"];
};
export function GenerateSheet({ settings, document, selection, resources, generation, open, dispatch }: GenerateSheetProps) {
return (
<aside
id="generate-sheet"
aria-hidden={!open}
aria-label="Generate settings"
className={`app-surface pointer-events-auto absolute bottom-3 right-3 top-[4.5rem] z-20 flex w-[22rem] max-w-[calc(100vw-1.5rem)] flex-col overflow-hidden rounded-xl px-3 text-sm text-white transition-all duration-200 ${
open ? "translate-x-0 opacity-100" : "pointer-events-none translate-x-8 opacity-0"
}`}
>
{open ? (
<div className="subtle-scrollbar min-h-0 flex-1 overflow-auto py-4">
<CandidateReviewPanel generation={generation} dispatch={dispatch} />
<GenerateControls settings={settings} document={document} selection={selection} resources={resources} dispatch={dispatch} />
</div>
) : null}
</aside>
);
}