import { LitElement } from 'lit'; import 'prismjs/plugins/autoloader/prism-autoloader'; import 'prismjs/plugins/line-numbers/prism-line-numbers'; import '../button'; /** * `` component to display `` snippets as standalone single-/multi-line block elements. * @fires on-copy - Emits when the copy button is clicked. */ export declare class BlockCodeView extends LitElement { static styles: import("lit").CSSResult[]; /** Sets background and text theming. */ accessor darkTheme: 'light' | 'dark' | 'default'; /** If empty string, attempt language syntax auto-detection. Setting a value will override auto-detection and manually configure desired language. */ accessor language: string; /** Optionally display line numbers. */ accessor lineNumbers: boolean; /** Sets the starting line number when lineNumbers is true. Must be a positive integer. */ accessor startLineNumber: number; /** Customizable max-height setting for code snippet container. */ accessor maxHeight: number | null; /** * Enables a full-height flush layout intended for pane/rail containers where the code view * should occupy the entire available height. */ accessor flush: boolean; /** Optionally displayed label above code snippet container. */ accessor codeViewLabel: string; /** Optionally display button to copy code snippet. */ accessor copyOptionVisible: boolean; /** Optionally display button to expand code snippet container. */ accessor codeViewExpandable: boolean; /** Sets copy code button text (optional). */ accessor copyButtonText: string; /** Sets copy button description attr value. */ accessor copyButtonDescriptionAttr: string; /** Sets code snippet for display -- NOTE: original formatting is preserved. */ accessor codeSnippet: string; /** Text string customization. */ accessor textStrings: { collapsed: string; expanded: string; }; /** Internal text strings. * @internal */ private accessor _textStrings; /** Auto-detect whether code snippet is single line (boolean) -- styled accordingly (boolean). * @internal */ private accessor _isSingleLine; /** Auto-detect whether code snippet exceeds the max-height allowance (boolean). * @internal */ private accessor hasOverflow; /** Value indicating whether overflow code sample is expanded (boolean). * @internal */ private accessor codeExpanded; /** Copy key-values to communicate copy button styling and state. * @internal */ private accessor _copyState; /** Detected language for the code snippet. * @internal */ private accessor _effectiveLanguage; /** Code snippet fits into the height of the container -- no expansion needed. * @internal */ private accessor _codeFitsContainerOnLoad; /** If expandable -- height of the container when fully expanded. * @internal */ private accessor _expandedHeight; updated(changedProperties: Map): void; render(): import("lit-html").TemplateResult<1>; private getContainerClasses; private renderCopyButton; private renderExpandButton; willUpdate(changedProps: Map): void; private highlightCode; private addLineNumbers; private detectLanguage; private calculateRelevance; private getTokenRelevance; private isLanguageSpecificToken; private determineMarkupLanguage; private checkOverflow; private removeLeadingWhitespace; private formatExampleCode; private copyCode; private getContainerStyle; private expandCodeView; private handleKeypress; } declare global { interface HTMLElementTagNameMap { 'kyn-block-code-view': BlockCodeView; } } //# sourceMappingURL=blockCodeView.d.ts.map