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