import { JSX } from 'react'; import { ContentItem, ContentType, CustomFieldDef } from '../../schema/index.ts'; interface Props { /** The form's current items, so fields at their cap can be greyed out. */ items: ContentItem[]; onAddType: (type: ContentType) => void; onAddField: (field: CustomFieldDef) => void; } /** * The field menu that slides in over the layout list. Picking a row adds it and * the menu *stays open*: building a form means adding several things at once, * and closing after each one turns that into a trip back through the menu every * time. Nothing is selected either — the new item's settings would replace this * menu, which is the same interruption by another route. The author closes the * menu when they're done, and clicks whatever they want to edit. * * That leaves the add needing its own acknowledgement, since the menu covers the * layout list and a `hidden` field paints nothing on the canvas: the row that * was picked says so briefly. The "create new field" row expands into an inline * form that hands the draft to the host and waits (loader) for the finalized * field. * * A row is also a thing to pick up: dragged onto the canvas it lands where it * was dropped, which is the only way to say "this field goes *there*", and the * only way to put two fields on one row from here. The click stays, because it * is also the keyboard's way in, and because appending to the open step is what * an author wants most of the time. */ export declare function FieldPicker({ items, onAddType, onAddField }: Props): JSX.Element; export declare const ICONS: Record; export {};