use std::path::PathBuf;
use vize_atelier_core::TemplateSyntaxMode;
use vize_carton::{FxHashMap, String as CompactString};
use super::import_rewriter::ImportRewriter;
use super::source_map::CompositeSourceMap;
use super::{Diagnostic, SfcBlockType};
use crate::virtual_ts::{VirtualTsCheckOptions, VirtualTsOptions};
mod build;
mod diagnostics;
mod mapping;
mod materialize;
mod passthrough;
mod project;
mod tsconfig_gen;
mod tsconfig_paths;
mod vue_codegen;
#[cfg(test)]
mod tests;
pub(super) const AUTO_IMPORT_STUBS_FILE: &str = "__vize_auto_imports.d.ts";
pub(super) const VUE_MODULE_STUBS_FILE: &str = "__vize_vue_modules.d.ts";
pub(super) const SHARED_HELPERS_FILE: &str = crate::virtual_ts::SHARED_PREAMBLE_FILE_NAME;
#[derive(Debug)]
pub struct VirtualFile {
pub content: CompactString,
pub source_map: CompositeSourceMap,
pub original_path: PathBuf,
pub virtual_path: PathBuf,
}
#[derive(Debug, Clone)]
pub struct OriginalPosition {
pub path: PathBuf,
pub line: u32,
pub column: u32,
pub block_type: Option<SfcBlockType>,
}
pub struct VirtualProject {
project_root: PathBuf,
virtual_root: PathBuf,
tsconfig_path: Option<PathBuf>,
preserve_unused_diagnostics: bool,
virtual_ts_options: VirtualTsOptions,
virtual_ts_check_options: VirtualTsCheckOptions,
options_api: bool,
legacy_vue2: bool,
template_syntax: TemplateSyntaxMode,
virtual_files: FxHashMap<PathBuf, VirtualFile>,
passthrough_files: FxHashMap<PathBuf, PathBuf>,
original_index: FxHashMap<PathBuf, PathBuf>,
original_contents: FxHashMap<PathBuf, CompactString>,
diagnostics: Vec<Diagnostic>,
rewriter: ImportRewriter,
}