UNPKG

@highlite/core

Version:
80 lines (74 loc) 3.11 kB
/*! Copyright (C) 2025 HighLite This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ import { type Plugin } from '../../interfaces/highlite/plugin/plugin.class'; export declare class SettingsManager { private static instance; private panelManager; private database; private pluginList; private username; private databaseSettings; private pluginSettings; isInitialized: boolean; panelContainer: HTMLDivElement | null; currentView: HTMLDivElement | null; mainSettingsView: HTMLDivElement | null; pluginSettingsView: HTMLDivElement | null; constructor(); init(): Promise<void>; deinit(): Promise<void>; refresh(): Promise<void>; /** * Create reactive proxies for plugin settings that automatically update UI when hidden property changes * @param plugin - The plugin whose settings should be made reactive */ private makeSettingsReactive; registerPlugins(): Promise<void>; private storePluginSettings; private createMenu; private getAdvancedSettings; private createPluginSettings; private openPluginSettings; private filterPlugins; updatePluginSettingsUI(plugin: Plugin): void; /** * Refresh the visibility of all settings for a plugin based on their current hidden state * @param plugin - The plugin whose settings visibility should be refreshed */ private refreshPluginSettingsVisibility; /** * Refresh the disabled state of all settings for a plugin based on their current disabled state * @param plugin - The plugin whose settings disabled state should be refreshed */ private refreshPluginSettingsDisabled; /** * Toggle the visibility of a specific setting for a plugin with smooth animation * @param pluginName - The name of the plugin * @param settingKey - The key of the setting to toggle * @param hidden - Optional: force hidden state (true/false), otherwise toggles current state */ toggleSettingVisibility(pluginName: string, settingKey: string, hidden?: boolean): void; /** * Show a hidden setting with smooth animation * @param pluginName - The name of the plugin * @param settingKey - The key of the setting to show */ showSetting(pluginName: string, settingKey: string): void; /** * Hide a setting with smooth animation * @param pluginName - The name of the plugin * @param settingKey - The key of the setting to hide */ hideSetting(pluginName: string, settingKey: string): void; }