← All packages

API reference

@searsuite/sear-foundation-user-interaction

Portable interaction-state contracts for host input and editor behavior.

3 exportsderived from source

classUserInteractionServicesource ↗
class UserInteractionService

Host-provided, editor-local requests for a user's decision.

constructorconstructor
UserInteractionService(): UserInteractionService
propertysymbolstatic
readonly symbol: symbol
methodconfirm
confirm(request: UserConfirmationRequest): Promise<boolean>

Resolves true only when the user explicitly confirms.

request: UserConfirmationRequest
methoddestroy
destroy(): void

Cancels pending requests and releases host resources.

classWebUserInteractionServicesource ↗
class WebUserInteractionService extends UserInteractionService

Browser dialog adapter for explicit user confirmations.

constructorconstructor
WebUserInteractionService(documentRef?: Pick<Document, "body" | "createElement">): WebUserInteractionService
documentRef: Pick<Document, "body" | "createElement">
methodconfirm
confirm(request: UserConfirmationRequest): Promise<boolean>

Resolves true only when the user explicitly confirms.

request: UserConfirmationRequest
methoddestroy
destroy(): void

Cancels pending requests and releases host resources.

Inherited members 1

Inherited from UserInteractionService.

interfaceUserConfirmationRequestsource ↗
interface UserConfirmationRequest

A host-owned confirmation with explicit, localizable presentation text.

propertycancelLabel
readonly cancelLabel: string
propertyconfirmLabel
readonly confirmLabel: string
propertymessage
readonly message: string
propertytitle
readonly title: string