import { AnyCircuitElement } from 'circuit-json';
import { RootCircuitEventName, RootCircuit } from '@tscircuit/core';
import { PlatformConfig } from '@tscircuit/props';

interface CircuitRunnerConfiguration {
    snippetsApiBaseUrl: string;
    cjsRegistryUrl: string;
    verbose?: boolean;
}
interface WebWorkerConfiguration extends CircuitRunnerConfiguration {
    evalVersion?: string;
    /**
     * @deprecated, renamed to webWorkerBlobUrl
     */
    webWorkerUrl?: URL | string;
    webWorkerBlobUrl?: URL | string;
}
/**
 * API for the CircuitRunner class, used for eval'ing circuits
 */
interface CircuitRunnerApi {
    execute: (code: string, opts?: {
        name?: string;
    }) => Promise<void>;
    executeWithFsMap(opts: {
        entrypoint?: string;
        fsMap: Record<string, string>;
        name?: string;
    }): Promise<void>;
    renderUntilSettled: () => Promise<void>;
    getCircuitJson: () => Promise<AnyCircuitElement[]>;
    setSnippetsApiBaseUrl: (baseUrl: string) => Promise<void>;
    on: (event: RootCircuitEventName, callback: (...args: any[]) => void) => void;
    clearEventListeners: () => void;
    kill: () => Promise<void>;
}
type CircuitWebWorker = {
    execute: (code: string) => Promise<void>;
    executeWithFsMap: (opts: {
        entrypoint?: string;
        mainComponentPath?: string;
        fsMap: Record<string, string>;
    }) => Promise<void>;
    renderUntilSettled: () => Promise<void>;
    getCircuitJson: () => Promise<AnyCircuitElement[]>;
    on: (event: RootCircuitEventName, callback: (...args: any[]) => void) => void;
    clearEventListeners: () => void;
    kill: () => Promise<void>;
};

interface ExecutionContext extends WebWorkerConfiguration {
    fsMap: Record<string, string>;
    entrypoint: string;
    preSuppliedImports: Record<string, any>;
    circuit: RootCircuit;
}
declare function createExecutionContext(webWorkerConfiguration: WebWorkerConfiguration, opts?: {
    name?: string;
    platform?: PlatformConfig;
}): ExecutionContext;

declare class CircuitRunner implements CircuitRunnerApi {
    _executionContext: ReturnType<typeof createExecutionContext> | null;
    _circuitRunnerConfiguration: CircuitRunnerConfiguration;
    _eventListeners: Record<string, ((...args: any[]) => void)[]>;
    executeWithFsMap(ogOpts: {
        entrypoint?: string;
        mainComponentPath?: string;
        mainComponentName?: string;
        fsMap: Record<string, string>;
        name?: string;
        mainComponentProps?: Record<string, any>;
    }): Promise<void>;
    execute(code: string, opts?: {
        name?: string;
    }): Promise<void>;
    on(event: string, callback: (...args: any[]) => void): void;
    renderUntilSettled(): Promise<void>;
    getCircuitJson(): Promise<AnyCircuitElement[]>;
    clearEventListeners(): void;
    kill(): Promise<void>;
    setSnippetsApiBaseUrl(baseUrl: string): Promise<void>;
    private _bindEventListeners;
}

declare function runTscircuitCode(filesystemOrCodeString: Record<string, string> | string, opts?: Omit<Parameters<CircuitRunner["executeWithFsMap"]>[0], "fsMap">): Promise<({
    type: "source_trace";
    source_trace_id: string;
    connected_source_port_ids: string[];
    connected_source_net_ids: string[];
    subcircuit_id?: string | undefined;
    subcircuit_connectivity_map_key?: string | undefined;
    max_length?: number | undefined;
    min_trace_thickness?: number | undefined;
    display_name?: string | undefined;
} | {
    type: "source_port";
    name: string;
    source_component_id: string;
    source_port_id: string;
    subcircuit_id?: string | undefined;
    port_hints?: string[] | undefined;
    pin_number?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resistor";
    resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    display_resistance?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_capacitor";
    capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    max_voltage_rating?: number | undefined;
    display_capacitance?: string | undefined;
    max_decoupling_trace_length?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_diode";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_ground";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_chip";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_bug";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "led";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    voltage: number;
    ftype: "simple_power_source";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_battery";
    capacity: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_inductor";
    inductance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_push_button";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_potentiometer";
    max_resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_crystal";
    frequency: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    load_capacitance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_pin_header";
    pin_count: number;
    gender: "male" | "female";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resonator";
    frequency: number;
    load_capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    equivalent_series_resistance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_switch";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_transistor";
    transistor_type: "npn" | "pnp";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_mosfet";
    channel_type: "n" | "p";
    mosfet_mode: "enhancement" | "depletion";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_project_metadata";
    name?: string | undefined;
    software_used_string?: string | undefined;
    created_at?: string | undefined;
} | {
    message: string;
    type: "source_missing_property_error";
    source_component_id: string;
    error_type: "source_missing_property_error";
    source_missing_property_error_id: string;
    property_name: string;
} | {
    message: string;
    type: "source_failed_to_create_component_error";
    source_failed_to_create_component_error_id: string;
    subcircuit_id?: string | undefined;
    component_name?: string | undefined;
    parent_source_component_id?: string | undefined;
    pcb_center?: {
        x?: number | undefined;
        y?: number | undefined;
    } | undefined;
    schematic_center?: {
        x?: number | undefined;
        y?: number | undefined;
    } | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "led";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_net";
    name: string;
    source_net_id: string;
    member_source_group_ids: string[];
    trace_width?: number | undefined;
    subcircuit_id?: string | undefined;
    is_power?: boolean | undefined;
    is_ground?: boolean | undefined;
    is_digital_signal?: boolean | undefined;
    is_analog_signal?: boolean | undefined;
} | {
    type: "source_group";
    source_group_id: string;
    name?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
    parent_subcircuit_id?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_bug";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_chip";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_capacitor";
    capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    max_voltage_rating?: number | undefined;
    display_capacitance?: string | undefined;
    max_decoupling_trace_length?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_diode";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resistor";
    resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    display_resistance?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    voltage: number;
    ftype: "simple_power_source";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_battery";
    capacity: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_inductor";
    inductance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_pin_header";
    pin_count: number;
    gender: "male" | "female";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resonator";
    frequency: number;
    load_capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    equivalent_series_resistance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_switch";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_transistor";
    transistor_type: "npn" | "pnp";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_mosfet";
    channel_type: "n" | "p";
    mosfet_mode: "enhancement" | "depletion";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_potentiometer";
    max_resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_push_button";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_project_metadata";
    name?: string | undefined;
    software_used_string?: string | undefined;
    created_at?: string | undefined;
} | {
    type: "pcb_component";
    width: number;
    height: number;
    pcb_component_id: string;
    source_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    rotation: number;
    subcircuit_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_hole";
    pcb_hole_id: string;
    hole_shape: "circle" | "square";
    hole_diameter: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_hole";
    pcb_hole_id: string;
    hole_shape: "oval";
    hole_width: number;
    hole_height: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_missing_footprint_error";
    source_component_id: string;
    error_type: "pcb_missing_footprint_error";
    pcb_missing_footprint_error_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_manual_edit_conflict_warning";
    pcb_component_id: string;
    source_component_id: string;
    pcb_manual_edit_conflict_warning_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_diameter: number;
    shape: "circle";
    outer_diameter: number;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_width: number;
    hole_height: number;
    shape: "oval" | "pill";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    outer_width: number;
    outer_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_shape: "circle";
    hole_diameter: number;
    shape: "circular_hole_with_rect_pad";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pad_shape: "rect";
    rect_pad_width: number;
    rect_pad_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_shape: "pill";
    hole_width: number;
    hole_height: number;
    shape: "pill_hole_with_rect_pad";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pad_shape: "rect";
    rect_pad_width: number;
    rect_pad_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    type: "pcb_keepout";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    layers: string[];
    pcb_keepout_id: string;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_keepout";
    center: {
        x: number;
        y: number;
    };
    shape: "circle";
    layers: string[];
    radius: number;
    pcb_keepout_id: string;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_port";
    pcb_component_id: string;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_port_id: string;
    source_port_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_text";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    pcb_text_id: string;
    text: string;
    lines: number;
    align: "bottom-left";
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_trace";
    pcb_trace_id: string;
    route: ({
        x: number;
        y: number;
        width: number;
        layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
        route_type: "wire";
        start_pcb_port_id?: string | undefined;
        end_pcb_port_id?: string | undefined;
    } | {
        x: number;
        y: number;
        to_layer: string;
        route_type: "via";
        from_layer: string;
        hole_diameter?: number | undefined;
        outer_diameter?: number | undefined;
    })[];
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    source_trace_id?: string | undefined;
    route_thickness_mode?: "constant" | "interpolated" | undefined;
    route_order_index?: number | undefined;
    should_round_corners?: boolean | undefined;
    trace_length?: number | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_via";
    hole_diameter: number;
    outer_diameter: number;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_via_id: string;
    to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    from_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    pcb_trace_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "circle";
    pcb_smtpad_id: string;
    radius: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rect";
    pcb_smtpad_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rotated_rect";
    pcb_smtpad_id: string;
    ccw_rotation: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "pill";
    pcb_smtpad_id: string;
    radius: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "circle";
    radius: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rect";
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "pill";
    radius: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rotated_rect";
    ccw_rotation: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "oval";
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    type: "pcb_board";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    pcb_board_id: string;
    thickness: number;
    num_layers: number;
    material: "fr4" | "fr1";
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
    outline?: {
        x: number;
        y: number;
    }[] | undefined;
} | {
    type: "pcb_group";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    pcb_group_id: string;
    pcb_component_ids: string[];
    source_group_id: string;
    name?: string | undefined;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
} | {
    type: "pcb_trace_hint";
    pcb_component_id: string;
    pcb_port_id: string;
    route: {
        x: number;
        y: number;
        via?: boolean | undefined;
        to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
        trace_width?: number | undefined;
    }[];
    pcb_trace_hint_id: string;
} | {
    type: "pcb_silkscreen_line";
    pcb_component_id: string;
    layer: "top" | "bottom";
    pcb_silkscreen_line_id: string;
    stroke_width: number;
    x1: number;
    y1: number;
    x2: number;
    y2: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_path";
    pcb_component_id: string;
    layer: "top" | "bottom";
    route: {
        x: number;
        y: number;
    }[];
    stroke_width: number;
    pcb_silkscreen_path_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_text";
    pcb_component_id: string;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    text: string;
    pcb_silkscreen_text_id: string;
    font: "tscircuit2024";
    font_size: number;
    anchor_position: {
        x: number;
        y: number;
    };
    anchor_alignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    ccw_rotation?: number | undefined;
    is_mirrored?: boolean | undefined;
} | {
    type: "pcb_silkscreen_rect";
    width: number;
    height: number;
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    stroke_width: number;
    pcb_silkscreen_rect_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_circle";
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom";
    radius: number;
    stroke_width: number;
    pcb_silkscreen_circle_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_oval";
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom";
    pcb_silkscreen_oval_id: string;
    radius_x: number;
    radius_y: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_trace_error";
    source_trace_id: string;
    pcb_trace_id: string;
    pcb_trace_error_id: string;
    error_type: "pcb_trace_error";
    pcb_component_ids: string[];
    pcb_port_ids: string[];
    center?: {
        x: number;
        y: number;
    } | undefined;
} | {
    message: string;
    type: "pcb_placement_error";
    pcb_placement_error_id: string;
} | {
    message: string;
    type: "pcb_port_not_matched_error";
    pcb_component_ids: string[];
    pcb_error_id: string;
} | {
    type: "pcb_fabrication_note_path";
    pcb_component_id: string;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    route: {
        x: number;
        y: number;
    }[];
    stroke_width: number;
    pcb_fabrication_note_path_id: string;
    subcircuit_id?: string | undefined;
    color?: string | undefined;
} | {
    type: "pcb_fabrication_note_text";
    pcb_component_id: string;
    layer: "top" | "bottom";
    text: string;
    font: "tscircuit2024";
    font_size: number;
    anchor_position: {
        x: number;
        y: number;
    };
    anchor_alignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
    pcb_fabrication_note_text_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    color?: string | undefined;
} | {
    message: string;
    type: "pcb_autorouting_error";
    pcb_error_id: string;
} | {
    type: "pcb_cutout";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    pcb_cutout_id: string;
    rotation?: number | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_cutout";
    center: {
        x: number;
        y: number;
    };
    shape: "circle";
    radius: number;
    pcb_cutout_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_cutout";
    shape: "polygon";
    pcb_cutout_id: string;
    points: {
        x: number;
        y: number;
    }[];
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "schematic_box";
    width: number;
    height: number;
    schematic_component_id: string;
} | {
    anchor: "top" | "bottom" | "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center" | "left" | "right";
    type: "schematic_text";
    rotation: number;
    text: string;
    font_size: number;
    color: string;
    schematic_text_id: string;
    position: {
        x: number;
        y: number;
    };
    schematic_component_id?: string | undefined;
} | {
    type: "schematic_line";
    x1: number;
    y1: number;
    x2: number;
    y2: number;
    schematic_component_id: string;
} | {
    type: "schematic_component";
    source_component_id: string;
    center: {
        x: number;
        y: number;
    };
    schematic_component_id: string;
    size: {
        width: number;
        height: number;
    };
    pin_spacing?: number | undefined;
    pin_styles?: Record<string, {
        left_margin?: number | undefined;
        right_margin?: number | undefined;
        top_margin?: number | undefined;
        bottom_margin?: number | undefined;
    }> | undefined;
    box_width?: number | undefined;
    symbol_name?: string | undefined;
    port_arrangement?: {
        left_size: number;
        right_size: number;
        top_size?: number | undefined;
        bottom_size?: number | undefined;
    } | {
        left_side?: {
            pins: number[];
            direction?: "top-to-bottom" | "bottom-to-top" | undefined;
        } | undefined;
        right_side?: {
            pins: number[];
            direction?: "top-to-bottom" | "bottom-to-top" | undefined;
        } | undefined;
        top_side?: {
            pins: number[];
            direction?: "left-to-right" | "right-to-left" | undefined;
        } | undefined;
        bottom_side?: {
            pins: number[];
            direction?: "left-to-right" | "right-to-left" | undefined;
        } | undefined;
    } | undefined;
    port_labels?: Record<string, string> | undefined;
    symbol_display_value?: string | undefined;
} | {
    type: "schematic_port";
    center: {
        x: number;
        y: number;
    };
    source_port_id: string;
    schematic_port_id: string;
    schematic_component_id?: string | undefined;
    facing_direction?: "left" | "right" | "up" | "down" | undefined;
    distance_from_component_edge?: number | undefined;
    side_of_component?: "top" | "bottom" | "left" | "right" | undefined;
    true_ccw_index?: number | undefined;
    pin_number?: number | undefined;
    display_pin_label?: string | undefined;
} | {
    type: "schematic_trace";
    source_trace_id: string;
    schematic_trace_id: string;
    junctions: {
        x: number;
        y: number;
    }[];
    edges: {
        from: {
            x: number;
            y: number;
        };
        to: {
            x: number;
            y: number;
        };
        is_crossing?: boolean | undefined;
        from_schematic_port_id?: string | undefined;
        to_schematic_port_id?: string | undefined;
    }[];
} | {
    type: "schematic_path";
    points: {
        x: number;
        y: number;
    }[];
    schematic_component_id: string;
    fill_color?: "red" | "blue" | undefined;
    is_filled?: boolean | undefined;
} | {
    message: string;
    type: "schematic_error";
    error_type: "schematic_port_not_found";
    schematic_error_id: string;
} | {
    type: "schematic_net_label";
    center: {
        x: number;
        y: number;
    };
    text: string;
    source_net_id: string;
    anchor_side: "top" | "bottom" | "left" | "right";
    anchor_position?: {
        x: number;
        y: number;
    } | undefined;
    symbol_name?: string | undefined;
} | {
    type: "schematic_debug_object";
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    size: {
        width: number;
        height: number;
    };
    label?: string | undefined;
} | {
    type: "schematic_debug_object";
    shape: "line";
    start: {
        x: number;
        y: number;
    };
    end: {
        x: number;
        y: number;
    };
    label?: string | undefined;
} | {
    type: "schematic_debug_object";
    center: {
        x: number;
        y: number;
    };
    shape: "point";
    label?: string | undefined;
} | {
    type: "schematic_voltage_probe";
    schematic_trace_id: string;
    position: {
        x: number;
        y: number;
    };
    schematic_voltage_probe_id: string;
    voltage?: number | undefined;
} | {
    message: string;
    type: "schematic_manual_edit_conflict_warning";
    source_component_id: string;
    schematic_component_id: string;
    schematic_manual_edit_conflict_warning_id: string;
    subcircuit_id?: string | undefined;
    schematic_group_id?: string | undefined;
} | {
    type: "schematic_group";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    source_group_id: string;
    schematic_group_id: string;
    schematic_component_ids: string[];
    name?: string | undefined;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
} | {
    type: "cad_component";
    pcb_component_id: string;
    source_component_id: string;
    position: {
        x: number;
        y: number;
        z: number;
    };
    cad_component_id: string;
    layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    rotation?: {
        x: number;
        y: number;
        z: number;
    } | undefined;
    size?: {
        x: number;
        y: number;
        z: number;
    } | undefined;
    footprinter_string?: string | undefined;
    model_obj_url?: string | undefined;
    model_stl_url?: string | undefined;
    model_3mf_url?: string | undefined;
    model_jscad?: any;
})[]>;

declare const runTscircuitModule: (module: string, opts?: {
    props?: Record<string, any>;
    exportName?: string;
}) => Promise<({
    type: "source_trace";
    source_trace_id: string;
    connected_source_port_ids: string[];
    connected_source_net_ids: string[];
    subcircuit_id?: string | undefined;
    subcircuit_connectivity_map_key?: string | undefined;
    max_length?: number | undefined;
    min_trace_thickness?: number | undefined;
    display_name?: string | undefined;
} | {
    type: "source_port";
    name: string;
    source_component_id: string;
    source_port_id: string;
    subcircuit_id?: string | undefined;
    port_hints?: string[] | undefined;
    pin_number?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resistor";
    resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    display_resistance?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_capacitor";
    capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    max_voltage_rating?: number | undefined;
    display_capacitance?: string | undefined;
    max_decoupling_trace_length?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_diode";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_ground";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_chip";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_bug";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "led";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    voltage: number;
    ftype: "simple_power_source";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_battery";
    capacity: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_inductor";
    inductance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_push_button";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_potentiometer";
    max_resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_crystal";
    frequency: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    load_capacitance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_pin_header";
    pin_count: number;
    gender: "male" | "female";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resonator";
    frequency: number;
    load_capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    equivalent_series_resistance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_switch";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_transistor";
    transistor_type: "npn" | "pnp";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_mosfet";
    channel_type: "n" | "p";
    mosfet_mode: "enhancement" | "depletion";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_project_metadata";
    name?: string | undefined;
    software_used_string?: string | undefined;
    created_at?: string | undefined;
} | {
    message: string;
    type: "source_missing_property_error";
    source_component_id: string;
    error_type: "source_missing_property_error";
    source_missing_property_error_id: string;
    property_name: string;
} | {
    message: string;
    type: "source_failed_to_create_component_error";
    source_failed_to_create_component_error_id: string;
    subcircuit_id?: string | undefined;
    component_name?: string | undefined;
    parent_source_component_id?: string | undefined;
    pcb_center?: {
        x?: number | undefined;
        y?: number | undefined;
    } | undefined;
    schematic_center?: {
        x?: number | undefined;
        y?: number | undefined;
    } | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "led";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_net";
    name: string;
    source_net_id: string;
    member_source_group_ids: string[];
    trace_width?: number | undefined;
    subcircuit_id?: string | undefined;
    is_power?: boolean | undefined;
    is_ground?: boolean | undefined;
    is_digital_signal?: boolean | undefined;
    is_analog_signal?: boolean | undefined;
} | {
    type: "source_group";
    source_group_id: string;
    name?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
    parent_subcircuit_id?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_bug";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_chip";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_capacitor";
    capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    max_voltage_rating?: number | undefined;
    display_capacitance?: string | undefined;
    max_decoupling_trace_length?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_diode";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resistor";
    resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    display_resistance?: string | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    voltage: number;
    ftype: "simple_power_source";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_battery";
    capacity: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_inductor";
    inductance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_pin_header";
    pin_count: number;
    gender: "male" | "female";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_resonator";
    frequency: number;
    load_capacitance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
    equivalent_series_resistance?: number | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_switch";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_transistor";
    transistor_type: "npn" | "pnp";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_mosfet";
    channel_type: "n" | "p";
    mosfet_mode: "enhancement" | "depletion";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_potentiometer";
    max_resistance: number;
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_component";
    name: string;
    source_component_id: string;
    ftype: "simple_push_button";
    manufacturer_part_number?: string | undefined;
    supplier_part_numbers?: Partial<Record<"jlcpcb" | "macrofab" | "pcbway" | "digikey" | "mouser" | "lcsc", string[]>> | undefined;
    display_value?: string | undefined;
    are_pins_interchangeable?: boolean | undefined;
    internally_connected_source_port_ids?: string[][] | undefined;
} | {
    type: "source_project_metadata";
    name?: string | undefined;
    software_used_string?: string | undefined;
    created_at?: string | undefined;
} | {
    type: "pcb_component";
    width: number;
    height: number;
    pcb_component_id: string;
    source_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    rotation: number;
    subcircuit_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_hole";
    pcb_hole_id: string;
    hole_shape: "circle" | "square";
    hole_diameter: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_hole";
    pcb_hole_id: string;
    hole_shape: "oval";
    hole_width: number;
    hole_height: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_missing_footprint_error";
    source_component_id: string;
    error_type: "pcb_missing_footprint_error";
    pcb_missing_footprint_error_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_manual_edit_conflict_warning";
    pcb_component_id: string;
    source_component_id: string;
    pcb_manual_edit_conflict_warning_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_diameter: number;
    shape: "circle";
    outer_diameter: number;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_width: number;
    hole_height: number;
    shape: "oval" | "pill";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    outer_width: number;
    outer_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_shape: "circle";
    hole_diameter: number;
    shape: "circular_hole_with_rect_pad";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pad_shape: "rect";
    rect_pad_width: number;
    rect_pad_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_plated_hole";
    hole_shape: "pill";
    hole_width: number;
    hole_height: number;
    shape: "pill_hole_with_rect_pad";
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_plated_hole_id: string;
    pad_shape: "rect";
    rect_pad_width: number;
    rect_pad_height: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    type: "pcb_keepout";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    layers: string[];
    pcb_keepout_id: string;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_keepout";
    center: {
        x: number;
        y: number;
    };
    shape: "circle";
    layers: string[];
    radius: number;
    pcb_keepout_id: string;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_port";
    pcb_component_id: string;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_port_id: string;
    source_port_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_text";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    pcb_text_id: string;
    text: string;
    lines: number;
    align: "bottom-left";
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_trace";
    pcb_trace_id: string;
    route: ({
        x: number;
        y: number;
        width: number;
        layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
        route_type: "wire";
        start_pcb_port_id?: string | undefined;
        end_pcb_port_id?: string | undefined;
    } | {
        x: number;
        y: number;
        to_layer: string;
        route_type: "via";
        from_layer: string;
        hole_diameter?: number | undefined;
        outer_diameter?: number | undefined;
    })[];
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    source_trace_id?: string | undefined;
    route_thickness_mode?: "constant" | "interpolated" | undefined;
    route_order_index?: number | undefined;
    should_round_corners?: boolean | undefined;
    trace_length?: number | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_via";
    hole_diameter: number;
    outer_diameter: number;
    layers: ("top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6")[];
    pcb_via_id: string;
    to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    from_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    pcb_trace_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "circle";
    pcb_smtpad_id: string;
    radius: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rect";
    pcb_smtpad_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rotated_rect";
    pcb_smtpad_id: string;
    ccw_rotation: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_smtpad";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "pill";
    pcb_smtpad_id: string;
    radius: number;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    port_hints?: string[] | undefined;
    pcb_port_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "circle";
    radius: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rect";
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "pill";
    radius: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "rotated_rect";
    ccw_rotation: number;
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "pcb_solder_paste";
    width: number;
    height: number;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    shape: "oval";
    pcb_solder_paste_id: string;
    pcb_component_id?: string | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    pcb_smtpad_id?: string | undefined;
} | {
    type: "pcb_board";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    pcb_board_id: string;
    thickness: number;
    num_layers: number;
    material: "fr4" | "fr1";
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
    outline?: {
        x: number;
        y: number;
    }[] | undefined;
} | {
    type: "pcb_group";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    pcb_group_id: string;
    pcb_component_ids: string[];
    source_group_id: string;
    name?: string | undefined;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
} | {
    type: "pcb_trace_hint";
    pcb_component_id: string;
    pcb_port_id: string;
    route: {
        x: number;
        y: number;
        via?: boolean | undefined;
        to_layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
        trace_width?: number | undefined;
    }[];
    pcb_trace_hint_id: string;
} | {
    type: "pcb_silkscreen_line";
    pcb_component_id: string;
    layer: "top" | "bottom";
    pcb_silkscreen_line_id: string;
    stroke_width: number;
    x1: number;
    y1: number;
    x2: number;
    y2: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_path";
    pcb_component_id: string;
    layer: "top" | "bottom";
    route: {
        x: number;
        y: number;
    }[];
    stroke_width: number;
    pcb_silkscreen_path_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_text";
    pcb_component_id: string;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    text: string;
    pcb_silkscreen_text_id: string;
    font: "tscircuit2024";
    font_size: number;
    anchor_position: {
        x: number;
        y: number;
    };
    anchor_alignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    ccw_rotation?: number | undefined;
    is_mirrored?: boolean | undefined;
} | {
    type: "pcb_silkscreen_rect";
    width: number;
    height: number;
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    stroke_width: number;
    pcb_silkscreen_rect_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_circle";
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom";
    radius: number;
    stroke_width: number;
    pcb_silkscreen_circle_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_silkscreen_oval";
    pcb_component_id: string;
    center: {
        x: number;
        y: number;
    };
    layer: "top" | "bottom";
    pcb_silkscreen_oval_id: string;
    radius_x: number;
    radius_y: number;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    message: string;
    type: "pcb_trace_error";
    source_trace_id: string;
    pcb_trace_id: string;
    pcb_trace_error_id: string;
    error_type: "pcb_trace_error";
    pcb_component_ids: string[];
    pcb_port_ids: string[];
    center?: {
        x: number;
        y: number;
    } | undefined;
} | {
    message: string;
    type: "pcb_placement_error";
    pcb_placement_error_id: string;
} | {
    message: string;
    type: "pcb_port_not_matched_error";
    pcb_component_ids: string[];
    pcb_error_id: string;
} | {
    type: "pcb_fabrication_note_path";
    pcb_component_id: string;
    layer: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6";
    route: {
        x: number;
        y: number;
    }[];
    stroke_width: number;
    pcb_fabrication_note_path_id: string;
    subcircuit_id?: string | undefined;
    color?: string | undefined;
} | {
    type: "pcb_fabrication_note_text";
    pcb_component_id: string;
    layer: "top" | "bottom";
    text: string;
    font: "tscircuit2024";
    font_size: number;
    anchor_position: {
        x: number;
        y: number;
    };
    anchor_alignment: "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
    pcb_fabrication_note_text_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
    color?: string | undefined;
} | {
    message: string;
    type: "pcb_autorouting_error";
    pcb_error_id: string;
} | {
    type: "pcb_cutout";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    pcb_cutout_id: string;
    rotation?: number | undefined;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_cutout";
    center: {
        x: number;
        y: number;
    };
    shape: "circle";
    radius: number;
    pcb_cutout_id: string;
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    type: "pcb_cutout";
    shape: "polygon";
    pcb_cutout_id: string;
    points: {
        x: number;
        y: number;
    }[];
    subcircuit_id?: string | undefined;
    pcb_group_id?: string | undefined;
} | {
    x: number;
    y: number;
    type: "schematic_box";
    width: number;
    height: number;
    schematic_component_id: string;
} | {
    anchor: "top" | "bottom" | "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right" | "top_center" | "center_left" | "center_right" | "bottom_center" | "left" | "right";
    type: "schematic_text";
    rotation: number;
    text: string;
    font_size: number;
    color: string;
    schematic_text_id: string;
    position: {
        x: number;
        y: number;
    };
    schematic_component_id?: string | undefined;
} | {
    type: "schematic_line";
    x1: number;
    y1: number;
    x2: number;
    y2: number;
    schematic_component_id: string;
} | {
    type: "schematic_component";
    source_component_id: string;
    center: {
        x: number;
        y: number;
    };
    schematic_component_id: string;
    size: {
        width: number;
        height: number;
    };
    pin_spacing?: number | undefined;
    pin_styles?: Record<string, {
        left_margin?: number | undefined;
        right_margin?: number | undefined;
        top_margin?: number | undefined;
        bottom_margin?: number | undefined;
    }> | undefined;
    box_width?: number | undefined;
    symbol_name?: string | undefined;
    port_arrangement?: {
        left_size: number;
        right_size: number;
        top_size?: number | undefined;
        bottom_size?: number | undefined;
    } | {
        left_side?: {
            pins: number[];
            direction?: "top-to-bottom" | "bottom-to-top" | undefined;
        } | undefined;
        right_side?: {
            pins: number[];
            direction?: "top-to-bottom" | "bottom-to-top" | undefined;
        } | undefined;
        top_side?: {
            pins: number[];
            direction?: "left-to-right" | "right-to-left" | undefined;
        } | undefined;
        bottom_side?: {
            pins: number[];
            direction?: "left-to-right" | "right-to-left" | undefined;
        } | undefined;
    } | undefined;
    port_labels?: Record<string, string> | undefined;
    symbol_display_value?: string | undefined;
} | {
    type: "schematic_port";
    center: {
        x: number;
        y: number;
    };
    source_port_id: string;
    schematic_port_id: string;
    schematic_component_id?: string | undefined;
    facing_direction?: "left" | "right" | "up" | "down" | undefined;
    distance_from_component_edge?: number | undefined;
    side_of_component?: "top" | "bottom" | "left" | "right" | undefined;
    true_ccw_index?: number | undefined;
    pin_number?: number | undefined;
    display_pin_label?: string | undefined;
} | {
    type: "schematic_trace";
    source_trace_id: string;
    schematic_trace_id: string;
    junctions: {
        x: number;
        y: number;
    }[];
    edges: {
        from: {
            x: number;
            y: number;
        };
        to: {
            x: number;
            y: number;
        };
        is_crossing?: boolean | undefined;
        from_schematic_port_id?: string | undefined;
        to_schematic_port_id?: string | undefined;
    }[];
} | {
    type: "schematic_path";
    points: {
        x: number;
        y: number;
    }[];
    schematic_component_id: string;
    fill_color?: "red" | "blue" | undefined;
    is_filled?: boolean | undefined;
} | {
    message: string;
    type: "schematic_error";
    error_type: "schematic_port_not_found";
    schematic_error_id: string;
} | {
    type: "schematic_net_label";
    center: {
        x: number;
        y: number;
    };
    text: string;
    source_net_id: string;
    anchor_side: "top" | "bottom" | "left" | "right";
    anchor_position?: {
        x: number;
        y: number;
    } | undefined;
    symbol_name?: string | undefined;
} | {
    type: "schematic_debug_object";
    center: {
        x: number;
        y: number;
    };
    shape: "rect";
    size: {
        width: number;
        height: number;
    };
    label?: string | undefined;
} | {
    type: "schematic_debug_object";
    shape: "line";
    start: {
        x: number;
        y: number;
    };
    end: {
        x: number;
        y: number;
    };
    label?: string | undefined;
} | {
    type: "schematic_debug_object";
    center: {
        x: number;
        y: number;
    };
    shape: "point";
    label?: string | undefined;
} | {
    type: "schematic_voltage_probe";
    schematic_trace_id: string;
    position: {
        x: number;
        y: number;
    };
    schematic_voltage_probe_id: string;
    voltage?: number | undefined;
} | {
    message: string;
    type: "schematic_manual_edit_conflict_warning";
    source_component_id: string;
    schematic_component_id: string;
    schematic_manual_edit_conflict_warning_id: string;
    subcircuit_id?: string | undefined;
    schematic_group_id?: string | undefined;
} | {
    type: "schematic_group";
    width: number;
    height: number;
    center: {
        x: number;
        y: number;
    };
    source_group_id: string;
    schematic_group_id: string;
    schematic_component_ids: string[];
    name?: string | undefined;
    description?: string | undefined;
    subcircuit_id?: string | undefined;
    is_subcircuit?: boolean | undefined;
} | {
    type: "cad_component";
    pcb_component_id: string;
    source_component_id: string;
    position: {
        x: number;
        y: number;
        z: number;
    };
    cad_component_id: string;
    layer?: "top" | "bottom" | "inner1" | "inner2" | "inner3" | "inner4" | "inner5" | "inner6" | undefined;
    rotation?: {
        x: number;
        y: number;
        z: number;
    } | undefined;
    size?: {
        x: number;
        y: number;
        z: number;
    } | undefined;
    footprinter_string?: string | undefined;
    model_obj_url?: string | undefined;
    model_stl_url?: string | undefined;
    model_3mf_url?: string | undefined;
    model_jscad?: any;
})[]>;

declare const getImportsFromCode: (code: string) => string[];

declare global {
    interface Window {
        TSCIRCUIT_GLOBAL_CIRCUIT_WORKER: CircuitWebWorker | undefined;
    }
    var TSCIRCUIT_GLOBAL_CIRCUIT_WORKER: CircuitWebWorker | undefined;
}
declare const createCircuitWebWorker: (configuration: Partial<WebWorkerConfiguration>) => Promise<CircuitWebWorker>;

export { CircuitRunner, type CircuitWebWorker, type WebWorkerConfiguration, createCircuitWebWorker, getImportsFromCode, runTscircuitCode, runTscircuitModule };
