@tscircuit/props 0.0.640 → 0.0.642
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 +21 -0
- package/dist/index.d.ts +5939 -527
- package/dist/index.js +1022 -1003
- package/dist/index.js.map +1 -1
- package/lib/common/pcbPath.ts +41 -0
- package/lib/components/antenna.ts +23 -0
- package/lib/components/trace.ts +2 -27
- package/lib/index.ts +2 -0
- package/lib/platformConfig.ts +6 -0
- package/lib/projectConfig.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -558,6 +558,35 @@ var lrPolarPins = [
|
|
|
558
558
|
];
|
|
559
559
|
var distanceOrMultiplier = distance8.or(z20.enum(["2x", "3x", "4x"]));
|
|
560
560
|
|
|
561
|
+
// lib/common/pcbPath.ts
|
|
562
|
+
import { layer_ref as layer_ref2 } from "circuit-json";
|
|
563
|
+
import { z as z21 } from "zod";
|
|
564
|
+
var basePcbPathPoint = point.extend({
|
|
565
|
+
via: z21.boolean().optional(),
|
|
566
|
+
fromLayer: layer_ref2.optional(),
|
|
567
|
+
toLayer: layer_ref2.optional()
|
|
568
|
+
});
|
|
569
|
+
var pcbPathPoint = basePcbPathPoint.superRefine((value, ctx) => {
|
|
570
|
+
if (value.via) {
|
|
571
|
+
if (!value.toLayer) {
|
|
572
|
+
ctx.addIssue({
|
|
573
|
+
code: z21.ZodIssueCode.custom,
|
|
574
|
+
message: "toLayer is required when via is true",
|
|
575
|
+
path: ["toLayer"]
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
} else if (value.fromLayer || value.toLayer) {
|
|
579
|
+
ctx.addIssue({
|
|
580
|
+
code: z21.ZodIssueCode.custom,
|
|
581
|
+
message: "fromLayer/toLayer are only allowed when via is true",
|
|
582
|
+
path: ["via"]
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
var pcbPath = z21.array(z21.union([pcbPathPoint, z21.string()]));
|
|
587
|
+
expectTypesMatch(true);
|
|
588
|
+
expectTypesMatch(true);
|
|
589
|
+
|
|
561
590
|
// lib/generated/kicad-autocomplete.ts
|
|
562
591
|
var kicadFootprintKeys = [
|
|
563
592
|
"Audio_Module/Reverb_BTDR-1H",
|
|
@@ -16022,8 +16051,8 @@ var footprinterStringExamples = [
|
|
|
16022
16051
|
];
|
|
16023
16052
|
|
|
16024
16053
|
// lib/common/schematicOrientation.ts
|
|
16025
|
-
import { z as
|
|
16026
|
-
var schematicOrientation =
|
|
16054
|
+
import { z as z22 } from "zod";
|
|
16055
|
+
var schematicOrientation = z22.enum([
|
|
16027
16056
|
"vertical",
|
|
16028
16057
|
"horizontal",
|
|
16029
16058
|
"pos_top",
|
|
@@ -16042,32 +16071,32 @@ expectTypesMatch(
|
|
|
16042
16071
|
);
|
|
16043
16072
|
|
|
16044
16073
|
// lib/common/schematicPinDefinitions.ts
|
|
16045
|
-
import { z as
|
|
16046
|
-
var explicitPinSideDefinition =
|
|
16047
|
-
pins:
|
|
16048
|
-
direction:
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16074
|
+
import { z as z23 } from "zod";
|
|
16075
|
+
var explicitPinSideDefinition = z23.object({
|
|
16076
|
+
pins: z23.array(z23.union([z23.number(), z23.string()])),
|
|
16077
|
+
direction: z23.union([
|
|
16078
|
+
z23.literal("top-to-bottom"),
|
|
16079
|
+
z23.literal("left-to-right"),
|
|
16080
|
+
z23.literal("bottom-to-top"),
|
|
16081
|
+
z23.literal("right-to-left")
|
|
16053
16082
|
])
|
|
16054
16083
|
});
|
|
16055
|
-
var pinSideDefinitionInput =
|
|
16056
|
-
var pinSideDefinitionWithDefaultDirection = (direction2) =>
|
|
16084
|
+
var pinSideDefinitionInput = z23.array(z23.union([z23.number(), z23.string()]));
|
|
16085
|
+
var pinSideDefinitionWithDefaultDirection = (direction2) => z23.union([explicitPinSideDefinition, pinSideDefinitionInput]).transform(
|
|
16057
16086
|
(value) => Array.isArray(value) ? {
|
|
16058
16087
|
pins: value,
|
|
16059
16088
|
direction: direction2
|
|
16060
16089
|
} : value
|
|
16061
16090
|
);
|
|
16062
|
-
var schematicPortArrangement =
|
|
16063
|
-
leftSize:
|
|
16064
|
-
topSize:
|
|
16065
|
-
rightSize:
|
|
16066
|
-
bottomSize:
|
|
16067
|
-
leftPinCount:
|
|
16068
|
-
rightPinCount:
|
|
16069
|
-
topPinCount:
|
|
16070
|
-
bottomPinCount:
|
|
16091
|
+
var schematicPortArrangement = z23.object({
|
|
16092
|
+
leftSize: z23.number().optional().describe("@deprecated, use leftPinCount"),
|
|
16093
|
+
topSize: z23.number().optional().describe("@deprecated, use topPinCount"),
|
|
16094
|
+
rightSize: z23.number().optional().describe("@deprecated, use rightPinCount"),
|
|
16095
|
+
bottomSize: z23.number().optional().describe("@deprecated, use bottomPinCount"),
|
|
16096
|
+
leftPinCount: z23.number().optional(),
|
|
16097
|
+
rightPinCount: z23.number().optional(),
|
|
16098
|
+
topPinCount: z23.number().optional(),
|
|
16099
|
+
bottomPinCount: z23.number().optional(),
|
|
16071
16100
|
leftSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
|
|
16072
16101
|
rightSide: pinSideDefinitionWithDefaultDirection("top-to-bottom").optional(),
|
|
16073
16102
|
topSide: pinSideDefinitionWithDefaultDirection("left-to-right").optional(),
|
|
@@ -16078,9 +16107,9 @@ expectTypesMatch(true);
|
|
|
16078
16107
|
|
|
16079
16108
|
// lib/common/schematicPinStyle.ts
|
|
16080
16109
|
import { distance as distance9 } from "circuit-json";
|
|
16081
|
-
import { z as
|
|
16082
|
-
var schematicPinStyle =
|
|
16083
|
-
|
|
16110
|
+
import { z as z24 } from "zod";
|
|
16111
|
+
var schematicPinStyle = z24.record(
|
|
16112
|
+
z24.object({
|
|
16084
16113
|
marginLeft: distance9.optional(),
|
|
16085
16114
|
marginRight: distance9.optional(),
|
|
16086
16115
|
marginTop: distance9.optional(),
|
|
@@ -16094,17 +16123,17 @@ var schematicPinStyle = z23.record(
|
|
|
16094
16123
|
expectTypesMatch(true);
|
|
16095
16124
|
|
|
16096
16125
|
// lib/common/schematicPinLabel.ts
|
|
16097
|
-
import { z as
|
|
16098
|
-
var schematicPinLabel =
|
|
16126
|
+
import { z as z25 } from "zod";
|
|
16127
|
+
var schematicPinLabel = z25.string().regex(/^[A-Za-z0-9_]+$/);
|
|
16099
16128
|
|
|
16100
16129
|
// lib/common/schematicSize.ts
|
|
16101
16130
|
import { distance as distance10 } from "circuit-json";
|
|
16102
|
-
import { z as
|
|
16103
|
-
var schematicSymbolSize = distance10.or(
|
|
16131
|
+
import { z as z26 } from "zod";
|
|
16132
|
+
var schematicSymbolSize = distance10.or(z26.enum(["xs", "sm", "default", "md"])).describe("distance between pin1 and pin2 of the schematic symbol");
|
|
16104
16133
|
|
|
16105
16134
|
// lib/common/kicadPinMetadata.ts
|
|
16106
|
-
import { z as
|
|
16107
|
-
var kicadPinElectricalType =
|
|
16135
|
+
import { z as z27 } from "zod";
|
|
16136
|
+
var kicadPinElectricalType = z27.enum([
|
|
16108
16137
|
"input",
|
|
16109
16138
|
"output",
|
|
16110
16139
|
"bidirectional",
|
|
@@ -16118,7 +16147,7 @@ var kicadPinElectricalType = z26.enum([
|
|
|
16118
16147
|
"open_emitter",
|
|
16119
16148
|
"no_connect"
|
|
16120
16149
|
]);
|
|
16121
|
-
var kicadPinGraphicStyle =
|
|
16150
|
+
var kicadPinGraphicStyle = z27.enum([
|
|
16122
16151
|
"line",
|
|
16123
16152
|
"inverted",
|
|
16124
16153
|
"clock",
|
|
@@ -16129,7 +16158,7 @@ var kicadPinGraphicStyle = z26.enum([
|
|
|
16129
16158
|
"falling_edge_clock",
|
|
16130
16159
|
"nonlogic"
|
|
16131
16160
|
]);
|
|
16132
|
-
var kicadPinMetadata =
|
|
16161
|
+
var kicadPinMetadata = z27.object({
|
|
16133
16162
|
electricalType: kicadPinElectricalType.optional(),
|
|
16134
16163
|
graphicStyle: kicadPinGraphicStyle.optional(),
|
|
16135
16164
|
pinLength: distance.optional(),
|
|
@@ -16139,14 +16168,14 @@ var kicadPinMetadata = z26.object({
|
|
|
16139
16168
|
expectTypesMatch(true);
|
|
16140
16169
|
|
|
16141
16170
|
// lib/customDrc.ts
|
|
16142
|
-
import { z as
|
|
16143
|
-
var customDrcCheckFn =
|
|
16171
|
+
import { z as z28 } from "zod";
|
|
16172
|
+
var customDrcCheckFn = z28.custom(
|
|
16144
16173
|
(value) => typeof value === "function"
|
|
16145
16174
|
);
|
|
16146
16175
|
|
|
16147
16176
|
// lib/common/ninePointAnchor.ts
|
|
16148
|
-
import { z as
|
|
16149
|
-
var ninePointAnchor =
|
|
16177
|
+
import { z as z29 } from "zod";
|
|
16178
|
+
var ninePointAnchor = z29.enum([
|
|
16150
16179
|
"top_left",
|
|
16151
16180
|
"top_center",
|
|
16152
16181
|
"top_right",
|
|
@@ -16159,47 +16188,47 @@ var ninePointAnchor = z28.enum([
|
|
|
16159
16188
|
]);
|
|
16160
16189
|
|
|
16161
16190
|
// lib/components/board.ts
|
|
16162
|
-
import { z as
|
|
16191
|
+
import { z as z43 } from "zod";
|
|
16163
16192
|
|
|
16164
16193
|
// lib/components/group.ts
|
|
16165
16194
|
import {
|
|
16166
16195
|
length as length3,
|
|
16167
16196
|
distance as distance11
|
|
16168
16197
|
} from "circuit-json";
|
|
16169
|
-
import { z as
|
|
16198
|
+
import { z as z42 } from "zod";
|
|
16170
16199
|
|
|
16171
16200
|
// lib/manual-edits/manual-edit-events/base_manual_edit_event.ts
|
|
16172
|
-
import { z as
|
|
16173
|
-
var base_manual_edit_event =
|
|
16174
|
-
edit_event_id:
|
|
16175
|
-
in_progress:
|
|
16176
|
-
created_at:
|
|
16201
|
+
import { z as z30 } from "zod";
|
|
16202
|
+
var base_manual_edit_event = z30.object({
|
|
16203
|
+
edit_event_id: z30.string(),
|
|
16204
|
+
in_progress: z30.boolean().optional(),
|
|
16205
|
+
created_at: z30.number()
|
|
16177
16206
|
});
|
|
16178
16207
|
expectTypesMatch(
|
|
16179
16208
|
true
|
|
16180
16209
|
);
|
|
16181
16210
|
|
|
16182
16211
|
// lib/manual-edits/manual-edit-events/edit_pcb_component_location_event.ts
|
|
16183
|
-
import { z as
|
|
16212
|
+
import { z as z31 } from "zod";
|
|
16184
16213
|
var edit_pcb_component_location_event = base_manual_edit_event.extend({
|
|
16185
|
-
pcb_edit_event_type:
|
|
16186
|
-
edit_event_type:
|
|
16187
|
-
pcb_component_id:
|
|
16188
|
-
original_center:
|
|
16189
|
-
new_center:
|
|
16214
|
+
pcb_edit_event_type: z31.literal("edit_component_location").describe("deprecated"),
|
|
16215
|
+
edit_event_type: z31.literal("edit_pcb_component_location"),
|
|
16216
|
+
pcb_component_id: z31.string(),
|
|
16217
|
+
original_center: z31.object({ x: z31.number(), y: z31.number() }),
|
|
16218
|
+
new_center: z31.object({ x: z31.number(), y: z31.number() })
|
|
16190
16219
|
});
|
|
16191
16220
|
var edit_component_location_event = edit_pcb_component_location_event;
|
|
16192
16221
|
expectTypesMatch(true);
|
|
16193
16222
|
|
|
16194
16223
|
// lib/manual-edits/manual-edit-events/edit_trace_hint_event.ts
|
|
16195
|
-
import { z as
|
|
16224
|
+
import { z as z32 } from "zod";
|
|
16196
16225
|
var edit_trace_hint_event = base_manual_edit_event.extend({
|
|
16197
|
-
pcb_edit_event_type:
|
|
16198
|
-
edit_event_type:
|
|
16199
|
-
pcb_port_id:
|
|
16200
|
-
pcb_trace_hint_id:
|
|
16201
|
-
route:
|
|
16202
|
-
|
|
16226
|
+
pcb_edit_event_type: z32.literal("edit_trace_hint").describe("deprecated"),
|
|
16227
|
+
edit_event_type: z32.literal("edit_pcb_trace_hint").optional(),
|
|
16228
|
+
pcb_port_id: z32.string(),
|
|
16229
|
+
pcb_trace_hint_id: z32.string().optional(),
|
|
16230
|
+
route: z32.array(
|
|
16231
|
+
z32.object({ x: z32.number(), y: z32.number(), via: z32.boolean().optional() })
|
|
16203
16232
|
)
|
|
16204
16233
|
});
|
|
16205
16234
|
expectTypesMatch(
|
|
@@ -16207,38 +16236,38 @@ expectTypesMatch(
|
|
|
16207
16236
|
);
|
|
16208
16237
|
|
|
16209
16238
|
// lib/manual-edits/manual-edit-events/edit_schematic_component_location_event.ts
|
|
16210
|
-
import { z as
|
|
16239
|
+
import { z as z33 } from "zod";
|
|
16211
16240
|
var edit_schematic_component_location_event = base_manual_edit_event.extend({
|
|
16212
|
-
edit_event_type:
|
|
16213
|
-
schematic_component_id:
|
|
16214
|
-
original_center:
|
|
16215
|
-
new_center:
|
|
16241
|
+
edit_event_type: z33.literal("edit_schematic_component_location"),
|
|
16242
|
+
schematic_component_id: z33.string(),
|
|
16243
|
+
original_center: z33.object({ x: z33.number(), y: z33.number() }),
|
|
16244
|
+
new_center: z33.object({ x: z33.number(), y: z33.number() })
|
|
16216
16245
|
});
|
|
16217
16246
|
expectTypesMatch(true);
|
|
16218
16247
|
|
|
16219
16248
|
// lib/manual-edits/manual-edit-events/edit_pcb_group_location_event.ts
|
|
16220
|
-
import { z as
|
|
16249
|
+
import { z as z34 } from "zod";
|
|
16221
16250
|
var edit_pcb_group_location_event = base_manual_edit_event.extend({
|
|
16222
|
-
edit_event_type:
|
|
16223
|
-
pcb_group_id:
|
|
16224
|
-
original_center:
|
|
16225
|
-
new_center:
|
|
16251
|
+
edit_event_type: z34.literal("edit_pcb_group_location"),
|
|
16252
|
+
pcb_group_id: z34.string(),
|
|
16253
|
+
original_center: z34.object({ x: z34.number(), y: z34.number() }),
|
|
16254
|
+
new_center: z34.object({ x: z34.number(), y: z34.number() })
|
|
16226
16255
|
});
|
|
16227
16256
|
expectTypesMatch(true);
|
|
16228
16257
|
|
|
16229
16258
|
// lib/manual-edits/manual-edit-events/edit_schematic_group_location_event.ts
|
|
16230
|
-
import { z as
|
|
16259
|
+
import { z as z35 } from "zod";
|
|
16231
16260
|
var edit_schematic_group_location_event = base_manual_edit_event.extend({
|
|
16232
|
-
edit_event_type:
|
|
16233
|
-
schematic_group_id:
|
|
16234
|
-
original_center:
|
|
16235
|
-
new_center:
|
|
16261
|
+
edit_event_type: z35.literal("edit_schematic_group_location"),
|
|
16262
|
+
schematic_group_id: z35.string(),
|
|
16263
|
+
original_center: z35.object({ x: z35.number(), y: z35.number() }),
|
|
16264
|
+
new_center: z35.object({ x: z35.number(), y: z35.number() })
|
|
16236
16265
|
});
|
|
16237
16266
|
expectTypesMatch(true);
|
|
16238
16267
|
|
|
16239
16268
|
// lib/manual-edits/manual_edit_event.ts
|
|
16240
|
-
import { z as
|
|
16241
|
-
var manual_edit_event =
|
|
16269
|
+
import { z as z36 } from "zod";
|
|
16270
|
+
var manual_edit_event = z36.union([
|
|
16242
16271
|
edit_pcb_component_location_event,
|
|
16243
16272
|
edit_trace_hint_event,
|
|
16244
16273
|
edit_schematic_component_location_event
|
|
@@ -16246,33 +16275,33 @@ var manual_edit_event = z35.union([
|
|
|
16246
16275
|
expectTypesMatch(true);
|
|
16247
16276
|
|
|
16248
16277
|
// lib/manual-edits/manual_edits_file.ts
|
|
16249
|
-
import { z as
|
|
16278
|
+
import { z as z40 } from "zod";
|
|
16250
16279
|
|
|
16251
16280
|
// lib/manual-edits/manual_pcb_placement.ts
|
|
16252
|
-
import { z as
|
|
16281
|
+
import { z as z37 } from "zod";
|
|
16253
16282
|
import { point as point2 } from "circuit-json";
|
|
16254
|
-
var manual_pcb_placement =
|
|
16255
|
-
selector:
|
|
16256
|
-
relative_to:
|
|
16283
|
+
var manual_pcb_placement = z37.object({
|
|
16284
|
+
selector: z37.string(),
|
|
16285
|
+
relative_to: z37.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16257
16286
|
center: point2
|
|
16258
16287
|
});
|
|
16259
16288
|
expectTypesMatch(true);
|
|
16260
16289
|
|
|
16261
16290
|
// lib/manual-edits/manual_trace_hint.ts
|
|
16262
|
-
import { z as
|
|
16291
|
+
import { z as z38 } from "zod";
|
|
16263
16292
|
import { route_hint_point } from "circuit-json";
|
|
16264
|
-
var manual_trace_hint =
|
|
16265
|
-
pcb_port_selector:
|
|
16266
|
-
offsets:
|
|
16293
|
+
var manual_trace_hint = z38.object({
|
|
16294
|
+
pcb_port_selector: z38.string(),
|
|
16295
|
+
offsets: z38.array(route_hint_point)
|
|
16267
16296
|
});
|
|
16268
16297
|
expectTypesMatch(true);
|
|
16269
16298
|
|
|
16270
16299
|
// lib/manual-edits/manual_schematic_placement.ts
|
|
16271
|
-
import { z as
|
|
16300
|
+
import { z as z39 } from "zod";
|
|
16272
16301
|
import { point as point4 } from "circuit-json";
|
|
16273
|
-
var manual_schematic_placement =
|
|
16274
|
-
selector:
|
|
16275
|
-
relative_to:
|
|
16302
|
+
var manual_schematic_placement = z39.object({
|
|
16303
|
+
selector: z39.string(),
|
|
16304
|
+
relative_to: z39.string().optional().default("group_center").describe("Can be a selector or 'group_center'"),
|
|
16276
16305
|
center: point4
|
|
16277
16306
|
});
|
|
16278
16307
|
expectTypesMatch(
|
|
@@ -16280,37 +16309,37 @@ expectTypesMatch(
|
|
|
16280
16309
|
);
|
|
16281
16310
|
|
|
16282
16311
|
// lib/manual-edits/manual_edits_file.ts
|
|
16283
|
-
var manual_edits_file =
|
|
16284
|
-
pcb_placements:
|
|
16285
|
-
manual_trace_hints:
|
|
16286
|
-
schematic_placements:
|
|
16312
|
+
var manual_edits_file = z40.object({
|
|
16313
|
+
pcb_placements: z40.array(manual_pcb_placement).optional(),
|
|
16314
|
+
manual_trace_hints: z40.array(manual_trace_hint).optional(),
|
|
16315
|
+
schematic_placements: z40.array(manual_schematic_placement).optional()
|
|
16287
16316
|
});
|
|
16288
16317
|
expectTypesMatch(true);
|
|
16289
16318
|
|
|
16290
16319
|
// lib/common/connectionsProp.ts
|
|
16291
|
-
import { z as
|
|
16292
|
-
var connectionTarget =
|
|
16320
|
+
import { z as z41 } from "zod";
|
|
16321
|
+
var connectionTarget = z41.string().or(z41.array(z41.string()).readonly()).or(z41.array(z41.string()));
|
|
16293
16322
|
var createConnectionsProp = (labels) => {
|
|
16294
|
-
return
|
|
16323
|
+
return z41.record(z41.enum(labels), connectionTarget);
|
|
16295
16324
|
};
|
|
16296
16325
|
|
|
16297
16326
|
// lib/components/group.ts
|
|
16298
|
-
var layoutConfig =
|
|
16299
|
-
layoutMode:
|
|
16300
|
-
position:
|
|
16301
|
-
grid:
|
|
16302
|
-
gridCols:
|
|
16303
|
-
gridRows:
|
|
16304
|
-
gridTemplateRows:
|
|
16305
|
-
gridTemplateColumns:
|
|
16306
|
-
gridTemplate:
|
|
16307
|
-
gridGap:
|
|
16308
|
-
gridRowGap:
|
|
16309
|
-
gridColumnGap:
|
|
16310
|
-
flex:
|
|
16311
|
-
flexDirection:
|
|
16312
|
-
alignItems:
|
|
16313
|
-
justifyContent:
|
|
16327
|
+
var layoutConfig = z42.object({
|
|
16328
|
+
layoutMode: z42.enum(["grid", "flex", "match-adapt", "relative", "none"]).optional(),
|
|
16329
|
+
position: z42.enum(["absolute", "relative"]).optional(),
|
|
16330
|
+
grid: z42.boolean().optional(),
|
|
16331
|
+
gridCols: z42.number().or(z42.string()).optional(),
|
|
16332
|
+
gridRows: z42.number().or(z42.string()).optional(),
|
|
16333
|
+
gridTemplateRows: z42.string().optional(),
|
|
16334
|
+
gridTemplateColumns: z42.string().optional(),
|
|
16335
|
+
gridTemplate: z42.string().optional(),
|
|
16336
|
+
gridGap: z42.number().or(z42.string()).optional(),
|
|
16337
|
+
gridRowGap: z42.number().or(z42.string()).optional(),
|
|
16338
|
+
gridColumnGap: z42.number().or(z42.string()).optional(),
|
|
16339
|
+
flex: z42.boolean().or(z42.string()).optional(),
|
|
16340
|
+
flexDirection: z42.enum(["row", "column"]).optional(),
|
|
16341
|
+
alignItems: z42.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16342
|
+
justifyContent: z42.enum([
|
|
16314
16343
|
"start",
|
|
16315
16344
|
"center",
|
|
16316
16345
|
"end",
|
|
@@ -16319,16 +16348,16 @@ var layoutConfig = z41.object({
|
|
|
16319
16348
|
"space-around",
|
|
16320
16349
|
"space-evenly"
|
|
16321
16350
|
]).optional(),
|
|
16322
|
-
flexRow:
|
|
16323
|
-
flexColumn:
|
|
16324
|
-
gap:
|
|
16325
|
-
pack:
|
|
16326
|
-
packOrderStrategy:
|
|
16351
|
+
flexRow: z42.boolean().optional(),
|
|
16352
|
+
flexColumn: z42.boolean().optional(),
|
|
16353
|
+
gap: z42.number().or(z42.string()).optional(),
|
|
16354
|
+
pack: z42.boolean().optional().describe("Pack the contents of this group using a packing strategy"),
|
|
16355
|
+
packOrderStrategy: z42.enum([
|
|
16327
16356
|
"largest_to_smallest",
|
|
16328
16357
|
"first_to_last",
|
|
16329
16358
|
"highest_to_lowest_pin_count"
|
|
16330
16359
|
]).optional(),
|
|
16331
|
-
packPlacementStrategy:
|
|
16360
|
+
packPlacementStrategy: z42.enum(["shortest_connection_along_outline"]).optional(),
|
|
16332
16361
|
padding: length3.optional(),
|
|
16333
16362
|
paddingLeft: length3.optional(),
|
|
16334
16363
|
paddingRight: length3.optional(),
|
|
@@ -16338,17 +16367,17 @@ var layoutConfig = z41.object({
|
|
|
16338
16367
|
paddingY: length3.optional(),
|
|
16339
16368
|
width: length3.optional(),
|
|
16340
16369
|
height: length3.optional(),
|
|
16341
|
-
matchAdapt:
|
|
16342
|
-
matchAdaptTemplate:
|
|
16370
|
+
matchAdapt: z42.boolean().optional(),
|
|
16371
|
+
matchAdaptTemplate: z42.any().optional()
|
|
16343
16372
|
});
|
|
16344
16373
|
expectTypesMatch(true);
|
|
16345
|
-
var border =
|
|
16374
|
+
var border = z42.object({
|
|
16346
16375
|
strokeWidth: length3.optional(),
|
|
16347
|
-
dashed:
|
|
16348
|
-
solid:
|
|
16376
|
+
dashed: z42.boolean().optional(),
|
|
16377
|
+
solid: z42.boolean().optional()
|
|
16349
16378
|
});
|
|
16350
|
-
var pcbAnchorAlignmentAutocomplete =
|
|
16351
|
-
var routingTolerances =
|
|
16379
|
+
var pcbAnchorAlignmentAutocomplete = z42.custom((value) => typeof value === "string");
|
|
16380
|
+
var routingTolerances = z42.object({
|
|
16352
16381
|
minTraceWidth: length3.optional(),
|
|
16353
16382
|
minViaHoleEdgeToViaHoleEdgeClearance: length3.optional(),
|
|
16354
16383
|
minViaEdgeToPadEdgeClearance: length3.optional(),
|
|
@@ -16359,25 +16388,25 @@ var routingTolerances = z41.object({
|
|
|
16359
16388
|
minViaHoleDiameter: length3.optional(),
|
|
16360
16389
|
minViaPadDiameter: length3.optional()
|
|
16361
16390
|
});
|
|
16362
|
-
var autorouterConfig =
|
|
16391
|
+
var autorouterConfig = z42.object({
|
|
16363
16392
|
serverUrl: url.optional(),
|
|
16364
|
-
inputFormat:
|
|
16365
|
-
serverMode:
|
|
16366
|
-
serverCacheEnabled:
|
|
16367
|
-
cache:
|
|
16393
|
+
inputFormat: z42.enum(["simplified", "circuit-json"]).optional(),
|
|
16394
|
+
serverMode: z42.enum(["job", "solve-endpoint"]).optional(),
|
|
16395
|
+
serverCacheEnabled: z42.boolean().optional(),
|
|
16396
|
+
cache: z42.custom((v) => true).optional(),
|
|
16368
16397
|
traceClearance: length3.optional(),
|
|
16369
|
-
availableJumperTypes:
|
|
16370
|
-
allowViaInPad:
|
|
16398
|
+
availableJumperTypes: z42.array(z42.enum(["1206x4", "0603"])).optional(),
|
|
16399
|
+
allowViaInPad: z42.boolean().optional().describe(
|
|
16371
16400
|
"Allows the autorouter to place vias inside connected pads. Omitted or false keeps via-in-pad routing disabled."
|
|
16372
16401
|
),
|
|
16373
|
-
groupMode:
|
|
16374
|
-
algorithmFn:
|
|
16402
|
+
groupMode: z42.enum(["sequential_trace", "subcircuit", "sequential-trace"]).optional(),
|
|
16403
|
+
algorithmFn: z42.custom(
|
|
16375
16404
|
(v) => typeof v === "function" || v === void 0
|
|
16376
16405
|
).optional(),
|
|
16377
|
-
implicitBreakoutPointSolverFn:
|
|
16406
|
+
implicitBreakoutPointSolverFn: z42.custom(
|
|
16378
16407
|
(value) => typeof value === "function" || value === void 0
|
|
16379
16408
|
).optional(),
|
|
16380
|
-
preset:
|
|
16409
|
+
preset: z42.enum([
|
|
16381
16410
|
"sequential_trace",
|
|
16382
16411
|
"subcircuit",
|
|
16383
16412
|
"default",
|
|
@@ -16396,36 +16425,36 @@ var autorouterConfig = z41.object({
|
|
|
16396
16425
|
"auto-local",
|
|
16397
16426
|
"auto-cloud"
|
|
16398
16427
|
]).optional(),
|
|
16399
|
-
local:
|
|
16428
|
+
local: z42.boolean().optional()
|
|
16400
16429
|
});
|
|
16401
|
-
var autorouterPreset =
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
-
|
|
16430
|
+
var autorouterPreset = z42.union([
|
|
16431
|
+
z42.literal("sequential_trace"),
|
|
16432
|
+
z42.literal("subcircuit"),
|
|
16433
|
+
z42.literal("default"),
|
|
16434
|
+
z42.literal("auto"),
|
|
16435
|
+
z42.literal("auto_local"),
|
|
16436
|
+
z42.literal("auto_cloud"),
|
|
16437
|
+
z42.literal("auto_jumper"),
|
|
16438
|
+
z42.literal("tscircuit_beta"),
|
|
16439
|
+
z42.literal("krt"),
|
|
16440
|
+
z42.literal("freerouting"),
|
|
16441
|
+
z42.literal("laser_prefab"),
|
|
16413
16442
|
// Prefabricated PCB with laser copper ablation
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16443
|
+
z42.literal("single_layer_fanout"),
|
|
16444
|
+
z42.literal("fanout"),
|
|
16445
|
+
z42.literal("auto-jumper"),
|
|
16446
|
+
z42.literal("sequential-trace"),
|
|
16447
|
+
z42.literal("auto-local"),
|
|
16448
|
+
z42.literal("auto-cloud")
|
|
16420
16449
|
]);
|
|
16421
|
-
var autorouterString =
|
|
16422
|
-
var autorouterProp =
|
|
16450
|
+
var autorouterString = z42.string();
|
|
16451
|
+
var autorouterProp = z42.union([
|
|
16423
16452
|
autorouterConfig,
|
|
16424
16453
|
autorouterPreset,
|
|
16425
16454
|
autorouterString
|
|
16426
16455
|
]);
|
|
16427
|
-
var autorouterEffortLevel =
|
|
16428
|
-
var knownAutorouterVersion =
|
|
16456
|
+
var autorouterEffortLevel = z42.enum(["1x", "2x", "5x", "10x", "100x"]);
|
|
16457
|
+
var knownAutorouterVersion = z42.enum([
|
|
16429
16458
|
"beta_pipeline1",
|
|
16430
16459
|
"beta_pipeline3",
|
|
16431
16460
|
"beta_pipeline4",
|
|
@@ -16434,7 +16463,7 @@ var knownAutorouterVersion = z41.enum([
|
|
|
16434
16463
|
"beta_pipeline9",
|
|
16435
16464
|
"latest"
|
|
16436
16465
|
]);
|
|
16437
|
-
var autorouterVersion =
|
|
16466
|
+
var autorouterVersion = z42.custom(
|
|
16438
16467
|
(value) => typeof value === "string"
|
|
16439
16468
|
).transform((value) => {
|
|
16440
16469
|
const parsedAutorouterVersion = knownAutorouterVersion.safeParse(value);
|
|
@@ -16445,33 +16474,33 @@ var autorouterVersion = z41.custom(
|
|
|
16445
16474
|
return "latest";
|
|
16446
16475
|
});
|
|
16447
16476
|
var baseGroupProps = commonLayoutProps.extend({
|
|
16448
|
-
name:
|
|
16449
|
-
children:
|
|
16450
|
-
schTitle:
|
|
16451
|
-
schSheetName:
|
|
16452
|
-
key:
|
|
16453
|
-
showAsSchematicBox:
|
|
16454
|
-
connections:
|
|
16477
|
+
name: z42.string().optional(),
|
|
16478
|
+
children: z42.any().optional(),
|
|
16479
|
+
schTitle: z42.string().optional(),
|
|
16480
|
+
schSheetName: z42.string().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),
|
|
16481
|
+
key: z42.any().optional(),
|
|
16482
|
+
showAsSchematicBox: z42.boolean().optional(),
|
|
16483
|
+
connections: z42.record(z42.string(), connectionTarget.optional()).optional(),
|
|
16455
16484
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16456
16485
|
schPinSpacing: length3.optional(),
|
|
16457
16486
|
schPinStyle: schematicPinStyle.optional(),
|
|
16458
16487
|
...layoutConfig.shape,
|
|
16459
16488
|
grid: layoutConfig.shape.grid.describe("@deprecated use pcbGrid"),
|
|
16460
16489
|
flex: layoutConfig.shape.flex.describe("@deprecated use pcbFlex"),
|
|
16461
|
-
pcbGrid:
|
|
16462
|
-
pcbGridCols:
|
|
16463
|
-
pcbGridRows:
|
|
16464
|
-
pcbGridTemplateRows:
|
|
16465
|
-
pcbGridTemplateColumns:
|
|
16466
|
-
pcbGridTemplate:
|
|
16467
|
-
pcbGridGap:
|
|
16468
|
-
pcbGridRowGap:
|
|
16469
|
-
pcbGridColumnGap:
|
|
16470
|
-
pcbFlex:
|
|
16471
|
-
pcbFlexGap:
|
|
16472
|
-
pcbFlexDirection:
|
|
16473
|
-
pcbAlignItems:
|
|
16474
|
-
pcbJustifyContent:
|
|
16490
|
+
pcbGrid: z42.boolean().optional(),
|
|
16491
|
+
pcbGridCols: z42.number().or(z42.string()).optional(),
|
|
16492
|
+
pcbGridRows: z42.number().or(z42.string()).optional(),
|
|
16493
|
+
pcbGridTemplateRows: z42.string().optional(),
|
|
16494
|
+
pcbGridTemplateColumns: z42.string().optional(),
|
|
16495
|
+
pcbGridTemplate: z42.string().optional(),
|
|
16496
|
+
pcbGridGap: z42.number().or(z42.string()).optional(),
|
|
16497
|
+
pcbGridRowGap: z42.number().or(z42.string()).optional(),
|
|
16498
|
+
pcbGridColumnGap: z42.number().or(z42.string()).optional(),
|
|
16499
|
+
pcbFlex: z42.boolean().or(z42.string()).optional(),
|
|
16500
|
+
pcbFlexGap: z42.number().or(z42.string()).optional(),
|
|
16501
|
+
pcbFlexDirection: z42.enum(["row", "column"]).optional(),
|
|
16502
|
+
pcbAlignItems: z42.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16503
|
+
pcbJustifyContent: z42.enum([
|
|
16475
16504
|
"start",
|
|
16476
16505
|
"center",
|
|
16477
16506
|
"end",
|
|
@@ -16480,25 +16509,25 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16480
16509
|
"space-around",
|
|
16481
16510
|
"space-evenly"
|
|
16482
16511
|
]).optional(),
|
|
16483
|
-
pcbFlexRow:
|
|
16484
|
-
pcbFlexColumn:
|
|
16485
|
-
pcbGap:
|
|
16486
|
-
pcbPack:
|
|
16487
|
-
pcbPackGap:
|
|
16488
|
-
schGrid:
|
|
16489
|
-
schGridCols:
|
|
16490
|
-
schGridRows:
|
|
16491
|
-
schGridTemplateRows:
|
|
16492
|
-
schGridTemplateColumns:
|
|
16493
|
-
schGridTemplate:
|
|
16494
|
-
schGridGap:
|
|
16495
|
-
schGridRowGap:
|
|
16496
|
-
schGridColumnGap:
|
|
16497
|
-
schFlex:
|
|
16498
|
-
schFlexGap:
|
|
16499
|
-
schFlexDirection:
|
|
16500
|
-
schAlignItems:
|
|
16501
|
-
schJustifyContent:
|
|
16512
|
+
pcbFlexRow: z42.boolean().optional(),
|
|
16513
|
+
pcbFlexColumn: z42.boolean().optional(),
|
|
16514
|
+
pcbGap: z42.number().or(z42.string()).optional(),
|
|
16515
|
+
pcbPack: z42.boolean().optional(),
|
|
16516
|
+
pcbPackGap: z42.number().or(z42.string()).optional(),
|
|
16517
|
+
schGrid: z42.boolean().optional(),
|
|
16518
|
+
schGridCols: z42.number().or(z42.string()).optional(),
|
|
16519
|
+
schGridRows: z42.number().or(z42.string()).optional(),
|
|
16520
|
+
schGridTemplateRows: z42.string().optional(),
|
|
16521
|
+
schGridTemplateColumns: z42.string().optional(),
|
|
16522
|
+
schGridTemplate: z42.string().optional(),
|
|
16523
|
+
schGridGap: z42.number().or(z42.string()).optional(),
|
|
16524
|
+
schGridRowGap: z42.number().or(z42.string()).optional(),
|
|
16525
|
+
schGridColumnGap: z42.number().or(z42.string()).optional(),
|
|
16526
|
+
schFlex: z42.boolean().or(z42.string()).optional(),
|
|
16527
|
+
schFlexGap: z42.number().or(z42.string()).optional(),
|
|
16528
|
+
schFlexDirection: z42.enum(["row", "column"]).optional(),
|
|
16529
|
+
schAlignItems: z42.enum(["start", "center", "end", "stretch"]).optional(),
|
|
16530
|
+
schJustifyContent: z42.enum([
|
|
16502
16531
|
"start",
|
|
16503
16532
|
"center",
|
|
16504
16533
|
"end",
|
|
@@ -16507,11 +16536,11 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16507
16536
|
"space-around",
|
|
16508
16537
|
"space-evenly"
|
|
16509
16538
|
]).optional(),
|
|
16510
|
-
schFlexRow:
|
|
16511
|
-
schFlexColumn:
|
|
16512
|
-
schGap:
|
|
16513
|
-
schPack:
|
|
16514
|
-
schMatchAdapt:
|
|
16539
|
+
schFlexRow: z42.boolean().optional(),
|
|
16540
|
+
schFlexColumn: z42.boolean().optional(),
|
|
16541
|
+
schGap: z42.number().or(z42.string()).optional(),
|
|
16542
|
+
schPack: z42.boolean().optional(),
|
|
16543
|
+
schMatchAdapt: z42.boolean().optional(),
|
|
16515
16544
|
pcbWidth: length3.optional(),
|
|
16516
16545
|
pcbHeight: length3.optional(),
|
|
16517
16546
|
minTraceWidth: length3.optional(),
|
|
@@ -16534,41 +16563,41 @@ var baseGroupProps = commonLayoutProps.extend({
|
|
|
16534
16563
|
pcbPaddingBottom: length3.optional(),
|
|
16535
16564
|
pcbAnchorAlignment: pcbAnchorAlignmentAutocomplete.optional()
|
|
16536
16565
|
});
|
|
16537
|
-
var partsEngine =
|
|
16566
|
+
var partsEngine = z42.custom((v) => "findPart" in v);
|
|
16538
16567
|
var subcircuitGroupProps = baseGroupProps.extend({
|
|
16539
16568
|
manualEdits: manual_edits_file.optional(),
|
|
16540
|
-
schAutoLayoutEnabled:
|
|
16541
|
-
schTraceAutoLabelEnabled:
|
|
16569
|
+
schAutoLayoutEnabled: z42.boolean().optional(),
|
|
16570
|
+
schTraceAutoLabelEnabled: z42.boolean().optional(),
|
|
16542
16571
|
schMaxTraceDistance: distance11.optional(),
|
|
16543
|
-
routingDisabled:
|
|
16544
|
-
placementDrcChecksDisabled:
|
|
16545
|
-
bomDisabled:
|
|
16572
|
+
routingDisabled: z42.boolean().optional(),
|
|
16573
|
+
placementDrcChecksDisabled: z42.boolean().optional(),
|
|
16574
|
+
bomDisabled: z42.boolean().optional(),
|
|
16546
16575
|
defaultTraceWidth: length3.optional(),
|
|
16547
16576
|
...routingTolerances.shape,
|
|
16548
16577
|
nominalTraceWidth: length3.optional(),
|
|
16549
16578
|
partsEngine: partsEngine.optional(),
|
|
16550
|
-
_subcircuitCachingEnabled:
|
|
16551
|
-
pcbRouteCache:
|
|
16579
|
+
_subcircuitCachingEnabled: z42.boolean().optional(),
|
|
16580
|
+
pcbRouteCache: z42.custom((v) => true).optional(),
|
|
16552
16581
|
autorouter: autorouterProp.optional(),
|
|
16553
16582
|
autorouterEffortLevel: autorouterEffortLevel.optional(),
|
|
16554
16583
|
autorouterVersion: autorouterVersion.optional(),
|
|
16555
|
-
square:
|
|
16556
|
-
emptyArea:
|
|
16557
|
-
filledArea:
|
|
16584
|
+
square: z42.boolean().optional(),
|
|
16585
|
+
emptyArea: z42.string().optional(),
|
|
16586
|
+
filledArea: z42.string().optional(),
|
|
16558
16587
|
width: distance11.optional(),
|
|
16559
16588
|
height: distance11.optional(),
|
|
16560
|
-
outline:
|
|
16589
|
+
outline: z42.array(point).optional(),
|
|
16561
16590
|
outlineOffsetX: distance11.optional(),
|
|
16562
16591
|
outlineOffsetY: distance11.optional(),
|
|
16563
|
-
circuitJson:
|
|
16564
|
-
exposedNets:
|
|
16565
|
-
exposeNets:
|
|
16592
|
+
circuitJson: z42.array(z42.any()).optional(),
|
|
16593
|
+
exposedNets: z42.array(z42.string()).optional(),
|
|
16594
|
+
exposeNets: z42.boolean().optional()
|
|
16566
16595
|
});
|
|
16567
16596
|
var subcircuitGroupPropsWithBool = subcircuitGroupProps.extend({
|
|
16568
|
-
subcircuit:
|
|
16597
|
+
subcircuit: z42.literal(true)
|
|
16569
16598
|
});
|
|
16570
|
-
var groupProps =
|
|
16571
|
-
baseGroupProps.extend({ subcircuit:
|
|
16599
|
+
var groupProps = z42.discriminatedUnion("subcircuit", [
|
|
16600
|
+
baseGroupProps.extend({ subcircuit: z42.literal(false).optional() }),
|
|
16572
16601
|
subcircuitGroupPropsWithBool
|
|
16573
16602
|
]);
|
|
16574
16603
|
expectTypesMatch(true);
|
|
@@ -16578,25 +16607,25 @@ expectTypesMatch(true);
|
|
|
16578
16607
|
expectTypesMatch(true);
|
|
16579
16608
|
|
|
16580
16609
|
// lib/components/board.ts
|
|
16581
|
-
var boardColor =
|
|
16582
|
-
var boardOutlinePoint =
|
|
16610
|
+
var boardColor = z43.custom((value) => typeof value === "string");
|
|
16611
|
+
var boardOutlinePoint = z43.object({
|
|
16583
16612
|
...point.shape,
|
|
16584
|
-
isCastellatedHole:
|
|
16613
|
+
isCastellatedHole: z43.boolean().optional(),
|
|
16585
16614
|
holeDiameter: distance.optional(),
|
|
16586
16615
|
padDiameter: distance.optional(),
|
|
16587
|
-
connectsTo:
|
|
16616
|
+
connectsTo: z43.string().or(z43.array(z43.string())).optional()
|
|
16588
16617
|
}).superRefine((outlinePoint, ctx) => {
|
|
16589
16618
|
if (outlinePoint.isCastellatedHole) {
|
|
16590
16619
|
if (outlinePoint.holeDiameter === void 0) {
|
|
16591
16620
|
ctx.addIssue({
|
|
16592
|
-
code:
|
|
16621
|
+
code: z43.ZodIssueCode.custom,
|
|
16593
16622
|
path: ["holeDiameter"],
|
|
16594
16623
|
message: "holeDiameter is required for a castellated hole"
|
|
16595
16624
|
});
|
|
16596
16625
|
}
|
|
16597
16626
|
if (outlinePoint.padDiameter === void 0) {
|
|
16598
16627
|
ctx.addIssue({
|
|
16599
|
-
code:
|
|
16628
|
+
code: z43.ZodIssueCode.custom,
|
|
16600
16629
|
path: ["padDiameter"],
|
|
16601
16630
|
message: "padDiameter is required for a castellated hole"
|
|
16602
16631
|
});
|
|
@@ -16605,23 +16634,23 @@ var boardOutlinePoint = z42.object({
|
|
|
16605
16634
|
}
|
|
16606
16635
|
if (outlinePoint.holeDiameter !== void 0 || outlinePoint.padDiameter !== void 0 || outlinePoint.connectsTo !== void 0) {
|
|
16607
16636
|
ctx.addIssue({
|
|
16608
|
-
code:
|
|
16637
|
+
code: z43.ZodIssueCode.custom,
|
|
16609
16638
|
path: ["isCastellatedHole"],
|
|
16610
16639
|
message: "isCastellatedHole must be true when castellated hole props are provided"
|
|
16611
16640
|
});
|
|
16612
16641
|
}
|
|
16613
16642
|
});
|
|
16614
16643
|
var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
16615
|
-
material:
|
|
16616
|
-
layers:
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
|
|
16622
|
-
|
|
16644
|
+
material: z43.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
16645
|
+
layers: z43.union([
|
|
16646
|
+
z43.literal(1),
|
|
16647
|
+
z43.literal(2),
|
|
16648
|
+
z43.literal(4),
|
|
16649
|
+
z43.literal(6),
|
|
16650
|
+
z43.literal(8),
|
|
16651
|
+
z43.literal(10)
|
|
16623
16652
|
]).default(2),
|
|
16624
|
-
allowBlindAndBuriedVias:
|
|
16653
|
+
allowBlindAndBuriedVias: z43.boolean().default(false).describe(
|
|
16625
16654
|
"Whether the autorouter may generate blind and buried vias. Defaults to false, which restricts newly generated vias to the full board stack."
|
|
16626
16655
|
),
|
|
16627
16656
|
borderRadius: distance.optional(),
|
|
@@ -16629,28 +16658,28 @@ var boardProps = subcircuitGroupProps.omit({ connections: true }).extend({
|
|
|
16629
16658
|
boardAnchorPosition: point.optional(),
|
|
16630
16659
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16631
16660
|
boardAnchorAlignment: ninePointAnchor.optional().describe("Prefer using anchorAlignment when possible"),
|
|
16632
|
-
outline:
|
|
16633
|
-
title:
|
|
16661
|
+
outline: z43.array(boardOutlinePoint).optional(),
|
|
16662
|
+
title: z43.string().optional(),
|
|
16634
16663
|
solderMaskColor: boardColor.optional(),
|
|
16635
16664
|
topSolderMaskColor: boardColor.optional(),
|
|
16636
16665
|
bottomSolderMaskColor: boardColor.optional(),
|
|
16637
16666
|
silkscreenColor: boardColor.optional(),
|
|
16638
16667
|
topSilkscreenColor: boardColor.optional(),
|
|
16639
16668
|
bottomSilkscreenColor: boardColor.optional(),
|
|
16640
|
-
doubleSidedAssembly:
|
|
16641
|
-
isViaInPadAllowed:
|
|
16669
|
+
doubleSidedAssembly: z43.boolean().optional().default(false),
|
|
16670
|
+
isViaInPadAllowed: z43.boolean().optional().describe(
|
|
16642
16671
|
"Allows intentional via-in-pad designs to pass DRC. Omitted or false keeps via-in-pad disallowed."
|
|
16643
16672
|
),
|
|
16644
|
-
automaticPoursEnabled:
|
|
16673
|
+
automaticPoursEnabled: z43.boolean().default(false).describe(
|
|
16645
16674
|
"Whether implicit copper pours should be generated automatically. Defaults to false."
|
|
16646
16675
|
),
|
|
16647
|
-
schematicDisabled:
|
|
16676
|
+
schematicDisabled: z43.boolean().optional()
|
|
16648
16677
|
});
|
|
16649
16678
|
expectTypesMatch(true);
|
|
16650
16679
|
expectTypesMatch(true);
|
|
16651
16680
|
|
|
16652
16681
|
// lib/components/panel.ts
|
|
16653
|
-
import { z as
|
|
16682
|
+
import { z as z44 } from "zod";
|
|
16654
16683
|
var panelProps = baseGroupProps.omit({
|
|
16655
16684
|
width: true,
|
|
16656
16685
|
height: true,
|
|
@@ -16659,25 +16688,25 @@ var panelProps = baseGroupProps.omit({
|
|
|
16659
16688
|
}).extend({
|
|
16660
16689
|
width: distance.optional(),
|
|
16661
16690
|
height: distance.optional(),
|
|
16662
|
-
children:
|
|
16691
|
+
children: z44.any().optional(),
|
|
16663
16692
|
anchorAlignment: ninePointAnchor.optional(),
|
|
16664
|
-
noSolderMask:
|
|
16665
|
-
panelizationMethod:
|
|
16693
|
+
noSolderMask: z44.boolean().optional(),
|
|
16694
|
+
panelizationMethod: z44.enum(["tab-routing", "outline_routing", "none"]).optional(),
|
|
16666
16695
|
boardGap: distance.optional(),
|
|
16667
|
-
layoutMode:
|
|
16668
|
-
row:
|
|
16669
|
-
col:
|
|
16696
|
+
layoutMode: z44.enum(["grid", "pack", "none"]).optional(),
|
|
16697
|
+
row: z44.number().optional(),
|
|
16698
|
+
col: z44.number().optional(),
|
|
16670
16699
|
cellWidth: distance.optional(),
|
|
16671
16700
|
cellHeight: distance.optional(),
|
|
16672
16701
|
tabWidth: distance.optional(),
|
|
16673
16702
|
tabLength: distance.optional(),
|
|
16674
|
-
mouseBites:
|
|
16703
|
+
mouseBites: z44.boolean().optional(),
|
|
16675
16704
|
edgePadding: distance.optional(),
|
|
16676
16705
|
edgePaddingLeft: distance.optional(),
|
|
16677
16706
|
edgePaddingRight: distance.optional(),
|
|
16678
16707
|
edgePaddingTop: distance.optional(),
|
|
16679
16708
|
edgePaddingBottom: distance.optional(),
|
|
16680
|
-
_subcircuitCachingEnabled:
|
|
16709
|
+
_subcircuitCachingEnabled: z44.boolean().optional()
|
|
16681
16710
|
});
|
|
16682
16711
|
expectTypesMatch(true);
|
|
16683
16712
|
|
|
@@ -16687,17 +16716,17 @@ var subpanelProps = panelProps;
|
|
|
16687
16716
|
expectTypesMatch(true);
|
|
16688
16717
|
|
|
16689
16718
|
// lib/common/fanoutProps.ts
|
|
16690
|
-
import { layer_ref as
|
|
16691
|
-
import { z as
|
|
16719
|
+
import { layer_ref as layer_ref5 } from "circuit-json";
|
|
16720
|
+
import { z as z47 } from "zod";
|
|
16692
16721
|
|
|
16693
16722
|
// lib/common/fanoutBoundaryPadding.ts
|
|
16694
|
-
import { z as
|
|
16723
|
+
import { z as z46 } from "zod";
|
|
16695
16724
|
var nonnegativeDistance = distance.refine((value) => value >= 0, {
|
|
16696
16725
|
message: "Fanout boundary padding cannot be negative"
|
|
16697
16726
|
});
|
|
16698
|
-
var fanoutBoundaryPadding =
|
|
16727
|
+
var fanoutBoundaryPadding = z46.union([
|
|
16699
16728
|
nonnegativeDistance,
|
|
16700
|
-
|
|
16729
|
+
z46.object({
|
|
16701
16730
|
top: nonnegativeDistance.optional(),
|
|
16702
16731
|
right: nonnegativeDistance.optional(),
|
|
16703
16732
|
bottom: nonnegativeDistance.optional(),
|
|
@@ -16724,21 +16753,21 @@ var canonicalBusFanoutDirectionValues = [
|
|
|
16724
16753
|
"leftside_top",
|
|
16725
16754
|
"center"
|
|
16726
16755
|
];
|
|
16727
|
-
var canonicalBusFanoutDirection =
|
|
16756
|
+
var canonicalBusFanoutDirection = z47.enum(
|
|
16728
16757
|
canonicalBusFanoutDirectionValues
|
|
16729
16758
|
);
|
|
16730
|
-
var busFanoutDirection =
|
|
16759
|
+
var busFanoutDirection = z47.union([
|
|
16731
16760
|
ninePointAnchor,
|
|
16732
16761
|
canonicalBusFanoutDirection,
|
|
16733
|
-
|
|
16734
|
-
direction:
|
|
16762
|
+
z47.object({
|
|
16763
|
+
direction: z47.union([ninePointAnchor, canonicalBusFanoutDirection])
|
|
16735
16764
|
})
|
|
16736
16765
|
]);
|
|
16737
|
-
var fanoutProps =
|
|
16738
|
-
busFanoutDirections:
|
|
16766
|
+
var fanoutProps = z47.object({
|
|
16767
|
+
busFanoutDirections: z47.record(busFanoutDirection).optional(),
|
|
16739
16768
|
fanoutBoundaryPadding: fanoutBoundaryPadding.optional(),
|
|
16740
|
-
fanoutRoutingLayers:
|
|
16741
|
-
fanoutPourNetMap:
|
|
16769
|
+
fanoutRoutingLayers: z47.array(layer_ref5).min(1).optional(),
|
|
16770
|
+
fanoutPourNetMap: z47.record(layer_ref5, z47.union([z47.string(), z47.array(z47.string()).min(1)])).optional()
|
|
16742
16771
|
});
|
|
16743
16772
|
expectTypesMatch(true);
|
|
16744
16773
|
|
|
@@ -16762,41 +16791,41 @@ expectTypesMatch(true);
|
|
|
16762
16791
|
// lib/components/chip.ts
|
|
16763
16792
|
import { distance as distance12, supplier_name as supplier_name2 } from "circuit-json";
|
|
16764
16793
|
import { isValidElement } from "react";
|
|
16765
|
-
import { z as
|
|
16766
|
-
var connectionTarget2 =
|
|
16767
|
-
var noConnectProp =
|
|
16768
|
-
var connectionsProp =
|
|
16769
|
-
var spicemodelElement =
|
|
16794
|
+
import { z as z49 } from "zod";
|
|
16795
|
+
var connectionTarget2 = z49.string().or(z49.array(z49.string()).readonly()).or(z49.array(z49.string()));
|
|
16796
|
+
var noConnectProp = z49.array(schematicPinLabel).readonly().or(z49.array(schematicPinLabel));
|
|
16797
|
+
var connectionsProp = z49.custom().pipe(z49.record(z49.string(), connectionTarget2));
|
|
16798
|
+
var spicemodelElement = z49.custom(
|
|
16770
16799
|
(v) => !!v && typeof v === "object" && "type" in v && "props" in v
|
|
16771
16800
|
);
|
|
16772
|
-
var internalCircuitElement =
|
|
16801
|
+
var internalCircuitElement = z49.custom(
|
|
16773
16802
|
(value) => isValidElement(value) && value.type === "internalcircuit"
|
|
16774
16803
|
);
|
|
16775
|
-
var pinLabelsProp =
|
|
16804
|
+
var pinLabelsProp = z49.record(
|
|
16776
16805
|
schematicPinLabel,
|
|
16777
|
-
schematicPinLabel.or(
|
|
16806
|
+
schematicPinLabel.or(z49.array(schematicPinLabel).readonly()).or(z49.array(schematicPinLabel))
|
|
16778
16807
|
);
|
|
16779
16808
|
expectTypesMatch(true);
|
|
16780
|
-
var pinCompatibleVariant =
|
|
16781
|
-
manufacturerPartNumber:
|
|
16782
|
-
supplierPartNumber:
|
|
16809
|
+
var pinCompatibleVariant = z49.object({
|
|
16810
|
+
manufacturerPartNumber: z49.string().optional(),
|
|
16811
|
+
supplierPartNumber: z49.record(supplier_name2, z49.array(z49.string())).optional()
|
|
16783
16812
|
});
|
|
16784
16813
|
var chipProps = commonComponentProps.extend({
|
|
16785
|
-
manufacturerPartNumber:
|
|
16814
|
+
manufacturerPartNumber: z49.string().optional(),
|
|
16786
16815
|
pinLabels: pinLabelsProp.optional(),
|
|
16787
|
-
showPinAliases:
|
|
16788
|
-
pcbPinLabels:
|
|
16789
|
-
internallyConnectedPins:
|
|
16790
|
-
externallyConnectedPins:
|
|
16816
|
+
showPinAliases: z49.boolean().optional(),
|
|
16817
|
+
pcbPinLabels: z49.record(z49.string(), z49.string()).optional(),
|
|
16818
|
+
internallyConnectedPins: z49.array(z49.array(z49.union([z49.string(), z49.number()]))).optional(),
|
|
16819
|
+
externallyConnectedPins: z49.array(z49.array(z49.string())).optional(),
|
|
16791
16820
|
schPinArrangement: schematicPortArrangement.optional(),
|
|
16792
16821
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16793
|
-
pinCompatibleVariants:
|
|
16822
|
+
pinCompatibleVariants: z49.array(pinCompatibleVariant).optional(),
|
|
16794
16823
|
schPinStyle: schematicPinStyle.optional(),
|
|
16795
16824
|
schPinSpacing: distance12.optional(),
|
|
16796
16825
|
schWidth: distance12.optional(),
|
|
16797
16826
|
schHeight: distance12.optional(),
|
|
16798
|
-
noSchematicRepresentation:
|
|
16799
|
-
schShowInternalCircuit:
|
|
16827
|
+
noSchematicRepresentation: z49.boolean().optional(),
|
|
16828
|
+
schShowInternalCircuit: z49.boolean().optional().default(false),
|
|
16800
16829
|
noConnect: noConnectProp.optional(),
|
|
16801
16830
|
connections: connectionsProp.optional(),
|
|
16802
16831
|
spiceModel: spicemodelElement.optional(),
|
|
@@ -16811,38 +16840,38 @@ expectTypesMatch(true);
|
|
|
16811
16840
|
|
|
16812
16841
|
// lib/components/jumper.ts
|
|
16813
16842
|
import { distance as distance13 } from "circuit-json";
|
|
16814
|
-
import { z as
|
|
16843
|
+
import { z as z50 } from "zod";
|
|
16815
16844
|
var jumperProps = commonComponentProps.extend({
|
|
16816
|
-
manufacturerPartNumber:
|
|
16817
|
-
pinLabels:
|
|
16818
|
-
|
|
16819
|
-
schematicPinLabel.or(
|
|
16845
|
+
manufacturerPartNumber: z50.string().optional(),
|
|
16846
|
+
pinLabels: z50.record(
|
|
16847
|
+
z50.number().or(schematicPinLabel),
|
|
16848
|
+
schematicPinLabel.or(z50.array(schematicPinLabel))
|
|
16820
16849
|
).optional(),
|
|
16821
16850
|
schPinStyle: schematicPinStyle.optional(),
|
|
16822
16851
|
schPinSpacing: distance13.optional(),
|
|
16823
16852
|
schWidth: distance13.optional(),
|
|
16824
16853
|
schHeight: distance13.optional(),
|
|
16825
|
-
schDirection:
|
|
16854
|
+
schDirection: z50.enum(["left", "right"]).optional(),
|
|
16826
16855
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
16827
16856
|
schPortArrangement: schematicPortArrangement.optional(),
|
|
16828
|
-
pcbPinLabels:
|
|
16829
|
-
pinCount:
|
|
16830
|
-
internallyConnectedPins:
|
|
16831
|
-
connections:
|
|
16857
|
+
pcbPinLabels: z50.record(z50.string(), z50.string()).optional(),
|
|
16858
|
+
pinCount: z50.union([z50.literal(2), z50.literal(3)]).optional(),
|
|
16859
|
+
internallyConnectedPins: z50.array(z50.array(z50.union([z50.string(), z50.number()]))).optional(),
|
|
16860
|
+
connections: z50.custom().pipe(z50.record(z50.string(), connectionTarget)).optional()
|
|
16832
16861
|
});
|
|
16833
16862
|
expectTypesMatch(true);
|
|
16834
16863
|
|
|
16835
16864
|
// lib/components/solderjumper.ts
|
|
16836
|
-
import { z as
|
|
16865
|
+
import { z as z51 } from "zod";
|
|
16837
16866
|
var solderjumperProps = jumperProps.extend({
|
|
16838
|
-
bridgedPins:
|
|
16839
|
-
bridged:
|
|
16867
|
+
bridgedPins: z51.array(z51.array(z51.string())).optional(),
|
|
16868
|
+
bridged: z51.boolean().optional()
|
|
16840
16869
|
});
|
|
16841
16870
|
expectTypesMatch(true);
|
|
16842
16871
|
|
|
16843
16872
|
// lib/components/connector.ts
|
|
16844
|
-
import { z as
|
|
16845
|
-
var connectorStandard =
|
|
16873
|
+
import { z as z52 } from "zod";
|
|
16874
|
+
var connectorStandard = z52.enum([
|
|
16846
16875
|
"usb_c",
|
|
16847
16876
|
"m2",
|
|
16848
16877
|
"jst_sh",
|
|
@@ -16854,43 +16883,43 @@ var connectorStandard = z51.enum([
|
|
|
16854
16883
|
]);
|
|
16855
16884
|
var connectorProps = chipProps.extend({
|
|
16856
16885
|
standard: connectorStandard.optional(),
|
|
16857
|
-
pinCount:
|
|
16886
|
+
pinCount: z52.number().int().positive().optional()
|
|
16858
16887
|
});
|
|
16859
16888
|
expectTypesMatch(true);
|
|
16860
16889
|
|
|
16861
16890
|
// lib/components/interconnect.ts
|
|
16862
|
-
import { z as
|
|
16891
|
+
import { z as z53 } from "zod";
|
|
16863
16892
|
var interconnectProps = commonComponentProps.extend({
|
|
16864
|
-
standard:
|
|
16865
|
-
pinLabels:
|
|
16866
|
-
|
|
16867
|
-
schematicPinLabel.or(
|
|
16893
|
+
standard: z53.enum(["TSC0001_36P_XALT_2025_11", "0805", "0603", "1206"]).optional(),
|
|
16894
|
+
pinLabels: z53.record(
|
|
16895
|
+
z53.number().or(schematicPinLabel),
|
|
16896
|
+
schematicPinLabel.or(z53.array(schematicPinLabel))
|
|
16868
16897
|
).optional(),
|
|
16869
|
-
internallyConnectedPins:
|
|
16898
|
+
internallyConnectedPins: z53.array(z53.array(z53.union([z53.string(), z53.number()]))).optional()
|
|
16870
16899
|
});
|
|
16871
16900
|
expectTypesMatch(true);
|
|
16872
16901
|
|
|
16873
16902
|
// lib/components/fuse.ts
|
|
16874
|
-
import { z as
|
|
16903
|
+
import { z as z54 } from "zod";
|
|
16875
16904
|
var fusePinLabels = ["pin1", "pin2"];
|
|
16876
16905
|
var fuseProps = commonComponentProps.extend({
|
|
16877
|
-
currentRating:
|
|
16878
|
-
voltageRating:
|
|
16879
|
-
schShowRatings:
|
|
16906
|
+
currentRating: z54.union([z54.number(), z54.string()]),
|
|
16907
|
+
voltageRating: z54.union([z54.number(), z54.string()]).optional(),
|
|
16908
|
+
schShowRatings: z54.boolean().optional(),
|
|
16880
16909
|
schOrientation: schematicOrientation.optional(),
|
|
16881
|
-
connections:
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16910
|
+
connections: z54.record(
|
|
16911
|
+
z54.string(),
|
|
16912
|
+
z54.union([
|
|
16913
|
+
z54.string(),
|
|
16914
|
+
z54.array(z54.string()).readonly(),
|
|
16915
|
+
z54.array(z54.string())
|
|
16887
16916
|
])
|
|
16888
16917
|
).optional()
|
|
16889
16918
|
});
|
|
16890
16919
|
|
|
16891
16920
|
// lib/components/platedhole.ts
|
|
16892
16921
|
import { distance as distance14 } from "circuit-json";
|
|
16893
|
-
import { z as
|
|
16922
|
+
import { z as z55 } from "zod";
|
|
16894
16923
|
var DEFAULT_PIN_HEADER_HOLE_DIAMETER = "0.04in";
|
|
16895
16924
|
var DEFAULT_PIN_HEADER_OUTER_DIAMETER = "0.1in";
|
|
16896
16925
|
var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
@@ -16922,26 +16951,26 @@ var inferPlatedHoleShapeAndDefaults = (rawProps) => {
|
|
|
16922
16951
|
props.outerDiameter = DEFAULT_PIN_HEADER_OUTER_DIAMETER;
|
|
16923
16952
|
return props;
|
|
16924
16953
|
};
|
|
16925
|
-
var distanceHiddenUndefined =
|
|
16954
|
+
var distanceHiddenUndefined = z55.custom().transform((a) => {
|
|
16926
16955
|
if (a === void 0) return void 0;
|
|
16927
16956
|
return distance14.parse(a);
|
|
16928
16957
|
});
|
|
16929
|
-
var platedHolePropsByShape =
|
|
16958
|
+
var platedHolePropsByShape = z55.discriminatedUnion("shape", [
|
|
16930
16959
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
16931
|
-
name:
|
|
16932
|
-
connectsTo:
|
|
16933
|
-
shape:
|
|
16960
|
+
name: z55.string().optional(),
|
|
16961
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
16962
|
+
shape: z55.literal("circle"),
|
|
16934
16963
|
holeDiameter: distance14,
|
|
16935
16964
|
outerDiameter: distance14,
|
|
16936
16965
|
padDiameter: distance14.optional().describe("Diameter of the copper pad"),
|
|
16937
16966
|
portHints: portHints.optional(),
|
|
16938
16967
|
solderMaskMargin: distance14.optional(),
|
|
16939
|
-
coveredWithSolderMask:
|
|
16968
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
16940
16969
|
}),
|
|
16941
16970
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16942
|
-
name:
|
|
16943
|
-
connectsTo:
|
|
16944
|
-
shape:
|
|
16971
|
+
name: z55.string().optional(),
|
|
16972
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
16973
|
+
shape: z55.literal("oval"),
|
|
16945
16974
|
outerWidth: distance14,
|
|
16946
16975
|
outerHeight: distance14,
|
|
16947
16976
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16950,13 +16979,13 @@ var platedHolePropsByShape = z54.discriminatedUnion("shape", [
|
|
|
16950
16979
|
innerHeight: distance14.optional().describe("DEPRECATED use holeHeight"),
|
|
16951
16980
|
portHints: portHints.optional(),
|
|
16952
16981
|
solderMaskMargin: distance14.optional(),
|
|
16953
|
-
coveredWithSolderMask:
|
|
16982
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
16954
16983
|
}),
|
|
16955
16984
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16956
|
-
name:
|
|
16957
|
-
connectsTo:
|
|
16958
|
-
shape:
|
|
16959
|
-
rectPad:
|
|
16985
|
+
name: z55.string().optional(),
|
|
16986
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
16987
|
+
shape: z55.literal("pill"),
|
|
16988
|
+
rectPad: z55.boolean().optional(),
|
|
16960
16989
|
outerWidth: distance14,
|
|
16961
16990
|
outerHeight: distance14,
|
|
16962
16991
|
holeWidth: distanceHiddenUndefined,
|
|
@@ -16967,30 +16996,30 @@ var platedHolePropsByShape = z54.discriminatedUnion("shape", [
|
|
|
16967
16996
|
holeOffsetX: distance14.optional(),
|
|
16968
16997
|
holeOffsetY: distance14.optional(),
|
|
16969
16998
|
solderMaskMargin: distance14.optional(),
|
|
16970
|
-
coveredWithSolderMask:
|
|
16999
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
16971
17000
|
}),
|
|
16972
17001
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16973
|
-
name:
|
|
16974
|
-
connectsTo:
|
|
16975
|
-
shape:
|
|
17002
|
+
name: z55.string().optional(),
|
|
17003
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
17004
|
+
shape: z55.literal("circular_hole_with_rect_pad"),
|
|
16976
17005
|
holeDiameter: distance14,
|
|
16977
17006
|
rectPadWidth: distance14,
|
|
16978
17007
|
rectPadHeight: distance14,
|
|
16979
17008
|
rectBorderRadius: distance14.optional(),
|
|
16980
|
-
holeShape:
|
|
16981
|
-
padShape:
|
|
17009
|
+
holeShape: z55.literal("circle").optional(),
|
|
17010
|
+
padShape: z55.literal("rect").optional(),
|
|
16982
17011
|
portHints: portHints.optional(),
|
|
16983
17012
|
holeOffsetX: distance14.optional(),
|
|
16984
17013
|
holeOffsetY: distance14.optional(),
|
|
16985
17014
|
solderMaskMargin: distance14.optional(),
|
|
16986
|
-
coveredWithSolderMask:
|
|
17015
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
16987
17016
|
}),
|
|
16988
17017
|
pcbLayoutProps.omit({ layer: true }).extend({
|
|
16989
|
-
name:
|
|
16990
|
-
connectsTo:
|
|
16991
|
-
shape:
|
|
16992
|
-
holeShape:
|
|
16993
|
-
padShape:
|
|
17018
|
+
name: z55.string().optional(),
|
|
17019
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
17020
|
+
shape: z55.literal("pill_hole_with_rect_pad"),
|
|
17021
|
+
holeShape: z55.literal("pill").optional(),
|
|
17022
|
+
padShape: z55.literal("rect").optional(),
|
|
16994
17023
|
holeWidth: distance14,
|
|
16995
17024
|
holeHeight: distance14,
|
|
16996
17025
|
rectPadWidth: distance14,
|
|
@@ -17000,22 +17029,22 @@ var platedHolePropsByShape = z54.discriminatedUnion("shape", [
|
|
|
17000
17029
|
holeOffsetX: distance14.optional(),
|
|
17001
17030
|
holeOffsetY: distance14.optional(),
|
|
17002
17031
|
solderMaskMargin: distance14.optional(),
|
|
17003
|
-
coveredWithSolderMask:
|
|
17032
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
17004
17033
|
}),
|
|
17005
17034
|
pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
17006
|
-
name:
|
|
17007
|
-
connectsTo:
|
|
17008
|
-
shape:
|
|
17009
|
-
holeShape:
|
|
17035
|
+
name: z55.string().optional(),
|
|
17036
|
+
connectsTo: z55.string().or(z55.array(z55.string())).optional(),
|
|
17037
|
+
shape: z55.literal("hole_with_polygon_pad"),
|
|
17038
|
+
holeShape: z55.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
17010
17039
|
holeDiameter: distance14.optional(),
|
|
17011
17040
|
holeWidth: distance14.optional(),
|
|
17012
17041
|
holeHeight: distance14.optional(),
|
|
17013
|
-
padOutline:
|
|
17042
|
+
padOutline: z55.array(point),
|
|
17014
17043
|
holeOffsetX: distance14,
|
|
17015
17044
|
holeOffsetY: distance14,
|
|
17016
17045
|
portHints: portHints.optional(),
|
|
17017
17046
|
solderMaskMargin: distance14.optional(),
|
|
17018
|
-
coveredWithSolderMask:
|
|
17047
|
+
coveredWithSolderMask: z55.boolean().optional()
|
|
17019
17048
|
})
|
|
17020
17049
|
]).transform((a) => {
|
|
17021
17050
|
if ("innerWidth" in a && a.innerWidth !== void 0) {
|
|
@@ -17026,7 +17055,7 @@ var platedHolePropsByShape = z54.discriminatedUnion("shape", [
|
|
|
17026
17055
|
}
|
|
17027
17056
|
return a;
|
|
17028
17057
|
});
|
|
17029
|
-
var platedHoleProps =
|
|
17058
|
+
var platedHoleProps = z55.preprocess(
|
|
17030
17059
|
inferPlatedHoleShapeAndDefaults,
|
|
17031
17060
|
platedHolePropsByShape
|
|
17032
17061
|
);
|
|
@@ -17034,7 +17063,7 @@ expectTypesMatch(true);
|
|
|
17034
17063
|
|
|
17035
17064
|
// lib/components/resistor.ts
|
|
17036
17065
|
import { resistance } from "circuit-json";
|
|
17037
|
-
import { z as
|
|
17066
|
+
import { z as z56 } from "zod";
|
|
17038
17067
|
var resistorPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
17039
17068
|
var resistorImperialFootprintNames = /* @__PURE__ */ new Set([
|
|
17040
17069
|
"01005",
|
|
@@ -17058,7 +17087,7 @@ var resistorFootprintProp = footprintProp.optional().transform(mapResistorFootpr
|
|
|
17058
17087
|
var resistorProps = commonComponentProps.extend({
|
|
17059
17088
|
footprint: resistorFootprintProp,
|
|
17060
17089
|
resistance,
|
|
17061
|
-
tolerance:
|
|
17090
|
+
tolerance: z56.union([z56.string(), z56.number()]).transform((val) => {
|
|
17062
17091
|
if (typeof val === "string") {
|
|
17063
17092
|
if (val.endsWith("%")) {
|
|
17064
17093
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -17067,12 +17096,12 @@ var resistorProps = commonComponentProps.extend({
|
|
|
17067
17096
|
}
|
|
17068
17097
|
return val;
|
|
17069
17098
|
}).pipe(
|
|
17070
|
-
|
|
17099
|
+
z56.number().min(0, "Tolerance must be non-negative").max(1, "Tolerance cannot be greater than 100%")
|
|
17071
17100
|
).optional(),
|
|
17072
|
-
pullupFor:
|
|
17073
|
-
pullupTo:
|
|
17074
|
-
pulldownFor:
|
|
17075
|
-
pulldownTo:
|
|
17101
|
+
pullupFor: z56.string().optional(),
|
|
17102
|
+
pullupTo: z56.string().optional(),
|
|
17103
|
+
pulldownFor: z56.string().optional(),
|
|
17104
|
+
pulldownTo: z56.string().optional(),
|
|
17076
17105
|
schOrientation: schematicOrientation.optional(),
|
|
17077
17106
|
schSize: schematicSymbolSize.optional(),
|
|
17078
17107
|
connections: createConnectionsProp(resistorPinLabels).optional()
|
|
@@ -17082,18 +17111,18 @@ expectTypesMatch(true);
|
|
|
17082
17111
|
|
|
17083
17112
|
// lib/components/potentiometer.ts
|
|
17084
17113
|
import { resistance as resistance2 } from "circuit-json";
|
|
17085
|
-
import { z as
|
|
17114
|
+
import { z as z57 } from "zod";
|
|
17086
17115
|
var potentiometerPinLabels = ["pin1", "pin2", "pin3"];
|
|
17087
17116
|
var potentiometerProps = commonComponentProps.extend({
|
|
17088
17117
|
maxResistance: resistance2,
|
|
17089
|
-
pinVariant:
|
|
17118
|
+
pinVariant: z57.enum(["two_pin", "three_pin"]).optional(),
|
|
17090
17119
|
connections: createConnectionsProp(potentiometerPinLabels).optional()
|
|
17091
17120
|
});
|
|
17092
17121
|
expectTypesMatch(true);
|
|
17093
17122
|
|
|
17094
17123
|
// lib/components/crystal.ts
|
|
17095
17124
|
import { capacitance, distance as distance15, frequency } from "circuit-json";
|
|
17096
|
-
import { z as
|
|
17125
|
+
import { z as z58 } from "zod";
|
|
17097
17126
|
var crystalPins = [
|
|
17098
17127
|
"pin1",
|
|
17099
17128
|
"left",
|
|
@@ -17106,9 +17135,9 @@ var crystalProps = commonComponentProps.extend({
|
|
|
17106
17135
|
frequency,
|
|
17107
17136
|
loadCapacitance: capacitance,
|
|
17108
17137
|
maxTraceLength: distance15.optional(),
|
|
17109
|
-
manufacturerPartNumber:
|
|
17110
|
-
mpn:
|
|
17111
|
-
pinVariant:
|
|
17138
|
+
manufacturerPartNumber: z58.string().optional(),
|
|
17139
|
+
mpn: z58.string().optional(),
|
|
17140
|
+
pinVariant: z58.enum(["two_pin", "four_pin"]).optional(),
|
|
17112
17141
|
schOrientation: schematicOrientation.optional(),
|
|
17113
17142
|
connections: createConnectionsProp(crystalPins).optional()
|
|
17114
17143
|
});
|
|
@@ -17116,34 +17145,34 @@ expectTypesMatch(true);
|
|
|
17116
17145
|
|
|
17117
17146
|
// lib/components/resonator.ts
|
|
17118
17147
|
import { frequency as frequency2, capacitance as capacitance2 } from "circuit-json";
|
|
17119
|
-
import { z as
|
|
17148
|
+
import { z as z59 } from "zod";
|
|
17120
17149
|
var resonatorProps = commonComponentProps.extend({
|
|
17121
17150
|
frequency: frequency2,
|
|
17122
17151
|
loadCapacitance: capacitance2,
|
|
17123
|
-
pinVariant:
|
|
17152
|
+
pinVariant: z59.enum(["no_ground", "ground_pin", "two_ground_pins"]).optional()
|
|
17124
17153
|
});
|
|
17125
17154
|
expectTypesMatch(true);
|
|
17126
17155
|
|
|
17127
17156
|
// lib/components/stampboard.ts
|
|
17128
17157
|
import { distance as distance16 } from "circuit-json";
|
|
17129
|
-
import { z as
|
|
17158
|
+
import { z as z60 } from "zod";
|
|
17130
17159
|
var stampboardProps = boardProps.extend({
|
|
17131
|
-
leftPinCount:
|
|
17132
|
-
rightPinCount:
|
|
17133
|
-
topPinCount:
|
|
17134
|
-
bottomPinCount:
|
|
17135
|
-
leftPins:
|
|
17136
|
-
rightPins:
|
|
17137
|
-
topPins:
|
|
17138
|
-
bottomPins:
|
|
17160
|
+
leftPinCount: z60.number().optional(),
|
|
17161
|
+
rightPinCount: z60.number().optional(),
|
|
17162
|
+
topPinCount: z60.number().optional(),
|
|
17163
|
+
bottomPinCount: z60.number().optional(),
|
|
17164
|
+
leftPins: z60.array(z60.string()).optional(),
|
|
17165
|
+
rightPins: z60.array(z60.string()).optional(),
|
|
17166
|
+
topPins: z60.array(z60.string()).optional(),
|
|
17167
|
+
bottomPins: z60.array(z60.string()).optional(),
|
|
17139
17168
|
pinPitch: distance16.optional(),
|
|
17140
|
-
innerHoles:
|
|
17169
|
+
innerHoles: z60.boolean().optional()
|
|
17141
17170
|
});
|
|
17142
17171
|
expectTypesMatch(true);
|
|
17143
17172
|
|
|
17144
17173
|
// lib/components/capacitor.ts
|
|
17145
17174
|
import { capacitance as capacitance3, distance as distance17, voltage } from "circuit-json";
|
|
17146
|
-
import { z as
|
|
17175
|
+
import { z as z61 } from "zod";
|
|
17147
17176
|
var capacitorPinLabels = [
|
|
17148
17177
|
"pin1",
|
|
17149
17178
|
"pin2",
|
|
@@ -17155,12 +17184,12 @@ var capacitorPinLabels = [
|
|
|
17155
17184
|
var capacitorProps = commonComponentProps.extend({
|
|
17156
17185
|
capacitance: capacitance3,
|
|
17157
17186
|
maxVoltageRating: voltage.optional(),
|
|
17158
|
-
schShowRatings:
|
|
17159
|
-
polarized:
|
|
17160
|
-
decouplingFor:
|
|
17161
|
-
decouplingTo:
|
|
17162
|
-
bypassFor:
|
|
17163
|
-
bypassTo:
|
|
17187
|
+
schShowRatings: z61.boolean().optional().default(false),
|
|
17188
|
+
polarized: z61.boolean().optional().default(false),
|
|
17189
|
+
decouplingFor: z61.string().optional(),
|
|
17190
|
+
decouplingTo: z61.string().optional(),
|
|
17191
|
+
bypassFor: z61.string().optional(),
|
|
17192
|
+
bypassTo: z61.string().optional(),
|
|
17164
17193
|
maxDecouplingTraceLength: distance17.optional(),
|
|
17165
17194
|
schOrientation: schematicOrientation.optional(),
|
|
17166
17195
|
schSize: schematicSymbolSize.optional(),
|
|
@@ -17171,14 +17200,14 @@ expectTypesMatch(true);
|
|
|
17171
17200
|
|
|
17172
17201
|
// lib/components/net.ts
|
|
17173
17202
|
import { distance as distance18 } from "circuit-json";
|
|
17174
|
-
import { z as
|
|
17175
|
-
var netProps =
|
|
17176
|
-
name:
|
|
17177
|
-
connectsTo:
|
|
17178
|
-
routingPhaseIndex:
|
|
17179
|
-
highlightColor:
|
|
17180
|
-
isPowerNet:
|
|
17181
|
-
isGroundNet:
|
|
17203
|
+
import { z as z62 } from "zod";
|
|
17204
|
+
var netProps = z62.object({
|
|
17205
|
+
name: z62.string(),
|
|
17206
|
+
connectsTo: z62.string().or(z62.array(z62.string())).optional(),
|
|
17207
|
+
routingPhaseIndex: z62.number().nullable().optional(),
|
|
17208
|
+
highlightColor: z62.string().optional(),
|
|
17209
|
+
isPowerNet: z62.boolean().optional(),
|
|
17210
|
+
isGroundNet: z62.boolean().optional(),
|
|
17182
17211
|
nominalTraceWidth: distance18.optional()
|
|
17183
17212
|
});
|
|
17184
17213
|
expectTypesMatch(true);
|
|
@@ -17192,55 +17221,55 @@ var fiducialProps = commonComponentProps.extend({
|
|
|
17192
17221
|
expectTypesMatch(true);
|
|
17193
17222
|
|
|
17194
17223
|
// lib/components/constrainedlayout.ts
|
|
17195
|
-
import { z as
|
|
17196
|
-
var constrainedLayoutProps =
|
|
17197
|
-
name:
|
|
17198
|
-
pcbOnly:
|
|
17199
|
-
schOnly:
|
|
17224
|
+
import { z as z64 } from "zod";
|
|
17225
|
+
var constrainedLayoutProps = z64.object({
|
|
17226
|
+
name: z64.string().optional(),
|
|
17227
|
+
pcbOnly: z64.boolean().optional(),
|
|
17228
|
+
schOnly: z64.boolean().optional()
|
|
17200
17229
|
});
|
|
17201
17230
|
expectTypesMatch(true);
|
|
17202
17231
|
|
|
17203
17232
|
// lib/components/constraint.ts
|
|
17204
|
-
import { z as
|
|
17205
|
-
var pcbXDistConstraintProps =
|
|
17206
|
-
pcb:
|
|
17233
|
+
import { z as z65 } from "zod";
|
|
17234
|
+
var pcbXDistConstraintProps = z65.object({
|
|
17235
|
+
pcb: z65.literal(true).optional(),
|
|
17207
17236
|
xDist: distance,
|
|
17208
|
-
left:
|
|
17209
|
-
right:
|
|
17210
|
-
edgeToEdge:
|
|
17211
|
-
centerToCenter:
|
|
17237
|
+
left: z65.string(),
|
|
17238
|
+
right: z65.string(),
|
|
17239
|
+
edgeToEdge: z65.literal(true).optional(),
|
|
17240
|
+
centerToCenter: z65.literal(true).optional()
|
|
17212
17241
|
});
|
|
17213
17242
|
expectTypesMatch(
|
|
17214
17243
|
true
|
|
17215
17244
|
);
|
|
17216
|
-
var pcbYDistConstraintProps =
|
|
17217
|
-
pcb:
|
|
17245
|
+
var pcbYDistConstraintProps = z65.object({
|
|
17246
|
+
pcb: z65.literal(true).optional(),
|
|
17218
17247
|
yDist: distance,
|
|
17219
|
-
top:
|
|
17220
|
-
bottom:
|
|
17221
|
-
edgeToEdge:
|
|
17222
|
-
centerToCenter:
|
|
17248
|
+
top: z65.string(),
|
|
17249
|
+
bottom: z65.string(),
|
|
17250
|
+
edgeToEdge: z65.literal(true).optional(),
|
|
17251
|
+
centerToCenter: z65.literal(true).optional()
|
|
17223
17252
|
});
|
|
17224
17253
|
expectTypesMatch(
|
|
17225
17254
|
true
|
|
17226
17255
|
);
|
|
17227
|
-
var pcbSameYConstraintProps =
|
|
17228
|
-
pcb:
|
|
17229
|
-
sameY:
|
|
17230
|
-
for:
|
|
17256
|
+
var pcbSameYConstraintProps = z65.object({
|
|
17257
|
+
pcb: z65.literal(true).optional(),
|
|
17258
|
+
sameY: z65.literal(true).optional(),
|
|
17259
|
+
for: z65.array(z65.string())
|
|
17231
17260
|
});
|
|
17232
17261
|
expectTypesMatch(
|
|
17233
17262
|
true
|
|
17234
17263
|
);
|
|
17235
|
-
var pcbSameXConstraintProps =
|
|
17236
|
-
pcb:
|
|
17237
|
-
sameX:
|
|
17238
|
-
for:
|
|
17264
|
+
var pcbSameXConstraintProps = z65.object({
|
|
17265
|
+
pcb: z65.literal(true).optional(),
|
|
17266
|
+
sameX: z65.literal(true).optional(),
|
|
17267
|
+
for: z65.array(z65.string())
|
|
17239
17268
|
});
|
|
17240
17269
|
expectTypesMatch(
|
|
17241
17270
|
true
|
|
17242
17271
|
);
|
|
17243
|
-
var constraintProps =
|
|
17272
|
+
var constraintProps = z65.union([
|
|
17244
17273
|
pcbXDistConstraintProps,
|
|
17245
17274
|
pcbYDistConstraintProps,
|
|
17246
17275
|
pcbSameYConstraintProps,
|
|
@@ -17249,13 +17278,13 @@ var constraintProps = z64.union([
|
|
|
17249
17278
|
expectTypesMatch(true);
|
|
17250
17279
|
|
|
17251
17280
|
// lib/components/cutout.ts
|
|
17252
|
-
import { z as
|
|
17281
|
+
import { z as z66 } from "zod";
|
|
17253
17282
|
var rectCutoutProps = pcbLayoutProps.omit({
|
|
17254
17283
|
layer: true,
|
|
17255
17284
|
pcbRotation: true
|
|
17256
17285
|
}).extend({
|
|
17257
|
-
name:
|
|
17258
|
-
shape:
|
|
17286
|
+
name: z66.string().optional(),
|
|
17287
|
+
shape: z66.literal("rect"),
|
|
17259
17288
|
width: distance,
|
|
17260
17289
|
height: distance
|
|
17261
17290
|
});
|
|
@@ -17264,8 +17293,8 @@ var circleCutoutProps = pcbLayoutProps.omit({
|
|
|
17264
17293
|
layer: true,
|
|
17265
17294
|
pcbRotation: true
|
|
17266
17295
|
}).extend({
|
|
17267
|
-
name:
|
|
17268
|
-
shape:
|
|
17296
|
+
name: z66.string().optional(),
|
|
17297
|
+
shape: z66.literal("circle"),
|
|
17269
17298
|
radius: distance
|
|
17270
17299
|
});
|
|
17271
17300
|
expectTypesMatch(true);
|
|
@@ -17273,36 +17302,36 @@ var polygonCutoutProps = pcbLayoutProps.omit({
|
|
|
17273
17302
|
layer: true,
|
|
17274
17303
|
pcbRotation: true
|
|
17275
17304
|
}).extend({
|
|
17276
|
-
name:
|
|
17277
|
-
shape:
|
|
17278
|
-
points:
|
|
17305
|
+
name: z66.string().optional(),
|
|
17306
|
+
shape: z66.literal("polygon"),
|
|
17307
|
+
points: z66.array(point)
|
|
17279
17308
|
});
|
|
17280
17309
|
expectTypesMatch(true);
|
|
17281
|
-
var cutoutProps =
|
|
17310
|
+
var cutoutProps = z66.discriminatedUnion("shape", [
|
|
17282
17311
|
rectCutoutProps,
|
|
17283
17312
|
circleCutoutProps,
|
|
17284
17313
|
polygonCutoutProps
|
|
17285
17314
|
]);
|
|
17286
17315
|
|
|
17287
17316
|
// lib/components/drc-check.ts
|
|
17288
|
-
import { z as
|
|
17289
|
-
var drcCheckProps =
|
|
17290
|
-
name:
|
|
17317
|
+
import { z as z67 } from "zod";
|
|
17318
|
+
var drcCheckProps = z67.object({
|
|
17319
|
+
name: z67.string().optional(),
|
|
17291
17320
|
checkFn: customDrcCheckFn
|
|
17292
17321
|
});
|
|
17293
17322
|
expectTypesMatch(true);
|
|
17294
17323
|
|
|
17295
17324
|
// lib/components/smtpad.ts
|
|
17296
|
-
import { z as
|
|
17325
|
+
import { z as z68 } from "zod";
|
|
17297
17326
|
var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17298
|
-
name:
|
|
17299
|
-
shape:
|
|
17327
|
+
name: z68.string().optional(),
|
|
17328
|
+
shape: z68.literal("rect"),
|
|
17300
17329
|
width: distance,
|
|
17301
17330
|
height: distance,
|
|
17302
17331
|
rectBorderRadius: distance.optional(),
|
|
17303
17332
|
cornerRadius: distance.optional(),
|
|
17304
17333
|
portHints: portHints.optional(),
|
|
17305
|
-
coveredWithSolderMask:
|
|
17334
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17306
17335
|
solderMaskMargin: distance.optional(),
|
|
17307
17336
|
solderMaskMarginLeft: distance.optional(),
|
|
17308
17337
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17312,14 +17341,14 @@ var rectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17312
17341
|
});
|
|
17313
17342
|
expectTypesMatch(true);
|
|
17314
17343
|
var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17315
|
-
name:
|
|
17316
|
-
shape:
|
|
17344
|
+
name: z68.string().optional(),
|
|
17345
|
+
shape: z68.literal("rotated_rect"),
|
|
17317
17346
|
width: distance,
|
|
17318
17347
|
height: distance,
|
|
17319
|
-
ccwRotation:
|
|
17348
|
+
ccwRotation: z68.number(),
|
|
17320
17349
|
cornerRadius: distance.optional(),
|
|
17321
17350
|
portHints: portHints.optional(),
|
|
17322
|
-
coveredWithSolderMask:
|
|
17351
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17323
17352
|
solderMaskMargin: distance.optional(),
|
|
17324
17353
|
solderMaskMarginLeft: distance.optional(),
|
|
17325
17354
|
solderMaskMarginRight: distance.optional(),
|
|
@@ -17329,51 +17358,51 @@ var rotatedRectSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
17329
17358
|
});
|
|
17330
17359
|
expectTypesMatch(true);
|
|
17331
17360
|
var circleSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17332
|
-
name:
|
|
17333
|
-
shape:
|
|
17361
|
+
name: z68.string().optional(),
|
|
17362
|
+
shape: z68.literal("circle"),
|
|
17334
17363
|
radius: distance,
|
|
17335
17364
|
portHints: portHints.optional(),
|
|
17336
|
-
coveredWithSolderMask:
|
|
17365
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17337
17366
|
solderMaskMargin: distance.optional(),
|
|
17338
17367
|
solderPasteMargin: distance.optional()
|
|
17339
17368
|
});
|
|
17340
17369
|
expectTypesMatch(true);
|
|
17341
17370
|
var pillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17342
|
-
name:
|
|
17343
|
-
shape:
|
|
17371
|
+
name: z68.string().optional(),
|
|
17372
|
+
shape: z68.literal("pill"),
|
|
17344
17373
|
width: distance,
|
|
17345
17374
|
height: distance,
|
|
17346
17375
|
radius: distance,
|
|
17347
17376
|
portHints: portHints.optional(),
|
|
17348
|
-
coveredWithSolderMask:
|
|
17377
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17349
17378
|
solderMaskMargin: distance.optional(),
|
|
17350
17379
|
solderPasteMargin: distance.optional()
|
|
17351
17380
|
});
|
|
17352
17381
|
expectTypesMatch(true);
|
|
17353
17382
|
var rotatedPillSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17354
|
-
name:
|
|
17355
|
-
shape:
|
|
17383
|
+
name: z68.string().optional(),
|
|
17384
|
+
shape: z68.literal("rotated_pill"),
|
|
17356
17385
|
width: distance,
|
|
17357
17386
|
height: distance,
|
|
17358
17387
|
radius: distance,
|
|
17359
|
-
ccwRotation:
|
|
17388
|
+
ccwRotation: z68.number(),
|
|
17360
17389
|
portHints: portHints.optional(),
|
|
17361
|
-
coveredWithSolderMask:
|
|
17390
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17362
17391
|
solderMaskMargin: distance.optional(),
|
|
17363
17392
|
solderPasteMargin: distance.optional()
|
|
17364
17393
|
});
|
|
17365
17394
|
expectTypesMatch(true);
|
|
17366
17395
|
var polygonSmtPadProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17367
|
-
name:
|
|
17368
|
-
shape:
|
|
17369
|
-
points:
|
|
17396
|
+
name: z68.string().optional(),
|
|
17397
|
+
shape: z68.literal("polygon"),
|
|
17398
|
+
points: z68.array(point),
|
|
17370
17399
|
portHints: portHints.optional(),
|
|
17371
|
-
coveredWithSolderMask:
|
|
17400
|
+
coveredWithSolderMask: z68.boolean().optional(),
|
|
17372
17401
|
solderMaskMargin: distance.optional(),
|
|
17373
17402
|
solderPasteMargin: distance.optional()
|
|
17374
17403
|
});
|
|
17375
17404
|
expectTypesMatch(true);
|
|
17376
|
-
var smtPadProps =
|
|
17405
|
+
var smtPadProps = z68.discriminatedUnion("shape", [
|
|
17377
17406
|
circleSmtPadProps,
|
|
17378
17407
|
rectSmtPadProps,
|
|
17379
17408
|
rotatedRectSmtPadProps,
|
|
@@ -17384,63 +17413,63 @@ var smtPadProps = z67.discriminatedUnion("shape", [
|
|
|
17384
17413
|
expectTypesMatch(true);
|
|
17385
17414
|
|
|
17386
17415
|
// lib/components/solderpaste.ts
|
|
17387
|
-
import { z as
|
|
17416
|
+
import { z as z69 } from "zod";
|
|
17388
17417
|
var rectSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17389
|
-
shape:
|
|
17418
|
+
shape: z69.literal("rect"),
|
|
17390
17419
|
width: distance,
|
|
17391
17420
|
height: distance
|
|
17392
17421
|
});
|
|
17393
17422
|
expectTypesMatch(true);
|
|
17394
17423
|
var circleSolderPasteProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
17395
|
-
shape:
|
|
17424
|
+
shape: z69.literal("circle"),
|
|
17396
17425
|
radius: distance
|
|
17397
17426
|
});
|
|
17398
17427
|
expectTypesMatch(true);
|
|
17399
|
-
var solderPasteProps =
|
|
17428
|
+
var solderPasteProps = z69.union([
|
|
17400
17429
|
circleSolderPasteProps,
|
|
17401
17430
|
rectSolderPasteProps
|
|
17402
17431
|
]);
|
|
17403
17432
|
expectTypesMatch(true);
|
|
17404
17433
|
|
|
17405
17434
|
// lib/components/hole.ts
|
|
17406
|
-
import { z as
|
|
17435
|
+
import { z as z70 } from "zod";
|
|
17407
17436
|
var circleHoleProps = pcbLayoutProps.extend({
|
|
17408
|
-
name:
|
|
17409
|
-
shape:
|
|
17437
|
+
name: z70.string().optional(),
|
|
17438
|
+
shape: z70.literal("circle").optional(),
|
|
17410
17439
|
diameter: distance.optional(),
|
|
17411
17440
|
radius: distance.optional(),
|
|
17412
17441
|
solderMaskMargin: distance.optional(),
|
|
17413
|
-
coveredWithSolderMask:
|
|
17442
|
+
coveredWithSolderMask: z70.boolean().optional()
|
|
17414
17443
|
}).transform((d) => ({
|
|
17415
17444
|
...d,
|
|
17416
17445
|
diameter: d.diameter ?? 2 * d.radius,
|
|
17417
17446
|
radius: d.radius ?? d.diameter / 2
|
|
17418
17447
|
}));
|
|
17419
17448
|
var pillHoleProps = pcbLayoutProps.extend({
|
|
17420
|
-
name:
|
|
17421
|
-
shape:
|
|
17449
|
+
name: z70.string().optional(),
|
|
17450
|
+
shape: z70.literal("pill"),
|
|
17422
17451
|
width: distance,
|
|
17423
17452
|
height: distance,
|
|
17424
17453
|
solderMaskMargin: distance.optional(),
|
|
17425
|
-
coveredWithSolderMask:
|
|
17454
|
+
coveredWithSolderMask: z70.boolean().optional()
|
|
17426
17455
|
});
|
|
17427
17456
|
var ovalHoleProps = pcbLayoutProps.extend({
|
|
17428
|
-
name:
|
|
17429
|
-
shape:
|
|
17457
|
+
name: z70.string().optional(),
|
|
17458
|
+
shape: z70.literal("oval"),
|
|
17430
17459
|
width: distance,
|
|
17431
17460
|
height: distance,
|
|
17432
17461
|
solderMaskMargin: distance.optional(),
|
|
17433
|
-
coveredWithSolderMask:
|
|
17462
|
+
coveredWithSolderMask: z70.boolean().optional()
|
|
17434
17463
|
});
|
|
17435
17464
|
var rectHoleProps = pcbLayoutProps.extend({
|
|
17436
|
-
name:
|
|
17437
|
-
shape:
|
|
17465
|
+
name: z70.string().optional(),
|
|
17466
|
+
shape: z70.literal("rect"),
|
|
17438
17467
|
width: distance,
|
|
17439
17468
|
height: distance,
|
|
17440
17469
|
solderMaskMargin: distance.optional(),
|
|
17441
|
-
coveredWithSolderMask:
|
|
17470
|
+
coveredWithSolderMask: z70.boolean().optional()
|
|
17442
17471
|
});
|
|
17443
|
-
var holeProps =
|
|
17472
|
+
var holeProps = z70.union([
|
|
17444
17473
|
circleHoleProps,
|
|
17445
17474
|
pillHoleProps,
|
|
17446
17475
|
ovalHoleProps,
|
|
@@ -17448,60 +17477,45 @@ var holeProps = z69.union([
|
|
|
17448
17477
|
]);
|
|
17449
17478
|
expectTypesMatch(true);
|
|
17450
17479
|
|
|
17480
|
+
// lib/components/antenna.ts
|
|
17481
|
+
import "zod";
|
|
17482
|
+
var antennaProps = commonComponentProps.extend({
|
|
17483
|
+
pcbPath: pcbPath.optional()
|
|
17484
|
+
});
|
|
17485
|
+
expectTypesMatch(true);
|
|
17486
|
+
|
|
17451
17487
|
// lib/components/trace.ts
|
|
17452
|
-
import { distance as distance19,
|
|
17453
|
-
import { z as
|
|
17454
|
-
var portRef =
|
|
17455
|
-
|
|
17456
|
-
|
|
17488
|
+
import { distance as distance19, route_hint_point as route_hint_point2 } from "circuit-json";
|
|
17489
|
+
import { z as z72 } from "zod";
|
|
17490
|
+
var portRef = z72.union([
|
|
17491
|
+
z72.string(),
|
|
17492
|
+
z72.custom(
|
|
17457
17493
|
(v) => typeof v === "object" && v !== null && "getPortSelector" in v && typeof v.getPortSelector === "function"
|
|
17458
17494
|
)
|
|
17459
17495
|
]);
|
|
17460
|
-
var
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
}).superRefine((value, ctx) => {
|
|
17465
|
-
if (value.via) {
|
|
17466
|
-
if (!value.toLayer) {
|
|
17467
|
-
ctx.addIssue({
|
|
17468
|
-
code: z70.ZodIssueCode.custom,
|
|
17469
|
-
message: "toLayer is required when via is true",
|
|
17470
|
-
path: ["toLayer"]
|
|
17471
|
-
});
|
|
17472
|
-
}
|
|
17473
|
-
} else if (value.fromLayer || value.toLayer) {
|
|
17474
|
-
ctx.addIssue({
|
|
17475
|
-
code: z70.ZodIssueCode.custom,
|
|
17476
|
-
message: "fromLayer/toLayer are only allowed when via is true",
|
|
17477
|
-
path: ["via"]
|
|
17478
|
-
});
|
|
17479
|
-
}
|
|
17480
|
-
});
|
|
17481
|
-
var pcbPath = z70.array(z70.union([pcbPathPoint, z70.string()]));
|
|
17482
|
-
var baseTraceProps = z70.object({
|
|
17483
|
-
key: z70.string().optional(),
|
|
17484
|
-
name: z70.string().optional(),
|
|
17485
|
-
displayName: z70.string().optional(),
|
|
17496
|
+
var baseTraceProps = z72.object({
|
|
17497
|
+
key: z72.string().optional(),
|
|
17498
|
+
name: z72.string().optional(),
|
|
17499
|
+
displayName: z72.string().optional(),
|
|
17486
17500
|
thickness: distance19.optional(),
|
|
17487
17501
|
width: distance19.optional().describe("Alias for trace thickness"),
|
|
17488
|
-
schematicRouteHints:
|
|
17489
|
-
pcbRouteHints:
|
|
17490
|
-
pcbPathRelativeTo:
|
|
17502
|
+
schematicRouteHints: z72.array(point).optional(),
|
|
17503
|
+
pcbRouteHints: z72.array(route_hint_point2).optional(),
|
|
17504
|
+
pcbPathRelativeTo: z72.string().optional(),
|
|
17491
17505
|
pcbPath: pcbPath.optional(),
|
|
17492
|
-
pcbPaths:
|
|
17493
|
-
routingPhaseIndex:
|
|
17494
|
-
pcbStraightLine:
|
|
17495
|
-
schDisplayLabel:
|
|
17496
|
-
schStroke:
|
|
17497
|
-
highlightColor:
|
|
17506
|
+
pcbPaths: z72.array(pcbPath).optional(),
|
|
17507
|
+
routingPhaseIndex: z72.number().nullable().optional(),
|
|
17508
|
+
pcbStraightLine: z72.boolean().optional().describe("Draw a straight pcb trace between the connected points"),
|
|
17509
|
+
schDisplayLabel: z72.string().optional(),
|
|
17510
|
+
schStroke: z72.string().optional(),
|
|
17511
|
+
highlightColor: z72.string().optional(),
|
|
17498
17512
|
maxLength: distance19.optional(),
|
|
17499
|
-
maxViaCount:
|
|
17500
|
-
connectsTo:
|
|
17513
|
+
maxViaCount: z72.number().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),
|
|
17514
|
+
connectsTo: z72.string().or(z72.array(z72.string())).optional()
|
|
17501
17515
|
});
|
|
17502
|
-
var traceProps =
|
|
17516
|
+
var traceProps = z72.union([
|
|
17503
17517
|
baseTraceProps.extend({
|
|
17504
|
-
path:
|
|
17518
|
+
path: z72.array(portRef)
|
|
17505
17519
|
}),
|
|
17506
17520
|
baseTraceProps.extend({
|
|
17507
17521
|
from: portRef,
|
|
@@ -17519,31 +17533,31 @@ import {
|
|
|
17519
17533
|
layer_ref as layer_ref6,
|
|
17520
17534
|
resistance as resistance3
|
|
17521
17535
|
} from "circuit-json";
|
|
17522
|
-
import { z as
|
|
17523
|
-
var busProps =
|
|
17524
|
-
name:
|
|
17525
|
-
connections:
|
|
17526
|
-
routingPhaseIndex:
|
|
17527
|
-
maxLengthSkew: distance20.pipe(
|
|
17528
|
-
targetImpedance: resistance3.pipe(
|
|
17529
|
-
pcbTraceWidth: distance20.pipe(
|
|
17530
|
-
pcbAllowedLayers:
|
|
17536
|
+
import { z as z73 } from "zod";
|
|
17537
|
+
var busProps = z73.object({
|
|
17538
|
+
name: z73.string().optional(),
|
|
17539
|
+
connections: z73.array(z73.string()).min(2),
|
|
17540
|
+
routingPhaseIndex: z73.number().nullable().optional(),
|
|
17541
|
+
maxLengthSkew: distance20.pipe(z73.number().min(0).finite()).optional(),
|
|
17542
|
+
targetImpedance: resistance3.pipe(z73.number().positive().finite()).optional(),
|
|
17543
|
+
pcbTraceWidth: distance20.pipe(z73.number().positive().finite()).optional(),
|
|
17544
|
+
pcbAllowedLayers: z73.array(layer_ref6).min(1).optional(),
|
|
17531
17545
|
preferredLayer: layer_ref6.optional(),
|
|
17532
|
-
preferredLayers:
|
|
17546
|
+
preferredLayers: z73.array(layer_ref6).min(1).optional()
|
|
17533
17547
|
});
|
|
17534
17548
|
expectTypesMatch(true);
|
|
17535
17549
|
|
|
17536
17550
|
// lib/components/differentialpair.ts
|
|
17537
17551
|
import { distance as distance21, resistance as resistance4 } from "circuit-json";
|
|
17538
|
-
import { z as
|
|
17539
|
-
var differentialPairProps =
|
|
17540
|
-
name:
|
|
17541
|
-
positiveConnection:
|
|
17542
|
-
negativeConnection:
|
|
17543
|
-
maxLengthSkew: distance21.pipe(
|
|
17544
|
-
targetDifferentialImpedance: resistance4.pipe(
|
|
17545
|
-
pcbTraceGap: distance21.pipe(
|
|
17546
|
-
maxUncoupledLength: distance21.pipe(
|
|
17552
|
+
import { z as z74 } from "zod";
|
|
17553
|
+
var differentialPairProps = z74.object({
|
|
17554
|
+
name: z74.string().optional(),
|
|
17555
|
+
positiveConnection: z74.string(),
|
|
17556
|
+
negativeConnection: z74.string(),
|
|
17557
|
+
maxLengthSkew: distance21.pipe(z74.number().min(0).finite()).optional(),
|
|
17558
|
+
targetDifferentialImpedance: resistance4.pipe(z74.number().positive().finite()).optional(),
|
|
17559
|
+
pcbTraceGap: distance21.pipe(z74.number().positive().finite()).optional(),
|
|
17560
|
+
maxUncoupledLength: distance21.pipe(z74.number().min(0).finite()).optional()
|
|
17547
17561
|
});
|
|
17548
17562
|
expectTypesMatch(true);
|
|
17549
17563
|
|
|
@@ -17551,8 +17565,8 @@ expectTypesMatch(true);
|
|
|
17551
17565
|
import {
|
|
17552
17566
|
layer_ref as layer_ref7
|
|
17553
17567
|
} from "circuit-json";
|
|
17554
|
-
import { z as
|
|
17555
|
-
var footprintInsertionDirection =
|
|
17568
|
+
import { z as z75 } from "zod";
|
|
17569
|
+
var footprintInsertionDirection = z75.enum([
|
|
17556
17570
|
"from_left",
|
|
17557
17571
|
"from_right",
|
|
17558
17572
|
"from_top",
|
|
@@ -17570,11 +17584,11 @@ var footprintInsertionDirection = z73.enum([
|
|
|
17570
17584
|
"from_back"
|
|
17571
17585
|
]);
|
|
17572
17586
|
expectTypesMatch(true);
|
|
17573
|
-
var footprintProps =
|
|
17574
|
-
children:
|
|
17575
|
-
name:
|
|
17587
|
+
var footprintProps = z75.object({
|
|
17588
|
+
children: z75.any().optional(),
|
|
17589
|
+
name: z75.string().optional(),
|
|
17576
17590
|
originalLayer: layer_ref7.default("top").optional(),
|
|
17577
|
-
circuitJson:
|
|
17591
|
+
circuitJson: z75.array(z75.any()).optional(),
|
|
17578
17592
|
src: footprintProp.describe("Can be a footprint or kicad string").optional(),
|
|
17579
17593
|
insertionDirection: footprintInsertionDirection.optional().describe(
|
|
17580
17594
|
"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."
|
|
@@ -17586,19 +17600,19 @@ var footprintProps = z73.object({
|
|
|
17586
17600
|
expectTypesMatch(true);
|
|
17587
17601
|
|
|
17588
17602
|
// lib/components/symbol.ts
|
|
17589
|
-
import { z as
|
|
17590
|
-
var symbolProps =
|
|
17591
|
-
originalFacingDirection:
|
|
17603
|
+
import { z as z76 } from "zod";
|
|
17604
|
+
var symbolProps = z76.object({
|
|
17605
|
+
originalFacingDirection: z76.enum(["up", "down", "left", "right"]).default("right").optional(),
|
|
17592
17606
|
width: distance.optional(),
|
|
17593
17607
|
height: distance.optional(),
|
|
17594
|
-
name:
|
|
17608
|
+
name: z76.string().optional()
|
|
17595
17609
|
});
|
|
17596
17610
|
expectTypesMatch(true);
|
|
17597
17611
|
|
|
17598
17612
|
// lib/components/battery.ts
|
|
17599
17613
|
import { voltage as voltage2 } from "circuit-json";
|
|
17600
|
-
import { z as
|
|
17601
|
-
var capacity =
|
|
17614
|
+
import { z as z77 } from "zod";
|
|
17615
|
+
var capacity = z77.number().or(z77.string().endsWith("mAh")).transform((v) => {
|
|
17602
17616
|
if (typeof v === "string") {
|
|
17603
17617
|
const valString = v.replace("mAh", "");
|
|
17604
17618
|
const num = Number.parseFloat(valString);
|
|
@@ -17613,14 +17627,14 @@ var batteryPins = lrPolarPins;
|
|
|
17613
17627
|
var batteryProps = commonComponentProps.extend({
|
|
17614
17628
|
capacity: capacity.optional(),
|
|
17615
17629
|
voltage: voltage2.optional(),
|
|
17616
|
-
standard:
|
|
17630
|
+
standard: z77.enum(["AA", "AAA", "9V", "CR2032", "18650", "C"]).optional(),
|
|
17617
17631
|
schOrientation: schematicOrientation.optional(),
|
|
17618
17632
|
connections: createConnectionsProp(batteryPins).optional()
|
|
17619
17633
|
});
|
|
17620
17634
|
expectTypesMatch(true);
|
|
17621
17635
|
|
|
17622
17636
|
// lib/components/mountedboard.ts
|
|
17623
|
-
import { z as
|
|
17637
|
+
import { z as z78 } from "zod";
|
|
17624
17638
|
var mountedboardProps = subcircuitGroupProps.extend({
|
|
17625
17639
|
manufacturerPartNumber: chipProps.shape.manufacturerPartNumber,
|
|
17626
17640
|
pinLabels: chipProps.shape.pinLabels,
|
|
@@ -17632,7 +17646,7 @@ var mountedboardProps = subcircuitGroupProps.extend({
|
|
|
17632
17646
|
internallyConnectedPins: chipProps.shape.internallyConnectedPins,
|
|
17633
17647
|
externallyConnectedPins: chipProps.shape.externallyConnectedPins,
|
|
17634
17648
|
boardToBoardDistance: distance.optional(),
|
|
17635
|
-
mountOrientation:
|
|
17649
|
+
mountOrientation: z78.enum(["faceDown", "faceUp"]).optional()
|
|
17636
17650
|
});
|
|
17637
17651
|
expectTypesMatch(true);
|
|
17638
17652
|
|
|
@@ -17640,40 +17654,40 @@ expectTypesMatch(true);
|
|
|
17640
17654
|
import { distance as distance22 } from "circuit-json";
|
|
17641
17655
|
|
|
17642
17656
|
// lib/common/pcbOrientation.ts
|
|
17643
|
-
import { z as
|
|
17644
|
-
var pcbOrientation =
|
|
17657
|
+
import { z as z79 } from "zod";
|
|
17658
|
+
var pcbOrientation = z79.enum(["vertical", "horizontal"]).describe(
|
|
17645
17659
|
"vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"
|
|
17646
17660
|
);
|
|
17647
17661
|
expectTypesMatch(true);
|
|
17648
17662
|
|
|
17649
17663
|
// lib/components/pin-header.ts
|
|
17650
|
-
import { z as
|
|
17664
|
+
import { z as z80 } from "zod";
|
|
17651
17665
|
var pinHeaderProps = commonComponentProps.extend({
|
|
17652
|
-
pinCount:
|
|
17666
|
+
pinCount: z80.number(),
|
|
17653
17667
|
pitch: distance22.optional(),
|
|
17654
|
-
schFacingDirection:
|
|
17655
|
-
gender:
|
|
17656
|
-
showSilkscreenPinLabels:
|
|
17657
|
-
pcbPinLabels:
|
|
17658
|
-
doubleRow:
|
|
17659
|
-
rightAngle:
|
|
17668
|
+
schFacingDirection: z80.enum(["up", "down", "left", "right"]).optional(),
|
|
17669
|
+
gender: z80.enum(["male", "female", "unpopulated"]).optional().default("male"),
|
|
17670
|
+
showSilkscreenPinLabels: z80.boolean().optional(),
|
|
17671
|
+
pcbPinLabels: z80.record(z80.string(), z80.string()).optional(),
|
|
17672
|
+
doubleRow: z80.boolean().optional(),
|
|
17673
|
+
rightAngle: z80.boolean().optional(),
|
|
17660
17674
|
pcbOrientation: pcbOrientation.optional(),
|
|
17661
17675
|
holeDiameter: distance22.optional(),
|
|
17662
17676
|
platedDiameter: distance22.optional(),
|
|
17663
|
-
pinLabels:
|
|
17664
|
-
connections:
|
|
17665
|
-
facingDirection:
|
|
17677
|
+
pinLabels: z80.record(z80.string(), schematicPinLabel).or(z80.array(schematicPinLabel)).optional(),
|
|
17678
|
+
connections: z80.custom().pipe(z80.record(z80.string(), connectionTarget)).optional(),
|
|
17679
|
+
facingDirection: z80.enum(["left", "right"]).optional(),
|
|
17666
17680
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
17667
17681
|
schPinStyle: schematicPinStyle.optional(),
|
|
17668
17682
|
schPinSpacing: distance22.optional(),
|
|
17669
17683
|
schWidth: distance22.optional(),
|
|
17670
17684
|
schHeight: distance22.optional(),
|
|
17671
|
-
connectsFromAbove:
|
|
17672
|
-
connectsFromBelow:
|
|
17685
|
+
connectsFromAbove: z80.boolean().optional(),
|
|
17686
|
+
connectsFromBelow: z80.boolean().optional()
|
|
17673
17687
|
}).superRefine((props, ctx) => {
|
|
17674
17688
|
if (props.connectsFromAbove && props.connectsFromBelow) {
|
|
17675
17689
|
ctx.addIssue({
|
|
17676
|
-
code:
|
|
17690
|
+
code: z80.ZodIssueCode.custom,
|
|
17677
17691
|
message: "connectsFromAbove and connectsFromBelow are opposites; set at most one"
|
|
17678
17692
|
});
|
|
17679
17693
|
}
|
|
@@ -17684,30 +17698,30 @@ var pinHeaderProps = commonComponentProps.extend({
|
|
|
17684
17698
|
expectTypesMatch(true);
|
|
17685
17699
|
|
|
17686
17700
|
// lib/components/netalias.ts
|
|
17687
|
-
import { z as
|
|
17701
|
+
import { z as z81 } from "zod";
|
|
17688
17702
|
import { rotation as rotation3 } from "circuit-json";
|
|
17689
|
-
var netAliasProps =
|
|
17690
|
-
net:
|
|
17691
|
-
connection:
|
|
17703
|
+
var netAliasProps = z81.object({
|
|
17704
|
+
net: z81.string().optional(),
|
|
17705
|
+
connection: z81.string().optional(),
|
|
17692
17706
|
schX: distance.optional(),
|
|
17693
17707
|
schY: distance.optional(),
|
|
17694
17708
|
schRotation: rotation3.optional(),
|
|
17695
|
-
anchorSide:
|
|
17709
|
+
anchorSide: z81.enum(["left", "top", "right", "bottom"]).optional()
|
|
17696
17710
|
});
|
|
17697
17711
|
expectTypesMatch(true);
|
|
17698
17712
|
|
|
17699
17713
|
// lib/components/netlabel.ts
|
|
17700
|
-
import { z as
|
|
17714
|
+
import { z as z82 } from "zod";
|
|
17701
17715
|
import { rotation as rotation4 } from "circuit-json";
|
|
17702
|
-
var netLabelProps =
|
|
17703
|
-
net:
|
|
17704
|
-
connection:
|
|
17705
|
-
connectsTo:
|
|
17706
|
-
inline:
|
|
17716
|
+
var netLabelProps = z82.object({
|
|
17717
|
+
net: z82.string().optional(),
|
|
17718
|
+
connection: z82.string().optional(),
|
|
17719
|
+
connectsTo: z82.string().or(z82.array(z82.string())).optional(),
|
|
17720
|
+
inline: z82.boolean().optional(),
|
|
17707
17721
|
schX: distance.optional(),
|
|
17708
17722
|
schY: distance.optional(),
|
|
17709
17723
|
schRotation: rotation4.optional(),
|
|
17710
|
-
anchorSide:
|
|
17724
|
+
anchorSide: z82.enum(["left", "top", "right", "bottom"]).optional()
|
|
17711
17725
|
});
|
|
17712
17726
|
expectTypesMatch(true);
|
|
17713
17727
|
|
|
@@ -17722,32 +17736,32 @@ expectTypesMatch(true);
|
|
|
17722
17736
|
|
|
17723
17737
|
// lib/components/analogsimulation.ts
|
|
17724
17738
|
import { ms } from "circuit-json";
|
|
17725
|
-
import { z as
|
|
17726
|
-
var spiceEngine =
|
|
17739
|
+
import { z as z84 } from "zod";
|
|
17740
|
+
var spiceEngine = z84.custom(
|
|
17727
17741
|
(value) => typeof value === "string"
|
|
17728
17742
|
);
|
|
17729
|
-
var spiceOptions =
|
|
17730
|
-
method:
|
|
17731
|
-
reltol:
|
|
17732
|
-
abstol:
|
|
17733
|
-
vntol:
|
|
17743
|
+
var spiceOptions = z84.object({
|
|
17744
|
+
method: z84.enum(["trap", "gear"]).optional(),
|
|
17745
|
+
reltol: z84.union([z84.number(), z84.string()]).optional(),
|
|
17746
|
+
abstol: z84.union([z84.number(), z84.string()]).optional(),
|
|
17747
|
+
vntol: z84.union([z84.number(), z84.string()]).optional()
|
|
17734
17748
|
});
|
|
17735
17749
|
var analogAnalysisSimulationBaseProps = {
|
|
17736
|
-
name:
|
|
17750
|
+
name: z84.string().optional(),
|
|
17737
17751
|
spiceEngine: spiceEngine.optional(),
|
|
17738
17752
|
spiceOptions: spiceOptions.optional(),
|
|
17739
|
-
graphIndependentAxes:
|
|
17740
|
-
children:
|
|
17753
|
+
graphIndependentAxes: z84.boolean().optional(),
|
|
17754
|
+
children: z84.custom().optional()
|
|
17741
17755
|
};
|
|
17742
|
-
var analogSimulationProps =
|
|
17743
|
-
name:
|
|
17744
|
-
simulationType:
|
|
17756
|
+
var analogSimulationProps = z84.object({
|
|
17757
|
+
name: z84.string().optional(),
|
|
17758
|
+
simulationType: z84.literal("spice_transient_analysis").default("spice_transient_analysis"),
|
|
17745
17759
|
duration: ms.optional(),
|
|
17746
17760
|
startTime: ms.optional(),
|
|
17747
17761
|
timePerStep: ms.optional(),
|
|
17748
17762
|
spiceEngine: spiceEngine.optional(),
|
|
17749
17763
|
spiceOptions: spiceOptions.optional(),
|
|
17750
|
-
graphIndependentAxes:
|
|
17764
|
+
graphIndependentAxes: z84.boolean().optional()
|
|
17751
17765
|
});
|
|
17752
17766
|
expectTypesMatch(
|
|
17753
17767
|
true
|
|
@@ -17755,12 +17769,12 @@ expectTypesMatch(
|
|
|
17755
17769
|
|
|
17756
17770
|
// lib/components/analogtransientsimulation.ts
|
|
17757
17771
|
import { ms as ms2 } from "circuit-json";
|
|
17758
|
-
import { z as
|
|
17772
|
+
import { z as z85 } from "zod";
|
|
17759
17773
|
var positiveMilliseconds = ms2.refine(
|
|
17760
17774
|
(milliseconds) => milliseconds > 0,
|
|
17761
17775
|
"Time must be positive"
|
|
17762
17776
|
);
|
|
17763
|
-
var analogTransientSimulationProps =
|
|
17777
|
+
var analogTransientSimulationProps = z85.object({
|
|
17764
17778
|
...analogAnalysisSimulationBaseProps,
|
|
17765
17779
|
duration: positiveMilliseconds.default("10ms"),
|
|
17766
17780
|
startTime: ms2.default("0ms"),
|
|
@@ -17768,7 +17782,7 @@ var analogTransientSimulationProps = z83.object({
|
|
|
17768
17782
|
}).superRefine((simulation, context) => {
|
|
17769
17783
|
if (simulation.startTime < 0 || simulation.startTime > simulation.duration) {
|
|
17770
17784
|
context.addIssue({
|
|
17771
|
-
code:
|
|
17785
|
+
code: z85.ZodIssueCode.custom,
|
|
17772
17786
|
path: ["startTime"],
|
|
17773
17787
|
message: "startTime must be between zero and duration"
|
|
17774
17788
|
});
|
|
@@ -17777,19 +17791,19 @@ var analogTransientSimulationProps = z83.object({
|
|
|
17777
17791
|
expectTypesMatch(true);
|
|
17778
17792
|
|
|
17779
17793
|
// lib/components/analogdcoperatingpointsimulation.ts
|
|
17780
|
-
import { z as
|
|
17781
|
-
var analogDcOperatingPointSimulationProps =
|
|
17794
|
+
import { z as z86 } from "zod";
|
|
17795
|
+
var analogDcOperatingPointSimulationProps = z86.object({
|
|
17782
17796
|
...analogAnalysisSimulationBaseProps
|
|
17783
17797
|
});
|
|
17784
17798
|
expectTypesMatch(true);
|
|
17785
17799
|
|
|
17786
17800
|
// lib/components/analogdcsweepsimulation.ts
|
|
17787
17801
|
import { current, voltage as voltage3 } from "circuit-json";
|
|
17788
|
-
import { z as
|
|
17789
|
-
var dcSweepQuantity =
|
|
17790
|
-
var analogDcSweepSimulationProps =
|
|
17802
|
+
import { z as z87 } from "zod";
|
|
17803
|
+
var dcSweepQuantity = z87.union([voltage3, current]);
|
|
17804
|
+
var analogDcSweepSimulationProps = z87.object({
|
|
17791
17805
|
...analogAnalysisSimulationBaseProps,
|
|
17792
|
-
sweepSource:
|
|
17806
|
+
sweepSource: z87.string().min(1),
|
|
17793
17807
|
sweepStart: dcSweepQuantity,
|
|
17794
17808
|
sweepStop: dcSweepQuantity,
|
|
17795
17809
|
sweepStep: dcSweepQuantity.refine(
|
|
@@ -17799,7 +17813,7 @@ var analogDcSweepSimulationProps = z85.object({
|
|
|
17799
17813
|
}).superRefine((simulation, context) => {
|
|
17800
17814
|
if (Math.sign(simulation.sweepStop - simulation.sweepStart) !== Math.sign(simulation.sweepStep)) {
|
|
17801
17815
|
context.addIssue({
|
|
17802
|
-
code:
|
|
17816
|
+
code: z87.ZodIssueCode.custom,
|
|
17803
17817
|
path: ["sweepStep"],
|
|
17804
17818
|
message: "sweepStep must move from sweepStart toward sweepStop"
|
|
17805
17819
|
});
|
|
@@ -17809,10 +17823,10 @@ expectTypesMatch(true);
|
|
|
17809
17823
|
|
|
17810
17824
|
// lib/components/analogacsweepsimulation.ts
|
|
17811
17825
|
import { frequency as frequency3 } from "circuit-json";
|
|
17812
|
-
import { z as
|
|
17813
|
-
var analogAcSweepSimulationProps =
|
|
17826
|
+
import { z as z88 } from "zod";
|
|
17827
|
+
var analogAcSweepSimulationProps = z88.object({
|
|
17814
17828
|
...analogAnalysisSimulationBaseProps,
|
|
17815
|
-
sweepType:
|
|
17829
|
+
sweepType: z88.enum(["linear", "decade", "octave"]),
|
|
17816
17830
|
startFrequency: frequency3.refine(
|
|
17817
17831
|
(startFrequencyHz) => startFrequencyHz > 0,
|
|
17818
17832
|
"startFrequency must be positive"
|
|
@@ -17821,12 +17835,12 @@ var analogAcSweepSimulationProps = z86.object({
|
|
|
17821
17835
|
(stopFrequencyHz) => stopFrequencyHz > 0,
|
|
17822
17836
|
"stopFrequency must be positive"
|
|
17823
17837
|
),
|
|
17824
|
-
samplesPerInterval:
|
|
17825
|
-
sampleCount:
|
|
17838
|
+
samplesPerInterval: z88.number().int().positive().optional(),
|
|
17839
|
+
sampleCount: z88.number().int().positive().optional()
|
|
17826
17840
|
}).superRefine((simulation, context) => {
|
|
17827
17841
|
if (simulation.stopFrequency <= simulation.startFrequency) {
|
|
17828
17842
|
context.addIssue({
|
|
17829
|
-
code:
|
|
17843
|
+
code: z88.ZodIssueCode.custom,
|
|
17830
17844
|
path: ["stopFrequency"],
|
|
17831
17845
|
message: "stopFrequency must be greater than startFrequency"
|
|
17832
17846
|
});
|
|
@@ -17834,14 +17848,14 @@ var analogAcSweepSimulationProps = z86.object({
|
|
|
17834
17848
|
if (simulation.sweepType === "linear") {
|
|
17835
17849
|
if (simulation.sampleCount === void 0) {
|
|
17836
17850
|
context.addIssue({
|
|
17837
|
-
code:
|
|
17851
|
+
code: z88.ZodIssueCode.custom,
|
|
17838
17852
|
path: ["sampleCount"],
|
|
17839
17853
|
message: "sampleCount is required for a linear AC sweep"
|
|
17840
17854
|
});
|
|
17841
17855
|
}
|
|
17842
17856
|
if (simulation.samplesPerInterval !== void 0) {
|
|
17843
17857
|
context.addIssue({
|
|
17844
|
-
code:
|
|
17858
|
+
code: z88.ZodIssueCode.custom,
|
|
17845
17859
|
path: ["samplesPerInterval"],
|
|
17846
17860
|
message: "samplesPerInterval is only valid for decade or octave sweeps"
|
|
17847
17861
|
});
|
|
@@ -17850,14 +17864,14 @@ var analogAcSweepSimulationProps = z86.object({
|
|
|
17850
17864
|
}
|
|
17851
17865
|
if (simulation.samplesPerInterval === void 0) {
|
|
17852
17866
|
context.addIssue({
|
|
17853
|
-
code:
|
|
17867
|
+
code: z88.ZodIssueCode.custom,
|
|
17854
17868
|
path: ["samplesPerInterval"],
|
|
17855
17869
|
message: "samplesPerInterval is required for decade or octave sweeps"
|
|
17856
17870
|
});
|
|
17857
17871
|
}
|
|
17858
17872
|
if (simulation.sampleCount !== void 0) {
|
|
17859
17873
|
context.addIssue({
|
|
17860
|
-
code:
|
|
17874
|
+
code: z88.ZodIssueCode.custom,
|
|
17861
17875
|
path: ["sampleCount"],
|
|
17862
17876
|
message: "sampleCount is only valid for a linear sweep"
|
|
17863
17877
|
});
|
|
@@ -17873,43 +17887,43 @@ import {
|
|
|
17873
17887
|
resistance as resistance5,
|
|
17874
17888
|
voltage as voltage4
|
|
17875
17889
|
} from "circuit-json";
|
|
17876
|
-
import { z as
|
|
17877
|
-
var resistanceSweepQuantity = resistance5.pipe(
|
|
17878
|
-
var capacitanceSweepQuantity = capacitance4.pipe(
|
|
17879
|
-
var inductanceSweepQuantity = inductance.pipe(
|
|
17880
|
-
var voltageSweepQuantity = voltage4.pipe(
|
|
17881
|
-
var currentSweepQuantity = current2.pipe(
|
|
17890
|
+
import { z as z89 } from "zod";
|
|
17891
|
+
var resistanceSweepQuantity = resistance5.pipe(z89.number());
|
|
17892
|
+
var capacitanceSweepQuantity = capacitance4.pipe(z89.number());
|
|
17893
|
+
var inductanceSweepQuantity = inductance.pipe(z89.number());
|
|
17894
|
+
var voltageSweepQuantity = voltage4.pipe(z89.number());
|
|
17895
|
+
var currentSweepQuantity = current2.pipe(z89.number());
|
|
17882
17896
|
var createAnalogSweepCoordinateProps = (sweepQuantity) => ({
|
|
17883
|
-
name:
|
|
17884
|
-
values:
|
|
17897
|
+
name: z89.string().optional(),
|
|
17898
|
+
values: z89.array(sweepQuantity).min(1).optional(),
|
|
17885
17899
|
start: sweepQuantity.optional(),
|
|
17886
17900
|
stop: sweepQuantity.optional(),
|
|
17887
17901
|
step: sweepQuantity.optional()
|
|
17888
17902
|
});
|
|
17889
|
-
var analogResistanceSweepParameterProps =
|
|
17903
|
+
var analogResistanceSweepParameterProps = z89.object({
|
|
17890
17904
|
...createAnalogSweepCoordinateProps(resistanceSweepQuantity),
|
|
17891
|
-
parameterType:
|
|
17892
|
-
resistorRef:
|
|
17905
|
+
parameterType: z89.literal("resistance"),
|
|
17906
|
+
resistorRef: z89.string().min(1)
|
|
17893
17907
|
}).strict();
|
|
17894
|
-
var analogCapacitanceSweepParameterProps =
|
|
17908
|
+
var analogCapacitanceSweepParameterProps = z89.object({
|
|
17895
17909
|
...createAnalogSweepCoordinateProps(capacitanceSweepQuantity),
|
|
17896
|
-
parameterType:
|
|
17897
|
-
capacitorRef:
|
|
17910
|
+
parameterType: z89.literal("capacitance"),
|
|
17911
|
+
capacitorRef: z89.string().min(1)
|
|
17898
17912
|
}).strict();
|
|
17899
|
-
var analogInductanceSweepParameterProps =
|
|
17913
|
+
var analogInductanceSweepParameterProps = z89.object({
|
|
17900
17914
|
...createAnalogSweepCoordinateProps(inductanceSweepQuantity),
|
|
17901
|
-
parameterType:
|
|
17902
|
-
inductorRef:
|
|
17915
|
+
parameterType: z89.literal("inductance"),
|
|
17916
|
+
inductorRef: z89.string().min(1)
|
|
17903
17917
|
}).strict();
|
|
17904
|
-
var analogVoltageSweepParameterProps =
|
|
17918
|
+
var analogVoltageSweepParameterProps = z89.object({
|
|
17905
17919
|
...createAnalogSweepCoordinateProps(voltageSweepQuantity),
|
|
17906
|
-
parameterType:
|
|
17907
|
-
net:
|
|
17920
|
+
parameterType: z89.literal("voltage"),
|
|
17921
|
+
net: z89.string().min(1)
|
|
17908
17922
|
}).strict();
|
|
17909
|
-
var analogCurrentSweepParameterProps =
|
|
17923
|
+
var analogCurrentSweepParameterProps = z89.object({
|
|
17910
17924
|
...createAnalogSweepCoordinateProps(currentSweepQuantity),
|
|
17911
|
-
parameterType:
|
|
17912
|
-
currentSourceRef:
|
|
17925
|
+
parameterType: z89.literal("current"),
|
|
17926
|
+
currentSourceRef: z89.string().min(1)
|
|
17913
17927
|
}).strict();
|
|
17914
17928
|
var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
17915
17929
|
const hasExplicitSweepCoordinates = sweepCoordinates.values !== void 0;
|
|
@@ -17921,34 +17935,34 @@ var validateAnalogSweepCoordinates = (sweepCoordinates, context) => {
|
|
|
17921
17935
|
const hasRangeCoordinates = rangeCoordinateCount > 0;
|
|
17922
17936
|
if (hasExplicitSweepCoordinates === hasRangeCoordinates) {
|
|
17923
17937
|
context.addIssue({
|
|
17924
|
-
code:
|
|
17938
|
+
code: z89.ZodIssueCode.custom,
|
|
17925
17939
|
message: "Provide either values or start/stop/step"
|
|
17926
17940
|
});
|
|
17927
17941
|
return;
|
|
17928
17942
|
}
|
|
17929
17943
|
if (rangeCoordinateCount !== 0 && rangeCoordinateCount !== 3) {
|
|
17930
17944
|
context.addIssue({
|
|
17931
|
-
code:
|
|
17945
|
+
code: z89.ZodIssueCode.custom,
|
|
17932
17946
|
message: "start, stop, and step must be provided together"
|
|
17933
17947
|
});
|
|
17934
17948
|
return;
|
|
17935
17949
|
}
|
|
17936
17950
|
if (sweepCoordinates.step === 0) {
|
|
17937
17951
|
context.addIssue({
|
|
17938
|
-
code:
|
|
17952
|
+
code: z89.ZodIssueCode.custom,
|
|
17939
17953
|
path: ["step"],
|
|
17940
17954
|
message: "step must be nonzero"
|
|
17941
17955
|
});
|
|
17942
17956
|
}
|
|
17943
17957
|
if (sweepCoordinates.start !== void 0 && sweepCoordinates.stop !== void 0 && sweepCoordinates.step !== void 0 && Math.sign(sweepCoordinates.stop - sweepCoordinates.start) !== Math.sign(sweepCoordinates.step)) {
|
|
17944
17958
|
context.addIssue({
|
|
17945
|
-
code:
|
|
17959
|
+
code: z89.ZodIssueCode.custom,
|
|
17946
17960
|
path: ["step"],
|
|
17947
17961
|
message: "step must move from start toward stop"
|
|
17948
17962
|
});
|
|
17949
17963
|
}
|
|
17950
17964
|
};
|
|
17951
|
-
var analogSweepParameterProps =
|
|
17965
|
+
var analogSweepParameterProps = z89.discriminatedUnion("parameterType", [
|
|
17952
17966
|
analogResistanceSweepParameterProps,
|
|
17953
17967
|
analogCapacitanceSweepParameterProps,
|
|
17954
17968
|
analogInductanceSweepParameterProps,
|
|
@@ -17963,28 +17977,28 @@ expectTypesMatch(true);
|
|
|
17963
17977
|
expectTypesMatch(true);
|
|
17964
17978
|
|
|
17965
17979
|
// lib/components/autoroutingphase.ts
|
|
17966
|
-
import { z as
|
|
17967
|
-
var autoroutingPhaseProps =
|
|
17968
|
-
key:
|
|
17969
|
-
name:
|
|
17980
|
+
import { z as z90 } from "zod";
|
|
17981
|
+
var autoroutingPhaseProps = z90.object({
|
|
17982
|
+
key: z90.any().optional(),
|
|
17983
|
+
name: z90.string().optional(),
|
|
17970
17984
|
autorouter: autorouterProp.optional(),
|
|
17971
|
-
phaseIndex:
|
|
17985
|
+
phaseIndex: z90.number().optional(),
|
|
17972
17986
|
...routingTolerances.shape,
|
|
17973
|
-
region:
|
|
17974
|
-
shape:
|
|
17975
|
-
minX:
|
|
17976
|
-
maxX:
|
|
17977
|
-
minY:
|
|
17978
|
-
maxY:
|
|
17987
|
+
region: z90.object({
|
|
17988
|
+
shape: z90.literal("rect").optional(),
|
|
17989
|
+
minX: z90.number(),
|
|
17990
|
+
maxX: z90.number(),
|
|
17991
|
+
minY: z90.number(),
|
|
17992
|
+
maxY: z90.number()
|
|
17979
17993
|
}).optional(),
|
|
17980
|
-
connection:
|
|
17981
|
-
connections:
|
|
17982
|
-
reroute:
|
|
17994
|
+
connection: z90.string().optional(),
|
|
17995
|
+
connections: z90.array(z90.string()).optional(),
|
|
17996
|
+
reroute: z90.boolean().optional(),
|
|
17983
17997
|
...fanoutProps.shape
|
|
17984
17998
|
}).superRefine((value, ctx) => {
|
|
17985
17999
|
if (value.reroute !== void 0 && value.region === void 0 && value.connection === void 0 && value.connections === void 0) {
|
|
17986
18000
|
ctx.addIssue({
|
|
17987
|
-
code:
|
|
18001
|
+
code: z90.ZodIssueCode.custom,
|
|
17988
18002
|
message: "region, connection, or connections is required when reroute is provided",
|
|
17989
18003
|
path: ["region"]
|
|
17990
18004
|
});
|
|
@@ -17993,15 +18007,15 @@ var autoroutingPhaseProps = z88.object({
|
|
|
17993
18007
|
expectTypesMatch(true);
|
|
17994
18008
|
|
|
17995
18009
|
// lib/components/spicemodel.ts
|
|
17996
|
-
import { z as
|
|
17997
|
-
var spicemodelProps =
|
|
17998
|
-
source:
|
|
17999
|
-
spicePinMapping:
|
|
18010
|
+
import { z as z91 } from "zod";
|
|
18011
|
+
var spicemodelProps = z91.object({
|
|
18012
|
+
source: z91.string(),
|
|
18013
|
+
spicePinMapping: z91.record(z91.string(), z91.string()).optional()
|
|
18000
18014
|
});
|
|
18001
18015
|
expectTypesMatch(true);
|
|
18002
18016
|
|
|
18003
18017
|
// lib/components/transistor.ts
|
|
18004
|
-
import { z as
|
|
18018
|
+
import { z as z92 } from "zod";
|
|
18005
18019
|
var transistorPinsLabels = [
|
|
18006
18020
|
"pin1",
|
|
18007
18021
|
"pin2",
|
|
@@ -18014,7 +18028,7 @@ var transistorPinsLabels = [
|
|
|
18014
18028
|
"drain"
|
|
18015
18029
|
];
|
|
18016
18030
|
var transistorProps = commonComponentProps.extend({
|
|
18017
|
-
type:
|
|
18031
|
+
type: z92.enum(["npn", "pnp", "bjt", "jfet", "mosfet", "igbt"]),
|
|
18018
18032
|
connections: createConnectionsProp(transistorPinsLabels).optional()
|
|
18019
18033
|
});
|
|
18020
18034
|
var transistorPins = [
|
|
@@ -18028,7 +18042,7 @@ var transistorPins = [
|
|
|
18028
18042
|
expectTypesMatch(true);
|
|
18029
18043
|
|
|
18030
18044
|
// lib/components/mosfet.ts
|
|
18031
|
-
import { z as
|
|
18045
|
+
import { z as z93 } from "zod";
|
|
18032
18046
|
var mosfetPins = [
|
|
18033
18047
|
"pin1",
|
|
18034
18048
|
"drain",
|
|
@@ -18038,11 +18052,11 @@ var mosfetPins = [
|
|
|
18038
18052
|
"gate"
|
|
18039
18053
|
];
|
|
18040
18054
|
var mosfetProps = commonComponentProps.extend({
|
|
18041
|
-
channelType:
|
|
18042
|
-
mosfetMode:
|
|
18043
|
-
symbolDrainSide:
|
|
18044
|
-
symbolSourceSide:
|
|
18045
|
-
symbolGateSide:
|
|
18055
|
+
channelType: z93.enum(["n", "p"]),
|
|
18056
|
+
mosfetMode: z93.enum(["enhancement", "depletion"]),
|
|
18057
|
+
symbolDrainSide: z93.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18058
|
+
symbolSourceSide: z93.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18059
|
+
symbolGateSide: z93.enum(["left", "right", "top", "bottom"]).optional(),
|
|
18046
18060
|
connections: createConnectionsProp(mosfetPins).optional()
|
|
18047
18061
|
});
|
|
18048
18062
|
expectTypesMatch(true);
|
|
@@ -18064,29 +18078,29 @@ expectTypesMatch(true);
|
|
|
18064
18078
|
|
|
18065
18079
|
// lib/components/inductor.ts
|
|
18066
18080
|
import { inductance as inductance2 } from "circuit-json";
|
|
18067
|
-
import { z as
|
|
18081
|
+
import { z as z95 } from "zod";
|
|
18068
18082
|
var inductorPins = lrPins;
|
|
18069
18083
|
var inductorProps = commonComponentProps.extend({
|
|
18070
18084
|
inductance: inductance2,
|
|
18071
|
-
maxCurrentRating:
|
|
18085
|
+
maxCurrentRating: z95.union([z95.string(), z95.number()]).optional(),
|
|
18072
18086
|
schOrientation: schematicOrientation.optional(),
|
|
18073
18087
|
connections: createConnectionsProp(inductorPins).optional()
|
|
18074
18088
|
});
|
|
18075
18089
|
expectTypesMatch(true);
|
|
18076
18090
|
|
|
18077
18091
|
// lib/components/internal-circuit.ts
|
|
18078
|
-
import { z as
|
|
18079
|
-
var internalCircuitProps =
|
|
18080
|
-
children:
|
|
18092
|
+
import { z as z96 } from "zod";
|
|
18093
|
+
var internalCircuitProps = z96.object({
|
|
18094
|
+
children: z96.custom().optional()
|
|
18081
18095
|
});
|
|
18082
18096
|
expectTypesMatch(
|
|
18083
18097
|
true
|
|
18084
18098
|
);
|
|
18085
18099
|
|
|
18086
18100
|
// lib/components/diode.ts
|
|
18087
|
-
import { z as
|
|
18101
|
+
import { z as z97 } from "zod";
|
|
18088
18102
|
var diodePins = lrPolarPins;
|
|
18089
|
-
var diodeConnectionKeys =
|
|
18103
|
+
var diodeConnectionKeys = z97.enum([
|
|
18090
18104
|
"anode",
|
|
18091
18105
|
"cathode",
|
|
18092
18106
|
"pin1",
|
|
@@ -18094,13 +18108,13 @@ var diodeConnectionKeys = z95.enum([
|
|
|
18094
18108
|
"pos",
|
|
18095
18109
|
"neg"
|
|
18096
18110
|
]);
|
|
18097
|
-
var connectionTarget3 =
|
|
18098
|
-
var connectionsProp2 =
|
|
18099
|
-
var diodePinLabelsProp =
|
|
18100
|
-
|
|
18101
|
-
schematicPinLabel.or(
|
|
18111
|
+
var connectionTarget3 = z97.string().or(z97.array(z97.string()).readonly()).or(z97.array(z97.string()));
|
|
18112
|
+
var connectionsProp2 = z97.record(diodeConnectionKeys, connectionTarget3);
|
|
18113
|
+
var diodePinLabelsProp = z97.record(
|
|
18114
|
+
z97.enum(diodePins),
|
|
18115
|
+
schematicPinLabel.or(z97.array(schematicPinLabel).readonly()).or(z97.array(schematicPinLabel))
|
|
18102
18116
|
);
|
|
18103
|
-
var diodeVariant =
|
|
18117
|
+
var diodeVariant = z97.enum([
|
|
18104
18118
|
"standard",
|
|
18105
18119
|
"schottky",
|
|
18106
18120
|
"zener",
|
|
@@ -18111,12 +18125,12 @@ var diodeVariant = z95.enum([
|
|
|
18111
18125
|
var diodeProps = commonComponentProps.extend({
|
|
18112
18126
|
connections: connectionsProp2.optional(),
|
|
18113
18127
|
variant: diodeVariant.optional().default("standard"),
|
|
18114
|
-
standard:
|
|
18115
|
-
schottky:
|
|
18116
|
-
zener:
|
|
18117
|
-
avalanche:
|
|
18118
|
-
photo:
|
|
18119
|
-
tvs:
|
|
18128
|
+
standard: z97.boolean().optional(),
|
|
18129
|
+
schottky: z97.boolean().optional(),
|
|
18130
|
+
zener: z97.boolean().optional(),
|
|
18131
|
+
avalanche: z97.boolean().optional(),
|
|
18132
|
+
photo: z97.boolean().optional(),
|
|
18133
|
+
tvs: z97.boolean().optional(),
|
|
18120
18134
|
schOrientation: schematicOrientation.optional(),
|
|
18121
18135
|
pinLabels: diodePinLabelsProp.optional()
|
|
18122
18136
|
}).superRefine((data, ctx) => {
|
|
@@ -18130,11 +18144,11 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18130
18144
|
].filter(Boolean).length;
|
|
18131
18145
|
if (enabledFlags > 1) {
|
|
18132
18146
|
ctx.addIssue({
|
|
18133
|
-
code:
|
|
18147
|
+
code: z97.ZodIssueCode.custom,
|
|
18134
18148
|
message: "Exactly one diode variant must be enabled",
|
|
18135
18149
|
path: []
|
|
18136
18150
|
});
|
|
18137
|
-
return
|
|
18151
|
+
return z97.INVALID;
|
|
18138
18152
|
}
|
|
18139
18153
|
}).transform((data) => {
|
|
18140
18154
|
const result = {
|
|
@@ -18180,44 +18194,44 @@ var diodeProps = commonComponentProps.extend({
|
|
|
18180
18194
|
expectTypesMatch(true);
|
|
18181
18195
|
|
|
18182
18196
|
// lib/components/led.ts
|
|
18183
|
-
import { z as
|
|
18184
|
-
var legacyNumericLedPinLabelsProp =
|
|
18185
|
-
|
|
18186
|
-
schematicPinLabel.or(
|
|
18197
|
+
import { z as z98 } from "zod";
|
|
18198
|
+
var legacyNumericLedPinLabelsProp = z98.record(
|
|
18199
|
+
z98.enum(["1", "2"]),
|
|
18200
|
+
schematicPinLabel.or(z98.array(schematicPinLabel).readonly()).or(z98.array(schematicPinLabel))
|
|
18187
18201
|
).transform((pinLabels) => ({
|
|
18188
18202
|
...pinLabels["1"] === void 0 ? {} : { pin1: pinLabels["1"] },
|
|
18189
18203
|
...pinLabels["2"] === void 0 ? {} : { pin2: pinLabels["2"] }
|
|
18190
18204
|
}));
|
|
18191
18205
|
var ledProps = commonComponentProps.extend({
|
|
18192
|
-
color:
|
|
18193
|
-
wavelength:
|
|
18194
|
-
schDisplayValue:
|
|
18206
|
+
color: z98.string().optional(),
|
|
18207
|
+
wavelength: z98.string().optional(),
|
|
18208
|
+
schDisplayValue: z98.string().optional(),
|
|
18195
18209
|
schOrientation: schematicOrientation.optional(),
|
|
18196
18210
|
// Numeric keys are accepted for compatibility with legacy generated LED
|
|
18197
18211
|
// wrappers, then normalized to the canonical pin1/pin2 representation.
|
|
18198
18212
|
pinLabels: diodePinLabelsProp.or(legacyNumericLedPinLabelsProp).optional(),
|
|
18199
18213
|
connections: createConnectionsProp(lrPolarPins).optional(),
|
|
18200
|
-
laser:
|
|
18214
|
+
laser: z98.boolean().optional()
|
|
18201
18215
|
});
|
|
18202
18216
|
var ledPins = lrPolarPins;
|
|
18203
18217
|
|
|
18204
18218
|
// lib/components/switch.ts
|
|
18205
18219
|
import { ms as ms3, frequency as frequency4 } from "circuit-json";
|
|
18206
|
-
import { z as
|
|
18220
|
+
import { z as z99 } from "zod";
|
|
18207
18221
|
var switchProps = commonComponentProps.extend({
|
|
18208
|
-
type:
|
|
18209
|
-
isNormallyClosed:
|
|
18210
|
-
spst:
|
|
18211
|
-
spdt:
|
|
18212
|
-
dpst:
|
|
18213
|
-
dpdt:
|
|
18222
|
+
type: z99.enum(["spst", "spdt", "dpst", "dpdt"]).optional(),
|
|
18223
|
+
isNormallyClosed: z99.boolean().optional().default(false),
|
|
18224
|
+
spst: z99.boolean().optional(),
|
|
18225
|
+
spdt: z99.boolean().optional(),
|
|
18226
|
+
dpst: z99.boolean().optional(),
|
|
18227
|
+
dpdt: z99.boolean().optional(),
|
|
18214
18228
|
pinLabels: pinLabelsProp.optional(),
|
|
18215
18229
|
simSwitchFrequency: frequency4.optional(),
|
|
18216
18230
|
simCloseAt: ms3.optional(),
|
|
18217
18231
|
simOpenAt: ms3.optional(),
|
|
18218
|
-
simStartClosed:
|
|
18219
|
-
simStartOpen:
|
|
18220
|
-
connections:
|
|
18232
|
+
simStartClosed: z99.boolean().optional(),
|
|
18233
|
+
simStartOpen: z99.boolean().optional(),
|
|
18234
|
+
connections: z99.custom().pipe(z99.record(z99.string(), connectionTarget)).optional()
|
|
18221
18235
|
}).transform((props) => {
|
|
18222
18236
|
const updatedProps = { ...props };
|
|
18223
18237
|
if (updatedProps.dpdt) {
|
|
@@ -18249,33 +18263,33 @@ expectTypesMatch(true);
|
|
|
18249
18263
|
|
|
18250
18264
|
// lib/components/fabrication-note-text.ts
|
|
18251
18265
|
import { length as length4 } from "circuit-json";
|
|
18252
|
-
import { z as
|
|
18266
|
+
import { z as z100 } from "zod";
|
|
18253
18267
|
var fabricationNoteTextProps = pcbLayoutProps.extend({
|
|
18254
|
-
text:
|
|
18255
|
-
anchorAlignment:
|
|
18256
|
-
font:
|
|
18268
|
+
text: z100.string(),
|
|
18269
|
+
anchorAlignment: z100.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
18270
|
+
font: z100.enum(["tscircuit2024"]).optional(),
|
|
18257
18271
|
fontSize: length4.optional(),
|
|
18258
|
-
color:
|
|
18272
|
+
color: z100.string().optional()
|
|
18259
18273
|
});
|
|
18260
18274
|
expectTypesMatch(true);
|
|
18261
18275
|
|
|
18262
18276
|
// lib/components/fabrication-note-rect.ts
|
|
18263
18277
|
import { distance as distance23 } from "circuit-json";
|
|
18264
|
-
import { z as
|
|
18278
|
+
import { z as z101 } from "zod";
|
|
18265
18279
|
var fabricationNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18266
18280
|
width: distance23,
|
|
18267
18281
|
height: distance23,
|
|
18268
18282
|
strokeWidth: distance23.optional(),
|
|
18269
|
-
isFilled:
|
|
18270
|
-
hasStroke:
|
|
18271
|
-
isStrokeDashed:
|
|
18272
|
-
color:
|
|
18283
|
+
isFilled: z101.boolean().optional(),
|
|
18284
|
+
hasStroke: z101.boolean().optional(),
|
|
18285
|
+
isStrokeDashed: z101.boolean().optional(),
|
|
18286
|
+
color: z101.string().optional(),
|
|
18273
18287
|
cornerRadius: distance23.optional()
|
|
18274
18288
|
});
|
|
18275
18289
|
|
|
18276
18290
|
// lib/components/fabrication-note-path.ts
|
|
18277
18291
|
import { length as length5, route_hint_point as route_hint_point3 } from "circuit-json";
|
|
18278
|
-
import { z as
|
|
18292
|
+
import { z as z102 } from "zod";
|
|
18279
18293
|
var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
18280
18294
|
pcbLeftEdgeX: true,
|
|
18281
18295
|
pcbRightEdgeX: true,
|
|
@@ -18287,15 +18301,15 @@ var fabricationNotePathProps = pcbLayoutProps.omit({
|
|
|
18287
18301
|
pcbOffsetY: true,
|
|
18288
18302
|
pcbRotation: true
|
|
18289
18303
|
}).extend({
|
|
18290
|
-
route:
|
|
18304
|
+
route: z102.array(route_hint_point3),
|
|
18291
18305
|
strokeWidth: length5.optional(),
|
|
18292
|
-
color:
|
|
18306
|
+
color: z102.string().optional()
|
|
18293
18307
|
});
|
|
18294
18308
|
|
|
18295
18309
|
// lib/components/fabrication-note-dimension.ts
|
|
18296
18310
|
import { distance as distance24, length as length6 } from "circuit-json";
|
|
18297
|
-
import { z as
|
|
18298
|
-
var dimensionTarget =
|
|
18311
|
+
import { z as z103 } from "zod";
|
|
18312
|
+
var dimensionTarget = z103.union([z103.string(), point]);
|
|
18299
18313
|
var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
18300
18314
|
pcbLeftEdgeX: true,
|
|
18301
18315
|
pcbRightEdgeX: true,
|
|
@@ -18309,54 +18323,54 @@ var fabricationNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
18309
18323
|
}).extend({
|
|
18310
18324
|
from: dimensionTarget,
|
|
18311
18325
|
to: dimensionTarget,
|
|
18312
|
-
text:
|
|
18326
|
+
text: z103.string().optional(),
|
|
18313
18327
|
offset: distance24.optional(),
|
|
18314
|
-
font:
|
|
18328
|
+
font: z103.enum(["tscircuit2024"]).optional(),
|
|
18315
18329
|
fontSize: length6.optional(),
|
|
18316
|
-
color:
|
|
18330
|
+
color: z103.string().optional(),
|
|
18317
18331
|
arrowSize: distance24.optional(),
|
|
18318
|
-
units:
|
|
18319
|
-
outerEdgeToEdge:
|
|
18320
|
-
centerToCenter:
|
|
18321
|
-
innerEdgeToEdge:
|
|
18332
|
+
units: z103.enum(["in", "mm"]).optional(),
|
|
18333
|
+
outerEdgeToEdge: z103.literal(true).optional(),
|
|
18334
|
+
centerToCenter: z103.literal(true).optional(),
|
|
18335
|
+
innerEdgeToEdge: z103.literal(true).optional()
|
|
18322
18336
|
});
|
|
18323
18337
|
expectTypesMatch(true);
|
|
18324
18338
|
|
|
18325
18339
|
// lib/components/pcb-trace.ts
|
|
18326
18340
|
import { distance as distance25, route_hint_point as route_hint_point4 } from "circuit-json";
|
|
18327
|
-
import { z as
|
|
18328
|
-
var pcbTraceProps =
|
|
18329
|
-
layer:
|
|
18341
|
+
import { z as z104 } from "zod";
|
|
18342
|
+
var pcbTraceProps = z104.object({
|
|
18343
|
+
layer: z104.string().optional(),
|
|
18330
18344
|
thickness: distance25.optional(),
|
|
18331
|
-
route:
|
|
18345
|
+
route: z104.array(route_hint_point4)
|
|
18332
18346
|
});
|
|
18333
18347
|
|
|
18334
18348
|
// lib/components/via.ts
|
|
18335
18349
|
import { distance as distance26, layer_ref as layer_ref8 } from "circuit-json";
|
|
18336
|
-
import { z as
|
|
18350
|
+
import { z as z105 } from "zod";
|
|
18337
18351
|
var viaProps = commonLayoutProps.extend({
|
|
18338
|
-
name:
|
|
18352
|
+
name: z105.string().optional(),
|
|
18339
18353
|
fromLayer: layer_ref8.optional(),
|
|
18340
18354
|
toLayer: layer_ref8.optional(),
|
|
18341
18355
|
holeDiameter: distance26.optional(),
|
|
18342
18356
|
outerDiameter: distance26.optional(),
|
|
18343
|
-
layers:
|
|
18344
|
-
connectsTo:
|
|
18345
|
-
netIsAssignable:
|
|
18357
|
+
layers: z105.array(layer_ref8).optional(),
|
|
18358
|
+
connectsTo: z105.string().or(z105.array(z105.string())).optional(),
|
|
18359
|
+
netIsAssignable: z105.boolean().optional()
|
|
18346
18360
|
});
|
|
18347
18361
|
expectTypesMatch(true);
|
|
18348
18362
|
|
|
18349
18363
|
// lib/components/testpoint.ts
|
|
18350
18364
|
import { distance as distance27 } from "circuit-json";
|
|
18351
|
-
import { z as
|
|
18365
|
+
import { z as z106 } from "zod";
|
|
18352
18366
|
var testpointPins = ["pin1"];
|
|
18353
|
-
var testpointConnectionsProp =
|
|
18367
|
+
var testpointConnectionsProp = z106.object({
|
|
18354
18368
|
pin1: connectionTarget
|
|
18355
18369
|
}).strict();
|
|
18356
18370
|
var testpointProps = commonComponentProps.extend({
|
|
18357
18371
|
connections: testpointConnectionsProp.optional(),
|
|
18358
|
-
footprintVariant:
|
|
18359
|
-
padShape:
|
|
18372
|
+
footprintVariant: z106.enum(["pad", "through_hole"]).optional(),
|
|
18373
|
+
padShape: z106.enum(["rect", "circle"]).optional().default("circle"),
|
|
18360
18374
|
padDiameter: distance27.optional(),
|
|
18361
18375
|
holeDiameter: distance27.optional(),
|
|
18362
18376
|
width: distance27.optional(),
|
|
@@ -18368,30 +18382,30 @@ var testpointProps = commonComponentProps.extend({
|
|
|
18368
18382
|
expectTypesMatch(true);
|
|
18369
18383
|
|
|
18370
18384
|
// lib/components/breakoutpoint.ts
|
|
18371
|
-
import { z as
|
|
18385
|
+
import { z as z107 } from "zod";
|
|
18372
18386
|
var breakoutPointProps = pcbLayoutProps.omit({ pcbRotation: true, layer: true }).extend({
|
|
18373
|
-
connection:
|
|
18387
|
+
connection: z107.string()
|
|
18374
18388
|
});
|
|
18375
18389
|
expectTypesMatch(true);
|
|
18376
18390
|
|
|
18377
18391
|
// lib/components/pcb-keepout.ts
|
|
18378
18392
|
import { distance as distance28, layer_ref as layer_ref9 } from "circuit-json";
|
|
18379
|
-
import { z as
|
|
18380
|
-
var pcbKeepoutProps =
|
|
18393
|
+
import { z as z108 } from "zod";
|
|
18394
|
+
var pcbKeepoutProps = z108.union([
|
|
18381
18395
|
pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18382
|
-
shape:
|
|
18396
|
+
shape: z108.literal("circle"),
|
|
18383
18397
|
radius: distance28,
|
|
18384
|
-
layers:
|
|
18385
|
-
excludeRefs:
|
|
18398
|
+
layers: z108.array(layer_ref9).optional(),
|
|
18399
|
+
excludeRefs: z108.array(z108.string()).optional().describe(
|
|
18386
18400
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18387
18401
|
)
|
|
18388
18402
|
}),
|
|
18389
18403
|
pcbLayoutProps.extend({
|
|
18390
|
-
shape:
|
|
18404
|
+
shape: z108.literal("rect"),
|
|
18391
18405
|
width: distance28,
|
|
18392
18406
|
height: distance28,
|
|
18393
|
-
layers:
|
|
18394
|
-
excludeRefs:
|
|
18407
|
+
layers: z108.array(layer_ref9).optional(),
|
|
18408
|
+
excludeRefs: z108.array(z108.string()).optional().describe(
|
|
18395
18409
|
'Component selectors excluded from the keepout, such as ".ANT1"'
|
|
18396
18410
|
)
|
|
18397
18411
|
})
|
|
@@ -18399,20 +18413,20 @@ var pcbKeepoutProps = z106.union([
|
|
|
18399
18413
|
|
|
18400
18414
|
// lib/components/courtyard-rect.ts
|
|
18401
18415
|
import { distance as distance29 } from "circuit-json";
|
|
18402
|
-
import { z as
|
|
18416
|
+
import { z as z109 } from "zod";
|
|
18403
18417
|
var courtyardRectProps = pcbLayoutProps.extend({
|
|
18404
18418
|
width: distance29,
|
|
18405
18419
|
height: distance29,
|
|
18406
18420
|
strokeWidth: distance29.optional(),
|
|
18407
|
-
isFilled:
|
|
18408
|
-
hasStroke:
|
|
18409
|
-
isStrokeDashed:
|
|
18410
|
-
color:
|
|
18421
|
+
isFilled: z109.boolean().optional(),
|
|
18422
|
+
hasStroke: z109.boolean().optional(),
|
|
18423
|
+
isStrokeDashed: z109.boolean().optional(),
|
|
18424
|
+
color: z109.string().optional()
|
|
18411
18425
|
});
|
|
18412
18426
|
|
|
18413
18427
|
// lib/components/courtyard-outline.ts
|
|
18414
18428
|
import { length as length7 } from "circuit-json";
|
|
18415
|
-
import { z as
|
|
18429
|
+
import { z as z110 } from "zod";
|
|
18416
18430
|
var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
18417
18431
|
pcbLeftEdgeX: true,
|
|
18418
18432
|
pcbRightEdgeX: true,
|
|
@@ -18424,11 +18438,11 @@ var courtyardOutlineProps = pcbLayoutProps.omit({
|
|
|
18424
18438
|
pcbOffsetY: true,
|
|
18425
18439
|
pcbRotation: true
|
|
18426
18440
|
}).extend({
|
|
18427
|
-
outline:
|
|
18441
|
+
outline: z110.array(point),
|
|
18428
18442
|
strokeWidth: length7.optional(),
|
|
18429
|
-
isClosed:
|
|
18430
|
-
isStrokeDashed:
|
|
18431
|
-
color:
|
|
18443
|
+
isClosed: z110.boolean().optional(),
|
|
18444
|
+
isStrokeDashed: z110.boolean().optional(),
|
|
18445
|
+
color: z110.string().optional()
|
|
18432
18446
|
});
|
|
18433
18447
|
|
|
18434
18448
|
// lib/components/courtyard-circle.ts
|
|
@@ -18448,13 +18462,13 @@ var courtyardPillProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18448
18462
|
});
|
|
18449
18463
|
|
|
18450
18464
|
// lib/components/copper-pour.ts
|
|
18451
|
-
import { z as
|
|
18465
|
+
import { z as z113 } from "zod";
|
|
18452
18466
|
import { layer_ref as layer_ref10 } from "circuit-json";
|
|
18453
|
-
var copperPourProps =
|
|
18454
|
-
name:
|
|
18467
|
+
var copperPourProps = z113.object({
|
|
18468
|
+
name: z113.string().optional(),
|
|
18455
18469
|
layer: layer_ref10,
|
|
18456
|
-
connectsTo:
|
|
18457
|
-
unbroken:
|
|
18470
|
+
connectsTo: z113.string(),
|
|
18471
|
+
unbroken: z113.boolean().optional().describe(
|
|
18458
18472
|
"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."
|
|
18459
18473
|
),
|
|
18460
18474
|
padMargin: distance.optional(),
|
|
@@ -18462,24 +18476,24 @@ var copperPourProps = z111.object({
|
|
|
18462
18476
|
clearance: distance.optional(),
|
|
18463
18477
|
boardEdgeMargin: distance.optional(),
|
|
18464
18478
|
cutoutMargin: distance.optional(),
|
|
18465
|
-
useThermalReliefs:
|
|
18466
|
-
outline:
|
|
18467
|
-
coveredWithSolderMask:
|
|
18479
|
+
useThermalReliefs: z113.boolean().optional(),
|
|
18480
|
+
outline: z113.array(point).optional(),
|
|
18481
|
+
coveredWithSolderMask: z113.boolean().optional().default(true)
|
|
18468
18482
|
});
|
|
18469
18483
|
expectTypesMatch(true);
|
|
18470
18484
|
|
|
18471
18485
|
// lib/components/cadassembly.ts
|
|
18472
18486
|
import { layer_ref as layer_ref11 } from "circuit-json";
|
|
18473
|
-
import { z as
|
|
18474
|
-
var cadassemblyProps =
|
|
18487
|
+
import { z as z114 } from "zod";
|
|
18488
|
+
var cadassemblyProps = z114.object({
|
|
18475
18489
|
originalLayer: layer_ref11.default("top").optional(),
|
|
18476
|
-
children:
|
|
18490
|
+
children: z114.any().optional()
|
|
18477
18491
|
});
|
|
18478
18492
|
expectTypesMatch(true);
|
|
18479
18493
|
|
|
18480
18494
|
// lib/components/cadmodel.ts
|
|
18481
|
-
import { z as
|
|
18482
|
-
var pcbPosition =
|
|
18495
|
+
import { z as z115 } from "zod";
|
|
18496
|
+
var pcbPosition = z115.object({
|
|
18483
18497
|
pcbX: pcbCoordinate.optional(),
|
|
18484
18498
|
pcbY: pcbCoordinate.optional(),
|
|
18485
18499
|
pcbLeftEdgeX: pcbCoordinate.optional(),
|
|
@@ -18496,7 +18510,7 @@ var cadModelBaseWithUrl = cadModelBase.extend({
|
|
|
18496
18510
|
});
|
|
18497
18511
|
var cadModelObject = cadModelBaseWithUrl.merge(pcbPosition);
|
|
18498
18512
|
expectTypesMatch(true);
|
|
18499
|
-
var cadmodelProps =
|
|
18513
|
+
var cadmodelProps = z115.union([z115.null(), url, cadModelObject]);
|
|
18500
18514
|
|
|
18501
18515
|
// lib/components/power-source.ts
|
|
18502
18516
|
import { voltage as voltage5 } from "circuit-json";
|
|
@@ -18506,9 +18520,9 @@ var powerSourceProps = commonComponentProps.extend({
|
|
|
18506
18520
|
|
|
18507
18521
|
// lib/components/voltagesource.ts
|
|
18508
18522
|
import { frequency as frequency5, ms as ms4, rotation as rotation5, voltage as voltage6 } from "circuit-json";
|
|
18509
|
-
import { z as
|
|
18523
|
+
import { z as z116 } from "zod";
|
|
18510
18524
|
var voltageSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18511
|
-
var percentage =
|
|
18525
|
+
var percentage = z116.union([z116.string(), z116.number()]).transform((val) => {
|
|
18512
18526
|
if (typeof val === "string") {
|
|
18513
18527
|
if (val.endsWith("%")) {
|
|
18514
18528
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18517,13 +18531,13 @@ var percentage = z114.union([z114.string(), z114.number()]).transform((val) => {
|
|
|
18517
18531
|
}
|
|
18518
18532
|
return val;
|
|
18519
18533
|
}).pipe(
|
|
18520
|
-
|
|
18534
|
+
z116.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18521
18535
|
);
|
|
18522
18536
|
var voltageSourceProps = commonComponentProps.extend({
|
|
18523
18537
|
voltage: voltage6.optional(),
|
|
18524
18538
|
frequency: frequency5.optional(),
|
|
18525
18539
|
peakToPeakVoltage: voltage6.optional(),
|
|
18526
|
-
waveShape:
|
|
18540
|
+
waveShape: z116.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18527
18541
|
phase: rotation5.optional(),
|
|
18528
18542
|
dutyCycle: percentage.optional(),
|
|
18529
18543
|
pulseDelay: ms4.optional(),
|
|
@@ -18540,9 +18554,9 @@ expectTypesMatch(true);
|
|
|
18540
18554
|
|
|
18541
18555
|
// lib/components/currentsource.ts
|
|
18542
18556
|
import { frequency as frequency6, rotation as rotation6, current as current3 } from "circuit-json";
|
|
18543
|
-
import { z as
|
|
18557
|
+
import { z as z117 } from "zod";
|
|
18544
18558
|
var currentSourcePinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18545
|
-
var percentage2 =
|
|
18559
|
+
var percentage2 = z117.union([z117.string(), z117.number()]).transform((val) => {
|
|
18546
18560
|
if (typeof val === "string") {
|
|
18547
18561
|
if (val.endsWith("%")) {
|
|
18548
18562
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -18551,13 +18565,13 @@ var percentage2 = z115.union([z115.string(), z115.number()]).transform((val) =>
|
|
|
18551
18565
|
}
|
|
18552
18566
|
return val;
|
|
18553
18567
|
}).pipe(
|
|
18554
|
-
|
|
18568
|
+
z117.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
18555
18569
|
);
|
|
18556
18570
|
var currentSourceProps = commonComponentProps.extend({
|
|
18557
18571
|
current: current3.optional(),
|
|
18558
18572
|
frequency: frequency6.optional(),
|
|
18559
18573
|
peakToPeakCurrent: current3.optional(),
|
|
18560
|
-
waveShape:
|
|
18574
|
+
waveShape: z117.enum(["sinewave", "square", "triangle", "sawtooth"]).optional(),
|
|
18561
18575
|
phase: rotation6.optional(),
|
|
18562
18576
|
dutyCycle: percentage2.optional(),
|
|
18563
18577
|
acMagnitude: current3.optional(),
|
|
@@ -18568,21 +18582,21 @@ var currentSourcePins = lrPolarPins;
|
|
|
18568
18582
|
expectTypesMatch(true);
|
|
18569
18583
|
|
|
18570
18584
|
// lib/components/voltageprobe.ts
|
|
18571
|
-
import { z as
|
|
18585
|
+
import { z as z118 } from "zod";
|
|
18572
18586
|
var voltageProbeProps = commonComponentProps.omit({ name: true }).extend({
|
|
18573
|
-
name:
|
|
18574
|
-
connectsTo:
|
|
18575
|
-
referenceTo:
|
|
18576
|
-
color:
|
|
18577
|
-
graphDisplayName:
|
|
18578
|
-
graphCenter:
|
|
18579
|
-
graphVerticalOffset:
|
|
18580
|
-
graphVoltagePerDiv:
|
|
18587
|
+
name: z118.string().optional(),
|
|
18588
|
+
connectsTo: z118.string(),
|
|
18589
|
+
referenceTo: z118.string().optional(),
|
|
18590
|
+
color: z118.string().optional(),
|
|
18591
|
+
graphDisplayName: z118.string().optional(),
|
|
18592
|
+
graphCenter: z118.number().optional(),
|
|
18593
|
+
graphVerticalOffset: z118.number().or(z118.string()).optional(),
|
|
18594
|
+
graphVoltagePerDiv: z118.number().or(z118.string()).optional()
|
|
18581
18595
|
});
|
|
18582
18596
|
expectTypesMatch(true);
|
|
18583
18597
|
|
|
18584
18598
|
// lib/components/ammeter.ts
|
|
18585
|
-
import { z as
|
|
18599
|
+
import { z as z119 } from "zod";
|
|
18586
18600
|
var ammeterPinLabels = ["pin1", "pin2", "pos", "neg"];
|
|
18587
18601
|
var hasAmmeterConnectionPair = (connections) => {
|
|
18588
18602
|
return connections.pos !== void 0 && connections.neg !== void 0 || connections.pin1 !== void 0 && connections.pin2 !== void 0;
|
|
@@ -18592,64 +18606,64 @@ var ammeterProps = commonComponentProps.extend({
|
|
|
18592
18606
|
hasAmmeterConnectionPair,
|
|
18593
18607
|
"Ammeter connections must include either pos/neg or pin1/pin2"
|
|
18594
18608
|
),
|
|
18595
|
-
color:
|
|
18596
|
-
graphDisplayName:
|
|
18597
|
-
graphCenter:
|
|
18598
|
-
graphVerticalOffset:
|
|
18599
|
-
graphCurrentPerDiv:
|
|
18609
|
+
color: z119.string().optional(),
|
|
18610
|
+
graphDisplayName: z119.string().optional(),
|
|
18611
|
+
graphCenter: z119.number().optional(),
|
|
18612
|
+
graphVerticalOffset: z119.number().or(z119.string()).optional(),
|
|
18613
|
+
graphCurrentPerDiv: z119.number().or(z119.string()).optional()
|
|
18600
18614
|
});
|
|
18601
18615
|
var ammeterPins = ammeterPinLabels;
|
|
18602
18616
|
expectTypesMatch(true);
|
|
18603
18617
|
|
|
18604
18618
|
// lib/components/schematic-arc.ts
|
|
18605
18619
|
import { distance as distance32, point as point5, rotation as rotation7 } from "circuit-json";
|
|
18606
|
-
import { z as
|
|
18607
|
-
var schematicArcProps =
|
|
18620
|
+
import { z as z120 } from "zod";
|
|
18621
|
+
var schematicArcProps = z120.object({
|
|
18608
18622
|
center: point5,
|
|
18609
18623
|
radius: distance32,
|
|
18610
18624
|
startAngleDegrees: rotation7,
|
|
18611
18625
|
endAngleDegrees: rotation7,
|
|
18612
|
-
direction:
|
|
18626
|
+
direction: z120.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
18613
18627
|
strokeWidth: distance32.optional(),
|
|
18614
|
-
color:
|
|
18615
|
-
isDashed:
|
|
18628
|
+
color: z120.string().optional(),
|
|
18629
|
+
isDashed: z120.boolean().optional().default(false)
|
|
18616
18630
|
});
|
|
18617
18631
|
expectTypesMatch(true);
|
|
18618
18632
|
|
|
18619
18633
|
// lib/components/toolingrail.ts
|
|
18620
|
-
import { z as
|
|
18621
|
-
var toolingrailProps =
|
|
18622
|
-
children:
|
|
18634
|
+
import { z as z121 } from "zod";
|
|
18635
|
+
var toolingrailProps = z121.object({
|
|
18636
|
+
children: z121.any().optional()
|
|
18623
18637
|
});
|
|
18624
18638
|
expectTypesMatch(true);
|
|
18625
18639
|
|
|
18626
18640
|
// lib/components/schematic-box.ts
|
|
18627
18641
|
import { distance as distance33 } from "circuit-json";
|
|
18628
|
-
import { z as
|
|
18629
|
-
var schematicBoxProps =
|
|
18630
|
-
name:
|
|
18631
|
-
chipRef:
|
|
18642
|
+
import { z as z122 } from "zod";
|
|
18643
|
+
var schematicBoxProps = z122.object({
|
|
18644
|
+
name: z122.string().optional(),
|
|
18645
|
+
chipRef: z122.string().optional(),
|
|
18632
18646
|
pinLabels: pinLabelsProp.optional(),
|
|
18633
18647
|
schPinArrangement: schematicPinArrangement.optional(),
|
|
18634
18648
|
schPinStyle: schematicPinStyle.optional(),
|
|
18635
18649
|
schX: distance33.optional(),
|
|
18636
18650
|
schY: distance33.optional(),
|
|
18637
|
-
schSectionName:
|
|
18638
|
-
schSheetName:
|
|
18651
|
+
schSectionName: z122.string().optional(),
|
|
18652
|
+
schSheetName: z122.string().optional(),
|
|
18639
18653
|
width: distance33.optional(),
|
|
18640
18654
|
height: distance33.optional(),
|
|
18641
|
-
overlay:
|
|
18655
|
+
overlay: z122.array(z122.string()).optional(),
|
|
18642
18656
|
padding: distance33.optional(),
|
|
18643
18657
|
paddingLeft: distance33.optional(),
|
|
18644
18658
|
paddingRight: distance33.optional(),
|
|
18645
18659
|
paddingTop: distance33.optional(),
|
|
18646
18660
|
paddingBottom: distance33.optional(),
|
|
18647
|
-
title:
|
|
18661
|
+
title: z122.string().optional(),
|
|
18648
18662
|
titleAlignment: ninePointAnchor.default("top_left"),
|
|
18649
|
-
titleColor:
|
|
18663
|
+
titleColor: z122.string().optional(),
|
|
18650
18664
|
titleFontSize: distance33.optional(),
|
|
18651
|
-
titleInside:
|
|
18652
|
-
strokeStyle:
|
|
18665
|
+
titleInside: z122.boolean().default(false),
|
|
18666
|
+
strokeStyle: z122.enum(["solid", "dashed"]).default("solid")
|
|
18653
18667
|
}).refine(
|
|
18654
18668
|
(elm) => elm.width !== void 0 && elm.height !== void 0 || Array.isArray(elm.overlay) && elm.overlay.length > 0,
|
|
18655
18669
|
{
|
|
@@ -18665,21 +18679,21 @@ expectTypesMatch(true);
|
|
|
18665
18679
|
|
|
18666
18680
|
// lib/components/schematic-symbol.ts
|
|
18667
18681
|
import { rotation as rotation8 } from "circuit-json";
|
|
18668
|
-
import { z as
|
|
18669
|
-
var schematicSymbolConnections =
|
|
18682
|
+
import { z as z123 } from "zod";
|
|
18683
|
+
var schematicSymbolConnections = z123.custom().pipe(z123.record(z123.string(), connectionTarget)).refine((value) => Object.keys(value).length > 0, {
|
|
18670
18684
|
message: "connections must map at least one schematic symbol port"
|
|
18671
18685
|
});
|
|
18672
|
-
var schematicSymbolProps =
|
|
18673
|
-
name:
|
|
18674
|
-
displayName:
|
|
18675
|
-
chipRef:
|
|
18676
|
-
symbolName:
|
|
18686
|
+
var schematicSymbolProps = z123.object({
|
|
18687
|
+
name: z123.string().min(1),
|
|
18688
|
+
displayName: z123.string().optional(),
|
|
18689
|
+
chipRef: z123.string().min(1).optional(),
|
|
18690
|
+
symbolName: z123.string().min(1),
|
|
18677
18691
|
connections: schematicSymbolConnections.optional(),
|
|
18678
18692
|
schX: distance.optional(),
|
|
18679
18693
|
schY: distance.optional(),
|
|
18680
18694
|
schRotation: rotation8.optional(),
|
|
18681
|
-
schSectionName:
|
|
18682
|
-
schSheetName:
|
|
18695
|
+
schSectionName: z123.string().optional(),
|
|
18696
|
+
schSheetName: z123.string().optional()
|
|
18683
18697
|
});
|
|
18684
18698
|
expectTypesMatch(
|
|
18685
18699
|
true
|
|
@@ -18687,15 +18701,15 @@ expectTypesMatch(
|
|
|
18687
18701
|
|
|
18688
18702
|
// lib/components/schematic-circle.ts
|
|
18689
18703
|
import { distance as distance34, point as point6 } from "circuit-json";
|
|
18690
|
-
import { z as
|
|
18691
|
-
var schematicCircleProps =
|
|
18704
|
+
import { z as z124 } from "zod";
|
|
18705
|
+
var schematicCircleProps = z124.object({
|
|
18692
18706
|
center: point6,
|
|
18693
18707
|
radius: distance34,
|
|
18694
18708
|
strokeWidth: distance34.optional(),
|
|
18695
|
-
color:
|
|
18696
|
-
isFilled:
|
|
18697
|
-
fillColor:
|
|
18698
|
-
isDashed:
|
|
18709
|
+
color: z124.string().optional(),
|
|
18710
|
+
isFilled: z124.boolean().optional().default(false),
|
|
18711
|
+
fillColor: z124.string().optional(),
|
|
18712
|
+
isDashed: z124.boolean().optional().default(false)
|
|
18699
18713
|
});
|
|
18700
18714
|
expectTypesMatch(
|
|
18701
18715
|
true
|
|
@@ -18703,32 +18717,32 @@ expectTypesMatch(
|
|
|
18703
18717
|
|
|
18704
18718
|
// lib/components/schematic-rect.ts
|
|
18705
18719
|
import { distance as distance35, rotation as rotation9 } from "circuit-json";
|
|
18706
|
-
import { z as
|
|
18707
|
-
var schematicRectProps =
|
|
18720
|
+
import { z as z125 } from "zod";
|
|
18721
|
+
var schematicRectProps = z125.object({
|
|
18708
18722
|
schX: distance35.optional(),
|
|
18709
18723
|
schY: distance35.optional(),
|
|
18710
18724
|
width: distance35,
|
|
18711
18725
|
height: distance35,
|
|
18712
18726
|
rotation: rotation9.default(0),
|
|
18713
18727
|
strokeWidth: distance35.optional(),
|
|
18714
|
-
color:
|
|
18715
|
-
isFilled:
|
|
18716
|
-
fillColor:
|
|
18717
|
-
isDashed:
|
|
18728
|
+
color: z125.string().optional(),
|
|
18729
|
+
isFilled: z125.boolean().optional().default(false),
|
|
18730
|
+
fillColor: z125.string().optional(),
|
|
18731
|
+
isDashed: z125.boolean().optional().default(false)
|
|
18718
18732
|
});
|
|
18719
18733
|
expectTypesMatch(true);
|
|
18720
18734
|
|
|
18721
18735
|
// lib/components/schematic-line.ts
|
|
18722
18736
|
import { distance as distance36 } from "circuit-json";
|
|
18723
|
-
import { z as
|
|
18724
|
-
var schematicLineProps =
|
|
18737
|
+
import { z as z126 } from "zod";
|
|
18738
|
+
var schematicLineProps = z126.object({
|
|
18725
18739
|
x1: distance36,
|
|
18726
18740
|
y1: distance36,
|
|
18727
18741
|
x2: distance36,
|
|
18728
18742
|
y2: distance36,
|
|
18729
18743
|
strokeWidth: distance36.optional(),
|
|
18730
|
-
color:
|
|
18731
|
-
isDashed:
|
|
18744
|
+
color: z126.string().optional(),
|
|
18745
|
+
isDashed: z126.boolean().optional().default(false),
|
|
18732
18746
|
dashLength: distance36.optional(),
|
|
18733
18747
|
dashGap: distance36.optional()
|
|
18734
18748
|
});
|
|
@@ -18736,11 +18750,11 @@ expectTypesMatch(true);
|
|
|
18736
18750
|
|
|
18737
18751
|
// lib/components/schematic-text.ts
|
|
18738
18752
|
import { distance as distance37, rotation as rotation10 } from "circuit-json";
|
|
18739
|
-
import { z as
|
|
18753
|
+
import { z as z128 } from "zod";
|
|
18740
18754
|
|
|
18741
18755
|
// lib/common/fivePointAnchor.ts
|
|
18742
|
-
import { z as
|
|
18743
|
-
var fivePointAnchor =
|
|
18756
|
+
import { z as z127 } from "zod";
|
|
18757
|
+
var fivePointAnchor = z127.enum([
|
|
18744
18758
|
"center",
|
|
18745
18759
|
"left",
|
|
18746
18760
|
"right",
|
|
@@ -18749,39 +18763,39 @@ var fivePointAnchor = z125.enum([
|
|
|
18749
18763
|
]);
|
|
18750
18764
|
|
|
18751
18765
|
// lib/components/schematic-text.ts
|
|
18752
|
-
var schematicTextProps =
|
|
18766
|
+
var schematicTextProps = z128.object({
|
|
18753
18767
|
schX: distance37.optional(),
|
|
18754
18768
|
schY: distance37.optional(),
|
|
18755
|
-
text:
|
|
18756
|
-
fontSize:
|
|
18757
|
-
anchor:
|
|
18758
|
-
color:
|
|
18769
|
+
text: z128.string(),
|
|
18770
|
+
fontSize: z128.number().default(1),
|
|
18771
|
+
anchor: z128.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
18772
|
+
color: z128.string().default("#000000"),
|
|
18759
18773
|
schRotation: rotation10.default(0)
|
|
18760
18774
|
});
|
|
18761
18775
|
expectTypesMatch(true);
|
|
18762
18776
|
|
|
18763
18777
|
// lib/components/schematic-path.ts
|
|
18764
18778
|
import { distance as distance38, point as point7 } from "circuit-json";
|
|
18765
|
-
import { z as
|
|
18766
|
-
var schematicPathProps =
|
|
18767
|
-
points:
|
|
18768
|
-
svgPath:
|
|
18779
|
+
import { z as z129 } from "zod";
|
|
18780
|
+
var schematicPathProps = z129.object({
|
|
18781
|
+
points: z129.array(point7).optional(),
|
|
18782
|
+
svgPath: z129.string().optional(),
|
|
18769
18783
|
strokeWidth: distance38.optional(),
|
|
18770
|
-
strokeColor:
|
|
18784
|
+
strokeColor: z129.string().optional(),
|
|
18771
18785
|
dashLength: distance38.optional(),
|
|
18772
18786
|
dashGap: distance38.optional(),
|
|
18773
|
-
isFilled:
|
|
18774
|
-
fillColor:
|
|
18787
|
+
isFilled: z129.boolean().optional().default(false),
|
|
18788
|
+
fillColor: z129.string().optional()
|
|
18775
18789
|
});
|
|
18776
18790
|
expectTypesMatch(true);
|
|
18777
18791
|
|
|
18778
18792
|
// lib/components/schematic-table.ts
|
|
18779
18793
|
import { distance as distance39 } from "circuit-json";
|
|
18780
|
-
import { z as
|
|
18781
|
-
var schematicTableProps =
|
|
18794
|
+
import { z as z130 } from "zod";
|
|
18795
|
+
var schematicTableProps = z130.object({
|
|
18782
18796
|
schX: distance39.optional(),
|
|
18783
18797
|
schY: distance39.optional(),
|
|
18784
|
-
children:
|
|
18798
|
+
children: z130.any().optional(),
|
|
18785
18799
|
cellPadding: distance39.optional(),
|
|
18786
18800
|
borderWidth: distance39.optional(),
|
|
18787
18801
|
anchor: ninePointAnchor.optional(),
|
|
@@ -18791,34 +18805,34 @@ expectTypesMatch(true);
|
|
|
18791
18805
|
|
|
18792
18806
|
// lib/components/schematic-row.ts
|
|
18793
18807
|
import { distance as distance40 } from "circuit-json";
|
|
18794
|
-
import { z as
|
|
18795
|
-
var schematicRowProps =
|
|
18796
|
-
children:
|
|
18808
|
+
import { z as z131 } from "zod";
|
|
18809
|
+
var schematicRowProps = z131.object({
|
|
18810
|
+
children: z131.any().optional(),
|
|
18797
18811
|
height: distance40.optional()
|
|
18798
18812
|
});
|
|
18799
18813
|
expectTypesMatch(true);
|
|
18800
18814
|
|
|
18801
18815
|
// lib/components/schematic-cell.ts
|
|
18802
18816
|
import { distance as distance41 } from "circuit-json";
|
|
18803
|
-
import { z as
|
|
18804
|
-
var schematicCellProps =
|
|
18805
|
-
children:
|
|
18806
|
-
horizontalAlign:
|
|
18807
|
-
verticalAlign:
|
|
18817
|
+
import { z as z132 } from "zod";
|
|
18818
|
+
var schematicCellProps = z132.object({
|
|
18819
|
+
children: z132.string().optional(),
|
|
18820
|
+
horizontalAlign: z132.enum(["left", "center", "right"]).optional(),
|
|
18821
|
+
verticalAlign: z132.enum(["top", "middle", "bottom"]).optional(),
|
|
18808
18822
|
fontSize: distance41.optional(),
|
|
18809
|
-
rowSpan:
|
|
18810
|
-
colSpan:
|
|
18823
|
+
rowSpan: z132.number().optional(),
|
|
18824
|
+
colSpan: z132.number().optional(),
|
|
18811
18825
|
width: distance41.optional(),
|
|
18812
|
-
text:
|
|
18826
|
+
text: z132.string().optional()
|
|
18813
18827
|
});
|
|
18814
18828
|
expectTypesMatch(true);
|
|
18815
18829
|
|
|
18816
18830
|
// lib/components/schematic-section.ts
|
|
18817
18831
|
import { distance as distance42 } from "circuit-json";
|
|
18818
|
-
import { z as
|
|
18819
|
-
var schematicSectionProps =
|
|
18820
|
-
displayName:
|
|
18821
|
-
name:
|
|
18832
|
+
import { z as z133 } from "zod";
|
|
18833
|
+
var schematicSectionProps = z133.object({
|
|
18834
|
+
displayName: z133.string().optional(),
|
|
18835
|
+
name: z133.string(),
|
|
18822
18836
|
sectionTitleFontSize: distance42.optional()
|
|
18823
18837
|
});
|
|
18824
18838
|
expectTypesMatch(
|
|
@@ -18826,30 +18840,30 @@ expectTypesMatch(
|
|
|
18826
18840
|
);
|
|
18827
18841
|
|
|
18828
18842
|
// lib/components/schematic-sheet.ts
|
|
18829
|
-
import { z as
|
|
18843
|
+
import { z as z134 } from "zod";
|
|
18830
18844
|
import { distance as distance43 } from "circuit-json";
|
|
18831
|
-
var schematicSheetProps =
|
|
18832
|
-
name:
|
|
18833
|
-
displayName:
|
|
18834
|
-
sheetIndex:
|
|
18835
|
-
sheetSize:
|
|
18836
|
-
sheetWidth: distance43.pipe(
|
|
18837
|
-
sheetHeight: distance43.pipe(
|
|
18838
|
-
children:
|
|
18845
|
+
var schematicSheetProps = z134.object({
|
|
18846
|
+
name: z134.string().optional(),
|
|
18847
|
+
displayName: z134.string().optional(),
|
|
18848
|
+
sheetIndex: z134.number().optional(),
|
|
18849
|
+
sheetSize: z134.enum(["A4", "ANSI_B"]).default("A4"),
|
|
18850
|
+
sheetWidth: distance43.pipe(z134.number().positive()).optional(),
|
|
18851
|
+
sheetHeight: distance43.pipe(z134.number().positive()).optional(),
|
|
18852
|
+
children: z134.any().optional()
|
|
18839
18853
|
});
|
|
18840
18854
|
expectTypesMatch(true);
|
|
18841
18855
|
|
|
18842
18856
|
// lib/components/schematic-graphic.ts
|
|
18843
|
-
import { z as
|
|
18857
|
+
import { z as z135 } from "zod";
|
|
18844
18858
|
var nonemptyUrl = url.refine((value) => value.trim().length > 0, {
|
|
18845
18859
|
message: "imageUrl cannot be empty"
|
|
18846
18860
|
});
|
|
18847
18861
|
var positiveDistance = (fieldName) => distance.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18848
18862
|
message: `${fieldName} must be a positive finite distance`
|
|
18849
18863
|
});
|
|
18850
|
-
var schematicGraphicProps =
|
|
18864
|
+
var schematicGraphicProps = z135.object({
|
|
18851
18865
|
imageUrl: nonemptyUrl.optional(),
|
|
18852
|
-
svgContent:
|
|
18866
|
+
svgContent: z135.string().refine((value) => value.trim().length > 0, {
|
|
18853
18867
|
message: "svgContent cannot be empty"
|
|
18854
18868
|
}).optional(),
|
|
18855
18869
|
width: positiveDistance("width").optional(),
|
|
@@ -18857,7 +18871,7 @@ var schematicGraphicProps = z133.object({
|
|
|
18857
18871
|
}).superRefine(({ imageUrl, svgContent }, ctx) => {
|
|
18858
18872
|
if (imageUrl === void 0 && svgContent === void 0) {
|
|
18859
18873
|
ctx.addIssue({
|
|
18860
|
-
code:
|
|
18874
|
+
code: z135.ZodIssueCode.custom,
|
|
18861
18875
|
message: "At least one of imageUrl or svgContent is required"
|
|
18862
18876
|
});
|
|
18863
18877
|
}
|
|
@@ -18868,40 +18882,40 @@ expectTypesMatch(
|
|
|
18868
18882
|
|
|
18869
18883
|
// lib/components/copper-text.ts
|
|
18870
18884
|
import { layer_ref as layer_ref12, length as length8 } from "circuit-json";
|
|
18871
|
-
import { z as
|
|
18885
|
+
import { z as z136 } from "zod";
|
|
18872
18886
|
var copperTextProps = pcbLayoutProps.extend({
|
|
18873
|
-
text:
|
|
18887
|
+
text: z136.string(),
|
|
18874
18888
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18875
|
-
font:
|
|
18889
|
+
font: z136.enum(["tscircuit2024"]).optional(),
|
|
18876
18890
|
fontSize: length8.optional(),
|
|
18877
|
-
layers:
|
|
18878
|
-
knockout:
|
|
18879
|
-
mirrored:
|
|
18891
|
+
layers: z136.array(layer_ref12).optional(),
|
|
18892
|
+
knockout: z136.boolean().optional(),
|
|
18893
|
+
mirrored: z136.boolean().optional()
|
|
18880
18894
|
});
|
|
18881
18895
|
|
|
18882
18896
|
// lib/components/silkscreen-text.ts
|
|
18883
18897
|
import { layer_ref as layer_ref13, length as length9 } from "circuit-json";
|
|
18884
|
-
import { z as
|
|
18898
|
+
import { z as z137 } from "zod";
|
|
18885
18899
|
var silkscreenTextProps = pcbLayoutProps.extend({
|
|
18886
|
-
text:
|
|
18900
|
+
text: z137.string(),
|
|
18887
18901
|
anchorAlignment: ninePointAnchor.default("center"),
|
|
18888
|
-
font:
|
|
18902
|
+
font: z137.enum(["tscircuit2024"]).optional(),
|
|
18889
18903
|
fontSize: length9.optional(),
|
|
18890
18904
|
/**
|
|
18891
18905
|
* If true, text will knock out underlying silkscreen
|
|
18892
18906
|
*/
|
|
18893
|
-
isKnockout:
|
|
18907
|
+
isKnockout: z137.boolean().optional(),
|
|
18894
18908
|
knockoutPadding: length9.optional(),
|
|
18895
18909
|
knockoutPaddingLeft: length9.optional(),
|
|
18896
18910
|
knockoutPaddingRight: length9.optional(),
|
|
18897
18911
|
knockoutPaddingTop: length9.optional(),
|
|
18898
18912
|
knockoutPaddingBottom: length9.optional(),
|
|
18899
|
-
layers:
|
|
18913
|
+
layers: z137.array(layer_ref13).optional()
|
|
18900
18914
|
});
|
|
18901
18915
|
|
|
18902
18916
|
// lib/components/silkscreen-path.ts
|
|
18903
18917
|
import { length as length10, route_hint_point as route_hint_point5 } from "circuit-json";
|
|
18904
|
-
import { z as
|
|
18918
|
+
import { z as z138 } from "zod";
|
|
18905
18919
|
var silkscreenPathProps = pcbLayoutProps.omit({
|
|
18906
18920
|
pcbLeftEdgeX: true,
|
|
18907
18921
|
pcbRightEdgeX: true,
|
|
@@ -18913,7 +18927,7 @@ var silkscreenPathProps = pcbLayoutProps.omit({
|
|
|
18913
18927
|
pcbOffsetY: true,
|
|
18914
18928
|
pcbRotation: true
|
|
18915
18929
|
}).extend({
|
|
18916
|
-
route:
|
|
18930
|
+
route: z138.array(route_hint_point5),
|
|
18917
18931
|
strokeWidth: length10.optional()
|
|
18918
18932
|
});
|
|
18919
18933
|
|
|
@@ -18935,10 +18949,10 @@ var silkscreenLineProps = pcbLayoutProps.omit({
|
|
|
18935
18949
|
|
|
18936
18950
|
// lib/components/silkscreen-rect.ts
|
|
18937
18951
|
import { distance as distance45 } from "circuit-json";
|
|
18938
|
-
import { z as
|
|
18952
|
+
import { z as z139 } from "zod";
|
|
18939
18953
|
var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18940
|
-
filled:
|
|
18941
|
-
stroke:
|
|
18954
|
+
filled: z139.boolean().default(true).optional(),
|
|
18955
|
+
stroke: z139.enum(["dashed", "solid", "none"]).optional(),
|
|
18942
18956
|
strokeWidth: distance45.optional(),
|
|
18943
18957
|
width: distance45,
|
|
18944
18958
|
height: distance45,
|
|
@@ -18947,10 +18961,10 @@ var silkscreenRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
|
18947
18961
|
|
|
18948
18962
|
// lib/components/silkscreen-circle.ts
|
|
18949
18963
|
import { distance as distance46 } from "circuit-json";
|
|
18950
|
-
import { z as
|
|
18964
|
+
import { z as z140 } from "zod";
|
|
18951
18965
|
var silkscreenCircleProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
18952
|
-
isFilled:
|
|
18953
|
-
isOutline:
|
|
18966
|
+
isFilled: z140.boolean().optional(),
|
|
18967
|
+
isOutline: z140.boolean().optional(),
|
|
18954
18968
|
strokeWidth: distance46.optional(),
|
|
18955
18969
|
radius: distance46
|
|
18956
18970
|
});
|
|
@@ -18968,69 +18982,69 @@ expectTypesMatch(true);
|
|
|
18968
18982
|
|
|
18969
18983
|
// lib/components/trace-hint.ts
|
|
18970
18984
|
import { distance as distance47, layer_ref as layer_ref14, route_hint_point as route_hint_point6 } from "circuit-json";
|
|
18971
|
-
import { z as
|
|
18972
|
-
var routeHintPointProps =
|
|
18985
|
+
import { z as z142 } from "zod";
|
|
18986
|
+
var routeHintPointProps = z142.object({
|
|
18973
18987
|
x: distance47,
|
|
18974
18988
|
y: distance47,
|
|
18975
|
-
via:
|
|
18989
|
+
via: z142.boolean().optional(),
|
|
18976
18990
|
toLayer: layer_ref14.optional()
|
|
18977
18991
|
});
|
|
18978
|
-
var traceHintProps =
|
|
18979
|
-
for:
|
|
18992
|
+
var traceHintProps = z142.object({
|
|
18993
|
+
for: z142.string().optional().describe(
|
|
18980
18994
|
"Selector for the port you're targeting, not required if you're inside a trace"
|
|
18981
18995
|
),
|
|
18982
|
-
order:
|
|
18996
|
+
order: z142.number().optional(),
|
|
18983
18997
|
offset: route_hint_point6.or(routeHintPointProps).optional(),
|
|
18984
|
-
offsets:
|
|
18985
|
-
traceWidth:
|
|
18998
|
+
offsets: z142.array(route_hint_point6).or(z142.array(routeHintPointProps)).optional(),
|
|
18999
|
+
traceWidth: z142.number().optional()
|
|
18986
19000
|
});
|
|
18987
19001
|
|
|
18988
19002
|
// lib/components/port.ts
|
|
18989
19003
|
import { distance as distance48 } from "circuit-json";
|
|
18990
|
-
import { z as
|
|
19004
|
+
import { z as z143 } from "zod";
|
|
18991
19005
|
var portProps = commonLayoutProps.extend({
|
|
18992
|
-
name:
|
|
18993
|
-
pinNumber:
|
|
18994
|
-
schStemLength:
|
|
18995
|
-
schPinLabelFontSize:
|
|
19006
|
+
name: z143.string().optional(),
|
|
19007
|
+
pinNumber: z143.number().optional(),
|
|
19008
|
+
schStemLength: z143.number().optional(),
|
|
19009
|
+
schPinLabelFontSize: z143.enum(["default", "sm"]).or(
|
|
18996
19010
|
distance48.refine((value) => Number.isFinite(value) && value > 0, {
|
|
18997
19011
|
message: "Schematic pin-label font size must be positive and finite"
|
|
18998
19012
|
})
|
|
18999
19013
|
).optional(),
|
|
19000
|
-
aliases:
|
|
19001
|
-
layer:
|
|
19002
|
-
layers:
|
|
19003
|
-
schX:
|
|
19004
|
-
schY:
|
|
19014
|
+
aliases: z143.array(z143.string()).optional(),
|
|
19015
|
+
layer: z143.string().optional(),
|
|
19016
|
+
layers: z143.array(z143.string()).optional(),
|
|
19017
|
+
schX: z143.number().optional(),
|
|
19018
|
+
schY: z143.number().optional(),
|
|
19005
19019
|
direction: direction.optional(),
|
|
19006
|
-
connectsTo:
|
|
19020
|
+
connectsTo: z143.string().or(z143.array(z143.string())).optional(),
|
|
19007
19021
|
kicadPinMetadata: kicadPinMetadata.optional(),
|
|
19008
|
-
hasInversionCircle:
|
|
19022
|
+
hasInversionCircle: z143.boolean().optional()
|
|
19009
19023
|
});
|
|
19010
19024
|
|
|
19011
19025
|
// lib/components/pcb-note-text.ts
|
|
19012
19026
|
import { length as length11 } from "circuit-json";
|
|
19013
|
-
import { z as
|
|
19027
|
+
import { z as z144 } from "zod";
|
|
19014
19028
|
var pcbNoteTextProps = pcbLayoutProps.extend({
|
|
19015
|
-
text:
|
|
19016
|
-
anchorAlignment:
|
|
19017
|
-
font:
|
|
19029
|
+
text: z144.string(),
|
|
19030
|
+
anchorAlignment: z144.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
19031
|
+
font: z144.enum(["tscircuit2024"]).optional(),
|
|
19018
19032
|
fontSize: length11.optional(),
|
|
19019
|
-
color:
|
|
19033
|
+
color: z144.string().optional()
|
|
19020
19034
|
});
|
|
19021
19035
|
expectTypesMatch(true);
|
|
19022
19036
|
|
|
19023
19037
|
// lib/components/pcb-note-rect.ts
|
|
19024
19038
|
import { distance as distance49 } from "circuit-json";
|
|
19025
|
-
import { z as
|
|
19039
|
+
import { z as z145 } from "zod";
|
|
19026
19040
|
var pcbNoteRectProps = pcbLayoutProps.omit({ pcbRotation: true }).extend({
|
|
19027
19041
|
width: distance49,
|
|
19028
19042
|
height: distance49,
|
|
19029
19043
|
strokeWidth: distance49.optional(),
|
|
19030
|
-
isFilled:
|
|
19031
|
-
hasStroke:
|
|
19032
|
-
isStrokeDashed:
|
|
19033
|
-
color:
|
|
19044
|
+
isFilled: z145.boolean().optional(),
|
|
19045
|
+
hasStroke: z145.boolean().optional(),
|
|
19046
|
+
isStrokeDashed: z145.boolean().optional(),
|
|
19047
|
+
color: z145.string().optional(),
|
|
19034
19048
|
cornerRadius: distance49.optional()
|
|
19035
19049
|
});
|
|
19036
19050
|
expectTypesMatch(true);
|
|
@@ -19040,7 +19054,7 @@ import {
|
|
|
19040
19054
|
length as length12,
|
|
19041
19055
|
route_hint_point as route_hint_point7
|
|
19042
19056
|
} from "circuit-json";
|
|
19043
|
-
import { z as
|
|
19057
|
+
import { z as z146 } from "zod";
|
|
19044
19058
|
var pcbNotePathProps = pcbLayoutProps.omit({
|
|
19045
19059
|
pcbLeftEdgeX: true,
|
|
19046
19060
|
pcbRightEdgeX: true,
|
|
@@ -19052,15 +19066,15 @@ var pcbNotePathProps = pcbLayoutProps.omit({
|
|
|
19052
19066
|
pcbOffsetY: true,
|
|
19053
19067
|
pcbRotation: true
|
|
19054
19068
|
}).extend({
|
|
19055
|
-
route:
|
|
19069
|
+
route: z146.array(route_hint_point7),
|
|
19056
19070
|
strokeWidth: length12.optional(),
|
|
19057
|
-
color:
|
|
19071
|
+
color: z146.string().optional()
|
|
19058
19072
|
});
|
|
19059
19073
|
expectTypesMatch(true);
|
|
19060
19074
|
|
|
19061
19075
|
// lib/components/pcb-note-line.ts
|
|
19062
19076
|
import { distance as distance50 } from "circuit-json";
|
|
19063
|
-
import { z as
|
|
19077
|
+
import { z as z147 } from "zod";
|
|
19064
19078
|
var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
19065
19079
|
pcbLeftEdgeX: true,
|
|
19066
19080
|
pcbRightEdgeX: true,
|
|
@@ -19077,15 +19091,15 @@ var pcbNoteLineProps = pcbLayoutProps.omit({
|
|
|
19077
19091
|
x2: distance50,
|
|
19078
19092
|
y2: distance50,
|
|
19079
19093
|
strokeWidth: distance50.optional(),
|
|
19080
|
-
color:
|
|
19081
|
-
isDashed:
|
|
19094
|
+
color: z147.string().optional(),
|
|
19095
|
+
isDashed: z147.boolean().optional()
|
|
19082
19096
|
});
|
|
19083
19097
|
expectTypesMatch(true);
|
|
19084
19098
|
|
|
19085
19099
|
// lib/components/pcb-note-dimension.ts
|
|
19086
19100
|
import { distance as distance51, length as length13 } from "circuit-json";
|
|
19087
|
-
import { z as
|
|
19088
|
-
var dimensionTarget2 =
|
|
19101
|
+
import { z as z148 } from "zod";
|
|
19102
|
+
var dimensionTarget2 = z148.union([z148.string(), point]);
|
|
19089
19103
|
var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
19090
19104
|
pcbLeftEdgeX: true,
|
|
19091
19105
|
pcbRightEdgeX: true,
|
|
@@ -19099,107 +19113,108 @@ var pcbNoteDimensionProps = pcbLayoutProps.omit({
|
|
|
19099
19113
|
}).extend({
|
|
19100
19114
|
from: dimensionTarget2,
|
|
19101
19115
|
to: dimensionTarget2,
|
|
19102
|
-
text:
|
|
19116
|
+
text: z148.string().optional(),
|
|
19103
19117
|
offset: distance51.optional(),
|
|
19104
|
-
font:
|
|
19118
|
+
font: z148.enum(["tscircuit2024"]).optional(),
|
|
19105
19119
|
fontSize: length13.optional(),
|
|
19106
|
-
color:
|
|
19120
|
+
color: z148.string().optional(),
|
|
19107
19121
|
arrowSize: distance51.optional(),
|
|
19108
|
-
units:
|
|
19109
|
-
outerEdgeToEdge:
|
|
19110
|
-
centerToCenter:
|
|
19111
|
-
innerEdgeToEdge:
|
|
19122
|
+
units: z148.enum(["in", "mm"]).optional(),
|
|
19123
|
+
outerEdgeToEdge: z148.literal(true).optional(),
|
|
19124
|
+
centerToCenter: z148.literal(true).optional(),
|
|
19125
|
+
innerEdgeToEdge: z148.literal(true).optional()
|
|
19112
19126
|
});
|
|
19113
19127
|
expectTypesMatch(
|
|
19114
19128
|
true
|
|
19115
19129
|
);
|
|
19116
19130
|
|
|
19117
19131
|
// lib/platformConfig.ts
|
|
19118
|
-
import { z as
|
|
19119
|
-
var unvalidatedCircuitJson =
|
|
19120
|
-
var footprintLibraryResult =
|
|
19121
|
-
footprintCircuitJson:
|
|
19132
|
+
import { z as z149 } from "zod";
|
|
19133
|
+
var unvalidatedCircuitJson = z149.array(z149.any()).describe("Circuit JSON");
|
|
19134
|
+
var footprintLibraryResult = z149.object({
|
|
19135
|
+
footprintCircuitJson: z149.array(z149.any()),
|
|
19122
19136
|
cadModel: cadModelProp.optional()
|
|
19123
19137
|
});
|
|
19124
|
-
var pathToCircuitJsonFn =
|
|
19125
|
-
|
|
19126
|
-
|
|
19127
|
-
|
|
19128
|
-
).returns(
|
|
19138
|
+
var pathToCircuitJsonFn = z149.function().args(z149.string()).returns(z149.promise(footprintLibraryResult)).or(
|
|
19139
|
+
z149.function().args(
|
|
19140
|
+
z149.string(),
|
|
19141
|
+
z149.object({ resolvedPcbStyle: pcbStyle.optional() }).optional()
|
|
19142
|
+
).returns(z149.promise(footprintLibraryResult))
|
|
19129
19143
|
).describe("A function that takes a path and returns Circuit JSON");
|
|
19130
|
-
var footprintFileParserEntry =
|
|
19131
|
-
loadFromUrl:
|
|
19144
|
+
var footprintFileParserEntry = z149.object({
|
|
19145
|
+
loadFromUrl: z149.function().args(z149.string()).returns(z149.promise(footprintLibraryResult)).describe(
|
|
19132
19146
|
"A function that takes a footprint file URL and returns Circuit JSON"
|
|
19133
19147
|
)
|
|
19134
19148
|
});
|
|
19135
|
-
var spiceEngineSimulationResult =
|
|
19136
|
-
engineVersionString:
|
|
19149
|
+
var spiceEngineSimulationResult = z149.object({
|
|
19150
|
+
engineVersionString: z149.string().optional(),
|
|
19137
19151
|
simulationResultCircuitJson: unvalidatedCircuitJson
|
|
19138
19152
|
});
|
|
19139
|
-
var spiceEngineZod =
|
|
19140
|
-
simulate:
|
|
19153
|
+
var spiceEngineZod = z149.object({
|
|
19154
|
+
simulate: z149.function().args(z149.string()).returns(z149.promise(spiceEngineSimulationResult)).describe(
|
|
19141
19155
|
"A function that takes a SPICE string and returns a simulation result"
|
|
19142
19156
|
)
|
|
19143
19157
|
});
|
|
19144
|
-
var defaultSpiceEngine =
|
|
19158
|
+
var defaultSpiceEngine = z149.custom(
|
|
19145
19159
|
(value) => typeof value === "string"
|
|
19146
19160
|
);
|
|
19147
|
-
var autorouterInstance =
|
|
19148
|
-
run:
|
|
19149
|
-
getOutputSimpleRouteJson:
|
|
19161
|
+
var autorouterInstance = z149.object({
|
|
19162
|
+
run: z149.function().args().returns(z149.promise(z149.unknown())).describe("Run the autorouter"),
|
|
19163
|
+
getOutputSimpleRouteJson: z149.function().args().returns(z149.promise(z149.any())).describe("Get the resulting SimpleRouteJson")
|
|
19150
19164
|
});
|
|
19151
|
-
var autorouterDefinition =
|
|
19152
|
-
createAutorouter:
|
|
19165
|
+
var autorouterDefinition = z149.object({
|
|
19166
|
+
createAutorouter: z149.function().args(z149.any(), z149.any().optional()).returns(z149.union([autorouterInstance, z149.promise(autorouterInstance)])).describe("Create an autorouter instance")
|
|
19153
19167
|
});
|
|
19154
|
-
var platformFetch =
|
|
19155
|
-
var localCacheEngine =
|
|
19168
|
+
var platformFetch = z149.custom((value) => typeof value === "function").describe("A fetch-like function to use for platform requests");
|
|
19169
|
+
var localCacheEngine = z149.custom(
|
|
19156
19170
|
(value) => typeof value === "object" && value !== null && "getItem" in value && typeof value.getItem === "function" && "setItem" in value && typeof value.setItem === "function"
|
|
19157
19171
|
);
|
|
19158
|
-
var platformConfig =
|
|
19172
|
+
var platformConfig = z149.object({
|
|
19159
19173
|
partsEngine: partsEngine.optional(),
|
|
19160
19174
|
autorouter: autorouterProp.optional(),
|
|
19161
|
-
autorouterMap:
|
|
19162
|
-
allowLegacyAutorouters:
|
|
19175
|
+
autorouterMap: z149.record(z149.string(), autorouterDefinition).optional(),
|
|
19176
|
+
allowLegacyAutorouters: z149.boolean().optional(),
|
|
19163
19177
|
registryApiUrl: url.optional(),
|
|
19164
19178
|
cloudAutorouterUrl: url.optional(),
|
|
19165
|
-
projectName:
|
|
19179
|
+
projectName: z149.string().optional(),
|
|
19166
19180
|
projectBaseUrl: url.optional(),
|
|
19167
|
-
version:
|
|
19181
|
+
version: z149.string().optional(),
|
|
19168
19182
|
url: url.optional(),
|
|
19169
|
-
printBoardInformationToSilkscreen:
|
|
19170
|
-
includeBoardFiles:
|
|
19183
|
+
printBoardInformationToSilkscreen: z149.boolean().optional(),
|
|
19184
|
+
includeBoardFiles: z149.array(z149.string()).describe(
|
|
19171
19185
|
'The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs'
|
|
19172
19186
|
).optional(),
|
|
19173
|
-
snapshotsDir:
|
|
19187
|
+
snapshotsDir: z149.string().describe(
|
|
19174
19188
|
'The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"'
|
|
19175
19189
|
).optional(),
|
|
19176
19190
|
defaultSpiceEngine: defaultSpiceEngine.optional(),
|
|
19177
|
-
unitPreference:
|
|
19191
|
+
unitPreference: z149.enum(["mm", "in", "mil"]).optional(),
|
|
19178
19192
|
localCacheEngine: localCacheEngine.optional(),
|
|
19179
|
-
enablePartOrientationAnalysis:
|
|
19180
|
-
pcbPackSolverTimeoutMs:
|
|
19181
|
-
pcbDisabled:
|
|
19182
|
-
routingDisabled:
|
|
19183
|
-
schematicDisabled:
|
|
19184
|
-
partsEngineDisabled:
|
|
19185
|
-
|
|
19186
|
-
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19193
|
+
enablePartOrientationAnalysis: z149.boolean().optional(),
|
|
19194
|
+
pcbPackSolverTimeoutMs: z149.number().finite().positive().optional(),
|
|
19195
|
+
pcbDisabled: z149.boolean().optional(),
|
|
19196
|
+
routingDisabled: z149.boolean().optional(),
|
|
19197
|
+
schematicDisabled: z149.boolean().optional(),
|
|
19198
|
+
partsEngineDisabled: z149.boolean().optional(),
|
|
19199
|
+
analogSimulationDisabled: z149.boolean().optional(),
|
|
19200
|
+
drcChecksDisabled: z149.boolean().optional(),
|
|
19201
|
+
netlistDrcChecksDisabled: z149.boolean().optional(),
|
|
19202
|
+
routingDrcChecksDisabled: z149.boolean().optional(),
|
|
19203
|
+
placementDrcChecksDisabled: z149.boolean().optional(),
|
|
19204
|
+
pinSpecificationDrcChecksDisabled: z149.boolean().optional(),
|
|
19205
|
+
spiceEngineMap: z149.record(z149.string(), spiceEngineZod).optional(),
|
|
19206
|
+
footprintLibraryMap: z149.record(
|
|
19207
|
+
z149.string(),
|
|
19208
|
+
z149.union([
|
|
19194
19209
|
pathToCircuitJsonFn,
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19210
|
+
z149.record(
|
|
19211
|
+
z149.string(),
|
|
19212
|
+
z149.union([unvalidatedCircuitJson, pathToCircuitJsonFn])
|
|
19198
19213
|
)
|
|
19199
19214
|
])
|
|
19200
19215
|
).optional(),
|
|
19201
|
-
footprintFileParserMap:
|
|
19202
|
-
resolveProjectStaticFileImportUrl:
|
|
19216
|
+
footprintFileParserMap: z149.record(z149.string(), footprintFileParserEntry).optional(),
|
|
19217
|
+
resolveProjectStaticFileImportUrl: z149.function().args(z149.string()).returns(z149.promise(z149.string())).describe(
|
|
19203
19218
|
"A function that returns a string URL for static files for the project"
|
|
19204
19219
|
).optional(),
|
|
19205
19220
|
platformFetch: platformFetch.optional()
|
|
@@ -19219,7 +19234,8 @@ var projectConfig = platformConfigObject.pick({
|
|
|
19219
19234
|
snapshotsDir: true,
|
|
19220
19235
|
defaultSpiceEngine: true,
|
|
19221
19236
|
pcbDisabled: true,
|
|
19222
|
-
schematicDisabled: true
|
|
19237
|
+
schematicDisabled: true,
|
|
19238
|
+
analogSimulationDisabled: true
|
|
19223
19239
|
});
|
|
19224
19240
|
expectTypesMatch(true);
|
|
19225
19241
|
export {
|
|
@@ -19238,6 +19254,7 @@ export {
|
|
|
19238
19254
|
analogSweepParameterProps,
|
|
19239
19255
|
analogTransientSimulationProps,
|
|
19240
19256
|
analogVoltageSweepParameterProps,
|
|
19257
|
+
antennaProps,
|
|
19241
19258
|
assemblyDeviceProps,
|
|
19242
19259
|
assemblyProps,
|
|
19243
19260
|
autorouterConfig,
|
|
@@ -19390,6 +19407,8 @@ export {
|
|
|
19390
19407
|
pcbNotePathProps,
|
|
19391
19408
|
pcbNoteRectProps,
|
|
19392
19409
|
pcbNoteTextProps,
|
|
19410
|
+
pcbPath,
|
|
19411
|
+
pcbPathPoint,
|
|
19393
19412
|
pcbSameXConstraintProps,
|
|
19394
19413
|
pcbSameYConstraintProps,
|
|
19395
19414
|
pcbStyle,
|