Skip to content

components/plugin-settings-component

Component that manages plugin settings: data, persistence, validation, and events.

This is the single public-facing settings API for plugin authors. All settings logic (load, save, validate, transform, clone) is handled directly by this component — no separate manager class is needed.

Class Description
PluginSettingsComponentBase Base class for plugin settings components. Manages settings data, persistence, validation, and events. Plugin authors extend this class and pass their settings class as PluginSettingsComponentBaseConstructorParams.pluginSettingsClass, whose default-constructed instance supplies the defaults.
Interface Description
PluginSettingsComponentBaseConstructorParams Constructor parameters for PluginSettingsComponentBase.
PluginSettingsComponentBaseOnSaveSettingsParams Parameters for PluginSettingsComponentBase.onSaveSettings.
PluginSettingsState A snapshot of plugin settings state, including raw input values, effective (validated) values, and per-property validation messages.
Type Description
ReadonlyPluginSettings Readonly version of PluginSettings.
ReadonlyPluginSettingsState Readonly version of PluginSettingsState for use in event callbacks and public getters.
SettingsValidator A validator function for a settings property.