import type { App as Application, ComponentPublicInstance, DefineComponent } from 'vue' import { TocDefinitionArray, VueClassProp, VueStyleProp, useQMarkdownGlobalProps } from './types' import type { MarkdownItPluginsArray } from './types' export interface QMarkdown extends ComponentPublicInstance { makeTree(data: TocDefinitionArray): TocDefinitionArray } export interface QMarkdownProps { /** * Optional markdown source passed as a prop. Slotted markdown content overrides this value when both are provided. */ src?: string /** * Disable blockquote conversion. */ noBlockquote?: boolean /** * Disable conversion of `\n` into `
`. */ noBreaks?: boolean /** * Disable QMarkdown's custom `:::` container block parser. */ noContainer?: boolean /** * Disable code highlighting. */ noHighlight?: boolean /** * Disable HTML tags in source markdown. */ noHtml?: boolean /** * Disable image conversion. */ noImage?: boolean /** * Disable line numbers on code blocks. */ noLineNumbers?: boolean /** * Disable conversion of links. */ noLink?: boolean /** * Disable auto-conversion of URL-like text into links. */ noLinkify?: boolean /** * Options passed to markdown-it's linkifier. For example, enable links without a protocol with `{ fuzzyLink: true }`. */ linkifyOptions?: MarkdownItLinkifyOptions /** * Disable automatic heading anchor links. */ noHeadingAnchorLinks?: boolean /** * Disable language-neutral replacements and quote beautification. */ noTypographer?: boolean /** * Alternative single character to display instead of generated line numbers. */ lineNumberAlt?: string /** * Enable table-of-contents generation and emit the generated TOC data. */ toc?: boolean /** * Render markdown as inline content with `markdown-it.renderInline()` and a `span` root. Useful when QMarkdown is used inside existing paragraph or text structure. */ inline?: boolean /** * Starting heading level for table-of-contents generation. */ tocStart?: 1 | 2 | 3 | 4 | 5 | 6 /** * Ending heading level for table-of-contents generation. */ tocEnd?: 1 | 2 | 3 | 4 | 5 | 6 /** * Style definitions applied to the rendered markdown container. */ contentStyle?: VueStyleProp /** * Class definitions applied to the rendered markdown container. */ contentClass?: VueClassProp /** * Prevent QMarkdown from adding `rel="noopener"` to external links. */ noNoopener?: boolean /** * Prevent QMarkdown from adding `rel="noreferrer"` to external links. */ noNoreferrer?: boolean /** * Show the copy-to-clipboard button for rendered markdown content. */ showCopy?: boolean /** * Icon used for the copy-to-clipboard button. */ copyIcon?: string /** * Hide the copy-to-clipboard tooltip. */ noCopyTooltip?: boolean /** * Do not show a notification after content is copied. The copy button still temporarily changes to the done icon. */ noNotification?: boolean /** * Icon temporarily shown by the copy button and used in the notify response after content is copied. */ doneIcon?: string /** * Tooltip text for the copy-to-clipboard button. */ copyTooltipText?: string /** * Notify text shown after content is copied. The Quasar Notify plugin must be installed for the response to display. */ copyResponseText?: string /** * Replace escaped `\n` sequences in the `src` prop with real newline characters before rendering. */ fixCr?: boolean /** * Optional array of `markdown-it` plugins or plugin configuration objects. */ plugins?: MarkdownItPluginsArray } export interface QMarkdownTagParts { template?: string script?: string style?: string } export function getTagParts(html?: string): QMarkdownTagParts export const version: string type QMarkdownComponent = DefineComponent< QMarkdownProps, any, any, any, any, any, any, any, any > & { new (): QMarkdown } export const QMarkdown: QMarkdownComponent export interface QMarkdownPlugin { version: string QMarkdown: QMarkdownComponent useQMarkdownGlobalProps: typeof useQMarkdownGlobalProps getTagParts: typeof getTagParts install(app: Application): void } declare const plugin: QMarkdownPlugin export default plugin export * from './types' export as namespace QMarkdown