/** * The context in which templates are rendered within * @since 1.0.0 */ import * as Context from "@typed/context"; import { type DomServices, type DomServicesElementParams } from "@typed/dom/DomServices"; import { GlobalThis } from "@typed/dom/GlobalThis"; import { Window } from "@typed/dom/Window"; import type { Environment } from "@typed/environment"; import { CurrentEnvironment } from "@typed/environment"; import type { Rendered } from "@typed/wire"; import * as Layer from "effect/Layer"; import * as Option from "effect/Option"; import type { Entry } from "./Entry.js"; /** * The context in which templates are rendered within * @since 1.0.0 */ export interface RenderContext { /** * The current environment we are rendering within */ readonly environment: Environment; /** * Cache for root Node's being rendered into. */ readonly renderCache: WeakMap; /** * Cache for individual templates. */ readonly templateCache: WeakMap; } /** * The context in which templates are rendered within * @since 1.0.0 */ export declare const RenderContext: Context.Tagged; /** * @since 1.0.0 */ export type RenderContextOptions = { readonly environment: Environment; }; /** * @since 1.0.0 */ export declare function make({ environment }: RenderContextOptions): RenderContext; /** * @since 1.0.0 */ export declare function getRenderCache(renderCache: RenderContext["renderCache"], key: object): Option.Option; /** * @since 1.0.0 */ export declare function getTemplateCache(templateCache: RenderContext["templateCache"], key: TemplateStringsArray): Option.Option; /** * @since 1.0.0 */ export declare const dom: (window: Window & GlobalThis, options?: DomServicesElementParams) => Layer.Layer; /** * @since 1.0.0 */ export declare const server: Layer.Layer; declare const static_: Layer.Layer; export { /** * @since 1.0.0 */ static_ as static }; //# sourceMappingURL=RenderContext.d.ts.map