package port import ( "context" "github.com/bnema/dumber/internal/application/dto" "github.com/bnema/dumber/internal/domain/entity" ) // AccentKeyHandler receives accent/dead-key events from the WebView JS bridge. type AccentKeyHandler interface { OnKeyPressed(ctx context.Context, char rune, shiftHeld bool) bool OnKeyReleased(ctx context.Context, char rune) } // DownloadPreparer resolves download destination paths with deduplication. type DownloadPreparer interface { Execute(ctx context.Context, input DownloadPrepareInput) *DownloadPrepareOutput } // DownloadPrepareInput matches usecase.PrepareDownloadInput. type DownloadPrepareInput struct { SuggestedFilename string Response DownloadResponse DownloadDir string } // DownloadPrepareOutput matches usecase.PrepareDownloadOutput. type DownloadPrepareOutput struct { Filename string DestinationPath string } // AutoCopyConfig provides the clipboard auto-copy setting. type AutoCopyConfig interface { IsAutoCopyEnabled() bool } // HandlerDeps holds handler dependencies built at bootstrap time. // Lives in the port layer so both bootstrap and ui can depend on it // without creating a reverse dependency. // // This is an intentional exception to the interfaces-only port layer guideline. // A struct is used here to avoid reverse dependencies between the bootstrap and // UI layers, which both need to reference this shared dependency container. type HandlerDeps struct { SaveConfig func(context.Context, dto.WebUIConfig) error SaveOmniboxInitialBehavior func(context.Context, entity.OmniboxInitialBehavior) error SaveModeLegendCollapsed func(context.Context, bool) error KeybindingsGetter KeybindingsGetter KeybindingSetter KeybindingSetter KeybindingResetter KeybindingResetter AllKeybindingsResetter AllKeybindingsResetter }