circuit-json 0.0.157 → 0.0.159

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.mjs CHANGED
@@ -280,6 +280,18 @@ expectTypesMatch("extra props b");
280
280
  expectTypesMatch("missing props b");
281
281
  expectTypesMatch(true);
282
282
  expectTypesMatch("mismatched prop types: a");
283
+ var expectStringUnionsMatch = (shouldBe) => {
284
+ };
285
+ expectStringUnionsMatch(true);
286
+ expectStringUnionsMatch(
287
+ 'T1 has extra: "c", T2 has extra: "d"'
288
+ );
289
+ expectStringUnionsMatch('T1 has extra: "c"');
290
+ expectStringUnionsMatch('T2 has extra: "c"');
291
+ expectStringUnionsMatch(
292
+ 'T1 has extra: "d", T2 has extra: "c"'
293
+ );
294
+ expectStringUnionsMatch(true);
283
295
 
284
296
  // src/source/base/source_component_base.ts
285
297
  import { z as z7 } from "zod";
@@ -1093,6 +1105,8 @@ var pcb_trace_route_point_via = z54.object({
1093
1105
  route_type: z54.literal("via"),
1094
1106
  x: distance,
1095
1107
  y: distance,
1108
+ hole_diameter: distance.optional(),
1109
+ outer_diameter: distance.optional(),
1096
1110
  from_layer: z54.string(),
1097
1111
  to_layer: z54.string()
1098
1112
  });
@@ -1111,26 +1125,7 @@ var pcb_trace = z54.object({
1111
1125
  route_order_index: z54.number().optional(),
1112
1126
  should_round_corners: z54.boolean().optional(),
1113
1127
  trace_length: z54.number().optional(),
1114
- route: z54.array(
1115
- z54.union([
1116
- z54.object({
1117
- route_type: z54.literal("wire"),
1118
- x: distance,
1119
- y: distance,
1120
- width: distance,
1121
- start_pcb_port_id: z54.string().optional(),
1122
- end_pcb_port_id: z54.string().optional(),
1123
- layer: layer_ref
1124
- }),
1125
- z54.object({
1126
- route_type: z54.literal("via"),
1127
- x: distance,
1128
- y: distance,
1129
- from_layer: z54.string(),
1130
- to_layer: z54.string()
1131
- })
1132
- ])
1133
- )
1128
+ route: z54.array(pcb_trace_route_point)
1134
1129
  }).describe("Defines a trace on the PCB");
1135
1130
  expectTypesMatch(true);
1136
1131
  expectTypesMatch(true);
@@ -1532,6 +1527,8 @@ var any_circuit_element = z75.union([
1532
1527
  cad_component
1533
1528
  ]);
1534
1529
  var any_soup_element = any_circuit_element;
1530
+ expectTypesMatch(true);
1531
+ expectStringUnionsMatch(true);
1535
1532
  export {
1536
1533
  all_layers,
1537
1534
  any_circuit_element,