/** * Platform seam: everything in this package that touches the outside world. * * The renderer needs exactly three things from its host: read a file under a * mounted directory (the XSL tree), read a file the caller named by path (the * source, publication, docinfo), and know where this package's `assets/` * directory is. Under Node all three are filesystem operations. In a browser * they are `fetch`es. Confining them here is what lets the same renderer run * in both — see host.browser.ts for the counterpart, swapped in at build time * by vite.config.ts. * * Every read returns `undefined` rather than throwing when the target is * missing. Callers turn that into their own domain behaviour (mounts.ts * serves MISSING_FILE_STUB, xinclude.ts looks for an ). */ /** * Read `relPath` (posix, leading "/") beneath mount root `root`. Refuses to * escape the mount: a `..` that climbs above `root` reads nothing. */ export declare function readMount(root: string, relPath: string): Promise; /** Read a caller-named file (source, publication, docinfo, xi:include). */ export declare function readSource(location: string): Promise; /** * Serve this package's `assets/` from somewhere other than its own directory * — the programmatic equivalent of the `PRETEXT_HTML_ASSETS` environment * variable, which it takes precedence over. Must be called before the first * render; the compiled stylesheet is cached per root. */ export declare function setAssetsBase(base: string): void; /** * This package's `assets/` directory. * * Computed with path functions rather than `new URL(..., import.meta.url)` so * vite's asset handling does not inline the file at build time. Works from * both src/ and dist/, which sit at the same depth in the package. The * overrides serve bundlers (the VS Code extension bundles this module and * ships the assets elsewhere). */ export declare function assetsBase(): string; /** Join a child onto an assets-style root. */ export declare function joinPath(root: string, child: string): string;