/** * Per-field help text, rendered under the input. * * Opt in with Puck's per-field `metadata`, the same extension point the * collapsible section uses: * * metadata: { help: 'Always shown.', helpWhenEmpty: 'Shown while empty.' } * * `helpWhenEmpty` is how an inheriting field says where its value comes from, * since a field is inheriting exactly while it is empty. Fields without either * key render unchanged. * * These are `fieldTypes` overrides, so Puck hands us its own field renderer as * `children` — the help is appended after it rather than replacing it. Note the * side effect of registering a type here: Puck subscribes to the value of every * field of that type, which is what makes the empty/authored switch work. */ import React from 'react'; export interface FieldGuidanceMetadata { help?: string; helpWhenEmpty?: string; } interface GuidedFieldProps { field: { metadata?: FieldGuidanceMetadata; }; value: unknown; children: React.ReactNode; } declare function WithHelpText({ field, value, children }: GuidedFieldProps): React.ReactElement; /** * The field types help text is wired for. Select is included for the fields * whose fallback is a fixed default rather than another prop — it has no * `placeholder` to show one in, so the help line carries it alone. */ export declare const fieldGuidanceFieldTypes: { text: typeof WithHelpText; textarea: typeof WithHelpText; select: typeof WithHelpText; }; export declare function createFieldGuidanceOverrides(): { fieldTypes: typeof fieldGuidanceFieldTypes; }; export {};