import type { SerializedImageSchema, SerializedRichTextSchema, SourcePath } from "@valbuild/core"; /** * The image schema a rich text field's inline `img` nodes are validated with, * when it is a real schema rather than `img: true`. * * It is the only way a rich text field can point INTO a gallery * (`s.richtext({ img: s.image(galleryVal) })`), which is why every reference * scan has to ask: the field's own schema is `richtext`, not `image`, so a walk * that only looks for image leaves walks straight past the images in it. */ export declare function richTextImageSchema(schema: SerializedRichTextSchema): SerializedImageSchema | null; /** * Every inline image in a rich text value, at the path of its `src`. * * `src` is a media value (`{ path, … }`), so the path handed out is one a * patch can address — `field.0."children".1."src"` — and a rename rewrites * `[…, "src", "path"]` there with the same op it uses on an image field. * Images nest (a list item holds a paragraph holds the image), so the walk * follows `children` all the way down. */ export declare function forEachRichTextImage(path: SourcePath, source: unknown, visit: (srcPath: SourcePath, src: Record) => void): void;