/**** * Component Page Handling (TSX/JSX files) */ import type * as BundledReact from "react"; import type { RuntimeAdapter } from "../platform/adapters/base.js"; import type { EntityInfo, PageBundle } from "../types/index.js"; import type { DependencyPinningSourceInput } from "../transforms/esm/package-registry.js"; import type { RenderEnvironment } from "./context/render-context.js"; interface ComponentPageResult { pageElement: BundledReact.ReactElement; pageBundle: PageBundle; } interface BundleComponentForClientDeps { transformToESM: (source: string, filePath: string, projectDir: string, adapter: RuntimeAdapter, options: { projectId: string; dev: boolean; jsxImportSource: string; moduleServerUrl?: string; moduleServerOrigin?: string; reactVersion?: string; serverExternalPackages?: readonly string[]; dependencyPinningCacheKey?: string; dependencyPinningDependencies?: Readonly>; dependencyPinningSource?: DependencyPinningSourceInput; }) => Promise; } /** * Load and render a TSX/JSX component page */ export declare function handleComponentPage(pageInfo: EntityInfo, slug: string, projectDir: string, _componentRegistry: unknown, adapter: RuntimeAdapter, options?: { props?: Record; cachedClientModule?: string; moduleServerUrl?: string; /** Absolute request origin used to identify same-origin module URLs. */ moduleServerOrigin?: string; /** Project ID for multi-project SSR module isolation */ projectId?: string; /** Enable node position injection for Studio Navigator */ studioEmbed?: boolean; /** * Compile mode ("development" | "production"). Selects minification and * tree shaking. Not the request mode: see `environment`. */ mode?: string; /** * Request environment ("preview" | "production"). Selects preview-only * instrumentation such as Studio Navigator node positions. A hosted * preview render is compile mode "production" with environment "preview", * so this cannot be derived from `mode`. */ environment?: RenderEnvironment; /** Content source ID for cache isolation (branch name or release ID) */ contentSourceId?: string; /** React version for transforms (from project config) */ reactVersion?: string; /** Request-scoped dependency-pinning state used by transform caches. */ dependencyPinningCacheKey?: string; /** Immutable package map paired with dependencyPinningCacheKey. */ dependencyPinningDependencies?: Readonly>; /** Exact package source namespace paired with the immutable snapshot. */ dependencyPinningSource?: DependencyPinningSourceInput; /** Bare npm package roots that the runtime resolves without bundling. */ serverExternalPackages?: readonly string[]; /** Cooperative cancellation for this render's SSR transforms. */ signal?: AbortSignal; }): Promise; export declare function bundleComponentForClient(source: string, filePath: string, projectDir: string, adapter: RuntimeAdapter, moduleServerUrl?: string, projectId?: string, reactVersion?: string, injectedDeps?: BundleComponentForClientDeps, moduleServerOrigin?: string, dependencyPinningCacheKey?: string, dependencyPinningDependencies?: Readonly>, dependencyPinningSource?: DependencyPinningSourceInput, serverExternalPackages?: readonly string[], /** * Compile the hydration bundle in development mode. Production renders must * leave this false: dev output is unminified, not tree-shaken and carries an * inline sourcemap that discloses the project source. */ dev?: boolean): Promise; export {}; //# sourceMappingURL=component-handling.d.ts.map