circuit-json 0.0.274 → 0.0.275
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 +78 -0
- package/dist/index.d.mts +590 -2
- package/dist/index.mjs +290 -223
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1963,64 +1963,86 @@ var pcb_fabrication_note_path = z91.object({
|
|
|
1963
1963
|
);
|
|
1964
1964
|
expectTypesMatch(true);
|
|
1965
1965
|
|
|
1966
|
-
// src/pcb/
|
|
1966
|
+
// src/pcb/pcb_fabrication_note_rect.ts
|
|
1967
1967
|
import { z as z92 } from "zod";
|
|
1968
|
-
var
|
|
1969
|
-
type: z92.literal("
|
|
1968
|
+
var pcb_fabrication_note_rect = z92.object({
|
|
1969
|
+
type: z92.literal("pcb_fabrication_note_rect"),
|
|
1970
|
+
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
1971
|
+
"pcb_fabrication_note_rect"
|
|
1972
|
+
),
|
|
1973
|
+
pcb_component_id: z92.string(),
|
|
1974
|
+
pcb_group_id: z92.string().optional(),
|
|
1975
|
+
subcircuit_id: z92.string().optional(),
|
|
1976
|
+
center: point,
|
|
1977
|
+
width: length,
|
|
1978
|
+
height: length,
|
|
1979
|
+
layer: visible_layer,
|
|
1980
|
+
stroke_width: length.default("0.1mm"),
|
|
1981
|
+
is_filled: z92.boolean().optional(),
|
|
1982
|
+
has_stroke: z92.boolean().optional(),
|
|
1983
|
+
is_stroke_dashed: z92.boolean().optional(),
|
|
1984
|
+
color: z92.string().optional()
|
|
1985
|
+
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
1986
|
+
expectTypesMatch(true);
|
|
1987
|
+
|
|
1988
|
+
// src/pcb/pcb_footprint_overlap_error.ts
|
|
1989
|
+
import { z as z93 } from "zod";
|
|
1990
|
+
var pcb_footprint_overlap_error = z93.object({
|
|
1991
|
+
type: z93.literal("pcb_footprint_overlap_error"),
|
|
1970
1992
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1971
|
-
error_type:
|
|
1972
|
-
message:
|
|
1973
|
-
pcb_smtpad_ids:
|
|
1974
|
-
pcb_plated_hole_ids:
|
|
1975
|
-
pcb_hole_ids:
|
|
1976
|
-
pcb_keepout_ids:
|
|
1993
|
+
error_type: z93.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
1994
|
+
message: z93.string(),
|
|
1995
|
+
pcb_smtpad_ids: z93.array(z93.string()).optional(),
|
|
1996
|
+
pcb_plated_hole_ids: z93.array(z93.string()).optional(),
|
|
1997
|
+
pcb_hole_ids: z93.array(z93.string()).optional(),
|
|
1998
|
+
pcb_keepout_ids: z93.array(z93.string()).optional()
|
|
1977
1999
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
1978
2000
|
expectTypesMatch(
|
|
1979
2001
|
true
|
|
1980
2002
|
);
|
|
1981
2003
|
|
|
1982
2004
|
// src/pcb/pcb_keepout.ts
|
|
1983
|
-
import { z as
|
|
1984
|
-
var pcb_keepout =
|
|
1985
|
-
type:
|
|
1986
|
-
shape:
|
|
1987
|
-
pcb_group_id:
|
|
1988
|
-
subcircuit_id:
|
|
2005
|
+
import { z as z94 } from "zod";
|
|
2006
|
+
var pcb_keepout = z94.object({
|
|
2007
|
+
type: z94.literal("pcb_keepout"),
|
|
2008
|
+
shape: z94.literal("rect"),
|
|
2009
|
+
pcb_group_id: z94.string().optional(),
|
|
2010
|
+
subcircuit_id: z94.string().optional(),
|
|
1989
2011
|
center: point,
|
|
1990
2012
|
width: distance,
|
|
1991
2013
|
height: distance,
|
|
1992
|
-
pcb_keepout_id:
|
|
1993
|
-
layers:
|
|
2014
|
+
pcb_keepout_id: z94.string(),
|
|
2015
|
+
layers: z94.array(z94.string()),
|
|
1994
2016
|
// Specify layers where the keepout applies
|
|
1995
|
-
description:
|
|
2017
|
+
description: z94.string().optional()
|
|
1996
2018
|
// Optional description of the keepout
|
|
1997
2019
|
}).or(
|
|
1998
|
-
|
|
1999
|
-
type:
|
|
2000
|
-
shape:
|
|
2001
|
-
pcb_group_id:
|
|
2002
|
-
subcircuit_id:
|
|
2020
|
+
z94.object({
|
|
2021
|
+
type: z94.literal("pcb_keepout"),
|
|
2022
|
+
shape: z94.literal("circle"),
|
|
2023
|
+
pcb_group_id: z94.string().optional(),
|
|
2024
|
+
subcircuit_id: z94.string().optional(),
|
|
2003
2025
|
center: point,
|
|
2004
2026
|
radius: distance,
|
|
2005
|
-
pcb_keepout_id:
|
|
2006
|
-
layers:
|
|
2027
|
+
pcb_keepout_id: z94.string(),
|
|
2028
|
+
layers: z94.array(z94.string()),
|
|
2007
2029
|
// Specify layers where the keepout applies
|
|
2008
|
-
description:
|
|
2030
|
+
description: z94.string().optional()
|
|
2009
2031
|
// Optional description of the keepout
|
|
2010
2032
|
})
|
|
2011
2033
|
);
|
|
2012
2034
|
expectTypesMatch(true);
|
|
2013
2035
|
|
|
2014
2036
|
// src/pcb/pcb_cutout.ts
|
|
2015
|
-
import { z as
|
|
2016
|
-
var pcb_cutout_base =
|
|
2017
|
-
type:
|
|
2037
|
+
import { z as z95 } from "zod";
|
|
2038
|
+
var pcb_cutout_base = z95.object({
|
|
2039
|
+
type: z95.literal("pcb_cutout"),
|
|
2018
2040
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2019
|
-
pcb_group_id:
|
|
2020
|
-
subcircuit_id:
|
|
2041
|
+
pcb_group_id: z95.string().optional(),
|
|
2042
|
+
subcircuit_id: z95.string().optional()
|
|
2021
2043
|
});
|
|
2022
2044
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2023
|
-
shape:
|
|
2045
|
+
shape: z95.literal("rect"),
|
|
2024
2046
|
center: point,
|
|
2025
2047
|
width: length,
|
|
2026
2048
|
height: length,
|
|
@@ -2028,17 +2050,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2028
2050
|
});
|
|
2029
2051
|
expectTypesMatch(true);
|
|
2030
2052
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2031
|
-
shape:
|
|
2053
|
+
shape: z95.literal("circle"),
|
|
2032
2054
|
center: point,
|
|
2033
2055
|
radius: length
|
|
2034
2056
|
});
|
|
2035
2057
|
expectTypesMatch(true);
|
|
2036
2058
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2037
|
-
shape:
|
|
2038
|
-
points:
|
|
2059
|
+
shape: z95.literal("polygon"),
|
|
2060
|
+
points: z95.array(point)
|
|
2039
2061
|
});
|
|
2040
2062
|
expectTypesMatch(true);
|
|
2041
|
-
var pcb_cutout =
|
|
2063
|
+
var pcb_cutout = z95.discriminatedUnion("shape", [
|
|
2042
2064
|
pcb_cutout_rect,
|
|
2043
2065
|
pcb_cutout_circle,
|
|
2044
2066
|
pcb_cutout_polygon
|
|
@@ -2046,117 +2068,117 @@ var pcb_cutout = z94.discriminatedUnion("shape", [
|
|
|
2046
2068
|
expectTypesMatch(true);
|
|
2047
2069
|
|
|
2048
2070
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2049
|
-
import { z as
|
|
2050
|
-
var pcb_missing_footprint_error =
|
|
2051
|
-
type:
|
|
2071
|
+
import { z as z96 } from "zod";
|
|
2072
|
+
var pcb_missing_footprint_error = z96.object({
|
|
2073
|
+
type: z96.literal("pcb_missing_footprint_error"),
|
|
2052
2074
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2053
2075
|
"pcb_missing_footprint_error"
|
|
2054
2076
|
),
|
|
2055
|
-
pcb_group_id:
|
|
2056
|
-
subcircuit_id:
|
|
2057
|
-
error_type:
|
|
2058
|
-
source_component_id:
|
|
2059
|
-
message:
|
|
2077
|
+
pcb_group_id: z96.string().optional(),
|
|
2078
|
+
subcircuit_id: z96.string().optional(),
|
|
2079
|
+
error_type: z96.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2080
|
+
source_component_id: z96.string(),
|
|
2081
|
+
message: z96.string()
|
|
2060
2082
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2061
2083
|
expectTypesMatch(
|
|
2062
2084
|
true
|
|
2063
2085
|
);
|
|
2064
2086
|
|
|
2065
2087
|
// src/pcb/external_footprint_load_error.ts
|
|
2066
|
-
import { z as
|
|
2067
|
-
var external_footprint_load_error =
|
|
2068
|
-
type:
|
|
2088
|
+
import { z as z97 } from "zod";
|
|
2089
|
+
var external_footprint_load_error = z97.object({
|
|
2090
|
+
type: z97.literal("external_footprint_load_error"),
|
|
2069
2091
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2070
2092
|
"external_footprint_load_error"
|
|
2071
2093
|
),
|
|
2072
|
-
pcb_component_id:
|
|
2073
|
-
source_component_id:
|
|
2074
|
-
pcb_group_id:
|
|
2075
|
-
subcircuit_id:
|
|
2076
|
-
footprinter_string:
|
|
2077
|
-
error_type:
|
|
2078
|
-
message:
|
|
2094
|
+
pcb_component_id: z97.string(),
|
|
2095
|
+
source_component_id: z97.string(),
|
|
2096
|
+
pcb_group_id: z97.string().optional(),
|
|
2097
|
+
subcircuit_id: z97.string().optional(),
|
|
2098
|
+
footprinter_string: z97.string().optional(),
|
|
2099
|
+
error_type: z97.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2100
|
+
message: z97.string()
|
|
2079
2101
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2080
2102
|
expectTypesMatch(true);
|
|
2081
2103
|
|
|
2082
2104
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2083
|
-
import { z as
|
|
2084
|
-
var circuit_json_footprint_load_error =
|
|
2085
|
-
type:
|
|
2105
|
+
import { z as z98 } from "zod";
|
|
2106
|
+
var circuit_json_footprint_load_error = z98.object({
|
|
2107
|
+
type: z98.literal("circuit_json_footprint_load_error"),
|
|
2086
2108
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2087
2109
|
"circuit_json_footprint_load_error"
|
|
2088
2110
|
),
|
|
2089
|
-
pcb_component_id:
|
|
2090
|
-
source_component_id:
|
|
2091
|
-
pcb_group_id:
|
|
2092
|
-
subcircuit_id:
|
|
2093
|
-
error_type:
|
|
2094
|
-
message:
|
|
2095
|
-
circuit_json:
|
|
2111
|
+
pcb_component_id: z98.string(),
|
|
2112
|
+
source_component_id: z98.string(),
|
|
2113
|
+
pcb_group_id: z98.string().optional(),
|
|
2114
|
+
subcircuit_id: z98.string().optional(),
|
|
2115
|
+
error_type: z98.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2116
|
+
message: z98.string(),
|
|
2117
|
+
circuit_json: z98.array(z98.any()).optional()
|
|
2096
2118
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2097
2119
|
expectTypesMatch(true);
|
|
2098
2120
|
|
|
2099
2121
|
// src/pcb/pcb_group.ts
|
|
2100
|
-
import { z as
|
|
2101
|
-
var pcb_group =
|
|
2102
|
-
type:
|
|
2122
|
+
import { z as z99 } from "zod";
|
|
2123
|
+
var pcb_group = z99.object({
|
|
2124
|
+
type: z99.literal("pcb_group"),
|
|
2103
2125
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2104
|
-
source_group_id:
|
|
2105
|
-
is_subcircuit:
|
|
2106
|
-
subcircuit_id:
|
|
2126
|
+
source_group_id: z99.string(),
|
|
2127
|
+
is_subcircuit: z99.boolean().optional(),
|
|
2128
|
+
subcircuit_id: z99.string().optional(),
|
|
2107
2129
|
width: length,
|
|
2108
2130
|
height: length,
|
|
2109
2131
|
center: point,
|
|
2110
|
-
pcb_component_ids:
|
|
2111
|
-
name:
|
|
2112
|
-
description:
|
|
2113
|
-
layout_mode:
|
|
2114
|
-
autorouter_configuration:
|
|
2132
|
+
pcb_component_ids: z99.array(z99.string()),
|
|
2133
|
+
name: z99.string().optional(),
|
|
2134
|
+
description: z99.string().optional(),
|
|
2135
|
+
layout_mode: z99.string().optional(),
|
|
2136
|
+
autorouter_configuration: z99.object({
|
|
2115
2137
|
trace_clearance: length
|
|
2116
2138
|
}).optional(),
|
|
2117
|
-
autorouter_used_string:
|
|
2139
|
+
autorouter_used_string: z99.string().optional()
|
|
2118
2140
|
}).describe("Defines a group of components on the PCB");
|
|
2119
2141
|
expectTypesMatch(true);
|
|
2120
2142
|
|
|
2121
2143
|
// src/pcb/pcb_autorouting_error.ts
|
|
2122
|
-
import { z as
|
|
2123
|
-
var pcb_autorouting_error =
|
|
2124
|
-
type:
|
|
2144
|
+
import { z as z100 } from "zod";
|
|
2145
|
+
var pcb_autorouting_error = z100.object({
|
|
2146
|
+
type: z100.literal("pcb_autorouting_error"),
|
|
2125
2147
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2126
|
-
error_type:
|
|
2127
|
-
message:
|
|
2128
|
-
subcircuit_id:
|
|
2148
|
+
error_type: z100.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2149
|
+
message: z100.string(),
|
|
2150
|
+
subcircuit_id: z100.string().optional()
|
|
2129
2151
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2130
2152
|
expectTypesMatch(true);
|
|
2131
2153
|
|
|
2132
2154
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2133
|
-
import { z as
|
|
2134
|
-
var pcb_manual_edit_conflict_warning =
|
|
2135
|
-
type:
|
|
2155
|
+
import { z as z101 } from "zod";
|
|
2156
|
+
var pcb_manual_edit_conflict_warning = z101.object({
|
|
2157
|
+
type: z101.literal("pcb_manual_edit_conflict_warning"),
|
|
2136
2158
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2137
2159
|
"pcb_manual_edit_conflict_warning"
|
|
2138
2160
|
),
|
|
2139
|
-
warning_type:
|
|
2140
|
-
message:
|
|
2141
|
-
pcb_component_id:
|
|
2142
|
-
pcb_group_id:
|
|
2143
|
-
subcircuit_id:
|
|
2144
|
-
source_component_id:
|
|
2161
|
+
warning_type: z101.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2162
|
+
message: z101.string(),
|
|
2163
|
+
pcb_component_id: z101.string(),
|
|
2164
|
+
pcb_group_id: z101.string().optional(),
|
|
2165
|
+
subcircuit_id: z101.string().optional(),
|
|
2166
|
+
source_component_id: z101.string()
|
|
2145
2167
|
}).describe(
|
|
2146
2168
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2147
2169
|
);
|
|
2148
2170
|
expectTypesMatch(true);
|
|
2149
2171
|
|
|
2150
2172
|
// src/pcb/pcb_breakout_point.ts
|
|
2151
|
-
import { z as
|
|
2152
|
-
var pcb_breakout_point =
|
|
2153
|
-
type:
|
|
2173
|
+
import { z as z102 } from "zod";
|
|
2174
|
+
var pcb_breakout_point = z102.object({
|
|
2175
|
+
type: z102.literal("pcb_breakout_point"),
|
|
2154
2176
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2155
|
-
pcb_group_id:
|
|
2156
|
-
subcircuit_id:
|
|
2157
|
-
source_trace_id:
|
|
2158
|
-
source_port_id:
|
|
2159
|
-
source_net_id:
|
|
2177
|
+
pcb_group_id: z102.string(),
|
|
2178
|
+
subcircuit_id: z102.string().optional(),
|
|
2179
|
+
source_trace_id: z102.string().optional(),
|
|
2180
|
+
source_port_id: z102.string().optional(),
|
|
2181
|
+
source_net_id: z102.string().optional(),
|
|
2160
2182
|
x: distance,
|
|
2161
2183
|
y: distance
|
|
2162
2184
|
}).describe(
|
|
@@ -2165,60 +2187,60 @@ var pcb_breakout_point = z101.object({
|
|
|
2165
2187
|
expectTypesMatch(true);
|
|
2166
2188
|
|
|
2167
2189
|
// src/pcb/pcb_ground_plane.ts
|
|
2168
|
-
import { z as
|
|
2169
|
-
var pcb_ground_plane =
|
|
2170
|
-
type:
|
|
2190
|
+
import { z as z103 } from "zod";
|
|
2191
|
+
var pcb_ground_plane = z103.object({
|
|
2192
|
+
type: z103.literal("pcb_ground_plane"),
|
|
2171
2193
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2172
|
-
source_pcb_ground_plane_id:
|
|
2173
|
-
source_net_id:
|
|
2174
|
-
pcb_group_id:
|
|
2175
|
-
subcircuit_id:
|
|
2194
|
+
source_pcb_ground_plane_id: z103.string(),
|
|
2195
|
+
source_net_id: z103.string(),
|
|
2196
|
+
pcb_group_id: z103.string().optional(),
|
|
2197
|
+
subcircuit_id: z103.string().optional()
|
|
2176
2198
|
}).describe("Defines a ground plane on the PCB");
|
|
2177
2199
|
expectTypesMatch(true);
|
|
2178
2200
|
|
|
2179
2201
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2180
|
-
import { z as
|
|
2181
|
-
var pcb_ground_plane_region =
|
|
2182
|
-
type:
|
|
2202
|
+
import { z as z104 } from "zod";
|
|
2203
|
+
var pcb_ground_plane_region = z104.object({
|
|
2204
|
+
type: z104.literal("pcb_ground_plane_region"),
|
|
2183
2205
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2184
2206
|
"pcb_ground_plane_region"
|
|
2185
2207
|
),
|
|
2186
|
-
pcb_ground_plane_id:
|
|
2187
|
-
pcb_group_id:
|
|
2188
|
-
subcircuit_id:
|
|
2208
|
+
pcb_ground_plane_id: z104.string(),
|
|
2209
|
+
pcb_group_id: z104.string().optional(),
|
|
2210
|
+
subcircuit_id: z104.string().optional(),
|
|
2189
2211
|
layer: layer_ref,
|
|
2190
|
-
points:
|
|
2212
|
+
points: z104.array(point)
|
|
2191
2213
|
}).describe("Defines a polygon region of a ground plane");
|
|
2192
2214
|
expectTypesMatch(true);
|
|
2193
2215
|
|
|
2194
2216
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2195
|
-
import { z as
|
|
2196
|
-
var pcb_thermal_spoke =
|
|
2197
|
-
type:
|
|
2217
|
+
import { z as z105 } from "zod";
|
|
2218
|
+
var pcb_thermal_spoke = z105.object({
|
|
2219
|
+
type: z105.literal("pcb_thermal_spoke"),
|
|
2198
2220
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2199
|
-
pcb_ground_plane_id:
|
|
2200
|
-
shape:
|
|
2201
|
-
spoke_count:
|
|
2221
|
+
pcb_ground_plane_id: z105.string(),
|
|
2222
|
+
shape: z105.string(),
|
|
2223
|
+
spoke_count: z105.number(),
|
|
2202
2224
|
spoke_thickness: distance,
|
|
2203
2225
|
spoke_inner_diameter: distance,
|
|
2204
2226
|
spoke_outer_diameter: distance,
|
|
2205
|
-
pcb_plated_hole_id:
|
|
2206
|
-
subcircuit_id:
|
|
2227
|
+
pcb_plated_hole_id: z105.string().optional(),
|
|
2228
|
+
subcircuit_id: z105.string().optional()
|
|
2207
2229
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2208
2230
|
expectTypesMatch(true);
|
|
2209
2231
|
|
|
2210
2232
|
// src/pcb/pcb_copper_pour.ts
|
|
2211
|
-
import { z as
|
|
2212
|
-
var pcb_copper_pour_base =
|
|
2213
|
-
type:
|
|
2233
|
+
import { z as z106 } from "zod";
|
|
2234
|
+
var pcb_copper_pour_base = z106.object({
|
|
2235
|
+
type: z106.literal("pcb_copper_pour"),
|
|
2214
2236
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2215
|
-
pcb_group_id:
|
|
2216
|
-
subcircuit_id:
|
|
2237
|
+
pcb_group_id: z106.string().optional(),
|
|
2238
|
+
subcircuit_id: z106.string().optional(),
|
|
2217
2239
|
layer: layer_ref,
|
|
2218
|
-
source_net_id:
|
|
2240
|
+
source_net_id: z106.string().optional()
|
|
2219
2241
|
});
|
|
2220
2242
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2221
|
-
shape:
|
|
2243
|
+
shape: z106.literal("rect"),
|
|
2222
2244
|
center: point,
|
|
2223
2245
|
width: length,
|
|
2224
2246
|
height: length,
|
|
@@ -2226,16 +2248,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2226
2248
|
});
|
|
2227
2249
|
expectTypesMatch(true);
|
|
2228
2250
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2229
|
-
shape:
|
|
2251
|
+
shape: z106.literal("brep"),
|
|
2230
2252
|
brep_shape
|
|
2231
2253
|
});
|
|
2232
2254
|
expectTypesMatch(true);
|
|
2233
2255
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2234
|
-
shape:
|
|
2235
|
-
points:
|
|
2256
|
+
shape: z106.literal("polygon"),
|
|
2257
|
+
points: z106.array(point)
|
|
2236
2258
|
});
|
|
2237
2259
|
expectTypesMatch(true);
|
|
2238
|
-
var pcb_copper_pour =
|
|
2260
|
+
var pcb_copper_pour = z106.discriminatedUnion("shape", [
|
|
2239
2261
|
pcb_copper_pour_rect,
|
|
2240
2262
|
pcb_copper_pour_brep,
|
|
2241
2263
|
pcb_copper_pour_polygon
|
|
@@ -2243,78 +2265,117 @@ var pcb_copper_pour = z105.discriminatedUnion("shape", [
|
|
|
2243
2265
|
expectTypesMatch(true);
|
|
2244
2266
|
|
|
2245
2267
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2246
|
-
import { z as
|
|
2247
|
-
var pcb_component_outside_board_error =
|
|
2248
|
-
type:
|
|
2268
|
+
import { z as z107 } from "zod";
|
|
2269
|
+
var pcb_component_outside_board_error = z107.object({
|
|
2270
|
+
type: z107.literal("pcb_component_outside_board_error"),
|
|
2249
2271
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2250
2272
|
"pcb_component_outside_board_error"
|
|
2251
2273
|
),
|
|
2252
|
-
error_type:
|
|
2253
|
-
message:
|
|
2254
|
-
pcb_component_id:
|
|
2255
|
-
pcb_board_id:
|
|
2274
|
+
error_type: z107.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2275
|
+
message: z107.string(),
|
|
2276
|
+
pcb_component_id: z107.string(),
|
|
2277
|
+
pcb_board_id: z107.string(),
|
|
2256
2278
|
component_center: point,
|
|
2257
|
-
component_bounds:
|
|
2258
|
-
min_x:
|
|
2259
|
-
max_x:
|
|
2260
|
-
min_y:
|
|
2261
|
-
max_y:
|
|
2279
|
+
component_bounds: z107.object({
|
|
2280
|
+
min_x: z107.number(),
|
|
2281
|
+
max_x: z107.number(),
|
|
2282
|
+
min_y: z107.number(),
|
|
2283
|
+
max_y: z107.number()
|
|
2262
2284
|
}),
|
|
2263
|
-
subcircuit_id:
|
|
2264
|
-
source_component_id:
|
|
2285
|
+
subcircuit_id: z107.string().optional(),
|
|
2286
|
+
source_component_id: z107.string().optional()
|
|
2265
2287
|
}).describe(
|
|
2266
2288
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2267
2289
|
);
|
|
2268
2290
|
expectTypesMatch(true);
|
|
2269
2291
|
|
|
2270
2292
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2271
|
-
import { z as
|
|
2272
|
-
var pcb_via_clearance_error =
|
|
2273
|
-
type:
|
|
2293
|
+
import { z as z108 } from "zod";
|
|
2294
|
+
var pcb_via_clearance_error = z108.object({
|
|
2295
|
+
type: z108.literal("pcb_via_clearance_error"),
|
|
2274
2296
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2275
|
-
error_type:
|
|
2276
|
-
message:
|
|
2277
|
-
pcb_via_ids:
|
|
2297
|
+
error_type: z108.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2298
|
+
message: z108.string(),
|
|
2299
|
+
pcb_via_ids: z108.array(z108.string()).min(2),
|
|
2278
2300
|
minimum_clearance: distance.optional(),
|
|
2279
2301
|
actual_clearance: distance.optional(),
|
|
2280
|
-
pcb_center:
|
|
2281
|
-
x:
|
|
2282
|
-
y:
|
|
2302
|
+
pcb_center: z108.object({
|
|
2303
|
+
x: z108.number().optional(),
|
|
2304
|
+
y: z108.number().optional()
|
|
2283
2305
|
}).optional(),
|
|
2284
|
-
subcircuit_id:
|
|
2306
|
+
subcircuit_id: z108.string().optional()
|
|
2285
2307
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2286
2308
|
expectTypesMatch(true);
|
|
2287
2309
|
|
|
2310
|
+
// src/pcb/pcb_courtyard_rect.ts
|
|
2311
|
+
import { z as z109 } from "zod";
|
|
2312
|
+
var pcb_courtyard_rect = z109.object({
|
|
2313
|
+
type: z109.literal("pcb_courtyard_rect"),
|
|
2314
|
+
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2315
|
+
pcb_component_id: z109.string(),
|
|
2316
|
+
pcb_group_id: z109.string().optional(),
|
|
2317
|
+
subcircuit_id: z109.string().optional(),
|
|
2318
|
+
center: point,
|
|
2319
|
+
width: length,
|
|
2320
|
+
height: length,
|
|
2321
|
+
layer: visible_layer,
|
|
2322
|
+
stroke_width: length.default("0.1mm"),
|
|
2323
|
+
is_filled: z109.boolean().optional(),
|
|
2324
|
+
has_stroke: z109.boolean().optional(),
|
|
2325
|
+
is_stroke_dashed: z109.boolean().optional(),
|
|
2326
|
+
color: z109.string().optional()
|
|
2327
|
+
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2328
|
+
expectTypesMatch(true);
|
|
2329
|
+
|
|
2330
|
+
// src/pcb/pcb_courtyard_outline.ts
|
|
2331
|
+
import { z as z110 } from "zod";
|
|
2332
|
+
var pcb_courtyard_outline = z110.object({
|
|
2333
|
+
type: z110.literal("pcb_courtyard_outline"),
|
|
2334
|
+
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2335
|
+
"pcb_courtyard_outline"
|
|
2336
|
+
),
|
|
2337
|
+
pcb_component_id: z110.string(),
|
|
2338
|
+
pcb_group_id: z110.string().optional(),
|
|
2339
|
+
subcircuit_id: z110.string().optional(),
|
|
2340
|
+
layer: visible_layer,
|
|
2341
|
+
outline: z110.array(point).min(2),
|
|
2342
|
+
stroke_width: length.default("0.1mm"),
|
|
2343
|
+
is_closed: z110.boolean().optional(),
|
|
2344
|
+
is_stroke_dashed: z110.boolean().optional(),
|
|
2345
|
+
color: z110.string().optional()
|
|
2346
|
+
}).describe("Defines a courtyard outline on the PCB");
|
|
2347
|
+
expectTypesMatch(true);
|
|
2348
|
+
|
|
2288
2349
|
// src/cad/cad_component.ts
|
|
2289
|
-
import { z as
|
|
2290
|
-
var cad_component =
|
|
2291
|
-
type:
|
|
2292
|
-
cad_component_id:
|
|
2293
|
-
pcb_component_id:
|
|
2294
|
-
source_component_id:
|
|
2350
|
+
import { z as z111 } from "zod";
|
|
2351
|
+
var cad_component = z111.object({
|
|
2352
|
+
type: z111.literal("cad_component"),
|
|
2353
|
+
cad_component_id: z111.string(),
|
|
2354
|
+
pcb_component_id: z111.string(),
|
|
2355
|
+
source_component_id: z111.string(),
|
|
2295
2356
|
position: point3,
|
|
2296
2357
|
rotation: point3.optional(),
|
|
2297
2358
|
size: point3.optional(),
|
|
2298
2359
|
layer: layer_ref.optional(),
|
|
2299
|
-
subcircuit_id:
|
|
2360
|
+
subcircuit_id: z111.string().optional(),
|
|
2300
2361
|
// These are all ways to generate/load the 3d model
|
|
2301
|
-
footprinter_string:
|
|
2302
|
-
model_obj_url:
|
|
2303
|
-
model_stl_url:
|
|
2304
|
-
model_3mf_url:
|
|
2305
|
-
model_gltf_url:
|
|
2306
|
-
model_glb_url:
|
|
2307
|
-
model_step_url:
|
|
2308
|
-
model_wrl_url:
|
|
2309
|
-
model_unit_to_mm_scale_factor:
|
|
2310
|
-
model_jscad:
|
|
2362
|
+
footprinter_string: z111.string().optional(),
|
|
2363
|
+
model_obj_url: z111.string().optional(),
|
|
2364
|
+
model_stl_url: z111.string().optional(),
|
|
2365
|
+
model_3mf_url: z111.string().optional(),
|
|
2366
|
+
model_gltf_url: z111.string().optional(),
|
|
2367
|
+
model_glb_url: z111.string().optional(),
|
|
2368
|
+
model_step_url: z111.string().optional(),
|
|
2369
|
+
model_wrl_url: z111.string().optional(),
|
|
2370
|
+
model_unit_to_mm_scale_factor: z111.number().optional(),
|
|
2371
|
+
model_jscad: z111.any().optional()
|
|
2311
2372
|
}).describe("Defines a component on the PCB");
|
|
2312
2373
|
expectTypesMatch(true);
|
|
2313
2374
|
|
|
2314
2375
|
// src/simulation/simulation_voltage_source.ts
|
|
2315
|
-
import { z as
|
|
2316
|
-
var wave_shape =
|
|
2317
|
-
var percentage =
|
|
2376
|
+
import { z as z112 } from "zod";
|
|
2377
|
+
var wave_shape = z112.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2378
|
+
var percentage = z112.union([z112.string(), z112.number()]).transform((val) => {
|
|
2318
2379
|
if (typeof val === "string") {
|
|
2319
2380
|
if (val.endsWith("%")) {
|
|
2320
2381
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2323,30 +2384,30 @@ var percentage = z109.union([z109.string(), z109.number()]).transform((val) => {
|
|
|
2323
2384
|
}
|
|
2324
2385
|
return val;
|
|
2325
2386
|
}).pipe(
|
|
2326
|
-
|
|
2387
|
+
z112.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2327
2388
|
);
|
|
2328
|
-
var simulation_dc_voltage_source =
|
|
2329
|
-
type:
|
|
2389
|
+
var simulation_dc_voltage_source = z112.object({
|
|
2390
|
+
type: z112.literal("simulation_voltage_source"),
|
|
2330
2391
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2331
2392
|
"simulation_voltage_source"
|
|
2332
2393
|
),
|
|
2333
|
-
is_dc_source:
|
|
2334
|
-
positive_source_port_id:
|
|
2335
|
-
negative_source_port_id:
|
|
2336
|
-
positive_source_net_id:
|
|
2337
|
-
negative_source_net_id:
|
|
2394
|
+
is_dc_source: z112.literal(true).optional().default(true),
|
|
2395
|
+
positive_source_port_id: z112.string().optional(),
|
|
2396
|
+
negative_source_port_id: z112.string().optional(),
|
|
2397
|
+
positive_source_net_id: z112.string().optional(),
|
|
2398
|
+
negative_source_net_id: z112.string().optional(),
|
|
2338
2399
|
voltage
|
|
2339
2400
|
}).describe("Defines a DC voltage source for simulation");
|
|
2340
|
-
var simulation_ac_voltage_source =
|
|
2341
|
-
type:
|
|
2401
|
+
var simulation_ac_voltage_source = z112.object({
|
|
2402
|
+
type: z112.literal("simulation_voltage_source"),
|
|
2342
2403
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2343
2404
|
"simulation_voltage_source"
|
|
2344
2405
|
),
|
|
2345
|
-
is_dc_source:
|
|
2346
|
-
terminal1_source_port_id:
|
|
2347
|
-
terminal2_source_port_id:
|
|
2348
|
-
terminal1_source_net_id:
|
|
2349
|
-
terminal2_source_net_id:
|
|
2406
|
+
is_dc_source: z112.literal(false),
|
|
2407
|
+
terminal1_source_port_id: z112.string().optional(),
|
|
2408
|
+
terminal2_source_port_id: z112.string().optional(),
|
|
2409
|
+
terminal1_source_net_id: z112.string().optional(),
|
|
2410
|
+
terminal2_source_net_id: z112.string().optional(),
|
|
2350
2411
|
voltage: voltage.optional(),
|
|
2351
2412
|
frequency: frequency.optional(),
|
|
2352
2413
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2354,25 +2415,25 @@ var simulation_ac_voltage_source = z109.object({
|
|
|
2354
2415
|
phase: rotation.optional(),
|
|
2355
2416
|
duty_cycle: percentage.optional()
|
|
2356
2417
|
}).describe("Defines an AC voltage source for simulation");
|
|
2357
|
-
var simulation_voltage_source =
|
|
2418
|
+
var simulation_voltage_source = z112.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2358
2419
|
expectTypesMatch(true);
|
|
2359
2420
|
expectTypesMatch(true);
|
|
2360
2421
|
expectTypesMatch(true);
|
|
2361
2422
|
|
|
2362
2423
|
// src/simulation/simulation_experiment.ts
|
|
2363
|
-
import { z as
|
|
2364
|
-
var experiment_type =
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2424
|
+
import { z as z113 } from "zod";
|
|
2425
|
+
var experiment_type = z113.union([
|
|
2426
|
+
z113.literal("spice_dc_sweep"),
|
|
2427
|
+
z113.literal("spice_dc_operating_point"),
|
|
2428
|
+
z113.literal("spice_transient_analysis"),
|
|
2429
|
+
z113.literal("spice_ac_analysis")
|
|
2369
2430
|
]);
|
|
2370
|
-
var simulation_experiment =
|
|
2371
|
-
type:
|
|
2431
|
+
var simulation_experiment = z113.object({
|
|
2432
|
+
type: z113.literal("simulation_experiment"),
|
|
2372
2433
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2373
2434
|
"simulation_experiment"
|
|
2374
2435
|
),
|
|
2375
|
-
name:
|
|
2436
|
+
name: z113.string(),
|
|
2376
2437
|
experiment_type,
|
|
2377
2438
|
time_per_step: duration_ms.optional(),
|
|
2378
2439
|
start_time_ms: ms.optional(),
|
|
@@ -2381,47 +2442,47 @@ var simulation_experiment = z110.object({
|
|
|
2381
2442
|
expectTypesMatch(true);
|
|
2382
2443
|
|
|
2383
2444
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2384
|
-
import { z as
|
|
2385
|
-
var simulation_transient_voltage_graph =
|
|
2386
|
-
type:
|
|
2445
|
+
import { z as z114 } from "zod";
|
|
2446
|
+
var simulation_transient_voltage_graph = z114.object({
|
|
2447
|
+
type: z114.literal("simulation_transient_voltage_graph"),
|
|
2387
2448
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2388
2449
|
"simulation_transient_voltage_graph"
|
|
2389
2450
|
),
|
|
2390
|
-
simulation_experiment_id:
|
|
2391
|
-
timestamps_ms:
|
|
2392
|
-
voltage_levels:
|
|
2393
|
-
schematic_voltage_probe_id:
|
|
2394
|
-
subcircuit_connectivity_map_key:
|
|
2451
|
+
simulation_experiment_id: z114.string(),
|
|
2452
|
+
timestamps_ms: z114.array(z114.number()).optional(),
|
|
2453
|
+
voltage_levels: z114.array(z114.number()),
|
|
2454
|
+
schematic_voltage_probe_id: z114.string().optional(),
|
|
2455
|
+
subcircuit_connectivity_map_key: z114.string().optional(),
|
|
2395
2456
|
time_per_step: duration_ms,
|
|
2396
2457
|
start_time_ms: ms,
|
|
2397
2458
|
end_time_ms: ms,
|
|
2398
|
-
name:
|
|
2459
|
+
name: z114.string().optional()
|
|
2399
2460
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2400
2461
|
expectTypesMatch(true);
|
|
2401
2462
|
|
|
2402
2463
|
// src/simulation/simulation_switch.ts
|
|
2403
|
-
import { z as
|
|
2404
|
-
var simulation_switch =
|
|
2405
|
-
type:
|
|
2464
|
+
import { z as z115 } from "zod";
|
|
2465
|
+
var simulation_switch = z115.object({
|
|
2466
|
+
type: z115.literal("simulation_switch"),
|
|
2406
2467
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2407
2468
|
closes_at: ms.optional(),
|
|
2408
2469
|
opens_at: ms.optional(),
|
|
2409
|
-
starts_closed:
|
|
2470
|
+
starts_closed: z115.boolean().optional(),
|
|
2410
2471
|
switching_frequency: frequency.optional()
|
|
2411
2472
|
}).describe("Defines a switch for simulation timing control");
|
|
2412
2473
|
expectTypesMatch(true);
|
|
2413
2474
|
|
|
2414
2475
|
// src/simulation/simulation_voltage_probe.ts
|
|
2415
|
-
import { z as
|
|
2416
|
-
var simulation_voltage_probe =
|
|
2417
|
-
type:
|
|
2476
|
+
import { z as z116 } from "zod";
|
|
2477
|
+
var simulation_voltage_probe = z116.object({
|
|
2478
|
+
type: z116.literal("simulation_voltage_probe"),
|
|
2418
2479
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2419
2480
|
"simulation_voltage_probe"
|
|
2420
2481
|
),
|
|
2421
|
-
source_port_id:
|
|
2422
|
-
source_net_id:
|
|
2423
|
-
name:
|
|
2424
|
-
subcircuit_id:
|
|
2482
|
+
source_port_id: z116.string().optional(),
|
|
2483
|
+
source_net_id: z116.string().optional(),
|
|
2484
|
+
name: z116.string().optional(),
|
|
2485
|
+
subcircuit_id: z116.string().optional()
|
|
2425
2486
|
}).describe(
|
|
2426
2487
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2427
2488
|
).refine(
|
|
@@ -2433,8 +2494,8 @@ var simulation_voltage_probe = z113.object({
|
|
|
2433
2494
|
expectTypesMatch(true);
|
|
2434
2495
|
|
|
2435
2496
|
// src/any_circuit_element.ts
|
|
2436
|
-
import { z as
|
|
2437
|
-
var any_circuit_element =
|
|
2497
|
+
import { z as z117 } from "zod";
|
|
2498
|
+
var any_circuit_element = z117.union([
|
|
2438
2499
|
source_trace,
|
|
2439
2500
|
source_port,
|
|
2440
2501
|
any_source_component,
|
|
@@ -2495,6 +2556,7 @@ var any_circuit_element = z114.union([
|
|
|
2495
2556
|
pcb_via_clearance_error,
|
|
2496
2557
|
pcb_fabrication_note_path,
|
|
2497
2558
|
pcb_fabrication_note_text,
|
|
2559
|
+
pcb_fabrication_note_rect,
|
|
2498
2560
|
pcb_autorouting_error,
|
|
2499
2561
|
pcb_footprint_overlap_error,
|
|
2500
2562
|
pcb_breakout_point,
|
|
@@ -2504,6 +2566,8 @@ var any_circuit_element = z114.union([
|
|
|
2504
2566
|
pcb_thermal_spoke,
|
|
2505
2567
|
pcb_copper_pour,
|
|
2506
2568
|
pcb_component_outside_board_error,
|
|
2569
|
+
pcb_courtyard_rect,
|
|
2570
|
+
pcb_courtyard_outline,
|
|
2507
2571
|
schematic_box,
|
|
2508
2572
|
schematic_text,
|
|
2509
2573
|
schematic_line,
|
|
@@ -2565,11 +2629,14 @@ export {
|
|
|
2565
2629
|
pcb_copper_pour_brep,
|
|
2566
2630
|
pcb_copper_pour_polygon,
|
|
2567
2631
|
pcb_copper_pour_rect,
|
|
2632
|
+
pcb_courtyard_outline,
|
|
2633
|
+
pcb_courtyard_rect,
|
|
2568
2634
|
pcb_cutout,
|
|
2569
2635
|
pcb_cutout_circle,
|
|
2570
2636
|
pcb_cutout_polygon,
|
|
2571
2637
|
pcb_cutout_rect,
|
|
2572
2638
|
pcb_fabrication_note_path,
|
|
2639
|
+
pcb_fabrication_note_rect,
|
|
2573
2640
|
pcb_fabrication_note_text,
|
|
2574
2641
|
pcb_footprint_overlap_error,
|
|
2575
2642
|
pcb_ground_plane,
|