import { ContentPack, ContentRef, PackStrings, SiteDef } from './types'; import { FileNode } from '../types'; /** * Normalize a URL into a stable {@link ContentPack.sites} lookup key (#149). * Lower-cases, drops the protocol, a leading `www.`, a trailing slash, and any * fragment, so `https://www.Example.com/`, `http://example.com`, and * `example.com#top` all collapse to `example.com`. Query strings are kept (a * results page differs from a home page). Mirrors IE's existing `isSearchEngineUrl` * canonicalization so the registry and the search layer agree on identity. */ export declare function normalizeSiteUrl(url: string): string; /** * Build a site registry keyed by normalized URL from a pack's raw `sites` map. * Author keys can be written naturally (`https://www.foo.com/`); this returns * them canonicalized. When two author keys normalize to the same URL the later * one wins and the collision is reported via `onConflict` (the lint pass in #238 * turns that into an error). */ export declare function buildSiteRegistry(sites: Record | undefined, onConflict?: (normalized: string, a: string, b: string) => void): Record; /** Look up an authorized site for a URL, applying #149 normalization. */ export declare function lookupSite(registry: Record, url: string): SiteDef | undefined; /** * Deep-merge two filesystem fragments: container nodes (with `children`) merge * recursively; anything else is replaced wholesale by the incoming node (so * `incoming` wins on leaf collisions). Used to layer content-pack files under a * host's explicit `customFileSystem` and to combine two packs' fragments. */ export declare function mergeFsFragments(base: Record, incoming: Record): Record; /** The flattened result of mounting one or more {@link ContentPack}s. */ export interface MountedContent { /** Union of every pack id, in mount order (feeds the snapshot fingerprint). */ ids: string[]; /** Merged asset manifest (logical key → source). */ assets: Record; /** Merged site registry, keyed by normalized URL. */ sites: Record; /** Merged `customFileSystem` fragment. */ files: Record; recycleBin: NonNullable; recentDocuments: NonNullable; printers: NonNullable; printJobs: NonNullable; playlists: NonNullable; reports: NonNullable; powerSequence?: ContentPack['powerSequence']; qqArchives: NonNullable; /** Merged per-culture string tables. */ strings: PackStrings; } /** * Merge content packs into one {@link MountedContent} bundle. Later packs win on * key collisions (asset keys, site URLs, string keys), and filesystem fragments * deep-merge so two packs can contribute into the same folder. Scenarios are * **not** merged here — a run has at most one active scenario; the host picks it * (or the last pack that declares one) separately. * * `onSiteConflict` surfaces two author URLs that normalize to the same key * (#238 lint hook); omit it to merge silently. */ export declare function mergeContentPacks(packs: ContentPack[], onSiteConflict?: (normalized: string, a: string, b: string) => void): MountedContent;