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.
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import type { GenerateSettings } from "@editor/tools";
|
||||
import type { AppStore } from "@editor/store";
|
||||
import type { GenerationResourcesState } from "@editor/state";
|
||||
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, resources, open, dispatch }: GenerateSheetProps) {
|
||||
export function GenerateSheet({ settings, document, selection, resources, generation, open, dispatch }: GenerateSheetProps) {
|
||||
return (
|
||||
<aside
|
||||
id="generate-sheet"
|
||||
@@ -22,7 +28,8 @@ export function GenerateSheet({ settings, resources, open, dispatch }: GenerateS
|
||||
>
|
||||
{open ? (
|
||||
<div className="subtle-scrollbar min-h-0 flex-1 overflow-auto py-4">
|
||||
<GenerateControls settings={settings} resources={resources} dispatch={dispatch} />
|
||||
<CandidateReviewPanel generation={generation} dispatch={dispatch} />
|
||||
<GenerateControls settings={settings} document={document} selection={selection} resources={resources} dispatch={dispatch} />
|
||||
</div>
|
||||
) : null}
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user