import { PropertyValues } from 'lit'; import { UElement } from '@iyulab/components/dist/components/UElement.js'; import { ReferenceCitation } from '../../types/References.js'; /** * 마크다운 컨텐츠를 렌더링하는 컴포넌트입니다. * * 주의: * - refs로 삽입되는 커스텀 태그(u-ref-*)는 속성/내용을 모두 escape하여 XSS를 방지합니다. * - 코드블록 내부는 HTML을 전부 텍스트로 취급(escape)하며, refs 태그는 통째 제거합니다. * - 인덱스 기반 삽입(ref.endIndex)이 깨지지 않도록 "normalize(제로폭 제거)"를 insertRefs 전에 1회 수행합니다. */ export declare class UMarkedBlock extends UElement { static styles: import('lit').CSSResultGroup[]; /** 마크다운 컨텐츠를 렌더링할 때 사용할 값입니다. */ value?: string; /** 컨텐츠의 인용 출처들입니다. */ refs?: ReferenceCitation[]; private parser; private placeholder; private queued; private queuedTimer?; private streaming; private streamingTimer?; disconnectedCallback(): void; protected shouldUpdate(_changedProperties: PropertyValues): boolean; protected willUpdate(changedProperties: PropertyValues): void; render(): import('lit-html/directive.js').DirectiveResult; /** * 코드블록은 별도의 컴포넌트로 렌더링 합니다. */ private renderCode; /** * 테이블은 JSON 데이터로 변환하여 별도의 컴포넌트로 렌더링합니다. * 셀 내부의 인라인 마크다운(볼드, 코드, br 등)도 HTML로 변환합니다. */ private renderTable; /** * 인용/출처 참조객체가 있을때 ref 태그 HTML을 this.placeholder에 보관하고 * 마크다운 문자열의 해당 위치에 주석 플레이스홀더를 삽입합니다. */ private insertRefs; /** * 코드블록 내부의 플레이스홀더와 그 외 refs 태그를 모두 제거하여 HTML이 코드로 렌더링되도록 합니다. */ private removeRefs; } declare global { interface HTMLElementTagNameMap { "u-marked-block": UMarkedBlock; } }