/** * Jinja2/DTL Runtime - Executes AST and produces output * Compatible with both Jinja2 and Django Template Language * * OPTIMIZED: Uses synchronous execution path for maximum performance. * Only Include/Extends tags require async (for template loading). */ import { Context } from './context'; import { FilterFunction } from '../filters'; import { TestFunction } from '../tests'; import type { TemplateNode, ExpressionNode } from '../parser/nodes'; export interface RuntimeOptions { autoescape?: boolean; filters?: Record; tests?: Record; globals?: Record; urlResolver?: (name: string, args: any[], kwargs: Record) => string; staticResolver?: (path: string) => string; templateLoader?: (name: string) => Promise; /** Timezone for date/time operations (e.g., 'Europe/Rome', 'UTC') */ timezone?: string; } export declare class Runtime { private options; private filters; private tests; private blocks; private parentTemplate; private source?; constructor(options?: RuntimeOptions); render(ast: TemplateNode, context?: Record): Promise; private templateNeedsAsync; private nodesNeedAsync; private collectBlocksSync; private renderTemplateSync; private renderNodeSync; private renderIfSync; private renderForSync; private renderBlockSync; private renderWithSync; private renderUrlSync; private renderStaticSync; private renderNowSync; private cycleState; private renderCycleSync; private renderFirstofSync; private ifchangedState; private renderIfchangedSync; private renderRegroupSync; private renderWidthratioSync; private renderLoremSync; private renderCsrfTokenSync; private renderDebugSync; private renderTemplatetagSync; private getDateInTimezone; private formatDate; private renderNodesSync; private eval; private evalGetAttr; private evalGetItem; private static readonly TITLE_REGEX; private static readonly STRIPTAGS_REGEX; private static readonly SLUGIFY_REGEX1; private static readonly SLUGIFY_REGEX2; private static readonly SLUGIFY_REGEX3; private static readonly WHITESPACE_REGEX; private static readonly URLIZE_REGEX; private static readonly NEWLINE_REGEX; private static readonly DOUBLE_NEWLINE_REGEX; private evalFilter; private evalBinaryOp; private evalUnaryOp; private evalCompare; private evalConditional; private evalObjectLiteral; private evalFunctionCall; private evalTest; private evalObjectSync; private collectBlocks; private renderTemplateAsync; private renderNodeAsync; private renderIfAsync; private renderForAsync; private renderBlockAsync; private renderInclude; private renderWithAsync; private renderNodesAsync; evaluate(node: ExpressionNode, ctx: Context): Promise; private stringify; private isTruthy; private deepEqual; private isIn; private toIterable; addFilter(name: string, fn: FilterFunction): void; addTest(name: string, fn: TestFunction): void; addGlobal(name: string, value: any): void; setSource(source: string): void; } export { Context } from './context'; //# sourceMappingURL=index.d.ts.map