circuit-json 0.0.500 → 0.0.502
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 +21 -0
- package/dist/index.d.mts +713 -2
- package/dist/index.mjs +25 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2547,10 +2547,32 @@ var pcb_trace_route_point_through_pad = z116.object({
|
|
|
2547
2547
|
pcb_smtpad_id: z116.string().optional(),
|
|
2548
2548
|
pcb_plated_hole_id: z116.string().optional()
|
|
2549
2549
|
});
|
|
2550
|
+
var positive_width = distance.pipe(z116.number().finite().positive());
|
|
2551
|
+
var finite_route_point = point.extend({
|
|
2552
|
+
x: distance.pipe(z116.number().finite()),
|
|
2553
|
+
y: distance.pipe(z116.number().finite())
|
|
2554
|
+
});
|
|
2555
|
+
var pcb_trace_route_point_teardrop = z116.object({
|
|
2556
|
+
route_type: z116.literal("teardrop"),
|
|
2557
|
+
start: finite_route_point,
|
|
2558
|
+
end: finite_route_point,
|
|
2559
|
+
start_width: positive_width,
|
|
2560
|
+
end_width: positive_width,
|
|
2561
|
+
width_interpolation_mode: z116.enum(["linear", "smoothstep"]),
|
|
2562
|
+
layer: layer_ref,
|
|
2563
|
+
copper_pour_id: z116.string().optional(),
|
|
2564
|
+
is_inside_copper_pour: z116.boolean().optional(),
|
|
2565
|
+
start_pcb_port_id: z116.string().optional(),
|
|
2566
|
+
end_pcb_port_id: z116.string().optional()
|
|
2567
|
+
}).refine(({ start, end }) => {
|
|
2568
|
+
const length4 = Math.hypot(end.x - start.x, end.y - start.y);
|
|
2569
|
+
return Number.isFinite(length4) && length4 > 0;
|
|
2570
|
+
}, "Teardrop endpoints must define a finite, nonzero-length segment");
|
|
2550
2571
|
var pcb_trace_route_point = z116.union([
|
|
2551
2572
|
pcb_trace_route_point_wire,
|
|
2552
2573
|
pcb_trace_route_point_via,
|
|
2553
|
-
pcb_trace_route_point_through_pad
|
|
2574
|
+
pcb_trace_route_point_through_pad,
|
|
2575
|
+
pcb_trace_route_point_teardrop
|
|
2554
2576
|
]);
|
|
2555
2577
|
var pcb_trace = z116.object({
|
|
2556
2578
|
type: z116.literal("pcb_trace"),
|
|
@@ -2563,6 +2585,7 @@ var pcb_trace = z116.object({
|
|
|
2563
2585
|
route_order_index: z116.number().optional(),
|
|
2564
2586
|
should_round_corners: z116.boolean().optional(),
|
|
2565
2587
|
trace_length: z116.number().optional(),
|
|
2588
|
+
is_antenna_trace: z116.boolean().optional(),
|
|
2566
2589
|
highlight_color: z116.string().optional(),
|
|
2567
2590
|
route: z116.array(pcb_trace_route_point)
|
|
2568
2591
|
}).describe("Defines a trace on the PCB");
|
|
@@ -5086,6 +5109,7 @@ export {
|
|
|
5086
5109
|
pcb_trace_hint,
|
|
5087
5110
|
pcb_trace_missing_error,
|
|
5088
5111
|
pcb_trace_route_point,
|
|
5112
|
+
pcb_trace_route_point_teardrop,
|
|
5089
5113
|
pcb_trace_route_point_through_pad,
|
|
5090
5114
|
pcb_trace_route_point_via,
|
|
5091
5115
|
pcb_trace_route_point_wire,
|