UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

32 lines 1.34 kB
/** * Process switch statements (@switch, @case, @default) * * Uses the parser module for proper handling of: * - Nested parentheses in expressions (e.g., @switch(fn(a, fn(b)))) * - Nested @switch blocks * - @break directives */ export declare function processSwitchStatements(template: string, context: Record<string, any>, _filePath: string): string; /** * Process conditionals (@if, @elseif, @else, @unless) * * Uses the parser module for proper handling of: * - Nested parentheses in conditions (e.g., @if(fn(a, fn(b)))) * - Nested @if blocks * - Multiple @elseif branches */ export declare function processConditionals(template: string, context: Record<string, any>, filePath: string): string; /** * Process @auth and permissions directives * * @see Authentication Directive Documentation above for required context shapes */ export declare function processAuthDirectives(template: string, context: Record<string, any>): string; /** * Process @isset and @empty directives */ export declare function processIssetEmptyDirectives(template: string, context: Record<string, any>, _filePath?: string): string; /** * Process @env directive to conditionally render content based on environment */ export declare function processEnvDirective(template: string, _context: Record<string, any>, _filePath?: string): string;