/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import type { ChatbotArtifact } from '../chatbot.types.js'; import { ChatPluginBase } from './chat-plugin.js'; /** * JSON Graph Renderer Plugin — renders JSON artifacts as a visual node graph * in the artifact panel, while non-JSON artifacts fall back to default rendering. * * Demonstrates the `renderArtifactContent` plugin hook: when registered, the * chatbot component picks up the renderer automatically — no extra property * wiring needed. * * @example * ```typescript * const controller = new ChatbotCoreController({ * plugins: [ * new MarkdownPlugin(), * new ArtifactPlugin(), * new JsonGraphRendererPlugin() * ] * }); * ``` */ export declare class JsonGraphRendererPlugin extends ChatPluginBase { readonly id = "json-graph-renderer"; readonly name = "JSON Graph Renderer"; readonly version = "1.0.0"; /** * Custom artifact content renderer. * Returns an HTML string for JSON artifacts; returns empty string for * anything else so the default renderer takes over. */ renderArtifactContent(artifact: ChatbotArtifact): string; /** Recursively render a key/value pair as a tree node */ private renderNode; private typeColor; private typeBg; private formatValue; } //# sourceMappingURL=json-graph-renderer-plugin.d.ts.map