Skip to content

@maxhealth.tech/prefab / renderer

renderer ​

Classes ​

ClassDescription
Bridge-
DestroyRegistryTracks destroy callbacks for mounted components within a render cycle.

Interfaces ​

InterfaceDescription
Logger-
ModelContextUpdateWhat the host adds to the model's context for its next turn (MCP Apps ui/update-model-context).
McpTransport-
AppOptions-
PrefabApp-
MountHandle-
BridgeMessage-
AppCapabilities-
HostCapabilities-
HostContext-
HostTheme-
ComponentNode-
RenderContext-
RenderResultResult of a render function that includes a cleanup callback.
PrefabWireData-
PrefabUpdateData-
MountOptions-
MountedApp-
ThemeToggleOptions-

Type Aliases ​

Type AliasDescription
LogLevelCentralized logger — the single sink for all prefab console output.
DisplayMode-
RenderFnReturn-
RenderFn-

Variables ​

VariableDescription
logDefault unscoped logger — [prefab] ….
PrefabRenderer-

Functions ​

FunctionDescription
setLogLevel-
getLogLevel-
createLoggerCreate a scoped logger. Output is prefixed [prefab] (no scope) or [prefab:<scope>], matching prefab's existing console convention.
validateWireFormatValidate a wire format payload. Returns { valid: true, errors: [] } if OK, or { valid: false, errors: [...] } with details about what's wrong.
isValidWireFormatQuick boolean check — returns true if data looks like valid $prefab wire format.
appCreate a prefab app. Auto-detects iframe vs standalone.
applyHostTheme-
isIframe-
registerComponentRegister a render function for a component type
createThemeToggleCreate a theme toggle button inside a prefab root element.

References ​

registerPipe ​

Re-exports registerPipe


unregisterPipe ​

Re-exports unregisterPipe


listPipes ​

Re-exports listPipes


PipeFn ​

Re-exports PipeFn

Released under the MIT License.