circuit-json 0.0.293 → 0.0.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/index.d.mts +328 -2
- package/dist/index.mjs +408 -375
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1933,35 +1933,66 @@ var pcb_silkscreen_text = z88.object({
|
|
|
1933
1933
|
}).describe("Defines silkscreen text on the PCB");
|
|
1934
1934
|
expectTypesMatch(true);
|
|
1935
1935
|
|
|
1936
|
-
// src/pcb/
|
|
1936
|
+
// src/pcb/pcb_copper_text.ts
|
|
1937
1937
|
import { z as z89 } from "zod";
|
|
1938
|
-
var
|
|
1939
|
-
type: z89.literal("
|
|
1940
|
-
|
|
1941
|
-
pcb_component_id: z89.string(),
|
|
1938
|
+
var pcb_copper_text = z89.object({
|
|
1939
|
+
type: z89.literal("pcb_copper_text"),
|
|
1940
|
+
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
1942
1941
|
pcb_group_id: z89.string().optional(),
|
|
1943
1942
|
subcircuit_id: z89.string().optional(),
|
|
1943
|
+
font: z89.literal("tscircuit2024").default("tscircuit2024"),
|
|
1944
|
+
font_size: distance.default("0.2mm"),
|
|
1945
|
+
pcb_component_id: z89.string(),
|
|
1946
|
+
text: z89.string(),
|
|
1947
|
+
is_knockout: z89.boolean().default(false).optional(),
|
|
1948
|
+
knockout_padding: z89.object({
|
|
1949
|
+
left: length,
|
|
1950
|
+
top: length,
|
|
1951
|
+
bottom: length,
|
|
1952
|
+
right: length
|
|
1953
|
+
}).default({
|
|
1954
|
+
left: "0.2mm",
|
|
1955
|
+
top: "0.2mm",
|
|
1956
|
+
bottom: "0.2mm",
|
|
1957
|
+
right: "0.2mm"
|
|
1958
|
+
}).optional(),
|
|
1959
|
+
ccw_rotation: z89.number().optional(),
|
|
1960
|
+
layer: layer_ref,
|
|
1961
|
+
is_mirrored: z89.boolean().default(false).optional(),
|
|
1962
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
1963
|
+
anchor_alignment: ninePointAnchor.default("center")
|
|
1964
|
+
}).describe("Defines copper text on the PCB");
|
|
1965
|
+
expectTypesMatch(true);
|
|
1966
|
+
|
|
1967
|
+
// src/pcb/pcb_silkscreen_rect.ts
|
|
1968
|
+
import { z as z90 } from "zod";
|
|
1969
|
+
var pcb_silkscreen_rect = z90.object({
|
|
1970
|
+
type: z90.literal("pcb_silkscreen_rect"),
|
|
1971
|
+
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
1972
|
+
pcb_component_id: z90.string(),
|
|
1973
|
+
pcb_group_id: z90.string().optional(),
|
|
1974
|
+
subcircuit_id: z90.string().optional(),
|
|
1944
1975
|
center: point,
|
|
1945
1976
|
width: length,
|
|
1946
1977
|
height: length,
|
|
1947
1978
|
layer: layer_ref,
|
|
1948
1979
|
stroke_width: length.default("1mm"),
|
|
1949
|
-
is_filled:
|
|
1950
|
-
has_stroke:
|
|
1951
|
-
is_stroke_dashed:
|
|
1980
|
+
is_filled: z90.boolean().default(true).optional(),
|
|
1981
|
+
has_stroke: z90.boolean().optional(),
|
|
1982
|
+
is_stroke_dashed: z90.boolean().optional()
|
|
1952
1983
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
1953
1984
|
expectTypesMatch(true);
|
|
1954
1985
|
|
|
1955
1986
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
1956
|
-
import { z as
|
|
1957
|
-
var pcb_silkscreen_circle =
|
|
1958
|
-
type:
|
|
1987
|
+
import { z as z91 } from "zod";
|
|
1988
|
+
var pcb_silkscreen_circle = z91.object({
|
|
1989
|
+
type: z91.literal("pcb_silkscreen_circle"),
|
|
1959
1990
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
1960
1991
|
"pcb_silkscreen_circle"
|
|
1961
1992
|
),
|
|
1962
|
-
pcb_component_id:
|
|
1963
|
-
pcb_group_id:
|
|
1964
|
-
subcircuit_id:
|
|
1993
|
+
pcb_component_id: z91.string(),
|
|
1994
|
+
pcb_group_id: z91.string().optional(),
|
|
1995
|
+
subcircuit_id: z91.string().optional(),
|
|
1965
1996
|
center: point,
|
|
1966
1997
|
radius: length,
|
|
1967
1998
|
layer: visible_layer,
|
|
@@ -1970,13 +2001,13 @@ var pcb_silkscreen_circle = z90.object({
|
|
|
1970
2001
|
expectTypesMatch(true);
|
|
1971
2002
|
|
|
1972
2003
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
1973
|
-
import { z as
|
|
1974
|
-
var pcb_silkscreen_oval =
|
|
1975
|
-
type:
|
|
2004
|
+
import { z as z92 } from "zod";
|
|
2005
|
+
var pcb_silkscreen_oval = z92.object({
|
|
2006
|
+
type: z92.literal("pcb_silkscreen_oval"),
|
|
1976
2007
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
1977
|
-
pcb_component_id:
|
|
1978
|
-
pcb_group_id:
|
|
1979
|
-
subcircuit_id:
|
|
2008
|
+
pcb_component_id: z92.string(),
|
|
2009
|
+
pcb_group_id: z92.string().optional(),
|
|
2010
|
+
subcircuit_id: z92.string().optional(),
|
|
1980
2011
|
center: point,
|
|
1981
2012
|
radius_x: distance,
|
|
1982
2013
|
radius_y: distance,
|
|
@@ -1985,253 +2016,253 @@ var pcb_silkscreen_oval = z91.object({
|
|
|
1985
2016
|
expectTypesMatch(true);
|
|
1986
2017
|
|
|
1987
2018
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
1988
|
-
import { z as
|
|
1989
|
-
var pcb_fabrication_note_text =
|
|
1990
|
-
type:
|
|
2019
|
+
import { z as z93 } from "zod";
|
|
2020
|
+
var pcb_fabrication_note_text = z93.object({
|
|
2021
|
+
type: z93.literal("pcb_fabrication_note_text"),
|
|
1991
2022
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
1992
2023
|
"pcb_fabrication_note_text"
|
|
1993
2024
|
),
|
|
1994
|
-
subcircuit_id:
|
|
1995
|
-
pcb_group_id:
|
|
1996
|
-
font:
|
|
2025
|
+
subcircuit_id: z93.string().optional(),
|
|
2026
|
+
pcb_group_id: z93.string().optional(),
|
|
2027
|
+
font: z93.literal("tscircuit2024").default("tscircuit2024"),
|
|
1997
2028
|
font_size: distance.default("1mm"),
|
|
1998
|
-
pcb_component_id:
|
|
1999
|
-
text:
|
|
2029
|
+
pcb_component_id: z93.string(),
|
|
2030
|
+
text: z93.string(),
|
|
2000
2031
|
layer: visible_layer,
|
|
2001
2032
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2002
|
-
anchor_alignment:
|
|
2003
|
-
color:
|
|
2033
|
+
anchor_alignment: z93.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2034
|
+
color: z93.string().optional()
|
|
2004
2035
|
}).describe(
|
|
2005
2036
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2006
2037
|
);
|
|
2007
2038
|
expectTypesMatch(true);
|
|
2008
2039
|
|
|
2009
2040
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2010
|
-
import { z as
|
|
2011
|
-
var pcb_fabrication_note_path =
|
|
2012
|
-
type:
|
|
2041
|
+
import { z as z94 } from "zod";
|
|
2042
|
+
var pcb_fabrication_note_path = z94.object({
|
|
2043
|
+
type: z94.literal("pcb_fabrication_note_path"),
|
|
2013
2044
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2014
2045
|
"pcb_fabrication_note_path"
|
|
2015
2046
|
),
|
|
2016
|
-
pcb_component_id:
|
|
2017
|
-
subcircuit_id:
|
|
2047
|
+
pcb_component_id: z94.string(),
|
|
2048
|
+
subcircuit_id: z94.string().optional(),
|
|
2018
2049
|
layer: layer_ref,
|
|
2019
|
-
route:
|
|
2050
|
+
route: z94.array(point),
|
|
2020
2051
|
stroke_width: length,
|
|
2021
|
-
color:
|
|
2052
|
+
color: z94.string().optional()
|
|
2022
2053
|
}).describe(
|
|
2023
2054
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2024
2055
|
);
|
|
2025
2056
|
expectTypesMatch(true);
|
|
2026
2057
|
|
|
2027
2058
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2028
|
-
import { z as
|
|
2029
|
-
var pcb_fabrication_note_rect =
|
|
2030
|
-
type:
|
|
2059
|
+
import { z as z95 } from "zod";
|
|
2060
|
+
var pcb_fabrication_note_rect = z95.object({
|
|
2061
|
+
type: z95.literal("pcb_fabrication_note_rect"),
|
|
2031
2062
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2032
2063
|
"pcb_fabrication_note_rect"
|
|
2033
2064
|
),
|
|
2034
|
-
pcb_component_id:
|
|
2035
|
-
pcb_group_id:
|
|
2036
|
-
subcircuit_id:
|
|
2065
|
+
pcb_component_id: z95.string(),
|
|
2066
|
+
pcb_group_id: z95.string().optional(),
|
|
2067
|
+
subcircuit_id: z95.string().optional(),
|
|
2037
2068
|
center: point,
|
|
2038
2069
|
width: length,
|
|
2039
2070
|
height: length,
|
|
2040
2071
|
layer: visible_layer,
|
|
2041
2072
|
stroke_width: length.default("0.1mm"),
|
|
2042
|
-
is_filled:
|
|
2043
|
-
has_stroke:
|
|
2044
|
-
is_stroke_dashed:
|
|
2045
|
-
color:
|
|
2073
|
+
is_filled: z95.boolean().optional(),
|
|
2074
|
+
has_stroke: z95.boolean().optional(),
|
|
2075
|
+
is_stroke_dashed: z95.boolean().optional(),
|
|
2076
|
+
color: z95.string().optional()
|
|
2046
2077
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2047
2078
|
expectTypesMatch(true);
|
|
2048
2079
|
|
|
2049
2080
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2050
|
-
import { z as
|
|
2051
|
-
var pcb_fabrication_note_dimension =
|
|
2052
|
-
type:
|
|
2081
|
+
import { z as z96 } from "zod";
|
|
2082
|
+
var pcb_fabrication_note_dimension = z96.object({
|
|
2083
|
+
type: z96.literal("pcb_fabrication_note_dimension"),
|
|
2053
2084
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2054
2085
|
"pcb_fabrication_note_dimension"
|
|
2055
2086
|
),
|
|
2056
|
-
pcb_component_id:
|
|
2057
|
-
pcb_group_id:
|
|
2058
|
-
subcircuit_id:
|
|
2087
|
+
pcb_component_id: z96.string(),
|
|
2088
|
+
pcb_group_id: z96.string().optional(),
|
|
2089
|
+
subcircuit_id: z96.string().optional(),
|
|
2059
2090
|
layer: visible_layer,
|
|
2060
2091
|
from: point,
|
|
2061
2092
|
to: point,
|
|
2062
|
-
text:
|
|
2063
|
-
text_ccw_rotation:
|
|
2093
|
+
text: z96.string().optional(),
|
|
2094
|
+
text_ccw_rotation: z96.number().optional(),
|
|
2064
2095
|
offset: length.optional(),
|
|
2065
2096
|
offset_distance: length.optional(),
|
|
2066
|
-
offset_direction:
|
|
2067
|
-
x:
|
|
2068
|
-
y:
|
|
2097
|
+
offset_direction: z96.object({
|
|
2098
|
+
x: z96.number(),
|
|
2099
|
+
y: z96.number()
|
|
2069
2100
|
}).optional(),
|
|
2070
|
-
font:
|
|
2101
|
+
font: z96.literal("tscircuit2024").default("tscircuit2024"),
|
|
2071
2102
|
font_size: length.default("1mm"),
|
|
2072
|
-
color:
|
|
2103
|
+
color: z96.string().optional(),
|
|
2073
2104
|
arrow_size: length.default("1mm")
|
|
2074
2105
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2075
2106
|
expectTypesMatch(true);
|
|
2076
2107
|
|
|
2077
2108
|
// src/pcb/pcb_note_text.ts
|
|
2078
|
-
import { z as z96 } from "zod";
|
|
2079
|
-
var pcb_note_text = z96.object({
|
|
2080
|
-
type: z96.literal("pcb_note_text"),
|
|
2081
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2082
|
-
pcb_component_id: z96.string().optional(),
|
|
2083
|
-
pcb_group_id: z96.string().optional(),
|
|
2084
|
-
subcircuit_id: z96.string().optional(),
|
|
2085
|
-
name: z96.string().optional(),
|
|
2086
|
-
font: z96.literal("tscircuit2024").default("tscircuit2024"),
|
|
2087
|
-
font_size: distance.default("1mm"),
|
|
2088
|
-
text: z96.string().optional(),
|
|
2089
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2090
|
-
anchor_alignment: z96.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2091
|
-
color: z96.string().optional()
|
|
2092
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2093
|
-
expectTypesMatch(true);
|
|
2094
|
-
|
|
2095
|
-
// src/pcb/pcb_note_rect.ts
|
|
2096
2109
|
import { z as z97 } from "zod";
|
|
2097
|
-
var
|
|
2098
|
-
type: z97.literal("
|
|
2099
|
-
|
|
2110
|
+
var pcb_note_text = z97.object({
|
|
2111
|
+
type: z97.literal("pcb_note_text"),
|
|
2112
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2100
2113
|
pcb_component_id: z97.string().optional(),
|
|
2101
2114
|
pcb_group_id: z97.string().optional(),
|
|
2102
2115
|
subcircuit_id: z97.string().optional(),
|
|
2103
2116
|
name: z97.string().optional(),
|
|
2117
|
+
font: z97.literal("tscircuit2024").default("tscircuit2024"),
|
|
2118
|
+
font_size: distance.default("1mm"),
|
|
2104
2119
|
text: z97.string().optional(),
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
height: length,
|
|
2108
|
-
stroke_width: length.default("0.1mm"),
|
|
2109
|
-
is_filled: z97.boolean().optional(),
|
|
2110
|
-
has_stroke: z97.boolean().optional(),
|
|
2111
|
-
is_stroke_dashed: z97.boolean().optional(),
|
|
2120
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2121
|
+
anchor_alignment: z97.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2112
2122
|
color: z97.string().optional()
|
|
2113
|
-
}).describe("Defines a
|
|
2123
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2114
2124
|
expectTypesMatch(true);
|
|
2115
2125
|
|
|
2116
|
-
// src/pcb/
|
|
2126
|
+
// src/pcb/pcb_note_rect.ts
|
|
2117
2127
|
import { z as z98 } from "zod";
|
|
2118
|
-
var
|
|
2119
|
-
type: z98.literal("
|
|
2120
|
-
|
|
2128
|
+
var pcb_note_rect = z98.object({
|
|
2129
|
+
type: z98.literal("pcb_note_rect"),
|
|
2130
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2121
2131
|
pcb_component_id: z98.string().optional(),
|
|
2122
2132
|
pcb_group_id: z98.string().optional(),
|
|
2123
2133
|
subcircuit_id: z98.string().optional(),
|
|
2124
2134
|
name: z98.string().optional(),
|
|
2125
2135
|
text: z98.string().optional(),
|
|
2126
|
-
|
|
2136
|
+
center: point,
|
|
2137
|
+
width: length,
|
|
2138
|
+
height: length,
|
|
2127
2139
|
stroke_width: length.default("0.1mm"),
|
|
2140
|
+
is_filled: z98.boolean().optional(),
|
|
2141
|
+
has_stroke: z98.boolean().optional(),
|
|
2142
|
+
is_stroke_dashed: z98.boolean().optional(),
|
|
2128
2143
|
color: z98.string().optional()
|
|
2129
|
-
}).describe("Defines a
|
|
2144
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2130
2145
|
expectTypesMatch(true);
|
|
2131
2146
|
|
|
2132
|
-
// src/pcb/
|
|
2147
|
+
// src/pcb/pcb_note_path.ts
|
|
2133
2148
|
import { z as z99 } from "zod";
|
|
2134
|
-
var
|
|
2135
|
-
type: z99.literal("
|
|
2136
|
-
|
|
2149
|
+
var pcb_note_path = z99.object({
|
|
2150
|
+
type: z99.literal("pcb_note_path"),
|
|
2151
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2137
2152
|
pcb_component_id: z99.string().optional(),
|
|
2138
2153
|
pcb_group_id: z99.string().optional(),
|
|
2139
2154
|
subcircuit_id: z99.string().optional(),
|
|
2140
2155
|
name: z99.string().optional(),
|
|
2141
2156
|
text: z99.string().optional(),
|
|
2157
|
+
route: z99.array(point),
|
|
2158
|
+
stroke_width: length.default("0.1mm"),
|
|
2159
|
+
color: z99.string().optional()
|
|
2160
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2161
|
+
expectTypesMatch(true);
|
|
2162
|
+
|
|
2163
|
+
// src/pcb/pcb_note_line.ts
|
|
2164
|
+
import { z as z100 } from "zod";
|
|
2165
|
+
var pcb_note_line = z100.object({
|
|
2166
|
+
type: z100.literal("pcb_note_line"),
|
|
2167
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2168
|
+
pcb_component_id: z100.string().optional(),
|
|
2169
|
+
pcb_group_id: z100.string().optional(),
|
|
2170
|
+
subcircuit_id: z100.string().optional(),
|
|
2171
|
+
name: z100.string().optional(),
|
|
2172
|
+
text: z100.string().optional(),
|
|
2142
2173
|
x1: distance,
|
|
2143
2174
|
y1: distance,
|
|
2144
2175
|
x2: distance,
|
|
2145
2176
|
y2: distance,
|
|
2146
2177
|
stroke_width: distance.default("0.1mm"),
|
|
2147
|
-
color:
|
|
2148
|
-
is_dashed:
|
|
2178
|
+
color: z100.string().optional(),
|
|
2179
|
+
is_dashed: z100.boolean().optional()
|
|
2149
2180
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2150
2181
|
expectTypesMatch(true);
|
|
2151
2182
|
|
|
2152
2183
|
// src/pcb/pcb_note_dimension.ts
|
|
2153
|
-
import { z as
|
|
2154
|
-
var pcb_note_dimension =
|
|
2155
|
-
type:
|
|
2184
|
+
import { z as z101 } from "zod";
|
|
2185
|
+
var pcb_note_dimension = z101.object({
|
|
2186
|
+
type: z101.literal("pcb_note_dimension"),
|
|
2156
2187
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2157
|
-
pcb_component_id:
|
|
2158
|
-
pcb_group_id:
|
|
2159
|
-
subcircuit_id:
|
|
2160
|
-
name:
|
|
2188
|
+
pcb_component_id: z101.string().optional(),
|
|
2189
|
+
pcb_group_id: z101.string().optional(),
|
|
2190
|
+
subcircuit_id: z101.string().optional(),
|
|
2191
|
+
name: z101.string().optional(),
|
|
2161
2192
|
from: point,
|
|
2162
2193
|
to: point,
|
|
2163
|
-
text:
|
|
2164
|
-
text_ccw_rotation:
|
|
2194
|
+
text: z101.string().optional(),
|
|
2195
|
+
text_ccw_rotation: z101.number().optional(),
|
|
2165
2196
|
offset_distance: length.optional(),
|
|
2166
|
-
offset_direction:
|
|
2167
|
-
x:
|
|
2168
|
-
y:
|
|
2197
|
+
offset_direction: z101.object({
|
|
2198
|
+
x: z101.number(),
|
|
2199
|
+
y: z101.number()
|
|
2169
2200
|
}).optional(),
|
|
2170
|
-
font:
|
|
2201
|
+
font: z101.literal("tscircuit2024").default("tscircuit2024"),
|
|
2171
2202
|
font_size: length.default("1mm"),
|
|
2172
|
-
color:
|
|
2203
|
+
color: z101.string().optional(),
|
|
2173
2204
|
arrow_size: length.default("1mm")
|
|
2174
2205
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2175
2206
|
expectTypesMatch(true);
|
|
2176
2207
|
|
|
2177
2208
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2178
|
-
import { z as
|
|
2179
|
-
var pcb_footprint_overlap_error =
|
|
2180
|
-
type:
|
|
2209
|
+
import { z as z102 } from "zod";
|
|
2210
|
+
var pcb_footprint_overlap_error = z102.object({
|
|
2211
|
+
type: z102.literal("pcb_footprint_overlap_error"),
|
|
2181
2212
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2182
|
-
error_type:
|
|
2183
|
-
message:
|
|
2184
|
-
pcb_smtpad_ids:
|
|
2185
|
-
pcb_plated_hole_ids:
|
|
2186
|
-
pcb_hole_ids:
|
|
2187
|
-
pcb_keepout_ids:
|
|
2213
|
+
error_type: z102.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2214
|
+
message: z102.string(),
|
|
2215
|
+
pcb_smtpad_ids: z102.array(z102.string()).optional(),
|
|
2216
|
+
pcb_plated_hole_ids: z102.array(z102.string()).optional(),
|
|
2217
|
+
pcb_hole_ids: z102.array(z102.string()).optional(),
|
|
2218
|
+
pcb_keepout_ids: z102.array(z102.string()).optional()
|
|
2188
2219
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2189
2220
|
expectTypesMatch(
|
|
2190
2221
|
true
|
|
2191
2222
|
);
|
|
2192
2223
|
|
|
2193
2224
|
// src/pcb/pcb_keepout.ts
|
|
2194
|
-
import { z as
|
|
2195
|
-
var pcb_keepout =
|
|
2196
|
-
type:
|
|
2197
|
-
shape:
|
|
2198
|
-
pcb_group_id:
|
|
2199
|
-
subcircuit_id:
|
|
2225
|
+
import { z as z103 } from "zod";
|
|
2226
|
+
var pcb_keepout = z103.object({
|
|
2227
|
+
type: z103.literal("pcb_keepout"),
|
|
2228
|
+
shape: z103.literal("rect"),
|
|
2229
|
+
pcb_group_id: z103.string().optional(),
|
|
2230
|
+
subcircuit_id: z103.string().optional(),
|
|
2200
2231
|
center: point,
|
|
2201
2232
|
width: distance,
|
|
2202
2233
|
height: distance,
|
|
2203
|
-
pcb_keepout_id:
|
|
2204
|
-
layers:
|
|
2234
|
+
pcb_keepout_id: z103.string(),
|
|
2235
|
+
layers: z103.array(z103.string()),
|
|
2205
2236
|
// Specify layers where the keepout applies
|
|
2206
|
-
description:
|
|
2237
|
+
description: z103.string().optional()
|
|
2207
2238
|
// Optional description of the keepout
|
|
2208
2239
|
}).or(
|
|
2209
|
-
|
|
2210
|
-
type:
|
|
2211
|
-
shape:
|
|
2212
|
-
pcb_group_id:
|
|
2213
|
-
subcircuit_id:
|
|
2240
|
+
z103.object({
|
|
2241
|
+
type: z103.literal("pcb_keepout"),
|
|
2242
|
+
shape: z103.literal("circle"),
|
|
2243
|
+
pcb_group_id: z103.string().optional(),
|
|
2244
|
+
subcircuit_id: z103.string().optional(),
|
|
2214
2245
|
center: point,
|
|
2215
2246
|
radius: distance,
|
|
2216
|
-
pcb_keepout_id:
|
|
2217
|
-
layers:
|
|
2247
|
+
pcb_keepout_id: z103.string(),
|
|
2248
|
+
layers: z103.array(z103.string()),
|
|
2218
2249
|
// Specify layers where the keepout applies
|
|
2219
|
-
description:
|
|
2250
|
+
description: z103.string().optional()
|
|
2220
2251
|
// Optional description of the keepout
|
|
2221
2252
|
})
|
|
2222
2253
|
);
|
|
2223
2254
|
expectTypesMatch(true);
|
|
2224
2255
|
|
|
2225
2256
|
// src/pcb/pcb_cutout.ts
|
|
2226
|
-
import { z as
|
|
2227
|
-
var pcb_cutout_base =
|
|
2228
|
-
type:
|
|
2257
|
+
import { z as z104 } from "zod";
|
|
2258
|
+
var pcb_cutout_base = z104.object({
|
|
2259
|
+
type: z104.literal("pcb_cutout"),
|
|
2229
2260
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2230
|
-
pcb_group_id:
|
|
2231
|
-
subcircuit_id:
|
|
2261
|
+
pcb_group_id: z104.string().optional(),
|
|
2262
|
+
subcircuit_id: z104.string().optional()
|
|
2232
2263
|
});
|
|
2233
2264
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2234
|
-
shape:
|
|
2265
|
+
shape: z104.literal("rect"),
|
|
2235
2266
|
center: point,
|
|
2236
2267
|
width: length,
|
|
2237
2268
|
height: length,
|
|
@@ -2239,17 +2270,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2239
2270
|
});
|
|
2240
2271
|
expectTypesMatch(true);
|
|
2241
2272
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2242
|
-
shape:
|
|
2273
|
+
shape: z104.literal("circle"),
|
|
2243
2274
|
center: point,
|
|
2244
2275
|
radius: length
|
|
2245
2276
|
});
|
|
2246
2277
|
expectTypesMatch(true);
|
|
2247
2278
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2248
|
-
shape:
|
|
2249
|
-
points:
|
|
2279
|
+
shape: z104.literal("polygon"),
|
|
2280
|
+
points: z104.array(point)
|
|
2250
2281
|
});
|
|
2251
2282
|
expectTypesMatch(true);
|
|
2252
|
-
var pcb_cutout =
|
|
2283
|
+
var pcb_cutout = z104.discriminatedUnion("shape", [
|
|
2253
2284
|
pcb_cutout_rect,
|
|
2254
2285
|
pcb_cutout_circle,
|
|
2255
2286
|
pcb_cutout_polygon
|
|
@@ -2257,120 +2288,120 @@ var pcb_cutout = z103.discriminatedUnion("shape", [
|
|
|
2257
2288
|
expectTypesMatch(true);
|
|
2258
2289
|
|
|
2259
2290
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2260
|
-
import { z as
|
|
2261
|
-
var pcb_missing_footprint_error =
|
|
2262
|
-
type:
|
|
2291
|
+
import { z as z105 } from "zod";
|
|
2292
|
+
var pcb_missing_footprint_error = z105.object({
|
|
2293
|
+
type: z105.literal("pcb_missing_footprint_error"),
|
|
2263
2294
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2264
2295
|
"pcb_missing_footprint_error"
|
|
2265
2296
|
),
|
|
2266
|
-
pcb_group_id:
|
|
2267
|
-
subcircuit_id:
|
|
2268
|
-
error_type:
|
|
2269
|
-
source_component_id:
|
|
2270
|
-
message:
|
|
2297
|
+
pcb_group_id: z105.string().optional(),
|
|
2298
|
+
subcircuit_id: z105.string().optional(),
|
|
2299
|
+
error_type: z105.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2300
|
+
source_component_id: z105.string(),
|
|
2301
|
+
message: z105.string()
|
|
2271
2302
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2272
2303
|
expectTypesMatch(
|
|
2273
2304
|
true
|
|
2274
2305
|
);
|
|
2275
2306
|
|
|
2276
2307
|
// src/pcb/external_footprint_load_error.ts
|
|
2277
|
-
import { z as
|
|
2278
|
-
var external_footprint_load_error =
|
|
2279
|
-
type:
|
|
2308
|
+
import { z as z106 } from "zod";
|
|
2309
|
+
var external_footprint_load_error = z106.object({
|
|
2310
|
+
type: z106.literal("external_footprint_load_error"),
|
|
2280
2311
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2281
2312
|
"external_footprint_load_error"
|
|
2282
2313
|
),
|
|
2283
|
-
pcb_component_id:
|
|
2284
|
-
source_component_id:
|
|
2285
|
-
pcb_group_id:
|
|
2286
|
-
subcircuit_id:
|
|
2287
|
-
footprinter_string:
|
|
2288
|
-
error_type:
|
|
2289
|
-
message:
|
|
2314
|
+
pcb_component_id: z106.string(),
|
|
2315
|
+
source_component_id: z106.string(),
|
|
2316
|
+
pcb_group_id: z106.string().optional(),
|
|
2317
|
+
subcircuit_id: z106.string().optional(),
|
|
2318
|
+
footprinter_string: z106.string().optional(),
|
|
2319
|
+
error_type: z106.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2320
|
+
message: z106.string()
|
|
2290
2321
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2291
2322
|
expectTypesMatch(true);
|
|
2292
2323
|
|
|
2293
2324
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2294
|
-
import { z as
|
|
2295
|
-
var circuit_json_footprint_load_error =
|
|
2296
|
-
type:
|
|
2325
|
+
import { z as z107 } from "zod";
|
|
2326
|
+
var circuit_json_footprint_load_error = z107.object({
|
|
2327
|
+
type: z107.literal("circuit_json_footprint_load_error"),
|
|
2297
2328
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2298
2329
|
"circuit_json_footprint_load_error"
|
|
2299
2330
|
),
|
|
2300
|
-
pcb_component_id:
|
|
2301
|
-
source_component_id:
|
|
2302
|
-
pcb_group_id:
|
|
2303
|
-
subcircuit_id:
|
|
2304
|
-
error_type:
|
|
2305
|
-
message:
|
|
2306
|
-
circuit_json:
|
|
2331
|
+
pcb_component_id: z107.string(),
|
|
2332
|
+
source_component_id: z107.string(),
|
|
2333
|
+
pcb_group_id: z107.string().optional(),
|
|
2334
|
+
subcircuit_id: z107.string().optional(),
|
|
2335
|
+
error_type: z107.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2336
|
+
message: z107.string(),
|
|
2337
|
+
circuit_json: z107.array(z107.any()).optional()
|
|
2307
2338
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2308
2339
|
expectTypesMatch(true);
|
|
2309
2340
|
|
|
2310
2341
|
// src/pcb/pcb_group.ts
|
|
2311
|
-
import { z as
|
|
2312
|
-
var pcb_group =
|
|
2313
|
-
type:
|
|
2342
|
+
import { z as z108 } from "zod";
|
|
2343
|
+
var pcb_group = z108.object({
|
|
2344
|
+
type: z108.literal("pcb_group"),
|
|
2314
2345
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2315
|
-
source_group_id:
|
|
2316
|
-
is_subcircuit:
|
|
2317
|
-
subcircuit_id:
|
|
2346
|
+
source_group_id: z108.string(),
|
|
2347
|
+
is_subcircuit: z108.boolean().optional(),
|
|
2348
|
+
subcircuit_id: z108.string().optional(),
|
|
2318
2349
|
width: length.optional(),
|
|
2319
2350
|
height: length.optional(),
|
|
2320
2351
|
center: point,
|
|
2321
|
-
outline:
|
|
2352
|
+
outline: z108.array(point).optional(),
|
|
2322
2353
|
anchor_position: point.optional(),
|
|
2323
|
-
anchor_alignment:
|
|
2324
|
-
pcb_component_ids:
|
|
2325
|
-
name:
|
|
2326
|
-
description:
|
|
2327
|
-
layout_mode:
|
|
2328
|
-
autorouter_configuration:
|
|
2354
|
+
anchor_alignment: z108.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
2355
|
+
pcb_component_ids: z108.array(z108.string()),
|
|
2356
|
+
name: z108.string().optional(),
|
|
2357
|
+
description: z108.string().optional(),
|
|
2358
|
+
layout_mode: z108.string().optional(),
|
|
2359
|
+
autorouter_configuration: z108.object({
|
|
2329
2360
|
trace_clearance: length
|
|
2330
2361
|
}).optional(),
|
|
2331
|
-
autorouter_used_string:
|
|
2362
|
+
autorouter_used_string: z108.string().optional()
|
|
2332
2363
|
}).describe("Defines a group of components on the PCB");
|
|
2333
2364
|
expectTypesMatch(true);
|
|
2334
2365
|
|
|
2335
2366
|
// src/pcb/pcb_autorouting_error.ts
|
|
2336
|
-
import { z as
|
|
2337
|
-
var pcb_autorouting_error =
|
|
2338
|
-
type:
|
|
2367
|
+
import { z as z109 } from "zod";
|
|
2368
|
+
var pcb_autorouting_error = z109.object({
|
|
2369
|
+
type: z109.literal("pcb_autorouting_error"),
|
|
2339
2370
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2340
|
-
error_type:
|
|
2341
|
-
message:
|
|
2342
|
-
subcircuit_id:
|
|
2371
|
+
error_type: z109.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2372
|
+
message: z109.string(),
|
|
2373
|
+
subcircuit_id: z109.string().optional()
|
|
2343
2374
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2344
2375
|
expectTypesMatch(true);
|
|
2345
2376
|
|
|
2346
2377
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2347
|
-
import { z as
|
|
2348
|
-
var pcb_manual_edit_conflict_warning =
|
|
2349
|
-
type:
|
|
2378
|
+
import { z as z110 } from "zod";
|
|
2379
|
+
var pcb_manual_edit_conflict_warning = z110.object({
|
|
2380
|
+
type: z110.literal("pcb_manual_edit_conflict_warning"),
|
|
2350
2381
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2351
2382
|
"pcb_manual_edit_conflict_warning"
|
|
2352
2383
|
),
|
|
2353
|
-
warning_type:
|
|
2354
|
-
message:
|
|
2355
|
-
pcb_component_id:
|
|
2356
|
-
pcb_group_id:
|
|
2357
|
-
subcircuit_id:
|
|
2358
|
-
source_component_id:
|
|
2384
|
+
warning_type: z110.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2385
|
+
message: z110.string(),
|
|
2386
|
+
pcb_component_id: z110.string(),
|
|
2387
|
+
pcb_group_id: z110.string().optional(),
|
|
2388
|
+
subcircuit_id: z110.string().optional(),
|
|
2389
|
+
source_component_id: z110.string()
|
|
2359
2390
|
}).describe(
|
|
2360
2391
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2361
2392
|
);
|
|
2362
2393
|
expectTypesMatch(true);
|
|
2363
2394
|
|
|
2364
2395
|
// src/pcb/pcb_breakout_point.ts
|
|
2365
|
-
import { z as
|
|
2366
|
-
var pcb_breakout_point =
|
|
2367
|
-
type:
|
|
2396
|
+
import { z as z111 } from "zod";
|
|
2397
|
+
var pcb_breakout_point = z111.object({
|
|
2398
|
+
type: z111.literal("pcb_breakout_point"),
|
|
2368
2399
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2369
|
-
pcb_group_id:
|
|
2370
|
-
subcircuit_id:
|
|
2371
|
-
source_trace_id:
|
|
2372
|
-
source_port_id:
|
|
2373
|
-
source_net_id:
|
|
2400
|
+
pcb_group_id: z111.string(),
|
|
2401
|
+
subcircuit_id: z111.string().optional(),
|
|
2402
|
+
source_trace_id: z111.string().optional(),
|
|
2403
|
+
source_port_id: z111.string().optional(),
|
|
2404
|
+
source_net_id: z111.string().optional(),
|
|
2374
2405
|
x: distance,
|
|
2375
2406
|
y: distance
|
|
2376
2407
|
}).describe(
|
|
@@ -2379,60 +2410,60 @@ var pcb_breakout_point = z110.object({
|
|
|
2379
2410
|
expectTypesMatch(true);
|
|
2380
2411
|
|
|
2381
2412
|
// src/pcb/pcb_ground_plane.ts
|
|
2382
|
-
import { z as
|
|
2383
|
-
var pcb_ground_plane =
|
|
2384
|
-
type:
|
|
2413
|
+
import { z as z112 } from "zod";
|
|
2414
|
+
var pcb_ground_plane = z112.object({
|
|
2415
|
+
type: z112.literal("pcb_ground_plane"),
|
|
2385
2416
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2386
|
-
source_pcb_ground_plane_id:
|
|
2387
|
-
source_net_id:
|
|
2388
|
-
pcb_group_id:
|
|
2389
|
-
subcircuit_id:
|
|
2417
|
+
source_pcb_ground_plane_id: z112.string(),
|
|
2418
|
+
source_net_id: z112.string(),
|
|
2419
|
+
pcb_group_id: z112.string().optional(),
|
|
2420
|
+
subcircuit_id: z112.string().optional()
|
|
2390
2421
|
}).describe("Defines a ground plane on the PCB");
|
|
2391
2422
|
expectTypesMatch(true);
|
|
2392
2423
|
|
|
2393
2424
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2394
|
-
import { z as
|
|
2395
|
-
var pcb_ground_plane_region =
|
|
2396
|
-
type:
|
|
2425
|
+
import { z as z113 } from "zod";
|
|
2426
|
+
var pcb_ground_plane_region = z113.object({
|
|
2427
|
+
type: z113.literal("pcb_ground_plane_region"),
|
|
2397
2428
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2398
2429
|
"pcb_ground_plane_region"
|
|
2399
2430
|
),
|
|
2400
|
-
pcb_ground_plane_id:
|
|
2401
|
-
pcb_group_id:
|
|
2402
|
-
subcircuit_id:
|
|
2431
|
+
pcb_ground_plane_id: z113.string(),
|
|
2432
|
+
pcb_group_id: z113.string().optional(),
|
|
2433
|
+
subcircuit_id: z113.string().optional(),
|
|
2403
2434
|
layer: layer_ref,
|
|
2404
|
-
points:
|
|
2435
|
+
points: z113.array(point)
|
|
2405
2436
|
}).describe("Defines a polygon region of a ground plane");
|
|
2406
2437
|
expectTypesMatch(true);
|
|
2407
2438
|
|
|
2408
2439
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2409
|
-
import { z as
|
|
2410
|
-
var pcb_thermal_spoke =
|
|
2411
|
-
type:
|
|
2440
|
+
import { z as z114 } from "zod";
|
|
2441
|
+
var pcb_thermal_spoke = z114.object({
|
|
2442
|
+
type: z114.literal("pcb_thermal_spoke"),
|
|
2412
2443
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2413
|
-
pcb_ground_plane_id:
|
|
2414
|
-
shape:
|
|
2415
|
-
spoke_count:
|
|
2444
|
+
pcb_ground_plane_id: z114.string(),
|
|
2445
|
+
shape: z114.string(),
|
|
2446
|
+
spoke_count: z114.number(),
|
|
2416
2447
|
spoke_thickness: distance,
|
|
2417
2448
|
spoke_inner_diameter: distance,
|
|
2418
2449
|
spoke_outer_diameter: distance,
|
|
2419
|
-
pcb_plated_hole_id:
|
|
2420
|
-
subcircuit_id:
|
|
2450
|
+
pcb_plated_hole_id: z114.string().optional(),
|
|
2451
|
+
subcircuit_id: z114.string().optional()
|
|
2421
2452
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2422
2453
|
expectTypesMatch(true);
|
|
2423
2454
|
|
|
2424
2455
|
// src/pcb/pcb_copper_pour.ts
|
|
2425
|
-
import { z as
|
|
2426
|
-
var pcb_copper_pour_base =
|
|
2427
|
-
type:
|
|
2456
|
+
import { z as z115 } from "zod";
|
|
2457
|
+
var pcb_copper_pour_base = z115.object({
|
|
2458
|
+
type: z115.literal("pcb_copper_pour"),
|
|
2428
2459
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2429
|
-
pcb_group_id:
|
|
2430
|
-
subcircuit_id:
|
|
2460
|
+
pcb_group_id: z115.string().optional(),
|
|
2461
|
+
subcircuit_id: z115.string().optional(),
|
|
2431
2462
|
layer: layer_ref,
|
|
2432
|
-
source_net_id:
|
|
2463
|
+
source_net_id: z115.string().optional()
|
|
2433
2464
|
});
|
|
2434
2465
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2435
|
-
shape:
|
|
2466
|
+
shape: z115.literal("rect"),
|
|
2436
2467
|
center: point,
|
|
2437
2468
|
width: length,
|
|
2438
2469
|
height: length,
|
|
@@ -2440,16 +2471,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2440
2471
|
});
|
|
2441
2472
|
expectTypesMatch(true);
|
|
2442
2473
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2443
|
-
shape:
|
|
2474
|
+
shape: z115.literal("brep"),
|
|
2444
2475
|
brep_shape
|
|
2445
2476
|
});
|
|
2446
2477
|
expectTypesMatch(true);
|
|
2447
2478
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2448
|
-
shape:
|
|
2449
|
-
points:
|
|
2479
|
+
shape: z115.literal("polygon"),
|
|
2480
|
+
points: z115.array(point)
|
|
2450
2481
|
});
|
|
2451
2482
|
expectTypesMatch(true);
|
|
2452
|
-
var pcb_copper_pour =
|
|
2483
|
+
var pcb_copper_pour = z115.discriminatedUnion("shape", [
|
|
2453
2484
|
pcb_copper_pour_rect,
|
|
2454
2485
|
pcb_copper_pour_brep,
|
|
2455
2486
|
pcb_copper_pour_polygon
|
|
@@ -2457,147 +2488,147 @@ var pcb_copper_pour = z114.discriminatedUnion("shape", [
|
|
|
2457
2488
|
expectTypesMatch(true);
|
|
2458
2489
|
|
|
2459
2490
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2460
|
-
import { z as
|
|
2461
|
-
var pcb_component_outside_board_error =
|
|
2462
|
-
type:
|
|
2491
|
+
import { z as z116 } from "zod";
|
|
2492
|
+
var pcb_component_outside_board_error = z116.object({
|
|
2493
|
+
type: z116.literal("pcb_component_outside_board_error"),
|
|
2463
2494
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2464
2495
|
"pcb_component_outside_board_error"
|
|
2465
2496
|
),
|
|
2466
|
-
error_type:
|
|
2467
|
-
message:
|
|
2468
|
-
pcb_component_id:
|
|
2469
|
-
pcb_board_id:
|
|
2497
|
+
error_type: z116.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2498
|
+
message: z116.string(),
|
|
2499
|
+
pcb_component_id: z116.string(),
|
|
2500
|
+
pcb_board_id: z116.string(),
|
|
2470
2501
|
component_center: point,
|
|
2471
|
-
component_bounds:
|
|
2472
|
-
min_x:
|
|
2473
|
-
max_x:
|
|
2474
|
-
min_y:
|
|
2475
|
-
max_y:
|
|
2502
|
+
component_bounds: z116.object({
|
|
2503
|
+
min_x: z116.number(),
|
|
2504
|
+
max_x: z116.number(),
|
|
2505
|
+
min_y: z116.number(),
|
|
2506
|
+
max_y: z116.number()
|
|
2476
2507
|
}),
|
|
2477
|
-
subcircuit_id:
|
|
2478
|
-
source_component_id:
|
|
2508
|
+
subcircuit_id: z116.string().optional(),
|
|
2509
|
+
source_component_id: z116.string().optional()
|
|
2479
2510
|
}).describe(
|
|
2480
2511
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2481
2512
|
);
|
|
2482
2513
|
expectTypesMatch(true);
|
|
2483
2514
|
|
|
2484
2515
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2485
|
-
import { z as
|
|
2486
|
-
var pcb_component_invalid_layer_error =
|
|
2487
|
-
type:
|
|
2516
|
+
import { z as z117 } from "zod";
|
|
2517
|
+
var pcb_component_invalid_layer_error = z117.object({
|
|
2518
|
+
type: z117.literal("pcb_component_invalid_layer_error"),
|
|
2488
2519
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2489
2520
|
"pcb_component_invalid_layer_error"
|
|
2490
2521
|
),
|
|
2491
|
-
error_type:
|
|
2492
|
-
message:
|
|
2493
|
-
pcb_component_id:
|
|
2494
|
-
source_component_id:
|
|
2522
|
+
error_type: z117.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2523
|
+
message: z117.string(),
|
|
2524
|
+
pcb_component_id: z117.string().optional(),
|
|
2525
|
+
source_component_id: z117.string(),
|
|
2495
2526
|
layer: layer_ref,
|
|
2496
|
-
subcircuit_id:
|
|
2527
|
+
subcircuit_id: z117.string().optional()
|
|
2497
2528
|
}).describe(
|
|
2498
2529
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2499
2530
|
);
|
|
2500
2531
|
expectTypesMatch(true);
|
|
2501
2532
|
|
|
2502
2533
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2503
|
-
import { z as
|
|
2504
|
-
var pcb_via_clearance_error =
|
|
2505
|
-
type:
|
|
2534
|
+
import { z as z118 } from "zod";
|
|
2535
|
+
var pcb_via_clearance_error = z118.object({
|
|
2536
|
+
type: z118.literal("pcb_via_clearance_error"),
|
|
2506
2537
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2507
|
-
error_type:
|
|
2508
|
-
message:
|
|
2509
|
-
pcb_via_ids:
|
|
2538
|
+
error_type: z118.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2539
|
+
message: z118.string(),
|
|
2540
|
+
pcb_via_ids: z118.array(z118.string()).min(2),
|
|
2510
2541
|
minimum_clearance: distance.optional(),
|
|
2511
2542
|
actual_clearance: distance.optional(),
|
|
2512
|
-
pcb_center:
|
|
2513
|
-
x:
|
|
2514
|
-
y:
|
|
2543
|
+
pcb_center: z118.object({
|
|
2544
|
+
x: z118.number().optional(),
|
|
2545
|
+
y: z118.number().optional()
|
|
2515
2546
|
}).optional(),
|
|
2516
|
-
subcircuit_id:
|
|
2547
|
+
subcircuit_id: z118.string().optional()
|
|
2517
2548
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2518
2549
|
expectTypesMatch(true);
|
|
2519
2550
|
|
|
2520
2551
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2521
|
-
import { z as
|
|
2522
|
-
var pcb_courtyard_rect =
|
|
2523
|
-
type:
|
|
2552
|
+
import { z as z119 } from "zod";
|
|
2553
|
+
var pcb_courtyard_rect = z119.object({
|
|
2554
|
+
type: z119.literal("pcb_courtyard_rect"),
|
|
2524
2555
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2525
|
-
pcb_component_id:
|
|
2526
|
-
pcb_group_id:
|
|
2527
|
-
subcircuit_id:
|
|
2556
|
+
pcb_component_id: z119.string(),
|
|
2557
|
+
pcb_group_id: z119.string().optional(),
|
|
2558
|
+
subcircuit_id: z119.string().optional(),
|
|
2528
2559
|
center: point,
|
|
2529
2560
|
width: length,
|
|
2530
2561
|
height: length,
|
|
2531
2562
|
layer: visible_layer,
|
|
2532
|
-
color:
|
|
2563
|
+
color: z119.string().optional()
|
|
2533
2564
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2534
2565
|
expectTypesMatch(true);
|
|
2535
2566
|
|
|
2536
2567
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2537
|
-
import { z as
|
|
2538
|
-
var pcb_courtyard_outline =
|
|
2539
|
-
type:
|
|
2568
|
+
import { z as z120 } from "zod";
|
|
2569
|
+
var pcb_courtyard_outline = z120.object({
|
|
2570
|
+
type: z120.literal("pcb_courtyard_outline"),
|
|
2540
2571
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2541
2572
|
"pcb_courtyard_outline"
|
|
2542
2573
|
),
|
|
2543
|
-
pcb_component_id:
|
|
2544
|
-
pcb_group_id:
|
|
2545
|
-
subcircuit_id:
|
|
2574
|
+
pcb_component_id: z120.string(),
|
|
2575
|
+
pcb_group_id: z120.string().optional(),
|
|
2576
|
+
subcircuit_id: z120.string().optional(),
|
|
2546
2577
|
layer: visible_layer,
|
|
2547
|
-
outline:
|
|
2578
|
+
outline: z120.array(point).min(2),
|
|
2548
2579
|
stroke_width: length.default("0.1mm"),
|
|
2549
|
-
is_closed:
|
|
2550
|
-
is_stroke_dashed:
|
|
2551
|
-
color:
|
|
2580
|
+
is_closed: z120.boolean().optional(),
|
|
2581
|
+
is_stroke_dashed: z120.boolean().optional(),
|
|
2582
|
+
color: z120.string().optional()
|
|
2552
2583
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2553
2584
|
expectTypesMatch(true);
|
|
2554
2585
|
|
|
2555
2586
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2556
|
-
import { z as
|
|
2557
|
-
var pcb_courtyard_polygon =
|
|
2558
|
-
type:
|
|
2587
|
+
import { z as z121 } from "zod";
|
|
2588
|
+
var pcb_courtyard_polygon = z121.object({
|
|
2589
|
+
type: z121.literal("pcb_courtyard_polygon"),
|
|
2559
2590
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2560
2591
|
"pcb_courtyard_polygon"
|
|
2561
2592
|
),
|
|
2562
|
-
pcb_component_id:
|
|
2563
|
-
pcb_group_id:
|
|
2564
|
-
subcircuit_id:
|
|
2593
|
+
pcb_component_id: z121.string(),
|
|
2594
|
+
pcb_group_id: z121.string().optional(),
|
|
2595
|
+
subcircuit_id: z121.string().optional(),
|
|
2565
2596
|
layer: visible_layer,
|
|
2566
|
-
points:
|
|
2567
|
-
color:
|
|
2597
|
+
points: z121.array(point).min(3),
|
|
2598
|
+
color: z121.string().optional()
|
|
2568
2599
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2569
2600
|
expectTypesMatch(true);
|
|
2570
2601
|
|
|
2571
2602
|
// src/cad/cad_component.ts
|
|
2572
|
-
import { z as
|
|
2573
|
-
var cad_component =
|
|
2574
|
-
type:
|
|
2575
|
-
cad_component_id:
|
|
2576
|
-
pcb_component_id:
|
|
2577
|
-
source_component_id:
|
|
2603
|
+
import { z as z122 } from "zod";
|
|
2604
|
+
var cad_component = z122.object({
|
|
2605
|
+
type: z122.literal("cad_component"),
|
|
2606
|
+
cad_component_id: z122.string(),
|
|
2607
|
+
pcb_component_id: z122.string(),
|
|
2608
|
+
source_component_id: z122.string(),
|
|
2578
2609
|
position: point3,
|
|
2579
2610
|
rotation: point3.optional(),
|
|
2580
2611
|
size: point3.optional(),
|
|
2581
2612
|
layer: layer_ref.optional(),
|
|
2582
|
-
subcircuit_id:
|
|
2613
|
+
subcircuit_id: z122.string().optional(),
|
|
2583
2614
|
// These are all ways to generate/load the 3d model
|
|
2584
|
-
footprinter_string:
|
|
2585
|
-
model_obj_url:
|
|
2586
|
-
model_stl_url:
|
|
2587
|
-
model_3mf_url:
|
|
2588
|
-
model_gltf_url:
|
|
2589
|
-
model_glb_url:
|
|
2590
|
-
model_step_url:
|
|
2591
|
-
model_wrl_url:
|
|
2592
|
-
model_unit_to_mm_scale_factor:
|
|
2593
|
-
model_jscad:
|
|
2615
|
+
footprinter_string: z122.string().optional(),
|
|
2616
|
+
model_obj_url: z122.string().optional(),
|
|
2617
|
+
model_stl_url: z122.string().optional(),
|
|
2618
|
+
model_3mf_url: z122.string().optional(),
|
|
2619
|
+
model_gltf_url: z122.string().optional(),
|
|
2620
|
+
model_glb_url: z122.string().optional(),
|
|
2621
|
+
model_step_url: z122.string().optional(),
|
|
2622
|
+
model_wrl_url: z122.string().optional(),
|
|
2623
|
+
model_unit_to_mm_scale_factor: z122.number().optional(),
|
|
2624
|
+
model_jscad: z122.any().optional()
|
|
2594
2625
|
}).describe("Defines a component on the PCB");
|
|
2595
2626
|
expectTypesMatch(true);
|
|
2596
2627
|
|
|
2597
2628
|
// src/simulation/simulation_voltage_source.ts
|
|
2598
|
-
import { z as
|
|
2599
|
-
var wave_shape =
|
|
2600
|
-
var percentage =
|
|
2629
|
+
import { z as z123 } from "zod";
|
|
2630
|
+
var wave_shape = z123.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2631
|
+
var percentage = z123.union([z123.string(), z123.number()]).transform((val) => {
|
|
2601
2632
|
if (typeof val === "string") {
|
|
2602
2633
|
if (val.endsWith("%")) {
|
|
2603
2634
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2606,30 +2637,30 @@ var percentage = z122.union([z122.string(), z122.number()]).transform((val) => {
|
|
|
2606
2637
|
}
|
|
2607
2638
|
return val;
|
|
2608
2639
|
}).pipe(
|
|
2609
|
-
|
|
2640
|
+
z123.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2610
2641
|
);
|
|
2611
|
-
var simulation_dc_voltage_source =
|
|
2612
|
-
type:
|
|
2642
|
+
var simulation_dc_voltage_source = z123.object({
|
|
2643
|
+
type: z123.literal("simulation_voltage_source"),
|
|
2613
2644
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2614
2645
|
"simulation_voltage_source"
|
|
2615
2646
|
),
|
|
2616
|
-
is_dc_source:
|
|
2617
|
-
positive_source_port_id:
|
|
2618
|
-
negative_source_port_id:
|
|
2619
|
-
positive_source_net_id:
|
|
2620
|
-
negative_source_net_id:
|
|
2647
|
+
is_dc_source: z123.literal(true).optional().default(true),
|
|
2648
|
+
positive_source_port_id: z123.string().optional(),
|
|
2649
|
+
negative_source_port_id: z123.string().optional(),
|
|
2650
|
+
positive_source_net_id: z123.string().optional(),
|
|
2651
|
+
negative_source_net_id: z123.string().optional(),
|
|
2621
2652
|
voltage
|
|
2622
2653
|
}).describe("Defines a DC voltage source for simulation");
|
|
2623
|
-
var simulation_ac_voltage_source =
|
|
2624
|
-
type:
|
|
2654
|
+
var simulation_ac_voltage_source = z123.object({
|
|
2655
|
+
type: z123.literal("simulation_voltage_source"),
|
|
2625
2656
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2626
2657
|
"simulation_voltage_source"
|
|
2627
2658
|
),
|
|
2628
|
-
is_dc_source:
|
|
2629
|
-
terminal1_source_port_id:
|
|
2630
|
-
terminal2_source_port_id:
|
|
2631
|
-
terminal1_source_net_id:
|
|
2632
|
-
terminal2_source_net_id:
|
|
2659
|
+
is_dc_source: z123.literal(false),
|
|
2660
|
+
terminal1_source_port_id: z123.string().optional(),
|
|
2661
|
+
terminal2_source_port_id: z123.string().optional(),
|
|
2662
|
+
terminal1_source_net_id: z123.string().optional(),
|
|
2663
|
+
terminal2_source_net_id: z123.string().optional(),
|
|
2633
2664
|
voltage: voltage.optional(),
|
|
2634
2665
|
frequency: frequency.optional(),
|
|
2635
2666
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2637,25 +2668,25 @@ var simulation_ac_voltage_source = z122.object({
|
|
|
2637
2668
|
phase: rotation.optional(),
|
|
2638
2669
|
duty_cycle: percentage.optional()
|
|
2639
2670
|
}).describe("Defines an AC voltage source for simulation");
|
|
2640
|
-
var simulation_voltage_source =
|
|
2671
|
+
var simulation_voltage_source = z123.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2641
2672
|
expectTypesMatch(true);
|
|
2642
2673
|
expectTypesMatch(true);
|
|
2643
2674
|
expectTypesMatch(true);
|
|
2644
2675
|
|
|
2645
2676
|
// src/simulation/simulation_experiment.ts
|
|
2646
|
-
import { z as
|
|
2647
|
-
var experiment_type =
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2677
|
+
import { z as z124 } from "zod";
|
|
2678
|
+
var experiment_type = z124.union([
|
|
2679
|
+
z124.literal("spice_dc_sweep"),
|
|
2680
|
+
z124.literal("spice_dc_operating_point"),
|
|
2681
|
+
z124.literal("spice_transient_analysis"),
|
|
2682
|
+
z124.literal("spice_ac_analysis")
|
|
2652
2683
|
]);
|
|
2653
|
-
var simulation_experiment =
|
|
2654
|
-
type:
|
|
2684
|
+
var simulation_experiment = z124.object({
|
|
2685
|
+
type: z124.literal("simulation_experiment"),
|
|
2655
2686
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2656
2687
|
"simulation_experiment"
|
|
2657
2688
|
),
|
|
2658
|
-
name:
|
|
2689
|
+
name: z124.string(),
|
|
2659
2690
|
experiment_type,
|
|
2660
2691
|
time_per_step: duration_ms.optional(),
|
|
2661
2692
|
start_time_ms: ms.optional(),
|
|
@@ -2664,49 +2695,49 @@ var simulation_experiment = z123.object({
|
|
|
2664
2695
|
expectTypesMatch(true);
|
|
2665
2696
|
|
|
2666
2697
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2667
|
-
import { z as
|
|
2668
|
-
var simulation_transient_voltage_graph =
|
|
2669
|
-
type:
|
|
2698
|
+
import { z as z125 } from "zod";
|
|
2699
|
+
var simulation_transient_voltage_graph = z125.object({
|
|
2700
|
+
type: z125.literal("simulation_transient_voltage_graph"),
|
|
2670
2701
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2671
2702
|
"simulation_transient_voltage_graph"
|
|
2672
2703
|
),
|
|
2673
|
-
simulation_experiment_id:
|
|
2674
|
-
timestamps_ms:
|
|
2675
|
-
voltage_levels:
|
|
2676
|
-
schematic_voltage_probe_id:
|
|
2677
|
-
simulation_voltage_probe_id:
|
|
2678
|
-
subcircuit_connectivity_map_key:
|
|
2704
|
+
simulation_experiment_id: z125.string(),
|
|
2705
|
+
timestamps_ms: z125.array(z125.number()).optional(),
|
|
2706
|
+
voltage_levels: z125.array(z125.number()),
|
|
2707
|
+
schematic_voltage_probe_id: z125.string().optional(),
|
|
2708
|
+
simulation_voltage_probe_id: z125.string().optional(),
|
|
2709
|
+
subcircuit_connectivity_map_key: z125.string().optional(),
|
|
2679
2710
|
time_per_step: duration_ms,
|
|
2680
2711
|
start_time_ms: ms,
|
|
2681
2712
|
end_time_ms: ms,
|
|
2682
|
-
name:
|
|
2713
|
+
name: z125.string().optional()
|
|
2683
2714
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2684
2715
|
expectTypesMatch(true);
|
|
2685
2716
|
|
|
2686
2717
|
// src/simulation/simulation_switch.ts
|
|
2687
|
-
import { z as
|
|
2688
|
-
var simulation_switch =
|
|
2689
|
-
type:
|
|
2718
|
+
import { z as z126 } from "zod";
|
|
2719
|
+
var simulation_switch = z126.object({
|
|
2720
|
+
type: z126.literal("simulation_switch"),
|
|
2690
2721
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2691
|
-
source_component_id:
|
|
2722
|
+
source_component_id: z126.string().optional(),
|
|
2692
2723
|
closes_at: ms.optional(),
|
|
2693
2724
|
opens_at: ms.optional(),
|
|
2694
|
-
starts_closed:
|
|
2725
|
+
starts_closed: z126.boolean().optional(),
|
|
2695
2726
|
switching_frequency: frequency.optional()
|
|
2696
2727
|
}).describe("Defines a switch for simulation timing control");
|
|
2697
2728
|
expectTypesMatch(true);
|
|
2698
2729
|
|
|
2699
2730
|
// src/simulation/simulation_voltage_probe.ts
|
|
2700
|
-
import { z as
|
|
2701
|
-
var simulation_voltage_probe =
|
|
2702
|
-
type:
|
|
2731
|
+
import { z as z127 } from "zod";
|
|
2732
|
+
var simulation_voltage_probe = z127.object({
|
|
2733
|
+
type: z127.literal("simulation_voltage_probe"),
|
|
2703
2734
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2704
2735
|
"simulation_voltage_probe"
|
|
2705
2736
|
),
|
|
2706
|
-
source_port_id:
|
|
2707
|
-
source_net_id:
|
|
2708
|
-
name:
|
|
2709
|
-
subcircuit_id:
|
|
2737
|
+
source_port_id: z127.string().optional(),
|
|
2738
|
+
source_net_id: z127.string().optional(),
|
|
2739
|
+
name: z127.string().optional(),
|
|
2740
|
+
subcircuit_id: z127.string().optional()
|
|
2710
2741
|
}).describe(
|
|
2711
2742
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2712
2743
|
).refine(
|
|
@@ -2718,8 +2749,8 @@ var simulation_voltage_probe = z126.object({
|
|
|
2718
2749
|
expectTypesMatch(true);
|
|
2719
2750
|
|
|
2720
2751
|
// src/any_circuit_element.ts
|
|
2721
|
-
import { z as
|
|
2722
|
-
var any_circuit_element =
|
|
2752
|
+
import { z as z128 } from "zod";
|
|
2753
|
+
var any_circuit_element = z128.union([
|
|
2723
2754
|
source_trace,
|
|
2724
2755
|
source_port,
|
|
2725
2756
|
any_source_component,
|
|
@@ -2771,6 +2802,7 @@ var any_circuit_element = z127.union([
|
|
|
2771
2802
|
pcb_silkscreen_line,
|
|
2772
2803
|
pcb_silkscreen_path,
|
|
2773
2804
|
pcb_silkscreen_text,
|
|
2805
|
+
pcb_copper_text,
|
|
2774
2806
|
pcb_silkscreen_rect,
|
|
2775
2807
|
pcb_silkscreen_circle,
|
|
2776
2808
|
pcb_silkscreen_oval,
|
|
@@ -2864,6 +2896,7 @@ export {
|
|
|
2864
2896
|
pcb_copper_pour_brep,
|
|
2865
2897
|
pcb_copper_pour_polygon,
|
|
2866
2898
|
pcb_copper_pour_rect,
|
|
2899
|
+
pcb_copper_text,
|
|
2867
2900
|
pcb_courtyard_outline,
|
|
2868
2901
|
pcb_courtyard_polygon,
|
|
2869
2902
|
pcb_courtyard_rect,
|