/** * Strip empty-string defaults from richtext fields in a Puck config. * * Puck merges `defaultProps` underneath stored props on every render, so a * block whose stored props omit a richtext key silently renders that key's * default. An empty-string default is fatal there: Puck's RichTextRender wraps * any non-HTML string as `{type:"text", text: value}`, and prosemirror-model * rejects a zero-length text node with `RangeError: Empty text nodes are not * allowed` — taking down the whole subtree, since that render path has no error * boundary. `undefined` is safe (it normalizes to an empty doc), so dropping * the key is strictly better than defaulting to "". * * Runs over nested object/array fields too, since richtext commonly lives * inside array items. */ /** * Return a config with empty-string richtext defaults removed. Returns the * input unchanged (same reference) when there is nothing to strip, so it is * safe to call in a render path without breaking Puck's memoization. */ export declare function sanitizeRichtextDefaults(config: T): T;