import type { GenericParent } from 'myst-common'; import type { LinkTransformer } from 'myst-transforms'; import type { Link } from 'myst-spec-ext'; import type { VFile } from 'vfile'; import type { ISession } from '../session/types.js'; import type { ExternalLinkResult } from '../store/types.js'; export declare function checkLink(session: ISession, url: string): Promise; type LinkInfo = { url: string; title?: string; description?: string; thumbnail?: string; }; export type LinkLookup = Record; export declare function getSourceFolder(link: string, sourceFile: string, projectFolder: string): string; /** * Compute link node file path relative to site root (currently, only the working directory) * * @param pathFromLink Path from link node URL relative to file where it is defined * @param file File where link is defined * @deprecated Use getSourceFolder and fileFromSourceFolder to correctly resolve paths */ export declare function fileFromRelativePath(pathFromLink: string, file?: string): string | undefined; /** * Compute link node file path relative to a source folder. * * If path has no extension, this function looks for .md then .ipynb. * If a '#target' is present at the end of the path, it is maintained. * If file does not exists, returns undefined. * * @param pathFromLink Path from link node URL relative to the folder * @param folder Folder path to resolve from */ export declare function fileFromSourceFolder(pathFromLink: string, folder?: string): string | undefined; export declare class StaticFileTransformer implements LinkTransformer { protocol: string; session: ISession; filePath: string; constructor(session: ISession, filePath: string); test(url?: string): boolean; transform(link: Link, file: VFile): boolean; } export declare function checkLinksTransform(session: ISession, file: string, mdast: GenericParent): Promise; export {}; //# sourceMappingURL=links.d.ts.map