/** * Copyright Aquera Inc 2023 * * This source code is licensed under the BSD-3-Clause license found in the * LICENSE file in the root directory of this source tree. */ import { Marked } from 'marked'; import NileElement from '../internal/nile-element'; import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit'; /** * Nile markdown component. * * @tag nile-markdown */ /** * @summary Renders markdown content as HTML in the browser using GitHub Flavored Markdown. * @status experimental * * Content can be provided either through the `value` property or through a * ` * * ``` * * Leading whitespace common to all lines is stripped, so the markdown can be * indented to match the surrounding HTML without rendering as a code block. * * All instances share a single Marked parser. Use `NileMarkdown.getMarked()` * to customize it (extensions, renderers, etc.) and `NileMarkdown.updateAll()` * to re-render existing instances after changing the configuration. * * WARNING: The markdown is converted to HTML without sanitization. Do not * render unsanitized user input, as this can expose users to XSS attacks. * * @event nile-markdown-rendered - Emitted after the markdown has been parsed and rendered. * * @csspart base - The component's base wrapper containing the rendered HTML. */ export declare class NileMarkdown extends NileElement { static styles: CSSResultGroup; /** The shared Marked instance used by every nile-markdown on the page. */ private static marked; /** All connected instances, used by `updateAll()`. */ private static instances; /** * Returns the shared Marked instance so it can be configured with custom * options, extensions, or renderers. Changes affect all instances; call * `NileMarkdown.updateAll()` afterwards to re-render existing ones. */ static getMarked(): Marked; /** Re-renders every connected nile-markdown instance. */ static updateAll(): void; /** * The markdown to render. Takes precedence over a * `