circuit-json 0.0.211 → 0.0.213
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 +114 -106
- package/dist/index.d.mts +564 -0
- package/dist/index.mjs +39 -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,9 @@ 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
|
+
is_movable: z45.boolean().optional(),
|
|
844
|
+
subcircuit_id: z45.string().optional()
|
|
835
845
|
});
|
|
836
846
|
expectTypesMatch(true);
|
|
837
847
|
|
|
@@ -842,7 +852,8 @@ var schematic_error = z46.object({
|
|
|
842
852
|
schematic_error_id: z46.string(),
|
|
843
853
|
// eventually each error type should be broken out into a dir of files
|
|
844
854
|
error_type: z46.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
845
|
-
message: z46.string()
|
|
855
|
+
message: z46.string(),
|
|
856
|
+
subcircuit_id: z46.string().optional()
|
|
846
857
|
}).describe("Defines a schematic error on the schematic");
|
|
847
858
|
expectTypesMatch(true);
|
|
848
859
|
|
|
@@ -856,7 +867,8 @@ var schematic_layout_error = z47.object({
|
|
|
856
867
|
error_type: z47.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
857
868
|
message: z47.string(),
|
|
858
869
|
source_group_id: z47.string(),
|
|
859
|
-
schematic_group_id: z47.string()
|
|
870
|
+
schematic_group_id: z47.string(),
|
|
871
|
+
subcircuit_id: z47.string().optional()
|
|
860
872
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
861
873
|
expectTypesMatch(true);
|
|
862
874
|
|
|
@@ -864,7 +876,8 @@ expectTypesMatch(true);
|
|
|
864
876
|
import { z as z48 } from "zod";
|
|
865
877
|
var schematic_debug_object_base = z48.object({
|
|
866
878
|
type: z48.literal("schematic_debug_object"),
|
|
867
|
-
label: z48.string().optional()
|
|
879
|
+
label: z48.string().optional(),
|
|
880
|
+
subcircuit_id: z48.string().optional()
|
|
868
881
|
});
|
|
869
882
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
870
883
|
shape: z48.literal("rect"),
|
|
@@ -894,7 +907,8 @@ var schematic_voltage_probe = z49.object({
|
|
|
894
907
|
schematic_voltage_probe_id: z49.string(),
|
|
895
908
|
position: point,
|
|
896
909
|
schematic_trace_id: z49.string(),
|
|
897
|
-
voltage: voltage.optional()
|
|
910
|
+
voltage: voltage.optional(),
|
|
911
|
+
subcircuit_id: z49.string().optional()
|
|
898
912
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
899
913
|
expectTypesMatch(true);
|
|
900
914
|
|
|
@@ -1375,7 +1389,8 @@ var pcb_trace_error = z63.object({
|
|
|
1375
1389
|
pcb_trace_id: z63.string(),
|
|
1376
1390
|
source_trace_id: z63.string(),
|
|
1377
1391
|
pcb_component_ids: z63.array(z63.string()),
|
|
1378
|
-
pcb_port_ids: z63.array(z63.string())
|
|
1392
|
+
pcb_port_ids: z63.array(z63.string()),
|
|
1393
|
+
subcircuit_id: z63.string().optional()
|
|
1379
1394
|
}).describe("Defines a trace error on the PCB");
|
|
1380
1395
|
expectTypesMatch(true);
|
|
1381
1396
|
|
|
@@ -1386,7 +1401,8 @@ var pcb_port_not_matched_error = z64.object({
|
|
|
1386
1401
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1387
1402
|
error_type: z64.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1388
1403
|
message: z64.string(),
|
|
1389
|
-
pcb_component_ids: z64.array(z64.string())
|
|
1404
|
+
pcb_component_ids: z64.array(z64.string()),
|
|
1405
|
+
subcircuit_id: z64.string().optional()
|
|
1390
1406
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1391
1407
|
expectTypesMatch(true);
|
|
1392
1408
|
|
|
@@ -1433,7 +1449,8 @@ var pcb_placement_error = z67.object({
|
|
|
1433
1449
|
type: z67.literal("pcb_placement_error"),
|
|
1434
1450
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
1435
1451
|
error_type: z67.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
1436
|
-
message: z67.string()
|
|
1452
|
+
message: z67.string(),
|
|
1453
|
+
subcircuit_id: z67.string().optional()
|
|
1437
1454
|
}).describe("Defines a placement error on the PCB");
|
|
1438
1455
|
expectTypesMatch(true);
|
|
1439
1456
|
|
|
@@ -1444,7 +1461,8 @@ var pcb_trace_hint = z68.object({
|
|
|
1444
1461
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
1445
1462
|
pcb_port_id: z68.string(),
|
|
1446
1463
|
pcb_component_id: z68.string(),
|
|
1447
|
-
route: z68.array(route_hint_point)
|
|
1464
|
+
route: z68.array(route_hint_point),
|
|
1465
|
+
subcircuit_id: z68.string().optional()
|
|
1448
1466
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
1449
1467
|
expectTypesMatch(true);
|
|
1450
1468
|
|
|
@@ -1695,7 +1713,8 @@ var pcb_autorouting_error = z81.object({
|
|
|
1695
1713
|
type: z81.literal("pcb_autorouting_error"),
|
|
1696
1714
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
1697
1715
|
error_type: z81.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
1698
|
-
message: z81.string()
|
|
1716
|
+
message: z81.string(),
|
|
1717
|
+
subcircuit_id: z81.string().optional()
|
|
1699
1718
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
1700
1719
|
expectTypesMatch(true);
|
|
1701
1720
|
|
|
@@ -1772,7 +1791,8 @@ var pcb_thermal_spoke = z86.object({
|
|
|
1772
1791
|
spoke_thickness: distance,
|
|
1773
1792
|
spoke_inner_diameter: distance,
|
|
1774
1793
|
spoke_outer_diameter: distance,
|
|
1775
|
-
pcb_plated_hole_id: z86.string().optional()
|
|
1794
|
+
pcb_plated_hole_id: z86.string().optional(),
|
|
1795
|
+
subcircuit_id: z86.string().optional()
|
|
1776
1796
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
1777
1797
|
expectTypesMatch(true);
|
|
1778
1798
|
|
|
@@ -1787,6 +1807,7 @@ var cad_component = z87.object({
|
|
|
1787
1807
|
rotation: point3.optional(),
|
|
1788
1808
|
size: point3.optional(),
|
|
1789
1809
|
layer: layer_ref.optional(),
|
|
1810
|
+
subcircuit_id: z87.string().optional(),
|
|
1790
1811
|
// These are all ways to generate/load the 3d model
|
|
1791
1812
|
footprinter_string: z87.string().optional(),
|
|
1792
1813
|
model_obj_url: z87.string().optional(),
|