Skip to main content

Interface: FrontendPlugin

Defined in: types/frontend.ts:66

Frontend plugin interface for UI contributions.

Frontend plugins register UI components that the core renders in predefined extension points. Each registration returns a Disposable for cleanup.

Example

class MyFrontendPlugin extends BaseFrontendPlugin {
readonly id = 'my-ui';
readonly displayName = 'My UI Plugin';

async activate(context: FrontendPluginContext) {
context.subscriptions.push(
context.registerSettingsSection({
categoryId: 'integrations',
sectionId: 'my-settings',
label: 'My Settings',
icon: MyIcon,
component: MySettingsPanel,
})
);
}
}

Extends

Properties

activationEvents

readonly activationEvents: PluginActivation[]

Defined in: types/frontend.ts:74

Events that trigger this plugin's activation. Frontend plugins typically use 'onStartup' or 'onSettingsOpen'.


displayName

readonly displayName: string

Defined in: types/plugin.ts:24

Human-readable display name

Inherited from

OmniscribePlugin.displayName


id

readonly id: string

Defined in: types/plugin.ts:18

Unique plugin identifier matching the manifest id field

Inherited from

OmniscribePlugin.id


type

readonly type: "frontend" | "both"

Defined in: types/frontend.ts:68

Must be 'frontend' or 'both'

Overrides

OmniscribePlugin.type

Methods

activate()

activate(context): Promise<void>

Defined in: types/frontend.ts:81

Called when the plugin is activated with a frontend context. Use the context's registerXxx methods to contribute UI elements. Push returned Disposables to context.subscriptions for automatic cleanup.

Parameters

ParameterType
contextFrontendPluginContext

Returns

Promise<void>

Overrides

OmniscribePlugin.activate


deactivate()

deactivate(): Promise<void>

Defined in: types/frontend.ts:87

Called when the plugin is deactivated. Clean up any resources not tracked via context.subscriptions.

Returns

Promise<void>

Overrides

OmniscribePlugin.deactivate