import { AST } from '@handlebars/parser'; import { StandardDialect } from './dialects'; import * as types from './types'; import * as errors from './errors'; export declare const DEFAULT_HELPER_NAME = "__default"; export declare const DEFAULT_MODEL_DEPTH = 10; export declare const standardDialect: StandardDialect; export type MacrosData = { lang?: string | null; timeZone?: string | null; title?: string | null; moduleNames?: string[] | null; margins?: string | null; lineHeight?: string | null; fields?: types.Field[] | null; }; export declare class SimpleProcessor implements types.SimpleProcessorInterface { ast: AST.Program; data: types.Obj; helpers: types.Obj; preprocessFunc: types.PreprocessTemplateHandler; parseFunc: types.ParseTemplateHandler; constructor(val?: types.Template | null, data?: types.Obj, helpers?: types.Obj); templateToProcessed(val: types.Template): types.Template; templateToAst(val: types.Template): AST.Program; setTemplate(val: types.Template): this; setData(val: types.Obj): this; setHelpers(val: types.Obj): this; addHelper(name: string, val: any): this; setPreprocessHandler(val: types.PreprocessTemplateHandler): this; setParseHandler(val: types.ParseTemplateHandler): this; getHtml(data?: types.Obj | null, helpers?: types.Obj | null): string; getCss(data?: types.Obj | null, options?: types.Obj): Promise; get html(): string; } export declare class Processor extends SimpleProcessor implements types.ProcessorInterface { lang: string; title: string; timeZone: string; margins: string; lineHeight: number; dialect: types.DialectInterface; assets: types.Obj; fields: types.Field[]; getTitleFunc: types.GetTemplateTitleHandler; getMacroFunc: types.GetTemplateMacroHandler; constructor(val?: types.Template | null, data?: types.Obj, helpers?: types.Obj); templateToProcessed(val: types.Template): types.Template; useModule(...val: string[]): this; setTemplate(val: types.Template): this; setDialect(val: types.DialectInterface): this; setLang(val: string): this; setTitle(val: string): this; setTimeZone(val: string): this; setMargins(val: string): this; setLineHeight(val: number): this; setAssets(val: types.Obj): this; addAsset(name: string, val: Blob): this; setFields(val: types.Field[]): this; addModule(name: string, val: any): this; setTitleHandler(val: types.GetTemplateTitleHandler): this; setMacroHandler(val: types.GetTemplateMacroHandler): this; getDataModel(depth?: number): types.MetadataModelNode[]; getValidationErrors(data?: types.Obj | null, depth?: number): errors.TemplateDataValidationError[]; getIsValid(data?: types.Obj | null, depth?: number): boolean; get model(): types.MetadataModelNode[]; get validationErrors(): errors.TemplateDataValidationError[]; get errors(): errors.BaseError[]; get isValid(): boolean; } export declare function macrosToData(macros: types.Macro[]): MacrosData; export declare function defaultPreprocess(val: types.Template): types.Template; export default Processor;