/** * A posix-only stand-in for `node:path`, substituted for it when this package * is built for the browser (see vite.config.ts). * * This is safe because none of the paths this package computes ever reach a * real filesystem: libxslt-wasm is compiled with FILESYSTEM=0, so every path * ends up as either a key in the mount table or a segment of a * `*.ptx.invalid` URL (see mounts.ts). They are virtual paths, and virtual * paths are posix paths — a browser caller passes `sourcePath: "/main.ptx"` * and means exactly what it says. * * Only the handful of functions this package actually uses are implemented. */ export declare const sep = "/"; /** * Collapse `.` and `..` segments. An absolute path clamps at the root * (`/a/../../b` → `/b`), which is what makes the containment checks in * mounts.ts and xinclude.ts safe against `..` traversal. */ export declare function normalize(p: string): string; /** * Resolve right-to-left until an absolute path is found. With no absolute * segment the result is rooted at `/` rather than at a process cwd — there is * no cwd in a browser, and a virtual path is meaningless relative to one. */ export declare function resolve(...segments: string[]): string; export declare function join(...segments: string[]): string; export declare function dirname(p: string): string; export declare function relative(from: string, to: string): string; /** * `path.posix` self-reference: on posix, `path` and `path.posix` are the same * thing, and call sites that reach for `path.posix.normalize` to be explicit * should keep working. */ export declare const posix: { sep: string; normalize: typeof normalize; resolve: typeof resolve; join: typeof join; dirname: typeof dirname; relative: typeof relative; }; declare const _default: { sep: string; normalize: typeof normalize; resolve: typeof resolve; join: typeof join; dirname: typeof dirname; relative: typeof relative; posix: { sep: string; normalize: typeof normalize; resolve: typeof resolve; join: typeof join; dirname: typeof dirname; relative: typeof relative; }; }; export default _default;