import { w as JsonValue } from "../../rule-DYNYH_ha.js"; import { r as EditRef } from "../../visual-editing-Cz_qw2ID.js"; //#region src/core/content/stega-clean.d.ts /** * Remove any stega payload from a string, leaving the visible text untouched. * A no-op on strings that carry no payload, so it is safe to run on every value * on the save path unconditionally. */ declare function stegaClean(value: string): string; //#endregion //#region src/core/content/stega.d.ts /** * Embed an {@link EditRef} invisibly inside `value`. The text renders * identically; the returned string now carries its own source pointer. */ declare function stegaEncode(ref: EditRef, value: string): string; /** Recover the {@link EditRef} embedded in `value` by {@link stegaEncode}, or * `null` if the string carries no Louise stega payload. */ declare function stegaDecode(value: string): EditRef | null; /** * Decide whether a field's text should be stega-encoded. `field` is the leaf * key. Returns `true` to encode, `false` to skip. Provide your own to change * the policy; wrap {@link defaultStegaFilter} to extend it. */ type StegaFilter = (field: string) => boolean; /** * Default {@link StegaFilter}: skip slugs/urls/ids/emails/dates/`*_at`(`*At`) * timestamps and structural keys (`_key`/`type`/`status`/`meta`) so invisible * characters never reach a URL, ``, date, or JSON sink. Everything else * (display prose) is encoded. */ declare const defaultStegaFilter: StegaFilter; /** * Return a copy of `doc` with every eligible display string stega-encoded so a * preview render carries per-field source pointers. Recurses into nested * objects and `_key`-keyed arrays (blocks), building the dotted `field` path * (`blocks.<_key>.heading`) the editor routes on. PREVIEW DATA PATH ONLY. */ declare function encodeDocument(collection: string, id: number, doc: Record<string, JsonValue>, filter?: StegaFilter): Record<string, JsonValue>; //#endregion export { StegaFilter, defaultStegaFilter, encodeDocument, stegaClean, stegaDecode, stegaEncode };