Standardize settings file naming and relocate documentation files Fix code quality violations from rsx:check Reorganize user_management directory into logical subdirectories Move Quill Bundle to core and align with Tom Select pattern Simplify Site Settings page to focus on core site information Complete Phase 5: Multi-tenant authentication with login flow and site selection Add route query parameter rule and synchronize filename validation logic Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs Implement filename convention rule and resolve VS Code auto-rename conflict Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns Implement RPC server architecture for JavaScript parsing WIP: Add RPC server infrastructure for JS parsing (partial implementation) Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation Add JQHTML-CLASS-01 rule and fix redundant class names Improve code quality rules and resolve violations Remove legacy fatal error format in favor of unified 'fatal' error type Filter internal keys from window.rsxapp output Update button styling and comprehensive form/modal documentation Add conditional fly-in animation for modals Fix non-deterministic bundle compilation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
108 lines
3.2 KiB
TypeScript
108 lines
3.2 KiB
TypeScript
import { ProgramNode } from './ast.js';
|
|
export interface GeneratedCode {
|
|
code: string;
|
|
source_map?: string;
|
|
source_map_data_uri?: string;
|
|
components: Map<string, ComponentCode>;
|
|
}
|
|
export interface ComponentCode {
|
|
name: string;
|
|
render_function: string;
|
|
dependencies: string[];
|
|
tagName: string;
|
|
defaultAttributes: Record<string, any>;
|
|
defineArgs?: Record<string, any>;
|
|
extends?: string;
|
|
}
|
|
export declare class CodeGenerator {
|
|
private indent_level;
|
|
private components;
|
|
private current_component;
|
|
private in_slot;
|
|
private tag_depth;
|
|
private lastOutput;
|
|
private outputLine;
|
|
private outputColumn;
|
|
private sourceMapGenerator?;
|
|
private sourceContent?;
|
|
private sourceFile?;
|
|
private outputBuffer;
|
|
private enablePositionTracking;
|
|
private positionLog;
|
|
private currentOutputLine;
|
|
private preserveLines;
|
|
private outputLines;
|
|
private sourceLines;
|
|
generate(ast: ProgramNode, sourceFile?: string, sourceContent?: string): GeneratedCode;
|
|
/**
|
|
* Generate code with source maps using 1:1 line mapping + SourceMapGenerator
|
|
*/
|
|
generateWithSourceMap(ast: ProgramNode, sourceFile: string, sourceContent: string): GeneratedCode;
|
|
private generate_component_with_mappings_TESTING;
|
|
private generate_component;
|
|
private generate_function_body;
|
|
/**
|
|
* Generate function body with true 1:1 line mapping
|
|
* Each line in the source produces exactly one line in the output
|
|
*/
|
|
private generate_function_body_1to1;
|
|
private generate_node;
|
|
/**
|
|
* Padded trim: Collapse internal whitespace but preserve leading/trailing space
|
|
* Examples:
|
|
* " hello " → " hello "
|
|
* "hello" → "hello"
|
|
* " " → " "
|
|
* "\n\n \n" → " "
|
|
*/
|
|
private padded_trim;
|
|
private generate_text;
|
|
private generate_expression;
|
|
private generate_if;
|
|
private generate_for;
|
|
private generate_code_block;
|
|
private generate_tag_open;
|
|
private generate_html_tag;
|
|
private generate_component_invocation;
|
|
private parse_attributes;
|
|
private generate_attributes_with_conditionals;
|
|
private generate_attributes_object;
|
|
private is_self_closing_tag;
|
|
private compile_interpolated_value;
|
|
private escape_string;
|
|
private indent;
|
|
private extract_slots_from_children;
|
|
/**
|
|
* Emit text and track position for source maps
|
|
*/
|
|
private emit;
|
|
/**
|
|
* Emit a line of text (adds newline)
|
|
*/
|
|
private emitLine;
|
|
/**
|
|
* Reset position tracking
|
|
*/
|
|
private resetPositionTracking;
|
|
/**
|
|
* Get position tracking log for debugging
|
|
*/
|
|
getPositionLog(): Array<{
|
|
line: number;
|
|
column: number;
|
|
text: string;
|
|
node?: string;
|
|
}>;
|
|
/**
|
|
* Enable/disable position tracking
|
|
*/
|
|
setPositionTracking(enabled: boolean): void;
|
|
/**
|
|
* Serialize attribute object with proper handling of identifiers and expressions
|
|
* Quoted values become strings, identifiers/expressions become raw JavaScript
|
|
*/
|
|
private serializeAttributeObject;
|
|
private build_module_code;
|
|
}
|
|
export declare function generate(ast: ProgramNode, sourceFile?: string, sourceContent?: string): GeneratedCode;
|
|
//# sourceMappingURL=codegen.d.ts.map
|