Refactors project structure for improved modularity
Moves components and modules to more appropriate directories. This change improves project organization and maintainability by grouping related files into logical directories, enhancing code discoverability and reducing potential naming conflicts.
This commit is contained in:
16 files changed
+21
-21
No files matched your search
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Template variable configuration
|
||||
*/
|
||||
export interface TemplateVariable {
|
||||
type: 'string' | 'number' | 'boolean';
|
||||
defaultValue: any;
|
||||
description?: string;
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template metadata
|
||||
*/
|
||||
export interface TemplateMetadata {
|
||||
author?: string;
|
||||
version?: string;
|
||||
description?: string;
|
||||
compatibility: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Typst template definition
|
||||
*/
|
||||
export interface Template {
|
||||
/** Display name of the template */
|
||||
name: string;
|
||||
/** File path to the template */
|
||||
filePath: string;
|
||||
/** Template variables and their types */
|
||||
variables: Record<string, TemplateVariable>;
|
||||
/** Template metadata */
|
||||
metadata: TemplateMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template validation result
|
||||
*/
|
||||
export interface TemplateValidationResult {
|
||||
isValid: boolean;
|
||||
errors: string[];
|
||||
warnings: string[];
|
||||
variables: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Variable substitution context
|
||||
*/
|
||||
export interface SubstitutionContext {
|
||||
title?: string;
|
||||
author?: string;
|
||||
date?: string;
|
||||
body: string;
|
||||
font?: string;
|
||||
fontSize?: string;
|
||||
pageSize?: string;
|
||||
margins?: string;
|
||||
[key: string]: string | undefined;
|
||||
}
|
||||
Reference in new issue
Block a user