Toolbar Script Functions
This table lists the principal functions, hooks, parts and context members that toolbar scripts reach through the Bundleware global, the API versions each one applies to, and its status in the guide, Toolbar Scripts (API 2). API 1, retired on 19th October 2026, was for build-time modules that imported defineToolbar from ~/api; names marked removed were in drafts of API 2 but not in its release.
| Function | Applicable Versions | Documentation Status |
|---|---|---|
Action | API 2 and higher | Documented |
Action.OpenInBrowser | API 2 and higher | Documented |
Action.OpenWindow | API 2 and higher | Documented |
Action.ShowPopup | API 2 and higher | Documented |
context.action | API 1 to API 2 previews | Removed |
context.activity | API 1 and higher | Documented |
context.ai | API 1 to API 2 previews | Removed |
context.aiSite | API 2 and higher | Documented |
context.effect | API 2 previews | Removed |
context.generate | API 1 and higher | Documented |
context.id | API 1 and higher | Documented |
context.interval | API 1 and higher | Documented |
context.levels | API 2 and higher | Documented |
context.listen | API 1 and higher | Documented |
context.model | API 1 to API 2 previews | Removed |
context.onCleanup | API 1 and higher | Documented |
context.openAiSetup | API 2 previews | Removed |
context.openLocalAiSetup | API 2 and higher | Documented |
context.openPopup | API 1 to API 2 previews | Removed |
context.openWindow | API 1 and higher | Documented |
context.page | API 1 and higher | Documented |
context.selection | API 1 to API 2 previews | Removed |
context.showPopup | API 2 and higher | Documented |
context.signal | API 1 and higher | Documented |
context.sound | API 2 and higher | Documented |
context.speech | API 2 and higher | Documented |
context.state | API 2 previews | Removed |
context.timeout | API 1 and higher | Documented |
context.view | API 2 previews | Removed |
createSpeechController | API 2 previews | Removed |
defineToolbar | API 2 and higher | Documented |
defineToolbar (~/api) | API 1 only | Retired |
Fragment | API 2 and higher | Declared |
h | API 2 and higher | Declared |
html | API 2 previews | Removed |
Icon | API 2 and higher | Documented |
icons | API 2 and higher | Documented |
live | API 2 previews | Removed |
music | API 2 and higher | Documented |
music.hz | API 2 and higher | Documented |
music.melody | API 2 and higher | Documented |
music.readMidi | API 2 and higher | Documented |
nothing | API 2 previews | Removed |
page.readSelection | API 1 to API 2 previews | Removed |
page.readText | API 1 to API 2 previews | Removed |
Readout | API 2 and higher | Documented |
store | API 2 and higher | Documented |
Toolbar | API 2 and higher | Documented |
Toolbar.Button | API 2 and higher | Documented |
Toolbar.Menu | API 2 and higher | Documented |
Toolbar.Menu.Item | API 2 and higher | Documented |
Toolbar.Menu.Section | API 2 and higher | Documented |
Toolbar.Module | API 2 and higher | Documented |
Toolbar.Right | API 2 and higher | Documented |
Toolbar.Search | API 2 and higher | Documented |
Toolbar.Search.Suggestion | API 2 and higher | Documented |
Toolbar.Separator | API 2 and higher | Documented |
Toolbar.SplitButton | API 2 and higher | Documented |
Toolbar.Status | API 2 and higher | Documented |
Toolbar.Strip | API 2 and higher | Documented |
Toolbar.Text | API 2 and higher | Documented |
Toolbar.Widget | API 2 and higher | Documented |
unsafeSVG | API 2 previews | Removed |
useAction | API 2 previews | Removed |
useActivity | API 2 and higher | Documented |
useAiSite | API 2 and higher | Documented |
useCallback | API 2 and higher | Documented |
useEffect | API 2 and higher | Documented |
useGenerate | API 2 and higher | Documented |
useLayoutEffect | API 2 and higher | Documented |
useLevels | API 2 and higher | Documented |
useMemo | API 2 and higher | Documented |
useModel | API 2 previews | Removed |
usePage | API 2 and higher | Documented |
useReducer | API 2 and higher | Documented |
useRef | API 2 and higher | Documented |
useRoot | API 2 and higher | Documented |
useSound | API 2 and higher | Documented |
useSpeech | API 2 and higher | Documented |
useState | API 2 and higher | Documented |
useStore | API 2 and higher | Documented |
useToolbar | API 2 and higher | Documented |
Declared: public/bundleware.d.ts declares the name and the guide does not describe it. Expand Hooks, Components or Context in the tree for every name of each kind.
Limits
Every toolbar script works within three limits. A script that exceeds one fails with an error at the point shown.
| Limit | Value | Checked |
|---|---|---|
| Page text | Up to 12,000 characters per read | page.read, page.subscribe and usePage: maxLength is 0 to 12,000, default 4,000. Other values throw a RangeError. |
| Widgets | At most 128 per toolbar | When the toolbar is defined: “use at most 128 widgets”. |
| Source | Up to 256 KiB per script | When a script is saved, imported, fetched or generated. |