/** * LED blinker template — Level 1 complexity. * * A simple but complete circuit: LED + current-limiting resistor, with a * switch to control power. This is the simplest circuit that exercises the * full MCP workflow pipeline: safe region planning, component placement, * pin-to-net connectivity, wire stub generation, and post-write QA. * * Reference design: LED forward current limited by series resistor. * R = (Vsupply - Vf) / If * Default: (5V - 2V) / 20mA = 150Ω → use 150Ω standard value * * Schematic topology (left-to-right signal flow): * VCC → Switch → Resistor → LED → GND * * @module */ import { planSafeSchematicRegion, type SchematicRegionPreference } from './schematic-safe-region.js'; import type { WorkflowBlockInput, WorkflowDeviceItem } from './types.js'; export interface LedBlinkerDevices { resistor: WorkflowDeviceItem; led: WorkflowDeviceItem; switch: WorkflowDeviceItem; } export interface LedBlinkerRefs { switch: string; resistor: string; led: string; } export interface LedBlinkerNets { vcc: string; gnd: string; switched: string; ledAnode: string; } export interface LedBlinkerValues { supplyVoltage: number; ledForwardVoltage: number; ledForwardCurrentMa: number; resistorOhms: number; } export interface LedBlinkerPinMaps { switch: { p1: string; p2: string; p3?: string; p4?: string; }; resistor: { p1: string; p2: string; }; led: { anode: string; cathode: string; }; } export interface LedBlinkerTemplateInput { projectId: string; mode?: 'preview' | 'apply'; devices: LedBlinkerDevices; anchor?: { x: number; y: number; }; sheetInfo?: unknown; preferredRegion?: SchematicRegionPreference; margin?: number; createNetPorts?: boolean; createWireStubs?: boolean; refs?: Partial; nets?: Partial; values?: Partial; pinMaps?: Partial<{ switch: Partial<{ p1: string; p2: string; p3: string; p4: string; }>; resistor: Partial<{ p1: string; p2: string; }>; led: Partial<{ anode: string; cathode: string; }>; }>; } export interface LedBlinkerTemplatePlan { workflowInput: WorkflowBlockInput; safeRegion: ReturnType; refs: LedBlinkerRefs; nets: LedBlinkerNets; values: LedBlinkerValues; pinMaps: LedBlinkerPinMaps; calculated: { currentMa: number; resistorPowerMw: number; ledPowerMw: number; totalPowerMw: number; }; designNotes: string[]; componentCount: number; } /** Content bounding box (schematic units) for safe region planning. */ export declare const LED_BLINKER_CONTENT: { readonly width: 380; readonly height: 120; }; export declare function calculateLedBlinker(values: LedBlinkerValues): { currentMa: number; resistorPowerMw: number; ledPowerMw: number; totalPowerMw: number; }; /** * Build a Level-1 LED blinker template plan. * * Layout (left-to-right signal flow): * SW1 (x+0) → R1 (x+130) → D1 (x+260) * * This layout follows professional schematic conventions: * - Signal flows left to right * - Power enters from the left * - Ground exits from the right (LED cathode) * - Components are aligned on the same horizontal axis * - Even spacing for visual balance */ export declare function buildLedBlinkerTemplate(input: LedBlinkerTemplateInput): LedBlinkerTemplatePlan;