interface CatalogOrigin$1 { file: string; line: number; scope?: string; } interface ParsedCatalogOrigin { file: string; scope?: string; } interface CatalogUpdateMessage$1 { message: string; context?: string; placeholders?: Record>; extractedComments: Array; origins: Array; } type PoLineBreaks$1 = "Auto" | "Off"; interface PoOutputOptions$1 { lineBreaks?: PoLineBreaks$1; } interface CatalogUpdateRequest$1 { targetPath: string; locale: string; sourceLocale: string; clean: boolean; forceClean?: boolean; format?: CatalogConfigFormat$1; po?: PoOutputOptions$1; messages: Array; } interface CatalogUpdateStats$1 { total: number; added: number; changed: number; unchanged: number; obsoleteMarked: number; obsoleteRemoved: number; } interface CatalogUpdateResult$1 { created: boolean; updated: boolean; stats: CatalogUpdateStats$1; diagnostics: Array; } interface CatalogParseRequest$1 { targetPath: string; locale: string; sourceLocale: string; format?: CatalogConfigFormat$1; } interface ParsedCatalogMessage$1 { message: string; context?: string; comments: Array; origins: Array; obsolete: boolean; translated: boolean; machine?: MachineMetadata$1; } interface MachineMetadata$1 { lock: string; ai?: AiProvenance; } interface AiProvenance { model: string; confidence?: number; } interface CatalogParseResult$1 { locale?: string; headers: Record; messages: Array; diagnostics: Array; } interface TranslationCandidateId$1 { catalog: string; locale: string; message: string; context?: string; } type TranslationValueKind = "Singular" | "Plural"; type TranslationPluralKind$1 = "Cardinal" | "Ordinal"; interface TranslationValue$1 { kind: TranslationValueKind; value?: string; variable?: string; pluralKind?: TranslationPluralKind$1; offset?: number; values?: Record; } interface TranslationWorkflowOrigin$1 { file: string; scope?: string; } interface TranslationReviewState$1 { translated: boolean; fuzzy: boolean; obsolete: boolean; } interface TranslationCandidate$1 { id: TranslationCandidateId$1; targetPath: string; format: CatalogConfigFormat$1; source: TranslationValue$1; translation: TranslationValue$1; comments: Array; origins: Array; review: TranslationReviewState$1; machine?: MachineMetadata$1; fingerprint: string; } interface TranslationWorkflowDiagnostic$1 { code: string; message: string; id?: TranslationCandidateId$1; catalogPath?: string; locale?: string; } type TranslationPatchOutcomeStatus$1 = "Applied" | "Unchanged" | "Rejected" | "NotApplied"; interface TranslationPatchOutcome$1 { id: TranslationCandidateId$1; status: TranslationPatchOutcomeStatus$1; } interface TranslationPatchStats { requested: number; applied: number; unchanged: number; catalogsUpdated: number; } interface TranslationPatchResult$1 { updated: boolean; stats: TranslationPatchStats; outcomes: Array; diagnostics: Array; } interface CatalogCombineStats { inputs: number; definitions: number; selected: number; skipped: number; conflictsResolved: number; total: number; } interface CatalogCombineResult$1 { content: string; stats: CatalogCombineStats; diagnostics: Array; } type CatalogFileFormat$1 = "Po" | "Fcl"; interface CatalogFileCombineResult$1 { outputPath: string; format: CatalogFileFormat$1; stats: CatalogCombineStats; diagnostics: Array; } type CatalogDiagnosticSeverity$1 = "Info" | "Warning" | "Error"; interface CatalogDiagnosticSourceKey { message: string; context?: string; } interface CatalogDiagnostic$1 { severity: CatalogDiagnosticSeverity$1; code: string; message: string; sourceKey?: CatalogDiagnosticSourceKey; } interface CatalogAuditCheckOptions$1 { completeness?: boolean; extraMessages?: boolean; icuSyntax?: boolean; icuCompatibility?: boolean; semanticMetadata?: boolean; obsoleteEntries?: boolean; fuzzyFlags?: boolean; } interface CatalogAuditSummary$1 { sourceMessages: number; targetLocales: number; diagnostics: number; errors: number; warnings: number; infos: number; } interface CatalogAuditDiagnostic$1 { severity: CatalogDiagnosticSeverity$1; code: string; message: string; catalogPath: string; locale?: string; sourceKey?: CatalogDiagnosticSourceKey; name?: string; } interface CatalogAuditResult$1 { summary: CatalogAuditSummary$1; diagnostics: Array; } interface MessageMetadataInput$1 { msgid: string; msgctxt?: string; description?: string; origin: Array; args?: Record; tags?: Array; selectors?: Record; } interface MessageMetadata$1 { msgid: string; msgctxt?: string; description?: string; origin: Array; args: Record; tags: Array; selectors: Record; } interface MessageMetadataDiagnostic$1 { severity: CatalogDiagnosticSeverity$1; code: string; message: string; name?: string; } interface MessageMetadataValidationReport$1 { diagnostics: Array; } interface MessageOriginMetadata$1 { file?: string; line?: number; component?: string; route?: string; } type MessageArgumentKind$1 = "String" | "Number" | "Date" | "Time" | "Datetime" | "Boolean" | "Enum" | "List" | "Duration" | "RelativeTime" | "Name" | "Unknown"; interface MessageArgumentMetadata$1 { kind: MessageArgumentKind$1; role?: string; values: Array; format?: MessageArgumentFormatMetadata$1; } interface MessageArgumentFormatMetadata$1 { style?: string; styleKind?: MessageFormatStyleKind$1; } type MessageFormatStyleKind$1 = "None" | "Predefined" | "Skeleton" | "Pattern"; interface MessageSelectorMetadata$1 { kind: MessageSelectorKind$1; cases: Array; offset?: number; } type MessageSelectorKind$1 = "Select" | "Plural" | "Selectordinal"; interface CatalogArtifactSourceKey$1 { message: string; context?: string; } type CatalogArtifactDiagnosticSeverity$1 = "Info" | "Warning" | "Error"; interface CatalogArtifactMissingMessage$1 { compiledId: string; sourceKey: CatalogArtifactSourceKey$1; requestedLocale: string; resolvedLocale?: string; } interface CatalogArtifactDiagnostic$1 { severity: CatalogArtifactDiagnosticSeverity$1; code: string; message: string; compiledId: string; sourceKey: CatalogArtifactSourceKey$1; locale: string; } interface CatalogArtifactResult$1 { messages: Record; watchFiles: Array; missing: Array; diagnostics: Array; resolvedLocaleChain?: Array; } interface CatalogModuleResult$1 { code: string; warnings: Array; watchFiles: Array; locale: string; } interface CatalogArtifactCatalogConfig$1 { path: string; format?: CatalogConfigFormat$1; /** * Host-side source selection only. Native catalog workflows do not apply * these patterns; adapters such as the Vite plugin filter source modules * before invoking the native operation. */ include?: Array; /** * Host-side source selection only. Native catalog workflows do not apply * these patterns; adapters such as the Vite plugin filter source modules * before invoking the native operation. */ exclude?: Array; } type CatalogConfigFormat$1 = "Po" | "Fcl"; interface CatalogArtifactConfig$1 { rootDir: string; locales: Array; sourceLocale: string; fallbackLocales?: Array | Record>; pseudoLocale?: string; catalogs: Array; } interface ExtractedMessageOrigin { filename: string; line: number; column?: number; scope?: string; } interface NativeExtractedMessage$1 { message: string; comment?: string; context?: string; placeholders?: Record; origin: ExtractedMessageOrigin; } interface ExtractCatalogMessagesRequest$1 { rootDir: string; files: Array; /** * Worker threads for the parallel extraction pass. Omit to use the * measured default; 1 forces serial extraction. */ maxThreads?: number; referenceScopes?: boolean; mdx?: NativeMdxOptions; } interface ExtractCatalogFileFailure$1 { path: string; message: string; } interface ExtractCatalogMessagesResult$1 { messages: Array; fileCount: number; failedFiles: Array; } type NativeMdxFramework = "React" | "Solid"; interface NativeMdxOptions { framework?: NativeMdxFramework; translatableAttributes?: Array; frontMatterFields?: Array; transModule?: string; runtimeModule?: string; ignoreDirective?: string; /** Preserve source messages as runtime fallbacks. Defaults to `false`. */ keepSourceFallbacks?: boolean; } interface NativeMdxSourceRange { start: number; end: number; line: number; column: number; } interface NativeMdxDiagnostic { code: string; message: string; primary: NativeMdxSourceRange; related?: NativeMdxSourceRange; } interface NativeMdxAnalysisResult { messages: Array; diagnostics: Array; code?: string; compiledIds: Array; map?: NativeTransformSourceMap$1; } interface NativeInfo$1 { palamedesVersion: string; ferrocatVersion: string; } interface ParsedPoItem$1 { msgid: string; msgctxt?: string; references: Array; msgidPlural?: string; msgstr: Array; comments: Array; extractedComments: Array; flags: Record; metadata: Record; obsolete: boolean; nplurals: number; } interface ParsedPoFile$1 { comments: Array; extractedComments: Array; headers: Record; headerOrder: Array; items: Array; } interface NativeSourceRuleOptions { placeholderOnly?: string; emptyComponentOnly?: string; preferTransInJsx?: string; } interface NativeSourceAnalysisOptions { mdx?: NativeMdxOptions; rules?: NativeSourceRuleOptions; } interface NativeSourceRange { start: number; end: number; line: number; column: number; } type NativeSourceDiagnosticSeverity = "Info" | "Warning" | "Error"; interface NativeSourceDiagnostic { code: string; severity: NativeSourceDiagnosticSeverity; file: string; primary: NativeSourceRange; message: string; help: string; related?: NativeSourceRange; } interface NativeSourceAnalysisResult { messages: Array; diagnostics: Array; } interface NativeServerFunctionTransformOptions { initializerModule: string; initializerExport: string; } interface NativeTransformOptions$1 { runtimeModule?: string; runtimeImportName?: string; stripNonEssentialProps?: boolean; /** Preserve source messages as runtime fallbacks. Defaults to `false`. */ keepSourceFallbacks?: boolean; /** @deprecated Use `keepSourceFallbacks` with the inverse value. */ stripMessageField?: boolean; serverFunctions?: NativeServerFunctionTransformOptions; } interface NativeTransformEdit$1 { start: number; end: number; text: string; } interface NativeTransformSourceMap$1 { version: number; sources: Array; sourcesContent?: Array; names: Array; mappings: string; file?: string; } interface NativeTransformResult$1 { code: string; hasChanged: boolean; compiledIds: Array; edits: Array; map?: NativeTransformSourceMap$1; prependText?: string; } type NativeInfo = NativeInfo$1; type ParsedPoItem = ParsedPoItem$1; type ParsedPoFile = ParsedPoFile$1; type CatalogOrigin = CatalogOrigin$1; type CatalogUpdateMessage = CatalogUpdateMessage$1; type CatalogUpdateStats = CatalogUpdateStats$1; type ExtractCatalogFileFailure = ExtractCatalogFileFailure$1; type ExtractCatalogMessagesRequest = Omit & { mdx?: MdxOptions; }; type ExtractCatalogMessagesResult = ExtractCatalogMessagesResult$1; type ParsedCatalogMessage = ParsedCatalogMessage$1; type MachineMetadata = MachineMetadata$1; type CatalogAuditCheckOptions = CatalogAuditCheckOptions$1; type CatalogAuditSummary = CatalogAuditSummary$1; type CatalogDiagnosticSeverity = "info" | "warning" | "error"; type CatalogDiagnostic = Omit & { severity: CatalogDiagnosticSeverity; }; type CatalogUpdateResult = Omit & { diagnostics: CatalogDiagnostic[]; }; type CatalogParseResult = Omit & { diagnostics: CatalogDiagnostic[]; }; type TranslationCandidateId = TranslationCandidateId$1; type TranslationPluralKind = "cardinal" | "ordinal"; type TranslationValue = { kind: "singular"; value: string; } | { kind: "plural"; variable: string; pluralKind: TranslationPluralKind; offset: number; values: Record; }; type TranslationWorkflowOrigin = { file: string; scope?: string; }; type TranslationReviewState = { translated: boolean; fuzzy: boolean; obsolete: boolean; }; type TranslationCandidate = Omit & { format: CatalogConfigFormat; source: TranslationValue; translation: TranslationValue; origins: TranslationWorkflowOrigin[]; }; type TranslationWorkflowDiagnostic = { code: string; message: string; id?: TranslationCandidateId; catalogPath?: string; locale?: string; }; type TranslationCandidateRequest = { config: CatalogArtifactConfig; locales?: string[]; targets?: TranslationCandidateId[]; maxOrigins?: number; }; type TranslationCandidateResult = { candidates: TranslationCandidate[]; diagnostics: TranslationWorkflowDiagnostic[]; }; type TranslationMachineProvenance = { ai?: { model: string; confidence?: number; }; }; type TranslationPatch = { id: TranslationCandidateId; fingerprint: string; translation: TranslationValue; machine?: TranslationMachineProvenance; }; type TranslationPatchRequest = { config: CatalogArtifactConfig; patches: TranslationPatch[]; po?: PoOutputOptions; }; type TranslationPatchOutcomeStatus = "applied" | "unchanged" | "rejected" | "notApplied"; type TranslationPatchOutcome = Omit & { status: TranslationPatchOutcomeStatus; }; type TranslationPatchResult = Omit & { outcomes: TranslationPatchOutcome[]; diagnostics: TranslationWorkflowDiagnostic[]; }; declare const TRANSLATION_PATCH_WRITE_ERROR_CODE = "ERR_PALAMEDES_TRANSLATION_PATCH_WRITE"; declare const TRANSLATION_PATCH_WRITE_ERROR_MESSAGE = "Failed to replace a translation catalog; completed per-file outcomes are available in error.report."; type TranslationPatchWriteError = Error & { code: typeof TRANSLATION_PATCH_WRITE_ERROR_CODE; cause: Error; report: TranslationPatchResult; }; type CatalogAuditDiagnostic = Omit & { severity: CatalogDiagnosticSeverity; }; type CatalogAuditResult = Omit & { diagnostics: CatalogAuditDiagnostic[]; }; type CatalogCombineInput = { content: string; label?: string; }; type CatalogConflictStrategy = "useFirst" | "useLast" | "error"; type CatalogCombineSelection = "all" | "unique" | { moreThan: number; } | { lessThan: number; }; type CatalogCombineRequest = { inputs: CatalogCombineInput[]; sourceLocale: string; locale?: string; conflictStrategy?: CatalogConflictStrategy; selection?: CatalogCombineSelection; includeObsolete?: boolean; }; type CatalogCombineResult = Omit & { diagnostics: CatalogDiagnostic[]; }; type CatalogFileFormat = "po" | "fcl"; type CatalogThreeWayMergeRequest = { ancestor: CatalogCombineInput; ours: CatalogCombineInput; theirs: CatalogCombineInput; format: CatalogFileFormat; sourceLocale: string; locale?: string; conflictStrategy?: CatalogConflictStrategy; po?: PoOutputOptions; }; type CatalogConfigFormat = CatalogFileFormat; type PoLineBreaks = "auto" | "off"; type PoOutputOptions = { lineBreaks?: PoLineBreaks; }; type CatalogUpdateRequest = Omit & { format?: CatalogConfigFormat; po?: PoOutputOptions; }; type CatalogParseRequest = Omit & { format?: CatalogConfigFormat; }; type CatalogFileCombineRequest = { inputPaths: string[]; outputPath: string; format?: CatalogFileFormat; sourceLocale: string; locale?: string; conflictStrategy?: CatalogConflictStrategy; po?: PoOutputOptions; }; type CatalogFileCombineResult = Omit & { format: CatalogFileFormat; diagnostics: CatalogDiagnostic[]; }; type CatalogFileThreeWayMergeRequest = { ancestorPath: string; oursPath: string; theirsPath: string; outputPath: string; format?: CatalogFileFormat; sourceLocale: string; locale?: string; conflictStrategy?: CatalogConflictStrategy; po?: PoOutputOptions; }; type CatalogAuditOptions = { locales?: string[]; checks?: CatalogAuditCheckOptions; metadata?: MessageMetadataInput[]; }; type MessageMetadataInput = MessageMetadataInput$1; type MessageOriginMetadata = MessageOriginMetadata$1; type MessageArgumentKind = MessageArgumentKind$1; type MessageArgumentMetadata = MessageArgumentMetadata$1; type MessageArgumentFormatMetadata = MessageArgumentFormatMetadata$1; type MessageFormatStyleKind = MessageFormatStyleKind$1; type MessageSelectorKind = MessageSelectorKind$1; type MessageSelectorMetadata = MessageSelectorMetadata$1; type MessageMetadata = MessageMetadata$1; type MessageMetadataDiagnostic = Omit & { severity: CatalogDiagnosticSeverity; }; type MessageMetadataValidationReport = Omit & { diagnostics: MessageMetadataDiagnostic[]; }; type NativeExtractedMessageOrigin = [filename: string, line: number, column?: number] & { scope?: string; }; type NativeExtractedMessage = Omit & { origin: NativeExtractedMessageOrigin; }; type MdxFramework = "react" | "solid"; type MdxOptions = Omit & { framework?: MdxFramework; }; type MdxSourceRange = NativeMdxSourceRange; type MdxDiagnostic = NativeMdxDiagnostic; type MdxAnalysisResult = Omit & { messages: NativeExtractedMessage[]; }; type SourceRange = NativeSourceRange; type SourceDiagnosticSeverity = "error" | "warning" | "info"; type SourceDiagnostic = Omit & { severity: SourceDiagnosticSeverity; }; type SourceAnalysisResult = Omit & { messages: NativeExtractedMessage[]; diagnostics: SourceDiagnostic[]; }; type SourceRuleLevel = "off" | "info" | "warning" | "error"; type SourceRuleOptions = Omit & { placeholderOnly?: SourceRuleLevel; emptyComponentOnly?: SourceRuleLevel; preferTransInJsx?: SourceRuleLevel; }; type SourceAnalysisOptions = Omit & { mdx?: MdxOptions; rules?: SourceRuleOptions; }; type NativeTransformOptions = NativeTransformOptions$1; type NativeTransformEdit = NativeTransformEdit$1; type NativeTransformSourceMap = NativeTransformSourceMap$1; type NativeTransformResult = NativeTransformResult$1; type CatalogArtifactSourceKey = CatalogArtifactSourceKey$1; type CatalogArtifactMissingMessage = CatalogArtifactMissingMessage$1; type CatalogArtifactDiagnosticSeverity = "info" | "warning" | "error"; type CatalogArtifactDiagnostic = Omit & { severity: CatalogArtifactDiagnosticSeverity; }; type CatalogArtifactFallbackLocales = NonNullable; type CatalogArtifactCatalogConfig = Omit & { format?: CatalogConfigFormat; }; type CatalogArtifactConfig = Omit & { catalogs: CatalogArtifactCatalogConfig[]; }; type CatalogArtifactResult = Omit & { diagnostics: CatalogArtifactDiagnostic[]; }; type CatalogModuleOptions = { locale: string; pseudoLocale?: string; failOnMissing?: boolean; failOnCompileError?: boolean; missingFailureHint?: string; compileFailureHint?: string; diagnosticsWarningHint?: string; }; type CatalogModuleResult = CatalogModuleResult$1; declare function getNativeInfo(): NativeInfo; declare function parsePo(source: string): ParsedPoFile; declare function updateCatalogFile(request: CatalogUpdateRequest): CatalogUpdateResult; declare function parseCatalog(request: CatalogParseRequest): CatalogParseResult; declare function listTranslationCandidates(request: TranslationCandidateRequest): TranslationCandidateResult; declare function applyTranslationPatches(request: TranslationPatchRequest): TranslationPatchResult; declare function isTranslationPatchWriteError(error: unknown): error is TranslationPatchWriteError; declare function auditCatalogs(config: CatalogArtifactConfig, options?: CatalogAuditOptions): CatalogAuditResult; declare function deriveMessageMetadata(message: string, context?: string): MessageMetadata; declare function normalizeMessageMetadata(input: MessageMetadataInput): MessageMetadata; declare function validateMessageMetadata(input: MessageMetadataInput): MessageMetadataValidationReport; declare function combineCatalogs(request: CatalogCombineRequest): CatalogCombineResult; declare function combineCatalogFiles(request: CatalogFileCombineRequest): CatalogFileCombineResult; declare function mergeCatalogsThreeWay(request: CatalogThreeWayMergeRequest): CatalogCombineResult; declare function mergeCatalogFilesThreeWay(request: CatalogFileThreeWayMergeRequest): CatalogFileCombineResult; declare function compileCatalogArtifact(config: CatalogArtifactConfig, resourcePath: string): CatalogArtifactResult; declare function compileCatalogArtifactSelected(config: CatalogArtifactConfig, resourcePath: string, compiledIds: string[]): CatalogArtifactResult; declare function compileCatalogModule(config: CatalogArtifactConfig, resourcePath: string, options: CatalogModuleOptions): CatalogModuleResult; /** Render an already-compiled message map through the canonical native generator. */ declare function renderCatalogModule(messages: Record): string; declare function extractMessagesNative(source: string, filename: string, options?: MdxOptions): NativeExtractedMessage[]; declare function analyzeSourceNative(source: string, filename: string, options?: SourceAnalysisOptions): SourceAnalysisResult; declare function analyzeMdxNative(source: string, filename: string, options?: MdxOptions): MdxAnalysisResult; declare function extractCatalogMessagesFromFiles(request: ExtractCatalogMessagesRequest): ExtractCatalogMessagesResult; declare function transformMacrosNative(source: string, filename: string, options?: NativeTransformOptions): NativeTransformResult; export { TRANSLATION_PATCH_WRITE_ERROR_CODE, TRANSLATION_PATCH_WRITE_ERROR_MESSAGE, analyzeMdxNative, analyzeSourceNative, applyTranslationPatches, auditCatalogs, combineCatalogFiles, combineCatalogs, compileCatalogArtifact, compileCatalogArtifactSelected, compileCatalogModule, deriveMessageMetadata, extractCatalogMessagesFromFiles, extractMessagesNative, getNativeInfo, isTranslationPatchWriteError, listTranslationCandidates, mergeCatalogFilesThreeWay, mergeCatalogsThreeWay, normalizeMessageMetadata, parseCatalog, parsePo, renderCatalogModule, transformMacrosNative, updateCatalogFile, validateMessageMetadata }; export type { CatalogArtifactCatalogConfig, CatalogArtifactConfig, CatalogArtifactDiagnostic, CatalogArtifactDiagnosticSeverity, CatalogArtifactFallbackLocales, CatalogArtifactMissingMessage, CatalogArtifactResult, CatalogArtifactSourceKey, CatalogAuditCheckOptions, CatalogAuditDiagnostic, CatalogAuditOptions, CatalogAuditResult, CatalogAuditSummary, CatalogCombineInput, CatalogCombineRequest, CatalogCombineResult, CatalogCombineSelection, CatalogConfigFormat, CatalogConflictStrategy, CatalogDiagnostic, CatalogDiagnosticSeverity, CatalogFileCombineRequest, CatalogFileCombineResult, CatalogFileFormat, CatalogFileThreeWayMergeRequest, CatalogModuleOptions, CatalogModuleResult, CatalogOrigin, CatalogParseRequest, CatalogParseResult, CatalogThreeWayMergeRequest, CatalogUpdateMessage, CatalogUpdateRequest, CatalogUpdateResult, CatalogUpdateStats, ExtractCatalogFileFailure, ExtractCatalogMessagesRequest, ExtractCatalogMessagesResult, MachineMetadata, MdxAnalysisResult, MdxDiagnostic, MdxFramework, MdxOptions, MdxSourceRange, MessageArgumentFormatMetadata, MessageArgumentKind, MessageArgumentMetadata, MessageFormatStyleKind, MessageMetadata, MessageMetadataDiagnostic, MessageMetadataInput, MessageMetadataValidationReport, MessageOriginMetadata, MessageSelectorKind, MessageSelectorMetadata, NativeExtractedMessage, NativeExtractedMessageOrigin, NativeInfo, NativeTransformEdit, NativeTransformOptions, NativeTransformResult, NativeTransformSourceMap, ParsedCatalogMessage, ParsedPoFile, ParsedPoItem, PoLineBreaks, PoOutputOptions, SourceAnalysisOptions, SourceAnalysisResult, SourceDiagnostic, SourceDiagnosticSeverity, SourceRange, SourceRuleLevel, SourceRuleOptions, TranslationCandidate, TranslationCandidateId, TranslationCandidateRequest, TranslationCandidateResult, TranslationMachineProvenance, TranslationPatch, TranslationPatchOutcome, TranslationPatchOutcomeStatus, TranslationPatchRequest, TranslationPatchResult, TranslationPatchWriteError, TranslationPluralKind, TranslationReviewState, TranslationValue, TranslationWorkflowDiagnostic, TranslationWorkflowOrigin };