This mount's context: timers, listeners, windows, popups, page and local AI.
Signature
useToolbar(): Context
Take it from
const { useToolbar } = Bundleware;
Return Value
Member
Type
Description
id
string
This toolbar's @id.
signal
AbortSignal
Aborted when this mount ends.
onCleanup(dispose)
Dispose
timeout(callback, ms)
Dispose
interval(callback, ms)
Dispose
Minimum interval 16 ms.
listen(target, type, listener, options?)
Dispose
openWindow(target, options)
WindowHandle
Opens target, such as <Details />, in a window. Opening the same component again replaces its window, and
a window that hangs from the bar replaces the toolbar's other hanging window. Escape, pressing its part again,
props.close() and hiding the toolbar close it.
showPopup(spec)
void
Shows one of the host's canned period dialogs.
page
PageSource
activity
Source<readonly ActivityEvent[]>
Up to twelve newest-first visits, route changes and AI-link clicks in this document.
aiSite
Source<AiSiteSnapshot>
The AI chat website open in this tab, if any, and the prompt being typed.
speech(onChange?)
Speech
Speaks with a local English voice; speech stops when this mount ends.
sound(onChange?)
Sound
A deck of this toolbar's own music, made with Web Audio; it stops when this mount ends.
Call play from an action: browsers start sound only after a click.
levels(count?, options?)
readonly number[]
count levels (default 7), 0–1, of everything this toolbar is playing, from bass to treble.
generate(request)
Promise<GenerationResult>
Optional parody generation with Chrome's local model, or your fallback text.