circuit-json 0.0.211 → 0.0.212
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/README.md +111 -106
- package/dist/index.d.mts +550 -0
- package/dist/index.mjs +38 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -327,7 +327,8 @@ var source_component_base = z8.object({
|
|
|
327
327
|
display_value: z8.string().optional(),
|
|
328
328
|
are_pins_interchangeable: z8.boolean().optional(),
|
|
329
329
|
internally_connected_source_port_ids: z8.array(z8.array(z8.string())).optional(),
|
|
330
|
-
source_group_id: z8.string().optional()
|
|
330
|
+
source_group_id: z8.string().optional(),
|
|
331
|
+
subcircuit_id: z8.string().optional()
|
|
331
332
|
});
|
|
332
333
|
expectTypesMatch(true);
|
|
333
334
|
|
|
@@ -519,6 +520,7 @@ var source_missing_property_error = z29.object({
|
|
|
519
520
|
),
|
|
520
521
|
source_component_id: z29.string(),
|
|
521
522
|
property_name: z29.string(),
|
|
523
|
+
subcircuit_id: z29.string().optional(),
|
|
522
524
|
error_type: z29.literal("source_missing_property_error").default("source_missing_property_error"),
|
|
523
525
|
message: z29.string()
|
|
524
526
|
}).describe("The source code is missing a property");
|
|
@@ -652,7 +654,8 @@ var schematic_box = z37.object({
|
|
|
652
654
|
height: distance,
|
|
653
655
|
is_dashed: z37.boolean().default(false),
|
|
654
656
|
x: distance,
|
|
655
|
-
y: distance
|
|
657
|
+
y: distance,
|
|
658
|
+
subcircuit_id: z37.string().optional()
|
|
656
659
|
}).describe("Draws a box on the schematic");
|
|
657
660
|
expectTypesMatch(true);
|
|
658
661
|
|
|
@@ -663,7 +666,8 @@ var schematic_path = z38.object({
|
|
|
663
666
|
schematic_component_id: z38.string(),
|
|
664
667
|
fill_color: z38.enum(["red", "blue"]).optional(),
|
|
665
668
|
is_filled: z38.boolean().optional(),
|
|
666
|
-
points: z38.array(point)
|
|
669
|
+
points: z38.array(point),
|
|
670
|
+
subcircuit_id: z38.string().optional()
|
|
667
671
|
});
|
|
668
672
|
expectTypesMatch(true);
|
|
669
673
|
|
|
@@ -737,7 +741,8 @@ var schematic_line = z40.object({
|
|
|
737
741
|
x1: distance,
|
|
738
742
|
x2: distance,
|
|
739
743
|
y1: distance,
|
|
740
|
-
y2: distance
|
|
744
|
+
y2: distance,
|
|
745
|
+
subcircuit_id: z40.string().optional()
|
|
741
746
|
});
|
|
742
747
|
expectTypesMatch(true);
|
|
743
748
|
|
|
@@ -767,7 +772,8 @@ var schematic_trace = z41.object({
|
|
|
767
772
|
from_schematic_port_id: z41.string().optional(),
|
|
768
773
|
to_schematic_port_id: z41.string().optional()
|
|
769
774
|
})
|
|
770
|
-
)
|
|
775
|
+
),
|
|
776
|
+
subcircuit_id: z41.string().optional()
|
|
771
777
|
});
|
|
772
778
|
expectTypesMatch(true);
|
|
773
779
|
|
|
@@ -798,7 +804,8 @@ var schematic_text = z43.object({
|
|
|
798
804
|
}),
|
|
799
805
|
rotation: z43.number().default(0),
|
|
800
806
|
anchor: z43.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
801
|
-
color: z43.string().default("#000000")
|
|
807
|
+
color: z43.string().default("#000000"),
|
|
808
|
+
subcircuit_id: z43.string().optional()
|
|
802
809
|
});
|
|
803
810
|
expectTypesMatch(true);
|
|
804
811
|
|
|
@@ -815,7 +822,8 @@ var schematic_port = z44.object({
|
|
|
815
822
|
side_of_component: z44.enum(["top", "bottom", "left", "right"]).optional(),
|
|
816
823
|
true_ccw_index: z44.number().optional(),
|
|
817
824
|
pin_number: z44.number().optional(),
|
|
818
|
-
display_pin_label: z44.string().optional()
|
|
825
|
+
display_pin_label: z44.string().optional(),
|
|
826
|
+
subcircuit_id: z44.string().optional()
|
|
819
827
|
}).describe("Defines a port on a schematic component");
|
|
820
828
|
expectTypesMatch(true);
|
|
821
829
|
|
|
@@ -831,7 +839,8 @@ var schematic_net_label = z45.object({
|
|
|
831
839
|
anchor_position: point.optional(),
|
|
832
840
|
anchor_side: z45.enum(["top", "bottom", "left", "right"]),
|
|
833
841
|
text: z45.string(),
|
|
834
|
-
symbol_name: z45.string().optional()
|
|
842
|
+
symbol_name: z45.string().optional(),
|
|
843
|
+
subcircuit_id: z45.string().optional()
|
|
835
844
|
});
|
|
836
845
|
expectTypesMatch(true);
|
|
837
846
|
|
|
@@ -842,7 +851,8 @@ var schematic_error = z46.object({
|
|
|
842
851
|
schematic_error_id: z46.string(),
|
|
843
852
|
// eventually each error type should be broken out into a dir of files
|
|
844
853
|
error_type: z46.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
845
|
-
message: z46.string()
|
|
854
|
+
message: z46.string(),
|
|
855
|
+
subcircuit_id: z46.string().optional()
|
|
846
856
|
}).describe("Defines a schematic error on the schematic");
|
|
847
857
|
expectTypesMatch(true);
|
|
848
858
|
|
|
@@ -856,7 +866,8 @@ var schematic_layout_error = z47.object({
|
|
|
856
866
|
error_type: z47.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
857
867
|
message: z47.string(),
|
|
858
868
|
source_group_id: z47.string(),
|
|
859
|
-
schematic_group_id: z47.string()
|
|
869
|
+
schematic_group_id: z47.string(),
|
|
870
|
+
subcircuit_id: z47.string().optional()
|
|
860
871
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
861
872
|
expectTypesMatch(true);
|
|
862
873
|
|
|
@@ -864,7 +875,8 @@ expectTypesMatch(true);
|
|
|
864
875
|
import { z as z48 } from "zod";
|
|
865
876
|
var schematic_debug_object_base = z48.object({
|
|
866
877
|
type: z48.literal("schematic_debug_object"),
|
|
867
|
-
label: z48.string().optional()
|
|
878
|
+
label: z48.string().optional(),
|
|
879
|
+
subcircuit_id: z48.string().optional()
|
|
868
880
|
});
|
|
869
881
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
870
882
|
shape: z48.literal("rect"),
|
|
@@ -894,7 +906,8 @@ var schematic_voltage_probe = z49.object({
|
|
|
894
906
|
schematic_voltage_probe_id: z49.string(),
|
|
895
907
|
position: point,
|
|
896
908
|
schematic_trace_id: z49.string(),
|
|
897
|
-
voltage: voltage.optional()
|
|
909
|
+
voltage: voltage.optional(),
|
|
910
|
+
subcircuit_id: z49.string().optional()
|
|
898
911
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
899
912
|
expectTypesMatch(true);
|
|
900
913
|
|
|
@@ -1375,7 +1388,8 @@ var pcb_trace_error = z63.object({
|
|
|
1375
1388
|
pcb_trace_id: z63.string(),
|
|
1376
1389
|
source_trace_id: z63.string(),
|
|
1377
1390
|
pcb_component_ids: z63.array(z63.string()),
|
|
1378
|
-
pcb_port_ids: z63.array(z63.string())
|
|
1391
|
+
pcb_port_ids: z63.array(z63.string()),
|
|
1392
|
+
subcircuit_id: z63.string().optional()
|
|
1379
1393
|
}).describe("Defines a trace error on the PCB");
|
|
1380
1394
|
expectTypesMatch(true);
|
|
1381
1395
|
|
|
@@ -1386,7 +1400,8 @@ var pcb_port_not_matched_error = z64.object({
|
|
|
1386
1400
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1387
1401
|
error_type: z64.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1388
1402
|
message: z64.string(),
|
|
1389
|
-
pcb_component_ids: z64.array(z64.string())
|
|
1403
|
+
pcb_component_ids: z64.array(z64.string()),
|
|
1404
|
+
subcircuit_id: z64.string().optional()
|
|
1390
1405
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1391
1406
|
expectTypesMatch(true);
|
|
1392
1407
|
|
|
@@ -1433,7 +1448,8 @@ var pcb_placement_error = z67.object({
|
|
|
1433
1448
|
type: z67.literal("pcb_placement_error"),
|
|
1434
1449
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1435
1450
|
error_type: z67.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1436
|
-
message: z67.string()
|
|
1451
|
+
message: z67.string(),
|
|
1452
|
+
subcircuit_id: z67.string().optional()
|
|
1437
1453
|
}).describe("Defines a placement error on the PCB");
|
|
1438
1454
|
expectTypesMatch(true);
|
|
1439
1455
|
|
|
@@ -1444,7 +1460,8 @@ var pcb_trace_hint = z68.object({
|
|
|
1444
1460
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1445
1461
|
pcb_port_id: z68.string(),
|
|
1446
1462
|
pcb_component_id: z68.string(),
|
|
1447
|
-
route: z68.array(route_hint_point)
|
|
1463
|
+
route: z68.array(route_hint_point),
|
|
1464
|
+
subcircuit_id: z68.string().optional()
|
|
1448
1465
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1449
1466
|
expectTypesMatch(true);
|
|
1450
1467
|
|
|
@@ -1695,7 +1712,8 @@ var pcb_autorouting_error = z81.object({
|
|
|
1695
1712
|
type: z81.literal("pcb_autorouting_error"),
|
|
1696
1713
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1697
1714
|
error_type: z81.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1698
|
-
message: z81.string()
|
|
1715
|
+
message: z81.string(),
|
|
1716
|
+
subcircuit_id: z81.string().optional()
|
|
1699
1717
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1700
1718
|
expectTypesMatch(true);
|
|
1701
1719
|
|
|
@@ -1772,7 +1790,8 @@ var pcb_thermal_spoke = z86.object({
|
|
|
1772
1790
|
spoke_thickness: distance,
|
|
1773
1791
|
spoke_inner_diameter: distance,
|
|
1774
1792
|
spoke_outer_diameter: distance,
|
|
1775
|
-
pcb_plated_hole_id: z86.string().optional()
|
|
1793
|
+
pcb_plated_hole_id: z86.string().optional(),
|
|
1794
|
+
subcircuit_id: z86.string().optional()
|
|
1776
1795
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1777
1796
|
expectTypesMatch(true);
|
|
1778
1797
|
|
|
@@ -1787,6 +1806,7 @@ var cad_component = z87.object({
|
|
|
1787
1806
|
rotation: point3.optional(),
|
|
1788
1807
|
size: point3.optional(),
|
|
1789
1808
|
layer: layer_ref.optional(),
|
|
1809
|
+
subcircuit_id: z87.string().optional(),
|
|
1790
1810
|
// These are all ways to generate/load the 3d model
|
|
1791
1811
|
footprinter_string: z87.string().optional(),
|
|
1792
1812
|
model_obj_url: z87.string().optional(),
|