import { a as DocumentEmission, c as IslandEmitter, i as registerIslandEmitter, l as IslandInfo, n as setRequestRouteData, o as DocumentEmitter, r as registerDocumentEmitter, s as IslandEmission, t as getRequestRouteData } from "./route-store-fIZy4iN0.js"; import { IntegrationResolvedRoute } from "astro"; import { Rolldown } from "vite"; //#region src/islands/routes.d.ts /** * Route → islands at runtime, for packages that must know before rendering what a * page will hydrate (per-route data loading). Installed by the islands middleware * entry from the manifest; keyed on `globalThis` via `Symbol.for` so the * vite-runner and native module instances share it. Closures are dist-relative * chunk file names — there is no island tag to observe a public prefix on yet. */ type RouteIsland = { /** the island's entry chunk, relative to the client dist (e.g. `_astro/Cart.abc123.js`) */ fileName: string; /** the entry plus its transitive static imports */ staticClosure: string[]; /** the entry plus its transitive static and dynamic imports */ fullClosure: string[]; }; /** * The islands a route's page hydrates, from the build-time attribution — `null` * when unknown: in dev, without a manifest, or for a route whose page the server * build did not see (astro's own injected routes, server islands). Callers * treat `null` as "anything", never as "nothing". */ export declare function getRouteIslands(pattern: string): RouteIsland[] | null; //#endregion //#region src/islands/route-islands.d.ts type ModuleGraph = { getModuleIds(): IterableIterator; getModuleInfo(id: string): Rolldown.ModuleInfo | null; resolve(source: string, importer: string): Promise<{ id: string; } | null>; }; type RouteIslandsResult = { /** * route pattern → island component ids (absolute module ids, query stripped); * pages missing from the graph are absent */ routes: Map>; /** module id → route patterns whose page reaches it, the whole server module graph */ patternsByModule: Map>; }; /** * Route modules (absolute ids) → the route patterns they serve, for the walk: * pages and endpoints (endpoints have no islands, but consumers still want them * as known routes), one component possibly backing several routes. */ export declare function routeEntrypoints(root: string, routes: readonly IntegrationResolvedRoute[]): Map; /** module ids can carry vite queries (`?astro&type=...`) — the file path is the identity */ export declare function stripQuery(id: string): string; /** * `pages` maps a page component's absolute path to the patterns of the routes it * serves (one component can back several routes). */ export declare function collectRouteIslands(graph: ModuleGraph, pages: Map): Promise; //#endregion export { type DocumentEmission, type DocumentEmitter, type IslandEmission, type IslandEmitter, type IslandInfo, type ModuleGraph, type RouteIsland, type RouteIslandsResult, getRequestRouteData, registerDocumentEmitter, registerIslandEmitter, setRequestRouteData }; //# sourceMappingURL=islands.d.ts.map