import { SimpleField, TextRun } from "docx"; /** * Allowlisted Word fields for page chrome (header/footer/cover/toc HTML only). * * Security: caller-supplied `data-docx-field` values select a key in this table; * the OOXML instruction string is ALWAYS taken from the table value — never from * user input. Reject unknown keys (warn + drop the marker). * * Out of scope (intentionally omitted): * - INCLUDETEXT, INCLUDEPICTURE, LINK, DDE — external references / security prompts * - MERGEFIELD, DATABASE, FILLIN, ASK — mail merge / macros * - DOCPROPERTY, AUTHOR, TITLE, FILENAME — metadata leakage; use static text * - DATE, TIME, CREATEDATE, SAVEDATE — known at convert time; use static text * * future: STYLEREF (running headers), PAGEREF (cross-ref page numbers) — need args */ export declare const DOCX_FIELD_ALLOWLIST: { readonly page: "PAGE"; readonly pages: "NUMPAGES"; readonly "section-pages": "SECTIONPAGES"; readonly section: "SECTION"; }; export type DocxFieldName = keyof typeof DOCX_FIELD_ALLOWLIST; /** Friendly allowlist names for warnings and docs. */ export declare const DOCX_FIELD_NAMES: DocxFieldName[]; /** Map a case-insensitive friendly field name to a hardcoded OOXML instruction, or undefined if denied. */ export declare function resolveDocxFieldInstruction(friendlyName: string): string | undefined; /** Cached display value for numeric page fields before the word processor updates them. */ export declare const DOCX_FIELD_CACHED_VALUE = "1"; /** Sugar: replace `{page}` / `{pages}` with allowlisted marker spans (chrome HTML only). */ export declare function injectFieldTokens(html: string): string; /** w:fldSimple with a styled cached-value run; patched to a 5-run complex field post-pack. */ export declare class StyledDocxField extends SimpleField { constructor(instruction: string, cachedRun: TextRun); } export interface InlineFieldOptions { /** When true, allowlisted `data-docx-field` markers emit Word fields. */ enabled?: boolean; onWarning?: (message: string) => void; } export declare const DEFAULT_INLINE_FIELD_OPTIONS: InlineFieldOptions; //# sourceMappingURL=fields.d.ts.map