/**
 * Best-effort round-trip: parse Component JSX code back into a
 * FormCanvasModel. Lossy — anything we don't recognise falls into a single
 * "raw" static-text element so the form remains visible in code-mode even
 * when the canvas can't fully represent it.
 *
 * This is intentionally a *regex* scan, not an AST walk: pulling in
 * `@babel/parser` (or a runtime JSX parser) would substantially increase
 * the dashboards bundle size, and the canvas already has a fallback path
 * ("View Code" is the primary editing surface when round-trip fails).
 *
 * Heuristics:
 *  - <h3> heading text → new section title
 *  - value("FieldName") OR record.FieldName references → field element
 *  - If we find fields the schema doesn't know about, we drop them
 *  - If we find zero fields, we return `null` and the caller falls back to
 *    code-only mode
 */
import type { CuratedFormSchema } from '@memberjunction/interactive-component-types/forms';
import type { FormCanvasModel } from './form-canvas-model';
export interface ParseResult {
    /** The reconstructed canvas, or null if too lossy to use. */
    canvas: FormCanvasModel | null;
    /** True iff we used the AST fallback path. (Reserved — currently regex only.) */
    usedAst: false;
    /** True iff the parser detected JSX patterns it couldn't represent. */
    hasUnknownConstructs: boolean;
    /** Optional debug breadcrumbs. */
    notes: string[];
}
export declare function parseCanvasFromCode(code: string, schema: CuratedFormSchema): ParseResult;
//# sourceMappingURL=code-to-canvas.d.ts.map