import { planSafeSchematicRegion, type SchematicRect, type SchematicRegionPreference } from './schematic-safe-region.js'; import type { WorkflowBlockInput, WorkflowDeviceItem } from './types.js'; export type ServoModuleBlockId = 'power_usb' | 'rp2040_core' | 'decoupling' | 'motor_driver' | 'leds' | 'connectors' | 'level_shifter'; export interface ServoModuleBlockPlan { id: ServoModuleBlockId; title: string; /** Top-left planning origin. The public rectangle frame below uses normalized bottom-left coordinates. */ origin: { x: number; y: number; }; size: { width: number; height: number; }; frame: SchematicRect; titlePosition: { x: number; y: number; }; refs: string[]; } export interface Rp2040ServoModuleDevices { resistor0402: WorkflowDeviceItem; capacitor0402: WorkflowDeviceItem; capacitor0603: WorkflowDeviceItem; capacitorPolarized: WorkflowDeviceItem; rp2040: WorkflowDeviceItem; drv8244: WorkflowDeviceItem; w25q16: WorkflowDeviceItem; txs0102: WorkflowDeviceItem; regulator3v3: WorkflowDeviceItem; usbC: WorkflowDeviceItem; ws2812b: WorkflowDeviceItem; conn01x10: WorkflowDeviceItem; conn01x06: WorkflowDeviceItem; conn01x03: WorkflowDeviceItem; crystal: WorkflowDeviceItem; switchSmd: WorkflowDeviceItem; fuse: WorkflowDeviceItem; diode: WorkflowDeviceItem; } export interface Rp2040ServoModuleInput { projectId: string; mode?: 'preview' | 'apply'; devices: Rp2040ServoModuleDevices; sheetInfo?: unknown; anchor?: { x: number; y: number; }; preferredRegion?: SchematicRegionPreference; margin?: number; } export interface Rp2040ServoModulePlan { workflowInput: WorkflowBlockInput; safeRegion: ReturnType; blocks: ServoModuleBlockPlan[]; bom: { expectedRefs: string[]; referenceCount: number; symbolGroups: Array<{ symbol: string; refs: string[]; count: number; }>; }; diagnostics: { mode: 'placement-scaffold'; electricalCompleteness: 'intentionally-incomplete'; sectionFrameCount: number; sectionTitleCount: number; detachedNetPortCount: number; wireCount: number; allExpectedRefsAssigned: boolean; duplicateBlockRefs: string[]; missingBlockRefs: string[]; blocksNonOverlapping: boolean; placementAnchorsInsideBlocks: boolean; drcExpectation: string; ercExpectation: string; }; warnings: string[]; notes: string[]; } export declare function buildRp2040ServoModuleScaffold(input: Rp2040ServoModuleInput): Rp2040ServoModulePlan;