Skip to content

@maxhealth.tech/prefab / actions

actions

Classes

ClassDescription
SetStateBase interface all actions implement
ToggleStateBase interface all actions implement
AppendStateBase interface all actions implement
PopStateBase interface all actions implement
ShowToastBase interface all actions implement
CloseOverlayBase interface all actions implement
OpenLinkBase interface all actions implement
SetIntervalBase interface all actions implement
FetchBase interface all actions implement
OpenFilePickerBase interface all actions implement
CallHandlerBase interface all actions implement
CallToolInvoke an MCP tool from the UI. Used in Form.onSubmit or Button.onClick to call backend tools.
SendMessageBase interface all actions implement
UpdateContextBase interface all actions implement
RequestDisplayModeBase interface all actions implement
SubscribeSubscribe to a resource URI for real-time updates.
UnsubscribeUnsubscribe from a previously subscribed resource URI.

Interfaces

InterfaceDescription
SetStateOpts-
ShowToastOpts-
FetchOpts-
OpenFilePickerOpts-
CallHandlerOpts-
CallToolOpts-
SubscribeOpts-
ActionJSONSerialized action JSON
ActionBase interface all actions implement

Type Aliases

Type AliasDescription
ToastVariant-
DisplayMode-
StateTargetAnything that resolves to a state key: Signal, Collection, or raw string.

Functions

FunctionDescription
setSet a state value. set(signal, value)new SetState(signal.key, value)
toggleToggle a boolean state value. toggle(signal)new ToggleState(signal.key)
appendAppend an item to an array state value. Optionally specify insertion index.
popRemove an element from an array by index or value. Defaults to last element (-1).
serializeCallbacksSerialize one or more actions to their JSON form.

Released under the MIT License.