@tscircuit/eval 0.0.324 → 0.0.326

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,7 @@ interface CircuitRunnerConfiguration {
8
8
  cjsRegistryUrl: string;
9
9
  verbose?: boolean;
10
10
  platform?: PlatformConfig;
11
+ projectConfig?: Partial<PlatformConfig>;
11
12
  }
12
13
  interface WebWorkerConfiguration extends CircuitRunnerConfiguration {
13
14
  evalVersion?: string;
@@ -42,6 +43,7 @@ interface CircuitRunnerApi {
42
43
  getCircuitJson: () => Promise<AnyCircuitElement[]>;
43
44
  setSnippetsApiBaseUrl: (baseUrl: string) => Promise<void>;
44
45
  setPlatformConfig: (platform: PlatformConfig) => Promise<void>;
46
+ setProjectConfig: (project: Partial<PlatformConfig>) => Promise<void>;
45
47
  enableDebug: (namespace: string) => Promise<void>;
46
48
  on: (event: RootCircuitEventName, callback: (...args: any[]) => void) => void;
47
49
  clearEventListeners: () => void;
@@ -57,6 +59,7 @@ interface ExecutionContext extends WebWorkerConfiguration {
57
59
  declare function createExecutionContext(webWorkerConfiguration: WebWorkerConfiguration, opts?: {
58
60
  name?: string;
59
61
  platform?: PlatformConfig;
62
+ projectConfig?: Partial<PlatformConfig>;
60
63
  debugNamespace?: string;
61
64
  }): ExecutionContext;
62
65
 
@@ -88,6 +91,7 @@ declare class CircuitRunner implements CircuitRunnerApi {
88
91
  kill(): Promise<void>;
89
92
  setSnippetsApiBaseUrl(baseUrl: string): Promise<void>;
90
93
  setPlatformConfig(platform: PlatformConfig): Promise<void>;
94
+ setProjectConfig(project: Partial<PlatformConfig>): Promise<void>;
91
95
  enableDebug(namespace: string): Promise<void>;
92
96
  private _bindEventListeners;
93
97
  }
@@ -693,14 +697,14 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
693
697
  internally_connected_source_port_ids?: string[][] | undefined;
694
698
  } | {
695
699
  type: "source_pcb_ground_plane";
696
- source_group_id: string;
697
700
  source_net_id: string;
701
+ source_group_id: string;
698
702
  source_pcb_ground_plane_id: string;
699
703
  subcircuit_id?: string | undefined;
700
704
  } | {
701
705
  type: "source_manually_placed_via";
702
- source_group_id: string;
703
706
  source_net_id: string;
707
+ source_group_id: string;
704
708
  source_manually_placed_via_id: string;
705
709
  subcircuit_id?: string | undefined;
706
710
  source_trace_id?: string | undefined;
@@ -779,6 +783,16 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
779
783
  subcircuit_id?: string | undefined;
780
784
  pcb_group_id?: string | undefined;
781
785
  footprinter_string?: string | undefined;
786
+ } | {
787
+ message: string;
788
+ type: "circuit_json_footprint_load_error";
789
+ pcb_component_id: string;
790
+ source_component_id: string;
791
+ error_type: "circuit_json_footprint_load_error";
792
+ circuit_json_footprint_load_error_id: string;
793
+ subcircuit_id?: string | undefined;
794
+ pcb_group_id?: string | undefined;
795
+ circuit_json?: any[] | undefined;
782
796
  } | {
783
797
  message: string;
784
798
  type: "pcb_manual_edit_conflict_warning";
@@ -852,6 +866,8 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
852
866
  pad_shape: "rect";
853
867
  rect_pad_width: number;
854
868
  rect_pad_height: number;
869
+ hole_offset_x: number;
870
+ hole_offset_y: number;
855
871
  pcb_component_id?: string | undefined;
856
872
  subcircuit_id?: string | undefined;
857
873
  pcb_group_id?: string | undefined;
@@ -871,6 +887,8 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
871
887
  pad_shape: "rect";
872
888
  rect_pad_width: number;
873
889
  rect_pad_height: number;
890
+ hole_offset_x: number;
891
+ hole_offset_y: number;
874
892
  hole_ccw_rotation: number;
875
893
  rect_ccw_rotation: number;
876
894
  pcb_component_id?: string | undefined;
@@ -917,6 +935,11 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
917
935
  subcircuit_id?: string | undefined;
918
936
  pcb_group_id?: string | undefined;
919
937
  is_board_pinout?: boolean | undefined;
938
+ } | {
939
+ type: "pcb_net";
940
+ pcb_net_id: string;
941
+ rats_nest_color?: string | undefined;
942
+ source_net_id?: string | undefined;
920
943
  } | {
921
944
  type: "pcb_text";
922
945
  width: number;
@@ -960,6 +983,7 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
960
983
  route_order_index?: number | undefined;
961
984
  should_round_corners?: boolean | undefined;
962
985
  trace_length?: number | undefined;
986
+ rats_nest_color?: string | undefined;
963
987
  } | {
964
988
  x: number;
965
989
  y: number;
@@ -1539,8 +1563,60 @@ declare function runTscircuitCode(filesystemOrCodeString: Record<string, string>
1539
1563
  y1: number;
1540
1564
  x2: number;
1541
1565
  y2: number;
1566
+ color: string;
1567
+ schematic_component_id: string;
1568
+ is_dashed: boolean;
1569
+ schematic_line_id: string;
1570
+ subcircuit_id?: string | undefined;
1571
+ stroke_width?: number | null | undefined;
1572
+ } | {
1573
+ type: "schematic_rect";
1574
+ width: number;
1575
+ height: number;
1576
+ center: {
1577
+ x: number;
1578
+ y: number;
1579
+ };
1580
+ rotation: number;
1581
+ is_filled: boolean;
1582
+ color: string;
1542
1583
  schematic_component_id: string;
1584
+ is_dashed: boolean;
1585
+ schematic_rect_id: string;
1586
+ subcircuit_id?: string | undefined;
1587
+ stroke_width?: number | null | undefined;
1588
+ fill_color?: string | undefined;
1589
+ } | {
1590
+ type: "schematic_circle";
1591
+ center: {
1592
+ x: number;
1593
+ y: number;
1594
+ };
1595
+ radius: number;
1596
+ is_filled: boolean;
1597
+ color: string;
1598
+ schematic_component_id: string;
1599
+ is_dashed: boolean;
1600
+ schematic_circle_id: string;
1601
+ subcircuit_id?: string | undefined;
1602
+ stroke_width?: number | null | undefined;
1603
+ fill_color?: string | undefined;
1604
+ } | {
1605
+ type: "schematic_arc";
1606
+ center: {
1607
+ x: number;
1608
+ y: number;
1609
+ };
1610
+ radius: number;
1611
+ color: string;
1612
+ schematic_component_id: string;
1613
+ is_dashed: boolean;
1614
+ direction: "clockwise" | "counterclockwise";
1615
+ schematic_arc_id: string;
1616
+ start_angle_degrees: number;
1617
+ end_angle_degrees: number;
1543
1618
  subcircuit_id?: string | undefined;
1619
+ stroke_width?: number | null | undefined;
1544
1620
  } | {
1545
1621
  type: "schematic_component";
1546
1622
  center: {
@@ -2440,14 +2516,14 @@ declare const runTscircuitModule: (module: string, opts?: {
2440
2516
  internally_connected_source_port_ids?: string[][] | undefined;
2441
2517
  } | {
2442
2518
  type: "source_pcb_ground_plane";
2443
- source_group_id: string;
2444
2519
  source_net_id: string;
2520
+ source_group_id: string;
2445
2521
  source_pcb_ground_plane_id: string;
2446
2522
  subcircuit_id?: string | undefined;
2447
2523
  } | {
2448
2524
  type: "source_manually_placed_via";
2449
- source_group_id: string;
2450
2525
  source_net_id: string;
2526
+ source_group_id: string;
2451
2527
  source_manually_placed_via_id: string;
2452
2528
  subcircuit_id?: string | undefined;
2453
2529
  source_trace_id?: string | undefined;
@@ -2526,6 +2602,16 @@ declare const runTscircuitModule: (module: string, opts?: {
2526
2602
  subcircuit_id?: string | undefined;
2527
2603
  pcb_group_id?: string | undefined;
2528
2604
  footprinter_string?: string | undefined;
2605
+ } | {
2606
+ message: string;
2607
+ type: "circuit_json_footprint_load_error";
2608
+ pcb_component_id: string;
2609
+ source_component_id: string;
2610
+ error_type: "circuit_json_footprint_load_error";
2611
+ circuit_json_footprint_load_error_id: string;
2612
+ subcircuit_id?: string | undefined;
2613
+ pcb_group_id?: string | undefined;
2614
+ circuit_json?: any[] | undefined;
2529
2615
  } | {
2530
2616
  message: string;
2531
2617
  type: "pcb_manual_edit_conflict_warning";
@@ -2599,6 +2685,8 @@ declare const runTscircuitModule: (module: string, opts?: {
2599
2685
  pad_shape: "rect";
2600
2686
  rect_pad_width: number;
2601
2687
  rect_pad_height: number;
2688
+ hole_offset_x: number;
2689
+ hole_offset_y: number;
2602
2690
  pcb_component_id?: string | undefined;
2603
2691
  subcircuit_id?: string | undefined;
2604
2692
  pcb_group_id?: string | undefined;
@@ -2618,6 +2706,8 @@ declare const runTscircuitModule: (module: string, opts?: {
2618
2706
  pad_shape: "rect";
2619
2707
  rect_pad_width: number;
2620
2708
  rect_pad_height: number;
2709
+ hole_offset_x: number;
2710
+ hole_offset_y: number;
2621
2711
  hole_ccw_rotation: number;
2622
2712
  rect_ccw_rotation: number;
2623
2713
  pcb_component_id?: string | undefined;
@@ -2664,6 +2754,11 @@ declare const runTscircuitModule: (module: string, opts?: {
2664
2754
  subcircuit_id?: string | undefined;
2665
2755
  pcb_group_id?: string | undefined;
2666
2756
  is_board_pinout?: boolean | undefined;
2757
+ } | {
2758
+ type: "pcb_net";
2759
+ pcb_net_id: string;
2760
+ rats_nest_color?: string | undefined;
2761
+ source_net_id?: string | undefined;
2667
2762
  } | {
2668
2763
  type: "pcb_text";
2669
2764
  width: number;
@@ -2707,6 +2802,7 @@ declare const runTscircuitModule: (module: string, opts?: {
2707
2802
  route_order_index?: number | undefined;
2708
2803
  should_round_corners?: boolean | undefined;
2709
2804
  trace_length?: number | undefined;
2805
+ rats_nest_color?: string | undefined;
2710
2806
  } | {
2711
2807
  x: number;
2712
2808
  y: number;
@@ -3286,8 +3382,60 @@ declare const runTscircuitModule: (module: string, opts?: {
3286
3382
  y1: number;
3287
3383
  x2: number;
3288
3384
  y2: number;
3385
+ color: string;
3386
+ schematic_component_id: string;
3387
+ is_dashed: boolean;
3388
+ schematic_line_id: string;
3389
+ subcircuit_id?: string | undefined;
3390
+ stroke_width?: number | null | undefined;
3391
+ } | {
3392
+ type: "schematic_rect";
3393
+ width: number;
3394
+ height: number;
3395
+ center: {
3396
+ x: number;
3397
+ y: number;
3398
+ };
3399
+ rotation: number;
3400
+ is_filled: boolean;
3401
+ color: string;
3289
3402
  schematic_component_id: string;
3403
+ is_dashed: boolean;
3404
+ schematic_rect_id: string;
3405
+ subcircuit_id?: string | undefined;
3406
+ stroke_width?: number | null | undefined;
3407
+ fill_color?: string | undefined;
3408
+ } | {
3409
+ type: "schematic_circle";
3410
+ center: {
3411
+ x: number;
3412
+ y: number;
3413
+ };
3414
+ radius: number;
3415
+ is_filled: boolean;
3416
+ color: string;
3417
+ schematic_component_id: string;
3418
+ is_dashed: boolean;
3419
+ schematic_circle_id: string;
3420
+ subcircuit_id?: string | undefined;
3421
+ stroke_width?: number | null | undefined;
3422
+ fill_color?: string | undefined;
3423
+ } | {
3424
+ type: "schematic_arc";
3425
+ center: {
3426
+ x: number;
3427
+ y: number;
3428
+ };
3429
+ radius: number;
3430
+ color: string;
3431
+ schematic_component_id: string;
3432
+ is_dashed: boolean;
3433
+ direction: "clockwise" | "counterclockwise";
3434
+ schematic_arc_id: string;
3435
+ start_angle_degrees: number;
3436
+ end_angle_degrees: number;
3290
3437
  subcircuit_id?: string | undefined;
3438
+ stroke_width?: number | null | undefined;
3291
3439
  } | {
3292
3440
  type: "schematic_component";
3293
3441
  center: {