DropletLauncherService

Droppy's commands, settings, droplets and content, for a droplet that draws a launcher.

@MainActor protocol DropletLauncherService : AnyObject

The catalog is what Droppy lists without a query; index it with your own search and it gains everything your launcher does for its own items. search(_:) answers a typed query with what only Droppy can search: clipboard history, notes, tasks, OCR results, the shelf and the web.

Requires the launcher capability. Without it, isAvailable is false, the catalog is empty and nothing runs.

Supported since DroppyKit 1.12.0, Droppy 15.3: declare minAPI 1.12.0.

Properties

catalog

@MainActor var catalog: [DropletLauncherItem] { get }

Everything Droppy lists without a query.

catalogDidChange

@MainActor var catalogDidChange: AnyPublisher<Void, Never> { get }

Fires when catalog changed: a droplet was installed, a setting switched a command off.

isAvailable

@MainActor var isAvailable: Bool { get }

Whether this host offers anything at all.

Methods

makeDetailView(itemID:context:)

@MainActor func makeDetailView(itemID: String, context: DropletLauncherDetailContext) -> AnyView?

The surface an item opens inside the launcher, after perform(itemID:actionID:query:) answered presentDetail.

perform(itemID:actionID:query:)

@discardableResult @MainActor func perform(itemID: String, actionID: String?, query: String) -> DropletLauncherOutcome

Runs an action on an item. actionID nil is the primary action. query is what was typed, for a web search that carries it.

@MainActor func search(_ query: String) async -> [DropletLauncherItem]

Content matching a typed query, best first. Returns quickly and never throws; an empty or cancelled query answers [].