circuit-json 0.0.277 → 0.0.278
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 +27 -0
- package/dist/index.d.mts +259 -8
- package/dist/index.mjs +310 -286
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2016,150 +2016,172 @@ var pcb_fabrication_note_rect = z92.object({
|
|
|
2016
2016
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2017
2017
|
expectTypesMatch(true);
|
|
2018
2018
|
|
|
2019
|
-
// src/pcb/
|
|
2019
|
+
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2020
2020
|
import { z as z93 } from "zod";
|
|
2021
|
-
var
|
|
2022
|
-
type: z93.literal("
|
|
2023
|
-
|
|
2024
|
-
|
|
2021
|
+
var pcb_fabrication_note_dimension = z93.object({
|
|
2022
|
+
type: z93.literal("pcb_fabrication_note_dimension"),
|
|
2023
|
+
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2024
|
+
"pcb_fabrication_note_dimension"
|
|
2025
|
+
),
|
|
2026
|
+
pcb_component_id: z93.string(),
|
|
2025
2027
|
pcb_group_id: z93.string().optional(),
|
|
2026
2028
|
subcircuit_id: z93.string().optional(),
|
|
2029
|
+
layer: visible_layer,
|
|
2030
|
+
from: point.or(z93.string()),
|
|
2031
|
+
to: point.or(z93.string()),
|
|
2032
|
+
text: z93.string().optional(),
|
|
2033
|
+
offset: length.optional(),
|
|
2027
2034
|
font: z93.literal("tscircuit2024").default("tscircuit2024"),
|
|
2035
|
+
font_size: length.default("1mm"),
|
|
2036
|
+
color: z93.string().optional(),
|
|
2037
|
+
arrow_size: length.default("1mm")
|
|
2038
|
+
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2039
|
+
expectTypesMatch(true);
|
|
2040
|
+
|
|
2041
|
+
// src/pcb/pcb_note_text.ts
|
|
2042
|
+
import { z as z94 } from "zod";
|
|
2043
|
+
var pcb_note_text = z94.object({
|
|
2044
|
+
type: z94.literal("pcb_note_text"),
|
|
2045
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2046
|
+
pcb_component_id: z94.string().optional(),
|
|
2047
|
+
pcb_group_id: z94.string().optional(),
|
|
2048
|
+
subcircuit_id: z94.string().optional(),
|
|
2049
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
2028
2050
|
font_size: distance.default("1mm"),
|
|
2029
|
-
text:
|
|
2051
|
+
text: z94.string(),
|
|
2030
2052
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2031
|
-
anchor_alignment:
|
|
2032
|
-
color:
|
|
2053
|
+
anchor_alignment: z94.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2054
|
+
color: z94.string().optional()
|
|
2033
2055
|
}).describe("Defines a documentation note in text on the PCB");
|
|
2034
2056
|
expectTypesMatch(true);
|
|
2035
2057
|
|
|
2036
2058
|
// src/pcb/pcb_note_rect.ts
|
|
2037
|
-
import { z as
|
|
2038
|
-
var pcb_note_rect =
|
|
2039
|
-
type:
|
|
2059
|
+
import { z as z95 } from "zod";
|
|
2060
|
+
var pcb_note_rect = z95.object({
|
|
2061
|
+
type: z95.literal("pcb_note_rect"),
|
|
2040
2062
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2041
|
-
pcb_component_id:
|
|
2042
|
-
pcb_group_id:
|
|
2043
|
-
subcircuit_id:
|
|
2063
|
+
pcb_component_id: z95.string().optional(),
|
|
2064
|
+
pcb_group_id: z95.string().optional(),
|
|
2065
|
+
subcircuit_id: z95.string().optional(),
|
|
2044
2066
|
center: point,
|
|
2045
2067
|
width: length,
|
|
2046
2068
|
height: length,
|
|
2047
2069
|
stroke_width: length.default("0.1mm"),
|
|
2048
|
-
is_filled:
|
|
2049
|
-
has_stroke:
|
|
2050
|
-
is_stroke_dashed:
|
|
2051
|
-
color:
|
|
2070
|
+
is_filled: z95.boolean().optional(),
|
|
2071
|
+
has_stroke: z95.boolean().optional(),
|
|
2072
|
+
is_stroke_dashed: z95.boolean().optional(),
|
|
2073
|
+
color: z95.string().optional()
|
|
2052
2074
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2053
2075
|
expectTypesMatch(true);
|
|
2054
2076
|
|
|
2055
2077
|
// src/pcb/pcb_note_path.ts
|
|
2056
|
-
import { z as
|
|
2057
|
-
var pcb_note_path =
|
|
2058
|
-
type:
|
|
2078
|
+
import { z as z96 } from "zod";
|
|
2079
|
+
var pcb_note_path = z96.object({
|
|
2080
|
+
type: z96.literal("pcb_note_path"),
|
|
2059
2081
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2060
|
-
pcb_component_id:
|
|
2061
|
-
pcb_group_id:
|
|
2062
|
-
subcircuit_id:
|
|
2063
|
-
route:
|
|
2082
|
+
pcb_component_id: z96.string().optional(),
|
|
2083
|
+
pcb_group_id: z96.string().optional(),
|
|
2084
|
+
subcircuit_id: z96.string().optional(),
|
|
2085
|
+
route: z96.array(point),
|
|
2064
2086
|
stroke_width: length.default("0.1mm"),
|
|
2065
|
-
color:
|
|
2087
|
+
color: z96.string().optional()
|
|
2066
2088
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
2067
2089
|
expectTypesMatch(true);
|
|
2068
2090
|
|
|
2069
2091
|
// src/pcb/pcb_note_line.ts
|
|
2070
|
-
import { z as
|
|
2071
|
-
var pcb_note_line =
|
|
2072
|
-
type:
|
|
2092
|
+
import { z as z97 } from "zod";
|
|
2093
|
+
var pcb_note_line = z97.object({
|
|
2094
|
+
type: z97.literal("pcb_note_line"),
|
|
2073
2095
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2074
|
-
pcb_component_id:
|
|
2075
|
-
pcb_group_id:
|
|
2076
|
-
subcircuit_id:
|
|
2096
|
+
pcb_component_id: z97.string().optional(),
|
|
2097
|
+
pcb_group_id: z97.string().optional(),
|
|
2098
|
+
subcircuit_id: z97.string().optional(),
|
|
2077
2099
|
x1: distance,
|
|
2078
2100
|
y1: distance,
|
|
2079
2101
|
x2: distance,
|
|
2080
2102
|
y2: distance,
|
|
2081
2103
|
stroke_width: distance.default("0.1mm"),
|
|
2082
|
-
color:
|
|
2083
|
-
is_dashed:
|
|
2104
|
+
color: z97.string().optional(),
|
|
2105
|
+
is_dashed: z97.boolean().optional()
|
|
2084
2106
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2085
2107
|
expectTypesMatch(true);
|
|
2086
2108
|
|
|
2087
2109
|
// src/pcb/pcb_note_dimension.ts
|
|
2088
|
-
import { z as
|
|
2089
|
-
var pcb_note_dimension =
|
|
2090
|
-
type:
|
|
2110
|
+
import { z as z98 } from "zod";
|
|
2111
|
+
var pcb_note_dimension = z98.object({
|
|
2112
|
+
type: z98.literal("pcb_note_dimension"),
|
|
2091
2113
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2092
|
-
pcb_component_id:
|
|
2093
|
-
pcb_group_id:
|
|
2094
|
-
subcircuit_id:
|
|
2114
|
+
pcb_component_id: z98.string().optional(),
|
|
2115
|
+
pcb_group_id: z98.string().optional(),
|
|
2116
|
+
subcircuit_id: z98.string().optional(),
|
|
2095
2117
|
from: point,
|
|
2096
2118
|
to: point,
|
|
2097
|
-
text:
|
|
2098
|
-
font:
|
|
2119
|
+
text: z98.string().optional(),
|
|
2120
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
2099
2121
|
font_size: length.default("1mm"),
|
|
2100
|
-
color:
|
|
2122
|
+
color: z98.string().optional(),
|
|
2101
2123
|
arrow_size: length.default("1mm")
|
|
2102
2124
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2103
2125
|
expectTypesMatch(true);
|
|
2104
2126
|
|
|
2105
2127
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2106
|
-
import { z as
|
|
2107
|
-
var pcb_footprint_overlap_error =
|
|
2108
|
-
type:
|
|
2128
|
+
import { z as z99 } from "zod";
|
|
2129
|
+
var pcb_footprint_overlap_error = z99.object({
|
|
2130
|
+
type: z99.literal("pcb_footprint_overlap_error"),
|
|
2109
2131
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2110
|
-
error_type:
|
|
2111
|
-
message:
|
|
2112
|
-
pcb_smtpad_ids:
|
|
2113
|
-
pcb_plated_hole_ids:
|
|
2114
|
-
pcb_hole_ids:
|
|
2115
|
-
pcb_keepout_ids:
|
|
2132
|
+
error_type: z99.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2133
|
+
message: z99.string(),
|
|
2134
|
+
pcb_smtpad_ids: z99.array(z99.string()).optional(),
|
|
2135
|
+
pcb_plated_hole_ids: z99.array(z99.string()).optional(),
|
|
2136
|
+
pcb_hole_ids: z99.array(z99.string()).optional(),
|
|
2137
|
+
pcb_keepout_ids: z99.array(z99.string()).optional()
|
|
2116
2138
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2117
2139
|
expectTypesMatch(
|
|
2118
2140
|
true
|
|
2119
2141
|
);
|
|
2120
2142
|
|
|
2121
2143
|
// src/pcb/pcb_keepout.ts
|
|
2122
|
-
import { z as
|
|
2123
|
-
var pcb_keepout =
|
|
2124
|
-
type:
|
|
2125
|
-
shape:
|
|
2126
|
-
pcb_group_id:
|
|
2127
|
-
subcircuit_id:
|
|
2144
|
+
import { z as z100 } from "zod";
|
|
2145
|
+
var pcb_keepout = z100.object({
|
|
2146
|
+
type: z100.literal("pcb_keepout"),
|
|
2147
|
+
shape: z100.literal("rect"),
|
|
2148
|
+
pcb_group_id: z100.string().optional(),
|
|
2149
|
+
subcircuit_id: z100.string().optional(),
|
|
2128
2150
|
center: point,
|
|
2129
2151
|
width: distance,
|
|
2130
2152
|
height: distance,
|
|
2131
|
-
pcb_keepout_id:
|
|
2132
|
-
layers:
|
|
2153
|
+
pcb_keepout_id: z100.string(),
|
|
2154
|
+
layers: z100.array(z100.string()),
|
|
2133
2155
|
// Specify layers where the keepout applies
|
|
2134
|
-
description:
|
|
2156
|
+
description: z100.string().optional()
|
|
2135
2157
|
// Optional description of the keepout
|
|
2136
2158
|
}).or(
|
|
2137
|
-
|
|
2138
|
-
type:
|
|
2139
|
-
shape:
|
|
2140
|
-
pcb_group_id:
|
|
2141
|
-
subcircuit_id:
|
|
2159
|
+
z100.object({
|
|
2160
|
+
type: z100.literal("pcb_keepout"),
|
|
2161
|
+
shape: z100.literal("circle"),
|
|
2162
|
+
pcb_group_id: z100.string().optional(),
|
|
2163
|
+
subcircuit_id: z100.string().optional(),
|
|
2142
2164
|
center: point,
|
|
2143
2165
|
radius: distance,
|
|
2144
|
-
pcb_keepout_id:
|
|
2145
|
-
layers:
|
|
2166
|
+
pcb_keepout_id: z100.string(),
|
|
2167
|
+
layers: z100.array(z100.string()),
|
|
2146
2168
|
// Specify layers where the keepout applies
|
|
2147
|
-
description:
|
|
2169
|
+
description: z100.string().optional()
|
|
2148
2170
|
// Optional description of the keepout
|
|
2149
2171
|
})
|
|
2150
2172
|
);
|
|
2151
2173
|
expectTypesMatch(true);
|
|
2152
2174
|
|
|
2153
2175
|
// src/pcb/pcb_cutout.ts
|
|
2154
|
-
import { z as
|
|
2155
|
-
var pcb_cutout_base =
|
|
2156
|
-
type:
|
|
2176
|
+
import { z as z101 } from "zod";
|
|
2177
|
+
var pcb_cutout_base = z101.object({
|
|
2178
|
+
type: z101.literal("pcb_cutout"),
|
|
2157
2179
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2158
|
-
pcb_group_id:
|
|
2159
|
-
subcircuit_id:
|
|
2180
|
+
pcb_group_id: z101.string().optional(),
|
|
2181
|
+
subcircuit_id: z101.string().optional()
|
|
2160
2182
|
});
|
|
2161
2183
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2162
|
-
shape:
|
|
2184
|
+
shape: z101.literal("rect"),
|
|
2163
2185
|
center: point,
|
|
2164
2186
|
width: length,
|
|
2165
2187
|
height: length,
|
|
@@ -2167,17 +2189,17 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2167
2189
|
});
|
|
2168
2190
|
expectTypesMatch(true);
|
|
2169
2191
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2170
|
-
shape:
|
|
2192
|
+
shape: z101.literal("circle"),
|
|
2171
2193
|
center: point,
|
|
2172
2194
|
radius: length
|
|
2173
2195
|
});
|
|
2174
2196
|
expectTypesMatch(true);
|
|
2175
2197
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2176
|
-
shape:
|
|
2177
|
-
points:
|
|
2198
|
+
shape: z101.literal("polygon"),
|
|
2199
|
+
points: z101.array(point)
|
|
2178
2200
|
});
|
|
2179
2201
|
expectTypesMatch(true);
|
|
2180
|
-
var pcb_cutout =
|
|
2202
|
+
var pcb_cutout = z101.discriminatedUnion("shape", [
|
|
2181
2203
|
pcb_cutout_rect,
|
|
2182
2204
|
pcb_cutout_circle,
|
|
2183
2205
|
pcb_cutout_polygon
|
|
@@ -2185,117 +2207,117 @@ var pcb_cutout = z100.discriminatedUnion("shape", [
|
|
|
2185
2207
|
expectTypesMatch(true);
|
|
2186
2208
|
|
|
2187
2209
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2188
|
-
import { z as
|
|
2189
|
-
var pcb_missing_footprint_error =
|
|
2190
|
-
type:
|
|
2210
|
+
import { z as z102 } from "zod";
|
|
2211
|
+
var pcb_missing_footprint_error = z102.object({
|
|
2212
|
+
type: z102.literal("pcb_missing_footprint_error"),
|
|
2191
2213
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2192
2214
|
"pcb_missing_footprint_error"
|
|
2193
2215
|
),
|
|
2194
|
-
pcb_group_id:
|
|
2195
|
-
subcircuit_id:
|
|
2196
|
-
error_type:
|
|
2197
|
-
source_component_id:
|
|
2198
|
-
message:
|
|
2216
|
+
pcb_group_id: z102.string().optional(),
|
|
2217
|
+
subcircuit_id: z102.string().optional(),
|
|
2218
|
+
error_type: z102.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2219
|
+
source_component_id: z102.string(),
|
|
2220
|
+
message: z102.string()
|
|
2199
2221
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2200
2222
|
expectTypesMatch(
|
|
2201
2223
|
true
|
|
2202
2224
|
);
|
|
2203
2225
|
|
|
2204
2226
|
// src/pcb/external_footprint_load_error.ts
|
|
2205
|
-
import { z as
|
|
2206
|
-
var external_footprint_load_error =
|
|
2207
|
-
type:
|
|
2227
|
+
import { z as z103 } from "zod";
|
|
2228
|
+
var external_footprint_load_error = z103.object({
|
|
2229
|
+
type: z103.literal("external_footprint_load_error"),
|
|
2208
2230
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2209
2231
|
"external_footprint_load_error"
|
|
2210
2232
|
),
|
|
2211
|
-
pcb_component_id:
|
|
2212
|
-
source_component_id:
|
|
2213
|
-
pcb_group_id:
|
|
2214
|
-
subcircuit_id:
|
|
2215
|
-
footprinter_string:
|
|
2216
|
-
error_type:
|
|
2217
|
-
message:
|
|
2233
|
+
pcb_component_id: z103.string(),
|
|
2234
|
+
source_component_id: z103.string(),
|
|
2235
|
+
pcb_group_id: z103.string().optional(),
|
|
2236
|
+
subcircuit_id: z103.string().optional(),
|
|
2237
|
+
footprinter_string: z103.string().optional(),
|
|
2238
|
+
error_type: z103.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2239
|
+
message: z103.string()
|
|
2218
2240
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2219
2241
|
expectTypesMatch(true);
|
|
2220
2242
|
|
|
2221
2243
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2222
|
-
import { z as
|
|
2223
|
-
var circuit_json_footprint_load_error =
|
|
2224
|
-
type:
|
|
2244
|
+
import { z as z104 } from "zod";
|
|
2245
|
+
var circuit_json_footprint_load_error = z104.object({
|
|
2246
|
+
type: z104.literal("circuit_json_footprint_load_error"),
|
|
2225
2247
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2226
2248
|
"circuit_json_footprint_load_error"
|
|
2227
2249
|
),
|
|
2228
|
-
pcb_component_id:
|
|
2229
|
-
source_component_id:
|
|
2230
|
-
pcb_group_id:
|
|
2231
|
-
subcircuit_id:
|
|
2232
|
-
error_type:
|
|
2233
|
-
message:
|
|
2234
|
-
circuit_json:
|
|
2250
|
+
pcb_component_id: z104.string(),
|
|
2251
|
+
source_component_id: z104.string(),
|
|
2252
|
+
pcb_group_id: z104.string().optional(),
|
|
2253
|
+
subcircuit_id: z104.string().optional(),
|
|
2254
|
+
error_type: z104.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2255
|
+
message: z104.string(),
|
|
2256
|
+
circuit_json: z104.array(z104.any()).optional()
|
|
2235
2257
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2236
2258
|
expectTypesMatch(true);
|
|
2237
2259
|
|
|
2238
2260
|
// src/pcb/pcb_group.ts
|
|
2239
|
-
import { z as
|
|
2240
|
-
var pcb_group =
|
|
2241
|
-
type:
|
|
2261
|
+
import { z as z105 } from "zod";
|
|
2262
|
+
var pcb_group = z105.object({
|
|
2263
|
+
type: z105.literal("pcb_group"),
|
|
2242
2264
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2243
|
-
source_group_id:
|
|
2244
|
-
is_subcircuit:
|
|
2245
|
-
subcircuit_id:
|
|
2265
|
+
source_group_id: z105.string(),
|
|
2266
|
+
is_subcircuit: z105.boolean().optional(),
|
|
2267
|
+
subcircuit_id: z105.string().optional(),
|
|
2246
2268
|
width: length,
|
|
2247
2269
|
height: length,
|
|
2248
2270
|
center: point,
|
|
2249
|
-
pcb_component_ids:
|
|
2250
|
-
name:
|
|
2251
|
-
description:
|
|
2252
|
-
layout_mode:
|
|
2253
|
-
autorouter_configuration:
|
|
2271
|
+
pcb_component_ids: z105.array(z105.string()),
|
|
2272
|
+
name: z105.string().optional(),
|
|
2273
|
+
description: z105.string().optional(),
|
|
2274
|
+
layout_mode: z105.string().optional(),
|
|
2275
|
+
autorouter_configuration: z105.object({
|
|
2254
2276
|
trace_clearance: length
|
|
2255
2277
|
}).optional(),
|
|
2256
|
-
autorouter_used_string:
|
|
2278
|
+
autorouter_used_string: z105.string().optional()
|
|
2257
2279
|
}).describe("Defines a group of components on the PCB");
|
|
2258
2280
|
expectTypesMatch(true);
|
|
2259
2281
|
|
|
2260
2282
|
// src/pcb/pcb_autorouting_error.ts
|
|
2261
|
-
import { z as
|
|
2262
|
-
var pcb_autorouting_error =
|
|
2263
|
-
type:
|
|
2283
|
+
import { z as z106 } from "zod";
|
|
2284
|
+
var pcb_autorouting_error = z106.object({
|
|
2285
|
+
type: z106.literal("pcb_autorouting_error"),
|
|
2264
2286
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2265
|
-
error_type:
|
|
2266
|
-
message:
|
|
2267
|
-
subcircuit_id:
|
|
2287
|
+
error_type: z106.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2288
|
+
message: z106.string(),
|
|
2289
|
+
subcircuit_id: z106.string().optional()
|
|
2268
2290
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2269
2291
|
expectTypesMatch(true);
|
|
2270
2292
|
|
|
2271
2293
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2272
|
-
import { z as
|
|
2273
|
-
var pcb_manual_edit_conflict_warning =
|
|
2274
|
-
type:
|
|
2294
|
+
import { z as z107 } from "zod";
|
|
2295
|
+
var pcb_manual_edit_conflict_warning = z107.object({
|
|
2296
|
+
type: z107.literal("pcb_manual_edit_conflict_warning"),
|
|
2275
2297
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2276
2298
|
"pcb_manual_edit_conflict_warning"
|
|
2277
2299
|
),
|
|
2278
|
-
warning_type:
|
|
2279
|
-
message:
|
|
2280
|
-
pcb_component_id:
|
|
2281
|
-
pcb_group_id:
|
|
2282
|
-
subcircuit_id:
|
|
2283
|
-
source_component_id:
|
|
2300
|
+
warning_type: z107.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2301
|
+
message: z107.string(),
|
|
2302
|
+
pcb_component_id: z107.string(),
|
|
2303
|
+
pcb_group_id: z107.string().optional(),
|
|
2304
|
+
subcircuit_id: z107.string().optional(),
|
|
2305
|
+
source_component_id: z107.string()
|
|
2284
2306
|
}).describe(
|
|
2285
2307
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2286
2308
|
);
|
|
2287
2309
|
expectTypesMatch(true);
|
|
2288
2310
|
|
|
2289
2311
|
// src/pcb/pcb_breakout_point.ts
|
|
2290
|
-
import { z as
|
|
2291
|
-
var pcb_breakout_point =
|
|
2292
|
-
type:
|
|
2312
|
+
import { z as z108 } from "zod";
|
|
2313
|
+
var pcb_breakout_point = z108.object({
|
|
2314
|
+
type: z108.literal("pcb_breakout_point"),
|
|
2293
2315
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2294
|
-
pcb_group_id:
|
|
2295
|
-
subcircuit_id:
|
|
2296
|
-
source_trace_id:
|
|
2297
|
-
source_port_id:
|
|
2298
|
-
source_net_id:
|
|
2316
|
+
pcb_group_id: z108.string(),
|
|
2317
|
+
subcircuit_id: z108.string().optional(),
|
|
2318
|
+
source_trace_id: z108.string().optional(),
|
|
2319
|
+
source_port_id: z108.string().optional(),
|
|
2320
|
+
source_net_id: z108.string().optional(),
|
|
2299
2321
|
x: distance,
|
|
2300
2322
|
y: distance
|
|
2301
2323
|
}).describe(
|
|
@@ -2304,60 +2326,60 @@ var pcb_breakout_point = z107.object({
|
|
|
2304
2326
|
expectTypesMatch(true);
|
|
2305
2327
|
|
|
2306
2328
|
// src/pcb/pcb_ground_plane.ts
|
|
2307
|
-
import { z as
|
|
2308
|
-
var pcb_ground_plane =
|
|
2309
|
-
type:
|
|
2329
|
+
import { z as z109 } from "zod";
|
|
2330
|
+
var pcb_ground_plane = z109.object({
|
|
2331
|
+
type: z109.literal("pcb_ground_plane"),
|
|
2310
2332
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2311
|
-
source_pcb_ground_plane_id:
|
|
2312
|
-
source_net_id:
|
|
2313
|
-
pcb_group_id:
|
|
2314
|
-
subcircuit_id:
|
|
2333
|
+
source_pcb_ground_plane_id: z109.string(),
|
|
2334
|
+
source_net_id: z109.string(),
|
|
2335
|
+
pcb_group_id: z109.string().optional(),
|
|
2336
|
+
subcircuit_id: z109.string().optional()
|
|
2315
2337
|
}).describe("Defines a ground plane on the PCB");
|
|
2316
2338
|
expectTypesMatch(true);
|
|
2317
2339
|
|
|
2318
2340
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2319
|
-
import { z as
|
|
2320
|
-
var pcb_ground_plane_region =
|
|
2321
|
-
type:
|
|
2341
|
+
import { z as z110 } from "zod";
|
|
2342
|
+
var pcb_ground_plane_region = z110.object({
|
|
2343
|
+
type: z110.literal("pcb_ground_plane_region"),
|
|
2322
2344
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2323
2345
|
"pcb_ground_plane_region"
|
|
2324
2346
|
),
|
|
2325
|
-
pcb_ground_plane_id:
|
|
2326
|
-
pcb_group_id:
|
|
2327
|
-
subcircuit_id:
|
|
2347
|
+
pcb_ground_plane_id: z110.string(),
|
|
2348
|
+
pcb_group_id: z110.string().optional(),
|
|
2349
|
+
subcircuit_id: z110.string().optional(),
|
|
2328
2350
|
layer: layer_ref,
|
|
2329
|
-
points:
|
|
2351
|
+
points: z110.array(point)
|
|
2330
2352
|
}).describe("Defines a polygon region of a ground plane");
|
|
2331
2353
|
expectTypesMatch(true);
|
|
2332
2354
|
|
|
2333
2355
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2334
|
-
import { z as
|
|
2335
|
-
var pcb_thermal_spoke =
|
|
2336
|
-
type:
|
|
2356
|
+
import { z as z111 } from "zod";
|
|
2357
|
+
var pcb_thermal_spoke = z111.object({
|
|
2358
|
+
type: z111.literal("pcb_thermal_spoke"),
|
|
2337
2359
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2338
|
-
pcb_ground_plane_id:
|
|
2339
|
-
shape:
|
|
2340
|
-
spoke_count:
|
|
2360
|
+
pcb_ground_plane_id: z111.string(),
|
|
2361
|
+
shape: z111.string(),
|
|
2362
|
+
spoke_count: z111.number(),
|
|
2341
2363
|
spoke_thickness: distance,
|
|
2342
2364
|
spoke_inner_diameter: distance,
|
|
2343
2365
|
spoke_outer_diameter: distance,
|
|
2344
|
-
pcb_plated_hole_id:
|
|
2345
|
-
subcircuit_id:
|
|
2366
|
+
pcb_plated_hole_id: z111.string().optional(),
|
|
2367
|
+
subcircuit_id: z111.string().optional()
|
|
2346
2368
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2347
2369
|
expectTypesMatch(true);
|
|
2348
2370
|
|
|
2349
2371
|
// src/pcb/pcb_copper_pour.ts
|
|
2350
|
-
import { z as
|
|
2351
|
-
var pcb_copper_pour_base =
|
|
2352
|
-
type:
|
|
2372
|
+
import { z as z112 } from "zod";
|
|
2373
|
+
var pcb_copper_pour_base = z112.object({
|
|
2374
|
+
type: z112.literal("pcb_copper_pour"),
|
|
2353
2375
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2354
|
-
pcb_group_id:
|
|
2355
|
-
subcircuit_id:
|
|
2376
|
+
pcb_group_id: z112.string().optional(),
|
|
2377
|
+
subcircuit_id: z112.string().optional(),
|
|
2356
2378
|
layer: layer_ref,
|
|
2357
|
-
source_net_id:
|
|
2379
|
+
source_net_id: z112.string().optional()
|
|
2358
2380
|
});
|
|
2359
2381
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2360
|
-
shape:
|
|
2382
|
+
shape: z112.literal("rect"),
|
|
2361
2383
|
center: point,
|
|
2362
2384
|
width: length,
|
|
2363
2385
|
height: length,
|
|
@@ -2365,16 +2387,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2365
2387
|
});
|
|
2366
2388
|
expectTypesMatch(true);
|
|
2367
2389
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2368
|
-
shape:
|
|
2390
|
+
shape: z112.literal("brep"),
|
|
2369
2391
|
brep_shape
|
|
2370
2392
|
});
|
|
2371
2393
|
expectTypesMatch(true);
|
|
2372
2394
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2373
|
-
shape:
|
|
2374
|
-
points:
|
|
2395
|
+
shape: z112.literal("polygon"),
|
|
2396
|
+
points: z112.array(point)
|
|
2375
2397
|
});
|
|
2376
2398
|
expectTypesMatch(true);
|
|
2377
|
-
var pcb_copper_pour =
|
|
2399
|
+
var pcb_copper_pour = z112.discriminatedUnion("shape", [
|
|
2378
2400
|
pcb_copper_pour_rect,
|
|
2379
2401
|
pcb_copper_pour_brep,
|
|
2380
2402
|
pcb_copper_pour_polygon
|
|
@@ -2382,117 +2404,117 @@ var pcb_copper_pour = z111.discriminatedUnion("shape", [
|
|
|
2382
2404
|
expectTypesMatch(true);
|
|
2383
2405
|
|
|
2384
2406
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2385
|
-
import { z as
|
|
2386
|
-
var pcb_component_outside_board_error =
|
|
2387
|
-
type:
|
|
2407
|
+
import { z as z113 } from "zod";
|
|
2408
|
+
var pcb_component_outside_board_error = z113.object({
|
|
2409
|
+
type: z113.literal("pcb_component_outside_board_error"),
|
|
2388
2410
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2389
2411
|
"pcb_component_outside_board_error"
|
|
2390
2412
|
),
|
|
2391
|
-
error_type:
|
|
2392
|
-
message:
|
|
2393
|
-
pcb_component_id:
|
|
2394
|
-
pcb_board_id:
|
|
2413
|
+
error_type: z113.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2414
|
+
message: z113.string(),
|
|
2415
|
+
pcb_component_id: z113.string(),
|
|
2416
|
+
pcb_board_id: z113.string(),
|
|
2395
2417
|
component_center: point,
|
|
2396
|
-
component_bounds:
|
|
2397
|
-
min_x:
|
|
2398
|
-
max_x:
|
|
2399
|
-
min_y:
|
|
2400
|
-
max_y:
|
|
2418
|
+
component_bounds: z113.object({
|
|
2419
|
+
min_x: z113.number(),
|
|
2420
|
+
max_x: z113.number(),
|
|
2421
|
+
min_y: z113.number(),
|
|
2422
|
+
max_y: z113.number()
|
|
2401
2423
|
}),
|
|
2402
|
-
subcircuit_id:
|
|
2403
|
-
source_component_id:
|
|
2424
|
+
subcircuit_id: z113.string().optional(),
|
|
2425
|
+
source_component_id: z113.string().optional()
|
|
2404
2426
|
}).describe(
|
|
2405
2427
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2406
2428
|
);
|
|
2407
2429
|
expectTypesMatch(true);
|
|
2408
2430
|
|
|
2409
2431
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2410
|
-
import { z as
|
|
2411
|
-
var pcb_via_clearance_error =
|
|
2412
|
-
type:
|
|
2432
|
+
import { z as z114 } from "zod";
|
|
2433
|
+
var pcb_via_clearance_error = z114.object({
|
|
2434
|
+
type: z114.literal("pcb_via_clearance_error"),
|
|
2413
2435
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2414
|
-
error_type:
|
|
2415
|
-
message:
|
|
2416
|
-
pcb_via_ids:
|
|
2436
|
+
error_type: z114.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2437
|
+
message: z114.string(),
|
|
2438
|
+
pcb_via_ids: z114.array(z114.string()).min(2),
|
|
2417
2439
|
minimum_clearance: distance.optional(),
|
|
2418
2440
|
actual_clearance: distance.optional(),
|
|
2419
|
-
pcb_center:
|
|
2420
|
-
x:
|
|
2421
|
-
y:
|
|
2441
|
+
pcb_center: z114.object({
|
|
2442
|
+
x: z114.number().optional(),
|
|
2443
|
+
y: z114.number().optional()
|
|
2422
2444
|
}).optional(),
|
|
2423
|
-
subcircuit_id:
|
|
2445
|
+
subcircuit_id: z114.string().optional()
|
|
2424
2446
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2425
2447
|
expectTypesMatch(true);
|
|
2426
2448
|
|
|
2427
2449
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2428
|
-
import { z as
|
|
2429
|
-
var pcb_courtyard_rect =
|
|
2430
|
-
type:
|
|
2450
|
+
import { z as z115 } from "zod";
|
|
2451
|
+
var pcb_courtyard_rect = z115.object({
|
|
2452
|
+
type: z115.literal("pcb_courtyard_rect"),
|
|
2431
2453
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2432
|
-
pcb_component_id:
|
|
2433
|
-
pcb_group_id:
|
|
2434
|
-
subcircuit_id:
|
|
2454
|
+
pcb_component_id: z115.string(),
|
|
2455
|
+
pcb_group_id: z115.string().optional(),
|
|
2456
|
+
subcircuit_id: z115.string().optional(),
|
|
2435
2457
|
center: point,
|
|
2436
2458
|
width: length,
|
|
2437
2459
|
height: length,
|
|
2438
2460
|
layer: visible_layer,
|
|
2439
2461
|
stroke_width: length.default("0.1mm"),
|
|
2440
|
-
is_filled:
|
|
2441
|
-
has_stroke:
|
|
2442
|
-
is_stroke_dashed:
|
|
2443
|
-
color:
|
|
2462
|
+
is_filled: z115.boolean().optional(),
|
|
2463
|
+
has_stroke: z115.boolean().optional(),
|
|
2464
|
+
is_stroke_dashed: z115.boolean().optional(),
|
|
2465
|
+
color: z115.string().optional()
|
|
2444
2466
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2445
2467
|
expectTypesMatch(true);
|
|
2446
2468
|
|
|
2447
2469
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2448
|
-
import { z as
|
|
2449
|
-
var pcb_courtyard_outline =
|
|
2450
|
-
type:
|
|
2470
|
+
import { z as z116 } from "zod";
|
|
2471
|
+
var pcb_courtyard_outline = z116.object({
|
|
2472
|
+
type: z116.literal("pcb_courtyard_outline"),
|
|
2451
2473
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2452
2474
|
"pcb_courtyard_outline"
|
|
2453
2475
|
),
|
|
2454
|
-
pcb_component_id:
|
|
2455
|
-
pcb_group_id:
|
|
2456
|
-
subcircuit_id:
|
|
2476
|
+
pcb_component_id: z116.string(),
|
|
2477
|
+
pcb_group_id: z116.string().optional(),
|
|
2478
|
+
subcircuit_id: z116.string().optional(),
|
|
2457
2479
|
layer: visible_layer,
|
|
2458
|
-
outline:
|
|
2480
|
+
outline: z116.array(point).min(2),
|
|
2459
2481
|
stroke_width: length.default("0.1mm"),
|
|
2460
|
-
is_closed:
|
|
2461
|
-
is_stroke_dashed:
|
|
2462
|
-
color:
|
|
2482
|
+
is_closed: z116.boolean().optional(),
|
|
2483
|
+
is_stroke_dashed: z116.boolean().optional(),
|
|
2484
|
+
color: z116.string().optional()
|
|
2463
2485
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2464
2486
|
expectTypesMatch(true);
|
|
2465
2487
|
|
|
2466
2488
|
// src/cad/cad_component.ts
|
|
2467
|
-
import { z as
|
|
2468
|
-
var cad_component =
|
|
2469
|
-
type:
|
|
2470
|
-
cad_component_id:
|
|
2471
|
-
pcb_component_id:
|
|
2472
|
-
source_component_id:
|
|
2489
|
+
import { z as z117 } from "zod";
|
|
2490
|
+
var cad_component = z117.object({
|
|
2491
|
+
type: z117.literal("cad_component"),
|
|
2492
|
+
cad_component_id: z117.string(),
|
|
2493
|
+
pcb_component_id: z117.string(),
|
|
2494
|
+
source_component_id: z117.string(),
|
|
2473
2495
|
position: point3,
|
|
2474
2496
|
rotation: point3.optional(),
|
|
2475
2497
|
size: point3.optional(),
|
|
2476
2498
|
layer: layer_ref.optional(),
|
|
2477
|
-
subcircuit_id:
|
|
2499
|
+
subcircuit_id: z117.string().optional(),
|
|
2478
2500
|
// These are all ways to generate/load the 3d model
|
|
2479
|
-
footprinter_string:
|
|
2480
|
-
model_obj_url:
|
|
2481
|
-
model_stl_url:
|
|
2482
|
-
model_3mf_url:
|
|
2483
|
-
model_gltf_url:
|
|
2484
|
-
model_glb_url:
|
|
2485
|
-
model_step_url:
|
|
2486
|
-
model_wrl_url:
|
|
2487
|
-
model_unit_to_mm_scale_factor:
|
|
2488
|
-
model_jscad:
|
|
2501
|
+
footprinter_string: z117.string().optional(),
|
|
2502
|
+
model_obj_url: z117.string().optional(),
|
|
2503
|
+
model_stl_url: z117.string().optional(),
|
|
2504
|
+
model_3mf_url: z117.string().optional(),
|
|
2505
|
+
model_gltf_url: z117.string().optional(),
|
|
2506
|
+
model_glb_url: z117.string().optional(),
|
|
2507
|
+
model_step_url: z117.string().optional(),
|
|
2508
|
+
model_wrl_url: z117.string().optional(),
|
|
2509
|
+
model_unit_to_mm_scale_factor: z117.number().optional(),
|
|
2510
|
+
model_jscad: z117.any().optional()
|
|
2489
2511
|
}).describe("Defines a component on the PCB");
|
|
2490
2512
|
expectTypesMatch(true);
|
|
2491
2513
|
|
|
2492
2514
|
// src/simulation/simulation_voltage_source.ts
|
|
2493
|
-
import { z as
|
|
2494
|
-
var wave_shape =
|
|
2495
|
-
var percentage =
|
|
2515
|
+
import { z as z118 } from "zod";
|
|
2516
|
+
var wave_shape = z118.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2517
|
+
var percentage = z118.union([z118.string(), z118.number()]).transform((val) => {
|
|
2496
2518
|
if (typeof val === "string") {
|
|
2497
2519
|
if (val.endsWith("%")) {
|
|
2498
2520
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2501,30 +2523,30 @@ var percentage = z117.union([z117.string(), z117.number()]).transform((val) => {
|
|
|
2501
2523
|
}
|
|
2502
2524
|
return val;
|
|
2503
2525
|
}).pipe(
|
|
2504
|
-
|
|
2526
|
+
z118.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2505
2527
|
);
|
|
2506
|
-
var simulation_dc_voltage_source =
|
|
2507
|
-
type:
|
|
2528
|
+
var simulation_dc_voltage_source = z118.object({
|
|
2529
|
+
type: z118.literal("simulation_voltage_source"),
|
|
2508
2530
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2509
2531
|
"simulation_voltage_source"
|
|
2510
2532
|
),
|
|
2511
|
-
is_dc_source:
|
|
2512
|
-
positive_source_port_id:
|
|
2513
|
-
negative_source_port_id:
|
|
2514
|
-
positive_source_net_id:
|
|
2515
|
-
negative_source_net_id:
|
|
2533
|
+
is_dc_source: z118.literal(true).optional().default(true),
|
|
2534
|
+
positive_source_port_id: z118.string().optional(),
|
|
2535
|
+
negative_source_port_id: z118.string().optional(),
|
|
2536
|
+
positive_source_net_id: z118.string().optional(),
|
|
2537
|
+
negative_source_net_id: z118.string().optional(),
|
|
2516
2538
|
voltage
|
|
2517
2539
|
}).describe("Defines a DC voltage source for simulation");
|
|
2518
|
-
var simulation_ac_voltage_source =
|
|
2519
|
-
type:
|
|
2540
|
+
var simulation_ac_voltage_source = z118.object({
|
|
2541
|
+
type: z118.literal("simulation_voltage_source"),
|
|
2520
2542
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2521
2543
|
"simulation_voltage_source"
|
|
2522
2544
|
),
|
|
2523
|
-
is_dc_source:
|
|
2524
|
-
terminal1_source_port_id:
|
|
2525
|
-
terminal2_source_port_id:
|
|
2526
|
-
terminal1_source_net_id:
|
|
2527
|
-
terminal2_source_net_id:
|
|
2545
|
+
is_dc_source: z118.literal(false),
|
|
2546
|
+
terminal1_source_port_id: z118.string().optional(),
|
|
2547
|
+
terminal2_source_port_id: z118.string().optional(),
|
|
2548
|
+
terminal1_source_net_id: z118.string().optional(),
|
|
2549
|
+
terminal2_source_net_id: z118.string().optional(),
|
|
2528
2550
|
voltage: voltage.optional(),
|
|
2529
2551
|
frequency: frequency.optional(),
|
|
2530
2552
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2532,25 +2554,25 @@ var simulation_ac_voltage_source = z117.object({
|
|
|
2532
2554
|
phase: rotation.optional(),
|
|
2533
2555
|
duty_cycle: percentage.optional()
|
|
2534
2556
|
}).describe("Defines an AC voltage source for simulation");
|
|
2535
|
-
var simulation_voltage_source =
|
|
2557
|
+
var simulation_voltage_source = z118.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2536
2558
|
expectTypesMatch(true);
|
|
2537
2559
|
expectTypesMatch(true);
|
|
2538
2560
|
expectTypesMatch(true);
|
|
2539
2561
|
|
|
2540
2562
|
// src/simulation/simulation_experiment.ts
|
|
2541
|
-
import { z as
|
|
2542
|
-
var experiment_type =
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2563
|
+
import { z as z119 } from "zod";
|
|
2564
|
+
var experiment_type = z119.union([
|
|
2565
|
+
z119.literal("spice_dc_sweep"),
|
|
2566
|
+
z119.literal("spice_dc_operating_point"),
|
|
2567
|
+
z119.literal("spice_transient_analysis"),
|
|
2568
|
+
z119.literal("spice_ac_analysis")
|
|
2547
2569
|
]);
|
|
2548
|
-
var simulation_experiment =
|
|
2549
|
-
type:
|
|
2570
|
+
var simulation_experiment = z119.object({
|
|
2571
|
+
type: z119.literal("simulation_experiment"),
|
|
2550
2572
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2551
2573
|
"simulation_experiment"
|
|
2552
2574
|
),
|
|
2553
|
-
name:
|
|
2575
|
+
name: z119.string(),
|
|
2554
2576
|
experiment_type,
|
|
2555
2577
|
time_per_step: duration_ms.optional(),
|
|
2556
2578
|
start_time_ms: ms.optional(),
|
|
@@ -2559,47 +2581,47 @@ var simulation_experiment = z118.object({
|
|
|
2559
2581
|
expectTypesMatch(true);
|
|
2560
2582
|
|
|
2561
2583
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2562
|
-
import { z as
|
|
2563
|
-
var simulation_transient_voltage_graph =
|
|
2564
|
-
type:
|
|
2584
|
+
import { z as z120 } from "zod";
|
|
2585
|
+
var simulation_transient_voltage_graph = z120.object({
|
|
2586
|
+
type: z120.literal("simulation_transient_voltage_graph"),
|
|
2565
2587
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2566
2588
|
"simulation_transient_voltage_graph"
|
|
2567
2589
|
),
|
|
2568
|
-
simulation_experiment_id:
|
|
2569
|
-
timestamps_ms:
|
|
2570
|
-
voltage_levels:
|
|
2571
|
-
schematic_voltage_probe_id:
|
|
2572
|
-
subcircuit_connectivity_map_key:
|
|
2590
|
+
simulation_experiment_id: z120.string(),
|
|
2591
|
+
timestamps_ms: z120.array(z120.number()).optional(),
|
|
2592
|
+
voltage_levels: z120.array(z120.number()),
|
|
2593
|
+
schematic_voltage_probe_id: z120.string().optional(),
|
|
2594
|
+
subcircuit_connectivity_map_key: z120.string().optional(),
|
|
2573
2595
|
time_per_step: duration_ms,
|
|
2574
2596
|
start_time_ms: ms,
|
|
2575
2597
|
end_time_ms: ms,
|
|
2576
|
-
name:
|
|
2598
|
+
name: z120.string().optional()
|
|
2577
2599
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2578
2600
|
expectTypesMatch(true);
|
|
2579
2601
|
|
|
2580
2602
|
// src/simulation/simulation_switch.ts
|
|
2581
|
-
import { z as
|
|
2582
|
-
var simulation_switch =
|
|
2583
|
-
type:
|
|
2603
|
+
import { z as z121 } from "zod";
|
|
2604
|
+
var simulation_switch = z121.object({
|
|
2605
|
+
type: z121.literal("simulation_switch"),
|
|
2584
2606
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2585
2607
|
closes_at: ms.optional(),
|
|
2586
2608
|
opens_at: ms.optional(),
|
|
2587
|
-
starts_closed:
|
|
2609
|
+
starts_closed: z121.boolean().optional(),
|
|
2588
2610
|
switching_frequency: frequency.optional()
|
|
2589
2611
|
}).describe("Defines a switch for simulation timing control");
|
|
2590
2612
|
expectTypesMatch(true);
|
|
2591
2613
|
|
|
2592
2614
|
// src/simulation/simulation_voltage_probe.ts
|
|
2593
|
-
import { z as
|
|
2594
|
-
var simulation_voltage_probe =
|
|
2595
|
-
type:
|
|
2615
|
+
import { z as z122 } from "zod";
|
|
2616
|
+
var simulation_voltage_probe = z122.object({
|
|
2617
|
+
type: z122.literal("simulation_voltage_probe"),
|
|
2596
2618
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2597
2619
|
"simulation_voltage_probe"
|
|
2598
2620
|
),
|
|
2599
|
-
source_port_id:
|
|
2600
|
-
source_net_id:
|
|
2601
|
-
name:
|
|
2602
|
-
subcircuit_id:
|
|
2621
|
+
source_port_id: z122.string().optional(),
|
|
2622
|
+
source_net_id: z122.string().optional(),
|
|
2623
|
+
name: z122.string().optional(),
|
|
2624
|
+
subcircuit_id: z122.string().optional()
|
|
2603
2625
|
}).describe(
|
|
2604
2626
|
"Defines a voltage probe for simulation, connected to a port or a net"
|
|
2605
2627
|
).refine(
|
|
@@ -2611,8 +2633,8 @@ var simulation_voltage_probe = z121.object({
|
|
|
2611
2633
|
expectTypesMatch(true);
|
|
2612
2634
|
|
|
2613
2635
|
// src/any_circuit_element.ts
|
|
2614
|
-
import { z as
|
|
2615
|
-
var any_circuit_element =
|
|
2636
|
+
import { z as z123 } from "zod";
|
|
2637
|
+
var any_circuit_element = z123.union([
|
|
2616
2638
|
source_trace,
|
|
2617
2639
|
source_port,
|
|
2618
2640
|
any_source_component,
|
|
@@ -2674,6 +2696,7 @@ var any_circuit_element = z122.union([
|
|
|
2674
2696
|
pcb_fabrication_note_path,
|
|
2675
2697
|
pcb_fabrication_note_text,
|
|
2676
2698
|
pcb_fabrication_note_rect,
|
|
2699
|
+
pcb_fabrication_note_dimension,
|
|
2677
2700
|
pcb_note_text,
|
|
2678
2701
|
pcb_note_rect,
|
|
2679
2702
|
pcb_note_path,
|
|
@@ -2757,6 +2780,7 @@ export {
|
|
|
2757
2780
|
pcb_cutout_circle,
|
|
2758
2781
|
pcb_cutout_polygon,
|
|
2759
2782
|
pcb_cutout_rect,
|
|
2783
|
+
pcb_fabrication_note_dimension,
|
|
2760
2784
|
pcb_fabrication_note_path,
|
|
2761
2785
|
pcb_fabrication_note_rect,
|
|
2762
2786
|
pcb_fabrication_note_text,
|