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