easyeda 0.0.28 → 0.0.29
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/cli/main.cjs +482 -313
- package/dist/cli/main.cjs.map +1 -1
- package/dist/lib/index.cjs +480 -311
- package/dist/lib/index.cjs.map +1 -1
- package/package.json +2 -2
package/dist/lib/index.cjs
CHANGED
|
@@ -2524,6 +2524,76 @@ var require_lib = __commonJS({
|
|
|
2524
2524
|
}
|
|
2525
2525
|
});
|
|
2526
2526
|
|
|
2527
|
+
// node_modules/nanoid/url-alphabet/index.js
|
|
2528
|
+
var urlAlphabet;
|
|
2529
|
+
var init_url_alphabet = __esm({
|
|
2530
|
+
"node_modules/nanoid/url-alphabet/index.js"() {
|
|
2531
|
+
"use strict";
|
|
2532
|
+
urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2533
|
+
}
|
|
2534
|
+
});
|
|
2535
|
+
|
|
2536
|
+
// node_modules/nanoid/index.js
|
|
2537
|
+
var nanoid_exports = {};
|
|
2538
|
+
__export(nanoid_exports, {
|
|
2539
|
+
customAlphabet: () => customAlphabet,
|
|
2540
|
+
customRandom: () => customRandom,
|
|
2541
|
+
nanoid: () => nanoid,
|
|
2542
|
+
random: () => random,
|
|
2543
|
+
urlAlphabet: () => urlAlphabet
|
|
2544
|
+
});
|
|
2545
|
+
function fillPool(bytes) {
|
|
2546
|
+
if (!pool || pool.length < bytes) {
|
|
2547
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
2548
|
+
import_node_crypto.webcrypto.getRandomValues(pool);
|
|
2549
|
+
poolOffset = 0;
|
|
2550
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
2551
|
+
import_node_crypto.webcrypto.getRandomValues(pool);
|
|
2552
|
+
poolOffset = 0;
|
|
2553
|
+
}
|
|
2554
|
+
poolOffset += bytes;
|
|
2555
|
+
}
|
|
2556
|
+
function random(bytes) {
|
|
2557
|
+
fillPool(bytes -= 0);
|
|
2558
|
+
return pool.subarray(poolOffset - bytes, poolOffset);
|
|
2559
|
+
}
|
|
2560
|
+
function customRandom(alphabet, defaultSize, getRandom) {
|
|
2561
|
+
let mask = (2 << 31 - Math.clz32(alphabet.length - 1 | 1)) - 1;
|
|
2562
|
+
let step = Math.ceil(1.6 * mask * defaultSize / alphabet.length);
|
|
2563
|
+
return (size = defaultSize) => {
|
|
2564
|
+
let id = "";
|
|
2565
|
+
while (true) {
|
|
2566
|
+
let bytes = getRandom(step);
|
|
2567
|
+
let i = step;
|
|
2568
|
+
while (i--) {
|
|
2569
|
+
id += alphabet[bytes[i] & mask] || "";
|
|
2570
|
+
if (id.length === size) return id;
|
|
2571
|
+
}
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
}
|
|
2575
|
+
function customAlphabet(alphabet, size = 21) {
|
|
2576
|
+
return customRandom(alphabet, size, random);
|
|
2577
|
+
}
|
|
2578
|
+
function nanoid(size = 21) {
|
|
2579
|
+
fillPool(size -= 0);
|
|
2580
|
+
let id = "";
|
|
2581
|
+
for (let i = poolOffset - size; i < poolOffset; i++) {
|
|
2582
|
+
id += urlAlphabet[pool[i] & 63];
|
|
2583
|
+
}
|
|
2584
|
+
return id;
|
|
2585
|
+
}
|
|
2586
|
+
var import_node_crypto, POOL_SIZE_MULTIPLIER, pool, poolOffset;
|
|
2587
|
+
var init_nanoid = __esm({
|
|
2588
|
+
"node_modules/nanoid/index.js"() {
|
|
2589
|
+
"use strict";
|
|
2590
|
+
import_node_crypto = require("crypto");
|
|
2591
|
+
init_url_alphabet();
|
|
2592
|
+
init_url_alphabet();
|
|
2593
|
+
POOL_SIZE_MULTIPLIER = 128;
|
|
2594
|
+
}
|
|
2595
|
+
});
|
|
2596
|
+
|
|
2527
2597
|
// node_modules/@tscircuit/soup/dist/index.js
|
|
2528
2598
|
var require_dist = __commonJS({
|
|
2529
2599
|
"node_modules/@tscircuit/soup/dist/index.js"(exports2, module2) {
|
|
@@ -2558,6 +2628,7 @@ var require_dist = __commonJS({
|
|
|
2558
2628
|
var src_exports = {};
|
|
2559
2629
|
__export2(src_exports, {
|
|
2560
2630
|
all_layers: () => all_layers,
|
|
2631
|
+
any_circuit_element: () => any_circuit_element,
|
|
2561
2632
|
any_soup_element: () => any_soup_element,
|
|
2562
2633
|
any_source_component: () => any_source_component2,
|
|
2563
2634
|
cad_component: () => cad_component2,
|
|
@@ -2573,6 +2644,7 @@ var require_dist = __commonJS({
|
|
|
2573
2644
|
pcb_fabrication_note_path: () => pcb_fabrication_note_path,
|
|
2574
2645
|
pcb_fabrication_note_text: () => pcb_fabrication_note_text,
|
|
2575
2646
|
pcb_hole: () => pcb_hole,
|
|
2647
|
+
pcb_keepout: () => pcb_keepout,
|
|
2576
2648
|
pcb_placement_error: () => pcb_placement_error,
|
|
2577
2649
|
pcb_plated_hole: () => pcb_plated_hole2,
|
|
2578
2650
|
pcb_port: () => pcb_port,
|
|
@@ -2581,6 +2653,7 @@ var require_dist = __commonJS({
|
|
|
2581
2653
|
pcb_route_hints: () => pcb_route_hints,
|
|
2582
2654
|
pcb_silkscreen_circle: () => pcb_silkscreen_circle,
|
|
2583
2655
|
pcb_silkscreen_line: () => pcb_silkscreen_line,
|
|
2656
|
+
pcb_silkscreen_oval: () => pcb_silkscreen_oval,
|
|
2584
2657
|
pcb_silkscreen_path: () => pcb_silkscreen_path2,
|
|
2585
2658
|
pcb_silkscreen_rect: () => pcb_silkscreen_rect,
|
|
2586
2659
|
pcb_silkscreen_text: () => pcb_silkscreen_text,
|
|
@@ -2603,6 +2676,7 @@ var require_dist = __commonJS({
|
|
|
2603
2676
|
schematic_line: () => schematic_line,
|
|
2604
2677
|
schematic_net_label: () => schematic_net_label,
|
|
2605
2678
|
schematic_path: () => schematic_path,
|
|
2679
|
+
schematic_pin_styles: () => schematic_pin_styles,
|
|
2606
2680
|
schematic_port: () => schematic_port,
|
|
2607
2681
|
schematic_text: () => schematic_text,
|
|
2608
2682
|
schematic_trace: () => schematic_trace,
|
|
@@ -2614,6 +2688,7 @@ var require_dist = __commonJS({
|
|
|
2614
2688
|
source_port: () => source_port,
|
|
2615
2689
|
source_simple_bug: () => source_simple_bug,
|
|
2616
2690
|
source_simple_capacitor: () => source_simple_capacitor,
|
|
2691
|
+
source_simple_chip: () => source_simple_chip,
|
|
2617
2692
|
source_simple_diode: () => source_simple_diode,
|
|
2618
2693
|
source_simple_ground: () => source_simple_ground,
|
|
2619
2694
|
source_simple_power_source: () => source_simple_power_source,
|
|
@@ -2719,7 +2794,17 @@ var require_dist = __commonJS({
|
|
|
2719
2794
|
var distance = length;
|
|
2720
2795
|
var current = import_zod6.z.string().or(import_zod6.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
2721
2796
|
var time = import_zod6.z.string().or(import_zod6.z.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
2722
|
-
var rotation = import_zod6.z.string().or(import_zod6.z.number()).transform((
|
|
2797
|
+
var rotation = import_zod6.z.string().or(import_zod6.z.number()).transform((arg) => {
|
|
2798
|
+
if (typeof arg === "number")
|
|
2799
|
+
return arg;
|
|
2800
|
+
if (arg.endsWith("deg")) {
|
|
2801
|
+
return Number.parseFloat(arg.split("deg")[0]);
|
|
2802
|
+
}
|
|
2803
|
+
if (arg.endsWith("rad")) {
|
|
2804
|
+
return Number.parseFloat(arg.split("rad")[0]) * 180 / Math.PI;
|
|
2805
|
+
}
|
|
2806
|
+
return Number.parseFloat(arg);
|
|
2807
|
+
});
|
|
2723
2808
|
var import_zod22 = require("zod");
|
|
2724
2809
|
var point = import_zod22.z.object({
|
|
2725
2810
|
x: distance,
|
|
@@ -2754,7 +2839,7 @@ var require_dist = __commonJS({
|
|
|
2754
2839
|
ftype: import_zod62.z.string().optional(),
|
|
2755
2840
|
source_component_id: import_zod62.z.string(),
|
|
2756
2841
|
name: import_zod62.z.string(),
|
|
2757
|
-
|
|
2842
|
+
manufacturer_part_number: import_zod62.z.string().optional(),
|
|
2758
2843
|
supplier_part_numbers: import_zod62.z.record(supplier_name, import_zod62.z.array(import_zod62.z.string())).optional()
|
|
2759
2844
|
});
|
|
2760
2845
|
var source_simple_capacitor = source_component_base.extend({
|
|
@@ -2777,187 +2862,203 @@ var require_dist = __commonJS({
|
|
|
2777
2862
|
var import_zod11 = require("zod");
|
|
2778
2863
|
var source_simple_bug = source_component_base.extend({
|
|
2779
2864
|
ftype: import_zod11.z.literal("simple_bug")
|
|
2780
|
-
});
|
|
2865
|
+
}).describe("@deprecated");
|
|
2781
2866
|
var import_zod12 = require("zod");
|
|
2867
|
+
var source_simple_chip = source_component_base.extend({
|
|
2868
|
+
ftype: import_zod12.z.literal("simple_chip")
|
|
2869
|
+
});
|
|
2870
|
+
var import_zod13 = require("zod");
|
|
2782
2871
|
var source_simple_inductor = source_component_base.extend({
|
|
2783
|
-
ftype:
|
|
2872
|
+
ftype: import_zod13.z.literal("simple_inductor"),
|
|
2784
2873
|
inductance
|
|
2785
2874
|
});
|
|
2786
|
-
var
|
|
2875
|
+
var import_zod14 = require("zod");
|
|
2787
2876
|
var source_led = source_simple_diode.extend({
|
|
2788
|
-
ftype:
|
|
2877
|
+
ftype: import_zod14.z.literal("led")
|
|
2789
2878
|
});
|
|
2790
|
-
var
|
|
2879
|
+
var import_zod15 = require("zod");
|
|
2791
2880
|
var source_simple_power_source = source_component_base.extend({
|
|
2792
|
-
ftype:
|
|
2881
|
+
ftype: import_zod15.z.literal("simple_power_source"),
|
|
2793
2882
|
voltage
|
|
2794
2883
|
});
|
|
2795
|
-
var
|
|
2796
|
-
var any_source_component2 =
|
|
2884
|
+
var import_zod16 = require("zod");
|
|
2885
|
+
var any_source_component2 = import_zod16.z.union([
|
|
2797
2886
|
source_simple_resistor,
|
|
2798
2887
|
source_simple_capacitor,
|
|
2799
2888
|
source_simple_diode,
|
|
2800
2889
|
source_simple_ground,
|
|
2890
|
+
source_simple_chip,
|
|
2801
2891
|
source_simple_bug,
|
|
2802
2892
|
source_led,
|
|
2803
2893
|
source_simple_power_source
|
|
2804
2894
|
]);
|
|
2805
|
-
var import_zod16 = require("zod");
|
|
2806
|
-
var source_port = import_zod16.z.object({
|
|
2807
|
-
type: import_zod16.z.literal("source_port"),
|
|
2808
|
-
pin_number: import_zod16.z.number().optional(),
|
|
2809
|
-
port_hints: import_zod16.z.array(import_zod16.z.string()).optional(),
|
|
2810
|
-
name: import_zod16.z.string(),
|
|
2811
|
-
source_port_id: import_zod16.z.string(),
|
|
2812
|
-
source_component_id: import_zod16.z.string()
|
|
2813
|
-
});
|
|
2814
2895
|
var import_zod17 = require("zod");
|
|
2815
|
-
var
|
|
2816
|
-
type: import_zod17.z.literal("
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2896
|
+
var source_port = import_zod17.z.object({
|
|
2897
|
+
type: import_zod17.z.literal("source_port"),
|
|
2898
|
+
pin_number: import_zod17.z.number().optional(),
|
|
2899
|
+
port_hints: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2900
|
+
name: import_zod17.z.string(),
|
|
2901
|
+
source_port_id: import_zod17.z.string(),
|
|
2902
|
+
source_component_id: import_zod17.z.string()
|
|
2820
2903
|
});
|
|
2821
2904
|
var import_zod18 = require("zod");
|
|
2822
|
-
var
|
|
2823
|
-
type: import_zod18.z.literal("
|
|
2824
|
-
|
|
2825
|
-
|
|
2905
|
+
var source_trace = import_zod18.z.object({
|
|
2906
|
+
type: import_zod18.z.literal("source_trace"),
|
|
2907
|
+
source_trace_id: import_zod18.z.string(),
|
|
2908
|
+
connected_source_port_ids: import_zod18.z.array(import_zod18.z.string()),
|
|
2909
|
+
connected_source_net_ids: import_zod18.z.array(import_zod18.z.string())
|
|
2826
2910
|
});
|
|
2827
2911
|
var import_zod19 = require("zod");
|
|
2828
|
-
var
|
|
2829
|
-
type: import_zod19.z.literal("
|
|
2830
|
-
|
|
2831
|
-
name: import_zod19.z.string()
|
|
2832
|
-
member_source_group_ids: import_zod19.z.array(import_zod19.z.string()),
|
|
2833
|
-
is_power: import_zod19.z.boolean().optional(),
|
|
2834
|
-
is_ground: import_zod19.z.boolean().optional(),
|
|
2835
|
-
is_digital_signal: import_zod19.z.boolean().optional(),
|
|
2836
|
-
is_analog_signal: import_zod19.z.boolean().optional()
|
|
2912
|
+
var source_group = import_zod19.z.object({
|
|
2913
|
+
type: import_zod19.z.literal("source_group"),
|
|
2914
|
+
source_group_id: import_zod19.z.string(),
|
|
2915
|
+
name: import_zod19.z.string().optional()
|
|
2837
2916
|
});
|
|
2838
2917
|
var import_zod20 = require("zod");
|
|
2839
|
-
var
|
|
2840
|
-
type: import_zod20.z.literal("
|
|
2841
|
-
|
|
2918
|
+
var source_net = import_zod20.z.object({
|
|
2919
|
+
type: import_zod20.z.literal("source_net"),
|
|
2920
|
+
source_net_id: import_zod20.z.string(),
|
|
2921
|
+
name: import_zod20.z.string(),
|
|
2922
|
+
member_source_group_ids: import_zod20.z.array(import_zod20.z.string()),
|
|
2923
|
+
is_power: import_zod20.z.boolean().optional(),
|
|
2924
|
+
is_ground: import_zod20.z.boolean().optional(),
|
|
2925
|
+
is_digital_signal: import_zod20.z.boolean().optional(),
|
|
2926
|
+
is_analog_signal: import_zod20.z.boolean().optional(),
|
|
2927
|
+
trace_width: import_zod20.z.number().optional()
|
|
2928
|
+
});
|
|
2929
|
+
var import_zod21 = require("zod");
|
|
2930
|
+
var schematic_box = import_zod21.z.object({
|
|
2931
|
+
type: import_zod21.z.literal("schematic_box"),
|
|
2932
|
+
schematic_component_id: import_zod21.z.string(),
|
|
2842
2933
|
width: distance,
|
|
2843
2934
|
height: distance,
|
|
2844
2935
|
x: distance,
|
|
2845
2936
|
y: distance
|
|
2846
2937
|
}).describe("Draws a box on the schematic");
|
|
2847
|
-
var import_zod21 = require("zod");
|
|
2848
|
-
var schematic_path = import_zod21.z.object({
|
|
2849
|
-
type: import_zod21.z.literal("schematic_path"),
|
|
2850
|
-
schematic_component_id: import_zod21.z.string(),
|
|
2851
|
-
fill_color: import_zod21.z.enum(["red", "blue"]).optional(),
|
|
2852
|
-
is_filled: import_zod21.z.boolean().optional(),
|
|
2853
|
-
points: import_zod21.z.array(point)
|
|
2854
|
-
});
|
|
2855
2938
|
var import_zod222 = require("zod");
|
|
2856
|
-
var
|
|
2857
|
-
type: import_zod222.z.literal("
|
|
2939
|
+
var schematic_path = import_zod222.z.object({
|
|
2940
|
+
type: import_zod222.z.literal("schematic_path"),
|
|
2941
|
+
schematic_component_id: import_zod222.z.string(),
|
|
2942
|
+
fill_color: import_zod222.z.enum(["red", "blue"]).optional(),
|
|
2943
|
+
is_filled: import_zod222.z.boolean().optional(),
|
|
2944
|
+
points: import_zod222.z.array(point)
|
|
2945
|
+
});
|
|
2946
|
+
var import_zod23 = require("zod");
|
|
2947
|
+
var schematic_pin_styles = import_zod23.z.record(
|
|
2948
|
+
import_zod23.z.object({
|
|
2949
|
+
left_margin: length.optional(),
|
|
2950
|
+
right_margin: length.optional(),
|
|
2951
|
+
top_margin: length.optional(),
|
|
2952
|
+
bottom_margin: length.optional()
|
|
2953
|
+
})
|
|
2954
|
+
);
|
|
2955
|
+
var schematic_component = import_zod23.z.object({
|
|
2956
|
+
type: import_zod23.z.literal("schematic_component"),
|
|
2858
2957
|
rotation: rotation.default(0),
|
|
2859
2958
|
size,
|
|
2860
2959
|
center: point,
|
|
2861
|
-
source_component_id:
|
|
2862
|
-
schematic_component_id:
|
|
2960
|
+
source_component_id: import_zod23.z.string(),
|
|
2961
|
+
schematic_component_id: import_zod23.z.string(),
|
|
2863
2962
|
pin_spacing: length.optional(),
|
|
2963
|
+
pin_styles: schematic_pin_styles.optional(),
|
|
2864
2964
|
box_width: length.optional(),
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2965
|
+
symbol_name: import_zod23.z.string().optional(),
|
|
2966
|
+
port_arrangement: import_zod23.z.union([
|
|
2967
|
+
import_zod23.z.object({
|
|
2968
|
+
left_size: import_zod23.z.number(),
|
|
2969
|
+
right_size: import_zod23.z.number(),
|
|
2970
|
+
top_size: import_zod23.z.number().optional(),
|
|
2971
|
+
bottom_size: import_zod23.z.number().optional()
|
|
2871
2972
|
}),
|
|
2872
|
-
|
|
2873
|
-
left_side:
|
|
2874
|
-
pins:
|
|
2875
|
-
direction:
|
|
2973
|
+
import_zod23.z.object({
|
|
2974
|
+
left_side: import_zod23.z.object({
|
|
2975
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
2976
|
+
direction: import_zod23.z.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
2876
2977
|
}).optional(),
|
|
2877
|
-
right_side:
|
|
2878
|
-
pins:
|
|
2879
|
-
direction:
|
|
2978
|
+
right_side: import_zod23.z.object({
|
|
2979
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
2980
|
+
direction: import_zod23.z.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
2880
2981
|
}).optional(),
|
|
2881
|
-
top_side:
|
|
2882
|
-
pins:
|
|
2883
|
-
direction:
|
|
2982
|
+
top_side: import_zod23.z.object({
|
|
2983
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
2984
|
+
direction: import_zod23.z.enum(["left-to-right", "right-to-left"]).optional()
|
|
2884
2985
|
}).optional(),
|
|
2885
|
-
bottom_side:
|
|
2886
|
-
pins:
|
|
2887
|
-
direction:
|
|
2986
|
+
bottom_side: import_zod23.z.object({
|
|
2987
|
+
pins: import_zod23.z.array(import_zod23.z.number()),
|
|
2988
|
+
direction: import_zod23.z.enum(["left-to-right", "right-to-left"]).optional()
|
|
2888
2989
|
}).optional()
|
|
2889
2990
|
})
|
|
2890
2991
|
]).optional(),
|
|
2891
|
-
port_labels:
|
|
2992
|
+
port_labels: import_zod23.z.record(import_zod23.z.string()).optional()
|
|
2892
2993
|
});
|
|
2893
|
-
var
|
|
2894
|
-
var schematic_line =
|
|
2895
|
-
type:
|
|
2896
|
-
schematic_component_id:
|
|
2994
|
+
var import_zod24 = require("zod");
|
|
2995
|
+
var schematic_line = import_zod24.z.object({
|
|
2996
|
+
type: import_zod24.z.literal("schematic_line"),
|
|
2997
|
+
schematic_component_id: import_zod24.z.string(),
|
|
2897
2998
|
x1: distance,
|
|
2898
2999
|
x2: distance,
|
|
2899
3000
|
y1: distance,
|
|
2900
3001
|
y2: distance
|
|
2901
3002
|
});
|
|
2902
|
-
var
|
|
2903
|
-
var schematic_trace =
|
|
2904
|
-
type:
|
|
2905
|
-
schematic_trace_id:
|
|
2906
|
-
source_trace_id:
|
|
2907
|
-
edges:
|
|
2908
|
-
|
|
2909
|
-
from:
|
|
2910
|
-
x:
|
|
2911
|
-
y:
|
|
3003
|
+
var import_zod25 = require("zod");
|
|
3004
|
+
var schematic_trace = import_zod25.z.object({
|
|
3005
|
+
type: import_zod25.z.literal("schematic_trace"),
|
|
3006
|
+
schematic_trace_id: import_zod25.z.string(),
|
|
3007
|
+
source_trace_id: import_zod25.z.string(),
|
|
3008
|
+
edges: import_zod25.z.array(
|
|
3009
|
+
import_zod25.z.object({
|
|
3010
|
+
from: import_zod25.z.object({
|
|
3011
|
+
x: import_zod25.z.number(),
|
|
3012
|
+
y: import_zod25.z.number()
|
|
2912
3013
|
}),
|
|
2913
|
-
to:
|
|
2914
|
-
x:
|
|
2915
|
-
y:
|
|
3014
|
+
to: import_zod25.z.object({
|
|
3015
|
+
x: import_zod25.z.number(),
|
|
3016
|
+
y: import_zod25.z.number()
|
|
2916
3017
|
}),
|
|
2917
|
-
from_schematic_port_id:
|
|
2918
|
-
to_schematic_port_id:
|
|
3018
|
+
from_schematic_port_id: import_zod25.z.string().optional(),
|
|
3019
|
+
to_schematic_port_id: import_zod25.z.string().optional()
|
|
2919
3020
|
})
|
|
2920
3021
|
)
|
|
2921
3022
|
});
|
|
2922
|
-
var
|
|
2923
|
-
var schematic_text =
|
|
2924
|
-
type:
|
|
2925
|
-
schematic_component_id:
|
|
2926
|
-
schematic_text_id:
|
|
2927
|
-
text:
|
|
2928
|
-
position:
|
|
3023
|
+
var import_zod26 = require("zod");
|
|
3024
|
+
var schematic_text = import_zod26.z.object({
|
|
3025
|
+
type: import_zod26.z.literal("schematic_text"),
|
|
3026
|
+
schematic_component_id: import_zod26.z.string(),
|
|
3027
|
+
schematic_text_id: import_zod26.z.string(),
|
|
3028
|
+
text: import_zod26.z.string(),
|
|
3029
|
+
position: import_zod26.z.object({
|
|
2929
3030
|
x: distance,
|
|
2930
3031
|
y: distance
|
|
2931
3032
|
}),
|
|
2932
|
-
rotation:
|
|
2933
|
-
anchor:
|
|
3033
|
+
rotation: import_zod26.z.number().default(0),
|
|
3034
|
+
anchor: import_zod26.z.enum(["center", "left", "right", "top", "bottom"]).default("center")
|
|
2934
3035
|
});
|
|
2935
|
-
var
|
|
2936
|
-
var schematic_port =
|
|
2937
|
-
type:
|
|
2938
|
-
schematic_port_id:
|
|
2939
|
-
source_port_id:
|
|
2940
|
-
schematic_component_id:
|
|
3036
|
+
var import_zod27 = require("zod");
|
|
3037
|
+
var schematic_port = import_zod27.z.object({
|
|
3038
|
+
type: import_zod27.z.literal("schematic_port"),
|
|
3039
|
+
schematic_port_id: import_zod27.z.string(),
|
|
3040
|
+
source_port_id: import_zod27.z.string(),
|
|
3041
|
+
schematic_component_id: import_zod27.z.string().optional(),
|
|
2941
3042
|
center: point,
|
|
2942
|
-
facing_direction:
|
|
3043
|
+
facing_direction: import_zod27.z.enum(["up", "down", "left", "right"]).optional()
|
|
2943
3044
|
}).describe("Defines a port on a schematic component");
|
|
2944
|
-
var
|
|
2945
|
-
var schematic_net_label =
|
|
2946
|
-
type:
|
|
2947
|
-
source_net_id:
|
|
3045
|
+
var import_zod28 = require("zod");
|
|
3046
|
+
var schematic_net_label = import_zod28.z.object({
|
|
3047
|
+
type: import_zod28.z.literal("schematic_net_label"),
|
|
3048
|
+
source_net_id: import_zod28.z.string(),
|
|
2948
3049
|
center: point,
|
|
2949
|
-
anchor_side:
|
|
2950
|
-
text:
|
|
3050
|
+
anchor_side: import_zod28.z.enum(["top", "bottom", "left", "right"]),
|
|
3051
|
+
text: import_zod28.z.string()
|
|
2951
3052
|
});
|
|
2952
|
-
var
|
|
2953
|
-
var schematic_error =
|
|
2954
|
-
schematic_error_id:
|
|
2955
|
-
type:
|
|
3053
|
+
var import_zod29 = require("zod");
|
|
3054
|
+
var schematic_error = import_zod29.z.object({
|
|
3055
|
+
schematic_error_id: import_zod29.z.string(),
|
|
3056
|
+
type: import_zod29.z.literal("schematic_error"),
|
|
2956
3057
|
// eventually each error type should be broken out into a dir of files
|
|
2957
|
-
error_type:
|
|
2958
|
-
message:
|
|
3058
|
+
error_type: import_zod29.z.literal("schematic_port_not_found"),
|
|
3059
|
+
message: import_zod29.z.string()
|
|
2959
3060
|
}).describe("Defines a schematic error on the schematic");
|
|
2960
|
-
var
|
|
3061
|
+
var import_zod30 = require("zod");
|
|
2961
3062
|
var all_layers = [
|
|
2962
3063
|
"top",
|
|
2963
3064
|
"bottom",
|
|
@@ -2968,9 +3069,9 @@ var require_dist = __commonJS({
|
|
|
2968
3069
|
"inner5",
|
|
2969
3070
|
"inner6"
|
|
2970
3071
|
];
|
|
2971
|
-
var layer_string =
|
|
3072
|
+
var layer_string = import_zod30.z.enum(all_layers);
|
|
2972
3073
|
var layer_ref = layer_string.or(
|
|
2973
|
-
|
|
3074
|
+
import_zod30.z.object({
|
|
2974
3075
|
name: layer_string
|
|
2975
3076
|
})
|
|
2976
3077
|
).transform((layer) => {
|
|
@@ -2979,176 +3080,196 @@ var require_dist = __commonJS({
|
|
|
2979
3080
|
}
|
|
2980
3081
|
return layer.name;
|
|
2981
3082
|
});
|
|
2982
|
-
var visible_layer =
|
|
2983
|
-
var
|
|
2984
|
-
var pcb_route_hint =
|
|
3083
|
+
var visible_layer = import_zod30.z.enum(["top", "bottom"]);
|
|
3084
|
+
var import_zod31 = require("zod");
|
|
3085
|
+
var pcb_route_hint = import_zod31.z.object({
|
|
2985
3086
|
x: distance,
|
|
2986
3087
|
y: distance,
|
|
2987
|
-
via:
|
|
3088
|
+
via: import_zod31.z.boolean().optional(),
|
|
2988
3089
|
via_to_layer: layer_ref.optional()
|
|
2989
3090
|
});
|
|
2990
|
-
var pcb_route_hints =
|
|
2991
|
-
var
|
|
2992
|
-
var route_hint_point =
|
|
3091
|
+
var pcb_route_hints = import_zod31.z.array(pcb_route_hint);
|
|
3092
|
+
var import_zod322 = require("zod");
|
|
3093
|
+
var route_hint_point = import_zod322.z.object({
|
|
2993
3094
|
x: distance,
|
|
2994
3095
|
y: distance,
|
|
2995
|
-
via:
|
|
2996
|
-
to_layer: layer_ref.optional()
|
|
3096
|
+
via: import_zod322.z.boolean().optional(),
|
|
3097
|
+
to_layer: layer_ref.optional(),
|
|
3098
|
+
trace_width: distance.optional()
|
|
2997
3099
|
});
|
|
2998
|
-
var
|
|
2999
|
-
var
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3100
|
+
var import_zod34 = require("zod");
|
|
3101
|
+
var import_zod33 = require("zod");
|
|
3102
|
+
var import_nanoid = (init_nanoid(), __toCommonJS(nanoid_exports));
|
|
3103
|
+
var getZodPrefixedIdWithDefault = (prefix) => {
|
|
3104
|
+
return import_zod33.z.string().optional().default(() => `${prefix}_${(0, import_nanoid.nanoid)(10)}`);
|
|
3105
|
+
};
|
|
3106
|
+
var expectTypesMatch = (shouldBe) => {
|
|
3107
|
+
};
|
|
3108
|
+
var pcb_component2 = import_zod34.z.object({
|
|
3109
|
+
type: import_zod34.z.literal("pcb_component"),
|
|
3110
|
+
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
3111
|
+
source_component_id: import_zod34.z.string(),
|
|
3003
3112
|
center: point,
|
|
3004
3113
|
layer: layer_ref,
|
|
3005
3114
|
rotation,
|
|
3006
3115
|
width: length,
|
|
3007
3116
|
height: length
|
|
3008
3117
|
}).describe("Defines a component on the PCB");
|
|
3009
|
-
|
|
3010
|
-
var
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3118
|
+
expectTypesMatch(true);
|
|
3119
|
+
var import_zod35 = require("zod");
|
|
3120
|
+
var pcb_hole = import_zod35.z.object({
|
|
3121
|
+
pcb_hole_id: import_zod35.z.string(),
|
|
3122
|
+
type: import_zod35.z.literal("pcb_hole"),
|
|
3123
|
+
hole_shape: import_zod35.z.enum(["circle", "square", "round"]).default("circle").transform((shape) => {
|
|
3124
|
+
if (shape === "round")
|
|
3125
|
+
return "circle";
|
|
3126
|
+
return shape;
|
|
3127
|
+
}),
|
|
3128
|
+
hole_diameter: import_zod35.z.number(),
|
|
3014
3129
|
x: distance,
|
|
3015
3130
|
y: distance
|
|
3016
3131
|
}).or(
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3132
|
+
import_zod35.z.object({
|
|
3133
|
+
pcb_hole_id: import_zod35.z.string(),
|
|
3134
|
+
type: import_zod35.z.literal("pcb_hole"),
|
|
3135
|
+
hole_shape: import_zod35.z.literal("oval"),
|
|
3136
|
+
hole_width: import_zod35.z.number(),
|
|
3137
|
+
hole_height: import_zod35.z.number(),
|
|
3022
3138
|
x: distance,
|
|
3023
3139
|
y: distance
|
|
3024
3140
|
})
|
|
3025
3141
|
).describe("Defines a hole on the PCB");
|
|
3026
|
-
var
|
|
3027
|
-
var pcb_plated_hole2 =
|
|
3028
|
-
type:
|
|
3029
|
-
shape:
|
|
3030
|
-
outer_diameter:
|
|
3031
|
-
hole_diameter:
|
|
3142
|
+
var import_zod36 = require("zod");
|
|
3143
|
+
var pcb_plated_hole2 = import_zod36.z.object({
|
|
3144
|
+
type: import_zod36.z.literal("pcb_plated_hole"),
|
|
3145
|
+
shape: import_zod36.z.literal("circle"),
|
|
3146
|
+
outer_diameter: import_zod36.z.number(),
|
|
3147
|
+
hole_diameter: import_zod36.z.number(),
|
|
3032
3148
|
x: distance,
|
|
3033
3149
|
y: distance,
|
|
3034
|
-
layers:
|
|
3035
|
-
port_hints:
|
|
3036
|
-
pcb_component_id:
|
|
3037
|
-
pcb_port_id:
|
|
3150
|
+
layers: import_zod36.z.array(layer_ref),
|
|
3151
|
+
port_hints: import_zod36.z.array(import_zod36.z.string()).optional(),
|
|
3152
|
+
pcb_component_id: import_zod36.z.string().optional(),
|
|
3153
|
+
pcb_port_id: import_zod36.z.string().optional(),
|
|
3154
|
+
pcb_plated_hole_id: import_zod36.z.string()
|
|
3038
3155
|
}).or(
|
|
3039
|
-
|
|
3040
|
-
type:
|
|
3041
|
-
shape:
|
|
3042
|
-
outer_width:
|
|
3043
|
-
outer_height:
|
|
3044
|
-
hole_width:
|
|
3045
|
-
hole_height:
|
|
3156
|
+
import_zod36.z.object({
|
|
3157
|
+
type: import_zod36.z.literal("pcb_plated_hole"),
|
|
3158
|
+
shape: import_zod36.z.enum(["oval", "pill"]),
|
|
3159
|
+
outer_width: import_zod36.z.number(),
|
|
3160
|
+
outer_height: import_zod36.z.number(),
|
|
3161
|
+
hole_width: import_zod36.z.number(),
|
|
3162
|
+
hole_height: import_zod36.z.number(),
|
|
3046
3163
|
x: distance,
|
|
3047
3164
|
y: distance,
|
|
3048
|
-
layers:
|
|
3049
|
-
port_hints:
|
|
3050
|
-
pcb_component_id:
|
|
3051
|
-
pcb_port_id:
|
|
3165
|
+
layers: import_zod36.z.array(layer_ref),
|
|
3166
|
+
port_hints: import_zod36.z.array(import_zod36.z.string()).optional(),
|
|
3167
|
+
pcb_component_id: import_zod36.z.string().optional(),
|
|
3168
|
+
pcb_port_id: import_zod36.z.string().optional(),
|
|
3169
|
+
pcb_plated_hole_id: import_zod36.z.string()
|
|
3052
3170
|
})
|
|
3053
3171
|
).describe("Defines a plated hole on the PCB");
|
|
3054
|
-
var
|
|
3055
|
-
var pcb_port =
|
|
3056
|
-
type:
|
|
3057
|
-
pcb_port_id:
|
|
3058
|
-
source_port_id:
|
|
3059
|
-
pcb_component_id:
|
|
3172
|
+
var import_zod37 = require("zod");
|
|
3173
|
+
var pcb_port = import_zod37.z.object({
|
|
3174
|
+
type: import_zod37.z.literal("pcb_port"),
|
|
3175
|
+
pcb_port_id: import_zod37.z.string(),
|
|
3176
|
+
source_port_id: import_zod37.z.string(),
|
|
3177
|
+
pcb_component_id: import_zod37.z.string(),
|
|
3060
3178
|
x: distance,
|
|
3061
3179
|
y: distance,
|
|
3062
|
-
layers:
|
|
3180
|
+
layers: import_zod37.z.array(layer_ref)
|
|
3063
3181
|
}).describe("Defines a port on the PCB");
|
|
3064
|
-
var
|
|
3065
|
-
var pcb_smtpad2 =
|
|
3066
|
-
|
|
3067
|
-
pcb_smtpad_id:
|
|
3068
|
-
type:
|
|
3069
|
-
shape:
|
|
3182
|
+
var import_zod38 = require("zod");
|
|
3183
|
+
var pcb_smtpad2 = import_zod38.z.union([
|
|
3184
|
+
import_zod38.z.object({
|
|
3185
|
+
pcb_smtpad_id: import_zod38.z.string(),
|
|
3186
|
+
type: import_zod38.z.literal("pcb_smtpad"),
|
|
3187
|
+
shape: import_zod38.z.literal("circle"),
|
|
3070
3188
|
x: distance,
|
|
3071
3189
|
y: distance,
|
|
3072
|
-
radius:
|
|
3190
|
+
radius: import_zod38.z.number(),
|
|
3073
3191
|
layer: layer_ref,
|
|
3074
|
-
port_hints:
|
|
3075
|
-
pcb_component_id:
|
|
3076
|
-
pcb_port_id:
|
|
3192
|
+
port_hints: import_zod38.z.array(import_zod38.z.string()).optional(),
|
|
3193
|
+
pcb_component_id: import_zod38.z.string().optional(),
|
|
3194
|
+
pcb_port_id: import_zod38.z.string().optional()
|
|
3077
3195
|
}),
|
|
3078
|
-
|
|
3079
|
-
pcb_smtpad_id:
|
|
3080
|
-
type:
|
|
3081
|
-
shape:
|
|
3196
|
+
import_zod38.z.object({
|
|
3197
|
+
pcb_smtpad_id: import_zod38.z.string(),
|
|
3198
|
+
type: import_zod38.z.literal("pcb_smtpad"),
|
|
3199
|
+
shape: import_zod38.z.literal("rect"),
|
|
3082
3200
|
x: distance,
|
|
3083
3201
|
y: distance,
|
|
3084
|
-
width:
|
|
3085
|
-
height:
|
|
3202
|
+
width: import_zod38.z.number(),
|
|
3203
|
+
height: import_zod38.z.number(),
|
|
3086
3204
|
layer: layer_ref,
|
|
3087
|
-
port_hints:
|
|
3088
|
-
pcb_component_id:
|
|
3089
|
-
pcb_port_id:
|
|
3205
|
+
port_hints: import_zod38.z.array(import_zod38.z.string()).optional(),
|
|
3206
|
+
pcb_component_id: import_zod38.z.string().optional(),
|
|
3207
|
+
pcb_port_id: import_zod38.z.string().optional()
|
|
3090
3208
|
})
|
|
3091
3209
|
]).describe("Defines an SMT pad on the PCB");
|
|
3092
|
-
var
|
|
3093
|
-
var pcb_text =
|
|
3094
|
-
type:
|
|
3095
|
-
text:
|
|
3210
|
+
var import_zod39 = require("zod");
|
|
3211
|
+
var pcb_text = import_zod39.z.object({
|
|
3212
|
+
type: import_zod39.z.literal("pcb_text"),
|
|
3213
|
+
text: import_zod39.z.string(),
|
|
3096
3214
|
x: distance,
|
|
3097
3215
|
y: distance,
|
|
3098
|
-
align:
|
|
3216
|
+
align: import_zod39.z.enum(["bottom-left"]),
|
|
3099
3217
|
width: distance,
|
|
3100
3218
|
height: distance,
|
|
3101
|
-
lines:
|
|
3219
|
+
lines: import_zod39.z.number()
|
|
3102
3220
|
}).describe("Defines text on the PCB");
|
|
3103
|
-
var
|
|
3104
|
-
var pcb_trace =
|
|
3105
|
-
type:
|
|
3106
|
-
source_trace_id:
|
|
3107
|
-
pcb_component_id:
|
|
3108
|
-
pcb_trace_id:
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3221
|
+
var import_zod40 = require("zod");
|
|
3222
|
+
var pcb_trace = import_zod40.z.object({
|
|
3223
|
+
type: import_zod40.z.literal("pcb_trace"),
|
|
3224
|
+
source_trace_id: import_zod40.z.string().optional(),
|
|
3225
|
+
pcb_component_id: import_zod40.z.string().optional(),
|
|
3226
|
+
pcb_trace_id: import_zod40.z.string(),
|
|
3227
|
+
route_thickness_mode: import_zod40.z.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
3228
|
+
should_round_corners: import_zod40.z.boolean().optional(),
|
|
3229
|
+
route: import_zod40.z.array(
|
|
3230
|
+
import_zod40.z.union([
|
|
3231
|
+
import_zod40.z.object({
|
|
3232
|
+
route_type: import_zod40.z.literal("wire"),
|
|
3113
3233
|
x: distance,
|
|
3114
3234
|
y: distance,
|
|
3115
3235
|
width: distance,
|
|
3116
|
-
start_pcb_port_id:
|
|
3117
|
-
end_pcb_port_id:
|
|
3118
|
-
layer:
|
|
3236
|
+
start_pcb_port_id: import_zod40.z.string().optional(),
|
|
3237
|
+
end_pcb_port_id: import_zod40.z.string().optional(),
|
|
3238
|
+
layer: layer_ref
|
|
3119
3239
|
}),
|
|
3120
|
-
|
|
3121
|
-
route_type:
|
|
3240
|
+
import_zod40.z.object({
|
|
3241
|
+
route_type: import_zod40.z.literal("via"),
|
|
3122
3242
|
x: distance,
|
|
3123
3243
|
y: distance,
|
|
3124
|
-
from_layer:
|
|
3125
|
-
to_layer:
|
|
3244
|
+
from_layer: import_zod40.z.string(),
|
|
3245
|
+
to_layer: import_zod40.z.string()
|
|
3126
3246
|
})
|
|
3127
3247
|
])
|
|
3128
3248
|
)
|
|
3129
3249
|
});
|
|
3130
|
-
var
|
|
3131
|
-
var pcb_trace_error =
|
|
3132
|
-
pcb_error_id:
|
|
3133
|
-
type:
|
|
3134
|
-
error_type:
|
|
3135
|
-
message:
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3250
|
+
var import_zod41 = require("zod");
|
|
3251
|
+
var pcb_trace_error = import_zod41.z.object({
|
|
3252
|
+
pcb_error_id: import_zod41.z.string(),
|
|
3253
|
+
type: import_zod41.z.literal("pcb_error"),
|
|
3254
|
+
error_type: import_zod41.z.literal("pcb_trace_error"),
|
|
3255
|
+
message: import_zod41.z.string(),
|
|
3256
|
+
center: point.optional(),
|
|
3257
|
+
pcb_trace_id: import_zod41.z.string(),
|
|
3258
|
+
source_trace_id: import_zod41.z.string(),
|
|
3259
|
+
pcb_component_ids: import_zod41.z.array(import_zod41.z.string()),
|
|
3260
|
+
pcb_port_ids: import_zod41.z.array(import_zod41.z.string())
|
|
3140
3261
|
}).describe("Defines a trace error on the PCB");
|
|
3141
|
-
var
|
|
3142
|
-
var pcb_port_not_matched_error =
|
|
3143
|
-
pcb_error_id:
|
|
3144
|
-
type:
|
|
3145
|
-
error_type:
|
|
3146
|
-
message:
|
|
3147
|
-
pcb_component_ids:
|
|
3262
|
+
var import_zod422 = require("zod");
|
|
3263
|
+
var pcb_port_not_matched_error = import_zod422.z.object({
|
|
3264
|
+
pcb_error_id: import_zod422.z.string(),
|
|
3265
|
+
type: import_zod422.z.literal("pcb_error"),
|
|
3266
|
+
error_type: import_zod422.z.literal("pcb_port_not_matched_error"),
|
|
3267
|
+
message: import_zod422.z.string(),
|
|
3268
|
+
pcb_component_ids: import_zod422.z.array(import_zod422.z.string())
|
|
3148
3269
|
}).describe("Defines a trace error on the PCB");
|
|
3149
|
-
var
|
|
3150
|
-
var pcb_via =
|
|
3151
|
-
type:
|
|
3270
|
+
var import_zod43 = require("zod");
|
|
3271
|
+
var pcb_via = import_zod43.z.object({
|
|
3272
|
+
type: import_zod43.z.literal("pcb_via"),
|
|
3152
3273
|
x: distance,
|
|
3153
3274
|
y: distance,
|
|
3154
3275
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -3157,35 +3278,37 @@ var require_dist = __commonJS({
|
|
|
3157
3278
|
from_layer: layer_ref.optional(),
|
|
3158
3279
|
/** @deprecated */
|
|
3159
3280
|
to_layer: layer_ref.optional(),
|
|
3160
|
-
layers:
|
|
3281
|
+
layers: import_zod43.z.array(layer_ref)
|
|
3161
3282
|
}).describe("Defines a via on the PCB");
|
|
3162
|
-
var
|
|
3163
|
-
var pcb_board =
|
|
3164
|
-
type:
|
|
3283
|
+
var import_zod44 = require("zod");
|
|
3284
|
+
var pcb_board = import_zod44.z.object({
|
|
3285
|
+
type: import_zod44.z.literal("pcb_board"),
|
|
3286
|
+
pcb_board_id: import_zod44.z.string().default("pcb_board_0").optional(),
|
|
3165
3287
|
width: length,
|
|
3166
3288
|
height: length,
|
|
3167
|
-
center: point
|
|
3289
|
+
center: point,
|
|
3290
|
+
outline: import_zod44.z.array(point).optional()
|
|
3168
3291
|
}).describe("Defines the board outline of the PCB");
|
|
3169
|
-
var
|
|
3170
|
-
var pcb_placement_error =
|
|
3171
|
-
pcb_error_id:
|
|
3172
|
-
type:
|
|
3173
|
-
error_type:
|
|
3174
|
-
message:
|
|
3292
|
+
var import_zod45 = require("zod");
|
|
3293
|
+
var pcb_placement_error = import_zod45.z.object({
|
|
3294
|
+
pcb_error_id: import_zod45.z.string(),
|
|
3295
|
+
type: import_zod45.z.literal("pcb_error"),
|
|
3296
|
+
error_type: import_zod45.z.literal("pcb_placement_error"),
|
|
3297
|
+
message: import_zod45.z.string()
|
|
3175
3298
|
}).describe("Defines a placement error on the PCB");
|
|
3176
|
-
var
|
|
3177
|
-
var pcb_trace_hint =
|
|
3178
|
-
pcb_trace_hint_id:
|
|
3179
|
-
type:
|
|
3180
|
-
pcb_port_id:
|
|
3181
|
-
pcb_component_id:
|
|
3182
|
-
route:
|
|
3299
|
+
var import_zod46 = require("zod");
|
|
3300
|
+
var pcb_trace_hint = import_zod46.z.object({
|
|
3301
|
+
pcb_trace_hint_id: import_zod46.z.string(),
|
|
3302
|
+
type: import_zod46.z.literal("pcb_trace_hint"),
|
|
3303
|
+
pcb_port_id: import_zod46.z.string(),
|
|
3304
|
+
pcb_component_id: import_zod46.z.string(),
|
|
3305
|
+
route: import_zod46.z.array(route_hint_point.optional())
|
|
3183
3306
|
}).describe("A hint that can be used to generate a PCB trace");
|
|
3184
|
-
var
|
|
3185
|
-
var pcb_silkscreen_line =
|
|
3186
|
-
type:
|
|
3187
|
-
pcb_silkscreen_line_id:
|
|
3188
|
-
pcb_component_id:
|
|
3307
|
+
var import_zod47 = require("zod");
|
|
3308
|
+
var pcb_silkscreen_line = import_zod47.z.object({
|
|
3309
|
+
type: import_zod47.z.literal("pcb_silkscreen_line"),
|
|
3310
|
+
pcb_silkscreen_line_id: import_zod47.z.string(),
|
|
3311
|
+
pcb_component_id: import_zod47.z.string(),
|
|
3189
3312
|
stroke_width: distance.default("0.1mm"),
|
|
3190
3313
|
x1: distance,
|
|
3191
3314
|
y1: distance,
|
|
@@ -3193,88 +3316,130 @@ var require_dist = __commonJS({
|
|
|
3193
3316
|
y2: distance,
|
|
3194
3317
|
layer: visible_layer
|
|
3195
3318
|
}).describe("Defines a silkscreen line on the PCB");
|
|
3196
|
-
var
|
|
3197
|
-
var pcb_silkscreen_path2 =
|
|
3198
|
-
type:
|
|
3199
|
-
pcb_silkscreen_path_id:
|
|
3200
|
-
pcb_component_id:
|
|
3319
|
+
var import_zod48 = require("zod");
|
|
3320
|
+
var pcb_silkscreen_path2 = import_zod48.z.object({
|
|
3321
|
+
type: import_zod48.z.literal("pcb_silkscreen_path"),
|
|
3322
|
+
pcb_silkscreen_path_id: import_zod48.z.string(),
|
|
3323
|
+
pcb_component_id: import_zod48.z.string(),
|
|
3201
3324
|
layer: visible_layer,
|
|
3202
|
-
route:
|
|
3325
|
+
route: import_zod48.z.array(point),
|
|
3203
3326
|
stroke_width: length
|
|
3204
3327
|
}).describe("Defines a silkscreen path on the PCB");
|
|
3205
|
-
var
|
|
3206
|
-
var pcb_silkscreen_text =
|
|
3207
|
-
type:
|
|
3208
|
-
font:
|
|
3328
|
+
var import_zod49 = require("zod");
|
|
3329
|
+
var pcb_silkscreen_text = import_zod49.z.object({
|
|
3330
|
+
type: import_zod49.z.literal("pcb_silkscreen_text"),
|
|
3331
|
+
font: import_zod49.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
3209
3332
|
font_size: distance.default("0.2mm"),
|
|
3210
|
-
pcb_component_id:
|
|
3211
|
-
text:
|
|
3333
|
+
pcb_component_id: import_zod49.z.string(),
|
|
3334
|
+
text: import_zod49.z.string(),
|
|
3212
3335
|
layer: visible_layer,
|
|
3213
3336
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3214
|
-
anchor_alignment:
|
|
3337
|
+
anchor_alignment: import_zod49.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
3215
3338
|
}).describe("Defines silkscreen text on the PCB");
|
|
3216
|
-
var
|
|
3217
|
-
var pcb_silkscreen_rect =
|
|
3218
|
-
type:
|
|
3219
|
-
pcb_silkscreen_rect_id:
|
|
3220
|
-
pcb_component_id:
|
|
3339
|
+
var import_zod50 = require("zod");
|
|
3340
|
+
var pcb_silkscreen_rect = import_zod50.z.object({
|
|
3341
|
+
type: import_zod50.z.literal("pcb_silkscreen_rect"),
|
|
3342
|
+
pcb_silkscreen_rect_id: import_zod50.z.string(),
|
|
3343
|
+
pcb_component_id: import_zod50.z.string(),
|
|
3221
3344
|
center: point,
|
|
3222
3345
|
width: distance,
|
|
3223
3346
|
height: distance,
|
|
3224
3347
|
layer: visible_layer
|
|
3225
3348
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
3226
|
-
var
|
|
3227
|
-
var pcb_silkscreen_circle =
|
|
3228
|
-
type:
|
|
3229
|
-
pcb_silkscreen_circle_id:
|
|
3230
|
-
pcb_component_id:
|
|
3349
|
+
var import_zod51 = require("zod");
|
|
3350
|
+
var pcb_silkscreen_circle = import_zod51.z.object({
|
|
3351
|
+
type: import_zod51.z.literal("pcb_silkscreen_circle"),
|
|
3352
|
+
pcb_silkscreen_circle_id: import_zod51.z.string(),
|
|
3353
|
+
pcb_component_id: import_zod51.z.string(),
|
|
3231
3354
|
center: point,
|
|
3232
3355
|
radius: distance,
|
|
3233
3356
|
layer: visible_layer
|
|
3234
3357
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3235
|
-
var
|
|
3236
|
-
var
|
|
3237
|
-
type:
|
|
3238
|
-
|
|
3358
|
+
var import_zod522 = require("zod");
|
|
3359
|
+
var pcb_silkscreen_oval = import_zod522.z.object({
|
|
3360
|
+
type: import_zod522.z.literal("pcb_silkscreen_oval"),
|
|
3361
|
+
pcb_silkscreen_oval_id: import_zod522.z.string(),
|
|
3362
|
+
pcb_component_id: import_zod522.z.string(),
|
|
3363
|
+
center: point,
|
|
3364
|
+
radius_x: distance,
|
|
3365
|
+
radius_y: distance,
|
|
3366
|
+
layer: visible_layer
|
|
3367
|
+
}).describe("Defines a silkscreen oval on the PCB");
|
|
3368
|
+
var import_zod53 = require("zod");
|
|
3369
|
+
var pcb_fabrication_note_text = import_zod53.z.object({
|
|
3370
|
+
type: import_zod53.z.literal("pcb_fabrication_note_text"),
|
|
3371
|
+
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3372
|
+
"pcb_fabrication_note_text"
|
|
3373
|
+
),
|
|
3374
|
+
font: import_zod53.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
3239
3375
|
font_size: distance.default("1mm"),
|
|
3240
|
-
pcb_component_id:
|
|
3241
|
-
text:
|
|
3376
|
+
pcb_component_id: import_zod53.z.string(),
|
|
3377
|
+
text: import_zod53.z.string(),
|
|
3242
3378
|
layer: visible_layer,
|
|
3243
3379
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3244
|
-
anchor_alignment:
|
|
3380
|
+
anchor_alignment: import_zod53.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3381
|
+
color: import_zod53.z.string().optional()
|
|
3245
3382
|
}).describe(
|
|
3246
3383
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3247
3384
|
);
|
|
3248
|
-
var
|
|
3249
|
-
var pcb_fabrication_note_path =
|
|
3250
|
-
type:
|
|
3251
|
-
|
|
3252
|
-
|
|
3385
|
+
var import_zod54 = require("zod");
|
|
3386
|
+
var pcb_fabrication_note_path = import_zod54.z.object({
|
|
3387
|
+
type: import_zod54.z.literal("pcb_fabrication_note_path"),
|
|
3388
|
+
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3389
|
+
"pcb_fabrication_note_path"
|
|
3390
|
+
),
|
|
3391
|
+
pcb_component_id: import_zod54.z.string(),
|
|
3253
3392
|
layer: visible_layer,
|
|
3254
|
-
route:
|
|
3255
|
-
stroke_width: length
|
|
3393
|
+
route: import_zod54.z.array(point),
|
|
3394
|
+
stroke_width: length,
|
|
3395
|
+
color: import_zod54.z.string().optional()
|
|
3256
3396
|
}).describe(
|
|
3257
3397
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3258
3398
|
);
|
|
3259
|
-
var
|
|
3260
|
-
var
|
|
3261
|
-
type:
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3399
|
+
var import_zod55 = require("zod");
|
|
3400
|
+
var pcb_keepout = import_zod55.z.object({
|
|
3401
|
+
type: import_zod55.z.literal("pcb_keepout"),
|
|
3402
|
+
shape: import_zod55.z.literal("rect"),
|
|
3403
|
+
center: point,
|
|
3404
|
+
width: distance,
|
|
3405
|
+
height: distance,
|
|
3406
|
+
pcb_keepout_id: import_zod55.z.string(),
|
|
3407
|
+
layers: import_zod55.z.array(import_zod55.z.string()),
|
|
3408
|
+
// Specify layers where the keepout applies
|
|
3409
|
+
description: import_zod55.z.string().optional()
|
|
3410
|
+
// Optional description of the keepout
|
|
3411
|
+
}).or(
|
|
3412
|
+
import_zod55.z.object({
|
|
3413
|
+
type: import_zod55.z.literal("pcb_keepout"),
|
|
3414
|
+
shape: import_zod55.z.literal("circle"),
|
|
3415
|
+
center: point,
|
|
3416
|
+
radius: distance,
|
|
3417
|
+
pcb_keepout_id: import_zod55.z.string(),
|
|
3418
|
+
layers: import_zod55.z.array(import_zod55.z.string()),
|
|
3419
|
+
// Specify layers where the keepout applies
|
|
3420
|
+
description: import_zod55.z.string().optional()
|
|
3421
|
+
// Optional description of the keepout
|
|
3422
|
+
})
|
|
3423
|
+
);
|
|
3424
|
+
var import_zod56 = require("zod");
|
|
3425
|
+
var cad_component2 = import_zod56.z.object({
|
|
3426
|
+
type: import_zod56.z.literal("cad_component"),
|
|
3427
|
+
cad_component_id: import_zod56.z.string(),
|
|
3428
|
+
pcb_component_id: import_zod56.z.string(),
|
|
3429
|
+
source_component_id: import_zod56.z.string(),
|
|
3265
3430
|
position: point3,
|
|
3266
3431
|
rotation: point3.optional(),
|
|
3267
3432
|
size: point3.optional(),
|
|
3268
3433
|
layer: layer_ref.optional(),
|
|
3269
3434
|
// These are all ways to generate/load the 3d model
|
|
3270
|
-
footprinter_string:
|
|
3271
|
-
model_obj_url:
|
|
3272
|
-
model_stl_url:
|
|
3273
|
-
model_3mf_url:
|
|
3274
|
-
model_jscad:
|
|
3435
|
+
footprinter_string: import_zod56.z.string().optional(),
|
|
3436
|
+
model_obj_url: import_zod56.z.string().optional(),
|
|
3437
|
+
model_stl_url: import_zod56.z.string().optional(),
|
|
3438
|
+
model_3mf_url: import_zod56.z.string().optional(),
|
|
3439
|
+
model_jscad: import_zod56.z.any().optional()
|
|
3275
3440
|
}).describe("Defines a component on the PCB");
|
|
3276
|
-
var
|
|
3277
|
-
var
|
|
3441
|
+
var import_zod57 = require("zod");
|
|
3442
|
+
var any_circuit_element = import_zod57.z.union([
|
|
3278
3443
|
source_trace,
|
|
3279
3444
|
source_port,
|
|
3280
3445
|
any_source_component2,
|
|
@@ -3282,6 +3447,7 @@ var require_dist = __commonJS({
|
|
|
3282
3447
|
source_net,
|
|
3283
3448
|
source_group,
|
|
3284
3449
|
source_simple_bug,
|
|
3450
|
+
source_simple_chip,
|
|
3285
3451
|
source_simple_capacitor,
|
|
3286
3452
|
source_simple_diode,
|
|
3287
3453
|
source_simple_resistor,
|
|
@@ -3289,6 +3455,7 @@ var require_dist = __commonJS({
|
|
|
3289
3455
|
pcb_component2,
|
|
3290
3456
|
pcb_hole,
|
|
3291
3457
|
pcb_plated_hole2,
|
|
3458
|
+
pcb_keepout,
|
|
3292
3459
|
pcb_port,
|
|
3293
3460
|
pcb_text,
|
|
3294
3461
|
pcb_trace,
|
|
@@ -3301,6 +3468,7 @@ var require_dist = __commonJS({
|
|
|
3301
3468
|
pcb_silkscreen_text,
|
|
3302
3469
|
pcb_silkscreen_rect,
|
|
3303
3470
|
pcb_silkscreen_circle,
|
|
3471
|
+
pcb_silkscreen_oval,
|
|
3304
3472
|
pcb_trace_error,
|
|
3305
3473
|
pcb_placement_error,
|
|
3306
3474
|
pcb_port_not_matched_error,
|
|
@@ -3317,6 +3485,7 @@ var require_dist = __commonJS({
|
|
|
3317
3485
|
schematic_net_label,
|
|
3318
3486
|
cad_component2
|
|
3319
3487
|
]);
|
|
3488
|
+
var any_soup_element = any_circuit_element;
|
|
3320
3489
|
}
|
|
3321
3490
|
});
|
|
3322
3491
|
|
|
@@ -16961,7 +17130,7 @@ var require_dist7 = __commonJS({
|
|
|
16961
17130
|
number = toNumber(number);
|
|
16962
17131
|
return baseInRange(number, start, end);
|
|
16963
17132
|
}
|
|
16964
|
-
function
|
|
17133
|
+
function random2(lower, upper, floating) {
|
|
16965
17134
|
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
|
16966
17135
|
upper = floating = undefined2;
|
|
16967
17136
|
}
|
|
@@ -17715,7 +17884,7 @@ var require_dist7 = __commonJS({
|
|
|
17715
17884
|
lodash.padEnd = padEnd;
|
|
17716
17885
|
lodash.padStart = padStart;
|
|
17717
17886
|
lodash.parseInt = parseInt2;
|
|
17718
|
-
lodash.random =
|
|
17887
|
+
lodash.random = random2;
|
|
17719
17888
|
lodash.reduce = reduce;
|
|
17720
17889
|
lodash.reduceRight = reduceRight;
|
|
17721
17890
|
lodash.repeat = repeat;
|