/** * -------------------------------------------------------------------- * docmd : the zero-config documentation engine. * * @package @docmd/plugin-installer * @website https://docmd.io * @repository https://github.com/docmd-io/docmd * @license MIT * @copyright Copyright (c) 2025-present docmd.io * * [docmd-source] - Please do not remove this header. * -------------------------------------------------------------------- */ export type ConfigFormat = 'json' | 'js' | 'ts' | 'mjs' | 'cjs'; export declare function detectConfigFormat(configPath: string): ConfigFormat; /** * Add a plugin entry to the \`plugins: { ... }\` block. Returns the * new content, or the original content if the entry is already * present (in which case the caller should report "already * configured"). * * @param content The full config file body. * @param configKey The plugin key (e.g. \`search\`, \`mermaid\`). * @param valueText The value to assign, as a JS source string * (e.g. \`{}\` or \`{ theme: 'dark' }\`). */ export declare function addPluginToPluginsBlock(content: string, configKey: string, valueText: string): { newContent: string; changed: boolean; }; /** * Remove a plugin entry from the \`plugins: { ... }\` block. Returns * the new content plus a `changed` flag. If the entry is not * present, `changed` is false and the original content is returned. */ export declare function removePluginFromPluginsBlock(content: string, configKey: string): { newContent: string; changed: boolean; }; export declare function addPluginToJsonConfig(content: string, configKey: string, valueText: string): { newContent: string; changed: boolean; }; export declare function removePluginFromJsonConfig(content: string, configKey: string): { newContent: string; changed: boolean; };