Plugin Management API
Import styles
You can import built-in plugins directly from the package root:
Or use the stable built-in subpath:
Which plugins are objects vs factory functions?
Pass these directly
LightThemePluginDarkThemePluginPerformanceOverlayPlugin
Call these first
ContextMenuPlugin()EventTooltipPlugin()EventMediaPlugin()MutexGuardPlugin()
usePlugin(plugin: TimelinePlugin): Promise
Loads a plugin and runs its lifecycle.
Notes:
- Returns
truewhen the plugin loads successfully - Re-loading the same non-theme plugin currently returns
false - Theme plugins go through a dedicated theme-switching path
- If a plugin declares
metadata.dependencies, those dependencies are checked before activation
getLoadedPlugins(): TimelinePlugin[]
Returns the loaded plugin objects.
isPluginLoaded(pluginName: string): boolean
Checks whether a plugin with the given name is loaded.
Notes:
- Pass the plugin name, not the full plugin ID
- Internally this behaves like a prefix match on
name@version
removePlugin(pluginId: string): Promise
Unloads a plugin by full plugin ID.
Plugin IDs use this format:
setTheme(theme: "light" | "dark"): Promise
Switches between the built-in light and dark themes.
Notes:
setTheme()switches betweenLightThemePluginandDarkThemePlugin- The old theme is unloaded before the new one is loaded
- A successful switch triggers
theme:change
Set a theme at construction time
The constructor accepts a theme plugin object and loads it asynchronously during initialization.