2025-10-14 18:50:45 +00:00
|
|
|
import { TFile } from "obsidian";
|
|
|
|
|
|
2025-12-20 14:48:42 +00:00
|
|
|
/**
|
|
|
|
|
* Represents text content read from a file with the page number
|
|
|
|
|
*/
|
|
|
|
|
export interface IPageText {
|
|
|
|
|
text: string;
|
|
|
|
|
pageNumber: number;
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-14 18:50:45 +00:00
|
|
|
/**
|
|
|
|
|
* Represents a single snippet of matched content from a file
|
|
|
|
|
*/
|
2025-10-29 19:35:19 +00:00
|
|
|
export interface ISearchSnippet {
|
2025-10-14 18:50:45 +00:00
|
|
|
text: string;
|
|
|
|
|
matchIndex: number;
|
|
|
|
|
matchLength: number;
|
2025-12-20 14:48:42 +00:00
|
|
|
pageNumber: number;
|
2025-10-14 18:50:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Represents all matches found in a single file
|
|
|
|
|
*/
|
2025-10-29 19:35:19 +00:00
|
|
|
export interface ISearchMatch {
|
2025-10-14 18:50:45 +00:00
|
|
|
file: TFile;
|
2025-10-29 19:35:19 +00:00
|
|
|
snippets: ISearchSnippet[];
|
2025-10-14 18:50:45 +00:00
|
|
|
}
|