@@ -17,6 +17,10 @@ declare class File$1 {
1717 hasDoRaw : boolean ;
1818 rawLength ?: number ;
1919 syntaxFile : Record < number , SyntaxLineWithTemplate > ;
20+ plainFile : Record < number , {
21+ value : string ;
22+ template ?: string ;
23+ } > ;
2024 hasDoSyntax : boolean ;
2125 syntaxLength ?: number ;
2226 highlighterName ?: DiffHighlighter [ "name" ] ;
@@ -93,7 +97,15 @@ export declare class DiffFile {
9397 onAllCollapse : ( mode : "split" | "unified" ) => void ;
9498 getOldFileContent : ( ) => string ;
9599 getNewFileContent : ( ) => string ;
100+ getOldPlainLine : ( lineNumber : number ) => {
101+ value : string ;
102+ template ?: string ;
103+ } ;
96104 getOldSyntaxLine : ( lineNumber : number ) => SyntaxLineWithTemplate ;
105+ getNewPlainLine : ( lineNumber : number ) => {
106+ value : string ;
107+ template ?: string ;
108+ } ;
97109 getNewSyntaxLine : ( lineNumber : number ) => SyntaxLineWithTemplate ;
98110 subscribe : ( listener : ( ( ) => void ) & {
99111 isSyncExternal ?: boolean ;
@@ -108,10 +120,18 @@ export declare class DiffFile {
108120 hasBuildUnified : boolean ;
109121 oldFileLines : Record < number , string > ;
110122 oldFileDiffLines : Record < string , DiffLineItem > ;
123+ oldFilePlainLines : Record < number , {
124+ value : string ;
125+ template ?: string ;
126+ } > ;
111127 oldFileSyntaxLines : Record < number , SyntaxLineWithTemplate > ;
112128 oldFilePlaceholderLines : Record < string , boolean > ;
113129 newFileLines : Record < number , string > ;
114130 newFileDiffLines : Record < string , DiffLineItem > ;
131+ newFilePlainLines : Record < number , {
132+ value : string ;
133+ template ?: string ;
134+ } > ;
115135 newFileSyntaxLines : Record < number , SyntaxLineWithTemplate > ;
116136 newFilePlaceholderLines : Record < string , boolean > ;
117137 splitLineLength : number ;
@@ -157,10 +177,18 @@ export declare class DiffFile {
157177 hasBuildUnified : boolean ;
158178 oldFileLines : Record < number , string > ;
159179 oldFileDiffLines : Record < string , DiffLineItem > ;
180+ oldFilePlainLines : Record < number , {
181+ value : string ;
182+ template ?: string ;
183+ } > ;
160184 oldFileSyntaxLines : Record < number , SyntaxLineWithTemplate > ;
161185 oldFilePlaceholderLines : Record < string , boolean > ;
162186 newFileLines : Record < number , string > ;
163187 newFileDiffLines : Record < string , DiffLineItem > ;
188+ newFilePlainLines : Record < number , {
189+ value : string ;
190+ template ?: string ;
191+ } > ;
164192 newFileSyntaxLines : Record < number , SyntaxLineWithTemplate > ;
165193 newFilePlaceholderLines : Record < string , boolean > ;
166194 splitLineLength : number ;
@@ -384,35 +412,64 @@ export declare const checkCurrentLineIsHidden: (diffFile: DiffFile, lineNumber:
384412} ;
385413export declare const checkDiffLineIncludeChange : ( diffLine ?: DiffLine ) => boolean ;
386414export declare const disableCache : ( ) => void ;
415+ export declare const doAfterTransform : ( content : string ) => string ;
416+ export declare const doPreTransform : ( content : string ) => string ;
387417export declare const getDiffRange : ( additions : DiffLine [ ] , deletions : DiffLine [ ] , { getAdditionRaw, getDeletionRaw, getAdditionSyntax, getDeletionSyntax, } : {
388418 getAdditionRaw : ( lineNumber : number ) => string ;
389419 getDeletionRaw : ( lineNumber : number ) => string ;
390420 getAdditionSyntax : ( lineNumber : number ) => SyntaxLineWithTemplate ;
391421 getDeletionSyntax : ( lineNumber : number ) => SyntaxLineWithTemplate ;
392422} ) => void ;
393423export declare const getLang : ( fileName : string ) => string ;
394- export declare const getPlainTemplate : ( { diffLine, rawLine, operator, } : {
424+ export declare const getPlainDiffTemplate : ( { diffLine, rawLine, operator, } : {
395425 diffLine : DiffLine ;
396426 rawLine : string ;
397427 operator : "add" | "del" ;
398428} ) => void ;
429+ export declare const getPlainLineTemplate : ( line : string ) => string ;
399430export declare const getSplitContentLines : ( diffFile : DiffFile ) => DiffSplitContentLineItem [ ] ;
400431export declare const getSplitLines : ( diffFile : DiffFile ) => DiffSplitLineItem [ ] ;
401- export declare const getSyntaxTemplate : ( { diffLine, syntaxLine, operator, } : {
432+ export declare const getSyntaxDiffTemplate : ( { diffLine, syntaxLine, operator, } : {
402433 diffLine : DiffLine ;
403434 syntaxLine : SyntaxLineWithTemplate ;
404435 operator : "add" | "del" ;
405436} ) => void ;
437+ export declare const getSyntaxLineTemplate : ( line : SyntaxLine ) => string ;
406438export declare const getUnifiedContentLine : ( diffFile : DiffFile ) => DiffUnifiedContentLineItem [ ] ;
407439export declare const getUnifiedLines : ( diffFile : DiffFile ) => DiffUnifiedLineItem [ ] ;
408440export declare const highlighter : DiffHighlighter ;
441+ export declare const isTransformEnabled : ( ) => boolean ;
409442export declare const numIterator : < T > ( num : number , cb : ( index : number ) => T ) => T [ ] ;
410443export declare const parseInstance : DiffParser ;
411444export declare const processAST : ( ast : DiffAST ) => {
412445 syntaxFileObject : Record < number , SyntaxLine > ;
413446 syntaxFileLineNumber : number ;
414447} ;
415448export declare const resetDefaultComposeLength : ( ) => void ;
449+ export declare const resetTransform : ( ) => void ;
450+ export declare const setAfterTransform : ( fn : ( content : string ) => string ) => void ;
451+ /**
452+ * ⚠️ **WARNING: DANGEROUS OPERATION** ⚠️
453+ *
454+ * Sets a pre-transformation function that will be applied to content before processing.
455+ * This is a global state modification that affects all subsequent operations.
456+ *
457+ * **CAUTION**:
458+ * - This function modifies global state and may cause unexpected side effects
459+ * - The transformation will be applied to ALL content processing operations
460+ * - Multiple calls will overwrite the previous transform function
461+ * - Ensure proper error handling in your transform function to avoid breaking the entire pipeline
462+ *
463+ * @param fn - The transformation function to apply before processing content
464+ * @throws {Error } Throws an error if the provided parameter is not a function
465+ *
466+ * @example
467+ * ```typescript
468+ * // Use with caution - this affects global behavior
469+ * setPreTransform((content) => content.trim());
470+ * ```
471+ */
472+ export declare const setPreTransform : ( fn : ( content : string ) => string ) => void ;
416473export declare const versions : string ;
417474export declare enum DiffFileLineType {
418475 hunk = 1 ,
0 commit comments