@tscircuit/pcb-viewer 1.4.6 → 1.5.0
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.
- package/dist/index.js +426 -318
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -9334,6 +9334,9 @@ var require_dist = __commonJS({
|
|
|
9334
9334
|
any_source_component: function() {
|
|
9335
9335
|
return any_source_component;
|
|
9336
9336
|
},
|
|
9337
|
+
cad_component: function() {
|
|
9338
|
+
return cad_component;
|
|
9339
|
+
},
|
|
9337
9340
|
capacitance: function() {
|
|
9338
9341
|
return capacitance;
|
|
9339
9342
|
},
|
|
@@ -9370,6 +9373,9 @@ var require_dist = __commonJS({
|
|
|
9370
9373
|
pcb_hole: function() {
|
|
9371
9374
|
return pcb_hole;
|
|
9372
9375
|
},
|
|
9376
|
+
pcb_keepout: function() {
|
|
9377
|
+
return pcb_keepout;
|
|
9378
|
+
},
|
|
9373
9379
|
pcb_placement_error: function() {
|
|
9374
9380
|
return pcb_placement_error;
|
|
9375
9381
|
},
|
|
@@ -9394,6 +9400,9 @@ var require_dist = __commonJS({
|
|
|
9394
9400
|
pcb_silkscreen_line: function() {
|
|
9395
9401
|
return pcb_silkscreen_line;
|
|
9396
9402
|
},
|
|
9403
|
+
pcb_silkscreen_oval: function() {
|
|
9404
|
+
return pcb_silkscreen_oval;
|
|
9405
|
+
},
|
|
9397
9406
|
pcb_silkscreen_path: function() {
|
|
9398
9407
|
return pcb_silkscreen_path;
|
|
9399
9408
|
},
|
|
@@ -9424,9 +9433,15 @@ var require_dist = __commonJS({
|
|
|
9424
9433
|
point: function() {
|
|
9425
9434
|
return point;
|
|
9426
9435
|
},
|
|
9436
|
+
point3: function() {
|
|
9437
|
+
return point3;
|
|
9438
|
+
},
|
|
9427
9439
|
position: function() {
|
|
9428
9440
|
return position;
|
|
9429
9441
|
},
|
|
9442
|
+
position3: function() {
|
|
9443
|
+
return position3;
|
|
9444
|
+
},
|
|
9430
9445
|
resistance: function() {
|
|
9431
9446
|
return resistance;
|
|
9432
9447
|
},
|
|
@@ -9487,6 +9502,9 @@ var require_dist = __commonJS({
|
|
|
9487
9502
|
source_simple_capacitor: function() {
|
|
9488
9503
|
return source_simple_capacitor;
|
|
9489
9504
|
},
|
|
9505
|
+
source_simple_chip: function() {
|
|
9506
|
+
return source_simple_chip;
|
|
9507
|
+
},
|
|
9490
9508
|
source_simple_diode: function() {
|
|
9491
9509
|
return source_simple_diode;
|
|
9492
9510
|
},
|
|
@@ -9656,13 +9674,20 @@ var require_dist = __commonJS({
|
|
|
9656
9674
|
});
|
|
9657
9675
|
var position = point;
|
|
9658
9676
|
var import_zod3 = require_lib2();
|
|
9659
|
-
var
|
|
9660
|
-
|
|
9661
|
-
|
|
9677
|
+
var point3 = import_zod3.z.object({
|
|
9678
|
+
x: distance,
|
|
9679
|
+
y: distance,
|
|
9680
|
+
z: distance
|
|
9662
9681
|
});
|
|
9663
|
-
var
|
|
9682
|
+
var position3 = point3;
|
|
9664
9683
|
var import_zod4 = require_lib2();
|
|
9665
|
-
var
|
|
9684
|
+
var size = import_zod4.z.object({
|
|
9685
|
+
width: import_zod4.z.number(),
|
|
9686
|
+
height: import_zod4.z.number()
|
|
9687
|
+
});
|
|
9688
|
+
var import_zod7 = require_lib2();
|
|
9689
|
+
var import_zod5 = require_lib2();
|
|
9690
|
+
var supplier_name = import_zod5.z.enum([
|
|
9666
9691
|
"jlcpcb",
|
|
9667
9692
|
"macrofab",
|
|
9668
9693
|
"pcbway",
|
|
@@ -9670,200 +9695,208 @@ var require_dist = __commonJS({
|
|
|
9670
9695
|
"mouser",
|
|
9671
9696
|
"lcsc"
|
|
9672
9697
|
]);
|
|
9673
|
-
var
|
|
9674
|
-
var source_component_base =
|
|
9675
|
-
type:
|
|
9676
|
-
ftype:
|
|
9677
|
-
source_component_id:
|
|
9678
|
-
name:
|
|
9679
|
-
|
|
9680
|
-
supplier_part_numbers:
|
|
9698
|
+
var import_zod6 = require_lib2();
|
|
9699
|
+
var source_component_base = import_zod6.z.object({
|
|
9700
|
+
type: import_zod6.z.literal("source_component"),
|
|
9701
|
+
ftype: import_zod6.z.string().optional(),
|
|
9702
|
+
source_component_id: import_zod6.z.string(),
|
|
9703
|
+
name: import_zod6.z.string(),
|
|
9704
|
+
manufacturer_part_number: import_zod6.z.string().optional(),
|
|
9705
|
+
supplier_part_numbers: import_zod6.z.record(supplier_name, import_zod6.z.array(import_zod6.z.string())).optional()
|
|
9681
9706
|
});
|
|
9682
9707
|
var source_simple_capacitor = source_component_base.extend({
|
|
9683
|
-
ftype:
|
|
9708
|
+
ftype: import_zod7.z.literal("simple_capacitor"),
|
|
9684
9709
|
capacitance: capacitance
|
|
9685
9710
|
});
|
|
9686
|
-
var
|
|
9711
|
+
var import_zod8 = require_lib2();
|
|
9687
9712
|
var source_simple_resistor = source_component_base.extend({
|
|
9688
|
-
ftype:
|
|
9713
|
+
ftype: import_zod8.z.literal("simple_resistor"),
|
|
9689
9714
|
resistance: resistance
|
|
9690
9715
|
});
|
|
9691
|
-
var
|
|
9716
|
+
var import_zod9 = require_lib2();
|
|
9692
9717
|
var source_simple_diode = source_component_base.extend({
|
|
9693
|
-
ftype:
|
|
9718
|
+
ftype: import_zod9.z.literal("simple_diode")
|
|
9694
9719
|
});
|
|
9695
|
-
var
|
|
9720
|
+
var import_zod10 = require_lib2();
|
|
9696
9721
|
var source_simple_ground = source_component_base.extend({
|
|
9697
|
-
ftype:
|
|
9722
|
+
ftype: import_zod10.z.literal("simple_ground")
|
|
9698
9723
|
});
|
|
9699
|
-
var
|
|
9724
|
+
var import_zod11 = require_lib2();
|
|
9700
9725
|
var source_simple_bug = source_component_base.extend({
|
|
9701
|
-
ftype:
|
|
9726
|
+
ftype: import_zod11.z.literal("simple_bug")
|
|
9727
|
+
}).describe("@deprecated");
|
|
9728
|
+
var import_zod12 = require_lib2();
|
|
9729
|
+
var source_simple_chip = source_component_base.extend({
|
|
9730
|
+
ftype: import_zod12.z.literal("simple_chip")
|
|
9702
9731
|
});
|
|
9703
|
-
var
|
|
9732
|
+
var import_zod13 = require_lib2();
|
|
9704
9733
|
var source_simple_inductor = source_component_base.extend({
|
|
9705
|
-
ftype:
|
|
9734
|
+
ftype: import_zod13.z.literal("simple_inductor"),
|
|
9706
9735
|
inductance: inductance
|
|
9707
9736
|
});
|
|
9708
|
-
var
|
|
9737
|
+
var import_zod14 = require_lib2();
|
|
9709
9738
|
var source_led = source_simple_diode.extend({
|
|
9710
|
-
ftype:
|
|
9739
|
+
ftype: import_zod14.z.literal("led")
|
|
9711
9740
|
});
|
|
9712
|
-
var
|
|
9741
|
+
var import_zod15 = require_lib2();
|
|
9713
9742
|
var source_simple_power_source = source_component_base.extend({
|
|
9714
|
-
ftype:
|
|
9743
|
+
ftype: import_zod15.z.literal("simple_power_source"),
|
|
9715
9744
|
voltage: voltage
|
|
9716
9745
|
});
|
|
9717
|
-
var
|
|
9718
|
-
var any_source_component =
|
|
9746
|
+
var import_zod16 = require_lib2();
|
|
9747
|
+
var any_source_component = import_zod16.z.union([
|
|
9719
9748
|
source_simple_resistor,
|
|
9720
9749
|
source_simple_capacitor,
|
|
9721
9750
|
source_simple_diode,
|
|
9722
9751
|
source_simple_ground,
|
|
9752
|
+
source_simple_chip,
|
|
9723
9753
|
source_simple_bug,
|
|
9724
9754
|
source_led,
|
|
9725
9755
|
source_simple_power_source
|
|
9726
9756
|
]);
|
|
9727
|
-
var import_zod15 = require_lib2();
|
|
9728
|
-
var source_port = import_zod15.z.object({
|
|
9729
|
-
type: import_zod15.z.literal("source_port"),
|
|
9730
|
-
pin_number: import_zod15.z.number().optional(),
|
|
9731
|
-
port_hints: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
9732
|
-
name: import_zod15.z.string(),
|
|
9733
|
-
source_port_id: import_zod15.z.string(),
|
|
9734
|
-
source_component_id: import_zod15.z.string()
|
|
9735
|
-
});
|
|
9736
|
-
var import_zod16 = require_lib2();
|
|
9737
|
-
var source_trace = import_zod16.z.object({
|
|
9738
|
-
type: import_zod16.z.literal("source_trace"),
|
|
9739
|
-
source_trace_id: import_zod16.z.string(),
|
|
9740
|
-
connected_source_port_ids: import_zod16.z.array(import_zod16.z.string()),
|
|
9741
|
-
connected_source_net_ids: import_zod16.z.array(import_zod16.z.string())
|
|
9742
|
-
});
|
|
9743
9757
|
var import_zod17 = require_lib2();
|
|
9744
|
-
var
|
|
9745
|
-
type: import_zod17.z.literal("
|
|
9746
|
-
|
|
9747
|
-
|
|
9758
|
+
var source_port = import_zod17.z.object({
|
|
9759
|
+
type: import_zod17.z.literal("source_port"),
|
|
9760
|
+
pin_number: import_zod17.z.number().optional(),
|
|
9761
|
+
port_hints: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
9762
|
+
name: import_zod17.z.string(),
|
|
9763
|
+
source_port_id: import_zod17.z.string(),
|
|
9764
|
+
source_component_id: import_zod17.z.string()
|
|
9748
9765
|
});
|
|
9749
9766
|
var import_zod18 = require_lib2();
|
|
9750
|
-
var
|
|
9751
|
-
type: import_zod18.z.literal("
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
is_power: import_zod18.z.boolean().optional(),
|
|
9756
|
-
is_ground: import_zod18.z.boolean().optional(),
|
|
9757
|
-
is_digital_signal: import_zod18.z.boolean().optional(),
|
|
9758
|
-
is_analog_signal: import_zod18.z.boolean().optional()
|
|
9767
|
+
var source_trace = import_zod18.z.object({
|
|
9768
|
+
type: import_zod18.z.literal("source_trace"),
|
|
9769
|
+
source_trace_id: import_zod18.z.string(),
|
|
9770
|
+
connected_source_port_ids: import_zod18.z.array(import_zod18.z.string()),
|
|
9771
|
+
connected_source_net_ids: import_zod18.z.array(import_zod18.z.string())
|
|
9759
9772
|
});
|
|
9760
9773
|
var import_zod19 = require_lib2();
|
|
9761
|
-
var
|
|
9762
|
-
type: import_zod19.z.literal("
|
|
9763
|
-
|
|
9774
|
+
var source_group = import_zod19.z.object({
|
|
9775
|
+
type: import_zod19.z.literal("source_group"),
|
|
9776
|
+
source_group_id: import_zod19.z.string(),
|
|
9777
|
+
name: import_zod19.z.string().optional()
|
|
9778
|
+
});
|
|
9779
|
+
var import_zod20 = require_lib2();
|
|
9780
|
+
var source_net = import_zod20.z.object({
|
|
9781
|
+
type: import_zod20.z.literal("source_net"),
|
|
9782
|
+
source_net_id: import_zod20.z.string(),
|
|
9783
|
+
name: import_zod20.z.string(),
|
|
9784
|
+
member_source_group_ids: import_zod20.z.array(import_zod20.z.string()),
|
|
9785
|
+
is_power: import_zod20.z.boolean().optional(),
|
|
9786
|
+
is_ground: import_zod20.z.boolean().optional(),
|
|
9787
|
+
is_digital_signal: import_zod20.z.boolean().optional(),
|
|
9788
|
+
is_analog_signal: import_zod20.z.boolean().optional(),
|
|
9789
|
+
trace_width: import_zod20.z.number().optional()
|
|
9790
|
+
});
|
|
9791
|
+
var import_zod21 = require_lib2();
|
|
9792
|
+
var schematic_box = import_zod21.z.object({
|
|
9793
|
+
type: import_zod21.z.literal("schematic_box"),
|
|
9794
|
+
schematic_component_id: import_zod21.z.string(),
|
|
9764
9795
|
width: distance,
|
|
9765
9796
|
height: distance,
|
|
9766
9797
|
x: distance,
|
|
9767
9798
|
y: distance
|
|
9768
9799
|
}).describe("Draws a box on the schematic");
|
|
9769
|
-
var
|
|
9770
|
-
var schematic_path =
|
|
9771
|
-
type:
|
|
9772
|
-
schematic_component_id:
|
|
9773
|
-
fill_color:
|
|
9800
|
+
var import_zod22 = require_lib2();
|
|
9801
|
+
var schematic_path = import_zod22.z.object({
|
|
9802
|
+
type: import_zod22.z.literal("schematic_path"),
|
|
9803
|
+
schematic_component_id: import_zod22.z.string(),
|
|
9804
|
+
fill_color: import_zod22.z.enum([
|
|
9774
9805
|
"red",
|
|
9775
9806
|
"blue"
|
|
9776
9807
|
]).optional(),
|
|
9777
|
-
is_filled:
|
|
9778
|
-
points:
|
|
9808
|
+
is_filled: import_zod22.z.boolean().optional(),
|
|
9809
|
+
points: import_zod22.z.array(point)
|
|
9779
9810
|
});
|
|
9780
|
-
var
|
|
9781
|
-
var schematic_component =
|
|
9782
|
-
type:
|
|
9811
|
+
var import_zod23 = require_lib2();
|
|
9812
|
+
var schematic_component = import_zod23.z.object({
|
|
9813
|
+
type: import_zod23.z.literal("schematic_component"),
|
|
9783
9814
|
rotation: rotation.default(0),
|
|
9784
9815
|
size: size,
|
|
9785
9816
|
center: point,
|
|
9786
|
-
source_component_id:
|
|
9787
|
-
schematic_component_id:
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9817
|
+
source_component_id: import_zod23.z.string(),
|
|
9818
|
+
schematic_component_id: import_zod23.z.string(),
|
|
9819
|
+
pin_spacing: length.optional(),
|
|
9820
|
+
box_width: length.optional(),
|
|
9821
|
+
port_arrangement: import_zod23.z.union([
|
|
9822
|
+
import_zod23.z.object({
|
|
9823
|
+
left_size: import_zod23.z.number(),
|
|
9824
|
+
right_size: import_zod23.z.number(),
|
|
9825
|
+
top_size: import_zod23.z.number().optional(),
|
|
9826
|
+
bottom_size: import_zod23.z.number().optional()
|
|
9794
9827
|
}),
|
|
9795
|
-
|
|
9796
|
-
left_side:
|
|
9797
|
-
pins:
|
|
9798
|
-
direction:
|
|
9828
|
+
import_zod23.z.object({
|
|
9829
|
+
left_side: import_zod23.z.object({
|
|
9830
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
9831
|
+
direction: import_zod23.z.enum([
|
|
9799
9832
|
"top-to-bottom",
|
|
9800
9833
|
"bottom-to-top"
|
|
9801
9834
|
]).optional()
|
|
9802
9835
|
}).optional(),
|
|
9803
|
-
right_side:
|
|
9804
|
-
pins:
|
|
9805
|
-
direction:
|
|
9836
|
+
right_side: import_zod23.z.object({
|
|
9837
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
9838
|
+
direction: import_zod23.z.enum([
|
|
9806
9839
|
"top-to-bottom",
|
|
9807
9840
|
"bottom-to-top"
|
|
9808
9841
|
]).optional()
|
|
9809
9842
|
}).optional(),
|
|
9810
|
-
top_side:
|
|
9811
|
-
pins:
|
|
9812
|
-
direction:
|
|
9843
|
+
top_side: import_zod23.z.object({
|
|
9844
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
9845
|
+
direction: import_zod23.z.enum([
|
|
9813
9846
|
"left-to-right",
|
|
9814
9847
|
"right-to-left"
|
|
9815
9848
|
]).optional()
|
|
9816
9849
|
}).optional(),
|
|
9817
|
-
bottom_side:
|
|
9818
|
-
pins:
|
|
9819
|
-
direction:
|
|
9850
|
+
bottom_side: import_zod23.z.object({
|
|
9851
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
9852
|
+
direction: import_zod23.z.enum([
|
|
9820
9853
|
"left-to-right",
|
|
9821
9854
|
"right-to-left"
|
|
9822
9855
|
]).optional()
|
|
9823
9856
|
}).optional()
|
|
9824
9857
|
})
|
|
9825
9858
|
]).optional(),
|
|
9826
|
-
port_labels:
|
|
9859
|
+
port_labels: import_zod23.z.record(import_zod23.z.string()).optional()
|
|
9827
9860
|
});
|
|
9828
|
-
var
|
|
9829
|
-
var schematic_line =
|
|
9830
|
-
type:
|
|
9831
|
-
schematic_component_id:
|
|
9861
|
+
var import_zod24 = require_lib2();
|
|
9862
|
+
var schematic_line = import_zod24.z.object({
|
|
9863
|
+
type: import_zod24.z.literal("schematic_line"),
|
|
9864
|
+
schematic_component_id: import_zod24.z.string(),
|
|
9832
9865
|
x1: distance,
|
|
9833
9866
|
x2: distance,
|
|
9834
9867
|
y1: distance,
|
|
9835
9868
|
y2: distance
|
|
9836
9869
|
});
|
|
9837
|
-
var
|
|
9838
|
-
var schematic_trace =
|
|
9839
|
-
type:
|
|
9840
|
-
schematic_trace_id:
|
|
9841
|
-
source_trace_id:
|
|
9842
|
-
edges:
|
|
9843
|
-
from:
|
|
9844
|
-
x:
|
|
9845
|
-
y:
|
|
9870
|
+
var import_zod25 = require_lib2();
|
|
9871
|
+
var schematic_trace = import_zod25.z.object({
|
|
9872
|
+
type: import_zod25.z.literal("schematic_trace"),
|
|
9873
|
+
schematic_trace_id: import_zod25.z.string(),
|
|
9874
|
+
source_trace_id: import_zod25.z.string(),
|
|
9875
|
+
edges: import_zod25.z.array(import_zod25.z.object({
|
|
9876
|
+
from: import_zod25.z.object({
|
|
9877
|
+
x: import_zod25.z.number(),
|
|
9878
|
+
y: import_zod25.z.number()
|
|
9846
9879
|
}),
|
|
9847
|
-
to:
|
|
9848
|
-
x:
|
|
9849
|
-
y:
|
|
9880
|
+
to: import_zod25.z.object({
|
|
9881
|
+
x: import_zod25.z.number(),
|
|
9882
|
+
y: import_zod25.z.number()
|
|
9850
9883
|
}),
|
|
9851
|
-
from_schematic_port_id:
|
|
9852
|
-
to_schematic_port_id:
|
|
9884
|
+
from_schematic_port_id: import_zod25.z.string().optional(),
|
|
9885
|
+
to_schematic_port_id: import_zod25.z.string().optional()
|
|
9853
9886
|
}))
|
|
9854
9887
|
});
|
|
9855
|
-
var
|
|
9856
|
-
var schematic_text =
|
|
9857
|
-
type:
|
|
9858
|
-
schematic_component_id:
|
|
9859
|
-
schematic_text_id:
|
|
9860
|
-
text:
|
|
9861
|
-
position:
|
|
9888
|
+
var import_zod26 = require_lib2();
|
|
9889
|
+
var schematic_text = import_zod26.z.object({
|
|
9890
|
+
type: import_zod26.z.literal("schematic_text"),
|
|
9891
|
+
schematic_component_id: import_zod26.z.string(),
|
|
9892
|
+
schematic_text_id: import_zod26.z.string(),
|
|
9893
|
+
text: import_zod26.z.string(),
|
|
9894
|
+
position: import_zod26.z.object({
|
|
9862
9895
|
x: distance,
|
|
9863
9896
|
y: distance
|
|
9864
9897
|
}),
|
|
9865
|
-
rotation:
|
|
9866
|
-
anchor:
|
|
9898
|
+
rotation: import_zod26.z.number().default(0),
|
|
9899
|
+
anchor: import_zod26.z.enum([
|
|
9867
9900
|
"center",
|
|
9868
9901
|
"left",
|
|
9869
9902
|
"right",
|
|
@@ -9871,42 +9904,42 @@ var require_dist = __commonJS({
|
|
|
9871
9904
|
"bottom"
|
|
9872
9905
|
]).default("center")
|
|
9873
9906
|
});
|
|
9874
|
-
var
|
|
9875
|
-
var schematic_port =
|
|
9876
|
-
type:
|
|
9877
|
-
schematic_port_id:
|
|
9878
|
-
source_port_id:
|
|
9879
|
-
schematic_component_id:
|
|
9907
|
+
var import_zod27 = require_lib2();
|
|
9908
|
+
var schematic_port = import_zod27.z.object({
|
|
9909
|
+
type: import_zod27.z.literal("schematic_port"),
|
|
9910
|
+
schematic_port_id: import_zod27.z.string(),
|
|
9911
|
+
source_port_id: import_zod27.z.string(),
|
|
9912
|
+
schematic_component_id: import_zod27.z.string().optional(),
|
|
9880
9913
|
center: point,
|
|
9881
|
-
facing_direction:
|
|
9914
|
+
facing_direction: import_zod27.z.enum([
|
|
9882
9915
|
"up",
|
|
9883
9916
|
"down",
|
|
9884
9917
|
"left",
|
|
9885
9918
|
"right"
|
|
9886
9919
|
]).optional()
|
|
9887
9920
|
}).describe("Defines a port on a schematic component");
|
|
9888
|
-
var
|
|
9889
|
-
var schematic_net_label =
|
|
9890
|
-
type:
|
|
9891
|
-
source_net_id:
|
|
9921
|
+
var import_zod28 = require_lib2();
|
|
9922
|
+
var schematic_net_label = import_zod28.z.object({
|
|
9923
|
+
type: import_zod28.z.literal("schematic_net_label"),
|
|
9924
|
+
source_net_id: import_zod28.z.string(),
|
|
9892
9925
|
center: point,
|
|
9893
|
-
anchor_side:
|
|
9926
|
+
anchor_side: import_zod28.z.enum([
|
|
9894
9927
|
"top",
|
|
9895
9928
|
"bottom",
|
|
9896
9929
|
"left",
|
|
9897
9930
|
"right"
|
|
9898
9931
|
]),
|
|
9899
|
-
text:
|
|
9932
|
+
text: import_zod28.z.string()
|
|
9900
9933
|
});
|
|
9901
|
-
var
|
|
9902
|
-
var schematic_error =
|
|
9903
|
-
schematic_error_id:
|
|
9904
|
-
type:
|
|
9934
|
+
var import_zod29 = require_lib2();
|
|
9935
|
+
var schematic_error = import_zod29.z.object({
|
|
9936
|
+
schematic_error_id: import_zod29.z.string(),
|
|
9937
|
+
type: import_zod29.z.literal("schematic_error"),
|
|
9905
9938
|
// eventually each error type should be broken out into a dir of files
|
|
9906
|
-
error_type:
|
|
9907
|
-
message:
|
|
9939
|
+
error_type: import_zod29.z.literal("schematic_port_not_found"),
|
|
9940
|
+
message: import_zod29.z.string()
|
|
9908
9941
|
}).describe("Defines a schematic error on the schematic");
|
|
9909
|
-
var
|
|
9942
|
+
var import_zod30 = require_lib2();
|
|
9910
9943
|
var all_layers3 = [
|
|
9911
9944
|
"top",
|
|
9912
9945
|
"bottom",
|
|
@@ -9917,8 +9950,8 @@ var require_dist = __commonJS({
|
|
|
9917
9950
|
"inner5",
|
|
9918
9951
|
"inner6"
|
|
9919
9952
|
];
|
|
9920
|
-
var layer_string =
|
|
9921
|
-
var layer_ref = layer_string.or(
|
|
9953
|
+
var layer_string = import_zod30.z.enum(all_layers3);
|
|
9954
|
+
var layer_ref = layer_string.or(import_zod30.z.object({
|
|
9922
9955
|
name: layer_string
|
|
9923
9956
|
})).transform(function(layer) {
|
|
9924
9957
|
if (typeof layer === "string") {
|
|
@@ -9926,199 +9959,218 @@ var require_dist = __commonJS({
|
|
|
9926
9959
|
}
|
|
9927
9960
|
return layer.name;
|
|
9928
9961
|
});
|
|
9929
|
-
var visible_layer =
|
|
9962
|
+
var visible_layer = import_zod30.z.enum([
|
|
9930
9963
|
"top",
|
|
9931
9964
|
"bottom"
|
|
9932
9965
|
]);
|
|
9933
|
-
var
|
|
9934
|
-
var pcb_route_hint =
|
|
9966
|
+
var import_zod31 = require_lib2();
|
|
9967
|
+
var pcb_route_hint = import_zod31.z.object({
|
|
9935
9968
|
x: distance,
|
|
9936
9969
|
y: distance,
|
|
9937
|
-
via:
|
|
9970
|
+
via: import_zod31.z.boolean().optional(),
|
|
9938
9971
|
via_to_layer: layer_ref.optional()
|
|
9939
9972
|
});
|
|
9940
|
-
var pcb_route_hints =
|
|
9941
|
-
var
|
|
9942
|
-
var route_hint_point =
|
|
9973
|
+
var pcb_route_hints = import_zod31.z.array(pcb_route_hint);
|
|
9974
|
+
var import_zod32 = require_lib2();
|
|
9975
|
+
var route_hint_point = import_zod32.z.object({
|
|
9943
9976
|
x: distance,
|
|
9944
9977
|
y: distance,
|
|
9945
|
-
via:
|
|
9946
|
-
to_layer: layer_ref.optional()
|
|
9978
|
+
via: import_zod32.z.boolean().optional(),
|
|
9979
|
+
to_layer: layer_ref.optional(),
|
|
9980
|
+
trace_width: distance.optional()
|
|
9947
9981
|
});
|
|
9948
|
-
var
|
|
9949
|
-
var pcb_component =
|
|
9950
|
-
type:
|
|
9951
|
-
pcb_component_id:
|
|
9952
|
-
source_component_id:
|
|
9982
|
+
var import_zod33 = require_lib2();
|
|
9983
|
+
var pcb_component = import_zod33.z.object({
|
|
9984
|
+
type: import_zod33.z.literal("pcb_component"),
|
|
9985
|
+
pcb_component_id: import_zod33.z.string(),
|
|
9986
|
+
source_component_id: import_zod33.z.string(),
|
|
9953
9987
|
center: point,
|
|
9954
9988
|
layer: layer_ref,
|
|
9955
9989
|
rotation: rotation,
|
|
9956
9990
|
width: length,
|
|
9957
9991
|
height: length
|
|
9958
9992
|
}).describe("Defines a component on the PCB");
|
|
9959
|
-
var
|
|
9960
|
-
var pcb_hole =
|
|
9961
|
-
type:
|
|
9962
|
-
hole_shape:
|
|
9993
|
+
var import_zod34 = require_lib2();
|
|
9994
|
+
var pcb_hole = import_zod34.z.object({
|
|
9995
|
+
type: import_zod34.z.literal("pcb_hole"),
|
|
9996
|
+
hole_shape: import_zod34.z.enum([
|
|
9963
9997
|
"round",
|
|
9964
9998
|
"square"
|
|
9965
9999
|
]).default("round"),
|
|
9966
|
-
hole_diameter:
|
|
10000
|
+
hole_diameter: import_zod34.z.number(),
|
|
9967
10001
|
x: distance,
|
|
9968
10002
|
y: distance
|
|
9969
|
-
}).or(
|
|
9970
|
-
type:
|
|
9971
|
-
hole_shape:
|
|
9972
|
-
hole_width:
|
|
9973
|
-
hole_height:
|
|
10003
|
+
}).or(import_zod34.z.object({
|
|
10004
|
+
type: import_zod34.z.literal("pcb_hole"),
|
|
10005
|
+
hole_shape: import_zod34.z.literal("oval"),
|
|
10006
|
+
hole_width: import_zod34.z.number(),
|
|
10007
|
+
hole_height: import_zod34.z.number(),
|
|
9974
10008
|
x: distance,
|
|
9975
10009
|
y: distance
|
|
9976
10010
|
})).describe("Defines a hole on the PCB");
|
|
9977
|
-
var
|
|
9978
|
-
var pcb_plated_hole =
|
|
9979
|
-
type:
|
|
9980
|
-
|
|
9981
|
-
|
|
10011
|
+
var import_zod35 = require_lib2();
|
|
10012
|
+
var pcb_plated_hole = import_zod35.z.object({
|
|
10013
|
+
type: import_zod35.z.literal("pcb_plated_hole"),
|
|
10014
|
+
shape: import_zod35.z.literal("circle"),
|
|
10015
|
+
outer_diameter: import_zod35.z.number(),
|
|
10016
|
+
hole_diameter: import_zod35.z.number(),
|
|
9982
10017
|
x: distance,
|
|
9983
10018
|
y: distance,
|
|
9984
|
-
layers:
|
|
9985
|
-
port_hints:
|
|
9986
|
-
pcb_component_id:
|
|
9987
|
-
pcb_port_id:
|
|
9988
|
-
}).
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
10019
|
+
layers: import_zod35.z.array(layer_ref),
|
|
10020
|
+
port_hints: import_zod35.z.array(import_zod35.z.string()).optional(),
|
|
10021
|
+
pcb_component_id: import_zod35.z.string().optional(),
|
|
10022
|
+
pcb_port_id: import_zod35.z.string().optional()
|
|
10023
|
+
}).or(import_zod35.z.object({
|
|
10024
|
+
type: import_zod35.z.literal("pcb_plated_hole"),
|
|
10025
|
+
shape: import_zod35.z.enum([
|
|
10026
|
+
"oval",
|
|
10027
|
+
"pill"
|
|
10028
|
+
]),
|
|
10029
|
+
outer_width: import_zod35.z.number(),
|
|
10030
|
+
outer_height: import_zod35.z.number(),
|
|
10031
|
+
hole_width: import_zod35.z.number(),
|
|
10032
|
+
hole_height: import_zod35.z.number(),
|
|
10033
|
+
x: distance,
|
|
10034
|
+
y: distance,
|
|
10035
|
+
layers: import_zod35.z.array(layer_ref),
|
|
10036
|
+
port_hints: import_zod35.z.array(import_zod35.z.string()).optional(),
|
|
10037
|
+
pcb_component_id: import_zod35.z.string().optional(),
|
|
10038
|
+
pcb_port_id: import_zod35.z.string().optional()
|
|
10039
|
+
})).describe("Defines a plated hole on the PCB");
|
|
10040
|
+
var import_zod36 = require_lib2();
|
|
10041
|
+
var pcb_port = import_zod36.z.object({
|
|
10042
|
+
type: import_zod36.z.literal("pcb_port"),
|
|
10043
|
+
pcb_port_id: import_zod36.z.string(),
|
|
10044
|
+
source_port_id: import_zod36.z.string(),
|
|
10045
|
+
pcb_component_id: import_zod36.z.string(),
|
|
9995
10046
|
x: distance,
|
|
9996
10047
|
y: distance,
|
|
9997
|
-
layers:
|
|
10048
|
+
layers: import_zod36.z.array(layer_ref)
|
|
9998
10049
|
}).describe("Defines a port on the PCB");
|
|
9999
|
-
var
|
|
10000
|
-
var pcb_smtpad =
|
|
10001
|
-
|
|
10002
|
-
pcb_smtpad_id:
|
|
10003
|
-
type:
|
|
10004
|
-
shape:
|
|
10050
|
+
var import_zod37 = require_lib2();
|
|
10051
|
+
var pcb_smtpad = import_zod37.z.union([
|
|
10052
|
+
import_zod37.z.object({
|
|
10053
|
+
pcb_smtpad_id: import_zod37.z.string(),
|
|
10054
|
+
type: import_zod37.z.literal("pcb_smtpad"),
|
|
10055
|
+
shape: import_zod37.z.literal("circle"),
|
|
10005
10056
|
x: distance,
|
|
10006
10057
|
y: distance,
|
|
10007
|
-
radius:
|
|
10058
|
+
radius: import_zod37.z.number(),
|
|
10008
10059
|
layer: layer_ref,
|
|
10009
|
-
port_hints:
|
|
10010
|
-
pcb_component_id:
|
|
10011
|
-
pcb_port_id:
|
|
10060
|
+
port_hints: import_zod37.z.array(import_zod37.z.string()).optional(),
|
|
10061
|
+
pcb_component_id: import_zod37.z.string().optional(),
|
|
10062
|
+
pcb_port_id: import_zod37.z.string().optional()
|
|
10012
10063
|
}),
|
|
10013
|
-
|
|
10014
|
-
pcb_smtpad_id:
|
|
10015
|
-
type:
|
|
10016
|
-
shape:
|
|
10064
|
+
import_zod37.z.object({
|
|
10065
|
+
pcb_smtpad_id: import_zod37.z.string(),
|
|
10066
|
+
type: import_zod37.z.literal("pcb_smtpad"),
|
|
10067
|
+
shape: import_zod37.z.literal("rect"),
|
|
10017
10068
|
x: distance,
|
|
10018
10069
|
y: distance,
|
|
10019
|
-
width:
|
|
10020
|
-
height:
|
|
10070
|
+
width: import_zod37.z.number(),
|
|
10071
|
+
height: import_zod37.z.number(),
|
|
10021
10072
|
layer: layer_ref,
|
|
10022
|
-
port_hints:
|
|
10023
|
-
pcb_component_id:
|
|
10024
|
-
pcb_port_id:
|
|
10073
|
+
port_hints: import_zod37.z.array(import_zod37.z.string()).optional(),
|
|
10074
|
+
pcb_component_id: import_zod37.z.string().optional(),
|
|
10075
|
+
pcb_port_id: import_zod37.z.string().optional()
|
|
10025
10076
|
})
|
|
10026
10077
|
]).describe("Defines an SMT pad on the PCB");
|
|
10027
|
-
var
|
|
10028
|
-
var pcb_text =
|
|
10029
|
-
type:
|
|
10030
|
-
text:
|
|
10078
|
+
var import_zod38 = require_lib2();
|
|
10079
|
+
var pcb_text = import_zod38.z.object({
|
|
10080
|
+
type: import_zod38.z.literal("pcb_text"),
|
|
10081
|
+
text: import_zod38.z.string(),
|
|
10031
10082
|
x: distance,
|
|
10032
10083
|
y: distance,
|
|
10033
|
-
align:
|
|
10084
|
+
align: import_zod38.z.enum([
|
|
10034
10085
|
"bottom-left"
|
|
10035
10086
|
]),
|
|
10036
10087
|
width: distance,
|
|
10037
10088
|
height: distance,
|
|
10038
|
-
lines:
|
|
10089
|
+
lines: import_zod38.z.number()
|
|
10039
10090
|
}).describe("Defines text on the PCB");
|
|
10040
|
-
var
|
|
10041
|
-
var pcb_trace =
|
|
10042
|
-
type:
|
|
10043
|
-
source_trace_id:
|
|
10044
|
-
pcb_component_id:
|
|
10045
|
-
pcb_trace_id:
|
|
10046
|
-
route:
|
|
10047
|
-
|
|
10048
|
-
route_type:
|
|
10091
|
+
var import_zod39 = require_lib2();
|
|
10092
|
+
var pcb_trace = import_zod39.z.object({
|
|
10093
|
+
type: import_zod39.z.literal("pcb_trace"),
|
|
10094
|
+
source_trace_id: import_zod39.z.string().optional(),
|
|
10095
|
+
pcb_component_id: import_zod39.z.string().optional(),
|
|
10096
|
+
pcb_trace_id: import_zod39.z.string(),
|
|
10097
|
+
route: import_zod39.z.array(import_zod39.z.union([
|
|
10098
|
+
import_zod39.z.object({
|
|
10099
|
+
route_type: import_zod39.z.literal("wire"),
|
|
10049
10100
|
x: distance,
|
|
10050
10101
|
y: distance,
|
|
10051
10102
|
width: distance,
|
|
10052
|
-
start_pcb_port_id:
|
|
10053
|
-
end_pcb_port_id:
|
|
10054
|
-
layer:
|
|
10103
|
+
start_pcb_port_id: import_zod39.z.string().optional(),
|
|
10104
|
+
end_pcb_port_id: import_zod39.z.string().optional(),
|
|
10105
|
+
layer: import_zod39.z.string()
|
|
10055
10106
|
}),
|
|
10056
|
-
|
|
10057
|
-
route_type:
|
|
10107
|
+
import_zod39.z.object({
|
|
10108
|
+
route_type: import_zod39.z.literal("via"),
|
|
10058
10109
|
x: distance,
|
|
10059
10110
|
y: distance,
|
|
10060
|
-
from_layer:
|
|
10061
|
-
to_layer:
|
|
10111
|
+
from_layer: import_zod39.z.string(),
|
|
10112
|
+
to_layer: import_zod39.z.string()
|
|
10062
10113
|
})
|
|
10063
10114
|
]))
|
|
10064
10115
|
});
|
|
10065
|
-
var
|
|
10066
|
-
var pcb_trace_error =
|
|
10067
|
-
pcb_error_id:
|
|
10068
|
-
type:
|
|
10069
|
-
error_type:
|
|
10070
|
-
message:
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10116
|
+
var import_zod40 = require_lib2();
|
|
10117
|
+
var pcb_trace_error = import_zod40.z.object({
|
|
10118
|
+
pcb_error_id: import_zod40.z.string(),
|
|
10119
|
+
type: import_zod40.z.literal("pcb_error"),
|
|
10120
|
+
error_type: import_zod40.z.literal("pcb_trace_error"),
|
|
10121
|
+
message: import_zod40.z.string(),
|
|
10122
|
+
center: point.optional(),
|
|
10123
|
+
pcb_trace_id: import_zod40.z.string(),
|
|
10124
|
+
source_trace_id: import_zod40.z.string(),
|
|
10125
|
+
pcb_component_ids: import_zod40.z.array(import_zod40.z.string()),
|
|
10126
|
+
pcb_port_ids: import_zod40.z.array(import_zod40.z.string())
|
|
10075
10127
|
}).describe("Defines a trace error on the PCB");
|
|
10076
|
-
var
|
|
10077
|
-
var pcb_port_not_matched_error =
|
|
10078
|
-
pcb_error_id:
|
|
10079
|
-
type:
|
|
10080
|
-
error_type:
|
|
10081
|
-
message:
|
|
10082
|
-
pcb_component_ids:
|
|
10128
|
+
var import_zod41 = require_lib2();
|
|
10129
|
+
var pcb_port_not_matched_error = import_zod41.z.object({
|
|
10130
|
+
pcb_error_id: import_zod41.z.string(),
|
|
10131
|
+
type: import_zod41.z.literal("pcb_error"),
|
|
10132
|
+
error_type: import_zod41.z.literal("pcb_port_not_matched_error"),
|
|
10133
|
+
message: import_zod41.z.string(),
|
|
10134
|
+
pcb_component_ids: import_zod41.z.array(import_zod41.z.string())
|
|
10083
10135
|
}).describe("Defines a trace error on the PCB");
|
|
10084
|
-
var
|
|
10085
|
-
var pcb_via =
|
|
10086
|
-
type:
|
|
10136
|
+
var import_zod42 = require_lib2();
|
|
10137
|
+
var pcb_via = import_zod42.z.object({
|
|
10138
|
+
type: import_zod42.z.literal("pcb_via"),
|
|
10087
10139
|
x: distance,
|
|
10088
10140
|
y: distance,
|
|
10089
10141
|
outer_diameter: distance.default("0.6mm"),
|
|
10090
10142
|
hole_diameter: distance.default("0.25mm"),
|
|
10091
10143
|
/** @deprecated */ from_layer: layer_ref.optional(),
|
|
10092
10144
|
/** @deprecated */ to_layer: layer_ref.optional(),
|
|
10093
|
-
layers:
|
|
10145
|
+
layers: import_zod42.z.array(layer_ref)
|
|
10094
10146
|
}).describe("Defines a via on the PCB");
|
|
10095
|
-
var
|
|
10096
|
-
var pcb_board =
|
|
10097
|
-
type:
|
|
10147
|
+
var import_zod43 = require_lib2();
|
|
10148
|
+
var pcb_board = import_zod43.z.object({
|
|
10149
|
+
type: import_zod43.z.literal("pcb_board"),
|
|
10098
10150
|
width: length,
|
|
10099
10151
|
height: length,
|
|
10100
10152
|
center: point
|
|
10101
10153
|
}).describe("Defines the board outline of the PCB");
|
|
10102
|
-
var
|
|
10103
|
-
var pcb_placement_error =
|
|
10104
|
-
pcb_error_id:
|
|
10105
|
-
type:
|
|
10106
|
-
error_type:
|
|
10107
|
-
message:
|
|
10154
|
+
var import_zod44 = require_lib2();
|
|
10155
|
+
var pcb_placement_error = import_zod44.z.object({
|
|
10156
|
+
pcb_error_id: import_zod44.z.string(),
|
|
10157
|
+
type: import_zod44.z.literal("pcb_error"),
|
|
10158
|
+
error_type: import_zod44.z.literal("pcb_placement_error"),
|
|
10159
|
+
message: import_zod44.z.string()
|
|
10108
10160
|
}).describe("Defines a placement error on the PCB");
|
|
10109
|
-
var
|
|
10110
|
-
var pcb_trace_hint =
|
|
10111
|
-
pcb_trace_hint_id:
|
|
10112
|
-
type:
|
|
10113
|
-
pcb_port_id:
|
|
10114
|
-
pcb_component_id:
|
|
10115
|
-
route:
|
|
10161
|
+
var import_zod45 = require_lib2();
|
|
10162
|
+
var pcb_trace_hint = import_zod45.z.object({
|
|
10163
|
+
pcb_trace_hint_id: import_zod45.z.string(),
|
|
10164
|
+
type: import_zod45.z.literal("pcb_trace_hint"),
|
|
10165
|
+
pcb_port_id: import_zod45.z.string(),
|
|
10166
|
+
pcb_component_id: import_zod45.z.string(),
|
|
10167
|
+
route: import_zod45.z.array(route_hint_point.optional())
|
|
10116
10168
|
}).describe("A hint that can be used to generate a PCB trace");
|
|
10117
|
-
var
|
|
10118
|
-
var pcb_silkscreen_line =
|
|
10119
|
-
type:
|
|
10120
|
-
pcb_silkscreen_line_id:
|
|
10121
|
-
pcb_component_id:
|
|
10169
|
+
var import_zod46 = require_lib2();
|
|
10170
|
+
var pcb_silkscreen_line = import_zod46.z.object({
|
|
10171
|
+
type: import_zod46.z.literal("pcb_silkscreen_line"),
|
|
10172
|
+
pcb_silkscreen_line_id: import_zod46.z.string(),
|
|
10173
|
+
pcb_component_id: import_zod46.z.string(),
|
|
10122
10174
|
stroke_width: distance.default("0.1mm"),
|
|
10123
10175
|
x1: distance,
|
|
10124
10176
|
y1: distance,
|
|
@@ -10126,28 +10178,28 @@ var require_dist = __commonJS({
|
|
|
10126
10178
|
y2: distance,
|
|
10127
10179
|
layer: visible_layer
|
|
10128
10180
|
}).describe("Defines a silkscreen line on the PCB");
|
|
10129
|
-
var
|
|
10130
|
-
var pcb_silkscreen_path =
|
|
10131
|
-
type:
|
|
10132
|
-
pcb_silkscreen_path_id:
|
|
10133
|
-
pcb_component_id:
|
|
10181
|
+
var import_zod47 = require_lib2();
|
|
10182
|
+
var pcb_silkscreen_path = import_zod47.z.object({
|
|
10183
|
+
type: import_zod47.z.literal("pcb_silkscreen_path"),
|
|
10184
|
+
pcb_silkscreen_path_id: import_zod47.z.string(),
|
|
10185
|
+
pcb_component_id: import_zod47.z.string(),
|
|
10134
10186
|
layer: visible_layer,
|
|
10135
|
-
route:
|
|
10187
|
+
route: import_zod47.z.array(point),
|
|
10136
10188
|
stroke_width: length
|
|
10137
10189
|
}).describe("Defines a silkscreen path on the PCB");
|
|
10138
|
-
var
|
|
10139
|
-
var pcb_silkscreen_text =
|
|
10140
|
-
type:
|
|
10141
|
-
font:
|
|
10190
|
+
var import_zod48 = require_lib2();
|
|
10191
|
+
var pcb_silkscreen_text = import_zod48.z.object({
|
|
10192
|
+
type: import_zod48.z.literal("pcb_silkscreen_text"),
|
|
10193
|
+
font: import_zod48.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
10142
10194
|
font_size: distance.default("0.2mm"),
|
|
10143
|
-
pcb_component_id:
|
|
10144
|
-
text:
|
|
10195
|
+
pcb_component_id: import_zod48.z.string(),
|
|
10196
|
+
text: import_zod48.z.string(),
|
|
10145
10197
|
layer: visible_layer,
|
|
10146
10198
|
anchor_position: point.default({
|
|
10147
10199
|
x: 0,
|
|
10148
10200
|
y: 0
|
|
10149
10201
|
}),
|
|
10150
|
-
anchor_alignment:
|
|
10202
|
+
anchor_alignment: import_zod48.z.enum([
|
|
10151
10203
|
"center",
|
|
10152
10204
|
"top_left",
|
|
10153
10205
|
"top_right",
|
|
@@ -10155,38 +10207,48 @@ var require_dist = __commonJS({
|
|
|
10155
10207
|
"bottom_right"
|
|
10156
10208
|
]).default("center")
|
|
10157
10209
|
}).describe("Defines silkscreen text on the PCB");
|
|
10158
|
-
var
|
|
10159
|
-
var pcb_silkscreen_rect =
|
|
10160
|
-
type:
|
|
10161
|
-
pcb_silkscreen_rect_id:
|
|
10162
|
-
pcb_component_id:
|
|
10210
|
+
var import_zod49 = require_lib2();
|
|
10211
|
+
var pcb_silkscreen_rect = import_zod49.z.object({
|
|
10212
|
+
type: import_zod49.z.literal("pcb_silkscreen_rect"),
|
|
10213
|
+
pcb_silkscreen_rect_id: import_zod49.z.string(),
|
|
10214
|
+
pcb_component_id: import_zod49.z.string(),
|
|
10163
10215
|
center: point,
|
|
10164
10216
|
width: distance,
|
|
10165
10217
|
height: distance,
|
|
10166
10218
|
layer: visible_layer
|
|
10167
10219
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
10168
|
-
var
|
|
10169
|
-
var pcb_silkscreen_circle =
|
|
10170
|
-
type:
|
|
10171
|
-
pcb_silkscreen_circle_id:
|
|
10172
|
-
pcb_component_id:
|
|
10220
|
+
var import_zod50 = require_lib2();
|
|
10221
|
+
var pcb_silkscreen_circle = import_zod50.z.object({
|
|
10222
|
+
type: import_zod50.z.literal("pcb_silkscreen_circle"),
|
|
10223
|
+
pcb_silkscreen_circle_id: import_zod50.z.string(),
|
|
10224
|
+
pcb_component_id: import_zod50.z.string(),
|
|
10173
10225
|
center: point,
|
|
10174
10226
|
radius: distance,
|
|
10175
10227
|
layer: visible_layer
|
|
10176
10228
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
10177
|
-
var
|
|
10178
|
-
var
|
|
10179
|
-
type:
|
|
10180
|
-
|
|
10229
|
+
var import_zod51 = require_lib2();
|
|
10230
|
+
var pcb_silkscreen_oval = import_zod51.z.object({
|
|
10231
|
+
type: import_zod51.z.literal("pcb_silkscreen_oval"),
|
|
10232
|
+
pcb_silkscreen_oval_id: import_zod51.z.string(),
|
|
10233
|
+
pcb_component_id: import_zod51.z.string(),
|
|
10234
|
+
center: point,
|
|
10235
|
+
radius_x: distance,
|
|
10236
|
+
radius_y: distance,
|
|
10237
|
+
layer: visible_layer
|
|
10238
|
+
}).describe("Defines a silkscreen oval on the PCB");
|
|
10239
|
+
var import_zod52 = require_lib2();
|
|
10240
|
+
var pcb_fabrication_note_text = import_zod52.z.object({
|
|
10241
|
+
type: import_zod52.z.literal("pcb_fabrication_note_text"),
|
|
10242
|
+
font: import_zod52.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
10181
10243
|
font_size: distance.default("1mm"),
|
|
10182
|
-
pcb_component_id:
|
|
10183
|
-
text:
|
|
10244
|
+
pcb_component_id: import_zod52.z.string(),
|
|
10245
|
+
text: import_zod52.z.string(),
|
|
10184
10246
|
layer: visible_layer,
|
|
10185
10247
|
anchor_position: point.default({
|
|
10186
10248
|
x: 0,
|
|
10187
10249
|
y: 0
|
|
10188
10250
|
}),
|
|
10189
|
-
anchor_alignment:
|
|
10251
|
+
anchor_alignment: import_zod52.z.enum([
|
|
10190
10252
|
"center",
|
|
10191
10253
|
"top_left",
|
|
10192
10254
|
"top_right",
|
|
@@ -10194,17 +10256,52 @@ var require_dist = __commonJS({
|
|
|
10194
10256
|
"bottom_right"
|
|
10195
10257
|
]).default("center")
|
|
10196
10258
|
}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators");
|
|
10197
|
-
var
|
|
10198
|
-
var pcb_fabrication_note_path =
|
|
10199
|
-
type:
|
|
10200
|
-
fabrication_note_path_id:
|
|
10201
|
-
pcb_component_id:
|
|
10259
|
+
var import_zod53 = require_lib2();
|
|
10260
|
+
var pcb_fabrication_note_path = import_zod53.z.object({
|
|
10261
|
+
type: import_zod53.z.literal("pcb_fabrication_note_path"),
|
|
10262
|
+
fabrication_note_path_id: import_zod53.z.string(),
|
|
10263
|
+
pcb_component_id: import_zod53.z.string(),
|
|
10202
10264
|
layer: visible_layer,
|
|
10203
|
-
route:
|
|
10265
|
+
route: import_zod53.z.array(point),
|
|
10204
10266
|
stroke_width: length
|
|
10205
10267
|
}).describe("Defines a fabrication path on the PCB for fabricators or assemblers");
|
|
10206
|
-
var
|
|
10207
|
-
var
|
|
10268
|
+
var import_zod54 = require_lib2();
|
|
10269
|
+
var pcb_keepout = import_zod54.z.object({
|
|
10270
|
+
type: import_zod54.z.literal("pcb_keepout"),
|
|
10271
|
+
pcb_keepout_id: import_zod54.z.string(),
|
|
10272
|
+
layer: import_zod54.z.array(import_zod54.z.string()).optional(),
|
|
10273
|
+
// Specify layers where the keepout applies
|
|
10274
|
+
description: import_zod54.z.string().optional()
|
|
10275
|
+
}).and(import_zod54.z.object({
|
|
10276
|
+
shape: import_zod54.z.literal("rect"),
|
|
10277
|
+
x: distance,
|
|
10278
|
+
y: distance,
|
|
10279
|
+
width: distance,
|
|
10280
|
+
height: distance
|
|
10281
|
+
}).or(import_zod54.z.object({
|
|
10282
|
+
shape: import_zod54.z.literal("circle"),
|
|
10283
|
+
center: point,
|
|
10284
|
+
radius: distance
|
|
10285
|
+
})));
|
|
10286
|
+
var import_zod55 = require_lib2();
|
|
10287
|
+
var cad_component = import_zod55.z.object({
|
|
10288
|
+
type: import_zod55.z.literal("cad_component"),
|
|
10289
|
+
cad_component_id: import_zod55.z.string(),
|
|
10290
|
+
pcb_component_id: import_zod55.z.string(),
|
|
10291
|
+
source_component_id: import_zod55.z.string(),
|
|
10292
|
+
position: point3,
|
|
10293
|
+
rotation: point3.optional(),
|
|
10294
|
+
size: point3.optional(),
|
|
10295
|
+
layer: layer_ref.optional(),
|
|
10296
|
+
// These are all ways to generate/load the 3d model
|
|
10297
|
+
footprinter_string: import_zod55.z.string().optional(),
|
|
10298
|
+
model_obj_url: import_zod55.z.string().optional(),
|
|
10299
|
+
model_stl_url: import_zod55.z.string().optional(),
|
|
10300
|
+
model_3mf_url: import_zod55.z.string().optional(),
|
|
10301
|
+
model_jscad: import_zod55.z.any().optional()
|
|
10302
|
+
}).describe("Defines a component on the PCB");
|
|
10303
|
+
var import_zod56 = require_lib2();
|
|
10304
|
+
var any_soup_element = import_zod56.z.union([
|
|
10208
10305
|
source_trace,
|
|
10209
10306
|
source_port,
|
|
10210
10307
|
any_source_component,
|
|
@@ -10212,6 +10309,7 @@ var require_dist = __commonJS({
|
|
|
10212
10309
|
source_net,
|
|
10213
10310
|
source_group,
|
|
10214
10311
|
source_simple_bug,
|
|
10312
|
+
source_simple_chip,
|
|
10215
10313
|
source_simple_capacitor,
|
|
10216
10314
|
source_simple_diode,
|
|
10217
10315
|
source_simple_resistor,
|
|
@@ -10231,6 +10329,7 @@ var require_dist = __commonJS({
|
|
|
10231
10329
|
pcb_silkscreen_text,
|
|
10232
10330
|
pcb_silkscreen_rect,
|
|
10233
10331
|
pcb_silkscreen_circle,
|
|
10332
|
+
pcb_silkscreen_oval,
|
|
10234
10333
|
pcb_trace_error,
|
|
10235
10334
|
pcb_placement_error,
|
|
10236
10335
|
pcb_port_not_matched_error,
|
|
@@ -10244,7 +10343,8 @@ var require_dist = __commonJS({
|
|
|
10244
10343
|
schematic_trace,
|
|
10245
10344
|
schematic_path,
|
|
10246
10345
|
schematic_error,
|
|
10247
|
-
schematic_net_label
|
|
10346
|
+
schematic_net_label,
|
|
10347
|
+
cad_component
|
|
10248
10348
|
]);
|
|
10249
10349
|
}
|
|
10250
10350
|
});
|
|
@@ -13290,7 +13390,7 @@ var import_soup2 = __toESM(require_dist());
|
|
|
13290
13390
|
// package.json
|
|
13291
13391
|
var package_default = {
|
|
13292
13392
|
name: "@tscircuit/pcb-viewer",
|
|
13293
|
-
version: "1.4.
|
|
13393
|
+
version: "1.4.6",
|
|
13294
13394
|
main: "dist/index.js",
|
|
13295
13395
|
repository: "tscircuit/pcb-viewer",
|
|
13296
13396
|
license: "MIT",
|
|
@@ -13313,11 +13413,11 @@ var package_default = {
|
|
|
13313
13413
|
"@storybook/nextjs": "^8.0.6",
|
|
13314
13414
|
"@storybook/react": "^8.0.6",
|
|
13315
13415
|
"@swc/core": "^1.4.12",
|
|
13316
|
-
"@tscircuit/builder": "^1.
|
|
13416
|
+
"@tscircuit/builder": "^1.11.0",
|
|
13317
13417
|
"@tscircuit/eagle-xml-converter": "^0.0.6",
|
|
13318
|
-
"@tscircuit/props": "^0.0.
|
|
13418
|
+
"@tscircuit/props": "^0.0.31",
|
|
13319
13419
|
"@tscircuit/react-fiber": "^1.1.25",
|
|
13320
|
-
"@tscircuit/soup": "^0.0.
|
|
13420
|
+
"@tscircuit/soup": "^0.0.50",
|
|
13321
13421
|
"@tscircuit/soup-util": "^0.0.13",
|
|
13322
13422
|
"@types/node": "18.7.23",
|
|
13323
13423
|
"@types/react": "^18.3.3",
|
|
@@ -14152,14 +14252,22 @@ var EditTraceHintOverlay = function(param) {
|
|
|
14152
14252
|
height: 20,
|
|
14153
14253
|
stroke: "red"
|
|
14154
14254
|
}, "rect-".concat(e.pcb_port_id)),
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14255
|
+
route.map(function(r, index) {
|
|
14256
|
+
var start = index === 0 ? pcb_port_screen : (0, import_transformation_matrix6.applyToPoint)(transform, route[index - 1]);
|
|
14257
|
+
var end = (0, import_transformation_matrix6.applyToPoint)(transform, r);
|
|
14258
|
+
var width = r === null || r === void 0 ? void 0 : r.trace_width;
|
|
14259
|
+
var angle = Math.atan2(end.y - start.y, end.x - start.x);
|
|
14260
|
+
var dx = width !== null && width !== void 0 ? width : 0.5 * Math.sin(angle);
|
|
14261
|
+
var dy = width !== null && width !== void 0 ? width : 0.5 * -Math.cos(angle);
|
|
14262
|
+
var topLeft = "".concat(start.x - dx, ",").concat(start.y - dy);
|
|
14263
|
+
var topRight = "".concat(end.x - dx, ",").concat(end.y - dy);
|
|
14264
|
+
var bottomRight = "".concat(end.x + dx, ",").concat(end.y + dy);
|
|
14265
|
+
var bottomLeft = "".concat(start.x + dx, ",").concat(start.y + dy);
|
|
14266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
14267
|
+
fill: "red",
|
|
14268
|
+
d: "M ".concat(topLeft, " L ").concat(topRight, " L ").concat(bottomRight, " L ").concat(bottomLeft, " Z")
|
|
14269
|
+
}, "path-".concat(e.pcb_port_id, "-").concat(index));
|
|
14270
|
+
}),
|
|
14163
14271
|
route.map(function(r) {
|
|
14164
14272
|
return _object_spread({}, r, (0, import_transformation_matrix6.applyToPoint)(transform, r));
|
|
14165
14273
|
}).map(function(r, i) {
|