import { GTConfig, PluginConfig } from './config'; /** * Architecture: * * Pass Pipeline: * - Pass 0: Macro expansion — transforms t`...` tagged templates and t(`...`) template/concatenation args * - Pass 1: Collection — collect + calculate all data, check for violations, register + track * - Pass 2: Injection — inject all data (hashes, messages, etc.) * * Babel functions: * - 1-to-1 relationship with processing functions * - Handle (1) enter/exit scope (2) invoking processing function * - ex) JSXElement() * * Processing functions: * - Are dependent on the pass, so they have three categories: (1) collection, (2) injection, (3) shared/general * - Invoke transformation functions and utility functions * - ex) processJSXElement() * - Has the following file structure: * + processing * | sharedProcessingFunction.ts * | + collection * | | collectionProcessingFunction.ts * | + injection * | | injectionProcessingFunction.ts * * Transformation functions: * - Are AGNOSTIC to pass number * - MUST be stateful in some way * - ex) trackImportDeclaration() * * Utility functions: * - Are AGNOSTIC to pass number * - Are stateless * - ex) extractIdentifiersFromLVal() * * State: * - Includes classes for tracking state * * Currently no support for: * - namespaces and and modules */ /** * GT Universal Plugin Options */ export interface GTUnpluginOptions extends PluginConfig, GTConfig { } export declare const MISSING_GT_CONFIG_WARNING = "[@generaltranslation/compiler] No gtConfig found. Auto JSX injection and parsingFlags features require a gt.config.json. See https://generaltranslation.com/en/docs/react/concepts/compiler."; export declare const createInvalidGTConfigWarning: (configPath: string, error: unknown) => string; /** * GT Universal Plugin - Main entry point * * Universal plugin for compile-time optimization of GT translation components * that works across webpack, Vite, Rollup, and other bundlers. */ declare const gtUnplugin: import("unplugin").UnpluginInstance; export default gtUnplugin; export declare const webpack: (options?: GTUnpluginOptions | undefined) => WebpackPluginInstance; export declare const vite: (options?: GTUnpluginOptions | undefined) => import("vite").Plugin | import("vite").Plugin[]; export declare const rollup: (options?: GTUnpluginOptions | undefined) => any; export declare const rspack: (options?: GTUnpluginOptions | undefined) => RspackPluginInstance; export declare const esbuild: (options?: GTUnpluginOptions | undefined) => EsbuildPlugin; //# sourceMappingURL=index.d.ts.map