import type { Ignore } from 'ignore'; import { Contents } from '@jupyterlab/services'; import type { GitStatusEntry } from '@pierre/trees'; /** * Load the workspace `.gitignore` and return an `ignore` matcher built from * its contents. Returns `null` when the file is missing, empty, or fails to * load — callers should treat any of those as "no ignored entries". */ export declare function loadGitignoreMatcher(contentsManager: Contents.IManager): Promise; /** * Build `GitStatusEntry`s for the canonical paths that match the given * gitignore matcher. * * `@pierre/trees` propagates the `ignored` style from a directory entry * down to every descendant via its internal `ignoredDirectoryPaths` set, so * we only emit one entry per ignored subtree root: emitting descendants * would also pollute the library's `directoriesWithChanges` set, causing * parent directories of nested ignored items to render a "contains git * status items" dot. * * Paths are sorted lexicographically so a directory always precedes its * descendants, allowing a simple ancestor-suppression check via * `path.startsWith(dir)`. The trailing slash on canonical directory paths * (required by `@pierre/trees`, also recognized by `ignore` as the * "directory" indicator) keeps the prefix check from accidentally matching * sibling paths that happen to share a name prefix (e.g. `node_modules_old` * vs `node_modules/`). */ export declare function buildIgnoredEntries(matcher: Ignore, canonicalPaths: Iterable): GitStatusEntry[];