{"version":3,"file":"File.d.ts","names":["GetHoveredLineResult","InteractionManager","InteractionManagerBaseOptions","SelectedLineRange","ResizeManager","FileRenderer","BaseCodeOptions","FileContents","LineAnnotation","PrePropertiesConfig","RenderFileMetadata","RenderRange","ThemeTypes","WorkerPoolManager","FileRenderProps","LAnnotation","HTMLElement","FileHydrateProps","Omit","FileOptions","File","AnnotationElementCache","SVGElement","HTMLPreElement","HTMLStyleElement","Map","file","fileContainer","forceRender","preventEmit","containerWrapper","lineAnnotations","renderRange"],"sources":["../../src/components/File.d.ts"],"sourcesContent":["import { type GetHoveredLineResult, InteractionManager, type InteractionManagerBaseOptions, type SelectedLineRange } from '../managers/InteractionManager';\nimport { ResizeManager } from '../managers/ResizeManager';\nimport { FileRenderer } from '../renderers/FileRenderer';\nimport type { BaseCodeOptions, FileContents, LineAnnotation, PrePropertiesConfig, RenderFileMetadata, RenderRange, ThemeTypes } from '../types';\nimport type { WorkerPoolManager } from '../worker';\nexport interface FileRenderProps {\n file: FileContents;\n fileContainer?: HTMLElement;\n containerWrapper?: HTMLElement;\n forceRender?: boolean;\n preventEmit?: boolean;\n lineAnnotations?: LineAnnotation[];\n renderRange?: RenderRange;\n}\nexport interface FileHydrateProps extends Omit, 'fileContainer'> {\n fileContainer: HTMLElement;\n prerenderedHTML?: string;\n}\nexport interface FileOptions extends BaseCodeOptions, InteractionManagerBaseOptions<'file'> {\n disableFileHeader?: boolean;\n /**\n * @deprecated Use `enableGutterUtility` instead.\n */\n enableHoverUtility?: boolean;\n renderHeaderPrefix?: RenderFileMetadata;\n renderCustomMetadata?: RenderFileMetadata;\n /**\n * When true, errors during rendering are rethrown instead of being caught\n * and displayed in the DOM. Useful for testing or when you want to handle\n * errors yourself.\n */\n disableErrorHandling?: boolean;\n renderAnnotation?(annotation: LineAnnotation): HTMLElement | undefined;\n renderGutterUtility?(getHoveredRow: () => GetHoveredLineResult<'file'> | undefined): HTMLElement | null | undefined;\n /**\n * @deprecated Use `renderGutterUtility` instead.\n */\n renderHoverUtility?(getHoveredRow: () => GetHoveredLineResult<'file'> | undefined): HTMLElement | null | undefined;\n onPostRender?(node: HTMLElement, instance: File): unknown;\n}\ninterface AnnotationElementCache {\n element: HTMLElement;\n annotation: LineAnnotation;\n}\nexport declare class File {\n options: FileOptions;\n private workerManager?;\n private isContainerManaged;\n static LoadedCustomComponent: boolean;\n readonly __id: string;\n protected fileContainer: HTMLElement | undefined;\n protected spriteSVG: SVGElement | undefined;\n protected pre: HTMLPreElement | undefined;\n protected code: HTMLElement | undefined;\n protected bufferBefore: HTMLElement | undefined;\n protected bufferAfter: HTMLElement | undefined;\n protected unsafeCSSStyle: HTMLStyleElement | undefined;\n protected gutterUtilityContent: HTMLElement | undefined;\n protected errorWrapper: HTMLElement | undefined;\n protected placeHolder: HTMLElement | undefined;\n protected lastRenderedHeaderHTML: string | undefined;\n protected appliedPreAttributes: PrePropertiesConfig | undefined;\n protected lastRowCount: number | undefined;\n protected headerElement: HTMLElement | undefined;\n protected headerPrefix: HTMLElement | undefined;\n protected headerMetadata: HTMLElement | undefined;\n protected fileRenderer: FileRenderer;\n protected resizeManager: ResizeManager;\n protected interactionManager: InteractionManager<'file'>;\n protected annotationCache: Map>;\n protected lineAnnotations: LineAnnotation[];\n protected file: FileContents | undefined;\n protected renderRange: RenderRange | undefined;\n constructor(options?: FileOptions, workerManager?: WorkerPoolManager | undefined, isContainerManaged?: boolean);\n private handleHighlightRender;\n rerender(): void;\n setOptions(options: FileOptions | undefined): void;\n private mergeOptions;\n setThemeType(themeType: ThemeTypes): void;\n getHoveredLine: () => {\n lineNumber: number;\n } | undefined;\n setLineAnnotations(lineAnnotations: LineAnnotation[]): void;\n setSelectedLines(range: SelectedLineRange | null): void;\n cleanUp(): void;\n hydrate(props: FileHydrateProps): void;\n getOrCreateLineCache(file?: FileContents | undefined): string[];\n render({ file, fileContainer, forceRender, preventEmit, containerWrapper, lineAnnotations, renderRange }: FileRenderProps): boolean;\n private emitPostRender;\n private removeRenderedCode;\n private clearAuxiliaryNodes;\n private canPartiallyRender;\n renderPlaceholder(height: number): boolean;\n private cleanChildNodes;\n private renderAnnotations;\n private renderGutterUtility;\n private injectUnsafeCSS;\n private applyFullRender;\n private applyPartialRender;\n private getColumns;\n private trimDOMToOverlap;\n private getDOMBoundaryIndices;\n private getLineIndexFromDOMNode;\n private applyBuffers;\n private applyHeaderToDOM;\n protected getOrCreateFileContainerNode(fileContainer?: HTMLElement, parentNode?: HTMLElement): HTMLElement;\n private getOrCreatePreNode;\n private applyPreNodeAttributes;\n private applyErrorToDOM;\n private cleanupErrorWrapper;\n}\nexport {};\n//# sourceMappingURL=File.d.ts.map"],"mappings":";;;;;;;;UAKiBc;QACPP;kBACUS;EAFHF,gBAAAA,CAAAA,EAGME,WAHSD;EACtBR,WAAAA,CAAAA,EAAAA,OAAAA;EACUS,WAAAA,CAAAA,EAAAA,OAAAA;EACGA,eAAAA,CAAAA,EAGDR,cAHCQ,CAGcD,WAHdC,CAAAA,EAAAA;EAGcD,WAAAA,CAAAA,EACnBJ,WADmBI;;AACnBJ,UAEDM,gBAFCN,CAAAA,WAAAA,CAAAA,SAEqCO,IAFrCP,CAE0CG,eAF1CH,CAE0DI,WAF1DJ,CAAAA,EAAAA,eAAAA,CAAAA,CAAAA;EAAW,aAAA,EAGVK,WAHU;EAEZC,eAAAA,CAAAA,EAAAA,MAAgB;;AAA2BH,UAI3CK,WAJ2CL,CAAAA,WAAAA,CAAAA,SAIVR,eAJUQ,EAIOZ,6BAJPY,CAAAA,MAAAA,CAAAA,CAAAA;EACzCE,iBAAAA,CAAAA,EAAAA,OAAAA;EADoCE;;AAIvD;EAMyBR,kBAAAA,CAAAA,EAAAA,OAAAA;EACEA,kBAAAA,CAAAA,EADFA,kBACEA;EAOsBK,oBAAAA,CAAAA,EAPtBL,kBAOsBK;EAAfP;;;;;EAKsDQ,oBAAAA,CAAAA,EAAAA,OAAAA;EAChEA,gBAAAA,EAAAA,UAAAA,EANUR,cAMVQ,CANyBD,WAMz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