import { z } from 'zod';
import { color } from '../../../color/core';
import type * as rf from "reactflow";
/**
 * The current viewport state of the diagram.
 */
export declare const viewportZ: z.ZodObject<{
    position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        x: number;
        y: number;
    }, {
        x: number;
        y: number;
    }>;
    /**
     * A decimal of the current diagram zoom. Larger values represent
     * magnification.
     */
    zoom: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    position: {
        x: number;
        y: number;
    };
    zoom: number;
}, {
    position: {
        x: number;
        y: number;
    };
    zoom: number;
}>;
/**
 * The current viewport state of the diagram.
 */
export type Viewport = z.infer<typeof viewportZ>;
/**
 * Pluto specific info passed to the 'data' attribute on rf.Edge.
 */
export declare const rfEdgeDataZ: z.ZodObject<{
    /**
     * The color of the edge.
     */
    color: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<color.Color, z.ZodTypeDef, color.Color>, z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, "strip", z.ZodTypeAny, {
        rgba255: [number, number, number, number];
    }, {
        rgba255: [number, number, number, number];
    }>]>;
    /**
     * A list of segments representing the structure of the edge connector.
     */
    segments: z.ZodArray<z.ZodObject<{
        direction: z.ZodEnum<["x", "y"]>;
        length: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        direction: "x" | "y";
        length: number;
    }, {
        direction: "x" | "y";
        length: number;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    color: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | color.Color | [number, number, number];
    segments: {
        direction: "x" | "y";
        length: number;
    }[];
}, {
    color: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | color.Color | [number, number, number];
    segments: {
        direction: "x" | "y";
        length: number;
    }[];
}>;
/**
 * Pluto specific info passed to the 'data' attribute on rf.Edge.
 */
export type RFEdgeData = z.infer<typeof rfEdgeDataZ>;
export declare const edgeZ: z.ZodObject<z.objectUtil.extendShape<{
    /**
     * The color of the edge.
     */
    color: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<color.Color, z.ZodTypeDef, color.Color>, z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, "strip", z.ZodTypeAny, {
        rgba255: [number, number, number, number];
    }, {
        rgba255: [number, number, number, number];
    }>]>;
    /**
     * A list of segments representing the structure of the edge connector.
     */
    segments: z.ZodArray<z.ZodObject<{
        direction: z.ZodEnum<["x", "y"]>;
        length: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        direction: "x" | "y";
        length: number;
    }, {
        direction: "x" | "y";
        length: number;
    }>, "many">;
}, {
    /**
     * A unique key for identifying the edge within the diagram.
     */
    key: z.ZodString;
    /**
     * The key of the source node for the edge.
     */
    source: z.ZodString;
    /**
     * The key of the target node for the edge.
     */
    target: z.ZodString;
    segments: z.ZodArray<z.ZodObject<{
        direction: z.ZodEnum<["x", "y"]>;
        length: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        direction: "x" | "y";
        length: number;
    }, {
        direction: "x" | "y";
        length: number;
    }>, "many">;
    color: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<color.Color, z.ZodTypeDef, color.Color>, z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, "strip", z.ZodTypeAny, {
        rgba255: [number, number, number, number];
    }, {
        rgba255: [number, number, number, number];
    }>]>;
    id: z.ZodString;
    data: z.ZodOptional<z.ZodObject<{
        segments: z.ZodArray<z.ZodObject<{
            direction: z.ZodEnum<["x", "y"]>;
            length: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            direction: "x" | "y";
            length: number;
        }, {
            direction: "x" | "y";
            length: number;
        }>, "many">;
        color: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodType<color.Color, z.ZodTypeDef, color.Color>, z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
            rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
        }, "strip", z.ZodTypeAny, {
            rgba255: [number, number, number, number];
        }, {
            rgba255: [number, number, number, number];
        }>]>;
    }, "strip", z.ZodTypeAny, {
        color: string | [number, number, number, number] | {
            rgba255: [number, number, number, number];
        } | color.Color | [number, number, number];
        segments: {
            direction: "x" | "y";
            length: number;
        }[];
    }, {
        color: string | [number, number, number, number] | {
            rgba255: [number, number, number, number];
        } | color.Color | [number, number, number];
        segments: {
            direction: "x" | "y";
            length: number;
        }[];
    }>>;
    /**
     * Whether the edge is currently selected.
     */
    selected: z.ZodBoolean;
    /**
     * The id of handle on the source node that the edge is connected to. Note
     * that this id is unique only within the source node.
     */
    sourceHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    /**
     * The id of the handle on the target node that the edge is connected to. Note
     * that this id is unique only within the target node.
     */
    targetHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}>, "strip", z.ZodTypeAny, {
    color: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | color.Color | [number, number, number];
    key: string;
    selected: boolean;
    source: string;
    id: string;
    target: string;
    segments: {
        direction: "x" | "y";
        length: number;
    }[];
    data?: {
        color: string | [number, number, number, number] | {
            rgba255: [number, number, number, number];
        } | color.Color | [number, number, number];
        segments: {
            direction: "x" | "y";
            length: number;
        }[];
    } | undefined;
    sourceHandle?: string | null | undefined;
    targetHandle?: string | null | undefined;
}, {
    color: string | [number, number, number, number] | {
        rgba255: [number, number, number, number];
    } | color.Color | [number, number, number];
    key: string;
    selected: boolean;
    source: string;
    id: string;
    target: string;
    segments: {
        direction: "x" | "y";
        length: number;
    }[];
    data?: {
        color: string | [number, number, number, number] | {
            rgba255: [number, number, number, number];
        } | color.Color | [number, number, number];
        segments: {
            direction: "x" | "y";
            length: number;
        }[];
    } | undefined;
    sourceHandle?: string | null | undefined;
    targetHandle?: string | null | undefined;
}>;
/**
 * The properties for an edge within a diagram.
 */
export type Edge = z.infer<typeof edgeZ>;
/**
 * The properties for a node within a diagram.
 */
export declare const nodeZ: z.ZodObject<{
    /**
     * A unique key for identifying the node within the diagram.
     */
    key: z.ZodString;
    /**
     * The XY coordinate of the top left corner of the node. Unscaled by the
     * viewport.
     */
    position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        x: number;
        y: number;
    }, {
        x: number;
        y: number;
    }>;
    /**
     * Whether the node is currently selected.
     */
    selected: z.ZodOptional<z.ZodBoolean>;
    /**
     * An optional z-index for the node.
     */
    zIndex: z.ZodOptional<z.ZodNumber>;
    id: z.ZodOptional<z.ZodString>;
    type: z.ZodOptional<z.ZodString>;
    data: z.ZodOptional<z.ZodUnknown>;
    width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
    height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
    position: {
        x: number;
        y: number;
    };
    key: string;
    height?: number | null | undefined;
    width?: number | null | undefined;
    zIndex?: number | undefined;
    type?: string | undefined;
    selected?: boolean | undefined;
    data?: unknown;
    id?: string | undefined;
}, {
    position: {
        x: number;
        y: number;
    };
    key: string;
    height?: number | null | undefined;
    width?: number | null | undefined;
    zIndex?: number | undefined;
    type?: string | undefined;
    selected?: boolean | undefined;
    data?: unknown;
    id?: string | undefined;
}>;
/**
 * The properties for a node within a diagram.
 */
export type Node = z.infer<typeof nodeZ>;
/**
 * Translates nodes from their pluto representation to their react-flow representation.
 */
export declare const translateNodesForward: (nodes: Node[]) => rf.Node[];
/** Translates edges from their pluto representation to their react-flow representation. */
export declare const translateEdgesForward: (edges: Edge[]) => Array<rf.Edge<RFEdgeData>>;
/** Translates nodes from their react-flow representation to their pluto representation. */
export declare const translateNodesBackward: (nodes: rf.Node[]) => Node[];
/** Translates edges from their react-flow representation to their pluto representation */
export declare const translateEdgesBackward: (edges: Array<rf.Edge<RFEdgeData>>, defaultColor: color.Crude) => Edge[];
/** Translates the diagram viewport from its pluto representation to its react-flow representation */
export declare const translateViewportForward: (viewport: Viewport) => rf.Viewport;
/** Translates the diagram viewport from its react-flow representation to its pluto representation */
export declare const translateViewportBackward: (viewport: rf.Viewport) => Viewport;
/**
 * Executes the provided callback against the react-flow representation of the given
 * nodes, then converts
 */
export declare const nodeConverter: (nodes: Node[], f: (nodes: rf.Node[]) => rf.Node[]) => Node[];
export declare const edgeConverter: (edges: Edge[], f: (edges: rf.Edge[]) => rf.Edge[], color: color.Crude) => Edge[];
//# sourceMappingURL=types.d.ts.map